diff --git a/app.md b/app.md index e366229..b01b294 100644 --- a/app.md +++ b/app.md @@ -79,7 +79,7 @@ Single-binary: backend Go con frontend Vite embebido. SQLite local con tres tabl ./kanban --port 8095 --db kanban.db ``` -### Schema SQLite (`migrations/001_init.sql`) +### Schema SQLite (`migrations/001_init.sql` … `010_card_messages.sql`) - **columns** — id, name, position, created_at - **cards** — id, title, description, column_id (FK), position, created_at, updated_at @@ -87,6 +87,7 @@ Single-binary: backend Go con frontend Vite embebido. SQLite local con tres tabl - Una entrada con `exited_at IS NULL` = posicion actual - Al mover una tarjeta a otra columna: cierra la entrada activa (`exited_at = now`) e inserta una nueva - El borrado de tarjeta hace CASCADE sobre el historial +- **card_messages** (migration 010) — id, card_id (FK CASCADE), author_id (nullable), body, created_at. Comentarios humano-a-humano por card; distintos de `card_events` (sistema) y `/api/chat` (LLM global). ### API REST @@ -101,7 +102,21 @@ Single-binary: backend Go con frontend Vite embebido. SQLite local con tres tabl | PATCH | `/api/cards/{id}` | `{title?, description?}` | | DELETE | `/api/cards/{id}` | — | | POST | `/api/cards/{id}/move` | `{column_id, ordered_ids: [...]}` | +| POST | `/api/cards/{id}/duplicate` | — (clona la card en la misma columna al final; copia titulo+" (copia)", descripcion, color, requester, assignee, tags, stickers, deadline; NO copia historial ni mensajes) | +| GET | `/api/cards/{id}/messages` | — (lista de comentarios humano-a-humano de la card) | +| POST | `/api/cards/{id}/messages` | `{body}` (crea comentario; author = usuario de la sesion) | +| DELETE | `/api/cards/{cid}/messages/{mid}` | — (solo el autor puede borrar su mensaje) | | GET | `/api/cards/{id}/history` | — (timeline con duraciones por columna) | +| GET | `/api/flags` | — (retorna `{ : bool }` con los feature flags efectivos en esta instancia) | +| POST | `/api/auth/register` | `{username, password, display_name?}` (devuelve 403 `registration_disabled` si el flag `registration-enabled` esta en `false`) | + +### Feature flags + +`dev/feature_flags.json` (lado del repo) define los flags por instancia. Se cargan al arrancar (override con `--flags `); fichero ausente equivale a "todos los flags en `false`". El endpoint `GET /api/flags` expone el estado actual para que el frontend oculte UI condicional (ej. el toggle de "Registrate" en `LoginPage` solo aparece cuando `registration-enabled` es `true`). + +| Flag | Default | Efecto cuando esta en `true` | +|---|---|---| +| `registration-enabled` | `false` | Permite crear cuentas nuevas via `POST /api/auth/register` y muestra el toggle "Registrate" en la pantalla de login. | ### Frontend @@ -110,6 +125,13 @@ Single-binary: backend Go con frontend Vite embebido. SQLite local con tres tabl - **Modales** con `@mantine/modals` (confirmacion borrado, history timeline). - Time-in-column live: `time_in_column_ms` del backend + tick local cada segundo para que el badge se actualice sin reload. - DnD con `closestCorners` + `DragOverlay` para feedback visual al arrastrar. +- **Auto-refresh:** el board se recarga cada 30s (`api.getBoard`) sin interaccion del usuario; equivalente a pulsar el boton de refresco. El tick de 1s del time-in-column es independiente y no toca red. +- **Modal de card en dos columnas** (`CardEditPanel`): izquierda mantiene `CardForm` (titulo, solicitante, descripcion, asignacion, tags); derecha es un `Tabs` con `Chat` (por defecto) | `Enlaces` | `Archivos` (proximamente). Tamaño del modal: 85% del viewport. + - **Chat per-card** (`CardChatPanel`): lista de comentarios humano-a-humano persistidos en `card_messages`. Enter envia, Shift+Enter salto de linea. Solo el autor puede borrar su propio mensaje. + - **Enlaces** (`CardLinksPanel`): extrae URLs (`https?://...`) de titulo, descripcion y cuerpo de cada mensaje del chat. Deduplica, muestra hostname + URL completa + badge de origen. Click abre en pestaña nueva (`target="_blank"`). +- **Duplicar card:** click derecho sobre la card abre el menu contextual (mismo que el boton `⋮`), donde aparece el item "Duplicar". Al pulsarlo invoca `POST /api/cards/{id}/duplicate`. La copia se inserta al final de la misma columna con titulo + " (copia)". +- **Sesion obligatoria para chat:** `POST/DELETE /api/cards/{id}/messages` exige sesion activa (401 si falta). `author_id` siempre poblado; no hay comentarios anonimos. +- **Archivos (proximamente):** blobs persistidos en SQLite (`card_attachments` con `BLOB`), no en filesystem. ### Build diff --git a/backend/auth.go b/backend/auth.go index 4907c85..88704c6 100644 --- a/backend/auth.go +++ b/backend/auth.go @@ -30,8 +30,12 @@ func tokenFromRequest(r *http.Request) string { } // POST /api/auth/register {username, password, display_name?} -func handleRegister(db *DB) http.HandlerFunc { +func handleRegister(db *DB, flags *FeatureFlags) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { + if !flags.Enabled("registration-enabled") { + infra.HTTPErrorResponse(w, infra.HTTPError{Status: http.StatusForbidden, Code: "registration_disabled", Message: "user registration is disabled on this instance"}) + return + } var body struct { Username string `json:"username"` Password string `json:"password"` diff --git a/backend/db.go b/backend/db.go index 8060c56..42ed8a4 100644 --- a/backend/db.go +++ b/backend/db.go @@ -1031,3 +1031,171 @@ func (db *DB) CardHistory(cardID string) (*CardHistoryResponse, error) { CurrentlyLock: currently, }, nil } + +type CardMessage struct { + ID string `json:"id"` + CardID string `json:"card_id"` + AuthorID *string `json:"author_id"` + Body string `json:"body"` + CreatedAt string `json:"created_at"` +} + +func (db *DB) ListCardMessages(cardID string) ([]CardMessage, error) { + rows, err := db.conn.Query( + `SELECT id, card_id, author_id, body, created_at FROM card_messages WHERE card_id=? ORDER BY created_at`, + cardID, + ) + if err != nil { + return nil, err + } + defer rows.Close() + out := []CardMessage{} + for rows.Next() { + var m CardMessage + var author sql.NullString + if err := rows.Scan(&m.ID, &m.CardID, &author, &m.Body, &m.CreatedAt); err != nil { + return nil, err + } + if author.Valid && author.String != "" { + s := author.String + m.AuthorID = &s + } + out = append(out, m) + } + return out, rows.Err() +} + +func (db *DB) CreateCardMessage(cardID, authorID, body string) (*CardMessage, error) { + body = strings.TrimSpace(body) + if body == "" { + return nil, fmt.Errorf("body required") + } + if authorID == "" { + return nil, fmt.Errorf("author required") + } + var exists int + if err := db.conn.QueryRow(`SELECT 1 FROM cards WHERE id=?`, cardID).Scan(&exists); err != nil { + return nil, fmt.Errorf("card not found: %w", err) + } + s := authorID + m := &CardMessage{ID: newID(), CardID: cardID, AuthorID: &s, Body: body, CreatedAt: nowRFC3339()} + if _, err := db.conn.Exec( + `INSERT INTO card_messages (id, card_id, author_id, body, created_at) VALUES (?, ?, ?, ?, ?)`, + m.ID, m.CardID, authorID, m.Body, m.CreatedAt, + ); err != nil { + return nil, err + } + return m, nil +} + +func (db *DB) DeleteCardMessage(id, requesterID string) error { + if requesterID == "" { + return fmt.Errorf("session required") + } + res, err := db.conn.Exec(`DELETE FROM card_messages WHERE id=? AND author_id=?`, id, requesterID) + if err != nil { + return err + } + n, _ := res.RowsAffected() + if n == 0 { + return fmt.Errorf("not found or not author") + } + return nil +} + +// DuplicateCard clones a card into the same column at the end of the list. +// Copies title, description, color, requester, assignee, tags, deadline, stickers. +// Does NOT copy card_column_history, card_lock_history, card_events, card_messages. +// Title gets " (copia)" suffix. +func (db *DB) DuplicateCard(srcID, actorID string) (*Card, error) { + tx, err := db.conn.Begin() + if err != nil { + return nil, err + } + defer tx.Rollback() + + var src Card + var assignee sql.NullString + var deadline sql.NullString + var tagsJSON, stickersJSON string + if err := tx.QueryRow( + `SELECT requester, title, description, color, column_id, assignee_id, tags, stickers, deadline + FROM cards WHERE id=? AND deleted_at IS NULL`, srcID, + ).Scan(&src.Requester, &src.Title, &src.Description, &src.Color, &src.ColumnID, &assignee, &tagsJSON, &stickersJSON, &deadline); err != nil { + return nil, fmt.Errorf("card not found: %w", err) + } + if assignee.Valid && assignee.String != "" { + s := assignee.String + src.AssigneeID = &s + } + if deadline.Valid && deadline.String != "" { + s := deadline.String + src.Deadline = &s + } + src.Tags = parseTags(tagsJSON) + src.Stickers = parseStickers(stickersJSON) + + var maxPos sql.NullInt64 + if err := tx.QueryRow(`SELECT MAX(position) FROM cards WHERE column_id=?`, src.ColumnID).Scan(&maxPos); err != nil { + return nil, err + } + pos := 0 + if maxPos.Valid { + pos = int(maxPos.Int64) + 1 + } + var maxSeq sql.NullInt64 + if err := tx.QueryRow(`SELECT MAX(seq_num) FROM cards`).Scan(&maxSeq); err != nil { + return nil, err + } + seqNum := 1 + if maxSeq.Valid { + seqNum = int(maxSeq.Int64) + 1 + } + now := nowRFC3339() + newTitle := src.Title + " (copia)" + c := Card{ + ID: newID(), SeqNum: seqNum, Requester: src.Requester, Title: newTitle, + Description: src.Description, Color: src.Color, ColumnID: src.ColumnID, Position: pos, + AssigneeID: src.AssigneeID, Tags: src.Tags, Stickers: src.Stickers, Deadline: src.Deadline, + CreatedAt: now, UpdatedAt: now, EnteredAt: now, + } + var assigneeVal any + if c.AssigneeID != nil && *c.AssigneeID != "" { + assigneeVal = *c.AssigneeID + } + var deadlineVal any + if c.Deadline != nil && *c.Deadline != "" { + deadlineVal = *c.Deadline + } + if _, err := tx.Exec( + `INSERT INTO cards (id, seq_num, requester, title, description, color, column_id, position, assignee_id, tags, stickers, deadline, created_at, updated_at) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`, + c.ID, c.SeqNum, c.Requester, c.Title, c.Description, c.Color, c.ColumnID, c.Position, + assigneeVal, encodeTags(c.Tags), encodeStickers(c.Stickers), deadlineVal, c.CreatedAt, c.UpdatedAt, + ); err != nil { + return nil, err + } + if _, err := tx.Exec( + `INSERT INTO card_column_history (id, card_id, column_id, entered_at, actor_id) VALUES (?, ?, ?, ?, ?)`, + newID(), c.ID, c.ColumnID, now, nullableActor(actorID), + ); err != nil { + return nil, err + } + var destDone int + if err := tx.QueryRow(`SELECT is_done FROM columns WHERE id=?`, c.ColumnID).Scan(&destDone); err != nil { + return nil, err + } + if destDone == 1 { + if _, err := tx.Exec(`UPDATE cards SET completed_at=? WHERE id=?`, now, c.ID); err != nil { + return nil, err + } + c.CompletedAt = &now + } + if err := insertCardEvent(tx, c.ID, "created", actorID, map[string]any{"title": newTitle, "column_id": c.ColumnID, "duplicated_from": srcID}); err != nil { + return nil, err + } + if err := tx.Commit(); err != nil { + return nil, err + } + return &c, nil +} diff --git a/backend/dist/assets/index-BETde3Km.js b/backend/dist/assets/index-BETde3Km.js new file mode 100644 index 0000000..0ee2529 --- /dev/null +++ b/backend/dist/assets/index-BETde3Km.js @@ -0,0 +1,1176 @@ +function $Y(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 gv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function st(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fw={exports:{}},zd={};/** + * @license React + * react-jsx-runtime.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var XT;function zY(){if(XT)return zd;XT=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 zd.Fragment=n,zd.jsx=t,zd.jsxs=t,zd}var ZT;function LY(){return ZT||(ZT=1,Fw.exports=zY()),Fw.exports}var b=LY();function At(e){return Object.keys(e)}function qw(e){return e&&typeof e=="object"&&!Array.isArray(e)}function c6(e,n){const t={...e},i=n;return qw(e)&&qw(n)&&Object.keys(n).forEach(r=>{qw(i[r])&&r in e?t[r]=c6(t[r],i[r]):t[r]=i[r]}),t}function IY(e){return e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)}function BY(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 Eh(e){const n=BY(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 QT(e){return e==="0rem"?"0rem":`calc(${e} * var(--mantine-scale))`}function H$(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?QT(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?QT(a):a}}return i}return t}const me=H$("rem",{shouldScale:!0}),cg=H$("em");function mu(e){return Object.keys(e).reduce((n,t)=>(e[t]!==void 0&&(n[t]=e[t]),n),{})}function U$(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 Hw={exports:{}},On={};/** + * @license React + * react.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var JT;function FY(){if(JT)return On;JT=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),d=Symbol.for("react.activity"),p=Symbol.iterator;function v(W){return W===null||typeof W!="object"?null:(W=p&&W[p]||W["@@iterator"],typeof W=="function"?W:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,k={};function _(W,V,z){this.props=W,this.context=V,this.refs=k,this.updater=z||y}_.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 C(W,V,z){this.props=W,this.context=V,this.refs=k,this.updater=z||y}var E=C.prototype=new S;E.constructor=C,w(E,_.prototype),E.isPureReactComponent=!0;var O=Array.isArray;function T(){}var M={H:null,A:null,T:null,S:null},N=Object.prototype.hasOwnProperty;function F(W,V,z){var X=z.ref;return{$$typeof:e,type:W,key:V,ref:X!==void 0?X:null,props:z}}function R(W,V){return F(W.type,V,W.props)}function L(W){return typeof W=="object"&&W!==null&&W.$$typeof===e}function B(W){var V={"=":"=0",":":"=2"};return"$"+W.replace(/[=:]/g,function(z){return V[z]})}var G=/\/+/g;function U(W,V){return typeof W=="object"&&W!==null&&W.key!=null?B(""+W.key):V.toString(36)}function H(W){switch(W.status){case"fulfilled":return W.value;case"rejected":throw W.reason;default:switch(typeof W.status=="string"?W.then(T,T):(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 P(W,V,z,X,ee){var re=typeof W;(re==="undefined"||re==="boolean")&&(W=null);var le=!1;if(W===null)le=!0;else switch(re){case"bigint":case"string":case"number":le=!0;break;case"object":switch(W.$$typeof){case e:case n:le=!0;break;case h:return le=W._init,P(le(W._payload),V,z,X,ee)}}if(le)return ee=ee(W),le=X===""?"."+U(W,0):X,O(ee)?(z="",le!=null&&(z=le.replace(G,"$&/")+"/"),P(ee,V,z,"",function(ue){return ue})):ee!=null&&(L(ee)&&(ee=R(ee,z+(ee.key==null||W&&W.key===ee.key?"":(""+ee.key).replace(G,"$&/")+"/")+le)),V.push(ee)),1;le=0;var be=X===""?".":X+":";if(O(W))for(var ae=0;ae{const i=A.use(n);if(i===null)throw new Error(e);return i}]}function n5(e,n){return t=>{if(typeof t!="string"||t.trim().length===0)throw new Error(n);return`${e}-${t}`}}function dg(e,n){let t=e;for(;(t=t.parentElement)&&!t.matches(n););return t}function qY(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 HY(e,n,t){for(let i=e+1;i{var y;t==null||t(l);const f=Array.from(((y=dg(l.currentTarget,e))==null?void 0:y.querySelectorAll(n))||[]).filter(w=>UY(l.currentTarget,w,e)),c=f.findIndex(w=>l.currentTarget===w),h=HY(c,f,i),d=qY(c,f,i),p=a==="rtl"?d:h,v=a==="rtl"?h:d;switch(l.key){case"ArrowRight":o==="horizontal"&&(l.stopPropagation(),l.preventDefault(),f[p].focus(),r&&f[p].click());break;case"ArrowLeft":o==="horizontal"&&(l.stopPropagation(),l.preventDefault(),f[v].focus(),r&&f[v].click());break;case"ArrowUp":o==="vertical"&&(l.stopPropagation(),l.preventDefault(),f[d].focus(),r&&f[d].click());break;case"ArrowDown":o==="vertical"&&(l.stopPropagation(),l.preventDefault(),f[h].focus(),r&&f[h].click());break;case"Home":l.stopPropagation(),l.preventDefault(),!f[0].disabled&&f[0].focus();break;case"End":{l.stopPropagation(),l.preventDefault();const w=f.length-1;!f[w].disabled&&f[w].focus();break}}}}const VY={app:100,modal:200,popover:300,overlay:400,max:9999};function ca(e){return VY[e]}const Y3=()=>{};function WY(e,n={active:!0}){return typeof e!="function"||!n.active?n.onKeyDown||Y3:t=>{var i;t.key==="Escape"&&(e(t),(i=n.onTrigger)==null||i.call(n))}}function Tn(e,n="size",t=!0){if(e!==void 0)return U$(e)?t?me(e):e:`var(--${n}-${e})`}function Ht(e){return Tn(e,"mantine-spacing")}function Gt(e){return e===void 0?"var(--mantine-radius-default)":Tn(e,"mantine-radius")}function Qt(e){return Tn(e,"mantine-font-size")}function GY(e){return Tn(e,"mantine-line-height",!1)}function p6(e){if(e)return Tn(e,"mantine-shadow",!1)}function mr(e,n){return t=>{e==null||e(t),n==null||n(t)}}function v6(e,n){return e in n?Eh(n[e]):Eh(e)}function Th(e,n){const t=e.map(i=>({value:i,px:v6(i,n)}));return t.sort((i,r)=>i.px-r.px),t}function Lr(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function YY(e,n,t){var i;return t?Array.from(((i=dg(t,n))==null?void 0:i.querySelectorAll(e))||[]).findIndex(r=>r===t):null}function Bo(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 Xs(e="mantine-"){return`${e}${Math.random().toString(36).slice(2,11)}`}function ih(e){const n=A.useRef(e);return A.useEffect(()=>{n.current=e}),A.useMemo(()=>((...t)=>{var i;return(i=n.current)==null?void 0:i.call(n,...t)}),[])}function B1(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=ih(e),l=A.useRef(0),f=A.useRef(0),c=A.useRef(null),h=A.useMemo(()=>{const d=Object.assign((...p)=>{window.clearTimeout(l.current),c.current=p;const v=d._isFirstCall;d._isFirstCall=!1;function y(){window.clearTimeout(l.current),window.clearTimeout(f.current),l.current=0,f.current=0,d._isFirstCall=!0,d._hasPendingCallback=!1}function w(){a!==void 0&&f.current===0&&(f.current=window.setTimeout(()=>{if(l.current!==0){const S=c.current;y(),o(...S)}},a))}if(r&&v){o(...p);const S=()=>{y()},C=()=>{l.current!==0&&(y(),o(...p))},E=()=>{y()};d.flush=C,d.cancel=E,l.current=window.setTimeout(S,t),w();return}if(r&&!v){d._hasPendingCallback=!0;const S=()=>{l.current!==0&&(y(),o(...p))},C=()=>{y()};d.flush=S,d.cancel=C;const E=()=>{y()};l.current=window.setTimeout(E,t),w();return}d._hasPendingCallback=!0;const k=()=>{l.current!==0&&(y(),o(...p))},_=()=>{y()};d.flush=k,d.cancel=_,l.current=window.setTimeout(k,t),w()},{flush:()=>{},cancel:()=>{},isPending:()=>d._hasPendingCallback,_isFirstCall:!0,_hasPendingCallback:!1});return d},[o,t,r,a]);return A.useEffect(()=>()=>{i?h.flush():h.cancel()},[h,i]),h}const KY=["mousedown","touchstart"];function XY(e,n,t,i=!0){const r=A.useRef(null),a=n||KY,o=A.useEffectEvent(f=>{const{target:c}=f??{};if(!document.body.contains(c)&&(c==null?void 0:c.tagName)!=="HTML")return;const h=f.composedPath();Array.isArray(t)?t.every(d=>!!d&&!h.includes(d))&&e(f):r.current&&!h.includes(r.current)&&e(f)}),l=a.join(",");return A.useEffect(()=>{if(!i)return;const f=l.split(",");return f.forEach(c=>document.addEventListener(c,o)),()=>{f.forEach(c=>document.removeEventListener(c,o))}},[l,i]),r}function ZY(e,n){return typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function QY(e,n,{getInitialValueInEffect:t}={getInitialValueInEffect:!0}){const[i,r]=A.useState(t?n:ZY(e));return A.useEffect(()=>{try{if("matchMedia"in window){const a=window.matchMedia(e);r(a.matches);const o=l=>r(l.matches);return a.addEventListener("change",o),()=>{a.removeEventListener("change",o)}}}catch{return}},[e]),i||!1}const ns=typeof document<"u"?A.useLayoutEffect:A.useEffect;function Go(e,n){const t=A.useRef(!1);A.useEffect(()=>()=>{t.current=!1},[]),A.useEffect(()=>{if(t.current)return e();t.current=!0},n)}function W$({opened:e,shouldReturnFocus:n=!0}){const t=A.useRef(null),i=()=>{var r;t.current&&"focus"in t.current&&typeof t.current.focus=="function"&&((r=t.current)==null||r.focus({preventScroll:!0}))};return Go(()=>{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 JY=/input|select|textarea|button|object/,G$="a, input, select, textarea, button, object, [tabindex]";function eK(e){return e.style.display==="none"}function nK(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(eK(n))return!1;n=n.parentNode}return!0}function Y$(e){let n=e.getAttribute("tabindex");return n===null&&(n=void 0),parseInt(n,10)}function K3(e){const n=e.nodeName.toLowerCase(),t=!Number.isNaN(Y$(e));return(JY.test(n)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||t)&&nK(e)}function K$(e){const n=Y$(e);return(Number.isNaN(n)||n>=0)&&K3(e)}function tK(e){return Array.from(e.querySelectorAll(G$)).filter(K$)}function iK(e,n){const t=tK(e);if(!t.length){n.preventDefault();return}const i=t[n.shiftKey?0:t.length-1],r=e.getRootNode();let a=i===r.activeElement||e===r.activeElement;const o=r.activeElement;if(o.tagName==="INPUT"&&o.getAttribute("type")==="radio"&&(a=t.filter(f=>f.getAttribute("type")==="radio"&&f.getAttribute("name")===o.getAttribute("name")).includes(i)),!a)return;n.preventDefault();const l=t[n.shiftKey?t.length-1:0];l&&l.focus()}function rK(e=!0){const n=A.useRef(null),t=r=>{let a=r.querySelector("[data-autofocus]");if(!a){const o=Array.from(r.querySelectorAll(G$));a=o.find(K$)||o.find(K3)||null,!a&&K3(r)&&(a=r)}a?a.focus({preventScroll:!0}):console.warn("[@mantine/hooks/use-focus-trap] Failed to find focusable element within provided node",r)},i=A.useCallback(r=>{if(e){if(r===null){n.current=null;return}n.current!==r&&(setTimeout(()=>{r.getRootNode()?t(r):console.warn("[@mantine/hooks/use-focus-trap] Ref node is not part of the dom",r)}),n.current=r)}},[e]);return A.useEffect(()=>{if(!e)return;n.current&&setTimeout(()=>{n.current&&t(n.current)});const r=a=>{a.key==="Tab"&&n.current&&iK(n.current,a)};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e]),i}const aK=e=>(e+1)%1e6;function oK(){const[,e]=A.useReducer(aK,0);return e}function Ki(e){const[n,t]=A.useState(`mantine-${A.useId().replace(/:/g,"")}`);return ns(()=>{t(Xs())},[]),typeof e=="string"?e:n}function X$(e,n,t){const i=A.useEffectEvent(n);A.useEffect(()=>(window.addEventListener(e,i,t),()=>window.removeEventListener(e,i,t)),[e])}function hg(e,n){if(typeof e=="function")return e(n);typeof e=="object"&&e!==null&&"current"in e&&(e.current=n)}function sK(...e){const n=new Map;return t=>{if(e.forEach(i=>{const r=hg(i,t);r&&n.set(i,r)}),n.size>0)return()=>{e.forEach(i=>{const r=n.get(i);r&&typeof r=="function"?r():hg(i,null)}),n.clear()}}}function It(...e){return A.useCallback(sK(...e),e)}function Z$(e){return{x:Bo(e.x,0,1),y:Bo(e.y,0,1)}}function Q$(e,n,t="ltr"){const i=A.useRef(!1),r=A.useRef(!1),a=A.useRef(0),o=A.useRef(null),[l,f]=A.useState(!1);return A.useEffect(()=>(i.current=!0,()=>{var c;(c=o.current)==null||c.call(o)}),[]),{ref:A.useCallback(c=>{const h=({x:C,y:E})=>{cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{if(i.current&&c){c.style.userSelect="none";const O=c.getBoundingClientRect();if(O.width&&O.height){const T=Bo((C-O.left)/O.width,0,1);e({x:t==="ltr"?T:1-T,y:Bo((E-O.top)/O.height,0,1)})}}})},d=()=>{document.addEventListener("mousemove",k),document.addEventListener("mouseup",y),document.addEventListener("touchmove",S,{passive:!1}),document.addEventListener("touchend",y)},p=()=>{document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",y),document.removeEventListener("touchmove",S),document.removeEventListener("touchend",y)},v=()=>{!r.current&&i.current&&(r.current=!0,typeof(n==null?void 0:n.onScrubStart)=="function"&&n.onScrubStart(),f(!0),d())},y=()=>{r.current&&i.current&&(r.current=!1,f(!1),p(),setTimeout(()=>{typeof(n==null?void 0:n.onScrubEnd)=="function"&&n.onScrubEnd()},0))},w=C=>{v(),C.preventDefault(),k(C)},k=C=>h({x:C.clientX,y:C.clientY}),_=C=>{C.cancelable&&C.preventDefault(),v(),S(C)},S=C=>{C.cancelable&&C.preventDefault(),h({x:C.changedTouches[0].clientX,y:C.changedTouches[0].clientY})};return c==null||c.addEventListener("mousedown",w),c==null||c.addEventListener("touchstart",_,{passive:!1}),o.current=()=>{p(),cancelAnimationFrame(a.current)},()=>{c&&(c.removeEventListener("mousedown",w),c.removeEventListener("touchstart",_))}},[t,e]),active:l}}function Oi({value:e,defaultValue:n,finalValue:t,onChange:i=()=>{}}){const[r,a]=A.useState(n!==void 0?n:t),o=(l,...f)=>{a(l),i==null||i(l,...f)};return e!==void 0?[e,i,!0]:[r,o,!1]}function g6(e,n){return QY("(prefers-reduced-motion: reduce)",e,n)}function J$(e=!1,n={}){const[t,i]=A.useState(e),r=A.useCallback(()=>{i(o=>{var l;return o||((l=n.onOpen)==null||l.call(n),!0)})},[n.onOpen]),a=A.useCallback(()=>{i(o=>{var l;return o&&((l=n.onClose)==null||l.call(n),!1)})},[n.onClose]);return[t,{open:r,close:a,toggle:A.useCallback(()=>{t?a():r()},[a,r,t]),set:i}]}function lK(e){const n=A.useRef(void 0);return A.useEffect(()=>{n.current=e},[e]),n.current}var Uw={exports:{}},qi={};/** + * @license React + * react-dom.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var t5;function uK(){if(t5)return qi;t5=1;var e=d6();function n(f){var c="https://react.dev/errors/"+f;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Uw.exports=uK(),Uw.exports}var Vs=ez();const rh=st(Vs);function fK(e,n){window.dispatchEvent(new CustomEvent(e,{detail:n}))}function cK(e){function n(i){const r=Object.keys(i).reduce((a,o)=>(a[`${e}:${o}`]=l=>i[o](l.detail),a),{});ns(()=>(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)=>fK(`${e}:${String(i)}`,r[0])}return[n,t]}var dK={};function hK(){return"development"}function F1(e){var t;const n=Z.version;return typeof Z.version!="string"||n.startsWith("18.")?e==null?void 0:e.ref:(t=e==null?void 0:e.props)==null?void 0:t.ref}function Xv(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]=cn(n[i],r):n[i]=r})}),n}function jh({theme:e,classNames:n,props:t,stylesCtx:i}){return pK((Array.isArray(n)?n:[n]).map(r=>typeof r=="function"?r(e,t,i):r||mK))}function mg({theme:e,styles:n,props:t,stylesCtx:i}){const r=Array.isArray(n)?n:[n],a={};for(const o of r)typeof o=="function"?Object.assign(a,o(e,t,i)):o&&Object.assign(a,o);return a}function r5(e){return e==="auto"||e==="dark"||e==="light"}function vK({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 r5(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&&r5(i.newValue)&&t(i.newValue)},window.addEventListener("storage",n)},unsubscribe:()=>{window.removeEventListener("storage",n)},clear:()=>{window.localStorage.removeItem(e)}}}function Mh(e,n){return typeof e.primaryShade=="number"?e.primaryShade:n==="dark"?e.primaryShade.dark:e.primaryShade.light}function gK(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function yK(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 bK(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 wK(e){const n=e.match(/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i);if(!n)return{r:0,g:0,b:0,a:1};const t=parseInt(n[1],10),i=parseInt(n[2],10)/100,r=parseInt(n[3],10)/100,a=n[5]?parseFloat(n[5]):void 0,o=(1-Math.abs(2*r-1))*i,l=t/60,f=o*(1-Math.abs(l%2-1)),c=r-o/2;let h,d,p;return l>=0&&l<1?(h=o,d=f,p=0):l>=1&&l<2?(h=f,d=o,p=0):l>=2&&l<3?(h=0,d=o,p=f):l>=3&&l<4?(h=0,d=f,p=o):l>=4&&l<5?(h=f,d=0,p=o):(h=o,d=0,p=f),{r:Math.round((h+c)*255),g:Math.round((d+c)*255),b:Math.round((p+c)*255),a:a||1}}function y6(e){return gK(e)?yK(e):e.startsWith("rgb")?bK(e):e.startsWith("hsl")?wK(e):{r:0,g:0,b:0,a:1}}function Vw(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function kK(e){const n=e.match(/oklch\((.*?)%\s/);return n?parseFloat(n[1]):null}function tz(e){if(e.startsWith("oklch("))return(kK(e)||0)/100;const{r:n,g:t,b:i}=y6(e),r=n/255,a=t/255,o=i/255,l=Vw(r),f=Vw(a),c=Vw(o);return .2126*l+.7152*f+.0722*c}function Ld(e,n=.179){return e.startsWith("var(")?!1:tz(e)>n}function ts({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:Ld(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:Ld(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:Ld(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][Mh(n,t||"light")];return{color:i,value:l,shade:a,isThemeColor:o,isLight:Ld(l,n.luminanceThreshold),variable:r?`--mantine-color-${i}-${a}`:`--mantine-color-${i}-filled`}}return{color:e,value:e,isThemeColor:o,isLight:Ld(e,n.luminanceThreshold),shade:a,variable:void 0}}function nt(e,n){const t=ts({color:e||n.primaryColor,theme:n});return t.variable?`var(${t.variable})`:e}function Hl(e,n){if(e.startsWith("var("))return`color-mix(in srgb, ${e}, black ${n*100}%)`;const{r:t,g:i,b:r,a}=y6(e),o=1-n,l=f=>Math.round(f*o);return`rgba(${l(t)}, ${l(i)}, ${l(r)}, ${a})`}function X3(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=nt(t.from,n),r=nt(t.to,n);return`linear-gradient(${t.deg}deg, ${i} 0%, ${r} 100%)`}function Is(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}=y6(e);return`rgba(${t}, ${i}, ${r}, ${n})`}const a5=Is,_K=({color:e,theme:n,variant:t,gradient:i,autoContrast:r})=>{const a=ts({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:`${me(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:`${me(1)} solid transparent`}:{background:e,hover:Hl(e,.1),color:l,border:`${me(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:`${me(1)} solid transparent`};const l=n.colors[a.color][a.shade];return{background:l,hover:Hl(l,.1),color:`var(--mantine-color-${a.color}-light-color)`,border:`${me(1)} solid transparent`}}return{background:Is(e,.1),hover:Is(e,.12),color:e,border:`${me(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:`${me(1)} solid var(--mantine-color-${e}-outline)`}:{background:"transparent",hover:Is(n.colors[a.color][a.shade],.05),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${me(1)} solid var(--mantine-color-${a.color}-${a.shade})`}:{background:"transparent",hover:Is(e,.05),color:e,border:`${me(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:`${me(1)} solid transparent`};const l=n.colors[a.color][a.shade];return{background:"transparent",hover:Is(l,.12),color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${me(1)} solid transparent`}}return{background:"transparent",hover:Is(e,.12),color:e,border:`${me(1)} solid transparent`}}return t==="transparent"?a.isThemeColor?a.shade===void 0?{background:"transparent",hover:"transparent",color:`var(--mantine-color-${e}-light-color)`,border:`${me(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${me(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:e,border:`${me(1)} solid transparent`}:t==="white"?a.isThemeColor?a.shade===void 0?{background:"var(--mantine-color-white)",hover:Hl(n.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${me(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:Hl(n.white,.01),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${me(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:Hl(n.white,.01),color:e,border:`${me(1)} solid transparent`}:t==="gradient"?{background:X3(i,n),hover:X3(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:`${me(1)} solid var(--mantine-color-default-border)`}:{}};function Cm({color:e,theme:n,autoContrast:t}){return(typeof t=="boolean"?t:n.autoContrast)&&ts({color:e||n.primaryColor,theme:n}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function o5(e,n){return Cm({color:e.colors[e.primaryColor][Mh(e,n)],theme:e,autoContrast:null})}function q1(e,n){return typeof e=="boolean"?e:n.autoContrast}const iz=A.createContext(null);function oo(){const e=A.use(iz);if(!e)throw new Error("[@mantine/core] MantineProvider was not found in tree");return e}function xK(){return oo().cssVariablesResolver}function SK(){return oo().classNamesPrefix}function b6(){return oo().getStyleNonce}function CK(){return oo().withStaticClasses}function AK(){return oo().headless}function OK(){var e;return(e=oo().stylesTransform)==null?void 0:e.sx}function EK(){var e;return(e=oo().stylesTransform)==null?void 0:e.styles}function Am(){return oo().env||"default"}function TK(){return oo().deduplicateInlineStyles}function hf(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 jK({manager:e,defaultColorScheme:n,getRootElement:t,forceColorScheme:i}){const r=A.useRef(null),[a,o]=A.useState(()=>e.get(n)),l=i||a,f=A.useCallback(h=>{i||(hf(h,t),o(h),e.set(h))},[e.set,l,i]),c=A.useCallback(()=>{o(n),hf(n,t),e.clear()},[e.clear,n]);return A.useEffect(()=>(e.subscribe(f),e.unsubscribe),[e.subscribe,e.unsubscribe]),ns(()=>{hf(e.get(n),t)},[]),A.useEffect(()=>{var d;if(i)return hf(i,t),()=>{};i===void 0&&hf(a,t),typeof window<"u"&&"matchMedia"in window&&(r.current=window.matchMedia("(prefers-color-scheme: dark)"));const h=p=>{a==="auto"&&hf(p.matches?"dark":"light",t)};return(d=r.current)==null||d.addEventListener("change",h),()=>{var p;return(p=r.current)==null?void 0:p.removeEventListener("change",h)}},[a,i]),{colorScheme:l,setColorScheme:f,clearColorScheme:c}}const MK={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"]},s5="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",w6={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:MK,primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:_K,autoContrast:!1,luminanceThreshold:.3,fontFamily:s5,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:s5,fontWeight:"700",textWrap:"wrap",sizes:{h1:{fontSize:me(34),lineHeight:"1.3"},h2:{fontSize:me(26),lineHeight:"1.35"},h3:{fontSize:me(22),lineHeight:"1.4"},h4:{fontSize:me(18),lineHeight:"1.45"},h5:{fontSize:me(16),lineHeight:"1.5"},h6:{fontSize:me(14),lineHeight:"1.5"}}},fontSizes:{xs:me(12),sm:me(14),md:me(16),lg:me(18),xl:me(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:me(2),sm:me(4),md:me(8),lg:me(16),xl:me(32)},spacing:{xs:me(10),sm:me(12),md:me(16),lg:me(20),xl:me(32)},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},shadows:{xs:`0 ${me(1)} ${me(3)} rgba(0, 0, 0, 0.05), 0 ${me(1)} ${me(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${me(1)} ${me(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${me(10)} ${me(15)} ${me(-5)}, rgba(0, 0, 0, 0.04) 0 ${me(7)} ${me(7)} ${me(-5)}`,md:`0 ${me(1)} ${me(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${me(20)} ${me(25)} ${me(-5)}, rgba(0, 0, 0, 0.04) 0 ${me(10)} ${me(10)} ${me(-5)}`,lg:`0 ${me(1)} ${me(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${me(28)} ${me(23)} ${me(-7)}, rgba(0, 0, 0, 0.04) 0 ${me(12)} ${me(12)} ${me(-7)}`,xl:`0 ${me(1)} ${me(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${me(36)} ${me(28)} ${me(-7)}, rgba(0, 0, 0, 0.04) 0 ${me(17)} ${me(17)} ${me(-7)}`},other:{},components:{}},DK="[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color",l5="[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";function Ww(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function u5(e){if(!(e.primaryColor in e.colors))throw new Error(DK);if(typeof e.primaryShade=="object"&&(!Ww(e.primaryShade.dark)||!Ww(e.primaryShade.light)))throw new Error(l5);if(typeof e.primaryShade=="number"&&!Ww(e.primaryShade))throw new Error(l5)}function RK(e,n){var i;if(!n)return u5(e),e;const t=c6(e,n);return n.fontFamily&&!((i=n.headings)!=null&&i.fontFamily)&&(t.headings.fontFamily=n.fontFamily),u5(t),t}const k6=A.createContext(null),PK=()=>A.use(k6)||w6;function ii(){const e=A.use(k6);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 rz({theme:e,children:n,inherit:t=!0}){const i=PK();return b.jsx(k6,{value:A.useMemo(()=>RK(t?i:w6,e),[e,i,t]),children:n})}rz.displayName="@mantine/core/MantineThemeProvider";function Gw(e){return Object.entries(e).map(([n,t])=>`${n}: ${t};`).join("")}function az(e,n){const t=n?[n]:[":root",":host"],i=Gw(e.variables),r=i?`${t.join(", ")}{${i}}`:"",a=Gw(e.dark),o=Gw(e.light),l=f=>t.map(c=>c===":host"?`${c}([data-mantine-color-scheme="${f}"])`:`${c}[data-mantine-color-scheme="${f}"]`).join(", ");return`${r} + +${a?`${l("dark")}{${a}}`:""} + +${o?`${l("light")}{${o}}`:""}`}function yv({theme:e,color:n,colorScheme:t,name:i=n,withColorValues:r=!0}){if(!e.colors[n])return{};if(t==="light"){const l=Mh(e,"light"),f={[`--mantine-color-${i}-text`]:`var(--mantine-color-${i}-filled)`,[`--mantine-color-${i}-filled`]:`var(--mantine-color-${i}-${l})`,[`--mantine-color-${i}-filled-hover`]:`var(--mantine-color-${i}-${l===9?8:l+1})`,[`--mantine-color-${i}-light`]:`var(--mantine-color-${i}-1)`,[`--mantine-color-${i}-light-hover`]:`var(--mantine-color-${i}-2)`,[`--mantine-color-${i}-light-color`]:`var(--mantine-color-${i}-9)`,[`--mantine-color-${i}-outline`]:`var(--mantine-color-${i}-${l})`,[`--mantine-color-${i}-outline-hover`]:a5(e.colors[n][l],.05)};return r?{[`--mantine-color-${i}-0`]:e.colors[n][0],[`--mantine-color-${i}-1`]:e.colors[n][1],[`--mantine-color-${i}-2`]:e.colors[n][2],[`--mantine-color-${i}-3`]:e.colors[n][3],[`--mantine-color-${i}-4`]:e.colors[n][4],[`--mantine-color-${i}-5`]:e.colors[n][5],[`--mantine-color-${i}-6`]:e.colors[n][6],[`--mantine-color-${i}-7`]:e.colors[n][7],[`--mantine-color-${i}-8`]:e.colors[n][8],[`--mantine-color-${i}-9`]:e.colors[n][9],...f}:f}const a=Mh(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`]:Hl(e.colors[n][9],.5),[`--mantine-color-${i}-light-hover`]:Hl(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`]:a5(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 NK(e){return!!e&&typeof e=="object"&&"mantine-virtual-color"in e}function Nl(e,n,t){At(n).forEach(i=>Object.assign(e,{[`--mantine-${t}-${i}`]:n[i]}))}const oz=e=>{const n=Mh(e,"light"),t=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:me(e.defaultRadius),i={variables:{"--mantine-z-index-app":"100","--mantine-z-index-modal":"200","--mantine-z-index-popover":"300","--mantine-z-index-overlay":"400","--mantine-z-index-max":"9999","--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-webkit-font-smoothing":e.fontSmoothing?"antialiased":"unset","--mantine-moz-font-smoothing":e.fontSmoothing?"grayscale":"unset","--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":t,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-color-scheme":"light","--mantine-primary-color-contrast":o5(e,"light"),"--mantine-color-bright":"var(--mantine-color-black)","--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":"var(--mantine-color-red-6)","--mantine-color-placeholder":"var(--mantine-color-gray-5)","--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${n})`,"--mantine-color-default":"var(--mantine-color-white)","--mantine-color-default-hover":"var(--mantine-color-gray-0)","--mantine-color-default-color":"var(--mantine-color-black)","--mantine-color-default-border":"var(--mantine-color-gray-4)","--mantine-color-dimmed":"var(--mantine-color-gray-6)","--mantine-color-disabled":"var(--mantine-color-gray-2)","--mantine-color-disabled-color":"var(--mantine-color-gray-5)","--mantine-color-disabled-border":"var(--mantine-color-gray-3)"},dark:{"--mantine-color-scheme":"dark","--mantine-primary-color-contrast":o5(e,"dark"),"--mantine-color-bright":"var(--mantine-color-white)","--mantine-color-text":"var(--mantine-color-dark-0)","--mantine-color-body":"var(--mantine-color-dark-7)","--mantine-color-error":"var(--mantine-color-red-8)","--mantine-color-placeholder":"var(--mantine-color-dark-3)","--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":"var(--mantine-color-dark-6)","--mantine-color-default-hover":"var(--mantine-color-dark-5)","--mantine-color-default-color":"var(--mantine-color-white)","--mantine-color-default-border":"var(--mantine-color-dark-4)","--mantine-color-dimmed":"var(--mantine-color-dark-2)","--mantine-color-disabled":"var(--mantine-color-dark-6)","--mantine-color-disabled-color":"var(--mantine-color-dark-3)","--mantine-color-disabled-border":"var(--mantine-color-dark-4)"}};Nl(i.variables,e.breakpoints,"breakpoint"),Nl(i.variables,e.spacing,"spacing"),Nl(i.variables,e.fontSizes,"font-size"),Nl(i.variables,e.lineHeights,"line-height"),Nl(i.variables,e.shadows,"shadow"),Nl(i.variables,e.radius,"radius"),Nl(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})`}),At(e.colors).forEach(a=>{const o=e.colors[a];if(NK(o)){Object.assign(i.light,yv({theme:e,name:o.name,color:o.light,colorScheme:"light",withColorValues:!0})),Object.assign(i.dark,yv({theme:e,name:o.name,color:o.dark,colorScheme:"dark",withColorValues:!0}));return}o.forEach((l,f)=>{i.variables[`--mantine-color-${a}-${f}`]=l}),Object.assign(i.light,yv({theme:e,color:a,colorScheme:"light",withColorValues:!1})),Object.assign(i.dark,yv({theme:e,color:a,colorScheme:"dark",withColorValues:!1}))});const r=e.headings.sizes;return At(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 $K(){const e=ii(),n=b6(),t=At(e.breakpoints).reduce((i,r)=>{const a=e.breakpoints[r].includes("px"),o=Eh(e.breakpoints[r]);return`${i}@media (max-width: ${a?`${o-.1}px`:cg(o-.1)}) {.mantine-visible-from-${r} {display: none !important;}}@media (min-width: ${a?`${o}px`:cg(o)}) {.mantine-hidden-from-${r} {display: none !important;}}`},"");return b.jsx("style",{"data-mantine-styles":"classes",nonce:n==null?void 0:n(),dangerouslySetInnerHTML:{__html:t}})}function zK({theme:e,generator:n}){const t=oz(e),i=n==null?void 0:n(e);return i?c6(t,i):t}const Yw=oz(w6);function LK(e){const n={variables:{},light:{},dark:{}};return At(e.variables).forEach(t=>{Yw.variables[t]!==e.variables[t]&&(n.variables[t]=e.variables[t])}),At(e.light).forEach(t=>{Yw.light[t]!==e.light[t]&&(n.light[t]=e.light[t])}),At(e.dark).forEach(t=>{Yw.dark[t]!==e.dark[t]&&(n.dark[t]=e.dark[t])}),n}function IK(e){return az({variables:{},dark:{"--mantine-color-scheme":"dark"},light:{"--mantine-color-scheme":"light"}},e)}function sz({cssVariablesSelector:e,deduplicateCssVariables:n}){const t=ii(),i=b6(),r=zK({theme:t,generator:xK()}),a=(e===void 0||e===":root"||e===":host")&&n,o=az(a?LK(r):r,e);return o?b.jsx("style",{"data-mantine-styles":!0,nonce:i==null?void 0:i(),dangerouslySetInnerHTML:{__html:`${o}${a?"":IK(e)}`}}):null}sz.displayName="@mantine/CssVariables";function BK({respectReducedMotion:e,getRootElement:n}){ns(()=>{var t;e&&((t=n())==null||t.setAttribute("data-respect-reduced-motion","true"))},[e])}function lz({theme:e,children:n,getStyleNonce:t,withStaticClasses:i=!0,withGlobalClasses:r=!0,deduplicateCssVariables:a=!0,withCssVariables:o=!0,cssVariablesSelector:l,classNamesPrefix:f="mantine",colorSchemeManager:c=vK(),defaultColorScheme:h="light",getRootElement:d=()=>document.documentElement,cssVariablesResolver:p,forceColorScheme:v,stylesTransform:y,env:w,deduplicateInlineStyles:k=!1}){const{colorScheme:_,setColorScheme:S,clearColorScheme:C}=jK({defaultColorScheme:h,forceColorScheme:v,manager:c,getRootElement:d});return BK({respectReducedMotion:(e==null?void 0:e.respectReducedMotion)||!1,getRootElement:d}),b.jsx(iz,{value:{colorScheme:_,setColorScheme:S,clearColorScheme:C,getRootElement:d,classNamesPrefix:f,getStyleNonce:t,cssVariablesResolver:p,cssVariablesSelector:l??":root",withStaticClasses:i,stylesTransform:y,env:w,deduplicateInlineStyles:k},children:b.jsxs(rz,{theme:e,children:[o&&b.jsx(sz,{cssVariablesSelector:l,deduplicateCssVariables:a}),r&&b.jsx($K,{}),n]})})}lz.displayName="@mantine/core/MantineProvider";function ye(e,n,t){var o;const i=ii(),r=(o=i.components[e])==null?void 0:o.defaultProps,a=typeof r=="function"?r(i):r;return{...n,...a,...mu(t)}}function Li({classNames:e,styles:n,props:t,stylesCtx:i}){const r=ii();return{resolvedClassNames:e===void 0?void 0:jh({theme:r,classNames:e,props:t,stylesCtx:i||void 0}),resolvedStyles:n===void 0?void 0:mg({theme:r,styles:n,props:t,stylesCtx:i||void 0})}}const FK={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function qK({theme:e,options:n,unstyled:t}){return cn((n==null?void 0:n.focusable)&&!t&&(e.focusClassName||FK[e.focusRing]),(n==null?void 0:n.active)&&!t&&e.activeClassName)}function HK({selector:e,stylesCtx:n,options:t,props:i,theme:r}){return jh({theme:r,classNames:t==null?void 0:t.classNames,props:(t==null?void 0:t.props)||i,stylesCtx:n})[e]}function UK({selector:e,stylesCtx:n,theme:t,classNames:i,props:r}){return jh({theme:t,classNames:i,props:r,stylesCtx:n})[e]}function VK({rootSelector:e,selector:n,className:t}){return e===n?t:void 0}function WK({selector:e,classes:n,unstyled:t}){return t?void 0:n[e]}function GK({themeName:e,classNamesPrefix:n,selector:t,withStaticClass:i}){return i===!1?[]:e.map(r=>`${n}-${r}-${t}`)}function YK({options:e,classes:n,selector:t,unstyled:i}){return e!=null&&e.variant&&!i?n[`${t}--${e.variant}`]:void 0}function KK({theme:e,options:n,themeName:t,selector:i,classNamesPrefix:r,resolvedClassNames:a,resolvedThemeClassNames:o,classes:l,unstyled:f,className:c,rootSelector:h,props:d,stylesCtx:p,withStaticClasses:v,headless:y,transformedStyles:w}){return cn(qK({theme:e,options:n,unstyled:f||y}),o.map(k=>k[i]),YK({options:n,classes:l,selector:i,unstyled:f||y}),a[i],UK({selector:i,stylesCtx:p,theme:e,classNames:w,props:d}),HK({selector:i,stylesCtx:p,options:n,props:d,theme:e}),VK({rootSelector:h,selector:i,className:c}),WK({selector:i,classes:l,unstyled:f||y}),v&&!y&&GK({themeName:t,classNamesPrefix:r,selector:i,withStaticClass:n==null?void 0:n.withStaticClass}),n==null?void 0:n.className)}function _6({style:e,theme:n}){return Array.isArray(e)?e.reduce((t,i)=>({...t,..._6({style:i,theme:n})}),{}):typeof e=="function"?e(n):e??{}}function XK({theme:e,selector:n,options:t,props:i,stylesCtx:r,rootSelector:a,withStylesTransform:o,resolvedStyles:l,resolvedThemeStyles:f,resolvedVars:c,resolvedRootStyle:h}){return{...f[n],...l[n],...!o&&mg({theme:e,styles:t==null?void 0:t.styles,props:(t==null?void 0:t.props)||i,stylesCtx:r})[n],...c[n],...a===n?h:null,..._6({style:t==null?void 0:t.style,theme:e})}}function ZK(e){return e.reduce((n,t)=>(t&&Object.keys(t).forEach(i=>{n[i]={...n[i],...mu(t[i])}}),n),{})}function QK({props:e,stylesCtx:n,themeName:t,theme:i}){var o;const r=(o=EK())==null?void 0:o();return{getTransformedStyles:l=>r?[...l.map(f=>r(f,{props:e,theme:i,ctx:n})),...t.map(f=>{var c;return r((c=i.components[f])==null?void 0:c.styles,{props:e,theme:i,ctx:n})})].filter(Boolean):[],withStylesTransform:!!r}}function Xe({name:e,classes:n,props:t,stylesCtx:i,className:r,style:a,rootSelector:o="root",unstyled:l,classNames:f,styles:c,vars:h,varsResolver:d,attributes:p}){var R;const v=ii(),y=SK(),w=CK(),k=AK(),_=(Array.isArray(e)?e:[e]).filter(L=>L),{withStylesTransform:S,getTransformedStyles:C}=QK({props:t,stylesCtx:i,themeName:_,theme:v}),E=jh({theme:v,classNames:f,props:t,stylesCtx:i}),O=_.map(L=>{var B;return jh({theme:v,classNames:(B=v.components[L])==null?void 0:B.classNames,props:t,stylesCtx:i})}),T=S?{}:mg({theme:v,styles:c,props:t,stylesCtx:i}),M={};if(!S)for(const L of _){const B=mg({theme:v,styles:(R=v.components[L])==null?void 0:R.styles,props:t,stylesCtx:i});for(const G of Object.keys(B))M[G]={...M[G],...B[G]}}const N=ZK([k?{}:d==null?void 0:d(v,t,i),..._.map(L=>{var B,G,U;return(U=(G=(B=v.components)==null?void 0:B[L])==null?void 0:G.vars)==null?void 0:U.call(G,v,t,i)}),h==null?void 0:h(v,t,i)]),F=_6({style:a,theme:v});return(L,B)=>({...p==null?void 0:p[L],className:KK({theme:v,options:B,themeName:_,selector:L,classNamesPrefix:y,resolvedClassNames:E,resolvedThemeClassNames:O,classes:n,unstyled:l,className:r,rootSelector:o,props:t,stylesCtx:i,withStaticClasses:w,headless:k,transformedStyles:C([B==null?void 0:B.styles,c])}),style:XK({theme:v,selector:L,options:B,props:t,stylesCtx:i,rootSelector:o,withStylesTransform:S,resolvedStyles:T,resolvedThemeStyles:M,resolvedVars:N,resolvedRootStyle:F})})}function mh(e){return At(e).reduce((n,t)=>e[t]!==void 0?`${n}${IY(t)}:${e[t]};`:n,"").trim()}function JK({selector:e,styles:n,media:t,container:i}){const r=n?mh(n):"",a=Array.isArray(t)?t.map(l=>`@media${l.query}{${e}{${mh(l.styles)}}}`):[],o=Array.isArray(i)?i.map(l=>`@container ${l.query}{${e}{${mh(l.styles)}}}`):[];return`${r?`${e}{${r}}`:""}${a.join("")}${o.join("")}`.trim()}function eX(e){let n=5381;for(let t=0;t>>0).toString(36)}function wc({deduplicate:e,...n}){const t=b6(),i=JK(n);return e?b.jsx("style",{href:`mantine-${eX(i)}`,precedence:"mantine",nonce:t==null?void 0:t(),children:i}):b.jsx("style",{"data-mantine-styles":"inline",nonce:t==null?void 0:t(),dangerouslySetInnerHTML:{__html:i}})}function nX(e){let n=5381;for(let t=0;t>>0).toString(36)}function tX(e,n){return`__mdi__-${nX(`${e?mh(e):""}|${Array.isArray(n)?n.map(t=>`${t.query}:${mh(t.styles)}`).join("|"):""}`)}`}function vu(e){const{m:n,mx:t,my:i,mt:r,mb:a,ml:o,mr:l,me:f,ms:c,mis:h,mie:d,p,px:v,py:y,pt:w,pb:k,pl:_,pr:S,pe:C,ps:E,pis:O,pie:T,bd:M,bdrs:N,bg:F,c:R,opacity:L,ff:B,fz:G,fw:U,lts:H,ta:P,lh:$,fs:q,tt:Y,td:D,w:W,miw:V,maw:z,h:X,mih:ee,mah:re,bgsz:le,bgp:be,bgr:ae,bga:ue,pos:Ce,top:ne,left:Ne,bottom:pe,right:Ee,inset:Re,display:we,flex:Se,hiddenFrom:De,visibleFrom:qe,lightHidden:Ve,darkHidden:Ue,sx:We,...Ye}=e;return{styleProps:mu({m:n,mx:t,my:i,mt:r,mb:a,ml:o,mr:l,me:f,ms:c,mis:h,mie:d,p,px:v,py:y,pt:w,pb:k,pl:_,pr:S,pis:O,pie:T,pe:C,ps:E,bd:M,bg:F,c:R,opacity:L,ff:B,fz:G,fw:U,lts:H,ta:P,lh:$,fs:q,tt:Y,td:D,w:W,miw:V,maw:z,h:X,mih:ee,mah:re,bgsz:le,bgp:be,bgr:ae,bga:ue,pos:Ce,top:ne,left:Ne,bottom:pe,right:Ee,inset:Re,display:we,flex:Se,bdrs:N,hiddenFrom:De,visibleFrom:qe,lightHidden:Ve,darkHidden:Ue,sx:We}),rest:Ye}}const iX={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 x6(e,n){const t=ts({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 rX(e,n){const t=ts({color:e,theme:n});return t.isThemeColor&&t.shade===void 0?`var(--mantine-color-${t.color}-text)`:x6(e,n)}function aX(e,n){if(typeof e=="number")return me(e);if(typeof e=="string"){const[t,i,...r]=e.split(" ").filter(o=>o.trim()!=="");let a=`${me(t)}`;return i&&(a+=` ${i}`),r.length>0&&(a+=` ${x6(r.join(" "),n)}`),a.trim()}return e}const f5={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 oX(e){return typeof e=="string"&&e in f5?f5[e]:e}const sX=["h1","h2","h3","h4","h5","h6"];function lX(e,n){return typeof e=="string"&&e in n.fontSizes?`var(--mantine-font-size-${e})`:typeof e=="string"&&sX.includes(e)?`var(--mantine-${e}-font-size)`:typeof e=="number"||typeof e=="string"?me(e):e}function uX(e){return e}const fX=["h1","h2","h3","h4","h5","h6"];function cX(e,n){return typeof e=="string"&&e in n.lineHeights?`var(--mantine-line-height-${e})`:typeof e=="string"&&fX.includes(e)?`var(--mantine-${e}-line-height)`:e}function dX(e,n){return typeof e=="string"&&e in n.radius?`var(--mantine-radius-${e})`:typeof e=="number"||typeof e=="string"?me(e):e}function hX(e){return typeof e=="number"?me(e):e}function mX(e,n){if(typeof e=="number")return me(e);if(typeof e=="string"){const t=e.replace("-","");if(!(t in n.spacing))return me(e);const i=`--mantine-spacing-${t}`;return e.startsWith("-")?`calc(var(${i}) * -1)`:`var(${i})`}return e}const Kw={color:x6,textColor:rX,fontSize:lX,spacing:mX,radius:dX,identity:uX,size:hX,lineHeight:cX,fontFamily:oX,border:aX};function c5(e){return e.replace("(min-width: ","").replace("em)","")}function pX({media:e,...n}){const t=Object.keys(e).sort((i,r)=>Number(c5(i))-Number(c5(r))).map(i=>({query:i,styles:e[i]}));return{...n,media:t}}function vX(e){if(typeof e!="object"||e===null)return!1;const n=Object.keys(e);return!(n.length===1&&n[0]==="base")}function gX(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function yX(e){return typeof e=="object"&&e!==null?At(e).filter(n=>n!=="base"):[]}function bX(e,n){return typeof e=="object"&&e!==null&&n in e?e[n]:e}function wX({styleProps:e,data:n,theme:t}){return pX(At(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=gX(e[r]);if(!vX(e[r]))return o.forEach(c=>{i.inlineStyles[c]=Kw[a.type](l,t)}),i;i.hasResponsiveStyles=!0;const f=yX(e[r]);return o.forEach(c=>{l!=null&&(i.styles[c]=Kw[a.type](l,t)),f.forEach(h=>{const d=`(min-width: ${t.breakpoints[h]})`;i.media[d]={...i.media[d],[c]:Kw[a.type](bX(e[r],h),t)}})}),i},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function H1(){return`__m__-${A.useId().replace(/[:«»]/g,"")}`}function uz(e,n){return Array.isArray(e)?[...e].reduce((t,i)=>({...t,...uz(i,n)}),{}):typeof e=="function"?e(n):e??{}}function kX(e){return e}const _X=kX;function fz(e){return e}function Pe(e){const n=e;return n.extend=fz,n.withProps=t=>{const i=r=>b.jsx(n,{...t,...r});return i.extend=n.extend,i.displayName=`WithProps(${n.displayName})`,i},n}function U1(e){return Pe(e)}function Ii(e){const n=e;return n.withProps=t=>{const i=r=>b.jsx(n,{...t,...r});return i.extend=n.extend,i.displayName=`WithProps(${n.displayName})`,i},n.extend=fz,n}function cz(e){return`data-${(e.startsWith("data-")?e.slice(5):e).replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}`}function xX(e){return Object.keys(e).reduce((n,t)=>{const i=e[t];return i===void 0||i===""||i===!1||i===null||(n[cz(t)]=e[t]),n},{})}function dz(e){return e?typeof e=="string"?{[cz(e)]:!0}:Array.isArray(e)?[...e].reduce((n,t)=>({...n,...dz(t)}),{}):xX(e):null}function Z3(e,n){return Array.isArray(e)?[...e].reduce((t,i)=>({...t,...Z3(i,n)}),{}):typeof e=="function"?e(n):e??{}}function SX({theme:e,style:n,vars:t,styleProps:i}){const r=Z3(n,e),a=Z3(t,e);return{...r,...a,...i}}function hz({component:e,style:n,__vars:t,className:i,variant:r,mod:a,size:o,hiddenFrom:l,visibleFrom:f,lightHidden:c,darkHidden:h,renderRoot:d,__size:p,ref:v,...y}){var F,R;const w=ii(),k=e||"div",{styleProps:_,rest:S}=vu(y),C=(R=(F=OK())==null?void 0:F())==null?void 0:R(_.sx),E=H1(),O=wX({styleProps:_,theme:w,data:iX}),T=TK(),M=T&&O.hasResponsiveStyles?tX(O.styles,O.media):E,N={ref:v,style:SX({theme:w,style:n,vars:t,styleProps:O.inlineStyles}),className:cn(i,C,{[M]:O.hasResponsiveStyles,"mantine-light-hidden":c,"mantine-dark-hidden":h,[`mantine-hidden-from-${l}`]:l,[`mantine-visible-from-${f}`]:f}),"data-variant":r,"data-size":U$(o)?void 0:o||void 0,size:p,...dz(a),...S};return b.jsxs(b.Fragment,{children:[O.hasResponsiveStyles&&b.jsx(wc,{selector:`.${M}`,styles:O.styles,media:O.media,deduplicate:T}),typeof d=="function"?d(N):b.jsx(k,{...N})]})}hz.displayName="@mantine/core/Box";const ve=_X(hz),CX=A.createContext({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function gu(){return A.use(CX)}const[AX,da]=fa("ScrollArea.Root component was not found in tree");function Js(e,n){const t=A.useEffectEvent(n);ns(()=>{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 OX(e){const{style:n,...t}=e,i=da(),[r,a]=A.useState(0),[o,l]=A.useState(0),f=!!(r&&o);return Js(i.scrollbarX,()=>{var h;const c=((h=i.scrollbarX)==null?void 0:h.offsetHeight)||0;i.onCornerHeightChange(c),l(c)}),Js(i.scrollbarY,()=>{var h;const c=((h=i.scrollbarY)==null?void 0:h.offsetWidth)||0;i.onCornerWidthChange(c),a(c)}),f?b.jsx("div",{...t,style:{...n,width:r,height:o}}):null}function EX(e){const n=da(),t=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&t?b.jsx(OX,{...e}):null}const TX={scrollHideDelay:1e3,type:"hover"};function mz(e){const{type:n,scrollHideDelay:t,scrollbars:i,getStyles:r,ref:a,...o}=ye("ScrollAreaRoot",TX,e),[l,f]=A.useState(null),[c,h]=A.useState(null),[d,p]=A.useState(null),[v,y]=A.useState(null),[w,k]=A.useState(null),[_,S]=A.useState(0),[C,E]=A.useState(0),[O,T]=A.useState(!1),[M,N]=A.useState(!1),F=It(a,R=>f(R));return b.jsx(AX,{value:{type:n,scrollHideDelay:t,scrollArea:l,viewport:c,onViewportChange:h,content:d,onContentChange:p,scrollbarX:v,onScrollbarXChange:y,scrollbarXEnabled:O,onScrollbarXEnabledChange:T,scrollbarY:w,onScrollbarYChange:k,scrollbarYEnabled:M,onScrollbarYEnabledChange:N,onCornerWidthChange:S,onCornerHeightChange:E,getStyles:r},children:b.jsx(ve,{...o,ref:F,__vars:{"--sa-corner-width":i!=="xy"?"0px":`${_}px`,"--sa-corner-height":i!=="xy"?"0px":`${C}px`}})})}mz.displayName="@mantine/core/ScrollAreaRoot";function pz(e,n){const t=e/n;return Number.isNaN(t)?0:t}function V1(e){const n=pz(e.viewport,e.content),t=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=(e.scrollbar.size-t)*n;return Math.max(i,18)}function vz(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 jX(e,[n,t]){return Math.min(t,Math.max(n,e))}function d5(e,n,t="ltr"){const i=V1(n),r=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,a=n.scrollbar.size-r,o=n.content-n.viewport,l=a-i,f=jX(e,t==="ltr"?[0,o]:[o*-1,0]);return vz([0,o],[0,l])(f)}function MX(e,n,t,i="ltr"){const r=V1(t),a=r/2,o=n||a,l=r-o,f=t.scrollbar.paddingStart+o,c=t.scrollbar.size-t.scrollbar.paddingEnd-l,h=t.content-t.viewport,d=i==="ltr"?[0,h]:[h*-1,0];return vz([f,c],d)(e)}function gz(e,n){return e>0&&e{e==null||e(i),(t===!1||!i.defaultPrevented)&&(n==null||n(i))}}const[DX,yz]=fa("ScrollAreaScrollbar was not found in tree");function bz(e){const{sizes:n,hasThumb:t,onThumbChange:i,onThumbPointerUp:r,onThumbPointerDown:a,onThumbPositionChange:o,onDragScroll:l,onWheelScroll:f,onResize:c,ref:h,...d}=e,p=da(),[v,y]=A.useState(null),w=It(h,N=>y(N)),k=A.useRef(null),_=A.useRef(""),{viewport:S}=p,C=n.content-n.viewport,E=A.useEffectEvent(f),O=ih(o),T=B1(c,10),M=N=>{k.current&&l({x:N.clientX-k.current.left,y:N.clientY-k.current.top})};return A.useEffect(()=>{const N=F=>{const R=F.target;v!=null&&v.contains(R)&&E(F,C)};return document.addEventListener("wheel",N,{passive:!1}),()=>document.removeEventListener("wheel",N,{passive:!1})},[S,v,C]),A.useEffect(O,[n,O]),Js(v,T),Js(p.content,T),b.jsx(DX,{value:{scrollbar:v,hasThumb:t,onThumbChange:ih(i),onThumbPointerUp:ih(r),onThumbPositionChange:O,onThumbPointerDown:ih(a)},children:b.jsx("div",{...d,ref:w,"data-mantine-scrollbar":!0,style:{position:"absolute",...d.style},onPointerDown:eu(e.onPointerDown,N=>{N.preventDefault(),N.button===0&&(N.target.setPointerCapture(N.pointerId),k.current=v.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",M(N))}),onPointerMove:eu(e.onPointerMove,M),onPointerUp:eu(e.onPointerUp,N=>{const F=N.target;F.hasPointerCapture(N.pointerId)&&(N.preventDefault(),F.releasePointerCapture(N.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=_.current,k.current=null}})})}const wz=e=>{const{sizes:n,onSizesChange:t,style:i,ref:r,...a}=e,o=da(),[l,f]=A.useState(),c=A.useRef(null),h=It(r,c,o.onScrollbarXChange);return A.useEffect(()=>{c.current&&f(getComputedStyle(c.current))},[c]),b.jsx(bz,{"data-orientation":"horizontal",...a,ref:h,sizes:n,style:{...i,"--sa-thumb-width":`${V1(n)}px`},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,p)=>{if(o.viewport){const v=o.viewport.scrollLeft+d.deltaX;e.onWheelScroll(v),gz(v,p)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&l&&t({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:pg(l.paddingLeft),paddingEnd:pg(l.paddingRight)}})}})};wz.displayName="@mantine/core/ScrollAreaScrollbarX";function kz(e){const{sizes:n,onSizesChange:t,style:i,ref:r,...a}=e,o=da(),[l,f]=A.useState(),c=A.useRef(null),h=It(r,c,o.onScrollbarYChange);return A.useEffect(()=>{c.current&&f(window.getComputedStyle(c.current))},[]),b.jsx(bz,{...a,"data-orientation":"vertical",ref:h,sizes:n,style:{"--sa-thumb-height":`${V1(n)}px`,...i},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,p)=>{if(o.viewport){const v=o.viewport.scrollTop+d.deltaY;e.onWheelScroll(v),gz(v,p)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&l&&t({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:pg(l.paddingTop),paddingEnd:pg(l.paddingBottom)}})}})}kz.displayName="@mantine/core/ScrollAreaScrollbarY";function W1(e){const{orientation:n="vertical",...t}=e,{dir:i}=gu(),r=da(),a=A.useRef(null),o=A.useRef(0),[l,f]=A.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=pz(l.viewport,l.content),h={...t,sizes:l,onSizesChange:f,hasThumb:c>0&&c<1,onThumbChange:p=>{a.current=p},onThumbPointerUp:()=>{o.current=0},onThumbPointerDown:p=>{o.current=p}},d=(p,v)=>MX(p,o.current,l,v);return n==="horizontal"?b.jsx(wz,{...h,onThumbPositionChange:()=>{if(r.viewport&&a.current){const p=r.viewport.scrollLeft,v=d5(p,l,i);a.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:p=>{r.viewport&&(r.viewport.scrollLeft=p)},onDragScroll:p=>{r.viewport&&(r.viewport.scrollLeft=d(p,i))}}):n==="vertical"?b.jsx(kz,{...h,onThumbPositionChange:()=>{if(r.viewport&&a.current){const p=r.viewport.scrollTop,v=d5(p,l);l.scrollbar.size===0?a.current.style.setProperty("--thumb-opacity","0"):a.current.style.setProperty("--thumb-opacity","1"),a.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:p=>{r.viewport&&(r.viewport.scrollTop=p)},onDragScroll:p=>{r.viewport&&(r.viewport.scrollTop=d(p))}}):null}W1.displayName="@mantine/core/ScrollAreaScrollbarVisible";function S6(e){const n=da(),{forceMount:t,...i}=e,[r,a]=A.useState(!1),o=e.orientation==="horizontal",l=B1(()=>{if(n.viewport){const f=n.viewport.offsetWidth{const{scrollArea:o}=i;let l=0;if(o){const f=()=>{window.clearTimeout(l),a(!0)},c=()=>{l=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return o.addEventListener("pointerenter",f),o.addEventListener("pointerleave",c),()=>{window.clearTimeout(l),o.removeEventListener("pointerenter",f),o.removeEventListener("pointerleave",c)}}},[i.scrollArea,i.scrollHideDelay]),n||r?b.jsx(S6,{"data-state":r?"visible":"hidden",...t}):null}_z.displayName="@mantine/core/ScrollAreaScrollbarHover";function RX(e){const{forceMount:n,...t}=e,i=da(),r=e.orientation==="horizontal",[a,o]=A.useState("hidden"),l=B1(()=>o("idle"),100);return A.useEffect(()=>{if(a==="idle"){const f=window.setTimeout(()=>o("hidden"),i.scrollHideDelay);return()=>window.clearTimeout(f)}},[a,i.scrollHideDelay]),A.useEffect(()=>{const{viewport:f}=i,c=r?"scrollLeft":"scrollTop";if(f){let h=f[c];const d=()=>{const p=f[c];h!==p&&(o("scrolling"),l()),h=p};return f.addEventListener("scroll",d),()=>f.removeEventListener("scroll",d)}},[i.viewport,r,l]),n||a!=="hidden"?b.jsx(W1,{"data-state":a==="hidden"?"hidden":"visible",...t,onPointerEnter:eu(e.onPointerEnter,()=>o("interacting")),onPointerLeave:eu(e.onPointerLeave,()=>o("idle"))}):null}function Q3(e){const{forceMount:n,...t}=e,i=da(),{onScrollbarXEnabledChange:r,onScrollbarYEnabledChange:a}=i,o=e.orientation==="horizontal";return A.useEffect(()=>(o?r(!0):a(!0),()=>{o?r(!1):a(!1)}),[o,r,a]),i.type==="hover"?b.jsx(_z,{...t,forceMount:n}):i.type==="scroll"?b.jsx(RX,{...t,forceMount:n}):i.type==="auto"?b.jsx(S6,{...t,forceMount:n}):i.type==="always"?b.jsx(W1,{...t}):null}Q3.displayName="@mantine/core/ScrollAreaScrollbar";function PX(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 xz(e){const{style:n,ref:t,...i}=e,r=da(),a=yz(),{onThumbPositionChange:o}=a,l=It(t,h=>a.onThumbChange(h)),f=A.useRef(void 0),c=B1(()=>{f.current&&(f.current(),f.current=void 0)},100);return A.useEffect(()=>{const{viewport:h}=r;if(h){const d=()=>{c(),f.current||(f.current=PX(h,o),o())};return o(),h.addEventListener("scroll",d),()=>h.removeEventListener("scroll",d)}},[r.viewport,c,o]),b.jsx("div",{"data-state":a.hasThumb?"visible":"hidden",...i,ref:l,style:{width:"var(--sa-thumb-width)",height:"var(--sa-thumb-height)",...n},onPointerDownCapture:eu(e.onPointerDownCapture,h=>{const d=h.target.getBoundingClientRect(),p=h.clientX-d.left,v=h.clientY-d.top;a.onThumbPointerDown({x:p,y:v})}),onPointerUp:eu(e.onPointerUp,a.onThumbPointerUp)})}xz.displayName="@mantine/core/ScrollAreaThumb";function J3(e){const{forceMount:n,...t}=e,i=yz();return n||i.hasThumb?b.jsx(xz,{...t}):null}J3.displayName="@mantine/core/ScrollAreaThumb";function Sz({children:e,style:n,ref:t,onWheel:i,...r}){const a=da(),o=It(t,a.onViewportChange),l=f=>{if(i==null||i(f),a.scrollbarXEnabled&&a.viewport&&f.shiftKey){const{scrollTop:c,scrollHeight:h,clientHeight:d,scrollWidth:p,clientWidth:v}=a.viewport,y=c<1,w=c>=h-d-1;p>v&&(y||w)&&f.stopPropagation()}};return b.jsx(ve,{...r,ref:o,onWheel:l,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...n},children:b.jsx("div",{...a.getStyles("content"),ref:a.onContentChange,children:e})})}Sz.displayName="@mantine/core/ScrollAreaViewport";var C6={root:"m_d57069b5",content:"m_b1336c6",viewport:"m_c0783ff9",viewportInner:"m_f8f631dd",scrollbar:"m_c44ba933",thumb:"m_d8b5e363",corner:"m_21657268"};function G1(){return typeof window<"u"}function kc(e){return Cz(e)?(e.nodeName||"").toLowerCase():"#document"}function vr(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function so(e){var n;return(n=(Cz(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function Cz(e){return G1()?e instanceof Node||e instanceof vr(e).Node:!1}function zt(e){return G1()?e instanceof Element||e instanceof vr(e).Element:!1}function ha(e){return G1()?e instanceof HTMLElement||e instanceof vr(e).HTMLElement:!1}function eS(e){return!G1()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof vr(e).ShadowRoot}function Om(e){const{overflow:n,overflowX:t,overflowY:i,display:r}=la(e);return/auto|scroll|overlay|hidden|clip/.test(n+i+t)&&r!=="inline"&&r!=="contents"}function NX(e){return/^(table|td|th)$/.test(kc(e))}function Y1(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const $X=/transform|translate|scale|rotate|perspective|filter/,zX=/paint|layout|strict|content/,$l=e=>!!e&&e!=="none";let Xw;function A6(e){const n=zt(e)?la(e):e;return $l(n.transform)||$l(n.translate)||$l(n.scale)||$l(n.rotate)||$l(n.perspective)||!K1()&&($l(n.backdropFilter)||$l(n.filter))||$X.test(n.willChange||"")||zX.test(n.contain||"")}function LX(e){let n=Yo(e);for(;ha(n)&&!Fo(n);){if(A6(n))return n;if(Y1(n))return null;n=Yo(n)}return null}function K1(){return Xw==null&&(Xw=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Xw}function Fo(e){return/^(html|body|#document)$/.test(kc(e))}function la(e){return vr(e).getComputedStyle(e)}function X1(e){return zt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yo(e){if(kc(e)==="html")return e;const n=e.assignedSlot||e.parentNode||eS(e)&&e.host||so(e);return eS(n)?n.host:n}function Az(e){const n=Yo(e);return Fo(n)?e.ownerDocument?e.ownerDocument.body:e.body:ha(n)&&Om(n)?n:Az(n)}function qo(e,n,t){var i;n===void 0&&(n=[]),t===void 0&&(t=!0);const r=Az(e),a=r===((i=e.ownerDocument)==null?void 0:i.body),o=vr(r);if(a){const l=nS(o);return n.concat(o,o.visualViewport||[],Om(r)?r:[],l&&t?qo(l):[])}else return n.concat(r,qo(r,[],t))}function nS(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const IX=["top","right","bottom","left"],Ma=Math.min,Vi=Math.max,vg=Math.round,bv=Math.floor,Ka=e=>({x:e,y:e}),BX={left:"right",right:"left",bottom:"top",top:"bottom"};function tS(e,n,t){return Vi(e,Ma(n,t))}function no(e,n){return typeof e=="function"?e(n):e}function Da(e){return e.split("-")[0]}function _c(e){return e.split("-")[1]}function O6(e){return e==="x"?"y":"x"}function E6(e){return e==="y"?"height":"width"}function Oa(e){const n=e[0];return n==="t"||n==="b"?"y":"x"}function T6(e){return O6(Oa(e))}function FX(e,n,t){t===void 0&&(t=!1);const i=_c(e),r=T6(e),a=E6(r);let o=r==="x"?i===(t?"end":"start")?"right":"left":i==="start"?"bottom":"top";return n.reference[a]>n.floating[a]&&(o=gg(o)),[o,gg(o)]}function qX(e){const n=gg(e);return[iS(e),n,iS(n)]}function iS(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const h5=["left","right"],m5=["right","left"],HX=["top","bottom"],UX=["bottom","top"];function VX(e,n,t){switch(e){case"top":case"bottom":return t?n?m5:h5:n?h5:m5;case"left":case"right":return n?HX:UX;default:return[]}}function WX(e,n,t,i){const r=_c(e);let a=VX(Da(e),t==="start",i);return r&&(a=a.map(o=>o+"-"+r),n&&(a=a.concat(a.map(iS)))),a}function gg(e){const n=Da(e);return BX[n]+e.slice(n.length)}function GX(e){return{top:0,right:0,bottom:0,left:0,...e}}function j6(e){return typeof e!="number"?GX(e):{top:e,right:e,bottom:e,left:e}}function Ff(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 YX(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function KX(){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 XX(){return/apple/i.test(navigator.vendor)}function ZX(){return YX().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function QX(){return KX().includes("jsdom/")}const p5="data-floating-ui-focusable",JX="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function v5(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 Dh(e,n){if(!e||!n)return!1;const t=n.getRootNode==null?void 0:n.getRootNode();if(e.contains(n))return!0;if(t&&eS(t)){let i=n;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function Cf(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Zw(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 eZ(e){return e.matches("html,body")}function Vl(e){return(e==null?void 0:e.ownerDocument)||document}function nZ(e){return ha(e)&&e.matches(JX)}function tZ(e){if(!e||QX())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function iZ(e){return e?e.hasAttribute(p5)?e:e.querySelector("["+p5+"]")||e:null}function Zv(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,...Zv(e,r.id,t)])}function rZ(e){return"nativeEvent"in e}function rS(e,n){const t=["mouse","pen"];return t.push("",void 0),t.includes(e)}var aZ=typeof document<"u",oZ=function(){},Xa=aZ?A.useLayoutEffect:oZ;const sZ={...V$};function wv(e){const n=A.useRef(e);return Xa(()=>{n.current=e}),n}const lZ=sZ.useInsertionEffect,uZ=lZ||(e=>e());function Va(e){const n=A.useRef(()=>{});return uZ(()=>{n.current=e}),A.useCallback(function(){for(var t=arguments.length,i=new Array(t),r=0;r{const{placement:i="bottom",strategy:r="absolute",middleware:a=[],platform:o}=t,l=o.detectOverflow?o:{...o,detectOverflow:fZ},f=await(o.isRTL==null?void 0:o.isRTL(n));let c=await o.getElementRects({reference:e,floating:n,strategy:r}),{x:h,y:d}=g5(c,i,f),p=i,v=0;const y={};for(let w=0;w({name:"arrow",options:e,async fn(n){const{x:t,y:i,placement:r,rects:a,platform:o,elements:l,middlewareData:f}=n,{element:c,padding:h=0}=no(e,n)||{};if(c==null)return{};const d=j6(h),p={x:t,y:i},v=T6(r),y=E6(v),w=await o.getDimensions(c),k=v==="y",_=k?"top":"left",S=k?"bottom":"right",C=k?"clientHeight":"clientWidth",E=a.reference[y]+a.reference[v]-p[v]-a.floating[y],O=p[v]-a.reference[v],T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let M=T?T[C]:0;(!M||!await(o.isElement==null?void 0:o.isElement(T)))&&(M=l.floating[C]||a.floating[y]);const N=E/2-O/2,F=M/2-w[y]/2-1,R=Ma(d[_],F),L=Ma(d[S],F),B=R,G=M-w[y]-L,U=M/2-w[y]/2+N,H=tS(B,U,G),P=!f.arrow&&_c(r)!=null&&U!==H&&a.reference[y]/2-(UU<=0)){var L,B;const U=(((L=a.flip)==null?void 0:L.index)||0)+1,H=M[U];if(H&&(!(d==="alignment"?S!==Oa(H):!1)||R.every(q=>Oa(q.placement)===S?q.overflows[0]>0:!0)))return{data:{index:U,overflows:R},reset:{placement:H}};let P=(B=R.filter($=>$.overflows[0]<=0).sort(($,q)=>$.overflows[1]-q.overflows[1])[0])==null?void 0:B.placement;if(!P)switch(v){case"bestFit":{var G;const $=(G=R.filter(q=>{if(T){const Y=Oa(q.placement);return Y===S||Y==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(Y=>Y>0).reduce((Y,D)=>Y+D,0)]).sort((q,Y)=>q[1]-Y[1])[0])==null?void 0:G[0];$&&(P=$);break}case"initialPlacement":P=l;break}if(r!==P)return{reset:{placement:P}}}return{}}}};function y5(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function b5(e){return IX.some(n=>e[n]>=0)}const pZ=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:t,platform:i}=n,{strategy:r="referenceHidden",...a}=no(e,n);switch(r){case"referenceHidden":{const o=await i.detectOverflow(n,{...a,elementContext:"reference"}),l=y5(o,t.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:b5(l)}}}case"escaped":{const o=await i.detectOverflow(n,{...a,altBoundary:!0}),l=y5(o,t.floating);return{data:{escapedOffsets:l,escaped:b5(l)}}}default:return{}}}}};function Oz(e){const n=Ma(...e.map(a=>a.left)),t=Ma(...e.map(a=>a.top)),i=Vi(...e.map(a=>a.right)),r=Vi(...e.map(a=>a.bottom));return{x:n,y:t,width:i-n,height:r-t}}function vZ(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=>Ff(Oz(r)))}const gZ=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(n){const{placement:t,elements:i,rects:r,platform:a,strategy:o}=n,{padding:l=2,x:f,y:c}=no(e,n),h=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(i.reference))||[]),d=vZ(h),p=Ff(Oz(h)),v=j6(l);function y(){if(d.length===2&&d[0].left>d[1].right&&f!=null&&c!=null)return d.find(k=>f>k.left-v.left&&fk.top-v.top&&c=2){if(Oa(t)==="y"){const R=d[0],L=d[d.length-1],B=Da(t)==="top",G=R.top,U=L.bottom,H=B?R.left:L.left,P=B?R.right:L.right,$=P-H,q=U-G;return{top:G,bottom:U,left:H,right:P,width:$,height:q,x:H,y:G}}const k=Da(t)==="left",_=Vi(...d.map(R=>R.right)),S=Ma(...d.map(R=>R.left)),C=d.filter(R=>k?R.left===S:R.right===_),E=C[0].top,O=C[C.length-1].bottom,T=S,M=_,N=M-T,F=O-E;return{top:E,bottom:O,left:T,right:M,width:N,height:F,x:T,y:E}}return p}const w=await a.getElementRects({reference:{getBoundingClientRect:y},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}}:{}}}},Ez=new Set(["left","top"]);async function yZ(e,n){const{placement:t,platform:i,elements:r}=e,a=await(i.isRTL==null?void 0:i.isRTL(r.floating)),o=Da(t),l=_c(t),f=Oa(t)==="y",c=Ez.has(o)?-1:1,h=a&&f?-1:1,d=no(n,e);let{mainAxis:p,crossAxis:v,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof y=="number"&&(v=l==="end"?y*-1:y),f?{x:v*h,y:p*c}:{x:p*c,y:v*h}}const bZ=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var t,i;const{x:r,y:a,placement:o,middlewareData:l}=n,f=await yZ(n,e);return o===((t=l.offset)==null?void 0:t.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:r+f.x,y:a+f.y,data:{...f,placement:o}}}}},wZ=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:t,y:i,placement:r,platform:a}=n,{mainAxis:o=!0,crossAxis:l=!1,limiter:f={fn:_=>{let{x:S,y:C}=_;return{x:S,y:C}}},...c}=no(e,n),h={x:t,y:i},d=await a.detectOverflow(n,c),p=Oa(Da(r)),v=O6(p);let y=h[v],w=h[p];if(o){const _=v==="y"?"top":"left",S=v==="y"?"bottom":"right",C=y+d[_],E=y-d[S];y=tS(C,y,E)}if(l){const _=p==="y"?"top":"left",S=p==="y"?"bottom":"right",C=w+d[_],E=w-d[S];w=tS(C,w,E)}const k=f.fn({...n,[v]:y,[p]:w});return{...k,data:{x:k.x-t,y:k.y-i,enabled:{[v]:o,[p]:l}}}}}},kZ=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:t,y:i,placement:r,rects:a,middlewareData:o}=n,{offset:l=0,mainAxis:f=!0,crossAxis:c=!0}=no(e,n),h={x:t,y:i},d=Oa(r),p=O6(d);let v=h[p],y=h[d];const w=no(l,n),k=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(f){const C=p==="y"?"height":"width",E=a.reference[p]-a.floating[C]+k.mainAxis,O=a.reference[p]+a.reference[C]-k.mainAxis;vO&&(v=O)}if(c){var _,S;const C=p==="y"?"width":"height",E=Ez.has(Da(r)),O=a.reference[d]-a.floating[C]+(E&&((_=o.offset)==null?void 0:_[d])||0)+(E?0:k.crossAxis),T=a.reference[d]+a.reference[C]+(E?0:((S=o.offset)==null?void 0:S[d])||0)-(E?k.crossAxis:0);yT&&(y=T)}return{[p]:v,[d]:y}}}},_Z=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var t,i;const{placement:r,rects:a,platform:o,elements:l}=n,{apply:f=()=>{},...c}=no(e,n),h=await o.detectOverflow(n,c),d=Da(r),p=_c(r),v=Oa(r)==="y",{width:y,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,C=y-h.left-h.right,E=Ma(w-h[k],S),O=Ma(y-h[_],C),T=!n.middlewareData.shift;let M=E,N=O;if((t=n.middlewareData.shift)!=null&&t.enabled.x&&(N=C),(i=n.middlewareData.shift)!=null&&i.enabled.y&&(M=S),T&&!p){const R=Vi(h.left,0),L=Vi(h.right,0),B=Vi(h.top,0),G=Vi(h.bottom,0);v?N=y-2*(R!==0||L!==0?R+L:Vi(h.left,h.right)):M=w-2*(B!==0||G!==0?B+G:Vi(h.top,h.bottom))}await f({...n,availableWidth:N,availableHeight:M});const F=await o.getDimensions(l.floating);return y!==F.width||w!==F.height?{reset:{rects:!0}}:{}}}};function Tz(e){const n=la(e);let t=parseFloat(n.width)||0,i=parseFloat(n.height)||0;const r=ha(e),a=r?e.offsetWidth:t,o=r?e.offsetHeight:i,l=vg(t)!==a||vg(i)!==o;return l&&(t=a,i=o),{width:t,height:i,$:l}}function M6(e){return zt(e)?e:e.contextElement}function Df(e){const n=M6(e);if(!ha(n))return Ka(1);const t=n.getBoundingClientRect(),{width:i,height:r,$:a}=Tz(n);let o=(a?vg(t.width):t.width)/i,l=(a?vg(t.height):t.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const xZ=Ka(0);function jz(e){const n=vr(e);return!K1()||!n.visualViewport?xZ:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function SZ(e,n,t){return n===void 0&&(n=!1),!t||n&&t!==vr(e)?!1:n}function iu(e,n,t,i){n===void 0&&(n=!1),t===void 0&&(t=!1);const r=e.getBoundingClientRect(),a=M6(e);let o=Ka(1);n&&(i?zt(i)&&(o=Df(i)):o=Df(e));const l=SZ(a,t,i)?jz(a):Ka(0);let f=(r.left+l.x)/o.x,c=(r.top+l.y)/o.y,h=r.width/o.x,d=r.height/o.y;if(a){const p=vr(a),v=i&&zt(i)?vr(i):i;let y=p,w=nS(y);for(;w&&i&&v!==y;){const k=Df(w),_=w.getBoundingClientRect(),S=la(w),C=_.left+(w.clientLeft+parseFloat(S.paddingLeft))*k.x,E=_.top+(w.clientTop+parseFloat(S.paddingTop))*k.y;f*=k.x,c*=k.y,h*=k.x,d*=k.y,f+=C,c+=E,y=vr(w),w=nS(y)}}return Ff({width:h,height:d,x:f,y:c})}function Z1(e,n){const t=X1(e).scrollLeft;return n?n.left+t:iu(so(e)).left+t}function Mz(e,n){const t=e.getBoundingClientRect(),i=t.left+n.scrollLeft-Z1(e,t),r=t.top+n.scrollTop;return{x:i,y:r}}function CZ(e){let{elements:n,rect:t,offsetParent:i,strategy:r}=e;const a=r==="fixed",o=so(i),l=n?Y1(n.floating):!1;if(i===o||l&&a)return t;let f={scrollLeft:0,scrollTop:0},c=Ka(1);const h=Ka(0),d=ha(i);if((d||!d&&!a)&&((kc(i)!=="body"||Om(o))&&(f=X1(i)),d)){const v=iu(i);c=Df(i),h.x=v.x+i.clientLeft,h.y=v.y+i.clientTop}const p=o&&!d&&!a?Mz(o,f):Ka(0);return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-f.scrollLeft*c.x+h.x+p.x,y:t.y*c.y-f.scrollTop*c.y+h.y+p.y}}function AZ(e){return Array.from(e.getClientRects())}function OZ(e){const n=so(e),t=X1(e),i=e.ownerDocument.body,r=Vi(n.scrollWidth,n.clientWidth,i.scrollWidth,i.clientWidth),a=Vi(n.scrollHeight,n.clientHeight,i.scrollHeight,i.clientHeight);let o=-t.scrollLeft+Z1(e);const l=-t.scrollTop;return la(i).direction==="rtl"&&(o+=Vi(n.clientWidth,i.clientWidth)-r),{width:r,height:a,x:o,y:l}}const w5=25;function EZ(e,n){const t=vr(e),i=so(e),r=t.visualViewport;let a=i.clientWidth,o=i.clientHeight,l=0,f=0;if(r){a=r.width,o=r.height;const h=K1();(!h||h&&n==="fixed")&&(l=r.offsetLeft,f=r.offsetTop)}const c=Z1(i);if(c<=0){const h=i.ownerDocument,d=h.body,p=getComputedStyle(d),v=h.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,y=Math.abs(i.clientWidth-d.clientWidth-v);y<=w5&&(a-=y)}else c<=w5&&(a+=c);return{width:a,height:o,x:l,y:f}}function TZ(e,n){const t=iu(e,!0,n==="fixed"),i=t.top+e.clientTop,r=t.left+e.clientLeft,a=ha(e)?Df(e):Ka(1),o=e.clientWidth*a.x,l=e.clientHeight*a.y,f=r*a.x,c=i*a.y;return{width:o,height:l,x:f,y:c}}function k5(e,n,t){let i;if(n==="viewport")i=EZ(e,t);else if(n==="document")i=OZ(so(e));else if(zt(n))i=TZ(n,t);else{const r=jz(e);i={x:n.x-r.x,y:n.y-r.y,width:n.width,height:n.height}}return Ff(i)}function Dz(e,n){const t=Yo(e);return t===n||!zt(t)||Fo(t)?!1:la(t).position==="fixed"||Dz(t,n)}function jZ(e,n){const t=n.get(e);if(t)return t;let i=qo(e,[],!1).filter(l=>zt(l)&&kc(l)!=="body"),r=null;const a=la(e).position==="fixed";let o=a?Yo(e):e;for(;zt(o)&&!Fo(o);){const l=la(o),f=A6(o);!f&&l.position==="fixed"&&(r=null),(a?!f&&!r:!f&&l.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||Om(o)&&!f&&Dz(e,o))?i=i.filter(h=>h!==o):r=l,o=Yo(o)}return n.set(e,i),i}function MZ(e){let{element:n,boundary:t,rootBoundary:i,strategy:r}=e;const o=[...t==="clippingAncestors"?Y1(n)?[]:jZ(n,this._c):[].concat(t),i],l=k5(n,o[0],r);let f=l.top,c=l.right,h=l.bottom,d=l.left;for(let p=1;p{o(!1,1e-7)},1e3)}M===1&&!Pz(c,e.getBoundingClientRect())&&o(),E=!1}try{t=new IntersectionObserver(O,{...C,root:r.ownerDocument})}catch{t=new IntersectionObserver(O,C)}t.observe(e)}return o(!0),a}function aS(e,n,t,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:f=!1}=i,c=M6(e),h=r||a?[...c?qo(c):[],...n?qo(n):[]]:[];h.forEach(_=>{r&&_.addEventListener("scroll",t,{passive:!0}),a&&_.addEventListener("resize",t)});const d=c&&l?zZ(c,t):null;let p=-1,v=null;o&&(v=new ResizeObserver(_=>{let[S]=_;S&&S.target===c&&v&&n&&(v.unobserve(n),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var C;(C=v)==null||C.observe(n)})),t()}),c&&!f&&v.observe(c),n&&v.observe(n));let y,w=f?iu(e):null;f&&k();function k(){const _=iu(e);w&&!Pz(w,_)&&t(),w=_,y=requestAnimationFrame(k)}return t(),()=>{var _;h.forEach(S=>{r&&S.removeEventListener("scroll",t),a&&S.removeEventListener("resize",t)}),d==null||d(),(_=v)==null||_.disconnect(),v=null,f&&cancelAnimationFrame(y)}}const LZ=bZ,IZ=wZ,BZ=mZ,FZ=_Z,qZ=pZ,x5=hZ,HZ=gZ,UZ=kZ,VZ=(e,n,t)=>{const i=new Map,r={platform:$Z,...t},a={...r.platform,_c:i};return dZ(e,n,{...r,platform:a})};var WZ=typeof document<"u",GZ=function(){},Qv=WZ?A.useLayoutEffect:GZ;function yg(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(!yg(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)&&!yg(e[a],n[a]))return!1}return!0}return e!==e&&n!==n}function Nz(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function S5(e,n){const t=Nz(e);return Math.round(n*t)/t}function Jw(e){const n=A.useRef(e);return Qv(()=>{n.current=e}),n}function YZ(e){e===void 0&&(e={});const{placement:n="bottom",strategy:t="absolute",middleware:i=[],platform:r,elements:{reference:a,floating:o}={},transform:l=!0,whileElementsMounted:f,open:c}=e,[h,d]=A.useState({x:0,y:0,strategy:t,placement:n,middlewareData:{},isPositioned:!1}),[p,v]=A.useState(i);yg(p,i)||v(i);const[y,w]=A.useState(null),[k,_]=A.useState(null),S=A.useCallback(q=>{q!==T.current&&(T.current=q,w(q))},[]),C=A.useCallback(q=>{q!==M.current&&(M.current=q,_(q))},[]),E=a||y,O=o||k,T=A.useRef(null),M=A.useRef(null),N=A.useRef(h),F=f!=null,R=Jw(f),L=Jw(r),B=Jw(c),G=A.useCallback(()=>{if(!T.current||!M.current)return;const q={placement:n,strategy:t,middleware:p};L.current&&(q.platform=L.current),VZ(T.current,M.current,q).then(Y=>{const D={...Y,isPositioned:B.current!==!1};U.current&&!yg(N.current,D)&&(N.current=D,Vs.flushSync(()=>{d(D)}))})},[p,n,t,L,B]);Qv(()=>{c===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,d(q=>({...q,isPositioned:!1})))},[c]);const U=A.useRef(!1);Qv(()=>(U.current=!0,()=>{U.current=!1}),[]),Qv(()=>{if(E&&(T.current=E),O&&(M.current=O),E&&O){if(R.current)return R.current(E,O,G);G()}},[E,O,G,R,F]);const H=A.useMemo(()=>({reference:T,floating:M,setReference:S,setFloating:C}),[S,C]),P=A.useMemo(()=>({reference:E,floating:O}),[E,O]),$=A.useMemo(()=>{const q={position:t,left:0,top:0};if(!P.floating)return q;const Y=S5(P.floating,h.x),D=S5(P.floating,h.y);return l?{...q,transform:"translate("+Y+"px, "+D+"px)",...Nz(P.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:Y,top:D}},[t,l,P.floating,h.x,h.y]);return A.useMemo(()=>({...h,update:G,refs:H,elements:P,floatingStyles:$}),[h,G,H,P,$])}const KZ=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?x5({element:i.current,padding:r}).fn(t):{}:i?x5({element:i,padding:r}).fn(t):{}}}},$z=(e,n)=>{const t=LZ(e);return{name:t.name,fn:t.fn,options:[e,n]}},D6=(e,n)=>{const t=IZ(e);return{name:t.name,fn:t.fn,options:[e,n]}},C5=(e,n)=>({fn:UZ(e).fn,options:[e,n]}),bg=(e,n)=>{const t=BZ(e);return{name:t.name,fn:t.fn,options:[e,n]}},XZ=(e,n)=>{const t=FZ(e);return{name:t.name,fn:t.fn,options:[e,n]}},ZZ=(e,n)=>{const t=qZ(e);return{name:t.name,fn:t.fn,options:[e,n]}},ph=(e,n)=>{const t=HZ(e);return{name:t.name,fn:t.fn,options:[e,n]}},zz=(e,n)=>{const t=KZ(e);return{name:t.name,fn:t.fn,options:[e,n]}};function Lz(e){const n=A.useRef(void 0),t=A.useCallback(i=>{const r=e.map(a=>{if(a!=null){if(typeof a=="function"){const o=a,l=o(i);return typeof l=="function"?l:()=>{o(null)}}return a.current=i,()=>{a.current=null}}});return()=>{r.forEach(a=>a==null?void 0:a())}},e);return A.useMemo(()=>e.every(i=>i==null)?null:i=>{n.current&&(n.current(),n.current=void 0),i!=null&&(n.current=t(i))},e)}const QZ="data-floating-ui-focusable",A5="active",O5="selected",JZ={...V$};let E5=!1,eQ=0;const T5=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+eQ++;function nQ(){const[e,n]=A.useState(()=>E5?T5():void 0);return Xa(()=>{e==null&&n(T5())},[]),A.useEffect(()=>{E5=!0},[]),e}const tQ=JZ.useId,Iz=tQ||nQ;function iQ(){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 rQ=A.createContext(null),aQ=A.createContext(null),R6=()=>{var e;return((e=A.useContext(rQ))==null?void 0:e.id)||null},P6=()=>A.useContext(aQ);function N6(e){return"data-floating-ui-"+e}function Jr(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const j5=N6("safe-polygon");function Jv(e,n,t){if(t&&!rS(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 ek(e){return typeof e=="function"?e():e}function oQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,dataRef:r,events:a,elements:o}=e,{enabled:l=!0,delay:f=0,handleClose:c=null,mouseOnly:h=!1,restMs:d=0,move:p=!0}=n,v=P6(),y=R6(),w=wv(c),k=wv(f),_=wv(t),S=wv(d),C=A.useRef(),E=A.useRef(-1),O=A.useRef(),T=A.useRef(-1),M=A.useRef(!0),N=A.useRef(!1),F=A.useRef(()=>{}),R=A.useRef(!1),L=Va(()=>{var $;const q=($=r.current.openEvent)==null?void 0:$.type;return(q==null?void 0:q.includes("mouse"))&&q!=="mousedown"});A.useEffect(()=>{if(!l)return;function $(q){let{open:Y}=q;Y||(Jr(E),Jr(T),M.current=!0,R.current=!1)}return a.on("openchange",$),()=>{a.off("openchange",$)}},[l,a]),A.useEffect(()=>{if(!l||!w.current||!t)return;function $(Y){L()&&i(!1,Y,"hover")}const q=Vl(o.floating).documentElement;return q.addEventListener("mouseleave",$),()=>{q.removeEventListener("mouseleave",$)}},[o.floating,t,i,l,w,L]);const B=A.useCallback(function($,q,Y){q===void 0&&(q=!0),Y===void 0&&(Y="hover");const D=Jv(k.current,"close",C.current);D&&!O.current?(Jr(E),E.current=window.setTimeout(()=>i(!1,$,Y),D)):q&&(Jr(E),i(!1,$,Y))},[k,i]),G=Va(()=>{F.current(),O.current=void 0}),U=Va(()=>{if(N.current){const $=Vl(o.floating).body;$.style.pointerEvents="",$.removeAttribute(j5),N.current=!1}}),H=Va(()=>r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1);A.useEffect(()=>{if(!l)return;function $(V){if(Jr(E),M.current=!1,h&&!rS(C.current)||ek(S.current)>0&&!Jv(k.current,"open"))return;const z=Jv(k.current,"open",C.current);z?E.current=window.setTimeout(()=>{_.current||i(!0,V,"hover")},z):t||i(!0,V,"hover")}function q(V){if(H()){U();return}F.current();const z=Vl(o.floating);if(Jr(T),R.current=!1,w.current&&r.current.floatingContext){t||Jr(E),O.current=w.current({...r.current.floatingContext,tree:v,x:V.clientX,y:V.clientY,onClose(){U(),G(),H()||B(V,!0,"safe-polygon")}});const ee=O.current;z.addEventListener("mousemove",ee),F.current=()=>{z.removeEventListener("mousemove",ee)};return}(C.current==="touch"?!Dh(o.floating,V.relatedTarget):!0)&&B(V)}function Y(V){H()||r.current.floatingContext&&(w.current==null||w.current({...r.current.floatingContext,tree:v,x:V.clientX,y:V.clientY,onClose(){U(),G(),H()||B(V)}})(V))}function D(){Jr(E)}function W(V){H()||B(V,!1)}if(zt(o.domReference)){const V=o.domReference,z=o.floating;return t&&V.addEventListener("mouseleave",Y),p&&V.addEventListener("mousemove",$,{once:!0}),V.addEventListener("mouseenter",$),V.addEventListener("mouseleave",q),z&&(z.addEventListener("mouseleave",Y),z.addEventListener("mouseenter",D),z.addEventListener("mouseleave",W)),()=>{t&&V.removeEventListener("mouseleave",Y),p&&V.removeEventListener("mousemove",$),V.removeEventListener("mouseenter",$),V.removeEventListener("mouseleave",q),z&&(z.removeEventListener("mouseleave",Y),z.removeEventListener("mouseenter",D),z.removeEventListener("mouseleave",W))}}},[o,l,e,h,p,B,G,U,i,t,_,v,k,w,r,H,S]),Xa(()=>{var $;if(l&&t&&($=w.current)!=null&&($=$.__options)!=null&&$.blockPointerEvents&&L()){N.current=!0;const Y=o.floating;if(zt(o.domReference)&&Y){var q;const D=Vl(o.floating).body;D.setAttribute(j5,"");const W=o.domReference,V=v==null||(q=v.nodesRef.current.find(z=>z.id===y))==null||(q=q.context)==null?void 0:q.elements.floating;return V&&(V.style.pointerEvents=""),D.style.pointerEvents="none",W.style.pointerEvents="auto",Y.style.pointerEvents="auto",()=>{D.style.pointerEvents="",W.style.pointerEvents="",Y.style.pointerEvents=""}}}},[l,t,y,o,v,w,L]),Xa(()=>{t||(C.current=void 0,R.current=!1,G(),U())},[t,G,U]),A.useEffect(()=>()=>{G(),Jr(E),Jr(T),U()},[l,o.domReference,G,U]);const P=A.useMemo(()=>{function $(q){C.current=q.pointerType}return{onPointerDown:$,onPointerEnter:$,onMouseMove(q){const{nativeEvent:Y}=q;function D(){!M.current&&!_.current&&i(!0,Y,"hover")}h&&!rS(C.current)||t||ek(S.current)===0||R.current&&q.movementX**2+q.movementY**2<2||(Jr(T),C.current==="touch"?D():(R.current=!0,T.current=window.setTimeout(D,ek(S.current))))}}},[h,i,t,_,S]);return A.useMemo(()=>l?{reference:P}:{},[l,P])}const oS=()=>{},Bz=A.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:oS,setState:oS,isInstantPhase:!1}),sQ=()=>A.useContext(Bz);function lQ(e){const{children:n,delay:t,timeoutMs:i=0}=e,[r,a]=A.useReducer((f,c)=>({...f,...c}),{delay:t,timeoutMs:i,initialDelay:t,currentId:null,isInstantPhase:!1}),o=A.useRef(null),l=A.useCallback(f=>{a({currentId:f})},[]);return Xa(()=>{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]),b.jsx(Bz.Provider,{value:A.useMemo(()=>({...r,setState:a,setCurrentId:l}),[r,l]),children:n})}function uQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,floatingId:r}=e,{id:a,enabled:o=!0}=n,l=a??r,f=sQ(),{currentId:c,setCurrentId:h,initialDelay:d,setState:p,timeoutMs:v}=f;return Xa(()=>{o&&c&&(p({delay:{open:1,close:Jv(d,"close")}}),c!==l&&i(!1))},[o,l,i,p,c,d]),Xa(()=>{function y(){i(!1),p({delay:d,currentId:null})}if(o&&c&&!t&&c===l){if(v){const w=window.setTimeout(y,v);return()=>{clearTimeout(w)}}y()}},[o,t,p,c,l,i,d,v]),Xa(()=>{o&&(h===oS||!t||h(l))},[o,t,h,l]),f}const fQ={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},cQ={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},M5=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 dQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,elements:r,dataRef:a}=e,{enabled:o=!0,escapeKey:l=!0,outsidePress:f=!0,outsidePressEvent:c="pointerdown",referencePress:h=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:v,capture:y}=n,w=P6(),k=Va(typeof f=="function"?f:()=>!1),_=typeof f=="function"?k:f,S=A.useRef(!1),{escapeKey:C,outsidePress:E}=M5(v),{escapeKey:O,outsidePress:T}=M5(y),M=A.useRef(!1),N=Va(U=>{var H;if(!t||!o||!l||U.key!=="Escape"||M.current)return;const P=(H=a.current.floatingContext)==null?void 0:H.nodeId,$=w?Zv(w.nodesRef.current,P):[];if(!C&&(U.stopPropagation(),$.length>0)){let q=!0;if($.forEach(Y=>{var D;if((D=Y.context)!=null&&D.open&&!Y.context.dataRef.current.__escapeKeyBubbles){q=!1;return}}),!q)return}i(!1,rZ(U)?U.nativeEvent:U,"escape-key")}),F=Va(U=>{var H;const P=()=>{var $;N(U),($=Cf(U))==null||$.removeEventListener("keydown",P)};(H=Cf(U))==null||H.addEventListener("keydown",P)}),R=Va(U=>{var H;const P=a.current.insideReactTree;a.current.insideReactTree=!1;const $=S.current;if(S.current=!1,c==="click"&&$||P||typeof _=="function"&&!_(U))return;const q=Cf(U),Y="["+N6("inert")+"]",D=Vl(r.floating).querySelectorAll(Y);let W=zt(q)?q:null;for(;W&&!Fo(W);){const ee=Yo(W);if(Fo(ee)||!zt(ee))break;W=ee}if(D.length&&zt(q)&&!eZ(q)&&!Dh(q,r.floating)&&Array.from(D).every(ee=>!Dh(W,ee)))return;if(ha(q)&&G){const ee=Fo(q),re=la(q),le=/auto|scroll/,be=ee||le.test(re.overflowX),ae=ee||le.test(re.overflowY),ue=be&&q.clientWidth>0&&q.scrollWidth>q.clientWidth,Ce=ae&&q.clientHeight>0&&q.scrollHeight>q.clientHeight,ne=re.direction==="rtl",Ne=Ce&&(ne?U.offsetX<=q.offsetWidth-q.clientWidth:U.offsetX>q.clientWidth),pe=ue&&U.offsetY>q.clientHeight;if(Ne||pe)return}const V=(H=a.current.floatingContext)==null?void 0:H.nodeId,z=w&&Zv(w.nodesRef.current,V).some(ee=>{var re;return Zw(U,(re=ee.context)==null?void 0:re.elements.floating)});if(Zw(U,r.floating)||Zw(U,r.domReference)||z)return;const X=w?Zv(w.nodesRef.current,V):[];if(X.length>0){let ee=!0;if(X.forEach(re=>{var le;if((le=re.context)!=null&&le.open&&!re.context.dataRef.current.__outsidePressBubbles){ee=!1;return}}),!ee)return}i(!1,U,"outside-press")}),L=Va(U=>{var H;const P=()=>{var $;R(U),($=Cf(U))==null||$.removeEventListener(c,P)};(H=Cf(U))==null||H.addEventListener(c,P)});A.useEffect(()=>{if(!t||!o)return;a.current.__escapeKeyBubbles=C,a.current.__outsidePressBubbles=E;let U=-1;function H(D){i(!1,D,"ancestor-scroll")}function P(){window.clearTimeout(U),M.current=!0}function $(){U=window.setTimeout(()=>{M.current=!1},K1()?5:0)}const q=Vl(r.floating);l&&(q.addEventListener("keydown",O?F:N,O),q.addEventListener("compositionstart",P),q.addEventListener("compositionend",$)),_&&q.addEventListener(c,T?L:R,T);let Y=[];return p&&(zt(r.domReference)&&(Y=qo(r.domReference)),zt(r.floating)&&(Y=Y.concat(qo(r.floating))),!zt(r.reference)&&r.reference&&r.reference.contextElement&&(Y=Y.concat(qo(r.reference.contextElement)))),Y=Y.filter(D=>{var W;return D!==((W=q.defaultView)==null?void 0:W.visualViewport)}),Y.forEach(D=>{D.addEventListener("scroll",H,{passive:!0})}),()=>{l&&(q.removeEventListener("keydown",O?F:N,O),q.removeEventListener("compositionstart",P),q.removeEventListener("compositionend",$)),_&&q.removeEventListener(c,T?L:R,T),Y.forEach(D=>{D.removeEventListener("scroll",H)}),window.clearTimeout(U)}},[a,r,l,_,c,t,i,p,o,C,E,N,O,F,R,T,L]),A.useEffect(()=>{a.current.insideReactTree=!1},[a,_,c]);const B=A.useMemo(()=>({onKeyDown:N,...h&&{[fQ[d]]:U=>{i(!1,U.nativeEvent,"reference-press")},...d!=="click"&&{onClick(U){i(!1,U.nativeEvent,"reference-press")}}}}),[N,i,h,d]),G=A.useMemo(()=>{function U(H){H.button===0&&(S.current=!0)}return{onKeyDown:N,onMouseDown:U,onMouseUp:U,[cQ[c]]:()=>{a.current.insideReactTree=!0}}},[N,c,a]);return A.useMemo(()=>o?{reference:B,floating:G}:{},[o,B,G])}function hQ(e){const{open:n=!1,onOpenChange:t,elements:i}=e,r=Iz(),a=A.useRef({}),[o]=A.useState(()=>iQ()),l=R6()!=null,[f,c]=A.useState(i.reference),h=Va((v,y,w)=>{a.current.openEvent=v?y:void 0,o.emit("openchange",{open:v,event:y,reason:w,nested:l}),t==null||t(v,y,w)}),d=A.useMemo(()=>({setPositionReference:c}),[]),p=A.useMemo(()=>({reference:f||i.reference||null,floating:i.floating||null,domReference:i.reference}),[f,i.reference,i.floating]);return A.useMemo(()=>({dataRef:a,open:n,onOpenChange:h,elements:p,events:o,floatingId:r,refs:d}),[n,h,p,o,r,d])}function $6(e){e===void 0&&(e={});const{nodeId:n}=e,t=hQ({...e,elements:{reference:null,floating:null,...e.elements}}),i=e.rootContext||t,r=i.elements,[a,o]=A.useState(null),[l,f]=A.useState(null),h=(r==null?void 0:r.domReference)||a,d=A.useRef(null),p=P6();Xa(()=>{h&&(d.current=h)},[h]);const v=YZ({...e,elements:{...r,...l&&{reference:l}}}),y=A.useCallback(C=>{const E=zt(C)?{getBoundingClientRect:()=>C.getBoundingClientRect(),getClientRects:()=>C.getClientRects(),contextElement:C}:C;f(E),v.refs.setReference(E)},[v.refs]),w=A.useCallback(C=>{(zt(C)||C===null)&&(d.current=C,o(C)),(zt(v.refs.reference.current)||v.refs.reference.current===null||C!==null&&!zt(C))&&v.refs.setReference(C)},[v.refs]),k=A.useMemo(()=>({...v.refs,setReference:w,setPositionReference:y,domReference:d}),[v.refs,w,y]),_=A.useMemo(()=>({...v.elements,domReference:h}),[v.elements,h]),S=A.useMemo(()=>({...v,...i,refs:k,elements:_,nodeId:n}),[v,k,_,n,i]);return Xa(()=>{i.dataRef.current.floatingContext=S;const C=p==null?void 0:p.nodesRef.current.find(E=>E.id===n);C&&(C.context=S)}),A.useMemo(()=>({...v,context:S,refs:k,elements:_}),[v,k,_,S])}function nk(){return ZX()&&XX()}function mQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,events:r,dataRef:a,elements:o}=e,{enabled:l=!0,visibleOnly:f=!0}=n,c=A.useRef(!1),h=A.useRef(-1),d=A.useRef(!0);A.useEffect(()=>{if(!l)return;const v=vr(o.domReference);function y(){!t&&ha(o.domReference)&&o.domReference===v5(Vl(o.domReference))&&(c.current=!0)}function w(){d.current=!0}function k(){d.current=!1}return v.addEventListener("blur",y),nk()&&(v.addEventListener("keydown",w,!0),v.addEventListener("pointerdown",k,!0)),()=>{v.removeEventListener("blur",y),nk()&&(v.removeEventListener("keydown",w,!0),v.removeEventListener("pointerdown",k,!0))}},[o.domReference,t,l]),A.useEffect(()=>{if(!l)return;function v(y){let{reason:w}=y;(w==="reference-press"||w==="escape-key")&&(c.current=!0)}return r.on("openchange",v),()=>{r.off("openchange",v)}},[r,l]),A.useEffect(()=>()=>{Jr(h)},[]);const p=A.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(v){if(c.current)return;const y=Cf(v.nativeEvent);if(f&&zt(y)){if(nk()&&!v.relatedTarget){if(!d.current&&!nZ(y))return}else if(!tZ(y))return}i(!0,v.nativeEvent,"focus")},onBlur(v){c.current=!1;const y=v.relatedTarget,w=v.nativeEvent,k=zt(y)&&y.hasAttribute(N6("focus-guard"))&&y.getAttribute("data-type")==="outside";h.current=window.setTimeout(()=>{var _;const S=v5(o.domReference?o.domReference.ownerDocument:document);!y&&S===o.domReference||Dh((_=a.current.floatingContext)==null?void 0:_.refs.floating.current,S)||Dh(o.domReference,S)||k||i(!1,w,"focus")})}}),[a,o.domReference,i,f]);return A.useMemo(()=>l?{reference:p}:{},[l,p])}function tk(e,n,t){const i=new Map,r=t==="item";let a=e;if(r&&e){const{[A5]:o,[O5]:l,...f}=e;a=f}return{...t==="floating"&&{tabIndex:-1,[QZ]:""},...a,...n.map(o=>{const l=o?o[t]:null;return typeof l=="function"?e?l(e):null:l}).concat(e).reduce((o,l)=>(l&&Object.entries(l).forEach(f=>{let[c,h]=f;if(!(r&&[A5,O5].includes(c)))if(c.indexOf("on")===0){if(i.has(c)||i.set(c,[]),typeof h=="function"){var d;(d=i.get(c))==null||d.push(h),o[c]=function(){for(var p,v=arguments.length,y=new Array(v),w=0;wk(...y)).find(k=>k!==void 0)}}}else o[c]=h}),o),{})}}function pQ(e){e===void 0&&(e=[]);const n=e.map(l=>l==null?void 0:l.reference),t=e.map(l=>l==null?void 0:l.floating),i=e.map(l=>l==null?void 0:l.item),r=A.useCallback(l=>tk(l,e,"reference"),n),a=A.useCallback(l=>tk(l,e,"floating"),t),o=A.useCallback(l=>tk(l,e,"item"),i);return A.useMemo(()=>({getReferenceProps:r,getFloatingProps:a,getItemProps:o}),[r,a,o])}const vQ=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function gQ(e,n){var t,i;n===void 0&&(n={});const{open:r,elements:a,floatingId:o}=e,{enabled:l=!0,role:f="dialog"}=n,c=Iz(),h=((t=a.domReference)==null?void 0:t.id)||c,d=A.useMemo(()=>{var S;return((S=iZ(a.floating))==null?void 0:S.id)||o},[a.floating,o]),p=(i=vQ.get(f))!=null?i:f,y=R6()!=null,w=A.useMemo(()=>p==="tooltip"||f==="label"?{["aria-"+(f==="label"?"labelledby":"describedby")]:r?d:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":p==="alertdialog"?"dialog":p,"aria-controls":r?d:void 0,...p==="listbox"&&{role:"combobox"},...p==="menu"&&{id:h},...p==="menu"&&y&&{role:"menuitem"},...f==="select"&&{"aria-autocomplete":"none"},...f==="combobox"&&{"aria-autocomplete":"list"}},[p,d,y,r,h,f]),k=A.useMemo(()=>{const S={id:d,...p&&{role:p}};return p==="tooltip"||f==="label"?S:{...S,...p==="menu"&&{"aria-labelledby":h}}},[p,d,h,f]),_=A.useCallback(S=>{let{active:C,selected:E}=S;const O={role:"option",...C&&{id:d+"-fui-option"}};switch(f){case"select":case"combobox":return{...O,"aria-selected":E}}return{}},[d,f]);return A.useMemo(()=>l?{reference:w,floating:k,item:_}:{},[l,w,k,_])}const Fz={scrollHideDelay:1e3,type:"hover",scrollbars:"xy"},qz=(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":me(n),"--scrollarea-over-scroll-behavior":r}}},Na=Pe(e=>{const n=ye("ScrollArea",Fz,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,scrollbarSize:l,vars:f,type:c,scrollHideDelay:h,viewportProps:d,viewportRef:p,onScrollPositionChange:v,children:y,offsetScrollbars:w,scrollbars:k,onBottomReached:_,onTopReached:S,onLeftReached:C,onRightReached:E,overscrollBehavior:O,startScrollPosition:T,attributes:M,...N}=n,[F,R]=A.useState(!1),[L,B]=A.useState(!1),[G,U]=A.useState(!1),H=A.useRef(!0),P=A.useRef(!1),$=A.useRef(!0),q=A.useRef(!1),Y=Xe({name:"ScrollArea",props:n,classes:C6,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:M,vars:f,varsResolver:qz}),D=A.useRef(null),[W,V]=A.useState(null),z=Lz([p,D,A.useCallback(X=>{V(ee=>ee===X?ee:X)},[])]);return Js(w==="present"?W:null,()=>{const X=D.current;X&&(B(X.scrollHeight>X.clientHeight),U(X.scrollWidth>X.clientWidth))}),ns(()=>{T&&D.current&&D.current.scrollTo({left:T.x??0,top:T.y??0})},[]),b.jsxs(mz,{getStyles:Y,type:c==="never"?"always":c,scrollHideDelay:h,scrollbars:k,...Y("root"),...N,children:[b.jsx(Sz,{...d,...Y("viewport",{style:d==null?void 0:d.style}),ref:z,"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:X=>{var Ee;(Ee=d==null?void 0:d.onScroll)==null||Ee.call(d,X),v==null||v({x:X.currentTarget.scrollLeft,y:X.currentTarget.scrollTop});const{scrollTop:ee,scrollHeight:re,clientHeight:le,scrollLeft:be,scrollWidth:ae,clientWidth:ue}=X.currentTarget,Ce=ee-(re-le)>=-.8,ne=ee===0;Ce&&!P.current&&(_==null||_()),ne&&!H.current&&(S==null||S()),P.current=Ce,H.current=ne;const Ne=be-(ae-ue)>=-.8,pe=be===0;Ne&&!q.current&&(E==null||E()),pe&&!$.current&&(C==null||C()),q.current=Ne,$.current=pe},children:y}),(k==="xy"||k==="x")&&b.jsx(Q3,{...Y("scrollbar"),orientation:"horizontal","data-hidden":c==="never"||w==="present"&&!G?!0:void 0,forceMount:!0,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),children:b.jsx(J3,{...Y("thumb")})}),(k==="xy"||k==="y")&&b.jsx(Q3,{...Y("scrollbar"),orientation:"vertical","data-hidden":c==="never"||w==="present"&&!L?!0:void 0,forceMount:!0,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),children:b.jsx(J3,{...Y("thumb")})}),b.jsx(EX,{...Y("corner"),"data-hovered":F||void 0,"data-hidden":c==="never"||void 0})]})});Na.displayName="@mantine/core/ScrollArea";const z6=Pe(e=>{const{children:n,classNames:t,styles:i,scrollbarSize:r,scrollHideDelay:a,type:o,dir:l,offsetScrollbars:f,overscrollBehavior:c,viewportRef:h,onScrollPositionChange:d,unstyled:p,variant:v,viewportProps:y,scrollbars:w,style:k,vars:_,onBottomReached:S,onTopReached:C,startScrollPosition:E,onOverflowChange:O,...T}=ye("ScrollAreaAutosize",Fz,e),M=A.useRef(null),[N,F]=A.useState(null),R=Lz([h,M,A.useCallback(U=>{F(H=>H===U?H:U)},[])]),L=A.useRef(!1),B=A.useRef(!1),G=A.useEffectEvent(()=>{const U=M.current;if(!U||!O)return;const H=U.scrollHeight>U.clientHeight;H!==L.current&&(B.current?O(H):(B.current=!0,H&&O(!0)),L.current=H)});return Js(O?N:null,G),b.jsx(ve,{...T,variant:v,style:[{display:"flex",overflow:"hidden"},k],children:b.jsx(ve,{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:b.jsx(Na,{classNames:t,styles:i,scrollHideDelay:a,scrollbarSize:r,type:o,dir:l,offsetScrollbars:f,overscrollBehavior:c,viewportRef:R,onScrollPositionChange:d,unstyled:p,variant:v,viewportProps:y,vars:_,scrollbars:w,onBottomReached:S,onTopReached:C,startScrollPosition:E,"data-autosize":"true",children:n})})})});Na.classes=C6;Na.varsResolver=qz;z6.displayName="@mantine/core/ScrollAreaAutosize";z6.classes=C6;Na.Autosize=z6;var Hz={root:"m_87cf2631"};const yQ={__staticSelector:"UnstyledButton"},di=Ii(e=>{const n=ye("UnstyledButton",yQ,e),{className:t,component:i="button",__staticSelector:r,unstyled:a,classNames:o,styles:l,style:f,attributes:c,...h}=n;return b.jsx(ve,{...Xe({name:r,props:n,classes:Hz,className:t,style:f,classNames:o,styles:l,unstyled:a,attributes:c})("root",{focusable:!0}),component:i,type:i==="button"?"button":void 0,...h})});di.classes=Hz;di.displayName="@mantine/core/UnstyledButton";var Uz={root:"m_515a97f8"};const L6=Pe(e=>{const n=ye("VisuallyHidden",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:f,...c}=n;return b.jsx(ve,{component:"span",...Xe({name:"VisuallyHidden",classes:Uz,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:f})("root"),...c})});L6.classes=Uz;L6.displayName="@mantine/core/VisuallyHidden";var Vz={root:"m_1b7284a3"};const Wz=(e,{radius:n,shadow:t})=>({root:{"--paper-radius":n===void 0?void 0:Gt(n),"--paper-shadow":p6(t)}}),Wt=Ii(e=>{const n=ye("Paper",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,withBorder:l,vars:f,radius:c,shadow:h,variant:d,mod:p,attributes:v,...y}=n,w=Xe({name:"Paper",props:n,classes:Vz,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,vars:f,varsResolver:Wz});return b.jsx(ve,{mod:[{"data-with-border":l},p],...w("root"),variant:d,...y})});Wt.classes=Vz;Wt.varsResolver=Wz;Wt.displayName="@mantine/core/Paper";function D5(e,n,t,i){return e==="center"||i==="center"?{top:n}:e==="end"?{bottom:t}:e==="start"?{top:t}:{}}function R5(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 bQ={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function wQ({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,arrowX:a,arrowY:o,dir:l}){const[f,c="center"]=e.split("-"),h={width:n,height:n,transform:"rotate(45deg)",position:"absolute",[bQ[f]]:i},d=-n/2;return f==="left"?{...h,...D5(c,o,t,r),right:d,borderLeftColor:"transparent",borderBottomColor:"transparent",clipPath:"polygon(100% 0, 0 0, 100% 100%)"}:f==="right"?{...h,...D5(c,o,t,r),left:d,borderRightColor:"transparent",borderTopColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 100%)"}:f==="top"?{...h,...R5(c,a,t,r,l),bottom:d,borderTopColor:"transparent",borderLeftColor:"transparent",clipPath:"polygon(0 100%, 100% 100%, 100% 0)"}:f==="bottom"?{...h,...R5(c,a,t,r,l),top:d,borderBottomColor:"transparent",borderRightColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 0)"}:{}}function wg({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,visible:a,arrowX:o,arrowY:l,style:f,...c}){const{dir:h}=gu();return a?b.jsx("div",{...c,style:{...f,...wQ({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,dir:h,arrowX:o,arrowY:l})}}):null}wg.displayName="@mantine/core/FloatingArrow";function Gz(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 Yz({open:e,close:n,openDelay:t,closeDelay:i}){const r=A.useRef(-1),a=A.useRef(-1),o=()=>{window.clearTimeout(r.current),window.clearTimeout(a.current)},l=()=>{o(),t===0||t===void 0?e():r.current=window.setTimeout(e,t)},f=()=>{o(),i===0||i===void 0?n():a.current=window.setTimeout(n,i)};return A.useEffect(()=>o,[]),{openDropdown:l,closeDropdown:f}}var Kz={root:"m_9814e45f"};const kQ={zIndex:ca("modal")},Xz=(e,{gradient:n,color:t,backgroundOpacity:i,blur:r,radius:a,zIndex:o})=>({root:{"--overlay-bg":n||(t!==void 0||i!==void 0)&&Is(t||"#000",i??.6)||void 0,"--overlay-filter":r?`blur(${me(r)})`:void 0,"--overlay-radius":a===void 0?void 0:Gt(a),"--overlay-z-index":o==null?void 0:o.toString()}}),Em=Ii(e=>{const n=ye("Overlay",kQ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,fixed:f,center:c,children:h,radius:d,zIndex:p,gradient:v,blur:y,color:w,backgroundOpacity:k,mod:_,attributes:S,...C}=n;return b.jsx(ve,{...Xe({name:"Overlay",props:n,classes:Kz,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:S,vars:l,varsResolver:Xz})("root"),mod:[{center:c,fixed:f},_],...C,children:h})});Em.classes=Kz;Em.varsResolver=Xz;Em.displayName="@mantine/core/Overlay";function ik(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 _Q({target:e,reuseTargetNode:n,...t}){if(e)return typeof e=="string"?document.querySelector(e)||ik(t):e;if(n){const i=document.querySelector("[data-mantine-shared-portal-node]");if(i)return i;const r=ik(t);return r.setAttribute("data-mantine-shared-portal-node","true"),document.body.appendChild(r),r}return ik(t)}const xQ={reuseTargetNode:!0},Zz=Pe(e=>{const{children:n,target:t,reuseTargetNode:i,ref:r,...a}=ye("Portal",xQ,e),[o,l]=A.useState(!1),f=A.useRef(null);return ns(()=>(l(!0),f.current=_Q({target:t,reuseTargetNode:i,...a}),hg(r,f.current),!t&&!i&&f.current&&document.body.appendChild(f.current),()=>{!t&&!i&&f.current&&document.body.removeChild(f.current)}),[t]),!o||!f.current?null:Vs.createPortal(b.jsx(b.Fragment,{children:n}),f.current)});Zz.displayName="@mantine/core/Portal";const el=Pe(({withinPortal:e=!0,children:n,...t})=>Am()==="test"||!e?b.jsx(b.Fragment,{children:n}):b.jsx(Zz,{...t,children:n}));el.displayName="@mantine/core/OptionalPortal";const Id=e=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${e==="bottom"?10:-10}px)`},transitionProperty:"transform, opacity"}),kv={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:{...Id("bottom"),common:{transformOrigin:"center center"}},"pop-bottom-left":{...Id("bottom"),common:{transformOrigin:"bottom left"}},"pop-bottom-right":{...Id("bottom"),common:{transformOrigin:"bottom right"}},"pop-top-left":{...Id("top"),common:{transformOrigin:"top left"}},"pop-top-right":{...Id("top"),common:{transformOrigin:"top right"}}},P5={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function N5({transition:e,state:n,duration:t,timingFunction:i}){const r={WebkitBackfaceVisibility:"hidden",transitionDuration:`${t}ms`,transitionTimingFunction:i};return typeof e=="string"?e in kv?{transitionProperty:kv[e].transitionProperty,...r,...kv[e].common,...kv[e][P5[n]]}:{}:{transitionProperty:e.transitionProperty,...r,...e.common,...e[P5[n]]}}function SQ({duration:e,exitDuration:n,timingFunction:t,mounted:i,onEnter:r,onExit:a,onEntered:o,onExited:l,enterDelay:f,exitDelay:c}){const h=ii(),d=g6(),p=h.respectReducedMotion?d:!1,[v,y]=A.useState(p?0:e),[w,k]=A.useState(i?"entered":"exited"),_=A.useRef(-1),S=A.useRef(-1),C=A.useRef(-1);function E(){window.clearTimeout(_.current),window.clearTimeout(S.current),cancelAnimationFrame(C.current)}const O=M=>{E();const N=M?r:a,F=M?o:l,R=p?0:M?e:n;y(R),R===0?(typeof N=="function"&&N(),typeof F=="function"&&F(),k(M?"entered":"exited")):C.current=requestAnimationFrame(()=>{rh.flushSync(()=>{k(M?"pre-entering":"pre-exiting")}),C.current=requestAnimationFrame(()=>{typeof N=="function"&&N(),k(M?"entering":"exiting"),_.current=window.setTimeout(()=>{typeof F=="function"&&F(),k(M?"entered":"exited")},R)})})},T=M=>{if(E(),typeof(M?f:c)!="number"){O(M);return}S.current=window.setTimeout(()=>{O(M)},M?f:c)};return Go(()=>{T(i)},[i]),A.useEffect(()=>()=>{E()},[]),{transitionDuration:v,transitionStatus:w,transitionTimingFunction:t||"ease"}}function Ko({keepMounted:e,transition:n="fade",duration:t=250,exitDuration:i=t,mounted:r,children:a,timingFunction:o="ease",onExit:l,onEntered:f,onEnter:c,onExited:h,enterDelay:d,exitDelay:p}){const v=Am(),{transitionDuration:y,transitionStatus:w,transitionTimingFunction:k}=SQ({mounted:r,exitDuration:i,duration:t,timingFunction:o,onExit:l,onEntered:f,onEnter:c,onExited:h,enterDelay:d,exitDelay:p});if(v==="test")return r?b.jsx(b.Fragment,{children:a({})}):e?a({display:"none"}):null;if(y===0)return e?b.jsx(A.Activity,{mode:r?"visible":"hidden",children:a({})}):r?b.jsx(b.Fragment,{children:a({})}):null;const _=w==="exited";return e?b.jsx(A.Activity,{mode:_?"hidden":"visible",children:a(_?{}:N5({transition:n,duration:y,state:w,timingFunction:k}))}):_?null:b.jsx(b.Fragment,{children:a(N5({transition:n,duration:y,state:w,timingFunction:k}))})}Ko.displayName="@mantine/core/Transition";const CQ={duration:100,transition:"fade"};function $5(e,n){return{...CQ,...n,...e}}const[AQ,Qz]=fa("Popover component was not found in the tree");function Q1({children:e,active:n=!0,refProp:t="ref",innerRef:i}){const r=It(rK(n),i),a=pu(e);return a?A.cloneElement(a,{[t]:r}):e}function Jz(e){return b.jsx(L6,{tabIndex:-1,"data-autofocus":!0,...e})}Q1.displayName="@mantine/core/FocusTrap";Jz.displayName="@mantine/core/FocusTrapInitialFocus";Q1.InitialFocus=Jz;var eL={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};const I6=Pe(e=>{var k,_,S,C;const n=ye("PopoverDropdown",null,e),{className:t,style:i,vars:r,children:a,onKeyDownCapture:o,variant:l,classNames:f,styles:c,ref:h,...d}=n,p=Qz(),v=W$({opened:p.opened,shouldReturnFocus:p.returnFocus}),y=p.withRoles?{"aria-labelledby":p.getTargetId(),id:p.getDropdownId(),role:"dialog",tabIndex:-1}:{},w=It(h,p.floating);return p.disabled?null:b.jsx(el,{...p.portalProps,withinPortal:p.withinPortal,children:b.jsx(Ko,{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:(C=p.transitionProps)==null?void 0:C.duration,children:E=>{var O;return b.jsx(Q1,{active:p.trapFocus&&p.opened,innerRef:w,children:b.jsxs(ve,{...y,...d,variant:l,onKeyDownCapture:WY(()=>{var T,M;(T=p.onClose)==null||T.call(p),(M=p.onDismiss)==null||M.call(p)},{active:p.closeOnEscape,onTrigger:v,onKeyDown:o}),"data-position":p.placement,"data-fixed":p.floatingStrategy==="fixed"||void 0,...p.getStyles("dropdown",{className:t,props:n,classNames:f,styles:c,style:[{...E,zIndex:p.zIndex,top:p.y??0,left:p.x??0,width:p.width==="target"?void 0:me(p.width),...p.referenceHidden?{display:"none"}:null},(O=p.resolvedStyles)==null?void 0:O.dropdown,c==null?void 0:c.dropdown,i]}),children:[a,b.jsx(wg,{ref:p.arrowRef,arrowX:p.arrowX,arrowY:p.arrowY,visible:p.withArrow,position:p.placement,arrowSize:p.arrowSize,arrowRadius:p.arrowRadius,arrowOffset:p.arrowOffset,arrowPosition:p.arrowPosition,...p.getStyles("arrow",{props:n,classNames:f,styles:c})})]})})}})})});I6.classes=eL;I6.displayName="@mantine/core/PopoverDropdown";const OQ={refProp:"ref",popupType:"dialog"},nL=Pe(e=>{const{children:n,refProp:t,popupType:i,ref:r,...a}=ye("PopoverTarget",OQ,e),o=pu(n);if(!o)throw new Error("Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const l=a,f=Qz(),c=It(f.reference,F1(o),r),h=f.withRoles?{"aria-haspopup":i,"aria-expanded":f.opened,"aria-controls":f.opened?f.getDropdownId():void 0,id:f.getTargetId()}:{},d=o.props;return A.cloneElement(o,{...l,...h,...f.targetProps,className:cn(f.targetProps.className,l.className,d.className),[t]:c,...f.controlled?null:{onClick:p=>{var v;f.onToggle(),(v=d.onClick)==null||v.call(d,p)}}})});nL.displayName="@mantine/core/PopoverTarget";function EQ(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 TQ(e,n,t){const i=EQ(e.middlewares),r=[$z(e.offset),ZZ()];return e.dropdownVisible&&t!=="test"&&e.preventPositionChangeWhenVisible&&(i.flip=!1),i.flip&&r.push(typeof i.flip=="boolean"?bg():bg(i.flip)),i.shift&&r.push(D6(typeof i.shift=="boolean"?{limiter:C5(),padding:5}:{limiter:C5(),padding:5,...i.shift})),i.inline&&r.push(typeof i.inline=="boolean"?ph():ph(i.inline)),r.push(zz({element:e.arrowRef,padding:e.arrowOffset})),(i.size||e.width==="target")&&r.push(XZ({...typeof i.size=="boolean"?{}:i.size,apply({rects:a,availableWidth:o,availableHeight:l,...f}){var h;const c=((h=n().refs.floating.current)==null?void 0:h.style)??{};i.size&&(typeof i.size=="object"&&i.size.apply?i.size.apply({rects:a,availableWidth:o,availableHeight:l,...f}):Object.assign(c,{maxWidth:`${o}px`,maxHeight:`${l}px`})),e.width==="target"&&Object.assign(c,{width:`${a.reference.width}px`})}})),r}function jQ(e){const n=Am(),[t,i]=Oi({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),r=A.useRef(t),a=()=>{t&&!e.disabled&&i(!1)},o=()=>{e.disabled||i(!t)},l=$6({strategy:e.strategy,placement:e.preventPositionChangeWhenVisible?e.positionRef.current:e.position,middleware:TQ(e,()=>l,n),whileElementsMounted:e.keepMounted?void 0:aS});return A.useEffect(()=>{if(!(!l.refs.reference.current||!l.refs.floating.current)&&t)return aS(l.refs.reference.current,l.refs.floating.current,l.update)},[t,l.update]),Go(()=>{var f;(f=e.onPositionChange)==null||f.call(e,l.placement),e.positionRef.current=l.placement},[l.placement,e.preventPositionChangeWhenVisible]),Go(()=>{var f,c;t!==r.current&&(t?(c=e.onOpen)==null||c.call(e):(f=e.onClose)==null||f.call(e)),r.current=t},[t,e.onClose,e.onOpen]),ns(()=>{let f=-1;return t&&(f=window.setTimeout(()=>e.setDropdownVisible(!0),4)),()=>{window.clearTimeout(f)}},[t,e.position]),{floating:l,controlled:typeof e.opened=="boolean",opened:t,onClose:a,onToggle:o}}const MQ={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:ca("popover"),__staticSelector:"Popover",width:"max-content"},tL=(e,{radius:n,shadow:t})=>({dropdown:{"--popover-radius":n===void 0?void 0:Gt(n),"--popover-shadow":p6(t)}});function En(e){var fe,Be,pn,Je,en,Ke,jn;const n=ye("Popover",MQ,e),{children:t,position:i,offset:r,onPositionChange:a,opened:o,transitionProps:l,onExitTransitionEnd:f,onEnterTransitionEnd:c,width:h,middlewares:d,withArrow:p,arrowSize:v,arrowOffset:y,arrowRadius:w,arrowPosition:k,unstyled:_,classNames:S,styles:C,closeOnClickOutside:E,withinPortal:O,portalProps:T,closeOnEscape:M,clickOutsideEvents:N,trapFocus:F,onClose:R,onDismiss:L,onOpen:B,onChange:G,zIndex:U,radius:H,shadow:P,id:$,defaultOpened:q,__staticSelector:Y,withRoles:D,disabled:W,returnFocus:V,variant:z,keepMounted:X,vars:ee,floatingStrategy:re,withOverlay:le,overlayProps:be,hideDetached:ae,attributes:ue,preventPositionChangeWhenVisible:Ce,...ne}=n,Ne=Xe({name:Y,props:n,classes:eL,classNames:S,styles:C,unstyled:_,attributes:ue,rootSelector:"dropdown",vars:ee,varsResolver:tL}),{resolvedStyles:pe}=Li({classNames:S,styles:C,props:n}),[Ee,Re]=A.useState(o??q??!1),we=A.useRef(i),Se=A.useRef(null),[De,qe]=A.useState(null),[Ve,Ue]=A.useState(null),{dir:We}=gu(),Ye=Am(),sn=Ki($),ie=jQ({middlewares:d,width:h,position:Gz(We,i),offset:typeof r=="number"?r+(p?v/2:0):r,arrowRef:Se,arrowOffset:y,onPositionChange:a,opened:o,defaultOpened:q,onChange:G,onOpen:B,onClose:R,onDismiss:L,strategy:re,dropdownVisible:Ee,setDropdownVisible:Re,positionRef:we,disabled:W,preventPositionChangeWhenVisible:Ce,keepMounted:X});XY(()=>{E&&(ie.onClose(),L==null||L())},N,[De,Ve]);const se=A.useCallback(un=>{qe(un),ie.floating.refs.setReference(un)},[ie.floating.refs.setReference]),ke=A.useCallback(un=>{Ue(un),ie.floating.refs.setFloating(un)},[ie.floating.refs.setFloating]),Ze=A.useCallback(()=>{var un;(un=l==null?void 0:l.onExited)==null||un.call(l),f==null||f(),Re(!1),Ce||(we.current=i)},[l==null?void 0:l.onExited,f,Ce,i]),_e=A.useCallback(()=>{var un;(un=l==null?void 0:l.onEntered)==null||un.call(l),c==null||c()},[l==null?void 0:l.onEntered,c]);return b.jsxs(AQ,{value:{returnFocus:V,disabled:W,controlled:ie.controlled,reference:se,floating:ke,x:ie.floating.x,y:ie.floating.y,arrowX:(pn=(Be=(fe=ie.floating)==null?void 0:fe.middlewareData)==null?void 0:Be.arrow)==null?void 0:pn.x,arrowY:(Ke=(en=(Je=ie.floating)==null?void 0:Je.middlewareData)==null?void 0:en.arrow)==null?void 0:Ke.y,opened:ie.opened,arrowRef:Se,transitionProps:{...l,onExited:Ze,onEntered:_e},width:h,withArrow:p,arrowSize:v,arrowOffset:y,arrowRadius:w,arrowPosition:k,placement:ie.floating.placement,trapFocus:F,withinPortal:O,portalProps:T,zIndex:U,radius:H,shadow:P,closeOnEscape:M,onDismiss:L,onClose:ie.onClose,onToggle:ie.onToggle,getTargetId:()=>sn,getDropdownId:()=>`${sn}-dropdown`,withRoles:D,targetProps:ne,__staticSelector:Y,classNames:S,styles:C,unstyled:_,variant:z,keepMounted:X,getStyles:Ne,resolvedStyles:pe,floatingStrategy:re,referenceHidden:ae&&Ye!=="test"?(jn=ie.floating.middlewareData.hide)==null?void 0:jn.referenceHidden:!1},children:[t,le&&b.jsx(Ko,{transition:"fade",mounted:ie.opened,duration:(l==null?void 0:l.duration)||250,exitDuration:(l==null?void 0:l.exitDuration)||250,children:un=>b.jsx(el,{withinPortal:O,children:b.jsx(Em,{...be,...Ne("overlay",{className:be==null?void 0:be.className,style:[un,be==null?void 0:be.style]})})})})]})}En.Target=nL;En.Dropdown=I6;En.varsResolver=tL;En.displayName="@mantine/core/Popover";En.extend=e=>e;En.withProps=e=>{const n=t=>b.jsx(En,{...e,...t});return n.extend=En.extend,n.displayName=`WithProps(${En.displayName})`,n};var Ea={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 iL=({className:e,...n})=>b.jsxs(ve,{component:"span",className:cn(Ea.barsLoader,e),...n,children:[b.jsx("span",{className:Ea.bar}),b.jsx("span",{className:Ea.bar}),b.jsx("span",{className:Ea.bar})]});iL.displayName="@mantine/core/Bars";const rL=({className:e,...n})=>b.jsxs(ve,{component:"span",className:cn(Ea.dotsLoader,e),...n,children:[b.jsx("span",{className:Ea.dot}),b.jsx("span",{className:Ea.dot}),b.jsx("span",{className:Ea.dot})]});rL.displayName="@mantine/core/Dots";const aL=({className:e,...n})=>b.jsx(ve,{component:"span",className:cn(Ea.ovalLoader,e),...n});aL.displayName="@mantine/core/Oval";const oL={bars:iL,oval:aL,dots:rL},DQ={loaders:oL,type:"oval"},sL=(e,{size:n,color:t})=>({root:{"--loader-size":Tn(n,"loader-size"),"--loader-color":t?nt(t,e):void 0}}),zi=Pe(e=>{const n=ye("Loader",DQ,e),{size:t,color:i,type:r,vars:a,className:o,style:l,classNames:f,styles:c,unstyled:h,loaders:d,variant:p,children:v,attributes:y,...w}=n,k=Xe({name:"Loader",props:n,classes:Ea,className:o,style:l,classNames:f,styles:c,unstyled:h,attributes:y,vars:a,varsResolver:sL});return v?b.jsx(ve,{...k("root"),...w,children:v}):b.jsx(ve,{...k("root"),component:d[r],variant:p,size:t,...w})});zi.defaultLoaders=oL;zi.classes=Ea;zi.varsResolver=sL;zi.displayName="@mantine/core/Loader";var xc={root:"m_8d3f4000",icon:"m_8d3afb97",loader:"m_302b9fb1",group:"m_1a0f1b21",groupSection:"m_437b6484"};const z5={orientation:"horizontal"},lL=(e,{borderWidth:n})=>({group:{"--ai-border-width":me(n)}}),J1=Pe(e=>{const n=ye("ActionIconGroup",z5,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,orientation:l,vars:f,borderWidth:c,variant:h,mod:d,attributes:p,...v}=ye("ActionIconGroup",z5,e);return b.jsx(ve,{...Xe({name:"ActionIconGroup",props:n,classes:xc,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:p,vars:f,varsResolver:lL,rootSelector:"group"})("group"),variant:h,mod:[{"data-orientation":l},d],role:"group",...v})});J1.classes=xc;J1.varsResolver=lL;J1.displayName="@mantine/core/ActionIconGroup";const uL=(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":Tn(o,"section-height"),"--section-padding-x":Tn(o,"section-padding-x"),"--section-fz":Qt(o),"--section-radius":n===void 0?void 0:Gt(n),"--section-bg":t||r?l.background:void 0,"--section-color":l.color,"--section-bd":t||r?l.border:void 0}}},ey=Pe(e=>{const n=ye("ActionIconGroupSection",null,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,vars:l,variant:f,gradient:c,radius:h,autoContrast:d,attributes:p,...v}=n;return b.jsx(ve,{...Xe({name:"ActionIconGroupSection",props:n,classes:xc,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:uL,rootSelector:"groupSection"})("groupSection"),variant:f,...v})});ey.classes=xc;ey.varsResolver=uL;ey.displayName="@mantine/core/ActionIconGroupSection";const fL=(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":Tn(n,"ai-size"),"--ai-radius":t===void 0?void 0:Gt(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}}},$t=Ii(e=>{const n=ye("ActionIcon",null,e),{className:t,unstyled:i,variant:r,classNames:a,styles:o,style:l,loading:f,loaderProps:c,size:h,color:d,radius:p,__staticSelector:v,gradient:y,vars:w,children:k,disabled:_,"data-disabled":S,autoContrast:C,mod:E,attributes:O,...T}=n,M=Xe({name:["ActionIcon",v],props:n,className:t,style:l,classes:xc,classNames:a,styles:o,unstyled:i,attributes:O,vars:w,varsResolver:fL});return b.jsxs(di,{...M("root",{active:!_&&!f&&!S}),...T,unstyled:i,variant:r,size:h,disabled:_||f,mod:[{loading:f,disabled:_||S},E],children:[typeof f=="boolean"&&b.jsx(Ko,{mounted:f,transition:"slide-down",duration:150,children:N=>b.jsx(ve,{component:"span",...M("loader",{style:N}),"aria-hidden":!0,children:b.jsx(zi,{color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)",...c})})}),b.jsx(ve,{component:"span",mod:{loading:f},...M("icon"),children:k})]})});$t.classes=xc;$t.varsResolver=fL;$t.displayName="@mantine/core/ActionIcon";$t.Group=J1;$t.GroupSection=ey;function cL({size:e="var(--cb-icon-size, 70%)",style:n,...t}){return b.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...n,width:e,height:e},...t,children:b.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"})})}cL.displayName="@mantine/core/CloseIcon";var dL={root:"m_86a44da5","root--subtle":"m_220c80f2"};const RQ={variant:"subtle"},hL=(e,{size:n,radius:t,iconSize:i})=>({root:{"--cb-size":Tn(n,"cb-size"),"--cb-radius":t===void 0?void 0:Gt(t),"--cb-icon-size":me(i)}}),yu=Ii(e=>{const n=ye("CloseButton",RQ,e),{iconSize:t,children:i,vars:r,radius:a,className:o,classNames:l,style:f,styles:c,unstyled:h,"data-disabled":d,disabled:p,variant:v,icon:y,mod:w,attributes:k,__staticSelector:_,...S}=n,C=Xe({name:_||"CloseButton",props:n,className:o,style:f,classes:dL,classNames:l,styles:c,unstyled:h,attributes:k,vars:r,varsResolver:hL});return b.jsxs(di,{...S,unstyled:h,variant:v,disabled:p,mod:[{disabled:p||d},w],...C("root",{variant:v,active:!p&&!d}),children:[y||b.jsx(cL,{}),i]})});yu.classes=dL;yu.varsResolver=hL;yu.displayName="@mantine/core/CloseButton";function PQ(e){return A.Children.toArray(e).filter(Boolean)}var mL={root:"m_4081bf90"};const NQ={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},pL=(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":Ht(i),"--group-align":r,"--group-justify":a,"--group-wrap":o}}),hn=Pe(e=>{const n=ye("Group",NQ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,children:l,gap:f,align:c,justify:h,wrap:d,grow:p,preventGrowOverflow:v,vars:y,variant:w,__size:k,mod:_,attributes:S,...C}=n,E=PQ(l),O=E.length,T=Ht(f??"md");return b.jsx(ve,{...Xe({name:"Group",props:n,stylesCtx:{childWidth:`calc(${100/O}% - (${T} - ${T} / ${O}))`},className:i,style:r,classes:mL,classNames:t,styles:a,unstyled:o,attributes:S,vars:y,varsResolver:pL})("root"),variant:w,mod:[{grow:p},_],size:k,...C,children:E})});hn.classes=mL;hn.varsResolver=pL;hn.displayName="@mantine/core/Group";const[$Q,is]=fa("ModalBase component was not found in tree");function zQ({opened:e,transitionDuration:n}){const[t,i]=A.useState(e),r=A.useRef(-1),a=g6()?0:n;return A.useEffect(()=>(e?(i(!0),window.clearTimeout(r.current)):a===0?i(!1):r.current=window.setTimeout(()=>i(!1),a),()=>window.clearTimeout(r.current)),[e,a]),t}function LQ({id:e,transitionProps:n,opened:t,trapFocus:i,closeOnEscape:r,onClose:a,returnFocus:o}){const l=Ki(e),[f,c]=A.useState(!1),[h,d]=A.useState(!1),p=zQ({opened:t,transitionDuration:typeof(n==null?void 0:n.duration)=="number"?n==null?void 0:n.duration:200});return X$("keydown",v=>{var y;v.key==="Escape"&&r&&!v.isComposing&&t&&((y=v.target)==null?void 0:y.getAttribute("data-mantine-stop-propagation"))!=="true"&&a()},{capture:!0}),W$({opened:t,shouldReturnFocus:i&&o}),{_id:l,titleMounted:f,bodyMounted:h,shouldLockScroll:p,setTitleMounted:c,setBodyMounted:d}}var Wa=function(){return Wa=Object.assign||function(n){for(var t,i=1,r=arguments.length;i"u")return nJ;var n=tJ(e),t=document.documentElement.clientWidth,i=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,i-t+n[2]-n[0])}},rJ=bL(),Rf="data-scroll-locked",aJ=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(BQ,` { + overflow: hidden `).concat(i,`; + padding-right: `).concat(l,"px ").concat(i,`; + } + body[`).concat(Rf,`] { + overflow: hidden `).concat(i,`; + overscroll-behavior: contain; + `).concat([n&&"position: relative ".concat(i,";"),t==="margin"&&` + padding-left: `.concat(r,`px; + padding-top: `).concat(a,`px; + padding-right: `).concat(o,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(l,"px ").concat(i,`; + `),t==="padding"&&"padding-right: ".concat(l,"px ").concat(i,";")].filter(Boolean).join(""),` + } + + .`).concat(eg,` { + right: `).concat(l,"px ").concat(i,`; + } + + .`).concat(ng,` { + margin-right: `).concat(l,"px ").concat(i,`; + } + + .`).concat(eg," .").concat(eg,` { + right: 0 `).concat(i,`; + } + + .`).concat(ng," .").concat(ng,` { + margin-right: 0 `).concat(i,`; + } + + body[`).concat(Rf,`] { + `).concat(FQ,": ").concat(l,`px; + } +`)},I5=function(){var e=parseInt(document.body.getAttribute(Rf)||"0",10);return isFinite(e)?e:0},oJ=function(){A.useEffect(function(){return document.body.setAttribute(Rf,(I5()+1).toString()),function(){var e=I5()-1;e<=0?document.body.removeAttribute(Rf):document.body.setAttribute(Rf,e.toString())}},[])},sJ=function(e){var n=e.noRelative,t=e.noImportant,i=e.gapMode,r=i===void 0?"margin":i;oJ();var a=A.useMemo(function(){return iJ(r)},[r]);return A.createElement(rJ,{styles:aJ(a,!n,r,t?"":"!important")})},sS=!1;if(typeof window<"u")try{var _v=Object.defineProperty({},"passive",{get:function(){return sS=!0,!0}});window.addEventListener("test",_v,_v),window.removeEventListener("test",_v,_v)}catch{sS=!1}var mf=sS?{passive:!1}:!1,lJ=function(e){return e.tagName==="TEXTAREA"},wL=function(e,n){if(!(e instanceof Element))return!1;var t=window.getComputedStyle(e);return t[n]!=="hidden"&&!(t.overflowY===t.overflowX&&!lJ(e)&&t[n]==="visible")},uJ=function(e){return wL(e,"overflowY")},fJ=function(e){return wL(e,"overflowX")},B5=function(e,n){var t=n.ownerDocument,i=n;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var r=kL(e,i);if(r){var a=_L(e,i),o=a[1],l=a[2];if(o>l)return!0}i=i.parentNode}while(i&&i!==t.body);return!1},cJ=function(e){var n=e.scrollTop,t=e.scrollHeight,i=e.clientHeight;return[n,t,i]},dJ=function(e){var n=e.scrollLeft,t=e.scrollWidth,i=e.clientWidth;return[n,t,i]},kL=function(e,n){return e==="v"?uJ(n):fJ(n)},_L=function(e,n){return e==="v"?cJ(n):dJ(n)},hJ=function(e,n){return e==="h"&&n==="rtl"?-1:1},mJ=function(e,n,t,i,r){var a=hJ(e,window.getComputedStyle(n).direction),o=a*i,l=t.target,f=n.contains(l),c=!1,h=o>0,d=0,p=0;do{if(!l)break;var v=_L(e,l),y=v[0],w=v[1],k=v[2],_=w-k-a*y;(y||_)&&kL(e,l)&&(d+=_,p+=y);var S=l.parentNode;l=S&&S.nodeType===Node.DOCUMENT_FRAGMENT_NODE?S.host:S}while(!f&&l!==document.body||f&&(n.contains(l)||n===l));return(h&&Math.abs(d)<1||!h&&Math.abs(p)<1)&&(c=!0),c},xv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},F5=function(e){return[e.deltaX,e.deltaY]},q5=function(e){return e&&"current"in e?e.current:e},pJ=function(e,n){return e[0]===n[0]&&e[1]===n[1]},vJ=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},gJ=0,pf=[];function yJ(e){var n=A.useRef([]),t=A.useRef([0,0]),i=A.useRef(),r=A.useState(gJ++)[0],a=A.useState(bL)[0],o=A.useRef(e);A.useEffect(function(){o.current=e},[e]),A.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var w=IQ([e.lockRef.current],(e.shards||[]).map(q5),!0).filter(Boolean);return w.forEach(function(k){return k.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),w.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var l=A.useCallback(function(w,k){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!o.current.allowPinchZoom;var _=xv(w),S=t.current,C="deltaX"in w?w.deltaX:S[0]-_[0],E="deltaY"in w?w.deltaY:S[1]-_[1],O,T=w.target,M=Math.abs(C)>Math.abs(E)?"h":"v";if("touches"in w&&M==="h"&&T.type==="range")return!1;var N=window.getSelection(),F=N&&N.anchorNode,R=F?F===T||F.contains(T):!1;if(R)return!1;var L=B5(M,T);if(!L)return!0;if(L?O=M:(O=M==="v"?"h":"v",L=B5(M,T)),!L)return!1;if(!i.current&&"changedTouches"in w&&(C||E)&&(i.current=O),!O)return!0;var B=i.current||O;return mJ(B,k,w,B==="h"?C:E)},[]),f=A.useCallback(function(w){var k=w;if(!(!pf.length||pf[pf.length-1]!==a)){var _="deltaY"in k?F5(k):xv(k),S=n.current.filter(function(O){return O.name===k.type&&(O.target===k.target||k.target===O.shadowParent)&&pJ(O.delta,_)})[0];if(S&&S.should){k.cancelable&&k.preventDefault();return}if(!S){var C=(o.current.shards||[]).map(q5).filter(Boolean).filter(function(O){return O.contains(k.target)}),E=C.length>0?l(k,C[0]):!o.current.noIsolation;E&&k.cancelable&&k.preventDefault()}}},[]),c=A.useCallback(function(w,k,_,S){var C={name:w,delta:k,target:_,should:S,shadowParent:bJ(_)};n.current.push(C),setTimeout(function(){n.current=n.current.filter(function(E){return E!==C})},1)},[]),h=A.useCallback(function(w){t.current=xv(w),i.current=void 0},[]),d=A.useCallback(function(w){c(w.type,F5(w),w.target,l(w,e.lockRef.current))},[]),p=A.useCallback(function(w){c(w.type,xv(w),w.target,l(w,e.lockRef.current))},[]);A.useEffect(function(){return pf.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",f,mf),document.addEventListener("touchmove",f,mf),document.addEventListener("touchstart",h,mf),function(){pf=pf.filter(function(w){return w!==a}),document.removeEventListener("wheel",f,mf),document.removeEventListener("touchmove",f,mf),document.removeEventListener("touchstart",h,mf)}},[]);var v=e.removeScrollBar,y=e.inert;return A.createElement(A.Fragment,null,y?A.createElement(a,{styles:vJ(r)}):null,v?A.createElement(sJ,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function bJ(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const wJ=YQ(yL,yJ);var ru=A.forwardRef(function(e,n){return A.createElement(ny,Wa({},e,{ref:n,sideCar:wJ}))});ru.classNames=ny.classNames;function xL({keepMounted:e,opened:n,onClose:t,id:i,transitionProps:r,onExitTransitionEnd:a,onEnterTransitionEnd:o,trapFocus:l,closeOnEscape:f,returnFocus:c,closeOnClickOutside:h,withinPortal:d,portalProps:p,lockScroll:v,children:y,zIndex:w,shadow:k,padding:_,__vars:S,unstyled:C,removeScrollProps:E,...O}){const{_id:T,titleMounted:M,bodyMounted:N,shouldLockScroll:F,setTitleMounted:R,setBodyMounted:L}=LQ({id:i,transitionProps:r,opened:n,trapFocus:l,closeOnEscape:f,onClose:t,returnFocus:c}),{key:B,...G}=E||{};return b.jsx(el,{...p,withinPortal:d,children:b.jsx($Q,{value:{opened:n,onClose:t,closeOnClickOutside:h,onExitTransitionEnd:a,onEnterTransitionEnd:o,transitionProps:{...r,keepMounted:e},getTitleId:()=>`${T}-title`,getBodyId:()=>`${T}-body`,titleMounted:M,bodyMounted:N,setTitleMounted:R,setBodyMounted:L,trapFocus:l,closeOnEscape:f,zIndex:w,unstyled:C},children:b.jsx(ru,{enabled:F&&v,...G,children:b.jsx(ve,{...O,id:T,__vars:{...S,"--mb-z-index":(w||ca("modal")).toString(),"--mb-shadow":p6(k),"--mb-padding":Ht(_)},children:y})},B)})})}xL.displayName="@mantine/core/ModalBase";function kJ(){const e=is();return A.useEffect(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var qf={title:"m_615af6c9",header:"m_b5489c3c",inner:"m_60c222c7",content:"m_fd1ab0aa",close:"m_606cb269",body:"m_5df29311"};function SL({className:e,...n}){const t=kJ(),i=is();return b.jsx(ve,{id:t,className:cn({[qf.body]:!i.unstyled},e),...n})}SL.displayName="@mantine/core/ModalBaseBody";function CL({className:e,onClick:n,...t}){const i=is();return b.jsx(yu,{...t,onClick:r=>{i.onClose(),n==null||n(r)},className:cn({[qf.close]:!i.unstyled},e),unstyled:i.unstyled})}CL.displayName="@mantine/core/ModalBaseCloseButton";function AL({transitionProps:e,className:n,innerProps:t,onKeyDown:i,style:r,ref:a,...o}){const l=is();return b.jsx(Ko,{mounted:l.opened,transition:"pop",...l.transitionProps,onExited:()=>{var f,c,h;(f=l.onExitTransitionEnd)==null||f.call(l),(h=(c=l.transitionProps)==null?void 0:c.onExited)==null||h.call(c)},onEntered:()=>{var f,c,h;(f=l.onEnterTransitionEnd)==null||f.call(l),(h=(c=l.transitionProps)==null?void 0:c.onEntered)==null||h.call(c)},...e,children:f=>b.jsx("div",{...t,className:cn({[qf.inner]:!l.unstyled},t.className),children:b.jsx(Q1,{active:l.opened&&l.trapFocus,innerRef:a,children:b.jsx(Wt,{...o,component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":l.bodyMounted?l.getBodyId():void 0,"aria-labelledby":l.titleMounted?l.getTitleId():void 0,style:[r,f],className:cn({[qf.content]:!l.unstyled},n),unstyled:l.unstyled,children:o.children})})})})}AL.displayName="@mantine/core/ModalBaseContent";function OL({className:e,...n}){const t=is();return b.jsx(ve,{component:"header",className:cn({[qf.header]:!t.unstyled},e),...n})}OL.displayName="@mantine/core/ModalBaseHeader";const _J={duration:200,timingFunction:"ease",transition:"fade"};function xJ(e){const n=is();return{..._J,...n.transitionProps,...e}}function EL({onClick:e,transitionProps:n,style:t,visible:i,...r}){const a=is(),o=xJ(n);return b.jsx(Ko,{mounted:i!==void 0?i:a.opened,...o,transition:"fade",children:l=>b.jsx(Em,{fixed:!0,style:[t,l],zIndex:a.zIndex,unstyled:a.unstyled,onClick:f=>{e==null||e(f),a.closeOnClickOutside&&a.onClose()},...r})})}EL.displayName="@mantine/core/ModalBaseOverlay";function SJ(){const e=is();return A.useEffect(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}function TL({className:e,...n}){const t=SJ(),i=is();return b.jsx(ve,{component:"h2",className:cn({[qf.title]:!i.unstyled},e),id:t,...n})}TL.displayName="@mantine/core/ModalBaseTitle";function CJ({children:e}){return b.jsx(b.Fragment,{children:e})}const jL=A.createContext({size:"sm"}),ML=Pe(e=>{const n=ye("InputClearButton",null,e),{size:t,variant:i,vars:r,classNames:a,styles:o,...l}=n,f=A.use(jL),{resolvedClassNames:c,resolvedStyles:h}=Li({classNames:a,styles:o,props:n});return b.jsx(yu,{variant:i||"transparent",size:t||(f==null?void 0:f.size)||"sm",classNames:c,styles:h,__staticSelector:"InputClearButton",style:{pointerEvents:"all",background:"var(--input-bg)",...l.style},...l})});ML.displayName="@mantine/core/InputClearButton";const AJ={xs:7,sm:8,md:10,lg:12,xl:15};function OJ({__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)?b.jsxs("div",{"data-combined-clear-section":!0,style:{display:"flex",gap:2,alignItems:"center",paddingInlineEnd:AJ[r]},children:[o,t||i]}):t===null?null:t||o||i}const bu=A.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0});var ma={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 DL=(e,{size:n})=>({description:{"--input-description-size":n===void 0?void 0:`calc(${Qt(n)} - ${me(2)})`}}),Tm=Pe(e=>{const n=ye("InputDescription",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,__inheritStyles:c=!0,attributes:h,...d}=ye("InputDescription",null,n),p=A.use(bu),v=Xe({name:["InputWrapper",f],props:n,classes:ma,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,rootSelector:"description",vars:l,varsResolver:DL});return b.jsx(ve,{component:"p",...(c&&(p==null?void 0:p.getStyles)||v)("description",p!=null&&p.getStyles?{className:i,style:r}:void 0),...d})});Tm.classes=ma;Tm.varsResolver=DL;Tm.displayName="@mantine/core/InputDescription";const RL=(e,{size:n})=>({error:{"--input-error-size":n===void 0?void 0:`calc(${Qt(n)} - ${me(2)})`}}),jm=Pe(e=>{const n=ye("InputError",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:f,__staticSelector:c,__inheritStyles:h=!0,...d}=n,p=Xe({name:["InputWrapper",c],props:n,classes:ma,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:f,rootSelector:"error",vars:l,varsResolver:RL}),v=A.use(bu);return b.jsx(ve,{component:"p",...(h&&(v==null?void 0:v.getStyles)||p)("error",v!=null&&v.getStyles?{className:i,style:r}:void 0),...d})});jm.classes=ma;jm.varsResolver=RL;jm.displayName="@mantine/core/InputError";const EJ={labelElement:"label"},PL=(e,{size:n})=>({label:{"--input-label-size":Qt(n),"--input-asterisk-color":void 0}}),Mm=Pe(e=>{const n=ye("InputLabel",EJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,labelElement:f,required:c,htmlFor:h,onMouseDown:d,children:p,__staticSelector:v,mod:y,attributes:w,...k}=n,_=Xe({name:["InputWrapper",v],props:n,classes:ma,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,rootSelector:"label",vars:l,varsResolver:PL}),S=A.use(bu),C=(S==null?void 0:S.getStyles)||_;return b.jsxs(ve,{...C("label",S!=null&&S.getStyles?{className:i,style:r}:void 0),component:f,htmlFor:f==="label"?h:void 0,mod:[{required:c},y],onMouseDown:E=>{d==null||d(E),!E.defaultPrevented&&E.detail>1&&E.preventDefault()},...k,children:[p,c&&b.jsx("span",{...C("required"),"aria-hidden":!0,children:" *"})]})});Mm.classes=ma;Mm.varsResolver=PL;Mm.displayName="@mantine/core/InputLabel";const B6=Pe(e=>{const n=ye("InputPlaceholder",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,error:c,mod:h,attributes:d,...p}=n;return b.jsx(ve,{...Xe({name:["InputPlaceholder",f],props:n,classes:ma,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:d,rootSelector:"placeholder"})("placeholder"),mod:[{error:!!c},h],component:"span",...p})});B6.classes=ma;B6.displayName="@mantine/core/InputPlaceholder";function TJ(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 jJ={labelElement:"label",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},NL=(e,{size:n})=>({label:{"--input-label-size":Qt(n),"--input-asterisk-color":void 0},error:{"--input-error-size":n===void 0?void 0:`calc(${Qt(n)} - ${me(2)})`},description:{"--input-description-size":n===void 0?void 0:`calc(${Qt(n)} - ${me(2)})`}}),ty=Pe(e=>{const n=ye("InputWrapper",jJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:f,variant:c,__staticSelector:h,inputContainer:d,inputWrapperOrder:p,label:v,error:y,description:w,labelProps:k,descriptionProps:_,errorProps:S,labelElement:C,children:E,withAsterisk:O,id:T,required:M,__stylesApiProps:N,mod:F,attributes:R,...L}=n,B=Xe({name:["InputWrapper",h],props:N||n,classes:ma,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:R,vars:l,varsResolver:NL}),G={size:f,variant:c,__staticSelector:h},U=Ki(T),H=typeof O=="boolean"?O:M,P=(S==null?void 0:S.id)||`${U}-error`,$=(_==null?void 0:_.id)||`${U}-description`,q=U,Y=!!y&&typeof y!="boolean",D=!!w,W=`${Y?P:""} ${D?$:""}`,V=W.trim().length>0?W.trim():void 0,z=(k==null?void 0:k.id)||`${U}-label`,X=v&&b.jsx(Mm,{labelElement:C,id:z,htmlFor:q,required:H,...G,...k,children:v},"label"),ee=D&&b.jsx(Tm,{..._,...G,size:(_==null?void 0:_.size)||G.size,id:(_==null?void 0:_.id)||$,children:w},"description"),re=b.jsx(A.Fragment,{children:d(E)},"input"),le=Y&&A.createElement(jm,{...S,...G,size:(S==null?void 0:S.size)||G.size,key:"error",id:(S==null?void 0:S.id)||P},y),be=p.map(ae=>{switch(ae){case"label":return X;case"input":return re;case"description":return ee;case"error":return le;default:return null}});return b.jsx(bu,{value:{getStyles:B,describedBy:V,inputId:q,labelId:z,...TJ(p,{hasDescription:D,hasError:Y})},children:b.jsx(ve,{variant:c,size:f,mod:[{error:!!y},F],id:C==="label"?void 0:T,...B("root"),...L,children:be})})});ty.classes=ma;ty.varsResolver=NL;ty.displayName="@mantine/core/InputWrapper";const MJ={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0,size:"sm",loading:!1,loadingPosition:"right"},$L=(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":Tn(n.size,"input-height"),"--input-fz":Qt(n.size),"--input-radius":n.radius===void 0?void 0:Gt(n.radius),"--input-left-section-width":n.leftSectionWidth!==void 0?me(n.leftSectionWidth):void 0,"--input-right-section-width":n.rightSectionWidth!==void 0?me(n.rightSectionWidth):void 0,"--input-padding-y":n.multiline?Tn(n.size,"input-padding-y"):void 0,"--input-left-section-pointer-events":n.leftSectionPointerEvents,"--input-right-section-pointer-events":n.rightSectionPointerEvents}}),Lt=Ii(e=>{const n=ye("Input",MJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,required:l,__staticSelector:f,__stylesApiProps:c,size:h,wrapperProps:d,error:p,disabled:v,leftSection:y,leftSectionProps:w,leftSectionWidth:k,rightSection:_,rightSectionProps:S,rightSectionWidth:C,rightSectionPointerEvents:E,leftSectionPointerEvents:O,variant:T,vars:M,pointer:N,multiline:F,radius:R,id:L,withAria:B,withErrorStyles:G,mod:U,inputSize:H,attributes:P,__clearSection:$,__clearable:q,__clearSectionMode:Y,__defaultRightSection:D,loading:W,loadingPosition:V,rootRef:z,...X}=n,{styleProps:ee,rest:re}=vu(X),le=A.use(bu),be={offsetBottom:le==null?void 0:le.offsetBottom,offsetTop:le==null?void 0:le.offsetTop},ae=Xe({name:["Input",f],props:c||n,classes:ma,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:P,stylesCtx:be,rootSelector:"wrapper",vars:M,varsResolver:$L}),ue=B?{required:l,disabled:v,"aria-invalid":p?!0:void 0,"aria-describedby":le==null?void 0:le.describedBy,id:(le==null?void 0:le.inputId)||L}:{},Ce=W?b.jsx(zi,{size:V==="left"?"calc(var(--input-left-section-size) / 2)":"calc(var(--input-right-section-size) / 2)"}):null,ne=W&&V==="left"?Ce:y,Ne=OJ({__clearable:q,__clearSection:$,rightSection:W&&V==="right"?Ce:_,__defaultRightSection:D,size:h,__clearSectionMode:Y});return b.jsx(jL,{value:{size:h||"sm"},children:b.jsxs(ve,{ref:z,...ae("wrapper"),...ee,...d,mod:[{error:!!p&&G,pointer:N,disabled:v,multiline:F,"data-with-right-section":!!Ne,"data-with-left-section":!!ne},U],variant:T,size:h,children:[ne&&b.jsx("div",{...w,"data-position":"left",...ae("section",{className:w==null?void 0:w.className,style:w==null?void 0:w.style}),children:ne}),b.jsx(ve,{component:"input",...re,...ue,required:l,mod:{disabled:v,error:!!p&&G},variant:T,__size:H,...ae("input")}),Ne&&b.jsx("div",{...S,"data-position":"right",...ae("section",{className:S==null?void 0:S.className,style:S==null?void 0:S.style}),children:Ne})]})})});Lt.classes=ma;Lt.varsResolver=$L;Lt.Wrapper=ty;Lt.Label=Mm;Lt.Error=jm;Lt.Description=Tm;Lt.Placeholder=B6;Lt.ClearButton=ML;Lt.displayName="@mantine/core/Input";function zL(e,n,t){const i=ye(e,n,t),{label:r,description:a,error:o,required:l,classNames:f,styles:c,className:h,unstyled:d,__staticSelector:p,__stylesApiProps:v,errorProps:y,labelProps:w,descriptionProps:k,wrapperProps:_,id:S,size:C,style:E,inputContainer:O,inputWrapperOrder:T,withAsterisk:M,variant:N,vars:F,mod:R,attributes:L,...B}=i,{styleProps:G,rest:U}=vu(B),H={label:r,description:a,error:o,required:l,classNames:f,className:h,__staticSelector:p,__stylesApiProps:v||i,errorProps:y,labelProps:w,descriptionProps:k,unstyled:d,styles:c,size:C,style:E,inputContainer:O,inputWrapperOrder:T,withAsterisk:M,variant:N,id:S,mod:R,attributes:L,..._};return{...U,classNames:f,styles:c,unstyled:d,wrapperProps:{...H,...G},inputProps:{required:l,classNames:f,styles:c,unstyled:d,size:C,__staticSelector:p,__stylesApiProps:v||i,error:o,variant:N,id:S,attributes:L}}}const DJ={__staticSelector:"InputBase",withAria:!0,size:"sm"},Bi=Ii(e=>{const{inputProps:n,wrapperProps:t,...i}=zL("InputBase",DJ,e);return b.jsx(Lt.Wrapper,{...t,children:b.jsx(Lt,{...n,...i})})});Bi.classes={...Lt.classes,...Lt.Wrapper.classes};Bi.displayName="@mantine/core/InputBase";function kg({style:e,size:n=16,...t}){return b.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...e,width:me(n),height:me(n),display:"block"},...t,children:b.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"})})}kg.displayName="@mantine/core/AccordionChevron";var LL={root:"m_b6d8b162"};function RJ(e){if(e==="start")return"start";if(e==="end"||e)return"end"}const PJ={inherit:!1},IL=(e,{variant:n,lineClamp:t,gradient:i,size:r})=>({root:{"--text-fz":Qt(r),"--text-lh":GY(r),"--text-gradient":n==="gradient"?X3(i,e):void 0,"--text-line-clamp":typeof t=="number"?t.toString():void 0}}),Qe=Ii(e=>{const n=ye("Text",PJ,e),{lineClamp:t,truncate:i,inline:r,inherit:a,gradient:o,span:l,__staticSelector:f,vars:c,className:h,style:d,classNames:p,styles:v,unstyled:y,variant:w,mod:k,size:_,attributes:S,...C}=n;return b.jsx(ve,{...Xe({name:["Text",f],props:n,classes:LL,className:h,style:d,classNames:p,styles:v,unstyled:y,attributes:S,vars:c,varsResolver:IL})("root",{focusable:!0}),component:l?"span":"p",variant:w,mod:[{"data-truncate":RJ(i),"data-line-clamp":typeof t=="number","data-inline":r,"data-inherit":a},k],size:_,...C})});Qe.classes=LL;Qe.varsResolver=IL;Qe.displayName="@mantine/core/Text";var BL={root:"m_849cf0da"};const NJ={underline:"hover"},iy=Ii(e=>{const{underline:n,className:t,unstyled:i,mod:r,...a}=ye("Anchor",NJ,e);return b.jsx(Qe,{component:"a",className:cn({[BL.root]:!i},t),...a,mod:[{underline:n},r],__staticSelector:"Anchor",unstyled:i})});iy.classes=BL;iy.displayName="@mantine/core/Anchor";const[$J,Sc]=fa("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 F6=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:f,mod:c,...h}=ye("AppShellAside",null,e),d=Sc();return d.disabled?null:b.jsx(ve,{component:"aside",mod:[{"with-border":l??d.withBorder},c],...d.getStyles("aside",{className:cn({[ru.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-aside-z-index":`calc(${f??d.zIndex} + 1)`}})});F6.classes=al;F6.displayName="@mantine/core/AppShellAside";const q6=Pe(e=>{var p;const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:f,mod:c,...h}=ye("AppShellFooter",null,e),d=Sc();return d.disabled?null:b.jsx(ve,{component:"footer",mod:[{"with-border":l??d.withBorder},c],...d.getStyles("footer",{className:cn({[ru.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-footer-z-index":(p=f??d.zIndex)==null?void 0:p.toString()}})});q6.classes=al;q6.displayName="@mantine/core/AppShellFooter";const H6=Pe(e=>{var p;const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:f,mod:c,...h}=ye("AppShellHeader",null,e),d=Sc();return d.disabled?null:b.jsx(ve,{component:"header",mod:[{"with-border":l??d.withBorder},c],...d.getStyles("header",{className:cn({[ru.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-header-z-index":(p=f??d.zIndex)==null?void 0:p.toString()}})});H6.classes=al;H6.displayName="@mantine/core/AppShellHeader";const U6=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("AppShellMain",null,e);return b.jsx(ve,{component:"main",...Sc().getStyles("main",{className:t,style:i,classNames:n,styles:r}),...o})});U6.classes=al;U6.displayName="@mantine/core/AppShellMain";const V6=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:f,mod:c,...h}=ye("AppShellNavbar",null,e),d=Sc();return d.disabled?null:b.jsx(ve,{component:"nav",mod:[{"with-border":l??d.withBorder},c],...d.getStyles("navbar",{className:t,classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-navbar-z-index":`calc(${f??d.zIndex} + 1)`}})});V6.classes=al;V6.displayName="@mantine/core/AppShellNavbar";const W6=Ii(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,grow:o,mod:l,...f}=ye("AppShellSection",null,e),c=Sc();return b.jsx(ve,{mod:[{grow:o},l],...c.getStyles("section",{className:t,style:i,classNames:n,styles:r}),...f})});W6.classes=al;W6.displayName="@mantine/core/AppShellSection";function Dm(e){return typeof e=="object"?e.base:e}function Rm(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 Pm(e){return!(typeof e!="object"||e===null||Object.keys(e).length===1&&"base"in e)}function zJ({baseStyles:e,minMediaStyles:n,maxMediaStyles:t,aside:i,theme:r,mode:a}){var c,h,d;const o=i==null?void 0:i.width,l="translateX(var(--app-shell-aside-width))",f="translateX(calc(var(--app-shell-aside-width) * -1))";if(i!=null&&i.breakpoint&&!((c=i==null?void 0:i.collapsed)!=null&&c.mobile)&&(t[i==null?void 0:i.breakpoint]=t[i==null?void 0:i.breakpoint]||{},a==="fixed"?(t[i==null?void 0:i.breakpoint]["--app-shell-aside-width"]="100%",t[i==null?void 0:i.breakpoint]["--app-shell-aside-offset"]="0px"):(t[i==null?void 0:i.breakpoint]["--app-shell-aside-width"]="0px",t[i==null?void 0:i.breakpoint]["--app-shell-aside-offset"]="0px")),Rm(o)){const p=me(Dm(o));e["--app-shell-aside-width"]=p,e["--app-shell-aside-offset"]=p}if(Pm(o)&&(typeof o.base<"u"&&(e["--app-shell-aside-width"]=me(o.base),e["--app-shell-aside-offset"]=me(o.base)),At(o).forEach(p=>{p!=="base"&&(n[p]=n[p]||{},n[p]["--app-shell-aside-width"]=me(o[p]),n[p]["--app-shell-aside-offset"]=me(o[p]))})),i!=null&&i.breakpoint&&a==="static"&&(n[i.breakpoint]=n[i.breakpoint]||{},n[i.breakpoint]["--app-shell-aside-position"]="sticky",n[i.breakpoint]["--app-shell-aside-grid-row"]="2",n[i.breakpoint]["--app-shell-aside-grid-column"]="3",n[i.breakpoint]["--app-shell-main-column-end"]="3"),(h=i==null?void 0:i.collapsed)!=null&&h.desktop){const p=i.breakpoint;n[p]=n[p]||{},n[p]["--app-shell-aside-transform"]=l,n[p]["--app-shell-aside-transform-rtl"]=f,a==="fixed"?n[p]["--app-shell-aside-offset"]="0px !important":(n[p]["--app-shell-aside-width"]="0px",n[p]["--app-shell-aside-display"]="none",n[p]["--app-shell-main-column-end"]="-1"),n[p]["--app-shell-aside-scroll-locked-visibility"]="hidden"}if((d=i==null?void 0:i.collapsed)!=null&&d.mobile){const p=v6(i.breakpoint,r.breakpoints)-.1;t[p]=t[p]||{},a==="fixed"?(t[p]["--app-shell-aside-width"]="100%",t[p]["--app-shell-aside-offset"]="0px"):t[p]["--app-shell-aside-width"]="0px",t[p]["--app-shell-aside-transform"]=l,t[p]["--app-shell-aside-transform-rtl"]=f,t[p]["--app-shell-aside-scroll-locked-visibility"]="hidden"}}function LJ({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"),Rm(r)){const l=me(Dm(r));e["--app-shell-footer-height"]=l,o&&(e["--app-shell-footer-offset"]=l)}Pm(r)&&(typeof r.base<"u"&&(e["--app-shell-footer-height"]=me(r.base),o&&(e["--app-shell-footer-offset"]=me(r.base))),At(r).forEach(l=>{l!=="base"&&(n[l]=n[l]||{},n[l]["--app-shell-footer-height"]=me(r[l]),o&&(n[l]["--app-shell-footer-offset"]=me(r[l])))})),t!=null&&t.collapsed&&(e["--app-shell-footer-transform"]=a,i==="fixed"&&(e["--app-shell-footer-offset"]="0px !important"))}function IJ({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"),Rm(r)){const l=me(Dm(r));e["--app-shell-header-height"]=l,o&&(e["--app-shell-header-offset"]=l)}Pm(r)&&(typeof r.base<"u"&&(e["--app-shell-header-height"]=me(r.base),o&&(e["--app-shell-header-offset"]=me(r.base))),At(r).forEach(l=>{l!=="base"&&(n[l]=n[l]||{},n[l]["--app-shell-header-height"]=me(r[l]),o&&(n[l]["--app-shell-header-offset"]=me(r[l])))})),t!=null&&t.collapsed&&(e["--app-shell-header-transform"]=a,i==="fixed"&&(e["--app-shell-header-offset"]="0px !important"))}function BJ({baseStyles:e,minMediaStyles:n,maxMediaStyles:t,navbar:i,theme:r,mode:a}){var c,h,d;const o=i==null?void 0:i.width,l="translateX(calc(var(--app-shell-navbar-width) * -1))",f="translateX(var(--app-shell-navbar-width))";if(i!=null&&i.breakpoint&&!((c=i==null?void 0:i.collapsed)!=null&&c.mobile)&&(t[i==null?void 0:i.breakpoint]=t[i==null?void 0:i.breakpoint]||{},t[i==null?void 0:i.breakpoint]["--app-shell-navbar-offset"]="0px",t[i==null?void 0:i.breakpoint]["--app-shell-navbar-width"]="100%",a==="static"&&(t[i==null?void 0:i.breakpoint]["--app-shell-navbar-grid-width"]="0px")),Rm(o)){const p=me(Dm(o));e["--app-shell-navbar-width"]=p,e["--app-shell-navbar-offset"]=p,a==="static"&&(e["--app-shell-navbar-grid-width"]=p)}if(Pm(o)&&(typeof o.base<"u"&&(e["--app-shell-navbar-width"]=me(o.base),e["--app-shell-navbar-offset"]=me(o.base),a==="static"&&(e["--app-shell-navbar-grid-width"]=me(o.base))),At(o).forEach(p=>{p!=="base"&&(n[p]=n[p]||{},n[p]["--app-shell-navbar-width"]=me(o[p]),n[p]["--app-shell-navbar-offset"]=me(o[p]),a==="static"&&(n[p]["--app-shell-navbar-grid-width"]=me(o[p])))})),i!=null&&i.breakpoint&&a==="static"&&(n[i.breakpoint]=n[i.breakpoint]||{},n[i.breakpoint]["--app-shell-navbar-position"]="sticky",n[i.breakpoint]["--app-shell-navbar-grid-row"]="2",n[i.breakpoint]["--app-shell-navbar-grid-column"]="1",n[i.breakpoint]["--app-shell-main-column-start"]="2"),(h=i==null?void 0:i.collapsed)!=null&&h.desktop){const p=i.breakpoint;n[p]=n[p]||{},n[p]["--app-shell-navbar-transform"]=l,n[p]["--app-shell-navbar-transform-rtl"]=f,a==="fixed"?n[p]["--app-shell-navbar-offset"]="0px !important":(n[p]["--app-shell-navbar-width"]="0px",n[p]["--app-shell-navbar-display"]="none",n[p]["--app-shell-main-column-start"]="1")}if((d=i==null?void 0:i.collapsed)!=null&&d.mobile){const p=v6(i.breakpoint,r.breakpoints)-.1;t[p]=t[p]||{},t[p]["--app-shell-navbar-width"]="100%",t[p]["--app-shell-navbar-offset"]="0px",a==="static"&&(t[p]["--app-shell-navbar-grid-width"]="0px"),t[p]["--app-shell-navbar-transform"]=l,t[p]["--app-shell-navbar-transform-rtl"]=f}}function sk(e){return Number(e)===0?"0px":Ht(e)}function FJ({padding:e,baseStyles:n,minMediaStyles:t}){Rm(e)&&(n["--app-shell-padding"]=sk(Dm(e))),Pm(e)&&(e.base&&(n["--app-shell-padding"]=sk(e.base)),At(e).forEach(i=>{i!=="base"&&(t[i]=t[i]||{},t[i]["--app-shell-padding"]=sk(e[i]))}))}function qJ({navbar:e,header:n,footer:t,aside:i,padding:r,theme:a,mode:o}){const l={},f={},c={};o==="static"&&(c["--app-shell-main-grid-column"]="1 / -1",c["--app-shell-main-grid-row"]="2"),BJ({baseStyles:c,minMediaStyles:l,maxMediaStyles:f,navbar:e,theme:a,mode:o}),zJ({baseStyles:c,minMediaStyles:l,maxMediaStyles:f,aside:i,theme:a,mode:o}),IJ({baseStyles:c,minMediaStyles:l,header:n,mode:o}),LJ({baseStyles:c,minMediaStyles:l,footer:t,mode:o}),FJ({baseStyles:c,minMediaStyles:l,padding:r});const h=Th(At(l),a.breakpoints).map(p=>({query:`(min-width: ${cg(p.px)})`,styles:l[p.value]})),d=Th(At(f),a.breakpoints).map(p=>({query:`(max-width: ${cg(p.px)})`,styles:f[p.value]}));return{baseStyles:c,media:[...h,...d]}}function HJ({navbar:e,header:n,aside:t,footer:i,padding:r,mode:a,selector:o}){const l=ii(),f=oo(),{media:c,baseStyles:h}=qJ({navbar:e,header:n,footer:i,aside:t,padding:r,theme:l,mode:a});return b.jsx(wc,{media:c,styles:h,selector:o||f.cssVariablesSelector})}function UJ({transitionDuration:e,disabled:n}){const[t,i]=A.useState(!0),r=A.useRef(-1),a=A.useRef(-1);return X$("resize",()=>{i(!0),clearTimeout(r.current),r.current=window.setTimeout(()=>A.startTransition(()=>{i(!1)}),200)}),ns(()=>{i(!0),clearTimeout(a.current),a.current=window.setTimeout(()=>A.startTransition(()=>{i(!1)}),e||0)},[n,e]),t}const VJ={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:"ease",zIndex:ca("app"),mode:"fixed"},FL=(e,{transitionDuration:n,transitionTimingFunction:t})=>({root:{"--app-shell-transition-duration":`${n}ms`,"--app-shell-transition-timing-function":t}}),hr=Pe(e=>{const n=ye("AppShell",VJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,navbar:f,withBorder:c,padding:h,transitionDuration:d,transitionTimingFunction:p,header:v,zIndex:y,layout:w,disabled:k,aside:_,footer:S,offsetScrollbars:C=!0,mode:E,mod:O,attributes:T,id:M,...N}=n,F=Xe({name:"AppShell",classes:al,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:T,vars:l,varsResolver:FL}),R=UJ({disabled:k,transitionDuration:d}),L=Ki(M);return b.jsxs($J,{value:{getStyles:F,withBorder:c,zIndex:y,disabled:k,offsetScrollbars:C,mode:E},children:[b.jsx(HJ,{navbar:f,header:v,aside:_,footer:S,padding:h,mode:E,selector:E==="static"?`#${L}`:void 0}),b.jsx(ve,{...F("root"),id:L,mod:[{resizing:R,layout:w,disabled:k,mode:E},O],...N})]})});hr.classes=al;hr.varsResolver=FL;hr.displayName="@mantine/core/AppShell";hr.Navbar=V6;hr.Header=H6;hr.Main=U6;hr.Aside=F6;hr.Footer=q6;hr.Section=W6;function qL(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=>qL(n))}:typeof e=="number"||typeof e=="bigint"||typeof e=="boolean"?{value:e,label:`${e}`}:e}function ry(e){return e?e.map(n=>qL(n)):[]}function Nm(e){return e.reduce((n,t)=>"group"in t?{...n,...Nm(t.items)}:(n[`${t.value}`]=t,n),{})}var tr={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 WJ={error:null},HL=(e,{size:n,color:t})=>({chevron:{"--combobox-chevron-size":Tn(n,"combobox-chevron-size"),"--combobox-chevron-color":t?nt(t,e):void 0}}),ay=Pe(e=>{const n=ye("ComboboxChevron",WJ,e),{size:t,error:i,style:r,className:a,classNames:o,styles:l,unstyled:f,vars:c,attributes:h,mod:d,...p}=n,v=Xe({name:"ComboboxChevron",classes:tr,props:n,style:r,className:a,classNames:o,styles:l,unstyled:f,vars:c,varsResolver:HL,attributes:h,rootSelector:"chevron"});return b.jsx(ve,{component:"svg",...p,...v("chevron"),size:t,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:i},d],children:b.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"})})});ay.classes=tr;ay.varsResolver=HL;ay.displayName="@mantine/core/ComboboxChevron";const[GJ,pa]=fa("Combobox component was not found in tree");function UL({onMouseDown:e,onClick:n,onClear:t,...i}){return b.jsx(Lt.ClearButton,{tabIndex:-1,"aria-hidden":!0,...i,onMouseDown:r=>{r.preventDefault(),e==null||e(r)},onClick:r=>{t(),n==null||n(r)}})}UL.displayName="@mantine/core/ComboboxClearButton";const G6=Pe(e=>{const{classNames:n,styles:t,className:i,style:r,hidden:a,...o}=ye("ComboboxDropdown",null,e),l=pa();return b.jsx(En.Dropdown,{...o,role:"presentation","data-hidden":a||void 0,...l.getStyles("dropdown",{className:i,style:r,classNames:n,styles:t})})});G6.classes=tr;G6.displayName="@mantine/core/ComboboxDropdown";const YJ={refProp:"ref"},VL=Pe(e=>{const{children:n,refProp:t,ref:i}=ye("ComboboxDropdownTarget",YJ,e);if(pa(),!h6(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 b.jsx(En.Target,{ref:i,refProp:t,children:n})});VL.displayName="@mantine/core/ComboboxDropdownTarget";const Y6=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("ComboboxEmpty",null,e);return b.jsx(ve,{...pa().getStyles("empty",{className:t,classNames:n,styles:r,style:i}),...o})});Y6.classes=tr;Y6.displayName="@mantine/core/ComboboxEmpty";function K6({onKeyDown:e,onClick:n,withKeyboardNavigation:t,withAriaAttributes:i,withExpandedAttribute:r,targetType:a,autoComplete:o}){const l=pa(),[f,c]=A.useState(null),h=v=>{if(e==null||e(v),!l.readOnly&&t){if(v.nativeEvent.isComposing)return;if(v.nativeEvent.code==="ArrowDown"&&(v.preventDefault(),l.store.dropdownOpened?c(l.store.selectNextOption()):(l.store.openDropdown("keyboard"),c(l.store.selectActiveOption()),l.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),v.nativeEvent.code==="ArrowUp"&&(v.preventDefault(),l.store.dropdownOpened?c(l.store.selectPreviousOption()):(l.store.openDropdown("keyboard"),c(l.store.selectActiveOption()),l.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),v.nativeEvent.code==="Enter"||v.nativeEvent.code==="NumpadEnter"){if(v.nativeEvent.keyCode===229)return;const y=l.store.getSelectedOptionIndex();l.store.dropdownOpened&&y!==-1?(v.preventDefault(),l.store.clickSelectedOption()):a==="button"&&(v.preventDefault(),l.store.openDropdown("keyboard"))}v.key==="Escape"&&l.store.closeDropdown("keyboard"),v.nativeEvent.code==="Space"&&a==="button"&&(v.preventDefault(),l.store.toggleDropdown("keyboard"))}};return{...i?{...r?{role:"combobox"}:{},"aria-haspopup":"listbox","aria-expanded":r?!!(l.store.listId&&l.store.dropdownOpened):void 0,"aria-controls":l.store.dropdownOpened&&l.store.listId?l.store.listId:void 0,"aria-activedescendant":l.store.dropdownOpened&&f||void 0,autoComplete:o,"data-expanded":l.store.dropdownOpened||void 0,"data-mantine-stop-propagation":l.store.dropdownOpened||void 0}:{},onKeyDown:h,onClick:v=>{a==="button"&&v.currentTarget.focus(),n==null||n(v)}}}const KJ={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},WL=Pe(e=>{const{children:n,refProp:t,withKeyboardNavigation:i,withAriaAttributes:r,withExpandedAttribute:a,targetType:o,autoComplete:l,ref:f,...c}=ye("ComboboxEventsTarget",KJ,e),h=pu(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=pa();return A.cloneElement(h,{...K6({targetType:o,withAriaAttributes:r,withKeyboardNavigation:i,withExpandedAttribute:a,onKeyDown:h.props.onKeyDown,onClick:h.props.onClick,autoComplete:l}),...c,[t]:It(f,d.store.targetRef,F1(h))})});WL.displayName="@mantine/core/ComboboxEventsTarget";const X6=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("ComboboxFooter",null,e);return b.jsx(ve,{...pa().getStyles("footer",{className:t,classNames:n,style:i,styles:r}),...o,onMouseDown:l=>{l.preventDefault()}})});X6.classes=tr;X6.displayName="@mantine/core/ComboboxFooter";const Z6=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,children:o,label:l,id:f,...c}=ye("ComboboxGroup",null,e),h=pa(),d=Ki(f);return b.jsxs(ve,{role:"group","aria-labelledby":l?d:void 0,...h.getStyles("group",{className:t,classNames:n,style:i,styles:r}),...c,children:[l&&b.jsx("div",{id:d,...h.getStyles("groupLabel",{classNames:n,styles:r}),children:l}),o]})});Z6.classes=tr;Z6.displayName="@mantine/core/ComboboxGroup";const Q6=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("ComboboxHeader",null,e);return b.jsx(ve,{...pa().getStyles("header",{className:t,classNames:n,style:i,styles:r}),...o,onMouseDown:l=>{l.preventDefault()}})});Q6.classes=tr;Q6.displayName="@mantine/core/ComboboxHeader";function GL({value:e,valuesDivider:n=",",...t}){return b.jsx("input",{type:"hidden",value:Array.isArray(e)?e.join(n):e?`${e}`:"",...t})}GL.displayName="@mantine/core/ComboboxHiddenInput";const J6=Pe(e=>{const n=ye("ComboboxOption",null,e),{classNames:t,className:i,style:r,styles:a,vars:o,onClick:l,id:f,active:c,onMouseDown:h,onMouseOver:d,disabled:p,selected:v,mod:y,...w}=n,k=pa(),_=A.useId(),S=f||_;return b.jsx(ve,{...k.getStyles("option",{className:i,classNames:t,styles:a,style:r}),...w,id:S,mod:["combobox-option",{"combobox-active":c,"combobox-disabled":p,"combobox-selected":v},y],role:"option",onClick:C=>{var E;p?C.preventDefault():((E=k.onOptionSubmit)==null||E.call(k,n.value,n),l==null||l(C))},onMouseDown:C=>{C.preventDefault(),h==null||h(C)},onMouseOver:C=>{k.resetSelectionOnOptionHover&&k.store.resetSelectedOption(),d==null||d(C)}})});J6.classes=tr;J6.displayName="@mantine/core/ComboboxOption";const eC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,id:a,onMouseDown:o,labelledBy:l,...f}=ye("ComboboxOptions",null,e),c=pa(),h=Ki(a);return A.useEffect(()=>{c.store.setListId(h)},[h]),b.jsx(ve,{...c.getStyles("options",{className:t,style:i,classNames:n,styles:r}),...f,id:h,role:"listbox","aria-labelledby":l,onMouseDown:d=>{d.preventDefault(),o==null||o(d)}})});eC.classes=tr;eC.displayName="@mantine/core/ComboboxOptions";const XJ={withAriaAttributes:!0,withKeyboardNavigation:!0},nC=Pe(e=>{const{classNames:n,styles:t,unstyled:i,vars:r,withAriaAttributes:a,onKeyDown:o,onClick:l,withKeyboardNavigation:f,size:c,ref:h,...d}=ye("ComboboxSearch",XJ,e),p=pa(),v=p.getStyles("search"),y=K6({targetType:"input",withAriaAttributes:a,withKeyboardNavigation:f,withExpandedAttribute:!1,onKeyDown:o,onClick:l,autoComplete:"off"});return b.jsx(Lt,{ref:It(h,p.store.searchRef),classNames:[{input:v.className},n],styles:[{input:v.style},t],size:c||p.size,...y,...d,__staticSelector:"Combobox"})});nC.classes=tr;nC.displayName="@mantine/core/ComboboxSearch";const ZJ={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},YL=Pe(e=>{const{children:n,refProp:t,withKeyboardNavigation:i,withAriaAttributes:r,withExpandedAttribute:a,targetType:o,autoComplete:l,ref:f,...c}=ye("ComboboxTarget",ZJ,e),h=pu(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=pa(),p=A.cloneElement(h,{...K6({targetType:o,withAriaAttributes:r,withKeyboardNavigation:i,withExpandedAttribute:a,onKeyDown:h.props.onKeyDown,onClick:h.props.onClick,autoComplete:l}),...c});return b.jsx(En.Target,{refProp:t,ref:It(f,d.store.targetRef),children:p})});YL.displayName="@mantine/core/ComboboxTarget";function QJ(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 JJ(e,n,t){for(let i=e+1;i{l||(f(!0),r==null||r(P))},[f,r,l]),_=A.useCallback((P="unknown")=>{l&&(f(!1),i==null||i(P))},[f,i,l]),S=A.useCallback((P="unknown")=>{l?_(P):k(P)},[_,k,l]),C=A.useCallback(()=>{const P=Mo(p.current),$=Xv(`#${c.current} [data-combobox-selected]`,P);$==null||$.removeAttribute("data-combobox-selected"),$==null||$.removeAttribute("aria-selected")},[]),E=A.useCallback(P=>{const $=Mo(p.current),q=Xv(`#${c.current}`,$),Y=q?No("[data-combobox-option]",q):null;if(!Y)return null;const D=P>=Y.length?0:P<0?Y.length-1:P;return h.current=D,Y!=null&&Y[D]&&!Y[D].hasAttribute("data-combobox-disabled")?(C(),Y[D].setAttribute("data-combobox-selected","true"),Y[D].setAttribute("aria-selected","true"),Y[D].scrollIntoView({block:"nearest",behavior:o}),Y[D].id):null},[o,C]),O=A.useCallback(()=>{const P=Mo(p.current),$=Xv(`#${c.current} [data-combobox-active]`,P);return E($?No(`#${c.current} [data-combobox-option]`,P).findIndex(q=>q===$):0)},[E]),T=A.useCallback(()=>{const P=Mo(p.current),$=No(`#${c.current} [data-combobox-option]`,P);return E(JJ(h.current,$,a))},[E,a]),M=A.useCallback(()=>{const P=Mo(p.current),$=No(`#${c.current} [data-combobox-option]`,P);return E(QJ(h.current,$,a))},[E,a]),N=A.useCallback(()=>{const P=Mo(p.current);return E(eee(No(`#${c.current} [data-combobox-option]`,P)))},[E]),F=A.useCallback((P="selected",$)=>{var q;if(typeof P=="number"){h.current=P;const Y=Mo(p.current),D=No(`#${c.current} [data-combobox-option]`,Y);$!=null&&$.scrollIntoView&&((q=D[P])==null||q.scrollIntoView({block:"nearest",behavior:o}));return}w.current=window.setTimeout(()=>{var V;const Y=Mo(p.current),D=No(`#${c.current} [data-combobox-option]`,Y),W=D.findIndex(z=>z.hasAttribute(`data-combobox-${P}`));h.current=W,$!=null&&$.scrollIntoView&&((V=D[W])==null||V.scrollIntoView({block:"nearest",behavior:o}))},0)},[]),R=A.useCallback(()=>{h.current=-1,C()},[C]),L=A.useCallback(()=>{var $,q;const P=Mo(p.current);(q=($=No(`#${c.current} [data-combobox-option]`,P))==null?void 0:$[h.current])==null||q.click()},[]),B=A.useCallback(P=>{c.current=P},[]),G=A.useCallback(()=>{v.current=window.setTimeout(()=>{var P;return(P=d.current)==null?void 0:P.focus()},0)},[]),U=A.useCallback(()=>{y.current=window.setTimeout(()=>{var P;return(P=p.current)==null?void 0:P.focus()},0)},[]),H=A.useCallback(()=>h.current,[]);return A.useEffect(()=>()=>{window.clearTimeout(v.current),window.clearTimeout(y.current),window.clearTimeout(w.current)},[]),{dropdownOpened:l,openDropdown:k,closeDropdown:_,toggleDropdown:S,selectedOptionIndex:h.current,getSelectedOptionIndex:H,selectOption:E,selectFirstOption:N,selectActiveOption:O,selectNextOption:T,selectPreviousOption:M,resetSelectedOption:R,updateSelectedOptionIndex:F,listId:c.current,setListId:B,clickSelectedOption:L,searchRef:d,focusSearchInput:G,targetRef:p,focusTarget:U}}const nee={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0},size:"sm"},KL=(e,{size:n,dropdownPadding:t})=>({options:{"--combobox-option-fz":Qt(n),"--combobox-option-padding":Tn(n,"combobox-option-padding")},dropdown:{"--combobox-padding":t===void 0?void 0:me(t),"--combobox-option-fz":Qt(n),"--combobox-option-padding":Tn(n,"combobox-option-padding")}}),Cn=e=>{const n=ye("Combobox",nee,e),{classNames:t,styles:i,unstyled:r,children:a,store:o,vars:l,onOptionSubmit:f,onClose:c,size:h,dropdownPadding:d,resetSelectionOnOptionHover:p,__staticSelector:v,readOnly:y,attributes:w,...k}=n,_=$m(),S=o||_,C=Xe({name:v||"Combobox",classes:tr,props:n,classNames:t,styles:i,unstyled:r,attributes:w,vars:l,varsResolver:KL}),E=()=>{c==null||c(),S.closeDropdown()};return b.jsx(GJ,{value:{getStyles:C,store:S,onOptionSubmit:f,size:h,resetSelectionOnOptionHover:p,readOnly:y},children:b.jsx(En,{opened:S.dropdownOpened,preventPositionChangeWhenVisible:!1,...k,onChange:O=>!O&&E(),withRoles:!1,unstyled:r,children:a})})},tee=e=>e;Cn.extend=tee;Cn.classes=tr;Cn.varsResolver=KL;Cn.displayName="@mantine/core/Combobox";Cn.Target=YL;Cn.Dropdown=G6;Cn.Options=eC;Cn.Option=J6;Cn.Search=nC;Cn.Empty=Y6;Cn.Chevron=ay;Cn.Footer=X6;Cn.Header=Q6;Cn.EventsTarget=WL;Cn.DropdownTarget=VL;Cn.Group=Z6;Cn.ClearButton=UL;Cn.HiddenInput=GL;function iee({children:e,role:n}){const t=A.use(bu);return t?b.jsx("div",{role:n,"aria-labelledby":t.labelId,"aria-describedby":t.describedBy,children:e}):b.jsx(b.Fragment,{children:e})}const tC=A.createContext(null),ree={hiddenInputValuesSeparator:","},iC=U1((e=>{const{value:n,defaultValue:t,onChange:i,size:r,wrapperProps:a,children:o,readOnly:l,name:f,hiddenInputValuesSeparator:c,hiddenInputProps:h,maxSelectedValues:d,disabled:p,...v}=ye("CheckboxGroup",ree,e),[y,w]=Oi({value:n,defaultValue:t,finalValue:[],onChange:i}),k=C=>{const E=typeof C=="string"?C:C.currentTarget.value;if(l)return;const O=y.includes(E);!O&&d&&y.length>=d||w(O?y.filter(T=>T!==E):[...y,E])},_=C=>{if(p)return!0;if(!d)return!1;const E=y.includes(C),O=y.length>=d;return!E&&O},S=y.join(c);return b.jsx(tC,{value:{value:y,onChange:k,size:r,isDisabled:_},children:b.jsxs(Lt.Wrapper,{size:r,...a,...v,labelElement:"div",__staticSelector:"CheckboxGroup",children:[b.jsx(iee,{role:"group",children:o}),b.jsx("input",{type:"hidden",name:f,value:S,...h})]})})}));iC.classes=Lt.Wrapper.classes;iC.displayName="@mantine/core/CheckboxGroup";var XL={card:"m_26775b0a"};const ZL=A.createContext(null),aee={withBorder:!0},QL=(e,{radius:n})=>({card:{"--card-radius":Gt(n)}}),oy=Pe(e=>{const n=ye("CheckboxCard",aee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,checked:f,mod:c,withBorder:h,value:d,onClick:p,defaultChecked:v,onChange:y,attributes:w,...k}=n,_=Xe({name:"CheckboxCard",classes:XL,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l,varsResolver:QL,rootSelector:"card"}),S=A.use(tC),[C,E]=Oi({value:typeof f=="boolean"?f:S?S.value.includes(d||""):void 0,defaultValue:v,finalValue:!1,onChange:y});return b.jsx(ZL,{value:{checked:C},children:b.jsx(di,{mod:[{"with-border":h,checked:C},c],..._("card"),...k,role:"checkbox","aria-checked":C,onClick:O=>{p==null||p(O),S==null||S.onChange(d||""),E(!C)}})})});oy.displayName="@mantine/core/CheckboxCard";oy.classes=XL;oy.varsResolver=QL;function rC({size:e,style:n,...t}){return b.jsx("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:e!==void 0?{width:me(e),height:me(e),...n}:n,"aria-hidden":!0,...t,children:b.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 JL({indeterminate:e,...n}){return e?b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6","aria-hidden":!0,...n,children:b.jsx("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})}):b.jsx(rC,{...n})}var eI={indicator:"m_5e5256ee",icon:"m_1b1c543a","indicator--outline":"m_76e20374"};const oee={icon:JL,variant:"filled",radius:"sm"},nI=(e,{radius:n,color:t,size:i,iconColor:r,variant:a,autoContrast:o})=>{const l=ts({color:t||e.primaryColor,theme:e}),f=l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-outline)`:l.color;return{indicator:{"--checkbox-size":Tn(i,"checkbox-size"),"--checkbox-radius":n===void 0?void 0:Gt(n),"--checkbox-color":a==="outline"?f:nt(t,e),"--checkbox-icon-color":r?nt(r,e):q1(o,e)?Cm({color:t,theme:e,autoContrast:o}):void 0}}},sy=Pe(e=>{const n=ye("CheckboxIndicator",oee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,icon:f,indeterminate:c,radius:h,color:d,iconColor:p,autoContrast:v,checked:y,mod:w,variant:k,disabled:_,attributes:S,...C}=n,E=Xe({name:"CheckboxIndicator",classes:eI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:S,vars:l,varsResolver:nI,rootSelector:"indicator"}),O=A.use(ZL),T=typeof y=="boolean"||typeof c=="boolean"?y||c:(O==null?void 0:O.checked)||!1;return b.jsx(ve,{...E("indicator",{variant:k}),variant:k,mod:[{checked:T,disabled:_},w],...C,children:b.jsx(f,{indeterminate:c,...E("icon")})})});sy.displayName="@mantine/core/CheckboxIndicator";sy.classes=eI;sy.varsResolver=nI;var tI={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};const see=tI;function iI({__staticSelector:e,__stylesApiProps:n,className:t,classNames:i,styles:r,unstyled:a,children:o,label:l,description:f,id:c,disabled:h,error:d,size:p,labelPosition:v="left",bodyElement:y="div",labelElement:w="label",variant:k,style:_,vars:S,mod:C,attributes:E,...O}){const T=Xe({name:e,props:n,className:t,style:_,classes:tI,classNames:i,styles:r,unstyled:a,attributes:E});return b.jsx(ve,{...T("root"),__vars:{"--label-fz":Qt(p),"--label-lh":Tn(p,"label-lh")},mod:[{"label-position":v},C],variant:k,size:p,...O,children:b.jsxs(ve,{component:y,htmlFor:y==="label"?c:void 0,...T("body"),children:[o,b.jsxs("div",{...T("labelWrapper"),"data-disabled":h||void 0,children:[l&&b.jsx(ve,{component:w,htmlFor:w==="label"?c:void 0,...T("label"),"data-disabled":h||void 0,children:l}),f&&b.jsx(Lt.Description,{size:p,__inheritStyles:!1,...T("description"),children:f}),d&&typeof d!="boolean"&&b.jsx(Lt.Error,{size:p,__inheritStyles:!1,...T("error"),children:d})]})]})})}iI.displayName="@mantine/core/InlineInput";var rI={root:"m_bf2d988c",inner:"m_26062bec",input:"m_26063560",icon:"m_bf295423","input--outline":"m_215c4542"};const lee={labelPosition:"right",icon:JL,withErrorStyles:!0,variant:"filled",radius:"sm"},aI=(e,{radius:n,color:t,size:i,iconColor:r,variant:a,autoContrast:o})=>{const l=ts({color:t||e.primaryColor,theme:e}),f=l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-outline)`:l.color;return{root:{"--checkbox-size":Tn(i,"checkbox-size"),"--checkbox-radius":n===void 0?void 0:Gt(n),"--checkbox-color":a==="outline"?f:nt(t,e),"--checkbox-icon-color":r?nt(r,e):q1(o,e)?Cm({color:t,theme:e,autoContrast:o}):void 0}}},nl=Pe(e=>{var le;const n=ye("Checkbox",lee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:f,label:c,id:h,size:d,radius:p,wrapperProps:v,checked:y,labelPosition:w,description:k,error:_,disabled:S,variant:C,indeterminate:E,icon:O,rootRef:T,iconColor:M,onChange:N,autoContrast:F,mod:R,attributes:L,readOnly:B,onClick:G,withErrorStyles:U,ref:H,...P}=n,$=A.useRef(null),q=A.use(tC),Y=d||(q==null?void 0:q.size),D=Xe({name:"Checkbox",props:n,classes:rI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:L,vars:l,varsResolver:aI}),{styleProps:W,rest:V}=vu(P),z=Ki(h),X={checked:(q==null?void 0:q.value.includes(V.value))??y,onChange:be=>{q==null||q.onChange(be),N==null||N(be)}},ee=((le=q==null?void 0:q.isDisabled)==null?void 0:le.call(q,V.value))??!1,re=S||ee;return A.useEffect(()=>{$.current&&($.current.indeterminate=E||!1,E?$.current.setAttribute("data-indeterminate","true"):$.current.removeAttribute("data-indeterminate"))},[E]),b.jsx(iI,{...D("root"),__staticSelector:"Checkbox",__stylesApiProps:n,id:z,size:Y,labelPosition:w,label:c,description:k,error:_,disabled:re,classNames:t,styles:a,unstyled:o,"data-checked":X.checked||y||void 0,variant:C,ref:T,mod:R,attributes:L,inert:V.inert,...W,...v,children:b.jsxs(ve,{...D("inner"),mod:{"data-label-position":w},children:[b.jsx(ve,{component:"input",id:z,ref:It($,H),mod:{error:!!_},...D("input",{focusable:!0,variant:C}),...V,...X,disabled:re,inert:V.inert,type:"checkbox",onClick:be=>{B&&be.preventDefault(),G==null||G(be)}}),b.jsx(O,{indeterminate:E,...D("icon")})]})})});nl.classes={...rI,...see};nl.varsResolver=aI;nl.displayName="@mantine/core/Checkbox";nl.Group=iC;nl.Indicator=sy;nl.Card=oy;function au(e){return"group"in e}function oI({options:e,search:n,limit:t}){const i=n.trim().toLowerCase(),r=[];for(let a=0;a0)return!1;return!0}function sI(e,n=new Set){if(Array.isArray(e))for(const t of e)if(au(t))sI(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 fee(e,n){return Array.isArray(e)?e.includes(n):e===n}function lI({data:e,withCheckIcon:n,withAlignedLabels:t,value:i,checkIconPosition:r,unstyled:a,renderOption:o}){if(!au(e)){const f=fee(i,e.value),c=n&&(f?b.jsx(rC,{className:tr.optionsDropdownCheckIcon}):t?b.jsx("div",{className:tr.optionsDropdownCheckPlaceholder}):null),h=b.jsxs(b.Fragment,{children:[r==="left"&&c,b.jsx("span",{children:e.label}),r==="right"&&c]});return b.jsx(Cn.Option,{value:e.value,disabled:e.disabled,className:cn({[tr.optionsDropdownOption]:!a}),"data-reverse":r==="right"||void 0,"data-checked":f||void 0,"aria-selected":f,active:f,children:typeof o=="function"?o({option:e,checked:f}):h})}const l=e.items.map(f=>b.jsx(lI,{data:f,value:i,unstyled:a,withCheckIcon:n,withAlignedLabels:t,checkIconPosition:r,renderOption:o},`${f.value}`));return b.jsx(Cn.Group,{label:e.group,children:l})}function ly({data:e,hidden:n,hiddenWhenEmpty:t,filter:i,search:r,limit:a,maxDropdownHeight:o,withScrollArea:l=!0,filterOptions:f=!0,withCheckIcon:c=!1,withAlignedLabels:h=!1,value:d,checkIconPosition:p,nothingFoundMessage:v,unstyled:y,labelId:w,renderOption:k,scrollAreaProps:_,"aria-label":S}){sI(e);const C=typeof r=="string"?(i||oI)({options:e,search:f?r:"",limit:a??1/0}):e,E=uee(C),O=C.map(T=>b.jsx(lI,{data:T,withCheckIcon:c,withAlignedLabels:h,value:d,checkIconPosition:p,unstyled:y,renderOption:k},au(T)?T.group:`${T.value}`));return b.jsx(Cn.Dropdown,{hidden:n||t&&E,"data-composed":!0,children:b.jsxs(Cn.Options,{labelledBy:w,"aria-label":S,children:[l?b.jsx(Na.Autosize,{mah:o??220,type:"scroll",scrollbarSize:"var(--combobox-padding)",offsetScrollbars:"y",..._,children:O}):O,E&&v&&b.jsx(Cn.Empty,{children:v})]})})}const uy=Pe(e=>{const n=ye("Autocomplete",{size:"sm"},e),{classNames:t,styles:i,unstyled:r,vars:a,dropdownOpened:o,defaultDropdownOpened:l,onDropdownClose:f,onDropdownOpen:c,onFocus:h,onBlur:d,onClick:p,onChange:v,data:y,value:w,defaultValue:k,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:S,onOptionSubmit:C,comboboxProps:E,readOnly:O,disabled:T,filter:M,limit:N,withScrollArea:F,maxDropdownHeight:R,size:L,id:B,renderOption:G,autoComplete:U,scrollAreaProps:H,onClear:P,clearButtonProps:$,error:q,clearable:Y,clearSectionMode:D,rightSection:W,autoSelectOnBlur:V,openOnFocus:z=!0,attributes:X,...ee}=n,re=Ki(B),le=ry(y),be=Nm(le),[ae,ue]=Oi({value:w,defaultValue:k,finalValue:"",onChange:v}),Ce=$m({opened:o,defaultOpened:l,onDropdownOpen:()=>{c==null||c(),S&&Ce.selectFirstOption()},onDropdownClose:()=>{f==null||f(),setTimeout(Ce.resetSelectedOption,0)}}),ne=Re=>{ue(Re),Ce.resetSelectedOption()},{resolvedClassNames:Ne,resolvedStyles:pe}=Li({props:n,styles:i,classNames:t});A.useEffect(()=>{_&&Ce.selectFirstOption()},[_,ae]);const Ee=b.jsx(Cn.ClearButton,{...$,onClear:()=>{ne(""),P==null||P()}});return b.jsxs(Cn,{store:Ce,__staticSelector:"Autocomplete",classNames:Ne,styles:pe,unstyled:r,readOnly:O,size:L,attributes:X,keepMounted:V,onOptionSubmit:Re=>{C==null||C(Re),ne(be[Re].label),Ce.closeDropdown()},...E,children:[b.jsx(Cn.Target,{autoComplete:U,withExpandedAttribute:!0,children:b.jsx(Bi,{...ee,size:L,__staticSelector:"Autocomplete",__clearSection:Ee,__clearable:Y&&!!ae&&!T&&!O,__clearSectionMode:D,rightSection:W,disabled:T,readOnly:O,value:ae,error:q,onChange:Re=>{ne(Re.currentTarget.value),Ce.openDropdown(),_&&Ce.selectFirstOption()},onFocus:Re=>{z&&Ce.openDropdown(),h==null||h(Re)},onBlur:Re=>{V&&Ce.clickSelectedOption(),Ce.closeDropdown(),d==null||d(Re)},onClick:Re=>{Ce.openDropdown(),p==null||p(Re)},classNames:Ne,styles:pe,unstyled:r,attributes:X,id:re})}),b.jsx(ly,{data:le,hidden:O||T,filter:M,search:ae,limit:N,hiddenWhenEmpty:!0,withScrollArea:F,maxDropdownHeight:R,unstyled:r,labelId:ee.label?`${re}-label`:void 0,"aria-label":ee.label?void 0:ee["aria-label"],renderOption:G,scrollAreaProps:H})]})});uy.classes={...Bi.classes,...Cn.classes};uy.displayName="@mantine/core/Autocomplete";var fy={group:"m_11def92b",root:"m_f85678b6",image:"m_11f8ac07",placeholder:"m_104cd71f"};const uI=A.createContext({withinGroup:!1}),fI=(e,{spacing:n})=>({group:{"--ag-spacing":Ht(n)}}),cy=Pe(e=>{const n=ye("AvatarGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,spacing:f,attributes:c,...h}=n;return b.jsx(uI,{value:{withinGroup:!0},children:b.jsx(ve,{...Xe({name:"AvatarGroup",classes:fy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:c,vars:l,varsResolver:fI,rootSelector:"group"})("group"),...h})})});cy.classes=fy;cy.varsResolver=fI;cy.displayName="@mantine/core/AvatarGroup";function cee(e){return b.jsx("svg",{...e,"data-avatar-placeholder-icon":!0,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b.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 dee(e){let n=0;for(let t=0;ti[0]).slice(0,n).join("").toUpperCase()}const cI=(e,{size:n,radius:t,variant:i,gradient:r,color:a,autoContrast:o,name:l,allowedInitialsColors:f})=>{const c=a==="initials"&&typeof l=="string"?mee(l,f):a,h=e.variantColorResolver({color:c||"gray",theme:e,gradient:r,variant:i||"light",autoContrast:o});return{root:{"--avatar-size":Tn(n,"avatar-size"),"--avatar-radius":t===void 0?void 0:Gt(t),"--avatar-bg":c||i?h.background:void 0,"--avatar-color":c||i?h.color:void 0,"--avatar-bd":c||i?h.border:void 0}}},tl=Ii(e=>{const n=ye("Avatar",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,src:f,alt:c,radius:h,color:d,gradient:p,imageProps:v,children:y,autoContrast:w,mod:k,name:_,allowedInitialsColors:S,attributes:C,...E}=n,O=A.use(uI),[T,M]=A.useState(!f),N=Xe({name:"Avatar",props:n,classes:fy,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:C,vars:l,varsResolver:cI});return A.useEffect(()=>M(!f),[f]),b.jsx(ve,{...N("root"),mod:[{"within-group":O.withinGroup},k],...E,children:T||!f?b.jsx("span",{...N("placeholder"),title:c,children:y||typeof _=="string"&&pee(_)||b.jsx(cee,{})}):b.jsx("img",{...v,...N("image"),src:f,alt:c,onError:F=>{var R;M(!0),(R=v==null?void 0:v.onError)==null||R.call(v,F)}})})});tl.classes=fy;tl.varsResolver=cI;tl.displayName="@mantine/core/Avatar";tl.Group=cy;var dI={root:"m_347db0ec","root--dot":"m_fbd81e3d",label:"m_5add502a",section:"m_91fdda9b"};const hI=(e,{radius:n,color:t,gradient:i,variant:r,size:a,autoContrast:o,circle:l})=>{const f=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:o});return{root:{"--badge-height":Tn(a,"badge-height"),"--badge-padding-x":Tn(a,"badge-padding-x"),"--badge-fz":Tn(a,"badge-fz"),"--badge-radius":l||n===void 0?void 0:Gt(n),"--badge-bg":t||r?f.background:void 0,"--badge-color":t||r?f.color:void 0,"--badge-bd":t||r?f.border:void 0,"--badge-dot-color":r==="dot"?nt(t,e):void 0}}},ti=Ii(e=>{const n=ye("Badge",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,radius:f,color:c,gradient:h,leftSection:d,rightSection:p,children:v,variant:y,fullWidth:w,autoContrast:k,circle:_,mod:S,attributes:C,...E}=n,O=Xe({name:"Badge",props:n,classes:dI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:C,vars:l,varsResolver:hI});return b.jsxs(ve,{variant:y,mod:[{block:w,circle:_,"with-right-section":!!p,"with-left-section":!!d},S],...O("root",{variant:y}),...E,children:[d&&b.jsx("span",{...O("section"),"data-position":"left",children:d}),b.jsx("span",{...O("label"),children:v}),p&&b.jsx("span",{...O("section"),"data-position":"right",children:p})]})});ti.classes=dI;ti.varsResolver=hI;ti.displayName="@mantine/core/Badge";var Cc={root:"m_77c9d27d",inner:"m_80f1301b",label:"m_811560b9",section:"m_a74036a",loader:"m_a25b86ee",group:"m_80d6d844",groupSection:"m_70be2a01"};const H5={orientation:"horizontal"},mI=(e,{borderWidth:n})=>({group:{"--button-border-width":me(n)}}),dy=Pe(e=>{const n=ye("ButtonGroup",H5,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,orientation:l,vars:f,borderWidth:c,mod:h,attributes:d,...p}=ye("ButtonGroup",H5,e);return b.jsx(ve,{...Xe({name:"ButtonGroup",props:n,classes:Cc,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:d,vars:f,varsResolver:mI,rootSelector:"group"})("group"),mod:[{"data-orientation":l},h],role:"group",...p})});dy.classes=Cc;dy.varsResolver=mI;dy.displayName="@mantine/core/ButtonGroup";const pI=(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":Tn(o,"section-height"),"--section-padding-x":Tn(o,"section-padding-x"),"--section-fz":o!=null&&o.includes("compact")?Qt(o.replace("compact-","")):Qt(o),"--section-radius":n===void 0?void 0:Gt(n),"--section-bg":t||r?l.background:void 0,"--section-color":l.color,"--section-bd":t||r?l.border:void 0}}},hy=Pe(e=>{const n=ye("ButtonGroupSection",null,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,vars:l,gradient:f,radius:c,autoContrast:h,attributes:d,...p}=n;return b.jsx(ve,{...Xe({name:"ButtonGroupSection",props:n,classes:Cc,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:d,vars:l,varsResolver:pI,rootSelector:"groupSection"})("groupSection"),...p})});hy.classes=Cc;hy.varsResolver=pI;hy.displayName="@mantine/core/ButtonGroupSection";const vee={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${me(1)}))`},out:{opacity:0,transform:"translate(-50%, -200%)"},common:{transformOrigin:"center"},transitionProperty:"transform, opacity"},vI=(e,{radius:n,color:t,gradient:i,variant:r,size:a,justify:o,autoContrast:l})=>{const f=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:l});return{root:{"--button-justify":o,"--button-height":Tn(a,"button-height"),"--button-padding-x":Tn(a,"button-padding-x"),"--button-fz":a!=null&&a.includes("compact")?Qt(a.replace("compact-","")):Qt(a),"--button-radius":n===void 0?void 0:Gt(n),"--button-bg":t||r?f.background:void 0,"--button-hover":t||r?f.hover:void 0,"--button-color":f.color,"--button-bd":t||r?f.border:void 0,"--button-hover-color":t||r?f.hoverColor:void 0}}},qt=Ii(e=>{const n=ye("Button",null,e),{style:t,vars:i,className:r,color:a,disabled:o,children:l,leftSection:f,rightSection:c,fullWidth:h,variant:d,radius:p,loading:v,loaderProps:y,gradient:w,classNames:k,styles:_,unstyled:S,"data-disabled":C,autoContrast:E,mod:O,attributes:T,...M}=n,N=Xe({name:"Button",props:n,classes:Cc,className:r,style:t,classNames:k,styles:_,unstyled:S,attributes:T,vars:i,varsResolver:vI}),F=!!f,R=!!c;return b.jsxs(di,{...N("root",{active:!o&&!v&&!C}),unstyled:S,variant:d,disabled:o||v,mod:[{disabled:o||C,loading:v,block:h,"with-left-section":F,"with-right-section":R},O],...M,children:[typeof v=="boolean"&&b.jsx(Ko,{mounted:v,transition:vee,duration:150,children:L=>b.jsx(ve,{component:"span",...N("loader",{style:L}),"aria-hidden":!0,children:b.jsx(zi,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...y})})}),b.jsxs("span",{...N("inner"),children:[f&&b.jsx(ve,{component:"span",...N("section"),mod:{position:"left"},children:f}),b.jsx(ve,{component:"span",mod:{loading:v},...N("label"),children:l}),c&&b.jsx(ve,{component:"span",...N("section"),mod:{position:"right"},children:c})]})]})});qt.classes=Cc;qt.varsResolver=vI;qt.displayName="@mantine/core/Button";qt.Group=dy;qt.GroupSection=hy;var gI={root:"m_4451eb3a"};const Ac=Ii(e=>{const n=ye("Center",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,inline:f,mod:c,attributes:h,...d}=n,p=Xe({name:"Center",props:n,classes:gI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l});return b.jsx(ve,{mod:[{inline:f},c],...p("root"),...d})});Ac.classes=gI;Ac.displayName="@mantine/core/Center";var yI={root:"m_de3d2490",colorOverlay:"m_862f3d1b",shadowOverlay:"m_98ae7f22",alphaOverlay:"m_95709ac0",childrenOverlay:"m_93e74e3"};const U5={withShadow:!0},bI=(e,{radius:n,size:t})=>({root:{"--cs-radius":n===void 0?void 0:Gt(n),"--cs-size":me(t)}}),Oc=Ii(e=>{const n=ye("ColorSwatch",U5,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:f,radius:c,withShadow:h,children:d,attributes:p,...v}=ye("ColorSwatch",U5,n),y=Xe({name:"ColorSwatch",props:n,classes:yI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:bI});return b.jsxs(ve,{...y("root",{focusable:!0}),...v,children:[b.jsx("span",{...y("alphaOverlay")}),h&&b.jsx("span",{...y("shadowOverlay")}),b.jsx("span",{...y("colorOverlay",{style:{backgroundColor:f}})}),b.jsx("span",{...y("childrenOverlay"),children:d})]})});Oc.classes=yI;Oc.varsResolver=bI;Oc.displayName="@mantine/core/ColorSwatch";function ra(e,n=0,t=10**n){return Math.round(t*e)/t}function gee({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 yee={grad:360/400,turn:360,rad:360/(Math.PI*2)};function bee(e,n="deg"){return Number(e)*(yee[n]||1)}const wee=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function V5(e){const n=wee.exec(e);return n?gee({h:bee(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 lS({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:ra(60*(o<0?o+6:o),3),s:ra(r?a/r*100:0,3),v:ra(r/255*100,3),a:i}}function uS(e){const n=e[0]==="#"?e.slice(1):e;return n.length===3?lS({r:parseInt(n[0]+n[0],16),g:parseInt(n[1]+n[1],16),b:parseInt(n[2]+n[2],16),a:1}):lS({r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16),a:1})}function kee(e){const n=e[0]==="#"?e.slice(1):e,t=a=>ra(parseInt(a,16)/255,3);if(n.length===4){const a=n.slice(0,3),o=t(n[3]+n[3]);return{...uS(a),a:o}}const i=n.slice(0,6),r=t(n.slice(6,8));return{...uS(i),a:r}}const _ee=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function W5(e){const n=_ee.exec(e);return n?lS({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 wI={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},xee={hex:uS,hexa:kee,rgb:W5,rgba:W5,hsl:V5,hsla:V5};function See(e){for(const[,n]of Object.entries(wI))if(n.test(e))return!0;return!1}function Sv(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(wI))if(i.test(n))return xee[t](n);return{h:0,s:0,v:0,a:1}}const my=A.createContext(null);function aC({position:e,...n}){return b.jsx(ve,{__vars:{"--thumb-y-offset":`${e.y*100}%`,"--thumb-x-offset":`${e.x*100}%`},...n})}aC.displayName="@mantine/core/ColorPickerThumb";var py={wrapper:"m_fee9c77",preview:"m_9dddfbac",body:"m_bffecc3e",sliders:"m_3283bb96",thumb:"m_40d572ba",swatch:"m_d8ee6fd8",swatches:"m_5711e686",saturation:"m_202a296e",saturationOverlay:"m_11b3db02",slider:"m_d856d47d",sliderOverlay:"m_8f327113"};const Ec=Pe(e=>{var q;const n=ye("ColorSlider",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,onChange:f,onChangeEnd:c,maxValue:h,round:d,size:p="md",focusable:v=!0,value:y,overlays:w,thumbColor:k="transparent",onScrubStart:_,onScrubEnd:S,__staticSelector:C="ColorPicker",attributes:E,ref:O,...T}=n,M=Xe({name:C,classes:py,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:E,rootSelector:"slider"}),N=((q=A.use(my))==null?void 0:q.getStyles)||M,F=ii(),[R,L]=A.useState({y:0,x:y/h}),B=A.useRef(R),G=Y=>d?Math.round(Y*h):Y*h,{ref:U}=Q$(({x:Y,y:D})=>{B.current={x:Y,y:D},f==null||f(G(Y))},{onScrubEnd:()=>{const{x:Y}=B.current;c==null||c(G(Y)),S==null||S()},onScrubStart:_});Go(()=>{L({y:0,x:y/h})},[y]);const H=(Y,D)=>{Y.preventDefault();const W=Z$(D);f==null||f(G(W.x)),c==null||c(G(W.x))},P=Y=>{switch(Y.key){case"ArrowRight":H(Y,{x:R.x+.05,y:R.y});break;case"ArrowLeft":H(Y,{x:R.x-.05,y:R.y});break}},$=w.map((Y,D)=>A.createElement("div",{...N("sliderOverlay"),style:Y,key:D}));return b.jsxs(ve,{...T,ref:It(U,O),...N("slider"),size:p,role:"slider","aria-valuenow":y,"aria-valuemax":h,"aria-valuemin":0,tabIndex:v?0:-1,onKeyDown:P,"data-focus-ring":F.focusRing,__vars:{"--cp-thumb-size":`var(--cp-thumb-size-${p})`},children:[$,b.jsx(aC,{position:R,...N("thumb",{style:{top:me(1),background:k}})})]})});Ec.displayName="@mantine/core/ColorSlider";Ec.classes=py;const Cee={__staticSelector:"AlphaSlider"},oC=Pe(e=>{const{value:n,onChange:t,onChangeEnd:i,color:r,...a}=ye("AlphaSlider",Cee,e);return b.jsx(Ec,{...a,value:n,onChange:o=>t==null?void 0:t(ra(o,2)),onChangeEnd:o=>i==null?void 0:i(ra(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:`${me(8)} ${me(8)}`,backgroundPosition:`0 0, 0 ${me(4)}, ${me(4)} ${me(-4)}, ${me(-4)} 0`},{backgroundImage:`linear-gradient(90deg, transparent, ${r})`},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${me(1)} inset, rgb(0, 0, 0, .15) 0 0 ${me(4)} inset`}]})});oC.displayName="@mantine/core/AlphaSlider";oC.classes=Ec.classes;function kI({h:e,s:n,v:t,a:i}){const r=e/360*6,a=n/100,o=t/100,l=Math.floor(r),f=o*(1-a),c=o*(1-(r-l)*a),h=o*(1-(1-r+l)*a),d=l%6;return{r:ra([o,c,f,f,h,o][d]*255),g:ra([h,o,o,c,f,f][d]*255),b:ra([f,f,h,o,o,c][d]*255),a:ra(i,2)}}function G5(e,n){const{r:t,g:i,b:r,a}=kI(e);return n?`rgba(${t}, ${i}, ${r}, ${ra(a,2)})`:`rgb(${t}, ${i}, ${r})`}function Y5({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}%, ${ra(i,2)})`:`hsl(${o.h}, ${o.s}%, ${o.l}%)`}function tg(e){const n=e.toString(16);return n.length<2?`0${n}`:n}function _I(e){const{r:n,g:t,b:i}=kI(e);return`#${tg(n)}${tg(t)}${tg(i)}`}function Aee(e){const n=Math.round(e.a*255);return`${_I(e)}${tg(n)}`}const lk={hex:_I,hexa:e=>Aee(e),rgb:e=>G5(e,!1),rgba:e=>G5(e,!0),hsl:e=>Y5(e,!1),hsla:e=>Y5(e,!0)};function zs(e,n){return n?e in lk?lk[e](n):lk.hex(n):"#000000"}const Oee={__staticSelector:"HueSlider"},sC=Pe(e=>{const{value:n,onChange:t,onChangeEnd:i,color:r,...a}=ye("HueSlider",Oee,e);return b.jsx(Ec,{...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 ${me(1)} inset, rgb(0, 0, 0, .15) 0 0 ${me(4)} inset`}]})});sC.displayName="@mantine/core/HueSlider";sC.classes=Ec.classes;function xI({className:e,onChange:n,onChangeEnd:t,value:i,saturationLabel:r,focusable:a=!0,size:o,color:l,onScrubStart:f,onScrubEnd:c,...h}){const{getStyles:d}=A.use(my),[p,v]=A.useState({x:i.s/100,y:1-i.v/100}),y=A.useRef(p),{ref:w}=Q$(({x:S,y:C})=>{y.current={x:S,y:C},n({s:Math.round(S*100),v:Math.round((1-C)*100)})},{onScrubEnd:()=>{const{x:S,y:C}=y.current;t({s:Math.round(S*100),v:Math.round((1-C)*100)}),c==null||c()},onScrubStart:f});A.useEffect(()=>{v({x:i.s/100,y:1-i.v/100})},[i.s,i.v]);const k=(S,C)=>{S.preventDefault();const E=Z$(C);n({s:Math.round(E.x*100),v:Math.round((1-E.y)*100)}),t({s:Math.round(E.x*100),v:Math.round((1-E.y)*100)})},_=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 b.jsxs(ve,{...d("saturation"),ref:w,...h,role:"slider","aria-label":r,"aria-valuenow":p.x,"aria-valuetext":zs("rgba",i),tabIndex:a?0:-1,onKeyDown:_,children:[b.jsx("div",{...d("saturationOverlay",{style:{backgroundColor:`hsl(${i.h}, 100%, 50%)`}})}),b.jsx("div",{...d("saturationOverlay",{style:{backgroundImage:"linear-gradient(90deg, #fff, transparent)"}})}),b.jsx("div",{...d("saturationOverlay",{style:{backgroundImage:"linear-gradient(0deg, #000, transparent)"}})}),b.jsx(aC,{position:p,...d("thumb",{style:{backgroundColor:l}})})]})}xI.displayName="@mantine/core/Saturation";function SI({className:e,datatype:n,setValue:t,onChangeEnd:i,size:r,focusable:a,data:o,swatchesPerRow:l,value:f,...c}){const h=A.use(my),d=o.map((p,v)=>A.createElement(Oc,{...h.getStyles("swatch"),unstyled:h.unstyled,component:"button",type:"button",color:p,key:v,radius:"sm",onClick:()=>{t(p),i==null||i(p)},"aria-label":p,tabIndex:a?0:-1,"data-swatch":!0},f===p&&b.jsx(rC,{size:"35%",color:tz(p)<.5?"white":"black"})));return b.jsx(ve,{...h.getStyles("swatches"),...c,children:d})}SI.displayName="@mantine/core/Swatches";const Eee={swatchesPerRow:7,withPicker:!0,focusable:!0,size:"md",__staticSelector:"ColorPicker"},CI=(e,{size:n,swatchesPerRow:t})=>({wrapper:{"--cp-preview-size":Tn(n,"cp-preview-size"),"--cp-width":Tn(n,"cp-width"),"--cp-body-spacing":Ht(n),"--cp-swatch-size":`${100/t}%`,"--cp-thumb-size":Tn(n,"cp-thumb-size"),"--cp-saturation-height":Tn(n,"cp-saturation-height")}}),vy=Pe(e=>{const n=ye("ColorPicker",Eee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,format:f="hex",value:c,defaultValue:h,onChange:d,onChangeEnd:p,withPicker:v,size:y,saturationLabel:w,hueLabel:k,alphaLabel:_,focusable:S,swatches:C,swatchesPerRow:E,fullWidth:O,onColorSwatchClick:T,__staticSelector:M,mod:N,attributes:F,name:R,hiddenInputProps:L,...B}=n,G=Xe({name:M,props:n,classes:py,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:F,rootSelector:"wrapper",vars:l,varsResolver:CI}),U=A.useRef(f||"hex"),H=A.useRef(""),P=A.useRef(-1),$=A.useRef(!1),q=f==="hexa"||f==="rgba"||f==="hsla",[Y,D,W]=Oi({value:c,defaultValue:h,finalValue:"#FFFFFF",onChange:d}),[V,z]=A.useState(Sv(Y)),X=()=>{window.clearTimeout(P.current),$.current=!0},ee=()=>{window.clearTimeout(P.current),P.current=window.setTimeout(()=>{$.current=!1},200)},re=le=>{z(be=>{const ae={...be,...le};return H.current=zs(U.current,ae),ae}),D(H.current)};return Go(()=>{typeof c=="string"&&See(c)&&!$.current&&z(Sv(c))},[c]),Go(()=>{U.current=f||"hex",D(zs(U.current,V))},[f]),b.jsx(my,{value:{getStyles:G,unstyled:o},children:b.jsxs(ve,{...G("wrapper"),size:y,mod:[{"full-width":O},N],...B,children:[R&&b.jsx("input",{type:"hidden",name:R,value:Y,...L}),v&&b.jsxs(b.Fragment,{children:[b.jsx(xI,{value:V,onChange:re,onChangeEnd:({s:le,v:be})=>p==null?void 0:p(zs(U.current,{...V,s:le,v:be})),color:Y,size:y,focusable:S,saturationLabel:w,onScrubStart:X,onScrubEnd:ee}),b.jsxs("div",{...G("body"),children:[b.jsxs("div",{...G("sliders"),children:[b.jsx(sC,{value:V.h,onChange:le=>re({h:le}),onChangeEnd:le=>p==null?void 0:p(zs(U.current,{...V,h:le})),size:y,focusable:S,"aria-label":k,onScrubStart:X,onScrubEnd:ee}),q&&b.jsx(oC,{value:V.a,onChange:le=>re({a:le}),onChangeEnd:le=>{p==null||p(zs(U.current,{...V,a:le}))},size:y,color:zs("hex",V),focusable:S,"aria-label":_,onScrubStart:X,onScrubEnd:ee})]}),q&&b.jsx(Oc,{color:Y,radius:"sm",size:"var(--cp-preview-size)",...G("preview")})]})]}),Array.isArray(C)&&b.jsx(SI,{data:C,swatchesPerRow:E,focusable:S,setValue:D,value:Y,onChangeEnd:le=>{const be=zs(f,Sv(le));T==null||T(be),p==null||p(be),W||z(Sv(le))}})]})})});vy.classes=py;vy.varsResolver=CI;vy.displayName="@mantine/core/ColorPicker";var AI={root:"m_3eebeb36",label:"m_9e365f20"};const Tee={orientation:"horizontal"},OI=(e,{color:n,variant:t,size:i})=>({root:{"--divider-color":n?nt(n,e):void 0,"--divider-border-style":t,"--divider-size":Tn(i,"divider-size")}}),zm=Pe(e=>{const n=ye("Divider",Tee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:f,orientation:c,label:h,labelPosition:d,mod:p,attributes:v,...y}=n,w=Xe({name:"Divider",classes:AI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,vars:l,varsResolver:OI});return b.jsx(ve,{mod:[{orientation:c,withLabel:!!h},p],role:"separator",...w("root"),...y,children:h&&b.jsx(ve,{component:"span",mod:{position:d},...w("label"),children:h})})});zm.classes=AI;zm.varsResolver=OI;zm.displayName="@mantine/core/Divider";const[K5,EI]=fa("Grid component was not found in tree"),fS=(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))`},X5=(e,n,t)=>t||e==="auto"?"100%":e==="content"?"unset":fS(e,n),Z5=(e,n)=>{if(e)return e==="auto"||n?"1":"auto"},Q5=(e,n)=>{if(e===0)return"0";if(e)return`calc(${100*e/n}% + ${e/n} * var(--grid-column-gap))`};function jee({span:e,order:n,offset:t,align:i,selector:r}){var v;const a=ii(),o=EI(),l=o.breakpoints||a.breakpoints,f=Lr(e),c=f===void 0?12:f,h=mu({"--col-order":(v=Lr(n))==null?void 0:v.toString(),"--col-flex-grow":Z5(c,o.grow),"--col-flex-basis":fS(c,o.columns),"--col-width":c==="content"?"auto":void 0,"--col-max-width":X5(c,o.columns,o.grow),"--col-offset":Q5(Lr(t),o.columns),"--col-align-self":Lr(i)}),d=At(l).reduce((y,w)=>{var k;return y[w]||(y[w]={}),typeof n=="object"&&n[w]!==void 0&&(y[w]["--col-order"]=(k=n[w])==null?void 0:k.toString()),typeof e=="object"&&e[w]!==void 0&&(y[w]["--col-flex-grow"]=Z5(e[w],o.grow),y[w]["--col-flex-basis"]=fS(e[w],o.columns),y[w]["--col-width"]=e[w]==="content"?"auto":void 0,y[w]["--col-max-width"]=X5(e[w],o.columns,o.grow)),typeof t=="object"&&t[w]!==void 0&&(y[w]["--col-offset"]=Q5(t[w],o.columns)),typeof i=="object"&&i[w]!==void 0&&(y[w]["--col-align-self"]=i[w]),y},{}),p=Th(At(d),l).filter(y=>At(d[y.value]).length>0).map(y=>({query:o.type==="container"?`mantine-grid (min-width: ${l[y.value]})`:`(min-width: ${l[y.value]})`,styles:d[y.value]}));return b.jsx(wc,{styles:h,media:o.type==="container"?void 0:p,container:o.type==="container"?p:void 0,selector:r})}var lC={container:"m_8478a6da",root:"m_410352e9",inner:"m_dee7bd2f",col:"m_96bdd299"};const Mee={span:12},uC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,span:o,order:l,offset:f,align:c,...h}=ye("GridCol",Mee,e),d=EI(),p=H1();return b.jsxs(b.Fragment,{children:[b.jsx(jee,{selector:`.${p}`,span:o,order:l,offset:f,align:c}),b.jsx(ve,{...d.getStyles("col",{className:cn(t,p),style:i,classNames:n,styles:r}),...h})]})});uC.classes=lC;uC.displayName="@mantine/core/GridCol";function J5({gap:e,rowGap:n,columnGap:t,selector:i,breakpoints:r,type:a}){const o=ii(),l=r||o.breakpoints,f=mu({"--grid-gap":Ht(Lr(e)),"--grid-row-gap":Ht(Lr(n)),"--grid-column-gap":Ht(Lr(t))}),c=At(l).reduce((d,p)=>(d[p]||(d[p]={}),typeof e=="object"&&e[p]!==void 0&&(d[p]["--grid-gap"]=Ht(e[p])),typeof n=="object"&&n[p]!==void 0&&(d[p]["--grid-row-gap"]=Ht(n[p])),typeof t=="object"&&t[p]!==void 0&&(d[p]["--grid-column-gap"]=Ht(t[p])),d),{}),h=Th(At(c),l).filter(d=>At(c[d.value]).length>0).map(d=>({query:a==="container"?`mantine-grid (min-width: ${l[d.value]})`:`(min-width: ${l[d.value]})`,styles:c[d.value]}));return b.jsx(wc,{styles:f,media:a==="container"?void 0:h,container:a==="container"?h:void 0,selector:i})}const Dee={gap:"md",columns:12},TI=(e,{justify:n,align:t,overflow:i})=>({root:{"--grid-justify":n,"--grid-align":t,"--grid-overflow":i}}),Nr=Pe(e=>{const n=ye("Grid",Dee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,grow:f,gap:c,rowGap:h,columnGap:d,columns:p,align:v,justify:y,children:w,breakpoints:k,type:_,attributes:S,...C}=n,E=Xe({name:"Grid",classes:lC,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:S,vars:l,varsResolver:TI}),O=H1();return _==="container"&&k?b.jsxs(K5,{value:{getStyles:E,grow:f,columns:p,breakpoints:k,type:_},children:[b.jsx(J5,{selector:`.${O}`,...n}),b.jsx("div",{...E("container"),children:b.jsx(ve,{...E("root",{className:O}),...C,children:b.jsx("div",{...E("inner"),children:w})})})]}):b.jsxs(K5,{value:{getStyles:E,grow:f,columns:p,breakpoints:k,type:_},children:[b.jsx(J5,{selector:`.${O}`,...n}),b.jsx(ve,{...E("root",{className:O}),...C,children:b.jsx("div",{...E("inner"),children:w})})]})});Nr.classes=lC;Nr.varsResolver=TI;Nr.displayName="@mantine/core/Grid";Nr.Col=uC;const Ree=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],ej={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"};function nj(e){Object.keys(ej).forEach(n=>{e.style.setProperty(n,ej[n],"important")})}function Pee(e){const n=window.getComputedStyle(e);if(n===null)return null;const t={};for(const i of Ree)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 xi=null;function Nee(e,n,t=1,i=1/0){xi||(xi=document.createElement("textarea"),xi.setAttribute("tabindex","-1"),xi.setAttribute("aria-hidden","true"),xi.setAttribute("aria-label","autosize measurement"),nj(xi)),xi.parentNode===null&&document.body.appendChild(xi);const{paddingSize:r,borderSize:a,sizingStyle:o}=e,{boxSizing:l}=o;Object.keys(o).forEach(p=>{xi.style[p]=o[p]}),nj(xi),xi.value=n;let f=l==="border-box"?xi.scrollHeight+a:xi.scrollHeight-r;xi.value=n,f=l==="border-box"?xi.scrollHeight+a:xi.scrollHeight-r,xi.value="x";const c=xi.scrollHeight-r;let h=c*t;l==="border-box"&&(h=h+r+a),f=Math.max(h,f);let d=c*i;return l==="border-box"&&(d=d+r+a),f=Math.min(d,f),[f,c]}function $ee({maxRows:e,minRows:n,onChange:t,ref:i,...r}){const a=r.value!==void 0,o=A.useRef(null),l=It(o,i),f=A.useRef(0),c=()=>{const d=o.current;if(!d)return;const p=Pee(d);if(!p)return;const[v]=Nee(p,d.value||d.placeholder||"x",n,e);f.current!==v&&(f.current=v,d.style.setProperty("height",`${v}px`,"important"))},h=d=>{a||c(),t==null||t(d)};return A.useLayoutEffect(c),A.useEffect(()=>{const d=()=>c();return window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[]),A.useEffect(()=>{const d=()=>c();return document.fonts.addEventListener("loadingdone",d),()=>document.fonts.removeEventListener("loadingdone",d)},[]),A.useEffect(()=>{const d=p=>{var v;if(((v=o.current)==null?void 0:v.form)===p.target&&!a){const y=o.current.value;requestAnimationFrame(()=>{o.current&&y!==o.current.value&&c()})}};return document.body.addEventListener("reset",d),()=>document.body.removeEventListener("reset",d)},[a]),b.jsx("textarea",{...r,onChange:h,ref:l})}const zee={size:"sm"},Hf=Pe(e=>{const{autosize:n,maxRows:t,minRows:i,__staticSelector:r,resize:a,...o}=ye("Textarea",zee,e),l=n&&hK()!=="test",f=l?{maxRows:t,minRows:i}:{};return b.jsx(Bi,{component:l?$ee:"textarea",...o,__staticSelector:r||"Textarea",multiline:!0,"data-no-overflow":n&&t===void 0||void 0,__vars:{"--input-resize":a},...f})});Hf.classes=Bi.classes;Hf.displayName="@mantine/core/Textarea";const[Lee,ol]=fa("Menu component was not found in the tree");var sl={dropdown:"m_dc9b7c9f",label:"m_9bfac126",divider:"m_efdf90cb",item:"m_99ac2aa1",itemLabel:"m_5476e0d3",itemSection:"m_8b75e504",chevron:"m_b85b0bed"};const fC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("MenuDivider",null,e);return b.jsx(ve,{...ol().getStyles("divider",{className:t,style:i,styles:r,classNames:n}),...o})});fC.classes=sl;fC.displayName="@mantine/core/MenuDivider";const cC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,onMouseEnter:o,onMouseLeave:l,onKeyDown:f,children:c,ref:h,...d}=ye("MenuDropdown",null,e),p=A.useRef(null),v=ol(),y=mr(f,_=>{var S,C;(_.key==="ArrowUp"||_.key==="ArrowDown")&&(_.preventDefault(),(C=(S=p.current)==null?void 0:S.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||C.focus())}),w=mr(o,()=>(v.trigger==="hover"||v.trigger==="click-hover")&&v.openDropdown()),k=mr(l,()=>(v.trigger==="hover"||v.trigger==="click-hover")&&v.closeDropdown());return b.jsxs(En.Dropdown,{...d,onMouseEnter:w,onMouseLeave:k,role:"menu","aria-orientation":"vertical",ref:It(h,p),...v.getStyles("dropdown",{className:t,style:i,styles:r,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:y,children:[v.withInitialFocusPlaceholder&&b.jsx("div",{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),c]})});cC.classes=sl;cC.displayName="@mantine/core/MenuDropdown";const Rh=A.createContext(null),dC=Ii(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,color:o,closeMenuOnClick:l,leftSection:f,rightSection:c,children:h,disabled:d,"data-disabled":p,ref:v,...y}=ye("MenuItem",null,e),w=ol(),k=A.use(Rh),_=ii(),{dir:S}=gu(),C=A.useRef(null),E=y,O=mr(E.onClick,()=>{p||(typeof l=="boolean"?l&&w.closeDropdownImmediately():w.closeOnItemClick&&w.closeDropdownImmediately())}),T=o?_.variantColorResolver({color:o,theme:_,variant:"light"}):void 0,M=o?ts({color:o,theme:_}):null,N=mr(E.onKeyDown,F=>{F.key==="ArrowLeft"&&k&&(k.close(),k.focusParentItem())});return b.jsxs(di,{onMouseDown:F=>F.preventDefault(),...y,unstyled:w.unstyled,tabIndex:w.menuItemTabIndex,...w.getStyles("item",{className:t,style:i,styles:r,classNames:n}),ref:It(C,v),role:"menuitem",disabled:d,"data-menu-item":!0,"data-disabled":d||p||void 0,"data-mantine-stop-propagation":!0,onClick:O,onKeyDown:m6({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:w.loop,dir:S,orientation:"vertical",onKeyDown:N}),__vars:{"--menu-item-color":M!=null&&M.isThemeColor&&(M==null?void 0:M.shade)===void 0?`var(--mantine-color-${M.color}-6)`:T==null?void 0:T.color,"--menu-item-hover":T==null?void 0:T.hover},children:[f&&b.jsx("div",{...w.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"left",children:f}),h&&b.jsx("div",{...w.getStyles("itemLabel",{styles:r,classNames:n}),children:h}),c&&b.jsx("div",{...w.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"right",children:c})]})});dC.classes=sl;dC.displayName="@mantine/core/MenuItem";const hC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("MenuLabel",null,e);return b.jsx(ve,{...ol().getStyles("label",{className:t,style:i,styles:r,classNames:n}),...o})});hC.classes=sl;hC.displayName="@mantine/core/MenuLabel";const mC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,onMouseEnter:o,onMouseLeave:l,onKeyDown:f,children:c,ref:h,...d}=ye("MenuSubDropdown",null,e),p=A.useRef(null),v=ol(),y=A.use(Rh),w=mr(o,y==null?void 0:y.open),k=mr(l,y==null?void 0:y.close);return b.jsx(En.Dropdown,{...d,onMouseEnter:w,onMouseLeave:k,role:"menu","aria-orientation":"vertical",ref:It(h,p),...v.getStyles("dropdown",{className:t,style:i,styles:r,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,children:c})});mC.classes=sl;mC.displayName="@mantine/core/MenuSubDropdown";const pC=Ii(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,color:o,leftSection:l,rightSection:f,children:c,disabled:h,"data-disabled":d,closeMenuOnClick:p,ref:v,...y}=ye("MenuSubItem",null,e),w=ol(),k=A.use(Rh),_=ii(),{dir:S}=gu(),C=A.useRef(null),E=y,O=o?_.variantColorResolver({color:o,theme:_,variant:"light"}):void 0,T=o?ts({color:o,theme:_}):null,M=mr(E.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())}),N=mr(E.onClick,()=>{!d&&p&&w.closeDropdownImmediately()}),F=mr(E.onMouseEnter,k==null?void 0:k.open),R=mr(E.onMouseLeave,k==null?void 0:k.close);return b.jsxs(di,{onMouseDown:L=>L.preventDefault(),...y,unstyled:w.unstyled,tabIndex:w.menuItemTabIndex,...w.getStyles("item",{className:t,style:i,styles:r,classNames:n}),ref:It(C,v),role:"menuitem",disabled:h,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":h||d||void 0,"data-mantine-stop-propagation":!0,onMouseEnter:F,onMouseLeave:R,onClick:N,onKeyDown:m6({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":T!=null&&T.isThemeColor&&(T==null?void 0:T.shade)===void 0?`var(--mantine-color-${T.color}-6)`:O==null?void 0:O.color,"--menu-item-hover":O==null?void 0:O.hover},children:[l&&b.jsx("div",{...w.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"left",children:l}),c&&b.jsx("div",{...w.getStyles("itemLabel",{styles:r,classNames:n}),children:c}),b.jsx("div",{...w.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"right",children:f||b.jsx(kg,{...w.getStyles("chevron"),size:14})})]})});pC.classes=sl;pC.displayName="@mantine/core/MenuSubItem";function jI({children:e,refProp:n}){if(!h6(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(),b.jsx(En.Target,{refProp:n,popupType:"menu",children:e})}jI.displayName="@mantine/core/MenuSubTarget";const Iee={offset:0,position:"right-start",transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function Tc(e){const{children:n,closeDelay:t,openDelay:i,...r}=ye("MenuSub",Iee,e),a=Ki(),[o,{open:l,close:f}]=J$(!1),c=A.use(Rh),{openDropdown:h,closeDropdown:d}=Yz({open:l,close:f,closeDelay:t,openDelay:i}),p=()=>window.setTimeout(()=>{var y,w;(w=(y=document.getElementById(`${a}-dropdown`))==null?void 0:y.querySelectorAll("[data-menu-item]:not([data-disabled])")[0])==null||w.focus()},16),v=()=>window.setTimeout(()=>{var y;(y=document.getElementById(`${a}-target`))==null||y.focus()},16);return b.jsx(Rh,{value:{opened:o,close:d,open:h,focusFirstItem:p,focusParentItem:v,parentContext:c},children:b.jsx(En,{opened:o,withinPortal:!1,withArrow:!1,id:a,...r,children:n})})}Tc.extend=e=>e;Tc.displayName="@mantine/core/MenuSub";Tc.Target=jI;Tc.Dropdown=mC;Tc.Item=pC;const Bee={refProp:"ref"};function MI(e){const{children:n,refProp:t,...i}=ye("MenuTarget",Bee,e),r=pu(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=mr(o.onClick,()=>{a.trigger==="click"?a.toggleDropdown():a.trigger==="click-hover"&&(a.setOpenedViaClick(!0),a.opened||a.openDropdown())}),f=mr(o.onMouseEnter,()=>(a.trigger==="hover"||a.trigger==="click-hover")&&a.openDropdown()),c=mr(o.onMouseLeave,()=>{(a.trigger==="hover"||a.trigger==="click-hover"&&!a.openedViaClick)&&a.closeDropdown()});return b.jsx(En.Target,{refProp:t,popupType:"menu",...i,children:A.cloneElement(r,{onClick:l,onMouseEnter:f,onMouseLeave:c,"data-expanded":a.opened?!0:void 0})})}MI.displayName="@mantine/core/MenuTarget";const Fee={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:["mousedown","touchstart","keydown"],loop:!0,trigger:"click",openDelay:0,closeDelay:100,menuItemTabIndex:-1},Gn=Pe(e=>{const n=ye("Menu",Fee,e),{children:t,onOpen:i,onClose:r,opened:a,defaultOpened:o,trapFocus:l,onChange:f,closeOnItemClick:c,loop:h,closeOnEscape:d,trigger:p,openDelay:v,closeDelay:y,classNames:w,styles:k,unstyled:_,variant:S,vars:C,menuItemTabIndex:E,keepMounted:O,withInitialFocusPlaceholder:T,attributes:M,...N}=n,F=Xe({name:"Menu",classes:sl,props:n,classNames:w,styles:k,unstyled:_,attributes:M}),[R,L]=Oi({value:a,defaultValue:o,finalValue:!1,onChange:f}),[B,G]=A.useState(!1),U=()=>{L(!1),G(!1),R&&(r==null||r())},H=()=>{L(!0),!R&&(i==null||i())},P=()=>{R?U():H()},{openDropdown:$,closeDropdown:q}=Yz({open:H,close:U,closeDelay:y,openDelay:v}),Y=V=>YY("[data-menu-item]","[data-menu-dropdown]",V),{resolvedClassNames:D,resolvedStyles:W}=Li({classNames:w,styles:k,props:n});return b.jsx(Lee,{value:{getStyles:F,opened:R,toggleDropdown:P,getItemIndex:Y,openedViaClick:B,setOpenedViaClick:G,closeOnItemClick:c,closeDropdown:p==="click"?U:q,openDropdown:p==="click"?H:$,closeDropdownImmediately:U,loop:h,trigger:p,unstyled:_,menuItemTabIndex:E,withInitialFocusPlaceholder:T},children:b.jsx(En,{returnFocus:!0,...N,opened:R,onChange:P,defaultOpened:o,trapFocus:O?!1:l,closeOnEscape:d,__staticSelector:"Menu",classNames:D,styles:W,unstyled:_,variant:S,keepMounted:O,children:t})})});Gn.displayName="@mantine/core/Menu";Gn.classes=sl;Gn.Item=dC;Gn.Label=hC;Gn.Dropdown=cC;Gn.Target=MI;Gn.Divider=fC;Gn.Sub=Tc;const[qee,jc]=fa("Modal component was not found in tree");var rs={root:"m_9df02822",content:"m_54c44539",inner:"m_1f958f16",header:"m_d0e2b9cd"};const gy=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("ModalBody",null,e);return b.jsx(SL,{...jc().getStyles("body",{classNames:n,style:i,styles:r,className:t}),...o})});gy.classes=rs;gy.displayName="@mantine/core/ModalBody";const yy=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("ModalCloseButton",null,e);return b.jsx(CL,{...jc().getStyles("close",{classNames:n,style:i,styles:r,className:t}),...o})});yy.classes=rs;yy.displayName="@mantine/core/ModalCloseButton";const by=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,children:o,__hidden:l,...f}=ye("ModalContent",null,e),c=jc(),h=c.scrollAreaComponent||CJ;return b.jsx(AL,{...c.getStyles("content",{className:t,style:i,styles:r,classNames:n}),innerProps:c.getStyles("inner",{className:t,style:i,styles:r,classNames:n}),"data-full-screen":c.fullScreen||void 0,"data-modal-content":!0,"data-hidden":l||void 0,...f,children:b.jsx(h,{style:{maxHeight:c.fullScreen?"100dvh":`calc(100dvh - (${me(c.yOffset)} * 2))`},children:o})})});by.classes=rs;by.displayName="@mantine/core/ModalContent";const wy=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("ModalHeader",null,e);return b.jsx(OL,{...jc().getStyles("header",{classNames:n,style:i,styles:r,className:t}),...o})});wy.classes=rs;wy.displayName="@mantine/core/ModalHeader";const ky=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("ModalOverlay",null,e);return b.jsx(EL,{...jc().getStyles("overlay",{classNames:n,style:i,styles:r,className:t}),...o})});ky.classes=rs;ky.displayName="@mantine/core/ModalOverlay";const Hee={__staticSelector:"Modal",closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:ca("modal"),transitionProps:{duration:200,transition:"fade-down"},yOffset:"5dvh"},DI=(e,{radius:n,size:t,yOffset:i,xOffset:r})=>({root:{"--modal-radius":n===void 0?void 0:Gt(n),"--modal-size":Tn(t,"modal-size"),"--modal-y-offset":me(i),"--modal-x-offset":me(r)}}),Lm=Pe(e=>{const n=ye("ModalRoot",Hee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,yOffset:f,scrollAreaComponent:c,radius:h,fullScreen:d,centered:p,xOffset:v,__staticSelector:y,attributes:w,...k}=n,_=Xe({name:y,classes:rs,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l,varsResolver:DI});return b.jsx(qee,{value:{yOffset:f,scrollAreaComponent:c,getStyles:_,fullScreen:d},children:b.jsx(xL,{..._("root"),"data-full-screen":d||void 0,"data-centered":p||void 0,"data-offset-scrollbars":c===Na.Autosize||void 0,unstyled:o,...k})})});Lm.classes=rs;Lm.varsResolver=DI;Lm.displayName="@mantine/core/ModalRoot";const RI=A.createContext(null);function PI({children:e}){const[n,t]=A.useState([]),[i,r]=A.useState(ca("modal"));return b.jsx(RI,{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})}PI.displayName="@mantine/core/ModalStack";const _y=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("ModalTitle",null,e);return b.jsx(TL,{...jc().getStyles("title",{classNames:n,style:i,styles:r,className:t}),...o})});_y.classes=rs;_y.displayName="@mantine/core/ModalTitle";const Uee={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:ca("modal"),transitionProps:{duration:200,transition:"fade-down"},withOverlay:!0,withCloseButton:!0},Br=Pe(e=>{const{title:n,withOverlay:t,overlayProps:i,withCloseButton:r,closeButtonProps:a,children:o,radius:l,opened:f,stackId:c,zIndex:h,...d}=ye("Modal",Uee,e),p=A.use(RI),v=!!n||r,y=p&&c?{closeOnEscape:p.currentId===c,trapFocus:p.currentId===c,zIndex:p.getZIndex(c)}:{},w=t===!1?!1:c&&p?p.currentId===c:f;return A.useEffect(()=>{p&&c&&(f?p.addModal(c,h||ca("modal")):p.removeModal(c))},[f,c,h]),b.jsxs(Lm,{radius:l,opened:f,zIndex:p&&c?p.getZIndex(c):h,...d,...y,children:[t&&b.jsx(ky,{visible:w,transitionProps:p&&c?{duration:0}:void 0,...i}),b.jsxs(by,{radius:l,__hidden:p&&c&&f?c!==p.currentId:!1,children:[v&&b.jsxs(wy,{children:[n&&b.jsx(_y,{children:n}),r&&b.jsx(yy,{...a})]}),b.jsx(gy,{children:o})]})]})});Br.classes=rs;Br.displayName="@mantine/core/Modal";Br.Root=Lm;Br.Overlay=ky;Br.Content=by;Br.Body=gy;Br.Header=wy;Br.Title=_y;Br.CloseButton=yy;Br.Stack=PI;const xy=A.createContext(null);var Sy={root:"m_7cda1cd6","root--default":"m_44da308b","root--contrast":"m_e3a01f8",label:"m_1e0e6180",remove:"m_ae386778",group:"m_1dcfd90b"};const NI=A.createContext(null),$I=(e,{gap:n},{size:t})=>({group:{"--pg-gap":n!==void 0?Tn(n):Tn(t,"pg-gap")}}),Cy=Pe(e=>{var y;const n=ye("PillGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:f,disabled:c,attributes:h,...d}=n,p=((y=A.use(xy))==null?void 0:y.size)||f||void 0,v=Xe({name:"PillGroup",classes:Sy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l,varsResolver:$I,stylesCtx:{size:p},rootSelector:"group"});return b.jsx(NI,{value:{size:p,disabled:c},children:b.jsx(ve,{size:p,...v("group"),...d})})});Cy.classes=Sy;Cy.varsResolver=$I;Cy.displayName="@mantine/core/PillGroup";const Vee={variant:"default"},zI=(e,{radius:n},{size:t})=>({root:{"--pill-fz":Tn(t,"pill-fz"),"--pill-height":Tn(t,"pill-height"),"--pill-radius":n===void 0?void 0:Gt(n)}}),il=Pe(e=>{const n=ye("Pill",Vee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,variant:f,children:c,withRemoveButton:h,onRemove:d,removeButtonProps:p,radius:v,size:y,disabled:w,mod:k,attributes:_,...S}=n,C=A.use(NI),E=A.use(xy),O=y||(C==null?void 0:C.size)||void 0,T=(E==null?void 0:E.variant)==="filled"?"contrast":f||"default",M=Xe({name:"Pill",classes:Sy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:_,vars:l,varsResolver:zI,stylesCtx:{size:O}});return b.jsxs(ve,{component:"span",variant:T,size:O,...M("root",{variant:T}),mod:[{"with-remove":h&&!w,disabled:w||(C==null?void 0:C.disabled)},k],...S,children:[b.jsx("span",{...M("label"),children:c}),h&&b.jsx(yu,{variant:"transparent",radius:v,tabIndex:-1,"aria-hidden":!0,unstyled:o,...p,...M("remove",{className:p==null?void 0:p.className,style:p==null?void 0:p.style}),onMouseDown:N=>{var F;N.preventDefault(),N.stopPropagation(),(F=p==null?void 0:p.onMouseDown)==null||F.call(p,N)},onClick:N=>{var F;N.stopPropagation(),d==null||d(),(F=p==null?void 0:p.onClick)==null||F.call(p,N)}})]})});il.classes=Sy;il.varsResolver=zI;il.displayName="@mantine/core/Pill";il.Group=Cy;var LI={field:"m_45c4369d"};const Wee={type:"visible"},vC=Pe(e=>{const n=ye("PillsInputField",Wee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,type:f,disabled:c,id:h,pointer:d,mod:p,attributes:v,ref:y,...w}=n,k=A.use(xy),_=A.use(bu),S=Xe({name:"PillsInputField",classes:LI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,rootSelector:"field"}),C=c||(k==null?void 0:k.disabled);return b.jsx(ve,{component:"input",ref:It(y,k==null?void 0:k.fieldRef),"data-type":f,disabled:C,mod:[{disabled:C,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:E=>!d&&E.stopPropagation()})});vC.classes=LI;vC.displayName="@mantine/core/PillsInputField";const Gee={size:"sm"},ou=Pe(e=>{const{children:n,onMouseDown:t,onClick:i,size:r,disabled:a,__staticSelector:o,error:l,variant:f,...c}=ye("PillsInput",Gee,e),h=A.useRef(null);return b.jsx(xy,{value:{fieldRef:h,size:r,disabled:a,hasError:!!l,variant:f},children:b.jsx(Bi,{size:r,error:l,variant:f,component:"div","data-no-overflow":!0,onMouseDown:d=>{var p;d.preventDefault(),t==null||t(d),(p=h.current)==null||p.focus()},onClick:d=>{var p,v;d.preventDefault(),(p=d.currentTarget.closest("fieldset"))!=null&&p.disabled||((v=h.current)==null||v.focus(),i==null||i(d))},...c,multiline:!0,disabled:a,__staticSelector:o||"PillsInput",withAria:!1,children:n})})});ou.displayName="@mantine/core/PillsInput";ou.classes=Bi.classes;ou.Field=vC;function uk(e){return typeof e=="string"?e.trim().toLowerCase():e}function Yee({data:e,value:n}){const t=n.map(uk);return e.reduce((i,r)=>(au(r)?i.push({group:r.group,items:r.items.filter(a=>t.indexOf(uk(a.value))===-1)}):t.indexOf(uk(r.value))===-1&&i.push(r),i),[])}const tj={xs:41,sm:50,md:60,lg:72,xl:89},Kee={maxValues:1/0,withCheckIcon:!0,checkIconPosition:"left",hiddenInputValuesDivider:",",clearSearchOnChange:!0,openOnFocus:!0,size:"sm"},Ay=U1(e=>{const n=ye("MultiSelect",Kee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:f,value:c,defaultValue:h,onChange:d,onKeyDown:p,variant:v,data:y,dropdownOpened:w,defaultDropdownOpened:k,onDropdownOpen:_,onDropdownClose:S,selectFirstOptionOnChange:C,selectFirstOptionOnDropdownOpen:E,onOptionSubmit:O,comboboxProps:T,filter:M,limit:N,withScrollArea:F,maxDropdownHeight:R,searchValue:L,defaultSearchValue:B,onSearchChange:G,readOnly:U,disabled:H,onFocus:P,onBlur:$,radius:q,rightSection:Y,rightSectionWidth:D,rightSectionPointerEvents:W,rightSectionProps:V,leftSection:z,leftSectionWidth:X,leftSectionPointerEvents:ee,leftSectionProps:re,inputContainer:le,inputWrapperOrder:be,withAsterisk:ae,labelProps:ue,descriptionProps:Ce,errorProps:ne,wrapperProps:Ne,description:pe,label:Ee,error:Re,maxValues:we,searchable:Se,nothingFoundMessage:De,withCheckIcon:qe,withAlignedLabels:Ve,checkIconPosition:Ue,hidePickedOptions:We,withErrorStyles:Ye,name:sn,form:ie,id:se,clearable:ke,clearSectionMode:Ze,clearButtonProps:_e,hiddenInputProps:fe,placeholder:Be,hiddenInputValuesDivider:pn,required:Je,mod:en,renderOption:Ke,renderPill:jn,onRemove:un,onClear:tt,onMaxValues:pt,scrollAreaProps:Mn,chevronColor:bn,attributes:_n,clearSearchOnChange:it,openOnFocus:Et,loading:ze,loadingPosition:Fe,...Dn}=n,et=Ki(se),An=ry(y),nn=Nm(An),tn=A.useRef({}),rn=$m({opened:w,defaultOpened:k,onDropdownOpen:()=>{_==null||_(),E&&rn.selectFirstOption()},onDropdownClose:()=>{S==null||S(),rn.resetSelectedOption()}}),{styleProps:Ln,rest:{type:In,autoComplete:kt,...Sn}}=vu(Dn),[xn,Hn]=Oi({value:c,defaultValue:h,finalValue:[],onChange:d}),[Vt,mi]=Oi({value:L,defaultValue:B,finalValue:"",onChange:G}),Zi=ln=>{mi(ln),rn.resetSelectedOption()},ga=Xe({name:"MultiSelect",classes:{},props:n,classNames:t,styles:a,unstyled:o,attributes:_n}),{resolvedClassNames:co,resolvedStyles:za}=Li({props:n,styles:a,classNames:t}),br=ln=>{p==null||p(ln),ln.key===" "&&!Se&&(ln.preventDefault(),rn.toggleDropdown()),ln.key==="Backspace"&&Vt.length===0&&xn.length>0&&(un==null||un(xn[xn.length-1]),Hn(xn.slice(0,xn.length-1)))},La=xn.map((ln,_r)=>{var xr;const Ia=nn[`${ln}`]||tn.current[`${ln}`];return jn?b.jsx(A.Fragment,{children:jn({option:Ia,value:ln,onRemove:()=>{Hn(xn.filter(Fr=>ln!==Fr)),un==null||un(ln)},disabled:H})},`${ln}-${_r}`):b.jsx(il,{withRemoveButton:!U&&!((xr=nn[`${ln}`])!=null&&xr.disabled),onRemove:()=>{Hn(xn.filter(Fr=>ln!==Fr)),un==null||un(ln)},unstyled:o,disabled:H,...ga("pill"),children:(Ia==null?void 0:Ia.label)||ln},`${ln}-${_r}`)});A.useEffect(()=>{C&&rn.selectFirstOption()},[C,Vt]),A.useEffect(()=>{xn.forEach(ln=>{`${ln}`in nn&&(tn.current[`${ln}`]=nn[`${ln}`])})},[nn,xn]);const wr=b.jsx(Cn.ClearButton,{..._e,onClear:()=>{tt==null||tt(),Hn([]),Zi("")}}),kr=Yee({data:An,value:xn}),dn=ke&&xn.length>0&&!H&&!U,ri=dn?{paddingInlineEnd:tj[f]??tj.sm}:void 0;return b.jsxs(b.Fragment,{children:[b.jsxs(Cn,{store:rn,classNames:co,styles:za,unstyled:o,size:f,readOnly:U,__staticSelector:"MultiSelect",attributes:_n,onOptionSubmit:ln=>{O==null||O(ln),it&&Zi(""),rn.updateSelectedOptionIndex("selected"),xn.includes(nn[`${ln}`].value)?(Hn(xn.filter(_r=>_r!==nn[`${ln}`].value)),un==null||un(nn[`${ln}`].value)):xn.lengthSe?rn.openDropdown():rn.toggleDropdown(),"data-expanded":rn.dropdownOpened||void 0,id:et,required:Je,mod:en,attributes:_n,children:b.jsxs(il.Group,{attributes:_n,disabled:H,unstyled:o,...ga("pillsList",{style:ri}),children:[La,b.jsx(Cn.EventsTarget,{autoComplete:kt,withExpandedAttribute:!0,children:b.jsx(ou.Field,{...Sn,id:et,placeholder:Be,type:!Se&&!Be?"hidden":"visible",...ga("inputField"),unstyled:o,onFocus:ln=>{P==null||P(ln),Et&&Se&&rn.openDropdown()},onBlur:ln=>{$==null||$(ln),rn.closeDropdown(),Zi("")},onKeyDown:br,value:Vt,onChange:ln=>{Zi(ln.currentTarget.value),Se&&rn.openDropdown(),C&&rn.selectFirstOption()},disabled:H,readOnly:U||!Se,pointer:!Se})})]})})}),b.jsx(ly,{data:We?kr:An,hidden:U||H,filter:M,search:Vt,limit:N,hiddenWhenEmpty:!De,withScrollArea:F,maxDropdownHeight:R,filterOptions:Se,value:xn,checkIconPosition:Ue,withCheckIcon:qe,withAlignedLabels:Ve,nothingFoundMessage:De,unstyled:o,labelId:Ee?`${et}-label`:void 0,"aria-label":Ee?void 0:Dn["aria-label"],renderOption:Ke,scrollAreaProps:Mn})]}),b.jsx(Cn.HiddenInput,{name:sn,valuesDivider:pn,value:xn,form:ie,disabled:H,...fe})]})});Ay.classes={...Bi.classes,...Cn.classes};Ay.displayName="@mantine/core/MultiSelect";var II={root:"m_a513464",icon:"m_a4ceffb",loader:"m_b0920b15",body:"m_a49ed24",title:"m_3feedf16",description:"m_3d733a3a",closeButton:"m_919a4d88"};const Xee={withCloseButton:!0},BI=(e,{radius:n,color:t})=>({root:{"--notification-radius":n===void 0?void 0:Gt(n),"--notification-color":t?nt(t,e):void 0}}),Oy=Pe(e=>{const n=ye("Notification",Xee,e),{className:t,color:i,radius:r,loading:a,withCloseButton:o,withBorder:l,title:f,icon:c,children:h,onClose:d,closeButtonProps:p,classNames:v,style:y,styles:w,unstyled:k,vars:_,mod:S,loaderProps:C,role:E,attributes:O,...T}=n,M=Xe({name:"Notification",classes:II,props:n,className:t,style:y,classNames:v,styles:w,unstyled:k,attributes:O,vars:_,varsResolver:BI});return b.jsxs(ve,{...M("root"),mod:[{"data-with-icon":!!c||a,"data-with-border":l},S],role:E||"alert",...T,children:[c&&!a&&b.jsx("div",{...M("icon"),children:c}),a&&b.jsx(zi,{size:28,color:i,...M("loader"),...C}),b.jsxs("div",{...M("body"),children:[f&&b.jsx("div",{...M("title"),children:f}),b.jsx(ve,{...M("description"),mod:{"data-with-title":!!f},children:h})]}),o&&b.jsx(yu,{iconSize:16,color:"gray",...p,unstyled:k,onClick:N=>{var F;(F=p==null?void 0:p.onClick)==null||F.call(p,N),d==null||d()},...M("closeButton")})]})});Oy.classes=II;Oy.varsResolver=BI;Oy.displayName="@mantine/core/Notification";function FI(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+rj("0",o-l):r=(r.substring(0,o)||"0")+"."+r.substring(o),t+r}function aj(e,n,t){if(["","-"].indexOf(e)!==-1)return e;var i=(e.indexOf(".")!==-1||t)&&n,r=gC(e),a=r.beforeDecimal,o=r.afterDecimal,l=r.hasNegation,f=parseFloat("0."+(o||"0")),c=o.length<=n?"0."+o:f.toFixed(n),h=c.split("."),d=a;a&&Number(h[0])&&(d=a.split("").reverse().reduce(function(w,k,_){return w.length>_?(Number(w[0])+Number(k)).toString()+w.substring(1,w.length):k+w},h[0]));var p=UI(h[1]||"",n,t),v=l?"-":"",y=i?".":"";return""+v+d+y+p}function Ul(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 WI=Zee(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}}}),tne=function(e,n){var t=Math.min(e.selectionStart,n);return{from:{start:t,end:e.selectionEnd},to:{start:t,end:n}}};function ine(e,n,t){return Math.min(Math.max(e,n),t)}function fk(e){return Math.max(e.selectionStart,e.selectionEnd)}function rne(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function ane(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function one(e){var n=e.currentValue,t=e.formattedValue,i=e.currentValueIndex,r=e.formattedValueIndex;return n[i]===t[r]}function sne(e,n,t,i,r,a,o){o===void 0&&(o=one);var l=r.findIndex(function(E){return E}),f=e.slice(0,l);!n&&!t.startsWith(f)&&(n=f,t=f+t,i=i+f.length);for(var c=t.length,h=e.length,d={},p=new Array(c),v=0;v0&&p[_]===-1;)_--;var C=_===-1||p[_]===-1?0:p[_]+1;return C>S?S:i-C=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 lne(e){for(var n=Array.from({length:e.length+1}).map(function(){return!0}),t=0,i=n.length;tM.length-o.length||TL||d>e.length-o.length)&&(R=d),e=e.substring(0,R),e=dne(C?"-"+e:e,r),e=(e.match(hne(y))||[]).join("");var B=e.indexOf(y);e=e.replace(new RegExp(HI(y),"g"),function($,q){return q===B?".":""});var G=gC(e,r),U=G.beforeDecimal,H=G.afterDecimal,P=G.addNegation;return c.end-c.startW?!1:D>=ee.start&&Dt?t:e}function _ne(e){return e.toString().replace(".","").length}function xne(e,n){return(typeof e=="number"?e=n)&&(t===void 0||e<=t)}const mk={size:"sm",step:1,clampBehavior:"blur",allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0,allowedDecimalSeparators:[".",","]},XI=(e,{size:n})=>({controls:{"--ni-chevron-size":Tn(n,"ni-chevron-size")}});function Cne(e,n,t){const i=e.toString(),r=YI.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=Bo(o,t,n);return r?`${l.toString().replace(/^0+(?=\d)/,"")}.`:l}function Ane(e,n){if(e===""||e==="-")return e;const t=ah(e);return t===null?e:n.clampBehavior==="blur"?ig(t,n.min,n.max):t}const Ty=U1(e=>{const n=ye("NumberInput",mk,e),{className:t,classNames:i,styles:r,unstyled:a,vars:o,onChange:l,onValueChange:f,value:c,defaultValue:h,max:d,min:p,step:v,hideControls:y,rightSection:w,isAllowed:k,clampBehavior:_,onBlur:S,allowDecimal:C,decimalScale:E,onKeyDown:O,onKeyDownCapture:T,handlersRef:M,startValue:N,disabled:F,rightSectionPointerEvents:R,allowNegative:L,readOnly:B,size:G,rightSectionWidth:U,stepHoldInterval:H,stepHoldDelay:P,allowLeadingZeros:$,withKeyboardEvents:q,trimLeadingZeroesOnBlur:Y,allowedDecimalSeparators:D,selectAllOnFocus:W,onMinReached:V,onMaxReached:z,onFocus:X,attributes:ee,ref:re,...le}=n,be=L??!0,ae=$??!0,ue=Xe({name:"NumberInput",classes:cS,props:n,classNames:i,styles:r,unstyled:a,attributes:ee,vars:o,varsResolver:XI}),{resolvedClassNames:Ce,resolvedStyles:ne}=Li({classNames:i,styles:r,props:n}),Ne=A.useRef(ck(c)||ck(h)?"bigint":"number");ck(c)?Ne.current="bigint":typeof c=="number"&&(Ne.current="number");const pe=Ne.current==="bigint",[Ee,Re]=Oi({value:c,defaultValue:h,finalValue:"",onChange:l}),we=P!==void 0&&H!==void 0,Se=A.useRef(null),De=A.useRef(null),qe=A.useRef(0),Ve=typeof p=="number"?p:void 0,Ue=typeof d=="number"?d:void 0,We=typeof v=="number"?v:mk.step,Ye=typeof N=="number"?N:mk.startValue,sn=Cv(p),ie=Cv(d),se=Cv(v)??BigInt(1),ke=Cv(N)??BigInt(0),Ze=ze=>!KI(ze,be)||ae&&uj.test(ze)?ze:ah(ze)??ze,_e=ze=>{const Fe=Number(ze);return Number.isSafeInteger(Fe)?Fe:void 0},fe=(ze,Fe)=>{Fe.source==="event"&&Re(pe?Ze(ze.value):xne(ze.floatValue,ze.value)&&!wne.test(ze.value)&&!(ae&&uj.test(ze.value))&&!kne.test(ze.value)&&!YI.test(ze.value)?ze.floatValue:ze.value),f==null||f(ze,Fe)},Be=ze=>{const Fe=String(ze).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return Fe?Math.max(0,(Fe[1]?Fe[1].length:0)-(Fe[2]?+Fe[2]:0)):0},pn=ze=>{Se.current&&typeof ze<"u"&&Se.current.setSelectionRange(ze,ze)},Je=A.useRef(Y3);Je.current=()=>{if(pe){if(!hk(Ee,be))return;let tn;const rn=Ee;if(typeof rn=="bigint"){const In=rn+se;ie!==void 0&&In>ie&&(z==null||z()),tn=ie!==void 0&&In>ie?ie:In}else if(typeof rn=="string"&&rn!==""){const In=ah(rn);if(In===null)return;const kt=In+se;ie!==void 0&&kt>ie&&(z==null||z()),tn=ie!==void 0&&kt>ie?ie:kt}else tn=ig(ke,sn,ie);const Ln=tn.toString();Re(tn),f==null||f({floatValue:_e(tn),formattedValue:Ln,value:Ln},{source:"increment"}),setTimeout(()=>{var In;return pn((In=Se.current)==null?void 0:In.value.length)},0);return}if(!dk(Ee))return;let ze;const Fe=Be(Ee),Dn=Be(We),et=Math.max(Fe,Dn),An=10**et;if(!dS(Ee)&&(typeof Ee!="number"||Number.isNaN(Ee)))ze=Bo(Ye,Ve,Ue);else if(Ue!==void 0){const tn=(Math.round(Number(Ee)*An)+Math.round(We*An))/An;tn>Ue&&(z==null||z()),ze=tn<=Ue?tn:Ue}else ze=(Math.round(Number(Ee)*An)+Math.round(We*An))/An;const nn=ze.toFixed(et);Re(parseFloat(nn)),f==null||f({floatValue:parseFloat(nn),formattedValue:nn,value:nn},{source:"increment"}),setTimeout(()=>{var tn;return pn((tn=Se.current)==null?void 0:tn.value.length)},0)};const en=A.useRef(Y3);en.current=()=>{if(pe){if(!hk(Ee,be))return;let rn;const Ln=sn!==void 0?sn:be?void 0:BigInt(0),In=Ee;if(typeof In=="bigint"){const Sn=In-se;Ln!==void 0&&Sn{var Sn;return pn((Sn=Se.current)==null?void 0:Sn.value.length)},0);return}if(!dk(Ee))return;let ze;const Fe=Ve!==void 0?Ve:be?Number.MIN_SAFE_INTEGER:0,Dn=Be(Ee),et=Be(We),An=Math.max(Dn,et),nn=10**An;if(!dS(Ee)&&typeof Ee!="number"||Number.isNaN(Ee))ze=Bo(Ye,Fe,Ue);else{const rn=(Math.round(Number(Ee)*nn)-Math.round(We*nn))/nn;Fe!==void 0&&rn{var rn;return pn((rn=Se.current)==null?void 0:rn.value.length)},0)};const Ke=ze=>{var An,nn,tn;const Fe=ze.clipboardData.getData("text"),Dn=le.decimalSeparator||".",et=(D||[".",","]).filter(rn=>rn!==Dn);if(et.some(rn=>Fe.includes(rn))){ze.preventDefault();let rn=Fe;et.forEach(In=>{rn=rn.split(In).join(Dn)});const Ln=Se.current;if(Ln){const In=Ln.selectionStart??0,kt=Ln.selectionEnd??0,Sn=Ln.value,xn=Sn.substring(0,In)+rn+Sn.substring(kt);(nn=(An=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:An.set)==null||nn.call(Ln,xn),Ln.dispatchEvent(new Event("change",{bubbles:!0}));const Hn=In+rn.length;setTimeout(()=>pn(Hn),0)}}(tn=le.onPaste)==null||tn.call(le,ze)},jn=ze=>{var Fe,Dn;O==null||O(ze),!(B||!q)&&(ze.key==="ArrowUp"&&(ze.preventDefault(),(Fe=Je.current)==null||Fe.call(Je)),ze.key==="ArrowDown"&&(ze.preventDefault(),(Dn=en.current)==null||Dn.call(en)))},un=ze=>{if(T==null||T(ze),ze.key==="Backspace"){const Fe=Se.current;Fe&&Fe.selectionStart===0&&Fe.selectionStart===Fe.selectionEnd&&(ze.preventDefault(),window.setTimeout(()=>pn(0),0))}},tt=ze=>{W&&setTimeout(()=>ze.currentTarget.select(),0),X==null||X(ze)},pt=ze=>{let Fe=Ee;pe?(_==="blur"&&typeof Fe=="bigint"&&(Fe=ig(Fe,sn,ie)),Y&&typeof Fe=="string"&&(Fe=Ane(Fe,{min:sn,max:ie,clampBehavior:_}))):(_==="blur"&&typeof Fe=="number"&&(Fe=Bo(Fe,Ve,Ue)),Y&&typeof Fe=="string"&&Be(Fe)<15&&(Fe=Cne(Fe,Ue,Ve))),Ee!==Fe&&Re(Fe),S==null||S(ze)};hg(M,{increment:Je.current,decrement:en.current});const Mn=ze=>{var Fe,Dn;ze?(Fe=Je.current)==null||Fe.call(Je):(Dn=en.current)==null||Dn.call(en),qe.current+=1},bn=ze=>{if(Mn(ze),we){const Fe=typeof H=="number"?H:H(qe.current);De.current=window.setTimeout(()=>bn(ze),Fe)}},_n=(ze,Fe)=>{var Dn;ze.preventDefault(),(Dn=Se.current)==null||Dn.focus(),Mn(Fe),we&&(De.current=window.setTimeout(()=>bn(Fe),P))},it=()=>{De.current&&window.clearTimeout(De.current),De.current=null,qe.current=0},Et=b.jsxs("div",{...ue("controls"),children:[b.jsx(di,{...ue("control"),tabIndex:-1,"aria-hidden":!0,disabled:F||typeof Ee=="number"&&Ue!==void 0&&Ee>=Ue||typeof Ee=="bigint"&&ie!==void 0&&Ee>=ie,mod:{direction:"up"},onMouseDown:ze=>ze.preventDefault(),onPointerDown:ze=>{_n(ze,!0)},onPointerUp:it,onPointerLeave:it,children:b.jsx(lj,{direction:"up"})}),b.jsx(di,{...ue("control"),tabIndex:-1,"aria-hidden":!0,disabled:F||typeof Ee=="number"&&Ve!==void 0&&Ee<=Ve||typeof Ee=="bigint"&&sn!==void 0&&Ee<=sn,mod:{direction:"down"},onMouseDown:ze=>ze.preventDefault(),onPointerDown:ze=>{_n(ze,!1)},onPointerUp:it,onPointerLeave:it,children:b.jsx(lj,{direction:"down"})})]});return b.jsx(Bi,{component:bne,allowNegative:L,className:cn(cS.root,t),size:G,...le,inputMode:pe?"numeric":"decimal",readOnly:B,disabled:F,value:typeof Ee=="bigint"?Ee.toString():Ee,getInputRef:It(re,Se),onValueChange:fe,rightSection:y||B||!(pe?hk(Ee,be):dk(Ee))?w:w||Et,classNames:Ce,styles:ne,unstyled:a,__staticSelector:"NumberInput",decimalScale:pe?0:C?E:0,onPaste:Ke,onFocus:tt,onKeyDown:jn,onKeyDownCapture:un,rightSectionPointerEvents:R??(F?"none":void 0),rightSectionWidth:U??`var(--ni-right-section-width-${G||"sm"})`,allowLeadingZeros:$,allowedDecimalSeparators:D,onBlur:pt,attributes:ee,isAllowed:ze=>{if(!(!k||k(ze)))return!1;if(_!=="strict")return!0;if(!pe)return Sne(ze.floatValue,Ve,Ue);if(ze.value===""||ze.value==="-")return!0;const Fe=ah(ze.value);return Fe===null?!0:(sn===void 0||Fe>=sn)&&(ie===void 0||Fe<=ie)}})});Ty.classes={...Bi.classes,...cS};Ty.varsResolver=XI;Ty.displayName="@mantine/core/NumberInput";function One({reveal:e}){return b.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?b.jsxs(b.Fragment,{children:[b.jsx("path",{fill:"none",d:"M0 0h256v256H0z"}),b.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"}),b.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"})]}):b.jsxs(b.Fragment,{children:[b.jsx("path",{fill:"none",d:"M0 0h256v256H0z"}),b.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"}),b.jsx("circle",{cx:"128",cy:"128",r:"40",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"})]})})}var hS={root:"m_f61ca620",input:"m_ccf8da4c",innerInput:"m_f2d85dd2",visibilityToggle:"m_b1072d44"};const Ene={visibilityToggleIcon:One,size:"sm"},ZI=(e,{size:n})=>({root:{"--psi-icon-size":Tn(n,"psi-icon-size"),"--psi-button-size":Tn(n,"psi-button-size")}}),jy=Pe(e=>{const n=ye("PasswordInput",Ene,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,required:f,error:c,leftSection:h,disabled:d,id:p,variant:v,inputContainer:y,description:w,label:k,size:_,errorProps:S,descriptionProps:C,labelProps:E,withAsterisk:O,inputWrapperOrder:T,wrapperProps:M,radius:N,rightSection:F,rightSectionWidth:R,rightSectionPointerEvents:L,leftSectionWidth:B,visible:G,defaultVisible:U,onVisibilityChange:H,visibilityToggleIcon:P,visibilityToggleButtonProps:$,rightSectionProps:q,leftSectionProps:Y,leftSectionPointerEvents:D,withErrorStyles:W,mod:V,attributes:z,...X}=n,ee=Ki(p),[re,le]=Oi({value:G,defaultValue:U,finalValue:!1,onChange:H}),be=()=>le(!re),ae=Xe({name:"PasswordInput",classes:hS,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:z,vars:l,varsResolver:ZI}),{resolvedClassNames:ue,resolvedStyles:Ce}=Li({classNames:t,styles:a,props:n}),{styleProps:ne,rest:Ne}=vu(X),pe=(S==null?void 0:S.id)||`${ee}-error`,Ee=(C==null?void 0:C.id)||`${ee}-description`,Re=`${c&&typeof c!="boolean"?pe:""} ${w?Ee:""}`,we=Re.trim().length>0?Re.trim():void 0,Se=b.jsx($t,{...ae("visibilityToggle"),disabled:d,radius:N,"aria-pressed":re,tabIndex:-1,"aria-label":"Toggle password visibility",...$,variant:($==null?void 0:$.variant)??"subtle",color:"gray",unstyled:o,onTouchEnd:De=>{var qe;De.preventDefault(),(qe=$==null?void 0:$.onTouchEnd)==null||qe.call($,De),be()},onMouseDown:De=>{var qe;De.preventDefault(),(qe=$==null?void 0:$.onMouseDown)==null||qe.call($,De),be()},onKeyDown:De=>{var qe;(qe=$==null?void 0:$.onKeyDown)==null||qe.call($,De),De.key===" "&&(De.preventDefault(),be())},children:b.jsx(P,{reveal:re})});return b.jsx(Lt.Wrapper,{required:f,id:ee,label:k,error:c,description:w,size:_,classNames:ue,styles:Ce,__staticSelector:"PasswordInput",__stylesApiProps:n,unstyled:o,withAsterisk:O,inputWrapperOrder:T,inputContainer:y,variant:v,labelProps:{...E,htmlFor:ee},descriptionProps:{...C,id:Ee},errorProps:{...S,id:pe},mod:V,attributes:z,...ae("root"),...ne,...M,children:b.jsx(Lt,{component:"div",error:c,leftSection:h,size:_,classNames:{...ue,input:cn(hS.input,ue==null?void 0:ue.input)},styles:Ce,radius:N,disabled:d,__staticSelector:"PasswordInput",__stylesApiProps:n,rightSectionWidth:R,rightSection:F??Se,variant:v,unstyled:o,leftSectionWidth:B,rightSectionPointerEvents:L||"all",rightSectionProps:q,leftSectionProps:Y,leftSectionPointerEvents:D,withAria:!1,withErrorStyles:W,attributes:z,children:b.jsx("input",{required:f,"data-invalid":!!c||void 0,"data-with-left-section":!!h||void 0,...ae("innerInput"),disabled:d,id:ee,...Ne,"aria-describedby":we,autoComplete:Ne.autoComplete||"off",type:re?"text":"password"})})})});jy.classes={...Bi.classes,...hS};jy.varsResolver=ZI;jy.displayName="@mantine/core/PasswordInput";function Tne({offset:e,position:n,defaultOpened:t}){const[i,r]=A.useState(t),a=A.useRef(null),{x:o,y:l,elements:f,refs:c,update:h,placement:d}=$6({placement:n,middleware:[D6({crossAxis:!0,padding:5,rootBoundary:"document"})]}),p=d.includes("right")?e:n.includes("left")?e*-1:0,v=d.includes("bottom")?e:n.includes("top")?e*-1:0,y=A.useCallback(({clientX:w,clientY:k})=>{c.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:w,y:k,left:w+p,top:k+v,right:w,bottom:k}}})},[f.reference]);return A.useEffect(()=>{if(c.floating.current){const w=a.current;w.addEventListener("mousemove",y);const k=qo(c.floating.current);return k.forEach(_=>{_.addEventListener("scroll",h)}),()=>{w.removeEventListener("mousemove",y),k.forEach(_=>{_.removeEventListener("scroll",h)})}}},[f.reference,c.floating.current,h,y,i]),{handleMouseMove:y,x:o,y:l,opened:i,setOpened:r,boundaryRef:a,floating:c.setFloating}}var My={tooltip:"m_1b3c8819",arrow:"m_f898399f"};const jne={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:ca("popover")},QI=(e,{radius:n,color:t})=>({tooltip:{"--tooltip-radius":n===void 0?void 0:Gt(n),"--tooltip-bg":t?nt(t,e):void 0,"--tooltip-color":t?"var(--mantine-color-white)":void 0}}),Dy=Pe(e=>{const n=ye("TooltipFloating",jne,e),{children:t,refProp:i,withinPortal:r,style:a,className:o,classNames:l,styles:f,unstyled:c,radius:h,color:d,label:p,offset:v,position:y,multiline:w,zIndex:k,disabled:_,defaultOpened:S,variant:C,vars:E,portalProps:O,attributes:T,ref:M,...N}=n,F=ii(),R=Xe({name:"TooltipFloating",props:n,classes:My,className:o,style:a,classNames:l,styles:f,unstyled:c,attributes:T,rootSelector:"tooltip",vars:E,varsResolver:QI}),{handleMouseMove:L,x:B,y:G,opened:U,boundaryRef:H,floating:P,setOpened:$}=Tne({offset:v,position:y,defaultOpened:S}),q=pu(t);if(!q)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=It(H,F1(q),M),D=q.props,W=z=>{var X;(X=D.onMouseEnter)==null||X.call(D,z),L(z),$(!0)},V=z=>{var X;(X=D.onMouseLeave)==null||X.call(D,z),$(!1)};return b.jsxs(b.Fragment,{children:[b.jsx(el,{...O,withinPortal:r,children:b.jsx(ve,{...N,...R("tooltip",{style:{...uz(a,F),zIndex:k,display:!_&&U?"block":"none",top:(G&&Math.round(G))??"",left:(B&&Math.round(B))??""}}),variant:C,ref:P,mod:{multiline:w},children:p})}),A.cloneElement(q,{...D,[i]:Y,onMouseEnter:W,onMouseLeave:V})]})});Dy.classes=My;Dy.varsResolver=QI;Dy.displayName="@mantine/core/TooltipFloating";const JI=A.createContext({withinGroup:!1}),Mne={openDelay:0,closeDelay:0};function yC(e){const{openDelay:n,closeDelay:t,children:i}=ye("TooltipGroup",Mne,e);return b.jsx(JI,{value:{withinGroup:!0},children:b.jsx(lQ,{delay:{open:n,close:t},children:i})})}yC.displayName="@mantine/core/TooltipGroup";yC.extend=e=>e;function Dne(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 Rne(e){const n=Dne(e.middlewares),t=[$z(e.offset)];return n.shift&&t.push(D6(typeof n.shift=="boolean"?{padding:8}:{padding:8,...n.shift})),n.flip&&t.push(typeof n.flip=="boolean"?bg():bg(n.flip)),t.push(zz({element:e.arrowRef,padding:e.arrowOffset})),n.inline?t.push(typeof n.inline=="boolean"?ph():ph(n.inline)):e.inline&&t.push(ph()),t}function Pne(e){var E,O,T;const[n,t]=A.useState(e.defaultOpened),i=typeof e.opened=="boolean"?e.opened:n,r=A.use(JI).withinGroup,a=Ki(),o=A.useCallback(M=>{t(M),M&&k(a)},[a]),{x:l,y:f,context:c,refs:h,placement:d,middlewareData:{arrow:{x:p,y:v}={}}}=$6({strategy:e.strategy,placement:e.position,open:i,onOpenChange:o,middleware:Rne(e),whileElementsMounted:aS}),{delay:y,currentId:w,setCurrentId:k}=uQ(c,{id:a}),{getReferenceProps:_,getFloatingProps:S}=pQ([oQ(c,{enabled:(E=e.events)==null?void 0:E.hover,delay:r?y:{open:e.openDelay,close:e.closeDelay},mouseOnly:!((O=e.events)!=null&&O.touch)}),mQ(c,{enabled:(T=e.events)==null?void 0:T.focus,visibleOnly:!0}),gQ(c,{role:"tooltip"}),dQ(c,{enabled:typeof e.opened>"u"})]);Go(()=>{var M;(M=e.onPositionChange)==null||M.call(e,d)},[d]);const C=i&&w&&w!==a;return{x:l,y:f,arrowX:p,arrowY:v,reference:h.setReference,floating:h.setFloating,getFloatingProps:S,getReferenceProps:_,isGroupPhase:C,opened:i,placement:d}}const Nne={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:ca("popover"),middlewares:{flip:!0,shift:!0,inline:!1}},eB=(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:Gt(n),"--tooltip-bg":t?a.background:void 0,"--tooltip-color":t?a.color:void 0}}},Ai=Pe(e=>{const n=ye("Tooltip",Nne,e),{children:t,position:i,refProp:r,label:a,openDelay:o,closeDelay:l,onPositionChange:f,opened:c,defaultOpened:h,withinPortal:d,radius:p,color:v,classNames:y,styles:w,unstyled:k,style:_,className:S,withArrow:C,arrowSize:E,arrowOffset:O,arrowRadius:T,arrowPosition:M,offset:N,transitionProps:F,multiline:R,events:L,zIndex:B,disabled:G,onClick:U,onMouseEnter:H,onMouseLeave:P,inline:$,variant:q,keepMounted:Y,vars:D,portalProps:W,mod:V,floatingStrategy:z,middlewares:X,autoContrast:ee,attributes:re,target:le,ref:be,...ae}=n,{dir:ue}=gu(),Ce=A.useRef(null),ne=Pne({position:Gz(ue,i),closeDelay:l,openDelay:o,onPositionChange:f,opened:c,defaultOpened:h,events:L,arrowRef:Ce,arrowOffset:O,offset:typeof N=="number"?N+(C?E/2:0):N,inline:$,strategy:z,middlewares:X});A.useEffect(()=>{const De=le instanceof HTMLElement?le:typeof le=="string"?document.querySelector(le):(le==null?void 0:le.current)||null;De&&ne.reference(De)},[le,ne]);const Ne=Xe({name:"Tooltip",props:n,classes:My,className:S,style:_,classNames:y,styles:w,unstyled:k,attributes:re,rootSelector:"tooltip",vars:D,varsResolver:eB}),pe=pu(t);if(!le&&!pe)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 Ee=Ne("tooltip");if(le){const De=$5(F,{duration:100,transition:"fade"});return b.jsx(b.Fragment,{children:b.jsx(el,{...W,withinPortal:d,children:b.jsx(Ko,{...De,keepMounted:Y,mounted:!G&&!!ne.opened,duration:ne.isGroupPhase?10:De.duration,children:qe=>b.jsxs(ve,{...ae,"data-fixed":z==="fixed"||void 0,variant:q,mod:[{multiline:R},V],...Ee,...ne.getFloatingProps({ref:ne.floating,className:Ee.className,style:{...Ee.style,...qe,zIndex:B,top:ne.y??0,left:ne.x??0}}),children:[a,b.jsx(wg,{ref:Ce,arrowX:ne.arrowX,arrowY:ne.arrowY,visible:C,position:ne.placement,arrowSize:E,arrowOffset:O,arrowRadius:T,arrowPosition:M,...Ne("arrow")})]})})})})}const Re=pe.props,we=It(ne.reference,F1(pe),be),Se=$5(F,{duration:100,transition:"fade"});return b.jsxs(b.Fragment,{children:[b.jsx(el,{...W,withinPortal:d,children:b.jsx(Ko,{...Se,keepMounted:Y,mounted:!G&&!!ne.opened,duration:ne.isGroupPhase?10:Se.duration,children:De=>b.jsxs(ve,{...ae,"data-fixed":z==="fixed"||void 0,variant:q,mod:[{multiline:R},V],...ne.getFloatingProps({ref:ne.floating,className:Ne("tooltip").className,style:{...Ne("tooltip").style,...De,zIndex:B,top:ne.y??0,left:ne.x??0}}),children:[a,b.jsx(wg,{ref:Ce,arrowX:ne.arrowX,arrowY:ne.arrowY,visible:C,position:ne.placement,arrowSize:E,arrowOffset:O,arrowRadius:T,arrowPosition:M,...Ne("arrow")})]})})}),A.cloneElement(pe,ne.getReferenceProps({onClick:U,onMouseEnter:H,onMouseLeave:P,onMouseMove:n.onMouseMove,onPointerDown:n.onPointerDown,onPointerEnter:n.onPointerEnter,...Re,className:cn(S,Re.className),[r]:we}))]})});Ai.classes=My;Ai.varsResolver=eB;Ai.displayName="@mantine/core/Tooltip";Ai.Floating=Dy;Ai.Group=yC;const $ne={size:"sm",withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left",openOnFocus:!0},Xo=U1(e=>{const n=ye("Select",$ne,e),{classNames:t,styles:i,unstyled:r,vars:a,dropdownOpened:o,defaultDropdownOpened:l,onDropdownClose:f,onDropdownOpen:c,onFocus:h,onBlur:d,onClick:p,onChange:v,data:y,value:w,defaultValue:k,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:S,onOptionSubmit:C,comboboxProps:E,readOnly:O,disabled:T,filter:M,limit:N,withScrollArea:F,maxDropdownHeight:R,size:L,searchable:B,rightSection:G,checkIconPosition:U,withCheckIcon:H,withAlignedLabels:P,nothingFoundMessage:$,name:q,form:Y,searchValue:D,defaultSearchValue:W,onSearchChange:V,allowDeselect:z,error:X,rightSectionPointerEvents:ee,id:re,clearable:le,clearSectionMode:be,clearButtonProps:ae,hiddenInputProps:ue,renderOption:Ce,onClear:ne,autoComplete:Ne,scrollAreaProps:pe,__defaultRightSection:Ee,__clearSection:Re,__clearable:we,chevronColor:Se,autoSelectOnBlur:De,openOnFocus:qe,attributes:Ve,...Ue}=n,We=A.useMemo(()=>ry(y),[y]),Ye=A.useRef({}),sn=A.useMemo(()=>Nm(We),[We]),ie=Ki(re),[se,ke,Ze]=Oi({value:w,defaultValue:k,finalValue:null,onChange:v}),_e=se!=null?`${se}`in sn?sn[`${se}`]:Ye.current[`${se}`]:void 0,fe=lK(_e),[Be,pn,Je]=Oi({value:D,defaultValue:W,finalValue:_e?_e.label:"",onChange:V}),en=$m({opened:o,defaultOpened:l,onDropdownOpen:()=>{c==null||c(),S?en.selectFirstOption():en.updateSelectedOptionIndex("active",{scrollIntoView:!0})},onDropdownClose:()=>{f==null||f(),setTimeout(en.resetSelectedOption,0)}}),Ke=Mn=>{pn(Mn),en.resetSelectedOption()},{resolvedClassNames:jn,resolvedStyles:un}=Li({props:n,styles:i,classNames:t});A.useEffect(()=>{_&&en.selectFirstOption()},[_,Be]),A.useEffect(()=>{w===null&&Ke(""),w!=null&&_e&&((fe==null?void 0:fe.value)!==_e.value||(fe==null?void 0:fe.label)!==_e.label)&&Ke(_e.label)},[w,_e]),A.useEffect(()=>{var Mn,bn;!Ze&&!Je&&Ke(se!=null?`${se}`in sn?(Mn=sn[`${se}`])==null?void 0:Mn.label:((bn=Ye.current[`${se}`])==null?void 0:bn.label)||"":"")},[sn,se]),A.useEffect(()=>{se&&`${se}`in sn&&(Ye.current[`${se}`]=sn[`${se}`])},[sn,se]);const tt=b.jsx(Cn.ClearButton,{...ae,onClear:()=>{ke(null,null),Ke(""),ne==null||ne()}}),pt=le&&!!se&&!T&&!O;return b.jsxs(b.Fragment,{children:[b.jsxs(Cn,{store:en,__staticSelector:"Select",classNames:jn,styles:un,unstyled:r,readOnly:O,size:L,attributes:Ve,keepMounted:De,onOptionSubmit:Mn=>{C==null||C(Mn);const bn=z&&`${sn[Mn].value}`==`${se}`?null:sn[Mn],_n=bn?bn.value:null;_n!==se&&ke(_n,bn),!Ze&&Ke(_n!=null&&(bn==null?void 0:bn.label)||""),en.closeDropdown()},...E,children:[b.jsx(Cn.Target,{targetType:B?"input":"button",autoComplete:Ne,withExpandedAttribute:!0,children:b.jsx(Bi,{id:ie,__defaultRightSection:b.jsx(Cn.Chevron,{size:L,error:X,unstyled:r,color:Se}),__clearSection:tt,__clearable:pt,__clearSectionMode:be,rightSection:G,rightSectionPointerEvents:ee||"none",...Ue,size:L,__staticSelector:"Select",disabled:T,readOnly:O||!B,value:Be,onChange:Mn=>{Ke(Mn.currentTarget.value),en.openDropdown(),_&&en.selectFirstOption()},onFocus:Mn=>{qe&&B&&en.openDropdown(),h==null||h(Mn)},onBlur:Mn=>{De&&en.clickSelectedOption(),B&&en.closeDropdown();const bn=se!=null&&(`${se}`in sn?sn[`${se}`]:Ye.current[`${se}`]);Ke(bn&&bn.label||""),d==null||d(Mn)},onClick:Mn=>{B?en.openDropdown():en.toggleDropdown(),p==null||p(Mn)},classNames:jn,styles:un,unstyled:r,pointer:!B,error:X,attributes:Ve})}),b.jsx(ly,{data:We,hidden:O||T,filter:M,search:Be,limit:N,hiddenWhenEmpty:!$,withScrollArea:F,maxDropdownHeight:R,filterOptions:!!B&&(_e==null?void 0:_e.label)!==Be,value:se,checkIconPosition:U,withCheckIcon:H,withAlignedLabels:P,nothingFoundMessage:$,unstyled:r,labelId:Ue.label?`${ie}-label`:void 0,"aria-label":Ue.label?void 0:Ue["aria-label"],renderOption:Ce,scrollAreaProps:pe})]}),b.jsx(Cn.HiddenInput,{value:se,name:q,form:Y,disabled:T,...ue})]})});Xo.classes={...Bi.classes,...Cn.classes};Xo.displayName="@mantine/core/Select";function nB(e){if(e!==void 0)return typeof e=="number"?me(e):e}function zne({spacing:e,verticalSpacing:n,cols:t,minColWidth:i,autoRows:r,selector:a}){var d;const o=ii(),l=n===void 0?e:n,f=i!==void 0,c=mu({"--sg-spacing-x":Ht(Lr(e)),"--sg-spacing-y":Ht(Lr(l)),"--sg-auto-rows":r,...f?{"--sg-min-col-width":nB(i)}:{"--sg-cols":(d=Lr(t))==null?void 0:d.toString()}}),h=At(o.breakpoints).reduce((p,v)=>(p[v]||(p[v]={}),typeof e=="object"&&e[v]!==void 0&&(p[v]["--sg-spacing-x"]=Ht(e[v])),typeof l=="object"&&l[v]!==void 0&&(p[v]["--sg-spacing-y"]=Ht(l[v])),!f&&typeof t=="object"&&t[v]!==void 0&&(p[v]["--sg-cols"]=t[v]),p),{});return b.jsx(wc,{styles:c,media:Th(At(h),o.breakpoints).filter(p=>At(h[p.value]).length>0).map(p=>({query:`(min-width: ${o.breakpoints[p.value]})`,styles:h[p.value]})),selector:a})}function pk(e){return typeof e=="object"&&e!==null?At(e):[]}function Lne(e){return e.sort((n,t)=>Eh(n)-Eh(t))}function Ine({spacing:e,verticalSpacing:n,cols:t,minColWidth:i}){return Lne(Array.from(new Set([...pk(e),...pk(n),...i!==void 0?[]:pk(t)])))}function Bne({spacing:e,verticalSpacing:n,cols:t,minColWidth:i,autoRows:r,selector:a}){var d;const o=n===void 0?e:n,l=i!==void 0,f=mu({"--sg-spacing-x":Ht(Lr(e)),"--sg-spacing-y":Ht(Lr(o)),"--sg-auto-rows":r,...l?{"--sg-min-col-width":nB(i)}:{"--sg-cols":(d=Lr(t))==null?void 0:d.toString()}}),c=Ine({spacing:e,verticalSpacing:n,cols:t,minColWidth:i}),h=c.reduce((p,v)=>(p[v]||(p[v]={}),typeof e=="object"&&e[v]!==void 0&&(p[v]["--sg-spacing-x"]=Ht(e[v])),typeof o=="object"&&o[v]!==void 0&&(p[v]["--sg-spacing-y"]=Ht(o[v])),!l&&typeof t=="object"&&t[v]!==void 0&&(p[v]["--sg-cols"]=t[v]),p),{});return b.jsx(wc,{styles:f,container:c.map(p=>({query:`simple-grid (min-width: ${p})`,styles:h[p]})),selector:a})}var tB={container:"m_925c2d2c",root:"m_2415a157"};const Fne={cols:1,spacing:"md",type:"media"},Nh=Pe(e=>{const n=ye("SimpleGrid",Fne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,cols:f,verticalSpacing:c,spacing:h,type:d,minColWidth:p,autoFlow:v,autoRows:y,attributes:w,...k}=n,_=Xe({name:"SimpleGrid",classes:tB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l}),S=H1(),C=p!==void 0?v||"auto-fill":void 0;return d==="container"?b.jsxs(b.Fragment,{children:[b.jsx(Bne,{...n,selector:`.${S}`}),b.jsx("div",{..._("container"),children:b.jsx(ve,{..._("root",{className:S}),...k,"data-auto-cols":C})})]}):b.jsxs(b.Fragment,{children:[b.jsx(zne,{...n,selector:`.${S}`}),b.jsx(ve,{..._("root",{className:S}),...k,"data-auto-cols":C})]})});Nh.classes=tB;Nh.displayName="@mantine/core/SimpleGrid";var iB={root:"m_6d731127"};const qne={gap:"md",align:"stretch",justify:"flex-start"},rB=(e,{gap:n,align:t,justify:i})=>({root:{"--stack-gap":Ht(n),"--stack-align":t,"--stack-justify":i}}),mt=Pe(e=>{const n=ye("Stack",qne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,align:f,justify:c,gap:h,variant:d,attributes:p,...v}=n;return b.jsx(ve,{...Xe({name:"Stack",props:n,classes:iB,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:rB})("root"),variant:d,...v})});mt.classes=iB;mt.varsResolver=rB;mt.displayName="@mantine/core/Stack";const[Hne,Une]=fa("Table component was not found in the tree");var Im={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 Vne(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 wu(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:f,styles:c,...h}=a,d=Une();return b.jsx(ve,{component:e,...Vne(d,n),...d.getStyles(e,{className:l,classNames:o,style:f,styles:c,props:a}),...h})});return i.displayName=`@mantine/core/${t}`,i.classes=Im,i}const mS=wu("th",{columnBorder:!0}),aB=wu("td",{columnBorder:!0}),rg=wu("tr",{rowBorder:!0,striped:!0,highlightOnHover:!0}),oB=wu("thead",{stickyHeader:!0}),sB=wu("tbody"),lB=wu("tfoot"),uB=wu("caption",{captionSide:!0}),Wne={type:"scrollarea"},fB=(e,{minWidth:n,maxHeight:t,type:i})=>({scrollContainer:{"--table-min-width":me(n),"--table-max-height":me(t),"--table-overflow":i==="native"?"auto":void 0}}),Ry=Pe(e=>{const n=ye("TableScrollContainer",Wne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,children:f,minWidth:c,maxHeight:h,type:d,scrollAreaProps:p,attributes:v,...y}=n,w=Xe({name:"TableScrollContainer",classes:Im,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,vars:l,varsResolver:fB,rootSelector:"scrollContainer"});return b.jsx(ve,{component:d==="scrollarea"?Na:"div",...d==="scrollarea"?h?{offsetScrollbars:"xy",...p}:{offsetScrollbars:"x",...p}:{},...w("scrollContainer"),...y,children:b.jsx("div",{...w("scrollContainerInner"),children:f})})});Ry.classes=Im;Ry.varsResolver=fB;Ry.displayName="@mantine/core/TableScrollContainer";function bC({data:e}){return b.jsxs(b.Fragment,{children:[e.caption&&b.jsx(uB,{children:e.caption}),e.head&&b.jsx(oB,{children:b.jsx(rg,{children:e.head.map((n,t)=>b.jsx(mS,{children:n},t))})}),e.body&&b.jsx(sB,{children:e.body.map((n,t)=>b.jsx(rg,{children:n.map((i,r)=>b.jsx(aB,{children:i},r))},t))}),e.foot&&b.jsx(lB,{children:b.jsx(rg,{children:e.foot.map((n,t)=>b.jsx(mS,{children:n},t))})})]})}bC.displayName="@mantine/core/TableDataRenderer";const Gne={withRowBorders:!0,verticalSpacing:7},cB=(e,{layout:n,captionSide:t,horizontalSpacing:i,verticalSpacing:r,borderColor:a,stripedColor:o,highlightOnHoverColor:l,striped:f,highlightOnHover:c,stickyHeaderOffset:h,stickyHeader:d})=>({table:{"--table-layout":n,"--table-caption-side":t,"--table-horizontal-spacing":Ht(i),"--table-vertical-spacing":Ht(r),"--table-border-color":a?nt(a,e):void 0,"--table-striped-color":f&&o?nt(o,e):void 0,"--table-highlight-on-hover-color":c&&l?nt(l,e):void 0,"--table-sticky-header-offset":d?me(h):void 0}}),St=Pe(e=>{const n=ye("Table",Gne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,horizontalSpacing:f,verticalSpacing:c,captionSide:h,stripedColor:d,highlightOnHoverColor:p,striped:v,highlightOnHover:y,withColumnBorders:w,withRowBorders:k,withTableBorder:_,borderColor:S,layout:C,data:E,children:O,stickyHeader:T,stickyHeaderOffset:M,mod:N,tabularNums:F,attributes:R,...L}=n,B=Xe({name:"Table",props:n,className:i,style:r,classes:Im,classNames:t,styles:a,unstyled:o,attributes:R,rootSelector:"table",vars:l,varsResolver:cB});return b.jsx(Hne,{value:{getStyles:B,stickyHeader:T,striped:v===!0?"odd":v||void 0,highlightOnHover:y,withColumnBorders:w,withRowBorders:k,captionSide:h||"bottom"},children:b.jsx(ve,{component:"table",mod:[{"data-with-table-border":_,"data-tabular-nums":F},N],...B("table"),...L,children:O||!!E&&b.jsx(bC,{data:E})})})});St.classes=Im;St.varsResolver=cB;St.displayName="@mantine/core/Table";St.Td=aB;St.Th=mS;St.Tr=rg;St.Thead=oB;St.Tbody=sB;St.Tfoot=lB;St.Caption=uB;St.ScrollContainer=Ry;St.DataRenderer=bC;const[Yne,wC]=fa("Tabs component was not found in the tree");var Bm={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 kC=Pe(e=>{const n=ye("TabsList",null,e),{children:t,className:i,grow:r,justify:a,classNames:o,styles:l,style:f,mod:c,...h}=n,d=wC();return b.jsx(ve,{...d.getStyles("list",{className:i,style:f,classNames:o,styles:l,props:n,variant:d.variant}),role:"tablist",variant:d.variant,mod:[{grow:r,orientation:d.orientation,placement:d.orientation==="vertical"&&d.placement,inverted:d.inverted},c],"aria-orientation":d.orientation,__vars:{"--tabs-justify":a},...h,children:t})});kC.classes=Bm;kC.displayName="@mantine/core/TabsList";const _C=Pe(e=>{const n=ye("TabsPanel",null,e),{children:t,className:i,value:r,classNames:a,styles:o,style:l,mod:f,keepMounted:c,...h}=n,d=Am(),p=wC(),v=p.value===r,y=p.keepMounted||c,w=p.keepMountedMode!=="display-none",k=y&&w&&d!=="test"?b.jsx(A.Activity,{mode:v?"visible":"hidden",children:t}):y||v?t:null;return b.jsx(ve,{...p.getStyles("panel",{className:i,classNames:a,styles:o,style:[l,v?void 0:{display:"none"}],props:n}),mod:[{orientation:p.orientation},f],role:"tabpanel",id:p.getPanelId(r),"aria-labelledby":p.getTabId(r),...h,children:k})});_C.classes=Bm;_C.displayName="@mantine/core/TabsPanel";const xC=Pe(e=>{const n=ye("TabsTab",null,e),{className:t,children:i,rightSection:r,leftSection:a,value:o,onClick:l,onKeyDown:f,disabled:c,color:h,style:d,classNames:p,styles:v,vars:y,mod:w,tabIndex:k,..._}=n,S=ii(),{dir:C}=gu(),E=wC(),O=o===E.value,T=N=>{E.onChange(E.allowTabDeactivation&&o===E.value?null:o),l==null||l(N)},M={classNames:p,styles:v,props:n};return b.jsxs(di,{...E.getStyles("tab",{className:t,style:d,variant:E.variant,...M}),disabled:c,unstyled:E.unstyled,variant:E.variant,mod:[{active:O,disabled:c,orientation:E.orientation,inverted:E.inverted,placement:E.orientation==="vertical"&&E.placement},w],role:"tab",id:E.getTabId(o),"aria-selected":O,tabIndex:k!==void 0?k:O||E.value===null?0:-1,"aria-controls":E.getPanelId(o),onClick:T,__vars:{"--tabs-color":h?nt(h,S):void 0},onKeyDown:m6({siblingSelector:'[role="tab"]',parentSelector:'[role="tablist"]',activateOnFocus:E.activateTabWithKeyboard,loop:E.loop,orientation:E.orientation||"horizontal",dir:C,onKeyDown:f}),..._,children:[a&&b.jsx("span",{...E.getStyles("tabSection",M),"data-position":"left",children:a}),i&&b.jsx("span",{...E.getStyles("tabLabel",M),children:i}),r&&b.jsx("span",{...E.getStyles("tabSection",M),"data-position":"right",children:r})]})});xC.classes=Bm;xC.displayName="@mantine/core/TabsTab";const fj="Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value",Kne={keepMounted:!0,keepMountedMode:"activity",orientation:"horizontal",loop:!0,activateTabWithKeyboard:!0,variant:"default",placement:"left"},dB=(e,{radius:n,color:t,autoContrast:i})=>({root:{"--tabs-radius":Gt(n),"--tabs-color":nt(t,e),"--tabs-text-color":q1(i,e)?Cm({color:t,theme:e,autoContrast:i}):void 0}}),yi=Pe(e=>{const n=ye("Tabs",Kne,e),{defaultValue:t,value:i,onChange:r,orientation:a,children:o,loop:l,id:f,activateTabWithKeyboard:c,allowTabDeactivation:h,variant:d,color:p,radius:v,inverted:y,placement:w,keepMounted:k,keepMountedMode:_,classNames:S,styles:C,unstyled:E,className:O,style:T,vars:M,autoContrast:N,mod:F,attributes:R,...L}=n,B=Ki(f),[G,U]=Oi({value:i,defaultValue:t,finalValue:null,onChange:r}),H=Xe({name:"Tabs",props:n,classes:Bm,className:O,style:T,classNames:S,styles:C,unstyled:E,attributes:R,vars:M,varsResolver:dB});return b.jsx(Yne,{value:{placement:w,value:G,orientation:a,id:B,loop:l,activateTabWithKeyboard:c,getTabId:n5(`${B}-tab`,fj),getPanelId:n5(`${B}-panel`,fj),onChange:U,allowTabDeactivation:h,variant:d,color:p,radius:v,inverted:y,keepMounted:k,keepMountedMode:_,unstyled:E,getStyles:H},children:b.jsx(ve,{id:B,variant:d,mod:[{orientation:a,inverted:a==="horizontal"&&y,placement:a==="vertical"&&w},F],...H("root"),...L,children:o})})});yi.classes=Bm;yi.varsResolver=dB;yi.displayName="@mantine/core/Tabs";yi.Tab=xC;yi.Panel=_C;yi.List=kC;function Xne({data:e,value:n}){const t=n.map(i=>i.trim().toLowerCase());return e.reduce((i,r)=>(au(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 Zne(e,n){return e?n.split(new RegExp(`[${e.join("")}]`)).map(t=>t.trim()).filter(t=>t!==""):[n]}function cj({splitChars:e,allowDuplicates:n,maxTags:t,value:i,currentTags:r,isDuplicate:a,onDuplicate:o}){const l=Zne(e,i),f=[];if(n)f.push(...r,...l);else{f.push(...r);for(const c of l)(a?h=>a(h,f):h=>f.some(d=>d.toLowerCase()===h.toLowerCase()))(c)?o==null||o(c):f.push(c)}return t?f.slice(0,t):f}const Qne={maxTags:1/0,acceptValueOnBlur:!0,splitChars:[","],hiddenInputValuesDivider:",",openOnFocus:!0,size:"sm"},SC=Pe(e=>{const n=ye("TagsInput",Qne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:f,value:c,defaultValue:h,onChange:d,onKeyDown:p,maxTags:v,allowDuplicates:y,onDuplicate:w,variant:k,data:_,dropdownOpened:S,defaultDropdownOpened:C,onDropdownOpen:E,onDropdownClose:O,selectFirstOptionOnChange:T,selectFirstOptionOnDropdownOpen:M,onOptionSubmit:N,comboboxProps:F,filter:R,limit:L,withScrollArea:B,maxDropdownHeight:G,searchValue:U,defaultSearchValue:H,onSearchChange:P,readOnly:$,disabled:q,splitChars:Y,onFocus:D,onBlur:W,onPaste:V,radius:z,rightSection:X,rightSectionWidth:ee,rightSectionPointerEvents:re,rightSectionProps:le,leftSection:be,leftSectionWidth:ae,leftSectionPointerEvents:ue,leftSectionProps:Ce,inputContainer:ne,inputWrapperOrder:Ne,withAsterisk:pe,required:Ee,labelProps:Re,descriptionProps:we,errorProps:Se,wrapperProps:De,description:qe,label:Ve,error:Ue,withErrorStyles:We,name:Ye,form:sn,id:ie,clearable:se,clearSectionMode:ke,clearButtonProps:Ze,hiddenInputProps:_e,hiddenInputValuesDivider:fe,mod:Be,renderOption:pn,renderPill:Je,onRemove:en,onClear:Ke,onMaxTags:jn,scrollAreaProps:un,acceptValueOnBlur:tt,isDuplicate:pt,openOnFocus:Mn,attributes:bn,ref:_n,loading:it,loadingPosition:Et,...ze}=n,Fe=Ki(ie),Dn=ry(_),et=Nm(Dn),An=A.useRef(null),nn=It(An,_n),tn=$m({opened:S,defaultOpened:C,onDropdownOpen:()=>{E==null||E(),M&&tn.selectFirstOption()},onDropdownClose:()=>{O==null||O(),tn.resetSelectedOption()}}),{styleProps:rn,rest:{type:Ln,autoComplete:In,...kt}}=vu(ze),[Sn,xn]=Oi({value:c,defaultValue:h,finalValue:[],onChange:d}),[Hn,Vt]=Oi({value:U,defaultValue:H,finalValue:"",onChange:P}),mi=dn=>{Vt(dn),tn.resetSelectedOption()},Zi=Xe({name:"TagsInput",classes:{},props:n,classNames:t,styles:a,unstyled:o}),{resolvedClassNames:ga,resolvedStyles:co}=Li({props:n,styles:a,classNames:t}),za=dn=>{if((pt?pt(dn,Sn):Sn.some(ri=>ri.toLowerCase()===dn.toLowerCase()))&&(w==null||w(dn),!y)){mi("");return}if(Sn.length>=v){jn==null||jn(dn);return}N==null||N(dn),mi(""),dn.length>0&&xn([...Sn,dn])},br=dn=>{if(p==null||p(dn),dn.isPropagationStopped())return;const ri=Hn.trim(),{length:ln}=ri;if(Y.includes(dn.key)&&ln>0&&(xn(cj({splitChars:Y,allowDuplicates:y,maxTags:v,value:Hn,currentTags:Sn,isDuplicate:pt,onDuplicate:w})),mi(""),dn.preventDefault()),dn.key==="Enter"&&ln>0&&!dn.nativeEvent.isComposing){if(dn.preventDefault(),document.querySelector(`#${tn.listId} [data-combobox-option][data-combobox-selected]`))return;za(ri)}dn.key==="Backspace"&&ln===0&&Sn.length>0&&!dn.nativeEvent.isComposing&&!$&&(en==null||en(Sn[Sn.length-1]),xn(Sn.slice(0,Sn.length-1)))},La=dn=>{V==null||V(dn),dn.preventDefault(),dn.clipboardData&&(xn(cj({splitChars:Y,allowDuplicates:y,maxTags:v,value:`${Hn}${dn.clipboardData.getData("text/plain")}`,currentTags:Sn,isDuplicate:pt,onDuplicate:w})),mi(""))},wr=Sn.map((dn,ri)=>{const ln=()=>{const _r=Sn.slice();_r.splice(ri,1),xn(_r),en==null||en(dn)};return Je?b.jsx(A.Fragment,{children:Je({option:et[dn]||{value:dn,label:dn,disabled:!1},value:dn,onRemove:ln,disabled:q||$})},`${dn}-${ri}`):b.jsx(il,{withRemoveButton:!$,onRemove:ln,unstyled:o,disabled:q,attributes:bn,...Zi("pill"),children:dn},`${dn}-${ri}`)});A.useEffect(()=>{T&&tn.selectFirstOption()},[T,Sn,Hn]);const kr=b.jsx(Cn.ClearButton,{...Ze,onClear:()=>{var dn;xn([]),mi(""),(dn=An.current)==null||dn.focus(),tn.openDropdown(),Ke==null||Ke()}});return b.jsxs(b.Fragment,{children:[b.jsxs(Cn,{store:tn,classNames:ga,styles:co,unstyled:o,size:f,readOnly:$,__staticSelector:"TagsInput",attributes:bn,onOptionSubmit:dn=>{N==null||N(dn),mi(""),Sn.length>=v?jn==null||jn(dn):xn([...Sn,et[dn].value]),tn.resetSelectedOption()},...F,children:[b.jsx(Cn.DropdownTarget,{children:b.jsx(ou,{...rn,__staticSelector:"TagsInput",classNames:ga,styles:co,unstyled:o,size:f,className:i,style:r,variant:k,disabled:q,radius:z,rightSection:X,__clearSection:kr,__clearable:se&&Sn.length>0&&!q&&!$,__clearSectionMode:ke,rightSectionWidth:ee,rightSectionPointerEvents:re,rightSectionProps:le,leftSection:be,leftSectionWidth:ae,leftSectionPointerEvents:ue,leftSectionProps:Ce,loading:it,loadingPosition:Et,inputContainer:ne,inputWrapperOrder:Ne,withAsterisk:pe,required:Ee,labelProps:Re,descriptionProps:we,errorProps:Se,wrapperProps:De,description:qe,label:Ve,error:Ue,withErrorStyles:We,__stylesApiProps:{...n,multiline:!0},id:Fe,mod:Be,attributes:bn,children:b.jsxs(il.Group,{disabled:q,unstyled:o,...Zi("pillsList"),children:[wr,b.jsx(Cn.EventsTarget,{autoComplete:In,withExpandedAttribute:!0,children:b.jsx(ou.Field,{...kt,ref:nn,...Zi("inputField"),unstyled:o,onKeyDown:br,onFocus:dn=>{D==null||D(dn),Mn&&tn.openDropdown()},onBlur:dn=>{W==null||W(dn),tt&&za(Hn),tn.closeDropdown()},onPaste:La,value:Hn,onChange:dn=>mi(dn.currentTarget.value),required:Ee&&Sn.length===0,disabled:q,readOnly:$,id:Fe})})]})})}),b.jsx(ly,{data:Xne({data:Dn,value:Sn}),hidden:$||q,filter:R,search:Hn,limit:L,hiddenWhenEmpty:!0,withScrollArea:B,maxDropdownHeight:G,unstyled:o,labelId:Ve?`${Fe}-label`:void 0,"aria-label":Ve?void 0:ze["aria-label"],renderOption:pn,scrollAreaProps:un})]}),b.jsx(Cn.HiddenInput,{name:Ye,form:sn,value:Sn,valuesDivider:fe,disabled:q,..._e})]})});SC.classes={...Bi.classes,...Cn.classes};SC.displayName="@mantine/core/TagsInput";const rl=Pe(e=>b.jsx(Bi,{component:"input",...ye("TextInput",null,e),__staticSelector:"TextInput"}));rl.classes=Bi.classes;rl.displayName="@mantine/core/TextInput";const[Jne,ete]=fa("Timeline component was not found in tree");var CC={root:"m_43657ece",itemTitle:"m_2ebe8099",item:"m_436178ff",itemBullet:"m_8affcee1",itemBody:"m_540e8f41"};const AC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,__active:o,__align:l,__lineActive:f,__vars:c,bullet:h,radius:d,color:p,lineVariant:v,children:y,title:w,mod:k,..._}=ye("TimelineItem",null,e),S=ete(),C=ii(),E={classNames:n,styles:r};return b.jsxs(ve,{...S.getStyles("item",{...E,className:t,style:i}),mod:[{"line-active":f,active:o},k],__vars:{"--tli-radius":d!==void 0?Gt(d):void 0,"--tli-color":p?nt(p,C):void 0,"--tli-border-style":v||void 0},..._,children:[b.jsx(ve,{...S.getStyles("itemBullet",E),mod:{"with-child":!!h,align:l,active:o},children:h}),b.jsxs("div",{...S.getStyles("itemBody",E),children:[w&&b.jsx("div",{...S.getStyles("itemTitle",E),children:w}),b.jsx("div",{...S.getStyles("itemContent",E),children:y})]})]})});AC.classes=CC;AC.displayName="@mantine/core/TimelineItem";const nte={active:-1,align:"left"},hB=(e,{bulletSize:n,lineWidth:t,radius:i,color:r,autoContrast:a})=>({root:{"--tl-bullet-size":me(n),"--tl-line-width":me(t),"--tl-radius":i===void 0?void 0:Gt(i),"--tl-color":r?nt(r,e):void 0,"--tl-icon-color":q1(a,e)?Cm({color:r,theme:e,autoContrast:a}):void 0}}),Vf=Pe(e=>{const n=ye("Timeline",nte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,children:f,active:c,color:h,radius:d,bulletSize:p,align:v,lineWidth:y,reverseActive:w,mod:k,autoContrast:_,attributes:S,...C}=n,E=Xe({name:"Timeline",classes:CC,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:S,vars:l,varsResolver:hB}),O=A.Children.toArray(f),T=O.map((M,N)=>{var F,R;return A.cloneElement(M,{unstyled:o,__align:v,__active:((F=M.props)==null?void 0:F.active)||(w?c>=O.length-N-1:c>=N),__lineActive:((R=M.props)==null?void 0:R.lineActive)||(w?c>=O.length-N-1:c-1>=N)})});return b.jsx(Jne,{value:{getStyles:E},children:b.jsx(ve,{...E("root"),mod:[{align:v},k],...C,children:T})})});Vf.classes=CC;Vf.varsResolver=hB;Vf.displayName="@mantine/core/Timeline";Vf.Item=AC;const tte=["h1","h2","h3","h4","h5","h6"],ite=["xs","sm","md","lg","xl"];function rte(e,n){const t=n!==void 0?n:`h${e}`;return tte.includes(t)?{fontSize:`var(--mantine-${t}-font-size)`,fontWeight:`var(--mantine-${t}-font-weight)`,lineHeight:`var(--mantine-${t}-line-height)`}:ite.includes(t)?{fontSize:`var(--mantine-font-size-${t})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:me(t),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var mB={root:"m_8a5d1357"};const ate={order:1},pB=(e,{order:n,size:t,lineClamp:i,textWrap:r})=>{const a=rte(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}}},ku=Pe(e=>{const n=ye("Title",ate,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,order:l,vars:f,size:c,variant:h,lineClamp:d,textWrap:p,mod:v,attributes:y,...w}=n,k=Xe({name:"Title",props:n,classes:mB,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:y,vars:f,varsResolver:pB});return[1,2,3,4,5,6].includes(l)?b.jsx(ve,{...k("root"),component:`h${l}`,variant:h,mod:[{order:l,"data-line-clamp":typeof d=="number"},v],size:c,...w}):null});ku.classes=mB;ku.varsResolver=pB;ku.displayName="@mantine/core/Title";const OC=A.createContext(null);OC.displayName="@mantine/modals/ModalsContext";function ote(){const e=A.use(OC);if(!e)throw new Error("[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component");return e}const[ste,_u]=cK("mantine-modals"),lte=e=>{const n=e.modalId||Xs();return _u("openModal")({...e,modalId:n}),n},ute=e=>{const n=e.modalId||Xs();return _u("openConfirmModal")({...e,modalId:n}),n},fte=e=>{const n=e.modalId||Xs();return _u("openContextModal")({...e,modalId:n}),n},cte=_u("closeModal"),dte=_u("closeAllModals"),hte=e=>_u("updateModal")(e),mte=e=>_u("updateContextModal")(e),Do={open:lte,close:cte,closeAll:dte,openConfirmModal:ute,openContextModal:fte,updateModal:hte,updateContextModal:mte};function pte({id:e,cancelProps:n,confirmProps:t,labels:i={cancel:"",confirm:""},closeOnConfirm:r=!0,closeOnCancel:a=!0,groupProps:o,onCancel:l,onConfirm:f,children:c}){const{cancel:h,confirm:d}=i,p=ote(),v=w=>{typeof(n==null?void 0:n.onClick)=="function"&&(n==null||n.onClick(w)),typeof l=="function"&&l(),a&&p.closeModal(e)},y=w=>{typeof(t==null?void 0:t.onClick)=="function"&&(t==null||t.onClick(w)),typeof f=="function"&&f(),r&&p.closeModal(e)};return b.jsxs(b.Fragment,{children:[c&&b.jsx(ve,{mb:"md",children:c}),b.jsxs(hn,{mt:c?0:"md",justify:"flex-end",...o,children:[b.jsx(qt,{variant:"default",...n,onClick:v,children:(n==null?void 0:n.children)||h}),b.jsx(qt,{...t,onClick:y,children:(t==null?void 0:t.children)||d})]})]})}function dj(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 vte(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 gte(e){if(!e)return{confirmProps:{},modalProps:{}};const{id:n,children:t,onCancel:i,onConfirm:r,closeOnConfirm:a,closeOnCancel:o,cancelProps:l,confirmProps:f,groupProps:c,labels:h,...d}=e;return{confirmProps:{id:n,children:t,onCancel:i,onConfirm:r,closeOnConfirm:a,closeOnCancel:o,cancelProps:l,confirmProps:f,groupProps:c,labels:h},modalProps:{id:n,...d}}}function yte({children:e,modalProps:n,labels:t,modals:i}){const[r,a]=A.useReducer(vte,{modals:[],current:null}),o=A.useRef(r);o.current=r;const l=A.useRef(!1),f=A.useCallback(C=>{l.current||(l.current=!0,o.current.modals.concat().reverse().forEach(E=>{dj(E,C)}),l.current=!1),a({type:"CLOSE_ALL",canceled:C})},[o,a]),c=A.useCallback(({modalId:C,...E})=>{const O=C||Xs();return a({type:"OPEN",modal:{id:O,type:"content",props:E}}),O},[a]),h=A.useCallback(({modalId:C,...E})=>{const O=C||Xs();return a({type:"OPEN",modal:{id:O,type:"confirm",props:E}}),O},[a]),d=A.useCallback((C,{modalId:E,...O})=>{const T=E||Xs();return a({type:"OPEN",modal:{id:T,type:"context",props:O,ctx:C}}),T},[a]),p=A.useCallback((C,E)=>{if(!l.current){const O=o.current.modals.find(T=>T.id===C);O&&(l.current=!0,dj(O,E),l.current=!1)}a({type:"CLOSE",modalId:C,canceled:E})},[o,a]),v=A.useCallback(({modalId:C,...E})=>{a({type:"UPDATE",modalId:C,newProps:E})},[a]),y=A.useCallback(({modalId:C,...E})=>{a({type:"UPDATE",modalId:C,newProps:E})},[a]);ste({openModal:c,openConfirmModal:h,openContextModal:({modal:C,...E})=>d(C,E),closeModal:p,closeContextModal:p,closeAllModals:f,updateModal:v,updateContextModal:y});const w={modalProps:n||{},modals:r.modals,openModal:c,openConfirmModal:h,openContextModal:d,closeModal:p,closeContextModal:p,closeAll:f,updateModal:v,updateContextModal:y},k=()=>{const C=o.current.current;switch(C==null?void 0:C.type){case"context":{const{innerProps:E,...O}=C.props,T=i[C.ctx];return{modalProps:O,content:b.jsx(T,{innerProps:E,context:w,id:C.id})}}case"confirm":{const{modalProps:E,confirmProps:O}=gte(C.props);return{modalProps:E,content:b.jsx(pte,{...O,id:C.id,labels:C.props.labels||t})}}case"content":{const{children:E,...O}=C.props;return{modalProps:O,content:E}}default:return{modalProps:{},content:null}}},{modalProps:_,content:S}=k();return b.jsxs(OC,{value:w,children:[b.jsx(Br,{zIndex:ca("modal")+1,...n,..._,opened:r.modals.length>0,onClose:()=>{var C;return p((C=r.current)==null?void 0:C.id)},children:S}),e]})}function bte(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 wte(e){return A.useSyncExternalStore(e.subscribe,()=>e.getState(),()=>e.getState())}function kte(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 _te=()=>bte({notifications:[],queue:[],defaultPosition:"bottom-right",limit:5}),xu=_te(),xte=(e=xu)=>wte(e);function Mc(e,n){const t=e.getState(),i=kte(n([...t.notifications,...t.queue]),t.defaultPosition,t.limit);e.setState({notifications:i.notifications,queue:i.queue,limit:t.limit,defaultPosition:t.defaultPosition})}function Ste(e,n=xu){const t=e.id||Xs();return Mc(n,i=>e.id&&i.some(r=>r.id===e.id)?i:[...i,{...e,id:t}]),t}function vB(e,n=xu){return Mc(n,t=>t.filter(i=>{var r;return i.id===e?((r=i.onClose)==null||r.call(i,i),!1):!0})),e}function Cte(e,n=xu){return Mc(n,t=>t.map(i=>i.id===e.id?{...i,...e}:i)),e.id}function Ate(e=xu){Mc(e,()=>[])}function Ote(e=xu){Mc(e,n=>n.slice(0,e.getState().limit))}const qn={show:Ste,hide:vB,update:Cte,clean:Ate,cleanQueue:Ote,updateState:Mc},gB=["bottom-center","bottom-left","bottom-right","top-center","top-left","top-right"];function Ete(e,n){return e.reduce((t,i)=>(t[i.position||n].push(i),t),gB.reduce((t,i)=>(t[i]=[],t),{}))}const hj={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},Tte={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function jte({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:hj[o],transitionDuration:`${i}ms, ${i}ms, ${i}ms`,transitionTimingFunction:"cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",transitionProperty:"opacity, transform, max-height"},f={opacity:1,transform:Tte[o]},c={opacity:0,maxHeight:0,transform:hj[o]};return{...l,...{entering:f,entered:f,exiting:c,exited:c}[e]}}function Mte(e,n){return typeof n=="number"?n:n===!1||e===!1?!1:e}function yB({data:e,onHide:n,autoClose:t,paused:i,onHoverStart:r,onHoverEnd:a,...o}){const{autoClose:l,message:f,onOpen:c,...h}=e,d=Mte(t,e.autoClose),p=A.useRef(-1),[v,y]=A.useState(!1),w=()=>window.clearTimeout(p.current),k=()=>{n(e.id),w()},_=()=>{w(),typeof d=="number"&&(p.current=window.setTimeout(k,d))},S=()=>{y(!0),r==null||r()},C=()=>{y(!1),a==null||a()};return A.useEffect(()=>{var E;(E=e.onOpen)==null||E.call(e,e)},[]),A.useEffect(()=>(_(),w),[d]),A.useEffect(()=>(i||v?w():_(),w),[i,v]),b.jsx(Oy,{...o,...h,onClose:k,onMouseEnter:S,onMouseLeave:C,children:f})}yB.displayName="@mantine/notifications/NotificationContainer";var bB={root:"m_b37d9ac7",notification:"m_5ed0edd0"};function pS(){return pS=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":me(t)}}),lo=Pe(e=>{const n=ye("Notifications",Ute,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:f,position:c,autoClose:h,transitionDuration:d,containerWidth:p,notificationMaxHeight:v,limit:y,zIndex:w,store:k,portalProps:_,withinPortal:S,pauseResetOnHover:C,...E}=n,O=ii(),T=xte(k),M=oK(),N=g6(),F=A.useRef({}),R=A.useRef(0),[L,B]=A.useState(0),G=A.useCallback(()=>B(Y=>Y+1),[]),U=A.useCallback(()=>B(Y=>Math.max(0,Y-1)),[]),H=O.respectReducedMotion&&N?1:d,P=Xe({name:"Notifications",classes:bB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:f,vars:l,varsResolver:_B});A.useEffect(()=>{k==null||k.updateState(Y=>({...Y,limit:y||5,defaultPosition:c}))},[y,c]),Go(()=>{T.notifications.length>R.current&&setTimeout(()=>M(),0),R.current=T.notifications.length},[T.notifications]);const $=Ete(T.notifications,c),q=gB.reduce((Y,D)=>(Y[D]=$[D].map(({style:W,...V})=>b.jsx(Hte,{timeout:H,onEnter:()=>F.current[V.id].offsetHeight,nodeRef:{current:F.current[V.id]},children:z=>b.jsx(yB,{ref:X=>{X&&(F.current[V.id]=X)},data:V,onHide:X=>vB(X,k),autoClose:h,paused:C==="all"?L>0:!1,onHoverStart:G,onHoverEnd:U,...P("notification",{style:{...jte({state:z,position:D,transitionDuration:H,maxHeight:v}),...W}})})},V.id)),Y),{});return b.jsxs(el,{withinPortal:S,..._,children:[b.jsx(ve,{...P("root"),"data-position":"top-center",...E,children:b.jsx(Bs,{children:q["top-center"]})}),b.jsx(ve,{...P("root"),"data-position":"top-left",...E,children:b.jsx(Bs,{children:q["top-left"]})}),b.jsx(ve,{...P("root",{className:ru.classNames.fullWidth}),"data-position":"top-right",...E,children:b.jsx(Bs,{children:q["top-right"]})}),b.jsx(ve,{...P("root",{className:ru.classNames.fullWidth}),"data-position":"bottom-right",...E,children:b.jsx(Bs,{children:q["bottom-right"]})}),b.jsx(ve,{...P("root"),"data-position":"bottom-left",...E,children:b.jsx(Bs,{children:q["bottom-left"]})}),b.jsx(ve,{...P("root"),"data-position":"bottom-center",...E,children:b.jsx(Bs,{children:q["bottom-center"]})})]})});lo.classes=bB;lo.varsResolver=_B;lo.displayName="@mantine/notifications/Notifications";lo.show=qn.show;lo.hide=qn.hide;lo.update=qn.update;lo.clean=qn.clean;lo.cleanQueue=qn.cleanQueue;lo.updateState=qn.updateState;var bk={exports:{}},Bd={},wk={exports:{}},kk={};/** + * @license React + * scheduler.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var yj;function Vte(){return yj||(yj=1,(function(e){function n(P,$){var q=P.length;P.push($);e:for(;0>>1,D=P[Y];if(0>>1;Yr(z,q))Xr(ee,z)?(P[Y]=ee,P[X]=q,Y=X):(P[Y]=z,P[V]=q,Y=V);else if(Xr(ee,q))P[Y]=ee,P[X]=q,Y=X;else break e}}return $}function r(P,$){var q=P.sortIndex-$.sortIndex;return q!==0?q:P.id-$.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var f=[],c=[],h=1,d=null,p=3,v=!1,y=!1,w=!1,k=!1,_=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function E(P){for(var $=t(c);$!==null;){if($.callback===null)i(c);else if($.startTime<=P)i(c),$.sortIndex=$.expirationTime,n(f,$);else break;$=t(c)}}function O(P){if(w=!1,E(P),!y)if(t(f)!==null)y=!0,T||(T=!0,B());else{var $=t(c);$!==null&&H(O,$.startTime-P)}}var T=!1,M=-1,N=5,F=-1;function R(){return k?!0:!(e.unstable_now()-FP&&R());){var Y=d.callback;if(typeof Y=="function"){d.callback=null,p=d.priorityLevel;var D=Y(d.expirationTime<=P);if(P=e.unstable_now(),typeof D=="function"){d.callback=D,E(P),$=!0;break n}d===t(f)&&i(f),E(P)}else i(f);d=t(f)}if(d!==null)$=!0;else{var W=t(c);W!==null&&H(O,W.startTime-P),$=!1}}break e}finally{d=null,p=q,v=!1}$=void 0}}finally{$?B():T=!1}}}var B;if(typeof C=="function")B=function(){C(L)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,U=G.port2;G.port1.onmessage=L,B=function(){U.postMessage(null)}}else B=function(){_(L,0)};function H(P,$){M=_(function(){P(e.unstable_now())},$)}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(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125Y?(P.sortIndex=q,n(c,P),t(f)===null&&P===t(c)&&(w?(S(M),M=-1):w=!0,H(O,q-Y))):(P.sortIndex=D,n(f,P),y||v||(y=!0,T||(T=!0,B()))),P},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(P){var $=p;return function(){var q=p;p=$;try{return P.apply(this,arguments)}finally{p=q}}}})(kk)),kk}var bj;function Wte(){return bj||(bj=1,wk.exports=Vte()),wk.exports}/** + * @license React + * react-dom-client.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var wj;function Gte(){if(wj)return Bd;wj=1;var e=Wte(),n=d6(),t=ez();function i(s){var u="https://react.dev/errors/"+s;if(1D||(s.current=Y[D],Y[D]=null,D--)}function z(s,u){D++,Y[D]=s.current,s.current=u}var X=W(null),ee=W(null),re=W(null),le=W(null);function be(s,u){switch(z(re,u),z(ee,s),z(X,null),u.nodeType){case 9:case 11:s=(s=u.documentElement)&&(s=s.namespaceURI)?bT(s):0;break;default:if(s=u.tagName,u=u.namespaceURI)u=bT(u),s=wT(u,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}V(X),z(X,s)}function ae(){V(X),V(ee),V(re)}function ue(s){s.memoizedState!==null&&z(le,s);var u=X.current,m=wT(u,s.type);u!==m&&(z(ee,s),z(X,m))}function Ce(s){ee.current===s&&(V(X),V(ee)),le.current===s&&(V(le),Rd._currentValue=q)}var ne,Ne;function pe(s){if(ne===void 0)try{throw Error()}catch(m){var u=m.stack.trim().match(/\n( *(at )?)/);ne=u&&u[1]||"",Ne=-1)":-1x||Q[g]!==de[x]){var Ae=` +`+Q[g].replace(" at new "," at ");return s.displayName&&Ae.includes("")&&(Ae=Ae.replace("",s.displayName)),Ae}while(1<=g&&0<=x);break}}}finally{Ee=!1,Error.prepareStackTrace=m}return(m=s?s.displayName||s.name:"")?pe(m):""}function we(s,u){switch(s.tag){case 26:case 27:case 5:return pe(s.type);case 16:return pe("Lazy");case 13:return s.child!==u&&u!==null?pe("Suspense Fallback"):pe("Suspense");case 19:return pe("SuspenseList");case 0:case 15:return Re(s.type,!1);case 11:return Re(s.type.render,!1);case 1:return Re(s.type,!0);case 31:return pe("Activity");default:return""}}function Se(s){try{var u="",m=null;do u+=we(s,m),m=s,s=s.return;while(s);return u}catch(g){return` +Error generating stack: `+g.message+` +`+g.stack}}var De=Object.prototype.hasOwnProperty,qe=e.unstable_scheduleCallback,Ve=e.unstable_cancelCallback,Ue=e.unstable_shouldYield,We=e.unstable_requestPaint,Ye=e.unstable_now,sn=e.unstable_getCurrentPriorityLevel,ie=e.unstable_ImmediatePriority,se=e.unstable_UserBlockingPriority,ke=e.unstable_NormalPriority,Ze=e.unstable_LowPriority,_e=e.unstable_IdlePriority,fe=e.log,Be=e.unstable_setDisableYieldValue,pn=null,Je=null;function en(s){if(typeof fe=="function"&&Be(s),Je&&typeof Je.setStrictMode=="function")try{Je.setStrictMode(pn,s)}catch{}}var Ke=Math.clz32?Math.clz32:tt,jn=Math.log,un=Math.LN2;function tt(s){return s>>>=0,s===0?32:31-(jn(s)/un|0)|0}var pt=256,Mn=262144,bn=4194304;function _n(s){var u=s&42;if(u!==0)return u;switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function it(s,u,m){var g=s.pendingLanes;if(g===0)return 0;var x=0,j=s.suspendedLanes,I=s.pingedLanes;s=s.warmLanes;var K=g&134217727;return K!==0?(g=K&~j,g!==0?x=_n(g):(I&=K,I!==0?x=_n(I):m||(m=K&~s,m!==0&&(x=_n(m))))):(K=g&~j,K!==0?x=_n(K):I!==0?x=_n(I):m||(m=g&~s,m!==0&&(x=_n(m)))),x===0?0:u!==0&&u!==x&&(u&j)===0&&(j=x&-x,m=u&-u,j>=m||j===32&&(m&4194048)!==0)?u:x}function Et(s,u){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&u)===0}function ze(s,u){switch(s){case 1:case 2:case 4:case 8:case 64:return u+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Fe(){var s=bn;return bn<<=1,(bn&62914560)===0&&(bn=4194304),s}function Dn(s){for(var u=[],m=0;31>m;m++)u.push(s);return u}function et(s,u){s.pendingLanes|=u,u!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function An(s,u,m,g,x,j){var I=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,Q=s.expirationTimes,de=s.hiddenUpdates;for(m=I&~m;0"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var ya=/[\n"\\]/g;function Jt(s){return s.replace(ya,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function Du(s,u,m,g,x,j,I,K){s.name="",I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"?s.type=I:s.removeAttribute("type"),u!=null?I==="number"?(u===0&&s.value===""||s.value!=u)&&(s.value=""+Te(u)):s.value!==""+Te(u)&&(s.value=""+Te(u)):I!=="submit"&&I!=="reset"||s.removeAttribute("value"),u!=null?Fi(s,I,Te(u)):m!=null?Fi(s,I,Te(m)):g!=null&&s.removeAttribute("value"),x==null&&j!=null&&(s.defaultChecked=!!j),x!=null&&(s.checked=x&&typeof x!="function"&&typeof x!="symbol"),K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"?s.name=""+Te(K):s.removeAttribute("name")}function ut(s,u,m,g,x,j,I,K){if(j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"&&(s.type=j),u!=null||m!=null){if(!(j!=="submit"&&j!=="reset"||u!=null)){_t(s);return}m=m!=null?""+Te(m):"",u=u!=null?""+Te(u):m,K||u===s.value||(s.value=u),s.defaultValue=u}g=g??x,g=typeof g!="function"&&typeof g!="symbol"&&!!g,s.checked=K?s.checked:!!g,s.defaultChecked=!!g,I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"&&(s.name=I),_t(s)}function Fi(s,u,m){u==="number"&&Bt(s.ownerDocument)===s||s.defaultValue===""+m||(s.defaultValue=""+m)}function ba(s,u,m,g){if(s=s.options,u){u={};for(var x=0;x"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),F0=!1;if(po)try{var Zc={};Object.defineProperty(Zc,"passive",{get:function(){F0=!0}}),window.addEventListener("test",Zc,Zc),window.removeEventListener("test",Zc,Zc)}catch{F0=!1}var hs=null,q0=null,up=null;function wA(){if(up)return up;var s,u=q0,m=u.length,g,x="value"in hs?hs.value:hs.textContent,j=x.length;for(s=0;s=ed),AA=" ",OA=!1;function EA(s,u){switch(s){case"keyup":return rG.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function TA(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var zu=!1;function oG(s,u){switch(s){case"compositionend":return TA(u);case"keypress":return u.which!==32?null:(OA=!0,AA);case"textInput":return s=u.data,s===AA&&OA?null:s;default:return null}}function sG(s,u){if(zu)return s==="compositionend"||!G0&&EA(s,u)?(s=wA(),up=q0=hs=null,zu=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1=u)return{node:m,offset:u-s};s=g}e:{for(;m;){if(m.nextSibling){m=m.nextSibling;break e}m=m.parentNode}m=void 0}m=zA(m)}}function IA(s,u){return s&&u?s===u?!0:s&&s.nodeType===3?!1:u&&u.nodeType===3?IA(s,u.parentNode):"contains"in s?s.contains(u):s.compareDocumentPosition?!!(s.compareDocumentPosition(u)&16):!1:!1}function BA(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var u=Bt(s.document);u instanceof s.HTMLIFrameElement;){try{var m=typeof u.contentWindow.location.href=="string"}catch{m=!1}if(m)s=u.contentWindow;else break;u=Bt(s.document)}return u}function X0(s){var u=s&&s.nodeName&&s.nodeName.toLowerCase();return u&&(u==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||u==="textarea"||s.contentEditable==="true")}var pG=po&&"documentMode"in document&&11>=document.documentMode,Lu=null,Z0=null,rd=null,Q0=!1;function FA(s,u,m){var g=m.window===m?m.document:m.nodeType===9?m:m.ownerDocument;Q0||Lu==null||Lu!==Bt(g)||(g=Lu,"selectionStart"in g&&X0(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),rd&&id(rd,g)||(rd=g,g=tv(Z0,"onSelect"),0>=I,x-=I,Ba=1<<32-Ke(u)+x|m<Nn?(Xn=fn,fn=null):Xn=fn.sibling;var at=he(oe,fn,ce[Nn],je);if(at===null){fn===null&&(fn=Xn);break}s&&fn&&at.alternate===null&&u(oe,fn),te=j(at,te,Nn),rt===null?mn=at:rt.sibling=at,rt=at,fn=Xn}if(Nn===ce.length)return m(oe,fn),Zn&&go(oe,Nn),mn;if(fn===null){for(;NnNn?(Xn=fn,fn=null):Xn=fn.sibling;var Ns=he(oe,fn,at.value,je);if(Ns===null){fn===null&&(fn=Xn);break}s&&fn&&Ns.alternate===null&&u(oe,fn),te=j(Ns,te,Nn),rt===null?mn=Ns:rt.sibling=Ns,rt=Ns,fn=Xn}if(at.done)return m(oe,fn),Zn&&go(oe,Nn),mn;if(fn===null){for(;!at.done;Nn++,at=ce.next())at=Me(oe,at.value,je),at!==null&&(te=j(at,te,Nn),rt===null?mn=at:rt.sibling=at,rt=at);return Zn&&go(oe,Nn),mn}for(fn=g(fn);!at.done;Nn++,at=ce.next())at=ge(fn,oe,Nn,at.value,je),at!==null&&(s&&at.alternate!==null&&fn.delete(at.key===null?Nn:at.key),te=j(at,te,Nn),rt===null?mn=at:rt.sibling=at,rt=at);return s&&fn.forEach(function(NY){return u(oe,NY)}),Zn&&go(oe,Nn),mn}function yt(oe,te,ce,je){if(typeof ce=="object"&&ce!==null&&ce.type===w&&ce.key===null&&(ce=ce.props.children),typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case v:e:{for(var mn=ce.key;te!==null;){if(te.key===mn){if(mn=ce.type,mn===w){if(te.tag===7){m(oe,te.sibling),je=x(te,ce.props.children),je.return=oe,oe=je;break e}}else if(te.elementType===mn||typeof mn=="object"&&mn!==null&&mn.$$typeof===N&&El(mn)===te.type){m(oe,te.sibling),je=x(te,ce.props),fd(je,ce),je.return=oe,oe=je;break e}m(oe,te);break}else u(oe,te);te=te.sibling}ce.type===w?(je=xl(ce.props.children,oe.mode,je,ce.key),je.return=oe,oe=je):(je=bp(ce.type,ce.key,ce.props,null,oe.mode,je),fd(je,ce),je.return=oe,oe=je)}return I(oe);case y:e:{for(mn=ce.key;te!==null;){if(te.key===mn)if(te.tag===4&&te.stateNode.containerInfo===ce.containerInfo&&te.stateNode.implementation===ce.implementation){m(oe,te.sibling),je=x(te,ce.children||[]),je.return=oe,oe=je;break e}else{m(oe,te);break}else u(oe,te);te=te.sibling}je=ab(ce,oe.mode,je),je.return=oe,oe=je}return I(oe);case N:return ce=El(ce),yt(oe,te,ce,je)}if(H(ce))return on(oe,te,ce,je);if(B(ce)){if(mn=B(ce),typeof mn!="function")throw Error(i(150));return ce=mn.call(ce),gn(oe,te,ce,je)}if(typeof ce.then=="function")return yt(oe,te,Ap(ce),je);if(ce.$$typeof===C)return yt(oe,te,_p(oe,ce),je);Op(oe,ce)}return typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint"?(ce=""+ce,te!==null&&te.tag===6?(m(oe,te.sibling),je=x(te,ce),je.return=oe,oe=je):(m(oe,te),je=rb(ce,oe.mode,je),je.return=oe,oe=je),I(oe)):m(oe,te)}return function(oe,te,ce,je){try{ud=0;var mn=yt(oe,te,ce,je);return Ku=null,mn}catch(fn){if(fn===Yu||fn===Sp)throw fn;var rt=Ar(29,fn,null,oe.mode);return rt.lanes=je,rt.return=oe,rt}finally{}}}var jl=fO(!0),cO=fO(!1),ys=!1;function gb(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function yb(s,u){s=s.updateQueue,u.updateQueue===s&&(u.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function bs(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function ws(s,u,m){var g=s.updateQueue;if(g===null)return null;if(g=g.shared,(lt&2)!==0){var x=g.pending;return x===null?u.next=u:(u.next=x.next,x.next=u),g.pending=u,u=yp(s),YA(s,null,m),u}return gp(s,g,u,m),yp(s)}function cd(s,u,m){if(u=u.updateQueue,u!==null&&(u=u.shared,(m&4194048)!==0)){var g=u.lanes;g&=s.pendingLanes,m|=g,u.lanes=m,tn(s,m)}}function bb(s,u){var m=s.updateQueue,g=s.alternate;if(g!==null&&(g=g.updateQueue,m===g)){var x=null,j=null;if(m=m.firstBaseUpdate,m!==null){do{var I={lane:m.lane,tag:m.tag,payload:m.payload,callback:null,next:null};j===null?x=j=I:j=j.next=I,m=m.next}while(m!==null);j===null?x=j=u:j=j.next=u}else x=j=u;m={baseState:g.baseState,firstBaseUpdate:x,lastBaseUpdate:j,shared:g.shared,callbacks:g.callbacks},s.updateQueue=m;return}s=m.lastBaseUpdate,s===null?m.firstBaseUpdate=u:s.next=u,m.lastBaseUpdate=u}var wb=!1;function dd(){if(wb){var s=Gu;if(s!==null)throw s}}function hd(s,u,m,g){wb=!1;var x=s.updateQueue;ys=!1;var j=x.firstBaseUpdate,I=x.lastBaseUpdate,K=x.shared.pending;if(K!==null){x.shared.pending=null;var Q=K,de=Q.next;Q.next=null,I===null?j=de:I.next=de,I=Q;var Ae=s.alternate;Ae!==null&&(Ae=Ae.updateQueue,K=Ae.lastBaseUpdate,K!==I&&(K===null?Ae.firstBaseUpdate=de:K.next=de,Ae.lastBaseUpdate=Q))}if(j!==null){var Me=x.baseState;I=0,Ae=de=Q=null,K=j;do{var he=K.lane&-536870913,ge=he!==K.lane;if(ge?(Kn&he)===he:(g&he)===he){he!==0&&he===Wu&&(wb=!0),Ae!==null&&(Ae=Ae.next={lane:0,tag:K.tag,payload:K.payload,callback:null,next:null});e:{var on=s,gn=K;he=u;var yt=m;switch(gn.tag){case 1:if(on=gn.payload,typeof on=="function"){Me=on.call(yt,Me,he);break e}Me=on;break e;case 3:on.flags=on.flags&-65537|128;case 0:if(on=gn.payload,he=typeof on=="function"?on.call(yt,Me,he):on,he==null)break e;Me=d({},Me,he);break e;case 2:ys=!0}}he=K.callback,he!==null&&(s.flags|=64,ge&&(s.flags|=8192),ge=x.callbacks,ge===null?x.callbacks=[he]:ge.push(he))}else ge={lane:he,tag:K.tag,payload:K.payload,callback:K.callback,next:null},Ae===null?(de=Ae=ge,Q=Me):Ae=Ae.next=ge,I|=he;if(K=K.next,K===null){if(K=x.shared.pending,K===null)break;ge=K,K=ge.next,ge.next=null,x.lastBaseUpdate=ge,x.shared.pending=null}}while(!0);Ae===null&&(Q=Me),x.baseState=Q,x.firstBaseUpdate=de,x.lastBaseUpdate=Ae,j===null&&(x.shared.lanes=0),Cs|=I,s.lanes=I,s.memoizedState=Me}}function dO(s,u){if(typeof s!="function")throw Error(i(191,s));s.call(u)}function hO(s,u){var m=s.callbacks;if(m!==null)for(s.callbacks=null,s=0;sj?j:8;var I=P.T,K={};P.T=K,Ib(s,!1,u,m);try{var Q=x(),de=P.S;if(de!==null&&de(K,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var Ae=SG(Q,g);vd(s,u,Ae,Mr(s))}else vd(s,u,g,Mr(s))}catch(Me){vd(s,u,{then:function(){},status:"rejected",reason:Me},Mr())}finally{$.p=j,I!==null&&K.types!==null&&(I.types=K.types),P.T=I}}function jG(){}function zb(s,u,m,g){if(s.tag!==5)throw Error(i(476));var x=VO(s).queue;UO(s,x,u,q,m===null?jG:function(){return WO(s),m(g)})}function VO(s){var u=s.memoizedState;if(u!==null)return u;u={memoizedState:q,baseState:q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ko,lastRenderedState:q},next:null};var m={};return u.next={memoizedState:m,baseState:m,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ko,lastRenderedState:m},next:null},s.memoizedState=u,s=s.alternate,s!==null&&(s.memoizedState=u),u}function WO(s){var u=VO(s);u.next===null&&(u=s.alternate.memoizedState),vd(s,u.next.queue,{},Mr())}function Lb(){return ji(Rd)}function GO(){return ni().memoizedState}function YO(){return ni().memoizedState}function MG(s){for(var u=s.return;u!==null;){switch(u.tag){case 24:case 3:var m=Mr();s=bs(m);var g=ws(u,s,m);g!==null&&(fr(g,u,m),cd(g,u,m)),u={cache:hb()},s.payload=u;return}u=u.return}}function DG(s,u,m){var g=Mr();m={lane:g,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},zp(s)?XO(u,m):(m=tb(s,u,m,g),m!==null&&(fr(m,s,g),ZO(m,u,g)))}function KO(s,u,m){var g=Mr();vd(s,u,m,g)}function vd(s,u,m,g){var x={lane:g,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null};if(zp(s))XO(u,x);else{var j=s.alternate;if(s.lanes===0&&(j===null||j.lanes===0)&&(j=u.lastRenderedReducer,j!==null))try{var I=u.lastRenderedState,K=j(I,m);if(x.hasEagerState=!0,x.eagerState=K,Cr(K,I))return gp(s,u,x,0),xt===null&&vp(),!1}catch{}finally{}if(m=tb(s,u,x,g),m!==null)return fr(m,s,g),ZO(m,u,g),!0}return!1}function Ib(s,u,m,g){if(g={lane:2,revertLane:gw(),gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},zp(s)){if(u)throw Error(i(479))}else u=tb(s,m,g,2),u!==null&&fr(u,s,2)}function zp(s){var u=s.alternate;return s===Rn||u!==null&&u===Rn}function XO(s,u){Zu=jp=!0;var m=s.pending;m===null?u.next=u:(u.next=m.next,m.next=u),s.pending=u}function ZO(s,u,m){if((m&4194048)!==0){var g=u.lanes;g&=s.pendingLanes,m|=g,u.lanes=m,tn(s,m)}}var gd={readContext:ji,use:Rp,useCallback:Yt,useContext:Yt,useEffect:Yt,useImperativeHandle:Yt,useLayoutEffect:Yt,useInsertionEffect:Yt,useMemo:Yt,useReducer:Yt,useRef:Yt,useState:Yt,useDebugValue:Yt,useDeferredValue:Yt,useTransition:Yt,useSyncExternalStore:Yt,useId:Yt,useHostTransitionStatus:Yt,useFormState:Yt,useActionState:Yt,useOptimistic:Yt,useMemoCache:Yt,useCacheRefresh:Yt};gd.useEffectEvent=Yt;var QO={readContext:ji,use:Rp,useCallback:function(s,u){return Ji().memoizedState=[s,u===void 0?null:u],s},useContext:ji,useEffect:NO,useImperativeHandle:function(s,u,m){m=m!=null?m.concat([s]):null,Np(4194308,4,IO.bind(null,u,s),m)},useLayoutEffect:function(s,u){return Np(4194308,4,s,u)},useInsertionEffect:function(s,u){Np(4,2,s,u)},useMemo:function(s,u){var m=Ji();u=u===void 0?null:u;var g=s();if(Ml){en(!0);try{s()}finally{en(!1)}}return m.memoizedState=[g,u],g},useReducer:function(s,u,m){var g=Ji();if(m!==void 0){var x=m(u);if(Ml){en(!0);try{m(u)}finally{en(!1)}}}else x=u;return g.memoizedState=g.baseState=x,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:x},g.queue=s,s=s.dispatch=DG.bind(null,Rn,s),[g.memoizedState,s]},useRef:function(s){var u=Ji();return s={current:s},u.memoizedState=s},useState:function(s){s=Db(s);var u=s.queue,m=KO.bind(null,Rn,u);return u.dispatch=m,[s.memoizedState,m]},useDebugValue:Nb,useDeferredValue:function(s,u){var m=Ji();return $b(m,s,u)},useTransition:function(){var s=Db(!1);return s=UO.bind(null,Rn,s.queue,!0,!1),Ji().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,u,m){var g=Rn,x=Ji();if(Zn){if(m===void 0)throw Error(i(407));m=m()}else{if(m=u(),xt===null)throw Error(i(349));(Kn&127)!==0||bO(g,u,m)}x.memoizedState=m;var j={value:m,getSnapshot:u};return x.queue=j,NO(kO.bind(null,g,j,s),[s]),g.flags|=2048,Ju(9,{destroy:void 0},wO.bind(null,g,j,m,u),null),m},useId:function(){var s=Ji(),u=xt.identifierPrefix;if(Zn){var m=Fa,g=Ba;m=(g&~(1<<32-Ke(g)-1)).toString(32)+m,u="_"+u+"R_"+m,m=Mp++,0<\/script>",j=j.removeChild(j.firstChild);break;case"select":j=typeof g.is=="string"?I.createElement("select",{is:g.is}):I.createElement("select"),g.multiple?j.multiple=!0:g.size&&(j.size=g.size);break;default:j=typeof g.is=="string"?I.createElement(x,{is:g.is}):I.createElement(x)}}j[Hn]=u,j[Vt]=g;e:for(I=u.child;I!==null;){if(I.tag===5||I.tag===6)j.appendChild(I.stateNode);else if(I.tag!==4&&I.tag!==27&&I.child!==null){I.child.return=I,I=I.child;continue}if(I===u)break e;for(;I.sibling===null;){if(I.return===null||I.return===u)break e;I=I.return}I.sibling.return=I.return,I=I.sibling}u.stateNode=j;e:switch(Di(j,x,g),x){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}g&&xo(u)}}return Pt(u),Jb(u,u.type,s===null?null:s.memoizedProps,u.pendingProps,m),null;case 6:if(s&&u.stateNode!=null)s.memoizedProps!==g&&xo(u);else{if(typeof g!="string"&&u.stateNode===null)throw Error(i(166));if(s=re.current,Uu(u)){if(s=u.stateNode,m=u.memoizedProps,g=null,x=Ti,x!==null)switch(x.tag){case 27:case 5:g=x.memoizedProps}s[Hn]=u,s=!!(s.nodeValue===m||g!==null&&g.suppressHydrationWarning===!0||gT(s.nodeValue,m)),s||vs(u,!0)}else s=iv(s).createTextNode(g),s[Hn]=u,u.stateNode=s}return Pt(u),null;case 31:if(m=u.memoizedState,s===null||s.memoizedState!==null){if(g=Uu(u),m!==null){if(s===null){if(!g)throw Error(i(318));if(s=u.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(i(557));s[Hn]=u}else Sl(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Pt(u),s=!1}else m=ub(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=m),s=!0;if(!s)return u.flags&256?(Er(u),u):(Er(u),null);if((u.flags&128)!==0)throw Error(i(558))}return Pt(u),null;case 13:if(g=u.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(x=Uu(u),g!==null&&g.dehydrated!==null){if(s===null){if(!x)throw Error(i(318));if(x=u.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(i(317));x[Hn]=u}else Sl(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Pt(u),x=!1}else x=ub(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=x),x=!0;if(!x)return u.flags&256?(Er(u),u):(Er(u),null)}return Er(u),(u.flags&128)!==0?(u.lanes=m,u):(m=g!==null,s=s!==null&&s.memoizedState!==null,m&&(g=u.child,x=null,g.alternate!==null&&g.alternate.memoizedState!==null&&g.alternate.memoizedState.cachePool!==null&&(x=g.alternate.memoizedState.cachePool.pool),j=null,g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(j=g.memoizedState.cachePool.pool),j!==x&&(g.flags|=2048)),m!==s&&m&&(u.child.flags|=8192),qp(u,u.updateQueue),Pt(u),null);case 4:return ae(),s===null&&kw(u.stateNode.containerInfo),Pt(u),null;case 10:return bo(u.type),Pt(u),null;case 19:if(V(ei),g=u.memoizedState,g===null)return Pt(u),null;if(x=(u.flags&128)!==0,j=g.rendering,j===null)if(x)bd(g,!1);else{if(Kt!==0||s!==null&&(s.flags&128)!==0)for(s=u.child;s!==null;){if(j=Tp(s),j!==null){for(u.flags|=128,bd(g,!1),s=j.updateQueue,u.updateQueue=s,qp(u,s),u.subtreeFlags=0,s=m,m=u.child;m!==null;)KA(m,s),m=m.sibling;return z(ei,ei.current&1|2),Zn&&go(u,g.treeForkCount),u.child}s=s.sibling}g.tail!==null&&Ye()>Gp&&(u.flags|=128,x=!0,bd(g,!1),u.lanes=4194304)}else{if(!x)if(s=Tp(j),s!==null){if(u.flags|=128,x=!0,s=s.updateQueue,u.updateQueue=s,qp(u,s),bd(g,!0),g.tail===null&&g.tailMode==="hidden"&&!j.alternate&&!Zn)return Pt(u),null}else 2*Ye()-g.renderingStartTime>Gp&&m!==536870912&&(u.flags|=128,x=!0,bd(g,!1),u.lanes=4194304);g.isBackwards?(j.sibling=u.child,u.child=j):(s=g.last,s!==null?s.sibling=j:u.child=j,g.last=j)}return g.tail!==null?(s=g.tail,g.rendering=s,g.tail=s.sibling,g.renderingStartTime=Ye(),s.sibling=null,m=ei.current,z(ei,x?m&1|2:m&1),Zn&&go(u,g.treeForkCount),s):(Pt(u),null);case 22:case 23:return Er(u),_b(),g=u.memoizedState!==null,s!==null?s.memoizedState!==null!==g&&(u.flags|=8192):g&&(u.flags|=8192),g?(m&536870912)!==0&&(u.flags&128)===0&&(Pt(u),u.subtreeFlags&6&&(u.flags|=8192)):Pt(u),m=u.updateQueue,m!==null&&qp(u,m.retryQueue),m=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(m=s.memoizedState.cachePool.pool),g=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(g=u.memoizedState.cachePool.pool),g!==m&&(u.flags|=2048),s!==null&&V(Ol),null;case 24:return m=null,s!==null&&(m=s.memoizedState.cache),u.memoizedState.cache!==m&&(u.flags|=2048),bo(oi),Pt(u),null;case 25:return null;case 30:return null}throw Error(i(156,u.tag))}function zG(s,u){switch(sb(u),u.tag){case 1:return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 3:return bo(oi),ae(),s=u.flags,(s&65536)!==0&&(s&128)===0?(u.flags=s&-65537|128,u):null;case 26:case 27:case 5:return Ce(u),null;case 31:if(u.memoizedState!==null){if(Er(u),u.alternate===null)throw Error(i(340));Sl()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 13:if(Er(u),s=u.memoizedState,s!==null&&s.dehydrated!==null){if(u.alternate===null)throw Error(i(340));Sl()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 19:return V(ei),null;case 4:return ae(),null;case 10:return bo(u.type),null;case 22:case 23:return Er(u),_b(),s!==null&&V(Ol),s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 24:return bo(oi),null;case 25:return null;default:return null}}function _E(s,u){switch(sb(u),u.tag){case 3:bo(oi),ae();break;case 26:case 27:case 5:Ce(u);break;case 4:ae();break;case 31:u.memoizedState!==null&&Er(u);break;case 13:Er(u);break;case 19:V(ei);break;case 10:bo(u.type);break;case 22:case 23:Er(u),_b(),s!==null&&V(Ol);break;case 24:bo(oi)}}function wd(s,u){try{var m=u.updateQueue,g=m!==null?m.lastEffect:null;if(g!==null){var x=g.next;m=x;do{if((m.tag&s)===s){g=void 0;var j=m.create,I=m.inst;g=j(),I.destroy=g}m=m.next}while(m!==x)}}catch(K){ht(u,u.return,K)}}function xs(s,u,m){try{var g=u.updateQueue,x=g!==null?g.lastEffect:null;if(x!==null){var j=x.next;g=j;do{if((g.tag&s)===s){var I=g.inst,K=I.destroy;if(K!==void 0){I.destroy=void 0,x=u;var Q=m,de=K;try{de()}catch(Ae){ht(x,Q,Ae)}}}g=g.next}while(g!==j)}}catch(Ae){ht(u,u.return,Ae)}}function xE(s){var u=s.updateQueue;if(u!==null){var m=s.stateNode;try{hO(u,m)}catch(g){ht(s,s.return,g)}}}function SE(s,u,m){m.props=Dl(s.type,s.memoizedProps),m.state=s.memoizedState;try{m.componentWillUnmount()}catch(g){ht(s,u,g)}}function kd(s,u){try{var m=s.ref;if(m!==null){switch(s.tag){case 26:case 27:case 5:var g=s.stateNode;break;case 30:g=s.stateNode;break;default:g=s.stateNode}typeof m=="function"?s.refCleanup=m(g):m.current=g}}catch(x){ht(s,u,x)}}function qa(s,u){var m=s.ref,g=s.refCleanup;if(m!==null)if(typeof g=="function")try{g()}catch(x){ht(s,u,x)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof m=="function")try{m(null)}catch(x){ht(s,u,x)}else m.current=null}function CE(s){var u=s.type,m=s.memoizedProps,g=s.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":m.autoFocus&&g.focus();break e;case"img":m.src?g.src=m.src:m.srcSet&&(g.srcset=m.srcSet)}}catch(x){ht(s,s.return,x)}}function ew(s,u,m){try{var g=s.stateNode;aY(g,s.type,m,u),g[Vt]=u}catch(x){ht(s,s.return,x)}}function AE(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&js(s.type)||s.tag===4}function nw(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||AE(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&&js(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 tw(s,u,m){var g=s.tag;if(g===5||g===6)s=s.stateNode,u?(m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m).insertBefore(s,u):(u=m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m,u.appendChild(s),m=m._reactRootContainer,m!=null||u.onclick!==null||(u.onclick=ai));else if(g!==4&&(g===27&&js(s.type)&&(m=s.stateNode,u=null),s=s.child,s!==null))for(tw(s,u,m),s=s.sibling;s!==null;)tw(s,u,m),s=s.sibling}function Hp(s,u,m){var g=s.tag;if(g===5||g===6)s=s.stateNode,u?m.insertBefore(s,u):m.appendChild(s);else if(g!==4&&(g===27&&js(s.type)&&(m=s.stateNode),s=s.child,s!==null))for(Hp(s,u,m),s=s.sibling;s!==null;)Hp(s,u,m),s=s.sibling}function OE(s){var u=s.stateNode,m=s.memoizedProps;try{for(var g=s.type,x=u.attributes;x.length;)u.removeAttributeNode(x[0]);Di(u,g,m),u[Hn]=s,u[Vt]=m}catch(j){ht(s,s.return,j)}}var So=!1,ui=!1,iw=!1,EE=typeof WeakSet=="function"?WeakSet:Set,_i=null;function LG(s,u){if(s=s.containerInfo,Sw=fv,s=BA(s),X0(s)){if("selectionStart"in s)var m={start:s.selectionStart,end:s.selectionEnd};else e:{m=(m=s.ownerDocument)&&m.defaultView||window;var g=m.getSelection&&m.getSelection();if(g&&g.rangeCount!==0){m=g.anchorNode;var x=g.anchorOffset,j=g.focusNode;g=g.focusOffset;try{m.nodeType,j.nodeType}catch{m=null;break e}var I=0,K=-1,Q=-1,de=0,Ae=0,Me=s,he=null;n:for(;;){for(var ge;Me!==m||x!==0&&Me.nodeType!==3||(K=I+x),Me!==j||g!==0&&Me.nodeType!==3||(Q=I+g),Me.nodeType===3&&(I+=Me.nodeValue.length),(ge=Me.firstChild)!==null;)he=Me,Me=ge;for(;;){if(Me===s)break n;if(he===m&&++de===x&&(K=I),he===j&&++Ae===g&&(Q=I),(ge=Me.nextSibling)!==null)break;Me=he,he=Me.parentNode}Me=ge}m=K===-1||Q===-1?null:{start:K,end:Q}}else m=null}m=m||{start:0,end:0}}else m=null;for(Cw={focusedElem:s,selectionRange:m},fv=!1,_i=u;_i!==null;)if(u=_i,s=u.child,(u.subtreeFlags&1028)!==0&&s!==null)s.return=u,_i=s;else for(;_i!==null;){switch(u=_i,j=u.alternate,s=u.flags,u.tag){case 0:if((s&4)!==0&&(s=u.updateQueue,s=s!==null?s.events:null,s!==null))for(m=0;m title"))),Di(j,g,m),j[Hn]=s,ln(j),g=j;break e;case"link":var I=PT("link","href",x).get(g+(m.href||""));if(I){for(var K=0;Kyt&&(I=yt,yt=gn,gn=I);var oe=LA(K,gn),te=LA(K,yt);if(oe&&te&&(ge.rangeCount!==1||ge.anchorNode!==oe.node||ge.anchorOffset!==oe.offset||ge.focusNode!==te.node||ge.focusOffset!==te.offset)){var ce=Me.createRange();ce.setStart(oe.node,oe.offset),ge.removeAllRanges(),gn>yt?(ge.addRange(ce),ge.extend(te.node,te.offset)):(ce.setEnd(te.node,te.offset),ge.addRange(ce))}}}}for(Me=[],ge=K;ge=ge.parentNode;)ge.nodeType===1&&Me.push({element:ge,left:ge.scrollLeft,top:ge.scrollTop});for(typeof K.focus=="function"&&K.focus(),K=0;Km?32:m,P.T=null,m=fw,fw=null;var j=Os,I=To;if(pi=0,af=Os=null,To=0,(lt&6)!==0)throw Error(i(331));var K=lt;if(lt|=4,IE(j.current),$E(j,j.current,I,m),lt=K,Od(0,!1),Je&&typeof Je.onPostCommitFiberRoot=="function")try{Je.onPostCommitFiberRoot(pn,j)}catch{}return!0}finally{$.p=x,P.T=g,iT(s,u)}}function aT(s,u,m){u=Hr(m,u),u=Hb(s.stateNode,u,2),s=ws(s,u,2),s!==null&&(et(s,2),Ha(s))}function ht(s,u,m){if(s.tag===3)aT(s,s,m);else for(;u!==null;){if(u.tag===3){aT(u,s,m);break}else if(u.tag===1){var g=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(As===null||!As.has(g))){s=Hr(m,s),m=oE(2),g=ws(u,m,2),g!==null&&(sE(m,g,u,s),et(g,2),Ha(g));break}}u=u.return}}function mw(s,u,m){var g=s.pingCache;if(g===null){g=s.pingCache=new FG;var x=new Set;g.set(u,x)}else x=g.get(u),x===void 0&&(x=new Set,g.set(u,x));x.has(m)||(ow=!0,x.add(m),s=WG.bind(null,s,u,m),u.then(s,s))}function WG(s,u,m){var g=s.pingCache;g!==null&&g.delete(u),s.pingedLanes|=s.suspendedLanes&m,s.warmLanes&=~m,xt===s&&(Kn&m)===m&&(Kt===4||Kt===3&&(Kn&62914560)===Kn&&300>Ye()-Wp?(lt&2)===0&&of(s,0):sw|=m,rf===Kn&&(rf=0)),Ha(s)}function oT(s,u){u===0&&(u=Fe()),s=_l(s,u),s!==null&&(et(s,u),Ha(s))}function GG(s){var u=s.memoizedState,m=0;u!==null&&(m=u.retryLane),oT(s,m)}function YG(s,u){var m=0;switch(s.tag){case 31:case 13:var g=s.stateNode,x=s.memoizedState;x!==null&&(m=x.retryLane);break;case 19:g=s.stateNode;break;case 22:g=s.stateNode._retryCache;break;default:throw Error(i(314))}g!==null&&g.delete(u),oT(s,m)}function KG(s,u){return qe(s,u)}var Jp=null,lf=null,pw=!1,ev=!1,vw=!1,Ts=0;function Ha(s){s!==lf&&s.next===null&&(lf===null?Jp=lf=s:lf=lf.next=s),ev=!0,pw||(pw=!0,ZG())}function Od(s,u){if(!vw&&ev){vw=!0;do for(var m=!1,g=Jp;g!==null;){if(s!==0){var x=g.pendingLanes;if(x===0)var j=0;else{var I=g.suspendedLanes,K=g.pingedLanes;j=(1<<31-Ke(42|s)+1)-1,j&=x&~(I&~K),j=j&201326741?j&201326741|1:j?j|2:0}j!==0&&(m=!0,fT(g,j))}else j=Kn,j=it(g,g===xt?j:0,g.cancelPendingCommit!==null||g.timeoutHandle!==-1),(j&3)===0||Et(g,j)||(m=!0,fT(g,j));g=g.next}while(m);vw=!1}}function XG(){sT()}function sT(){ev=pw=!1;var s=0;Ts!==0&&sY()&&(s=Ts);for(var u=Ye(),m=null,g=Jp;g!==null;){var x=g.next,j=lT(g,u);j===0?(g.next=null,m===null?Jp=x:m.next=x,x===null&&(lf=m)):(m=g,(s!==0||(j&3)!==0)&&(ev=!0)),g=x}pi!==0&&pi!==5||Od(s),Ts!==0&&(Ts=0)}function lT(s,u){for(var m=s.suspendedLanes,g=s.pingedLanes,x=s.expirationTimes,j=s.pendingLanes&-62914561;0K)break;var Ae=Q.transferSize,Me=Q.initiatorType;Ae&&yT(Me)&&(Q=Q.responseEnd,I+=Ae*(Q"u"?null:document;function jT(s,u,m){var g=uf;if(g&&typeof u=="string"&&u){var x=Jt(u);x='link[rel="'+s+'"][href="'+x+'"]',typeof m=="string"&&(x+='[crossorigin="'+m+'"]'),TT.has(x)||(TT.add(x),s={rel:s,crossOrigin:m,href:u},g.querySelector(x)===null&&(u=g.createElement("link"),Di(u,"link",s),ln(u),g.head.appendChild(u)))}}function vY(s){jo.D(s),jT("dns-prefetch",s,null)}function gY(s,u){jo.C(s,u),jT("preconnect",s,u)}function yY(s,u,m){jo.L(s,u,m);var g=uf;if(g&&s&&u){var x='link[rel="preload"][as="'+Jt(u)+'"]';u==="image"&&m&&m.imageSrcSet?(x+='[imagesrcset="'+Jt(m.imageSrcSet)+'"]',typeof m.imageSizes=="string"&&(x+='[imagesizes="'+Jt(m.imageSizes)+'"]')):x+='[href="'+Jt(s)+'"]';var j=x;switch(u){case"style":j=ff(s);break;case"script":j=cf(s)}Kr.has(j)||(s=d({rel:"preload",href:u==="image"&&m&&m.imageSrcSet?void 0:s,as:u},m),Kr.set(j,s),g.querySelector(x)!==null||u==="style"&&g.querySelector(Md(j))||u==="script"&&g.querySelector(Dd(j))||(u=g.createElement("link"),Di(u,"link",s),ln(u),g.head.appendChild(u)))}}function bY(s,u){jo.m(s,u);var m=uf;if(m&&s){var g=u&&typeof u.as=="string"?u.as:"script",x='link[rel="modulepreload"][as="'+Jt(g)+'"][href="'+Jt(s)+'"]',j=x;switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":j=cf(s)}if(!Kr.has(j)&&(s=d({rel:"modulepreload",href:s},u),Kr.set(j,s),m.querySelector(x)===null)){switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(m.querySelector(Dd(j)))return}g=m.createElement("link"),Di(g,"link",s),ln(g),m.head.appendChild(g)}}}function wY(s,u,m){jo.S(s,u,m);var g=uf;if(g&&s){var x=ri(g).hoistableStyles,j=ff(s);u=u||"default";var I=x.get(j);if(!I){var K={loading:0,preload:null};if(I=g.querySelector(Md(j)))K.loading=5;else{s=d({rel:"stylesheet",href:s,"data-precedence":u},m),(m=Kr.get(j))&&Dw(s,m);var Q=I=g.createElement("link");ln(Q),Di(Q,"link",s),Q._p=new Promise(function(de,Ae){Q.onload=de,Q.onerror=Ae}),Q.addEventListener("load",function(){K.loading|=1}),Q.addEventListener("error",function(){K.loading|=2}),K.loading|=4,av(I,u,g)}I={type:"stylesheet",instance:I,count:1,state:K},x.set(j,I)}}}function kY(s,u){jo.X(s,u);var m=uf;if(m&&s){var g=ri(m).hoistableScripts,x=cf(s),j=g.get(x);j||(j=m.querySelector(Dd(x)),j||(s=d({src:s,async:!0},u),(u=Kr.get(x))&&Rw(s,u),j=m.createElement("script"),ln(j),Di(j,"link",s),m.head.appendChild(j)),j={type:"script",instance:j,count:1,state:null},g.set(x,j))}}function _Y(s,u){jo.M(s,u);var m=uf;if(m&&s){var g=ri(m).hoistableScripts,x=cf(s),j=g.get(x);j||(j=m.querySelector(Dd(x)),j||(s=d({src:s,async:!0,type:"module"},u),(u=Kr.get(x))&&Rw(s,u),j=m.createElement("script"),ln(j),Di(j,"link",s),m.head.appendChild(j)),j={type:"script",instance:j,count:1,state:null},g.set(x,j))}}function MT(s,u,m,g){var x=(x=re.current)?rv(x):null;if(!x)throw Error(i(446));switch(s){case"meta":case"title":return null;case"style":return typeof m.precedence=="string"&&typeof m.href=="string"?(u=ff(m.href),m=ri(x).hoistableStyles,g=m.get(u),g||(g={type:"style",instance:null,count:0,state:null},m.set(u,g)),g):{type:"void",instance:null,count:0,state:null};case"link":if(m.rel==="stylesheet"&&typeof m.href=="string"&&typeof m.precedence=="string"){s=ff(m.href);var j=ri(x).hoistableStyles,I=j.get(s);if(I||(x=x.ownerDocument||x,I={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},j.set(s,I),(j=x.querySelector(Md(s)))&&!j._p&&(I.instance=j,I.state.loading=5),Kr.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},Kr.set(s,m),j||xY(x,s,m,I.state))),u&&g===null)throw Error(i(528,""));return I}if(u&&g!==null)throw Error(i(529,""));return null;case"script":return u=m.async,m=m.src,typeof m=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=cf(m),m=ri(x).hoistableScripts,g=m.get(u),g||(g={type:"script",instance:null,count:0,state:null},m.set(u,g)),g):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,s))}}function ff(s){return'href="'+Jt(s)+'"'}function Md(s){return'link[rel="stylesheet"]['+s+"]"}function DT(s){return d({},s,{"data-precedence":s.precedence,precedence:null})}function xY(s,u,m,g){s.querySelector('link[rel="preload"][as="style"]['+u+"]")?g.loading=1:(u=s.createElement("link"),g.preload=u,u.addEventListener("load",function(){return g.loading|=1}),u.addEventListener("error",function(){return g.loading|=2}),Di(u,"link",m),ln(u),s.head.appendChild(u))}function cf(s){return'[src="'+Jt(s)+'"]'}function Dd(s){return"script[async]"+s}function RT(s,u,m){if(u.count++,u.instance===null)switch(u.type){case"style":var g=s.querySelector('style[data-href~="'+Jt(m.href)+'"]');if(g)return u.instance=g,ln(g),g;var x=d({},m,{"data-href":m.href,"data-precedence":m.precedence,href:null,precedence:null});return g=(s.ownerDocument||s).createElement("style"),ln(g),Di(g,"style",x),av(g,m.precedence,s),u.instance=g;case"stylesheet":x=ff(m.href);var j=s.querySelector(Md(x));if(j)return u.state.loading|=4,u.instance=j,ln(j),j;g=DT(m),(x=Kr.get(x))&&Dw(g,x),j=(s.ownerDocument||s).createElement("link"),ln(j);var I=j;return I._p=new Promise(function(K,Q){I.onload=K,I.onerror=Q}),Di(j,"link",g),u.state.loading|=4,av(j,m.precedence,s),u.instance=j;case"script":return j=cf(m.src),(x=s.querySelector(Dd(j)))?(u.instance=x,ln(x),x):(g=m,(x=Kr.get(j))&&(g=d({},m),Rw(g,x)),s=s.ownerDocument||s,x=s.createElement("script"),ln(x),Di(x,"link",g),s.head.appendChild(x),u.instance=x);case"void":return null;default:throw Error(i(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(g=u.instance,u.state.loading|=4,av(g,m.precedence,s));return u.instance}function av(s,u,m){for(var g=m.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),x=g.length?g[g.length-1]:null,j=x,I=0;I title"):null)}function SY(s,u,m){if(m===1||u.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return s=u.disabled,typeof u.precedence=="string"&&s==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function $T(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function CY(s,u,m,g){if(m.type==="stylesheet"&&(typeof g.media!="string"||matchMedia(g.media).matches!==!1)&&(m.state.loading&4)===0){if(m.instance===null){var x=ff(g.href),j=u.querySelector(Md(x));if(j){u=j._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(s.count++,s=sv.bind(s),u.then(s,s)),m.state.loading|=4,m.instance=j,ln(j);return}j=u.ownerDocument||u,g=DT(g),(x=Kr.get(x))&&Dw(g,x),j=j.createElement("link"),ln(j);var I=j;I._p=new Promise(function(K,Q){I.onload=K,I.onerror=Q}),Di(j,"link",g),m.instance=j}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(m,u),(u=m.state.preload)&&(m.state.loading&3)===0&&(s.count++,m=sv.bind(s),u.addEventListener("load",m),u.addEventListener("error",m))}}var Pw=0;function AY(s,u){return s.stylesheets&&s.count===0&&uv(s,s.stylesheets),0Pw?50:800)+u);return s.unsuspend=m,function(){s.unsuspend=null,clearTimeout(g),clearTimeout(x)}}:null}function sv(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)uv(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var lv=null;function uv(s,u){s.stylesheets=null,s.unsuspend!==null&&(s.count++,lv=new Map,u.forEach(OY,s),lv=null,sv.call(s))}function OY(s,u){if(!(u.state.loading&4)){var m=lv.get(s);if(m)var g=m.get(null);else{m=new Map,lv.set(s,m);for(var x=s.querySelectorAll("link[data-precedence],style[data-precedence]"),j=0;j"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),bk.exports=Gte(),bk.exports}var Kte=Yte();class xB extends Error{constructor(n,t){super(t),this.status=n,this.name="HTTPError"}}async function Xte(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 xB(i.status,r.Message??r.message??i.statusText)}if(i.status!==204)return i.json()}const Zte="/api";function wt(e,n){return Xte(e,n,Zte)}function Qte(){return wt("/board")}function Jte(){return wt("/flags")}function eie(e){return wt("/columns",{method:"POST",body:JSON.stringify({name:e})})}function gf(e,n){return wt(`/columns/${e}`,{method:"PATCH",body:JSON.stringify(n)})}function nie(e){return wt(`/columns/${e}`,{method:"DELETE"})}function tie(e){return wt("/columns/reorder",{method:"POST",body:JSON.stringify({ids:e})})}function iie(e){return wt("/cards",{method:"POST",body:JSON.stringify(e)})}function yf(e,n){return wt(`/cards/${e}`,{method:"PATCH",body:JSON.stringify(n)})}function rie(e){return wt(`/cards/${e}`,{method:"DELETE"})}function _k(e,n){return wt(`/cards/${e}/stickers`,{method:"PUT",body:JSON.stringify({stickers:n})})}function aie(){return wt("/trash")}function oie(e){return wt(`/cards/${e}/restore`,{method:"POST"})}function sie(e){return wt(`/cards/${e}/purge`,{method:"DELETE"})}function lie(e,n,t){return wt(`/cards/${e}/move`,{method:"POST",body:JSON.stringify({column_id:n,ordered_ids:t})})}function uie(e){return wt(`/cards/${e}/history`)}function fie(e){return wt(`/cards/${e}/messages`)}function cie(e,n){return wt(`/cards/${e}/messages`,{method:"POST",body:JSON.stringify({body:n})})}function die(e,n){return wt(`/cards/${e}/messages/${n}`,{method:"DELETE"})}function hie(e){return wt(`/cards/${e}/duplicate`,{method:"POST"})}function mie(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/chat/ws`}function pie(e,n,t){return new Promise((i,r)=>{const a=new WebSocket(mie());let o=!1;const l=f=>{if(!o){o=!0;try{a.close()}catch{}f?r(f):i()}};a.onopen=()=>{a.send(JSON.stringify({messages:e}))},a.onmessage=f=>{try{const c=JSON.parse(typeof f.data=="string"?f.data:"");n(c),(c.type==="done"||c.type==="error")&&l(c.type==="error"?new Error(c.error):void 0)}catch(c){l(c)}},a.onerror=()=>l(new Error("websocket error")),a.onclose=()=>l()})}function _j(e,n){return wt("/auth/login",{method:"POST",body:JSON.stringify({username:e,password:n})})}function vie(e,n,t){return wt("/auth/register",{method:"POST",body:JSON.stringify({username:e,password:n,display_name:t})})}function gie(){return wt("/auth/logout",{method:"POST"})}function yie(){return wt("/me")}function xj(e){return wt("/me",{method:"PATCH",body:JSON.stringify(e)})}function SB(){return wt("/users")}function CB(){return wt("/tags")}function bie(){return wt("/requesters")}function AB(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 wt(`/metrics${t?`?${t}`:""}`)}const OB=A.createContext(null);function wie({children:e}){const[n,t]=A.useState(null),[i,r]=A.useState(!0);A.useEffect(()=>{yie().then(t).catch(f=>{(!(f instanceof xB)||f.status!==401)&&console.warn("getMe failed",f)}).finally(()=>r(!1))},[]);const a=A.useCallback(async(f,c)=>{const h=await _j(f,c);t(h)},[]),o=A.useCallback(async(f,c,h)=>{await vie(f,c,h);const d=await _j(f,c);t(d)},[]),l=A.useCallback(async()=>{await gie(),t(null)},[]);return b.jsx(OB.Provider,{value:{user:n,loading:i,login:a,register:o,logout:l,setUser:t},children:e})}function TC(){const e=A.useContext(OB);if(!e)throw new Error("useAuth: missing AuthProvider");return e}function kie(){for(var e=arguments.length,n=new Array(e),t=0;ti=>{n.forEach(r=>r(i))},n)}const Py=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Dc(e){const n=Object.prototype.toString.call(e);return n==="[object Window]"||n==="[object global]"}function jC(e){return"nodeType"in e}function rr(e){var n,t;return e?Dc(e)?e:jC(e)&&(n=(t=e.ownerDocument)==null?void 0:t.defaultView)!=null?n:window:window}function MC(e){const{Document:n}=rr(e);return e instanceof n}function Fm(e){return Dc(e)?!1:e instanceof rr(e).HTMLElement}function EB(e){return e instanceof rr(e).SVGElement}function Rc(e){return e?Dc(e)?e.document:jC(e)?MC(e)?e:Fm(e)||EB(e)?e.ownerDocument:document:document:document}const Ra=Py?A.useLayoutEffect:A.useEffect;function Ny(e){const n=A.useRef(e);return Ra(()=>{n.current=e}),A.useCallback(function(){for(var t=arguments.length,i=new Array(t),r=0;r{e.current=setInterval(i,r)},[]),t=A.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[n,t]}function $h(e,n){n===void 0&&(n=[e]);const t=A.useRef(e);return Ra(()=>{t.current!==e&&(t.current=e)},n),t}function qm(e,n){const t=A.useRef();return A.useMemo(()=>{const i=e(t.current);return t.current=i,i},[...n])}function xg(e){const n=Ny(e),t=A.useRef(null),i=A.useCallback(r=>{r!==t.current&&(n==null||n(r,t.current)),t.current=r},[]);return[t,i]}function Sg(e){const n=A.useRef();return A.useEffect(()=>{n.current=e},[e]),n.current}let xk={};function Hm(e,n){return A.useMemo(()=>{if(n)return n;const t=xk[e]==null?0:xk[e]+1;return xk[e]=t,e+"-"+t},[e,n])}function TB(e){return function(n){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r{const l=Object.entries(o);for(const[f,c]of l){const h=a[f];h!=null&&(a[f]=h+e*c)}return a},{...n})}}const Pf=TB(1),zh=TB(-1);function xie(e){return"clientX"in e&&"clientY"in e}function $y(e){if(!e)return!1;const{KeyboardEvent:n}=rr(e.target);return n&&e instanceof n}function Sie(e){if(!e)return!1;const{TouchEvent:n}=rr(e.target);return n&&e instanceof n}function Cg(e){if(Sie(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 xie(e)?{x:e.clientX,y:e.clientY}:null}const to=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[to.Translate.toString(e),to.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:n,duration:t,easing:i}=e;return n+" "+t+"ms "+i}}}),Sj="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Cie(e){return e.matches(Sj)?e:e.querySelector(Sj)}const Aie={display:"none"};function Oie(e){let{id:n,value:t}=e;return Z.createElement("div",{id:n,style:Aie},t)}function Eie(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 Z.createElement("div",{id:n,style:r,role:"status","aria-live":i,"aria-atomic":!0},t)}function Tie(){const[e,n]=A.useState("");return{announce:A.useCallback(i=>{i!=null&&n(i)},[]),announcement:e}}const jB=A.createContext(null);function jie(e){const n=A.useContext(jB);A.useEffect(()=>{if(!n)throw new Error("useDndMonitor must be used within a children of ");return n(e)},[e,n])}function Mie(){const[e]=A.useState(()=>new Set),n=A.useCallback(i=>(e.add(i),()=>e.delete(i)),[e]);return[A.useCallback(i=>{let{type:r,event:a}=i;e.forEach(o=>{var l;return(l=o[r])==null?void 0:l.call(o,a)})},[e]),n]}const Die={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. + `},Rie={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 Pie(e){let{announcements:n=Rie,container:t,hiddenTextDescribedById:i,screenReaderInstructions:r=Die}=e;const{announce:a,announcement:o}=Tie(),l=Hm("DndLiveRegion"),[f,c]=A.useState(!1);if(A.useEffect(()=>{c(!0)},[]),jie(A.useMemo(()=>({onDragStart(d){let{active:p}=d;a(n.onDragStart({active:p}))},onDragMove(d){let{active:p,over:v}=d;n.onDragMove&&a(n.onDragMove({active:p,over:v}))},onDragOver(d){let{active:p,over:v}=d;a(n.onDragOver({active:p,over:v}))},onDragEnd(d){let{active:p,over:v}=d;a(n.onDragEnd({active:p,over:v}))},onDragCancel(d){let{active:p,over:v}=d;a(n.onDragCancel({active:p,over:v}))}}),[a,n])),!f)return null;const h=Z.createElement(Z.Fragment,null,Z.createElement(Oie,{id:i,value:r.draggable}),Z.createElement(Eie,{id:l,announcement:o}));return t?Vs.createPortal(h,t):h}var bi;(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"})(bi||(bi={}));function Ag(){}function Cj(e,n){return A.useMemo(()=>({sensor:e,options:n??{}}),[e,n])}function Nie(){for(var e=arguments.length,n=new Array(e),t=0;t[...n].filter(i=>i!=null),[...n])}const Pa=Object.freeze({x:0,y:0});function DC(e,n){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function $ie(e,n){const t=Cg(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 RC(e,n){let{data:{value:t}}=e,{data:{value:i}}=n;return t-i}function zie(e,n){let{data:{value:t}}=e,{data:{value:i}}=n;return i-t}function yS(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 MB(e,n){if(!e||e.length===0)return null;const[t]=e;return t[n]}function Aj(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 Lie=e=>{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=Aj(n,n.left,n.top),a=[];for(const o of i){const{id:l}=o,f=t.get(l);if(f){const c=DC(Aj(f),r);a.push({id:l,data:{droppableContainer:o,value:c}})}}return a.sort(RC)},DB=e=>{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=yS(n),a=[];for(const o of i){const{id:l}=o,f=t.get(l);if(f){const c=yS(f),h=r.reduce((p,v,y)=>p+DC(c[y],v),0),d=Number((h/4).toFixed(4));a.push({id:l,data:{droppableContainer:o,value:d}})}}return a.sort(RC)};function Iie(e,n){const t=Math.max(n.top,e.top),i=Math.max(n.left,e.left),r=Math.min(n.left+n.width,e.left+e.width),a=Math.min(n.top+n.height,e.top+e.height),o=r-i,l=a-t;if(i{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=[];for(const a of i){const{id:o}=a,l=t.get(o);if(l){const f=Iie(l,n);f>0&&r.push({id:o,data:{droppableContainer:a,value:f}})}}return r.sort(zie)};function Bie(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 Fie=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&&Bie(i,l)){const c=yS(l).reduce((d,p)=>d+DC(i,p),0),h=Number((c/4).toFixed(4));r.push({id:o,data:{droppableContainer:a,value:h}})}}return r.sort(RC)};function qie(e,n,t){return{...e,scaleX:n&&t?n.width/t.width:1,scaleY:n&&t?n.height/t.height:1}}function PB(e,n){return e&&n?{x:e.left-n.left,y:e.top-n.top}:Pa}function Hie(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 Uie=Hie(1);function NB(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 Vie(e,n,t){const i=NB(n);if(!i)return e;const{scaleX:r,scaleY:a,x:o,y:l}=i,f=e.left-o-(1-r)*parseFloat(t),c=e.top-l-(1-a)*parseFloat(t.slice(t.indexOf(" ")+1)),h=r?e.width/r:e.width,d=a?e.height/a:e.height;return{width:h,height:d,top:c,right:f+h,bottom:c+d,left:f}}const Wie={ignoreTransform:!1};function Pc(e,n){n===void 0&&(n=Wie);let t=e.getBoundingClientRect();if(n.ignoreTransform){const{transform:c,transformOrigin:h}=rr(e).getComputedStyle(e);c&&(t=Vie(t,c,h))}const{top:i,left:r,width:a,height:o,bottom:l,right:f}=t;return{top:i,left:r,width:a,height:o,bottom:l,right:f}}function Oj(e){return Pc(e,{ignoreTransform:!0})}function Gie(e){const n=e.innerWidth,t=e.innerHeight;return{top:0,left:0,right:n,bottom:t,width:n,height:t}}function Yie(e,n){return n===void 0&&(n=rr(e).getComputedStyle(e)),n.position==="fixed"}function Kie(e,n){n===void 0&&(n=rr(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 zy(e,n){const t=[];function i(r){if(n!=null&&t.length>=n||!r)return t;if(MC(r)&&r.scrollingElement!=null&&!t.includes(r.scrollingElement))return t.push(r.scrollingElement),t;if(!Fm(r)||EB(r)||t.includes(r))return t;const a=rr(e).getComputedStyle(r);return r!==e&&Kie(r,a)&&t.push(r),Yie(r,a)?t:i(r.parentNode)}return e?i(e):t}function $B(e){const[n]=zy(e,1);return n??null}function Sk(e){return!Py||!e?null:Dc(e)?e:jC(e)?MC(e)||e===Rc(e).scrollingElement?window:Fm(e)?e:null:null}function zB(e){return Dc(e)?e.scrollX:e.scrollLeft}function LB(e){return Dc(e)?e.scrollY:e.scrollTop}function bS(e){return{x:zB(e),y:LB(e)}}var Ci;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Ci||(Ci={}));function IB(e){return!Py||!e?!1:e===document.scrollingElement}function BB(e){const n={x:0,y:0},t=IB(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 Xie={x:.2,y:.2};function Zie(e,n,t,i,r){let{top:a,left:o,right:l,bottom:f}=t;i===void 0&&(i=10),r===void 0&&(r=Xie);const{isTop:c,isBottom:h,isLeft:d,isRight:p}=BB(e),v={x:0,y:0},y={x:0,y:0},w={height:n.height*r.y,width:n.width*r.x};return!c&&a<=n.top+w.height?(v.y=Ci.Backward,y.y=i*Math.abs((n.top+w.height-a)/w.height)):!h&&f>=n.bottom-w.height&&(v.y=Ci.Forward,y.y=i*Math.abs((n.bottom-w.height-f)/w.height)),!p&&l>=n.right-w.width?(v.x=Ci.Forward,y.x=i*Math.abs((n.right-w.width-l)/w.width)):!d&&o<=n.left+w.width&&(v.x=Ci.Backward,y.x=i*Math.abs((n.left+w.width-o)/w.width)),{direction:v,speed:y}}function Qie(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 FB(e){return e.reduce((n,t)=>Pf(n,bS(t)),Pa)}function Jie(e){return e.reduce((n,t)=>n+zB(t),0)}function ere(e){return e.reduce((n,t)=>n+LB(t),0)}function qB(e,n){if(n===void 0&&(n=Pc),!e)return;const{top:t,left:i,bottom:r,right:a}=n(e);$B(e)&&(r<=0||a<=0||t>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const nre=[["x",["left","right"],Jie],["y",["top","bottom"],ere]];class PC{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=zy(t),r=FB(i);this.rect={...n},this.width=n.width,this.height=n.height;for(const[a,o,l]of nre)for(const f of o)Object.defineProperty(this,f,{get:()=>{const c=l(i),h=r[a]-c;return this.rect[f]+h},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class vh{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 tre(e){const{EventTarget:n}=rr(e);return e instanceof n?e:Rc(e)}function Ck(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 na;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(na||(na={}));function Ej(e){e.preventDefault()}function ire(e){e.stopPropagation()}var Qn;(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"})(Qn||(Qn={}));const HB={start:[Qn.Space,Qn.Enter],cancel:[Qn.Esc],end:[Qn.Space,Qn.Enter,Qn.Tab]},rre=(e,n)=>{let{currentCoordinates:t}=n;switch(e.code){case Qn.Right:return{...t,x:t.x+25};case Qn.Left:return{...t,x:t.x-25};case Qn.Down:return{...t,y:t.y+25};case Qn.Up:return{...t,y:t.y-25}}};class NC{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 vh(Rc(t)),this.windowListeners=new vh(rr(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(na.Resize,this.handleCancel),this.windowListeners.add(na.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(na.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:n,onStart:t}=this.props,i=n.node.current;i&&qB(i),t(Pa)}handleKeyDown(n){if($y(n)){const{active:t,context:i,options:r}=this.props,{keyboardCodes:a=HB,coordinateGetter:o=rre,scrollBehavior:l="smooth"}=r,{code:f}=n;if(a.end.includes(f)){this.handleEnd(n);return}if(a.cancel.includes(f)){this.handleCancel(n);return}const{collisionRect:c}=i.current,h=c?{x:c.left,y:c.top}:Pa;this.referenceCoordinates||(this.referenceCoordinates=h);const d=o(n,{active:t,context:i.current,currentCoordinates:h});if(d){const p=zh(d,h),v={x:0,y:0},{scrollableAncestors:y}=i.current;for(const w of y){const k=n.code,{isTop:_,isRight:S,isLeft:C,isBottom:E,maxScroll:O,minScroll:T}=BB(w),M=Qie(w),N={x:Math.min(k===Qn.Right?M.right-M.width/2:M.right,Math.max(k===Qn.Right?M.left:M.left+M.width/2,d.x)),y:Math.min(k===Qn.Down?M.bottom-M.height/2:M.bottom,Math.max(k===Qn.Down?M.top:M.top+M.height/2,d.y))},F=k===Qn.Right&&!S||k===Qn.Left&&!C,R=k===Qn.Down&&!E||k===Qn.Up&&!_;if(F&&N.x!==d.x){const L=w.scrollLeft+p.x,B=k===Qn.Right&&L<=O.x||k===Qn.Left&&L>=T.x;if(B&&!p.y){w.scrollTo({left:L,behavior:l});return}B?v.x=w.scrollLeft-L:v.x=k===Qn.Right?w.scrollLeft-O.x:w.scrollLeft-T.x,v.x&&w.scrollBy({left:-v.x,behavior:l});break}else if(R&&N.y!==d.y){const L=w.scrollTop+p.y,B=k===Qn.Down&&L<=O.y||k===Qn.Up&&L>=T.y;if(B&&!p.x){w.scrollTo({top:L,behavior:l});return}B?v.y=w.scrollTop-L:v.y=k===Qn.Down?w.scrollTop-O.y:w.scrollTop-T.y,v.y&&w.scrollBy({top:-v.y,behavior:l});break}}this.handleMove(n,Pf(zh(d,this.referenceCoordinates),v))}}}handleMove(n,t){const{onMove:i}=this.props;n.preventDefault(),i(t)}handleEnd(n){const{onEnd:t}=this.props;n.preventDefault(),this.detach(),t()}handleCancel(n){const{onCancel:t}=this.props;n.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}NC.activators=[{eventName:"onKeyDown",handler:(e,n,t)=>{let{keyboardCodes:i=HB,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 Tj(e){return!!(e&&"distance"in e)}function jj(e){return!!(e&&"delay"in e)}class $C{constructor(n,t,i){var r;i===void 0&&(i=tre(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=Rc(o),this.documentListeners=new vh(this.document),this.listeners=new vh(i),this.windowListeners=new vh(rr(o)),this.initialCoordinates=(r=Cg(a))!=null?r:Pa,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(na.Resize,this.handleCancel),this.windowListeners.add(na.DragStart,Ej),this.windowListeners.add(na.VisibilityChange,this.handleCancel),this.windowListeners.add(na.ContextMenu,Ej),this.documentListeners.add(na.Keydown,this.handleKeydown),t){if(i!=null&&i({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(jj(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(Tj(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(na.Click,ire,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(na.SelectionChange,this.removeTextSelection),t(n))}handleMove(n){var t;const{activated:i,initialCoordinates:r,props:a}=this,{onMove:o,options:{activationConstraint:l}}=a;if(!r)return;const f=(t=Cg(n))!=null?t:Pa,c=zh(r,f);if(!i&&l){if(Tj(l)){if(l.tolerance!=null&&Ck(c,l.tolerance))return this.handleCancel();if(Ck(c,l.distance))return this.handleStart()}if(jj(l)&&Ck(c,l.tolerance))return this.handleCancel();this.handlePending(l,c);return}n.cancelable&&n.preventDefault(),o(f)}handleEnd(){const{onAbort:n,onEnd:t}=this.props;this.detach(),this.activated||n(this.props.active),t()}handleCancel(){const{onAbort:n,onCancel:t}=this.props;this.detach(),this.activated||n(this.props.active),t()}handleKeydown(n){n.code===Qn.Esc&&this.handleCancel()}removeTextSelection(){var n;(n=this.document.getSelection())==null||n.removeAllRanges()}}const are={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class zC extends $C{constructor(n){const{event:t}=n,i=Rc(t.target);super(n,are,i)}}zC.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 ore={move:{name:"mousemove"},end:{name:"mouseup"}};var wS;(function(e){e[e.RightClick=2]="RightClick"})(wS||(wS={}));class sre extends $C{constructor(n){super(n,ore,Rc(n.event.target))}}sre.activators=[{eventName:"onMouseDown",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:i}=n;return t.button===wS.RightClick?!1:(i==null||i({event:t}),!0)}}];const Ak={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class lre extends $C{constructor(n){super(n,Ak)}static setup(){return window.addEventListener(Ak.move.name,n,{capture:!1,passive:!1}),function(){window.removeEventListener(Ak.move.name,n)};function n(){}}}lre.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 gh;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(gh||(gh={}));var Og;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Og||(Og={}));function ure(e){let{acceleration:n,activator:t=gh.Pointer,canScroll:i,draggingRect:r,enabled:a,interval:o=5,order:l=Og.TreeOrder,pointerCoordinates:f,scrollableAncestors:c,scrollableAncestorRects:h,delta:d,threshold:p}=e;const v=cre({delta:d,disabled:!a}),[y,w]=_ie(),k=A.useRef({x:0,y:0}),_=A.useRef({x:0,y:0}),S=A.useMemo(()=>{switch(t){case gh.Pointer:return f?{top:f.y,bottom:f.y,left:f.x,right:f.x}:null;case gh.DraggableRect:return r}},[t,r,f]),C=A.useRef(null),E=A.useCallback(()=>{const T=C.current;if(!T)return;const M=k.current.x*_.current.x,N=k.current.y*_.current.y;T.scrollBy(M,N)},[]),O=A.useMemo(()=>l===Og.TreeOrder?[...c].reverse():c,[l,c]);A.useEffect(()=>{if(!a||!c.length||!S){w();return}for(const T of O){if((i==null?void 0:i(T))===!1)continue;const M=c.indexOf(T),N=h[M];if(!N)continue;const{direction:F,speed:R}=Zie(T,N,S,n,p);for(const L of["x","y"])v[L][F[L]]||(R[L]=0,F[L]=0);if(R.x>0||R.y>0){w(),C.current=T,y(E,o),k.current=R,_.current=F;return}}k.current={x:0,y:0},_.current={x:0,y:0},w()},[n,E,i,w,a,o,JSON.stringify(S),JSON.stringify(v),y,c,O,h,JSON.stringify(p)])}const fre={x:{[Ci.Backward]:!1,[Ci.Forward]:!1},y:{[Ci.Backward]:!1,[Ci.Forward]:!1}};function cre(e){let{delta:n,disabled:t}=e;const i=Sg(n);return qm(r=>{if(t||!i||!r)return fre;const a={x:Math.sign(n.x-i.x),y:Math.sign(n.y-i.y)};return{x:{[Ci.Backward]:r.x[Ci.Backward]||a.x===-1,[Ci.Forward]:r.x[Ci.Forward]||a.x===1},y:{[Ci.Backward]:r.y[Ci.Backward]||a.y===-1,[Ci.Forward]:r.y[Ci.Forward]||a.y===1}}},[t,n,i])}function dre(e,n){const t=n!=null?e.get(n):void 0,i=t?t.node.current:null;return qm(r=>{var a;return n==null?null:(a=i??r)!=null?a:null},[i,n])}function hre(e,n){return A.useMemo(()=>e.reduce((t,i)=>{const{sensor:r}=i,a=r.activators.map(o=>({eventName:o.eventName,handler:n(o.handler,i)}));return[...t,...a]},[]),[e,n])}var Lh;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Lh||(Lh={}));var kS;(function(e){e.Optimized="optimized"})(kS||(kS={}));const Mj=new Map;function mre(e,n){let{dragging:t,dependencies:i,config:r}=n;const[a,o]=A.useState(null),{frequency:l,measure:f,strategy:c}=r,h=A.useRef(e),d=k(),p=$h(d),v=A.useCallback(function(_){_===void 0&&(_=[]),!p.current&&o(S=>S===null?_:S.concat(_.filter(C=>!S.includes(C))))},[p]),y=A.useRef(null),w=qm(_=>{if(d&&!t)return Mj;if(!_||_===Mj||h.current!==e||a!=null){const S=new Map;for(let C of e){if(!C)continue;if(a&&a.length>0&&!a.includes(C.id)&&C.rect.current){S.set(C.id,C.rect.current);continue}const E=C.node.current,O=E?new PC(f(E),E):null;C.rect.current=O,O&&S.set(C.id,O)}return S}return _},[e,a,t,d,f]);return A.useEffect(()=>{h.current=e},[e]),A.useEffect(()=>{d||v()},[t,d]),A.useEffect(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),A.useEffect(()=>{d||typeof l!="number"||y.current!==null||(y.current=setTimeout(()=>{v(),y.current=null},l))},[l,d,v,...i]),{droppableRects:w,measureDroppableContainers:v,measuringScheduled:a!=null};function k(){switch(c){case Lh.Always:return!1;case Lh.BeforeDragging:return t;default:return!t}}}function LC(e,n){return qm(t=>e?t||(typeof n=="function"?n(e):e):null,[n,e])}function pre(e,n){return LC(e,n)}function vre(e){let{callback:n,disabled:t}=e;const i=Ny(n),r=A.useMemo(()=>{if(t||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(i)},[i,t]);return A.useEffect(()=>()=>r==null?void 0:r.disconnect(),[r]),r}function Ly(e){let{callback:n,disabled:t}=e;const i=Ny(n),r=A.useMemo(()=>{if(t||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(i)},[t]);return A.useEffect(()=>()=>r==null?void 0:r.disconnect(),[r]),r}function gre(e){return new PC(Pc(e),e)}function Dj(e,n,t){n===void 0&&(n=gre);const[i,r]=A.useState(null);function a(){r(f=>{if(!e)return null;if(e.isConnected===!1){var c;return(c=f??t)!=null?c:null}const h=n(e);return JSON.stringify(f)===JSON.stringify(h)?f:h})}const o=vre({callback(f){if(e)for(const c of f){const{type:h,target:d}=c;if(h==="childList"&&d instanceof HTMLElement&&d.contains(e)){a();break}}}}),l=Ly({callback:a});return Ra(()=>{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 yre(e){const n=LC(e);return PB(e,n)}const Rj=[];function bre(e){const n=A.useRef(e),t=qm(i=>e?i&&i!==Rj&&e&&n.current&&e.parentNode===n.current.parentNode?i:zy(e):Rj,[e]);return A.useEffect(()=>{n.current=e},[e]),t}function wre(e){const[n,t]=A.useState(null),i=A.useRef(e),r=A.useCallback(a=>{const o=Sk(a.target);o&&t(l=>l?(l.set(o,bS(o)),new Map(l)):null)},[]);return A.useEffect(()=>{const a=i.current;if(e!==a){o(a);const l=e.map(f=>{const c=Sk(f);return c?(c.addEventListener("scroll",r,{passive:!0}),[c,bS(c)]):null}).filter(f=>f!=null);t(l.length?new Map(l):null),i.current=e}return()=>{o(e),o(a)};function o(l){l.forEach(f=>{const c=Sk(f);c==null||c.removeEventListener("scroll",r)})}},[r,e]),A.useMemo(()=>e.length?n?Array.from(n.values()).reduce((a,o)=>Pf(a,o),Pa):FB(e):Pa,[e,n])}function Pj(e,n){n===void 0&&(n=[]);const t=A.useRef(null);return A.useEffect(()=>{t.current=null},n),A.useEffect(()=>{const i=e!==Pa;i&&!t.current&&(t.current=e),!i&&t.current&&(t.current=null)},[e]),t.current?zh(e,t.current):Pa}function kre(e){A.useEffect(()=>{if(!Py)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 _re(e,n){return A.useMemo(()=>e.reduce((t,i)=>{let{eventName:r,handler:a}=i;return t[r]=o=>{a(o,n)},t},{}),[e,n])}function UB(e){return A.useMemo(()=>e?Gie(e):null,[e])}const Nj=[];function xre(e,n){n===void 0&&(n=Pc);const[t]=e,i=UB(t?rr(t):null),[r,a]=A.useState(Nj);function o(){a(()=>e.length?e.map(f=>IB(f)?i:new PC(n(f),f)):Nj)}const l=Ly({callback:o});return Ra(()=>{l==null||l.disconnect(),o(),e.forEach(f=>l==null?void 0:l.observe(f))},[e]),r}function VB(e){if(!e)return null;if(e.children.length>1)return e;const n=e.children[0];return Fm(n)?n:e}function Sre(e){let{measure:n}=e;const[t,i]=A.useState(null),r=A.useCallback(c=>{for(const{target:h}of c)if(Fm(h)){i(d=>{const p=n(h);return d?{...d,width:p.width,height:p.height}:p});break}},[n]),a=Ly({callback:r}),o=A.useCallback(c=>{const h=VB(c);a==null||a.disconnect(),h&&(a==null||a.observe(h)),i(h?n(h):null)},[n,a]),[l,f]=xg(o);return A.useMemo(()=>({nodeRef:l,rect:t,setRef:f}),[t,l,f])}const Cre=[{sensor:zC,options:{}},{sensor:NC,options:{}}],Are={current:{}},ag={draggable:{measure:Oj},droppable:{measure:Oj,strategy:Lh.WhileDragging,frequency:kS.Optimized},dragOverlay:{measure:Pc}};class yh 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 Ore={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new yh,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Ag},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ag,measureDroppableContainers:Ag,windowRect:null,measuringScheduled:!1},WB={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Ag,draggableNodes:new Map,over:null,measureDroppableContainers:Ag},Um=A.createContext(WB),GB=A.createContext(Ore);function Ere(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new yh}}}function Tre(e,n){switch(n.type){case bi.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:n.initialCoordinates,active:n.active}};case bi.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 bi.DragEnd:case bi.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case bi.RegisterDroppable:{const{element:t}=n,{id:i}=t,r=new yh(e.droppable.containers);return r.set(i,t),{...e,droppable:{...e.droppable,containers:r}}}case bi.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 yh(e.droppable.containers);return o.set(t,{...a,disabled:r}),{...e,droppable:{...e.droppable,containers:o}}}case bi.UnregisterDroppable:{const{id:t,key:i}=n,r=e.droppable.containers.get(t);if(!r||i!==r.key)return e;const a=new yh(e.droppable.containers);return a.delete(t),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function jre(e){let{disabled:n}=e;const{active:t,activatorEvent:i,draggableNodes:r}=A.useContext(Um),a=Sg(i),o=Sg(t==null?void 0:t.id);return A.useEffect(()=>{if(!n&&!i&&a&&o!=null){if(!$y(a)||document.activeElement===a.target)return;const l=r.get(o);if(!l)return;const{activatorNode:f,node:c}=l;if(!f.current&&!c.current)return;requestAnimationFrame(()=>{for(const h of[f.current,c.current]){if(!h)continue;const d=Cie(h);if(d){d.focus();break}}})}},[i,n,r,o,a]),null}function YB(e,n){let{transform:t,...i}=n;return e!=null&&e.length?e.reduce((r,a)=>a({transform:r,...i}),t):t}function Mre(e){return A.useMemo(()=>({draggable:{...ag.draggable,...e==null?void 0:e.draggable},droppable:{...ag.droppable,...e==null?void 0:e.droppable},dragOverlay:{...ag.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 Dre(e){let{activeNode:n,measure:t,initialRect:i,config:r=!0}=e;const a=A.useRef(!1),{x:o,y:l}=typeof r=="boolean"?{x:r,y:r}:r;Ra(()=>{if(!o&&!l||!n){a.current=!1;return}if(a.current||!i)return;const c=n==null?void 0:n.node.current;if(!c||c.isConnected===!1)return;const h=t(c),d=PB(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=$B(c);p&&p.scrollBy({top:d.y,left:d.x})}},[n,o,l,i,t])}const Iy=A.createContext({...Pa,scaleX:1,scaleY:1});var Fs;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Fs||(Fs={}));const Rre=A.memo(function(n){var t,i,r,a;let{id:o,accessibility:l,autoScroll:f=!0,children:c,sensors:h=Cre,collisionDetection:d=RB,measuring:p,modifiers:v,...y}=n;const w=A.useReducer(Tre,void 0,Ere),[k,_]=w,[S,C]=Mie(),[E,O]=A.useState(Fs.Uninitialized),T=E===Fs.Initialized,{draggable:{active:M,nodes:N,translate:F},droppable:{containers:R}}=k,L=M!=null?N.get(M):null,B=A.useRef({initial:null,translated:null}),G=A.useMemo(()=>{var bn;return M!=null?{id:M,data:(bn=L==null?void 0:L.data)!=null?bn:Are,rect:B}:null},[M,L]),U=A.useRef(null),[H,P]=A.useState(null),[$,q]=A.useState(null),Y=$h(y,Object.values(y)),D=Hm("DndDescribedBy",o),W=A.useMemo(()=>R.getEnabled(),[R]),V=Mre(p),{droppableRects:z,measureDroppableContainers:X,measuringScheduled:ee}=mre(W,{dragging:T,dependencies:[F.x,F.y],config:V.droppable}),re=dre(N,M),le=A.useMemo(()=>$?Cg($):null,[$]),be=Mn(),ae=pre(re,V.draggable.measure);Dre({activeNode:M!=null?N.get(M):null,config:be.layoutShiftCompensation,initialRect:ae,measure:V.draggable.measure});const ue=Dj(re,V.draggable.measure,ae),Ce=Dj(re?re.parentElement:null),ne=A.useRef({activatorEvent:null,active:null,activeNode:re,collisionRect:null,collisions:null,droppableRects:z,draggableNodes:N,draggingNode:null,draggingNodeRect:null,droppableContainers:R,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ne=R.getNodeFor((t=ne.current.over)==null?void 0:t.id),pe=Sre({measure:V.dragOverlay.measure}),Ee=(i=pe.nodeRef.current)!=null?i:re,Re=T?(r=pe.rect)!=null?r:ue:null,we=!!(pe.nodeRef.current&&pe.rect),Se=yre(we?null:ue),De=UB(Ee?rr(Ee):null),qe=bre(T?Ne??re:null),Ve=xre(qe),Ue=YB(v,{transform:{x:F.x-Se.x,y:F.y-Se.y,scaleX:1,scaleY:1},activatorEvent:$,active:G,activeNodeRect:ue,containerNodeRect:Ce,draggingNodeRect:Re,over:ne.current.over,overlayNodeRect:pe.rect,scrollableAncestors:qe,scrollableAncestorRects:Ve,windowRect:De}),We=le?Pf(le,F):null,Ye=wre(qe),sn=Pj(Ye),ie=Pj(Ye,[ue]),se=Pf(Ue,sn),ke=Re?Uie(Re,Ue):null,Ze=G&&ke?d({active:G,collisionRect:ke,droppableRects:z,droppableContainers:W,pointerCoordinates:We}):null,_e=MB(Ze,"id"),[fe,Be]=A.useState(null),pn=we?Ue:Pf(Ue,ie),Je=qie(pn,(a=fe==null?void 0:fe.rect)!=null?a:null,ue),en=A.useRef(null),Ke=A.useCallback((bn,_n)=>{let{sensor:it,options:Et}=_n;if(U.current==null)return;const ze=N.get(U.current);if(!ze)return;const Fe=bn.nativeEvent,Dn=new it({active:U.current,activeNode:ze,event:Fe,options:Et,context:ne,onAbort(An){if(!N.get(An))return;const{onDragAbort:tn}=Y.current,rn={id:An};tn==null||tn(rn),S({type:"onDragAbort",event:rn})},onPending(An,nn,tn,rn){if(!N.get(An))return;const{onDragPending:In}=Y.current,kt={id:An,constraint:nn,initialCoordinates:tn,offset:rn};In==null||In(kt),S({type:"onDragPending",event:kt})},onStart(An){const nn=U.current;if(nn==null)return;const tn=N.get(nn);if(!tn)return;const{onDragStart:rn}=Y.current,Ln={activatorEvent:Fe,active:{id:nn,data:tn.data,rect:B}};Vs.unstable_batchedUpdates(()=>{rn==null||rn(Ln),O(Fs.Initializing),_({type:bi.DragStart,initialCoordinates:An,active:nn}),S({type:"onDragStart",event:Ln}),P(en.current),q(Fe)})},onMove(An){_({type:bi.DragMove,coordinates:An})},onEnd:et(bi.DragEnd),onCancel:et(bi.DragCancel)});en.current=Dn;function et(An){return async function(){const{active:tn,collisions:rn,over:Ln,scrollAdjustedTranslate:In}=ne.current;let kt=null;if(tn&&In){const{cancelDrop:Sn}=Y.current;kt={activatorEvent:Fe,active:tn,collisions:rn,delta:In,over:Ln},An===bi.DragEnd&&typeof Sn=="function"&&await Promise.resolve(Sn(kt))&&(An=bi.DragCancel)}U.current=null,Vs.unstable_batchedUpdates(()=>{_({type:An}),O(Fs.Uninitialized),Be(null),P(null),q(null),en.current=null;const Sn=An===bi.DragEnd?"onDragEnd":"onDragCancel";if(kt){const xn=Y.current[Sn];xn==null||xn(kt),S({type:Sn,event:kt})}})}}},[N]),jn=A.useCallback((bn,_n)=>(it,Et)=>{const ze=it.nativeEvent,Fe=N.get(Et);if(U.current!==null||!Fe||ze.dndKit||ze.defaultPrevented)return;const Dn={active:Fe};bn(it,_n.options,Dn)===!0&&(ze.dndKit={capturedBy:_n.sensor},U.current=Et,Ke(it,_n))},[N,Ke]),un=hre(h,jn);kre(h),Ra(()=>{ue&&E===Fs.Initializing&&O(Fs.Initialized)},[ue,E]),A.useEffect(()=>{const{onDragMove:bn}=Y.current,{active:_n,activatorEvent:it,collisions:Et,over:ze}=ne.current;if(!_n||!it)return;const Fe={active:_n,activatorEvent:it,collisions:Et,delta:{x:se.x,y:se.y},over:ze};Vs.unstable_batchedUpdates(()=>{bn==null||bn(Fe),S({type:"onDragMove",event:Fe})})},[se.x,se.y]),A.useEffect(()=>{const{active:bn,activatorEvent:_n,collisions:it,droppableContainers:Et,scrollAdjustedTranslate:ze}=ne.current;if(!bn||U.current==null||!_n||!ze)return;const{onDragOver:Fe}=Y.current,Dn=Et.get(_e),et=Dn&&Dn.rect.current?{id:Dn.id,rect:Dn.rect.current,data:Dn.data,disabled:Dn.disabled}:null,An={active:bn,activatorEvent:_n,collisions:it,delta:{x:ze.x,y:ze.y},over:et};Vs.unstable_batchedUpdates(()=>{Be(et),Fe==null||Fe(An),S({type:"onDragOver",event:An})})},[_e]),Ra(()=>{ne.current={activatorEvent:$,active:G,activeNode:re,collisionRect:ke,collisions:Ze,droppableRects:z,draggableNodes:N,draggingNode:Ee,draggingNodeRect:Re,droppableContainers:R,over:fe,scrollableAncestors:qe,scrollAdjustedTranslate:se},B.current={initial:Re,translated:ke}},[G,re,Ze,ke,N,Ee,Re,z,R,fe,qe,se]),ure({...be,delta:F,draggingRect:ke,pointerCoordinates:We,scrollableAncestors:qe,scrollableAncestorRects:Ve});const tt=A.useMemo(()=>({active:G,activeNode:re,activeNodeRect:ue,activatorEvent:$,collisions:Ze,containerNodeRect:Ce,dragOverlay:pe,draggableNodes:N,droppableContainers:R,droppableRects:z,over:fe,measureDroppableContainers:X,scrollableAncestors:qe,scrollableAncestorRects:Ve,measuringConfiguration:V,measuringScheduled:ee,windowRect:De}),[G,re,ue,$,Ze,Ce,pe,N,R,z,fe,X,qe,Ve,V,ee,De]),pt=A.useMemo(()=>({activatorEvent:$,activators:un,active:G,activeNodeRect:ue,ariaDescribedById:{draggable:D},dispatch:_,draggableNodes:N,over:fe,measureDroppableContainers:X}),[$,un,G,ue,_,D,N,fe,X]);return Z.createElement(jB.Provider,{value:C},Z.createElement(Um.Provider,{value:pt},Z.createElement(GB.Provider,{value:tt},Z.createElement(Iy.Provider,{value:Je},c)),Z.createElement(jre,{disabled:(l==null?void 0:l.restoreFocus)===!1})),Z.createElement(Pie,{...l,hiddenTextDescribedById:D}));function Mn(){const bn=(H==null?void 0:H.autoScrollEnabled)===!1,_n=typeof f=="object"?f.enabled===!1:f===!1,it=T&&!bn&&!_n;return typeof f=="object"?{...f,enabled:it}:{enabled:it}}}),Pre=A.createContext(null),$j="button",Nre="Draggable";function $re(e){let{id:n,data:t,disabled:i=!1,attributes:r}=e;const a=Hm(Nre),{activators:o,activatorEvent:l,active:f,activeNodeRect:c,ariaDescribedById:h,draggableNodes:d,over:p}=A.useContext(Um),{role:v=$j,roleDescription:y="draggable",tabIndex:w=0}=r??{},k=(f==null?void 0:f.id)===n,_=A.useContext(k?Iy:Pre),[S,C]=xg(),[E,O]=xg(),T=_re(o,n),M=$h(t);Ra(()=>(d.set(n,{id:n,key:a,node:S,activatorNode:E,data:M}),()=>{const F=d.get(n);F&&F.key===a&&d.delete(n)}),[d,n]);const N=A.useMemo(()=>({role:v,tabIndex:w,"aria-disabled":i,"aria-pressed":k&&v===$j?!0:void 0,"aria-roledescription":y,"aria-describedby":h.draggable}),[i,v,w,k,y,h.draggable]);return{active:f,activatorEvent:l,activeNodeRect:c,attributes:N,isDragging:k,listeners:i?void 0:T,node:S,over:p,setNodeRef:C,setActivatorNodeRef:O,transform:_}}function KB(){return A.useContext(GB)}const zre="Droppable",Lre={timeout:25};function Ire(e){let{data:n,disabled:t=!1,id:i,resizeObserverConfig:r}=e;const a=Hm(zre),{active:o,dispatch:l,over:f,measureDroppableContainers:c}=A.useContext(Um),h=A.useRef({disabled:t}),d=A.useRef(!1),p=A.useRef(null),v=A.useRef(null),{disabled:y,updateMeasurementsFor:w,timeout:k}={...Lre,...r},_=$h(w??i),S=A.useCallback(()=>{if(!d.current){d.current=!0;return}v.current!=null&&clearTimeout(v.current),v.current=setTimeout(()=>{c(Array.isArray(_.current)?_.current:[_.current]),v.current=null},k)},[k]),C=Ly({callback:S,disabled:y||!o}),E=A.useCallback((N,F)=>{C&&(F&&(C.unobserve(F),d.current=!1),N&&C.observe(N))},[C]),[O,T]=xg(E),M=$h(n);return A.useEffect(()=>{!C||!O.current||(C.disconnect(),d.current=!1,C.observe(O.current))},[O,C]),A.useEffect(()=>(l({type:bi.RegisterDroppable,element:{id:i,key:a,disabled:t,node:O,rect:p,data:M}}),()=>l({type:bi.UnregisterDroppable,key:a,id:i})),[i]),A.useEffect(()=>{t!==h.current.disabled&&(l({type:bi.SetDroppableDisabled,id:i,key:a,disabled:t}),h.current.disabled=t)},[i,a,t,l]),{active:o,rect:p,isOver:(f==null?void 0:f.id)===i,node:O,over:f,setNodeRef:T}}function Bre(e){let{animation:n,children:t}=e;const[i,r]=A.useState(null),[a,o]=A.useState(null),l=Sg(t);return!t&&!i&&l&&r(l),Ra(()=>{if(!a)return;const f=i==null?void 0:i.key,c=i==null?void 0:i.props.id;if(f==null||c==null){r(null);return}Promise.resolve(n(c,a)).then(()=>{r(null)})},[n,i,a]),Z.createElement(Z.Fragment,null,t,i?A.cloneElement(i,{ref:o}):null)}const Fre={x:0,y:0,scaleX:1,scaleY:1};function qre(e){let{children:n}=e;return Z.createElement(Um.Provider,{value:WB},Z.createElement(Iy.Provider,{value:Fre},n))}const Hre={position:"fixed",touchAction:"none"},Ure=e=>$y(e)?"transform 250ms ease":void 0,Vre=A.forwardRef((e,n)=>{let{as:t,activatorEvent:i,adjustScale:r,children:a,className:o,rect:l,style:f,transform:c,transition:h=Ure}=e;if(!l)return null;const d=r?c:{...c,scaleX:1,scaleY:1},p={...Hre,width:l.width,height:l.height,top:l.top,left:l.left,transform:to.Transform.toString(d),transformOrigin:r&&i?$ie(i,l):void 0,transition:typeof h=="function"?h(i):h,...f};return Z.createElement(t,{className:o,style:p,ref:n},a)}),Wre=e=>n=>{let{active:t,dragOverlay:i}=n;const r={},{styles:a,className:o}=e;if(a!=null&&a.active)for(const[l,f]of Object.entries(a.active))f!==void 0&&(r[l]=t.node.style.getPropertyValue(l),t.node.style.setProperty(l,f));if(a!=null&&a.dragOverlay)for(const[l,f]of Object.entries(a.dragOverlay))f!==void 0&&i.node.style.setProperty(l,f);return o!=null&&o.active&&t.node.classList.add(o.active),o!=null&&o.dragOverlay&&i.node.classList.add(o.dragOverlay),function(){for(const[f,c]of Object.entries(r))t.node.style.setProperty(f,c);o!=null&&o.active&&t.node.classList.remove(o.active)}},Gre=e=>{let{transform:{initial:n,final:t}}=e;return[{transform:to.Transform.toString(n)},{transform:to.Transform.toString(t)}]},Yre={duration:250,easing:"ease",keyframes:Gre,sideEffects:Wre({styles:{active:{opacity:"0"}}})};function Kre(e){let{config:n,draggableNodes:t,droppableContainers:i,measuringConfiguration:r}=e;return Ny((a,o)=>{if(n===null)return;const l=t.get(a);if(!l)return;const f=l.node.current;if(!f)return;const c=VB(o);if(!c)return;const{transform:h}=rr(o).getComputedStyle(o),d=NB(h);if(!d)return;const p=typeof n=="function"?n:Xre(n);return qB(f,r.draggable.measure),p({active:{id:a,data:l.data,node:f,rect:r.draggable.measure(f)},draggableNodes:t,dragOverlay:{node:o,rect:r.dragOverlay.measure(c)},droppableContainers:i,measuringConfiguration:r,transform:d})})}function Xre(e){const{duration:n,easing:t,sideEffects:i,keyframes:r}={...Yre,...e};return a=>{let{active:o,dragOverlay:l,transform:f,...c}=a;if(!n)return;const h={x:l.rect.left-o.rect.left,y:l.rect.top-o.rect.top},d={scaleX:f.scaleX!==1?o.rect.width*f.scaleX/l.rect.width:1,scaleY:f.scaleY!==1?o.rect.height*f.scaleY/l.rect.height:1},p={x:f.x-h.x,y:f.y-h.y,...d},v=r({...c,active:o,dragOverlay:l,transform:{initial:f,final:p}}),[y]=v,w=v[v.length-1];if(JSON.stringify(y)===JSON.stringify(w))return;const k=i==null?void 0:i({active:o,dragOverlay:l,...c}),_=l.node.animate(v,{duration:n,easing:t,fill:"forwards"});return new Promise(S=>{_.onfinish=()=>{k==null||k(),S()}})}}let zj=0;function Zre(e){return A.useMemo(()=>{if(e!=null)return zj++,zj},[e])}const Qre=Z.memo(e=>{let{adjustScale:n=!1,children:t,dropAnimation:i,style:r,transition:a,modifiers:o,wrapperElement:l="div",className:f,zIndex:c=999}=e;const{activatorEvent:h,active:d,activeNodeRect:p,containerNodeRect:v,draggableNodes:y,droppableContainers:w,dragOverlay:k,over:_,measuringConfiguration:S,scrollableAncestors:C,scrollableAncestorRects:E,windowRect:O}=KB(),T=A.useContext(Iy),M=Zre(d==null?void 0:d.id),N=YB(o,{activatorEvent:h,active:d,activeNodeRect:p,containerNodeRect:v,draggingNodeRect:k.rect,over:_,overlayNodeRect:k.rect,scrollableAncestors:C,scrollableAncestorRects:E,transform:T,windowRect:O}),F=LC(p),R=Kre({config:i,draggableNodes:y,droppableContainers:w,measuringConfiguration:S}),L=F?k.setRef:void 0;return Z.createElement(qre,null,Z.createElement(Bre,{animation:R},d&&M?Z.createElement(Vre,{key:M,id:d.id,ref:L,as:l,activatorEvent:h,adjustScale:n,className:f,transition:a,rect:F,style:{zIndex:c,...r},transform:N},t):null))});function Eg(e,n,t){const i=e.slice();return i.splice(t<0?i.length+t:t,0,i.splice(n,1)[0]),i}function Jre(e,n){return e.reduce((t,i,r)=>{const a=n.get(i);return a&&(t[r]=a),t},Array(e.length))}function Av(e){return e!==null&&e>=0}function eae(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let t=0;t{var n;let{rects:t,activeNodeRect:i,activeIndex:r,overIndex:a,index:o}=e;const l=(n=t[r])!=null?n:i;if(!l)return null;const f=iae(t,o,r);if(o===r){const c=t[a];return c?{x:rr&&o<=a?{x:-l.width-f,y:0,...Ov}:o=a?{x:l.width+f,y:0,...Ov}:{x:0,y:0,...Ov}};function iae(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=Eg(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}},Ev={scaleX:1,scaleY:1},ZB=e=>{var n;let{activeIndex:t,activeNodeRect:i,index:r,rects:a,overIndex:o}=e;const l=(n=a[t])!=null?n:i;if(!l)return null;if(r===t){const c=a[o];return c?{x:0,y:tt&&r<=o?{x:0,y:-l.height-f,...Ev}:r=o?{x:0,y:l.height+f,...Ev}:{x:0,y:0,...Ev}};function rae(e,n,t){const i=e[n],r=e[n-1],a=e[n+1];return i?ti.map(T=>typeof T=="object"&&"id"in T?T.id:T),[i]),y=o!=null,w=o?v.indexOf(o.id):-1,k=c?v.indexOf(c.id):-1,_=A.useRef(v),S=!eae(v,_.current),C=k!==-1&&w===-1||S,E=nae(a);Ra(()=>{S&&y&&h(v)},[S,v,y,h]),A.useEffect(()=>{_.current=v},[v]);const O=A.useMemo(()=>({activeIndex:w,containerId:d,disabled:E,disableTransforms:C,items:v,overIndex:k,useDragOverlay:p,sortedRects:Jre(v,f),strategy:r}),[w,d,E.draggable,E.droppable,C,v,k,f,p,r]);return Z.createElement(JB.Provider,{value:O},n)}const aae=e=>{let{id:n,items:t,activeIndex:i,overIndex:r}=e;return Eg(t,i,r).indexOf(n)},oae=e=>{let{containerId:n,isSorting:t,wasDragging:i,index:r,items:a,newIndex:o,previousItems:l,previousContainerId:f,transition:c}=e;return!c||!i||l!==a&&r===o?!1:t?!0:o!==r&&n===f},sae={duration:200,easing:"ease"},eF="transform",lae=to.Transition.toString({property:eF,duration:0,easing:"linear"}),uae={roleDescription:"sortable"};function fae(e){let{disabled:n,index:t,node:i,rect:r}=e;const[a,o]=A.useState(null),l=A.useRef(t);return Ra(()=>{if(!n&&t!==l.current&&i.current){const f=r.current;if(f){const c=Pc(i.current,{ignoreTransform:!0}),h={x:f.left-c.left,y:f.top-c.top,scaleX:f.width/c.width,scaleY:f.height/c.height};(h.x||h.y)&&o(h)}}t!==l.current&&(l.current=t)},[n,t,i,r]),A.useEffect(()=>{a&&o(null)},[a]),a}function nF(e){let{animateLayoutChanges:n=oae,attributes:t,disabled:i,data:r,getNewIndex:a=aae,id:o,strategy:l,resizeObserverConfig:f,transition:c=sae}=e;const{items:h,containerId:d,activeIndex:p,disabled:v,disableTransforms:y,sortedRects:w,overIndex:k,useDragOverlay:_,strategy:S}=A.useContext(JB),C=cae(i,v),E=h.indexOf(o),O=A.useMemo(()=>({sortable:{containerId:d,index:E,items:h},...r}),[d,r,E,h]),T=A.useMemo(()=>h.slice(h.indexOf(o)),[h,o]),{rect:M,node:N,isOver:F,setNodeRef:R}=Ire({id:o,data:O,disabled:C.droppable,resizeObserverConfig:{updateMeasurementsFor:T,...f}}),{active:L,activatorEvent:B,activeNodeRect:G,attributes:U,setNodeRef:H,listeners:P,isDragging:$,over:q,setActivatorNodeRef:Y,transform:D}=$re({id:o,data:O,attributes:{...uae,...t},disabled:C.draggable}),W=kie(R,H),V=!!L,z=V&&!y&&Av(p)&&Av(k),X=!_&&$,ee=X&&z?D:null,le=z?ee??(l??S)({rects:w,activeNodeRect:G,activeIndex:p,overIndex:k,index:E}):null,be=Av(p)&&Av(k)?a({id:o,items:h,activeIndex:p,overIndex:k}):E,ae=L==null?void 0:L.id,ue=A.useRef({activeId:ae,items:h,newIndex:be,containerId:d}),Ce=h!==ue.current.items,ne=n({active:L,containerId:d,isDragging:$,isSorting:V,id:o,index:E,items:h,newIndex:ue.current.newIndex,previousItems:ue.current.items,previousContainerId:ue.current.containerId,transition:c,wasDragging:ue.current.activeId!=null}),Ne=fae({disabled:!ne,index:E,node:N,rect:M});return A.useEffect(()=>{V&&ue.current.newIndex!==be&&(ue.current.newIndex=be),d!==ue.current.containerId&&(ue.current.containerId=d),h!==ue.current.items&&(ue.current.items=h)},[V,be,d,h]),A.useEffect(()=>{if(ae===ue.current.activeId)return;if(ae!=null&&ue.current.activeId==null){ue.current.activeId=ae;return}const Ee=setTimeout(()=>{ue.current.activeId=ae},50);return()=>clearTimeout(Ee)},[ae]),{active:L,activeIndex:p,attributes:U,data:O,rect:M,index:E,newIndex:be,items:h,isOver:F,isSorting:V,isDragging:$,listeners:P,node:N,overIndex:k,over:q,setNodeRef:W,setActivatorNodeRef:Y,setDroppableNodeRef:R,setDraggableNodeRef:H,transform:Ne??le,transition:pe()};function pe(){if(Ne||Ce&&ue.current.newIndex===E)return lae;if(!(X&&!$y(B)||!c)&&(V||ne))return to.Transition.toString({...c,property:eF})}}function cae(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 Tg(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 dae=[Qn.Down,Qn.Right,Qn.Up,Qn.Left],hae=(e,n)=>{let{context:{active:t,collisionRect:i,droppableRects:r,droppableContainers:a,over:o,scrollableAncestors:l}}=n;if(dae.includes(e.code)){if(e.preventDefault(),!t||!i)return;const f=[];a.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const p=r.get(d.id);if(p)switch(e.code){case Qn.Down:i.topp.top&&f.push(d);break;case Qn.Left:i.left>p.left&&f.push(d);break;case Qn.Right:i.left1&&(h=c[1].id),h!=null){const d=a.get(t.id),p=a.get(h),v=p?r.get(p.id):null,y=p==null?void 0:p.node.current;if(y&&v&&d&&p){const k=zy(y).some((T,M)=>l[M]!==T),_=tF(d,p),S=mae(d,p),C=k||!_?{x:0,y:0}:{x:S?i.width-v.width:0,y:S?i.height-v.height:0},E={x:v.left,y:v.top};return C.x&&C.y?E:zh(E,C)}}}};function tF(e,n){return!Tg(e)||!Tg(n)?!1:e.data.current.sortable.containerId===n.data.current.sortable.containerId}function mae(e,n){return!Tg(e)||!Tg(n)||!tF(e,n)?!1:e.data.current.sortable.index=H?U:""+Array(H+1-$.length).join(P)+U},E={s:C,z:function(U){var H=-U.utcOffset(),P=Math.abs(H),$=Math.floor(P/60),q=P%60;return(H<=0?"+":"-")+C($,2,"0")+":"+C(q,2,"0")},m:function U(H,P){if(H.date()1)return U(D[0])}else{var W=H.name;T[W]=H,q=W}return!$&&q&&(O=q),q||!$&&O},R=function(U,H){if(N(U))return U.clone();var P=typeof H=="object"?H:{};return P.date=U,P.args=arguments,new B(P)},L=E;L.l=F,L.i=N,L.w=function(U,H){return R(U,{locale:H.$L,utc:H.$u,x:H.$x,$offset:H.$offset})};var B=(function(){function U(P){this.$L=F(P.locale,null,!0),this.parse(P),this.$x=this.$x||P.x||{},this[M]=!0}var H=U.prototype;return H.parse=function(P){this.$d=(function($){var q=$.date,Y=$.utc;if(q===null)return new Date(NaN);if(L.u(q))return new Date;if(q instanceof Date)return new Date(q);if(typeof q=="string"&&!/Z$/i.test(q)){var D=q.match(k);if(D){var W=D[2]-1||0,V=(D[7]||"0").substring(0,3);return Y?new Date(Date.UTC(D[1],W,D[3]||1,D[4]||0,D[5]||0,D[6]||0,V)):new Date(D[1],W,D[3]||1,D[4]||0,D[5]||0,D[6]||0,V)}}return new Date(q)})(P),this.init()},H.init=function(){var P=this.$d;this.$y=P.getFullYear(),this.$M=P.getMonth(),this.$D=P.getDate(),this.$W=P.getDay(),this.$H=P.getHours(),this.$m=P.getMinutes(),this.$s=P.getSeconds(),this.$ms=P.getMilliseconds()},H.$utils=function(){return L},H.isValid=function(){return this.$d.toString()!==w},H.isSame=function(P,$){var q=R(P);return this.startOf($)<=q&&q<=this.endOf($)},H.isAfter=function(P,$){return R(P)Le(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 bae({formatter:e,...n}){return(e||yae)(n)}function wae({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 iF({controlsRef:e,direction:n,levelIndex:t,rowIndex:i,cellIndex:r,size:a}){var f,c,h;const o=wae({direction:n,size:a,rowIndex:i,cellIndex:r,levelIndex:t});if(!o)return;const l=(h=(c=(f=e.current)==null?void 0:f[o.levelIndex])==null?void 0:c[o.rowIndex])==null?void 0:h[o.cellIndex];l&&(l.disabled||l.getAttribute("data-hidden")||l.getAttribute("data-outside")?iF({controlsRef:e,direction:n,levelIndex:o.levelIndex,cellIndex:o.cellIndex,rowIndex:o.rowIndex,size:a}):l.focus())}function kae(e){switch(e){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function _ae(e){var n;return(n=e.current)==null?void 0:n.map(t=>t.map(i=>i.length))}function IC({controlsRef:e,levelIndex:n,rowIndex:t,cellIndex:i,event:r}){const a=kae(r.key);a&&(r.preventDefault(),iF({controlsRef:e,direction:a,levelIndex:n,rowIndex:t,cellIndex:i,size:_ae(e)}))}function Gi(e){return e==null||e===""?e:Le(e).format("YYYY-MM-DD")}function rF(e){return e==null||e===""?e:Le(e).format("YYYY-MM-DD HH:mm:ss")}function xS({minDate:e,maxDate:n}){const t=Le();return!e&&!n?Gi(t):e&&Le(t).isBefore(e)?Gi(e):n&&Le(t).isAfter(n)?Gi(n):Gi(t)}const xae={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},Sae=A.createContext(xae);function ll(){const e=A.use(Sae),n=A.useCallback(a=>a||e.locale,[e.locale]),t=A.useCallback(a=>typeof a=="number"?a:e.firstDayOfWeek,[e.firstDayOfWeek]),i=A.useCallback(a=>Array.isArray(a)?a:e.weekendDays,[e.weekendDays]),r=A.useCallback(a=>typeof a=="string"?a:e.labelSeparator,[e.labelSeparator]);return{...e,getLocale:n,getFirstDayOfWeek:t,getWeekendDays:i,getLabelSeparator:r}}function Cae({value:e,type:n,withTime:t}){const i=t?rF:Gi;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 aF({value:e,type:n,name:t,form:i,withTime:r=!1}){return b.jsx("input",{type:"hidden",value:Cae({value:e,type:n,withTime:r}),name:t,form:i})}aF.displayName="@mantine/dates/HiddenDatesInput";var oF={day:"m_396ce5cb"};const sF=(e,{size:n})=>({day:{"--day-size":Tn(n,"day-size")}}),By=Pe(e=>{const n=ye("Day",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,date:f,disabled:c,__staticSelector:h,weekend:d,outside:p,selected:v,renderDay:y,inRange:w,firstInRange:k,lastInRange:_,hidden:S,static:C,highlightToday:E,fullWidth:O,attributes:T,...M}=n;return b.jsx(di,{...Xe({name:h||"Day",classes:oF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:T,vars:l,varsResolver:sF,rootSelector:"day"})("day",{style:S?{display:"none"}:void 0}),component:C?"div":"button",disabled:c,"data-today":Le(f).isSame(new Date,"day")||void 0,"data-hidden":S||void 0,"data-highlight-today":E||void 0,"data-disabled":c||void 0,"data-weekend":!c&&!p&&d||void 0,"data-outside":!c&&p||void 0,"data-selected":!c&&v||void 0,"data-in-range":w&&!c||void 0,"data-first-in-range":k&&!c||void 0,"data-last-in-range":_&&!c||void 0,"data-static":C||void 0,"data-full-width":O||void 0,unstyled:o,...M,children:(y==null?void 0:y(f))||Le(f).date()})});By.classes=oF;By.varsResolver=sF;By.displayName="@mantine/dates/Day";function Aae({locale:e,format:n="dd",firstDayOfWeek:t=1}){const i=Le().day(t),r=[];for(let a=0;a<7;a+=1)typeof n=="string"?r.push(Le(i).add(a,"days").locale(e).format(n)):r.push(n(Le(i).add(a,"days").format("YYYY-MM-DD")));return r}var lF={weekday:"m_18a3eca"};const uF=(e,{size:n})=>({weekdaysRow:{"--wr-fz":Qt(n),"--wr-spacing":Ht(n)}}),Fy=Pe(e=>{const n=ye("WeekdaysRow",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,locale:f,firstDayOfWeek:c,weekdayFormat:h,cellComponent:d="th",__staticSelector:p,withWeekNumbers:v,attributes:y,...w}=n,k=Xe({name:p||"WeekdaysRow",classes:lF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:y,vars:l,varsResolver:uF,rootSelector:"weekdaysRow"}),_=ll(),S=Aae({locale:_.getLocale(f),format:h,firstDayOfWeek:_.getFirstDayOfWeek(c)}).map((C,E)=>b.jsx(d,{...k("weekday"),children:C},E));return b.jsxs(ve,{component:"tr",...k("weekdaysRow"),...w,children:[v&&b.jsx(d,{...k("weekday"),children:"#"}),S]})});Fy.classes=lF;Fy.varsResolver=uF;Fy.displayName="@mantine/dates/WeekdaysRow";function Oae(e,n=1){let t=Le(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 Eae(e,n=1){let t=Le(e);for(;t.day()!==n;)t=t.subtract(1,"day");return t.format("YYYY-MM-DD")}function Tae({month:e,firstDayOfWeek:n=1,consistentWeeks:t}){const i=Le(Le(e).subtract(Le(e).date()-1,"day").format("YYYY-M-D")),r=i.format("YYYY-MM-DD"),a=Oae(i.add(+i.daysInMonth()-1,"day").format("YYYY-MM-DD"),n),o=[];let l=Le(Eae(r,n));for(;Le(l).isBefore(a,"day");){const f=[];for(let c=0;c<7;c+=1)f.push(l.format("YYYY-MM-DD")),l=l.add(1,"day");o.push(f)}if(t&&o.length<6){const f=o[o.length-1],c=f[f.length-1];let h=Le(c).add(1,"day");for(;o.length<6;){const d=[];for(let p=0;p<7;p+=1)d.push(h.format("YYYY-MM-DD")),h=h.add(1,"day");o.push(d)}}return o}function BC(e,n){return Le(e).format("YYYY-MM")===Le(n).format("YYYY-MM")}function fF(e,n){return n?Le(e).isAfter(Le(n).subtract(1,"day"),"day"):!0}function cF(e,n){return n?Le(e).isBefore(Le(n).add(1,"day"),"day"):!0}function jae({dates:e,minDate:n,maxDate:t,getDayProps:i,excludeDate:r,hideOutsideDates:a,month:o}){const l=e.flat().filter(h=>{var d;return cF(h,t)&&fF(h,n)&&!(r!=null&&r(h))&&!((d=i==null?void 0:i(h))!=null&&d.disabled)&&(!a||BC(h,o))}),f=l.find(h=>{var d;return(d=i==null?void 0:i(h))==null?void 0:d.selected});if(f)return f;const c=l.find(h=>Le().isSame(h,"date"));return c||l[0]}var sg={exports:{}},Mae=sg.exports,Ij;function Dae(){return Ij||(Ij=1,(function(e,n){(function(t,i){e.exports=i()})(Mae,(function(){var t="day";return function(i,r,a){var o=function(c){return c.add(4-c.isoWeekday(),t)},l=r.prototype;l.isoWeekYear=function(){return o(this).year()},l.isoWeek=function(c){if(!this.$utils().u(c))return this.add(7*(c-this.isoWeek()),t);var h,d,p,v,y=o(this),w=(h=this.isoWeekYear(),d=this.$u,p=(d?a.utc:a)().year(h).startOf("year"),v=4-p.isoWeekday(),p.isoWeekday()>4&&(v+=7),p.add(v,t));return y.diff(w,"week")+1},l.isoWeekday=function(c){return this.$utils().u(c)?this.day()||7:this.day(this.day()%7?c:c-7)};var f=l.startOf;l.startOf=function(c,h){var d=this.$utils(),p=!!d.u(h)||h;return d.p(c)==="isoweek"?p?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):f.bind(this)(c,h)}}}))})(sg)),sg.exports}var Rae=Dae();const Pae=st(Rae);Le.extend(Pae);function Nae(e){return Le(e.find(n=>Le(n).day()===1)).isoWeek()}var dF={month:"m_cc9820d3",monthCell:"m_8f457cd5",weekNumber:"m_6cff9dea"};const $ae={withCellSpacing:!0},hF=(e,{size:n})=>({weekNumber:{"--wn-fz":Qt(n),"--wn-size":Tn(n,"wn-size")}}),Vm=Pe(e=>{const n=ye("Month",$ae,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,locale:c,firstDayOfWeek:h,weekdayFormat:d,month:p,weekendDays:v,getDayProps:y,excludeDate:w,minDate:k,maxDate:_,renderDay:S,hideOutsideDates:C,hideWeekdays:E,getDayAriaLabel:O,static:T,__getDayRef:M,__onDayKeyDown:N,__onDayClick:F,__onDayMouseEnter:R,__preventFocus:L,__stopPropagation:B,withCellSpacing:G,size:U,highlightToday:H,withWeekNumbers:P,fullWidth:$,attributes:q,...Y}=n,D=Xe({name:f||"Month",classes:dF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:q,vars:l,varsResolver:hF,rootSelector:"month"}),W=ll(),V=Tae({month:p,firstDayOfWeek:W.getFirstDayOfWeek(h),consistentWeeks:W.consistentWeeks}),z=jae({dates:V,minDate:Gi(k),maxDate:Gi(_),getDayProps:y,excludeDate:w,hideOutsideDates:C,month:p}),{resolvedClassNames:X,resolvedStyles:ee}=Li({classNames:t,styles:a,props:n}),re=V.map((le,be)=>{const ae=le.map((ue,Ce)=>{const ne=!BC(ue,p),Ne=(O==null?void 0:O(ue))||Le(ue).locale(c||W.locale).format("D MMMM YYYY"),pe=y==null?void 0:y(ue),Ee=Le(ue).isSame(z,"date");return b.jsx("td",{...D("monthCell"),"data-with-spacing":G||void 0,children:b.jsx(By,{__staticSelector:f||"Month",classNames:X,styles:ee,attributes:q,unstyled:o,"data-mantine-stop-propagation":B||void 0,highlightToday:H,renderDay:S,date:ue,size:U,weekend:W.getWeekendDays(v).includes(Le(ue).get("day")),outside:ne,hidden:C?ne:!1,"aria-label":Ne,static:T,fullWidth:$,disabled:(w==null?void 0:w(ue))||!cF(ue,Gi(_))||!fF(ue,Gi(k)),ref:Re=>{Re&&(M==null||M(be,Ce,Re))},...pe,onKeyDown:Re=>{var we;(we=pe==null?void 0:pe.onKeyDown)==null||we.call(pe,Re),N==null||N(Re,{rowIndex:be,cellIndex:Ce,date:ue})},onMouseEnter:Re=>{var we;(we=pe==null?void 0:pe.onMouseEnter)==null||we.call(pe,Re),R==null||R(Re,ue)},onClick:Re=>{var we;(we=pe==null?void 0:pe.onClick)==null||we.call(pe,Re),F==null||F(Re,ue)},onMouseDown:Re=>{var we;(we=pe==null?void 0:pe.onMouseDown)==null||we.call(pe,Re),L&&Re.preventDefault()},tabIndex:L||!Ee?-1:0})},ue.toString())});return b.jsxs("tr",{...D("monthRow"),children:[P&&b.jsx("td",{...D("weekNumber"),children:Nae(le)}),ae]},be)});return b.jsxs(ve,{component:"table",...D("month"),size:U,"data-full-width":$||void 0,...Y,children:[!E&&b.jsx("thead",{...D("monthThead"),children:b.jsx(Fy,{__staticSelector:f||"Month",locale:c,firstDayOfWeek:h,weekdayFormat:d,withWeekNumbers:P,size:U,classNames:X,styles:ee,unstyled:o,attributes:q})}),b.jsx("tbody",{...D("monthTbody"),children:re})]})});Vm.classes=dF;Vm.varsResolver=hF;Vm.displayName="@mantine/dates/Month";var mF={pickerControl:"m_dc6a3c71"};const pF=(e,{size:n})=>({pickerControl:{"--dpc-fz":Qt(n),"--dpc-size":Tn(n,"dpc-size")}}),Wm=Pe(e=>{const n=ye("PickerControl",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,firstInRange:f,lastInRange:c,inRange:h,__staticSelector:d,selected:p,disabled:v,fullWidth:y,attributes:w,...k}=n;return b.jsx(di,{...Xe({name:d||"PickerControl",classes:mF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l,varsResolver:pF,rootSelector:"pickerControl"})("pickerControl"),unstyled:o,"data-picker-control":!0,"data-full-width":y||void 0,"data-selected":p&&!v||void 0,"data-disabled":v||void 0,"data-in-range":h&&!v&&!p||void 0,"data-first-in-range":f&&!v||void 0,"data-last-in-range":c&&!v||void 0,disabled:v,...k})});Wm.classes=mF;Wm.varsResolver=pF;Wm.displayName="@mantine/dates/PickerControl";function vF({year:e,minDate:n,maxDate:t}){return!n&&!t?!1:!!(n&&Le(e).isBefore(n,"year")||t&&Le(e).isAfter(t,"year"))}function zae({years:e,minDate:n,maxDate:t,getYearControlProps:i}){const r=e.flat().filter(l=>{var f;return!vF({year:l,minDate:n,maxDate:t})&&!((f=i==null?void 0:i(l))!=null&&f.disabled)}),a=r.find(l=>{var f;return(f=i==null?void 0:i(l))==null?void 0:f.selected});if(a)return a;const o=r.find(l=>Le().isSame(l,"year"));return o||r[0]}function gF(e){const n=Le(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",Lae,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,decade:f,yearsListFormat:c,locale:h,minDate:d,maxDate:p,getYearControlProps:v,__staticSelector:y,__getControlRef:w,__onControlKeyDown:k,__onControlClick:_,__onControlMouseEnter:S,__preventFocus:C,__stopPropagation:E,withCellSpacing:O,fullWidth:T,size:M,attributes:N,...F}=n,R=Xe({name:y||"YearsList",classes:yF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:N,vars:l,rootSelector:"yearsList"}),L=ll(),B=gF(f),G=zae({years:B,minDate:d,maxDate:p,getYearControlProps:v}),U=B.map((H,P)=>{const $=H.map((q,Y)=>{const D=v==null?void 0:v(q),W=Le(q).isSame(G,"year");return b.jsx("td",{...R("yearsListCell"),"data-with-spacing":O||void 0,children:b.jsx(Wm,{...R("yearsListControl"),size:M,unstyled:o,fullWidth:T,"data-mantine-stop-propagation":E||void 0,disabled:vF({year:q,minDate:d,maxDate:p}),ref:V=>{V&&(w==null||w(P,Y,V))},...D,onKeyDown:V=>{var z;(z=D==null?void 0:D.onKeyDown)==null||z.call(D,V),k==null||k(V,{rowIndex:P,cellIndex:Y,date:q})},onClick:V=>{var z;(z=D==null?void 0:D.onClick)==null||z.call(D,V),_==null||_(V,q)},onMouseEnter:V=>{var z;(z=D==null?void 0:D.onMouseEnter)==null||z.call(D,V),S==null||S(V,q)},onMouseDown:V=>{var z;(z=D==null?void 0:D.onMouseDown)==null||z.call(D,V),C&&V.preventDefault()},tabIndex:C||!W?-1:0,children:(D==null?void 0:D.children)??Le(q).locale(L.getLocale(h)).format(c)})},Y)});return b.jsx("tr",{...R("yearsListRow"),children:$},P)});return b.jsx(ve,{component:"table",size:M,...R("yearsList"),"data-full-width":T||void 0,...F,children:b.jsx("tbody",{children:U})})});qy.classes=yF;qy.displayName="@mantine/dates/YearsList";function bF({month:e,minDate:n,maxDate:t}){return!n&&!t?!1:!!(n&&Le(e).isBefore(n,"month")||t&&Le(e).isAfter(t,"month"))}function Iae({months:e,minDate:n,maxDate:t,getMonthControlProps:i}){const r=e.flat().filter(l=>{var f;return!bF({month:l,minDate:n,maxDate:t})&&!((f=i==null?void 0:i(l))!=null&&f.disabled)}),a=r.find(l=>{var f;return(f=i==null?void 0:i(l))==null?void 0:f.selected});if(a)return a;const o=r.find(l=>Le().isSame(l,"month"));return o||r[0]}function Bae(e){const n=Le(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(Le(n).add(i,"months").format("YYYY-MM-DD")),i+=1;return t}var wF={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const Fae={monthsListFormat:"MMM",withCellSpacing:!0},Hy=Pe(e=>{const n=ye("MonthsList",Fae,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,year:c,monthsListFormat:h,locale:d,minDate:p,maxDate:v,getMonthControlProps:y,__getControlRef:w,__onControlKeyDown:k,__onControlClick:_,__onControlMouseEnter:S,__preventFocus:C,__stopPropagation:E,withCellSpacing:O,fullWidth:T,size:M,attributes:N,...F}=n,R=Xe({name:f||"MonthsList",classes:wF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:N,vars:l,rootSelector:"monthsList"}),L=ll(),B=Bae(c),G=Iae({months:B,minDate:Gi(p),maxDate:Gi(v),getMonthControlProps:y}),U=B.map((H,P)=>{const $=H.map((q,Y)=>{const D=y==null?void 0:y(q),W=Le(q).isSame(G,"month");return b.jsx("td",{...R("monthsListCell"),"data-with-spacing":O||void 0,children:b.jsx(Wm,{...R("monthsListControl"),size:M,unstyled:o,fullWidth:T,__staticSelector:f||"MonthsList","data-mantine-stop-propagation":E||void 0,disabled:bF({month:q,minDate:Gi(p),maxDate:Gi(v)}),ref:V=>{V&&(w==null||w(P,Y,V))},...D,onKeyDown:V=>{var z;(z=D==null?void 0:D.onKeyDown)==null||z.call(D,V),k==null||k(V,{rowIndex:P,cellIndex:Y,date:q})},onClick:V=>{var z;(z=D==null?void 0:D.onClick)==null||z.call(D,V),_==null||_(V,q)},onMouseEnter:V=>{var z;(z=D==null?void 0:D.onMouseEnter)==null||z.call(D,V),S==null||S(V,q)},onMouseDown:V=>{var z;(z=D==null?void 0:D.onMouseDown)==null||z.call(D,V),C&&V.preventDefault()},tabIndex:C||!W?-1:0,children:(D==null?void 0:D.children)??Le(q).locale(L.getLocale(d)).format(h)})},Y)});return b.jsx("tr",{...R("monthsListRow"),children:$},P)});return b.jsx(ve,{component:"table",size:M,...R("monthsList"),"data-full-width":T||void 0,...F,children:b.jsx("tbody",{children:U})})});Hy.classes=wF;Hy.displayName="@mantine/dates/MonthsList";var kF={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const qae={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:["previous","level","next"]},_F=(e,{size:n})=>({calendarHeader:{"--dch-control-size":Tn(n,"dch-control-size"),"--dch-fz":Qt(n)}}),os=Pe(e=>{const n=ye("CalendarHeader",qae,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,nextIcon:f,previousIcon:c,nextLabel:h,previousLabel:d,onNext:p,onPrevious:v,onLevelClick:y,label:w,nextDisabled:k,previousDisabled:_,hasNextLevel:S,levelControlAriaLabel:C,withNext:E,withPrevious:O,headerControlsOrder:T,fullWidth:M,__staticSelector:N,__preventFocus:F,__stopPropagation:R,attributes:L,...B}=n,G=Xe({name:N||"CalendarHeader",classes:kF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:L,vars:l,varsResolver:_F,rootSelector:"calendarHeader"}),U=F?Y=>Y.preventDefault():void 0,H=O&&A.createElement(di,{...G("calendarHeaderControl"),key:"previous","data-direction":"previous","aria-label":d,onClick:v,unstyled:o,onMouseDown:U,disabled:_,"data-disabled":_||void 0,tabIndex:F||_?-1:0,"data-mantine-stop-propagation":R||void 0},c||b.jsx(kg,{...G("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})),P=A.createElement(di,{component:S?"button":"div",...G("calendarHeaderLevel"),key:"level",onClick:S?y:void 0,unstyled:o,onMouseDown:S?U:void 0,disabled:!S,"data-static":!S||void 0,"aria-label":C,tabIndex:F||!S?-1:0,"data-mantine-stop-propagation":R||void 0},w),$=E&&A.createElement(di,{...G("calendarHeaderControl"),key:"next","data-direction":"next","aria-label":h,onClick:p,unstyled:o,onMouseDown:U,disabled:k,"data-disabled":k||void 0,tabIndex:F||k?-1:0,"data-mantine-stop-propagation":R||void 0},f||b.jsx(kg,{...G("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})),q=T.map(Y=>Y==="previous"?H:Y==="level"?P:Y==="next"?$:null);return b.jsx(ve,{...G("calendarHeader"),"data-full-width":M||void 0,...B,children:q})});os.classes=kF;os.varsResolver=_F;os.displayName="@mantine/dates/CalendarHeader";function Hae(e){const n=gF(e);return[n[0][0],n[3][0]]}const Uae={decadeLabelFormat:"YYYY"},Uy=Pe(e=>{const{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__getControlRef:l,__onControlKeyDown:f,__onControlClick:c,__onControlMouseEnter:h,withCellSpacing:d,__preventFocus:p,nextIcon:v,previousIcon:y,nextLabel:w,previousLabel:k,onNext:_,onPrevious:S,nextDisabled:C,previousDisabled:E,levelControlAriaLabel:O,withNext:T,withPrevious:M,headerControlsOrder:N,decadeLabelFormat:F,classNames:R,styles:L,unstyled:B,__staticSelector:G,__stopPropagation:U,size:H,fullWidth:P,attributes:$,...q}=ye("DecadeLevel",Uae,e),Y=ll(),[D,W]=Hae(n),V={__staticSelector:G||"DecadeLevel",classNames:R,styles:L,unstyled:B,size:H,attributes:$},z=typeof C=="boolean"?C:r?!Le(W).endOf("year").isBefore(r):!1,X=typeof E=="boolean"?E:i?!Le(D).startOf("year").isAfter(i):!1,ee=(re,le)=>Le(re).locale(t||Y.locale).format(le);return b.jsxs(ve,{"data-decade-level":!0,size:H,...q,children:[b.jsx(os,{label:typeof F=="function"?F(D,W):`${ee(D,F)} – ${ee(W,F)}`,__preventFocus:p,__stopPropagation:U,nextIcon:v,previousIcon:y,nextLabel:w,previousLabel:k,onNext:_,onPrevious:S,nextDisabled:z,previousDisabled:X,hasNextLevel:!1,levelControlAriaLabel:O,withNext:T,withPrevious:M,headerControlsOrder:N,fullWidth:P,...V}),b.jsx(qy,{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__getControlRef:l,__onControlKeyDown:f,__onControlClick:c,__onControlMouseEnter:h,__preventFocus:p,__stopPropagation:U,withCellSpacing:d,fullWidth:P,...V})]})});Uy.classes={...qy.classes,...os.classes};Uy.displayName="@mantine/dates/DecadeLevel";const Vae={yearLabelFormat:"YYYY"},Vy=Pe(e=>{const{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__getControlRef:l,__onControlKeyDown:f,__onControlClick:c,__onControlMouseEnter:h,withCellSpacing:d,__preventFocus:p,nextIcon:v,previousIcon:y,nextLabel:w,previousLabel:k,onNext:_,onPrevious:S,onLevelClick:C,nextDisabled:E,previousDisabled:O,hasNextLevel:T,levelControlAriaLabel:M,withNext:N,withPrevious:F,headerControlsOrder:R,yearLabelFormat:L,__staticSelector:B,__stopPropagation:G,size:U,classNames:H,styles:P,unstyled:$,fullWidth:q,attributes:Y,...D}=ye("YearLevel",Vae,e),W=ll(),V={__staticSelector:B||"YearLevel",classNames:H,styles:P,unstyled:$,size:U,attributes:Y},z=typeof E=="boolean"?E:r?!Le(n).endOf("year").isBefore(r):!1,X=typeof O=="boolean"?O:i?!Le(n).startOf("year").isAfter(i):!1;return b.jsxs(ve,{"data-year-level":!0,size:U,...D,children:[b.jsx(os,{label:typeof L=="function"?L(n):Le(n).locale(t||W.locale).format(L),__preventFocus:p,__stopPropagation:G,nextIcon:v,previousIcon:y,nextLabel:w,previousLabel:k,onNext:_,onPrevious:S,onLevelClick:C,nextDisabled:z,previousDisabled:X,hasNextLevel:T,levelControlAriaLabel:M,withNext:N,withPrevious:F,headerControlsOrder:R,fullWidth:q,...V}),b.jsx(Hy,{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__getControlRef:l,__onControlKeyDown:f,__onControlClick:c,__onControlMouseEnter:h,__preventFocus:p,__stopPropagation:G,withCellSpacing:d,fullWidth:q,...V})]})});Vy.classes={...os.classes,...Hy.classes};Vy.displayName="@mantine/dates/YearLevel";const Wae={monthLabelFormat:"MMMM YYYY"},Wy=Pe(e=>{const{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:f,maxDate:c,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__getDayRef:y,__onDayKeyDown:w,__onDayClick:k,__onDayMouseEnter:_,withCellSpacing:S,highlightToday:C,withWeekNumbers:E,__preventFocus:O,__stopPropagation:T,nextIcon:M,previousIcon:N,nextLabel:F,previousLabel:R,onNext:L,onPrevious:B,onLevelClick:G,nextDisabled:U,previousDisabled:H,hasNextLevel:P,levelControlAriaLabel:$,withNext:q,withPrevious:Y,headerControlsOrder:D,monthLabelFormat:W,classNames:V,styles:z,unstyled:X,__staticSelector:ee,size:re,static:le,fullWidth:be,attributes:ae,...ue}=ye("MonthLevel",Wae,e),Ce=ll(),ne={__staticSelector:ee||"MonthLevel",classNames:V,styles:z,unstyled:X,size:re,attributes:ae},Ne=typeof U=="boolean"?U:c?!Le(n).endOf("month").isBefore(c):!1,pe=typeof H=="boolean"?H:f?!Le(n).startOf("month").isAfter(f):!1;return b.jsxs(ve,{"data-month-level":!0,size:re,...ue,children:[b.jsx(os,{label:typeof W=="function"?W(n):Le(n).locale(t||Ce.locale).format(W),__preventFocus:O,__stopPropagation:T,nextIcon:M,previousIcon:N,nextLabel:F,previousLabel:R,onNext:L,onPrevious:B,onLevelClick:G,nextDisabled:Ne,previousDisabled:pe,hasNextLevel:P,levelControlAriaLabel:$,withNext:q,withPrevious:Y,headerControlsOrder:D,fullWidth:be,...ne}),b.jsx(Vm,{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:f,maxDate:c,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__getDayRef:y,__onDayKeyDown:w,__onDayClick:k,__onDayMouseEnter:_,__preventFocus:O,__stopPropagation:T,static:le,withCellSpacing:S,highlightToday:C,withWeekNumbers:E,fullWidth:be,...ne})]})});Wy.classes={...Vm.classes,...os.classes};Wy.displayName="@mantine/dates/MonthLevel";var xF={levelsGroup:"m_30b26e33"};const ul=Pe(e=>{const n=ye("LevelsGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,fullWidth:c,attributes:h,...d}=n;return b.jsx(ve,{...Xe({name:f||"LevelsGroup",classes:xF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l,rootSelector:"levelsGroup"})("levelsGroup"),"data-full-width":c||void 0,...d})});ul.classes=xF;ul.displayName="@mantine/dates/LevelsGroup";const Gae={numberOfColumns:1},Gy=Pe(e=>{const{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__onControlClick:l,__onControlMouseEnter:f,withCellSpacing:c,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:y,onNext:w,onPrevious:k,nextDisabled:_,previousDisabled:S,headerControlsOrder:C,classNames:E,styles:O,unstyled:T,__staticSelector:M,__stopPropagation:N,numberOfColumns:F,levelControlAriaLabel:R,decadeLabelFormat:L,size:B,fullWidth:G,vars:U,attributes:H,...P}=ye("DecadeLevelGroup",Gae,e),$=A.useRef([]),q=Array(F).fill(0).map((Y,D)=>{const W=Le(n).add(D*10,"years").format("YYYY-MM-DD");return b.jsx(Uy,{size:B,yearsListFormat:a,decade:W,withNext:D===F-1,withPrevious:D===0,decadeLabelFormat:L,__onControlClick:l,__onControlMouseEnter:f,__onControlKeyDown:(V,z)=>IC({levelIndex:D,rowIndex:z.rowIndex,cellIndex:z.cellIndex,event:V,controlsRef:$}),__getControlRef:(V,z,X)=>{Array.isArray($.current[D])||($.current[D]=[]),Array.isArray($.current[D][V])||($.current[D][V]=[]),$.current[D][V][z]=X},levelControlAriaLabel:typeof R=="function"?R(W):R,locale:t,minDate:i,maxDate:r,__preventFocus:h,__stopPropagation:N,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:y,onNext:w,onPrevious:k,nextDisabled:_,previousDisabled:S,getYearControlProps:o,__staticSelector:M||"DecadeLevelGroup",classNames:E,styles:O,unstyled:T,withCellSpacing:c,headerControlsOrder:C,fullWidth:G,attributes:H},D)});return b.jsx(ul,{classNames:E,styles:O,__staticSelector:M||"DecadeLevelGroup",size:B,unstyled:T,fullWidth:G,attributes:H,...P,children:q})});Gy.classes={...ul.classes,...Uy.classes};Gy.displayName="@mantine/dates/DecadeLevelGroup";const Yae={numberOfColumns:1},Yy=Pe(e=>{const{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__onControlClick:l,__onControlMouseEnter:f,withCellSpacing:c,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:y,onNext:w,onPrevious:k,onLevelClick:_,nextDisabled:S,previousDisabled:C,hasNextLevel:E,headerControlsOrder:O,classNames:T,styles:M,unstyled:N,__staticSelector:F,__stopPropagation:R,numberOfColumns:L,levelControlAriaLabel:B,yearLabelFormat:G,size:U,fullWidth:H,vars:P,attributes:$,...q}=ye("YearLevelGroup",Yae,e),Y=A.useRef([]),D=Array(L).fill(0).map((W,V)=>{const z=Le(n).add(V,"years").format("YYYY-MM-DD");return b.jsx(Vy,{size:U,monthsListFormat:a,year:z,withNext:V===L-1,withPrevious:V===0,yearLabelFormat:G,__stopPropagation:R,__onControlClick:l,__onControlMouseEnter:f,__onControlKeyDown:(X,ee)=>IC({levelIndex:V,rowIndex:ee.rowIndex,cellIndex:ee.cellIndex,event:X,controlsRef:Y}),__getControlRef:(X,ee,re)=>{Array.isArray(Y.current[V])||(Y.current[V]=[]),Array.isArray(Y.current[V][X])||(Y.current[V][X]=[]),Y.current[V][X][ee]=re},levelControlAriaLabel:typeof B=="function"?B(z):B,locale:t,minDate:i,maxDate:r,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:y,onNext:w,onPrevious:k,onLevelClick:_,nextDisabled:S,previousDisabled:C,hasNextLevel:E,getMonthControlProps:o,classNames:T,styles:M,unstyled:N,__staticSelector:F||"YearLevelGroup",withCellSpacing:c,headerControlsOrder:O,fullWidth:H,attributes:$},V)});return b.jsx(ul,{classNames:T,styles:M,__staticSelector:F||"YearLevelGroup",size:U,unstyled:N,fullWidth:H,attributes:$,...q,children:D})});Yy.classes={...Vy.classes,...ul.classes};Yy.displayName="@mantine/dates/YearLevelGroup";const Kae={numberOfColumns:1},Ky=Pe(e=>{const{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:f,maxDate:c,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__onDayClick:y,__onDayMouseEnter:w,withCellSpacing:k,highlightToday:_,withWeekNumbers:S,__preventFocus:C,nextIcon:E,previousIcon:O,nextLabel:T,previousLabel:M,onNext:N,onPrevious:F,onLevelClick:R,nextDisabled:L,previousDisabled:B,hasNextLevel:G,headerControlsOrder:U,classNames:H,styles:P,unstyled:$,numberOfColumns:q,levelControlAriaLabel:Y,monthLabelFormat:D,__staticSelector:W,__stopPropagation:V,size:z,static:X,fullWidth:ee,vars:re,attributes:le,...be}=ye("MonthLevelGroup",Kae,e),ae=A.useRef([]),ue=Array(q).fill(0).map((Ce,ne)=>{const Ne=Le(n).add(ne,"months").format("YYYY-MM-DD");return b.jsx(Wy,{month:Ne,withNext:ne===q-1,withPrevious:ne===0,monthLabelFormat:D,__stopPropagation:V,__onDayClick:y,__onDayMouseEnter:w,__onDayKeyDown:(pe,Ee)=>IC({levelIndex:ne,rowIndex:Ee.rowIndex,cellIndex:Ee.cellIndex,event:pe,controlsRef:ae}),__getDayRef:(pe,Ee,Re)=>{Array.isArray(ae.current[ne])||(ae.current[ne]=[]),Array.isArray(ae.current[ne][pe])||(ae.current[ne][pe]=[]),ae.current[ne][pe][Ee]=Re},levelControlAriaLabel:typeof Y=="function"?Y(Ne):Y,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:f,maxDate:c,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__preventFocus:C,nextIcon:E,previousIcon:O,nextLabel:T,previousLabel:M,onNext:N,onPrevious:F,onLevelClick:R,nextDisabled:L,previousDisabled:B,hasNextLevel:G,classNames:H,styles:P,unstyled:$,__staticSelector:W||"MonthLevelGroup",size:z,static:X,withCellSpacing:k,highlightToday:_,withWeekNumbers:S,headerControlsOrder:U,fullWidth:ee,attributes:le},ne)});return b.jsx(ul,{classNames:H,styles:P,__staticSelector:W||"MonthLevelGroup",size:z,fullWidth:ee,attributes:le,...be,children:ue})});Ky.classes={...ul.classes,...Wy.classes};Ky.displayName="@mantine/dates/MonthLevelGroup";var SF={input:"m_6fa5e2aa"};const Nc=Pe(e=>{const{inputProps:n,wrapperProps:t,placeholder:i,classNames:r,styles:a,unstyled:o,popoverProps:l,modalProps:f,dropdownType:c,children:h,formattedValue:d,dropdownHandlers:p,dropdownOpened:v,onClick:y,clearable:w,clearSectionMode:k,onClear:_,clearButtonProps:S,rightSection:C,shouldClear:E,readOnly:O,disabled:T,value:M,name:N,form:F,type:R,onDropdownClose:L,withTime:B,...G}=zL("PickerInputBase",{size:"sm"},e),U=b.jsx(Lt.ClearButton,{onClick:_,unstyled:o,...S}),H=()=>{R==="range"&&Array.isArray(M)&&M[0]&&!M[1]&&_(),p.close()};return b.jsxs(b.Fragment,{children:[c==="modal"&&!O&&b.jsx(Br,{opened:v,onClose:H,withCloseButton:!1,size:"auto","data-dates-modal":!0,unstyled:o,...f,children:h}),b.jsx(Lt.Wrapper,{...t,children:b.jsxs(En,{position:"bottom-start",opened:v,trapFocus:!0,returnFocus:!1,unstyled:o,onClose:L,...l,disabled:(l==null?void 0:l.disabled)||c==="modal"||O,onChange:P=>{var $;P||(($=l==null?void 0:l.onClose)==null||$.call(l),H())},children:[b.jsx(En.Target,{children:b.jsx(Lt,{"data-dates-input":!0,"data-read-only":O||void 0,disabled:T,component:"button",type:"button",multiline:!0,onClick:P=>{y==null||y(P),p.toggle()},__clearSection:U,__clearable:w&&E&&!O&&!T,__clearSectionMode:k,rightSection:C,...n,classNames:{...r,input:cn(SF.input,r==null?void 0:r.input)},...G,children:d||b.jsx(Lt.Placeholder,{error:n.error,unstyled:o,classNames:r,styles:a,__staticSelector:n.__staticSelector,children:i})})}),b.jsx(En.Dropdown,{"data-dates-dropdown":!0,children:h})]})}),b.jsx(aF,{value:M,name:N,form:F,type:R,withTime:B})]})});Nc.classes=SF;Nc.displayName="@mantine/dates/PickerInputBase";const Bj=e=>e==="range"?[null,null]:e==="multiple"?[]:null,Fj=(e,n)=>{const t=n?rF:Gi;return Array.isArray(e)?e.map(t):t(e)};function FC({type:e,value:n,defaultValue:t,onChange:i,withTime:r=!1}){const a=A.useRef(e),[o,l,f]=Oi({value:Fj(n,r),defaultValue:Fj(t,r),finalValue:Bj(e),onChange:i});let c=o;return a.current!==e&&(a.current=e,n===void 0&&(c=t!==void 0?t:Bj(e),l(c))),[c,l,f]}function Ok(e,n){return e?e==="month"?0:e==="year"?1:2:n||0}function Xae(e){return e===0?"month":e===1?"year":"decade"}function Fd(e,n,t){return Xae(Bo(Ok(e,0),Ok(n,0),Ok(t,2)))}const Zae={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},$c=Pe(e=>{const n=ye("Calendar",Zae,e),{vars:t,maxLevel:i,minLevel:r,defaultLevel:a,level:o,onLevelChange:l,date:f,defaultDate:c,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:v,nextLabel:y,previousLabel:w,onYearSelect:k,onMonthSelect:_,onYearMouseEnter:S,onMonthMouseEnter:C,headerControlsOrder:E,__updateDateOnYearSelect:O,__updateDateOnMonthSelect:T,__setDateRef:M,__setLevelRef:N,firstDayOfWeek:F,weekdayFormat:R,weekendDays:L,getDayProps:B,excludeDate:G,renderDay:U,hideOutsideDates:H,hideWeekdays:P,getDayAriaLabel:$,monthLabelFormat:q,nextIcon:Y,previousIcon:D,__onDayClick:W,__onDayMouseEnter:V,withCellSpacing:z,highlightToday:X,withWeekNumbers:ee,monthsListFormat:re,getMonthControlProps:le,yearLabelFormat:be,yearsListFormat:ae,getYearControlProps:ue,decadeLabelFormat:Ce,classNames:ne,styles:Ne,unstyled:pe,minDate:Ee,maxDate:Re,locale:we,__staticSelector:Se,size:De,__preventFocus:qe,__stopPropagation:Ve,onNextDecade:Ue,onPreviousDecade:We,onNextYear:Ye,onPreviousYear:sn,onNextMonth:ie,onPreviousMonth:se,static:ke,enableKeyboardNavigation:Ze,fullWidth:_e,attributes:fe,ref:Be,...pn}=n,{resolvedClassNames:Je,resolvedStyles:en}=Li({classNames:ne,styles:Ne,props:n}),[Ke,jn]=Oi({value:o?Fd(o,r,i):void 0,defaultValue:a?Fd(a,r,i):void 0,finalValue:Fd(void 0,r,i),onChange:l}),[un,tt]=FC({type:"default",value:Gi(f),defaultValue:Gi(c),onChange:h});A.useImperativeHandle(M,()=>nn=>{tt(nn)}),A.useImperativeHandle(N,()=>nn=>{jn(nn)});const pt={__staticSelector:Se||"Calendar",styles:en,classNames:Je,unstyled:pe,size:De,attributes:fe},Mn=p||d||1,bn=A.useRef(null);if(bn.current===null){const nn=new Date;bn.current=Ee&&Le(nn).isAfter(Ee)?Ee:Le(nn).format("YYYY-MM-DD")}const _n=un||bn.current,it=()=>{const nn=Le(_n).add(Mn,"month").format("YYYY-MM-DD");ie==null||ie(nn),tt(nn)},Et=()=>{const nn=Le(_n).subtract(Mn,"month").format("YYYY-MM-DD");se==null||se(nn),tt(nn)},ze=()=>{const nn=Le(_n).add(Mn,"year").format("YYYY-MM-DD");Ye==null||Ye(nn),tt(nn)},Fe=()=>{const nn=Le(_n).subtract(Mn,"year").format("YYYY-MM-DD");sn==null||sn(nn),tt(nn)},Dn=()=>{const nn=Le(_n).add(10*Mn,"year").format("YYYY-MM-DD");Ue==null||Ue(nn),tt(nn)},et=()=>{const nn=Le(_n).subtract(10*Mn,"year").format("YYYY-MM-DD");We==null||We(nn),tt(nn)},An=A.useRef(null);return A.useEffect(()=>{if(!Ze||ke)return;const nn=tn=>{var In;if(!((In=An.current)!=null&&In.contains(document.activeElement)))return;const rn=tn.ctrlKey||tn.metaKey,Ln=tn.shiftKey;switch(tn.key){case"ArrowUp":rn&&Ln?(tn.preventDefault(),et()):rn&&(tn.preventDefault(),Fe());break;case"ArrowDown":rn&&Ln?(tn.preventDefault(),Dn()):rn&&(tn.preventDefault(),ze());break;case"y":case"Y":Ke==="month"&&(tn.preventDefault(),jn("year"));break}};return document.addEventListener("keydown",nn),()=>{document.removeEventListener("keydown",nn)}},[Ze,ke,Ke,ze,Fe,Dn,et]),b.jsxs(ve,{ref:It(An,Be),size:De,"data-calendar":!0,"data-full-width":_e||void 0,...pn,children:[Ke==="month"&&b.jsx(Ky,{month:_n,minDate:Ee,maxDate:Re,firstDayOfWeek:F,weekdayFormat:R,weekendDays:L,getDayProps:B,excludeDate:G,renderDay:U,hideOutsideDates:H,hideWeekdays:P,getDayAriaLabel:$,onNext:it,onPrevious:Et,hasNextLevel:i!=="month",onLevelClick:()=>jn("year"),numberOfColumns:d,locale:we,levelControlAriaLabel:v==null?void 0:v.monthLevelControl,nextLabel:(v==null?void 0:v.nextMonth)??y,nextIcon:Y,previousLabel:(v==null?void 0:v.previousMonth)??w,previousIcon:D,monthLabelFormat:q,__onDayClick:W,__onDayMouseEnter:V,__preventFocus:qe,__stopPropagation:Ve,static:ke,withCellSpacing:z,highlightToday:X,withWeekNumbers:ee,headerControlsOrder:E,fullWidth:_e,...pt}),Ke==="year"&&b.jsx(Yy,{year:_n,numberOfColumns:d,minDate:Ee,maxDate:Re,monthsListFormat:re,getMonthControlProps:le,locale:we,onNext:ze,onPrevious:Fe,hasNextLevel:i!=="month"&&i!=="year",onLevelClick:()=>jn("decade"),levelControlAriaLabel:v==null?void 0:v.yearLevelControl,nextLabel:(v==null?void 0:v.nextYear)??y,nextIcon:Y,previousLabel:(v==null?void 0:v.previousYear)??w,previousIcon:D,yearLabelFormat:be,__onControlMouseEnter:C,__onControlClick:(nn,tn)=>{T&&tt(tn),jn(Fd("month",r,i)),_==null||_(tn)},__preventFocus:qe,__stopPropagation:Ve,withCellSpacing:z,headerControlsOrder:E,fullWidth:_e,...pt}),Ke==="decade"&&b.jsx(Gy,{decade:_n,minDate:Ee,maxDate:Re,yearsListFormat:ae,getYearControlProps:ue,locale:we,onNext:Dn,onPrevious:et,numberOfColumns:d,nextLabel:(v==null?void 0:v.nextDecade)??y,nextIcon:Y,previousLabel:(v==null?void 0:v.previousDecade)??w,previousIcon:D,decadeLabelFormat:Ce,__onControlMouseEnter:S,__onControlClick:(nn,tn)=>{O&&tt(tn),jn(Fd("year",r,i)),k==null||k(tn)},__preventFocus:qe,__stopPropagation:Ve,withCellSpacing:z,headerControlsOrder:E,fullWidth:_e,...pt})]})});$c.classes={...Gy.classes,...Yy.classes,...Ky.classes};$c.displayName="@mantine/dates/Calendar";function Xy(e){const{maxLevel:n,minLevel:t,defaultLevel:i,level:r,onLevelChange:a,nextIcon:o,previousIcon:l,date:f,defaultDate:c,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:v,nextLabel:y,previousLabel:w,onYearSelect:k,onMonthSelect:_,onYearMouseEnter:S,onMonthMouseEnter:C,onNextMonth:E,onPreviousMonth:O,onNextYear:T,onPreviousYear:M,onNextDecade:N,onPreviousDecade:F,withCellSpacing:R,highlightToday:L,__updateDateOnYearSelect:B,__updateDateOnMonthSelect:G,__setDateRef:U,__setLevelRef:H,withWeekNumbers:P,headerControlsOrder:$,firstDayOfWeek:q,weekdayFormat:Y,weekendDays:D,getDayProps:W,excludeDate:V,renderDay:z,hideOutsideDates:X,hideWeekdays:ee,getDayAriaLabel:re,monthLabelFormat:le,monthsListFormat:be,getMonthControlProps:ae,yearLabelFormat:ue,yearsListFormat:Ce,getYearControlProps:ne,decadeLabelFormat:Ne,allowSingleDateInRange:pe,allowDeselect:Ee,minDate:Re,maxDate:we,locale:Se,...De}=e;return{calendarProps:{maxLevel:n,minLevel:t,defaultLevel:i,level:r,onLevelChange:a,nextIcon:o,previousIcon:l,date:f,defaultDate:c,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:v,nextLabel:y,previousLabel:w,onYearSelect:k,onMonthSelect:_,onYearMouseEnter:S,onMonthMouseEnter:C,onNextMonth:E,onPreviousMonth:O,onNextYear:T,onPreviousYear:M,onNextDecade:N,onPreviousDecade:F,withCellSpacing:R,highlightToday:L,__updateDateOnYearSelect:B,__updateDateOnMonthSelect:G,__setDateRef:U,withWeekNumbers:P,headerControlsOrder:$,firstDayOfWeek:q,weekdayFormat:Y,weekendDays:D,getDayProps:W,excludeDate:V,renderDay:z,hideOutsideDates:X,hideWeekdays:ee,getDayAriaLabel:re,monthLabelFormat:le,monthsListFormat:be,getMonthControlProps:ae,yearLabelFormat:ue,yearsListFormat:Ce,getYearControlProps:ne,decadeLabelFormat:Ne,allowSingleDateInRange:pe,allowDeselect:Ee,minDate:Re,maxDate:we,locale:Se},others:De}}function qj(e,n){const t=[...n].sort((i,r)=>Le(i).isAfter(Le(r))?1:-1);return Le(t[0]).startOf("day").subtract(1,"ms").isBefore(e)&&Le(t[1]).endOf("day").add(1,"ms").isAfter(e)}function CF({type:e,level:n,value:t,defaultValue:i,onChange:r,allowSingleDateInRange:a,allowDeselect:o,onMouseLeave:l}){const[f,c]=FC({type:e,value:t,defaultValue:i,onChange:r}),[h,d]=A.useState(e==="range"&&f[0]&&!f[1]?f[0]:null),[p,v]=A.useState(null),y=O=>{if(e==="range"){if(h&&!f[1]){if(Le(O).isSame(h,n)&&!a){d(null),v(null),c([null,null]);return}const T=[O,h];T.sort((M,N)=>Le(M).isAfter(Le(N))?1:-1),c(T),v(null),d(null);return}if(f[0]&&!f[1]&&Le(O).isSame(f[0],n)&&!a){d(null),v(null),c([null,null]);return}c([O,null]),v(null),d(O);return}if(e==="multiple"){f.some(T=>Le(T).isSame(O,n))?c(f.filter(T=>!Le(T).isSame(O,n))):c([...f,O]);return}f&&o&&Le(O).isSame(f,n)?c(null):c(O)},w=O=>h&&p?qj(O,[p,h]):f[0]&&f[1]?qj(O,f):!1,k=e==="range"?O=>{l==null||l(O),v(null)}:l,_=O=>f[0]&&Le(O).isSame(f[0],n)?!(p&&Le(p).isBefore(f[0])):!1,S=O=>f[1]?Le(O).isSame(f[1],n):!f[0]||!p?!1:Le(p).isBefore(f[0])&&Le(O).isSame(f[0],n),C=O=>{if(e==="range")return{selected:f.some(M=>M&&Le(M).isSame(O,n)),inRange:w(O),firstInRange:_(O),lastInRange:S(O),"data-autofocus":!!f[0]&&Le(f[0]).isSame(O,n)||void 0};if(e==="multiple")return{selected:f.some(M=>M&&Le(M).isSame(O,n)),"data-autofocus":!!f[0]&&Le(f[0]).isSame(O,n)||void 0};const T=Le(f).isSame(O,n);return{selected:T,"data-autofocus":T||void 0}},E=e==="range"&&h?v:()=>{};return A.useEffect(()=>{if(e==="range")if(f[0]&&!f[1])d(f[0]);else{const O=f[0]==null&&f[1]==null,T=f[0]!=null&&f[1]!=null;(O||T)&&(d(null),v(null))}},[f]),{onDateChange:y,onRootMouseLeave:k,onHoveredDateChange:E,getControlProps:C,_value:f,setValue:c}}var AF={monthPickerRoot:"m_53c9e871",presetsList:"m_cccb8ff3",presetButton:"m_7b4fbf50"};const OF=(e,{size:n})=>({monthPickerRoot:{"--preset-font-size":Qt(n)}}),Qae={type:"default"},Gm=Pe(e=>{const n=ye("MonthPicker",Qae,e),{classNames:t,styles:i,vars:r,type:a,defaultValue:o,value:l,onChange:f,__staticSelector:c,getMonthControlProps:h,allowSingleDateInRange:d,allowDeselect:p,onMouseLeave:v,onMonthSelect:y,__updateDateOnMonthSelect:w,__onPresetSelect:k,__stopPropagation:_,presets:S,className:C,style:E,unstyled:O,size:T,attributes:M,onLevelChange:N,...F}=n,{calendarProps:R,others:L}=Xy(F),B=A.useRef(null),G=A.useRef(null),U=Xe({name:c||"MonthPicker",classes:AF,props:n,className:C,style:E,classNames:t,styles:i,unstyled:O,attributes:M,rootSelector:S?"monthPickerRoot":void 0,varsResolver:OF,vars:r}),{onDateChange:H,onRootMouseLeave:P,onHoveredDateChange:$,getControlProps:q,setValue:Y}=CF({type:a,level:"month",allowDeselect:p,allowSingleDateInRange:d,value:l,defaultValue:o,onChange:f,onMouseLeave:v}),{resolvedClassNames:D,resolvedStyles:W}=Li({classNames:t,styles:i,props:n}),V=b.jsx($c,{classNames:D,styles:W,size:T,...R,...S?{}:L,minLevel:"year",__updateDateOnMonthSelect:w??!1,__staticSelector:c||"MonthPicker",onMouseLeave:P,onMonthMouseEnter:(ee,re)=>$(re),onMonthSelect:ee=>{H(ee),y==null||y(ee)},getMonthControlProps:ee=>({...q(ee),...h==null?void 0:h(ee)}),onLevelChange:N,__setDateRef:B,__setLevelRef:G,__stopPropagation:_,attributes:M,...S?{}:{className:C,style:E}});if(!S)return V;const z=ee=>{var le,be;const re=Array.isArray(ee)?ee[0]:ee;re!==void 0&&((le=B.current)==null||le.call(B,re),(be=G.current)==null||be.call(G,"year"),k?k(re):Y(ee))},X=S.map((ee,re)=>b.jsx(di,{...U("presetButton"),onClick:()=>z(ee.value),onMouseDown:le=>le.preventDefault(),"data-mantine-stop-propagation":_||void 0,children:ee.label},re));return b.jsxs(ve,{...U("monthPickerRoot"),size:T,...L,children:[b.jsx("div",{...U("presetsList"),children:X}),V]})});Gm.classes={...$c.classes,...AF};Gm.varsResolver=OF;Gm.displayName="@mantine/dates/MonthPicker";var Jae={datePickerRoot:"m_765a40cf",presetsList:"m_d6a681e1",presetButton:"m_acd30b22"};const EF=(e,{size:n})=>({datePickerRoot:{"--preset-font-size":Qt(n)}}),eoe={type:"default",defaultLevel:"month",numberOfColumns:1,size:"sm"},Ym=Pe(e=>{const n=ye("DatePicker",eoe,e),{allowDeselect:t,allowSingleDateInRange:i,value:r,defaultValue:a,onChange:o,onMouseLeave:l,classNames:f,styles:c,__staticSelector:h,__onDayClick:d,__onDayMouseEnter:p,__onPresetSelect:v,__stopPropagation:y,presets:w,className:k,style:_,unstyled:S,size:C,vars:E,attributes:O,...T}=n,{calendarProps:M,others:N}=Xy(T),F=A.useRef(null),R=A.useRef(null),L=Xe({name:h||"DatePicker",classes:Jae,props:n,className:k,style:_,classNames:f,styles:c,unstyled:S,attributes:O,rootSelector:w?"datePickerRoot":void 0,varsResolver:EF,vars:E}),{onDateChange:B,onRootMouseLeave:G,onHoveredDateChange:U,getControlProps:H,_value:P,setValue:$}=CF({type:N.type,level:"day",allowDeselect:t,allowSingleDateInRange:i,value:r,defaultValue:a,onChange:o,onMouseLeave:l}),{resolvedClassNames:q,resolvedStyles:Y}=Li({classNames:f,styles:c,props:n}),D=b.jsx($c,{classNames:q,styles:Y,__staticSelector:h||"DatePicker",onMouseLeave:G,size:C,...M,...w?{}:N,__stopPropagation:y,__setDateRef:F,__setLevelRef:R,minLevel:M.minLevel||"month",__onDayMouseEnter:(z,X)=>{U(X),p==null||p(z,X)},__onDayClick:(z,X)=>{B(X),d==null||d(z,X)},getDayProps:z=>{var X;return{...H(z),...(X=M.getDayProps)==null?void 0:X.call(M,z)}},getMonthControlProps:z=>{var X;return{selected:typeof P=="string"?BC(z,P):!1,...(X=M.getMonthControlProps)==null?void 0:X.call(M,z)}},getYearControlProps:z=>{var X;return{selected:typeof P=="string"?Le(z).isSame(P,"year"):!1,...(X=M.getYearControlProps)==null?void 0:X.call(M,z)}},hideOutsideDates:M.hideOutsideDates??M.numberOfColumns!==1,attributes:O,...w?{}:{className:k,style:_}});if(!w)return D;const W=z=>{var ee,re;const X=Array.isArray(z)?z[0]:z;X!==void 0&&((ee=F.current)==null||ee.call(F,X),(re=R.current)==null||re.call(R,"month"),v?v(X):$(z))},V=w.map((z,X)=>b.jsx(di,{...L("presetButton"),onClick:()=>W(z.value),onMouseDown:ee=>ee.preventDefault(),"data-mantine-stop-propagation":y||void 0,children:z.label},X));return b.jsxs(ve,{...L("datePickerRoot"),size:C,...N,children:[b.jsx("div",{...L("presetsList"),children:V}),D]})});Ym.classes=$c.classes;Ym.varsResolver=EF;Ym.displayName="@mantine/dates/DatePicker";function TF({type:e,value:n,defaultValue:t,onChange:i,locale:r,format:a,closeOnChange:o,sortDates:l,labelSeparator:f,valueFormatter:c}){const h=ll(),[d,p]=J$(!1),[v,y]=FC({type:e,value:n,defaultValue:t,onChange:i}),w=bae({type:e,date:v,locale:h.getLocale(r),format:a,labelSeparator:h.getLabelSeparator(f),formatter:c}),k=S=>{o&&(e==="default"&&p.close(),e==="range"&&S[0]&&S[1]&&p.close()),y(l&&e==="multiple"?[...S].sort((C,E)=>Le(C).isAfter(Le(E))?1:-1):S)};return{_value:v,setValue:k,onClear:()=>k(e==="range"?[null,null]:e==="multiple"?[]:null),shouldClear:e==="range"?!!v[0]:e==="multiple"?v.length>0:v!==null,formattedValue:w,dropdownOpened:d,dropdownHandlers:p}}const noe={type:"default",size:"sm",valueFormat:"MMMM YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},qC=Pe(e=>{const n=ye("MonthPickerInput",noe,e),{type:t,value:i,defaultValue:r,onChange:a,valueFormat:o,labelSeparator:l,locale:f,classNames:c,styles:h,unstyled:d,closeOnChange:p,size:v,variant:y,dropdownType:w,sortDates:k,minDate:_,maxDate:S,vars:C,valueFormatter:E,presets:O,attributes:T,...M}=n,{resolvedClassNames:N,resolvedStyles:F}=Li({classNames:c,styles:h,props:n}),{calendarProps:R,others:L}=Xy(M),{_value:B,setValue:G,formattedValue:U,dropdownHandlers:H,dropdownOpened:P,onClear:$,shouldClear:q}=TF({type:t,value:i,defaultValue:r,onChange:a,locale:f,format:o,labelSeparator:l,closeOnChange:p,sortDates:k,valueFormatter:E});return b.jsx(Nc,{formattedValue:U,dropdownOpened:P,dropdownHandlers:H,classNames:N,styles:F,unstyled:d,onClear:$,shouldClear:q,value:B,size:v,variant:y,dropdownType:w,...L,attributes:T,type:t,__staticSelector:"MonthPickerInput",children:b.jsx(Gm,{...R,size:v,variant:y,type:t,value:B,defaultDate:R.defaultDate||(Array.isArray(B)?B[0]||xS({maxDate:S,minDate:_}):B||xS({maxDate:S,minDate:_})),onChange:G,locale:f,classNames:N,styles:F,unstyled:d,__staticSelector:"MonthPickerInput",__stopPropagation:w==="popover",minDate:_,maxDate:S,presets:O,attributes:T})})});qC.classes={...Nc.classes,...Gm.classes};qC.displayName="@mantine/dates/MonthPickerInput";const toe={type:"default",size:"sm",valueFormat:"MMMM D, YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},su=Pe(e=>{const n=ye("DatePickerInput",toe,e),{type:t,value:i,defaultValue:r,onChange:a,valueFormat:o,labelSeparator:l,locale:f,classNames:c,styles:h,unstyled:d,closeOnChange:p,size:v,variant:y,dropdownType:w,sortDates:k,minDate:_,maxDate:S,vars:C,defaultDate:E,valueFormatter:O,presets:T,attributes:M,...N}=n,{resolvedClassNames:F,resolvedStyles:R}=Li({classNames:c,styles:h,props:n}),{calendarProps:L,others:B}=Xy(N),{_value:G,setValue:U,formattedValue:H,dropdownHandlers:P,dropdownOpened:$,onClear:q,shouldClear:Y}=TF({type:t,value:i,defaultValue:r,onChange:a,locale:f,format:o,labelSeparator:l,closeOnChange:p,sortDates:k,valueFormatter:O}),D=Array.isArray(G)?G[0]||E:G||E;return b.jsx(Nc,{formattedValue:H,dropdownOpened:$,dropdownHandlers:P,classNames:F,styles:R,unstyled:d,onClear:q,shouldClear:Y,value:G,size:v,variant:y,dropdownType:w,...B,type:t,__staticSelector:"DatePickerInput",attributes:M,children:b.jsx(Ym,{...L,size:v,variant:y,type:t,value:G,defaultDate:D||xS({maxDate:S,minDate:_}),onChange:U,locale:f,classNames:F,styles:R,unstyled:d,__staticSelector:"DatePickerInput",__stopPropagation:w==="popover",minDate:_,maxDate:S,presets:T,attributes:M})})});su.classes={...Nc.classes,...Ym.classes};su.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 ioe={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 kn=(e,n,t,i)=>{const r=A.forwardRef(({color:a="currentColor",size:o=24,stroke:l=2,title:f,className:c,children:h,...d},p)=>A.createElement("svg",{ref:p,...ioe[e],width:o,height:o,className:["tabler-icon",`tabler-icon-${n}`,c].join(" "),strokeWidth:l,stroke:a,...d},[f&&A.createElement("title",{key:"svg-title"},f),...i.map(([v,y])=>A.createElement(v,y)),...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 roe=[["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"}]],aoe=kn("outline","alert-triangle","AlertTriangle",roe);/** + * @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 ooe=[["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"}]],soe=kn("outline","archive-off","ArchiveOff",ooe);/** + * @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 loe=[["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"}]],uoe=kn("outline","archive","Archive",loe);/** + * @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 foe=[["path",{d:"M9 14l-4 -4l4 -4",key:"svg-0"}],["path",{d:"M5 10h11a4 4 0 1 1 0 8h-1",key:"svg-1"}]],coe=kn("outline","arrow-back-up","ArrowBackUp",foe);/** + * @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 doe=[["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"}]],hoe=kn("outline","arrows-horizontal","ArrowsHorizontal",doe);/** + * @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 moe=[["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"}]],jF=kn("outline","calendar-due","CalendarDue",moe);/** + * @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 poe=[["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"}]],voe=kn("outline","calendar-off","CalendarOff",poe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const goe=[["path",{d:"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"}]],yoe=kn("outline","calendar","Calendar",goe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const boe=[["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"}]],woe=kn("outline","chart-bar","ChartBar",boe);/** + * @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 koe=[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]],MF=kn("outline","check","Check",koe);/** + * @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 _oe=[["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"}]],Ih=kn("outline","checkbox","Checkbox",_oe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const xoe=[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]],DF=kn("outline","chevron-down","ChevronDown",xoe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Soe=[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]],RF=kn("outline","chevron-right","ChevronRight",Soe);/** + * @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 Coe=[["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"}]],Hj=kn("outline","clipboard-list","ClipboardList",Coe);/** + * @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 Aoe=[["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"}]],Ooe=kn("outline","clock-hour-4","ClockHour4",Aoe);/** + * @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 Eoe=[["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"}]],Uj=kn("outline","clock","Clock",Eoe);/** + * @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 Toe=[["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"}]],joe=kn("outline","columns-3","Columns3",Toe);/** + * @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 Moe=[["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"}]],Doe=kn("outline","copy","Copy",Moe);/** + * @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 Roe=[["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"}]],PF=kn("outline","dots-vertical","DotsVertical",Roe);/** + * @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 Poe=[["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"}]],sh=kn("outline","edit","Edit",Poe);/** + * @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 Noe=[["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"}]],$oe=kn("outline","external-link","ExternalLink",Noe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const zoe=[["path",{d:"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"}]],NF=kn("outline","grip-vertical","GripVertical",zoe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Loe=[["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"}]],Ioe=kn("outline","history","History",Loe);/** + * @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 Boe=[["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"}]],$F=kn("outline","hourglass","Hourglass",Boe);/** + * @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 Foe=[["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"}]],SS=kn("outline","layout-kanban","LayoutKanban",Foe);/** + * @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 qoe=[["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"}]],Hoe=kn("outline","link","Link",qoe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Uoe=[["path",{d:"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"}]],zF=kn("outline","lock-open","LockOpen",Uoe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Voe=[["path",{d:"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"}]],Gl=kn("outline","lock","Lock",Voe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Woe=[["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"}]],Goe=kn("outline","logout","Logout",Woe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Yoe=[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l16 0",key:"svg-2"}]],Koe=kn("outline","menu-2","Menu2",Yoe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Xoe=[["path",{d:"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"}]],LF=kn("outline","message-chatbot","MessageChatbot",Xoe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Zoe=[["path",{d:"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"}]],Qoe=kn("outline","message","Message",Zoe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Joe=[["path",{d:"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"}]],ese=kn("outline","mood-smile","MoodSmile",Joe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const nse=[["path",{d:"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"}]],HC=kn("outline","palette","Palette",nse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const tse=[["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"}]],ise=kn("outline","paperclip","Paperclip",tse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const rse=[["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"}]],ase=kn("outline","pencil","Pencil",rse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const ose=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]],Bh=kn("outline","plus","Plus",ose);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const sse=[["path",{d:"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"}]],lse=kn("outline","refresh","Refresh",sse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const use=[["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"}]],fse=kn("outline","search","Search",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 cse=[["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"}]],IF=kn("outline","send","Send",cse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const dse=[["path",{d:"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"}]],hse=kn("outline","tag","Tag",dse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const mse=[["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"}]],pse=kn("outline","trash-x","TrashX",mse);/** + * @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:"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"}]],Wf=kn("outline","trash","Trash",vse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const gse=[["path",{d:"M3 17l6 -6l4 4l8 -8",key:"svg-0"}],["path",{d:"M14 7l7 0l0 7",key:"svg-1"}]],Vj=kn("outline","trending-up","TrendingUp",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 yse=[["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"}]],bse=kn("outline","user-circle","UserCircle",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 wse=[["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"}]],kse=kn("outline","user-minus","UserMinus",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 _se=[["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"}]],xse=kn("outline","user-plus","UserPlus",_se);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Sse=[["path",{d:"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"}]],Cse=kn("outline","user-square","UserSquare",Sse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Ase=[["path",{d:"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"}]],Ose=kn("outline","user","User",Ase);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Ese=[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]],lh=kn("outline","x","X",Ese);function BF({initial:e,submitLabel:n="Guardar",users:t=[],requesterOptions:i=[],tagOptions:r=[],onSubmit:a,onCancel:o}){const[l,f]=A.useState((e==null?void 0:e.requester)??""),[c,h]=A.useState((e==null?void 0:e.title)??""),[d,p]=A.useState((e==null?void 0:e.description)??""),[v,y]=A.useState((e==null?void 0:e.assignee_id)??null),[w,k]=A.useState((e==null?void 0:e.tags)??[]),_=async E=>{E==null||E.preventDefault();const O=c.trim();O&&await a({requester:l.trim(),title:O,description:d,assignee_id:v,tags:w})},S=E=>{E.key==="Enter"&&!E.shiftKey&&(E.preventDefault(),_())},C=E=>{E.key==="Enter"&&(E.ctrlKey||E.metaKey)&&(E.preventDefault(),_())};return b.jsx("form",{onSubmit:_,children:b.jsxs(mt,{gap:"sm",children:[b.jsx(Hf,{label:"Tarea",value:c,onChange:E=>h(E.currentTarget.value),tabIndex:1,required:!0,autoComplete:"off","data-autofocus":!0,autosize:!0,minRows:1,maxRows:4,onKeyDown:E=>{E.key==="Enter"&&!E.shiftKey&&(E.preventDefault(),_())}}),b.jsx(uy,{label:"Solicitante",value:l,onChange:f,data:i,tabIndex:2,autoComplete:"off",onKeyDown:S,placeholder:"Empieza a escribir y elige uno existente",limit:10}),b.jsx(Hf,{label:"Descripcion",value:d,onChange:E=>p(E.currentTarget.value),tabIndex:3,autosize:!0,minRows:3,maxRows:8,onKeyDown:C,description:"Ctrl+Enter para guardar"}),b.jsx(Xo,{label:"Asignar a",placeholder:"Sin asignar",value:v,onChange:E=>y(E),data:t.map(E=>({value:E.id,label:E.display_name||E.username})),clearable:!0,searchable:!0,tabIndex:4}),b.jsx(SC,{label:"Tags",value:w,onChange:k,data:r,clearable:!0,tabIndex:5,placeholder:"Enter para añadir; sugiere existentes",splitChars:[","," "]}),b.jsxs(hn,{justify:"flex-end",gap:"xs",mt:"xs",children:[b.jsx(qt,{variant:"subtle",color:"gray",tabIndex:7,type:"button",onClick:o,children:"Cancelar"}),b.jsx(qt,{tabIndex:6,type:"submit",disabled:!c.trim(),children:n})]})]})})}function Tse(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 UC=new Set(["blue","cyan","teal","green","lime","yellow","orange","red","pink","grape","violet","indigo","gray","dark"]);function VC(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)}function FF(e){return e?VC(e)?`color-mix(in srgb, ${e} 18%, var(--mantine-color-dark-6))`:UC.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 WC(e){return e?VC(e)?`color-mix(in srgb, ${e} 30%, var(--mantine-color-dark-4))`:UC.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 jse(e){return e?VC(e)?e:UC.has(e)?`var(--mantine-color-${e}-7)`:"var(--mantine-color-dark-3)":"var(--mantine-color-dark-3)"}const qF=[{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"}],Mse=qF,Dse=["blue","cyan","teal","green","lime","yellow","orange","red","pink","grape","violet","indigo"];function CS(e){return Tse(e,Dse)}const AS=6e4,uh=60*AS,Ef=24*uh,Tv=7*Ef,Ek=30*Ef;function dr(e){if(!Number.isFinite(e)||e<0)return"0m";if(e[S.id,S])),y=A.useCallback(async()=>{try{const S=await fie(e);a(S),i==null||i(S)}catch(S){qn.show({color:"red",message:S.message})}finally{l(!1)}},[e,i]);A.useEffect(()=>{y()},[y]),A.useEffect(()=>{p.current&&p.current.scrollTo({top:p.current.scrollHeight,behavior:"smooth"})},[r.length]);const w=async()=>{const S=f.trim();if(!(!S||h)){d(!0);try{const C=await cie(e,S),E=[...r,C];a(E),i==null||i(E),c("")}catch(C){qn.show({color:"red",message:C.message})}finally{d(!1)}}},k=async S=>{try{await die(e,S);const C=r.filter(E=>E.id!==S);a(C),i==null||i(C)}catch(C){qn.show({color:"red",message:C.message})}},_=S=>{S.key==="Enter"&&!S.shiftKey&&(S.preventDefault(),w())};return b.jsxs(mt,{gap:"xs",style:{height:"100%",minHeight:0},children:[b.jsx(Na,{viewportRef:p,style:{flex:1,minHeight:200},type:"auto",offsetScrollbars:!0,children:o?b.jsx(hn,{justify:"center",p:"md",children:b.jsx(zi,{size:"sm"})}):r.length===0?b.jsx(Qe,{size:"sm",c:"dimmed",ta:"center",p:"md",children:"Sin mensajes aun. Escribe el primero."}):b.jsx(mt,{gap:6,p:4,children:r.map(S=>{const C=S.author_id?v.get(S.author_id):null,E=S.author_id&&S.author_id===t,O=C?C.display_name||C.username:"Anonimo";return b.jsx(Wt,{withBorder:!0,p:"xs",radius:"sm",bg:E?"var(--mantine-color-blue-light)":void 0,children:b.jsxs(hn,{gap:6,wrap:"nowrap",align:"flex-start",children:[b.jsx(tl,{size:22,radius:"xl",color:(C==null?void 0:C.color)||CS(O),children:O.slice(0,2).toUpperCase()}),b.jsxs(ve,{style:{flex:1,minWidth:0},children:[b.jsxs(hn,{gap:6,wrap:"nowrap",justify:"space-between",children:[b.jsxs(hn,{gap:6,wrap:"nowrap",children:[b.jsx(Qe,{size:"xs",fw:600,children:O}),b.jsx(Qe,{size:"xs",c:"dimmed",children:OS(S.created_at)})]}),E&&b.jsx(Ai,{label:"Borrar",withArrow:!0,children:b.jsx($t,{size:"xs",variant:"subtle",color:"red",onClick:()=>k(S.id),children:b.jsx(Wf,{size:12})})})]}),b.jsx(Qe,{size:"sm",style:{whiteSpace:"pre-wrap",wordBreak:"break-word"},children:S.body})]})]})},S.id)})})}),b.jsxs(hn,{gap:"xs",align:"flex-end",children:[b.jsx(Hf,{value:f,onChange:S=>c(S.currentTarget.value),onKeyDown:_,placeholder:"Escribe un mensaje (Enter = enviar, Shift+Enter = salto)",autosize:!0,minRows:1,maxRows:6,style:{flex:1},disabled:h}),b.jsx(Ai,{label:"Enviar",withArrow:!0,children:b.jsx($t,{size:"lg",variant:"filled",color:"blue",onClick:w,disabled:!f.trim()||h,"aria-label":"Enviar",children:b.jsx(IF,{size:16})})})]})]})}const Wj=/(https?:\/\/[^\s<>()"']+)/gi;function Tk(e,n){if(!n)return[];const t=[],i=new Set;let r;for(Wj.lastIndex=0;(r=Wj.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 Pse(e){try{return new URL(e).hostname}catch{return e}}function Nse({card:e,messages:n}){const t=A.useMemo(()=>{const a=[...Tk("title",e.title),...Tk("description",e.description),...n.flatMap(l=>Tk("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 b.jsxs(mt,{gap:"xs",p:"md",align:"center",justify:"center",style:{minHeight:200},children:[b.jsx(Qe,{size:"sm",c:"dimmed",children:"Sin enlaces detectados"}),b.jsx(Qe,{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 b.jsx(mt,{gap:6,p:4,children:t.map(a=>b.jsx(Wt,{withBorder:!0,p:"xs",radius:"sm",children:b.jsxs(hn,{gap:"xs",wrap:"nowrap",justify:"space-between",align:"flex-start",children:[b.jsxs(ve,{style:{flex:1,minWidth:0},children:[b.jsx(iy,{href:a.url,target:"_blank",rel:"noopener noreferrer",size:"sm",style:{wordBreak:"break-all"},children:b.jsxs(hn,{gap:4,wrap:"nowrap",align:"center",children:[b.jsx($oe,{size:12}),b.jsx("span",{children:Pse(a.url)})]})}),b.jsx(Qe,{size:"xs",c:"dimmed",style:{wordBreak:"break-all"},children:a.url})]}),b.jsx(ti,{size:"xs",variant:"light",color:i(a.source),children:r(a.source)})]})},a.url))})}function $se({card:e,users:n,currentUserId:t,requesterOptions:i,tagOptions:r,onSubmit:a,onCancel:o}){const[l,f]=A.useState([]),[c,h]=A.useState(e),d=async p=>{h(v=>({...v,title:p.title,description:p.description,requester:p.requester,tags:p.tags,assignee_id:p.assignee_id})),await a(p)};return b.jsxs(hn,{align:"stretch",gap:"md",wrap:"nowrap",style:{minHeight:460},children:[b.jsx(ve,{style:{flex:"1 1 0",minWidth:320},children:b.jsx(BF,{users:n,requesterOptions:i,tagOptions:r,initial:{requester:c.requester,title:c.title,description:c.description,assignee_id:c.assignee_id,tags:c.tags||[]},submitLabel:"Guardar",onSubmit:d,onCancel:o})}),b.jsx(zm,{orientation:"vertical"}),b.jsx(ve,{style:{flex:"1 1 0",minWidth:320,display:"flex",flexDirection:"column"},children:b.jsxs(yi,{defaultValue:"chat",keepMounted:!1,style:{display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[b.jsxs(yi.List,{children:[b.jsx(yi.Tab,{value:"chat",leftSection:b.jsx(Qoe,{size:14}),children:"Chat"}),b.jsx(yi.Tab,{value:"links",leftSection:b.jsx(Hoe,{size:14}),children:"Enlaces"}),b.jsx(yi.Tab,{value:"files",leftSection:b.jsx(ise,{size:14}),disabled:!0,children:"Archivos"})]}),b.jsxs(ve,{pt:"xs",style:{flex:1,minHeight:0,display:"flex",flexDirection:"column"},children:[b.jsx(yi.Panel,{value:"chat",style:{flex:1,minHeight:0,display:"flex"},children:b.jsx(ve,{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",width:"100%"},children:b.jsx(Rse,{cardId:c.id,users:n,currentUserId:t,onMessagesChange:f})})}),b.jsx(yi.Panel,{value:"links",children:b.jsx(Nse,{card:c,messages:l})}),b.jsx(yi.Panel,{value:"files",children:b.jsx(Qe,{size:"sm",c:"dimmed",ta:"center",p:"md",children:"Proximamente: adjuntos de archivos."})})]})]})})]})}function zse(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Lse=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ise=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Bse={};function Gj(e,n){return(Bse.jsx?Ise:Lse).test(e)}const Fse=/[ \t\n\f\r]/g;function qse(e){return typeof e=="object"?e.type==="text"?Yj(e.value):!1:Yj(e)}function Yj(e){return e.replace(Fse,"")===""}class Km{constructor(n,t,i){this.normal=t,this.property=n,i&&(this.space=i)}}Km.prototype.normal={};Km.prototype.property={};Km.prototype.space=void 0;function HF(e,n){const t={},i={};for(const r of e)Object.assign(t,r.property),Object.assign(i,r.normal);return new Km(t,i,n)}function ES(e){return e.toLowerCase()}class gr{constructor(n,t){this.attribute=t,this.property=n}}gr.prototype.attribute="";gr.prototype.booleanish=!1;gr.prototype.boolean=!1;gr.prototype.commaOrSpaceSeparated=!1;gr.prototype.commaSeparated=!1;gr.prototype.defined=!1;gr.prototype.mustUseProperty=!1;gr.prototype.number=!1;gr.prototype.overloadedBoolean=!1;gr.prototype.property="";gr.prototype.spaceSeparated=!1;gr.prototype.space=void 0;let Hse=0;const $n=Su(),fi=Su(),TS=Su(),Ie=Su(),jt=Su(),Nf=Su(),Dr=Su();function Su(){return 2**++Hse}const jS=Object.freeze(Object.defineProperty({__proto__:null,boolean:$n,booleanish:fi,commaOrSpaceSeparated:Dr,commaSeparated:Nf,number:Ie,overloadedBoolean:TS,spaceSeparated:jt},Symbol.toStringTag,{value:"Module"})),jk=Object.keys(jS);class GC extends gr{constructor(n,t,i,r){let a=-1;if(super(n,t),Kj(this,"space",r),typeof i=="number")for(;++a4&&t.slice(0,4)==="data"&&Yse.test(n)){if(n.charAt(4)==="-"){const a=n.slice(5).replace(Xj,Zse);i="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=n.slice(4);if(!Xj.test(a)){let o=a.replace(Gse,Xse);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}r=GC}return new r(i,n)}function Xse(e){return"-"+e.toLowerCase()}function Zse(e){return e.charAt(1).toUpperCase()}const Qse=HF([UF,Use,GF,YF,KF],"html"),YC=HF([UF,Vse,GF,YF,KF],"svg");function Jse(e){return e.join(" ").trim()}var bf={},Mk,Zj;function ele(){if(Zj)return Mk;Zj=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,r=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g,f=` +`,c="/",h="*",d="",p="comment",v="declaration";function y(k,_){if(typeof k!="string")throw new TypeError("First argument must be a string");if(!k)return[];_=_||{};var S=1,C=1;function E(U){var H=U.match(n);H&&(S+=H.length);var P=U.lastIndexOf(f);C=~P?U.length-P:C+U.length}function O(){var U={line:S,column:C};return function(H){return H.position=new T(U),F(),H}}function T(U){this.start=U,this.end={line:S,column:C},this.source=_.source}T.prototype.content=k;function M(U){var H=new Error(_.source+":"+S+":"+C+": "+U);if(H.reason=U,H.filename=_.source,H.line=S,H.column=C,H.source=k,!_.silent)throw H}function N(U){var H=U.exec(k);if(H){var P=H[0];return E(P),k=k.slice(P.length),H}}function F(){N(t)}function R(U){var H;for(U=U||[];H=L();)H!==!1&&U.push(H);return U}function L(){var U=O();if(!(c!=k.charAt(0)||h!=k.charAt(1))){for(var H=2;d!=k.charAt(H)&&(h!=k.charAt(H)||c!=k.charAt(H+1));)++H;if(H+=2,d===k.charAt(H-1))return M("End of comment missing");var P=k.slice(2,H-2);return C+=2,E(P),k=k.slice(H),C+=2,U({type:p,comment:P})}}function B(){var U=O(),H=N(i);if(H){if(L(),!N(r))return M("property missing ':'");var P=N(a),$=U({type:v,property:w(H[0].replace(e,d)),value:P?w(P[0].replace(e,d)):d});return N(o),$}}function G(){var U=[];R(U);for(var H;H=B();)H!==!1&&(U.push(H),R(U));return U}return F(),G()}function w(k){return k?k.replace(l,d):d}return Mk=y,Mk}var Qj;function nle(){if(Qj)return bf;Qj=1;var e=bf&&bf.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(bf,"__esModule",{value:!0}),bf.default=t;const n=e(ele());function t(i,r){let a=null;if(!i||typeof i!="string")return a;const o=(0,n.default)(i),l=typeof r=="function";return o.forEach(f=>{if(f.type!=="declaration")return;const{property:c,value:h}=f;l?r(c,h,f):h&&(a=a||{},a[c]=h)}),a}return bf}var qd={},Jj;function tle(){if(Jj)return qd;Jj=1,Object.defineProperty(qd,"__esModule",{value:!0}),qd.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,r=/^-(ms)-/,a=function(c){return!c||t.test(c)||e.test(c)},o=function(c,h){return h.toUpperCase()},l=function(c,h){return"".concat(h,"-")},f=function(c,h){return h===void 0&&(h={}),a(c)?c:(c=c.toLowerCase(),h.reactCompat?c=c.replace(r,l):c=c.replace(i,l),c.replace(n,o))};return qd.camelCase=f,qd}var Hd,eM;function ile(){if(eM)return Hd;eM=1;var e=Hd&&Hd.__importDefault||function(r){return r&&r.__esModule?r:{default:r}},n=e(nle()),t=tle();function i(r,a){var o={};return!r||typeof r!="string"||(0,n.default)(r,function(l,f){l&&f&&(o[(0,t.camelCase)(l,a)]=f)}),o}return i.default=i,Hd=i,Hd}var rle=ile();const ale=st(rle),XF=ZF("end"),KC=ZF("start");function ZF(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 ole(e){const n=KC(e),t=XF(e);if(n&&t)return{start:n,end:t}}function bh(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?nM(e.position):"start"in e||"end"in e?nM(e):"line"in e||"column"in e?MS(e):""}function MS(e){return tM(e&&e.line)+":"+tM(e&&e.column)}function nM(e){return MS(e&&e.start)+"-"+MS(e&&e.end)}function tM(e){return e&&typeof e=="number"?e:1}class Xi extends Error{constructor(n,t,i){super(),typeof t=="string"&&(i=t,t=void 0);let r="",a={},o=!1;if(t&&("line"in t&&"column"in t?a={place:t}:"start"in t&&"end"in t?a={place:t}:"type"in t?a={ancestors:[t],place:t.position}:a={...t}),typeof n=="string"?r=n:!a.cause&&n&&(o=!0,r=n.message,a.cause=n),!a.ruleId&&!a.source&&typeof i=="string"){const f=i.indexOf(":");f===-1?a.ruleId=i:(a.source=i.slice(0,f),a.ruleId=i.slice(f+1))}if(!a.place&&a.ancestors&&a.ancestors){const f=a.ancestors[a.ancestors.length-1];f&&(a.place=f.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=l?l.line:void 0,this.name=bh(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}}Xi.prototype.file="";Xi.prototype.name="";Xi.prototype.reason="";Xi.prototype.message="";Xi.prototype.stack="";Xi.prototype.column=void 0;Xi.prototype.line=void 0;Xi.prototype.ancestors=void 0;Xi.prototype.cause=void 0;Xi.prototype.fatal=void 0;Xi.prototype.place=void 0;Xi.prototype.ruleId=void 0;Xi.prototype.source=void 0;const XC={}.hasOwnProperty,sle=new Map,lle=/[A-Z]/g,ule=new Set(["table","tbody","thead","tfoot","tr"]),fle=new Set(["td","th"]),QF="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function cle(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=ble(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=yle(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"?YC:Qse,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},a=JF(r,e,void 0);return a&&typeof a!="string"?a:r.create(e,r.Fragment,{children:a||void 0},void 0)}function JF(e,n,t){if(n.type==="element")return dle(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return hle(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return ple(e,n,t);if(n.type==="mdxjsEsm")return mle(e,n);if(n.type==="root")return vle(e,n,t);if(n.type==="text")return gle(e,n)}function dle(e,n,t){const i=e.schema;let r=i;n.tagName.toLowerCase()==="svg"&&i.space==="html"&&(r=YC,e.schema=r),e.ancestors.push(n);const a=nq(e,n.tagName,!1),o=wle(e,n);let l=QC(e,n);return ule.has(n.tagName)&&(l=l.filter(function(f){return typeof f=="string"?!qse(f):!0})),eq(e,o,a,n),ZC(o,l),e.ancestors.pop(),e.schema=i,e.create(n,a,o,t)}function hle(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)}Fh(e,n.position)}function mle(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Fh(e,n.position)}function ple(e,n,t){const i=e.schema;let r=i;n.name==="svg"&&i.space==="html"&&(r=YC,e.schema=r),e.ancestors.push(n);const a=n.name===null?e.Fragment:nq(e,n.name,!0),o=kle(e,n),l=QC(e,n);return eq(e,o,a,n),ZC(o,l),e.ancestors.pop(),e.schema=i,e.create(n,a,o,t)}function vle(e,n,t){const i={};return ZC(i,QC(e,n)),e.create(n,e.Fragment,i,t)}function gle(e,n){return n.value}function eq(e,n,t,i){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=i)}function ZC(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function yle(e,n,t){return i;function i(r,a,o,l){const c=Array.isArray(o.children)?t:n;return l?c(a,o,l):c(a,o)}}function ble(e,n){return t;function t(i,r,a,o){const l=Array.isArray(a.children),f=KC(i);return n(r,a,o,l,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function wle(e,n){const t={};let i,r;for(r in n.properties)if(r!=="children"&&XC.call(n.properties,r)){const a=_le(e,r,n.properties[r]);if(a){const[o,l]=a;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&fle.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 kle(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 Fh(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 Fh(e,n.position);else a=i.value===null?!0:i.value;t[r]=a}return t}function QC(e,n){const t=[];let i=-1;const r=e.passKeys?new Map:sle;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?(Ir(e,e.length,0,n),e):n}const aM={}.hasOwnProperty;function iq(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 ja(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const er=fl(/[A-Za-z]/),Yi=fl(/[\dA-Za-z]/),Mle=fl(/[#-'*+\--9=?A-Z^-~]/);function jg(e){return e!==null&&(e<32||e===127)}const DS=fl(/\d/),Dle=fl(/[\dA-Fa-f]/),Rle=fl(/[!-/:-@[-`{-~]/);function vn(e){return e!==null&&e<-2}function Ot(e){return e!==null&&(e<0||e===32)}function Yn(e){return e===-2||e===-1||e===32}const Zy=fl(new RegExp("\\p{P}|\\p{S}","u")),lu=fl(/\s/);function fl(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Lc(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 Jn(e,n,t,i){const r=i?i-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(f){return Yn(f)?(e.enter(t),l(f)):n(f)}function l(f){return Yn(f)&&a++o))return;const M=n.events.length;let N=M,F,R;for(;N--;)if(n.events[N][0]==="exit"&&n.events[N][1].type==="chunkFlow"){if(F){R=n.events[N][1].end;break}F=!0}for(_(i),T=M;TC;){const O=t[E];n.containerState=O[1],O[0].exit.call(n,e)}t.length=C}function S(){r.write([null]),a=void 0,r=void 0,n.containerState._closeFlow=void 0}}function Lle(e,n,t){return Jn(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Gf(e){if(e===null||Ot(e)||lu(e))return 1;if(Zy(e))return 2}function Qy(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};sM(d,-f),sM(p,f),o={type:f>1?"strongSequence":"emphasisSequence",start:d,end:{...e[i][1].end}},l={type:f>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:p},a={type:f>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[t][1].start}},r={type:f>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[i][1].end={...o.start},e[t][1].start={...l.end},c=[],e[i][1].end.offset-e[i][1].start.offset&&(c=ia(c,[["enter",e[i][1],n],["exit",e[i][1],n]])),c=ia(c,[["enter",r,n],["enter",o,n],["exit",o,n],["enter",a,n]]),c=ia(c,Qy(n.parser.constructs.insideSpan.null,e.slice(i+1,t),n)),c=ia(c,[["exit",a,n],["enter",l,n],["exit",l,n],["exit",r,n]]),e[t][1].end.offset-e[t][1].start.offset?(h=2,c=ia(c,[["enter",e[t][1],n],["exit",e[t][1],n]])):h=0,Ir(e,i-1,t-i+3,c),t=i+c.length-h-2;break}}for(t=-1;++t0&&Yn(T)?Jn(e,S,"linePrefix",a+1)(T):S(T)}function S(T){return T===null||vn(T)?e.check(lM,w,E)(T):(e.enter("codeFlowValue"),C(T))}function C(T){return T===null||vn(T)?(e.exit("codeFlowValue"),S(T)):(e.consume(T),C)}function E(T){return e.exit("codeFenced"),n(T)}function O(T,M,N){let F=0;return R;function R(H){return T.enter("lineEnding"),T.consume(H),T.exit("lineEnding"),L}function L(H){return T.enter("codeFencedFence"),Yn(H)?Jn(T,B,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):B(H)}function B(H){return H===l?(T.enter("codeFencedFenceSequence"),G(H)):N(H)}function G(H){return H===l?(F++,T.consume(H),G):F>=o?(T.exit("codeFencedFenceSequence"),Yn(H)?Jn(T,U,"whitespace")(H):U(H)):N(H)}function U(H){return H===null||vn(H)?(T.exit("codeFencedFence"),M(H)):N(H)}}}function Xle(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 Rk={name:"codeIndented",tokenize:Qle},Zle={partial:!0,tokenize:Jle};function Qle(e,n,t){const i=this;return r;function r(c){return e.enter("codeIndented"),Jn(e,a,"linePrefix",5)(c)}function a(c){const h=i.events[i.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?o(c):t(c)}function o(c){return c===null?f(c):vn(c)?e.attempt(Zle,o,f)(c):(e.enter("codeFlowValue"),l(c))}function l(c){return c===null||vn(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),l)}function f(c){return e.exit("codeIndented"),n(c)}}function Jle(e,n,t){const i=this;return r;function r(o){return i.parser.lazy[i.now().line]?t(o):vn(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r):Jn(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):vn(o)?r(o):t(o)}}const eue={name:"codeText",previous:tue,resolve:nue,tokenize:iue};function nue(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&&Ud(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),Ud(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Ud(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 uq(e,n,t,i,r,a,o,l,f){const c=f||Number.POSITIVE_INFINITY;let h=0;return d;function d(_){return _===60?(e.enter(i),e.enter(r),e.enter(a),e.consume(_),e.exit(a),p):_===null||_===32||_===41||jg(_)?t(_):(e.enter(i),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),w(_))}function p(_){return _===62?(e.enter(a),e.consume(_),e.exit(a),e.exit(r),e.exit(i),n):(e.enter(l),e.enter("chunkString",{contentType:"string"}),v(_))}function v(_){return _===62?(e.exit("chunkString"),e.exit(l),p(_)):_===null||_===60||vn(_)?t(_):(e.consume(_),_===92?y:v)}function y(_){return _===60||_===62||_===92?(e.consume(_),v):v(_)}function w(_){return!h&&(_===null||_===41||Ot(_))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(i),n(_)):h999||v===null||v===91||v===93&&!f||v===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?t(v):v===93?(e.exit(a),e.enter(r),e.consume(v),e.exit(r),e.exit(i),n):vn(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),d(v))}function d(v){return v===null||v===91||v===93||vn(v)||l++>999?(e.exit("chunkString"),h(v)):(e.consume(v),f||(f=!Yn(v)),v===92?p:d)}function p(v){return v===91||v===92||v===93?(e.consume(v),l++,d):d(v)}}function cq(e,n,t,i,r,a){let o;return l;function l(p){return p===34||p===39||p===40?(e.enter(i),e.enter(r),e.consume(p),e.exit(r),o=p===40?41:p,f):t(p)}function f(p){return p===o?(e.enter(r),e.consume(p),e.exit(r),e.exit(i),n):(e.enter(a),c(p))}function c(p){return p===o?(e.exit(a),f(o)):p===null?t(p):vn(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Jn(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===o||p===null||vn(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?d:h)}function d(p){return p===o||p===92?(e.consume(p),h):h(p)}}function wh(e,n){let t;return i;function i(r){return vn(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t=!0,i):Yn(r)?Jn(e,i,t?"linePrefix":"lineSuffix")(r):n(r)}}const cue={name:"definition",tokenize:hue},due={partial:!0,tokenize:mue};function hue(e,n,t){const i=this;let r;return a;function a(v){return e.enter("definition"),o(v)}function o(v){return fq.call(i,e,l,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function l(v){return r=ja(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),f):t(v)}function f(v){return Ot(v)?wh(e,c)(v):c(v)}function c(v){return uq(e,h,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function h(v){return e.attempt(due,d,d)(v)}function d(v){return Yn(v)?Jn(e,p,"whitespace")(v):p(v)}function p(v){return v===null||vn(v)?(e.exit("definition"),i.parser.defined.push(r),n(v)):t(v)}}function mue(e,n,t){return i;function i(l){return Ot(l)?wh(e,r)(l):t(l)}function r(l){return cq(e,a,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return Yn(l)?Jn(e,o,"whitespace")(l):o(l)}function o(l){return l===null||vn(l)?n(l):t(l)}}const pue={name:"hardBreakEscape",tokenize:vue};function vue(e,n,t){return i;function i(a){return e.enter("hardBreakEscape"),e.consume(a),r}function r(a){return vn(a)?(e.exit("hardBreakEscape"),n(a)):t(a)}}const gue={name:"headingAtx",resolve:yue,tokenize:bue};function yue(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"},Ir(e,i,t-i+1,[["enter",r,n],["enter",a,n],["exit",a,n],["exit",r,n]])),e}function bue(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||Ot(h)?(e.exit("atxHeadingSequence"),l(h)):t(h)}function l(h){return h===35?(e.enter("atxHeadingSequence"),f(h)):h===null||vn(h)?(e.exit("atxHeading"),n(h)):Yn(h)?Jn(e,l,"whitespace")(h):(e.enter("atxHeadingText"),c(h))}function f(h){return h===35?(e.consume(h),f):(e.exit("atxHeadingSequence"),l(h))}function c(h){return h===null||h===35||Ot(h)?(e.exit("atxHeadingText"),l(h)):(e.consume(h),c)}}const wue=["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"],fM=["pre","script","style","textarea"],kue={concrete:!0,name:"htmlFlow",resolveTo:Sue,tokenize:Cue},_ue={partial:!0,tokenize:Oue},xue={partial:!0,tokenize:Aue};function Sue(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 Cue(e,n,t){const i=this;let r,a,o,l,f;return c;function c(z){return h(z)}function h(z){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(z),d}function d(z){return z===33?(e.consume(z),p):z===47?(e.consume(z),a=!0,w):z===63?(e.consume(z),r=3,i.interrupt?n:D):er(z)?(e.consume(z),o=String.fromCharCode(z),k):t(z)}function p(z){return z===45?(e.consume(z),r=2,v):z===91?(e.consume(z),r=5,l=0,y):er(z)?(e.consume(z),r=4,i.interrupt?n:D):t(z)}function v(z){return z===45?(e.consume(z),i.interrupt?n:D):t(z)}function y(z){const X="CDATA[";return z===X.charCodeAt(l++)?(e.consume(z),l===X.length?i.interrupt?n:B:y):t(z)}function w(z){return er(z)?(e.consume(z),o=String.fromCharCode(z),k):t(z)}function k(z){if(z===null||z===47||z===62||Ot(z)){const X=z===47,ee=o.toLowerCase();return!X&&!a&&fM.includes(ee)?(r=1,i.interrupt?n(z):B(z)):wue.includes(o.toLowerCase())?(r=6,X?(e.consume(z),_):i.interrupt?n(z):B(z)):(r=7,i.interrupt&&!i.parser.lazy[i.now().line]?t(z):a?S(z):C(z))}return z===45||Yi(z)?(e.consume(z),o+=String.fromCharCode(z),k):t(z)}function _(z){return z===62?(e.consume(z),i.interrupt?n:B):t(z)}function S(z){return Yn(z)?(e.consume(z),S):R(z)}function C(z){return z===47?(e.consume(z),R):z===58||z===95||er(z)?(e.consume(z),E):Yn(z)?(e.consume(z),C):R(z)}function E(z){return z===45||z===46||z===58||z===95||Yi(z)?(e.consume(z),E):O(z)}function O(z){return z===61?(e.consume(z),T):Yn(z)?(e.consume(z),O):C(z)}function T(z){return z===null||z===60||z===61||z===62||z===96?t(z):z===34||z===39?(e.consume(z),f=z,M):Yn(z)?(e.consume(z),T):N(z)}function M(z){return z===f?(e.consume(z),f=null,F):z===null||vn(z)?t(z):(e.consume(z),M)}function N(z){return z===null||z===34||z===39||z===47||z===60||z===61||z===62||z===96||Ot(z)?O(z):(e.consume(z),N)}function F(z){return z===47||z===62||Yn(z)?C(z):t(z)}function R(z){return z===62?(e.consume(z),L):t(z)}function L(z){return z===null||vn(z)?B(z):Yn(z)?(e.consume(z),L):t(z)}function B(z){return z===45&&r===2?(e.consume(z),P):z===60&&r===1?(e.consume(z),$):z===62&&r===4?(e.consume(z),W):z===63&&r===3?(e.consume(z),D):z===93&&r===5?(e.consume(z),Y):vn(z)&&(r===6||r===7)?(e.exit("htmlFlowData"),e.check(_ue,V,G)(z)):z===null||vn(z)?(e.exit("htmlFlowData"),G(z)):(e.consume(z),B)}function G(z){return e.check(xue,U,V)(z)}function U(z){return e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),H}function H(z){return z===null||vn(z)?G(z):(e.enter("htmlFlowData"),B(z))}function P(z){return z===45?(e.consume(z),D):B(z)}function $(z){return z===47?(e.consume(z),o="",q):B(z)}function q(z){if(z===62){const X=o.toLowerCase();return fM.includes(X)?(e.consume(z),W):B(z)}return er(z)&&o.length<8?(e.consume(z),o+=String.fromCharCode(z),q):B(z)}function Y(z){return z===93?(e.consume(z),D):B(z)}function D(z){return z===62?(e.consume(z),W):z===45&&r===2?(e.consume(z),D):B(z)}function W(z){return z===null||vn(z)?(e.exit("htmlFlowData"),V(z)):(e.consume(z),W)}function V(z){return e.exit("htmlFlow"),n(z)}}function Aue(e,n,t){const i=this;return r;function r(o){return vn(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 Oue(e,n,t){return i;function i(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Xm,n,t)}}const Eue={name:"htmlText",tokenize:Tue};function Tue(e,n,t){const i=this;let r,a,o;return l;function l(D){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(D),f}function f(D){return D===33?(e.consume(D),c):D===47?(e.consume(D),O):D===63?(e.consume(D),C):er(D)?(e.consume(D),N):t(D)}function c(D){return D===45?(e.consume(D),h):D===91?(e.consume(D),a=0,y):er(D)?(e.consume(D),S):t(D)}function h(D){return D===45?(e.consume(D),v):t(D)}function d(D){return D===null?t(D):D===45?(e.consume(D),p):vn(D)?(o=d,$(D)):(e.consume(D),d)}function p(D){return D===45?(e.consume(D),v):d(D)}function v(D){return D===62?P(D):D===45?p(D):d(D)}function y(D){const W="CDATA[";return D===W.charCodeAt(a++)?(e.consume(D),a===W.length?w:y):t(D)}function w(D){return D===null?t(D):D===93?(e.consume(D),k):vn(D)?(o=w,$(D)):(e.consume(D),w)}function k(D){return D===93?(e.consume(D),_):w(D)}function _(D){return D===62?P(D):D===93?(e.consume(D),_):w(D)}function S(D){return D===null||D===62?P(D):vn(D)?(o=S,$(D)):(e.consume(D),S)}function C(D){return D===null?t(D):D===63?(e.consume(D),E):vn(D)?(o=C,$(D)):(e.consume(D),C)}function E(D){return D===62?P(D):C(D)}function O(D){return er(D)?(e.consume(D),T):t(D)}function T(D){return D===45||Yi(D)?(e.consume(D),T):M(D)}function M(D){return vn(D)?(o=M,$(D)):Yn(D)?(e.consume(D),M):P(D)}function N(D){return D===45||Yi(D)?(e.consume(D),N):D===47||D===62||Ot(D)?F(D):t(D)}function F(D){return D===47?(e.consume(D),P):D===58||D===95||er(D)?(e.consume(D),R):vn(D)?(o=F,$(D)):Yn(D)?(e.consume(D),F):P(D)}function R(D){return D===45||D===46||D===58||D===95||Yi(D)?(e.consume(D),R):L(D)}function L(D){return D===61?(e.consume(D),B):vn(D)?(o=L,$(D)):Yn(D)?(e.consume(D),L):F(D)}function B(D){return D===null||D===60||D===61||D===62||D===96?t(D):D===34||D===39?(e.consume(D),r=D,G):vn(D)?(o=B,$(D)):Yn(D)?(e.consume(D),B):(e.consume(D),U)}function G(D){return D===r?(e.consume(D),r=void 0,H):D===null?t(D):vn(D)?(o=G,$(D)):(e.consume(D),G)}function U(D){return D===null||D===34||D===39||D===60||D===61||D===96?t(D):D===47||D===62||Ot(D)?F(D):(e.consume(D),U)}function H(D){return D===47||D===62||Ot(D)?F(D):t(D)}function P(D){return D===62?(e.consume(D),e.exit("htmlTextData"),e.exit("htmlText"),n):t(D)}function $(D){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),q}function q(D){return Yn(D)?Jn(e,Y,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):Y(D)}function Y(D){return e.enter("htmlTextData"),o(D)}}const n9={name:"labelEnd",resolveAll:Rue,resolveTo:Pue,tokenize:Nue},jue={tokenize:$ue},Mue={tokenize:zue},Due={tokenize:Lue};function Rue(e){let n=-1;const t=[];for(;++n=3&&(c===null||vn(c))?(e.exit("thematicBreak"),n(c)):t(c)}function f(c){return c===r?(e.consume(c),i++,f):(e.exit("thematicBreakSequence"),Yn(c)?Jn(e,l,"whitespace")(c):l(c))}}const cr={continuation:{tokenize:Yue},exit:Xue,name:"list",tokenize:Gue},Vue={partial:!0,tokenize:Zue},Wue={partial:!0,tokenize:Kue};function Gue(e,n,t){const i=this,r=i.events[i.events.length-1];let a=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0,o=0;return l;function l(v){const y=i.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!i.containerState.marker||v===i.containerState.marker:DS(v)){if(i.containerState.type||(i.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(lg,t,c)(v):c(v);if(!i.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(v)}return t(v)}function f(v){return DS(v)&&++o<10?(e.consume(v),f):(!i.interrupt||o<2)&&(i.containerState.marker?v===i.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),c(v)):t(v)}function c(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||v,e.check(Xm,i.interrupt?t:h,e.attempt(Vue,p,d))}function h(v){return i.containerState.initialBlankLine=!0,a++,p(v)}function d(v){return Yn(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),p):t(v)}function p(v){return i.containerState.size=a+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(v)}}function Yue(e,n,t){const i=this;return i.containerState._closeFlow=void 0,e.check(Xm,r,a);function r(l){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Jn(e,n,"listItemIndent",i.containerState.size+1)(l)}function a(l){return i.containerState.furtherBlankLines||!Yn(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(Wue,n,o)(l))}function o(l){return i.containerState._closeFlow=!0,i.interrupt=void 0,Jn(e,e.attempt(cr,n,t),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function Kue(e,n,t){const i=this;return Jn(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 Xue(e){e.exit(this.containerState.type)}function Zue(e,n,t){const i=this;return Jn(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!Yn(a)&&o&&o[1].type==="listItemPrefixWhitespace"?n(a):t(a)}}const cM={name:"setextUnderline",resolveTo:Que,tokenize:Jue};function Que(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 Jue(e,n,t){const i=this;let r;return a;function a(c){let h=i.events.length,d;for(;h--;)if(i.events[h][1].type!=="lineEnding"&&i.events[h][1].type!=="linePrefix"&&i.events[h][1].type!=="content"){d=i.events[h][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||d)?(e.enter("setextHeadingLine"),r=c,o(c)):t(c)}function o(c){return e.enter("setextHeadingLineSequence"),l(c)}function l(c){return c===r?(e.consume(c),l):(e.exit("setextHeadingLineSequence"),Yn(c)?Jn(e,f,"lineSuffix")(c):f(c))}function f(c){return c===null||vn(c)?(e.exit("setextHeadingLine"),n(c)):t(c)}}const efe={tokenize:nfe};function nfe(e){const n=this,t=e.attempt(Xm,i,e.attempt(this.parser.constructs.flowInitial,r,Jn(e,e.attempt(this.parser.constructs.flow,r,e.attempt(oue,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 tfe={resolveAll:hq()},ife=dq("string"),rfe=dq("text");function dq(e){return{resolveAll:hq(e==="text"?afe:void 0),tokenize:n};function n(t){const i=this,r=this.parser.constructs[e],a=t.attempt(r,o,l);return o;function o(h){return c(h)?a(h):l(h)}function l(h){if(h===null){t.consume(h);return}return t.enter("data"),t.consume(h),f}function f(h){return c(h)?(t.exit("data"),a(h)):(t.consume(h),f)}function c(h){if(h===null)return!0;const d=r[h];let p=-1;if(d)for(;++p-1){const l=o[0];typeof l=="string"?o[0]=l.slice(i):o.shift()}a>0&&o.push(e[r].slice(0,a))}return o}function yfe(e,n){let t=-1;const i=[];let r;for(;++t0){const fe=ke.tokenStack[ke.tokenStack.length-1];(fe[1]||hM).call(ke,void 0,fe[0])}for(se.position={start:$s(ie.length>0?ie[0][1].start:{line:1,column:1,offset:0}),end:$s(ie.length>0?ie[ie.length-2][1].end:{line:1,column:1,offset:0})},_e=-1;++_e0&&(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 Dfe(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Rfe(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Pfe(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(n.identifier).toUpperCase(),r=Lc(i.toLowerCase()),a=e.footnoteOrder.indexOf(i);let o,l=e.footnoteCounts.get(i);l===void 0?(l=0,e.footnoteOrder.push(i),o=e.footnoteOrder.length):o=a+1,l+=1,e.footnoteCounts.set(i,l);const f={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+r,id:t+"fnref-"+r+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(n,f);const c={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(n,c),e.applyData(n,c)}function Nfe(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 $fe(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function vq(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 zfe(e,n){const t=String(n.identifier).toUpperCase(),i=e.definitionById.get(t);if(!i)return vq(e,n);const r={src:Lc(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 Lfe(e,n){const t={src:Lc(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 Ife(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 Bfe(e,n){const t=String(n.identifier).toUpperCase(),i=e.definitionById.get(t);if(!i)return vq(e,n);const r={href:Lc(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 Ffe(e,n){const t={href:Lc(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 qfe(e,n,t){const i=e.all(n),r=t?Hfe(t):gq(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 Ufe(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=KC(n.children[1]),f=XF(n.children[n.children.length-1]);l&&f&&(o.position={start:l,end:f}),r.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(r,!0)};return e.patch(n,a),e.applyData(n,a)}function Kfe(e,n,t){const i=t?t.children:void 0,a=(i?i.indexOf(n):1)===0?"th":"td",o=t&&t.type==="table"?t.align:void 0,l=o?o.length:n.children.length;let f=-1;const c=[];for(;++f0,!0),i[0]),r=i.index+i[0].length,i=t.exec(n);return a.push(vM(n.slice(r),r>0,!1)),a.join("")}function vM(e,n,t){let i=0,r=e.length;if(n){let a=e.codePointAt(i);for(;a===mM||a===pM;)i++,a=e.codePointAt(i)}if(t){let a=e.codePointAt(r-1);for(;a===mM||a===pM;)r--,a=e.codePointAt(r-1)}return r>i?e.slice(i,r):""}function Qfe(e,n){const t={type:"text",value:Zfe(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function Jfe(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const ece={blockquote:Tfe,break:jfe,code:Mfe,delete:Dfe,emphasis:Rfe,footnoteReference:Pfe,heading:Nfe,html:$fe,imageReference:zfe,image:Lfe,inlineCode:Ife,linkReference:Bfe,link:Ffe,listItem:qfe,list:Ufe,paragraph:Vfe,root:Wfe,strong:Gfe,table:Yfe,tableCell:Xfe,tableRow:Kfe,text:Qfe,thematicBreak:Jfe,toml:jv,yaml:jv,definition:jv,footnoteDefinition:jv};function jv(){}const yq=-1,Jy=0,kh=1,Mg=2,t9=3,i9=4,r9=5,a9=6,bq=7,wq=8,nce=typeof self=="object"?self:globalThis,gM=(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 nce[e](n)},tce=(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 Jy:case yq:return t(o,r);case kh:{const l=t([],r);for(const f of o)l.push(i(f));return l}case Mg:{const l=t({},r);for(const[f,c]of o)l[i(f)]=i(c);return l}case t9:return t(new Date(o),r);case i9:{const{source:l,flags:f}=o;return t(new RegExp(l,f),r)}case r9:{const l=t(new Map,r);for(const[f,c]of o)l.set(i(f),i(c));return l}case a9:{const l=t(new Set,r);for(const f of o)l.add(i(f));return l}case bq:{const{name:l,message:f}=o;return t(gM(l,f),r)}case wq: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(gM(a,o),r)};return i},yM=e=>tce(new Map,e)(0),wf="",{toString:ice}={},{keys:rce}=Object,Vd=e=>{const n=typeof e;if(n!=="object"||!e)return[Jy,n];const t=ice.call(e).slice(8,-1);switch(t){case"Array":return[kh,wf];case"Object":return[Mg,wf];case"Date":return[t9,wf];case"RegExp":return[i9,wf];case"Map":return[r9,wf];case"Set":return[a9,wf];case"DataView":return[kh,t]}return t.includes("Array")?[kh,t]:t.includes("Error")?[bq,t]:[Mg,t]},Mv=([e,n])=>e===Jy&&(n==="function"||n==="symbol"),ace=(e,n,t,i)=>{const r=(o,l)=>{const f=i.push(o)-1;return t.set(l,f),f},a=o=>{if(t.has(o))return t.get(o);let[l,f]=Vd(o);switch(l){case Jy:{let h=o;switch(f){case"bigint":l=wq,h=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);h=null;break;case"undefined":return r([yq],o)}return r([l,h],o)}case kh:{if(f){let p=o;return f==="DataView"?p=new Uint8Array(o.buffer):f==="ArrayBuffer"&&(p=new Uint8Array(o)),r([f,[...p]],o)}const h=[],d=r([l,h],o);for(const p of o)h.push(a(p));return d}case Mg:{if(f)switch(f){case"BigInt":return r([f,o.toString()],o);case"Boolean":case"Number":case"String":return r([f,o.valueOf()],o)}if(n&&"toJSON"in o)return a(o.toJSON());const h=[],d=r([l,h],o);for(const p of rce(o))(e||!Mv(Vd(o[p])))&&h.push([a(p),a(o[p])]);return d}case t9:return r([l,o.toISOString()],o);case i9:{const{source:h,flags:d}=o;return r([l,{source:h,flags:d}],o)}case r9:{const h=[],d=r([l,h],o);for(const[p,v]of o)(e||!(Mv(Vd(p))||Mv(Vd(v))))&&h.push([a(p),a(v)]);return d}case a9:{const h=[],d=r([l,h],o);for(const p of o)(e||!Mv(Vd(p)))&&h.push(a(p));return d}}const{message:c}=o;return r([l,{name:f,message:c}],o)};return a},bM=(e,{json:n,lossy:t}={})=>{const i=[];return ace(!(n||t),!!n,new Map,i)(e),i},Dg=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?yM(bM(e,n)):structuredClone(e):(e,n)=>yM(bM(e,n));function oce(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 sce(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function lce(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||oce,i=e.options.footnoteBackLabel||sce,r=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let f=-1;for(;++f0&&y.push({type:"text",value:" "});let S=typeof t=="string"?t:t(f,v);typeof S=="string"&&(S={type:"text",value:S}),y.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+p+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(f,v),className:["data-footnote-backref"]},children:Array.isArray(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(...y)}else h.push(...y);const _={type:"element",tagName:"li",properties:{id:n+"fn-"+p},children:e.wrap(h,!0)};e.patch(c,_),l.push(_)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Dg(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 e0=(function(e){if(e==null)return dce;if(typeof e=="function")return n0(e);if(typeof e=="object")return Array.isArray(e)?uce(e):fce(e);if(typeof e=="string")return cce(e);throw new Error("Expected function, string, or object as test")});function uce(e){const n=[];let t=-1;for(;++t":""))+")"})}return p;function p(){let v=kq,y,w,k;if((!n||a(f,c,h[h.length-1]||void 0))&&(v=vce(t(f,h)),v[0]===PS))return v;if("children"in f&&f.children){const _=f;if(_.children&&v[0]!==pce)for(w=(i?_.children.length:-1)+o,k=h.concat(_);w>-1&&w<_.children.length;){const S=_.children[w];if(y=l(S,w,k)(),y[0]===PS)return y;w=typeof y[1]=="number"?y[1]:w+o}}return v}}}function vce(e){return Array.isArray(e)?e:typeof e=="number"?[mce,e]:e==null?kq:[e]}function o9(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),_q(e,a,l,r);function l(f,c){const h=c[c.length-1],d=h?h.children.indexOf(f):void 0;return o(f,d,h)}}const NS={}.hasOwnProperty,gce={};function yce(e,n){const t=n||gce,i=new Map,r=new Map,a=new Map,o={...ece,...t.handlers},l={all:c,applyData:wce,definitionById:i,footnoteById:r,footnoteCounts:a,footnoteOrder:[],handlers:o,one:f,options:t,patch:bce,wrap:_ce};return o9(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const d=h.type==="definition"?i:r,p=String(h.identifier).toUpperCase();d.has(p)||d.set(p,h)}}),l;function f(h,d){const p=h.type,v=l.handlers[p];if(NS.call(l.handlers,p)&&v)return v(l,h,d);if(l.options.passThrough&&l.options.passThrough.includes(p)){if("children"in h){const{children:w,...k}=h,_=Dg(k);return _.children=l.all(h),_}return Dg(h)}return(l.options.unknownHandler||kce)(l,h,d)}function c(h){const d=[];if("children"in h){const p=h.children;let v=-1;for(;++v0&&t.push({type:"text",value:` +`}),t}function wM(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function kM(e,n){const t=yce(e,n),i=t.one(e,void 0),r=lce(t),a=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return r&&a.children.push({type:"text",value:` +`},r),a}function xce(e,n){return e&&"run"in e?async function(t,i){const r=kM(t,{file:i,...n});await e.run(r,i)}:function(t,i){return kM(t,{file:i,...e||n})}}function _M(e){if(e)throw e}var Nk,xM;function Sce(){if(xM)return Nk;xM=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,i=Object.getOwnPropertyDescriptor,r=function(c){return typeof Array.isArray=="function"?Array.isArray(c):n.call(c)==="[object Array]"},a=function(c){if(!c||n.call(c)!=="[object Object]")return!1;var h=e.call(c,"constructor"),d=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!h&&!d)return!1;var p;for(p in c);return typeof p>"u"||e.call(c,p)},o=function(c,h){t&&h.name==="__proto__"?t(c,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):c[h.name]=h.newValue},l=function(c,h){if(h==="__proto__")if(e.call(c,h)){if(i)return i(c,h).value}else return;return c[h]};return Nk=function f(){var c,h,d,p,v,y,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(c=arguments[k],c!=null)for(h in c)d=l(w,h),p=l(c,h),w!==p&&(S&&p&&(a(p)||(v=r(p)))?(v?(v=!1,y=d&&r(d)?d:[]):y=d&&a(d)?d:{},o(w,{name:h,newValue:f(S,y,p)})):typeof p<"u"&&o(w,{name:h,newValue:p}));return w},Nk}var Cce=Sce();const $k=st(Cce);function $S(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 Ace(){const e=[],n={run:t,use:i};return n;function t(...r){let a=-1;const o=r.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);l(null,...r);function l(f,...c){const h=e[++a];let d=-1;if(f){o(f);return}for(;++do.length;let f;l&&o.push(r);try{f=e.apply(this,o)}catch(c){const h=c;if(l&&t)throw h;return r(h)}l||(f&&f.then&&typeof f.then=="function"?f.then(a,r):f instanceof Error?r(f):a(f))}function r(o,...l){t||(t=!0,n(o,...l))}function a(o){r(null,o)}}const Ua={basename:Ece,dirname:Tce,extname:jce,join:Mce,sep:"/"};function Ece(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Zm(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 Tce(e){if(Zm(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 jce(e){Zm(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 Mce(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function Rce(e,n){let t="",i=0,r=-1,a=0,o=-1,l,f;for(;++o<=e.length;){if(o2){if(f=t.lastIndexOf("/"),f!==t.length-1){f<0?(t="",i=0):(t=t.slice(0,f),i=t.length-1-t.lastIndexOf("/")),r=o,a=0;continue}}else if(t.length>0){t="",i=0,r=o,a=0;continue}}n&&(t=t.length>0?t+"/..":"..",i=2)}else t.length>0?t+="/"+e.slice(r+1,o):t=e.slice(r+1,o),i=o-r-1;r=o,a=0}else l===46&&a>-1?a++:a=-1}return t}function Zm(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Pce={cwd:Nce};function Nce(){return"/"}function zS(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function $ce(e){if(typeof e=="string")e=new URL(e);else if(!zS(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 zce(e)}function zce(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const n=e.pathname;let t=-1;for(;++t0){let[v,...y]=h;const w=i[p][1];$S(w)&&$S(v)&&(v=$k(!0,w,v)),i[p]=[c,v,...y]}}}}const Fce=new s9().freeze();function Bk(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Fk(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function qk(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 CM(e){if(!$S(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function AM(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Dv(e){return qce(e)?e:new xq(e)}function qce(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Hce(e){return typeof e=="string"||Uce(e)}function Uce(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Vce="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",OM=[],EM={allowDangerousHtml:!0},Wce=/^(https?|ircs?|mailto|xmpp)$/i,Gce=[{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 Yce(e){const n=Kce(e),t=Xce(e);return Zce(n.runSync(n.parse(t),t),e)}function Kce(e){const n=e.rehypePlugins||OM,t=e.remarkPlugins||OM,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...EM}:EM;return Fce().use(Efe).use(t).use(xce,i).use(n)}function Xce(e){const n=e.children||"",t=new xq;return typeof n=="string"&&(t.value=n),t}function Zce(e,n){const t=n.allowedElements,i=n.allowElement,r=n.components,a=n.disallowedElements,o=n.skipHtml,l=n.unwrapDisallowed,f=n.urlTransform||Qce;for(const h of Gce)Object.hasOwn(n,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+Vce+h.id,void 0);return o9(e,c),cle(e,{Fragment:b.Fragment,components:r,ignoreInvalidStyle:!0,jsx:b.jsx,jsxs:b.jsxs,passKeys:!0,passNode:!0});function c(h,d,p){if(h.type==="raw"&&p&&typeof d=="number")return o?p.children.splice(d,1):p.children[d]={type:"text",value:h.value},d;if(h.type==="element"){let v;for(v in Dk)if(Object.hasOwn(Dk,v)&&Object.hasOwn(h.properties,v)){const y=h.properties[v],w=Dk[v];(w===null||w.includes(h.tagName))&&(h.properties[v]=f(String(y||""),v,h))}}if(h.type==="element"){let v=t?!t.includes(h.tagName):a?a.includes(h.tagName):!1;if(!v&&i&&typeof d=="number"&&(v=!i(h,d,p)),v&&p&&typeof d=="number")return l&&h.children?p.children.splice(d,1,...h.children):p.children.splice(d,1),d}}}function Qce(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||Wce.test(e.slice(0,n))?e:""}function TM(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 Jce(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function ede(e,n,t){const r=e0((t||{}).ignore||[]),a=nde(n);let o=-1;for(;++o0?{type:"text",value:T}:void 0),T===!1?p.lastIndex=E+1:(y!==E&&S.push({type:"text",value:c.value.slice(y,E)}),Array.isArray(T)?S.push(...T):T&&S.push(T),y=E+C[0].length,_=!0),!p.global)break;C=p.exec(c.value)}return _?(y?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],i=t.indexOf(")");const r=TM(e,"(");let a=TM(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 Sq(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||lu(t)||Zy(t))&&(!n||t!==47)}Cq.peek=Sde;function vde(){this.buffer()}function gde(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function yde(){this.buffer()}function bde(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function wde(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=ja(this.sliceSerialize(e)).toLowerCase(),t.label=n}function kde(e){this.exit(e)}function _de(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=ja(this.sliceSerialize(e)).toLowerCase(),t.label=n}function xde(e){this.exit(e)}function Sde(){return"["}function Cq(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 Cde(){return{enter:{gfmFootnoteCallString:vde,gfmFootnoteCall:gde,gfmFootnoteDefinitionLabelString:yde,gfmFootnoteDefinition:bde},exit:{gfmFootnoteCallString:wde,gfmFootnoteCall:kde,gfmFootnoteDefinitionLabelString:_de,gfmFootnoteDefinition:xde}}}function Ade(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:Cq},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(i,r,a,o){const l=a.createTracker(o);let f=l.move("[^");const c=a.enter("footnoteDefinition"),h=a.enter("label");return f+=l.move(a.safe(a.associationId(i),{before:f,after:"]"})),h(),f+=l.move("]:"),i.children&&i.children.length>0&&(l.shift(4),f+=l.move((n?` +`:" ")+a.indentLines(a.containerFlow(i,l.current()),n?Aq:Ode))),c(),f}}function Ode(e,n,t){return n===0?e:Aq(e,n,t)}function Aq(e,n,t){return(t?"":" ")+e}const Ede=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Oq.peek=Rde;function Tde(){return{canContainEols:["delete"],enter:{strikethrough:Mde},exit:{strikethrough:Dde}}}function jde(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Ede}],handlers:{delete:Oq}}}function Mde(e){this.enter({type:"delete",children:[]},e)}function Dde(e){this.exit(e)}function Oq(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 Rde(){return"~"}function Pde(e){return e.length}function Nde(e,n){const t=n||{},i=(t.align||[]).concat(),r=t.stringLength||Pde,a=[],o=[],l=[],f=[];let c=0,h=-1;for(;++hc&&(c=e[h].length);++_f[_])&&(f[_]=C)}w.push(S)}o[h]=w,l[h]=k}let d=-1;if(typeof i=="object"&&"length"in i)for(;++df[d]&&(f[d]=S),v[d]=S),p[d]=C}o.splice(1,0,p),l.splice(1,0,v),h=-1;const y=[];for(;++h "),a.shift(2);const o=t.indentLines(t.containerFlow(e,a.current()),Lde);return r(),o}function Lde(e,n,t){return">"+(t?"":" ")+e}function Ide(e,n){return MM(e,n.inConstruct,!0)&&!MM(e,n.notInConstruct,!1)}function MM(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 Fde(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 qde(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 Hde(e,n,t,i){const r=qde(t),a=e.value||"",o=r==="`"?"GraveAccent":"Tilde";if(Fde(e,t)){const d=t.enter("codeIndented"),p=t.indentLines(a,Ude);return d(),p}const l=t.createTracker(i),f=r.repeat(Math.max(Bde(a,r)+1,3)),c=t.enter("codeFenced");let h=l.move(f);if(e.lang){const d=t.enter(`codeFencedLang${o}`);h+=l.move(t.safe(e.lang,{before:h,after:" ",encode:["`"],...l.current()})),d()}if(e.lang&&e.meta){const d=t.enter(`codeFencedMeta${o}`);h+=l.move(" "),h+=l.move(t.safe(e.meta,{before:h,after:` +`,encode:["`"],...l.current()})),d()}return h+=l.move(` +`),a&&(h+=l.move(a+` +`)),h+=l.move(f),c(),h}function Ude(e,n,t){return(t?"":" ")+e}function l9(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 Vde(e,n,t,i){const r=l9(t),a=r==='"'?"Quote":"Apostrophe",o=t.enter("definition");let l=t.enter("label");const f=t.createTracker(i);let c=f.move("[");return c+=f.move(t.safe(t.associationId(e),{before:c,after:"]",...f.current()})),c+=f.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),c+=f.move("<"),c+=f.move(t.safe(e.url,{before:c,after:">",...f.current()})),c+=f.move(">")):(l=t.enter("destinationRaw"),c+=f.move(t.safe(e.url,{before:c,after:e.title?" ":` +`,...f.current()}))),l(),e.title&&(l=t.enter(`title${a}`),c+=f.move(" "+r),c+=f.move(t.safe(e.title,{before:c,after:r,...f.current()})),c+=f.move(r),l()),o(),c}function Wde(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 qh(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Rg(e,n,t){const i=Gf(e),r=Gf(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}}Eq.peek=Gde;function Eq(e,n,t,i){const r=Wde(t),a=t.enter("emphasis"),o=t.createTracker(i),l=o.move(r);let f=o.move(t.containerPhrasing(e,{after:r,before:l,...o.current()}));const c=f.charCodeAt(0),h=Rg(i.before.charCodeAt(i.before.length-1),c,r);h.inside&&(f=qh(c)+f.slice(1));const d=f.charCodeAt(f.length-1),p=Rg(i.after.charCodeAt(0),d,r);p.inside&&(f=f.slice(0,-1)+qh(d));const v=o.move(r);return a(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},l+f+v}function Gde(e,n,t){return t.options.emphasis||"*"}function Yde(e,n){let t=!1;return o9(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return t=!0,PS}),!!((!e.depth||e.depth<3)&&JC(e)&&(n.options.setext||t))}function Kde(e,n,t,i){const r=Math.max(Math.min(6,e.depth||1),1),a=t.createTracker(i);if(Yde(e,t)){const h=t.enter("headingSetext"),d=t.enter("phrasing"),p=t.containerPhrasing(e,{...a.current(),before:` +`,after:` +`});return d(),h(),p+` +`+(r===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(` +`))+1))}const o="#".repeat(r),l=t.enter("headingAtx"),f=t.enter("phrasing");a.move(o+" ");let c=t.containerPhrasing(e,{before:"# ",after:` +`,...a.current()});return/^[\t ]/.test(c)&&(c=qh(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,t.options.closeAtx&&(c+=" "+o),f(),l(),c}Tq.peek=Xde;function Tq(e){return e.value||""}function Xde(){return"<"}jq.peek=Zde;function jq(e,n,t,i){const r=l9(t),a=r==='"'?"Quote":"Apostrophe",o=t.enter("image");let l=t.enter("label");const f=t.createTracker(i);let c=f.move("![");return c+=f.move(t.safe(e.alt,{before:c,after:"]",...f.current()})),c+=f.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),c+=f.move("<"),c+=f.move(t.safe(e.url,{before:c,after:">",...f.current()})),c+=f.move(">")):(l=t.enter("destinationRaw"),c+=f.move(t.safe(e.url,{before:c,after:e.title?" ":")",...f.current()}))),l(),e.title&&(l=t.enter(`title${a}`),c+=f.move(" "+r),c+=f.move(t.safe(e.title,{before:c,after:r,...f.current()})),c+=f.move(r),l()),c+=f.move(")"),o(),c}function Zde(){return"!"}Mq.peek=Qde;function Mq(e,n,t,i){const r=e.referenceType,a=t.enter("imageReference");let o=t.enter("label");const l=t.createTracker(i);let f=l.move("![");const c=t.safe(e.alt,{before:f,after:"]",...l.current()});f+=l.move(c+"]["),o();const h=t.stack;t.stack=[],o=t.enter("reference");const d=t.safe(t.associationId(e),{before:f,after:"]",...l.current()});return o(),t.stack=h,a(),r==="full"||!c||c!==d?f+=l.move(d+"]"):r==="shortcut"?f=f.slice(0,-1):f+=l.move("]"),f}function Qde(){return"!"}Dq.peek=Jde;function Dq(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))}Pq.peek=ehe;function Pq(e,n,t,i){const r=l9(t),a=r==='"'?"Quote":"Apostrophe",o=t.createTracker(i);let l,f;if(Rq(e,t)){const h=t.stack;t.stack=[],l=t.enter("autolink");let d=o.move("<");return d+=o.move(t.containerPhrasing(e,{before:d,after:">",...o.current()})),d+=o.move(">"),l(),t.stack=h,d}l=t.enter("link"),f=t.enter("label");let c=o.move("[");return c+=o.move(t.containerPhrasing(e,{before:c,after:"](",...o.current()})),c+=o.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=t.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(t.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(f=t.enter("destinationRaw"),c+=o.move(t.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),f(),e.title&&(f=t.enter(`title${a}`),c+=o.move(" "+r),c+=o.move(t.safe(e.title,{before:c,after:r,...o.current()})),c+=o.move(r),f()),c+=o.move(")"),l(),c}function ehe(e,n,t){return Rq(e,t)?"<":"["}Nq.peek=nhe;function Nq(e,n,t,i){const r=e.referenceType,a=t.enter("linkReference");let o=t.enter("label");const l=t.createTracker(i);let f=l.move("[");const c=t.containerPhrasing(e,{before:f,after:"]",...l.current()});f+=l.move(c+"]["),o();const h=t.stack;t.stack=[],o=t.enter("reference");const d=t.safe(t.associationId(e),{before:f,after:"]",...l.current()});return o(),t.stack=h,a(),r==="full"||!c||c!==d?f+=l.move(d+"]"):r==="shortcut"?f=f.slice(0,-1):f+=l.move("]"),f}function nhe(){return"["}function u9(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 the(e){const n=u9(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 ihe(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 $q(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 rhe(e,n,t,i){const r=t.enter("list"),a=t.bulletCurrent;let o=e.ordered?ihe(t):u9(t);const l=e.ordered?o==="."?")":".":the(t);let f=n&&t.bulletLastUsed?o===t.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&h&&(!h.children||!h.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(f=!0),$q(t)===o&&h){let d=-1;for(;++d-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+a);let o=a.length+1;(r==="tab"||r==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(o=Math.ceil(o/4)*4);const l=t.createTracker(i);l.move(a+" ".repeat(o-a.length)),l.shift(o);const f=t.enter("listItem"),c=t.indentLines(t.containerFlow(e,l.current()),h);return f(),c;function h(d,p,v){return p?(v?"":" ".repeat(o))+d:(v?a:a+" ".repeat(o-a.length))+d}}function she(e,n,t,i){const r=t.enter("paragraph"),a=t.enter("phrasing"),o=t.containerPhrasing(e,i);return a(),r(),o}const lhe=e0(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function uhe(e,n,t,i){return(e.children.some(function(o){return lhe(o)})?t.containerPhrasing:t.containerFlow).call(t,e,i)}function fhe(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}zq.peek=che;function zq(e,n,t,i){const r=fhe(t),a=t.enter("strong"),o=t.createTracker(i),l=o.move(r+r);let f=o.move(t.containerPhrasing(e,{after:r,before:l,...o.current()}));const c=f.charCodeAt(0),h=Rg(i.before.charCodeAt(i.before.length-1),c,r);h.inside&&(f=qh(c)+f.slice(1));const d=f.charCodeAt(f.length-1),p=Rg(i.after.charCodeAt(0),d,r);p.inside&&(f=f.slice(0,-1)+qh(d));const v=o.move(r+r);return a(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},l+f+v}function che(e,n,t){return t.options.strong||"*"}function dhe(e,n,t,i){return t.safe(e.value,i)}function hhe(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 mhe(e,n,t){const i=($q(t)+(t.options.ruleSpaces?" ":"")).repeat(hhe(t));return t.options.ruleSpaces?i.slice(0,-1):i}const Lq={blockquote:zde,break:DM,code:Hde,definition:Vde,emphasis:Eq,hardBreak:DM,heading:Kde,html:Tq,image:jq,imageReference:Mq,inlineCode:Dq,link:Pq,linkReference:Nq,list:rhe,listItem:ohe,paragraph:she,root:uhe,strong:zq,text:dhe,thematicBreak:mhe};function phe(){return{enter:{table:vhe,tableData:RM,tableHeader:RM,tableRow:yhe},exit:{codeText:bhe,table:ghe,tableData:Wk,tableHeader:Wk,tableRow:Wk}}}function vhe(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 ghe(e){this.exit(e),this.data.inTable=void 0}function yhe(e){this.enter({type:"tableRow",children:[]},e)}function Wk(e){this.exit(e)}function RM(e){this.enter({type:"tableCell",children:[]},e)}function bhe(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,whe));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function whe(e,n){return n==="|"?n:e}function khe(e){const n=e||{},t=n.tableCellPadding,i=n.tablePipeAlign,r=n.stringLength,a=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` +`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:o,tableCell:f,tableRow:l}};function o(v,y,w,k){return c(h(v,w,k),v.align)}function l(v,y,w,k){const _=d(v,w,k),S=c([_]);return S.slice(0,S.indexOf(` +`))}function f(v,y,w,k){const _=w.enter("tableCell"),S=w.enter("phrasing"),C=w.containerPhrasing(v,{...k,before:a,after:a});return S(),_(),C}function c(v,y){return Nde(v,{align:y,alignDelimiters:i,padding:t,stringLength:r})}function h(v,y,w){const k=v.children;let _=-1;const S=[],C=y.enter("table");for(;++_0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const Ihe={tokenize:Ghe,partial:!0};function Bhe(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Uhe,continuation:{tokenize:Vhe},exit:Whe}},text:{91:{name:"gfmFootnoteCall",tokenize:Hhe},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Fhe,resolveTo:qhe}}}}function Fhe(e,n,t){const i=this;let r=i.events.length;const a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o;for(;r--;){const f=i.events[r][1];if(f.type==="labelImage"){o=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return l;function l(f){if(!o||!o._balanced)return t(f);const c=ja(i.sliceSerialize({start:o.end,end:i.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?t(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),n(f))}}function qhe(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 Hhe(e,n,t){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a=0,o;return l;function l(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),f}function f(d){return d!==94?t(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(a>999||d===93&&!o||d===null||d===91||Ot(d))return t(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return r.includes(ja(i.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(d)}return Ot(d)||(o=!0),a++,e.consume(d),d===92?h:c}function h(d){return d===91||d===92||d===93?(e.consume(d),a++,c):c(d)}}function Uhe(e,n,t){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a,o=0,l;return f;function f(y){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(y){return y===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):t(y)}function h(y){if(o>999||y===93&&!l||y===null||y===91||Ot(y))return t(y);if(y===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return a=ja(i.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Ot(y)||(l=!0),o++,e.consume(y),y===92?d:h}function d(y){return y===91||y===92||y===93?(e.consume(y),o++,h):h(y)}function p(y){return y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),r.includes(a)||r.push(a),Jn(e,v,"gfmFootnoteDefinitionWhitespace")):t(y)}function v(y){return n(y)}}function Vhe(e,n,t){return e.check(Xm,n,e.attempt(Ihe,n,t))}function Whe(e){e.exit("gfmFootnoteDefinition")}function Ghe(e,n,t){const i=this;return Jn(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 Yhe(e){let t=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:a,resolveAll:r};return t==null&&(t=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function r(o,l){let f=-1;for(;++f1?f(y):(o.consume(y),d++,v);if(d<2&&!t)return f(y);const k=o.exit("strikethroughSequenceTemporary"),_=Gf(y);return k._open=!_||_===2&&!!w,k._close=!w||w===2&&!!_,l(y)}}}class Khe{constructor(){this.map=[]}add(n,t,i){Xhe(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 Xhe(e,n,t,i){let r=0;if(!(t===0&&i.length===0)){for(;r-1;){const U=i.events[L][1].type;if(U==="lineEnding"||U==="linePrefix")L--;else break}const B=L>-1?i.events[L][1].type:null,G=B==="tableHead"||B==="tableRow"?T:f;return G===T&&i.parser.lazy[i.now().line]?t(R):G(R)}function f(R){return e.enter("tableHead"),e.enter("tableRow"),c(R)}function c(R){return R===124||(o=!0,a+=1),h(R)}function h(R){return R===null?t(R):vn(R)?a>1?(a=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),v):t(R):Yn(R)?Jn(e,h,"whitespace")(R):(a+=1,o&&(o=!1,r+=1),R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),o=!0,h):(e.enter("data"),d(R)))}function d(R){return R===null||R===124||Ot(R)?(e.exit("data"),h(R)):(e.consume(R),R===92?p:d)}function p(R){return R===92||R===124?(e.consume(R),d):d(R)}function v(R){return i.interrupt=!1,i.parser.lazy[i.now().line]?t(R):(e.enter("tableDelimiterRow"),o=!1,Yn(R)?Jn(e,y,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):y(R))}function y(R){return R===45||R===58?k(R):R===124?(o=!0,e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),w):O(R)}function w(R){return Yn(R)?Jn(e,k,"whitespace")(R):k(R)}function k(R){return R===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),_):R===45?(a+=1,_(R)):R===null||vn(R)?E(R):O(R)}function _(R){return R===45?(e.enter("tableDelimiterFiller"),S(R)):O(R)}function S(R){return R===45?(e.consume(R),S):R===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(R))}function C(R){return Yn(R)?Jn(e,E,"whitespace")(R):E(R)}function E(R){return R===124?y(R):R===null||vn(R)?!o||r!==a?O(R):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(R)):O(R)}function O(R){return t(R)}function T(R){return e.enter("tableRow"),M(R)}function M(R){return R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),M):R===null||vn(R)?(e.exit("tableRow"),n(R)):Yn(R)?Jn(e,M,"whitespace")(R):(e.enter("data"),N(R))}function N(R){return R===null||R===124||Ot(R)?(e.exit("data"),M(R)):(e.consume(R),R===92?F:N)}function F(R){return R===92||R===124?(e.consume(R),N):N(R)}}function eme(e,n){let t=-1,i=!0,r=0,a=[0,0,0,0],o=[0,0,0,0],l=!1,f=0,c,h,d;const p=new Khe;for(;++tt[2]+1){const y=t[2]+1,w=t[3]-t[2]-1;e.add(y,w,[])}}e.add(t[3]+1,0,[["exit",d,n]])}return r!==void 0&&(a.end=Object.assign({},Of(n.events,r)),e.add(r,0,[["exit",a,n]]),a=void 0),a}function NM(e,n,t,i,r){const a=[],o=Of(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 Of(e,n){const t=e[n],i=t[0]==="enter"?"start":"end";return t[1][i]}const nme={name:"tasklistCheck",tokenize:ime};function tme(){return{text:{91:nme}}}function ime(e,n,t){const i=this;return r;function r(f){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?t(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),a)}function a(f){return Ot(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),o):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),o):t(f)}function o(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):t(f)}function l(f){return vn(f)?n(f):Yn(f)?e.check({tokenize:rme},n,t)(f):t(f)}}function rme(e,n,t){return Jn(e,i,"whitespace");function i(r){return r===null?t(r):n(r)}}function ame(e){return iq([jhe(),Bhe(),Yhe(e),Qhe(),tme()])}const ome={};function sme(e){const n=this,t=e||ome,i=n.data(),r=i.micromarkExtensions||(i.micromarkExtensions=[]),a=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),o=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);r.push(ame(t)),a.push(Ahe()),o.push(Ohe(t))}const IS="kanban_chat_v1";function lme(){try{const e=localStorage.getItem(IS);if(!e)return[];const n=JSON.parse(e);if(Array.isArray(n))return n}catch{}return[]}function ume({onBoardChange:e}){const[n,t]=A.useState(()=>lme()),[i,r]=A.useState(""),[a,o]=A.useState(!1),[l,f]=A.useState(""),[c,h]=A.useState([]),d=A.useRef(null);A.useEffect(()=>{localStorage.setItem(IS,JSON.stringify(n))},[n]),A.useEffect(()=>{var w;(w=d.current)==null||w.scrollTo({top:d.current.scrollHeight,behavior:"smooth"})},[n,l,c,a]);const p=async()=>{const w=i.trim();if(!w||a)return;const k={role:"user",content:w,ts:Date.now()},_=[...n,k];t(_),r(""),o(!0),f(""),h([]);let S="";const C=[];let E=!1;const O=T=>{switch(T.type){case"delta":S+=T.text,f(S);break;case"tool_use":{const M={tool:T.tool,ok:!0,input:T.input};C.push(M),h([...C]);break}case"tool_result":{for(let M=C.length-1;M>=0;M--){const N=C[M];if(N.error===void 0&&N.ok){T.is_error&&(N.ok=!1,N.error=T.result||"tool error");break}}h([...C]);break}case"result":T.text&&S.trim()===""&&(S=T.text,f(S));break;case"done":T.board_changed&&(E=!0);break;case"error":S=`Error: ${T.error}`,f(S);break}};try{const T=_.map(M=>({role:M.role,content:M.content}));await pie(T,O)}catch(T){const M=T.message;qn.show({color:"red",message:M}),S=S||`Error: ${M}`}finally{const T={role:"assistant",content:S,ts:Date.now(),tool_calls:C.length>0?C:void 0};t(M=>[...M,T]),f(""),h([]),o(!1),E&&e()}},v=w=>{w.key==="Enter"&&!w.shiftKey&&(w.preventDefault(),p())},y=()=>{t([]),localStorage.removeItem(IS)};return b.jsxs(mt,{gap:0,h:"100%",children:[b.jsxs(hn,{justify:"space-between",p:"xs",style:{borderBottom:"1px solid var(--mantine-color-dark-4)"},children:[b.jsxs(hn,{gap:6,children:[b.jsx(LF,{size:18}),b.jsx(Qe,{fw:600,size:"sm",children:"Asistente"})]}),b.jsx(Ai,{label:"Limpiar conversacion",withArrow:!0,children:b.jsx($t,{variant:"subtle",color:"gray",size:"sm",onClick:y,disabled:n.length===0,children:b.jsx(Wf,{size:14})})})]}),b.jsx(Na,{viewportRef:d,style:{flex:1},type:"auto",p:"xs",children:b.jsxs(mt,{gap:"xs",children:[n.length===0&&!a&&b.jsxs(Qe,{size:"sm",c:"dimmed",ta:"center",mt:"md",children:["Escribe algo. Ejemplos:",b.jsx("br",{}),'- "crea columna Backlog"',b.jsx("br",{}),'- "anade tarjeta para revisar PR de Lucas en Doing"',b.jsx("br",{}),'- "que hay en Doing?"']}),n.map((w,k)=>b.jsx($M,{msg:w},k)),a&&b.jsx($M,{msg:{role:"assistant",content:l,ts:Date.now(),tool_calls:c.length>0?c:void 0},streaming:!0}),a&&l===""&&c.length===0&&b.jsxs(hn,{gap:6,pl:"xs",children:[b.jsx(zi,{size:"xs"}),b.jsx(Qe,{size:"xs",c:"dimmed",children:"Pensando..."})]})]})}),b.jsx(mt,{gap:4,p:"xs",style:{borderTop:"1px solid var(--mantine-color-dark-4)"},children:b.jsxs(hn,{align:"flex-end",gap:4,wrap:"nowrap",children:[b.jsx(Hf,{placeholder:"Pide algo... (Enter envia, Shift+Enter newline)",value:i,onChange:w=>r(w.currentTarget.value),onKeyDown:v,disabled:a,autosize:!0,minRows:1,maxRows:6,style:{flex:1}}),b.jsx($t,{size:"lg",variant:"filled",onClick:p,disabled:!i.trim()||a,"aria-label":"Send",children:a?b.jsx(zi,{size:"xs",color:"white"}):b.jsx(IF,{size:16})})]})})]})}function $M({msg:e,streaming:n=!1}){const t=e.role==="user";return b.jsx(Wt,{p:"xs",radius:"md",withBorder:!0,bg:t?"blue.9":"dark.6",style:{alignSelf:t?"flex-end":"flex-start",maxWidth:"92%"},children:b.jsxs(mt,{gap:4,children:[e.content&&b.jsx(ve,{className:"kanban-md",style:{fontSize:13,lineHeight:1.45,color:"var(--mantine-color-text)"},children:b.jsx(Yce,{remarkPlugins:[sme],children:e.content})}),n&&e.content&&b.jsx(ve,{style:{display:"inline-block",width:8,height:14,background:"currentColor",opacity:.6}}),e.tool_calls&&e.tool_calls.length>0&&b.jsx(hn,{gap:4,wrap:"wrap",children:e.tool_calls.map((i,r)=>b.jsxs(ti,{size:"xs",color:i.ok?"teal":"red",variant:"light",title:i.error||"",leftSection:i.ok&&n?b.jsx(zi,{size:8,color:"teal"}):null,children:[i.tool,!i.ok&&i.error?`: ${i.error}`:""]},r))})]})})}const fme=["Lun","Mar","Mie","Jue","Vie","Sab","Dom"];function cme({users:e,cards:n,onJumpToCard:t}){const[i,r]=A.useState(null),[a,o]=A.useState(new Date),[l,f]=A.useState(null),[c,h]=A.useState(null),[d,p]=A.useState(!1);A.useEffect(()=>{let S=!1;p(!0);const C=Le(a).startOf("month").format("YYYY-MM-DD"),E=Le(a).endOf("month").format("YYYY-MM-DD");return AB({from:C,to:E,assignee_id:l||void 0}).then(O=>{S||h(O)}).finally(()=>{S||p(!1)}),()=>{S=!0}},[a,l]);const v=A.useMemo(()=>e.map(S=>({value:S.id,label:S.display_name||S.username})),[e]),y=A.useMemo(()=>{const S=new Map;if(!c)return S;for(const C of c.created_daily){const E=S.get(C.date)??{created:0,done:0,deadlines:[]};E.created=C.count,S.set(C.date,E)}for(const C of c.throughput_daily){const E=S.get(C.date)??{created:0,done:0,deadlines:[]};E.done=C.count,S.set(C.date,E)}for(const C of n){if(!C.deadline||C.deleted_at)continue;const E=C.deadline.slice(0,10),O=S.get(E)??{created:0,done:0,deadlines:[]};O.deadlines.push(C),S.set(E,O)}return S},[c,n]),w=A.useMemo(()=>{const S=Le(a).startOf("month"),C=Le(a).endOf("month"),E=(S.day()+6)%7,O=[];for(let T=0;TArray.from(y.values()).reduce((S,C)=>S+C.created,0),[y]),_=A.useMemo(()=>Array.from(y.values()).reduce((S,C)=>S+C.done,0),[y]);return b.jsx(ve,{p:"md",children:b.jsxs(mt,{gap:"md",children:[b.jsxs(hn,{justify:"space-between",children:[b.jsx(ku,{order:3,children:"Calendario"}),b.jsxs(hn,{gap:"xs",wrap:"nowrap",children:[b.jsx(qC,{label:"Mes",size:"xs",value:a,onChange:S=>S&&o(typeof S=="string"?new Date(S):S),style:{minWidth:160},clearable:!1}),b.jsx(Xo,{label:"Asignado",size:"xs",placeholder:"Todos",value:l,onChange:f,data:v,clearable:!0,searchable:!0,style:{minWidth:180}})]})]}),b.jsxs(hn,{gap:"md",children:[b.jsx(Wt,{withBorder:!0,p:"sm",radius:"md",children:b.jsxs(hn,{gap:6,children:[b.jsx(Bh,{size:14,color:"var(--mantine-color-blue-5)"}),b.jsx(Qe,{size:"sm",fw:600,children:k}),b.jsx(Qe,{size:"xs",c:"dimmed",children:"creadas"})]})}),b.jsx(Wt,{withBorder:!0,p:"sm",radius:"md",children:b.jsxs(hn,{gap:6,children:[b.jsx(Ih,{size:14,color:"var(--mantine-color-green-5)"}),b.jsx(Qe,{size:"sm",fw:600,children:_}),b.jsx(Qe,{size:"xs",c:"dimmed",children:"hechas"})]})})]}),d&&!c?b.jsx(Ac,{p:"xl",children:b.jsx(zi,{})}):b.jsxs(Wt,{withBorder:!0,p:"md",radius:"md",children:[b.jsx(Nh,{cols:7,spacing:4,mb:4,children:fme.map(S=>b.jsx(Qe,{size:"xs",c:"dimmed",ta:"center",fw:600,children:S},S))}),b.jsx(Nh,{cols:7,spacing:4,children:w.map((S,C)=>{if(!S.date)return b.jsx(ve,{style:{minHeight:72}},C);const E=y.get(S.date)??{created:0,done:0,deadlines:[]},O=parseInt(S.date.slice(8,10),10),T=S.date===Le().format("YYYY-MM-DD"),M=Le().startOf("day").valueOf(),F=Le(S.date).startOf("day").valueOf()0?"rgba(81, 207, 102, 0.08)":E.created>0?"rgba(34, 139, 230, 0.06)":void 0},children:b.jsxs(mt,{gap:2,children:[b.jsx(Qe,{size:"xs",fw:T?700:500,c:T?"blue":void 0,children:O}),E.created>0&&b.jsxs(hn,{gap:3,wrap:"nowrap",children:[b.jsx(Bh,{size:10,color:"var(--mantine-color-blue-5)"}),b.jsx(Qe,{size:"xs",c:"blue",children:E.created})]}),E.done>0&&b.jsxs(hn,{gap:3,wrap:"nowrap",children:[b.jsx(Ih,{size:10,color:"var(--mantine-color-green-5)"}),b.jsx(Qe,{size:"xs",c:"green",children:E.done})]}),E.deadlines.length>0&&b.jsxs(En,{opened:i===S.date,onChange:R=>r(R?S.date:null),position:"bottom",withArrow:!0,shadow:"md",width:280,children:[b.jsx(En.Target,{children:b.jsx(di,{onClick:()=>r(i===S.date?null:S.date),style:{textAlign:"left"},children:b.jsx(mt,{gap:1,children:b.jsxs(hn,{gap:3,wrap:"nowrap",children:[b.jsx($F,{size:10,color:F?"var(--mantine-color-red-5)":"var(--mantine-color-orange-5)"}),b.jsxs(Qe,{size:"xs",c:F?"red":"orange",fw:700,td:"underline",children:[E.deadlines.length," deadline",E.deadlines.length===1?"":"s"]})]})})})}),b.jsx(En.Dropdown,{p:6,children:b.jsxs(mt,{gap:2,children:[b.jsxs(Qe,{size:"xs",c:"dimmed",fw:600,mb:2,children:["Vencen el ",Le(S.date).format("DD/MM/YYYY")]}),E.deadlines.map(R=>b.jsx(di,{onClick:()=>{r(null),t==null||t(R.id)},style:{padding:"4px 6px",borderRadius:4,background:"var(--mantine-color-dark-6)"},children:b.jsxs(hn,{gap:6,wrap:"nowrap",children:[b.jsxs(Qe,{size:"xs",c:"dimmed",ff:"monospace",children:["#",String(R.seq_num).padStart(5,"0")]}),b.jsx(Qe,{size:"xs",lineClamp:1,title:R.title,children:R.title})]})},R.id))]})})]})]})},C)})})]})]})})}function Gq(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 dme={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 hme(e){return e.map(n=>{if(!n.payload||n.payload[n.name])return n;const t=n.name.search(/\./);if(t>=0){const i=n.name.substring(0,t),r={...n.payload[i]},a=Object.entries(n.payload).reduce((o,l)=>{const[f,c]=l;return f===i?o:{...o,[f]:c}},{});return{...n,name:n.name.substring(t+1),payload:{...a,...r}}}return n})}function mme(e,n){const t=hme(e.filter(i=>i.fill!=="none"||!i.color));return n?t.filter(i=>i.name===n):t}function zM(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 pme={type:"area",showColor:!0},c9=Pe(e=>{var R,L;const n=ye("ChartTooltip",pme,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,payload:f,label:c,unit:h,type:d,segmentId:p,mod:v,series:y,valueFormatter:w,showColor:k,attributes:_,...S}=n,C=ii(),E=Xe({name:"ChartTooltip",classes:dme,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:_});if(!f)return null;const O=mme(f,p),T=d==="scatter"?(L=(R=f[0])==null?void 0:R.payload)==null?void 0:L.name:null,M=Gq(y),N=c||T,F=O.map(B=>b.jsxs("div",{"data-type":d,...E("tooltipItem"),children:[b.jsxs("div",{...E("tooltipItemBody"),children:[k&&b.jsx("svg",{...E("tooltipItemColor"),children:b.jsx("circle",{r:6,fill:nt(B.color,C),width:12,height:12,cx:6,cy:6})}),b.jsx("div",{...E("tooltipItemName"),children:M[B.name]||B.name})]}),b.jsxs("div",{...E("tooltipItemData"),children:[typeof w=="function"?w(zM(B,d)):zM(B,d),h||B.unit]})]},(B==null?void 0:B.key)??B.name));return b.jsxs(ve,{...E("tooltip"),mod:[{type:d},v],...S,children:[N&&b.jsx("div",{...E("tooltipLabel"),children:N}),b.jsx("div",{...E("tooltipBody"),children:F})]})});c9.displayName="@mantine/charts/ChartTooltip";var Yq={legend:"m_847eaf",legendItem:"m_17da7e62",legendItemColor:"m_6e236e21",legendItemName:"m_8ff56c0d"};function vme(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 gme(e){return vme(e.filter(n=>n.color!=="none"))}const t0=Pe(e=>{const n=ye("ChartLegend",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,payload:f,onHighlight:c,legendPosition:h,mod:d,series:p,showColor:v,centered:y,attributes:w,...k}=n,_=Xe({name:"ChartLegend",classes:Yq,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,rootSelector:"legend"});if(!f)return null;const S=gme(f),C=Gq(p),E=S.map((O,T)=>b.jsxs("div",{..._("legendItem"),onMouseEnter:()=>c(O.dataKey),onMouseLeave:()=>c(null),"data-without-color":v===!1||void 0,children:[b.jsx(Oc,{color:O.color,size:12,..._("legendItemColor"),withShadow:!1}),b.jsx("p",{..._("legendItemName"),children:C[O.dataKey]||O.dataKey})]},T));return b.jsx(ve,{mod:[{position:h,centered:y},d],..._("legend"),...k,children:E})});t0.displayName="@mantine/charts/ChartLegend";t0.classes=Yq;function yme({x:e,y:n,value:t,valueFormatter:i}){return b.jsx("g",{transform:`translate(${e},${n})`,children:b.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"},Gk,LM;function yr(){if(LM)return Gk;LM=1;var e=Array.isArray;return Gk=e,Gk}var Yk,IM;function Kq(){if(IM)return Yk;IM=1;var e=typeof gv=="object"&&gv&&gv.Object===Object&&gv;return Yk=e,Yk}var Kk,BM;function fo(){if(BM)return Kk;BM=1;var e=Kq(),n=typeof self=="object"&&self&&self.Object===Object&&self,t=e||n||Function("return this")();return Kk=t,Kk}var Xk,FM;function Qm(){if(FM)return Xk;FM=1;var e=fo(),n=e.Symbol;return Xk=n,Xk}var Zk,qM;function bme(){if(qM)return Zk;qM=1;var e=Qm(),n=Object.prototype,t=n.hasOwnProperty,i=n.toString,r=e?e.toStringTag:void 0;function a(o){var l=t.call(o,r),f=o[r];try{o[r]=void 0;var c=!0}catch{}var h=i.call(o);return c&&(l?o[r]=f:delete o[r]),h}return Zk=a,Zk}var Qk,HM;function wme(){if(HM)return Qk;HM=1;var e=Object.prototype,n=e.toString;function t(i){return n.call(i)}return Qk=t,Qk}var Jk,UM;function ls(){if(UM)return Jk;UM=1;var e=Qm(),n=bme(),t=wme(),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 Jk=o,Jk}var e_,VM;function us(){if(VM)return e_;VM=1;function e(n){return n!=null&&typeof n=="object"}return e_=e,e_}var n_,WM;function Ic(){if(WM)return n_;WM=1;var e=ls(),n=us(),t="[object Symbol]";function i(r){return typeof r=="symbol"||n(r)&&e(r)==t}return n_=i,n_}var t_,GM;function d9(){if(GM)return t_;GM=1;var e=yr(),n=Ic(),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 t_=r,t_}var i_,YM;function cl(){if(YM)return i_;YM=1;function e(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}return i_=e,i_}var r_,KM;function h9(){if(KM)return r_;KM=1;var e=ls(),n=cl(),t="[object AsyncFunction]",i="[object Function]",r="[object GeneratorFunction]",a="[object Proxy]";function o(l){if(!n(l))return!1;var f=e(l);return f==i||f==r||f==t||f==a}return r_=o,r_}var a_,XM;function kme(){if(XM)return a_;XM=1;var e=fo(),n=e["__core-js_shared__"];return a_=n,a_}var o_,ZM;function _me(){if(ZM)return o_;ZM=1;var e=kme(),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 o_=t,o_}var s_,QM;function Xq(){if(QM)return s_;QM=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 s_=t,s_}var l_,JM;function xme(){if(JM)return l_;JM=1;var e=h9(),n=_me(),t=cl(),i=Xq(),r=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,l=Object.prototype,f=o.toString,c=l.hasOwnProperty,h=RegExp("^"+f.call(c).replace(r,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(p){if(!t(p)||n(p))return!1;var v=e(p)?h:a;return v.test(i(p))}return l_=d,l_}var u_,e8;function Sme(){if(e8)return u_;e8=1;function e(n,t){return n==null?void 0:n[t]}return u_=e,u_}var f_,n8;function Cu(){if(n8)return f_;n8=1;var e=xme(),n=Sme();function t(i,r){var a=n(i,r);return e(a)?a:void 0}return f_=t,f_}var c_,t8;function r0(){if(t8)return c_;t8=1;var e=Cu(),n=e(Object,"create");return c_=n,c_}var d_,i8;function Cme(){if(i8)return d_;i8=1;var e=r0();function n(){this.__data__=e?e(null):{},this.size=0}return d_=n,d_}var h_,r8;function Ame(){if(r8)return h_;r8=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 m_,a8;function Ome(){if(a8)return m_;a8=1;var e=r0(),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 m_=r,m_}var p_,o8;function Eme(){if(o8)return p_;o8=1;var e=r0(),n=Object.prototype,t=n.hasOwnProperty;function i(r){var a=this.__data__;return e?a[r]!==void 0:t.call(a,r)}return p_=i,p_}var v_,s8;function Tme(){if(s8)return v_;s8=1;var e=r0(),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 v_=t,v_}var g_,l8;function jme(){if(l8)return g_;l8=1;var e=Cme(),n=Ame(),t=Ome(),i=Eme(),r=Tme();function a(o){var l=-1,f=o==null?0:o.length;for(this.clear();++l-1}return x_=n,x_}var S_,p8;function Nme(){if(p8)return S_;p8=1;var e=a0();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 S_=n,S_}var C_,v8;function o0(){if(v8)return C_;v8=1;var e=Mme(),n=Dme(),t=Rme(),i=Pme(),r=Nme();function a(o){var l=-1,f=o==null?0:o.length;for(this.clear();++l0?1:-1},Yl=function(n){return uu(n)&&n.indexOf("%")===n.length-1},He=function(n){return rpe(n)&&!Fc(n)},ape=function(n){return Fn(n)},wi=function(n){return He(n)||uu(n)},ope=0,qc=function(n){var t=++ope;return"".concat(n||"").concat(t)},fu=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(!He(n)&&!uu(n))return i;var a;if(Yl(n)){var o=n.indexOf("%");a=t*parseFloat(n.slice(0,o))/100}else a=+n;return Fc(a)&&(a=i),r&&a>t&&(a=t),a},Us=function(n){if(!n)return null;var t=Object.keys(n);return t&&t.length?n[t[0]]:null},spe=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 mpe(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 FS(e){"@babel/helpers - typeof";return FS=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},FS(e)}var U8={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"},Ho=function(n){return typeof n=="string"?n:n?n.displayName||n.name||"Component":""},V8=null,Z_=null,w9=function e(n){if(n===V8&&Array.isArray(Z_))return Z_;var t=[];return A.Children.forEach(n,function(i){Fn(i)||(epe.isFragment(i)?t=t.concat(e(i.props.children)):t.push(i))}),Z_=t,V8=n,t};function sa(e,n){var t=[],i=[];return Array.isArray(n)?i=n.map(function(r){return Ho(r)}):i=[Ho(n)],w9(e).forEach(function(r){var a=oa(r,"type.displayName")||oa(r,"type.name");i.indexOf(a)!==-1&&t.push(r)}),t}function $r(e,n){var t=sa(e,n);return t&&t[0]}var W8=function(n){if(!n||!n.props)return!1;var t=n.props,i=t.width,r=t.height;return!(!He(i)||i<=0||!He(r)||r<=0)},ppe=["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"],vpe=function(n){return n&&n.type&&uu(n.type)&&ppe.indexOf(n.type)>=0},tH=function(n){return n&&FS(n)==="object"&&"clipDot"in n},gpe=function(n,t,i,r){var a,o=(a=X_==null?void 0:X_[r])!==null&&a!==void 0?a:[];return t.startsWith("data-")||!Pn(n)&&(r&&o.includes(t)||fpe.includes(t))||i&&b9.includes(t)},zn=function(n,t,i){if(!n||typeof n=="function"||typeof n=="boolean")return null;var r=n;if(A.isValidElement(n)&&(r=n.props),!Bc(r))return null;var a={};return Object.keys(r).forEach(function(o){var l;gpe((l=r)===null||l===void 0?void 0:l[o],o,t,i)&&(a[o]=r[o])}),a},qS=function e(n,t){if(n===t)return!0;var i=A.Children.count(n);if(i!==A.Children.count(t))return!1;if(i===0)return!0;if(i===1)return G8(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 _pe(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 US(e){var n=e.children,t=e.width,i=e.height,r=e.viewBox,a=e.className,o=e.style,l=e.title,f=e.desc,c=kpe(e,wpe),h=r||{width:t,height:i,x:0,y:0},d=cn("recharts-surface",a);return Z.createElement("svg",HS({},zn(c,!0,"svg"),{className:d,width:t,height:i,style:o,viewBox:"".concat(h.x," ").concat(h.y," ").concat(h.width," ").concat(h.height)}),Z.createElement("title",null,l),Z.createElement("desc",null,f),n)}var xpe=["children","className"];function VS(){return VS=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 Cpe(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 Dt=Z.forwardRef(function(e,n){var t=e.children,i=e.className,r=Spe(e,xpe),a=cn("recharts-layer",i);return Z.createElement("g",VS({className:a},zn(r,!0),{ref:n}),t)}),Uo=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 J_=n,J_}var e2,Z8;function iH(){if(Z8)return e2;Z8=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",r=n+t+i,a="\\ufe0e\\ufe0f",o="\\u200d",l=RegExp("["+o+e+r+a+"]");function f(c){return l.test(c)}return e2=f,e2}var n2,Q8;function Epe(){if(Q8)return n2;Q8=1;function e(n){return n.split("")}return n2=e,n2}var t2,J8;function Tpe(){if(J8)return t2;J8=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",r=n+t+i,a="\\ufe0e\\ufe0f",o="["+e+"]",l="["+r+"]",f="\\ud83c[\\udffb-\\udfff]",c="(?:"+l+"|"+f+")",h="[^"+e+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",y=c+"?",w="["+a+"]?",k="(?:"+v+"(?:"+[h,d,p].join("|")+")"+w+y+")*",_=w+y+k,S="(?:"+[h+l+"?",l,d,p,o].join("|")+")",C=RegExp(f+"(?="+f+")|"+S+_,"g");function E(O){return O.match(C)||[]}return t2=E,t2}var i2,eD;function jpe(){if(eD)return i2;eD=1;var e=Epe(),n=iH(),t=Tpe();function i(r){return n(r)?t(r):e(r)}return i2=i,i2}var r2,nD;function Mpe(){if(nD)return r2;nD=1;var e=Ope(),n=iH(),t=jpe(),i=Qq();function r(a){return function(o){o=i(o);var l=n(o)?t(o):void 0,f=l?l[0]:o.charAt(0),c=l?e(l,1).join(""):o.slice(1);return f[a]()+c}}return r2=r,r2}var a2,tD;function Dpe(){if(tD)return a2;tD=1;var e=Mpe(),n=e("toUpperCase");return a2=n,a2}var Rpe=Dpe();const u0=st(Rpe);function Mt(e){return function(){return e}}const rH=Math.cos,zg=Math.sin,$a=Math.sqrt,Lg=Math.PI,f0=2*Lg,WS=Math.PI,GS=2*WS,Fl=1e-6,Ppe=GS-Fl;function aH(e){this._+=e[0];for(let n=1,t=e.length;n=0))throw new Error(`invalid digits: ${e}`);if(n>15)return aH;const t=10**n;return function(i){this._+=i[0];for(let r=1,a=i.length;rFl)if(!(Math.abs(d*f-c*h)>Fl)||!a)this._append`L${this._x1=n},${this._y1=t}`;else{let v=i-o,y=r-l,w=f*f+c*c,k=v*v+y*y,_=Math.sqrt(w),S=Math.sqrt(p),C=a*Math.tan((WS-Math.acos((w+p-k)/(2*_*S)))/2),E=C/S,O=C/_;Math.abs(E-1)>Fl&&this._append`L${n+E*h},${t+E*d}`,this._append`A${a},${a},0,0,${+(d*v>h*y)},${this._x1=n+O*f},${this._y1=t+O*c}`}}arc(n,t,i,r,a,o){if(n=+n,t=+t,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let l=i*Math.cos(r),f=i*Math.sin(r),c=n+l,h=t+f,d=1^o,p=o?r-a:a-r;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>Fl||Math.abs(this._y1-h)>Fl)&&this._append`L${c},${h}`,i&&(p<0&&(p=p%GS+GS),p>Ppe?this._append`A${i},${i},0,1,${d},${n-l},${t-f}A${i},${i},0,1,${d},${this._x1=c},${this._y1=h}`:p>Fl&&this._append`A${i},${i},0,${+(p>=WS)},${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 k9(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 $pe(n)}function _9(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function oH(e){this._context=e}oH.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 c0(e){return new oH(e)}function sH(e){return e[0]}function lH(e){return e[1]}function uH(e,n){var t=Mt(!0),i=null,r=c0,a=null,o=k9(l);e=typeof e=="function"?e:e===void 0?sH:Mt(e),n=typeof n=="function"?n:n===void 0?lH:Mt(n);function l(f){var c,h=(f=_9(f)).length,d,p=!1,v;for(i==null&&(a=r(v=o())),c=0;c<=h;++c)!(c=v;--y)l.point(C[y],E[y]);l.lineEnd(),l.areaEnd()}_&&(C[p]=+e(k,p,d),E[p]=+n(k,p,d),l.point(i?+i(k,p,d):C[p],t?+t(k,p,d):E[p]))}if(S)return l=null,S+""||null}function h(){return uH().defined(r).curve(o).context(a)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:Mt(+d),i=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:Mt(+d),c):e},c.x1=function(d){return arguments.length?(i=d==null?null:typeof d=="function"?d:Mt(+d),c):i},c.y=function(d){return arguments.length?(n=typeof d=="function"?d:Mt(+d),t=null,c):n},c.y0=function(d){return arguments.length?(n=typeof d=="function"?d:Mt(+d),c):n},c.y1=function(d){return arguments.length?(t=d==null?null:typeof d=="function"?d:Mt(+d),c):t},c.lineX0=c.lineY0=function(){return h().x(e).y(n)},c.lineY1=function(){return h().x(e).y(t)},c.lineX1=function(){return h().x(i).y(n)},c.defined=function(d){return arguments.length?(r=typeof d=="function"?d:Mt(!!d),c):r},c.curve=function(d){return arguments.length?(o=d,a!=null&&(l=o(a)),c):o},c.context=function(d){return arguments.length?(d==null?a=l=null:l=o(a=d),c):a},c}class fH{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 zpe(e){return new fH(e,!0)}function Lpe(e){return new fH(e,!1)}const x9={draw(e,n){const t=$a(n/Lg);e.moveTo(t,0),e.arc(0,0,t,0,f0)}},Ipe={draw(e,n){const t=$a(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()}},cH=$a(1/3),Bpe=cH*2,Fpe={draw(e,n){const t=$a(n/Bpe),i=t*cH;e.moveTo(0,-t),e.lineTo(i,0),e.lineTo(0,t),e.lineTo(-i,0),e.closePath()}},qpe={draw(e,n){const t=$a(n),i=-t/2;e.rect(i,i,t,t)}},Hpe=.8908130915292852,dH=zg(Lg/10)/zg(7*Lg/10),Upe=zg(f0/10)*dH,Vpe=-rH(f0/10)*dH,Wpe={draw(e,n){const t=$a(n*Hpe),i=Upe*t,r=Vpe*t;e.moveTo(0,-t),e.lineTo(i,r);for(let a=1;a<5;++a){const o=f0*a/5,l=rH(o),f=zg(o);e.lineTo(f*t,-l*t),e.lineTo(l*i-f*r,f*i+l*r)}e.closePath()}},o2=$a(3),Gpe={draw(e,n){const t=-$a(n/(o2*3));e.moveTo(0,t*2),e.lineTo(-o2*t,-t),e.lineTo(o2*t,-t),e.closePath()}},Xr=-.5,Zr=$a(3)/2,YS=1/$a(12),Ype=(YS/2+1)*3,Kpe={draw(e,n){const t=$a(n/Ype),i=t/2,r=t*YS,a=i,o=t*YS+t,l=-a,f=o;e.moveTo(i,r),e.lineTo(a,o),e.lineTo(l,f),e.lineTo(Xr*i-Zr*r,Zr*i+Xr*r),e.lineTo(Xr*a-Zr*o,Zr*a+Xr*o),e.lineTo(Xr*l-Zr*f,Zr*l+Xr*f),e.lineTo(Xr*i+Zr*r,Xr*r-Zr*i),e.lineTo(Xr*a+Zr*o,Xr*o-Zr*a),e.lineTo(Xr*l+Zr*f,Xr*f-Zr*l),e.closePath()}};function Xpe(e,n){let t=null,i=k9(r);e=typeof e=="function"?e:Mt(e||x9),n=typeof n=="function"?n:Mt(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:Mt(a),r):e},r.size=function(a){return arguments.length?(n=typeof a=="function"?a:Mt(+a),r):n},r.context=function(a){return arguments.length?(t=a??null,r):t},r}function Ig(){}function Bg(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 hH(e){this._context=e}hH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Bg(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:Bg(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function Zpe(e){return new hH(e)}function mH(e){this._context=e}mH.prototype={areaStart:Ig,areaEnd:Ig,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:Bg(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function Qpe(e){return new mH(e)}function pH(e){this._context=e}pH.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:Bg(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function Jpe(e){return new pH(e)}function vH(e){this._context=e}vH.prototype={areaStart:Ig,areaEnd:Ig,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 eve(e){return new vH(e)}function iD(e){return e<0?-1:1}function rD(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(iD(a)+iD(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function aD(e,n){var t=e._x1-e._x0;return t?(3*(e._y1-e._y0)/t-n)/2:n}function s2(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 Fg(e){this._context=e}Fg.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:s2(this,this._t0,aD(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){var t=NaN;if(e=+e,n=+n,!(e===this._x1&&n===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;break;case 2:this._point=3,s2(this,aD(this,t=rD(this,e,n)),t);break;default:s2(this,this._t0,t=rD(this,e,n));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n,this._t0=t}}};function gH(e){this._context=new yH(e)}(gH.prototype=Object.create(Fg.prototype)).point=function(e,n){Fg.prototype.point.call(this,n,e)};function yH(e){this._context=e}yH.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 nve(e){return new Fg(e)}function tve(e){return new gH(e)}function bH(e){this._context=e}bH.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=oD(e),r=oD(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 rve(e){return new d0(e,.5)}function ave(e){return new d0(e,0)}function ove(e){return new d0(e,1)}function Yf(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 sve(e,n){return e[n]}function lve(e){const n=[];return n.key=e,n}function uve(){var e=Mt([]),n=KS,t=Yf,i=sve;function r(a){var o=Array.from(e.apply(this,arguments),lve),l,f=o.length,c=-1,h;for(const d of a)for(l=0,++c;l0){for(var t,i,r=0,a=e[0].length,o;r0){for(var t=0,i=e[n[0]],r,a=i.length;t0)||!((a=(r=e[n[0]]).length)>0))){for(var t=0,i=1,r,a,o;i=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function yve(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 wH={symbolCircle:x9,symbolCross:Ipe,symbolDiamond:Fpe,symbolSquare:qpe,symbolStar:Wpe,symbolTriangle:Gpe,symbolWye:Kpe},bve=Math.PI/180,wve=function(n){var t="symbol".concat(u0(n));return wH[t]||x9},kve=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*bve;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}},_ve=function(n,t){wH["symbol".concat(u0(n))]=t},S9=function(n){var t=n.type,i=t===void 0?"circle":t,r=n.size,a=r===void 0?64:r,o=n.sizeType,l=o===void 0?"area":o,f=gve(n,hve),c=lD(lD({},f),{},{type:i,size:a,sizeType:l}),h=function(){var k=wve(i),_=Xpe().type(k).size(kve(a,l,i));return _()},d=c.className,p=c.cx,v=c.cy,y=zn(c,!0);return p===+p&&v===+v&&a===+a?Z.createElement("path",XS({},y,{className:cn("recharts-symbols",d),transform:"translate(".concat(p,", ").concat(v,")"),d:h()})):null};S9.registerSymbol=_ve;function Kf(e){"@babel/helpers - typeof";return Kf=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},Kf(e)}function ZS(){return ZS=Object.assign?Object.assign.bind():function(e){for(var n=1;n`);var S=v.inactive?c:v.color;return Z.createElement("li",ZS({className:k,style:d,key:"legend-item-".concat(y)},$g(i.props,v,y)),Z.createElement(US,{width:o,height:o,viewBox:h,style:p},i.renderIcon(v)),Z.createElement("span",{className:"recharts-legend-item-text",style:{color:S}},w?w(_,v,y):_))})}},{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 Z.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])})(A.PureComponent);Uh(C9,"displayName","Legend");Uh(C9,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var l2,fD;function Dve(){if(fD)return l2;fD=1;var e=o0();function n(){this.__data__=new e,this.size=0}return l2=n,l2}var u2,cD;function Rve(){if(cD)return u2;cD=1;function e(n){var t=this.__data__,i=t.delete(n);return this.size=t.size,i}return u2=e,u2}var f2,dD;function Pve(){if(dD)return f2;dD=1;function e(n){return this.__data__.get(n)}return f2=e,f2}var c2,hD;function Nve(){if(hD)return c2;hD=1;function e(n){return this.__data__.has(n)}return c2=e,c2}var d2,mD;function $ve(){if(mD)return d2;mD=1;var e=o0(),n=p9(),t=v9(),i=200;function r(a,o){var l=this.__data__;if(l instanceof e){var f=l.__data__;if(!n||f.lengthv))return!1;var w=d.get(o),k=d.get(l);if(w&&k)return w==l&&k==o;var _=-1,S=!0,C=f&r?new e:void 0;for(d.set(o,l),d.set(l,o);++_-1&&i%1==0&&i-1&&t%1==0&&t<=e}return P2=n,P2}var N2,LD;function Kve(){if(LD)return N2;LD=1;var e=ls(),n=T9(),t=us(),i="[object Arguments]",r="[object Array]",a="[object Boolean]",o="[object Date]",l="[object Error]",f="[object Function]",c="[object Map]",h="[object Number]",d="[object Object]",p="[object RegExp]",v="[object Set]",y="[object String]",w="[object WeakMap]",k="[object ArrayBuffer]",_="[object DataView]",S="[object Float32Array]",C="[object Float64Array]",E="[object Int8Array]",O="[object Int16Array]",T="[object Int32Array]",M="[object Uint8Array]",N="[object Uint8ClampedArray]",F="[object Uint16Array]",R="[object Uint32Array]",L={};L[S]=L[C]=L[E]=L[O]=L[T]=L[M]=L[N]=L[F]=L[R]=!0,L[i]=L[r]=L[k]=L[a]=L[_]=L[o]=L[l]=L[f]=L[c]=L[h]=L[d]=L[p]=L[v]=L[y]=L[w]=!1;function B(G){return t(G)&&n(G.length)&&!!L[e(G)]}return N2=B,N2}var $2,ID;function jH(){if(ID)return $2;ID=1;function e(n){return function(t){return n(t)}}return $2=e,$2}var ch={exports:{}};ch.exports;var BD;function Xve(){return BD||(BD=1,(function(e,n){var t=Kq(),i=n&&!n.nodeType&&n,r=i&&!0&&e&&!e.nodeType&&e,a=r&&r.exports===i,o=a&&t.process,l=(function(){try{var f=r&&r.require&&r.require("util").types;return f||o&&o.binding&&o.binding("util")}catch{}})();e.exports=l})(ch,ch.exports)),ch.exports}var z2,FD;function MH(){if(FD)return z2;FD=1;var e=Kve(),n=jH(),t=Xve(),i=t&&t.isTypedArray,r=i?n(i):e;return z2=r,z2}var L2,qD;function Zve(){if(qD)return L2;qD=1;var e=Wve(),n=O9(),t=yr(),i=TH(),r=E9(),a=MH(),o=Object.prototype,l=o.hasOwnProperty;function f(c,h){var d=t(c),p=!d&&n(c),v=!d&&!p&&i(c),y=!d&&!p&&!v&&a(c),w=d||p||v||y,k=w?e(c.length,String):[],_=k.length;for(var S in c)(h||l.call(c,S))&&!(w&&(S=="length"||v&&(S=="offset"||S=="parent")||y&&(S=="buffer"||S=="byteLength"||S=="byteOffset")||r(S,_)))&&k.push(S);return k}return L2=f,L2}var I2,HD;function Qve(){if(HD)return I2;HD=1;var e=Object.prototype;function n(t){var i=t&&t.constructor,r=typeof i=="function"&&i.prototype||e;return t===r}return I2=n,I2}var B2,UD;function DH(){if(UD)return B2;UD=1;function e(n,t){return function(i){return n(t(i))}}return B2=e,B2}var F2,VD;function Jve(){if(VD)return F2;VD=1;var e=DH(),n=e(Object.keys,Object);return F2=n,F2}var q2,WD;function ege(){if(WD)return q2;WD=1;var e=Qve(),n=Jve(),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 q2=r,q2}var H2,GD;function Jm(){if(GD)return H2;GD=1;var e=h9(),n=T9();function t(i){return i!=null&&n(i.length)&&!e(i)}return H2=t,H2}var U2,YD;function h0(){if(YD)return U2;YD=1;var e=Zve(),n=ege(),t=Jm();function i(r){return t(r)?e(r):n(r)}return U2=i,U2}var V2,KD;function nge(){if(KD)return V2;KD=1;var e=qve(),n=Vve(),t=h0();function i(r){return e(r,t,n)}return V2=i,V2}var W2,XD;function tge(){if(XD)return W2;XD=1;var e=nge(),n=1,t=Object.prototype,i=t.hasOwnProperty;function r(a,o,l,f,c,h){var d=l&n,p=e(a),v=p.length,y=e(o),w=y.length;if(v!=w&&!d)return!1;for(var k=v;k--;){var _=p[k];if(!(d?_ in o:i.call(o,_)))return!1}var S=h.get(a),C=h.get(o);if(S&&C)return S==o&&C==a;var E=!0;h.set(a,o),h.set(o,a);for(var O=d;++k-1}return yx=n,yx}var bx,x7;function _ge(){if(x7)return bx;x7=1;function e(n,t,i){for(var r=-1,a=n==null?0:n.length;++r=o){var _=c?null:r(f);if(_)return a(_);y=!1,p=i,k=new e}else k=c?[]:w;e:for(;++d=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function zge(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 Lge(e){return e.value}function Ige(e,n){if(Z.isValidElement(e))return Z.cloneElement(e,n);if(typeof e=="function")return Z.createElement(e,n);n.ref;var t=$ge(n,Ege);return Z.createElement(C9,t)}var M7=1,Vo=(function(e){function n(){var t;Tge(this,n);for(var i=arguments.length,r=new Array(i),a=0;aM7||Math.abs(r.height-this.lastBoundingBox.height)>M7)&&(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?Ro({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(i){var r=this.props,a=r.layout,o=r.align,l=r.verticalAlign,f=r.margin,c=r.chartWidth,h=r.chartHeight,d,p;if(!i||(i.left===void 0||i.left===null)&&(i.right===void 0||i.right===null))if(o==="center"&&a==="vertical"){var v=this.getBBoxSnapshot();d={left:((c||0)-v.width)/2}}else d=o==="right"?{right:f&&f.right||0}:{left:f&&f.left||0};if(!i||(i.top===void 0||i.top===null)&&(i.bottom===void 0||i.bottom===null))if(l==="middle"){var y=this.getBBoxSnapshot();p={top:((h||0)-y.height)/2}}else p=l==="bottom"?{bottom:f&&f.bottom||0}:{top:f&&f.top||0};return Ro(Ro({},d),p)}},{key:"render",value:function(){var i=this,r=this.props,a=r.content,o=r.width,l=r.height,f=r.wrapperStyle,c=r.payloadUniqBy,h=r.payload,d=Ro(Ro({position:"absolute",width:o||"auto",height:l||"auto"},this.getDefaultPosition(f)),f);return Z.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(v){i.wrapperNode=v}},Ige(a,Ro(Ro({},this.props),{},{payload:zH(h,c,Lge)})))}}],[{key:"getWithHeight",value:function(i,r){var a=Ro(Ro({},this.defaultProps),i.props),o=a.layout;return o==="vertical"&&He(i.props.height)?{height:i.props.height}:o==="horizontal"?{width:i.props.width||r}:null}}])})(A.PureComponent);m0(Vo,"displayName","Legend");m0(Vo,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Sx,D7;function Bge(){if(D7)return Sx;D7=1;var e=Qm(),n=O9(),t=yr(),i=e?e.isConcatSpreadable:void 0;function r(a){return t(a)||n(a)||!!(i&&a&&a[i])}return Sx=r,Sx}var Cx,R7;function BH(){if(R7)return Cx;R7=1;var e=EH(),n=Bge();function t(i,r,a,o,l){var f=-1,c=i.length;for(a||(a=n),l||(l=[]);++f0&&a(h)?r>1?t(h,r-1,a,o,l):e(l,h):o||(l[l.length]=h)}return l}return Cx=t,Cx}var Ax,P7;function Fge(){if(P7)return Ax;P7=1;function e(n){return function(t,i,r){for(var a=-1,o=Object(t),l=r(t),f=l.length;f--;){var c=l[n?f:++a];if(i(o[c],c,o)===!1)break}return t}}return Ax=e,Ax}var Ox,N7;function qge(){if(N7)return Ox;N7=1;var e=Fge(),n=e();return Ox=n,Ox}var Ex,$7;function FH(){if($7)return Ex;$7=1;var e=qge(),n=h0();function t(i,r){return i&&e(i,r,n)}return Ex=t,Ex}var Tx,z7;function Hge(){if(z7)return Tx;z7=1;var e=Jm();function n(t,i){return function(r,a){if(r==null)return r;if(!e(r))return t(r,a);for(var o=r.length,l=i?o:-1,f=Object(r);(i?l--:++li||l&&f&&h&&!c&&!d||a&&f&&h||!r&&h||!o)return 1;if(!a&&!l&&!d&&t=c)return h;var d=r[a];return h*(d=="desc"?-1:1)}}return t.index-i.index}return Px=n,Px}var Nx,H7;function Gge(){if(H7)return Nx;H7=1;var e=g9(),n=y9(),t=dl(),i=qH(),r=Uge(),a=jH(),o=Wge(),l=Hc(),f=yr();function c(h,d,p){d.length?d=e(d,function(w){return f(w)?function(k){return n(k,w.length===1?w[0]:w)}:w}):d=[l];var v=-1;d=e(d,a(t));var y=i(h,function(w,k,_){var S=e(d,function(C){return C(w)});return{criteria:S,index:++v,value:w}});return r(y,function(w,k){return o(w,k,p)})}return Nx=c,Nx}var $x,U7;function Yge(){if(U7)return $x;U7=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 $x=e,$x}var zx,V7;function Kge(){if(V7)return zx;V7=1;var e=Yge(),n=Math.max;function t(i,r,a){return r=n(r===void 0?i.length-1:r,0),function(){for(var o=arguments,l=-1,f=n(o.length-r,0),c=Array(f);++l0){if(++a>=e)return arguments[0]}else a=0;return r.apply(void 0,arguments)}}return Fx=i,Fx}var qx,X7;function Jge(){if(X7)return qx;X7=1;var e=Zge(),n=Qge(),t=n(e);return qx=t,qx}var Hx,Z7;function e1e(){if(Z7)return Hx;Z7=1;var e=Hc(),n=Kge(),t=Jge();function i(r,a){return t(n(r,a,e),r+"")}return Hx=i,Hx}var Ux,Q7;function p0(){if(Q7)return Ux;Q7=1;var e=m9(),n=Jm(),t=E9(),i=cl();function r(a,o,l){if(!i(l))return!1;var f=typeof o;return(f=="number"?n(l)&&t(o,l.length):f=="string"&&o in l)?e(l[o],a):!1}return Ux=r,Ux}var Vx,J7;function n1e(){if(J7)return Vx;J7=1;var e=BH(),n=Gge(),t=e1e(),i=p0(),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 Vx=r,Vx}var t1e=n1e();const D9=st(t1e);function Vh(e){"@babel/helpers - typeof";return Vh=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},Vh(e)}function e4(){return e4=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(Wd,"-left"),He(t)&&n&&He(n.x)&&t=n.y),"".concat(Wd,"-top"),He(i)&&n&&He(n.y)&&iw?Math.max(h,f[i]):Math.max(d,f[i])}function g1e(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 y1e(e){var n=e.allowEscapeViewBox,t=e.coordinate,i=e.offsetTopLeft,r=e.position,a=e.reverseDirection,o=e.tooltipBox,l=e.useTranslate3d,f=e.viewBox,c,h,d;return o.height>0&&o.width>0&&t?(h=tR({allowEscapeViewBox:n,coordinate:t,key:"x",offsetTopLeft:i,position:r,reverseDirection:a,tooltipDimension:o.width,viewBox:f,viewBoxDimension:f.width}),d=tR({allowEscapeViewBox:n,coordinate:t,key:"y",offsetTopLeft:i,position:r,reverseDirection:a,tooltipDimension:o.height,viewBox:f,viewBoxDimension:f.height}),c=g1e({translateX:h,translateY:d,useTranslate3d:l})):c=p1e,{cssProperties:c,cssClasses:v1e({translateX:h,translateY:d,coordinate:t})}}function Zf(e){"@babel/helpers - typeof";return Zf=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},Zf(e)}function iR(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 rR(e){for(var n=1;naR||Math.abs(i.height-this.state.lastBoundingBox.height)>aR)&&this.setState({lastBoundingBox:{width:i.width,height:i.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var i,r;this.props.active&&this.updateBBox(),this.state.dismissed&&(((i=this.props.coordinate)===null||i===void 0?void 0:i.x)!==this.state.dismissedAtCoordinate.x||((r=this.props.coordinate)===null||r===void 0?void 0:r.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var i=this,r=this.props,a=r.active,o=r.allowEscapeViewBox,l=r.animationDuration,f=r.animationEasing,c=r.children,h=r.coordinate,d=r.hasPayload,p=r.isAnimationActive,v=r.offset,y=r.position,w=r.reverseDirection,k=r.useTranslate3d,_=r.viewBox,S=r.wrapperStyle,C=y1e({allowEscapeViewBox:o,coordinate:h,offsetTopLeft:v,position:y,reverseDirection:w,tooltipBox:this.state.lastBoundingBox,useTranslate3d:k,viewBox:_}),E=C.cssClasses,O=C.cssProperties,T=rR(rR({transition:p&&a?"transform ".concat(l,"ms ").concat(f):void 0},O),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&d?"visible":"hidden",position:"absolute",top:0,left:0},S);return Z.createElement("div",{tabIndex:-1,className:E,style:T,ref:function(N){i.wrapperNode=N}},c)}}])})(A.PureComponent),E1e=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Au={isSsr:E1e()};function Qf(e){"@babel/helpers - typeof";return Qf=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},Qf(e)}function oR(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 sR(e){for(var n=1;n0;return Z.createElement(O1e,{allowEscapeViewBox:o,animationDuration:l,animationEasing:f,isAnimationActive:p,active:a,coordinate:h,hasPayload:T,offset:v,position:k,reverseDirection:_,useTranslate3d:S,viewBox:C,wrapperStyle:E},L1e(c,sR(sR({},this.props),{},{payload:O})))}}])})(A.PureComponent);R9(ta,"displayName","Tooltip");R9(ta,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Au.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 Gx,lR;function I1e(){if(lR)return Gx;lR=1;var e=fo(),n=function(){return e.Date.now()};return Gx=n,Gx}var Yx,uR;function B1e(){if(uR)return Yx;uR=1;var e=/\s/;function n(t){for(var i=t.length;i--&&e.test(t.charAt(i)););return i}return Yx=n,Yx}var Kx,fR;function F1e(){if(fR)return Kx;fR=1;var e=B1e(),n=/^\s+/;function t(i){return i&&i.slice(0,e(i)+1).replace(n,"")}return Kx=t,Kx}var Xx,cR;function YH(){if(cR)return Xx;cR=1;var e=F1e(),n=cl(),t=Ic(),i=NaN,r=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt;function f(c){if(typeof c=="number")return c;if(t(c))return i;if(n(c)){var h=typeof c.valueOf=="function"?c.valueOf():c;c=n(h)?h+"":h}if(typeof c!="string")return c===0?c:+c;c=e(c);var d=a.test(c);return d||o.test(c)?l(c.slice(2),d?2:8):r.test(c)?i:+c}return Xx=f,Xx}var Zx,dR;function q1e(){if(dR)return Zx;dR=1;var e=cl(),n=I1e(),t=YH(),i="Expected a function",r=Math.max,a=Math.min;function o(l,f,c){var h,d,p,v,y,w,k=0,_=!1,S=!1,C=!0;if(typeof l!="function")throw new TypeError(i);f=t(f)||0,e(c)&&(_=!!c.leading,S="maxWait"in c,p=S?r(t(c.maxWait)||0,f):p,C="trailing"in c?!!c.trailing:C);function E(G){var U=h,H=d;return h=d=void 0,k=G,v=l.apply(H,U),v}function O(G){return k=G,y=setTimeout(N,f),_?E(G):v}function T(G){var U=G-w,H=G-k,P=f-U;return S?a(P,p-H):P}function M(G){var U=G-w,H=G-k;return w===void 0||U>=f||U<0||S&&H>=p}function N(){var G=n();if(M(G))return F(G);y=setTimeout(N,T(G))}function F(G){return y=void 0,C&&h?E(G):(h=d=void 0,v)}function R(){y!==void 0&&clearTimeout(y),k=0,h=w=d=y=void 0}function L(){return y===void 0?v:F(n())}function B(){var G=n(),U=M(G);if(h=arguments,d=this,w=G,U){if(y===void 0)return O(w);if(S)return clearTimeout(y),y=setTimeout(N,f),E(w)}return y===void 0&&(y=setTimeout(N,f)),v}return B.cancel=R,B.flush=L,B}return Zx=o,Zx}var Qx,hR;function H1e(){if(hR)return Qx;hR=1;var e=q1e(),n=cl(),t="Expected a function";function i(r,a,o){var l=!0,f=!0;if(typeof r!="function")throw new TypeError(t);return n(o)&&(l="leading"in o?!!o.leading:l,f="trailing"in o?!!o.trailing:f),e(r,a,{leading:l,maxWait:a,trailing:f})}return Qx=i,Qx}var U1e=H1e();const KH=st(U1e);function Gh(e){"@babel/helpers - typeof";return Gh=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},Gh(e)}function mR(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 $v(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t0&&(G=KH(G,w,{trailing:!0,leading:!1}));var U=new ResizeObserver(G),H=O.current.getBoundingClientRect(),P=H.width,$=H.height;return L(P,$),U.observe(O.current),function(){U.disconnect()}},[L,w]);var B=A.useMemo(function(){var G=F.containerWidth,U=F.containerHeight;if(G<0||U<0)return null;Uo(Yl(o)||Yl(f),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,o,f),Uo(!t||t>0,"The aspect(%s) must be greater than zero.",t);var H=Yl(o)?G:o,P=Yl(f)?U:f;t&&t>0&&(H?P=H/t:P&&(H=P*t),p&&P>p&&(P=p)),Uo(H>0||P>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.`,H,P,o,f,h,d,t);var $=!Array.isArray(v)&&Ho(v.type).endsWith("Chart");return Z.Children.map(v,function(q){return Z.isValidElement(q)?A.cloneElement(q,$v({width:H,height:P},$?{style:$v({height:"100%",width:"100%",maxHeight:P,maxWidth:H},q.props.style)}:{})):q})},[t,v,f,p,d,h,F,o]);return Z.createElement("div",{id:k?"".concat(k):void 0,className:cn("recharts-responsive-container",_),style:$v($v({},E),{},{width:o,height:f,minWidth:h,minHeight:d,maxHeight:p}),ref:O},B)}),XH=function(n){return null};XH.displayName="Cell";function Yh(e){"@babel/helpers - typeof";return Yh=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},Yh(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 r4(e){for(var n=1;n1&&arguments[1]!==void 0?arguments[1]:{};if(n==null||Au.isSsr)return{width:0,height:0};var i=rye(t),r=JSON.stringify({text:n,copyStyle:i});if(kf.widthCache[r])return kf.widthCache[r];try{var a=document.getElementById(gR);a||(a=document.createElement("span"),a.setAttribute("id",gR),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=r4(r4({},iye),i);Object.assign(a.style,o),a.textContent="".concat(n);var l=a.getBoundingClientRect(),f={width:l.width,height:l.height};return kf.widthCache[r]=f,++kf.cacheCount>tye&&(kf.cacheCount=0,kf.widthCache={}),f}catch{return{width:0,height:0}}},aye=function(n){return{top:n.top+window.scrollY-document.documentElement.clientTop,left:n.left+window.scrollX-document.documentElement.clientLeft}};function Kh(e){"@babel/helpers - typeof";return Kh=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},Kh(e)}function Wg(e,n){return uye(e)||lye(e,n)||sye(e,n)||oye()}function oye(){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 sye(e,n){if(e){if(typeof e=="string")return yR(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 yR(e,n)}}function yR(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 xye(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 SR(e,n){return Oye(e)||Aye(e,n)||Cye(e,n)||Sye()}function Sye(){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 Cye(e,n){if(e){if(typeof e=="string")return CR(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 CR(e,n)}}function CR(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 H.reduce(function(P,$){var q=$.word,Y=$.width,D=P[P.length-1];if(D&&(r==null||a||D.width+Y+i$.width?P:$})};if(!h)return v;for(var w="…",k=function(H){var P=d.slice(0,H),$=eU({breakAll:c,style:f,children:P+w}).wordsWithComputedWidth,q=p($),Y=q.length>o||y(q).width>Number(r);return[Y,q]},_=0,S=d.length-1,C=0,E;_<=S&&C<=d.length-1;){var O=Math.floor((_+S)/2),T=O-1,M=k(T),N=SR(M,2),F=N[0],R=N[1],L=k(O),B=SR(L,1),G=B[0];if(!F&&!G&&(_=O+1),F&&G&&(S=O-1),!F&&G){E=R;break}C++}return E||v},AR=function(n){var t=Fn(n)?[]:n.toString().split(JH);return[{words:t}]},Tye=function(n){var t=n.width,i=n.scaleToFit,r=n.children,a=n.style,o=n.breakAll,l=n.maxLines;if((t||i)&&!Au.isSsr){var f,c,h=eU({breakAll:o,children:r,style:a});if(h){var d=h.wordsWithComputedWidth,p=h.spaceWidth;f=d,c=p}else return AR(r);return Eye({breakAll:o,children:r,maxLines:l,style:a},f,c,t,i)}return AR(r)},OR="#808080",Gg=function(n){var t=n.x,i=t===void 0?0:t,r=n.y,a=r===void 0?0:r,o=n.lineHeight,l=o===void 0?"1em":o,f=n.capHeight,c=f===void 0?"0.71em":f,h=n.scaleToFit,d=h===void 0?!1:h,p=n.textAnchor,v=p===void 0?"start":p,y=n.verticalAnchor,w=y===void 0?"end":y,k=n.fill,_=k===void 0?OR:k,S=xR(n,kye),C=A.useMemo(function(){return Tye({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]),E=S.dx,O=S.dy,T=S.angle,M=S.className,N=S.breakAll,F=xR(S,_ye);if(!wi(i)||!wi(a))return null;var R=i+(He(E)?E:0),L=a+(He(O)?O:0),B;switch(w){case"start":B=Jx("calc(".concat(c,")"));break;case"middle":B=Jx("calc(".concat((C.length-1)/2," * -").concat(l," + (").concat(c," / 2))"));break;default:B=Jx("calc(".concat(C.length-1," * -").concat(l,")"));break}var G=[];if(d){var U=C[0].width,H=S.width;G.push("scale(".concat((He(H)?H/U:1)/U,")"))}return T&&G.push("rotate(".concat(T,", ").concat(R,", ").concat(L,")")),G.length&&(F.transform=G.join(" ")),Z.createElement("text",a4({},zn(F,!0),{x:R,y:L,className:cn("recharts-text",M),textAnchor:v,fill:_.includes("url")?OR:_}),C.map(function(P,$){var q=P.words.join(N?"":" ");return Z.createElement("tspan",{x:R,dy:$===0?B:l,key:"".concat(q,"-").concat($)},q)}))};function Zs(e,n){return e==null||n==null?NaN:en?1:e>=n?0:NaN}function jye(e,n){return e==null||n==null?NaN:ne?1:n>=e?0:NaN}function N9(e){let n,t,i;e.length!==2?(n=Zs,t=(l,f)=>Zs(e(l),f),i=(l,f)=>e(l)-f):(n=e===Zs||e===jye?e:Mye,t=e,i=e);function r(l,f,c=0,h=l.length){if(c>>1;t(l[d],f)<0?c=d+1:h=d}while(c>>1;t(l[d],f)<=0?c=d+1:h=d}while(cc&&i(l[d-1],f)>-i(l[d],f)?d-1:d}return{left:r,center:o,right:a}}function Mye(){return 0}function nU(e){return e===null?NaN:+e}function*Dye(e,n){for(let t of e)t!=null&&(t=+t)>=t&&(yield t)}const Rye=N9(Zs),ep=Rye.right;N9(nU).center;class ER extends Map{constructor(n,t=$ye){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(TR(this,n))}has(n){return super.has(TR(this,n))}set(n,t){return super.set(Pye(this,n),t)}delete(n){return super.delete(Nye(this,n))}}function TR({_intern:e,_key:n},t){const i=n(t);return e.has(i)?e.get(i):t}function Pye({_intern:e,_key:n},t){const i=n(t);return e.has(i)?e.get(i):(e.set(i,t),t)}function Nye({_intern:e,_key:n},t){const i=n(t);return e.has(i)&&(t=e.get(i),e.delete(i)),t}function $ye(e){return e!==null&&typeof e=="object"?e.valueOf():e}function zye(e=Zs){if(e===Zs)return tU;if(typeof e!="function")throw new TypeError("compare is not a function");return(n,t)=>{const i=e(n,t);return i||i===0?i:(e(t,t)===0)-(e(n,n)===0)}}function tU(e,n){return(e==null||!(e>=e))-(n==null||!(n>=n))||(en?1:0)}const Lye=Math.sqrt(50),Iye=Math.sqrt(10),Bye=Math.sqrt(2);function Yg(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>=Lye?10:a>=Iye?5:a>=Bye?2:1;let l,f,c;return r<0?(c=Math.pow(10,-r)/o,l=Math.round(e*c),f=Math.round(n*c),l/cn&&--f,c=-c):(c=Math.pow(10,r)*o,l=Math.round(e/c),f=Math.round(n/c),l*cn&&--f),f0))return[];if(e===n)return[e];const i=n=r))return[];const l=a-r+1,f=new Array(l);if(i)if(o<0)for(let c=0;c=i)&&(t=i);return t}function MR(e,n){let t;for(const i of e)i!=null&&(t>i||t===void 0&&i>=i)&&(t=i);return t}function iU(e,n,t=0,i=1/0,r){if(n=Math.floor(n),t=Math.floor(Math.max(0,t)),i=Math.floor(Math.min(e.length-1,i)),!(t<=n&&n<=i))return e;for(r=r===void 0?tU:zye(r);i>t;){if(i-t>600){const f=i-t+1,c=n-t+1,h=Math.log(f),d=.5*Math.exp(2*h/3),p=.5*Math.sqrt(h*d*(f-d)/f)*(c-f/2<0?-1:1),v=Math.max(t,Math.floor(n-c*d/f+p)),y=Math.min(i,Math.floor(n+(f-c)*d/f+p));iU(e,n,v,y,r)}const a=e[n];let o=t,l=i;for(Gd(e,t,n),r(e[i],a)>0&&Gd(e,t,i);o0;)--l}r(e[t],a)===0?Gd(e,t,l):(++l,Gd(e,l,i)),l<=n&&(t=l+1),n<=l&&(i=l-1)}return e}function Gd(e,n,t){const i=e[n];e[n]=e[t],e[t]=i}function Fye(e,n,t){if(e=Float64Array.from(Dye(e)),!(!(i=e.length)||isNaN(n=+n))){if(n<=0||i<2)return MR(e);if(n>=1)return jR(e);var i,r=(i-1)*n,a=Math.floor(r),o=jR(iU(e,a).subarray(0,a+1)),l=MR(e.subarray(a+1));return o+(l-o)*(r-a)}}function qye(e,n,t=nU){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 Hye(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?Lv(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):t===4?Lv(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=Vye.exec(e))?new pr(n[1],n[2],n[3],1):(n=Wye.exec(e))?new pr(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=Gye.exec(e))?Lv(n[1],n[2],n[3],n[4]):(n=Yye.exec(e))?Lv(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=Kye.exec(e))?LR(n[1],n[2]/100,n[3]/100,1):(n=Xye.exec(e))?LR(n[1],n[2]/100,n[3]/100,n[4]):DR.hasOwnProperty(e)?NR(DR[e]):e==="transparent"?new pr(NaN,NaN,NaN,0):null}function NR(e){return new pr(e>>16&255,e>>8&255,e&255,1)}function Lv(e,n,t,i){return i<=0&&(e=n=t=NaN),new pr(e,n,t,i)}function Jye(e){return e instanceof np||(e=Jh(e)),e?(e=e.rgb(),new pr(e.r,e.g,e.b,e.opacity)):new pr}function f4(e,n,t,i){return arguments.length===1?Jye(e):new pr(e,n,t,i??1)}function pr(e,n,t,i){this.r=+e,this.g=+n,this.b=+t,this.opacity=+i}z9(pr,f4,aU(np,{brighter(e){return e=e==null?Kg:Math.pow(Kg,e),new pr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Zh:Math.pow(Zh,e),new pr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new pr(nu(this.r),nu(this.g),nu(this.b),Xg(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:$R,formatHex:$R,formatHex8:e0e,formatRgb:zR,toString:zR}));function $R(){return`#${Kl(this.r)}${Kl(this.g)}${Kl(this.b)}`}function e0e(){return`#${Kl(this.r)}${Kl(this.g)}${Kl(this.b)}${Kl((isNaN(this.opacity)?1:this.opacity)*255)}`}function zR(){const e=Xg(this.opacity);return`${e===1?"rgb(":"rgba("}${nu(this.r)}, ${nu(this.g)}, ${nu(this.b)}${e===1?")":`, ${e})`}`}function Xg(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function nu(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Kl(e){return e=nu(e),(e<16?"0":"")+e.toString(16)}function LR(e,n,t,i){return i<=0?e=n=t=NaN:t<=0||t>=1?e=n=NaN:n<=0&&(e=NaN),new Aa(e,n,t,i)}function oU(e){if(e instanceof Aa)return new Aa(e.h,e.s,e.l,e.opacity);if(e instanceof np||(e=Jh(e)),!e)return new Aa;if(e instanceof Aa)return e;e=e.rgb();var n=e.r/255,t=e.g/255,i=e.b/255,r=Math.min(n,t,i),a=Math.max(n,t,i),o=NaN,l=a-r,f=(a+r)/2;return l?(n===a?o=(t-i)/l+(t0&&f<1?0:o,new Aa(o,l,f,e.opacity)}function n0e(e,n,t,i){return arguments.length===1?oU(e):new Aa(e,n,t,i??1)}function Aa(e,n,t,i){this.h=+e,this.s=+n,this.l=+t,this.opacity=+i}z9(Aa,n0e,aU(np,{brighter(e){return e=e==null?Kg:Math.pow(Kg,e),new Aa(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Zh:Math.pow(Zh,e),new Aa(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 pr(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 Aa(IR(this.h),Iv(this.s),Iv(this.l),Xg(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=Xg(this.opacity);return`${e===1?"hsl(":"hsla("}${IR(this.h)}, ${Iv(this.s)*100}%, ${Iv(this.l)*100}%${e===1?")":`, ${e})`}`}}));function IR(e){return e=(e||0)%360,e<0?e+360:e}function Iv(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 L9=e=>()=>e;function t0e(e,n){return function(t){return e+t*n}}function i0e(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 r0e(e){return(e=+e)==1?sU:function(n,t){return t-n?i0e(n,t,e):L9(isNaN(n)?t:n)}}function sU(e,n){var t=n-e;return t?t0e(e,t):L9(isNaN(e)?n:e)}const BR=(function e(n){var t=r0e(n);function i(r,a){var o=t((r=f4(r)).r,(a=f4(a)).r),l=t(r.g,a.g),f=t(r.b,a.b),c=sU(r.opacity,a.opacity);return function(h){return r.r=o(h),r.g=l(h),r.b=f(h),r.opacity=c(h),r+""}}return i.gamma=e,i})(1);function a0e(e,n){n||(n=[]);var t=e?Math.min(n.length,e.length):0,i=n.slice(),r;return function(a){for(r=0;rt&&(a=n.slice(t,a),l[o]?l[o]+=a:l[++o]=a),(i=i[0])===(r=r[0])?l[o]?l[o]+=r:l[++o]=r:(l[++o]=null,f.push({i:o,x:Zg(i,r)})),t=n3.lastIndex;return tn&&(t=e,e=n,n=t),function(i){return Math.max(e,Math.min(n,i))}}function v0e(e,n,t){var i=e[0],r=e[1],a=n[0],o=n[1];return r2?g0e:v0e,f=c=null,d}function d(p){return p==null||isNaN(p=+p)?a:(f||(f=l(e.map(i),n,t)))(i(o(p)))}return d.invert=function(p){return o(r((c||(c=l(n,e.map(i),Zg)))(p)))},d.domain=function(p){return arguments.length?(e=Array.from(p,Qg),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=I9,h()},d.clamp=function(p){return arguments.length?(o=p?!0:nr,h()):o!==nr},d.interpolate=function(p){return arguments.length?(t=p,h()):t},d.unknown=function(p){return arguments.length?(a=p,d):a},function(p,v){return i=p,r=v,h()}}function B9(){return v0()(nr,nr)}function y0e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Jg(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 Jf(e){return e=Jg(Math.abs(e)),e?e[1]:NaN}function b0e(e,n){return function(t,i){for(var r=t.length,a=[],o=0,l=e[0],f=0;r>0&&l>0&&(f+l+1>i&&(l=Math.max(1,i-f)),a.push(t.substring(r-=l,r+l)),!((f+=l+1)>i));)l=e[o=(o+1)%e.length];return a.reverse().join(n)}}function w0e(e){return function(n){return n.replace(/[0-9]/g,function(t){return e[+t]})}}var k0e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function em(e){if(!(n=k0e.exec(e)))throw new Error("invalid format: "+e);var n;return new F9({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]})}em.prototype=F9.prototype;function F9(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+""}F9.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 _0e(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 e1;function x0e(e,n){var t=Jg(e,n);if(!t)return e1=void 0,e.toPrecision(n);var i=t[0],r=t[1],a=r-(e1=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")+Jg(e,Math.max(0,n+a-1))[0]}function qR(e,n){var t=Jg(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 HR={"%":(e,n)=>(e*100).toFixed(n),b:e=>Math.round(e).toString(2),c:e=>e+"",d:y0e,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)=>qR(e*100,n),r:qR,s:x0e,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function UR(e){return e}var VR=Array.prototype.map,WR=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function S0e(e){var n=e.grouping===void 0||e.thousands===void 0?UR:b0e(VR.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?UR:w0e(VR.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function c(d,p){d=em(d);var v=d.fill,y=d.align,w=d.sign,k=d.symbol,_=d.zero,S=d.width,C=d.comma,E=d.precision,O=d.trim,T=d.type;T==="n"?(C=!0,T="g"):HR[T]||(E===void 0&&(E=12),O=!0,T="g"),(_||v==="0"&&y==="=")&&(_=!0,v="0",y="=");var M=(p&&p.prefix!==void 0?p.prefix:"")+(k==="$"?t:k==="#"&&/[boxX]/.test(T)?"0"+T.toLowerCase():""),N=(k==="$"?i:/[%p]/.test(T)?o:"")+(p&&p.suffix!==void 0?p.suffix:""),F=HR[T],R=/[defgprs%]/.test(T);E=E===void 0?6:/[gprs]/.test(T)?Math.max(1,Math.min(21,E)):Math.max(0,Math.min(20,E));function L(B){var G=M,U=N,H,P,$;if(T==="c")U=F(B)+U,B="";else{B=+B;var q=B<0||1/B<0;if(B=isNaN(B)?f:F(Math.abs(B),E),O&&(B=_0e(B)),q&&+B==0&&w!=="+"&&(q=!1),G=(q?w==="("?w:l:w==="-"||w==="("?"":w)+G,U=(T==="s"&&!isNaN(B)&&e1!==void 0?WR[8+e1/3]:"")+U+(q&&w==="("?")":""),R){for(H=-1,P=B.length;++H$||$>57){U=($===46?r+B.slice(H+1):B.slice(H))+U,B=B.slice(0,H);break}}}C&&!_&&(B=n(B,1/0));var Y=G.length+B.length+U.length,D=Y>1)+G+B+U+D.slice(Y);break;default:B=D+G+B+U;break}return a(B)}return L.toString=function(){return d+""},L}function h(d,p){var v=Math.max(-8,Math.min(8,Math.floor(Jf(p)/3)))*3,y=Math.pow(10,-v),w=c((d=em(d),d.type="f",d),{suffix:WR[8+v/3]});return function(k){return w(y*k)}}return{format:c,formatPrefix:h}}var Bv,q9,lU;C0e({thousands:",",grouping:[3],currency:["$",""]});function C0e(e){return Bv=S0e(e),q9=Bv.format,lU=Bv.formatPrefix,Bv}function A0e(e){return Math.max(0,-Jf(Math.abs(e)))}function O0e(e,n){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Jf(n)/3)))*3-Jf(Math.abs(e)))}function E0e(e,n){return e=Math.abs(e),n=Math.abs(n)-e,Math.max(0,Jf(n)-Jf(e))+1}function uU(e,n,t,i){var r=l4(e,n,t),a;switch(i=em(i??",f"),i.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(n));return i.precision==null&&!isNaN(a=O0e(r,o))&&(i.precision=a),lU(i,o)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(a=E0e(r,Math.max(Math.abs(e),Math.abs(n))))&&(i.precision=a-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(a=A0e(r))&&(i.precision=a-(i.type==="%")*2);break}}return q9(i)}function hl(e){var n=e.domain;return e.ticks=function(t){var i=n();return o4(i[0],i[i.length-1],t??10)},e.tickFormat=function(t,i){var r=n();return uU(r[0],r[r.length-1],t??10,i)},e.nice=function(t){t==null&&(t=10);var i=n(),r=0,a=i.length-1,o=i[r],l=i[a],f,c,h=10;for(l0;){if(c=s4(o,l,t),c===f)return i[r]=o,i[a]=l,n(i);if(c>0)o=Math.floor(o/c)*c,l=Math.ceil(l/c)*c;else if(c<0)o=Math.ceil(o*c)/c,l=Math.floor(l*c)/c;else break;f=c}return e},e}function n1(){var e=B9();return e.copy=function(){return tp(e,n1())},va.apply(e,arguments),hl(e)}function fU(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,Qg),t):e.slice()},t.unknown=function(i){return arguments.length?(n=i,t):n},t.copy=function(){return fU(e).unknown(n)},e=arguments.length?Array.from(e,Qg):[0,1],hl(t)}function cU(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 R0e(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 KR(e){return(n,t)=>-e(-n,t)}function H9(e){const n=e(GR,YR),t=n.domain;let i=10,r,a;function o(){return r=R0e(i),a=D0e(i),t()[0]<0?(r=KR(r),a=KR(a),e(T0e,j0e)):e(GR,YR),n}return n.base=function(l){return arguments.length?(i=+l,o()):i},n.domain=function(l){return arguments.length?(t(l),o()):t()},n.ticks=l=>{const f=t();let c=f[0],h=f[f.length-1];const d=h0){for(;p<=v;++p)for(y=1;yh)break;_.push(w)}}else for(;p<=v;++p)for(y=i-1;y>=1;--y)if(w=p>0?y/a(-p):y*a(p),!(wh)break;_.push(w)}_.length*2{if(l==null&&(l=10),f==null&&(f=i===10?"s":","),typeof f!="function"&&(!(i%1)&&(f=em(f)).precision==null&&(f.trim=!0),f=q9(f)),l===1/0)return f;const c=Math.max(1,i*l/n.ticks().length);return h=>{let d=h/a(Math.round(r(h)));return d*it(cU(t(),{floor:l=>a(Math.floor(r(l))),ceil:l=>a(Math.ceil(r(l)))})),n}function dU(){const e=H9(v0()).domain([1,10]);return e.copy=()=>tp(e,dU()).base(e.base()),va.apply(e,arguments),e}function XR(e){return function(n){return Math.sign(n)*Math.log1p(Math.abs(n/e))}}function ZR(e){return function(n){return Math.sign(n)*Math.expm1(Math.abs(n))*e}}function U9(e){var n=1,t=e(XR(n),ZR(n));return t.constant=function(i){return arguments.length?e(XR(n=+i),ZR(n)):n},hl(t)}function hU(){var e=U9(v0());return e.copy=function(){return tp(e,hU()).constant(e.constant())},va.apply(e,arguments)}function QR(e){return function(n){return n<0?-Math.pow(-n,e):Math.pow(n,e)}}function P0e(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function N0e(e){return e<0?-e*e:e*e}function V9(e){var n=e(nr,nr),t=1;function i(){return t===1?e(nr,nr):t===.5?e(P0e,N0e):e(QR(t),QR(1/t))}return n.exponent=function(r){return arguments.length?(t=+r,i()):t},hl(n)}function W9(){var e=V9(v0());return e.copy=function(){return tp(e,W9()).exponent(e.exponent())},va.apply(e,arguments),e}function $0e(){return W9.apply(null,arguments).exponent(.5)}function JR(e){return Math.sign(e)*e*e}function z0e(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function mU(){var e=B9(),n=[0,1],t=!1,i;function r(a){var o=z0e(e(a));return isNaN(o)?i:t?Math.round(o):o}return r.invert=function(a){return e.invert(JR(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,Qg)).map(JR)),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 mU(e.domain(),n).round(t).clamp(e.clamp()).unknown(i)},va.apply(r,arguments),hl(r)}function pU(){var e=[],n=[],t=[],i;function r(){var o=0,l=Math.max(1,n.length);for(t=new Array(l-1);++o0?t[l-1]:e[0],l=t?[i[t-1],n]:[i[c-1],i[c]]},o.unknown=function(f){return arguments.length&&(a=f),o},o.thresholds=function(){return i.slice()},o.copy=function(){return vU().domain([e,n]).range(r).unknown(a)},va.apply(hl(o),arguments)}function gU(){var e=[.5],n=[0,1],t,i=1;function r(a){return a!=null&&a<=a?n[ep(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 gU().domain(e).range(n).unknown(t)},va.apply(r,arguments)}const t3=new Date,i3=new Date;function ki(e,n,t,i){function r(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return r.floor=a=>(e(a=new Date(+a)),a),r.ceil=a=>(e(a=new Date(a-1)),n(a,1),e(a),a),r.round=a=>{const o=r(a),l=r.ceil(a);return a-o(n(a=new Date(+a),o==null?1:Math.floor(o)),a),r.range=(a,o,l)=>{const f=[];if(a=r.ceil(a),l=l==null?1:Math.floor(l),!(a0))return f;let c;do f.push(c=new Date(+a)),n(a,l),e(a);while(cki(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)=>(t3.setTime(+a),i3.setTime(+o),e(t3),e(i3),Math.floor(t(t3,i3))),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 t1=ki(()=>{},(e,n)=>{e.setTime(+e+n)},(e,n)=>n-e);t1.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?ki(n=>{n.setTime(Math.floor(n/e)*e)},(n,t)=>{n.setTime(+n+t*e)},(n,t)=>(t-n)/e):t1);t1.range;const zo=1e3,aa=zo*60,Lo=aa*60,Zo=Lo*24,G9=Zo*7,eP=Zo*30,r3=Zo*365,Xl=ki(e=>{e.setTime(e-e.getMilliseconds())},(e,n)=>{e.setTime(+e+n*zo)},(e,n)=>(n-e)/zo,e=>e.getUTCSeconds());Xl.range;const Y9=ki(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*zo)},(e,n)=>{e.setTime(+e+n*aa)},(e,n)=>(n-e)/aa,e=>e.getMinutes());Y9.range;const K9=ki(e=>{e.setUTCSeconds(0,0)},(e,n)=>{e.setTime(+e+n*aa)},(e,n)=>(n-e)/aa,e=>e.getUTCMinutes());K9.range;const X9=ki(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*zo-e.getMinutes()*aa)},(e,n)=>{e.setTime(+e+n*Lo)},(e,n)=>(n-e)/Lo,e=>e.getHours());X9.range;const Z9=ki(e=>{e.setUTCMinutes(0,0,0)},(e,n)=>{e.setTime(+e+n*Lo)},(e,n)=>(n-e)/Lo,e=>e.getUTCHours());Z9.range;const ip=ki(e=>e.setHours(0,0,0,0),(e,n)=>e.setDate(e.getDate()+n),(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*aa)/Zo,e=>e.getDate()-1);ip.range;const g0=ki(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/Zo,e=>e.getUTCDate()-1);g0.range;const yU=ki(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/Zo,e=>Math.floor(e/Zo));yU.range;function Ou(e){return ki(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())*aa)/G9)}const y0=Ou(0),i1=Ou(1),L0e=Ou(2),I0e=Ou(3),ec=Ou(4),B0e=Ou(5),F0e=Ou(6);y0.range;i1.range;L0e.range;I0e.range;ec.range;B0e.range;F0e.range;function Eu(e){return ki(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)/G9)}const b0=Eu(0),r1=Eu(1),q0e=Eu(2),H0e=Eu(3),nc=Eu(4),U0e=Eu(5),V0e=Eu(6);b0.range;r1.range;q0e.range;H0e.range;nc.range;U0e.range;V0e.range;const Q9=ki(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());Q9.range;const J9=ki(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());J9.range;const Qo=ki(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());Qo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ki(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)});Qo.range;const Jo=ki(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());Jo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ki(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)});Jo.range;function bU(e,n,t,i,r,a){const o=[[Xl,1,zo],[Xl,5,5*zo],[Xl,15,15*zo],[Xl,30,30*zo],[a,1,aa],[a,5,5*aa],[a,15,15*aa],[a,30,30*aa],[r,1,Lo],[r,3,3*Lo],[r,6,6*Lo],[r,12,12*Lo],[i,1,Zo],[i,2,2*Zo],[t,1,G9],[n,1,eP],[n,3,3*eP],[e,1,r3]];function l(c,h,d){const p=hk).right(o,p);if(v===o.length)return e.every(l4(c/r3,h/r3,d));if(v===0)return t1.every(Math.max(l4(c,h,d),1));const[y,w]=o[p/o[v-1][2]53)return null;"w"in ne||(ne.w=1),"Z"in ne?(pe=o3(Yd(ne.y,0,1)),Ee=pe.getUTCDay(),pe=Ee>4||Ee===0?r1.ceil(pe):r1(pe),pe=g0.offset(pe,(ne.V-1)*7),ne.y=pe.getUTCFullYear(),ne.m=pe.getUTCMonth(),ne.d=pe.getUTCDate()+(ne.w+6)%7):(pe=a3(Yd(ne.y,0,1)),Ee=pe.getDay(),pe=Ee>4||Ee===0?i1.ceil(pe):i1(pe),pe=ip.offset(pe,(ne.V-1)*7),ne.y=pe.getFullYear(),ne.m=pe.getMonth(),ne.d=pe.getDate()+(ne.w+6)%7)}else("W"in ne||"U"in ne)&&("w"in ne||(ne.w="u"in ne?ne.u%7:"W"in ne?1:0),Ee="Z"in ne?o3(Yd(ne.y,0,1)).getUTCDay():a3(Yd(ne.y,0,1)).getDay(),ne.m=0,ne.d="W"in ne?(ne.w+6)%7+ne.W*7-(Ee+5)%7:ne.w+ne.U*7-(Ee+6)%7);return"Z"in ne?(ne.H+=ne.Z/100|0,ne.M+=ne.Z%100,o3(ne)):a3(ne)}}function N(ae,ue,Ce,ne){for(var Ne=0,pe=ue.length,Ee=Ce.length,Re,we;Ne=Ee)return-1;if(Re=ue.charCodeAt(Ne++),Re===37){if(Re=ue.charAt(Ne++),we=O[Re in nP?ue.charAt(Ne++):Re],!we||(ne=we(ae,Ce,ne))<0)return-1}else if(Re!=Ce.charCodeAt(ne++))return-1}return ne}function F(ae,ue,Ce){var ne=c.exec(ue.slice(Ce));return ne?(ae.p=h.get(ne[0].toLowerCase()),Ce+ne[0].length):-1}function R(ae,ue,Ce){var ne=v.exec(ue.slice(Ce));return ne?(ae.w=y.get(ne[0].toLowerCase()),Ce+ne[0].length):-1}function L(ae,ue,Ce){var ne=d.exec(ue.slice(Ce));return ne?(ae.w=p.get(ne[0].toLowerCase()),Ce+ne[0].length):-1}function B(ae,ue,Ce){var ne=_.exec(ue.slice(Ce));return ne?(ae.m=S.get(ne[0].toLowerCase()),Ce+ne[0].length):-1}function G(ae,ue,Ce){var ne=w.exec(ue.slice(Ce));return ne?(ae.m=k.get(ne[0].toLowerCase()),Ce+ne[0].length):-1}function U(ae,ue,Ce){return N(ae,n,ue,Ce)}function H(ae,ue,Ce){return N(ae,t,ue,Ce)}function P(ae,ue,Ce){return N(ae,i,ue,Ce)}function $(ae){return o[ae.getDay()]}function q(ae){return a[ae.getDay()]}function Y(ae){return f[ae.getMonth()]}function D(ae){return l[ae.getMonth()]}function W(ae){return r[+(ae.getHours()>=12)]}function V(ae){return 1+~~(ae.getMonth()/3)}function z(ae){return o[ae.getUTCDay()]}function X(ae){return a[ae.getUTCDay()]}function ee(ae){return f[ae.getUTCMonth()]}function re(ae){return l[ae.getUTCMonth()]}function le(ae){return r[+(ae.getUTCHours()>=12)]}function be(ae){return 1+~~(ae.getUTCMonth()/3)}return{format:function(ae){var ue=T(ae+="",C);return ue.toString=function(){return ae},ue},parse:function(ae){var ue=M(ae+="",!1);return ue.toString=function(){return ae},ue},utcFormat:function(ae){var ue=T(ae+="",E);return ue.toString=function(){return ae},ue},utcParse:function(ae){var ue=M(ae+="",!0);return ue.toString=function(){return ae},ue}}}var nP={"-":"",_:" ",0:"0"},Ei=/^\s*\d+/,Z0e=/^%/,Q0e=/[\\^$*+?|[\]().{}]/g;function ot(e,n,t){var i=e<0?"-":"",r=(i?-e:e)+"",a=r.length;return i+(a[n.toLowerCase(),t]))}function ebe(e,n,t){var i=Ei.exec(n.slice(t,t+1));return i?(e.w=+i[0],t+i[0].length):-1}function nbe(e,n,t){var i=Ei.exec(n.slice(t,t+1));return i?(e.u=+i[0],t+i[0].length):-1}function tbe(e,n,t){var i=Ei.exec(n.slice(t,t+2));return i?(e.U=+i[0],t+i[0].length):-1}function ibe(e,n,t){var i=Ei.exec(n.slice(t,t+2));return i?(e.V=+i[0],t+i[0].length):-1}function rbe(e,n,t){var i=Ei.exec(n.slice(t,t+2));return i?(e.W=+i[0],t+i[0].length):-1}function tP(e,n,t){var i=Ei.exec(n.slice(t,t+4));return i?(e.y=+i[0],t+i[0].length):-1}function iP(e,n,t){var i=Ei.exec(n.slice(t,t+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),t+i[0].length):-1}function abe(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 obe(e,n,t){var i=Ei.exec(n.slice(t,t+1));return i?(e.q=i[0]*3-3,t+i[0].length):-1}function sbe(e,n,t){var i=Ei.exec(n.slice(t,t+2));return i?(e.m=i[0]-1,t+i[0].length):-1}function rP(e,n,t){var i=Ei.exec(n.slice(t,t+2));return i?(e.d=+i[0],t+i[0].length):-1}function lbe(e,n,t){var i=Ei.exec(n.slice(t,t+3));return i?(e.m=0,e.d=+i[0],t+i[0].length):-1}function aP(e,n,t){var i=Ei.exec(n.slice(t,t+2));return i?(e.H=+i[0],t+i[0].length):-1}function ube(e,n,t){var i=Ei.exec(n.slice(t,t+2));return i?(e.M=+i[0],t+i[0].length):-1}function fbe(e,n,t){var i=Ei.exec(n.slice(t,t+2));return i?(e.S=+i[0],t+i[0].length):-1}function cbe(e,n,t){var i=Ei.exec(n.slice(t,t+3));return i?(e.L=+i[0],t+i[0].length):-1}function dbe(e,n,t){var i=Ei.exec(n.slice(t,t+6));return i?(e.L=Math.floor(i[0]/1e3),t+i[0].length):-1}function hbe(e,n,t){var i=Z0e.exec(n.slice(t,t+1));return i?t+i[0].length:-1}function mbe(e,n,t){var i=Ei.exec(n.slice(t));return i?(e.Q=+i[0],t+i[0].length):-1}function pbe(e,n,t){var i=Ei.exec(n.slice(t));return i?(e.s=+i[0],t+i[0].length):-1}function oP(e,n){return ot(e.getDate(),n,2)}function vbe(e,n){return ot(e.getHours(),n,2)}function gbe(e,n){return ot(e.getHours()%12||12,n,2)}function ybe(e,n){return ot(1+ip.count(Qo(e),e),n,3)}function wU(e,n){return ot(e.getMilliseconds(),n,3)}function bbe(e,n){return wU(e,n)+"000"}function wbe(e,n){return ot(e.getMonth()+1,n,2)}function kbe(e,n){return ot(e.getMinutes(),n,2)}function _be(e,n){return ot(e.getSeconds(),n,2)}function xbe(e){var n=e.getDay();return n===0?7:n}function Sbe(e,n){return ot(y0.count(Qo(e)-1,e),n,2)}function kU(e){var n=e.getDay();return n>=4||n===0?ec(e):ec.ceil(e)}function Cbe(e,n){return e=kU(e),ot(ec.count(Qo(e),e)+(Qo(e).getDay()===4),n,2)}function Abe(e){return e.getDay()}function Obe(e,n){return ot(i1.count(Qo(e)-1,e),n,2)}function Ebe(e,n){return ot(e.getFullYear()%100,n,2)}function Tbe(e,n){return e=kU(e),ot(e.getFullYear()%100,n,2)}function jbe(e,n){return ot(e.getFullYear()%1e4,n,4)}function Mbe(e,n){var t=e.getDay();return e=t>=4||t===0?ec(e):ec.ceil(e),ot(e.getFullYear()%1e4,n,4)}function Dbe(e){var n=e.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+ot(n/60|0,"0",2)+ot(n%60,"0",2)}function sP(e,n){return ot(e.getUTCDate(),n,2)}function Rbe(e,n){return ot(e.getUTCHours(),n,2)}function Pbe(e,n){return ot(e.getUTCHours()%12||12,n,2)}function Nbe(e,n){return ot(1+g0.count(Jo(e),e),n,3)}function _U(e,n){return ot(e.getUTCMilliseconds(),n,3)}function $be(e,n){return _U(e,n)+"000"}function zbe(e,n){return ot(e.getUTCMonth()+1,n,2)}function Lbe(e,n){return ot(e.getUTCMinutes(),n,2)}function Ibe(e,n){return ot(e.getUTCSeconds(),n,2)}function Bbe(e){var n=e.getUTCDay();return n===0?7:n}function Fbe(e,n){return ot(b0.count(Jo(e)-1,e),n,2)}function xU(e){var n=e.getUTCDay();return n>=4||n===0?nc(e):nc.ceil(e)}function qbe(e,n){return e=xU(e),ot(nc.count(Jo(e),e)+(Jo(e).getUTCDay()===4),n,2)}function Hbe(e){return e.getUTCDay()}function Ube(e,n){return ot(r1.count(Jo(e)-1,e),n,2)}function Vbe(e,n){return ot(e.getUTCFullYear()%100,n,2)}function Wbe(e,n){return e=xU(e),ot(e.getUTCFullYear()%100,n,2)}function Gbe(e,n){return ot(e.getUTCFullYear()%1e4,n,4)}function Ybe(e,n){var t=e.getUTCDay();return e=t>=4||t===0?nc(e):nc.ceil(e),ot(e.getUTCFullYear()%1e4,n,4)}function Kbe(){return"+0000"}function lP(){return"%"}function uP(e){return+e}function fP(e){return Math.floor(+e/1e3)}var _f,SU,CU;Xbe({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 Xbe(e){return _f=X0e(e),SU=_f.format,_f.parse,CU=_f.utcFormat,_f.utcParse,_f}function Zbe(e){return new Date(e)}function Qbe(e){return e instanceof Date?+e:+new Date(+e)}function eA(e,n,t,i,r,a,o,l,f,c){var h=B9(),d=h.invert,p=h.domain,v=c(".%L"),y=c(":%S"),w=c("%I:%M"),k=c("%I %p"),_=c("%a %d"),S=c("%b %d"),C=c("%B"),E=c("%Y");function O(T){return(f(T)n(r/(e.length-1)))},t.quantiles=function(i){return Array.from({length:i+1},(r,a)=>Fye(e,a/i))},t.copy=function(){return TU(n).domain(e)},fs.apply(t,arguments)}function k0(){var e=0,n=.5,t=1,i=1,r,a,o,l,f,c=nr,h,d=!1,p;function v(w){return isNaN(w=+w)?p:(w=.5+((w=+h(w))-a)*(i*wt}return l3=e,l3}var u3,mP;function rwe(){if(mP)return u3;mP=1;var e=RU(),n=iwe(),t=Hc();function i(r){return r&&r.length?e(r,t,n):void 0}return u3=i,u3}var awe=rwe();const Gs=st(awe);var f3,pP;function owe(){if(pP)return f3;pP=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};an.decimalPlaces=an.dp=function(){var e=this,n=e.d.length-1,t=(n-e.e)*Nt;if(n=e.d[n],n)for(;n%10==0;n/=10)t--;return t<0?0:t};an.dividedBy=an.div=function(e){return Wo(this,new this.constructor(e))};an.dividedToIntegerBy=an.idiv=function(e){var n=this,t=n.constructor;return Ct(Wo(n,new t(e),0,1),t.precision)};an.equals=an.eq=function(e){return!this.cmp(e)};an.exponent=function(){return hi(this)};an.greaterThan=an.gt=function(e){return this.cmp(e)>0};an.greaterThanOrEqualTo=an.gte=function(e){return this.cmp(e)>=0};an.isInteger=an.isint=function(){return this.e>this.d.length-2};an.isNegative=an.isneg=function(){return this.s<0};an.isPositive=an.ispos=function(){return this.s>0};an.isZero=function(){return this.s===0};an.lessThan=an.lt=function(e){return this.cmp(e)<0};an.lessThanOrEqualTo=an.lte=function(e){return this.cmp(e)<1};an.logarithm=an.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(zr))throw Error(ua+"NaN");if(t.s<1)throw Error(ua+(t.s?"NaN":"-Infinity"));return t.eq(zr)?new i(0):(Ut=!1,n=Wo(nm(t,a),nm(e,a),a),Ut=!0,Ct(n,r))};an.minus=an.sub=function(e){var n=this;return e=new n.constructor(e),n.s==e.s?zU(n,e):NU(n,(e.s=-e.s,e))};an.modulo=an.mod=function(e){var n,t=this,i=t.constructor,r=i.precision;if(e=new i(e),!e.s)throw Error(ua+"NaN");return t.s?(Ut=!1,n=Wo(t,e,0,1).times(e),Ut=!0,t.minus(n)):Ct(new i(t),r)};an.naturalExponential=an.exp=function(){return $U(this)};an.naturalLogarithm=an.ln=function(){return nm(this)};an.negated=an.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};an.plus=an.add=function(e){var n=this;return e=new n.constructor(e),n.s==e.s?NU(n,e):zU(n,(e.s=-e.s,e))};an.precision=an.sd=function(e){var n,t,i,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(tu+e);if(n=hi(r)+1,i=r.d.length-1,t=i*Nt+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};an.squareRoot=an.sqrt=function(){var e,n,t,i,r,a,o,l=this,f=l.constructor;if(l.s<1){if(!l.s)return new f(0);throw Error(ua+"NaN")}for(e=hi(l),Ut=!1,r=Math.sqrt(+l),r==0||r==1/0?(n=Ga(l.d),(n.length+e)%2==0&&(n+="0"),r=Math.sqrt(n),e=Wc((e+1)/2)-(e<0||e%2),r==1/0?n="5e"+e:(n=r.toExponential(),n=n.slice(0,n.indexOf("e")+1)+e),i=new f(n)):i=new f(r.toString()),t=f.precision,r=o=t+3;;)if(a=i,i=a.plus(Wo(l,a,o+2)).times(.5),Ga(a.d).slice(0,o)===(n=Ga(i.d)).slice(0,o)){if(n=n.slice(o-3,o+1),r==o&&n=="4999"){if(Ct(a,t+1,0),a.times(a).eq(l)){i=a;break}}else if(n!="9999")break;o+=4}return Ut=!0,Ct(i,t)};an.times=an.mul=function(e){var n,t,i,r,a,o,l,f,c,h=this,d=h.constructor,p=h.d,v=(e=new d(e)).d;if(!h.s||!e.s)return new d(0);for(e.s*=h.s,t=h.e+e.e,f=p.length,c=v.length,f=0;){for(n=0,r=f+i;r>i;)l=a[r]+v[i]*p[r-i-1]+n,a[r--]=l%Si|0,n=l/Si|0;a[r]=(a[r]+n)%Si|0}for(;!a[--o];)a.pop();return n?++t:a.shift(),e.d=a,e.e=t,Ut?Ct(e,d.precision):e};an.toDecimalPlaces=an.todp=function(e,n){var t=this,i=t.constructor;return t=new i(t),e===void 0?t:(io(e,0,Vc),n===void 0?n=i.rounding:io(n,0,8),Ct(t,e+hi(t)+1,n))};an.toExponential=function(e,n){var t,i=this,r=i.constructor;return e===void 0?t=cu(i,!0):(io(e,0,Vc),n===void 0?n=r.rounding:io(n,0,8),i=Ct(new r(i),e+1,n),t=cu(i,!0,e+1)),t};an.toFixed=function(e,n){var t,i,r=this,a=r.constructor;return e===void 0?cu(r):(io(e,0,Vc),n===void 0?n=a.rounding:io(n,0,8),i=Ct(new a(r),e+hi(r)+1,n),t=cu(i.abs(),!1,e+hi(i)+1),r.isneg()&&!r.isZero()?"-"+t:t)};an.toInteger=an.toint=function(){var e=this,n=e.constructor;return Ct(new n(e),hi(e)+1,n.rounding)};an.toNumber=function(){return+this};an.toPower=an.pow=function(e){var n,t,i,r,a,o,l=this,f=l.constructor,c=12,h=+(e=new f(e));if(!e.s)return new f(zr);if(l=new f(l),!l.s){if(e.s<1)throw Error(ua+"Infinity");return l}if(l.eq(zr))return l;if(i=f.precision,e.eq(zr))return Ct(l,i);if(n=e.e,t=e.d.length-1,o=n>=t,a=l.s,o){if((t=h<0?-h:h)<=PU){for(r=new f(zr),n=Math.ceil(i/Nt+4),Ut=!1;t%2&&(r=r.times(l),kP(r.d,n)),t=Wc(t/2),t!==0;)l=l.times(l),kP(l.d,n);return Ut=!0,e.s<0?new f(zr).div(r):Ct(r,i)}}else if(a<0)throw Error(ua+"NaN");return a=a<0&&e.d[Math.max(n,t)]&1?-1:1,l.s=1,Ut=!1,r=e.times(nm(l,i+c)),Ut=!0,r=$U(r),r.s=a,r};an.toPrecision=function(e,n){var t,i,r=this,a=r.constructor;return e===void 0?(t=hi(r),i=cu(r,t<=a.toExpNeg||t>=a.toExpPos)):(io(e,1,Vc),n===void 0?n=a.rounding:io(n,0,8),r=Ct(new a(r),e,n),t=hi(r),i=cu(r,e<=t||t<=a.toExpNeg,e)),i};an.toSignificantDigits=an.tosd=function(e,n){var t=this,i=t.constructor;return e===void 0?(e=i.precision,n=i.rounding):(io(e,1,Vc),n===void 0?n=i.rounding:io(n,0,8)),Ct(new i(t),e,n)};an.toString=an.valueOf=an.val=an.toJSON=an[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,n=hi(e),t=e.constructor;return cu(e,n<=t.toExpNeg||n>=t.toExpPos)};function NU(e,n){var t,i,r,a,o,l,f,c,h=e.constructor,d=h.precision;if(!e.s||!n.s)return n.s||(n=new h(e)),Ut?Ct(n,d):n;if(f=e.d,c=n.d,o=e.e,r=n.e,f=f.slice(),a=o-r,a){for(a<0?(i=f,a=-a,l=c.length):(i=c,r=o,l=f.length),o=Math.ceil(d/Nt),l=o>l?o+1:l+1,a>l&&(a=l,i.length=1),i.reverse();a--;)i.push(0);i.reverse()}for(l=f.length,a=c.length,l-a<0&&(a=l,i=c,c=f,f=i),t=0;a;)t=(f[--a]=f[a]+c[a]+t)/Si|0,f[a]%=Si;for(t&&(f.unshift(t),++r),l=f.length;f[--l]==0;)f.pop();return n.d=f,n.e=r,Ut?Ct(n,d):n}function io(e,n,t){if(e!==~~e||et)throw Error(tu+e)}function Ga(e){var n,t,i,r=e.length-1,a="",o=e[0];if(r>0){for(a+=o,n=1;no?1:-1;else for(l=f=0;lr[l]?1:-1;break}return f}function t(i,r,a){for(var o=0;a--;)i[a]-=o,o=i[a]1;)i.shift()}return function(i,r,a,o){var l,f,c,h,d,p,v,y,w,k,_,S,C,E,O,T,M,N,F=i.constructor,R=i.s==r.s?1:-1,L=i.d,B=r.d;if(!i.s)return new F(i);if(!r.s)throw Error(ua+"Division by zero");for(f=i.e-r.e,M=B.length,O=L.length,v=new F(R),y=v.d=[],c=0;B[c]==(L[c]||0);)++c;if(B[c]>(L[c]||0)&&--f,a==null?S=a=F.precision:o?S=a+(hi(i)-hi(r))+1:S=a,S<0)return new F(0);if(S=S/Nt+2|0,c=0,M==1)for(h=0,B=B[0],S++;(c1&&(B=e(B,h),L=e(L,h),M=B.length,O=L.length),E=M,w=L.slice(0,M),k=w.length;k=Si/2&&++T;do h=0,l=n(B,w,M,k),l<0?(_=w[0],M!=k&&(_=_*Si+(w[1]||0)),h=_/T|0,h>1?(h>=Si&&(h=Si-1),d=e(B,h),p=d.length,k=w.length,l=n(d,w,p,k),l==1&&(h--,t(d,M16)throw Error(iA+hi(e));if(!e.s)return new h(zr);for(Ut=!1,l=d,o=new h(.03125);e.abs().gte(.1);)e=e.times(o),c+=5;for(i=Math.log(ql(2,c))/Math.LN10*2+5|0,l+=i,t=r=a=new h(zr),h.precision=l;;){if(r=Ct(r.times(e),l),t=t.times(++f),o=a.plus(Wo(r,t,l)),Ga(o.d).slice(0,l)===Ga(a.d).slice(0,l)){for(;c--;)a=Ct(a.times(a),l);return h.precision=d,n==null?(Ut=!0,Ct(a,d)):a}a=o}}function hi(e){for(var n=e.e*Nt,t=e.d[0];t>=10;t/=10)n++;return n}function p3(e,n,t){if(n>e.LN10.sd())throw Ut=!0,t&&(e.precision=t),Error(ua+"LN10 precision limit exceeded");return Ct(new e(e.LN10),n)}function qs(e){for(var n="";e--;)n+="0";return n}function nm(e,n){var t,i,r,a,o,l,f,c,h,d=1,p=10,v=e,y=v.d,w=v.constructor,k=w.precision;if(v.s<1)throw Error(ua+(v.s?"NaN":"-Infinity"));if(v.eq(zr))return new w(0);if(n==null?(Ut=!1,c=k):c=n,v.eq(10))return n==null&&(Ut=!0),p3(w,c);if(c+=p,w.precision=c,t=Ga(y),i=t.charAt(0),a=hi(v),Math.abs(a)<15e14){for(;i<7&&i!=1||i==1&&t.charAt(1)>3;)v=v.times(e),t=Ga(v.d),i=t.charAt(0),d++;a=hi(v),i>1?(v=new w("0."+t),a++):v=new w(i+"."+t.slice(1))}else return f=p3(w,c+2,k).times(a+""),v=nm(new w(i+"."+t.slice(1)),c-p).plus(f),w.precision=k,n==null?(Ut=!0,Ct(v,k)):v;for(l=o=v=Wo(v.minus(zr),v.plus(zr),c),h=Ct(v.times(v),c),r=3;;){if(o=Ct(o.times(h),c),f=l.plus(Wo(o,new w(r),c)),Ga(f.d).slice(0,c)===Ga(l.d).slice(0,c))return l=l.times(2),a!==0&&(l=l.plus(p3(w,c+2,k).times(a+""))),l=Wo(l,new w(d),c),w.precision=k,n==null?(Ut=!0,Ct(l,k)):l;l=f,r+=2}}function wP(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=Wc(t/Nt),e.d=[],i=(t+1)%Nt,t<0&&(i+=Nt),ia1||e.e<-a1))throw Error(iA+t)}else e.s=0,e.e=0,e.d=[0];return e}function Ct(e,n,t){var i,r,a,o,l,f,c,h,d=e.d;for(o=1,a=d[0];a>=10;a/=10)o++;if(i=n-o,i<0)i+=Nt,r=n,c=d[h=0];else{if(h=Math.ceil((i+1)/Nt),a=d.length,h>=a)return e;for(c=a=d[h],o=1;a>=10;a/=10)o++;i%=Nt,r=i-Nt+o}if(t!==void 0&&(a=ql(10,o-r-1),l=c/a%10|0,f=n<0||d[h+1]!==void 0||c%a,f=t<4?(l||f)&&(t==0||t==(e.s<0?3:2)):l>5||l==5&&(t==4||f||t==6&&(i>0?r>0?c/ql(10,o-r):0:d[h-1])%10&1||t==(e.s<0?8:7))),n<1||!d[0])return f?(a=hi(e),d.length=1,n=n-a-1,d[0]=ql(10,(Nt-n%Nt)%Nt),e.e=Wc(-n/Nt)||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=ql(10,Nt-i),d[h]=r>0?(c/ql(10,o-r)%ql(10,r)|0)*a:0),f)for(;;)if(h==0){(d[0]+=a)==Si&&(d[0]=1,++e.e);break}else{if(d[h]+=a,d[h]!=Si)break;d[h--]=0,a=1}for(i=d.length;d[--i]===0;)d.pop();if(Ut&&(e.e>a1||e.e<-a1))throw Error(iA+hi(e));return e}function zU(e,n){var t,i,r,a,o,l,f,c,h,d,p=e.constructor,v=p.precision;if(!e.s||!n.s)return n.s?n.s=-n.s:n=new p(e),Ut?Ct(n,v):n;if(f=e.d,d=n.d,i=n.e,c=e.e,f=f.slice(),o=c-i,o){for(h=o<0,h?(t=f,o=-o,l=d.length):(t=d,i=c,l=f.length),r=Math.max(Math.ceil(v/Nt),l)+2,o>r&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for(r=f.length,l=d.length,h=r0;--r)f[l++]=0;for(r=d.length;r>o;){if(f[--r]0?a=a.charAt(0)+"."+a.slice(1)+qs(i):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(r<0?"e":"e+")+r):r<0?(a="0."+qs(-r-1)+a,t&&(i=t-o)>0&&(a+=qs(i))):r>=o?(a+=qs(r+1-o),t&&(i=t-r-1)>0&&(a=a+"."+qs(i))):((i=r+1)0&&(r+1===o&&(a+="."),a+=qs(i))),e.s<0?"-"+a:a}function kP(e,n){if(e.length>n)return e.length=n,!0}function LU(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(tu+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 wP(o,a.toString())}else if(typeof a!="string")throw Error(tu+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,vwe.test(a))wP(o,a);else throw Error(tu+a)}if(r.prototype=an,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=LU,r.config=r.set=gwe,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(tu+t+": "+i);if((i=e[t="LN10"])!==void 0)if(i==Math.LN10)this[t]=new this(i);else throw Error(tu+t+": "+i);return this}var rA=LU(pwe);zr=new rA(1);const bt=rA;function ywe(e){return _we(e)||kwe(e)||wwe(e)||bwe()}function bwe(){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 wwe(e,n){if(e){if(typeof e=="string")return h4(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 h4(e,n)}}function kwe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function _we(e){if(Array.isArray(e))return h4(e)}function h4(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,_P(function(){for(var l=arguments.length,f=new Array(l),c=0;ce.length)&&(n=e.length);for(var t=0,i=new Array(n);t"u"||!(Symbol.iterator in Object(e)))){var t=[],i=!0,r=!1,a=void 0;try{for(var o=e[Symbol.iterator](),l;!(i=(l=o.next()).done)&&(t.push(l.value),!(n&&t.length===n));i=!0);}catch(f){r=!0,a=f}finally{try{!i&&o.return!=null&&o.return()}finally{if(r)throw a}}return t}}function zwe(e){if(Array.isArray(e))return e}function HU(e){var n=tm(e,2),t=n[0],i=n[1],r=t,a=i;return t>i&&(r=i,a=t),[r,a]}function UU(e,n,t){if(e.lte(0))return new bt(0);var i=S0.getDigitCount(e.toNumber()),r=new bt(10).pow(i),a=e.div(r),o=i!==1?.05:.1,l=new bt(Math.ceil(a.div(o).toNumber())).add(t).mul(o),f=l.mul(r);return n?f:new bt(Math.ceil(f))}function Lwe(e,n,t){var i=1,r=new bt(e);if(!r.isint()&&t){var a=Math.abs(e);a<1?(i=new bt(10).pow(S0.getDigitCount(e)-1),r=new bt(Math.floor(r.div(i).toNumber())).mul(i)):a>1&&(r=new bt(Math.floor(e)))}else e===0?r=new bt(Math.floor((n-1)/2)):t||(r=new bt(Math.floor(e)));var o=Math.floor((n-1)/2),l=Awe(Cwe(function(f){return r.add(new bt(f-o).mul(i)).toNumber()}),m4);return l(0,n)}function VU(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 bt(0),tickMin:new bt(0),tickMax:new bt(0)};var a=UU(new bt(n).sub(e).div(t-1),i,r),o;e<=0&&n>=0?o=new bt(0):(o=new bt(e).add(n).div(2),o=o.sub(new bt(o).mod(a)));var l=Math.ceil(o.sub(e).div(a).toNumber()),f=Math.ceil(new bt(n).sub(o).div(a).toNumber()),c=l+f+1;return c>t?VU(e,n,t,i,r+1):(c0?f+(t-c):f,l=n>0?l:l+(t-c)),{step:a,tickMin:o.sub(new bt(l).mul(a)),tickMax:o.add(new bt(f).mul(a))})}function Iwe(e){var n=tm(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=HU([t,i]),f=tm(l,2),c=f[0],h=f[1];if(c===-1/0||h===1/0){var d=h===1/0?[c].concat(v4(m4(0,r-1).map(function(){return 1/0}))):[].concat(v4(m4(0,r-1).map(function(){return-1/0})),[h]);return t>i?p4(d):d}if(c===h)return Lwe(c,r,a);var p=VU(c,h,o,a),v=p.step,y=p.tickMin,w=p.tickMax,k=S0.rangeStep(y,w.add(new bt(.1).mul(v)),v);return t>i?p4(k):k}function Bwe(e,n){var t=tm(e,2),i=t[0],r=t[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=HU([i,r]),l=tm(o,2),f=l[0],c=l[1];if(f===-1/0||c===1/0)return[i,r];if(f===c)return[f];var h=Math.max(n,2),d=UU(new bt(c).sub(f).div(h-1),a,0),p=[].concat(v4(S0.rangeStep(new bt(f),new bt(c).sub(new bt(.99).mul(d)),d)),[c]);return i>r?p4(p):p}var Fwe=FU(Iwe),qwe=FU(Bwe),Hwe="Invariant failed";function du(e,n){throw new Error(Hwe)}var Uwe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function ic(e){"@babel/helpers - typeof";return ic=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},ic(e)}function o1(){return o1=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 Zwe(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 Qwe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Jwe(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);t1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,l=(t=i==null?void 0:i.length)!==null&&t!==void 0?t:0;if(l<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var f=a.range,c=0;c0?r[c-1].coordinate:r[l-1].coordinate,d=r[c].coordinate,p=c>=l-1?r[0].coordinate:r[c+1].coordinate,v=void 0;if(Ta(d-h)!==Ta(p-d)){var y=[];if(Ta(p-d)===Ta(f[1]-f[0])){v=p;var w=d+f[1]-f[0];y[0]=Math.min(w,(w+h)/2),y[1]=Math.max(w,(w+h)/2)}else{v=h;var k=p+f[1]-f[0];y[0]=Math.min(d,(k+d)/2),y[1]=Math.max(d,(k+d)/2)}var _=[Math.min(d,(v+d)/2),Math.max(d,(v+d)/2)];if(n>_[0]&&n<=_[1]||n>=y[0]&&n<=y[1]){o=r[c].index;break}}else{var S=Math.min(h,p),C=Math.max(h,p);if(n>(S+d)/2&&n<=(C+d)/2){o=r[c].index;break}}}else for(var E=0;E0&&E(i[E].coordinate+i[E-1].coordinate)/2&&n<=(i[E].coordinate+i[E+1].coordinate)/2||E===l-1&&n>(i[E].coordinate+i[E-1].coordinate)/2){o=i[E].index;break}return o},aA=function(n){var t,i=n,r=i.type.displayName,a=(t=n.type)!==null&&t!==void 0&&t.defaultProps?Xt(Xt({},n.type.defaultProps),n.props):n.props,o=a.stroke,l=a.fill,f;switch(r){case"Line":f=o;break;case"Area":case"Radar":f=o&&o!=="none"?o:l;break;default:f=l;break}return f},vke=function(n){var t=n.barSize,i=n.totalSize,r=n.stackGroups,a=r===void 0?{}:r;if(!a)return{};for(var o={},l=Object.keys(a),f=0,c=l.length;f=0});if(_&&_.length){var S=_[0].type.defaultProps,C=S!==void 0?Xt(Xt({},S),_[0].props):_[0].props,E=C.barSize,O=C[k];o[O]||(o[O]=[]);var T=Fn(E)?t:E;o[O].push({item:_[0],stackList:_.slice(1),barSize:Fn(T)?void 0:fu(T,i,0)})}}return o},gke=function(n){var t=n.barGap,i=n.barCategoryGap,r=n.bandSize,a=n.sizeList,o=a===void 0?[]:a,l=n.maxBarSize,f=o.length;if(f<1)return null;var c=fu(t,r,0,!0),h,d=[];if(o[0].barSize===+o[0].barSize){var p=!1,v=r/f,y=o.reduce(function(E,O){return E+O.barSize||0},0);y+=(f-1)*c,y>=r&&(y-=(f-1)*c,c=0),y>=r&&v>0&&(p=!0,v*=.9,y=f*v);var w=(r-y)/2>>0,k={offset:w-c,size:0};h=o.reduce(function(E,O){var T={item:O.item,position:{offset:k.offset+k.size+c,size:p?v:O.barSize}},M=[].concat(CP(E),[T]);return k=M[M.length-1].position,O.stackList&&O.stackList.length&&O.stackList.forEach(function(N){M.push({item:N,position:k})}),M},d)}else{var _=fu(i,r,0,!0);r-2*_-(f-1)*c<=0&&(c=0);var S=(r-2*_-(f-1)*c)/f;S>1&&(S>>=0);var C=l===+l?Math.min(S,l):S;h=o.reduce(function(E,O,T){var M=[].concat(CP(E),[{item:O.item,position:{offset:_+(S+c)*T+(S-C)/2,size:C}}]);return O.stackList&&O.stackList.length&&O.stackList.forEach(function(N){M.push({item:N,position:M[M.length-1].position})}),M},d)}return h},yke=function(n,t,i,r){var a=i.children,o=i.width,l=i.margin,f=o-(l.left||0)-(l.right||0),c=KU({children:a,legendWidth:f});if(c){var h=r||{},d=h.width,p=h.height,v=c.align,y=c.verticalAlign,w=c.layout;if((w==="vertical"||w==="horizontal"&&y==="middle")&&v!=="center"&&He(n[v]))return Xt(Xt({},n),{},Lf({},v,n[v]+(d||0)));if((w==="horizontal"||w==="vertical"&&v==="center")&&y!=="middle"&&He(n[y]))return Xt(Xt({},n),{},Lf({},y,n[y]+(p||0)))}return n},bke=function(n,t,i){return Fn(t)?!0:n==="horizontal"?t==="yAxis":n==="vertical"||i==="x"?t==="xAxis":i==="y"?t==="yAxis":!0},XU=function(n,t,i,r,a){var o=t.props.children,l=sa(o,rp).filter(function(c){return bke(r,a,c.props.direction)});if(l&&l.length){var f=l.map(function(c){return c.props.dataKey});return n.reduce(function(c,h){var d=ir(h,i);if(Fn(d))return c;var p=Array.isArray(d)?[_0(d),Gs(d)]:[d,d],v=f.reduce(function(y,w){var k=ir(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(_,y[0]),Math.max(S,y[1])]},[1/0,-1/0]);return[Math.min(v[0],c[0]),Math.max(v[1],c[1])]},[1/0,-1/0])}return null},wke=function(n,t,i,r,a){var o=t.map(function(l){return XU(n,l,i,a,r)}).filter(function(l){return!Fn(l)});return o&&o.length?o.reduce(function(l,f){return[Math.min(l[0],f[0]),Math.max(l[1],f[1])]},[1/0,-1/0]):null},ZU=function(n,t,i,r,a){var o=t.map(function(f){var c=f.props.dataKey;return i==="number"&&c&&XU(n,f,c,r)||Sh(n,c,i,a)});if(i==="number")return o.reduce(function(f,c){return[Math.min(f[0],c[0]),Math.max(f[1],c[1])]},[1/0,-1/0]);var l={};return o.reduce(function(f,c){for(var h=0,d=c.length;h=2?Ta(l[0]-l[1])*2*c:c,t&&(n.ticks||n.niceTicks)){var h=(n.ticks||n.niceTicks).map(function(d){var p=a?a.indexOf(d):d;return{coordinate:r(p)+c,value:d,offset:c}});return h.filter(function(d){return!Fc(d.coordinate)})}return n.isCategorical&&n.categoricalDomain?n.categoricalDomain.map(function(d,p){return{coordinate:r(d)+c,value:d,index:p,offset:c}}):r.ticks&&!i?r.ticks(n.tickCount).map(function(d){return{coordinate:r(d)+c,value:d,offset:c}}):r.domain().map(function(d,p){return{coordinate:r(d)+c,value:a?a[d]:d,index:p,offset:c}})},v3=new WeakMap,Fv=function(n,t){if(typeof t!="function")return n;v3.has(n)||v3.set(n,new WeakMap);var i=v3.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},kke=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:Xh(),realScaleType:"band"}:o==="radial"&&l==="angleAxis"?{scale:n1(),realScaleType:"linear"}:a==="category"&&t&&(t.indexOf("LineChart")>=0||t.indexOf("AreaChart")>=0||t.indexOf("ComposedChart")>=0&&!i)?{scale:xh(),realScaleType:"point"}:a==="category"?{scale:Xh(),realScaleType:"band"}:{scale:n1(),realScaleType:"linear"};if(uu(r)){var f="scale".concat(u0(r));return{scale:(cP[f]||xh)(),realScaleType:cP[f]?f:"point"}}return Pn(r)?{scale:r}:{scale:xh(),realScaleType:"point"}},OP=1e-4,_ke=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])-OP,o=Math.max(r[0],r[1])+OP,l=n(t[0]),f=n(t[i-1]);(lo||fo)&&n.domain([t[0],t[i-1]])}},xke=function(n,t){if(!n)return null;for(var i=0,r=n.length;ir)&&(a[1]=r),a[0]>r&&(a[0]=r),a[1]=0?(n[l][i][0]=a,n[l][i][1]=a+f,a=n[l][i][1]):(n[l][i][0]=o,n[l][i][1]=o+f,o=n[l][i][1])}},Ake=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)}},Oke={sign:Cke,expand:fve,none:Yf,silhouette:cve,wiggle:dve,positive:Ake},Eke=function(n,t,i){var r=t.map(function(l){return l.props.dataKey}),a=Oke[i],o=uve().keys(r).value(function(l,f){return+ir(l,f,0)}).order(KS).offset(a);return o(n)},Tke=function(n,t,i,r,a,o){if(!n)return null;var l=o?t.reverse():t,f={},c=l.reduce(function(d,p){var v,y=(v=p.type)!==null&&v!==void 0&&v.defaultProps?Xt(Xt({},p.type.defaultProps),p.props):p.props,w=y.stackId,k=y.hide;if(k)return d;var _=y[i],S=d[_]||{hasStack:!1,stackGroups:{}};if(wi(w)){var C=S.stackGroups[w]||{numericAxisId:i,cateAxisId:r,items:[]};C.items.push(p),S.hasStack=!0,S.stackGroups[w]=C}else S.stackGroups[qc("_stackId_")]={numericAxisId:i,cateAxisId:r,items:[p]};return Xt(Xt({},d),{},Lf({},_,S))},f),h={};return Object.keys(c).reduce(function(d,p){var v=c[p];if(v.hasStack){var y={};v.stackGroups=Object.keys(v.stackGroups).reduce(function(w,k){var _=v.stackGroups[k];return Xt(Xt({},w),{},Lf({},k,{numericAxisId:i,cateAxisId:r,items:_.items,stackedData:Eke(n,_.items,a)}))},y)}return Xt(Xt({},d),{},Lf({},p,v))},h)},jke=function(n,t){var i=t.realScaleType,r=t.type,a=t.tickCount,o=t.originalDomain,l=t.allowDecimals,f=i||t.scale;if(f!=="auto"&&f!=="linear")return null;if(a&&r==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var c=n.domain();if(!c.length)return null;var h=Fwe(c,a,l);return n.domain([_0(h),Gs(h)]),{niceTicks:h}}if(a&&r==="number"){var d=n.domain(),p=qwe(d,a,l);return{niceTicks:p}}return null};function l1(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&&!Fn(r[n.dataKey])){var l=Pg(t,"value",r[n.dataKey]);if(l)return l.coordinate+i/2}return t[a]?t[a].coordinate+i/2:null}var f=ir(r,Fn(o)?n.dataKey:o);return Fn(f)?null:n.scale(f)}var EP=function(n){var t=n.axis,i=n.ticks,r=n.offset,a=n.bandSize,o=n.entry,l=n.index;if(t.type==="category")return i[l]?i[l].coordinate+r:null;var f=ir(o,t.dataKey,t.domain[l]);return Fn(f)?null:t.scale(f)-a/2+r},Mke=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]},Dke=function(n,t){var i,r=(i=n.type)!==null&&i!==void 0&&i.defaultProps?Xt(Xt({},n.type.defaultProps),n.props):n.props,a=r.stackId;if(wi(a)){var o=t[a];if(o){var l=o.items.indexOf(n);return l>=0?o.stackedData[l]:null}}return null},Rke=function(n){return n.reduce(function(t,i){return[_0(i.concat([t[0]]).filter(He)),Gs(i.concat([t[1]]).filter(He))]},[1/0,-1/0])},eV=function(n,t,i){return Object.keys(n).reduce(function(r,a){var o=n[a],l=o.stackedData,f=l.reduce(function(c,h){var d=Rke(h.slice(t,i+1));return[Math.min(c[0],d[0]),Math.max(c[1],d[1])]},[1/0,-1/0]);return[Math.min(f[0],r[0]),Math.max(f[1],r[1])]},[1/0,-1/0]).map(function(r){return r===1/0||r===-1/0?0:r})},TP=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,jP=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,w4=function(n,t,i){if(Pn(n))return n(t,i);if(!Array.isArray(n))return t;var r=[];if(He(n[0]))r[0]=i?n[0]:Math.min(n[0],t[0]);else if(TP.test(n[0])){var a=+TP.exec(n[0])[1];r[0]=t[0]-a}else Pn(n[0])?r[0]=n[0](t[0]):r[0]=t[0];if(He(n[1]))r[1]=i?n[1]:Math.max(n[1],t[1]);else if(jP.test(n[1])){var o=+jP.exec(n[1])[1];r[1]=t[1]+o}else Pn(n[1])?r[1]=n[1](t[1]):r[1]=t[1];return r},u1=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=D9(t,function(d){return d.coordinate}),o=1/0,l=1,f=a.length;lo&&(c=2*Math.PI-c),{radius:l,angle:zke(c),angleInRadian:c}},Bke=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}},Fke=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},PP=function(n,t){var i=n.x,r=n.y,a=Ike({x:i,y:r},t),o=a.radius,l=a.angle,f=t.innerRadius,c=t.outerRadius;if(oc)return!1;if(o===0)return!0;var h=Bke(t),d=h.startAngle,p=h.endAngle,v=l,y;if(d<=p){for(;v>p;)v-=360;for(;v=d&&v<=p}else{for(;v>d;)v-=360;for(;v=p&&v<=d}return y?RP(RP({},t),{},{radius:o,angle:Fke(v,t)}):null};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)}var qke=["offset"];function Hke(e){return Gke(e)||Wke(e)||Vke(e)||Uke()}function Uke(){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 Vke(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 Wke(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Gke(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=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Kke(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 NP(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 gi(e){for(var n=1;n=0?1:-1,C,E;r==="insideStart"?(C=v+S*o,E=w):r==="insideEnd"?(C=y-S*o,E=!w):r==="end"&&(C=y+S*o,E=w),E=_<=0?E:!E;var O=$i(c,h,k,C),T=$i(c,h,k,C+(E?1:-1)*359),M="M".concat(O.x,",").concat(O.y,` + A`).concat(k,",").concat(k,",0,1,").concat(E?0:1,`, + `).concat(T.x,",").concat(T.y),N=Fn(n.id)?qc("recharts-radial-line-"):n.id;return Z.createElement("text",sm({},i,{dominantBaseline:"central",className:cn("recharts-radial-bar-label",l)}),Z.createElement("defs",null,Z.createElement("path",{id:N,d:M})),Z.createElement("textPath",{xlinkHref:"#".concat(N)},t))},t_e=function(n){var t=n.viewBox,i=n.offset,r=n.position,a=t,o=a.cx,l=a.cy,f=a.innerRadius,c=a.outerRadius,h=a.startAngle,d=a.endAngle,p=(h+d)/2;if(r==="outside"){var v=$i(o,l,c+i,p),y=v.x,w=v.y;return{x:y,y:w,textAnchor:y>=o?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"end"};var k=(f+c)/2,_=$i(o,l,k,p),S=_.x,C=_.y;return{x:S,y:C,textAnchor:"middle",verticalAnchor:"middle"}},i_e=function(n){var t=n.viewBox,i=n.parentViewBox,r=n.offset,a=n.position,o=t,l=o.x,f=o.y,c=o.width,h=o.height,d=h>=0?1:-1,p=d*r,v=d>0?"end":"start",y=d>0?"start":"end",w=c>=0?1:-1,k=w*r,_=w>0?"end":"start",S=w>0?"start":"end";if(a==="top"){var C={x:l+c/2,y:f-d*r,textAnchor:"middle",verticalAnchor:v};return gi(gi({},C),i?{height:Math.max(f-i.y,0),width:c}:{})}if(a==="bottom"){var E={x:l+c/2,y:f+h+p,textAnchor:"middle",verticalAnchor:y};return gi(gi({},E),i?{height:Math.max(i.y+i.height-(f+h),0),width:c}:{})}if(a==="left"){var O={x:l-k,y:f+h/2,textAnchor:_,verticalAnchor:"middle"};return gi(gi({},O),i?{width:Math.max(O.x-i.x,0),height:h}:{})}if(a==="right"){var T={x:l+c+k,y:f+h/2,textAnchor:S,verticalAnchor:"middle"};return gi(gi({},T),i?{width:Math.max(i.x+i.width-T.x,0),height:h}:{})}var M=i?{width:c,height:h}:{};return a==="insideLeft"?gi({x:l+k,y:f+h/2,textAnchor:S,verticalAnchor:"middle"},M):a==="insideRight"?gi({x:l+c-k,y:f+h/2,textAnchor:_,verticalAnchor:"middle"},M):a==="insideTop"?gi({x:l+c/2,y:f+p,textAnchor:"middle",verticalAnchor:y},M):a==="insideBottom"?gi({x:l+c/2,y:f+h-p,textAnchor:"middle",verticalAnchor:v},M):a==="insideTopLeft"?gi({x:l+k,y:f+p,textAnchor:S,verticalAnchor:y},M):a==="insideTopRight"?gi({x:l+c-k,y:f+p,textAnchor:_,verticalAnchor:y},M):a==="insideBottomLeft"?gi({x:l+k,y:f+h-p,textAnchor:S,verticalAnchor:v},M):a==="insideBottomRight"?gi({x:l+c-k,y:f+h-p,textAnchor:_,verticalAnchor:v},M):Bc(a)&&(He(a.x)||Yl(a.x))&&(He(a.y)||Yl(a.y))?gi({x:l+fu(a.x,c),y:f+fu(a.y,h),textAnchor:"end",verticalAnchor:"end"},M):gi({x:l+c/2,y:f+h/2,textAnchor:"middle",verticalAnchor:"middle"},M)},r_e=function(n){return"cx"in n&&He(n.cx)};function Zt(e){var n=e.offset,t=n===void 0?5:n,i=Yke(e,qke),r=gi({offset:t},i),a=r.viewBox,o=r.position,l=r.value,f=r.children,c=r.content,h=r.className,d=h===void 0?"":h,p=r.textBreakAll;if(!a||Fn(l)&&Fn(f)&&!A.isValidElement(c)&&!Pn(c))return null;if(A.isValidElement(c))return A.cloneElement(c,r);var v;if(Pn(c)){if(v=A.createElement(c,r),A.isValidElement(v))return v}else v=Jke(r);var y=r_e(a),w=zn(r,!0);if(y&&(o==="insideStart"||o==="insideEnd"||o==="end"))return n_e(r,v,w);var k=y?t_e(r):i_e(r);return Z.createElement(Gg,sm({className:cn("recharts-label",d)},w,k,{breakAll:p}),v)}Zt.displayName="Label";var tV=function(n){var t=n.cx,i=n.cy,r=n.angle,a=n.startAngle,o=n.endAngle,l=n.r,f=n.radius,c=n.innerRadius,h=n.outerRadius,d=n.x,p=n.y,v=n.top,y=n.left,w=n.width,k=n.height,_=n.clockWise,S=n.labelViewBox;if(S)return S;if(He(w)&&He(k)){if(He(d)&&He(p))return{x:d,y:p,width:w,height:k};if(He(v)&&He(y))return{x:v,y,width:w,height:k}}return He(d)&&He(p)?{x:d,y:p,width:0,height:0}:He(t)&&He(i)?{cx:t,cy:i,startAngle:a||r||0,endAngle:o||r||0,innerRadius:c||0,outerRadius:h||f||l||0,clockWise:_}:n.viewBox?n.viewBox:{}},a_e=function(n,t){return n?n===!0?Z.createElement(Zt,{key:"label-implicit",viewBox:t}):wi(n)?Z.createElement(Zt,{key:"label-implicit",viewBox:t,value:n}):A.isValidElement(n)?n.type===Zt?A.cloneElement(n,{key:"label-implicit",viewBox:t}):Z.createElement(Zt,{key:"label-implicit",content:n,viewBox:t}):Pn(n)?Z.createElement(Zt,{key:"label-implicit",content:n,viewBox:t}):Bc(n)?Z.createElement(Zt,sm({viewBox:t},n,{key:"label-implicit"})):null:null},o_e=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=tV(n),o=sa(r,Zt).map(function(f,c){return A.cloneElement(f,{viewBox:t||a,key:"label-".concat(c)})});if(!i)return o;var l=a_e(n.label,t||a);return[l].concat(Hke(o))};Zt.parseViewBox=tV;Zt.renderCallByParent=o_e;var g3,$P;function s_e(){if($P)return g3;$P=1;function e(n){var t=n==null?0:n.length;return t?n[t-1]:void 0}return g3=e,g3}var l_e=s_e();const u_e=st(l_e);function lm(e){"@babel/helpers - typeof";return lm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},lm(e)}var f_e=["valueAccessor"],c_e=["data","dataKey","clockWise","id","textBreakAll"];function d_e(e){return v_e(e)||p_e(e)||m_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 m_e(e,n){if(e){if(typeof e=="string")return _4(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 _4(e,n)}}function p_e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function v_e(e){if(Array.isArray(e))return _4(e)}function _4(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 w_e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var k_e=function(n){return Array.isArray(n.value)?u_e(n.value):n.value};function Qa(e){var n=e.valueAccessor,t=n===void 0?k_e:n,i=IP(e,f_e),r=i.data,a=i.dataKey,o=i.clockWise,l=i.id,f=i.textBreakAll,c=IP(i,c_e);return!r||!r.length?null:Z.createElement(Dt,{className:"recharts-label-list"},r.map(function(h,d){var p=Fn(a)?t(h,d):ir(h&&h.payload,a),v=Fn(l)?{}:{id:"".concat(l,"-").concat(d)};return Z.createElement(Zt,c1({},zn(h,!0),c,v,{parentViewBox:h.parentViewBox,value:p,textBreakAll:f,viewBox:Zt.parseViewBox(Fn(o)?h:LP(LP({},h),{},{clockWise:o})),key:"label-".concat(d),index:d}))}))}Qa.displayName="LabelList";function __e(e,n){return e?e===!0?Z.createElement(Qa,{key:"labelList-implicit",data:n}):Z.isValidElement(e)||Pn(e)?Z.createElement(Qa,{key:"labelList-implicit",data:n,content:e}):Bc(e)?Z.createElement(Qa,c1({data:n},e,{key:"labelList-implicit"})):null:null}function x_e(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=sa(i,Qa).map(function(o,l){return A.cloneElement(o,{data:n,key:"labelList-".concat(l)})});if(!t)return r;var a=__e(e.label,n);return[a].concat(d_e(r))}Qa.renderCallByParent=x_e;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 x4(){return x4=Object.assign?Object.assign.bind():function(e){for(var n=1;n180),",").concat(+(o>c),`, + `).concat(d.x,",").concat(d.y,` + `);if(r>0){var v=$i(t,i,r,o),y=$i(t,i,r,c);p+="L ".concat(y.x,",").concat(y.y,` + A `).concat(r,",").concat(r,`,0, + `).concat(+(Math.abs(f)>180),",").concat(+(o<=c),`, + `).concat(v.x,",").concat(v.y," Z")}else p+="L ".concat(t,",").concat(i," Z");return p},E_e=function(n){var t=n.cx,i=n.cy,r=n.innerRadius,a=n.outerRadius,o=n.cornerRadius,l=n.forceCornerRadius,f=n.cornerIsExternal,c=n.startAngle,h=n.endAngle,d=Ta(h-c),p=qv({cx:t,cy:i,radius:a,angle:c,sign:d,cornerRadius:o,cornerIsExternal:f}),v=p.circleTangency,y=p.lineTangency,w=p.theta,k=qv({cx:t,cy:i,radius:a,angle:h,sign:-d,cornerRadius:o,cornerIsExternal:f}),_=k.circleTangency,S=k.lineTangency,C=k.theta,E=f?Math.abs(c-h):Math.abs(c-h)-w-C;if(E<0)return l?"M ".concat(y.x,",").concat(y.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 + `):iV({cx:t,cy:i,innerRadius:r,outerRadius:a,startAngle:c,endAngle:h});var O="M ".concat(y.x,",").concat(y.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(v.x,",").concat(v.y,` + A`).concat(a,",").concat(a,",0,").concat(+(E>180),",").concat(+(d<0),",").concat(_.x,",").concat(_.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(S.x,",").concat(S.y,` + `);if(r>0){var T=qv({cx:t,cy:i,radius:r,angle:c,sign:d,isExternal:!0,cornerRadius:o,cornerIsExternal:f}),M=T.circleTangency,N=T.lineTangency,F=T.theta,R=qv({cx:t,cy:i,radius:r,angle:h,sign:-d,isExternal:!0,cornerRadius:o,cornerIsExternal:f}),L=R.circleTangency,B=R.lineTangency,G=R.theta,U=f?Math.abs(c-h):Math.abs(c-h)-F-G;if(U<0&&o===0)return"".concat(O,"L").concat(t,",").concat(i,"Z");O+="L".concat(B.x,",").concat(B.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(L.x,",").concat(L.y,` + A`).concat(r,",").concat(r,",0,").concat(+(U>180),",").concat(+(d>0),",").concat(M.x,",").concat(M.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(N.x,",").concat(N.y,"Z")}else O+="L".concat(t,",").concat(i,"Z");return O},T_e={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},rV=function(n){var t=FP(FP({},T_e),n),i=t.cx,r=t.cy,a=t.innerRadius,o=t.outerRadius,l=t.cornerRadius,f=t.forceCornerRadius,c=t.cornerIsExternal,h=t.startAngle,d=t.endAngle,p=t.className;if(o0&&Math.abs(h-d)<360?k=E_e({cx:i,cy:r,innerRadius:a,outerRadius:o,cornerRadius:Math.min(w,y/2),forceCornerRadius:f,cornerIsExternal:c,startAngle:h,endAngle:d}):k=iV({cx:i,cy:r,innerRadius:a,outerRadius:o,startAngle:h,endAngle:d}),Z.createElement("path",x4({},zn(t,!0),{className:v,d:k,role:"img"}))};function fm(e){"@babel/helpers - typeof";return fm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},fm(e)}function S4(){return S4=Object.assign?Object.assign.bind():function(e){for(var n=1;nz_e.call(e,n));function Tu(e,n){return e===n||!e&&!n&&e!==e&&n!==n}const B_e="__v",F_e="__o",q_e="_owner",{getOwnPropertyDescriptor:WP,keys:GP}=Object;function H_e(e,n){return e.byteLength===n.byteLength&&d1(new Uint8Array(e),new Uint8Array(n))}function U_e(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 V_e(e,n){return e.byteLength===n.byteLength&&d1(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(n.buffer,n.byteOffset,n.byteLength))}function W_e(e,n){return Tu(e.getTime(),n.getTime())}function G_e(e,n){return e.name===n.name&&e.message===n.message&&e.cause===n.cause&&e.stack===n.stack}function Y_e(e,n){return e===n}function YP(e,n,t){const i=e.size;if(i!==n.size)return!1;if(!i)return!0;const r=new Array(i),a=e.entries();let o,l,f=0;for(;(o=a.next())&&!o.done;){const c=n.entries();let h=!1,d=0;for(;(l=c.next())&&!l.done;){if(r[d]){d++;continue}const p=o.value,v=l.value;if(t.equals(p[0],v[0],f,d,e,n,t)&&t.equals(p[1],v[1],p[0],v[0],e,n,t)){h=r[d]=!0;break}d++}if(!h)return!1;f++}return!0}const K_e=Tu;function X_e(e,n,t){const i=GP(e);let r=i.length;if(GP(n).length!==r)return!1;for(;r-- >0;)if(!aV(e,n,t,i[r]))return!1;return!0}function Jd(e,n,t){const i=VP(e);let r=i.length;if(VP(n).length!==r)return!1;let a,o,l;for(;r-- >0;)if(a=i[r],!aV(e,n,t,a)||(o=WP(e,a),l=WP(n,a),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function Z_e(e,n){return Tu(e.valueOf(),n.valueOf())}function Q_e(e,n){return e.source===n.source&&e.flags===n.flags}function KP(e,n,t){const i=e.size;if(i!==n.size)return!1;if(!i)return!0;const r=new Array(i),a=e.values();let o,l;for(;(o=a.next())&&!o.done;){const f=n.values();let c=!1,h=0;for(;(l=f.next())&&!l.done;){if(!r[h]&&t.equals(o.value,l.value,o.value,l.value,e,n,t)){c=r[h]=!0;break}h++}if(!c)return!1}return!0}function d1(e,n){let t=e.byteLength;if(n.byteLength!==t||e.byteOffset!==n.byteOffset)return!1;for(;t-- >0;)if(e[t]!==n[t])return!1;return!0}function J_e(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 aV(e,n,t,i){return(i===q_e||i===F_e||i===B_e)&&(e.$$typeof||n.$$typeof)?!0:I_e(n,i)&&t.equals(e[i],n[i],i,i,e,n,t)}const e2e="[object ArrayBuffer]",n2e="[object Arguments]",t2e="[object Boolean]",i2e="[object DataView]",r2e="[object Date]",a2e="[object Error]",o2e="[object Map]",s2e="[object Number]",l2e="[object Object]",u2e="[object RegExp]",f2e="[object Set]",c2e="[object String]",d2e={"[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},h2e="[object URL]",m2e=Object.prototype.toString;function p2e({areArrayBuffersEqual:e,areArraysEqual:n,areDataViewsEqual:t,areDatesEqual:i,areErrorsEqual:r,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:l,areObjectsEqual:f,arePrimitiveWrappersEqual:c,areRegExpsEqual:h,areSetsEqual:d,areTypedArraysEqual:p,areUrlsEqual:v,unknownTagComparators:y}){return function(k,_,S){if(k===_)return!0;if(k==null||_==null)return!1;const C=typeof k;if(C!==typeof _)return!1;if(C!=="object")return C==="number"?l(k,_,S):C==="function"?a(k,_,S):!1;const E=k.constructor;if(E!==_.constructor)return!1;if(E===Object)return f(k,_,S);if(Array.isArray(k))return n(k,_,S);if(E===Date)return i(k,_,S);if(E===RegExp)return h(k,_,S);if(E===Map)return o(k,_,S);if(E===Set)return d(k,_,S);const O=m2e.call(k);if(O===r2e)return i(k,_,S);if(O===u2e)return h(k,_,S);if(O===o2e)return o(k,_,S);if(O===f2e)return d(k,_,S);if(O===l2e)return typeof k.then!="function"&&typeof _.then!="function"&&f(k,_,S);if(O===h2e)return v(k,_,S);if(O===a2e)return r(k,_,S);if(O===n2e)return f(k,_,S);if(d2e[O])return p(k,_,S);if(O===e2e)return e(k,_,S);if(O===i2e)return t(k,_,S);if(O===t2e||O===s2e||O===c2e)return c(k,_,S);if(y){let T=y[O];if(!T){const M=L_e(k);M&&(T=y[M])}if(T)return T(k,_,S)}return!1}}function v2e({circular:e,createCustomConfig:n,strict:t}){let i={areArrayBuffersEqual:H_e,areArraysEqual:t?Jd:U_e,areDataViewsEqual:V_e,areDatesEqual:W_e,areErrorsEqual:G_e,areFunctionsEqual:Y_e,areMapsEqual:t?y3(YP,Jd):YP,areNumbersEqual:K_e,areObjectsEqual:t?Jd:X_e,arePrimitiveWrappersEqual:Z_e,areRegExpsEqual:Q_e,areSetsEqual:t?y3(KP,Jd):KP,areTypedArraysEqual:t?y3(d1,Jd):d1,areUrlsEqual:J_e,unknownTagComparators:void 0};if(n&&(i=Object.assign({},i,n(i))),e){const r=Uv(i.areArraysEqual),a=Uv(i.areMapsEqual),o=Uv(i.areObjectsEqual),l=Uv(i.areSetsEqual);i=Object.assign({},i,{areArraysEqual:r,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:l})}return i}function g2e(e){return function(n,t,i,r,a,o,l){return e(n,t,l)}}function y2e({circular:e,comparator:n,createState:t,equals:i,strict:r}){if(t)return function(l,f){const{cache:c=e?new WeakMap:void 0,meta:h}=t();return n(l,f,{cache:c,equals:i,meta:h,strict:r})};if(e)return function(l,f){return n(l,f,{cache:new WeakMap,equals:i,meta:void 0,strict:r})};const a={cache:void 0,equals:i,meta:void 0,strict:r};return function(l,f){return n(l,f,a)}}const b2e=pl();pl({strict:!0});pl({circular:!0});pl({circular:!0,strict:!0});pl({createInternalComparator:()=>Tu});pl({strict:!0,createInternalComparator:()=>Tu});pl({circular:!0,createInternalComparator:()=>Tu});pl({circular:!0,createInternalComparator:()=>Tu,strict:!0});function pl(e={}){const{circular:n=!1,createInternalComparator:t,createState:i,strict:r=!1}=e,a=v2e(e),o=p2e(a),l=t?t(o):g2e(o);return y2e({circular:n,comparator:o,createState:i,equals:l,strict:r})}function w2e(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function XP(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):w2e(r)};requestAnimationFrame(i)}function C4(e){"@babel/helpers - typeof";return C4=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},C4(e)}function k2e(e){return C2e(e)||S2e(e)||x2e(e)||_2e()}function _2e(){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 x2e(e,n){if(e){if(typeof e=="string")return ZP(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 ZP(e,n)}}function ZP(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:_,C=S,E=0;E<8;++E){var O=d(C)-S,T=v(C);if(Math.abs(O-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,f=function(h,d,p){var v=-(h-d)*i,y=p*a,w=p+(v-y)*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 txe(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 b3(e){return oxe(e)||axe(e)||rxe(e)||ixe()}function ixe(){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 rxe(e,n){if(e){if(typeof e=="string")return j4(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 j4(e,n)}}function axe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function oxe(e){if(Array.isArray(e))return j4(e)}function j4(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 p1(e){return p1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p1(e)}var ro=(function(e){cxe(t,e);var n=dxe(t);function t(i,r){var a;sxe(this,t),a=n.call(this,i,r);var o=a.props,l=o.isActive,f=o.attributeName,c=o.from,h=o.to,d=o.steps,p=o.children,v=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(R4(a)),a.changeStyle=a.changeStyle.bind(R4(a)),!l||v<=0)return a.state={style:{}},typeof p=="function"&&(a.state={style:h}),D4(a);if(d&&d.length)a.state={style:d[0].style};else if(c){if(typeof p=="function")return a.state={style:c},D4(a);a.state={style:f?dh({},f,c):c}}else a.state={style:{}};return a}return uxe(t,[{key:"componentDidMount",value:function(){var r=this.props,a=r.isActive,o=r.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(r){var a=this.props,o=a.isActive,l=a.canBegin,f=a.attributeName,c=a.shouldReAnimate,h=a.to,d=a.from,p=this.state.style;if(l){if(!o){var v={style:f?dh({},f,h):h};this.state&&p&&(f&&p[f]!==h||!f&&p!==h)&&this.setState(v);return}if(!(b2e(r.to,h)&&r.canBegin&&r.isActive)){var y=!r.canBegin||!r.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var w=y||c?d:r.to;if(this.state&&p){var k={style:f?dh({},f,w):w};(f&&p[f]!==w||!f&&p!==w)&&this.setState(k)}this.runAnimation(xa(xa({},this.props),{},{from:w,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var r=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),r&&r()}},{key:"handleStyleChange",value:function(r){this.changeStyle(r)}},{key:"changeStyle",value:function(r){this.mounted&&this.setState({style:r})}},{key:"runJSAnimation",value:function(r){var a=this,o=r.from,l=r.to,f=r.duration,c=r.easing,h=r.begin,d=r.onAnimationEnd,p=r.onAnimationStart,v=J2e(o,l,q2e(c),f,this.changeStyle),y=function(){a.stopJSAnimation=v()};this.manager.start([p,h,y,f,d])}},{key:"runStepAnimation",value:function(r){var a=this,o=r.steps,l=r.begin,f=r.onAnimationStart,c=o[0],h=c.style,d=c.duration,p=d===void 0?0:d,v=function(w,k,_){if(_===0)return w;var S=k.duration,C=k.easing,E=C===void 0?"ease":C,O=k.style,T=k.properties,M=k.onAnimationEnd,N=_>0?o[_-1]:k,F=T||Object.keys(O);if(typeof E=="function"||E==="spring")return[].concat(b3(w),[a.runJSAnimation.bind(a,{from:N.style,to:O,duration:S,easing:E}),S]);var R=eN(F,S,E),L=xa(xa(xa({},N.style),O),{},{transition:R});return[].concat(b3(w),[L,S,M]).filter(j2e)};return this.manager.start([f].concat(b3(o.reduce(v,[h,Math.max(p,l)])),[r.onAnimationEnd]))}},{key:"runAnimation",value:function(r){this.manager||(this.manager=A2e());var a=r.begin,o=r.duration,l=r.attributeName,f=r.to,c=r.easing,h=r.onAnimationStart,d=r.onAnimationEnd,p=r.steps,v=r.children,y=this.manager;if(this.unSubscribe=y.subscribe(this.handleStyleChange),typeof c=="function"||typeof v=="function"||c==="spring"){this.runJSAnimation(r);return}if(p.length>1){this.runStepAnimation(r);return}var w=l?dh({},l,f):f,k=eN(Object.keys(w),o,c);y.start([h,a,xa(xa({},w),{},{transition:k}),o,d])}},{key:"render",value:function(){var r=this.props,a=r.children;r.begin;var o=r.duration;r.attributeName,r.easing;var l=r.isActive;r.steps,r.from,r.to,r.canBegin,r.onAnimationEnd,r.shouldReAnimate,r.onAnimationReStart;var f=nxe(r,exe),c=A.Children.count(a),h=this.state.style;if(typeof a=="function")return a(h);if(!l||c===0||o<=0)return a;var d=function(v){var y=v.props,w=y.style,k=w===void 0?{}:w,_=y.className,S=A.cloneElement(v,xa(xa({},f),{},{style:xa(xa({},k),h),className:_}));return S};return c===1?d(A.Children.only(a)):Z.createElement("div",null,A.Children.map(a,function(p){return d(p)}))}}]),t})(A.PureComponent);ro.displayName="Animate";ro.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};ro.propTypes={from:ft.oneOfType([ft.object,ft.string]),to:ft.oneOfType([ft.object,ft.string]),attributeName:ft.string,duration:ft.number,begin:ft.number,easing:ft.oneOfType([ft.string,ft.func]),steps:ft.arrayOf(ft.shape({duration:ft.number.isRequired,style:ft.object.isRequired,easing:ft.oneOfType([ft.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),ft.func]),properties:ft.arrayOf("string"),onAnimationEnd:ft.func})),children:ft.oneOfType([ft.node,ft.func]),isActive:ft.bool,canBegin:ft.bool,onAnimationEnd:ft.func,shouldReAnimate:ft.bool,onAnimationStart:ft.func,onAnimationReStart:ft.func};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 v1(){return v1=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0?1:-1,f=i>=0?1:-1,c=r>=0&&i>=0||r<0&&i<0?1:0,h;if(o>0&&a instanceof Array){for(var d=[0,0,0,0],p=0,v=4;po?o:a[p];h="M".concat(n,",").concat(t+l*d[0]),d[0]>0&&(h+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(c,",").concat(n+f*d[0],",").concat(t)),h+="L ".concat(n+i-f*d[1],",").concat(t),d[1]>0&&(h+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(c,`, + `).concat(n+i,",").concat(t+l*d[1])),h+="L ".concat(n+i,",").concat(t+r-l*d[2]),d[2]>0&&(h+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(c,`, + `).concat(n+i-f*d[2],",").concat(t+r)),h+="L ".concat(n+f*d[3],",").concat(t+r),d[3]>0&&(h+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(c,`, + `).concat(n,",").concat(t+r-l*d[3])),h+="Z"}else if(o>0&&a===+a&&a>0){var y=Math.min(o,a);h="M ".concat(n,",").concat(t+l*y,` + A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(n+f*y,",").concat(t,` + L `).concat(n+i-f*y,",").concat(t,` + A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(n+i,",").concat(t+l*y,` + L `).concat(n+i,",").concat(t+r-l*y,` + A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(n+i-f*y,",").concat(t+r,` + L `).concat(n+f*y,",").concat(t+r,` + A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(n,",").concat(t+r-l*y," Z")}else h="M ".concat(n,",").concat(t," h ").concat(i," v ").concat(r," h ").concat(-i," Z");return h},_xe=function(n,t){if(!n||!t)return!1;var i=n.x,r=n.y,a=t.x,o=t.y,l=t.width,f=t.height;if(Math.abs(l)>0&&Math.abs(f)>0){var c=Math.min(a,a+l),h=Math.max(a,a+l),d=Math.min(o,o+f),p=Math.max(o,o+f);return i>=c&&i<=h&&r>=d&&r<=p}return!1},xxe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},mm=function(n){var t=lN(lN({},xxe),n),i=A.useRef(),r=A.useState(-1),a=mxe(r,2),o=a[0],l=a[1];A.useEffect(function(){if(i.current&&i.current.getTotalLength)try{var E=i.current.getTotalLength();E&&l(E)}catch{}},[]);var f=t.x,c=t.y,h=t.width,d=t.height,p=t.radius,v=t.className,y=t.animationEasing,w=t.animationDuration,k=t.animationBegin,_=t.isAnimationActive,S=t.isUpdateAnimationActive;if(f!==+f||c!==+c||h!==+h||d!==+d||h===0||d===0)return null;var C=cn("recharts-rectangle",v);return S?Z.createElement(ro,{canBegin:o>0,from:{width:h,height:d,x:f,y:c},to:{width:h,height:d,x:f,y:c},duration:w,animationEasing:y,isActive:S},function(E){var O=E.width,T=E.height,M=E.x,N=E.y;return Z.createElement(ro,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:k,duration:w,isActive:_,easing:y},Z.createElement("path",v1({},zn(t,!0),{className:C,d:uN(M,N,O,T,p),ref:i})))}):Z.createElement("path",v1({},zn(t,!0),{className:C,d:uN(f,c,h,d,p)}))};function P4(){return P4=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 jxe(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 Mxe=function(n,t,i,r,a,o){return"M".concat(n,",").concat(a,"v").concat(r,"M").concat(o,",").concat(t,"h").concat(i)},Dxe=function(n){var t=n.x,i=t===void 0?0:t,r=n.y,a=r===void 0?0:r,o=n.top,l=o===void 0?0:o,f=n.left,c=f===void 0?0:f,h=n.width,d=h===void 0?0:h,p=n.height,v=p===void 0?0:p,y=n.className,w=Txe(n,Sxe),k=Cxe({x:i,y:a,top:l,left:c,width:d,height:v},w);return!He(i)||!He(a)||!He(d)||!He(v)||!He(l)||!He(c)?null:Z.createElement("path",N4({},zn(k,!0),{className:cn("recharts-cross",y),d:Mxe(i,a,d,v,l,c)}))},w3,cN;function Rxe(){if(cN)return w3;cN=1;var e=DH(),n=e(Object.getPrototypeOf,Object);return w3=n,w3}var k3,dN;function Pxe(){if(dN)return k3;dN=1;var e=ls(),n=Rxe(),t=us(),i="[object Object]",r=Function.prototype,a=Object.prototype,o=r.toString,l=a.hasOwnProperty,f=o.call(Object);function c(h){if(!t(h)||e(h)!=i)return!1;var d=n(h);if(d===null)return!0;var p=l.call(d,"constructor")&&d.constructor;return typeof p=="function"&&p instanceof p&&o.call(p)==f}return k3=c,k3}var Nxe=Pxe();const $xe=st(Nxe);var _3,hN;function zxe(){if(hN)return _3;hN=1;var e=ls(),n=us(),t="[object Boolean]";function i(r){return r===!0||r===!1||n(r)&&e(r)==t}return _3=i,_3}var Lxe=zxe();const Ixe=st(Lxe);function vm(e){"@babel/helpers - typeof";return vm=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},vm(e)}function g1(){return g1=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t0,from:{upperWidth:0,lowerWidth:0,height:p,x:f,y:c},to:{upperWidth:h,lowerWidth:d,height:p,x:f,y:c},duration:w,animationEasing:y,isActive:_},function(C){var E=C.upperWidth,O=C.lowerWidth,T=C.height,M=C.x,N=C.y;return Z.createElement(ro,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:k,duration:w,easing:y},Z.createElement("path",g1({},zn(t,!0),{className:S,d:gN(M,N,E,O,T),ref:i})))}):Z.createElement("g",null,Z.createElement("path",g1({},zn(t,!0),{className:S,d:gN(f,c,h,d,p)})))},Xxe=["option","shapeType","propTransformer","activeClassName","isActive"];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 Zxe(e,n){if(e==null)return{};var t=Qxe(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 Qxe(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 yN(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 y1(e){for(var n=1;n0&&i.handleDrag(r.changedTouches[0])}),Pr(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()}),Pr(i,"handleLeaveWrapper",function(){(i.state.isTravellerMoving||i.state.isSlideMoving)&&(i.leaveTimer=window.setTimeout(i.handleDragEnd,i.props.leaveTimeOut))}),Pr(i,"handleEnterSlideOrTraveller",function(){i.setState({isTextActive:!0})}),Pr(i,"handleLeaveSlideOrTraveller",function(){i.setState({isTextActive:!1})}),Pr(i,"handleSlideDragStart",function(r){var a=EN(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 A3e(n,e),_3e(n,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(i){var r=i.startX,a=i.endX,o=this.state.scaleValues,l=this.props,f=l.gap,c=l.data,h=c.length-1,d=Math.min(r,a),p=Math.max(r,a),v=n.getIndexInRange(o,d),y=n.getIndexInRange(o,p);return{startIndex:v-v%f,endIndex:y===h?h:y-y%f}}},{key:"getTextOfTick",value:function(i){var r=this.props,a=r.data,o=r.tickFormatter,l=r.dataKey,f=ir(a[i],l,i);return Pn(o)?o(f,i):f}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(i){var r=this.state,a=r.slideMoveStartX,o=r.startX,l=r.endX,f=this.props,c=f.x,h=f.width,d=f.travellerWidth,p=f.startIndex,v=f.endIndex,y=f.onChange,w=i.pageX-a;w>0?w=Math.min(w,c+h-d-l,c+h-d-o):w<0&&(w=Math.max(w,c-o,c-l));var k=this.getIndex({startX:o+w,endX:l+w});(k.startIndex!==p||k.endIndex!==v)&&y&&y(k),this.setState({startX:o+w,endX:l+w,slideMoveStartX:i.pageX})}},{key:"handleTravellerDragStart",value:function(i,r){var a=EN(r)?r.changedTouches[0]:r;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:i,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(i){var r=this.state,a=r.brushMoveStartX,o=r.movingTravellerId,l=r.endX,f=r.startX,c=this.state[o],h=this.props,d=h.x,p=h.width,v=h.travellerWidth,y=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-v-c):S<0&&(S=Math.max(S,d-c)),_[o]=c+S;var C=this.getIndex(_),E=C.startIndex,O=C.endIndex,T=function(){var N=k.length-1;return o==="startX"&&(l>f?E%w===0:O%w===0)||lf?O%w===0:E%w===0)||l>f&&O===N};this.setState(Pr(Pr({},o,c+S),"brushMoveStartX",i.pageX),function(){y&&T()&&y(C)})}},{key:"handleTravellerMoveKeyboard",value:function(i,r){var a=this,o=this.state,l=o.scaleValues,f=o.startX,c=o.endX,h=this.state[r],d=l.indexOf(h);if(d!==-1){var p=d+i;if(!(p===-1||p>=l.length)){var v=l[p];r==="startX"&&v>=c||r==="endX"&&v<=f||this.setState(Pr({},r,v),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var i=this.props,r=i.x,a=i.y,o=i.width,l=i.height,f=i.fill,c=i.stroke;return Z.createElement("rect",{stroke:c,fill:f,x:r,y:a,width:o,height:l})}},{key:"renderPanorama",value:function(){var i=this.props,r=i.x,a=i.y,o=i.width,l=i.height,f=i.data,c=i.children,h=i.padding,d=A.Children.only(c);return d?Z.cloneElement(d,{x:r,y:a,width:o,height:l,margin:h,compact:!0,data:f}):null}},{key:"renderTravellerLayer",value:function(i,r){var a,o,l=this,f=this.props,c=f.y,h=f.travellerWidth,d=f.height,p=f.traveller,v=f.ariaLabel,y=f.data,w=f.startIndex,k=f.endIndex,_=Math.max(i,this.props.x),S=O3(O3({},zn(this.props,!1)),{},{x:_,y:c,width:h,height:d}),C=v||"Min value: ".concat((a=y[w])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=y[k])===null||o===void 0?void 0:o.name);return Z.createElement(Dt,{tabIndex:0,role:"slider","aria-label":C,"aria-valuenow":i,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[r],onTouchStart:this.travellerDragStartHandlers[r],onKeyDown:function(O){["ArrowLeft","ArrowRight"].includes(O.key)&&(O.preventDefault(),O.stopPropagation(),l.handleTravellerMoveKeyboard(O.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,f=a.stroke,c=a.travellerWidth,h=Math.min(i,r)+c,d=Math.max(Math.abs(r-i)-c,0);return Z.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:f,fillOpacity:.2,x:h,y:o,width:d,height:l})}},{key:"renderText",value:function(){var i=this.props,r=i.startIndex,a=i.endIndex,o=i.y,l=i.height,f=i.travellerWidth,c=i.stroke,h=this.state,d=h.startX,p=h.endX,v=5,y={pointerEvents:"none",fill:c};return Z.createElement(Dt,{className:"recharts-brush-texts"},Z.createElement(Gg,w1({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,p)-v,y:o+l/2},y),this.getTextOfTick(r)),Z.createElement(Gg,w1({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,p)+f+v,y:o+l/2},y),this.getTextOfTick(a)))}},{key:"render",value:function(){var i=this.props,r=i.data,a=i.className,o=i.children,l=i.x,f=i.y,c=i.width,h=i.height,d=i.alwaysShowText,p=this.state,v=p.startX,y=p.endX,w=p.isTextActive,k=p.isSlideMoving,_=p.isTravellerMoving,S=p.isTravellerFocused;if(!r||!r.length||!He(l)||!He(f)||!He(c)||!He(h)||c<=0||h<=0)return null;var C=cn("recharts-brush",a),E=Z.Children.count(o)===1,O=w3e("userSelect","none");return Z.createElement(Dt,{className:C,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:O},this.renderBackground(),E&&this.renderPanorama(),this.renderSlide(v,y),this.renderTravellerLayer(v,"startX"),this.renderTravellerLayer(y,"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,f=i.stroke,c=Math.floor(a+l/2)-1;return Z.createElement(Z.Fragment,null,Z.createElement("rect",{x:r,y:a,width:o,height:l,fill:f,stroke:"none"}),Z.createElement("line",{x1:r+1,y1:c,x2:r+o-1,y2:c,fill:"none",stroke:"#fff"}),Z.createElement("line",{x1:r+1,y1:c+2,x2:r+o-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(i,r){var a;return Z.isValidElement(i)?a=Z.cloneElement(i,r):Pn(i)?a=i(r):a=n.renderDefaultTraveller(r),a}},{key:"getDerivedStateFromProps",value:function(i,r){var a=i.data,o=i.width,l=i.x,f=i.travellerWidth,c=i.updateId,h=i.startIndex,d=i.endIndex;if(a!==r.prevData||c!==r.prevUpdateId)return O3({prevData:a,prevTravellerWidth:f,prevUpdateId:c,prevX:l,prevWidth:o},a&&a.length?E3e({data:a,width:o,x:l,travellerWidth:f,startIndex:h,endIndex:d}):{scale:null,scaleValues:null});if(r.scale&&(o!==r.prevWidth||l!==r.prevX||f!==r.prevTravellerWidth)){r.scale.range([l,l+o-f]);var p=r.scale.domain().map(function(v){return r.scale(v)});return{prevData:a,prevTravellerWidth:f,prevUpdateId:c,prevX:l,prevWidth:o,startX:r.scale(i.startIndex),endX:r.scale(i.endIndex),scaleValues:p}}return null}},{key:"getIndexInRange",value:function(i,r){for(var a=i.length,o=0,l=a-1;l-o>1;){var f=Math.floor((o+l)/2);i[f]>r?l=f:o=f}return r>=i[l]?l:o}}])})(A.PureComponent);Pr(oc,"displayName","Brush");Pr(oc,"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 E3,TN;function T3e(){if(TN)return E3;TN=1;var e=M9();function n(t,i){var r;return e(t,function(a,o,l){return r=i(a,o,l),!r}),!!r}return E3=n,E3}var T3,jN;function j3e(){if(jN)return T3;jN=1;var e=CH(),n=dl(),t=T3e(),i=yr(),r=p0();function a(o,l,f){var c=i(o)?e:t;return f&&r(o,l,f)&&(l=void 0),c(o,n(l,3))}return T3=a,T3}var M3e=j3e();const D3e=st(M3e);var Ja=function(n,t){var i=n.alwaysShow,r=n.ifOverflow;return i&&(r="extendDomain"),r===t},j3,MN;function R3e(){if(MN)return j3;MN=1;var e=HH();function n(t,i,r){i=="__proto__"&&e?e(t,i,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[i]=r}return j3=n,j3}var M3,DN;function P3e(){if(DN)return M3;DN=1;var e=R3e(),n=FH(),t=dl();function i(r,a){var o={};return a=t(a,3),n(r,function(l,f,c){e(o,f,a(l,f,c))}),o}return M3=i,M3}var N3e=P3e();const $3e=st(N3e);var D3,RN;function z3e(){if(RN)return D3;RN=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 W3e(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 G3e(e,n){var t=e.x,i=e.y,r=V3e(e,F3e),a="".concat(t),o=parseInt(a,10),l="".concat(i),f=parseInt(l,10),c="".concat(n.height||r.height),h=parseInt(c,10),d="".concat(n.width||r.width),p=parseInt(d,10);return eh(eh(eh(eh(eh({},n),r),o?{x:o}:{}),f?{y:f}:{}),{},{height:h,width:p,name:n.name,radius:n.radius})}function zN(e){return Z.createElement(a3e,z4({shapeType:"rectangle",propTransformer:G3e,activeClassName:"recharts-active-bar"},e))}var Y3e=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=He(i)||ape(i);return a?n(i,r):(a||du(),t)}},K3e=["value","background"],gV;function sc(e){"@babel/helpers - typeof";return sc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},sc(e)}function X3e(e,n){if(e==null)return{};var t=Z3e(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 Z3e(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 _1(){return _1=Object.assign?Object.assign.bind():function(e){for(var n=1;n0&&Math.abs(H)0&&Math.abs(U)0&&(G=Math.min((X||0)-(U[ee-1]||0),G))}),Number.isFinite(G)){var H=G/B,P=w.layout==="vertical"?i.height:i.width;if(w.padding==="gap"&&(M=H*P/2),w.padding==="no-gap"){var $=fu(n.barCategoryGap,H*P),q=H*P/2;M=q-$-(q-$)/P*$}}}r==="xAxis"?N=[i.left+(C.left||0)+(M||0),i.left+i.width-(C.right||0)-(M||0)]:r==="yAxis"?N=f==="horizontal"?[i.top+i.height-(C.bottom||0),i.top+(C.top||0)]:[i.top+(C.top||0)+(M||0),i.top+i.height-(C.bottom||0)-(M||0)]:N=w.range,O&&(N=[N[1],N[0]]);var Y=kke(w,a,p),D=Y.scale,W=Y.realScaleType;D.domain(_).range(N),_ke(D);var V=jke(D,Sa(Sa({},w),{},{realScaleType:W}));r==="xAxis"?(L=k==="top"&&!E||k==="bottom"&&E,F=i.left,R=d[T]-L*w.height):r==="yAxis"&&(L=k==="left"&&!E||k==="right"&&E,F=d[T]-L*w.width,R=i.top);var z=Sa(Sa(Sa({},w),V),{},{realScaleType:W,x:F,y:R,scale:D,width:r==="xAxis"?i.width:w.width,height:r==="yAxis"?i.height:w.height});return z.bandSize=u1(z,V),!w.hide&&r==="xAxis"?d[T]+=(L?-1:1)*z.height:w.hide||(d[T]+=(L?-1:1)*z.width),Sa(Sa({},v),{},E0({},y,z))},{})},kV=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)}},lSe=function(n){var t=n.x1,i=n.y1,r=n.x2,a=n.y2;return kV({x:t,y:i},{x:r,y:a})},_V=(function(){function e(n){aSe(this,e),this.scale=n}return oSe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=i.bandAware,a=i.position;if(t!==void 0){if(a)switch(a){case"start":return this.scale(t);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+o}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(t)+l}default:return this.scale(t)}if(r){var f=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+f}return this.scale(t)}}},{key:"isInRange",value:function(t){var i=this.range(),r=i[0],a=i[i.length-1];return r<=a?t>=r&&t<=a:t>=a&&t<=r}}],[{key:"create",value:function(t){return new e(t)}}])})();E0(_V,"EPS",1e-4);var sA=function(n){var t=Object.keys(n).reduce(function(i,r){return Sa(Sa({},i),{},E0({},r,_V.create(n[r])))},{});return Sa(Sa({},t),{},{apply:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,l=a.position;return $3e(r,function(f,c){return t[c].apply(f,{bandAware:o,position:l})})},isInRange:function(r){return vV(r,function(a,o){return t[o].isInRange(a)})}})};function uSe(e){return(e%180+180)%180}var fSe=function(n){var t=n.width,i=n.height,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=uSe(r),o=a*Math.PI/180,l=Math.atan(i/t),f=o>l&&o-1?f[c?a[h]:h]:void 0}}return N3=i,N3}var $3,HN;function dSe(){if(HN)return $3;HN=1;var e=dV();function n(t){var i=e(t),r=i%1;return i===i?r?i-r:i:0}return $3=n,$3}var z3,UN;function hSe(){if(UN)return z3;UN=1;var e=$H(),n=dl(),t=dSe(),i=Math.max;function r(a,o,l){var f=a==null?0:a.length;if(!f)return-1;var c=l==null?0:t(l);return c<0&&(c=i(f+c,0)),e(a,n(o,3),c)}return z3=r,z3}var L3,VN;function mSe(){if(VN)return L3;VN=1;var e=cSe(),n=hSe(),t=e(n);return L3=t,L3}var pSe=mSe();const vSe=st(pSe);var gSe=Zq();const ySe=st(gSe);var bSe=ySe(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("")}),lA=A.createContext(void 0),uA=A.createContext(void 0),xV=A.createContext(void 0),SV=A.createContext({}),CV=A.createContext(void 0),AV=A.createContext(0),OV=A.createContext(0),WN=function(n){var t=n.state,i=t.xAxisMap,r=t.yAxisMap,a=t.offset,o=n.clipPathId,l=n.children,f=n.width,c=n.height,h=bSe(a);return Z.createElement(lA.Provider,{value:i},Z.createElement(uA.Provider,{value:r},Z.createElement(SV.Provider,{value:a},Z.createElement(xV.Provider,{value:h},Z.createElement(CV.Provider,{value:o},Z.createElement(AV.Provider,{value:c},Z.createElement(OV.Provider,{value:f},l)))))))},wSe=function(){return A.useContext(CV)},EV=function(n){var t=A.useContext(lA);t==null&&du();var i=t[n];return i==null&&du(),i},kSe=function(){var n=A.useContext(lA);return Us(n)},_Se=function(){var n=A.useContext(uA),t=vSe(n,function(i){return vV(i.domain,Number.isFinite)});return t||Us(n)},TV=function(n){var t=A.useContext(uA);t==null&&du();var i=t[n];return i==null&&du(),i},xSe=function(){var n=A.useContext(xV);return n},SSe=function(){return A.useContext(SV)},fA=function(){return A.useContext(OV)},cA=function(){return A.useContext(AV)};function lc(e){"@babel/helpers - typeof";return lc=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},lc(e)}function CSe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function ASe(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 s4e(e,n){return $V(e,n+1)}function l4e(e,n,t,i,r){for(var a=(i||[]).slice(),o=n.start,l=n.end,f=0,c=1,h=o,d=function(){var y=i==null?void 0:i[f];if(y===void 0)return{v:$V(i,c)};var w=f,k,_=function(){return k===void 0&&(k=t(y,w)),k},S=y.coordinate,C=f===0||O1(e,S,_,h,l);C||(f=0,h=o,c+=1),C&&(h=S+e*(_()/2+r),f+=c)},p;c<=a.length;)if(p=d(),p)return p.v;return[]}function _m(e){"@babel/helpers - typeof";return _m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},_m(e)}function e$(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 Ui(e){for(var n=1;n0?v.coordinate-k*e:v.coordinate})}else a[p]=v=Ui(Ui({},v),{},{tickCoord:v.coordinate});var _=O1(e,v.tickCoord,w,l,f);_&&(f=v.tickCoord-e*(w()/2+r),a[p]=Ui(Ui({},v),{},{isShow:!0}))},h=o-1;h>=0;h--)c(h);return a}function h4e(e,n,t,i,r,a){var o=(i||[]).slice(),l=o.length,f=n.start,c=n.end;if(a){var h=i[l-1],d=t(h,l-1),p=e*(h.coordinate+e*d/2-c);o[l-1]=h=Ui(Ui({},h),{},{tickCoord:p>0?h.coordinate-p*e:h.coordinate});var v=O1(e,h.tickCoord,function(){return d},f,c);v&&(c=h.tickCoord-e*(d/2+r),o[l-1]=Ui(Ui({},h),{},{isShow:!0}))}for(var y=a?l-1:l,w=function(S){var C=o[S],E,O=function(){return E===void 0&&(E=t(C,S)),E};if(S===0){var T=e*(C.coordinate-e*O()/2-f);o[S]=C=Ui(Ui({},C),{},{tickCoord:T<0?C.coordinate-T*e:C.coordinate})}else o[S]=C=Ui(Ui({},C),{},{tickCoord:C.coordinate});var M=O1(e,C.tickCoord,O,f,c);M&&(f=C.tickCoord+e*(O()/2+r),o[S]=Ui(Ui({},C),{},{isShow:!0}))},k=0;k=2?Ta(r[1].coordinate-r[0].coordinate):1,_=o4e(a,k,v);return f==="equidistantPreserveStart"?l4e(k,_,w,r,o):(f==="preserveStart"||f==="preserveStartEnd"?p=h4e(k,_,w,r,o,f==="preserveStartEnd"):p=d4e(k,_,w,r,o),p.filter(function(S){return S.isShow}))}var m4e=["viewBox"],p4e=["viewBox"],v4e=["ticks"];function cc(e){"@babel/helpers - typeof";return cc=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},cc(e)}function jf(){return jf=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 g4e(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 y4e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function t$(e,n){for(var t=0;t0?f(this.props):f(v)),o<=0||l<=0||!y||!y.length?null:Z.createElement(Dt,{className:cn("recharts-cartesian-axis",c),ref:function(k){i.layerReference=k}},a&&this.renderAxisLine(),this.renderTicks(y,this.state.fontSize,this.state.letterSpacing),Zt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(i,r,a){var o,l=cn(r.className,"recharts-cartesian-axis-tick-value");return Z.isValidElement(i)?o=Z.cloneElement(i,vi(vi({},r),{},{className:l})):Pn(i)?o=i(vi(vi({},r),{},{className:l})):o=Z.createElement(Gg,jf({},r,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])})(A.Component);mA(Gc,"displayName","CartesianAxis");mA(Gc,"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 C4e=["x1","y1","x2","y2","key"],A4e=["offset"];function hu(e){"@babel/helpers - typeof";return hu=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},hu(e)}function i$(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 Wi(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function j4e(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 M4e=function(n){var t=n.fill;if(!t||t==="none")return null;var i=n.fillOpacity,r=n.x,a=n.y,o=n.width,l=n.height,f=n.ry;return Z.createElement("rect",{x:r,y:a,ry:f,width:o,height:l,stroke:"none",fill:t,fillOpacity:i,className:"recharts-cartesian-grid-bg"})};function IV(e,n){var t;if(Z.isValidElement(e))t=Z.cloneElement(e,n);else if(Pn(e))t=e(n);else{var i=n.x1,r=n.y1,a=n.x2,o=n.y2,l=n.key,f=r$(n,C4e),c=zn(f,!1);c.offset;var h=r$(c,A4e);t=Z.createElement("line",Zl({},h,{x1:i,y1:r,x2:a,y2:o,fill:"none",key:l}))}return t}function D4e(e){var n=e.x,t=e.width,i=e.horizontal,r=i===void 0?!0:i,a=e.horizontalPoints;if(!r||!a||!a.length)return null;var o=a.map(function(l,f){var c=Wi(Wi({},e),{},{x1:n,y1:l,x2:n+t,y2:l,key:"line-".concat(f),index:f});return IV(r,c)});return Z.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function R4e(e){var n=e.y,t=e.height,i=e.vertical,r=i===void 0?!0:i,a=e.verticalPoints;if(!r||!a||!a.length)return null;var o=a.map(function(l,f){var c=Wi(Wi({},e),{},{x1:l,y1:n,x2:l,y2:n+t,key:"line-".concat(f),index:f});return IV(r,c)});return Z.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function P4e(e){var n=e.horizontalFill,t=e.fillOpacity,i=e.x,r=e.y,a=e.width,o=e.height,l=e.horizontalPoints,f=e.horizontal,c=f===void 0?!0:f;if(!c||!n||!n.length)return null;var h=l.map(function(p){return Math.round(p+r-r)}).sort(function(p,v){return p-v});r!==h[0]&&h.unshift(0);var d=h.map(function(p,v){var y=!h[v+1],w=y?r+o-p:h[v+1]-p;if(w<=0)return null;var k=v%n.length;return Z.createElement("rect",{key:"react-".concat(v),y:p,x:i,height:w,width:a,stroke:"none",fill:n[k],fillOpacity:t,className:"recharts-cartesian-grid-bg"})});return Z.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function N4e(e){var n=e.vertical,t=n===void 0?!0:n,i=e.verticalFill,r=e.fillOpacity,a=e.x,o=e.y,l=e.width,f=e.height,c=e.verticalPoints;if(!t||!i||!i.length)return null;var h=c.map(function(p){return Math.round(p+a-a)}).sort(function(p,v){return p-v});a!==h[0]&&h.unshift(0);var d=h.map(function(p,v){var y=!h[v+1],w=y?a+l-p:h[v+1]-p;if(w<=0)return null;var k=v%i.length;return Z.createElement("rect",{key:"react-".concat(v),x:p,y:o,width:w,height:f,stroke:"none",fill:i[k],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return Z.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var $4e=function(n,t){var i=n.xAxis,r=n.width,a=n.height,o=n.offset;return JU(hA(Wi(Wi(Wi({},Gc.defaultProps),i),{},{ticks:Io(i,!0),viewBox:{x:0,y:0,width:r,height:a}})),o.left,o.left+o.width,t)},z4e=function(n,t){var i=n.yAxis,r=n.width,a=n.height,o=n.offset;return JU(hA(Wi(Wi(Wi({},Gc.defaultProps),i),{},{ticks:Io(i,!0),viewBox:{x:0,y:0,width:r,height:a}})),o.top,o.top+o.height,t)},xf={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function R0(e){var n,t,i,r,a,o,l=fA(),f=cA(),c=SSe(),h=Wi(Wi({},e),{},{stroke:(n=e.stroke)!==null&&n!==void 0?n:xf.stroke,fill:(t=e.fill)!==null&&t!==void 0?t:xf.fill,horizontal:(i=e.horizontal)!==null&&i!==void 0?i:xf.horizontal,horizontalFill:(r=e.horizontalFill)!==null&&r!==void 0?r:xf.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:xf.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:xf.verticalFill,x:He(e.x)?e.x:c.left,y:He(e.y)?e.y:c.top,width:He(e.width)?e.width:c.width,height:He(e.height)?e.height:c.height}),d=h.x,p=h.y,v=h.width,y=h.height,w=h.syncWithTicks,k=h.horizontalValues,_=h.verticalValues,S=kSe(),C=_Se();if(!He(v)||v<=0||!He(y)||y<=0||!He(d)||d!==+d||!He(p)||p!==+p)return null;var E=h.verticalCoordinatesGenerator||$4e,O=h.horizontalCoordinatesGenerator||z4e,T=h.horizontalPoints,M=h.verticalPoints;if((!T||!T.length)&&Pn(O)){var N=k&&k.length,F=O({yAxis:C?Wi(Wi({},C),{},{ticks:N?k:C.ticks}):void 0,width:l,height:f,offset:c},N?!0:w);Uo(Array.isArray(F),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(hu(F),"]")),Array.isArray(F)&&(T=F)}if((!M||!M.length)&&Pn(E)){var R=_&&_.length,L=E({xAxis:S?Wi(Wi({},S),{},{ticks:R?_:S.ticks}):void 0,width:l,height:f,offset:c},R?!0:w);Uo(Array.isArray(L),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(hu(L),"]")),Array.isArray(L)&&(M=L)}return Z.createElement("g",{className:"recharts-cartesian-grid"},Z.createElement(M4e,{fill:h.fill,fillOpacity:h.fillOpacity,x:h.x,y:h.y,width:h.width,height:h.height,ry:h.ry}),Z.createElement(D4e,Zl({},h,{offset:c,horizontalPoints:T,xAxis:S,yAxis:C})),Z.createElement(R4e,Zl({},h,{offset:c,verticalPoints:M,xAxis:S,yAxis:C})),Z.createElement(P4e,Zl({},h,{horizontalPoints:T})),Z.createElement(N4e,Zl({},h,{verticalPoints:M})))}R0.displayName="CartesianGrid";var L4e=["type","layout","connectNulls","ref"],I4e=["key"];function dc(e){"@babel/helpers - typeof";return dc=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},dc(e)}function a$(e,n){if(e==null)return{};var t=B4e(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 B4e(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 Ah(){return Ah=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);td){v=[].concat(Sf(f.slice(0,y)),[d-w]);break}var k=v.length%2===0?[0,p]:[p];return[].concat(Sf(n.repeat(f,h)),Sf(v),k).map(function(_){return"".concat(_,"px")}).join(", ")}),Ca(t,"id",qc("recharts-line-")),Ca(t,"pathRef",function(o){t.mainCurve=o}),Ca(t,"handleAnimationEnd",function(){t.setState({isAnimationFinished:!0}),t.props.onAnimationEnd&&t.props.onAnimationEnd()}),Ca(t,"handleAnimationStart",function(){t.setState({isAnimationFinished:!1}),t.props.onAnimationStart&&t.props.onAnimationStart()}),t}return X4e(n,e),W4e(n,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var i=this.getTotalLength();this.setState({totalLength:i})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var i=this.getTotalLength();i!==this.state.totalLength&&this.setState({totalLength:i})}}},{key:"getTotalLength",value:function(){var i=this.mainCurve;try{return i&&i.getTotalLength&&i.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(i,r){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,l=a.xAxis,f=a.yAxis,c=a.layout,h=a.children,d=sa(h,rp);if(!d)return null;var p=function(w,k){return{x:w.x,y:w.y,value:w.value,errorVal:ir(w.payload,k)}},v={clipPath:i?"url(#clipPath-".concat(r,")"):null};return Z.createElement(Dt,v,d.map(function(y){return Z.cloneElement(y,{key:"bar-".concat(y.props.dataKey),data:o,xAxis:l,yAxis:f,layout:c,dataPointFormatter:p})}))}},{key:"renderDots",value:function(i,r,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var l=this.props,f=l.dot,c=l.points,h=l.dataKey,d=zn(this.props,!1),p=zn(f,!0),v=c.map(function(w,k){var _=Rr(Rr(Rr({key:"dot-".concat(k),r:3},d),p),{},{index:k,cx:w.x,cy:w.y,value:w.value,dataKey:h,payload:w.payload,points:c});return n.renderDotItem(f,_)}),y={clipPath:i?"url(#clipPath-".concat(r?"":"dots-").concat(a,")"):null};return Z.createElement(Dt,Ah({className:"recharts-line-dots",key:"dots"},y),v)}},{key:"renderCurveStatically",value:function(i,r,a,o){var l=this.props,f=l.type,c=l.layout,h=l.connectNulls;l.ref;var d=a$(l,L4e),p=Rr(Rr(Rr({},zn(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:r?"url(#clipPath-".concat(a,")"):null,points:i},o),{},{type:f,layout:c,connectNulls:h});return Z.createElement(If,Ah({},p,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(i,r){var a=this,o=this.props,l=o.points,f=o.strokeDasharray,c=o.isAnimationActive,h=o.animationBegin,d=o.animationDuration,p=o.animationEasing,v=o.animationId,y=o.animateNewValues,w=o.width,k=o.height,_=this.state,S=_.prevPoints,C=_.totalLength;return Z.createElement(ro,{begin:h,duration:d,isActive:c,easing:p,from:{t:0},to:{t:1},key:"line-".concat(v),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(E){var O=E.t;if(S){var T=S.length/l.length,M=l.map(function(B,G){var U=Math.floor(G*T);if(S[U]){var H=S[U],P=Ni(H.x,B.x),$=Ni(H.y,B.y);return Rr(Rr({},B),{},{x:P(O),y:$(O)})}if(y){var q=Ni(w*2,B.x),Y=Ni(k/2,B.y);return Rr(Rr({},B),{},{x:q(O),y:Y(O)})}return Rr(Rr({},B),{},{x:B.x,y:B.y})});return a.renderCurveStatically(M,i,r)}var N=Ni(0,C),F=N(O),R;if(f){var L="".concat(f).split(/[,\s]+/gim).map(function(B){return parseFloat(B)});R=a.getStrokeDasharray(F,C,L)}else R=a.generateSimpleStrokeDasharray(C,F);return a.renderCurveStatically(l,i,r,{strokeDasharray:R})})}},{key:"renderCurve",value:function(i,r){var a=this.props,o=a.points,l=a.isAnimationActive,f=this.state,c=f.prevPoints,h=f.totalLength;return l&&o&&o.length&&(!c&&h>0||!tc(c,o))?this.renderCurveWithAnimation(i,r):this.renderCurveStatically(o,i,r)}},{key:"render",value:function(){var i,r=this.props,a=r.hide,o=r.dot,l=r.points,f=r.className,c=r.xAxis,h=r.yAxis,d=r.top,p=r.left,v=r.width,y=r.height,w=r.isAnimationActive,k=r.id;if(a||!l||!l.length)return null;var _=this.state.isAnimationFinished,S=l.length===1,C=cn("recharts-line",f),E=c&&c.allowDataOverflow,O=h&&h.allowDataOverflow,T=E||O,M=Fn(k)?this.id:k,N=(i=zn(o,!1))!==null&&i!==void 0?i:{r:3,strokeWidth:2},F=N.r,R=F===void 0?3:F,L=N.strokeWidth,B=L===void 0?2:L,G=tH(o)?o:{},U=G.clipDot,H=U===void 0?!0:U,P=R*2+B;return Z.createElement(Dt,{className:C},E||O?Z.createElement("defs",null,Z.createElement("clipPath",{id:"clipPath-".concat(M)},Z.createElement("rect",{x:E?p:p-v/2,y:O?d:d-y/2,width:E?v:v*2,height:O?y:y*2})),!H&&Z.createElement("clipPath",{id:"clipPath-dots-".concat(M)},Z.createElement("rect",{x:p-P/2,y:d-P/2,width:v+P,height:y+P}))):null,!S&&this.renderCurve(T,M),this.renderErrorBar(T,M),(S||o)&&this.renderDots(T,H,M),(!w||_)&&Qa.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(Sf(i),[0]):i,o=[],l=0;l=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function e6e(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 Ql(){return Ql=Object.assign?Object.assign.bind():function(e){for(var n=1;n0||!tc(h,o)||!tc(d,l))?this.renderAreaWithAnimation(i,r):this.renderAreaStatically(o,l,i,r)}},{key:"render",value:function(){var i,r=this.props,a=r.hide,o=r.dot,l=r.points,f=r.className,c=r.top,h=r.left,d=r.xAxis,p=r.yAxis,v=r.width,y=r.height,w=r.isAnimationActive,k=r.id;if(a||!l||!l.length)return null;var _=this.state.isAnimationFinished,S=l.length===1,C=cn("recharts-area",f),E=d&&d.allowDataOverflow,O=p&&p.allowDataOverflow,T=E||O,M=Fn(k)?this.id:k,N=(i=zn(o,!1))!==null&&i!==void 0?i:{r:3,strokeWidth:2},F=N.r,R=F===void 0?3:F,L=N.strokeWidth,B=L===void 0?2:L,G=tH(o)?o:{},U=G.clipDot,H=U===void 0?!0:U,P=R*2+B;return Z.createElement(Dt,{className:C},E||O?Z.createElement("defs",null,Z.createElement("clipPath",{id:"clipPath-".concat(M)},Z.createElement("rect",{x:E?h:h-v/2,y:O?c:c-y/2,width:E?v:v*2,height:O?y:y*2})),!H&&Z.createElement("clipPath",{id:"clipPath-dots-".concat(M)},Z.createElement("rect",{x:h-P/2,y:c-P/2,width:v+P,height:y+P}))):null,S?null:this.renderArea(T,M),(o||S)&&this.renderDots(T,H,M),(!w||_)&&Qa.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(i,r){return i.animationId!==r.prevAnimationId?{prevAnimationId:i.animationId,curPoints:i.points,curBaseLine:i.baseLine,prevPoints:r.curPoints,prevBaseLine:r.curBaseLine}:i.points!==r.curPoints||i.baseLine!==r.curBaseLine?{curPoints:i.points,curBaseLine:i.baseLine}:null}}])})(A.PureComponent);qV=es;Ya(es,"displayName","Area");Ya(es,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Au.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Ya(es,"getBaseValue",function(e,n,t,i){var r=e.layout,a=e.baseValue,o=n.props.baseValue,l=o??a;if(He(l)&&typeof l=="number")return l;var f=r==="horizontal"?i:t,c=f.scale.domain();if(f.type==="number"){var h=Math.max(c[0],c[1]),d=Math.min(c[0],c[1]);return l==="dataMin"?d:l==="dataMax"||h<0?h:Math.max(Math.min(c[0],c[1]),0)}return l==="dataMin"?c[0]:l==="dataMax"?c[1]:c[0]});Ya(es,"getComposedData",function(e){var n=e.props,t=e.item,i=e.xAxis,r=e.yAxis,a=e.xAxisTicks,o=e.yAxisTicks,l=e.bandSize,f=e.dataKey,c=e.stackedData,h=e.dataStartIndex,d=e.displayedData,p=e.offset,v=n.layout,y=c&&c.length,w=qV.getBaseValue(n,t,i,r),k=v==="horizontal",_=!1,S=d.map(function(E,O){var T;y?T=c[h+O]:(T=ir(E,f),Array.isArray(T)?_=!0:T=[w,T]);var M=T[1]==null||y&&ir(E,f)==null;return k?{x:l1({axis:i,ticks:a,bandSize:l,entry:E,index:O}),y:M?null:r.scale(T[1]),value:T,payload:E}:{x:M?null:i.scale(T[1]),y:l1({axis:r,ticks:o,bandSize:l,entry:E,index:O}),value:T,payload:E}}),C;return y||_?C=S.map(function(E){var O=Array.isArray(E.value)?E.value[0]:null;return k?{x:E.x,y:O!=null&&E.y!=null?r.scale(O):null}:{x:O!=null?i.scale(O):null,y:E.y}}):C=k?r.scale(w):i.scale(w),Ls({points:S,baseLine:C,layout:v,isRange:_},p)});Ya(es,"renderDotItem",function(e,n){var t;if(Z.isValidElement(e))t=Z.cloneElement(e,n);else if(Pn(e))t=e(n);else{var i=cn("recharts-area-dot",typeof e!="boolean"?e.className:""),r=n.key,a=HV(n,J4e);t=Z.createElement(C0,Ql({},a,{key:r,className:i}))}return t});function mc(e){"@babel/helpers - typeof";return mc=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},mc(e)}function l6e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function u6e(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 X6e(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 Z6e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Q6e(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);t0?o:n&&n.length&&He(r)&&He(a)?n.slice(r,a+1):[]};function rW(e){return e==="number"?[0,"auto"]:void 0}var i6=function(n,t,i,r){var a=n.graphicalItems,o=n.tooltipAxis,l=P0(t,n);return i<0||!a||!a.length||i>=l.length?null:a.reduce(function(f,c){var h,d=(h=c.props.data)!==null&&h!==void 0?h:t;d&&n.dataStartIndex+n.dataEndIndex!==0&&n.dataEndIndex-n.dataStartIndex>=i&&(d=d.slice(n.dataStartIndex,n.dataEndIndex+1));var p;if(o.dataKey&&!o.allowDuplicatedCategory){var v=d===void 0?l:d;p=Pg(v,o.dataKey,r)}else p=d&&d[i]||l[i];return p?[].concat(gc(f),[nV(c,p)]):f},[])},v$=function(n,t,i,r){var a=r||{x:n.chartX,y:n.chartY},o=fCe(a,i),l=n.orderedTooltipTicks,f=n.tooltipAxis,c=n.tooltipTicks,h=pke(o,l,c,f);if(h>=0&&c){var d=c[h]&&c[h].value,p=i6(n,t,h,d),v=cCe(i,l,h,a);return{activeTooltipIndex:h,activeLabel:d,activePayload:p,activeCoordinate:v}}return null},dCe=function(n,t){var i=t.axes,r=t.graphicalItems,a=t.axisType,o=t.axisIdKey,l=t.stackGroups,f=t.dataStartIndex,c=t.dataEndIndex,h=n.layout,d=n.children,p=n.stackOffset,v=QU(h,a);return i.reduce(function(y,w){var k,_=w.type.defaultProps!==void 0?Oe(Oe({},w.type.defaultProps),w.props):w.props,S=_.type,C=_.dataKey,E=_.allowDataOverflow,O=_.allowDuplicatedCategory,T=_.scale,M=_.ticks,N=_.includeHidden,F=_[o];if(y[F])return y;var R=P0(n.data,{graphicalItems:r.filter(function(V){var z,X=o in V.props?V.props[o]:(z=V.type.defaultProps)===null||z===void 0?void 0:z[o];return X===F}),dataStartIndex:f,dataEndIndex:c}),L=R.length,B,G,U;L6e(_.domain,E,S)&&(B=w4(_.domain,null,E),v&&(S==="number"||T!=="auto")&&(U=Sh(R,C,"category")));var H=rW(S);if(!B||B.length===0){var P,$=(P=_.domain)!==null&&P!==void 0?P:H;if(C){if(B=Sh(R,C,S),S==="category"&&v){var q=spe(B);O&&q?(G=B,B=b1(0,L)):O||(B=MP($,B,w).reduce(function(V,z){return V.indexOf(z)>=0?V:[].concat(gc(V),[z])},[]))}else if(S==="category")O?B=B.filter(function(V){return V!==""&&!Fn(V)}):B=MP($,B,w).reduce(function(V,z){return V.indexOf(z)>=0||z===""||Fn(z)?V:[].concat(gc(V),[z])},[]);else if(S==="number"){var Y=wke(R,r.filter(function(V){var z,X,ee=o in V.props?V.props[o]:(z=V.type.defaultProps)===null||z===void 0?void 0:z[o],re="hide"in V.props?V.props.hide:(X=V.type.defaultProps)===null||X===void 0?void 0:X.hide;return ee===F&&(N||!re)}),C,a,h);Y&&(B=Y)}v&&(S==="number"||T!=="auto")&&(U=Sh(R,C,"category"))}else v?B=b1(0,L):l&&l[F]&&l[F].hasStack&&S==="number"?B=p==="expand"?[0,1]:eV(l[F].stackGroups,f,c):B=ZU(R,r.filter(function(V){var z=o in V.props?V.props[o]:V.type.defaultProps[o],X="hide"in V.props?V.props.hide:V.type.defaultProps.hide;return z===F&&(N||!X)}),S,h,!0);if(S==="number")B=e6(d,B,F,a,M),$&&(B=w4($,B,E));else if(S==="category"&&$){var D=$,W=B.every(function(V){return D.indexOf(V)>=0});W&&(B=D)}}return Oe(Oe({},y),{},wn({},F,Oe(Oe({},_),{},{axisType:a,domain:B,categoricalDomain:U,duplicateDomain:G,originalDomain:(k=_.domain)!==null&&k!==void 0?k:H,isCategorical:v,layout:h})))},{})},hCe=function(n,t){var i=t.graphicalItems,r=t.Axis,a=t.axisType,o=t.axisIdKey,l=t.stackGroups,f=t.dataStartIndex,c=t.dataEndIndex,h=n.layout,d=n.children,p=P0(n.data,{graphicalItems:i,dataStartIndex:f,dataEndIndex:c}),v=p.length,y=QU(h,a),w=-1;return i.reduce(function(k,_){var S=_.type.defaultProps!==void 0?Oe(Oe({},_.type.defaultProps),_.props):_.props,C=S[o],E=rW("number");if(!k[C]){w++;var O;return y?O=b1(0,v):l&&l[C]&&l[C].hasStack?(O=eV(l[C].stackGroups,f,c),O=e6(d,O,C,a)):(O=w4(E,ZU(p,i.filter(function(T){var M,N,F=o in T.props?T.props[o]:(M=T.type.defaultProps)===null||M===void 0?void 0:M[o],R="hide"in T.props?T.props.hide:(N=T.type.defaultProps)===null||N===void 0?void 0:N.hide;return F===C&&!R}),"number",h),r.defaultProps.allowDataOverflow),O=e6(d,O,C,a)),Oe(Oe({},k),{},wn({},C,Oe(Oe({axisType:a},r.defaultProps),{},{hide:!0,orientation:oa(lCe,"".concat(a,".").concat(w%2),null),domain:O,originalDomain:E,isCategorical:y,layout:h})))}return k},{})},mCe=function(n,t){var i=t.axisType,r=i===void 0?"xAxis":i,a=t.AxisComp,o=t.graphicalItems,l=t.stackGroups,f=t.dataStartIndex,c=t.dataEndIndex,h=n.children,d="".concat(r,"Id"),p=sa(h,a),v={};return p&&p.length?v=dCe(n,{axes:p,graphicalItems:o,axisType:r,axisIdKey:d,stackGroups:l,dataStartIndex:f,dataEndIndex:c}):o&&o.length&&(v=hCe(n,{Axis:a,graphicalItems:o,axisType:r,axisIdKey:d,stackGroups:l,dataStartIndex:f,dataEndIndex:c})),v},pCe=function(n){var t=Us(n),i=Io(t,!1,!0);return{tooltipTicks:i,orderedTooltipTicks:D9(i,function(r){return r.coordinate}),tooltipAxis:t,tooltipAxisBandSize:u1(t,i)}},g$=function(n){var t=n.children,i=n.defaultShowTooltip,r=$r(t,oc),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}},vCe=function(n){return!n||!n.length?!1:n.some(function(t){var i=Ho(t&&t.type);return i&&i.indexOf("Bar")>=0})},y$=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"}},gCe=function(n,t){var i=n.props,r=n.graphicalItems,a=n.xAxisMap,o=a===void 0?{}:a,l=n.yAxisMap,f=l===void 0?{}:l,c=i.width,h=i.height,d=i.children,p=i.margin||{},v=$r(d,oc),y=$r(d,Vo),w=Object.keys(f).reduce(function(O,T){var M=f[T],N=M.orientation;return!M.mirror&&!M.hide?Oe(Oe({},O),{},wn({},N,O[N]+M.width)):O},{left:p.left||0,right:p.right||0}),k=Object.keys(o).reduce(function(O,T){var M=o[T],N=M.orientation;return!M.mirror&&!M.hide?Oe(Oe({},O),{},wn({},N,oa(O,"".concat(N))+M.height)):O},{top:p.top||0,bottom:p.bottom||0}),_=Oe(Oe({},k),w),S=_.bottom;v&&(_.bottom+=v.props.height||oc.defaultProps.height),y&&t&&(_=yke(_,r,i,t));var C=c-_.left-_.right,E=h-_.top-_.bottom;return Oe(Oe({brushBottom:S},_),{},{width:Math.max(C,0),height:Math.max(E,0)})},yCe=function(n,t){if(t==="xAxis")return n[t].width;if(t==="yAxis")return n[t].height},pA=function(n){var t=n.chartName,i=n.GraphicalChild,r=n.defaultTooltipEventType,a=r===void 0?"axis":r,o=n.validateTooltipEventTypes,l=o===void 0?["axis"]:o,f=n.axisComponents,c=n.legendContent,h=n.formatAxisMap,d=n.defaultProps,p=function(_,S){var C=S.graphicalItems,E=S.stackGroups,O=S.offset,T=S.updateId,M=S.dataStartIndex,N=S.dataEndIndex,F=_.barSize,R=_.layout,L=_.barGap,B=_.barCategoryGap,G=_.maxBarSize,U=y$(R),H=U.numericAxisName,P=U.cateAxisName,$=vCe(C),q=[];return C.forEach(function(Y,D){var W=P0(_.data,{graphicalItems:[Y],dataStartIndex:M,dataEndIndex:N}),V=Y.type.defaultProps!==void 0?Oe(Oe({},Y.type.defaultProps),Y.props):Y.props,z=V.dataKey,X=V.maxBarSize,ee=V["".concat(H,"Id")],re=V["".concat(P,"Id")],le={},be=f.reduce(function(Ve,Ue){var We=S["".concat(Ue.axisType,"Map")],Ye=V["".concat(Ue.axisType,"Id")];We&&We[Ye]||Ue.axisType==="zAxis"||du();var sn=We[Ye];return Oe(Oe({},Ve),{},wn(wn({},Ue.axisType,sn),"".concat(Ue.axisType,"Ticks"),Io(sn)))},le),ae=be[P],ue=be["".concat(P,"Ticks")],Ce=E&&E[ee]&&E[ee].hasStack&&Dke(Y,E[ee].stackGroups),ne=Ho(Y.type).indexOf("Bar")>=0,Ne=u1(ae,ue),pe=[],Ee=$&&vke({barSize:F,stackGroups:E,totalSize:yCe(be,P)});if(ne){var Re,we,Se=Fn(X)?G:X,De=(Re=(we=u1(ae,ue,!0))!==null&&we!==void 0?we:Se)!==null&&Re!==void 0?Re:0;pe=gke({barGap:L,barCategoryGap:B,bandSize:De!==Ne?De:Ne,sizeList:Ee[re],maxBarSize:Se}),De!==Ne&&(pe=pe.map(function(Ve){return Oe(Oe({},Ve),{},{position:Oe(Oe({},Ve.position),{},{offset:Ve.position.offset-De/2})})}))}var qe=Y&&Y.type&&Y.type.getComposedData;qe&&q.push({props:Oe(Oe({},qe(Oe(Oe({},be),{},{displayedData:W,props:_,dataKey:z,item:Y,bandSize:Ne,barPosition:pe,offset:O,stackedData:Ce,layout:R,dataStartIndex:M,dataEndIndex:N}))),{},wn(wn(wn({key:Y.key||"item-".concat(D)},H,be[H]),P,be[P]),"animationId",T)),childIndex:bpe(Y,_.children),item:Y})}),q},v=function(_,S){var C=_.props,E=_.dataStartIndex,O=_.dataEndIndex,T=_.updateId;if(!W8({props:C}))return null;var M=C.children,N=C.layout,F=C.stackOffset,R=C.data,L=C.reverseStackOrder,B=y$(N),G=B.numericAxisName,U=B.cateAxisName,H=sa(M,i),P=Tke(R,H,"".concat(G,"Id"),"".concat(U,"Id"),F,L),$=f.reduce(function(V,z){var X="".concat(z.axisType,"Map");return Oe(Oe({},V),{},wn({},X,mCe(C,Oe(Oe({},z),{},{graphicalItems:H,stackGroups:z.axisType===G&&P,dataStartIndex:E,dataEndIndex:O}))))},{}),q=gCe(Oe(Oe({},$),{},{props:C,graphicalItems:H}),S==null?void 0:S.legendBBox);Object.keys($).forEach(function(V){$[V]=h(C,$[V],q,V.replace("Map",""),t)});var Y=$["".concat(U,"Map")],D=pCe(Y),W=p(C,Oe(Oe({},$),{},{dataStartIndex:E,dataEndIndex:O,updateId:T,graphicalItems:H,stackGroups:P,offset:q}));return Oe(Oe({formattedGraphicalItems:W,graphicalItems:H,offset:q,stackGroups:P},D),$)},y=(function(k){function _(S){var C,E,O;return Z6e(this,_),O=eCe(this,_,[S]),wn(O,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),wn(O,"accessibilityManager",new z6e),wn(O,"handleLegendBBoxUpdate",function(T){if(T){var M=O.state,N=M.dataStartIndex,F=M.dataEndIndex,R=M.updateId;O.setState(Oe({legendBBox:T},v({props:O.props,dataStartIndex:N,dataEndIndex:F,updateId:R},Oe(Oe({},O.state),{},{legendBBox:T}))))}}),wn(O,"handleReceiveSyncEvent",function(T,M,N){if(O.props.syncId===T){if(N===O.eventEmitterSymbol&&typeof O.props.syncMethod!="function")return;O.applySyncEvent(M)}}),wn(O,"handleBrushChange",function(T){var M=T.startIndex,N=T.endIndex;if(M!==O.state.dataStartIndex||N!==O.state.dataEndIndex){var F=O.state.updateId;O.setState(function(){return Oe({dataStartIndex:M,dataEndIndex:N},v({props:O.props,dataStartIndex:M,dataEndIndex:N,updateId:F},O.state))}),O.triggerSyncEvent({dataStartIndex:M,dataEndIndex:N})}}),wn(O,"handleMouseEnter",function(T){var M=O.getMouseInfo(T);if(M){var N=Oe(Oe({},M),{},{isTooltipActive:!0});O.setState(N),O.triggerSyncEvent(N);var F=O.props.onMouseEnter;Pn(F)&&F(N,T)}}),wn(O,"triggeredAfterMouseMove",function(T){var M=O.getMouseInfo(T),N=M?Oe(Oe({},M),{},{isTooltipActive:!0}):{isTooltipActive:!1};O.setState(N),O.triggerSyncEvent(N);var F=O.props.onMouseMove;Pn(F)&&F(N,T)}),wn(O,"handleItemMouseEnter",function(T){O.setState(function(){return{isTooltipActive:!0,activeItem:T,activePayload:T.tooltipPayload,activeCoordinate:T.tooltipPosition||{x:T.cx,y:T.cy}}})}),wn(O,"handleItemMouseLeave",function(){O.setState(function(){return{isTooltipActive:!1}})}),wn(O,"handleMouseMove",function(T){T.persist(),O.throttleTriggeredAfterMouseMove(T)}),wn(O,"handleMouseLeave",function(T){O.throttleTriggeredAfterMouseMove.cancel();var M={isTooltipActive:!1};O.setState(M),O.triggerSyncEvent(M);var N=O.props.onMouseLeave;Pn(N)&&N(M,T)}),wn(O,"handleOuterEvent",function(T){var M=ype(T),N=oa(O.props,"".concat(M));if(M&&Pn(N)){var F,R;/.*touch.*/i.test(M)?R=O.getMouseInfo(T.changedTouches[0]):R=O.getMouseInfo(T),N((F=R)!==null&&F!==void 0?F:{},T)}}),wn(O,"handleClick",function(T){var M=O.getMouseInfo(T);if(M){var N=Oe(Oe({},M),{},{isTooltipActive:!0});O.setState(N),O.triggerSyncEvent(N);var F=O.props.onClick;Pn(F)&&F(N,T)}}),wn(O,"handleMouseDown",function(T){var M=O.props.onMouseDown;if(Pn(M)){var N=O.getMouseInfo(T);M(N,T)}}),wn(O,"handleMouseUp",function(T){var M=O.props.onMouseUp;if(Pn(M)){var N=O.getMouseInfo(T);M(N,T)}}),wn(O,"handleTouchMove",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&O.throttleTriggeredAfterMouseMove(T.changedTouches[0])}),wn(O,"handleTouchStart",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&O.handleMouseDown(T.changedTouches[0])}),wn(O,"handleTouchEnd",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&O.handleMouseUp(T.changedTouches[0])}),wn(O,"handleDoubleClick",function(T){var M=O.props.onDoubleClick;if(Pn(M)){var N=O.getMouseInfo(T);M(N,T)}}),wn(O,"handleContextMenu",function(T){var M=O.props.onContextMenu;if(Pn(M)){var N=O.getMouseInfo(T);M(N,T)}}),wn(O,"triggerSyncEvent",function(T){O.props.syncId!==void 0&&F3.emit(q3,O.props.syncId,T,O.eventEmitterSymbol)}),wn(O,"applySyncEvent",function(T){var M=O.props,N=M.layout,F=M.syncMethod,R=O.state.updateId,L=T.dataStartIndex,B=T.dataEndIndex;if(T.dataStartIndex!==void 0||T.dataEndIndex!==void 0)O.setState(Oe({dataStartIndex:L,dataEndIndex:B},v({props:O.props,dataStartIndex:L,dataEndIndex:B,updateId:R},O.state)));else if(T.activeTooltipIndex!==void 0){var G=T.chartX,U=T.chartY,H=T.activeTooltipIndex,P=O.state,$=P.offset,q=P.tooltipTicks;if(!$)return;if(typeof F=="function")H=F(q,T);else if(F==="value"){H=-1;for(var Y=0;Y=0){var Ce,ne;if(G.dataKey&&!G.allowDuplicatedCategory){var Ne=typeof G.dataKey=="function"?ue:"payload.".concat(G.dataKey.toString());Ce=Pg(Y,Ne,H),ne=D&&W&&Pg(W,Ne,H)}else Ce=Y==null?void 0:Y[U],ne=D&&W&&W[U];if(re||ee){var pe=T.props.activeIndex!==void 0?T.props.activeIndex:U;return[A.cloneElement(T,Oe(Oe(Oe({},F.props),be),{},{activeIndex:pe})),null,null]}if(!Fn(Ce))return[ae].concat(gc(O.renderActivePoints({item:F,activePoint:Ce,basePoint:ne,childIndex:U,isRange:D})))}else{var Ee,Re=(Ee=O.getItemByXY(O.state.activeCoordinate))!==null&&Ee!==void 0?Ee:{graphicalItem:ae},we=Re.graphicalItem,Se=we.item,De=Se===void 0?T:Se,qe=we.childIndex,Ve=Oe(Oe(Oe({},F.props),be),{},{activeIndex:qe});return[A.cloneElement(De,Ve),null,null]}return D?[ae,null,null]:[ae,null]}),wn(O,"renderCustomized",function(T,M,N){return A.cloneElement(T,Oe(Oe({key:"recharts-customized-".concat(N)},O.props),O.state))}),wn(O,"renderMap",{CartesianGrid:{handler:Wv,once:!0},ReferenceArea:{handler:O.renderReferenceElement},ReferenceLine:{handler:Wv},ReferenceDot:{handler:O.renderReferenceElement},XAxis:{handler:Wv},YAxis:{handler:Wv},Brush:{handler:O.renderBrush,once:!0},Bar:{handler:O.renderGraphicChild},Line:{handler:O.renderGraphicChild},Area:{handler:O.renderGraphicChild},Radar:{handler:O.renderGraphicChild},RadialBar:{handler:O.renderGraphicChild},Scatter:{handler:O.renderGraphicChild},Pie:{handler:O.renderGraphicChild},Funnel:{handler:O.renderGraphicChild},Tooltip:{handler:O.renderCursor,once:!0},PolarGrid:{handler:O.renderPolarGrid,once:!0},PolarAngleAxis:{handler:O.renderPolarAxis},PolarRadiusAxis:{handler:O.renderPolarAxis},Customized:{handler:O.renderCustomized}}),O.clipPathId="".concat((C=S.id)!==null&&C!==void 0?C:qc("recharts"),"-clip"),O.throttleTriggeredAfterMouseMove=KH(O.triggeredAfterMouseMove,(E=S.throttleDelay)!==null&&E!==void 0?E:1e3/60),O.state={},O}return iCe(_,k),J6e(_,[{key:"componentDidMount",value:function(){var C,E;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(C=this.props.margin.left)!==null&&C!==void 0?C:0,top:(E=this.props.margin.top)!==null&&E!==void 0?E:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var C=this.props,E=C.children,O=C.data,T=C.height,M=C.layout,N=$r(E,ta);if(N){var F=N.props.defaultIndex;if(!(typeof F!="number"||F<0||F>this.state.tooltipTicks.length-1)){var R=this.state.tooltipTicks[F]&&this.state.tooltipTicks[F].value,L=i6(this.state,O,F,R),B=this.state.tooltipTicks[F].coordinate,G=(this.state.offset.top+T)/2,U=M==="horizontal",H=U?{x:B,y:G}:{y:B,x:G},P=this.state.formattedGraphicalItems.find(function(q){var Y=q.item;return Y.type.name==="Scatter"});P&&(H=Oe(Oe({},H),P.props.points[F].tooltipPosition),L=P.props.points[F].tooltipPayload);var $={activeTooltipIndex:F,isTooltipActive:!0,activeLabel:R,activePayload:L,activeCoordinate:H};this.setState($),this.renderCursor(N),this.accessibilityManager.setIndex(F)}}}},{key:"getSnapshotBeforeUpdate",value:function(C,E){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==E.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==C.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==C.margin){var O,T;this.accessibilityManager.setDetails({offset:{left:(O=this.props.margin.left)!==null&&O!==void 0?O:0,top:(T=this.props.margin.top)!==null&&T!==void 0?T:0}})}return null}},{key:"componentDidUpdate",value:function(C){qS([$r(C.children,ta)],[$r(this.props.children,ta)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var C=$r(this.props.children,ta);if(C&&typeof C.props.shared=="boolean"){var E=C.props.shared?"axis":"item";return l.indexOf(E)>=0?E:a}return a}},{key:"getMouseInfo",value:function(C){if(!this.container)return null;var E=this.container,O=E.getBoundingClientRect(),T=aye(O),M={chartX:Math.round(C.pageX-T.left),chartY:Math.round(C.pageY-T.top)},N=O.width/E.offsetWidth||1,F=this.inRange(M.chartX,M.chartY,N);if(!F)return null;var R=this.state,L=R.xAxisMap,B=R.yAxisMap,G=this.getTooltipEventType(),U=v$(this.state,this.props.data,this.props.layout,F);if(G!=="axis"&&L&&B){var H=Us(L).scale,P=Us(B).scale,$=H&&H.invert?H.invert(M.chartX):null,q=P&&P.invert?P.invert(M.chartY):null;return Oe(Oe({},M),{},{xValue:$,yValue:q},U)}return U?Oe(Oe({},M),U):null}},{key:"inRange",value:function(C,E){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,T=this.props.layout,M=C/O,N=E/O;if(T==="horizontal"||T==="vertical"){var F=this.state.offset,R=M>=F.left&&M<=F.left+F.width&&N>=F.top&&N<=F.top+F.height;return R?{x:M,y:N}:null}var L=this.state,B=L.angleAxisMap,G=L.radiusAxisMap;if(B&&G){var U=Us(B);return PP({x:M,y:N},U)}return null}},{key:"parseEventsOfWrapper",value:function(){var C=this.props.children,E=this.getTooltipEventType(),O=$r(C,ta),T={};O&&E==="axis"&&(O.props.trigger==="click"?T={onClick:this.handleClick}:T={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=Ng(this.props,this.handleOuterEvent);return Oe(Oe({},M),T)}},{key:"addListener",value:function(){F3.on(q3,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){F3.removeListener(q3,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(C,E,O){for(var T=this.state.formattedGraphicalItems,M=0,N=T.length;M({root:{"--chart-text-color":n?nt(n,e):void 0,"--chart-grid-color":t?nt(t,e):void 0,"--chart-cursor-fill":i?nt(i,e):void 0,"--chart-bar-label-color":r?nt(r,e):void 0}});function SCe(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 CCe(e,n){return typeof e=="function"?e(n).fill:e==null?void 0:e.fill}const Jl=Pe(e=>{const n=ye("BarChart",xCe,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,data:f,withLegend:c,legendProps:h,series:d,onMouseLeave:p,dataKey:v,withTooltip:y,withXAxis:w,withYAxis:k,gridAxis:_,tickLine:S,xAxisProps:C,yAxisProps:E,unit:O,tooltipAnimationDuration:T,strokeDasharray:M,gridProps:N,tooltipProps:F,referenceLines:R,fillOpacity:L,barChartProps:B,type:G,orientation:U,dir:H,valueFormatter:P,children:$,barProps:q,xAxisLabel:Y,yAxisLabel:D,withBarValueLabel:W,valueLabelProps:V,withRightYAxis:z,rightYAxisLabel:X,rightYAxisProps:ee,minBarSize:re,maxBarWidth:le,mod:be,getBarColor:ae,gridColor:ue,textColor:Ce,attributes:ne,...Ne}=n,pe=ii(),Ee=_!=="none"&&(S==="x"||S==="xy"),Re=_!=="none"&&(S==="y"||S==="xy"),[we,Se]=A.useState(null),De=we!==null,qe=G==="stacked"||G==="percent",Ve=G==="percent"?_Ce:P,Ue=_e=>{Se(null),p==null||p(_e)},{resolvedClassNames:We,resolvedStyles:Ye}=Li({classNames:t,styles:a,props:n}),sn=G==="waterfall"?SCe(f,v):f,ie=Xe({name:"BarChart",classes:i0,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:ne,vars:l,varsResolver:aW}),se=d.map(_e=>{const fe=nt(_e.color,pe),Be=De&&we!==_e.name,pn=typeof q=="function"?q(_e):q,Je=pn==null?void 0:pn.shape;return A.createElement(ju,{...ie("bar"),key:_e.name,name:_e.name,dataKey:_e.name,fill:fe,stroke:fe,isAnimationActive:!1,fillOpacity:Be?.1:L,strokeOpacity:Be?.2:0,stackId:qe?"stack":_e.stackId||void 0,yAxisId:_e.yAxisId||void 0,minPointSize:re,...pn,shape:en=>{const Ke=en.payload,jn=Ke!=null&&Ke.color?nt(Ke.color,pe):typeof ae=="function"?nt(ae(Ke==null?void 0:Ke[_e.name],_e),pe):CCe(q,_e)||fe,un={...en,fill:jn};return typeof Je=="function"?Je(un):Z.isValidElement(Je)?Z.cloneElement(Je,un):typeof Je=="object"&&Je?b.jsx(mm,{...un,...Je}):b.jsx(mm,{...un})}},W&&b.jsx(Qa,{position:U==="vertical"?"right":"top",fontSize:12,fill:"var(--chart-bar-label-color, var(--mantine-color-dimmed))",formatter:en=>Ve==null?void 0:Ve(en),...typeof V=="function"?V(_e):V}))}),ke=R==null?void 0:R.map((_e,fe)=>{const Be=nt(_e.color,pe);return b.jsx(ap,{stroke:_e.color?Be:"var(--chart-grid-color)",strokeWidth:1,yAxisId:_e.yAxisId||void 0,..._e,label:{fill:_e.color?Be:"currentColor",fontSize:12,position:_e.labelPosition??"insideBottomLeft",...typeof _e.label=="object"?_e.label:{value:_e.label}},...ie("referenceLine")},fe)}),Ze={axisLine:!1,...U==="vertical"?{dataKey:v,type:"category"}:{type:"number"},tickLine:Re?{stroke:"currentColor"}:!1,allowDecimals:!0,unit:O,tickFormatter:U==="vertical"?void 0:Ve,...ie("axis")};return b.jsx(ve,{...ie("root"),onMouseLeave:Ue,dir:H||"ltr",mod:[{orientation:U},be],...Ne,children:b.jsx(P9,{...ie("container"),children:b.jsxs(wCe,{data:sn,stackOffset:G==="percent"?"expand":void 0,layout:U,maxBarSize:le,margin:{bottom:Y?30:void 0,left:D?10:void 0,right:D?5:void 0},...B,children:[c&&b.jsx(Vo,{verticalAlign:"top",content:_e=>b.jsx(t0,{payload:_e.payload,onHighlight:Se,legendPosition:(h==null?void 0:h.verticalAlign)||"top",classNames:We,styles:Ye,series:d,showColor:G!=="waterfall",attributes:ne}),...h}),b.jsxs(vl,{hide:!w,...U==="vertical"?{type:"number"}:{dataKey:v},tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:Ee?{stroke:"currentColor"}:!1,minTickGap:5,tickFormatter:U==="vertical"?Ve:void 0,...ie("axis"),...C,children:[Y&&b.jsx(Zt,{position:"insideBottom",offset:-20,fontSize:12,...ie("axisLabel"),children:Y}),C==null?void 0:C.children]}),b.jsxs(ao,{orientation:"left",tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!k,...Ze,...E,children:[D&&b.jsx(Zt,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...ie("axisLabel"),children:D}),E==null?void 0:E.children]}),b.jsxs(ao,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!z,...Ze,...ee,children:[X&&b.jsx(Zt,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...ie("axisLabel"),children:X}),E==null?void 0:E.children]}),b.jsx(R0,{strokeDasharray:M,vertical:_==="y"||_==="xy",horizontal:_==="x"||_==="xy",...ie("grid"),...N}),y&&b.jsx(ta,{animationDuration:T,isAnimationActive:T!==0,position:U==="vertical"?{}:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray:M,fill:"var(--chart-cursor-fill)"},content:({label:_e,payload:fe,labelFormatter:Be})=>b.jsx(c9,{label:Be&&fe?Be(_e,fe):_e,payload:fe,type:G==="waterfall"?"scatter":void 0,unit:O,classNames:We,styles:Ye,series:d,valueFormatter:P,attributes:ne}),...F}),se,ke,$]})})})});Jl.displayName="@mantine/charts/BarChart";Jl.classes=i0;Jl.varsResolver=aW;const ACe={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"}]},oW=(e,{textColor:n,gridColor:t})=>({root:{"--chart-text-color":n?nt(n,e):void 0,"--chart-grid-color":t?nt(t,e):void 0}}),N0=Pe(e=>{const n=ye("LineChart",ACe,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,data:f,withLegend:c,legendProps:h,series:d,onMouseLeave:p,dataKey:v,withTooltip:y,withXAxis:w,withYAxis:k,gridAxis:_,tickLine:S,xAxisProps:C,yAxisProps:E,unit:O,tooltipAnimationDuration:T,strokeDasharray:M,gridProps:N,tooltipProps:F,referenceLines:R,withDots:L,dotProps:B,activeDotProps:G,strokeWidth:U,lineChartProps:H,connectNulls:P,fillOpacity:$,curveType:q,orientation:Y,dir:D,valueFormatter:W,children:V,lineProps:z,xAxisLabel:X,yAxisLabel:ee,type:re,gradientStops:le,withRightYAxis:be,rightYAxisLabel:ae,rightYAxisProps:ue,withPointLabels:Ce,attributes:ne,gridColor:Ne,...pe}=n,Ee=ii(),Re=_!=="none"&&(S==="x"||S==="xy"),we=_!=="none"&&(S==="y"||S==="xy"),[Se,De]=A.useState(null),qe=Se!==null,Ve=_e=>{De(null),p==null||p(_e)},{resolvedClassNames:Ue,resolvedStyles:We}=Li({classNames:t,styles:a,props:n}),Ye=Xe({name:"LineChart",classes:i0,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:ne,vars:l,varsResolver:oW}),sn=`line-chart-gradient-${Ki()}`,ie=le==null?void 0:le.map(_e=>b.jsx("stop",{offset:`${_e.offset}%`,stopColor:nt(_e.color,Ee)},_e.color)),se=d.map(_e=>{const fe=nt(_e.color,Ee),Be=qe&&Se!==_e.name;return A.createElement(op,{...Ye("line"),key:_e.name,name:_e.name,dataKey:_e.name,dot:L?{fillOpacity:Be?0:1,strokeOpacity:Be?0:1,strokeWidth:1,fill:re==="gradient"?"var(--mantine-color-gray-7)":fe,stroke:re==="gradient"?"white":fe,...B}:!1,activeDot:L?{fill:re==="gradient"?"var(--mantine-color-gray-7)":fe,stroke:re==="gradient"?"white":fe,...G}:!1,fill:fe,stroke:re==="gradient"?`url(#${sn})`:fe,strokeWidth:U,isAnimationActive:!1,fillOpacity:Be?0:$,strokeOpacity:Be?.5:$,connectNulls:P,type:_e.curveType??q,strokeDasharray:_e.strokeDasharray,yAxisId:_e.yAxisId||void 0,label:Ce?b.jsx(yme,{valueFormatter:W}):void 0,...typeof z=="function"?z(_e):z})}),ke=R==null?void 0:R.map((_e,fe)=>{const Be=nt(_e.color,Ee);return b.jsx(ap,{stroke:_e.color?Be:"var(--chart-grid-color)",strokeWidth:1,yAxisId:_e.yAxisId||void 0,..._e,label:{fill:_e.color?Be:"currentColor",fontSize:12,position:_e.labelPosition??"insideBottomLeft",...typeof _e.label=="object"?_e.label:{value:_e.label}},...Ye("referenceLine")},fe)}),Ze={axisLine:!1,...Y==="vertical"?{dataKey:v,type:"category"}:{type:"number"},tickLine:we?{stroke:"currentColor"}:!1,allowDecimals:!0,unit:O,tickFormatter:Y==="vertical"?void 0:W,...Ye("axis")};return b.jsx(ve,{...Ye("root"),onMouseLeave:Ve,dir:D||"ltr",...pe,children:b.jsx(P9,{...Ye("container"),children:b.jsxs(bCe,{data:f,layout:Y,margin:{bottom:X?30:void 0,left:ee?10:void 0,right:ee?5:void 0},...H,children:[re==="gradient"&&b.jsx("defs",{children:b.jsx("linearGradient",{id:sn,x1:"0",y1:"0",x2:"0",y2:"1",children:ie})}),c&&b.jsx(Vo,{verticalAlign:"top",content:_e=>b.jsx(t0,{payload:_e.payload,onHighlight:De,legendPosition:(h==null?void 0:h.verticalAlign)||"top",classNames:Ue,styles:We,series:d,showColor:re!=="gradient",attributes:ne}),...h}),b.jsxs(vl,{hide:!w,...Y==="vertical"?{type:"number"}:{dataKey:v},tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:Re?{stroke:"currentColor"}:!1,minTickGap:5,tickFormatter:Y==="vertical"?W:void 0,...Ye("axis"),...C,children:[X&&b.jsx(Zt,{position:"insideBottom",offset:-20,fontSize:12,...Ye("axisLabel"),children:X}),C==null?void 0:C.children]}),b.jsxs(ao,{tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!k,...Ze,...E,children:[ee&&b.jsx(Zt,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...Ye("axisLabel"),children:ee}),E==null?void 0:E.children]}),b.jsxs(ao,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!be,...Ze,...ue,children:[ae&&b.jsx(Zt,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...Ye("axisLabel"),children:ae}),E==null?void 0:E.children]}),b.jsx(R0,{strokeDasharray:M,vertical:_==="y"||_==="xy",horizontal:_==="x"||_==="xy",...Ye("grid"),...N}),y&&b.jsx(ta,{animationDuration:T,isAnimationActive:T!==0,position:Y==="vertical"?{}:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray:M},content:({label:_e,payload:fe,labelFormatter:Be})=>b.jsx(c9,{label:Be&&fe?Be(_e,fe):_e,payload:fe,unit:O,classNames:Ue,styles:We,series:d,valueFormatter:W,showColor:re!=="gradient",attributes:ne}),...F}),se,ke,V]})})})});N0.displayName="@mantine/charts/LineChart";N0.classes=i0;N0.varsResolver=oW;function b$(e){if(e)return Le(e).format("YYYY-MM-DD")}function nh({icon:e,label:n,value:t,hint:i,color:r}){return b.jsx(Wt,{withBorder:!0,p:"md",radius:"md",children:b.jsxs(mt,{gap:4,children:[b.jsxs(hn,{gap:6,c:"dimmed",children:[e,b.jsx(Qe,{size:"xs",tt:"uppercase",fw:600,children:n})]}),b.jsx(Qe,{size:"xl",fw:700,c:r,children:t}),i&&b.jsx(Qe,{size:"xs",c:"dimmed",children:i})]})})}function OCe({users:e}){const[n,t]=A.useState(()=>Le().subtract(30,"day").toDate()),[i,r]=A.useState(()=>new Date),[a,o]=A.useState(null),[l,f]=A.useState(null),[c,h]=A.useState([]),[d,p]=A.useState([]),[v,y]=A.useState(null),[w,k]=A.useState(!1),[_,S]=A.useState([]);A.useEffect(()=>{CB().then(p).catch(()=>{})},[]),A.useEffect(()=>{let R=!1;return k(!0),AB({from:b$(n),to:b$(i),assignee_id:a||void 0,requester:l||void 0,tags:c.length>0?c:void 0}).then(L=>{R||(y(L),S(B=>{const G=new Set(B);for(const U of L.top_requesters??[])G.add(U.requester);return Array.from(G).sort()}))}).catch(()=>{}).finally(()=>{R||k(!1)}),()=>{R=!0}},[n,i,a,l,c]);const C=A.useMemo(()=>e.map(R=>({value:R.id,label:R.display_name||R.username})),[e]),E=A.useMemo(()=>{if(!v)return[];const R=v.cumulative_flow??[],L=R.findIndex(G=>G.total>0||G.done>0);return(L<=0?R:R.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}))},[v]),O=A.useMemo(()=>{if(!v)return[];const R=new Map;for(const L of v.throughput_daily??[])R.set(L.date,{date:L.date,completed:L.count,created:0});for(const L of v.created_daily??[]){const B=R.get(L.date)??{date:L.date,completed:0,created:0};B.created=L.count,R.set(L.date,B)}return Array.from(R.values()).sort((L,B)=>L.date.localeCompare(B.date))},[v]),T=A.useMemo(()=>v?(v.by_column??[]).map(R=>({column:R.name+(R.is_done?" ✓":""),tarjetas:R.count})):[],[v]),M=A.useMemo(()=>v?(v.top_assignees??[]).slice().sort((R,L)=>L.completed_in_range+L.active-(R.completed_in_range+R.active)).slice(0,8).map(R=>({usuario:R.display_name||R.username,completadas:R.completed_in_range,activas:R.active})):[],[v]),N=A.useMemo(()=>v?(v.top_requesters??[]).map(R=>({solicitante:R.requester,activas:R.active,completadas:R.completed_in_range})):[],[v]),F=A.useMemo(()=>v?(v.movements_by_user??[]).filter(R=>R.moves>0).slice(0,8).map(R=>({usuario:R.display_name||R.username,movimientos:R.moves})):[],[v]);return b.jsx(ve,{p:"md",children:b.jsxs(mt,{gap:"md",children:[b.jsxs(hn,{justify:"space-between",children:[b.jsx(ku,{order:3,children:"Dashboard"}),b.jsxs(hn,{gap:"xs",wrap:"nowrap",children:[b.jsx(su,{label:"Desde",value:n,onChange:R=>t(R),size:"xs",clearable:!1,valueFormat:"YYYY-MM-DD",style:{minWidth:140}}),b.jsx(su,{label:"Hasta",value:i,onChange:R=>r(R),size:"xs",clearable:!1,valueFormat:"YYYY-MM-DD",style:{minWidth:140}}),b.jsx(Xo,{label:"Asignado",size:"xs",placeholder:"Todos",value:a,onChange:o,data:C,clearable:!0,searchable:!0,style:{minWidth:160}}),b.jsx(Xo,{label:"Solicitante",size:"xs",placeholder:"Todos",value:l,onChange:f,data:_.map(R=>({value:R,label:R})),clearable:!0,searchable:!0,style:{minWidth:160}}),b.jsx(Ay,{label:"Tags",size:"xs",placeholder:"Todas",value:c,onChange:h,data:d,clearable:!0,searchable:!0,style:{minWidth:200}})]})]}),w&&!v&&b.jsx(Ac,{p:"xl",children:b.jsx(zi,{})}),v&&(()=>{const R=v.totals??{},L=v.lead_time??{n:0,p50_ms:0,p90_ms:0},B=G=>R[G]??0;return b.jsxs(b.Fragment,{children:[b.jsxs(Nh,{cols:{base:2,md:5},spacing:"md",children:[b.jsx(nh,{icon:b.jsx(Hj,{size:14}),label:"Totales",value:B("cards"),hint:`${B("columns")} columnas, ${B("users")} usuarios`}),b.jsx(nh,{icon:b.jsx(Hj,{size:14}),label:"Activas",value:B("cards_active"),hint:"Sin completar",color:"blue"}),b.jsx(nh,{icon:b.jsx(Ih,{size:14}),label:"Completadas (rango)",value:B("cards_completed_in_range"),hint:`${B("cards_done")} completadas total · ${B("cards_created_in_range")} creadas rango`,color:"green"}),b.jsx(nh,{icon:b.jsx(Ooe,{size:14}),label:"Lead time p50",value:L.n>0?dr(L.p50_ms):0,hint:`p90 ${L.n>0?dr(L.p90_ms):0} · n=${L.n}`}),b.jsx(nh,{icon:b.jsx(Gl,{size:14}),label:"Bloqueos activos",value:B("active_locks"),hint:`Total bloqueado: ${dr(v.lock_total_ms??0)}`,color:B("active_locks")>0?"yellow":void 0})]}),b.jsxs(Wt,{withBorder:!0,p:"md",radius:"md",children:[b.jsxs(hn,{gap:6,mb:"sm",children:[b.jsx(Vj,{size:16}),b.jsx(Qe,{fw:600,children:"Cumulative Flow Diagram"}),b.jsx(Qe,{size:"xs",c:"dimmed",children:"total vs hechas (acumulado)"})]}),E.length===0?b.jsx(Qe,{c:"dimmed",size:"sm",children:"Sin datos."}):b.jsx("div",{style:{height:260,width:"100%"},children:b.jsx(P9,{width:"100%",height:"100%",children:b.jsxs(kCe,{data:E,margin:{top:10,right:16,left:0,bottom:0},children:[b.jsx(R0,{strokeDasharray:"5 5",stroke:"var(--mantine-color-gray-4)"}),b.jsx(vl,{dataKey:"date",tick:{fontSize:12,fill:"currentColor"}}),b.jsx(ao,{allowDecimals:!1,tick:{fontSize:12,fill:"currentColor"}}),b.jsx(ta,{contentStyle:{background:"var(--mantine-color-body)",border:"1px solid var(--mantine-color-gray-3)",borderRadius:6,fontSize:12}}),b.jsx(Vo,{wrapperStyle:{fontSize:12}}),b.jsx(es,{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}}),b.jsx(es,{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}})]})})})]}),b.jsxs(Nr,{children:[b.jsx(Nr.Col,{span:{base:12,md:8},children:b.jsxs(Wt,{withBorder:!0,p:"md",radius:"md",children:[b.jsxs(hn,{gap:6,mb:"sm",children:[b.jsx(Vj,{size:16}),b.jsx(Qe,{fw:600,children:"Throughput diario"})]}),O.length===0?b.jsx(Qe,{c:"dimmed",size:"sm",children:"Sin datos en el rango."}):b.jsx(N0,{h:240,data:O,dataKey:"date",curveType:"monotone",withLegend:!0,series:[{name:"completed",label:"Completadas",color:"green.6"},{name:"created",label:"Creadas",color:"blue.6"}]})]})}),b.jsx(Nr.Col,{span:{base:12,md:4},children:b.jsxs(Wt,{withBorder:!0,p:"md",radius:"md",children:[b.jsx(Qe,{fw:600,mb:"sm",children:"Tarjetas por columna"}),T.length===0?b.jsx(Qe,{c:"dimmed",size:"sm",children:"Sin columnas."}):b.jsx(Jl,{h:240,data:T,dataKey:"column",orientation:"vertical",yAxisProps:{width:100},series:[{name:"tarjetas",label:"Tarjetas",color:"blue.6"}]})]})})]}),b.jsxs(Nr,{children:[b.jsx(Nr.Col,{span:{base:12,md:6},children:b.jsxs(Wt,{withBorder:!0,p:"md",radius:"md",children:[b.jsx(Qe,{fw:600,mb:"sm",children:"Top asignados"}),M.length===0?b.jsx(Qe,{c:"dimmed",size:"sm",children:"Sin asignaciones."}):b.jsx(Jl,{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"})]})}),b.jsx(Nr.Col,{span:{base:12,md:6},children:b.jsxs(Wt,{withBorder:!0,p:"md",radius:"md",children:[b.jsx(Qe,{fw:600,mb:"sm",children:"Top solicitantes"}),N.length===0?b.jsx(Qe,{c:"dimmed",size:"sm",children:"Sin solicitantes en el rango."}):b.jsx(Jl,{h:Math.max(240,N.length*32),data:N,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"})]})})]}),b.jsxs(Nr,{children:[b.jsx(Nr.Col,{span:{base:12,md:6},children:b.jsxs(Wt,{withBorder:!0,p:"md",radius:"md",children:[b.jsx(Qe,{fw:600,mb:"sm",children:"Movimientos por usuario (rango)"}),F.length===0?b.jsx(Qe,{c:"dimmed",size:"sm",children:"Sin movimientos registrados."}):b.jsx(Jl,{h:240,data:F,dataKey:"usuario",orientation:"vertical",yAxisProps:{width:120},series:[{name:"movimientos",label:"Movimientos",color:"orange.6"}]})]})}),b.jsx(Nr.Col,{span:{base:12,md:6},children:b.jsxs(Wt,{withBorder:!0,p:"md",radius:"md",children:[b.jsx(Qe,{fw:600,mb:"sm",children:"Tiempo en columna (cycle time)"}),b.jsxs(St,{striped:!0,highlightOnHover:!0,withTableBorder:!0,withColumnBorders:!0,fz:"xs",children:[b.jsx(St.Thead,{children:b.jsxs(St.Tr,{children:[b.jsx(St.Th,{children:"Columna"}),b.jsx(St.Th,{children:"n"}),b.jsx(St.Th,{children:"p50"}),b.jsx(St.Th,{children:"p90"}),b.jsx(St.Th,{children:"avg"})]})}),b.jsx(St.Tbody,{children:(v.cycle_time_per_column??[]).map(G=>b.jsxs(St.Tr,{children:[b.jsx(St.Td,{children:b.jsxs(hn,{gap:6,wrap:"nowrap",children:[b.jsx(Qe,{size:"xs",fw:500,children:G.name}),G.is_done&&b.jsx(ti,{size:"xs",color:"green",variant:"light",children:"done"})]})}),b.jsx(St.Td,{children:G.stats.n}),b.jsx(St.Td,{children:G.stats.n>0?dr(G.stats.p50_ms):"—"}),b.jsx(St.Td,{children:G.stats.n>0?dr(G.stats.p90_ms):"—"}),b.jsx(St.Td,{children:G.stats.n>0?dr(G.stats.avg_ms):"—"})]},G.column_id))})]})]})})]})]})})()]})})}function ECe(e){try{return JSON.parse(e)}catch{return{}}}function TCe(e){const n=ECe(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:b.jsx(Bh,{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:b.jsx(sh,{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:b.jsx(sh,{size:12}),color:"orange"};case"description_changed":return{id:e.id,ts:e.created_at,kind:"Descripcion",actorID:e.actor_id,detail:"edicion",icon:b.jsx(sh,{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:b.jsx(HC,{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:b.jsx(hse,{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:b.jsx(xse,{size:12}),color:"teal"};case"unassigned":return{id:e.id,ts:e.created_at,kind:"Sin asignar",actorID:e.actor_id,detail:"",icon:b.jsx(kse,{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:b.jsx(jF,{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:b.jsx(voe,{size:12}),color:"gray"};default:return{id:e.id,ts:e.created_at,kind:e.kind,actorID:e.actor_id,detail:e.payload,icon:b.jsx(sh,{size:12}),color:"gray"}}}function jCe({card:e}){const[n,t]=A.useState(null),[i,r]=A.useState([]);A.useEffect(()=>{uie(e.id).then(t).catch(()=>t({column_history:[],lock_periods:[],events:[],total_locked_ms:0,currently_locked:!1})),SB().then(r).catch(()=>{})},[e.id]);const a=A.useMemo(()=>{const d=new Map;for(const p of i)d.set(p.id,p);return d},[i]),o=A.useMemo(()=>{if(!n)return[];const d=[];for(const p of n.events||[])d.push(TCe(p));for(const p of n.column_history||[])d.push({id:"h_in_"+p.id,ts:p.entered_at,kind:"Mueve a columna",actorID:p.actor_id,detail:p.column_name||p.column_id,icon:b.jsx(hoe,{size:12}),color:"blue"});for(const p of n.lock_periods||[])d.push({id:"lk_"+p.id,ts:p.locked_at,kind:"Bloqueada",actorID:p.actor_id,detail:"",icon:b.jsx(Gl,{size:12}),color:"yellow"}),p.unlocked_at&&d.push({id:"lku_"+p.id,ts:p.unlocked_at,kind:"Desbloqueada",actorID:p.actor_id,detail:dr(p.duration_ms),icon:b.jsx(zF,{size:12}),color:"yellow"});return d.sort((p,v)=>p.ts.localeCompare(v.ts))},[n]);if(!n)return b.jsx(hn,{justify:"center",p:"xl",children:b.jsx(zi,{size:"sm"})});const{column_history:l,total_locked_ms:f,currently_locked:c}=n;if(o.length===0)return b.jsx(Qe,{c:"dimmed",children:"Sin historial."});const h=d=>{if(!d)return"";const p=a.get(d);return p?p.display_name||p.username:d};return b.jsxs(mt,{gap:"md",children:[b.jsx(Qe,{size:"sm",c:"dimmed",children:"Linea de tiempo completa de la tarjeta."}),b.jsx(Vf,{active:o.length,bulletSize:22,lineWidth:2,children:o.map(d=>b.jsx(Vf.Item,{bullet:d.icon,color:d.color,title:b.jsxs(hn,{gap:6,wrap:"wrap",children:[b.jsx(Qe,{fw:500,size:"sm",children:d.kind}),d.actorID&&b.jsx(ti,{size:"xs",variant:"light",color:"cyan",leftSection:b.jsx(Ose,{size:10}),children:h(d.actorID)}),d.detail&&b.jsx(ti,{size:"xs",variant:"outline",color:d.color,children:d.detail})]}),children:b.jsx(Qe,{size:"xs",c:"dimmed",children:new Date(d.ts).toLocaleString()})},d.id))}),b.jsx(zm,{}),b.jsxs(hn,{gap:6,align:"center",children:[b.jsx(joe,{size:14}),b.jsx(Qe,{fw:500,size:"sm",children:"Columnas visitadas"}),b.jsx(ti,{size:"xs",variant:"light",color:"gray",children:l.length}),b.jsx(Gl,{size:14,color:"var(--mantine-color-yellow-6)"}),b.jsx(ti,{size:"xs",variant:"light",color:f>0?"yellow":"gray",children:dr(f)}),c&&b.jsx(ti,{size:"xs",variant:"filled",color:"yellow",children:"bloqueada"})]})]})}const Gv=26;function sW({value:e,onChange:n,options:t=qF,onOpenCustom:i}){const[r,a]=A.useState(!1),[o,l]=A.useState(e&&e.startsWith("#")?e:"#888888"),f=!!e&&e.startsWith("#")&&!t.some(c=>c.value===e);return b.jsxs(b.Fragment,{children:[b.jsxs(hn,{gap:6,maw:280,children:[t.map(c=>{const h=e===c.value;return b.jsx(Ai,{label:c.label,withArrow:!0,children:b.jsx(ve,{role:"button",onClick:d=>{d.stopPropagation(),n(c.value)},"aria-label":c.label,style:{width:Gv,height:Gv,borderRadius:"50%",background:jse(c.value),border:`2px solid ${h?"var(--mantine-color-white)":WC(c.value)}`,boxShadow:h?"0 0 0 2px var(--mantine-color-blue-5)":void 0,cursor:"pointer",flexShrink:0,transition:"transform .1s"}})},c.value||"default")}),b.jsx(Ai,{label:"Color personalizado",withArrow:!0,children:b.jsx(ve,{role:"button",onMouseDown:c=>{c.stopPropagation()},onClick:c=>{c.stopPropagation(),i?i():a(!0)},"aria-label":"Color personalizado",style:{width:Gv,height:Gv,borderRadius:"50%",background:f?o:"transparent",border:`2px dashed ${f?o:"var(--mantine-color-gray-5)"}`,boxShadow:f?"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:b.jsx(HC,{size:14})})})]}),!i&&b.jsx(r6,{opened:r,onClose:()=>a(!1),value:o,onAccept:c=>{l(c),n(c)}})]})}const th=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;function r6({opened:e,onClose:n,value:t,onAccept:i}){const[r,a]=A.useState(t||"#888888"),[o,l]=A.useState(t||"#888888");A.useEffect(()=>{if(e){const d=t&&th.test(t)?t:"#888888";a(d),l(d)}},[e,t]);const f=d=>{let p=d.trim();p&&!p.startsWith("#")&&(p="#"+p),l(p),th.test(p)&&a(p)},c=d=>{a(d),l(d)},h=()=>{i(r),n()};return b.jsx(Br,{opened:e,onClose:n,title:"Color personalizado",size:"auto",centered:!0,withinPortal:!0,zIndex:2e3,closeOnClickOutside:!0,closeOnEscape:!1,trapFocus:!1,withCloseButton:!1,children:b.jsxs(mt,{gap:"sm",onMouseDown:d=>d.stopPropagation(),onPointerDown:d=>d.stopPropagation(),onClick:d=>d.stopPropagation(),children:[b.jsx(vy,{value:r,onChange:c,format:"hex",swatches:["#1c7ed6","#15aabf","#12b886","#37b24d","#82c91e","#fab005","#fd7e14","#fa5252","#e64980","#be4bdb","#7950f2","#4c6ef5","#868e96","#212529"],fullWidth:!0}),b.jsxs(hn,{align:"end",gap:"xs",children:[b.jsx(rl,{label:"Hex",value:o,onChange:d=>f(d.currentTarget.value),error:o&&!th.test(o)?"Hex invalido":void 0,size:"xs",style:{flex:1},placeholder:"#rrggbb"}),b.jsx(ve,{style:{width:32,height:32,borderRadius:4,background:th.test(o)?o:"transparent",border:"1px solid var(--mantine-color-dark-4)"}})]}),b.jsxs(hn,{justify:"flex-end",gap:"xs",children:[b.jsx(qt,{variant:"default",size:"xs",onClick:n,children:"Cancelar"}),b.jsx(qt,{size:"xs",onClick:h,disabled:!th.test(r),children:"Aceptar"})]})]})})}function MCe({card:e,now:n,onDelete:t,onEdit:i,onDuplicate:r,onChangeColor:a,onShowHistory:o,onToggleLock:l,onAssign:f,onSetDeadline:c,onSetRequester:h,requesterOptions:d,onOpenCustomColor:p,activeSticker:v,onAddSticker:y,onRemoveSticker:w,onMoveSticker:k,onCommitSticker:_,users:S,assignee:C,inDoneColumn:E,isOverlay:O,highlight:T}){const M=E||!!e.completed_at,[N,F]=A.useState(!1),[R,L]=A.useState(!1),[B,G]=A.useState(!1),[U,H]=A.useState(!1),[P,$]=A.useState(e.requester||""),[q,Y]=A.useState(!1),D=A.useRef(null),W=A.useRef(null),V=!!v,{attributes:z,listeners:X,setNodeRef:ee,transform:re,transition:le,isDragging:be}=nF({id:e.id,data:{type:"card",columnId:e.column_id,locked:e.locked},disabled:V}),ae=A.useCallback(fe=>{D.current=fe,ee(fe)},[ee]);A.useEffect(()=>{T&&D.current&&D.current.scrollIntoView({behavior:"smooth",block:"center"})},[T]);const ue=fe=>{if(!V||!y||O||fe.target.closest("[data-sticker-overlay]"))return;const Be=fe.currentTarget.getBoundingClientRect(),pn=(fe.clientX-Be.left)/Be.width,Je=(fe.clientY-Be.top)/Be.height;y(e.id,Math.max(0,Math.min(1,pn)),Math.max(0,Math.min(1,Je)))},Ce=fe=>Be=>{var jn;if(!V||O||!k||Be.button!==0)return;Be.stopPropagation(),Be.preventDefault();const pn=(jn=D.current)==null?void 0:jn.getBoundingClientRect();if(!pn)return;W.current=fe;const Je=Be.currentTarget;Je.setPointerCapture(Be.pointerId);const en=un=>{const tt=W.current;if(tt===null)return;const pt=(un.clientX-pn.left)/pn.width,Mn=(un.clientY-pn.top)/pn.height;k(e.id,tt,Math.max(0,Math.min(1,pt)),Math.max(0,Math.min(1,Mn)))},Ke=un=>{var tt;(tt=Je.releasePointerCapture)==null||tt.call(Je,un.pointerId),Je.removeEventListener("pointermove",en),Je.removeEventListener("pointerup",Ke),Je.removeEventListener("pointercancel",Ke),W.current=null,_==null||_(e.id)};Je.addEventListener("pointermove",en),Je.addEventListener("pointerup",Ke),Je.addEventListener("pointercancel",Ke)},ne=fe=>Be=>{!V||O||(Be.preventDefault(),Be.stopPropagation(),w==null||w(e.id,fe))},Ne={transform:to.Transform.toString(re),transition:le,opacity:be?.4:1,background:FF(e.color),borderColor:T?"var(--mantine-color-blue-5)":e.locked?"var(--mantine-color-yellow-6)":WC(e.color),borderWidth:T||e.locked?2:1,boxShadow:T?"0 0 0 3px var(--mantine-color-blue-4)":void 0,filter:M?"brightness(0.55) saturate(0.7)":void 0},pe=e.entered_at?new Date(e.entered_at).getTime():n,Ee=Math.max(0,n-pe),Re=e.deadline?new Date(e.deadline).getTime():0,we=Re?Re-n:0,Se=Re?we<0:!1,De=e.created_at?new Date(e.created_at).getTime():0,qe=Re&&De?Re-De:0,Ve=qe>0?we/qe:0;let Ue="blue",We="light";Se?(Ue="red.9",We="filled"):Ve<.1?(Ue="red",We="filled"):Ve<.5&&(Ue="yellow",We="light");const Ye=e.locked_at?new Date(e.locked_at).getTime():0,sn=e.locked&&Ye?Math.max(0,n-Ye):0,ie=e.created_at?new Date(e.created_at).getTime():0,se=e.completed_at?new Date(e.completed_at).getTime():0,ke=M&&ie&&se?Math.max(0,se-ie):0,Ze=fe=>{fe.preventDefault(),Y(!0)},_e=b.jsxs(b.Fragment,{children:[b.jsx(Gn.Label,{children:"Acciones"}),b.jsx(Gn.Item,{leftSection:b.jsx(sh,{size:14}),onClick:()=>{Y(!1),i(e)},children:"Editar"}),r&&b.jsx(Gn.Item,{leftSection:b.jsx(Doe,{size:14}),onClick:()=>{Y(!1),r(e.id)},children:"Duplicar"}),b.jsxs(En,{opened:N,onChange:F,position:"right-start",withArrow:!0,shadow:"md",children:[b.jsx(En.Target,{children:b.jsx(Gn.Item,{leftSection:b.jsx(HC,{size:14}),onClick:fe=>{fe.preventDefault(),fe.stopPropagation(),F(Be=>!Be)},closeMenuOnClick:!1,children:"Color"})}),b.jsx(En.Dropdown,{p:"xs",onDoubleClick:fe=>fe.stopPropagation(),onClick:fe=>fe.stopPropagation(),onMouseDown:fe=>fe.stopPropagation(),children:b.jsx(sW,{value:e.color,onChange:fe=>a(e.id,fe),onOpenCustom:p?()=>p(e.id,e.color||"#888888"):void 0})})]}),b.jsxs(En,{opened:R,onChange:L,position:"right-start",withArrow:!0,shadow:"md",withinPortal:!1,children:[b.jsx(En.Target,{children:b.jsxs(Gn.Item,{leftSection:b.jsx(bse,{size:14}),onClick:fe=>{fe.preventDefault(),fe.stopPropagation(),L(Be=>!Be)},closeMenuOnClick:!1,children:["Asignar a ",C?`(${C.display_name||C.username})`:"..."]})}),b.jsx(En.Dropdown,{p:"xs",onDoubleClick:fe=>fe.stopPropagation(),onClick:fe=>fe.stopPropagation(),onMouseDown:fe=>fe.stopPropagation(),children:b.jsx(Xo,{placeholder:"Sin asignar",value:e.assignee_id??null,onChange:fe=>{f(e.id,fe),L(!1),Y(!1)},data:S.map(fe=>({value:fe.id,label:fe.display_name||fe.username})),clearable:!0,searchable:!0,autoFocus:!0,comboboxProps:{withinPortal:!1}})})]}),b.jsxs(En,{opened:B,onChange:G,position:"right-start",withArrow:!0,shadow:"md",withinPortal:!1,children:[b.jsx(En.Target,{children:b.jsxs(Gn.Item,{leftSection:b.jsx(Cse,{size:14}),onClick:fe=>{fe.preventDefault(),fe.stopPropagation(),$(e.requester||""),G(Be=>!Be)},closeMenuOnClick:!1,children:["Solicitante ",e.requester?`(${e.requester})`:"..."]})}),b.jsx(En.Dropdown,{p:"xs",onDoubleClick:fe=>fe.stopPropagation(),onClick:fe=>fe.stopPropagation(),onMouseDown:fe=>fe.stopPropagation(),children:b.jsx(uy,{placeholder:"Sin solicitante",value:P,onChange:$,data:d||[],autoFocus:!0,comboboxProps:{withinPortal:!1},onKeyDown:fe=>{fe.key==="Enter"?(fe.preventDefault(),h==null||h(e.id,P.trim()),G(!1),Y(!1)):fe.key==="Escape"&&G(!1)},onOptionSubmit:fe=>{$(fe),h==null||h(e.id,fe),G(!1),Y(!1)}})})]}),b.jsx(Gn.Item,{leftSection:e.locked?b.jsx(zF,{size:14}):b.jsx(Gl,{size:14}),color:e.locked?"yellow":void 0,onClick:()=>{Y(!1),l(e.id,!e.locked)},children:e.locked?"Desbloquear":"Bloquear"}),b.jsx(Gn.Item,{leftSection:b.jsx(Ioe,{size:14}),onClick:()=>{Y(!1),o(e)},children:"Historial"}),c&&b.jsxs(En,{opened:U,onChange:H,position:"right-start",withArrow:!0,shadow:"md",withinPortal:!1,children:[b.jsx(En.Target,{children:b.jsx(Gn.Item,{leftSection:b.jsx(jF,{size:14}),onClick:fe=>{fe.preventDefault(),fe.stopPropagation(),H(Be=>!Be)},closeMenuOnClick:!1,children:e.deadline?`Deadline (${e.deadline.slice(0,10)})`:"Deadline..."})}),b.jsxs(En.Dropdown,{p:"xs",onDoubleClick:fe=>fe.stopPropagation(),onClick:fe=>fe.stopPropagation(),onMouseDown:fe=>fe.stopPropagation(),children:[b.jsx(su,{value:e.deadline?e.deadline.slice(0,10):null,onChange:fe=>{const Be=fe?typeof fe=="string"?fe.slice(0,10):new Date(fe).toISOString().slice(0,10):null;c(e.id,Be?`${Be}T23:59:59Z`:null),H(!1),Y(!1)},clearable:!0,valueFormat:"DD/MM/YYYY",size:"xs",placeholder:"Elegir fecha",popoverProps:{withinPortal:!1}}),e.deadline&&b.jsx(Ai,{label:"Quitar deadline",withArrow:!0,children:b.jsx($t,{size:"sm",variant:"subtle",color:"red",mt:6,onClick:()=>{c(e.id,null),H(!1),Y(!1)},children:b.jsx(Wf,{size:12})})})]})]}),b.jsx(Gn.Divider,{}),b.jsx(Gn.Item,{leftSection:b.jsx(Wf,{size:14}),color:"red",onClick:()=>{Y(!1),t(e.id)},children:"Borrar"})]});return b.jsxs(Wt,{ref:ae,style:{...Ne,position:"relative",cursor:V?"copy":"grab",touchAction:"none"},withBorder:!0,p:"xs",shadow:O?"lg":"xs",radius:"md",onContextMenu:Ze,onClick:ue,onDoubleClick:fe=>{fe.stopPropagation(),i(e)},...z,...V?{}:X,children:[b.jsxs(mt,{gap:6,style:{position:"relative",zIndex:1,pointerEvents:V?"none":void 0},children:[b.jsxs(hn,{justify:"space-between",gap:4,wrap:"nowrap",align:"flex-start",children:[b.jsxs(hn,{gap:4,wrap:"nowrap",style:{flex:1,minWidth:0},align:"flex-start",children:[b.jsx(NF,{size:14,color:"var(--mantine-color-dark-2)",style:{flexShrink:0,marginTop:4}}),e.locked&&b.jsx(Ai,{label:"Bloqueada",withArrow:!0,children:b.jsx(Gl,{size:14,color:"var(--mantine-color-yellow-6)",style:{flexShrink:0,marginTop:4}})}),b.jsx(Qe,{size:"sm",fw:500,style:{flex:1,wordBreak:"break-word",whiteSpace:"normal",textDecoration:M?"line-through":"none",opacity:M?.7:1},children:e.title})]}),b.jsxs(Gn,{opened:q,onChange:Y,position:"bottom-end",shadow:"md",withArrow:!0,children:[b.jsx(Gn.Target,{children:b.jsx($t,{variant:"subtle",color:"gray",size:"sm","aria-label":"Acciones",style:{flexShrink:0},onPointerDown:fe=>fe.stopPropagation(),children:b.jsx(PF,{size:14})})}),b.jsx(Gn.Dropdown,{onDoubleClick:fe=>fe.stopPropagation(),onClick:fe=>fe.stopPropagation(),onMouseDown:fe=>fe.stopPropagation(),onContextMenu:fe=>fe.stopPropagation(),children:_e})]})]}),(e.requester||C)&&b.jsxs(hn,{gap:6,wrap:"nowrap",style:{minWidth:0},children:[e.requester&&b.jsxs(b.Fragment,{children:[b.jsx(tl,{size:18,radius:"xs",color:CS(e.requester),style:{flexShrink:0},children:e.requester.slice(0,2).toUpperCase()}),b.jsx(Qe,{size:"xs",c:"dimmed",truncate:!0,children:e.requester})]}),e.requester&&C&&b.jsx(Qe,{size:"xs",c:"dimmed",style:{flexShrink:0},children:"-"}),C&&b.jsxs(b.Fragment,{children:[b.jsx(tl,{size:18,radius:"xl",color:C.color||"blue",style:{flexShrink:0},children:(C.display_name||C.username).slice(0,2).toUpperCase()}),b.jsx(Qe,{size:"xs",c:"dimmed",truncate:!0,children:C.display_name||C.username})]})]}),e.description&&b.jsx(Qe,{size:"xs",c:"dimmed",lineClamp:3,children:e.description}),e.tags&&e.tags.length>0&&b.jsx(hn,{gap:4,wrap:"wrap",children:e.tags.map(fe=>b.jsx(ti,{size:"xs",variant:"light",color:CS(fe),radius:"sm",children:fe},fe))}),b.jsxs(hn,{gap:4,wrap:"wrap",children:[e.locked&&b.jsx(ti,{size:"xs",variant:"light",color:"yellow",leftSection:b.jsx(Gl,{size:10}),children:dr(sn)}),!e.locked&&M&&e.completed_at?b.jsxs(b.Fragment,{children:[b.jsx(ti,{size:"xs",variant:"light",color:"teal",leftSection:b.jsx(MF,{size:10}),children:OS(e.completed_at)}),b.jsxs(ti,{size:"xs",variant:"light",color:"gray",leftSection:b.jsx(Uj,{size:10}),children:["Total: ",dr(ke)]}),e.total_locked_ms>0&&b.jsx(ti,{size:"xs",variant:"light",color:"yellow",leftSection:b.jsx(Gl,{size:10}),children:dr(e.total_locked_ms)})]}):e.locked?null:e.deadline?b.jsx(Ai,{label:`Vence: ${OS(e.deadline)}`,withArrow:!0,children:b.jsx(ti,{size:"xs",variant:We,color:Ue,leftSection:b.jsx($F,{size:10}),children:Se?`-${dr(-we)}`:dr(we)})}):b.jsx(ti,{size:"xs",variant:"light",color:"gray",leftSection:b.jsx(Uj,{size:10}),children:dr(Ee)})]}),e.seq_num>0&&b.jsxs(Qe,{size:"xs",c:"dimmed",style:{marginTop:-2},children:["#",String(e.seq_num).padStart(5,"0")]})]}),e.stickers&&e.stickers.length>0&&b.jsx("div",{"data-sticker-overlay":!0,style:{position:"absolute",inset:0,pointerEvents:"none",overflow:"hidden",borderRadius:"inherit",zIndex:0},children:e.stickers.map((fe,Be)=>b.jsx("span",{onPointerDown:Ce(Be),onContextMenu:ne(Be),title:V?"Arrastra para mover. Click derecho para borrar.":"",style:{position:"absolute",left:`${fe.x*100}%`,top:`${fe.y*100}%`,transform:"translate(-50%, -50%)",fontSize:48,lineHeight:1,opacity:1,userSelect:"none",cursor:V&&!O?"grab":"default",pointerEvents:V&&!O?"auto":"none",touchAction:"none"},children:fe.emoji},Be))})]})}const lW=A.memo(MCe);function DCe({column:e,cards:n,now:t,collapsed:i,onAddCard:r,onRenameColumn:a,onResizeColumn:o,onMoveColumnLocation:l,onDeleteColumn:f,onSetWIPLimit:c,onToggleDone:h,onEditCard:d,onDeleteCard:p,onDuplicateCard:v,onChangeCardColor:y,onShowHistory:w,onToggleCardLock:k,onAssignCard:_,onSetCardDeadline:S,onSetRequester:C,requesterOptions:E,onOpenCustomCardColor:O,activeSticker:T,onAddSticker:M,onRemoveSticker:N,onMoveSticker:F,onCommitSticker:R,users:L,usersById:B,highlightCardId:G}){const[U,H]=A.useState(!1),[P,$]=A.useState(e.name),[q,Y]=A.useState(null),[D,W]=A.useState(!1),[V,z]=A.useState(e.wip_limit),[X,ee]=A.useState(()=>i?localStorage.getItem(`kanban_col_body_${e.id}`)==="1":!1);A.useEffect(()=>{i&&localStorage.setItem(`kanban_col_body_${e.id}`,X?"1":"0")},[X,i,e.id]);const re=e.wip_limit,le=re>0&&n.length>re;A.useEffect(()=>{Y(null)},[e.width]);const{attributes:be,listeners:ae,setNodeRef:ue,transform:Ce,transition:ne,isDragging:Ne}=nF({id:`column-${e.id}`,data:{type:"column",columnId:e.id,location:e.location}}),pe=i?"100%":q??e.width,Ee=i?{transform:to.Transform.toString(Ce),transition:ne,opacity:Ne?.4:1,width:"100%",display:"flex",flexDirection:"column",position:"relative",flex:X?"0 0 auto":"1 1 auto",minHeight:0}:{transform:to.Transform.toString(Ce),transition:ne,opacity:Ne?.4:1,width:pe,minWidth:pe,maxWidth:pe,display:"flex",flexDirection:"column",height:"100%",position:"relative"},Re=n.map(se=>se.id),we=()=>{const se=P.trim();se&&se!==e.name&&a(e.id,se),H(!1)},Se=A.useRef(null),De=se=>{se.preventDefault(),se.stopPropagation(),Se.current={startX:se.clientX,startWidth:e.width},document.body.style.cursor="col-resize",document.body.style.userSelect="none";const ke=_e=>{if(!Se.current)return;const fe=_e.clientX-Se.current.startX,Be=Math.min(800,Math.max(200,Se.current.startWidth+fe));Y(Be)},Ze=()=>{Se.current&&qe.current!==null&&o(e.id,qe.current),Se.current=null,document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("mousemove",ke),window.removeEventListener("mouseup",Ze)};window.addEventListener("mousemove",ke),window.addEventListener("mouseup",Ze)},qe=A.useRef(null);A.useEffect(()=>{qe.current=q},[q]);const Ve=e.location==="sidebar",Ue=Ve?"Restaurar al board":"Mover al sidebar",We=Ve?soe:uoe,Ye=()=>{const se=typeof V=="number"?V:parseInt(String(V),10),ke=Number.isFinite(se)&&se>=0?Math.floor(se):0;ke!==e.wip_limit&&c(e.id,ke),W(!1)},sn=le?"var(--mantine-color-red-9)":"var(--mantine-color-dark-7)",ie=le?"var(--mantine-color-red-6)":void 0;return b.jsxs(Wt,{ref:ue,style:{...Ee,background:sn,borderColor:ie,borderWidth:le?2:1},withBorder:!0,radius:"md",p:"sm",children:[b.jsxs(hn,{justify:"space-between",mb:"xs",wrap:"nowrap",children:[b.jsxs(hn,{gap:4,wrap:"nowrap",style:{flex:1,minWidth:0},children:[b.jsx($t,{variant:"subtle",color:"gray",size:"sm",...be,...ae,style:{cursor:"grab"},"aria-label":"Drag column",children:b.jsx(NF,{size:14})}),U?b.jsx(rl,{size:"xs",value:P,onChange:se=>$(se.currentTarget.value),autoFocus:!0,onBlur:we,onKeyDown:se=>{se.key==="Enter"&&we(),se.key==="Escape"&&($(e.name),H(!1))},style:{flex:1}}):b.jsx(Qe,{fw:600,size:"sm",truncate:!0,onDoubleClick:()=>{$(e.name),H(!0)},style:{flex:1,cursor:"text"},title:"Doble click para renombrar",children:e.name}),b.jsxs(En,{opened:D,onChange:se=>{W(se),se&&z(e.wip_limit)},position:"bottom",withArrow:!0,shadow:"md",children:[b.jsx(En.Target,{children:b.jsx(Ai,{label:re>0?`WIP ${n.length}/${re}${le?" (excedido)":""}`:"Click para limitar WIP",withArrow:!0,children:b.jsx(ti,{size:"xs",variant:le?"filled":"light",color:le?"red":re>0?"yellow":"gray",leftSection:le?b.jsx(aoe,{size:10}):null,style:{cursor:"pointer"},onClick:()=>W(se=>!se),children:re>0?`${n.length}/${re}`:n.length})})}),b.jsx(En.Dropdown,{p:"xs",children:b.jsxs(mt,{gap:"xs",children:[b.jsx(Qe,{size:"xs",c:"dimmed",children:"Maximo de tarjetas (0 = sin limite)"}),b.jsx(Ty,{size:"xs",value:V,onChange:z,min:0,max:999,autoFocus:!0,onKeyDown:se=>{se.key==="Enter"&&Ye(),se.key==="Escape"&&W(!1)}}),b.jsxs(hn,{justify:"flex-end",gap:4,children:[b.jsx(qt,{size:"xs",variant:"subtle",onClick:()=>W(!1),children:"Cancelar"}),b.jsx(qt,{size:"xs",onClick:Ye,children:"Guardar"})]})]})})]})]}),b.jsx(hn,{gap:2,wrap:"nowrap",children:U?b.jsxs(b.Fragment,{children:[b.jsx($t,{variant:"subtle",color:"green",size:"sm",onClick:we,"aria-label":"Save",children:b.jsx(MF,{size:14})}),b.jsx($t,{variant:"subtle",color:"gray",size:"sm",onClick:()=>{$(e.name),H(!1)},"aria-label":"Cancel",children:b.jsx(lh,{size:14})})]}):b.jsxs(b.Fragment,{children:[i&&b.jsx(Ai,{label:X?"Expandir":"Colapsar",withArrow:!0,children:b.jsx($t,{variant:"subtle",color:"gray",size:"sm",onClick:()=>ee(se=>!se),"aria-label":X?"Expandir columna":"Colapsar columna",children:X?b.jsx(RF,{size:14}):b.jsx(DF,{size:14})})}),e.is_done&&b.jsx(Ai,{label:"Columna Done",withArrow:!0,children:b.jsx(ti,{size:"xs",color:"green",variant:"filled",leftSection:b.jsx(Ih,{size:10}),children:"done"})}),b.jsxs(Gn,{position:"bottom-end",shadow:"md",withArrow:!0,children:[b.jsx(Gn.Target,{children:b.jsx($t,{variant:"subtle",color:"gray",size:"sm","aria-label":"Acciones columna",children:b.jsx(PF,{size:14})})}),b.jsxs(Gn.Dropdown,{children:[b.jsx(Gn.Label,{children:"Columna"}),b.jsx(Gn.Item,{leftSection:b.jsx(ase,{size:14}),onClick:()=>{$(e.name),H(!0)},children:"Renombrar"}),b.jsx(Gn.Item,{leftSection:b.jsx(Ih,{size:14}),color:e.is_done?"yellow":"green",onClick:()=>h(e.id,!e.is_done),children:e.is_done?"Quitar marca Done":"Marcar como Done"}),b.jsx(Gn.Item,{leftSection:b.jsx(We,{size:14}),onClick:()=>l(e.id,Ve?"board":"sidebar"),children:Ue}),b.jsx(Gn.Divider,{}),b.jsx(Gn.Item,{leftSection:b.jsx(Wf,{size:14}),color:"red",onClick:()=>f(e.id),children:"Borrar columna"})]})]})]})})]}),!(i&&X)&&b.jsxs(b.Fragment,{children:[b.jsx(Na,{style:{flex:1},type:"auto",children:b.jsx(_S,{items:Re,strategy:ZB,children:b.jsx(mt,{gap:"xs",pb:"xs",style:{minHeight:40},children:n.map(se=>b.jsx(lW,{card:se,now:t,onDelete:p,onEdit:d,onDuplicate:v,onChangeColor:y,onShowHistory:w,onToggleLock:k,onAssign:_,onSetDeadline:S,onSetRequester:C,requesterOptions:E,onOpenCustomColor:O,users:L,assignee:se.assignee_id?B.get(se.assignee_id):void 0,inDoneColumn:e.is_done,highlight:G===se.id,activeSticker:T,onAddSticker:M,onRemoveSticker:N,onMoveSticker:F,onCommitSticker:R},se.id))})})}),b.jsx(qt,{variant:"subtle",color:"gray",size:"xs",leftSection:b.jsx(Bh,{size:14}),onClick:()=>r(e.id),mt:"xs",fullWidth:!0,children:"Anadir tarjeta"})]}),!Ve&&b.jsx(ve,{onMouseDown:De,style:{position:"absolute",top:0,right:-3,width:6,height:"100%",cursor:"col-resize",zIndex:5},"aria-label":"Resize column"})]})}const w$=A.memo(DCe),RCe=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"]}]'),PCe=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?$0.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 ug(e,o,i,r,null)}function ug(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??++fW};return r==null&&yn.vnode!=null&&yn.vnode(a),a}function Po(){return{current:null}}function yc(e){return e.children}function eo(e,n){this.props=e,this.context=n}function bc(e,n){if(n==null)return e.__?bc(e.__,e.__.__k.indexOf(e)+1):null;for(var t;n0?ug(v.type,v.props,v.key,null,v.__v):v)!=null){if(v.__=t,v.__b=t.__b+1,(p=_[h])===null||p&&v.key==p.key&&v.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 f=t+l/4%t,c=Math.floor(l/4/t),h=e.getImageData(f,c,1,1).data;return!(a[l]!==h[0]||a[l+2]!==h[2]||e.measureText(r).width>=t)}})();var A$={latestVersion:WCe,noCountryFlags:GCe};const o6=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart"];let Pi=null;function KCe(e){Pi||(Pi=Qs.get("frequently")||{});const n=e.id||e;n&&(Pi[n]||(Pi[n]=0),Pi[n]+=1,Qs.set("last",n),Qs.set("frequently",Pi))}function XCe({maxFrequentRows:e,perLine:n}){if(!e)return[];Pi||(Pi=Qs.get("frequently"));let t=[];if(!Pi){Pi={};for(let a in o6.slice(0,n)){const o=o6[a];Pi[o]=n-a,t.push(o)}return t}const i=e*n,r=Qs.get("last");for(let a in Pi)t.push(a);if(t.sort((a,o)=>{const l=Pi[o],f=Pi[a];return l==f?a.localeCompare(o):l-f}),t.length>i){const a=t.slice(i);t=t.slice(0,i);for(let o of a)o!=r&&delete Pi[o];r&&t.indexOf(r)==-1&&(delete Pi[t[t.length-1]],t.splice(-1,1,r)),Qs.set("frequently",Pi)}return t}var xW={add:KCe,get:XCe,DEFAULTS:o6},SW={};SW=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 $o={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 Hi=null,Wn=null;const V3={};async function O$(e){if(V3[e])return V3[e];const t=await(await fetch(e)).json();return V3[e]=t,t}let W3=null,CW=null,AW=!1;function z0(e,{caller:n}={}){return W3||(W3=new Promise(t=>{CW=t})),e?ZCe(e):n&&!AW&&console.warn(`\`${n}\` requires data to be initialized first. Promise will be pending until \`init\` is called.`),W3}async function ZCe(e){AW=!0;let{emojiVersion:n,set:t,locale:i}=e;if(n||(n=$o.emojiVersion.value),t||(t=$o.set.value),i||(i=$o.locale.value),Wn)Wn.categories=Wn.categories.filter(f=>!f.name);else{Wn=(typeof e.data=="function"?await e.data():e.data)||await O$(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/sets/${n}/${t}.json`),Wn.emoticons={},Wn.natives={},Wn.categories.unshift({id:"frequent",emojis:[]});for(const f in Wn.aliases){const c=Wn.aliases[f],h=Wn.emojis[c];h&&(h.aliases||(h.aliases=[]),h.aliases.push(f))}Wn.originalCategories=Wn.categories}if(Hi=(typeof e.i18n=="function"?await e.i18n():e.i18n)||(i=="en"?uW(SW):await O$(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/i18n/${i}.json`)),e.custom)for(let f in e.custom){f=parseInt(f);const c=e.custom[f],h=e.custom[f-1];if(!(!c.emojis||!c.emojis.length)){c.id||(c.id=`custom_${f+1}`),c.name||(c.name=Hi.categories.custom),h&&!c.icon&&(c.target=h.target||h),Wn.categories.push(c);for(const d of c.emojis)Wn.emojis[d.id]=d}}e.categories&&(Wn.categories=Wn.originalCategories.filter(f=>e.categories.indexOf(f.id)!=-1).sort((f,c)=>{const h=e.categories.indexOf(f.id),d=e.categories.indexOf(c.id);return h-d}));let r=null,a=null;t=="native"&&(r=A$.latestVersion(),a=e.noCountryFlags||A$.noCountryFlags());let o=Wn.categories.length,l=!1;for(;o--;){const f=Wn.categories[o];if(f.id=="frequent"){let{maxFrequentRows:d,perLine:p}=e;d=d>=0?d:$o.maxFrequentRows.value,p||(p=$o.perLine.value),f.emojis=xW.get({maxFrequentRows:d,perLine:p})}if(!f.emojis||!f.emojis.length){Wn.categories.splice(o,1);continue}const{categoryIcons:c}=e;if(c){const d=c[f.id];d&&!f.icon&&(f.icon=d)}let h=f.emojis.length;for(;h--;){const d=f.emojis[h],p=d.id?d:Wn.emojis[d],v=()=>{f.emojis.splice(h,1)};if(!p||e.exceptEmojis&&e.exceptEmojis.includes(p.id)){v();continue}if(r&&p.version>r){v();continue}if(a&&f.id=="flags"&&!t9e.includes(p.id)){v();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)Wn.emoticons[w]||(Wn.emoticons[w]=p.id);let y=0;for(const w of p.skins){if(!w)continue;y++;const{native:k}=w;k&&(Wn.natives[k]=p.id,p.search+=`,${k}`);const _=y==1?"":`:skin-tone-${y}:`;w.shortcodes=`:${p.id}:${_}`}}}}l&&Bf.reset(),CW()}function OW(e,n,t){e||(e={});const i={};for(let r in n)i[r]=EW(r,e,n,t);return i}function EW(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 QCe=/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/;let s6=null;function JCe(e){return e.id?e:Wn.emojis[e]||Wn.emojis[Wn.aliases[e]]||Wn.emojis[Wn.natives[e]]}function e9e(){s6=null}async function n9e(e,{maxResults:n,caller:t}={}){if(!e||!e.trim().length)return null;n||(n=90),await z0(null,{caller:t||"SearchIndex.search"});const i=e.toLowerCase().replace(/(\w)-/,"$1 ").split(/[\s|,]+/).filter((l,f,c)=>l.trim()&&c.indexOf(l)==f);if(!i.length)return;let r=s6||(s6=Object.values(Wn.emojis)),a,o;for(const l of i){if(!r.length)break;a=[],o={};for(const f of r){if(!f.search)continue;const c=f.search.indexOf(`,${l}`);c!=-1&&(a.push(f),o[f.id]||(o[f.id]=0),o[f.id]+=f.id==l?0:c+1)}r=a}return a.length<2||(a.sort((l,f)=>{const c=o[l.id],h=o[f.id];return c==h?l.id.localeCompare(f.id):c-h}),a.length>n&&(a=a.slice(0,n))),a}var Bf={search:n9e,get:JCe,reset:e9e,SHORTCODES_REGEX:QCe};const t9e=["checkered_flag","crossed_flags","pirate_flag","rainbow-flag","transgender_flag","triangular_flag_on_post","waving_black_flag","waving_white_flag"];function i9e(e,n){return Array.isArray(e)&&Array.isArray(n)&&e.length===n.length&&e.every((t,i)=>t==n[i])}async function r9e(e=1){for(let n in[...Array(e).keys()])await new Promise(requestAnimationFrame)}function a9e(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 o9e={activity:{outline:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:$e("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:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:$e("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:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:$e("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:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:$e("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:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:$e("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:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:$e("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:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:$e("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:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[$e("path",{d:"M13 4h-2l-.001 7H9v2h2v2h2v-2h4v-2h-4z"}),$e("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:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:$e("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:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[$e("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"}),$e("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:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:$e("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:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[$e("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"}),$e("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:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:$e("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:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[$e("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"}),$e("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:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:$e("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:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[$e("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"}),$e("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:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:$e("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:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:$e("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:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:$e("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"})})}},s9e={loupe:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:$e("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:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:$e("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 L1={categories:o9e,search:s9e};function l6(e){let{id:n,skin:t,emoji:i}=e;if(e.shortcodes){const l=e.shortcodes.match(Bf.SHORTCODES_REGEX);l&&(n=l[1],l[2]&&(t=l[2]))}if(i||(i=Bf.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 $e("span",{class:"emoji-mart-emoji","data-emoji-set":e.set,children:a?$e("img",{style:{maxWidth:e.size||"1em",maxHeight:e.size||"1em",display:"inline-block"},alt:r.native||r.shortcodes,src:a}):e.set=="native"?$e("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}):$e("span",{style:{display:"block",width:e.size,height:e.size,backgroundImage:`url(${o})`,backgroundSize:`${100*Wn.sheet.cols}% ${100*Wn.sheet.rows}%`,backgroundPosition:`${100/(Wn.sheet.cols-1)*r.x}% ${100/(Wn.sheet.rows-1)*r.y}%`}})})}const l9e=typeof window<"u"&&window.HTMLElement?window.HTMLElement:Object;class TW extends l9e{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=EW(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 u9e extends TW{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 jW={fallback:"",id:"",native:"",shortcodes:"",size:{value:"",transform:e=>/\D/.test(e)?e:`${e}px`},set:$o.set,skin:$o.skin};class MW extends TW{async connectedCallback(){const n=OW(this.props,jW,this);n.element=this,n.ref=t=>{this.component=t},await z0(),!this.disconnected&&kW($e(l6,{...n}),this)}constructor(n){super(n)}}ea(MW,"Props",jW);typeof customElements<"u"&&!customElements.get("em-emoji")&&customElements.define("em-emoji",MW);var E$,u6=[],T$=yn.__b,j$=yn.__r,M$=yn.diffed,D$=yn.__c,R$=yn.unmount;function f9e(){var e;for(u6.sort(function(n,t){return n.__v.__b-t.__v.__b});e=u6.pop();)if(e.__P)try{e.__H.__h.forEach(fg),e.__H.__h.forEach(f6),e.__H.__h=[]}catch(n){e.__H.__h=[],yn.__e(n,e.__v)}}yn.__b=function(e){T$&&T$(e)},yn.__r=function(e){j$&&j$(e);var n=e.__c.__H;n&&(n.__h.forEach(fg),n.__h.forEach(f6),n.__h=[])},yn.diffed=function(e){M$&&M$(e);var n=e.__c;n&&n.__H&&n.__H.__h.length&&(u6.push(n)!==1&&E$===yn.requestAnimationFrame||((E$=yn.requestAnimationFrame)||function(t){var i,r=function(){clearTimeout(a),P$&&cancelAnimationFrame(i),setTimeout(t)},a=setTimeout(r,100);P$&&(i=requestAnimationFrame(r))})(f9e))},yn.__c=function(e,n){n.some(function(t){try{t.__h.forEach(fg),t.__h=t.__h.filter(function(i){return!i.__||f6(i)})}catch(i){n.some(function(r){r.__h&&(r.__h=[])}),n=[],yn.__e(i,t.__v)}}),D$&&D$(e,n)},yn.unmount=function(e){R$&&R$(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.forEach(function(i){try{fg(i)}catch(r){n=r}}),n&&yn.__e(n,t.__v))};var P$=typeof requestAnimationFrame=="function";function fg(e){var n=e.__c;typeof n=="function"&&(e.__c=void 0,n())}function f6(e){e.__c=e.__()}function c9e(e,n){for(var t in n)e[t]=n[t];return e}function N$(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 I1(e){this.props=e}(I1.prototype=new eo).isPureReactComponent=!0,I1.prototype.shouldComponentUpdate=function(e,n){return N$(this.props,e)||N$(this.state,n)};var $$=yn.__b;yn.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),$$&&$$(e)};var d9e=yn.__e;yn.__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)}d9e(e,n,t)};var z$=yn.unmount;function G3(){this.__u=0,this.t=null,this.__b=null}function DW(e){var n=e.__.__c;return n&&n.__e&&n.__e(e)}function Yv(){this.u=null,this.o=null}yn.unmount=function(e){var n=e.__c;n&&n.__R&&n.__R(),n&&e.__h===!0&&(e.type=null),z$&&z$(e)},(G3.prototype=new eo).__c=function(e,n){var t=n.__c,i=this;i.t==null&&(i.t=[]),i.t.push(t);var r=DW(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 c=i.state.__e;i.__v.__k[0]=(function d(p,v,y){return p&&(p.__v=null,p.__k=p.__k&&p.__k.map(function(w){return d(w,v,y)}),p.__c&&p.__c.__P===v&&(p.__e&&y.insertBefore(p.__e,p.__d),p.__c.__e=!0,p.__c.__P=y)),p})(c,c.__c.__P,c.__c.__O)}var h;for(i.setState({__e:i.__b=null});h=i.t.pop();)h.forceUpdate()}},f=n.__h===!0;i.__u++||f||i.setState({__e:i.__b=i.__v.__k[0]}),e.then(o,o)},G3.prototype.componentWillUnmount=function(){this.t=[]},G3.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,f){return o&&(o.__c&&o.__c.__H&&(o.__c.__H.__.forEach(function(c){typeof c.__c=="function"&&c.__c()}),o.__c.__H=null),(o=c9e({},o)).__c!=null&&(o.__c.__P===f&&(o.__c.__P=l),o.__c=null),o.__k=o.__k&&o.__k.map(function(c){return a(c,l,f)})),o})(this.__b,t,i.__O=i.__P)}this.__b=null}var r=n.__e&&a6(yc,null,e.fallback);return r&&(r.__h=null),[a6(yc,null,n.__e?null:e.children),r]};var L$=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||Hi.categories[t.id],a=!this.props.unfocused&&t.id==this.state.categoryId;return a&&(n=i),$e("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)})}),$e("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=Wn.categories.filter(n=>!n.target),this.state={categoryId:this.categories[0].id}}}class _9e extends I1{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 Kv={rowsPerRender:10};class x9e extends eo{getInitialState(n=this.props){return{skin:Qs.get("skin")||n.skin,theme:this.initTheme(n.theme)}}componentWillMount(){this.dir=Hi.rtl?"rtl":"ltr",this.refs={menu:Po(),navigation:Po(),scroll:Po(),search:Po(),searchInput:Po(),skinToneButton:Po(),skinToneRadio:Po()},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 z0(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}=Wn;this.refs.categories=new Map;const t=Wn.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,f=l%Kv.rowsPerRender?{}:Po();return f.index=l,f.posinset=this.grid.setsize+1,r.push(f),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:Po(),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 Bf.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 f of o){const c=f.target.dataset.id;t.set(c,f.intersectionRatio)}const l=[...t];for(const[f,c]of l)if(c){i(f);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*(Kv.rowsPerRender+5)}px 0px ${this.props.emojiButtonSize*Kv.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[f,c]=this.state.pos;const h=(()=>{if(f==0&&c==0&&!n.repeat&&(i||a))return null;if(f==-1)return!n.repeat&&(r||o)&&t.selectionStart==t.value.length?[0,0]:null;if(i||r){let d=l[f];const p=i?-1:1;if(c+=p,!d[c]){if(f+=p,d=l[f],!d)return f=i?0:l.length-1,c=i?0:l[f].length-1,[f,c];c=i?d.length-1:0}return[f,c]}if(a||o){f+=a?-1:1;const d=l[f];return d?(d[c]||(c=d.length-1),[f,c]):(f=a?0:l.length-1,c=a?0:l[f].length-1,[f,c])}})();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,f=o+l*this.props.emojiButtonSize,c=f+this.props.emojiButtonSize+this.props.emojiButtonSize*.88;if(fr.scrollTop+a.height)o=c-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=a9e(t,{skinIndex:this.state.skin-1});this.props.maxFrequentRows&&xW.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}),Qs.set("skin",n)}renderNav(){return $e(k9e,{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 $e("div",{id:"preview",class:"flex flex-middle",dir:this.dir,"data-position":this.props.previewPosition,children:[$e("div",{class:"flex flex-middle flex-grow",children:[$e("div",{class:"flex flex-auto flex-middle flex-center",style:{height:this.props.emojiButtonSize,fontSize:this.props.emojiButtonSize},children:$e(l6,{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})}),$e("div",{class:`margin-${this.dir[0]}`,children:n||t?$e("div",{class:`padding-${this.dir[2]} align-${this.dir[0]}`,children:[$e("div",{class:"preview-title ellipsis",children:n?n.name:Hi.search_no_results_1}),$e("div",{class:"preview-subtitle ellipsis color-c",children:n?n.skins[0].shortcodes:Hi.search_no_results_2})]}):$e("div",{class:"preview-placeholder color-c",children:Hi.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,f=(n.skins[o-1]||n.skins[0]).native,c=i9e(this.state.pos,t),h=t.concat(n.id).join("");return $e(_9e,{selected:c,skin:o,size:a,children:$e("button",{"aria-label":f,"aria-selected":c||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:[$e("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}}),$e(l6,{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 $e("div",{children:[$e("div",{class:"spacer"}),$e("div",{class:"flex flex-middle",children:[$e("div",{class:"search relative flex-grow",children:[$e("input",{type:"search",ref:this.refs.searchInput,placeholder:Hi.search,onClick:this.handleSearchClick,onInput:this.handleSearchInput,onKeyDown:this.handleSearchKeyDown,autoComplete:"off"}),$e("span",{class:"icon loupe flex",children:L1.search.loupe}),this.state.searchResults&&$e("button",{title:"Clear","aria-label":"Clear",type:"button",class:"icon delete flex",onClick:this.clearSearch,onMouseDown:this.preventDefault,children:L1.search.delete})]}),n&&this.renderSkinToneButton()]})]})}renderSearchResults(){const{searchResults:n}=this.state;return n?$e("div",{class:"category",ref:this.refs.search,children:[$e("div",{class:`sticky padding-small align-${this.dir[0]}`,children:Hi.categories.search}),$e("div",{children:n.length?n.map((t,i)=>$e("div",{class:"flex",children:t.map((r,a)=>this.renderEmojiButton(r,{pos:[i,a],posinset:i*this.props.perLine+a+1,grid:n}))})):$e("div",{class:`padding-small align-${this.dir[0]}`,children:this.props.onAddCustomEmoji&&$e("a",{onClick:this.props.onAddCustomEmoji,children:Hi.add_custom})})})]}):null}renderCategories(){const{categories:n}=Wn,t=!!this.state.searchResults,i=this.getPerLine();return $e("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 $e("div",{"data-id":r.target?r.target.id:r.id,class:"category",ref:a,children:[$e("div",{class:`sticky padding-small align-${this.dir[0]}`,children:r.name||Hi.categories[r.id]}),$e("div",{class:"relative",style:{height:o.length*this.props.emojiButtonSize},children:o.map((l,f)=>{const c=l.index-l.index%Kv.rowsPerRender,h=this.state.visibleRows[c],d="current"in l?l:void 0;if(!h&&!d)return null;const p=f*i,v=p+i,y=r.emojis.slice(p,v);return y.length{if(!w)return $e("div",{style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize}});const _=Bf.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:$e("div",{class:"flex flex-auto flex-center flex-middle",style:{position:"relative",width:this.props.emojiButtonSize,height:this.props.emojiButtonSize},children:$e("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":Hi.skins.choose,title:Hi.skins.choose,onClick:this.openSkins,style:{width:this.props.emojiSize,height:this.props.emojiSize},children:$e("span",{class:`skin-tone skin-tone-${this.state.skin}`})})})}renderLiveRegion(){const n=this.getEmojiByPos(this.state.pos),t=n?n.name:"";return $e("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"),$e("div",{ref:this.refs.menu,role:"radiogroup",dir:this.dir,"aria-label":Hi.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 $e("div",{children:[$e("input",{type:"radio",name:"skin-tone",value:o,"aria-label":Hi.skins[o],ref:l?this.refs.skinToneRadio:null,defaultChecked:l,onChange:()=>this.handleSkinMouseOver(o),onKeyDown:f=>{(f.code=="Enter"||f.code=="Space"||f.code=="Tab")&&(f.preventDefault(),this.handleSkinClick(o))}}),$e("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:[$e("span",{class:`skin-tone skin-tone-${o}`}),$e("span",{class:"margin-small-lr",children:Hi.skins[o]})]})]})})})}render(){const n=this.props.perLine*this.props.emojiButtonSize;return $e("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"&&$e("div",{class:"padding-lr",children:this.renderSearch()}),$e("div",{ref:this.refs.scroll,class:"scroll flex-grow padding-lr",children:$e("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(),ea(this,"darkMediaCallback",()=>{this.props.theme=="auto"&&this.setState({theme:this.darkMedia.matches?"dark":"light"})}),ea(this,"handleClickOutside",t=>{const{element:i}=this.props;t.target!=i&&(this.state.showSkins&&this.closeSkins(),this.props.onClickOutside&&this.props.onClickOutside(t))}),ea(this,"handleBaseClick",t=>{this.state.showSkins&&(t.target.closest(".menu")||(t.preventDefault(),t.stopImmediatePropagation(),this.closeSkins()))}),ea(this,"handleBaseKeydown",t=>{this.state.showSkins&&t.key=="Escape"&&(t.preventDefault(),t.stopImmediatePropagation(),this.closeSkins())}),ea(this,"handleSearchClick",()=>{this.getEmojiByPos(this.state.pos)&&this.setState({pos:[-1,-1]})}),ea(this,"handleSearchInput",async()=>{const t=this.refs.searchInput.current;if(!t)return;const{value:i}=t,r=await Bf.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 f=null;for(let c of r)(!l.length||f.length==this.getPerLine())&&(f=[],f.__categoryId="search",f.__index=l.length,l.push(f)),f.push(c);this.ignoreMouse(),this.setState({searchResults:l,pos:o},a)}),ea(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}}),ea(this,"clearSearch",()=>{const t=this.refs.searchInput.current;t&&(t.value="",t.focus(),this.handleSearchInput())}),ea(this,"handleCategoryClick",({category:t,i})=>{this.scrollTo(i==0?{row:-1}:{categoryId:t.id})}),ea(this,"openSkins",t=>{const{currentTarget:i}=t,r=i.getBoundingClientRect();this.setState({showSkins:r},async()=>{await r9e(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 gA extends u9e{async connectedCallback(){const n=OW(this.props,$o,this);n.element=this,n.ref=t=>{this.component=t},await z0(n),!this.disconnected&&kW($e(x9e,{...n}),this.shadowRoot)}constructor(n){super(n,{styles:uW(RW)})}}ea(gA,"Props",$o);typeof customElements<"u"&&!customElements.get("em-emoji-picker")&&customElements.define("em-emoji-picker",gA);var RW={};RW=`:host { + width: min-content; + height: 435px; + min-height: 230px; + border-radius: var(--border-radius); + box-shadow: var(--shadow); + --border-radius: 10px; + --category-icon-size: 18px; + --font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; + --font-size: 15px; + --preview-placeholder-size: 21px; + --preview-title-size: 1.1em; + --preview-subtitle-size: .9em; + --shadow-color: 0deg 0% 0%; + --shadow: .3px .5px 2.7px hsl(var(--shadow-color) / .14), .4px .8px 1px -3.2px hsl(var(--shadow-color) / .14), 1px 2px 2.5px -4.5px hsl(var(--shadow-color) / .14); + display: flex; +} + +[data-theme="light"] { + --em-rgb-color: var(--rgb-color, 34, 36, 39); + --em-rgb-accent: var(--rgb-accent, 34, 102, 237); + --em-rgb-background: var(--rgb-background, 255, 255, 255); + --em-rgb-input: var(--rgb-input, 255, 255, 255); + --em-color-border: var(--color-border, rgba(0, 0, 0, .05)); + --em-color-border-over: var(--color-border-over, rgba(0, 0, 0, .1)); +} + +[data-theme="dark"] { + --em-rgb-color: var(--rgb-color, 222, 222, 221); + --em-rgb-accent: var(--rgb-accent, 58, 130, 247); + --em-rgb-background: var(--rgb-background, 21, 22, 23); + --em-rgb-input: var(--rgb-input, 0, 0, 0); + --em-color-border: var(--color-border, rgba(255, 255, 255, .1)); + --em-color-border-over: var(--color-border-over, rgba(255, 255, 255, .2)); +} + +#root { + --color-a: rgb(var(--em-rgb-color)); + --color-b: rgba(var(--em-rgb-color), .65); + --color-c: rgba(var(--em-rgb-color), .45); + --padding: 12px; + --padding-small: calc(var(--padding) / 2); + --sidebar-width: 16px; + --duration: 225ms; + --duration-fast: 125ms; + --duration-instant: 50ms; + --easing: cubic-bezier(.4, 0, .2, 1); + width: 100%; + text-align: left; + border-radius: var(--border-radius); + background-color: rgb(var(--em-rgb-background)); + position: relative; +} + +@media (prefers-reduced-motion) { + #root { + --duration: 0; + --duration-fast: 0; + --duration-instant: 0; + } +} + +#root[data-menu] button { + cursor: auto; +} + +#root[data-menu] .menu button { + cursor: pointer; +} + +:host, #root, input, button { + color: rgb(var(--em-rgb-color)); + font-family: var(--font-family); + font-size: var(--font-size); + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + line-height: normal; +} + +*, :before, :after { + box-sizing: border-box; + min-width: 0; + margin: 0; + padding: 0; +} + +.relative { + position: relative; +} + +.flex { + display: flex; +} + +.flex-auto { + flex: none; +} + +.flex-center { + justify-content: center; +} + +.flex-column { + flex-direction: column; +} + +.flex-grow { + flex: auto; +} + +.flex-middle { + align-items: center; +} + +.flex-wrap { + flex-wrap: wrap; +} + +.padding { + padding: var(--padding); +} + +.padding-t { + padding-top: var(--padding); +} + +.padding-lr { + padding-left: var(--padding); + padding-right: var(--padding); +} + +.padding-r { + padding-right: var(--padding); +} + +.padding-small { + padding: var(--padding-small); +} + +.padding-small-b { + padding-bottom: var(--padding-small); +} + +.padding-small-lr { + padding-left: var(--padding-small); + padding-right: var(--padding-small); +} + +.margin { + margin: var(--padding); +} + +.margin-r { + margin-right: var(--padding); +} + +.margin-l { + margin-left: var(--padding); +} + +.margin-small-l { + margin-left: var(--padding-small); +} + +.margin-small-lr { + margin-left: var(--padding-small); + margin-right: var(--padding-small); +} + +.align-l { + text-align: left; +} + +.align-r { + text-align: right; +} + +.color-a { + color: var(--color-a); +} + +.color-b { + color: var(--color-b); +} + +.color-c { + color: var(--color-c); +} + +.ellipsis { + white-space: nowrap; + max-width: 100%; + width: auto; + text-overflow: ellipsis; + overflow: hidden; +} + +.sr-only { + width: 1px; + height: 1px; + position: absolute; + top: auto; + left: -10000px; + overflow: hidden; +} + +a { + cursor: pointer; + color: rgb(var(--em-rgb-accent)); +} + +a:hover { + text-decoration: underline; +} + +.spacer { + height: 10px; +} + +[dir="rtl"] .scroll { + padding-left: 0; + padding-right: var(--padding); +} + +.scroll { + padding-right: 0; + overflow-x: hidden; + overflow-y: auto; +} + +.scroll::-webkit-scrollbar { + width: var(--sidebar-width); + height: var(--sidebar-width); +} + +.scroll::-webkit-scrollbar-track { + border: 0; +} + +.scroll::-webkit-scrollbar-button { + width: 0; + height: 0; + display: none; +} + +.scroll::-webkit-scrollbar-corner { + background-color: rgba(0, 0, 0, 0); +} + +.scroll::-webkit-scrollbar-thumb { + min-height: 20%; + min-height: 65px; + border: 4px solid rgb(var(--em-rgb-background)); + border-radius: 8px; +} + +.scroll::-webkit-scrollbar-thumb:hover { + background-color: var(--em-color-border-over) !important; +} + +.scroll:hover::-webkit-scrollbar-thumb { + background-color: var(--em-color-border); +} + +.sticky { + z-index: 1; + background-color: rgba(var(--em-rgb-background), .9); + -webkit-backdrop-filter: blur(4px); + backdrop-filter: blur(4px); + font-weight: 500; + position: sticky; + top: -1px; +} + +[dir="rtl"] .search input[type="search"] { + padding: 10px 2.2em 10px 2em; +} + +[dir="rtl"] .search .loupe { + left: auto; + right: .7em; +} + +[dir="rtl"] .search .delete { + left: .7em; + right: auto; +} + +.search { + z-index: 2; + position: relative; +} + +.search input, .search button { + font-size: calc(var(--font-size) - 1px); +} + +.search input[type="search"] { + width: 100%; + background-color: var(--em-color-border); + transition-duration: var(--duration); + transition-property: background-color, box-shadow; + transition-timing-function: var(--easing); + border: 0; + border-radius: 10px; + outline: 0; + padding: 10px 2em 10px 2.2em; + display: block; +} + +.search input[type="search"]::-ms-input-placeholder { + color: inherit; + opacity: .6; +} + +.search input[type="search"]::placeholder { + color: inherit; + opacity: .6; +} + +.search input[type="search"], .search input[type="search"]::-webkit-search-decoration, .search input[type="search"]::-webkit-search-cancel-button, .search input[type="search"]::-webkit-search-results-button, .search input[type="search"]::-webkit-search-results-decoration { + -webkit-appearance: none; + -ms-appearance: none; + appearance: none; +} + +.search input[type="search"]:focus { + background-color: rgb(var(--em-rgb-input)); + box-shadow: inset 0 0 0 1px rgb(var(--em-rgb-accent)), 0 1px 3px rgba(65, 69, 73, .2); +} + +.search .icon { + z-index: 1; + color: rgba(var(--em-rgb-color), .7); + position: absolute; + top: 50%; + transform: translateY(-50%); +} + +.search .loupe { + pointer-events: none; + left: .7em; +} + +.search .delete { + right: .7em; +} + +svg { + fill: currentColor; + width: 1em; + height: 1em; +} + +button { + -webkit-appearance: none; + -ms-appearance: none; + appearance: none; + cursor: pointer; + color: currentColor; + background-color: rgba(0, 0, 0, 0); + border: 0; +} + +#nav { + z-index: 2; + padding-top: 12px; + padding-bottom: 12px; + padding-right: var(--sidebar-width); + position: relative; +} + +#nav button { + color: var(--color-b); + transition: color var(--duration) var(--easing); +} + +#nav button:hover { + color: var(--color-a); +} + +#nav svg, #nav img { + width: var(--category-icon-size); + height: var(--category-icon-size); +} + +#nav[dir="rtl"] .bar { + left: auto; + right: 0; +} + +#nav .bar { + width: 100%; + height: 3px; + background-color: rgb(var(--em-rgb-accent)); + transition: transform var(--duration) var(--easing); + border-radius: 3px 3px 0 0; + position: absolute; + bottom: -12px; + left: 0; +} + +#nav button[aria-selected] { + color: rgb(var(--em-rgb-accent)); +} + +#preview { + z-index: 2; + padding: calc(var(--padding) + 4px) var(--padding); + padding-right: var(--sidebar-width); + position: relative; +} + +#preview .preview-placeholder { + font-size: var(--preview-placeholder-size); +} + +#preview .preview-title { + font-size: var(--preview-title-size); +} + +#preview .preview-subtitle { + font-size: var(--preview-subtitle-size); +} + +#nav:before, #preview:before { + content: ""; + height: 2px; + position: absolute; + left: 0; + right: 0; +} + +#nav[data-position="top"]:before, #preview[data-position="top"]:before { + background: linear-gradient(to bottom, var(--em-color-border), transparent); + top: 100%; +} + +#nav[data-position="bottom"]:before, #preview[data-position="bottom"]:before { + background: linear-gradient(to top, var(--em-color-border), transparent); + bottom: 100%; +} + +.category:last-child { + min-height: calc(100% + 1px); +} + +.category button { + font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, sans-serif; + position: relative; +} + +.category button > * { + position: relative; +} + +.category button .background { + opacity: 0; + background-color: var(--em-color-border); + transition: opacity var(--duration-fast) var(--easing) var(--duration-instant); + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; +} + +.category button:hover .background { + transition-duration: var(--duration-instant); + transition-delay: 0s; +} + +.category button[aria-selected] .background { + opacity: 1; +} + +.category button[data-keyboard] .background { + transition: none; +} + +.row { + width: 100%; + position: absolute; + top: 0; + left: 0; +} + +.skin-tone-button { + border: 1px solid rgba(0, 0, 0, 0); + border-radius: 100%; +} + +.skin-tone-button:hover { + border-color: var(--em-color-border); +} + +.skin-tone-button:active .skin-tone { + transform: scale(.85) !important; +} + +.skin-tone-button .skin-tone { + transition: transform var(--duration) var(--easing); +} + +.skin-tone-button[aria-selected] { + background-color: var(--em-color-border); + border-top-color: rgba(0, 0, 0, .05); + border-bottom-color: rgba(0, 0, 0, 0); + border-left-width: 0; + border-right-width: 0; +} + +.skin-tone-button[aria-selected] .skin-tone { + transform: scale(.9); +} + +.menu { + z-index: 2; + white-space: nowrap; + border: 1px solid var(--em-color-border); + background-color: rgba(var(--em-rgb-background), .9); + -webkit-backdrop-filter: blur(4px); + backdrop-filter: blur(4px); + transition-property: opacity, transform; + transition-duration: var(--duration); + transition-timing-function: var(--easing); + border-radius: 10px; + padding: 4px; + position: absolute; + box-shadow: 1px 1px 5px rgba(0, 0, 0, .05); +} + +.menu.hidden { + opacity: 0; +} + +.menu[data-position="bottom"] { + transform-origin: 100% 100%; +} + +.menu[data-position="bottom"].hidden { + transform: scale(.9)rotate(-3deg)translateY(5%); +} + +.menu[data-position="top"] { + transform-origin: 100% 0; +} + +.menu[data-position="top"].hidden { + transform: scale(.9)rotate(3deg)translateY(-5%); +} + +.menu input[type="radio"] { + clip: rect(0 0 0 0); + width: 1px; + height: 1px; + border: 0; + margin: 0; + padding: 0; + position: absolute; + overflow: hidden; +} + +.menu input[type="radio"]:checked + .option { + box-shadow: 0 0 0 2px rgb(var(--em-rgb-accent)); +} + +.option { + width: 100%; + border-radius: 6px; + padding: 4px 6px; +} + +.option:hover { + color: #fff; + background-color: rgb(var(--em-rgb-accent)); +} + +.skin-tone { + width: 16px; + height: 16px; + border-radius: 100%; + display: inline-block; + position: relative; + overflow: hidden; +} + +.skin-tone:after { + content: ""; + mix-blend-mode: overlay; + background: linear-gradient(rgba(255, 255, 255, .2), rgba(0, 0, 0, 0)); + border: 1px solid rgba(0, 0, 0, .8); + border-radius: 100%; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + box-shadow: inset 0 -2px 3px #000, inset 0 1px 2px #fff; +} + +.skin-tone-1 { + background-color: #ffc93a; +} + +.skin-tone-2 { + background-color: #ffdab7; +} + +.skin-tone-3 { + background-color: #e7b98f; +} + +.skin-tone-4 { + background-color: #c88c61; +} + +.skin-tone-5 { + background-color: #a46134; +} + +.skin-tone-6 { + background-color: #5d4437; +} + +[data-index] { + justify-content: space-between; +} + +[data-emoji-set="twitter"] .skin-tone:after { + box-shadow: none; + border-color: rgba(0, 0, 0, .5); +} + +[data-emoji-set="twitter"] .skin-tone-1 { + background-color: #fade72; +} + +[data-emoji-set="twitter"] .skin-tone-2 { + background-color: #f3dfd0; +} + +[data-emoji-set="twitter"] .skin-tone-3 { + background-color: #eed3a8; +} + +[data-emoji-set="twitter"] .skin-tone-4 { + background-color: #cfad8d; +} + +[data-emoji-set="twitter"] .skin-tone-5 { + background-color: #a8805d; +} + +[data-emoji-set="twitter"] .skin-tone-6 { + background-color: #765542; +} + +[data-emoji-set="google"] .skin-tone:after { + box-shadow: inset 0 0 2px 2px rgba(0, 0, 0, .4); +} + +[data-emoji-set="google"] .skin-tone-1 { + background-color: #f5c748; +} + +[data-emoji-set="google"] .skin-tone-2 { + background-color: #f1d5aa; +} + +[data-emoji-set="google"] .skin-tone-3 { + background-color: #d4b48d; +} + +[data-emoji-set="google"] .skin-tone-4 { + background-color: #aa876b; +} + +[data-emoji-set="google"] .skin-tone-5 { + background-color: #916544; +} + +[data-emoji-set="google"] .skin-tone-6 { + background-color: #61493f; +} + +[data-emoji-set="facebook"] .skin-tone:after { + border-color: rgba(0, 0, 0, .4); + box-shadow: inset 0 -2px 3px #000, inset 0 1px 4px #fff; +} + +[data-emoji-set="facebook"] .skin-tone-1 { + background-color: #f5c748; +} + +[data-emoji-set="facebook"] .skin-tone-2 { + background-color: #f1d5aa; +} + +[data-emoji-set="facebook"] .skin-tone-3 { + background-color: #d4b48d; +} + +[data-emoji-set="facebook"] .skin-tone-4 { + background-color: #aa876b; +} + +[data-emoji-set="facebook"] .skin-tone-5 { + background-color: #916544; +} + +[data-emoji-set="facebook"] .skin-tone-6 { + background-color: #61493f; +} + +`;function S9e({opened:e,onClose:n,onSelect:t,target:i}){return b.jsxs(En,{opened:e,onChange:r=>{r||n()},onDismiss:n,position:"bottom-start",withArrow:!0,shadow:"md",withinPortal:!0,closeOnClickOutside:!0,closeOnEscape:!0,trapFocus:!1,children:[b.jsx(En.Target,{children:i}),b.jsx(En.Dropdown,{p:0,style:{background:"transparent",border:"none"},children:b.jsx(C9e,{onSelect:r=>{t(r),n()}})})]})}function C9e({onSelect:e}){const n=A.useRef(null),t=A.useRef(null),i=A.useRef(e);return i.current=e,A.useEffect(()=>{if(n.current)return t.current=new gA({data:zCe,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}},[]),b.jsx("div",{ref:n})}const hh="column-";function A9e(e){return e==="column"?n=>{const t=n.droppableContainers.filter(r=>String(r.id).startsWith(hh)),i=RB({...n,droppableContainers:t});return i.length>0?i:Lie({...n,droppableContainers:t})}:n=>{const t=Fie(n);return t.length>0?t:DB(n)}}function O9e(){const e=TC(),[n,t]=A.useState(null),[i,r]=A.useState([]),[a,o]=A.useState(null),[l,f]=A.useState(null),[c,h]=A.useState(void 0),[d,p]=A.useState(!1),[v,y]=A.useState(""),[w,k]=A.useState(Date.now()),[_,S]=A.useState(!1),[C,E]=A.useState("board"),[O,T]=A.useState([]),[M,N]=A.useState(!1),[F,R]=A.useState([]),[L,B]=A.useState([]),[G,U]=A.useState(""),[H,P]=A.useState(null),[$,q]=A.useState(null),[Y,D]=A.useState([]),[W,V]=A.useState(!1),[z,X]=A.useState(null),[ee,re]=A.useState(null),[le,be]=A.useState(!1),[ae,ue]=A.useState(null),[Ce,ne]=A.useState(!1),[Ne,pe]=A.useState(null),[Ee,Re]=A.useState(!1),[we,Se]=A.useState("#888888"),[De,qe]=A.useState(null),[Ve,Ue]=A.useState(!1),[We,Ye]=A.useState(()=>{const J=localStorage.getItem("kanban_nav_width"),xe=J?parseInt(J,10):NaN;return Number.isFinite(xe)&&xe>=180&&xe<=600?xe:240}),sn=A.useRef(We);A.useEffect(()=>{sn.current=We,localStorage.setItem("kanban_nav_width",String(We))},[We]);const ie=J=>{J.preventDefault();const xe=J.clientX,Te=sn.current;document.body.style.cursor="col-resize",document.body.style.userSelect="none";const Ge=_t=>{const Tt=_t.clientX-xe,Bt=Math.min(600,Math.max(180,Te+Tt));Ye(Bt)},Bn=()=>{document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("mousemove",Ge),window.removeEventListener("mouseup",Bn)};window.addEventListener("mousemove",Ge),window.addEventListener("mouseup",Bn)},se=Nie(Cj(zC,{activationConstraint:{distance:5}}),Cj(NC,{coordinateGetter:hae})),ke=A.useCallback(async()=>{try{const J=await Qte();t(J)}catch(J){qn.show({color:"red",message:J.message})}},[]);A.useEffect(()=>{ke()},[ke]);const Ze=A.useCallback(async()=>{try{const J=await SB();r(J)}catch(J){console.warn("listUsers failed",J)}},[]),_e=A.useCallback(async()=>{try{const J=await aie();T(J)}catch(J){console.warn("listTrash failed",J)}},[]),fe=A.useCallback(async()=>{try{const J=await CB();R(J)}catch(J){console.warn("listTags failed",J)}},[]),Be=A.useCallback(async()=>{try{const J=await bie();B(J)}catch(J){console.warn("listRequesters failed",J)}},[]);A.useEffect(()=>{Ze()},[Ze]),A.useEffect(()=>{_e()},[_e]),A.useEffect(()=>{fe(),Be()},[fe,Be]),A.useEffect(()=>{const J=setInterval(()=>k(Date.now()),1e3);return()=>clearInterval(J)},[]),A.useEffect(()=>{const J=setInterval(()=>{ke()},3e4);return()=>clearInterval(J)},[ke]),A.useEffect(()=>{if(!Ne)return;const J=xe=>{xe.key==="Escape"&&pe(null)};return window.addEventListener("keydown",J),()=>window.removeEventListener("keydown",J)},[Ne]);const pn=A.useMemo(()=>{const J=new Map;for(const xe of i)J.set(xe.id,xe);return J},[i]),Je=A.useMemo(()=>n?[...n.columns].sort((J,xe)=>J.position-xe.position):[],[n]),en=A.useMemo(()=>Je.filter(J=>J.location!=="sidebar"),[Je]),Ke=A.useMemo(()=>Je.filter(J=>J.location==="sidebar"),[Je]),jn=A.useMemo(()=>en.map(J=>`${hh}${J.id}`),[en]),un=A.useMemo(()=>Ke.map(J=>`${hh}${J.id}`),[Ke]),tt=A.useCallback(J=>{const xe=G.trim().toLowerCase();if(xe&&![J.title,J.description,J.requester,...J.tags||[]].filter(Boolean).join(" ").toLowerCase().includes(xe)||H&&J.assignee_id!==H||W&&J.assignee_id||$&&J.requester!==$)return!1;if(Y.length>0){const Te=new Set(J.tags||[]);for(const Ge of Y)if(!Te.has(Ge))return!1}if(le&&!J.deadline)return!1;if(z||ee){const Te=z?new Date(z).setHours(0,0,0,0):-1/0,Ge=ee?new Date(ee).setHours(23,59,59,999):1/0,Bn=J.created_at?new Date(J.created_at).getTime():NaN,_t=J.entered_at?new Date(J.entered_at).getTime():NaN,Tt=Bt=>!isNaN(Bt)&&Bt>=Te&&Bt<=Ge;if(!Tt(Bn)&&!Tt(_t))return!1}return!0},[G,H,W,$,Y,z,ee,le]),pt=A.useMemo(()=>{const J=new Map;if(!n)return J;for(const xe of n.columns)J.set(xe.id,[]);for(const xe of[...n.cards].sort((Te,Ge)=>Te.position-Ge.position)){if(!tt(xe))continue;const Te=J.get(xe.column_id);Te&&Te.push(xe)}return J},[n,tt]),Mn=!!G.trim()||!!H||W||!!$||Y.length>0||!!z||!!ee||le,bn=J=>n==null?void 0:n.cards.find(xe=>xe.id===J),_n=J=>n==null?void 0:n.columns.find(xe=>xe.id===J),it=J=>{var xe;return(xe=bn(J))==null?void 0:xe.column_id},Et=J=>J.startsWith(hh),ze=J=>J.slice(hh.length),Fe=J=>{if(n)return Et(J)?ze(J):it(J)},Dn=J=>{var Bn;const xe=J.active.id,Te=(Bn=J.active.data.current)==null?void 0:Bn.type;if(h(Te),Te==="column"){f(ze(xe));return}const Ge=bn(xe);Ge&&o(Ge)},et=J=>{var _t,Tt;if(!n||((_t=J.active.data.current)==null?void 0:_t.type)!=="card")return;const xe=J.active.id,Te=(Tt=J.over)==null?void 0:Tt.id;if(!Te)return;const Ge=it(xe),Bn=Fe(Te);!Ge||!Bn||Ge===Bn||t(Bt=>{if(!Bt)return Bt;const ya=Bt.cards.map(Jt=>Jt.id===xe?{...Jt,column_id:Bn}:Jt);return{...Bt,cards:ya}})},An=async J=>{var Jt,Du;const xe=(Jt=J.active.data.current)==null?void 0:Jt.type,Te=J.active.id,Ge=(Du=J.over)==null?void 0:Du.id;if(o(null),f(null),h(void 0),!n||!Ge)return;if(xe==="column"){if(!Et(Ge))return;const ut=ze(Te),Fi=ze(Ge);if(ut===Fi)return;const ba=_n(ut),Sr=_n(Fi);if(!ba||!Sr)return;const mo=Sr.location,cs=Je.filter(Qi=>Qi.location===mo).map(Qi=>Qi.id),Ru=cs.indexOf(ut),yl=cs.indexOf(Fi);let ds;if(Ru===-1){const Qi=yl===-1?cs.length:yl;ds=[...cs.slice(0,Qi),ut,...cs.slice(Qi)]}else{if(Ru===yl)return;ds=Eg(cs,Ru,yl)}t(Qi=>{if(!Qi)return Qi;const Yc=new Map(ds.map((ai,Kc)=>[ai,Kc])),Pu=Qi.columns.map(ai=>ai.id===ut?{...ai,location:mo,position:Yc.get(ai.id)??ai.position}:Yc.has(ai.id)?{...ai,position:Yc.get(ai.id)}:ai);return{...Qi,columns:Pu}});try{ba.location!==mo&&await gf(ut,{location:mo}),await tie(ds)}catch(Qi){qn.show({color:"red",message:Qi.message})}ke();return}const Bn=Fe(Ge);if(!Bn)return;const _t=n.cards.find(ut=>ut.id===Te);if(_t!=null&&_t.locked&&_t.column_id!==Bn){qn.show({color:"yellow",message:"Card bloqueada: no se puede mover entre columnas"}),ke();return}const Tt=n.cards.filter(ut=>ut.column_id===Bn).sort((ut,Fi)=>ut.position-Fi.position),Bt=Tt.findIndex(ut=>ut.id===Te);let ya;if(Et(Ge)||Bt===-1)ya=[...Tt.filter(ut=>ut.id!==Te).map(ut=>ut.id),Te];else{const ut=Tt.findIndex(Fi=>Fi.id===Ge);ya=Eg(Tt.map(Fi=>Fi.id),Bt,ut)}t(ut=>{if(!ut)return ut;const Fi=new Map(ya.map((Sr,mo)=>[Sr,mo])),ba=ut.cards.map(Sr=>Sr.column_id===Bn&&Fi.has(Sr.id)?{...Sr,position:Fi.get(Sr.id)}:Sr);return{...ut,cards:ba}});try{await lie(Te,Bn,ya)}catch(ut){qn.show({color:"red",message:ut.message})}ke()},nn=async()=>{const J=v.trim();if(J)try{await eie(J),y(""),p(!1),ke()}catch(xe){qn.show({color:"red",message:xe.message})}},tn=A.useCallback(async(J,xe)=>{try{await gf(J,{name:xe}),ke()}catch(Te){qn.show({color:"red",message:Te.message})}},[ke]),rn=A.useCallback(async(J,xe)=>{try{await gf(J,{width:xe}),ke()}catch(Te){qn.show({color:"red",message:Te.message})}},[ke]),Ln=A.useCallback(async(J,xe)=>{try{await gf(J,{location:xe}),ke()}catch(Te){qn.show({color:"red",message:Te.message})}},[ke]),In=A.useCallback(J=>{Do.openConfirmModal({title:"Eliminar columna",children:b.jsx(Qe,{size:"sm",children:"Se borraran todas sus tarjetas. Continuar?"}),labels:{confirm:"Eliminar",cancel:"Cancelar"},confirmProps:{color:"red"},onConfirm:async()=>{try{await nie(J),ke()}catch(xe){qn.show({color:"red",message:xe.message})}}})},[ke]),kt=A.useCallback(J=>{var Te,Ge;const xe=Do.open({title:"Nueva tarjeta",size:"md",children:b.jsx(BF,{users:i,requesterOptions:L,tagOptions:F,initial:{requester:((Te=e.user)==null?void 0:Te.display_name)||((Ge=e.user)==null?void 0:Ge.username)||""},submitLabel:"Crear",onCancel:()=>Do.close(xe),onSubmit:async Bn=>{try{await iie({column_id:J,requester:Bn.requester,title:Bn.title,description:Bn.description,assignee_id:Bn.assignee_id,tags:Bn.tags}),Do.close(xe),ke(),fe(),Be()}catch(_t){qn.show({color:"red",message:_t.message})}}})})},[ke,i,e.user,L,F]),Sn=A.useCallback(J=>{var Te;const xe=Do.open({title:"Editar tarjeta",size:"85%",children:b.jsx($se,{card:J,users:i,currentUserId:(Te=e.user)==null?void 0:Te.id,requesterOptions:L,tagOptions:F,onCancel:()=>Do.close(xe),onSubmit:async Ge=>{try{await yf(J.id,{requester:Ge.requester,title:Ge.title,description:Ge.description,assignee_id:Ge.assignee_id,tags:Ge.tags}),Do.close(xe),ke(),fe(),Be()}catch(Bn){qn.show({color:"red",message:Bn.message})}}})})},[ke,i,e.user,L,F]),xn=A.useCallback(async J=>{try{const xe=await hie(J);await ke(),qn.show({color:"teal",message:`Duplicada: ${xe.title}`})}catch(xe){qn.show({color:"red",message:xe.message})}},[ke]),Hn=A.useCallback(async(J,xe)=>{t(Te=>Te&&{...Te,cards:Te.cards.map(Ge=>Ge.id===J?{...Ge,requester:xe}:Ge)});try{await yf(J,{requester:xe})}catch(Te){qn.show({color:"red",message:Te.message}),ke()}},[ke]),Vt=A.useCallback(J=>{E("board"),ue(J),window.setTimeout(()=>ue(null),3e3)},[]),mi=A.useCallback(async(J,xe)=>{t(Te=>Te&&{...Te,cards:Te.cards.map(Ge=>Ge.id===J?{...Ge,deadline:xe}:Ge)});try{await yf(J,{deadline:xe})}catch(Te){qn.show({color:"red",message:Te.message}),ke()}},[ke]),Zi=A.useCallback(async(J,xe)=>{t(Te=>Te&&{...Te,cards:Te.cards.map(Ge=>Ge.id===J?{...Ge,assignee_id:xe}:Ge)});try{await yf(J,{assignee_id:xe})}catch(Te){qn.show({color:"red",message:Te.message}),ke()}},[ke]),ga=A.useCallback(async J=>{try{await rie(J),ke(),_e()}catch(xe){qn.show({color:"red",message:xe.message})}},[ke,_e]),co=A.useCallback(async J=>{try{await oie(J),ke(),_e()}catch(xe){qn.show({color:"red",message:xe.message})}},[ke,_e]),za=A.useCallback(async J=>{Do.openConfirmModal({title:"Borrar permanentemente",children:b.jsx(Qe,{size:"sm",children:"Esta accion no se puede deshacer."}),labels:{confirm:"Borrar",cancel:"Cancelar"},confirmProps:{color:"red"},onConfirm:async()=>{try{await sie(J),_e()}catch(xe){qn.show({color:"red",message:xe.message})}}})},[_e]),br=A.useCallback(async(J,xe)=>{t(Te=>Te&&{...Te,cards:Te.cards.map(Ge=>Ge.id===J?{...Ge,color:xe}:Ge)});try{await yf(J,{color:xe})}catch(Te){qn.show({color:"red",message:Te.message}),ke()}},[ke]),La=A.useCallback(async(J,xe)=>{t(Te=>Te&&{...Te,cards:Te.cards.map(Ge=>Ge.id===J?{...Ge,stickers:xe}:Ge)});try{await _k(J,xe)}catch(Te){qn.show({color:"red",message:Te.message}),ke()}},[ke]),wr=A.useCallback((J,xe,Te)=>{Ne&&t(Ge=>{if(!Ge)return Ge;const Bn=Ge.cards.map(_t=>{if(_t.id!==J)return _t;const Tt=[..._t.stickers||[],{emoji:Ne,x:xe,y:Te}];return _k(J,Tt).catch(Bt=>{qn.show({color:"red",message:Bt.message}),ke()}),{..._t,stickers:Tt}});return{...Ge,cards:Bn}})},[Ne,ke]),kr=A.useCallback((J,xe)=>{t(Te=>{if(!Te)return Te;const Ge=Te.cards.map(Bn=>{if(Bn.id!==J)return Bn;const _t=(Bn.stickers||[]).filter((Tt,Bt)=>Bt!==xe);return _k(J,_t).catch(Tt=>{qn.show({color:"red",message:Tt.message}),ke()}),{...Bn,stickers:_t}});return{...Te,cards:Ge}})},[ke]),dn=A.useCallback((J,xe,Te,Ge)=>{t(Bn=>{if(!Bn)return Bn;const _t=Bn.cards.map(Tt=>{if(Tt.id!==J)return Tt;const Bt=(Tt.stickers||[]).map((ya,Jt)=>Jt===xe?{...ya,x:Te,y:Ge}:ya);return{...Tt,stickers:Bt}});return{...Bn,cards:_t}})},[]),ri=A.useCallback(J=>{t(xe=>{if(!xe)return xe;const Te=xe.cards.find(Ge=>Ge.id===J);return Te&&La(J,Te.stickers||[]),xe})},[La]),ln=A.useCallback(J=>{Do.open({title:J.title,size:"md",children:b.jsx(jCe,{card:J})})},[]),_r=A.useCallback(async(J,xe)=>{t(Te=>Te&&{...Te,cards:Te.cards.map(Ge=>Ge.id===J?{...Ge,locked:xe}:Ge)});try{await yf(J,{locked:xe})}catch(Te){qn.show({color:"red",message:Te.message}),ke()}},[ke]),Ia=A.useCallback(async(J,xe)=>{t(Te=>Te&&{...Te,columns:Te.columns.map(Ge=>Ge.id===J?{...Ge,wip_limit:xe}:Ge)});try{await gf(J,{wip_limit:xe})}catch(Te){qn.show({color:"red",message:Te.message}),ke()}},[ke]),xr=A.useCallback(async(J,xe)=>{t(Te=>Te&&{...Te,columns:Te.columns.map(Ge=>Ge.id===J?{...Ge,is_done:xe}:Ge)});try{await gf(J,{is_done:xe}),ke()}catch(Te){qn.show({color:"red",message:Te.message}),ke()}},[ke]),Fr=A.useMemo(()=>({height:50}),[]),L0=A.useMemo(()=>({width:We,breakpoint:"md",collapsed:{mobile:!Ve,desktop:!Ve}}),[We,Ve]),sp=A.useMemo(()=>({width:380,breakpoint:"md",collapsed:{mobile:!_,desktop:!_}}),[_]),lp=A.useMemo(()=>({main:{paddingInlineStart:0,paddingInlineEnd:0}}),[]);if(!n)return b.jsx(hn,{justify:"center",p:"xl",children:b.jsx(zi,{})});const Mu=a,ho=l?_n(l):null;return b.jsxs(Rre,{sensors:se,collisionDetection:A9e(c),onDragStart:Dn,onDragOver:et,onDragEnd:An,children:[b.jsxs(hr,{header:Fr,navbar:L0,aside:sp,padding:0,styles:lp,children:[b.jsx(hr.Header,{children:b.jsxs(hn,{h:"100%",px:"md",justify:"space-between",children:[b.jsxs(hn,{gap:6,children:[b.jsx($t,{variant:Ve?"filled":"subtle",onClick:()=>Ue(J=>!J),"aria-label":"Toggle sidebar",children:b.jsx(Koe,{size:16})}),b.jsx(SS,{size:22}),b.jsx(ku,{order:4,children:"Kanban"}),b.jsx(yi,{value:C,onChange:J=>J&&E(J),variant:"pills",ml:"md",children:b.jsxs(yi.List,{children:[b.jsx(yi.Tab,{value:"board",leftSection:b.jsx(SS,{size:14}),children:"Tablero"}),b.jsx(yi.Tab,{value:"dashboard",leftSection:b.jsx(woe,{size:14}),children:"Dashboard"}),b.jsx(yi.Tab,{value:"calendar",leftSection:b.jsx(yoe,{size:14}),children:"Calendario"})]})})]}),b.jsxs(hn,{gap:4,children:[b.jsx($t,{variant:"subtle",onClick:ke,"aria-label":"Refresh",children:b.jsx(lse,{size:16})}),b.jsx($t,{variant:_?"filled":"subtle",onClick:()=>S(J=>!J),"aria-label":"Toggle chat",children:b.jsx(LF,{size:16})}),e.user&&b.jsxs(Gn,{position:"bottom-end",shadow:"md",withArrow:!0,closeOnItemClick:!1,children:[b.jsx(Gn.Target,{children:b.jsx($t,{variant:"subtle","aria-label":"Usuario",children:b.jsx(tl,{size:26,radius:"xl",color:e.user.color||"blue",children:(e.user.display_name||e.user.username).slice(0,2).toUpperCase()})})}),b.jsxs(Gn.Dropdown,{children:[b.jsx(Gn.Label,{children:e.user.display_name||e.user.username}),b.jsxs(ve,{p:"xs",children:[b.jsx(Qe,{size:"xs",c:"dimmed",mb:4,children:"Color del avatar"}),b.jsx(sW,{value:e.user.color||"",onChange:async J=>{try{const xe=await xj({color:J});e.setUser(xe)}catch(xe){qn.show({color:"red",message:xe.message})}},options:Mse,onOpenCustom:()=>{var J,xe;Se((xe=(J=e.user)==null?void 0:J.color)!=null&&xe.startsWith("#")?e.user.color:"#888888"),Re(!0)}})]}),b.jsx(Gn.Divider,{}),b.jsx(Gn.Item,{leftSection:b.jsx(Goe,{size:14}),color:"red",onClick:()=>e.logout(),children:"Cerrar sesion"})]})]})]})]})}),b.jsxs(hr.Navbar,{p:"xs",children:[b.jsx(ve,{onMouseDown:ie,style:{position:"absolute",top:0,right:-3,width:6,height:"100%",cursor:"col-resize",zIndex:10},"aria-label":"Resize sidebar"}),b.jsxs(mt,{gap:"xs",h:"100%",children:[b.jsx(Qe,{size:"xs",c:"dimmed",fw:600,tt:"uppercase",children:"Columnas parqueadas"}),b.jsx(ve,{style:{flex:1,overflowY:"auto"},children:b.jsx(_S,{items:un,strategy:ZB,children:b.jsxs(mt,{gap:"xs",children:[Ke.length===0&&b.jsx(Qe,{size:"xs",c:"dimmed",children:'Vacio. Mueve columnas aqui con el icono "archivar" en su cabecera.'}),Ke.map(J=>b.jsx(w$,{column:J,cards:pt.get(J.id)??[],now:w,collapsed:!0,onAddCard:kt,onRenameColumn:tn,onResizeColumn:rn,onMoveColumnLocation:Ln,onDeleteColumn:In,onSetWIPLimit:Ia,onToggleDone:xr,onEditCard:Sn,onDeleteCard:ga,onDuplicateCard:xn,onChangeCardColor:br,onShowHistory:ln,onToggleCardLock:_r,onAssignCard:Zi,onSetCardDeadline:mi,highlightCardId:ae,onSetRequester:Hn,requesterOptions:L,onOpenCustomCardColor:(xe,Te)=>qe({cardId:xe,color:Te}),activeSticker:Ne,onAddSticker:wr,onRemoveSticker:kr,onMoveSticker:dn,onCommitSticker:ri,users:i,usersById:pn},J.id))]})})}),b.jsxs(ve,{style:{borderTop:"1px solid var(--mantine-color-dark-5)",paddingTop:8},children:[b.jsx(qt,{variant:"subtle",color:"gray",size:"xs",fullWidth:!0,justify:"space-between",leftSection:b.jsx(Wf,{size:14}),rightSection:b.jsxs(hn,{gap:4,children:[b.jsx(ti,{size:"xs",variant:"light",color:O.length>0?"red":"gray",children:O.length}),M?b.jsx(DF,{size:12}):b.jsx(RF,{size:12})]}),onClick:()=>N(J=>!J),children:"Papelera"}),M&&b.jsxs(mt,{gap:4,mt:4,style:{maxHeight:220,overflowY:"auto"},children:[O.length===0&&b.jsx(Qe,{size:"xs",c:"dimmed",px:"xs",children:"Vacia."}),O.map(J=>b.jsx(Wt,{p:6,withBorder:!0,radius:"sm",bg:"dark.7",children:b.jsxs(hn,{justify:"space-between",gap:4,wrap:"nowrap",children:[b.jsx(Qe,{size:"xs",truncate:!0,style:{flex:1},title:J.title,children:J.title}),b.jsx(Ai,{label:"Restaurar",withArrow:!0,children:b.jsx($t,{size:"xs",variant:"subtle",color:"green",onClick:()=>co(J.id),children:b.jsx(coe,{size:12})})}),b.jsx(Ai,{label:"Borrar permanentemente",withArrow:!0,children:b.jsx($t,{size:"xs",variant:"subtle",color:"red",onClick:()=>za(J.id),children:b.jsx(pse,{size:12})})})]})},J.id))]})]})]})]}),b.jsx(hr.Aside,{children:b.jsx(ume,{onBoardChange:ke})}),b.jsx(hr.Main,{children:C==="dashboard"?b.jsx(ve,{style:{height:"calc(100vh - 50px)",overflow:"auto"},children:b.jsx(OCe,{users:i})}):C==="calendar"?b.jsx(ve,{style:{height:"calc(100vh - 50px)",overflow:"auto"},children:b.jsx(cme,{users:i,cards:n.cards,onJumpToCard:Vt})}):b.jsxs(ve,{style:{height:"calc(100vh - 50px)",overflow:"hidden",display:"flex",flexDirection:"column"},children:[b.jsxs(hn,{gap:"xs",p:"xs",wrap:"wrap",align:"end",style:{borderBottom:"1px solid var(--mantine-color-dark-4)"},children:[b.jsx(rl,{leftSection:b.jsx(fse,{size:14}),placeholder:"Buscar (titulo, descripcion, solicitante, tag)",value:G,onChange:J=>U(J.currentTarget.value),rightSection:G?b.jsx($t,{size:"sm",variant:"subtle",color:"gray",onClick:()=>U(""),"aria-label":"Limpiar",children:b.jsx(lh,{size:14})}):null,style:{minWidth:280,flex:1},size:"xs"}),b.jsx(Xo,{placeholder:"Asignado",value:H,onChange:P,data:i.map(J=>({value:J.id,label:J.display_name||J.username})),clearable:!0,searchable:!0,size:"xs",style:{minWidth:160},disabled:W}),b.jsx(nl,{size:"xs",label:"Sin asignar",checked:W,onChange:J=>{const xe=J.currentTarget.checked;V(xe),xe&&P(null)}}),b.jsx(nl,{size:"xs",label:"Con deadline",checked:le,onChange:J=>be(J.currentTarget.checked)}),b.jsx(Xo,{placeholder:"Solicitante",value:$,onChange:q,data:L,clearable:!0,searchable:!0,size:"xs",style:{minWidth:160}}),b.jsx(Ay,{placeholder:"Tags",value:Y,onChange:D,data:F,clearable:!0,searchable:!0,size:"xs",style:{minWidth:200}}),b.jsx(su,{placeholder:"Desde",value:z,onChange:J=>X(J?new Date(J):null),clearable:!0,size:"xs",style:{minWidth:130},valueFormat:"DD/MM/YY"}),b.jsx(su,{placeholder:"Hasta",value:ee,onChange:J=>re(J?new Date(J):null),clearable:!0,size:"xs",style:{minWidth:130},valueFormat:"DD/MM/YY"}),b.jsxs(hn,{gap:4,children:[b.jsx(qt,{size:"xs",variant:"default",onClick:()=>{const J=new Date;X(J),re(J)},children:"Hoy"}),b.jsx(qt,{size:"xs",variant:"default",onClick:()=>{const J=new Date,xe=new Date;xe.setDate(xe.getDate()-7),X(xe),re(J)},children:"7d"}),b.jsx(qt,{size:"xs",variant:"default",onClick:()=>{const J=new Date,xe=new Date;xe.setDate(xe.getDate()-30),X(xe),re(J)},children:"30d"})]}),b.jsx(S9e,{opened:Ce,onClose:()=>ne(!1),onSelect:J=>pe(J),target:b.jsx(qt,{size:"xs",variant:Ne?"filled":"default",color:Ne?"yellow":void 0,leftSection:b.jsx(ese,{size:14}),onClick:()=>{Ne?ne(J=>!J):pe("😀")},children:Ne?`Modo sticker: ${Ne}`:"Stickers"})}),Ne&&b.jsx(qt,{size:"xs",variant:"subtle",color:"gray",leftSection:b.jsx(lh,{size:12}),onClick:()=>pe(null),children:"ESC"}),Mn&&b.jsx(qt,{size:"xs",variant:"subtle",color:"gray",leftSection:b.jsx(lh,{size:12}),onClick:()=>{U(""),P(null),V(!1),q(null),D([]),X(null),re(null),be(!1)},children:"Limpiar"})]}),b.jsx(_S,{items:jn,strategy:tae,children:b.jsxs(hn,{align:"stretch",wrap:"nowrap",gap:"md",p:"md",style:{flex:1,overflowX:"auto",overflowY:"hidden"},children:[en.map(J=>b.jsx(w$,{column:J,cards:pt.get(J.id)??[],now:w,onAddCard:kt,onRenameColumn:tn,onResizeColumn:rn,onMoveColumnLocation:Ln,onDeleteColumn:In,onSetWIPLimit:Ia,onToggleDone:xr,onEditCard:Sn,onDeleteCard:ga,onDuplicateCard:xn,onChangeCardColor:br,onShowHistory:ln,onToggleCardLock:_r,onAssignCard:Zi,onSetCardDeadline:mi,highlightCardId:ae,onSetRequester:Hn,requesterOptions:L,activeSticker:Ne,onAddSticker:wr,onRemoveSticker:kr,onMoveSticker:dn,onCommitSticker:ri,users:i,usersById:pn},J.id)),b.jsx(ve,{style:{minWidth:280,maxWidth:320},children:d?b.jsxs(mt,{gap:4,children:[b.jsx(rl,{size:"xs",placeholder:"Nombre de columna...",value:v,onChange:J=>y(J.currentTarget.value),autoFocus:!0,onKeyDown:J=>{J.key==="Enter"&&nn(),J.key==="Escape"&&(p(!1),y(""))}}),b.jsxs(hn,{gap:4,children:[b.jsx(qt,{size:"xs",onClick:nn,children:"Anadir"}),b.jsx($t,{variant:"subtle",color:"gray",onClick:()=>p(!1),children:b.jsx(lh,{size:14})})]})]}):b.jsx(qt,{variant:"light",color:"gray",leftSection:b.jsx(Bh,{size:14}),onClick:()=>p(!0),children:"Anadir columna"})})]})})]})})]}),b.jsx(Qre,{children:Mu?b.jsx(lW,{card:Mu,now:w,onDelete:()=>{},onEdit:()=>{},onChangeColor:()=>{},onShowHistory:()=>{},onToggleLock:()=>{},onAssign:()=>{},users:i,assignee:Mu.assignee_id?pn.get(Mu.assignee_id):void 0,isOverlay:!0}):ho?b.jsx(ve,{style:{width:ho.location==="sidebar"?220:ho.width,padding:8,background:FF(""),border:`1px solid ${WC("")}`,borderRadius:8,opacity:.9},children:b.jsx(Qe,{fw:600,size:"sm",children:ho.name})}):null}),b.jsx(r6,{opened:Ee,onClose:()=>Re(!1),value:we,onAccept:async J=>{Se(J);try{const xe=await xj({color:J});e.setUser(xe)}catch(xe){qn.show({color:"red",message:xe.message})}}}),b.jsx(r6,{opened:!!De,onClose:()=>qe(null),value:(De==null?void 0:De.color)||"#888888",onAccept:J=>{De&&br(De.cardId,J)}})]})}function E9e(){const e=TC(),[n,t]=A.useState("login"),[i,r]=A.useState(""),[a,o]=A.useState(""),[l,f]=A.useState(""),[c,h]=A.useState(!1),[d,p]=A.useState(null),[v,y]=A.useState(!1);A.useEffect(()=>{Jte().then(k=>y(!!k["registration-enabled"])).catch(()=>y(!1))},[]),A.useEffect(()=>{!v&&n==="register"&&t("login")},[v,n]);const w=async k=>{k.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(_){p(_.message)}finally{h(!1)}};return b.jsx(Ac,{style:{minHeight:"100vh"},p:"md",children:b.jsx(Wt,{p:"xl",withBorder:!0,radius:"md",shadow:"md",style:{width:360,maxWidth:"100%"},children:b.jsx("form",{onSubmit:w,children:b.jsxs(mt,{gap:"md",children:[b.jsxs(mt,{gap:4,align:"center",children:[b.jsx(SS,{size:36}),b.jsx(ku,{order:3,children:"Kanban"}),b.jsx(Qe,{size:"sm",c:"dimmed",children:n==="login"?"Inicia sesion":"Crea una cuenta"})]}),b.jsx(rl,{label:"Usuario",value:i,onChange:k=>r(k.currentTarget.value),required:!0,autoFocus:!0,autoComplete:"username"}),n==="register"&&b.jsx(rl,{label:"Nombre (opcional)",value:l,onChange:k=>f(k.currentTarget.value),autoComplete:"name"}),b.jsx(jy,{label:"Contrasena",value:a,onChange:k=>o(k.currentTarget.value),required:!0,autoComplete:n==="login"?"current-password":"new-password"}),d&&b.jsx(Qe,{size:"sm",c:"red",children:d}),b.jsx(qt,{type:"submit",loading:c,fullWidth:!0,children:n==="login"?"Entrar":"Registrar"}),v?b.jsxs(Qe,{size:"xs",c:"dimmed",ta:"center",children:[n==="login"?"No tienes cuenta?":"Ya tienes cuenta?"," ",b.jsx(iy,{component:"button",type:"button",size:"xs",onClick:()=>{p(null),t(n==="login"?"register":"login")},children:n==="login"?"Registrate":"Inicia sesion"})]}):b.jsx(Qe,{size:"xs",c:"dimmed",ta:"center",children:"Registro de nuevos usuarios deshabilitado."})]})})})})}function T9e(){const{user:e,loading:n}=TC();return n?b.jsx(Ac,{style:{minHeight:"100vh"},children:b.jsx(zi,{})}):e?b.jsx(O9e,{}):b.jsx(E9e,{})}const j9e={primaryColor:"blue",fontFamily:"system-ui, -apple-system, sans-serif"};Kte.createRoot(document.getElementById("root")).render(b.jsx(lz,{theme:j9e,defaultColorScheme:"dark",children:b.jsxs(yte,{children:[b.jsx(lo,{position:"top-right"}),b.jsx(wie,{children:b.jsx(T9e,{})})]})})); diff --git a/backend/dist/assets/index-CPqSy0gZ.js b/backend/dist/assets/index-CPqSy0gZ.js deleted file mode 100644 index ed5d318..0000000 --- a/backend/dist/assets/index-CPqSy0gZ.js +++ /dev/null @@ -1,1151 +0,0 @@ -function RY(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 hv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ot(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Bw={exports:{}},Rd={};/** - * @license React - * react-jsx-runtime.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var GT;function PY(){if(GT)return Rd;GT=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 Rd.Fragment=n,Rd.jsx=t,Rd.jsxs=t,Rd}var YT;function NY(){return YT||(YT=1,Bw.exports=PY()),Bw.exports}var k=NY();function St(e){return Object.keys(e)}function Fw(e){return e&&typeof e=="object"&&!Array.isArray(e)}function s6(e,n){const t={...e},i=n;return Fw(e)&&Fw(n)&&Object.keys(n).forEach(r=>{Fw(i[r])&&r in e?t[r]=s6(t[r],i[r]):t[r]=i[r]}),t}function $Y(e){return e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)}function zY(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 Sh(e){const n=zY(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 KT(e){return e==="0rem"?"0rem":`calc(${e} * var(--mantine-scale))`}function q$(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?KT(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?KT(a):a}}return i}return t}const he=q$("rem",{shouldScale:!0}),sg=q$("em");function pu(e){return Object.keys(e).reduce((n,t)=>(e[t]!==void 0&&(n[t]=e[t]),n),{})}function H$(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 qw={exports:{}},En={};/** - * @license React - * react.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var XT;function LY(){if(XT)return En;XT=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),d=Symbol.for("react.activity"),p=Symbol.iterator;function v(V){return V===null||typeof V!="object"?null:(V=p&&V[p]||V["@@iterator"],typeof V=="function"?V:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,w={};function _(V,W,$){this.props=V,this.context=W,this.refs=w,this.updater=$||y}_.prototype.isReactComponent={},_.prototype.setState=function(V,W){if(typeof V!="object"&&typeof V!="function"&&V!=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,V,W,"setState")},_.prototype.forceUpdate=function(V){this.updater.enqueueForceUpdate(this,V,"forceUpdate")};function S(){}S.prototype=_.prototype;function C(V,W,$){this.props=V,this.context=W,this.refs=w,this.updater=$||y}var E=C.prototype=new S;E.constructor=C,b(E,_.prototype),E.isPureReactComponent=!0;var A=Array.isArray;function T(){}var j={H:null,A:null,T:null,S:null},N=Object.prototype.hasOwnProperty;function q(V,W,$){var X=$.ref;return{$$typeof:e,type:V,key:W,ref:X!==void 0?X:null,props:$}}function R(V,W){return q(V.type,W,V.props)}function L(V){return typeof V=="object"&&V!==null&&V.$$typeof===e}function B(V){var W={"=":"=0",":":"=2"};return"$"+V.replace(/[=:]/g,function($){return W[$]})}var G=/\/+/g;function H(V,W){return typeof V=="object"&&V!==null&&V.key!=null?B(""+V.key):W.toString(36)}function U(V){switch(V.status){case"fulfilled":return V.value;case"rejected":throw V.reason;default:switch(typeof V.status=="string"?V.then(T,T):(V.status="pending",V.then(function(W){V.status==="pending"&&(V.status="fulfilled",V.value=W)},function(W){V.status==="pending"&&(V.status="rejected",V.reason=W)})),V.status){case"fulfilled":return V.value;case"rejected":throw V.reason}}throw V}function P(V,W,$,X,te){var ae=typeof V;(ae==="undefined"||ae==="boolean")&&(V=null);var le=!1;if(V===null)le=!0;else switch(ae){case"bigint":case"string":case"number":le=!0;break;case"object":switch(V.$$typeof){case e:case n:le=!0;break;case h:return le=V._init,P(le(V._payload),W,$,X,te)}}if(le)return te=te(V),le=X===""?"."+H(V,0):X,A(te)?($="",le!=null&&($=le.replace(G,"$&/")+"/"),P(te,W,$,"",function(ue){return ue})):te!=null&&(L(te)&&(te=R(te,$+(te.key==null||V&&V.key===te.key?"":(""+te.key).replace(G,"$&/")+"/")+le)),W.push(te)),1;le=0;var ye=X===""?".":X+":";if(A(V))for(var oe=0;oe{const i=O.use(n);if(i===null)throw new Error(e);return i}]}function QT(e,n){return t=>{if(typeof t!="string"||t.trim().length===0)throw new Error(n);return`${e}-${t}`}}function lg(e,n){let t=e;for(;(t=t.parentElement)&&!t.matches(n););return t}function IY(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 BY(e,n,t){for(let i=e+1;i{var y;t==null||t(l);const f=Array.from(((y=lg(l.currentTarget,e))==null?void 0:y.querySelectorAll(n))||[]).filter(b=>FY(l.currentTarget,b,e)),c=f.findIndex(b=>l.currentTarget===b),h=BY(c,f,i),d=IY(c,f,i),p=a==="rtl"?d:h,v=a==="rtl"?h:d;switch(l.key){case"ArrowRight":o==="horizontal"&&(l.stopPropagation(),l.preventDefault(),f[p].focus(),r&&f[p].click());break;case"ArrowLeft":o==="horizontal"&&(l.stopPropagation(),l.preventDefault(),f[v].focus(),r&&f[v].click());break;case"ArrowUp":o==="vertical"&&(l.stopPropagation(),l.preventDefault(),f[d].focus(),r&&f[d].click());break;case"ArrowDown":o==="vertical"&&(l.stopPropagation(),l.preventDefault(),f[h].focus(),r&&f[h].click());break;case"Home":l.stopPropagation(),l.preventDefault(),!f[0].disabled&&f[0].focus();break;case"End":{l.stopPropagation(),l.preventDefault();const b=f.length-1;!f[b].disabled&&f[b].focus();break}}}}const qY={app:100,modal:200,popover:300,overlay:400,max:9999};function ha(e){return qY[e]}const W3=()=>{};function HY(e,n={active:!0}){return typeof e!="function"||!n.active?n.onKeyDown||W3:t=>{var i;t.key==="Escape"&&(e(t),(i=n.onTrigger)==null||i.call(n))}}function Mn(e,n="size",t=!0){if(e!==void 0)return H$(e)?t?he(e):e:`var(--${n}-${e})`}function Ft(e){return Mn(e,"mantine-spacing")}function Ut(e){return e===void 0?"var(--mantine-radius-default)":Mn(e,"mantine-radius")}function Zt(e){return Mn(e,"mantine-font-size")}function UY(e){return Mn(e,"mantine-line-height",!1)}function c6(e){if(e)return Mn(e,"mantine-shadow",!1)}function pr(e,n){return t=>{e==null||e(t),n==null||n(t)}}function d6(e,n){return e in n?Sh(n[e]):Sh(e)}function Ch(e,n){const t=e.map(i=>({value:i,px:d6(i,n)}));return t.sort((i,r)=>i.px-r.px),t}function zr(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function VY(e,n,t){var i;return t?Array.from(((i=lg(t,n))==null?void 0:i.querySelectorAll(e))||[]).findIndex(r=>r===t):null}function Fo(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 Xs(e="mantine-"){return`${e}${Math.random().toString(36).slice(2,11)}`}function Jd(e){const n=O.useRef(e);return O.useEffect(()=>{n.current=e}),O.useMemo(()=>((...t)=>{var i;return(i=n.current)==null?void 0:i.call(n,...t)}),[])}function $1(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=Jd(e),l=O.useRef(0),f=O.useRef(0),c=O.useRef(null),h=O.useMemo(()=>{const d=Object.assign((...p)=>{window.clearTimeout(l.current),c.current=p;const v=d._isFirstCall;d._isFirstCall=!1;function y(){window.clearTimeout(l.current),window.clearTimeout(f.current),l.current=0,f.current=0,d._isFirstCall=!0,d._hasPendingCallback=!1}function b(){a!==void 0&&f.current===0&&(f.current=window.setTimeout(()=>{if(l.current!==0){const S=c.current;y(),o(...S)}},a))}if(r&&v){o(...p);const S=()=>{y()},C=()=>{l.current!==0&&(y(),o(...p))},E=()=>{y()};d.flush=C,d.cancel=E,l.current=window.setTimeout(S,t),b();return}if(r&&!v){d._hasPendingCallback=!0;const S=()=>{l.current!==0&&(y(),o(...p))},C=()=>{y()};d.flush=S,d.cancel=C;const E=()=>{y()};l.current=window.setTimeout(E,t),b();return}d._hasPendingCallback=!0;const w=()=>{l.current!==0&&(y(),o(...p))},_=()=>{y()};d.flush=w,d.cancel=_,l.current=window.setTimeout(w,t),b()},{flush:()=>{},cancel:()=>{},isPending:()=>d._hasPendingCallback,_isFirstCall:!0,_hasPendingCallback:!1});return d},[o,t,r,a]);return O.useEffect(()=>()=>{i?h.flush():h.cancel()},[h,i]),h}const WY=["mousedown","touchstart"];function GY(e,n,t,i=!0){const r=O.useRef(null),a=n||WY,o=O.useEffectEvent(f=>{const{target:c}=f??{};if(!document.body.contains(c)&&(c==null?void 0:c.tagName)!=="HTML")return;const h=f.composedPath();Array.isArray(t)?t.every(d=>!!d&&!h.includes(d))&&e(f):r.current&&!h.includes(r.current)&&e(f)}),l=a.join(",");return O.useEffect(()=>{if(!i)return;const f=l.split(",");return f.forEach(c=>document.addEventListener(c,o)),()=>{f.forEach(c=>document.removeEventListener(c,o))}},[l,i]),r}function YY(e,n){return typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function KY(e,n,{getInitialValueInEffect:t}={getInitialValueInEffect:!0}){const[i,r]=O.useState(t?n:YY(e));return O.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 ts=typeof document<"u"?O.useLayoutEffect:O.useEffect;function Yo(e,n){const t=O.useRef(!1);O.useEffect(()=>()=>{t.current=!1},[]),O.useEffect(()=>{if(t.current)return e();t.current=!0},n)}function V$({opened:e,shouldReturnFocus:n=!0}){const t=O.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 Yo(()=>{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 XY=/input|select|textarea|button|object/,W$="a, input, select, textarea, button, object, [tabindex]";function ZY(e){return e.style.display==="none"}function QY(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(ZY(n))return!1;n=n.parentNode}return!0}function G$(e){let n=e.getAttribute("tabindex");return n===null&&(n=void 0),parseInt(n,10)}function G3(e){const n=e.nodeName.toLowerCase(),t=!Number.isNaN(G$(e));return(XY.test(n)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||t)&&QY(e)}function Y$(e){const n=G$(e);return(Number.isNaN(n)||n>=0)&&G3(e)}function JY(e){return Array.from(e.querySelectorAll(W$)).filter(Y$)}function eK(e,n){const t=JY(e);if(!t.length){n.preventDefault();return}const i=t[n.shiftKey?0:t.length-1],r=e.getRootNode();let a=i===r.activeElement||e===r.activeElement;const o=r.activeElement;if(o.tagName==="INPUT"&&o.getAttribute("type")==="radio"&&(a=t.filter(f=>f.getAttribute("type")==="radio"&&f.getAttribute("name")===o.getAttribute("name")).includes(i)),!a)return;n.preventDefault();const l=t[n.shiftKey?t.length-1:0];l&&l.focus()}function nK(e=!0){const n=O.useRef(null),t=r=>{let a=r.querySelector("[data-autofocus]");if(!a){const o=Array.from(r.querySelectorAll(W$));a=o.find(Y$)||o.find(G3)||null,!a&&G3(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=O.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 O.useEffect(()=>{if(!e)return;n.current&&setTimeout(()=>{n.current&&t(n.current)});const r=a=>{a.key==="Tab"&&n.current&&eK(n.current,a)};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e]),i}const tK=e=>(e+1)%1e6;function iK(){const[,e]=O.useReducer(tK,0);return e}function Gi(e){const[n,t]=O.useState(`mantine-${O.useId().replace(/:/g,"")}`);return ts(()=>{t(Xs())},[]),typeof e=="string"?e:n}function K$(e,n,t){const i=O.useEffectEvent(n);O.useEffect(()=>(window.addEventListener(e,i,t),()=>window.removeEventListener(e,i,t)),[e])}function ug(e,n){if(typeof e=="function")return e(n);typeof e=="object"&&e!==null&&"current"in e&&(e.current=n)}function rK(...e){const n=new Map;return t=>{if(e.forEach(i=>{const r=ug(i,t);r&&n.set(i,r)}),n.size>0)return()=>{e.forEach(i=>{const r=n.get(i);r&&typeof r=="function"?r():ug(i,null)}),n.clear()}}}function zt(...e){return O.useCallback(rK(...e),e)}function X$(e){return{x:Fo(e.x,0,1),y:Fo(e.y,0,1)}}function Z$(e,n,t="ltr"){const i=O.useRef(!1),r=O.useRef(!1),a=O.useRef(0),o=O.useRef(null),[l,f]=O.useState(!1);return O.useEffect(()=>(i.current=!0,()=>{var c;(c=o.current)==null||c.call(o)}),[]),{ref:O.useCallback(c=>{const h=({x:C,y:E})=>{cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{if(i.current&&c){c.style.userSelect="none";const A=c.getBoundingClientRect();if(A.width&&A.height){const T=Fo((C-A.left)/A.width,0,1);e({x:t==="ltr"?T:1-T,y:Fo((E-A.top)/A.height,0,1)})}}})},d=()=>{document.addEventListener("mousemove",w),document.addEventListener("mouseup",y),document.addEventListener("touchmove",S,{passive:!1}),document.addEventListener("touchend",y)},p=()=>{document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",y),document.removeEventListener("touchmove",S),document.removeEventListener("touchend",y)},v=()=>{!r.current&&i.current&&(r.current=!0,typeof(n==null?void 0:n.onScrubStart)=="function"&&n.onScrubStart(),f(!0),d())},y=()=>{r.current&&i.current&&(r.current=!1,f(!1),p(),setTimeout(()=>{typeof(n==null?void 0:n.onScrubEnd)=="function"&&n.onScrubEnd()},0))},b=C=>{v(),C.preventDefault(),w(C)},w=C=>h({x:C.clientX,y:C.clientY}),_=C=>{C.cancelable&&C.preventDefault(),v(),S(C)},S=C=>{C.cancelable&&C.preventDefault(),h({x:C.changedTouches[0].clientX,y:C.changedTouches[0].clientY})};return c==null||c.addEventListener("mousedown",b),c==null||c.addEventListener("touchstart",_,{passive:!1}),o.current=()=>{p(),cancelAnimationFrame(a.current)},()=>{c&&(c.removeEventListener("mousedown",b),c.removeEventListener("touchstart",_))}},[t,e]),active:l}}function xi({value:e,defaultValue:n,finalValue:t,onChange:i=()=>{}}){const[r,a]=O.useState(n!==void 0?n:t),o=(l,...f)=>{a(l),i==null||i(l,...f)};return e!==void 0?[e,i,!0]:[r,o,!1]}function h6(e,n){return KY("(prefers-reduced-motion: reduce)",e,n)}function Q$(e=!1,n={}){const[t,i]=O.useState(e),r=O.useCallback(()=>{i(o=>{var l;return o||((l=n.onOpen)==null||l.call(n),!0)})},[n.onOpen]),a=O.useCallback(()=>{i(o=>{var l;return o&&((l=n.onClose)==null||l.call(n),!1)})},[n.onClose]);return[t,{open:r,close:a,toggle:O.useCallback(()=>{t?a():r()},[a,r,t]),set:i}]}function aK(e){const n=O.useRef(void 0);return O.useEffect(()=>{n.current=e},[e]),n.current}var Hw={exports:{}},Li={};/** - * @license React - * react-dom.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var JT;function oK(){if(JT)return Li;JT=1;var e=l6();function n(f){var c="https://react.dev/errors/"+f;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Hw.exports=oK(),Hw.exports}var Vs=J$();const eh=ot(Vs);function sK(e,n){window.dispatchEvent(new CustomEvent(e,{detail:n}))}function lK(e){function n(i){const r=Object.keys(i).reduce((a,o)=>(a[`${e}:${o}`]=l=>i[o](l.detail),a),{});ts(()=>(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)=>sK(`${e}:${String(i)}`,r[0])}return[n,t]}var uK={};function fK(){return"development"}function z1(e){var t;const n=Z.version;return typeof Z.version!="string"||n.startsWith("18.")?e==null?void 0:e.ref:(t=e==null?void 0:e.props)==null?void 0:t.ref}function Wv(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]=cn(n[i],r):n[i]=r})}),n}function Ah({theme:e,classNames:n,props:t,stylesCtx:i}){return dK((Array.isArray(n)?n:[n]).map(r=>typeof r=="function"?r(e,t,i):r||cK))}function fg({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 n5(e){return e==="auto"||e==="dark"||e==="light"}function hK({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 n5(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&&n5(i.newValue)&&t(i.newValue)},window.addEventListener("storage",n)},unsubscribe:()=>{window.removeEventListener("storage",n)},clear:()=>{window.localStorage.removeItem(e)}}}function Oh(e,n){return typeof e.primaryShade=="number"?e.primaryShade:n==="dark"?e.primaryShade.dark:e.primaryShade.light}function mK(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function pK(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 vK(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 gK(e){const n=e.match(/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i);if(!n)return{r:0,g:0,b:0,a:1};const t=parseInt(n[1],10),i=parseInt(n[2],10)/100,r=parseInt(n[3],10)/100,a=n[5]?parseFloat(n[5]):void 0,o=(1-Math.abs(2*r-1))*i,l=t/60,f=o*(1-Math.abs(l%2-1)),c=r-o/2;let h,d,p;return l>=0&&l<1?(h=o,d=f,p=0):l>=1&&l<2?(h=f,d=o,p=0):l>=2&&l<3?(h=0,d=o,p=f):l>=3&&l<4?(h=0,d=f,p=o):l>=4&&l<5?(h=f,d=0,p=o):(h=o,d=0,p=f),{r:Math.round((h+c)*255),g:Math.round((d+c)*255),b:Math.round((p+c)*255),a:a||1}}function m6(e){return mK(e)?pK(e):e.startsWith("rgb")?vK(e):e.startsWith("hsl")?gK(e):{r:0,g:0,b:0,a:1}}function Uw(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function yK(e){const n=e.match(/oklch\((.*?)%\s/);return n?parseFloat(n[1]):null}function nz(e){if(e.startsWith("oklch("))return(yK(e)||0)/100;const{r:n,g:t,b:i}=m6(e),r=n/255,a=t/255,o=i/255,l=Uw(r),f=Uw(a),c=Uw(o);return .2126*l+.7152*f+.0722*c}function Pd(e,n=.179){return e.startsWith("var(")?!1:nz(e)>n}function is({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:Pd(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:Pd(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:Pd(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][Oh(n,t||"light")];return{color:i,value:l,shade:a,isThemeColor:o,isLight:Pd(l,n.luminanceThreshold),variable:r?`--mantine-color-${i}-${a}`:`--mantine-color-${i}-filled`}}return{color:e,value:e,isThemeColor:o,isLight:Pd(e,n.luminanceThreshold),shade:a,variable:void 0}}function nt(e,n){const t=is({color:e||n.primaryColor,theme:n});return t.variable?`var(${t.variable})`:e}function Hl(e,n){if(e.startsWith("var("))return`color-mix(in srgb, ${e}, black ${n*100}%)`;const{r:t,g:i,b:r,a}=m6(e),o=1-n,l=f=>Math.round(f*o);return`rgba(${l(t)}, ${l(i)}, ${l(r)}, ${a})`}function Y3(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=nt(t.from,n),r=nt(t.to,n);return`linear-gradient(${t.deg}deg, ${i} 0%, ${r} 100%)`}function Is(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}=m6(e);return`rgba(${t}, ${i}, ${r}, ${n})`}const t5=Is,bK=({color:e,theme:n,variant:t,gradient:i,autoContrast:r})=>{const a=is({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:`${he(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:`${he(1)} solid transparent`}:{background:e,hover:Hl(e,.1),color:l,border:`${he(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:`${he(1)} solid transparent`};const l=n.colors[a.color][a.shade];return{background:l,hover:Hl(l,.1),color:`var(--mantine-color-${a.color}-light-color)`,border:`${he(1)} solid transparent`}}return{background:Is(e,.1),hover:Is(e,.12),color:e,border:`${he(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:`${he(1)} solid var(--mantine-color-${e}-outline)`}:{background:"transparent",hover:Is(n.colors[a.color][a.shade],.05),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${he(1)} solid var(--mantine-color-${a.color}-${a.shade})`}:{background:"transparent",hover:Is(e,.05),color:e,border:`${he(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:`${he(1)} solid transparent`};const l=n.colors[a.color][a.shade];return{background:"transparent",hover:Is(l,.12),color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${he(1)} solid transparent`}}return{background:"transparent",hover:Is(e,.12),color:e,border:`${he(1)} solid transparent`}}return t==="transparent"?a.isThemeColor?a.shade===void 0?{background:"transparent",hover:"transparent",color:`var(--mantine-color-${e}-light-color)`,border:`${he(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${he(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:e,border:`${he(1)} solid transparent`}:t==="white"?a.isThemeColor?a.shade===void 0?{background:"var(--mantine-color-white)",hover:Hl(n.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${he(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:Hl(n.white,.01),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${he(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:Hl(n.white,.01),color:e,border:`${he(1)} solid transparent`}:t==="gradient"?{background:Y3(i,n),hover:Y3(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:`${he(1)} solid var(--mantine-color-default-border)`}:{}};function xm({color:e,theme:n,autoContrast:t}){return(typeof t=="boolean"?t:n.autoContrast)&&is({color:e||n.primaryColor,theme:n}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function i5(e,n){return xm({color:e.colors[e.primaryColor][Oh(e,n)],theme:e,autoContrast:null})}function L1(e,n){return typeof e=="boolean"?e:n.autoContrast}const tz=O.createContext(null);function so(){const e=O.use(tz);if(!e)throw new Error("[@mantine/core] MantineProvider was not found in tree");return e}function wK(){return so().cssVariablesResolver}function kK(){return so().classNamesPrefix}function p6(){return so().getStyleNonce}function _K(){return so().withStaticClasses}function xK(){return so().headless}function SK(){var e;return(e=so().stylesTransform)==null?void 0:e.sx}function CK(){var e;return(e=so().stylesTransform)==null?void 0:e.styles}function Sm(){return so().env||"default"}function AK(){return so().deduplicateInlineStyles}function cf(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 OK({manager:e,defaultColorScheme:n,getRootElement:t,forceColorScheme:i}){const r=O.useRef(null),[a,o]=O.useState(()=>e.get(n)),l=i||a,f=O.useCallback(h=>{i||(cf(h,t),o(h),e.set(h))},[e.set,l,i]),c=O.useCallback(()=>{o(n),cf(n,t),e.clear()},[e.clear,n]);return O.useEffect(()=>(e.subscribe(f),e.unsubscribe),[e.subscribe,e.unsubscribe]),ts(()=>{cf(e.get(n),t)},[]),O.useEffect(()=>{var d;if(i)return cf(i,t),()=>{};i===void 0&&cf(a,t),typeof window<"u"&&"matchMedia"in window&&(r.current=window.matchMedia("(prefers-color-scheme: dark)"));const h=p=>{a==="auto"&&cf(p.matches?"dark":"light",t)};return(d=r.current)==null||d.addEventListener("change",h),()=>{var p;return(p=r.current)==null?void 0:p.removeEventListener("change",h)}},[a,i]),{colorScheme:l,setColorScheme:f,clearColorScheme:c}}const EK={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"]},r5="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",v6={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:EK,primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:bK,autoContrast:!1,luminanceThreshold:.3,fontFamily:r5,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:r5,fontWeight:"700",textWrap:"wrap",sizes:{h1:{fontSize:he(34),lineHeight:"1.3"},h2:{fontSize:he(26),lineHeight:"1.35"},h3:{fontSize:he(22),lineHeight:"1.4"},h4:{fontSize:he(18),lineHeight:"1.45"},h5:{fontSize:he(16),lineHeight:"1.5"},h6:{fontSize:he(14),lineHeight:"1.5"}}},fontSizes:{xs:he(12),sm:he(14),md:he(16),lg:he(18),xl:he(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:he(2),sm:he(4),md:he(8),lg:he(16),xl:he(32)},spacing:{xs:he(10),sm:he(12),md:he(16),lg:he(20),xl:he(32)},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},shadows:{xs:`0 ${he(1)} ${he(3)} rgba(0, 0, 0, 0.05), 0 ${he(1)} ${he(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${he(1)} ${he(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${he(10)} ${he(15)} ${he(-5)}, rgba(0, 0, 0, 0.04) 0 ${he(7)} ${he(7)} ${he(-5)}`,md:`0 ${he(1)} ${he(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${he(20)} ${he(25)} ${he(-5)}, rgba(0, 0, 0, 0.04) 0 ${he(10)} ${he(10)} ${he(-5)}`,lg:`0 ${he(1)} ${he(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${he(28)} ${he(23)} ${he(-7)}, rgba(0, 0, 0, 0.04) 0 ${he(12)} ${he(12)} ${he(-7)}`,xl:`0 ${he(1)} ${he(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${he(36)} ${he(28)} ${he(-7)}, rgba(0, 0, 0, 0.04) 0 ${he(17)} ${he(17)} ${he(-7)}`},other:{},components:{}},TK="[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color",a5="[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";function Vw(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function o5(e){if(!(e.primaryColor in e.colors))throw new Error(TK);if(typeof e.primaryShade=="object"&&(!Vw(e.primaryShade.dark)||!Vw(e.primaryShade.light)))throw new Error(a5);if(typeof e.primaryShade=="number"&&!Vw(e.primaryShade))throw new Error(a5)}function MK(e,n){var i;if(!n)return o5(e),e;const t=s6(e,n);return n.fontFamily&&!((i=n.headings)!=null&&i.fontFamily)&&(t.headings.fontFamily=n.fontFamily),o5(t),t}const g6=O.createContext(null),jK=()=>O.use(g6)||v6;function ni(){const e=O.use(g6);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 iz({theme:e,children:n,inherit:t=!0}){const i=jK();return k.jsx(g6,{value:O.useMemo(()=>MK(t?i:v6,e),[e,i,t]),children:n})}iz.displayName="@mantine/core/MantineThemeProvider";function Ww(e){return Object.entries(e).map(([n,t])=>`${n}: ${t};`).join("")}function rz(e,n){const t=n?[n]:[":root",":host"],i=Ww(e.variables),r=i?`${t.join(", ")}{${i}}`:"",a=Ww(e.dark),o=Ww(e.light),l=f=>t.map(c=>c===":host"?`${c}([data-mantine-color-scheme="${f}"])`:`${c}[data-mantine-color-scheme="${f}"]`).join(", ");return`${r} - -${a?`${l("dark")}{${a}}`:""} - -${o?`${l("light")}{${o}}`:""}`}function mv({theme:e,color:n,colorScheme:t,name:i=n,withColorValues:r=!0}){if(!e.colors[n])return{};if(t==="light"){const l=Oh(e,"light"),f={[`--mantine-color-${i}-text`]:`var(--mantine-color-${i}-filled)`,[`--mantine-color-${i}-filled`]:`var(--mantine-color-${i}-${l})`,[`--mantine-color-${i}-filled-hover`]:`var(--mantine-color-${i}-${l===9?8:l+1})`,[`--mantine-color-${i}-light`]:`var(--mantine-color-${i}-1)`,[`--mantine-color-${i}-light-hover`]:`var(--mantine-color-${i}-2)`,[`--mantine-color-${i}-light-color`]:`var(--mantine-color-${i}-9)`,[`--mantine-color-${i}-outline`]:`var(--mantine-color-${i}-${l})`,[`--mantine-color-${i}-outline-hover`]:t5(e.colors[n][l],.05)};return r?{[`--mantine-color-${i}-0`]:e.colors[n][0],[`--mantine-color-${i}-1`]:e.colors[n][1],[`--mantine-color-${i}-2`]:e.colors[n][2],[`--mantine-color-${i}-3`]:e.colors[n][3],[`--mantine-color-${i}-4`]:e.colors[n][4],[`--mantine-color-${i}-5`]:e.colors[n][5],[`--mantine-color-${i}-6`]:e.colors[n][6],[`--mantine-color-${i}-7`]:e.colors[n][7],[`--mantine-color-${i}-8`]:e.colors[n][8],[`--mantine-color-${i}-9`]:e.colors[n][9],...f}:f}const a=Oh(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`]:Hl(e.colors[n][9],.5),[`--mantine-color-${i}-light-hover`]:Hl(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`]:t5(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 DK(e){return!!e&&typeof e=="object"&&"mantine-virtual-color"in e}function Nl(e,n,t){St(n).forEach(i=>Object.assign(e,{[`--mantine-${t}-${i}`]:n[i]}))}const az=e=>{const n=Oh(e,"light"),t=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:he(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":i5(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":i5(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)"}};Nl(i.variables,e.breakpoints,"breakpoint"),Nl(i.variables,e.spacing,"spacing"),Nl(i.variables,e.fontSizes,"font-size"),Nl(i.variables,e.lineHeights,"line-height"),Nl(i.variables,e.shadows,"shadow"),Nl(i.variables,e.radius,"radius"),Nl(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})`}),St(e.colors).forEach(a=>{const o=e.colors[a];if(DK(o)){Object.assign(i.light,mv({theme:e,name:o.name,color:o.light,colorScheme:"light",withColorValues:!0})),Object.assign(i.dark,mv({theme:e,name:o.name,color:o.dark,colorScheme:"dark",withColorValues:!0}));return}o.forEach((l,f)=>{i.variables[`--mantine-color-${a}-${f}`]=l}),Object.assign(i.light,mv({theme:e,color:a,colorScheme:"light",withColorValues:!1})),Object.assign(i.dark,mv({theme:e,color:a,colorScheme:"dark",withColorValues:!1}))});const r=e.headings.sizes;return St(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 RK(){const e=ni(),n=p6(),t=St(e.breakpoints).reduce((i,r)=>{const a=e.breakpoints[r].includes("px"),o=Sh(e.breakpoints[r]);return`${i}@media (max-width: ${a?`${o-.1}px`:sg(o-.1)}) {.mantine-visible-from-${r} {display: none !important;}}@media (min-width: ${a?`${o}px`:sg(o)}) {.mantine-hidden-from-${r} {display: none !important;}}`},"");return k.jsx("style",{"data-mantine-styles":"classes",nonce:n==null?void 0:n(),dangerouslySetInnerHTML:{__html:t}})}function PK({theme:e,generator:n}){const t=az(e),i=n==null?void 0:n(e);return i?s6(t,i):t}const Gw=az(v6);function NK(e){const n={variables:{},light:{},dark:{}};return St(e.variables).forEach(t=>{Gw.variables[t]!==e.variables[t]&&(n.variables[t]=e.variables[t])}),St(e.light).forEach(t=>{Gw.light[t]!==e.light[t]&&(n.light[t]=e.light[t])}),St(e.dark).forEach(t=>{Gw.dark[t]!==e.dark[t]&&(n.dark[t]=e.dark[t])}),n}function $K(e){return rz({variables:{},dark:{"--mantine-color-scheme":"dark"},light:{"--mantine-color-scheme":"light"}},e)}function oz({cssVariablesSelector:e,deduplicateCssVariables:n}){const t=ni(),i=p6(),r=PK({theme:t,generator:wK()}),a=(e===void 0||e===":root"||e===":host")&&n,o=rz(a?NK(r):r,e);return o?k.jsx("style",{"data-mantine-styles":!0,nonce:i==null?void 0:i(),dangerouslySetInnerHTML:{__html:`${o}${a?"":$K(e)}`}}):null}oz.displayName="@mantine/CssVariables";function zK({respectReducedMotion:e,getRootElement:n}){ts(()=>{var t;e&&((t=n())==null||t.setAttribute("data-respect-reduced-motion","true"))},[e])}function sz({theme:e,children:n,getStyleNonce:t,withStaticClasses:i=!0,withGlobalClasses:r=!0,deduplicateCssVariables:a=!0,withCssVariables:o=!0,cssVariablesSelector:l,classNamesPrefix:f="mantine",colorSchemeManager:c=hK(),defaultColorScheme:h="light",getRootElement:d=()=>document.documentElement,cssVariablesResolver:p,forceColorScheme:v,stylesTransform:y,env:b,deduplicateInlineStyles:w=!1}){const{colorScheme:_,setColorScheme:S,clearColorScheme:C}=OK({defaultColorScheme:h,forceColorScheme:v,manager:c,getRootElement:d});return zK({respectReducedMotion:(e==null?void 0:e.respectReducedMotion)||!1,getRootElement:d}),k.jsx(tz,{value:{colorScheme:_,setColorScheme:S,clearColorScheme:C,getRootElement:d,classNamesPrefix:f,getStyleNonce:t,cssVariablesResolver:p,cssVariablesSelector:l??":root",withStaticClasses:i,stylesTransform:y,env:b,deduplicateInlineStyles:w},children:k.jsxs(iz,{theme:e,children:[o&&k.jsx(oz,{cssVariablesSelector:l,deduplicateCssVariables:a}),r&&k.jsx(RK,{}),n]})})}sz.displayName="@mantine/core/MantineProvider";function ge(e,n,t){var o;const i=ni(),r=(o=i.components[e])==null?void 0:o.defaultProps,a=typeof r=="function"?r(i):r;return{...n,...a,...pu(t)}}function Ni({classNames:e,styles:n,props:t,stylesCtx:i}){const r=ni();return{resolvedClassNames:e===void 0?void 0:Ah({theme:r,classNames:e,props:t,stylesCtx:i||void 0}),resolvedStyles:n===void 0?void 0:fg({theme:r,styles:n,props:t,stylesCtx:i||void 0})}}const LK={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function IK({theme:e,options:n,unstyled:t}){return cn((n==null?void 0:n.focusable)&&!t&&(e.focusClassName||LK[e.focusRing]),(n==null?void 0:n.active)&&!t&&e.activeClassName)}function BK({selector:e,stylesCtx:n,options:t,props:i,theme:r}){return Ah({theme:r,classNames:t==null?void 0:t.classNames,props:(t==null?void 0:t.props)||i,stylesCtx:n})[e]}function FK({selector:e,stylesCtx:n,theme:t,classNames:i,props:r}){return Ah({theme:t,classNames:i,props:r,stylesCtx:n})[e]}function qK({rootSelector:e,selector:n,className:t}){return e===n?t:void 0}function HK({selector:e,classes:n,unstyled:t}){return t?void 0:n[e]}function UK({themeName:e,classNamesPrefix:n,selector:t,withStaticClass:i}){return i===!1?[]:e.map(r=>`${n}-${r}-${t}`)}function VK({options:e,classes:n,selector:t,unstyled:i}){return e!=null&&e.variant&&!i?n[`${t}--${e.variant}`]:void 0}function WK({theme:e,options:n,themeName:t,selector:i,classNamesPrefix:r,resolvedClassNames:a,resolvedThemeClassNames:o,classes:l,unstyled:f,className:c,rootSelector:h,props:d,stylesCtx:p,withStaticClasses:v,headless:y,transformedStyles:b}){return cn(IK({theme:e,options:n,unstyled:f||y}),o.map(w=>w[i]),VK({options:n,classes:l,selector:i,unstyled:f||y}),a[i],FK({selector:i,stylesCtx:p,theme:e,classNames:b,props:d}),BK({selector:i,stylesCtx:p,options:n,props:d,theme:e}),qK({rootSelector:h,selector:i,className:c}),HK({selector:i,classes:l,unstyled:f||y}),v&&!y&&UK({themeName:t,classNamesPrefix:r,selector:i,withStaticClass:n==null?void 0:n.withStaticClass}),n==null?void 0:n.className)}function y6({style:e,theme:n}){return Array.isArray(e)?e.reduce((t,i)=>({...t,...y6({style:i,theme:n})}),{}):typeof e=="function"?e(n):e??{}}function GK({theme:e,selector:n,options:t,props:i,stylesCtx:r,rootSelector:a,withStylesTransform:o,resolvedStyles:l,resolvedThemeStyles:f,resolvedVars:c,resolvedRootStyle:h}){return{...f[n],...l[n],...!o&&fg({theme:e,styles:t==null?void 0:t.styles,props:(t==null?void 0:t.props)||i,stylesCtx:r})[n],...c[n],...a===n?h:null,...y6({style:t==null?void 0:t.style,theme:e})}}function YK(e){return e.reduce((n,t)=>(t&&Object.keys(t).forEach(i=>{n[i]={...n[i],...pu(t[i])}}),n),{})}function KK({props:e,stylesCtx:n,themeName:t,theme:i}){var o;const r=(o=CK())==null?void 0:o();return{getTransformedStyles:l=>r?[...l.map(f=>r(f,{props:e,theme:i,ctx:n})),...t.map(f=>{var c;return r((c=i.components[f])==null?void 0:c.styles,{props:e,theme:i,ctx:n})})].filter(Boolean):[],withStylesTransform:!!r}}function Ge({name:e,classes:n,props:t,stylesCtx:i,className:r,style:a,rootSelector:o="root",unstyled:l,classNames:f,styles:c,vars:h,varsResolver:d,attributes:p}){var R;const v=ni(),y=kK(),b=_K(),w=xK(),_=(Array.isArray(e)?e:[e]).filter(L=>L),{withStylesTransform:S,getTransformedStyles:C}=KK({props:t,stylesCtx:i,themeName:_,theme:v}),E=Ah({theme:v,classNames:f,props:t,stylesCtx:i}),A=_.map(L=>{var B;return Ah({theme:v,classNames:(B=v.components[L])==null?void 0:B.classNames,props:t,stylesCtx:i})}),T=S?{}:fg({theme:v,styles:c,props:t,stylesCtx:i}),j={};if(!S)for(const L of _){const B=fg({theme:v,styles:(R=v.components[L])==null?void 0:R.styles,props:t,stylesCtx:i});for(const G of Object.keys(B))j[G]={...j[G],...B[G]}}const N=YK([w?{}:d==null?void 0:d(v,t,i),..._.map(L=>{var B,G,H;return(H=(G=(B=v.components)==null?void 0:B[L])==null?void 0:G.vars)==null?void 0:H.call(G,v,t,i)}),h==null?void 0:h(v,t,i)]),q=y6({style:a,theme:v});return(L,B)=>({...p==null?void 0:p[L],className:WK({theme:v,options:B,themeName:_,selector:L,classNamesPrefix:y,resolvedClassNames:E,resolvedThemeClassNames:A,classes:n,unstyled:l,className:r,rootSelector:o,props:t,stylesCtx:i,withStaticClasses:b,headless:w,transformedStyles:C([B==null?void 0:B.styles,c])}),style:GK({theme:v,selector:L,options:B,props:t,stylesCtx:i,rootSelector:o,withStylesTransform:S,resolvedStyles:T,resolvedThemeStyles:j,resolvedVars:N,resolvedRootStyle:q})})}function fh(e){return St(e).reduce((n,t)=>e[t]!==void 0?`${n}${$Y(t)}:${e[t]};`:n,"").trim()}function XK({selector:e,styles:n,media:t,container:i}){const r=n?fh(n):"",a=Array.isArray(t)?t.map(l=>`@media${l.query}{${e}{${fh(l.styles)}}}`):[],o=Array.isArray(i)?i.map(l=>`@container ${l.query}{${e}{${fh(l.styles)}}}`):[];return`${r?`${e}{${r}}`:""}${a.join("")}${o.join("")}`.trim()}function ZK(e){let n=5381;for(let t=0;t>>0).toString(36)}function vc({deduplicate:e,...n}){const t=p6(),i=XK(n);return e?k.jsx("style",{href:`mantine-${ZK(i)}`,precedence:"mantine",nonce:t==null?void 0:t(),children:i}):k.jsx("style",{"data-mantine-styles":"inline",nonce:t==null?void 0:t(),dangerouslySetInnerHTML:{__html:i}})}function QK(e){let n=5381;for(let t=0;t>>0).toString(36)}function JK(e,n){return`__mdi__-${QK(`${e?fh(e):""}|${Array.isArray(n)?n.map(t=>`${t.query}:${fh(t.styles)}`).join("|"):""}`)}`}function gu(e){const{m:n,mx:t,my:i,mt:r,mb:a,ml:o,mr:l,me:f,ms:c,mis:h,mie:d,p,px:v,py:y,pt:b,pb:w,pl:_,pr:S,pe:C,ps:E,pis:A,pie:T,bd:j,bdrs:N,bg:q,c:R,opacity:L,ff:B,fz:G,fw:H,lts:U,ta:P,lh:z,fs:F,tt:Y,td:D,w:V,miw:W,maw:$,h:X,mih:te,mah:ae,bgsz:le,bgp:ye,bgr:oe,bga:ue,pos:ke,top:ie,left:Re,bottom:pe,right:Ce,inset:De,display:be,flex:_e,hiddenFrom:Me,visibleFrom:Be,lightHidden:Ve,darkHidden:He,sx:We,...Ye}=e;return{styleProps:pu({m:n,mx:t,my:i,mt:r,mb:a,ml:o,mr:l,me:f,ms:c,mis:h,mie:d,p,px:v,py:y,pt:b,pb:w,pl:_,pr:S,pis:A,pie:T,pe:C,ps:E,bd:j,bg:q,c:R,opacity:L,ff:B,fz:G,fw:H,lts:U,ta:P,lh:z,fs:F,tt:Y,td:D,w:V,miw:W,maw:$,h:X,mih:te,mah:ae,bgsz:le,bgp:ye,bgr:oe,bga:ue,pos:ke,top:ie,left:Re,bottom:pe,right:Ce,inset:De,display:be,flex:_e,bdrs:N,hiddenFrom:Me,visibleFrom:Be,lightHidden:Ve,darkHidden:He,sx:We}),rest:Ye}}const eX={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 b6(e,n){const t=is({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 nX(e,n){const t=is({color:e,theme:n});return t.isThemeColor&&t.shade===void 0?`var(--mantine-color-${t.color}-text)`:b6(e,n)}function tX(e,n){if(typeof e=="number")return he(e);if(typeof e=="string"){const[t,i,...r]=e.split(" ").filter(o=>o.trim()!=="");let a=`${he(t)}`;return i&&(a+=` ${i}`),r.length>0&&(a+=` ${b6(r.join(" "),n)}`),a.trim()}return e}const s5={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 iX(e){return typeof e=="string"&&e in s5?s5[e]:e}const rX=["h1","h2","h3","h4","h5","h6"];function aX(e,n){return typeof e=="string"&&e in n.fontSizes?`var(--mantine-font-size-${e})`:typeof e=="string"&&rX.includes(e)?`var(--mantine-${e}-font-size)`:typeof e=="number"||typeof e=="string"?he(e):e}function oX(e){return e}const sX=["h1","h2","h3","h4","h5","h6"];function lX(e,n){return typeof e=="string"&&e in n.lineHeights?`var(--mantine-line-height-${e})`:typeof e=="string"&&sX.includes(e)?`var(--mantine-${e}-line-height)`:e}function uX(e,n){return typeof e=="string"&&e in n.radius?`var(--mantine-radius-${e})`:typeof e=="number"||typeof e=="string"?he(e):e}function fX(e){return typeof e=="number"?he(e):e}function cX(e,n){if(typeof e=="number")return he(e);if(typeof e=="string"){const t=e.replace("-","");if(!(t in n.spacing))return he(e);const i=`--mantine-spacing-${t}`;return e.startsWith("-")?`calc(var(${i}) * -1)`:`var(${i})`}return e}const Yw={color:b6,textColor:nX,fontSize:aX,spacing:cX,radius:uX,identity:oX,size:fX,lineHeight:lX,fontFamily:iX,border:tX};function l5(e){return e.replace("(min-width: ","").replace("em)","")}function dX({media:e,...n}){const t=Object.keys(e).sort((i,r)=>Number(l5(i))-Number(l5(r))).map(i=>({query:i,styles:e[i]}));return{...n,media:t}}function hX(e){if(typeof e!="object"||e===null)return!1;const n=Object.keys(e);return!(n.length===1&&n[0]==="base")}function mX(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function pX(e){return typeof e=="object"&&e!==null?St(e).filter(n=>n!=="base"):[]}function vX(e,n){return typeof e=="object"&&e!==null&&n in e?e[n]:e}function gX({styleProps:e,data:n,theme:t}){return dX(St(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=mX(e[r]);if(!hX(e[r]))return o.forEach(c=>{i.inlineStyles[c]=Yw[a.type](l,t)}),i;i.hasResponsiveStyles=!0;const f=pX(e[r]);return o.forEach(c=>{l!=null&&(i.styles[c]=Yw[a.type](l,t)),f.forEach(h=>{const d=`(min-width: ${t.breakpoints[h]})`;i.media[d]={...i.media[d],[c]:Yw[a.type](vX(e[r],h),t)}})}),i},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function I1(){return`__m__-${O.useId().replace(/[:«»]/g,"")}`}function lz(e,n){return Array.isArray(e)?[...e].reduce((t,i)=>({...t,...lz(i,n)}),{}):typeof e=="function"?e(n):e??{}}function yX(e){return e}const bX=yX;function uz(e){return e}function Pe(e){const n=e;return n.extend=uz,n.withProps=t=>{const i=r=>k.jsx(n,{...t,...r});return i.extend=n.extend,i.displayName=`WithProps(${n.displayName})`,i},n}function B1(e){return Pe(e)}function $i(e){const n=e;return n.withProps=t=>{const i=r=>k.jsx(n,{...t,...r});return i.extend=n.extend,i.displayName=`WithProps(${n.displayName})`,i},n.extend=uz,n}function fz(e){return`data-${(e.startsWith("data-")?e.slice(5):e).replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}`}function wX(e){return Object.keys(e).reduce((n,t)=>{const i=e[t];return i===void 0||i===""||i===!1||i===null||(n[fz(t)]=e[t]),n},{})}function cz(e){return e?typeof e=="string"?{[fz(e)]:!0}:Array.isArray(e)?[...e].reduce((n,t)=>({...n,...cz(t)}),{}):wX(e):null}function K3(e,n){return Array.isArray(e)?[...e].reduce((t,i)=>({...t,...K3(i,n)}),{}):typeof e=="function"?e(n):e??{}}function kX({theme:e,style:n,vars:t,styleProps:i}){const r=K3(n,e),a=K3(t,e);return{...r,...a,...i}}function dz({component:e,style:n,__vars:t,className:i,variant:r,mod:a,size:o,hiddenFrom:l,visibleFrom:f,lightHidden:c,darkHidden:h,renderRoot:d,__size:p,ref:v,...y}){var q,R;const b=ni(),w=e||"div",{styleProps:_,rest:S}=gu(y),C=(R=(q=SK())==null?void 0:q())==null?void 0:R(_.sx),E=I1(),A=gX({styleProps:_,theme:b,data:eX}),T=AK(),j=T&&A.hasResponsiveStyles?JK(A.styles,A.media):E,N={ref:v,style:kX({theme:b,style:n,vars:t,styleProps:A.inlineStyles}),className:cn(i,C,{[j]:A.hasResponsiveStyles,"mantine-light-hidden":c,"mantine-dark-hidden":h,[`mantine-hidden-from-${l}`]:l,[`mantine-visible-from-${f}`]:f}),"data-variant":r,"data-size":H$(o)?void 0:o||void 0,size:p,...cz(a),...S};return k.jsxs(k.Fragment,{children:[A.hasResponsiveStyles&&k.jsx(vc,{selector:`.${j}`,styles:A.styles,media:A.media,deduplicate:T}),typeof d=="function"?d(N):k.jsx(w,{...N})]})}dz.displayName="@mantine/core/Box";const we=bX(dz),_X=O.createContext({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function yu(){return O.use(_X)}const[xX,ma]=da("ScrollArea.Root component was not found in tree");function Js(e,n){const t=O.useEffectEvent(n);ts(()=>{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 SX(e){const{style:n,...t}=e,i=ma(),[r,a]=O.useState(0),[o,l]=O.useState(0),f=!!(r&&o);return Js(i.scrollbarX,()=>{var h;const c=((h=i.scrollbarX)==null?void 0:h.offsetHeight)||0;i.onCornerHeightChange(c),l(c)}),Js(i.scrollbarY,()=>{var h;const c=((h=i.scrollbarY)==null?void 0:h.offsetWidth)||0;i.onCornerWidthChange(c),a(c)}),f?k.jsx("div",{...t,style:{...n,width:r,height:o}}):null}function CX(e){const n=ma(),t=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&t?k.jsx(SX,{...e}):null}const AX={scrollHideDelay:1e3,type:"hover"};function hz(e){const{type:n,scrollHideDelay:t,scrollbars:i,getStyles:r,ref:a,...o}=ge("ScrollAreaRoot",AX,e),[l,f]=O.useState(null),[c,h]=O.useState(null),[d,p]=O.useState(null),[v,y]=O.useState(null),[b,w]=O.useState(null),[_,S]=O.useState(0),[C,E]=O.useState(0),[A,T]=O.useState(!1),[j,N]=O.useState(!1),q=zt(a,R=>f(R));return k.jsx(xX,{value:{type:n,scrollHideDelay:t,scrollArea:l,viewport:c,onViewportChange:h,content:d,onContentChange:p,scrollbarX:v,onScrollbarXChange:y,scrollbarXEnabled:A,onScrollbarXEnabledChange:T,scrollbarY:b,onScrollbarYChange:w,scrollbarYEnabled:j,onScrollbarYEnabledChange:N,onCornerWidthChange:S,onCornerHeightChange:E,getStyles:r},children:k.jsx(we,{...o,ref:q,__vars:{"--sa-corner-width":i!=="xy"?"0px":`${_}px`,"--sa-corner-height":i!=="xy"?"0px":`${C}px`}})})}hz.displayName="@mantine/core/ScrollAreaRoot";function mz(e,n){const t=e/n;return Number.isNaN(t)?0:t}function F1(e){const n=mz(e.viewport,e.content),t=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=(e.scrollbar.size-t)*n;return Math.max(i,18)}function pz(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 OX(e,[n,t]){return Math.min(t,Math.max(n,e))}function u5(e,n,t="ltr"){const i=F1(n),r=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,a=n.scrollbar.size-r,o=n.content-n.viewport,l=a-i,f=OX(e,t==="ltr"?[0,o]:[o*-1,0]);return pz([0,o],[0,l])(f)}function EX(e,n,t,i="ltr"){const r=F1(t),a=r/2,o=n||a,l=r-o,f=t.scrollbar.paddingStart+o,c=t.scrollbar.size-t.scrollbar.paddingEnd-l,h=t.content-t.viewport,d=i==="ltr"?[0,h]:[h*-1,0];return pz([f,c],d)(e)}function vz(e,n){return e>0&&e{e==null||e(i),(t===!1||!i.defaultPrevented)&&(n==null||n(i))}}const[TX,gz]=da("ScrollAreaScrollbar was not found in tree");function yz(e){const{sizes:n,hasThumb:t,onThumbChange:i,onThumbPointerUp:r,onThumbPointerDown:a,onThumbPositionChange:o,onDragScroll:l,onWheelScroll:f,onResize:c,ref:h,...d}=e,p=ma(),[v,y]=O.useState(null),b=zt(h,N=>y(N)),w=O.useRef(null),_=O.useRef(""),{viewport:S}=p,C=n.content-n.viewport,E=O.useEffectEvent(f),A=Jd(o),T=$1(c,10),j=N=>{w.current&&l({x:N.clientX-w.current.left,y:N.clientY-w.current.top})};return O.useEffect(()=>{const N=q=>{const R=q.target;v!=null&&v.contains(R)&&E(q,C)};return document.addEventListener("wheel",N,{passive:!1}),()=>document.removeEventListener("wheel",N,{passive:!1})},[S,v,C]),O.useEffect(A,[n,A]),Js(v,T),Js(p.content,T),k.jsx(TX,{value:{scrollbar:v,hasThumb:t,onThumbChange:Jd(i),onThumbPointerUp:Jd(r),onThumbPositionChange:A,onThumbPointerDown:Jd(a)},children:k.jsx("div",{...d,ref:b,"data-mantine-scrollbar":!0,style:{position:"absolute",...d.style},onPointerDown:eu(e.onPointerDown,N=>{N.preventDefault(),N.button===0&&(N.target.setPointerCapture(N.pointerId),w.current=v.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",j(N))}),onPointerMove:eu(e.onPointerMove,j),onPointerUp:eu(e.onPointerUp,N=>{const q=N.target;q.hasPointerCapture(N.pointerId)&&(N.preventDefault(),q.releasePointerCapture(N.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=_.current,w.current=null}})})}const bz=e=>{const{sizes:n,onSizesChange:t,style:i,ref:r,...a}=e,o=ma(),[l,f]=O.useState(),c=O.useRef(null),h=zt(r,c,o.onScrollbarXChange);return O.useEffect(()=>{c.current&&f(getComputedStyle(c.current))},[c]),k.jsx(yz,{"data-orientation":"horizontal",...a,ref:h,sizes:n,style:{...i,"--sa-thumb-width":`${F1(n)}px`},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,p)=>{if(o.viewport){const v=o.viewport.scrollLeft+d.deltaX;e.onWheelScroll(v),vz(v,p)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&l&&t({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:cg(l.paddingLeft),paddingEnd:cg(l.paddingRight)}})}})};bz.displayName="@mantine/core/ScrollAreaScrollbarX";function wz(e){const{sizes:n,onSizesChange:t,style:i,ref:r,...a}=e,o=ma(),[l,f]=O.useState(),c=O.useRef(null),h=zt(r,c,o.onScrollbarYChange);return O.useEffect(()=>{c.current&&f(window.getComputedStyle(c.current))},[]),k.jsx(yz,{...a,"data-orientation":"vertical",ref:h,sizes:n,style:{"--sa-thumb-height":`${F1(n)}px`,...i},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,p)=>{if(o.viewport){const v=o.viewport.scrollTop+d.deltaY;e.onWheelScroll(v),vz(v,p)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&l&&t({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:cg(l.paddingTop),paddingEnd:cg(l.paddingBottom)}})}})}wz.displayName="@mantine/core/ScrollAreaScrollbarY";function q1(e){const{orientation:n="vertical",...t}=e,{dir:i}=yu(),r=ma(),a=O.useRef(null),o=O.useRef(0),[l,f]=O.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=mz(l.viewport,l.content),h={...t,sizes:l,onSizesChange:f,hasThumb:c>0&&c<1,onThumbChange:p=>{a.current=p},onThumbPointerUp:()=>{o.current=0},onThumbPointerDown:p=>{o.current=p}},d=(p,v)=>EX(p,o.current,l,v);return n==="horizontal"?k.jsx(bz,{...h,onThumbPositionChange:()=>{if(r.viewport&&a.current){const p=r.viewport.scrollLeft,v=u5(p,l,i);a.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:p=>{r.viewport&&(r.viewport.scrollLeft=p)},onDragScroll:p=>{r.viewport&&(r.viewport.scrollLeft=d(p,i))}}):n==="vertical"?k.jsx(wz,{...h,onThumbPositionChange:()=>{if(r.viewport&&a.current){const p=r.viewport.scrollTop,v=u5(p,l);l.scrollbar.size===0?a.current.style.setProperty("--thumb-opacity","0"):a.current.style.setProperty("--thumb-opacity","1"),a.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:p=>{r.viewport&&(r.viewport.scrollTop=p)},onDragScroll:p=>{r.viewport&&(r.viewport.scrollTop=d(p))}}):null}q1.displayName="@mantine/core/ScrollAreaScrollbarVisible";function w6(e){const n=ma(),{forceMount:t,...i}=e,[r,a]=O.useState(!1),o=e.orientation==="horizontal",l=$1(()=>{if(n.viewport){const f=n.viewport.offsetWidth{const{scrollArea:o}=i;let l=0;if(o){const f=()=>{window.clearTimeout(l),a(!0)},c=()=>{l=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return o.addEventListener("pointerenter",f),o.addEventListener("pointerleave",c),()=>{window.clearTimeout(l),o.removeEventListener("pointerenter",f),o.removeEventListener("pointerleave",c)}}},[i.scrollArea,i.scrollHideDelay]),n||r?k.jsx(w6,{"data-state":r?"visible":"hidden",...t}):null}kz.displayName="@mantine/core/ScrollAreaScrollbarHover";function MX(e){const{forceMount:n,...t}=e,i=ma(),r=e.orientation==="horizontal",[a,o]=O.useState("hidden"),l=$1(()=>o("idle"),100);return O.useEffect(()=>{if(a==="idle"){const f=window.setTimeout(()=>o("hidden"),i.scrollHideDelay);return()=>window.clearTimeout(f)}},[a,i.scrollHideDelay]),O.useEffect(()=>{const{viewport:f}=i,c=r?"scrollLeft":"scrollTop";if(f){let h=f[c];const d=()=>{const p=f[c];h!==p&&(o("scrolling"),l()),h=p};return f.addEventListener("scroll",d),()=>f.removeEventListener("scroll",d)}},[i.viewport,r,l]),n||a!=="hidden"?k.jsx(q1,{"data-state":a==="hidden"?"hidden":"visible",...t,onPointerEnter:eu(e.onPointerEnter,()=>o("interacting")),onPointerLeave:eu(e.onPointerLeave,()=>o("idle"))}):null}function X3(e){const{forceMount:n,...t}=e,i=ma(),{onScrollbarXEnabledChange:r,onScrollbarYEnabledChange:a}=i,o=e.orientation==="horizontal";return O.useEffect(()=>(o?r(!0):a(!0),()=>{o?r(!1):a(!1)}),[o,r,a]),i.type==="hover"?k.jsx(kz,{...t,forceMount:n}):i.type==="scroll"?k.jsx(MX,{...t,forceMount:n}):i.type==="auto"?k.jsx(w6,{...t,forceMount:n}):i.type==="always"?k.jsx(q1,{...t}):null}X3.displayName="@mantine/core/ScrollAreaScrollbar";function jX(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 _z(e){const{style:n,ref:t,...i}=e,r=ma(),a=gz(),{onThumbPositionChange:o}=a,l=zt(t,h=>a.onThumbChange(h)),f=O.useRef(void 0),c=$1(()=>{f.current&&(f.current(),f.current=void 0)},100);return O.useEffect(()=>{const{viewport:h}=r;if(h){const d=()=>{c(),f.current||(f.current=jX(h,o),o())};return o(),h.addEventListener("scroll",d),()=>h.removeEventListener("scroll",d)}},[r.viewport,c,o]),k.jsx("div",{"data-state":a.hasThumb?"visible":"hidden",...i,ref:l,style:{width:"var(--sa-thumb-width)",height:"var(--sa-thumb-height)",...n},onPointerDownCapture:eu(e.onPointerDownCapture,h=>{const d=h.target.getBoundingClientRect(),p=h.clientX-d.left,v=h.clientY-d.top;a.onThumbPointerDown({x:p,y:v})}),onPointerUp:eu(e.onPointerUp,a.onThumbPointerUp)})}_z.displayName="@mantine/core/ScrollAreaThumb";function Z3(e){const{forceMount:n,...t}=e,i=gz();return n||i.hasThumb?k.jsx(_z,{...t}):null}Z3.displayName="@mantine/core/ScrollAreaThumb";function xz({children:e,style:n,ref:t,onWheel:i,...r}){const a=ma(),o=zt(t,a.onViewportChange),l=f=>{if(i==null||i(f),a.scrollbarXEnabled&&a.viewport&&f.shiftKey){const{scrollTop:c,scrollHeight:h,clientHeight:d,scrollWidth:p,clientWidth:v}=a.viewport,y=c<1,b=c>=h-d-1;p>v&&(y||b)&&f.stopPropagation()}};return k.jsx(we,{...r,ref:o,onWheel:l,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...n},children:k.jsx("div",{...a.getStyles("content"),ref:a.onContentChange,children:e})})}xz.displayName="@mantine/core/ScrollAreaViewport";var k6={root:"m_d57069b5",content:"m_b1336c6",viewport:"m_c0783ff9",viewportInner:"m_f8f631dd",scrollbar:"m_c44ba933",thumb:"m_d8b5e363",corner:"m_21657268"};function H1(){return typeof window<"u"}function gc(e){return Sz(e)?(e.nodeName||"").toLowerCase():"#document"}function gr(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function lo(e){var n;return(n=(Sz(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function Sz(e){return H1()?e instanceof Node||e instanceof gr(e).Node:!1}function Pt(e){return H1()?e instanceof Element||e instanceof gr(e).Element:!1}function pa(e){return H1()?e instanceof HTMLElement||e instanceof gr(e).HTMLElement:!1}function Q3(e){return!H1()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof gr(e).ShadowRoot}function Cm(e){const{overflow:n,overflowX:t,overflowY:i,display:r}=fa(e);return/auto|scroll|overlay|hidden|clip/.test(n+i+t)&&r!=="inline"&&r!=="contents"}function DX(e){return/^(table|td|th)$/.test(gc(e))}function U1(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const RX=/transform|translate|scale|rotate|perspective|filter/,PX=/paint|layout|strict|content/,$l=e=>!!e&&e!=="none";let Kw;function _6(e){const n=Pt(e)?fa(e):e;return $l(n.transform)||$l(n.translate)||$l(n.scale)||$l(n.rotate)||$l(n.perspective)||!V1()&&($l(n.backdropFilter)||$l(n.filter))||RX.test(n.willChange||"")||PX.test(n.contain||"")}function NX(e){let n=Ko(e);for(;pa(n)&&!qo(n);){if(_6(n))return n;if(U1(n))return null;n=Ko(n)}return null}function V1(){return Kw==null&&(Kw=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Kw}function qo(e){return/^(html|body|#document)$/.test(gc(e))}function fa(e){return gr(e).getComputedStyle(e)}function W1(e){return Pt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ko(e){if(gc(e)==="html")return e;const n=e.assignedSlot||e.parentNode||Q3(e)&&e.host||lo(e);return Q3(n)?n.host:n}function Cz(e){const n=Ko(e);return qo(n)?e.ownerDocument?e.ownerDocument.body:e.body:pa(n)&&Cm(n)?n:Cz(n)}function Ho(e,n,t){var i;n===void 0&&(n=[]),t===void 0&&(t=!0);const r=Cz(e),a=r===((i=e.ownerDocument)==null?void 0:i.body),o=gr(r);if(a){const l=J3(o);return n.concat(o,o.visualViewport||[],Cm(r)?r:[],l&&t?Ho(l):[])}else return n.concat(r,Ho(r,[],t))}function J3(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const $X=["top","right","bottom","left"],Da=Math.min,Fi=Math.max,dg=Math.round,pv=Math.floor,Xa=e=>({x:e,y:e}),zX={left:"right",right:"left",bottom:"top",top:"bottom"};function eS(e,n,t){return Fi(e,Da(n,t))}function to(e,n){return typeof e=="function"?e(n):e}function Ra(e){return e.split("-")[0]}function yc(e){return e.split("-")[1]}function x6(e){return e==="x"?"y":"x"}function S6(e){return e==="y"?"height":"width"}function Ea(e){const n=e[0];return n==="t"||n==="b"?"y":"x"}function C6(e){return x6(Ea(e))}function LX(e,n,t){t===void 0&&(t=!1);const i=yc(e),r=C6(e),a=S6(r);let o=r==="x"?i===(t?"end":"start")?"right":"left":i==="start"?"bottom":"top";return n.reference[a]>n.floating[a]&&(o=hg(o)),[o,hg(o)]}function IX(e){const n=hg(e);return[nS(e),n,nS(n)]}function nS(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const f5=["left","right"],c5=["right","left"],BX=["top","bottom"],FX=["bottom","top"];function qX(e,n,t){switch(e){case"top":case"bottom":return t?n?c5:f5:n?f5:c5;case"left":case"right":return n?BX:FX;default:return[]}}function HX(e,n,t,i){const r=yc(e);let a=qX(Ra(e),t==="start",i);return r&&(a=a.map(o=>o+"-"+r),n&&(a=a.concat(a.map(nS)))),a}function hg(e){const n=Ra(e);return zX[n]+e.slice(n.length)}function UX(e){return{top:0,right:0,bottom:0,left:0,...e}}function A6(e){return typeof e!="number"?UX(e):{top:e,right:e,bottom:e,left:e}}function If(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 VX(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function WX(){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 GX(){return/apple/i.test(navigator.vendor)}function YX(){return VX().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function KX(){return WX().includes("jsdom/")}const d5="data-floating-ui-focusable",XX="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function h5(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 Eh(e,n){if(!e||!n)return!1;const t=n.getRootNode==null?void 0:n.getRootNode();if(e.contains(n))return!0;if(t&&Q3(t)){let i=n;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function xf(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Xw(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 ZX(e){return e.matches("html,body")}function Vl(e){return(e==null?void 0:e.ownerDocument)||document}function QX(e){return pa(e)&&e.matches(XX)}function JX(e){if(!e||KX())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function eZ(e){return e?e.hasAttribute(d5)?e:e.querySelector("["+d5+"]")||e:null}function Gv(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,...Gv(e,r.id,t)])}function nZ(e){return"nativeEvent"in e}function tS(e,n){const t=["mouse","pen"];return t.push("",void 0),t.includes(e)}var tZ=typeof document<"u",iZ=function(){},Za=tZ?O.useLayoutEffect:iZ;const rZ={...U$};function vv(e){const n=O.useRef(e);return Za(()=>{n.current=e}),n}const aZ=rZ.useInsertionEffect,oZ=aZ||(e=>e());function Wa(e){const n=O.useRef(()=>{});return oZ(()=>{n.current=e}),O.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:sZ},f=await(o.isRTL==null?void 0:o.isRTL(n));let c=await o.getElementRects({reference:e,floating:n,strategy:r}),{x:h,y:d}=m5(c,i,f),p=i,v=0;const y={};for(let b=0;b({name:"arrow",options:e,async fn(n){const{x:t,y:i,placement:r,rects:a,platform:o,elements:l,middlewareData:f}=n,{element:c,padding:h=0}=to(e,n)||{};if(c==null)return{};const d=A6(h),p={x:t,y:i},v=C6(r),y=S6(v),b=await o.getDimensions(c),w=v==="y",_=w?"top":"left",S=w?"bottom":"right",C=w?"clientHeight":"clientWidth",E=a.reference[y]+a.reference[v]-p[v]-a.floating[y],A=p[v]-a.reference[v],T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let j=T?T[C]:0;(!j||!await(o.isElement==null?void 0:o.isElement(T)))&&(j=l.floating[C]||a.floating[y]);const N=E/2-A/2,q=j/2-b[y]/2-1,R=Da(d[_],q),L=Da(d[S],q),B=R,G=j-b[y]-L,H=j/2-b[y]/2+N,U=eS(B,H,G),P=!f.arrow&&yc(r)!=null&&H!==U&&a.reference[y]/2-(HH<=0)){var L,B;const H=(((L=a.flip)==null?void 0:L.index)||0)+1,U=j[H];if(U&&(!(d==="alignment"?S!==Ea(U):!1)||R.every(F=>Ea(F.placement)===S?F.overflows[0]>0:!0)))return{data:{index:H,overflows:R},reset:{placement:U}};let P=(B=R.filter(z=>z.overflows[0]<=0).sort((z,F)=>z.overflows[1]-F.overflows[1])[0])==null?void 0:B.placement;if(!P)switch(v){case"bestFit":{var G;const z=(G=R.filter(F=>{if(T){const Y=Ea(F.placement);return Y===S||Y==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(Y=>Y>0).reduce((Y,D)=>Y+D,0)]).sort((F,Y)=>F[1]-Y[1])[0])==null?void 0:G[0];z&&(P=z);break}case"initialPlacement":P=l;break}if(r!==P)return{reset:{placement:P}}}return{}}}};function p5(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function v5(e){return $X.some(n=>e[n]>=0)}const dZ=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:t,platform:i}=n,{strategy:r="referenceHidden",...a}=to(e,n);switch(r){case"referenceHidden":{const o=await i.detectOverflow(n,{...a,elementContext:"reference"}),l=p5(o,t.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:v5(l)}}}case"escaped":{const o=await i.detectOverflow(n,{...a,altBoundary:!0}),l=p5(o,t.floating);return{data:{escapedOffsets:l,escaped:v5(l)}}}default:return{}}}}};function Az(e){const n=Da(...e.map(a=>a.left)),t=Da(...e.map(a=>a.top)),i=Fi(...e.map(a=>a.right)),r=Fi(...e.map(a=>a.bottom));return{x:n,y:t,width:i-n,height:r-t}}function hZ(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=>If(Az(r)))}const mZ=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(n){const{placement:t,elements:i,rects:r,platform:a,strategy:o}=n,{padding:l=2,x:f,y:c}=to(e,n),h=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(i.reference))||[]),d=hZ(h),p=If(Az(h)),v=A6(l);function y(){if(d.length===2&&d[0].left>d[1].right&&f!=null&&c!=null)return d.find(w=>f>w.left-v.left&&fw.top-v.top&&c=2){if(Ea(t)==="y"){const R=d[0],L=d[d.length-1],B=Ra(t)==="top",G=R.top,H=L.bottom,U=B?R.left:L.left,P=B?R.right:L.right,z=P-U,F=H-G;return{top:G,bottom:H,left:U,right:P,width:z,height:F,x:U,y:G}}const w=Ra(t)==="left",_=Fi(...d.map(R=>R.right)),S=Da(...d.map(R=>R.left)),C=d.filter(R=>w?R.left===S:R.right===_),E=C[0].top,A=C[C.length-1].bottom,T=S,j=_,N=j-T,q=A-E;return{top:E,bottom:A,left:T,right:j,width:N,height:q,x:T,y:E}}return p}const b=await a.getElementRects({reference:{getBoundingClientRect:y},floating:i.floating,strategy:o});return r.reference.x!==b.reference.x||r.reference.y!==b.reference.y||r.reference.width!==b.reference.width||r.reference.height!==b.reference.height?{reset:{rects:b}}:{}}}},Oz=new Set(["left","top"]);async function pZ(e,n){const{placement:t,platform:i,elements:r}=e,a=await(i.isRTL==null?void 0:i.isRTL(r.floating)),o=Ra(t),l=yc(t),f=Ea(t)==="y",c=Oz.has(o)?-1:1,h=a&&f?-1:1,d=to(n,e);let{mainAxis:p,crossAxis:v,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof y=="number"&&(v=l==="end"?y*-1:y),f?{x:v*h,y:p*c}:{x:p*c,y:v*h}}const vZ=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var t,i;const{x:r,y:a,placement:o,middlewareData:l}=n,f=await pZ(n,e);return o===((t=l.offset)==null?void 0:t.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:r+f.x,y:a+f.y,data:{...f,placement:o}}}}},gZ=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:t,y:i,placement:r,platform:a}=n,{mainAxis:o=!0,crossAxis:l=!1,limiter:f={fn:_=>{let{x:S,y:C}=_;return{x:S,y:C}}},...c}=to(e,n),h={x:t,y:i},d=await a.detectOverflow(n,c),p=Ea(Ra(r)),v=x6(p);let y=h[v],b=h[p];if(o){const _=v==="y"?"top":"left",S=v==="y"?"bottom":"right",C=y+d[_],E=y-d[S];y=eS(C,y,E)}if(l){const _=p==="y"?"top":"left",S=p==="y"?"bottom":"right",C=b+d[_],E=b-d[S];b=eS(C,b,E)}const w=f.fn({...n,[v]:y,[p]:b});return{...w,data:{x:w.x-t,y:w.y-i,enabled:{[v]:o,[p]:l}}}}}},yZ=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:t,y:i,placement:r,rects:a,middlewareData:o}=n,{offset:l=0,mainAxis:f=!0,crossAxis:c=!0}=to(e,n),h={x:t,y:i},d=Ea(r),p=x6(d);let v=h[p],y=h[d];const b=to(l,n),w=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(f){const C=p==="y"?"height":"width",E=a.reference[p]-a.floating[C]+w.mainAxis,A=a.reference[p]+a.reference[C]-w.mainAxis;vA&&(v=A)}if(c){var _,S;const C=p==="y"?"width":"height",E=Oz.has(Ra(r)),A=a.reference[d]-a.floating[C]+(E&&((_=o.offset)==null?void 0:_[d])||0)+(E?0:w.crossAxis),T=a.reference[d]+a.reference[C]+(E?0:((S=o.offset)==null?void 0:S[d])||0)-(E?w.crossAxis:0);yT&&(y=T)}return{[p]:v,[d]:y}}}},bZ=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var t,i;const{placement:r,rects:a,platform:o,elements:l}=n,{apply:f=()=>{},...c}=to(e,n),h=await o.detectOverflow(n,c),d=Ra(r),p=yc(r),v=Ea(r)==="y",{width:y,height:b}=a.floating;let w,_;d==="top"||d==="bottom"?(w=d,_=p===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(_=d,w=p==="end"?"top":"bottom");const S=b-h.top-h.bottom,C=y-h.left-h.right,E=Da(b-h[w],S),A=Da(y-h[_],C),T=!n.middlewareData.shift;let j=E,N=A;if((t=n.middlewareData.shift)!=null&&t.enabled.x&&(N=C),(i=n.middlewareData.shift)!=null&&i.enabled.y&&(j=S),T&&!p){const R=Fi(h.left,0),L=Fi(h.right,0),B=Fi(h.top,0),G=Fi(h.bottom,0);v?N=y-2*(R!==0||L!==0?R+L:Fi(h.left,h.right)):j=b-2*(B!==0||G!==0?B+G:Fi(h.top,h.bottom))}await f({...n,availableWidth:N,availableHeight:j});const q=await o.getDimensions(l.floating);return y!==q.width||b!==q.height?{reset:{rects:!0}}:{}}}};function Ez(e){const n=fa(e);let t=parseFloat(n.width)||0,i=parseFloat(n.height)||0;const r=pa(e),a=r?e.offsetWidth:t,o=r?e.offsetHeight:i,l=dg(t)!==a||dg(i)!==o;return l&&(t=a,i=o),{width:t,height:i,$:l}}function O6(e){return Pt(e)?e:e.contextElement}function Mf(e){const n=O6(e);if(!pa(n))return Xa(1);const t=n.getBoundingClientRect(),{width:i,height:r,$:a}=Ez(n);let o=(a?dg(t.width):t.width)/i,l=(a?dg(t.height):t.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const wZ=Xa(0);function Tz(e){const n=gr(e);return!V1()||!n.visualViewport?wZ:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function kZ(e,n,t){return n===void 0&&(n=!1),!t||n&&t!==gr(e)?!1:n}function iu(e,n,t,i){n===void 0&&(n=!1),t===void 0&&(t=!1);const r=e.getBoundingClientRect(),a=O6(e);let o=Xa(1);n&&(i?Pt(i)&&(o=Mf(i)):o=Mf(e));const l=kZ(a,t,i)?Tz(a):Xa(0);let f=(r.left+l.x)/o.x,c=(r.top+l.y)/o.y,h=r.width/o.x,d=r.height/o.y;if(a){const p=gr(a),v=i&&Pt(i)?gr(i):i;let y=p,b=J3(y);for(;b&&i&&v!==y;){const w=Mf(b),_=b.getBoundingClientRect(),S=fa(b),C=_.left+(b.clientLeft+parseFloat(S.paddingLeft))*w.x,E=_.top+(b.clientTop+parseFloat(S.paddingTop))*w.y;f*=w.x,c*=w.y,h*=w.x,d*=w.y,f+=C,c+=E,y=gr(b),b=J3(y)}}return If({width:h,height:d,x:f,y:c})}function G1(e,n){const t=W1(e).scrollLeft;return n?n.left+t:iu(lo(e)).left+t}function Mz(e,n){const t=e.getBoundingClientRect(),i=t.left+n.scrollLeft-G1(e,t),r=t.top+n.scrollTop;return{x:i,y:r}}function _Z(e){let{elements:n,rect:t,offsetParent:i,strategy:r}=e;const a=r==="fixed",o=lo(i),l=n?U1(n.floating):!1;if(i===o||l&&a)return t;let f={scrollLeft:0,scrollTop:0},c=Xa(1);const h=Xa(0),d=pa(i);if((d||!d&&!a)&&((gc(i)!=="body"||Cm(o))&&(f=W1(i)),d)){const v=iu(i);c=Mf(i),h.x=v.x+i.clientLeft,h.y=v.y+i.clientTop}const p=o&&!d&&!a?Mz(o,f):Xa(0);return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-f.scrollLeft*c.x+h.x+p.x,y:t.y*c.y-f.scrollTop*c.y+h.y+p.y}}function xZ(e){return Array.from(e.getClientRects())}function SZ(e){const n=lo(e),t=W1(e),i=e.ownerDocument.body,r=Fi(n.scrollWidth,n.clientWidth,i.scrollWidth,i.clientWidth),a=Fi(n.scrollHeight,n.clientHeight,i.scrollHeight,i.clientHeight);let o=-t.scrollLeft+G1(e);const l=-t.scrollTop;return fa(i).direction==="rtl"&&(o+=Fi(n.clientWidth,i.clientWidth)-r),{width:r,height:a,x:o,y:l}}const g5=25;function CZ(e,n){const t=gr(e),i=lo(e),r=t.visualViewport;let a=i.clientWidth,o=i.clientHeight,l=0,f=0;if(r){a=r.width,o=r.height;const h=V1();(!h||h&&n==="fixed")&&(l=r.offsetLeft,f=r.offsetTop)}const c=G1(i);if(c<=0){const h=i.ownerDocument,d=h.body,p=getComputedStyle(d),v=h.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,y=Math.abs(i.clientWidth-d.clientWidth-v);y<=g5&&(a-=y)}else c<=g5&&(a+=c);return{width:a,height:o,x:l,y:f}}function AZ(e,n){const t=iu(e,!0,n==="fixed"),i=t.top+e.clientTop,r=t.left+e.clientLeft,a=pa(e)?Mf(e):Xa(1),o=e.clientWidth*a.x,l=e.clientHeight*a.y,f=r*a.x,c=i*a.y;return{width:o,height:l,x:f,y:c}}function y5(e,n,t){let i;if(n==="viewport")i=CZ(e,t);else if(n==="document")i=SZ(lo(e));else if(Pt(n))i=AZ(n,t);else{const r=Tz(e);i={x:n.x-r.x,y:n.y-r.y,width:n.width,height:n.height}}return If(i)}function jz(e,n){const t=Ko(e);return t===n||!Pt(t)||qo(t)?!1:fa(t).position==="fixed"||jz(t,n)}function OZ(e,n){const t=n.get(e);if(t)return t;let i=Ho(e,[],!1).filter(l=>Pt(l)&&gc(l)!=="body"),r=null;const a=fa(e).position==="fixed";let o=a?Ko(e):e;for(;Pt(o)&&!qo(o);){const l=fa(o),f=_6(o);!f&&l.position==="fixed"&&(r=null),(a?!f&&!r:!f&&l.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||Cm(o)&&!f&&jz(e,o))?i=i.filter(h=>h!==o):r=l,o=Ko(o)}return n.set(e,i),i}function EZ(e){let{element:n,boundary:t,rootBoundary:i,strategy:r}=e;const o=[...t==="clippingAncestors"?U1(n)?[]:OZ(n,this._c):[].concat(t),i],l=y5(n,o[0],r);let f=l.top,c=l.right,h=l.bottom,d=l.left;for(let p=1;p{o(!1,1e-7)},1e3)}j===1&&!Rz(c,e.getBoundingClientRect())&&o(),E=!1}try{t=new IntersectionObserver(A,{...C,root:r.ownerDocument})}catch{t=new IntersectionObserver(A,C)}t.observe(e)}return o(!0),a}function iS(e,n,t,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:f=!1}=i,c=O6(e),h=r||a?[...c?Ho(c):[],...n?Ho(n):[]]:[];h.forEach(_=>{r&&_.addEventListener("scroll",t,{passive:!0}),a&&_.addEventListener("resize",t)});const d=c&&l?PZ(c,t):null;let p=-1,v=null;o&&(v=new ResizeObserver(_=>{let[S]=_;S&&S.target===c&&v&&n&&(v.unobserve(n),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var C;(C=v)==null||C.observe(n)})),t()}),c&&!f&&v.observe(c),n&&v.observe(n));let y,b=f?iu(e):null;f&&w();function w(){const _=iu(e);b&&!Rz(b,_)&&t(),b=_,y=requestAnimationFrame(w)}return t(),()=>{var _;h.forEach(S=>{r&&S.removeEventListener("scroll",t),a&&S.removeEventListener("resize",t)}),d==null||d(),(_=v)==null||_.disconnect(),v=null,f&&cancelAnimationFrame(y)}}const NZ=vZ,$Z=gZ,zZ=cZ,LZ=bZ,IZ=dZ,w5=fZ,BZ=mZ,FZ=yZ,qZ=(e,n,t)=>{const i=new Map,r={platform:RZ,...t},a={...r.platform,_c:i};return uZ(e,n,{...r,platform:a})};var HZ=typeof document<"u",UZ=function(){},Yv=HZ?O.useLayoutEffect:UZ;function mg(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(!mg(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)&&!mg(e[a],n[a]))return!1}return!0}return e!==e&&n!==n}function Pz(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function k5(e,n){const t=Pz(e);return Math.round(n*t)/t}function Qw(e){const n=O.useRef(e);return Yv(()=>{n.current=e}),n}function VZ(e){e===void 0&&(e={});const{placement:n="bottom",strategy:t="absolute",middleware:i=[],platform:r,elements:{reference:a,floating:o}={},transform:l=!0,whileElementsMounted:f,open:c}=e,[h,d]=O.useState({x:0,y:0,strategy:t,placement:n,middlewareData:{},isPositioned:!1}),[p,v]=O.useState(i);mg(p,i)||v(i);const[y,b]=O.useState(null),[w,_]=O.useState(null),S=O.useCallback(F=>{F!==T.current&&(T.current=F,b(F))},[]),C=O.useCallback(F=>{F!==j.current&&(j.current=F,_(F))},[]),E=a||y,A=o||w,T=O.useRef(null),j=O.useRef(null),N=O.useRef(h),q=f!=null,R=Qw(f),L=Qw(r),B=Qw(c),G=O.useCallback(()=>{if(!T.current||!j.current)return;const F={placement:n,strategy:t,middleware:p};L.current&&(F.platform=L.current),qZ(T.current,j.current,F).then(Y=>{const D={...Y,isPositioned:B.current!==!1};H.current&&!mg(N.current,D)&&(N.current=D,Vs.flushSync(()=>{d(D)}))})},[p,n,t,L,B]);Yv(()=>{c===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,d(F=>({...F,isPositioned:!1})))},[c]);const H=O.useRef(!1);Yv(()=>(H.current=!0,()=>{H.current=!1}),[]),Yv(()=>{if(E&&(T.current=E),A&&(j.current=A),E&&A){if(R.current)return R.current(E,A,G);G()}},[E,A,G,R,q]);const U=O.useMemo(()=>({reference:T,floating:j,setReference:S,setFloating:C}),[S,C]),P=O.useMemo(()=>({reference:E,floating:A}),[E,A]),z=O.useMemo(()=>{const F={position:t,left:0,top:0};if(!P.floating)return F;const Y=k5(P.floating,h.x),D=k5(P.floating,h.y);return l?{...F,transform:"translate("+Y+"px, "+D+"px)",...Pz(P.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:Y,top:D}},[t,l,P.floating,h.x,h.y]);return O.useMemo(()=>({...h,update:G,refs:U,elements:P,floatingStyles:z}),[h,G,U,P,z])}const WZ=e=>{function n(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:e,fn(t){const{element:i,padding:r}=typeof e=="function"?e(t):e;return i&&n(i)?i.current!=null?w5({element:i.current,padding:r}).fn(t):{}:i?w5({element:i,padding:r}).fn(t):{}}}},Nz=(e,n)=>{const t=NZ(e);return{name:t.name,fn:t.fn,options:[e,n]}},E6=(e,n)=>{const t=$Z(e);return{name:t.name,fn:t.fn,options:[e,n]}},_5=(e,n)=>({fn:FZ(e).fn,options:[e,n]}),pg=(e,n)=>{const t=zZ(e);return{name:t.name,fn:t.fn,options:[e,n]}},GZ=(e,n)=>{const t=LZ(e);return{name:t.name,fn:t.fn,options:[e,n]}},YZ=(e,n)=>{const t=IZ(e);return{name:t.name,fn:t.fn,options:[e,n]}},ch=(e,n)=>{const t=BZ(e);return{name:t.name,fn:t.fn,options:[e,n]}},$z=(e,n)=>{const t=WZ(e);return{name:t.name,fn:t.fn,options:[e,n]}};function zz(e){const n=O.useRef(void 0),t=O.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 O.useMemo(()=>e.every(i=>i==null)?null:i=>{n.current&&(n.current(),n.current=void 0),i!=null&&(n.current=t(i))},e)}const KZ="data-floating-ui-focusable",x5="active",S5="selected",XZ={...U$};let C5=!1,ZZ=0;const A5=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+ZZ++;function QZ(){const[e,n]=O.useState(()=>C5?A5():void 0);return Za(()=>{e==null&&n(A5())},[]),O.useEffect(()=>{C5=!0},[]),e}const JZ=XZ.useId,Lz=JZ||QZ;function eQ(){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 nQ=O.createContext(null),tQ=O.createContext(null),T6=()=>{var e;return((e=O.useContext(nQ))==null?void 0:e.id)||null},M6=()=>O.useContext(tQ);function j6(e){return"data-floating-ui-"+e}function na(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const O5=j6("safe-polygon");function Kv(e,n,t){if(t&&!tS(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 Jw(e){return typeof e=="function"?e():e}function iQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,dataRef:r,events:a,elements:o}=e,{enabled:l=!0,delay:f=0,handleClose:c=null,mouseOnly:h=!1,restMs:d=0,move:p=!0}=n,v=M6(),y=T6(),b=vv(c),w=vv(f),_=vv(t),S=vv(d),C=O.useRef(),E=O.useRef(-1),A=O.useRef(),T=O.useRef(-1),j=O.useRef(!0),N=O.useRef(!1),q=O.useRef(()=>{}),R=O.useRef(!1),L=Wa(()=>{var z;const F=(z=r.current.openEvent)==null?void 0:z.type;return(F==null?void 0:F.includes("mouse"))&&F!=="mousedown"});O.useEffect(()=>{if(!l)return;function z(F){let{open:Y}=F;Y||(na(E),na(T),j.current=!0,R.current=!1)}return a.on("openchange",z),()=>{a.off("openchange",z)}},[l,a]),O.useEffect(()=>{if(!l||!b.current||!t)return;function z(Y){L()&&i(!1,Y,"hover")}const F=Vl(o.floating).documentElement;return F.addEventListener("mouseleave",z),()=>{F.removeEventListener("mouseleave",z)}},[o.floating,t,i,l,b,L]);const B=O.useCallback(function(z,F,Y){F===void 0&&(F=!0),Y===void 0&&(Y="hover");const D=Kv(w.current,"close",C.current);D&&!A.current?(na(E),E.current=window.setTimeout(()=>i(!1,z,Y),D)):F&&(na(E),i(!1,z,Y))},[w,i]),G=Wa(()=>{q.current(),A.current=void 0}),H=Wa(()=>{if(N.current){const z=Vl(o.floating).body;z.style.pointerEvents="",z.removeAttribute(O5),N.current=!1}}),U=Wa(()=>r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1);O.useEffect(()=>{if(!l)return;function z(W){if(na(E),j.current=!1,h&&!tS(C.current)||Jw(S.current)>0&&!Kv(w.current,"open"))return;const $=Kv(w.current,"open",C.current);$?E.current=window.setTimeout(()=>{_.current||i(!0,W,"hover")},$):t||i(!0,W,"hover")}function F(W){if(U()){H();return}q.current();const $=Vl(o.floating);if(na(T),R.current=!1,b.current&&r.current.floatingContext){t||na(E),A.current=b.current({...r.current.floatingContext,tree:v,x:W.clientX,y:W.clientY,onClose(){H(),G(),U()||B(W,!0,"safe-polygon")}});const te=A.current;$.addEventListener("mousemove",te),q.current=()=>{$.removeEventListener("mousemove",te)};return}(C.current==="touch"?!Eh(o.floating,W.relatedTarget):!0)&&B(W)}function Y(W){U()||r.current.floatingContext&&(b.current==null||b.current({...r.current.floatingContext,tree:v,x:W.clientX,y:W.clientY,onClose(){H(),G(),U()||B(W)}})(W))}function D(){na(E)}function V(W){U()||B(W,!1)}if(Pt(o.domReference)){const W=o.domReference,$=o.floating;return t&&W.addEventListener("mouseleave",Y),p&&W.addEventListener("mousemove",z,{once:!0}),W.addEventListener("mouseenter",z),W.addEventListener("mouseleave",F),$&&($.addEventListener("mouseleave",Y),$.addEventListener("mouseenter",D),$.addEventListener("mouseleave",V)),()=>{t&&W.removeEventListener("mouseleave",Y),p&&W.removeEventListener("mousemove",z),W.removeEventListener("mouseenter",z),W.removeEventListener("mouseleave",F),$&&($.removeEventListener("mouseleave",Y),$.removeEventListener("mouseenter",D),$.removeEventListener("mouseleave",V))}}},[o,l,e,h,p,B,G,H,i,t,_,v,w,b,r,U,S]),Za(()=>{var z;if(l&&t&&(z=b.current)!=null&&(z=z.__options)!=null&&z.blockPointerEvents&&L()){N.current=!0;const Y=o.floating;if(Pt(o.domReference)&&Y){var F;const D=Vl(o.floating).body;D.setAttribute(O5,"");const V=o.domReference,W=v==null||(F=v.nodesRef.current.find($=>$.id===y))==null||(F=F.context)==null?void 0:F.elements.floating;return W&&(W.style.pointerEvents=""),D.style.pointerEvents="none",V.style.pointerEvents="auto",Y.style.pointerEvents="auto",()=>{D.style.pointerEvents="",V.style.pointerEvents="",Y.style.pointerEvents=""}}}},[l,t,y,o,v,b,L]),Za(()=>{t||(C.current=void 0,R.current=!1,G(),H())},[t,G,H]),O.useEffect(()=>()=>{G(),na(E),na(T),H()},[l,o.domReference,G,H]);const P=O.useMemo(()=>{function z(F){C.current=F.pointerType}return{onPointerDown:z,onPointerEnter:z,onMouseMove(F){const{nativeEvent:Y}=F;function D(){!j.current&&!_.current&&i(!0,Y,"hover")}h&&!tS(C.current)||t||Jw(S.current)===0||R.current&&F.movementX**2+F.movementY**2<2||(na(T),C.current==="touch"?D():(R.current=!0,T.current=window.setTimeout(D,Jw(S.current))))}}},[h,i,t,_,S]);return O.useMemo(()=>l?{reference:P}:{},[l,P])}const rS=()=>{},Iz=O.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:rS,setState:rS,isInstantPhase:!1}),rQ=()=>O.useContext(Iz);function aQ(e){const{children:n,delay:t,timeoutMs:i=0}=e,[r,a]=O.useReducer((f,c)=>({...f,...c}),{delay:t,timeoutMs:i,initialDelay:t,currentId:null,isInstantPhase:!1}),o=O.useRef(null),l=O.useCallback(f=>{a({currentId:f})},[]);return Za(()=>{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]),k.jsx(Iz.Provider,{value:O.useMemo(()=>({...r,setState:a,setCurrentId:l}),[r,l]),children:n})}function oQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,floatingId:r}=e,{id:a,enabled:o=!0}=n,l=a??r,f=rQ(),{currentId:c,setCurrentId:h,initialDelay:d,setState:p,timeoutMs:v}=f;return Za(()=>{o&&c&&(p({delay:{open:1,close:Kv(d,"close")}}),c!==l&&i(!1))},[o,l,i,p,c,d]),Za(()=>{function y(){i(!1),p({delay:d,currentId:null})}if(o&&c&&!t&&c===l){if(v){const b=window.setTimeout(y,v);return()=>{clearTimeout(b)}}y()}},[o,t,p,c,l,i,d,v]),Za(()=>{o&&(h===rS||!t||h(l))},[o,t,h,l]),f}const sQ={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},lQ={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},E5=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 uQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,elements:r,dataRef:a}=e,{enabled:o=!0,escapeKey:l=!0,outsidePress:f=!0,outsidePressEvent:c="pointerdown",referencePress:h=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:v,capture:y}=n,b=M6(),w=Wa(typeof f=="function"?f:()=>!1),_=typeof f=="function"?w:f,S=O.useRef(!1),{escapeKey:C,outsidePress:E}=E5(v),{escapeKey:A,outsidePress:T}=E5(y),j=O.useRef(!1),N=Wa(H=>{var U;if(!t||!o||!l||H.key!=="Escape"||j.current)return;const P=(U=a.current.floatingContext)==null?void 0:U.nodeId,z=b?Gv(b.nodesRef.current,P):[];if(!C&&(H.stopPropagation(),z.length>0)){let F=!0;if(z.forEach(Y=>{var D;if((D=Y.context)!=null&&D.open&&!Y.context.dataRef.current.__escapeKeyBubbles){F=!1;return}}),!F)return}i(!1,nZ(H)?H.nativeEvent:H,"escape-key")}),q=Wa(H=>{var U;const P=()=>{var z;N(H),(z=xf(H))==null||z.removeEventListener("keydown",P)};(U=xf(H))==null||U.addEventListener("keydown",P)}),R=Wa(H=>{var U;const P=a.current.insideReactTree;a.current.insideReactTree=!1;const z=S.current;if(S.current=!1,c==="click"&&z||P||typeof _=="function"&&!_(H))return;const F=xf(H),Y="["+j6("inert")+"]",D=Vl(r.floating).querySelectorAll(Y);let V=Pt(F)?F:null;for(;V&&!qo(V);){const te=Ko(V);if(qo(te)||!Pt(te))break;V=te}if(D.length&&Pt(F)&&!ZX(F)&&!Eh(F,r.floating)&&Array.from(D).every(te=>!Eh(V,te)))return;if(pa(F)&&G){const te=qo(F),ae=fa(F),le=/auto|scroll/,ye=te||le.test(ae.overflowX),oe=te||le.test(ae.overflowY),ue=ye&&F.clientWidth>0&&F.scrollWidth>F.clientWidth,ke=oe&&F.clientHeight>0&&F.scrollHeight>F.clientHeight,ie=ae.direction==="rtl",Re=ke&&(ie?H.offsetX<=F.offsetWidth-F.clientWidth:H.offsetX>F.clientWidth),pe=ue&&H.offsetY>F.clientHeight;if(Re||pe)return}const W=(U=a.current.floatingContext)==null?void 0:U.nodeId,$=b&&Gv(b.nodesRef.current,W).some(te=>{var ae;return Xw(H,(ae=te.context)==null?void 0:ae.elements.floating)});if(Xw(H,r.floating)||Xw(H,r.domReference)||$)return;const X=b?Gv(b.nodesRef.current,W):[];if(X.length>0){let te=!0;if(X.forEach(ae=>{var le;if((le=ae.context)!=null&&le.open&&!ae.context.dataRef.current.__outsidePressBubbles){te=!1;return}}),!te)return}i(!1,H,"outside-press")}),L=Wa(H=>{var U;const P=()=>{var z;R(H),(z=xf(H))==null||z.removeEventListener(c,P)};(U=xf(H))==null||U.addEventListener(c,P)});O.useEffect(()=>{if(!t||!o)return;a.current.__escapeKeyBubbles=C,a.current.__outsidePressBubbles=E;let H=-1;function U(D){i(!1,D,"ancestor-scroll")}function P(){window.clearTimeout(H),j.current=!0}function z(){H=window.setTimeout(()=>{j.current=!1},V1()?5:0)}const F=Vl(r.floating);l&&(F.addEventListener("keydown",A?q:N,A),F.addEventListener("compositionstart",P),F.addEventListener("compositionend",z)),_&&F.addEventListener(c,T?L:R,T);let Y=[];return p&&(Pt(r.domReference)&&(Y=Ho(r.domReference)),Pt(r.floating)&&(Y=Y.concat(Ho(r.floating))),!Pt(r.reference)&&r.reference&&r.reference.contextElement&&(Y=Y.concat(Ho(r.reference.contextElement)))),Y=Y.filter(D=>{var V;return D!==((V=F.defaultView)==null?void 0:V.visualViewport)}),Y.forEach(D=>{D.addEventListener("scroll",U,{passive:!0})}),()=>{l&&(F.removeEventListener("keydown",A?q:N,A),F.removeEventListener("compositionstart",P),F.removeEventListener("compositionend",z)),_&&F.removeEventListener(c,T?L:R,T),Y.forEach(D=>{D.removeEventListener("scroll",U)}),window.clearTimeout(H)}},[a,r,l,_,c,t,i,p,o,C,E,N,A,q,R,T,L]),O.useEffect(()=>{a.current.insideReactTree=!1},[a,_,c]);const B=O.useMemo(()=>({onKeyDown:N,...h&&{[sQ[d]]:H=>{i(!1,H.nativeEvent,"reference-press")},...d!=="click"&&{onClick(H){i(!1,H.nativeEvent,"reference-press")}}}}),[N,i,h,d]),G=O.useMemo(()=>{function H(U){U.button===0&&(S.current=!0)}return{onKeyDown:N,onMouseDown:H,onMouseUp:H,[lQ[c]]:()=>{a.current.insideReactTree=!0}}},[N,c,a]);return O.useMemo(()=>o?{reference:B,floating:G}:{},[o,B,G])}function fQ(e){const{open:n=!1,onOpenChange:t,elements:i}=e,r=Lz(),a=O.useRef({}),[o]=O.useState(()=>eQ()),l=T6()!=null,[f,c]=O.useState(i.reference),h=Wa((v,y,b)=>{a.current.openEvent=v?y:void 0,o.emit("openchange",{open:v,event:y,reason:b,nested:l}),t==null||t(v,y,b)}),d=O.useMemo(()=>({setPositionReference:c}),[]),p=O.useMemo(()=>({reference:f||i.reference||null,floating:i.floating||null,domReference:i.reference}),[f,i.reference,i.floating]);return O.useMemo(()=>({dataRef:a,open:n,onOpenChange:h,elements:p,events:o,floatingId:r,refs:d}),[n,h,p,o,r,d])}function D6(e){e===void 0&&(e={});const{nodeId:n}=e,t=fQ({...e,elements:{reference:null,floating:null,...e.elements}}),i=e.rootContext||t,r=i.elements,[a,o]=O.useState(null),[l,f]=O.useState(null),h=(r==null?void 0:r.domReference)||a,d=O.useRef(null),p=M6();Za(()=>{h&&(d.current=h)},[h]);const v=VZ({...e,elements:{...r,...l&&{reference:l}}}),y=O.useCallback(C=>{const E=Pt(C)?{getBoundingClientRect:()=>C.getBoundingClientRect(),getClientRects:()=>C.getClientRects(),contextElement:C}:C;f(E),v.refs.setReference(E)},[v.refs]),b=O.useCallback(C=>{(Pt(C)||C===null)&&(d.current=C,o(C)),(Pt(v.refs.reference.current)||v.refs.reference.current===null||C!==null&&!Pt(C))&&v.refs.setReference(C)},[v.refs]),w=O.useMemo(()=>({...v.refs,setReference:b,setPositionReference:y,domReference:d}),[v.refs,b,y]),_=O.useMemo(()=>({...v.elements,domReference:h}),[v.elements,h]),S=O.useMemo(()=>({...v,...i,refs:w,elements:_,nodeId:n}),[v,w,_,n,i]);return Za(()=>{i.dataRef.current.floatingContext=S;const C=p==null?void 0:p.nodesRef.current.find(E=>E.id===n);C&&(C.context=S)}),O.useMemo(()=>({...v,context:S,refs:w,elements:_}),[v,w,_,S])}function ek(){return YX()&&GX()}function cQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,events:r,dataRef:a,elements:o}=e,{enabled:l=!0,visibleOnly:f=!0}=n,c=O.useRef(!1),h=O.useRef(-1),d=O.useRef(!0);O.useEffect(()=>{if(!l)return;const v=gr(o.domReference);function y(){!t&&pa(o.domReference)&&o.domReference===h5(Vl(o.domReference))&&(c.current=!0)}function b(){d.current=!0}function w(){d.current=!1}return v.addEventListener("blur",y),ek()&&(v.addEventListener("keydown",b,!0),v.addEventListener("pointerdown",w,!0)),()=>{v.removeEventListener("blur",y),ek()&&(v.removeEventListener("keydown",b,!0),v.removeEventListener("pointerdown",w,!0))}},[o.domReference,t,l]),O.useEffect(()=>{if(!l)return;function v(y){let{reason:b}=y;(b==="reference-press"||b==="escape-key")&&(c.current=!0)}return r.on("openchange",v),()=>{r.off("openchange",v)}},[r,l]),O.useEffect(()=>()=>{na(h)},[]);const p=O.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(v){if(c.current)return;const y=xf(v.nativeEvent);if(f&&Pt(y)){if(ek()&&!v.relatedTarget){if(!d.current&&!QX(y))return}else if(!JX(y))return}i(!0,v.nativeEvent,"focus")},onBlur(v){c.current=!1;const y=v.relatedTarget,b=v.nativeEvent,w=Pt(y)&&y.hasAttribute(j6("focus-guard"))&&y.getAttribute("data-type")==="outside";h.current=window.setTimeout(()=>{var _;const S=h5(o.domReference?o.domReference.ownerDocument:document);!y&&S===o.domReference||Eh((_=a.current.floatingContext)==null?void 0:_.refs.floating.current,S)||Eh(o.domReference,S)||w||i(!1,b,"focus")})}}),[a,o.domReference,i,f]);return O.useMemo(()=>l?{reference:p}:{},[l,p])}function nk(e,n,t){const i=new Map,r=t==="item";let a=e;if(r&&e){const{[x5]:o,[S5]:l,...f}=e;a=f}return{...t==="floating"&&{tabIndex:-1,[KZ]:""},...a,...n.map(o=>{const l=o?o[t]:null;return typeof l=="function"?e?l(e):null:l}).concat(e).reduce((o,l)=>(l&&Object.entries(l).forEach(f=>{let[c,h]=f;if(!(r&&[x5,S5].includes(c)))if(c.indexOf("on")===0){if(i.has(c)||i.set(c,[]),typeof h=="function"){var d;(d=i.get(c))==null||d.push(h),o[c]=function(){for(var p,v=arguments.length,y=new Array(v),b=0;bw(...y)).find(w=>w!==void 0)}}}else o[c]=h}),o),{})}}function dQ(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=O.useCallback(l=>nk(l,e,"reference"),n),a=O.useCallback(l=>nk(l,e,"floating"),t),o=O.useCallback(l=>nk(l,e,"item"),i);return O.useMemo(()=>({getReferenceProps:r,getFloatingProps:a,getItemProps:o}),[r,a,o])}const hQ=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function mQ(e,n){var t,i;n===void 0&&(n={});const{open:r,elements:a,floatingId:o}=e,{enabled:l=!0,role:f="dialog"}=n,c=Lz(),h=((t=a.domReference)==null?void 0:t.id)||c,d=O.useMemo(()=>{var S;return((S=eZ(a.floating))==null?void 0:S.id)||o},[a.floating,o]),p=(i=hQ.get(f))!=null?i:f,y=T6()!=null,b=O.useMemo(()=>p==="tooltip"||f==="label"?{["aria-"+(f==="label"?"labelledby":"describedby")]:r?d:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":p==="alertdialog"?"dialog":p,"aria-controls":r?d:void 0,...p==="listbox"&&{role:"combobox"},...p==="menu"&&{id:h},...p==="menu"&&y&&{role:"menuitem"},...f==="select"&&{"aria-autocomplete":"none"},...f==="combobox"&&{"aria-autocomplete":"list"}},[p,d,y,r,h,f]),w=O.useMemo(()=>{const S={id:d,...p&&{role:p}};return p==="tooltip"||f==="label"?S:{...S,...p==="menu"&&{"aria-labelledby":h}}},[p,d,h,f]),_=O.useCallback(S=>{let{active:C,selected:E}=S;const A={role:"option",...C&&{id:d+"-fui-option"}};switch(f){case"select":case"combobox":return{...A,"aria-selected":E}}return{}},[d,f]);return O.useMemo(()=>l?{reference:b,floating:w,item:_}:{},[l,b,w,_])}const Bz={scrollHideDelay:1e3,type:"hover",scrollbars:"xy"},Fz=(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":he(n),"--scrollarea-over-scroll-behavior":r}}},uo=Pe(e=>{const n=ge("ScrollArea",Bz,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,scrollbarSize:l,vars:f,type:c,scrollHideDelay:h,viewportProps:d,viewportRef:p,onScrollPositionChange:v,children:y,offsetScrollbars:b,scrollbars:w,onBottomReached:_,onTopReached:S,onLeftReached:C,onRightReached:E,overscrollBehavior:A,startScrollPosition:T,attributes:j,...N}=n,[q,R]=O.useState(!1),[L,B]=O.useState(!1),[G,H]=O.useState(!1),U=O.useRef(!0),P=O.useRef(!1),z=O.useRef(!0),F=O.useRef(!1),Y=Ge({name:"ScrollArea",props:n,classes:k6,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:j,vars:f,varsResolver:Fz}),D=O.useRef(null),[V,W]=O.useState(null),$=zz([p,D,O.useCallback(X=>{W(te=>te===X?te:X)},[])]);return Js(b==="present"?V:null,()=>{const X=D.current;X&&(B(X.scrollHeight>X.clientHeight),H(X.scrollWidth>X.clientWidth))}),ts(()=>{T&&D.current&&D.current.scrollTo({left:T.x??0,top:T.y??0})},[]),k.jsxs(hz,{getStyles:Y,type:c==="never"?"always":c,scrollHideDelay:h,scrollbars:w,...Y("root"),...N,children:[k.jsx(xz,{...d,...Y("viewport",{style:d==null?void 0:d.style}),ref:$,"data-offset-scrollbars":b===!0?"xy":b||void 0,"data-scrollbars":w||void 0,"data-horizontal-hidden":b==="present"&&!G?"true":void 0,"data-vertical-hidden":b==="present"&&!L?"true":void 0,onScroll:X=>{var Ce;(Ce=d==null?void 0:d.onScroll)==null||Ce.call(d,X),v==null||v({x:X.currentTarget.scrollLeft,y:X.currentTarget.scrollTop});const{scrollTop:te,scrollHeight:ae,clientHeight:le,scrollLeft:ye,scrollWidth:oe,clientWidth:ue}=X.currentTarget,ke=te-(ae-le)>=-.8,ie=te===0;ke&&!P.current&&(_==null||_()),ie&&!U.current&&(S==null||S()),P.current=ke,U.current=ie;const Re=ye-(oe-ue)>=-.8,pe=ye===0;Re&&!F.current&&(E==null||E()),pe&&!z.current&&(C==null||C()),F.current=Re,z.current=pe},children:y}),(w==="xy"||w==="x")&&k.jsx(X3,{...Y("scrollbar"),orientation:"horizontal","data-hidden":c==="never"||b==="present"&&!G?!0:void 0,forceMount:!0,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),children:k.jsx(Z3,{...Y("thumb")})}),(w==="xy"||w==="y")&&k.jsx(X3,{...Y("scrollbar"),orientation:"vertical","data-hidden":c==="never"||b==="present"&&!L?!0:void 0,forceMount:!0,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),children:k.jsx(Z3,{...Y("thumb")})}),k.jsx(CX,{...Y("corner"),"data-hovered":q||void 0,"data-hidden":c==="never"||void 0})]})});uo.displayName="@mantine/core/ScrollArea";const R6=Pe(e=>{const{children:n,classNames:t,styles:i,scrollbarSize:r,scrollHideDelay:a,type:o,dir:l,offsetScrollbars:f,overscrollBehavior:c,viewportRef:h,onScrollPositionChange:d,unstyled:p,variant:v,viewportProps:y,scrollbars:b,style:w,vars:_,onBottomReached:S,onTopReached:C,startScrollPosition:E,onOverflowChange:A,...T}=ge("ScrollAreaAutosize",Bz,e),j=O.useRef(null),[N,q]=O.useState(null),R=zz([h,j,O.useCallback(H=>{q(U=>U===H?U:H)},[])]),L=O.useRef(!1),B=O.useRef(!1),G=O.useEffectEvent(()=>{const H=j.current;if(!H||!A)return;const U=H.scrollHeight>H.clientHeight;U!==L.current&&(B.current?A(U):(B.current=!0,U&&A(!0)),L.current=U)});return Js(A?N:null,G),k.jsx(we,{...T,variant:v,style:[{display:"flex",overflow:"hidden"},w],children:k.jsx(we,{style:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden",...b==="y"&&{minWidth:0},...b==="x"&&{minHeight:0},...b==="xy"&&{minWidth:0,minHeight:0},...b===!1&&{minWidth:0,minHeight:0}},children:k.jsx(uo,{classNames:t,styles:i,scrollHideDelay:a,scrollbarSize:r,type:o,dir:l,offsetScrollbars:f,overscrollBehavior:c,viewportRef:R,onScrollPositionChange:d,unstyled:p,variant:v,viewportProps:y,vars:_,scrollbars:b,onBottomReached:S,onTopReached:C,startScrollPosition:E,"data-autosize":"true",children:n})})})});uo.classes=k6;uo.varsResolver=Fz;R6.displayName="@mantine/core/ScrollAreaAutosize";R6.classes=k6;uo.Autosize=R6;var qz={root:"m_87cf2631"};const pQ={__staticSelector:"UnstyledButton"},fi=$i(e=>{const n=ge("UnstyledButton",pQ,e),{className:t,component:i="button",__staticSelector:r,unstyled:a,classNames:o,styles:l,style:f,attributes:c,...h}=n;return k.jsx(we,{...Ge({name:r,props:n,classes:qz,className:t,style:f,classNames:o,styles:l,unstyled:a,attributes:c})("root",{focusable:!0}),component:i,type:i==="button"?"button":void 0,...h})});fi.classes=qz;fi.displayName="@mantine/core/UnstyledButton";var Hz={root:"m_515a97f8"};const P6=Pe(e=>{const n=ge("VisuallyHidden",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:f,...c}=n;return k.jsx(we,{component:"span",...Ge({name:"VisuallyHidden",classes:Hz,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:f})("root"),...c})});P6.classes=Hz;P6.displayName="@mantine/core/VisuallyHidden";var Uz={root:"m_1b7284a3"};const Vz=(e,{radius:n,shadow:t})=>({root:{"--paper-radius":n===void 0?void 0:Ut(n),"--paper-shadow":c6(t)}}),ei=$i(e=>{const n=ge("Paper",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,withBorder:l,vars:f,radius:c,shadow:h,variant:d,mod:p,attributes:v,...y}=n,b=Ge({name:"Paper",props:n,classes:Uz,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,vars:f,varsResolver:Vz});return k.jsx(we,{mod:[{"data-with-border":l},p],...b("root"),variant:d,...y})});ei.classes=Uz;ei.varsResolver=Vz;ei.displayName="@mantine/core/Paper";function T5(e,n,t,i){return e==="center"||i==="center"?{top:n}:e==="end"?{bottom:t}:e==="start"?{top:t}:{}}function M5(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 vQ={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function gQ({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,arrowX:a,arrowY:o,dir:l}){const[f,c="center"]=e.split("-"),h={width:n,height:n,transform:"rotate(45deg)",position:"absolute",[vQ[f]]:i},d=-n/2;return f==="left"?{...h,...T5(c,o,t,r),right:d,borderLeftColor:"transparent",borderBottomColor:"transparent",clipPath:"polygon(100% 0, 0 0, 100% 100%)"}:f==="right"?{...h,...T5(c,o,t,r),left:d,borderRightColor:"transparent",borderTopColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 100%)"}:f==="top"?{...h,...M5(c,a,t,r,l),bottom:d,borderTopColor:"transparent",borderLeftColor:"transparent",clipPath:"polygon(0 100%, 100% 100%, 100% 0)"}:f==="bottom"?{...h,...M5(c,a,t,r,l),top:d,borderBottomColor:"transparent",borderRightColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 0)"}:{}}function vg({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,visible:a,arrowX:o,arrowY:l,style:f,...c}){const{dir:h}=yu();return a?k.jsx("div",{...c,style:{...f,...gQ({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,dir:h,arrowX:o,arrowY:l})}}):null}vg.displayName="@mantine/core/FloatingArrow";function Wz(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 Gz({open:e,close:n,openDelay:t,closeDelay:i}){const r=O.useRef(-1),a=O.useRef(-1),o=()=>{window.clearTimeout(r.current),window.clearTimeout(a.current)},l=()=>{o(),t===0||t===void 0?e():r.current=window.setTimeout(e,t)},f=()=>{o(),i===0||i===void 0?n():a.current=window.setTimeout(n,i)};return O.useEffect(()=>o,[]),{openDropdown:l,closeDropdown:f}}var Yz={root:"m_9814e45f"};const yQ={zIndex:ha("modal")},Kz=(e,{gradient:n,color:t,backgroundOpacity:i,blur:r,radius:a,zIndex:o})=>({root:{"--overlay-bg":n||(t!==void 0||i!==void 0)&&Is(t||"#000",i??.6)||void 0,"--overlay-filter":r?`blur(${he(r)})`:void 0,"--overlay-radius":a===void 0?void 0:Ut(a),"--overlay-z-index":o==null?void 0:o.toString()}}),Am=$i(e=>{const n=ge("Overlay",yQ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,fixed:f,center:c,children:h,radius:d,zIndex:p,gradient:v,blur:y,color:b,backgroundOpacity:w,mod:_,attributes:S,...C}=n;return k.jsx(we,{...Ge({name:"Overlay",props:n,classes:Yz,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:S,vars:l,varsResolver:Kz})("root"),mod:[{center:c,fixed:f},_],...C,children:h})});Am.classes=Yz;Am.varsResolver=Kz;Am.displayName="@mantine/core/Overlay";function tk(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 bQ({target:e,reuseTargetNode:n,...t}){if(e)return typeof e=="string"?document.querySelector(e)||tk(t):e;if(n){const i=document.querySelector("[data-mantine-shared-portal-node]");if(i)return i;const r=tk(t);return r.setAttribute("data-mantine-shared-portal-node","true"),document.body.appendChild(r),r}return tk(t)}const wQ={reuseTargetNode:!0},Xz=Pe(e=>{const{children:n,target:t,reuseTargetNode:i,ref:r,...a}=ge("Portal",wQ,e),[o,l]=O.useState(!1),f=O.useRef(null);return ts(()=>(l(!0),f.current=bQ({target:t,reuseTargetNode:i,...a}),ug(r,f.current),!t&&!i&&f.current&&document.body.appendChild(f.current),()=>{!t&&!i&&f.current&&document.body.removeChild(f.current)}),[t]),!o||!f.current?null:Vs.createPortal(k.jsx(k.Fragment,{children:n}),f.current)});Xz.displayName="@mantine/core/Portal";const el=Pe(({withinPortal:e=!0,children:n,...t})=>Sm()==="test"||!e?k.jsx(k.Fragment,{children:n}):k.jsx(Xz,{...t,children:n}));el.displayName="@mantine/core/OptionalPortal";const Nd=e=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${e==="bottom"?10:-10}px)`},transitionProperty:"transform, opacity"}),gv={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:{...Nd("bottom"),common:{transformOrigin:"center center"}},"pop-bottom-left":{...Nd("bottom"),common:{transformOrigin:"bottom left"}},"pop-bottom-right":{...Nd("bottom"),common:{transformOrigin:"bottom right"}},"pop-top-left":{...Nd("top"),common:{transformOrigin:"top left"}},"pop-top-right":{...Nd("top"),common:{transformOrigin:"top right"}}},j5={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function D5({transition:e,state:n,duration:t,timingFunction:i}){const r={WebkitBackfaceVisibility:"hidden",transitionDuration:`${t}ms`,transitionTimingFunction:i};return typeof e=="string"?e in gv?{transitionProperty:gv[e].transitionProperty,...r,...gv[e].common,...gv[e][j5[n]]}:{}:{transitionProperty:e.transitionProperty,...r,...e.common,...e[j5[n]]}}function kQ({duration:e,exitDuration:n,timingFunction:t,mounted:i,onEnter:r,onExit:a,onEntered:o,onExited:l,enterDelay:f,exitDelay:c}){const h=ni(),d=h6(),p=h.respectReducedMotion?d:!1,[v,y]=O.useState(p?0:e),[b,w]=O.useState(i?"entered":"exited"),_=O.useRef(-1),S=O.useRef(-1),C=O.useRef(-1);function E(){window.clearTimeout(_.current),window.clearTimeout(S.current),cancelAnimationFrame(C.current)}const A=j=>{E();const N=j?r:a,q=j?o:l,R=p?0:j?e:n;y(R),R===0?(typeof N=="function"&&N(),typeof q=="function"&&q(),w(j?"entered":"exited")):C.current=requestAnimationFrame(()=>{eh.flushSync(()=>{w(j?"pre-entering":"pre-exiting")}),C.current=requestAnimationFrame(()=>{typeof N=="function"&&N(),w(j?"entering":"exiting"),_.current=window.setTimeout(()=>{typeof q=="function"&&q(),w(j?"entered":"exited")},R)})})},T=j=>{if(E(),typeof(j?f:c)!="number"){A(j);return}S.current=window.setTimeout(()=>{A(j)},j?f:c)};return Yo(()=>{T(i)},[i]),O.useEffect(()=>()=>{E()},[]),{transitionDuration:v,transitionStatus:b,transitionTimingFunction:t||"ease"}}function Xo({keepMounted:e,transition:n="fade",duration:t=250,exitDuration:i=t,mounted:r,children:a,timingFunction:o="ease",onExit:l,onEntered:f,onEnter:c,onExited:h,enterDelay:d,exitDelay:p}){const v=Sm(),{transitionDuration:y,transitionStatus:b,transitionTimingFunction:w}=kQ({mounted:r,exitDuration:i,duration:t,timingFunction:o,onExit:l,onEntered:f,onEnter:c,onExited:h,enterDelay:d,exitDelay:p});if(v==="test")return r?k.jsx(k.Fragment,{children:a({})}):e?a({display:"none"}):null;if(y===0)return e?k.jsx(O.Activity,{mode:r?"visible":"hidden",children:a({})}):r?k.jsx(k.Fragment,{children:a({})}):null;const _=b==="exited";return e?k.jsx(O.Activity,{mode:_?"hidden":"visible",children:a(_?{}:D5({transition:n,duration:y,state:b,timingFunction:w}))}):_?null:k.jsx(k.Fragment,{children:a(D5({transition:n,duration:y,state:b,timingFunction:w}))})}Xo.displayName="@mantine/core/Transition";const _Q={duration:100,transition:"fade"};function R5(e,n){return{..._Q,...n,...e}}const[xQ,Zz]=da("Popover component was not found in the tree");function Y1({children:e,active:n=!0,refProp:t="ref",innerRef:i}){const r=zt(nK(n),i),a=vu(e);return a?O.cloneElement(a,{[t]:r}):e}function Qz(e){return k.jsx(P6,{tabIndex:-1,"data-autofocus":!0,...e})}Y1.displayName="@mantine/core/FocusTrap";Qz.displayName="@mantine/core/FocusTrapInitialFocus";Y1.InitialFocus=Qz;var Jz={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};const N6=Pe(e=>{var w,_,S,C;const n=ge("PopoverDropdown",null,e),{className:t,style:i,vars:r,children:a,onKeyDownCapture:o,variant:l,classNames:f,styles:c,ref:h,...d}=n,p=Zz(),v=V$({opened:p.opened,shouldReturnFocus:p.returnFocus}),y=p.withRoles?{"aria-labelledby":p.getTargetId(),id:p.getDropdownId(),role:"dialog",tabIndex:-1}:{},b=zt(h,p.floating);return p.disabled?null:k.jsx(el,{...p.portalProps,withinPortal:p.withinPortal,children:k.jsx(Xo,{mounted:p.opened,...p.transitionProps,transition:((w=p.transitionProps)==null?void 0:w.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:(C=p.transitionProps)==null?void 0:C.duration,children:E=>{var A;return k.jsx(Y1,{active:p.trapFocus&&p.opened,innerRef:b,children:k.jsxs(we,{...y,...d,variant:l,onKeyDownCapture:HY(()=>{var T,j;(T=p.onClose)==null||T.call(p),(j=p.onDismiss)==null||j.call(p)},{active:p.closeOnEscape,onTrigger:v,onKeyDown:o}),"data-position":p.placement,"data-fixed":p.floatingStrategy==="fixed"||void 0,...p.getStyles("dropdown",{className:t,props:n,classNames:f,styles:c,style:[{...E,zIndex:p.zIndex,top:p.y??0,left:p.x??0,width:p.width==="target"?void 0:he(p.width),...p.referenceHidden?{display:"none"}:null},(A=p.resolvedStyles)==null?void 0:A.dropdown,c==null?void 0:c.dropdown,i]}),children:[a,k.jsx(vg,{ref:p.arrowRef,arrowX:p.arrowX,arrowY:p.arrowY,visible:p.withArrow,position:p.placement,arrowSize:p.arrowSize,arrowRadius:p.arrowRadius,arrowOffset:p.arrowOffset,arrowPosition:p.arrowPosition,...p.getStyles("arrow",{props:n,classNames:f,styles:c})})]})})}})})});N6.classes=Jz;N6.displayName="@mantine/core/PopoverDropdown";const SQ={refProp:"ref",popupType:"dialog"},eL=Pe(e=>{const{children:n,refProp:t,popupType:i,ref:r,...a}=ge("PopoverTarget",SQ,e),o=vu(n);if(!o)throw new Error("Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const l=a,f=Zz(),c=zt(f.reference,z1(o),r),h=f.withRoles?{"aria-haspopup":i,"aria-expanded":f.opened,"aria-controls":f.opened?f.getDropdownId():void 0,id:f.getTargetId()}:{},d=o.props;return O.cloneElement(o,{...l,...h,...f.targetProps,className:cn(f.targetProps.className,l.className,d.className),[t]:c,...f.controlled?null:{onClick:p=>{var v;f.onToggle(),(v=d.onClick)==null||v.call(d,p)}}})});eL.displayName="@mantine/core/PopoverTarget";function CQ(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 AQ(e,n,t){const i=CQ(e.middlewares),r=[Nz(e.offset),YZ()];return e.dropdownVisible&&t!=="test"&&e.preventPositionChangeWhenVisible&&(i.flip=!1),i.flip&&r.push(typeof i.flip=="boolean"?pg():pg(i.flip)),i.shift&&r.push(E6(typeof i.shift=="boolean"?{limiter:_5(),padding:5}:{limiter:_5(),padding:5,...i.shift})),i.inline&&r.push(typeof i.inline=="boolean"?ch():ch(i.inline)),r.push($z({element:e.arrowRef,padding:e.arrowOffset})),(i.size||e.width==="target")&&r.push(GZ({...typeof i.size=="boolean"?{}:i.size,apply({rects:a,availableWidth:o,availableHeight:l,...f}){var h;const c=((h=n().refs.floating.current)==null?void 0:h.style)??{};i.size&&(typeof i.size=="object"&&i.size.apply?i.size.apply({rects:a,availableWidth:o,availableHeight:l,...f}):Object.assign(c,{maxWidth:`${o}px`,maxHeight:`${l}px`})),e.width==="target"&&Object.assign(c,{width:`${a.reference.width}px`})}})),r}function OQ(e){const n=Sm(),[t,i]=xi({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),r=O.useRef(t),a=()=>{t&&!e.disabled&&i(!1)},o=()=>{e.disabled||i(!t)},l=D6({strategy:e.strategy,placement:e.preventPositionChangeWhenVisible?e.positionRef.current:e.position,middleware:AQ(e,()=>l,n),whileElementsMounted:e.keepMounted?void 0:iS});return O.useEffect(()=>{if(!(!l.refs.reference.current||!l.refs.floating.current)&&t)return iS(l.refs.reference.current,l.refs.floating.current,l.update)},[t,l.update]),Yo(()=>{var f;(f=e.onPositionChange)==null||f.call(e,l.placement),e.positionRef.current=l.placement},[l.placement,e.preventPositionChangeWhenVisible]),Yo(()=>{var f,c;t!==r.current&&(t?(c=e.onOpen)==null||c.call(e):(f=e.onClose)==null||f.call(e)),r.current=t},[t,e.onClose,e.onOpen]),ts(()=>{let f=-1;return t&&(f=window.setTimeout(()=>e.setDropdownVisible(!0),4)),()=>{window.clearTimeout(f)}},[t,e.position]),{floating:l,controlled:typeof e.opened=="boolean",opened:t,onClose:a,onToggle:o}}const EQ={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:ha("popover"),__staticSelector:"Popover",width:"max-content"},nL=(e,{radius:n,shadow:t})=>({dropdown:{"--popover-radius":n===void 0?void 0:Ut(n),"--popover-shadow":c6(t)}});function Tn(e){var Le,en,hn,fn,Ze,Ke,An;const n=ge("Popover",EQ,e),{children:t,position:i,offset:r,onPositionChange:a,opened:o,transitionProps:l,onExitTransitionEnd:f,onEnterTransitionEnd:c,width:h,middlewares:d,withArrow:p,arrowSize:v,arrowOffset:y,arrowRadius:b,arrowPosition:w,unstyled:_,classNames:S,styles:C,closeOnClickOutside:E,withinPortal:A,portalProps:T,closeOnEscape:j,clickOutsideEvents:N,trapFocus:q,onClose:R,onDismiss:L,onOpen:B,onChange:G,zIndex:H,radius:U,shadow:P,id:z,defaultOpened:F,__staticSelector:Y,withRoles:D,disabled:V,returnFocus:W,variant:$,keepMounted:X,vars:te,floatingStrategy:ae,withOverlay:le,overlayProps:ye,hideDetached:oe,attributes:ue,preventPositionChangeWhenVisible:ke,...ie}=n,Re=Ge({name:Y,props:n,classes:Jz,classNames:S,styles:C,unstyled:_,attributes:ue,rootSelector:"dropdown",vars:te,varsResolver:nL}),{resolvedStyles:pe}=Ni({classNames:S,styles:C,props:n}),[Ce,De]=O.useState(o??F??!1),be=O.useRef(i),_e=O.useRef(null),[Me,Be]=O.useState(null),[Ve,He]=O.useState(null),{dir:We}=yu(),Ye=Sm(),rn=Gi(z),Q=OQ({middlewares:d,width:h,position:Wz(We,i),offset:typeof r=="number"?r+(p?v/2:0):r,arrowRef:_e,arrowOffset:y,onPositionChange:a,opened:o,defaultOpened:F,onChange:G,onOpen:B,onClose:R,onDismiss:L,strategy:ae,dropdownVisible:Ce,setDropdownVisible:De,positionRef:be,disabled:V,preventPositionChangeWhenVisible:ke,keepMounted:X});GY(()=>{E&&(Q.onClose(),L==null||L())},N,[Me,Ve]);const me=O.useCallback(on=>{Be(on),Q.floating.refs.setReference(on)},[Q.floating.refs.setReference]),xe=O.useCallback(on=>{He(on),Q.floating.refs.setFloating(on)},[Q.floating.refs.setFloating]),Xe=O.useCallback(()=>{var on;(on=l==null?void 0:l.onExited)==null||on.call(l),f==null||f(),De(!1),ke||(be.current=i)},[l==null?void 0:l.onExited,f,ke,i]),ne=O.useCallback(()=>{var on;(on=l==null?void 0:l.onEntered)==null||on.call(l),c==null||c()},[l==null?void 0:l.onEntered,c]);return k.jsxs(xQ,{value:{returnFocus:W,disabled:V,controlled:Q.controlled,reference:me,floating:xe,x:Q.floating.x,y:Q.floating.y,arrowX:(hn=(en=(Le=Q.floating)==null?void 0:Le.middlewareData)==null?void 0:en.arrow)==null?void 0:hn.x,arrowY:(Ke=(Ze=(fn=Q.floating)==null?void 0:fn.middlewareData)==null?void 0:Ze.arrow)==null?void 0:Ke.y,opened:Q.opened,arrowRef:_e,transitionProps:{...l,onExited:Xe,onEntered:ne},width:h,withArrow:p,arrowSize:v,arrowOffset:y,arrowRadius:b,arrowPosition:w,placement:Q.floating.placement,trapFocus:q,withinPortal:A,portalProps:T,zIndex:H,radius:U,shadow:P,closeOnEscape:j,onDismiss:L,onClose:Q.onClose,onToggle:Q.onToggle,getTargetId:()=>rn,getDropdownId:()=>`${rn}-dropdown`,withRoles:D,targetProps:ie,__staticSelector:Y,classNames:S,styles:C,unstyled:_,variant:$,keepMounted:X,getStyles:Re,resolvedStyles:pe,floatingStrategy:ae,referenceHidden:oe&&Ye!=="test"?(An=Q.floating.middlewareData.hide)==null?void 0:An.referenceHidden:!1},children:[t,le&&k.jsx(Xo,{transition:"fade",mounted:Q.opened,duration:(l==null?void 0:l.duration)||250,exitDuration:(l==null?void 0:l.exitDuration)||250,children:on=>k.jsx(el,{withinPortal:A,children:k.jsx(Am,{...ye,...Re("overlay",{className:ye==null?void 0:ye.className,style:[on,ye==null?void 0:ye.style]})})})})]})}Tn.Target=eL;Tn.Dropdown=N6;Tn.varsResolver=nL;Tn.displayName="@mantine/core/Popover";Tn.extend=e=>e;Tn.withProps=e=>{const n=t=>k.jsx(Tn,{...e,...t});return n.extend=Tn.extend,n.displayName=`WithProps(${Tn.displayName})`,n};var Ta={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 tL=({className:e,...n})=>k.jsxs(we,{component:"span",className:cn(Ta.barsLoader,e),...n,children:[k.jsx("span",{className:Ta.bar}),k.jsx("span",{className:Ta.bar}),k.jsx("span",{className:Ta.bar})]});tL.displayName="@mantine/core/Bars";const iL=({className:e,...n})=>k.jsxs(we,{component:"span",className:cn(Ta.dotsLoader,e),...n,children:[k.jsx("span",{className:Ta.dot}),k.jsx("span",{className:Ta.dot}),k.jsx("span",{className:Ta.dot})]});iL.displayName="@mantine/core/Dots";const rL=({className:e,...n})=>k.jsx(we,{component:"span",className:cn(Ta.ovalLoader,e),...n});rL.displayName="@mantine/core/Oval";const aL={bars:tL,oval:rL,dots:iL},TQ={loaders:aL,type:"oval"},oL=(e,{size:n,color:t})=>({root:{"--loader-size":Mn(n,"loader-size"),"--loader-color":t?nt(t,e):void 0}}),Wi=Pe(e=>{const n=ge("Loader",TQ,e),{size:t,color:i,type:r,vars:a,className:o,style:l,classNames:f,styles:c,unstyled:h,loaders:d,variant:p,children:v,attributes:y,...b}=n,w=Ge({name:"Loader",props:n,classes:Ta,className:o,style:l,classNames:f,styles:c,unstyled:h,attributes:y,vars:a,varsResolver:oL});return v?k.jsx(we,{...w("root"),...b,children:v}):k.jsx(we,{...w("root"),component:d[r],variant:p,size:t,...b})});Wi.defaultLoaders=aL;Wi.classes=Ta;Wi.varsResolver=oL;Wi.displayName="@mantine/core/Loader";var bc={root:"m_8d3f4000",icon:"m_8d3afb97",loader:"m_302b9fb1",group:"m_1a0f1b21",groupSection:"m_437b6484"};const P5={orientation:"horizontal"},sL=(e,{borderWidth:n})=>({group:{"--ai-border-width":he(n)}}),K1=Pe(e=>{const n=ge("ActionIconGroup",P5,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,orientation:l,vars:f,borderWidth:c,variant:h,mod:d,attributes:p,...v}=ge("ActionIconGroup",P5,e);return k.jsx(we,{...Ge({name:"ActionIconGroup",props:n,classes:bc,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:p,vars:f,varsResolver:sL,rootSelector:"group"})("group"),variant:h,mod:[{"data-orientation":l},d],role:"group",...v})});K1.classes=bc;K1.varsResolver=sL;K1.displayName="@mantine/core/ActionIconGroup";const lL=(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":Mn(o,"section-height"),"--section-padding-x":Mn(o,"section-padding-x"),"--section-fz":Zt(o),"--section-radius":n===void 0?void 0:Ut(n),"--section-bg":t||r?l.background:void 0,"--section-color":l.color,"--section-bd":t||r?l.border:void 0}}},X1=Pe(e=>{const n=ge("ActionIconGroupSection",null,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,vars:l,variant:f,gradient:c,radius:h,autoContrast:d,attributes:p,...v}=n;return k.jsx(we,{...Ge({name:"ActionIconGroupSection",props:n,classes:bc,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:lL,rootSelector:"groupSection"})("groupSection"),variant:f,...v})});X1.classes=bc;X1.varsResolver=lL;X1.displayName="@mantine/core/ActionIconGroupSection";const uL=(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":Mn(n,"ai-size"),"--ai-radius":t===void 0?void 0:Ut(t),"--ai-bg":a||i?l.background:void 0,"--ai-hover":a||i?l.hover:void 0,"--ai-hover-color":a||i?l.hoverColor:void 0,"--ai-color":l.color,"--ai-bd":a||i?l.border:void 0}}},Ht=$i(e=>{const n=ge("ActionIcon",null,e),{className:t,unstyled:i,variant:r,classNames:a,styles:o,style:l,loading:f,loaderProps:c,size:h,color:d,radius:p,__staticSelector:v,gradient:y,vars:b,children:w,disabled:_,"data-disabled":S,autoContrast:C,mod:E,attributes:A,...T}=n,j=Ge({name:["ActionIcon",v],props:n,className:t,style:l,classes:bc,classNames:a,styles:o,unstyled:i,attributes:A,vars:b,varsResolver:uL});return k.jsxs(fi,{...j("root",{active:!_&&!f&&!S}),...T,unstyled:i,variant:r,size:h,disabled:_||f,mod:[{loading:f,disabled:_||S},E],children:[typeof f=="boolean"&&k.jsx(Xo,{mounted:f,transition:"slide-down",duration:150,children:N=>k.jsx(we,{component:"span",...j("loader",{style:N}),"aria-hidden":!0,children:k.jsx(Wi,{color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)",...c})})}),k.jsx(we,{component:"span",mod:{loading:f},...j("icon"),children:w})]})});Ht.classes=bc;Ht.varsResolver=uL;Ht.displayName="@mantine/core/ActionIcon";Ht.Group=K1;Ht.GroupSection=X1;function fL({size:e="var(--cb-icon-size, 70%)",style:n,...t}){return k.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...n,width:e,height:e},...t,children:k.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"})})}fL.displayName="@mantine/core/CloseIcon";var cL={root:"m_86a44da5","root--subtle":"m_220c80f2"};const MQ={variant:"subtle"},dL=(e,{size:n,radius:t,iconSize:i})=>({root:{"--cb-size":Mn(n,"cb-size"),"--cb-radius":t===void 0?void 0:Ut(t),"--cb-icon-size":he(i)}}),bu=$i(e=>{const n=ge("CloseButton",MQ,e),{iconSize:t,children:i,vars:r,radius:a,className:o,classNames:l,style:f,styles:c,unstyled:h,"data-disabled":d,disabled:p,variant:v,icon:y,mod:b,attributes:w,__staticSelector:_,...S}=n,C=Ge({name:_||"CloseButton",props:n,className:o,style:f,classes:cL,classNames:l,styles:c,unstyled:h,attributes:w,vars:r,varsResolver:dL});return k.jsxs(fi,{...S,unstyled:h,variant:v,disabled:p,mod:[{disabled:p||d},b],...C("root",{variant:v,active:!p&&!d}),children:[y||k.jsx(fL,{}),i]})});bu.classes=cL;bu.varsResolver=dL;bu.displayName="@mantine/core/CloseButton";function jQ(e){return O.Children.toArray(e).filter(Boolean)}var hL={root:"m_4081bf90"};const DQ={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},mL=(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":Ft(i),"--group-align":r,"--group-justify":a,"--group-wrap":o}}),wn=Pe(e=>{const n=ge("Group",DQ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,children:l,gap:f,align:c,justify:h,wrap:d,grow:p,preventGrowOverflow:v,vars:y,variant:b,__size:w,mod:_,attributes:S,...C}=n,E=jQ(l),A=E.length,T=Ft(f??"md");return k.jsx(we,{...Ge({name:"Group",props:n,stylesCtx:{childWidth:`calc(${100/A}% - (${T} - ${T} / ${A}))`},className:i,style:r,classes:hL,classNames:t,styles:a,unstyled:o,attributes:S,vars:y,varsResolver:mL})("root"),variant:b,mod:[{grow:p},_],size:w,...C,children:E})});wn.classes=hL;wn.varsResolver=mL;wn.displayName="@mantine/core/Group";const[RQ,rs]=da("ModalBase component was not found in tree");function PQ({opened:e,transitionDuration:n}){const[t,i]=O.useState(e),r=O.useRef(-1),a=h6()?0:n;return O.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 NQ({id:e,transitionProps:n,opened:t,trapFocus:i,closeOnEscape:r,onClose:a,returnFocus:o}){const l=Gi(e),[f,c]=O.useState(!1),[h,d]=O.useState(!1),p=PQ({opened:t,transitionDuration:typeof(n==null?void 0:n.duration)=="number"?n==null?void 0:n.duration:200});return K$("keydown",v=>{var y;v.key==="Escape"&&r&&!v.isComposing&&t&&((y=v.target)==null?void 0:y.getAttribute("data-mantine-stop-propagation"))!=="true"&&a()},{capture:!0}),V$({opened:t,shouldReturnFocus:i&&o}),{_id:l,titleMounted:f,bodyMounted:h,shouldLockScroll:p,setTitleMounted:c,setBodyMounted:d}}var Ga=function(){return Ga=Object.assign||function(n){for(var t,i=1,r=arguments.length;i"u")return QQ;var n=JQ(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])}},nJ=yL(),jf="data-scroll-locked",tJ=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(zQ,` { - overflow: hidden `).concat(i,`; - padding-right: `).concat(l,"px ").concat(i,`; - } - body[`).concat(jf,`] { - overflow: hidden `).concat(i,`; - overscroll-behavior: contain; - `).concat([n&&"position: relative ".concat(i,";"),t==="margin"&&` - padding-left: `.concat(r,`px; - padding-top: `).concat(a,`px; - padding-right: `).concat(o,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(l,"px ").concat(i,`; - `),t==="padding"&&"padding-right: ".concat(l,"px ").concat(i,";")].filter(Boolean).join(""),` - } - - .`).concat(Xv,` { - right: `).concat(l,"px ").concat(i,`; - } - - .`).concat(Zv,` { - margin-right: `).concat(l,"px ").concat(i,`; - } - - .`).concat(Xv," .").concat(Xv,` { - right: 0 `).concat(i,`; - } - - .`).concat(Zv," .").concat(Zv,` { - margin-right: 0 `).concat(i,`; - } - - body[`).concat(jf,`] { - `).concat(LQ,": ").concat(l,`px; - } -`)},$5=function(){var e=parseInt(document.body.getAttribute(jf)||"0",10);return isFinite(e)?e:0},iJ=function(){O.useEffect(function(){return document.body.setAttribute(jf,($5()+1).toString()),function(){var e=$5()-1;e<=0?document.body.removeAttribute(jf):document.body.setAttribute(jf,e.toString())}},[])},rJ=function(e){var n=e.noRelative,t=e.noImportant,i=e.gapMode,r=i===void 0?"margin":i;iJ();var a=O.useMemo(function(){return eJ(r)},[r]);return O.createElement(nJ,{styles:tJ(a,!n,r,t?"":"!important")})},aS=!1;if(typeof window<"u")try{var yv=Object.defineProperty({},"passive",{get:function(){return aS=!0,!0}});window.addEventListener("test",yv,yv),window.removeEventListener("test",yv,yv)}catch{aS=!1}var df=aS?{passive:!1}:!1,aJ=function(e){return e.tagName==="TEXTAREA"},bL=function(e,n){if(!(e instanceof Element))return!1;var t=window.getComputedStyle(e);return t[n]!=="hidden"&&!(t.overflowY===t.overflowX&&!aJ(e)&&t[n]==="visible")},oJ=function(e){return bL(e,"overflowY")},sJ=function(e){return bL(e,"overflowX")},z5=function(e,n){var t=n.ownerDocument,i=n;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var r=wL(e,i);if(r){var a=kL(e,i),o=a[1],l=a[2];if(o>l)return!0}i=i.parentNode}while(i&&i!==t.body);return!1},lJ=function(e){var n=e.scrollTop,t=e.scrollHeight,i=e.clientHeight;return[n,t,i]},uJ=function(e){var n=e.scrollLeft,t=e.scrollWidth,i=e.clientWidth;return[n,t,i]},wL=function(e,n){return e==="v"?oJ(n):sJ(n)},kL=function(e,n){return e==="v"?lJ(n):uJ(n)},fJ=function(e,n){return e==="h"&&n==="rtl"?-1:1},cJ=function(e,n,t,i,r){var a=fJ(e,window.getComputedStyle(n).direction),o=a*i,l=t.target,f=n.contains(l),c=!1,h=o>0,d=0,p=0;do{if(!l)break;var v=kL(e,l),y=v[0],b=v[1],w=v[2],_=b-w-a*y;(y||_)&&wL(e,l)&&(d+=_,p+=y);var S=l.parentNode;l=S&&S.nodeType===Node.DOCUMENT_FRAGMENT_NODE?S.host:S}while(!f&&l!==document.body||f&&(n.contains(l)||n===l));return(h&&Math.abs(d)<1||!h&&Math.abs(p)<1)&&(c=!0),c},bv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},L5=function(e){return[e.deltaX,e.deltaY]},I5=function(e){return e&&"current"in e?e.current:e},dJ=function(e,n){return e[0]===n[0]&&e[1]===n[1]},hJ=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},mJ=0,hf=[];function pJ(e){var n=O.useRef([]),t=O.useRef([0,0]),i=O.useRef(),r=O.useState(mJ++)[0],a=O.useState(yL)[0],o=O.useRef(e);O.useEffect(function(){o.current=e},[e]),O.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var b=$Q([e.lockRef.current],(e.shards||[]).map(I5),!0).filter(Boolean);return b.forEach(function(w){return w.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),b.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var l=O.useCallback(function(b,w){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!o.current.allowPinchZoom;var _=bv(b),S=t.current,C="deltaX"in b?b.deltaX:S[0]-_[0],E="deltaY"in b?b.deltaY:S[1]-_[1],A,T=b.target,j=Math.abs(C)>Math.abs(E)?"h":"v";if("touches"in b&&j==="h"&&T.type==="range")return!1;var N=window.getSelection(),q=N&&N.anchorNode,R=q?q===T||q.contains(T):!1;if(R)return!1;var L=z5(j,T);if(!L)return!0;if(L?A=j:(A=j==="v"?"h":"v",L=z5(j,T)),!L)return!1;if(!i.current&&"changedTouches"in b&&(C||E)&&(i.current=A),!A)return!0;var B=i.current||A;return cJ(B,w,b,B==="h"?C:E)},[]),f=O.useCallback(function(b){var w=b;if(!(!hf.length||hf[hf.length-1]!==a)){var _="deltaY"in w?L5(w):bv(w),S=n.current.filter(function(A){return A.name===w.type&&(A.target===w.target||w.target===A.shadowParent)&&dJ(A.delta,_)})[0];if(S&&S.should){w.cancelable&&w.preventDefault();return}if(!S){var C=(o.current.shards||[]).map(I5).filter(Boolean).filter(function(A){return A.contains(w.target)}),E=C.length>0?l(w,C[0]):!o.current.noIsolation;E&&w.cancelable&&w.preventDefault()}}},[]),c=O.useCallback(function(b,w,_,S){var C={name:b,delta:w,target:_,should:S,shadowParent:vJ(_)};n.current.push(C),setTimeout(function(){n.current=n.current.filter(function(E){return E!==C})},1)},[]),h=O.useCallback(function(b){t.current=bv(b),i.current=void 0},[]),d=O.useCallback(function(b){c(b.type,L5(b),b.target,l(b,e.lockRef.current))},[]),p=O.useCallback(function(b){c(b.type,bv(b),b.target,l(b,e.lockRef.current))},[]);O.useEffect(function(){return hf.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",f,df),document.addEventListener("touchmove",f,df),document.addEventListener("touchstart",h,df),function(){hf=hf.filter(function(b){return b!==a}),document.removeEventListener("wheel",f,df),document.removeEventListener("touchmove",f,df),document.removeEventListener("touchstart",h,df)}},[]);var v=e.removeScrollBar,y=e.inert;return O.createElement(O.Fragment,null,y?O.createElement(a,{styles:hJ(r)}):null,v?O.createElement(rJ,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function vJ(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const gJ=VQ(gL,pJ);var ru=O.forwardRef(function(e,n){return O.createElement(Z1,Ga({},e,{ref:n,sideCar:gJ}))});ru.classNames=Z1.classNames;function _L({keepMounted:e,opened:n,onClose:t,id:i,transitionProps:r,onExitTransitionEnd:a,onEnterTransitionEnd:o,trapFocus:l,closeOnEscape:f,returnFocus:c,closeOnClickOutside:h,withinPortal:d,portalProps:p,lockScroll:v,children:y,zIndex:b,shadow:w,padding:_,__vars:S,unstyled:C,removeScrollProps:E,...A}){const{_id:T,titleMounted:j,bodyMounted:N,shouldLockScroll:q,setTitleMounted:R,setBodyMounted:L}=NQ({id:i,transitionProps:r,opened:n,trapFocus:l,closeOnEscape:f,onClose:t,returnFocus:c}),{key:B,...G}=E||{};return k.jsx(el,{...p,withinPortal:d,children:k.jsx(RQ,{value:{opened:n,onClose:t,closeOnClickOutside:h,onExitTransitionEnd:a,onEnterTransitionEnd:o,transitionProps:{...r,keepMounted:e},getTitleId:()=>`${T}-title`,getBodyId:()=>`${T}-body`,titleMounted:j,bodyMounted:N,setTitleMounted:R,setBodyMounted:L,trapFocus:l,closeOnEscape:f,zIndex:b,unstyled:C},children:k.jsx(ru,{enabled:q&&v,...G,children:k.jsx(we,{...A,id:T,__vars:{...S,"--mb-z-index":(b||ha("modal")).toString(),"--mb-shadow":c6(w),"--mb-padding":Ft(_)},children:y})},B)})})}_L.displayName="@mantine/core/ModalBase";function yJ(){const e=rs();return O.useEffect(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var Bf={title:"m_615af6c9",header:"m_b5489c3c",inner:"m_60c222c7",content:"m_fd1ab0aa",close:"m_606cb269",body:"m_5df29311"};function xL({className:e,...n}){const t=yJ(),i=rs();return k.jsx(we,{id:t,className:cn({[Bf.body]:!i.unstyled},e),...n})}xL.displayName="@mantine/core/ModalBaseBody";function SL({className:e,onClick:n,...t}){const i=rs();return k.jsx(bu,{...t,onClick:r=>{i.onClose(),n==null||n(r)},className:cn({[Bf.close]:!i.unstyled},e),unstyled:i.unstyled})}SL.displayName="@mantine/core/ModalBaseCloseButton";function CL({transitionProps:e,className:n,innerProps:t,onKeyDown:i,style:r,ref:a,...o}){const l=rs();return k.jsx(Xo,{mounted:l.opened,transition:"pop",...l.transitionProps,onExited:()=>{var f,c,h;(f=l.onExitTransitionEnd)==null||f.call(l),(h=(c=l.transitionProps)==null?void 0:c.onExited)==null||h.call(c)},onEntered:()=>{var f,c,h;(f=l.onEnterTransitionEnd)==null||f.call(l),(h=(c=l.transitionProps)==null?void 0:c.onEntered)==null||h.call(c)},...e,children:f=>k.jsx("div",{...t,className:cn({[Bf.inner]:!l.unstyled},t.className),children:k.jsx(Y1,{active:l.opened&&l.trapFocus,innerRef:a,children:k.jsx(ei,{...o,component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":l.bodyMounted?l.getBodyId():void 0,"aria-labelledby":l.titleMounted?l.getTitleId():void 0,style:[r,f],className:cn({[Bf.content]:!l.unstyled},n),unstyled:l.unstyled,children:o.children})})})})}CL.displayName="@mantine/core/ModalBaseContent";function AL({className:e,...n}){const t=rs();return k.jsx(we,{component:"header",className:cn({[Bf.header]:!t.unstyled},e),...n})}AL.displayName="@mantine/core/ModalBaseHeader";const bJ={duration:200,timingFunction:"ease",transition:"fade"};function wJ(e){const n=rs();return{...bJ,...n.transitionProps,...e}}function OL({onClick:e,transitionProps:n,style:t,visible:i,...r}){const a=rs(),o=wJ(n);return k.jsx(Xo,{mounted:i!==void 0?i:a.opened,...o,transition:"fade",children:l=>k.jsx(Am,{fixed:!0,style:[t,l],zIndex:a.zIndex,unstyled:a.unstyled,onClick:f=>{e==null||e(f),a.closeOnClickOutside&&a.onClose()},...r})})}OL.displayName="@mantine/core/ModalBaseOverlay";function kJ(){const e=rs();return O.useEffect(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}function EL({className:e,...n}){const t=kJ(),i=rs();return k.jsx(we,{component:"h2",className:cn({[Bf.title]:!i.unstyled},e),id:t,...n})}EL.displayName="@mantine/core/ModalBaseTitle";function _J({children:e}){return k.jsx(k.Fragment,{children:e})}const TL=O.createContext({size:"sm"}),ML=Pe(e=>{const n=ge("InputClearButton",null,e),{size:t,variant:i,vars:r,classNames:a,styles:o,...l}=n,f=O.use(TL),{resolvedClassNames:c,resolvedStyles:h}=Ni({classNames:a,styles:o,props:n});return k.jsx(bu,{variant:i||"transparent",size:t||(f==null?void 0:f.size)||"sm",classNames:c,styles:h,__staticSelector:"InputClearButton",style:{pointerEvents:"all",background:"var(--input-bg)",...l.style},...l})});ML.displayName="@mantine/core/InputClearButton";const xJ={xs:7,sm:8,md:10,lg:12,xl:15};function SJ({__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)?k.jsxs("div",{"data-combined-clear-section":!0,style:{display:"flex",gap:2,alignItems:"center",paddingInlineEnd:xJ[r]},children:[o,t||i]}):t===null?null:t||o||i}const wu=O.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0});var va={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 jL=(e,{size:n})=>({description:{"--input-description-size":n===void 0?void 0:`calc(${Zt(n)} - ${he(2)})`}}),Om=Pe(e=>{const n=ge("InputDescription",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,__inheritStyles:c=!0,attributes:h,...d}=ge("InputDescription",null,n),p=O.use(wu),v=Ge({name:["InputWrapper",f],props:n,classes:va,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,rootSelector:"description",vars:l,varsResolver:jL});return k.jsx(we,{component:"p",...(c&&(p==null?void 0:p.getStyles)||v)("description",p!=null&&p.getStyles?{className:i,style:r}:void 0),...d})});Om.classes=va;Om.varsResolver=jL;Om.displayName="@mantine/core/InputDescription";const DL=(e,{size:n})=>({error:{"--input-error-size":n===void 0?void 0:`calc(${Zt(n)} - ${he(2)})`}}),Em=Pe(e=>{const n=ge("InputError",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:f,__staticSelector:c,__inheritStyles:h=!0,...d}=n,p=Ge({name:["InputWrapper",c],props:n,classes:va,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:f,rootSelector:"error",vars:l,varsResolver:DL}),v=O.use(wu);return k.jsx(we,{component:"p",...(h&&(v==null?void 0:v.getStyles)||p)("error",v!=null&&v.getStyles?{className:i,style:r}:void 0),...d})});Em.classes=va;Em.varsResolver=DL;Em.displayName="@mantine/core/InputError";const CJ={labelElement:"label"},RL=(e,{size:n})=>({label:{"--input-label-size":Zt(n),"--input-asterisk-color":void 0}}),Tm=Pe(e=>{const n=ge("InputLabel",CJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,labelElement:f,required:c,htmlFor:h,onMouseDown:d,children:p,__staticSelector:v,mod:y,attributes:b,...w}=n,_=Ge({name:["InputWrapper",v],props:n,classes:va,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,rootSelector:"label",vars:l,varsResolver:RL}),S=O.use(wu),C=(S==null?void 0:S.getStyles)||_;return k.jsxs(we,{...C("label",S!=null&&S.getStyles?{className:i,style:r}:void 0),component:f,htmlFor:f==="label"?h:void 0,mod:[{required:c},y],onMouseDown:E=>{d==null||d(E),!E.defaultPrevented&&E.detail>1&&E.preventDefault()},...w,children:[p,c&&k.jsx("span",{...C("required"),"aria-hidden":!0,children:" *"})]})});Tm.classes=va;Tm.varsResolver=RL;Tm.displayName="@mantine/core/InputLabel";const $6=Pe(e=>{const n=ge("InputPlaceholder",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,error:c,mod:h,attributes:d,...p}=n;return k.jsx(we,{...Ge({name:["InputPlaceholder",f],props:n,classes:va,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:d,rootSelector:"placeholder"})("placeholder"),mod:[{error:!!c},h],component:"span",...p})});$6.classes=va;$6.displayName="@mantine/core/InputPlaceholder";function AJ(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 OJ={labelElement:"label",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},PL=(e,{size:n})=>({label:{"--input-label-size":Zt(n),"--input-asterisk-color":void 0},error:{"--input-error-size":n===void 0?void 0:`calc(${Zt(n)} - ${he(2)})`},description:{"--input-description-size":n===void 0?void 0:`calc(${Zt(n)} - ${he(2)})`}}),Q1=Pe(e=>{const n=ge("InputWrapper",OJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:f,variant:c,__staticSelector:h,inputContainer:d,inputWrapperOrder:p,label:v,error:y,description:b,labelProps:w,descriptionProps:_,errorProps:S,labelElement:C,children:E,withAsterisk:A,id:T,required:j,__stylesApiProps:N,mod:q,attributes:R,...L}=n,B=Ge({name:["InputWrapper",h],props:N||n,classes:va,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:R,vars:l,varsResolver:PL}),G={size:f,variant:c,__staticSelector:h},H=Gi(T),U=typeof A=="boolean"?A:j,P=(S==null?void 0:S.id)||`${H}-error`,z=(_==null?void 0:_.id)||`${H}-description`,F=H,Y=!!y&&typeof y!="boolean",D=!!b,V=`${Y?P:""} ${D?z:""}`,W=V.trim().length>0?V.trim():void 0,$=(w==null?void 0:w.id)||`${H}-label`,X=v&&k.jsx(Tm,{labelElement:C,id:$,htmlFor:F,required:U,...G,...w,children:v},"label"),te=D&&k.jsx(Om,{..._,...G,size:(_==null?void 0:_.size)||G.size,id:(_==null?void 0:_.id)||z,children:b},"description"),ae=k.jsx(O.Fragment,{children:d(E)},"input"),le=Y&&O.createElement(Em,{...S,...G,size:(S==null?void 0:S.size)||G.size,key:"error",id:(S==null?void 0:S.id)||P},y),ye=p.map(oe=>{switch(oe){case"label":return X;case"input":return ae;case"description":return te;case"error":return le;default:return null}});return k.jsx(wu,{value:{getStyles:B,describedBy:W,inputId:F,labelId:$,...AJ(p,{hasDescription:D,hasError:Y})},children:k.jsx(we,{variant:c,size:f,mod:[{error:!!y},q],id:C==="label"?void 0:T,...B("root"),...L,children:ye})})});Q1.classes=va;Q1.varsResolver=PL;Q1.displayName="@mantine/core/InputWrapper";const EJ={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0,size:"sm",loading:!1,loadingPosition:"right"},NL=(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":Mn(n.size,"input-height"),"--input-fz":Zt(n.size),"--input-radius":n.radius===void 0?void 0:Ut(n.radius),"--input-left-section-width":n.leftSectionWidth!==void 0?he(n.leftSectionWidth):void 0,"--input-right-section-width":n.rightSectionWidth!==void 0?he(n.rightSectionWidth):void 0,"--input-padding-y":n.multiline?Mn(n.size,"input-padding-y"):void 0,"--input-left-section-pointer-events":n.leftSectionPointerEvents,"--input-right-section-pointer-events":n.rightSectionPointerEvents}}),Nt=$i(e=>{const n=ge("Input",EJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,required:l,__staticSelector:f,__stylesApiProps:c,size:h,wrapperProps:d,error:p,disabled:v,leftSection:y,leftSectionProps:b,leftSectionWidth:w,rightSection:_,rightSectionProps:S,rightSectionWidth:C,rightSectionPointerEvents:E,leftSectionPointerEvents:A,variant:T,vars:j,pointer:N,multiline:q,radius:R,id:L,withAria:B,withErrorStyles:G,mod:H,inputSize:U,attributes:P,__clearSection:z,__clearable:F,__clearSectionMode:Y,__defaultRightSection:D,loading:V,loadingPosition:W,rootRef:$,...X}=n,{styleProps:te,rest:ae}=gu(X),le=O.use(wu),ye={offsetBottom:le==null?void 0:le.offsetBottom,offsetTop:le==null?void 0:le.offsetTop},oe=Ge({name:["Input",f],props:c||n,classes:va,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:P,stylesCtx:ye,rootSelector:"wrapper",vars:j,varsResolver:NL}),ue=B?{required:l,disabled:v,"aria-invalid":p?!0:void 0,"aria-describedby":le==null?void 0:le.describedBy,id:(le==null?void 0:le.inputId)||L}:{},ke=V?k.jsx(Wi,{size:W==="left"?"calc(var(--input-left-section-size) / 2)":"calc(var(--input-right-section-size) / 2)"}):null,ie=V&&W==="left"?ke:y,Re=SJ({__clearable:F,__clearSection:z,rightSection:V&&W==="right"?ke:_,__defaultRightSection:D,size:h,__clearSectionMode:Y});return k.jsx(TL,{value:{size:h||"sm"},children:k.jsxs(we,{ref:$,...oe("wrapper"),...te,...d,mod:[{error:!!p&&G,pointer:N,disabled:v,multiline:q,"data-with-right-section":!!Re,"data-with-left-section":!!ie},H],variant:T,size:h,children:[ie&&k.jsx("div",{...b,"data-position":"left",...oe("section",{className:b==null?void 0:b.className,style:b==null?void 0:b.style}),children:ie}),k.jsx(we,{component:"input",...ae,...ue,required:l,mod:{disabled:v,error:!!p&&G},variant:T,__size:U,...oe("input")}),Re&&k.jsx("div",{...S,"data-position":"right",...oe("section",{className:S==null?void 0:S.className,style:S==null?void 0:S.style}),children:Re})]})})});Nt.classes=va;Nt.varsResolver=NL;Nt.Wrapper=Q1;Nt.Label=Tm;Nt.Error=Em;Nt.Description=Om;Nt.Placeholder=$6;Nt.ClearButton=ML;Nt.displayName="@mantine/core/Input";function $L(e,n,t){const i=ge(e,n,t),{label:r,description:a,error:o,required:l,classNames:f,styles:c,className:h,unstyled:d,__staticSelector:p,__stylesApiProps:v,errorProps:y,labelProps:b,descriptionProps:w,wrapperProps:_,id:S,size:C,style:E,inputContainer:A,inputWrapperOrder:T,withAsterisk:j,variant:N,vars:q,mod:R,attributes:L,...B}=i,{styleProps:G,rest:H}=gu(B),U={label:r,description:a,error:o,required:l,classNames:f,className:h,__staticSelector:p,__stylesApiProps:v||i,errorProps:y,labelProps:b,descriptionProps:w,unstyled:d,styles:c,size:C,style:E,inputContainer:A,inputWrapperOrder:T,withAsterisk:j,variant:N,id:S,mod:R,attributes:L,..._};return{...H,classNames:f,styles:c,unstyled:d,wrapperProps:{...U,...G},inputProps:{required:l,classNames:f,styles:c,unstyled:d,size:C,__staticSelector:p,__stylesApiProps:v||i,error:o,variant:N,id:S,attributes:L}}}const TJ={__staticSelector:"InputBase",withAria:!0,size:"sm"},zi=$i(e=>{const{inputProps:n,wrapperProps:t,...i}=$L("InputBase",TJ,e);return k.jsx(Nt.Wrapper,{...t,children:k.jsx(Nt,{...n,...i})})});zi.classes={...Nt.classes,...Nt.Wrapper.classes};zi.displayName="@mantine/core/InputBase";function gg({style:e,size:n=16,...t}){return k.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...e,width:he(n),height:he(n),display:"block"},...t,children:k.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"})})}gg.displayName="@mantine/core/AccordionChevron";var zL={root:"m_b6d8b162"};function MJ(e){if(e==="start")return"start";if(e==="end"||e)return"end"}const jJ={inherit:!1},LL=(e,{variant:n,lineClamp:t,gradient:i,size:r})=>({root:{"--text-fz":Zt(r),"--text-lh":UY(r),"--text-gradient":n==="gradient"?Y3(i,e):void 0,"--text-line-clamp":typeof t=="number"?t.toString():void 0}}),un=$i(e=>{const n=ge("Text",jJ,e),{lineClamp:t,truncate:i,inline:r,inherit:a,gradient:o,span:l,__staticSelector:f,vars:c,className:h,style:d,classNames:p,styles:v,unstyled:y,variant:b,mod:w,size:_,attributes:S,...C}=n;return k.jsx(we,{...Ge({name:["Text",f],props:n,classes:zL,className:h,style:d,classNames:p,styles:v,unstyled:y,attributes:S,vars:c,varsResolver:LL})("root",{focusable:!0}),component:l?"span":"p",variant:b,mod:[{"data-truncate":MJ(i),"data-line-clamp":typeof t=="number","data-inline":r,"data-inherit":a},w],size:_,...C})});un.classes=zL;un.varsResolver=LL;un.displayName="@mantine/core/Text";var IL={root:"m_849cf0da"};const DJ={underline:"hover"},z6=$i(e=>{const{underline:n,className:t,unstyled:i,mod:r,...a}=ge("Anchor",DJ,e);return k.jsx(un,{component:"a",className:cn({[IL.root]:!i},t),...a,mod:[{underline:n},r],__staticSelector:"Anchor",unstyled:i})});z6.classes=IL;z6.displayName="@mantine/core/Anchor";const[RJ,wc]=da("AppShell was not found in tree");var rl={root:"m_89ab340",navbar:"m_45252eee",aside:"m_9cdde9a",header:"m_3b16f56b",main:"m_8983817",footer:"m_3840c879",section:"m_6dcfc7c7"};const L6=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:f,mod:c,...h}=ge("AppShellAside",null,e),d=wc();return d.disabled?null:k.jsx(we,{component:"aside",mod:[{"with-border":l??d.withBorder},c],...d.getStyles("aside",{className:cn({[ru.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-aside-z-index":`calc(${f??d.zIndex} + 1)`}})});L6.classes=rl;L6.displayName="@mantine/core/AppShellAside";const I6=Pe(e=>{var p;const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:f,mod:c,...h}=ge("AppShellFooter",null,e),d=wc();return d.disabled?null:k.jsx(we,{component:"footer",mod:[{"with-border":l??d.withBorder},c],...d.getStyles("footer",{className:cn({[ru.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-footer-z-index":(p=f??d.zIndex)==null?void 0:p.toString()}})});I6.classes=rl;I6.displayName="@mantine/core/AppShellFooter";const B6=Pe(e=>{var p;const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:f,mod:c,...h}=ge("AppShellHeader",null,e),d=wc();return d.disabled?null:k.jsx(we,{component:"header",mod:[{"with-border":l??d.withBorder},c],...d.getStyles("header",{className:cn({[ru.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-header-z-index":(p=f??d.zIndex)==null?void 0:p.toString()}})});B6.classes=rl;B6.displayName="@mantine/core/AppShellHeader";const F6=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ge("AppShellMain",null,e);return k.jsx(we,{component:"main",...wc().getStyles("main",{className:t,style:i,classNames:n,styles:r}),...o})});F6.classes=rl;F6.displayName="@mantine/core/AppShellMain";const q6=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:f,mod:c,...h}=ge("AppShellNavbar",null,e),d=wc();return d.disabled?null:k.jsx(we,{component:"nav",mod:[{"with-border":l??d.withBorder},c],...d.getStyles("navbar",{className:t,classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-navbar-z-index":`calc(${f??d.zIndex} + 1)`}})});q6.classes=rl;q6.displayName="@mantine/core/AppShellNavbar";const H6=$i(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,grow:o,mod:l,...f}=ge("AppShellSection",null,e),c=wc();return k.jsx(we,{mod:[{grow:o},l],...c.getStyles("section",{className:t,style:i,classNames:n,styles:r}),...f})});H6.classes=rl;H6.displayName="@mantine/core/AppShellSection";function Mm(e){return typeof e=="object"?e.base:e}function jm(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 Dm(e){return!(typeof e!="object"||e===null||Object.keys(e).length===1&&"base"in e)}function PJ({baseStyles:e,minMediaStyles:n,maxMediaStyles:t,aside:i,theme:r,mode:a}){var c,h,d;const o=i==null?void 0:i.width,l="translateX(var(--app-shell-aside-width))",f="translateX(calc(var(--app-shell-aside-width) * -1))";if(i!=null&&i.breakpoint&&!((c=i==null?void 0:i.collapsed)!=null&&c.mobile)&&(t[i==null?void 0:i.breakpoint]=t[i==null?void 0:i.breakpoint]||{},a==="fixed"?(t[i==null?void 0:i.breakpoint]["--app-shell-aside-width"]="100%",t[i==null?void 0:i.breakpoint]["--app-shell-aside-offset"]="0px"):(t[i==null?void 0:i.breakpoint]["--app-shell-aside-width"]="0px",t[i==null?void 0:i.breakpoint]["--app-shell-aside-offset"]="0px")),jm(o)){const p=he(Mm(o));e["--app-shell-aside-width"]=p,e["--app-shell-aside-offset"]=p}if(Dm(o)&&(typeof o.base<"u"&&(e["--app-shell-aside-width"]=he(o.base),e["--app-shell-aside-offset"]=he(o.base)),St(o).forEach(p=>{p!=="base"&&(n[p]=n[p]||{},n[p]["--app-shell-aside-width"]=he(o[p]),n[p]["--app-shell-aside-offset"]=he(o[p]))})),i!=null&&i.breakpoint&&a==="static"&&(n[i.breakpoint]=n[i.breakpoint]||{},n[i.breakpoint]["--app-shell-aside-position"]="sticky",n[i.breakpoint]["--app-shell-aside-grid-row"]="2",n[i.breakpoint]["--app-shell-aside-grid-column"]="3",n[i.breakpoint]["--app-shell-main-column-end"]="3"),(h=i==null?void 0:i.collapsed)!=null&&h.desktop){const p=i.breakpoint;n[p]=n[p]||{},n[p]["--app-shell-aside-transform"]=l,n[p]["--app-shell-aside-transform-rtl"]=f,a==="fixed"?n[p]["--app-shell-aside-offset"]="0px !important":(n[p]["--app-shell-aside-width"]="0px",n[p]["--app-shell-aside-display"]="none",n[p]["--app-shell-main-column-end"]="-1"),n[p]["--app-shell-aside-scroll-locked-visibility"]="hidden"}if((d=i==null?void 0:i.collapsed)!=null&&d.mobile){const p=d6(i.breakpoint,r.breakpoints)-.1;t[p]=t[p]||{},a==="fixed"?(t[p]["--app-shell-aside-width"]="100%",t[p]["--app-shell-aside-offset"]="0px"):t[p]["--app-shell-aside-width"]="0px",t[p]["--app-shell-aside-transform"]=l,t[p]["--app-shell-aside-transform-rtl"]=f,t[p]["--app-shell-aside-scroll-locked-visibility"]="hidden"}}function NJ({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"),jm(r)){const l=he(Mm(r));e["--app-shell-footer-height"]=l,o&&(e["--app-shell-footer-offset"]=l)}Dm(r)&&(typeof r.base<"u"&&(e["--app-shell-footer-height"]=he(r.base),o&&(e["--app-shell-footer-offset"]=he(r.base))),St(r).forEach(l=>{l!=="base"&&(n[l]=n[l]||{},n[l]["--app-shell-footer-height"]=he(r[l]),o&&(n[l]["--app-shell-footer-offset"]=he(r[l])))})),t!=null&&t.collapsed&&(e["--app-shell-footer-transform"]=a,i==="fixed"&&(e["--app-shell-footer-offset"]="0px !important"))}function $J({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"),jm(r)){const l=he(Mm(r));e["--app-shell-header-height"]=l,o&&(e["--app-shell-header-offset"]=l)}Dm(r)&&(typeof r.base<"u"&&(e["--app-shell-header-height"]=he(r.base),o&&(e["--app-shell-header-offset"]=he(r.base))),St(r).forEach(l=>{l!=="base"&&(n[l]=n[l]||{},n[l]["--app-shell-header-height"]=he(r[l]),o&&(n[l]["--app-shell-header-offset"]=he(r[l])))})),t!=null&&t.collapsed&&(e["--app-shell-header-transform"]=a,i==="fixed"&&(e["--app-shell-header-offset"]="0px !important"))}function zJ({baseStyles:e,minMediaStyles:n,maxMediaStyles:t,navbar:i,theme:r,mode:a}){var c,h,d;const o=i==null?void 0:i.width,l="translateX(calc(var(--app-shell-navbar-width) * -1))",f="translateX(var(--app-shell-navbar-width))";if(i!=null&&i.breakpoint&&!((c=i==null?void 0:i.collapsed)!=null&&c.mobile)&&(t[i==null?void 0:i.breakpoint]=t[i==null?void 0:i.breakpoint]||{},t[i==null?void 0:i.breakpoint]["--app-shell-navbar-offset"]="0px",t[i==null?void 0:i.breakpoint]["--app-shell-navbar-width"]="100%",a==="static"&&(t[i==null?void 0:i.breakpoint]["--app-shell-navbar-grid-width"]="0px")),jm(o)){const p=he(Mm(o));e["--app-shell-navbar-width"]=p,e["--app-shell-navbar-offset"]=p,a==="static"&&(e["--app-shell-navbar-grid-width"]=p)}if(Dm(o)&&(typeof o.base<"u"&&(e["--app-shell-navbar-width"]=he(o.base),e["--app-shell-navbar-offset"]=he(o.base),a==="static"&&(e["--app-shell-navbar-grid-width"]=he(o.base))),St(o).forEach(p=>{p!=="base"&&(n[p]=n[p]||{},n[p]["--app-shell-navbar-width"]=he(o[p]),n[p]["--app-shell-navbar-offset"]=he(o[p]),a==="static"&&(n[p]["--app-shell-navbar-grid-width"]=he(o[p])))})),i!=null&&i.breakpoint&&a==="static"&&(n[i.breakpoint]=n[i.breakpoint]||{},n[i.breakpoint]["--app-shell-navbar-position"]="sticky",n[i.breakpoint]["--app-shell-navbar-grid-row"]="2",n[i.breakpoint]["--app-shell-navbar-grid-column"]="1",n[i.breakpoint]["--app-shell-main-column-start"]="2"),(h=i==null?void 0:i.collapsed)!=null&&h.desktop){const p=i.breakpoint;n[p]=n[p]||{},n[p]["--app-shell-navbar-transform"]=l,n[p]["--app-shell-navbar-transform-rtl"]=f,a==="fixed"?n[p]["--app-shell-navbar-offset"]="0px !important":(n[p]["--app-shell-navbar-width"]="0px",n[p]["--app-shell-navbar-display"]="none",n[p]["--app-shell-main-column-start"]="1")}if((d=i==null?void 0:i.collapsed)!=null&&d.mobile){const p=d6(i.breakpoint,r.breakpoints)-.1;t[p]=t[p]||{},t[p]["--app-shell-navbar-width"]="100%",t[p]["--app-shell-navbar-offset"]="0px",a==="static"&&(t[p]["--app-shell-navbar-grid-width"]="0px"),t[p]["--app-shell-navbar-transform"]=l,t[p]["--app-shell-navbar-transform-rtl"]=f}}function ok(e){return Number(e)===0?"0px":Ft(e)}function LJ({padding:e,baseStyles:n,minMediaStyles:t}){jm(e)&&(n["--app-shell-padding"]=ok(Mm(e))),Dm(e)&&(e.base&&(n["--app-shell-padding"]=ok(e.base)),St(e).forEach(i=>{i!=="base"&&(t[i]=t[i]||{},t[i]["--app-shell-padding"]=ok(e[i]))}))}function IJ({navbar:e,header:n,footer:t,aside:i,padding:r,theme:a,mode:o}){const l={},f={},c={};o==="static"&&(c["--app-shell-main-grid-column"]="1 / -1",c["--app-shell-main-grid-row"]="2"),zJ({baseStyles:c,minMediaStyles:l,maxMediaStyles:f,navbar:e,theme:a,mode:o}),PJ({baseStyles:c,minMediaStyles:l,maxMediaStyles:f,aside:i,theme:a,mode:o}),$J({baseStyles:c,minMediaStyles:l,header:n,mode:o}),NJ({baseStyles:c,minMediaStyles:l,footer:t,mode:o}),LJ({baseStyles:c,minMediaStyles:l,padding:r});const h=Ch(St(l),a.breakpoints).map(p=>({query:`(min-width: ${sg(p.px)})`,styles:l[p.value]})),d=Ch(St(f),a.breakpoints).map(p=>({query:`(max-width: ${sg(p.px)})`,styles:f[p.value]}));return{baseStyles:c,media:[...h,...d]}}function BJ({navbar:e,header:n,aside:t,footer:i,padding:r,mode:a,selector:o}){const l=ni(),f=so(),{media:c,baseStyles:h}=IJ({navbar:e,header:n,footer:i,aside:t,padding:r,theme:l,mode:a});return k.jsx(vc,{media:c,styles:h,selector:o||f.cssVariablesSelector})}function FJ({transitionDuration:e,disabled:n}){const[t,i]=O.useState(!0),r=O.useRef(-1),a=O.useRef(-1);return K$("resize",()=>{i(!0),clearTimeout(r.current),r.current=window.setTimeout(()=>O.startTransition(()=>{i(!1)}),200)}),ts(()=>{i(!0),clearTimeout(a.current),a.current=window.setTimeout(()=>O.startTransition(()=>{i(!1)}),e||0)},[n,e]),t}const qJ={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:"ease",zIndex:ha("app"),mode:"fixed"},BL=(e,{transitionDuration:n,transitionTimingFunction:t})=>({root:{"--app-shell-transition-duration":`${n}ms`,"--app-shell-transition-timing-function":t}}),mr=Pe(e=>{const n=ge("AppShell",qJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,navbar:f,withBorder:c,padding:h,transitionDuration:d,transitionTimingFunction:p,header:v,zIndex:y,layout:b,disabled:w,aside:_,footer:S,offsetScrollbars:C=!0,mode:E,mod:A,attributes:T,id:j,...N}=n,q=Ge({name:"AppShell",classes:rl,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:T,vars:l,varsResolver:BL}),R=FJ({disabled:w,transitionDuration:d}),L=Gi(j);return k.jsxs(RJ,{value:{getStyles:q,withBorder:c,zIndex:y,disabled:w,offsetScrollbars:C,mode:E},children:[k.jsx(BJ,{navbar:f,header:v,aside:_,footer:S,padding:h,mode:E,selector:E==="static"?`#${L}`:void 0}),k.jsx(we,{...q("root"),id:L,mod:[{resizing:R,layout:b,disabled:w,mode:E},A],...N})]})});mr.classes=rl;mr.varsResolver=BL;mr.displayName="@mantine/core/AppShell";mr.Navbar=q6;mr.Header=B6;mr.Main=F6;mr.Aside=L6;mr.Footer=I6;mr.Section=H6;function FL(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=>FL(n))}:typeof e=="number"||typeof e=="bigint"||typeof e=="boolean"?{value:e,label:`${e}`}:e}function J1(e){return e?e.map(n=>FL(n)):[]}function Rm(e){return e.reduce((n,t)=>"group"in t?{...n,...Rm(t.items)}:(n[`${t.value}`]=t,n),{})}var tr={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 HJ={error:null},qL=(e,{size:n,color:t})=>({chevron:{"--combobox-chevron-size":Mn(n,"combobox-chevron-size"),"--combobox-chevron-color":t?nt(t,e):void 0}}),ey=Pe(e=>{const n=ge("ComboboxChevron",HJ,e),{size:t,error:i,style:r,className:a,classNames:o,styles:l,unstyled:f,vars:c,attributes:h,mod:d,...p}=n,v=Ge({name:"ComboboxChevron",classes:tr,props:n,style:r,className:a,classNames:o,styles:l,unstyled:f,vars:c,varsResolver:qL,attributes:h,rootSelector:"chevron"});return k.jsx(we,{component:"svg",...p,...v("chevron"),size:t,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:i},d],children:k.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"})})});ey.classes=tr;ey.varsResolver=qL;ey.displayName="@mantine/core/ComboboxChevron";const[UJ,ga]=da("Combobox component was not found in tree");function HL({onMouseDown:e,onClick:n,onClear:t,...i}){return k.jsx(Nt.ClearButton,{tabIndex:-1,"aria-hidden":!0,...i,onMouseDown:r=>{r.preventDefault(),e==null||e(r)},onClick:r=>{t(),n==null||n(r)}})}HL.displayName="@mantine/core/ComboboxClearButton";const U6=Pe(e=>{const{classNames:n,styles:t,className:i,style:r,hidden:a,...o}=ge("ComboboxDropdown",null,e),l=ga();return k.jsx(Tn.Dropdown,{...o,role:"presentation","data-hidden":a||void 0,...l.getStyles("dropdown",{className:i,style:r,classNames:n,styles:t})})});U6.classes=tr;U6.displayName="@mantine/core/ComboboxDropdown";const VJ={refProp:"ref"},UL=Pe(e=>{const{children:n,refProp:t,ref:i}=ge("ComboboxDropdownTarget",VJ,e);if(ga(),!u6(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 k.jsx(Tn.Target,{ref:i,refProp:t,children:n})});UL.displayName="@mantine/core/ComboboxDropdownTarget";const V6=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ge("ComboboxEmpty",null,e);return k.jsx(we,{...ga().getStyles("empty",{className:t,classNames:n,styles:r,style:i}),...o})});V6.classes=tr;V6.displayName="@mantine/core/ComboboxEmpty";function W6({onKeyDown:e,onClick:n,withKeyboardNavigation:t,withAriaAttributes:i,withExpandedAttribute:r,targetType:a,autoComplete:o}){const l=ga(),[f,c]=O.useState(null),h=v=>{if(e==null||e(v),!l.readOnly&&t){if(v.nativeEvent.isComposing)return;if(v.nativeEvent.code==="ArrowDown"&&(v.preventDefault(),l.store.dropdownOpened?c(l.store.selectNextOption()):(l.store.openDropdown("keyboard"),c(l.store.selectActiveOption()),l.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),v.nativeEvent.code==="ArrowUp"&&(v.preventDefault(),l.store.dropdownOpened?c(l.store.selectPreviousOption()):(l.store.openDropdown("keyboard"),c(l.store.selectActiveOption()),l.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),v.nativeEvent.code==="Enter"||v.nativeEvent.code==="NumpadEnter"){if(v.nativeEvent.keyCode===229)return;const y=l.store.getSelectedOptionIndex();l.store.dropdownOpened&&y!==-1?(v.preventDefault(),l.store.clickSelectedOption()):a==="button"&&(v.preventDefault(),l.store.openDropdown("keyboard"))}v.key==="Escape"&&l.store.closeDropdown("keyboard"),v.nativeEvent.code==="Space"&&a==="button"&&(v.preventDefault(),l.store.toggleDropdown("keyboard"))}};return{...i?{...r?{role:"combobox"}:{},"aria-haspopup":"listbox","aria-expanded":r?!!(l.store.listId&&l.store.dropdownOpened):void 0,"aria-controls":l.store.dropdownOpened&&l.store.listId?l.store.listId:void 0,"aria-activedescendant":l.store.dropdownOpened&&f||void 0,autoComplete:o,"data-expanded":l.store.dropdownOpened||void 0,"data-mantine-stop-propagation":l.store.dropdownOpened||void 0}:{},onKeyDown:h,onClick:v=>{a==="button"&&v.currentTarget.focus(),n==null||n(v)}}}const WJ={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},VL=Pe(e=>{const{children:n,refProp:t,withKeyboardNavigation:i,withAriaAttributes:r,withExpandedAttribute:a,targetType:o,autoComplete:l,ref:f,...c}=ge("ComboboxEventsTarget",WJ,e),h=vu(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=ga();return O.cloneElement(h,{...W6({targetType:o,withAriaAttributes:r,withKeyboardNavigation:i,withExpandedAttribute:a,onKeyDown:h.props.onKeyDown,onClick:h.props.onClick,autoComplete:l}),...c,[t]:zt(f,d.store.targetRef,z1(h))})});VL.displayName="@mantine/core/ComboboxEventsTarget";const G6=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ge("ComboboxFooter",null,e);return k.jsx(we,{...ga().getStyles("footer",{className:t,classNames:n,style:i,styles:r}),...o,onMouseDown:l=>{l.preventDefault()}})});G6.classes=tr;G6.displayName="@mantine/core/ComboboxFooter";const Y6=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,children:o,label:l,id:f,...c}=ge("ComboboxGroup",null,e),h=ga(),d=Gi(f);return k.jsxs(we,{role:"group","aria-labelledby":l?d:void 0,...h.getStyles("group",{className:t,classNames:n,style:i,styles:r}),...c,children:[l&&k.jsx("div",{id:d,...h.getStyles("groupLabel",{classNames:n,styles:r}),children:l}),o]})});Y6.classes=tr;Y6.displayName="@mantine/core/ComboboxGroup";const K6=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ge("ComboboxHeader",null,e);return k.jsx(we,{...ga().getStyles("header",{className:t,classNames:n,style:i,styles:r}),...o,onMouseDown:l=>{l.preventDefault()}})});K6.classes=tr;K6.displayName="@mantine/core/ComboboxHeader";function WL({value:e,valuesDivider:n=",",...t}){return k.jsx("input",{type:"hidden",value:Array.isArray(e)?e.join(n):e?`${e}`:"",...t})}WL.displayName="@mantine/core/ComboboxHiddenInput";const X6=Pe(e=>{const n=ge("ComboboxOption",null,e),{classNames:t,className:i,style:r,styles:a,vars:o,onClick:l,id:f,active:c,onMouseDown:h,onMouseOver:d,disabled:p,selected:v,mod:y,...b}=n,w=ga(),_=O.useId(),S=f||_;return k.jsx(we,{...w.getStyles("option",{className:i,classNames:t,styles:a,style:r}),...b,id:S,mod:["combobox-option",{"combobox-active":c,"combobox-disabled":p,"combobox-selected":v},y],role:"option",onClick:C=>{var E;p?C.preventDefault():((E=w.onOptionSubmit)==null||E.call(w,n.value,n),l==null||l(C))},onMouseDown:C=>{C.preventDefault(),h==null||h(C)},onMouseOver:C=>{w.resetSelectionOnOptionHover&&w.store.resetSelectedOption(),d==null||d(C)}})});X6.classes=tr;X6.displayName="@mantine/core/ComboboxOption";const Z6=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,id:a,onMouseDown:o,labelledBy:l,...f}=ge("ComboboxOptions",null,e),c=ga(),h=Gi(a);return O.useEffect(()=>{c.store.setListId(h)},[h]),k.jsx(we,{...c.getStyles("options",{className:t,style:i,classNames:n,styles:r}),...f,id:h,role:"listbox","aria-labelledby":l,onMouseDown:d=>{d.preventDefault(),o==null||o(d)}})});Z6.classes=tr;Z6.displayName="@mantine/core/ComboboxOptions";const GJ={withAriaAttributes:!0,withKeyboardNavigation:!0},Q6=Pe(e=>{const{classNames:n,styles:t,unstyled:i,vars:r,withAriaAttributes:a,onKeyDown:o,onClick:l,withKeyboardNavigation:f,size:c,ref:h,...d}=ge("ComboboxSearch",GJ,e),p=ga(),v=p.getStyles("search"),y=W6({targetType:"input",withAriaAttributes:a,withKeyboardNavigation:f,withExpandedAttribute:!1,onKeyDown:o,onClick:l,autoComplete:"off"});return k.jsx(Nt,{ref:zt(h,p.store.searchRef),classNames:[{input:v.className},n],styles:[{input:v.style},t],size:c||p.size,...y,...d,__staticSelector:"Combobox"})});Q6.classes=tr;Q6.displayName="@mantine/core/ComboboxSearch";const YJ={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},GL=Pe(e=>{const{children:n,refProp:t,withKeyboardNavigation:i,withAriaAttributes:r,withExpandedAttribute:a,targetType:o,autoComplete:l,ref:f,...c}=ge("ComboboxTarget",YJ,e),h=vu(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=ga(),p=O.cloneElement(h,{...W6({targetType:o,withAriaAttributes:r,withKeyboardNavigation:i,withExpandedAttribute:a,onKeyDown:h.props.onKeyDown,onClick:h.props.onClick,autoComplete:l}),...c});return k.jsx(Tn.Target,{refProp:t,ref:zt(f,d.store.targetRef),children:p})});GL.displayName="@mantine/core/ComboboxTarget";function KJ(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 XJ(e,n,t){for(let i=e+1;i{l||(f(!0),r==null||r(P))},[f,r,l]),_=O.useCallback((P="unknown")=>{l&&(f(!1),i==null||i(P))},[f,i,l]),S=O.useCallback((P="unknown")=>{l?_(P):w(P)},[_,w,l]),C=O.useCallback(()=>{const P=Do(p.current),z=Wv(`#${c.current} [data-combobox-selected]`,P);z==null||z.removeAttribute("data-combobox-selected"),z==null||z.removeAttribute("aria-selected")},[]),E=O.useCallback(P=>{const z=Do(p.current),F=Wv(`#${c.current}`,z),Y=F?$o("[data-combobox-option]",F):null;if(!Y)return null;const D=P>=Y.length?0:P<0?Y.length-1:P;return h.current=D,Y!=null&&Y[D]&&!Y[D].hasAttribute("data-combobox-disabled")?(C(),Y[D].setAttribute("data-combobox-selected","true"),Y[D].setAttribute("aria-selected","true"),Y[D].scrollIntoView({block:"nearest",behavior:o}),Y[D].id):null},[o,C]),A=O.useCallback(()=>{const P=Do(p.current),z=Wv(`#${c.current} [data-combobox-active]`,P);return E(z?$o(`#${c.current} [data-combobox-option]`,P).findIndex(F=>F===z):0)},[E]),T=O.useCallback(()=>{const P=Do(p.current),z=$o(`#${c.current} [data-combobox-option]`,P);return E(XJ(h.current,z,a))},[E,a]),j=O.useCallback(()=>{const P=Do(p.current),z=$o(`#${c.current} [data-combobox-option]`,P);return E(KJ(h.current,z,a))},[E,a]),N=O.useCallback(()=>{const P=Do(p.current);return E(ZJ($o(`#${c.current} [data-combobox-option]`,P)))},[E]),q=O.useCallback((P="selected",z)=>{var F;if(typeof P=="number"){h.current=P;const Y=Do(p.current),D=$o(`#${c.current} [data-combobox-option]`,Y);z!=null&&z.scrollIntoView&&((F=D[P])==null||F.scrollIntoView({block:"nearest",behavior:o}));return}b.current=window.setTimeout(()=>{var W;const Y=Do(p.current),D=$o(`#${c.current} [data-combobox-option]`,Y),V=D.findIndex($=>$.hasAttribute(`data-combobox-${P}`));h.current=V,z!=null&&z.scrollIntoView&&((W=D[V])==null||W.scrollIntoView({block:"nearest",behavior:o}))},0)},[]),R=O.useCallback(()=>{h.current=-1,C()},[C]),L=O.useCallback(()=>{var z,F;const P=Do(p.current);(F=(z=$o(`#${c.current} [data-combobox-option]`,P))==null?void 0:z[h.current])==null||F.click()},[]),B=O.useCallback(P=>{c.current=P},[]),G=O.useCallback(()=>{v.current=window.setTimeout(()=>{var P;return(P=d.current)==null?void 0:P.focus()},0)},[]),H=O.useCallback(()=>{y.current=window.setTimeout(()=>{var P;return(P=p.current)==null?void 0:P.focus()},0)},[]),U=O.useCallback(()=>h.current,[]);return O.useEffect(()=>()=>{window.clearTimeout(v.current),window.clearTimeout(y.current),window.clearTimeout(b.current)},[]),{dropdownOpened:l,openDropdown:w,closeDropdown:_,toggleDropdown:S,selectedOptionIndex:h.current,getSelectedOptionIndex:U,selectOption:E,selectFirstOption:N,selectActiveOption:A,selectNextOption:T,selectPreviousOption:j,resetSelectedOption:R,updateSelectedOptionIndex:q,listId:c.current,setListId:B,clickSelectedOption:L,searchRef:d,focusSearchInput:G,targetRef:p,focusTarget:H}}const QJ={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0},size:"sm"},YL=(e,{size:n,dropdownPadding:t})=>({options:{"--combobox-option-fz":Zt(n),"--combobox-option-padding":Mn(n,"combobox-option-padding")},dropdown:{"--combobox-padding":t===void 0?void 0:he(t),"--combobox-option-fz":Zt(n),"--combobox-option-padding":Mn(n,"combobox-option-padding")}}),Sn=e=>{const n=ge("Combobox",QJ,e),{classNames:t,styles:i,unstyled:r,children:a,store:o,vars:l,onOptionSubmit:f,onClose:c,size:h,dropdownPadding:d,resetSelectionOnOptionHover:p,__staticSelector:v,readOnly:y,attributes:b,...w}=n,_=Pm(),S=o||_,C=Ge({name:v||"Combobox",classes:tr,props:n,classNames:t,styles:i,unstyled:r,attributes:b,vars:l,varsResolver:YL}),E=()=>{c==null||c(),S.closeDropdown()};return k.jsx(UJ,{value:{getStyles:C,store:S,onOptionSubmit:f,size:h,resetSelectionOnOptionHover:p,readOnly:y},children:k.jsx(Tn,{opened:S.dropdownOpened,preventPositionChangeWhenVisible:!1,...w,onChange:A=>!A&&E(),withRoles:!1,unstyled:r,children:a})})},JJ=e=>e;Sn.extend=JJ;Sn.classes=tr;Sn.varsResolver=YL;Sn.displayName="@mantine/core/Combobox";Sn.Target=GL;Sn.Dropdown=U6;Sn.Options=Z6;Sn.Option=X6;Sn.Search=Q6;Sn.Empty=V6;Sn.Chevron=ey;Sn.Footer=G6;Sn.Header=K6;Sn.EventsTarget=VL;Sn.DropdownTarget=UL;Sn.Group=Y6;Sn.ClearButton=HL;Sn.HiddenInput=WL;function eee({children:e,role:n}){const t=O.use(wu);return t?k.jsx("div",{role:n,"aria-labelledby":t.labelId,"aria-describedby":t.describedBy,children:e}):k.jsx(k.Fragment,{children:e})}const J6=O.createContext(null),nee={hiddenInputValuesSeparator:","},eC=B1((e=>{const{value:n,defaultValue:t,onChange:i,size:r,wrapperProps:a,children:o,readOnly:l,name:f,hiddenInputValuesSeparator:c,hiddenInputProps:h,maxSelectedValues:d,disabled:p,...v}=ge("CheckboxGroup",nee,e),[y,b]=xi({value:n,defaultValue:t,finalValue:[],onChange:i}),w=C=>{const E=typeof C=="string"?C:C.currentTarget.value;if(l)return;const A=y.includes(E);!A&&d&&y.length>=d||b(A?y.filter(T=>T!==E):[...y,E])},_=C=>{if(p)return!0;if(!d)return!1;const E=y.includes(C),A=y.length>=d;return!E&&A},S=y.join(c);return k.jsx(J6,{value:{value:y,onChange:w,size:r,isDisabled:_},children:k.jsxs(Nt.Wrapper,{size:r,...a,...v,labelElement:"div",__staticSelector:"CheckboxGroup",children:[k.jsx(eee,{role:"group",children:o}),k.jsx("input",{type:"hidden",name:f,value:S,...h})]})})}));eC.classes=Nt.Wrapper.classes;eC.displayName="@mantine/core/CheckboxGroup";var KL={card:"m_26775b0a"};const XL=O.createContext(null),tee={withBorder:!0},ZL=(e,{radius:n})=>({card:{"--card-radius":Ut(n)}}),ny=Pe(e=>{const n=ge("CheckboxCard",tee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,checked:f,mod:c,withBorder:h,value:d,onClick:p,defaultChecked:v,onChange:y,attributes:b,...w}=n,_=Ge({name:"CheckboxCard",classes:KL,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,vars:l,varsResolver:ZL,rootSelector:"card"}),S=O.use(J6),[C,E]=xi({value:typeof f=="boolean"?f:S?S.value.includes(d||""):void 0,defaultValue:v,finalValue:!1,onChange:y});return k.jsx(XL,{value:{checked:C},children:k.jsx(fi,{mod:[{"with-border":h,checked:C},c],..._("card"),...w,role:"checkbox","aria-checked":C,onClick:A=>{p==null||p(A),S==null||S.onChange(d||""),E(!C)}})})});ny.displayName="@mantine/core/CheckboxCard";ny.classes=KL;ny.varsResolver=ZL;function nC({size:e,style:n,...t}){return k.jsx("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:e!==void 0?{width:he(e),height:he(e),...n}:n,"aria-hidden":!0,...t,children:k.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 QL({indeterminate:e,...n}){return e?k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6","aria-hidden":!0,...n,children:k.jsx("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})}):k.jsx(nC,{...n})}var JL={indicator:"m_5e5256ee",icon:"m_1b1c543a","indicator--outline":"m_76e20374"};const iee={icon:QL,variant:"filled",radius:"sm"},eI=(e,{radius:n,color:t,size:i,iconColor:r,variant:a,autoContrast:o})=>{const l=is({color:t||e.primaryColor,theme:e}),f=l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-outline)`:l.color;return{indicator:{"--checkbox-size":Mn(i,"checkbox-size"),"--checkbox-radius":n===void 0?void 0:Ut(n),"--checkbox-color":a==="outline"?f:nt(t,e),"--checkbox-icon-color":r?nt(r,e):L1(o,e)?xm({color:t,theme:e,autoContrast:o}):void 0}}},ty=Pe(e=>{const n=ge("CheckboxIndicator",iee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,icon:f,indeterminate:c,radius:h,color:d,iconColor:p,autoContrast:v,checked:y,mod:b,variant:w,disabled:_,attributes:S,...C}=n,E=Ge({name:"CheckboxIndicator",classes:JL,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:S,vars:l,varsResolver:eI,rootSelector:"indicator"}),A=O.use(XL),T=typeof y=="boolean"||typeof c=="boolean"?y||c:(A==null?void 0:A.checked)||!1;return k.jsx(we,{...E("indicator",{variant:w}),variant:w,mod:[{checked:T,disabled:_},b],...C,children:k.jsx(f,{indeterminate:c,...E("icon")})})});ty.displayName="@mantine/core/CheckboxIndicator";ty.classes=JL;ty.varsResolver=eI;var nI={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};const ree=nI;function tI({__staticSelector:e,__stylesApiProps:n,className:t,classNames:i,styles:r,unstyled:a,children:o,label:l,description:f,id:c,disabled:h,error:d,size:p,labelPosition:v="left",bodyElement:y="div",labelElement:b="label",variant:w,style:_,vars:S,mod:C,attributes:E,...A}){const T=Ge({name:e,props:n,className:t,style:_,classes:nI,classNames:i,styles:r,unstyled:a,attributes:E});return k.jsx(we,{...T("root"),__vars:{"--label-fz":Zt(p),"--label-lh":Mn(p,"label-lh")},mod:[{"label-position":v},C],variant:w,size:p,...A,children:k.jsxs(we,{component:y,htmlFor:y==="label"?c:void 0,...T("body"),children:[o,k.jsxs("div",{...T("labelWrapper"),"data-disabled":h||void 0,children:[l&&k.jsx(we,{component:b,htmlFor:b==="label"?c:void 0,...T("label"),"data-disabled":h||void 0,children:l}),f&&k.jsx(Nt.Description,{size:p,__inheritStyles:!1,...T("description"),children:f}),d&&typeof d!="boolean"&&k.jsx(Nt.Error,{size:p,__inheritStyles:!1,...T("error"),children:d})]})]})})}tI.displayName="@mantine/core/InlineInput";var iI={root:"m_bf2d988c",inner:"m_26062bec",input:"m_26063560",icon:"m_bf295423","input--outline":"m_215c4542"};const aee={labelPosition:"right",icon:QL,withErrorStyles:!0,variant:"filled",radius:"sm"},rI=(e,{radius:n,color:t,size:i,iconColor:r,variant:a,autoContrast:o})=>{const l=is({color:t||e.primaryColor,theme:e}),f=l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-outline)`:l.color;return{root:{"--checkbox-size":Mn(i,"checkbox-size"),"--checkbox-radius":n===void 0?void 0:Ut(n),"--checkbox-color":a==="outline"?f:nt(t,e),"--checkbox-icon-color":r?nt(r,e):L1(o,e)?xm({color:t,theme:e,autoContrast:o}):void 0}}},nl=Pe(e=>{var le;const n=ge("Checkbox",aee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:f,label:c,id:h,size:d,radius:p,wrapperProps:v,checked:y,labelPosition:b,description:w,error:_,disabled:S,variant:C,indeterminate:E,icon:A,rootRef:T,iconColor:j,onChange:N,autoContrast:q,mod:R,attributes:L,readOnly:B,onClick:G,withErrorStyles:H,ref:U,...P}=n,z=O.useRef(null),F=O.use(J6),Y=d||(F==null?void 0:F.size),D=Ge({name:"Checkbox",props:n,classes:iI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:L,vars:l,varsResolver:rI}),{styleProps:V,rest:W}=gu(P),$=Gi(h),X={checked:(F==null?void 0:F.value.includes(W.value))??y,onChange:ye=>{F==null||F.onChange(ye),N==null||N(ye)}},te=((le=F==null?void 0:F.isDisabled)==null?void 0:le.call(F,W.value))??!1,ae=S||te;return O.useEffect(()=>{z.current&&(z.current.indeterminate=E||!1,E?z.current.setAttribute("data-indeterminate","true"):z.current.removeAttribute("data-indeterminate"))},[E]),k.jsx(tI,{...D("root"),__staticSelector:"Checkbox",__stylesApiProps:n,id:$,size:Y,labelPosition:b,label:c,description:w,error:_,disabled:ae,classNames:t,styles:a,unstyled:o,"data-checked":X.checked||y||void 0,variant:C,ref:T,mod:R,attributes:L,inert:W.inert,...V,...v,children:k.jsxs(we,{...D("inner"),mod:{"data-label-position":b},children:[k.jsx(we,{component:"input",id:$,ref:zt(z,U),mod:{error:!!_},...D("input",{focusable:!0,variant:C}),...W,...X,disabled:ae,inert:W.inert,type:"checkbox",onClick:ye=>{B&&ye.preventDefault(),G==null||G(ye)}}),k.jsx(A,{indeterminate:E,...D("icon")})]})})});nl.classes={...iI,...ree};nl.varsResolver=rI;nl.displayName="@mantine/core/Checkbox";nl.Group=eC;nl.Indicator=ty;nl.Card=ny;function au(e){return"group"in e}function aI({options:e,search:n,limit:t}){const i=n.trim().toLowerCase(),r=[];for(let a=0;a0)return!1;return!0}function oI(e,n=new Set){if(Array.isArray(e))for(const t of e)if(au(t))oI(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 see(e,n){return Array.isArray(e)?e.includes(n):e===n}function sI({data:e,withCheckIcon:n,withAlignedLabels:t,value:i,checkIconPosition:r,unstyled:a,renderOption:o}){if(!au(e)){const f=see(i,e.value),c=n&&(f?k.jsx(nC,{className:tr.optionsDropdownCheckIcon}):t?k.jsx("div",{className:tr.optionsDropdownCheckPlaceholder}):null),h=k.jsxs(k.Fragment,{children:[r==="left"&&c,k.jsx("span",{children:e.label}),r==="right"&&c]});return k.jsx(Sn.Option,{value:e.value,disabled:e.disabled,className:cn({[tr.optionsDropdownOption]:!a}),"data-reverse":r==="right"||void 0,"data-checked":f||void 0,"aria-selected":f,active:f,children:typeof o=="function"?o({option:e,checked:f}):h})}const l=e.items.map(f=>k.jsx(sI,{data:f,value:i,unstyled:a,withCheckIcon:n,withAlignedLabels:t,checkIconPosition:r,renderOption:o},`${f.value}`));return k.jsx(Sn.Group,{label:e.group,children:l})}function iy({data:e,hidden:n,hiddenWhenEmpty:t,filter:i,search:r,limit:a,maxDropdownHeight:o,withScrollArea:l=!0,filterOptions:f=!0,withCheckIcon:c=!1,withAlignedLabels:h=!1,value:d,checkIconPosition:p,nothingFoundMessage:v,unstyled:y,labelId:b,renderOption:w,scrollAreaProps:_,"aria-label":S}){oI(e);const C=typeof r=="string"?(i||aI)({options:e,search:f?r:"",limit:a??1/0}):e,E=oee(C),A=C.map(T=>k.jsx(sI,{data:T,withCheckIcon:c,withAlignedLabels:h,value:d,checkIconPosition:p,unstyled:y,renderOption:w},au(T)?T.group:`${T.value}`));return k.jsx(Sn.Dropdown,{hidden:n||t&&E,"data-composed":!0,children:k.jsxs(Sn.Options,{labelledBy:b,"aria-label":S,children:[l?k.jsx(uo.Autosize,{mah:o??220,type:"scroll",scrollbarSize:"var(--combobox-padding)",offsetScrollbars:"y",..._,children:A}):A,E&&v&&k.jsx(Sn.Empty,{children:v})]})})}const ry=Pe(e=>{const n=ge("Autocomplete",{size:"sm"},e),{classNames:t,styles:i,unstyled:r,vars:a,dropdownOpened:o,defaultDropdownOpened:l,onDropdownClose:f,onDropdownOpen:c,onFocus:h,onBlur:d,onClick:p,onChange:v,data:y,value:b,defaultValue:w,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:S,onOptionSubmit:C,comboboxProps:E,readOnly:A,disabled:T,filter:j,limit:N,withScrollArea:q,maxDropdownHeight:R,size:L,id:B,renderOption:G,autoComplete:H,scrollAreaProps:U,onClear:P,clearButtonProps:z,error:F,clearable:Y,clearSectionMode:D,rightSection:V,autoSelectOnBlur:W,openOnFocus:$=!0,attributes:X,...te}=n,ae=Gi(B),le=J1(y),ye=Rm(le),[oe,ue]=xi({value:b,defaultValue:w,finalValue:"",onChange:v}),ke=Pm({opened:o,defaultOpened:l,onDropdownOpen:()=>{c==null||c(),S&&ke.selectFirstOption()},onDropdownClose:()=>{f==null||f(),setTimeout(ke.resetSelectedOption,0)}}),ie=De=>{ue(De),ke.resetSelectedOption()},{resolvedClassNames:Re,resolvedStyles:pe}=Ni({props:n,styles:i,classNames:t});O.useEffect(()=>{_&&ke.selectFirstOption()},[_,oe]);const Ce=k.jsx(Sn.ClearButton,{...z,onClear:()=>{ie(""),P==null||P()}});return k.jsxs(Sn,{store:ke,__staticSelector:"Autocomplete",classNames:Re,styles:pe,unstyled:r,readOnly:A,size:L,attributes:X,keepMounted:W,onOptionSubmit:De=>{C==null||C(De),ie(ye[De].label),ke.closeDropdown()},...E,children:[k.jsx(Sn.Target,{autoComplete:H,withExpandedAttribute:!0,children:k.jsx(zi,{...te,size:L,__staticSelector:"Autocomplete",__clearSection:Ce,__clearable:Y&&!!oe&&!T&&!A,__clearSectionMode:D,rightSection:V,disabled:T,readOnly:A,value:oe,error:F,onChange:De=>{ie(De.currentTarget.value),ke.openDropdown(),_&&ke.selectFirstOption()},onFocus:De=>{$&&ke.openDropdown(),h==null||h(De)},onBlur:De=>{W&&ke.clickSelectedOption(),ke.closeDropdown(),d==null||d(De)},onClick:De=>{ke.openDropdown(),p==null||p(De)},classNames:Re,styles:pe,unstyled:r,attributes:X,id:ae})}),k.jsx(iy,{data:le,hidden:A||T,filter:j,search:oe,limit:N,hiddenWhenEmpty:!0,withScrollArea:q,maxDropdownHeight:R,unstyled:r,labelId:te.label?`${ae}-label`:void 0,"aria-label":te.label?void 0:te["aria-label"],renderOption:G,scrollAreaProps:U})]})});ry.classes={...zi.classes,...Sn.classes};ry.displayName="@mantine/core/Autocomplete";var ay={group:"m_11def92b",root:"m_f85678b6",image:"m_11f8ac07",placeholder:"m_104cd71f"};const lI=O.createContext({withinGroup:!1}),uI=(e,{spacing:n})=>({group:{"--ag-spacing":Ft(n)}}),oy=Pe(e=>{const n=ge("AvatarGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,spacing:f,attributes:c,...h}=n;return k.jsx(lI,{value:{withinGroup:!0},children:k.jsx(we,{...Ge({name:"AvatarGroup",classes:ay,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:c,vars:l,varsResolver:uI,rootSelector:"group"})("group"),...h})})});oy.classes=ay;oy.varsResolver=uI;oy.displayName="@mantine/core/AvatarGroup";function lee(e){return k.jsx("svg",{...e,"data-avatar-placeholder-icon":!0,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:k.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 uee(e){let n=0;for(let t=0;ti[0]).slice(0,n).join("").toUpperCase()}const fI=(e,{size:n,radius:t,variant:i,gradient:r,color:a,autoContrast:o,name:l,allowedInitialsColors:f})=>{const c=a==="initials"&&typeof l=="string"?cee(l,f):a,h=e.variantColorResolver({color:c||"gray",theme:e,gradient:r,variant:i||"light",autoContrast:o});return{root:{"--avatar-size":Mn(n,"avatar-size"),"--avatar-radius":t===void 0?void 0:Ut(t),"--avatar-bg":c||i?h.background:void 0,"--avatar-color":c||i?h.color:void 0,"--avatar-bd":c||i?h.border:void 0}}},ou=$i(e=>{const n=ge("Avatar",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,src:f,alt:c,radius:h,color:d,gradient:p,imageProps:v,children:y,autoContrast:b,mod:w,name:_,allowedInitialsColors:S,attributes:C,...E}=n,A=O.use(lI),[T,j]=O.useState(!f),N=Ge({name:"Avatar",props:n,classes:ay,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:C,vars:l,varsResolver:fI});return O.useEffect(()=>j(!f),[f]),k.jsx(we,{...N("root"),mod:[{"within-group":A.withinGroup},w],...E,children:T||!f?k.jsx("span",{...N("placeholder"),title:c,children:y||typeof _=="string"&&dee(_)||k.jsx(lee,{})}):k.jsx("img",{...v,...N("image"),src:f,alt:c,onError:q=>{var R;j(!0),(R=v==null?void 0:v.onError)==null||R.call(v,q)}})})});ou.classes=ay;ou.varsResolver=fI;ou.displayName="@mantine/core/Avatar";ou.Group=oy;var cI={root:"m_347db0ec","root--dot":"m_fbd81e3d",label:"m_5add502a",section:"m_91fdda9b"};const dI=(e,{radius:n,color:t,gradient:i,variant:r,size:a,autoContrast:o,circle:l})=>{const f=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:o});return{root:{"--badge-height":Mn(a,"badge-height"),"--badge-padding-x":Mn(a,"badge-padding-x"),"--badge-fz":Mn(a,"badge-fz"),"--badge-radius":l||n===void 0?void 0:Ut(n),"--badge-bg":t||r?f.background:void 0,"--badge-color":t||r?f.color:void 0,"--badge-bd":t||r?f.border:void 0,"--badge-dot-color":r==="dot"?nt(t,e):void 0}}},ui=$i(e=>{const n=ge("Badge",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,radius:f,color:c,gradient:h,leftSection:d,rightSection:p,children:v,variant:y,fullWidth:b,autoContrast:w,circle:_,mod:S,attributes:C,...E}=n,A=Ge({name:"Badge",props:n,classes:cI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:C,vars:l,varsResolver:dI});return k.jsxs(we,{variant:y,mod:[{block:b,circle:_,"with-right-section":!!p,"with-left-section":!!d},S],...A("root",{variant:y}),...E,children:[d&&k.jsx("span",{...A("section"),"data-position":"left",children:d}),k.jsx("span",{...A("label"),children:v}),p&&k.jsx("span",{...A("section"),"data-position":"right",children:p})]})});ui.classes=cI;ui.varsResolver=dI;ui.displayName="@mantine/core/Badge";var kc={root:"m_77c9d27d",inner:"m_80f1301b",label:"m_811560b9",section:"m_a74036a",loader:"m_a25b86ee",group:"m_80d6d844",groupSection:"m_70be2a01"};const B5={orientation:"horizontal"},hI=(e,{borderWidth:n})=>({group:{"--button-border-width":he(n)}}),sy=Pe(e=>{const n=ge("ButtonGroup",B5,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,orientation:l,vars:f,borderWidth:c,mod:h,attributes:d,...p}=ge("ButtonGroup",B5,e);return k.jsx(we,{...Ge({name:"ButtonGroup",props:n,classes:kc,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:d,vars:f,varsResolver:hI,rootSelector:"group"})("group"),mod:[{"data-orientation":l},h],role:"group",...p})});sy.classes=kc;sy.varsResolver=hI;sy.displayName="@mantine/core/ButtonGroup";const mI=(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":Mn(o,"section-height"),"--section-padding-x":Mn(o,"section-padding-x"),"--section-fz":o!=null&&o.includes("compact")?Zt(o.replace("compact-","")):Zt(o),"--section-radius":n===void 0?void 0:Ut(n),"--section-bg":t||r?l.background:void 0,"--section-color":l.color,"--section-bd":t||r?l.border:void 0}}},ly=Pe(e=>{const n=ge("ButtonGroupSection",null,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,vars:l,gradient:f,radius:c,autoContrast:h,attributes:d,...p}=n;return k.jsx(we,{...Ge({name:"ButtonGroupSection",props:n,classes:kc,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:d,vars:l,varsResolver:mI,rootSelector:"groupSection"})("groupSection"),...p})});ly.classes=kc;ly.varsResolver=mI;ly.displayName="@mantine/core/ButtonGroupSection";const hee={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${he(1)}))`},out:{opacity:0,transform:"translate(-50%, -200%)"},common:{transformOrigin:"center"},transitionProperty:"transform, opacity"},pI=(e,{radius:n,color:t,gradient:i,variant:r,size:a,justify:o,autoContrast:l})=>{const f=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:l});return{root:{"--button-justify":o,"--button-height":Mn(a,"button-height"),"--button-padding-x":Mn(a,"button-padding-x"),"--button-fz":a!=null&&a.includes("compact")?Zt(a.replace("compact-","")):Zt(a),"--button-radius":n===void 0?void 0:Ut(n),"--button-bg":t||r?f.background:void 0,"--button-hover":t||r?f.hover:void 0,"--button-color":f.color,"--button-bd":t||r?f.border:void 0,"--button-hover-color":t||r?f.hoverColor:void 0}}},Bt=$i(e=>{const n=ge("Button",null,e),{style:t,vars:i,className:r,color:a,disabled:o,children:l,leftSection:f,rightSection:c,fullWidth:h,variant:d,radius:p,loading:v,loaderProps:y,gradient:b,classNames:w,styles:_,unstyled:S,"data-disabled":C,autoContrast:E,mod:A,attributes:T,...j}=n,N=Ge({name:"Button",props:n,classes:kc,className:r,style:t,classNames:w,styles:_,unstyled:S,attributes:T,vars:i,varsResolver:pI}),q=!!f,R=!!c;return k.jsxs(fi,{...N("root",{active:!o&&!v&&!C}),unstyled:S,variant:d,disabled:o||v,mod:[{disabled:o||C,loading:v,block:h,"with-left-section":q,"with-right-section":R},A],...j,children:[typeof v=="boolean"&&k.jsx(Xo,{mounted:v,transition:hee,duration:150,children:L=>k.jsx(we,{component:"span",...N("loader",{style:L}),"aria-hidden":!0,children:k.jsx(Wi,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...y})})}),k.jsxs("span",{...N("inner"),children:[f&&k.jsx(we,{component:"span",...N("section"),mod:{position:"left"},children:f}),k.jsx(we,{component:"span",mod:{loading:v},...N("label"),children:l}),c&&k.jsx(we,{component:"span",...N("section"),mod:{position:"right"},children:c})]})]})});Bt.classes=kc;Bt.varsResolver=pI;Bt.displayName="@mantine/core/Button";Bt.Group=sy;Bt.GroupSection=ly;var vI={root:"m_4451eb3a"};const _c=$i(e=>{const n=ge("Center",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,inline:f,mod:c,attributes:h,...d}=n,p=Ge({name:"Center",props:n,classes:vI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l});return k.jsx(we,{mod:[{inline:f},c],...p("root"),...d})});_c.classes=vI;_c.displayName="@mantine/core/Center";var gI={root:"m_de3d2490",colorOverlay:"m_862f3d1b",shadowOverlay:"m_98ae7f22",alphaOverlay:"m_95709ac0",childrenOverlay:"m_93e74e3"};const F5={withShadow:!0},yI=(e,{radius:n,size:t})=>({root:{"--cs-radius":n===void 0?void 0:Ut(n),"--cs-size":he(t)}}),xc=$i(e=>{const n=ge("ColorSwatch",F5,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:f,radius:c,withShadow:h,children:d,attributes:p,...v}=ge("ColorSwatch",F5,n),y=Ge({name:"ColorSwatch",props:n,classes:gI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:yI});return k.jsxs(we,{...y("root",{focusable:!0}),...v,children:[k.jsx("span",{...y("alphaOverlay")}),h&&k.jsx("span",{...y("shadowOverlay")}),k.jsx("span",{...y("colorOverlay",{style:{backgroundColor:f}})}),k.jsx("span",{...y("childrenOverlay"),children:d})]})});xc.classes=gI;xc.varsResolver=yI;xc.displayName="@mantine/core/ColorSwatch";function oa(e,n=0,t=10**n){return Math.round(t*e)/t}function mee({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 pee={grad:360/400,turn:360,rad:360/(Math.PI*2)};function vee(e,n="deg"){return Number(e)*(pee[n]||1)}const gee=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function q5(e){const n=gee.exec(e);return n?mee({h:vee(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 oS({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:oa(60*(o<0?o+6:o),3),s:oa(r?a/r*100:0,3),v:oa(r/255*100,3),a:i}}function sS(e){const n=e[0]==="#"?e.slice(1):e;return n.length===3?oS({r:parseInt(n[0]+n[0],16),g:parseInt(n[1]+n[1],16),b:parseInt(n[2]+n[2],16),a:1}):oS({r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16),a:1})}function yee(e){const n=e[0]==="#"?e.slice(1):e,t=a=>oa(parseInt(a,16)/255,3);if(n.length===4){const a=n.slice(0,3),o=t(n[3]+n[3]);return{...sS(a),a:o}}const i=n.slice(0,6),r=t(n.slice(6,8));return{...sS(i),a:r}}const bee=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function H5(e){const n=bee.exec(e);return n?oS({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 bI={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},wee={hex:sS,hexa:yee,rgb:H5,rgba:H5,hsl:q5,hsla:q5};function kee(e){for(const[,n]of Object.entries(bI))if(n.test(e))return!0;return!1}function wv(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(bI))if(i.test(n))return wee[t](n);return{h:0,s:0,v:0,a:1}}const uy=O.createContext(null);function tC({position:e,...n}){return k.jsx(we,{__vars:{"--thumb-y-offset":`${e.y*100}%`,"--thumb-x-offset":`${e.x*100}%`},...n})}tC.displayName="@mantine/core/ColorPickerThumb";var fy={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 Sc=Pe(e=>{var F;const n=ge("ColorSlider",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,onChange:f,onChangeEnd:c,maxValue:h,round:d,size:p="md",focusable:v=!0,value:y,overlays:b,thumbColor:w="transparent",onScrubStart:_,onScrubEnd:S,__staticSelector:C="ColorPicker",attributes:E,ref:A,...T}=n,j=Ge({name:C,classes:fy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:E,rootSelector:"slider"}),N=((F=O.use(uy))==null?void 0:F.getStyles)||j,q=ni(),[R,L]=O.useState({y:0,x:y/h}),B=O.useRef(R),G=Y=>d?Math.round(Y*h):Y*h,{ref:H}=Z$(({x:Y,y:D})=>{B.current={x:Y,y:D},f==null||f(G(Y))},{onScrubEnd:()=>{const{x:Y}=B.current;c==null||c(G(Y)),S==null||S()},onScrubStart:_});Yo(()=>{L({y:0,x:y/h})},[y]);const U=(Y,D)=>{Y.preventDefault();const V=X$(D);f==null||f(G(V.x)),c==null||c(G(V.x))},P=Y=>{switch(Y.key){case"ArrowRight":U(Y,{x:R.x+.05,y:R.y});break;case"ArrowLeft":U(Y,{x:R.x-.05,y:R.y});break}},z=b.map((Y,D)=>O.createElement("div",{...N("sliderOverlay"),style:Y,key:D}));return k.jsxs(we,{...T,ref:zt(H,A),...N("slider"),size:p,role:"slider","aria-valuenow":y,"aria-valuemax":h,"aria-valuemin":0,tabIndex:v?0:-1,onKeyDown:P,"data-focus-ring":q.focusRing,__vars:{"--cp-thumb-size":`var(--cp-thumb-size-${p})`},children:[z,k.jsx(tC,{position:R,...N("thumb",{style:{top:he(1),background:w}})})]})});Sc.displayName="@mantine/core/ColorSlider";Sc.classes=fy;const _ee={__staticSelector:"AlphaSlider"},iC=Pe(e=>{const{value:n,onChange:t,onChangeEnd:i,color:r,...a}=ge("AlphaSlider",_ee,e);return k.jsx(Sc,{...a,value:n,onChange:o=>t==null?void 0:t(oa(o,2)),onChangeEnd:o=>i==null?void 0:i(oa(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:`${he(8)} ${he(8)}`,backgroundPosition:`0 0, 0 ${he(4)}, ${he(4)} ${he(-4)}, ${he(-4)} 0`},{backgroundImage:`linear-gradient(90deg, transparent, ${r})`},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${he(1)} inset, rgb(0, 0, 0, .15) 0 0 ${he(4)} inset`}]})});iC.displayName="@mantine/core/AlphaSlider";iC.classes=Sc.classes;function wI({h:e,s:n,v:t,a:i}){const r=e/360*6,a=n/100,o=t/100,l=Math.floor(r),f=o*(1-a),c=o*(1-(r-l)*a),h=o*(1-(1-r+l)*a),d=l%6;return{r:oa([o,c,f,f,h,o][d]*255),g:oa([h,o,o,c,f,f][d]*255),b:oa([f,f,h,o,o,c][d]*255),a:oa(i,2)}}function U5(e,n){const{r:t,g:i,b:r,a}=wI(e);return n?`rgba(${t}, ${i}, ${r}, ${oa(a,2)})`:`rgb(${t}, ${i}, ${r})`}function V5({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}%, ${oa(i,2)})`:`hsl(${o.h}, ${o.s}%, ${o.l}%)`}function Qv(e){const n=e.toString(16);return n.length<2?`0${n}`:n}function kI(e){const{r:n,g:t,b:i}=wI(e);return`#${Qv(n)}${Qv(t)}${Qv(i)}`}function xee(e){const n=Math.round(e.a*255);return`${kI(e)}${Qv(n)}`}const sk={hex:kI,hexa:e=>xee(e),rgb:e=>U5(e,!1),rgba:e=>U5(e,!0),hsl:e=>V5(e,!1),hsla:e=>V5(e,!0)};function zs(e,n){return n?e in sk?sk[e](n):sk.hex(n):"#000000"}const See={__staticSelector:"HueSlider"},rC=Pe(e=>{const{value:n,onChange:t,onChangeEnd:i,color:r,...a}=ge("HueSlider",See,e);return k.jsx(Sc,{...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 ${he(1)} inset, rgb(0, 0, 0, .15) 0 0 ${he(4)} inset`}]})});rC.displayName="@mantine/core/HueSlider";rC.classes=Sc.classes;function _I({className:e,onChange:n,onChangeEnd:t,value:i,saturationLabel:r,focusable:a=!0,size:o,color:l,onScrubStart:f,onScrubEnd:c,...h}){const{getStyles:d}=O.use(uy),[p,v]=O.useState({x:i.s/100,y:1-i.v/100}),y=O.useRef(p),{ref:b}=Z$(({x:S,y:C})=>{y.current={x:S,y:C},n({s:Math.round(S*100),v:Math.round((1-C)*100)})},{onScrubEnd:()=>{const{x:S,y:C}=y.current;t({s:Math.round(S*100),v:Math.round((1-C)*100)}),c==null||c()},onScrubStart:f});O.useEffect(()=>{v({x:i.s/100,y:1-i.v/100})},[i.s,i.v]);const w=(S,C)=>{S.preventDefault();const E=X$(C);n({s:Math.round(E.x*100),v:Math.round((1-E.y)*100)}),t({s:Math.round(E.x*100),v:Math.round((1-E.y)*100)})},_=S=>{switch(S.key){case"ArrowUp":w(S,{y:p.y-.05,x:p.x});break;case"ArrowDown":w(S,{y:p.y+.05,x:p.x});break;case"ArrowRight":w(S,{x:p.x+.05,y:p.y});break;case"ArrowLeft":w(S,{x:p.x-.05,y:p.y});break}};return k.jsxs(we,{...d("saturation"),ref:b,...h,role:"slider","aria-label":r,"aria-valuenow":p.x,"aria-valuetext":zs("rgba",i),tabIndex:a?0:-1,onKeyDown:_,children:[k.jsx("div",{...d("saturationOverlay",{style:{backgroundColor:`hsl(${i.h}, 100%, 50%)`}})}),k.jsx("div",{...d("saturationOverlay",{style:{backgroundImage:"linear-gradient(90deg, #fff, transparent)"}})}),k.jsx("div",{...d("saturationOverlay",{style:{backgroundImage:"linear-gradient(0deg, #000, transparent)"}})}),k.jsx(tC,{position:p,...d("thumb",{style:{backgroundColor:l}})})]})}_I.displayName="@mantine/core/Saturation";function xI({className:e,datatype:n,setValue:t,onChangeEnd:i,size:r,focusable:a,data:o,swatchesPerRow:l,value:f,...c}){const h=O.use(uy),d=o.map((p,v)=>O.createElement(xc,{...h.getStyles("swatch"),unstyled:h.unstyled,component:"button",type:"button",color:p,key:v,radius:"sm",onClick:()=>{t(p),i==null||i(p)},"aria-label":p,tabIndex:a?0:-1,"data-swatch":!0},f===p&&k.jsx(nC,{size:"35%",color:nz(p)<.5?"white":"black"})));return k.jsx(we,{...h.getStyles("swatches"),...c,children:d})}xI.displayName="@mantine/core/Swatches";const Cee={swatchesPerRow:7,withPicker:!0,focusable:!0,size:"md",__staticSelector:"ColorPicker"},SI=(e,{size:n,swatchesPerRow:t})=>({wrapper:{"--cp-preview-size":Mn(n,"cp-preview-size"),"--cp-width":Mn(n,"cp-width"),"--cp-body-spacing":Ft(n),"--cp-swatch-size":`${100/t}%`,"--cp-thumb-size":Mn(n,"cp-thumb-size"),"--cp-saturation-height":Mn(n,"cp-saturation-height")}}),cy=Pe(e=>{const n=ge("ColorPicker",Cee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,format:f="hex",value:c,defaultValue:h,onChange:d,onChangeEnd:p,withPicker:v,size:y,saturationLabel:b,hueLabel:w,alphaLabel:_,focusable:S,swatches:C,swatchesPerRow:E,fullWidth:A,onColorSwatchClick:T,__staticSelector:j,mod:N,attributes:q,name:R,hiddenInputProps:L,...B}=n,G=Ge({name:j,props:n,classes:fy,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:q,rootSelector:"wrapper",vars:l,varsResolver:SI}),H=O.useRef(f||"hex"),U=O.useRef(""),P=O.useRef(-1),z=O.useRef(!1),F=f==="hexa"||f==="rgba"||f==="hsla",[Y,D,V]=xi({value:c,defaultValue:h,finalValue:"#FFFFFF",onChange:d}),[W,$]=O.useState(wv(Y)),X=()=>{window.clearTimeout(P.current),z.current=!0},te=()=>{window.clearTimeout(P.current),P.current=window.setTimeout(()=>{z.current=!1},200)},ae=le=>{$(ye=>{const oe={...ye,...le};return U.current=zs(H.current,oe),oe}),D(U.current)};return Yo(()=>{typeof c=="string"&&kee(c)&&!z.current&&$(wv(c))},[c]),Yo(()=>{H.current=f||"hex",D(zs(H.current,W))},[f]),k.jsx(uy,{value:{getStyles:G,unstyled:o},children:k.jsxs(we,{...G("wrapper"),size:y,mod:[{"full-width":A},N],...B,children:[R&&k.jsx("input",{type:"hidden",name:R,value:Y,...L}),v&&k.jsxs(k.Fragment,{children:[k.jsx(_I,{value:W,onChange:ae,onChangeEnd:({s:le,v:ye})=>p==null?void 0:p(zs(H.current,{...W,s:le,v:ye})),color:Y,size:y,focusable:S,saturationLabel:b,onScrubStart:X,onScrubEnd:te}),k.jsxs("div",{...G("body"),children:[k.jsxs("div",{...G("sliders"),children:[k.jsx(rC,{value:W.h,onChange:le=>ae({h:le}),onChangeEnd:le=>p==null?void 0:p(zs(H.current,{...W,h:le})),size:y,focusable:S,"aria-label":w,onScrubStart:X,onScrubEnd:te}),F&&k.jsx(iC,{value:W.a,onChange:le=>ae({a:le}),onChangeEnd:le=>{p==null||p(zs(H.current,{...W,a:le}))},size:y,color:zs("hex",W),focusable:S,"aria-label":_,onScrubStart:X,onScrubEnd:te})]}),F&&k.jsx(xc,{color:Y,radius:"sm",size:"var(--cp-preview-size)",...G("preview")})]})]}),Array.isArray(C)&&k.jsx(xI,{data:C,swatchesPerRow:E,focusable:S,setValue:D,value:Y,onChangeEnd:le=>{const ye=zs(f,wv(le));T==null||T(ye),p==null||p(ye),V||$(wv(le))}})]})})});cy.classes=fy;cy.varsResolver=SI;cy.displayName="@mantine/core/ColorPicker";var CI={root:"m_3eebeb36",label:"m_9e365f20"};const Aee={orientation:"horizontal"},AI=(e,{color:n,variant:t,size:i})=>({root:{"--divider-color":n?nt(n,e):void 0,"--divider-border-style":t,"--divider-size":Mn(i,"divider-size")}}),dy=Pe(e=>{const n=ge("Divider",Aee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:f,orientation:c,label:h,labelPosition:d,mod:p,attributes:v,...y}=n,b=Ge({name:"Divider",classes:CI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,vars:l,varsResolver:AI});return k.jsx(we,{mod:[{orientation:c,withLabel:!!h},p],role:"separator",...b("root"),...y,children:h&&k.jsx(we,{component:"span",mod:{position:d},...b("label"),children:h})})});dy.classes=CI;dy.varsResolver=AI;dy.displayName="@mantine/core/Divider";const[W5,OI]=da("Grid component was not found in tree"),lS=(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))`},G5=(e,n,t)=>t||e==="auto"?"100%":e==="content"?"unset":lS(e,n),Y5=(e,n)=>{if(e)return e==="auto"||n?"1":"auto"},K5=(e,n)=>{if(e===0)return"0";if(e)return`calc(${100*e/n}% + ${e/n} * var(--grid-column-gap))`};function Oee({span:e,order:n,offset:t,align:i,selector:r}){var v;const a=ni(),o=OI(),l=o.breakpoints||a.breakpoints,f=zr(e),c=f===void 0?12:f,h=pu({"--col-order":(v=zr(n))==null?void 0:v.toString(),"--col-flex-grow":Y5(c,o.grow),"--col-flex-basis":lS(c,o.columns),"--col-width":c==="content"?"auto":void 0,"--col-max-width":G5(c,o.columns,o.grow),"--col-offset":K5(zr(t),o.columns),"--col-align-self":zr(i)}),d=St(l).reduce((y,b)=>{var w;return y[b]||(y[b]={}),typeof n=="object"&&n[b]!==void 0&&(y[b]["--col-order"]=(w=n[b])==null?void 0:w.toString()),typeof e=="object"&&e[b]!==void 0&&(y[b]["--col-flex-grow"]=Y5(e[b],o.grow),y[b]["--col-flex-basis"]=lS(e[b],o.columns),y[b]["--col-width"]=e[b]==="content"?"auto":void 0,y[b]["--col-max-width"]=G5(e[b],o.columns,o.grow)),typeof t=="object"&&t[b]!==void 0&&(y[b]["--col-offset"]=K5(t[b],o.columns)),typeof i=="object"&&i[b]!==void 0&&(y[b]["--col-align-self"]=i[b]),y},{}),p=Ch(St(d),l).filter(y=>St(d[y.value]).length>0).map(y=>({query:o.type==="container"?`mantine-grid (min-width: ${l[y.value]})`:`(min-width: ${l[y.value]})`,styles:d[y.value]}));return k.jsx(vc,{styles:h,media:o.type==="container"?void 0:p,container:o.type==="container"?p:void 0,selector:r})}var aC={container:"m_8478a6da",root:"m_410352e9",inner:"m_dee7bd2f",col:"m_96bdd299"};const Eee={span:12},oC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,span:o,order:l,offset:f,align:c,...h}=ge("GridCol",Eee,e),d=OI(),p=I1();return k.jsxs(k.Fragment,{children:[k.jsx(Oee,{selector:`.${p}`,span:o,order:l,offset:f,align:c}),k.jsx(we,{...d.getStyles("col",{className:cn(t,p),style:i,classNames:n,styles:r}),...h})]})});oC.classes=aC;oC.displayName="@mantine/core/GridCol";function X5({gap:e,rowGap:n,columnGap:t,selector:i,breakpoints:r,type:a}){const o=ni(),l=r||o.breakpoints,f=pu({"--grid-gap":Ft(zr(e)),"--grid-row-gap":Ft(zr(n)),"--grid-column-gap":Ft(zr(t))}),c=St(l).reduce((d,p)=>(d[p]||(d[p]={}),typeof e=="object"&&e[p]!==void 0&&(d[p]["--grid-gap"]=Ft(e[p])),typeof n=="object"&&n[p]!==void 0&&(d[p]["--grid-row-gap"]=Ft(n[p])),typeof t=="object"&&t[p]!==void 0&&(d[p]["--grid-column-gap"]=Ft(t[p])),d),{}),h=Ch(St(c),l).filter(d=>St(c[d.value]).length>0).map(d=>({query:a==="container"?`mantine-grid (min-width: ${l[d.value]})`:`(min-width: ${l[d.value]})`,styles:c[d.value]}));return k.jsx(vc,{styles:f,media:a==="container"?void 0:h,container:a==="container"?h:void 0,selector:i})}const Tee={gap:"md",columns:12},EI=(e,{justify:n,align:t,overflow:i})=>({root:{"--grid-justify":n,"--grid-align":t,"--grid-overflow":i}}),Pr=Pe(e=>{const n=ge("Grid",Tee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,grow:f,gap:c,rowGap:h,columnGap:d,columns:p,align:v,justify:y,children:b,breakpoints:w,type:_,attributes:S,...C}=n,E=Ge({name:"Grid",classes:aC,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:S,vars:l,varsResolver:EI}),A=I1();return _==="container"&&w?k.jsxs(W5,{value:{getStyles:E,grow:f,columns:p,breakpoints:w,type:_},children:[k.jsx(X5,{selector:`.${A}`,...n}),k.jsx("div",{...E("container"),children:k.jsx(we,{...E("root",{className:A}),...C,children:k.jsx("div",{...E("inner"),children:b})})})]}):k.jsxs(W5,{value:{getStyles:E,grow:f,columns:p,breakpoints:w,type:_},children:[k.jsx(X5,{selector:`.${A}`,...n}),k.jsx(we,{...E("root",{className:A}),...C,children:k.jsx("div",{...E("inner"),children:b})})]})});Pr.classes=aC;Pr.varsResolver=EI;Pr.displayName="@mantine/core/Grid";Pr.Col=oC;const Mee=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],Z5={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"};function Q5(e){Object.keys(Z5).forEach(n=>{e.style.setProperty(n,Z5[n],"important")})}function jee(e){const n=window.getComputedStyle(e);if(n===null)return null;const t={};for(const i of Mee)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 wi=null;function Dee(e,n,t=1,i=1/0){wi||(wi=document.createElement("textarea"),wi.setAttribute("tabindex","-1"),wi.setAttribute("aria-hidden","true"),wi.setAttribute("aria-label","autosize measurement"),Q5(wi)),wi.parentNode===null&&document.body.appendChild(wi);const{paddingSize:r,borderSize:a,sizingStyle:o}=e,{boxSizing:l}=o;Object.keys(o).forEach(p=>{wi.style[p]=o[p]}),Q5(wi),wi.value=n;let f=l==="border-box"?wi.scrollHeight+a:wi.scrollHeight-r;wi.value=n,f=l==="border-box"?wi.scrollHeight+a:wi.scrollHeight-r,wi.value="x";const c=wi.scrollHeight-r;let h=c*t;l==="border-box"&&(h=h+r+a),f=Math.max(h,f);let d=c*i;return l==="border-box"&&(d=d+r+a),f=Math.min(d,f),[f,c]}function Ree({maxRows:e,minRows:n,onChange:t,ref:i,...r}){const a=r.value!==void 0,o=O.useRef(null),l=zt(o,i),f=O.useRef(0),c=()=>{const d=o.current;if(!d)return;const p=jee(d);if(!p)return;const[v]=Dee(p,d.value||d.placeholder||"x",n,e);f.current!==v&&(f.current=v,d.style.setProperty("height",`${v}px`,"important"))},h=d=>{a||c(),t==null||t(d)};return O.useLayoutEffect(c),O.useEffect(()=>{const d=()=>c();return window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[]),O.useEffect(()=>{const d=()=>c();return document.fonts.addEventListener("loadingdone",d),()=>document.fonts.removeEventListener("loadingdone",d)},[]),O.useEffect(()=>{const d=p=>{var v;if(((v=o.current)==null?void 0:v.form)===p.target&&!a){const y=o.current.value;requestAnimationFrame(()=>{o.current&&y!==o.current.value&&c()})}};return document.body.addEventListener("reset",d),()=>document.body.removeEventListener("reset",d)},[a]),k.jsx("textarea",{...r,onChange:h,ref:l})}const Pee={size:"sm"},Th=Pe(e=>{const{autosize:n,maxRows:t,minRows:i,__staticSelector:r,resize:a,...o}=ge("Textarea",Pee,e),l=n&&fK()!=="test",f=l?{maxRows:t,minRows:i}:{};return k.jsx(zi,{component:l?Ree:"textarea",...o,__staticSelector:r||"Textarea",multiline:!0,"data-no-overflow":n&&t===void 0||void 0,__vars:{"--input-resize":a},...f})});Th.classes=zi.classes;Th.displayName="@mantine/core/Textarea";const[Nee,al]=da("Menu component was not found in the tree");var ol={dropdown:"m_dc9b7c9f",label:"m_9bfac126",divider:"m_efdf90cb",item:"m_99ac2aa1",itemLabel:"m_5476e0d3",itemSection:"m_8b75e504",chevron:"m_b85b0bed"};const sC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ge("MenuDivider",null,e);return k.jsx(we,{...al().getStyles("divider",{className:t,style:i,styles:r,classNames:n}),...o})});sC.classes=ol;sC.displayName="@mantine/core/MenuDivider";const lC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,onMouseEnter:o,onMouseLeave:l,onKeyDown:f,children:c,ref:h,...d}=ge("MenuDropdown",null,e),p=O.useRef(null),v=al(),y=pr(f,_=>{var S,C;(_.key==="ArrowUp"||_.key==="ArrowDown")&&(_.preventDefault(),(C=(S=p.current)==null?void 0:S.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||C.focus())}),b=pr(o,()=>(v.trigger==="hover"||v.trigger==="click-hover")&&v.openDropdown()),w=pr(l,()=>(v.trigger==="hover"||v.trigger==="click-hover")&&v.closeDropdown());return k.jsxs(Tn.Dropdown,{...d,onMouseEnter:b,onMouseLeave:w,role:"menu","aria-orientation":"vertical",ref:zt(h,p),...v.getStyles("dropdown",{className:t,style:i,styles:r,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:y,children:[v.withInitialFocusPlaceholder&&k.jsx("div",{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),c]})});lC.classes=ol;lC.displayName="@mantine/core/MenuDropdown";const Mh=O.createContext(null),uC=$i(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,color:o,closeMenuOnClick:l,leftSection:f,rightSection:c,children:h,disabled:d,"data-disabled":p,ref:v,...y}=ge("MenuItem",null,e),b=al(),w=O.use(Mh),_=ni(),{dir:S}=yu(),C=O.useRef(null),E=y,A=pr(E.onClick,()=>{p||(typeof l=="boolean"?l&&b.closeDropdownImmediately():b.closeOnItemClick&&b.closeDropdownImmediately())}),T=o?_.variantColorResolver({color:o,theme:_,variant:"light"}):void 0,j=o?is({color:o,theme:_}):null,N=pr(E.onKeyDown,q=>{q.key==="ArrowLeft"&&w&&(w.close(),w.focusParentItem())});return k.jsxs(fi,{onMouseDown:q=>q.preventDefault(),...y,unstyled:b.unstyled,tabIndex:b.menuItemTabIndex,...b.getStyles("item",{className:t,style:i,styles:r,classNames:n}),ref:zt(C,v),role:"menuitem",disabled:d,"data-menu-item":!0,"data-disabled":d||p||void 0,"data-mantine-stop-propagation":!0,onClick:A,onKeyDown:f6({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:b.loop,dir:S,orientation:"vertical",onKeyDown:N}),__vars:{"--menu-item-color":j!=null&&j.isThemeColor&&(j==null?void 0:j.shade)===void 0?`var(--mantine-color-${j.color}-6)`:T==null?void 0:T.color,"--menu-item-hover":T==null?void 0:T.hover},children:[f&&k.jsx("div",{...b.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"left",children:f}),h&&k.jsx("div",{...b.getStyles("itemLabel",{styles:r,classNames:n}),children:h}),c&&k.jsx("div",{...b.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"right",children:c})]})});uC.classes=ol;uC.displayName="@mantine/core/MenuItem";const fC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ge("MenuLabel",null,e);return k.jsx(we,{...al().getStyles("label",{className:t,style:i,styles:r,classNames:n}),...o})});fC.classes=ol;fC.displayName="@mantine/core/MenuLabel";const cC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,onMouseEnter:o,onMouseLeave:l,onKeyDown:f,children:c,ref:h,...d}=ge("MenuSubDropdown",null,e),p=O.useRef(null),v=al(),y=O.use(Mh),b=pr(o,y==null?void 0:y.open),w=pr(l,y==null?void 0:y.close);return k.jsx(Tn.Dropdown,{...d,onMouseEnter:b,onMouseLeave:w,role:"menu","aria-orientation":"vertical",ref:zt(h,p),...v.getStyles("dropdown",{className:t,style:i,styles:r,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,children:c})});cC.classes=ol;cC.displayName="@mantine/core/MenuSubDropdown";const dC=$i(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,color:o,leftSection:l,rightSection:f,children:c,disabled:h,"data-disabled":d,closeMenuOnClick:p,ref:v,...y}=ge("MenuSubItem",null,e),b=al(),w=O.use(Mh),_=ni(),{dir:S}=yu(),C=O.useRef(null),E=y,A=o?_.variantColorResolver({color:o,theme:_,variant:"light"}):void 0,T=o?is({color:o,theme:_}):null,j=pr(E.onKeyDown,L=>{L.key==="ArrowRight"&&(w==null||w.open(),w==null||w.focusFirstItem()),L.key==="ArrowLeft"&&(w!=null&&w.parentContext)&&(w.parentContext.close(),w.parentContext.focusParentItem())}),N=pr(E.onClick,()=>{!d&&p&&b.closeDropdownImmediately()}),q=pr(E.onMouseEnter,w==null?void 0:w.open),R=pr(E.onMouseLeave,w==null?void 0:w.close);return k.jsxs(fi,{onMouseDown:L=>L.preventDefault(),...y,unstyled:b.unstyled,tabIndex:b.menuItemTabIndex,...b.getStyles("item",{className:t,style:i,styles:r,classNames:n}),ref:zt(C,v),role:"menuitem",disabled:h,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":h||d||void 0,"data-mantine-stop-propagation":!0,onMouseEnter:q,onMouseLeave:R,onClick:N,onKeyDown:f6({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:b.loop,dir:S,orientation:"vertical",onKeyDown:j}),__vars:{"--menu-item-color":T!=null&&T.isThemeColor&&(T==null?void 0:T.shade)===void 0?`var(--mantine-color-${T.color}-6)`:A==null?void 0:A.color,"--menu-item-hover":A==null?void 0:A.hover},children:[l&&k.jsx("div",{...b.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"left",children:l}),c&&k.jsx("div",{...b.getStyles("itemLabel",{styles:r,classNames:n}),children:c}),k.jsx("div",{...b.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"right",children:f||k.jsx(gg,{...b.getStyles("chevron"),size:14})})]})});dC.classes=ol;dC.displayName="@mantine/core/MenuSubItem";function TI({children:e,refProp:n}){if(!u6(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 al(),k.jsx(Tn.Target,{refProp:n,popupType:"menu",children:e})}TI.displayName="@mantine/core/MenuSubTarget";const $ee={offset:0,position:"right-start",transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function Cc(e){const{children:n,closeDelay:t,openDelay:i,...r}=ge("MenuSub",$ee,e),a=Gi(),[o,{open:l,close:f}]=Q$(!1),c=O.use(Mh),{openDropdown:h,closeDropdown:d}=Gz({open:l,close:f,closeDelay:t,openDelay:i}),p=()=>window.setTimeout(()=>{var y,b;(b=(y=document.getElementById(`${a}-dropdown`))==null?void 0:y.querySelectorAll("[data-menu-item]:not([data-disabled])")[0])==null||b.focus()},16),v=()=>window.setTimeout(()=>{var y;(y=document.getElementById(`${a}-target`))==null||y.focus()},16);return k.jsx(Mh,{value:{opened:o,close:d,open:h,focusFirstItem:p,focusParentItem:v,parentContext:c},children:k.jsx(Tn,{opened:o,withinPortal:!1,withArrow:!1,id:a,...r,children:n})})}Cc.extend=e=>e;Cc.displayName="@mantine/core/MenuSub";Cc.Target=TI;Cc.Dropdown=cC;Cc.Item=dC;const zee={refProp:"ref"};function MI(e){const{children:n,refProp:t,...i}=ge("MenuTarget",zee,e),r=vu(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=al(),o=r.props,l=pr(o.onClick,()=>{a.trigger==="click"?a.toggleDropdown():a.trigger==="click-hover"&&(a.setOpenedViaClick(!0),a.opened||a.openDropdown())}),f=pr(o.onMouseEnter,()=>(a.trigger==="hover"||a.trigger==="click-hover")&&a.openDropdown()),c=pr(o.onMouseLeave,()=>{(a.trigger==="hover"||a.trigger==="click-hover"&&!a.openedViaClick)&&a.closeDropdown()});return k.jsx(Tn.Target,{refProp:t,popupType:"menu",...i,children:O.cloneElement(r,{onClick:l,onMouseEnter:f,onMouseLeave:c,"data-expanded":a.opened?!0:void 0})})}MI.displayName="@mantine/core/MenuTarget";const Lee={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:["mousedown","touchstart","keydown"],loop:!0,trigger:"click",openDelay:0,closeDelay:100,menuItemTabIndex:-1},Kn=Pe(e=>{const n=ge("Menu",Lee,e),{children:t,onOpen:i,onClose:r,opened:a,defaultOpened:o,trapFocus:l,onChange:f,closeOnItemClick:c,loop:h,closeOnEscape:d,trigger:p,openDelay:v,closeDelay:y,classNames:b,styles:w,unstyled:_,variant:S,vars:C,menuItemTabIndex:E,keepMounted:A,withInitialFocusPlaceholder:T,attributes:j,...N}=n,q=Ge({name:"Menu",classes:ol,props:n,classNames:b,styles:w,unstyled:_,attributes:j}),[R,L]=xi({value:a,defaultValue:o,finalValue:!1,onChange:f}),[B,G]=O.useState(!1),H=()=>{L(!1),G(!1),R&&(r==null||r())},U=()=>{L(!0),!R&&(i==null||i())},P=()=>{R?H():U()},{openDropdown:z,closeDropdown:F}=Gz({open:U,close:H,closeDelay:y,openDelay:v}),Y=W=>VY("[data-menu-item]","[data-menu-dropdown]",W),{resolvedClassNames:D,resolvedStyles:V}=Ni({classNames:b,styles:w,props:n});return k.jsx(Nee,{value:{getStyles:q,opened:R,toggleDropdown:P,getItemIndex:Y,openedViaClick:B,setOpenedViaClick:G,closeOnItemClick:c,closeDropdown:p==="click"?H:F,openDropdown:p==="click"?U:z,closeDropdownImmediately:H,loop:h,trigger:p,unstyled:_,menuItemTabIndex:E,withInitialFocusPlaceholder:T},children:k.jsx(Tn,{returnFocus:!0,...N,opened:R,onChange:P,defaultOpened:o,trapFocus:A?!1:l,closeOnEscape:d,__staticSelector:"Menu",classNames:D,styles:V,unstyled:_,variant:S,keepMounted:A,children:t})})});Kn.displayName="@mantine/core/Menu";Kn.classes=ol;Kn.Item=uC;Kn.Label=fC;Kn.Dropdown=lC;Kn.Target=MI;Kn.Divider=sC;Kn.Sub=Cc;const[Iee,Ac]=da("Modal component was not found in tree");var as={root:"m_9df02822",content:"m_54c44539",inner:"m_1f958f16",header:"m_d0e2b9cd"};const hy=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ge("ModalBody",null,e);return k.jsx(xL,{...Ac().getStyles("body",{classNames:n,style:i,styles:r,className:t}),...o})});hy.classes=as;hy.displayName="@mantine/core/ModalBody";const my=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ge("ModalCloseButton",null,e);return k.jsx(SL,{...Ac().getStyles("close",{classNames:n,style:i,styles:r,className:t}),...o})});my.classes=as;my.displayName="@mantine/core/ModalCloseButton";const py=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,children:o,__hidden:l,...f}=ge("ModalContent",null,e),c=Ac(),h=c.scrollAreaComponent||_J;return k.jsx(CL,{...c.getStyles("content",{className:t,style:i,styles:r,classNames:n}),innerProps:c.getStyles("inner",{className:t,style:i,styles:r,classNames:n}),"data-full-screen":c.fullScreen||void 0,"data-modal-content":!0,"data-hidden":l||void 0,...f,children:k.jsx(h,{style:{maxHeight:c.fullScreen?"100dvh":`calc(100dvh - (${he(c.yOffset)} * 2))`},children:o})})});py.classes=as;py.displayName="@mantine/core/ModalContent";const vy=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ge("ModalHeader",null,e);return k.jsx(AL,{...Ac().getStyles("header",{classNames:n,style:i,styles:r,className:t}),...o})});vy.classes=as;vy.displayName="@mantine/core/ModalHeader";const gy=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ge("ModalOverlay",null,e);return k.jsx(OL,{...Ac().getStyles("overlay",{classNames:n,style:i,styles:r,className:t}),...o})});gy.classes=as;gy.displayName="@mantine/core/ModalOverlay";const Bee={__staticSelector:"Modal",closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:ha("modal"),transitionProps:{duration:200,transition:"fade-down"},yOffset:"5dvh"},jI=(e,{radius:n,size:t,yOffset:i,xOffset:r})=>({root:{"--modal-radius":n===void 0?void 0:Ut(n),"--modal-size":Mn(t,"modal-size"),"--modal-y-offset":he(i),"--modal-x-offset":he(r)}}),Nm=Pe(e=>{const n=ge("ModalRoot",Bee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,yOffset:f,scrollAreaComponent:c,radius:h,fullScreen:d,centered:p,xOffset:v,__staticSelector:y,attributes:b,...w}=n,_=Ge({name:y,classes:as,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,vars:l,varsResolver:jI});return k.jsx(Iee,{value:{yOffset:f,scrollAreaComponent:c,getStyles:_,fullScreen:d},children:k.jsx(_L,{..._("root"),"data-full-screen":d||void 0,"data-centered":p||void 0,"data-offset-scrollbars":c===uo.Autosize||void 0,unstyled:o,...w})})});Nm.classes=as;Nm.varsResolver=jI;Nm.displayName="@mantine/core/ModalRoot";const DI=O.createContext(null);function RI({children:e}){const[n,t]=O.useState([]),[i,r]=O.useState(ha("modal"));return k.jsx(DI,{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})}RI.displayName="@mantine/core/ModalStack";const yy=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ge("ModalTitle",null,e);return k.jsx(EL,{...Ac().getStyles("title",{classNames:n,style:i,styles:r,className:t}),...o})});yy.classes=as;yy.displayName="@mantine/core/ModalTitle";const Fee={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:ha("modal"),transitionProps:{duration:200,transition:"fade-down"},withOverlay:!0,withCloseButton:!0},Ir=Pe(e=>{const{title:n,withOverlay:t,overlayProps:i,withCloseButton:r,closeButtonProps:a,children:o,radius:l,opened:f,stackId:c,zIndex:h,...d}=ge("Modal",Fee,e),p=O.use(DI),v=!!n||r,y=p&&c?{closeOnEscape:p.currentId===c,trapFocus:p.currentId===c,zIndex:p.getZIndex(c)}:{},b=t===!1?!1:c&&p?p.currentId===c:f;return O.useEffect(()=>{p&&c&&(f?p.addModal(c,h||ha("modal")):p.removeModal(c))},[f,c,h]),k.jsxs(Nm,{radius:l,opened:f,zIndex:p&&c?p.getZIndex(c):h,...d,...y,children:[t&&k.jsx(gy,{visible:b,transitionProps:p&&c?{duration:0}:void 0,...i}),k.jsxs(py,{radius:l,__hidden:p&&c&&f?c!==p.currentId:!1,children:[v&&k.jsxs(vy,{children:[n&&k.jsx(yy,{children:n}),r&&k.jsx(my,{...a})]}),k.jsx(hy,{children:o})]})]})});Ir.classes=as;Ir.displayName="@mantine/core/Modal";Ir.Root=Nm;Ir.Overlay=gy;Ir.Content=py;Ir.Body=hy;Ir.Header=vy;Ir.Title=yy;Ir.CloseButton=my;Ir.Stack=RI;const by=O.createContext(null);var wy={root:"m_7cda1cd6","root--default":"m_44da308b","root--contrast":"m_e3a01f8",label:"m_1e0e6180",remove:"m_ae386778",group:"m_1dcfd90b"};const PI=O.createContext(null),NI=(e,{gap:n},{size:t})=>({group:{"--pg-gap":n!==void 0?Mn(n):Mn(t,"pg-gap")}}),ky=Pe(e=>{var y;const n=ge("PillGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:f,disabled:c,attributes:h,...d}=n,p=((y=O.use(by))==null?void 0:y.size)||f||void 0,v=Ge({name:"PillGroup",classes:wy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l,varsResolver:NI,stylesCtx:{size:p},rootSelector:"group"});return k.jsx(PI,{value:{size:p,disabled:c},children:k.jsx(we,{size:p,...v("group"),...d})})});ky.classes=wy;ky.varsResolver=NI;ky.displayName="@mantine/core/PillGroup";const qee={variant:"default"},$I=(e,{radius:n},{size:t})=>({root:{"--pill-fz":Mn(t,"pill-fz"),"--pill-height":Mn(t,"pill-height"),"--pill-radius":n===void 0?void 0:Ut(n)}}),tl=Pe(e=>{const n=ge("Pill",qee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,variant:f,children:c,withRemoveButton:h,onRemove:d,removeButtonProps:p,radius:v,size:y,disabled:b,mod:w,attributes:_,...S}=n,C=O.use(PI),E=O.use(by),A=y||(C==null?void 0:C.size)||void 0,T=(E==null?void 0:E.variant)==="filled"?"contrast":f||"default",j=Ge({name:"Pill",classes:wy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:_,vars:l,varsResolver:$I,stylesCtx:{size:A}});return k.jsxs(we,{component:"span",variant:T,size:A,...j("root",{variant:T}),mod:[{"with-remove":h&&!b,disabled:b||(C==null?void 0:C.disabled)},w],...S,children:[k.jsx("span",{...j("label"),children:c}),h&&k.jsx(bu,{variant:"transparent",radius:v,tabIndex:-1,"aria-hidden":!0,unstyled:o,...p,...j("remove",{className:p==null?void 0:p.className,style:p==null?void 0:p.style}),onMouseDown:N=>{var q;N.preventDefault(),N.stopPropagation(),(q=p==null?void 0:p.onMouseDown)==null||q.call(p,N)},onClick:N=>{var q;N.stopPropagation(),d==null||d(),(q=p==null?void 0:p.onClick)==null||q.call(p,N)}})]})});tl.classes=wy;tl.varsResolver=$I;tl.displayName="@mantine/core/Pill";tl.Group=ky;var zI={field:"m_45c4369d"};const Hee={type:"visible"},hC=Pe(e=>{const n=ge("PillsInputField",Hee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,type:f,disabled:c,id:h,pointer:d,mod:p,attributes:v,ref:y,...b}=n,w=O.use(by),_=O.use(wu),S=Ge({name:"PillsInputField",classes:zI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,rootSelector:"field"}),C=c||(w==null?void 0:w.disabled);return k.jsx(we,{component:"input",ref:zt(y,w==null?void 0:w.fieldRef),"data-type":f,disabled:C,mod:[{disabled:C,pointer:d},p],...S("field"),...b,id:(_==null?void 0:_.inputId)||h,"aria-invalid":w==null?void 0:w.hasError,"aria-describedby":_==null?void 0:_.describedBy,type:"text",onMouseDown:E=>!d&&E.stopPropagation()})});hC.classes=zI;hC.displayName="@mantine/core/PillsInputField";const Uee={size:"sm"},su=Pe(e=>{const{children:n,onMouseDown:t,onClick:i,size:r,disabled:a,__staticSelector:o,error:l,variant:f,...c}=ge("PillsInput",Uee,e),h=O.useRef(null);return k.jsx(by,{value:{fieldRef:h,size:r,disabled:a,hasError:!!l,variant:f},children:k.jsx(zi,{size:r,error:l,variant:f,component:"div","data-no-overflow":!0,onMouseDown:d=>{var p;d.preventDefault(),t==null||t(d),(p=h.current)==null||p.focus()},onClick:d=>{var p,v;d.preventDefault(),(p=d.currentTarget.closest("fieldset"))!=null&&p.disabled||((v=h.current)==null||v.focus(),i==null||i(d))},...c,multiline:!0,disabled:a,__staticSelector:o||"PillsInput",withAria:!1,children:n})})});su.displayName="@mantine/core/PillsInput";su.classes=zi.classes;su.Field=hC;function lk(e){return typeof e=="string"?e.trim().toLowerCase():e}function Vee({data:e,value:n}){const t=n.map(lk);return e.reduce((i,r)=>(au(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 J5={xs:41,sm:50,md:60,lg:72,xl:89},Wee={maxValues:1/0,withCheckIcon:!0,checkIconPosition:"left",hiddenInputValuesDivider:",",clearSearchOnChange:!0,openOnFocus:!0,size:"sm"},_y=B1(e=>{const n=ge("MultiSelect",Wee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:f,value:c,defaultValue:h,onChange:d,onKeyDown:p,variant:v,data:y,dropdownOpened:b,defaultDropdownOpened:w,onDropdownOpen:_,onDropdownClose:S,selectFirstOptionOnChange:C,selectFirstOptionOnDropdownOpen:E,onOptionSubmit:A,comboboxProps:T,filter:j,limit:N,withScrollArea:q,maxDropdownHeight:R,searchValue:L,defaultSearchValue:B,onSearchChange:G,readOnly:H,disabled:U,onFocus:P,onBlur:z,radius:F,rightSection:Y,rightSectionWidth:D,rightSectionPointerEvents:V,rightSectionProps:W,leftSection:$,leftSectionWidth:X,leftSectionPointerEvents:te,leftSectionProps:ae,inputContainer:le,inputWrapperOrder:ye,withAsterisk:oe,labelProps:ue,descriptionProps:ke,errorProps:ie,wrapperProps:Re,description:pe,label:Ce,error:De,maxValues:be,searchable:_e,nothingFoundMessage:Me,withCheckIcon:Be,withAlignedLabels:Ve,checkIconPosition:He,hidePickedOptions:We,withErrorStyles:Ye,name:rn,form:Q,id:me,clearable:xe,clearSectionMode:Xe,clearButtonProps:ne,hiddenInputProps:Le,placeholder:en,hiddenInputValuesDivider:hn,required:fn,mod:Ze,renderOption:Ke,renderPill:An,onRemove:on,onClear:ht,onMaxValues:mt,scrollAreaProps:zn,chevronColor:yn,attributes:kn,clearSearchOnChange:tt,openOnFocus:At,loading:$e,loadingPosition:Fe,...jn}=n,Jn=Gi(me),On=J1(y),Qe=Rm(On),Je=O.useRef({}),nn=Pm({opened:b,defaultOpened:w,onDropdownOpen:()=>{_==null||_(),E&&nn.selectFirstOption()},onDropdownClose:()=>{S==null||S(),nn.resetSelectedOption()}}),{styleProps:Ln,rest:{type:In,autoComplete:bt,...xn}}=gu(jn),[_n,Wn]=xi({value:c,defaultValue:h,finalValue:[],onChange:d}),[Lt,di]=xi({value:L,defaultValue:B,finalValue:"",onChange:G}),Ki=sn=>{di(sn),nn.resetSelectedOption()},za=Ge({name:"MultiSelect",classes:{},props:n,classNames:t,styles:a,unstyled:o,attributes:kn}),{resolvedClassNames:mo,resolvedStyles:Br}=Ni({props:n,styles:a,classNames:t}),Fr=sn=>{p==null||p(sn),sn.key===" "&&!_e&&(sn.preventDefault(),nn.toggleDropdown()),sn.key==="Backspace"&&Lt.length===0&&_n.length>0&&(on==null||on(_n[_n.length-1]),Wn(_n.slice(0,_n.length-1)))},La=_n.map((sn,_r)=>{var qr;const Ia=Qe[`${sn}`]||Je.current[`${sn}`];return An?k.jsx(O.Fragment,{children:An({option:Ia,value:sn,onRemove:()=>{Wn(_n.filter(Hr=>sn!==Hr)),on==null||on(sn)},disabled:U})},`${sn}-${_r}`):k.jsx(tl,{withRemoveButton:!H&&!((qr=Qe[`${sn}`])!=null&&qr.disabled),onRemove:()=>{Wn(_n.filter(Hr=>sn!==Hr)),on==null||on(sn)},unstyled:o,disabled:U,...za("pill"),children:(Ia==null?void 0:Ia.label)||sn},`${sn}-${_r}`)});O.useEffect(()=>{C&&nn.selectFirstOption()},[C,Lt]),O.useEffect(()=>{_n.forEach(sn=>{`${sn}`in Qe&&(Je.current[`${sn}`]=Qe[`${sn}`])})},[Qe,_n]);const wr=k.jsx(Sn.ClearButton,{...ne,onClear:()=>{ht==null||ht(),Wn([]),Ki("")}}),kr=Vee({data:On,value:_n}),dn=xe&&_n.length>0&&!U&&!H,ti=dn?{paddingInlineEnd:J5[f]??J5.sm}:void 0;return k.jsxs(k.Fragment,{children:[k.jsxs(Sn,{store:nn,classNames:mo,styles:Br,unstyled:o,size:f,readOnly:H,__staticSelector:"MultiSelect",attributes:kn,onOptionSubmit:sn=>{A==null||A(sn),tt&&Ki(""),nn.updateSelectedOptionIndex("selected"),_n.includes(Qe[`${sn}`].value)?(Wn(_n.filter(_r=>_r!==Qe[`${sn}`].value)),on==null||on(Qe[`${sn}`].value)):_n.length_e?nn.openDropdown():nn.toggleDropdown(),"data-expanded":nn.dropdownOpened||void 0,id:Jn,required:fn,mod:Ze,attributes:kn,children:k.jsxs(tl.Group,{attributes:kn,disabled:U,unstyled:o,...za("pillsList",{style:ti}),children:[La,k.jsx(Sn.EventsTarget,{autoComplete:bt,withExpandedAttribute:!0,children:k.jsx(su.Field,{...xn,id:Jn,placeholder:en,type:!_e&&!en?"hidden":"visible",...za("inputField"),unstyled:o,onFocus:sn=>{P==null||P(sn),At&&_e&&nn.openDropdown()},onBlur:sn=>{z==null||z(sn),nn.closeDropdown(),Ki("")},onKeyDown:Fr,value:Lt,onChange:sn=>{Ki(sn.currentTarget.value),_e&&nn.openDropdown(),C&&nn.selectFirstOption()},disabled:U,readOnly:H||!_e,pointer:!_e})})]})})}),k.jsx(iy,{data:We?kr:On,hidden:H||U,filter:j,search:Lt,limit:N,hiddenWhenEmpty:!Me,withScrollArea:q,maxDropdownHeight:R,filterOptions:_e,value:_n,checkIconPosition:He,withCheckIcon:Be,withAlignedLabels:Ve,nothingFoundMessage:Me,unstyled:o,labelId:Ce?`${Jn}-label`:void 0,"aria-label":Ce?void 0:jn["aria-label"],renderOption:Ke,scrollAreaProps:zn})]}),k.jsx(Sn.HiddenInput,{name:rn,valuesDivider:hn,value:_n,form:Q,disabled:U,...Le})]})});_y.classes={...zi.classes,...Sn.classes};_y.displayName="@mantine/core/MultiSelect";var LI={root:"m_a513464",icon:"m_a4ceffb",loader:"m_b0920b15",body:"m_a49ed24",title:"m_3feedf16",description:"m_3d733a3a",closeButton:"m_919a4d88"};const Gee={withCloseButton:!0},II=(e,{radius:n,color:t})=>({root:{"--notification-radius":n===void 0?void 0:Ut(n),"--notification-color":t?nt(t,e):void 0}}),xy=Pe(e=>{const n=ge("Notification",Gee,e),{className:t,color:i,radius:r,loading:a,withCloseButton:o,withBorder:l,title:f,icon:c,children:h,onClose:d,closeButtonProps:p,classNames:v,style:y,styles:b,unstyled:w,vars:_,mod:S,loaderProps:C,role:E,attributes:A,...T}=n,j=Ge({name:"Notification",classes:LI,props:n,className:t,style:y,classNames:v,styles:b,unstyled:w,attributes:A,vars:_,varsResolver:II});return k.jsxs(we,{...j("root"),mod:[{"data-with-icon":!!c||a,"data-with-border":l},S],role:E||"alert",...T,children:[c&&!a&&k.jsx("div",{...j("icon"),children:c}),a&&k.jsx(Wi,{size:28,color:i,...j("loader"),...C}),k.jsxs("div",{...j("body"),children:[f&&k.jsx("div",{...j("title"),children:f}),k.jsx(we,{...j("description"),mod:{"data-with-title":!!f},children:h})]}),o&&k.jsx(bu,{iconSize:16,color:"gray",...p,unstyled:w,onClick:N=>{var q;(q=p==null?void 0:p.onClick)==null||q.call(p,N),d==null||d()},...j("closeButton")})]})});xy.classes=LI;xy.varsResolver=II;xy.displayName="@mantine/core/Notification";function BI(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+nM("0",o-l):r=(r.substring(0,o)||"0")+"."+r.substring(o),t+r}function tM(e,n,t){if(["","-"].indexOf(e)!==-1)return e;var i=(e.indexOf(".")!==-1||t)&&n,r=mC(e),a=r.beforeDecimal,o=r.afterDecimal,l=r.hasNegation,f=parseFloat("0."+(o||"0")),c=o.length<=n?"0."+o:f.toFixed(n),h=c.split("."),d=a;a&&Number(h[0])&&(d=a.split("").reverse().reduce(function(b,w,_){return b.length>_?(Number(b[0])+Number(w)).toString()+b.substring(1,b.length):w+b},h[0]));var p=HI(h[1]||"",n,t),v=l?"-":"",y=i?".":"";return""+v+d+y+p}function Ul(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 VI=Yee(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}}}),Jee=function(e,n){var t=Math.min(e.selectionStart,n);return{from:{start:t,end:e.selectionEnd},to:{start:t,end:n}}};function ene(e,n,t){return Math.min(Math.max(e,n),t)}function uk(e){return Math.max(e.selectionStart,e.selectionEnd)}function nne(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function tne(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function ine(e){var n=e.currentValue,t=e.formattedValue,i=e.currentValueIndex,r=e.formattedValueIndex;return n[i]===t[r]}function rne(e,n,t,i,r,a,o){o===void 0&&(o=ine);var l=r.findIndex(function(E){return E}),f=e.slice(0,l);!n&&!t.startsWith(f)&&(n=f,t=f+t,i=i+f.length);for(var c=t.length,h=e.length,d={},p=new Array(c),v=0;v0&&p[_]===-1;)_--;var C=_===-1||p[_]===-1?0:p[_]+1;return C>S?S:i-C=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 ane(e){for(var n=Array.from({length:e.length+1}).map(function(){return!0}),t=0,i=n.length;tj.length-o.length||TL||d>e.length-o.length)&&(R=d),e=e.substring(0,R),e=une(C?"-"+e:e,r),e=(e.match(fne(y))||[]).join("");var B=e.indexOf(y);e=e.replace(new RegExp(qI(y),"g"),function(z,F){return F===B?".":""});var G=mC(e,r),H=G.beforeDecimal,U=G.afterDecimal,P=G.addNegation;return c.end-c.startV?!1:D>=te.start&&Dt?t:e}function bne(e){return e.toString().replace(".","").length}function wne(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:[".",","]},KI=(e,{size:n})=>({controls:{"--ni-chevron-size":Mn(n,"ni-chevron-size")}});function _ne(e,n,t){const i=e.toString(),r=GI.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=Fo(o,t,n);return r?`${l.toString().replace(/^0+(?=\d)/,"")}.`:l}function xne(e,n){if(e===""||e==="-")return e;const t=nh(e);return t===null?e:n.clampBehavior==="blur"?Jv(t,n.min,n.max):t}const Cy=B1(e=>{const n=ge("NumberInput",hk,e),{className:t,classNames:i,styles:r,unstyled:a,vars:o,onChange:l,onValueChange:f,value:c,defaultValue:h,max:d,min:p,step:v,hideControls:y,rightSection:b,isAllowed:w,clampBehavior:_,onBlur:S,allowDecimal:C,decimalScale:E,onKeyDown:A,onKeyDownCapture:T,handlersRef:j,startValue:N,disabled:q,rightSectionPointerEvents:R,allowNegative:L,readOnly:B,size:G,rightSectionWidth:H,stepHoldInterval:U,stepHoldDelay:P,allowLeadingZeros:z,withKeyboardEvents:F,trimLeadingZeroesOnBlur:Y,allowedDecimalSeparators:D,selectAllOnFocus:V,onMinReached:W,onMaxReached:$,onFocus:X,attributes:te,ref:ae,...le}=n,ye=L??!0,oe=z??!0,ue=Ge({name:"NumberInput",classes:uS,props:n,classNames:i,styles:r,unstyled:a,attributes:te,vars:o,varsResolver:KI}),{resolvedClassNames:ke,resolvedStyles:ie}=Ni({classNames:i,styles:r,props:n}),Re=O.useRef(fk(c)||fk(h)?"bigint":"number");fk(c)?Re.current="bigint":typeof c=="number"&&(Re.current="number");const pe=Re.current==="bigint",[Ce,De]=xi({value:c,defaultValue:h,finalValue:"",onChange:l}),be=P!==void 0&&U!==void 0,_e=O.useRef(null),Me=O.useRef(null),Be=O.useRef(0),Ve=typeof p=="number"?p:void 0,He=typeof d=="number"?d:void 0,We=typeof v=="number"?v:hk.step,Ye=typeof N=="number"?N:hk.startValue,rn=kv(p),Q=kv(d),me=kv(v)??BigInt(1),xe=kv(N)??BigInt(0),Xe=$e=>!YI($e,ye)||oe&&oM.test($e)?$e:nh($e)??$e,ne=$e=>{const Fe=Number($e);return Number.isSafeInteger(Fe)?Fe:void 0},Le=($e,Fe)=>{Fe.source==="event"&&De(pe?Xe($e.value):wne($e.floatValue,$e.value)&&!gne.test($e.value)&&!(oe&&oM.test($e.value))&&!yne.test($e.value)&&!GI.test($e.value)?$e.floatValue:$e.value),f==null||f($e,Fe)},en=$e=>{const Fe=String($e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return Fe?Math.max(0,(Fe[1]?Fe[1].length:0)-(Fe[2]?+Fe[2]:0)):0},hn=$e=>{_e.current&&typeof $e<"u"&&_e.current.setSelectionRange($e,$e)},fn=O.useRef(W3);fn.current=()=>{if(pe){if(!dk(Ce,ye))return;let Je;const nn=Ce;if(typeof nn=="bigint"){const In=nn+me;Q!==void 0&&In>Q&&($==null||$()),Je=Q!==void 0&&In>Q?Q:In}else if(typeof nn=="string"&&nn!==""){const In=nh(nn);if(In===null)return;const bt=In+me;Q!==void 0&&bt>Q&&($==null||$()),Je=Q!==void 0&&bt>Q?Q:bt}else Je=Jv(xe,rn,Q);const Ln=Je.toString();De(Je),f==null||f({floatValue:ne(Je),formattedValue:Ln,value:Ln},{source:"increment"}),setTimeout(()=>{var In;return hn((In=_e.current)==null?void 0:In.value.length)},0);return}if(!ck(Ce))return;let $e;const Fe=en(Ce),jn=en(We),Jn=Math.max(Fe,jn),On=10**Jn;if(!fS(Ce)&&(typeof Ce!="number"||Number.isNaN(Ce)))$e=Fo(Ye,Ve,He);else if(He!==void 0){const Je=(Math.round(Number(Ce)*On)+Math.round(We*On))/On;Je>He&&($==null||$()),$e=Je<=He?Je:He}else $e=(Math.round(Number(Ce)*On)+Math.round(We*On))/On;const Qe=$e.toFixed(Jn);De(parseFloat(Qe)),f==null||f({floatValue:parseFloat(Qe),formattedValue:Qe,value:Qe},{source:"increment"}),setTimeout(()=>{var Je;return hn((Je=_e.current)==null?void 0:Je.value.length)},0)};const Ze=O.useRef(W3);Ze.current=()=>{if(pe){if(!dk(Ce,ye))return;let nn;const Ln=rn!==void 0?rn:ye?void 0:BigInt(0),In=Ce;if(typeof In=="bigint"){const xn=In-me;Ln!==void 0&&xn{var xn;return hn((xn=_e.current)==null?void 0:xn.value.length)},0);return}if(!ck(Ce))return;let $e;const Fe=Ve!==void 0?Ve:ye?Number.MIN_SAFE_INTEGER:0,jn=en(Ce),Jn=en(We),On=Math.max(jn,Jn),Qe=10**On;if(!fS(Ce)&&typeof Ce!="number"||Number.isNaN(Ce))$e=Fo(Ye,Fe,He);else{const nn=(Math.round(Number(Ce)*Qe)-Math.round(We*Qe))/Qe;Fe!==void 0&&nn{var nn;return hn((nn=_e.current)==null?void 0:nn.value.length)},0)};const Ke=$e=>{var On,Qe,Je;const Fe=$e.clipboardData.getData("text"),jn=le.decimalSeparator||".",Jn=(D||[".",","]).filter(nn=>nn!==jn);if(Jn.some(nn=>Fe.includes(nn))){$e.preventDefault();let nn=Fe;Jn.forEach(In=>{nn=nn.split(In).join(jn)});const Ln=_e.current;if(Ln){const In=Ln.selectionStart??0,bt=Ln.selectionEnd??0,xn=Ln.value,_n=xn.substring(0,In)+nn+xn.substring(bt);(Qe=(On=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:On.set)==null||Qe.call(Ln,_n),Ln.dispatchEvent(new Event("change",{bubbles:!0}));const Wn=In+nn.length;setTimeout(()=>hn(Wn),0)}}(Je=le.onPaste)==null||Je.call(le,$e)},An=$e=>{var Fe,jn;A==null||A($e),!(B||!F)&&($e.key==="ArrowUp"&&($e.preventDefault(),(Fe=fn.current)==null||Fe.call(fn)),$e.key==="ArrowDown"&&($e.preventDefault(),(jn=Ze.current)==null||jn.call(Ze)))},on=$e=>{if(T==null||T($e),$e.key==="Backspace"){const Fe=_e.current;Fe&&Fe.selectionStart===0&&Fe.selectionStart===Fe.selectionEnd&&($e.preventDefault(),window.setTimeout(()=>hn(0),0))}},ht=$e=>{V&&setTimeout(()=>$e.currentTarget.select(),0),X==null||X($e)},mt=$e=>{let Fe=Ce;pe?(_==="blur"&&typeof Fe=="bigint"&&(Fe=Jv(Fe,rn,Q)),Y&&typeof Fe=="string"&&(Fe=xne(Fe,{min:rn,max:Q,clampBehavior:_}))):(_==="blur"&&typeof Fe=="number"&&(Fe=Fo(Fe,Ve,He)),Y&&typeof Fe=="string"&&en(Fe)<15&&(Fe=_ne(Fe,He,Ve))),Ce!==Fe&&De(Fe),S==null||S($e)};ug(j,{increment:fn.current,decrement:Ze.current});const zn=$e=>{var Fe,jn;$e?(Fe=fn.current)==null||Fe.call(fn):(jn=Ze.current)==null||jn.call(Ze),Be.current+=1},yn=$e=>{if(zn($e),be){const Fe=typeof U=="number"?U:U(Be.current);Me.current=window.setTimeout(()=>yn($e),Fe)}},kn=($e,Fe)=>{var jn;$e.preventDefault(),(jn=_e.current)==null||jn.focus(),zn(Fe),be&&(Me.current=window.setTimeout(()=>yn(Fe),P))},tt=()=>{Me.current&&window.clearTimeout(Me.current),Me.current=null,Be.current=0},At=k.jsxs("div",{...ue("controls"),children:[k.jsx(fi,{...ue("control"),tabIndex:-1,"aria-hidden":!0,disabled:q||typeof Ce=="number"&&He!==void 0&&Ce>=He||typeof Ce=="bigint"&&Q!==void 0&&Ce>=Q,mod:{direction:"up"},onMouseDown:$e=>$e.preventDefault(),onPointerDown:$e=>{kn($e,!0)},onPointerUp:tt,onPointerLeave:tt,children:k.jsx(aM,{direction:"up"})}),k.jsx(fi,{...ue("control"),tabIndex:-1,"aria-hidden":!0,disabled:q||typeof Ce=="number"&&Ve!==void 0&&Ce<=Ve||typeof Ce=="bigint"&&rn!==void 0&&Ce<=rn,mod:{direction:"down"},onMouseDown:$e=>$e.preventDefault(),onPointerDown:$e=>{kn($e,!1)},onPointerUp:tt,onPointerLeave:tt,children:k.jsx(aM,{direction:"down"})})]});return k.jsx(zi,{component:vne,allowNegative:L,className:cn(uS.root,t),size:G,...le,inputMode:pe?"numeric":"decimal",readOnly:B,disabled:q,value:typeof Ce=="bigint"?Ce.toString():Ce,getInputRef:zt(ae,_e),onValueChange:Le,rightSection:y||B||!(pe?dk(Ce,ye):ck(Ce))?b:b||At,classNames:ke,styles:ie,unstyled:a,__staticSelector:"NumberInput",decimalScale:pe?0:C?E:0,onPaste:Ke,onFocus:ht,onKeyDown:An,onKeyDownCapture:on,rightSectionPointerEvents:R??(q?"none":void 0),rightSectionWidth:H??`var(--ni-right-section-width-${G||"sm"})`,allowLeadingZeros:z,allowedDecimalSeparators:D,onBlur:mt,attributes:te,isAllowed:$e=>{if(!(!w||w($e)))return!1;if(_!=="strict")return!0;if(!pe)return kne($e.floatValue,Ve,He);if($e.value===""||$e.value==="-")return!0;const Fe=nh($e.value);return Fe===null?!0:(rn===void 0||Fe>=rn)&&(Q===void 0||Fe<=Q)}})});Cy.classes={...zi.classes,...uS};Cy.varsResolver=KI;Cy.displayName="@mantine/core/NumberInput";function Sne({reveal:e}){return k.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?k.jsxs(k.Fragment,{children:[k.jsx("path",{fill:"none",d:"M0 0h256v256H0z"}),k.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"}),k.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"})]}):k.jsxs(k.Fragment,{children:[k.jsx("path",{fill:"none",d:"M0 0h256v256H0z"}),k.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"}),k.jsx("circle",{cx:"128",cy:"128",r:"40",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"})]})})}var cS={root:"m_f61ca620",input:"m_ccf8da4c",innerInput:"m_f2d85dd2",visibilityToggle:"m_b1072d44"};const Cne={visibilityToggleIcon:Sne,size:"sm"},XI=(e,{size:n})=>({root:{"--psi-icon-size":Mn(n,"psi-icon-size"),"--psi-button-size":Mn(n,"psi-button-size")}}),Ay=Pe(e=>{const n=ge("PasswordInput",Cne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,required:f,error:c,leftSection:h,disabled:d,id:p,variant:v,inputContainer:y,description:b,label:w,size:_,errorProps:S,descriptionProps:C,labelProps:E,withAsterisk:A,inputWrapperOrder:T,wrapperProps:j,radius:N,rightSection:q,rightSectionWidth:R,rightSectionPointerEvents:L,leftSectionWidth:B,visible:G,defaultVisible:H,onVisibilityChange:U,visibilityToggleIcon:P,visibilityToggleButtonProps:z,rightSectionProps:F,leftSectionProps:Y,leftSectionPointerEvents:D,withErrorStyles:V,mod:W,attributes:$,...X}=n,te=Gi(p),[ae,le]=xi({value:G,defaultValue:H,finalValue:!1,onChange:U}),ye=()=>le(!ae),oe=Ge({name:"PasswordInput",classes:cS,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:$,vars:l,varsResolver:XI}),{resolvedClassNames:ue,resolvedStyles:ke}=Ni({classNames:t,styles:a,props:n}),{styleProps:ie,rest:Re}=gu(X),pe=(S==null?void 0:S.id)||`${te}-error`,Ce=(C==null?void 0:C.id)||`${te}-description`,De=`${c&&typeof c!="boolean"?pe:""} ${b?Ce:""}`,be=De.trim().length>0?De.trim():void 0,_e=k.jsx(Ht,{...oe("visibilityToggle"),disabled:d,radius:N,"aria-pressed":ae,tabIndex:-1,"aria-label":"Toggle password visibility",...z,variant:(z==null?void 0:z.variant)??"subtle",color:"gray",unstyled:o,onTouchEnd:Me=>{var Be;Me.preventDefault(),(Be=z==null?void 0:z.onTouchEnd)==null||Be.call(z,Me),ye()},onMouseDown:Me=>{var Be;Me.preventDefault(),(Be=z==null?void 0:z.onMouseDown)==null||Be.call(z,Me),ye()},onKeyDown:Me=>{var Be;(Be=z==null?void 0:z.onKeyDown)==null||Be.call(z,Me),Me.key===" "&&(Me.preventDefault(),ye())},children:k.jsx(P,{reveal:ae})});return k.jsx(Nt.Wrapper,{required:f,id:te,label:w,error:c,description:b,size:_,classNames:ue,styles:ke,__staticSelector:"PasswordInput",__stylesApiProps:n,unstyled:o,withAsterisk:A,inputWrapperOrder:T,inputContainer:y,variant:v,labelProps:{...E,htmlFor:te},descriptionProps:{...C,id:Ce},errorProps:{...S,id:pe},mod:W,attributes:$,...oe("root"),...ie,...j,children:k.jsx(Nt,{component:"div",error:c,leftSection:h,size:_,classNames:{...ue,input:cn(cS.input,ue==null?void 0:ue.input)},styles:ke,radius:N,disabled:d,__staticSelector:"PasswordInput",__stylesApiProps:n,rightSectionWidth:R,rightSection:q??_e,variant:v,unstyled:o,leftSectionWidth:B,rightSectionPointerEvents:L||"all",rightSectionProps:F,leftSectionProps:Y,leftSectionPointerEvents:D,withAria:!1,withErrorStyles:V,attributes:$,children:k.jsx("input",{required:f,"data-invalid":!!c||void 0,"data-with-left-section":!!h||void 0,...oe("innerInput"),disabled:d,id:te,...Re,"aria-describedby":be,autoComplete:Re.autoComplete||"off",type:ae?"text":"password"})})})});Ay.classes={...zi.classes,...cS};Ay.varsResolver=XI;Ay.displayName="@mantine/core/PasswordInput";function Ane({offset:e,position:n,defaultOpened:t}){const[i,r]=O.useState(t),a=O.useRef(null),{x:o,y:l,elements:f,refs:c,update:h,placement:d}=D6({placement:n,middleware:[E6({crossAxis:!0,padding:5,rootBoundary:"document"})]}),p=d.includes("right")?e:n.includes("left")?e*-1:0,v=d.includes("bottom")?e:n.includes("top")?e*-1:0,y=O.useCallback(({clientX:b,clientY:w})=>{c.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:b,y:w,left:b+p,top:w+v,right:b,bottom:w}}})},[f.reference]);return O.useEffect(()=>{if(c.floating.current){const b=a.current;b.addEventListener("mousemove",y);const w=Ho(c.floating.current);return w.forEach(_=>{_.addEventListener("scroll",h)}),()=>{b.removeEventListener("mousemove",y),w.forEach(_=>{_.removeEventListener("scroll",h)})}}},[f.reference,c.floating.current,h,y,i]),{handleMouseMove:y,x:o,y:l,opened:i,setOpened:r,boundaryRef:a,floating:c.setFloating}}var Oy={tooltip:"m_1b3c8819",arrow:"m_f898399f"};const One={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:ha("popover")},ZI=(e,{radius:n,color:t})=>({tooltip:{"--tooltip-radius":n===void 0?void 0:Ut(n),"--tooltip-bg":t?nt(t,e):void 0,"--tooltip-color":t?"var(--mantine-color-white)":void 0}}),Ey=Pe(e=>{const n=ge("TooltipFloating",One,e),{children:t,refProp:i,withinPortal:r,style:a,className:o,classNames:l,styles:f,unstyled:c,radius:h,color:d,label:p,offset:v,position:y,multiline:b,zIndex:w,disabled:_,defaultOpened:S,variant:C,vars:E,portalProps:A,attributes:T,ref:j,...N}=n,q=ni(),R=Ge({name:"TooltipFloating",props:n,classes:Oy,className:o,style:a,classNames:l,styles:f,unstyled:c,attributes:T,rootSelector:"tooltip",vars:E,varsResolver:ZI}),{handleMouseMove:L,x:B,y:G,opened:H,boundaryRef:U,floating:P,setOpened:z}=Ane({offset:v,position:y,defaultOpened:S}),F=vu(t);if(!F)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=zt(U,z1(F),j),D=F.props,V=$=>{var X;(X=D.onMouseEnter)==null||X.call(D,$),L($),z(!0)},W=$=>{var X;(X=D.onMouseLeave)==null||X.call(D,$),z(!1)};return k.jsxs(k.Fragment,{children:[k.jsx(el,{...A,withinPortal:r,children:k.jsx(we,{...N,...R("tooltip",{style:{...lz(a,q),zIndex:w,display:!_&&H?"block":"none",top:(G&&Math.round(G))??"",left:(B&&Math.round(B))??""}}),variant:C,ref:P,mod:{multiline:b},children:p})}),O.cloneElement(F,{...D,[i]:Y,onMouseEnter:V,onMouseLeave:W})]})});Ey.classes=Oy;Ey.varsResolver=ZI;Ey.displayName="@mantine/core/TooltipFloating";const QI=O.createContext({withinGroup:!1}),Ene={openDelay:0,closeDelay:0};function pC(e){const{openDelay:n,closeDelay:t,children:i}=ge("TooltipGroup",Ene,e);return k.jsx(QI,{value:{withinGroup:!0},children:k.jsx(aQ,{delay:{open:n,close:t},children:i})})}pC.displayName="@mantine/core/TooltipGroup";pC.extend=e=>e;function Tne(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 Mne(e){const n=Tne(e.middlewares),t=[Nz(e.offset)];return n.shift&&t.push(E6(typeof n.shift=="boolean"?{padding:8}:{padding:8,...n.shift})),n.flip&&t.push(typeof n.flip=="boolean"?pg():pg(n.flip)),t.push($z({element:e.arrowRef,padding:e.arrowOffset})),n.inline?t.push(typeof n.inline=="boolean"?ch():ch(n.inline)):e.inline&&t.push(ch()),t}function jne(e){var E,A,T;const[n,t]=O.useState(e.defaultOpened),i=typeof e.opened=="boolean"?e.opened:n,r=O.use(QI).withinGroup,a=Gi(),o=O.useCallback(j=>{t(j),j&&w(a)},[a]),{x:l,y:f,context:c,refs:h,placement:d,middlewareData:{arrow:{x:p,y:v}={}}}=D6({strategy:e.strategy,placement:e.position,open:i,onOpenChange:o,middleware:Mne(e),whileElementsMounted:iS}),{delay:y,currentId:b,setCurrentId:w}=oQ(c,{id:a}),{getReferenceProps:_,getFloatingProps:S}=dQ([iQ(c,{enabled:(E=e.events)==null?void 0:E.hover,delay:r?y:{open:e.openDelay,close:e.closeDelay},mouseOnly:!((A=e.events)!=null&&A.touch)}),cQ(c,{enabled:(T=e.events)==null?void 0:T.focus,visibleOnly:!0}),mQ(c,{role:"tooltip"}),uQ(c,{enabled:typeof e.opened>"u"})]);Yo(()=>{var j;(j=e.onPositionChange)==null||j.call(e,d)},[d]);const C=i&&b&&b!==a;return{x:l,y:f,arrowX:p,arrowY:v,reference:h.setReference,floating:h.setFloating,getFloatingProps:S,getReferenceProps:_,isGroupPhase:C,opened:i,placement:d}}const Dne={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:ha("popover"),middlewares:{flip:!0,shift:!0,inline:!1}},JI=(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:Ut(n),"--tooltip-bg":t?a.background:void 0,"--tooltip-color":t?a.color:void 0}}},Vi=Pe(e=>{const n=ge("Tooltip",Dne,e),{children:t,position:i,refProp:r,label:a,openDelay:o,closeDelay:l,onPositionChange:f,opened:c,defaultOpened:h,withinPortal:d,radius:p,color:v,classNames:y,styles:b,unstyled:w,style:_,className:S,withArrow:C,arrowSize:E,arrowOffset:A,arrowRadius:T,arrowPosition:j,offset:N,transitionProps:q,multiline:R,events:L,zIndex:B,disabled:G,onClick:H,onMouseEnter:U,onMouseLeave:P,inline:z,variant:F,keepMounted:Y,vars:D,portalProps:V,mod:W,floatingStrategy:$,middlewares:X,autoContrast:te,attributes:ae,target:le,ref:ye,...oe}=n,{dir:ue}=yu(),ke=O.useRef(null),ie=jne({position:Wz(ue,i),closeDelay:l,openDelay:o,onPositionChange:f,opened:c,defaultOpened:h,events:L,arrowRef:ke,arrowOffset:A,offset:typeof N=="number"?N+(C?E/2:0):N,inline:z,strategy:$,middlewares:X});O.useEffect(()=>{const Me=le instanceof HTMLElement?le:typeof le=="string"?document.querySelector(le):(le==null?void 0:le.current)||null;Me&&ie.reference(Me)},[le,ie]);const Re=Ge({name:"Tooltip",props:n,classes:Oy,className:S,style:_,classNames:y,styles:b,unstyled:w,attributes:ae,rootSelector:"tooltip",vars:D,varsResolver:JI}),pe=vu(t);if(!le&&!pe)throw new Error("[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const Ce=Re("tooltip");if(le){const Me=R5(q,{duration:100,transition:"fade"});return k.jsx(k.Fragment,{children:k.jsx(el,{...V,withinPortal:d,children:k.jsx(Xo,{...Me,keepMounted:Y,mounted:!G&&!!ie.opened,duration:ie.isGroupPhase?10:Me.duration,children:Be=>k.jsxs(we,{...oe,"data-fixed":$==="fixed"||void 0,variant:F,mod:[{multiline:R},W],...Ce,...ie.getFloatingProps({ref:ie.floating,className:Ce.className,style:{...Ce.style,...Be,zIndex:B,top:ie.y??0,left:ie.x??0}}),children:[a,k.jsx(vg,{ref:ke,arrowX:ie.arrowX,arrowY:ie.arrowY,visible:C,position:ie.placement,arrowSize:E,arrowOffset:A,arrowRadius:T,arrowPosition:j,...Re("arrow")})]})})})})}const De=pe.props,be=zt(ie.reference,z1(pe),ye),_e=R5(q,{duration:100,transition:"fade"});return k.jsxs(k.Fragment,{children:[k.jsx(el,{...V,withinPortal:d,children:k.jsx(Xo,{..._e,keepMounted:Y,mounted:!G&&!!ie.opened,duration:ie.isGroupPhase?10:_e.duration,children:Me=>k.jsxs(we,{...oe,"data-fixed":$==="fixed"||void 0,variant:F,mod:[{multiline:R},W],...ie.getFloatingProps({ref:ie.floating,className:Re("tooltip").className,style:{...Re("tooltip").style,...Me,zIndex:B,top:ie.y??0,left:ie.x??0}}),children:[a,k.jsx(vg,{ref:ke,arrowX:ie.arrowX,arrowY:ie.arrowY,visible:C,position:ie.placement,arrowSize:E,arrowOffset:A,arrowRadius:T,arrowPosition:j,...Re("arrow")})]})})}),O.cloneElement(pe,ie.getReferenceProps({onClick:H,onMouseEnter:U,onMouseLeave:P,onMouseMove:n.onMouseMove,onPointerDown:n.onPointerDown,onPointerEnter:n.onPointerEnter,...De,className:cn(S,De.className),[r]:be}))]})});Vi.classes=Oy;Vi.varsResolver=JI;Vi.displayName="@mantine/core/Tooltip";Vi.Floating=Ey;Vi.Group=pC;const Rne={size:"sm",withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left",openOnFocus:!0},Zo=B1(e=>{const n=ge("Select",Rne,e),{classNames:t,styles:i,unstyled:r,vars:a,dropdownOpened:o,defaultDropdownOpened:l,onDropdownClose:f,onDropdownOpen:c,onFocus:h,onBlur:d,onClick:p,onChange:v,data:y,value:b,defaultValue:w,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:S,onOptionSubmit:C,comboboxProps:E,readOnly:A,disabled:T,filter:j,limit:N,withScrollArea:q,maxDropdownHeight:R,size:L,searchable:B,rightSection:G,checkIconPosition:H,withCheckIcon:U,withAlignedLabels:P,nothingFoundMessage:z,name:F,form:Y,searchValue:D,defaultSearchValue:V,onSearchChange:W,allowDeselect:$,error:X,rightSectionPointerEvents:te,id:ae,clearable:le,clearSectionMode:ye,clearButtonProps:oe,hiddenInputProps:ue,renderOption:ke,onClear:ie,autoComplete:Re,scrollAreaProps:pe,__defaultRightSection:Ce,__clearSection:De,__clearable:be,chevronColor:_e,autoSelectOnBlur:Me,openOnFocus:Be,attributes:Ve,...He}=n,We=O.useMemo(()=>J1(y),[y]),Ye=O.useRef({}),rn=O.useMemo(()=>Rm(We),[We]),Q=Gi(ae),[me,xe,Xe]=xi({value:b,defaultValue:w,finalValue:null,onChange:v}),ne=me!=null?`${me}`in rn?rn[`${me}`]:Ye.current[`${me}`]:void 0,Le=aK(ne),[en,hn,fn]=xi({value:D,defaultValue:V,finalValue:ne?ne.label:"",onChange:W}),Ze=Pm({opened:o,defaultOpened:l,onDropdownOpen:()=>{c==null||c(),S?Ze.selectFirstOption():Ze.updateSelectedOptionIndex("active",{scrollIntoView:!0})},onDropdownClose:()=>{f==null||f(),setTimeout(Ze.resetSelectedOption,0)}}),Ke=zn=>{hn(zn),Ze.resetSelectedOption()},{resolvedClassNames:An,resolvedStyles:on}=Ni({props:n,styles:i,classNames:t});O.useEffect(()=>{_&&Ze.selectFirstOption()},[_,en]),O.useEffect(()=>{b===null&&Ke(""),b!=null&&ne&&((Le==null?void 0:Le.value)!==ne.value||(Le==null?void 0:Le.label)!==ne.label)&&Ke(ne.label)},[b,ne]),O.useEffect(()=>{var zn,yn;!Xe&&!fn&&Ke(me!=null?`${me}`in rn?(zn=rn[`${me}`])==null?void 0:zn.label:((yn=Ye.current[`${me}`])==null?void 0:yn.label)||"":"")},[rn,me]),O.useEffect(()=>{me&&`${me}`in rn&&(Ye.current[`${me}`]=rn[`${me}`])},[rn,me]);const ht=k.jsx(Sn.ClearButton,{...oe,onClear:()=>{xe(null,null),Ke(""),ie==null||ie()}}),mt=le&&!!me&&!T&&!A;return k.jsxs(k.Fragment,{children:[k.jsxs(Sn,{store:Ze,__staticSelector:"Select",classNames:An,styles:on,unstyled:r,readOnly:A,size:L,attributes:Ve,keepMounted:Me,onOptionSubmit:zn=>{C==null||C(zn);const yn=$&&`${rn[zn].value}`==`${me}`?null:rn[zn],kn=yn?yn.value:null;kn!==me&&xe(kn,yn),!Xe&&Ke(kn!=null&&(yn==null?void 0:yn.label)||""),Ze.closeDropdown()},...E,children:[k.jsx(Sn.Target,{targetType:B?"input":"button",autoComplete:Re,withExpandedAttribute:!0,children:k.jsx(zi,{id:Q,__defaultRightSection:k.jsx(Sn.Chevron,{size:L,error:X,unstyled:r,color:_e}),__clearSection:ht,__clearable:mt,__clearSectionMode:ye,rightSection:G,rightSectionPointerEvents:te||"none",...He,size:L,__staticSelector:"Select",disabled:T,readOnly:A||!B,value:en,onChange:zn=>{Ke(zn.currentTarget.value),Ze.openDropdown(),_&&Ze.selectFirstOption()},onFocus:zn=>{Be&&B&&Ze.openDropdown(),h==null||h(zn)},onBlur:zn=>{Me&&Ze.clickSelectedOption(),B&&Ze.closeDropdown();const yn=me!=null&&(`${me}`in rn?rn[`${me}`]:Ye.current[`${me}`]);Ke(yn&&yn.label||""),d==null||d(zn)},onClick:zn=>{B?Ze.openDropdown():Ze.toggleDropdown(),p==null||p(zn)},classNames:An,styles:on,unstyled:r,pointer:!B,error:X,attributes:Ve})}),k.jsx(iy,{data:We,hidden:A||T,filter:j,search:en,limit:N,hiddenWhenEmpty:!z,withScrollArea:q,maxDropdownHeight:R,filterOptions:!!B&&(ne==null?void 0:ne.label)!==en,value:me,checkIconPosition:H,withCheckIcon:U,withAlignedLabels:P,nothingFoundMessage:z,unstyled:r,labelId:He.label?`${Q}-label`:void 0,"aria-label":He.label?void 0:He["aria-label"],renderOption:ke,scrollAreaProps:pe})]}),k.jsx(Sn.HiddenInput,{value:me,name:F,form:Y,disabled:T,...ue})]})});Zo.classes={...zi.classes,...Sn.classes};Zo.displayName="@mantine/core/Select";function eB(e){if(e!==void 0)return typeof e=="number"?he(e):e}function Pne({spacing:e,verticalSpacing:n,cols:t,minColWidth:i,autoRows:r,selector:a}){var d;const o=ni(),l=n===void 0?e:n,f=i!==void 0,c=pu({"--sg-spacing-x":Ft(zr(e)),"--sg-spacing-y":Ft(zr(l)),"--sg-auto-rows":r,...f?{"--sg-min-col-width":eB(i)}:{"--sg-cols":(d=zr(t))==null?void 0:d.toString()}}),h=St(o.breakpoints).reduce((p,v)=>(p[v]||(p[v]={}),typeof e=="object"&&e[v]!==void 0&&(p[v]["--sg-spacing-x"]=Ft(e[v])),typeof l=="object"&&l[v]!==void 0&&(p[v]["--sg-spacing-y"]=Ft(l[v])),!f&&typeof t=="object"&&t[v]!==void 0&&(p[v]["--sg-cols"]=t[v]),p),{});return k.jsx(vc,{styles:c,media:Ch(St(h),o.breakpoints).filter(p=>St(h[p.value]).length>0).map(p=>({query:`(min-width: ${o.breakpoints[p.value]})`,styles:h[p.value]})),selector:a})}function mk(e){return typeof e=="object"&&e!==null?St(e):[]}function Nne(e){return e.sort((n,t)=>Sh(n)-Sh(t))}function $ne({spacing:e,verticalSpacing:n,cols:t,minColWidth:i}){return Nne(Array.from(new Set([...mk(e),...mk(n),...i!==void 0?[]:mk(t)])))}function zne({spacing:e,verticalSpacing:n,cols:t,minColWidth:i,autoRows:r,selector:a}){var d;const o=n===void 0?e:n,l=i!==void 0,f=pu({"--sg-spacing-x":Ft(zr(e)),"--sg-spacing-y":Ft(zr(o)),"--sg-auto-rows":r,...l?{"--sg-min-col-width":eB(i)}:{"--sg-cols":(d=zr(t))==null?void 0:d.toString()}}),c=$ne({spacing:e,verticalSpacing:n,cols:t,minColWidth:i}),h=c.reduce((p,v)=>(p[v]||(p[v]={}),typeof e=="object"&&e[v]!==void 0&&(p[v]["--sg-spacing-x"]=Ft(e[v])),typeof o=="object"&&o[v]!==void 0&&(p[v]["--sg-spacing-y"]=Ft(o[v])),!l&&typeof t=="object"&&t[v]!==void 0&&(p[v]["--sg-cols"]=t[v]),p),{});return k.jsx(vc,{styles:f,container:c.map(p=>({query:`simple-grid (min-width: ${p})`,styles:h[p]})),selector:a})}var nB={container:"m_925c2d2c",root:"m_2415a157"};const Lne={cols:1,spacing:"md",type:"media"},Dh=Pe(e=>{const n=ge("SimpleGrid",Lne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,cols:f,verticalSpacing:c,spacing:h,type:d,minColWidth:p,autoFlow:v,autoRows:y,attributes:b,...w}=n,_=Ge({name:"SimpleGrid",classes:nB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,vars:l}),S=I1(),C=p!==void 0?v||"auto-fill":void 0;return d==="container"?k.jsxs(k.Fragment,{children:[k.jsx(zne,{...n,selector:`.${S}`}),k.jsx("div",{..._("container"),children:k.jsx(we,{..._("root",{className:S}),...w,"data-auto-cols":C})})]}):k.jsxs(k.Fragment,{children:[k.jsx(Pne,{...n,selector:`.${S}`}),k.jsx(we,{..._("root",{className:S}),...w,"data-auto-cols":C})]})});Dh.classes=nB;Dh.displayName="@mantine/core/SimpleGrid";var tB={root:"m_6d731127"};const Ine={gap:"md",align:"stretch",justify:"flex-start"},iB=(e,{gap:n,align:t,justify:i})=>({root:{"--stack-gap":Ft(n),"--stack-align":t,"--stack-justify":i}}),$t=Pe(e=>{const n=ge("Stack",Ine,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,align:f,justify:c,gap:h,variant:d,attributes:p,...v}=n;return k.jsx(we,{...Ge({name:"Stack",props:n,classes:tB,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:iB})("root"),variant:d,...v})});$t.classes=tB;$t.varsResolver=iB;$t.displayName="@mantine/core/Stack";const[Bne,Fne]=da("Table component was not found in the tree");var $m={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 qne(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 ku(e,n){const t=`Table${e.charAt(0).toUpperCase()}${e.slice(1)}`,i=Pe(r=>{const a=ge(t,{},r),{classNames:o,className:l,style:f,styles:c,...h}=a,d=Fne();return k.jsx(we,{component:e,...qne(d,n),...d.getStyles(e,{className:l,classNames:o,style:f,styles:c,props:a}),...h})});return i.displayName=`@mantine/core/${t}`,i.classes=$m,i}const dS=ku("th",{columnBorder:!0}),rB=ku("td",{columnBorder:!0}),eg=ku("tr",{rowBorder:!0,striped:!0,highlightOnHover:!0}),aB=ku("thead",{stickyHeader:!0}),oB=ku("tbody"),sB=ku("tfoot"),lB=ku("caption",{captionSide:!0}),Hne={type:"scrollarea"},uB=(e,{minWidth:n,maxHeight:t,type:i})=>({scrollContainer:{"--table-min-width":he(n),"--table-max-height":he(t),"--table-overflow":i==="native"?"auto":void 0}}),Ty=Pe(e=>{const n=ge("TableScrollContainer",Hne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,children:f,minWidth:c,maxHeight:h,type:d,scrollAreaProps:p,attributes:v,...y}=n,b=Ge({name:"TableScrollContainer",classes:$m,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,vars:l,varsResolver:uB,rootSelector:"scrollContainer"});return k.jsx(we,{component:d==="scrollarea"?uo:"div",...d==="scrollarea"?h?{offsetScrollbars:"xy",...p}:{offsetScrollbars:"x",...p}:{},...b("scrollContainer"),...y,children:k.jsx("div",{...b("scrollContainerInner"),children:f})})});Ty.classes=$m;Ty.varsResolver=uB;Ty.displayName="@mantine/core/TableScrollContainer";function vC({data:e}){return k.jsxs(k.Fragment,{children:[e.caption&&k.jsx(lB,{children:e.caption}),e.head&&k.jsx(aB,{children:k.jsx(eg,{children:e.head.map((n,t)=>k.jsx(dS,{children:n},t))})}),e.body&&k.jsx(oB,{children:e.body.map((n,t)=>k.jsx(eg,{children:n.map((i,r)=>k.jsx(rB,{children:i},r))},t))}),e.foot&&k.jsx(sB,{children:k.jsx(eg,{children:e.foot.map((n,t)=>k.jsx(dS,{children:n},t))})})]})}vC.displayName="@mantine/core/TableDataRenderer";const Une={withRowBorders:!0,verticalSpacing:7},fB=(e,{layout:n,captionSide:t,horizontalSpacing:i,verticalSpacing:r,borderColor:a,stripedColor:o,highlightOnHoverColor:l,striped:f,highlightOnHover:c,stickyHeaderOffset:h,stickyHeader:d})=>({table:{"--table-layout":n,"--table-caption-side":t,"--table-horizontal-spacing":Ft(i),"--table-vertical-spacing":Ft(r),"--table-border-color":a?nt(a,e):void 0,"--table-striped-color":f&&o?nt(o,e):void 0,"--table-highlight-on-hover-color":c&&l?nt(l,e):void 0,"--table-sticky-header-offset":d?he(h):void 0}}),_t=Pe(e=>{const n=ge("Table",Une,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,horizontalSpacing:f,verticalSpacing:c,captionSide:h,stripedColor:d,highlightOnHoverColor:p,striped:v,highlightOnHover:y,withColumnBorders:b,withRowBorders:w,withTableBorder:_,borderColor:S,layout:C,data:E,children:A,stickyHeader:T,stickyHeaderOffset:j,mod:N,tabularNums:q,attributes:R,...L}=n,B=Ge({name:"Table",props:n,className:i,style:r,classes:$m,classNames:t,styles:a,unstyled:o,attributes:R,rootSelector:"table",vars:l,varsResolver:fB});return k.jsx(Bne,{value:{getStyles:B,stickyHeader:T,striped:v===!0?"odd":v||void 0,highlightOnHover:y,withColumnBorders:b,withRowBorders:w,captionSide:h||"bottom"},children:k.jsx(we,{component:"table",mod:[{"data-with-table-border":_,"data-tabular-nums":q},N],...B("table"),...L,children:A||!!E&&k.jsx(vC,{data:E})})})});_t.classes=$m;_t.varsResolver=fB;_t.displayName="@mantine/core/Table";_t.Td=rB;_t.Th=dS;_t.Tr=eg;_t.Thead=aB;_t.Tbody=oB;_t.Tfoot=sB;_t.Caption=lB;_t.ScrollContainer=Ty;_t.DataRenderer=vC;const[Vne,gC]=da("Tabs component was not found in the tree");var zm={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 yC=Pe(e=>{const n=ge("TabsList",null,e),{children:t,className:i,grow:r,justify:a,classNames:o,styles:l,style:f,mod:c,...h}=n,d=gC();return k.jsx(we,{...d.getStyles("list",{className:i,style:f,classNames:o,styles:l,props:n,variant:d.variant}),role:"tablist",variant:d.variant,mod:[{grow:r,orientation:d.orientation,placement:d.orientation==="vertical"&&d.placement,inverted:d.inverted},c],"aria-orientation":d.orientation,__vars:{"--tabs-justify":a},...h,children:t})});yC.classes=zm;yC.displayName="@mantine/core/TabsList";const bC=Pe(e=>{const n=ge("TabsPanel",null,e),{children:t,className:i,value:r,classNames:a,styles:o,style:l,mod:f,keepMounted:c,...h}=n,d=Sm(),p=gC(),v=p.value===r,y=p.keepMounted||c,b=p.keepMountedMode!=="display-none",w=y&&b&&d!=="test"?k.jsx(O.Activity,{mode:v?"visible":"hidden",children:t}):y||v?t:null;return k.jsx(we,{...p.getStyles("panel",{className:i,classNames:a,styles:o,style:[l,v?void 0:{display:"none"}],props:n}),mod:[{orientation:p.orientation},f],role:"tabpanel",id:p.getPanelId(r),"aria-labelledby":p.getTabId(r),...h,children:w})});bC.classes=zm;bC.displayName="@mantine/core/TabsPanel";const wC=Pe(e=>{const n=ge("TabsTab",null,e),{className:t,children:i,rightSection:r,leftSection:a,value:o,onClick:l,onKeyDown:f,disabled:c,color:h,style:d,classNames:p,styles:v,vars:y,mod:b,tabIndex:w,..._}=n,S=ni(),{dir:C}=yu(),E=gC(),A=o===E.value,T=N=>{E.onChange(E.allowTabDeactivation&&o===E.value?null:o),l==null||l(N)},j={classNames:p,styles:v,props:n};return k.jsxs(fi,{...E.getStyles("tab",{className:t,style:d,variant:E.variant,...j}),disabled:c,unstyled:E.unstyled,variant:E.variant,mod:[{active:A,disabled:c,orientation:E.orientation,inverted:E.inverted,placement:E.orientation==="vertical"&&E.placement},b],role:"tab",id:E.getTabId(o),"aria-selected":A,tabIndex:w!==void 0?w:A||E.value===null?0:-1,"aria-controls":E.getPanelId(o),onClick:T,__vars:{"--tabs-color":h?nt(h,S):void 0},onKeyDown:f6({siblingSelector:'[role="tab"]',parentSelector:'[role="tablist"]',activateOnFocus:E.activateTabWithKeyboard,loop:E.loop,orientation:E.orientation||"horizontal",dir:C,onKeyDown:f}),..._,children:[a&&k.jsx("span",{...E.getStyles("tabSection",j),"data-position":"left",children:a}),i&&k.jsx("span",{...E.getStyles("tabLabel",j),children:i}),r&&k.jsx("span",{...E.getStyles("tabSection",j),"data-position":"right",children:r})]})});wC.classes=zm;wC.displayName="@mantine/core/TabsTab";const sM="Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value",Wne={keepMounted:!0,keepMountedMode:"activity",orientation:"horizontal",loop:!0,activateTabWithKeyboard:!0,variant:"default",placement:"left"},cB=(e,{radius:n,color:t,autoContrast:i})=>({root:{"--tabs-radius":Ut(n),"--tabs-color":nt(t,e),"--tabs-text-color":L1(i,e)?xm({color:t,theme:e,autoContrast:i}):void 0}}),Aa=Pe(e=>{const n=ge("Tabs",Wne,e),{defaultValue:t,value:i,onChange:r,orientation:a,children:o,loop:l,id:f,activateTabWithKeyboard:c,allowTabDeactivation:h,variant:d,color:p,radius:v,inverted:y,placement:b,keepMounted:w,keepMountedMode:_,classNames:S,styles:C,unstyled:E,className:A,style:T,vars:j,autoContrast:N,mod:q,attributes:R,...L}=n,B=Gi(f),[G,H]=xi({value:i,defaultValue:t,finalValue:null,onChange:r}),U=Ge({name:"Tabs",props:n,classes:zm,className:A,style:T,classNames:S,styles:C,unstyled:E,attributes:R,vars:j,varsResolver:cB});return k.jsx(Vne,{value:{placement:b,value:G,orientation:a,id:B,loop:l,activateTabWithKeyboard:c,getTabId:QT(`${B}-tab`,sM),getPanelId:QT(`${B}-panel`,sM),onChange:H,allowTabDeactivation:h,variant:d,color:p,radius:v,inverted:y,keepMounted:w,keepMountedMode:_,unstyled:E,getStyles:U},children:k.jsx(we,{id:B,variant:d,mod:[{orientation:a,inverted:a==="horizontal"&&y,placement:a==="vertical"&&b},q],...U("root"),...L,children:o})})});Aa.classes=zm;Aa.varsResolver=cB;Aa.displayName="@mantine/core/Tabs";Aa.Tab=wC;Aa.Panel=bC;Aa.List=yC;function Gne({data:e,value:n}){const t=n.map(i=>i.trim().toLowerCase());return e.reduce((i,r)=>(au(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 Yne(e,n){return e?n.split(new RegExp(`[${e.join("")}]`)).map(t=>t.trim()).filter(t=>t!==""):[n]}function lM({splitChars:e,allowDuplicates:n,maxTags:t,value:i,currentTags:r,isDuplicate:a,onDuplicate:o}){const l=Yne(e,i),f=[];if(n)f.push(...r,...l);else{f.push(...r);for(const c of l)(a?h=>a(h,f):h=>f.some(d=>d.toLowerCase()===h.toLowerCase()))(c)?o==null||o(c):f.push(c)}return t?f.slice(0,t):f}const Kne={maxTags:1/0,acceptValueOnBlur:!0,splitChars:[","],hiddenInputValuesDivider:",",openOnFocus:!0,size:"sm"},kC=Pe(e=>{const n=ge("TagsInput",Kne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:f,value:c,defaultValue:h,onChange:d,onKeyDown:p,maxTags:v,allowDuplicates:y,onDuplicate:b,variant:w,data:_,dropdownOpened:S,defaultDropdownOpened:C,onDropdownOpen:E,onDropdownClose:A,selectFirstOptionOnChange:T,selectFirstOptionOnDropdownOpen:j,onOptionSubmit:N,comboboxProps:q,filter:R,limit:L,withScrollArea:B,maxDropdownHeight:G,searchValue:H,defaultSearchValue:U,onSearchChange:P,readOnly:z,disabled:F,splitChars:Y,onFocus:D,onBlur:V,onPaste:W,radius:$,rightSection:X,rightSectionWidth:te,rightSectionPointerEvents:ae,rightSectionProps:le,leftSection:ye,leftSectionWidth:oe,leftSectionPointerEvents:ue,leftSectionProps:ke,inputContainer:ie,inputWrapperOrder:Re,withAsterisk:pe,required:Ce,labelProps:De,descriptionProps:be,errorProps:_e,wrapperProps:Me,description:Be,label:Ve,error:He,withErrorStyles:We,name:Ye,form:rn,id:Q,clearable:me,clearSectionMode:xe,clearButtonProps:Xe,hiddenInputProps:ne,hiddenInputValuesDivider:Le,mod:en,renderOption:hn,renderPill:fn,onRemove:Ze,onClear:Ke,onMaxTags:An,scrollAreaProps:on,acceptValueOnBlur:ht,isDuplicate:mt,openOnFocus:zn,attributes:yn,ref:kn,loading:tt,loadingPosition:At,...$e}=n,Fe=Gi(Q),jn=J1(_),Jn=Rm(jn),On=O.useRef(null),Qe=zt(On,kn),Je=Pm({opened:S,defaultOpened:C,onDropdownOpen:()=>{E==null||E(),j&&Je.selectFirstOption()},onDropdownClose:()=>{A==null||A(),Je.resetSelectedOption()}}),{styleProps:nn,rest:{type:Ln,autoComplete:In,...bt}}=gu($e),[xn,_n]=xi({value:c,defaultValue:h,finalValue:[],onChange:d}),[Wn,Lt]=xi({value:H,defaultValue:U,finalValue:"",onChange:P}),di=dn=>{Lt(dn),Je.resetSelectedOption()},Ki=Ge({name:"TagsInput",classes:{},props:n,classNames:t,styles:a,unstyled:o}),{resolvedClassNames:za,resolvedStyles:mo}=Ni({props:n,styles:a,classNames:t}),Br=dn=>{if((mt?mt(dn,xn):xn.some(ti=>ti.toLowerCase()===dn.toLowerCase()))&&(b==null||b(dn),!y)){di("");return}if(xn.length>=v){An==null||An(dn);return}N==null||N(dn),di(""),dn.length>0&&_n([...xn,dn])},Fr=dn=>{if(p==null||p(dn),dn.isPropagationStopped())return;const ti=Wn.trim(),{length:sn}=ti;if(Y.includes(dn.key)&&sn>0&&(_n(lM({splitChars:Y,allowDuplicates:y,maxTags:v,value:Wn,currentTags:xn,isDuplicate:mt,onDuplicate:b})),di(""),dn.preventDefault()),dn.key==="Enter"&&sn>0&&!dn.nativeEvent.isComposing){if(dn.preventDefault(),document.querySelector(`#${Je.listId} [data-combobox-option][data-combobox-selected]`))return;Br(ti)}dn.key==="Backspace"&&sn===0&&xn.length>0&&!dn.nativeEvent.isComposing&&!z&&(Ze==null||Ze(xn[xn.length-1]),_n(xn.slice(0,xn.length-1)))},La=dn=>{W==null||W(dn),dn.preventDefault(),dn.clipboardData&&(_n(lM({splitChars:Y,allowDuplicates:y,maxTags:v,value:`${Wn}${dn.clipboardData.getData("text/plain")}`,currentTags:xn,isDuplicate:mt,onDuplicate:b})),di(""))},wr=xn.map((dn,ti)=>{const sn=()=>{const _r=xn.slice();_r.splice(ti,1),_n(_r),Ze==null||Ze(dn)};return fn?k.jsx(O.Fragment,{children:fn({option:Jn[dn]||{value:dn,label:dn,disabled:!1},value:dn,onRemove:sn,disabled:F||z})},`${dn}-${ti}`):k.jsx(tl,{withRemoveButton:!z,onRemove:sn,unstyled:o,disabled:F,attributes:yn,...Ki("pill"),children:dn},`${dn}-${ti}`)});O.useEffect(()=>{T&&Je.selectFirstOption()},[T,xn,Wn]);const kr=k.jsx(Sn.ClearButton,{...Xe,onClear:()=>{var dn;_n([]),di(""),(dn=On.current)==null||dn.focus(),Je.openDropdown(),Ke==null||Ke()}});return k.jsxs(k.Fragment,{children:[k.jsxs(Sn,{store:Je,classNames:za,styles:mo,unstyled:o,size:f,readOnly:z,__staticSelector:"TagsInput",attributes:yn,onOptionSubmit:dn=>{N==null||N(dn),di(""),xn.length>=v?An==null||An(dn):_n([...xn,Jn[dn].value]),Je.resetSelectedOption()},...q,children:[k.jsx(Sn.DropdownTarget,{children:k.jsx(su,{...nn,__staticSelector:"TagsInput",classNames:za,styles:mo,unstyled:o,size:f,className:i,style:r,variant:w,disabled:F,radius:$,rightSection:X,__clearSection:kr,__clearable:me&&xn.length>0&&!F&&!z,__clearSectionMode:xe,rightSectionWidth:te,rightSectionPointerEvents:ae,rightSectionProps:le,leftSection:ye,leftSectionWidth:oe,leftSectionPointerEvents:ue,leftSectionProps:ke,loading:tt,loadingPosition:At,inputContainer:ie,inputWrapperOrder:Re,withAsterisk:pe,required:Ce,labelProps:De,descriptionProps:be,errorProps:_e,wrapperProps:Me,description:Be,label:Ve,error:He,withErrorStyles:We,__stylesApiProps:{...n,multiline:!0},id:Fe,mod:en,attributes:yn,children:k.jsxs(tl.Group,{disabled:F,unstyled:o,...Ki("pillsList"),children:[wr,k.jsx(Sn.EventsTarget,{autoComplete:In,withExpandedAttribute:!0,children:k.jsx(su.Field,{...bt,ref:Qe,...Ki("inputField"),unstyled:o,onKeyDown:Fr,onFocus:dn=>{D==null||D(dn),zn&&Je.openDropdown()},onBlur:dn=>{V==null||V(dn),ht&&Br(Wn),Je.closeDropdown()},onPaste:La,value:Wn,onChange:dn=>di(dn.currentTarget.value),required:Ce&&xn.length===0,disabled:F,readOnly:z,id:Fe})})]})})}),k.jsx(iy,{data:Gne({data:jn,value:xn}),hidden:z||F,filter:R,search:Wn,limit:L,hiddenWhenEmpty:!0,withScrollArea:B,maxDropdownHeight:G,unstyled:o,labelId:Ve?`${Fe}-label`:void 0,"aria-label":Ve?void 0:$e["aria-label"],renderOption:hn,scrollAreaProps:on})]}),k.jsx(Sn.HiddenInput,{name:Ye,form:rn,value:xn,valuesDivider:Le,disabled:F,...ne})]})});kC.classes={...zi.classes,...Sn.classes};kC.displayName="@mantine/core/TagsInput";const il=Pe(e=>k.jsx(zi,{component:"input",...ge("TextInput",null,e),__staticSelector:"TextInput"}));il.classes=zi.classes;il.displayName="@mantine/core/TextInput";const[Xne,Zne]=da("Timeline component was not found in tree");var _C={root:"m_43657ece",itemTitle:"m_2ebe8099",item:"m_436178ff",itemBullet:"m_8affcee1",itemBody:"m_540e8f41"};const xC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,__active:o,__align:l,__lineActive:f,__vars:c,bullet:h,radius:d,color:p,lineVariant:v,children:y,title:b,mod:w,..._}=ge("TimelineItem",null,e),S=Zne(),C=ni(),E={classNames:n,styles:r};return k.jsxs(we,{...S.getStyles("item",{...E,className:t,style:i}),mod:[{"line-active":f,active:o},w],__vars:{"--tli-radius":d!==void 0?Ut(d):void 0,"--tli-color":p?nt(p,C):void 0,"--tli-border-style":v||void 0},..._,children:[k.jsx(we,{...S.getStyles("itemBullet",E),mod:{"with-child":!!h,align:l,active:o},children:h}),k.jsxs("div",{...S.getStyles("itemBody",E),children:[b&&k.jsx("div",{...S.getStyles("itemTitle",E),children:b}),k.jsx("div",{...S.getStyles("itemContent",E),children:y})]})]})});xC.classes=_C;xC.displayName="@mantine/core/TimelineItem";const Qne={active:-1,align:"left"},dB=(e,{bulletSize:n,lineWidth:t,radius:i,color:r,autoContrast:a})=>({root:{"--tl-bullet-size":he(n),"--tl-line-width":he(t),"--tl-radius":i===void 0?void 0:Ut(i),"--tl-color":r?nt(r,e):void 0,"--tl-icon-color":L1(a,e)?xm({color:r,theme:e,autoContrast:a}):void 0}}),qf=Pe(e=>{const n=ge("Timeline",Qne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,children:f,active:c,color:h,radius:d,bulletSize:p,align:v,lineWidth:y,reverseActive:b,mod:w,autoContrast:_,attributes:S,...C}=n,E=Ge({name:"Timeline",classes:_C,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:S,vars:l,varsResolver:dB}),A=O.Children.toArray(f),T=A.map((j,N)=>{var q,R;return O.cloneElement(j,{unstyled:o,__align:v,__active:((q=j.props)==null?void 0:q.active)||(b?c>=A.length-N-1:c>=N),__lineActive:((R=j.props)==null?void 0:R.lineActive)||(b?c>=A.length-N-1:c-1>=N)})});return k.jsx(Xne,{value:{getStyles:E},children:k.jsx(we,{...E("root"),mod:[{align:v},w],...C,children:T})})});qf.classes=_C;qf.varsResolver=dB;qf.displayName="@mantine/core/Timeline";qf.Item=xC;const Jne=["h1","h2","h3","h4","h5","h6"],ete=["xs","sm","md","lg","xl"];function nte(e,n){const t=n!==void 0?n:`h${e}`;return Jne.includes(t)?{fontSize:`var(--mantine-${t}-font-size)`,fontWeight:`var(--mantine-${t}-font-weight)`,lineHeight:`var(--mantine-${t}-line-height)`}:ete.includes(t)?{fontSize:`var(--mantine-font-size-${t})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:he(t),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var hB={root:"m_8a5d1357"};const tte={order:1},mB=(e,{order:n,size:t,lineClamp:i,textWrap:r})=>{const a=nte(n||1,t);return{root:{"--title-fw":a.fontWeight,"--title-lh":a.lineHeight,"--title-fz":a.fontSize,"--title-line-clamp":typeof i=="number"?i.toString():void 0,"--title-text-wrap":r}}},_u=Pe(e=>{const n=ge("Title",tte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,order:l,vars:f,size:c,variant:h,lineClamp:d,textWrap:p,mod:v,attributes:y,...b}=n,w=Ge({name:"Title",props:n,classes:hB,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:y,vars:f,varsResolver:mB});return[1,2,3,4,5,6].includes(l)?k.jsx(we,{...w("root"),component:`h${l}`,variant:h,mod:[{order:l,"data-line-clamp":typeof d=="number"},v],size:c,...b}):null});_u.classes=hB;_u.varsResolver=mB;_u.displayName="@mantine/core/Title";const SC=O.createContext(null);SC.displayName="@mantine/modals/ModalsContext";function ite(){const e=O.use(SC);if(!e)throw new Error("[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component");return e}const[rte,xu]=lK("mantine-modals"),ate=e=>{const n=e.modalId||Xs();return xu("openModal")({...e,modalId:n}),n},ote=e=>{const n=e.modalId||Xs();return xu("openConfirmModal")({...e,modalId:n}),n},ste=e=>{const n=e.modalId||Xs();return xu("openContextModal")({...e,modalId:n}),n},lte=xu("closeModal"),ute=xu("closeAllModals"),fte=e=>xu("updateModal")(e),cte=e=>xu("updateContextModal")(e),Ro={open:ate,close:lte,closeAll:ute,openConfirmModal:ote,openContextModal:ste,updateModal:fte,updateContextModal:cte};function dte({id:e,cancelProps:n,confirmProps:t,labels:i={cancel:"",confirm:""},closeOnConfirm:r=!0,closeOnCancel:a=!0,groupProps:o,onCancel:l,onConfirm:f,children:c}){const{cancel:h,confirm:d}=i,p=ite(),v=b=>{typeof(n==null?void 0:n.onClick)=="function"&&(n==null||n.onClick(b)),typeof l=="function"&&l(),a&&p.closeModal(e)},y=b=>{typeof(t==null?void 0:t.onClick)=="function"&&(t==null||t.onClick(b)),typeof f=="function"&&f(),r&&p.closeModal(e)};return k.jsxs(k.Fragment,{children:[c&&k.jsx(we,{mb:"md",children:c}),k.jsxs(wn,{mt:c?0:"md",justify:"flex-end",...o,children:[k.jsx(Bt,{variant:"default",...n,onClick:v,children:(n==null?void 0:n.children)||h}),k.jsx(Bt,{...t,onClick:y,children:(t==null?void 0:t.children)||d})]})]})}function uM(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 hte(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 mte(e){if(!e)return{confirmProps:{},modalProps:{}};const{id:n,children:t,onCancel:i,onConfirm:r,closeOnConfirm:a,closeOnCancel:o,cancelProps:l,confirmProps:f,groupProps:c,labels:h,...d}=e;return{confirmProps:{id:n,children:t,onCancel:i,onConfirm:r,closeOnConfirm:a,closeOnCancel:o,cancelProps:l,confirmProps:f,groupProps:c,labels:h},modalProps:{id:n,...d}}}function pte({children:e,modalProps:n,labels:t,modals:i}){const[r,a]=O.useReducer(hte,{modals:[],current:null}),o=O.useRef(r);o.current=r;const l=O.useRef(!1),f=O.useCallback(C=>{l.current||(l.current=!0,o.current.modals.concat().reverse().forEach(E=>{uM(E,C)}),l.current=!1),a({type:"CLOSE_ALL",canceled:C})},[o,a]),c=O.useCallback(({modalId:C,...E})=>{const A=C||Xs();return a({type:"OPEN",modal:{id:A,type:"content",props:E}}),A},[a]),h=O.useCallback(({modalId:C,...E})=>{const A=C||Xs();return a({type:"OPEN",modal:{id:A,type:"confirm",props:E}}),A},[a]),d=O.useCallback((C,{modalId:E,...A})=>{const T=E||Xs();return a({type:"OPEN",modal:{id:T,type:"context",props:A,ctx:C}}),T},[a]),p=O.useCallback((C,E)=>{if(!l.current){const A=o.current.modals.find(T=>T.id===C);A&&(l.current=!0,uM(A,E),l.current=!1)}a({type:"CLOSE",modalId:C,canceled:E})},[o,a]),v=O.useCallback(({modalId:C,...E})=>{a({type:"UPDATE",modalId:C,newProps:E})},[a]),y=O.useCallback(({modalId:C,...E})=>{a({type:"UPDATE",modalId:C,newProps:E})},[a]);rte({openModal:c,openConfirmModal:h,openContextModal:({modal:C,...E})=>d(C,E),closeModal:p,closeContextModal:p,closeAllModals:f,updateModal:v,updateContextModal:y});const b={modalProps:n||{},modals:r.modals,openModal:c,openConfirmModal:h,openContextModal:d,closeModal:p,closeContextModal:p,closeAll:f,updateModal:v,updateContextModal:y},w=()=>{const C=o.current.current;switch(C==null?void 0:C.type){case"context":{const{innerProps:E,...A}=C.props,T=i[C.ctx];return{modalProps:A,content:k.jsx(T,{innerProps:E,context:b,id:C.id})}}case"confirm":{const{modalProps:E,confirmProps:A}=mte(C.props);return{modalProps:E,content:k.jsx(dte,{...A,id:C.id,labels:C.props.labels||t})}}case"content":{const{children:E,...A}=C.props;return{modalProps:A,content:E}}default:return{modalProps:{},content:null}}},{modalProps:_,content:S}=w();return k.jsxs(SC,{value:b,children:[k.jsx(Ir,{zIndex:ha("modal")+1,...n,..._,opened:r.modals.length>0,onClose:()=>{var C;return p((C=r.current)==null?void 0:C.id)},children:S}),e]})}function vte(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 gte(e){return O.useSyncExternalStore(e.subscribe,()=>e.getState(),()=>e.getState())}function yte(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 bte=()=>vte({notifications:[],queue:[],defaultPosition:"bottom-right",limit:5}),Su=bte(),wte=(e=Su)=>gte(e);function Oc(e,n){const t=e.getState(),i=yte(n([...t.notifications,...t.queue]),t.defaultPosition,t.limit);e.setState({notifications:i.notifications,queue:i.queue,limit:t.limit,defaultPosition:t.defaultPosition})}function kte(e,n=Su){const t=e.id||Xs();return Oc(n,i=>e.id&&i.some(r=>r.id===e.id)?i:[...i,{...e,id:t}]),t}function pB(e,n=Su){return Oc(n,t=>t.filter(i=>{var r;return i.id===e?((r=i.onClose)==null||r.call(i,i),!1):!0})),e}function _te(e,n=Su){return Oc(n,t=>t.map(i=>i.id===e.id?{...i,...e}:i)),e.id}function xte(e=Su){Oc(e,()=>[])}function Ste(e=Su){Oc(e,n=>n.slice(0,e.getState().limit))}const et={show:kte,hide:pB,update:_te,clean:xte,cleanQueue:Ste,updateState:Oc},vB=["bottom-center","bottom-left","bottom-right","top-center","top-left","top-right"];function Cte(e,n){return e.reduce((t,i)=>(t[i.position||n].push(i),t),vB.reduce((t,i)=>(t[i]=[],t),{}))}const fM={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},Ate={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function Ote({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:fM[o],transitionDuration:`${i}ms, ${i}ms, ${i}ms`,transitionTimingFunction:"cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",transitionProperty:"opacity, transform, max-height"},f={opacity:1,transform:Ate[o]},c={opacity:0,maxHeight:0,transform:fM[o]};return{...l,...{entering:f,entered:f,exiting:c,exited:c}[e]}}function Ete(e,n){return typeof n=="number"?n:n===!1||e===!1?!1:e}function gB({data:e,onHide:n,autoClose:t,paused:i,onHoverStart:r,onHoverEnd:a,...o}){const{autoClose:l,message:f,onOpen:c,...h}=e,d=Ete(t,e.autoClose),p=O.useRef(-1),[v,y]=O.useState(!1),b=()=>window.clearTimeout(p.current),w=()=>{n(e.id),b()},_=()=>{b(),typeof d=="number"&&(p.current=window.setTimeout(w,d))},S=()=>{y(!0),r==null||r()},C=()=>{y(!1),a==null||a()};return O.useEffect(()=>{var E;(E=e.onOpen)==null||E.call(e,e)},[]),O.useEffect(()=>(_(),b),[d]),O.useEffect(()=>(i||v?b():_(),b),[i,v]),k.jsx(xy,{...o,...h,onClose:w,onMouseEnter:S,onMouseLeave:C,children:f})}gB.displayName="@mantine/notifications/NotificationContainer";var yB={root:"m_b37d9ac7",notification:"m_5ed0edd0"};function hS(){return hS=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":he(t)}}),fo=Pe(e=>{const n=ge("Notifications",Fte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:f,position:c,autoClose:h,transitionDuration:d,containerWidth:p,notificationMaxHeight:v,limit:y,zIndex:b,store:w,portalProps:_,withinPortal:S,pauseResetOnHover:C,...E}=n,A=ni(),T=wte(w),j=iK(),N=h6(),q=O.useRef({}),R=O.useRef(0),[L,B]=O.useState(0),G=O.useCallback(()=>B(Y=>Y+1),[]),H=O.useCallback(()=>B(Y=>Math.max(0,Y-1)),[]),U=A.respectReducedMotion&&N?1:d,P=Ge({name:"Notifications",classes:yB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:f,vars:l,varsResolver:kB});O.useEffect(()=>{w==null||w.updateState(Y=>({...Y,limit:y||5,defaultPosition:c}))},[y,c]),Yo(()=>{T.notifications.length>R.current&&setTimeout(()=>j(),0),R.current=T.notifications.length},[T.notifications]);const z=Cte(T.notifications,c),F=vB.reduce((Y,D)=>(Y[D]=z[D].map(({style:V,...W})=>k.jsx(Bte,{timeout:U,onEnter:()=>q.current[W.id].offsetHeight,nodeRef:{current:q.current[W.id]},children:$=>k.jsx(gB,{ref:X=>{X&&(q.current[W.id]=X)},data:W,onHide:X=>pB(X,w),autoClose:h,paused:C==="all"?L>0:!1,onHoverStart:G,onHoverEnd:H,...P("notification",{style:{...Ote({state:$,position:D,transitionDuration:U,maxHeight:v}),...V}})})},W.id)),Y),{});return k.jsxs(el,{withinPortal:S,..._,children:[k.jsx(we,{...P("root"),"data-position":"top-center",...E,children:k.jsx(Bs,{children:F["top-center"]})}),k.jsx(we,{...P("root"),"data-position":"top-left",...E,children:k.jsx(Bs,{children:F["top-left"]})}),k.jsx(we,{...P("root",{className:ru.classNames.fullWidth}),"data-position":"top-right",...E,children:k.jsx(Bs,{children:F["top-right"]})}),k.jsx(we,{...P("root",{className:ru.classNames.fullWidth}),"data-position":"bottom-right",...E,children:k.jsx(Bs,{children:F["bottom-right"]})}),k.jsx(we,{...P("root"),"data-position":"bottom-left",...E,children:k.jsx(Bs,{children:F["bottom-left"]})}),k.jsx(we,{...P("root"),"data-position":"bottom-center",...E,children:k.jsx(Bs,{children:F["bottom-center"]})})]})});fo.classes=yB;fo.varsResolver=kB;fo.displayName="@mantine/notifications/Notifications";fo.show=et.show;fo.hide=et.hide;fo.update=et.update;fo.clean=et.clean;fo.cleanQueue=et.cleanQueue;fo.updateState=et.updateState;var yk={exports:{}},$d={},bk={exports:{}},wk={};/** - * @license React - * scheduler.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var pM;function qte(){return pM||(pM=1,(function(e){function n(P,z){var F=P.length;P.push(z);e:for(;0>>1,D=P[Y];if(0>>1;Yr($,F))Xr(te,$)?(P[Y]=te,P[X]=F,Y=X):(P[Y]=$,P[W]=F,Y=W);else if(Xr(te,F))P[Y]=te,P[X]=F,Y=X;else break e}}return z}function r(P,z){var F=P.sortIndex-z.sortIndex;return F!==0?F:P.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 f=[],c=[],h=1,d=null,p=3,v=!1,y=!1,b=!1,w=!1,_=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function E(P){for(var z=t(c);z!==null;){if(z.callback===null)i(c);else if(z.startTime<=P)i(c),z.sortIndex=z.expirationTime,n(f,z);else break;z=t(c)}}function A(P){if(b=!1,E(P),!y)if(t(f)!==null)y=!0,T||(T=!0,B());else{var z=t(c);z!==null&&U(A,z.startTime-P)}}var T=!1,j=-1,N=5,q=-1;function R(){return w?!0:!(e.unstable_now()-qP&&R());){var Y=d.callback;if(typeof Y=="function"){d.callback=null,p=d.priorityLevel;var D=Y(d.expirationTime<=P);if(P=e.unstable_now(),typeof D=="function"){d.callback=D,E(P),z=!0;break n}d===t(f)&&i(f),E(P)}else i(f);d=t(f)}if(d!==null)z=!0;else{var V=t(c);V!==null&&U(A,V.startTime-P),z=!1}}break e}finally{d=null,p=F,v=!1}z=void 0}}finally{z?B():T=!1}}}var B;if(typeof C=="function")B=function(){C(L)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,H=G.port2;G.port1.onmessage=L,B=function(){H.postMessage(null)}}else B=function(){_(L,0)};function U(P,z){j=_(function(){P(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(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125Y?(P.sortIndex=F,n(c,P),t(f)===null&&P===t(c)&&(b?(S(j),j=-1):b=!0,U(A,F-Y))):(P.sortIndex=D,n(f,P),y||v||(y=!0,T||(T=!0,B()))),P},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(P){var z=p;return function(){var F=p;p=z;try{return P.apply(this,arguments)}finally{p=F}}}})(wk)),wk}var vM;function Hte(){return vM||(vM=1,bk.exports=qte()),bk.exports}/** - * @license React - * react-dom-client.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var gM;function Ute(){if(gM)return $d;gM=1;var e=Hte(),n=l6(),t=J$();function i(s){var u="https://react.dev/errors/"+s;if(1D||(s.current=Y[D],Y[D]=null,D--)}function $(s,u){D++,Y[D]=s.current,s.current=u}var X=V(null),te=V(null),ae=V(null),le=V(null);function ye(s,u){switch($(ae,u),$(te,s),$(X,null),u.nodeType){case 9:case 11:s=(s=u.documentElement)&&(s=s.namespaceURI)?vT(s):0;break;default:if(s=u.tagName,u=u.namespaceURI)u=vT(u),s=gT(u,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}W(X),$(X,s)}function oe(){W(X),W(te),W(ae)}function ue(s){s.memoizedState!==null&&$(le,s);var u=X.current,m=gT(u,s.type);u!==m&&($(te,s),$(X,m))}function ke(s){te.current===s&&(W(X),W(te)),le.current===s&&(W(le),Td._currentValue=F)}var ie,Re;function pe(s){if(ie===void 0)try{throw Error()}catch(m){var u=m.stack.trim().match(/\n( *(at )?)/);ie=u&&u[1]||"",Re=-1)":-1x||J[g]!==ce[x]){var Se=` -`+J[g].replace(" at new "," at ");return s.displayName&&Se.includes("")&&(Se=Se.replace("",s.displayName)),Se}while(1<=g&&0<=x);break}}}finally{Ce=!1,Error.prepareStackTrace=m}return(m=s?s.displayName||s.name:"")?pe(m):""}function be(s,u){switch(s.tag){case 26:case 27:case 5:return pe(s.type);case 16:return pe("Lazy");case 13:return s.child!==u&&u!==null?pe("Suspense Fallback"):pe("Suspense");case 19:return pe("SuspenseList");case 0:case 15:return De(s.type,!1);case 11:return De(s.type.render,!1);case 1:return De(s.type,!0);case 31:return pe("Activity");default:return""}}function _e(s){try{var u="",m=null;do u+=be(s,m),m=s,s=s.return;while(s);return u}catch(g){return` -Error generating stack: `+g.message+` -`+g.stack}}var Me=Object.prototype.hasOwnProperty,Be=e.unstable_scheduleCallback,Ve=e.unstable_cancelCallback,He=e.unstable_shouldYield,We=e.unstable_requestPaint,Ye=e.unstable_now,rn=e.unstable_getCurrentPriorityLevel,Q=e.unstable_ImmediatePriority,me=e.unstable_UserBlockingPriority,xe=e.unstable_NormalPriority,Xe=e.unstable_LowPriority,ne=e.unstable_IdlePriority,Le=e.log,en=e.unstable_setDisableYieldValue,hn=null,fn=null;function Ze(s){if(typeof Le=="function"&&en(s),fn&&typeof fn.setStrictMode=="function")try{fn.setStrictMode(hn,s)}catch{}}var Ke=Math.clz32?Math.clz32:ht,An=Math.log,on=Math.LN2;function ht(s){return s>>>=0,s===0?32:31-(An(s)/on|0)|0}var mt=256,zn=262144,yn=4194304;function kn(s){var u=s&42;if(u!==0)return u;switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function tt(s,u,m){var g=s.pendingLanes;if(g===0)return 0;var x=0,M=s.suspendedLanes,I=s.pingedLanes;s=s.warmLanes;var K=g&134217727;return K!==0?(g=K&~M,g!==0?x=kn(g):(I&=K,I!==0?x=kn(I):m||(m=K&~s,m!==0&&(x=kn(m))))):(K=g&~M,K!==0?x=kn(K):I!==0?x=kn(I):m||(m=g&~s,m!==0&&(x=kn(m)))),x===0?0:u!==0&&u!==x&&(u&M)===0&&(M=x&-x,m=u&-u,M>=m||M===32&&(m&4194048)!==0)?u:x}function At(s,u){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&u)===0}function $e(s,u){switch(s){case 1:case 2:case 4:case 8:case 64:return u+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Fe(){var s=yn;return yn<<=1,(yn&62914560)===0&&(yn=4194304),s}function jn(s){for(var u=[],m=0;31>m;m++)u.push(s);return u}function Jn(s,u){s.pendingLanes|=u,u!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function On(s,u,m,g,x,M){var I=s.pendingLanes;s.pendingLanes=m,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=m,s.entangledLanes&=m,s.errorRecoveryDisabledLanes&=m,s.shellSuspendCounter=0;var K=s.entanglements,J=s.expirationTimes,ce=s.hiddenUpdates;for(m=I&~m;0"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var Ba=/[\n"\\]/g;function Xi(s){return s.replace(Ba,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function st(s,u,m,g,x,M,I,K){s.name="",I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"?s.type=I:s.removeAttribute("type"),u!=null?I==="number"?(u===0&&s.value===""||s.value!=u)&&(s.value=""+Ue(u)):s.value!==""+Ue(u)&&(s.value=""+Ue(u)):I!=="submit"&&I!=="reset"||s.removeAttribute("value"),u!=null?ds(s,I,Ue(u)):m!=null?ds(s,I,Ue(m)):g!=null&&s.removeAttribute("value"),x==null&&M!=null&&(s.defaultChecked=!!M),x!=null&&(s.checked=x&&typeof x!="function"&&typeof x!="symbol"),K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"?s.name=""+Ue(K):s.removeAttribute("name")}function Zi(s,u,m,g,x,M,I,K){if(M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(s.type=M),u!=null||m!=null){if(!(M!=="submit"&&M!=="reset"||u!=null)){wt(s);return}m=m!=null?""+Ue(m):"",u=u!=null?""+Ue(u):m,K||u===s.value||(s.value=u),s.defaultValue=u}g=g??x,g=typeof g!="function"&&typeof g!="symbol"&&!!g,s.checked=K?s.checked:!!g,s.defaultChecked=!!g,I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"&&(s.name=I),wt(s)}function ds(s,u,m){u==="number"&&ar(s.ownerDocument)===s||s.defaultValue===""+m||(s.defaultValue=""+m)}function Ci(s,u,m,g){if(s=s.options,u){u={};for(var x=0;x"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),B0=!1;if(vo)try{var Gc={};Object.defineProperty(Gc,"passive",{get:function(){B0=!0}}),window.addEventListener("test",Gc,Gc),window.removeEventListener("test",Gc,Gc)}catch{B0=!1}var hs=null,F0=null,ap=null;function gA(){if(ap)return ap;var s,u=F0,m=u.length,g,x="value"in hs?hs.value:hs.textContent,M=x.length;for(s=0;s=Xc),xA=" ",SA=!1;function CA(s,u){switch(s){case"keyup":return nG.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function AA(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Nu=!1;function iG(s,u){switch(s){case"compositionend":return AA(u);case"keypress":return u.which!==32?null:(SA=!0,xA);case"textInput":return s=u.data,s===xA&&SA?null:s;default:return null}}function rG(s,u){if(Nu)return s==="compositionend"||!W0&&CA(s,u)?(s=gA(),ap=F0=hs=null,Nu=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1=u)return{node:m,offset:u-s};s=g}e:{for(;m;){if(m.nextSibling){m=m.nextSibling;break e}m=m.parentNode}m=void 0}m=PA(m)}}function $A(s,u){return s&&u?s===u?!0:s&&s.nodeType===3?!1:u&&u.nodeType===3?$A(s,u.parentNode):"contains"in s?s.contains(u):s.compareDocumentPosition?!!(s.compareDocumentPosition(u)&16):!1:!1}function zA(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var u=ar(s.document);u instanceof s.HTMLIFrameElement;){try{var m=typeof u.contentWindow.location.href=="string"}catch{m=!1}if(m)s=u.contentWindow;else break;u=ar(s.document)}return u}function K0(s){var u=s&&s.nodeName&&s.nodeName.toLowerCase();return u&&(u==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||u==="textarea"||s.contentEditable==="true")}var dG=vo&&"documentMode"in document&&11>=document.documentMode,$u=null,X0=null,ed=null,Z0=!1;function LA(s,u,m){var g=m.window===m?m.document:m.nodeType===9?m:m.ownerDocument;Z0||$u==null||$u!==ar(g)||(g=$u,"selectionStart"in g&&K0(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),ed&&Jc(ed,g)||(ed=g,g=Qp(X0,"onSelect"),0>=I,x-=I,Fa=1<<32-Ke(u)+x|m<Pn?(Yn=ln,ln=null):Yn=ln.sibling;var rt=de(se,ln,fe[Pn],Te);if(rt===null){ln===null&&(ln=Yn);break}s&&ln&&rt.alternate===null&&u(se,ln),re=M(rt,re,Pn),it===null?mn=rt:it.sibling=rt,it=rt,ln=Yn}if(Pn===fe.length)return m(se,ln),Xn&&yo(se,Pn),mn;if(ln===null){for(;PnPn?(Yn=ln,ln=null):Yn=ln.sibling;var Ns=de(se,ln,rt.value,Te);if(Ns===null){ln===null&&(ln=Yn);break}s&&ln&&Ns.alternate===null&&u(se,ln),re=M(Ns,re,Pn),it===null?mn=Ns:it.sibling=Ns,it=Ns,ln=Yn}if(rt.done)return m(se,ln),Xn&&yo(se,Pn),mn;if(ln===null){for(;!rt.done;Pn++,rt=fe.next())rt=je(se,rt.value,Te),rt!==null&&(re=M(rt,re,Pn),it===null?mn=rt:it.sibling=rt,it=rt);return Xn&&yo(se,Pn),mn}for(ln=g(ln);!rt.done;Pn++,rt=fe.next())rt=ve(ln,se,Pn,rt.value,Te),rt!==null&&(s&&rt.alternate!==null&&ln.delete(rt.key===null?Pn:rt.key),re=M(rt,re,Pn),it===null?mn=rt:it.sibling=rt,it=rt);return s&&ln.forEach(function(DY){return u(se,DY)}),Xn&&yo(se,Pn),mn}function gt(se,re,fe,Te){if(typeof fe=="object"&&fe!==null&&fe.type===b&&fe.key===null&&(fe=fe.props.children),typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case v:e:{for(var mn=fe.key;re!==null;){if(re.key===mn){if(mn=fe.type,mn===b){if(re.tag===7){m(se,re.sibling),Te=x(re,fe.props.children),Te.return=se,se=Te;break e}}else if(re.elementType===mn||typeof mn=="object"&&mn!==null&&mn.$$typeof===N&&El(mn)===re.type){m(se,re.sibling),Te=x(re,fe.props),od(Te,fe),Te.return=se,se=Te;break e}m(se,re);break}else u(se,re);re=re.sibling}fe.type===b?(Te=xl(fe.props.children,se.mode,Te,fe.key),Te.return=se,se=Te):(Te=pp(fe.type,fe.key,fe.props,null,se.mode,Te),od(Te,fe),Te.return=se,se=Te)}return I(se);case y:e:{for(mn=fe.key;re!==null;){if(re.key===mn)if(re.tag===4&&re.stateNode.containerInfo===fe.containerInfo&&re.stateNode.implementation===fe.implementation){m(se,re.sibling),Te=x(re,fe.children||[]),Te.return=se,se=Te;break e}else{m(se,re);break}else u(se,re);re=re.sibling}Te=rb(fe,se.mode,Te),Te.return=se,se=Te}return I(se);case N:return fe=El(fe),gt(se,re,fe,Te)}if(U(fe))return an(se,re,fe,Te);if(B(fe)){if(mn=B(fe),typeof mn!="function")throw Error(i(150));return fe=mn.call(fe),vn(se,re,fe,Te)}if(typeof fe.then=="function")return gt(se,re,_p(fe),Te);if(fe.$$typeof===C)return gt(se,re,yp(se,fe),Te);xp(se,fe)}return typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint"?(fe=""+fe,re!==null&&re.tag===6?(m(se,re.sibling),Te=x(re,fe),Te.return=se,se=Te):(m(se,re),Te=ib(fe,se.mode,Te),Te.return=se,se=Te),I(se)):m(se,re)}return function(se,re,fe,Te){try{ad=0;var mn=gt(se,re,fe,Te);return Gu=null,mn}catch(ln){if(ln===Wu||ln===wp)throw ln;var it=Cr(29,ln,null,se.mode);return it.lanes=Te,it.return=se,it}finally{}}}var Ml=sO(!0),lO=sO(!1),ys=!1;function vb(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function gb(s,u){s=s.updateQueue,u.updateQueue===s&&(u.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function bs(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function ws(s,u,m){var g=s.updateQueue;if(g===null)return null;if(g=g.shared,(lt&2)!==0){var x=g.pending;return x===null?u.next=u:(u.next=x.next,x.next=u),g.pending=u,u=mp(s),VA(s,null,m),u}return hp(s,g,u,m),mp(s)}function sd(s,u,m){if(u=u.updateQueue,u!==null&&(u=u.shared,(m&4194048)!==0)){var g=u.lanes;g&=s.pendingLanes,m|=g,u.lanes=m,Je(s,m)}}function yb(s,u){var m=s.updateQueue,g=s.alternate;if(g!==null&&(g=g.updateQueue,m===g)){var x=null,M=null;if(m=m.firstBaseUpdate,m!==null){do{var I={lane:m.lane,tag:m.tag,payload:m.payload,callback:null,next:null};M===null?x=M=I:M=M.next=I,m=m.next}while(m!==null);M===null?x=M=u:M=M.next=u}else x=M=u;m={baseState:g.baseState,firstBaseUpdate:x,lastBaseUpdate:M,shared:g.shared,callbacks:g.callbacks},s.updateQueue=m;return}s=m.lastBaseUpdate,s===null?m.firstBaseUpdate=u:s.next=u,m.lastBaseUpdate=u}var bb=!1;function ld(){if(bb){var s=Vu;if(s!==null)throw s}}function ud(s,u,m,g){bb=!1;var x=s.updateQueue;ys=!1;var M=x.firstBaseUpdate,I=x.lastBaseUpdate,K=x.shared.pending;if(K!==null){x.shared.pending=null;var J=K,ce=J.next;J.next=null,I===null?M=ce:I.next=ce,I=J;var Se=s.alternate;Se!==null&&(Se=Se.updateQueue,K=Se.lastBaseUpdate,K!==I&&(K===null?Se.firstBaseUpdate=ce:K.next=ce,Se.lastBaseUpdate=J))}if(M!==null){var je=x.baseState;I=0,Se=ce=J=null,K=M;do{var de=K.lane&-536870913,ve=de!==K.lane;if(ve?(Gn&de)===de:(g&de)===de){de!==0&&de===Uu&&(bb=!0),Se!==null&&(Se=Se.next={lane:0,tag:K.tag,payload:K.payload,callback:null,next:null});e:{var an=s,vn=K;de=u;var gt=m;switch(vn.tag){case 1:if(an=vn.payload,typeof an=="function"){je=an.call(gt,je,de);break e}je=an;break e;case 3:an.flags=an.flags&-65537|128;case 0:if(an=vn.payload,de=typeof an=="function"?an.call(gt,je,de):an,de==null)break e;je=d({},je,de);break e;case 2:ys=!0}}de=K.callback,de!==null&&(s.flags|=64,ve&&(s.flags|=8192),ve=x.callbacks,ve===null?x.callbacks=[de]:ve.push(de))}else ve={lane:de,tag:K.tag,payload:K.payload,callback:K.callback,next:null},Se===null?(ce=Se=ve,J=je):Se=Se.next=ve,I|=de;if(K=K.next,K===null){if(K=x.shared.pending,K===null)break;ve=K,K=ve.next,ve.next=null,x.lastBaseUpdate=ve,x.shared.pending=null}}while(!0);Se===null&&(J=je),x.baseState=J,x.firstBaseUpdate=ce,x.lastBaseUpdate=Se,M===null&&(x.shared.lanes=0),Cs|=I,s.lanes=I,s.memoizedState=je}}function uO(s,u){if(typeof s!="function")throw Error(i(191,s));s.call(u)}function fO(s,u){var m=s.callbacks;if(m!==null)for(s.callbacks=null,s=0;sM?M:8;var I=P.T,K={};P.T=K,Lb(s,!1,u,m);try{var J=x(),ce=P.S;if(ce!==null&&ce(K,J),J!==null&&typeof J=="object"&&typeof J.then=="function"){var Se=kG(J,g);dd(s,u,Se,Mr(s))}else dd(s,u,g,Mr(s))}catch(je){dd(s,u,{then:function(){},status:"rejected",reason:je},Mr())}finally{z.p=M,I!==null&&K.types!==null&&(I.types=K.types),P.T=I}}function OG(){}function $b(s,u,m,g){if(s.tag!==5)throw Error(i(476));var x=qO(s).queue;FO(s,x,u,F,m===null?OG:function(){return HO(s),m(g)})}function qO(s){var u=s.memoizedState;if(u!==null)return u;u={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_o,lastRenderedState:F},next:null};var m={};return u.next={memoizedState:m,baseState:m,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_o,lastRenderedState:m},next:null},s.memoizedState=u,s=s.alternate,s!==null&&(s.memoizedState=u),u}function HO(s){var u=qO(s);u.next===null&&(u=s.alternate.memoizedState),dd(s,u.next.queue,{},Mr())}function zb(){return Ei(Td)}function UO(){return Jt().memoizedState}function VO(){return Jt().memoizedState}function EG(s){for(var u=s.return;u!==null;){switch(u.tag){case 24:case 3:var m=Mr();s=bs(m);var g=ws(u,s,m);g!==null&&(cr(g,u,m),sd(g,u,m)),u={cache:db()},s.payload=u;return}u=u.return}}function TG(s,u,m){var g=Mr();m={lane:g,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Rp(s)?GO(u,m):(m=nb(s,u,m,g),m!==null&&(cr(m,s,g),YO(m,u,g)))}function WO(s,u,m){var g=Mr();dd(s,u,m,g)}function dd(s,u,m,g){var x={lane:g,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null};if(Rp(s))GO(u,x);else{var M=s.alternate;if(s.lanes===0&&(M===null||M.lanes===0)&&(M=u.lastRenderedReducer,M!==null))try{var I=u.lastRenderedState,K=M(I,m);if(x.hasEagerState=!0,x.eagerState=K,Sr(K,I))return hp(s,u,x,0),kt===null&&dp(),!1}catch{}finally{}if(m=nb(s,u,x,g),m!==null)return cr(m,s,g),YO(m,u,g),!0}return!1}function Lb(s,u,m,g){if(g={lane:2,revertLane:vw(),gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},Rp(s)){if(u)throw Error(i(479))}else u=nb(s,m,g,2),u!==null&&cr(u,s,2)}function Rp(s){var u=s.alternate;return s===Dn||u!==null&&u===Dn}function GO(s,u){Ku=Ap=!0;var m=s.pending;m===null?u.next=u:(u.next=m.next,m.next=u),s.pending=u}function YO(s,u,m){if((m&4194048)!==0){var g=u.lanes;g&=s.pendingLanes,m|=g,u.lanes=m,Je(s,m)}}var hd={readContext:Ei,use:Tp,useCallback:Gt,useContext:Gt,useEffect:Gt,useImperativeHandle:Gt,useLayoutEffect:Gt,useInsertionEffect:Gt,useMemo:Gt,useReducer:Gt,useRef:Gt,useState:Gt,useDebugValue:Gt,useDeferredValue:Gt,useTransition:Gt,useSyncExternalStore:Gt,useId:Gt,useHostTransitionStatus:Gt,useFormState:Gt,useActionState:Gt,useOptimistic:Gt,useMemoCache:Gt,useCacheRefresh:Gt};hd.useEffectEvent=Gt;var KO={readContext:Ei,use:Tp,useCallback:function(s,u){return Ji().memoizedState=[s,u===void 0?null:u],s},useContext:Ei,useEffect:DO,useImperativeHandle:function(s,u,m){m=m!=null?m.concat([s]):null,jp(4194308,4,$O.bind(null,u,s),m)},useLayoutEffect:function(s,u){return jp(4194308,4,s,u)},useInsertionEffect:function(s,u){jp(4,2,s,u)},useMemo:function(s,u){var m=Ji();u=u===void 0?null:u;var g=s();if(jl){Ze(!0);try{s()}finally{Ze(!1)}}return m.memoizedState=[g,u],g},useReducer:function(s,u,m){var g=Ji();if(m!==void 0){var x=m(u);if(jl){Ze(!0);try{m(u)}finally{Ze(!1)}}}else x=u;return g.memoizedState=g.baseState=x,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:x},g.queue=s,s=s.dispatch=TG.bind(null,Dn,s),[g.memoizedState,s]},useRef:function(s){var u=Ji();return s={current:s},u.memoizedState=s},useState:function(s){s=jb(s);var u=s.queue,m=WO.bind(null,Dn,u);return u.dispatch=m,[s.memoizedState,m]},useDebugValue:Pb,useDeferredValue:function(s,u){var m=Ji();return Nb(m,s,u)},useTransition:function(){var s=jb(!1);return s=FO.bind(null,Dn,s.queue,!0,!1),Ji().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,u,m){var g=Dn,x=Ji();if(Xn){if(m===void 0)throw Error(i(407));m=m()}else{if(m=u(),kt===null)throw Error(i(349));(Gn&127)!==0||vO(g,u,m)}x.memoizedState=m;var M={value:m,getSnapshot:u};return x.queue=M,DO(yO.bind(null,g,M,s),[s]),g.flags|=2048,Zu(9,{destroy:void 0},gO.bind(null,g,M,m,u),null),m},useId:function(){var s=Ji(),u=kt.identifierPrefix;if(Xn){var m=qa,g=Fa;m=(g&~(1<<32-Ke(g)-1)).toString(32)+m,u="_"+u+"R_"+m,m=Op++,0<\/script>",M=M.removeChild(M.firstChild);break;case"select":M=typeof g.is=="string"?I.createElement("select",{is:g.is}):I.createElement("select"),g.multiple?M.multiple=!0:g.size&&(M.size=g.size);break;default:M=typeof g.is=="string"?I.createElement(x,{is:g.is}):I.createElement(x)}}M[Wn]=u,M[Lt]=g;e:for(I=u.child;I!==null;){if(I.tag===5||I.tag===6)M.appendChild(I.stateNode);else if(I.tag!==4&&I.tag!==27&&I.child!==null){I.child.return=I,I=I.child;continue}if(I===u)break e;for(;I.sibling===null;){if(I.return===null||I.return===u)break e;I=I.return}I.sibling.return=I.return,I=I.sibling}u.stateNode=M;e:switch(Mi(M,x,g),x){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}g&&So(u)}}return Dt(u),Qb(u,u.type,s===null?null:s.memoizedProps,u.pendingProps,m),null;case 6:if(s&&u.stateNode!=null)s.memoizedProps!==g&&So(u);else{if(typeof g!="string"&&u.stateNode===null)throw Error(i(166));if(s=ae.current,qu(u)){if(s=u.stateNode,m=u.memoizedProps,g=null,x=Oi,x!==null)switch(x.tag){case 27:case 5:g=x.memoizedProps}s[Wn]=u,s=!!(s.nodeValue===m||g!==null&&g.suppressHydrationWarning===!0||mT(s.nodeValue,m)),s||vs(u,!0)}else s=Jp(s).createTextNode(g),s[Wn]=u,u.stateNode=s}return Dt(u),null;case 31:if(m=u.memoizedState,s===null||s.memoizedState!==null){if(g=qu(u),m!==null){if(s===null){if(!g)throw Error(i(318));if(s=u.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(i(557));s[Wn]=u}else Sl(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Dt(u),s=!1}else m=lb(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=m),s=!0;if(!s)return u.flags&256?(Or(u),u):(Or(u),null);if((u.flags&128)!==0)throw Error(i(558))}return Dt(u),null;case 13:if(g=u.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(x=qu(u),g!==null&&g.dehydrated!==null){if(s===null){if(!x)throw Error(i(318));if(x=u.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(i(317));x[Wn]=u}else Sl(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Dt(u),x=!1}else x=lb(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=x),x=!0;if(!x)return u.flags&256?(Or(u),u):(Or(u),null)}return Or(u),(u.flags&128)!==0?(u.lanes=m,u):(m=g!==null,s=s!==null&&s.memoizedState!==null,m&&(g=u.child,x=null,g.alternate!==null&&g.alternate.memoizedState!==null&&g.alternate.memoizedState.cachePool!==null&&(x=g.alternate.memoizedState.cachePool.pool),M=null,g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(M=g.memoizedState.cachePool.pool),M!==x&&(g.flags|=2048)),m!==s&&m&&(u.child.flags|=8192),Lp(u,u.updateQueue),Dt(u),null);case 4:return oe(),s===null&&ww(u.stateNode.containerInfo),Dt(u),null;case 10:return wo(u.type),Dt(u),null;case 19:if(W(Qt),g=u.memoizedState,g===null)return Dt(u),null;if(x=(u.flags&128)!==0,M=g.rendering,M===null)if(x)pd(g,!1);else{if(Yt!==0||s!==null&&(s.flags&128)!==0)for(s=u.child;s!==null;){if(M=Cp(s),M!==null){for(u.flags|=128,pd(g,!1),s=M.updateQueue,u.updateQueue=s,Lp(u,s),u.subtreeFlags=0,s=m,m=u.child;m!==null;)WA(m,s),m=m.sibling;return $(Qt,Qt.current&1|2),Xn&&yo(u,g.treeForkCount),u.child}s=s.sibling}g.tail!==null&&Ye()>Hp&&(u.flags|=128,x=!0,pd(g,!1),u.lanes=4194304)}else{if(!x)if(s=Cp(M),s!==null){if(u.flags|=128,x=!0,s=s.updateQueue,u.updateQueue=s,Lp(u,s),pd(g,!0),g.tail===null&&g.tailMode==="hidden"&&!M.alternate&&!Xn)return Dt(u),null}else 2*Ye()-g.renderingStartTime>Hp&&m!==536870912&&(u.flags|=128,x=!0,pd(g,!1),u.lanes=4194304);g.isBackwards?(M.sibling=u.child,u.child=M):(s=g.last,s!==null?s.sibling=M:u.child=M,g.last=M)}return g.tail!==null?(s=g.tail,g.rendering=s,g.tail=s.sibling,g.renderingStartTime=Ye(),s.sibling=null,m=Qt.current,$(Qt,x?m&1|2:m&1),Xn&&yo(u,g.treeForkCount),s):(Dt(u),null);case 22:case 23:return Or(u),kb(),g=u.memoizedState!==null,s!==null?s.memoizedState!==null!==g&&(u.flags|=8192):g&&(u.flags|=8192),g?(m&536870912)!==0&&(u.flags&128)===0&&(Dt(u),u.subtreeFlags&6&&(u.flags|=8192)):Dt(u),m=u.updateQueue,m!==null&&Lp(u,m.retryQueue),m=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(m=s.memoizedState.cachePool.pool),g=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(g=u.memoizedState.cachePool.pool),g!==m&&(u.flags|=2048),s!==null&&W(Ol),null;case 24:return m=null,s!==null&&(m=s.memoizedState.cache),u.memoizedState.cache!==m&&(u.flags|=2048),wo(ii),Dt(u),null;case 25:return null;case 30:return null}throw Error(i(156,u.tag))}function PG(s,u){switch(ob(u),u.tag){case 1:return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 3:return wo(ii),oe(),s=u.flags,(s&65536)!==0&&(s&128)===0?(u.flags=s&-65537|128,u):null;case 26:case 27:case 5:return ke(u),null;case 31:if(u.memoizedState!==null){if(Or(u),u.alternate===null)throw Error(i(340));Sl()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 13:if(Or(u),s=u.memoizedState,s!==null&&s.dehydrated!==null){if(u.alternate===null)throw Error(i(340));Sl()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 19:return W(Qt),null;case 4:return oe(),null;case 10:return wo(u.type),null;case 22:case 23:return Or(u),kb(),s!==null&&W(Ol),s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 24:return wo(ii),null;case 25:return null;default:return null}}function bE(s,u){switch(ob(u),u.tag){case 3:wo(ii),oe();break;case 26:case 27:case 5:ke(u);break;case 4:oe();break;case 31:u.memoizedState!==null&&Or(u);break;case 13:Or(u);break;case 19:W(Qt);break;case 10:wo(u.type);break;case 22:case 23:Or(u),kb(),s!==null&&W(Ol);break;case 24:wo(ii)}}function vd(s,u){try{var m=u.updateQueue,g=m!==null?m.lastEffect:null;if(g!==null){var x=g.next;m=x;do{if((m.tag&s)===s){g=void 0;var M=m.create,I=m.inst;g=M(),I.destroy=g}m=m.next}while(m!==x)}}catch(K){dt(u,u.return,K)}}function xs(s,u,m){try{var g=u.updateQueue,x=g!==null?g.lastEffect:null;if(x!==null){var M=x.next;g=M;do{if((g.tag&s)===s){var I=g.inst,K=I.destroy;if(K!==void 0){I.destroy=void 0,x=u;var J=m,ce=K;try{ce()}catch(Se){dt(x,J,Se)}}}g=g.next}while(g!==M)}}catch(Se){dt(u,u.return,Se)}}function wE(s){var u=s.updateQueue;if(u!==null){var m=s.stateNode;try{fO(u,m)}catch(g){dt(s,s.return,g)}}}function kE(s,u,m){m.props=Dl(s.type,s.memoizedProps),m.state=s.memoizedState;try{m.componentWillUnmount()}catch(g){dt(s,u,g)}}function gd(s,u){try{var m=s.ref;if(m!==null){switch(s.tag){case 26:case 27:case 5:var g=s.stateNode;break;case 30:g=s.stateNode;break;default:g=s.stateNode}typeof m=="function"?s.refCleanup=m(g):m.current=g}}catch(x){dt(s,u,x)}}function Ha(s,u){var m=s.ref,g=s.refCleanup;if(m!==null)if(typeof g=="function")try{g()}catch(x){dt(s,u,x)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof m=="function")try{m(null)}catch(x){dt(s,u,x)}else m.current=null}function _E(s){var u=s.type,m=s.memoizedProps,g=s.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":m.autoFocus&&g.focus();break e;case"img":m.src?g.src=m.src:m.srcSet&&(g.srcset=m.srcSet)}}catch(x){dt(s,s.return,x)}}function Jb(s,u,m){try{var g=s.stateNode;tY(g,s.type,m,u),g[Lt]=u}catch(x){dt(s,s.return,x)}}function xE(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&Ms(s.type)||s.tag===4}function ew(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||xE(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&&Ms(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 nw(s,u,m){var g=s.tag;if(g===5||g===6)s=s.stateNode,u?(m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m).insertBefore(s,u):(u=m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m,u.appendChild(s),m=m._reactRootContainer,m!=null||u.onclick!==null||(u.onclick=ba));else if(g!==4&&(g===27&&Ms(s.type)&&(m=s.stateNode,u=null),s=s.child,s!==null))for(nw(s,u,m),s=s.sibling;s!==null;)nw(s,u,m),s=s.sibling}function Ip(s,u,m){var g=s.tag;if(g===5||g===6)s=s.stateNode,u?m.insertBefore(s,u):m.appendChild(s);else if(g!==4&&(g===27&&Ms(s.type)&&(m=s.stateNode),s=s.child,s!==null))for(Ip(s,u,m),s=s.sibling;s!==null;)Ip(s,u,m),s=s.sibling}function SE(s){var u=s.stateNode,m=s.memoizedProps;try{for(var g=s.type,x=u.attributes;x.length;)u.removeAttributeNode(x[0]);Mi(u,g,m),u[Wn]=s,u[Lt]=m}catch(M){dt(s,s.return,M)}}var Co=!1,oi=!1,tw=!1,CE=typeof WeakSet=="function"?WeakSet:Set,bi=null;function NG(s,u){if(s=s.containerInfo,xw=ov,s=zA(s),K0(s)){if("selectionStart"in s)var m={start:s.selectionStart,end:s.selectionEnd};else e:{m=(m=s.ownerDocument)&&m.defaultView||window;var g=m.getSelection&&m.getSelection();if(g&&g.rangeCount!==0){m=g.anchorNode;var x=g.anchorOffset,M=g.focusNode;g=g.focusOffset;try{m.nodeType,M.nodeType}catch{m=null;break e}var I=0,K=-1,J=-1,ce=0,Se=0,je=s,de=null;n:for(;;){for(var ve;je!==m||x!==0&&je.nodeType!==3||(K=I+x),je!==M||g!==0&&je.nodeType!==3||(J=I+g),je.nodeType===3&&(I+=je.nodeValue.length),(ve=je.firstChild)!==null;)de=je,je=ve;for(;;){if(je===s)break n;if(de===m&&++ce===x&&(K=I),de===M&&++Se===g&&(J=I),(ve=je.nextSibling)!==null)break;je=de,de=je.parentNode}je=ve}m=K===-1||J===-1?null:{start:K,end:J}}else m=null}m=m||{start:0,end:0}}else m=null;for(Sw={focusedElem:s,selectionRange:m},ov=!1,bi=u;bi!==null;)if(u=bi,s=u.child,(u.subtreeFlags&1028)!==0&&s!==null)s.return=u,bi=s;else for(;bi!==null;){switch(u=bi,M=u.alternate,s=u.flags,u.tag){case 0:if((s&4)!==0&&(s=u.updateQueue,s=s!==null?s.events:null,s!==null))for(m=0;m title"))),Mi(M,g,m),M[Wn]=s,sn(M),g=M;break e;case"link":var I=jT("link","href",x).get(g+(m.href||""));if(I){for(var K=0;Kgt&&(I=gt,gt=vn,vn=I);var se=NA(K,vn),re=NA(K,gt);if(se&&re&&(ve.rangeCount!==1||ve.anchorNode!==se.node||ve.anchorOffset!==se.offset||ve.focusNode!==re.node||ve.focusOffset!==re.offset)){var fe=je.createRange();fe.setStart(se.node,se.offset),ve.removeAllRanges(),vn>gt?(ve.addRange(fe),ve.extend(re.node,re.offset)):(fe.setEnd(re.node,re.offset),ve.addRange(fe))}}}}for(je=[],ve=K;ve=ve.parentNode;)ve.nodeType===1&&je.push({element:ve,left:ve.scrollLeft,top:ve.scrollTop});for(typeof K.focus=="function"&&K.focus(),K=0;Km?32:m,P.T=null,m=uw,uw=null;var M=Os,I=Mo;if(hi=0,tf=Os=null,Mo=0,(lt&6)!==0)throw Error(i(331));var K=lt;if(lt|=4,$E(M.current),RE(M,M.current,I,m),lt=K,xd(0,!1),fn&&typeof fn.onPostCommitFiberRoot=="function")try{fn.onPostCommitFiberRoot(hn,M)}catch{}return!0}finally{z.p=x,P.T=g,eT(s,u)}}function tT(s,u,m){u=Vr(m,u),u=qb(s.stateNode,u,2),s=ws(s,u,2),s!==null&&(Jn(s,2),Ua(s))}function dt(s,u,m){if(s.tag===3)tT(s,s,m);else for(;u!==null;){if(u.tag===3){tT(u,s,m);break}else if(u.tag===1){var g=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(As===null||!As.has(g))){s=Vr(m,s),m=iE(2),g=ws(u,m,2),g!==null&&(rE(m,g,u,s),Jn(g,2),Ua(g));break}}u=u.return}}function hw(s,u,m){var g=s.pingCache;if(g===null){g=s.pingCache=new LG;var x=new Set;g.set(u,x)}else x=g.get(u),x===void 0&&(x=new Set,g.set(u,x));x.has(m)||(aw=!0,x.add(m),s=HG.bind(null,s,u,m),u.then(s,s))}function HG(s,u,m){var g=s.pingCache;g!==null&&g.delete(u),s.pingedLanes|=s.suspendedLanes&m,s.warmLanes&=~m,kt===s&&(Gn&m)===m&&(Yt===4||Yt===3&&(Gn&62914560)===Gn&&300>Ye()-qp?(lt&2)===0&&rf(s,0):ow|=m,nf===Gn&&(nf=0)),Ua(s)}function iT(s,u){u===0&&(u=Fe()),s=_l(s,u),s!==null&&(Jn(s,u),Ua(s))}function UG(s){var u=s.memoizedState,m=0;u!==null&&(m=u.retryLane),iT(s,m)}function VG(s,u){var m=0;switch(s.tag){case 31:case 13:var g=s.stateNode,x=s.memoizedState;x!==null&&(m=x.retryLane);break;case 19:g=s.stateNode;break;case 22:g=s.stateNode._retryCache;break;default:throw Error(i(314))}g!==null&&g.delete(u),iT(s,m)}function WG(s,u){return Be(s,u)}var Kp=null,of=null,mw=!1,Xp=!1,pw=!1,Ts=0;function Ua(s){s!==of&&s.next===null&&(of===null?Kp=of=s:of=of.next=s),Xp=!0,mw||(mw=!0,YG())}function xd(s,u){if(!pw&&Xp){pw=!0;do for(var m=!1,g=Kp;g!==null;){if(s!==0){var x=g.pendingLanes;if(x===0)var M=0;else{var I=g.suspendedLanes,K=g.pingedLanes;M=(1<<31-Ke(42|s)+1)-1,M&=x&~(I&~K),M=M&201326741?M&201326741|1:M?M|2:0}M!==0&&(m=!0,sT(g,M))}else M=Gn,M=tt(g,g===kt?M:0,g.cancelPendingCommit!==null||g.timeoutHandle!==-1),(M&3)===0||At(g,M)||(m=!0,sT(g,M));g=g.next}while(m);pw=!1}}function GG(){rT()}function rT(){Xp=mw=!1;var s=0;Ts!==0&&rY()&&(s=Ts);for(var u=Ye(),m=null,g=Kp;g!==null;){var x=g.next,M=aT(g,u);M===0?(g.next=null,m===null?Kp=x:m.next=x,x===null&&(of=m)):(m=g,(s!==0||(M&3)!==0)&&(Xp=!0)),g=x}hi!==0&&hi!==5||xd(s),Ts!==0&&(Ts=0)}function aT(s,u){for(var m=s.suspendedLanes,g=s.pingedLanes,x=s.expirationTimes,M=s.pendingLanes&-62914561;0K)break;var Se=J.transferSize,je=J.initiatorType;Se&&pT(je)&&(J=J.responseEnd,I+=Se*(J"u"?null:document;function OT(s,u,m){var g=sf;if(g&&typeof u=="string"&&u){var x=Xi(u);x='link[rel="'+s+'"][href="'+x+'"]',typeof m=="string"&&(x+='[crossorigin="'+m+'"]'),AT.has(x)||(AT.add(x),s={rel:s,crossOrigin:m,href:u},g.querySelector(x)===null&&(u=g.createElement("link"),Mi(u,"link",s),sn(u),g.head.appendChild(u)))}}function hY(s){jo.D(s),OT("dns-prefetch",s,null)}function mY(s,u){jo.C(s,u),OT("preconnect",s,u)}function pY(s,u,m){jo.L(s,u,m);var g=sf;if(g&&s&&u){var x='link[rel="preload"][as="'+Xi(u)+'"]';u==="image"&&m&&m.imageSrcSet?(x+='[imagesrcset="'+Xi(m.imageSrcSet)+'"]',typeof m.imageSizes=="string"&&(x+='[imagesizes="'+Xi(m.imageSizes)+'"]')):x+='[href="'+Xi(s)+'"]';var M=x;switch(u){case"style":M=lf(s);break;case"script":M=uf(s)}Zr.has(M)||(s=d({rel:"preload",href:u==="image"&&m&&m.imageSrcSet?void 0:s,as:u},m),Zr.set(M,s),g.querySelector(x)!==null||u==="style"&&g.querySelector(Od(M))||u==="script"&&g.querySelector(Ed(M))||(u=g.createElement("link"),Mi(u,"link",s),sn(u),g.head.appendChild(u)))}}function vY(s,u){jo.m(s,u);var m=sf;if(m&&s){var g=u&&typeof u.as=="string"?u.as:"script",x='link[rel="modulepreload"][as="'+Xi(g)+'"][href="'+Xi(s)+'"]',M=x;switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":M=uf(s)}if(!Zr.has(M)&&(s=d({rel:"modulepreload",href:s},u),Zr.set(M,s),m.querySelector(x)===null)){switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(m.querySelector(Ed(M)))return}g=m.createElement("link"),Mi(g,"link",s),sn(g),m.head.appendChild(g)}}}function gY(s,u,m){jo.S(s,u,m);var g=sf;if(g&&s){var x=ti(g).hoistableStyles,M=lf(s);u=u||"default";var I=x.get(M);if(!I){var K={loading:0,preload:null};if(I=g.querySelector(Od(M)))K.loading=5;else{s=d({rel:"stylesheet",href:s,"data-precedence":u},m),(m=Zr.get(M))&&jw(s,m);var J=I=g.createElement("link");sn(J),Mi(J,"link",s),J._p=new Promise(function(ce,Se){J.onload=ce,J.onerror=Se}),J.addEventListener("load",function(){K.loading|=1}),J.addEventListener("error",function(){K.loading|=2}),K.loading|=4,nv(I,u,g)}I={type:"stylesheet",instance:I,count:1,state:K},x.set(M,I)}}}function yY(s,u){jo.X(s,u);var m=sf;if(m&&s){var g=ti(m).hoistableScripts,x=uf(s),M=g.get(x);M||(M=m.querySelector(Ed(x)),M||(s=d({src:s,async:!0},u),(u=Zr.get(x))&&Dw(s,u),M=m.createElement("script"),sn(M),Mi(M,"link",s),m.head.appendChild(M)),M={type:"script",instance:M,count:1,state:null},g.set(x,M))}}function bY(s,u){jo.M(s,u);var m=sf;if(m&&s){var g=ti(m).hoistableScripts,x=uf(s),M=g.get(x);M||(M=m.querySelector(Ed(x)),M||(s=d({src:s,async:!0,type:"module"},u),(u=Zr.get(x))&&Dw(s,u),M=m.createElement("script"),sn(M),Mi(M,"link",s),m.head.appendChild(M)),M={type:"script",instance:M,count:1,state:null},g.set(x,M))}}function ET(s,u,m,g){var x=(x=ae.current)?ev(x):null;if(!x)throw Error(i(446));switch(s){case"meta":case"title":return null;case"style":return typeof m.precedence=="string"&&typeof m.href=="string"?(u=lf(m.href),m=ti(x).hoistableStyles,g=m.get(u),g||(g={type:"style",instance:null,count:0,state:null},m.set(u,g)),g):{type:"void",instance:null,count:0,state:null};case"link":if(m.rel==="stylesheet"&&typeof m.href=="string"&&typeof m.precedence=="string"){s=lf(m.href);var M=ti(x).hoistableStyles,I=M.get(s);if(I||(x=x.ownerDocument||x,I={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},M.set(s,I),(M=x.querySelector(Od(s)))&&!M._p&&(I.instance=M,I.state.loading=5),Zr.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},Zr.set(s,m),M||wY(x,s,m,I.state))),u&&g===null)throw Error(i(528,""));return I}if(u&&g!==null)throw Error(i(529,""));return null;case"script":return u=m.async,m=m.src,typeof m=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=uf(m),m=ti(x).hoistableScripts,g=m.get(u),g||(g={type:"script",instance:null,count:0,state:null},m.set(u,g)),g):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,s))}}function lf(s){return'href="'+Xi(s)+'"'}function Od(s){return'link[rel="stylesheet"]['+s+"]"}function TT(s){return d({},s,{"data-precedence":s.precedence,precedence:null})}function wY(s,u,m,g){s.querySelector('link[rel="preload"][as="style"]['+u+"]")?g.loading=1:(u=s.createElement("link"),g.preload=u,u.addEventListener("load",function(){return g.loading|=1}),u.addEventListener("error",function(){return g.loading|=2}),Mi(u,"link",m),sn(u),s.head.appendChild(u))}function uf(s){return'[src="'+Xi(s)+'"]'}function Ed(s){return"script[async]"+s}function MT(s,u,m){if(u.count++,u.instance===null)switch(u.type){case"style":var g=s.querySelector('style[data-href~="'+Xi(m.href)+'"]');if(g)return u.instance=g,sn(g),g;var x=d({},m,{"data-href":m.href,"data-precedence":m.precedence,href:null,precedence:null});return g=(s.ownerDocument||s).createElement("style"),sn(g),Mi(g,"style",x),nv(g,m.precedence,s),u.instance=g;case"stylesheet":x=lf(m.href);var M=s.querySelector(Od(x));if(M)return u.state.loading|=4,u.instance=M,sn(M),M;g=TT(m),(x=Zr.get(x))&&jw(g,x),M=(s.ownerDocument||s).createElement("link"),sn(M);var I=M;return I._p=new Promise(function(K,J){I.onload=K,I.onerror=J}),Mi(M,"link",g),u.state.loading|=4,nv(M,m.precedence,s),u.instance=M;case"script":return M=uf(m.src),(x=s.querySelector(Ed(M)))?(u.instance=x,sn(x),x):(g=m,(x=Zr.get(M))&&(g=d({},m),Dw(g,x)),s=s.ownerDocument||s,x=s.createElement("script"),sn(x),Mi(x,"link",g),s.head.appendChild(x),u.instance=x);case"void":return null;default:throw Error(i(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(g=u.instance,u.state.loading|=4,nv(g,m.precedence,s));return u.instance}function nv(s,u,m){for(var g=m.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),x=g.length?g[g.length-1]:null,M=x,I=0;I title"):null)}function kY(s,u,m){if(m===1||u.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return s=u.disabled,typeof u.precedence=="string"&&s==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function RT(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function _Y(s,u,m,g){if(m.type==="stylesheet"&&(typeof g.media!="string"||matchMedia(g.media).matches!==!1)&&(m.state.loading&4)===0){if(m.instance===null){var x=lf(g.href),M=u.querySelector(Od(x));if(M){u=M._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(s.count++,s=iv.bind(s),u.then(s,s)),m.state.loading|=4,m.instance=M,sn(M);return}M=u.ownerDocument||u,g=TT(g),(x=Zr.get(x))&&jw(g,x),M=M.createElement("link"),sn(M);var I=M;I._p=new Promise(function(K,J){I.onload=K,I.onerror=J}),Mi(M,"link",g),m.instance=M}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(m,u),(u=m.state.preload)&&(m.state.loading&3)===0&&(s.count++,m=iv.bind(s),u.addEventListener("load",m),u.addEventListener("error",m))}}var Rw=0;function xY(s,u){return s.stylesheets&&s.count===0&&av(s,s.stylesheets),0Rw?50:800)+u);return s.unsuspend=m,function(){s.unsuspend=null,clearTimeout(g),clearTimeout(x)}}:null}function iv(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)av(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var rv=null;function av(s,u){s.stylesheets=null,s.unsuspend!==null&&(s.count++,rv=new Map,u.forEach(SY,s),rv=null,iv.call(s))}function SY(s,u){if(!(u.state.loading&4)){var m=rv.get(s);if(m)var g=m.get(null);else{m=new Map,rv.set(s,m);for(var x=s.querySelectorAll("link[data-precedence],style[data-precedence]"),M=0;M"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),yk.exports=Ute(),yk.exports}var Wte=Vte();class _B extends Error{constructor(n,t){super(t),this.status=n,this.name="HTTPError"}}async function Gte(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 _B(i.status,r.Message??r.message??i.statusText)}if(i.status!==204)return i.json()}const Yte="/api";function Vt(e,n){return Gte(e,n,Yte)}function Kte(){return Vt("/board")}function Xte(e){return Vt("/columns",{method:"POST",body:JSON.stringify({name:e})})}function pf(e,n){return Vt(`/columns/${e}`,{method:"PATCH",body:JSON.stringify(n)})}function Zte(e){return Vt(`/columns/${e}`,{method:"DELETE"})}function Qte(e){return Vt("/columns/reorder",{method:"POST",body:JSON.stringify({ids:e})})}function Jte(e){return Vt("/cards",{method:"POST",body:JSON.stringify(e)})}function vf(e,n){return Vt(`/cards/${e}`,{method:"PATCH",body:JSON.stringify(n)})}function eie(e){return Vt(`/cards/${e}`,{method:"DELETE"})}function kk(e,n){return Vt(`/cards/${e}/stickers`,{method:"PUT",body:JSON.stringify({stickers:n})})}function nie(){return Vt("/trash")}function tie(e){return Vt(`/cards/${e}/restore`,{method:"POST"})}function iie(e){return Vt(`/cards/${e}/purge`,{method:"DELETE"})}function rie(e,n,t){return Vt(`/cards/${e}/move`,{method:"POST",body:JSON.stringify({column_id:n,ordered_ids:t})})}function aie(e){return Vt(`/cards/${e}/history`)}function oie(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/chat/ws`}function sie(e,n,t){return new Promise((i,r)=>{const a=new WebSocket(oie());let o=!1;const l=f=>{if(!o){o=!0;try{a.close()}catch{}f?r(f):i()}};a.onopen=()=>{a.send(JSON.stringify({messages:e}))},a.onmessage=f=>{try{const c=JSON.parse(typeof f.data=="string"?f.data:"");n(c),(c.type==="done"||c.type==="error")&&l(c.type==="error"?new Error(c.error):void 0)}catch(c){l(c)}},a.onerror=()=>l(new Error("websocket error")),a.onclose=()=>l()})}function bM(e,n){return Vt("/auth/login",{method:"POST",body:JSON.stringify({username:e,password:n})})}function lie(e,n,t){return Vt("/auth/register",{method:"POST",body:JSON.stringify({username:e,password:n,display_name:t})})}function uie(){return Vt("/auth/logout",{method:"POST"})}function fie(){return Vt("/me")}function wM(e){return Vt("/me",{method:"PATCH",body:JSON.stringify(e)})}function xB(){return Vt("/users")}function SB(){return Vt("/tags")}function cie(){return Vt("/requesters")}function CB(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 Vt(`/metrics${t?`?${t}`:""}`)}const AB=O.createContext(null);function die({children:e}){const[n,t]=O.useState(null),[i,r]=O.useState(!0);O.useEffect(()=>{fie().then(t).catch(f=>{(!(f instanceof _B)||f.status!==401)&&console.warn("getMe failed",f)}).finally(()=>r(!1))},[]);const a=O.useCallback(async(f,c)=>{const h=await bM(f,c);t(h)},[]),o=O.useCallback(async(f,c,h)=>{await lie(f,c,h);const d=await bM(f,c);t(d)},[]),l=O.useCallback(async()=>{await uie(),t(null)},[]);return k.jsx(AB.Provider,{value:{user:n,loading:i,login:a,register:o,logout:l,setUser:t},children:e})}function AC(){const e=O.useContext(AB);if(!e)throw new Error("useAuth: missing AuthProvider");return e}function hie(){for(var e=arguments.length,n=new Array(e),t=0;ti=>{n.forEach(r=>r(i))},n)}const My=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ec(e){const n=Object.prototype.toString.call(e);return n==="[object Window]"||n==="[object global]"}function OC(e){return"nodeType"in e}function rr(e){var n,t;return e?Ec(e)?e:OC(e)&&(n=(t=e.ownerDocument)==null?void 0:t.defaultView)!=null?n:window:window}function EC(e){const{Document:n}=rr(e);return e instanceof n}function Lm(e){return Ec(e)?!1:e instanceof rr(e).HTMLElement}function OB(e){return e instanceof rr(e).SVGElement}function Tc(e){return e?Ec(e)?e.document:OC(e)?EC(e)?e:Lm(e)||OB(e)?e.ownerDocument:document:document:document}const Pa=My?O.useLayoutEffect:O.useEffect;function jy(e){const n=O.useRef(e);return Pa(()=>{n.current=e}),O.useCallback(function(){for(var t=arguments.length,i=new Array(t),r=0;r{e.current=setInterval(i,r)},[]),t=O.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[n,t]}function Rh(e,n){n===void 0&&(n=[e]);const t=O.useRef(e);return Pa(()=>{t.current!==e&&(t.current=e)},n),t}function Im(e,n){const t=O.useRef();return O.useMemo(()=>{const i=e(t.current);return t.current=i,i},[...n])}function bg(e){const n=jy(e),t=O.useRef(null),i=O.useCallback(r=>{r!==t.current&&(n==null||n(r,t.current)),t.current=r},[]);return[t,i]}function wg(e){const n=O.useRef();return O.useEffect(()=>{n.current=e},[e]),n.current}let _k={};function Bm(e,n){return O.useMemo(()=>{if(n)return n;const t=_k[e]==null?0:_k[e]+1;return _k[e]=t,e+"-"+t},[e,n])}function EB(e){return function(n){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r{const l=Object.entries(o);for(const[f,c]of l){const h=a[f];h!=null&&(a[f]=h+e*c)}return a},{...n})}}const Df=EB(1),Ph=EB(-1);function pie(e){return"clientX"in e&&"clientY"in e}function Dy(e){if(!e)return!1;const{KeyboardEvent:n}=rr(e.target);return n&&e instanceof n}function vie(e){if(!e)return!1;const{TouchEvent:n}=rr(e.target);return n&&e instanceof n}function kg(e){if(vie(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 pie(e)?{x:e.clientX,y:e.clientY}:null}const io=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[io.Translate.toString(e),io.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:n,duration:t,easing:i}=e;return n+" "+t+"ms "+i}}}),kM="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function gie(e){return e.matches(kM)?e:e.querySelector(kM)}const yie={display:"none"};function bie(e){let{id:n,value:t}=e;return Z.createElement("div",{id:n,style:yie},t)}function wie(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 Z.createElement("div",{id:n,style:r,role:"status","aria-live":i,"aria-atomic":!0},t)}function kie(){const[e,n]=O.useState("");return{announce:O.useCallback(i=>{i!=null&&n(i)},[]),announcement:e}}const TB=O.createContext(null);function _ie(e){const n=O.useContext(TB);O.useEffect(()=>{if(!n)throw new Error("useDndMonitor must be used within a children of ");return n(e)},[e,n])}function xie(){const[e]=O.useState(()=>new Set),n=O.useCallback(i=>(e.add(i),()=>e.delete(i)),[e]);return[O.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 Sie={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. - `},Cie={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 Aie(e){let{announcements:n=Cie,container:t,hiddenTextDescribedById:i,screenReaderInstructions:r=Sie}=e;const{announce:a,announcement:o}=kie(),l=Bm("DndLiveRegion"),[f,c]=O.useState(!1);if(O.useEffect(()=>{c(!0)},[]),_ie(O.useMemo(()=>({onDragStart(d){let{active:p}=d;a(n.onDragStart({active:p}))},onDragMove(d){let{active:p,over:v}=d;n.onDragMove&&a(n.onDragMove({active:p,over:v}))},onDragOver(d){let{active:p,over:v}=d;a(n.onDragOver({active:p,over:v}))},onDragEnd(d){let{active:p,over:v}=d;a(n.onDragEnd({active:p,over:v}))},onDragCancel(d){let{active:p,over:v}=d;a(n.onDragCancel({active:p,over:v}))}}),[a,n])),!f)return null;const h=Z.createElement(Z.Fragment,null,Z.createElement(bie,{id:i,value:r.draggable}),Z.createElement(wie,{id:l,announcement:o}));return t?Vs.createPortal(h,t):h}var vi;(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"})(vi||(vi={}));function _g(){}function _M(e,n){return O.useMemo(()=>({sensor:e,options:n??{}}),[e,n])}function Oie(){for(var e=arguments.length,n=new Array(e),t=0;t[...n].filter(i=>i!=null),[...n])}const Na=Object.freeze({x:0,y:0});function TC(e,n){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function Eie(e,n){const t=kg(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 MC(e,n){let{data:{value:t}}=e,{data:{value:i}}=n;return t-i}function Tie(e,n){let{data:{value:t}}=e,{data:{value:i}}=n;return i-t}function vS(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 MB(e,n){if(!e||e.length===0)return null;const[t]=e;return t[n]}function xM(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 Mie=e=>{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=xM(n,n.left,n.top),a=[];for(const o of i){const{id:l}=o,f=t.get(l);if(f){const c=TC(xM(f),r);a.push({id:l,data:{droppableContainer:o,value:c}})}}return a.sort(MC)},jB=e=>{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=vS(n),a=[];for(const o of i){const{id:l}=o,f=t.get(l);if(f){const c=vS(f),h=r.reduce((p,v,y)=>p+TC(c[y],v),0),d=Number((h/4).toFixed(4));a.push({id:l,data:{droppableContainer:o,value:d}})}}return a.sort(MC)};function jie(e,n){const t=Math.max(n.top,e.top),i=Math.max(n.left,e.left),r=Math.min(n.left+n.width,e.left+e.width),a=Math.min(n.top+n.height,e.top+e.height),o=r-i,l=a-t;if(i{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=[];for(const a of i){const{id:o}=a,l=t.get(o);if(l){const f=jie(l,n);f>0&&r.push({id:o,data:{droppableContainer:a,value:f}})}}return r.sort(Tie)};function Die(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 Rie=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&&Die(i,l)){const c=vS(l).reduce((d,p)=>d+TC(i,p),0),h=Number((c/4).toFixed(4));r.push({id:o,data:{droppableContainer:a,value:h}})}}return r.sort(MC)};function Pie(e,n,t){return{...e,scaleX:n&&t?n.width/t.width:1,scaleY:n&&t?n.height/t.height:1}}function RB(e,n){return e&&n?{x:e.left-n.left,y:e.top-n.top}:Na}function Nie(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 $ie=Nie(1);function PB(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 zie(e,n,t){const i=PB(n);if(!i)return e;const{scaleX:r,scaleY:a,x:o,y:l}=i,f=e.left-o-(1-r)*parseFloat(t),c=e.top-l-(1-a)*parseFloat(t.slice(t.indexOf(" ")+1)),h=r?e.width/r:e.width,d=a?e.height/a:e.height;return{width:h,height:d,top:c,right:f+h,bottom:c+d,left:f}}const Lie={ignoreTransform:!1};function Mc(e,n){n===void 0&&(n=Lie);let t=e.getBoundingClientRect();if(n.ignoreTransform){const{transform:c,transformOrigin:h}=rr(e).getComputedStyle(e);c&&(t=zie(t,c,h))}const{top:i,left:r,width:a,height:o,bottom:l,right:f}=t;return{top:i,left:r,width:a,height:o,bottom:l,right:f}}function SM(e){return Mc(e,{ignoreTransform:!0})}function Iie(e){const n=e.innerWidth,t=e.innerHeight;return{top:0,left:0,right:n,bottom:t,width:n,height:t}}function Bie(e,n){return n===void 0&&(n=rr(e).getComputedStyle(e)),n.position==="fixed"}function Fie(e,n){n===void 0&&(n=rr(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 Ry(e,n){const t=[];function i(r){if(n!=null&&t.length>=n||!r)return t;if(EC(r)&&r.scrollingElement!=null&&!t.includes(r.scrollingElement))return t.push(r.scrollingElement),t;if(!Lm(r)||OB(r)||t.includes(r))return t;const a=rr(e).getComputedStyle(r);return r!==e&&Fie(r,a)&&t.push(r),Bie(r,a)?t:i(r.parentNode)}return e?i(e):t}function NB(e){const[n]=Ry(e,1);return n??null}function xk(e){return!My||!e?null:Ec(e)?e:OC(e)?EC(e)||e===Tc(e).scrollingElement?window:Lm(e)?e:null:null}function $B(e){return Ec(e)?e.scrollX:e.scrollLeft}function zB(e){return Ec(e)?e.scrollY:e.scrollTop}function gS(e){return{x:$B(e),y:zB(e)}}var _i;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(_i||(_i={}));function LB(e){return!My||!e?!1:e===document.scrollingElement}function IB(e){const n={x:0,y:0},t=LB(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 qie={x:.2,y:.2};function Hie(e,n,t,i,r){let{top:a,left:o,right:l,bottom:f}=t;i===void 0&&(i=10),r===void 0&&(r=qie);const{isTop:c,isBottom:h,isLeft:d,isRight:p}=IB(e),v={x:0,y:0},y={x:0,y:0},b={height:n.height*r.y,width:n.width*r.x};return!c&&a<=n.top+b.height?(v.y=_i.Backward,y.y=i*Math.abs((n.top+b.height-a)/b.height)):!h&&f>=n.bottom-b.height&&(v.y=_i.Forward,y.y=i*Math.abs((n.bottom-b.height-f)/b.height)),!p&&l>=n.right-b.width?(v.x=_i.Forward,y.x=i*Math.abs((n.right-b.width-l)/b.width)):!d&&o<=n.left+b.width&&(v.x=_i.Backward,y.x=i*Math.abs((n.left+b.width-o)/b.width)),{direction:v,speed:y}}function Uie(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 BB(e){return e.reduce((n,t)=>Df(n,gS(t)),Na)}function Vie(e){return e.reduce((n,t)=>n+$B(t),0)}function Wie(e){return e.reduce((n,t)=>n+zB(t),0)}function FB(e,n){if(n===void 0&&(n=Mc),!e)return;const{top:t,left:i,bottom:r,right:a}=n(e);NB(e)&&(r<=0||a<=0||t>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Gie=[["x",["left","right"],Vie],["y",["top","bottom"],Wie]];class jC{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=Ry(t),r=BB(i);this.rect={...n},this.width=n.width,this.height=n.height;for(const[a,o,l]of Gie)for(const f of o)Object.defineProperty(this,f,{get:()=>{const c=l(i),h=r[a]-c;return this.rect[f]+h},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class dh{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 Yie(e){const{EventTarget:n}=rr(e);return e instanceof n?e:Tc(e)}function Sk(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 ia;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(ia||(ia={}));function CM(e){e.preventDefault()}function Kie(e){e.stopPropagation()}var Zn;(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"})(Zn||(Zn={}));const qB={start:[Zn.Space,Zn.Enter],cancel:[Zn.Esc],end:[Zn.Space,Zn.Enter,Zn.Tab]},Xie=(e,n)=>{let{currentCoordinates:t}=n;switch(e.code){case Zn.Right:return{...t,x:t.x+25};case Zn.Left:return{...t,x:t.x-25};case Zn.Down:return{...t,y:t.y+25};case Zn.Up:return{...t,y:t.y-25}}};class DC{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 dh(Tc(t)),this.windowListeners=new dh(rr(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ia.Resize,this.handleCancel),this.windowListeners.add(ia.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ia.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:n,onStart:t}=this.props,i=n.node.current;i&&FB(i),t(Na)}handleKeyDown(n){if(Dy(n)){const{active:t,context:i,options:r}=this.props,{keyboardCodes:a=qB,coordinateGetter:o=Xie,scrollBehavior:l="smooth"}=r,{code:f}=n;if(a.end.includes(f)){this.handleEnd(n);return}if(a.cancel.includes(f)){this.handleCancel(n);return}const{collisionRect:c}=i.current,h=c?{x:c.left,y:c.top}:Na;this.referenceCoordinates||(this.referenceCoordinates=h);const d=o(n,{active:t,context:i.current,currentCoordinates:h});if(d){const p=Ph(d,h),v={x:0,y:0},{scrollableAncestors:y}=i.current;for(const b of y){const w=n.code,{isTop:_,isRight:S,isLeft:C,isBottom:E,maxScroll:A,minScroll:T}=IB(b),j=Uie(b),N={x:Math.min(w===Zn.Right?j.right-j.width/2:j.right,Math.max(w===Zn.Right?j.left:j.left+j.width/2,d.x)),y:Math.min(w===Zn.Down?j.bottom-j.height/2:j.bottom,Math.max(w===Zn.Down?j.top:j.top+j.height/2,d.y))},q=w===Zn.Right&&!S||w===Zn.Left&&!C,R=w===Zn.Down&&!E||w===Zn.Up&&!_;if(q&&N.x!==d.x){const L=b.scrollLeft+p.x,B=w===Zn.Right&&L<=A.x||w===Zn.Left&&L>=T.x;if(B&&!p.y){b.scrollTo({left:L,behavior:l});return}B?v.x=b.scrollLeft-L:v.x=w===Zn.Right?b.scrollLeft-A.x:b.scrollLeft-T.x,v.x&&b.scrollBy({left:-v.x,behavior:l});break}else if(R&&N.y!==d.y){const L=b.scrollTop+p.y,B=w===Zn.Down&&L<=A.y||w===Zn.Up&&L>=T.y;if(B&&!p.x){b.scrollTo({top:L,behavior:l});return}B?v.y=b.scrollTop-L:v.y=w===Zn.Down?b.scrollTop-A.y:b.scrollTop-T.y,v.y&&b.scrollBy({top:-v.y,behavior:l});break}}this.handleMove(n,Df(Ph(d,this.referenceCoordinates),v))}}}handleMove(n,t){const{onMove:i}=this.props;n.preventDefault(),i(t)}handleEnd(n){const{onEnd:t}=this.props;n.preventDefault(),this.detach(),t()}handleCancel(n){const{onCancel:t}=this.props;n.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}DC.activators=[{eventName:"onKeyDown",handler:(e,n,t)=>{let{keyboardCodes:i=qB,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 AM(e){return!!(e&&"distance"in e)}function OM(e){return!!(e&&"delay"in e)}class RC{constructor(n,t,i){var r;i===void 0&&(i=Yie(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=Tc(o),this.documentListeners=new dh(this.document),this.listeners=new dh(i),this.windowListeners=new dh(rr(o)),this.initialCoordinates=(r=kg(a))!=null?r:Na,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(ia.Resize,this.handleCancel),this.windowListeners.add(ia.DragStart,CM),this.windowListeners.add(ia.VisibilityChange,this.handleCancel),this.windowListeners.add(ia.ContextMenu,CM),this.documentListeners.add(ia.Keydown,this.handleKeydown),t){if(i!=null&&i({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(OM(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(AM(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(ia.Click,Kie,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ia.SelectionChange,this.removeTextSelection),t(n))}handleMove(n){var t;const{activated:i,initialCoordinates:r,props:a}=this,{onMove:o,options:{activationConstraint:l}}=a;if(!r)return;const f=(t=kg(n))!=null?t:Na,c=Ph(r,f);if(!i&&l){if(AM(l)){if(l.tolerance!=null&&Sk(c,l.tolerance))return this.handleCancel();if(Sk(c,l.distance))return this.handleStart()}if(OM(l)&&Sk(c,l.tolerance))return this.handleCancel();this.handlePending(l,c);return}n.cancelable&&n.preventDefault(),o(f)}handleEnd(){const{onAbort:n,onEnd:t}=this.props;this.detach(),this.activated||n(this.props.active),t()}handleCancel(){const{onAbort:n,onCancel:t}=this.props;this.detach(),this.activated||n(this.props.active),t()}handleKeydown(n){n.code===Zn.Esc&&this.handleCancel()}removeTextSelection(){var n;(n=this.document.getSelection())==null||n.removeAllRanges()}}const Zie={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class PC extends RC{constructor(n){const{event:t}=n,i=Tc(t.target);super(n,Zie,i)}}PC.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 Qie={move:{name:"mousemove"},end:{name:"mouseup"}};var yS;(function(e){e[e.RightClick=2]="RightClick"})(yS||(yS={}));class Jie extends RC{constructor(n){super(n,Qie,Tc(n.event.target))}}Jie.activators=[{eventName:"onMouseDown",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:i}=n;return t.button===yS.RightClick?!1:(i==null||i({event:t}),!0)}}];const Ck={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class ere extends RC{constructor(n){super(n,Ck)}static setup(){return window.addEventListener(Ck.move.name,n,{capture:!1,passive:!1}),function(){window.removeEventListener(Ck.move.name,n)};function n(){}}}ere.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 hh;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(hh||(hh={}));var xg;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(xg||(xg={}));function nre(e){let{acceleration:n,activator:t=hh.Pointer,canScroll:i,draggingRect:r,enabled:a,interval:o=5,order:l=xg.TreeOrder,pointerCoordinates:f,scrollableAncestors:c,scrollableAncestorRects:h,delta:d,threshold:p}=e;const v=ire({delta:d,disabled:!a}),[y,b]=mie(),w=O.useRef({x:0,y:0}),_=O.useRef({x:0,y:0}),S=O.useMemo(()=>{switch(t){case hh.Pointer:return f?{top:f.y,bottom:f.y,left:f.x,right:f.x}:null;case hh.DraggableRect:return r}},[t,r,f]),C=O.useRef(null),E=O.useCallback(()=>{const T=C.current;if(!T)return;const j=w.current.x*_.current.x,N=w.current.y*_.current.y;T.scrollBy(j,N)},[]),A=O.useMemo(()=>l===xg.TreeOrder?[...c].reverse():c,[l,c]);O.useEffect(()=>{if(!a||!c.length||!S){b();return}for(const T of A){if((i==null?void 0:i(T))===!1)continue;const j=c.indexOf(T),N=h[j];if(!N)continue;const{direction:q,speed:R}=Hie(T,N,S,n,p);for(const L of["x","y"])v[L][q[L]]||(R[L]=0,q[L]=0);if(R.x>0||R.y>0){b(),C.current=T,y(E,o),w.current=R,_.current=q;return}}w.current={x:0,y:0},_.current={x:0,y:0},b()},[n,E,i,b,a,o,JSON.stringify(S),JSON.stringify(v),y,c,A,h,JSON.stringify(p)])}const tre={x:{[_i.Backward]:!1,[_i.Forward]:!1},y:{[_i.Backward]:!1,[_i.Forward]:!1}};function ire(e){let{delta:n,disabled:t}=e;const i=wg(n);return Im(r=>{if(t||!i||!r)return tre;const a={x:Math.sign(n.x-i.x),y:Math.sign(n.y-i.y)};return{x:{[_i.Backward]:r.x[_i.Backward]||a.x===-1,[_i.Forward]:r.x[_i.Forward]||a.x===1},y:{[_i.Backward]:r.y[_i.Backward]||a.y===-1,[_i.Forward]:r.y[_i.Forward]||a.y===1}}},[t,n,i])}function rre(e,n){const t=n!=null?e.get(n):void 0,i=t?t.node.current:null;return Im(r=>{var a;return n==null?null:(a=i??r)!=null?a:null},[i,n])}function are(e,n){return O.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 Nh;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Nh||(Nh={}));var bS;(function(e){e.Optimized="optimized"})(bS||(bS={}));const EM=new Map;function ore(e,n){let{dragging:t,dependencies:i,config:r}=n;const[a,o]=O.useState(null),{frequency:l,measure:f,strategy:c}=r,h=O.useRef(e),d=w(),p=Rh(d),v=O.useCallback(function(_){_===void 0&&(_=[]),!p.current&&o(S=>S===null?_:S.concat(_.filter(C=>!S.includes(C))))},[p]),y=O.useRef(null),b=Im(_=>{if(d&&!t)return EM;if(!_||_===EM||h.current!==e||a!=null){const S=new Map;for(let C of e){if(!C)continue;if(a&&a.length>0&&!a.includes(C.id)&&C.rect.current){S.set(C.id,C.rect.current);continue}const E=C.node.current,A=E?new jC(f(E),E):null;C.rect.current=A,A&&S.set(C.id,A)}return S}return _},[e,a,t,d,f]);return O.useEffect(()=>{h.current=e},[e]),O.useEffect(()=>{d||v()},[t,d]),O.useEffect(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),O.useEffect(()=>{d||typeof l!="number"||y.current!==null||(y.current=setTimeout(()=>{v(),y.current=null},l))},[l,d,v,...i]),{droppableRects:b,measureDroppableContainers:v,measuringScheduled:a!=null};function w(){switch(c){case Nh.Always:return!1;case Nh.BeforeDragging:return t;default:return!t}}}function NC(e,n){return Im(t=>e?t||(typeof n=="function"?n(e):e):null,[n,e])}function sre(e,n){return NC(e,n)}function lre(e){let{callback:n,disabled:t}=e;const i=jy(n),r=O.useMemo(()=>{if(t||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(i)},[i,t]);return O.useEffect(()=>()=>r==null?void 0:r.disconnect(),[r]),r}function Py(e){let{callback:n,disabled:t}=e;const i=jy(n),r=O.useMemo(()=>{if(t||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(i)},[t]);return O.useEffect(()=>()=>r==null?void 0:r.disconnect(),[r]),r}function ure(e){return new jC(Mc(e),e)}function TM(e,n,t){n===void 0&&(n=ure);const[i,r]=O.useState(null);function a(){r(f=>{if(!e)return null;if(e.isConnected===!1){var c;return(c=f??t)!=null?c:null}const h=n(e);return JSON.stringify(f)===JSON.stringify(h)?f:h})}const o=lre({callback(f){if(e)for(const c of f){const{type:h,target:d}=c;if(h==="childList"&&d instanceof HTMLElement&&d.contains(e)){a();break}}}}),l=Py({callback:a});return Pa(()=>{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 fre(e){const n=NC(e);return RB(e,n)}const MM=[];function cre(e){const n=O.useRef(e),t=Im(i=>e?i&&i!==MM&&e&&n.current&&e.parentNode===n.current.parentNode?i:Ry(e):MM,[e]);return O.useEffect(()=>{n.current=e},[e]),t}function dre(e){const[n,t]=O.useState(null),i=O.useRef(e),r=O.useCallback(a=>{const o=xk(a.target);o&&t(l=>l?(l.set(o,gS(o)),new Map(l)):null)},[]);return O.useEffect(()=>{const a=i.current;if(e!==a){o(a);const l=e.map(f=>{const c=xk(f);return c?(c.addEventListener("scroll",r,{passive:!0}),[c,gS(c)]):null}).filter(f=>f!=null);t(l.length?new Map(l):null),i.current=e}return()=>{o(e),o(a)};function o(l){l.forEach(f=>{const c=xk(f);c==null||c.removeEventListener("scroll",r)})}},[r,e]),O.useMemo(()=>e.length?n?Array.from(n.values()).reduce((a,o)=>Df(a,o),Na):BB(e):Na,[e,n])}function jM(e,n){n===void 0&&(n=[]);const t=O.useRef(null);return O.useEffect(()=>{t.current=null},n),O.useEffect(()=>{const i=e!==Na;i&&!t.current&&(t.current=e),!i&&t.current&&(t.current=null)},[e]),t.current?Ph(e,t.current):Na}function hre(e){O.useEffect(()=>{if(!My)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 mre(e,n){return O.useMemo(()=>e.reduce((t,i)=>{let{eventName:r,handler:a}=i;return t[r]=o=>{a(o,n)},t},{}),[e,n])}function HB(e){return O.useMemo(()=>e?Iie(e):null,[e])}const DM=[];function pre(e,n){n===void 0&&(n=Mc);const[t]=e,i=HB(t?rr(t):null),[r,a]=O.useState(DM);function o(){a(()=>e.length?e.map(f=>LB(f)?i:new jC(n(f),f)):DM)}const l=Py({callback:o});return Pa(()=>{l==null||l.disconnect(),o(),e.forEach(f=>l==null?void 0:l.observe(f))},[e]),r}function UB(e){if(!e)return null;if(e.children.length>1)return e;const n=e.children[0];return Lm(n)?n:e}function vre(e){let{measure:n}=e;const[t,i]=O.useState(null),r=O.useCallback(c=>{for(const{target:h}of c)if(Lm(h)){i(d=>{const p=n(h);return d?{...d,width:p.width,height:p.height}:p});break}},[n]),a=Py({callback:r}),o=O.useCallback(c=>{const h=UB(c);a==null||a.disconnect(),h&&(a==null||a.observe(h)),i(h?n(h):null)},[n,a]),[l,f]=bg(o);return O.useMemo(()=>({nodeRef:l,rect:t,setRef:f}),[t,l,f])}const gre=[{sensor:PC,options:{}},{sensor:DC,options:{}}],yre={current:{}},ng={draggable:{measure:SM},droppable:{measure:SM,strategy:Nh.WhileDragging,frequency:bS.Optimized},dragOverlay:{measure:Mc}};class mh 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 bre={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new mh,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:_g},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ng,measureDroppableContainers:_g,windowRect:null,measuringScheduled:!1},VB={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:_g,draggableNodes:new Map,over:null,measureDroppableContainers:_g},Fm=O.createContext(VB),WB=O.createContext(bre);function wre(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new mh}}}function kre(e,n){switch(n.type){case vi.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:n.initialCoordinates,active:n.active}};case vi.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 vi.DragEnd:case vi.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case vi.RegisterDroppable:{const{element:t}=n,{id:i}=t,r=new mh(e.droppable.containers);return r.set(i,t),{...e,droppable:{...e.droppable,containers:r}}}case vi.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 mh(e.droppable.containers);return o.set(t,{...a,disabled:r}),{...e,droppable:{...e.droppable,containers:o}}}case vi.UnregisterDroppable:{const{id:t,key:i}=n,r=e.droppable.containers.get(t);if(!r||i!==r.key)return e;const a=new mh(e.droppable.containers);return a.delete(t),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function _re(e){let{disabled:n}=e;const{active:t,activatorEvent:i,draggableNodes:r}=O.useContext(Fm),a=wg(i),o=wg(t==null?void 0:t.id);return O.useEffect(()=>{if(!n&&!i&&a&&o!=null){if(!Dy(a)||document.activeElement===a.target)return;const l=r.get(o);if(!l)return;const{activatorNode:f,node:c}=l;if(!f.current&&!c.current)return;requestAnimationFrame(()=>{for(const h of[f.current,c.current]){if(!h)continue;const d=gie(h);if(d){d.focus();break}}})}},[i,n,r,o,a]),null}function GB(e,n){let{transform:t,...i}=n;return e!=null&&e.length?e.reduce((r,a)=>a({transform:r,...i}),t):t}function xre(e){return O.useMemo(()=>({draggable:{...ng.draggable,...e==null?void 0:e.draggable},droppable:{...ng.droppable,...e==null?void 0:e.droppable},dragOverlay:{...ng.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 Sre(e){let{activeNode:n,measure:t,initialRect:i,config:r=!0}=e;const a=O.useRef(!1),{x:o,y:l}=typeof r=="boolean"?{x:r,y:r}:r;Pa(()=>{if(!o&&!l||!n){a.current=!1;return}if(a.current||!i)return;const c=n==null?void 0:n.node.current;if(!c||c.isConnected===!1)return;const h=t(c),d=RB(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=NB(c);p&&p.scrollBy({top:d.y,left:d.x})}},[n,o,l,i,t])}const Ny=O.createContext({...Na,scaleX:1,scaleY:1});var Fs;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Fs||(Fs={}));const Cre=O.memo(function(n){var t,i,r,a;let{id:o,accessibility:l,autoScroll:f=!0,children:c,sensors:h=gre,collisionDetection:d=DB,measuring:p,modifiers:v,...y}=n;const b=O.useReducer(kre,void 0,wre),[w,_]=b,[S,C]=xie(),[E,A]=O.useState(Fs.Uninitialized),T=E===Fs.Initialized,{draggable:{active:j,nodes:N,translate:q},droppable:{containers:R}}=w,L=j!=null?N.get(j):null,B=O.useRef({initial:null,translated:null}),G=O.useMemo(()=>{var yn;return j!=null?{id:j,data:(yn=L==null?void 0:L.data)!=null?yn:yre,rect:B}:null},[j,L]),H=O.useRef(null),[U,P]=O.useState(null),[z,F]=O.useState(null),Y=Rh(y,Object.values(y)),D=Bm("DndDescribedBy",o),V=O.useMemo(()=>R.getEnabled(),[R]),W=xre(p),{droppableRects:$,measureDroppableContainers:X,measuringScheduled:te}=ore(V,{dragging:T,dependencies:[q.x,q.y],config:W.droppable}),ae=rre(N,j),le=O.useMemo(()=>z?kg(z):null,[z]),ye=zn(),oe=sre(ae,W.draggable.measure);Sre({activeNode:j!=null?N.get(j):null,config:ye.layoutShiftCompensation,initialRect:oe,measure:W.draggable.measure});const ue=TM(ae,W.draggable.measure,oe),ke=TM(ae?ae.parentElement:null),ie=O.useRef({activatorEvent:null,active:null,activeNode:ae,collisionRect:null,collisions:null,droppableRects:$,draggableNodes:N,draggingNode:null,draggingNodeRect:null,droppableContainers:R,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Re=R.getNodeFor((t=ie.current.over)==null?void 0:t.id),pe=vre({measure:W.dragOverlay.measure}),Ce=(i=pe.nodeRef.current)!=null?i:ae,De=T?(r=pe.rect)!=null?r:ue:null,be=!!(pe.nodeRef.current&&pe.rect),_e=fre(be?null:ue),Me=HB(Ce?rr(Ce):null),Be=cre(T?Re??ae:null),Ve=pre(Be),He=GB(v,{transform:{x:q.x-_e.x,y:q.y-_e.y,scaleX:1,scaleY:1},activatorEvent:z,active:G,activeNodeRect:ue,containerNodeRect:ke,draggingNodeRect:De,over:ie.current.over,overlayNodeRect:pe.rect,scrollableAncestors:Be,scrollableAncestorRects:Ve,windowRect:Me}),We=le?Df(le,q):null,Ye=dre(Be),rn=jM(Ye),Q=jM(Ye,[ue]),me=Df(He,rn),xe=De?$ie(De,He):null,Xe=G&&xe?d({active:G,collisionRect:xe,droppableRects:$,droppableContainers:V,pointerCoordinates:We}):null,ne=MB(Xe,"id"),[Le,en]=O.useState(null),hn=be?He:Df(He,Q),fn=Pie(hn,(a=Le==null?void 0:Le.rect)!=null?a:null,ue),Ze=O.useRef(null),Ke=O.useCallback((yn,kn)=>{let{sensor:tt,options:At}=kn;if(H.current==null)return;const $e=N.get(H.current);if(!$e)return;const Fe=yn.nativeEvent,jn=new tt({active:H.current,activeNode:$e,event:Fe,options:At,context:ie,onAbort(On){if(!N.get(On))return;const{onDragAbort:Je}=Y.current,nn={id:On};Je==null||Je(nn),S({type:"onDragAbort",event:nn})},onPending(On,Qe,Je,nn){if(!N.get(On))return;const{onDragPending:In}=Y.current,bt={id:On,constraint:Qe,initialCoordinates:Je,offset:nn};In==null||In(bt),S({type:"onDragPending",event:bt})},onStart(On){const Qe=H.current;if(Qe==null)return;const Je=N.get(Qe);if(!Je)return;const{onDragStart:nn}=Y.current,Ln={activatorEvent:Fe,active:{id:Qe,data:Je.data,rect:B}};Vs.unstable_batchedUpdates(()=>{nn==null||nn(Ln),A(Fs.Initializing),_({type:vi.DragStart,initialCoordinates:On,active:Qe}),S({type:"onDragStart",event:Ln}),P(Ze.current),F(Fe)})},onMove(On){_({type:vi.DragMove,coordinates:On})},onEnd:Jn(vi.DragEnd),onCancel:Jn(vi.DragCancel)});Ze.current=jn;function Jn(On){return async function(){const{active:Je,collisions:nn,over:Ln,scrollAdjustedTranslate:In}=ie.current;let bt=null;if(Je&&In){const{cancelDrop:xn}=Y.current;bt={activatorEvent:Fe,active:Je,collisions:nn,delta:In,over:Ln},On===vi.DragEnd&&typeof xn=="function"&&await Promise.resolve(xn(bt))&&(On=vi.DragCancel)}H.current=null,Vs.unstable_batchedUpdates(()=>{_({type:On}),A(Fs.Uninitialized),en(null),P(null),F(null),Ze.current=null;const xn=On===vi.DragEnd?"onDragEnd":"onDragCancel";if(bt){const _n=Y.current[xn];_n==null||_n(bt),S({type:xn,event:bt})}})}}},[N]),An=O.useCallback((yn,kn)=>(tt,At)=>{const $e=tt.nativeEvent,Fe=N.get(At);if(H.current!==null||!Fe||$e.dndKit||$e.defaultPrevented)return;const jn={active:Fe};yn(tt,kn.options,jn)===!0&&($e.dndKit={capturedBy:kn.sensor},H.current=At,Ke(tt,kn))},[N,Ke]),on=are(h,An);hre(h),Pa(()=>{ue&&E===Fs.Initializing&&A(Fs.Initialized)},[ue,E]),O.useEffect(()=>{const{onDragMove:yn}=Y.current,{active:kn,activatorEvent:tt,collisions:At,over:$e}=ie.current;if(!kn||!tt)return;const Fe={active:kn,activatorEvent:tt,collisions:At,delta:{x:me.x,y:me.y},over:$e};Vs.unstable_batchedUpdates(()=>{yn==null||yn(Fe),S({type:"onDragMove",event:Fe})})},[me.x,me.y]),O.useEffect(()=>{const{active:yn,activatorEvent:kn,collisions:tt,droppableContainers:At,scrollAdjustedTranslate:$e}=ie.current;if(!yn||H.current==null||!kn||!$e)return;const{onDragOver:Fe}=Y.current,jn=At.get(ne),Jn=jn&&jn.rect.current?{id:jn.id,rect:jn.rect.current,data:jn.data,disabled:jn.disabled}:null,On={active:yn,activatorEvent:kn,collisions:tt,delta:{x:$e.x,y:$e.y},over:Jn};Vs.unstable_batchedUpdates(()=>{en(Jn),Fe==null||Fe(On),S({type:"onDragOver",event:On})})},[ne]),Pa(()=>{ie.current={activatorEvent:z,active:G,activeNode:ae,collisionRect:xe,collisions:Xe,droppableRects:$,draggableNodes:N,draggingNode:Ce,draggingNodeRect:De,droppableContainers:R,over:Le,scrollableAncestors:Be,scrollAdjustedTranslate:me},B.current={initial:De,translated:xe}},[G,ae,Xe,xe,N,Ce,De,$,R,Le,Be,me]),nre({...ye,delta:q,draggingRect:xe,pointerCoordinates:We,scrollableAncestors:Be,scrollableAncestorRects:Ve});const ht=O.useMemo(()=>({active:G,activeNode:ae,activeNodeRect:ue,activatorEvent:z,collisions:Xe,containerNodeRect:ke,dragOverlay:pe,draggableNodes:N,droppableContainers:R,droppableRects:$,over:Le,measureDroppableContainers:X,scrollableAncestors:Be,scrollableAncestorRects:Ve,measuringConfiguration:W,measuringScheduled:te,windowRect:Me}),[G,ae,ue,z,Xe,ke,pe,N,R,$,Le,X,Be,Ve,W,te,Me]),mt=O.useMemo(()=>({activatorEvent:z,activators:on,active:G,activeNodeRect:ue,ariaDescribedById:{draggable:D},dispatch:_,draggableNodes:N,over:Le,measureDroppableContainers:X}),[z,on,G,ue,_,D,N,Le,X]);return Z.createElement(TB.Provider,{value:C},Z.createElement(Fm.Provider,{value:mt},Z.createElement(WB.Provider,{value:ht},Z.createElement(Ny.Provider,{value:fn},c)),Z.createElement(_re,{disabled:(l==null?void 0:l.restoreFocus)===!1})),Z.createElement(Aie,{...l,hiddenTextDescribedById:D}));function zn(){const yn=(U==null?void 0:U.autoScrollEnabled)===!1,kn=typeof f=="object"?f.enabled===!1:f===!1,tt=T&&!yn&&!kn;return typeof f=="object"?{...f,enabled:tt}:{enabled:tt}}}),Are=O.createContext(null),RM="button",Ore="Draggable";function Ere(e){let{id:n,data:t,disabled:i=!1,attributes:r}=e;const a=Bm(Ore),{activators:o,activatorEvent:l,active:f,activeNodeRect:c,ariaDescribedById:h,draggableNodes:d,over:p}=O.useContext(Fm),{role:v=RM,roleDescription:y="draggable",tabIndex:b=0}=r??{},w=(f==null?void 0:f.id)===n,_=O.useContext(w?Ny:Are),[S,C]=bg(),[E,A]=bg(),T=mre(o,n),j=Rh(t);Pa(()=>(d.set(n,{id:n,key:a,node:S,activatorNode:E,data:j}),()=>{const q=d.get(n);q&&q.key===a&&d.delete(n)}),[d,n]);const N=O.useMemo(()=>({role:v,tabIndex:b,"aria-disabled":i,"aria-pressed":w&&v===RM?!0:void 0,"aria-roledescription":y,"aria-describedby":h.draggable}),[i,v,b,w,y,h.draggable]);return{active:f,activatorEvent:l,activeNodeRect:c,attributes:N,isDragging:w,listeners:i?void 0:T,node:S,over:p,setNodeRef:C,setActivatorNodeRef:A,transform:_}}function YB(){return O.useContext(WB)}const Tre="Droppable",Mre={timeout:25};function jre(e){let{data:n,disabled:t=!1,id:i,resizeObserverConfig:r}=e;const a=Bm(Tre),{active:o,dispatch:l,over:f,measureDroppableContainers:c}=O.useContext(Fm),h=O.useRef({disabled:t}),d=O.useRef(!1),p=O.useRef(null),v=O.useRef(null),{disabled:y,updateMeasurementsFor:b,timeout:w}={...Mre,...r},_=Rh(b??i),S=O.useCallback(()=>{if(!d.current){d.current=!0;return}v.current!=null&&clearTimeout(v.current),v.current=setTimeout(()=>{c(Array.isArray(_.current)?_.current:[_.current]),v.current=null},w)},[w]),C=Py({callback:S,disabled:y||!o}),E=O.useCallback((N,q)=>{C&&(q&&(C.unobserve(q),d.current=!1),N&&C.observe(N))},[C]),[A,T]=bg(E),j=Rh(n);return O.useEffect(()=>{!C||!A.current||(C.disconnect(),d.current=!1,C.observe(A.current))},[A,C]),O.useEffect(()=>(l({type:vi.RegisterDroppable,element:{id:i,key:a,disabled:t,node:A,rect:p,data:j}}),()=>l({type:vi.UnregisterDroppable,key:a,id:i})),[i]),O.useEffect(()=>{t!==h.current.disabled&&(l({type:vi.SetDroppableDisabled,id:i,key:a,disabled:t}),h.current.disabled=t)},[i,a,t,l]),{active:o,rect:p,isOver:(f==null?void 0:f.id)===i,node:A,over:f,setNodeRef:T}}function Dre(e){let{animation:n,children:t}=e;const[i,r]=O.useState(null),[a,o]=O.useState(null),l=wg(t);return!t&&!i&&l&&r(l),Pa(()=>{if(!a)return;const f=i==null?void 0:i.key,c=i==null?void 0:i.props.id;if(f==null||c==null){r(null);return}Promise.resolve(n(c,a)).then(()=>{r(null)})},[n,i,a]),Z.createElement(Z.Fragment,null,t,i?O.cloneElement(i,{ref:o}):null)}const Rre={x:0,y:0,scaleX:1,scaleY:1};function Pre(e){let{children:n}=e;return Z.createElement(Fm.Provider,{value:VB},Z.createElement(Ny.Provider,{value:Rre},n))}const Nre={position:"fixed",touchAction:"none"},$re=e=>Dy(e)?"transform 250ms ease":void 0,zre=O.forwardRef((e,n)=>{let{as:t,activatorEvent:i,adjustScale:r,children:a,className:o,rect:l,style:f,transform:c,transition:h=$re}=e;if(!l)return null;const d=r?c:{...c,scaleX:1,scaleY:1},p={...Nre,width:l.width,height:l.height,top:l.top,left:l.left,transform:io.Transform.toString(d),transformOrigin:r&&i?Eie(i,l):void 0,transition:typeof h=="function"?h(i):h,...f};return Z.createElement(t,{className:o,style:p,ref:n},a)}),Lre=e=>n=>{let{active:t,dragOverlay:i}=n;const r={},{styles:a,className:o}=e;if(a!=null&&a.active)for(const[l,f]of Object.entries(a.active))f!==void 0&&(r[l]=t.node.style.getPropertyValue(l),t.node.style.setProperty(l,f));if(a!=null&&a.dragOverlay)for(const[l,f]of Object.entries(a.dragOverlay))f!==void 0&&i.node.style.setProperty(l,f);return o!=null&&o.active&&t.node.classList.add(o.active),o!=null&&o.dragOverlay&&i.node.classList.add(o.dragOverlay),function(){for(const[f,c]of Object.entries(r))t.node.style.setProperty(f,c);o!=null&&o.active&&t.node.classList.remove(o.active)}},Ire=e=>{let{transform:{initial:n,final:t}}=e;return[{transform:io.Transform.toString(n)},{transform:io.Transform.toString(t)}]},Bre={duration:250,easing:"ease",keyframes:Ire,sideEffects:Lre({styles:{active:{opacity:"0"}}})};function Fre(e){let{config:n,draggableNodes:t,droppableContainers:i,measuringConfiguration:r}=e;return jy((a,o)=>{if(n===null)return;const l=t.get(a);if(!l)return;const f=l.node.current;if(!f)return;const c=UB(o);if(!c)return;const{transform:h}=rr(o).getComputedStyle(o),d=PB(h);if(!d)return;const p=typeof n=="function"?n:qre(n);return FB(f,r.draggable.measure),p({active:{id:a,data:l.data,node:f,rect:r.draggable.measure(f)},draggableNodes:t,dragOverlay:{node:o,rect:r.dragOverlay.measure(c)},droppableContainers:i,measuringConfiguration:r,transform:d})})}function qre(e){const{duration:n,easing:t,sideEffects:i,keyframes:r}={...Bre,...e};return a=>{let{active:o,dragOverlay:l,transform:f,...c}=a;if(!n)return;const h={x:l.rect.left-o.rect.left,y:l.rect.top-o.rect.top},d={scaleX:f.scaleX!==1?o.rect.width*f.scaleX/l.rect.width:1,scaleY:f.scaleY!==1?o.rect.height*f.scaleY/l.rect.height:1},p={x:f.x-h.x,y:f.y-h.y,...d},v=r({...c,active:o,dragOverlay:l,transform:{initial:f,final:p}}),[y]=v,b=v[v.length-1];if(JSON.stringify(y)===JSON.stringify(b))return;const w=i==null?void 0:i({active:o,dragOverlay:l,...c}),_=l.node.animate(v,{duration:n,easing:t,fill:"forwards"});return new Promise(S=>{_.onfinish=()=>{w==null||w(),S()}})}}let PM=0;function Hre(e){return O.useMemo(()=>{if(e!=null)return PM++,PM},[e])}const Ure=Z.memo(e=>{let{adjustScale:n=!1,children:t,dropAnimation:i,style:r,transition:a,modifiers:o,wrapperElement:l="div",className:f,zIndex:c=999}=e;const{activatorEvent:h,active:d,activeNodeRect:p,containerNodeRect:v,draggableNodes:y,droppableContainers:b,dragOverlay:w,over:_,measuringConfiguration:S,scrollableAncestors:C,scrollableAncestorRects:E,windowRect:A}=YB(),T=O.useContext(Ny),j=Hre(d==null?void 0:d.id),N=GB(o,{activatorEvent:h,active:d,activeNodeRect:p,containerNodeRect:v,draggingNodeRect:w.rect,over:_,overlayNodeRect:w.rect,scrollableAncestors:C,scrollableAncestorRects:E,transform:T,windowRect:A}),q=NC(p),R=Fre({config:i,draggableNodes:y,droppableContainers:b,measuringConfiguration:S}),L=q?w.setRef:void 0;return Z.createElement(Pre,null,Z.createElement(Dre,{animation:R},d&&j?Z.createElement(zre,{key:j,id:d.id,ref:L,as:l,activatorEvent:h,adjustScale:n,className:f,transition:a,rect:q,style:{zIndex:c,...r},transform:N},t):null))});function Sg(e,n,t){const i=e.slice();return i.splice(t<0?i.length+t:t,0,i.splice(n,1)[0]),i}function Vre(e,n){return e.reduce((t,i,r)=>{const a=n.get(i);return a&&(t[r]=a),t},Array(e.length))}function _v(e){return e!==null&&e>=0}function Wre(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let t=0;t{var n;let{rects:t,activeNodeRect:i,activeIndex:r,overIndex:a,index:o}=e;const l=(n=t[r])!=null?n:i;if(!l)return null;const f=Kre(t,o,r);if(o===r){const c=t[a];return c?{x:rr&&o<=a?{x:-l.width-f,y:0,...xv}:o=a?{x:l.width+f,y:0,...xv}:{x:0,y:0,...xv}};function Kre(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=Sg(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}},Sv={scaleX:1,scaleY:1},XB=e=>{var n;let{activeIndex:t,activeNodeRect:i,index:r,rects:a,overIndex:o}=e;const l=(n=a[t])!=null?n:i;if(!l)return null;if(r===t){const c=a[o];return c?{x:0,y:tt&&r<=o?{x:0,y:-l.height-f,...Sv}:r=o?{x:0,y:l.height+f,...Sv}:{x:0,y:0,...Sv}};function Xre(e,n,t){const i=e[n],r=e[n-1],a=e[n+1];return i?ti.map(T=>typeof T=="object"&&"id"in T?T.id:T),[i]),y=o!=null,b=o?v.indexOf(o.id):-1,w=c?v.indexOf(c.id):-1,_=O.useRef(v),S=!Wre(v,_.current),C=w!==-1&&b===-1||S,E=Gre(a);Pa(()=>{S&&y&&h(v)},[S,v,y,h]),O.useEffect(()=>{_.current=v},[v]);const A=O.useMemo(()=>({activeIndex:b,containerId:d,disabled:E,disableTransforms:C,items:v,overIndex:w,useDragOverlay:p,sortedRects:Vre(v,f),strategy:r}),[b,d,E.draggable,E.droppable,C,v,w,f,p,r]);return Z.createElement(QB.Provider,{value:A},n)}const Zre=e=>{let{id:n,items:t,activeIndex:i,overIndex:r}=e;return Sg(t,i,r).indexOf(n)},Qre=e=>{let{containerId:n,isSorting:t,wasDragging:i,index:r,items:a,newIndex:o,previousItems:l,previousContainerId:f,transition:c}=e;return!c||!i||l!==a&&r===o?!1:t?!0:o!==r&&n===f},Jre={duration:200,easing:"ease"},JB="transform",eae=io.Transition.toString({property:JB,duration:0,easing:"linear"}),nae={roleDescription:"sortable"};function tae(e){let{disabled:n,index:t,node:i,rect:r}=e;const[a,o]=O.useState(null),l=O.useRef(t);return Pa(()=>{if(!n&&t!==l.current&&i.current){const f=r.current;if(f){const c=Mc(i.current,{ignoreTransform:!0}),h={x:f.left-c.left,y:f.top-c.top,scaleX:f.width/c.width,scaleY:f.height/c.height};(h.x||h.y)&&o(h)}}t!==l.current&&(l.current=t)},[n,t,i,r]),O.useEffect(()=>{a&&o(null)},[a]),a}function eF(e){let{animateLayoutChanges:n=Qre,attributes:t,disabled:i,data:r,getNewIndex:a=Zre,id:o,strategy:l,resizeObserverConfig:f,transition:c=Jre}=e;const{items:h,containerId:d,activeIndex:p,disabled:v,disableTransforms:y,sortedRects:b,overIndex:w,useDragOverlay:_,strategy:S}=O.useContext(QB),C=iae(i,v),E=h.indexOf(o),A=O.useMemo(()=>({sortable:{containerId:d,index:E,items:h},...r}),[d,r,E,h]),T=O.useMemo(()=>h.slice(h.indexOf(o)),[h,o]),{rect:j,node:N,isOver:q,setNodeRef:R}=jre({id:o,data:A,disabled:C.droppable,resizeObserverConfig:{updateMeasurementsFor:T,...f}}),{active:L,activatorEvent:B,activeNodeRect:G,attributes:H,setNodeRef:U,listeners:P,isDragging:z,over:F,setActivatorNodeRef:Y,transform:D}=Ere({id:o,data:A,attributes:{...nae,...t},disabled:C.draggable}),V=hie(R,U),W=!!L,$=W&&!y&&_v(p)&&_v(w),X=!_&&z,te=X&&$?D:null,le=$?te??(l??S)({rects:b,activeNodeRect:G,activeIndex:p,overIndex:w,index:E}):null,ye=_v(p)&&_v(w)?a({id:o,items:h,activeIndex:p,overIndex:w}):E,oe=L==null?void 0:L.id,ue=O.useRef({activeId:oe,items:h,newIndex:ye,containerId:d}),ke=h!==ue.current.items,ie=n({active:L,containerId:d,isDragging:z,isSorting:W,id:o,index:E,items:h,newIndex:ue.current.newIndex,previousItems:ue.current.items,previousContainerId:ue.current.containerId,transition:c,wasDragging:ue.current.activeId!=null}),Re=tae({disabled:!ie,index:E,node:N,rect:j});return O.useEffect(()=>{W&&ue.current.newIndex!==ye&&(ue.current.newIndex=ye),d!==ue.current.containerId&&(ue.current.containerId=d),h!==ue.current.items&&(ue.current.items=h)},[W,ye,d,h]),O.useEffect(()=>{if(oe===ue.current.activeId)return;if(oe!=null&&ue.current.activeId==null){ue.current.activeId=oe;return}const Ce=setTimeout(()=>{ue.current.activeId=oe},50);return()=>clearTimeout(Ce)},[oe]),{active:L,activeIndex:p,attributes:H,data:A,rect:j,index:E,newIndex:ye,items:h,isOver:q,isSorting:W,isDragging:z,listeners:P,node:N,overIndex:w,over:F,setNodeRef:V,setActivatorNodeRef:Y,setDroppableNodeRef:R,setDraggableNodeRef:U,transform:Re??le,transition:pe()};function pe(){if(Re||ke&&ue.current.newIndex===E)return eae;if(!(X&&!Dy(B)||!c)&&(W||ie))return io.Transition.toString({...c,property:JB})}}function iae(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 Cg(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 rae=[Zn.Down,Zn.Right,Zn.Up,Zn.Left],aae=(e,n)=>{let{context:{active:t,collisionRect:i,droppableRects:r,droppableContainers:a,over:o,scrollableAncestors:l}}=n;if(rae.includes(e.code)){if(e.preventDefault(),!t||!i)return;const f=[];a.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const p=r.get(d.id);if(p)switch(e.code){case Zn.Down:i.topp.top&&f.push(d);break;case Zn.Left:i.left>p.left&&f.push(d);break;case Zn.Right:i.left1&&(h=c[1].id),h!=null){const d=a.get(t.id),p=a.get(h),v=p?r.get(p.id):null,y=p==null?void 0:p.node.current;if(y&&v&&d&&p){const w=Ry(y).some((T,j)=>l[j]!==T),_=nF(d,p),S=oae(d,p),C=w||!_?{x:0,y:0}:{x:S?i.width-v.width:0,y:S?i.height-v.height:0},E={x:v.left,y:v.top};return C.x&&C.y?E:Ph(E,C)}}}};function nF(e,n){return!Cg(e)||!Cg(n)?!1:e.data.current.sortable.containerId===n.data.current.sortable.containerId}function oae(e,n){return!Cg(e)||!Cg(n)||!nF(e,n)?!1:e.data.current.sortable.index=U?H:""+Array(U+1-z.length).join(P)+H},E={s:C,z:function(H){var U=-H.utcOffset(),P=Math.abs(U),z=Math.floor(P/60),F=P%60;return(U<=0?"+":"-")+C(z,2,"0")+":"+C(F,2,"0")},m:function H(U,P){if(U.date()1)return H(D[0])}else{var V=U.name;T[V]=U,F=V}return!z&&F&&(A=F),F||!z&&A},R=function(H,U){if(N(H))return H.clone();var P=typeof U=="object"?U:{};return P.date=H,P.args=arguments,new B(P)},L=E;L.l=q,L.i=N,L.w=function(H,U){return R(H,{locale:U.$L,utc:U.$u,x:U.$x,$offset:U.$offset})};var B=(function(){function H(P){this.$L=q(P.locale,null,!0),this.parse(P),this.$x=this.$x||P.x||{},this[j]=!0}var U=H.prototype;return U.parse=function(P){this.$d=(function(z){var F=z.date,Y=z.utc;if(F===null)return new Date(NaN);if(L.u(F))return new Date;if(F instanceof Date)return new Date(F);if(typeof F=="string"&&!/Z$/i.test(F)){var D=F.match(w);if(D){var V=D[2]-1||0,W=(D[7]||"0").substring(0,3);return Y?new Date(Date.UTC(D[1],V,D[3]||1,D[4]||0,D[5]||0,D[6]||0,W)):new Date(D[1],V,D[3]||1,D[4]||0,D[5]||0,D[6]||0,W)}}return new Date(F)})(P),this.init()},U.init=function(){var P=this.$d;this.$y=P.getFullYear(),this.$M=P.getMonth(),this.$D=P.getDate(),this.$W=P.getDay(),this.$H=P.getHours(),this.$m=P.getMinutes(),this.$s=P.getSeconds(),this.$ms=P.getMilliseconds()},U.$utils=function(){return L},U.isValid=function(){return this.$d.toString()!==b},U.isSame=function(P,z){var F=R(P);return this.startOf(z)<=F&&F<=this.endOf(z)},U.isAfter=function(P,z){return R(P)ze(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 cae({formatter:e,...n}){return(e||fae)(n)}function dae({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 tF({controlsRef:e,direction:n,levelIndex:t,rowIndex:i,cellIndex:r,size:a}){var f,c,h;const o=dae({direction:n,size:a,rowIndex:i,cellIndex:r,levelIndex:t});if(!o)return;const l=(h=(c=(f=e.current)==null?void 0:f[o.levelIndex])==null?void 0:c[o.rowIndex])==null?void 0:h[o.cellIndex];l&&(l.disabled||l.getAttribute("data-hidden")||l.getAttribute("data-outside")?tF({controlsRef:e,direction:n,levelIndex:o.levelIndex,cellIndex:o.cellIndex,rowIndex:o.rowIndex,size:a}):l.focus())}function hae(e){switch(e){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function mae(e){var n;return(n=e.current)==null?void 0:n.map(t=>t.map(i=>i.length))}function $C({controlsRef:e,levelIndex:n,rowIndex:t,cellIndex:i,event:r}){const a=hae(r.key);a&&(r.preventDefault(),tF({controlsRef:e,direction:a,levelIndex:n,rowIndex:t,cellIndex:i,size:mae(e)}))}function Hi(e){return e==null||e===""?e:ze(e).format("YYYY-MM-DD")}function iF(e){return e==null||e===""?e:ze(e).format("YYYY-MM-DD HH:mm:ss")}function kS({minDate:e,maxDate:n}){const t=ze();return!e&&!n?Hi(t):e&&ze(t).isBefore(e)?Hi(e):n&&ze(t).isAfter(n)?Hi(n):Hi(t)}const pae={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},vae=O.createContext(pae);function sl(){const e=O.use(vae),n=O.useCallback(a=>a||e.locale,[e.locale]),t=O.useCallback(a=>typeof a=="number"?a:e.firstDayOfWeek,[e.firstDayOfWeek]),i=O.useCallback(a=>Array.isArray(a)?a:e.weekendDays,[e.weekendDays]),r=O.useCallback(a=>typeof a=="string"?a:e.labelSeparator,[e.labelSeparator]);return{...e,getLocale:n,getFirstDayOfWeek:t,getWeekendDays:i,getLabelSeparator:r}}function gae({value:e,type:n,withTime:t}){const i=t?iF:Hi;if(n==="range"&&Array.isArray(e)){const r=i(e[0]),a=i(e[1]);return r?a?`${r} – ${a}`:`${r} –`:""}return n==="multiple"&&Array.isArray(e)?e.filter(Boolean).join(", "):!Array.isArray(e)&&e?i(e):""}function rF({value:e,type:n,name:t,form:i,withTime:r=!1}){return k.jsx("input",{type:"hidden",value:gae({value:e,type:n,withTime:r}),name:t,form:i})}rF.displayName="@mantine/dates/HiddenDatesInput";var aF={day:"m_396ce5cb"};const oF=(e,{size:n})=>({day:{"--day-size":Mn(n,"day-size")}}),$y=Pe(e=>{const n=ge("Day",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,date:f,disabled:c,__staticSelector:h,weekend:d,outside:p,selected:v,renderDay:y,inRange:b,firstInRange:w,lastInRange:_,hidden:S,static:C,highlightToday:E,fullWidth:A,attributes:T,...j}=n;return k.jsx(fi,{...Ge({name:h||"Day",classes:aF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:T,vars:l,varsResolver:oF,rootSelector:"day"})("day",{style:S?{display:"none"}:void 0}),component:C?"div":"button",disabled:c,"data-today":ze(f).isSame(new Date,"day")||void 0,"data-hidden":S||void 0,"data-highlight-today":E||void 0,"data-disabled":c||void 0,"data-weekend":!c&&!p&&d||void 0,"data-outside":!c&&p||void 0,"data-selected":!c&&v||void 0,"data-in-range":b&&!c||void 0,"data-first-in-range":w&&!c||void 0,"data-last-in-range":_&&!c||void 0,"data-static":C||void 0,"data-full-width":A||void 0,unstyled:o,...j,children:(y==null?void 0:y(f))||ze(f).date()})});$y.classes=aF;$y.varsResolver=oF;$y.displayName="@mantine/dates/Day";function yae({locale:e,format:n="dd",firstDayOfWeek:t=1}){const i=ze().day(t),r=[];for(let a=0;a<7;a+=1)typeof n=="string"?r.push(ze(i).add(a,"days").locale(e).format(n)):r.push(n(ze(i).add(a,"days").format("YYYY-MM-DD")));return r}var sF={weekday:"m_18a3eca"};const lF=(e,{size:n})=>({weekdaysRow:{"--wr-fz":Zt(n),"--wr-spacing":Ft(n)}}),zy=Pe(e=>{const n=ge("WeekdaysRow",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,locale:f,firstDayOfWeek:c,weekdayFormat:h,cellComponent:d="th",__staticSelector:p,withWeekNumbers:v,attributes:y,...b}=n,w=Ge({name:p||"WeekdaysRow",classes:sF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:y,vars:l,varsResolver:lF,rootSelector:"weekdaysRow"}),_=sl(),S=yae({locale:_.getLocale(f),format:h,firstDayOfWeek:_.getFirstDayOfWeek(c)}).map((C,E)=>k.jsx(d,{...w("weekday"),children:C},E));return k.jsxs(we,{component:"tr",...w("weekdaysRow"),...b,children:[v&&k.jsx(d,{...w("weekday"),children:"#"}),S]})});zy.classes=sF;zy.varsResolver=lF;zy.displayName="@mantine/dates/WeekdaysRow";function bae(e,n=1){let t=ze(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 wae(e,n=1){let t=ze(e);for(;t.day()!==n;)t=t.subtract(1,"day");return t.format("YYYY-MM-DD")}function kae({month:e,firstDayOfWeek:n=1,consistentWeeks:t}){const i=ze(ze(e).subtract(ze(e).date()-1,"day").format("YYYY-M-D")),r=i.format("YYYY-MM-DD"),a=bae(i.add(+i.daysInMonth()-1,"day").format("YYYY-MM-DD"),n),o=[];let l=ze(wae(r,n));for(;ze(l).isBefore(a,"day");){const f=[];for(let c=0;c<7;c+=1)f.push(l.format("YYYY-MM-DD")),l=l.add(1,"day");o.push(f)}if(t&&o.length<6){const f=o[o.length-1],c=f[f.length-1];let h=ze(c).add(1,"day");for(;o.length<6;){const d=[];for(let p=0;p<7;p+=1)d.push(h.format("YYYY-MM-DD")),h=h.add(1,"day");o.push(d)}}return o}function zC(e,n){return ze(e).format("YYYY-MM")===ze(n).format("YYYY-MM")}function uF(e,n){return n?ze(e).isAfter(ze(n).subtract(1,"day"),"day"):!0}function fF(e,n){return n?ze(e).isBefore(ze(n).add(1,"day"),"day"):!0}function _ae({dates:e,minDate:n,maxDate:t,getDayProps:i,excludeDate:r,hideOutsideDates:a,month:o}){const l=e.flat().filter(h=>{var d;return fF(h,t)&&uF(h,n)&&!(r!=null&&r(h))&&!((d=i==null?void 0:i(h))!=null&&d.disabled)&&(!a||zC(h,o))}),f=l.find(h=>{var d;return(d=i==null?void 0:i(h))==null?void 0:d.selected});if(f)return f;const c=l.find(h=>ze().isSame(h,"date"));return c||l[0]}var ig={exports:{}},xae=ig.exports,$M;function Sae(){return $M||($M=1,(function(e,n){(function(t,i){e.exports=i()})(xae,(function(){var t="day";return function(i,r,a){var o=function(c){return c.add(4-c.isoWeekday(),t)},l=r.prototype;l.isoWeekYear=function(){return o(this).year()},l.isoWeek=function(c){if(!this.$utils().u(c))return this.add(7*(c-this.isoWeek()),t);var h,d,p,v,y=o(this),b=(h=this.isoWeekYear(),d=this.$u,p=(d?a.utc:a)().year(h).startOf("year"),v=4-p.isoWeekday(),p.isoWeekday()>4&&(v+=7),p.add(v,t));return y.diff(b,"week")+1},l.isoWeekday=function(c){return this.$utils().u(c)?this.day()||7:this.day(this.day()%7?c:c-7)};var f=l.startOf;l.startOf=function(c,h){var d=this.$utils(),p=!!d.u(h)||h;return d.p(c)==="isoweek"?p?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):f.bind(this)(c,h)}}}))})(ig)),ig.exports}var Cae=Sae();const Aae=ot(Cae);ze.extend(Aae);function Oae(e){return ze(e.find(n=>ze(n).day()===1)).isoWeek()}var cF={month:"m_cc9820d3",monthCell:"m_8f457cd5",weekNumber:"m_6cff9dea"};const Eae={withCellSpacing:!0},dF=(e,{size:n})=>({weekNumber:{"--wn-fz":Zt(n),"--wn-size":Mn(n,"wn-size")}}),qm=Pe(e=>{const n=ge("Month",Eae,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,locale:c,firstDayOfWeek:h,weekdayFormat:d,month:p,weekendDays:v,getDayProps:y,excludeDate:b,minDate:w,maxDate:_,renderDay:S,hideOutsideDates:C,hideWeekdays:E,getDayAriaLabel:A,static:T,__getDayRef:j,__onDayKeyDown:N,__onDayClick:q,__onDayMouseEnter:R,__preventFocus:L,__stopPropagation:B,withCellSpacing:G,size:H,highlightToday:U,withWeekNumbers:P,fullWidth:z,attributes:F,...Y}=n,D=Ge({name:f||"Month",classes:cF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:F,vars:l,varsResolver:dF,rootSelector:"month"}),V=sl(),W=kae({month:p,firstDayOfWeek:V.getFirstDayOfWeek(h),consistentWeeks:V.consistentWeeks}),$=_ae({dates:W,minDate:Hi(w),maxDate:Hi(_),getDayProps:y,excludeDate:b,hideOutsideDates:C,month:p}),{resolvedClassNames:X,resolvedStyles:te}=Ni({classNames:t,styles:a,props:n}),ae=W.map((le,ye)=>{const oe=le.map((ue,ke)=>{const ie=!zC(ue,p),Re=(A==null?void 0:A(ue))||ze(ue).locale(c||V.locale).format("D MMMM YYYY"),pe=y==null?void 0:y(ue),Ce=ze(ue).isSame($,"date");return k.jsx("td",{...D("monthCell"),"data-with-spacing":G||void 0,children:k.jsx($y,{__staticSelector:f||"Month",classNames:X,styles:te,attributes:F,unstyled:o,"data-mantine-stop-propagation":B||void 0,highlightToday:U,renderDay:S,date:ue,size:H,weekend:V.getWeekendDays(v).includes(ze(ue).get("day")),outside:ie,hidden:C?ie:!1,"aria-label":Re,static:T,fullWidth:z,disabled:(b==null?void 0:b(ue))||!fF(ue,Hi(_))||!uF(ue,Hi(w)),ref:De=>{De&&(j==null||j(ye,ke,De))},...pe,onKeyDown:De=>{var be;(be=pe==null?void 0:pe.onKeyDown)==null||be.call(pe,De),N==null||N(De,{rowIndex:ye,cellIndex:ke,date:ue})},onMouseEnter:De=>{var be;(be=pe==null?void 0:pe.onMouseEnter)==null||be.call(pe,De),R==null||R(De,ue)},onClick:De=>{var be;(be=pe==null?void 0:pe.onClick)==null||be.call(pe,De),q==null||q(De,ue)},onMouseDown:De=>{var be;(be=pe==null?void 0:pe.onMouseDown)==null||be.call(pe,De),L&&De.preventDefault()},tabIndex:L||!Ce?-1:0})},ue.toString())});return k.jsxs("tr",{...D("monthRow"),children:[P&&k.jsx("td",{...D("weekNumber"),children:Oae(le)}),oe]},ye)});return k.jsxs(we,{component:"table",...D("month"),size:H,"data-full-width":z||void 0,...Y,children:[!E&&k.jsx("thead",{...D("monthThead"),children:k.jsx(zy,{__staticSelector:f||"Month",locale:c,firstDayOfWeek:h,weekdayFormat:d,withWeekNumbers:P,size:H,classNames:X,styles:te,unstyled:o,attributes:F})}),k.jsx("tbody",{...D("monthTbody"),children:ae})]})});qm.classes=cF;qm.varsResolver=dF;qm.displayName="@mantine/dates/Month";var hF={pickerControl:"m_dc6a3c71"};const mF=(e,{size:n})=>({pickerControl:{"--dpc-fz":Zt(n),"--dpc-size":Mn(n,"dpc-size")}}),Hm=Pe(e=>{const n=ge("PickerControl",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,firstInRange:f,lastInRange:c,inRange:h,__staticSelector:d,selected:p,disabled:v,fullWidth:y,attributes:b,...w}=n;return k.jsx(fi,{...Ge({name:d||"PickerControl",classes:hF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,vars:l,varsResolver:mF,rootSelector:"pickerControl"})("pickerControl"),unstyled:o,"data-picker-control":!0,"data-full-width":y||void 0,"data-selected":p&&!v||void 0,"data-disabled":v||void 0,"data-in-range":h&&!v&&!p||void 0,"data-first-in-range":f&&!v||void 0,"data-last-in-range":c&&!v||void 0,disabled:v,...w})});Hm.classes=hF;Hm.varsResolver=mF;Hm.displayName="@mantine/dates/PickerControl";function pF({year:e,minDate:n,maxDate:t}){return!n&&!t?!1:!!(n&&ze(e).isBefore(n,"year")||t&&ze(e).isAfter(t,"year"))}function Tae({years:e,minDate:n,maxDate:t,getYearControlProps:i}){const r=e.flat().filter(l=>{var f;return!pF({year:l,minDate:n,maxDate:t})&&!((f=i==null?void 0:i(l))!=null&&f.disabled)}),a=r.find(l=>{var f;return(f=i==null?void 0:i(l))==null?void 0:f.selected});if(a)return a;const o=r.find(l=>ze().isSame(l,"year"));return o||r[0]}function vF(e){const n=ze(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=ge("YearsList",Mae,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,decade:f,yearsListFormat:c,locale:h,minDate:d,maxDate:p,getYearControlProps:v,__staticSelector:y,__getControlRef:b,__onControlKeyDown:w,__onControlClick:_,__onControlMouseEnter:S,__preventFocus:C,__stopPropagation:E,withCellSpacing:A,fullWidth:T,size:j,attributes:N,...q}=n,R=Ge({name:y||"YearsList",classes:gF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:N,vars:l,rootSelector:"yearsList"}),L=sl(),B=vF(f),G=Tae({years:B,minDate:d,maxDate:p,getYearControlProps:v}),H=B.map((U,P)=>{const z=U.map((F,Y)=>{const D=v==null?void 0:v(F),V=ze(F).isSame(G,"year");return k.jsx("td",{...R("yearsListCell"),"data-with-spacing":A||void 0,children:k.jsx(Hm,{...R("yearsListControl"),size:j,unstyled:o,fullWidth:T,"data-mantine-stop-propagation":E||void 0,disabled:pF({year:F,minDate:d,maxDate:p}),ref:W=>{W&&(b==null||b(P,Y,W))},...D,onKeyDown:W=>{var $;($=D==null?void 0:D.onKeyDown)==null||$.call(D,W),w==null||w(W,{rowIndex:P,cellIndex:Y,date:F})},onClick:W=>{var $;($=D==null?void 0:D.onClick)==null||$.call(D,W),_==null||_(W,F)},onMouseEnter:W=>{var $;($=D==null?void 0:D.onMouseEnter)==null||$.call(D,W),S==null||S(W,F)},onMouseDown:W=>{var $;($=D==null?void 0:D.onMouseDown)==null||$.call(D,W),C&&W.preventDefault()},tabIndex:C||!V?-1:0,children:(D==null?void 0:D.children)??ze(F).locale(L.getLocale(h)).format(c)})},Y)});return k.jsx("tr",{...R("yearsListRow"),children:z},P)});return k.jsx(we,{component:"table",size:j,...R("yearsList"),"data-full-width":T||void 0,...q,children:k.jsx("tbody",{children:H})})});Ly.classes=gF;Ly.displayName="@mantine/dates/YearsList";function yF({month:e,minDate:n,maxDate:t}){return!n&&!t?!1:!!(n&&ze(e).isBefore(n,"month")||t&&ze(e).isAfter(t,"month"))}function jae({months:e,minDate:n,maxDate:t,getMonthControlProps:i}){const r=e.flat().filter(l=>{var f;return!yF({month:l,minDate:n,maxDate:t})&&!((f=i==null?void 0:i(l))!=null&&f.disabled)}),a=r.find(l=>{var f;return(f=i==null?void 0:i(l))==null?void 0:f.selected});if(a)return a;const o=r.find(l=>ze().isSame(l,"month"));return o||r[0]}function Dae(e){const n=ze(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(ze(n).add(i,"months").format("YYYY-MM-DD")),i+=1;return t}var bF={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const Rae={monthsListFormat:"MMM",withCellSpacing:!0},Iy=Pe(e=>{const n=ge("MonthsList",Rae,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,year:c,monthsListFormat:h,locale:d,minDate:p,maxDate:v,getMonthControlProps:y,__getControlRef:b,__onControlKeyDown:w,__onControlClick:_,__onControlMouseEnter:S,__preventFocus:C,__stopPropagation:E,withCellSpacing:A,fullWidth:T,size:j,attributes:N,...q}=n,R=Ge({name:f||"MonthsList",classes:bF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:N,vars:l,rootSelector:"monthsList"}),L=sl(),B=Dae(c),G=jae({months:B,minDate:Hi(p),maxDate:Hi(v),getMonthControlProps:y}),H=B.map((U,P)=>{const z=U.map((F,Y)=>{const D=y==null?void 0:y(F),V=ze(F).isSame(G,"month");return k.jsx("td",{...R("monthsListCell"),"data-with-spacing":A||void 0,children:k.jsx(Hm,{...R("monthsListControl"),size:j,unstyled:o,fullWidth:T,__staticSelector:f||"MonthsList","data-mantine-stop-propagation":E||void 0,disabled:yF({month:F,minDate:Hi(p),maxDate:Hi(v)}),ref:W=>{W&&(b==null||b(P,Y,W))},...D,onKeyDown:W=>{var $;($=D==null?void 0:D.onKeyDown)==null||$.call(D,W),w==null||w(W,{rowIndex:P,cellIndex:Y,date:F})},onClick:W=>{var $;($=D==null?void 0:D.onClick)==null||$.call(D,W),_==null||_(W,F)},onMouseEnter:W=>{var $;($=D==null?void 0:D.onMouseEnter)==null||$.call(D,W),S==null||S(W,F)},onMouseDown:W=>{var $;($=D==null?void 0:D.onMouseDown)==null||$.call(D,W),C&&W.preventDefault()},tabIndex:C||!V?-1:0,children:(D==null?void 0:D.children)??ze(F).locale(L.getLocale(d)).format(h)})},Y)});return k.jsx("tr",{...R("monthsListRow"),children:z},P)});return k.jsx(we,{component:"table",size:j,...R("monthsList"),"data-full-width":T||void 0,...q,children:k.jsx("tbody",{children:H})})});Iy.classes=bF;Iy.displayName="@mantine/dates/MonthsList";var wF={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const Pae={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:["previous","level","next"]},kF=(e,{size:n})=>({calendarHeader:{"--dch-control-size":Mn(n,"dch-control-size"),"--dch-fz":Zt(n)}}),ss=Pe(e=>{const n=ge("CalendarHeader",Pae,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,nextIcon:f,previousIcon:c,nextLabel:h,previousLabel:d,onNext:p,onPrevious:v,onLevelClick:y,label:b,nextDisabled:w,previousDisabled:_,hasNextLevel:S,levelControlAriaLabel:C,withNext:E,withPrevious:A,headerControlsOrder:T,fullWidth:j,__staticSelector:N,__preventFocus:q,__stopPropagation:R,attributes:L,...B}=n,G=Ge({name:N||"CalendarHeader",classes:wF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:L,vars:l,varsResolver:kF,rootSelector:"calendarHeader"}),H=q?Y=>Y.preventDefault():void 0,U=A&&O.createElement(fi,{...G("calendarHeaderControl"),key:"previous","data-direction":"previous","aria-label":d,onClick:v,unstyled:o,onMouseDown:H,disabled:_,"data-disabled":_||void 0,tabIndex:q||_?-1:0,"data-mantine-stop-propagation":R||void 0},c||k.jsx(gg,{...G("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})),P=O.createElement(fi,{component:S?"button":"div",...G("calendarHeaderLevel"),key:"level",onClick:S?y:void 0,unstyled:o,onMouseDown:S?H:void 0,disabled:!S,"data-static":!S||void 0,"aria-label":C,tabIndex:q||!S?-1:0,"data-mantine-stop-propagation":R||void 0},b),z=E&&O.createElement(fi,{...G("calendarHeaderControl"),key:"next","data-direction":"next","aria-label":h,onClick:p,unstyled:o,onMouseDown:H,disabled:w,"data-disabled":w||void 0,tabIndex:q||w?-1:0,"data-mantine-stop-propagation":R||void 0},f||k.jsx(gg,{...G("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})),F=T.map(Y=>Y==="previous"?U:Y==="level"?P:Y==="next"?z:null);return k.jsx(we,{...G("calendarHeader"),"data-full-width":j||void 0,...B,children:F})});ss.classes=wF;ss.varsResolver=kF;ss.displayName="@mantine/dates/CalendarHeader";function Nae(e){const n=vF(e);return[n[0][0],n[3][0]]}const $ae={decadeLabelFormat:"YYYY"},By=Pe(e=>{const{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__getControlRef:l,__onControlKeyDown:f,__onControlClick:c,__onControlMouseEnter:h,withCellSpacing:d,__preventFocus:p,nextIcon:v,previousIcon:y,nextLabel:b,previousLabel:w,onNext:_,onPrevious:S,nextDisabled:C,previousDisabled:E,levelControlAriaLabel:A,withNext:T,withPrevious:j,headerControlsOrder:N,decadeLabelFormat:q,classNames:R,styles:L,unstyled:B,__staticSelector:G,__stopPropagation:H,size:U,fullWidth:P,attributes:z,...F}=ge("DecadeLevel",$ae,e),Y=sl(),[D,V]=Nae(n),W={__staticSelector:G||"DecadeLevel",classNames:R,styles:L,unstyled:B,size:U,attributes:z},$=typeof C=="boolean"?C:r?!ze(V).endOf("year").isBefore(r):!1,X=typeof E=="boolean"?E:i?!ze(D).startOf("year").isAfter(i):!1,te=(ae,le)=>ze(ae).locale(t||Y.locale).format(le);return k.jsxs(we,{"data-decade-level":!0,size:U,...F,children:[k.jsx(ss,{label:typeof q=="function"?q(D,V):`${te(D,q)} – ${te(V,q)}`,__preventFocus:p,__stopPropagation:H,nextIcon:v,previousIcon:y,nextLabel:b,previousLabel:w,onNext:_,onPrevious:S,nextDisabled:$,previousDisabled:X,hasNextLevel:!1,levelControlAriaLabel:A,withNext:T,withPrevious:j,headerControlsOrder:N,fullWidth:P,...W}),k.jsx(Ly,{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__getControlRef:l,__onControlKeyDown:f,__onControlClick:c,__onControlMouseEnter:h,__preventFocus:p,__stopPropagation:H,withCellSpacing:d,fullWidth:P,...W})]})});By.classes={...Ly.classes,...ss.classes};By.displayName="@mantine/dates/DecadeLevel";const zae={yearLabelFormat:"YYYY"},Fy=Pe(e=>{const{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__getControlRef:l,__onControlKeyDown:f,__onControlClick:c,__onControlMouseEnter:h,withCellSpacing:d,__preventFocus:p,nextIcon:v,previousIcon:y,nextLabel:b,previousLabel:w,onNext:_,onPrevious:S,onLevelClick:C,nextDisabled:E,previousDisabled:A,hasNextLevel:T,levelControlAriaLabel:j,withNext:N,withPrevious:q,headerControlsOrder:R,yearLabelFormat:L,__staticSelector:B,__stopPropagation:G,size:H,classNames:U,styles:P,unstyled:z,fullWidth:F,attributes:Y,...D}=ge("YearLevel",zae,e),V=sl(),W={__staticSelector:B||"YearLevel",classNames:U,styles:P,unstyled:z,size:H,attributes:Y},$=typeof E=="boolean"?E:r?!ze(n).endOf("year").isBefore(r):!1,X=typeof A=="boolean"?A:i?!ze(n).startOf("year").isAfter(i):!1;return k.jsxs(we,{"data-year-level":!0,size:H,...D,children:[k.jsx(ss,{label:typeof L=="function"?L(n):ze(n).locale(t||V.locale).format(L),__preventFocus:p,__stopPropagation:G,nextIcon:v,previousIcon:y,nextLabel:b,previousLabel:w,onNext:_,onPrevious:S,onLevelClick:C,nextDisabled:$,previousDisabled:X,hasNextLevel:T,levelControlAriaLabel:j,withNext:N,withPrevious:q,headerControlsOrder:R,fullWidth:F,...W}),k.jsx(Iy,{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__getControlRef:l,__onControlKeyDown:f,__onControlClick:c,__onControlMouseEnter:h,__preventFocus:p,__stopPropagation:G,withCellSpacing:d,fullWidth:F,...W})]})});Fy.classes={...ss.classes,...Iy.classes};Fy.displayName="@mantine/dates/YearLevel";const Lae={monthLabelFormat:"MMMM YYYY"},qy=Pe(e=>{const{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:f,maxDate:c,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__getDayRef:y,__onDayKeyDown:b,__onDayClick:w,__onDayMouseEnter:_,withCellSpacing:S,highlightToday:C,withWeekNumbers:E,__preventFocus:A,__stopPropagation:T,nextIcon:j,previousIcon:N,nextLabel:q,previousLabel:R,onNext:L,onPrevious:B,onLevelClick:G,nextDisabled:H,previousDisabled:U,hasNextLevel:P,levelControlAriaLabel:z,withNext:F,withPrevious:Y,headerControlsOrder:D,monthLabelFormat:V,classNames:W,styles:$,unstyled:X,__staticSelector:te,size:ae,static:le,fullWidth:ye,attributes:oe,...ue}=ge("MonthLevel",Lae,e),ke=sl(),ie={__staticSelector:te||"MonthLevel",classNames:W,styles:$,unstyled:X,size:ae,attributes:oe},Re=typeof H=="boolean"?H:c?!ze(n).endOf("month").isBefore(c):!1,pe=typeof U=="boolean"?U:f?!ze(n).startOf("month").isAfter(f):!1;return k.jsxs(we,{"data-month-level":!0,size:ae,...ue,children:[k.jsx(ss,{label:typeof V=="function"?V(n):ze(n).locale(t||ke.locale).format(V),__preventFocus:A,__stopPropagation:T,nextIcon:j,previousIcon:N,nextLabel:q,previousLabel:R,onNext:L,onPrevious:B,onLevelClick:G,nextDisabled:Re,previousDisabled:pe,hasNextLevel:P,levelControlAriaLabel:z,withNext:F,withPrevious:Y,headerControlsOrder:D,fullWidth:ye,...ie}),k.jsx(qm,{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:f,maxDate:c,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__getDayRef:y,__onDayKeyDown:b,__onDayClick:w,__onDayMouseEnter:_,__preventFocus:A,__stopPropagation:T,static:le,withCellSpacing:S,highlightToday:C,withWeekNumbers:E,fullWidth:ye,...ie})]})});qy.classes={...qm.classes,...ss.classes};qy.displayName="@mantine/dates/MonthLevel";var _F={levelsGroup:"m_30b26e33"};const ll=Pe(e=>{const n=ge("LevelsGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,fullWidth:c,attributes:h,...d}=n;return k.jsx(we,{...Ge({name:f||"LevelsGroup",classes:_F,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l,rootSelector:"levelsGroup"})("levelsGroup"),"data-full-width":c||void 0,...d})});ll.classes=_F;ll.displayName="@mantine/dates/LevelsGroup";const Iae={numberOfColumns:1},Hy=Pe(e=>{const{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__onControlClick:l,__onControlMouseEnter:f,withCellSpacing:c,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:y,onNext:b,onPrevious:w,nextDisabled:_,previousDisabled:S,headerControlsOrder:C,classNames:E,styles:A,unstyled:T,__staticSelector:j,__stopPropagation:N,numberOfColumns:q,levelControlAriaLabel:R,decadeLabelFormat:L,size:B,fullWidth:G,vars:H,attributes:U,...P}=ge("DecadeLevelGroup",Iae,e),z=O.useRef([]),F=Array(q).fill(0).map((Y,D)=>{const V=ze(n).add(D*10,"years").format("YYYY-MM-DD");return k.jsx(By,{size:B,yearsListFormat:a,decade:V,withNext:D===q-1,withPrevious:D===0,decadeLabelFormat:L,__onControlClick:l,__onControlMouseEnter:f,__onControlKeyDown:(W,$)=>$C({levelIndex:D,rowIndex:$.rowIndex,cellIndex:$.cellIndex,event:W,controlsRef:z}),__getControlRef:(W,$,X)=>{Array.isArray(z.current[D])||(z.current[D]=[]),Array.isArray(z.current[D][W])||(z.current[D][W]=[]),z.current[D][W][$]=X},levelControlAriaLabel:typeof R=="function"?R(V):R,locale:t,minDate:i,maxDate:r,__preventFocus:h,__stopPropagation:N,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:y,onNext:b,onPrevious:w,nextDisabled:_,previousDisabled:S,getYearControlProps:o,__staticSelector:j||"DecadeLevelGroup",classNames:E,styles:A,unstyled:T,withCellSpacing:c,headerControlsOrder:C,fullWidth:G,attributes:U},D)});return k.jsx(ll,{classNames:E,styles:A,__staticSelector:j||"DecadeLevelGroup",size:B,unstyled:T,fullWidth:G,attributes:U,...P,children:F})});Hy.classes={...ll.classes,...By.classes};Hy.displayName="@mantine/dates/DecadeLevelGroup";const Bae={numberOfColumns:1},Uy=Pe(e=>{const{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__onControlClick:l,__onControlMouseEnter:f,withCellSpacing:c,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:y,onNext:b,onPrevious:w,onLevelClick:_,nextDisabled:S,previousDisabled:C,hasNextLevel:E,headerControlsOrder:A,classNames:T,styles:j,unstyled:N,__staticSelector:q,__stopPropagation:R,numberOfColumns:L,levelControlAriaLabel:B,yearLabelFormat:G,size:H,fullWidth:U,vars:P,attributes:z,...F}=ge("YearLevelGroup",Bae,e),Y=O.useRef([]),D=Array(L).fill(0).map((V,W)=>{const $=ze(n).add(W,"years").format("YYYY-MM-DD");return k.jsx(Fy,{size:H,monthsListFormat:a,year:$,withNext:W===L-1,withPrevious:W===0,yearLabelFormat:G,__stopPropagation:R,__onControlClick:l,__onControlMouseEnter:f,__onControlKeyDown:(X,te)=>$C({levelIndex:W,rowIndex:te.rowIndex,cellIndex:te.cellIndex,event:X,controlsRef:Y}),__getControlRef:(X,te,ae)=>{Array.isArray(Y.current[W])||(Y.current[W]=[]),Array.isArray(Y.current[W][X])||(Y.current[W][X]=[]),Y.current[W][X][te]=ae},levelControlAriaLabel:typeof B=="function"?B($):B,locale:t,minDate:i,maxDate:r,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:y,onNext:b,onPrevious:w,onLevelClick:_,nextDisabled:S,previousDisabled:C,hasNextLevel:E,getMonthControlProps:o,classNames:T,styles:j,unstyled:N,__staticSelector:q||"YearLevelGroup",withCellSpacing:c,headerControlsOrder:A,fullWidth:U,attributes:z},W)});return k.jsx(ll,{classNames:T,styles:j,__staticSelector:q||"YearLevelGroup",size:H,unstyled:N,fullWidth:U,attributes:z,...F,children:D})});Uy.classes={...Fy.classes,...ll.classes};Uy.displayName="@mantine/dates/YearLevelGroup";const Fae={numberOfColumns:1},Vy=Pe(e=>{const{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:f,maxDate:c,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__onDayClick:y,__onDayMouseEnter:b,withCellSpacing:w,highlightToday:_,withWeekNumbers:S,__preventFocus:C,nextIcon:E,previousIcon:A,nextLabel:T,previousLabel:j,onNext:N,onPrevious:q,onLevelClick:R,nextDisabled:L,previousDisabled:B,hasNextLevel:G,headerControlsOrder:H,classNames:U,styles:P,unstyled:z,numberOfColumns:F,levelControlAriaLabel:Y,monthLabelFormat:D,__staticSelector:V,__stopPropagation:W,size:$,static:X,fullWidth:te,vars:ae,attributes:le,...ye}=ge("MonthLevelGroup",Fae,e),oe=O.useRef([]),ue=Array(F).fill(0).map((ke,ie)=>{const Re=ze(n).add(ie,"months").format("YYYY-MM-DD");return k.jsx(qy,{month:Re,withNext:ie===F-1,withPrevious:ie===0,monthLabelFormat:D,__stopPropagation:W,__onDayClick:y,__onDayMouseEnter:b,__onDayKeyDown:(pe,Ce)=>$C({levelIndex:ie,rowIndex:Ce.rowIndex,cellIndex:Ce.cellIndex,event:pe,controlsRef:oe}),__getDayRef:(pe,Ce,De)=>{Array.isArray(oe.current[ie])||(oe.current[ie]=[]),Array.isArray(oe.current[ie][pe])||(oe.current[ie][pe]=[]),oe.current[ie][pe][Ce]=De},levelControlAriaLabel:typeof Y=="function"?Y(Re):Y,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:f,maxDate:c,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__preventFocus:C,nextIcon:E,previousIcon:A,nextLabel:T,previousLabel:j,onNext:N,onPrevious:q,onLevelClick:R,nextDisabled:L,previousDisabled:B,hasNextLevel:G,classNames:U,styles:P,unstyled:z,__staticSelector:V||"MonthLevelGroup",size:$,static:X,withCellSpacing:w,highlightToday:_,withWeekNumbers:S,headerControlsOrder:H,fullWidth:te,attributes:le},ie)});return k.jsx(ll,{classNames:U,styles:P,__staticSelector:V||"MonthLevelGroup",size:$,fullWidth:te,attributes:le,...ye,children:ue})});Vy.classes={...ll.classes,...qy.classes};Vy.displayName="@mantine/dates/MonthLevelGroup";var xF={input:"m_6fa5e2aa"};const jc=Pe(e=>{const{inputProps:n,wrapperProps:t,placeholder:i,classNames:r,styles:a,unstyled:o,popoverProps:l,modalProps:f,dropdownType:c,children:h,formattedValue:d,dropdownHandlers:p,dropdownOpened:v,onClick:y,clearable:b,clearSectionMode:w,onClear:_,clearButtonProps:S,rightSection:C,shouldClear:E,readOnly:A,disabled:T,value:j,name:N,form:q,type:R,onDropdownClose:L,withTime:B,...G}=$L("PickerInputBase",{size:"sm"},e),H=k.jsx(Nt.ClearButton,{onClick:_,unstyled:o,...S}),U=()=>{R==="range"&&Array.isArray(j)&&j[0]&&!j[1]&&_(),p.close()};return k.jsxs(k.Fragment,{children:[c==="modal"&&!A&&k.jsx(Ir,{opened:v,onClose:U,withCloseButton:!1,size:"auto","data-dates-modal":!0,unstyled:o,...f,children:h}),k.jsx(Nt.Wrapper,{...t,children:k.jsxs(Tn,{position:"bottom-start",opened:v,trapFocus:!0,returnFocus:!1,unstyled:o,onClose:L,...l,disabled:(l==null?void 0:l.disabled)||c==="modal"||A,onChange:P=>{var z;P||((z=l==null?void 0:l.onClose)==null||z.call(l),U())},children:[k.jsx(Tn.Target,{children:k.jsx(Nt,{"data-dates-input":!0,"data-read-only":A||void 0,disabled:T,component:"button",type:"button",multiline:!0,onClick:P=>{y==null||y(P),p.toggle()},__clearSection:H,__clearable:b&&E&&!A&&!T,__clearSectionMode:w,rightSection:C,...n,classNames:{...r,input:cn(xF.input,r==null?void 0:r.input)},...G,children:d||k.jsx(Nt.Placeholder,{error:n.error,unstyled:o,classNames:r,styles:a,__staticSelector:n.__staticSelector,children:i})})}),k.jsx(Tn.Dropdown,{"data-dates-dropdown":!0,children:h})]})}),k.jsx(rF,{value:j,name:N,form:q,type:R,withTime:B})]})});jc.classes=xF;jc.displayName="@mantine/dates/PickerInputBase";const zM=e=>e==="range"?[null,null]:e==="multiple"?[]:null,LM=(e,n)=>{const t=n?iF:Hi;return Array.isArray(e)?e.map(t):t(e)};function LC({type:e,value:n,defaultValue:t,onChange:i,withTime:r=!1}){const a=O.useRef(e),[o,l,f]=xi({value:LM(n,r),defaultValue:LM(t,r),finalValue:zM(e),onChange:i});let c=o;return a.current!==e&&(a.current=e,n===void 0&&(c=t!==void 0?t:zM(e),l(c))),[c,l,f]}function Ak(e,n){return e?e==="month"?0:e==="year"?1:2:n||0}function qae(e){return e===0?"month":e===1?"year":"decade"}function zd(e,n,t){return qae(Fo(Ak(e,0),Ak(n,0),Ak(t,2)))}const Hae={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},Dc=Pe(e=>{const n=ge("Calendar",Hae,e),{vars:t,maxLevel:i,minLevel:r,defaultLevel:a,level:o,onLevelChange:l,date:f,defaultDate:c,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:v,nextLabel:y,previousLabel:b,onYearSelect:w,onMonthSelect:_,onYearMouseEnter:S,onMonthMouseEnter:C,headerControlsOrder:E,__updateDateOnYearSelect:A,__updateDateOnMonthSelect:T,__setDateRef:j,__setLevelRef:N,firstDayOfWeek:q,weekdayFormat:R,weekendDays:L,getDayProps:B,excludeDate:G,renderDay:H,hideOutsideDates:U,hideWeekdays:P,getDayAriaLabel:z,monthLabelFormat:F,nextIcon:Y,previousIcon:D,__onDayClick:V,__onDayMouseEnter:W,withCellSpacing:$,highlightToday:X,withWeekNumbers:te,monthsListFormat:ae,getMonthControlProps:le,yearLabelFormat:ye,yearsListFormat:oe,getYearControlProps:ue,decadeLabelFormat:ke,classNames:ie,styles:Re,unstyled:pe,minDate:Ce,maxDate:De,locale:be,__staticSelector:_e,size:Me,__preventFocus:Be,__stopPropagation:Ve,onNextDecade:He,onPreviousDecade:We,onNextYear:Ye,onPreviousYear:rn,onNextMonth:Q,onPreviousMonth:me,static:xe,enableKeyboardNavigation:Xe,fullWidth:ne,attributes:Le,ref:en,...hn}=n,{resolvedClassNames:fn,resolvedStyles:Ze}=Ni({classNames:ie,styles:Re,props:n}),[Ke,An]=xi({value:o?zd(o,r,i):void 0,defaultValue:a?zd(a,r,i):void 0,finalValue:zd(void 0,r,i),onChange:l}),[on,ht]=LC({type:"default",value:Hi(f),defaultValue:Hi(c),onChange:h});O.useImperativeHandle(j,()=>Qe=>{ht(Qe)}),O.useImperativeHandle(N,()=>Qe=>{An(Qe)});const mt={__staticSelector:_e||"Calendar",styles:Ze,classNames:fn,unstyled:pe,size:Me,attributes:Le},zn=p||d||1,yn=O.useRef(null);if(yn.current===null){const Qe=new Date;yn.current=Ce&&ze(Qe).isAfter(Ce)?Ce:ze(Qe).format("YYYY-MM-DD")}const kn=on||yn.current,tt=()=>{const Qe=ze(kn).add(zn,"month").format("YYYY-MM-DD");Q==null||Q(Qe),ht(Qe)},At=()=>{const Qe=ze(kn).subtract(zn,"month").format("YYYY-MM-DD");me==null||me(Qe),ht(Qe)},$e=()=>{const Qe=ze(kn).add(zn,"year").format("YYYY-MM-DD");Ye==null||Ye(Qe),ht(Qe)},Fe=()=>{const Qe=ze(kn).subtract(zn,"year").format("YYYY-MM-DD");rn==null||rn(Qe),ht(Qe)},jn=()=>{const Qe=ze(kn).add(10*zn,"year").format("YYYY-MM-DD");He==null||He(Qe),ht(Qe)},Jn=()=>{const Qe=ze(kn).subtract(10*zn,"year").format("YYYY-MM-DD");We==null||We(Qe),ht(Qe)},On=O.useRef(null);return O.useEffect(()=>{if(!Xe||xe)return;const Qe=Je=>{var In;if(!((In=On.current)!=null&&In.contains(document.activeElement)))return;const nn=Je.ctrlKey||Je.metaKey,Ln=Je.shiftKey;switch(Je.key){case"ArrowUp":nn&&Ln?(Je.preventDefault(),Jn()):nn&&(Je.preventDefault(),Fe());break;case"ArrowDown":nn&&Ln?(Je.preventDefault(),jn()):nn&&(Je.preventDefault(),$e());break;case"y":case"Y":Ke==="month"&&(Je.preventDefault(),An("year"));break}};return document.addEventListener("keydown",Qe),()=>{document.removeEventListener("keydown",Qe)}},[Xe,xe,Ke,$e,Fe,jn,Jn]),k.jsxs(we,{ref:zt(On,en),size:Me,"data-calendar":!0,"data-full-width":ne||void 0,...hn,children:[Ke==="month"&&k.jsx(Vy,{month:kn,minDate:Ce,maxDate:De,firstDayOfWeek:q,weekdayFormat:R,weekendDays:L,getDayProps:B,excludeDate:G,renderDay:H,hideOutsideDates:U,hideWeekdays:P,getDayAriaLabel:z,onNext:tt,onPrevious:At,hasNextLevel:i!=="month",onLevelClick:()=>An("year"),numberOfColumns:d,locale:be,levelControlAriaLabel:v==null?void 0:v.monthLevelControl,nextLabel:(v==null?void 0:v.nextMonth)??y,nextIcon:Y,previousLabel:(v==null?void 0:v.previousMonth)??b,previousIcon:D,monthLabelFormat:F,__onDayClick:V,__onDayMouseEnter:W,__preventFocus:Be,__stopPropagation:Ve,static:xe,withCellSpacing:$,highlightToday:X,withWeekNumbers:te,headerControlsOrder:E,fullWidth:ne,...mt}),Ke==="year"&&k.jsx(Uy,{year:kn,numberOfColumns:d,minDate:Ce,maxDate:De,monthsListFormat:ae,getMonthControlProps:le,locale:be,onNext:$e,onPrevious:Fe,hasNextLevel:i!=="month"&&i!=="year",onLevelClick:()=>An("decade"),levelControlAriaLabel:v==null?void 0:v.yearLevelControl,nextLabel:(v==null?void 0:v.nextYear)??y,nextIcon:Y,previousLabel:(v==null?void 0:v.previousYear)??b,previousIcon:D,yearLabelFormat:ye,__onControlMouseEnter:C,__onControlClick:(Qe,Je)=>{T&&ht(Je),An(zd("month",r,i)),_==null||_(Je)},__preventFocus:Be,__stopPropagation:Ve,withCellSpacing:$,headerControlsOrder:E,fullWidth:ne,...mt}),Ke==="decade"&&k.jsx(Hy,{decade:kn,minDate:Ce,maxDate:De,yearsListFormat:oe,getYearControlProps:ue,locale:be,onNext:jn,onPrevious:Jn,numberOfColumns:d,nextLabel:(v==null?void 0:v.nextDecade)??y,nextIcon:Y,previousLabel:(v==null?void 0:v.previousDecade)??b,previousIcon:D,decadeLabelFormat:ke,__onControlMouseEnter:S,__onControlClick:(Qe,Je)=>{A&&ht(Je),An(zd("year",r,i)),w==null||w(Je)},__preventFocus:Be,__stopPropagation:Ve,withCellSpacing:$,headerControlsOrder:E,fullWidth:ne,...mt})]})});Dc.classes={...Hy.classes,...Uy.classes,...Vy.classes};Dc.displayName="@mantine/dates/Calendar";function Wy(e){const{maxLevel:n,minLevel:t,defaultLevel:i,level:r,onLevelChange:a,nextIcon:o,previousIcon:l,date:f,defaultDate:c,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:v,nextLabel:y,previousLabel:b,onYearSelect:w,onMonthSelect:_,onYearMouseEnter:S,onMonthMouseEnter:C,onNextMonth:E,onPreviousMonth:A,onNextYear:T,onPreviousYear:j,onNextDecade:N,onPreviousDecade:q,withCellSpacing:R,highlightToday:L,__updateDateOnYearSelect:B,__updateDateOnMonthSelect:G,__setDateRef:H,__setLevelRef:U,withWeekNumbers:P,headerControlsOrder:z,firstDayOfWeek:F,weekdayFormat:Y,weekendDays:D,getDayProps:V,excludeDate:W,renderDay:$,hideOutsideDates:X,hideWeekdays:te,getDayAriaLabel:ae,monthLabelFormat:le,monthsListFormat:ye,getMonthControlProps:oe,yearLabelFormat:ue,yearsListFormat:ke,getYearControlProps:ie,decadeLabelFormat:Re,allowSingleDateInRange:pe,allowDeselect:Ce,minDate:De,maxDate:be,locale:_e,...Me}=e;return{calendarProps:{maxLevel:n,minLevel:t,defaultLevel:i,level:r,onLevelChange:a,nextIcon:o,previousIcon:l,date:f,defaultDate:c,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:v,nextLabel:y,previousLabel:b,onYearSelect:w,onMonthSelect:_,onYearMouseEnter:S,onMonthMouseEnter:C,onNextMonth:E,onPreviousMonth:A,onNextYear:T,onPreviousYear:j,onNextDecade:N,onPreviousDecade:q,withCellSpacing:R,highlightToday:L,__updateDateOnYearSelect:B,__updateDateOnMonthSelect:G,__setDateRef:H,withWeekNumbers:P,headerControlsOrder:z,firstDayOfWeek:F,weekdayFormat:Y,weekendDays:D,getDayProps:V,excludeDate:W,renderDay:$,hideOutsideDates:X,hideWeekdays:te,getDayAriaLabel:ae,monthLabelFormat:le,monthsListFormat:ye,getMonthControlProps:oe,yearLabelFormat:ue,yearsListFormat:ke,getYearControlProps:ie,decadeLabelFormat:Re,allowSingleDateInRange:pe,allowDeselect:Ce,minDate:De,maxDate:be,locale:_e},others:Me}}function IM(e,n){const t=[...n].sort((i,r)=>ze(i).isAfter(ze(r))?1:-1);return ze(t[0]).startOf("day").subtract(1,"ms").isBefore(e)&&ze(t[1]).endOf("day").add(1,"ms").isAfter(e)}function SF({type:e,level:n,value:t,defaultValue:i,onChange:r,allowSingleDateInRange:a,allowDeselect:o,onMouseLeave:l}){const[f,c]=LC({type:e,value:t,defaultValue:i,onChange:r}),[h,d]=O.useState(e==="range"&&f[0]&&!f[1]?f[0]:null),[p,v]=O.useState(null),y=A=>{if(e==="range"){if(h&&!f[1]){if(ze(A).isSame(h,n)&&!a){d(null),v(null),c([null,null]);return}const T=[A,h];T.sort((j,N)=>ze(j).isAfter(ze(N))?1:-1),c(T),v(null),d(null);return}if(f[0]&&!f[1]&&ze(A).isSame(f[0],n)&&!a){d(null),v(null),c([null,null]);return}c([A,null]),v(null),d(A);return}if(e==="multiple"){f.some(T=>ze(T).isSame(A,n))?c(f.filter(T=>!ze(T).isSame(A,n))):c([...f,A]);return}f&&o&&ze(A).isSame(f,n)?c(null):c(A)},b=A=>h&&p?IM(A,[p,h]):f[0]&&f[1]?IM(A,f):!1,w=e==="range"?A=>{l==null||l(A),v(null)}:l,_=A=>f[0]&&ze(A).isSame(f[0],n)?!(p&&ze(p).isBefore(f[0])):!1,S=A=>f[1]?ze(A).isSame(f[1],n):!f[0]||!p?!1:ze(p).isBefore(f[0])&&ze(A).isSame(f[0],n),C=A=>{if(e==="range")return{selected:f.some(j=>j&&ze(j).isSame(A,n)),inRange:b(A),firstInRange:_(A),lastInRange:S(A),"data-autofocus":!!f[0]&&ze(f[0]).isSame(A,n)||void 0};if(e==="multiple")return{selected:f.some(j=>j&&ze(j).isSame(A,n)),"data-autofocus":!!f[0]&&ze(f[0]).isSame(A,n)||void 0};const T=ze(f).isSame(A,n);return{selected:T,"data-autofocus":T||void 0}},E=e==="range"&&h?v:()=>{};return O.useEffect(()=>{if(e==="range")if(f[0]&&!f[1])d(f[0]);else{const A=f[0]==null&&f[1]==null,T=f[0]!=null&&f[1]!=null;(A||T)&&(d(null),v(null))}},[f]),{onDateChange:y,onRootMouseLeave:w,onHoveredDateChange:E,getControlProps:C,_value:f,setValue:c}}var CF={monthPickerRoot:"m_53c9e871",presetsList:"m_cccb8ff3",presetButton:"m_7b4fbf50"};const AF=(e,{size:n})=>({monthPickerRoot:{"--preset-font-size":Zt(n)}}),Uae={type:"default"},Um=Pe(e=>{const n=ge("MonthPicker",Uae,e),{classNames:t,styles:i,vars:r,type:a,defaultValue:o,value:l,onChange:f,__staticSelector:c,getMonthControlProps:h,allowSingleDateInRange:d,allowDeselect:p,onMouseLeave:v,onMonthSelect:y,__updateDateOnMonthSelect:b,__onPresetSelect:w,__stopPropagation:_,presets:S,className:C,style:E,unstyled:A,size:T,attributes:j,onLevelChange:N,...q}=n,{calendarProps:R,others:L}=Wy(q),B=O.useRef(null),G=O.useRef(null),H=Ge({name:c||"MonthPicker",classes:CF,props:n,className:C,style:E,classNames:t,styles:i,unstyled:A,attributes:j,rootSelector:S?"monthPickerRoot":void 0,varsResolver:AF,vars:r}),{onDateChange:U,onRootMouseLeave:P,onHoveredDateChange:z,getControlProps:F,setValue:Y}=SF({type:a,level:"month",allowDeselect:p,allowSingleDateInRange:d,value:l,defaultValue:o,onChange:f,onMouseLeave:v}),{resolvedClassNames:D,resolvedStyles:V}=Ni({classNames:t,styles:i,props:n}),W=k.jsx(Dc,{classNames:D,styles:V,size:T,...R,...S?{}:L,minLevel:"year",__updateDateOnMonthSelect:b??!1,__staticSelector:c||"MonthPicker",onMouseLeave:P,onMonthMouseEnter:(te,ae)=>z(ae),onMonthSelect:te=>{U(te),y==null||y(te)},getMonthControlProps:te=>({...F(te),...h==null?void 0:h(te)}),onLevelChange:N,__setDateRef:B,__setLevelRef:G,__stopPropagation:_,attributes:j,...S?{}:{className:C,style:E}});if(!S)return W;const $=te=>{var le,ye;const ae=Array.isArray(te)?te[0]:te;ae!==void 0&&((le=B.current)==null||le.call(B,ae),(ye=G.current)==null||ye.call(G,"year"),w?w(ae):Y(te))},X=S.map((te,ae)=>k.jsx(fi,{...H("presetButton"),onClick:()=>$(te.value),onMouseDown:le=>le.preventDefault(),"data-mantine-stop-propagation":_||void 0,children:te.label},ae));return k.jsxs(we,{...H("monthPickerRoot"),size:T,...L,children:[k.jsx("div",{...H("presetsList"),children:X}),W]})});Um.classes={...Dc.classes,...CF};Um.varsResolver=AF;Um.displayName="@mantine/dates/MonthPicker";var Vae={datePickerRoot:"m_765a40cf",presetsList:"m_d6a681e1",presetButton:"m_acd30b22"};const OF=(e,{size:n})=>({datePickerRoot:{"--preset-font-size":Zt(n)}}),Wae={type:"default",defaultLevel:"month",numberOfColumns:1,size:"sm"},Vm=Pe(e=>{const n=ge("DatePicker",Wae,e),{allowDeselect:t,allowSingleDateInRange:i,value:r,defaultValue:a,onChange:o,onMouseLeave:l,classNames:f,styles:c,__staticSelector:h,__onDayClick:d,__onDayMouseEnter:p,__onPresetSelect:v,__stopPropagation:y,presets:b,className:w,style:_,unstyled:S,size:C,vars:E,attributes:A,...T}=n,{calendarProps:j,others:N}=Wy(T),q=O.useRef(null),R=O.useRef(null),L=Ge({name:h||"DatePicker",classes:Vae,props:n,className:w,style:_,classNames:f,styles:c,unstyled:S,attributes:A,rootSelector:b?"datePickerRoot":void 0,varsResolver:OF,vars:E}),{onDateChange:B,onRootMouseLeave:G,onHoveredDateChange:H,getControlProps:U,_value:P,setValue:z}=SF({type:N.type,level:"day",allowDeselect:t,allowSingleDateInRange:i,value:r,defaultValue:a,onChange:o,onMouseLeave:l}),{resolvedClassNames:F,resolvedStyles:Y}=Ni({classNames:f,styles:c,props:n}),D=k.jsx(Dc,{classNames:F,styles:Y,__staticSelector:h||"DatePicker",onMouseLeave:G,size:C,...j,...b?{}:N,__stopPropagation:y,__setDateRef:q,__setLevelRef:R,minLevel:j.minLevel||"month",__onDayMouseEnter:($,X)=>{H(X),p==null||p($,X)},__onDayClick:($,X)=>{B(X),d==null||d($,X)},getDayProps:$=>{var X;return{...U($),...(X=j.getDayProps)==null?void 0:X.call(j,$)}},getMonthControlProps:$=>{var X;return{selected:typeof P=="string"?zC($,P):!1,...(X=j.getMonthControlProps)==null?void 0:X.call(j,$)}},getYearControlProps:$=>{var X;return{selected:typeof P=="string"?ze($).isSame(P,"year"):!1,...(X=j.getYearControlProps)==null?void 0:X.call(j,$)}},hideOutsideDates:j.hideOutsideDates??j.numberOfColumns!==1,attributes:A,...b?{}:{className:w,style:_}});if(!b)return D;const V=$=>{var te,ae;const X=Array.isArray($)?$[0]:$;X!==void 0&&((te=q.current)==null||te.call(q,X),(ae=R.current)==null||ae.call(R,"month"),v?v(X):z($))},W=b.map(($,X)=>k.jsx(fi,{...L("presetButton"),onClick:()=>V($.value),onMouseDown:te=>te.preventDefault(),"data-mantine-stop-propagation":y||void 0,children:$.label},X));return k.jsxs(we,{...L("datePickerRoot"),size:C,...N,children:[k.jsx("div",{...L("presetsList"),children:W}),D]})});Vm.classes=Dc.classes;Vm.varsResolver=OF;Vm.displayName="@mantine/dates/DatePicker";function EF({type:e,value:n,defaultValue:t,onChange:i,locale:r,format:a,closeOnChange:o,sortDates:l,labelSeparator:f,valueFormatter:c}){const h=sl(),[d,p]=Q$(!1),[v,y]=LC({type:e,value:n,defaultValue:t,onChange:i}),b=cae({type:e,date:v,locale:h.getLocale(r),format:a,labelSeparator:h.getLabelSeparator(f),formatter:c}),w=S=>{o&&(e==="default"&&p.close(),e==="range"&&S[0]&&S[1]&&p.close()),y(l&&e==="multiple"?[...S].sort((C,E)=>ze(C).isAfter(ze(E))?1:-1):S)};return{_value:v,setValue:w,onClear:()=>w(e==="range"?[null,null]:e==="multiple"?[]:null),shouldClear:e==="range"?!!v[0]:e==="multiple"?v.length>0:v!==null,formattedValue:b,dropdownOpened:d,dropdownHandlers:p}}const Gae={type:"default",size:"sm",valueFormat:"MMMM YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},IC=Pe(e=>{const n=ge("MonthPickerInput",Gae,e),{type:t,value:i,defaultValue:r,onChange:a,valueFormat:o,labelSeparator:l,locale:f,classNames:c,styles:h,unstyled:d,closeOnChange:p,size:v,variant:y,dropdownType:b,sortDates:w,minDate:_,maxDate:S,vars:C,valueFormatter:E,presets:A,attributes:T,...j}=n,{resolvedClassNames:N,resolvedStyles:q}=Ni({classNames:c,styles:h,props:n}),{calendarProps:R,others:L}=Wy(j),{_value:B,setValue:G,formattedValue:H,dropdownHandlers:U,dropdownOpened:P,onClear:z,shouldClear:F}=EF({type:t,value:i,defaultValue:r,onChange:a,locale:f,format:o,labelSeparator:l,closeOnChange:p,sortDates:w,valueFormatter:E});return k.jsx(jc,{formattedValue:H,dropdownOpened:P,dropdownHandlers:U,classNames:N,styles:q,unstyled:d,onClear:z,shouldClear:F,value:B,size:v,variant:y,dropdownType:b,...L,attributes:T,type:t,__staticSelector:"MonthPickerInput",children:k.jsx(Um,{...R,size:v,variant:y,type:t,value:B,defaultDate:R.defaultDate||(Array.isArray(B)?B[0]||kS({maxDate:S,minDate:_}):B||kS({maxDate:S,minDate:_})),onChange:G,locale:f,classNames:N,styles:q,unstyled:d,__staticSelector:"MonthPickerInput",__stopPropagation:b==="popover",minDate:_,maxDate:S,presets:A,attributes:T})})});IC.classes={...jc.classes,...Um.classes};IC.displayName="@mantine/dates/MonthPickerInput";const Yae={type:"default",size:"sm",valueFormat:"MMMM D, YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},lu=Pe(e=>{const n=ge("DatePickerInput",Yae,e),{type:t,value:i,defaultValue:r,onChange:a,valueFormat:o,labelSeparator:l,locale:f,classNames:c,styles:h,unstyled:d,closeOnChange:p,size:v,variant:y,dropdownType:b,sortDates:w,minDate:_,maxDate:S,vars:C,defaultDate:E,valueFormatter:A,presets:T,attributes:j,...N}=n,{resolvedClassNames:q,resolvedStyles:R}=Ni({classNames:c,styles:h,props:n}),{calendarProps:L,others:B}=Wy(N),{_value:G,setValue:H,formattedValue:U,dropdownHandlers:P,dropdownOpened:z,onClear:F,shouldClear:Y}=EF({type:t,value:i,defaultValue:r,onChange:a,locale:f,format:o,labelSeparator:l,closeOnChange:p,sortDates:w,valueFormatter:A}),D=Array.isArray(G)?G[0]||E:G||E;return k.jsx(jc,{formattedValue:U,dropdownOpened:z,dropdownHandlers:P,classNames:q,styles:R,unstyled:d,onClear:F,shouldClear:Y,value:G,size:v,variant:y,dropdownType:b,...B,type:t,__staticSelector:"DatePickerInput",attributes:j,children:k.jsx(Vm,{...L,size:v,variant:y,type:t,value:G,defaultDate:D||kS({maxDate:S,minDate:_}),onChange:H,locale:f,classNames:q,styles:R,unstyled:d,__staticSelector:"DatePickerInput",__stopPropagation:b==="popover",minDate:_,maxDate:S,presets:T,attributes:j})})});lu.classes={...jc.classes,...Vm.classes};lu.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 Kae={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Cn=(e,n,t,i)=>{const r=O.forwardRef(({color:a="currentColor",size:o=24,stroke:l=2,title:f,className:c,children:h,...d},p)=>O.createElement("svg",{ref:p,...Kae[e],width:o,height:o,className:["tabler-icon",`tabler-icon-${n}`,c].join(" "),strokeWidth:l,stroke:a,...d},[f&&O.createElement("title",{key:"svg-title"},f),...i.map(([v,y])=>O.createElement(v,y)),...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 Xae=[["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"}]],Zae=Cn("outline","alert-triangle","AlertTriangle",Xae);/** - * @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 Qae=[["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"}]],Jae=Cn("outline","archive-off","ArchiveOff",Qae);/** - * @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 eoe=[["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"}]],noe=Cn("outline","archive","Archive",eoe);/** - * @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 toe=[["path",{d:"M9 14l-4 -4l4 -4",key:"svg-0"}],["path",{d:"M5 10h11a4 4 0 1 1 0 8h-1",key:"svg-1"}]],ioe=Cn("outline","arrow-back-up","ArrowBackUp",toe);/** - * @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 roe=[["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"}]],aoe=Cn("outline","arrows-horizontal","ArrowsHorizontal",roe);/** - * @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 ooe=[["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"}]],TF=Cn("outline","calendar-due","CalendarDue",ooe);/** - * @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 soe=[["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"}]],loe=Cn("outline","calendar-off","CalendarOff",soe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const uoe=[["path",{d:"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"}]],foe=Cn("outline","calendar","Calendar",uoe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const coe=[["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"}]],doe=Cn("outline","chart-bar","ChartBar",coe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const hoe=[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]],MF=Cn("outline","check","Check",hoe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const moe=[["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"}]],$h=Cn("outline","checkbox","Checkbox",moe);/** - * @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 poe=[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]],jF=Cn("outline","chevron-down","ChevronDown",poe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const voe=[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]],DF=Cn("outline","chevron-right","ChevronRight",voe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const goe=[["path",{d:"M9 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"}]],BM=Cn("outline","clipboard-list","ClipboardList",goe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const yoe=[["path",{d:"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"}]],boe=Cn("outline","clock-hour-4","ClockHour4",yoe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const woe=[["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"}]],FM=Cn("outline","clock","Clock",woe);/** - * @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 koe=[["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"}]],_oe=Cn("outline","columns-3","Columns3",koe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const xoe=[["path",{d:"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"}]],RF=Cn("outline","dots-vertical","DotsVertical",xoe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Soe=[["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"}]],ih=Cn("outline","edit","Edit",Soe);/** - * @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 Coe=[["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"}]],PF=Cn("outline","grip-vertical","GripVertical",Coe);/** - * @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 Aoe=[["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"}]],Ooe=Cn("outline","history","History",Aoe);/** - * @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 Eoe=[["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"}]],NF=Cn("outline","hourglass","Hourglass",Eoe);/** - * @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 Toe=[["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"}]],_S=Cn("outline","layout-kanban","LayoutKanban",Toe);/** - * @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 Moe=[["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"}]],$F=Cn("outline","lock-open","LockOpen",Moe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const joe=[["path",{d:"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"}]],Gl=Cn("outline","lock","Lock",joe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Doe=[["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"}]],Roe=Cn("outline","logout","Logout",Doe);/** - * @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 Poe=[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l16 0",key:"svg-2"}]],Noe=Cn("outline","menu-2","Menu2",Poe);/** - * @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 $oe=[["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"}]],zF=Cn("outline","message-chatbot","MessageChatbot",$oe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const zoe=[["path",{d:"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"}]],Loe=Cn("outline","mood-smile","MoodSmile",zoe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Ioe=[["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"}]],BC=Cn("outline","palette","Palette",Ioe);/** - * @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 Boe=[["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"}]],Foe=Cn("outline","pencil","Pencil",Boe);/** - * @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 qoe=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]],zh=Cn("outline","plus","Plus",qoe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Hoe=[["path",{d:"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"}]],Uoe=Cn("outline","refresh","Refresh",Hoe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Voe=[["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"}]],Woe=Cn("outline","search","Search",Voe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Goe=[["path",{d:"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"}]],Yoe=Cn("outline","send","Send",Goe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Koe=[["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"}]],Xoe=Cn("outline","tag","Tag",Koe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Zoe=[["path",{d:"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"}]],Qoe=Cn("outline","trash-x","TrashX",Zoe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Joe=[["path",{d:"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"}]],Lh=Cn("outline","trash","Trash",Joe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const ese=[["path",{d:"M3 17l6 -6l4 4l8 -8",key:"svg-0"}],["path",{d:"M14 7l7 0l0 7",key:"svg-1"}]],qM=Cn("outline","trending-up","TrendingUp",ese);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const nse=[["path",{d:"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"}]],tse=Cn("outline","user-circle","UserCircle",nse);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const ise=[["path",{d:"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"}]],rse=Cn("outline","user-minus","UserMinus",ise);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const ase=[["path",{d:"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"}]],ose=Cn("outline","user-plus","UserPlus",ase);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const sse=[["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"}]],lse=Cn("outline","user-square","UserSquare",sse);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const use=[["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"}]],fse=Cn("outline","user","User",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 cse=[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]],rh=Cn("outline","x","X",cse);function HM({initial:e,submitLabel:n="Guardar",users:t=[],requesterOptions:i=[],tagOptions:r=[],onSubmit:a,onCancel:o}){const[l,f]=O.useState((e==null?void 0:e.requester)??""),[c,h]=O.useState((e==null?void 0:e.title)??""),[d,p]=O.useState((e==null?void 0:e.description)??""),[v,y]=O.useState((e==null?void 0:e.assignee_id)??null),[b,w]=O.useState((e==null?void 0:e.tags)??[]),_=async E=>{E==null||E.preventDefault();const A=c.trim();A&&await a({requester:l.trim(),title:A,description:d,assignee_id:v,tags:b})},S=E=>{E.key==="Enter"&&!E.shiftKey&&(E.preventDefault(),_())},C=E=>{E.key==="Enter"&&(E.ctrlKey||E.metaKey)&&(E.preventDefault(),_())};return k.jsx("form",{onSubmit:_,children:k.jsxs($t,{gap:"sm",children:[k.jsx(Th,{label:"Tarea",value:c,onChange:E=>h(E.currentTarget.value),tabIndex:1,required:!0,autoComplete:"off","data-autofocus":!0,autosize:!0,minRows:1,maxRows:4,onKeyDown:E=>{E.key==="Enter"&&!E.shiftKey&&(E.preventDefault(),_())}}),k.jsx(ry,{label:"Solicitante",value:l,onChange:f,data:i,tabIndex:2,autoComplete:"off",onKeyDown:S,placeholder:"Empieza a escribir y elige uno existente",limit:10}),k.jsx(Th,{label:"Descripcion",value:d,onChange:E=>p(E.currentTarget.value),tabIndex:3,autosize:!0,minRows:3,maxRows:8,onKeyDown:C,description:"Ctrl+Enter para guardar"}),k.jsx(Zo,{label:"Asignar a",placeholder:"Sin asignar",value:v,onChange:E=>y(E),data:t.map(E=>({value:E.id,label:E.display_name||E.username})),clearable:!0,searchable:!0,tabIndex:4}),k.jsx(kC,{label:"Tags",value:b,onChange:w,data:r,clearable:!0,tabIndex:5,placeholder:"Enter para añadir; sugiere existentes",splitChars:[","," "]}),k.jsxs(wn,{justify:"flex-end",gap:"xs",mt:"xs",children:[k.jsx(Bt,{variant:"subtle",color:"gray",tabIndex:7,type:"button",onClick:o,children:"Cancelar"}),k.jsx(Bt,{tabIndex:6,type:"submit",disabled:!c.trim(),children:n})]})]})})}function dse(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const hse=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,mse=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,pse={};function UM(e,n){return(pse.jsx?mse:hse).test(e)}const vse=/[ \t\n\f\r]/g;function gse(e){return typeof e=="object"?e.type==="text"?VM(e.value):!1:VM(e)}function VM(e){return e.replace(vse,"")===""}class Wm{constructor(n,t,i){this.normal=t,this.property=n,i&&(this.space=i)}}Wm.prototype.normal={};Wm.prototype.property={};Wm.prototype.space=void 0;function LF(e,n){const t={},i={};for(const r of e)Object.assign(t,r.property),Object.assign(i,r.normal);return new Wm(t,i,n)}function xS(e){return e.toLowerCase()}class yr{constructor(n,t){this.attribute=t,this.property=n}}yr.prototype.attribute="";yr.prototype.booleanish=!1;yr.prototype.boolean=!1;yr.prototype.commaOrSpaceSeparated=!1;yr.prototype.commaSeparated=!1;yr.prototype.defined=!1;yr.prototype.mustUseProperty=!1;yr.prototype.number=!1;yr.prototype.overloadedBoolean=!1;yr.prototype.property="";yr.prototype.spaceSeparated=!1;yr.prototype.space=void 0;let yse=0;const Nn=Cu(),si=Cu(),SS=Cu(),Ie=Cu(),Ot=Cu(),Rf=Cu(),jr=Cu();function Cu(){return 2**++yse}const CS=Object.freeze(Object.defineProperty({__proto__:null,boolean:Nn,booleanish:si,commaOrSpaceSeparated:jr,commaSeparated:Rf,number:Ie,overloadedBoolean:SS,spaceSeparated:Ot},Symbol.toStringTag,{value:"Module"})),Ok=Object.keys(CS);class FC extends yr{constructor(n,t,i,r){let a=-1;if(super(n,t),WM(this,"space",r),typeof i=="number")for(;++a4&&t.slice(0,4)==="data"&&xse.test(n)){if(n.charAt(4)==="-"){const a=n.slice(5).replace(GM,Ase);i="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=n.slice(4);if(!GM.test(a)){let o=a.replace(_se,Cse);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}r=FC}return new r(i,n)}function Cse(e){return"-"+e.toLowerCase()}function Ase(e){return e.charAt(1).toUpperCase()}const Ose=LF([IF,bse,qF,HF,UF],"html"),qC=LF([IF,wse,qF,HF,UF],"svg");function Ese(e){return e.join(" ").trim()}var gf={},Ek,YM;function Tse(){if(YM)return Ek;YM=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,r=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g,f=` -`,c="/",h="*",d="",p="comment",v="declaration";function y(w,_){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];_=_||{};var S=1,C=1;function E(H){var U=H.match(n);U&&(S+=U.length);var P=H.lastIndexOf(f);C=~P?H.length-P:C+H.length}function A(){var H={line:S,column:C};return function(U){return U.position=new T(H),q(),U}}function T(H){this.start=H,this.end={line:S,column:C},this.source=_.source}T.prototype.content=w;function j(H){var U=new Error(_.source+":"+S+":"+C+": "+H);if(U.reason=H,U.filename=_.source,U.line=S,U.column=C,U.source=w,!_.silent)throw U}function N(H){var U=H.exec(w);if(U){var P=U[0];return E(P),w=w.slice(P.length),U}}function q(){N(t)}function R(H){var U;for(H=H||[];U=L();)U!==!1&&H.push(U);return H}function L(){var H=A();if(!(c!=w.charAt(0)||h!=w.charAt(1))){for(var U=2;d!=w.charAt(U)&&(h!=w.charAt(U)||c!=w.charAt(U+1));)++U;if(U+=2,d===w.charAt(U-1))return j("End of comment missing");var P=w.slice(2,U-2);return C+=2,E(P),w=w.slice(U),C+=2,H({type:p,comment:P})}}function B(){var H=A(),U=N(i);if(U){if(L(),!N(r))return j("property missing ':'");var P=N(a),z=H({type:v,property:b(U[0].replace(e,d)),value:P?b(P[0].replace(e,d)):d});return N(o),z}}function G(){var H=[];R(H);for(var U;U=B();)U!==!1&&(H.push(U),R(H));return H}return q(),G()}function b(w){return w?w.replace(l,d):d}return Ek=y,Ek}var KM;function Mse(){if(KM)return gf;KM=1;var e=gf&&gf.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(gf,"__esModule",{value:!0}),gf.default=t;const n=e(Tse());function t(i,r){let a=null;if(!i||typeof i!="string")return a;const o=(0,n.default)(i),l=typeof r=="function";return o.forEach(f=>{if(f.type!=="declaration")return;const{property:c,value:h}=f;l?r(c,h,f):h&&(a=a||{},a[c]=h)}),a}return gf}var Ld={},XM;function jse(){if(XM)return Ld;XM=1,Object.defineProperty(Ld,"__esModule",{value:!0}),Ld.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,r=/^-(ms)-/,a=function(c){return!c||t.test(c)||e.test(c)},o=function(c,h){return h.toUpperCase()},l=function(c,h){return"".concat(h,"-")},f=function(c,h){return h===void 0&&(h={}),a(c)?c:(c=c.toLowerCase(),h.reactCompat?c=c.replace(r,l):c=c.replace(i,l),c.replace(n,o))};return Ld.camelCase=f,Ld}var Id,ZM;function Dse(){if(ZM)return Id;ZM=1;var e=Id&&Id.__importDefault||function(r){return r&&r.__esModule?r:{default:r}},n=e(Mse()),t=jse();function i(r,a){var o={};return!r||typeof r!="string"||(0,n.default)(r,function(l,f){l&&f&&(o[(0,t.camelCase)(l,a)]=f)}),o}return i.default=i,Id=i,Id}var Rse=Dse();const Pse=ot(Rse),VF=WF("end"),HC=WF("start");function WF(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 Nse(e){const n=HC(e),t=VF(e);if(n&&t)return{start:n,end:t}}function ph(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?QM(e.position):"start"in e||"end"in e?QM(e):"line"in e||"column"in e?AS(e):""}function AS(e){return JM(e&&e.line)+":"+JM(e&&e.column)}function QM(e){return AS(e&&e.start)+"-"+AS(e&&e.end)}function JM(e){return e&&typeof e=="number"?e:1}class Yi extends Error{constructor(n,t,i){super(),typeof t=="string"&&(i=t,t=void 0);let r="",a={},o=!1;if(t&&("line"in t&&"column"in t?a={place:t}:"start"in t&&"end"in t?a={place:t}:"type"in t?a={ancestors:[t],place:t.position}:a={...t}),typeof n=="string"?r=n:!a.cause&&n&&(o=!0,r=n.message,a.cause=n),!a.ruleId&&!a.source&&typeof i=="string"){const f=i.indexOf(":");f===-1?a.ruleId=i:(a.source=i.slice(0,f),a.ruleId=i.slice(f+1))}if(!a.place&&a.ancestors&&a.ancestors){const f=a.ancestors[a.ancestors.length-1];f&&(a.place=f.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=l?l.line:void 0,this.name=ph(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Yi.prototype.file="";Yi.prototype.name="";Yi.prototype.reason="";Yi.prototype.message="";Yi.prototype.stack="";Yi.prototype.column=void 0;Yi.prototype.line=void 0;Yi.prototype.ancestors=void 0;Yi.prototype.cause=void 0;Yi.prototype.fatal=void 0;Yi.prototype.place=void 0;Yi.prototype.ruleId=void 0;Yi.prototype.source=void 0;const UC={}.hasOwnProperty,$se=new Map,zse=/[A-Z]/g,Lse=new Set(["table","tbody","thead","tfoot","tr"]),Ise=new Set(["td","th"]),GF="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Bse(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=Yse(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=Gse(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"?qC:Ose,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},a=YF(r,e,void 0);return a&&typeof a!="string"?a:r.create(e,r.Fragment,{children:a||void 0},void 0)}function YF(e,n,t){if(n.type==="element")return Fse(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return qse(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return Use(e,n,t);if(n.type==="mdxjsEsm")return Hse(e,n);if(n.type==="root")return Vse(e,n,t);if(n.type==="text")return Wse(e,n)}function Fse(e,n,t){const i=e.schema;let r=i;n.tagName.toLowerCase()==="svg"&&i.space==="html"&&(r=qC,e.schema=r),e.ancestors.push(n);const a=XF(e,n.tagName,!1),o=Kse(e,n);let l=WC(e,n);return Lse.has(n.tagName)&&(l=l.filter(function(f){return typeof f=="string"?!gse(f):!0})),KF(e,o,a,n),VC(o,l),e.ancestors.pop(),e.schema=i,e.create(n,a,o,t)}function qse(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)}Ih(e,n.position)}function Hse(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Ih(e,n.position)}function Use(e,n,t){const i=e.schema;let r=i;n.name==="svg"&&i.space==="html"&&(r=qC,e.schema=r),e.ancestors.push(n);const a=n.name===null?e.Fragment:XF(e,n.name,!0),o=Xse(e,n),l=WC(e,n);return KF(e,o,a,n),VC(o,l),e.ancestors.pop(),e.schema=i,e.create(n,a,o,t)}function Vse(e,n,t){const i={};return VC(i,WC(e,n)),e.create(n,e.Fragment,i,t)}function Wse(e,n){return n.value}function KF(e,n,t,i){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=i)}function VC(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function Gse(e,n,t){return i;function i(r,a,o,l){const c=Array.isArray(o.children)?t:n;return l?c(a,o,l):c(a,o)}}function Yse(e,n){return t;function t(i,r,a,o){const l=Array.isArray(a.children),f=HC(i);return n(r,a,o,l,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function Kse(e,n){const t={};let i,r;for(r in n.properties)if(r!=="children"&&UC.call(n.properties,r)){const a=Zse(e,r,n.properties[r]);if(a){const[o,l]=a;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&Ise.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 Xse(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 Ih(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 Ih(e,n.position);else a=i.value===null?!0:i.value;t[r]=a}return t}function WC(e,n){const t=[];let i=-1;const r=e.passKeys?new Map:$se;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?(Lr(e,e.length,0,n),e):n}const tj={}.hasOwnProperty;function QF(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 ja(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const er=ul(/[A-Za-z]/),Ui=ul(/[\dA-Za-z]/),ole=ul(/[#-'*+\--9=?A-Z^-~]/);function Ag(e){return e!==null&&(e<32||e===127)}const OS=ul(/\d/),sle=ul(/[\dA-Fa-f]/),lle=ul(/[!-/:-@[-`{-~]/);function pn(e){return e!==null&&e<-2}function Ct(e){return e!==null&&(e<0||e===32)}function Vn(e){return e===-2||e===-1||e===32}const Gy=ul(new RegExp("\\p{P}|\\p{S}","u")),uu=ul(/\s/);function ul(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Pc(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 Qn(e,n,t,i){const r=i?i-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(f){return Vn(f)?(e.enter(t),l(f)):n(f)}function l(f){return Vn(f)&&a++o))return;const j=n.events.length;let N=j,q,R;for(;N--;)if(n.events[N][0]==="exit"&&n.events[N][1].type==="chunkFlow"){if(q){R=n.events[N][1].end;break}q=!0}for(_(i),T=j;TC;){const A=t[E];n.containerState=A[1],A[0].exit.call(n,e)}t.length=C}function S(){r.write([null]),a=void 0,r=void 0,n.containerState._closeFlow=void 0}}function hle(e,n,t){return Qn(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Hf(e){if(e===null||Ct(e)||uu(e))return 1;if(Gy(e))return 2}function Yy(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};rj(d,-f),rj(p,f),o={type:f>1?"strongSequence":"emphasisSequence",start:d,end:{...e[i][1].end}},l={type:f>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:p},a={type:f>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[t][1].start}},r={type:f>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[i][1].end={...o.start},e[t][1].start={...l.end},c=[],e[i][1].end.offset-e[i][1].start.offset&&(c=aa(c,[["enter",e[i][1],n],["exit",e[i][1],n]])),c=aa(c,[["enter",r,n],["enter",o,n],["exit",o,n],["enter",a,n]]),c=aa(c,Yy(n.parser.constructs.insideSpan.null,e.slice(i+1,t),n)),c=aa(c,[["exit",a,n],["enter",l,n],["exit",l,n],["exit",r,n]]),e[t][1].end.offset-e[t][1].start.offset?(h=2,c=aa(c,[["enter",e[t][1],n],["exit",e[t][1],n]])):h=0,Lr(e,i-1,t-i+3,c),t=i+c.length-h-2;break}}for(t=-1;++t0&&Vn(T)?Qn(e,S,"linePrefix",a+1)(T):S(T)}function S(T){return T===null||pn(T)?e.check(aj,b,E)(T):(e.enter("codeFlowValue"),C(T))}function C(T){return T===null||pn(T)?(e.exit("codeFlowValue"),S(T)):(e.consume(T),C)}function E(T){return e.exit("codeFenced"),n(T)}function A(T,j,N){let q=0;return R;function R(U){return T.enter("lineEnding"),T.consume(U),T.exit("lineEnding"),L}function L(U){return T.enter("codeFencedFence"),Vn(U)?Qn(T,B,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):B(U)}function B(U){return U===l?(T.enter("codeFencedFenceSequence"),G(U)):N(U)}function G(U){return U===l?(q++,T.consume(U),G):q>=o?(T.exit("codeFencedFenceSequence"),Vn(U)?Qn(T,H,"whitespace")(U):H(U)):N(U)}function H(U){return U===null||pn(U)?(T.exit("codeFencedFence"),j(U)):N(U)}}}function Cle(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 Mk={name:"codeIndented",tokenize:Ole},Ale={partial:!0,tokenize:Ele};function Ole(e,n,t){const i=this;return r;function r(c){return e.enter("codeIndented"),Qn(e,a,"linePrefix",5)(c)}function a(c){const h=i.events[i.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?o(c):t(c)}function o(c){return c===null?f(c):pn(c)?e.attempt(Ale,o,f)(c):(e.enter("codeFlowValue"),l(c))}function l(c){return c===null||pn(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),l)}function f(c){return e.exit("codeIndented"),n(c)}}function Ele(e,n,t){const i=this;return r;function r(o){return i.parser.lazy[i.now().line]?t(o):pn(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r):Qn(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):pn(o)?r(o):t(o)}}const Tle={name:"codeText",previous:jle,resolve:Mle,tokenize:Dle};function Mle(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&&Bd(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),Bd(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Bd(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 rq(e,n,t,i,r,a,o,l,f){const c=f||Number.POSITIVE_INFINITY;let h=0;return d;function d(_){return _===60?(e.enter(i),e.enter(r),e.enter(a),e.consume(_),e.exit(a),p):_===null||_===32||_===41||Ag(_)?t(_):(e.enter(i),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),b(_))}function p(_){return _===62?(e.enter(a),e.consume(_),e.exit(a),e.exit(r),e.exit(i),n):(e.enter(l),e.enter("chunkString",{contentType:"string"}),v(_))}function v(_){return _===62?(e.exit("chunkString"),e.exit(l),p(_)):_===null||_===60||pn(_)?t(_):(e.consume(_),_===92?y:v)}function y(_){return _===60||_===62||_===92?(e.consume(_),v):v(_)}function b(_){return!h&&(_===null||_===41||Ct(_))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(i),n(_)):h999||v===null||v===91||v===93&&!f||v===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?t(v):v===93?(e.exit(a),e.enter(r),e.consume(v),e.exit(r),e.exit(i),n):pn(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),d(v))}function d(v){return v===null||v===91||v===93||pn(v)||l++>999?(e.exit("chunkString"),h(v)):(e.consume(v),f||(f=!Vn(v)),v===92?p:d)}function p(v){return v===91||v===92||v===93?(e.consume(v),l++,d):d(v)}}function oq(e,n,t,i,r,a){let o;return l;function l(p){return p===34||p===39||p===40?(e.enter(i),e.enter(r),e.consume(p),e.exit(r),o=p===40?41:p,f):t(p)}function f(p){return p===o?(e.enter(r),e.consume(p),e.exit(r),e.exit(i),n):(e.enter(a),c(p))}function c(p){return p===o?(e.exit(a),f(o)):p===null?t(p):pn(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Qn(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===o||p===null||pn(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?d:h)}function d(p){return p===o||p===92?(e.consume(p),h):h(p)}}function vh(e,n){let t;return i;function i(r){return pn(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t=!0,i):Vn(r)?Qn(e,i,t?"linePrefix":"lineSuffix")(r):n(r)}}const Ble={name:"definition",tokenize:qle},Fle={partial:!0,tokenize:Hle};function qle(e,n,t){const i=this;let r;return a;function a(v){return e.enter("definition"),o(v)}function o(v){return aq.call(i,e,l,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function l(v){return r=ja(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),f):t(v)}function f(v){return Ct(v)?vh(e,c)(v):c(v)}function c(v){return rq(e,h,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function h(v){return e.attempt(Fle,d,d)(v)}function d(v){return Vn(v)?Qn(e,p,"whitespace")(v):p(v)}function p(v){return v===null||pn(v)?(e.exit("definition"),i.parser.defined.push(r),n(v)):t(v)}}function Hle(e,n,t){return i;function i(l){return Ct(l)?vh(e,r)(l):t(l)}function r(l){return oq(e,a,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return Vn(l)?Qn(e,o,"whitespace")(l):o(l)}function o(l){return l===null||pn(l)?n(l):t(l)}}const Ule={name:"hardBreakEscape",tokenize:Vle};function Vle(e,n,t){return i;function i(a){return e.enter("hardBreakEscape"),e.consume(a),r}function r(a){return pn(a)?(e.exit("hardBreakEscape"),n(a)):t(a)}}const Wle={name:"headingAtx",resolve:Gle,tokenize:Yle};function Gle(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"},Lr(e,i,t-i+1,[["enter",r,n],["enter",a,n],["exit",a,n],["exit",r,n]])),e}function Yle(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||Ct(h)?(e.exit("atxHeadingSequence"),l(h)):t(h)}function l(h){return h===35?(e.enter("atxHeadingSequence"),f(h)):h===null||pn(h)?(e.exit("atxHeading"),n(h)):Vn(h)?Qn(e,l,"whitespace")(h):(e.enter("atxHeadingText"),c(h))}function f(h){return h===35?(e.consume(h),f):(e.exit("atxHeadingSequence"),l(h))}function c(h){return h===null||h===35||Ct(h)?(e.exit("atxHeadingText"),l(h)):(e.consume(h),c)}}const Kle=["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"],sj=["pre","script","style","textarea"],Xle={concrete:!0,name:"htmlFlow",resolveTo:Jle,tokenize:eue},Zle={partial:!0,tokenize:tue},Qle={partial:!0,tokenize:nue};function Jle(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 eue(e,n,t){const i=this;let r,a,o,l,f;return c;function c($){return h($)}function h($){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume($),d}function d($){return $===33?(e.consume($),p):$===47?(e.consume($),a=!0,b):$===63?(e.consume($),r=3,i.interrupt?n:D):er($)?(e.consume($),o=String.fromCharCode($),w):t($)}function p($){return $===45?(e.consume($),r=2,v):$===91?(e.consume($),r=5,l=0,y):er($)?(e.consume($),r=4,i.interrupt?n:D):t($)}function v($){return $===45?(e.consume($),i.interrupt?n:D):t($)}function y($){const X="CDATA[";return $===X.charCodeAt(l++)?(e.consume($),l===X.length?i.interrupt?n:B:y):t($)}function b($){return er($)?(e.consume($),o=String.fromCharCode($),w):t($)}function w($){if($===null||$===47||$===62||Ct($)){const X=$===47,te=o.toLowerCase();return!X&&!a&&sj.includes(te)?(r=1,i.interrupt?n($):B($)):Kle.includes(o.toLowerCase())?(r=6,X?(e.consume($),_):i.interrupt?n($):B($)):(r=7,i.interrupt&&!i.parser.lazy[i.now().line]?t($):a?S($):C($))}return $===45||Ui($)?(e.consume($),o+=String.fromCharCode($),w):t($)}function _($){return $===62?(e.consume($),i.interrupt?n:B):t($)}function S($){return Vn($)?(e.consume($),S):R($)}function C($){return $===47?(e.consume($),R):$===58||$===95||er($)?(e.consume($),E):Vn($)?(e.consume($),C):R($)}function E($){return $===45||$===46||$===58||$===95||Ui($)?(e.consume($),E):A($)}function A($){return $===61?(e.consume($),T):Vn($)?(e.consume($),A):C($)}function T($){return $===null||$===60||$===61||$===62||$===96?t($):$===34||$===39?(e.consume($),f=$,j):Vn($)?(e.consume($),T):N($)}function j($){return $===f?(e.consume($),f=null,q):$===null||pn($)?t($):(e.consume($),j)}function N($){return $===null||$===34||$===39||$===47||$===60||$===61||$===62||$===96||Ct($)?A($):(e.consume($),N)}function q($){return $===47||$===62||Vn($)?C($):t($)}function R($){return $===62?(e.consume($),L):t($)}function L($){return $===null||pn($)?B($):Vn($)?(e.consume($),L):t($)}function B($){return $===45&&r===2?(e.consume($),P):$===60&&r===1?(e.consume($),z):$===62&&r===4?(e.consume($),V):$===63&&r===3?(e.consume($),D):$===93&&r===5?(e.consume($),Y):pn($)&&(r===6||r===7)?(e.exit("htmlFlowData"),e.check(Zle,W,G)($)):$===null||pn($)?(e.exit("htmlFlowData"),G($)):(e.consume($),B)}function G($){return e.check(Qle,H,W)($)}function H($){return e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),U}function U($){return $===null||pn($)?G($):(e.enter("htmlFlowData"),B($))}function P($){return $===45?(e.consume($),D):B($)}function z($){return $===47?(e.consume($),o="",F):B($)}function F($){if($===62){const X=o.toLowerCase();return sj.includes(X)?(e.consume($),V):B($)}return er($)&&o.length<8?(e.consume($),o+=String.fromCharCode($),F):B($)}function Y($){return $===93?(e.consume($),D):B($)}function D($){return $===62?(e.consume($),V):$===45&&r===2?(e.consume($),D):B($)}function V($){return $===null||pn($)?(e.exit("htmlFlowData"),W($)):(e.consume($),V)}function W($){return e.exit("htmlFlow"),n($)}}function nue(e,n,t){const i=this;return r;function r(o){return pn(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 tue(e,n,t){return i;function i(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Gm,n,t)}}const iue={name:"htmlText",tokenize:rue};function rue(e,n,t){const i=this;let r,a,o;return l;function l(D){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(D),f}function f(D){return D===33?(e.consume(D),c):D===47?(e.consume(D),A):D===63?(e.consume(D),C):er(D)?(e.consume(D),N):t(D)}function c(D){return D===45?(e.consume(D),h):D===91?(e.consume(D),a=0,y):er(D)?(e.consume(D),S):t(D)}function h(D){return D===45?(e.consume(D),v):t(D)}function d(D){return D===null?t(D):D===45?(e.consume(D),p):pn(D)?(o=d,z(D)):(e.consume(D),d)}function p(D){return D===45?(e.consume(D),v):d(D)}function v(D){return D===62?P(D):D===45?p(D):d(D)}function y(D){const V="CDATA[";return D===V.charCodeAt(a++)?(e.consume(D),a===V.length?b:y):t(D)}function b(D){return D===null?t(D):D===93?(e.consume(D),w):pn(D)?(o=b,z(D)):(e.consume(D),b)}function w(D){return D===93?(e.consume(D),_):b(D)}function _(D){return D===62?P(D):D===93?(e.consume(D),_):b(D)}function S(D){return D===null||D===62?P(D):pn(D)?(o=S,z(D)):(e.consume(D),S)}function C(D){return D===null?t(D):D===63?(e.consume(D),E):pn(D)?(o=C,z(D)):(e.consume(D),C)}function E(D){return D===62?P(D):C(D)}function A(D){return er(D)?(e.consume(D),T):t(D)}function T(D){return D===45||Ui(D)?(e.consume(D),T):j(D)}function j(D){return pn(D)?(o=j,z(D)):Vn(D)?(e.consume(D),j):P(D)}function N(D){return D===45||Ui(D)?(e.consume(D),N):D===47||D===62||Ct(D)?q(D):t(D)}function q(D){return D===47?(e.consume(D),P):D===58||D===95||er(D)?(e.consume(D),R):pn(D)?(o=q,z(D)):Vn(D)?(e.consume(D),q):P(D)}function R(D){return D===45||D===46||D===58||D===95||Ui(D)?(e.consume(D),R):L(D)}function L(D){return D===61?(e.consume(D),B):pn(D)?(o=L,z(D)):Vn(D)?(e.consume(D),L):q(D)}function B(D){return D===null||D===60||D===61||D===62||D===96?t(D):D===34||D===39?(e.consume(D),r=D,G):pn(D)?(o=B,z(D)):Vn(D)?(e.consume(D),B):(e.consume(D),H)}function G(D){return D===r?(e.consume(D),r=void 0,U):D===null?t(D):pn(D)?(o=G,z(D)):(e.consume(D),G)}function H(D){return D===null||D===34||D===39||D===60||D===61||D===96?t(D):D===47||D===62||Ct(D)?q(D):(e.consume(D),H)}function U(D){return D===47||D===62||Ct(D)?q(D):t(D)}function P(D){return D===62?(e.consume(D),e.exit("htmlTextData"),e.exit("htmlText"),n):t(D)}function z(D){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),F}function F(D){return Vn(D)?Qn(e,Y,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):Y(D)}function Y(D){return e.enter("htmlTextData"),o(D)}}const KC={name:"labelEnd",resolveAll:lue,resolveTo:uue,tokenize:fue},aue={tokenize:cue},oue={tokenize:due},sue={tokenize:hue};function lue(e){let n=-1;const t=[];for(;++n=3&&(c===null||pn(c))?(e.exit("thematicBreak"),n(c)):t(c)}function f(c){return c===r?(e.consume(c),i++,f):(e.exit("thematicBreakSequence"),Vn(c)?Qn(e,l,"whitespace")(c):l(c))}}const dr={continuation:{tokenize:xue},exit:Cue,name:"list",tokenize:_ue},wue={partial:!0,tokenize:Aue},kue={partial:!0,tokenize:Sue};function _ue(e,n,t){const i=this,r=i.events[i.events.length-1];let a=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0,o=0;return l;function l(v){const y=i.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!i.containerState.marker||v===i.containerState.marker:OS(v)){if(i.containerState.type||(i.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(rg,t,c)(v):c(v);if(!i.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(v)}return t(v)}function f(v){return OS(v)&&++o<10?(e.consume(v),f):(!i.interrupt||o<2)&&(i.containerState.marker?v===i.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),c(v)):t(v)}function c(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||v,e.check(Gm,i.interrupt?t:h,e.attempt(wue,p,d))}function h(v){return i.containerState.initialBlankLine=!0,a++,p(v)}function d(v){return Vn(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),p):t(v)}function p(v){return i.containerState.size=a+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(v)}}function xue(e,n,t){const i=this;return i.containerState._closeFlow=void 0,e.check(Gm,r,a);function r(l){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Qn(e,n,"listItemIndent",i.containerState.size+1)(l)}function a(l){return i.containerState.furtherBlankLines||!Vn(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(kue,n,o)(l))}function o(l){return i.containerState._closeFlow=!0,i.interrupt=void 0,Qn(e,e.attempt(dr,n,t),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function Sue(e,n,t){const i=this;return Qn(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 Cue(e){e.exit(this.containerState.type)}function Aue(e,n,t){const i=this;return Qn(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!Vn(a)&&o&&o[1].type==="listItemPrefixWhitespace"?n(a):t(a)}}const lj={name:"setextUnderline",resolveTo:Oue,tokenize:Eue};function Oue(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 Eue(e,n,t){const i=this;let r;return a;function a(c){let h=i.events.length,d;for(;h--;)if(i.events[h][1].type!=="lineEnding"&&i.events[h][1].type!=="linePrefix"&&i.events[h][1].type!=="content"){d=i.events[h][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||d)?(e.enter("setextHeadingLine"),r=c,o(c)):t(c)}function o(c){return e.enter("setextHeadingLineSequence"),l(c)}function l(c){return c===r?(e.consume(c),l):(e.exit("setextHeadingLineSequence"),Vn(c)?Qn(e,f,"lineSuffix")(c):f(c))}function f(c){return c===null||pn(c)?(e.exit("setextHeadingLine"),n(c)):t(c)}}const Tue={tokenize:Mue};function Mue(e){const n=this,t=e.attempt(Gm,i,e.attempt(this.parser.constructs.flowInitial,r,Qn(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Nle,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 jue={resolveAll:lq()},Due=sq("string"),Rue=sq("text");function sq(e){return{resolveAll:lq(e==="text"?Pue:void 0),tokenize:n};function n(t){const i=this,r=this.parser.constructs[e],a=t.attempt(r,o,l);return o;function o(h){return c(h)?a(h):l(h)}function l(h){if(h===null){t.consume(h);return}return t.enter("data"),t.consume(h),f}function f(h){return c(h)?(t.exit("data"),a(h)):(t.consume(h),f)}function c(h){if(h===null)return!0;const d=r[h];let p=-1;if(d)for(;++p-1){const l=o[0];typeof l=="string"?o[0]=l.slice(i):o.shift()}a>0&&o.push(e[r].slice(0,a))}return o}function Gue(e,n){let t=-1;const i=[];let r;for(;++t0){const Le=xe.tokenStack[xe.tokenStack.length-1];(Le[1]||fj).call(xe,void 0,Le[0])}for(me.position={start:$s(Q.length>0?Q[0][1].start:{line:1,column:1,offset:0}),end:$s(Q.length>0?Q[Q.length-2][1].end:{line:1,column:1,offset:0})},ne=-1;++ne0&&(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 sfe(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function lfe(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ufe(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(n.identifier).toUpperCase(),r=Pc(i.toLowerCase()),a=e.footnoteOrder.indexOf(i);let o,l=e.footnoteCounts.get(i);l===void 0?(l=0,e.footnoteOrder.push(i),o=e.footnoteOrder.length):o=a+1,l+=1,e.footnoteCounts.set(i,l);const f={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+r,id:t+"fnref-"+r+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(n,f);const c={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(n,c),e.applyData(n,c)}function ffe(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 cfe(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function cq(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 dfe(e,n){const t=String(n.identifier).toUpperCase(),i=e.definitionById.get(t);if(!i)return cq(e,n);const r={src:Pc(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 hfe(e,n){const t={src:Pc(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 mfe(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 pfe(e,n){const t=String(n.identifier).toUpperCase(),i=e.definitionById.get(t);if(!i)return cq(e,n);const r={href:Pc(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 vfe(e,n){const t={href:Pc(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 gfe(e,n,t){const i=e.all(n),r=t?yfe(t):dq(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 bfe(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=HC(n.children[1]),f=VF(n.children[n.children.length-1]);l&&f&&(o.position={start:l,end:f}),r.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(r,!0)};return e.patch(n,a),e.applyData(n,a)}function Sfe(e,n,t){const i=t?t.children:void 0,a=(i?i.indexOf(n):1)===0?"th":"td",o=t&&t.type==="table"?t.align:void 0,l=o?o.length:n.children.length;let f=-1;const c=[];for(;++f0,!0),i[0]),r=i.index+i[0].length,i=t.exec(n);return a.push(hj(n.slice(r),r>0,!1)),a.join("")}function hj(e,n,t){let i=0,r=e.length;if(n){let a=e.codePointAt(i);for(;a===cj||a===dj;)i++,a=e.codePointAt(i)}if(t){let a=e.codePointAt(r-1);for(;a===cj||a===dj;)r--,a=e.codePointAt(r-1)}return r>i?e.slice(i,r):""}function Ofe(e,n){const t={type:"text",value:Afe(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function Efe(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const Tfe={blockquote:rfe,break:afe,code:ofe,delete:sfe,emphasis:lfe,footnoteReference:ufe,heading:ffe,html:cfe,imageReference:dfe,image:hfe,inlineCode:mfe,linkReference:pfe,link:vfe,listItem:gfe,list:bfe,paragraph:wfe,root:kfe,strong:_fe,table:xfe,tableCell:Cfe,tableRow:Sfe,text:Ofe,thematicBreak:Efe,toml:Cv,yaml:Cv,definition:Cv,footnoteDefinition:Cv};function Cv(){}const hq=-1,Ky=0,gh=1,Og=2,XC=3,ZC=4,QC=5,JC=6,mq=7,pq=8,Mfe=typeof self=="object"?self:globalThis,mj=(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 Mfe[e](n)},jfe=(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 Ky:case hq:return t(o,r);case gh:{const l=t([],r);for(const f of o)l.push(i(f));return l}case Og:{const l=t({},r);for(const[f,c]of o)l[i(f)]=i(c);return l}case XC:return t(new Date(o),r);case ZC:{const{source:l,flags:f}=o;return t(new RegExp(l,f),r)}case QC:{const l=t(new Map,r);for(const[f,c]of o)l.set(i(f),i(c));return l}case JC:{const l=t(new Set,r);for(const f of o)l.add(i(f));return l}case mq:{const{name:l,message:f}=o;return t(mj(l,f),r)}case pq: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(mj(a,o),r)};return i},pj=e=>jfe(new Map,e)(0),yf="",{toString:Dfe}={},{keys:Rfe}=Object,Fd=e=>{const n=typeof e;if(n!=="object"||!e)return[Ky,n];const t=Dfe.call(e).slice(8,-1);switch(t){case"Array":return[gh,yf];case"Object":return[Og,yf];case"Date":return[XC,yf];case"RegExp":return[ZC,yf];case"Map":return[QC,yf];case"Set":return[JC,yf];case"DataView":return[gh,t]}return t.includes("Array")?[gh,t]:t.includes("Error")?[mq,t]:[Og,t]},Av=([e,n])=>e===Ky&&(n==="function"||n==="symbol"),Pfe=(e,n,t,i)=>{const r=(o,l)=>{const f=i.push(o)-1;return t.set(l,f),f},a=o=>{if(t.has(o))return t.get(o);let[l,f]=Fd(o);switch(l){case Ky:{let h=o;switch(f){case"bigint":l=pq,h=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);h=null;break;case"undefined":return r([hq],o)}return r([l,h],o)}case gh:{if(f){let p=o;return f==="DataView"?p=new Uint8Array(o.buffer):f==="ArrayBuffer"&&(p=new Uint8Array(o)),r([f,[...p]],o)}const h=[],d=r([l,h],o);for(const p of o)h.push(a(p));return d}case Og:{if(f)switch(f){case"BigInt":return r([f,o.toString()],o);case"Boolean":case"Number":case"String":return r([f,o.valueOf()],o)}if(n&&"toJSON"in o)return a(o.toJSON());const h=[],d=r([l,h],o);for(const p of Rfe(o))(e||!Av(Fd(o[p])))&&h.push([a(p),a(o[p])]);return d}case XC:return r([l,o.toISOString()],o);case ZC:{const{source:h,flags:d}=o;return r([l,{source:h,flags:d}],o)}case QC:{const h=[],d=r([l,h],o);for(const[p,v]of o)(e||!(Av(Fd(p))||Av(Fd(v))))&&h.push([a(p),a(v)]);return d}case JC:{const h=[],d=r([l,h],o);for(const p of o)(e||!Av(Fd(p)))&&h.push(a(p));return d}}const{message:c}=o;return r([l,{name:f,message:c}],o)};return a},vj=(e,{json:n,lossy:t}={})=>{const i=[];return Pfe(!(n||t),!!n,new Map,i)(e),i},Eg=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?pj(vj(e,n)):structuredClone(e):(e,n)=>pj(vj(e,n));function Nfe(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 $fe(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function zfe(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||Nfe,i=e.options.footnoteBackLabel||$fe,r=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let f=-1;for(;++f0&&y.push({type:"text",value:" "});let S=typeof t=="string"?t:t(f,v);typeof S=="string"&&(S={type:"text",value:S}),y.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+p+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(f,v),className:["data-footnote-backref"]},children:Array.isArray(S)?S:[S]})}const w=h[h.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const S=w.children[w.children.length-1];S&&S.type==="text"?S.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...y)}else h.push(...y);const _={type:"element",tagName:"li",properties:{id:n+"fn-"+p},children:e.wrap(h,!0)};e.patch(c,_),l.push(_)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Eg(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 Xy=(function(e){if(e==null)return Ffe;if(typeof e=="function")return Zy(e);if(typeof e=="object")return Array.isArray(e)?Lfe(e):Ife(e);if(typeof e=="string")return Bfe(e);throw new Error("Expected function, string, or object as test")});function Lfe(e){const n=[];let t=-1;for(;++t":""))+")"})}return p;function p(){let v=vq,y,b,w;if((!n||a(f,c,h[h.length-1]||void 0))&&(v=Vfe(t(f,h)),v[0]===TS))return v;if("children"in f&&f.children){const _=f;if(_.children&&v[0]!==Ufe)for(b=(i?_.children.length:-1)+o,w=h.concat(_);b>-1&&b<_.children.length;){const S=_.children[b];if(y=l(S,b,w)(),y[0]===TS)return y;b=typeof y[1]=="number"?y[1]:b+o}}return v}}}function Vfe(e){return Array.isArray(e)?e:typeof e=="number"?[Hfe,e]:e==null?vq:[e]}function e9(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),gq(e,a,l,r);function l(f,c){const h=c[c.length-1],d=h?h.children.indexOf(f):void 0;return o(f,d,h)}}const MS={}.hasOwnProperty,Wfe={};function Gfe(e,n){const t=n||Wfe,i=new Map,r=new Map,a=new Map,o={...Tfe,...t.handlers},l={all:c,applyData:Kfe,definitionById:i,footnoteById:r,footnoteCounts:a,footnoteOrder:[],handlers:o,one:f,options:t,patch:Yfe,wrap:Zfe};return e9(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const d=h.type==="definition"?i:r,p=String(h.identifier).toUpperCase();d.has(p)||d.set(p,h)}}),l;function f(h,d){const p=h.type,v=l.handlers[p];if(MS.call(l.handlers,p)&&v)return v(l,h,d);if(l.options.passThrough&&l.options.passThrough.includes(p)){if("children"in h){const{children:b,...w}=h,_=Eg(w);return _.children=l.all(h),_}return Eg(h)}return(l.options.unknownHandler||Xfe)(l,h,d)}function c(h){const d=[];if("children"in h){const p=h.children;let v=-1;for(;++v0&&t.push({type:"text",value:` -`}),t}function gj(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function yj(e,n){const t=Gfe(e,n),i=t.one(e,void 0),r=zfe(t),a=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return r&&a.children.push({type:"text",value:` -`},r),a}function Qfe(e,n){return e&&"run"in e?async function(t,i){const r=yj(t,{file:i,...n});await e.run(r,i)}:function(t,i){return yj(t,{file:i,...e||n})}}function bj(e){if(e)throw e}var Dk,wj;function Jfe(){if(wj)return Dk;wj=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,i=Object.getOwnPropertyDescriptor,r=function(c){return typeof Array.isArray=="function"?Array.isArray(c):n.call(c)==="[object Array]"},a=function(c){if(!c||n.call(c)!=="[object Object]")return!1;var h=e.call(c,"constructor"),d=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!h&&!d)return!1;var p;for(p in c);return typeof p>"u"||e.call(c,p)},o=function(c,h){t&&h.name==="__proto__"?t(c,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):c[h.name]=h.newValue},l=function(c,h){if(h==="__proto__")if(e.call(c,h)){if(i)return i(c,h).value}else return;return c[h]};return Dk=function f(){var c,h,d,p,v,y,b=arguments[0],w=1,_=arguments.length,S=!1;for(typeof b=="boolean"&&(S=b,b=arguments[1]||{},w=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});w<_;++w)if(c=arguments[w],c!=null)for(h in c)d=l(b,h),p=l(c,h),b!==p&&(S&&p&&(a(p)||(v=r(p)))?(v?(v=!1,y=d&&r(d)?d:[]):y=d&&a(d)?d:{},o(b,{name:h,newValue:f(S,y,p)})):typeof p<"u"&&o(b,{name:h,newValue:p}));return b},Dk}var ece=Jfe();const Rk=ot(ece);function jS(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 nce(){const e=[],n={run:t,use:i};return n;function t(...r){let a=-1;const o=r.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);l(null,...r);function l(f,...c){const h=e[++a];let d=-1;if(f){o(f);return}for(;++do.length;let f;l&&o.push(r);try{f=e.apply(this,o)}catch(c){const h=c;if(l&&t)throw h;return r(h)}l||(f&&f.then&&typeof f.then=="function"?f.then(a,r):f instanceof Error?r(f):a(f))}function r(o,...l){t||(t=!0,n(o,...l))}function a(o){r(null,o)}}const Va={basename:ice,dirname:rce,extname:ace,join:oce,sep:"/"};function ice(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Ym(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 rce(e){if(Ym(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 ace(e){Ym(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 oce(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function lce(e,n){let t="",i=0,r=-1,a=0,o=-1,l,f;for(;++o<=e.length;){if(o2){if(f=t.lastIndexOf("/"),f!==t.length-1){f<0?(t="",i=0):(t=t.slice(0,f),i=t.length-1-t.lastIndexOf("/")),r=o,a=0;continue}}else if(t.length>0){t="",i=0,r=o,a=0;continue}}n&&(t=t.length>0?t+"/..":"..",i=2)}else t.length>0?t+="/"+e.slice(r+1,o):t=e.slice(r+1,o),i=o-r-1;r=o,a=0}else l===46&&a>-1?a++:a=-1}return t}function Ym(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const uce={cwd:fce};function fce(){return"/"}function DS(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function cce(e){if(typeof e=="string")e=new URL(e);else if(!DS(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 dce(e)}function dce(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const n=e.pathname;let t=-1;for(;++t0){let[v,...y]=h;const b=i[p][1];jS(b)&&jS(v)&&(v=Rk(!0,b,v)),i[p]=[c,v,...y]}}}}const vce=new n9().freeze();function zk(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Lk(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ik(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 _j(e){if(!jS(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function xj(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Ov(e){return gce(e)?e:new yq(e)}function gce(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function yce(e){return typeof e=="string"||bce(e)}function bce(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const wce="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Sj=[],Cj={allowDangerousHtml:!0},kce=/^(https?|ircs?|mailto|xmpp)$/i,_ce=[{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 xce(e){const n=Sce(e),t=Cce(e);return Ace(n.runSync(n.parse(t),t),e)}function Sce(e){const n=e.rehypePlugins||Sj,t=e.remarkPlugins||Sj,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Cj}:Cj;return vce().use(ife).use(t).use(Qfe,i).use(n)}function Cce(e){const n=e.children||"",t=new yq;return typeof n=="string"&&(t.value=n),t}function Ace(e,n){const t=n.allowedElements,i=n.allowElement,r=n.components,a=n.disallowedElements,o=n.skipHtml,l=n.unwrapDisallowed,f=n.urlTransform||Oce;for(const h of _ce)Object.hasOwn(n,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+wce+h.id,void 0);return e9(e,c),Bse(e,{Fragment:k.Fragment,components:r,ignoreInvalidStyle:!0,jsx:k.jsx,jsxs:k.jsxs,passKeys:!0,passNode:!0});function c(h,d,p){if(h.type==="raw"&&p&&typeof d=="number")return o?p.children.splice(d,1):p.children[d]={type:"text",value:h.value},d;if(h.type==="element"){let v;for(v in Tk)if(Object.hasOwn(Tk,v)&&Object.hasOwn(h.properties,v)){const y=h.properties[v],b=Tk[v];(b===null||b.includes(h.tagName))&&(h.properties[v]=f(String(y||""),v,h))}}if(h.type==="element"){let v=t?!t.includes(h.tagName):a?a.includes(h.tagName):!1;if(!v&&i&&typeof d=="number"&&(v=!i(h,d,p)),v&&p&&typeof d=="number")return l&&h.children?p.children.splice(d,1,...h.children):p.children.splice(d,1),d}}}function Oce(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||kce.test(e.slice(0,n))?e:""}function Aj(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 Ece(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Tce(e,n,t){const r=Xy((t||{}).ignore||[]),a=Mce(n);let o=-1;for(;++o0?{type:"text",value:T}:void 0),T===!1?p.lastIndex=E+1:(y!==E&&S.push({type:"text",value:c.value.slice(y,E)}),Array.isArray(T)?S.push(...T):T&&S.push(T),y=E+C[0].length,_=!0),!p.global)break;C=p.exec(c.value)}return _?(y?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],i=t.indexOf(")");const r=Aj(e,"(");let a=Aj(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 bq(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||uu(t)||Gy(t))&&(!n||t!==47)}wq.peek=Jce;function Vce(){this.buffer()}function Wce(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Gce(){this.buffer()}function Yce(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Kce(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=ja(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Xce(e){this.exit(e)}function Zce(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=ja(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Qce(e){this.exit(e)}function Jce(){return"["}function wq(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 ede(){return{enter:{gfmFootnoteCallString:Vce,gfmFootnoteCall:Wce,gfmFootnoteDefinitionLabelString:Gce,gfmFootnoteDefinition:Yce},exit:{gfmFootnoteCallString:Kce,gfmFootnoteCall:Xce,gfmFootnoteDefinitionLabelString:Zce,gfmFootnoteDefinition:Qce}}}function nde(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:wq},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(i,r,a,o){const l=a.createTracker(o);let f=l.move("[^");const c=a.enter("footnoteDefinition"),h=a.enter("label");return f+=l.move(a.safe(a.associationId(i),{before:f,after:"]"})),h(),f+=l.move("]:"),i.children&&i.children.length>0&&(l.shift(4),f+=l.move((n?` -`:" ")+a.indentLines(a.containerFlow(i,l.current()),n?kq:tde))),c(),f}}function tde(e,n,t){return n===0?e:kq(e,n,t)}function kq(e,n,t){return(t?"":" ")+e}const ide=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];_q.peek=lde;function rde(){return{canContainEols:["delete"],enter:{strikethrough:ode},exit:{strikethrough:sde}}}function ade(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ide}],handlers:{delete:_q}}}function ode(e){this.enter({type:"delete",children:[]},e)}function sde(e){this.exit(e)}function _q(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 lde(){return"~"}function ude(e){return e.length}function fde(e,n){const t=n||{},i=(t.align||[]).concat(),r=t.stringLength||ude,a=[],o=[],l=[],f=[];let c=0,h=-1;for(;++hc&&(c=e[h].length);++_f[_])&&(f[_]=C)}b.push(S)}o[h]=b,l[h]=w}let d=-1;if(typeof i=="object"&&"length"in i)for(;++df[d]&&(f[d]=S),v[d]=S),p[d]=C}o.splice(1,0,p),l.splice(1,0,v),h=-1;const y=[];for(;++h "),a.shift(2);const o=t.indentLines(t.containerFlow(e,a.current()),hde);return r(),o}function hde(e,n,t){return">"+(t?"":" ")+e}function mde(e,n){return Ej(e,n.inConstruct,!0)&&!Ej(e,n.notInConstruct,!1)}function Ej(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 vde(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 gde(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 yde(e,n,t,i){const r=gde(t),a=e.value||"",o=r==="`"?"GraveAccent":"Tilde";if(vde(e,t)){const d=t.enter("codeIndented"),p=t.indentLines(a,bde);return d(),p}const l=t.createTracker(i),f=r.repeat(Math.max(pde(a,r)+1,3)),c=t.enter("codeFenced");let h=l.move(f);if(e.lang){const d=t.enter(`codeFencedLang${o}`);h+=l.move(t.safe(e.lang,{before:h,after:" ",encode:["`"],...l.current()})),d()}if(e.lang&&e.meta){const d=t.enter(`codeFencedMeta${o}`);h+=l.move(" "),h+=l.move(t.safe(e.meta,{before:h,after:` -`,encode:["`"],...l.current()})),d()}return h+=l.move(` -`),a&&(h+=l.move(a+` -`)),h+=l.move(f),c(),h}function bde(e,n,t){return(t?"":" ")+e}function t9(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 wde(e,n,t,i){const r=t9(t),a=r==='"'?"Quote":"Apostrophe",o=t.enter("definition");let l=t.enter("label");const f=t.createTracker(i);let c=f.move("[");return c+=f.move(t.safe(t.associationId(e),{before:c,after:"]",...f.current()})),c+=f.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),c+=f.move("<"),c+=f.move(t.safe(e.url,{before:c,after:">",...f.current()})),c+=f.move(">")):(l=t.enter("destinationRaw"),c+=f.move(t.safe(e.url,{before:c,after:e.title?" ":` -`,...f.current()}))),l(),e.title&&(l=t.enter(`title${a}`),c+=f.move(" "+r),c+=f.move(t.safe(e.title,{before:c,after:r,...f.current()})),c+=f.move(r),l()),o(),c}function kde(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 Bh(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Tg(e,n,t){const i=Hf(e),r=Hf(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}}xq.peek=_de;function xq(e,n,t,i){const r=kde(t),a=t.enter("emphasis"),o=t.createTracker(i),l=o.move(r);let f=o.move(t.containerPhrasing(e,{after:r,before:l,...o.current()}));const c=f.charCodeAt(0),h=Tg(i.before.charCodeAt(i.before.length-1),c,r);h.inside&&(f=Bh(c)+f.slice(1));const d=f.charCodeAt(f.length-1),p=Tg(i.after.charCodeAt(0),d,r);p.inside&&(f=f.slice(0,-1)+Bh(d));const v=o.move(r);return a(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},l+f+v}function _de(e,n,t){return t.options.emphasis||"*"}function xde(e,n){let t=!1;return e9(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return t=!0,TS}),!!((!e.depth||e.depth<3)&&GC(e)&&(n.options.setext||t))}function Sde(e,n,t,i){const r=Math.max(Math.min(6,e.depth||1),1),a=t.createTracker(i);if(xde(e,t)){const h=t.enter("headingSetext"),d=t.enter("phrasing"),p=t.containerPhrasing(e,{...a.current(),before:` -`,after:` -`});return d(),h(),p+` -`+(r===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(` -`))+1))}const o="#".repeat(r),l=t.enter("headingAtx"),f=t.enter("phrasing");a.move(o+" ");let c=t.containerPhrasing(e,{before:"# ",after:` -`,...a.current()});return/^[\t ]/.test(c)&&(c=Bh(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,t.options.closeAtx&&(c+=" "+o),f(),l(),c}Sq.peek=Cde;function Sq(e){return e.value||""}function Cde(){return"<"}Cq.peek=Ade;function Cq(e,n,t,i){const r=t9(t),a=r==='"'?"Quote":"Apostrophe",o=t.enter("image");let l=t.enter("label");const f=t.createTracker(i);let c=f.move("![");return c+=f.move(t.safe(e.alt,{before:c,after:"]",...f.current()})),c+=f.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),c+=f.move("<"),c+=f.move(t.safe(e.url,{before:c,after:">",...f.current()})),c+=f.move(">")):(l=t.enter("destinationRaw"),c+=f.move(t.safe(e.url,{before:c,after:e.title?" ":")",...f.current()}))),l(),e.title&&(l=t.enter(`title${a}`),c+=f.move(" "+r),c+=f.move(t.safe(e.title,{before:c,after:r,...f.current()})),c+=f.move(r),l()),c+=f.move(")"),o(),c}function Ade(){return"!"}Aq.peek=Ode;function Aq(e,n,t,i){const r=e.referenceType,a=t.enter("imageReference");let o=t.enter("label");const l=t.createTracker(i);let f=l.move("![");const c=t.safe(e.alt,{before:f,after:"]",...l.current()});f+=l.move(c+"]["),o();const h=t.stack;t.stack=[],o=t.enter("reference");const d=t.safe(t.associationId(e),{before:f,after:"]",...l.current()});return o(),t.stack=h,a(),r==="full"||!c||c!==d?f+=l.move(d+"]"):r==="shortcut"?f=f.slice(0,-1):f+=l.move("]"),f}function Ode(){return"!"}Oq.peek=Ede;function Oq(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))}Tq.peek=Tde;function Tq(e,n,t,i){const r=t9(t),a=r==='"'?"Quote":"Apostrophe",o=t.createTracker(i);let l,f;if(Eq(e,t)){const h=t.stack;t.stack=[],l=t.enter("autolink");let d=o.move("<");return d+=o.move(t.containerPhrasing(e,{before:d,after:">",...o.current()})),d+=o.move(">"),l(),t.stack=h,d}l=t.enter("link"),f=t.enter("label");let c=o.move("[");return c+=o.move(t.containerPhrasing(e,{before:c,after:"](",...o.current()})),c+=o.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=t.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(t.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(f=t.enter("destinationRaw"),c+=o.move(t.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),f(),e.title&&(f=t.enter(`title${a}`),c+=o.move(" "+r),c+=o.move(t.safe(e.title,{before:c,after:r,...o.current()})),c+=o.move(r),f()),c+=o.move(")"),l(),c}function Tde(e,n,t){return Eq(e,t)?"<":"["}Mq.peek=Mde;function Mq(e,n,t,i){const r=e.referenceType,a=t.enter("linkReference");let o=t.enter("label");const l=t.createTracker(i);let f=l.move("[");const c=t.containerPhrasing(e,{before:f,after:"]",...l.current()});f+=l.move(c+"]["),o();const h=t.stack;t.stack=[],o=t.enter("reference");const d=t.safe(t.associationId(e),{before:f,after:"]",...l.current()});return o(),t.stack=h,a(),r==="full"||!c||c!==d?f+=l.move(d+"]"):r==="shortcut"?f=f.slice(0,-1):f+=l.move("]"),f}function Mde(){return"["}function i9(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 jde(e){const n=i9(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 Dde(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 jq(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 Rde(e,n,t,i){const r=t.enter("list"),a=t.bulletCurrent;let o=e.ordered?Dde(t):i9(t);const l=e.ordered?o==="."?")":".":jde(t);let f=n&&t.bulletLastUsed?o===t.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&h&&(!h.children||!h.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(f=!0),jq(t)===o&&h){let d=-1;for(;++d-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+a);let o=a.length+1;(r==="tab"||r==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(o=Math.ceil(o/4)*4);const l=t.createTracker(i);l.move(a+" ".repeat(o-a.length)),l.shift(o);const f=t.enter("listItem"),c=t.indentLines(t.containerFlow(e,l.current()),h);return f(),c;function h(d,p,v){return p?(v?"":" ".repeat(o))+d:(v?a:a+" ".repeat(o-a.length))+d}}function $de(e,n,t,i){const r=t.enter("paragraph"),a=t.enter("phrasing"),o=t.containerPhrasing(e,i);return a(),r(),o}const zde=Xy(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Lde(e,n,t,i){return(e.children.some(function(o){return zde(o)})?t.containerPhrasing:t.containerFlow).call(t,e,i)}function Ide(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}Dq.peek=Bde;function Dq(e,n,t,i){const r=Ide(t),a=t.enter("strong"),o=t.createTracker(i),l=o.move(r+r);let f=o.move(t.containerPhrasing(e,{after:r,before:l,...o.current()}));const c=f.charCodeAt(0),h=Tg(i.before.charCodeAt(i.before.length-1),c,r);h.inside&&(f=Bh(c)+f.slice(1));const d=f.charCodeAt(f.length-1),p=Tg(i.after.charCodeAt(0),d,r);p.inside&&(f=f.slice(0,-1)+Bh(d));const v=o.move(r+r);return a(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},l+f+v}function Bde(e,n,t){return t.options.strong||"*"}function Fde(e,n,t,i){return t.safe(e.value,i)}function qde(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 Hde(e,n,t){const i=(jq(t)+(t.options.ruleSpaces?" ":"")).repeat(qde(t));return t.options.ruleSpaces?i.slice(0,-1):i}const Rq={blockquote:dde,break:Tj,code:yde,definition:wde,emphasis:xq,hardBreak:Tj,heading:Sde,html:Sq,image:Cq,imageReference:Aq,inlineCode:Oq,link:Tq,linkReference:Mq,list:Rde,listItem:Nde,paragraph:$de,root:Lde,strong:Dq,text:Fde,thematicBreak:Hde};function Ude(){return{enter:{table:Vde,tableData:Mj,tableHeader:Mj,tableRow:Gde},exit:{codeText:Yde,table:Wde,tableData:Hk,tableHeader:Hk,tableRow:Hk}}}function Vde(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 Wde(e){this.exit(e),this.data.inTable=void 0}function Gde(e){this.enter({type:"tableRow",children:[]},e)}function Hk(e){this.exit(e)}function Mj(e){this.enter({type:"tableCell",children:[]},e)}function Yde(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,Kde));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function Kde(e,n){return n==="|"?n:e}function Xde(e){const n=e||{},t=n.tableCellPadding,i=n.tablePipeAlign,r=n.stringLength,a=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` -`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:o,tableCell:f,tableRow:l}};function o(v,y,b,w){return c(h(v,b,w),v.align)}function l(v,y,b,w){const _=d(v,b,w),S=c([_]);return S.slice(0,S.indexOf(` -`))}function f(v,y,b,w){const _=b.enter("tableCell"),S=b.enter("phrasing"),C=b.containerPhrasing(v,{...w,before:a,after:a});return S(),_(),C}function c(v,y){return fde(v,{align:y,alignDelimiters:i,padding:t,stringLength:r})}function h(v,y,b){const w=v.children;let _=-1;const S=[],C=y.enter("table");for(;++_0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const mhe={tokenize:_he,partial:!0};function phe(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:bhe,continuation:{tokenize:whe},exit:khe}},text:{91:{name:"gfmFootnoteCall",tokenize:yhe},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:vhe,resolveTo:ghe}}}}function vhe(e,n,t){const i=this;let r=i.events.length;const a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o;for(;r--;){const f=i.events[r][1];if(f.type==="labelImage"){o=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return l;function l(f){if(!o||!o._balanced)return t(f);const c=ja(i.sliceSerialize({start:o.end,end:i.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?t(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),n(f))}}function ghe(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 yhe(e,n,t){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a=0,o;return l;function l(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),f}function f(d){return d!==94?t(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(a>999||d===93&&!o||d===null||d===91||Ct(d))return t(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return r.includes(ja(i.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(d)}return Ct(d)||(o=!0),a++,e.consume(d),d===92?h:c}function h(d){return d===91||d===92||d===93?(e.consume(d),a++,c):c(d)}}function bhe(e,n,t){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a,o=0,l;return f;function f(y){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(y){return y===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):t(y)}function h(y){if(o>999||y===93&&!l||y===null||y===91||Ct(y))return t(y);if(y===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return a=ja(i.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Ct(y)||(l=!0),o++,e.consume(y),y===92?d:h}function d(y){return y===91||y===92||y===93?(e.consume(y),o++,h):h(y)}function p(y){return y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),r.includes(a)||r.push(a),Qn(e,v,"gfmFootnoteDefinitionWhitespace")):t(y)}function v(y){return n(y)}}function whe(e,n,t){return e.check(Gm,n,e.attempt(mhe,n,t))}function khe(e){e.exit("gfmFootnoteDefinition")}function _he(e,n,t){const i=this;return Qn(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 xhe(e){let t=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:a,resolveAll:r};return t==null&&(t=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function r(o,l){let f=-1;for(;++f1?f(y):(o.consume(y),d++,v);if(d<2&&!t)return f(y);const w=o.exit("strikethroughSequenceTemporary"),_=Hf(y);return w._open=!_||_===2&&!!b,w._close=!b||b===2&&!!_,l(y)}}}class She{constructor(){this.map=[]}add(n,t,i){Che(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 Che(e,n,t,i){let r=0;if(!(t===0&&i.length===0)){for(;r-1;){const H=i.events[L][1].type;if(H==="lineEnding"||H==="linePrefix")L--;else break}const B=L>-1?i.events[L][1].type:null,G=B==="tableHead"||B==="tableRow"?T:f;return G===T&&i.parser.lazy[i.now().line]?t(R):G(R)}function f(R){return e.enter("tableHead"),e.enter("tableRow"),c(R)}function c(R){return R===124||(o=!0,a+=1),h(R)}function h(R){return R===null?t(R):pn(R)?a>1?(a=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),v):t(R):Vn(R)?Qn(e,h,"whitespace")(R):(a+=1,o&&(o=!1,r+=1),R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),o=!0,h):(e.enter("data"),d(R)))}function d(R){return R===null||R===124||Ct(R)?(e.exit("data"),h(R)):(e.consume(R),R===92?p:d)}function p(R){return R===92||R===124?(e.consume(R),d):d(R)}function v(R){return i.interrupt=!1,i.parser.lazy[i.now().line]?t(R):(e.enter("tableDelimiterRow"),o=!1,Vn(R)?Qn(e,y,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):y(R))}function y(R){return R===45||R===58?w(R):R===124?(o=!0,e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),b):A(R)}function b(R){return Vn(R)?Qn(e,w,"whitespace")(R):w(R)}function w(R){return R===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),_):R===45?(a+=1,_(R)):R===null||pn(R)?E(R):A(R)}function _(R){return R===45?(e.enter("tableDelimiterFiller"),S(R)):A(R)}function S(R){return R===45?(e.consume(R),S):R===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(R))}function C(R){return Vn(R)?Qn(e,E,"whitespace")(R):E(R)}function E(R){return R===124?y(R):R===null||pn(R)?!o||r!==a?A(R):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(R)):A(R)}function A(R){return t(R)}function T(R){return e.enter("tableRow"),j(R)}function j(R){return R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),j):R===null||pn(R)?(e.exit("tableRow"),n(R)):Vn(R)?Qn(e,j,"whitespace")(R):(e.enter("data"),N(R))}function N(R){return R===null||R===124||Ct(R)?(e.exit("data"),j(R)):(e.consume(R),R===92?q:N)}function q(R){return R===92||R===124?(e.consume(R),N):N(R)}}function The(e,n){let t=-1,i=!0,r=0,a=[0,0,0,0],o=[0,0,0,0],l=!1,f=0,c,h,d;const p=new She;for(;++tt[2]+1){const y=t[2]+1,b=t[3]-t[2]-1;e.add(y,b,[])}}e.add(t[3]+1,0,[["exit",d,n]])}return r!==void 0&&(a.end=Object.assign({},Cf(n.events,r)),e.add(r,0,[["exit",a,n]]),a=void 0),a}function Dj(e,n,t,i,r){const a=[],o=Cf(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 Cf(e,n){const t=e[n],i=t[0]==="enter"?"start":"end";return t[1][i]}const Mhe={name:"tasklistCheck",tokenize:Dhe};function jhe(){return{text:{91:Mhe}}}function Dhe(e,n,t){const i=this;return r;function r(f){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?t(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),a)}function a(f){return Ct(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),o):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),o):t(f)}function o(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):t(f)}function l(f){return pn(f)?n(f):Vn(f)?e.check({tokenize:Rhe},n,t)(f):t(f)}}function Rhe(e,n,t){return Qn(e,i,"whitespace");function i(r){return r===null?t(r):n(r)}}function Phe(e){return QF([ahe(),phe(),xhe(e),Ohe(),jhe()])}const Nhe={};function $he(e){const n=this,t=e||Nhe,i=n.data(),r=i.micromarkExtensions||(i.micromarkExtensions=[]),a=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),o=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);r.push(Phe(t)),a.push(nhe()),o.push(the(t))}const PS="kanban_chat_v1";function zhe(){try{const e=localStorage.getItem(PS);if(!e)return[];const n=JSON.parse(e);if(Array.isArray(n))return n}catch{}return[]}function Lhe({onBoardChange:e}){const[n,t]=O.useState(()=>zhe()),[i,r]=O.useState(""),[a,o]=O.useState(!1),[l,f]=O.useState(""),[c,h]=O.useState([]),d=O.useRef(null);O.useEffect(()=>{localStorage.setItem(PS,JSON.stringify(n))},[n]),O.useEffect(()=>{var b;(b=d.current)==null||b.scrollTo({top:d.current.scrollHeight,behavior:"smooth"})},[n,l,c,a]);const p=async()=>{const b=i.trim();if(!b||a)return;const w={role:"user",content:b,ts:Date.now()},_=[...n,w];t(_),r(""),o(!0),f(""),h([]);let S="";const C=[];let E=!1;const A=T=>{switch(T.type){case"delta":S+=T.text,f(S);break;case"tool_use":{const j={tool:T.tool,ok:!0,input:T.input};C.push(j),h([...C]);break}case"tool_result":{for(let j=C.length-1;j>=0;j--){const N=C[j];if(N.error===void 0&&N.ok){T.is_error&&(N.ok=!1,N.error=T.result||"tool error");break}}h([...C]);break}case"result":T.text&&S.trim()===""&&(S=T.text,f(S));break;case"done":T.board_changed&&(E=!0);break;case"error":S=`Error: ${T.error}`,f(S);break}};try{const T=_.map(j=>({role:j.role,content:j.content}));await sie(T,A)}catch(T){const j=T.message;et.show({color:"red",message:j}),S=S||`Error: ${j}`}finally{const T={role:"assistant",content:S,ts:Date.now(),tool_calls:C.length>0?C:void 0};t(j=>[...j,T]),f(""),h([]),o(!1),E&&e()}},v=b=>{b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),p())},y=()=>{t([]),localStorage.removeItem(PS)};return k.jsxs($t,{gap:0,h:"100%",children:[k.jsxs(wn,{justify:"space-between",p:"xs",style:{borderBottom:"1px solid var(--mantine-color-dark-4)"},children:[k.jsxs(wn,{gap:6,children:[k.jsx(zF,{size:18}),k.jsx(un,{fw:600,size:"sm",children:"Asistente"})]}),k.jsx(Vi,{label:"Limpiar conversacion",withArrow:!0,children:k.jsx(Ht,{variant:"subtle",color:"gray",size:"sm",onClick:y,disabled:n.length===0,children:k.jsx(Lh,{size:14})})})]}),k.jsx(uo,{viewportRef:d,style:{flex:1},type:"auto",p:"xs",children:k.jsxs($t,{gap:"xs",children:[n.length===0&&!a&&k.jsxs(un,{size:"sm",c:"dimmed",ta:"center",mt:"md",children:["Escribe algo. Ejemplos:",k.jsx("br",{}),'- "crea columna Backlog"',k.jsx("br",{}),'- "anade tarjeta para revisar PR de Lucas en Doing"',k.jsx("br",{}),'- "que hay en Doing?"']}),n.map((b,w)=>k.jsx(Rj,{msg:b},w)),a&&k.jsx(Rj,{msg:{role:"assistant",content:l,ts:Date.now(),tool_calls:c.length>0?c:void 0},streaming:!0}),a&&l===""&&c.length===0&&k.jsxs(wn,{gap:6,pl:"xs",children:[k.jsx(Wi,{size:"xs"}),k.jsx(un,{size:"xs",c:"dimmed",children:"Pensando..."})]})]})}),k.jsx($t,{gap:4,p:"xs",style:{borderTop:"1px solid var(--mantine-color-dark-4)"},children:k.jsxs(wn,{align:"flex-end",gap:4,wrap:"nowrap",children:[k.jsx(Th,{placeholder:"Pide algo... (Enter envia, Shift+Enter newline)",value:i,onChange:b=>r(b.currentTarget.value),onKeyDown:v,disabled:a,autosize:!0,minRows:1,maxRows:6,style:{flex:1}}),k.jsx(Ht,{size:"lg",variant:"filled",onClick:p,disabled:!i.trim()||a,"aria-label":"Send",children:a?k.jsx(Wi,{size:"xs",color:"white"}):k.jsx(Yoe,{size:16})})]})})]})}function Rj({msg:e,streaming:n=!1}){const t=e.role==="user";return k.jsx(ei,{p:"xs",radius:"md",withBorder:!0,bg:t?"blue.9":"dark.6",style:{alignSelf:t?"flex-end":"flex-start",maxWidth:"92%"},children:k.jsxs($t,{gap:4,children:[e.content&&k.jsx(we,{className:"kanban-md",style:{fontSize:13,lineHeight:1.45,color:"var(--mantine-color-text)"},children:k.jsx(xce,{remarkPlugins:[$he],children:e.content})}),n&&e.content&&k.jsx(we,{style:{display:"inline-block",width:8,height:14,background:"currentColor",opacity:.6}}),e.tool_calls&&e.tool_calls.length>0&&k.jsx(wn,{gap:4,wrap:"wrap",children:e.tool_calls.map((i,r)=>k.jsxs(ui,{size:"xs",color:i.ok?"teal":"red",variant:"light",title:i.error||"",leftSection:i.ok&&n?k.jsx(Wi,{size:8,color:"teal"}):null,children:[i.tool,!i.ok&&i.error?`: ${i.error}`:""]},r))})]})})}const Ihe=["Lun","Mar","Mie","Jue","Vie","Sab","Dom"];function Bhe({users:e,cards:n,onJumpToCard:t}){const[i,r]=O.useState(null),[a,o]=O.useState(new Date),[l,f]=O.useState(null),[c,h]=O.useState(null),[d,p]=O.useState(!1);O.useEffect(()=>{let S=!1;p(!0);const C=ze(a).startOf("month").format("YYYY-MM-DD"),E=ze(a).endOf("month").format("YYYY-MM-DD");return CB({from:C,to:E,assignee_id:l||void 0}).then(A=>{S||h(A)}).finally(()=>{S||p(!1)}),()=>{S=!0}},[a,l]);const v=O.useMemo(()=>e.map(S=>({value:S.id,label:S.display_name||S.username})),[e]),y=O.useMemo(()=>{const S=new Map;if(!c)return S;for(const C of c.created_daily){const E=S.get(C.date)??{created:0,done:0,deadlines:[]};E.created=C.count,S.set(C.date,E)}for(const C of c.throughput_daily){const E=S.get(C.date)??{created:0,done:0,deadlines:[]};E.done=C.count,S.set(C.date,E)}for(const C of n){if(!C.deadline||C.deleted_at)continue;const E=C.deadline.slice(0,10),A=S.get(E)??{created:0,done:0,deadlines:[]};A.deadlines.push(C),S.set(E,A)}return S},[c,n]),b=O.useMemo(()=>{const S=ze(a).startOf("month"),C=ze(a).endOf("month"),E=(S.day()+6)%7,A=[];for(let T=0;TArray.from(y.values()).reduce((S,C)=>S+C.created,0),[y]),_=O.useMemo(()=>Array.from(y.values()).reduce((S,C)=>S+C.done,0),[y]);return k.jsx(we,{p:"md",children:k.jsxs($t,{gap:"md",children:[k.jsxs(wn,{justify:"space-between",children:[k.jsx(_u,{order:3,children:"Calendario"}),k.jsxs(wn,{gap:"xs",wrap:"nowrap",children:[k.jsx(IC,{label:"Mes",size:"xs",value:a,onChange:S=>S&&o(typeof S=="string"?new Date(S):S),style:{minWidth:160},clearable:!1}),k.jsx(Zo,{label:"Asignado",size:"xs",placeholder:"Todos",value:l,onChange:f,data:v,clearable:!0,searchable:!0,style:{minWidth:180}})]})]}),k.jsxs(wn,{gap:"md",children:[k.jsx(ei,{withBorder:!0,p:"sm",radius:"md",children:k.jsxs(wn,{gap:6,children:[k.jsx(zh,{size:14,color:"var(--mantine-color-blue-5)"}),k.jsx(un,{size:"sm",fw:600,children:w}),k.jsx(un,{size:"xs",c:"dimmed",children:"creadas"})]})}),k.jsx(ei,{withBorder:!0,p:"sm",radius:"md",children:k.jsxs(wn,{gap:6,children:[k.jsx($h,{size:14,color:"var(--mantine-color-green-5)"}),k.jsx(un,{size:"sm",fw:600,children:_}),k.jsx(un,{size:"xs",c:"dimmed",children:"hechas"})]})})]}),d&&!c?k.jsx(_c,{p:"xl",children:k.jsx(Wi,{})}):k.jsxs(ei,{withBorder:!0,p:"md",radius:"md",children:[k.jsx(Dh,{cols:7,spacing:4,mb:4,children:Ihe.map(S=>k.jsx(un,{size:"xs",c:"dimmed",ta:"center",fw:600,children:S},S))}),k.jsx(Dh,{cols:7,spacing:4,children:b.map((S,C)=>{if(!S.date)return k.jsx(we,{style:{minHeight:72}},C);const E=y.get(S.date)??{created:0,done:0,deadlines:[]},A=parseInt(S.date.slice(8,10),10),T=S.date===ze().format("YYYY-MM-DD"),j=ze().startOf("day").valueOf(),q=ze(S.date).startOf("day").valueOf()0?"rgba(81, 207, 102, 0.08)":E.created>0?"rgba(34, 139, 230, 0.06)":void 0},children:k.jsxs($t,{gap:2,children:[k.jsx(un,{size:"xs",fw:T?700:500,c:T?"blue":void 0,children:A}),E.created>0&&k.jsxs(wn,{gap:3,wrap:"nowrap",children:[k.jsx(zh,{size:10,color:"var(--mantine-color-blue-5)"}),k.jsx(un,{size:"xs",c:"blue",children:E.created})]}),E.done>0&&k.jsxs(wn,{gap:3,wrap:"nowrap",children:[k.jsx($h,{size:10,color:"var(--mantine-color-green-5)"}),k.jsx(un,{size:"xs",c:"green",children:E.done})]}),E.deadlines.length>0&&k.jsxs(Tn,{opened:i===S.date,onChange:R=>r(R?S.date:null),position:"bottom",withArrow:!0,shadow:"md",width:280,children:[k.jsx(Tn.Target,{children:k.jsx(fi,{onClick:()=>r(i===S.date?null:S.date),style:{textAlign:"left"},children:k.jsx($t,{gap:1,children:k.jsxs(wn,{gap:3,wrap:"nowrap",children:[k.jsx(NF,{size:10,color:q?"var(--mantine-color-red-5)":"var(--mantine-color-orange-5)"}),k.jsxs(un,{size:"xs",c:q?"red":"orange",fw:700,td:"underline",children:[E.deadlines.length," deadline",E.deadlines.length===1?"":"s"]})]})})})}),k.jsx(Tn.Dropdown,{p:6,children:k.jsxs($t,{gap:2,children:[k.jsxs(un,{size:"xs",c:"dimmed",fw:600,mb:2,children:["Vencen el ",ze(S.date).format("DD/MM/YYYY")]}),E.deadlines.map(R=>k.jsx(fi,{onClick:()=>{r(null),t==null||t(R.id)},style:{padding:"4px 6px",borderRadius:4,background:"var(--mantine-color-dark-6)"},children:k.jsxs(wn,{gap:6,wrap:"nowrap",children:[k.jsxs(un,{size:"xs",c:"dimmed",ff:"monospace",children:["#",String(R.seq_num).padStart(5,"0")]}),k.jsx(un,{size:"xs",lineClamp:1,title:R.title,children:R.title})]})},R.id))]})})]})]})},C)})})]})]})})}function qq(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 Fhe={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 qhe(e){return e.map(n=>{if(!n.payload||n.payload[n.name])return n;const t=n.name.search(/\./);if(t>=0){const i=n.name.substring(0,t),r={...n.payload[i]},a=Object.entries(n.payload).reduce((o,l)=>{const[f,c]=l;return f===i?o:{...o,[f]:c}},{});return{...n,name:n.name.substring(t+1),payload:{...a,...r}}}return n})}function Hhe(e,n){const t=qhe(e.filter(i=>i.fill!=="none"||!i.color));return n?t.filter(i=>i.name===n):t}function Pj(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 Uhe={type:"area",showColor:!0},a9=Pe(e=>{var R,L;const n=ge("ChartTooltip",Uhe,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,payload:f,label:c,unit:h,type:d,segmentId:p,mod:v,series:y,valueFormatter:b,showColor:w,attributes:_,...S}=n,C=ni(),E=Ge({name:"ChartTooltip",classes:Fhe,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:_});if(!f)return null;const A=Hhe(f,p),T=d==="scatter"?(L=(R=f[0])==null?void 0:R.payload)==null?void 0:L.name:null,j=qq(y),N=c||T,q=A.map(B=>k.jsxs("div",{"data-type":d,...E("tooltipItem"),children:[k.jsxs("div",{...E("tooltipItemBody"),children:[w&&k.jsx("svg",{...E("tooltipItemColor"),children:k.jsx("circle",{r:6,fill:nt(B.color,C),width:12,height:12,cx:6,cy:6})}),k.jsx("div",{...E("tooltipItemName"),children:j[B.name]||B.name})]}),k.jsxs("div",{...E("tooltipItemData"),children:[typeof b=="function"?b(Pj(B,d)):Pj(B,d),h||B.unit]})]},(B==null?void 0:B.key)??B.name));return k.jsxs(we,{...E("tooltip"),mod:[{type:d},v],...S,children:[N&&k.jsx("div",{...E("tooltipLabel"),children:N}),k.jsx("div",{...E("tooltipBody"),children:q})]})});a9.displayName="@mantine/charts/ChartTooltip";var Hq={legend:"m_847eaf",legendItem:"m_17da7e62",legendItemColor:"m_6e236e21",legendItemName:"m_8ff56c0d"};function Vhe(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 Whe(e){return Vhe(e.filter(n=>n.color!=="none"))}const Qy=Pe(e=>{const n=ge("ChartLegend",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,payload:f,onHighlight:c,legendPosition:h,mod:d,series:p,showColor:v,centered:y,attributes:b,...w}=n,_=Ge({name:"ChartLegend",classes:Hq,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,rootSelector:"legend"});if(!f)return null;const S=Whe(f),C=qq(p),E=S.map((A,T)=>k.jsxs("div",{..._("legendItem"),onMouseEnter:()=>c(A.dataKey),onMouseLeave:()=>c(null),"data-without-color":v===!1||void 0,children:[k.jsx(xc,{color:A.color,size:12,..._("legendItemColor"),withShadow:!1}),k.jsx("p",{..._("legendItemName"),children:C[A.dataKey]||A.dataKey})]},T));return k.jsx(we,{mod:[{position:h,centered:y},d],..._("legend"),...w,children:E})});Qy.displayName="@mantine/charts/ChartLegend";Qy.classes=Hq;function Ghe({x:e,y:n,value:t,valueFormatter:i}){return k.jsx("g",{transform:`translate(${e},${n})`,children:k.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 Jy={root:"m_a50f3e58",container:"m_af9188cb",grid:"m_a50a48bc",axis:"m_a507a517",axisLabel:"m_2293801d",tooltip:"m_92b296cd"},Uk,Nj;function br(){if(Nj)return Uk;Nj=1;var e=Array.isArray;return Uk=e,Uk}var Vk,$j;function Uq(){if($j)return Vk;$j=1;var e=typeof hv=="object"&&hv&&hv.Object===Object&&hv;return Vk=e,Vk}var Wk,zj;function ho(){if(zj)return Wk;zj=1;var e=Uq(),n=typeof self=="object"&&self&&self.Object===Object&&self,t=e||n||Function("return this")();return Wk=t,Wk}var Gk,Lj;function Km(){if(Lj)return Gk;Lj=1;var e=ho(),n=e.Symbol;return Gk=n,Gk}var Yk,Ij;function Yhe(){if(Ij)return Yk;Ij=1;var e=Km(),n=Object.prototype,t=n.hasOwnProperty,i=n.toString,r=e?e.toStringTag:void 0;function a(o){var l=t.call(o,r),f=o[r];try{o[r]=void 0;var c=!0}catch{}var h=i.call(o);return c&&(l?o[r]=f:delete o[r]),h}return Yk=a,Yk}var Kk,Bj;function Khe(){if(Bj)return Kk;Bj=1;var e=Object.prototype,n=e.toString;function t(i){return n.call(i)}return Kk=t,Kk}var Xk,Fj;function us(){if(Fj)return Xk;Fj=1;var e=Km(),n=Yhe(),t=Khe(),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 Xk=o,Xk}var Zk,qj;function fs(){if(qj)return Zk;qj=1;function e(n){return n!=null&&typeof n=="object"}return Zk=e,Zk}var Qk,Hj;function Nc(){if(Hj)return Qk;Hj=1;var e=us(),n=fs(),t="[object Symbol]";function i(r){return typeof r=="symbol"||n(r)&&e(r)==t}return Qk=i,Qk}var Jk,Uj;function o9(){if(Uj)return Jk;Uj=1;var e=br(),n=Nc(),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 Jk=r,Jk}var e_,Vj;function fl(){if(Vj)return e_;Vj=1;function e(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}return e_=e,e_}var n_,Wj;function s9(){if(Wj)return n_;Wj=1;var e=us(),n=fl(),t="[object AsyncFunction]",i="[object Function]",r="[object GeneratorFunction]",a="[object Proxy]";function o(l){if(!n(l))return!1;var f=e(l);return f==i||f==r||f==t||f==a}return n_=o,n_}var t_,Gj;function Xhe(){if(Gj)return t_;Gj=1;var e=ho(),n=e["__core-js_shared__"];return t_=n,t_}var i_,Yj;function Zhe(){if(Yj)return i_;Yj=1;var e=Xhe(),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 i_=t,i_}var r_,Kj;function Vq(){if(Kj)return r_;Kj=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 r_=t,r_}var a_,Xj;function Qhe(){if(Xj)return a_;Xj=1;var e=s9(),n=Zhe(),t=fl(),i=Vq(),r=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,l=Object.prototype,f=o.toString,c=l.hasOwnProperty,h=RegExp("^"+f.call(c).replace(r,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(p){if(!t(p)||n(p))return!1;var v=e(p)?h:a;return v.test(i(p))}return a_=d,a_}var o_,Zj;function Jhe(){if(Zj)return o_;Zj=1;function e(n,t){return n==null?void 0:n[t]}return o_=e,o_}var s_,Qj;function Au(){if(Qj)return s_;Qj=1;var e=Qhe(),n=Jhe();function t(i,r){var a=n(i,r);return e(a)?a:void 0}return s_=t,s_}var l_,Jj;function e0(){if(Jj)return l_;Jj=1;var e=Au(),n=e(Object,"create");return l_=n,l_}var u_,e8;function eme(){if(e8)return u_;e8=1;var e=e0();function n(){this.__data__=e?e(null):{},this.size=0}return u_=n,u_}var f_,n8;function nme(){if(n8)return f_;n8=1;function e(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}return f_=e,f_}var c_,t8;function tme(){if(t8)return c_;t8=1;var e=e0(),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 c_=r,c_}var d_,i8;function ime(){if(i8)return d_;i8=1;var e=e0(),n=Object.prototype,t=n.hasOwnProperty;function i(r){var a=this.__data__;return e?a[r]!==void 0:t.call(a,r)}return d_=i,d_}var h_,r8;function rme(){if(r8)return h_;r8=1;var e=e0(),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 h_=t,h_}var m_,a8;function ame(){if(a8)return m_;a8=1;var e=eme(),n=nme(),t=tme(),i=ime(),r=rme();function a(o){var l=-1,f=o==null?0:o.length;for(this.clear();++l-1}return w_=n,w_}var k_,d8;function fme(){if(d8)return k_;d8=1;var e=n0();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 k_=n,k_}var __,h8;function t0(){if(h8)return __;h8=1;var e=ome(),n=sme(),t=lme(),i=ume(),r=fme();function a(o){var l=-1,f=o==null?0:o.length;for(this.clear();++l0?1:-1},Yl=function(n){return fu(n)&&n.indexOf("%")===n.length-1},qe=function(n){return Rme(n)&&!zc(n)},Pme=function(n){return Bn(n)},gi=function(n){return qe(n)||fu(n)},Nme=0,Lc=function(n){var t=++Nme;return"".concat(n||"").concat(t)},cu=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(!qe(n)&&!fu(n))return i;var a;if(Yl(n)){var o=n.indexOf("%");a=t*parseFloat(n.slice(0,o))/100}else a=+n;return zc(a)&&(a=i),r&&a>t&&(a=t),a},Us=function(n){if(!n)return null;var t=Object.keys(n);return t&&t.length?n[t[0]]:null},$me=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 Hme(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 $S(e){"@babel/helpers - typeof";return $S=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},$S(e)}var F8={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"},Uo=function(n){return typeof n=="string"?n:n?n.displayName||n.name||"Component":""},q8=null,Y_=null,m9=function e(n){if(n===q8&&Array.isArray(Y_))return Y_;var t=[];return O.Children.forEach(n,function(i){Bn(i)||(Tme.isFragment(i)?t=t.concat(e(i.props.children)):t.push(i))}),Y_=t,q8=n,t};function ua(e,n){var t=[],i=[];return Array.isArray(n)?i=n.map(function(r){return Uo(r)}):i=[Uo(n)],m9(e).forEach(function(r){var a=la(r,"type.displayName")||la(r,"type.name");i.indexOf(a)!==-1&&t.push(r)}),t}function Nr(e,n){var t=ua(e,n);return t&&t[0]}var H8=function(n){if(!n||!n.props)return!1;var t=n.props,i=t.width,r=t.height;return!(!qe(i)||i<=0||!qe(r)||r<=0)},Ume=["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"],Vme=function(n){return n&&n.type&&fu(n.type)&&Ume.indexOf(n.type)>=0},Zq=function(n){return n&&$S(n)==="object"&&"clipDot"in n},Wme=function(n,t,i,r){var a,o=(a=G_==null?void 0:G_[r])!==null&&a!==void 0?a:[];return t.startsWith("data-")||!Rn(n)&&(r&&o.includes(t)||Ime.includes(t))||i&&h9.includes(t)},$n=function(n,t,i){if(!n||typeof n=="function"||typeof n=="boolean")return null;var r=n;if(O.isValidElement(n)&&(r=n.props),!$c(r))return null;var a={};return Object.keys(r).forEach(function(o){var l;Wme((l=r)===null||l===void 0?void 0:l[o],o,t,i)&&(a[o]=r[o])}),a},zS=function e(n,t){if(n===t)return!0;var i=O.Children.count(n);if(i!==O.Children.count(t))return!1;if(i===0)return!0;if(i===1)return U8(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 Zme(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 IS(e){var n=e.children,t=e.width,i=e.height,r=e.viewBox,a=e.className,o=e.style,l=e.title,f=e.desc,c=Xme(e,Kme),h=r||{width:t,height:i,x:0,y:0},d=cn("recharts-surface",a);return Z.createElement("svg",LS({},$n(c,!0,"svg"),{className:d,width:t,height:i,style:o,viewBox:"".concat(h.x," ").concat(h.y," ").concat(h.width," ").concat(h.height)}),Z.createElement("title",null,l),Z.createElement("desc",null,f),n)}var Qme=["children","className"];function BS(){return BS=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 epe(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 Tt=Z.forwardRef(function(e,n){var t=e.children,i=e.className,r=Jme(e,Qme),a=cn("recharts-layer",i);return Z.createElement("g",BS({className:a},$n(r,!0),{ref:n}),t)}),Vo=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 X_=n,X_}var Z_,Y8;function Qq(){if(Y8)return Z_;Y8=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",r=n+t+i,a="\\ufe0e\\ufe0f",o="\\u200d",l=RegExp("["+o+e+r+a+"]");function f(c){return l.test(c)}return Z_=f,Z_}var Q_,K8;function ipe(){if(K8)return Q_;K8=1;function e(n){return n.split("")}return Q_=e,Q_}var J_,X8;function rpe(){if(X8)return J_;X8=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",r=n+t+i,a="\\ufe0e\\ufe0f",o="["+e+"]",l="["+r+"]",f="\\ud83c[\\udffb-\\udfff]",c="(?:"+l+"|"+f+")",h="[^"+e+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",y=c+"?",b="["+a+"]?",w="(?:"+v+"(?:"+[h,d,p].join("|")+")"+b+y+")*",_=b+y+w,S="(?:"+[h+l+"?",l,d,p,o].join("|")+")",C=RegExp(f+"(?="+f+")|"+S+_,"g");function E(A){return A.match(C)||[]}return J_=E,J_}var e2,Z8;function ape(){if(Z8)return e2;Z8=1;var e=ipe(),n=Qq(),t=rpe();function i(r){return n(r)?t(r):e(r)}return e2=i,e2}var n2,Q8;function ope(){if(Q8)return n2;Q8=1;var e=tpe(),n=Qq(),t=ape(),i=Gq();function r(a){return function(o){o=i(o);var l=n(o)?t(o):void 0,f=l?l[0]:o.charAt(0),c=l?e(l,1).join(""):o.slice(1);return f[a]()+c}}return n2=r,n2}var t2,J8;function spe(){if(J8)return t2;J8=1;var e=ope(),n=e("toUpperCase");return t2=n,t2}var lpe=spe();const a0=ot(lpe);function Et(e){return function(){return e}}const Jq=Math.cos,Rg=Math.sin,$a=Math.sqrt,Pg=Math.PI,o0=2*Pg,FS=Math.PI,qS=2*FS,Fl=1e-6,upe=qS-Fl;function eH(e){this._+=e[0];for(let n=1,t=e.length;n=0))throw new Error(`invalid digits: ${e}`);if(n>15)return eH;const t=10**n;return function(i){this._+=i[0];for(let r=1,a=i.length;rFl)if(!(Math.abs(d*f-c*h)>Fl)||!a)this._append`L${this._x1=n},${this._y1=t}`;else{let v=i-o,y=r-l,b=f*f+c*c,w=v*v+y*y,_=Math.sqrt(b),S=Math.sqrt(p),C=a*Math.tan((FS-Math.acos((b+p-w)/(2*_*S)))/2),E=C/S,A=C/_;Math.abs(E-1)>Fl&&this._append`L${n+E*h},${t+E*d}`,this._append`A${a},${a},0,0,${+(d*v>h*y)},${this._x1=n+A*f},${this._y1=t+A*c}`}}arc(n,t,i,r,a,o){if(n=+n,t=+t,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let l=i*Math.cos(r),f=i*Math.sin(r),c=n+l,h=t+f,d=1^o,p=o?r-a:a-r;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>Fl||Math.abs(this._y1-h)>Fl)&&this._append`L${c},${h}`,i&&(p<0&&(p=p%qS+qS),p>upe?this._append`A${i},${i},0,1,${d},${n-l},${t-f}A${i},${i},0,1,${d},${this._x1=c},${this._y1=h}`:p>Fl&&this._append`A${i},${i},0,${+(p>=FS)},${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 p9(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 cpe(n)}function v9(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function nH(e){this._context=e}nH.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 s0(e){return new nH(e)}function tH(e){return e[0]}function iH(e){return e[1]}function rH(e,n){var t=Et(!0),i=null,r=s0,a=null,o=p9(l);e=typeof e=="function"?e:e===void 0?tH:Et(e),n=typeof n=="function"?n:n===void 0?iH:Et(n);function l(f){var c,h=(f=v9(f)).length,d,p=!1,v;for(i==null&&(a=r(v=o())),c=0;c<=h;++c)!(c=v;--y)l.point(C[y],E[y]);l.lineEnd(),l.areaEnd()}_&&(C[p]=+e(w,p,d),E[p]=+n(w,p,d),l.point(i?+i(w,p,d):C[p],t?+t(w,p,d):E[p]))}if(S)return l=null,S+""||null}function h(){return rH().defined(r).curve(o).context(a)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:Et(+d),i=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:Et(+d),c):e},c.x1=function(d){return arguments.length?(i=d==null?null:typeof d=="function"?d:Et(+d),c):i},c.y=function(d){return arguments.length?(n=typeof d=="function"?d:Et(+d),t=null,c):n},c.y0=function(d){return arguments.length?(n=typeof d=="function"?d:Et(+d),c):n},c.y1=function(d){return arguments.length?(t=d==null?null:typeof d=="function"?d:Et(+d),c):t},c.lineX0=c.lineY0=function(){return h().x(e).y(n)},c.lineY1=function(){return h().x(e).y(t)},c.lineX1=function(){return h().x(i).y(n)},c.defined=function(d){return arguments.length?(r=typeof d=="function"?d:Et(!!d),c):r},c.curve=function(d){return arguments.length?(o=d,a!=null&&(l=o(a)),c):o},c.context=function(d){return arguments.length?(d==null?a=l=null:l=o(a=d),c):a},c}class aH{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 dpe(e){return new aH(e,!0)}function hpe(e){return new aH(e,!1)}const g9={draw(e,n){const t=$a(n/Pg);e.moveTo(t,0),e.arc(0,0,t,0,o0)}},mpe={draw(e,n){const t=$a(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()}},oH=$a(1/3),ppe=oH*2,vpe={draw(e,n){const t=$a(n/ppe),i=t*oH;e.moveTo(0,-t),e.lineTo(i,0),e.lineTo(0,t),e.lineTo(-i,0),e.closePath()}},gpe={draw(e,n){const t=$a(n),i=-t/2;e.rect(i,i,t,t)}},ype=.8908130915292852,sH=Rg(Pg/10)/Rg(7*Pg/10),bpe=Rg(o0/10)*sH,wpe=-Jq(o0/10)*sH,kpe={draw(e,n){const t=$a(n*ype),i=bpe*t,r=wpe*t;e.moveTo(0,-t),e.lineTo(i,r);for(let a=1;a<5;++a){const o=o0*a/5,l=Jq(o),f=Rg(o);e.lineTo(f*t,-l*t),e.lineTo(l*i-f*r,f*i+l*r)}e.closePath()}},i2=$a(3),_pe={draw(e,n){const t=-$a(n/(i2*3));e.moveTo(0,t*2),e.lineTo(-i2*t,-t),e.lineTo(i2*t,-t),e.closePath()}},Qr=-.5,Jr=$a(3)/2,HS=1/$a(12),xpe=(HS/2+1)*3,Spe={draw(e,n){const t=$a(n/xpe),i=t/2,r=t*HS,a=i,o=t*HS+t,l=-a,f=o;e.moveTo(i,r),e.lineTo(a,o),e.lineTo(l,f),e.lineTo(Qr*i-Jr*r,Jr*i+Qr*r),e.lineTo(Qr*a-Jr*o,Jr*a+Qr*o),e.lineTo(Qr*l-Jr*f,Jr*l+Qr*f),e.lineTo(Qr*i+Jr*r,Qr*r-Jr*i),e.lineTo(Qr*a+Jr*o,Qr*o-Jr*a),e.lineTo(Qr*l+Jr*f,Qr*f-Jr*l),e.closePath()}};function Cpe(e,n){let t=null,i=p9(r);e=typeof e=="function"?e:Et(e||g9),n=typeof n=="function"?n:Et(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:Et(a),r):e},r.size=function(a){return arguments.length?(n=typeof a=="function"?a:Et(+a),r):n},r.context=function(a){return arguments.length?(t=a??null,r):t},r}function Ng(){}function $g(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 lH(e){this._context=e}lH.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:$g(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:$g(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function Ape(e){return new lH(e)}function uH(e){this._context=e}uH.prototype={areaStart:Ng,areaEnd:Ng,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:$g(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function Ope(e){return new uH(e)}function fH(e){this._context=e}fH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(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:$g(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function Epe(e){return new fH(e)}function cH(e){this._context=e}cH.prototype={areaStart:Ng,areaEnd:Ng,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 Tpe(e){return new cH(e)}function eD(e){return e<0?-1:1}function nD(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(eD(a)+eD(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function tD(e,n){var t=e._x1-e._x0;return t?(3*(e._y1-e._y0)/t-n)/2:n}function r2(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 zg(e){this._context=e}zg.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:r2(this,this._t0,tD(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,r2(this,tD(this,t=nD(this,e,n)),t);break;default:r2(this,this._t0,t=nD(this,e,n));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n,this._t0=t}}};function dH(e){this._context=new hH(e)}(dH.prototype=Object.create(zg.prototype)).point=function(e,n){zg.prototype.point.call(this,n,e)};function hH(e){this._context=e}hH.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 Mpe(e){return new zg(e)}function jpe(e){return new dH(e)}function mH(e){this._context=e}mH.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=iD(e),r=iD(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 Rpe(e){return new l0(e,.5)}function Ppe(e){return new l0(e,0)}function Npe(e){return new l0(e,1)}function Uf(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 $pe(e,n){return e[n]}function zpe(e){const n=[];return n.key=e,n}function Lpe(){var e=Et([]),n=US,t=Uf,i=$pe;function r(a){var o=Array.from(e.apply(this,arguments),zpe),l,f=o.length,c=-1,h;for(const d of a)for(l=0,++c;l0){for(var t,i,r=0,a=e[0].length,o;r0){for(var t=0,i=e[n[0]],r,a=i.length;t0)||!((a=(r=e[n[0]]).length)>0))){for(var t=0,i=1,r,a,o;i=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Gpe(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 pH={symbolCircle:g9,symbolCross:mpe,symbolDiamond:vpe,symbolSquare:gpe,symbolStar:kpe,symbolTriangle:_pe,symbolWye:Spe},Ype=Math.PI/180,Kpe=function(n){var t="symbol".concat(a0(n));return pH[t]||g9},Xpe=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*Ype;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}},Zpe=function(n,t){pH["symbol".concat(a0(n))]=t},y9=function(n){var t=n.type,i=t===void 0?"circle":t,r=n.size,a=r===void 0?64:r,o=n.sizeType,l=o===void 0?"area":o,f=Wpe(n,qpe),c=aD(aD({},f),{},{type:i,size:a,sizeType:l}),h=function(){var w=Kpe(i),_=Cpe().type(w).size(Xpe(a,l,i));return _()},d=c.className,p=c.cx,v=c.cy,y=$n(c,!0);return p===+p&&v===+v&&a===+a?Z.createElement("path",VS({},y,{className:cn("recharts-symbols",d),transform:"translate(".concat(p,", ").concat(v,")"),d:h()})):null};y9.registerSymbol=Zpe;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 WS(){return WS=Object.assign?Object.assign.bind():function(e){for(var n=1;n`);var S=v.inactive?c:v.color;return Z.createElement("li",WS({className:w,style:d,key:"legend-item-".concat(y)},Dg(i.props,v,y)),Z.createElement(IS,{width:o,height:o,viewBox:h,style:p},i.renderIcon(v)),Z.createElement("span",{className:"recharts-legend-item-text",style:{color:S}},b?b(_,v,y):_))})}},{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 Z.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])})(O.PureComponent);qh(b9,"displayName","Legend");qh(b9,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var a2,sD;function sve(){if(sD)return a2;sD=1;var e=t0();function n(){this.__data__=new e,this.size=0}return a2=n,a2}var o2,lD;function lve(){if(lD)return o2;lD=1;function e(n){var t=this.__data__,i=t.delete(n);return this.size=t.size,i}return o2=e,o2}var s2,uD;function uve(){if(uD)return s2;uD=1;function e(n){return this.__data__.get(n)}return s2=e,s2}var l2,fD;function fve(){if(fD)return l2;fD=1;function e(n){return this.__data__.has(n)}return l2=e,l2}var u2,cD;function cve(){if(cD)return u2;cD=1;var e=t0(),n=u9(),t=f9(),i=200;function r(a,o){var l=this.__data__;if(l instanceof e){var f=l.__data__;if(!n||f.lengthv))return!1;var b=d.get(o),w=d.get(l);if(b&&w)return b==l&&w==o;var _=-1,S=!0,C=f&r?new e:void 0;for(d.set(o,l),d.set(l,o);++_-1&&i%1==0&&i-1&&t%1==0&&t<=e}return j2=n,j2}var D2,ND;function Sve(){if(ND)return D2;ND=1;var e=us(),n=x9(),t=fs(),i="[object Arguments]",r="[object Array]",a="[object Boolean]",o="[object Date]",l="[object Error]",f="[object Function]",c="[object Map]",h="[object Number]",d="[object Object]",p="[object RegExp]",v="[object Set]",y="[object String]",b="[object WeakMap]",w="[object ArrayBuffer]",_="[object DataView]",S="[object Float32Array]",C="[object Float64Array]",E="[object Int8Array]",A="[object Int16Array]",T="[object Int32Array]",j="[object Uint8Array]",N="[object Uint8ClampedArray]",q="[object Uint16Array]",R="[object Uint32Array]",L={};L[S]=L[C]=L[E]=L[A]=L[T]=L[j]=L[N]=L[q]=L[R]=!0,L[i]=L[r]=L[w]=L[a]=L[_]=L[o]=L[l]=L[f]=L[c]=L[h]=L[d]=L[p]=L[v]=L[y]=L[b]=!1;function B(G){return t(G)&&n(G.length)&&!!L[e(G)]}return D2=B,D2}var R2,$D;function CH(){if($D)return R2;$D=1;function e(n){return function(t){return n(t)}}return R2=e,R2}var oh={exports:{}};oh.exports;var zD;function Cve(){return zD||(zD=1,(function(e,n){var t=Uq(),i=n&&!n.nodeType&&n,r=i&&!0&&e&&!e.nodeType&&e,a=r&&r.exports===i,o=a&&t.process,l=(function(){try{var f=r&&r.require&&r.require("util").types;return f||o&&o.binding&&o.binding("util")}catch{}})();e.exports=l})(oh,oh.exports)),oh.exports}var P2,LD;function AH(){if(LD)return P2;LD=1;var e=Sve(),n=CH(),t=Cve(),i=t&&t.isTypedArray,r=i?n(i):e;return P2=r,P2}var N2,ID;function Ave(){if(ID)return N2;ID=1;var e=kve(),n=k9(),t=br(),i=SH(),r=_9(),a=AH(),o=Object.prototype,l=o.hasOwnProperty;function f(c,h){var d=t(c),p=!d&&n(c),v=!d&&!p&&i(c),y=!d&&!p&&!v&&a(c),b=d||p||v||y,w=b?e(c.length,String):[],_=w.length;for(var S in c)(h||l.call(c,S))&&!(b&&(S=="length"||v&&(S=="offset"||S=="parent")||y&&(S=="buffer"||S=="byteLength"||S=="byteOffset")||r(S,_)))&&w.push(S);return w}return N2=f,N2}var $2,BD;function Ove(){if(BD)return $2;BD=1;var e=Object.prototype;function n(t){var i=t&&t.constructor,r=typeof i=="function"&&i.prototype||e;return t===r}return $2=n,$2}var z2,FD;function OH(){if(FD)return z2;FD=1;function e(n,t){return function(i){return n(t(i))}}return z2=e,z2}var L2,qD;function Eve(){if(qD)return L2;qD=1;var e=OH(),n=e(Object.keys,Object);return L2=n,L2}var I2,HD;function Tve(){if(HD)return I2;HD=1;var e=Ove(),n=Eve(),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 I2=r,I2}var B2,UD;function Xm(){if(UD)return B2;UD=1;var e=s9(),n=x9();function t(i){return i!=null&&n(i.length)&&!e(i)}return B2=t,B2}var F2,VD;function u0(){if(VD)return F2;VD=1;var e=Ave(),n=Tve(),t=Xm();function i(r){return t(r)?e(r):n(r)}return F2=i,F2}var q2,WD;function Mve(){if(WD)return q2;WD=1;var e=gve(),n=wve(),t=u0();function i(r){return e(r,t,n)}return q2=i,q2}var H2,GD;function jve(){if(GD)return H2;GD=1;var e=Mve(),n=1,t=Object.prototype,i=t.hasOwnProperty;function r(a,o,l,f,c,h){var d=l&n,p=e(a),v=p.length,y=e(o),b=y.length;if(v!=b&&!d)return!1;for(var w=v;w--;){var _=p[w];if(!(d?_ in o:i.call(o,_)))return!1}var S=h.get(a),C=h.get(o);if(S&&C)return S==o&&C==a;var E=!0;h.set(a,o),h.set(o,a);for(var A=d;++w-1}return px=n,px}var vx,w7;function Zve(){if(w7)return vx;w7=1;function e(n,t,i){for(var r=-1,a=n==null?0:n.length;++r=o){var _=c?null:r(f);if(_)return a(_);y=!1,p=i,w=new e}else w=c?[]:b;e:for(;++d=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function dge(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 hge(e){return e.value}function mge(e,n){if(Z.isValidElement(e))return Z.cloneElement(e,n);if(typeof e=="function")return Z.createElement(e,n);n.ref;var t=cge(n,ige);return Z.createElement(b9,t)}var E7=1,Wo=(function(e){function n(){var t;rge(this,n);for(var i=arguments.length,r=new Array(i),a=0;aE7||Math.abs(r.height-this.lastBoundingBox.height)>E7)&&(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?Po({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(i){var r=this.props,a=r.layout,o=r.align,l=r.verticalAlign,f=r.margin,c=r.chartWidth,h=r.chartHeight,d,p;if(!i||(i.left===void 0||i.left===null)&&(i.right===void 0||i.right===null))if(o==="center"&&a==="vertical"){var v=this.getBBoxSnapshot();d={left:((c||0)-v.width)/2}}else d=o==="right"?{right:f&&f.right||0}:{left:f&&f.left||0};if(!i||(i.top===void 0||i.top===null)&&(i.bottom===void 0||i.bottom===null))if(l==="middle"){var y=this.getBBoxSnapshot();p={top:((h||0)-y.height)/2}}else p=l==="bottom"?{bottom:f&&f.bottom||0}:{top:f&&f.top||0};return Po(Po({},d),p)}},{key:"render",value:function(){var i=this,r=this.props,a=r.content,o=r.width,l=r.height,f=r.wrapperStyle,c=r.payloadUniqBy,h=r.payload,d=Po(Po({position:"absolute",width:o||"auto",height:l||"auto"},this.getDefaultPosition(f)),f);return Z.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(v){i.wrapperNode=v}},mge(a,Po(Po({},this.props),{},{payload:DH(h,c,hge)})))}}],[{key:"getWithHeight",value:function(i,r){var a=Po(Po({},this.defaultProps),i.props),o=a.layout;return o==="vertical"&&qe(i.props.height)?{height:i.props.height}:o==="horizontal"?{width:i.props.width||r}:null}}])})(O.PureComponent);f0(Wo,"displayName","Legend");f0(Wo,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var kx,T7;function pge(){if(T7)return kx;T7=1;var e=Km(),n=k9(),t=br(),i=e?e.isConcatSpreadable:void 0;function r(a){return t(a)||n(a)||!!(i&&a&&a[i])}return kx=r,kx}var _x,M7;function NH(){if(M7)return _x;M7=1;var e=xH(),n=pge();function t(i,r,a,o,l){var f=-1,c=i.length;for(a||(a=n),l||(l=[]);++f0&&a(h)?r>1?t(h,r-1,a,o,l):e(l,h):o||(l[l.length]=h)}return l}return _x=t,_x}var xx,j7;function vge(){if(j7)return xx;j7=1;function e(n){return function(t,i,r){for(var a=-1,o=Object(t),l=r(t),f=l.length;f--;){var c=l[n?f:++a];if(i(o[c],c,o)===!1)break}return t}}return xx=e,xx}var Sx,D7;function gge(){if(D7)return Sx;D7=1;var e=vge(),n=e();return Sx=n,Sx}var Cx,R7;function $H(){if(R7)return Cx;R7=1;var e=gge(),n=u0();function t(i,r){return i&&e(i,r,n)}return Cx=t,Cx}var Ax,P7;function yge(){if(P7)return Ax;P7=1;var e=Xm();function n(t,i){return function(r,a){if(r==null)return r;if(!e(r))return t(r,a);for(var o=r.length,l=i?o:-1,f=Object(r);(i?l--:++li||l&&f&&h&&!c&&!d||a&&f&&h||!r&&h||!o)return 1;if(!a&&!l&&!d&&t=c)return h;var d=r[a];return h*(d=="desc"?-1:1)}}return t.index-i.index}return jx=n,jx}var Dx,B7;function _ge(){if(B7)return Dx;B7=1;var e=c9(),n=d9(),t=cl(),i=zH(),r=bge(),a=CH(),o=kge(),l=Ic(),f=br();function c(h,d,p){d.length?d=e(d,function(b){return f(b)?function(w){return n(w,b.length===1?b[0]:b)}:b}):d=[l];var v=-1;d=e(d,a(t));var y=i(h,function(b,w,_){var S=e(d,function(C){return C(b)});return{criteria:S,index:++v,value:b}});return r(y,function(b,w){return o(b,w,p)})}return Dx=c,Dx}var Rx,F7;function xge(){if(F7)return Rx;F7=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 Rx=e,Rx}var Px,q7;function Sge(){if(q7)return Px;q7=1;var e=xge(),n=Math.max;function t(i,r,a){return r=n(r===void 0?i.length-1:r,0),function(){for(var o=arguments,l=-1,f=n(o.length-r,0),c=Array(f);++l0){if(++a>=e)return arguments[0]}else a=0;return r.apply(void 0,arguments)}}return Lx=i,Lx}var Ix,G7;function Ege(){if(G7)return Ix;G7=1;var e=Age(),n=Oge(),t=n(e);return Ix=t,Ix}var Bx,Y7;function Tge(){if(Y7)return Bx;Y7=1;var e=Ic(),n=Sge(),t=Ege();function i(r,a){return t(n(r,a,e),r+"")}return Bx=i,Bx}var Fx,K7;function c0(){if(K7)return Fx;K7=1;var e=l9(),n=Xm(),t=_9(),i=fl();function r(a,o,l){if(!i(l))return!1;var f=typeof o;return(f=="number"?n(l)&&t(o,l.length):f=="string"&&o in l)?e(l[o],a):!1}return Fx=r,Fx}var qx,X7;function Mge(){if(X7)return qx;X7=1;var e=NH(),n=_ge(),t=Tge(),i=c0(),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 qx=r,qx}var jge=Mge();const A9=ot(jge);function Hh(e){"@babel/helpers - typeof";return Hh=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},Hh(e)}function KS(){return KS=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(qd,"-left"),qe(t)&&n&&qe(n.x)&&t=n.y),"".concat(qd,"-top"),qe(i)&&n&&qe(n.y)&&ib?Math.max(h,f[i]):Math.max(d,f[i])}function Wge(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 Gge(e){var n=e.allowEscapeViewBox,t=e.coordinate,i=e.offsetTopLeft,r=e.position,a=e.reverseDirection,o=e.tooltipBox,l=e.useTranslate3d,f=e.viewBox,c,h,d;return o.height>0&&o.width>0&&t?(h=J7({allowEscapeViewBox:n,coordinate:t,key:"x",offsetTopLeft:i,position:r,reverseDirection:a,tooltipDimension:o.width,viewBox:f,viewBoxDimension:f.width}),d=J7({allowEscapeViewBox:n,coordinate:t,key:"y",offsetTopLeft:i,position:r,reverseDirection:a,tooltipDimension:o.height,viewBox:f,viewBoxDimension:f.height}),c=Wge({translateX:h,translateY:d,useTranslate3d:l})):c=Uge,{cssProperties:c,cssClasses:Vge({translateX:h,translateY:d,coordinate:t})}}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 eR(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 nR(e){for(var n=1;ntR||Math.abs(i.height-this.state.lastBoundingBox.height)>tR)&&this.setState({lastBoundingBox:{width:i.width,height:i.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var i,r;this.props.active&&this.updateBBox(),this.state.dismissed&&(((i=this.props.coordinate)===null||i===void 0?void 0:i.x)!==this.state.dismissedAtCoordinate.x||((r=this.props.coordinate)===null||r===void 0?void 0:r.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var i=this,r=this.props,a=r.active,o=r.allowEscapeViewBox,l=r.animationDuration,f=r.animationEasing,c=r.children,h=r.coordinate,d=r.hasPayload,p=r.isAnimationActive,v=r.offset,y=r.position,b=r.reverseDirection,w=r.useTranslate3d,_=r.viewBox,S=r.wrapperStyle,C=Gge({allowEscapeViewBox:o,coordinate:h,offsetTopLeft:v,position:y,reverseDirection:b,tooltipBox:this.state.lastBoundingBox,useTranslate3d:w,viewBox:_}),E=C.cssClasses,A=C.cssProperties,T=nR(nR({transition:p&&a?"transform ".concat(l,"ms ").concat(f):void 0},A),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&d?"visible":"hidden",position:"absolute",top:0,left:0},S);return Z.createElement("div",{tabIndex:-1,className:E,style:T,ref:function(N){i.wrapperNode=N}},c)}}])})(O.PureComponent),i1e=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Ou={isSsr:i1e()};function Yf(e){"@babel/helpers - typeof";return Yf=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},Yf(e)}function iR(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 rR(e){for(var n=1;n0;return Z.createElement(t1e,{allowEscapeViewBox:o,animationDuration:l,animationEasing:f,isAnimationActive:p,active:a,coordinate:h,hasPayload:T,offset:v,position:w,reverseDirection:_,useTranslate3d:S,viewBox:C,wrapperStyle:E},h1e(c,rR(rR({},this.props),{},{payload:A})))}}])})(O.PureComponent);O9(ra,"displayName","Tooltip");O9(ra,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Ou.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 Ux,aR;function m1e(){if(aR)return Ux;aR=1;var e=ho(),n=function(){return e.Date.now()};return Ux=n,Ux}var Vx,oR;function p1e(){if(oR)return Vx;oR=1;var e=/\s/;function n(t){for(var i=t.length;i--&&e.test(t.charAt(i)););return i}return Vx=n,Vx}var Wx,sR;function v1e(){if(sR)return Wx;sR=1;var e=p1e(),n=/^\s+/;function t(i){return i&&i.slice(0,e(i)+1).replace(n,"")}return Wx=t,Wx}var Gx,lR;function HH(){if(lR)return Gx;lR=1;var e=v1e(),n=fl(),t=Nc(),i=NaN,r=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt;function f(c){if(typeof c=="number")return c;if(t(c))return i;if(n(c)){var h=typeof c.valueOf=="function"?c.valueOf():c;c=n(h)?h+"":h}if(typeof c!="string")return c===0?c:+c;c=e(c);var d=a.test(c);return d||o.test(c)?l(c.slice(2),d?2:8):r.test(c)?i:+c}return Gx=f,Gx}var Yx,uR;function g1e(){if(uR)return Yx;uR=1;var e=fl(),n=m1e(),t=HH(),i="Expected a function",r=Math.max,a=Math.min;function o(l,f,c){var h,d,p,v,y,b,w=0,_=!1,S=!1,C=!0;if(typeof l!="function")throw new TypeError(i);f=t(f)||0,e(c)&&(_=!!c.leading,S="maxWait"in c,p=S?r(t(c.maxWait)||0,f):p,C="trailing"in c?!!c.trailing:C);function E(G){var H=h,U=d;return h=d=void 0,w=G,v=l.apply(U,H),v}function A(G){return w=G,y=setTimeout(N,f),_?E(G):v}function T(G){var H=G-b,U=G-w,P=f-H;return S?a(P,p-U):P}function j(G){var H=G-b,U=G-w;return b===void 0||H>=f||H<0||S&&U>=p}function N(){var G=n();if(j(G))return q(G);y=setTimeout(N,T(G))}function q(G){return y=void 0,C&&h?E(G):(h=d=void 0,v)}function R(){y!==void 0&&clearTimeout(y),w=0,h=b=d=y=void 0}function L(){return y===void 0?v:q(n())}function B(){var G=n(),H=j(G);if(h=arguments,d=this,b=G,H){if(y===void 0)return A(b);if(S)return clearTimeout(y),y=setTimeout(N,f),E(b)}return y===void 0&&(y=setTimeout(N,f)),v}return B.cancel=R,B.flush=L,B}return Yx=o,Yx}var Kx,fR;function y1e(){if(fR)return Kx;fR=1;var e=g1e(),n=fl(),t="Expected a function";function i(r,a,o){var l=!0,f=!0;if(typeof r!="function")throw new TypeError(t);return n(o)&&(l="leading"in o?!!o.leading:l,f="trailing"in o?!!o.trailing:f),e(r,a,{leading:l,maxWait:a,trailing:f})}return Kx=i,Kx}var b1e=y1e();const UH=ot(b1e);function Vh(e){"@babel/helpers - typeof";return Vh=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},Vh(e)}function cR(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function jv(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t0&&(G=UH(G,b,{trailing:!0,leading:!1}));var H=new ResizeObserver(G),U=A.current.getBoundingClientRect(),P=U.width,z=U.height;return L(P,z),H.observe(A.current),function(){H.disconnect()}},[L,b]);var B=O.useMemo(function(){var G=q.containerWidth,H=q.containerHeight;if(G<0||H<0)return null;Vo(Yl(o)||Yl(f),`The width(%s) and height(%s) are both fixed numbers, - maybe you don't need to use a ResponsiveContainer.`,o,f),Vo(!t||t>0,"The aspect(%s) must be greater than zero.",t);var U=Yl(o)?G:o,P=Yl(f)?H:f;t&&t>0&&(U?P=U/t:P&&(U=P*t),p&&P>p&&(P=p)),Vo(U>0||P>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.`,U,P,o,f,h,d,t);var z=!Array.isArray(v)&&Uo(v.type).endsWith("Chart");return Z.Children.map(v,function(F){return Z.isValidElement(F)?O.cloneElement(F,jv({width:U,height:P},z?{style:jv({height:"100%",width:"100%",maxHeight:P,maxWidth:U},F.props.style)}:{})):F})},[t,v,f,p,d,h,q,o]);return Z.createElement("div",{id:w?"".concat(w):void 0,className:cn("recharts-responsive-container",_),style:jv(jv({},E),{},{width:o,height:f,minWidth:h,minHeight:d,maxHeight:p}),ref:A},B)}),VH=function(n){return null};VH.displayName="Cell";function Wh(e){"@babel/helpers - typeof";return Wh=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},Wh(e)}function hR(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 JS(e){for(var n=1;n1&&arguments[1]!==void 0?arguments[1]:{};if(n==null||Ou.isSsr)return{width:0,height:0};var i=R1e(t),r=JSON.stringify({text:n,copyStyle:i});if(bf.widthCache[r])return bf.widthCache[r];try{var a=document.getElementById(mR);a||(a=document.createElement("span"),a.setAttribute("id",mR),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=JS(JS({},D1e),i);Object.assign(a.style,o),a.textContent="".concat(n);var l=a.getBoundingClientRect(),f={width:l.width,height:l.height};return bf.widthCache[r]=f,++bf.cacheCount>j1e&&(bf.cacheCount=0,bf.widthCache={}),f}catch{return{width:0,height:0}}},P1e=function(n){return{top:n.top+window.scrollY-document.documentElement.clientTop,left:n.left+window.scrollX-document.documentElement.clientLeft}};function Gh(e){"@babel/helpers - typeof";return Gh=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},Gh(e)}function qg(e,n){return L1e(e)||z1e(e,n)||$1e(e,n)||N1e()}function N1e(){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 $1e(e,n){if(e){if(typeof e=="string")return pR(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 pR(e,n)}}function pR(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 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}function kR(e,n){return tye(e)||nye(e,n)||eye(e,n)||J1e()}function J1e(){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 eye(e,n){if(e){if(typeof e=="string")return _R(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 _R(e,n)}}function _R(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 U.reduce(function(P,z){var F=z.word,Y=z.width,D=P[P.length-1];if(D&&(r==null||a||D.width+Y+iz.width?P:z})};if(!h)return v;for(var b="…",w=function(U){var P=d.slice(0,U),z=KH({breakAll:c,style:f,children:P+b}).wordsWithComputedWidth,F=p(z),Y=F.length>o||y(F).width>Number(r);return[Y,F]},_=0,S=d.length-1,C=0,E;_<=S&&C<=d.length-1;){var A=Math.floor((_+S)/2),T=A-1,j=w(T),N=kR(j,2),q=N[0],R=N[1],L=w(A),B=kR(L,1),G=B[0];if(!q&&!G&&(_=A+1),q&&G&&(S=A-1),!q&&G){E=R;break}C++}return E||v},xR=function(n){var t=Bn(n)?[]:n.toString().split(YH);return[{words:t}]},rye=function(n){var t=n.width,i=n.scaleToFit,r=n.children,a=n.style,o=n.breakAll,l=n.maxLines;if((t||i)&&!Ou.isSsr){var f,c,h=KH({breakAll:o,children:r,style:a});if(h){var d=h.wordsWithComputedWidth,p=h.spaceWidth;f=d,c=p}else return xR(r);return iye({breakAll:o,children:r,maxLines:l,style:a},f,c,t,i)}return xR(r)},SR="#808080",Hg=function(n){var t=n.x,i=t===void 0?0:t,r=n.y,a=r===void 0?0:r,o=n.lineHeight,l=o===void 0?"1em":o,f=n.capHeight,c=f===void 0?"0.71em":f,h=n.scaleToFit,d=h===void 0?!1:h,p=n.textAnchor,v=p===void 0?"start":p,y=n.verticalAnchor,b=y===void 0?"end":y,w=n.fill,_=w===void 0?SR:w,S=wR(n,X1e),C=O.useMemo(function(){return rye({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]),E=S.dx,A=S.dy,T=S.angle,j=S.className,N=S.breakAll,q=wR(S,Z1e);if(!gi(i)||!gi(a))return null;var R=i+(qe(E)?E:0),L=a+(qe(A)?A:0),B;switch(b){case"start":B=Xx("calc(".concat(c,")"));break;case"middle":B=Xx("calc(".concat((C.length-1)/2," * -").concat(l," + (").concat(c," / 2))"));break;default:B=Xx("calc(".concat(C.length-1," * -").concat(l,")"));break}var G=[];if(d){var H=C[0].width,U=S.width;G.push("scale(".concat((qe(U)?U/H:1)/H,")"))}return T&&G.push("rotate(".concat(T,", ").concat(R,", ").concat(L,")")),G.length&&(q.transform=G.join(" ")),Z.createElement("text",e4({},$n(q,!0),{x:R,y:L,className:cn("recharts-text",j),textAnchor:v,fill:_.includes("url")?SR:_}),C.map(function(P,z){var F=P.words.join(N?"":" ");return Z.createElement("tspan",{x:R,dy:z===0?B:l,key:"".concat(F,"-").concat(z)},F)}))};function Zs(e,n){return e==null||n==null?NaN:en?1:e>=n?0:NaN}function aye(e,n){return e==null||n==null?NaN:ne?1:n>=e?0:NaN}function T9(e){let n,t,i;e.length!==2?(n=Zs,t=(l,f)=>Zs(e(l),f),i=(l,f)=>e(l)-f):(n=e===Zs||e===aye?e:oye,t=e,i=e);function r(l,f,c=0,h=l.length){if(c>>1;t(l[d],f)<0?c=d+1:h=d}while(c>>1;t(l[d],f)<=0?c=d+1:h=d}while(cc&&i(l[d-1],f)>-i(l[d],f)?d-1:d}return{left:r,center:o,right:a}}function oye(){return 0}function XH(e){return e===null?NaN:+e}function*sye(e,n){for(let t of e)t!=null&&(t=+t)>=t&&(yield t)}const lye=T9(Zs),Zm=lye.right;T9(XH).center;class CR extends Map{constructor(n,t=cye){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(AR(this,n))}has(n){return super.has(AR(this,n))}set(n,t){return super.set(uye(this,n),t)}delete(n){return super.delete(fye(this,n))}}function AR({_intern:e,_key:n},t){const i=n(t);return e.has(i)?e.get(i):t}function uye({_intern:e,_key:n},t){const i=n(t);return e.has(i)?e.get(i):(e.set(i,t),t)}function fye({_intern:e,_key:n},t){const i=n(t);return e.has(i)&&(t=e.get(i),e.delete(i)),t}function cye(e){return e!==null&&typeof e=="object"?e.valueOf():e}function dye(e=Zs){if(e===Zs)return ZH;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 ZH(e,n){return(e==null||!(e>=e))-(n==null||!(n>=n))||(en?1:0)}const hye=Math.sqrt(50),mye=Math.sqrt(10),pye=Math.sqrt(2);function Ug(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>=hye?10:a>=mye?5:a>=pye?2:1;let l,f,c;return r<0?(c=Math.pow(10,-r)/o,l=Math.round(e*c),f=Math.round(n*c),l/cn&&--f,c=-c):(c=Math.pow(10,r)*o,l=Math.round(e/c),f=Math.round(n/c),l*cn&&--f),f0))return[];if(e===n)return[e];const i=n=r))return[];const l=a-r+1,f=new Array(l);if(i)if(o<0)for(let c=0;c=i)&&(t=i);return t}function ER(e,n){let t;for(const i of e)i!=null&&(t>i||t===void 0&&i>=i)&&(t=i);return t}function QH(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?ZH:dye(r);i>t;){if(i-t>600){const f=i-t+1,c=n-t+1,h=Math.log(f),d=.5*Math.exp(2*h/3),p=.5*Math.sqrt(h*d*(f-d)/f)*(c-f/2<0?-1:1),v=Math.max(t,Math.floor(n-c*d/f+p)),y=Math.min(i,Math.floor(n+(f-c)*d/f+p));QH(e,n,v,y,r)}const a=e[n];let o=t,l=i;for(Hd(e,t,n),r(e[i],a)>0&&Hd(e,t,i);o0;)--l}r(e[t],a)===0?Hd(e,t,l):(++l,Hd(e,l,i)),l<=n&&(t=l+1),n<=l&&(i=l-1)}return e}function Hd(e,n,t){const i=e[n];e[n]=e[t],e[t]=i}function vye(e,n,t){if(e=Float64Array.from(sye(e)),!(!(i=e.length)||isNaN(n=+n))){if(n<=0||i<2)return ER(e);if(n>=1)return OR(e);var i,r=(i-1)*n,a=Math.floor(r),o=OR(QH(e,a).subarray(0,a+1)),l=ER(e.subarray(a+1));return o+(l-o)*(r-a)}}function gye(e,n,t=XH){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 yye(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?Rv(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):t===4?Rv(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=wye.exec(e))?new vr(n[1],n[2],n[3],1):(n=kye.exec(e))?new vr(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=_ye.exec(e))?Rv(n[1],n[2],n[3],n[4]):(n=xye.exec(e))?Rv(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=Sye.exec(e))?NR(n[1],n[2]/100,n[3]/100,1):(n=Cye.exec(e))?NR(n[1],n[2]/100,n[3]/100,n[4]):TR.hasOwnProperty(e)?DR(TR[e]):e==="transparent"?new vr(NaN,NaN,NaN,0):null}function DR(e){return new vr(e>>16&255,e>>8&255,e&255,1)}function Rv(e,n,t,i){return i<=0&&(e=n=t=NaN),new vr(e,n,t,i)}function Eye(e){return e instanceof Qm||(e=Zh(e)),e?(e=e.rgb(),new vr(e.r,e.g,e.b,e.opacity)):new vr}function a4(e,n,t,i){return arguments.length===1?Eye(e):new vr(e,n,t,i??1)}function vr(e,n,t,i){this.r=+e,this.g=+n,this.b=+t,this.opacity=+i}j9(vr,a4,eU(Qm,{brighter(e){return e=e==null?Vg:Math.pow(Vg,e),new vr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Kh:Math.pow(Kh,e),new vr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new vr(nu(this.r),nu(this.g),nu(this.b),Wg(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:RR,formatHex:RR,formatHex8:Tye,formatRgb:PR,toString:PR}));function RR(){return`#${Kl(this.r)}${Kl(this.g)}${Kl(this.b)}`}function Tye(){return`#${Kl(this.r)}${Kl(this.g)}${Kl(this.b)}${Kl((isNaN(this.opacity)?1:this.opacity)*255)}`}function PR(){const e=Wg(this.opacity);return`${e===1?"rgb(":"rgba("}${nu(this.r)}, ${nu(this.g)}, ${nu(this.b)}${e===1?")":`, ${e})`}`}function Wg(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function nu(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Kl(e){return e=nu(e),(e<16?"0":"")+e.toString(16)}function NR(e,n,t,i){return i<=0?e=n=t=NaN:t<=0||t>=1?e=n=NaN:n<=0&&(e=NaN),new Oa(e,n,t,i)}function nU(e){if(e instanceof Oa)return new Oa(e.h,e.s,e.l,e.opacity);if(e instanceof Qm||(e=Zh(e)),!e)return new Oa;if(e instanceof Oa)return e;e=e.rgb();var n=e.r/255,t=e.g/255,i=e.b/255,r=Math.min(n,t,i),a=Math.max(n,t,i),o=NaN,l=a-r,f=(a+r)/2;return l?(n===a?o=(t-i)/l+(t0&&f<1?0:o,new Oa(o,l,f,e.opacity)}function Mye(e,n,t,i){return arguments.length===1?nU(e):new Oa(e,n,t,i??1)}function Oa(e,n,t,i){this.h=+e,this.s=+n,this.l=+t,this.opacity=+i}j9(Oa,Mye,eU(Qm,{brighter(e){return e=e==null?Vg:Math.pow(Vg,e),new Oa(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Kh:Math.pow(Kh,e),new Oa(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 vr(Zx(e>=240?e-240:e+120,r,i),Zx(e,r,i),Zx(e<120?e+240:e-120,r,i),this.opacity)},clamp(){return new Oa($R(this.h),Pv(this.s),Pv(this.l),Wg(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=Wg(this.opacity);return`${e===1?"hsl(":"hsla("}${$R(this.h)}, ${Pv(this.s)*100}%, ${Pv(this.l)*100}%${e===1?")":`, ${e})`}`}}));function $R(e){return e=(e||0)%360,e<0?e+360:e}function Pv(e){return Math.max(0,Math.min(1,e||0))}function Zx(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 D9=e=>()=>e;function jye(e,n){return function(t){return e+t*n}}function Dye(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 Rye(e){return(e=+e)==1?tU:function(n,t){return t-n?Dye(n,t,e):D9(isNaN(n)?t:n)}}function tU(e,n){var t=n-e;return t?jye(e,t):D9(isNaN(e)?n:e)}const zR=(function e(n){var t=Rye(n);function i(r,a){var o=t((r=a4(r)).r,(a=a4(a)).r),l=t(r.g,a.g),f=t(r.b,a.b),c=tU(r.opacity,a.opacity);return function(h){return r.r=o(h),r.g=l(h),r.b=f(h),r.opacity=c(h),r+""}}return i.gamma=e,i})(1);function Pye(e,n){n||(n=[]);var t=e?Math.min(n.length,e.length):0,i=n.slice(),r;return function(a){for(r=0;rt&&(a=n.slice(t,a),l[o]?l[o]+=a:l[++o]=a),(i=i[0])===(r=r[0])?l[o]?l[o]+=r:l[++o]=r:(l[++o]=null,f.push({i:o,x:Gg(i,r)})),t=Qx.lastIndex;return tn&&(t=e,e=n,n=t),function(i){return Math.max(e,Math.min(n,i))}}function Vye(e,n,t){var i=e[0],r=e[1],a=n[0],o=n[1];return r2?Wye:Vye,f=c=null,d}function d(p){return p==null||isNaN(p=+p)?a:(f||(f=l(e.map(i),n,t)))(i(o(p)))}return d.invert=function(p){return o(r((c||(c=l(n,e.map(i),Gg)))(p)))},d.domain=function(p){return arguments.length?(e=Array.from(p,Yg),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=R9,h()},d.clamp=function(p){return arguments.length?(o=p?!0:nr,h()):o!==nr},d.interpolate=function(p){return arguments.length?(t=p,h()):t},d.unknown=function(p){return arguments.length?(a=p,d):a},function(p,v){return i=p,r=v,h()}}function P9(){return d0()(nr,nr)}function Gye(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Kg(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 Kf(e){return e=Kg(Math.abs(e)),e?e[1]:NaN}function Yye(e,n){return function(t,i){for(var r=t.length,a=[],o=0,l=e[0],f=0;r>0&&l>0&&(f+l+1>i&&(l=Math.max(1,i-f)),a.push(t.substring(r-=l,r+l)),!((f+=l+1)>i));)l=e[o=(o+1)%e.length];return a.reverse().join(n)}}function Kye(e){return function(n){return n.replace(/[0-9]/g,function(t){return e[+t]})}}var Xye=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Qh(e){if(!(n=Xye.exec(e)))throw new Error("invalid format: "+e);var n;return new N9({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]})}Qh.prototype=N9.prototype;function N9(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+""}N9.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 Zye(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 Xg;function Qye(e,n){var t=Kg(e,n);if(!t)return Xg=void 0,e.toPrecision(n);var i=t[0],r=t[1],a=r-(Xg=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")+Kg(e,Math.max(0,n+a-1))[0]}function IR(e,n){var t=Kg(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 BR={"%":(e,n)=>(e*100).toFixed(n),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Gye,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)=>IR(e*100,n),r:IR,s:Qye,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function FR(e){return e}var qR=Array.prototype.map,HR=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Jye(e){var n=e.grouping===void 0||e.thousands===void 0?FR:Yye(qR.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?FR:Kye(qR.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function c(d,p){d=Qh(d);var v=d.fill,y=d.align,b=d.sign,w=d.symbol,_=d.zero,S=d.width,C=d.comma,E=d.precision,A=d.trim,T=d.type;T==="n"?(C=!0,T="g"):BR[T]||(E===void 0&&(E=12),A=!0,T="g"),(_||v==="0"&&y==="=")&&(_=!0,v="0",y="=");var j=(p&&p.prefix!==void 0?p.prefix:"")+(w==="$"?t:w==="#"&&/[boxX]/.test(T)?"0"+T.toLowerCase():""),N=(w==="$"?i:/[%p]/.test(T)?o:"")+(p&&p.suffix!==void 0?p.suffix:""),q=BR[T],R=/[defgprs%]/.test(T);E=E===void 0?6:/[gprs]/.test(T)?Math.max(1,Math.min(21,E)):Math.max(0,Math.min(20,E));function L(B){var G=j,H=N,U,P,z;if(T==="c")H=q(B)+H,B="";else{B=+B;var F=B<0||1/B<0;if(B=isNaN(B)?f:q(Math.abs(B),E),A&&(B=Zye(B)),F&&+B==0&&b!=="+"&&(F=!1),G=(F?b==="("?b:l:b==="-"||b==="("?"":b)+G,H=(T==="s"&&!isNaN(B)&&Xg!==void 0?HR[8+Xg/3]:"")+H+(F&&b==="("?")":""),R){for(U=-1,P=B.length;++Uz||z>57){H=(z===46?r+B.slice(U+1):B.slice(U))+H,B=B.slice(0,U);break}}}C&&!_&&(B=n(B,1/0));var Y=G.length+B.length+H.length,D=Y>1)+G+B+H+D.slice(Y);break;default:B=D+G+B+H;break}return a(B)}return L.toString=function(){return d+""},L}function h(d,p){var v=Math.max(-8,Math.min(8,Math.floor(Kf(p)/3)))*3,y=Math.pow(10,-v),b=c((d=Qh(d),d.type="f",d),{suffix:HR[8+v/3]});return function(w){return b(y*w)}}return{format:c,formatPrefix:h}}var Nv,$9,iU;e0e({thousands:",",grouping:[3],currency:["$",""]});function e0e(e){return Nv=Jye(e),$9=Nv.format,iU=Nv.formatPrefix,Nv}function n0e(e){return Math.max(0,-Kf(Math.abs(e)))}function t0e(e,n){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Kf(n)/3)))*3-Kf(Math.abs(e)))}function i0e(e,n){return e=Math.abs(e),n=Math.abs(n)-e,Math.max(0,Kf(n)-Kf(e))+1}function rU(e,n,t,i){var r=i4(e,n,t),a;switch(i=Qh(i??",f"),i.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(n));return i.precision==null&&!isNaN(a=t0e(r,o))&&(i.precision=a),iU(i,o)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(a=i0e(r,Math.max(Math.abs(e),Math.abs(n))))&&(i.precision=a-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(a=n0e(r))&&(i.precision=a-(i.type==="%")*2);break}}return $9(i)}function dl(e){var n=e.domain;return e.ticks=function(t){var i=n();return n4(i[0],i[i.length-1],t??10)},e.tickFormat=function(t,i){var r=n();return rU(r[0],r[r.length-1],t??10,i)},e.nice=function(t){t==null&&(t=10);var i=n(),r=0,a=i.length-1,o=i[r],l=i[a],f,c,h=10;for(l0;){if(c=t4(o,l,t),c===f)return i[r]=o,i[a]=l,n(i);if(c>0)o=Math.floor(o/c)*c,l=Math.ceil(l/c)*c;else if(c<0)o=Math.ceil(o*c)/c,l=Math.floor(l*c)/c;else break;f=c}return e},e}function Zg(){var e=P9();return e.copy=function(){return Jm(e,Zg())},ya.apply(e,arguments),dl(e)}function aU(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,Yg),t):e.slice()},t.unknown=function(i){return arguments.length?(n=i,t):n},t.copy=function(){return aU(e).unknown(n)},e=arguments.length?Array.from(e,Yg):[0,1],dl(t)}function oU(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 l0e(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 WR(e){return(n,t)=>-e(-n,t)}function z9(e){const n=e(UR,VR),t=n.domain;let i=10,r,a;function o(){return r=l0e(i),a=s0e(i),t()[0]<0?(r=WR(r),a=WR(a),e(r0e,a0e)):e(UR,VR),n}return n.base=function(l){return arguments.length?(i=+l,o()):i},n.domain=function(l){return arguments.length?(t(l),o()):t()},n.ticks=l=>{const f=t();let c=f[0],h=f[f.length-1];const d=h0){for(;p<=v;++p)for(y=1;yh)break;_.push(b)}}else for(;p<=v;++p)for(y=i-1;y>=1;--y)if(b=p>0?y/a(-p):y*a(p),!(bh)break;_.push(b)}_.length*2{if(l==null&&(l=10),f==null&&(f=i===10?"s":","),typeof f!="function"&&(!(i%1)&&(f=Qh(f)).precision==null&&(f.trim=!0),f=$9(f)),l===1/0)return f;const c=Math.max(1,i*l/n.ticks().length);return h=>{let d=h/a(Math.round(r(h)));return d*it(oU(t(),{floor:l=>a(Math.floor(r(l))),ceil:l=>a(Math.ceil(r(l)))})),n}function sU(){const e=z9(d0()).domain([1,10]);return e.copy=()=>Jm(e,sU()).base(e.base()),ya.apply(e,arguments),e}function GR(e){return function(n){return Math.sign(n)*Math.log1p(Math.abs(n/e))}}function YR(e){return function(n){return Math.sign(n)*Math.expm1(Math.abs(n))*e}}function L9(e){var n=1,t=e(GR(n),YR(n));return t.constant=function(i){return arguments.length?e(GR(n=+i),YR(n)):n},dl(t)}function lU(){var e=L9(d0());return e.copy=function(){return Jm(e,lU()).constant(e.constant())},ya.apply(e,arguments)}function KR(e){return function(n){return n<0?-Math.pow(-n,e):Math.pow(n,e)}}function u0e(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function f0e(e){return e<0?-e*e:e*e}function I9(e){var n=e(nr,nr),t=1;function i(){return t===1?e(nr,nr):t===.5?e(u0e,f0e):e(KR(t),KR(1/t))}return n.exponent=function(r){return arguments.length?(t=+r,i()):t},dl(n)}function B9(){var e=I9(d0());return e.copy=function(){return Jm(e,B9()).exponent(e.exponent())},ya.apply(e,arguments),e}function c0e(){return B9.apply(null,arguments).exponent(.5)}function XR(e){return Math.sign(e)*e*e}function d0e(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function uU(){var e=P9(),n=[0,1],t=!1,i;function r(a){var o=d0e(e(a));return isNaN(o)?i:t?Math.round(o):o}return r.invert=function(a){return e.invert(XR(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,Yg)).map(XR)),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 uU(e.domain(),n).round(t).clamp(e.clamp()).unknown(i)},ya.apply(r,arguments),dl(r)}function fU(){var e=[],n=[],t=[],i;function r(){var o=0,l=Math.max(1,n.length);for(t=new Array(l-1);++o0?t[l-1]:e[0],l=t?[i[t-1],n]:[i[c-1],i[c]]},o.unknown=function(f){return arguments.length&&(a=f),o},o.thresholds=function(){return i.slice()},o.copy=function(){return cU().domain([e,n]).range(r).unknown(a)},ya.apply(dl(o),arguments)}function dU(){var e=[.5],n=[0,1],t,i=1;function r(a){return a!=null&&a<=a?n[Zm(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 dU().domain(e).range(n).unknown(t)},ya.apply(r,arguments)}const Jx=new Date,e3=new Date;function yi(e,n,t,i){function r(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return r.floor=a=>(e(a=new Date(+a)),a),r.ceil=a=>(e(a=new Date(a-1)),n(a,1),e(a),a),r.round=a=>{const o=r(a),l=r.ceil(a);return a-o(n(a=new Date(+a),o==null?1:Math.floor(o)),a),r.range=(a,o,l)=>{const f=[];if(a=r.ceil(a),l=l==null?1:Math.floor(l),!(a0))return f;let c;do f.push(c=new Date(+a)),n(a,l),e(a);while(cyi(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)=>(Jx.setTime(+a),e3.setTime(+o),e(Jx),e(e3),Math.floor(t(Jx,e3))),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 Qg=yi(()=>{},(e,n)=>{e.setTime(+e+n)},(e,n)=>n-e);Qg.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?yi(n=>{n.setTime(Math.floor(n/e)*e)},(n,t)=>{n.setTime(+n+t*e)},(n,t)=>(t-n)/e):Qg);Qg.range;const Lo=1e3,sa=Lo*60,Io=sa*60,Qo=Io*24,F9=Qo*7,ZR=Qo*30,n3=Qo*365,Xl=yi(e=>{e.setTime(e-e.getMilliseconds())},(e,n)=>{e.setTime(+e+n*Lo)},(e,n)=>(n-e)/Lo,e=>e.getUTCSeconds());Xl.range;const q9=yi(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Lo)},(e,n)=>{e.setTime(+e+n*sa)},(e,n)=>(n-e)/sa,e=>e.getMinutes());q9.range;const H9=yi(e=>{e.setUTCSeconds(0,0)},(e,n)=>{e.setTime(+e+n*sa)},(e,n)=>(n-e)/sa,e=>e.getUTCMinutes());H9.range;const U9=yi(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Lo-e.getMinutes()*sa)},(e,n)=>{e.setTime(+e+n*Io)},(e,n)=>(n-e)/Io,e=>e.getHours());U9.range;const V9=yi(e=>{e.setUTCMinutes(0,0,0)},(e,n)=>{e.setTime(+e+n*Io)},(e,n)=>(n-e)/Io,e=>e.getUTCHours());V9.range;const ep=yi(e=>e.setHours(0,0,0,0),(e,n)=>e.setDate(e.getDate()+n),(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*sa)/Qo,e=>e.getDate()-1);ep.range;const h0=yi(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/Qo,e=>e.getUTCDate()-1);h0.range;const hU=yi(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/Qo,e=>Math.floor(e/Qo));hU.range;function Eu(e){return yi(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())*sa)/F9)}const m0=Eu(0),Jg=Eu(1),h0e=Eu(2),m0e=Eu(3),Xf=Eu(4),p0e=Eu(5),v0e=Eu(6);m0.range;Jg.range;h0e.range;m0e.range;Xf.range;p0e.range;v0e.range;function Tu(e){return yi(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)/F9)}const p0=Tu(0),e1=Tu(1),g0e=Tu(2),y0e=Tu(3),Zf=Tu(4),b0e=Tu(5),w0e=Tu(6);p0.range;e1.range;g0e.range;y0e.range;Zf.range;b0e.range;w0e.range;const W9=yi(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());W9.range;const G9=yi(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());G9.range;const Jo=yi(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());Jo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:yi(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)});Jo.range;const es=yi(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());es.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:yi(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)});es.range;function mU(e,n,t,i,r,a){const o=[[Xl,1,Lo],[Xl,5,5*Lo],[Xl,15,15*Lo],[Xl,30,30*Lo],[a,1,sa],[a,5,5*sa],[a,15,15*sa],[a,30,30*sa],[r,1,Io],[r,3,3*Io],[r,6,6*Io],[r,12,12*Io],[i,1,Qo],[i,2,2*Qo],[t,1,F9],[n,1,ZR],[n,3,3*ZR],[e,1,n3]];function l(c,h,d){const p=hw).right(o,p);if(v===o.length)return e.every(i4(c/n3,h/n3,d));if(v===0)return Qg.every(Math.max(i4(c,h,d),1));const[y,b]=o[p/o[v-1][2]53)return null;"w"in ie||(ie.w=1),"Z"in ie?(pe=i3(Ud(ie.y,0,1)),Ce=pe.getUTCDay(),pe=Ce>4||Ce===0?e1.ceil(pe):e1(pe),pe=h0.offset(pe,(ie.V-1)*7),ie.y=pe.getUTCFullYear(),ie.m=pe.getUTCMonth(),ie.d=pe.getUTCDate()+(ie.w+6)%7):(pe=t3(Ud(ie.y,0,1)),Ce=pe.getDay(),pe=Ce>4||Ce===0?Jg.ceil(pe):Jg(pe),pe=ep.offset(pe,(ie.V-1)*7),ie.y=pe.getFullYear(),ie.m=pe.getMonth(),ie.d=pe.getDate()+(ie.w+6)%7)}else("W"in ie||"U"in ie)&&("w"in ie||(ie.w="u"in ie?ie.u%7:"W"in ie?1:0),Ce="Z"in ie?i3(Ud(ie.y,0,1)).getUTCDay():t3(Ud(ie.y,0,1)).getDay(),ie.m=0,ie.d="W"in ie?(ie.w+6)%7+ie.W*7-(Ce+5)%7:ie.w+ie.U*7-(Ce+6)%7);return"Z"in ie?(ie.H+=ie.Z/100|0,ie.M+=ie.Z%100,i3(ie)):t3(ie)}}function N(oe,ue,ke,ie){for(var Re=0,pe=ue.length,Ce=ke.length,De,be;Re=Ce)return-1;if(De=ue.charCodeAt(Re++),De===37){if(De=ue.charAt(Re++),be=A[De in QR?ue.charAt(Re++):De],!be||(ie=be(oe,ke,ie))<0)return-1}else if(De!=ke.charCodeAt(ie++))return-1}return ie}function q(oe,ue,ke){var ie=c.exec(ue.slice(ke));return ie?(oe.p=h.get(ie[0].toLowerCase()),ke+ie[0].length):-1}function R(oe,ue,ke){var ie=v.exec(ue.slice(ke));return ie?(oe.w=y.get(ie[0].toLowerCase()),ke+ie[0].length):-1}function L(oe,ue,ke){var ie=d.exec(ue.slice(ke));return ie?(oe.w=p.get(ie[0].toLowerCase()),ke+ie[0].length):-1}function B(oe,ue,ke){var ie=_.exec(ue.slice(ke));return ie?(oe.m=S.get(ie[0].toLowerCase()),ke+ie[0].length):-1}function G(oe,ue,ke){var ie=b.exec(ue.slice(ke));return ie?(oe.m=w.get(ie[0].toLowerCase()),ke+ie[0].length):-1}function H(oe,ue,ke){return N(oe,n,ue,ke)}function U(oe,ue,ke){return N(oe,t,ue,ke)}function P(oe,ue,ke){return N(oe,i,ue,ke)}function z(oe){return o[oe.getDay()]}function F(oe){return a[oe.getDay()]}function Y(oe){return f[oe.getMonth()]}function D(oe){return l[oe.getMonth()]}function V(oe){return r[+(oe.getHours()>=12)]}function W(oe){return 1+~~(oe.getMonth()/3)}function $(oe){return o[oe.getUTCDay()]}function X(oe){return a[oe.getUTCDay()]}function te(oe){return f[oe.getUTCMonth()]}function ae(oe){return l[oe.getUTCMonth()]}function le(oe){return r[+(oe.getUTCHours()>=12)]}function ye(oe){return 1+~~(oe.getUTCMonth()/3)}return{format:function(oe){var ue=T(oe+="",C);return ue.toString=function(){return oe},ue},parse:function(oe){var ue=j(oe+="",!1);return ue.toString=function(){return oe},ue},utcFormat:function(oe){var ue=T(oe+="",E);return ue.toString=function(){return oe},ue},utcParse:function(oe){var ue=j(oe+="",!0);return ue.toString=function(){return oe},ue}}}var QR={"-":"",_:" ",0:"0"},Si=/^\s*\d+/,A0e=/^%/,O0e=/[\\^$*+?|[\]().{}]/g;function at(e,n,t){var i=e<0?"-":"",r=(i?-e:e)+"",a=r.length;return i+(a[n.toLowerCase(),t]))}function T0e(e,n,t){var i=Si.exec(n.slice(t,t+1));return i?(e.w=+i[0],t+i[0].length):-1}function M0e(e,n,t){var i=Si.exec(n.slice(t,t+1));return i?(e.u=+i[0],t+i[0].length):-1}function j0e(e,n,t){var i=Si.exec(n.slice(t,t+2));return i?(e.U=+i[0],t+i[0].length):-1}function D0e(e,n,t){var i=Si.exec(n.slice(t,t+2));return i?(e.V=+i[0],t+i[0].length):-1}function R0e(e,n,t){var i=Si.exec(n.slice(t,t+2));return i?(e.W=+i[0],t+i[0].length):-1}function JR(e,n,t){var i=Si.exec(n.slice(t,t+4));return i?(e.y=+i[0],t+i[0].length):-1}function eP(e,n,t){var i=Si.exec(n.slice(t,t+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),t+i[0].length):-1}function P0e(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 N0e(e,n,t){var i=Si.exec(n.slice(t,t+1));return i?(e.q=i[0]*3-3,t+i[0].length):-1}function $0e(e,n,t){var i=Si.exec(n.slice(t,t+2));return i?(e.m=i[0]-1,t+i[0].length):-1}function nP(e,n,t){var i=Si.exec(n.slice(t,t+2));return i?(e.d=+i[0],t+i[0].length):-1}function z0e(e,n,t){var i=Si.exec(n.slice(t,t+3));return i?(e.m=0,e.d=+i[0],t+i[0].length):-1}function tP(e,n,t){var i=Si.exec(n.slice(t,t+2));return i?(e.H=+i[0],t+i[0].length):-1}function L0e(e,n,t){var i=Si.exec(n.slice(t,t+2));return i?(e.M=+i[0],t+i[0].length):-1}function I0e(e,n,t){var i=Si.exec(n.slice(t,t+2));return i?(e.S=+i[0],t+i[0].length):-1}function B0e(e,n,t){var i=Si.exec(n.slice(t,t+3));return i?(e.L=+i[0],t+i[0].length):-1}function F0e(e,n,t){var i=Si.exec(n.slice(t,t+6));return i?(e.L=Math.floor(i[0]/1e3),t+i[0].length):-1}function q0e(e,n,t){var i=A0e.exec(n.slice(t,t+1));return i?t+i[0].length:-1}function H0e(e,n,t){var i=Si.exec(n.slice(t));return i?(e.Q=+i[0],t+i[0].length):-1}function U0e(e,n,t){var i=Si.exec(n.slice(t));return i?(e.s=+i[0],t+i[0].length):-1}function iP(e,n){return at(e.getDate(),n,2)}function V0e(e,n){return at(e.getHours(),n,2)}function W0e(e,n){return at(e.getHours()%12||12,n,2)}function G0e(e,n){return at(1+ep.count(Jo(e),e),n,3)}function pU(e,n){return at(e.getMilliseconds(),n,3)}function Y0e(e,n){return pU(e,n)+"000"}function K0e(e,n){return at(e.getMonth()+1,n,2)}function X0e(e,n){return at(e.getMinutes(),n,2)}function Z0e(e,n){return at(e.getSeconds(),n,2)}function Q0e(e){var n=e.getDay();return n===0?7:n}function J0e(e,n){return at(m0.count(Jo(e)-1,e),n,2)}function vU(e){var n=e.getDay();return n>=4||n===0?Xf(e):Xf.ceil(e)}function ebe(e,n){return e=vU(e),at(Xf.count(Jo(e),e)+(Jo(e).getDay()===4),n,2)}function nbe(e){return e.getDay()}function tbe(e,n){return at(Jg.count(Jo(e)-1,e),n,2)}function ibe(e,n){return at(e.getFullYear()%100,n,2)}function rbe(e,n){return e=vU(e),at(e.getFullYear()%100,n,2)}function abe(e,n){return at(e.getFullYear()%1e4,n,4)}function obe(e,n){var t=e.getDay();return e=t>=4||t===0?Xf(e):Xf.ceil(e),at(e.getFullYear()%1e4,n,4)}function sbe(e){var n=e.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+at(n/60|0,"0",2)+at(n%60,"0",2)}function rP(e,n){return at(e.getUTCDate(),n,2)}function lbe(e,n){return at(e.getUTCHours(),n,2)}function ube(e,n){return at(e.getUTCHours()%12||12,n,2)}function fbe(e,n){return at(1+h0.count(es(e),e),n,3)}function gU(e,n){return at(e.getUTCMilliseconds(),n,3)}function cbe(e,n){return gU(e,n)+"000"}function dbe(e,n){return at(e.getUTCMonth()+1,n,2)}function hbe(e,n){return at(e.getUTCMinutes(),n,2)}function mbe(e,n){return at(e.getUTCSeconds(),n,2)}function pbe(e){var n=e.getUTCDay();return n===0?7:n}function vbe(e,n){return at(p0.count(es(e)-1,e),n,2)}function yU(e){var n=e.getUTCDay();return n>=4||n===0?Zf(e):Zf.ceil(e)}function gbe(e,n){return e=yU(e),at(Zf.count(es(e),e)+(es(e).getUTCDay()===4),n,2)}function ybe(e){return e.getUTCDay()}function bbe(e,n){return at(e1.count(es(e)-1,e),n,2)}function wbe(e,n){return at(e.getUTCFullYear()%100,n,2)}function kbe(e,n){return e=yU(e),at(e.getUTCFullYear()%100,n,2)}function _be(e,n){return at(e.getUTCFullYear()%1e4,n,4)}function xbe(e,n){var t=e.getUTCDay();return e=t>=4||t===0?Zf(e):Zf.ceil(e),at(e.getUTCFullYear()%1e4,n,4)}function Sbe(){return"+0000"}function aP(){return"%"}function oP(e){return+e}function sP(e){return Math.floor(+e/1e3)}var wf,bU,wU;Cbe({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 Cbe(e){return wf=C0e(e),bU=wf.format,wf.parse,wU=wf.utcFormat,wf.utcParse,wf}function Abe(e){return new Date(e)}function Obe(e){return e instanceof Date?+e:+new Date(+e)}function Y9(e,n,t,i,r,a,o,l,f,c){var h=P9(),d=h.invert,p=h.domain,v=c(".%L"),y=c(":%S"),b=c("%I:%M"),w=c("%I %p"),_=c("%a %d"),S=c("%b %d"),C=c("%B"),E=c("%Y");function A(T){return(f(T)n(r/(e.length-1)))},t.quantiles=function(i){return Array.from({length:i+1},(r,a)=>vye(e,a/i))},t.copy=function(){return SU(n).domain(e)},cs.apply(t,arguments)}function g0(){var e=0,n=.5,t=1,i=1,r,a,o,l,f,c=nr,h,d=!1,p;function v(b){return isNaN(b=+b)?p:(b=.5+((b=+h(b))-a)*(i*bt}return a3=e,a3}var o3,cP;function Rbe(){if(cP)return o3;cP=1;var e=EU(),n=Dbe(),t=Ic();function i(r){return r&&r.length?e(r,t,n):void 0}return o3=i,o3}var Pbe=Rbe();const Gs=ot(Pbe);var s3,dP;function Nbe(){if(dP)return s3;dP=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};tn.decimalPlaces=tn.dp=function(){var e=this,n=e.d.length-1,t=(n-e.e)*Rt;if(n=e.d[n],n)for(;n%10==0;n/=10)t--;return t<0?0:t};tn.dividedBy=tn.div=function(e){return Go(this,new this.constructor(e))};tn.dividedToIntegerBy=tn.idiv=function(e){var n=this,t=n.constructor;return xt(Go(n,new t(e),0,1),t.precision)};tn.equals=tn.eq=function(e){return!this.cmp(e)};tn.exponent=function(){return ci(this)};tn.greaterThan=tn.gt=function(e){return this.cmp(e)>0};tn.greaterThanOrEqualTo=tn.gte=function(e){return this.cmp(e)>=0};tn.isInteger=tn.isint=function(){return this.e>this.d.length-2};tn.isNegative=tn.isneg=function(){return this.s<0};tn.isPositive=tn.ispos=function(){return this.s>0};tn.isZero=function(){return this.s===0};tn.lessThan=tn.lt=function(e){return this.cmp(e)<0};tn.lessThanOrEqualTo=tn.lte=function(e){return this.cmp(e)<1};tn.logarithm=tn.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($r))throw Error(ca+"NaN");if(t.s<1)throw Error(ca+(t.s?"NaN":"-Infinity"));return t.eq($r)?new i(0):(qt=!1,n=Go(Jh(t,a),Jh(e,a),a),qt=!0,xt(n,r))};tn.minus=tn.sub=function(e){var n=this;return e=new n.constructor(e),n.s==e.s?DU(n,e):MU(n,(e.s=-e.s,e))};tn.modulo=tn.mod=function(e){var n,t=this,i=t.constructor,r=i.precision;if(e=new i(e),!e.s)throw Error(ca+"NaN");return t.s?(qt=!1,n=Go(t,e,0,1).times(e),qt=!0,t.minus(n)):xt(new i(t),r)};tn.naturalExponential=tn.exp=function(){return jU(this)};tn.naturalLogarithm=tn.ln=function(){return Jh(this)};tn.negated=tn.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};tn.plus=tn.add=function(e){var n=this;return e=new n.constructor(e),n.s==e.s?MU(n,e):DU(n,(e.s=-e.s,e))};tn.precision=tn.sd=function(e){var n,t,i,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(tu+e);if(n=ci(r)+1,i=r.d.length-1,t=i*Rt+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};tn.squareRoot=tn.sqrt=function(){var e,n,t,i,r,a,o,l=this,f=l.constructor;if(l.s<1){if(!l.s)return new f(0);throw Error(ca+"NaN")}for(e=ci(l),qt=!1,r=Math.sqrt(+l),r==0||r==1/0?(n=Ya(l.d),(n.length+e)%2==0&&(n+="0"),r=Math.sqrt(n),e=qc((e+1)/2)-(e<0||e%2),r==1/0?n="5e"+e:(n=r.toExponential(),n=n.slice(0,n.indexOf("e")+1)+e),i=new f(n)):i=new f(r.toString()),t=f.precision,r=o=t+3;;)if(a=i,i=a.plus(Go(l,a,o+2)).times(.5),Ya(a.d).slice(0,o)===(n=Ya(i.d)).slice(0,o)){if(n=n.slice(o-3,o+1),r==o&&n=="4999"){if(xt(a,t+1,0),a.times(a).eq(l)){i=a;break}}else if(n!="9999")break;o+=4}return qt=!0,xt(i,t)};tn.times=tn.mul=function(e){var n,t,i,r,a,o,l,f,c,h=this,d=h.constructor,p=h.d,v=(e=new d(e)).d;if(!h.s||!e.s)return new d(0);for(e.s*=h.s,t=h.e+e.e,f=p.length,c=v.length,f=0;){for(n=0,r=f+i;r>i;)l=a[r]+v[i]*p[r-i-1]+n,a[r--]=l%ki|0,n=l/ki|0;a[r]=(a[r]+n)%ki|0}for(;!a[--o];)a.pop();return n?++t:a.shift(),e.d=a,e.e=t,qt?xt(e,d.precision):e};tn.toDecimalPlaces=tn.todp=function(e,n){var t=this,i=t.constructor;return t=new i(t),e===void 0?t:(ro(e,0,Fc),n===void 0?n=i.rounding:ro(n,0,8),xt(t,e+ci(t)+1,n))};tn.toExponential=function(e,n){var t,i=this,r=i.constructor;return e===void 0?t=du(i,!0):(ro(e,0,Fc),n===void 0?n=r.rounding:ro(n,0,8),i=xt(new r(i),e+1,n),t=du(i,!0,e+1)),t};tn.toFixed=function(e,n){var t,i,r=this,a=r.constructor;return e===void 0?du(r):(ro(e,0,Fc),n===void 0?n=a.rounding:ro(n,0,8),i=xt(new a(r),e+ci(r)+1,n),t=du(i.abs(),!1,e+ci(i)+1),r.isneg()&&!r.isZero()?"-"+t:t)};tn.toInteger=tn.toint=function(){var e=this,n=e.constructor;return xt(new n(e),ci(e)+1,n.rounding)};tn.toNumber=function(){return+this};tn.toPower=tn.pow=function(e){var n,t,i,r,a,o,l=this,f=l.constructor,c=12,h=+(e=new f(e));if(!e.s)return new f($r);if(l=new f(l),!l.s){if(e.s<1)throw Error(ca+"Infinity");return l}if(l.eq($r))return l;if(i=f.precision,e.eq($r))return xt(l,i);if(n=e.e,t=e.d.length-1,o=n>=t,a=l.s,o){if((t=h<0?-h:h)<=TU){for(r=new f($r),n=Math.ceil(i/Rt+4),qt=!1;t%2&&(r=r.times(l),yP(r.d,n)),t=qc(t/2),t!==0;)l=l.times(l),yP(l.d,n);return qt=!0,e.s<0?new f($r).div(r):xt(r,i)}}else if(a<0)throw Error(ca+"NaN");return a=a<0&&e.d[Math.max(n,t)]&1?-1:1,l.s=1,qt=!1,r=e.times(Jh(l,i+c)),qt=!0,r=jU(r),r.s=a,r};tn.toPrecision=function(e,n){var t,i,r=this,a=r.constructor;return e===void 0?(t=ci(r),i=du(r,t<=a.toExpNeg||t>=a.toExpPos)):(ro(e,1,Fc),n===void 0?n=a.rounding:ro(n,0,8),r=xt(new a(r),e,n),t=ci(r),i=du(r,e<=t||t<=a.toExpNeg,e)),i};tn.toSignificantDigits=tn.tosd=function(e,n){var t=this,i=t.constructor;return e===void 0?(e=i.precision,n=i.rounding):(ro(e,1,Fc),n===void 0?n=i.rounding:ro(n,0,8)),xt(new i(t),e,n)};tn.toString=tn.valueOf=tn.val=tn.toJSON=tn[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,n=ci(e),t=e.constructor;return du(e,n<=t.toExpNeg||n>=t.toExpPos)};function MU(e,n){var t,i,r,a,o,l,f,c,h=e.constructor,d=h.precision;if(!e.s||!n.s)return n.s||(n=new h(e)),qt?xt(n,d):n;if(f=e.d,c=n.d,o=e.e,r=n.e,f=f.slice(),a=o-r,a){for(a<0?(i=f,a=-a,l=c.length):(i=c,r=o,l=f.length),o=Math.ceil(d/Rt),l=o>l?o+1:l+1,a>l&&(a=l,i.length=1),i.reverse();a--;)i.push(0);i.reverse()}for(l=f.length,a=c.length,l-a<0&&(a=l,i=c,c=f,f=i),t=0;a;)t=(f[--a]=f[a]+c[a]+t)/ki|0,f[a]%=ki;for(t&&(f.unshift(t),++r),l=f.length;f[--l]==0;)f.pop();return n.d=f,n.e=r,qt?xt(n,d):n}function ro(e,n,t){if(e!==~~e||et)throw Error(tu+e)}function Ya(e){var n,t,i,r=e.length-1,a="",o=e[0];if(r>0){for(a+=o,n=1;no?1:-1;else for(l=f=0;lr[l]?1:-1;break}return f}function t(i,r,a){for(var o=0;a--;)i[a]-=o,o=i[a]1;)i.shift()}return function(i,r,a,o){var l,f,c,h,d,p,v,y,b,w,_,S,C,E,A,T,j,N,q=i.constructor,R=i.s==r.s?1:-1,L=i.d,B=r.d;if(!i.s)return new q(i);if(!r.s)throw Error(ca+"Division by zero");for(f=i.e-r.e,j=B.length,A=L.length,v=new q(R),y=v.d=[],c=0;B[c]==(L[c]||0);)++c;if(B[c]>(L[c]||0)&&--f,a==null?S=a=q.precision:o?S=a+(ci(i)-ci(r))+1:S=a,S<0)return new q(0);if(S=S/Rt+2|0,c=0,j==1)for(h=0,B=B[0],S++;(c1&&(B=e(B,h),L=e(L,h),j=B.length,A=L.length),E=j,b=L.slice(0,j),w=b.length;w=ki/2&&++T;do h=0,l=n(B,b,j,w),l<0?(_=b[0],j!=w&&(_=_*ki+(b[1]||0)),h=_/T|0,h>1?(h>=ki&&(h=ki-1),d=e(B,h),p=d.length,w=b.length,l=n(d,b,p,w),l==1&&(h--,t(d,j16)throw Error(Z9+ci(e));if(!e.s)return new h($r);for(qt=!1,l=d,o=new h(.03125);e.abs().gte(.1);)e=e.times(o),c+=5;for(i=Math.log(ql(2,c))/Math.LN10*2+5|0,l+=i,t=r=a=new h($r),h.precision=l;;){if(r=xt(r.times(e),l),t=t.times(++f),o=a.plus(Go(r,t,l)),Ya(o.d).slice(0,l)===Ya(a.d).slice(0,l)){for(;c--;)a=xt(a.times(a),l);return h.precision=d,n==null?(qt=!0,xt(a,d)):a}a=o}}function ci(e){for(var n=e.e*Rt,t=e.d[0];t>=10;t/=10)n++;return n}function d3(e,n,t){if(n>e.LN10.sd())throw qt=!0,t&&(e.precision=t),Error(ca+"LN10 precision limit exceeded");return xt(new e(e.LN10),n)}function qs(e){for(var n="";e--;)n+="0";return n}function Jh(e,n){var t,i,r,a,o,l,f,c,h,d=1,p=10,v=e,y=v.d,b=v.constructor,w=b.precision;if(v.s<1)throw Error(ca+(v.s?"NaN":"-Infinity"));if(v.eq($r))return new b(0);if(n==null?(qt=!1,c=w):c=n,v.eq(10))return n==null&&(qt=!0),d3(b,c);if(c+=p,b.precision=c,t=Ya(y),i=t.charAt(0),a=ci(v),Math.abs(a)<15e14){for(;i<7&&i!=1||i==1&&t.charAt(1)>3;)v=v.times(e),t=Ya(v.d),i=t.charAt(0),d++;a=ci(v),i>1?(v=new b("0."+t),a++):v=new b(i+"."+t.slice(1))}else return f=d3(b,c+2,w).times(a+""),v=Jh(new b(i+"."+t.slice(1)),c-p).plus(f),b.precision=w,n==null?(qt=!0,xt(v,w)):v;for(l=o=v=Go(v.minus($r),v.plus($r),c),h=xt(v.times(v),c),r=3;;){if(o=xt(o.times(h),c),f=l.plus(Go(o,new b(r),c)),Ya(f.d).slice(0,c)===Ya(l.d).slice(0,c))return l=l.times(2),a!==0&&(l=l.plus(d3(b,c+2,w).times(a+""))),l=Go(l,new b(d),c),b.precision=w,n==null?(qt=!0,xt(l,w)):l;l=f,r+=2}}function gP(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=qc(t/Rt),e.d=[],i=(t+1)%Rt,t<0&&(i+=Rt),in1||e.e<-n1))throw Error(Z9+t)}else e.s=0,e.e=0,e.d=[0];return e}function xt(e,n,t){var i,r,a,o,l,f,c,h,d=e.d;for(o=1,a=d[0];a>=10;a/=10)o++;if(i=n-o,i<0)i+=Rt,r=n,c=d[h=0];else{if(h=Math.ceil((i+1)/Rt),a=d.length,h>=a)return e;for(c=a=d[h],o=1;a>=10;a/=10)o++;i%=Rt,r=i-Rt+o}if(t!==void 0&&(a=ql(10,o-r-1),l=c/a%10|0,f=n<0||d[h+1]!==void 0||c%a,f=t<4?(l||f)&&(t==0||t==(e.s<0?3:2)):l>5||l==5&&(t==4||f||t==6&&(i>0?r>0?c/ql(10,o-r):0:d[h-1])%10&1||t==(e.s<0?8:7))),n<1||!d[0])return f?(a=ci(e),d.length=1,n=n-a-1,d[0]=ql(10,(Rt-n%Rt)%Rt),e.e=qc(-n/Rt)||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=ql(10,Rt-i),d[h]=r>0?(c/ql(10,o-r)%ql(10,r)|0)*a:0),f)for(;;)if(h==0){(d[0]+=a)==ki&&(d[0]=1,++e.e);break}else{if(d[h]+=a,d[h]!=ki)break;d[h--]=0,a=1}for(i=d.length;d[--i]===0;)d.pop();if(qt&&(e.e>n1||e.e<-n1))throw Error(Z9+ci(e));return e}function DU(e,n){var t,i,r,a,o,l,f,c,h,d,p=e.constructor,v=p.precision;if(!e.s||!n.s)return n.s?n.s=-n.s:n=new p(e),qt?xt(n,v):n;if(f=e.d,d=n.d,i=n.e,c=e.e,f=f.slice(),o=c-i,o){for(h=o<0,h?(t=f,o=-o,l=d.length):(t=d,i=c,l=f.length),r=Math.max(Math.ceil(v/Rt),l)+2,o>r&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for(r=f.length,l=d.length,h=r0;--r)f[l++]=0;for(r=d.length;r>o;){if(f[--r]0?a=a.charAt(0)+"."+a.slice(1)+qs(i):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(r<0?"e":"e+")+r):r<0?(a="0."+qs(-r-1)+a,t&&(i=t-o)>0&&(a+=qs(i))):r>=o?(a+=qs(r+1-o),t&&(i=t-r-1)>0&&(a=a+"."+qs(i))):((i=r+1)0&&(r+1===o&&(a+="."),a+=qs(i))),e.s<0?"-"+a:a}function yP(e,n){if(e.length>n)return e.length=n,!0}function RU(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(tu+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 gP(o,a.toString())}else if(typeof a!="string")throw Error(tu+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,Vbe.test(a))gP(o,a);else throw Error(tu+a)}if(r.prototype=tn,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=RU,r.config=r.set=Wbe,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(tu+t+": "+i);if((i=e[t="LN10"])!==void 0)if(i==Math.LN10)this[t]=new this(i);else throw Error(tu+t+": "+i);return this}var Q9=RU(Ube);$r=new Q9(1);const yt=Q9;function Gbe(e){return Zbe(e)||Xbe(e)||Kbe(e)||Ybe()}function Ybe(){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 Kbe(e,n){if(e){if(typeof e=="string")return l4(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 l4(e,n)}}function Xbe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Zbe(e){if(Array.isArray(e))return l4(e)}function l4(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,bP(function(){for(var l=arguments.length,f=new Array(l),c=0;ce.length)&&(n=e.length);for(var t=0,i=new Array(n);t"u"||!(Symbol.iterator in Object(e)))){var t=[],i=!0,r=!1,a=void 0;try{for(var o=e[Symbol.iterator](),l;!(i=(l=o.next()).done)&&(t.push(l.value),!(n&&t.length===n));i=!0);}catch(f){r=!0,a=f}finally{try{!i&&o.return!=null&&o.return()}finally{if(r)throw a}}return t}}function dwe(e){if(Array.isArray(e))return e}function LU(e){var n=em(e,2),t=n[0],i=n[1],r=t,a=i;return t>i&&(r=i,a=t),[r,a]}function IU(e,n,t){if(e.lte(0))return new yt(0);var i=w0.getDigitCount(e.toNumber()),r=new yt(10).pow(i),a=e.div(r),o=i!==1?.05:.1,l=new yt(Math.ceil(a.div(o).toNumber())).add(t).mul(o),f=l.mul(r);return n?f:new yt(Math.ceil(f))}function hwe(e,n,t){var i=1,r=new yt(e);if(!r.isint()&&t){var a=Math.abs(e);a<1?(i=new yt(10).pow(w0.getDigitCount(e)-1),r=new yt(Math.floor(r.div(i).toNumber())).mul(i)):a>1&&(r=new yt(Math.floor(e)))}else e===0?r=new yt(Math.floor((n-1)/2)):t||(r=new yt(Math.floor(e)));var o=Math.floor((n-1)/2),l=nwe(ewe(function(f){return r.add(new yt(f-o).mul(i)).toNumber()}),u4);return l(0,n)}function BU(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 yt(0),tickMin:new yt(0),tickMax:new yt(0)};var a=IU(new yt(n).sub(e).div(t-1),i,r),o;e<=0&&n>=0?o=new yt(0):(o=new yt(e).add(n).div(2),o=o.sub(new yt(o).mod(a)));var l=Math.ceil(o.sub(e).div(a).toNumber()),f=Math.ceil(new yt(n).sub(o).div(a).toNumber()),c=l+f+1;return c>t?BU(e,n,t,i,r+1):(c0?f+(t-c):f,l=n>0?l:l+(t-c)),{step:a,tickMin:o.sub(new yt(l).mul(a)),tickMax:o.add(new yt(f).mul(a))})}function mwe(e){var n=em(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=LU([t,i]),f=em(l,2),c=f[0],h=f[1];if(c===-1/0||h===1/0){var d=h===1/0?[c].concat(c4(u4(0,r-1).map(function(){return 1/0}))):[].concat(c4(u4(0,r-1).map(function(){return-1/0})),[h]);return t>i?f4(d):d}if(c===h)return hwe(c,r,a);var p=BU(c,h,o,a),v=p.step,y=p.tickMin,b=p.tickMax,w=w0.rangeStep(y,b.add(new yt(.1).mul(v)),v);return t>i?f4(w):w}function pwe(e,n){var t=em(e,2),i=t[0],r=t[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=LU([i,r]),l=em(o,2),f=l[0],c=l[1];if(f===-1/0||c===1/0)return[i,r];if(f===c)return[f];var h=Math.max(n,2),d=IU(new yt(c).sub(f).div(h-1),a,0),p=[].concat(c4(w0.rangeStep(new yt(f),new yt(c).sub(new yt(.99).mul(d)),d)),[c]);return i>r?f4(p):p}var vwe=$U(mwe),gwe=$U(pwe),ywe="Invariant failed";function hu(e,n){throw new Error(ywe)}var bwe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];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 t1(){return t1=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 Awe(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 Owe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Ewe(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);t1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,l=(t=i==null?void 0:i.length)!==null&&t!==void 0?t:0;if(l<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var f=a.range,c=0;c0?r[c-1].coordinate:r[l-1].coordinate,d=r[c].coordinate,p=c>=l-1?r[0].coordinate:r[c+1].coordinate,v=void 0;if(Ma(d-h)!==Ma(p-d)){var y=[];if(Ma(p-d)===Ma(f[1]-f[0])){v=p;var b=d+f[1]-f[0];y[0]=Math.min(b,(b+h)/2),y[1]=Math.max(b,(b+h)/2)}else{v=h;var w=p+f[1]-f[0];y[0]=Math.min(d,(w+d)/2),y[1]=Math.max(d,(w+d)/2)}var _=[Math.min(d,(v+d)/2),Math.max(d,(v+d)/2)];if(n>_[0]&&n<=_[1]||n>=y[0]&&n<=y[1]){o=r[c].index;break}}else{var S=Math.min(h,p),C=Math.max(h,p);if(n>(S+d)/2&&n<=(C+d)/2){o=r[c].index;break}}}else for(var E=0;E0&&E(i[E].coordinate+i[E-1].coordinate)/2&&n<=(i[E].coordinate+i[E+1].coordinate)/2||E===l-1&&n>(i[E].coordinate+i[E-1].coordinate)/2){o=i[E].index;break}return o},J9=function(n){var t,i=n,r=i.type.displayName,a=(t=n.type)!==null&&t!==void 0&&t.defaultProps?Kt(Kt({},n.type.defaultProps),n.props):n.props,o=a.stroke,l=a.fill,f;switch(r){case"Line":f=o;break;case"Area":case"Radar":f=o&&o!=="none"?o:l;break;default:f=l;break}return f},Vwe=function(n){var t=n.barSize,i=n.totalSize,r=n.stackGroups,a=r===void 0?{}:r;if(!a)return{};for(var o={},l=Object.keys(a),f=0,c=l.length;f=0});if(_&&_.length){var S=_[0].type.defaultProps,C=S!==void 0?Kt(Kt({},S),_[0].props):_[0].props,E=C.barSize,A=C[w];o[A]||(o[A]=[]);var T=Bn(E)?t:E;o[A].push({item:_[0],stackList:_.slice(1),barSize:Bn(T)?void 0:cu(T,i,0)})}}return o},Wwe=function(n){var t=n.barGap,i=n.barCategoryGap,r=n.bandSize,a=n.sizeList,o=a===void 0?[]:a,l=n.maxBarSize,f=o.length;if(f<1)return null;var c=cu(t,r,0,!0),h,d=[];if(o[0].barSize===+o[0].barSize){var p=!1,v=r/f,y=o.reduce(function(E,A){return E+A.barSize||0},0);y+=(f-1)*c,y>=r&&(y-=(f-1)*c,c=0),y>=r&&v>0&&(p=!0,v*=.9,y=f*v);var b=(r-y)/2>>0,w={offset:b-c,size:0};h=o.reduce(function(E,A){var T={item:A.item,position:{offset:w.offset+w.size+c,size:p?v:A.barSize}},j=[].concat(_P(E),[T]);return w=j[j.length-1].position,A.stackList&&A.stackList.length&&A.stackList.forEach(function(N){j.push({item:N,position:w})}),j},d)}else{var _=cu(i,r,0,!0);r-2*_-(f-1)*c<=0&&(c=0);var S=(r-2*_-(f-1)*c)/f;S>1&&(S>>=0);var C=l===+l?Math.min(S,l):S;h=o.reduce(function(E,A,T){var j=[].concat(_P(E),[{item:A.item,position:{offset:_+(S+c)*T+(S-C)/2,size:C}}]);return A.stackList&&A.stackList.length&&A.stackList.forEach(function(N){j.push({item:N,position:j[j.length-1].position})}),j},d)}return h},Gwe=function(n,t,i,r){var a=i.children,o=i.width,l=i.margin,f=o-(l.left||0)-(l.right||0),c=UU({children:a,legendWidth:f});if(c){var h=r||{},d=h.width,p=h.height,v=c.align,y=c.verticalAlign,b=c.layout;if((b==="vertical"||b==="horizontal"&&y==="middle")&&v!=="center"&&qe(n[v]))return Kt(Kt({},n),{},$f({},v,n[v]+(d||0)));if((b==="horizontal"||b==="vertical"&&v==="center")&&y!=="middle"&&qe(n[y]))return Kt(Kt({},n),{},$f({},y,n[y]+(p||0)))}return n},Ywe=function(n,t,i){return Bn(t)?!0:n==="horizontal"?t==="yAxis":n==="vertical"||i==="x"?t==="xAxis":i==="y"?t==="yAxis":!0},VU=function(n,t,i,r,a){var o=t.props.children,l=ua(o,np).filter(function(c){return Ywe(r,a,c.props.direction)});if(l&&l.length){var f=l.map(function(c){return c.props.dataKey});return n.reduce(function(c,h){var d=ir(h,i);if(Bn(d))return c;var p=Array.isArray(d)?[y0(d),Gs(d)]:[d,d],v=f.reduce(function(y,b){var w=ir(h,b,0),_=p[0]-Math.abs(Array.isArray(w)?w[0]:w),S=p[1]+Math.abs(Array.isArray(w)?w[1]:w);return[Math.min(_,y[0]),Math.max(S,y[1])]},[1/0,-1/0]);return[Math.min(v[0],c[0]),Math.max(v[1],c[1])]},[1/0,-1/0])}return null},Kwe=function(n,t,i,r,a){var o=t.map(function(l){return VU(n,l,i,a,r)}).filter(function(l){return!Bn(l)});return o&&o.length?o.reduce(function(l,f){return[Math.min(l[0],f[0]),Math.max(l[1],f[1])]},[1/0,-1/0]):null},WU=function(n,t,i,r,a){var o=t.map(function(f){var c=f.props.dataKey;return i==="number"&&c&&VU(n,f,c,r)||wh(n,c,i,a)});if(i==="number")return o.reduce(function(f,c){return[Math.min(f[0],c[0]),Math.max(f[1],c[1])]},[1/0,-1/0]);var l={};return o.reduce(function(f,c){for(var h=0,d=c.length;h=2?Ma(l[0]-l[1])*2*c:c,t&&(n.ticks||n.niceTicks)){var h=(n.ticks||n.niceTicks).map(function(d){var p=a?a.indexOf(d):d;return{coordinate:r(p)+c,value:d,offset:c}});return h.filter(function(d){return!zc(d.coordinate)})}return n.isCategorical&&n.categoricalDomain?n.categoricalDomain.map(function(d,p){return{coordinate:r(d)+c,value:d,index:p,offset:c}}):r.ticks&&!i?r.ticks(n.tickCount).map(function(d){return{coordinate:r(d)+c,value:d,offset:c}}):r.domain().map(function(d,p){return{coordinate:r(d)+c,value:a?a[d]:d,index:p,offset:c}})},h3=new WeakMap,$v=function(n,t){if(typeof t!="function")return n;h3.has(n)||h3.set(n,new WeakMap);var i=h3.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},Xwe=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:Yh(),realScaleType:"band"}:o==="radial"&&l==="angleAxis"?{scale:Zg(),realScaleType:"linear"}:a==="category"&&t&&(t.indexOf("LineChart")>=0||t.indexOf("AreaChart")>=0||t.indexOf("ComposedChart")>=0&&!i)?{scale:bh(),realScaleType:"point"}:a==="category"?{scale:Yh(),realScaleType:"band"}:{scale:Zg(),realScaleType:"linear"};if(fu(r)){var f="scale".concat(a0(r));return{scale:(lP[f]||bh)(),realScaleType:lP[f]?f:"point"}}return Rn(r)?{scale:r}:{scale:bh(),realScaleType:"point"}},SP=1e-4,Zwe=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])-SP,o=Math.max(r[0],r[1])+SP,l=n(t[0]),f=n(t[i-1]);(lo||fo)&&n.domain([t[0],t[i-1]])}},Qwe=function(n,t){if(!n)return null;for(var i=0,r=n.length;ir)&&(a[1]=r),a[0]>r&&(a[0]=r),a[1]=0?(n[l][i][0]=a,n[l][i][1]=a+f,a=n[l][i][1]):(n[l][i][0]=o,n[l][i][1]=o+f,o=n[l][i][1])}},nke=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)}},tke={sign:eke,expand:Ipe,none:Uf,silhouette:Bpe,wiggle:Fpe,positive:nke},ike=function(n,t,i){var r=t.map(function(l){return l.props.dataKey}),a=tke[i],o=Lpe().keys(r).value(function(l,f){return+ir(l,f,0)}).order(US).offset(a);return o(n)},rke=function(n,t,i,r,a,o){if(!n)return null;var l=o?t.reverse():t,f={},c=l.reduce(function(d,p){var v,y=(v=p.type)!==null&&v!==void 0&&v.defaultProps?Kt(Kt({},p.type.defaultProps),p.props):p.props,b=y.stackId,w=y.hide;if(w)return d;var _=y[i],S=d[_]||{hasStack:!1,stackGroups:{}};if(gi(b)){var C=S.stackGroups[b]||{numericAxisId:i,cateAxisId:r,items:[]};C.items.push(p),S.hasStack=!0,S.stackGroups[b]=C}else S.stackGroups[Lc("_stackId_")]={numericAxisId:i,cateAxisId:r,items:[p]};return Kt(Kt({},d),{},$f({},_,S))},f),h={};return Object.keys(c).reduce(function(d,p){var v=c[p];if(v.hasStack){var y={};v.stackGroups=Object.keys(v.stackGroups).reduce(function(b,w){var _=v.stackGroups[w];return Kt(Kt({},b),{},$f({},w,{numericAxisId:i,cateAxisId:r,items:_.items,stackedData:ike(n,_.items,a)}))},y)}return Kt(Kt({},d),{},$f({},p,v))},h)},ake=function(n,t){var i=t.realScaleType,r=t.type,a=t.tickCount,o=t.originalDomain,l=t.allowDecimals,f=i||t.scale;if(f!=="auto"&&f!=="linear")return null;if(a&&r==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var c=n.domain();if(!c.length)return null;var h=vwe(c,a,l);return n.domain([y0(h),Gs(h)]),{niceTicks:h}}if(a&&r==="number"){var d=n.domain(),p=gwe(d,a,l);return{niceTicks:p}}return null};function r1(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&&!Bn(r[n.dataKey])){var l=Mg(t,"value",r[n.dataKey]);if(l)return l.coordinate+i/2}return t[a]?t[a].coordinate+i/2:null}var f=ir(r,Bn(o)?n.dataKey:o);return Bn(f)?null:n.scale(f)}var CP=function(n){var t=n.axis,i=n.ticks,r=n.offset,a=n.bandSize,o=n.entry,l=n.index;if(t.type==="category")return i[l]?i[l].coordinate+r:null;var f=ir(o,t.dataKey,t.domain[l]);return Bn(f)?null:t.scale(f)-a/2+r},oke=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]},ske=function(n,t){var i,r=(i=n.type)!==null&&i!==void 0&&i.defaultProps?Kt(Kt({},n.type.defaultProps),n.props):n.props,a=r.stackId;if(gi(a)){var o=t[a];if(o){var l=o.items.indexOf(n);return l>=0?o.stackedData[l]:null}}return null},lke=function(n){return n.reduce(function(t,i){return[y0(i.concat([t[0]]).filter(qe)),Gs(i.concat([t[1]]).filter(qe))]},[1/0,-1/0])},KU=function(n,t,i){return Object.keys(n).reduce(function(r,a){var o=n[a],l=o.stackedData,f=l.reduce(function(c,h){var d=lke(h.slice(t,i+1));return[Math.min(c[0],d[0]),Math.max(c[1],d[1])]},[1/0,-1/0]);return[Math.min(f[0],r[0]),Math.max(f[1],r[1])]},[1/0,-1/0]).map(function(r){return r===1/0||r===-1/0?0:r})},AP=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,OP=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,p4=function(n,t,i){if(Rn(n))return n(t,i);if(!Array.isArray(n))return t;var r=[];if(qe(n[0]))r[0]=i?n[0]:Math.min(n[0],t[0]);else if(AP.test(n[0])){var a=+AP.exec(n[0])[1];r[0]=t[0]-a}else Rn(n[0])?r[0]=n[0](t[0]):r[0]=t[0];if(qe(n[1]))r[1]=i?n[1]:Math.max(n[1],t[1]);else if(OP.test(n[1])){var o=+OP.exec(n[1])[1];r[1]=t[1]+o}else Rn(n[1])?r[1]=n[1](t[1]):r[1]=t[1];return r},a1=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=A9(t,function(d){return d.coordinate}),o=1/0,l=1,f=a.length;lo&&(c=2*Math.PI-c),{radius:l,angle:dke(c),angleInRadian:c}},pke=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}},vke=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},jP=function(n,t){var i=n.x,r=n.y,a=mke({x:i,y:r},t),o=a.radius,l=a.angle,f=t.innerRadius,c=t.outerRadius;if(oc)return!1;if(o===0)return!0;var h=pke(t),d=h.startAngle,p=h.endAngle,v=l,y;if(d<=p){for(;v>p;)v-=360;for(;v=d&&v<=p}else{for(;v>d;)v-=360;for(;v=p&&v<=d}return y?MP(MP({},t),{},{radius:o,angle:vke(v,t)}):null};function rm(e){"@babel/helpers - typeof";return rm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},rm(e)}var gke=["offset"];function yke(e){return _ke(e)||kke(e)||wke(e)||bke()}function bke(){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 wke(e,n){if(e){if(typeof e=="string")return v4(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 v4(e,n)}}function kke(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _ke(e){if(Array.isArray(e))return v4(e)}function v4(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 Ske(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){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 pi(e){for(var n=1;n=0?1:-1,C,E;r==="insideStart"?(C=v+S*o,E=b):r==="insideEnd"?(C=y-S*o,E=!b):r==="end"&&(C=y+S*o,E=b),E=_<=0?E:!E;var A=Pi(c,h,w,C),T=Pi(c,h,w,C+(E?1:-1)*359),j="M".concat(A.x,",").concat(A.y,` - A`).concat(w,",").concat(w,",0,1,").concat(E?0:1,`, - `).concat(T.x,",").concat(T.y),N=Bn(n.id)?Lc("recharts-radial-line-"):n.id;return Z.createElement("text",am({},i,{dominantBaseline:"central",className:cn("recharts-radial-bar-label",l)}),Z.createElement("defs",null,Z.createElement("path",{id:N,d:j})),Z.createElement("textPath",{xlinkHref:"#".concat(N)},t))},jke=function(n){var t=n.viewBox,i=n.offset,r=n.position,a=t,o=a.cx,l=a.cy,f=a.innerRadius,c=a.outerRadius,h=a.startAngle,d=a.endAngle,p=(h+d)/2;if(r==="outside"){var v=Pi(o,l,c+i,p),y=v.x,b=v.y;return{x:y,y:b,textAnchor:y>=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 w=(f+c)/2,_=Pi(o,l,w,p),S=_.x,C=_.y;return{x:S,y:C,textAnchor:"middle",verticalAnchor:"middle"}},Dke=function(n){var t=n.viewBox,i=n.parentViewBox,r=n.offset,a=n.position,o=t,l=o.x,f=o.y,c=o.width,h=o.height,d=h>=0?1:-1,p=d*r,v=d>0?"end":"start",y=d>0?"start":"end",b=c>=0?1:-1,w=b*r,_=b>0?"end":"start",S=b>0?"start":"end";if(a==="top"){var C={x:l+c/2,y:f-d*r,textAnchor:"middle",verticalAnchor:v};return pi(pi({},C),i?{height:Math.max(f-i.y,0),width:c}:{})}if(a==="bottom"){var E={x:l+c/2,y:f+h+p,textAnchor:"middle",verticalAnchor:y};return pi(pi({},E),i?{height:Math.max(i.y+i.height-(f+h),0),width:c}:{})}if(a==="left"){var A={x:l-w,y:f+h/2,textAnchor:_,verticalAnchor:"middle"};return pi(pi({},A),i?{width:Math.max(A.x-i.x,0),height:h}:{})}if(a==="right"){var T={x:l+c+w,y:f+h/2,textAnchor:S,verticalAnchor:"middle"};return pi(pi({},T),i?{width:Math.max(i.x+i.width-T.x,0),height:h}:{})}var j=i?{width:c,height:h}:{};return a==="insideLeft"?pi({x:l+w,y:f+h/2,textAnchor:S,verticalAnchor:"middle"},j):a==="insideRight"?pi({x:l+c-w,y:f+h/2,textAnchor:_,verticalAnchor:"middle"},j):a==="insideTop"?pi({x:l+c/2,y:f+p,textAnchor:"middle",verticalAnchor:y},j):a==="insideBottom"?pi({x:l+c/2,y:f+h-p,textAnchor:"middle",verticalAnchor:v},j):a==="insideTopLeft"?pi({x:l+w,y:f+p,textAnchor:S,verticalAnchor:y},j):a==="insideTopRight"?pi({x:l+c-w,y:f+p,textAnchor:_,verticalAnchor:y},j):a==="insideBottomLeft"?pi({x:l+w,y:f+h-p,textAnchor:S,verticalAnchor:v},j):a==="insideBottomRight"?pi({x:l+c-w,y:f+h-p,textAnchor:_,verticalAnchor:v},j):$c(a)&&(qe(a.x)||Yl(a.x))&&(qe(a.y)||Yl(a.y))?pi({x:l+cu(a.x,c),y:f+cu(a.y,h),textAnchor:"end",verticalAnchor:"end"},j):pi({x:l+c/2,y:f+h/2,textAnchor:"middle",verticalAnchor:"middle"},j)},Rke=function(n){return"cx"in n&&qe(n.cx)};function Xt(e){var n=e.offset,t=n===void 0?5:n,i=xke(e,gke),r=pi({offset:t},i),a=r.viewBox,o=r.position,l=r.value,f=r.children,c=r.content,h=r.className,d=h===void 0?"":h,p=r.textBreakAll;if(!a||Bn(l)&&Bn(f)&&!O.isValidElement(c)&&!Rn(c))return null;if(O.isValidElement(c))return O.cloneElement(c,r);var v;if(Rn(c)){if(v=O.createElement(c,r),O.isValidElement(v))return v}else v=Eke(r);var y=Rke(a),b=$n(r,!0);if(y&&(o==="insideStart"||o==="insideEnd"||o==="end"))return Mke(r,v,b);var w=y?jke(r):Dke(r);return Z.createElement(Hg,am({className:cn("recharts-label",d)},b,w,{breakAll:p}),v)}Xt.displayName="Label";var ZU=function(n){var t=n.cx,i=n.cy,r=n.angle,a=n.startAngle,o=n.endAngle,l=n.r,f=n.radius,c=n.innerRadius,h=n.outerRadius,d=n.x,p=n.y,v=n.top,y=n.left,b=n.width,w=n.height,_=n.clockWise,S=n.labelViewBox;if(S)return S;if(qe(b)&&qe(w)){if(qe(d)&&qe(p))return{x:d,y:p,width:b,height:w};if(qe(v)&&qe(y))return{x:v,y,width:b,height:w}}return qe(d)&&qe(p)?{x:d,y:p,width:0,height:0}:qe(t)&&qe(i)?{cx:t,cy:i,startAngle:a||r||0,endAngle:o||r||0,innerRadius:c||0,outerRadius:h||f||l||0,clockWise:_}:n.viewBox?n.viewBox:{}},Pke=function(n,t){return n?n===!0?Z.createElement(Xt,{key:"label-implicit",viewBox:t}):gi(n)?Z.createElement(Xt,{key:"label-implicit",viewBox:t,value:n}):O.isValidElement(n)?n.type===Xt?O.cloneElement(n,{key:"label-implicit",viewBox:t}):Z.createElement(Xt,{key:"label-implicit",content:n,viewBox:t}):Rn(n)?Z.createElement(Xt,{key:"label-implicit",content:n,viewBox:t}):$c(n)?Z.createElement(Xt,am({viewBox:t},n,{key:"label-implicit"})):null:null},Nke=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=ZU(n),o=ua(r,Xt).map(function(f,c){return O.cloneElement(f,{viewBox:t||a,key:"label-".concat(c)})});if(!i)return o;var l=Pke(n.label,t||a);return[l].concat(yke(o))};Xt.parseViewBox=ZU;Xt.renderCallByParent=Nke;var m3,RP;function $ke(){if(RP)return m3;RP=1;function e(n){var t=n==null?0:n.length;return t?n[t-1]:void 0}return m3=e,m3}var zke=$ke();const Lke=ot(zke);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)}var Ike=["valueAccessor"],Bke=["data","dataKey","clockWise","id","textBreakAll"];function Fke(e){return Vke(e)||Uke(e)||Hke(e)||qke()}function qke(){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 Hke(e,n){if(e){if(typeof e=="string")return g4(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 g4(e,n)}}function Uke(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Vke(e){if(Array.isArray(e))return g4(e)}function g4(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 Kke(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 Xke=function(n){return Array.isArray(n.value)?Lke(n.value):n.value};function Ja(e){var n=e.valueAccessor,t=n===void 0?Xke:n,i=$P(e,Ike),r=i.data,a=i.dataKey,o=i.clockWise,l=i.id,f=i.textBreakAll,c=$P(i,Bke);return!r||!r.length?null:Z.createElement(Tt,{className:"recharts-label-list"},r.map(function(h,d){var p=Bn(a)?t(h,d):ir(h&&h.payload,a),v=Bn(l)?{}:{id:"".concat(l,"-").concat(d)};return Z.createElement(Xt,s1({},$n(h,!0),c,v,{parentViewBox:h.parentViewBox,value:p,textBreakAll:f,viewBox:Xt.parseViewBox(Bn(o)?h:NP(NP({},h),{},{clockWise:o})),key:"label-".concat(d),index:d}))}))}Ja.displayName="LabelList";function Zke(e,n){return e?e===!0?Z.createElement(Ja,{key:"labelList-implicit",data:n}):Z.isValidElement(e)||Rn(e)?Z.createElement(Ja,{key:"labelList-implicit",data:n,content:e}):$c(e)?Z.createElement(Ja,s1({data:n},e,{key:"labelList-implicit"})):null:null}function Qke(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=ua(i,Ja).map(function(o,l){return O.cloneElement(o,{data:n,key:"labelList-".concat(l)})});if(!t)return r;var a=Zke(e.label,n);return[a].concat(Fke(r))}Ja.renderCallByParent=Qke;function sm(e){"@babel/helpers - typeof";return sm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},sm(e)}function y4(){return y4=Object.assign?Object.assign.bind():function(e){for(var n=1;n180),",").concat(+(o>c),`, - `).concat(d.x,",").concat(d.y,` - `);if(r>0){var v=Pi(t,i,r,o),y=Pi(t,i,r,c);p+="L ".concat(y.x,",").concat(y.y,` - A `).concat(r,",").concat(r,`,0, - `).concat(+(Math.abs(f)>180),",").concat(+(o<=c),`, - `).concat(v.x,",").concat(v.y," Z")}else p+="L ".concat(t,",").concat(i," Z");return p},i_e=function(n){var t=n.cx,i=n.cy,r=n.innerRadius,a=n.outerRadius,o=n.cornerRadius,l=n.forceCornerRadius,f=n.cornerIsExternal,c=n.startAngle,h=n.endAngle,d=Ma(h-c),p=zv({cx:t,cy:i,radius:a,angle:c,sign:d,cornerRadius:o,cornerIsExternal:f}),v=p.circleTangency,y=p.lineTangency,b=p.theta,w=zv({cx:t,cy:i,radius:a,angle:h,sign:-d,cornerRadius:o,cornerIsExternal:f}),_=w.circleTangency,S=w.lineTangency,C=w.theta,E=f?Math.abs(c-h):Math.abs(c-h)-b-C;if(E<0)return l?"M ".concat(y.x,",").concat(y.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 - `):QU({cx:t,cy:i,innerRadius:r,outerRadius:a,startAngle:c,endAngle:h});var A="M ".concat(y.x,",").concat(y.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(v.x,",").concat(v.y,` - A`).concat(a,",").concat(a,",0,").concat(+(E>180),",").concat(+(d<0),",").concat(_.x,",").concat(_.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(S.x,",").concat(S.y,` - `);if(r>0){var T=zv({cx:t,cy:i,radius:r,angle:c,sign:d,isExternal:!0,cornerRadius:o,cornerIsExternal:f}),j=T.circleTangency,N=T.lineTangency,q=T.theta,R=zv({cx:t,cy:i,radius:r,angle:h,sign:-d,isExternal:!0,cornerRadius:o,cornerIsExternal:f}),L=R.circleTangency,B=R.lineTangency,G=R.theta,H=f?Math.abs(c-h):Math.abs(c-h)-q-G;if(H<0&&o===0)return"".concat(A,"L").concat(t,",").concat(i,"Z");A+="L".concat(B.x,",").concat(B.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(L.x,",").concat(L.y,` - A`).concat(r,",").concat(r,",0,").concat(+(H>180),",").concat(+(d>0),",").concat(j.x,",").concat(j.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(N.x,",").concat(N.y,"Z")}else A+="L".concat(t,",").concat(i,"Z");return A},r_e={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},JU=function(n){var t=LP(LP({},r_e),n),i=t.cx,r=t.cy,a=t.innerRadius,o=t.outerRadius,l=t.cornerRadius,f=t.forceCornerRadius,c=t.cornerIsExternal,h=t.startAngle,d=t.endAngle,p=t.className;if(o0&&Math.abs(h-d)<360?w=i_e({cx:i,cy:r,innerRadius:a,outerRadius:o,cornerRadius:Math.min(b,y/2),forceCornerRadius:f,cornerIsExternal:c,startAngle:h,endAngle:d}):w=QU({cx:i,cy:r,innerRadius:a,outerRadius:o,startAngle:h,endAngle:d}),Z.createElement("path",y4({},$n(t,!0),{className:v,d:w,role:"img"}))};function lm(e){"@babel/helpers - typeof";return lm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},lm(e)}function b4(){return b4=Object.assign?Object.assign.bind():function(e){for(var n=1;nd_e.call(e,n));function Mu(e,n){return e===n||!e&&!n&&e!==e&&n!==n}const p_e="__v",v_e="__o",g_e="_owner",{getOwnPropertyDescriptor:HP,keys:UP}=Object;function y_e(e,n){return e.byteLength===n.byteLength&&l1(new Uint8Array(e),new Uint8Array(n))}function b_e(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 w_e(e,n){return e.byteLength===n.byteLength&&l1(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(n.buffer,n.byteOffset,n.byteLength))}function k_e(e,n){return Mu(e.getTime(),n.getTime())}function __e(e,n){return e.name===n.name&&e.message===n.message&&e.cause===n.cause&&e.stack===n.stack}function x_e(e,n){return e===n}function VP(e,n,t){const i=e.size;if(i!==n.size)return!1;if(!i)return!0;const r=new Array(i),a=e.entries();let o,l,f=0;for(;(o=a.next())&&!o.done;){const c=n.entries();let h=!1,d=0;for(;(l=c.next())&&!l.done;){if(r[d]){d++;continue}const p=o.value,v=l.value;if(t.equals(p[0],v[0],f,d,e,n,t)&&t.equals(p[1],v[1],p[0],v[0],e,n,t)){h=r[d]=!0;break}d++}if(!h)return!1;f++}return!0}const S_e=Mu;function C_e(e,n,t){const i=UP(e);let r=i.length;if(UP(n).length!==r)return!1;for(;r-- >0;)if(!eV(e,n,t,i[r]))return!1;return!0}function Kd(e,n,t){const i=qP(e);let r=i.length;if(qP(n).length!==r)return!1;let a,o,l;for(;r-- >0;)if(a=i[r],!eV(e,n,t,a)||(o=HP(e,a),l=HP(n,a),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function A_e(e,n){return Mu(e.valueOf(),n.valueOf())}function O_e(e,n){return e.source===n.source&&e.flags===n.flags}function WP(e,n,t){const i=e.size;if(i!==n.size)return!1;if(!i)return!0;const r=new Array(i),a=e.values();let o,l;for(;(o=a.next())&&!o.done;){const f=n.values();let c=!1,h=0;for(;(l=f.next())&&!l.done;){if(!r[h]&&t.equals(o.value,l.value,o.value,l.value,e,n,t)){c=r[h]=!0;break}h++}if(!c)return!1}return!0}function l1(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 E_e(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 eV(e,n,t,i){return(i===g_e||i===v_e||i===p_e)&&(e.$$typeof||n.$$typeof)?!0:m_e(n,i)&&t.equals(e[i],n[i],i,i,e,n,t)}const T_e="[object ArrayBuffer]",M_e="[object Arguments]",j_e="[object Boolean]",D_e="[object DataView]",R_e="[object Date]",P_e="[object Error]",N_e="[object Map]",$_e="[object Number]",z_e="[object Object]",L_e="[object RegExp]",I_e="[object Set]",B_e="[object String]",F_e={"[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},q_e="[object URL]",H_e=Object.prototype.toString;function U_e({areArrayBuffersEqual:e,areArraysEqual:n,areDataViewsEqual:t,areDatesEqual:i,areErrorsEqual:r,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:l,areObjectsEqual:f,arePrimitiveWrappersEqual:c,areRegExpsEqual:h,areSetsEqual:d,areTypedArraysEqual:p,areUrlsEqual:v,unknownTagComparators:y}){return function(w,_,S){if(w===_)return!0;if(w==null||_==null)return!1;const C=typeof w;if(C!==typeof _)return!1;if(C!=="object")return C==="number"?l(w,_,S):C==="function"?a(w,_,S):!1;const E=w.constructor;if(E!==_.constructor)return!1;if(E===Object)return f(w,_,S);if(Array.isArray(w))return n(w,_,S);if(E===Date)return i(w,_,S);if(E===RegExp)return h(w,_,S);if(E===Map)return o(w,_,S);if(E===Set)return d(w,_,S);const A=H_e.call(w);if(A===R_e)return i(w,_,S);if(A===L_e)return h(w,_,S);if(A===N_e)return o(w,_,S);if(A===I_e)return d(w,_,S);if(A===z_e)return typeof w.then!="function"&&typeof _.then!="function"&&f(w,_,S);if(A===q_e)return v(w,_,S);if(A===P_e)return r(w,_,S);if(A===M_e)return f(w,_,S);if(F_e[A])return p(w,_,S);if(A===T_e)return e(w,_,S);if(A===D_e)return t(w,_,S);if(A===j_e||A===$_e||A===B_e)return c(w,_,S);if(y){let T=y[A];if(!T){const j=h_e(w);j&&(T=y[j])}if(T)return T(w,_,S)}return!1}}function V_e({circular:e,createCustomConfig:n,strict:t}){let i={areArrayBuffersEqual:y_e,areArraysEqual:t?Kd:b_e,areDataViewsEqual:w_e,areDatesEqual:k_e,areErrorsEqual:__e,areFunctionsEqual:x_e,areMapsEqual:t?p3(VP,Kd):VP,areNumbersEqual:S_e,areObjectsEqual:t?Kd:C_e,arePrimitiveWrappersEqual:A_e,areRegExpsEqual:O_e,areSetsEqual:t?p3(WP,Kd):WP,areTypedArraysEqual:t?p3(l1,Kd):l1,areUrlsEqual:E_e,unknownTagComparators:void 0};if(n&&(i=Object.assign({},i,n(i))),e){const r=Iv(i.areArraysEqual),a=Iv(i.areMapsEqual),o=Iv(i.areObjectsEqual),l=Iv(i.areSetsEqual);i=Object.assign({},i,{areArraysEqual:r,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:l})}return i}function W_e(e){return function(n,t,i,r,a,o,l){return e(n,t,l)}}function G_e({circular:e,comparator:n,createState:t,equals:i,strict:r}){if(t)return function(l,f){const{cache:c=e?new WeakMap:void 0,meta:h}=t();return n(l,f,{cache:c,equals:i,meta:h,strict:r})};if(e)return function(l,f){return n(l,f,{cache:new WeakMap,equals:i,meta:void 0,strict:r})};const a={cache:void 0,equals:i,meta:void 0,strict:r};return function(l,f){return n(l,f,a)}}const Y_e=ml();ml({strict:!0});ml({circular:!0});ml({circular:!0,strict:!0});ml({createInternalComparator:()=>Mu});ml({strict:!0,createInternalComparator:()=>Mu});ml({circular:!0,createInternalComparator:()=>Mu});ml({circular:!0,createInternalComparator:()=>Mu,strict:!0});function ml(e={}){const{circular:n=!1,createInternalComparator:t,createState:i,strict:r=!1}=e,a=V_e(e),o=U_e(a),l=t?t(o):W_e(o);return G_e({circular:n,comparator:o,createState:i,equals:l,strict:r})}function K_e(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function GP(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):K_e(r)};requestAnimationFrame(i)}function w4(e){"@babel/helpers - typeof";return w4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},w4(e)}function X_e(e){return e2e(e)||J_e(e)||Q_e(e)||Z_e()}function Z_e(){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 Q_e(e,n){if(e){if(typeof e=="string")return YP(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 YP(e,n)}}function YP(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:_},b=function(_){for(var S=_>1?1:_,C=S,E=0;E<8;++E){var A=d(C)-S,T=v(C);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,f=function(h,d,p){var v=-(h-d)*i,y=p*a,b=p+(v-y)*l/1e3,w=p*l/1e3+h;return Math.abs(w-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 j2e(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 v3(e){return N2e(e)||P2e(e)||R2e(e)||D2e()}function D2e(){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 R2e(e,n){if(e){if(typeof e=="string")return C4(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 C4(e,n)}}function P2e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function N2e(e){if(Array.isArray(e))return C4(e)}function C4(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 c1(e){return c1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},c1(e)}var ao=(function(e){B2e(t,e);var n=F2e(t);function t(i,r){var a;$2e(this,t),a=n.call(this,i,r);var o=a.props,l=o.isActive,f=o.attributeName,c=o.from,h=o.to,d=o.steps,p=o.children,v=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(E4(a)),a.changeStyle=a.changeStyle.bind(E4(a)),!l||v<=0)return a.state={style:{}},typeof p=="function"&&(a.state={style:h}),O4(a);if(d&&d.length)a.state={style:d[0].style};else if(c){if(typeof p=="function")return a.state={style:c},O4(a);a.state={style:f?sh({},f,c):c}}else a.state={style:{}};return a}return L2e(t,[{key:"componentDidMount",value:function(){var r=this.props,a=r.isActive,o=r.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(r){var a=this.props,o=a.isActive,l=a.canBegin,f=a.attributeName,c=a.shouldReAnimate,h=a.to,d=a.from,p=this.state.style;if(l){if(!o){var v={style:f?sh({},f,h):h};this.state&&p&&(f&&p[f]!==h||!f&&p!==h)&&this.setState(v);return}if(!(Y_e(r.to,h)&&r.canBegin&&r.isActive)){var y=!r.canBegin||!r.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var b=y||c?d:r.to;if(this.state&&p){var w={style:f?sh({},f,b):b};(f&&p[f]!==b||!f&&p!==b)&&this.setState(w)}this.runAnimation(xa(xa({},this.props),{},{from:b,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var r=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),r&&r()}},{key:"handleStyleChange",value:function(r){this.changeStyle(r)}},{key:"changeStyle",value:function(r){this.mounted&&this.setState({style:r})}},{key:"runJSAnimation",value:function(r){var a=this,o=r.from,l=r.to,f=r.duration,c=r.easing,h=r.begin,d=r.onAnimationEnd,p=r.onAnimationStart,v=E2e(o,l,g2e(c),f,this.changeStyle),y=function(){a.stopJSAnimation=v()};this.manager.start([p,h,y,f,d])}},{key:"runStepAnimation",value:function(r){var a=this,o=r.steps,l=r.begin,f=r.onAnimationStart,c=o[0],h=c.style,d=c.duration,p=d===void 0?0:d,v=function(b,w,_){if(_===0)return b;var S=w.duration,C=w.easing,E=C===void 0?"ease":C,A=w.style,T=w.properties,j=w.onAnimationEnd,N=_>0?o[_-1]:w,q=T||Object.keys(A);if(typeof E=="function"||E==="spring")return[].concat(v3(b),[a.runJSAnimation.bind(a,{from:N.style,to:A,duration:S,easing:E}),S]);var R=ZP(q,S,E),L=xa(xa(xa({},N.style),A),{},{transition:R});return[].concat(v3(b),[L,S,j]).filter(a2e)};return this.manager.start([f].concat(v3(o.reduce(v,[h,Math.max(p,l)])),[r.onAnimationEnd]))}},{key:"runAnimation",value:function(r){this.manager||(this.manager=n2e());var a=r.begin,o=r.duration,l=r.attributeName,f=r.to,c=r.easing,h=r.onAnimationStart,d=r.onAnimationEnd,p=r.steps,v=r.children,y=this.manager;if(this.unSubscribe=y.subscribe(this.handleStyleChange),typeof c=="function"||typeof v=="function"||c==="spring"){this.runJSAnimation(r);return}if(p.length>1){this.runStepAnimation(r);return}var b=l?sh({},l,f):f,w=ZP(Object.keys(b),o,c);y.start([h,a,xa(xa({},b),{},{transition:w}),o,d])}},{key:"render",value:function(){var r=this.props,a=r.children;r.begin;var o=r.duration;r.attributeName,r.easing;var l=r.isActive;r.steps,r.from,r.to,r.canBegin,r.onAnimationEnd,r.shouldReAnimate,r.onAnimationReStart;var f=M2e(r,T2e),c=O.Children.count(a),h=this.state.style;if(typeof a=="function")return a(h);if(!l||c===0||o<=0)return a;var d=function(v){var y=v.props,b=y.style,w=b===void 0?{}:b,_=y.className,S=O.cloneElement(v,xa(xa({},f),{},{style:xa(xa({},w),h),className:_}));return S};return c===1?d(O.Children.only(a)):Z.createElement("div",null,O.Children.map(a,function(p){return d(p)}))}}]),t})(O.PureComponent);ao.displayName="Animate";ao.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};ao.propTypes={from:ut.oneOfType([ut.object,ut.string]),to:ut.oneOfType([ut.object,ut.string]),attributeName:ut.string,duration:ut.number,begin:ut.number,easing:ut.oneOfType([ut.string,ut.func]),steps:ut.arrayOf(ut.shape({duration:ut.number.isRequired,style:ut.object.isRequired,easing:ut.oneOfType([ut.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),ut.func]),properties:ut.arrayOf("string"),onAnimationEnd:ut.func})),children:ut.oneOfType([ut.node,ut.func]),isActive:ut.bool,canBegin:ut.bool,onAnimationEnd:ut.func,shouldReAnimate:ut.bool,onAnimationStart:ut.func,onAnimationReStart:ut.func};function cm(e){"@babel/helpers - typeof";return cm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},cm(e)}function d1(){return d1=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0?1:-1,f=i>=0?1:-1,c=r>=0&&i>=0||r<0&&i<0?1:0,h;if(o>0&&a instanceof Array){for(var d=[0,0,0,0],p=0,v=4;po?o:a[p];h="M".concat(n,",").concat(t+l*d[0]),d[0]>0&&(h+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(c,",").concat(n+f*d[0],",").concat(t)),h+="L ".concat(n+i-f*d[1],",").concat(t),d[1]>0&&(h+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(c,`, - `).concat(n+i,",").concat(t+l*d[1])),h+="L ".concat(n+i,",").concat(t+r-l*d[2]),d[2]>0&&(h+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(c,`, - `).concat(n+i-f*d[2],",").concat(t+r)),h+="L ".concat(n+f*d[3],",").concat(t+r),d[3]>0&&(h+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(c,`, - `).concat(n,",").concat(t+r-l*d[3])),h+="Z"}else if(o>0&&a===+a&&a>0){var y=Math.min(o,a);h="M ".concat(n,",").concat(t+l*y,` - A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(n+f*y,",").concat(t,` - L `).concat(n+i-f*y,",").concat(t,` - A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(n+i,",").concat(t+l*y,` - L `).concat(n+i,",").concat(t+r-l*y,` - A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(n+i-f*y,",").concat(t+r,` - L `).concat(n+f*y,",").concat(t+r,` - A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(n,",").concat(t+r-l*y," Z")}else h="M ".concat(n,",").concat(t," h ").concat(i," v ").concat(r," h ").concat(-i," Z");return h},Z2e=function(n,t){if(!n||!t)return!1;var i=n.x,r=n.y,a=t.x,o=t.y,l=t.width,f=t.height;if(Math.abs(l)>0&&Math.abs(f)>0){var c=Math.min(a,a+l),h=Math.max(a,a+l),d=Math.min(o,o+f),p=Math.max(o,o+f);return i>=c&&i<=h&&r>=d&&r<=p}return!1},Q2e={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},dm=function(n){var t=aN(aN({},Q2e),n),i=O.useRef(),r=O.useState(-1),a=H2e(r,2),o=a[0],l=a[1];O.useEffect(function(){if(i.current&&i.current.getTotalLength)try{var E=i.current.getTotalLength();E&&l(E)}catch{}},[]);var f=t.x,c=t.y,h=t.width,d=t.height,p=t.radius,v=t.className,y=t.animationEasing,b=t.animationDuration,w=t.animationBegin,_=t.isAnimationActive,S=t.isUpdateAnimationActive;if(f!==+f||c!==+c||h!==+h||d!==+d||h===0||d===0)return null;var C=cn("recharts-rectangle",v);return S?Z.createElement(ao,{canBegin:o>0,from:{width:h,height:d,x:f,y:c},to:{width:h,height:d,x:f,y:c},duration:b,animationEasing:y,isActive:S},function(E){var A=E.width,T=E.height,j=E.x,N=E.y;return Z.createElement(ao,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:w,duration:b,isActive:_,easing:y},Z.createElement("path",d1({},$n(t,!0),{className:C,d:oN(j,N,A,T,p),ref:i})))}):Z.createElement("path",d1({},$n(t,!0),{className:C,d:oN(f,c,h,d,p)}))};function T4(){return T4=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 axe(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 oxe=function(n,t,i,r,a,o){return"M".concat(n,",").concat(a,"v").concat(r,"M").concat(o,",").concat(t,"h").concat(i)},sxe=function(n){var t=n.x,i=t===void 0?0:t,r=n.y,a=r===void 0?0:r,o=n.top,l=o===void 0?0:o,f=n.left,c=f===void 0?0:f,h=n.width,d=h===void 0?0:h,p=n.height,v=p===void 0?0:p,y=n.className,b=rxe(n,J2e),w=exe({x:i,y:a,top:l,left:c,width:d,height:v},b);return!qe(i)||!qe(a)||!qe(d)||!qe(v)||!qe(l)||!qe(c)?null:Z.createElement("path",M4({},$n(w,!0),{className:cn("recharts-cross",y),d:oxe(i,a,d,v,l,c)}))},g3,lN;function lxe(){if(lN)return g3;lN=1;var e=OH(),n=e(Object.getPrototypeOf,Object);return g3=n,g3}var y3,uN;function uxe(){if(uN)return y3;uN=1;var e=us(),n=lxe(),t=fs(),i="[object Object]",r=Function.prototype,a=Object.prototype,o=r.toString,l=a.hasOwnProperty,f=o.call(Object);function c(h){if(!t(h)||e(h)!=i)return!1;var d=n(h);if(d===null)return!0;var p=l.call(d,"constructor")&&d.constructor;return typeof p=="function"&&p instanceof p&&o.call(p)==f}return y3=c,y3}var fxe=uxe();const cxe=ot(fxe);var b3,fN;function dxe(){if(fN)return b3;fN=1;var e=us(),n=fs(),t="[object Boolean]";function i(r){return r===!0||r===!1||n(r)&&e(r)==t}return b3=i,b3}var hxe=dxe();const mxe=ot(hxe);function mm(e){"@babel/helpers - typeof";return mm=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},mm(e)}function h1(){return h1=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t0,from:{upperWidth:0,lowerWidth:0,height:p,x:f,y:c},to:{upperWidth:h,lowerWidth:d,height:p,x:f,y:c},duration:b,animationEasing:y,isActive:_},function(C){var E=C.upperWidth,A=C.lowerWidth,T=C.height,j=C.x,N=C.y;return Z.createElement(ao,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:w,duration:b,easing:y},Z.createElement("path",h1({},$n(t,!0),{className:S,d:mN(j,N,E,A,T),ref:i})))}):Z.createElement("g",null,Z.createElement("path",h1({},$n(t,!0),{className:S,d:mN(f,c,h,d,p)})))},Cxe=["option","shapeType","propTransformer","activeClassName","isActive"];function pm(e){"@babel/helpers - typeof";return pm=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},pm(e)}function Axe(e,n){if(e==null)return{};var t=Oxe(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 Oxe(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 pN(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 m1(e){for(var n=1;n0&&i.handleDrag(r.changedTouches[0])}),Rr(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()}),Rr(i,"handleLeaveWrapper",function(){(i.state.isTravellerMoving||i.state.isSlideMoving)&&(i.leaveTimer=window.setTimeout(i.handleDragEnd,i.props.leaveTimeOut))}),Rr(i,"handleEnterSlideOrTraveller",function(){i.setState({isTextActive:!0})}),Rr(i,"handleLeaveSlideOrTraveller",function(){i.setState({isTextActive:!1})}),Rr(i,"handleSlideDragStart",function(r){var a=CN(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 n3e(n,e),Zxe(n,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(i){var r=i.startX,a=i.endX,o=this.state.scaleValues,l=this.props,f=l.gap,c=l.data,h=c.length-1,d=Math.min(r,a),p=Math.max(r,a),v=n.getIndexInRange(o,d),y=n.getIndexInRange(o,p);return{startIndex:v-v%f,endIndex:y===h?h:y-y%f}}},{key:"getTextOfTick",value:function(i){var r=this.props,a=r.data,o=r.tickFormatter,l=r.dataKey,f=ir(a[i],l,i);return Rn(o)?o(f,i):f}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(i){var r=this.state,a=r.slideMoveStartX,o=r.startX,l=r.endX,f=this.props,c=f.x,h=f.width,d=f.travellerWidth,p=f.startIndex,v=f.endIndex,y=f.onChange,b=i.pageX-a;b>0?b=Math.min(b,c+h-d-l,c+h-d-o):b<0&&(b=Math.max(b,c-o,c-l));var w=this.getIndex({startX:o+b,endX:l+b});(w.startIndex!==p||w.endIndex!==v)&&y&&y(w),this.setState({startX:o+b,endX:l+b,slideMoveStartX:i.pageX})}},{key:"handleTravellerDragStart",value:function(i,r){var a=CN(r)?r.changedTouches[0]:r;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:i,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(i){var r=this.state,a=r.brushMoveStartX,o=r.movingTravellerId,l=r.endX,f=r.startX,c=this.state[o],h=this.props,d=h.x,p=h.width,v=h.travellerWidth,y=h.onChange,b=h.gap,w=h.data,_={startX:this.state.startX,endX:this.state.endX},S=i.pageX-a;S>0?S=Math.min(S,d+p-v-c):S<0&&(S=Math.max(S,d-c)),_[o]=c+S;var C=this.getIndex(_),E=C.startIndex,A=C.endIndex,T=function(){var N=w.length-1;return o==="startX"&&(l>f?E%b===0:A%b===0)||lf?A%b===0:E%b===0)||l>f&&A===N};this.setState(Rr(Rr({},o,c+S),"brushMoveStartX",i.pageX),function(){y&&T()&&y(C)})}},{key:"handleTravellerMoveKeyboard",value:function(i,r){var a=this,o=this.state,l=o.scaleValues,f=o.startX,c=o.endX,h=this.state[r],d=l.indexOf(h);if(d!==-1){var p=d+i;if(!(p===-1||p>=l.length)){var v=l[p];r==="startX"&&v>=c||r==="endX"&&v<=f||this.setState(Rr({},r,v),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var i=this.props,r=i.x,a=i.y,o=i.width,l=i.height,f=i.fill,c=i.stroke;return Z.createElement("rect",{stroke:c,fill:f,x:r,y:a,width:o,height:l})}},{key:"renderPanorama",value:function(){var i=this.props,r=i.x,a=i.y,o=i.width,l=i.height,f=i.data,c=i.children,h=i.padding,d=O.Children.only(c);return d?Z.cloneElement(d,{x:r,y:a,width:o,height:l,margin:h,compact:!0,data:f}):null}},{key:"renderTravellerLayer",value:function(i,r){var a,o,l=this,f=this.props,c=f.y,h=f.travellerWidth,d=f.height,p=f.traveller,v=f.ariaLabel,y=f.data,b=f.startIndex,w=f.endIndex,_=Math.max(i,this.props.x),S=S3(S3({},$n(this.props,!1)),{},{x:_,y:c,width:h,height:d}),C=v||"Min value: ".concat((a=y[b])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=y[w])===null||o===void 0?void 0:o.name);return Z.createElement(Tt,{tabIndex:0,role:"slider","aria-label":C,"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,f=a.stroke,c=a.travellerWidth,h=Math.min(i,r)+c,d=Math.max(Math.abs(r-i)-c,0);return Z.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:f,fillOpacity:.2,x:h,y:o,width:d,height:l})}},{key:"renderText",value:function(){var i=this.props,r=i.startIndex,a=i.endIndex,o=i.y,l=i.height,f=i.travellerWidth,c=i.stroke,h=this.state,d=h.startX,p=h.endX,v=5,y={pointerEvents:"none",fill:c};return Z.createElement(Tt,{className:"recharts-brush-texts"},Z.createElement(Hg,v1({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,p)-v,y:o+l/2},y),this.getTextOfTick(r)),Z.createElement(Hg,v1({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,p)+f+v,y:o+l/2},y),this.getTextOfTick(a)))}},{key:"render",value:function(){var i=this.props,r=i.data,a=i.className,o=i.children,l=i.x,f=i.y,c=i.width,h=i.height,d=i.alwaysShowText,p=this.state,v=p.startX,y=p.endX,b=p.isTextActive,w=p.isSlideMoving,_=p.isTravellerMoving,S=p.isTravellerFocused;if(!r||!r.length||!qe(l)||!qe(f)||!qe(c)||!qe(h)||c<=0||h<=0)return null;var C=cn("recharts-brush",a),E=Z.Children.count(o)===1,A=Kxe("userSelect","none");return Z.createElement(Tt,{className:C,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:A},this.renderBackground(),E&&this.renderPanorama(),this.renderSlide(v,y),this.renderTravellerLayer(v,"startX"),this.renderTravellerLayer(y,"endX"),(b||w||_||S||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(i){var r=i.x,a=i.y,o=i.width,l=i.height,f=i.stroke,c=Math.floor(a+l/2)-1;return Z.createElement(Z.Fragment,null,Z.createElement("rect",{x:r,y:a,width:o,height:l,fill:f,stroke:"none"}),Z.createElement("line",{x1:r+1,y1:c,x2:r+o-1,y2:c,fill:"none",stroke:"#fff"}),Z.createElement("line",{x1:r+1,y1:c+2,x2:r+o-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(i,r){var a;return Z.isValidElement(i)?a=Z.cloneElement(i,r):Rn(i)?a=i(r):a=n.renderDefaultTraveller(r),a}},{key:"getDerivedStateFromProps",value:function(i,r){var a=i.data,o=i.width,l=i.x,f=i.travellerWidth,c=i.updateId,h=i.startIndex,d=i.endIndex;if(a!==r.prevData||c!==r.prevUpdateId)return S3({prevData:a,prevTravellerWidth:f,prevUpdateId:c,prevX:l,prevWidth:o},a&&a.length?i3e({data:a,width:o,x:l,travellerWidth:f,startIndex:h,endIndex:d}):{scale:null,scaleValues:null});if(r.scale&&(o!==r.prevWidth||l!==r.prevX||f!==r.prevTravellerWidth)){r.scale.range([l,l+o-f]);var p=r.scale.domain().map(function(v){return r.scale(v)});return{prevData:a,prevTravellerWidth:f,prevUpdateId:c,prevX:l,prevWidth:o,startX:r.scale(i.startIndex),endX:r.scale(i.endIndex),scaleValues:p}}return null}},{key:"getIndexInRange",value:function(i,r){for(var a=i.length,o=0,l=a-1;l-o>1;){var f=Math.floor((o+l)/2);i[f]>r?l=f:o=f}return r>=i[l]?l:o}}])})(O.PureComponent);Rr(tc,"displayName","Brush");Rr(tc,"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 C3,AN;function r3e(){if(AN)return C3;AN=1;var e=C9();function n(t,i){var r;return e(t,function(a,o,l){return r=i(a,o,l),!r}),!!r}return C3=n,C3}var A3,ON;function a3e(){if(ON)return A3;ON=1;var e=wH(),n=cl(),t=r3e(),i=br(),r=c0();function a(o,l,f){var c=i(o)?e:t;return f&&r(o,l,f)&&(l=void 0),c(o,n(l,3))}return A3=a,A3}var o3e=a3e();const s3e=ot(o3e);var eo=function(n,t){var i=n.alwaysShow,r=n.ifOverflow;return i&&(r="extendDomain"),r===t},O3,EN;function l3e(){if(EN)return O3;EN=1;var e=LH();function n(t,i,r){i=="__proto__"&&e?e(t,i,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[i]=r}return O3=n,O3}var E3,TN;function u3e(){if(TN)return E3;TN=1;var e=l3e(),n=$H(),t=cl();function i(r,a){var o={};return a=t(a,3),n(r,function(l,f,c){e(o,f,a(l,f,c))}),o}return E3=i,E3}var f3e=u3e();const c3e=ot(f3e);var T3,MN;function d3e(){if(MN)return T3;MN=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 k3e(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 _3e(e,n){var t=e.x,i=e.y,r=w3e(e,v3e),a="".concat(t),o=parseInt(a,10),l="".concat(i),f=parseInt(l,10),c="".concat(n.height||r.height),h=parseInt(c,10),d="".concat(n.width||r.width),p=parseInt(d,10);return Xd(Xd(Xd(Xd(Xd({},n),r),o?{x:o}:{}),f?{y:f}:{}),{},{height:h,width:p,name:n.name,radius:n.radius})}function PN(e){return Z.createElement(Pxe,D4({shapeType:"rectangle",propTransformer:_3e,activeClassName:"recharts-active-bar"},e))}var x3e=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=qe(i)||Pme(i);return a?n(i,r):(a||hu(),t)}},S3e=["value","background"],dV;function ic(e){"@babel/helpers - typeof";return ic=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},ic(e)}function C3e(e,n){if(e==null)return{};var t=A3e(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 A3e(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 y1(){return y1=Object.assign?Object.assign.bind():function(e){for(var n=1;n0&&Math.abs(U)0&&Math.abs(H)0&&(G=Math.min((X||0)-(H[te-1]||0),G))}),Number.isFinite(G)){var U=G/B,P=b.layout==="vertical"?i.height:i.width;if(b.padding==="gap"&&(j=U*P/2),b.padding==="no-gap"){var z=cu(n.barCategoryGap,U*P),F=U*P/2;j=F-z-(F-z)/P*z}}}r==="xAxis"?N=[i.left+(C.left||0)+(j||0),i.left+i.width-(C.right||0)-(j||0)]:r==="yAxis"?N=f==="horizontal"?[i.top+i.height-(C.bottom||0),i.top+(C.top||0)]:[i.top+(C.top||0)+(j||0),i.top+i.height-(C.bottom||0)-(j||0)]:N=b.range,A&&(N=[N[1],N[0]]);var Y=Xwe(b,a,p),D=Y.scale,V=Y.realScaleType;D.domain(_).range(N),Zwe(D);var W=ake(D,Sa(Sa({},b),{},{realScaleType:V}));r==="xAxis"?(L=w==="top"&&!E||w==="bottom"&&E,q=i.left,R=d[T]-L*b.height):r==="yAxis"&&(L=w==="left"&&!E||w==="right"&&E,q=d[T]-L*b.width,R=i.top);var $=Sa(Sa(Sa({},b),W),{},{realScaleType:V,x:q,y:R,scale:D,width:r==="xAxis"?i.width:b.width,height:r==="yAxis"?i.height:b.height});return $.bandSize=a1($,W),!b.hide&&r==="xAxis"?d[T]+=(L?-1:1)*$.height:b.hide||(d[T]+=(L?-1:1)*$.width),Sa(Sa({},v),{},S0({},y,$))},{})},vV=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)}},z3e=function(n){var t=n.x1,i=n.y1,r=n.x2,a=n.y2;return vV({x:t,y:i},{x:r,y:a})},gV=(function(){function e(n){P3e(this,e),this.scale=n}return N3e(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=i.bandAware,a=i.position;if(t!==void 0){if(a)switch(a){case"start":return this.scale(t);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+o}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(t)+l}default:return this.scale(t)}if(r){var f=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+f}return this.scale(t)}}},{key:"isInRange",value:function(t){var i=this.range(),r=i[0],a=i[i.length-1];return r<=a?t>=r&&t<=a:t>=a&&t<=r}}],[{key:"create",value:function(t){return new e(t)}}])})();S0(gV,"EPS",1e-4);var nA=function(n){var t=Object.keys(n).reduce(function(i,r){return Sa(Sa({},i),{},S0({},r,gV.create(n[r])))},{});return Sa(Sa({},t),{},{apply:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,l=a.position;return c3e(r,function(f,c){return t[c].apply(f,{bandAware:o,position:l})})},isInRange:function(r){return cV(r,function(a,o){return t[o].isInRange(a)})}})};function L3e(e){return(e%180+180)%180}var I3e=function(n){var t=n.width,i=n.height,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=L3e(r),o=a*Math.PI/180,l=Math.atan(i/t),f=o>l&&o-1?f[c?a[h]:h]:void 0}}return D3=i,D3}var R3,BN;function F3e(){if(BN)return R3;BN=1;var e=sV();function n(t){var i=e(t),r=i%1;return i===i?r?i-r:i:0}return R3=n,R3}var P3,FN;function q3e(){if(FN)return P3;FN=1;var e=jH(),n=cl(),t=F3e(),i=Math.max;function r(a,o,l){var f=a==null?0:a.length;if(!f)return-1;var c=l==null?0:t(l);return c<0&&(c=i(f+c,0)),e(a,n(o,3),c)}return P3=r,P3}var N3,qN;function H3e(){if(qN)return N3;qN=1;var e=B3e(),n=q3e(),t=e(n);return N3=t,N3}var U3e=H3e();const V3e=ot(U3e);var W3e=Wq();const G3e=ot(W3e);var Y3e=G3e(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("")}),tA=O.createContext(void 0),iA=O.createContext(void 0),yV=O.createContext(void 0),bV=O.createContext({}),wV=O.createContext(void 0),kV=O.createContext(0),_V=O.createContext(0),HN=function(n){var t=n.state,i=t.xAxisMap,r=t.yAxisMap,a=t.offset,o=n.clipPathId,l=n.children,f=n.width,c=n.height,h=Y3e(a);return Z.createElement(tA.Provider,{value:i},Z.createElement(iA.Provider,{value:r},Z.createElement(bV.Provider,{value:a},Z.createElement(yV.Provider,{value:h},Z.createElement(wV.Provider,{value:o},Z.createElement(kV.Provider,{value:c},Z.createElement(_V.Provider,{value:f},l)))))))},K3e=function(){return O.useContext(wV)},xV=function(n){var t=O.useContext(tA);t==null&&hu();var i=t[n];return i==null&&hu(),i},X3e=function(){var n=O.useContext(tA);return Us(n)},Z3e=function(){var n=O.useContext(iA),t=V3e(n,function(i){return cV(i.domain,Number.isFinite)});return t||Us(n)},SV=function(n){var t=O.useContext(iA);t==null&&hu();var i=t[n];return i==null&&hu(),i},Q3e=function(){var n=O.useContext(yV);return n},J3e=function(){return O.useContext(bV)},rA=function(){return O.useContext(_V)},aA=function(){return O.useContext(kV)};function rc(e){"@babel/helpers - typeof";return rc=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},rc(e)}function eSe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function nSe(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 $Se(e,n){return jV(e,n+1)}function zSe(e,n,t,i,r){for(var a=(i||[]).slice(),o=n.start,l=n.end,f=0,c=1,h=o,d=function(){var y=i==null?void 0:i[f];if(y===void 0)return{v:jV(i,c)};var b=f,w,_=function(){return w===void 0&&(w=t(y,b)),w},S=y.coordinate,C=f===0||x1(e,S,_,h,l);C||(f=0,h=o,c+=1),C&&(h=S+e*(_()/2+r),f+=c)},p;c<=a.length;)if(p=d(),p)return p.v;return[]}function wm(e){"@babel/helpers - typeof";return wm=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},wm(e)}function ZN(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 Bi(e){for(var n=1;n0?v.coordinate-w*e:v.coordinate})}else a[p]=v=Bi(Bi({},v),{},{tickCoord:v.coordinate});var _=x1(e,v.tickCoord,b,l,f);_&&(f=v.tickCoord-e*(b()/2+r),a[p]=Bi(Bi({},v),{},{isShow:!0}))},h=o-1;h>=0;h--)c(h);return a}function qSe(e,n,t,i,r,a){var o=(i||[]).slice(),l=o.length,f=n.start,c=n.end;if(a){var h=i[l-1],d=t(h,l-1),p=e*(h.coordinate+e*d/2-c);o[l-1]=h=Bi(Bi({},h),{},{tickCoord:p>0?h.coordinate-p*e:h.coordinate});var v=x1(e,h.tickCoord,function(){return d},f,c);v&&(c=h.tickCoord-e*(d/2+r),o[l-1]=Bi(Bi({},h),{},{isShow:!0}))}for(var y=a?l-1:l,b=function(S){var C=o[S],E,A=function(){return E===void 0&&(E=t(C,S)),E};if(S===0){var T=e*(C.coordinate-e*A()/2-f);o[S]=C=Bi(Bi({},C),{},{tickCoord:T<0?C.coordinate-T*e:C.coordinate})}else o[S]=C=Bi(Bi({},C),{},{tickCoord:C.coordinate});var j=x1(e,C.tickCoord,A,f,c);j&&(f=C.tickCoord+e*(A()/2+r),o[S]=Bi(Bi({},C),{},{isShow:!0}))},w=0;w=2?Ma(r[1].coordinate-r[0].coordinate):1,_=NSe(a,w,v);return f==="equidistantPreserveStart"?zSe(w,_,b,r,o):(f==="preserveStart"||f==="preserveStartEnd"?p=qSe(w,_,b,r,o,f==="preserveStartEnd"):p=FSe(w,_,b,r,o),p.filter(function(S){return S.isShow}))}var HSe=["viewBox"],USe=["viewBox"],VSe=["ticks"];function sc(e){"@babel/helpers - typeof";return sc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},sc(e)}function Of(){return Of=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 WSe(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 GSe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function JN(e,n){for(var t=0;t0?f(this.props):f(v)),o<=0||l<=0||!y||!y.length?null:Z.createElement(Tt,{className:cn("recharts-cartesian-axis",c),ref:function(w){i.layerReference=w}},a&&this.renderAxisLine(),this.renderTicks(y,this.state.fontSize,this.state.letterSpacing),Xt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(i,r,a){var o,l=cn(r.className,"recharts-cartesian-axis-tick-value");return Z.isValidElement(i)?o=Z.cloneElement(i,mi(mi({},r),{},{className:l})):Rn(i)?o=i(mi(mi({},r),{},{className:l})):o=Z.createElement(Hg,Of({},r,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])})(O.Component);lA(Hc,"displayName","CartesianAxis");lA(Hc,"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 e4e=["x1","y1","x2","y2","key"],n4e=["offset"];function mu(e){"@babel/helpers - typeof";return mu=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},mu(e)}function e$(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 a4e(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 o4e=function(n){var t=n.fill;if(!t||t==="none")return null;var i=n.fillOpacity,r=n.x,a=n.y,o=n.width,l=n.height,f=n.ry;return Z.createElement("rect",{x:r,y:a,ry:f,width:o,height:l,stroke:"none",fill:t,fillOpacity:i,className:"recharts-cartesian-grid-bg"})};function PV(e,n){var t;if(Z.isValidElement(e))t=Z.cloneElement(e,n);else if(Rn(e))t=e(n);else{var i=n.x1,r=n.y1,a=n.x2,o=n.y2,l=n.key,f=n$(n,e4e),c=$n(f,!1);c.offset;var h=n$(c,n4e);t=Z.createElement("line",Zl({},h,{x1:i,y1:r,x2:a,y2:o,fill:"none",key:l}))}return t}function s4e(e){var n=e.x,t=e.width,i=e.horizontal,r=i===void 0?!0:i,a=e.horizontalPoints;if(!r||!a||!a.length)return null;var o=a.map(function(l,f){var c=qi(qi({},e),{},{x1:n,y1:l,x2:n+t,y2:l,key:"line-".concat(f),index:f});return PV(r,c)});return Z.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function l4e(e){var n=e.y,t=e.height,i=e.vertical,r=i===void 0?!0:i,a=e.verticalPoints;if(!r||!a||!a.length)return null;var o=a.map(function(l,f){var c=qi(qi({},e),{},{x1:l,y1:n,x2:l,y2:n+t,key:"line-".concat(f),index:f});return PV(r,c)});return Z.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function u4e(e){var n=e.horizontalFill,t=e.fillOpacity,i=e.x,r=e.y,a=e.width,o=e.height,l=e.horizontalPoints,f=e.horizontal,c=f===void 0?!0:f;if(!c||!n||!n.length)return null;var h=l.map(function(p){return Math.round(p+r-r)}).sort(function(p,v){return p-v});r!==h[0]&&h.unshift(0);var d=h.map(function(p,v){var y=!h[v+1],b=y?r+o-p:h[v+1]-p;if(b<=0)return null;var w=v%n.length;return Z.createElement("rect",{key:"react-".concat(v),y:p,x:i,height:b,width:a,stroke:"none",fill:n[w],fillOpacity:t,className:"recharts-cartesian-grid-bg"})});return Z.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function f4e(e){var n=e.vertical,t=n===void 0?!0:n,i=e.verticalFill,r=e.fillOpacity,a=e.x,o=e.y,l=e.width,f=e.height,c=e.verticalPoints;if(!t||!i||!i.length)return null;var h=c.map(function(p){return Math.round(p+a-a)}).sort(function(p,v){return p-v});a!==h[0]&&h.unshift(0);var d=h.map(function(p,v){var y=!h[v+1],b=y?a+l-p:h[v+1]-p;if(b<=0)return null;var w=v%i.length;return Z.createElement("rect",{key:"react-".concat(v),x:p,y:o,width:b,height:f,stroke:"none",fill:i[w],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return Z.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var c4e=function(n,t){var i=n.xAxis,r=n.width,a=n.height,o=n.offset;return YU(sA(qi(qi(qi({},Hc.defaultProps),i),{},{ticks:Bo(i,!0),viewBox:{x:0,y:0,width:r,height:a}})),o.left,o.left+o.width,t)},d4e=function(n,t){var i=n.yAxis,r=n.width,a=n.height,o=n.offset;return YU(sA(qi(qi(qi({},Hc.defaultProps),i),{},{ticks:Bo(i,!0),viewBox:{x:0,y:0,width:r,height:a}})),o.top,o.top+o.height,t)},kf={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function T0(e){var n,t,i,r,a,o,l=rA(),f=aA(),c=J3e(),h=qi(qi({},e),{},{stroke:(n=e.stroke)!==null&&n!==void 0?n:kf.stroke,fill:(t=e.fill)!==null&&t!==void 0?t:kf.fill,horizontal:(i=e.horizontal)!==null&&i!==void 0?i:kf.horizontal,horizontalFill:(r=e.horizontalFill)!==null&&r!==void 0?r:kf.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:kf.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:kf.verticalFill,x:qe(e.x)?e.x:c.left,y:qe(e.y)?e.y:c.top,width:qe(e.width)?e.width:c.width,height:qe(e.height)?e.height:c.height}),d=h.x,p=h.y,v=h.width,y=h.height,b=h.syncWithTicks,w=h.horizontalValues,_=h.verticalValues,S=X3e(),C=Z3e();if(!qe(v)||v<=0||!qe(y)||y<=0||!qe(d)||d!==+d||!qe(p)||p!==+p)return null;var E=h.verticalCoordinatesGenerator||c4e,A=h.horizontalCoordinatesGenerator||d4e,T=h.horizontalPoints,j=h.verticalPoints;if((!T||!T.length)&&Rn(A)){var N=w&&w.length,q=A({yAxis:C?qi(qi({},C),{},{ticks:N?w:C.ticks}):void 0,width:l,height:f,offset:c},N?!0:b);Vo(Array.isArray(q),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(mu(q),"]")),Array.isArray(q)&&(T=q)}if((!j||!j.length)&&Rn(E)){var R=_&&_.length,L=E({xAxis:S?qi(qi({},S),{},{ticks:R?_:S.ticks}):void 0,width:l,height:f,offset:c},R?!0:b);Vo(Array.isArray(L),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(mu(L),"]")),Array.isArray(L)&&(j=L)}return Z.createElement("g",{className:"recharts-cartesian-grid"},Z.createElement(o4e,{fill:h.fill,fillOpacity:h.fillOpacity,x:h.x,y:h.y,width:h.width,height:h.height,ry:h.ry}),Z.createElement(s4e,Zl({},h,{offset:c,horizontalPoints:T,xAxis:S,yAxis:C})),Z.createElement(l4e,Zl({},h,{offset:c,verticalPoints:j,xAxis:S,yAxis:C})),Z.createElement(u4e,Zl({},h,{horizontalPoints:T})),Z.createElement(f4e,Zl({},h,{verticalPoints:j})))}T0.displayName="CartesianGrid";var h4e=["type","layout","connectNulls","ref"],m4e=["key"];function lc(e){"@babel/helpers - typeof";return lc=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},lc(e)}function t$(e,n){if(e==null)return{};var t=p4e(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 p4e(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 _h(){return _h=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);td){v=[].concat(_f(f.slice(0,y)),[d-b]);break}var w=v.length%2===0?[0,p]:[p];return[].concat(_f(n.repeat(f,h)),_f(v),w).map(function(_){return"".concat(_,"px")}).join(", ")}),Ca(t,"id",Lc("recharts-line-")),Ca(t,"pathRef",function(o){t.mainCurve=o}),Ca(t,"handleAnimationEnd",function(){t.setState({isAnimationFinished:!0}),t.props.onAnimationEnd&&t.props.onAnimationEnd()}),Ca(t,"handleAnimationStart",function(){t.setState({isAnimationFinished:!1}),t.props.onAnimationStart&&t.props.onAnimationStart()}),t}return C4e(n,e),k4e(n,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var i=this.getTotalLength();this.setState({totalLength:i})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var i=this.getTotalLength();i!==this.state.totalLength&&this.setState({totalLength:i})}}},{key:"getTotalLength",value:function(){var i=this.mainCurve;try{return i&&i.getTotalLength&&i.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(i,r){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,l=a.xAxis,f=a.yAxis,c=a.layout,h=a.children,d=ua(h,np);if(!d)return null;var p=function(b,w){return{x:b.x,y:b.y,value:b.value,errorVal:ir(b.payload,w)}},v={clipPath:i?"url(#clipPath-".concat(r,")"):null};return Z.createElement(Tt,v,d.map(function(y){return Z.cloneElement(y,{key:"bar-".concat(y.props.dataKey),data:o,xAxis:l,yAxis:f,layout:c,dataPointFormatter:p})}))}},{key:"renderDots",value:function(i,r,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var l=this.props,f=l.dot,c=l.points,h=l.dataKey,d=$n(this.props,!1),p=$n(f,!0),v=c.map(function(b,w){var _=Dr(Dr(Dr({key:"dot-".concat(w),r:3},d),p),{},{index:w,cx:b.x,cy:b.y,value:b.value,dataKey:h,payload:b.payload,points:c});return n.renderDotItem(f,_)}),y={clipPath:i?"url(#clipPath-".concat(r?"":"dots-").concat(a,")"):null};return Z.createElement(Tt,_h({className:"recharts-line-dots",key:"dots"},y),v)}},{key:"renderCurveStatically",value:function(i,r,a,o){var l=this.props,f=l.type,c=l.layout,h=l.connectNulls;l.ref;var d=t$(l,h4e),p=Dr(Dr(Dr({},$n(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:r?"url(#clipPath-".concat(a,")"):null,points:i},o),{},{type:f,layout:c,connectNulls:h});return Z.createElement(zf,_h({},p,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(i,r){var a=this,o=this.props,l=o.points,f=o.strokeDasharray,c=o.isAnimationActive,h=o.animationBegin,d=o.animationDuration,p=o.animationEasing,v=o.animationId,y=o.animateNewValues,b=o.width,w=o.height,_=this.state,S=_.prevPoints,C=_.totalLength;return Z.createElement(ao,{begin:h,duration:d,isActive:c,easing:p,from:{t:0},to:{t:1},key:"line-".concat(v),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(E){var A=E.t;if(S){var T=S.length/l.length,j=l.map(function(B,G){var H=Math.floor(G*T);if(S[H]){var U=S[H],P=Ri(U.x,B.x),z=Ri(U.y,B.y);return Dr(Dr({},B),{},{x:P(A),y:z(A)})}if(y){var F=Ri(b*2,B.x),Y=Ri(w/2,B.y);return Dr(Dr({},B),{},{x:F(A),y:Y(A)})}return Dr(Dr({},B),{},{x:B.x,y:B.y})});return a.renderCurveStatically(j,i,r)}var N=Ri(0,C),q=N(A),R;if(f){var L="".concat(f).split(/[,\s]+/gim).map(function(B){return parseFloat(B)});R=a.getStrokeDasharray(q,C,L)}else R=a.generateSimpleStrokeDasharray(C,q);return a.renderCurveStatically(l,i,r,{strokeDasharray:R})})}},{key:"renderCurve",value:function(i,r){var a=this.props,o=a.points,l=a.isAnimationActive,f=this.state,c=f.prevPoints,h=f.totalLength;return l&&o&&o.length&&(!c&&h>0||!Qf(c,o))?this.renderCurveWithAnimation(i,r):this.renderCurveStatically(o,i,r)}},{key:"render",value:function(){var i,r=this.props,a=r.hide,o=r.dot,l=r.points,f=r.className,c=r.xAxis,h=r.yAxis,d=r.top,p=r.left,v=r.width,y=r.height,b=r.isAnimationActive,w=r.id;if(a||!l||!l.length)return null;var _=this.state.isAnimationFinished,S=l.length===1,C=cn("recharts-line",f),E=c&&c.allowDataOverflow,A=h&&h.allowDataOverflow,T=E||A,j=Bn(w)?this.id:w,N=(i=$n(o,!1))!==null&&i!==void 0?i:{r:3,strokeWidth:2},q=N.r,R=q===void 0?3:q,L=N.strokeWidth,B=L===void 0?2:L,G=Zq(o)?o:{},H=G.clipDot,U=H===void 0?!0:H,P=R*2+B;return Z.createElement(Tt,{className:C},E||A?Z.createElement("defs",null,Z.createElement("clipPath",{id:"clipPath-".concat(j)},Z.createElement("rect",{x:E?p:p-v/2,y:A?d:d-y/2,width:E?v:v*2,height:A?y:y*2})),!U&&Z.createElement("clipPath",{id:"clipPath-dots-".concat(j)},Z.createElement("rect",{x:p-P/2,y:d-P/2,width:v+P,height:y+P}))):null,!S&&this.renderCurve(T,j),this.renderErrorBar(T,j),(S||o)&&this.renderDots(T,U,j),(!b||_)&&Ja.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(_f(i),[0]):i,o=[],l=0;l=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function T4e(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 Ql(){return Ql=Object.assign?Object.assign.bind():function(e){for(var n=1;n0||!Qf(h,o)||!Qf(d,l))?this.renderAreaWithAnimation(i,r):this.renderAreaStatically(o,l,i,r)}},{key:"render",value:function(){var i,r=this.props,a=r.hide,o=r.dot,l=r.points,f=r.className,c=r.top,h=r.left,d=r.xAxis,p=r.yAxis,v=r.width,y=r.height,b=r.isAnimationActive,w=r.id;if(a||!l||!l.length)return null;var _=this.state.isAnimationFinished,S=l.length===1,C=cn("recharts-area",f),E=d&&d.allowDataOverflow,A=p&&p.allowDataOverflow,T=E||A,j=Bn(w)?this.id:w,N=(i=$n(o,!1))!==null&&i!==void 0?i:{r:3,strokeWidth:2},q=N.r,R=q===void 0?3:q,L=N.strokeWidth,B=L===void 0?2:L,G=Zq(o)?o:{},H=G.clipDot,U=H===void 0?!0:H,P=R*2+B;return Z.createElement(Tt,{className:C},E||A?Z.createElement("defs",null,Z.createElement("clipPath",{id:"clipPath-".concat(j)},Z.createElement("rect",{x:E?h:h-v/2,y:A?c:c-y/2,width:E?v:v*2,height:A?y:y*2})),!U&&Z.createElement("clipPath",{id:"clipPath-dots-".concat(j)},Z.createElement("rect",{x:h-P/2,y:c-P/2,width:v+P,height:y+P}))):null,S?null:this.renderArea(T,j),(o||S)&&this.renderDots(T,U,j),(!b||_)&&Ja.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}}])})(O.PureComponent);zV=ns;Ka(ns,"displayName","Area");Ka(ns,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Ou.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Ka(ns,"getBaseValue",function(e,n,t,i){var r=e.layout,a=e.baseValue,o=n.props.baseValue,l=o??a;if(qe(l)&&typeof l=="number")return l;var f=r==="horizontal"?i:t,c=f.scale.domain();if(f.type==="number"){var h=Math.max(c[0],c[1]),d=Math.min(c[0],c[1]);return l==="dataMin"?d:l==="dataMax"||h<0?h:Math.max(Math.min(c[0],c[1]),0)}return l==="dataMin"?c[0]:l==="dataMax"?c[1]:c[0]});Ka(ns,"getComposedData",function(e){var n=e.props,t=e.item,i=e.xAxis,r=e.yAxis,a=e.xAxisTicks,o=e.yAxisTicks,l=e.bandSize,f=e.dataKey,c=e.stackedData,h=e.dataStartIndex,d=e.displayedData,p=e.offset,v=n.layout,y=c&&c.length,b=zV.getBaseValue(n,t,i,r),w=v==="horizontal",_=!1,S=d.map(function(E,A){var T;y?T=c[h+A]:(T=ir(E,f),Array.isArray(T)?_=!0:T=[b,T]);var j=T[1]==null||y&&ir(E,f)==null;return w?{x:r1({axis:i,ticks:a,bandSize:l,entry:E,index:A}),y:j?null:r.scale(T[1]),value:T,payload:E}:{x:j?null:i.scale(T[1]),y:r1({axis:r,ticks:o,bandSize:l,entry:E,index:A}),value:T,payload:E}}),C;return y||_?C=S.map(function(E){var A=Array.isArray(E.value)?E.value[0]:null;return w?{x:E.x,y:A!=null&&E.y!=null?r.scale(A):null}:{x:A!=null?i.scale(A):null,y:E.y}}):C=w?r.scale(b):i.scale(b),Ls({points:S,baseLine:C,layout:v,isRange:_},p)});Ka(ns,"renderDotItem",function(e,n){var t;if(Z.isValidElement(e))t=Z.cloneElement(e,n);else if(Rn(e))t=e(n);else{var i=cn("recharts-area-dot",typeof e!="boolean"?e.className:""),r=n.key,a=LV(n,E4e);t=Z.createElement(k0,Ql({},a,{key:r,className:i}))}return t});function fc(e){"@babel/helpers - typeof";return fc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},fc(e)}function z4e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function L4e(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 C6e(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 A6e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function O6e(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);t0?o:n&&n.length&&qe(r)&&qe(a)?n.slice(r,a+1):[]};function JV(e){return e==="number"?[0,"auto"]:void 0}var Q4=function(n,t,i,r){var a=n.graphicalItems,o=n.tooltipAxis,l=M0(t,n);return i<0||!a||!a.length||i>=l.length?null:a.reduce(function(f,c){var h,d=(h=c.props.data)!==null&&h!==void 0?h:t;d&&n.dataStartIndex+n.dataEndIndex!==0&&n.dataEndIndex-n.dataStartIndex>=i&&(d=d.slice(n.dataStartIndex,n.dataEndIndex+1));var p;if(o.dataKey&&!o.allowDuplicatedCategory){var v=d===void 0?l:d;p=Mg(v,o.dataKey,r)}else p=d&&d[i]||l[i];return p?[].concat(hc(f),[XU(c,p)]):f},[])},h$=function(n,t,i,r){var a=r||{x:n.chartX,y:n.chartY},o=I6e(a,i),l=n.orderedTooltipTicks,f=n.tooltipAxis,c=n.tooltipTicks,h=Uwe(o,l,c,f);if(h>=0&&c){var d=c[h]&&c[h].value,p=Q4(n,t,h,d),v=B6e(i,l,h,a);return{activeTooltipIndex:h,activeLabel:d,activePayload:p,activeCoordinate:v}}return null},F6e=function(n,t){var i=t.axes,r=t.graphicalItems,a=t.axisType,o=t.axisIdKey,l=t.stackGroups,f=t.dataStartIndex,c=t.dataEndIndex,h=n.layout,d=n.children,p=n.stackOffset,v=GU(h,a);return i.reduce(function(y,b){var w,_=b.type.defaultProps!==void 0?Ae(Ae({},b.type.defaultProps),b.props):b.props,S=_.type,C=_.dataKey,E=_.allowDataOverflow,A=_.allowDuplicatedCategory,T=_.scale,j=_.ticks,N=_.includeHidden,q=_[o];if(y[q])return y;var R=M0(n.data,{graphicalItems:r.filter(function(W){var $,X=o in W.props?W.props[o]:($=W.type.defaultProps)===null||$===void 0?void 0:$[o];return X===q}),dataStartIndex:f,dataEndIndex:c}),L=R.length,B,G,H;h6e(_.domain,E,S)&&(B=p4(_.domain,null,E),v&&(S==="number"||T!=="auto")&&(H=wh(R,C,"category")));var U=JV(S);if(!B||B.length===0){var P,z=(P=_.domain)!==null&&P!==void 0?P:U;if(C){if(B=wh(R,C,S),S==="category"&&v){var F=$me(B);A&&F?(G=B,B=p1(0,L)):A||(B=EP(z,B,b).reduce(function(W,$){return W.indexOf($)>=0?W:[].concat(hc(W),[$])},[]))}else if(S==="category")A?B=B.filter(function(W){return W!==""&&!Bn(W)}):B=EP(z,B,b).reduce(function(W,$){return W.indexOf($)>=0||$===""||Bn($)?W:[].concat(hc(W),[$])},[]);else if(S==="number"){var Y=Kwe(R,r.filter(function(W){var $,X,te=o in W.props?W.props[o]:($=W.type.defaultProps)===null||$===void 0?void 0:$[o],ae="hide"in W.props?W.props.hide:(X=W.type.defaultProps)===null||X===void 0?void 0:X.hide;return te===q&&(N||!ae)}),C,a,h);Y&&(B=Y)}v&&(S==="number"||T!=="auto")&&(H=wh(R,C,"category"))}else v?B=p1(0,L):l&&l[q]&&l[q].hasStack&&S==="number"?B=p==="expand"?[0,1]:KU(l[q].stackGroups,f,c):B=WU(R,r.filter(function(W){var $=o in W.props?W.props[o]:W.type.defaultProps[o],X="hide"in W.props?W.props.hide:W.type.defaultProps.hide;return $===q&&(N||!X)}),S,h,!0);if(S==="number")B=K4(d,B,q,a,j),z&&(B=p4(z,B,E));else if(S==="category"&&z){var D=z,V=B.every(function(W){return D.indexOf(W)>=0});V&&(B=D)}}return Ae(Ae({},y),{},bn({},q,Ae(Ae({},_),{},{axisType:a,domain:B,categoricalDomain:H,duplicateDomain:G,originalDomain:(w=_.domain)!==null&&w!==void 0?w:U,isCategorical:v,layout:h})))},{})},q6e=function(n,t){var i=t.graphicalItems,r=t.Axis,a=t.axisType,o=t.axisIdKey,l=t.stackGroups,f=t.dataStartIndex,c=t.dataEndIndex,h=n.layout,d=n.children,p=M0(n.data,{graphicalItems:i,dataStartIndex:f,dataEndIndex:c}),v=p.length,y=GU(h,a),b=-1;return i.reduce(function(w,_){var S=_.type.defaultProps!==void 0?Ae(Ae({},_.type.defaultProps),_.props):_.props,C=S[o],E=JV("number");if(!w[C]){b++;var A;return y?A=p1(0,v):l&&l[C]&&l[C].hasStack?(A=KU(l[C].stackGroups,f,c),A=K4(d,A,C,a)):(A=p4(E,WU(p,i.filter(function(T){var j,N,q=o in T.props?T.props[o]:(j=T.type.defaultProps)===null||j===void 0?void 0:j[o],R="hide"in T.props?T.props.hide:(N=T.type.defaultProps)===null||N===void 0?void 0:N.hide;return q===C&&!R}),"number",h),r.defaultProps.allowDataOverflow),A=K4(d,A,C,a)),Ae(Ae({},w),{},bn({},C,Ae(Ae({axisType:a},r.defaultProps),{},{hide:!0,orientation:la(z6e,"".concat(a,".").concat(b%2),null),domain:A,originalDomain:E,isCategorical:y,layout:h})))}return w},{})},H6e=function(n,t){var i=t.axisType,r=i===void 0?"xAxis":i,a=t.AxisComp,o=t.graphicalItems,l=t.stackGroups,f=t.dataStartIndex,c=t.dataEndIndex,h=n.children,d="".concat(r,"Id"),p=ua(h,a),v={};return p&&p.length?v=F6e(n,{axes:p,graphicalItems:o,axisType:r,axisIdKey:d,stackGroups:l,dataStartIndex:f,dataEndIndex:c}):o&&o.length&&(v=q6e(n,{Axis:a,graphicalItems:o,axisType:r,axisIdKey:d,stackGroups:l,dataStartIndex:f,dataEndIndex:c})),v},U6e=function(n){var t=Us(n),i=Bo(t,!1,!0);return{tooltipTicks:i,orderedTooltipTicks:A9(i,function(r){return r.coordinate}),tooltipAxis:t,tooltipAxisBandSize:a1(t,i)}},m$=function(n){var t=n.children,i=n.defaultShowTooltip,r=Nr(t,tc),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}},V6e=function(n){return!n||!n.length?!1:n.some(function(t){var i=Uo(t&&t.type);return i&&i.indexOf("Bar")>=0})},p$=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"}},W6e=function(n,t){var i=n.props,r=n.graphicalItems,a=n.xAxisMap,o=a===void 0?{}:a,l=n.yAxisMap,f=l===void 0?{}:l,c=i.width,h=i.height,d=i.children,p=i.margin||{},v=Nr(d,tc),y=Nr(d,Wo),b=Object.keys(f).reduce(function(A,T){var j=f[T],N=j.orientation;return!j.mirror&&!j.hide?Ae(Ae({},A),{},bn({},N,A[N]+j.width)):A},{left:p.left||0,right:p.right||0}),w=Object.keys(o).reduce(function(A,T){var j=o[T],N=j.orientation;return!j.mirror&&!j.hide?Ae(Ae({},A),{},bn({},N,la(A,"".concat(N))+j.height)):A},{top:p.top||0,bottom:p.bottom||0}),_=Ae(Ae({},w),b),S=_.bottom;v&&(_.bottom+=v.props.height||tc.defaultProps.height),y&&t&&(_=Gwe(_,r,i,t));var C=c-_.left-_.right,E=h-_.top-_.bottom;return Ae(Ae({brushBottom:S},_),{},{width:Math.max(C,0),height:Math.max(E,0)})},G6e=function(n,t){if(t==="xAxis")return n[t].width;if(t==="yAxis")return n[t].height},uA=function(n){var t=n.chartName,i=n.GraphicalChild,r=n.defaultTooltipEventType,a=r===void 0?"axis":r,o=n.validateTooltipEventTypes,l=o===void 0?["axis"]:o,f=n.axisComponents,c=n.legendContent,h=n.formatAxisMap,d=n.defaultProps,p=function(_,S){var C=S.graphicalItems,E=S.stackGroups,A=S.offset,T=S.updateId,j=S.dataStartIndex,N=S.dataEndIndex,q=_.barSize,R=_.layout,L=_.barGap,B=_.barCategoryGap,G=_.maxBarSize,H=p$(R),U=H.numericAxisName,P=H.cateAxisName,z=V6e(C),F=[];return C.forEach(function(Y,D){var V=M0(_.data,{graphicalItems:[Y],dataStartIndex:j,dataEndIndex:N}),W=Y.type.defaultProps!==void 0?Ae(Ae({},Y.type.defaultProps),Y.props):Y.props,$=W.dataKey,X=W.maxBarSize,te=W["".concat(U,"Id")],ae=W["".concat(P,"Id")],le={},ye=f.reduce(function(Ve,He){var We=S["".concat(He.axisType,"Map")],Ye=W["".concat(He.axisType,"Id")];We&&We[Ye]||He.axisType==="zAxis"||hu();var rn=We[Ye];return Ae(Ae({},Ve),{},bn(bn({},He.axisType,rn),"".concat(He.axisType,"Ticks"),Bo(rn)))},le),oe=ye[P],ue=ye["".concat(P,"Ticks")],ke=E&&E[te]&&E[te].hasStack&&ske(Y,E[te].stackGroups),ie=Uo(Y.type).indexOf("Bar")>=0,Re=a1(oe,ue),pe=[],Ce=z&&Vwe({barSize:q,stackGroups:E,totalSize:G6e(ye,P)});if(ie){var De,be,_e=Bn(X)?G:X,Me=(De=(be=a1(oe,ue,!0))!==null&&be!==void 0?be:_e)!==null&&De!==void 0?De:0;pe=Wwe({barGap:L,barCategoryGap:B,bandSize:Me!==Re?Me:Re,sizeList:Ce[ae],maxBarSize:_e}),Me!==Re&&(pe=pe.map(function(Ve){return Ae(Ae({},Ve),{},{position:Ae(Ae({},Ve.position),{},{offset:Ve.position.offset-Me/2})})}))}var Be=Y&&Y.type&&Y.type.getComposedData;Be&&F.push({props:Ae(Ae({},Be(Ae(Ae({},ye),{},{displayedData:V,props:_,dataKey:$,item:Y,bandSize:Re,barPosition:pe,offset:A,stackedData:ke,layout:R,dataStartIndex:j,dataEndIndex:N}))),{},bn(bn(bn({key:Y.key||"item-".concat(D)},U,ye[U]),P,ye[P]),"animationId",T)),childIndex:Yme(Y,_.children),item:Y})}),F},v=function(_,S){var C=_.props,E=_.dataStartIndex,A=_.dataEndIndex,T=_.updateId;if(!H8({props:C}))return null;var j=C.children,N=C.layout,q=C.stackOffset,R=C.data,L=C.reverseStackOrder,B=p$(N),G=B.numericAxisName,H=B.cateAxisName,U=ua(j,i),P=rke(R,U,"".concat(G,"Id"),"".concat(H,"Id"),q,L),z=f.reduce(function(W,$){var X="".concat($.axisType,"Map");return Ae(Ae({},W),{},bn({},X,H6e(C,Ae(Ae({},$),{},{graphicalItems:U,stackGroups:$.axisType===G&&P,dataStartIndex:E,dataEndIndex:A}))))},{}),F=W6e(Ae(Ae({},z),{},{props:C,graphicalItems:U}),S==null?void 0:S.legendBBox);Object.keys(z).forEach(function(W){z[W]=h(C,z[W],F,W.replace("Map",""),t)});var Y=z["".concat(H,"Map")],D=U6e(Y),V=p(C,Ae(Ae({},z),{},{dataStartIndex:E,dataEndIndex:A,updateId:T,graphicalItems:U,stackGroups:P,offset:F}));return Ae(Ae({formattedGraphicalItems:V,graphicalItems:U,offset:F,stackGroups:P},D),z)},y=(function(w){function _(S){var C,E,A;return A6e(this,_),A=T6e(this,_,[S]),bn(A,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),bn(A,"accessibilityManager",new d6e),bn(A,"handleLegendBBoxUpdate",function(T){if(T){var j=A.state,N=j.dataStartIndex,q=j.dataEndIndex,R=j.updateId;A.setState(Ae({legendBBox:T},v({props:A.props,dataStartIndex:N,dataEndIndex:q,updateId:R},Ae(Ae({},A.state),{},{legendBBox:T}))))}}),bn(A,"handleReceiveSyncEvent",function(T,j,N){if(A.props.syncId===T){if(N===A.eventEmitterSymbol&&typeof A.props.syncMethod!="function")return;A.applySyncEvent(j)}}),bn(A,"handleBrushChange",function(T){var j=T.startIndex,N=T.endIndex;if(j!==A.state.dataStartIndex||N!==A.state.dataEndIndex){var q=A.state.updateId;A.setState(function(){return Ae({dataStartIndex:j,dataEndIndex:N},v({props:A.props,dataStartIndex:j,dataEndIndex:N,updateId:q},A.state))}),A.triggerSyncEvent({dataStartIndex:j,dataEndIndex:N})}}),bn(A,"handleMouseEnter",function(T){var j=A.getMouseInfo(T);if(j){var N=Ae(Ae({},j),{},{isTooltipActive:!0});A.setState(N),A.triggerSyncEvent(N);var q=A.props.onMouseEnter;Rn(q)&&q(N,T)}}),bn(A,"triggeredAfterMouseMove",function(T){var j=A.getMouseInfo(T),N=j?Ae(Ae({},j),{},{isTooltipActive:!0}):{isTooltipActive:!1};A.setState(N),A.triggerSyncEvent(N);var q=A.props.onMouseMove;Rn(q)&&q(N,T)}),bn(A,"handleItemMouseEnter",function(T){A.setState(function(){return{isTooltipActive:!0,activeItem:T,activePayload:T.tooltipPayload,activeCoordinate:T.tooltipPosition||{x:T.cx,y:T.cy}}})}),bn(A,"handleItemMouseLeave",function(){A.setState(function(){return{isTooltipActive:!1}})}),bn(A,"handleMouseMove",function(T){T.persist(),A.throttleTriggeredAfterMouseMove(T)}),bn(A,"handleMouseLeave",function(T){A.throttleTriggeredAfterMouseMove.cancel();var j={isTooltipActive:!1};A.setState(j),A.triggerSyncEvent(j);var N=A.props.onMouseLeave;Rn(N)&&N(j,T)}),bn(A,"handleOuterEvent",function(T){var j=Gme(T),N=la(A.props,"".concat(j));if(j&&Rn(N)){var q,R;/.*touch.*/i.test(j)?R=A.getMouseInfo(T.changedTouches[0]):R=A.getMouseInfo(T),N((q=R)!==null&&q!==void 0?q:{},T)}}),bn(A,"handleClick",function(T){var j=A.getMouseInfo(T);if(j){var N=Ae(Ae({},j),{},{isTooltipActive:!0});A.setState(N),A.triggerSyncEvent(N);var q=A.props.onClick;Rn(q)&&q(N,T)}}),bn(A,"handleMouseDown",function(T){var j=A.props.onMouseDown;if(Rn(j)){var N=A.getMouseInfo(T);j(N,T)}}),bn(A,"handleMouseUp",function(T){var j=A.props.onMouseUp;if(Rn(j)){var N=A.getMouseInfo(T);j(N,T)}}),bn(A,"handleTouchMove",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&A.throttleTriggeredAfterMouseMove(T.changedTouches[0])}),bn(A,"handleTouchStart",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&A.handleMouseDown(T.changedTouches[0])}),bn(A,"handleTouchEnd",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&A.handleMouseUp(T.changedTouches[0])}),bn(A,"handleDoubleClick",function(T){var j=A.props.onDoubleClick;if(Rn(j)){var N=A.getMouseInfo(T);j(N,T)}}),bn(A,"handleContextMenu",function(T){var j=A.props.onContextMenu;if(Rn(j)){var N=A.getMouseInfo(T);j(N,T)}}),bn(A,"triggerSyncEvent",function(T){A.props.syncId!==void 0&&L3.emit(I3,A.props.syncId,T,A.eventEmitterSymbol)}),bn(A,"applySyncEvent",function(T){var j=A.props,N=j.layout,q=j.syncMethod,R=A.state.updateId,L=T.dataStartIndex,B=T.dataEndIndex;if(T.dataStartIndex!==void 0||T.dataEndIndex!==void 0)A.setState(Ae({dataStartIndex:L,dataEndIndex:B},v({props:A.props,dataStartIndex:L,dataEndIndex:B,updateId:R},A.state)));else if(T.activeTooltipIndex!==void 0){var G=T.chartX,H=T.chartY,U=T.activeTooltipIndex,P=A.state,z=P.offset,F=P.tooltipTicks;if(!z)return;if(typeof q=="function")U=q(F,T);else if(q==="value"){U=-1;for(var Y=0;Y=0){var ke,ie;if(G.dataKey&&!G.allowDuplicatedCategory){var Re=typeof G.dataKey=="function"?ue:"payload.".concat(G.dataKey.toString());ke=Mg(Y,Re,U),ie=D&&V&&Mg(V,Re,U)}else ke=Y==null?void 0:Y[H],ie=D&&V&&V[H];if(ae||te){var pe=T.props.activeIndex!==void 0?T.props.activeIndex:H;return[O.cloneElement(T,Ae(Ae(Ae({},q.props),ye),{},{activeIndex:pe})),null,null]}if(!Bn(ke))return[oe].concat(hc(A.renderActivePoints({item:q,activePoint:ke,basePoint:ie,childIndex:H,isRange:D})))}else{var Ce,De=(Ce=A.getItemByXY(A.state.activeCoordinate))!==null&&Ce!==void 0?Ce:{graphicalItem:oe},be=De.graphicalItem,_e=be.item,Me=_e===void 0?T:_e,Be=be.childIndex,Ve=Ae(Ae(Ae({},q.props),ye),{},{activeIndex:Be});return[O.cloneElement(Me,Ve),null,null]}return D?[oe,null,null]:[oe,null]}),bn(A,"renderCustomized",function(T,j,N){return O.cloneElement(T,Ae(Ae({key:"recharts-customized-".concat(N)},A.props),A.state))}),bn(A,"renderMap",{CartesianGrid:{handler:Fv,once:!0},ReferenceArea:{handler:A.renderReferenceElement},ReferenceLine:{handler:Fv},ReferenceDot:{handler:A.renderReferenceElement},XAxis:{handler:Fv},YAxis:{handler:Fv},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((C=S.id)!==null&&C!==void 0?C:Lc("recharts"),"-clip"),A.throttleTriggeredAfterMouseMove=UH(A.triggeredAfterMouseMove,(E=S.throttleDelay)!==null&&E!==void 0?E:1e3/60),A.state={},A}return D6e(_,w),E6e(_,[{key:"componentDidMount",value:function(){var C,E;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(C=this.props.margin.left)!==null&&C!==void 0?C:0,top:(E=this.props.margin.top)!==null&&E!==void 0?E:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var C=this.props,E=C.children,A=C.data,T=C.height,j=C.layout,N=Nr(E,ra);if(N){var q=N.props.defaultIndex;if(!(typeof q!="number"||q<0||q>this.state.tooltipTicks.length-1)){var R=this.state.tooltipTicks[q]&&this.state.tooltipTicks[q].value,L=Q4(this.state,A,q,R),B=this.state.tooltipTicks[q].coordinate,G=(this.state.offset.top+T)/2,H=j==="horizontal",U=H?{x:B,y:G}:{y:B,x:G},P=this.state.formattedGraphicalItems.find(function(F){var Y=F.item;return Y.type.name==="Scatter"});P&&(U=Ae(Ae({},U),P.props.points[q].tooltipPosition),L=P.props.points[q].tooltipPayload);var z={activeTooltipIndex:q,isTooltipActive:!0,activeLabel:R,activePayload:L,activeCoordinate:U};this.setState(z),this.renderCursor(N),this.accessibilityManager.setIndex(q)}}}},{key:"getSnapshotBeforeUpdate",value:function(C,E){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==E.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==C.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==C.margin){var A,T;this.accessibilityManager.setDetails({offset:{left:(A=this.props.margin.left)!==null&&A!==void 0?A:0,top:(T=this.props.margin.top)!==null&&T!==void 0?T:0}})}return null}},{key:"componentDidUpdate",value:function(C){zS([Nr(C.children,ra)],[Nr(this.props.children,ra)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var C=Nr(this.props.children,ra);if(C&&typeof C.props.shared=="boolean"){var E=C.props.shared?"axis":"item";return l.indexOf(E)>=0?E:a}return a}},{key:"getMouseInfo",value:function(C){if(!this.container)return null;var E=this.container,A=E.getBoundingClientRect(),T=P1e(A),j={chartX:Math.round(C.pageX-T.left),chartY:Math.round(C.pageY-T.top)},N=A.width/E.offsetWidth||1,q=this.inRange(j.chartX,j.chartY,N);if(!q)return null;var R=this.state,L=R.xAxisMap,B=R.yAxisMap,G=this.getTooltipEventType(),H=h$(this.state,this.props.data,this.props.layout,q);if(G!=="axis"&&L&&B){var U=Us(L).scale,P=Us(B).scale,z=U&&U.invert?U.invert(j.chartX):null,F=P&&P.invert?P.invert(j.chartY):null;return Ae(Ae({},j),{},{xValue:z,yValue:F},H)}return H?Ae(Ae({},j),H):null}},{key:"inRange",value:function(C,E){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,T=this.props.layout,j=C/A,N=E/A;if(T==="horizontal"||T==="vertical"){var q=this.state.offset,R=j>=q.left&&j<=q.left+q.width&&N>=q.top&&N<=q.top+q.height;return R?{x:j,y:N}:null}var L=this.state,B=L.angleAxisMap,G=L.radiusAxisMap;if(B&&G){var H=Us(B);return jP({x:j,y:N},H)}return null}},{key:"parseEventsOfWrapper",value:function(){var C=this.props.children,E=this.getTooltipEventType(),A=Nr(C,ra),T={};A&&E==="axis"&&(A.props.trigger==="click"?T={onClick:this.handleClick}:T={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 j=jg(this.props,this.handleOuterEvent);return Ae(Ae({},j),T)}},{key:"addListener",value:function(){L3.on(I3,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){L3.removeListener(I3,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(C,E,A){for(var T=this.state.formattedGraphicalItems,j=0,N=T.length;j({root:{"--chart-text-color":n?nt(n,e):void 0,"--chart-grid-color":t?nt(t,e):void 0,"--chart-cursor-fill":i?nt(i,e):void 0,"--chart-bar-label-color":r?nt(r,e):void 0}});function J6e(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 eCe(e,n){return typeof e=="function"?e(n).fill:e==null?void 0:e.fill}const Jl=Pe(e=>{const n=ge("BarChart",Q6e,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,data:f,withLegend:c,legendProps:h,series:d,onMouseLeave:p,dataKey:v,withTooltip:y,withXAxis:b,withYAxis:w,gridAxis:_,tickLine:S,xAxisProps:C,yAxisProps:E,unit:A,tooltipAnimationDuration:T,strokeDasharray:j,gridProps:N,tooltipProps:q,referenceLines:R,fillOpacity:L,barChartProps:B,type:G,orientation:H,dir:U,valueFormatter:P,children:z,barProps:F,xAxisLabel:Y,yAxisLabel:D,withBarValueLabel:V,valueLabelProps:W,withRightYAxis:$,rightYAxisLabel:X,rightYAxisProps:te,minBarSize:ae,maxBarWidth:le,mod:ye,getBarColor:oe,gridColor:ue,textColor:ke,attributes:ie,...Re}=n,pe=ni(),Ce=_!=="none"&&(S==="x"||S==="xy"),De=_!=="none"&&(S==="y"||S==="xy"),[be,_e]=O.useState(null),Me=be!==null,Be=G==="stacked"||G==="percent",Ve=G==="percent"?Z6e:P,He=ne=>{_e(null),p==null||p(ne)},{resolvedClassNames:We,resolvedStyles:Ye}=Ni({classNames:t,styles:a,props:n}),rn=G==="waterfall"?J6e(f,v):f,Q=Ge({name:"BarChart",classes:Jy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:ie,vars:l,varsResolver:eW}),me=d.map(ne=>{const Le=nt(ne.color,pe),en=Me&&be!==ne.name,hn=typeof F=="function"?F(ne):F,fn=hn==null?void 0:hn.shape;return O.createElement(ju,{...Q("bar"),key:ne.name,name:ne.name,dataKey:ne.name,fill:Le,stroke:Le,isAnimationActive:!1,fillOpacity:en?.1:L,strokeOpacity:en?.2:0,stackId:Be?"stack":ne.stackId||void 0,yAxisId:ne.yAxisId||void 0,minPointSize:ae,...hn,shape:Ze=>{const Ke=Ze.payload,An=Ke!=null&&Ke.color?nt(Ke.color,pe):typeof oe=="function"?nt(oe(Ke==null?void 0:Ke[ne.name],ne),pe):eCe(F,ne)||Le,on={...Ze,fill:An};return typeof fn=="function"?fn(on):Z.isValidElement(fn)?Z.cloneElement(fn,on):typeof fn=="object"&&fn?k.jsx(dm,{...on,...fn}):k.jsx(dm,{...on})}},V&&k.jsx(Ja,{position:H==="vertical"?"right":"top",fontSize:12,fill:"var(--chart-bar-label-color, var(--mantine-color-dimmed))",formatter:Ze=>Ve==null?void 0:Ve(Ze),...typeof W=="function"?W(ne):W}))}),xe=R==null?void 0:R.map((ne,Le)=>{const en=nt(ne.color,pe);return k.jsx(tp,{stroke:ne.color?en:"var(--chart-grid-color)",strokeWidth:1,yAxisId:ne.yAxisId||void 0,...ne,label:{fill:ne.color?en:"currentColor",fontSize:12,position:ne.labelPosition??"insideBottomLeft",...typeof ne.label=="object"?ne.label:{value:ne.label}},...Q("referenceLine")},Le)}),Xe={axisLine:!1,...H==="vertical"?{dataKey:v,type:"category"}:{type:"number"},tickLine:De?{stroke:"currentColor"}:!1,allowDecimals:!0,unit:A,tickFormatter:H==="vertical"?void 0:Ve,...Q("axis")};return k.jsx(we,{...Q("root"),onMouseLeave:He,dir:U||"ltr",mod:[{orientation:H},ye],...Re,children:k.jsx(E9,{...Q("container"),children:k.jsxs(K6e,{data:rn,stackOffset:G==="percent"?"expand":void 0,layout:H,maxBarSize:le,margin:{bottom:Y?30:void 0,left:D?10:void 0,right:D?5:void 0},...B,children:[c&&k.jsx(Wo,{verticalAlign:"top",content:ne=>k.jsx(Qy,{payload:ne.payload,onHighlight:_e,legendPosition:(h==null?void 0:h.verticalAlign)||"top",classNames:We,styles:Ye,series:d,showColor:G!=="waterfall",attributes:ie}),...h}),k.jsxs(pl,{hide:!b,...H==="vertical"?{type:"number"}:{dataKey:v},tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:Ce?{stroke:"currentColor"}:!1,minTickGap:5,tickFormatter:H==="vertical"?Ve:void 0,...Q("axis"),...C,children:[Y&&k.jsx(Xt,{position:"insideBottom",offset:-20,fontSize:12,...Q("axisLabel"),children:Y}),C==null?void 0:C.children]}),k.jsxs(oo,{orientation:"left",tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!w,...Xe,...E,children:[D&&k.jsx(Xt,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...Q("axisLabel"),children:D}),E==null?void 0:E.children]}),k.jsxs(oo,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!$,...Xe,...te,children:[X&&k.jsx(Xt,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...Q("axisLabel"),children:X}),E==null?void 0:E.children]}),k.jsx(T0,{strokeDasharray:j,vertical:_==="y"||_==="xy",horizontal:_==="x"||_==="xy",...Q("grid"),...N}),y&&k.jsx(ra,{animationDuration:T,isAnimationActive:T!==0,position:H==="vertical"?{}:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray:j,fill:"var(--chart-cursor-fill)"},content:({label:ne,payload:Le,labelFormatter:en})=>k.jsx(a9,{label:en&&Le?en(ne,Le):ne,payload:Le,type:G==="waterfall"?"scatter":void 0,unit:A,classNames:We,styles:Ye,series:d,valueFormatter:P,attributes:ie}),...q}),me,xe,z]})})})});Jl.displayName="@mantine/charts/BarChart";Jl.classes=Jy;Jl.varsResolver=eW;const nCe={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"}]},nW=(e,{textColor:n,gridColor:t})=>({root:{"--chart-text-color":n?nt(n,e):void 0,"--chart-grid-color":t?nt(t,e):void 0}}),j0=Pe(e=>{const n=ge("LineChart",nCe,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,data:f,withLegend:c,legendProps:h,series:d,onMouseLeave:p,dataKey:v,withTooltip:y,withXAxis:b,withYAxis:w,gridAxis:_,tickLine:S,xAxisProps:C,yAxisProps:E,unit:A,tooltipAnimationDuration:T,strokeDasharray:j,gridProps:N,tooltipProps:q,referenceLines:R,withDots:L,dotProps:B,activeDotProps:G,strokeWidth:H,lineChartProps:U,connectNulls:P,fillOpacity:z,curveType:F,orientation:Y,dir:D,valueFormatter:V,children:W,lineProps:$,xAxisLabel:X,yAxisLabel:te,type:ae,gradientStops:le,withRightYAxis:ye,rightYAxisLabel:oe,rightYAxisProps:ue,withPointLabels:ke,attributes:ie,gridColor:Re,...pe}=n,Ce=ni(),De=_!=="none"&&(S==="x"||S==="xy"),be=_!=="none"&&(S==="y"||S==="xy"),[_e,Me]=O.useState(null),Be=_e!==null,Ve=ne=>{Me(null),p==null||p(ne)},{resolvedClassNames:He,resolvedStyles:We}=Ni({classNames:t,styles:a,props:n}),Ye=Ge({name:"LineChart",classes:Jy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:ie,vars:l,varsResolver:nW}),rn=`line-chart-gradient-${Gi()}`,Q=le==null?void 0:le.map(ne=>k.jsx("stop",{offset:`${ne.offset}%`,stopColor:nt(ne.color,Ce)},ne.color)),me=d.map(ne=>{const Le=nt(ne.color,Ce),en=Be&&_e!==ne.name;return O.createElement(ip,{...Ye("line"),key:ne.name,name:ne.name,dataKey:ne.name,dot:L?{fillOpacity:en?0:1,strokeOpacity:en?0:1,strokeWidth:1,fill:ae==="gradient"?"var(--mantine-color-gray-7)":Le,stroke:ae==="gradient"?"white":Le,...B}:!1,activeDot:L?{fill:ae==="gradient"?"var(--mantine-color-gray-7)":Le,stroke:ae==="gradient"?"white":Le,...G}:!1,fill:Le,stroke:ae==="gradient"?`url(#${rn})`:Le,strokeWidth:H,isAnimationActive:!1,fillOpacity:en?0:z,strokeOpacity:en?.5:z,connectNulls:P,type:ne.curveType??F,strokeDasharray:ne.strokeDasharray,yAxisId:ne.yAxisId||void 0,label:ke?k.jsx(Ghe,{valueFormatter:V}):void 0,...typeof $=="function"?$(ne):$})}),xe=R==null?void 0:R.map((ne,Le)=>{const en=nt(ne.color,Ce);return k.jsx(tp,{stroke:ne.color?en:"var(--chart-grid-color)",strokeWidth:1,yAxisId:ne.yAxisId||void 0,...ne,label:{fill:ne.color?en:"currentColor",fontSize:12,position:ne.labelPosition??"insideBottomLeft",...typeof ne.label=="object"?ne.label:{value:ne.label}},...Ye("referenceLine")},Le)}),Xe={axisLine:!1,...Y==="vertical"?{dataKey:v,type:"category"}:{type:"number"},tickLine:be?{stroke:"currentColor"}:!1,allowDecimals:!0,unit:A,tickFormatter:Y==="vertical"?void 0:V,...Ye("axis")};return k.jsx(we,{...Ye("root"),onMouseLeave:Ve,dir:D||"ltr",...pe,children:k.jsx(E9,{...Ye("container"),children:k.jsxs(Y6e,{data:f,layout:Y,margin:{bottom:X?30:void 0,left:te?10:void 0,right:te?5:void 0},...U,children:[ae==="gradient"&&k.jsx("defs",{children:k.jsx("linearGradient",{id:rn,x1:"0",y1:"0",x2:"0",y2:"1",children:Q})}),c&&k.jsx(Wo,{verticalAlign:"top",content:ne=>k.jsx(Qy,{payload:ne.payload,onHighlight:Me,legendPosition:(h==null?void 0:h.verticalAlign)||"top",classNames:He,styles:We,series:d,showColor:ae!=="gradient",attributes:ie}),...h}),k.jsxs(pl,{hide:!b,...Y==="vertical"?{type:"number"}:{dataKey:v},tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:De?{stroke:"currentColor"}:!1,minTickGap:5,tickFormatter:Y==="vertical"?V:void 0,...Ye("axis"),...C,children:[X&&k.jsx(Xt,{position:"insideBottom",offset:-20,fontSize:12,...Ye("axisLabel"),children:X}),C==null?void 0:C.children]}),k.jsxs(oo,{tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!w,...Xe,...E,children:[te&&k.jsx(Xt,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...Ye("axisLabel"),children:te}),E==null?void 0:E.children]}),k.jsxs(oo,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!ye,...Xe,...ue,children:[oe&&k.jsx(Xt,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...Ye("axisLabel"),children:oe}),E==null?void 0:E.children]}),k.jsx(T0,{strokeDasharray:j,vertical:_==="y"||_==="xy",horizontal:_==="x"||_==="xy",...Ye("grid"),...N}),y&&k.jsx(ra,{animationDuration:T,isAnimationActive:T!==0,position:Y==="vertical"?{}:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray:j},content:({label:ne,payload:Le,labelFormatter:en})=>k.jsx(a9,{label:en&&Le?en(ne,Le):ne,payload:Le,unit:A,classNames:He,styles:We,series:d,valueFormatter:V,showColor:ae!=="gradient",attributes:ie}),...q}),me,xe,W]})})})});j0.displayName="@mantine/charts/LineChart";j0.classes=Jy;j0.varsResolver=nW;const J4=6e4,lh=60*J4,Tf=24*lh,qv=7*Tf,F3=30*Tf;function hr(e){if(!Number.isFinite(e)||e<0)return"0m";if(eze().subtract(30,"day").toDate()),[i,r]=O.useState(()=>new Date),[a,o]=O.useState(null),[l,f]=O.useState(null),[c,h]=O.useState([]),[d,p]=O.useState([]),[v,y]=O.useState(null),[b,w]=O.useState(!1),[_,S]=O.useState([]);O.useEffect(()=>{SB().then(p).catch(()=>{})},[]),O.useEffect(()=>{let R=!1;return w(!0),CB({from:g$(n),to:g$(i),assignee_id:a||void 0,requester:l||void 0,tags:c.length>0?c:void 0}).then(L=>{R||(y(L),S(B=>{const G=new Set(B);for(const H of L.top_requesters??[])G.add(H.requester);return Array.from(G).sort()}))}).catch(()=>{}).finally(()=>{R||w(!1)}),()=>{R=!0}},[n,i,a,l,c]);const C=O.useMemo(()=>e.map(R=>({value:R.id,label:R.display_name||R.username})),[e]),E=O.useMemo(()=>{if(!v)return[];const R=v.cumulative_flow??[],L=R.findIndex(G=>G.total>0||G.done>0);return(L<=0?R:R.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}))},[v]),A=O.useMemo(()=>{if(!v)return[];const R=new Map;for(const L of v.throughput_daily??[])R.set(L.date,{date:L.date,completed:L.count,created:0});for(const L of v.created_daily??[]){const B=R.get(L.date)??{date:L.date,completed:0,created:0};B.created=L.count,R.set(L.date,B)}return Array.from(R.values()).sort((L,B)=>L.date.localeCompare(B.date))},[v]),T=O.useMemo(()=>v?(v.by_column??[]).map(R=>({column:R.name+(R.is_done?" ✓":""),tarjetas:R.count})):[],[v]),j=O.useMemo(()=>v?(v.top_assignees??[]).slice().sort((R,L)=>L.completed_in_range+L.active-(R.completed_in_range+R.active)).slice(0,8).map(R=>({usuario:R.display_name||R.username,completadas:R.completed_in_range,activas:R.active})):[],[v]),N=O.useMemo(()=>v?(v.top_requesters??[]).map(R=>({solicitante:R.requester,activas:R.active,completadas:R.completed_in_range})):[],[v]),q=O.useMemo(()=>v?(v.movements_by_user??[]).filter(R=>R.moves>0).slice(0,8).map(R=>({usuario:R.display_name||R.username,movimientos:R.moves})):[],[v]);return k.jsx(we,{p:"md",children:k.jsxs($t,{gap:"md",children:[k.jsxs(wn,{justify:"space-between",children:[k.jsx(_u,{order:3,children:"Dashboard"}),k.jsxs(wn,{gap:"xs",wrap:"nowrap",children:[k.jsx(lu,{label:"Desde",value:n,onChange:R=>t(R),size:"xs",clearable:!1,valueFormat:"YYYY-MM-DD",style:{minWidth:140}}),k.jsx(lu,{label:"Hasta",value:i,onChange:R=>r(R),size:"xs",clearable:!1,valueFormat:"YYYY-MM-DD",style:{minWidth:140}}),k.jsx(Zo,{label:"Asignado",size:"xs",placeholder:"Todos",value:a,onChange:o,data:C,clearable:!0,searchable:!0,style:{minWidth:160}}),k.jsx(Zo,{label:"Solicitante",size:"xs",placeholder:"Todos",value:l,onChange:f,data:_.map(R=>({value:R,label:R})),clearable:!0,searchable:!0,style:{minWidth:160}}),k.jsx(_y,{label:"Tags",size:"xs",placeholder:"Todas",value:c,onChange:h,data:d,clearable:!0,searchable:!0,style:{minWidth:200}})]})]}),b&&!v&&k.jsx(_c,{p:"xl",children:k.jsx(Wi,{})}),v&&(()=>{const R=v.totals??{},L=v.lead_time??{n:0,p50_ms:0,p90_ms:0},B=G=>R[G]??0;return k.jsxs(k.Fragment,{children:[k.jsxs(Dh,{cols:{base:2,md:5},spacing:"md",children:[k.jsx(Zd,{icon:k.jsx(BM,{size:14}),label:"Totales",value:B("cards"),hint:`${B("columns")} columnas, ${B("users")} usuarios`}),k.jsx(Zd,{icon:k.jsx(BM,{size:14}),label:"Activas",value:B("cards_active"),hint:"Sin completar",color:"blue"}),k.jsx(Zd,{icon:k.jsx($h,{size:14}),label:"Completadas (rango)",value:B("cards_completed_in_range"),hint:`${B("cards_done")} completadas total · ${B("cards_created_in_range")} creadas rango`,color:"green"}),k.jsx(Zd,{icon:k.jsx(boe,{size:14}),label:"Lead time p50",value:L.n>0?hr(L.p50_ms):0,hint:`p90 ${L.n>0?hr(L.p90_ms):0} · n=${L.n}`}),k.jsx(Zd,{icon:k.jsx(Gl,{size:14}),label:"Bloqueos activos",value:B("active_locks"),hint:`Total bloqueado: ${hr(v.lock_total_ms??0)}`,color:B("active_locks")>0?"yellow":void 0})]}),k.jsxs(ei,{withBorder:!0,p:"md",radius:"md",children:[k.jsxs(wn,{gap:6,mb:"sm",children:[k.jsx(qM,{size:16}),k.jsx(un,{fw:600,children:"Cumulative Flow Diagram"}),k.jsx(un,{size:"xs",c:"dimmed",children:"total vs hechas (acumulado)"})]}),E.length===0?k.jsx(un,{c:"dimmed",size:"sm",children:"Sin datos."}):k.jsx("div",{style:{height:260,width:"100%"},children:k.jsx(E9,{width:"100%",height:"100%",children:k.jsxs(X6e,{data:E,margin:{top:10,right:16,left:0,bottom:0},children:[k.jsx(T0,{strokeDasharray:"5 5",stroke:"var(--mantine-color-gray-4)"}),k.jsx(pl,{dataKey:"date",tick:{fontSize:12,fill:"currentColor"}}),k.jsx(oo,{allowDecimals:!1,tick:{fontSize:12,fill:"currentColor"}}),k.jsx(ra,{contentStyle:{background:"var(--mantine-color-body)",border:"1px solid var(--mantine-color-gray-3)",borderRadius:6,fontSize:12}}),k.jsx(Wo,{wrapperStyle:{fontSize:12}}),k.jsx(ns,{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}}),k.jsx(ns,{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}})]})})})]}),k.jsxs(Pr,{children:[k.jsx(Pr.Col,{span:{base:12,md:8},children:k.jsxs(ei,{withBorder:!0,p:"md",radius:"md",children:[k.jsxs(wn,{gap:6,mb:"sm",children:[k.jsx(qM,{size:16}),k.jsx(un,{fw:600,children:"Throughput diario"})]}),A.length===0?k.jsx(un,{c:"dimmed",size:"sm",children:"Sin datos en el rango."}):k.jsx(j0,{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"}]})]})}),k.jsx(Pr.Col,{span:{base:12,md:4},children:k.jsxs(ei,{withBorder:!0,p:"md",radius:"md",children:[k.jsx(un,{fw:600,mb:"sm",children:"Tarjetas por columna"}),T.length===0?k.jsx(un,{c:"dimmed",size:"sm",children:"Sin columnas."}):k.jsx(Jl,{h:240,data:T,dataKey:"column",orientation:"vertical",yAxisProps:{width:100},series:[{name:"tarjetas",label:"Tarjetas",color:"blue.6"}]})]})})]}),k.jsxs(Pr,{children:[k.jsx(Pr.Col,{span:{base:12,md:6},children:k.jsxs(ei,{withBorder:!0,p:"md",radius:"md",children:[k.jsx(un,{fw:600,mb:"sm",children:"Top asignados"}),j.length===0?k.jsx(un,{c:"dimmed",size:"sm",children:"Sin asignaciones."}):k.jsx(Jl,{h:240,data:j,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"})]})}),k.jsx(Pr.Col,{span:{base:12,md:6},children:k.jsxs(ei,{withBorder:!0,p:"md",radius:"md",children:[k.jsx(un,{fw:600,mb:"sm",children:"Top solicitantes"}),N.length===0?k.jsx(un,{c:"dimmed",size:"sm",children:"Sin solicitantes en el rango."}):k.jsx(Jl,{h:Math.max(240,N.length*32),data:N,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"})]})})]}),k.jsxs(Pr,{children:[k.jsx(Pr.Col,{span:{base:12,md:6},children:k.jsxs(ei,{withBorder:!0,p:"md",radius:"md",children:[k.jsx(un,{fw:600,mb:"sm",children:"Movimientos por usuario (rango)"}),q.length===0?k.jsx(un,{c:"dimmed",size:"sm",children:"Sin movimientos registrados."}):k.jsx(Jl,{h:240,data:q,dataKey:"usuario",orientation:"vertical",yAxisProps:{width:120},series:[{name:"movimientos",label:"Movimientos",color:"orange.6"}]})]})}),k.jsx(Pr.Col,{span:{base:12,md:6},children:k.jsxs(ei,{withBorder:!0,p:"md",radius:"md",children:[k.jsx(un,{fw:600,mb:"sm",children:"Tiempo en columna (cycle time)"}),k.jsxs(_t,{striped:!0,highlightOnHover:!0,withTableBorder:!0,withColumnBorders:!0,fz:"xs",children:[k.jsx(_t.Thead,{children:k.jsxs(_t.Tr,{children:[k.jsx(_t.Th,{children:"Columna"}),k.jsx(_t.Th,{children:"n"}),k.jsx(_t.Th,{children:"p50"}),k.jsx(_t.Th,{children:"p90"}),k.jsx(_t.Th,{children:"avg"})]})}),k.jsx(_t.Tbody,{children:(v.cycle_time_per_column??[]).map(G=>k.jsxs(_t.Tr,{children:[k.jsx(_t.Td,{children:k.jsxs(wn,{gap:6,wrap:"nowrap",children:[k.jsx(un,{size:"xs",fw:500,children:G.name}),G.is_done&&k.jsx(ui,{size:"xs",color:"green",variant:"light",children:"done"})]})}),k.jsx(_t.Td,{children:G.stats.n}),k.jsx(_t.Td,{children:G.stats.n>0?hr(G.stats.p50_ms):"—"}),k.jsx(_t.Td,{children:G.stats.n>0?hr(G.stats.p90_ms):"—"}),k.jsx(_t.Td,{children:G.stats.n>0?hr(G.stats.avg_ms):"—"})]},G.column_id))})]})]})})]})]})})()]})})}function iCe(e){try{return JSON.parse(e)}catch{return{}}}function rCe(e){const n=iCe(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:k.jsx(zh,{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:k.jsx(ih,{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:k.jsx(ih,{size:12}),color:"orange"};case"description_changed":return{id:e.id,ts:e.created_at,kind:"Descripcion",actorID:e.actor_id,detail:"edicion",icon:k.jsx(ih,{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:k.jsx(BC,{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:k.jsx(Xoe,{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:k.jsx(ose,{size:12}),color:"teal"};case"unassigned":return{id:e.id,ts:e.created_at,kind:"Sin asignar",actorID:e.actor_id,detail:"",icon:k.jsx(rse,{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:k.jsx(TF,{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:k.jsx(loe,{size:12}),color:"gray"};default:return{id:e.id,ts:e.created_at,kind:e.kind,actorID:e.actor_id,detail:e.payload,icon:k.jsx(ih,{size:12}),color:"gray"}}}function aCe({card:e}){const[n,t]=O.useState(null),[i,r]=O.useState([]);O.useEffect(()=>{aie(e.id).then(t).catch(()=>t({column_history:[],lock_periods:[],events:[],total_locked_ms:0,currently_locked:!1})),xB().then(r).catch(()=>{})},[e.id]);const a=O.useMemo(()=>{const d=new Map;for(const p of i)d.set(p.id,p);return d},[i]),o=O.useMemo(()=>{if(!n)return[];const d=[];for(const p of n.events||[])d.push(rCe(p));for(const p of n.column_history||[])d.push({id:"h_in_"+p.id,ts:p.entered_at,kind:"Mueve a columna",actorID:p.actor_id,detail:p.column_name||p.column_id,icon:k.jsx(aoe,{size:12}),color:"blue"});for(const p of n.lock_periods||[])d.push({id:"lk_"+p.id,ts:p.locked_at,kind:"Bloqueada",actorID:p.actor_id,detail:"",icon:k.jsx(Gl,{size:12}),color:"yellow"}),p.unlocked_at&&d.push({id:"lku_"+p.id,ts:p.unlocked_at,kind:"Desbloqueada",actorID:p.actor_id,detail:hr(p.duration_ms),icon:k.jsx($F,{size:12}),color:"yellow"});return d.sort((p,v)=>p.ts.localeCompare(v.ts))},[n]);if(!n)return k.jsx(wn,{justify:"center",p:"xl",children:k.jsx(Wi,{size:"sm"})});const{column_history:l,total_locked_ms:f,currently_locked:c}=n;if(o.length===0)return k.jsx(un,{c:"dimmed",children:"Sin historial."});const h=d=>{if(!d)return"";const p=a.get(d);return p?p.display_name||p.username:d};return k.jsxs($t,{gap:"md",children:[k.jsx(un,{size:"sm",c:"dimmed",children:"Linea de tiempo completa de la tarjeta."}),k.jsx(qf,{active:o.length,bulletSize:22,lineWidth:2,children:o.map(d=>k.jsx(qf.Item,{bullet:d.icon,color:d.color,title:k.jsxs(wn,{gap:6,wrap:"wrap",children:[k.jsx(un,{fw:500,size:"sm",children:d.kind}),d.actorID&&k.jsx(ui,{size:"xs",variant:"light",color:"cyan",leftSection:k.jsx(fse,{size:10}),children:h(d.actorID)}),d.detail&&k.jsx(ui,{size:"xs",variant:"outline",color:d.color,children:d.detail})]}),children:k.jsx(un,{size:"xs",c:"dimmed",children:new Date(d.ts).toLocaleString()})},d.id))}),k.jsx(dy,{}),k.jsxs(wn,{gap:6,align:"center",children:[k.jsx(_oe,{size:14}),k.jsx(un,{fw:500,size:"sm",children:"Columnas visitadas"}),k.jsx(ui,{size:"xs",variant:"light",color:"gray",children:l.length}),k.jsx(Gl,{size:14,color:"var(--mantine-color-yellow-6)"}),k.jsx(ui,{size:"xs",variant:"light",color:f>0?"yellow":"gray",children:hr(f)}),c&&k.jsx(ui,{size:"xs",variant:"filled",color:"yellow",children:"bloqueada"})]})]})}function oCe(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 fA=new Set(["blue","cyan","teal","green","lime","yellow","orange","red","pink","grape","violet","indigo","gray","dark"]);function cA(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)}function tW(e){return e?cA(e)?`color-mix(in srgb, ${e} 18%, var(--mantine-color-dark-6))`:fA.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 dA(e){return e?cA(e)?`color-mix(in srgb, ${e} 30%, var(--mantine-color-dark-4))`:fA.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 sCe(e){return e?cA(e)?e:fA.has(e)?`var(--mantine-color-${e}-7)`:"var(--mantine-color-dark-3)":"var(--mantine-color-dark-3)"}const iW=[{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"}],lCe=iW,uCe=["blue","cyan","teal","green","lime","yellow","orange","red","pink","grape","violet","indigo"];function y$(e){return oCe(e,uCe)}const Hv=26;function rW({value:e,onChange:n,options:t=iW,onOpenCustom:i}){const[r,a]=O.useState(!1),[o,l]=O.useState(e&&e.startsWith("#")?e:"#888888"),f=!!e&&e.startsWith("#")&&!t.some(c=>c.value===e);return k.jsxs(k.Fragment,{children:[k.jsxs(wn,{gap:6,maw:280,children:[t.map(c=>{const h=e===c.value;return k.jsx(Vi,{label:c.label,withArrow:!0,children:k.jsx(we,{role:"button",onClick:d=>{d.stopPropagation(),n(c.value)},"aria-label":c.label,style:{width:Hv,height:Hv,borderRadius:"50%",background:sCe(c.value),border:`2px solid ${h?"var(--mantine-color-white)":dA(c.value)}`,boxShadow:h?"0 0 0 2px var(--mantine-color-blue-5)":void 0,cursor:"pointer",flexShrink:0,transition:"transform .1s"}})},c.value||"default")}),k.jsx(Vi,{label:"Color personalizado",withArrow:!0,children:k.jsx(we,{role:"button",onMouseDown:c=>{c.stopPropagation()},onClick:c=>{c.stopPropagation(),i?i():a(!0)},"aria-label":"Color personalizado",style:{width:Hv,height:Hv,borderRadius:"50%",background:f?o:"transparent",border:`2px dashed ${f?o:"var(--mantine-color-gray-5)"}`,boxShadow:f?"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:k.jsx(BC,{size:14})})})]}),!i&&k.jsx(e6,{opened:r,onClose:()=>a(!1),value:o,onAccept:c=>{l(c),n(c)}})]})}const Qd=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;function e6({opened:e,onClose:n,value:t,onAccept:i}){const[r,a]=O.useState(t||"#888888"),[o,l]=O.useState(t||"#888888");O.useEffect(()=>{if(e){const d=t&&Qd.test(t)?t:"#888888";a(d),l(d)}},[e,t]);const f=d=>{let p=d.trim();p&&!p.startsWith("#")&&(p="#"+p),l(p),Qd.test(p)&&a(p)},c=d=>{a(d),l(d)},h=()=>{i(r),n()};return k.jsx(Ir,{opened:e,onClose:n,title:"Color personalizado",size:"auto",centered:!0,withinPortal:!0,zIndex:2e3,closeOnClickOutside:!0,closeOnEscape:!1,trapFocus:!1,withCloseButton:!1,children:k.jsxs($t,{gap:"sm",onMouseDown:d=>d.stopPropagation(),onPointerDown:d=>d.stopPropagation(),onClick:d=>d.stopPropagation(),children:[k.jsx(cy,{value:r,onChange:c,format:"hex",swatches:["#1c7ed6","#15aabf","#12b886","#37b24d","#82c91e","#fab005","#fd7e14","#fa5252","#e64980","#be4bdb","#7950f2","#4c6ef5","#868e96","#212529"],fullWidth:!0}),k.jsxs(wn,{align:"end",gap:"xs",children:[k.jsx(il,{label:"Hex",value:o,onChange:d=>f(d.currentTarget.value),error:o&&!Qd.test(o)?"Hex invalido":void 0,size:"xs",style:{flex:1},placeholder:"#rrggbb"}),k.jsx(we,{style:{width:32,height:32,borderRadius:4,background:Qd.test(o)?o:"transparent",border:"1px solid var(--mantine-color-dark-4)"}})]}),k.jsxs(wn,{justify:"flex-end",gap:"xs",children:[k.jsx(Bt,{variant:"default",size:"xs",onClick:n,children:"Cancelar"}),k.jsx(Bt,{size:"xs",onClick:h,disabled:!Qd.test(r),children:"Aceptar"})]})]})})}function fCe({card:e,now:n,onDelete:t,onEdit:i,onChangeColor:r,onShowHistory:a,onToggleLock:o,onAssign:l,onSetDeadline:f,onSetRequester:c,requesterOptions:h,onOpenCustomColor:d,activeSticker:p,onAddSticker:v,onRemoveSticker:y,onMoveSticker:b,onCommitSticker:w,users:_,assignee:S,inDoneColumn:C,isOverlay:E,highlight:A}){const T=C||!!e.completed_at,[j,N]=O.useState(!1),[q,R]=O.useState(!1),[L,B]=O.useState(!1),[G,H]=O.useState(!1),[U,P]=O.useState(e.requester||""),[z,F]=O.useState(!1),Y=O.useRef(null),D=O.useRef(null),V=!!p,{attributes:W,listeners:$,setNodeRef:X,transform:te,transition:ae,isDragging:le}=eF({id:e.id,data:{type:"card",columnId:e.column_id,locked:e.locked},disabled:V}),ye=O.useCallback(ne=>{Y.current=ne,X(ne)},[X]);O.useEffect(()=>{A&&Y.current&&Y.current.scrollIntoView({behavior:"smooth",block:"center"})},[A]);const oe=ne=>{if(!V||!v||E||ne.target.closest("[data-sticker-overlay]"))return;const Le=ne.currentTarget.getBoundingClientRect(),en=(ne.clientX-Le.left)/Le.width,hn=(ne.clientY-Le.top)/Le.height;v(e.id,Math.max(0,Math.min(1,en)),Math.max(0,Math.min(1,hn)))},ue=ne=>Le=>{var Ke;if(!V||E||!b||Le.button!==0)return;Le.stopPropagation(),Le.preventDefault();const en=(Ke=Y.current)==null?void 0:Ke.getBoundingClientRect();if(!en)return;D.current=ne;const hn=Le.currentTarget;hn.setPointerCapture(Le.pointerId);const fn=An=>{const on=D.current;if(on===null)return;const ht=(An.clientX-en.left)/en.width,mt=(An.clientY-en.top)/en.height;b(e.id,on,Math.max(0,Math.min(1,ht)),Math.max(0,Math.min(1,mt)))},Ze=An=>{var on;(on=hn.releasePointerCapture)==null||on.call(hn,An.pointerId),hn.removeEventListener("pointermove",fn),hn.removeEventListener("pointerup",Ze),hn.removeEventListener("pointercancel",Ze),D.current=null,w==null||w(e.id)};hn.addEventListener("pointermove",fn),hn.addEventListener("pointerup",Ze),hn.addEventListener("pointercancel",Ze)},ke=ne=>Le=>{!V||E||(Le.preventDefault(),Le.stopPropagation(),y==null||y(e.id,ne))},ie={transform:io.Transform.toString(te),transition:ae,opacity:le?.4:1,background:tW(e.color),borderColor:A?"var(--mantine-color-blue-5)":e.locked?"var(--mantine-color-yellow-6)":dA(e.color),borderWidth:A||e.locked?2:1,boxShadow:A?"0 0 0 3px var(--mantine-color-blue-4)":void 0,filter:T?"brightness(0.55) saturate(0.7)":void 0},Re=e.entered_at?new Date(e.entered_at).getTime():n,pe=Math.max(0,n-Re),Ce=e.deadline?new Date(e.deadline).getTime():0,De=Ce?Ce-n:0,be=Ce?De<0:!1,_e=e.created_at?new Date(e.created_at).getTime():0,Me=Ce&&_e?Ce-_e:0,Be=Me>0?De/Me:0;let Ve="blue",He="light";be?(Ve="red.9",He="filled"):Be<.1?(Ve="red",He="filled"):Be<.5&&(Ve="yellow",He="light");const We=e.locked_at?new Date(e.locked_at).getTime():0,Ye=e.locked&&We?Math.max(0,n-We):0,rn=e.created_at?new Date(e.created_at).getTime():0,Q=e.completed_at?new Date(e.completed_at).getTime():0,me=T&&rn&&Q?Math.max(0,Q-rn):0,xe=ne=>{ne.preventDefault(),F(!0)},Xe=k.jsxs(k.Fragment,{children:[k.jsx(Kn.Label,{children:"Acciones"}),k.jsx(Kn.Item,{leftSection:k.jsx(ih,{size:14}),onClick:()=>{F(!1),i(e)},children:"Editar"}),k.jsxs(Tn,{opened:j,onChange:N,position:"right-start",withArrow:!0,shadow:"md",children:[k.jsx(Tn.Target,{children:k.jsx(Kn.Item,{leftSection:k.jsx(BC,{size:14}),onClick:ne=>{ne.preventDefault(),ne.stopPropagation(),N(Le=>!Le)},closeMenuOnClick:!1,children:"Color"})}),k.jsx(Tn.Dropdown,{p:"xs",onDoubleClick:ne=>ne.stopPropagation(),onClick:ne=>ne.stopPropagation(),onMouseDown:ne=>ne.stopPropagation(),children:k.jsx(rW,{value:e.color,onChange:ne=>r(e.id,ne),onOpenCustom:d?()=>d(e.id,e.color||"#888888"):void 0})})]}),k.jsxs(Tn,{opened:q,onChange:R,position:"right-start",withArrow:!0,shadow:"md",withinPortal:!1,children:[k.jsx(Tn.Target,{children:k.jsxs(Kn.Item,{leftSection:k.jsx(tse,{size:14}),onClick:ne=>{ne.preventDefault(),ne.stopPropagation(),R(Le=>!Le)},closeMenuOnClick:!1,children:["Asignar a ",S?`(${S.display_name||S.username})`:"..."]})}),k.jsx(Tn.Dropdown,{p:"xs",onDoubleClick:ne=>ne.stopPropagation(),onClick:ne=>ne.stopPropagation(),onMouseDown:ne=>ne.stopPropagation(),children:k.jsx(Zo,{placeholder:"Sin asignar",value:e.assignee_id??null,onChange:ne=>{l(e.id,ne),R(!1),F(!1)},data:_.map(ne=>({value:ne.id,label:ne.display_name||ne.username})),clearable:!0,searchable:!0,autoFocus:!0,comboboxProps:{withinPortal:!1}})})]}),k.jsxs(Tn,{opened:L,onChange:B,position:"right-start",withArrow:!0,shadow:"md",withinPortal:!1,children:[k.jsx(Tn.Target,{children:k.jsxs(Kn.Item,{leftSection:k.jsx(lse,{size:14}),onClick:ne=>{ne.preventDefault(),ne.stopPropagation(),P(e.requester||""),B(Le=>!Le)},closeMenuOnClick:!1,children:["Solicitante ",e.requester?`(${e.requester})`:"..."]})}),k.jsx(Tn.Dropdown,{p:"xs",onDoubleClick:ne=>ne.stopPropagation(),onClick:ne=>ne.stopPropagation(),onMouseDown:ne=>ne.stopPropagation(),children:k.jsx(ry,{placeholder:"Sin solicitante",value:U,onChange:P,data:h||[],autoFocus:!0,comboboxProps:{withinPortal:!1},onKeyDown:ne=>{ne.key==="Enter"?(ne.preventDefault(),c==null||c(e.id,U.trim()),B(!1),F(!1)):ne.key==="Escape"&&B(!1)},onOptionSubmit:ne=>{P(ne),c==null||c(e.id,ne),B(!1),F(!1)}})})]}),k.jsx(Kn.Item,{leftSection:e.locked?k.jsx($F,{size:14}):k.jsx(Gl,{size:14}),color:e.locked?"yellow":void 0,onClick:()=>{F(!1),o(e.id,!e.locked)},children:e.locked?"Desbloquear":"Bloquear"}),k.jsx(Kn.Item,{leftSection:k.jsx(Ooe,{size:14}),onClick:()=>{F(!1),a(e)},children:"Historial"}),f&&k.jsxs(Tn,{opened:G,onChange:H,position:"right-start",withArrow:!0,shadow:"md",withinPortal:!1,children:[k.jsx(Tn.Target,{children:k.jsx(Kn.Item,{leftSection:k.jsx(TF,{size:14}),onClick:ne=>{ne.preventDefault(),ne.stopPropagation(),H(Le=>!Le)},closeMenuOnClick:!1,children:e.deadline?`Deadline (${e.deadline.slice(0,10)})`:"Deadline..."})}),k.jsxs(Tn.Dropdown,{p:"xs",onDoubleClick:ne=>ne.stopPropagation(),onClick:ne=>ne.stopPropagation(),onMouseDown:ne=>ne.stopPropagation(),children:[k.jsx(lu,{value:e.deadline?e.deadline.slice(0,10):null,onChange:ne=>{const Le=ne?typeof ne=="string"?ne.slice(0,10):new Date(ne).toISOString().slice(0,10):null;f(e.id,Le?`${Le}T23:59:59Z`:null),H(!1),F(!1)},clearable:!0,valueFormat:"DD/MM/YYYY",size:"xs",placeholder:"Elegir fecha",popoverProps:{withinPortal:!1}}),e.deadline&&k.jsx(Vi,{label:"Quitar deadline",withArrow:!0,children:k.jsx(Ht,{size:"sm",variant:"subtle",color:"red",mt:6,onClick:()=>{f(e.id,null),H(!1),F(!1)},children:k.jsx(Lh,{size:12})})})]})]}),k.jsx(Kn.Divider,{}),k.jsx(Kn.Item,{leftSection:k.jsx(Lh,{size:14}),color:"red",onClick:()=>{F(!1),t(e.id)},children:"Borrar"})]});return k.jsxs(ei,{ref:ye,style:{...ie,position:"relative",cursor:V?"copy":"grab",touchAction:"none"},withBorder:!0,p:"xs",shadow:E?"lg":"xs",radius:"md",onContextMenu:xe,onClick:oe,onDoubleClick:ne=>{ne.stopPropagation(),i(e)},...W,...V?{}:$,children:[k.jsxs($t,{gap:6,style:{position:"relative",zIndex:1,pointerEvents:V?"none":void 0},children:[k.jsxs(wn,{justify:"space-between",gap:4,wrap:"nowrap",align:"flex-start",children:[k.jsxs(wn,{gap:4,wrap:"nowrap",style:{flex:1,minWidth:0},align:"flex-start",children:[k.jsx(PF,{size:14,color:"var(--mantine-color-dark-2)",style:{flexShrink:0,marginTop:4}}),e.locked&&k.jsx(Vi,{label:"Bloqueada",withArrow:!0,children:k.jsx(Gl,{size:14,color:"var(--mantine-color-yellow-6)",style:{flexShrink:0,marginTop:4}})}),k.jsx(un,{size:"sm",fw:500,style:{flex:1,wordBreak:"break-word",whiteSpace:"normal",textDecoration:T?"line-through":"none",opacity:T?.7:1},children:e.title})]}),k.jsxs(Kn,{opened:z,onChange:F,position:"bottom-end",shadow:"md",withArrow:!0,children:[k.jsx(Kn.Target,{children:k.jsx(Ht,{variant:"subtle",color:"gray",size:"sm","aria-label":"Acciones",style:{flexShrink:0},onPointerDown:ne=>ne.stopPropagation(),children:k.jsx(RF,{size:14})})}),k.jsx(Kn.Dropdown,{onDoubleClick:ne=>ne.stopPropagation(),onClick:ne=>ne.stopPropagation(),onMouseDown:ne=>ne.stopPropagation(),onContextMenu:ne=>ne.stopPropagation(),children:Xe})]})]}),(e.requester||S)&&k.jsxs(wn,{gap:6,wrap:"nowrap",style:{minWidth:0},children:[e.requester&&k.jsxs(k.Fragment,{children:[k.jsx(ou,{size:18,radius:"xs",color:y$(e.requester),style:{flexShrink:0},children:e.requester.slice(0,2).toUpperCase()}),k.jsx(un,{size:"xs",c:"dimmed",truncate:!0,children:e.requester})]}),e.requester&&S&&k.jsx(un,{size:"xs",c:"dimmed",style:{flexShrink:0},children:"-"}),S&&k.jsxs(k.Fragment,{children:[k.jsx(ou,{size:18,radius:"xl",color:S.color||"blue",style:{flexShrink:0},children:(S.display_name||S.username).slice(0,2).toUpperCase()}),k.jsx(un,{size:"xs",c:"dimmed",truncate:!0,children:S.display_name||S.username})]})]}),e.description&&k.jsx(un,{size:"xs",c:"dimmed",lineClamp:3,children:e.description}),e.tags&&e.tags.length>0&&k.jsx(wn,{gap:4,wrap:"wrap",children:e.tags.map(ne=>k.jsx(ui,{size:"xs",variant:"light",color:y$(ne),radius:"sm",children:ne},ne))}),k.jsxs(wn,{gap:4,wrap:"wrap",children:[e.locked&&k.jsx(ui,{size:"xs",variant:"light",color:"yellow",leftSection:k.jsx(Gl,{size:10}),children:hr(Ye)}),!e.locked&&T&&e.completed_at?k.jsxs(k.Fragment,{children:[k.jsx(ui,{size:"xs",variant:"light",color:"teal",leftSection:k.jsx(MF,{size:10}),children:v$(e.completed_at)}),k.jsxs(ui,{size:"xs",variant:"light",color:"gray",leftSection:k.jsx(FM,{size:10}),children:["Total: ",hr(me)]}),e.total_locked_ms>0&&k.jsx(ui,{size:"xs",variant:"light",color:"yellow",leftSection:k.jsx(Gl,{size:10}),children:hr(e.total_locked_ms)})]}):e.locked?null:e.deadline?k.jsx(Vi,{label:`Vence: ${v$(e.deadline)}`,withArrow:!0,children:k.jsx(ui,{size:"xs",variant:He,color:Ve,leftSection:k.jsx(NF,{size:10}),children:be?`-${hr(-De)}`:hr(De)})}):k.jsx(ui,{size:"xs",variant:"light",color:"gray",leftSection:k.jsx(FM,{size:10}),children:hr(pe)})]}),e.seq_num>0&&k.jsxs(un,{size:"xs",c:"dimmed",style:{marginTop:-2},children:["#",String(e.seq_num).padStart(5,"0")]})]}),e.stickers&&e.stickers.length>0&&k.jsx("div",{"data-sticker-overlay":!0,style:{position:"absolute",inset:0,pointerEvents:"none",overflow:"hidden",borderRadius:"inherit",zIndex:0},children:e.stickers.map((ne,Le)=>k.jsx("span",{onPointerDown:ue(Le),onContextMenu:ke(Le),title:V?"Arrastra para mover. Click derecho para borrar.":"",style:{position:"absolute",left:`${ne.x*100}%`,top:`${ne.y*100}%`,transform:"translate(-50%, -50%)",fontSize:48,lineHeight:1,opacity:1,userSelect:"none",cursor:V&&!E?"grab":"default",pointerEvents:V&&!E?"auto":"none",touchAction:"none"},children:ne.emoji},Le))})]})}const aW=O.memo(fCe);function cCe({column:e,cards:n,now:t,collapsed:i,onAddCard:r,onRenameColumn:a,onResizeColumn:o,onMoveColumnLocation:l,onDeleteColumn:f,onSetWIPLimit:c,onToggleDone:h,onEditCard:d,onDeleteCard:p,onChangeCardColor:v,onShowHistory:y,onToggleCardLock:b,onAssignCard:w,onSetCardDeadline:_,onSetRequester:S,requesterOptions:C,onOpenCustomCardColor:E,activeSticker:A,onAddSticker:T,onRemoveSticker:j,onMoveSticker:N,onCommitSticker:q,users:R,usersById:L,highlightCardId:B}){const[G,H]=O.useState(!1),[U,P]=O.useState(e.name),[z,F]=O.useState(null),[Y,D]=O.useState(!1),[V,W]=O.useState(e.wip_limit),[$,X]=O.useState(()=>i?localStorage.getItem(`kanban_col_body_${e.id}`)==="1":!1);O.useEffect(()=>{i&&localStorage.setItem(`kanban_col_body_${e.id}`,$?"1":"0")},[$,i,e.id]);const te=e.wip_limit,ae=te>0&&n.length>te;O.useEffect(()=>{F(null)},[e.width]);const{attributes:le,listeners:ye,setNodeRef:oe,transform:ue,transition:ke,isDragging:ie}=eF({id:`column-${e.id}`,data:{type:"column",columnId:e.id,location:e.location}}),Re=i?"100%":z??e.width,pe=i?{transform:io.Transform.toString(ue),transition:ke,opacity:ie?.4:1,width:"100%",display:"flex",flexDirection:"column",position:"relative",flex:$?"0 0 auto":"1 1 auto",minHeight:0}:{transform:io.Transform.toString(ue),transition:ke,opacity:ie?.4:1,width:Re,minWidth:Re,maxWidth:Re,display:"flex",flexDirection:"column",height:"100%",position:"relative"},Ce=n.map(Q=>Q.id),De=()=>{const Q=U.trim();Q&&Q!==e.name&&a(e.id,Q),H(!1)},be=O.useRef(null),_e=Q=>{Q.preventDefault(),Q.stopPropagation(),be.current={startX:Q.clientX,startWidth:e.width},document.body.style.cursor="col-resize",document.body.style.userSelect="none";const me=Xe=>{if(!be.current)return;const ne=Xe.clientX-be.current.startX,Le=Math.min(800,Math.max(200,be.current.startWidth+ne));F(Le)},xe=()=>{be.current&&Me.current!==null&&o(e.id,Me.current),be.current=null,document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("mousemove",me),window.removeEventListener("mouseup",xe)};window.addEventListener("mousemove",me),window.addEventListener("mouseup",xe)},Me=O.useRef(null);O.useEffect(()=>{Me.current=z},[z]);const Be=e.location==="sidebar",Ve=Be?"Restaurar al board":"Mover al sidebar",He=Be?Jae:noe,We=()=>{const Q=typeof V=="number"?V:parseInt(String(V),10),me=Number.isFinite(Q)&&Q>=0?Math.floor(Q):0;me!==e.wip_limit&&c(e.id,me),D(!1)},Ye=ae?"var(--mantine-color-red-9)":"var(--mantine-color-dark-7)",rn=ae?"var(--mantine-color-red-6)":void 0;return k.jsxs(ei,{ref:oe,style:{...pe,background:Ye,borderColor:rn,borderWidth:ae?2:1},withBorder:!0,radius:"md",p:"sm",children:[k.jsxs(wn,{justify:"space-between",mb:"xs",wrap:"nowrap",children:[k.jsxs(wn,{gap:4,wrap:"nowrap",style:{flex:1,minWidth:0},children:[k.jsx(Ht,{variant:"subtle",color:"gray",size:"sm",...le,...ye,style:{cursor:"grab"},"aria-label":"Drag column",children:k.jsx(PF,{size:14})}),G?k.jsx(il,{size:"xs",value:U,onChange:Q=>P(Q.currentTarget.value),autoFocus:!0,onBlur:De,onKeyDown:Q=>{Q.key==="Enter"&&De(),Q.key==="Escape"&&(P(e.name),H(!1))},style:{flex:1}}):k.jsx(un,{fw:600,size:"sm",truncate:!0,onDoubleClick:()=>{P(e.name),H(!0)},style:{flex:1,cursor:"text"},title:"Doble click para renombrar",children:e.name}),k.jsxs(Tn,{opened:Y,onChange:Q=>{D(Q),Q&&W(e.wip_limit)},position:"bottom",withArrow:!0,shadow:"md",children:[k.jsx(Tn.Target,{children:k.jsx(Vi,{label:te>0?`WIP ${n.length}/${te}${ae?" (excedido)":""}`:"Click para limitar WIP",withArrow:!0,children:k.jsx(ui,{size:"xs",variant:ae?"filled":"light",color:ae?"red":te>0?"yellow":"gray",leftSection:ae?k.jsx(Zae,{size:10}):null,style:{cursor:"pointer"},onClick:()=>D(Q=>!Q),children:te>0?`${n.length}/${te}`:n.length})})}),k.jsx(Tn.Dropdown,{p:"xs",children:k.jsxs($t,{gap:"xs",children:[k.jsx(un,{size:"xs",c:"dimmed",children:"Maximo de tarjetas (0 = sin limite)"}),k.jsx(Cy,{size:"xs",value:V,onChange:W,min:0,max:999,autoFocus:!0,onKeyDown:Q=>{Q.key==="Enter"&&We(),Q.key==="Escape"&&D(!1)}}),k.jsxs(wn,{justify:"flex-end",gap:4,children:[k.jsx(Bt,{size:"xs",variant:"subtle",onClick:()=>D(!1),children:"Cancelar"}),k.jsx(Bt,{size:"xs",onClick:We,children:"Guardar"})]})]})})]})]}),k.jsx(wn,{gap:2,wrap:"nowrap",children:G?k.jsxs(k.Fragment,{children:[k.jsx(Ht,{variant:"subtle",color:"green",size:"sm",onClick:De,"aria-label":"Save",children:k.jsx(MF,{size:14})}),k.jsx(Ht,{variant:"subtle",color:"gray",size:"sm",onClick:()=>{P(e.name),H(!1)},"aria-label":"Cancel",children:k.jsx(rh,{size:14})})]}):k.jsxs(k.Fragment,{children:[i&&k.jsx(Vi,{label:$?"Expandir":"Colapsar",withArrow:!0,children:k.jsx(Ht,{variant:"subtle",color:"gray",size:"sm",onClick:()=>X(Q=>!Q),"aria-label":$?"Expandir columna":"Colapsar columna",children:$?k.jsx(DF,{size:14}):k.jsx(jF,{size:14})})}),e.is_done&&k.jsx(Vi,{label:"Columna Done",withArrow:!0,children:k.jsx(ui,{size:"xs",color:"green",variant:"filled",leftSection:k.jsx($h,{size:10}),children:"done"})}),k.jsxs(Kn,{position:"bottom-end",shadow:"md",withArrow:!0,children:[k.jsx(Kn.Target,{children:k.jsx(Ht,{variant:"subtle",color:"gray",size:"sm","aria-label":"Acciones columna",children:k.jsx(RF,{size:14})})}),k.jsxs(Kn.Dropdown,{children:[k.jsx(Kn.Label,{children:"Columna"}),k.jsx(Kn.Item,{leftSection:k.jsx(Foe,{size:14}),onClick:()=>{P(e.name),H(!0)},children:"Renombrar"}),k.jsx(Kn.Item,{leftSection:k.jsx($h,{size:14}),color:e.is_done?"yellow":"green",onClick:()=>h(e.id,!e.is_done),children:e.is_done?"Quitar marca Done":"Marcar como Done"}),k.jsx(Kn.Item,{leftSection:k.jsx(He,{size:14}),onClick:()=>l(e.id,Be?"board":"sidebar"),children:Ve}),k.jsx(Kn.Divider,{}),k.jsx(Kn.Item,{leftSection:k.jsx(Lh,{size:14}),color:"red",onClick:()=>f(e.id),children:"Borrar columna"})]})]})]})})]}),!(i&&$)&&k.jsxs(k.Fragment,{children:[k.jsx(uo,{style:{flex:1},type:"auto",children:k.jsx(wS,{items:Ce,strategy:XB,children:k.jsx($t,{gap:"xs",pb:"xs",style:{minHeight:40},children:n.map(Q=>k.jsx(aW,{card:Q,now:t,onDelete:p,onEdit:d,onChangeColor:v,onShowHistory:y,onToggleLock:b,onAssign:w,onSetDeadline:_,onSetRequester:S,requesterOptions:C,onOpenCustomColor:E,users:R,assignee:Q.assignee_id?L.get(Q.assignee_id):void 0,inDoneColumn:e.is_done,highlight:B===Q.id,activeSticker:A,onAddSticker:T,onRemoveSticker:j,onMoveSticker:N,onCommitSticker:q},Q.id))})})}),k.jsx(Bt,{variant:"subtle",color:"gray",size:"xs",leftSection:k.jsx(zh,{size:14}),onClick:()=>r(e.id),mt:"xs",fullWidth:!0,children:"Anadir tarjeta"})]}),!Be&&k.jsx(we,{onMouseDown:_e,style:{position:"absolute",top:0,right:-3,width:6,height:"100%",cursor:"col-resize",zIndex:5},"aria-label":"Resize column"})]})}const b$=O.memo(cCe),dCe=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"]}]'),hCe=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?D0.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 ag(e,o,i,r,null)}function ag(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??++sW};return r==null&&gn.vnode!=null&&gn.vnode(a),a}function No(){return{current:null}}function mc(e){return e.children}function no(e,n){this.props=e,this.context=n}function pc(e,n){if(n==null)return e.__?pc(e.__,e.__.__k.indexOf(e)+1):null;for(var t;n0?ag(v.type,v.props,v.key,null,v.__v):v)!=null){if(v.__=t,v.__b=t.__b+1,(p=_[h])===null||p&&v.key==p.key&&v.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 f=t+l/4%t,c=Math.floor(l/4/t),h=e.getImageData(f,c,1,1).data;return!(a[l]!==h[0]||a[l+2]!==h[2]||e.measureText(r).width>=t)}})();var C$={latestVersion:CCe,noCountryFlags:ACe};const t6=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart"];let Di=null;function ECe(e){Di||(Di=Qs.get("frequently")||{});const n=e.id||e;n&&(Di[n]||(Di[n]=0),Di[n]+=1,Qs.set("last",n),Qs.set("frequently",Di))}function TCe({maxFrequentRows:e,perLine:n}){if(!e)return[];Di||(Di=Qs.get("frequently"));let t=[];if(!Di){Di={};for(let a in t6.slice(0,n)){const o=t6[a];Di[o]=n-a,t.push(o)}return t}const i=e*n,r=Qs.get("last");for(let a in Di)t.push(a);if(t.sort((a,o)=>{const l=Di[o],f=Di[a];return l==f?a.localeCompare(o):l-f}),t.length>i){const a=t.slice(i);t=t.slice(0,i);for(let o of a)o!=r&&delete Di[o];r&&t.indexOf(r)==-1&&(delete Di[t[t.length-1]],t.splice(-1,1,r)),Qs.set("frequently",Di)}return t}var wW={add:ECe,get:TCe,DEFAULTS:t6},kW={};kW=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 zo={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 Ii=null,Un=null;const H3={};async function A$(e){if(H3[e])return H3[e];const t=await(await fetch(e)).json();return H3[e]=t,t}let U3=null,_W=null,xW=!1;function R0(e,{caller:n}={}){return U3||(U3=new Promise(t=>{_W=t})),e?MCe(e):n&&!xW&&console.warn(`\`${n}\` requires data to be initialized first. Promise will be pending until \`init\` is called.`),U3}async function MCe(e){xW=!0;let{emojiVersion:n,set:t,locale:i}=e;if(n||(n=zo.emojiVersion.value),t||(t=zo.set.value),i||(i=zo.locale.value),Un)Un.categories=Un.categories.filter(f=>!f.name);else{Un=(typeof e.data=="function"?await e.data():e.data)||await A$(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/sets/${n}/${t}.json`),Un.emoticons={},Un.natives={},Un.categories.unshift({id:"frequent",emojis:[]});for(const f in Un.aliases){const c=Un.aliases[f],h=Un.emojis[c];h&&(h.aliases||(h.aliases=[]),h.aliases.push(f))}Un.originalCategories=Un.categories}if(Ii=(typeof e.i18n=="function"?await e.i18n():e.i18n)||(i=="en"?oW(kW):await A$(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/i18n/${i}.json`)),e.custom)for(let f in e.custom){f=parseInt(f);const c=e.custom[f],h=e.custom[f-1];if(!(!c.emojis||!c.emojis.length)){c.id||(c.id=`custom_${f+1}`),c.name||(c.name=Ii.categories.custom),h&&!c.icon&&(c.target=h.target||h),Un.categories.push(c);for(const d of c.emojis)Un.emojis[d.id]=d}}e.categories&&(Un.categories=Un.originalCategories.filter(f=>e.categories.indexOf(f.id)!=-1).sort((f,c)=>{const h=e.categories.indexOf(f.id),d=e.categories.indexOf(c.id);return h-d}));let r=null,a=null;t=="native"&&(r=C$.latestVersion(),a=e.noCountryFlags||C$.noCountryFlags());let o=Un.categories.length,l=!1;for(;o--;){const f=Un.categories[o];if(f.id=="frequent"){let{maxFrequentRows:d,perLine:p}=e;d=d>=0?d:zo.maxFrequentRows.value,p||(p=zo.perLine.value),f.emojis=wW.get({maxFrequentRows:d,perLine:p})}if(!f.emojis||!f.emojis.length){Un.categories.splice(o,1);continue}const{categoryIcons:c}=e;if(c){const d=c[f.id];d&&!f.icon&&(f.icon=d)}let h=f.emojis.length;for(;h--;){const d=f.emojis[h],p=d.id?d:Un.emojis[d],v=()=>{f.emojis.splice(h,1)};if(!p||e.exceptEmojis&&e.exceptEmojis.includes(p.id)){v();continue}if(r&&p.version>r){v();continue}if(a&&f.id=="flags"&&!NCe.includes(p.id)){v();continue}if(!p.search){if(l=!0,p.search=","+[[p.id,!1],[p.name,!0],[p.keywords,!1],[p.emoticons,!1]].map(([b,w])=>{if(b)return(Array.isArray(b)?b:[b]).map(_=>(w?_.split(/[-|_|\s]+/):[_]).map(S=>S.toLowerCase())).flat()}).flat().filter(b=>b&&b.trim()).join(","),p.emoticons)for(const b of p.emoticons)Un.emoticons[b]||(Un.emoticons[b]=p.id);let y=0;for(const b of p.skins){if(!b)continue;y++;const{native:w}=b;w&&(Un.natives[w]=p.id,p.search+=`,${w}`);const _=y==1?"":`:skin-tone-${y}:`;b.shortcodes=`:${p.id}:${_}`}}}}l&&Lf.reset(),_W()}function SW(e,n,t){e||(e={});const i={};for(let r in n)i[r]=CW(r,e,n,t);return i}function CW(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 jCe=/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/;let i6=null;function DCe(e){return e.id?e:Un.emojis[e]||Un.emojis[Un.aliases[e]]||Un.emojis[Un.natives[e]]}function RCe(){i6=null}async function PCe(e,{maxResults:n,caller:t}={}){if(!e||!e.trim().length)return null;n||(n=90),await R0(null,{caller:t||"SearchIndex.search"});const i=e.toLowerCase().replace(/(\w)-/,"$1 ").split(/[\s|,]+/).filter((l,f,c)=>l.trim()&&c.indexOf(l)==f);if(!i.length)return;let r=i6||(i6=Object.values(Un.emojis)),a,o;for(const l of i){if(!r.length)break;a=[],o={};for(const f of r){if(!f.search)continue;const c=f.search.indexOf(`,${l}`);c!=-1&&(a.push(f),o[f.id]||(o[f.id]=0),o[f.id]+=f.id==l?0:c+1)}r=a}return a.length<2||(a.sort((l,f)=>{const c=o[l.id],h=o[f.id];return c==h?l.id.localeCompare(f.id):c-h}),a.length>n&&(a=a.slice(0,n))),a}var Lf={search:PCe,get:DCe,reset:RCe,SHORTCODES_REGEX:jCe};const NCe=["checkered_flag","crossed_flags","pirate_flag","rainbow-flag","transgender_flag","triangular_flag_on_post","waving_black_flag","waving_white_flag"];function $Ce(e,n){return Array.isArray(e)&&Array.isArray(n)&&e.length===n.length&&e.every((t,i)=>t==n[i])}async function zCe(e=1){for(let n in[...Array(e).keys()])await new Promise(requestAnimationFrame)}function LCe(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 ICe={activity:{outline:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Ne("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:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ne("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:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:Ne("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:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Ne("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:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ne("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:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Ne("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:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ne("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:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Ne("path",{d:"M13 4h-2l-.001 7H9v2h2v2h2v-2h4v-2h-4z"}),Ne("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:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ne("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:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Ne("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"}),Ne("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:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:Ne("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:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Ne("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"}),Ne("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:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:Ne("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:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Ne("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"}),Ne("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:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ne("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:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Ne("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"}),Ne("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:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ne("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:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Ne("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:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ne("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"})})}},BCe={loupe:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:Ne("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:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:Ne("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 P1={categories:ICe,search:BCe};function r6(e){let{id:n,skin:t,emoji:i}=e;if(e.shortcodes){const l=e.shortcodes.match(Lf.SHORTCODES_REGEX);l&&(n=l[1],l[2]&&(t=l[2]))}if(i||(i=Lf.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 Ne("span",{class:"emoji-mart-emoji","data-emoji-set":e.set,children:a?Ne("img",{style:{maxWidth:e.size||"1em",maxHeight:e.size||"1em",display:"inline-block"},alt:r.native||r.shortcodes,src:a}):e.set=="native"?Ne("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}):Ne("span",{style:{display:"block",width:e.size,height:e.size,backgroundImage:`url(${o})`,backgroundSize:`${100*Un.sheet.cols}% ${100*Un.sheet.rows}%`,backgroundPosition:`${100/(Un.sheet.cols-1)*r.x}% ${100/(Un.sheet.rows-1)*r.y}%`}})})}const FCe=typeof window<"u"&&window.HTMLElement?window.HTMLElement:Object;class AW extends FCe{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=CW(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 qCe extends AW{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 OW={fallback:"",id:"",native:"",shortcodes:"",size:{value:"",transform:e=>/\D/.test(e)?e:`${e}px`},set:zo.set,skin:zo.skin};class EW extends AW{async connectedCallback(){const n=SW(this.props,OW,this);n.element=this,n.ref=t=>{this.component=t},await R0(),!this.disconnected&&yW(Ne(r6,{...n}),this)}constructor(n){super(n)}}ta(EW,"Props",OW);typeof customElements<"u"&&!customElements.get("em-emoji")&&customElements.define("em-emoji",EW);var O$,a6=[],E$=gn.__b,T$=gn.__r,M$=gn.diffed,j$=gn.__c,D$=gn.unmount;function HCe(){var e;for(a6.sort(function(n,t){return n.__v.__b-t.__v.__b});e=a6.pop();)if(e.__P)try{e.__H.__h.forEach(og),e.__H.__h.forEach(o6),e.__H.__h=[]}catch(n){e.__H.__h=[],gn.__e(n,e.__v)}}gn.__b=function(e){E$&&E$(e)},gn.__r=function(e){T$&&T$(e);var n=e.__c.__H;n&&(n.__h.forEach(og),n.__h.forEach(o6),n.__h=[])},gn.diffed=function(e){M$&&M$(e);var n=e.__c;n&&n.__H&&n.__H.__h.length&&(a6.push(n)!==1&&O$===gn.requestAnimationFrame||((O$=gn.requestAnimationFrame)||function(t){var i,r=function(){clearTimeout(a),R$&&cancelAnimationFrame(i),setTimeout(t)},a=setTimeout(r,100);R$&&(i=requestAnimationFrame(r))})(HCe))},gn.__c=function(e,n){n.some(function(t){try{t.__h.forEach(og),t.__h=t.__h.filter(function(i){return!i.__||o6(i)})}catch(i){n.some(function(r){r.__h&&(r.__h=[])}),n=[],gn.__e(i,t.__v)}}),j$&&j$(e,n)},gn.unmount=function(e){D$&&D$(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.forEach(function(i){try{og(i)}catch(r){n=r}}),n&&gn.__e(n,t.__v))};var R$=typeof requestAnimationFrame=="function";function og(e){var n=e.__c;typeof n=="function"&&(e.__c=void 0,n())}function o6(e){e.__c=e.__()}function UCe(e,n){for(var t in n)e[t]=n[t];return e}function P$(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 N1(e){this.props=e}(N1.prototype=new no).isPureReactComponent=!0,N1.prototype.shouldComponentUpdate=function(e,n){return P$(this.props,e)||P$(this.state,n)};var N$=gn.__b;gn.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),N$&&N$(e)};var VCe=gn.__e;gn.__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)}VCe(e,n,t)};var $$=gn.unmount;function V3(){this.__u=0,this.t=null,this.__b=null}function TW(e){var n=e.__.__c;return n&&n.__e&&n.__e(e)}function Uv(){this.u=null,this.o=null}gn.unmount=function(e){var n=e.__c;n&&n.__R&&n.__R(),n&&e.__h===!0&&(e.type=null),$$&&$$(e)},(V3.prototype=new no).__c=function(e,n){var t=n.__c,i=this;i.t==null&&(i.t=[]),i.t.push(t);var r=TW(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 c=i.state.__e;i.__v.__k[0]=(function d(p,v,y){return p&&(p.__v=null,p.__k=p.__k&&p.__k.map(function(b){return d(b,v,y)}),p.__c&&p.__c.__P===v&&(p.__e&&y.insertBefore(p.__e,p.__d),p.__c.__e=!0,p.__c.__P=y)),p})(c,c.__c.__P,c.__c.__O)}var h;for(i.setState({__e:i.__b=null});h=i.t.pop();)h.forceUpdate()}},f=n.__h===!0;i.__u++||f||i.setState({__e:i.__b=i.__v.__k[0]}),e.then(o,o)},V3.prototype.componentWillUnmount=function(){this.t=[]},V3.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,f){return o&&(o.__c&&o.__c.__H&&(o.__c.__H.__.forEach(function(c){typeof c.__c=="function"&&c.__c()}),o.__c.__H=null),(o=UCe({},o)).__c!=null&&(o.__c.__P===f&&(o.__c.__P=l),o.__c=null),o.__k=o.__k&&o.__k.map(function(c){return a(c,l,f)})),o})(this.__b,t,i.__O=i.__P)}this.__b=null}var r=n.__e&&n6(mc,null,e.fallback);return r&&(r.__h=null),[n6(mc,null,n.__e?null:e.children),r]};var z$=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||Ii.categories[t.id],a=!this.props.unfocused&&t.id==this.state.categoryId;return a&&(n=i),Ne("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)})}),Ne("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=Un.categories.filter(n=>!n.target),this.state={categoryId:this.categories[0].id}}}class n9e extends N1{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 Vv={rowsPerRender:10};class t9e extends no{getInitialState(n=this.props){return{skin:Qs.get("skin")||n.skin,theme:this.initTheme(n.theme)}}componentWillMount(){this.dir=Ii.rtl?"rtl":"ltr",this.refs={menu:No(),navigation:No(),scroll:No(),search:No(),searchInput:No(),skinToneButton:No(),skinToneRadio:No()},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 R0(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}=Un;this.refs.categories=new Map;const t=Un.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,f=l%Vv.rowsPerRender?{}:No();return f.index=l,f.posinset=this.grid.setsize+1,r.push(f),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:No(),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 Lf.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 f of o){const c=f.target.dataset.id;t.set(c,f.intersectionRatio)}const l=[...t];for(const[f,c]of l)if(c){i(f);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*(Vv.rowsPerRender+5)}px 0px ${this.props.emojiButtonSize*Vv.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[f,c]=this.state.pos;const h=(()=>{if(f==0&&c==0&&!n.repeat&&(i||a))return null;if(f==-1)return!n.repeat&&(r||o)&&t.selectionStart==t.value.length?[0,0]:null;if(i||r){let d=l[f];const p=i?-1:1;if(c+=p,!d[c]){if(f+=p,d=l[f],!d)return f=i?0:l.length-1,c=i?0:l[f].length-1,[f,c];c=i?d.length-1:0}return[f,c]}if(a||o){f+=a?-1:1;const d=l[f];return d?(d[c]||(c=d.length-1),[f,c]):(f=a?0:l.length-1,c=a?0:l[f].length-1,[f,c])}})();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,f=o+l*this.props.emojiButtonSize,c=f+this.props.emojiButtonSize+this.props.emojiButtonSize*.88;if(fr.scrollTop+a.height)o=c-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=LCe(t,{skinIndex:this.state.skin-1});this.props.maxFrequentRows&&wW.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}),Qs.set("skin",n)}renderNav(){return Ne(e9e,{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 Ne("div",{id:"preview",class:"flex flex-middle",dir:this.dir,"data-position":this.props.previewPosition,children:[Ne("div",{class:"flex flex-middle flex-grow",children:[Ne("div",{class:"flex flex-auto flex-middle flex-center",style:{height:this.props.emojiButtonSize,fontSize:this.props.emojiButtonSize},children:Ne(r6,{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})}),Ne("div",{class:`margin-${this.dir[0]}`,children:n||t?Ne("div",{class:`padding-${this.dir[2]} align-${this.dir[0]}`,children:[Ne("div",{class:"preview-title ellipsis",children:n?n.name:Ii.search_no_results_1}),Ne("div",{class:"preview-subtitle ellipsis color-c",children:n?n.skins[0].shortcodes:Ii.search_no_results_2})]}):Ne("div",{class:"preview-placeholder color-c",children:Ii.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,f=(n.skins[o-1]||n.skins[0]).native,c=$Ce(this.state.pos,t),h=t.concat(n.id).join("");return Ne(n9e,{selected:c,skin:o,size:a,children:Ne("button",{"aria-label":f,"aria-selected":c||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:[Ne("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}}),Ne(r6,{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 Ne("div",{children:[Ne("div",{class:"spacer"}),Ne("div",{class:"flex flex-middle",children:[Ne("div",{class:"search relative flex-grow",children:[Ne("input",{type:"search",ref:this.refs.searchInput,placeholder:Ii.search,onClick:this.handleSearchClick,onInput:this.handleSearchInput,onKeyDown:this.handleSearchKeyDown,autoComplete:"off"}),Ne("span",{class:"icon loupe flex",children:P1.search.loupe}),this.state.searchResults&&Ne("button",{title:"Clear","aria-label":"Clear",type:"button",class:"icon delete flex",onClick:this.clearSearch,onMouseDown:this.preventDefault,children:P1.search.delete})]}),n&&this.renderSkinToneButton()]})]})}renderSearchResults(){const{searchResults:n}=this.state;return n?Ne("div",{class:"category",ref:this.refs.search,children:[Ne("div",{class:`sticky padding-small align-${this.dir[0]}`,children:Ii.categories.search}),Ne("div",{children:n.length?n.map((t,i)=>Ne("div",{class:"flex",children:t.map((r,a)=>this.renderEmojiButton(r,{pos:[i,a],posinset:i*this.props.perLine+a+1,grid:n}))})):Ne("div",{class:`padding-small align-${this.dir[0]}`,children:this.props.onAddCustomEmoji&&Ne("a",{onClick:this.props.onAddCustomEmoji,children:Ii.add_custom})})})]}):null}renderCategories(){const{categories:n}=Un,t=!!this.state.searchResults,i=this.getPerLine();return Ne("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 Ne("div",{"data-id":r.target?r.target.id:r.id,class:"category",ref:a,children:[Ne("div",{class:`sticky padding-small align-${this.dir[0]}`,children:r.name||Ii.categories[r.id]}),Ne("div",{class:"relative",style:{height:o.length*this.props.emojiButtonSize},children:o.map((l,f)=>{const c=l.index-l.index%Vv.rowsPerRender,h=this.state.visibleRows[c],d="current"in l?l:void 0;if(!h&&!d)return null;const p=f*i,v=p+i,y=r.emojis.slice(p,v);return y.length{if(!b)return Ne("div",{style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize}});const _=Lf.get(b);return this.renderEmojiButton(_,{pos:[l.index,w],posinset:l.posinset+w,grid:this.grid})})},l.index)})})]})})})}renderSkinToneButton(){return this.props.skinTonePosition=="none"?null:Ne("div",{class:"flex flex-auto flex-center flex-middle",style:{position:"relative",width:this.props.emojiButtonSize,height:this.props.emojiButtonSize},children:Ne("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":Ii.skins.choose,title:Ii.skins.choose,onClick:this.openSkins,style:{width:this.props.emojiSize,height:this.props.emojiSize},children:Ne("span",{class:`skin-tone skin-tone-${this.state.skin}`})})})}renderLiveRegion(){const n=this.getEmojiByPos(this.state.pos),t=n?n.name:"";return Ne("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"),Ne("div",{ref:this.refs.menu,role:"radiogroup",dir:this.dir,"aria-label":Ii.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 Ne("div",{children:[Ne("input",{type:"radio",name:"skin-tone",value:o,"aria-label":Ii.skins[o],ref:l?this.refs.skinToneRadio:null,defaultChecked:l,onChange:()=>this.handleSkinMouseOver(o),onKeyDown:f=>{(f.code=="Enter"||f.code=="Space"||f.code=="Tab")&&(f.preventDefault(),this.handleSkinClick(o))}}),Ne("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:[Ne("span",{class:`skin-tone skin-tone-${o}`}),Ne("span",{class:"margin-small-lr",children:Ii.skins[o]})]})]})})})}render(){const n=this.props.perLine*this.props.emojiButtonSize;return Ne("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"&&Ne("div",{class:"padding-lr",children:this.renderSearch()}),Ne("div",{ref:this.refs.scroll,class:"scroll flex-grow padding-lr",children:Ne("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(),ta(this,"darkMediaCallback",()=>{this.props.theme=="auto"&&this.setState({theme:this.darkMedia.matches?"dark":"light"})}),ta(this,"handleClickOutside",t=>{const{element:i}=this.props;t.target!=i&&(this.state.showSkins&&this.closeSkins(),this.props.onClickOutside&&this.props.onClickOutside(t))}),ta(this,"handleBaseClick",t=>{this.state.showSkins&&(t.target.closest(".menu")||(t.preventDefault(),t.stopImmediatePropagation(),this.closeSkins()))}),ta(this,"handleBaseKeydown",t=>{this.state.showSkins&&t.key=="Escape"&&(t.preventDefault(),t.stopImmediatePropagation(),this.closeSkins())}),ta(this,"handleSearchClick",()=>{this.getEmojiByPos(this.state.pos)&&this.setState({pos:[-1,-1]})}),ta(this,"handleSearchInput",async()=>{const t=this.refs.searchInput.current;if(!t)return;const{value:i}=t,r=await Lf.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 f=null;for(let c of r)(!l.length||f.length==this.getPerLine())&&(f=[],f.__categoryId="search",f.__index=l.length,l.push(f)),f.push(c);this.ignoreMouse(),this.setState({searchResults:l,pos:o},a)}),ta(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}}),ta(this,"clearSearch",()=>{const t=this.refs.searchInput.current;t&&(t.value="",t.focus(),this.handleSearchInput())}),ta(this,"handleCategoryClick",({category:t,i})=>{this.scrollTo(i==0?{row:-1}:{categoryId:t.id})}),ta(this,"openSkins",t=>{const{currentTarget:i}=t,r=i.getBoundingClientRect();this.setState({showSkins:r},async()=>{await zCe(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 mA extends qCe{async connectedCallback(){const n=SW(this.props,zo,this);n.element=this,n.ref=t=>{this.component=t},await R0(n),!this.disconnected&&yW(Ne(t9e,{...n}),this.shadowRoot)}constructor(n){super(n,{styles:oW(MW)})}}ta(mA,"Props",zo);typeof customElements<"u"&&!customElements.get("em-emoji-picker")&&customElements.define("em-emoji-picker",mA);var MW={};MW=`:host { - width: min-content; - height: 435px; - min-height: 230px; - border-radius: var(--border-radius); - box-shadow: var(--shadow); - --border-radius: 10px; - --category-icon-size: 18px; - --font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; - --font-size: 15px; - --preview-placeholder-size: 21px; - --preview-title-size: 1.1em; - --preview-subtitle-size: .9em; - --shadow-color: 0deg 0% 0%; - --shadow: .3px .5px 2.7px hsl(var(--shadow-color) / .14), .4px .8px 1px -3.2px hsl(var(--shadow-color) / .14), 1px 2px 2.5px -4.5px hsl(var(--shadow-color) / .14); - display: flex; -} - -[data-theme="light"] { - --em-rgb-color: var(--rgb-color, 34, 36, 39); - --em-rgb-accent: var(--rgb-accent, 34, 102, 237); - --em-rgb-background: var(--rgb-background, 255, 255, 255); - --em-rgb-input: var(--rgb-input, 255, 255, 255); - --em-color-border: var(--color-border, rgba(0, 0, 0, .05)); - --em-color-border-over: var(--color-border-over, rgba(0, 0, 0, .1)); -} - -[data-theme="dark"] { - --em-rgb-color: var(--rgb-color, 222, 222, 221); - --em-rgb-accent: var(--rgb-accent, 58, 130, 247); - --em-rgb-background: var(--rgb-background, 21, 22, 23); - --em-rgb-input: var(--rgb-input, 0, 0, 0); - --em-color-border: var(--color-border, rgba(255, 255, 255, .1)); - --em-color-border-over: var(--color-border-over, rgba(255, 255, 255, .2)); -} - -#root { - --color-a: rgb(var(--em-rgb-color)); - --color-b: rgba(var(--em-rgb-color), .65); - --color-c: rgba(var(--em-rgb-color), .45); - --padding: 12px; - --padding-small: calc(var(--padding) / 2); - --sidebar-width: 16px; - --duration: 225ms; - --duration-fast: 125ms; - --duration-instant: 50ms; - --easing: cubic-bezier(.4, 0, .2, 1); - width: 100%; - text-align: left; - border-radius: var(--border-radius); - background-color: rgb(var(--em-rgb-background)); - position: relative; -} - -@media (prefers-reduced-motion) { - #root { - --duration: 0; - --duration-fast: 0; - --duration-instant: 0; - } -} - -#root[data-menu] button { - cursor: auto; -} - -#root[data-menu] .menu button { - cursor: pointer; -} - -:host, #root, input, button { - color: rgb(var(--em-rgb-color)); - font-family: var(--font-family); - font-size: var(--font-size); - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - line-height: normal; -} - -*, :before, :after { - box-sizing: border-box; - min-width: 0; - margin: 0; - padding: 0; -} - -.relative { - position: relative; -} - -.flex { - display: flex; -} - -.flex-auto { - flex: none; -} - -.flex-center { - justify-content: center; -} - -.flex-column { - flex-direction: column; -} - -.flex-grow { - flex: auto; -} - -.flex-middle { - align-items: center; -} - -.flex-wrap { - flex-wrap: wrap; -} - -.padding { - padding: var(--padding); -} - -.padding-t { - padding-top: var(--padding); -} - -.padding-lr { - padding-left: var(--padding); - padding-right: var(--padding); -} - -.padding-r { - padding-right: var(--padding); -} - -.padding-small { - padding: var(--padding-small); -} - -.padding-small-b { - padding-bottom: var(--padding-small); -} - -.padding-small-lr { - padding-left: var(--padding-small); - padding-right: var(--padding-small); -} - -.margin { - margin: var(--padding); -} - -.margin-r { - margin-right: var(--padding); -} - -.margin-l { - margin-left: var(--padding); -} - -.margin-small-l { - margin-left: var(--padding-small); -} - -.margin-small-lr { - margin-left: var(--padding-small); - margin-right: var(--padding-small); -} - -.align-l { - text-align: left; -} - -.align-r { - text-align: right; -} - -.color-a { - color: var(--color-a); -} - -.color-b { - color: var(--color-b); -} - -.color-c { - color: var(--color-c); -} - -.ellipsis { - white-space: nowrap; - max-width: 100%; - width: auto; - text-overflow: ellipsis; - overflow: hidden; -} - -.sr-only { - width: 1px; - height: 1px; - position: absolute; - top: auto; - left: -10000px; - overflow: hidden; -} - -a { - cursor: pointer; - color: rgb(var(--em-rgb-accent)); -} - -a:hover { - text-decoration: underline; -} - -.spacer { - height: 10px; -} - -[dir="rtl"] .scroll { - padding-left: 0; - padding-right: var(--padding); -} - -.scroll { - padding-right: 0; - overflow-x: hidden; - overflow-y: auto; -} - -.scroll::-webkit-scrollbar { - width: var(--sidebar-width); - height: var(--sidebar-width); -} - -.scroll::-webkit-scrollbar-track { - border: 0; -} - -.scroll::-webkit-scrollbar-button { - width: 0; - height: 0; - display: none; -} - -.scroll::-webkit-scrollbar-corner { - background-color: rgba(0, 0, 0, 0); -} - -.scroll::-webkit-scrollbar-thumb { - min-height: 20%; - min-height: 65px; - border: 4px solid rgb(var(--em-rgb-background)); - border-radius: 8px; -} - -.scroll::-webkit-scrollbar-thumb:hover { - background-color: var(--em-color-border-over) !important; -} - -.scroll:hover::-webkit-scrollbar-thumb { - background-color: var(--em-color-border); -} - -.sticky { - z-index: 1; - background-color: rgba(var(--em-rgb-background), .9); - -webkit-backdrop-filter: blur(4px); - backdrop-filter: blur(4px); - font-weight: 500; - position: sticky; - top: -1px; -} - -[dir="rtl"] .search input[type="search"] { - padding: 10px 2.2em 10px 2em; -} - -[dir="rtl"] .search .loupe { - left: auto; - right: .7em; -} - -[dir="rtl"] .search .delete { - left: .7em; - right: auto; -} - -.search { - z-index: 2; - position: relative; -} - -.search input, .search button { - font-size: calc(var(--font-size) - 1px); -} - -.search input[type="search"] { - width: 100%; - background-color: var(--em-color-border); - transition-duration: var(--duration); - transition-property: background-color, box-shadow; - transition-timing-function: var(--easing); - border: 0; - border-radius: 10px; - outline: 0; - padding: 10px 2em 10px 2.2em; - display: block; -} - -.search input[type="search"]::-ms-input-placeholder { - color: inherit; - opacity: .6; -} - -.search input[type="search"]::placeholder { - color: inherit; - opacity: .6; -} - -.search input[type="search"], .search input[type="search"]::-webkit-search-decoration, .search input[type="search"]::-webkit-search-cancel-button, .search input[type="search"]::-webkit-search-results-button, .search input[type="search"]::-webkit-search-results-decoration { - -webkit-appearance: none; - -ms-appearance: none; - appearance: none; -} - -.search input[type="search"]:focus { - background-color: rgb(var(--em-rgb-input)); - box-shadow: inset 0 0 0 1px rgb(var(--em-rgb-accent)), 0 1px 3px rgba(65, 69, 73, .2); -} - -.search .icon { - z-index: 1; - color: rgba(var(--em-rgb-color), .7); - position: absolute; - top: 50%; - transform: translateY(-50%); -} - -.search .loupe { - pointer-events: none; - left: .7em; -} - -.search .delete { - right: .7em; -} - -svg { - fill: currentColor; - width: 1em; - height: 1em; -} - -button { - -webkit-appearance: none; - -ms-appearance: none; - appearance: none; - cursor: pointer; - color: currentColor; - background-color: rgba(0, 0, 0, 0); - border: 0; -} - -#nav { - z-index: 2; - padding-top: 12px; - padding-bottom: 12px; - padding-right: var(--sidebar-width); - position: relative; -} - -#nav button { - color: var(--color-b); - transition: color var(--duration) var(--easing); -} - -#nav button:hover { - color: var(--color-a); -} - -#nav svg, #nav img { - width: var(--category-icon-size); - height: var(--category-icon-size); -} - -#nav[dir="rtl"] .bar { - left: auto; - right: 0; -} - -#nav .bar { - width: 100%; - height: 3px; - background-color: rgb(var(--em-rgb-accent)); - transition: transform var(--duration) var(--easing); - border-radius: 3px 3px 0 0; - position: absolute; - bottom: -12px; - left: 0; -} - -#nav button[aria-selected] { - color: rgb(var(--em-rgb-accent)); -} - -#preview { - z-index: 2; - padding: calc(var(--padding) + 4px) var(--padding); - padding-right: var(--sidebar-width); - position: relative; -} - -#preview .preview-placeholder { - font-size: var(--preview-placeholder-size); -} - -#preview .preview-title { - font-size: var(--preview-title-size); -} - -#preview .preview-subtitle { - font-size: var(--preview-subtitle-size); -} - -#nav:before, #preview:before { - content: ""; - height: 2px; - position: absolute; - left: 0; - right: 0; -} - -#nav[data-position="top"]:before, #preview[data-position="top"]:before { - background: linear-gradient(to bottom, var(--em-color-border), transparent); - top: 100%; -} - -#nav[data-position="bottom"]:before, #preview[data-position="bottom"]:before { - background: linear-gradient(to top, var(--em-color-border), transparent); - bottom: 100%; -} - -.category:last-child { - min-height: calc(100% + 1px); -} - -.category button { - font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, sans-serif; - position: relative; -} - -.category button > * { - position: relative; -} - -.category button .background { - opacity: 0; - background-color: var(--em-color-border); - transition: opacity var(--duration-fast) var(--easing) var(--duration-instant); - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; -} - -.category button:hover .background { - transition-duration: var(--duration-instant); - transition-delay: 0s; -} - -.category button[aria-selected] .background { - opacity: 1; -} - -.category button[data-keyboard] .background { - transition: none; -} - -.row { - width: 100%; - position: absolute; - top: 0; - left: 0; -} - -.skin-tone-button { - border: 1px solid rgba(0, 0, 0, 0); - border-radius: 100%; -} - -.skin-tone-button:hover { - border-color: var(--em-color-border); -} - -.skin-tone-button:active .skin-tone { - transform: scale(.85) !important; -} - -.skin-tone-button .skin-tone { - transition: transform var(--duration) var(--easing); -} - -.skin-tone-button[aria-selected] { - background-color: var(--em-color-border); - border-top-color: rgba(0, 0, 0, .05); - border-bottom-color: rgba(0, 0, 0, 0); - border-left-width: 0; - border-right-width: 0; -} - -.skin-tone-button[aria-selected] .skin-tone { - transform: scale(.9); -} - -.menu { - z-index: 2; - white-space: nowrap; - border: 1px solid var(--em-color-border); - background-color: rgba(var(--em-rgb-background), .9); - -webkit-backdrop-filter: blur(4px); - backdrop-filter: blur(4px); - transition-property: opacity, transform; - transition-duration: var(--duration); - transition-timing-function: var(--easing); - border-radius: 10px; - padding: 4px; - position: absolute; - box-shadow: 1px 1px 5px rgba(0, 0, 0, .05); -} - -.menu.hidden { - opacity: 0; -} - -.menu[data-position="bottom"] { - transform-origin: 100% 100%; -} - -.menu[data-position="bottom"].hidden { - transform: scale(.9)rotate(-3deg)translateY(5%); -} - -.menu[data-position="top"] { - transform-origin: 100% 0; -} - -.menu[data-position="top"].hidden { - transform: scale(.9)rotate(3deg)translateY(-5%); -} - -.menu input[type="radio"] { - clip: rect(0 0 0 0); - width: 1px; - height: 1px; - border: 0; - margin: 0; - padding: 0; - position: absolute; - overflow: hidden; -} - -.menu input[type="radio"]:checked + .option { - box-shadow: 0 0 0 2px rgb(var(--em-rgb-accent)); -} - -.option { - width: 100%; - border-radius: 6px; - padding: 4px 6px; -} - -.option:hover { - color: #fff; - background-color: rgb(var(--em-rgb-accent)); -} - -.skin-tone { - width: 16px; - height: 16px; - border-radius: 100%; - display: inline-block; - position: relative; - overflow: hidden; -} - -.skin-tone:after { - content: ""; - mix-blend-mode: overlay; - background: linear-gradient(rgba(255, 255, 255, .2), rgba(0, 0, 0, 0)); - border: 1px solid rgba(0, 0, 0, .8); - border-radius: 100%; - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - box-shadow: inset 0 -2px 3px #000, inset 0 1px 2px #fff; -} - -.skin-tone-1 { - background-color: #ffc93a; -} - -.skin-tone-2 { - background-color: #ffdab7; -} - -.skin-tone-3 { - background-color: #e7b98f; -} - -.skin-tone-4 { - background-color: #c88c61; -} - -.skin-tone-5 { - background-color: #a46134; -} - -.skin-tone-6 { - background-color: #5d4437; -} - -[data-index] { - justify-content: space-between; -} - -[data-emoji-set="twitter"] .skin-tone:after { - box-shadow: none; - border-color: rgba(0, 0, 0, .5); -} - -[data-emoji-set="twitter"] .skin-tone-1 { - background-color: #fade72; -} - -[data-emoji-set="twitter"] .skin-tone-2 { - background-color: #f3dfd0; -} - -[data-emoji-set="twitter"] .skin-tone-3 { - background-color: #eed3a8; -} - -[data-emoji-set="twitter"] .skin-tone-4 { - background-color: #cfad8d; -} - -[data-emoji-set="twitter"] .skin-tone-5 { - background-color: #a8805d; -} - -[data-emoji-set="twitter"] .skin-tone-6 { - background-color: #765542; -} - -[data-emoji-set="google"] .skin-tone:after { - box-shadow: inset 0 0 2px 2px rgba(0, 0, 0, .4); -} - -[data-emoji-set="google"] .skin-tone-1 { - background-color: #f5c748; -} - -[data-emoji-set="google"] .skin-tone-2 { - background-color: #f1d5aa; -} - -[data-emoji-set="google"] .skin-tone-3 { - background-color: #d4b48d; -} - -[data-emoji-set="google"] .skin-tone-4 { - background-color: #aa876b; -} - -[data-emoji-set="google"] .skin-tone-5 { - background-color: #916544; -} - -[data-emoji-set="google"] .skin-tone-6 { - background-color: #61493f; -} - -[data-emoji-set="facebook"] .skin-tone:after { - border-color: rgba(0, 0, 0, .4); - box-shadow: inset 0 -2px 3px #000, inset 0 1px 4px #fff; -} - -[data-emoji-set="facebook"] .skin-tone-1 { - background-color: #f5c748; -} - -[data-emoji-set="facebook"] .skin-tone-2 { - background-color: #f1d5aa; -} - -[data-emoji-set="facebook"] .skin-tone-3 { - background-color: #d4b48d; -} - -[data-emoji-set="facebook"] .skin-tone-4 { - background-color: #aa876b; -} - -[data-emoji-set="facebook"] .skin-tone-5 { - background-color: #916544; -} - -[data-emoji-set="facebook"] .skin-tone-6 { - background-color: #61493f; -} - -`;function i9e({opened:e,onClose:n,onSelect:t,target:i}){return k.jsxs(Tn,{opened:e,onChange:r=>{r||n()},onDismiss:n,position:"bottom-start",withArrow:!0,shadow:"md",withinPortal:!0,closeOnClickOutside:!0,closeOnEscape:!0,trapFocus:!1,children:[k.jsx(Tn.Target,{children:i}),k.jsx(Tn.Dropdown,{p:0,style:{background:"transparent",border:"none"},children:k.jsx(r9e,{onSelect:r=>{t(r),n()}})})]})}function r9e({onSelect:e}){const n=O.useRef(null),t=O.useRef(null),i=O.useRef(e);return i.current=e,O.useEffect(()=>{if(n.current)return t.current=new mA({data:vCe,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}},[]),k.jsx("div",{ref:n})}const uh="column-";function a9e(e){return e==="column"?n=>{const t=n.droppableContainers.filter(r=>String(r.id).startsWith(uh)),i=DB({...n,droppableContainers:t});return i.length>0?i:Mie({...n,droppableContainers:t})}:n=>{const t=Rie(n);return t.length>0?t:jB(n)}}function o9e(){const e=AC(),[n,t]=O.useState(null),[i,r]=O.useState([]),[a,o]=O.useState(null),[l,f]=O.useState(null),[c,h]=O.useState(void 0),[d,p]=O.useState(!1),[v,y]=O.useState(""),[b,w]=O.useState(Date.now()),[_,S]=O.useState(!1),[C,E]=O.useState("board"),[A,T]=O.useState([]),[j,N]=O.useState(!1),[q,R]=O.useState([]),[L,B]=O.useState([]),[G,H]=O.useState(""),[U,P]=O.useState(null),[z,F]=O.useState(null),[Y,D]=O.useState([]),[V,W]=O.useState(!1),[$,X]=O.useState(null),[te,ae]=O.useState(null),[le,ye]=O.useState(!1),[oe,ue]=O.useState(null),[ke,ie]=O.useState(!1),[Re,pe]=O.useState(null),[Ce,De]=O.useState(!1),[be,_e]=O.useState("#888888"),[Me,Be]=O.useState(null),[Ve,He]=O.useState(!1),[We,Ye]=O.useState(()=>{const ee=localStorage.getItem("kanban_nav_width"),Oe=ee?parseInt(ee,10):NaN;return Number.isFinite(Oe)&&Oe>=180&&Oe<=600?Oe:240}),rn=O.useRef(We);O.useEffect(()=>{rn.current=We,localStorage.setItem("kanban_nav_width",String(We))},[We]);const Q=ee=>{ee.preventDefault();const Oe=ee.clientX,Ee=rn.current;document.body.style.cursor="col-resize",document.body.style.userSelect="none";const Ue=Mt=>{const wt=Mt.clientX-Oe,Wt=Math.min(600,Math.max(180,Ee+wt));Ye(Wt)},Fn=()=>{document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("mousemove",Ue),window.removeEventListener("mouseup",Fn)};window.addEventListener("mousemove",Ue),window.addEventListener("mouseup",Fn)},me=Oie(_M(PC,{activationConstraint:{distance:5}}),_M(DC,{coordinateGetter:aae})),xe=O.useCallback(async()=>{try{const ee=await Kte();t(ee)}catch(ee){et.show({color:"red",message:ee.message})}},[]);O.useEffect(()=>{xe()},[xe]);const Xe=O.useCallback(async()=>{try{const ee=await xB();r(ee)}catch(ee){console.warn("listUsers failed",ee)}},[]),ne=O.useCallback(async()=>{try{const ee=await nie();T(ee)}catch(ee){console.warn("listTrash failed",ee)}},[]),Le=O.useCallback(async()=>{try{const ee=await SB();R(ee)}catch(ee){console.warn("listTags failed",ee)}},[]),en=O.useCallback(async()=>{try{const ee=await cie();B(ee)}catch(ee){console.warn("listRequesters failed",ee)}},[]);O.useEffect(()=>{Xe()},[Xe]),O.useEffect(()=>{ne()},[ne]),O.useEffect(()=>{Le(),en()},[Le,en]),O.useEffect(()=>{const ee=setInterval(()=>w(Date.now()),1e3);return()=>clearInterval(ee)},[]),O.useEffect(()=>{if(!Re)return;const ee=Oe=>{Oe.key==="Escape"&&pe(null)};return window.addEventListener("keydown",ee),()=>window.removeEventListener("keydown",ee)},[Re]);const hn=O.useMemo(()=>{const ee=new Map;for(const Oe of i)ee.set(Oe.id,Oe);return ee},[i]),fn=O.useMemo(()=>n?[...n.columns].sort((ee,Oe)=>ee.position-Oe.position):[],[n]),Ze=O.useMemo(()=>fn.filter(ee=>ee.location!=="sidebar"),[fn]),Ke=O.useMemo(()=>fn.filter(ee=>ee.location==="sidebar"),[fn]),An=O.useMemo(()=>Ze.map(ee=>`${uh}${ee.id}`),[Ze]),on=O.useMemo(()=>Ke.map(ee=>`${uh}${ee.id}`),[Ke]),ht=O.useCallback(ee=>{const Oe=G.trim().toLowerCase();if(Oe&&![ee.title,ee.description,ee.requester,...ee.tags||[]].filter(Boolean).join(" ").toLowerCase().includes(Oe)||U&&ee.assignee_id!==U||V&&ee.assignee_id||z&&ee.requester!==z)return!1;if(Y.length>0){const Ee=new Set(ee.tags||[]);for(const Ue of Y)if(!Ee.has(Ue))return!1}if(le&&!ee.deadline)return!1;if($||te){const Ee=$?new Date($).setHours(0,0,0,0):-1/0,Ue=te?new Date(te).setHours(23,59,59,999):1/0,Fn=ee.created_at?new Date(ee.created_at).getTime():NaN,Mt=ee.entered_at?new Date(ee.entered_at).getTime():NaN,wt=Wt=>!isNaN(Wt)&&Wt>=Ee&&Wt<=Ue;if(!wt(Fn)&&!wt(Mt))return!1}return!0},[G,U,V,z,Y,$,te,le]),mt=O.useMemo(()=>{const ee=new Map;if(!n)return ee;for(const Oe of n.columns)ee.set(Oe.id,[]);for(const Oe of[...n.cards].sort((Ee,Ue)=>Ee.position-Ue.position)){if(!ht(Oe))continue;const Ee=ee.get(Oe.column_id);Ee&&Ee.push(Oe)}return ee},[n,ht]),zn=!!G.trim()||!!U||V||!!z||Y.length>0||!!$||!!te||le,yn=ee=>n==null?void 0:n.cards.find(Oe=>Oe.id===ee),kn=ee=>n==null?void 0:n.columns.find(Oe=>Oe.id===ee),tt=ee=>{var Oe;return(Oe=yn(ee))==null?void 0:Oe.column_id},At=ee=>ee.startsWith(uh),$e=ee=>ee.slice(uh.length),Fe=ee=>{if(n)return At(ee)?$e(ee):tt(ee)},jn=ee=>{var Fn;const Oe=ee.active.id,Ee=(Fn=ee.active.data.current)==null?void 0:Fn.type;if(h(Ee),Ee==="column"){f($e(Oe));return}const Ue=yn(Oe);Ue&&o(Ue)},Jn=ee=>{var Mt,wt;if(!n||((Mt=ee.active.data.current)==null?void 0:Mt.type)!=="card")return;const Oe=ee.active.id,Ee=(wt=ee.over)==null?void 0:wt.id;if(!Ee)return;const Ue=tt(Oe),Fn=Fe(Ee);!Ue||!Fn||Ue===Fn||t(Wt=>{if(!Wt)return Wt;const ar=Wt.cards.map(Ba=>Ba.id===Oe?{...Ba,column_id:Fn}:Ba);return{...Wt,cards:ar}})},On=async ee=>{var Ba,Xi;const Oe=(Ba=ee.active.data.current)==null?void 0:Ba.type,Ee=ee.active.id,Ue=(Xi=ee.over)==null?void 0:Xi.id;if(o(null),f(null),h(void 0),!n||!Ue)return;if(Oe==="column"){if(!At(Ue))return;const st=$e(Ee),Zi=$e(Ue);if(st===Zi)return;const ds=kn(st),Ci=kn(Zi);if(!ds||!Ci)return;const po=Ci.location,xr=fn.filter(Ai=>Ai.location===po).map(Ai=>Ai.id),Uc=xr.indexOf(st),gl=xr.indexOf(Zi);let yl;if(Uc===-1){const Ai=gl===-1?xr.length:gl;yl=[...xr.slice(0,Ai),st,...xr.slice(Ai)]}else{if(Uc===gl)return;yl=Sg(xr,Uc,gl)}t(Ai=>{if(!Ai)return Ai;const Vc=new Map(yl.map((Qi,ba)=>[Qi,ba])),$0=Ai.columns.map(Qi=>Qi.id===st?{...Qi,location:po,position:Vc.get(Qi.id)??Qi.position}:Vc.has(Qi.id)?{...Qi,position:Vc.get(Qi.id)}:Qi);return{...Ai,columns:$0}});try{ds.location!==po&&await pf(st,{location:po}),await Qte(yl)}catch(Ai){et.show({color:"red",message:Ai.message})}xe();return}const Fn=Fe(Ue);if(!Fn)return;const Mt=n.cards.find(st=>st.id===Ee);if(Mt!=null&&Mt.locked&&Mt.column_id!==Fn){et.show({color:"yellow",message:"Card bloqueada: no se puede mover entre columnas"}),xe();return}const wt=n.cards.filter(st=>st.column_id===Fn).sort((st,Zi)=>st.position-Zi.position),Wt=wt.findIndex(st=>st.id===Ee);let ar;if(At(Ue)||Wt===-1)ar=[...wt.filter(st=>st.id!==Ee).map(st=>st.id),Ee];else{const st=wt.findIndex(Zi=>Zi.id===Ue);ar=Sg(wt.map(Zi=>Zi.id),Wt,st)}t(st=>{if(!st)return st;const Zi=new Map(ar.map((Ci,po)=>[Ci,po])),ds=st.cards.map(Ci=>Ci.column_id===Fn&&Zi.has(Ci.id)?{...Ci,position:Zi.get(Ci.id)}:Ci);return{...st,cards:ds}});try{await rie(Ee,Fn,ar)}catch(st){et.show({color:"red",message:st.message})}xe()},Qe=async()=>{const ee=v.trim();if(ee)try{await Xte(ee),y(""),p(!1),xe()}catch(Oe){et.show({color:"red",message:Oe.message})}},Je=O.useCallback(async(ee,Oe)=>{try{await pf(ee,{name:Oe}),xe()}catch(Ee){et.show({color:"red",message:Ee.message})}},[xe]),nn=O.useCallback(async(ee,Oe)=>{try{await pf(ee,{width:Oe}),xe()}catch(Ee){et.show({color:"red",message:Ee.message})}},[xe]),Ln=O.useCallback(async(ee,Oe)=>{try{await pf(ee,{location:Oe}),xe()}catch(Ee){et.show({color:"red",message:Ee.message})}},[xe]),In=O.useCallback(ee=>{Ro.openConfirmModal({title:"Eliminar columna",children:k.jsx(un,{size:"sm",children:"Se borraran todas sus tarjetas. Continuar?"}),labels:{confirm:"Eliminar",cancel:"Cancelar"},confirmProps:{color:"red"},onConfirm:async()=>{try{await Zte(ee),xe()}catch(Oe){et.show({color:"red",message:Oe.message})}}})},[xe]),bt=O.useCallback(ee=>{var Ee,Ue;const Oe=Ro.open({title:"Nueva tarjeta",size:"md",children:k.jsx(HM,{users:i,requesterOptions:L,tagOptions:q,initial:{requester:((Ee=e.user)==null?void 0:Ee.display_name)||((Ue=e.user)==null?void 0:Ue.username)||""},submitLabel:"Crear",onCancel:()=>Ro.close(Oe),onSubmit:async Fn=>{try{await Jte({column_id:ee,requester:Fn.requester,title:Fn.title,description:Fn.description,assignee_id:Fn.assignee_id,tags:Fn.tags}),Ro.close(Oe),xe(),Le(),en()}catch(Mt){et.show({color:"red",message:Mt.message})}}})})},[xe,i,e.user,L,q]),xn=O.useCallback(ee=>{const Oe=Ro.open({title:"Editar tarjeta",size:"md",children:k.jsx(HM,{users:i,requesterOptions:L,tagOptions:q,initial:{requester:ee.requester,title:ee.title,description:ee.description,assignee_id:ee.assignee_id,tags:ee.tags||[]},submitLabel:"Guardar",onCancel:()=>Ro.close(Oe),onSubmit:async Ee=>{try{await vf(ee.id,{requester:Ee.requester,title:Ee.title,description:Ee.description,assignee_id:Ee.assignee_id,tags:Ee.tags}),Ro.close(Oe),xe(),Le(),en()}catch(Ue){et.show({color:"red",message:Ue.message})}}})})},[xe,i,L,q]),_n=O.useCallback(async(ee,Oe)=>{t(Ee=>Ee&&{...Ee,cards:Ee.cards.map(Ue=>Ue.id===ee?{...Ue,requester:Oe}:Ue)});try{await vf(ee,{requester:Oe})}catch(Ee){et.show({color:"red",message:Ee.message}),xe()}},[xe]),Wn=O.useCallback(ee=>{E("board"),ue(ee),window.setTimeout(()=>ue(null),3e3)},[]),Lt=O.useCallback(async(ee,Oe)=>{t(Ee=>Ee&&{...Ee,cards:Ee.cards.map(Ue=>Ue.id===ee?{...Ue,deadline:Oe}:Ue)});try{await vf(ee,{deadline:Oe})}catch(Ee){et.show({color:"red",message:Ee.message}),xe()}},[xe]),di=O.useCallback(async(ee,Oe)=>{t(Ee=>Ee&&{...Ee,cards:Ee.cards.map(Ue=>Ue.id===ee?{...Ue,assignee_id:Oe}:Ue)});try{await vf(ee,{assignee_id:Oe})}catch(Ee){et.show({color:"red",message:Ee.message}),xe()}},[xe]),Ki=O.useCallback(async ee=>{try{await eie(ee),xe(),ne()}catch(Oe){et.show({color:"red",message:Oe.message})}},[xe,ne]),za=O.useCallback(async ee=>{try{await tie(ee),xe(),ne()}catch(Oe){et.show({color:"red",message:Oe.message})}},[xe,ne]),mo=O.useCallback(async ee=>{Ro.openConfirmModal({title:"Borrar permanentemente",children:k.jsx(un,{size:"sm",children:"Esta accion no se puede deshacer."}),labels:{confirm:"Borrar",cancel:"Cancelar"},confirmProps:{color:"red"},onConfirm:async()=>{try{await iie(ee),ne()}catch(Oe){et.show({color:"red",message:Oe.message})}}})},[ne]),Br=O.useCallback(async(ee,Oe)=>{t(Ee=>Ee&&{...Ee,cards:Ee.cards.map(Ue=>Ue.id===ee?{...Ue,color:Oe}:Ue)});try{await vf(ee,{color:Oe})}catch(Ee){et.show({color:"red",message:Ee.message}),xe()}},[xe]),Fr=O.useCallback(async(ee,Oe)=>{t(Ee=>Ee&&{...Ee,cards:Ee.cards.map(Ue=>Ue.id===ee?{...Ue,stickers:Oe}:Ue)});try{await kk(ee,Oe)}catch(Ee){et.show({color:"red",message:Ee.message}),xe()}},[xe]),La=O.useCallback((ee,Oe,Ee)=>{Re&&t(Ue=>{if(!Ue)return Ue;const Fn=Ue.cards.map(Mt=>{if(Mt.id!==ee)return Mt;const wt=[...Mt.stickers||[],{emoji:Re,x:Oe,y:Ee}];return kk(ee,wt).catch(Wt=>{et.show({color:"red",message:Wt.message}),xe()}),{...Mt,stickers:wt}});return{...Ue,cards:Fn}})},[Re,xe]),wr=O.useCallback((ee,Oe)=>{t(Ee=>{if(!Ee)return Ee;const Ue=Ee.cards.map(Fn=>{if(Fn.id!==ee)return Fn;const Mt=(Fn.stickers||[]).filter((wt,Wt)=>Wt!==Oe);return kk(ee,Mt).catch(wt=>{et.show({color:"red",message:wt.message}),xe()}),{...Fn,stickers:Mt}});return{...Ee,cards:Ue}})},[xe]),kr=O.useCallback((ee,Oe,Ee,Ue)=>{t(Fn=>{if(!Fn)return Fn;const Mt=Fn.cards.map(wt=>{if(wt.id!==ee)return wt;const Wt=(wt.stickers||[]).map((ar,Ba)=>Ba===Oe?{...ar,x:Ee,y:Ue}:ar);return{...wt,stickers:Wt}});return{...Fn,cards:Mt}})},[]),dn=O.useCallback(ee=>{t(Oe=>{if(!Oe)return Oe;const Ee=Oe.cards.find(Ue=>Ue.id===ee);return Ee&&Fr(ee,Ee.stickers||[]),Oe})},[Fr]),ti=O.useCallback(ee=>{Ro.open({title:ee.title,size:"md",children:k.jsx(aCe,{card:ee})})},[]),sn=O.useCallback(async(ee,Oe)=>{t(Ee=>Ee&&{...Ee,cards:Ee.cards.map(Ue=>Ue.id===ee?{...Ue,locked:Oe}:Ue)});try{await vf(ee,{locked:Oe})}catch(Ee){et.show({color:"red",message:Ee.message}),xe()}},[xe]),_r=O.useCallback(async(ee,Oe)=>{t(Ee=>Ee&&{...Ee,columns:Ee.columns.map(Ue=>Ue.id===ee?{...Ue,wip_limit:Oe}:Ue)});try{await pf(ee,{wip_limit:Oe})}catch(Ee){et.show({color:"red",message:Ee.message}),xe()}},[xe]),Ia=O.useCallback(async(ee,Oe)=>{t(Ee=>Ee&&{...Ee,columns:Ee.columns.map(Ue=>Ue.id===ee?{...Ue,is_done:Oe}:Ue)});try{await pf(ee,{is_done:Oe}),xe()}catch(Ee){et.show({color:"red",message:Ee.message}),xe()}},[xe]),qr=O.useMemo(()=>({height:50}),[]),Hr=O.useMemo(()=>({width:We,breakpoint:"md",collapsed:{mobile:!Ve,desktop:!Ve}}),[We,Ve]),P0=O.useMemo(()=>({width:380,breakpoint:"md",collapsed:{mobile:!_,desktop:!_}}),[_]),rp=O.useMemo(()=>({main:{paddingInlineStart:0,paddingInlineEnd:0}}),[]);if(!n)return k.jsx(wn,{justify:"center",p:"xl",children:k.jsx(Wi,{})});const vl=a,Du=l?kn(l):null;return k.jsxs(Cre,{sensors:me,collisionDetection:a9e(c),onDragStart:jn,onDragOver:Jn,onDragEnd:On,children:[k.jsxs(mr,{header:qr,navbar:Hr,aside:P0,padding:0,styles:rp,children:[k.jsx(mr.Header,{children:k.jsxs(wn,{h:"100%",px:"md",justify:"space-between",children:[k.jsxs(wn,{gap:6,children:[k.jsx(Ht,{variant:Ve?"filled":"subtle",onClick:()=>He(ee=>!ee),"aria-label":"Toggle sidebar",children:k.jsx(Noe,{size:16})}),k.jsx(_S,{size:22}),k.jsx(_u,{order:4,children:"Kanban"}),k.jsx(Aa,{value:C,onChange:ee=>ee&&E(ee),variant:"pills",ml:"md",children:k.jsxs(Aa.List,{children:[k.jsx(Aa.Tab,{value:"board",leftSection:k.jsx(_S,{size:14}),children:"Tablero"}),k.jsx(Aa.Tab,{value:"dashboard",leftSection:k.jsx(doe,{size:14}),children:"Dashboard"}),k.jsx(Aa.Tab,{value:"calendar",leftSection:k.jsx(foe,{size:14}),children:"Calendario"})]})})]}),k.jsxs(wn,{gap:4,children:[k.jsx(Ht,{variant:"subtle",onClick:xe,"aria-label":"Refresh",children:k.jsx(Uoe,{size:16})}),k.jsx(Ht,{variant:_?"filled":"subtle",onClick:()=>S(ee=>!ee),"aria-label":"Toggle chat",children:k.jsx(zF,{size:16})}),e.user&&k.jsxs(Kn,{position:"bottom-end",shadow:"md",withArrow:!0,closeOnItemClick:!1,children:[k.jsx(Kn.Target,{children:k.jsx(Ht,{variant:"subtle","aria-label":"Usuario",children:k.jsx(ou,{size:26,radius:"xl",color:e.user.color||"blue",children:(e.user.display_name||e.user.username).slice(0,2).toUpperCase()})})}),k.jsxs(Kn.Dropdown,{children:[k.jsx(Kn.Label,{children:e.user.display_name||e.user.username}),k.jsxs(we,{p:"xs",children:[k.jsx(un,{size:"xs",c:"dimmed",mb:4,children:"Color del avatar"}),k.jsx(rW,{value:e.user.color||"",onChange:async ee=>{try{const Oe=await wM({color:ee});e.setUser(Oe)}catch(Oe){et.show({color:"red",message:Oe.message})}},options:lCe,onOpenCustom:()=>{var ee,Oe;_e((Oe=(ee=e.user)==null?void 0:ee.color)!=null&&Oe.startsWith("#")?e.user.color:"#888888"),De(!0)}})]}),k.jsx(Kn.Divider,{}),k.jsx(Kn.Item,{leftSection:k.jsx(Roe,{size:14}),color:"red",onClick:()=>e.logout(),children:"Cerrar sesion"})]})]})]})]})}),k.jsxs(mr.Navbar,{p:"xs",children:[k.jsx(we,{onMouseDown:Q,style:{position:"absolute",top:0,right:-3,width:6,height:"100%",cursor:"col-resize",zIndex:10},"aria-label":"Resize sidebar"}),k.jsxs($t,{gap:"xs",h:"100%",children:[k.jsx(un,{size:"xs",c:"dimmed",fw:600,tt:"uppercase",children:"Columnas parqueadas"}),k.jsx(we,{style:{flex:1,overflowY:"auto"},children:k.jsx(wS,{items:on,strategy:XB,children:k.jsxs($t,{gap:"xs",children:[Ke.length===0&&k.jsx(un,{size:"xs",c:"dimmed",children:'Vacio. Mueve columnas aqui con el icono "archivar" en su cabecera.'}),Ke.map(ee=>k.jsx(b$,{column:ee,cards:mt.get(ee.id)??[],now:b,collapsed:!0,onAddCard:bt,onRenameColumn:Je,onResizeColumn:nn,onMoveColumnLocation:Ln,onDeleteColumn:In,onSetWIPLimit:_r,onToggleDone:Ia,onEditCard:xn,onDeleteCard:Ki,onChangeCardColor:Br,onShowHistory:ti,onToggleCardLock:sn,onAssignCard:di,onSetCardDeadline:Lt,highlightCardId:oe,onSetRequester:_n,requesterOptions:L,onOpenCustomCardColor:(Oe,Ee)=>Be({cardId:Oe,color:Ee}),activeSticker:Re,onAddSticker:La,onRemoveSticker:wr,onMoveSticker:kr,onCommitSticker:dn,users:i,usersById:hn},ee.id))]})})}),k.jsxs(we,{style:{borderTop:"1px solid var(--mantine-color-dark-5)",paddingTop:8},children:[k.jsx(Bt,{variant:"subtle",color:"gray",size:"xs",fullWidth:!0,justify:"space-between",leftSection:k.jsx(Lh,{size:14}),rightSection:k.jsxs(wn,{gap:4,children:[k.jsx(ui,{size:"xs",variant:"light",color:A.length>0?"red":"gray",children:A.length}),j?k.jsx(jF,{size:12}):k.jsx(DF,{size:12})]}),onClick:()=>N(ee=>!ee),children:"Papelera"}),j&&k.jsxs($t,{gap:4,mt:4,style:{maxHeight:220,overflowY:"auto"},children:[A.length===0&&k.jsx(un,{size:"xs",c:"dimmed",px:"xs",children:"Vacia."}),A.map(ee=>k.jsx(ei,{p:6,withBorder:!0,radius:"sm",bg:"dark.7",children:k.jsxs(wn,{justify:"space-between",gap:4,wrap:"nowrap",children:[k.jsx(un,{size:"xs",truncate:!0,style:{flex:1},title:ee.title,children:ee.title}),k.jsx(Vi,{label:"Restaurar",withArrow:!0,children:k.jsx(Ht,{size:"xs",variant:"subtle",color:"green",onClick:()=>za(ee.id),children:k.jsx(ioe,{size:12})})}),k.jsx(Vi,{label:"Borrar permanentemente",withArrow:!0,children:k.jsx(Ht,{size:"xs",variant:"subtle",color:"red",onClick:()=>mo(ee.id),children:k.jsx(Qoe,{size:12})})})]})},ee.id))]})]})]})]}),k.jsx(mr.Aside,{children:k.jsx(Lhe,{onBoardChange:xe})}),k.jsx(mr.Main,{children:C==="dashboard"?k.jsx(we,{style:{height:"calc(100vh - 50px)",overflow:"auto"},children:k.jsx(tCe,{users:i})}):C==="calendar"?k.jsx(we,{style:{height:"calc(100vh - 50px)",overflow:"auto"},children:k.jsx(Bhe,{users:i,cards:n.cards,onJumpToCard:Wn})}):k.jsxs(we,{style:{height:"calc(100vh - 50px)",overflow:"hidden",display:"flex",flexDirection:"column"},children:[k.jsxs(wn,{gap:"xs",p:"xs",wrap:"wrap",align:"end",style:{borderBottom:"1px solid var(--mantine-color-dark-4)"},children:[k.jsx(il,{leftSection:k.jsx(Woe,{size:14}),placeholder:"Buscar (titulo, descripcion, solicitante, tag)",value:G,onChange:ee=>H(ee.currentTarget.value),rightSection:G?k.jsx(Ht,{size:"sm",variant:"subtle",color:"gray",onClick:()=>H(""),"aria-label":"Limpiar",children:k.jsx(rh,{size:14})}):null,style:{minWidth:280,flex:1},size:"xs"}),k.jsx(Zo,{placeholder:"Asignado",value:U,onChange:P,data:i.map(ee=>({value:ee.id,label:ee.display_name||ee.username})),clearable:!0,searchable:!0,size:"xs",style:{minWidth:160},disabled:V}),k.jsx(nl,{size:"xs",label:"Sin asignar",checked:V,onChange:ee=>{const Oe=ee.currentTarget.checked;W(Oe),Oe&&P(null)}}),k.jsx(nl,{size:"xs",label:"Con deadline",checked:le,onChange:ee=>ye(ee.currentTarget.checked)}),k.jsx(Zo,{placeholder:"Solicitante",value:z,onChange:F,data:L,clearable:!0,searchable:!0,size:"xs",style:{minWidth:160}}),k.jsx(_y,{placeholder:"Tags",value:Y,onChange:D,data:q,clearable:!0,searchable:!0,size:"xs",style:{minWidth:200}}),k.jsx(lu,{placeholder:"Desde",value:$,onChange:ee=>X(ee?new Date(ee):null),clearable:!0,size:"xs",style:{minWidth:130},valueFormat:"DD/MM/YY"}),k.jsx(lu,{placeholder:"Hasta",value:te,onChange:ee=>ae(ee?new Date(ee):null),clearable:!0,size:"xs",style:{minWidth:130},valueFormat:"DD/MM/YY"}),k.jsxs(wn,{gap:4,children:[k.jsx(Bt,{size:"xs",variant:"default",onClick:()=>{const ee=new Date;X(ee),ae(ee)},children:"Hoy"}),k.jsx(Bt,{size:"xs",variant:"default",onClick:()=>{const ee=new Date,Oe=new Date;Oe.setDate(Oe.getDate()-7),X(Oe),ae(ee)},children:"7d"}),k.jsx(Bt,{size:"xs",variant:"default",onClick:()=>{const ee=new Date,Oe=new Date;Oe.setDate(Oe.getDate()-30),X(Oe),ae(ee)},children:"30d"})]}),k.jsx(i9e,{opened:ke,onClose:()=>ie(!1),onSelect:ee=>pe(ee),target:k.jsx(Bt,{size:"xs",variant:Re?"filled":"default",color:Re?"yellow":void 0,leftSection:k.jsx(Loe,{size:14}),onClick:()=>{Re?ie(ee=>!ee):pe("😀")},children:Re?`Modo sticker: ${Re}`:"Stickers"})}),Re&&k.jsx(Bt,{size:"xs",variant:"subtle",color:"gray",leftSection:k.jsx(rh,{size:12}),onClick:()=>pe(null),children:"ESC"}),zn&&k.jsx(Bt,{size:"xs",variant:"subtle",color:"gray",leftSection:k.jsx(rh,{size:12}),onClick:()=>{H(""),P(null),W(!1),F(null),D([]),X(null),ae(null),ye(!1)},children:"Limpiar"})]}),k.jsx(wS,{items:An,strategy:Yre,children:k.jsxs(wn,{align:"stretch",wrap:"nowrap",gap:"md",p:"md",style:{flex:1,overflowX:"auto",overflowY:"hidden"},children:[Ze.map(ee=>k.jsx(b$,{column:ee,cards:mt.get(ee.id)??[],now:b,onAddCard:bt,onRenameColumn:Je,onResizeColumn:nn,onMoveColumnLocation:Ln,onDeleteColumn:In,onSetWIPLimit:_r,onToggleDone:Ia,onEditCard:xn,onDeleteCard:Ki,onChangeCardColor:Br,onShowHistory:ti,onToggleCardLock:sn,onAssignCard:di,onSetCardDeadline:Lt,highlightCardId:oe,onSetRequester:_n,requesterOptions:L,activeSticker:Re,onAddSticker:La,onRemoveSticker:wr,onMoveSticker:kr,onCommitSticker:dn,users:i,usersById:hn},ee.id)),k.jsx(we,{style:{minWidth:280,maxWidth:320},children:d?k.jsxs($t,{gap:4,children:[k.jsx(il,{size:"xs",placeholder:"Nombre de columna...",value:v,onChange:ee=>y(ee.currentTarget.value),autoFocus:!0,onKeyDown:ee=>{ee.key==="Enter"&&Qe(),ee.key==="Escape"&&(p(!1),y(""))}}),k.jsxs(wn,{gap:4,children:[k.jsx(Bt,{size:"xs",onClick:Qe,children:"Anadir"}),k.jsx(Ht,{variant:"subtle",color:"gray",onClick:()=>p(!1),children:k.jsx(rh,{size:14})})]})]}):k.jsx(Bt,{variant:"light",color:"gray",leftSection:k.jsx(zh,{size:14}),onClick:()=>p(!0),children:"Anadir columna"})})]})})]})})]}),k.jsx(Ure,{children:vl?k.jsx(aW,{card:vl,now:b,onDelete:()=>{},onEdit:()=>{},onChangeColor:()=>{},onShowHistory:()=>{},onToggleLock:()=>{},onAssign:()=>{},users:i,assignee:vl.assignee_id?hn.get(vl.assignee_id):void 0,isOverlay:!0}):Du?k.jsx(we,{style:{width:Du.location==="sidebar"?220:Du.width,padding:8,background:tW(""),border:`1px solid ${dA("")}`,borderRadius:8,opacity:.9},children:k.jsx(un,{fw:600,size:"sm",children:Du.name})}):null}),k.jsx(e6,{opened:Ce,onClose:()=>De(!1),value:be,onAccept:async ee=>{_e(ee);try{const Oe=await wM({color:ee});e.setUser(Oe)}catch(Oe){et.show({color:"red",message:Oe.message})}}}),k.jsx(e6,{opened:!!Me,onClose:()=>Be(null),value:(Me==null?void 0:Me.color)||"#888888",onAccept:ee=>{Me&&Br(Me.cardId,ee)}})]})}function s9e(){const e=AC(),[n,t]=O.useState("login"),[i,r]=O.useState(""),[a,o]=O.useState(""),[l,f]=O.useState(""),[c,h]=O.useState(!1),[d,p]=O.useState(null),v=async y=>{y.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(b){p(b.message)}finally{h(!1)}};return k.jsx(_c,{style:{minHeight:"100vh"},p:"md",children:k.jsx(ei,{p:"xl",withBorder:!0,radius:"md",shadow:"md",style:{width:360,maxWidth:"100%"},children:k.jsx("form",{onSubmit:v,children:k.jsxs($t,{gap:"md",children:[k.jsxs($t,{gap:4,align:"center",children:[k.jsx(_S,{size:36}),k.jsx(_u,{order:3,children:"Kanban"}),k.jsx(un,{size:"sm",c:"dimmed",children:n==="login"?"Inicia sesion":"Crea una cuenta"})]}),k.jsx(il,{label:"Usuario",value:i,onChange:y=>r(y.currentTarget.value),required:!0,autoFocus:!0,autoComplete:"username"}),n==="register"&&k.jsx(il,{label:"Nombre (opcional)",value:l,onChange:y=>f(y.currentTarget.value),autoComplete:"name"}),k.jsx(Ay,{label:"Contrasena",value:a,onChange:y=>o(y.currentTarget.value),required:!0,autoComplete:n==="login"?"current-password":"new-password"}),d&&k.jsx(un,{size:"sm",c:"red",children:d}),k.jsx(Bt,{type:"submit",loading:c,fullWidth:!0,children:n==="login"?"Entrar":"Registrar"}),k.jsxs(un,{size:"xs",c:"dimmed",ta:"center",children:[n==="login"?"No tienes cuenta?":"Ya tienes cuenta?"," ",k.jsx(z6,{component:"button",type:"button",size:"xs",onClick:()=>{p(null),t(n==="login"?"register":"login")},children:n==="login"?"Registrate":"Inicia sesion"})]})]})})})})}function l9e(){const{user:e,loading:n}=AC();return n?k.jsx(_c,{style:{minHeight:"100vh"},children:k.jsx(Wi,{})}):e?k.jsx(o9e,{}):k.jsx(s9e,{})}const u9e={primaryColor:"blue",fontFamily:"system-ui, -apple-system, sans-serif"};Wte.createRoot(document.getElementById("root")).render(k.jsx(sz,{theme:u9e,defaultColorScheme:"dark",children:k.jsxs(pte,{children:[k.jsx(fo,{position:"top-right"}),k.jsx(die,{children:k.jsx(l9e,{})})]})})); diff --git a/backend/dist/index.html b/backend/dist/index.html index 66e3a7d..179789c 100644 --- a/backend/dist/index.html +++ b/backend/dist/index.html @@ -4,7 +4,7 @@ Kanban - + diff --git a/backend/flags.go b/backend/flags.go new file mode 100644 index 0000000..0a089bf --- /dev/null +++ b/backend/flags.go @@ -0,0 +1,55 @@ +package main + +import ( + "encoding/json" + "net/http" + "os" + + "fn-registry/functions/infra" +) + +type FeatureFlag struct { + Enabled bool `json:"enabled"` + Issue string `json:"issue,omitempty"` + Description string `json:"description"` + Added string `json:"added,omitempty"` + EnabledAt string `json:"enabled_at,omitempty"` +} + +type FeatureFlags struct { + Flags map[string]FeatureFlag `json:"flags"` +} + +func (f FeatureFlags) Enabled(name string) bool { + flag, ok := f.Flags[name] + return ok && flag.Enabled +} + +func loadFeatureFlags(path string) (FeatureFlags, error) { + b, err := os.ReadFile(path) + if err != nil { + if os.IsNotExist(err) { + return FeatureFlags{Flags: map[string]FeatureFlag{}}, nil + } + return FeatureFlags{}, err + } + var f FeatureFlags + if err := json.Unmarshal(b, &f); err != nil { + return FeatureFlags{}, err + } + if f.Flags == nil { + f.Flags = map[string]FeatureFlag{} + } + return f, nil +} + +// GET /api/flags → { "": true/false, ... } +func handleListFlags(flags *FeatureFlags) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + out := make(map[string]bool, len(flags.Flags)) + for name, fl := range flags.Flags { + out[name] = fl.Enabled + } + infra.HTTPJSONResponse(w, http.StatusOK, out) + } +} diff --git a/backend/handlers.go b/backend/handlers.go index 5b467c1..e4c2e84 100644 --- a/backend/handlers.go +++ b/backend/handlers.go @@ -280,6 +280,91 @@ func handleMoveCard(db *DB) http.HandlerFunc { } } +// GET /api/cards/{id}/messages → [CardMessage, ...] +func handleListCardMessages(db *DB) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + id := r.PathValue("id") + msgs, err := db.ListCardMessages(id) + if err != nil { + serverError(w, err) + return + } + infra.HTTPJSONResponse(w, http.StatusOK, msgs) + } +} + +// POST /api/cards/{id}/messages { body } +func handleCreateCardMessage(db *DB) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + id := r.PathValue("id") + var body struct { + Body string `json:"body"` + } + if err := infra.HTTPParseBody(r, &body, maxBodyBytes); err != nil { + badRequest(w, err.Error()) + return + } + if strings.TrimSpace(body.Body) == "" { + badRequest(w, "body required") + return + } + actor, _ := infra.UserIDFromContext(r.Context(), userCtxKey) + if actor == "" { + infra.HTTPErrorResponse(w, infra.HTTPError{Status: http.StatusUnauthorized, Code: "unauthorized", Message: "session required"}) + return + } + m, err := db.CreateCardMessage(id, actor, body.Body) + if err != nil { + if strings.Contains(err.Error(), "not found") { + notFound(w, err.Error()) + return + } + serverError(w, err) + return + } + infra.HTTPJSONResponse(w, http.StatusCreated, m) + } +} + +// DELETE /api/cards/{cid}/messages/{mid} +func handleDeleteCardMessage(db *DB) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + mid := r.PathValue("mid") + actor, _ := infra.UserIDFromContext(r.Context(), userCtxKey) + if actor == "" { + infra.HTTPErrorResponse(w, infra.HTTPError{Status: http.StatusUnauthorized, Code: "unauthorized", Message: "session required"}) + return + } + if err := db.DeleteCardMessage(mid, actor); err != nil { + if strings.Contains(err.Error(), "not found") { + notFound(w, err.Error()) + return + } + serverError(w, err) + return + } + w.WriteHeader(http.StatusNoContent) + } +} + +// POST /api/cards/{id}/duplicate +func handleDuplicateCard(db *DB) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + id := r.PathValue("id") + actor, _ := infra.UserIDFromContext(r.Context(), userCtxKey) + c, err := db.DuplicateCard(id, actor) + if err != nil { + if strings.Contains(err.Error(), "not found") { + notFound(w, "card not found") + return + } + serverError(w, err) + return + } + infra.HTTPJSONResponse(w, http.StatusCreated, c) + } +} + // GET /api/cards/{id}/history → [HistoryEntry, ...] func handleCardHistory(db *DB) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { @@ -330,9 +415,10 @@ func handlePurgeCard(db *DB) http.HandlerFunc { } } -func apiRoutes(db *DB, chatWorkdir string, logger *ChatLogger, internalToken string) []infra.Route { +func apiRoutes(db *DB, chatWorkdir string, logger *ChatLogger, internalToken string, flags *FeatureFlags) []infra.Route { return []infra.Route{ - {Method: "POST", Path: "/api/auth/register", Handler: handleRegister(db)}, + {Method: "GET", Path: "/api/flags", Handler: handleListFlags(flags)}, + {Method: "POST", Path: "/api/auth/register", Handler: handleRegister(db, flags)}, {Method: "POST", Path: "/api/auth/login", Handler: handleLogin(db)}, {Method: "POST", Path: "/api/auth/logout", Handler: handleLogout(db)}, {Method: "GET", Path: "/api/me", Handler: handleMe(db)}, @@ -348,6 +434,10 @@ func apiRoutes(db *DB, chatWorkdir string, logger *ChatLogger, internalToken str {Method: "PUT", Path: "/api/cards/{id}/stickers", Handler: handleUpdateCardStickers(db)}, {Method: "DELETE", Path: "/api/cards/{id}", Handler: handleDeleteCard(db)}, {Method: "POST", Path: "/api/cards/{id}/move", Handler: handleMoveCard(db)}, + {Method: "POST", Path: "/api/cards/{id}/duplicate", Handler: handleDuplicateCard(db)}, + {Method: "GET", Path: "/api/cards/{id}/messages", Handler: handleListCardMessages(db)}, + {Method: "POST", Path: "/api/cards/{id}/messages", Handler: handleCreateCardMessage(db)}, + {Method: "DELETE", Path: "/api/cards/{id}/messages/{mid}", Handler: handleDeleteCardMessage(db)}, {Method: "GET", Path: "/api/cards/{id}/history", Handler: handleCardHistory(db)}, {Method: "GET", Path: "/api/trash", Handler: handleListTrash(db)}, {Method: "POST", Path: "/api/cards/{id}/restore", Handler: handleRestoreCard(db)}, diff --git a/backend/main.go b/backend/main.go index 8dcde06..95b3f7c 100644 --- a/backend/main.go +++ b/backend/main.go @@ -35,8 +35,17 @@ func main() { port := flags.Int("port", 8095, "HTTP port") dbPath := flags.String("db", "operations.db", "SQLite database path") initialAdmin := flags.String("initial-admin", os.Getenv("KANBAN_INITIAL_ADMIN"), "Bootstrap admin in user:pass form (only if no users yet)") + flagsPath := flags.String("flags", "dev/feature_flags.json", "Feature flags JSON path (missing file → all disabled)") flags.Parse(os.Args[1:]) + featureFlags, err := loadFeatureFlags(*flagsPath) + if err != nil { + log.Fatalf("load feature flags: %v", err) + } + for name, fl := range featureFlags.Flags { + log.Printf("feature flag %q enabled=%v", name, fl.Enabled) + } + db, err := openDB(*dbPath) if err != nil { log.Fatalf("open db: %v", err) @@ -54,7 +63,7 @@ func main() { wd := chatWorkdir(*dbPath) logger := newChatLogger(filepath.Join(wd, "chat.log")) log.Printf("chat tool log: %s", logger.path) - mux := infra.HTTPRouter(apiRoutes(db, wd, logger, internalToken)) + mux := infra.HTTPRouter(apiRoutes(db, wd, logger, internalToken, &featureFlags)) feHandler := frontendHandler() if feHandler != nil { @@ -67,7 +76,7 @@ func main() { authMW := infra.HTTPSessionCookieMiddleware(infra.SessionCookieConfig{ DB: db.conn, CookieName: cookieName, - SkipPaths: []string{"/api/auth/", "/api/tool/", "/health", "/assets/", "/index.html"}, + SkipPaths: []string{"/api/auth/", "/api/tool/", "/api/flags", "/health", "/assets/", "/index.html"}, UserCtxKey: userCtxKey, }) diff --git a/backend/migrations/010_card_messages.sql b/backend/migrations/010_card_messages.sql new file mode 100644 index 0000000..d9f0929 --- /dev/null +++ b/backend/migrations/010_card_messages.sql @@ -0,0 +1,14 @@ +-- Per-card chat messages (human-to-human comments). +-- Distinct from card_events (which records system events like title_changed) +-- and from /api/chat (which is the board-level LLM chat). + +CREATE TABLE IF NOT EXISTS card_messages ( + id TEXT PRIMARY KEY, + card_id TEXT NOT NULL, + author_id TEXT, + body TEXT NOT NULL, + created_at TEXT NOT NULL, + FOREIGN KEY (card_id) REFERENCES cards(id) ON DELETE CASCADE +); + +CREATE INDEX IF NOT EXISTS idx_card_messages_card ON card_messages(card_id, created_at); diff --git a/dev/feature_flags.json b/dev/feature_flags.json new file mode 100644 index 0000000..cb1acfc --- /dev/null +++ b/dev/feature_flags.json @@ -0,0 +1,11 @@ +{ + "flags": { + "registration-enabled": { + "enabled": false, + "issue": null, + "description": "Allows new users to register via POST /api/auth/register and the LoginPage register toggle.", + "added": "2026-05-12", + "enabled_at": null + } + } +} diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 9831726..6ee6419 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -68,6 +68,7 @@ import { useCallback, useEffect, useMemo, useRef, useState } from "react"; import * as api from "./api"; import { useAuth } from "./auth"; import { CardForm } from "./components/CardForm"; +import { CardEditPanel } from "./components/CardEditPanel"; import { ChatPanel } from "./components/ChatPanel"; import { CalendarView } from "./components/CalendarView"; import { Dashboard } from "./components/Dashboard"; @@ -238,6 +239,13 @@ export function App() { return () => clearInterval(t); }, []); + useEffect(() => { + const t = setInterval(() => { + reload(); + }, 30000); + return () => clearInterval(t); + }, [reload]); + useEffect(() => { if (!activeSticker) return; const onKey = (e: KeyboardEvent) => { @@ -566,20 +574,14 @@ export function App() { const openEditCard = useCallback((card: Card) => { const id = modals.open({ title: "Editar tarjeta", - size: "md", + size: "85%", children: ( - modals.close(id)} onSubmit={async (v) => { try { @@ -601,7 +603,17 @@ export function App() { /> ), }); - }, [reload, users, requesterOptions, tagOptions]); + }, [reload, users, auth.user, requesterOptions, tagOptions]); + + const handleDuplicateCard = useCallback(async (cardId: string) => { + try { + const dup = await api.duplicateCard(cardId); + await reload(); + notifications.show({ color: "teal", message: `Duplicada: ${dup.title}` }); + } catch (e) { + notifications.show({ color: "red", message: (e as Error).message }); + } + }, [reload]); const handleSetRequester = useCallback(async (id: string, requester: string) => { setBoard((prev) => { @@ -986,6 +998,7 @@ export function App() { onToggleDone={handleToggleDone} onEditCard={openEditCard} onDeleteCard={handleDeleteCard} + onDuplicateCard={handleDuplicateCard} onChangeCardColor={handleChangeCardColor} onShowHistory={handleShowHistory} onToggleCardLock={handleToggleCardLock} @@ -1253,6 +1266,7 @@ export function App() { onToggleDone={handleToggleDone} onEditCard={openEditCard} onDeleteCard={handleDeleteCard} + onDuplicateCard={handleDuplicateCard} onChangeCardColor={handleChangeCardColor} onShowHistory={handleShowHistory} onToggleCardLock={handleToggleCardLock} diff --git a/frontend/src/api.ts b/frontend/src/api.ts index 71ad66e..c66b22a 100644 --- a/frontend/src/api.ts +++ b/frontend/src/api.ts @@ -2,6 +2,7 @@ import type { Board, Card, CardHistoryResponse, + CardMessage, Column, Metrics, MetricsFilter, @@ -22,6 +23,10 @@ export function getBoard(): Promise { return fetchJSON("/board"); } +export function getFlags(): Promise> { + return fetchJSON("/flags"); +} + export function createColumn(name: string): Promise { return fetchJSON("/columns", { method: "POST", body: JSON.stringify({ name }) }); } @@ -112,6 +117,25 @@ export function cardHistory(id: string): Promise { return fetchJSON(`/cards/${id}/history`); } +export function listCardMessages(id: string): Promise { + return fetchJSON(`/cards/${id}/messages`); +} + +export function createCardMessage(id: string, body: string): Promise { + return fetchJSON(`/cards/${id}/messages`, { + method: "POST", + body: JSON.stringify({ body }), + }); +} + +export function deleteCardMessage(cardId: string, messageId: string): Promise { + return fetchJSON(`/cards/${cardId}/messages/${messageId}`, { method: "DELETE" }); +} + +export function duplicateCard(id: string): Promise { + return fetchJSON(`/cards/${id}/duplicate`, { method: "POST" }); +} + export interface ChatMessage { role: "user" | "assistant"; content: string; diff --git a/frontend/src/components/CardChatPanel.tsx b/frontend/src/components/CardChatPanel.tsx new file mode 100644 index 0000000..45b7360 --- /dev/null +++ b/frontend/src/components/CardChatPanel.tsx @@ -0,0 +1,179 @@ +import { + ActionIcon, + Avatar, + Box, + Group, + Loader, + Paper, + ScrollArea, + Stack, + Text, + Textarea, + Tooltip, +} from "@mantine/core"; +import { IconSend, IconTrash } from "@tabler/icons-react"; +import { notifications } from "@mantine/notifications"; +import { KeyboardEvent, useCallback, useEffect, useRef, useState } from "react"; +import * as api from "../api"; +import type { CardMessage, User } from "../types"; +import { tagColor } from "./colors"; +import { formatDateTimeShort } from "./format"; + +interface Props { + cardId: string; + users: User[]; + currentUserId?: string; + onMessagesChange?: (messages: CardMessage[]) => void; +} + +export function CardChatPanel({ cardId, users, currentUserId, onMessagesChange }: Props) { + const [messages, setMessages] = useState([]); + const [loading, setLoading] = useState(true); + const [body, setBody] = useState(""); + const [sending, setSending] = useState(false); + const viewportRef = useRef(null); + + const usersById = new Map(users.map((u) => [u.id, u])); + + const reload = useCallback(async () => { + try { + const ms = await api.listCardMessages(cardId); + setMessages(ms); + onMessagesChange?.(ms); + } catch (e) { + notifications.show({ color: "red", message: (e as Error).message }); + } finally { + setLoading(false); + } + }, [cardId, onMessagesChange]); + + useEffect(() => { + reload(); + }, [reload]); + + useEffect(() => { + if (viewportRef.current) { + viewportRef.current.scrollTo({ top: viewportRef.current.scrollHeight, behavior: "smooth" }); + } + }, [messages.length]); + + const send = async () => { + const text = body.trim(); + if (!text || sending) return; + setSending(true); + try { + const m = await api.createCardMessage(cardId, text); + const next = [...messages, m]; + setMessages(next); + onMessagesChange?.(next); + setBody(""); + } catch (e) { + notifications.show({ color: "red", message: (e as Error).message }); + } finally { + setSending(false); + } + }; + + const remove = async (mid: string) => { + try { + await api.deleteCardMessage(cardId, mid); + const next = messages.filter((m) => m.id !== mid); + setMessages(next); + onMessagesChange?.(next); + } catch (e) { + notifications.show({ color: "red", message: (e as Error).message }); + } + }; + + const onKeyDown = (e: KeyboardEvent) => { + if (e.key === "Enter" && !e.shiftKey) { + e.preventDefault(); + send(); + } + }; + + return ( + + + {loading ? ( + + ) : messages.length === 0 ? ( + + Sin mensajes aun. Escribe el primero. + + ) : ( + + {messages.map((m) => { + const author = m.author_id ? usersById.get(m.author_id) : null; + const isMe = m.author_id && m.author_id === currentUserId; + const label = author ? author.display_name || author.username : "Anonimo"; + return ( + + + + {label.slice(0, 2).toUpperCase()} + + + + + {label} + {formatDateTimeShort(m.created_at)} + + {isMe && ( + + remove(m.id)}> + + + + )} + + + {m.body} + + + + + ); + })} + + )} + + +