From 5adb4752b4dc73f3fc4d2657c9fbde55f2fba2bc Mon Sep 17 00:00:00 2001 From: WX Date: Wed, 23 Aug 2023 23:48:33 +0200 Subject: [PATCH 1/2] ESX Support, more config options, Czech translation --- client/main.lua | 97 ++- config.lua | 8 + locales/cs.json | 3 + server/framework/esx.lua | 4 + server/main.lua | 22 +- web/build/assets/index-0ca97941.js | 258 +++++++ web/build/assets/index-b1ede328.css | 1 + web/build/assets/lspd-ac896235.png | Bin 0 -> 51110 bytes web/build/index.html | 18 + web/build/vite.svg | 1 + web/pnpm-lock.yaml | 1071 ++++++++++++++------------- 11 files changed, 937 insertions(+), 546 deletions(-) create mode 100644 locales/cs.json create mode 100644 server/framework/esx.lua create mode 100644 web/build/assets/index-0ca97941.js create mode 100644 web/build/assets/index-b1ede328.css create mode 100644 web/build/assets/lspd-ac896235.png create mode 100644 web/build/index.html create mode 100644 web/build/vite.svg diff --git a/client/main.lua b/client/main.lua index 9fbb0e6..18ef4f7 100644 --- a/client/main.lua +++ b/client/main.lua @@ -1,4 +1,10 @@ -local QBCore = exports['qb-core']:GetCoreObject() +local framework = string.lower(Config.Framework) + +if framework == 'qb' then + local QBCore = exports['qb-core']:GetCoreObject() +else + ESX = exports["es_extended"]:getSharedObject() +end local obj = nil local firstTimeOpening = true @@ -17,14 +23,11 @@ local function openMdt() obj = nil end - local object = lib.requestModel(`prop_cs_tablet`) - - obj = CreateObject(object, GetEntityCoords(cache.ped), 1, 1, 1) - AttachEntityToEntity(obj, cache.ped, GetPedBoneIndex(cache.ped, 28422), 0.0, 0.0, 0.03, 0.0, 0.0, 0.0, 1, 1, 0, 1, 0, 1) + -- local object = RequestModel(`prop_cs_tablet`) + obj = CreateObject(`prop_cs_tablet`, GetEntityCoords(PlayerPedId()), 1, 1, 1) + AttachEntityToEntity(obj, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 28422), 0.0, 0.0, 0.03, 0.0, 0.0, 0.0, 1, 1, 0, 1, 0, 1) - - lib.requestAnimDict('amb@world_human_seat_wall_tablet@female@base') - TaskPlayAnim(cache.ped, "amb@world_human_seat_wall_tablet@female@base", "generic_radio_enter", 8.0, 2.0, -1, 50, 2.0, 0, 0, 0) + TaskPlayAnim(PlayerPedId(), "amb@code_human_in_bus_passenger_idles@female@tablet@idle_a", "idle_a", 2.0, 1.0, 2000, 16,0,false,false,false) SetNuiFocus(true, true) SendNUIMessage({ @@ -41,38 +44,70 @@ RegisterNetEvent('bub_mdt:client:openMDT', function() openMdt() end) -RegisterNetEvent('QBCore:Client:OnPlayerUnload', function() - local player = QBCore.Functions.GetPlayerData() +if framework == 'qb' then + RegisterNetEvent('QBCore:Client:OnPlayerUnload', function() + local player = QBCore.Functions.GetPlayerData() - if player.job.name == 'police' then - TriggerServerEvent('bub-mdt:server:removeActiveOfficer') - end -end) + if Config.Jobs[player.job.name] then + TriggerServerEvent('bub-mdt:server:removeActiveOfficer') + end + end) -RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function() - local player = QBCore.Functions.GetPlayerData() + RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function() + local player = QBCore.Functions.GetPlayerData() - if player.job.name == 'police' then - local uiLocales = {} - local locales = lib.getLocales() + if Config.Jobs[player.job.name] then + local uiLocales = {} + local locales = lib.getLocales() - for k, v in pairs(locales) do - if k:find('^ui_') then - uiLocales[k] = v + for k, v in pairs(locales) do + if k:find('^ui_') then + uiLocales[k] = v + end end + + local personalInformation = lib.callback.await('bub-mdt:server:getPersonalInformation', false) + + SendNUIMessage({ action = 'init', data = { locale = uiLocales, personalInformation = personalInformation }}) + TriggerServerEvent('bub-mdt:server:addActiveOfficer') + Wait(500) + fetchActiveOfficers() + end + end) +else + AddEventHandler("esx:onPlayerLogout", function() + local player = ESX.GetPlayerData() + if Config.Jobs[player.job.name] then + TriggerServerEvent('bub-mdt:server:removeActiveOfficer') end + end) + AddEventHandler("esx:playerLoaded", function(playerData, isNew, skin) + local player = playerData + + if Config.Jobs[player.job.name] then + local uiLocales = {} + local locales = lib.getLocales() + + for k, v in pairs(locales) do + if k:find('^ui_') then + uiLocales[k] = v + end + end - local personalInformation = lib.callback.await('bub-mdt:server:getPersonalInformation', false) + local personalInformation = lib.callback.await('bub-mdt:server:getPersonalInformation', false) - SendNUIMessage({ action = 'init', data = { locale = uiLocales, personalInformation = personalInformation }}) - TriggerServerEvent('bub-mdt:server:addActiveOfficer') - Wait(500) - fetchActiveOfficers() - end -end) + SendNUIMessage({ action = 'init', data = { locale = uiLocales, personalInformation = personalInformation }}) + TriggerServerEvent('bub-mdt:server:addActiveOfficer') + Wait(500) + fetchActiveOfficers() + end + end) +end RegisterCommand('restart', function() - TriggerEvent('QBCore:Client:OnPlayerLoaded') + if framework == 'qb' then + TriggerEvent('QBCore:Client:OnPlayerLoaded') + end if obj ~= nil then DeleteEntity(obj) @@ -84,4 +119,6 @@ end, false) RegisterNUICallback('exit', function(_, cb) cb(1) SetNuiFocus(false, false) + DeleteEntity(obj) + ClearPedTasks(PlayerPedId()) end) \ No newline at end of file diff --git a/config.lua b/config.lua index e69de29..bf59f45 100644 --- a/config.lua +++ b/config.lua @@ -0,0 +1,8 @@ +Config = {} + +Config.Framework = 'esx' -- [esx/qb] Set your desired framework +Config.Jobs = { -- Jobs that have access to mdt + ['police'] = true, + ['sheriff'] = true, + ['trooper'] = true, +} \ No newline at end of file diff --git a/locales/cs.json b/locales/cs.json new file mode 100644 index 0000000..788e9b3 --- /dev/null +++ b/locales/cs.json @@ -0,0 +1,3 @@ +{ + "ui_logout": "Odhlásit se" +} \ No newline at end of file diff --git a/server/framework/esx.lua b/server/framework/esx.lua new file mode 100644 index 0000000..4c01e84 --- /dev/null +++ b/server/framework/esx.lua @@ -0,0 +1,4 @@ +local resourceName = 'es_extended' + +if not GetResourceState(resourceName):find('start') then return end + diff --git a/server/main.lua b/server/main.lua index 39922d5..99f472c 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1,4 +1,10 @@ -local QBCore = exports['qb-core']:GetCoreObject() +local framework = string.lower(Config.Framework) + +if framework == 'qb' then + local QBCore = exports['qb-core']:GetCoreObject() +else + ESX = exports["es_extended"]:getSharedObject() +end local officersCache = {} local activeOfficersCache = {} @@ -66,7 +72,12 @@ end) RegisterNetEvent('bub-mdt:server:removeActiveOfficer', function() local src = source - local Player = QBCore.Functions.GetPlayer(src) + local Player = nil + if framework == 'qb' then + Player = QBCore.Functions.GetPlayer(src) + else + Player = ESX.GetPlayerFromId(src) + end if not Player then return end local CID = Player.PlayerData.citizenid @@ -76,7 +87,12 @@ end) RegisterNetEvent('bub-mdt:server:addActiveOfficer', function() local src = source - local Player = QBCore.Functions.GetPlayer(src) + local Player = nil + if framework == 'qb' then + Player = QBCore.Functions.GetPlayer(src) + else + Player = ESX.GetPlayerFromId(src) + end if not Player then return end local CID = Player.PlayerData.citizenid diff --git a/web/build/assets/index-0ca97941.js b/web/build/assets/index-0ca97941.js new file mode 100644 index 0000000..c637ff4 --- /dev/null +++ b/web/build/assets/index-0ca97941.js @@ -0,0 +1,258 @@ +function vV(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var fx=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function px(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ef={},yV={get exports(){return ef},set exports(e){ef=e}},e0={},v={},_V={get exports(){return v},set exports(e){v=e}},ot={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Hf=Symbol.for("react.element"),wV=Symbol.for("react.portal"),bV=Symbol.for("react.fragment"),SV=Symbol.for("react.strict_mode"),xV=Symbol.for("react.profiler"),kV=Symbol.for("react.provider"),PV=Symbol.for("react.context"),CV=Symbol.for("react.forward_ref"),OV=Symbol.for("react.suspense"),EV=Symbol.for("react.memo"),$V=Symbol.for("react.lazy"),Q2=Symbol.iterator;function MV(e){return e===null||typeof e!="object"?null:(e=Q2&&e[Q2]||e["@@iterator"],typeof e=="function"?e:null)}var WN={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},UN=Object.assign,ZN={};function _u(e,t,n){this.props=e,this.context=t,this.refs=ZN,this.updater=n||WN}_u.prototype.isReactComponent={};_u.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};_u.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function KN(){}KN.prototype=_u.prototype;function hx(e,t,n){this.props=e,this.context=t,this.refs=ZN,this.updater=n||WN}var mx=hx.prototype=new KN;mx.constructor=hx;UN(mx,_u.prototype);mx.isPureReactComponent=!0;var eC=Array.isArray,GN=Object.prototype.hasOwnProperty,gx={current:null},qN={key:!0,ref:!0,__self:!0,__source:!0};function YN(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)GN.call(t,r)&&!qN.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1"u")return rH;var t=oH(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},sH=tR(),aH=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),` + .`.concat(VV,` { + overflow: hidden `).concat(r,`; + padding-right: `).concat(a,"px ").concat(r,`; + } + body { + overflow: hidden `).concat(r,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` + padding-left: `.concat(o,`px; + padding-top: `).concat(i,`px; + padding-right: `).concat(s,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(a,"px ").concat(r,`; + `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),` + } + + .`).concat(Hh,` { + right: `).concat(a,"px ").concat(r,`; + } + + .`).concat(Wh,` { + margin-right: `).concat(a,"px ").concat(r,`; + } + + .`).concat(Hh," .").concat(Hh,` { + right: 0 `).concat(r,`; + } + + .`).concat(Wh," .").concat(Wh,` { + margin-right: 0 `).concat(r,`; + } + + body { + `).concat(HV,": ").concat(a,`px; + } +`)},lH=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=v.useMemo(function(){return iH(o)},[o]);return v.createElement(sH,{styles:aH(i,!t,o,n?"":"!important")})},Kw=!1;if(typeof window<"u")try{var zp=Object.defineProperty({},"passive",{get:function(){return Kw=!0,!0}});window.addEventListener("test",zp,zp),window.removeEventListener("test",zp,zp)}catch{Kw=!1}var oc=Kw?{passive:!1}:!1,cH=function(e){return e.tagName==="TEXTAREA"},nR=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!cH(e)&&n[t]==="visible")},uH=function(e){return nR(e,"overflowY")},dH=function(e){return nR(e,"overflowX")},rC=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=rR(e,n);if(r){var o=oR(e,n),i=o[1],s=o[2];if(i>s)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},fH=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},pH=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},rR=function(e,t){return e==="v"?uH(t):dH(t)},oR=function(e,t){return e==="v"?fH(t):pH(t)},hH=function(e,t){return e==="h"&&t==="rtl"?-1:1},mH=function(e,t,n,r,o){var i=hH(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,c=t.contains(a),u=!1,f=s>0,p=0,h=0;do{var g=oR(e,a),y=g[0],_=g[1],k=g[2],b=_-k-i*y;(y||b)&&rR(e,a)&&(p+=b,h+=y),a=a.parentNode}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(f&&(o&&p===0||!o&&s>p)||!f&&(o&&h===0||!o&&-s>h))&&(u=!0),u},Ap=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},oC=function(e){return[e.deltaX,e.deltaY]},iC=function(e){return e&&"current"in e?e.current:e},gH=function(e,t){return e[0]===t[0]&&e[1]===t[1]},vH=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},yH=0,ic=[];function _H(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),o=v.useState(yH++)[0],i=v.useState(function(){return tR()})[0],s=v.useRef(e);v.useEffect(function(){s.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var _=FV([e.lockRef.current],(e.shards||[]).map(iC),!0).filter(Boolean);return _.forEach(function(k){return k.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),_.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=v.useCallback(function(_,k){if("touches"in _&&_.touches.length===2)return!s.current.allowPinchZoom;var b=Ap(_),S=n.current,P="deltaX"in _?_.deltaX:S[0]-b[0],E="deltaY"in _?_.deltaY:S[1]-b[1],$,I=_.target,N=Math.abs(P)>Math.abs(E)?"h":"v";if("touches"in _&&N==="h"&&I.type==="range")return!1;var R=rC(N,I);if(!R)return!0;if(R?$=N:($=N==="v"?"h":"v",R=rC(N,I)),!R)return!1;if(!r.current&&"changedTouches"in _&&(P||E)&&(r.current=$),!$)return!0;var F=r.current||$;return mH(F,k,_,F==="h"?P:E,!0)},[]),c=v.useCallback(function(_){var k=_;if(!(!ic.length||ic[ic.length-1]!==i)){var b="deltaY"in k?oC(k):Ap(k),S=t.current.filter(function($){return $.name===k.type&&$.target===k.target&&gH($.delta,b)})[0];if(S&&S.should){k.cancelable&&k.preventDefault();return}if(!S){var P=(s.current.shards||[]).map(iC).filter(Boolean).filter(function($){return $.contains(k.target)}),E=P.length>0?a(k,P[0]):!s.current.noIsolation;E&&k.cancelable&&k.preventDefault()}}},[]),u=v.useCallback(function(_,k,b,S){var P={name:_,delta:k,target:b,should:S};t.current.push(P),setTimeout(function(){t.current=t.current.filter(function(E){return E!==P})},1)},[]),f=v.useCallback(function(_){n.current=Ap(_),r.current=void 0},[]),p=v.useCallback(function(_){u(_.type,oC(_),_.target,a(_,e.lockRef.current))},[]),h=v.useCallback(function(_){u(_.type,Ap(_),_.target,a(_,e.lockRef.current))},[]);v.useEffect(function(){return ic.push(i),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:h}),document.addEventListener("wheel",c,oc),document.addEventListener("touchmove",c,oc),document.addEventListener("touchstart",f,oc),function(){ic=ic.filter(function(_){return _!==i}),document.removeEventListener("wheel",c,oc),document.removeEventListener("touchmove",c,oc),document.removeEventListener("touchstart",f,oc)}},[]);var g=e.removeScrollBar,y=e.inert;return v.createElement(v.Fragment,null,y?v.createElement(i,{styles:vH(o)}):null,g?v.createElement(lH,{gapMode:"margin"}):null)}const wH=YV(eR,_H);var iR=v.forwardRef(function(e,t){return v.createElement(t0,Mi({},e,{ref:t,sideCar:wH}))});iR.classNames=t0.classNames;const bH=iR;function Em(e,t){let n=e;for(;(n=n.parentElement)&&!n.matches(t););return n}function SH(e,t,n){for(let r=e-1;r>=0;r-=1)if(!t[r].disabled)return r;if(n){for(let r=t.length-1;r>-1;r-=1)if(!t[r].disabled)return r}return e}function xH(e,t,n){for(let r=e+1;r{var c;n?.(a);const u=Array.from(((c=Em(a.currentTarget,e))==null?void 0:c.querySelectorAll(t))||[]).filter(_=>kH(a.currentTarget,_,e)),f=u.findIndex(_=>a.currentTarget===_),p=xH(f,u,r),h=SH(f,u,r),g=i==="rtl"?h:p,y=i==="rtl"?p:h;switch(a.key){case"ArrowRight":{s==="horizontal"&&(a.stopPropagation(),a.preventDefault(),u[g].focus(),o&&u[g].click());break}case"ArrowLeft":{s==="horizontal"&&(a.stopPropagation(),a.preventDefault(),u[y].focus(),o&&u[y].click());break}case"ArrowUp":{s==="vertical"&&(a.stopPropagation(),a.preventDefault(),u[h].focus(),o&&u[h].click());break}case"ArrowDown":{s==="vertical"&&(a.stopPropagation(),a.preventDefault(),u[p].focus(),o&&u[p].click());break}case"Home":{a.stopPropagation(),a.preventDefault(),!u[0].disabled&&u[0].focus();break}case"End":{a.stopPropagation(),a.preventDefault();const _=u.length-1;!u[_].disabled&&u[_].focus();break}}}}function CH(e,t,n){var r;return n?Array.from(((r=Em(n,t))==null?void 0:r.querySelectorAll(e))||[]).findIndex(o=>o===n):null}function wu(e){const t=v.createContext(null);return[({children:o,value:i})=>O.createElement(t.Provider,{value:i},o),()=>{const o=v.useContext(t);if(o===null)throw new Error(e);return o}]}function Wf(e){return Array.isArray(e)?e:[e]}const OH=()=>{};function EH(e,t={active:!0}){return typeof e!="function"||!t.active?t.onKeyDown||OH:n=>{var r;n.key==="Escape"&&(e(n),(r=t.onTrigger)==null||r.call(t))}}function po(e,t){return n=>{e?.(n),t?.(n)}}function $H(e){return Object.keys(e)}function MH(){const[e,t]=v.useState(-1);return[e,{setHovered:t,resetHovered:()=>t(-1)}]}function sR({data:e}){const t=[],n=[],r=e.reduce((o,i,s)=>(i.group?o[i.group]?o[i.group].push(s):o[i.group]=[s]:n.push(s),o),{});return Object.keys(r).forEach(o=>{t.push(...r[o].map(i=>e[i]))}),t.push(...n.map(o=>e[o])),t}function Uf(e){return Array.isArray(e)||e===null?!1:typeof e=="object"?e.type!==O.Fragment:!1}function aR(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t({fontFamily:e.fontFamily||"sans-serif"})}var NH=Object.defineProperty,sC=Object.getOwnPropertySymbols,RH=Object.prototype.hasOwnProperty,LH=Object.prototype.propertyIsEnumerable,aC=(e,t,n)=>t in e?NH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lC=(e,t)=>{for(var n in t||(t={}))RH.call(t,n)&&aC(e,n,t[n]);if(sC)for(var n of sC(t))LH.call(t,n)&&aC(e,n,t[n]);return e};function zH(e){return t=>({WebkitTapHighlightColor:"transparent",[t||"&:focus"]:lC({},e.focusRing==="always"||e.focusRing==="auto"?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),[t?t.replace(":focus",":focus:not(:focus-visible)"):"&:focus:not(:focus-visible)"]:lC({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)})}function Zf(e){return t=>typeof e.primaryShade=="number"?e.primaryShade:e.primaryShade[t||e.colorScheme]}function yx(e){const t=Zf(e);return(n,r,o=!0,i=!0)=>{if(typeof n=="string"&&n.includes(".")){const[a,c]=n.split("."),u=parseInt(c,10);if(a in e.colors&&u>=0&&u<10)return e.colors[a][typeof r=="number"&&!i?r:u]}const s=typeof r=="number"?r:t();return n in e.colors?e.colors[n][s]:o?e.colors[e.primaryColor][s]:n}}function cR(e){let t="";for(let n=1;n{const o={from:r?.from||e.defaultGradient.from,to:r?.to||e.defaultGradient.to,deg:r?.deg||e.defaultGradient.deg};return`linear-gradient(${o.deg}deg, ${t(o.from,n(),!1)} 0%, ${t(o.to,n(),!1)} 100%)`}}function dR(e){return t=>{if(typeof t=="number")return`${t/16}${e}`;if(typeof t=="string"){const n=t.replace("px","");if(!Number.isNaN(Number(n)))return`${Number(n)/16}${e}`}return t}}const T=dR("rem"),ka=dR("em");function Q({size:e,sizes:t,units:n}){return e in t?t[e]:typeof e=="number"?n==="em"?ka(e):T(e):e||t.md}function Hi(e){return typeof e=="number"?e:typeof e=="string"&&e.includes("rem")?Number(e.replace("rem",""))*16:typeof e=="string"&&e.includes("em")?Number(e.replace("em",""))*16:Number(e)}function jH(e){return t=>`@media (min-width: ${ka(Hi(Q({size:t,sizes:e.breakpoints})))})`}function BH(e){return t=>`@media (max-width: ${ka(Hi(Q({size:t,sizes:e.breakpoints}))-1)})`}function FH(e){return/^#?([0-9A-F]{3}){1,2}$/i.test(e)}function VH(e){let t=e.replace("#","");if(t.length===3){const s=t.split("");t=[s[0],s[0],s[1],s[1],s[2],s[2]].join("")}const n=parseInt(t,16),r=n>>16&255,o=n>>8&255,i=n&255;return{r,g:o,b:i,a:1}}function HH(e){const[t,n,r,o]=e.replace(/[^0-9,.]/g,"").split(",").map(Number);return{r:t,g:n,b:r,a:o||1}}function _x(e){return FH(e)?VH(e):e.startsWith("rgb")?HH(e):{r:0,g:0,b:0,a:1}}function pc(e,t){if(typeof e!="string"||t>1||t<0)return"rgba(0, 0, 0, 1)";if(e.startsWith("var(--"))return e;const{r:n,g:r,b:o}=_x(e);return`rgba(${n}, ${r}, ${o}, ${t})`}function WH(e=0){return{position:"absolute",top:T(e),right:T(e),left:T(e),bottom:T(e)}}function UH(e,t){if(typeof e=="string"&&e.startsWith("var(--"))return e;const{r:n,g:r,b:o,a:i}=_x(e),s=1-t,a=c=>Math.round(c*s);return`rgba(${a(n)}, ${a(r)}, ${a(o)}, ${i})`}function ZH(e,t){if(typeof e=="string"&&e.startsWith("var(--"))return e;const{r:n,g:r,b:o,a:i}=_x(e),s=a=>Math.round(a+(255-a)*t);return`rgba(${s(n)}, ${s(r)}, ${s(o)}, ${i})`}function KH(e){return t=>{if(typeof t=="number")return T(t);const n=typeof e.defaultRadius=="number"?e.defaultRadius:e.radius[e.defaultRadius]||e.defaultRadius;return e.radius[t]||t||n}}function GH(e,t){if(typeof e=="string"&&e.includes(".")){const[n,r]=e.split("."),o=parseInt(r,10);if(n in t.colors&&o>=0&&o<10)return{isSplittedColor:!0,key:n,shade:o}}return{isSplittedColor:!1}}function qH(e){const t=yx(e),n=Zf(e),r=uR(e);return({variant:o,color:i,gradient:s,primaryFallback:a})=>{const c=GH(i,e);switch(o){case"light":return{border:"transparent",background:pc(t(i,e.colorScheme==="dark"?8:0,a,!1),e.colorScheme==="dark"?.2:1),color:i==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(i,e.colorScheme==="dark"?2:n("light")),hover:pc(t(i,e.colorScheme==="dark"?7:1,a,!1),e.colorScheme==="dark"?.25:.65)};case"subtle":return{border:"transparent",background:"transparent",color:i==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(i,e.colorScheme==="dark"?2:n("light")),hover:pc(t(i,e.colorScheme==="dark"?8:0,a,!1),e.colorScheme==="dark"?.2:1)};case"outline":return{border:t(i,e.colorScheme==="dark"?5:n("light")),background:"transparent",color:t(i,e.colorScheme==="dark"?5:n("light")),hover:e.colorScheme==="dark"?pc(t(i,5,a,!1),.05):pc(t(i,0,a,!1),.35)};case"default":return{border:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4],background:e.colorScheme==="dark"?e.colors.dark[6]:e.white,color:e.colorScheme==="dark"?e.white:e.black,hover:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]};case"white":return{border:"transparent",background:e.white,color:t(i,n()),hover:null};case"transparent":return{border:"transparent",color:i==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(i,e.colorScheme==="dark"?2:n("light")),background:"transparent",hover:null};case"gradient":return{background:r(s),color:e.white,border:"transparent",hover:null};default:{const u=n(),f=c.isSplittedColor?c.shade:u,p=c.isSplittedColor?c.key:i;return{border:"transparent",background:t(p,f,a),color:e.white,hover:t(p,f===9?8:f+1)}}}}}function YH(e){return t=>{const n=Zf(e)(t);return e.colors[e.primaryColor][n]}}function JH(e){return{"@media (hover: hover)":{"&:hover":e},"@media (hover: none)":{"&:active":e}}}function XH(e){return()=>({userSelect:"none",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]})}function QH(e){return()=>e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]}const xn={fontStyles:IH,themeColor:yx,focusStyles:zH,linearGradient:AH,radialGradient:DH,smallerThan:BH,largerThan:jH,rgba:pc,cover:WH,darken:UH,lighten:ZH,radius:KH,variant:qH,primaryShade:Zf,hover:JH,gradient:uR,primaryColor:YH,placeholderStyles:XH,dimmed:QH};var eW=Object.defineProperty,tW=Object.defineProperties,nW=Object.getOwnPropertyDescriptors,cC=Object.getOwnPropertySymbols,rW=Object.prototype.hasOwnProperty,oW=Object.prototype.propertyIsEnumerable,uC=(e,t,n)=>t in e?eW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,iW=(e,t)=>{for(var n in t||(t={}))rW.call(t,n)&&uC(e,n,t[n]);if(cC)for(var n of cC(t))oW.call(t,n)&&uC(e,n,t[n]);return e},sW=(e,t)=>tW(e,nW(t));function fR(e){return sW(iW({},e),{fn:{fontStyles:xn.fontStyles(e),themeColor:xn.themeColor(e),focusStyles:xn.focusStyles(e),largerThan:xn.largerThan(e),smallerThan:xn.smallerThan(e),radialGradient:xn.radialGradient,linearGradient:xn.linearGradient,gradient:xn.gradient(e),rgba:xn.rgba,cover:xn.cover,lighten:xn.lighten,darken:xn.darken,primaryShade:xn.primaryShade(e),radius:xn.radius(e),variant:xn.variant(e),hover:xn.hover,primaryColor:xn.primaryColor(e),placeholderStyles:xn.placeholderStyles(e),dimmed:xn.dimmed(e)}})}const aW={dir:"ltr",primaryShade:{light:6,dark:8},focusRing:"auto",loader:"oval",colorScheme:"light",white:"#fff",black:"#000",defaultRadius:"sm",transitionTimingFunction:"ease",colors:TH,lineHeight:1.55,fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",primaryColor:"blue",respectReducedMotion:!0,cursorType:"default",defaultGradient:{from:"indigo",to:"cyan",deg:45},shadows:{xs:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.1)",sm:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 0.625rem 0.9375rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.4375rem 0.4375rem -0.3125rem",md:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.25rem 1.5625rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.625rem 0.625rem -0.3125rem",lg:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.75rem 1.4375rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 0.75rem 0.75rem -0.4375rem",xl:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 2.25rem 1.75rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 1.0625rem 1.0625rem -0.4375rem"},fontSizes:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem"},radius:{xs:"0.125rem",sm:"0.25rem",md:"0.5rem",lg:"1rem",xl:"2rem"},spacing:{xs:"0.625rem",sm:"0.75rem",md:"1rem",lg:"1.25rem",xl:"1.5rem"},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},headings:{fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontWeight:700,sizes:{h1:{fontSize:"2.125rem",lineHeight:1.3,fontWeight:void 0},h2:{fontSize:"1.625rem",lineHeight:1.35,fontWeight:void 0},h3:{fontSize:"1.375rem",lineHeight:1.4,fontWeight:void 0},h4:{fontSize:"1.125rem",lineHeight:1.45,fontWeight:void 0},h5:{fontSize:"1rem",lineHeight:1.5,fontWeight:void 0},h6:{fontSize:"0.875rem",lineHeight:1.5,fontWeight:void 0}}},other:{},components:{},activeStyles:{transform:"translateY(0.0625rem)"},datesLocale:"en",globalStyles:void 0,focusRingStyles:{styles:e=>({outlineOffset:"0.125rem",outline:`0.125rem solid ${e.colors[e.primaryColor][e.colorScheme==="dark"?7:5]}`}),resetStyles:()=>({outline:"none"}),inputStyles:e=>({outline:"none",borderColor:e.colors[e.primaryColor][typeof e.primaryShade=="object"?e.primaryShade[e.colorScheme]:e.primaryShade]})}},n0=fR(aW);function lW(e){if(e.sheet)return e.sheet;for(var t=0;t0?Qn(bu,--no):0,Jc--,yn===10&&(Jc=1,o0--),yn}function go(){return yn=no2||nf(yn)>3?"":" "}function wW(e,t){for(;--t&&go()&&!(yn<48||yn>102||yn>57&&yn<65||yn>70&&yn<97););return Kf(e,Uh()+(t<6&&Di()==32&&go()==32))}function qw(e){for(;go();)switch(yn){case e:return no;case 34:case 39:e!==34&&e!==39&&qw(yn);break;case 40:e===41&&qw(e);break;case 92:go();break}return no}function bW(e,t){for(;go()&&e+yn!==47+10;)if(e+yn===42+42&&Di()===47)break;return"/*"+Kf(t,no-1)+"*"+r0(e===47?e:go())}function SW(e){for(;!nf(Di());)go();return Kf(e,no)}function xW(e){return yR(Kh("",null,null,null,[""],e=vR(e),0,[0],e))}function Kh(e,t,n,r,o,i,s,a,c){for(var u=0,f=0,p=s,h=0,g=0,y=0,_=1,k=1,b=1,S=0,P="",E=o,$=i,I=r,N=P;k;)switch(y=S,S=go()){case 40:if(y!=108&&Qn(N,p-1)==58){Gw(N+=gt(Zh(S),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:N+=Zh(S);break;case 9:case 10:case 13:case 32:N+=_W(y);break;case 92:N+=wW(Uh()-1,7);continue;case 47:switch(Di()){case 42:case 47:Dp(kW(bW(go(),Uh()),t,n),c);break;default:N+="/"}break;case 123*_:a[u++]=Oi(N)*b;case 125*_:case 59:case 0:switch(S){case 0:case 125:k=0;case 59+f:g>0&&Oi(N)-p&&Dp(g>32?fC(N+";",r,n,p-1):fC(gt(N," ","")+";",r,n,p-2),c);break;case 59:N+=";";default:if(Dp(I=dC(N,t,n,u,f,o,a,P,E=[],$=[],p),i),S===123)if(f===0)Kh(N,t,I,I,E,i,p,a,$);else switch(h===99&&Qn(N,3)===110?100:h){case 100:case 109:case 115:Kh(e,I,I,r&&Dp(dC(e,I,I,0,0,o,a,P,o,E=[],p),$),o,$,p,a,r?E:$);break;default:Kh(N,I,I,I,[""],$,0,a,$)}}u=f=g=0,_=b=1,P=N="",p=s;break;case 58:p=1+Oi(N),g=y;default:if(_<1){if(S==123)--_;else if(S==125&&_++==0&&yW()==125)continue}switch(N+=r0(S),S*_){case 38:b=f>0?1:(N+="\f",-1);break;case 44:a[u++]=(Oi(N)-1)*b,b=1;break;case 64:Di()===45&&(N+=Zh(go())),h=Di(),f=p=Oi(P=N+=SW(Uh())),S++;break;case 45:y===45&&Oi(N)==2&&(_=0)}}return i}function dC(e,t,n,r,o,i,s,a,c,u,f){for(var p=o-1,h=o===0?i:[""],g=Sx(h),y=0,_=0,k=0;y0?h[b]+" "+S:gt(S,/&\f/g,h[b])))&&(c[k++]=P);return i0(e,t,n,o===0?wx:a,c,u,f)}function kW(e,t,n){return i0(e,t,n,pR,r0(vW()),tf(e,2,-2),0)}function fC(e,t,n,r){return i0(e,t,n,bx,tf(e,0,r),tf(e,r+1,-1),r)}function Dc(e,t){for(var n="",r=Sx(e),o=0;o6)switch(Qn(e,t+1)){case 109:if(Qn(e,t+4)!==45)break;case 102:return gt(e,/(.+:)(.+)-([^]+)/,"$1"+ht+"$2-$3$1"+$m+(Qn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Gw(e,"stretch")?_R(gt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Qn(e,t+1)!==115)break;case 6444:switch(Qn(e,Oi(e)-3-(~Gw(e,"!important")&&10))){case 107:return gt(e,":",":"+ht)+e;case 101:return gt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ht+(Qn(e,14)===45?"inline-":"")+"box$3$1"+ht+"$2$3$1"+hr+"$2box$3")+e}break;case 5936:switch(Qn(e,t+11)){case 114:return ht+e+hr+gt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ht+e+hr+gt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ht+e+hr+gt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ht+e+hr+e+e}return e}var RW=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case bx:t.return=_R(t.value,t.length);break;case hR:return Dc([qu(t,{value:gt(t.value,"@","@"+ht)})],o);case wx:if(t.length)return gW(t.props,function(i){switch(mW(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Dc([qu(t,{props:[gt(i,/:(read-\w+)/,":"+$m+"$1")]})],o);case"::placeholder":return Dc([qu(t,{props:[gt(i,/:(plac\w+)/,":"+ht+"input-$1")]}),qu(t,{props:[gt(i,/:(plac\w+)/,":"+$m+"$1")]}),qu(t,{props:[gt(i,/:(plac\w+)/,hr+"input-$1")]})],o)}return""})}},LW=[RW],wR=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(_){var k=_.getAttribute("data-emotion");k.indexOf(" ")!==-1&&(document.head.appendChild(_),_.setAttribute("data-s",""))})}var o=t.stylisPlugins||LW,i={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(_){for(var k=_.getAttribute("data-emotion").split(" "),b=1;b=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var GW={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},qW=/[A-Z]|^ms/g,YW=/_EMO_([^_]+?)_([^]*?)_EMO_/g,PR=function(t){return t.charCodeAt(1)===45},mC=function(t){return t!=null&&typeof t!="boolean"},J1=EW(function(e){return PR(e)?e:e.replace(qW,"-$&").toLowerCase()}),gC=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(YW,function(r,o,i){return Ei={name:o,styles:i,next:Ei},o})}return GW[t]!==1&&!PR(t)&&typeof n=="number"&&n!==0?n+"px":n};function rf(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Ei={name:n.name,styles:n.styles,next:Ei},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Ei={name:r.name,styles:r.styles,next:Ei},r=r.next;var o=n.styles+";";return o}return JW(e,t,n)}case"function":{if(e!==void 0){var i=Ei,s=n(e);return Ei=i,rf(e,t,s)}break}}if(t==null)return n;var a=t[n];return a!==void 0?a:n}function JW(e,t,n){var r="";if(Array.isArray(n))for(var o=0;ot in e?oU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cU=(e,t)=>{for(var n in t||(t={}))aU.call(t,n)&&wC(e,n,t[n]);if(_C)for(var n of _C(t))lU.call(t,n)&&wC(e,n,t[n]);return e},uU=(e,t)=>iU(e,sU(t));function dU({theme:e}){return O.createElement(Gf,{styles:{"*, *::before, *::after":{boxSizing:"border-box"},html:{colorScheme:e.colorScheme==="dark"?"dark":"light"},body:uU(cU({},e.fn.fontStyles()),{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,fontSize:e.fontSizes.md,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"})}})}function Yu(e,t,n,r=T){Object.keys(t).forEach(o=>{e[`--mantine-${n}-${o}`]=r(t[o])})}function fU({theme:e}){const t={"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-transition-timing-function":e.transitionTimingFunction,"--mantine-line-height":`${e.lineHeight}`,"--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}`};Yu(t,e.shadows,"shadow"),Yu(t,e.fontSizes,"font-size"),Yu(t,e.radius,"radius"),Yu(t,e.spacing,"spacing"),Yu(t,e.breakpoints,"breakpoints",ka),Object.keys(e.colors).forEach(r=>{e.colors[r].forEach((o,i)=>{t[`--mantine-color-${r}-${i}`]=o})});const n=e.headings.sizes;return Object.keys(n).forEach(r=>{t[`--mantine-${r}-font-size`]=n[r].fontSize,t[`--mantine-${r}-line-height`]=`${n[r].lineHeight}`}),O.createElement(Gf,{styles:{":root":t}})}var pU=Object.defineProperty,hU=Object.defineProperties,mU=Object.getOwnPropertyDescriptors,bC=Object.getOwnPropertySymbols,gU=Object.prototype.hasOwnProperty,vU=Object.prototype.propertyIsEnumerable,SC=(e,t,n)=>t in e?pU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ya=(e,t)=>{for(var n in t||(t={}))gU.call(t,n)&&SC(e,n,t[n]);if(bC)for(var n of bC(t))vU.call(t,n)&&SC(e,n,t[n]);return e},xC=(e,t)=>hU(e,mU(t));function yU(e,t){var n;if(!t)return e;const r=Object.keys(e).reduce((o,i)=>{if(i==="headings"&&t.headings){const s=t.headings.sizes?Object.keys(e.headings.sizes).reduce((a,c)=>(a[c]=Ya(Ya({},e.headings.sizes[c]),t.headings.sizes[c]),a),{}):e.headings.sizes;return xC(Ya({},o),{headings:xC(Ya(Ya({},e.headings),t.headings),{sizes:s})})}return o[i]=typeof t[i]=="object"?Ya(Ya({},e[i]),t[i]):typeof t[i]=="number"||typeof t[i]=="boolean"||typeof t[i]=="function"?t[i]:t[i]||e[i],o},{});if(t?.fontFamily&&!((n=t?.headings)!=null&&n.fontFamily)&&(r.headings.fontFamily=t.fontFamily),!(r.primaryColor in r.colors))throw new Error("MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color");return r}function _U(e,t){return fR(yU(e,t))}function OR(e){return Object.keys(e).reduce((t,n)=>(e[n]!==void 0&&(t[n]=e[n]),t),{})}const wU={html:{fontFamily:"sans-serif",lineHeight:"1.15",textSizeAdjust:"100%"},body:{margin:0},"article, aside, footer, header, nav, section, figcaption, figure, main":{display:"block"},h1:{fontSize:"2em"},hr:{boxSizing:"content-box",height:0,overflow:"visible"},pre:{fontFamily:"monospace, monospace",fontSize:"1em"},a:{background:"transparent",textDecorationSkip:"objects"},"a:active, a:hover":{outlineWidth:0},"abbr[title]":{borderBottom:"none",textDecoration:"underline"},"b, strong":{fontWeight:"bolder"},"code, kbp, samp":{fontFamily:"monospace, monospace",fontSize:"1em"},dfn:{fontStyle:"italic"},mark:{backgroundColor:"#ff0",color:"#000"},small:{fontSize:"80%"},"sub, sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sup:{top:"-0.5em"},sub:{bottom:"-0.25em"},"audio, video":{display:"inline-block"},"audio:not([controls])":{display:"none",height:0},img:{borderStyle:"none",verticalAlign:"middle"},"svg:not(:root)":{overflow:"hidden"},"button, input, optgroup, select, textarea":{fontFamily:"sans-serif",fontSize:"100%",lineHeight:"1.15",margin:0},"button, input":{overflow:"visible"},"button, select":{textTransform:"none"},"button, [type=reset], [type=submit]":{WebkitAppearance:"button"},"button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner":{borderStyle:"none",padding:0},"button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring":{outline:`${T(1)} dotted ButtonText`},legend:{boxSizing:"border-box",color:"inherit",display:"table",maxWidth:"100%",padding:0,whiteSpace:"normal"},progress:{display:"inline-block",verticalAlign:"baseline"},textarea:{overflow:"auto"},"[type=checkbox], [type=radio]":{boxSizing:"border-box",padding:0},"[type=number]::-webkit-inner-spin-button, [type=number]::-webkit-outer-spin-button":{height:"auto"},"[type=search]":{appearance:"none"},"[type=search]::-webkit-search-cancel-button, [type=search]::-webkit-search-decoration":{appearance:"none"},"::-webkit-file-upload-button":{appearance:"button",font:"inherit"},"details, menu":{display:"block"},summary:{display:"list-item"},canvas:{display:"inline-block"},template:{display:"none"}};function bU(){return O.createElement(Gf,{styles:wU})}var SU=Object.defineProperty,kC=Object.getOwnPropertySymbols,xU=Object.prototype.hasOwnProperty,kU=Object.prototype.propertyIsEnumerable,PC=(e,t,n)=>t in e?SU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$d=(e,t)=>{for(var n in t||(t={}))xU.call(t,n)&&PC(e,n,t[n]);if(kC)for(var n of kC(t))kU.call(t,n)&&PC(e,n,t[n]);return e};const Mm=v.createContext({theme:n0});function Sr(){var e;return((e=v.useContext(Mm))==null?void 0:e.theme)||n0}function PU(e){const t=Sr(),n=r=>{var o,i,s,a;return{styles:((o=t.components[r])==null?void 0:o.styles)||{},classNames:((i=t.components[r])==null?void 0:i.classNames)||{},variants:(s=t.components[r])==null?void 0:s.variants,sizes:(a=t.components[r])==null?void 0:a.sizes}};return Array.isArray(e)?e.map(n):[n(e)]}function ER(){var e;return(e=v.useContext(Mm))==null?void 0:e.emotionCache}function ue(e,t,n){var r;const o=Sr(),i=(r=o.components[e])==null?void 0:r.defaultProps,s=typeof i=="function"?i(o):i;return $d($d($d({},t),s),OR(n))}function $R({theme:e,emotionCache:t,withNormalizeCSS:n=!1,withGlobalStyles:r=!1,withCSSVariables:o=!1,inherit:i=!1,children:s}){const a=v.useContext(Mm),c=_U(n0,i?$d($d({},a.theme),e):e);return O.createElement(nU,{theme:c},O.createElement(Mm.Provider,{value:{theme:c,emotionCache:t}},n&&O.createElement(bU,null),r&&O.createElement(dU,{theme:c}),o&&O.createElement(fU,{theme:c}),typeof c.globalStyles=="function"&&O.createElement(Gf,{styles:c.globalStyles(c)}),s))}$R.displayName="@mantine/core/MantineProvider";const CU={app:100,modal:200,popover:300,overlay:400,max:9999};function Ki(e){return CU[e]}function g0(e){return typeof e=="number"?e:typeof e=="string"?e.includes("px")?Number(e.replace("px","")):e.includes("rem")?Number(e.replace("rem",""))*16:Number(e):NaN}function OU(e,t){const n=v.useRef();return(!n.current||t.length!==n.current.prevDeps.length||n.current.prevDeps.map((r,o)=>r===t[o]).indexOf(!1)>=0)&&(n.current={v:e(),prevDeps:[...t]}),n.current.v}const EU=wR({key:"mantine",prepend:!0});function $U(){return ER()||EU}var MU=Object.defineProperty,CC=Object.getOwnPropertySymbols,TU=Object.prototype.hasOwnProperty,IU=Object.prototype.propertyIsEnumerable,OC=(e,t,n)=>t in e?MU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,NU=(e,t)=>{for(var n in t||(t={}))TU.call(t,n)&&OC(e,n,t[n]);if(CC)for(var n of CC(t))IU.call(t,n)&&OC(e,n,t[n]);return e};const X1="ref";function RU(e){let t;if(e.length!==1)return{args:e,ref:t};const[n]=e;if(!(n instanceof Object))return{args:e,ref:t};if(!(X1 in n))return{args:e,ref:t};t=n[X1];const r=NU({},n);return delete r[X1],{args:[r],ref:t}}const{cssFactory:LU}=(()=>{function e(n,r,o){const i=[],s=UW(n,i,o);return i.length<2?o:s+r(i)}function t(n){const{cache:r}=n,o=(...s)=>{const{ref:a,args:c}=RU(s),u=Cx(c,r.registered);return kR(r,u,!1),`${r.key}-${u.name}${a===void 0?"":` ${a}`}`};return{css:o,cx:(...s)=>e(r.registered,o,lR(s))}}return{cssFactory:t}})();function MR(){const e=$U();return OU(()=>LU({cache:e}),[e])}function zU({cx:e,classes:t,context:n,classNames:r,name:o,cache:i}){const s=n.reduce((a,c)=>(Object.keys(c.classNames).forEach(u=>{typeof a[u]!="string"?a[u]=`${c.classNames[u]}`:a[u]=`${a[u]} ${c.classNames[u]}`}),a),{});return Object.keys(t).reduce((a,c)=>(a[c]=e(t[c],s[c],r!=null&&r[c],Array.isArray(o)?o.filter(Boolean).map(u=>`${i?.key||"mantine"}-${u}-${c}`).join(" "):o?`${i?.key||"mantine"}-${o}-${c}`:null),a),{})}var AU=Object.defineProperty,EC=Object.getOwnPropertySymbols,DU=Object.prototype.hasOwnProperty,jU=Object.prototype.propertyIsEnumerable,$C=(e,t,n)=>t in e?AU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Q1=(e,t)=>{for(var n in t||(t={}))DU.call(t,n)&&$C(e,n,t[n]);if(EC)for(var n of EC(t))jU.call(t,n)&&$C(e,n,t[n]);return e};function Xw(e,t){return t&&Object.keys(t).forEach(n=>{e[n]?e[n]=Q1(Q1({},e[n]),t[n]):e[n]=Q1({},t[n])}),e}function MC(e,t,n,r){const o=i=>typeof i=="function"?i(t,n||{},r):i||{};return Array.isArray(e)?e.map(i=>o(i.styles)).reduce((i,s)=>Xw(i,s),{}):o(e)}function BU({ctx:e,theme:t,params:n,variant:r,size:o}){return e.reduce((i,s)=>(s.variants&&r in s.variants&&Xw(i,s.variants[r](t,n,{variant:r,size:o})),s.sizes&&o in s.sizes&&Xw(i,s.sizes[o](t,n,{variant:r,size:o})),i),{})}function te(e){const t=typeof e=="function"?e:()=>e;function n(r,o){const i=Sr(),s=PU(o?.name),a=ER(),c={variant:o?.variant,size:o?.size},{css:u,cx:f}=MR(),p=t(i,r,c),h=MC(o?.styles,i,r,c),g=MC(s,i,r,c),y=BU({ctx:s,theme:i,params:r,variant:o?.variant,size:o?.size}),_=Object.fromEntries(Object.keys(p).map(k=>{const b=f({[u(p[k])]:!o?.unstyled},u(y[k]),u(g[k]),u(h[k]));return[k,b]}));return{classes:zU({cx:f,classes:_,context:s,classNames:o?.classNames,name:o?.name,cache:a}),cx:f,theme:i}}return n}function On(e){return`___ref-${e||""}`}function FU({styles:e}){const t=Sr();return O.createElement(Gf,{styles:rU(typeof e=="function"?e(t):e)})}var VU=Object.defineProperty,HU=Object.defineProperties,WU=Object.getOwnPropertyDescriptors,TC=Object.getOwnPropertySymbols,UU=Object.prototype.hasOwnProperty,ZU=Object.prototype.propertyIsEnumerable,IC=(e,t,n)=>t in e?VU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ju=(e,t)=>{for(var n in t||(t={}))UU.call(t,n)&&IC(e,n,t[n]);if(TC)for(var n of TC(t))ZU.call(t,n)&&IC(e,n,t[n]);return e},Xu=(e,t)=>HU(e,WU(t));const Qu={in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${T(10)})`},transitionProperty:"transform, opacity"},jp={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},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(-${T(20)}) 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(${T(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${T(20)}) rotate(-5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${T(20)}) 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:Xu(Ju({},Qu),{common:{transformOrigin:"center center"}}),"pop-bottom-left":Xu(Ju({},Qu),{common:{transformOrigin:"bottom left"}}),"pop-bottom-right":Xu(Ju({},Qu),{common:{transformOrigin:"bottom right"}}),"pop-top-left":Xu(Ju({},Qu),{common:{transformOrigin:"top left"}}),"pop-top-right":Xu(Ju({},Qu),{common:{transformOrigin:"top right"}})},NC=["mousedown","touchstart"];function TR(e,t,n){const r=v.useRef();return v.useEffect(()=>{const o=i=>{const{target:s}=i??{};if(Array.isArray(n)){const a=s?.hasAttribute("data-ignore-outside-clicks")||!document.body.contains(s)&&s.tagName!=="HTML";n.every(u=>!!u&&!i.composedPath().includes(u))&&!a&&e()}else r.current&&!r.current.contains(s)&&e()};return(t||NC).forEach(i=>document.addEventListener(i,o)),()=>{(t||NC).forEach(i=>document.removeEventListener(i,o))}},[r,e,n]),r}function KU(e,t){try{return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}catch{return e.addListener(t),()=>e.removeListener(t)}}function GU(e,t){return typeof t=="boolean"?t:typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function IR(e,t,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){const[r,o]=v.useState(n?t:GU(e,t)),i=v.useRef();return v.useEffect(()=>{if("matchMedia"in window)return i.current=window.matchMedia(e),o(i.current.matches),KU(i.current,s=>o(s.matches))},[e]),r}function bl(e,t,n){return Math.min(Math.max(e,t),n)}const Ox=typeof document<"u"?v.useLayoutEffect:v.useEffect;function An(e,t){const n=v.useRef(!1);v.useEffect(()=>()=>{n.current=!1},[]),v.useEffect(()=>{if(n.current)return e();n.current=!0},t)}function NR({opened:e,shouldReturnFocus:t=!0}){const n=v.useRef(),r=()=>{var o;n.current&&"focus"in n.current&&typeof n.current.focus=="function"&&((o=n.current)==null||o.focus({preventScroll:!0}))};return An(()=>{let o=-1;const i=s=>{s.key==="Tab"&&window.clearTimeout(o)};return document.addEventListener("keydown",i),e?n.current=document.activeElement:t&&(o=window.setTimeout(r,10)),()=>{window.clearTimeout(o),document.removeEventListener("keydown",i)}},[e,t]),r}const qU=/input|select|textarea|button|object/,RR="a, input, select, textarea, button, object, [tabindex]";function YU(e){return e.style.display==="none"}function JU(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(YU(n))return!1;n=n.parentNode}return!0}function LR(e){let t=e.getAttribute("tabindex");return t===null&&(t=void 0),parseInt(t,10)}function Qw(e){const t=e.nodeName.toLowerCase(),n=!Number.isNaN(LR(e));return(qU.test(t)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||n)&&JU(e)}function zR(e){const t=LR(e);return(Number.isNaN(t)||t>=0)&&Qw(e)}function XU(e){return Array.from(e.querySelectorAll(RR)).filter(zR)}function QU(e,t){const n=XU(e);if(!n.length){t.preventDefault();return}const r=n[t.shiftKey?0:n.length-1],o=e.getRootNode();if(!(r===o.activeElement||e===o.activeElement))return;t.preventDefault();const s=n[t.shiftKey?n.length-1:0];s&&s.focus()}function eZ(e,t="body > :not(script)"){const n=Array.from(document.querySelectorAll(t)).map(r=>{var o;if((o=r?.shadowRoot)!=null&&o.contains(e)||r.contains(e))return;const i=r.getAttribute("aria-hidden");return(i===null||i==="false")&&r.setAttribute("aria-hidden","true"),{node:r,ariaHidden:i}});return()=>{n.forEach(r=>{r&&(r.ariaHidden===null?r.node.removeAttribute("aria-hidden"):r.node.setAttribute("aria-hidden",r.ariaHidden))})}}function tZ(e=!0){const t=v.useRef(),n=v.useRef(null),r=i=>{let s=i.querySelector("[data-autofocus]");if(!s){const a=Array.from(i.querySelectorAll(RR));s=a.find(zR)||a.find(Qw)||null,!s&&Qw(i)&&(s=i)}s&&s.focus({preventScroll:!0})},o=v.useCallback(i=>{if(e){if(i===null){n.current&&(n.current(),n.current=null);return}n.current=eZ(i),t.current!==i&&(i?(setTimeout(()=>{i.getRootNode()&&r(i)}),t.current=i):t.current=null)}},[e]);return v.useEffect(()=>{if(!e)return;t.current&&setTimeout(()=>r(t.current));const i=s=>{s.key==="Tab"&&t.current&&QU(t.current,s)};return document.addEventListener("keydown",i),()=>{document.removeEventListener("keydown",i),n.current&&n.current()}},[e]),o}const nZ=O["useId".toString()]||(()=>{});function rZ(){const e=nZ();return e?`mantine-${e.replace(/:/g,"")}`:""}function Md(){return`mantine-${Math.random().toString(36).slice(2,11)}`}function Ia(e){const t=rZ(),[n,r]=v.useState(t);return Ox(()=>{r(Md())},[]),typeof e=="string"?e:typeof window>"u"?t:n}function Xc(e,t,n){v.useEffect(()=>(window.addEventListener(e,t,n),()=>window.removeEventListener(e,t,n)),[e,t])}function AR(e,t){typeof e=="function"?e(t):typeof e=="object"&&e!==null&&"current"in e&&(e.current=t)}function DR(...e){return t=>{e.forEach(n=>AR(n,t))}}function di(...e){return v.useCallback(DR(...e),e)}const jR=e=>({x:bl(e.x,0,1),y:bl(e.y,0,1)});function BR(e,t,n="ltr"){const r=v.useRef(),o=v.useRef(!1),i=v.useRef(!1),s=v.useRef(0),[a,c]=v.useState(!1);return v.useEffect(()=>{o.current=!0},[]),v.useEffect(()=>{const u=({x:S,y:P})=>{cancelAnimationFrame(s.current),s.current=requestAnimationFrame(()=>{if(o.current&&r.current){r.current.style.userSelect="none";const E=r.current.getBoundingClientRect();if(E.width&&E.height){const $=bl((S-E.left)/E.width,0,1);e({x:n==="ltr"?$:1-$,y:bl((P-E.top)/E.height,0,1)})}}})},f=()=>{document.addEventListener("mousemove",_),document.addEventListener("mouseup",g),document.addEventListener("touchmove",b),document.addEventListener("touchend",g)},p=()=>{document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",g),document.removeEventListener("touchmove",b),document.removeEventListener("touchend",g)},h=()=>{!i.current&&o.current&&(i.current=!0,typeof t?.onScrubStart=="function"&&t.onScrubStart(),c(!0),f())},g=()=>{i.current&&o.current&&(i.current=!1,c(!1),p(),setTimeout(()=>{typeof t?.onScrubEnd=="function"&&t.onScrubEnd()},0))},y=S=>{h(),S.preventDefault(),_(S)},_=S=>u({x:S.clientX,y:S.clientY}),k=S=>{S.cancelable&&S.preventDefault(),h(),b(S)},b=S=>{S.cancelable&&S.preventDefault(),u({x:S.changedTouches[0].clientX,y:S.changedTouches[0].clientY})};return r.current.addEventListener("mousedown",y),r.current.addEventListener("touchstart",k,{passive:!1}),()=>{r.current&&(r.current.removeEventListener("mousedown",y),r.current.removeEventListener("touchstart",k))}},[n,e]),{ref:r,active:a}}function si({value:e,defaultValue:t,finalValue:n,onChange:r=()=>{}}){const[o,i]=v.useState(t!==void 0?t:n),s=a=>{i(a),r?.(a)};return e!==void 0?[e,r,!0]:[o,s,!1]}function Ts(e,t){const n=t-e+1;return Array.from({length:n},(r,o)=>o+e)}const Bp="dots";function oZ({total:e,siblings:t=1,boundaries:n=1,page:r,initialPage:o=1,onChange:i}){const s=Math.max(Math.trunc(e),0),[a,c]=si({value:r,onChange:i,defaultValue:o,finalValue:o}),u=_=>{_<=0?c(1):_>s?c(s):c(_)},f=()=>u(a+1),p=()=>u(a-1),h=()=>u(1),g=()=>u(s);return{range:v.useMemo(()=>{if(t*2+3+n*2>=s)return Ts(1,s);const k=Math.max(a-t,n),b=Math.min(a+t,s-n),S=k>n+2,P=be<.5?2*e*e:-1+(4-2*e)*e,sZ=({axis:e,target:t,parent:n,alignment:r,offset:o,isList:i})=>{if(!t||!n&&typeof document>"u")return 0;const s=!!n,c=(n||document.body).getBoundingClientRect(),u=t.getBoundingClientRect(),f=p=>u[p]-c[p];if(e==="y"){const p=f("top");if(p===0)return 0;if(r==="start"){const g=p-o;return g<=u.height*(i?0:1)||!i?g:0}const h=s?c.height:window.innerHeight;if(r==="end"){const g=p+o-h+u.height;return g>=-u.height*(i?0:1)||!i?g:0}return r==="center"?p-h/2+u.height/2:0}if(e==="x"){const p=f("left");if(p===0)return 0;if(r==="start"){const g=p-o;return g<=u.width||!i?g:0}const h=s?c.width:window.innerWidth;if(r==="end"){const g=p+o-h+u.width;return g>=-u.width||!i?g:0}return r==="center"?p-h/2+u.width/2:0}return 0},aZ=({axis:e,parent:t})=>{if(!t&&typeof document>"u")return 0;const n=e==="y"?"scrollTop":"scrollLeft";if(t)return t[n];const{body:r,documentElement:o}=document;return r[n]+o[n]},lZ=({axis:e,parent:t,distance:n})=>{if(!t&&typeof document>"u")return;const r=e==="y"?"scrollTop":"scrollLeft";if(t)t[r]=n;else{const{body:o,documentElement:i}=document;o[r]=n,i[r]=n}};function FR({duration:e=1250,axis:t="y",onScrollFinish:n,easing:r=iZ,offset:o=0,cancelable:i=!0,isList:s=!1}={}){const a=v.useRef(0),c=v.useRef(0),u=v.useRef(!1),f=v.useRef(null),p=v.useRef(null),h=v0(),g=()=>{a.current&&cancelAnimationFrame(a.current)},y=v.useCallback(({alignment:k="start"}={})=>{var b;u.current=!1,a.current&&g();const S=(b=aZ({parent:f.current,axis:t}))!=null?b:0,P=sZ({parent:f.current,target:p.current,axis:t,alignment:k,offset:o,isList:s})-(f.current?0:S);function E(){c.current===0&&(c.current=performance.now());const I=performance.now()-c.current,N=h||e===0?1:I/e,R=S+P*r(N);lZ({parent:f.current,axis:t,distance:R}),!u.current&&N<1?a.current=requestAnimationFrame(E):(typeof n=="function"&&n(),c.current=0,a.current=0,g())}E()},[t,e,r,s,o,n,h]),_=()=>{i&&(u.current=!0)};return Xc("wheel",_,{passive:!0}),Xc("touchmove",_,{passive:!0}),v.useEffect(()=>g,[]),{scrollableRef:f,targetRef:p,scrollIntoView:y,cancel:g}}const cZ={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};function uZ(){const e=v.useRef(0),t=v.useRef(null),[n,r]=v.useState(cZ),o=v.useMemo(()=>typeof window<"u"?new ResizeObserver(i=>{const s=i[0];s&&(cancelAnimationFrame(e.current),e.current=requestAnimationFrame(()=>{t.current&&r(s.contentRect)}))}):null,[]);return v.useEffect(()=>(t.current&&o.observe(t.current),()=>{o.disconnect(),e.current&&cancelAnimationFrame(e.current)}),[t.current]),[t,n]}function gd(){const[e,{width:t,height:n}]=uZ();return{ref:e,width:t,height:n}}function RC(){if(typeof window>"u")return"undetermined";const{userAgent:e}=window.navigator,t=/(Macintosh)|(MacIntel)|(MacPPC)|(Mac68K)/i,n=/(Win32)|(Win64)|(Windows)|(WinCE)/i,r=/(iPhone)|(iPad)|(iPod)/i;return t.test(e)?"macos":r.test(e)?"ios":n.test(e)?"windows":/Android/i.test(e)?"android":/Linux/i.test(e)?"linux":"undetermined"}function dZ(e={getValueInEffect:!0}){const[t,n]=v.useState(e.getValueInEffect?"undetermined":RC());return Ox(()=>{e.getValueInEffect&&n(RC)},[]),t}function fZ(e){return t=>{if(!t)e(t);else if(typeof t=="function")e(t);else if(typeof t=="object"&&"nativeEvent"in t){const{currentTarget:n}=t;n.type==="checkbox"?e(n.checked):e(n.value)}else e(t)}}function pZ(e){const[t,n]=v.useState(e);return[t,fZ(n)]}function Su(e=!1,t){const{onOpen:n,onClose:r}=t||{},[o,i]=v.useState(e),s=v.useCallback(()=>{i(u=>u||(n?.(),!0))},[n]),a=v.useCallback(()=>{i(u=>u&&(r?.(),!1))},[r]),c=v.useCallback(()=>{o?a():s()},[a,s,o]);return[o,{open:s,close:a,toggle:c}]}function LC(e,t,n={autoInvoke:!1}){const r=v.useRef(null),o=v.useRef(null),i=v.useCallback((...a)=>{o.current||(o.current=window.setTimeout(()=>{r.current(a),o.current=null},t))},[t]),s=v.useCallback(()=>{o.current&&(window.clearTimeout(o.current),o.current=null)},[]);return v.useEffect(()=>{r.current=e},[e]),v.useEffect(()=>(n.autoInvoke&&i(),s),[s,t,n.autoInvoke,i]),{start:i,clear:s}}var zC=Object.getOwnPropertySymbols,hZ=Object.prototype.hasOwnProperty,mZ=Object.prototype.propertyIsEnumerable,gZ=(e,t)=>{var n={};for(var r in e)hZ.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&zC)for(var r of zC(e))t.indexOf(r)<0&&mZ.call(e,r)&&(n[r]=e[r]);return n};function Ul(e){const t=e,{m:n,mx:r,my:o,mt:i,mb:s,ml:a,mr:c,p:u,px:f,py:p,pt:h,pb:g,pl:y,pr:_,bg:k,c:b,opacity:S,ff:P,fz:E,fw:$,lts:I,ta:N,lh:R,fs:F,tt:B,td:D,w:K,miw:W,maw:V,h:U,mih:J,mah:G,bgsz:A,bgp:q,bgr:H,bga:ee,pos:re,top:he,left:Pe,bottom:X,right:ne,inset:fe,display:Oe}=t,Me=gZ(t,["m","mx","my","mt","mb","ml","mr","p","px","py","pt","pb","pl","pr","bg","c","opacity","ff","fz","fw","lts","ta","lh","fs","tt","td","w","miw","maw","h","mih","mah","bgsz","bgp","bgr","bga","pos","top","left","bottom","right","inset","display"]);return{systemStyles:OR({m:n,mx:r,my:o,mt:i,mb:s,ml:a,mr:c,p:u,px:f,py:p,pt:h,pb:g,pl:y,pr:_,bg:k,c:b,opacity:S,ff:P,fz:E,fw:$,lts:I,ta:N,lh:R,fs:F,tt:B,td:D,w:K,miw:W,maw:V,h:U,mih:J,mah:G,bgsz:A,bgp:q,bgr:H,bga:ee,pos:re,top:he,left:Pe,bottom:X,right:ne,inset:fe,display:Oe}),rest:Me}}function vZ(e,t){const n=Object.keys(e).filter(r=>r!=="base").sort((r,o)=>Hi(Q({size:r,sizes:t.breakpoints}))-Hi(Q({size:o,sizes:t.breakpoints})));return"base"in e?["base",...n]:n}function yZ({value:e,theme:t,getValue:n,property:r}){if(e==null)return;if(typeof e=="object")return vZ(e,t).reduce((s,a)=>{if(a==="base"&&e.base!==void 0){const u=n(e.base,t);return Array.isArray(r)?(r.forEach(f=>{s[f]=u}),s):(s[r]=u,s)}const c=n(e[a],t);return Array.isArray(r)?(s[t.fn.largerThan(a)]={},r.forEach(u=>{s[t.fn.largerThan(a)][u]=c}),s):(s[t.fn.largerThan(a)]={[r]:c},s)},{});const o=n(e,t);return Array.isArray(r)?r.reduce((i,s)=>(i[s]=o,i),{}):{[r]:o}}function _Z(e,t){return e==="dimmed"?t.colorScheme==="dark"?t.colors.dark[2]:t.colors.gray[6]:t.fn.variant({variant:"filled",color:e,primaryFallback:!1}).background}function wZ(e){return T(e)}function bZ(e){return e}function SZ(e,t){return Q({size:e,sizes:t.fontSizes})}const xZ=["-xs","-sm","-md","-lg","-xl"];function kZ(e,t){return xZ.includes(e)?`calc(${Q({size:e.replace("-",""),sizes:t.spacing})} * -1)`:Q({size:e,sizes:t.spacing})}const PZ={identity:bZ,color:_Z,size:wZ,fontSize:SZ,spacing:kZ},CZ={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"},mx:{type:"spacing",property:["marginRight","marginLeft"]},my:{type:"spacing",property:["marginTop","marginBottom"]},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"},px:{type:"spacing",property:["paddingRight","paddingLeft"]},py:{type:"spacing",property:["paddingTop","paddingBottom"]},bg:{type:"color",property:"background"},c:{type:"color",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"identity",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"identity",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:"identity",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"}};var OZ=Object.defineProperty,AC=Object.getOwnPropertySymbols,EZ=Object.prototype.hasOwnProperty,$Z=Object.prototype.propertyIsEnumerable,DC=(e,t,n)=>t in e?OZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jC=(e,t)=>{for(var n in t||(t={}))EZ.call(t,n)&&DC(e,n,t[n]);if(AC)for(var n of AC(t))$Z.call(t,n)&&DC(e,n,t[n]);return e};function eb(e,t,n=CZ){return Object.keys(n).reduce((o,i)=>(i in e&&e[i]!==void 0&&o.push(yZ({value:e[i],getValue:PZ[n[i].type],property:n[i].property,theme:t})),o),[]).reduce((o,i)=>(Object.keys(i).forEach(s=>{typeof i[s]=="object"&&i[s]!==null&&s in o?o[s]=jC(jC({},o[s]),i[s]):o[s]=i[s]}),o),{})}function BC(e,t){return typeof e=="function"?e(t):e}function MZ(e,t,n){const r=Sr(),{css:o,cx:i}=MR();return Array.isArray(e)?i(n,o(eb(t,r)),e.map(s=>o(BC(s,r)))):i(n,o(BC(e,r)),o(eb(t,r)))}var TZ=Object.defineProperty,Tm=Object.getOwnPropertySymbols,VR=Object.prototype.hasOwnProperty,HR=Object.prototype.propertyIsEnumerable,FC=(e,t,n)=>t in e?TZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,IZ=(e,t)=>{for(var n in t||(t={}))VR.call(t,n)&&FC(e,n,t[n]);if(Tm)for(var n of Tm(t))HR.call(t,n)&&FC(e,n,t[n]);return e},NZ=(e,t)=>{var n={};for(var r in e)VR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Tm)for(var r of Tm(e))t.indexOf(r)<0&&HR.call(e,r)&&(n[r]=e[r]);return n};const WR=v.forwardRef((e,t)=>{var n=e,{className:r,component:o,style:i,sx:s}=n,a=NZ(n,["className","component","style","sx"]);const{systemStyles:c,rest:u}=Ul(a),f=o||"div";return O.createElement(f,IZ({ref:t,className:MZ(s,c,r),style:i},u))});WR.displayName="@mantine/core/Box";const _e=WR;var RZ=Object.defineProperty,LZ=Object.defineProperties,zZ=Object.getOwnPropertyDescriptors,VC=Object.getOwnPropertySymbols,AZ=Object.prototype.hasOwnProperty,DZ=Object.prototype.propertyIsEnumerable,HC=(e,t,n)=>t in e?RZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,WC=(e,t)=>{for(var n in t||(t={}))AZ.call(t,n)&&HC(e,n,t[n]);if(VC)for(var n of VC(t))DZ.call(t,n)&&HC(e,n,t[n]);return e},jZ=(e,t)=>LZ(e,zZ(t)),BZ=te(e=>({root:jZ(WC(WC({},e.fn.focusStyles()),e.fn.fontStyles()),{cursor:"pointer",border:0,padding:0,appearance:"none",fontSize:e.fontSizes.md,backgroundColor:"transparent",textAlign:"left",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,textDecoration:"none",boxSizing:"border-box"})}));const FZ=BZ;var VZ=Object.defineProperty,Im=Object.getOwnPropertySymbols,UR=Object.prototype.hasOwnProperty,ZR=Object.prototype.propertyIsEnumerable,UC=(e,t,n)=>t in e?VZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,HZ=(e,t)=>{for(var n in t||(t={}))UR.call(t,n)&&UC(e,n,t[n]);if(Im)for(var n of Im(t))ZR.call(t,n)&&UC(e,n,t[n]);return e},WZ=(e,t)=>{var n={};for(var r in e)UR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Im)for(var r of Im(e))t.indexOf(r)<0&&ZR.call(e,r)&&(n[r]=e[r]);return n};const KR=v.forwardRef((e,t)=>{const n=ue("UnstyledButton",{},e),{className:r,component:o="button",unstyled:i,variant:s}=n,a=WZ(n,["className","component","unstyled","variant"]),{classes:c,cx:u}=FZ(null,{name:"UnstyledButton",unstyled:i,variant:s});return O.createElement(_e,HZ({component:o,ref:t,className:u(c.root,r),type:o==="button"?"button":void 0},a))});KR.displayName="@mantine/core/UnstyledButton";const Bn=KR;var _r={},UZ={get exports(){return _r},set exports(e){_r=e}},So={},tb={},ZZ={get exports(){return tb},set exports(e){tb=e}},GR={};/** + * @license React + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */(function(e){function t(A,q){var H=A.length;A.push(q);e:for(;0>>1,re=A[ee];if(0>>1;eeo(X,H))neo(fe,X)?(A[ee]=fe,A[ne]=H,ee=ne):(A[ee]=X,A[Pe]=H,ee=Pe);else if(neo(fe,H))A[ee]=fe,A[ne]=H,ee=ne;else break e}}return q}function o(A,q){var H=A.sortIndex-q.sortIndex;return H!==0?H:A.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var c=[],u=[],f=1,p=null,h=3,g=!1,y=!1,_=!1,k=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function P(A){for(var q=n(u);q!==null;){if(q.callback===null)r(u);else if(q.startTime<=A)r(u),q.sortIndex=q.expirationTime,t(c,q);else break;q=n(u)}}function E(A){if(_=!1,P(A),!y)if(n(c)!==null)y=!0,J($);else{var q=n(u);q!==null&&G(E,q.startTime-A)}}function $(A,q){y=!1,_&&(_=!1,b(R),R=-1),g=!0;var H=h;try{for(P(q),p=n(c);p!==null&&(!(p.expirationTime>q)||A&&!D());){var ee=p.callback;if(typeof ee=="function"){p.callback=null,h=p.priorityLevel;var re=ee(p.expirationTime<=q);q=e.unstable_now(),typeof re=="function"?p.callback=re:p===n(c)&&r(c),P(q)}else r(c);p=n(c)}if(p!==null)var he=!0;else{var Pe=n(u);Pe!==null&&G(E,Pe.startTime-q),he=!1}return he}finally{p=null,h=H,g=!1}}var I=!1,N=null,R=-1,F=5,B=-1;function D(){return!(e.unstable_now()-BA||125ee?(A.sortIndex=H,t(u,A),n(c)===null&&A===n(u)&&(_?(b(R),R=-1):_=!0,G(E,H-ee))):(A.sortIndex=re,t(c,A),y||g||(y=!0,J($))),A},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(A){var q=h;return function(){var H=h;h=q;try{return A.apply(this,arguments)}finally{h=H}}}})(GR);(function(e){e.exports=GR})(ZZ);/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var qR=v,yo=tb;function ae(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),nb=Object.prototype.hasOwnProperty,KZ=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ZC={},KC={};function GZ(e){return nb.call(KC,e)?!0:nb.call(ZC,e)?!1:KZ.test(e)?KC[e]=!0:(ZC[e]=!0,!1)}function qZ(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function YZ(e,t,n,r){if(t===null||typeof t>"u"||qZ(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Lr(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var or={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){or[e]=new Lr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];or[t]=new Lr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){or[e]=new Lr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){or[e]=new Lr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){or[e]=new Lr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){or[e]=new Lr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){or[e]=new Lr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){or[e]=new Lr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){or[e]=new Lr(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ex=/[\-:]([a-z])/g;function $x(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Ex,$x);or[t]=new Lr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Ex,$x);or[t]=new Lr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Ex,$x);or[t]=new Lr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){or[e]=new Lr(e,1,!1,e.toLowerCase(),null,!1,!1)});or.xlinkHref=new Lr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){or[e]=new Lr(e,1,!1,e.toLowerCase(),null,!0,!0)});function Mx(e,t,n,r){var o=or.hasOwnProperty(t)?or[t]:null;(o!==null?o.type!==0:r||!(2a||o[s]!==i[a]){var c=` +`+o[s].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=s&&0<=a);break}}}finally{t_=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?vd(e):""}function JZ(e){switch(e.tag){case 5:return vd(e.type);case 16:return vd("Lazy");case 13:return vd("Suspense");case 19:return vd("SuspenseList");case 0:case 2:case 15:return e=n_(e.type,!1),e;case 11:return e=n_(e.type.render,!1),e;case 1:return e=n_(e.type,!0),e;default:return""}}function sb(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case _c:return"Fragment";case yc:return"Portal";case rb:return"Profiler";case Tx:return"StrictMode";case ob:return"Suspense";case ib:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case XR:return(e.displayName||"Context")+".Consumer";case JR:return(e._context.displayName||"Context")+".Provider";case Ix:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Nx:return t=e.displayName||null,t!==null?t:sb(e.type)||"Memo";case Vs:t=e._payload,e=e._init;try{return sb(e(t))}catch{}}return null}function XZ(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return sb(t);case 8:return t===Tx?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Pa(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function e4(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function QZ(e){var t=e4(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Vp(e){e._valueTracker||(e._valueTracker=QZ(e))}function t4(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=e4(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Nm(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ab(e,t){var n=t.checked;return Jt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function qC(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Pa(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function n4(e,t){t=t.checked,t!=null&&Mx(e,"checked",t,!1)}function lb(e,t){n4(e,t);var n=Pa(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?cb(e,t.type,n):t.hasOwnProperty("defaultValue")&&cb(e,t.type,Pa(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function YC(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function cb(e,t,n){(t!=="number"||Nm(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var yd=Array.isArray;function jc(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Hp.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function sf(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Td={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},eK=["Webkit","ms","Moz","O"];Object.keys(Td).forEach(function(e){eK.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Td[t]=Td[e]})});function s4(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Td.hasOwnProperty(e)&&Td[e]?(""+t).trim():t+"px"}function a4(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=s4(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var tK=Jt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function fb(e,t){if(t){if(tK[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ae(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ae(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ae(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ae(62))}}function pb(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var hb=null;function Rx(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var mb=null,Bc=null,Fc=null;function QC(e){if(e=Jf(e)){if(typeof mb!="function")throw Error(ae(280));var t=e.stateNode;t&&(t=S0(t),mb(e.stateNode,e.type,t))}}function l4(e){Bc?Fc?Fc.push(e):Fc=[e]:Bc=e}function c4(){if(Bc){var e=Bc,t=Fc;if(Fc=Bc=null,QC(e),t)for(e=0;e>>=0,e===0?32:31-(fK(e)/pK|0)|0}var Wp=64,Up=4194304;function _d(e){switch(e&-e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Am(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~o;a!==0?r=_d(a):(i&=s,i!==0&&(r=_d(i)))}else s=n&~o,s!==0?r=_d(s):i!==0&&(r=_d(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function qf(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Qo(t),e[t]=n}function vK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Nd),lO=String.fromCharCode(32),cO=!1;function $4(e,t){switch(e){case"keyup":return UK.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function M4(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wc=!1;function KK(e,t){switch(e){case"compositionend":return M4(t);case"keypress":return t.which!==32?null:(cO=!0,lO);case"textInput":return e=t.data,e===lO&&cO?null:e;default:return null}}function GK(e,t){if(wc)return e==="compositionend"||!Vx&&$4(e,t)?(e=O4(),qh=jx=Js=null,wc=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=pO(n)}}function R4(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?R4(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function L4(){for(var e=window,t=Nm();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Nm(e.document)}return t}function Hx(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function rG(e){var t=L4(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&R4(n.ownerDocument.documentElement,n)){if(r!==null&&Hx(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=hO(n,i);var s=hO(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,bc=null,bb=null,Ld=null,Sb=!1;function mO(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Sb||bc==null||bc!==Nm(r)||(r=bc,"selectionStart"in r&&Hx(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ld&&ff(Ld,r)||(Ld=r,r=Bm(bb,"onSelect"),0kc||(e.current=Eb[kc],Eb[kc]=null,kc--)}function $t(e,t){kc++,Eb[kc]=e.current,e.current=t}var Ca={},wr=Ra(Ca),Jr=Ra(!1),Tl=Ca;function eu(e,t){var n=e.type.contextTypes;if(!n)return Ca;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Xr(e){return e=e.childContextTypes,e!=null}function Vm(){At(Jr),At(wr)}function SO(e,t,n){if(wr.current!==Ca)throw Error(ae(168));$t(wr,t),$t(Jr,n)}function W4(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(ae(108,XZ(e)||"Unknown",o));return Jt({},n,r)}function Hm(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ca,Tl=wr.current,$t(wr,e),$t(Jr,Jr.current),!0}function xO(e,t,n){var r=e.stateNode;if(!r)throw Error(ae(169));n?(e=W4(e,t,Tl),r.__reactInternalMemoizedMergedChildContext=e,At(Jr),At(wr),$t(wr,e)):At(Jr),$t(Jr,n)}var ss=null,x0=!1,g_=!1;function U4(e){ss===null?ss=[e]:ss.push(e)}function mG(e){x0=!0,U4(e)}function La(){if(!g_&&ss!==null){g_=!0;var e=0,t=yt;try{var n=ss;for(yt=1;e>=s,o-=s,cs=1<<32-Qo(t)+o|n<R?(F=N,N=null):F=N.sibling;var B=h(b,N,P[R],E);if(B===null){N===null&&(N=F);break}e&&N&&B.alternate===null&&t(b,N),S=i(B,S,R),I===null?$=B:I.sibling=B,I=B,N=F}if(R===P.length)return n(b,N),jt&&tl(b,R),$;if(N===null){for(;RR?(F=N,N=null):F=N.sibling;var D=h(b,N,B.value,E);if(D===null){N===null&&(N=F);break}e&&N&&D.alternate===null&&t(b,N),S=i(D,S,R),I===null?$=D:I.sibling=D,I=D,N=F}if(B.done)return n(b,N),jt&&tl(b,R),$;if(N===null){for(;!B.done;R++,B=P.next())B=p(b,B.value,E),B!==null&&(S=i(B,S,R),I===null?$=B:I.sibling=B,I=B);return jt&&tl(b,R),$}for(N=r(b,N);!B.done;R++,B=P.next())B=g(N,b,R,B.value,E),B!==null&&(e&&B.alternate!==null&&N.delete(B.key===null?R:B.key),S=i(B,S,R),I===null?$=B:I.sibling=B,I=B);return e&&N.forEach(function(K){return t(b,K)}),jt&&tl(b,R),$}function k(b,S,P,E){if(typeof P=="object"&&P!==null&&P.type===_c&&P.key===null&&(P=P.props.children),typeof P=="object"&&P!==null){switch(P.$$typeof){case Fp:e:{for(var $=P.key,I=S;I!==null;){if(I.key===$){if($=P.type,$===_c){if(I.tag===7){n(b,I.sibling),S=o(I,P.props.children),S.return=b,b=S;break e}}else if(I.elementType===$||typeof $=="object"&&$!==null&&$.$$typeof===Vs&&MO($)===I.type){n(b,I.sibling),S=o(I,P.props),S.ref=id(b,I,P),S.return=b,b=S;break e}n(b,I);break}else t(b,I);I=I.sibling}P.type===_c?(S=xl(P.props.children,b.mode,E,P.key),S.return=b,b=S):(E=rm(P.type,P.key,P.props,null,b.mode,E),E.ref=id(b,S,P),E.return=b,b=E)}return s(b);case yc:e:{for(I=P.key;S!==null;){if(S.key===I)if(S.tag===4&&S.stateNode.containerInfo===P.containerInfo&&S.stateNode.implementation===P.implementation){n(b,S.sibling),S=o(S,P.children||[]),S.return=b,b=S;break e}else{n(b,S);break}else t(b,S);S=S.sibling}S=k_(P,b.mode,E),S.return=b,b=S}return s(b);case Vs:return I=P._init,k(b,S,I(P._payload),E)}if(yd(P))return y(b,S,P,E);if(ed(P))return _(b,S,P,E);Xp(b,P)}return typeof P=="string"&&P!==""||typeof P=="number"?(P=""+P,S!==null&&S.tag===6?(n(b,S.sibling),S=o(S,P),S.return=b,b=S):(n(b,S),S=x_(P,b.mode,E),S.return=b,b=S),s(b)):n(b,S)}return k}var nu=Q4(!0),eL=Q4(!1),Xf={},Bi=Ra(Xf),gf=Ra(Xf),vf=Ra(Xf);function ml(e){if(e===Xf)throw Error(ae(174));return e}function Xx(e,t){switch($t(vf,t),$t(gf,e),$t(Bi,Xf),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:db(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=db(t,e)}At(Bi),$t(Bi,t)}function ru(){At(Bi),At(gf),At(vf)}function tL(e){ml(vf.current);var t=ml(Bi.current),n=db(t,e.type);t!==n&&($t(gf,e),$t(Bi,n))}function Qx(e){gf.current===e&&(At(Bi),At(gf))}var qt=Ra(0);function qm(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var v_=[];function ek(){for(var e=0;en?n:4,e(!0);var r=y_.transition;y_.transition={};try{e(!1),t()}finally{yt=n,y_.transition=r}}function vL(){return Fo().memoizedState}function _G(e,t,n){var r=pa(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},yL(e))_L(t,n);else if(n=q4(e,t,n,r),n!==null){var o=$r();ei(n,e,r,o),wL(n,t,r)}}function wG(e,t,n){var r=pa(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(yL(e))_L(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,n);if(o.hasEagerState=!0,o.eagerState=a,ai(a,s)){var c=t.interleaved;c===null?(o.next=o,Yx(t)):(o.next=c.next,c.next=o),t.interleaved=o;return}}catch{}finally{}n=q4(e,t,o,r),n!==null&&(o=$r(),ei(n,e,r,o),wL(n,t,r))}}function yL(e){var t=e.alternate;return e===Yt||t!==null&&t===Yt}function _L(e,t){zd=Ym=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function wL(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,zx(e,n)}}var Jm={readContext:Bo,useCallback:fr,useContext:fr,useEffect:fr,useImperativeHandle:fr,useInsertionEffect:fr,useLayoutEffect:fr,useMemo:fr,useReducer:fr,useRef:fr,useState:fr,useDebugValue:fr,useDeferredValue:fr,useTransition:fr,useMutableSource:fr,useSyncExternalStore:fr,useId:fr,unstable_isNewReconciler:!1},bG={readContext:Bo,useCallback:function(e,t){return bi().memoizedState=[e,t===void 0?null:t],e},useContext:Bo,useEffect:IO,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Qh(4194308,4,fL.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Qh(4194308,4,e,t)},useInsertionEffect:function(e,t){return Qh(4,2,e,t)},useMemo:function(e,t){var n=bi();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=bi();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=_G.bind(null,Yt,e),[r.memoizedState,e]},useRef:function(e){var t=bi();return e={current:e},t.memoizedState=e},useState:TO,useDebugValue:ik,useDeferredValue:function(e){return bi().memoizedState=e},useTransition:function(){var e=TO(!1),t=e[0];return e=yG.bind(null,e[1]),bi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Yt,o=bi();if(jt){if(n===void 0)throw Error(ae(407));n=n()}else{if(n=t(),Dn===null)throw Error(ae(349));Nl&30||oL(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,IO(sL.bind(null,r,i,e),[e]),r.flags|=2048,wf(9,iL.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=bi(),t=Dn.identifierPrefix;if(jt){var n=us,r=cs;n=(r&~(1<<32-Qo(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=yf++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Ti]=t,e[mf]=r,$L(e,t,!1,!1),t.stateNode=e;e:{switch(s=pb(n,r),n){case"dialog":Lt("cancel",e),Lt("close",e),o=r;break;case"iframe":case"object":case"embed":Lt("load",e),o=r;break;case"video":case"audio":for(o=0;oiu&&(t.flags|=128,r=!0,sd(i,!1),t.lanes=4194304)}else{if(!r)if(e=qm(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),sd(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!jt)return pr(t),null}else 2*dn()-i.renderingStartTime>iu&&n!==1073741824&&(t.flags|=128,r=!0,sd(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=dn(),t.sibling=null,n=qt.current,$t(qt,r?n&1|2:n&1),t):(pr(t),null);case 22:case 23:return dk(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?so&1073741824&&(pr(t),t.subtreeFlags&6&&(t.flags|=8192)):pr(t),null;case 24:return null;case 25:return null}throw Error(ae(156,t.tag))}function $G(e,t){switch(Ux(t),t.tag){case 1:return Xr(t.type)&&Vm(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ru(),At(Jr),At(wr),ek(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Qx(t),null;case 13:if(At(qt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ae(340));tu()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return At(qt),null;case 4:return ru(),null;case 10:return qx(t.type._context),null;case 22:case 23:return dk(),null;case 24:return null;default:return null}}var eh=!1,vr=!1,MG=typeof WeakSet=="function"?WeakSet:Set,we=null;function Ec(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){en(e,t,r)}else n.current=null}function Bb(e,t,n){try{n()}catch(r){en(e,t,r)}}var FO=!1;function TG(e,t){if(xb=Dm,e=L4(),Hx(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,a=-1,c=-1,u=0,f=0,p=e,h=null;t:for(;;){for(var g;p!==n||o!==0&&p.nodeType!==3||(a=s+o),p!==i||r!==0&&p.nodeType!==3||(c=s+r),p.nodeType===3&&(s+=p.nodeValue.length),(g=p.firstChild)!==null;)h=p,p=g;for(;;){if(p===e)break t;if(h===n&&++u===o&&(a=s),h===i&&++f===r&&(c=s),(g=p.nextSibling)!==null)break;p=h,h=p.parentNode}p=g}n=a===-1||c===-1?null:{start:a,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(kb={focusedElem:e,selectionRange:n},Dm=!1,we=t;we!==null;)if(t=we,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,we=e;else for(;we!==null;){t=we;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var _=y.memoizedProps,k=y.memoizedState,b=t.stateNode,S=b.getSnapshotBeforeUpdate(t.elementType===t.type?_:Zo(t.type,_),k);b.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var P=t.stateNode.containerInfo;P.nodeType===1?P.textContent="":P.nodeType===9&&P.documentElement&&P.removeChild(P.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ae(163))}}catch(E){en(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,we=e;break}we=t.return}return y=FO,FO=!1,y}function Ad(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Bb(t,n,i)}o=o.next}while(o!==r)}}function C0(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Fb(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function IL(e){var t=e.alternate;t!==null&&(e.alternate=null,IL(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ti],delete t[mf],delete t[Ob],delete t[pG],delete t[hG])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function NL(e){return e.tag===5||e.tag===3||e.tag===4}function VO(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||NL(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Vb(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Fm));else if(r!==4&&(e=e.child,e!==null))for(Vb(e,t,n),e=e.sibling;e!==null;)Vb(e,t,n),e=e.sibling}function Hb(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Hb(e,t,n),e=e.sibling;e!==null;)Hb(e,t,n),e=e.sibling}var Yn=null,Ko=!1;function Is(e,t,n){for(n=n.child;n!==null;)RL(e,t,n),n=n.sibling}function RL(e,t,n){if(ji&&typeof ji.onCommitFiberUnmount=="function")try{ji.onCommitFiberUnmount(y0,n)}catch{}switch(n.tag){case 5:vr||Ec(n,t);case 6:var r=Yn,o=Ko;Yn=null,Is(e,t,n),Yn=r,Ko=o,Yn!==null&&(Ko?(e=Yn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Yn.removeChild(n.stateNode));break;case 18:Yn!==null&&(Ko?(e=Yn,n=n.stateNode,e.nodeType===8?m_(e.parentNode,n):e.nodeType===1&&m_(e,n),uf(e)):m_(Yn,n.stateNode));break;case 4:r=Yn,o=Ko,Yn=n.stateNode.containerInfo,Ko=!0,Is(e,t,n),Yn=r,Ko=o;break;case 0:case 11:case 14:case 15:if(!vr&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&Bb(n,t,s),o=o.next}while(o!==r)}Is(e,t,n);break;case 1:if(!vr&&(Ec(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){en(n,t,a)}Is(e,t,n);break;case 21:Is(e,t,n);break;case 22:n.mode&1?(vr=(r=vr)||n.memoizedState!==null,Is(e,t,n),vr=r):Is(e,t,n);break;default:Is(e,t,n)}}function HO(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new MG),t.forEach(function(r){var o=BG.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Uo(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=dn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*NG(r/1960))-r,10e?16:e,Xs===null)var r=!1;else{if(e=Xs,Xs=null,eg=0,ct&6)throw Error(ae(331));var o=ct;for(ct|=4,we=e.current;we!==null;){var i=we,s=i.child;if(we.flags&16){var a=i.deletions;if(a!==null){for(var c=0;cdn()-ck?Sl(e,0):lk|=n),Qr(e,t)}function VL(e,t){t===0&&(e.mode&1?(t=Up,Up<<=1,!(Up&130023424)&&(Up=4194304)):t=1);var n=$r();e=gs(e,t),e!==null&&(qf(e,t,n),Qr(e,n))}function jG(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),VL(e,n)}function BG(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ae(314))}r!==null&&r.delete(t),VL(e,n)}var HL;HL=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Jr.current)Yr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Yr=!1,OG(e,t,n);Yr=!!(e.flags&131072)}else Yr=!1,jt&&t.flags&1048576&&Z4(t,Um,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;em(e,t),e=t.pendingProps;var o=eu(t,wr.current);Hc(t,n),o=nk(null,t,r,e,o,n);var i=rk();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Xr(r)?(i=!0,Hm(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Jx(t),o.updater=k0,t.stateNode=o,o._reactInternals=t,Nb(t,r,e,n),t=zb(null,t,r,!0,i,n)):(t.tag=0,jt&&i&&Wx(t),Cr(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(em(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=VG(r),e=Zo(r,e),o){case 0:t=Lb(null,t,r,e,n);break e;case 1:t=DO(null,t,r,e,n);break e;case 11:t=zO(null,t,r,e,n);break e;case 14:t=AO(null,t,r,Zo(r.type,e),n);break e}throw Error(ae(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Zo(r,o),Lb(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Zo(r,o),DO(e,t,r,o,n);case 3:e:{if(CL(t),e===null)throw Error(ae(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Y4(e,t),Gm(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=ou(Error(ae(423)),t),t=jO(e,t,r,n,o);break e}else if(r!==o){o=ou(Error(ae(424)),t),t=jO(e,t,r,n,o);break e}else for(ho=ua(t.stateNode.containerInfo.firstChild),vo=t,jt=!0,Go=null,n=eL(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(tu(),r===o){t=vs(e,t,n);break e}Cr(e,t,r,n)}t=t.child}return t;case 5:return tL(t),e===null&&Mb(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Pb(r,o)?s=null:i!==null&&Pb(r,i)&&(t.flags|=32),PL(e,t),Cr(e,t,s,n),t.child;case 6:return e===null&&Mb(t),null;case 13:return OL(e,t,n);case 4:return Xx(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=nu(t,null,r,n):Cr(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Zo(r,o),zO(e,t,r,o,n);case 7:return Cr(e,t,t.pendingProps,n),t.child;case 8:return Cr(e,t,t.pendingProps.children,n),t.child;case 12:return Cr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,$t(Zm,r._currentValue),r._currentValue=s,i!==null)if(ai(i.value,s)){if(i.children===o.children&&!Jr.current){t=vs(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var c=a.firstContext;c!==null;){if(c.context===r){if(i.tag===1){c=ds(-1,n&-n),c.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?c.next=c:(c.next=f.next,f.next=c),u.pending=c}}i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),Tb(i.return,n,t),a.lanes|=n;break}c=c.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(ae(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Tb(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}Cr(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Hc(t,n),o=Bo(o),r=r(o),t.flags|=1,Cr(e,t,r,n),t.child;case 14:return r=t.type,o=Zo(r,t.pendingProps),o=Zo(r.type,o),AO(e,t,r,o,n);case 15:return xL(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Zo(r,o),em(e,t),t.tag=1,Xr(r)?(e=!0,Hm(t)):e=!1,Hc(t,n),X4(t,r,o),Nb(t,r,o,n),zb(null,t,r,!0,e,n);case 19:return EL(e,t,n);case 22:return kL(e,t,n)}throw Error(ae(156,t.tag))};function WL(e,t){return g4(e,t)}function FG(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ao(e,t,n,r){return new FG(e,t,n,r)}function pk(e){return e=e.prototype,!(!e||!e.isReactComponent)}function VG(e){if(typeof e=="function")return pk(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ix)return 11;if(e===Nx)return 14}return 2}function ha(e,t){var n=e.alternate;return n===null?(n=Ao(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function rm(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")pk(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case _c:return xl(n.children,o,i,t);case Tx:s=8,o|=8;break;case rb:return e=Ao(12,n,t,o|2),e.elementType=rb,e.lanes=i,e;case ob:return e=Ao(13,n,t,o),e.elementType=ob,e.lanes=i,e;case ib:return e=Ao(19,n,t,o),e.elementType=ib,e.lanes=i,e;case QR:return E0(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case JR:s=10;break e;case XR:s=9;break e;case Ix:s=11;break e;case Nx:s=14;break e;case Vs:s=16,r=null;break e}throw Error(ae(130,e==null?e:typeof e,""))}return t=Ao(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function xl(e,t,n,r){return e=Ao(7,e,r,t),e.lanes=n,e}function E0(e,t,n,r){return e=Ao(22,e,r,t),e.elementType=QR,e.lanes=n,e.stateNode={isHidden:!1},e}function x_(e,t,n){return e=Ao(6,e,null,t),e.lanes=n,e}function k_(e,t,n){return t=Ao(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function HG(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=o_(0),this.expirationTimes=o_(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=o_(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function hk(e,t,n,r,o,i,s,a,c){return e=new HG(e,t,n,a,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Ao(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Jx(i),e}function WG(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=So})(UZ);const qG=px(_r);var YG=Object.defineProperty,JG=Object.defineProperties,XG=Object.getOwnPropertyDescriptors,rg=Object.getOwnPropertySymbols,GL=Object.prototype.hasOwnProperty,qL=Object.prototype.propertyIsEnumerable,JO=(e,t,n)=>t in e?YG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ja=(e,t)=>{for(var n in t||(t={}))GL.call(t,n)&&JO(e,n,t[n]);if(rg)for(var n of rg(t))qL.call(t,n)&&JO(e,n,t[n]);return e},P_=(e,t)=>JG(e,XG(t)),QG=(e,t)=>{var n={};for(var r in e)GL.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&rg)for(var r of rg(e))t.indexOf(r)<0&&qL.call(e,r)&&(n[r]=e[r]);return n};function eq(e){if(!e||typeof e=="string")return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function C_(e){return e?.current?e.current.scrollHeight:"auto"}const rh=typeof window<"u"&&window.requestAnimationFrame;function tq({transitionDuration:e,transitionTimingFunction:t="ease",onTransitionEnd:n=()=>{},opened:r}){const o=v.useRef(null),i=0,s={display:"none",height:0,overflow:"hidden"},[a,c]=v.useState(r?{}:s),u=y=>{_r.flushSync(()=>c(y))},f=y=>{u(_=>Ja(Ja({},_),y))};function p(y){return{transition:`height ${e||eq(y)}ms ${t}`}}An(()=>{rh(r?()=>{f({willChange:"height",display:"block",overflow:"hidden"}),rh(()=>{const y=C_(o);f(P_(Ja({},p(y)),{height:y}))})}:()=>{const y=C_(o);f(P_(Ja({},p(y)),{willChange:"height",height:y})),rh(()=>f({height:i,overflow:"hidden"}))})},[r]);const h=y=>{if(!(y.target!==o.current||y.propertyName!=="height"))if(r){const _=C_(o);_===a.height?u({}):f({height:_}),n()}else a.height===i&&(u(s),n())};function g(y={}){var _=y,{style:k={},refKey:b="ref"}=_,S=QG(_,["style","refKey"]);const P=S[b];return P_(Ja({"aria-hidden":!r},S),{[b]:DR(o,P),onTransitionEnd:h,style:Ja(Ja({boxSizing:"border-box"},k),a)})}return g}var nq=Object.defineProperty,og=Object.getOwnPropertySymbols,YL=Object.prototype.hasOwnProperty,JL=Object.prototype.propertyIsEnumerable,XO=(e,t,n)=>t in e?nq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oh=(e,t)=>{for(var n in t||(t={}))YL.call(t,n)&&XO(e,n,t[n]);if(og)for(var n of og(t))JL.call(t,n)&&XO(e,n,t[n]);return e},rq=(e,t)=>{var n={};for(var r in e)YL.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&og)for(var r of og(e))t.indexOf(r)<0&&JL.call(e,r)&&(n[r]=e[r]);return n};const oq={transitionDuration:200,transitionTimingFunction:"ease",animateOpacity:!0},yk=v.forwardRef((e,t)=>{const n=ue("Collapse",oq,e),{children:r,in:o,transitionDuration:i,transitionTimingFunction:s,style:a,onTransitionEnd:c,animateOpacity:u}=n,f=rq(n,["children","in","transitionDuration","transitionTimingFunction","style","onTransitionEnd","animateOpacity"]),p=Sr(),h=v0(),y=(p.respectReducedMotion?h:!1)?0:i,{systemStyles:_,rest:k}=Ul(f),b=tq({opened:o,transitionDuration:y,transitionTimingFunction:s,onTransitionEnd:c});return y===0?o?O.createElement(_e,oh({},k),r):null:O.createElement(_e,oh({},b(oh(oh({style:a,ref:t},k),_))),O.createElement("div",{style:{opacity:o||!u?1:0,transition:u?`opacity ${y}ms ${s}`:"none"}},r))});yk.displayName="@mantine/core/Collapse";var iq=Object.defineProperty,sq=Object.defineProperties,aq=Object.getOwnPropertyDescriptors,QO=Object.getOwnPropertySymbols,lq=Object.prototype.hasOwnProperty,cq=Object.prototype.propertyIsEnumerable,eE=(e,t,n)=>t in e?iq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gb=(e,t)=>{for(var n in t||(t={}))lq.call(t,n)&&eE(e,n,t[n]);if(QO)for(var n of QO(t))cq.call(t,n)&&eE(e,n,t[n]);return e},tE=(e,t)=>sq(e,aq(t));const uq=["subtle","filled","outline","light","default","transparent","gradient"],ih={xs:T(18),sm:T(22),md:T(28),lg:T(34),xl:T(44)};function dq({variant:e,theme:t,color:n,gradient:r}){const o=t.fn.variant({color:n,variant:e,gradient:r});return e==="gradient"?{border:0,backgroundImage:o.background,color:o.color,"&:hover":t.fn.hover({backgroundSize:"200%"})}:uq.includes(e)?Gb({border:`${T(1)} solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover})):null}var fq=te((e,{radius:t,color:n,gradient:r},{variant:o,size:i})=>({root:tE(Gb({position:"relative",borderRadius:e.fn.radius(t),padding:0,lineHeight:1,display:"flex",alignItems:"center",justifyContent:"center",height:Q({size:i,sizes:ih}),minHeight:Q({size:i,sizes:ih}),width:Q({size:i,sizes:ih}),minWidth:Q({size:i,sizes:ih})},dq({variant:o,theme:e,color:n,gradient:r})),{"&:active":e.activeStyles,"& [data-action-icon-loader]":{maxWidth:"70%"},"&:disabled, &[data-disabled]":{color:e.colors.gray[e.colorScheme==="dark"?6:4],cursor:"not-allowed",backgroundColor:o==="transparent"?void 0:e.fn.themeColor("gray",e.colorScheme==="dark"?8:1),borderColor:o==="transparent"?void 0:e.fn.themeColor("gray",e.colorScheme==="dark"?8:1),backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":tE(Gb({content:'""'},e.fn.cover(T(-1))),{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:e.fn.radius(t),cursor:"not-allowed"})}})}));const pq=fq;var hq=Object.defineProperty,ig=Object.getOwnPropertySymbols,XL=Object.prototype.hasOwnProperty,QL=Object.prototype.propertyIsEnumerable,nE=(e,t,n)=>t in e?hq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mq=(e,t)=>{for(var n in t||(t={}))XL.call(t,n)&&nE(e,n,t[n]);if(ig)for(var n of ig(t))QL.call(t,n)&&nE(e,n,t[n]);return e},gq=(e,t)=>{var n={};for(var r in e)XL.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ig)for(var r of ig(e))t.indexOf(r)<0&&QL.call(e,r)&&(n[r]=e[r]);return n};function vq(e){var t=e,{size:n,color:r}=t,o=gq(t,["size","color"]);return O.createElement("svg",mq({viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:r,width:n},o),O.createElement("rect",{y:"10",width:"15",height:"120",rx:"6"},O.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),O.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),O.createElement("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},O.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),O.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),O.createElement("rect",{x:"60",width:"15",height:"140",rx:"6"},O.createElement("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),O.createElement("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),O.createElement("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},O.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),O.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),O.createElement("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},O.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),O.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})))}var yq=Object.defineProperty,sg=Object.getOwnPropertySymbols,ez=Object.prototype.hasOwnProperty,tz=Object.prototype.propertyIsEnumerable,rE=(e,t,n)=>t in e?yq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_q=(e,t)=>{for(var n in t||(t={}))ez.call(t,n)&&rE(e,n,t[n]);if(sg)for(var n of sg(t))tz.call(t,n)&&rE(e,n,t[n]);return e},wq=(e,t)=>{var n={};for(var r in e)ez.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&sg)for(var r of sg(e))t.indexOf(r)<0&&tz.call(e,r)&&(n[r]=e[r]);return n};function bq(e){var t=e,{size:n,color:r}=t,o=wq(t,["size","color"]);return O.createElement("svg",_q({width:n,height:n,viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:r},o),O.createElement("g",{fill:"none",fillRule:"evenodd"},O.createElement("g",{transform:"translate(2.5 2.5)",strokeWidth:"5"},O.createElement("circle",{strokeOpacity:".5",cx:"16",cy:"16",r:"16"}),O.createElement("path",{d:"M32 16c0-9.94-8.06-16-16-16"},O.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"1s",repeatCount:"indefinite"})))))}var Sq=Object.defineProperty,ag=Object.getOwnPropertySymbols,nz=Object.prototype.hasOwnProperty,rz=Object.prototype.propertyIsEnumerable,oE=(e,t,n)=>t in e?Sq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xq=(e,t)=>{for(var n in t||(t={}))nz.call(t,n)&&oE(e,n,t[n]);if(ag)for(var n of ag(t))rz.call(t,n)&&oE(e,n,t[n]);return e},kq=(e,t)=>{var n={};for(var r in e)nz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ag)for(var r of ag(e))t.indexOf(r)<0&&rz.call(e,r)&&(n[r]=e[r]);return n};function Pq(e){var t=e,{size:n,color:r}=t,o=kq(t,["size","color"]);return O.createElement("svg",xq({width:n,viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:r},o),O.createElement("circle",{cx:"15",cy:"15",r:"15"},O.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),O.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})),O.createElement("circle",{cx:"60",cy:"15",r:"9",fillOpacity:"0.3"},O.createElement("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),O.createElement("animate",{attributeName:"fill-opacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})),O.createElement("circle",{cx:"105",cy:"15",r:"15"},O.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),O.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})))}var Cq=Object.defineProperty,lg=Object.getOwnPropertySymbols,oz=Object.prototype.hasOwnProperty,iz=Object.prototype.propertyIsEnumerable,iE=(e,t,n)=>t in e?Cq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Oq=(e,t)=>{for(var n in t||(t={}))oz.call(t,n)&&iE(e,n,t[n]);if(lg)for(var n of lg(t))iz.call(t,n)&&iE(e,n,t[n]);return e},Eq=(e,t)=>{var n={};for(var r in e)oz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&lg)for(var r of lg(e))t.indexOf(r)<0&&iz.call(e,r)&&(n[r]=e[r]);return n};const O_={bars:vq,oval:bq,dots:Pq},$q={xs:T(18),sm:T(22),md:T(36),lg:T(44),xl:T(58)},Mq={size:"md"};function Qf(e){const t=ue("Loader",Mq,e),{size:n,color:r,variant:o}=t,i=Eq(t,["size","color","variant"]),s=Sr(),a=o in O_?o:s.loader;return O.createElement(_e,Oq({role:"presentation",component:O_[a]||O_.bars,size:Q({size:n,sizes:$q}),color:s.fn.variant({variant:"filled",primaryFallback:!1,color:r||s.primaryColor}).background},i))}Qf.displayName="@mantine/core/Loader";var Tq=Object.defineProperty,cg=Object.getOwnPropertySymbols,sz=Object.prototype.hasOwnProperty,az=Object.prototype.propertyIsEnumerable,sE=(e,t,n)=>t in e?Tq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,aE=(e,t)=>{for(var n in t||(t={}))sz.call(t,n)&&sE(e,n,t[n]);if(cg)for(var n of cg(t))az.call(t,n)&&sE(e,n,t[n]);return e},Iq=(e,t)=>{var n={};for(var r in e)sz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&cg)for(var r of cg(e))t.indexOf(r)<0&&az.call(e,r)&&(n[r]=e[r]);return n};const Nq={color:"gray",size:"md",variant:"subtle"},lz=v.forwardRef((e,t)=>{const n=ue("ActionIcon",Nq,e),{className:r,color:o,children:i,radius:s,size:a,variant:c,gradient:u,disabled:f,loaderProps:p,loading:h,unstyled:g,__staticSelector:y}=n,_=Iq(n,["className","color","children","radius","size","variant","gradient","disabled","loaderProps","loading","unstyled","__staticSelector"]),{classes:k,cx:b,theme:S}=pq({radius:s,color:o,gradient:u},{name:["ActionIcon",y],unstyled:g,size:a,variant:c}),P=O.createElement(Qf,aE({color:S.fn.variant({color:o,variant:c}).color,size:"100%","data-action-icon-loader":!0},p));return O.createElement(Bn,aE({className:b(k.root,r),ref:t,disabled:f,"data-disabled":f||void 0,"data-loading":h||void 0,unstyled:g},_),h?P:i)});lz.displayName="@mantine/core/ActionIcon";const vt=lz;var Rq=Object.defineProperty,Lq=Object.defineProperties,zq=Object.getOwnPropertyDescriptors,ug=Object.getOwnPropertySymbols,cz=Object.prototype.hasOwnProperty,uz=Object.prototype.propertyIsEnumerable,lE=(e,t,n)=>t in e?Rq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Aq=(e,t)=>{for(var n in t||(t={}))cz.call(t,n)&&lE(e,n,t[n]);if(ug)for(var n of ug(t))uz.call(t,n)&&lE(e,n,t[n]);return e},Dq=(e,t)=>Lq(e,zq(t)),jq=(e,t)=>{var n={};for(var r in e)cz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ug)for(var r of ug(e))t.indexOf(r)<0&&uz.call(e,r)&&(n[r]=e[r]);return n};function dz(e){const t=ue("Portal",{},e),{children:n,target:r,className:o,innerRef:i}=t,s=jq(t,["children","target","className","innerRef"]),a=Sr(),[c,u]=v.useState(!1),f=v.useRef();return Ox(()=>(u(!0),f.current=r?typeof r=="string"?document.querySelector(r):r:document.createElement("div"),r||document.body.appendChild(f.current),()=>{!r&&document.body.removeChild(f.current)}),[r]),c?_r.createPortal(O.createElement("div",Dq(Aq({className:o,dir:a.dir},s),{ref:i}),n),f.current):null}dz.displayName="@mantine/core/Portal";var Bq=Object.defineProperty,dg=Object.getOwnPropertySymbols,fz=Object.prototype.hasOwnProperty,pz=Object.prototype.propertyIsEnumerable,cE=(e,t,n)=>t in e?Bq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fq=(e,t)=>{for(var n in t||(t={}))fz.call(t,n)&&cE(e,n,t[n]);if(dg)for(var n of dg(t))pz.call(t,n)&&cE(e,n,t[n]);return e},Vq=(e,t)=>{var n={};for(var r in e)fz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&dg)for(var r of dg(e))t.indexOf(r)<0&&pz.call(e,r)&&(n[r]=e[r]);return n};function ep(e){var t=e,{withinPortal:n=!0,children:r}=t,o=Vq(t,["withinPortal","children"]);return n?O.createElement(dz,Fq({},o),r):O.createElement(O.Fragment,null,r)}ep.displayName="@mantine/core/OptionalPortal";var Hq=Object.defineProperty,Wq=Object.defineProperties,Uq=Object.getOwnPropertyDescriptors,uE=Object.getOwnPropertySymbols,Zq=Object.prototype.hasOwnProperty,Kq=Object.prototype.propertyIsEnumerable,dE=(e,t,n)=>t in e?Hq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,E_=(e,t)=>{for(var n in t||(t={}))Zq.call(t,n)&&dE(e,n,t[n]);if(uE)for(var n of uE(t))Kq.call(t,n)&&dE(e,n,t[n]);return e},fE=(e,t)=>Wq(e,Uq(t));function Gq({variant:e,color:t,theme:n}){if(e==="filled")return{backgroundColor:n.fn.variant({variant:"filled",color:t}).background,color:n.white};if(e==="outline"){const r=n.fn.variant({variant:"outline",color:t});return{color:r.color,borderColor:r.border,backgroundColor:n.colorScheme==="dark"?n.colors.dark[6]:n.white}}if(e==="light"){const r=n.fn.variant({variant:"light",color:t});return{backgroundColor:r.background,color:r.color}}return null}var qq=te((e,{radius:t,color:n},{variant:r})=>({root:E_(fE(E_({},e.fn.fontStyles()),{position:"relative",overflow:"hidden",paddingTop:e.spacing.sm,paddingBottom:e.spacing.sm,paddingLeft:e.spacing.md,paddingRight:e.spacing.sm,borderRadius:e.fn.radius(t),border:`${T(1)} solid transparent`}),Gq({variant:r,color:n,theme:e})),wrapper:{display:"flex"},body:{flex:1},title:{boxSizing:"border-box",margin:0,marginBottom:e.spacing.xs,display:"flex",alignItems:"center",justifyContent:"space-between",lineHeight:e.lineHeight,fontSize:e.fontSizes.sm,fontWeight:700,"&[data-with-close-button]":{paddingRight:e.spacing.md}},label:{display:"block",overflow:"hidden",textOverflow:"ellipsis"},icon:{lineHeight:1,width:T(20),height:T(20),display:"flex",alignItems:"center",justifyContent:"flex-start",marginRight:e.spacing.md,marginTop:1},message:fE(E_({},e.fn.fontStyles()),{lineHeight:e.lineHeight,textOverflow:"ellipsis",overflow:"hidden",fontSize:e.fontSizes.sm,color:r==="filled"?e.white:e.colorScheme==="dark"?r==="light"?e.white:e.colors.dark[0]:e.black}),closeButton:{width:T(10),height:T(10)}}));const Yq=qq;var Jq=Object.defineProperty,pE=Object.getOwnPropertySymbols,Xq=Object.prototype.hasOwnProperty,Qq=Object.prototype.propertyIsEnumerable,hE=(e,t,n)=>t in e?Jq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eY=(e,t)=>{for(var n in t||(t={}))Xq.call(t,n)&&hE(e,n,t[n]);if(pE)for(var n of pE(t))Qq.call(t,n)&&hE(e,n,t[n]);return e};function hz(e){return O.createElement("svg",eY({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),O.createElement("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"}))}hz.displayName="@mantine/core/CloseIcon";var tY=Object.defineProperty,fg=Object.getOwnPropertySymbols,mz=Object.prototype.hasOwnProperty,gz=Object.prototype.propertyIsEnumerable,mE=(e,t,n)=>t in e?tY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nY=(e,t)=>{for(var n in t||(t={}))mz.call(t,n)&&mE(e,n,t[n]);if(fg)for(var n of fg(t))gz.call(t,n)&&mE(e,n,t[n]);return e},rY=(e,t)=>{var n={};for(var r in e)mz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&fg)for(var r of fg(e))t.indexOf(r)<0&&gz.call(e,r)&&(n[r]=e[r]);return n};const oY={xs:T(12),sm:T(16),md:T(20),lg:T(28),xl:T(34)},iY={size:"sm"},vz=v.forwardRef((e,t)=>{const n=ue("CloseButton",iY,e),{iconSize:r,size:o,children:i}=n,s=rY(n,["iconSize","size","children"]),a=T(r||oY[o]);return O.createElement(vt,nY({ref:t,__staticSelector:"CloseButton",size:o},s),i||O.createElement(hz,{width:a,height:a}))});vz.displayName="@mantine/core/CloseButton";const tp=vz;var sY=Object.defineProperty,pg=Object.getOwnPropertySymbols,yz=Object.prototype.hasOwnProperty,_z=Object.prototype.propertyIsEnumerable,gE=(e,t,n)=>t in e?sY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,aY=(e,t)=>{for(var n in t||(t={}))yz.call(t,n)&&gE(e,n,t[n]);if(pg)for(var n of pg(t))_z.call(t,n)&&gE(e,n,t[n]);return e},lY=(e,t)=>{var n={};for(var r in e)yz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&pg)for(var r of pg(e))t.indexOf(r)<0&&_z.call(e,r)&&(n[r]=e[r]);return n};const cY={variant:"light"},_k=v.forwardRef((e,t)=>{const n=ue("Alert",cY,e),{id:r,className:o,title:i,variant:s,children:a,color:c,classNames:u,icon:f,styles:p,onClose:h,radius:g,withCloseButton:y,closeButtonLabel:_,unstyled:k}=n,b=lY(n,["id","className","title","variant","children","color","classNames","icon","styles","onClose","radius","withCloseButton","closeButtonLabel","unstyled"]),{classes:S,cx:P}=Yq({color:c,radius:g},{classNames:u,styles:p,unstyled:k,variant:s,name:"Alert"}),E=Ia(r),$=i&&`${E}-title`,I=`${E}-body`;return O.createElement(_e,aY({id:E,role:"alert","aria-labelledby":$,"aria-describedby":I,className:P(S.root,S[s],o),ref:t},b),O.createElement("div",{className:S.wrapper},f&&O.createElement("div",{className:S.icon},f),O.createElement("div",{className:S.body},i&&O.createElement("div",{className:S.title,"data-with-close-button":y||void 0},O.createElement("span",{id:$,className:S.label},i)),O.createElement("div",{id:I,className:S.message},a)),y&&O.createElement(tp,{className:S.closeButton,onClick:h,variant:"transparent",size:16,iconSize:16,"aria-label":_})))});_k.displayName="@mantine/core/Alert";var uY=Object.defineProperty,dY=Object.defineProperties,fY=Object.getOwnPropertyDescriptors,vE=Object.getOwnPropertySymbols,pY=Object.prototype.hasOwnProperty,hY=Object.prototype.propertyIsEnumerable,yE=(e,t,n)=>t in e?uY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sh=(e,t)=>{for(var n in t||(t={}))pY.call(t,n)&&yE(e,n,t[n]);if(vE)for(var n of vE(t))hY.call(t,n)&&yE(e,n,t[n]);return e},mY=(e,t)=>dY(e,fY(t));function gY({underline:e,strikethrough:t}){const n=[];return e&&n.push("underline"),t&&n.push("line-through"),n.length>0?n.join(" "):"none"}function vY({theme:e,color:t}){return t==="dimmed"?e.fn.dimmed():typeof t=="string"&&(t in e.colors||t.split(".")[0]in e.colors)?e.fn.variant({variant:"filled",color:t}).background:t||"inherit"}function yY(e){return typeof e=="number"?{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical"}:null}function _Y({theme:e,truncate:t}){return t==="start"?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",direction:e.dir==="ltr"?"rtl":"ltr",textAlign:e.dir==="ltr"?"right":"left"}:t?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:null}var wY=te((e,{color:t,lineClamp:n,truncate:r,inline:o,inherit:i,underline:s,gradient:a,weight:c,transform:u,align:f,strikethrough:p,italic:h},{size:g})=>{const y=e.fn.variant({variant:"gradient",gradient:a});return{root:mY(sh(sh(sh(sh({},e.fn.fontStyles()),e.fn.focusStyles()),yY(n)),_Y({theme:e,truncate:r})),{color:vY({color:t,theme:e}),fontFamily:i?"inherit":e.fontFamily,fontSize:i||g===void 0?"inherit":Q({size:g,sizes:e.fontSizes}),lineHeight:i?"inherit":o?1:e.lineHeight,textDecoration:gY({underline:s,strikethrough:p}),WebkitTapHighlightColor:"transparent",fontWeight:i?"inherit":c,textTransform:u,textAlign:f,fontStyle:h?"italic":void 0}),gradient:{backgroundImage:y.background,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"}}});const bY=wY;var SY=Object.defineProperty,hg=Object.getOwnPropertySymbols,wz=Object.prototype.hasOwnProperty,bz=Object.prototype.propertyIsEnumerable,_E=(e,t,n)=>t in e?SY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xY=(e,t)=>{for(var n in t||(t={}))wz.call(t,n)&&_E(e,n,t[n]);if(hg)for(var n of hg(t))bz.call(t,n)&&_E(e,n,t[n]);return e},kY=(e,t)=>{var n={};for(var r in e)wz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&hg)for(var r of hg(e))t.indexOf(r)<0&&bz.call(e,r)&&(n[r]=e[r]);return n};const PY={variant:"text"},Sz=v.forwardRef((e,t)=>{const n=ue("Text",PY,e),{className:r,size:o,weight:i,transform:s,color:a,align:c,variant:u,lineClamp:f,truncate:p,gradient:h,inline:g,inherit:y,underline:_,strikethrough:k,italic:b,classNames:S,styles:P,unstyled:E,span:$,__staticSelector:I}=n,N=kY(n,["className","size","weight","transform","color","align","variant","lineClamp","truncate","gradient","inline","inherit","underline","strikethrough","italic","classNames","styles","unstyled","span","__staticSelector"]),{classes:R,cx:F}=bY({color:a,lineClamp:f,truncate:p,inline:g,inherit:y,underline:_,strikethrough:k,italic:b,weight:i,transform:s,align:c,gradient:h},{unstyled:E,name:I||"Text",variant:u,size:o});return O.createElement(_e,xY({ref:t,className:F(R.root,{[R.gradient]:u==="gradient"},r),component:$?"span":"div"},N))});Sz.displayName="@mantine/core/Text";const ie=Sz,xz=v.createContext({zIndex:1e3,fixed:!1,layout:"default"});xz.Provider;function CY(){return v.useContext(xz)}function kz(e,t){if(!e)return[];const n=Object.keys(e).filter(r=>r!=="base").map(r=>[Q({size:r,sizes:t.breakpoints,units:"em"}),e[r]]);return n.sort((r,o)=>Hi(r[0])-Hi(o[0])),n}var OY=Object.defineProperty,EY=Object.defineProperties,$Y=Object.getOwnPropertyDescriptors,wE=Object.getOwnPropertySymbols,MY=Object.prototype.hasOwnProperty,TY=Object.prototype.propertyIsEnumerable,bE=(e,t,n)=>t in e?OY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ah=(e,t)=>{for(var n in t||(t={}))MY.call(t,n)&&bE(e,n,t[n]);if(wE)for(var n of wE(t))TY.call(t,n)&&bE(e,n,t[n]);return e},SE=(e,t)=>EY(e,$Y(t)),IY=te((e,{height:t,width:n,fixed:r,position:o,hiddenBreakpoint:i,zIndex:s,section:a,withBorder:c,layout:u})=>{const f=typeof n=="object"&&n!==null?kz(n,e).reduce((h,[g,y])=>(h[`@media (min-width: ${ka(g)})`]={width:T(y),minWidth:T(y)},h),{}):null,p=c?{[a==="navbar"?"borderRight":"borderLeft"]:`${T(1)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`}:{};return{root:SE(ah(ah(SE(ah(ah({},e.fn.fontStyles()),o),{top:u==="alt"?0:o?.top||"var(--mantine-header-height)",bottom:0,zIndex:s,height:t?T(t):u==="alt"?"auto":"calc(100vh - var(--mantine-header-height, 0rem) - var(--mantine-footer-height, 0rem))",width:n?.base?T(n?.base):"100%",position:r?"fixed":"static",boxSizing:"border-box",display:"flex",flexDirection:"column",backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white}),p),f),{"&[data-hidden]":{[`@media (max-width: ${ka(Hi(Q({size:i,sizes:e.breakpoints}))-1)})`]:{display:"none"}}})}});const NY=IY;var RY=Object.defineProperty,mg=Object.getOwnPropertySymbols,Pz=Object.prototype.hasOwnProperty,Cz=Object.prototype.propertyIsEnumerable,xE=(e,t,n)=>t in e?RY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kE=(e,t)=>{for(var n in t||(t={}))Pz.call(t,n)&&xE(e,n,t[n]);if(mg)for(var n of mg(t))Cz.call(t,n)&&xE(e,n,t[n]);return e},LY=(e,t)=>{var n={};for(var r in e)Pz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&mg)for(var r of mg(e))t.indexOf(r)<0&&Cz.call(e,r)&&(n[r]=e[r]);return n};const Oz=v.forwardRef((e,t)=>{var n=e,{width:r,height:o,fixed:i=!1,position:s,zIndex:a,hiddenBreakpoint:c="md",hidden:u=!1,withBorder:f=!0,className:p,classNames:h,styles:g,children:y,section:_,__staticSelector:k,unstyled:b,variant:S}=n,P=LY(n,["width","height","fixed","position","zIndex","hiddenBreakpoint","hidden","withBorder","className","classNames","styles","children","section","__staticSelector","unstyled","variant"]);const E=CY(),{classes:$,cx:I,theme:N}=NY({width:r,height:o,fixed:E.fixed||i,position:s,hiddenBreakpoint:c,zIndex:a||E.zIndex||Ki("app"),section:_,withBorder:f,layout:E.layout},{classNames:h,styles:g,name:k,unstyled:b,variant:S}),R=kz(r,N).reduce((F,[B,D])=>(F[`@media (min-width: ${ka(B)})`]={[`--mantine-${_}-width`]:T(D)},F),{});return O.createElement(_e,kE({component:_==="navbar"?"nav":"aside",ref:t,"data-hidden":u||void 0,className:I($.root,p)},P),y,O.createElement(FU,{styles:()=>({":root":kE({[`--mantine-${_}-width`]:r?.base?T(r.base):"0rem"},R)})}))});Oz.displayName="@mantine/core/HorizontalSection";var zY=Object.defineProperty,gg=Object.getOwnPropertySymbols,Ez=Object.prototype.hasOwnProperty,$z=Object.prototype.propertyIsEnumerable,PE=(e,t,n)=>t in e?zY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,AY=(e,t)=>{for(var n in t||(t={}))Ez.call(t,n)&&PE(e,n,t[n]);if(gg)for(var n of gg(t))$z.call(t,n)&&PE(e,n,t[n]);return e},DY=(e,t)=>{var n={};for(var r in e)Ez.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&gg)for(var r of gg(e))t.indexOf(r)<0&&$z.call(e,r)&&(n[r]=e[r]);return n};const Mz=v.forwardRef((e,t)=>{var n=e,{children:r,grow:o=!1,sx:i}=n,s=DY(n,["children","grow","sx"]);return O.createElement(_e,AY({ref:t,sx:[{flex:o?1:0,boxSizing:"border-box"},...Wf(i)]},s),r)});Mz.displayName="@mantine/core/Section";const jY=Mz;var BY=Object.defineProperty,CE=Object.getOwnPropertySymbols,FY=Object.prototype.hasOwnProperty,VY=Object.prototype.propertyIsEnumerable,OE=(e,t,n)=>t in e?BY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,HY=(e,t)=>{for(var n in t||(t={}))FY.call(t,n)&&OE(e,n,t[n]);if(CE)for(var n of CE(t))VY.call(t,n)&&OE(e,n,t[n]);return e};const WY={fixed:!1,position:{top:0,left:0},hiddenBreakpoint:"md",hidden:!1},vg=v.forwardRef((e,t)=>{const n=ue("Navbar",WY,e);return O.createElement(Oz,HY({section:"navbar",__staticSelector:"Navbar",ref:t},n))});vg.Section=jY;vg.displayName="@mantine/core/Navbar";const lh={xs:T(1),sm:T(2),md:T(3),lg:T(4),xl:T(5)};function ch(e,t){const n=e.fn.variant({variant:"outline",color:t}).border;return typeof t=="string"&&(t in e.colors||t.split(".")[0]in e.colors)?n:t===void 0?e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]:t}var UY=te((e,{color:t},{size:n,variant:r})=>({root:{},withLabel:{borderTop:"0 !important"},left:{"&::before":{display:"none"}},right:{"&::after":{display:"none"}},label:{display:"flex",alignItems:"center","&::before":{content:'""',flex:1,height:T(1),borderTop:`${Q({size:n,sizes:lh})} ${r} ${ch(e,t)}`,marginRight:e.spacing.xs},"&::after":{content:'""',flex:1,borderTop:`${Q({size:n,sizes:lh})} ${r} ${ch(e,t)}`,marginLeft:e.spacing.xs}},labelDefaultStyles:{color:t==="dark"?e.colors.dark[1]:e.fn.themeColor(t,e.colorScheme==="dark"?5:e.fn.primaryShade(),!1)},horizontal:{border:0,borderTopWidth:T(Q({size:n,sizes:lh})),borderTopColor:ch(e,t),borderTopStyle:r,margin:0},vertical:{border:0,alignSelf:"stretch",height:"auto",borderLeftWidth:T(Q({size:n,sizes:lh})),borderLeftColor:ch(e,t),borderLeftStyle:r}}));const ZY=UY;var KY=Object.defineProperty,GY=Object.defineProperties,qY=Object.getOwnPropertyDescriptors,yg=Object.getOwnPropertySymbols,Tz=Object.prototype.hasOwnProperty,Iz=Object.prototype.propertyIsEnumerable,EE=(e,t,n)=>t in e?KY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$E=(e,t)=>{for(var n in t||(t={}))Tz.call(t,n)&&EE(e,n,t[n]);if(yg)for(var n of yg(t))Iz.call(t,n)&&EE(e,n,t[n]);return e},YY=(e,t)=>GY(e,qY(t)),JY=(e,t)=>{var n={};for(var r in e)Tz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&yg)for(var r of yg(e))t.indexOf(r)<0&&Iz.call(e,r)&&(n[r]=e[r]);return n};const XY={orientation:"horizontal",size:"xs",labelPosition:"left",variant:"solid"},fn=v.forwardRef((e,t)=>{const n=ue("Divider",XY,e),{className:r,color:o,orientation:i,size:s,label:a,labelPosition:c,labelProps:u,variant:f,styles:p,classNames:h,unstyled:g}=n,y=JY(n,["className","color","orientation","size","label","labelPosition","labelProps","variant","styles","classNames","unstyled"]),{classes:_,cx:k}=ZY({color:o},{classNames:h,styles:p,unstyled:g,name:"Divider",variant:f,size:s}),b=i==="vertical",S=i==="horizontal",P=!!a&&S,E=!u?.color;return O.createElement(_e,$E({ref:t,className:k(_.root,{[_.vertical]:b,[_.horizontal]:S,[_.withLabel]:P},r),role:"separator"},y),P&&O.createElement(ie,YY($E({},u),{size:u?.size||"xs",mt:T(2),className:k(_.label,_[c],{[_.labelDefaultStyles]:E})}),a))});fn.displayName="@mantine/core/Divider";var QY=Object.defineProperty,eJ=Object.defineProperties,tJ=Object.getOwnPropertyDescriptors,ME=Object.getOwnPropertySymbols,nJ=Object.prototype.hasOwnProperty,rJ=Object.prototype.propertyIsEnumerable,TE=(e,t,n)=>t in e?QY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,IE=(e,t)=>{for(var n in t||(t={}))nJ.call(t,n)&&TE(e,n,t[n]);if(ME)for(var n of ME(t))rJ.call(t,n)&&TE(e,n,t[n]);return e},oJ=(e,t)=>eJ(e,tJ(t)),iJ=te((e,t,{size:n})=>({item:oJ(IE({},e.fn.fontStyles()),{boxSizing:"border-box",textAlign:"left",width:"100%",padding:`calc(${Q({size:n,sizes:e.spacing})} / 1.5) ${Q({size:n,sizes:e.spacing})}`,cursor:"pointer",fontSize:Q({size:n,sizes:e.fontSizes}),color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,borderRadius:e.fn.radius(),"&[data-hovered]":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[1]},"&[data-selected]":IE({backgroundColor:e.fn.variant({variant:"filled"}).background,color:e.fn.variant({variant:"filled"}).color},e.fn.hover({backgroundColor:e.fn.variant({variant:"filled"}).hover})),"&[data-disabled]":{cursor:"default",color:e.colors.dark[2]}}),nothingFound:{boxSizing:"border-box",color:e.colors.gray[6],paddingTop:`calc(${Q({size:n,sizes:e.spacing})} / 2)`,paddingBottom:`calc(${Q({size:n,sizes:e.spacing})} / 2)`,textAlign:"center"},separator:{boxSizing:"border-box",textAlign:"left",width:"100%",padding:`calc(${Q({size:n,sizes:e.spacing})} / 1.5) ${Q({size:n,sizes:e.spacing})}`},separatorLabel:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}));const sJ=iJ;var aJ=Object.defineProperty,NE=Object.getOwnPropertySymbols,lJ=Object.prototype.hasOwnProperty,cJ=Object.prototype.propertyIsEnumerable,RE=(e,t,n)=>t in e?aJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,uJ=(e,t)=>{for(var n in t||(t={}))lJ.call(t,n)&&RE(e,n,t[n]);if(NE)for(var n of NE(t))cJ.call(t,n)&&RE(e,n,t[n]);return e};function wk({data:e,hovered:t,classNames:n,styles:r,isItemSelected:o,uuid:i,__staticSelector:s,onItemHover:a,onItemSelect:c,itemsRefs:u,itemComponent:f,size:p,nothingFound:h,creatable:g,createLabel:y,unstyled:_,variant:k}){const{classes:b}=sJ(null,{classNames:n,styles:r,unstyled:_,name:s,variant:k,size:p}),S=[],P=[];let E=null;const $=(N,R)=>{const F=typeof o=="function"?o(N.value):!1;return O.createElement(f,uJ({key:N.value,className:b.item,"data-disabled":N.disabled||void 0,"data-hovered":!N.disabled&&t===R||void 0,"data-selected":!N.disabled&&F||void 0,selected:F,onMouseEnter:()=>a(R),id:`${i}-${R}`,role:"option",tabIndex:-1,"aria-selected":t===R,ref:B=>{u&&u.current&&(u.current[N.value]=B)},onMouseDown:N.disabled?null:B=>{B.preventDefault(),c(N)},disabled:N.disabled,variant:k},N))};let I=null;if(e.forEach((N,R)=>{N.creatable?E=R:N.group?(I!==N.group&&(I=N.group,P.push(O.createElement("div",{className:b.separator,key:`__mantine-divider-${R}`},O.createElement(fn,{classNames:{label:b.separatorLabel},label:N.group})))),P.push($(N,R))):S.push($(N,R))}),g){const N=e[E];S.push(O.createElement("div",{key:Md(),className:b.item,"data-hovered":t===E||void 0,onMouseEnter:()=>a(E),onMouseDown:R=>{R.preventDefault(),c(N)},tabIndex:-1,ref:R=>{u&&u.current&&(u.current[N.value]=R)}},y))}return P.length>0&&S.length>0&&S.unshift(O.createElement("div",{className:b.separator,key:"empty-group-separator"},O.createElement(fn,null))),P.length>0||S.length>0?O.createElement(O.Fragment,null,P,S):O.createElement(ie,{size:p,unstyled:_,className:b.nothingFound},h)}wk.displayName="@mantine/core/SelectItems";var dJ=Object.defineProperty,_g=Object.getOwnPropertySymbols,Nz=Object.prototype.hasOwnProperty,Rz=Object.prototype.propertyIsEnumerable,LE=(e,t,n)=>t in e?dJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fJ=(e,t)=>{for(var n in t||(t={}))Nz.call(t,n)&&LE(e,n,t[n]);if(_g)for(var n of _g(t))Rz.call(t,n)&&LE(e,n,t[n]);return e},pJ=(e,t)=>{var n={};for(var r in e)Nz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&_g)for(var r of _g(e))t.indexOf(r)<0&&Rz.call(e,r)&&(n[r]=e[r]);return n};const bk=v.forwardRef((e,t)=>{var n=e,{label:r,value:o}=n,i=pJ(n,["label","value"]);return O.createElement("div",fJ({ref:t},i),r||o)});bk.displayName="@mantine/core/DefaultItem";function hJ(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Lz(...e){return t=>e.forEach(n=>hJ(n,t))}function Gl(...e){return v.useCallback(Lz(...e),e)}const zz=v.forwardRef((e,t)=>{const{children:n,...r}=e,o=v.Children.toArray(n),i=o.find(gJ);if(i){const s=i.props.children,a=o.map(c=>c===i?v.Children.count(s)>1?v.Children.only(null):v.isValidElement(s)?s.props.children:null:c);return v.createElement(qb,Bt({},r,{ref:t}),v.isValidElement(s)?v.cloneElement(s,void 0,a):null)}return v.createElement(qb,Bt({},r,{ref:t}),n)});zz.displayName="Slot";const qb=v.forwardRef((e,t)=>{const{children:n,...r}=e;return v.isValidElement(n)?v.cloneElement(n,{...vJ(r,n.props),ref:Lz(t,n.ref)}):v.Children.count(n)>1?v.Children.only(null):null});qb.displayName="SlotClone";const mJ=({children:e})=>v.createElement(v.Fragment,null,e);function gJ(e){return v.isValidElement(e)&&e.type===mJ}function vJ(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const yJ=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],np=yJ.reduce((e,t)=>{const n=v.forwardRef((r,o)=>{const{asChild:i,...s}=r,a=i?zz:t;return v.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),v.createElement(a,Bt({},s,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Yb=globalThis?.document?v.useLayoutEffect:()=>{};function _J(e,t){return v.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const rp=e=>{const{present:t,children:n}=e,r=wJ(t),o=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),i=Gl(r.ref,o.ref);return typeof n=="function"||r.isPresent?v.cloneElement(o,{ref:i}):null};rp.displayName="Presence";function wJ(e){const[t,n]=v.useState(),r=v.useRef({}),o=v.useRef(e),i=v.useRef("none"),s=e?"mounted":"unmounted",[a,c]=_J(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const u=uh(r.current);i.current=a==="mounted"?u:"none"},[a]),Yb(()=>{const u=r.current,f=o.current;if(f!==e){const h=i.current,g=uh(u);e?c("MOUNT"):g==="none"||u?.display==="none"?c("UNMOUNT"):c(f&&h!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Yb(()=>{if(t){const u=p=>{const g=uh(r.current).includes(p.animationName);p.target===t&&g&&_r.flushSync(()=>c("ANIMATION_END"))},f=p=>{p.target===t&&(i.current=uh(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:v.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function uh(e){return e?.animationName||"none"}function bJ(e,t=[]){let n=[];function r(i,s){const a=v.createContext(s),c=n.length;n=[...n,s];function u(p){const{scope:h,children:g,...y}=p,_=h?.[e][c]||a,k=v.useMemo(()=>y,Object.values(y));return v.createElement(_.Provider,{value:k},g)}function f(p,h){const g=h?.[e][c]||a,y=v.useContext(g);if(y)return y;if(s!==void 0)return s;throw new Error(`\`${p}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}const o=()=>{const i=n.map(s=>v.createContext(s));return function(a){const c=a?.[e]||i;return v.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,SJ(o,...t)]}function SJ(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:c,scopeName:u})=>{const p=c(i)[`__scope${u}`];return{...a,...p}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function il(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}const xJ=v.createContext(void 0);function kJ(e){const t=v.useContext(xJ);return e||t||"ltr"}function PJ(e,[t,n]){return Math.min(n,Math.max(t,e))}function kl(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function CJ(e,t){return v.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const Az="ScrollArea",[Dz,yOe]=bJ(Az),[OJ,Vo]=Dz(Az),EJ=v.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:i=600,...s}=e,[a,c]=v.useState(null),[u,f]=v.useState(null),[p,h]=v.useState(null),[g,y]=v.useState(null),[_,k]=v.useState(null),[b,S]=v.useState(0),[P,E]=v.useState(0),[$,I]=v.useState(!1),[N,R]=v.useState(!1),F=Gl(t,D=>c(D)),B=kJ(o);return v.createElement(OJ,{scope:n,type:r,dir:B,scrollHideDelay:i,scrollArea:a,viewport:u,onViewportChange:f,content:p,onContentChange:h,scrollbarX:g,onScrollbarXChange:y,scrollbarXEnabled:$,onScrollbarXEnabledChange:I,scrollbarY:_,onScrollbarYChange:k,scrollbarYEnabled:N,onScrollbarYEnabledChange:R,onCornerWidthChange:S,onCornerHeightChange:E},v.createElement(np.div,Bt({dir:B},s,{ref:F,style:{position:"relative",["--radix-scroll-area-corner-width"]:b+"px",["--radix-scroll-area-corner-height"]:P+"px",...e.style}})))}),$J="ScrollAreaViewport",MJ=v.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,...o}=e,i=Vo($J,n),s=v.useRef(null),a=Gl(t,s,i.onViewportChange);return v.createElement(v.Fragment,null,v.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),v.createElement(np.div,Bt({"data-radix-scroll-area-viewport":""},o,{ref:a,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style}}),v.createElement("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"}},r)))}),Ss="ScrollAreaScrollbar",TJ=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Vo(Ss,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:s}=o,a=e.orientation==="horizontal";return v.useEffect(()=>(a?i(!0):s(!0),()=>{a?i(!1):s(!1)}),[a,i,s]),o.type==="hover"?v.createElement(IJ,Bt({},r,{ref:t,forceMount:n})):o.type==="scroll"?v.createElement(NJ,Bt({},r,{ref:t,forceMount:n})):o.type==="auto"?v.createElement(jz,Bt({},r,{ref:t,forceMount:n})):o.type==="always"?v.createElement(Sk,Bt({},r,{ref:t})):null}),IJ=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Vo(Ss,e.__scopeScrollArea),[i,s]=v.useState(!1);return v.useEffect(()=>{const a=o.scrollArea;let c=0;if(a){const u=()=>{window.clearTimeout(c),s(!0)},f=()=>{c=window.setTimeout(()=>s(!1),o.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",f),()=>{window.clearTimeout(c),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",f)}}},[o.scrollArea,o.scrollHideDelay]),v.createElement(rp,{present:n||i},v.createElement(jz,Bt({"data-state":i?"visible":"hidden"},r,{ref:t})))}),NJ=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Vo(Ss,e.__scopeScrollArea),i=e.orientation==="horizontal",s=R0(()=>c("SCROLL_END"),100),[a,c]=CJ("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return v.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>c("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,o.scrollHideDelay,c]),v.useEffect(()=>{const u=o.viewport,f=i?"scrollLeft":"scrollTop";if(u){let p=u[f];const h=()=>{const g=u[f];p!==g&&(c("SCROLL"),s()),p=g};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[o.viewport,i,c,s]),v.createElement(rp,{present:n||a!=="hidden"},v.createElement(Sk,Bt({"data-state":a==="hidden"?"hidden":"visible"},r,{ref:t,onPointerEnter:kl(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:kl(e.onPointerLeave,()=>c("POINTER_LEAVE"))})))}),jz=v.forwardRef((e,t)=>{const n=Vo(Ss,e.__scopeScrollArea),{forceMount:r,...o}=e,[i,s]=v.useState(!1),a=e.orientation==="horizontal",c=R0(()=>{if(n.viewport){const u=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=e,o=Vo(Ss,e.__scopeScrollArea),i=v.useRef(null),s=v.useRef(0),[a,c]=v.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=Hz(a.viewport,a.content),f={...r,sizes:a,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:h=>i.current=h,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:h=>s.current=h};function p(h,g){return FJ(h,s.current,a,g)}return n==="horizontal"?v.createElement(RJ,Bt({},f,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const h=o.viewport.scrollLeft,g=zE(h,a,o.dir);i.current.style.transform=`translate3d(${g}px, 0, 0)`}},onWheelScroll:h=>{o.viewport&&(o.viewport.scrollLeft=h)},onDragScroll:h=>{o.viewport&&(o.viewport.scrollLeft=p(h,o.dir))}})):n==="vertical"?v.createElement(LJ,Bt({},f,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const h=o.viewport.scrollTop,g=zE(h,a);i.current.style.transform=`translate3d(0, ${g}px, 0)`}},onWheelScroll:h=>{o.viewport&&(o.viewport.scrollTop=h)},onDragScroll:h=>{o.viewport&&(o.viewport.scrollTop=p(h))}})):null}),RJ=v.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=Vo(Ss,e.__scopeScrollArea),[s,a]=v.useState(),c=v.useRef(null),u=Gl(t,c,i.onScrollbarXChange);return v.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),v.createElement(Fz,Bt({"data-orientation":"horizontal"},o,{ref:u,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,["--radix-scroll-area-thumb-width"]:N0(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,p)=>{if(i.viewport){const h=i.viewport.scrollLeft+f.deltaX;e.onWheelScroll(h),Uz(h,p)&&f.preventDefault()}},onResize:()=>{c.current&&i.viewport&&s&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:wg(s.paddingLeft),paddingEnd:wg(s.paddingRight)}})}}))}),LJ=v.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=Vo(Ss,e.__scopeScrollArea),[s,a]=v.useState(),c=v.useRef(null),u=Gl(t,c,i.onScrollbarYChange);return v.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),v.createElement(Fz,Bt({"data-orientation":"vertical"},o,{ref:u,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)",["--radix-scroll-area-thumb-height"]:N0(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,p)=>{if(i.viewport){const h=i.viewport.scrollTop+f.deltaY;e.onWheelScroll(h),Uz(h,p)&&f.preventDefault()}},onResize:()=>{c.current&&i.viewport&&s&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:wg(s.paddingTop),paddingEnd:wg(s.paddingBottom)}})}}))}),[zJ,Bz]=Dz(Ss),Fz=v.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:i,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:f,onResize:p,...h}=e,g=Vo(Ss,n),[y,_]=v.useState(null),k=Gl(t,F=>_(F)),b=v.useRef(null),S=v.useRef(""),P=g.viewport,E=r.content-r.viewport,$=il(f),I=il(c),N=R0(p,10);function R(F){if(b.current){const B=F.clientX-b.current.left,D=F.clientY-b.current.top;u({x:B,y:D})}}return v.useEffect(()=>{const F=B=>{const D=B.target;y?.contains(D)&&$(B,E)};return document.addEventListener("wheel",F,{passive:!1}),()=>document.removeEventListener("wheel",F,{passive:!1})},[P,y,E,$]),v.useEffect(I,[r,I]),su(y,N),su(g.content,N),v.createElement(zJ,{scope:n,scrollbar:y,hasThumb:o,onThumbChange:il(i),onThumbPointerUp:il(s),onThumbPositionChange:I,onThumbPointerDown:il(a)},v.createElement(np.div,Bt({},h,{ref:k,style:{position:"absolute",...h.style},onPointerDown:kl(e.onPointerDown,F=>{F.button===0&&(F.target.setPointerCapture(F.pointerId),b.current=y.getBoundingClientRect(),S.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",R(F))}),onPointerMove:kl(e.onPointerMove,R),onPointerUp:kl(e.onPointerUp,F=>{const B=F.target;B.hasPointerCapture(F.pointerId)&&B.releasePointerCapture(F.pointerId),document.body.style.webkitUserSelect=S.current,b.current=null})})))}),Jb="ScrollAreaThumb",AJ=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Bz(Jb,e.__scopeScrollArea);return v.createElement(rp,{present:n||o.hasThumb},v.createElement(DJ,Bt({ref:t},r)))}),DJ=v.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,i=Vo(Jb,n),s=Bz(Jb,n),{onThumbPositionChange:a}=s,c=Gl(t,p=>s.onThumbChange(p)),u=v.useRef(),f=R0(()=>{u.current&&(u.current(),u.current=void 0)},100);return v.useEffect(()=>{const p=i.viewport;if(p){const h=()=>{if(f(),!u.current){const g=VJ(p,a);u.current=g,a()}};return a(),p.addEventListener("scroll",h),()=>p.removeEventListener("scroll",h)}},[i.viewport,f,a]),v.createElement(np.div,Bt({"data-state":s.hasThumb?"visible":"hidden"},o,{ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:kl(e.onPointerDownCapture,p=>{const g=p.target.getBoundingClientRect(),y=p.clientX-g.left,_=p.clientY-g.top;s.onThumbPointerDown({x:y,y:_})}),onPointerUp:kl(e.onPointerUp,s.onThumbPointerUp)}))}),Vz="ScrollAreaCorner",jJ=v.forwardRef((e,t)=>{const n=Vo(Vz,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?v.createElement(BJ,Bt({},e,{ref:t})):null}),BJ=v.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=Vo(Vz,n),[i,s]=v.useState(0),[a,c]=v.useState(0),u=!!(i&&a);return su(o.scrollbarX,()=>{var f;const p=((f=o.scrollbarX)===null||f===void 0?void 0:f.offsetHeight)||0;o.onCornerHeightChange(p),c(p)}),su(o.scrollbarY,()=>{var f;const p=((f=o.scrollbarY)===null||f===void 0?void 0:f.offsetWidth)||0;o.onCornerWidthChange(p),s(p)}),u?v.createElement(np.div,Bt({},r,{ref:t,style:{width:i,height:a,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function wg(e){return e?parseInt(e,10):0}function Hz(e,t){const n=e/t;return isNaN(n)?0:n}function N0(e){const t=Hz(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function FJ(e,t,n,r="ltr"){const o=N0(n),i=o/2,s=t||i,a=o-s,c=n.scrollbar.paddingStart+s,u=n.scrollbar.size-n.scrollbar.paddingEnd-a,f=n.content-n.viewport,p=r==="ltr"?[0,f]:[f*-1,0];return Wz([c,u],p)(e)}function zE(e,t,n="ltr"){const r=N0(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,s=t.content-t.viewport,a=i-r,c=n==="ltr"?[0,s]:[s*-1,0],u=PJ(e,c);return Wz([0,s],[0,a])(u)}function Wz(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Uz(e,t){return e>0&&e{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},s=n.left!==i.left,a=n.top!==i.top;(s||a)&&t(),n=i,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function R0(e,t){const n=il(e),r=v.useRef(0);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),v.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function su(e,t){const n=il(t);Yb(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}const HJ=EJ,WJ=MJ,AE=TJ,DE=AJ,UJ=jJ;var ZJ=te((e,{scrollbarSize:t,offsetScrollbars:n,scrollbarHovered:r,hidden:o})=>({root:{overflow:"hidden"},viewport:{width:"100%",height:"100%",paddingRight:n?T(t):void 0,paddingBottom:n?T(t):void 0},scrollbar:{display:o?"none":"flex",userSelect:"none",touchAction:"none",boxSizing:"border-box",padding:`calc(${T(t)} / 5)`,transition:"background-color 150ms ease, opacity 150ms ease","&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0],[`& .${On("thumb")}`]:{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.white,.5):e.fn.rgba(e.black,.5)}},'&[data-orientation="vertical"]':{width:T(t)},'&[data-orientation="horizontal"]':{flexDirection:"column",height:T(t)},'&[data-state="hidden"]':{display:"none",opacity:0}},thumb:{ref:On("thumb"),flex:1,backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.white,.4):e.fn.rgba(e.black,.4),borderRadius:T(t),position:"relative",transition:"background-color 150ms ease",display:o?"none":void 0,overflow:"hidden","&::before":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"100%",height:"100%",minWidth:T(44),minHeight:T(44)}},corner:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0],transition:"opacity 150ms ease",opacity:r?1:0,display:o?"none":void 0}}));const KJ=ZJ;var GJ=Object.defineProperty,qJ=Object.defineProperties,YJ=Object.getOwnPropertyDescriptors,bg=Object.getOwnPropertySymbols,Zz=Object.prototype.hasOwnProperty,Kz=Object.prototype.propertyIsEnumerable,jE=(e,t,n)=>t in e?GJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xb=(e,t)=>{for(var n in t||(t={}))Zz.call(t,n)&&jE(e,n,t[n]);if(bg)for(var n of bg(t))Kz.call(t,n)&&jE(e,n,t[n]);return e},Gz=(e,t)=>qJ(e,YJ(t)),qz=(e,t)=>{var n={};for(var r in e)Zz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&bg)for(var r of bg(e))t.indexOf(r)<0&&Kz.call(e,r)&&(n[r]=e[r]);return n};const Yz={scrollbarSize:12,scrollHideDelay:1e3,type:"hover",offsetScrollbars:!1},L0=v.forwardRef((e,t)=>{const n=ue("ScrollArea",Yz,e),{children:r,className:o,classNames:i,styles:s,scrollbarSize:a,scrollHideDelay:c,type:u,dir:f,offsetScrollbars:p,viewportRef:h,onScrollPositionChange:g,unstyled:y,variant:_,viewportProps:k}=n,b=qz(n,["children","className","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","variant","viewportProps"]),[S,P]=v.useState(!1),E=Sr(),{classes:$,cx:I}=KJ({scrollbarSize:a,offsetScrollbars:p,scrollbarHovered:S,hidden:u==="never"},{name:"ScrollArea",classNames:i,styles:s,unstyled:y,variant:_});return O.createElement(HJ,{type:u==="never"?"always":u,scrollHideDelay:c,dir:f||E.dir,ref:t,asChild:!0},O.createElement(_e,Xb({className:I($.root,o)},b),O.createElement(WJ,Gz(Xb({},k),{className:$.viewport,ref:h,onScroll:typeof g=="function"?({currentTarget:N})=>g({x:N.scrollLeft,y:N.scrollTop}):void 0}),r),O.createElement(AE,{orientation:"horizontal",className:$.scrollbar,forceMount:!0,onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1)},O.createElement(DE,{className:$.thumb})),O.createElement(AE,{orientation:"vertical",className:$.scrollbar,forceMount:!0,onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1)},O.createElement(DE,{className:$.thumb})),O.createElement(UJ,{className:$.corner})))}),Jz=v.forwardRef((e,t)=>{const n=ue("ScrollAreaAutosize",Yz,e),{children:r,classNames:o,styles:i,scrollbarSize:s,scrollHideDelay:a,type:c,dir:u,offsetScrollbars:f,viewportRef:p,onScrollPositionChange:h,unstyled:g,sx:y,variant:_,viewportProps:k}=n,b=qz(n,["children","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","sx","variant","viewportProps"]);return O.createElement(_e,Gz(Xb({},b),{ref:t,sx:[{display:"flex"},...Wf(y)]}),O.createElement(_e,{sx:{display:"flex",flexDirection:"column",flex:1}},O.createElement(L0,{classNames:o,styles:i,scrollHideDelay:a,scrollbarSize:s,type:c,dir:u,offsetScrollbars:f,viewportRef:p,onScrollPositionChange:h,unstyled:g,variant:_,viewportProps:k},r)))});Jz.displayName="@mantine/core/ScrollAreaAutosize";L0.displayName="@mantine/core/ScrollArea";L0.Autosize=Jz;const ir=L0;var JJ=Object.defineProperty,XJ=Object.defineProperties,QJ=Object.getOwnPropertyDescriptors,Sg=Object.getOwnPropertySymbols,Xz=Object.prototype.hasOwnProperty,Qz=Object.prototype.propertyIsEnumerable,BE=(e,t,n)=>t in e?JJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,FE=(e,t)=>{for(var n in t||(t={}))Xz.call(t,n)&&BE(e,n,t[n]);if(Sg)for(var n of Sg(t))Qz.call(t,n)&&BE(e,n,t[n]);return e},eX=(e,t)=>XJ(e,QJ(t)),tX=(e,t)=>{var n={};for(var r in e)Xz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Sg)for(var r of Sg(e))t.indexOf(r)<0&&Qz.call(e,r)&&(n[r]=e[r]);return n};const z0=v.forwardRef((e,t)=>{var n=e,{style:r}=n,o=tX(n,["style"]);return O.createElement(ir,eX(FE({},o),{style:FE({width:"100%"},r),viewportProps:{tabIndex:-1},viewportRef:t}),o.children)});z0.displayName="@mantine/core/SelectScrollArea";var nX=te(()=>({dropdown:{},itemsWrapper:{padding:T(4),display:"flex",width:"100%",boxSizing:"border-box"}}));const rX=nX;function Pu(e){return e.split("-")[1]}function xk(e){return e==="y"?"height":"width"}function ti(e){return e.split("-")[0]}function za(e){return["top","bottom"].includes(ti(e))?"x":"y"}function VE(e,t,n){let{reference:r,floating:o}=e;const i=r.x+r.width/2-o.width/2,s=r.y+r.height/2-o.height/2,a=za(t),c=xk(a),u=r[c]/2-o[c]/2,f=a==="x";let p;switch(ti(t)){case"top":p={x:i,y:r.y-o.height};break;case"bottom":p={x:i,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:s};break;case"left":p={x:r.x-o.width,y:s};break;default:p={x:r.x,y:r.y}}switch(Pu(t)){case"start":p[a]-=u*(n&&f?-1:1);break;case"end":p[a]+=u*(n&&f?-1:1)}return p}const oX=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=VE(u,r,c),h=r,g={},y=0;for(let _=0;_({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e||{},{x:o,y:i,placement:s,rects:a,platform:c,elements:u}=t;if(n==null)return{};const f=kk(r),p={x:o,y:i},h=za(s),g=xk(h),y=await c.getDimensions(n),_=h==="y",k=_?"top":"left",b=_?"bottom":"right",S=_?"clientHeight":"clientWidth",P=a.reference[g]+a.reference[h]-p[h]-a.floating[g],E=p[h]-a.reference[h],$=await(c.getOffsetParent==null?void 0:c.getOffsetParent(n));let I=$?$[S]:0;I&&await(c.isElement==null?void 0:c.isElement($))||(I=u.floating[S]||a.floating[g]);const N=P/2-E/2,R=f[k],F=I-y[g]-f[b],B=I/2-y[g]/2+N,D=Qb(R,B,F),K=Pu(s)!=null&&B!=D&&a.reference[g]/2-(Be.concat(t,t+"-start",t+"-end"),[]);const sX={left:"right",right:"left",bottom:"top",top:"bottom"};function xg(e){return e.replace(/left|right|bottom|top/g,t=>sX[t])}function aX(e,t,n){n===void 0&&(n=!1);const r=Pu(e),o=za(e),i=xk(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=xg(s)),{main:s,cross:xg(s)}}const lX={start:"end",end:"start"};function $_(e){return e.replace(/start|end/g,t=>lX[t])}const eA=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:s,platform:a,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0,..._}=e,k=ti(r),b=ti(s)===s,S=await(a.isRTL==null?void 0:a.isRTL(c.floating)),P=p||(b||!y?[xg(s)]:function(D){const K=xg(D);return[$_(D),K,$_(K)]}(s));p||g==="none"||P.push(...function(D,K,W,V){const U=Pu(D);let J=function(G,A,q){const H=["left","right"],ee=["right","left"],re=["top","bottom"],he=["bottom","top"];switch(G){case"top":case"bottom":return q?A?ee:H:A?H:ee;case"left":case"right":return A?re:he;default:return[]}}(ti(D),W==="start",V);return U&&(J=J.map(G=>G+"-"+U),K&&(J=J.concat(J.map($_)))),J}(s,y,g,S));const E=[s,...P],$=await Pk(t,_),I=[];let N=((n=o.flip)==null?void 0:n.overflows)||[];if(u&&I.push($[k]),f){const{main:D,cross:K}=aX(r,i,S);I.push($[D],$[K])}if(N=[...N,{placement:r,overflows:I}],!I.every(D=>D<=0)){var R,F;const D=(((R=o.flip)==null?void 0:R.index)||0)+1,K=E[D];if(K)return{data:{index:D,overflows:N},reset:{placement:K}};let W=(F=N.filter(V=>V.overflows[0]<=0).sort((V,U)=>V.overflows[1]-U.overflows[1])[0])==null?void 0:F.placement;if(!W)switch(h){case"bestFit":{var B;const V=(B=N.map(U=>[U.placement,U.overflows.filter(J=>J>0).reduce((J,G)=>J+G,0)]).sort((U,J)=>U[1]-J[1])[0])==null?void 0:B[0];V&&(W=V);break}case"initialPlacement":W=s}if(r!==W)return{reset:{placement:W}}}return{}}}};function WE(e){const t=lu(...e.map(r=>r.left)),n=lu(...e.map(r=>r.top));return{x:t,y:n,width:$i(...e.map(r=>r.right))-t,height:$i(...e.map(r=>r.bottom))-n}}const tA=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:r,rects:o,platform:i,strategy:s}=t,{padding:a=2,x:c,y:u}=e,f=Array.from(await(i.getClientRects==null?void 0:i.getClientRects(r.reference))||[]),p=function(_){const k=_.slice().sort((P,E)=>P.y-E.y),b=[];let S=null;for(let P=0;PS.height/2?b.push([E]):b[b.length-1].push(E),S=E}return b.map(P=>au(WE(P)))}(f),h=au(WE(f)),g=kk(a),y=await i.getElementRects({reference:{getBoundingClientRect:function(){if(p.length===2&&p[0].left>p[1].right&&c!=null&&u!=null)return p.find(_=>c>_.left-g.left&&c<_.right+g.right&&u>_.top-g.top&&u<_.bottom+g.bottom)||h;if(p.length>=2){if(za(n)==="x"){const $=p[0],I=p[p.length-1],N=ti(n)==="top",R=$.top,F=I.bottom,B=N?$.left:I.left,D=N?$.right:I.right;return{top:R,bottom:F,left:B,right:D,width:D-B,height:F-R,x:B,y:R}}const _=ti(n)==="left",k=$i(...p.map($=>$.right)),b=lu(...p.map($=>$.left)),S=p.filter($=>_?$.left===b:$.right===k),P=S[0].top,E=S[S.length-1].bottom;return{top:P,bottom:E,left:b,right:k,width:k-b,height:E-P,x:b,y:P}}return h}},floating:r.floating,strategy:s});return o.reference.x!==y.reference.x||o.reference.y!==y.reference.y||o.reference.width!==y.reference.width||o.reference.height!==y.reference.height?{reset:{rects:y}}:{}}}},nA=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await async function(i,s){const{placement:a,platform:c,elements:u}=i,f=await(c.isRTL==null?void 0:c.isRTL(u.floating)),p=ti(a),h=Pu(a),g=za(a)==="x",y=["left","top"].includes(p)?-1:1,_=f&&g?-1:1,k=typeof s=="function"?s(i):s;let{mainAxis:b,crossAxis:S,alignmentAxis:P}=typeof k=="number"?{mainAxis:k,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...k};return h&&typeof P=="number"&&(S=h==="end"?-1*P:P),g?{x:S*_,y:b*y}:{x:b*y,y:S*_}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}};function rA(e){return e==="x"?"y":"x"}const Ck=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:k=>{let{x:b,y:S}=k;return{x:b,y:S}}},...c}=e,u={x:n,y:r},f=await Pk(t,c),p=za(ti(o)),h=rA(p);let g=u[p],y=u[h];if(i){const k=p==="y"?"bottom":"right";g=Qb(g+f[p==="y"?"top":"left"],g,g-f[k])}if(s){const k=h==="y"?"bottom":"right";y=Qb(y+f[h==="y"?"top":"left"],y,y-f[k])}const _=a.fn({...t,[p]:g,[h]:y});return{..._,data:{x:_.x-n,y:_.y-r}}}}},cX=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=e,f={x:n,y:r},p=za(o),h=rA(p);let g=f[p],y=f[h];const _=typeof a=="function"?a(t):a,k=typeof _=="number"?{mainAxis:_,crossAxis:0}:{mainAxis:0,crossAxis:0,..._};if(c){const P=p==="y"?"height":"width",E=i.reference[p]-i.floating[P]+k.mainAxis,$=i.reference[p]+i.reference[P]-k.mainAxis;g$&&(g=$)}if(u){var b,S;const P=p==="y"?"width":"height",E=["top","left"].includes(ti(o)),$=i.reference[h]-i.floating[P]+(E&&((b=s.offset)==null?void 0:b[h])||0)+(E?0:k.crossAxis),I=i.reference[h]+i.reference[P]+(E?0:((S=s.offset)==null?void 0:S[h])||0)-(E?k.crossAxis:0);y<$?y=$:y>I&&(y=I)}return{[p]:g,[h]:y}}}},uX=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:s=()=>{},...a}=e,c=await Pk(t,a),u=ti(n),f=Pu(n),p=za(n)==="x",{width:h,height:g}=r.floating;let y,_;u==="top"||u==="bottom"?(y=u,_=f===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(_=u,y=f==="end"?"top":"bottom");const k=g-c[y],b=h-c[_],S=!t.middlewareData.shift;let P=k,E=b;if(p){const I=h-c.left-c.right;E=f||S?lu(b,I):I}else{const I=g-c.top-c.bottom;P=f||S?lu(k,I):I}if(S&&!f){const I=$i(c.left,0),N=$i(c.right,0),R=$i(c.top,0),F=$i(c.bottom,0);p?E=h-2*(I!==0||N!==0?I+N:$i(c.left,c.right)):P=g-2*(R!==0||F!==0?R+F:$i(c.top,c.bottom))}await s({...t,availableWidth:E,availableHeight:P});const $=await o.getDimensions(i.floating);return h!==$.width||g!==$.height?{reset:{rects:!0}}:{}}}};function mo(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Fi(e){return mo(e).getComputedStyle(e)}function oA(e){return e instanceof mo(e).Node}function Oa(e){return oA(e)?(e.nodeName||"").toLowerCase():""}let dh;function iA(){if(dh)return dh;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(dh=e.brands.map(t=>t.brand+"/"+t.version).join(" "),dh):navigator.userAgent}function li(e){return e instanceof mo(e).HTMLElement}function ni(e){return e instanceof mo(e).Element}function UE(e){return typeof ShadowRoot>"u"?!1:e instanceof mo(e).ShadowRoot||e instanceof ShadowRoot}function A0(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Fi(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function dX(e){return["table","td","th"].includes(Oa(e))}function eS(e){const t=/firefox/i.test(iA()),n=Fi(e),r=n.backdropFilter||n.WebkitBackdropFilter;return n.transform!=="none"||n.perspective!=="none"||!!r&&r!=="none"||t&&n.willChange==="filter"||t&&!!n.filter&&n.filter!=="none"||["transform","perspective"].some(o=>n.willChange.includes(o))||["paint","layout","strict","content"].some(o=>{const i=n.contain;return i!=null&&i.includes(o)})}function tS(){return/^((?!chrome|android).)*safari/i.test(iA())}function Ok(e){return["html","body","#document"].includes(Oa(e))}const ZE=Math.min,Bd=Math.max,kg=Math.round;function sA(e){const t=Fi(e);let n=parseFloat(t.width),r=parseFloat(t.height);const o=li(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=kg(n)!==i||kg(r)!==s;return a&&(n=i,r=s),{width:n,height:r,fallback:a}}function aA(e){return ni(e)?e:e.contextElement}const lA={x:1,y:1};function Uc(e){const t=aA(e);if(!li(t))return lA;const n=t.getBoundingClientRect(),{width:r,height:o,fallback:i}=sA(t);let s=(i?kg(n.width):n.width)/r,a=(i?kg(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}function zl(e,t,n,r){var o,i;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=aA(e);let c=lA;t&&(r?ni(r)&&(c=Uc(r)):c=Uc(e));const u=a?mo(a):window,f=tS()&&n;let p=(s.left+(f&&((o=u.visualViewport)==null?void 0:o.offsetLeft)||0))/c.x,h=(s.top+(f&&((i=u.visualViewport)==null?void 0:i.offsetTop)||0))/c.y,g=s.width/c.x,y=s.height/c.y;if(a){const _=mo(a),k=r&&ni(r)?mo(r):r;let b=_.frameElement;for(;b&&r&&k!==_;){const S=Uc(b),P=b.getBoundingClientRect(),E=getComputedStyle(b);P.x+=(b.clientLeft+parseFloat(E.paddingLeft))*S.x,P.y+=(b.clientTop+parseFloat(E.paddingTop))*S.y,p*=S.x,h*=S.y,g*=S.x,y*=S.y,p+=P.x,h+=P.y,b=mo(b).frameElement}}return au({width:g,height:y,x:p,y:h})}function ma(e){return((oA(e)?e.ownerDocument:e.document)||window.document).documentElement}function D0(e){return ni(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function cA(e){return zl(ma(e)).left+D0(e).scrollLeft}function Sf(e){if(Oa(e)==="html")return e;const t=e.assignedSlot||e.parentNode||UE(e)&&e.host||ma(e);return UE(t)?t.host:t}function uA(e){const t=Sf(e);return Ok(t)?t.ownerDocument.body:li(t)&&A0(t)?t:uA(t)}function fs(e,t){var n;t===void 0&&(t=[]);const r=uA(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=mo(r);return o?t.concat(i,i.visualViewport||[],A0(r)?r:[]):t.concat(r,fs(r))}function KE(e,t,n){let r;if(t==="viewport")r=function(s,a){const c=mo(s),u=ma(s),f=c.visualViewport;let p=u.clientWidth,h=u.clientHeight,g=0,y=0;if(f){p=f.width,h=f.height;const _=tS();(!_||_&&a==="fixed")&&(g=f.offsetLeft,y=f.offsetTop)}return{width:p,height:h,x:g,y}}(e,n);else if(t==="document")r=function(s){const a=ma(s),c=D0(s),u=s.ownerDocument.body,f=Bd(a.scrollWidth,a.clientWidth,u.scrollWidth,u.clientWidth),p=Bd(a.scrollHeight,a.clientHeight,u.scrollHeight,u.clientHeight);let h=-c.scrollLeft+cA(s);const g=-c.scrollTop;return Fi(u).direction==="rtl"&&(h+=Bd(a.clientWidth,u.clientWidth)-f),{width:f,height:p,x:h,y:g}}(ma(e));else if(ni(t))r=function(s,a){const c=zl(s,!0,a==="fixed"),u=c.top+s.clientTop,f=c.left+s.clientLeft,p=li(s)?Uc(s):{x:1,y:1};return{width:s.clientWidth*p.x,height:s.clientHeight*p.y,x:f*p.x,y:u*p.y}}(t,n);else{const s={...t};if(tS()){var o,i;const a=mo(e);s.x-=((o=a.visualViewport)==null?void 0:o.offsetLeft)||0,s.y-=((i=a.visualViewport)==null?void 0:i.offsetTop)||0}r=s}return au(r)}function GE(e,t){return li(e)&&Fi(e).position!=="fixed"?t?t(e):e.offsetParent:null}function qE(e,t){const n=mo(e);if(!li(e))return n;let r=GE(e,t);for(;r&&dX(r)&&Fi(r).position==="static";)r=GE(r,t);return r&&(Oa(r)==="html"||Oa(r)==="body"&&Fi(r).position==="static"&&!eS(r))?n:r||function(o){let i=Sf(o);for(;li(i)&&!Ok(i);){if(eS(i))return i;i=Sf(i)}return null}(e)||n}function fX(e,t,n){const r=li(t),o=ma(t),i=zl(e,!0,n==="fixed",t);let s={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(r||!r&&n!=="fixed")if((Oa(t)!=="body"||A0(o))&&(s=D0(t)),li(t)){const c=zl(t,!0);a.x=c.x+t.clientLeft,a.y=c.y+t.clientTop}else o&&(a.x=cA(o));return{x:i.left+s.scrollLeft-a.x,y:i.top+s.scrollTop-a.y,width:i.width,height:i.height}}const pX={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=n==="clippingAncestors"?function(u,f){const p=f.get(u);if(p)return p;let h=fs(u).filter(k=>ni(k)&&Oa(k)!=="body"),g=null;const y=Fi(u).position==="fixed";let _=y?Sf(u):u;for(;ni(_)&&!Ok(_);){const k=Fi(_),b=eS(_);k.position==="fixed"&&(g=null),(y?b||g:b||k.position!=="static"||!g||!["absolute","fixed"].includes(g.position))?g=k:h=h.filter(S=>S!==_),_=Sf(_)}return f.set(u,h),h}(t,this._c):[].concat(n),s=[...i,r],a=s[0],c=s.reduce((u,f)=>{const p=KE(t,f,o);return u.top=Bd(p.top,u.top),u.right=ZE(p.right,u.right),u.bottom=ZE(p.bottom,u.bottom),u.left=Bd(p.left,u.left),u},KE(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=li(n),i=ma(n);if(n===i)return t;let s={scrollLeft:0,scrollTop:0},a={x:1,y:1};const c={x:0,y:0};if((o||!o&&r!=="fixed")&&((Oa(n)!=="body"||A0(i))&&(s=D0(n)),li(n))){const u=zl(n);a=Uc(n),c.x=u.x+n.clientLeft,c.y=u.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-s.scrollLeft*a.x+c.x,y:t.y*a.y-s.scrollTop*a.y+c.y}},isElement:ni,getDimensions:function(e){return sA(e)},getOffsetParent:qE,getDocumentElement:ma,getScale:Uc,async getElementRects(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||qE,i=this.getDimensions;return{reference:fX(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Fi(e).direction==="rtl"};function hX(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=!0,animationFrame:a=!1}=r,c=o&&!a,u=c||i?[...ni(e)?fs(e):e.contextElement?fs(e.contextElement):[],...fs(t)]:[];u.forEach(g=>{c&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});let f,p=null;s&&(p=new ResizeObserver(()=>{n()}),ni(e)&&!a&&p.observe(e),ni(e)||!e.contextElement||a||p.observe(e.contextElement),p.observe(t));let h=a?zl(e):null;return a&&function g(){const y=zl(e);!h||y.x===h.x&&y.y===h.y&&y.width===h.width&&y.height===h.height||n(),h=y,f=requestAnimationFrame(g)}(),n(),()=>{var g;u.forEach(y=>{c&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),(g=p)==null||g.disconnect(),p=null,a&&cancelAnimationFrame(f)}}const mX=(e,t,n)=>{const r=new Map,o={platform:pX,...n},i={...o.platform,_c:r};return oX(e,t,{...o,platform:i})},dA=e=>{const{element:t,padding:n}=e;function r(o){return Object.prototype.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){return r(t)?t.current!=null?HE({element:t.current,padding:n}).fn(o):{}:t?HE({element:t,padding:n}).fn(o):{}}}};var om=typeof document<"u"?v.useLayoutEffect:v.useEffect;function Pg(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Pg(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Pg(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function YE(e){const t=v.useRef(e);return om(()=>{t.current=e}),t}function gX(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,whileElementsMounted:i,open:s}=e,[a,c]=v.useState({x:null,y:null,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[u,f]=v.useState(r);Pg(u,r)||f(r);const p=v.useRef(null),h=v.useRef(null),g=v.useRef(a),y=YE(i),_=YE(o),[k,b]=v.useState(null),[S,P]=v.useState(null),E=v.useCallback(B=>{p.current!==B&&(p.current=B,b(B))},[]),$=v.useCallback(B=>{h.current!==B&&(h.current=B,P(B))},[]),I=v.useCallback(()=>{if(!p.current||!h.current)return;const B={placement:t,strategy:n,middleware:u};_.current&&(B.platform=_.current),mX(p.current,h.current,B).then(D=>{const K={...D,isPositioned:!0};N.current&&!Pg(g.current,K)&&(g.current=K,_r.flushSync(()=>{c(K)}))})},[u,t,n,_]);om(()=>{s===!1&&g.current.isPositioned&&(g.current.isPositioned=!1,c(B=>({...B,isPositioned:!1})))},[s]);const N=v.useRef(!1);om(()=>(N.current=!0,()=>{N.current=!1}),[]),om(()=>{if(k&&S){if(y.current)return y.current(k,S,I);I()}},[k,S,I,y]);const R=v.useMemo(()=>({reference:p,floating:h,setReference:E,setFloating:$}),[E,$]),F=v.useMemo(()=>({reference:k,floating:S}),[k,S]);return v.useMemo(()=>({...a,update:I,refs:R,elements:F,reference:E,floating:$}),[a,I,R,F,E,$])}var cu=typeof document<"u"?v.useLayoutEffect:v.useEffect;let M_=!1,vX=0;const JE=()=>"floating-ui-"+vX++;function yX(){const[e,t]=v.useState(()=>M_?JE():void 0);return cu(()=>{e==null&&t(JE())},[]),v.useEffect(()=>{M_||(M_=!0)},[]),e}const _X=Ml["useId".toString()],XE=_X||yX;function wX(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){e.set(t,(e.get(t)||[]).filter(r=>r!==n))}}}const bX=v.createContext(null),SX=v.createContext(null),fA=()=>{var e;return((e=v.useContext(bX))==null?void 0:e.id)||null},Ek=()=>v.useContext(SX);function Qs(e){return e?.ownerDocument||document}function xX(){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(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function $k(e){return Qs(e).defaultView||window}function Li(e){return e?e instanceof $k(e).Element:!1}function pA(e){return e?e instanceof $k(e).HTMLElement:!1}function PX(e){if(typeof ShadowRoot>"u")return!1;const t=$k(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function CX(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(xX())||t.test(kX()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function OX(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function hA(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function QE(e){const t=v.useRef(e);return cu(()=>{t.current=e}),t}const e$="data-floating-ui-safe-polygon";function im(e,t,n){return n&&!hA(n)?0:typeof e=="number"?e:e?.[t]}const EX=function(e,t){let{enabled:n=!0,delay:r=0,handleClose:o=null,mouseOnly:i=!1,restMs:s=0,move:a=!0}=t===void 0?{}:t;const{open:c,onOpenChange:u,dataRef:f,events:p,elements:{domReference:h,floating:g},refs:y}=e,_=Ek(),k=fA(),b=QE(o),S=QE(r),P=v.useRef(),E=v.useRef(),$=v.useRef(),I=v.useRef(),N=v.useRef(!0),R=v.useRef(!1),F=v.useRef(()=>{}),B=v.useCallback(()=>{var V;const U=(V=f.current.openEvent)==null?void 0:V.type;return U?.includes("mouse")&&U!=="mousedown"},[f]);v.useEffect(()=>{if(!n)return;function V(){clearTimeout(E.current),clearTimeout(I.current),N.current=!0}return p.on("dismiss",V),()=>{p.off("dismiss",V)}},[n,p]),v.useEffect(()=>{if(!n||!b.current||!c)return;function V(){B()&&u(!1)}const U=Qs(g).documentElement;return U.addEventListener("mouseleave",V),()=>{U.removeEventListener("mouseleave",V)}},[g,c,u,n,b,f,B]);const D=v.useCallback(function(V){V===void 0&&(V=!0);const U=im(S.current,"close",P.current);U&&!$.current?(clearTimeout(E.current),E.current=setTimeout(()=>u(!1),U)):V&&(clearTimeout(E.current),u(!1))},[S,u]),K=v.useCallback(()=>{F.current(),$.current=void 0},[]),W=v.useCallback(()=>{if(R.current){const V=Qs(y.floating.current).body;V.style.pointerEvents="",V.removeAttribute(e$),R.current=!1}},[y]);return v.useEffect(()=>{if(!n)return;function V(){return f.current.openEvent?["click","mousedown"].includes(f.current.openEvent.type):!1}function U(A){if(clearTimeout(E.current),N.current=!1,i&&!hA(P.current)||s>0&&im(S.current,"open")===0)return;f.current.openEvent=A;const q=im(S.current,"open",P.current);q?E.current=setTimeout(()=>{u(!0)},q):u(!0)}function J(A){if(V())return;F.current();const q=Qs(g);if(clearTimeout(I.current),b.current){c||clearTimeout(E.current),$.current=b.current({...e,tree:_,x:A.clientX,y:A.clientY,onClose(){W(),K(),D()}});const H=$.current;q.addEventListener("mousemove",H),F.current=()=>{q.removeEventListener("mousemove",H)};return}D()}function G(A){V()||b.current==null||b.current({...e,tree:_,x:A.clientX,y:A.clientY,onClose(){W(),K(),D()}})(A)}if(Li(h)){const A=h;return c&&A.addEventListener("mouseleave",G),g?.addEventListener("mouseleave",G),a&&A.addEventListener("mousemove",U,{once:!0}),A.addEventListener("mouseenter",U),A.addEventListener("mouseleave",J),()=>{c&&A.removeEventListener("mouseleave",G),g?.removeEventListener("mouseleave",G),a&&A.removeEventListener("mousemove",U),A.removeEventListener("mouseenter",U),A.removeEventListener("mouseleave",J)}}},[h,g,n,e,i,s,a,D,K,W,u,c,_,S,b,f]),cu(()=>{var V;if(n&&c&&(V=b.current)!=null&&V.__options.blockPointerEvents&&B()){const G=Qs(g).body;if(G.setAttribute(e$,""),G.style.pointerEvents="none",R.current=!0,Li(h)&&g){var U,J;const A=h,q=_==null||(U=_.nodesRef.current.find(H=>H.id===k))==null||(J=U.context)==null?void 0:J.elements.floating;return q&&(q.style.pointerEvents=""),A.style.pointerEvents="auto",g.style.pointerEvents="auto",()=>{A.style.pointerEvents="",g.style.pointerEvents=""}}}},[n,c,k,g,h,_,b,f,B]),cu(()=>{c||(P.current=void 0,K(),W())},[c,K,W]),v.useEffect(()=>()=>{K(),clearTimeout(E.current),clearTimeout(I.current),W()},[n,K,W]),v.useMemo(()=>{if(!n)return{};function V(U){P.current=U.pointerType}return{reference:{onPointerDown:V,onPointerEnter:V,onMouseMove(){c||s===0||(clearTimeout(I.current),I.current=setTimeout(()=>{N.current||u(!0)},s))}},floating:{onMouseEnter(){clearTimeout(E.current)},onMouseLeave(){p.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),D(!1)}}}},[p,n,s,c,u,D])},mA=v.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:()=>{},setState:()=>{},isInstantPhase:!1}),gA=()=>v.useContext(mA),$X=e=>{let{children:t,delay:n,timeoutMs:r=0}=e;const[o,i]=v.useReducer((c,u)=>({...c,...u}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),s=v.useRef(null),a=v.useCallback(c=>{i({currentId:c})},[]);return cu(()=>{o.currentId?s.current===null?s.current=o.currentId:i({isInstantPhase:!0}):(i({isInstantPhase:!1}),s.current=null)},[o.currentId]),v.createElement(mA.Provider,{value:v.useMemo(()=>({...o,setState:i,setCurrentId:a}),[o,i,a])},t)},MX=(e,t)=>{let{open:n,onOpenChange:r}=e,{id:o}=t;const{currentId:i,setCurrentId:s,initialDelay:a,setState:c,timeoutMs:u}=gA();v.useEffect(()=>{i&&(c({delay:{open:1,close:im(a,"close")}}),i!==o&&r(!1))},[o,r,c,i,a]),v.useEffect(()=>{function f(){r(!1),c({delay:a,currentId:null})}if(!n&&i===o)if(u){const p=window.setTimeout(f,u);return()=>{clearTimeout(p)}}else f()},[n,c,i,o,r,a,u]),v.useEffect(()=>{n&&s(o)},[n,s,o])};function TX(e){let t=e.activeElement;for(;((n=t)==null||(r=n.shadowRoot)==null?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function t$(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&PX(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function T_(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)})||[],r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(s=>{var a;return o.parentId===s.id&&((a=o.context)==null?void 0:a.open)})})||[],n=n.concat(r);return n}function IX(e){return"composedPath"in e?e.composedPath()[0]:e.target}const NX=Ml["useInsertionEffect".toString()],RX=NX||(e=>e());function vA(e){const t=v.useRef(()=>{});return RX(()=>{t.current=e}),v.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o!1),$=typeof h=="function"?E:h,I=v.useRef(!1),{escapeKeyBubbles:N,outsidePressBubbles:R}=AX(b);return v.useEffect(()=>{if(!n||!f)return;u.current.__escapeKeyBubbles=N,u.current.__outsidePressBubbles=R;function F(V){if(V.key==="Escape"){const U=S?T_(S.nodesRef.current,i):[];if(U.length>0){let J=!0;if(U.forEach(G=>{var A;if((A=G.context)!=null&&A.open&&!G.context.dataRef.current.__escapeKeyBubbles){J=!1;return}}),!J)return}o.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1)}}function B(V){const U=I.current;if(I.current=!1,U||typeof $=="function"&&!$(V))return;const J=IX(V);if(pA(J)&&c){const q=c.ownerDocument.defaultView||window,H=J.scrollWidth>J.clientWidth,ee=J.scrollHeight>J.clientHeight;let re=ee&&V.offsetX>J.clientWidth;if(ee&&q.getComputedStyle(J).direction==="rtl"&&(re=V.offsetX<=J.offsetWidth-J.clientWidth),re||H&&V.offsetY>J.clientHeight)return}const G=S&&T_(S.nodesRef.current,i).some(q=>{var H;return sm(V,(H=q.context)==null?void 0:H.elements.floating)});if(sm(V,c)||sm(V,a)||G)return;const A=S?T_(S.nodesRef.current,i):[];if(A.length>0){let q=!0;if(A.forEach(H=>{var ee;if((ee=H.context)!=null&&ee.open&&!H.context.dataRef.current.__outsidePressBubbles){q=!1;return}}),!q)return}o.emit("dismiss",{type:"outsidePress",data:{returnFocus:P?{preventScroll:!0}:CX(V)||OX(V)}}),r(!1)}function D(){r(!1)}const K=Qs(c);p&&K.addEventListener("keydown",F),$&&K.addEventListener(g,B);let W=[];return k&&(Li(a)&&(W=fs(a)),Li(c)&&(W=W.concat(fs(c))),!Li(s)&&s&&s.contextElement&&(W=W.concat(fs(s.contextElement)))),W=W.filter(V=>{var U;return V!==((U=K.defaultView)==null?void 0:U.visualViewport)}),W.forEach(V=>{V.addEventListener("scroll",D,{passive:!0})}),()=>{p&&K.removeEventListener("keydown",F),$&&K.removeEventListener(g,B),W.forEach(V=>{V.removeEventListener("scroll",D)})}},[u,c,a,s,p,$,g,o,S,i,n,r,k,f,N,R,P]),v.useEffect(()=>{I.current=!1},[$,g]),v.useMemo(()=>f?{reference:{[LX[_]]:()=>{y&&(o.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1))}},floating:{[zX[g]]:()=>{I.current=!0}}}:{},[f,o,y,g,_,r])},jX=function(e,t){let{open:n,onOpenChange:r,dataRef:o,events:i,refs:s,elements:{floating:a,domReference:c}}=e,{enabled:u=!0,keyboardOnly:f=!0}=t===void 0?{}:t;const p=v.useRef(""),h=v.useRef(!1),g=v.useRef();return v.useEffect(()=>{if(!u)return;const _=Qs(a).defaultView||window;function k(){!n&&pA(c)&&c===TX(Qs(c))&&(h.current=!0)}return _.addEventListener("blur",k),()=>{_.removeEventListener("blur",k)}},[a,c,n,u]),v.useEffect(()=>{if(!u)return;function y(_){(_.type==="referencePress"||_.type==="escapeKey")&&(h.current=!0)}return i.on("dismiss",y),()=>{i.off("dismiss",y)}},[i,u]),v.useEffect(()=>()=>{clearTimeout(g.current)},[]),v.useMemo(()=>u?{reference:{onPointerDown(y){let{pointerType:_}=y;p.current=_,h.current=!!(_&&f)},onMouseLeave(){h.current=!1},onFocus(y){var _;h.current||y.type==="focus"&&((_=o.current.openEvent)==null?void 0:_.type)==="mousedown"&&o.current.openEvent&&sm(o.current.openEvent,c)||(o.current.openEvent=y.nativeEvent,r(!0))},onBlur(y){h.current=!1;const _=y.relatedTarget,k=Li(_)&&_.hasAttribute("data-floating-ui-focus-guard")&&_.getAttribute("data-type")==="outside";g.current=setTimeout(()=>{t$(s.floating.current,_)||t$(c,_)||k||r(!1)})}}}:{},[u,f,c,s,o,r])},BX=function(e,t){let{open:n}=e,{enabled:r=!0,role:o="dialog"}=t===void 0?{}:t;const i=XE(),s=XE();return v.useMemo(()=>{const a={id:i,role:o};return r?o==="tooltip"?{reference:{"aria-describedby":n?i:void 0},floating:a}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":o==="alertdialog"?"dialog":o,"aria-controls":n?i:void 0,...o==="listbox"&&{role:"combobox"},...o==="menu"&&{id:s}},floating:{...a,...o==="menu"&&{"aria-labelledby":s}}}:{}},[r,o,n,i,s])};function Mk(e){e===void 0&&(e={});const{open:t=!1,onOpenChange:n,nodeId:r}=e,o=gX(e),i=Ek(),s=v.useRef(null),a=v.useRef({}),c=v.useState(()=>wX())[0],[u,f]=v.useState(null),p=v.useCallback(b=>{const S=Li(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),contextElement:b}:b;o.refs.setReference(S)},[o.refs]),h=v.useCallback(b=>{(Li(b)||b===null)&&(s.current=b,f(b)),(Li(o.refs.reference.current)||o.refs.reference.current===null||b!==null&&!Li(b))&&o.refs.setReference(b)},[o.refs]),g=v.useMemo(()=>({...o.refs,setReference:h,setPositionReference:p,domReference:s}),[o.refs,h,p]),y=v.useMemo(()=>({...o.elements,domReference:u}),[o.elements,u]),_=vA(n),k=v.useMemo(()=>({...o,refs:g,elements:y,dataRef:a,nodeId:r,events:c,open:t,onOpenChange:_}),[o,r,c,t,_,g,y]);return cu(()=>{const b=i?.nodesRef.current.find(S=>S.id===r);b&&(b.context=k)}),v.useMemo(()=>({...o,context:k,refs:g,reference:h,positionReference:p}),[o,g,k,h,p])}function I_(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(o=>o?o[n]:null).concat(e).reduce((o,i)=>(i&&Object.entries(i).forEach(s=>{let[a,c]=s;if(a.indexOf("on")===0){if(r.has(a)||r.set(a,[]),typeof c=="function"){var u;(u=r.get(a))==null||u.push(c),o[a]=function(){for(var f,p=arguments.length,h=new Array(p),g=0;gy(...h))}}}else o[a]=c}),o),{})}}const FX=function(e){e===void 0&&(e=[]);const t=e,n=v.useCallback(i=>I_(i,e,"reference"),t),r=v.useCallback(i=>I_(i,e,"floating"),t),o=v.useCallback(i=>I_(i,e,"item"),e.map(i=>i?.item));return v.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:o}),[n,r,o])};function yA({opened:e,floating:t,position:n,positionDependencies:r}){const[o,i]=v.useState(0);v.useEffect(()=>{if(t.refs.reference.current&&t.refs.floating.current)return hX(t.refs.reference.current,t.refs.floating.current,t.update)},[t.refs.reference.current,t.refs.floating.current,e,o,n]),An(()=>{t.update()},r),An(()=>{i(s=>s+1)},[e])}function VX(e){const t=[nA(e.offset)];return e.middlewares.shift&&t.push(Ck({limiter:cX()})),e.middlewares.flip&&t.push(eA()),e.middlewares.inline&&t.push(tA()),t.push(dA({element:e.arrowRef,padding:e.arrowOffset})),t}function HX(e){const[t,n]=si({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),r=()=>{var s;(s=e.onClose)==null||s.call(e),n(!1)},o=()=>{var s,a;t?((s=e.onClose)==null||s.call(e),n(!1)):((a=e.onOpen)==null||a.call(e),n(!0))},i=Mk({placement:e.position,middleware:[...VX(e),...e.width==="target"?[uX({apply({rects:s}){var a,c;Object.assign((c=(a=i.refs.floating.current)==null?void 0:a.style)!=null?c:{},{width:`${s.reference.width}px`})}})]:[]]});return yA({opened:e.opened,position:e.position,positionDependencies:e.positionDependencies,floating:i}),An(()=>{var s;(s=e.onPositionChange)==null||s.call(e,i.placement)},[i.placement]),An(()=>{var s,a;e.opened?(a=e.onOpen)==null||a.call(e):(s=e.onClose)==null||s.call(e)},[e.opened]),{floating:i,controlled:typeof e.opened=="boolean",opened:t,onClose:r,onToggle:o}}const _A={context:"Popover component was not found in the tree",children:"Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[WX,wA]=wu(_A.context);var UX=Object.defineProperty,ZX=Object.defineProperties,KX=Object.getOwnPropertyDescriptors,Cg=Object.getOwnPropertySymbols,bA=Object.prototype.hasOwnProperty,SA=Object.prototype.propertyIsEnumerable,n$=(e,t,n)=>t in e?UX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fh=(e,t)=>{for(var n in t||(t={}))bA.call(t,n)&&n$(e,n,t[n]);if(Cg)for(var n of Cg(t))SA.call(t,n)&&n$(e,n,t[n]);return e},GX=(e,t)=>ZX(e,KX(t)),qX=(e,t)=>{var n={};for(var r in e)bA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Cg)for(var r of Cg(e))t.indexOf(r)<0&&SA.call(e,r)&&(n[r]=e[r]);return n};const YX={refProp:"ref",popupType:"dialog"},xA=v.forwardRef((e,t)=>{const n=ue("PopoverTarget",YX,e),{children:r,refProp:o,popupType:i}=n,s=qX(n,["children","refProp","popupType"]);if(!Uf(r))throw new Error(_A.children);const a=s,c=wA(),u=di(c.reference,r.ref,t),f=c.withRoles?{"aria-haspopup":i,"aria-expanded":c.opened,"aria-controls":c.getDropdownId(),id:c.getTargetId()}:{};return v.cloneElement(r,fh(GX(fh(fh(fh({},a),f),c.targetProps),{className:lR(c.targetProps.className,a.className,r.props.className),[o]:u}),c.controlled?null:{onClick:c.onToggle}))});xA.displayName="@mantine/core/PopoverTarget";var JX=te((e,{radius:t,shadow:n})=>({dropdown:{position:"absolute",backgroundColor:e.white,background:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`${T(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,padding:`${e.spacing.sm} ${e.spacing.md}`,boxShadow:e.shadows[n]||n||"none",borderRadius:e.fn.radius(t),"&:focus":{outline:0}},arrow:{backgroundColor:"inherit",border:`${T(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,zIndex:1}}));const XX=JX;var QX=Object.defineProperty,r$=Object.getOwnPropertySymbols,eQ=Object.prototype.hasOwnProperty,tQ=Object.prototype.propertyIsEnumerable,o$=(e,t,n)=>t in e?QX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ac=(e,t)=>{for(var n in t||(t={}))eQ.call(t,n)&&o$(e,n,t[n]);if(r$)for(var n of r$(t))tQ.call(t,n)&&o$(e,n,t[n]);return e};const i$={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function nQ({transition:e,state:t,duration:n,timingFunction:r}){const o={transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof e=="string"?e in jp?ac(ac(ac({transitionProperty:jp[e].transitionProperty},o),jp[e].common),jp[e][i$[t]]):null:ac(ac(ac({transitionProperty:e.transitionProperty},o),e.common),e[i$[t]])}function rQ({duration:e,exitDuration:t,timingFunction:n,mounted:r,onEnter:o,onExit:i,onEntered:s,onExited:a}){const c=Sr(),u=v0(),f=c.respectReducedMotion?u:!1,[p,h]=v.useState(f?0:e),[g,y]=v.useState(r?"entered":"exited"),_=v.useRef(-1),k=b=>{const S=b?o:i,P=b?s:a;y(b?"pre-entering":"pre-exiting"),window.clearTimeout(_.current);const E=f?0:b?e:t;if(h(E),E===0)typeof S=="function"&&S(),typeof P=="function"&&P(),y(b?"entered":"exited");else{const $=window.setTimeout(()=>{typeof S=="function"&&S(),y(b?"entering":"exiting")},10);_.current=window.setTimeout(()=>{window.clearTimeout($),typeof P=="function"&&P(),y(b?"entered":"exited")},E)}};return An(()=>{k(r)},[r]),v.useEffect(()=>()=>window.clearTimeout(_.current),[]),{transitionDuration:p,transitionStatus:g,transitionTimingFunction:n||c.transitionTimingFunction}}function xs({keepMounted:e,transition:t,duration:n=250,exitDuration:r=n,mounted:o,children:i,timingFunction:s,onExit:a,onEntered:c,onEnter:u,onExited:f}){const{transitionDuration:p,transitionStatus:h,transitionTimingFunction:g}=rQ({mounted:o,exitDuration:r,duration:n,timingFunction:s,onExit:a,onEntered:c,onEnter:u,onExited:f});return p===0?o?O.createElement(O.Fragment,null,i({})):e?i({display:"none"}):null:h==="exited"?e?i({display:"none"}):null:O.createElement(O.Fragment,null,i(nQ({transition:t,duration:p,state:h,timingFunction:g})))}xs.displayName="@mantine/core/Transition";function Tk({children:e,active:t=!0,refProp:n="ref"}){const r=tZ(t),o=di(r,e?.ref);return Uf(e)?v.cloneElement(e,{[n]:o}):e}Tk.displayName="@mantine/core/FocusTrap";var oQ=Object.defineProperty,iQ=Object.defineProperties,sQ=Object.getOwnPropertyDescriptors,s$=Object.getOwnPropertySymbols,aQ=Object.prototype.hasOwnProperty,lQ=Object.prototype.propertyIsEnumerable,a$=(e,t,n)=>t in e?oQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ns=(e,t)=>{for(var n in t||(t={}))aQ.call(t,n)&&a$(e,n,t[n]);if(s$)for(var n of s$(t))lQ.call(t,n)&&a$(e,n,t[n]);return e},ph=(e,t)=>iQ(e,sQ(t));function l$(e,t,n,r){return e==="center"||r==="center"?{top:t}:e==="end"?{bottom:n}:e==="start"?{top:n}:{}}function c$(e,t,n,r,o){return e==="center"||r==="center"?{left:t}:e==="end"?{[o==="ltr"?"right":"left"]:n}:e==="start"?{[o==="ltr"?"left":"right"]:n}:{}}const cQ={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function uQ({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:o,arrowX:i,arrowY:s,dir:a}){const[c,u="center"]=e.split("-"),f={width:T(t),height:T(t),transform:"rotate(45deg)",position:"absolute",[cQ[c]]:T(r)},p=T(-t/2);return c==="left"?ph(Ns(Ns({},f),l$(u,s,n,o)),{right:p,borderLeftColor:"transparent",borderBottomColor:"transparent"}):c==="right"?ph(Ns(Ns({},f),l$(u,s,n,o)),{left:p,borderRightColor:"transparent",borderTopColor:"transparent"}):c==="top"?ph(Ns(Ns({},f),c$(u,i,n,o,a)),{bottom:p,borderTopColor:"transparent",borderLeftColor:"transparent"}):c==="bottom"?ph(Ns(Ns({},f),c$(u,i,n,o,a)),{top:p,borderBottomColor:"transparent",borderRightColor:"transparent"}):{}}var dQ=Object.defineProperty,fQ=Object.defineProperties,pQ=Object.getOwnPropertyDescriptors,Og=Object.getOwnPropertySymbols,kA=Object.prototype.hasOwnProperty,PA=Object.prototype.propertyIsEnumerable,u$=(e,t,n)=>t in e?dQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hQ=(e,t)=>{for(var n in t||(t={}))kA.call(t,n)&&u$(e,n,t[n]);if(Og)for(var n of Og(t))PA.call(t,n)&&u$(e,n,t[n]);return e},mQ=(e,t)=>fQ(e,pQ(t)),gQ=(e,t)=>{var n={};for(var r in e)kA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Og)for(var r of Og(e))t.indexOf(r)<0&&PA.call(e,r)&&(n[r]=e[r]);return n};const Ik=v.forwardRef((e,t)=>{var n=e,{position:r,arrowSize:o,arrowOffset:i,arrowRadius:s,arrowPosition:a,visible:c,arrowX:u,arrowY:f}=n,p=gQ(n,["position","arrowSize","arrowOffset","arrowRadius","arrowPosition","visible","arrowX","arrowY"]);const h=Sr();return c?O.createElement("div",mQ(hQ({},p),{ref:t,style:uQ({position:r,arrowSize:o,arrowOffset:i,arrowRadius:s,arrowPosition:a,dir:h.dir,arrowX:u,arrowY:f})})):null});Ik.displayName="@mantine/core/FloatingArrow";var vQ=Object.defineProperty,yQ=Object.defineProperties,_Q=Object.getOwnPropertyDescriptors,Eg=Object.getOwnPropertySymbols,CA=Object.prototype.hasOwnProperty,OA=Object.prototype.propertyIsEnumerable,d$=(e,t,n)=>t in e?vQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lc=(e,t)=>{for(var n in t||(t={}))CA.call(t,n)&&d$(e,n,t[n]);if(Eg)for(var n of Eg(t))OA.call(t,n)&&d$(e,n,t[n]);return e},hh=(e,t)=>yQ(e,_Q(t)),wQ=(e,t)=>{var n={};for(var r in e)CA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Eg)for(var r of Eg(e))t.indexOf(r)<0&&OA.call(e,r)&&(n[r]=e[r]);return n};const bQ={};function EA(e){var t;const n=ue("PopoverDropdown",bQ,e),{style:r,className:o,children:i,onKeyDownCapture:s}=n,a=wQ(n,["style","className","children","onKeyDownCapture"]),c=wA(),{classes:u,cx:f}=XX({radius:c.radius,shadow:c.shadow},{name:c.__staticSelector,classNames:c.classNames,styles:c.styles,unstyled:c.unstyled,variant:c.variant}),p=NR({opened:c.opened,shouldReturnFocus:c.returnFocus}),h=c.withRoles?{"aria-labelledby":c.getTargetId(),id:c.getDropdownId(),role:"dialog"}:{};return c.disabled?null:O.createElement(ep,hh(lc({},c.portalProps),{withinPortal:c.withinPortal}),O.createElement(xs,hh(lc({mounted:c.opened},c.transitionProps),{transition:c.transitionProps.transition||"fade",duration:(t=c.transitionProps.duration)!=null?t:150,keepMounted:c.keepMounted,exitDuration:typeof c.transitionProps.exitDuration=="number"?c.transitionProps.exitDuration:c.transitionProps.duration}),g=>{var y,_;return O.createElement(Tk,{active:c.trapFocus},O.createElement(_e,lc(hh(lc({},h),{tabIndex:-1,ref:c.floating,style:hh(lc(lc({},r),g),{zIndex:c.zIndex,top:(y=c.y)!=null?y:0,left:(_=c.x)!=null?_:0,width:c.width==="target"?void 0:T(c.width)}),className:f(u.dropdown,o),onKeyDownCapture:EH(c.onClose,{active:c.closeOnEscape,onTrigger:p,onKeyDown:s}),"data-position":c.placement}),a),i,O.createElement(Ik,{ref:c.arrowRef,arrowX:c.arrowX,arrowY:c.arrowY,visible:c.withArrow,position:c.placement,arrowSize:c.arrowSize,arrowRadius:c.arrowRadius,arrowOffset:c.arrowOffset,arrowPosition:c.arrowPosition,className:u.arrow})))}))}EA.displayName="@mantine/core/PopoverDropdown";function $A(e,t){if(e==="rtl"&&(t.includes("right")||t.includes("left"))){const[n,r]=t.split("-"),o=n==="right"?"left":"right";return r===void 0?o:`${o}-${r}`}return t}var f$=Object.getOwnPropertySymbols,SQ=Object.prototype.hasOwnProperty,xQ=Object.prototype.propertyIsEnumerable,kQ=(e,t)=>{var n={};for(var r in e)SQ.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&f$)for(var r of f$(e))t.indexOf(r)<0&&xQ.call(e,r)&&(n[r]=e[r]);return n};const PQ={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!1,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,clickOutsideEvents:["mousedown","touchstart"],zIndex:Ki("popover"),__staticSelector:"Popover",width:"max-content"};function Ft(e){var t,n,r,o,i,s;const a=v.useRef(null),c=ue("Popover",PQ,e),{children:u,position:f,offset:p,onPositionChange:h,positionDependencies:g,opened:y,transitionProps:_,width:k,middlewares:b,withArrow:S,arrowSize:P,arrowOffset:E,arrowRadius:$,arrowPosition:I,unstyled:N,classNames:R,styles:F,closeOnClickOutside:B,withinPortal:D,portalProps:K,closeOnEscape:W,clickOutsideEvents:V,trapFocus:U,onClose:J,onOpen:G,onChange:A,zIndex:q,radius:H,shadow:ee,id:re,defaultOpened:he,__staticSelector:Pe,withRoles:X,disabled:ne,returnFocus:fe,variant:Oe,keepMounted:Me}=c,Te=kQ(c,["children","position","offset","onPositionChange","positionDependencies","opened","transitionProps","width","middlewares","withArrow","arrowSize","arrowOffset","arrowRadius","arrowPosition","unstyled","classNames","styles","closeOnClickOutside","withinPortal","portalProps","closeOnEscape","clickOutsideEvents","trapFocus","onClose","onOpen","onChange","zIndex","radius","shadow","id","defaultOpened","__staticSelector","withRoles","disabled","returnFocus","variant","keepMounted"]),[ut,Fe]=v.useState(null),[St,ft]=v.useState(null),Vt=Ia(re),rn=Sr(),pt=HX({middlewares:b,width:k,position:$A(rn.dir,f),offset:typeof p=="number"?p+(S?P/2:0):p,arrowRef:a,arrowOffset:E,onPositionChange:h,positionDependencies:g,opened:y,defaultOpened:he,onChange:A,onOpen:G,onClose:J});TR(()=>B&&pt.onClose(),V,[ut,St]);const wn=v.useCallback(Ze=>{Fe(Ze),pt.floating.reference(Ze)},[pt.floating.reference]),Un=v.useCallback(Ze=>{ft(Ze),pt.floating.floating(Ze)},[pt.floating.floating]);return O.createElement(WX,{value:{returnFocus:fe,disabled:ne,controlled:pt.controlled,reference:wn,floating:Un,x:pt.floating.x,y:pt.floating.y,arrowX:(r=(n=(t=pt.floating)==null?void 0:t.middlewareData)==null?void 0:n.arrow)==null?void 0:r.x,arrowY:(s=(i=(o=pt.floating)==null?void 0:o.middlewareData)==null?void 0:i.arrow)==null?void 0:s.y,opened:pt.opened,arrowRef:a,transitionProps:_,width:k,withArrow:S,arrowSize:P,arrowOffset:E,arrowRadius:$,arrowPosition:I,placement:pt.floating.placement,trapFocus:U,withinPortal:D,portalProps:K,zIndex:q,radius:H,shadow:ee,closeOnEscape:W,onClose:pt.onClose,onToggle:pt.onToggle,getTargetId:()=>`${Vt}-target`,getDropdownId:()=>`${Vt}-dropdown`,withRoles:X,targetProps:Te,__staticSelector:Pe,classNames:R,styles:F,unstyled:N,variant:Oe,keepMounted:Me}},u)}Ft.Target=xA;Ft.Dropdown=EA;Ft.displayName="@mantine/core/Popover";var CQ=Object.defineProperty,$g=Object.getOwnPropertySymbols,MA=Object.prototype.hasOwnProperty,TA=Object.prototype.propertyIsEnumerable,p$=(e,t,n)=>t in e?CQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,OQ=(e,t)=>{for(var n in t||(t={}))MA.call(t,n)&&p$(e,n,t[n]);if($g)for(var n of $g(t))TA.call(t,n)&&p$(e,n,t[n]);return e},EQ=(e,t)=>{var n={};for(var r in e)MA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&$g)for(var r of $g(e))t.indexOf(r)<0&&TA.call(e,r)&&(n[r]=e[r]);return n};function $Q(e){var t=e,{children:n,component:r="div",maxHeight:o=220,direction:i="column",id:s,innerRef:a,__staticSelector:c,styles:u,classNames:f,unstyled:p}=t,h=EQ(t,["children","component","maxHeight","direction","id","innerRef","__staticSelector","styles","classNames","unstyled"]);const{classes:g}=rX(null,{name:c,styles:u,classNames:f,unstyled:p});return O.createElement(Ft.Dropdown,OQ({p:0,onMouseDown:y=>y.preventDefault()},h),O.createElement("div",{style:{maxHeight:T(o),display:"flex"}},O.createElement(_e,{component:r||"div",id:`${s}-items`,"aria-labelledby":`${s}-label`,role:"listbox",onMouseDown:y=>y.preventDefault(),style:{flex:1,overflowY:r!==z0?"auto":void 0},"data-combobox-popover":!0,tabIndex:-1,ref:a},O.createElement("div",{className:g.itemsWrapper,style:{flexDirection:i}},n))))}function ga({opened:e,transitionProps:t={transition:"fade",duration:0},shadow:n,withinPortal:r,portalProps:o,children:i,__staticSelector:s,onDirectionChange:a,switchDirectionOnFlip:c,zIndex:u,dropdownPosition:f,positionDependencies:p=[],classNames:h,styles:g,unstyled:y,readOnly:_,variant:k}){return O.createElement(Ft,{unstyled:y,classNames:h,styles:g,width:"target",withRoles:!1,opened:e,middlewares:{flip:f==="flip",shift:!1},position:f==="flip"?"bottom":f,positionDependencies:p,zIndex:u,__staticSelector:s,withinPortal:r,portalProps:o,transitionProps:t,shadow:n,disabled:_,onPositionChange:b=>c&&a?.(b==="top"?"column-reverse":"column"),variant:k},i)}ga.Target=Ft.Target;ga.Dropdown=$Q;var MQ=Object.defineProperty,TQ=Object.defineProperties,IQ=Object.getOwnPropertyDescriptors,Mg=Object.getOwnPropertySymbols,IA=Object.prototype.hasOwnProperty,NA=Object.prototype.propertyIsEnumerable,h$=(e,t,n)=>t in e?MQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mh=(e,t)=>{for(var n in t||(t={}))IA.call(t,n)&&h$(e,n,t[n]);if(Mg)for(var n of Mg(t))NA.call(t,n)&&h$(e,n,t[n]);return e},NQ=(e,t)=>TQ(e,IQ(t)),RQ=(e,t)=>{var n={};for(var r in e)IA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Mg)for(var r of Mg(e))t.indexOf(r)<0&&NA.call(e,r)&&(n[r]=e[r]);return n};function RA(e,t,n){const r=ue(e,t,n),{label:o,description:i,error:s,required:a,classNames:c,styles:u,className:f,unstyled:p,__staticSelector:h,sx:g,errorProps:y,labelProps:_,descriptionProps:k,wrapperProps:b,id:S,size:P,style:E,inputContainer:$,inputWrapperOrder:I,withAsterisk:N,variant:R}=r,F=RQ(r,["label","description","error","required","classNames","styles","className","unstyled","__staticSelector","sx","errorProps","labelProps","descriptionProps","wrapperProps","id","size","style","inputContainer","inputWrapperOrder","withAsterisk","variant"]),B=Ia(S),{systemStyles:D,rest:K}=Ul(F),W=mh({label:o,description:i,error:s,required:a,classNames:c,className:f,__staticSelector:h,sx:g,errorProps:y,labelProps:_,descriptionProps:k,unstyled:p,styles:u,id:B,size:P,style:E,inputContainer:$,inputWrapperOrder:I,withAsterisk:N,variant:R},b);return NQ(mh({},K),{classNames:c,styles:u,unstyled:p,wrapperProps:mh(mh({},W),D),inputProps:{required:a,classNames:c,styles:u,unstyled:p,id:B,size:P,__staticSelector:h,error:s,variant:R}})}var LQ=te((e,t,{size:n})=>({label:{display:"inline-block",fontSize:Q({size:n,sizes:e.fontSizes}),fontWeight:500,color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[9],wordBreak:"break-word",cursor:"default",WebkitTapHighlightColor:"transparent"},required:{color:e.fn.variant({variant:"filled",color:"red"}).background}}));const zQ=LQ;var AQ=Object.defineProperty,Tg=Object.getOwnPropertySymbols,LA=Object.prototype.hasOwnProperty,zA=Object.prototype.propertyIsEnumerable,m$=(e,t,n)=>t in e?AQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,DQ=(e,t)=>{for(var n in t||(t={}))LA.call(t,n)&&m$(e,n,t[n]);if(Tg)for(var n of Tg(t))zA.call(t,n)&&m$(e,n,t[n]);return e},jQ=(e,t)=>{var n={};for(var r in e)LA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Tg)for(var r of Tg(e))t.indexOf(r)<0&&zA.call(e,r)&&(n[r]=e[r]);return n};const BQ={labelElement:"label",size:"sm"},Nk=v.forwardRef((e,t)=>{const n=ue("InputLabel",BQ,e),{labelElement:r,children:o,required:i,size:s,classNames:a,styles:c,unstyled:u,className:f,htmlFor:p,__staticSelector:h,variant:g,onMouseDown:y}=n,_=jQ(n,["labelElement","children","required","size","classNames","styles","unstyled","className","htmlFor","__staticSelector","variant","onMouseDown"]),{classes:k,cx:b}=zQ(null,{name:["InputWrapper",h],classNames:a,styles:c,unstyled:u,variant:g,size:s});return O.createElement(_e,DQ({component:r,ref:t,className:b(k.label,f),htmlFor:r==="label"?p:void 0,onMouseDown:S=>{y?.(S),!S.defaultPrevented&&S.detail>1&&S.preventDefault()}},_),o,i&&O.createElement("span",{className:k.required,"aria-hidden":!0}," *"))});Nk.displayName="@mantine/core/InputLabel";var FQ=te((e,t,{size:n})=>({error:{wordBreak:"break-word",color:e.fn.variant({variant:"filled",color:"red"}).background,fontSize:`calc(${Q({size:n,sizes:e.fontSizes})} - ${T(2)})`,lineHeight:1.2,display:"block"}}));const VQ=FQ;var HQ=Object.defineProperty,Ig=Object.getOwnPropertySymbols,AA=Object.prototype.hasOwnProperty,DA=Object.prototype.propertyIsEnumerable,g$=(e,t,n)=>t in e?HQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,WQ=(e,t)=>{for(var n in t||(t={}))AA.call(t,n)&&g$(e,n,t[n]);if(Ig)for(var n of Ig(t))DA.call(t,n)&&g$(e,n,t[n]);return e},UQ=(e,t)=>{var n={};for(var r in e)AA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ig)for(var r of Ig(e))t.indexOf(r)<0&&DA.call(e,r)&&(n[r]=e[r]);return n};const ZQ={size:"sm"},Rk=v.forwardRef((e,t)=>{const n=ue("InputError",ZQ,e),{children:r,className:o,classNames:i,styles:s,unstyled:a,size:c,__staticSelector:u,variant:f}=n,p=UQ(n,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:h,cx:g}=VQ(null,{name:["InputWrapper",u],classNames:i,styles:s,unstyled:a,variant:f,size:c});return O.createElement(ie,WQ({className:g(h.error,o),ref:t},p),r)});Rk.displayName="@mantine/core/InputError";var KQ=te((e,t,{size:n})=>({description:{wordBreak:"break-word",color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],fontSize:`calc(${Q({size:n,sizes:e.fontSizes})} - ${T(2)})`,lineHeight:1.2,display:"block"}}));const GQ=KQ;var qQ=Object.defineProperty,Ng=Object.getOwnPropertySymbols,jA=Object.prototype.hasOwnProperty,BA=Object.prototype.propertyIsEnumerable,v$=(e,t,n)=>t in e?qQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,YQ=(e,t)=>{for(var n in t||(t={}))jA.call(t,n)&&v$(e,n,t[n]);if(Ng)for(var n of Ng(t))BA.call(t,n)&&v$(e,n,t[n]);return e},JQ=(e,t)=>{var n={};for(var r in e)jA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ng)for(var r of Ng(e))t.indexOf(r)<0&&BA.call(e,r)&&(n[r]=e[r]);return n};const XQ={size:"sm"},Lk=v.forwardRef((e,t)=>{const n=ue("InputDescription",XQ,e),{children:r,className:o,classNames:i,styles:s,unstyled:a,size:c,__staticSelector:u,variant:f}=n,p=JQ(n,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:h,cx:g}=GQ(null,{name:["InputWrapper",u],classNames:i,styles:s,unstyled:a,variant:f,size:c});return O.createElement(ie,YQ({color:"dimmed",className:g(h.description,o),ref:t,unstyled:a},p),r)});Lk.displayName="@mantine/core/InputDescription";const FA=v.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0}),QQ=FA.Provider,eee=()=>v.useContext(FA);function tee(e,{hasDescription:t,hasError:n}){const r=e.findIndex(c=>c==="input"),o=e[r-1],i=e[r+1];return{offsetBottom:t&&i==="description"||n&&i==="error",offsetTop:t&&o==="description"||n&&o==="error"}}var nee=Object.defineProperty,ree=Object.defineProperties,oee=Object.getOwnPropertyDescriptors,y$=Object.getOwnPropertySymbols,iee=Object.prototype.hasOwnProperty,see=Object.prototype.propertyIsEnumerable,_$=(e,t,n)=>t in e?nee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,aee=(e,t)=>{for(var n in t||(t={}))iee.call(t,n)&&_$(e,n,t[n]);if(y$)for(var n of y$(t))see.call(t,n)&&_$(e,n,t[n]);return e},lee=(e,t)=>ree(e,oee(t)),cee=te(e=>({root:lee(aee({},e.fn.fontStyles()),{lineHeight:e.lineHeight})}));const uee=cee;var dee=Object.defineProperty,fee=Object.defineProperties,pee=Object.getOwnPropertyDescriptors,Rg=Object.getOwnPropertySymbols,VA=Object.prototype.hasOwnProperty,HA=Object.prototype.propertyIsEnumerable,w$=(e,t,n)=>t in e?dee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rs=(e,t)=>{for(var n in t||(t={}))VA.call(t,n)&&w$(e,n,t[n]);if(Rg)for(var n of Rg(t))HA.call(t,n)&&w$(e,n,t[n]);return e},b$=(e,t)=>fee(e,pee(t)),hee=(e,t)=>{var n={};for(var r in e)VA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Rg)for(var r of Rg(e))t.indexOf(r)<0&&HA.call(e,r)&&(n[r]=e[r]);return n};const mee={labelElement:"label",size:"sm",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},WA=v.forwardRef((e,t)=>{const n=ue("InputWrapper",mee,e),{className:r,label:o,children:i,required:s,id:a,error:c,description:u,labelElement:f,labelProps:p,descriptionProps:h,errorProps:g,classNames:y,styles:_,size:k,inputContainer:b,__staticSelector:S,unstyled:P,inputWrapperOrder:E,withAsterisk:$,variant:I}=n,N=hee(n,["className","label","children","required","id","error","description","labelElement","labelProps","descriptionProps","errorProps","classNames","styles","size","inputContainer","__staticSelector","unstyled","inputWrapperOrder","withAsterisk","variant"]),{classes:R,cx:F}=uee(null,{classNames:y,styles:_,name:["InputWrapper",S],unstyled:P,variant:I,size:k}),B={classNames:y,styles:_,unstyled:P,size:k,variant:I,__staticSelector:S},D=typeof $=="boolean"?$:s,K=a?`${a}-error`:g?.id,W=a?`${a}-description`:h?.id,U=`${!!c&&typeof c!="boolean"?K:""} ${u?W:""}`,J=U.trim().length>0?U.trim():void 0,G=o&&O.createElement(Nk,Rs(Rs({key:"label",labelElement:f,id:a?`${a}-label`:void 0,htmlFor:a,required:D},B),p),o),A=u&&O.createElement(Lk,b$(Rs(Rs({key:"description"},h),B),{size:h?.size||B.size,id:h?.id||W}),u),q=O.createElement(v.Fragment,{key:"input"},b(i)),H=typeof c!="boolean"&&c&&O.createElement(Rk,b$(Rs(Rs({},g),B),{size:g?.size||B.size,key:"error",id:g?.id||K}),c),ee=E.map(re=>{switch(re){case"label":return G;case"input":return q;case"description":return A;case"error":return H;default:return null}});return O.createElement(QQ,{value:Rs({describedBy:J},tee(E,{hasDescription:!!A,hasError:!!H}))},O.createElement(_e,Rs({className:F(R.root,r),ref:t},N),ee))});WA.displayName="@mantine/core/InputWrapper";var gee=Object.defineProperty,Lg=Object.getOwnPropertySymbols,UA=Object.prototype.hasOwnProperty,ZA=Object.prototype.propertyIsEnumerable,S$=(e,t,n)=>t in e?gee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vee=(e,t)=>{for(var n in t||(t={}))UA.call(t,n)&&S$(e,n,t[n]);if(Lg)for(var n of Lg(t))ZA.call(t,n)&&S$(e,n,t[n]);return e},yee=(e,t)=>{var n={};for(var r in e)UA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Lg)for(var r of Lg(e))t.indexOf(r)<0&&ZA.call(e,r)&&(n[r]=e[r]);return n};const _ee={},KA=v.forwardRef((e,t)=>{const n=ue("InputPlaceholder",_ee,e),{sx:r}=n,o=yee(n,["sx"]);return O.createElement(_e,vee({component:"span",sx:[i=>i.fn.placeholderStyles(),...Wf(r)],ref:t},o))});KA.displayName="@mantine/core/InputPlaceholder";var wee=Object.defineProperty,bee=Object.defineProperties,See=Object.getOwnPropertyDescriptors,x$=Object.getOwnPropertySymbols,xee=Object.prototype.hasOwnProperty,kee=Object.prototype.propertyIsEnumerable,k$=(e,t,n)=>t in e?wee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gh=(e,t)=>{for(var n in t||(t={}))xee.call(t,n)&&k$(e,n,t[n]);if(x$)for(var n of x$(t))kee.call(t,n)&&k$(e,n,t[n]);return e},N_=(e,t)=>bee(e,See(t));const gr={xs:T(30),sm:T(36),md:T(42),lg:T(50),xl:T(60)},Pee=["default","filled","unstyled"];function Cee({theme:e,variant:t}){return Pee.includes(t)?t==="default"?{border:`${T(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,transition:"border-color 100ms ease","&:focus, &:focus-within":e.focusRingStyles.inputStyles(e)}:t==="filled"?{border:`${T(1)} solid transparent`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],"&:focus, &:focus-within":e.focusRingStyles.inputStyles(e)}:{borderWidth:0,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,backgroundColor:"transparent",minHeight:T(28),outline:0,"&:focus, &:focus-within":{outline:"none",borderColor:"transparent"},"&:disabled":{backgroundColor:"transparent","&:focus, &:focus-within":{outline:"none",borderColor:"transparent"}}}:null}var Oee=te((e,{multiline:t,radius:n,invalid:r,rightSectionWidth:o,withRightSection:i,iconWidth:s,offsetBottom:a,offsetTop:c,pointer:u},{variant:f,size:p})=>{const h=e.fn.variant({variant:"filled",color:"red"}).background,g=f==="default"||f==="filled"?{minHeight:Q({size:p,sizes:gr}),paddingLeft:`calc(${Q({size:p,sizes:gr})} / 3)`,paddingRight:i?o||Q({size:p,sizes:gr}):`calc(${Q({size:p,sizes:gr})} / 3)`,borderRadius:e.fn.radius(n)}:null;return{wrapper:{position:"relative",marginTop:c?`calc(${e.spacing.xs} / 2)`:void 0,marginBottom:a?`calc(${e.spacing.xs} / 2)`:void 0},input:N_(gh(gh(N_(gh({},e.fn.fontStyles()),{height:t?f==="unstyled"?void 0:"auto":Q({size:p,sizes:gr}),WebkitTapHighlightColor:"transparent",lineHeight:t?e.lineHeight:`calc(${Q({size:p,sizes:gr})} - ${T(2)})`,appearance:"none",resize:"none",boxSizing:"border-box",fontSize:Q({size:p,sizes:e.fontSizes}),width:"100%",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"block",textAlign:"left",cursor:u?"pointer":void 0}),Cee({theme:e,variant:f})),g),{"&:disabled, &[data-disabled]":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,cursor:"not-allowed","&::placeholder":{color:e.colors.dark[2]}},"&[data-invalid]":{color:h,borderColor:h,"&::placeholder":{opacity:1,color:h}},"&[data-with-icon]":{paddingLeft:typeof s=="number"?T(s):Q({size:p,sizes:gr})},"&::placeholder":N_(gh({},e.fn.placeholderStyles()),{opacity:1}),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button, &::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, &::-webkit-search-results-decoration":{appearance:"none"},"&[type=number]":{MozAppearance:"textfield"}}),icon:{pointerEvents:"none",position:"absolute",zIndex:1,left:0,top:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",width:s?T(s):Q({size:p,sizes:gr}),color:r?e.colors.red[e.colorScheme==="dark"?6:7]:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[5]},rightSection:{position:"absolute",top:0,bottom:0,right:0,display:"flex",alignItems:"center",justifyContent:"center",width:o||Q({size:p,sizes:gr})}}}),Eee=Object.defineProperty,$ee=Object.defineProperties,Mee=Object.getOwnPropertyDescriptors,zg=Object.getOwnPropertySymbols,GA=Object.prototype.hasOwnProperty,qA=Object.prototype.propertyIsEnumerable,P$=(e,t,n)=>t in e?Eee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vh=(e,t)=>{for(var n in t||(t={}))GA.call(t,n)&&P$(e,n,t[n]);if(zg)for(var n of zg(t))qA.call(t,n)&&P$(e,n,t[n]);return e},C$=(e,t)=>$ee(e,Mee(t)),Tee=(e,t)=>{var n={};for(var r in e)GA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&zg)for(var r of zg(e))t.indexOf(r)<0&&qA.call(e,r)&&(n[r]=e[r]);return n};const Iee={size:"sm",variant:"default"},ql=v.forwardRef((e,t)=>{const n=ue("Input",Iee,e),{className:r,error:o,required:i,disabled:s,variant:a,icon:c,style:u,rightSectionWidth:f,iconWidth:p,rightSection:h,rightSectionProps:g,radius:y,size:_,wrapperProps:k,classNames:b,styles:S,__staticSelector:P,multiline:E,sx:$,unstyled:I,pointer:N}=n,R=Tee(n,["className","error","required","disabled","variant","icon","style","rightSectionWidth","iconWidth","rightSection","rightSectionProps","radius","size","wrapperProps","classNames","styles","__staticSelector","multiline","sx","unstyled","pointer"]),{offsetBottom:F,offsetTop:B,describedBy:D}=eee(),{classes:K,cx:W}=Oee({radius:y,multiline:E,invalid:!!o,rightSectionWidth:f?T(f):void 0,iconWidth:p,withRightSection:!!h,offsetBottom:F,offsetTop:B,pointer:N},{classNames:b,styles:S,name:["Input",P],unstyled:I,variant:a,size:_}),{systemStyles:V,rest:U}=Ul(R);return O.createElement(_e,vh(vh({className:W(K.wrapper,r),sx:$,style:u},V),k),c&&O.createElement("div",{className:K.icon},c),O.createElement(_e,C$(vh({component:"input"},U),{ref:t,required:i,"aria-invalid":!!o,"aria-describedby":D,disabled:s,"data-disabled":s||void 0,"data-with-icon":!!c||void 0,"data-invalid":!!o||void 0,className:K.input})),h&&O.createElement("div",C$(vh({},g),{className:K.rightSection}),h))});ql.displayName="@mantine/core/Input";ql.Wrapper=WA;ql.Label=Nk;ql.Description=Lk;ql.Error=Rk;ql.Placeholder=KA;const ys=ql;var Nee=Object.defineProperty,Ree=Object.defineProperties,Lee=Object.getOwnPropertyDescriptors,O$=Object.getOwnPropertySymbols,zee=Object.prototype.hasOwnProperty,Aee=Object.prototype.propertyIsEnumerable,E$=(e,t,n)=>t in e?Nee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Dee=(e,t)=>{for(var n in t||(t={}))zee.call(t,n)&&E$(e,n,t[n]);if(O$)for(var n of O$(t))Aee.call(t,n)&&E$(e,n,t[n]);return e},jee=(e,t)=>Ree(e,Lee(t));function Bee(e){return O.createElement("svg",jee(Dee({},e),{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),O.createElement("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"}))}var Fee=Object.defineProperty,Vee=Object.defineProperties,Hee=Object.getOwnPropertyDescriptors,$$=Object.getOwnPropertySymbols,Wee=Object.prototype.hasOwnProperty,Uee=Object.prototype.propertyIsEnumerable,M$=(e,t,n)=>t in e?Fee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zee=(e,t)=>{for(var n in t||(t={}))Wee.call(t,n)&&M$(e,n,t[n]);if($$)for(var n of $$(t))Uee.call(t,n)&&M$(e,n,t[n]);return e},Kee=(e,t)=>Vee(e,Hee(t));const YA=v.createContext(null);function Gee({spacing:e,children:t}){return O.createElement(YA.Provider,{value:{spacing:e}},t)}function qee(){const e=v.useContext(YA);return e?Kee(Zee({},e),{withinGroup:!0}):{spacing:null,withinGroup:!1}}var Yee=te((e,{spacing:t})=>({root:{display:"flex",paddingLeft:Q({size:t,sizes:e.spacing})}}));const Jee=Yee;var Xee=Object.defineProperty,Ag=Object.getOwnPropertySymbols,JA=Object.prototype.hasOwnProperty,XA=Object.prototype.propertyIsEnumerable,T$=(e,t,n)=>t in e?Xee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qee=(e,t)=>{for(var n in t||(t={}))JA.call(t,n)&&T$(e,n,t[n]);if(Ag)for(var n of Ag(t))XA.call(t,n)&&T$(e,n,t[n]);return e},ete=(e,t)=>{var n={};for(var r in e)JA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ag)for(var r of Ag(e))t.indexOf(r)<0&&XA.call(e,r)&&(n[r]=e[r]);return n};const tte={},QA=v.forwardRef((e,t)=>{const n=ue("AvatarGroup",tte,e),{children:r,spacing:o="sm",unstyled:i,className:s,variant:a}=n,c=ete(n,["children","spacing","unstyled","className","variant"]),{classes:u,cx:f}=Jee({spacing:o},{name:"AvatarGroup",unstyled:i,variant:a});return O.createElement(Gee,{spacing:o},O.createElement(_e,Qee({ref:t,className:f(u.root,s)},c),r))});QA.displayName="@mantine/core/AvatarGroup";var nte=Object.defineProperty,rte=Object.defineProperties,ote=Object.getOwnPropertyDescriptors,I$=Object.getOwnPropertySymbols,ite=Object.prototype.hasOwnProperty,ste=Object.prototype.propertyIsEnumerable,N$=(e,t,n)=>t in e?nte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ld=(e,t)=>{for(var n in t||(t={}))ite.call(t,n)&&N$(e,n,t[n]);if(I$)for(var n of I$(t))ste.call(t,n)&&N$(e,n,t[n]);return e},R$=(e,t)=>rte(e,ote(t));const ate=["filled","light","gradient","outline"],yh={xs:T(16),sm:T(26),md:T(38),lg:T(56),xl:T(84)};function lte({withinGroup:e,spacing:t,theme:n}){return e?{marginLeft:`calc(${Q({size:t,sizes:n.spacing})} * -1)`,backgroundColor:`${n.colorScheme==="dark"?n.colors.dark[7]:n.white}`,border:`${T(2)} solid ${n.colorScheme==="dark"?n.colors.dark[7]:n.white}`}:null}function cte({theme:e,variant:t,color:n,gradient:r}){const o=e.fn.variant({variant:t,color:n,gradient:r});return ate.includes(t)?{placeholder:{color:o.color,backgroundColor:o.background,backgroundImage:t==="gradient"?o.background:void 0,border:`${T(t==="gradient"?0:1)} solid ${o.border}`},placeholderIcon:{color:o.color}}:{}}var ute=te((e,{radius:t,withinGroup:n,spacing:r,color:o,gradient:i},{variant:s,size:a})=>{const c=cte({theme:e,color:o,gradient:i,variant:s});return{root:ld(R$(ld({},e.fn.focusStyles()),{WebkitTapHighlightColor:"transparent",boxSizing:"border-box",position:"relative",display:"block",userSelect:"none",overflow:"hidden",borderRadius:e.fn.radius(t),textDecoration:"none",border:0,backgroundColor:"transparent",padding:0,width:Q({size:a,sizes:yh}),minWidth:Q({size:a,sizes:yh}),height:Q({size:a,sizes:yh})}),lte({withinGroup:n,spacing:r,theme:e})),image:{objectFit:"cover",width:"100%",height:"100%",display:"block"},placeholder:ld(R$(ld({},e.fn.fontStyles()),{fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",userSelect:"none",borderRadius:e.fn.radius(t),fontSize:`calc(${Q({size:a,sizes:yh})} / 2.5)`}),c.placeholder),placeholderIcon:ld({width:"70%",height:"70%"},c.placeholderIcon)}});const dte=ute;var fte=Object.defineProperty,pte=Object.defineProperties,hte=Object.getOwnPropertyDescriptors,Dg=Object.getOwnPropertySymbols,eD=Object.prototype.hasOwnProperty,tD=Object.prototype.propertyIsEnumerable,L$=(e,t,n)=>t in e?fte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,z$=(e,t)=>{for(var n in t||(t={}))eD.call(t,n)&&L$(e,n,t[n]);if(Dg)for(var n of Dg(t))tD.call(t,n)&&L$(e,n,t[n]);return e},mte=(e,t)=>pte(e,hte(t)),gte=(e,t)=>{var n={};for(var r in e)eD.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Dg)for(var r of Dg(e))t.indexOf(r)<0&&tD.call(e,r)&&(n[r]=e[r]);return n};const vte={size:"md",color:"gray",variant:"light"},zk=v.forwardRef((e,t)=>{const n=ue("Avatar",vte,e),{className:r,size:o,src:i,alt:s,radius:a,children:c,color:u,variant:f,gradient:p,classNames:h,styles:g,imageProps:y,unstyled:_}=n,k=gte(n,["className","size","src","alt","radius","children","color","variant","gradient","classNames","styles","imageProps","unstyled"]),b=qee(),[S,P]=v.useState(!i),{classes:E,cx:$}=dte({color:u,radius:a,withinGroup:b.withinGroup,spacing:b.spacing,gradient:p},{classNames:h,styles:g,unstyled:_,name:"Avatar",variant:f,size:o});return v.useEffect(()=>{P(!i)},[i]),O.createElement(_e,z$({component:"div",className:$(E.root,r),ref:t},k),S?O.createElement("div",{className:E.placeholder,title:s},c||O.createElement(Bee,{className:E.placeholderIcon})):O.createElement("img",mte(z$({},y),{className:E.image,src:i,alt:s,onError:()=>P(!0)})))});zk.displayName="@mantine/core/Avatar";zk.Group=QA;const j0=zk;var yte=Object.defineProperty,_te=Object.defineProperties,wte=Object.getOwnPropertyDescriptors,A$=Object.getOwnPropertySymbols,bte=Object.prototype.hasOwnProperty,Ste=Object.prototype.propertyIsEnumerable,D$=(e,t,n)=>t in e?yte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,R_=(e,t)=>{for(var n in t||(t={}))bte.call(t,n)&&D$(e,n,t[n]);if(A$)for(var n of A$(t))Ste.call(t,n)&&D$(e,n,t[n]);return e},xte=(e,t)=>_te(e,wte(t));const kte=["light","filled","outline","dot","gradient"],L_={xs:{fontSize:T(9),height:T(16)},sm:{fontSize:T(10),height:T(18)},md:{fontSize:T(11),height:T(20)},lg:{fontSize:T(13),height:T(26)},xl:{fontSize:T(16),height:T(32)}},Pte={xs:T(4),sm:T(4),md:T(6),lg:T(8),xl:T(10)};function Cte({theme:e,variant:t,color:n,size:r,gradient:o}){if(!kte.includes(t))return null;if(t==="dot"){const s=Q({size:r,sizes:Pte});return{backgroundColor:"transparent",color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],border:`${T(1)} solid ${e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[3]}`,paddingLeft:`calc(${Q({size:r,sizes:e.spacing})} / 1.5 - ${s} / 2)`,"&::before":{content:'""',display:"block",width:s,height:s,borderRadius:s,backgroundColor:e.fn.themeColor(n,e.colorScheme==="dark"?4:e.fn.primaryShade("light"),!0),marginRight:s}}}const i=e.fn.variant({color:n,variant:t,gradient:o});return{background:i.background,color:i.color,border:`${T(t==="gradient"?0:1)} solid ${i.border}`}}var Ote=te((e,{color:t,radius:n,gradient:r,fullWidth:o},{variant:i,size:s})=>{const{fontSize:a,height:c}=s in L_?L_[s]:L_.md;return{leftSection:{marginRight:`calc(${e.spacing.xs} / 2)`},rightSection:{marginLeft:`calc(${e.spacing.xs} / 2)`},inner:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},root:R_(xte(R_(R_({},e.fn.focusStyles()),e.fn.fontStyles()),{fontSize:a,height:c,WebkitTapHighlightColor:"transparent",lineHeight:`calc(${c} - ${T(2)})`,textDecoration:"none",padding:`0 calc(${Q({size:s,sizes:e.spacing})} / 1.5)`,boxSizing:"border-box",display:o?"flex":"inline-flex",alignItems:"center",justifyContent:"center",width:o?"100%":"auto",textTransform:"uppercase",borderRadius:e.fn.radius(n),fontWeight:700,letterSpacing:T(.25),cursor:"inherit",textOverflow:"ellipsis",overflow:"hidden"}),Cte({theme:e,variant:i,color:t,size:s,gradient:r}))}});const Ete=Ote;var $te=Object.defineProperty,jg=Object.getOwnPropertySymbols,nD=Object.prototype.hasOwnProperty,rD=Object.prototype.propertyIsEnumerable,j$=(e,t,n)=>t in e?$te(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mte=(e,t)=>{for(var n in t||(t={}))nD.call(t,n)&&j$(e,n,t[n]);if(jg)for(var n of jg(t))rD.call(t,n)&&j$(e,n,t[n]);return e},Tte=(e,t)=>{var n={};for(var r in e)nD.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&jg)for(var r of jg(e))t.indexOf(r)<0&&rD.call(e,r)&&(n[r]=e[r]);return n};const Ite={variant:"light",size:"md",radius:"xl"},oD=v.forwardRef((e,t)=>{const n=ue("Badge",Ite,e),{className:r,color:o,variant:i,fullWidth:s,children:a,size:c,leftSection:u,rightSection:f,radius:p,gradient:h,classNames:g,styles:y,unstyled:_}=n,k=Tte(n,["className","color","variant","fullWidth","children","size","leftSection","rightSection","radius","gradient","classNames","styles","unstyled"]),{classes:b,cx:S}=Ete({fullWidth:s,color:o,radius:p,gradient:h},{classNames:g,styles:y,name:"Badge",unstyled:_,variant:i,size:c});return O.createElement(_e,Mte({className:S(b.root,r),ref:t},k),u&&O.createElement("span",{className:b.leftSection},u),O.createElement("span",{className:b.inner},a),f&&O.createElement("span",{className:b.rightSection},f))});oD.displayName="@mantine/core/Badge";const Qt=oD;var Nte=te((e,{orientation:t,buttonBorderWidth:n})=>({root:{display:"flex",flexDirection:t==="vertical"?"column":"row","& [data-button]":{"&:first-of-type:not(:last-of-type)":{borderBottomRightRadius:0,[t==="vertical"?"borderBottomLeftRadius":"borderTopRightRadius"]:0,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:`calc(${T(n)} / 2)`},"&:last-of-type:not(:first-of-type)":{borderTopLeftRadius:0,[t==="vertical"?"borderTopRightRadius":"borderBottomLeftRadius"]:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${T(n)} / 2)`},"&:not(:first-of-type):not(:last-of-type)":{borderRadius:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${T(n)} / 2)`,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:`calc(${T(n)} / 2)`},"& + [data-button]":{[t==="vertical"?"marginTop":"marginLeft"]:`calc(${n} * -1)`,"@media (min-resolution: 192dpi)":{[t==="vertical"?"marginTop":"marginLeft"]:0}}}}}));const Rte=Nte;var Lte=Object.defineProperty,Bg=Object.getOwnPropertySymbols,iD=Object.prototype.hasOwnProperty,sD=Object.prototype.propertyIsEnumerable,B$=(e,t,n)=>t in e?Lte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zte=(e,t)=>{for(var n in t||(t={}))iD.call(t,n)&&B$(e,n,t[n]);if(Bg)for(var n of Bg(t))sD.call(t,n)&&B$(e,n,t[n]);return e},Ate=(e,t)=>{var n={};for(var r in e)iD.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Bg)for(var r of Bg(e))t.indexOf(r)<0&&sD.call(e,r)&&(n[r]=e[r]);return n};const Dte={orientation:"horizontal",buttonBorderWidth:1},aD=v.forwardRef((e,t)=>{const n=ue("ButtonGroup",Dte,e),{className:r,orientation:o,buttonBorderWidth:i,unstyled:s}=n,a=Ate(n,["className","orientation","buttonBorderWidth","unstyled"]),{classes:c,cx:u}=Rte({orientation:o,buttonBorderWidth:i},{name:"ButtonGroup",unstyled:s});return O.createElement(_e,zte({className:u(c.root,r),ref:t},a))});aD.displayName="@mantine/core/ButtonGroup";var jte=Object.defineProperty,Bte=Object.defineProperties,Fte=Object.getOwnPropertyDescriptors,F$=Object.getOwnPropertySymbols,Vte=Object.prototype.hasOwnProperty,Hte=Object.prototype.propertyIsEnumerable,V$=(e,t,n)=>t in e?jte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,as=(e,t)=>{for(var n in t||(t={}))Vte.call(t,n)&&V$(e,n,t[n]);if(F$)for(var n of F$(t))Hte.call(t,n)&&V$(e,n,t[n]);return e},am=(e,t)=>Bte(e,Fte(t));const Wte=["filled","outline","light","white","default","subtle","gradient"],nS={xs:{height:gr.xs,paddingLeft:T(14),paddingRight:T(14)},sm:{height:gr.sm,paddingLeft:T(18),paddingRight:T(18)},md:{height:gr.md,paddingLeft:T(22),paddingRight:T(22)},lg:{height:gr.lg,paddingLeft:T(26),paddingRight:T(26)},xl:{height:gr.xl,paddingLeft:T(32),paddingRight:T(32)},"compact-xs":{height:T(22),paddingLeft:T(7),paddingRight:T(7)},"compact-sm":{height:T(26),paddingLeft:T(8),paddingRight:T(8)},"compact-md":{height:T(30),paddingLeft:T(10),paddingRight:T(10)},"compact-lg":{height:T(34),paddingLeft:T(12),paddingRight:T(12)},"compact-xl":{height:T(40),paddingLeft:T(14),paddingRight:T(14)}};function Ute({compact:e,size:t,withLeftIcon:n,withRightIcon:r}){if(e)return nS[`compact-${t}`];const o=nS[t];return o?am(as({},o),{paddingLeft:n?`calc(${o.paddingLeft} / 1.5)`:o.paddingLeft,paddingRight:r?`calc(${o.paddingRight} / 1.5)`:o.paddingRight}):{}}const Zte=e=>({display:e?"block":"inline-block",width:e?"100%":"auto"});function Kte({variant:e,theme:t,color:n,gradient:r}){if(!Wte.includes(e))return null;const o=t.fn.variant({color:n,variant:e,gradient:r});return e==="gradient"?as({border:0,backgroundImage:o.background,color:o.color},t.fn.hover({backgroundSize:"200%"})):as({border:`${T(1)} solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover}))}var Gte=te((e,{radius:t,fullWidth:n,compact:r,withLeftIcon:o,withRightIcon:i,color:s,gradient:a},{variant:c,size:u})=>({root:am(as(am(as(as(as(as({},Ute({compact:r,size:u,withLeftIcon:o,withRightIcon:i})),e.fn.fontStyles()),e.fn.focusStyles()),Zte(n)),{borderRadius:e.fn.radius(t),fontWeight:600,position:"relative",lineHeight:1,fontSize:Q({size:u,sizes:e.fontSizes}),userSelect:"none",cursor:"pointer"}),Kte({variant:c,theme:e,color:s,gradient:a})),{"&:active":e.activeStyles,"&:disabled, &[data-disabled]":{borderColor:"transparent",backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],color:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[5],cursor:"not-allowed",backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":am(as({content:'""'},e.fn.cover(T(-1))),{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:e.fn.radius(t),cursor:"not-allowed"})}}),icon:{display:"flex",alignItems:"center"},leftIcon:{marginRight:e.spacing.xs},rightIcon:{marginLeft:e.spacing.xs},centerLoader:{position:"absolute",left:"50%",transform:"translateX(-50%)",opacity:.5},inner:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",overflow:"visible"},label:{whiteSpace:"nowrap",height:"100%",overflow:"hidden",display:"flex",alignItems:"center"}}));const qte=Gte;var Yte=Object.defineProperty,Fg=Object.getOwnPropertySymbols,lD=Object.prototype.hasOwnProperty,cD=Object.prototype.propertyIsEnumerable,H$=(e,t,n)=>t in e?Yte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,W$=(e,t)=>{for(var n in t||(t={}))lD.call(t,n)&&H$(e,n,t[n]);if(Fg)for(var n of Fg(t))cD.call(t,n)&&H$(e,n,t[n]);return e},Jte=(e,t)=>{var n={};for(var r in e)lD.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Fg)for(var r of Fg(e))t.indexOf(r)<0&&cD.call(e,r)&&(n[r]=e[r]);return n};const Xte={size:"sm",type:"button",variant:"filled",loaderPosition:"left"},Ak=v.forwardRef((e,t)=>{const n=ue("Button",Xte,e),{className:r,size:o,color:i,type:s,disabled:a,children:c,leftIcon:u,rightIcon:f,fullWidth:p,variant:h,radius:g,uppercase:y,compact:_,loading:k,loaderPosition:b,loaderProps:S,gradient:P,classNames:E,styles:$,unstyled:I}=n,N=Jte(n,["className","size","color","type","disabled","children","leftIcon","rightIcon","fullWidth","variant","radius","uppercase","compact","loading","loaderPosition","loaderProps","gradient","classNames","styles","unstyled"]),{classes:R,cx:F,theme:B}=qte({radius:g,color:i,fullWidth:p,compact:_,gradient:P,withLeftIcon:!!u,withRightIcon:!!f},{name:"Button",unstyled:I,classNames:E,styles:$,variant:h,size:o}),D=B.fn.variant({color:i,variant:h}),K=O.createElement(Qf,W$({color:D.color,size:`calc(${Q({size:o,sizes:nS}).height} / 2)`},S));return O.createElement(Bn,W$({className:F(R.root,r),type:s,disabled:a,"data-button":!0,"data-disabled":a||void 0,"data-loading":k||void 0,ref:t,unstyled:I},N),O.createElement("div",{className:R.inner},(u||k&&b==="left")&&O.createElement("span",{className:F(R.icon,R.leftIcon)},k&&b==="left"?K:u),k&&b==="center"&&O.createElement("span",{className:R.centerLoader},K),O.createElement("span",{className:R.label,style:{textTransform:y?"uppercase":void 0}},c),(f||k&&b==="right")&&O.createElement("span",{className:F(R.icon,R.rightIcon)},k&&b==="right"?K:f)))});Ak.displayName="@mantine/core/Button";Ak.Group=aD;const Fn=Ak;var Qte=te((e,{radius:t,shadow:n})=>({root:{outline:0,WebkitTapHighlightColor:"transparent",display:"block",textDecoration:"none",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,boxSizing:"border-box",borderRadius:e.fn.radius(t),boxShadow:e.shadows[n]||n||"none","&[data-with-border]":{border:`${T(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`}}}));const ene=Qte;var tne=Object.defineProperty,Vg=Object.getOwnPropertySymbols,uD=Object.prototype.hasOwnProperty,dD=Object.prototype.propertyIsEnumerable,U$=(e,t,n)=>t in e?tne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nne=(e,t)=>{for(var n in t||(t={}))uD.call(t,n)&&U$(e,n,t[n]);if(Vg)for(var n of Vg(t))dD.call(t,n)&&U$(e,n,t[n]);return e},rne=(e,t)=>{var n={};for(var r in e)uD.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Vg)for(var r of Vg(e))t.indexOf(r)<0&&dD.call(e,r)&&(n[r]=e[r]);return n};const one={},fD=v.forwardRef((e,t)=>{const n=ue("Paper",one,e),{className:r,children:o,radius:i,withBorder:s,shadow:a,unstyled:c,variant:u}=n,f=rne(n,["className","children","radius","withBorder","shadow","unstyled","variant"]),{classes:p,cx:h}=ene({radius:i,shadow:a},{name:"Paper",unstyled:c,variant:u});return O.createElement(_e,nne({className:h(p.root,r),"data-with-border":s||void 0,ref:t},f),o)});fD.displayName="@mantine/core/Paper";const zr=fD;var ine=te((e,{inline:t})=>({root:{display:t?"inline-flex":"flex",alignItems:"center",justifyContent:"center"}}));const sne=ine;var ane=Object.defineProperty,Hg=Object.getOwnPropertySymbols,pD=Object.prototype.hasOwnProperty,hD=Object.prototype.propertyIsEnumerable,Z$=(e,t,n)=>t in e?ane(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lne=(e,t)=>{for(var n in t||(t={}))pD.call(t,n)&&Z$(e,n,t[n]);if(Hg)for(var n of Hg(t))hD.call(t,n)&&Z$(e,n,t[n]);return e},cne=(e,t)=>{var n={};for(var r in e)pD.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Hg)for(var r of Hg(e))t.indexOf(r)<0&&hD.call(e,r)&&(n[r]=e[r]);return n};const mD=v.forwardRef((e,t)=>{const n=ue("Center",{},e),{inline:r,className:o,unstyled:i,variant:s}=n,a=cne(n,["inline","className","unstyled","variant"]),{classes:c,cx:u}=sne({inline:r},{name:"Center",unstyled:i,variant:s});return O.createElement(_e,lne({ref:t,className:u(c.root,o)},a))});mD.displayName="@mantine/core/Center";const Al=mD,gD=v.createContext(null),une=gD.Provider,dne=()=>v.useContext(gD);var fne=Object.defineProperty,Wg=Object.getOwnPropertySymbols,vD=Object.prototype.hasOwnProperty,yD=Object.prototype.propertyIsEnumerable,K$=(e,t,n)=>t in e?fne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,G$=(e,t)=>{for(var n in t||(t={}))vD.call(t,n)&&K$(e,n,t[n]);if(Wg)for(var n of Wg(t))yD.call(t,n)&&K$(e,n,t[n]);return e},pne=(e,t)=>{var n={};for(var r in e)vD.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Wg)for(var r of Wg(e))t.indexOf(r)<0&&yD.call(e,r)&&(n[r]=e[r]);return n};const hne={size:"sm"},_D=v.forwardRef((e,t)=>{const n=ue("CheckboxGroup",hne,e),{children:r,value:o,defaultValue:i,onChange:s,size:a,wrapperProps:c}=n,u=pne(n,["children","value","defaultValue","onChange","size","wrapperProps"]),[f,p]=si({value:o,defaultValue:i,finalValue:[],onChange:s}),h=g=>{const y=g.currentTarget.value;p(f.includes(y)?f.filter(_=>_!==y):[...f,y])};return O.createElement(une,{value:{value:f,onChange:h,size:a}},O.createElement(ys.Wrapper,G$(G$({labelElement:"div",size:a,__staticSelector:"CheckboxGroup",ref:t},c),u),r))});_D.displayName="@mantine/core/CheckboxGroup";var mne=Object.defineProperty,Ug=Object.getOwnPropertySymbols,wD=Object.prototype.hasOwnProperty,bD=Object.prototype.propertyIsEnumerable,q$=(e,t,n)=>t in e?mne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rS=(e,t)=>{for(var n in t||(t={}))wD.call(t,n)&&q$(e,n,t[n]);if(Ug)for(var n of Ug(t))bD.call(t,n)&&q$(e,n,t[n]);return e},gne=(e,t)=>{var n={};for(var r in e)wD.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ug)for(var r of Ug(e))t.indexOf(r)<0&&bD.call(e,r)&&(n[r]=e[r]);return n};function SD(e){return O.createElement("svg",rS({viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),O.createElement("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 vne(e){var t=e,{indeterminate:n}=t,r=gne(t,["indeterminate"]);return n?O.createElement("svg",rS({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6"},r),O.createElement("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})):O.createElement(SD,rS({},r))}var yne=Object.defineProperty,_ne=Object.defineProperties,wne=Object.getOwnPropertyDescriptors,Y$=Object.getOwnPropertySymbols,bne=Object.prototype.hasOwnProperty,Sne=Object.prototype.propertyIsEnumerable,J$=(e,t,n)=>t in e?yne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,X$=(e,t)=>{for(var n in t||(t={}))bne.call(t,n)&&J$(e,n,t[n]);if(Y$)for(var n of Y$(t))Sne.call(t,n)&&J$(e,n,t[n]);return e},Q$=(e,t)=>_ne(e,wne(t));const xne={xs:T(16),sm:T(20),md:T(24),lg:T(30),xl:T(36)};var kne=te((e,{radius:t,color:n,transitionDuration:r,labelPosition:o,error:i,indeterminate:s},{size:a})=>{const c=Q({size:a,sizes:xne}),u=e.fn.variant({variant:"filled",color:n});return{icon:Q$(X$({},e.fn.cover()),{ref:On("icon"),color:s?"inherit":e.white,transform:s?"none":`translateY(${T(5)}) scale(0.5)`,opacity:s?1:0,transitionProperty:"opacity, transform",transitionTimingFunction:"ease",transitionDuration:`${r}ms`,pointerEvents:"none",width:"60%",position:"absolute",zIndex:1,margin:"auto","@media (prefers-reduced-motion)":{transitionDuration:e.respectReducedMotion?"0ms":void 0}}),inner:{position:"relative",width:c,height:c,order:o==="left"?2:1},input:Q$(X$({},e.fn.focusStyles()),{appearance:"none",backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`${T(1)} solid ${i?e.fn.variant({variant:"filled",color:"red"}).background:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,width:c,height:c,borderRadius:e.fn.radius(t),padding:0,display:"block",margin:0,transition:`border-color ${r}ms ease, background-color ${r}ms ease`,cursor:e.cursorType,"&:checked":{backgroundColor:u.background,borderColor:u.background,[`& + .${On("icon")}`]:{opacity:1,color:e.white,transform:"translateY(0) scale(1)"}},"&:disabled":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],borderColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[3],cursor:"not-allowed",[`& + .${On("icon")}`]:{color:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[5]}}})}});const Pne=kne;var Cne=Object.defineProperty,One=Object.defineProperties,Ene=Object.getOwnPropertyDescriptors,e5=Object.getOwnPropertySymbols,$ne=Object.prototype.hasOwnProperty,Mne=Object.prototype.propertyIsEnumerable,t5=(e,t,n)=>t in e?Cne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Tne=(e,t)=>{for(var n in t||(t={}))$ne.call(t,n)&&t5(e,n,t[n]);if(e5)for(var n of e5(t))Mne.call(t,n)&&t5(e,n,t[n]);return e},Ine=(e,t)=>One(e,Ene(t));const z_={xs:T(16),sm:T(20),md:T(24),lg:T(30),xl:T(36)};var Nne=te((e,{labelPosition:t},{size:n})=>({root:{},body:{display:"flex"},labelWrapper:Ine(Tne({},e.fn.fontStyles()),{display:"inline-flex",flexDirection:"column",WebkitTapHighlightColor:"transparent",fontSize:n in z_?Q({size:n,sizes:e.fontSizes}):void 0,lineHeight:n in z_?Q({size:n,sizes:z_}):void 0,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,cursor:e.cursorType,order:t==="left"?1:2}),description:{marginTop:`calc(${e.spacing.xs} / 2)`,[t==="left"?"paddingRight":"paddingLeft"]:e.spacing.sm},error:{marginTop:`calc(${e.spacing.xs} / 2)`,[t==="left"?"paddingRight":"paddingLeft"]:e.spacing.sm},label:{cursor:e.cursorType,[t==="left"?"paddingRight":"paddingLeft"]:e.spacing.sm,"&[data-disabled]":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}}));const Rne=Nne;var Lne=Object.defineProperty,Zg=Object.getOwnPropertySymbols,xD=Object.prototype.hasOwnProperty,kD=Object.prototype.propertyIsEnumerable,n5=(e,t,n)=>t in e?Lne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zne=(e,t)=>{for(var n in t||(t={}))xD.call(t,n)&&n5(e,n,t[n]);if(Zg)for(var n of Zg(t))kD.call(t,n)&&n5(e,n,t[n]);return e},Ane=(e,t)=>{var n={};for(var r in e)xD.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Zg)for(var r of Zg(e))t.indexOf(r)<0&&kD.call(e,r)&&(n[r]=e[r]);return n};const PD=v.forwardRef((e,t)=>{var n=e,{__staticSelector:r,className:o,classNames:i,styles:s,unstyled:a,children:c,label:u,description:f,id:p,disabled:h,error:g,size:y,labelPosition:_,variant:k}=n,b=Ane(n,["__staticSelector","className","classNames","styles","unstyled","children","label","description","id","disabled","error","size","labelPosition","variant"]);const{classes:S,cx:P}=Rne({labelPosition:_},{name:r,styles:s,classNames:i,unstyled:a,variant:k,size:y});return O.createElement(_e,zne({className:P(S.root,o),ref:t},b),O.createElement("div",{className:P(S.body)},c,O.createElement("div",{className:S.labelWrapper},u&&O.createElement("label",{className:S.label,"data-disabled":h||void 0,htmlFor:p},u),f&&O.createElement(ys.Description,{className:S.description},f),g&&g!=="boolean"&&O.createElement(ys.Error,{className:S.error},g))))});PD.displayName="@mantine/core/InlineInput";var Dne=Object.defineProperty,Kg=Object.getOwnPropertySymbols,CD=Object.prototype.hasOwnProperty,OD=Object.prototype.propertyIsEnumerable,r5=(e,t,n)=>t in e?Dne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_h=(e,t)=>{for(var n in t||(t={}))CD.call(t,n)&&r5(e,n,t[n]);if(Kg)for(var n of Kg(t))OD.call(t,n)&&r5(e,n,t[n]);return e},jne=(e,t)=>{var n={};for(var r in e)CD.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Kg)for(var r of Kg(e))t.indexOf(r)<0&&OD.call(e,r)&&(n[r]=e[r]);return n};const Bne={size:"sm",transitionDuration:100,icon:vne,labelPosition:"right"},Ro=v.forwardRef((e,t)=>{const n=ue("Checkbox",Bne,e),{className:r,style:o,sx:i,checked:s,disabled:a,color:c,label:u,indeterminate:f,id:p,size:h,radius:g,wrapperProps:y,children:_,classNames:k,styles:b,transitionDuration:S,icon:P,unstyled:E,labelPosition:$,description:I,error:N,variant:R}=n,F=jne(n,["className","style","sx","checked","disabled","color","label","indeterminate","id","size","radius","wrapperProps","children","classNames","styles","transitionDuration","icon","unstyled","labelPosition","description","error","variant"]),B=dne(),D=Ia(p),{systemStyles:K,rest:W}=Ul(F),{classes:V}=Pne({radius:g,color:c,transitionDuration:S,labelPosition:$,error:!!N,indeterminate:f},{name:"Checkbox",classNames:k,styles:b,unstyled:E,variant:R,size:B?.size||h}),U=B?{checked:B.value.includes(W.value),onChange:B.onChange}:{};return O.createElement(PD,_h(_h({className:r,sx:i,style:o,id:D,size:B?.size||h,labelPosition:$,label:u,description:I,error:N,disabled:a,__staticSelector:"Checkbox",classNames:k,styles:b,unstyled:E,"data-checked":U.checked||void 0,variant:R},K),y),O.createElement("div",{className:V.inner},O.createElement("input",_h(_h({id:D,ref:t,type:"checkbox",className:V.input,checked:s,disabled:a},W),U)),O.createElement(P,{indeterminate:f,className:V.icon})))});Ro.displayName="@mantine/core/Checkbox";Ro.Group=_D;const ED=v.createContext(null),Fne=ED.Provider,Vne=()=>v.useContext(ED),Hne={};function $D(e){const{value:t,defaultValue:n,onChange:r,multiple:o,children:i}=ue("ChipGroup",Hne,e),[s,a]=si({value:t,defaultValue:n,finalValue:o?[]:null,onChange:r}),c=f=>Array.isArray(s)?s.includes(f):f===s,u=f=>{const p=f.currentTarget.value;Array.isArray(s)?a(s.includes(p)?s.filter(h=>h!==p):[...s,p]):a(p)};return O.createElement(Fne,{value:{isChipSelected:c,onChange:u,multiple:o}},i)}$D.displayName="@mantine/core/ChipGroup";var Wne=Object.defineProperty,Une=Object.defineProperties,Zne=Object.getOwnPropertyDescriptors,o5=Object.getOwnPropertySymbols,Kne=Object.prototype.hasOwnProperty,Gne=Object.prototype.propertyIsEnumerable,i5=(e,t,n)=>t in e?Wne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ii=(e,t)=>{for(var n in t||(t={}))Kne.call(t,n)&&i5(e,n,t[n]);if(o5)for(var n of o5(t))Gne.call(t,n)&&i5(e,n,t[n]);return e},lm=(e,t)=>Une(e,Zne(t));const s5={xs:T(24),sm:T(28),md:T(32),lg:T(36),xl:T(40)},cd={xs:T(10),sm:T(12),md:T(14),lg:T(16),xl:T(18)},a5={xs:T(16),sm:T(20),md:T(24),lg:T(28),xl:T(32)},l5={xs:T(7.5),sm:T(10),md:T(11.5),lg:T(13),xl:T(15)};function qne(e,{color:t},n){const r=e.fn.variant({variant:"filled",color:t}),o=e.fn.variant({variant:"light",color:t});return n==="light"?{label:Ii({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1]},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),checked:lm(Ii({color:o.color,backgroundColor:o.background},e.fn.hover({backgroundColor:o.hover})),{"&, &:hover":{backgroundColor:e.fn.variant({variant:"light",color:t}).background}})}:n==="filled"?{label:Ii({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1]},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),checked:Ii({color:r.color,backgroundColor:r.background},e.fn.hover({backgroundColor:r.hover}))}:n==="outline"?{label:Ii({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,borderColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),checked:{border:`${T(1)} solid ${r.background}`}}:{label:null,checked:null}}var Yne=te((e,{radius:t,color:n},{size:r,variant:o})=>{const i=qne(e,{color:n},o);return{root:{},label:lm(Ii(lm(Ii({ref:On("label")},e.fn.fontStyles()),{boxSizing:"border-box",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"inline-block",alignItems:"center",userSelect:"none",border:`${T(1)} solid transparent`,borderRadius:e.fn.radius(t),height:Q({size:r,sizes:s5}),fontSize:Q({size:r,sizes:e.fontSizes}),lineHeight:`calc(${Q({size:r,sizes:s5})} - ${T(2)})`,paddingLeft:Q({size:r,sizes:a5}),paddingRight:Q({size:r,sizes:a5}),cursor:"pointer",whiteSpace:"nowrap",transition:"background-color 100ms ease",WebkitTapHighlightColor:"transparent"}),i.label),{"&[data-disabled]":lm(Ii({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],borderColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],cursor:"not-allowed"},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]})),{[`& .${On("iconWrapper")}`]:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}),"&[data-checked]":{paddingLeft:Q({size:r,sizes:l5}),paddingRight:Q({size:r,sizes:l5}),"&:not([data-disabled])":i.checked}}),iconWrapper:{ref:On("iconWrapper"),color:o==="filled"?e.white:e.fn.variant({variant:"filled",color:n}).background,width:`calc(${Q({size:r,sizes:cd})} + (${Q({size:r,sizes:e.spacing})} / 1.5))`,maxWidth:`calc(${Q({size:r,sizes:cd})} + (${Q({size:r,sizes:e.spacing})} / 1.5))`,height:Q({size:r,sizes:cd}),display:"inline-block",verticalAlign:"middle",overflow:"hidden"},checkIcon:{width:Q({size:r,sizes:cd}),height:`calc(${Q({size:r,sizes:cd})} / 1.1)`,display:"block"},input:{width:0,height:0,padding:0,opacity:0,margin:0,"&:focus":{outline:"none",[`& + .${On("label")}`]:Ii({},e.focusRing==="always"||e.focusRing==="auto"?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),"&:focus:not(:focus-visible)":{[`& + .${On("label")}`]:Ii({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)}}}}});const Jne=Yne;var Xne=Object.defineProperty,Gg=Object.getOwnPropertySymbols,MD=Object.prototype.hasOwnProperty,TD=Object.prototype.propertyIsEnumerable,c5=(e,t,n)=>t in e?Xne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wh=(e,t)=>{for(var n in t||(t={}))MD.call(t,n)&&c5(e,n,t[n]);if(Gg)for(var n of Gg(t))TD.call(t,n)&&c5(e,n,t[n]);return e},Qne=(e,t)=>{var n={};for(var r in e)MD.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Gg)for(var r of Gg(e))t.indexOf(r)<0&&TD.call(e,r)&&(n[r]=e[r]);return n};const ere={type:"checkbox",size:"sm",radius:"xl",variant:"outline"},Dk=v.forwardRef((e,t)=>{const n=ue("Chip",ere,e),{radius:r,type:o,size:i,variant:s,disabled:a,id:c,color:u,children:f,className:p,classNames:h,style:g,styles:y,checked:_,defaultChecked:k,onChange:b,sx:S,wrapperProps:P,value:E,unstyled:$}=n,I=Qne(n,["radius","type","size","variant","disabled","id","color","children","className","classNames","style","styles","checked","defaultChecked","onChange","sx","wrapperProps","value","unstyled"]),N=Vne(),R=Ia(c),{systemStyles:F,rest:B}=Ul(I),{classes:D,cx:K}=Jne({radius:r,color:u},{classNames:h,styles:y,unstyled:$,name:"Chip",variant:s,size:i}),[W,V]=si({value:_,defaultValue:k,finalValue:!1,onChange:b}),U=N?{checked:N.isChipSelected(E),onChange:N.onChange,type:N.multiple?"checkbox":"radio"}:{},J=U.checked||W;return O.createElement(_e,wh(wh({className:K(D.root,p),style:g,sx:S},F),P),O.createElement("input",wh(wh({type:o,className:D.input,checked:J,onChange:G=>V(G.currentTarget.checked),id:R,disabled:a,ref:t,value:E},U),B)),O.createElement("label",{htmlFor:R,"data-checked":J||void 0,"data-disabled":a||void 0,className:D.label},J&&O.createElement("span",{className:D.iconWrapper},O.createElement(SD,{className:D.checkIcon})),f))});Dk.displayName="@mantine/core/Chip";Dk.Group=$D;var tre=Object.defineProperty,nre=Object.defineProperties,rre=Object.getOwnPropertyDescriptors,u5=Object.getOwnPropertySymbols,ore=Object.prototype.hasOwnProperty,ire=Object.prototype.propertyIsEnumerable,d5=(e,t,n)=>t in e?tre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,f5=(e,t)=>{for(var n in t||(t={}))ore.call(t,n)&&d5(e,n,t[n]);if(u5)for(var n of u5(t))ire.call(t,n)&&d5(e,n,t[n]);return e},p5=(e,t)=>nre(e,rre(t)),sre=te((e,{radius:t},{size:n})=>{const r=e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3];return{root:p5(f5({},e.fn.focusStyles()),{width:T(n),height:T(n),WebkitTapHighlightColor:"transparent",border:0,borderRadius:e.fn.radius(t),appearance:"none",WebkitAppearance:"none",padding:0,position:"relative",overflow:"hidden"}),overlay:p5(f5({},e.fn.cover()),{position:"absolute",borderRadius:e.fn.radius(t)}),children:{display:"inline-flex",justifyContent:"center",alignItems:"center"},shadowOverlay:{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${T(1)} inset, rgb(0, 0, 0, .15) 0 0 ${T(4)} inset`,zIndex:1},alphaOverlay:{backgroundImage:`linear-gradient(45deg, ${r} 25%, transparent 25%), linear-gradient(-45deg, ${r} 25%, transparent 25%), linear-gradient(45deg, transparent 75%, ${r} 75%), linear-gradient(-45deg, ${e.colorScheme==="dark"?e.colors.dark[7]:e.white} 75%, ${r} 75%)`,backgroundSize:`${T(8)} ${T(8)}`,backgroundPosition:`0 0, 0 ${T(4)}, ${T(4)} -${T(4)}, -${T(4)} 0`}}});const are=sre;var lre=Object.defineProperty,qg=Object.getOwnPropertySymbols,ID=Object.prototype.hasOwnProperty,ND=Object.prototype.propertyIsEnumerable,h5=(e,t,n)=>t in e?lre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cre=(e,t)=>{for(var n in t||(t={}))ID.call(t,n)&&h5(e,n,t[n]);if(qg)for(var n of qg(t))ND.call(t,n)&&h5(e,n,t[n]);return e},ure=(e,t)=>{var n={};for(var r in e)ID.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&qg)for(var r of qg(e))t.indexOf(r)<0&&ND.call(e,r)&&(n[r]=e[r]);return n};const dre={size:T(25),radius:T(25),withShadow:!0},RD=v.forwardRef((e,t)=>{const n=ue("ColorSwatch",dre,e),{color:r,size:o,radius:i,className:s,children:a,classNames:c,styles:u,unstyled:f,withShadow:p,variant:h}=n,g=ure(n,["color","size","radius","className","children","classNames","styles","unstyled","withShadow","variant"]),{classes:y,cx:_}=are({radius:i},{classNames:c,styles:u,unstyled:f,name:"ColorSwatch",size:o,variant:h});return O.createElement(_e,cre({className:_(y.root,s),ref:t},g),O.createElement("div",{className:_(y.alphaOverlay,y.overlay)}),p&&O.createElement("div",{className:_(y.shadowOverlay,y.overlay)}),O.createElement("div",{className:y.overlay,style:{backgroundColor:r}}),O.createElement("div",{className:_(y.children,y.overlay)},a))});RD.displayName="@mantine/core/ColorSwatch";const xf=RD,Ni={xs:T(8),sm:T(12),md:T(16),lg:T(20),xl:T(22)};var fre=te((e,t,{size:n})=>{const r=Q({size:n,sizes:Ni});return{thumb:{overflow:"hidden",boxSizing:"border-box",position:"absolute",boxShadow:`0 0 ${T(1)} rgba(0, 0, 0, .6)`,border:`${T(2)} solid ${e.white}`,backgroundColor:"transparent",width:r,height:r,borderRadius:r}}});const pre=fre;var hre=Object.defineProperty,m5=Object.getOwnPropertySymbols,mre=Object.prototype.hasOwnProperty,gre=Object.prototype.propertyIsEnumerable,g5=(e,t,n)=>t in e?hre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vre=(e,t)=>{for(var n in t||(t={}))mre.call(t,n)&&g5(e,n,t[n]);if(m5)for(var n of m5(t))gre.call(t,n)&&g5(e,n,t[n]);return e};function jk({position:e,className:t,styles:n,classNames:r,style:o,size:i,__staticSelector:s,unstyled:a,variant:c}){const{classes:u,cx:f}=pre(null,{classNames:r,styles:n,name:s,unstyled:a,size:i,variant:c});return O.createElement("div",{className:f(u.thumb,t),style:vre({left:`calc(${e.x*100}% - ${Ni[i]} / 2)`,top:`calc(${e.y*100}% - ${Ni[i]} / 2)`},o)})}jk.displayName="@mantine/core/Thumb";var yre=Object.defineProperty,v5=Object.getOwnPropertySymbols,_re=Object.prototype.hasOwnProperty,wre=Object.prototype.propertyIsEnumerable,y5=(e,t,n)=>t in e?yre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_5=(e,t)=>{for(var n in t||(t={}))_re.call(t,n)&&y5(e,n,t[n]);if(v5)for(var n of v5(t))wre.call(t,n)&&y5(e,n,t[n]);return e},bre=te((e,t,{size:n})=>({sliderThumb:{ref:On("sliderThumb")},slider:{position:"relative",height:`calc(${Q({size:n,sizes:Ni})} + ${T(2)})`,boxSizing:"border-box",marginLeft:`calc(${Q({size:n,sizes:Ni})} / 2)`,marginRight:`calc(${Q({size:n,sizes:Ni})} / 2)`,outline:0,[`&:focus .${On("sliderThumb")}`]:_5({},e.focusRing==="always"||e.focusRing==="auto"?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),[`&:focus:not(:focus-visible) .${On("sliderThumb")}`]:_5({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)},sliderOverlay:{position:"absolute",boxSizing:"border-box",top:0,bottom:0,left:`calc(${Q({size:n,sizes:Ni})} * -1 / 2 - ${T(1)})`,right:`calc(${Q({size:n,sizes:Ni})} * -1 / 2 - ${T(1)})`,borderRadius:1e3}}));const Sre=bre;var xre=Object.defineProperty,kre=Object.defineProperties,Pre=Object.getOwnPropertyDescriptors,Yg=Object.getOwnPropertySymbols,LD=Object.prototype.hasOwnProperty,zD=Object.prototype.propertyIsEnumerable,w5=(e,t,n)=>t in e?xre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cre=(e,t)=>{for(var n in t||(t={}))LD.call(t,n)&&w5(e,n,t[n]);if(Yg)for(var n of Yg(t))zD.call(t,n)&&w5(e,n,t[n]);return e},Ore=(e,t)=>kre(e,Pre(t)),Ere=(e,t)=>{var n={};for(var r in e)LD.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Yg)for(var r of Yg(e))t.indexOf(r)<0&&zD.call(e,r)&&(n[r]=e[r]);return n};const Bk=v.forwardRef((e,t)=>{var n=e,{value:r,onChange:o,onChangeEnd:i,maxValue:s,round:a,size:c="md",thumbColor:u="transparent",__staticSelector:f="ColorSlider",focusable:p=!0,overlays:h,classNames:g,styles:y,className:_,unstyled:k,variant:b}=n,S=Ere(n,["value","onChange","onChangeEnd","maxValue","round","size","thumbColor","__staticSelector","focusable","overlays","classNames","styles","className","unstyled","variant"]);const{classes:P,cx:E}=Sre(null,{classNames:g,styles:y,name:f,unstyled:k,variant:b,size:c}),[$,I]=v.useState({y:0,x:r/s}),N=v.useRef($),R=W=>a?Math.round(W*s):W*s,{ref:F}=BR(({x:W,y:V})=>{N.current={x:W,y:V},o(R(W))},{onScrubEnd:()=>{const{x:W}=N.current;i(R(W))}});An(()=>{I({y:0,x:r/s})},[r]);const B=(W,V)=>{W.preventDefault();const U=jR(V);o(R(U.x)),i(R(U.x))},D=W=>{switch(W.key){case"ArrowRight":{B(W,{x:$.x+.05,y:$.y});break}case"ArrowLeft":{B(W,{x:$.x-.05,y:$.y});break}}},K=h.map((W,V)=>O.createElement("div",{className:P.sliderOverlay,style:W,key:V}));return O.createElement(_e,Ore(Cre({},S),{ref:di(F,t),className:E(P.slider,_),role:"slider","aria-valuenow":r,"aria-valuemax":s,"aria-valuemin":0,tabIndex:p?0:-1,onKeyDown:D}),K,O.createElement(jk,{__staticSelector:f,classNames:g,styles:y,position:$,style:{top:T(1),backgroundColor:u},className:P.sliderThumb,size:c}))});Bk.displayName="@mantine/core/ColorSlider";var $re=Object.defineProperty,Mre=Object.defineProperties,Tre=Object.getOwnPropertyDescriptors,Jg=Object.getOwnPropertySymbols,AD=Object.prototype.hasOwnProperty,DD=Object.prototype.propertyIsEnumerable,b5=(e,t,n)=>t in e?$re(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ire=(e,t)=>{for(var n in t||(t={}))AD.call(t,n)&&b5(e,n,t[n]);if(Jg)for(var n of Jg(t))DD.call(t,n)&&b5(e,n,t[n]);return e},Nre=(e,t)=>Mre(e,Tre(t)),Rre=(e,t)=>{var n={};for(var r in e)AD.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Jg)for(var r of Jg(e))t.indexOf(r)<0&&DD.call(e,r)&&(n[r]=e[r]);return n};const Lre={},jD=v.forwardRef((e,t)=>{const n=ue("HueSlider",Lre,e),{value:r,onChange:o,onChangeEnd:i,__staticSelector:s}=n,a=Rre(n,["value","onChange","onChangeEnd","__staticSelector"]);return O.createElement(Bk,Nre(Ire({},a),{ref:t,value:r,onChange:o,onChangeEnd:i,maxValue:360,thumbColor:`hsl(${r}, 100%, 50%)`,round:!0,__staticSelector:s||"HueSlider",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 ${T(1)} inset, rgb(0, 0, 0, .15) 0 0 ${T(4)} inset`}]}))});jD.displayName="@mantine/core/HueSlider";var zre=Object.defineProperty,Are=Object.defineProperties,Dre=Object.getOwnPropertyDescriptors,S5=Object.getOwnPropertySymbols,jre=Object.prototype.hasOwnProperty,Bre=Object.prototype.propertyIsEnumerable,x5=(e,t,n)=>t in e?zre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,k5=(e,t)=>{for(var n in t||(t={}))jre.call(t,n)&&x5(e,n,t[n]);if(S5)for(var n of S5(t))Bre.call(t,n)&&x5(e,n,t[n]);return e},P5=(e,t)=>Are(e,Dre(t));function Xo(e,t=0,n=10**t){return Math.round(n*e)/n}function Fre({h:e,s:t,l:n,a:r}){const o=t*((n<50?n:100-n)/100);return{h:e,s:o>0?2*o/(n+o)*100:0,v:n+o,a:r}}const Vre={grad:360/400,turn:360,rad:360/(Math.PI*2)};function Hre(e,t="deg"){return Number(e)*(Vre[t]||1)}const Wre=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function C5(e){const t=Wre.exec(e);return t?Fre({h:Hre(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}}function oS({r:e,g:t,b:n,a:r}){const o=Math.max(e,t,n),i=o-Math.min(e,t,n),s=i?o===e?(t-n)/i:o===t?2+(n-e)/i:4+(e-t)/i:0;return{h:Xo(60*(s<0?s+6:s)),s:Xo(o?i/o*100:0),v:Xo(o/255*100),a:r}}function iS(e){const t=e[0]==="#"?e.slice(1):e;return t.length===3?oS({r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:1}):oS({r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:1})}function Ure(e){const t=e[0]==="#"?e.slice(1):e,n=s=>Math.round(parseInt(s,16)/255*100)/100;if(t.length===4){const s=t.slice(0,3),a=n(t[3]+t[3]);return P5(k5({},iS(s)),{a})}const r=t.slice(0,6),o=n(t.slice(6,8));return P5(k5({},iS(r)),{a:o})}const Zre=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function O5(e){const t=Zre.exec(e);return t?oS({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}}const BD={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},Kre={hex:iS,hexa:Ure,rgb:O5,rgba:O5,hsl:C5,hsla:C5};function Gre(e){for(const[,t]of Object.entries(BD))if(t.test(e))return!0;return!1}function bh(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 t=e.trim();for(const[n,r]of Object.entries(BD))if(r.test(t))return Kre[n](t);return{h:0,s:0,v:0,a:1}}var qre=Object.defineProperty,Yre=Object.defineProperties,Jre=Object.getOwnPropertyDescriptors,Xg=Object.getOwnPropertySymbols,FD=Object.prototype.hasOwnProperty,VD=Object.prototype.propertyIsEnumerable,E5=(e,t,n)=>t in e?qre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xre=(e,t)=>{for(var n in t||(t={}))FD.call(t,n)&&E5(e,n,t[n]);if(Xg)for(var n of Xg(t))VD.call(t,n)&&E5(e,n,t[n]);return e},Qre=(e,t)=>Yre(e,Jre(t)),eoe=(e,t)=>{var n={};for(var r in e)FD.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Xg)for(var r of Xg(e))t.indexOf(r)<0&&VD.call(e,r)&&(n[r]=e[r]);return n};const toe={},HD=v.forwardRef((e,t)=>{const n=ue("AlphaSlider",toe,e),{value:r,onChange:o,onChangeEnd:i,color:s,__staticSelector:a}=n,c=eoe(n,["value","onChange","onChangeEnd","color","__staticSelector"]),u=Sr(),f=u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[3];return O.createElement(Bk,Qre(Xre({},c),{ref:t,value:r,onChange:p=>o(Xo(p,2)),onChangeEnd:p=>i(Xo(p,2)),maxValue:1,round:!1,__staticSelector:a||"AlphaSlider",overlays:[{backgroundImage:`linear-gradient(45deg, ${f} 25%, transparent 25%), linear-gradient(-45deg, ${f} 25%, transparent 25%), linear-gradient(45deg, transparent 75%, ${f} 75%), linear-gradient(-45deg, ${u.colorScheme==="dark"?u.colors.dark[7]:u.white} 75%, ${f} 75%)`,backgroundSize:`${T(8)} ${T(8)}`,backgroundPosition:`0 0, 0 ${T(4)}, ${T(4)} -${T(4)}, -${T(4)} 0`},{backgroundImage:`linear-gradient(90deg, transparent, ${s})`},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${T(1)} inset, rgb(0, 0, 0, .15) 0 0 ${T(4)} inset`}]}))});HD.displayName="@mantine/core/AlphaSlider";var noe=Object.defineProperty,$5=Object.getOwnPropertySymbols,roe=Object.prototype.hasOwnProperty,ooe=Object.prototype.propertyIsEnumerable,M5=(e,t,n)=>t in e?noe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,A_=(e,t)=>{for(var n in t||(t={}))roe.call(t,n)&&M5(e,n,t[n]);if($5)for(var n of $5(t))ooe.call(t,n)&&M5(e,n,t[n]);return e};const ioe={xs:T(100),sm:T(110),md:T(120),lg:T(140),xl:T(160)};var soe=te((e,t,{size:n})=>({saturationThumb:{ref:On("saturationThumb")},saturation:{boxSizing:"border-box",position:"relative",height:Q({size:n,sizes:ioe}),borderRadius:e.radius.sm,margin:`calc(${Q({size:n,sizes:Ni})} / 2)`,WebkitTapHighlightColor:"transparent",[`&:focus .${On("saturationThumb")}`]:A_({},e.focusRing==="always"||e.focusRing==="auto"?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),[`&:focus:not(:focus-visible) .${On("saturationThumb")}`]:A_({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)},saturationOverlay:A_({boxSizing:"border-box",borderRadius:e.radius.sm},e.fn.cover(`calc(${Q({size:n,sizes:Ni})} * -1 / 2 - ${T(1)})`))}));const aoe=soe;function WD({h:e,s:t,v:n,a:r}){const o=e/360*6,i=t/100,s=n/100,a=Math.floor(o),c=s*(1-i),u=s*(1-(o-a)*i),f=s*(1-(1-o+a)*i),p=a%6;return{r:Xo([s,u,c,c,f,s][p]*255),g:Xo([f,s,s,u,c,c][p]*255),b:Xo([c,c,f,s,s,u][p]*255),a:Xo(r,2)}}function T5(e,t){const{r:n,g:r,b:o,a:i}=WD(e);return t?`rgba(${n}, ${r}, ${o}, ${Xo(i,2)})`:`rgb(${n}, ${r}, ${o})`}function I5({h:e,s:t,v:n,a:r},o){const i=(200-t)*n/100,s={h:Math.round(e),s:Math.round(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:Math.round(i/2)};return o?`hsla(${s.h}, ${s.s}%, ${s.l}%, ${Xo(r,2)})`:`hsl(${s.h}, ${s.s}%, ${s.l}%)`}function cm(e){const t=e.toString(16);return t.length<2?`0${t}`:t}function UD(e){const{r:t,g:n,b:r}=WD(e);return`#${cm(t)}${cm(n)}${cm(r)}`}function loe(e){const t=Math.round(e.a*255);return`${UD(e)}${cm(t)}`}const D_={hex:UD,hexa:e=>loe(e),rgb:e=>T5(e,!1),rgba:e=>T5(e,!0),hsl:e=>I5(e,!1),hsla:e=>I5(e,!0)};function Ds(e,t){return t?e in D_?D_[e](t):D_.hex(t):"#000000"}function ZD({value:e,onChange:t,onChangeEnd:n,focusable:r=!0,__staticSelector:o="saturation",size:i,color:s,saturationLabel:a,classNames:c,styles:u,unstyled:f,variant:p}){const{classes:h}=aoe(null,{classNames:c,styles:u,name:o,unstyled:f,variant:p,size:i}),[g,y]=v.useState({x:e.s/100,y:1-e.v/100}),_=v.useRef(g),{ref:k}=BR(({x:P,y:E})=>{_.current={x:P,y:E},t({s:Math.round(P*100),v:Math.round((1-E)*100)})},{onScrubEnd:()=>{const{x:P,y:E}=_.current;n({s:Math.round(P*100),v:Math.round((1-E)*100)})}});v.useEffect(()=>{y({x:e.s/100,y:1-e.v/100})},[e.s,e.v]);const b=(P,E)=>{P.preventDefault();const $=jR(E);t({s:Math.round($.x*100),v:Math.round((1-$.y)*100)}),n({s:Math.round($.x*100),v:Math.round((1-$.y)*100)})},S=P=>{switch(P.key){case"ArrowUp":{b(P,{y:g.y-.05,x:g.x});break}case"ArrowDown":{b(P,{y:g.y+.05,x:g.x});break}case"ArrowRight":{b(P,{x:g.x+.05,y:g.y});break}case"ArrowLeft":{b(P,{x:g.x-.05,y:g.y});break}}};return O.createElement("div",{className:h.saturation,ref:k,role:"slider","aria-label":a,"aria-valuenow":g.x,"aria-valuetext":Ds("rgba",e),tabIndex:r?0:-1,onKeyDown:S},O.createElement("div",{className:h.saturationOverlay,style:{backgroundColor:`hsl(${e.h}, 100%, 50%)`}}),O.createElement("div",{className:h.saturationOverlay,style:{backgroundImage:"linear-gradient(90deg, #fff, transparent)"}}),O.createElement("div",{className:h.saturationOverlay,style:{backgroundImage:"linear-gradient(0deg, #000, transparent)"}}),O.createElement(jk,{__staticSelector:o,classNames:c,styles:u,position:g,className:h.saturationThumb,style:{backgroundColor:s},size:i}))}ZD.displayName="@mantine/core/Saturation";var coe=te((e,{swatchesPerRow:t})=>({swatch:{width:`calc(${100/t}% - ${T(4)})`,height:0,paddingBottom:`calc(${100/t}% - ${T(4)})`,margin:T(2),boxSizing:"content-box"},swatches:{boxSizing:"border-box",marginLeft:T(-2),marginRight:T(-2),display:"flex",flexWrap:"wrap"}}));const uoe=coe;var doe=Object.defineProperty,Qg=Object.getOwnPropertySymbols,KD=Object.prototype.hasOwnProperty,GD=Object.prototype.propertyIsEnumerable,N5=(e,t,n)=>t in e?doe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,foe=(e,t)=>{for(var n in t||(t={}))KD.call(t,n)&&N5(e,n,t[n]);if(Qg)for(var n of Qg(t))GD.call(t,n)&&N5(e,n,t[n]);return e},poe=(e,t)=>{var n={};for(var r in e)KD.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Qg)for(var r of Qg(e))t.indexOf(r)<0&&GD.call(e,r)&&(n[r]=e[r]);return n};function qD(e){var t=e,{data:n,swatchesPerRow:r=10,focusable:o=!0,classNames:i,styles:s,__staticSelector:a="color-picker",unstyled:c,setValue:u,onChangeEnd:f,variant:p,size:h}=t,g=poe(t,["data","swatchesPerRow","focusable","classNames","styles","__staticSelector","unstyled","setValue","onChangeEnd","variant","size"]);const{classes:y}=uoe({swatchesPerRow:r},{classNames:i,styles:s,name:a,unstyled:c,variant:p,size:h}),_=n.map((k,b)=>O.createElement(xf,{className:y.swatch,component:"button",type:"button",color:k,key:b,radius:"sm",onClick:()=>{u(k),f?.(k)},style:{cursor:"pointer"},"aria-label":k,tabIndex:o?0:-1}));return O.createElement("div",foe({className:y.swatches},g),_)}qD.displayName="@mantine/core/Swatches";const hoe={xs:T(180),sm:T(200),md:T(240),lg:T(280),xl:T(320)};var moe=te((e,{fullWidth:t},{size:n})=>({preview:{},wrapper:{boxSizing:"border-box",width:t?"100%":Q({size:n,sizes:hoe}),padding:T(1)},body:{display:"flex",boxSizing:"border-box",paddingTop:`calc(${Q({size:n,sizes:e.spacing})} / 2)`},sliders:{flex:1,boxSizing:"border-box","&:not(:only-child)":{marginRight:e.spacing.xs}},slider:{boxSizing:"border-box","& + &":{marginTop:T(5)}},swatch:{cursor:"pointer"}}));const goe=moe;var voe=Object.defineProperty,yoe=Object.defineProperties,_oe=Object.getOwnPropertyDescriptors,ev=Object.getOwnPropertySymbols,YD=Object.prototype.hasOwnProperty,JD=Object.prototype.propertyIsEnumerable,R5=(e,t,n)=>t in e?voe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cc=(e,t)=>{for(var n in t||(t={}))YD.call(t,n)&&R5(e,n,t[n]);if(ev)for(var n of ev(t))JD.call(t,n)&&R5(e,n,t[n]);return e},j_=(e,t)=>yoe(e,_oe(t)),woe=(e,t)=>{var n={};for(var r in e)YD.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ev)for(var r of ev(e))t.indexOf(r)<0&&JD.call(e,r)&&(n[r]=e[r]);return n};const boe={xs:26,sm:34,md:42,lg:50,xl:54},Soe={swatchesPerRow:10,size:"sm",withPicker:!0,focusable:!0,__staticSelector:"ColorPicker"},XD=v.forwardRef((e,t)=>{const n=ue("ColorPicker",Soe,e),{value:r,defaultValue:o,onChange:i,onChangeEnd:s,format:a,swatches:c,swatchesPerRow:u,size:f,withPicker:p,fullWidth:h,focusable:g,__staticSelector:y,saturationLabel:_,hueLabel:k,alphaLabel:b,className:S,styles:P,classNames:E,unstyled:$,onColorSwatchClick:I,variant:N}=n,R=woe(n,["value","defaultValue","onChange","onChangeEnd","format","swatches","swatchesPerRow","size","withPicker","fullWidth","focusable","__staticSelector","saturationLabel","hueLabel","alphaLabel","className","styles","classNames","unstyled","onColorSwatchClick","variant"]),{classes:F,cx:B}=goe({fullWidth:h},{classNames:E,styles:P,name:y,unstyled:$,variant:N,size:f}),D=v.useRef(a),K=v.useRef(null),W=v.useRef(!0),V=a==="hexa"||a==="rgba"||a==="hsla",[U,J,G]=si({value:r,defaultValue:o,finalValue:"#FFFFFF",onChange:i}),[A,q]=v.useState(bh(U)),H=ee=>{W.current=!1,q(re=>{const he=cc(cc({},re),ee);return K.current=Ds(D.current,he),he}),J(K.current),setTimeout(()=>{W.current=!0},0)};return An(()=>{Gre(r)&&W.current&&(q(bh(r)),W.current=!0)},[r]),An(()=>{D.current=a,J(Ds(a,A))},[a]),O.createElement(_e,cc({className:B(F.wrapper,S),ref:t},R),p&&O.createElement(O.Fragment,null,O.createElement(ZD,{value:A,onChange:H,onChangeEnd:({s:ee,v:re})=>s?.(Ds(D.current,j_(cc({},A),{s:ee,v:re}))),color:U,styles:P,classNames:E,size:f,focusable:g,saturationLabel:_,__staticSelector:y}),O.createElement("div",{className:F.body},O.createElement("div",{className:F.sliders},O.createElement(jD,{value:A.h,onChange:ee=>H({h:ee}),onChangeEnd:ee=>s?.(Ds(D.current,j_(cc({},A),{h:ee}))),size:f,styles:P,classNames:E,focusable:g,"aria-label":k,__staticSelector:y}),V&&O.createElement(HD,{value:A.a,onChange:ee=>H({a:ee}),onChangeEnd:ee=>{s?.(Ds(D.current,j_(cc({},A),{a:ee})))},size:f,color:Ds("hex",A),style:{marginTop:T(6)},styles:P,classNames:E,focusable:g,"aria-label":b,__staticSelector:y})),V&&O.createElement(xf,{color:U,radius:"sm",size:Q({size:f,sizes:boe}),className:F.preview}))),Array.isArray(c)&&O.createElement(qD,{data:c,style:{marginTop:T(5)},swatchesPerRow:u,focusable:g,classNames:E,styles:P,__staticSelector:y,setValue:J,onChangeEnd:ee=>{const re=Ds(a,bh(ee));I?.(re),s?.(re),G||q(bh(ee))}}))});XD.displayName="@mantine/core/ColorPicker";var xoe=te((e,{fluid:t,sizes:n},{size:r})=>({root:{paddingLeft:e.spacing.md,paddingRight:e.spacing.md,maxWidth:t?"100%":Q({size:r,sizes:n}),marginLeft:"auto",marginRight:"auto"}}));const koe=xoe;var Poe=Object.defineProperty,tv=Object.getOwnPropertySymbols,QD=Object.prototype.hasOwnProperty,e6=Object.prototype.propertyIsEnumerable,L5=(e,t,n)=>t in e?Poe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Coe=(e,t)=>{for(var n in t||(t={}))QD.call(t,n)&&L5(e,n,t[n]);if(tv)for(var n of tv(t))e6.call(t,n)&&L5(e,n,t[n]);return e},Ooe=(e,t)=>{var n={};for(var r in e)QD.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&tv)for(var r of tv(e))t.indexOf(r)<0&&e6.call(e,r)&&(n[r]=e[r]);return n};const Eoe={sizes:{xs:T(540),sm:T(720),md:T(960),lg:T(1140),xl:T(1320)}},t6=v.forwardRef((e,t)=>{const n=ue("Container",Eoe,e),{className:r,fluid:o,size:i,unstyled:s,sizes:a,variant:c}=n,u=Ooe(n,["className","fluid","size","unstyled","sizes","variant"]),{classes:f,cx:p}=koe({fluid:o,sizes:a},{unstyled:s,name:"Container",variant:c,size:i});return O.createElement(_e,Coe({className:p(f.root,r),ref:t},u))});t6.displayName="@mantine/core/Container";const[$oe,Cu]=wu("ModalBase component was not found in tree");var Moe=te(()=>({close:{marginLeft:"auto",marginRight:0}}));const Toe=Moe;var Ioe=Object.defineProperty,nv=Object.getOwnPropertySymbols,n6=Object.prototype.hasOwnProperty,r6=Object.prototype.propertyIsEnumerable,z5=(e,t,n)=>t in e?Ioe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Noe=(e,t)=>{for(var n in t||(t={}))n6.call(t,n)&&z5(e,n,t[n]);if(nv)for(var n of nv(t))r6.call(t,n)&&z5(e,n,t[n]);return e},Roe=(e,t)=>{var n={};for(var r in e)n6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&nv)for(var r of nv(e))t.indexOf(r)<0&&r6.call(e,r)&&(n[r]=e[r]);return n};const Loe={size:"sm"},zoe=v.forwardRef((e,t)=>{const n=Cu(),r=ue(`${n.__staticSelector}CloseButton`,Loe,e),{className:o}=r,i=Roe(r,["className"]),{classes:s,cx:a}=Toe(null,n.stylesApi);return O.createElement(tp,Noe({className:a(s.close,o),ref:t,onClick:n.onClose},i))});var Aoe=te(()=>({overlay:{}}));const Doe=Aoe;var joe=Object.defineProperty,Boe=Object.defineProperties,Foe=Object.getOwnPropertyDescriptors,A5=Object.getOwnPropertySymbols,Voe=Object.prototype.hasOwnProperty,Hoe=Object.prototype.propertyIsEnumerable,D5=(e,t,n)=>t in e?joe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Woe=(e,t)=>{for(var n in t||(t={}))Voe.call(t,n)&&D5(e,n,t[n]);if(A5)for(var n of A5(t))Hoe.call(t,n)&&D5(e,n,t[n]);return e},Uoe=(e,t)=>Boe(e,Foe(t)),Zoe=te((e,{color:t,opacity:n,blur:r,radius:o,gradient:i,fixed:s,zIndex:a})=>({root:Uoe(Woe({},e.fn.cover(0)),{position:s?"fixed":"absolute",backgroundColor:i?void 0:e.fn.rgba(t,n),backgroundImage:i,backdropFilter:r?`blur(${T(r)})`:void 0,borderRadius:e.fn.radius(o),zIndex:a,"&[data-center]":{display:"flex",alignItems:"center",justifyContent:"center"}})}));const Koe=Zoe;var Goe=Object.defineProperty,rv=Object.getOwnPropertySymbols,o6=Object.prototype.hasOwnProperty,i6=Object.prototype.propertyIsEnumerable,j5=(e,t,n)=>t in e?Goe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qoe=(e,t)=>{for(var n in t||(t={}))o6.call(t,n)&&j5(e,n,t[n]);if(rv)for(var n of rv(t))i6.call(t,n)&&j5(e,n,t[n]);return e},Yoe=(e,t)=>{var n={};for(var r in e)o6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&rv)for(var r of rv(e))t.indexOf(r)<0&&i6.call(e,r)&&(n[r]=e[r]);return n};const Joe={opacity:.6,color:"#000",zIndex:Ki("modal"),radius:0},s6=v.forwardRef((e,t)=>{const n=ue("Overlay",Joe,e),{variant:r,opacity:o,color:i,blur:s,gradient:a,zIndex:c,radius:u,children:f,className:p,classNames:h,styles:g,unstyled:y,center:_,fixed:k}=n,b=Yoe(n,["variant","opacity","color","blur","gradient","zIndex","radius","children","className","classNames","styles","unstyled","center","fixed"]),{classes:S,cx:P}=Koe({color:i,opacity:o,blur:s,radius:u,gradient:a,fixed:k,zIndex:c},{name:"Overlay",classNames:h,styles:g,unstyled:y,variant:r});return O.createElement(_e,qoe({ref:t,className:P(S.root,p),"data-center":_||void 0},b),f)});s6.displayName="@mantine/core/Overlay";const a6=s6;var Xoe=Object.defineProperty,Qoe=Object.defineProperties,eie=Object.getOwnPropertyDescriptors,ov=Object.getOwnPropertySymbols,l6=Object.prototype.hasOwnProperty,c6=Object.prototype.propertyIsEnumerable,B5=(e,t,n)=>t in e?Xoe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ud=(e,t)=>{for(var n in t||(t={}))l6.call(t,n)&&B5(e,n,t[n]);if(ov)for(var n of ov(t))c6.call(t,n)&&B5(e,n,t[n]);return e},tie=(e,t)=>Qoe(e,eie(t)),nie=(e,t)=>{var n={};for(var r in e)l6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ov)for(var r of ov(e))t.indexOf(r)<0&&c6.call(e,r)&&(n[r]=e[r]);return n};const rie={},oie=v.forwardRef((e,t)=>{const n=Cu(),r=ue(`${n.__staticSelector}Overlay`,rie,e),{onClick:o,transitionProps:i,style:s,className:a}=r,c=nie(r,["onClick","transitionProps","style","className"]),{classes:u,cx:f}=Doe(null,n.stylesApi),p=h=>{o?.(h),n.closeOnClickOutside&&n.onClose()};return O.createElement(xs,tie(ud(ud({mounted:n.opened},n.transitionProps),i),{transition:"fade"}),h=>O.createElement(a6,ud({ref:t,onClick:p,fixed:!0,style:ud(ud({},s),h),className:f(u.overlay,a),zIndex:n.zIndex},c)))});var iie=te((e,{zIndex:t})=>({inner:{position:"fixed",width:"100%",top:0,bottom:0,maxHeight:"100%",zIndex:t,pointerEvents:"none"},content:{pointerEvents:"all"}}));const sie=iie;var aie=Object.defineProperty,iv=Object.getOwnPropertySymbols,u6=Object.prototype.hasOwnProperty,d6=Object.prototype.propertyIsEnumerable,F5=(e,t,n)=>t in e?aie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dd=(e,t)=>{for(var n in t||(t={}))u6.call(t,n)&&F5(e,n,t[n]);if(iv)for(var n of iv(t))d6.call(t,n)&&F5(e,n,t[n]);return e},lie=(e,t)=>{var n={};for(var r in e)u6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&iv)for(var r of iv(e))t.indexOf(r)<0&&d6.call(e,r)&&(n[r]=e[r]);return n};const cie={},uie=v.forwardRef((e,t)=>{const n=Cu(),r=ue(`${n.__staticSelector}Content`,cie,e),{className:o,transitionProps:i,style:s,onKeyDown:a}=r,c=lie(r,["className","transitionProps","style","onKeyDown"]),{classes:u,cx:f}=sie({zIndex:n.zIndex+1},n.stylesApi),p=h=>{var g;((g=h.target)==null?void 0:g.getAttribute("data-mantine-stop-propagation"))!=="true"&&h.key==="Escape"&&n.closeOnEscape&&n.onClose(),a?.(h)};return O.createElement(xs,dd(dd({mounted:n.opened,transition:"pop"},n.transitionProps),i),h=>O.createElement("div",{className:f(u.inner)},O.createElement(Tk,{active:n.opened&&n.trapFocus},O.createElement(zr,dd({component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":n.bodyMounted?n.getBodyId():void 0,"aria-labelledby":n.titleMounted?n.getTitleId():void 0,onKeyDown:p,ref:t,className:f(u.content,o),style:dd(dd({},s),h),shadow:n.shadow},c),c.children))))});var die=te((e,{padding:t})=>{const n=Q({size:t,sizes:e.spacing});return{header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:n,paddingRight:`calc(${n} - ${T(5)})`,position:"sticky",top:0,backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,zIndex:1e3}}});const fie=die;var pie=Object.defineProperty,sv=Object.getOwnPropertySymbols,f6=Object.prototype.hasOwnProperty,p6=Object.prototype.propertyIsEnumerable,V5=(e,t,n)=>t in e?pie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hie=(e,t)=>{for(var n in t||(t={}))f6.call(t,n)&&V5(e,n,t[n]);if(sv)for(var n of sv(t))p6.call(t,n)&&V5(e,n,t[n]);return e},mie=(e,t)=>{var n={};for(var r in e)f6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&sv)for(var r of sv(e))t.indexOf(r)<0&&p6.call(e,r)&&(n[r]=e[r]);return n};const gie={},vie=v.forwardRef((e,t)=>{const n=Cu(),r=ue(`${n.__staticSelector}Header`,gie,e),{className:o}=r,i=mie(r,["className"]),{classes:s,cx:a}=fie({padding:n.padding},n.stylesApi);return O.createElement(_e,hie({ref:t,className:a(s.header,o)},i))});var yie=te(e=>({title:{lineHeight:1,padding:0,margin:0,fontWeight:400,fontSize:e.fontSizes.md}}));const _ie=yie;var wie=Object.defineProperty,av=Object.getOwnPropertySymbols,h6=Object.prototype.hasOwnProperty,m6=Object.prototype.propertyIsEnumerable,H5=(e,t,n)=>t in e?wie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bie=(e,t)=>{for(var n in t||(t={}))h6.call(t,n)&&H5(e,n,t[n]);if(av)for(var n of av(t))m6.call(t,n)&&H5(e,n,t[n]);return e},Sie=(e,t)=>{var n={};for(var r in e)h6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&av)for(var r of av(e))t.indexOf(r)<0&&m6.call(e,r)&&(n[r]=e[r]);return n};const xie={},kie=v.forwardRef((e,t)=>{const n=Cu(),r=ue(`${n.__staticSelector}Title`,xie,e),{className:o}=r,i=Sie(r,["className"]),{classes:s,cx:a}=_ie(null,n.stylesApi);return v.useEffect(()=>(n.setTitleMounted(!0),()=>n.setTitleMounted(!1)),[]),O.createElement(_e,bie({component:"h2",id:n.getTitleId(),className:a(s.title,o),ref:t},i))});var Pie=te((e,{padding:t})=>({body:{padding:Q({size:t,sizes:e.spacing}),"&:not(:only-child)":{paddingTop:0}}}));const Cie=Pie;var Oie=Object.defineProperty,lv=Object.getOwnPropertySymbols,g6=Object.prototype.hasOwnProperty,v6=Object.prototype.propertyIsEnumerable,W5=(e,t,n)=>t in e?Oie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Eie=(e,t)=>{for(var n in t||(t={}))g6.call(t,n)&&W5(e,n,t[n]);if(lv)for(var n of lv(t))v6.call(t,n)&&W5(e,n,t[n]);return e},$ie=(e,t)=>{var n={};for(var r in e)g6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&lv)for(var r of lv(e))t.indexOf(r)<0&&v6.call(e,r)&&(n[r]=e[r]);return n};const Mie={},Tie=v.forwardRef((e,t)=>{const n=Cu(),r=ue(`${n.__staticSelector}Body`,Mie,e),{className:o}=r,i=$ie(r,["className"]),{classes:s,cx:a}=Cie({padding:n.padding},n.stylesApi);return v.useEffect(()=>(n.setBodyMounted(!0),()=>n.setBodyMounted(!1)),[]),O.createElement(_e,Eie({id:n.getBodyId(),className:a(s.body,o),ref:t},i))});function Iie({children:e}){return O.createElement(O.Fragment,null,e)}function Nie({opened:e,transitionDuration:t}){const[n,r]=v.useState(e),o=v.useRef(),s=v0()?0:t;return v.useEffect(()=>(e?(r(!0),window.clearTimeout(o.current)):s===0?r(!1):o.current=window.setTimeout(()=>r(!1),s),()=>window.clearTimeout(o.current)),[e,s]),n}var Rie=te(()=>({root:{}}));const Lie=Rie;var zie=Object.defineProperty,Aie=Object.defineProperties,Die=Object.getOwnPropertyDescriptors,cv=Object.getOwnPropertySymbols,y6=Object.prototype.hasOwnProperty,_6=Object.prototype.propertyIsEnumerable,U5=(e,t,n)=>t in e?zie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,B_=(e,t)=>{for(var n in t||(t={}))y6.call(t,n)&&U5(e,n,t[n]);if(cv)for(var n of cv(t))_6.call(t,n)&&U5(e,n,t[n]);return e},Z5=(e,t)=>Aie(e,Die(t)),jie=(e,t)=>{var n={};for(var r in e)y6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&cv)for(var r of cv(e))t.indexOf(r)<0&&_6.call(e,r)&&(n[r]=e[r]);return n};const Fk={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Ki("modal"),padding:"md",size:"md",shadow:"xl"};function pn(e){const t=ue("ModalBase",Fk,e),{opened:n,onClose:r,children:o,closeOnClickOutside:i,__staticSelector:s,transitionProps:a,withinPortal:c,portalProps:u,keepMounted:f,target:p,zIndex:h,lockScroll:g,trapFocus:y,closeOnEscape:_,returnFocus:k,padding:b,shadow:S,id:P,size:E,variant:$,classNames:I,unstyled:N,styles:R,className:F}=t,B=jie(t,["opened","onClose","children","closeOnClickOutside","__staticSelector","transitionProps","withinPortal","portalProps","keepMounted","target","zIndex","lockScroll","trapFocus","closeOnEscape","returnFocus","padding","shadow","id","size","variant","classNames","unstyled","styles","className"]),{classes:D,cx:K}=Lie(null,{name:s,classNames:I,styles:R,unstyled:N,variant:$,size:E}),W=Ia(P),[V,U]=v.useState(!1),[J,G]=v.useState(!1),A=typeof a?.duration=="number"?a?.duration:200,q=Nie({opened:n,transitionDuration:A});return Xc("keydown",H=>{!y&&H.key==="Escape"&&_&&r()}),NR({opened:n,shouldReturnFocus:y&&k}),O.createElement(ep,Z5(B_({},u),{withinPortal:c,target:p}),O.createElement($oe,{value:{__staticSelector:s,opened:n,onClose:r,closeOnClickOutside:i,transitionProps:Z5(B_({},a),{duration:A,keepMounted:f}),zIndex:h,padding:b,id:W,getTitleId:()=>`${W}-title`,getBodyId:()=>`${W}-body`,titleMounted:V,bodyMounted:J,setTitleMounted:U,setBodyMounted:G,trapFocus:y,closeOnEscape:_,shadow:S,stylesApi:{name:s,size:E,variant:$,classNames:I,styles:R,unstyled:N}}},O.createElement(bH,{enabled:q&&g},O.createElement("div",B_({className:K(D.root,F)},B),o))))}pn.CloseButton=zoe;pn.Overlay=oie;pn.Content=uie;pn.Header=vie;pn.Title=kie;pn.Body=Tie;pn.NativeScrollArea=Iie;const Bie={gap:{type:"spacing",property:"gap"},rowGap:{type:"spacing",property:"rowGap"},columnGap:{type:"spacing",property:"columnGap"},align:{type:"identity",property:"alignItems"},justify:{type:"identity",property:"justifyContent"},wrap:{type:"identity",property:"flexWrap"},direction:{type:"identity",property:"flexDirection"}};var Fie=Object.defineProperty,Vie=Object.defineProperties,Hie=Object.getOwnPropertyDescriptors,uv=Object.getOwnPropertySymbols,w6=Object.prototype.hasOwnProperty,b6=Object.prototype.propertyIsEnumerable,K5=(e,t,n)=>t in e?Fie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Wie=(e,t)=>{for(var n in t||(t={}))w6.call(t,n)&&K5(e,n,t[n]);if(uv)for(var n of uv(t))b6.call(t,n)&&K5(e,n,t[n]);return e},Uie=(e,t)=>Vie(e,Hie(t)),Zie=(e,t)=>{var n={};for(var r in e)w6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&uv)for(var r of uv(e))t.indexOf(r)<0&&b6.call(e,r)&&(n[r]=e[r]);return n};const Kie={},Wi=v.forwardRef((e,t)=>{const n=ue("Flex",Kie,e),{gap:r,rowGap:o,columnGap:i,align:s,justify:a,wrap:c,direction:u,sx:f}=n,p=Zie(n,["gap","rowGap","columnGap","align","justify","wrap","direction","sx"]);return O.createElement(_e,Uie(Wie({},p),{sx:[{display:"flex"},h=>eb({gap:r,rowGap:o,columnGap:i,align:s,justify:a,wrap:c,direction:u},h,Bie),...Wf(f)],ref:t}))});Wi.displayName="@mantine/core/Flex";function Gie(e){return v.Children.toArray(e).filter(Boolean)}const qie={left:"flex-start",center:"center",right:"flex-end",apart:"space-between"};var Yie=te((e,{spacing:t,position:n,noWrap:r,grow:o,align:i,count:s})=>({root:{boxSizing:"border-box",display:"flex",flexDirection:"row",alignItems:i||"center",flexWrap:r?"nowrap":"wrap",justifyContent:qie[n],gap:Q({size:t,sizes:e.spacing}),"& > *":{boxSizing:"border-box",maxWidth:o?`calc(${100/s}% - (${T(Q({size:t,sizes:e.spacing}))} - ${Q({size:t,sizes:e.spacing})} / ${s}))`:void 0,flexGrow:o?1:0}}}));const Jie=Yie;var Xie=Object.defineProperty,dv=Object.getOwnPropertySymbols,S6=Object.prototype.hasOwnProperty,x6=Object.prototype.propertyIsEnumerable,G5=(e,t,n)=>t in e?Xie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qie=(e,t)=>{for(var n in t||(t={}))S6.call(t,n)&&G5(e,n,t[n]);if(dv)for(var n of dv(t))x6.call(t,n)&&G5(e,n,t[n]);return e},ese=(e,t)=>{var n={};for(var r in e)S6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&dv)for(var r of dv(e))t.indexOf(r)<0&&x6.call(e,r)&&(n[r]=e[r]);return n};const tse={position:"left",spacing:"md"},de=v.forwardRef((e,t)=>{const n=ue("Group",tse,e),{className:r,position:o,align:i,children:s,noWrap:a,grow:c,spacing:u,unstyled:f,variant:p}=n,h=ese(n,["className","position","align","children","noWrap","grow","spacing","unstyled","variant"]),g=Gie(s),{classes:y,cx:_}=Jie({align:i,grow:c,noWrap:a,spacing:u,position:o,count:g.length},{unstyled:f,name:"Group",variant:p});return O.createElement(_e,Qie({className:_(y.root,r),ref:t},h),g)});de.displayName="@mantine/core/Group";function nse({open:e,close:t,openDelay:n,closeDelay:r}){const o=v.useRef(-1),i=v.useRef(-1),s=()=>{window.clearTimeout(o.current),window.clearTimeout(i.current)},a=()=>{s(),n===0?e():o.current=window.setTimeout(e,n)},c=()=>{s(),r===0?t():i.current=window.setTimeout(t,r)};return v.useEffect(()=>s,[]),{openDropdown:a,closeDropdown:c}}var rse=Object.defineProperty,q5=Object.getOwnPropertySymbols,ose=Object.prototype.hasOwnProperty,ise=Object.prototype.propertyIsEnumerable,Y5=(e,t,n)=>t in e?rse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sse=(e,t)=>{for(var n in t||(t={}))ose.call(t,n)&&Y5(e,n,t[n]);if(q5)for(var n of q5(t))ise.call(t,n)&&Y5(e,n,t[n]);return e};function ase(e){return O.createElement("svg",sse({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),O.createElement("path",{d:"M2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5C1 1.67157 1.67157 1 2.5 1ZM2.5 2C2.22386 2 2 2.22386 2 2.5V8.3636L3.6818 6.6818C3.76809 6.59551 3.88572 6.54797 4.00774 6.55007C4.12975 6.55216 4.24568 6.60372 4.32895 6.69293L7.87355 10.4901L10.6818 7.6818C10.8575 7.50607 11.1425 7.50607 11.3182 7.6818L13 9.3636V2.5C13 2.22386 12.7761 2 12.5 2H2.5ZM2 12.5V9.6364L3.98887 7.64753L7.5311 11.4421L8.94113 13H2.5C2.22386 13 2 12.7761 2 12.5ZM12.5 13H10.155L8.48336 11.153L11 8.6364L13 10.6364V12.5C13 12.7761 12.7761 13 12.5 13ZM6.64922 5.5C6.64922 5.03013 7.03013 4.64922 7.5 4.64922C7.96987 4.64922 8.35078 5.03013 8.35078 5.5C8.35078 5.96987 7.96987 6.35078 7.5 6.35078C7.03013 6.35078 6.64922 5.96987 6.64922 5.5ZM7.5 3.74922C6.53307 3.74922 5.74922 4.53307 5.74922 5.5C5.74922 6.46693 6.53307 7.25078 7.5 7.25078C8.46693 7.25078 9.25078 6.46693 9.25078 5.5C9.25078 4.53307 8.46693 3.74922 7.5 3.74922Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var lse=Object.defineProperty,cse=Object.defineProperties,use=Object.getOwnPropertyDescriptors,J5=Object.getOwnPropertySymbols,dse=Object.prototype.hasOwnProperty,fse=Object.prototype.propertyIsEnumerable,X5=(e,t,n)=>t in e?lse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Q5=(e,t)=>{for(var n in t||(t={}))dse.call(t,n)&&X5(e,n,t[n]);if(J5)for(var n of J5(t))fse.call(t,n)&&X5(e,n,t[n]);return e},eM=(e,t)=>cse(e,use(t)),pse=te((e,{radius:t})=>({root:{},imageWrapper:{position:"relative"},figure:{margin:0},image:eM(Q5({},e.fn.fontStyles()),{display:"block",width:"100%",height:"100%",border:0,borderRadius:e.fn.radius(t)}),caption:{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[7],marginTop:e.spacing.xs},placeholder:eM(Q5({},e.fn.cover()),{display:"flex",alignItems:"center",justifyContent:"center",color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],backgroundColor:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0],borderRadius:e.fn.radius(t)})}));const hse=pse;var mse=Object.defineProperty,gse=Object.defineProperties,vse=Object.getOwnPropertyDescriptors,fv=Object.getOwnPropertySymbols,k6=Object.prototype.hasOwnProperty,P6=Object.prototype.propertyIsEnumerable,tM=(e,t,n)=>t in e?mse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Sh=(e,t)=>{for(var n in t||(t={}))k6.call(t,n)&&tM(e,n,t[n]);if(fv)for(var n of fv(t))P6.call(t,n)&&tM(e,n,t[n]);return e},yse=(e,t)=>gse(e,vse(t)),_se=(e,t)=>{var n={};for(var r in e)k6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&fv)for(var r of fv(e))t.indexOf(r)<0&&P6.call(e,r)&&(n[r]=e[r]);return n};const wse={fit:"cover",width:"100%",height:"auto",radius:0},Vk=v.forwardRef((e,t)=>{const n=ue("Image",wse,e),{className:r,alt:o,src:i,fit:s,width:a,height:c,radius:u,imageProps:f,withPlaceholder:p,placeholder:h,imageRef:g,classNames:y,styles:_,caption:k,unstyled:b,style:S,variant:P}=n,E=_se(n,["className","alt","src","fit","width","height","radius","imageProps","withPlaceholder","placeholder","imageRef","classNames","styles","caption","unstyled","style","variant"]),{classes:$,cx:I}=hse({radius:u},{classNames:y,styles:_,unstyled:b,name:"Image",variant:P}),[N,R]=v.useState(!i),F=p&&N;return An(()=>{R(!i)},[i]),O.createElement(_e,Sh({className:I($.root,r),style:Sh({width:T(a)},S),ref:t},E),O.createElement("figure",{className:$.figure},O.createElement("div",{className:$.imageWrapper},O.createElement("img",yse(Sh({src:i,alt:o,ref:g},f),{className:I($.image,f?.className),onError:B=>{R(!0),typeof f?.onError=="function"&&f.onError(B)},style:Sh({objectFit:s,width:T(a),height:T(c)},f?.style)})),F&&O.createElement("div",{className:$.placeholder,title:o},h||O.createElement("div",null,O.createElement(ase,{width:T(40),height:T(40)})))),!!k&&O.createElement(ie,{component:"figcaption",size:"sm",align:"center",className:$.caption},k)))});Vk.displayName="@mantine/core/Image";var bse=Object.defineProperty,Sse=Object.defineProperties,xse=Object.getOwnPropertyDescriptors,nM=Object.getOwnPropertySymbols,kse=Object.prototype.hasOwnProperty,Pse=Object.prototype.propertyIsEnumerable,rM=(e,t,n)=>t in e?bse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cse=(e,t)=>{for(var n in t||(t={}))kse.call(t,n)&&rM(e,n,t[n]);if(nM)for(var n of nM(t))Pse.call(t,n)&&rM(e,n,t[n]);return e},Ose=(e,t)=>Sse(e,xse(t)),Ese=te(e=>({root:Ose(Cse({},e.fn.cover()),{display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"})}));const $se=Ese;var Mse=Object.defineProperty,Tse=Object.defineProperties,Ise=Object.getOwnPropertyDescriptors,pv=Object.getOwnPropertySymbols,C6=Object.prototype.hasOwnProperty,O6=Object.prototype.propertyIsEnumerable,oM=(e,t,n)=>t in e?Mse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xh=(e,t)=>{for(var n in t||(t={}))C6.call(t,n)&&oM(e,n,t[n]);if(pv)for(var n of pv(t))O6.call(t,n)&&oM(e,n,t[n]);return e},Nse=(e,t)=>Tse(e,Ise(t)),Rse=(e,t)=>{var n={};for(var r in e)C6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&pv)for(var r of pv(e))t.indexOf(r)<0&&O6.call(e,r)&&(n[r]=e[r]);return n};const Lse={overlayOpacity:.75,transitionDuration:0,radius:0,zIndex:Ki("overlay")},op=v.forwardRef((e,t)=>{const n=ue("LoadingOverlay",Lse,e),{className:r,visible:o,loaderProps:i,overlayOpacity:s,overlayColor:a,transitionDuration:c,exitTransitionDuration:u,zIndex:f,style:p,loader:h,radius:g,overlayBlur:y,unstyled:_,variant:k,keepMounted:b}=n,S=Rse(n,["className","visible","loaderProps","overlayOpacity","overlayColor","transitionDuration","exitTransitionDuration","zIndex","style","loader","radius","overlayBlur","unstyled","variant","keepMounted"]),{classes:P,cx:E,theme:$}=$se(null,{name:"LoadingOverlay",unstyled:_,variant:k}),I=`calc(${f} + 1)`;return O.createElement(xs,{keepMounted:b,duration:c,exitDuration:u,mounted:o,transition:"fade"},N=>O.createElement(_e,xh({className:E(P.root,r),style:Nse(xh(xh({},N),p),{zIndex:f}),ref:t},S),h?O.createElement("div",{style:{zIndex:I}},h):O.createElement(Qf,xh({style:{zIndex:I}},i)),O.createElement(a6,{opacity:s,zIndex:f,radius:g,blur:y,unstyled:_,color:a||($.colorScheme==="dark"?$.colors.dark[5]:$.white)})))});op.displayName="@mantine/core/LoadingOverlay";const E6={context:"Menu component was not found in the tree",children:"Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[zse,ip]=wu(E6.context);var Ase=te(e=>({divider:{marginTop:T(4),marginBottom:T(4),borderTop:`${T(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`}}));const Dse=Ase;var jse=Object.defineProperty,hv=Object.getOwnPropertySymbols,$6=Object.prototype.hasOwnProperty,M6=Object.prototype.propertyIsEnumerable,iM=(e,t,n)=>t in e?jse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bse=(e,t)=>{for(var n in t||(t={}))$6.call(t,n)&&iM(e,n,t[n]);if(hv)for(var n of hv(t))M6.call(t,n)&&iM(e,n,t[n]);return e},Fse=(e,t)=>{var n={};for(var r in e)$6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&hv)for(var r of hv(e))t.indexOf(r)<0&&M6.call(e,r)&&(n[r]=e[r]);return n};const Vse={},T6=v.forwardRef((e,t)=>{const n=ue("MenuDivider",Vse,e),{children:r,className:o}=n,i=Fse(n,["children","className"]),{classNames:s,styles:a,unstyled:c,variant:u}=ip(),{classes:f,cx:p}=Dse(null,{name:"Menu",classNames:s,styles:a,unstyled:c,variant:u});return O.createElement(_e,Bse({className:p(f.divider,o),ref:t},i))});T6.displayName="@mantine/core/MenuDivider";var Hse=Object.defineProperty,mv=Object.getOwnPropertySymbols,I6=Object.prototype.hasOwnProperty,N6=Object.prototype.propertyIsEnumerable,sM=(e,t,n)=>t in e?Hse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Wse=(e,t)=>{for(var n in t||(t={}))I6.call(t,n)&&sM(e,n,t[n]);if(mv)for(var n of mv(t))N6.call(t,n)&&sM(e,n,t[n]);return e},Use=(e,t)=>{var n={};for(var r in e)I6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&mv)for(var r of mv(e))t.indexOf(r)<0&&N6.call(e,r)&&(n[r]=e[r]);return n};const Zse={};function R6(e){const t=ue("MenuDropdown",Zse,e),{children:n,onMouseEnter:r,onMouseLeave:o}=t,i=Use(t,["children","onMouseEnter","onMouseLeave"]),s=v.useRef(),a=ip(),c=p=>{(p.key==="ArrowUp"||p.key==="ArrowDown")&&(p.preventDefault(),s.current.querySelectorAll("[data-menu-item]")[0].focus())},u=po(r,()=>a.trigger==="hover"&&a.openDropdown()),f=po(o,()=>a.trigger==="hover"&&a.closeDropdown());return O.createElement(Ft.Dropdown,Wse({onMouseEnter:u,onMouseLeave:f,role:"menu","aria-orientation":"vertical"},i),O.createElement("div",{tabIndex:-1,"data-menu-dropdown":!0,"data-autofocus":!0,onKeyDown:c,ref:s,style:{outline:0}},n))}R6.displayName="@mantine/core/MenuDropdown";var Kse=Object.defineProperty,Gse=Object.defineProperties,qse=Object.getOwnPropertyDescriptors,aM=Object.getOwnPropertySymbols,Yse=Object.prototype.hasOwnProperty,Jse=Object.prototype.propertyIsEnumerable,lM=(e,t,n)=>t in e?Kse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xse=(e,t)=>{for(var n in t||(t={}))Yse.call(t,n)&&lM(e,n,t[n]);if(aM)for(var n of aM(t))Jse.call(t,n)&&lM(e,n,t[n]);return e},Qse=(e,t)=>Gse(e,qse(t)),eae=te((e,{color:t,radius:n})=>({item:Qse(Xse({},e.fn.fontStyles()),{WebkitTapHighlightColor:"transparent",fontSize:e.fontSizes.sm,border:0,backgroundColor:"transparent",outline:0,width:"100%",textAlign:"left",textDecoration:"none",boxSizing:"border-box",padding:`${e.spacing.xs} ${e.spacing.sm}`,cursor:"pointer",borderRadius:e.fn.radius(n),color:t?e.fn.variant({variant:"filled",primaryFallback:!1,color:t}).background:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"flex",alignItems:"center","&:disabled":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],pointerEvents:"none",userSelect:"none"},"&[data-hovered]":{backgroundColor:t?e.fn.variant({variant:"light",color:t}).background:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[3],.35):e.colors.gray[1]}}),itemLabel:{flex:1},itemIcon:{display:"flex",justifyContent:"center",alignItems:"center",marginRight:e.spacing.xs},itemRightSection:{}}));const tae=eae;var nae=Object.defineProperty,rae=Object.defineProperties,oae=Object.getOwnPropertyDescriptors,gv=Object.getOwnPropertySymbols,L6=Object.prototype.hasOwnProperty,z6=Object.prototype.propertyIsEnumerable,cM=(e,t,n)=>t in e?nae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,iae=(e,t)=>{for(var n in t||(t={}))L6.call(t,n)&&cM(e,n,t[n]);if(gv)for(var n of gv(t))z6.call(t,n)&&cM(e,n,t[n]);return e},sae=(e,t)=>rae(e,oae(t)),aae=(e,t)=>{var n={};for(var r in e)L6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&gv)for(var r of gv(e))t.indexOf(r)<0&&z6.call(e,r)&&(n[r]=e[r]);return n};const lae={},A6=v.forwardRef((e,t)=>{const n=ue("MenuItem",lae,e),{children:r,className:o,color:i,closeMenuOnClick:s,icon:a,rightSection:c}=n,u=aae(n,["children","className","color","closeMenuOnClick","icon","rightSection"]),f=ip(),{classes:p,cx:h,theme:g}=tae({radius:f.radius,color:i},{name:"Menu",classNames:f.classNames,styles:f.styles,unstyled:f.unstyled,variant:f.variant}),y=v.useRef(),_=f.getItemIndex(y.current),k=u,b=po(k.onMouseLeave,()=>f.setHovered(-1)),S=po(k.onMouseEnter,()=>f.setHovered(f.getItemIndex(y.current))),P=po(k.onClick,()=>{typeof s=="boolean"?s&&f.closeDropdownImmediately():f.closeOnItemClick&&f.closeDropdownImmediately()}),E=po(k.onFocus,()=>f.setHovered(f.getItemIndex(y.current)));return O.createElement(_e,sae(iae({component:"button",type:"button"},u),{tabIndex:-1,onFocus:E,className:h(p.item,o),ref:di(y,t),role:"menuitem","data-menu-item":!0,"data-hovered":f.hovered===_?!0:void 0,onMouseEnter:S,onMouseLeave:b,onClick:P,onKeyDown:PH({siblingSelector:"[data-menu-item]",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:f.loop,dir:g.dir,orientation:"vertical",onKeyDown:k.onKeydown})}),a&&O.createElement("div",{className:p.itemIcon},a),r&&O.createElement("div",{className:p.itemLabel},r),c&&O.createElement("div",{className:p.itemRightSection},c))});A6.displayName="@mantine/core/MenuItem";const cae=A6;var uae=te(e=>({label:{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],fontWeight:500,fontSize:e.fontSizes.xs,padding:`calc(${e.spacing.xs} / 2) ${e.spacing.sm}`,cursor:"default"}}));const dae=uae;var fae=Object.defineProperty,vv=Object.getOwnPropertySymbols,D6=Object.prototype.hasOwnProperty,j6=Object.prototype.propertyIsEnumerable,uM=(e,t,n)=>t in e?fae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pae=(e,t)=>{for(var n in t||(t={}))D6.call(t,n)&&uM(e,n,t[n]);if(vv)for(var n of vv(t))j6.call(t,n)&&uM(e,n,t[n]);return e},hae=(e,t)=>{var n={};for(var r in e)D6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&vv)for(var r of vv(e))t.indexOf(r)<0&&j6.call(e,r)&&(n[r]=e[r]);return n};const mae={},B6=v.forwardRef((e,t)=>{const n=ue("MenuLabel",mae,e),{children:r,className:o}=n,i=hae(n,["children","className"]),{classNames:s,styles:a,unstyled:c,variant:u}=ip(),{classes:f,cx:p}=dae(null,{name:"Menu",classNames:s,styles:a,unstyled:c,variant:u});return O.createElement(ie,pae({className:p(f.label,o),ref:t},i),r)});B6.displayName="@mantine/core/MenuLabel";var gae=Object.defineProperty,yv=Object.getOwnPropertySymbols,F6=Object.prototype.hasOwnProperty,V6=Object.prototype.propertyIsEnumerable,dM=(e,t,n)=>t in e?gae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vae=(e,t)=>{for(var n in t||(t={}))F6.call(t,n)&&dM(e,n,t[n]);if(yv)for(var n of yv(t))V6.call(t,n)&&dM(e,n,t[n]);return e},yae=(e,t)=>{var n={};for(var r in e)F6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&yv)for(var r of yv(e))t.indexOf(r)<0&&V6.call(e,r)&&(n[r]=e[r]);return n};const _ae={refProp:"ref"},H6=v.forwardRef((e,t)=>{const n=ue("MenuTarget",_ae,e),{children:r,refProp:o}=n,i=yae(n,["children","refProp"]);if(!Uf(r))throw new Error(E6.children);const s=ip(),a=po(r.props.onClick,()=>s.trigger==="click"&&s.toggleDropdown()),c=po(r.props.onMouseEnter,()=>s.trigger==="hover"&&s.openDropdown()),u=po(r.props.onMouseLeave,()=>s.trigger==="hover"&&s.closeDropdown());return O.createElement(Ft.Target,vae({refProp:o,popupType:"menu",ref:t},i),v.cloneElement(r,{onClick:a,onMouseEnter:c,onMouseLeave:u,"data-expanded":s.opened?!0:void 0}))});H6.displayName="@mantine/core/MenuTarget";var wae=te({dropdown:{padding:T(4)}});const bae=wae;var Sae=Object.defineProperty,xae=Object.defineProperties,kae=Object.getOwnPropertyDescriptors,_v=Object.getOwnPropertySymbols,W6=Object.prototype.hasOwnProperty,U6=Object.prototype.propertyIsEnumerable,fM=(e,t,n)=>t in e?Sae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pM=(e,t)=>{for(var n in t||(t={}))W6.call(t,n)&&fM(e,n,t[n]);if(_v)for(var n of _v(t))U6.call(t,n)&&fM(e,n,t[n]);return e},hM=(e,t)=>xae(e,kae(t)),Pae=(e,t)=>{var n={};for(var r in e)W6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&_v)for(var r of _v(e))t.indexOf(r)<0&&U6.call(e,r)&&(n[r]=e[r]);return n};const Cae={closeOnItemClick:!0,loop:!0,trigger:"click",openDelay:0,closeDelay:100};function et(e){const t=ue("Menu",Cae,e),{children:n,onOpen:r,onClose:o,opened:i,defaultOpened:s,onChange:a,closeOnItemClick:c,loop:u,closeOnEscape:f,trigger:p,openDelay:h,closeDelay:g,classNames:y,styles:_,unstyled:k,radius:b,variant:S}=t,P=Pae(t,["children","onOpen","onClose","opened","defaultOpened","onChange","closeOnItemClick","loop","closeOnEscape","trigger","openDelay","closeDelay","classNames","styles","unstyled","radius","variant"]),{classes:E,cx:$}=bae(),[I,{setHovered:N,resetHovered:R}]=MH(),[F,B]=si({value:i,defaultValue:s,finalValue:!1,onChange:a}),D=()=>{B(!1),F&&o?.()},K=()=>{B(!0),!F&&r?.()},W=()=>F?D():K(),{openDropdown:V,closeDropdown:U}=nse({open:K,close:D,closeDelay:g,openDelay:h}),J=G=>CH("[data-menu-item]","[data-menu-dropdown]",G);return An(()=>{R()},[F]),O.createElement(zse,{value:{opened:F,toggleDropdown:W,getItemIndex:J,hovered:I,setHovered:N,closeOnItemClick:c,closeDropdown:p==="click"?D:U,openDropdown:p==="click"?K:V,closeDropdownImmediately:D,loop:u,trigger:p,radius:b,classNames:y,styles:_,unstyled:k,variant:S}},O.createElement(Ft,hM(pM({},P),{radius:b,opened:F,onChange:B,defaultOpened:s,trapFocus:p==="click",closeOnEscape:f&&p==="click",__staticSelector:"Menu",classNames:hM(pM({},y),{dropdown:$(E.dropdown,y?.dropdown)}),styles:_,unstyled:k,onClose:D,onOpen:K,variant:S}),n))}et.displayName="@mantine/core/Menu";et.Item=cae;et.Label=B6;et.Dropdown=R6;et.Target=H6;et.Divider=T6;const[Oae,Eae]=wu("Modal component was not found in tree"),$ae={xs:T(320),sm:T(380),md:T(440),lg:T(620),xl:T(780)};var Mae=te((e,{yOffset:t,xOffset:n,centered:r,fullScreen:o},{size:i})=>({content:{flex:o?"0 0 100%":`0 0 ${Q({size:i,sizes:$ae})}`,maxWidth:"100%",maxHeight:o?void 0:`calc(100vh - (${T(t)} * 2))`,height:o?"100vh":void 0,borderRadius:o?0:void 0,overflowY:"auto"},inner:{paddingTop:o?0:t,paddingBottom:o?0:t,paddingLeft:o?0:n,paddingRight:o?0:n,display:"flex",justifyContent:"center",alignItems:r?"center":"flex-start"}}));const Tae=Mae;var Iae=Object.defineProperty,Nae=Object.defineProperties,Rae=Object.getOwnPropertyDescriptors,wv=Object.getOwnPropertySymbols,Z6=Object.prototype.hasOwnProperty,K6=Object.prototype.propertyIsEnumerable,mM=(e,t,n)=>t in e?Iae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sS=(e,t)=>{for(var n in t||(t={}))Z6.call(t,n)&&mM(e,n,t[n]);if(wv)for(var n of wv(t))K6.call(t,n)&&mM(e,n,t[n]);return e},G6=(e,t)=>Nae(e,Rae(t)),Lae=(e,t)=>{var n={};for(var r in e)Z6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&wv)for(var r of wv(e))t.indexOf(r)<0&&K6.call(e,r)&&(n[r]=e[r]);return n};const zae=G6(sS({},Fk),{yOffset:"5vh",xOffset:"5vw"});function q6(e){const t=ue("ModalRoot",zae,e),{classNames:n,variant:r,size:o,yOffset:i,xOffset:s,scrollAreaComponent:a,radius:c,centered:u,fullScreen:f}=t,p=Lae(t,["classNames","variant","size","yOffset","xOffset","scrollAreaComponent","radius","centered","fullScreen"]),{classes:h,cx:g}=Tae({yOffset:i,xOffset:s,centered:u,fullScreen:f},{name:"Modal",variant:r,size:o});return O.createElement(Oae,{value:{yOffset:i,scrollAreaComponent:a,radius:c}},O.createElement(pn,sS({__staticSelector:"Modal",size:o,variant:r,classNames:G6(sS({},n),{content:g(h.content,n?.content),inner:g(h.inner,n?.inner)})},p)))}var Aae=Object.defineProperty,bv=Object.getOwnPropertySymbols,Y6=Object.prototype.hasOwnProperty,J6=Object.prototype.propertyIsEnumerable,gM=(e,t,n)=>t in e?Aae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Dae=(e,t)=>{for(var n in t||(t={}))Y6.call(t,n)&&gM(e,n,t[n]);if(bv)for(var n of bv(t))J6.call(t,n)&&gM(e,n,t[n]);return e},jae=(e,t)=>{var n={};for(var r in e)Y6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&bv)for(var r of bv(e))t.indexOf(r)<0&&J6.call(e,r)&&(n[r]=e[r]);return n};const Bae={shadow:"xl"},X6=v.forwardRef((e,t)=>{const n=ue("ModalContent",Bae,e),{children:r,scrollAreaComponent:o}=n,i=jae(n,["children","scrollAreaComponent"]),s=Eae(),a=o||s.scrollAreaComponent||pn.NativeScrollArea;return O.createElement(pn.Content,Dae({ref:t,radius:s.radius},i),O.createElement(a,{style:{maxHeight:`calc(100vh - (${T(s.yOffset)} * 2))`}},r))});var Fae=Object.defineProperty,Vae=Object.defineProperties,Hae=Object.getOwnPropertyDescriptors,Sv=Object.getOwnPropertySymbols,Q6=Object.prototype.hasOwnProperty,e8=Object.prototype.propertyIsEnumerable,vM=(e,t,n)=>t in e?Fae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,um=(e,t)=>{for(var n in t||(t={}))Q6.call(t,n)&&vM(e,n,t[n]);if(Sv)for(var n of Sv(t))e8.call(t,n)&&vM(e,n,t[n]);return e},Wae=(e,t)=>Vae(e,Hae(t)),Uae=(e,t)=>{var n={};for(var r in e)Q6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Sv)for(var r of Sv(e))t.indexOf(r)<0&&e8.call(e,r)&&(n[r]=e[r]);return n};const Zae=Wae(um({},Fk),{transitionProps:{duration:200,transition:"pop"},withOverlay:!0,withCloseButton:!0});function ko(e){const t=ue("Modal",Zae,e),{title:n,withOverlay:r,overlayProps:o,withCloseButton:i,closeButtonProps:s,children:a}=t,c=Uae(t,["title","withOverlay","overlayProps","withCloseButton","closeButtonProps","children"]),u=!!n||i;return O.createElement(q6,um({},c),r&&O.createElement(pn.Overlay,um({},o)),O.createElement(X6,null,u&&O.createElement(pn.Header,null,n&&O.createElement(pn.Title,null,n),i&&O.createElement(pn.CloseButton,um({},s))),O.createElement(pn.Body,null,a)))}ko.Root=q6;ko.CloseButton=pn.CloseButton;ko.Overlay=pn.Overlay;ko.Content=X6;ko.Header=pn.Header;ko.Title=pn.Title;ko.Body=pn.Body;ko.NativeScrollArea=pn.NativeScrollArea;const t8={xs:T(16),sm:T(22),md:T(26),lg:T(30),xl:T(36)},Kae={xs:T(10),sm:T(12),md:T(14),lg:T(16),xl:T(18)};var Gae=te((e,{disabled:t,radius:n,readOnly:r},{size:o,variant:i})=>({defaultValue:{display:"flex",alignItems:"center",backgroundColor:t?e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[3]:e.colorScheme==="dark"?e.colors.dark[7]:i==="filled"?e.white:e.colors.gray[1],color:t?e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7]:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],height:Q({size:o,sizes:t8}),paddingLeft:`calc(${Q({size:o,sizes:e.spacing})} / 1.5)`,paddingRight:t||r?Q({size:o,sizes:e.spacing}):0,fontWeight:500,fontSize:Q({size:o,sizes:Kae}),borderRadius:Q({size:n,sizes:e.radius}),cursor:t?"not-allowed":"default",userSelect:"none",maxWidth:`calc(100% - ${T(10)})`},defaultValueRemove:{color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],marginLeft:`calc(${Q({size:o,sizes:e.spacing})} / 6)`},defaultValueLabel:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}));const qae=Gae;var Yae=Object.defineProperty,xv=Object.getOwnPropertySymbols,n8=Object.prototype.hasOwnProperty,r8=Object.prototype.propertyIsEnumerable,yM=(e,t,n)=>t in e?Yae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Jae=(e,t)=>{for(var n in t||(t={}))n8.call(t,n)&&yM(e,n,t[n]);if(xv)for(var n of xv(t))r8.call(t,n)&&yM(e,n,t[n]);return e},Xae=(e,t)=>{var n={};for(var r in e)n8.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&xv)for(var r of xv(e))t.indexOf(r)<0&&r8.call(e,r)&&(n[r]=e[r]);return n};const Qae={xs:16,sm:22,md:24,lg:26,xl:30};function o8(e){var t=e,{label:n,classNames:r,styles:o,className:i,onRemove:s,disabled:a,readOnly:c,size:u,radius:f="sm",variant:p,unstyled:h}=t,g=Xae(t,["label","classNames","styles","className","onRemove","disabled","readOnly","size","radius","variant","unstyled"]);const{classes:y,cx:_}=qae({disabled:a,readOnly:c,radius:f},{name:"MultiSelect",classNames:r,styles:o,unstyled:h,size:u,variant:p});return O.createElement("div",Jae({className:_(y.defaultValue,i)},g),O.createElement("span",{className:y.defaultValueLabel},n),!a&&!c&&O.createElement(tp,{"aria-hidden":!0,onMouseDown:s,size:Qae[u],radius:2,color:"blue",variant:"transparent",iconSize:"70%",className:y.defaultValueRemove,tabIndex:-1,unstyled:h}))}o8.displayName="@mantine/core/MultiSelect/DefaultValue";function ele({data:e,searchable:t,limit:n,searchValue:r,filter:o,value:i,disableSelectedItemFiltering:s}){if(!t&&i.length===0)return e;if(!t){const c=[];for(let u=0;uf===e[u].value&&!e[u].disabled))&&c.push(e[u]);return c}const a=[];for(let c=0;cu===e[c].value&&!e[c].disabled),e[c])&&a.push(e[c]),!(a.length>=n));c+=1);return a}var tle=Object.defineProperty,kv=Object.getOwnPropertySymbols,i8=Object.prototype.hasOwnProperty,s8=Object.prototype.propertyIsEnumerable,_M=(e,t,n)=>t in e?tle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wM=(e,t)=>{for(var n in t||(t={}))i8.call(t,n)&&_M(e,n,t[n]);if(kv)for(var n of kv(t))s8.call(t,n)&&_M(e,n,t[n]);return e},nle=(e,t)=>{var n={};for(var r in e)i8.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&kv)for(var r of kv(e))t.indexOf(r)<0&&s8.call(e,r)&&(n[r]=e[r]);return n};const rle={xs:T(14),sm:T(18),md:T(20),lg:T(24),xl:T(28)};function ole(e){var t=e,{size:n,error:r,style:o}=t,i=nle(t,["size","error","style"]);const s=Sr(),a=Q({size:n,sizes:rle});return O.createElement("svg",wM({width:a,height:a,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:wM({color:r?s.colors.red[6]:s.colors.gray[6]},o),"data-chevron":!0},i),O.createElement("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"}))}var ile=Object.defineProperty,sle=Object.defineProperties,ale=Object.getOwnPropertyDescriptors,bM=Object.getOwnPropertySymbols,lle=Object.prototype.hasOwnProperty,cle=Object.prototype.propertyIsEnumerable,SM=(e,t,n)=>t in e?ile(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ule=(e,t)=>{for(var n in t||(t={}))lle.call(t,n)&&SM(e,n,t[n]);if(bM)for(var n of bM(t))cle.call(t,n)&&SM(e,n,t[n]);return e},dle=(e,t)=>sle(e,ale(t));function a8({shouldClear:e,clearButtonProps:t,onClear:n,size:r,error:o}){return e?O.createElement(tp,dle(ule({},t),{variant:"transparent",onClick:n,size:r,onMouseDown:i=>i.preventDefault()})):O.createElement(ole,{error:o,size:r})}a8.displayName="@mantine/core/SelectRightSection";var fle=Object.defineProperty,ple=Object.defineProperties,hle=Object.getOwnPropertyDescriptors,Pv=Object.getOwnPropertySymbols,l8=Object.prototype.hasOwnProperty,c8=Object.prototype.propertyIsEnumerable,xM=(e,t,n)=>t in e?fle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,F_=(e,t)=>{for(var n in t||(t={}))l8.call(t,n)&&xM(e,n,t[n]);if(Pv)for(var n of Pv(t))c8.call(t,n)&&xM(e,n,t[n]);return e},kM=(e,t)=>ple(e,hle(t)),mle=(e,t)=>{var n={};for(var r in e)l8.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Pv)for(var r of Pv(e))t.indexOf(r)<0&&c8.call(e,r)&&(n[r]=e[r]);return n};function u8(e){var t=e,{styles:n,rightSection:r,rightSectionWidth:o,theme:i}=t,s=mle(t,["styles","rightSection","rightSectionWidth","theme"]);if(r)return{rightSection:r,rightSectionWidth:o,styles:n};const a=typeof n=="function"?n(i):n;return{rightSection:!s.readOnly&&!(s.disabled&&s.shouldClear)&&O.createElement(a8,F_({},s)),styles:kM(F_({},a),{rightSection:kM(F_({},a?.rightSection),{pointerEvents:s.shouldClear?void 0:"none"})})}}var gle=Object.defineProperty,vle=Object.defineProperties,yle=Object.getOwnPropertyDescriptors,PM=Object.getOwnPropertySymbols,_le=Object.prototype.hasOwnProperty,wle=Object.prototype.propertyIsEnumerable,CM=(e,t,n)=>t in e?gle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ble=(e,t)=>{for(var n in t||(t={}))_le.call(t,n)&&CM(e,n,t[n]);if(PM)for(var n of PM(t))wle.call(t,n)&&CM(e,n,t[n]);return e},Sle=(e,t)=>vle(e,yle(t)),xle=te((e,{invalid:t},{size:n})=>({wrapper:{position:"relative"},values:{minHeight:`calc(${Q({size:n,sizes:gr})} - ${T(2)})`,display:"flex",alignItems:"center",flexWrap:"wrap",marginLeft:`calc(-${e.spacing.xs} / 2)`,boxSizing:"border-box","&[data-clearable]":{marginRight:Q({size:n,sizes:gr})}},value:{margin:`calc(${e.spacing.xs} / 2 - ${T(2)}) calc(${e.spacing.xs} / 2)`},searchInput:Sle(ble({},e.fn.fontStyles()),{flex:1,minWidth:T(60),backgroundColor:"transparent",border:0,outline:0,fontSize:Q({size:n,sizes:e.fontSizes}),padding:0,marginLeft:`calc(${e.spacing.xs} / 2)`,appearance:"none",color:"inherit",maxHeight:Q({size:n,sizes:t8}),"&::placeholder":{opacity:1,color:t?e.colors.red[e.colorScheme==="dark"?6:7]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]},"&:disabled":{cursor:"not-allowed"}}),searchInputEmpty:{width:"100%"},searchInputInputHidden:{width:0,minWidth:0,height:0,margin:0,overflow:"hidden"},searchInputPointer:{cursor:"pointer","&:disabled":{cursor:"not-allowed"}},input:{cursor:"pointer","&:disabled":{cursor:"not-allowed"}}}));const kle=xle;var Ple=Object.defineProperty,Cle=Object.defineProperties,Ole=Object.getOwnPropertyDescriptors,Cv=Object.getOwnPropertySymbols,d8=Object.prototype.hasOwnProperty,f8=Object.prototype.propertyIsEnumerable,OM=(e,t,n)=>t in e?Ple(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,uc=(e,t)=>{for(var n in t||(t={}))d8.call(t,n)&&OM(e,n,t[n]);if(Cv)for(var n of Cv(t))f8.call(t,n)&&OM(e,n,t[n]);return e},EM=(e,t)=>Cle(e,Ole(t)),Ele=(e,t)=>{var n={};for(var r in e)d8.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Cv)for(var r of Cv(e))t.indexOf(r)<0&&f8.call(e,r)&&(n[r]=e[r]);return n};function $le(e,t,n){return t?!1:n.label.toLowerCase().trim().includes(e.toLowerCase().trim())}function Mle(e,t){return!!e&&!t.some(n=>n.value.toLowerCase()===e.toLowerCase())}function $M(e,t){if(!Array.isArray(e))return;if(t.length===0)return[];const n=t.map(r=>typeof r=="object"?r.value:r);return e.filter(r=>n.includes(r))}const Tle={size:"sm",valueComponent:o8,itemComponent:bk,transitionProps:{transition:"fade",duration:0},maxDropdownHeight:220,shadow:"sm",searchable:!1,filter:$le,limit:1/0,clearSearchOnChange:!0,clearable:!1,clearSearchOnBlur:!1,disabled:!1,initiallyOpened:!1,creatable:!1,shouldCreate:Mle,switchDirectionOnFlip:!1,zIndex:Ki("popover"),selectOnBlur:!1,positionDependencies:[],dropdownPosition:"flip"},Hk=v.forwardRef((e,t)=>{const n=ue("MultiSelect",Tle,e),{className:r,style:o,required:i,label:s,description:a,size:c,error:u,classNames:f,styles:p,wrapperProps:h,value:g,defaultValue:y,data:_,onChange:k,valueComponent:b,itemComponent:S,id:P,transitionProps:E,maxDropdownHeight:$,shadow:I,nothingFound:N,onFocus:R,onBlur:F,searchable:B,placeholder:D,filter:K,limit:W,clearSearchOnChange:V,clearable:U,clearSearchOnBlur:J,variant:G,onSearchChange:A,searchValue:q,disabled:H,initiallyOpened:ee,radius:re,icon:he,rightSection:Pe,rightSectionWidth:X,creatable:ne,getCreateLabel:fe,shouldCreate:Oe,onCreate:Me,sx:Te,dropdownComponent:ut,onDropdownClose:Fe,onDropdownOpen:St,maxSelectedValues:ft,withinPortal:Vt,switchDirectionOnFlip:rn,zIndex:pt,selectOnBlur:wn,name:Un,dropdownPosition:Ze,errorProps:mn,labelProps:Rt,descriptionProps:st,form:xr,positionDependencies:kr,onKeyDown:Tn,unstyled:on,inputContainer:Ht,inputWrapperOrder:sn,readOnly:an,withAsterisk:ln,clearButtonProps:Po,hoverOnSearchChange:Ve,disableSelectedItemFiltering:ge}=n,$e=Ele(n,["className","style","required","label","description","size","error","classNames","styles","wrapperProps","value","defaultValue","data","onChange","valueComponent","itemComponent","id","transitionProps","maxDropdownHeight","shadow","nothingFound","onFocus","onBlur","searchable","placeholder","filter","limit","clearSearchOnChange","clearable","clearSearchOnBlur","variant","onSearchChange","searchValue","disabled","initiallyOpened","radius","icon","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","onCreate","sx","dropdownComponent","onDropdownClose","onDropdownOpen","maxSelectedValues","withinPortal","switchDirectionOnFlip","zIndex","selectOnBlur","name","dropdownPosition","errorProps","labelProps","descriptionProps","form","positionDependencies","onKeyDown","unstyled","inputContainer","inputWrapperOrder","readOnly","withAsterisk","clearButtonProps","hoverOnSearchChange","disableSelectedItemFiltering"]),{classes:Xt,cx:Wt,theme:Ut}=kle({invalid:!!u},{name:"MultiSelect",classNames:f,styles:p,unstyled:on,size:c,variant:G}),{systemStyles:In,rest:Fr}=Ul($e),tt=v.useRef(),at=v.useRef({}),wt=Ia(P),[nt,Xe]=v.useState(ee),[mt,Ne]=v.useState(-1),[Zn,xt]=v.useState("column"),[lt,Zt]=si({value:q,defaultValue:"",finalValue:void 0,onChange:A}),[Nn,cr]=v.useState(!1),{scrollIntoView:Dt,targetRef:ve,scrollableRef:Kn}=FR({duration:0,offset:5,cancelable:!1,isList:!0}),Vr=ne&&typeof fe=="function";let Hr=null;const be=_.map(xe=>typeof xe=="string"?{label:xe,value:xe}:xe),Qe=sR({data:be}),[Ae,dt]=si({value:$M(g,_),defaultValue:$M(y,_),finalValue:[],onChange:k}),ur=v.useRef(!!ft&&ft{if(!an){const Ye=Ae.filter(Gn=>Gn!==xe);dt(Ye),ft&&Ye.length{Zt(xe.currentTarget.value),!H&&!ur.current&&B&&Xe(!0)},Au=xe=>{typeof R=="function"&&R(xe),!H&&!ur.current&&B&&Xe(!0)},Kt=ele({data:Qe,searchable:B,searchValue:lt,limit:W,filter:K,value:Ae,disableSelectedItemFiltering:ge}),Cs=(xe,Ye,Gn)=>{let dr=xe;for(;Gn(dr);)if(dr=Ye(dr),!Kt[dr].disabled)return dr;return xe};An(()=>{Ne(Ve&<?0:-1)},[lt,Ve]),An(()=>{!H&&Ae.length>_.length&&Xe(!1),ft&&Ae.length=ft&&(ur.current=!0,Xe(!1))},[Ae]);const Pr=xe=>{if(!an)if(V&&Zt(""),Ae.includes(xe.value))Xl(xe.value);else{if(xe.creatable&&typeof Me=="function"){const Ye=Me(xe.value);typeof Ye<"u"&&Ye!==null&&dt(typeof Ye=="string"?[...Ae,Ye]:[...Ae,Ye.value])}else dt([...Ae,xe.value]);Ae.length===ft-1&&(ur.current=!0,Xe(!1)),mt===Kt.length-1&&Ne(Kt.length-2),Kt.length===1&&Xe(!1)}},Os=xe=>{typeof F=="function"&&F(xe),wn&&Kt[mt]&&nt&&Pr(Kt[mt]),J&&Zt(""),Xe(!1)},Du=xe=>{if(Nn||(Tn?.(xe),an)||xe.key!=="Backspace"&&ft&&ur.current)return;const Ye=Zn==="column",Gn=()=>{Ne(bn=>{var Le;const De=Cs(bn,Sn=>Sn+1,Sn=>Sn{Ne(bn=>{var Le;const De=Cs(bn,Sn=>Sn-1,Sn=>Sn>0);return nt&&(ve.current=at.current[(Le=Kt[De])==null?void 0:Le.value],Dt({alignment:Ye?"start":"end"})),De})};switch(xe.key){case"ArrowUp":{xe.preventDefault(),Xe(!0),Ye?dr():Gn();break}case"ArrowDown":{xe.preventDefault(),Xe(!0),Ye?Gn():dr();break}case"Enter":{xe.preventDefault(),Kt[mt]&&nt?Pr(Kt[mt]):Xe(!0);break}case" ":{B||(xe.preventDefault(),Kt[mt]&&nt?Pr(Kt[mt]):Xe(!0));break}case"Backspace":{Ae.length>0&<.length===0&&(dt(Ae.slice(0,-1)),Xe(!0),ft&&(ur.current=!1));break}case"Home":{if(!B){xe.preventDefault(),nt||Xe(!0);const bn=Kt.findIndex(Le=>!Le.disabled);Ne(bn),Dt({alignment:Ye?"end":"start"})}break}case"End":{if(!B){xe.preventDefault(),nt||Xe(!0);const bn=Kt.map(Le=>!!Le.disabled).lastIndexOf(!1);Ne(bn),Dt({alignment:Ye?"end":"start"})}break}case"Escape":Xe(!1)}},Ha=Ae.map(xe=>{let Ye=Qe.find(Gn=>Gn.value===xe&&!Gn.disabled);return!Ye&&Vr&&(Ye={value:xe,label:xe}),Ye}).filter(xe=>!!xe).map(xe=>O.createElement(b,EM(uc({},xe),{variant:G,disabled:H,className:Xt.value,readOnly:an,onRemove:Ye=>{Ye.preventDefault(),Ye.stopPropagation(),Xl(xe.value)},key:xe.value,size:c,styles:p,classNames:f,radius:re}))),Ke=xe=>Ae.includes(xe),kt=()=>{var xe;Zt(""),dt([]),(xe=tt.current)==null||xe.focus(),ft&&(ur.current=!1)};Vr&&Oe(lt,Qe)&&(Hr=fe(lt),Kt.push({label:lt,value:lt,creatable:!0}));const cn=!an&&(Kt.length>0?nt:nt&&!!N);return An(()=>{const xe=cn?St:Fe;typeof xe=="function"&&xe()},[cn]),O.createElement(ys.Wrapper,uc(uc({required:i,id:wt,label:s,error:u,description:a,size:c,className:r,style:o,classNames:f,styles:p,__staticSelector:"MultiSelect",sx:Te,errorProps:mn,descriptionProps:st,labelProps:Rt,inputContainer:Ht,inputWrapperOrder:sn,unstyled:on,withAsterisk:ln,variant:G},In),h),O.createElement(ga,{opened:cn,transitionProps:E,shadow:"sm",withinPortal:Vt,__staticSelector:"MultiSelect",onDirectionChange:xt,switchDirectionOnFlip:rn,zIndex:pt,dropdownPosition:Ze,positionDependencies:[...kr,lt],classNames:f,styles:p,unstyled:on,variant:G},O.createElement(ga.Target,null,O.createElement("div",{className:Xt.wrapper,role:"combobox","aria-haspopup":"listbox","aria-owns":nt&&cn?`${wt}-items`:null,"aria-controls":wt,"aria-expanded":nt,onMouseLeave:()=>Ne(-1),tabIndex:-1},O.createElement("input",{type:"hidden",name:Un,value:Ae.join(","),form:xr,disabled:H}),O.createElement(ys,uc({__staticSelector:"MultiSelect",style:{overflow:"hidden"},component:"div",multiline:!0,size:c,variant:G,disabled:H,error:u,required:i,radius:re,icon:he,unstyled:on,onMouseDown:xe=>{var Ye;xe.preventDefault(),!H&&!ur.current&&Xe(!nt),(Ye=tt.current)==null||Ye.focus()},classNames:EM(uc({},f),{input:Wt({[Xt.input]:!B},f?.input)})},u8({theme:Ut,rightSection:Pe,rightSectionWidth:X,styles:p,size:c,shouldClear:U&&Ae.length>0,onClear:kt,error:u,disabled:H,clearButtonProps:Po,readOnly:an})),O.createElement("div",{className:Xt.values,"data-clearable":U||void 0},Ha,O.createElement("input",uc({ref:di(t,tt),type:"search",id:wt,className:Wt(Xt.searchInput,{[Xt.searchInputPointer]:!B,[Xt.searchInputInputHidden]:!nt&&Ae.length>0||!B&&Ae.length>0,[Xt.searchInputEmpty]:Ae.length===0}),onKeyDown:Du,value:lt,onChange:Ps,onFocus:Au,onBlur:Os,readOnly:!B||ur.current||an,placeholder:Ae.length===0?D:void 0,disabled:H,"data-mantine-stop-propagation":nt,autoComplete:"off",onCompositionStart:()=>cr(!0),onCompositionEnd:()=>cr(!1)},Fr)))))),O.createElement(ga.Dropdown,{component:ut||z0,maxHeight:$,direction:Zn,id:wt,innerRef:Kn,__staticSelector:"MultiSelect",classNames:f,styles:p},O.createElement(wk,{data:Kt,hovered:mt,classNames:f,styles:p,uuid:wt,__staticSelector:"MultiSelect",onItemHover:Ne,onItemSelect:Pr,itemsRefs:at,itemComponent:S,size:c,nothingFound:N,isItemSelected:Ke,creatable:ne&&!!Hr,createLabel:Hr,unstyled:on,variant:G}))))});Hk.displayName="@mantine/core/MultiSelect";const Ile=(e,t,n)=>Number.isInteger(e)&&e>=0&&t===0?"numeric":!Number.isInteger(e)&&e>=0&&t!==0?"decimal":Number.isInteger(e)&&e<0&&t===0||!Number.isInteger(e)&&e<0&&t!==0?n==="ios"?"text":"decimal":"numeric";function MM({direction:e,size:t}){return O.createElement("svg",{style:{transform:e==="up"?"rotate(180deg)":void 0},width:T(t),height:T(t),viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},O.createElement("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"}))}const p8={xs:T(20),sm:T(24),md:T(30),lg:T(34),xl:T(36)};var Nle=te((e,{radius:t},{size:n})=>({rightSection:{display:"flex",flexDirection:"column",height:`calc(100% - ${T(2)})`,margin:T(1),overflow:"hidden",borderTopRightRadius:e.fn.radius(t),borderBottomRightRadius:e.fn.radius(t)},control:{margin:0,position:"relative",flex:"0 0 50%",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:Q({size:n,sizes:p8}),padding:0,WebkitTapHighlightColor:"transparent",borderBottom:`${T(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,borderLeft:`${T(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,borderTop:0,borderRight:0,backgroundColor:"transparent",marginRight:T(1),color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,"&:not(:disabled):hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]},"&:disabled":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]}},controlUp:{},controlDown:{borderBottom:0}}));const Rle=Nle;var Lle=Object.defineProperty,zle=Object.defineProperties,Ale=Object.getOwnPropertyDescriptors,Ov=Object.getOwnPropertySymbols,h8=Object.prototype.hasOwnProperty,m8=Object.prototype.propertyIsEnumerable,TM=(e,t,n)=>t in e?Lle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,V_=(e,t)=>{for(var n in t||(t={}))h8.call(t,n)&&TM(e,n,t[n]);if(Ov)for(var n of Ov(t))m8.call(t,n)&&TM(e,n,t[n]);return e},Dle=(e,t)=>zle(e,Ale(t)),jle=(e,t)=>{var n={};for(var r in e)h8.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ov)for(var r of Ov(e))t.indexOf(r)<0&&m8.call(e,r)&&(n[r]=e[r]);return n};const Ble={type:"text",size:"sm",__staticSelector:"TextInput"},hn=v.forwardRef((e,t)=>{const n=RA("TextInput",Ble,e),{inputProps:r,wrapperProps:o}=n,i=jle(n,["inputProps","wrapperProps"]);return O.createElement(ys.Wrapper,V_({},o),O.createElement(ys,Dle(V_(V_({},r),i),{ref:t})))});hn.displayName="@mantine/core/TextInput";var Fle=Object.defineProperty,Vle=Object.defineProperties,Hle=Object.getOwnPropertyDescriptors,Ev=Object.getOwnPropertySymbols,g8=Object.prototype.hasOwnProperty,v8=Object.prototype.propertyIsEnumerable,IM=(e,t,n)=>t in e?Fle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Wle=(e,t)=>{for(var n in t||(t={}))g8.call(t,n)&&IM(e,n,t[n]);if(Ev)for(var n of Ev(t))v8.call(t,n)&&IM(e,n,t[n]);return e},Ule=(e,t)=>Vle(e,Hle(t)),Zle=(e,t)=>{var n={};for(var r in e)g8.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ev)for(var r of Ev(e))t.indexOf(r)<0&&v8.call(e,r)&&(n[r]=e[r]);return n};const Kle=e=>e||"",Gle=e=>{if(e==="-")return e;let t=e;t[0]==="."&&(t=`0${e}`);const n=parseFloat(t);return Number.isNaN(n)?"":e},NM={xs:T(10),sm:T(14),md:T(16),lg:T(18),xl:T(20)},qle={step:1,hideControls:!1,size:"sm",precision:0,noClampOnBlur:!1,removeTrailingZeros:!1,decimalSeparator:".",formatter:Kle,parser:Gle,type:"text"},y8=v.forwardRef((e,t)=>{const n=ue("NumberInput",qle,e),{readOnly:r,disabled:o,value:i,onChange:s,decimalSeparator:a,thousandsSeparator:c,min:u,max:f,startValue:p,step:h,stepHoldInterval:g,stepHoldDelay:y,onFocus:_,onBlur:k,onKeyDown:b,onKeyUp:S,hideControls:P,radius:E,variant:$,precision:I,removeTrailingZeros:N,defaultValue:R,noClampOnBlur:F,handlersRef:B,classNames:D,styles:K,size:W,rightSection:V,rightSectionWidth:U,formatter:J,parser:G,inputMode:A,unstyled:q,type:H}=n,ee=Zle(n,["readOnly","disabled","value","onChange","decimalSeparator","thousandsSeparator","min","max","startValue","step","stepHoldInterval","stepHoldDelay","onFocus","onBlur","onKeyDown","onKeyUp","hideControls","radius","variant","precision","removeTrailingZeros","defaultValue","noClampOnBlur","handlersRef","classNames","styles","size","rightSection","rightSectionWidth","formatter","parser","inputMode","unstyled","type"]),{classes:re,cx:he}=Rle({radius:E},{classNames:D,styles:K,unstyled:q,name:"NumberInput",variant:$,size:W}),Pe=ge=>{if(ge==="")return"";let $e=ge.toFixed(I);return N&&I>0&&($e=$e.replace(new RegExp(`[0]{0,${I}}$`),""),$e.endsWith(".")&&($e=$e.slice(0,-1))),$e},X=ge=>{let $e=ge;return a&&($e=$e.replace(".",a)),J($e)},ne=ge=>{let $e=ge;return a&&($e=$e.replaceAll(c,"").replace(a,".")),G($e)},fe=ge=>X(Pe(ge)),[Oe,Me]=v.useState(typeof i=="number"?i:typeof R=="number"?R:""),[Te,ut]=v.useState(()=>fe(Oe)),Fe=v.useRef(),[St,ft]=v.useState(!1),Vt=(ge,$e)=>{if(!St||$e){const Xt=fe(ge);Xt!==Te&&ut(Xt)}ge!==Oe&&Me(ge)},rn=typeof u=="number"?u:-1/0,pt=typeof f=="number"?f:1/0,wn=v.useRef();wn.current=()=>{var ge;let $e;Oe===""?$e=(ge=p??u)!=null?ge:0:$e=parseFloat(Pe(bl(Oe+h,rn,pt))),Vt($e,!0),s?.($e)};const Un=v.useRef();Un.current=()=>{var ge;let $e;Oe===""?$e=(ge=p??u)!=null?ge:0:$e=parseFloat(Pe(bl(Oe-h,rn,pt))),Vt($e,!0),s?.($e)},AR(B,{increment:wn.current,decrement:Un.current}),v.useEffect(()=>{St||Vt(i===void 0?Oe:i,!0)},[i,St]);const Ze=y!==void 0&&g!==void 0,mn=v.useRef(null),Rt=v.useRef(0),st=()=>{mn.current&&window.clearTimeout(mn.current),mn.current=null,Rt.current=0},xr=ge=>{ge?wn.current():Un.current(),Rt.current+=1},kr=ge=>{if(xr(ge),Ze){const $e=typeof g=="number"?g:g(Rt.current);mn.current=window.setTimeout(()=>kr(ge),$e)}},Tn=(ge,$e)=>{ge.preventDefault(),Fe.current.focus(),xr($e),Ze&&(mn.current=window.setTimeout(()=>kr($e),y))};v.useEffect(()=>(st(),st),[]);const on=O.createElement("div",{className:re.rightSection},O.createElement("button",{type:"button",tabIndex:-1,"aria-hidden":!0,disabled:Oe>=f,className:he(re.control,re.controlUp),onPointerDown:ge=>{Tn(ge,!0)},onPointerUp:st,onPointerLeave:st},O.createElement(MM,{size:Q({size:W,sizes:NM}),direction:"up"})),O.createElement("button",{type:"button",tabIndex:-1,"aria-hidden":!0,disabled:Oe<=u,className:he(re.control,re.controlDown),onPointerDown:ge=>{Tn(ge,!1)},onPointerUp:st,onPointerLeave:st},O.createElement(MM,{size:Q({size:W,sizes:NM}),direction:"down"}))),Ht=ge=>{let $e=ge;($e[0]===`${a}`||$e[0]===".")&&($e=`0${$e}`);const Xt=parseFloat(Pe(parseFloat(ne($e)))),Wt=F?Xt:bl(Xt,rn,pt),Ut=Number.isNaN(Wt)?"":Wt,In=Oe!==Ut;ut(ge),Vt(Ut),In&&s?.(Ut)},sn=ge=>{ge.nativeEvent.isComposing||Ht(ge.target.value)},an=ge=>{ft(!0),_?.(ge)},ln=ge=>{ft(!1),k?.(ge)},Po=ge=>{if(typeof b=="function"&&b(ge),ge.repeat&&Ze&&(ge.key==="ArrowUp"||ge.key==="ArrowDown")){ge.preventDefault();return}r||(ge.key==="ArrowUp"?Tn(ge,!0):ge.key==="ArrowDown"&&Tn(ge,!1))},Ve=ge=>{typeof S=="function"&&S(ge),(ge.key==="ArrowUp"||ge.key==="ArrowDown")&&st()};return O.createElement(hn,Ule(Wle({},ee),{type:H,variant:$,value:Te,disabled:o,readOnly:r,ref:di(Fe,t),onChange:sn,onFocus:an,onBlur:ln,onKeyDown:Po,onKeyUp:Ve,rightSection:V||(o||r||P||$==="unstyled"?null:on),rightSectionWidth:U??`calc(${Q({size:W,sizes:p8})} + ${T(1)})`,radius:E,max:f,min:u,step:h,size:W,styles:K,classNames:D,inputMode:A||Ile(h,I,dZ()),__staticSelector:"NumberInput",unstyled:q}))});y8.displayName="@mantine/core/NumberInput";const[Yle,B0]=wu("Pagination.Root component was not found in tree"),Jle={siblings:1,boundaries:1};function _8(e){const{total:t,value:n,defaultValue:r,onChange:o,disabled:i,children:s,siblings:a,boundaries:c,color:u,radius:f,onNextPage:p,onPreviousPage:h,onFirstPage:g,onLastPage:y,getItemProps:_,classNames:k,styles:b,unstyled:S,variant:P,size:E}=ue("PaginationRoot",Jle,e),{range:$,setPage:I,next:N,previous:R,active:F,first:B,last:D}=oZ({page:n,initialPage:r,onChange:o,total:t,siblings:a,boundaries:c}),K=po(p,N),W=po(h,R),V=po(g,B),U=po(y,D);return O.createElement(Yle,{value:{total:t,range:$,active:F,disabled:i,color:u,radius:f,getItemProps:_,onChange:I,onNext:K,onPrevious:W,onFirst:V,onLast:U,stylesApi:{name:"Pagination",classNames:k,styles:b,unstyled:S,variant:P,size:E}}},s)}const kf={xs:T(22),sm:T(26),md:T(32),lg:T(38),xl:T(44)};var Xle=te((e,{color:t,radius:n,withPadding:r},{size:o})=>{const i=e.fn.variant({color:t,variant:"filled"});return{control:{cursor:"pointer",userSelect:"none",display:"flex",alignItems:"center",justifyContent:"center",border:`${T(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,height:Q({size:o,sizes:kf}),minWidth:Q({size:o,sizes:kf}),padding:r?`0 calc(${Q({size:o,sizes:e.spacing})} / 2)`:void 0,fontSize:Q({size:o,sizes:e.fontSizes}),borderRadius:e.fn.radius(n),lineHeight:1,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,"&:not([data-disabled])":e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]}),"&:active:not([data-disabled])":e.activeStyles,"&[data-disabled]":{opacity:.4,cursor:"not-allowed"},"&[data-active]":{borderColor:"transparent",color:i.color,backgroundColor:i.background,"&:not([data-disabled])":e.fn.hover({backgroundColor:i.hover})}}}});const Qle=Xle;var ece=Object.defineProperty,tce=Object.defineProperties,nce=Object.getOwnPropertyDescriptors,$v=Object.getOwnPropertySymbols,w8=Object.prototype.hasOwnProperty,b8=Object.prototype.propertyIsEnumerable,RM=(e,t,n)=>t in e?ece(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rce=(e,t)=>{for(var n in t||(t={}))w8.call(t,n)&&RM(e,n,t[n]);if($v)for(var n of $v(t))b8.call(t,n)&&RM(e,n,t[n]);return e},oce=(e,t)=>tce(e,nce(t)),ice=(e,t)=>{var n={};for(var r in e)w8.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&$v)for(var r of $v(e))t.indexOf(r)<0&&b8.call(e,r)&&(n[r]=e[r]);return n};const sce={withPadding:!0},F0=v.forwardRef((e,t)=>{const n=ue("PaginationControl",sce,e),{active:r,className:o,disabled:i,withPadding:s}=n,a=ice(n,["active","className","disabled","withPadding"]),c=B0(),{classes:u,cx:f}=Qle({color:c.color,radius:c.radius,withPadding:s},c.stylesApi);return O.createElement(Bn,oce(rce({},a),{disabled:i,"data-active":r||void 0,"data-disabled":i||void 0,ref:t,className:f(u.control,o)}))});F0.displayName="@mantine/core/PaginationControl";var ace=Object.defineProperty,lce=Object.defineProperties,cce=Object.getOwnPropertyDescriptors,Mv=Object.getOwnPropertySymbols,S8=Object.prototype.hasOwnProperty,x8=Object.prototype.propertyIsEnumerable,LM=(e,t,n)=>t in e?ace(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ou=(e,t)=>{for(var n in t||(t={}))S8.call(t,n)&&LM(e,n,t[n]);if(Mv)for(var n of Mv(t))x8.call(t,n)&&LM(e,n,t[n]);return e},sp=(e,t)=>lce(e,cce(t)),uce=(e,t)=>{var n={};for(var r in e)S8.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Mv)for(var r of Mv(e))t.indexOf(r)<0&&x8.call(e,r)&&(n[r]=e[r]);return n};function k8(e){return`calc(${Q({size:e,sizes:kf})} / 2)`}function ap(e){var t=e,{size:n,children:r,path:o}=t,i=uce(t,["size","children","path"]);return O.createElement("svg",Ou({width:n,height:n,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},i),O.createElement("path",{d:o,fill:"currentColor"}))}const dce=e=>O.createElement(ap,sp(Ou({},e),{path:"M8.781 8l-3.3-3.3.943-.943L10.667 8l-4.243 4.243-.943-.943 3.3-3.3z"})),fce=e=>O.createElement(ap,sp(Ou({},e),{path:"M7.219 8l3.3 3.3-.943.943L5.333 8l4.243-4.243.943.943-3.3 3.3z"})),pce=e=>O.createElement(ap,sp(Ou({},e),{path:"M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z"})),hce=e=>O.createElement(ap,sp(Ou({},e),{path:"M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z"})),mce=e=>O.createElement(ap,sp(Ou({},e),{path:"M2 8c0-.733.6-1.333 1.333-1.333.734 0 1.334.6 1.334 1.333s-.6 1.333-1.334 1.333C2.6 9.333 2 8.733 2 8zm9.333 0c0-.733.6-1.333 1.334-1.333C13.4 6.667 14 7.267 14 8s-.6 1.333-1.333 1.333c-.734 0-1.334-.6-1.334-1.333zM6.667 8c0-.733.6-1.333 1.333-1.333s1.333.6 1.333 1.333S8.733 9.333 8 9.333 6.667 8.733 6.667 8z"}));var gce=te((e,t,{size:n})=>({dots:{height:Q({size:n,sizes:kf}),minWidth:Q({size:n,sizes:kf}),display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"}}));const vce=gce;var yce=Object.defineProperty,Tv=Object.getOwnPropertySymbols,P8=Object.prototype.hasOwnProperty,C8=Object.prototype.propertyIsEnumerable,zM=(e,t,n)=>t in e?yce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_ce=(e,t)=>{for(var n in t||(t={}))P8.call(t,n)&&zM(e,n,t[n]);if(Tv)for(var n of Tv(t))C8.call(t,n)&&zM(e,n,t[n]);return e},wce=(e,t)=>{var n={};for(var r in e)P8.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Tv)for(var r of Tv(e))t.indexOf(r)<0&&C8.call(e,r)&&(n[r]=e[r]);return n};const bce={icon:mce},Wk=v.forwardRef((e,t)=>{const n=ue("PaginationDots",bce,e),{className:r,icon:o}=n,i=wce(n,["className","icon"]),s=B0(),{classes:a,cx:c}=vce(null,s.stylesApi);return O.createElement(_e,_ce({ref:t,className:c(a.dots,r)},i),O.createElement(o,{size:k8(s.stylesApi.size)}))});Wk.displayName="@mantine/core/PaginationDots";var Sce=Object.defineProperty,AM=Object.getOwnPropertySymbols,xce=Object.prototype.hasOwnProperty,kce=Object.prototype.propertyIsEnumerable,DM=(e,t,n)=>t in e?Sce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pce=(e,t)=>{for(var n in t||(t={}))xce.call(t,n)&&DM(e,n,t[n]);if(AM)for(var n of AM(t))kce.call(t,n)&&DM(e,n,t[n]);return e};function Uk({dotsIcon:e}){const t=B0(),n=t.range.map((r,o)=>{var i;return r==="dots"?O.createElement(Wk,{icon:e,key:o}):O.createElement(F0,Pce({key:o,active:r===t.active,"aria-current":r===t.active?"page":void 0,onClick:()=>t.onChange(r),disabled:t.disabled},(i=t.getItemProps)==null?void 0:i.call(t,r)),r)});return O.createElement(O.Fragment,null,n)}Uk.displayName="@mantine/core/PaginationItems";var Cce=te(e=>({icon:{transform:e.dir==="rtl"?"rotate(180deg)":"unset"}}));const Oce=Cce;var Ece=Object.defineProperty,Iv=Object.getOwnPropertySymbols,O8=Object.prototype.hasOwnProperty,E8=Object.prototype.propertyIsEnumerable,jM=(e,t,n)=>t in e?Ece(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$ce=(e,t)=>{for(var n in t||(t={}))O8.call(t,n)&&jM(e,n,t[n]);if(Iv)for(var n of Iv(t))E8.call(t,n)&&jM(e,n,t[n]);return e},Mce=(e,t)=>{var n={};for(var r in e)O8.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Iv)for(var r of Iv(e))t.indexOf(r)<0&&E8.call(e,r)&&(n[r]=e[r]);return n};function V0({icon:e,name:t,action:n,type:r}){const o={icon:e},i=v.forwardRef((s,a)=>{const c=ue(t,o,s),{icon:u}=c,f=Mce(c,["icon"]),{classes:p}=Oce(),h=B0(),g=r==="next"?h.active===h.total:h.active===1;return O.createElement(F0,$ce({disabled:h.disabled||g,ref:a,onClick:h[n],withPadding:!1},f),O.createElement(u,{className:p.icon,size:k8(h.stylesApi.size)}))});return i.displayName=`@mantine/core/${t}`,i}const $8=V0({icon:dce,name:"PaginationNext",action:"onNext",type:"next"}),M8=V0({icon:fce,name:"PaginationPrevious",action:"onPrevious",type:"previous"}),T8=V0({icon:pce,name:"PaginationFirst",action:"onFirst",type:"previous"}),I8=V0({icon:hce,name:"PaginationLast",action:"onLast",type:"next"});var Tce=Object.defineProperty,Nv=Object.getOwnPropertySymbols,N8=Object.prototype.hasOwnProperty,R8=Object.prototype.propertyIsEnumerable,BM=(e,t,n)=>t in e?Tce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fd=(e,t)=>{for(var n in t||(t={}))N8.call(t,n)&&BM(e,n,t[n]);if(Nv)for(var n of Nv(t))R8.call(t,n)&&BM(e,n,t[n]);return e},Ice=(e,t)=>{var n={};for(var r in e)N8.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Nv)for(var r of Nv(e))t.indexOf(r)<0&&R8.call(e,r)&&(n[r]=e[r]);return n};const Nce={withControls:!0,siblings:1,boundaries:1};function Gi(e){const t=ue("Pagination",Nce,e),{withEdges:n,withControls:r,classNames:o,styles:i,unstyled:s,variant:a,size:c,total:u,value:f,defaultValue:p,onChange:h,disabled:g,siblings:y,boundaries:_,color:k,radius:b,onNextPage:S,onPreviousPage:P,onFirstPage:E,onLastPage:$,getItemProps:I,getControlProps:N,spacing:R,nextIcon:F,previousIcon:B,lastIcon:D,firstIcon:K,dotsIcon:W}=t,V=Ice(t,["withEdges","withControls","classNames","styles","unstyled","variant","size","total","value","defaultValue","onChange","disabled","siblings","boundaries","color","radius","onNextPage","onPreviousPage","onFirstPage","onLastPage","getItemProps","getControlProps","spacing","nextIcon","previousIcon","lastIcon","firstIcon","dotsIcon"]),U=Sr();return u<=0?null:O.createElement(_8,{classNames:o,styles:i,unstyled:s,variant:a,size:c,total:u,value:f,defaultValue:p,onChange:h,disabled:g,siblings:y,boundaries:_,color:k,radius:b,onNextPage:S,onPreviousPage:P,onFirstPage:E,onLastPage:$,getItemProps:I},O.createElement(de,fd({spacing:R??`calc(${Q({size:c,sizes:U.spacing})} / 2)`},V),n&&O.createElement(T8,fd({icon:K},N?.("first"))),r&&O.createElement(M8,fd({icon:B},N?.("previous"))),O.createElement(Uk,{dotsIcon:W}),r&&O.createElement($8,fd({icon:F},N?.("next"))),n&&O.createElement(I8,fd({icon:D},N?.("last")))))}Gi.displayName="@mantine/core/Pagination";Gi.Root=_8;Gi.Items=Uk;Gi.Control=F0;Gi.Dots=Wk;Gi.Next=$8;Gi.Previous=M8;Gi.Last=I8;Gi.First=T8;const L8=v.createContext(!1),Rce=L8.Provider,Lce=()=>v.useContext(L8);function z8({children:e,openDelay:t=0,closeDelay:n=0}){return O.createElement(Rce,{value:!0},O.createElement($X,{delay:{open:t,close:n}},e))}z8.displayName="@mantine/core/TooltipGroup";var zce=Object.defineProperty,Ace=Object.defineProperties,Dce=Object.getOwnPropertyDescriptors,FM=Object.getOwnPropertySymbols,jce=Object.prototype.hasOwnProperty,Bce=Object.prototype.propertyIsEnumerable,VM=(e,t,n)=>t in e?zce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,HM=(e,t)=>{for(var n in t||(t={}))jce.call(t,n)&&VM(e,n,t[n]);if(FM)for(var n of FM(t))Bce.call(t,n)&&VM(e,n,t[n]);return e},Fce=(e,t)=>Ace(e,Dce(t));function Vce(e,t){if(!t)return{backgroundColor:e.colorScheme==="dark"?e.colors.gray[2]:e.colors.gray[9],color:e.colorScheme==="dark"?e.black:e.white};const n=e.fn.variant({variant:"filled",color:t,primaryFallback:!1});return{backgroundColor:n.background,color:n.color}}var Hce=te((e,{color:t,radius:n,width:r,multiline:o})=>({tooltip:Fce(HM(HM({},e.fn.fontStyles()),Vce(e,t)),{lineHeight:e.lineHeight,fontSize:e.fontSizes.sm,borderRadius:e.fn.radius(n),padding:`calc(${e.spacing.xs} / 2) ${e.spacing.xs}`,position:"absolute",whiteSpace:o?"unset":"nowrap",pointerEvents:"none",width:r}),arrow:{backgroundColor:"inherit",border:0,zIndex:1}}));const A8=Hce,D8={children:"Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported"};function Wce({offset:e,position:t}){const[n,r]=v.useState(!1),o=v.useRef(),{x:i,y:s,reference:a,floating:c,refs:u,update:f,placement:p}=Mk({placement:t,middleware:[Ck({crossAxis:!0,padding:5,rootBoundary:"document"})]}),h=p.includes("right")?e:t.includes("left")?e*-1:0,g=p.includes("bottom")?e:t.includes("top")?e*-1:0,y=v.useCallback(({clientX:_,clientY:k})=>{a({getBoundingClientRect(){return{width:0,height:0,x:_,y:k,left:_+h,top:k+g,right:_,bottom:k}}})},[a]);return v.useEffect(()=>{if(u.floating.current){const _=o.current;_.addEventListener("mousemove",y);const k=fs(u.floating.current);return k.forEach(b=>{b.addEventListener("scroll",f)}),()=>{_.removeEventListener("mousemove",y),k.forEach(b=>{b.removeEventListener("scroll",f)})}}},[a,u.floating.current,f,y,n]),{handleMouseMove:y,x:i,y:s,opened:n,setOpened:r,boundaryRef:o,floating:c}}var Uce=Object.defineProperty,Zce=Object.defineProperties,Kce=Object.getOwnPropertyDescriptors,Rv=Object.getOwnPropertySymbols,j8=Object.prototype.hasOwnProperty,B8=Object.prototype.propertyIsEnumerable,WM=(e,t,n)=>t in e?Uce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kh=(e,t)=>{for(var n in t||(t={}))j8.call(t,n)&&WM(e,n,t[n]);if(Rv)for(var n of Rv(t))B8.call(t,n)&&WM(e,n,t[n]);return e},Ph=(e,t)=>Zce(e,Kce(t)),Gce=(e,t)=>{var n={};for(var r in e)j8.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Rv)for(var r of Rv(e))t.indexOf(r)<0&&B8.call(e,r)&&(n[r]=e[r]);return n};const qce={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:Ki("popover")};function F8(e){var t;const n=ue("TooltipFloating",qce,e),{children:r,refProp:o,withinPortal:i,portalProps:s,style:a,className:c,classNames:u,styles:f,unstyled:p,radius:h,color:g,label:y,offset:_,position:k,multiline:b,width:S,zIndex:P,disabled:E,variant:$}=n,I=Gce(n,["children","refProp","withinPortal","portalProps","style","className","classNames","styles","unstyled","radius","color","label","offset","position","multiline","width","zIndex","disabled","variant"]),{handleMouseMove:N,x:R,y:F,opened:B,boundaryRef:D,floating:K,setOpened:W}=Wce({offset:_,position:k}),{classes:V,cx:U}=A8({radius:h,color:g,multiline:b,width:S},{name:"TooltipFloating",classNames:u,styles:f,unstyled:p,variant:$});if(!Uf(r))throw new Error(D8.children);const J=di(D,r.ref),G=q=>{var H,ee;(ee=(H=r.props).onMouseEnter)==null||ee.call(H,q),N(q),W(!0)},A=q=>{var H,ee;(ee=(H=r.props).onMouseLeave)==null||ee.call(H,q),W(!1)};return O.createElement(O.Fragment,null,O.createElement(ep,Ph(kh({},s),{withinPortal:i}),O.createElement(_e,Ph(kh({},I),{ref:K,className:U(V.tooltip,c),style:Ph(kh({},a),{zIndex:P,display:!E&&B?"block":"none",top:F??"",left:(t=Math.round(R))!=null?t:""})}),y)),v.cloneElement(r,Ph(kh({},r.props),{[o]:J,onMouseEnter:G,onMouseLeave:A})))}F8.displayName="@mantine/core/TooltipFloating";function Yce(e){const[t,n]=v.useState(!1),o=typeof e.opened=="boolean"?e.opened:t,i=Lce(),s=Ia(),{delay:a,currentId:c,setCurrentId:u}=gA(),f=v.useCallback(R=>{n(R),R&&u(s)},[u,s]),{x:p,y:h,reference:g,floating:y,context:_,refs:k,update:b,placement:S,middlewareData:{arrow:{x:P,y:E}={}}}=Mk({placement:e.position,open:o,onOpenChange:f,middleware:[nA(e.offset),Ck({padding:8}),eA(),dA({element:e.arrowRef,padding:e.arrowOffset}),...e.inline?[tA()]:[]]}),{getReferenceProps:$,getFloatingProps:I}=FX([EX(_,{enabled:e.events.hover,delay:i?a:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events.touch}),jX(_,{enabled:e.events.focus,keyboardOnly:!0}),BX(_,{role:"tooltip"}),DX(_,{enabled:typeof e.opened===void 0}),MX(_,{id:s})]);return yA({opened:o,position:e.position,positionDependencies:e.positionDependencies,floating:{refs:k,update:b}}),An(()=>{var R;(R=e.onPositionChange)==null||R.call(e,S)},[S]),{x:p,y:h,arrowX:P,arrowY:E,reference:g,floating:y,getFloatingProps:I,getReferenceProps:$,isGroupPhase:o&&c&&c!==s,opened:o,placement:S}}var Jce=Object.defineProperty,Xce=Object.defineProperties,Qce=Object.getOwnPropertyDescriptors,Lv=Object.getOwnPropertySymbols,V8=Object.prototype.hasOwnProperty,H8=Object.prototype.propertyIsEnumerable,UM=(e,t,n)=>t in e?Jce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xa=(e,t)=>{for(var n in t||(t={}))V8.call(t,n)&&UM(e,n,t[n]);if(Lv)for(var n of Lv(t))H8.call(t,n)&&UM(e,n,t[n]);return e},H_=(e,t)=>Xce(e,Qce(t)),eue=(e,t)=>{var n={};for(var r in e)V8.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Lv)for(var r of Lv(e))t.indexOf(r)<0&&H8.call(e,r)&&(n[r]=e[r]);return n};const tue={position:"top",refProp:"ref",withinPortal:!1,inline:!1,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},width:"auto",events:{hover:!0,focus:!1,touch:!1},zIndex:Ki("popover"),positionDependencies:[]},H0=v.forwardRef((e,t)=>{var n;const r=v.useRef(null),o=ue("Tooltip",tue,e),{children:i,position:s,refProp:a,label:c,openDelay:u,closeDelay:f,onPositionChange:p,opened:h,withinPortal:g,portalProps:y,radius:_,color:k,classNames:b,styles:S,unstyled:P,style:E,className:$,withArrow:I,arrowSize:N,arrowOffset:R,arrowRadius:F,arrowPosition:B,offset:D,transitionProps:K,multiline:W,width:V,events:U,zIndex:J,disabled:G,positionDependencies:A,onClick:q,onMouseEnter:H,onMouseLeave:ee,inline:re,variant:he,keepMounted:Pe}=o,X=eue(o,["children","position","refProp","label","openDelay","closeDelay","onPositionChange","opened","withinPortal","portalProps","radius","color","classNames","styles","unstyled","style","className","withArrow","arrowSize","arrowOffset","arrowRadius","arrowPosition","offset","transitionProps","multiline","width","events","zIndex","disabled","positionDependencies","onClick","onMouseEnter","onMouseLeave","inline","variant","keepMounted"]),{classes:ne,cx:fe,theme:Oe}=A8({radius:_,color:k,width:V,multiline:W},{name:"Tooltip",classNames:b,styles:S,unstyled:P,variant:he}),Me=Yce({position:$A(Oe.dir,s),closeDelay:f,openDelay:u,onPositionChange:p,opened:h,events:U,arrowRef:r,arrowOffset:R,offset:D+(I?N/2:0),positionDependencies:[...A,i],inline:re});if(!Uf(i))throw new Error(D8.children);const Te=di(Me.reference,i.ref,t);return O.createElement(O.Fragment,null,O.createElement(ep,H_(Xa({},y),{withinPortal:g}),O.createElement(xs,H_(Xa({keepMounted:Pe,mounted:!G&&Me.opened},K),{transition:K.transition||"fade",duration:Me.isGroupPhase?10:(n=K.duration)!=null?n:100}),ut=>{var Fe,St;return O.createElement(_e,Xa(Xa({},X),Me.getFloatingProps({ref:Me.floating,className:ne.tooltip,style:H_(Xa(Xa({},E),ut),{zIndex:J,top:(Fe=Me.y)!=null?Fe:0,left:(St=Me.x)!=null?St:0})})),c,O.createElement(Ik,{ref:r,arrowX:Me.arrowX,arrowY:Me.arrowY,visible:I,position:Me.placement,arrowSize:N,arrowOffset:R,arrowRadius:F,arrowPosition:B,className:ne.arrow}))})),v.cloneElement(i,Me.getReferenceProps(Xa({onClick:q,onMouseEnter:H,onMouseLeave:ee,onMouseMove:e.onMouseMove,onPointerDown:e.onPointerDown,onPointerEnter:e.onPointerEnter,[a]:Te,className:fe($,i.props.className)},i.props))))});H0.Group=z8;H0.Floating=F8;H0.displayName="@mantine/core/Tooltip";const tn=H0;function nue({data:e,searchable:t,limit:n,searchValue:r,filter:o,value:i,filterDataOnExactSearchMatch:s}){if(!t)return e;const a=i!=null&&e.find(u=>u.value===i)||null;if(a&&!s&&a?.label===r){if(n){if(n>=e.length)return e;const u=e.indexOf(a),f=u+n,p=f-e.length;return p>0?e.slice(u-p):e.slice(u,f)}return e}const c=[];for(let u=0;u=n));u+=1);return c}var rue=te(()=>({input:{"&:not(:disabled)":{cursor:"pointer","&::selection":{backgroundColor:"transparent"}}}}));const oue=rue;var iue=Object.defineProperty,sue=Object.defineProperties,aue=Object.getOwnPropertyDescriptors,zv=Object.getOwnPropertySymbols,W8=Object.prototype.hasOwnProperty,U8=Object.prototype.propertyIsEnumerable,ZM=(e,t,n)=>t in e?iue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pd=(e,t)=>{for(var n in t||(t={}))W8.call(t,n)&&ZM(e,n,t[n]);if(zv)for(var n of zv(t))U8.call(t,n)&&ZM(e,n,t[n]);return e},W_=(e,t)=>sue(e,aue(t)),lue=(e,t)=>{var n={};for(var r in e)W8.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&zv)for(var r of zv(e))t.indexOf(r)<0&&U8.call(e,r)&&(n[r]=e[r]);return n};function cue(e,t){return t.label.toLowerCase().trim().includes(e.toLowerCase().trim())}function uue(e,t){return!!e&&!t.some(n=>n.label.toLowerCase()===e.toLowerCase())}const due={required:!1,size:"sm",shadow:"sm",itemComponent:bk,transitionProps:{transition:"fade",duration:0},initiallyOpened:!1,filter:cue,maxDropdownHeight:220,searchable:!1,clearable:!1,limit:1/0,disabled:!1,creatable:!1,shouldCreate:uue,selectOnBlur:!1,switchDirectionOnFlip:!1,filterDataOnExactSearchMatch:!1,zIndex:Ki("popover"),positionDependencies:[],dropdownPosition:"flip"},Ea=v.forwardRef((e,t)=>{const n=RA("Select",due,e),{inputProps:r,wrapperProps:o,shadow:i,data:s,value:a,defaultValue:c,onChange:u,itemComponent:f,onKeyDown:p,onBlur:h,onFocus:g,transitionProps:y,initiallyOpened:_,unstyled:k,classNames:b,styles:S,filter:P,maxDropdownHeight:E,searchable:$,clearable:I,nothingFound:N,limit:R,disabled:F,onSearchChange:B,searchValue:D,rightSection:K,rightSectionWidth:W,creatable:V,getCreateLabel:U,shouldCreate:J,selectOnBlur:G,onCreate:A,dropdownComponent:q,onDropdownClose:H,onDropdownOpen:ee,withinPortal:re,portalProps:he,switchDirectionOnFlip:Pe,zIndex:X,name:ne,dropdownPosition:fe,allowDeselect:Oe,placeholder:Me,filterDataOnExactSearchMatch:Te,form:ut,positionDependencies:Fe,readOnly:St,clearButtonProps:ft,hoverOnSearchChange:Vt}=n,rn=lue(n,["inputProps","wrapperProps","shadow","data","value","defaultValue","onChange","itemComponent","onKeyDown","onBlur","onFocus","transitionProps","initiallyOpened","unstyled","classNames","styles","filter","maxDropdownHeight","searchable","clearable","nothingFound","limit","disabled","onSearchChange","searchValue","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","selectOnBlur","onCreate","dropdownComponent","onDropdownClose","onDropdownOpen","withinPortal","portalProps","switchDirectionOnFlip","zIndex","name","dropdownPosition","allowDeselect","placeholder","filterDataOnExactSearchMatch","form","positionDependencies","readOnly","clearButtonProps","hoverOnSearchChange"]),{classes:pt,cx:wn,theme:Un}=oue(),[Ze,mn]=v.useState(_),[Rt,st]=v.useState(-1),xr=v.useRef(),kr=v.useRef({}),[Tn,on]=v.useState("column"),Ht=Tn==="column",{scrollIntoView:sn,targetRef:an,scrollableRef:ln}=FR({duration:0,offset:5,cancelable:!1,isList:!0}),Po=Oe===void 0?I:Oe,Ve=be=>{if(Ze!==be){mn(be);const Qe=be?ee:H;typeof Qe=="function"&&Qe()}},ge=V&&typeof U=="function";let $e=null;const Xt=s.map(be=>typeof be=="string"?{label:be,value:be}:be),Wt=sR({data:Xt}),[Ut,In,Fr]=si({value:a,defaultValue:c,finalValue:null,onChange:u}),tt=Wt.find(be=>be.value===Ut),[at,wt]=si({value:D,defaultValue:tt?.label||"",finalValue:void 0,onChange:B}),nt=be=>{wt(be),$&&typeof B=="function"&&B(be)},Xe=()=>{var be;St||(In(null),Fr||nt(""),(be=xr.current)==null||be.focus())};v.useEffect(()=>{const be=Wt.find(Qe=>Qe.value===Ut);be?nt(be.label):(!ge||!Ut)&&nt("")},[Ut]),v.useEffect(()=>{tt&&(!$||!Ze)&&nt(tt.label)},[tt?.label]);const mt=be=>{if(!St)if(Po&&tt?.value===be.value)In(null),Ve(!1);else{if(be.creatable&&typeof A=="function"){const Qe=A(be.value);typeof Qe<"u"&&Qe!==null&&In(typeof Qe=="string"?Qe:Qe.value)}else In(be.value);Fr||nt(be.label),st(-1),Ve(!1),xr.current.focus()}},Ne=nue({data:Wt,searchable:$,limit:R,searchValue:at,filter:P,filterDataOnExactSearchMatch:Te,value:Ut});ge&&J(at,Ne)&&($e=U(at),Ne.push({label:at,value:at,creatable:!0}));const Zn=(be,Qe,Ae)=>{let dt=be;for(;Ae(dt);)if(dt=Qe(dt),!Ne[dt].disabled)return dt;return be};An(()=>{st(Vt&&at?0:-1)},[at,Vt]);const xt=Ut?Ne.findIndex(be=>be.value===Ut):0,lt=!St&&(Ne.length>0?Ze:Ze&&!!N),Zt=()=>{st(be=>{var Qe;const Ae=Zn(be,dt=>dt-1,dt=>dt>0);return an.current=kr.current[(Qe=Ne[Ae])==null?void 0:Qe.value],lt&&sn({alignment:Ht?"start":"end"}),Ae})},Nn=()=>{st(be=>{var Qe;const Ae=Zn(be,dt=>dt+1,dt=>dtwindow.setTimeout(()=>{var be;an.current=kr.current[(be=Ne[xt])==null?void 0:be.value],sn({alignment:Ht?"end":"start"})},0);An(()=>{lt&&cr()},[lt]);const Dt=be=>{switch(typeof p=="function"&&p(be),be.key){case"ArrowUp":{be.preventDefault(),Ze?Ht?Zt():Nn():(st(xt),Ve(!0),cr());break}case"ArrowDown":{be.preventDefault(),Ze?Ht?Nn():Zt():(st(xt),Ve(!0),cr());break}case"Home":{if(!$){be.preventDefault(),Ze||Ve(!0);const Qe=Ne.findIndex(Ae=>!Ae.disabled);st(Qe),lt&&sn({alignment:Ht?"end":"start"})}break}case"End":{if(!$){be.preventDefault(),Ze||Ve(!0);const Qe=Ne.map(Ae=>!!Ae.disabled).lastIndexOf(!1);st(Qe),lt&&sn({alignment:Ht?"end":"start"})}break}case"Escape":{be.preventDefault(),Ve(!1),st(-1);break}case" ":{$||(be.preventDefault(),Ne[Rt]&&Ze?mt(Ne[Rt]):(Ve(!0),st(xt),cr()));break}case"Enter":$||be.preventDefault(),Ne[Rt]&&Ze&&(be.preventDefault(),mt(Ne[Rt]))}},ve=be=>{typeof h=="function"&&h(be);const Qe=Wt.find(Ae=>Ae.value===Ut);G&&Ne[Rt]&&Ze&&mt(Ne[Rt]),nt(Qe?.label||""),Ve(!1)},Kn=be=>{typeof g=="function"&&g(be),$&&Ve(!0)},Vr=be=>{St||(nt(be.currentTarget.value),I&&be.currentTarget.value===""&&In(null),st(-1),Ve(!0))},Hr=()=>{St||(Ve(!Ze),Ut&&!Ze&&st(xt))};return O.createElement(ys.Wrapper,W_(pd({},o),{__staticSelector:"Select"}),O.createElement(ga,{opened:lt,transitionProps:y,shadow:i,withinPortal:re,portalProps:he,__staticSelector:"Select",onDirectionChange:on,switchDirectionOnFlip:Pe,zIndex:X,dropdownPosition:fe,positionDependencies:[...Fe,at],classNames:b,styles:S,unstyled:k,variant:r.variant},O.createElement(ga.Target,null,O.createElement("div",{role:"combobox","aria-haspopup":"listbox","aria-owns":lt?`${r.id}-items`:null,"aria-controls":r.id,"aria-expanded":lt,onMouseLeave:()=>st(-1),tabIndex:-1},O.createElement("input",{type:"hidden",name:ne,value:Ut||"",form:ut,disabled:F}),O.createElement(ys,pd(W_(pd(pd({autoComplete:"off",type:"search"},r),rn),{ref:di(t,xr),onKeyDown:Dt,__staticSelector:"Select",value:at,placeholder:Me,onChange:Vr,"aria-autocomplete":"list","aria-controls":lt?`${r.id}-items`:null,"aria-activedescendant":Rt>=0?`${r.id}-${Rt}`:null,onMouseDown:Hr,onBlur:ve,onFocus:Kn,readOnly:!$||St,disabled:F,"data-mantine-stop-propagation":lt,name:null,classNames:W_(pd({},b),{input:wn({[pt.input]:!$},b?.input)})}),u8({theme:Un,rightSection:K,rightSectionWidth:W,styles:S,size:r.size,shouldClear:I&&!!tt,onClear:Xe,error:o.error,clearButtonProps:ft,disabled:F,readOnly:St}))))),O.createElement(ga.Dropdown,{component:q||z0,maxHeight:E,direction:Tn,id:r.id,innerRef:ln,__staticSelector:"Select",classNames:b,styles:S},O.createElement(wk,{data:Ne,hovered:Rt,classNames:b,styles:S,isItemSelected:be=>be===Ut,uuid:r.id,__staticSelector:"Select",onItemHover:st,onItemSelect:mt,itemsRefs:kr,itemComponent:f,size:r.size,nothingFound:N,creatable:ge&&!!$e,createLabel:$e,"aria-label":o.label,unstyled:k,variant:r.variant}))))});Ea.displayName="@mantine/core/Select";function fue(e,t){if(t.length===0)return t;const n="maxWidth"in t[0]?"maxWidth":"minWidth",r=[...t].sort((o,i)=>Hi(Q({size:i[n],sizes:e.breakpoints}))-Hi(Q({size:o[n],sizes:e.breakpoints})));return n==="minWidth"?r.reverse():r}var pue=Object.defineProperty,KM=Object.getOwnPropertySymbols,hue=Object.prototype.hasOwnProperty,mue=Object.prototype.propertyIsEnumerable,GM=(e,t,n)=>t in e?pue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gue=(e,t)=>{for(var n in t||(t={}))hue.call(t,n)&&GM(e,n,t[n]);if(KM)for(var n of KM(t))mue.call(t,n)&&GM(e,n,t[n]);return e},vue=te((e,{spacing:t,breakpoints:n,cols:r,verticalSpacing:o})=>{const i=o!=null,s=fue(e,n).reduce((a,c)=>{var u,f;const p="maxWidth"in c?"max-width":"min-width",h=Q({size:p==="max-width"?c.maxWidth:c.minWidth,sizes:e.breakpoints,units:"em"}),g=Hi(h)-(p==="max-width"?1:0);return a[`@media (${p}: ${ka(g)})`]={gridTemplateColumns:`repeat(${c.cols}, minmax(0, 1fr))`,gap:`${Q({size:(u=c.verticalSpacing)!=null?u:i?o:t,sizes:e.spacing})} ${Q({size:(f=c.spacing)!=null?f:t,sizes:e.spacing})}`},a},{});return{root:gue({boxSizing:"border-box",display:"grid",gridTemplateColumns:`repeat(${r}, minmax(0, 1fr))`,gap:`${Q({size:i?o:t,sizes:e.spacing})} ${Q({size:t,sizes:e.spacing})}`},s)}});const yue=vue;var _ue=Object.defineProperty,Av=Object.getOwnPropertySymbols,Z8=Object.prototype.hasOwnProperty,K8=Object.prototype.propertyIsEnumerable,qM=(e,t,n)=>t in e?_ue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wue=(e,t)=>{for(var n in t||(t={}))Z8.call(t,n)&&qM(e,n,t[n]);if(Av)for(var n of Av(t))K8.call(t,n)&&qM(e,n,t[n]);return e},bue=(e,t)=>{var n={};for(var r in e)Z8.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Av)for(var r of Av(e))t.indexOf(r)<0&&K8.call(e,r)&&(n[r]=e[r]);return n};const Sue={breakpoints:[],cols:1,spacing:"md"},G8=v.forwardRef((e,t)=>{const n=ue("SimpleGrid",Sue,e),{className:r,breakpoints:o,cols:i,spacing:s,verticalSpacing:a,children:c,unstyled:u,variant:f}=n,p=bue(n,["className","breakpoints","cols","spacing","verticalSpacing","children","unstyled","variant"]),{classes:h,cx:g}=yue({breakpoints:o,cols:i,spacing:s,verticalSpacing:a},{name:"SimpleGrid",unstyled:u,variant:f});return O.createElement(_e,wue({className:g(h.root,r),ref:t},p),c)});G8.displayName="@mantine/core/SimpleGrid";var xue=Object.defineProperty,Dv=Object.getOwnPropertySymbols,q8=Object.prototype.hasOwnProperty,Y8=Object.prototype.propertyIsEnumerable,YM=(e,t,n)=>t in e?xue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kue=(e,t)=>{for(var n in t||(t={}))q8.call(t,n)&&YM(e,n,t[n]);if(Dv)for(var n of Dv(t))Y8.call(t,n)&&YM(e,n,t[n]);return e},Pue=(e,t)=>{var n={};for(var r in e)q8.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Dv)for(var r of Dv(e))t.indexOf(r)<0&&Y8.call(e,r)&&(n[r]=e[r]);return n};const Cue={w:0,h:0},J8=v.forwardRef((e,t)=>{const n=ue("Space",Cue,e),{w:r,h:o}=n,i=Pue(n,["w","h"]);return O.createElement(_e,kue({ref:t,w:r,miw:r,h:o,mih:o},i))});J8.displayName="@mantine/core/Space";var Oue=te((e,{spacing:t,align:n,justify:r})=>({root:{display:"flex",flexDirection:"column",alignItems:n,justifyContent:r,gap:Q({size:t,sizes:e.spacing})}}));const Eue=Oue;var $ue=Object.defineProperty,jv=Object.getOwnPropertySymbols,X8=Object.prototype.hasOwnProperty,Q8=Object.prototype.propertyIsEnumerable,JM=(e,t,n)=>t in e?$ue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mue=(e,t)=>{for(var n in t||(t={}))X8.call(t,n)&&JM(e,n,t[n]);if(jv)for(var n of jv(t))Q8.call(t,n)&&JM(e,n,t[n]);return e},Tue=(e,t)=>{var n={};for(var r in e)X8.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&jv)for(var r of jv(e))t.indexOf(r)<0&&Q8.call(e,r)&&(n[r]=e[r]);return n};const Iue={spacing:"md",align:"stretch",justify:"flex-start"},Dl=v.forwardRef((e,t)=>{const n=ue("Stack",Iue,e),{spacing:r,className:o,align:i,justify:s,unstyled:a,variant:c}=n,u=Tue(n,["spacing","className","align","justify","unstyled","variant"]),{classes:f,cx:p}=Eue({spacing:r,align:i,justify:s},{name:"Stack",unstyled:a,variant:c});return O.createElement(_e,Mue({className:p(f.root,o),ref:t},u))});Dl.displayName="@mantine/core/Stack";var Nue=Object.defineProperty,Rue=Object.defineProperties,Lue=Object.getOwnPropertyDescriptors,XM=Object.getOwnPropertySymbols,zue=Object.prototype.hasOwnProperty,Aue=Object.prototype.propertyIsEnumerable,QM=(e,t,n)=>t in e?Nue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Due=(e,t)=>{for(var n in t||(t={}))zue.call(t,n)&&QM(e,n,t[n]);if(XM)for(var n of XM(t))Aue.call(t,n)&&QM(e,n,t[n]);return e},jue=(e,t)=>Rue(e,Lue(t)),Bue=te((e,{captionSide:t,horizontalSpacing:n,verticalSpacing:r,fontSize:o,withBorder:i,withColumnBorders:s})=>{const a=`${T(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`;return{root:jue(Due({},e.fn.fontStyles()),{width:"100%",borderCollapse:"collapse",captionSide:t,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,border:i?a:void 0,"& caption":{marginTop:t==="top"?0:e.spacing.xs,marginBottom:t==="bottom"?0:e.spacing.xs,fontSize:e.fontSizes.sm,color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]},"& thead tr th, & tfoot tr th, & tbody tr th":{textAlign:"left",fontWeight:"bold",color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],fontSize:Q({size:o,sizes:e.fontSizes}),padding:`${Q({size:r,sizes:e.spacing})} ${Q({size:n,sizes:e.spacing})}`},"& thead tr th":{borderBottom:a},"& tfoot tr th, & tbody tr th":{borderTop:a},"& tbody tr td":{padding:`${Q({size:r,sizes:e.spacing})} ${Q({size:n,sizes:e.spacing})}`,borderTop:a,fontSize:Q({size:o,sizes:e.fontSizes})},"& tbody tr:first-of-type td, & tbody tr:first-of-type th":{borderTop:"none"},"& thead th, & tbody td":{borderRight:s?a:"none","&:last-of-type":{borderRight:"none",borderLeft:s?a:"none"}},"& tbody tr th":{borderRight:s?a:"none"},"&[data-striped] tbody tr:nth-of-type(odd)":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]},"&[data-hover] tbody tr":e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]})})}});const Fue=Bue;var Vue=Object.defineProperty,Hue=Object.defineProperties,Wue=Object.getOwnPropertyDescriptors,Bv=Object.getOwnPropertySymbols,e7=Object.prototype.hasOwnProperty,t7=Object.prototype.propertyIsEnumerable,eT=(e,t,n)=>t in e?Vue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Uue=(e,t)=>{for(var n in t||(t={}))e7.call(t,n)&&eT(e,n,t[n]);if(Bv)for(var n of Bv(t))t7.call(t,n)&&eT(e,n,t[n]);return e},Zue=(e,t)=>Hue(e,Wue(t)),Kue=(e,t)=>{var n={};for(var r in e)e7.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Bv)for(var r of Bv(e))t.indexOf(r)<0&&t7.call(e,r)&&(n[r]=e[r]);return n};const Gue={striped:!1,highlightOnHover:!1,captionSide:"top",horizontalSpacing:"xs",fontSize:"sm",verticalSpacing:7,withBorder:!1,withColumnBorders:!1},Zk=v.forwardRef((e,t)=>{const n=ue("Table",Gue,e),{className:r,children:o,striped:i,highlightOnHover:s,captionSide:a,horizontalSpacing:c,verticalSpacing:u,fontSize:f,unstyled:p,withBorder:h,withColumnBorders:g,variant:y}=n,_=Kue(n,["className","children","striped","highlightOnHover","captionSide","horizontalSpacing","verticalSpacing","fontSize","unstyled","withBorder","withColumnBorders","variant"]),{classes:k,cx:b}=Fue({captionSide:a,verticalSpacing:u,horizontalSpacing:c,fontSize:f,withBorder:h,withColumnBorders:g},{unstyled:p,name:"Table",variant:y});return O.createElement(_e,Zue(Uue({},_),{component:"table",ref:t,className:b(k.root,r),"data-striped":i||void 0,"data-hover":s||void 0}),o)});Zk.displayName="@mantine/core/Table";var que=Object.defineProperty,Yue=Object.defineProperties,Jue=Object.getOwnPropertyDescriptors,tT=Object.getOwnPropertySymbols,Xue=Object.prototype.hasOwnProperty,Que=Object.prototype.propertyIsEnumerable,nT=(e,t,n)=>t in e?que(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ede=(e,t)=>{for(var n in t||(t={}))Xue.call(t,n)&&nT(e,n,t[n]);if(tT)for(var n of tT(t))Que.call(t,n)&&nT(e,n,t[n]);return e},tde=(e,t)=>Yue(e,Jue(t));function nde(e,t,n){return typeof e<"u"?e in n.headings.sizes?n.headings.sizes[e].fontSize:T(e):n.headings.sizes[t].fontSize}function rde(e,t,n){return typeof e<"u"&&e in n.headings.sizes?n.headings.sizes[e].lineHeight:n.headings.sizes[t].lineHeight}var ode=te((e,{element:t,weight:n,inline:r},{size:o})=>({root:tde(ede({},e.fn.fontStyles()),{fontFamily:e.headings.fontFamily,fontWeight:n||e.headings.sizes[t].fontWeight||e.headings.fontWeight,fontSize:nde(o,t,e),lineHeight:r?1:rde(o,t,e),margin:0})}));const ide=ode;var sde=Object.defineProperty,Fv=Object.getOwnPropertySymbols,n7=Object.prototype.hasOwnProperty,r7=Object.prototype.propertyIsEnumerable,rT=(e,t,n)=>t in e?sde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ade=(e,t)=>{for(var n in t||(t={}))n7.call(t,n)&&rT(e,n,t[n]);if(Fv)for(var n of Fv(t))r7.call(t,n)&&rT(e,n,t[n]);return e},lde=(e,t)=>{var n={};for(var r in e)n7.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Fv)for(var r of Fv(e))t.indexOf(r)<0&&r7.call(e,r)&&(n[r]=e[r]);return n};const cde={order:1},va=v.forwardRef((e,t)=>{const n=ue("Title",cde,e),{className:r,order:o,children:i,unstyled:s,size:a,weight:c,inline:u,variant:f}=n,p=lde(n,["className","order","children","unstyled","size","weight","inline","variant"]),{classes:h,cx:g}=ide({element:`h${o}`,weight:c,inline:u},{name:"Title",unstyled:s,variant:f,size:a});return[1,2,3,4,5,6].includes(o)?O.createElement(ie,ade({variant:f,component:`h${o}`,ref:t,className:g(h.root,r)},p),i):null});va.displayName="@mantine/core/Title";var ude=Object.defineProperty,dde=Object.defineProperties,fde=Object.getOwnPropertyDescriptors,oT=Object.getOwnPropertySymbols,pde=Object.prototype.hasOwnProperty,hde=Object.prototype.propertyIsEnumerable,iT=(e,t,n)=>t in e?ude(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ch=(e,t)=>{for(var n in t||(t={}))pde.call(t,n)&&iT(e,n,t[n]);if(oT)for(var n of oT(t))hde.call(t,n)&&iT(e,n,t[n]);return e},Oh=(e,t)=>dde(e,fde(t)),mde=te(e=>{const t=$H(e.headings.sizes).reduce((n,r)=>{const o=e.headings.sizes[r];return n[`& ${r}`]=Oh(Ch({fontFamily:e.headings.fontFamily,fontWeight:o.fontWeight||e.headings.fontWeight,marginTop:typeof o.lineHeight=="number"?`calc(${e.spacing.xl} * ${o.lineHeight})`:e.spacing.xl,marginBottom:e.spacing.sm},o),{[e.fn.smallerThan("sm")]:{fontSize:`calc(${T(o.fontSize)} / 1.3)`}}),n},{});return{root:Oh(Ch(Oh(Ch({},e.fn.fontStyles()),{color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,fontSize:e.fontSizes.md,[e.fn.smallerThan("sm")]:{fontSize:e.fontSizes.sm}}),t),{"& img":{maxWidth:"100%",marginBottom:e.spacing.xs},"& p":{marginTop:0,marginBottom:e.spacing.lg},"& mark":{backgroundColor:e.fn.themeColor("yellow",e.colorScheme==="dark"?5:2),color:e.colorScheme==="dark"?e.colors.dark[9]:"inherit"},"& hr":{marginTop:e.spacing.md,marginBottom:e.spacing.sm,borderBottom:0,borderLeft:0,borderRight:0,borderTop:`${T(1)} dashed ${e.colors.gray[e.colorScheme==="dark"?4:6]}`},"& a":Oh(Ch({},e.fn.focusStyles()),{color:e.colors[e.primaryColor][e.colorScheme==="dark"?4:6],textDecoration:"none","&:hover":{textDecoration:"underline"}}),"& pre":{padding:e.spacing.xs,lineHeight:e.lineHeight,margin:0,marginTop:e.spacing.md,marginBottom:e.spacing.md,overflowX:"auto",fontFamily:e.fontFamilyMonospace,fontSize:e.fontSizes.sm,borderRadius:e.radius.sm,backgroundColor:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0],"& code":{backgroundColor:"transparent",padding:0,borderRadius:0,color:"inherit",border:0}},"& code":{lineHeight:e.lineHeight,padding:`${T(1)} ${T(5)}`,borderRadius:e.radius.sm,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,backgroundColor:e.colorScheme==="dark"?e.colors.dark[9]:e.colors.gray[0],fontFamily:e.fontFamilyMonospace,fontSize:e.fontSizes.xs,border:`${T(1)} solid ${e.colorScheme==="dark"?e.colors.dark[9]:e.colors.gray[3]}`},"& ul, & ol":{marginBottom:e.spacing.md,paddingLeft:38,"& li":{marginTop:e.spacing.xs}},"& table":{width:"100%",borderCollapse:"collapse",captionSide:"bottom",marginBottom:e.spacing.md,"& caption":{marginTop:e.spacing.xs,fontSize:e.fontSizes.sm,color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]},"& th":{textAlign:"left",fontWeight:"bold",color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],fontSize:14,padding:`${T(7)} ${T(10)}`},"& thead th":{borderBottom:`${T(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`},"& tfoot th":{borderTop:`${T(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`},"& td":{padding:`${T(7)} ${T(10)}`,borderBottom:`${T(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,fontSize:14},"& tr:last-of-type td":{borderBottom:"none"}},"& blockquote":{fontSize:e.fontSizes.lg,lineHeight:e.lineHeight,margin:`${e.spacing.md} 0`,borderTopRightRadius:e.radius.sm,borderBottomRightRadius:e.radius.sm,padding:`${e.spacing.md} ${e.spacing.lg}`,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,borderLeft:`${T(6)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,"& cite":{display:"block",fontSize:e.fontSizes.sm,marginTop:e.spacing.xs,color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],overflow:"hidden",textOverflow:"ellipsis"}}})}});const gde=mde;var vde=Object.defineProperty,Vv=Object.getOwnPropertySymbols,o7=Object.prototype.hasOwnProperty,i7=Object.prototype.propertyIsEnumerable,sT=(e,t,n)=>t in e?vde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yde=(e,t)=>{for(var n in t||(t={}))o7.call(t,n)&&sT(e,n,t[n]);if(Vv)for(var n of Vv(t))i7.call(t,n)&&sT(e,n,t[n]);return e},_de=(e,t)=>{var n={};for(var r in e)o7.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Vv)for(var r of Vv(e))t.indexOf(r)<0&&i7.call(e,r)&&(n[r]=e[r]);return n};const s7=v.forwardRef((e,t)=>{const n=ue("TypographyStylesProvider",{},e),{className:r,unstyled:o,variant:i}=n,s=_de(n,["className","unstyled","variant"]),{classes:a,cx:c}=gde(null,{name:"TypographyStylesProvider",unstyled:o,variant:i});return O.createElement(_e,yde({className:c(a.root,r),ref:t},s))});s7.displayName="@mantine/core/TypographyStylesProvider";var aS={},aT=_r;aS.createRoot=aT.createRoot,aS.hydrateRoot=aT.hydrateRoot;/** + * @remix-run/router v1.4.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Pf(){return Pf=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function W0(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function bde(){return Math.random().toString(36).substr(2,8)}function cT(e,t){return{usr:e.state,key:e.key,idx:t}}function lS(e,t,n,r){return n===void 0&&(n=null),Pf({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Yl(t):t,{state:n,key:t&&t.key||r||bde()})}function Hv(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Yl(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Sde(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,s=o.history,a=ea.Pop,c=null,u=f();u==null&&(u=0,s.replaceState(Pf({},s.state,{idx:u}),""));function f(){return(s.state||{idx:null}).idx}function p(){a=ea.Pop;let k=f(),b=k==null?null:k-u;u=k,c&&c({action:a,location:_.location,delta:b})}function h(k,b){a=ea.Push;let S=lS(_.location,k,b);n&&n(S,k),u=f()+1;let P=cT(S,u),E=_.createHref(S);try{s.pushState(P,"",E)}catch{o.location.assign(E)}i&&c&&c({action:a,location:_.location,delta:1})}function g(k,b){a=ea.Replace;let S=lS(_.location,k,b);n&&n(S,k),u=f();let P=cT(S,u),E=_.createHref(S);s.replaceState(P,"",E),i&&c&&c({action:a,location:_.location,delta:0})}function y(k){let b=o.location.origin!=="null"?o.location.origin:o.location.href,S=typeof k=="string"?k:Hv(k);return Mn(b,"No window.location.(origin|href) available to create URL for href: "+S),new URL(S,b)}let _={get action(){return a},get location(){return e(o,s)},listen(k){if(c)throw new Error("A history only accepts one active listener");return o.addEventListener(lT,p),c=k,()=>{o.removeEventListener(lT,p),c=null}},createHref(k){return t(o,k)},createURL:y,encodeLocation(k){let b=y(k);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:h,replace:g,go(k){return s.go(k)}};return _}var uT;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(uT||(uT={}));function xde(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Yl(t):t,o=Kk(r.pathname||"/",n);if(o==null)return null;let i=a7(e);kde(i);let s=null;for(let a=0;s==null&&a{let c={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};c.relativePath.startsWith("/")&&(Mn(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=ya([r,c.relativePath]),f=n.concat(c);i.children&&i.children.length>0&&(Mn(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),a7(i.children,t,f,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:Tde(u,i.index),routesMeta:f})};return e.forEach((i,s)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))o(i,s);else for(let c of l7(i.path))o(i,s,c)}),t}function l7(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let s=l7(r.join("/")),a=[];return a.push(...s.map(c=>c===""?i:[i,c].join("/"))),o&&a.push(...s),a.map(c=>e.startsWith("/")&&c===""?"/":c)}function kde(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Ide(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Pde=/^:\w+$/,Cde=3,Ode=2,Ede=1,$de=10,Mde=-2,dT=e=>e==="*";function Tde(e,t){let n=e.split("/"),r=n.length;return n.some(dT)&&(r+=Mde),t&&(r+=Ode),n.filter(o=>!dT(o)).reduce((o,i)=>o+(Pde.test(i)?Cde:i===""?Ede:$de),r)}function Ide(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function Nde(e,t){let{routesMeta:n}=e,r={},o="/",i=[];for(let s=0;s{if(f==="*"){let h=a[p]||"";s=i.slice(0,i.length-h.length).replace(/(.)\/+$/,"$1")}return u[f]=Ade(a[p]||"",f),u},{}),pathname:i,pathnameBase:s,pattern:e}}function Lde(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),W0(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(s,a)=>(r.push(a),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function zde(e){try{return decodeURI(e)}catch(t){return W0(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Ade(e,t){try{return decodeURIComponent(e)}catch(n){return W0(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function Kk(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Dde(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?Yl(e):e;return{pathname:n?n.startsWith("/")?n:jde(n,t):t,search:Fde(r),hash:Vde(o)}}function jde(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function U_(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function c7(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function u7(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=Yl(e):(o=Pf({},e),Mn(!o.pathname||!o.pathname.includes("?"),U_("?","pathname","search",o)),Mn(!o.pathname||!o.pathname.includes("#"),U_("#","pathname","hash",o)),Mn(!o.search||!o.search.includes("#"),U_("#","search","hash",o)));let i=e===""||o.pathname==="",s=i?"/":o.pathname,a;if(r||s==null)a=n;else{let p=t.length-1;if(s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),p-=1;o.pathname=h.join("/")}a=p>=0?t[p]:"/"}let c=Dde(o,a),u=s&&s!=="/"&&s.endsWith("/"),f=(i||s===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||f)&&(c.pathname+="/"),c}const ya=e=>e.join("/").replace(/\/\/+/g,"/"),Bde=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Fde=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Vde=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Hde(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}/** + * React Router v6.9.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Wde(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const Ude=typeof Object.is=="function"?Object.is:Wde,{useState:Zde,useEffect:Kde,useLayoutEffect:Gde,useDebugValue:qde}=Ml;function Yde(e,t,n){const r=t(),[{inst:o},i]=Zde({inst:{value:r,getSnapshot:t}});return Gde(()=>{o.value=r,o.getSnapshot=t,Z_(o)&&i({inst:o})},[e,r,t]),Kde(()=>(Z_(o)&&i({inst:o}),e(()=>{Z_(o)&&i({inst:o})})),[e]),qde(r),r}function Z_(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!Ude(n,r)}catch{return!0}}function Jde(e,t,n){return t()}const Xde=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Qde=!Xde,efe=Qde?Jde:Yde;"useSyncExternalStore"in Ml&&(e=>e.useSyncExternalStore)(Ml);const d7=v.createContext(null),Gk=v.createContext(null),Eu=v.createContext(null),U0=v.createContext(null),$u=v.createContext({outlet:null,matches:[]}),f7=v.createContext(null);function cS(){return cS=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.pathnameBase)),i=v.useRef(!1);return v.useEffect(()=>{i.current=!0}),v.useCallback(function(a,c){if(c===void 0&&(c={}),!i.current)return;if(typeof a=="number"){t.go(a);return}let u=u7(a,JSON.parse(o),r,c.relative==="path");e!=="/"&&(u.pathname=u.pathname==="/"?e:ya([e,u.pathname])),(c.replace?t.replace:t.push)(u,c.state,c)},[e,t,o,r])}function Yk(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=v.useContext($u),{pathname:o}=Mu(),i=JSON.stringify(c7(r).map(s=>s.pathnameBase));return v.useMemo(()=>u7(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function nfe(e,t){lp()||Mn(!1);let{navigator:n}=v.useContext(Eu),r=v.useContext(Gk),{matches:o}=v.useContext($u),i=o[o.length-1],s=i?i.params:{};i&&i.pathname;let a=i?i.pathnameBase:"/";i&&i.route;let c=Mu(),u;if(t){var f;let _=typeof t=="string"?Yl(t):t;a==="/"||(f=_.pathname)!=null&&f.startsWith(a)||Mn(!1),u=_}else u=c;let p=u.pathname||"/",h=a==="/"?p:p.slice(a.length)||"/",g=xde(e,{pathname:h}),y=sfe(g&&g.map(_=>Object.assign({},_,{params:Object.assign({},s,_.params),pathname:ya([a,n.encodeLocation?n.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?a:ya([a,n.encodeLocation?n.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),o,r||void 0);return t&&y?v.createElement(U0.Provider,{value:{location:cS({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:ea.Pop}},y):y}function rfe(){let e=ufe(),t=Hde(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:o},n):null,i)}class ofe extends v.Component{constructor(t){super(t),this.state={location:t.location,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location?{error:t.error,location:t.location}:{error:t.error||n.error,location:n.location}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?v.createElement($u.Provider,{value:this.props.routeContext},v.createElement(f7.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ife(e){let{routeContext:t,match:n,children:r}=e,o=v.useContext(d7);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement($u.Provider,{value:t},r)}function sfe(e,t,n){if(t===void 0&&(t=[]),e==null)if(n!=null&&n.errors)e=n.matches;else return null;let r=e,o=n?.errors;if(o!=null){let i=r.findIndex(s=>s.route.id&&o?.[s.route.id]);i>=0||Mn(!1),r=r.slice(0,Math.min(r.length,i+1))}return r.reduceRight((i,s,a)=>{let c=s.route.id?o?.[s.route.id]:null,u=null;n&&(s.route.ErrorBoundary?u=v.createElement(s.route.ErrorBoundary,null):s.route.errorElement?u=s.route.errorElement:u=v.createElement(rfe,null));let f=t.concat(r.slice(0,a+1)),p=()=>{let h=i;return c?h=u:s.route.Component?h=v.createElement(s.route.Component,null):s.route.element&&(h=s.route.element),v.createElement(ife,{match:s,routeContext:{outlet:i,matches:f},children:h})};return n&&(s.route.ErrorBoundary||s.route.errorElement||a===0)?v.createElement(ofe,{location:n.location,component:u,error:c,children:p(),routeContext:{outlet:null,matches:f}}):p()},null)}var fT;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator"})(fT||(fT={}));var Wv;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"})(Wv||(Wv={}));function afe(e){let t=v.useContext(Gk);return t||Mn(!1),t}function lfe(e){let t=v.useContext($u);return t||Mn(!1),t}function cfe(e){let t=lfe(),n=t.matches[t.matches.length-1];return n.route.id||Mn(!1),n.route.id}function ufe(){var e;let t=v.useContext(f7),n=afe(Wv.UseRouteError),r=cfe(Wv.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function es(e){Mn(!1)}function dfe(e){let{basename:t="/",children:n=null,location:r,navigationType:o=ea.Pop,navigator:i,static:s=!1}=e;lp()&&Mn(!1);let a=t.replace(/^\/*/,"/"),c=v.useMemo(()=>({basename:a,navigator:i,static:s}),[a,i,s]);typeof r=="string"&&(r=Yl(r));let{pathname:u="/",search:f="",hash:p="",state:h=null,key:g="default"}=r,y=v.useMemo(()=>{let _=Kk(u,a);return _==null?null:{location:{pathname:_,search:f,hash:p,state:h,key:g},navigationType:o}},[a,u,f,p,h,g,o]);return y==null?null:v.createElement(Eu.Provider,{value:c},v.createElement(U0.Provider,{children:n,value:y}))}function ffe(e){let{children:t,location:n}=e,r=v.useContext(d7),o=r&&!t?r.router.routes:uS(t);return nfe(o,n)}var pT;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(pT||(pT={}));new Promise(()=>{});function uS(e,t){t===void 0&&(t=[]);let n=[];return v.Children.forEach(e,(r,o)=>{if(!v.isValidElement(r))return;if(r.type===v.Fragment){n.push.apply(n,uS(r.props.children,t));return}r.type!==es&&Mn(!1),!r.props.index||!r.props.children||Mn(!1);let i=[...t,o],s={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=uS(r.props.children,i)),n.push(s)}),n}/** + * React Router DOM v6.9.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Uv(){return Uv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function pfe(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function hfe(e,t){return e.button===0&&(!t||t==="_self")&&!pfe(e)}const mfe=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],gfe=["aria-current","caseSensitive","className","end","style","to","children"];function vfe(e){let{basename:t,children:n,window:r}=e,o=v.useRef();o.current==null&&(o.current=wde({window:r,v5Compat:!0}));let i=o.current,[s,a]=v.useState({action:i.action,location:i.location});return v.useLayoutEffect(()=>i.listen(a),[i]),v.createElement(dfe,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:i})}const yfe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",_fe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,wfe=v.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:s,state:a,target:c,to:u,preventScrollReset:f}=t,p=p7(t,mfe),{basename:h}=v.useContext(Eu),g,y=!1;if(typeof u=="string"&&_fe.test(u)&&(g=u,yfe)){let S=new URL(window.location.href),P=u.startsWith("//")?new URL(S.protocol+u):new URL(u),E=Kk(P.pathname,h);P.origin===S.origin&&E!=null?u=E+P.search+P.hash:y=!0}let _=tfe(u,{relative:o}),k=bfe(u,{replace:s,state:a,target:c,preventScrollReset:f,relative:o});function b(S){r&&r(S),S.defaultPrevented||k(S)}return v.createElement("a",Uv({},p,{href:g||_,onClick:y||i?r:b,ref:n,target:c}))}),hd=v.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:o=!1,className:i="",end:s=!1,style:a,to:c,children:u}=t,f=p7(t,gfe),p=Yk(c,{relative:f.relative}),h=Mu(),g=v.useContext(Gk),{navigator:y}=v.useContext(Eu),_=y.encodeLocation?y.encodeLocation(p).pathname:p.pathname,k=h.pathname,b=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;o||(k=k.toLowerCase(),b=b?b.toLowerCase():null,_=_.toLowerCase());let S=k===_||!s&&k.startsWith(_)&&k.charAt(_.length)==="/",P=b!=null&&(b===_||!s&&b.startsWith(_)&&b.charAt(_.length)==="/"),E=S?r:void 0,$;typeof i=="function"?$=i({isActive:S,isPending:P}):$=[i,S?"active":null,P?"pending":null].filter(Boolean).join(" ");let I=typeof a=="function"?a({isActive:S,isPending:P}):a;return v.createElement(wfe,Uv({},f,{"aria-current":E,className:$,ref:n,style:I,to:c}),typeof u=="function"?u({isActive:S,isPending:P}):u)});var hT;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(hT||(hT={}));var mT;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(mT||(mT={}));function bfe(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:s}=t===void 0?{}:t,a=qk(),c=Mu(),u=Yk(e,{relative:s});return v.useCallback(f=>{if(hfe(f,n)){f.preventDefault();let p=r!==void 0?r:Hv(c)===Hv(u);a(e,{replace:p,state:o,preventScrollReset:i,relative:s})}},[c,a,u,r,o,n,e,i,s])}var rs={},Sfe={get exports(){return rs},set exports(e){rs=e}},xfe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",kfe=xfe,Pfe=kfe;function h7(){}function m7(){}m7.resetWarningCache=h7;var Cfe=function(){function e(r,o,i,s,a,c){if(c!==Pfe){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:m7,resetWarningCache:h7};return n.PropTypes=n,n};Sfe.exports=Cfe();var Ofe={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"},Efe=Object.defineProperty,$fe=Object.defineProperties,Mfe=Object.getOwnPropertyDescriptors,Zv=Object.getOwnPropertySymbols,g7=Object.prototype.hasOwnProperty,v7=Object.prototype.propertyIsEnumerable,gT=(e,t,n)=>t in e?Efe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vT=(e,t)=>{for(var n in t||(t={}))g7.call(t,n)&&gT(e,n,t[n]);if(Zv)for(var n of Zv(t))v7.call(t,n)&&gT(e,n,t[n]);return e},Tfe=(e,t)=>$fe(e,Mfe(t)),Ife=(e,t)=>{var n={};for(var r in e)g7.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Zv)for(var r of Zv(e))t.indexOf(r)<0&&v7.call(e,r)&&(n[r]=e[r]);return n},ce=(e,t,n)=>{const r=v.forwardRef((o,i)=>{var s=o,{color:a="currentColor",size:c=24,stroke:u=2,children:f}=s,p=Ife(s,["color","size","stroke","children"]);return v.createElement("svg",vT(Tfe(vT({ref:i},Ofe),{width:c,height:c,stroke:a,strokeWidth:u,className:`tabler-icon tabler-icon-${e}`}),p),[...n.map(([h,g])=>v.createElement(h,g)),...f||[]])});return r.propTypes={color:rs.string,size:rs.oneOfType([rs.string,rs.number]),stroke:rs.oneOfType([rs.string,rs.number])},r.displayName=`${t}`,r},Jk=ce("adjustments","IconAdjustments",[["path",{d:"M4 10a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M6 4v4",key:"svg-1"}],["path",{d:"M6 12v8",key:"svg-2"}],["path",{d:"M10 16a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-3"}],["path",{d:"M12 4v10",key:"svg-4"}],["path",{d:"M12 18v2",key:"svg-5"}],["path",{d:"M16 7a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-6"}],["path",{d:"M18 4v1",key:"svg-7"}],["path",{d:"M18 9v11",key:"svg-8"}]]),y7=ce("alert-circle","IconAlertCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 8v4",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]]),Nfe=ce("align-center","IconAlignCenter",[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M8 12l8 0",key:"svg-1"}],["path",{d:"M6 18l12 0",key:"svg-2"}]]),Rfe=ce("align-justified","IconAlignJustified",[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l12 0",key:"svg-2"}]]),Lfe=ce("align-left","IconAlignLeft",[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l10 0",key:"svg-1"}],["path",{d:"M4 18l14 0",key:"svg-2"}]]),zfe=ce("align-right","IconAlignRight",[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M10 12l10 0",key:"svg-1"}],["path",{d:"M6 18l14 0",key:"svg-2"}]]),Afe=ce("arrow-back-up","IconArrowBackUp",[["path",{d:"M9 14l-4 -4l4 -4",key:"svg-0"}],["path",{d:"M5 10h11a4 4 0 1 1 0 8h-1",key:"svg-1"}]]),Dfe=ce("arrow-right","IconArrowRight",[["path",{d:"M5 12l14 0",key:"svg-0"}],["path",{d:"M13 18l6 -6",key:"svg-1"}],["path",{d:"M13 6l6 6",key:"svg-2"}]]),_7=ce("badge-sd","IconBadgeSd",[["path",{d:"M3 5m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M14 9v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1z",key:"svg-1"}],["path",{d:"M7 14.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75",key:"svg-2"}]]),jfe=ce("blockquote","IconBlockquote",[["path",{d:"M6 15h15",key:"svg-0"}],["path",{d:"M21 19h-15",key:"svg-1"}],["path",{d:"M15 11h6",key:"svg-2"}],["path",{d:"M21 7h-6",key:"svg-3"}],["path",{d:"M9 9h1a1 1 0 1 1 -1 1v-2.5a2 2 0 0 1 2 -2",key:"svg-4"}],["path",{d:"M3 9h1a1 1 0 1 1 -1 1v-2.5a2 2 0 0 1 2 -2",key:"svg-5"}]]),Bfe=ce("bold","IconBold",[["path",{d:"M7 5h6a3.5 3.5 0 0 1 0 7h-6z",key:"svg-0"}],["path",{d:"M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7",key:"svg-1"}]]),Ffe=ce("briefcase","IconBriefcase",[["path",{d:"M3 7m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v9a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M8 7v-2a2 2 0 0 1 2 -2h4a2 2 0 0 1 2 2v2",key:"svg-1"}],["path",{d:"M12 12l0 .01",key:"svg-2"}],["path",{d:"M3 13a20 20 0 0 0 18 0",key:"svg-3"}]]),Vfe=ce("building-bank","IconBuildingBank",[["path",{d:"M3 21l18 0",key:"svg-0"}],["path",{d:"M3 10l18 0",key:"svg-1"}],["path",{d:"M5 6l7 -3l7 3",key:"svg-2"}],["path",{d:"M4 10l0 11",key:"svg-3"}],["path",{d:"M20 10l0 11",key:"svg-4"}],["path",{d:"M8 14l0 3",key:"svg-5"}],["path",{d:"M12 14l0 3",key:"svg-6"}],["path",{d:"M16 14l0 3",key:"svg-7"}]]),w7=ce("building-skyscraper","IconBuildingSkyscraper",[["path",{d:"M3 21l18 0",key:"svg-0"}],["path",{d:"M5 21v-14l8 -4v18",key:"svg-1"}],["path",{d:"M19 21v-10l-6 -4",key:"svg-2"}],["path",{d:"M9 9l0 .01",key:"svg-3"}],["path",{d:"M9 12l0 .01",key:"svg-4"}],["path",{d:"M9 15l0 .01",key:"svg-5"}],["path",{d:"M9 18l0 .01",key:"svg-6"}]]),Hfe=ce("calendar","IconCalendar",[["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-12z",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"}]]),Wfe=ce("car-off","IconCarOff",[["path",{d:"M7 17m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M15.584 15.588a2 2 0 0 0 2.828 2.83",key:"svg-1"}],["path",{d:"M5 17h-2v-6l2 -5h1m4 0h4l4 5h1a2 2 0 0 1 2 2v4m-6 0h-6m-6 -6h8m4 0h3m-6 -3v-2",key:"svg-2"}],["path",{d:"M3 3l18 18",key:"svg-3"}]]),_a=ce("car","IconCar",[["path",{d:"M7 17m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M17 17m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M5 17h-2v-6l2 -5h9l4 5h1a2 2 0 0 1 2 2v4h-2m-4 0h-6m-6 -6h15m-6 0v-5",key:"svg-2"}]]),Ufe=ce("chart-histogram","IconChartHistogram",[["path",{d:"M3 3v18h18",key:"svg-0"}],["path",{d:"M20 18v3",key:"svg-1"}],["path",{d:"M16 16v5",key:"svg-2"}],["path",{d:"M12 13v8",key:"svg-3"}],["path",{d:"M8 16v5",key:"svg-4"}],["path",{d:"M3 11c6 0 5 -5 9 -5s3 5 9 5",key:"svg-5"}]]),Zfe=ce("check","IconCheck",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]),yT=ce("chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]),Kfe=ce("chevron-left","IconChevronLeft",[["path",{d:"M15 6l-6 6l6 6",key:"svg-0"}]]),Z0=ce("chevron-right","IconChevronRight",[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]]),b7=ce("circle-off","IconCircleOff",[["path",{d:"M20.042 16.045a9 9 0 0 0 -12.087 -12.087m-2.318 1.677a9 9 0 1 0 12.725 12.73",key:"svg-0"}],["path",{d:"M3 3l18 18",key:"svg-1"}]]),Gfe=ce("clear-formatting","IconClearFormatting",[["path",{d:"M17 15l4 4m0 -4l-4 4",key:"svg-0"}],["path",{d:"M7 6v-1h11v1",key:"svg-1"}],["path",{d:"M7 19l4 0",key:"svg-2"}],["path",{d:"M13 5l-4 14",key:"svg-3"}]]),S7=ce("clock-filled","IconClockFilled",[["path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-5 2.66a1 1 0 0 0 -.993 .883l-.007 .117v5l.009 .131a1 1 0 0 0 .197 .477l.087 .1l3 3l.094 .082a1 1 0 0 0 1.226 0l.094 -.083l.083 -.094a1 1 0 0 0 0 -1.226l-.083 -.094l-2.707 -2.708v-4.585l-.007 -.117a1 1 0 0 0 -.993 -.883z",fill:"currentColor",key:"svg-0",strokeWidth:"0"}]]),Xk=ce("code","IconCode",[["path",{d:"M7 8l-4 4l4 4",key:"svg-0"}],["path",{d:"M17 8l4 4l-4 4",key:"svg-1"}],["path",{d:"M14 4l-4 16",key:"svg-2"}]]),qfe=ce("color-picker","IconColorPicker",[["path",{d:"M11 7l6 6",key:"svg-0"}],["path",{d:"M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z",key:"svg-1"}]]),x7=ce("device-floppy","IconDeviceFloppy",[["path",{d:"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2",key:"svg-0"}],["path",{d:"M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M14 4l0 4l-6 0l0 -4",key:"svg-2"}]]),Yfe=ce("device-mobile","IconDeviceMobile",[["path",{d:"M6 5a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2v-14z",key:"svg-0"}],["path",{d:"M11 4h2",key:"svg-1"}],["path",{d:"M12 17v.01",key:"svg-2"}]]),Jfe=ce("door-exit","IconDoorExit",[["path",{d:"M13 12v.01",key:"svg-0"}],["path",{d:"M3 21h18",key:"svg-1"}],["path",{d:"M5 21v-16a2 2 0 0 1 2 -2h7.5m2.5 10.5v7.5",key:"svg-2"}],["path",{d:"M14 7h7m-3 -3l3 3l-3 3",key:"svg-3"}]]),Xfe=ce("dots-vertical","IconDotsVertical",[["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]]),Qfe=ce("dots","IconDots",[["path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]]),epe=ce("edit","IconEdit",[["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.415z",key:"svg-1"}],["path",{d:"M16 5l3 3",key:"svg-2"}]]),tpe=ce("external-link","IconExternalLink",[["path",{d:"M11 7h-5a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-5",key:"svg-0"}],["path",{d:"M10 14l10 -10",key:"svg-1"}],["path",{d:"M15 4l5 0l0 5",key:"svg-2"}]]),npe=ce("eye","IconEye",[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]]),rpe=ce("file-description","IconFileDescription",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 17h6",key:"svg-2"}],["path",{d:"M9 13h6",key:"svg-3"}]]),ope=ce("flag","IconFlag",[["path",{d:"M5 5a5 5 0 0 1 7 0a5 5 0 0 0 7 0v9a5 5 0 0 1 -7 0a5 5 0 0 0 -7 0v-9z",key:"svg-0"}],["path",{d:"M5 21v-7",key:"svg-1"}]]),ipe=ce("gps","IconGps",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 17l-1 -4l-4 -1l9 -4z",key:"svg-1"}]]),spe=ce("h-1","IconH1",[["path",{d:"M19 18v-8l-2 2",key:"svg-0"}],["path",{d:"M4 6v12",key:"svg-1"}],["path",{d:"M12 6v12",key:"svg-2"}],["path",{d:"M11 18h2",key:"svg-3"}],["path",{d:"M3 18h2",key:"svg-4"}],["path",{d:"M4 12h8",key:"svg-5"}],["path",{d:"M3 6h2",key:"svg-6"}],["path",{d:"M11 6h2",key:"svg-7"}]]),ape=ce("h-2","IconH2",[["path",{d:"M17 12a2 2 0 1 1 4 0c0 .591 -.417 1.318 -.816 1.858l-3.184 4.143l4 0",key:"svg-0"}],["path",{d:"M4 6v12",key:"svg-1"}],["path",{d:"M12 6v12",key:"svg-2"}],["path",{d:"M11 18h2",key:"svg-3"}],["path",{d:"M3 18h2",key:"svg-4"}],["path",{d:"M4 12h8",key:"svg-5"}],["path",{d:"M3 6h2",key:"svg-6"}],["path",{d:"M11 6h2",key:"svg-7"}]]),lpe=ce("h-3","IconH3",[["path",{d:"M19 14a2 2 0 1 0 -2 -2",key:"svg-0"}],["path",{d:"M17 16a2 2 0 1 0 2 -2",key:"svg-1"}],["path",{d:"M4 6v12",key:"svg-2"}],["path",{d:"M12 6v12",key:"svg-3"}],["path",{d:"M11 18h2",key:"svg-4"}],["path",{d:"M3 18h2",key:"svg-5"}],["path",{d:"M4 12h8",key:"svg-6"}],["path",{d:"M3 6h2",key:"svg-7"}],["path",{d:"M11 6h2",key:"svg-8"}]]),cpe=ce("h-4","IconH4",[["path",{d:"M20 18v-8l-4 6h5",key:"svg-0"}],["path",{d:"M4 6v12",key:"svg-1"}],["path",{d:"M12 6v12",key:"svg-2"}],["path",{d:"M11 18h2",key:"svg-3"}],["path",{d:"M3 18h2",key:"svg-4"}],["path",{d:"M4 12h8",key:"svg-5"}],["path",{d:"M3 6h2",key:"svg-6"}],["path",{d:"M11 6h2",key:"svg-7"}]]),upe=ce("h-5","IconH5",[["path",{d:"M17 18h2a2 2 0 1 0 0 -4h-2v-4h4",key:"svg-0"}],["path",{d:"M4 6v12",key:"svg-1"}],["path",{d:"M12 6v12",key:"svg-2"}],["path",{d:"M11 18h2",key:"svg-3"}],["path",{d:"M3 18h2",key:"svg-4"}],["path",{d:"M4 12h8",key:"svg-5"}],["path",{d:"M3 6h2",key:"svg-6"}],["path",{d:"M11 6h2",key:"svg-7"}]]),dpe=ce("h-6","IconH6",[["path",{d:"M19 14a2 2 0 1 0 0 4a2 2 0 0 0 0 -4z",key:"svg-0"}],["path",{d:"M21 12a2 2 0 1 0 -4 0v4",key:"svg-1"}],["path",{d:"M4 6v12",key:"svg-2"}],["path",{d:"M12 6v12",key:"svg-3"}],["path",{d:"M11 18h2",key:"svg-4"}],["path",{d:"M3 18h2",key:"svg-5"}],["path",{d:"M4 12h8",key:"svg-6"}],["path",{d:"M3 6h2",key:"svg-7"}],["path",{d:"M11 6h2",key:"svg-8"}]]),fpe=ce("highlight","IconHighlight",[["path",{d:"M3 19h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4",key:"svg-0"}],["path",{d:"M12.5 5.5l4 4",key:"svg-1"}],["path",{d:"M4.5 13.5l4 4",key:"svg-2"}],["path",{d:"M21 15v4h-8l4 -4z",key:"svg-3"}]]),ppe=ce("home-check","IconHomeCheck",[["path",{d:"M9 21v-6a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2",key:"svg-0"}],["path",{d:"M19 13.488v-1.488h2l-9 -9l-9 9h2v7a2 2 0 0 0 2 2h4.525",key:"svg-1"}],["path",{d:"M15 19l2 2l4 -4",key:"svg-2"}]]),hpe=ce("id","IconId",[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v10a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M9 10m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M15 8l2 0",key:"svg-2"}],["path",{d:"M15 12l2 0",key:"svg-3"}],["path",{d:"M7 16l10 0",key:"svg-4"}]]),mpe=ce("italic","IconItalic",[["path",{d:"M11 5l6 0",key:"svg-0"}],["path",{d:"M7 19l6 0",key:"svg-1"}],["path",{d:"M14 5l-4 14",key:"svg-2"}]]),gpe=ce("layout-dashboard","IconLayoutDashboard",[["path",{d:"M4 4h6v8h-6z",key:"svg-0"}],["path",{d:"M4 16h6v4h-6z",key:"svg-1"}],["path",{d:"M14 12h6v8h-6z",key:"svg-2"}],["path",{d:"M14 4h6v4h-6z",key:"svg-3"}]]),vpe=ce("line-dashed","IconLineDashed",[["path",{d:"M5 12h2",key:"svg-0"}],["path",{d:"M17 12h2",key:"svg-1"}],["path",{d:"M11 12h2",key:"svg-2"}]]),k7=ce("link-off","IconLinkOff",[["path",{d:"M9 15l3 -3m2 -2l1 -1",key:"svg-0"}],["path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}],["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-3"}]]),ype=ce("link","IconLink",[["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"}]]),P7=ce("list-details","IconListDetails",[["path",{d:"M13 5h8",key:"svg-0"}],["path",{d:"M13 9h5",key:"svg-1"}],["path",{d:"M13 15h8",key:"svg-2"}],["path",{d:"M13 19h5",key:"svg-3"}],["path",{d:"M3 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-4"}],["path",{d:"M3 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-5"}]]),_pe=ce("list-numbers","IconListNumbers",[["path",{d:"M11 6h9",key:"svg-0"}],["path",{d:"M11 12h9",key:"svg-1"}],["path",{d:"M12 18h8",key:"svg-2"}],["path",{d:"M4 16a2 2 0 1 1 4 0c0 .591 -.5 1 -1 1.5l-3 2.5h4",key:"svg-3"}],["path",{d:"M6 10v-6l-2 2",key:"svg-4"}]]),wpe=ce("list","IconList",[["path",{d:"M9 6l11 0",key:"svg-0"}],["path",{d:"M9 12l11 0",key:"svg-1"}],["path",{d:"M9 18l11 0",key:"svg-2"}],["path",{d:"M5 6l0 .01",key:"svg-3"}],["path",{d:"M5 12l0 .01",key:"svg-4"}],["path",{d:"M5 18l0 .01",key:"svg-5"}]]),bpe=ce("location","IconLocation",[["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-0"}]]),Spe=ce("logout","IconLogout",[["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:"M7 12h14l-3 -3m0 6l3 -3",key:"svg-1"}]]),Qk=ce("man","IconMan",[["path",{d:"M10 16v5",key:"svg-0"}],["path",{d:"M14 16v5",key:"svg-1"}],["path",{d:"M9 9h6l-1 7h-4z",key:"svg-2"}],["path",{d:"M5 11c1.333 -1.333 2.667 -2 4 -2",key:"svg-3"}],["path",{d:"M19 11c-1.333 -1.333 -2.667 -2 -4 -2",key:"svg-4"}],["path",{d:"M12 4m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-5"}]]),xpe=ce("map-2","IconMap2",[["path",{d:"M12 18.5l-3 -1.5l-6 3v-13l6 -3l6 3l6 -3v7.5",key:"svg-0"}],["path",{d:"M9 4v13",key:"svg-1"}],["path",{d:"M15 7v5.5",key:"svg-2"}],["path",{d:"M21.121 20.121a3 3 0 1 0 -4.242 0c.418 .419 1.125 1.045 2.121 1.879c1.051 -.89 1.759 -1.516 2.121 -1.879z",key:"svg-3"}],["path",{d:"M19 18v.01",key:"svg-4"}]]),kpe=ce("map-search","IconMapSearch",[["path",{d:"M11 18l-2 -1l-6 3v-13l6 -3l6 3l6 -3v8",key:"svg-0"}],["path",{d:"M9 4v13",key:"svg-1"}],["path",{d:"M15 7v5",key:"svg-2"}],["path",{d:"M18 18m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-3"}],["path",{d:"M20.2 20.2l1.8 1.8",key:"svg-4"}]]),Ppe=ce("message-2","IconMessage2",[["path",{d:"M8 9h8",key:"svg-0"}],["path",{d:"M8 13h6",key:"svg-1"}],["path",{d:"M9 18h-3a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-3l-3 3l-3 -3z",key:"svg-2"}]]),Cpe=ce("minus","IconMinus",[["path",{d:"M5 12l14 0",key:"svg-0"}]]),Ope=ce("mood-sad","IconMoodSad",[["path",{d:"M12 12m-9 0a9 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 15.25a3.5 3.5 0 0 1 5 0",key:"svg-3"}]]),Epe=ce("palette","IconPalette",[["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:"M8.5 10.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M12.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M16.5 10.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}]]),$pe=ce("pencil-plus","IconPencilPlus",[["path",{d:"M8 20l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4h4z",key:"svg-0"}],["path",{d:"M13.5 6.5l4 4",key:"svg-1"}],["path",{d:"M16 18h4m-2 -2v4",key:"svg-2"}]]),Mpe=ce("pencil","IconPencil",[["path",{d:"M4 20h4l10.5 -10.5a1.5 1.5 0 0 0 -4 -4l-10.5 10.5v4",key:"svg-0"}],["path",{d:"M13.5 6.5l4 4",key:"svg-1"}]]),Tpe=ce("phone-call","IconPhoneCall",[["path",{d:"M5 4h4l2 5l-2.5 1.5a11 11 0 0 0 5 5l1.5 -2.5l5 2v4a2 2 0 0 1 -2 2a16 16 0 0 1 -15 -15a2 2 0 0 1 2 -2",key:"svg-0"}],["path",{d:"M15 7a2 2 0 0 1 2 2",key:"svg-1"}],["path",{d:"M15 3a6 6 0 0 1 6 6",key:"svg-2"}]]),Ipe=ce("photo","IconPhoto",[["path",{d:"M15 8h.01",key:"svg-0"}],["path",{d:"M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12z",key:"svg-1"}],["path",{d:"M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5",key:"svg-2"}],["path",{d:"M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3",key:"svg-3"}]]),Lo=ce("plus","IconPlus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]),Npe=ce("point-filled","IconPointFilled",[["path",{d:"M12 7a5 5 0 1 1 -4.995 5.217l-.005 -.217l.005 -.217a5 5 0 0 1 4.995 -4.783z",fill:"currentColor",key:"svg-0",strokeWidth:"0"}]]),Rpe=ce("script","IconScript",[["path",{d:"M17 20h-11a3 3 0 0 1 0 -6h11a3 3 0 0 0 0 6h1a3 3 0 0 0 3 -3v-11a2 2 0 0 0 -2 -2h-10a2 2 0 0 0 -2 2v8",key:"svg-0"}]]),cp=ce("search","IconSearch",[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]]),Lpe=ce("settings","IconSettings",[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]]),zpe=ce("slice","IconSlice",[["path",{d:"M3 19l15 -15l3 3l-6 6l2 2a14 14 0 0 1 -14 4",key:"svg-0"}]]),Ape=ce("strikethrough","IconStrikethrough",[["path",{d:"M5 12l14 0",key:"svg-0"}],["path",{d:"M16 6.5a4 2 0 0 0 -4 -1.5h-1a3.5 3.5 0 0 0 0 7h2a3.5 3.5 0 0 1 0 7h-1.5a4 2 0 0 1 -4 -1.5",key:"svg-1"}]]),Dpe=ce("subscript","IconSubscript",[["path",{d:"M5 7l8 10m-8 0l8 -10",key:"svg-0"}],["path",{d:"M21 20h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2",key:"svg-1"}]]),jpe=ce("superscript","IconSuperscript",[["path",{d:"M5 7l8 10m-8 0l8 -10",key:"svg-0"}],["path",{d:"M21 11h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2",key:"svg-1"}]]),_T=ce("trash","IconTrash",[["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"}]]),Bpe=ce("underline","IconUnderline",[["path",{d:"M7 5v5a5 5 0 0 0 10 0v-5",key:"svg-0"}],["path",{d:"M5 19h14",key:"svg-1"}]]),Fpe=ce("unlink","IconUnlink",[["path",{d:"M17 22v-2",key:"svg-0"}],["path",{d:"M9 15l6 -6",key:"svg-1"}],["path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464",key:"svg-2"}],["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-3"}],["path",{d:"M20 17h2",key:"svg-4"}],["path",{d:"M2 7h2",key:"svg-5"}],["path",{d:"M7 2v2",key:"svg-6"}]]),Vpe=ce("user-circle","IconUserCircle",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 10m-3 0a3 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"}]]),Hpe=ce("user-off","IconUserOff",[["path",{d:"M8.18 8.189a4.01 4.01 0 0 0 2.616 2.627m3.507 -.545a4 4 0 1 0 -5.59 -5.552",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4c.412 0 .81 .062 1.183 .178m2.633 2.618c.12 .38 .184 .785 .184 1.204v2",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]]),Wpe=ce("user","IconUser",[["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"}]]),eP=ce("users","IconUsers",[["path",{d:"M9 7m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"svg-2"}],["path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85",key:"svg-3"}]]),Upe=ce("video","IconVideo",[["path",{d:"M15 10l4.553 -2.276a1 1 0 0 1 1.447 .894v6.764a1 1 0 0 1 -1.447 .894l-4.553 -2.276v-4z",key:"svg-0"}],["path",{d:"M3 6m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z",key:"svg-1"}]]),Kv=ce("x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]),Zpe=ce("zoom-exclamation","IconZoomExclamation",[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}],["path",{d:"M10 13v.01",key:"svg-2"}],["path",{d:"M10 7v3",key:"svg-3"}]]),Kpe=Object.create,C7=Object.defineProperty,Gpe=Object.getOwnPropertyDescriptor,qpe=Object.getOwnPropertyNames,Ype=Object.getPrototypeOf,Jpe=Object.prototype.hasOwnProperty,Xpe=(e,t)=>()=>(e&&(t=e(e=0)),t),tP=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Qpe=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of qpe(t))!Jpe.call(e,o)&&o!==n&&C7(e,o,{get:()=>t[o],enumerable:!(r=Gpe(t,o))||r.enumerable});return e},ehe=(e,t,n)=>(n=e!=null?Kpe(Ype(e)):{},Qpe(t||!e||!e.__esModule?C7(n,"default",{value:e,enumerable:!0}):n,e)),ze=Xpe(()=>{}),the=tP((e,t)=>{ze();var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=n}),nhe=tP((e,t)=>{ze();var n=the();function r(){}function o(){}o.resetWarningCache=r,t.exports=function(){function i(c,u,f,p,h,g){if(g!==n){var y=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw y.name="Invariant Violation",y}}i.isRequired=i;function s(){return i}var a={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:s,element:i,elementType:i,instanceOf:s,node:i,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:o,resetWarningCache:r};return a.PropTypes=a,a}}),rhe=tP((e,t)=>{ze(),t.exports=nhe()()});ze();ze();ze();var ohe=te({root:{"&&":{background:"transparent",":last-of-type td":{borderBottom:"none"}}}});function ihe(){let{classes:e}=ohe();return x("tr",{className:e.root,children:x("td",{})})}ze();ze();ze();var Qa=ehe(rhe());ze();var she={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"},ahe=Object.defineProperty,lhe=Object.defineProperties,che=Object.getOwnPropertyDescriptors,Gv=Object.getOwnPropertySymbols,O7=Object.prototype.hasOwnProperty,E7=Object.prototype.propertyIsEnumerable,wT=(e,t,n)=>t in e?ahe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bT=(e,t)=>{for(var n in t||(t={}))O7.call(t,n)&&wT(e,n,t[n]);if(Gv)for(var n of Gv(t))E7.call(t,n)&&wT(e,n,t[n]);return e},uhe=(e,t)=>lhe(e,che(t)),dhe=(e,t)=>{var n={};for(var r in e)O7.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Gv)for(var r of Gv(e))t.indexOf(r)<0&&E7.call(e,r)&&(n[r]=e[r]);return n},nP=(e,t,n)=>{let r=v.forwardRef((o,i)=>{var s=o,{color:a="currentColor",size:c=24,stroke:u=2,children:f}=s,p=dhe(s,["color","size","stroke","children"]);return v.createElement("svg",bT(uhe(bT({ref:i},she),{width:c,height:c,stroke:a,strokeWidth:u,className:`tabler-icon tabler-icon-${e}`}),p),[...n.map(([h,g])=>v.createElement(h,g)),...f||[]])});return r.propTypes={color:Qa.default.string,size:Qa.default.oneOfType([Qa.default.string,Qa.default.number]),stroke:Qa.default.oneOfType([Qa.default.string,Qa.default.number])},r.displayName=`${t}`,r};ze();var fhe=nP("arrow-up","IconArrowUp",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 11l-6 -6",key:"svg-1"}],["path",{d:"M6 11l6 -6",key:"svg-2"}]]);ze();var phe=nP("arrows-vertical","IconArrowsVertical",[["path",{d:"M8 7l4 -4l4 4",key:"svg-0"}],["path",{d:"M8 17l4 4l4 -4",key:"svg-1"}],["path",{d:"M12 3l0 18",key:"svg-2"}]]);ze();var hhe=nP("database-off","IconDatabaseOff",[["path",{d:"M12.983 8.978c3.955 -.182 7.017 -1.446 7.017 -2.978c0 -1.657 -3.582 -3 -8 -3c-1.661 0 -3.204 .19 -4.483 .515m-2.783 1.228c-.471 .382 -.734 .808 -.734 1.257c0 1.22 1.944 2.271 4.734 2.74",key:"svg-0"}],["path",{d:"M4 6v6c0 1.657 3.582 3 8 3c.986 0 1.93 -.067 2.802 -.19m3.187 -.82c1.251 -.53 2.011 -1.228 2.011 -1.99v-6",key:"svg-1"}],["path",{d:"M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4",key:"svg-2"}],["path",{d:"M3 3l18 18",key:"svg-3"}]]),mhe=te(e=>({root:{position:"absolute",top:0,right:0,bottom:0,left:0,flexDirection:"column",pointerEvents:"none",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[6],opacity:0,transition:"opacity .15s ease"},active:{opacity:1},standardIcon:{fontSize:0,borderRadius:"50%",padding:e.spacing.xs,background:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}}));function ghe({icon:e,text:t,pt:n,pb:r,active:o,children:i}){let{classes:s,cx:a}=mhe();return x(Al,{pt:n,pb:r,className:a(s.root,{[s.active]:o}),children:i||z(to,{children:[e||x("div",{className:s.standardIcon,children:x(hhe,{})}),x(ie,{size:"sm",color:"dimmed",children:t})]})})}ze();ze();var ST={xs:22,sm:26,md:32,lg:38,xl:44};function vhe({size:e,label:t,values:n,value:r,onChange:o,color:i}){return z(de,{spacing:"xs",children:[x(ie,{size:e,children:t}),z(et,{withinPortal:!0,withArrow:!0,children:[x(et.Target,{children:x(Fn,{size:e,variant:"default",sx:[{fontWeight:"normal"},s=>({height:ST[e],paddingLeft:s.spacing[e],paddingRight:s.spacing[e]})],children:r})}),x(et.Dropdown,{children:n.map(s=>{let a=s===r;return x(et.Item,{sx:[{height:ST[e]},c=>({"&&":{color:a?c.white:void 0},background:a?c.colors[i||c.primaryColor][6]:void 0})],disabled:a,onClick:()=>o(s),children:x(ie,{size:e,children:s})},s)})})]})]})}var yhe=te((e,{topBorderColor:t,paginationWrapBreakpoint:n})=>({root:{background:e.colorScheme==="dark"?e.colors.dark[7]:e.white,borderTop:`1px solid ${typeof t=="function"?t(e):t}`,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-between",gap:e.spacing.xs,[e.fn.largerThan(n)]:{flexDirection:"row"}},text:{flex:"1 1 auto"},pagination:{opacity:1,transition:"opacity .15s ease"},paginationFetching:{opacity:0}})),_he=v.forwardRef(function({className:e,style:t,topBorderColor:n,fetching:r,page:o,onPageChange:i,paginationColor:s,paginationSize:a,loadingText:c,noRecordsText:u,paginationText:f,totalRecords:p,recordsPerPage:h,onRecordsPerPageChange:g,recordsPerPageLabel:y,recordsPerPageOptions:_,recordsLength:k,horizontalSpacing:b,paginationWrapBreakpoint:S},P){let E;if(r)E=c;else if(!p)E=u;else{let N=(o-1)*h+1,R=N+k-1;E=f({from:N,to:R,totalRecords:p})}let{classes:$,cx:I}=yhe({topBorderColor:n,paginationWrapBreakpoint:S});return z(_e,{ref:P,px:b??"xs",py:"xs",className:I($.root,e),style:t,children:[x(ie,{className:$.text,size:a,children:E}),_&&x(vhe,{size:a,label:y,values:_,value:h,onChange:g}),x(Gi,{color:s,className:I($.pagination,{[$.paginationFetching]:r||!k}),value:o,onChange:i,size:a,total:Math.ceil(p/h)})]})});ze();ze();ze();var whe=typeof window<"u"?v.useLayoutEffect:v.useEffect;function $7(e){let t=Sr(),n=typeof e=="function"?e(t):e;return IR(n||"",!0)}function M7(e){let t=e.replace(/([a-z\d])([A-Z]+)/g,"$1 $2").replace(/\W|_/g," ").trim().toLowerCase();return`${t.charAt(0).toUpperCase()}${t.slice(1)}`}function bhe(e,t,n){return e.filter(r=>!t.map(n).includes(n(r)))}function K_(e,t){return e.filter((n,r,o)=>r===o.findIndex(i=>t(n)===t(i)))}function Xn(e,t){return t?t.match(/([^[.\]])+/g).reduce((n,r)=>n&&n[r],e):void 0}var She=te(e=>({sortableColumnHeader:{cursor:"pointer",transition:"background .15s ease","&:hover":{background:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]}},sortableColumnHeaderGroup:{gap:"0.25em"},columnHeaderText:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},sortableColumnHeaderText:{minWidth:0,flexGrow:1},sortableColumnHeaderIcon:{transition:"transform .15s ease"},sortableColumnHeaderIconRotated:{transform:"rotate3d(0, 0, 1, 180deg)"},sortableColumnHeaderNeutralIcon:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],transition:"color .15s ease","th:hover &":{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]}}}));function xhe({className:e,sx:t,style:n,accessor:r,visibleMediaQuery:o,title:i,sortable:s,textAlignment:a,width:c,sortStatus:u,onSortStatusChange:f}){let{cx:p,classes:h}=She();if(!$7(o))return null;let g=i??M7(r),y=typeof g=="string"?g:void 0,_=s&&f?()=>{f({columnAccessor:r,direction:u?.direction==="asc"?"desc":"asc"})}:void 0;return x(_e,{component:"th",className:p({[h.sortableColumnHeader]:s},e),sx:[{"&&":{textAlign:a},width:c,minWidth:c,maxWidth:c},t],style:n,role:s?"button":void 0,tabIndex:s?0:void 0,onClick:_,onKeyDown:k=>k.key==="Enter"&&_?.(),children:s||u?.columnAccessor===r?z(de,{className:h.sortableColumnHeaderGroup,position:"apart",noWrap:!0,children:[x(_e,{className:p(h.columnHeaderText,h.sortableColumnHeaderText),title:y,children:g}),x(Al,{children:u?.columnAccessor===r?x(fhe,{className:p(h.sortableColumnHeaderIcon,{[h.sortableColumnHeaderIconRotated]:u.direction==="desc"}),"aria-label":`Sorted ${u.direction==="desc"?"descending":"ascending"}`,size:14}):x(phe,{className:h.sortableColumnHeaderNeutralIcon,size:14})})]}):x(_e,{className:h.columnHeaderText,title:y,children:g})})}ze();var khe=te(e=>{let t=e.colorScheme==="dark"?.5:.05;return{root:{position:"sticky",width:0,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-g0(e.spacing.sm),bottom:0,borderLeft:`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,width:e.spacing.sm,background:`linear-gradient(to right, ${e.fn.rgba(e.black,t)}, ${e.fn.rgba(e.black,0)}), linear-gradient(to right, ${e.fn.rgba(e.black,t)}, ${e.fn.rgba(e.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},shadowVisible:{"&::after":{opacity:1}},checkboxInput:{cursor:"pointer"}}});function Phe({shadowVisible:e,checked:t,indeterminate:n,onChange:r}){let{cx:o,classes:i}=khe();return x("th",{className:o(i.root,{[i.shadowVisible]:e}),children:x(Ro,{classNames:{input:i.checkboxInput},checked:t,indeterminate:n,disabled:!r,onChange:r})})}var Che=te(e=>({root:{zIndex:2,position:"sticky",top:0,background:e.colorScheme==="dark"?e.colors.dark[7]:e.white},textSelectionDisabled:{userSelect:"none"}})),Ohe=v.forwardRef(function({className:e,style:t,sortStatus:n,onSortStatusChange:r,columns:o,selectionVisible:i,selectionChecked:s,selectionIndeterminate:a,onSelectionChange:c,leftShadowVisible:u},f){let{classes:p,cx:h}=Che();return x("thead",{className:h(p.root,e),style:t,ref:f,children:z("tr",{children:[i&&x(Phe,{shadowVisible:u,checked:s,indeterminate:a,onChange:c}),o.map(({accessor:g,hidden:y,visibleMediaQuery:_,textAlignment:k,width:b,title:S,sortable:P,titleClassName:E,titleStyle:$,titleSx:I})=>y?null:x(xhe,{className:E,style:$,sx:I,accessor:g,visibleMediaQuery:_,textAlignment:k,width:b,title:S,sortable:P,sortStatus:n,onSortStatusChange:r},g))]})})});ze();var Ehe=te(e=>({root:{zIndex:3,position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",background:e.fn.rgba(e.colorScheme==="dark"?e.colors.dark[8]:e.white,.75),opacity:0,transition:"opacity .15s ease"},fetching:{pointerEvents:"all",opacity:1}}));function $he({pt:e,pb:t,fetching:n,customContent:r,backgroundBlur:o,size:i,variant:s,color:a}){let{classes:c,cx:u}=Ehe();return x(Al,{pt:e,pb:t,className:u(c.root,{[c.fetching]:n}),sx:o?{backdropFilter:`blur(${o}px)`}:void 0,children:n&&(r||x(Qf,{size:i,variant:s,color:a}))})}ze();ze();var Mhe=te({withPointerCursor:{cursor:"pointer"},noWrap:{whiteSpace:"nowrap"},ellipsis:{overflow:"hidden",textOverflow:"ellipsis"}});function The({className:e,sx:t,style:n,visibleMediaQuery:r,record:o,recordIndex:i,onClick:s,noWrap:a,ellipsis:c,textAlignment:u,width:f,accessor:p,render:h,defaultRender:g,customCellAttributes:y}){let{cx:_,classes:k}=Mhe();return $7(r)?x(_e,{component:"td",className:_({[k.noWrap]:a||c,[k.ellipsis]:c,[k.withPointerCursor]:s},e),sx:[{width:f,minWidth:f,maxWidth:f,textAlign:u},t],style:n,onClick:s,...y?.(o,i),children:h?h(o,i):g?g(o,i,p):Xn(o,p)}):null}ze();ze();function Ihe(e){let[t,n]=v.useState(null),r=e?.join(":")||"";return v.useEffect(()=>{n(null)},[r]),{lastSelectionChangeIndex:t,setLastSelectionChangeIndex:n}}function Nhe(e){let[t,n]=v.useState(null);return v.useEffect(()=>{e&&n(null)},[e]),{rowContextMenuInfo:t,setRowContextMenuInfo:n}}function Rhe({rowExpansion:e,records:t,idAccessor:n}){let r=[];if(e&&t){let{trigger:a,allowMultiple:c,initiallyExpanded:u}=e;t&&a==="always"?r=t.map(f=>Xn(f,n)):u&&(r=t.filter(u).map(f=>Xn(f,n)),c||(r=[r[0]]))}let o,i,s=v.useState(r);if(e){let{trigger:a,allowMultiple:c,collapseProps:u,content:f}=e;e.expanded?{recordIds:o,onRecordIdsChange:i}=e.expanded:[o,i]=s;let p=h=>i(o.filter(g=>g!==Xn(h,n)));return{expandOnClick:a!=="always"&&a!=="never",isRowExpanded:h=>a==="always"?!0:o.includes(Xn(h,n)),expandRow:h=>{let g=Xn(h,n);i(c?[...o,g]:[g])},collapseRow:p,collapseProps:u,content:(h,g)=>()=>f({record:h,recordIndex:g,collapse:()=>p(h)})}}}function Lhe(e,t){let[n,r]=v.useState(e),[o,i]=v.useState(e),s=LC(()=>r(!0),0),a=LC(()=>i(!1),t||200);return v.useEffect(()=>{e?(a.clear(),i(!0),s.start()):(s.clear(),r(!1),a.start())},[s,a,e]),{expanded:n,visible:o}}var zhe=te({cell:{"&&":{borderBottomWidth:0,padding:0}},expandedCell:{"&&":{borderBottomWidth:1}}});function Ahe({open:e,colSpan:t,content:n,collapseProps:r}){let{expanded:o,visible:i}=Lhe(e,r?.transitionDuration),{cx:s,classes:a}=zhe();return i?z(to,{children:[x("tr",{}),x("tr",{children:x("td",{className:s(a.cell,{[a.expandedCell]:o}),colSpan:t,children:x(yk,{in:o,...r,children:n()})})})]}):null}ze();var Dhe=te(e=>{let t=e.colorScheme==="dark"?.5:.05;return{root:{position:"sticky",zIndex:1,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-g0(e.spacing.sm),bottom:0,borderLeft:`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,width:e.spacing.sm,background:`linear-gradient(to right, ${e.fn.rgba(e.black,t)}, ${e.fn.rgba(e.black,0)}), linear-gradient(to right, ${e.fn.rgba(e.black,t)}, ${e.fn.rgba(e.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},withRightShadow:{"&::after":{opacity:1}},checkbox:{cursor:"pointer"}}});function jhe({withRightShadow:e,...t}){let{cx:n,classes:r}=Dhe();return x("td",{className:n(r.root,{[r.withRightShadow]:e}),onClick:o=>o.stopPropagation(),children:x(Ro,{classNames:{input:r.checkbox},...t})})}var Bhe=te(e=>{let t=e.colors[e.primaryColor][6];return{withPointerCursor:{cursor:"pointer"},selected:{"&&":{"tr&":{background:e.colorScheme==="dark"?e.fn.darken(t,.6):e.fn.lighten(t,.9)},"table[data-striped] tbody &:nth-of-type(odd)":{background:e.colorScheme==="dark"?e.fn.darken(t,.55):e.fn.lighten(t,.85)}}},contextMenuVisible:{"&&":{"tr&":{background:e.colorScheme==="dark"?e.fn.darken(t,.5):e.fn.lighten(t,.7)},"table[data-striped] tbody &:nth-of-type(odd)":{background:e.colorScheme==="dark"?e.fn.darken(t,.45):e.fn.lighten(t,.65)}}}}});function Fhe({record:e,recordIndex:t,columns:n,defaultColumnRender:r,selectionVisible:o,selectionChecked:i,onSelectionChange:s,isRecordSelectable:a,onClick:c,onCellClick:u,onContextMenu:f,expansion:p,customRowAttributes:h,className:g,style:y,sx:_,contextMenuVisible:k,leftShadowVisible:b}){let{cx:S,classes:P}=Bhe();return z(to,{children:[z(_e,{component:"tr",className:S({[P.withPointerCursor]:c||p?.expandOnClick,[P.selected]:i,[P.contextMenuVisible]:k},typeof g=="function"?g(e,t):g),onClick:E=>{if(p){let{isRowExpanded:$,expandOnClick:I,expandRow:N,collapseRow:R}=p;I&&($(e)?R(e):N(e))}c?.(E)},style:typeof y=="function"?y(e,t):y,sx:_,...h?.(e,t),onContextMenu:f,children:[o&&x(jhe,{withRightShadow:b,checked:i,disabled:!s||(a?!a(e,t):!1),onChange:s}),n.map((E,$)=>{let{accessor:I,hidden:N,visibleMediaQuery:R,textAlignment:F,noWrap:B,ellipsis:D,width:K,render:W,cellsClassName:V,cellsStyle:U,cellsSx:J,customCellAttributes:G}=E,A;return u&&(A=()=>u({record:e,recordIndex:t,column:E,columnIndex:$})),N?null:x(The,{className:typeof V=="function"?V(e,t):V,style:typeof U=="function"?U(e,t):U,sx:J,visibleMediaQuery:R,record:e,recordIndex:t,onClick:A,accessor:I,textAlignment:F,noWrap:B,ellipsis:D,width:K,render:W,defaultRender:r,customCellAttributes:G},I)})]}),p&&x(Ahe,{colSpan:n.filter(E=>!E.hidden).length+(o?1:0),open:p.isRowExpanded(e),content:p.content(e,t),collapseProps:p.collapseProps})]})}ze();var Vhe=te(e=>({root:{position:"fixed",border:`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,overflow:"hidden",transition:"all .15s ease"}}));function Hhe({borderRadius:e="xs",shadow:t="sm",zIndex:n=3,y:r,x:o,onDestroy:i,children:s}){Xc("resize",i),Xc("scroll",i);let a=TR(i),{ref:c,width:u,height:f}=gd(),p=di(a,c),{innerWidth:h,innerHeight:g}=window,{classes:y,theme:{dir:_,spacing:k}}=Vhe(),b=g0(k.md);return x(zr,{ref:p,shadow:t,radius:e,className:y.root,sx:{zIndex:n,top:r+f+b>g?g-f-b:r,left:_==="ltr"?o+u+b>h?h-u-b:o:h-b-(o-u-b<0?u+b:o)},children:s})}ze();var Whe=te(e=>({root:{height:1,background:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]}}));function Uhe(){let{classes:e}=Whe();return x("div",{className:e.root})}ze();var Zhe=te((e,{color:t})=>{let n=g0(e.spacing.sm)/2;return{root:{width:"100%",display:"flex",alignItems:"center",paddingTop:n,paddingBottom:n,paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,color:t&&e.colors[t][6],transition:"background .15s ease","&[disabled]":{cursor:"not-allowed",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]},"&:hover:not([disabled])":{background:e.fn.rgba(t?e.colors[t][6]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4],t?e.colorScheme==="dark"?.15:.08:.25)},"&:active:not([disabled])":{background:e.fn.rgba(t?e.colors[t][6]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4],t?e.colorScheme==="dark"?.3:.2:.5)}},icon:{fontSize:0,marginRight:e.spacing.xs},title:{whiteSpace:"nowrap"}}});function Khe({icon:e,title:t,color:n,disabled:r,onClick:o}){let{classes:i}=Zhe({color:n});return z(Bn,{className:i.root,disabled:r,onClick:o,children:[e&&x(_e,{className:i.icon,children:e}),x(ie,{className:i.title,size:"sm",children:t})]})}ze();var Ghe=te(e=>{let t=e.colorScheme==="dark"?.5:.05;return{root:{flex:"1 1 100%"},scrollbar:{'&[data-state="visible"]':{background:"transparent"},"div::before":{pointerEvents:"none"}},corner:{background:"transparent"},thumb:{zIndex:3},shadow:{position:"absolute",pointerEvents:"none",opacity:0,transition:"opacity .15s ease"},topShadow:{zIndex:2,top:0,left:0,right:0,height:e.spacing.sm,background:`linear-gradient(${e.fn.rgba(e.black,t)}, ${e.fn.rgba(e.black,0)}), linear-gradient(${e.fn.rgba(e.black,t)}, ${e.fn.rgba(e.black,0)} 30%)`},leftShadow:{zIndex:3,top:0,left:0,bottom:0,width:e.spacing.sm,background:`linear-gradient(to right, ${e.fn.rgba(e.black,t)}, ${e.fn.rgba(e.black,0)}), linear-gradient(to right, ${e.fn.rgba(e.black,t)}, ${e.fn.rgba(e.black,0)} 30%)`},rightShadow:{zIndex:2,top:0,bottom:0,right:0,width:e.spacing.sm,background:`linear-gradient(to left, ${e.fn.rgba(e.black,t)}, ${e.fn.rgba(e.black,0)}), linear-gradient(to left, ${e.fn.rgba(e.black,t)}, ${e.fn.rgba(e.black,0)} 30%)`},bottomShadow:{zIndex:2,left:0,right:0,bottom:0,height:e.spacing.sm,background:`linear-gradient(${e.fn.rgba(e.black,0)}, ${e.fn.rgba(e.black,t)}), linear-gradient(${e.fn.rgba(e.black,0)} 30%, ${e.fn.rgba(e.black,t)})`},shadowVisible:{opacity:1}}});function qhe({topShadowVisible:e,leftShadowVisible:t,rightShadowVisible:n,bottomShadowVisible:r,headerHeight:o,onScrollPositionChange:i,children:s,viewportRef:a}){let{cx:c,classes:u}=Ghe();return z(ir,{viewportRef:a,classNames:{root:u.root,scrollbar:u.scrollbar,thumb:u.thumb,corner:u.corner},styles:{scrollbar:{marginTop:o}},onScrollPositionChange:i,children:[s,x(_e,{className:c(u.shadow,u.topShadow,{[u.shadowVisible]:e}),sx:{top:o}}),x("div",{className:c(u.shadow,u.leftShadow,{[u.shadowVisible]:t})}),x("div",{className:c(u.shadow,u.rightShadow,{[u.shadowVisible]:n})}),x("div",{className:c(u.shadow,u.bottomShadow,{[u.shadowVisible]:r})})]})}var xT={},Yhe=te((e,{borderColor:t,rowBorderColor:n})=>{let r=typeof t=="function"?t(e):t,o=typeof n=="function"?n(e):n;return{root:{position:"relative",display:"flex",flexDirection:"column",overflow:"hidden",tr:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white},"&&":{"thead tr th":{borderBottomColor:r},"tbody tr td":{borderTopColor:o}}},lastRowBorderBottomVisible:{"tbody tr:last-of-type td":{borderBottom:`1px solid ${o}`}},textSelectionDisabled:{userSelect:"none"},table:{borderCollapse:"separate",borderSpacing:0},tableWithBorder:{border:`1px solid ${r}`},tableWithColumnBorders:{"&&":{"th, td":{":not(:first-of-type)":{borderLeft:`1px solid ${o}`}}}},verticalAlignmentTop:{td:{verticalAlign:"top"}},verticalAlignmentBottom:{td:{verticalAlign:"bottom"}}}});function Jhe({withBorder:e,borderRadius:t,borderColor:n=Ve=>Ve.colorScheme==="dark"?Ve.colors.dark[4]:Ve.colors.gray[3],rowBorderColor:r=Ve=>Ve.fn.rgba(Ve.colorScheme==="dark"?Ve.colors.dark[4]:Ve.colors.gray[3],.65),withColumnBorders:o,textSelectionDisabled:i,height:s="100%",minHeight:a,shadow:c,verticalAlignment:u="center",fetching:f,columns:p,defaultColumnRender:h,idAccessor:g="id",records:y,selectedRecords:_,onSelectedRecordsChange:k,isRecordSelectable:b,sortStatus:S,onSortStatusChange:P,horizontalSpacing:E,page:$,onPageChange:I,totalRecords:N,recordsPerPage:R,onRecordsPerPageChange:F,recordsPerPageOptions:B,recordsPerPageLabel:D="Records per page",paginationColor:K,paginationSize:W="sm",paginationText:V=({from:Ve,to:ge,totalRecords:$e})=>`${Ve} - ${ge} / ${$e}`,paginationWrapBreakpoint:U="sm",loaderBackgroundBlur:J,customLoader:G,loaderSize:A,loaderVariant:q,loaderColor:H,loadingText:ee="...",emptyState:re,noRecordsText:he="No records",noRecordsIcon:Pe,striped:X,onRowClick:ne,onCellClick:fe,onScrollToTop:Oe,onScrollToBottom:Me,onScrollToLeft:Te,onScrollToRight:ut,rowContextMenu:Fe,rowExpansion:St,rowClassName:ft,rowStyle:Vt,rowSx:rn,customRowAttributes:pt,scrollViewportRef:wn,bodyRef:Un,m:Ze,my:mn,mx:Rt,mt:st,mb:xr,ml:kr,mr:Tn,sx:on,className:Ht,classNames:sn,style:an,styles:ln,...Po}){let{ref:Ve,width:ge,height:$e}=gd(),{ref:Xt,height:Wt}=gd(),{ref:Ut,width:In,height:Fr}=gd(),{ref:tt,height:at}=gd(),[wt,nt]=v.useState(!0),[Xe,mt]=v.useState(!0),[Ne,Zn]=v.useState(!0),[xt,lt]=v.useState(!0),{rowContextMenuInfo:Zt,setRowContextMenuInfo:Nn}=Nhe(f),cr=Rhe({rowExpansion:St,records:y,idAccessor:g}),Dt=v.useCallback(()=>{if(!f&&Fe&&Nn(null),f||Fr<=$e)nt(!0),mt(!0);else{let Ke=Ve.current.scrollTop,kt=Ke===0,cn=Fr-Ke-$e<1;nt(kt),mt(cn),kt&&kt!==wt&&Oe?.(),cn&&cn!==Xe&&Me?.()}if(f||In===ge)Zn(!0),lt(!0);else{let Ke=Ve.current.scrollLeft,kt=Ke===0,cn=In-Ke-ge<1;Zn(kt),lt(cn),kt&&kt!==Ne&&Te?.(),cn&&cn!==xt&&ut?.()}},[f,Me,Te,ut,Oe,Fe,$e,Ve,ge,Xe,Ne,xt,wt,Nn,Fr,In]);whe(Dt,[Dt]);let ve=v.useCallback(Ke=>{Ve.current.scrollTo({top:0,left:0}),I(Ke)},[I,Ve]),Kn=y?.length,Vr=y?.map(Ke=>Xn(Ke,g)),Hr=_?.map(Ke=>Xn(Ke,g)),be=Vr!==void 0&&Hr!==void 0&&Hr.length>0,Qe=b?y?.filter(b):y,Ae=Qe?.map(Ke=>Xn(Ke,g)),dt=be&&Ae.every(Ke=>Hr.includes(Ke)),ur=be&&Ae.some(Ke=>Hr.includes(Ke)),Xl=v.useCallback(()=>{k?.(dt?_.filter(Ke=>!Ae.includes(Xn(Ke,g))):K_([..._,...Qe],Ke=>Xn(Ke,g)))},[dt,g,k,Ae,Qe,_]),{lastSelectionChangeIndex:Ps,setLastSelectionChangeIndex:Au}=Ihe(Vr),Kt=!!_&&!Ne,{cx:Cs,classes:Pr,theme:Os}=Yhe({borderColor:n,rowBorderColor:r}),Du={m:Ze,my:mn,mx:Rt,mt:st,mb:xr,ml:kr,mr:Tn},Ha=typeof ln=="function"?ln(Os,xT,xT):ln;return z(_e,{...Du,className:Cs(Pr.root,{[Pr.tableWithBorder]:e},Ht,sn?.root),sx:[Ke=>({borderRadius:Ke.radius[t]||t,boxShadow:Ke.shadows[c]||c,height:s,minHeight:a}),...Wf(on)],style:{...Ha?.root,...an},children:[x(qhe,{viewportRef:di(Ve,wn||null),topShadowVisible:!wt,leftShadowVisible:!(_||Ne),rightShadowVisible:!xt,bottomShadowVisible:!Xe,headerHeight:Wt,onScrollPositionChange:Dt,children:z(Zk,{ref:Ut,horizontalSpacing:E,className:Cs(Pr.table,{[Pr.tableWithColumnBorders]:o,[Pr.lastRowBorderBottomVisible]:Fr<$e,[Pr.textSelectionDisabled]:i,[Pr.verticalAlignmentTop]:u==="top",[Pr.verticalAlignmentBottom]:u==="bottom"}),striped:Kn?X:!1,...Po,children:[x(Ohe,{ref:Xt,className:sn?.header,style:Ha?.header,columns:p,sortStatus:S,onSortStatusChange:P,selectionVisible:!!_,selectionChecked:dt,selectionIndeterminate:ur&&!dt,onSelectionChange:Xl,leftShadowVisible:Kt}),x("tbody",{ref:Un,children:Kn?y.map((Ke,kt)=>{let cn=Xn(Ke,g),xe=Hr?.includes(cn)||!1,Ye=!1,Gn=!1;if(Fe){let{hidden:De}=Fe;(!De||!(typeof De=="function"?De(Ke,kt):De))&&(Fe.trigger==="click"?Ye=!0:Gn=!0)}let dr;k&&(dr=De=>{if(De.nativeEvent.shiftKey&&Ps!==null){let Sn=y.filter(kt>Ps?(Wr,Ur)=>Ur>=Ps&&Ur<=kt&&(b?b(Wr,Ur):!0):(Wr,Ur)=>Ur>=kt&&Ur<=Ps&&(b?b(Wr,Ur):!0));k(xe?bhe(_,Sn,Wr=>Xn(Wr,g)):K_([..._,...Sn],Wr=>Xn(Wr,g)))}else k(xe?_.filter(Sn=>Xn(Sn,g)!==cn):K_([..._,Ke],Sn=>Xn(Sn,g)));Au(kt)});let bn;Ye?bn=De=>{Nn({y:De.clientY,x:De.clientX,record:Ke,recordIndex:kt}),ne?.(Ke,kt)}:ne&&(bn=()=>{ne(Ke,kt)});let Le;return Gn&&(Le=De=>{De.preventDefault(),Nn({y:De.clientY,x:De.clientX,record:Ke,recordIndex:kt})}),x(Fhe,{record:Ke,recordIndex:kt,columns:p,defaultColumnRender:h,selectionVisible:!!_,selectionChecked:xe,onSelectionChange:dr,isRecordSelectable:b,onClick:bn,onCellClick:fe,onContextMenu:Le,contextMenuVisible:Zt?Xn(Zt.record,g)===cn:!1,expansion:cr,className:ft,style:Vt,sx:rn,customRowAttributes:pt,leftShadowVisible:Kt},cn)}):x(ihe,{})})]})}),$&&x(_he,{ref:tt,className:sn?.pagination,style:Ha?.pagination,topBorderColor:n,horizontalSpacing:E,fetching:f,page:$,onPageChange:ve,totalRecords:N,recordsPerPage:R,onRecordsPerPageChange:F,recordsPerPageOptions:B,recordsPerPageLabel:D,paginationColor:K,paginationSize:W,paginationText:V,paginationWrapBreakpoint:U,noRecordsText:he,loadingText:ee,recordsLength:Kn}),x($he,{pt:Wt,pb:at,fetching:f,backgroundBlur:J,customContent:G,size:A,variant:q,color:H}),x(ghe,{pt:Wt,pb:at,icon:Pe,text:he,active:!f&&!Kn,children:re}),Fe&&Zt&&x(Hhe,{zIndex:Fe.zIndex,borderRadius:Fe.borderRadius,shadow:Fe.shadow,y:Zt.y,x:Zt.x,onDestroy:()=>Nn(null),children:Fe.items(Zt.record,Zt.recordIndex).map(({divider:Ke,key:kt,title:cn,icon:xe,color:Ye,hidden:Gn,disabled:dr,onClick:bn})=>Ke?x(Uhe,{},kt):Gn?null:x(Khe,{title:cn??M7(kt),icon:xe,color:Ye,disabled:dr,onClick:()=>{Nn(null),bn()}},kt))})]})}ze();ze();ze();ze();ze();ze();ze();ze();ze();ze();ze();ze();ze();ze();ze();ze();const kT=e=>{let t;const n=new Set,r=(c,u)=>{const f=typeof c=="function"?c(t):c;if(!Object.is(f,t)){const p=t;t=u??typeof f!="object"?f:Object.assign({},t,f),n.forEach(h=>h(t,p))}},o=()=>t,a={setState:r,getState:o,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{({BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,o,a),a},Xhe=e=>e?kT(e):kT;var dS={},Qhe={get exports(){return dS},set exports(e){dS=e}},T7={},fS={},eme={get exports(){return fS},set exports(e){fS=e}},I7={};/** + * @license React + * use-sync-external-store-shim.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var uu=v;function tme(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var nme=typeof Object.is=="function"?Object.is:tme,rme=uu.useState,ome=uu.useEffect,ime=uu.useLayoutEffect,sme=uu.useDebugValue;function ame(e,t){var n=t(),r=rme({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return ime(function(){o.value=n,o.getSnapshot=t,G_(o)&&i({inst:o})},[e,n,t]),ome(function(){return G_(o)&&i({inst:o}),e(function(){G_(o)&&i({inst:o})})},[e]),sme(n),n}function G_(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!nme(e,n)}catch{return!0}}function lme(e,t){return t()}var cme=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?lme:ame;I7.useSyncExternalStore=uu.useSyncExternalStore!==void 0?uu.useSyncExternalStore:cme;(function(e){e.exports=I7})(eme);/** + * @license React + * use-sync-external-store-shim/with-selector.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var K0=v,ume=fS;function dme(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var fme=typeof Object.is=="function"?Object.is:dme,pme=ume.useSyncExternalStore,hme=K0.useRef,mme=K0.useEffect,gme=K0.useMemo,vme=K0.useDebugValue;T7.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=hme(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=gme(function(){function c(g){if(!u){if(u=!0,f=g,g=r(g),o!==void 0&&s.hasValue){var y=s.value;if(o(y,g))return p=y}return p=g}if(y=p,fme(f,g))return y;var _=r(g);return o!==void 0&&o(y,_)?y:(f=g,p=_)}var u=!1,f,p,h=n===void 0?null:n;return[function(){return c(t())},h===null?void 0:function(){return c(h())}]},[t,n,r,o]);var a=pme(e,i[0],i[1]);return mme(function(){s.hasValue=!0,s.value=a},[a]),vme(a),a};(function(e){e.exports=T7})(Qhe);const yme=px(dS),{useSyncExternalStoreWithSelector:_me}=yme;function wme(e,t=e.getState,n){const r=_me(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return v.useDebugValue(r),r}const PT=e=>{({BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?Xhe(e):e,n=(r,o)=>wme(t,r,o);return Object.assign(n,t),n},fi=e=>e?PT(e):PT,G0=fi(e=>({recentActivity:[],addToRecentActivity:t=>{e(n=>{const{recentActivity:r}=n,o=[...r,t];return o.length>6&&o.splice(0,1),{recentActivity:o}})},setActivities:t=>{e(()=>({recentActivity:[...t]}))}})),ks=fi((e,t)=>({profiles:[],selectedProfile:null,setProfiles:n=>{e(()=>({profiles:[...n]}))},setProfile:n=>{e(()=>({selectedProfile:n}))},findProfileByCitizenId:n=>{e(r=>({selectedProfile:r.profiles.find(o=>o.citizenid===n)||null}))},replaceProfile:n=>{e(r=>({profiles:r.profiles.map(o=>o.citizenid===n.citizenid?n:o),selectedProfile:r.selectedProfile?.citizenid===n.citizenid?n:r.selectedProfile}))},getProfile:n=>{const{profiles:r}=t();return r.find(o=>o.citizenid===n)||null}}));var pS={},bme={get exports(){return pS},set exports(e){pS=e}};(function(e,t){(function(n,r){e.exports=r()})(fx,function(){var n=1e3,r=6e4,o=36e5,i="millisecond",s="second",a="minute",c="hour",u="day",f="week",p="month",h="quarter",g="year",y="date",_="Invalid Date",k=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,S={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(W){var V=["th","st","nd","rd"],U=W%100;return"["+W+(V[(U-20)%10]||V[U]||V[0])+"]"}},P=function(W,V,U){var J=String(W);return!J||J.length>=V?W:""+Array(V+1-J.length).join(U)+W},E={s:P,z:function(W){var V=-W.utcOffset(),U=Math.abs(V),J=Math.floor(U/60),G=U%60;return(V<=0?"+":"-")+P(J,2,"0")+":"+P(G,2,"0")},m:function W(V,U){if(V.date()1)return W(q[0])}else{var H=V.name;I[H]=V,G=H}return!J&&G&&($=G),G||!J&&$},F=function(W,V){if(N(W))return W.clone();var U=typeof V=="object"?V:{};return U.date=W,U.args=arguments,new D(U)},B=E;B.l=R,B.i=N,B.w=function(W,V){return F(W,{locale:V.$L,utc:V.$u,x:V.$x,$offset:V.$offset})};var D=function(){function W(U){this.$L=R(U.locale,null,!0),this.parse(U)}var V=W.prototype;return V.parse=function(U){this.$d=function(J){var G=J.date,A=J.utc;if(G===null)return new Date(NaN);if(B.u(G))return new Date;if(G instanceof Date)return new Date(G);if(typeof G=="string"&&!/Z$/i.test(G)){var q=G.match(k);if(q){var H=q[2]-1||0,ee=(q[7]||"0").substring(0,3);return A?new Date(Date.UTC(q[1],H,q[3]||1,q[4]||0,q[5]||0,q[6]||0,ee)):new Date(q[1],H,q[3]||1,q[4]||0,q[5]||0,q[6]||0,ee)}}return new Date(G)}(U),this.$x=U.x||{},this.init()},V.init=function(){var U=this.$d;this.$y=U.getFullYear(),this.$M=U.getMonth(),this.$D=U.getDate(),this.$W=U.getDay(),this.$H=U.getHours(),this.$m=U.getMinutes(),this.$s=U.getSeconds(),this.$ms=U.getMilliseconds()},V.$utils=function(){return B},V.isValid=function(){return this.$d.toString()!==_},V.isSame=function(U,J){var G=F(U);return this.startOf(J)<=G&&G<=this.endOf(J)},V.isAfter=function(U,J){return F(U)0,I<=$.r||!$.r){I<=1&&E>0&&($=S[E-1]);var N=b[$.l];g&&(I=g(""+I)),_=typeof N=="string"?N.replace("%d",I):N(I,f,$.l,k);break}}if(f)return _;var R=k?b.future:b.past;return typeof R=="function"?R(_):R.replace("%s",_)},i.to=function(u,f){return a(u,f,this,!0)},i.from=function(u,f){return a(u,f,this)};var c=function(u){return u.$u?o.utc():o()};i.toNow=function(u){return this.to(c(this),u)},i.fromNow=function(u){return this.from(c(this),u)}}})})(Sme);const Jl=hS;Vn.extend(Jl);const xme=te(e=>({header:{"&& th":{fontWeight:500}}})),kme=()=>{const{recentActivity:e}=G0(),{findProfileByCitizenId:t}=ks(),n=qk(),r=i=>{t(i.activityID),n(`${i.category.toLocaleLowerCase()}`)},{classes:o}=xme();return z("div",{children:[x(ie,{style:{fontSize:17,color:"white",marginLeft:5},weight:500,children:"Recent Activity"}),x(_e,{style:{backgroundColor:"#222325",height:409,borderRadius:"5px"},children:x(Jhe,{withBorder:!0,borderRadius:5,rowStyle:{backgroundColor:"#222325"},classNames:o,horizontalSpacing:"md",verticalSpacing:"md",highlightOnHover:!0,columns:[{accessor:"type",render:i=>x(Qt,{color:i.type==="Created"?"teal":i.type==="Updated"?"yellow":"red",radius:"sm",children:i.type})},{accessor:"category"},{accessor:"doneBy"},{accessor:"timeAgo",render:i=>x(ie,{children:i.timeAgotext})},{accessor:"actions",title:x(ie,{mr:"xs",children:"Action"}),textAlignment:"center",render:i=>x(de,{position:"center",noWrap:!0,children:x(Fn,{leftIcon:x(npe,{size:"1rem"}),compact:!0,style:{backgroundColor:"rgba(51, 124, 255, 0.2)",color:"rgba(159, 194, 255, 0.8)"},variant:"light",onClick:()=>{r(i)},children:"View"})})}],records:e.slice().reverse().map(i=>{const s=Vn(i.timeAgo).fromNow(),a=s.charAt(0).toUpperCase()+s.slice(1);return{...i,timeAgotext:a}}),idAccessor:"activity.activityID"})})]})},up=fi(e=>({officers:[],activeOfficers:[],addOfficer:({citizenid:t,firstname:n,lastname:r,role:o,callsign:i,phone:s})=>{e(a=>({officers:[...a.officers,{citizenid:t,firstname:n,lastname:r,role:o,callsign:i,phone:s}]}))},removeOfficer:t=>{e(n=>({officers:n.officers.filter(r=>r.citizenid!==t)}))},setOfficers:t=>{e(()=>({officers:[...t]}))},setActiveOfficers:t=>{e(()=>({activeOfficers:[...t]}))}}));function Yo(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:rP(e)?2:oP(e)?3:0}function mS(e,t){return Tu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Pme(e,t){return Tu(e)===2?e.get(t):e[t]}function N7(e,t,n){var r=Tu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Cme(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function rP(e){return Mme&&e instanceof Map}function oP(e){return Tme&&e instanceof Set}function rl(e){return e.o||e.t}function iP(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Nme(e);delete t[_o];for(var n=cP(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Ome),Object.freeze(e),t&&Cf(e,function(n,r){return sP(r,!0)},!0)),e}function Ome(){Yo(2)}function aP(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Vi(e){var t=Rme[e];return t||Yo(18,e),t}function CT(){return Of}function q_(e,t){t&&(Vi("Patches"),e.u=[],e.s=[],e.v=t)}function qv(e){gS(e),e.p.forEach(Eme),e.p=null}function gS(e){e===Of&&(Of=e.l)}function OT(e){return Of={p:[],l:Of,h:e,m:!0,_:0}}function Eme(e){var t=e[_o];t.i===0||t.i===1?t.j():t.g=!0}function Y_(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||Vi("ES5").S(t,e,r),r?(n[_o].P&&(qv(t),Yo(4)),jl(e)&&(e=Yv(t,e),t.l||Jv(t,e)),t.u&&Vi("Patches").M(n[_o].t,e,t.u,t.s)):e=Yv(t,n,[]),qv(t),t.u&&t.v(t.u,t.s),e!==R7?e:void 0}function Yv(e,t,n){if(aP(t))return t;var r=t[_o];if(!r)return Cf(t,function(a,c){return ET(e,r,t,a,c,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Jv(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=iP(r.k):r.o,i=o,s=!1;r.i===3&&(i=new Set(o),o.clear(),s=!0),Cf(i,function(a,c){return ET(e,r,o,a,c,n,s)}),Jv(e,o,!1),n&&e.u&&Vi("Patches").N(r,n,e.u,e.s)}return r.o}function ET(e,t,n,r,o,i,s){if(du(o)){var a=Yv(e,o,i&&t&&t.i!==3&&!mS(t.R,r)?i.concat(r):void 0);if(N7(n,r,a),!du(a))return;e.m=!1}else s&&n.add(o);if(jl(o)&&!aP(o)){if(!e.h.D&&e._<1)return;Yv(e,o),t&&t.A.l||Jv(e,o)}}function Jv(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&sP(t,n)}function J_(e,t){var n=e[_o];return(n?rl(n):e)[t]}function $T(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function vS(e){e.P||(e.P=!0,e.l&&vS(e.l))}function X_(e){e.o||(e.o=iP(e.t))}function yS(e,t,n){var r=rP(t)?Vi("MapSet").F(t,n):oP(t)?Vi("MapSet").T(t,n):e.O?function(o,i){var s=Array.isArray(o),a={i:s?1:0,A:i?i.A:CT(),P:!1,I:!1,R:{},l:i,t:o,k:null,o:null,j:null,C:!1},c=a,u=_S;s&&(c=[a],u=bd);var f=Proxy.revocable(c,u),p=f.revoke,h=f.proxy;return a.k=h,a.j=p,h}(t,n):Vi("ES5").J(t,n);return(n?n.A:CT()).p.push(r),r}function $me(e){return du(e)||Yo(22,e),function t(n){if(!jl(n))return n;var r,o=n[_o],i=Tu(n);if(o){if(!o.P&&(o.i<4||!Vi("ES5").K(o)))return o.t;o.I=!0,r=MT(n,i),o.I=!1}else r=MT(n,i);return Cf(r,function(s,a){o&&Pme(o.t,s)===a||N7(r,s,t(a))}),i===3?new Set(r):r}(e)}function MT(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return iP(e)}var TT,Of,lP=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Mme=typeof Map<"u",Tme=typeof Set<"u",IT=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",R7=lP?Symbol.for("immer-nothing"):((TT={})["immer-nothing"]=!0,TT),NT=lP?Symbol.for("immer-draftable"):"__$immer_draftable",_o=lP?Symbol.for("immer-state"):"__$immer_state",Ime=""+Object.prototype.constructor,cP=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Nme=Object.getOwnPropertyDescriptors||function(e){var t={};return cP(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},Rme={},_S={get:function(e,t){if(t===_o)return e;var n=rl(e);if(!mS(n,t))return function(o,i,s){var a,c=$T(i,s);return c?"value"in c?c.value:(a=c.get)===null||a===void 0?void 0:a.call(o.k):void 0}(e,n,t);var r=n[t];return e.I||!jl(r)?r:r===J_(e.t,t)?(X_(e),e.o[t]=yS(e.A.h,r,e)):r},has:function(e,t){return t in rl(e)},ownKeys:function(e){return Reflect.ownKeys(rl(e))},set:function(e,t,n){var r=$T(rl(e),t);if(r?.set)return r.set.call(e.k,n),!0;if(!e.P){var o=J_(rl(e),t),i=o?.[_o];if(i&&i.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(Cme(n,o)&&(n!==void 0||mS(e.t,t)))return!0;X_(e),vS(e)}return e.o[t]===n&&(n!==void 0||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return J_(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,X_(e),vS(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=rl(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Yo(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Yo(12)}},bd={};Cf(_S,function(e,t){bd[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),bd.deleteProperty=function(e,t){return bd.set.call(this,e,t,void 0)},bd.set=function(e,t,n){return _S.set.call(this,e[0],t,n,e[0])};var Lme=function(){function e(n){var r=this;this.O=IT,this.D=!0,this.produce=function(o,i,s){if(typeof o=="function"&&typeof i!="function"){var a=i;i=o;var c=r;return function(_){var k=this;_===void 0&&(_=a);for(var b=arguments.length,S=Array(b>1?b-1:0),P=1;P1?f-1:0),h=1;h=0;o--){var i=r[o];if(i.path.length===0&&i.op==="replace"){n=i.value;break}}o>-1&&(r=r.slice(o+1));var s=Vi("Patches").$;return du(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),wo=new Lme,zme=wo.produce;wo.produceWithPatches.bind(wo);wo.setAutoFreeze.bind(wo);wo.setUseProxies.bind(wo);wo.applyPatches.bind(wo);wo.createDraft.bind(wo);wo.finishDraft.bind(wo);const Ci=zme,q0=fi((e,t)=>({units:[],addUnit:({unitName:n,unitMembers:r,carModel:o,id:i,isOwner:s})=>{e(a=>({units:[...a.units,{unitName:n,unitMembers:r,carModel:o,id:i,isOwner:s}]}))},deleteUnit:n=>{e(r=>({units:[...r.units.filter(o=>o.id!==n)]}))},setUnits:n=>{e(()=>({units:[...n]}))},getUnitMemberCount:n=>t().units.find(o=>o.id===n)?.unitMembers.length??0,removeUnitMember:(n,r)=>e(Ci(o=>{const i=o.units.find(a=>a.id===n),s=i.unitMembers.findIndex(a=>a.citizenid===r);if(s===-1)console.log("There is no unit member by that citizenid");else if(i.unitMembers.splice(s,1),i.unitMembers.length===0){const a=o.units.findIndex(c=>c.id===n);o.units.splice(a,1)}})),getUnitByOfficer:n=>t().units.find(o=>o.unitMembers.some(i=>i.citizenid===n))})),Ame=te(e=>({user:{display:"block",padding:e.spacing.md,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,"&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0]}}})),Dme=()=>{const{activeOfficers:e}=up(),{getUnitByOfficer:t}=q0(),{classes:n}=Ame();return x("div",{style:{width:400},children:z("div",{style:{backgroundColor:"#222325",height:845,padding:15,borderRadius:5,borderStyle:"solid",borderColor:"#303236",borderWidth:"0.5px"},children:[z("div",{style:{display:"flex",gap:10},children:[x(eP,{stroke:1.5,size:"1.5rem",color:"white"}),z(ie,{style:{fontSize:18,color:"white"},weight:500,children:["Active Officers (",e.length,")"]})]}),x(fn,{style:{marginTop:10,marginBottom:5}}),e.map((r,o)=>z("div",{children:[x("div",{className:n.user,children:z(de,{children:[x(j0,{src:r.image,radius:"md",size:40}),z("div",{style:{flex:1},children:[z(ie,{size:"sm",weight:500,children:[r.firstname," ",r.lastname," (",r.callsign,")"]}),x(ie,{color:"dimmed",size:"xs",children:r.role})]}),z(ie,{size:"xs",weight:500,children:["Unit: ",t(r.citizenid)?t(r.citizenid)?.unitName:"None"]})]})}),o({announcements:[],addAnnouncement:({id:t,title:n,time:r,message:o,postedBy:i})=>{e(s=>({announcements:[...s.announcements,{id:t,title:n,time:r,message:o,postedBy:i}]}))},removeAnnouncement:t=>{e(n=>({announcements:n.announcements.filter(r=>r.id!==t)}))},setAnnouncements:t=>{e(()=>({announcements:[...t]}))}}));Vn.extend(Jl);const jme=()=>{const{announcements:e}=L7();return z("div",{style:{marginTop:20},children:[z(de,{position:"apart",spacing:"xs",style:{marginBottom:5},children:[x(ie,{style:{fontSize:17,color:"white",marginLeft:5},weight:500,children:"Announcements"}),x(ie,{c:"blue",style:{fontSize:14,cursor:"pointer"},fw:600,onClick:()=>{console.log("Click")},children:"View All"})]}),x("div",{style:{display:"flex",gap:10},children:e.slice(0,3).map(t=>z(zr,{p:"md",withBorder:!0,sx:n=>({backgroundColor:"rgb(34, 35, 37)",height:290,borderRadius:5}),children:[z(de,{position:"apart",children:[x(ie,{fz:15,fw:550,c:"white",children:t.title}),x(Qt,{size:"sm",radius:"sm",style:{backgroundColor:"rgba(51, 124, 255, 0.2)",color:"rgba(159, 194, 255, 0.8)"},children:Vn(t.time).fromNow()})]}),x(ie,{fz:13,style:{marginTop:10,marginBottom:10,height:"75%"},children:t.message}),x(de,{position:"apart",mt:"md",children:z(ie,{fz:12,children:["Posted by: ",z(ie,{span:!0,inherit:!0,fz:12,fw:500,children:[t.postedBy.firstname," ",t.postedBy.lastname]})]})})]},t.id))})]})},Bme={citizenid:"",firstname:"",lastname:"",role:"",callsign:"",phone:"",image:""},Aa=fi(e=>({...Bme,setPersonalData:t=>{e({citizenid:t.citizenid,firstname:t.firstname,lastname:t.lastname,role:t.role,callsign:t.callsign,phone:t.phone,image:t.image})}})),Fme=te(e=>({dashboard:{display:"flex",padding:`calc(${e.spacing.md} * 1.5)`},root:{width:T(300),height:T(34),paddingLeft:e.spacing.lg,paddingRight:T(5),borderRadius:e.radius.xs,color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[5],backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`${T(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,"&:hover":{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[5],.85):e.fn.rgba(e.colors.gray[0],.35)}},shortcut:{fontSize:T(11),lineHeight:1,padding:`${T(4)} ${T(7)}`,borderRadius:e.radius.sm,color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],border:`${T(1)} solid ${e.colorScheme==="dark"?e.colors.dark[7]:e.colors.gray[2]}`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.colors.gray[0]}})),Vme=()=>{const{classes:e,cx:t}=Fme(),{firstname:n,lastname:r}=Aa();return z("div",{className:e.dashboard,children:[z("div",{style:{flexGrow:3,width:870},children:[z(de,{position:"apart",children:[z("div",{children:[z(ie,{style:{fontSize:24,color:"white"},weight:500,children:["Welcome back, ",z("span",{children:[n," ",r]})]}),z(ie,{color:"dimmed",size:"xs",style:{display:"flex",gap:10},children:[x(Hfe,{size:T(18)})," ",x(ie,{color:"dimmed",size:14,children:new Date().toLocaleDateString("en-EN",{weekday:"long",year:"numeric",month:"long",day:"numeric"})})]})]}),x(Bn,{className:t(e.root),children:z(de,{spacing:"xs",children:[x(cp,{size:T(14),stroke:1.5}),x(ie,{size:"sm",color:"dimmed",pr:110,children:"Search"}),x(ie,{weight:700,className:e.shortcut,children:"CTRL + F"})]})})]}),x(fn,{style:{marginTop:20,marginBottom:20}}),x(kme,{}),x(jme,{})]}),x(fn,{orientation:"vertical",style:{marginLeft:20,marginRight:20}}),x(Dme,{})]})},Hme=te(e=>({user:{display:"block",width:"100%",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black},item:{marginTop:5,padding:5,borderRadius:5,backgroundColor:"#1d1e20",border:"0.1px solid rgb(42, 42, 42, 1)","&:hover":{backgroundColor:"#17181b"}},icon:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]},name:{fontFamily:`Greycliff CF, ${e.fontFamily}`}})),Wme=e=>{const[t,n]=v.useState(""),{profiles:r}=ks(),{classes:o}=Hme();return z(zr,{p:"sm",withBorder:!0,style:{width:370,backgroundColor:"rgb(34, 35, 37)"},children:[z(Wi,{gap:"xs",justify:"flex-start",align:"center",direction:"row",wrap:"wrap",style:{marginBottom:10},children:[x(hn,{placeholder:"Search profiles...",icon:x(cp,{size:16}),value:t,onChange:i=>n(i.currentTarget.value),w:240}),x(Fn,{variant:"default",leftIcon:x(Jk,{size:T(14)}),children:"Filter"})]}),x(ir,{style:{height:820},children:r.map(i=>x(Bn,{className:o.user,onClick:()=>{e.onClick(i)},children:z(de,{className:o.item,children:[x(j0,{src:i.image,size:62,radius:4}),z("div",{children:[z(ie,{fz:"sm",fw:500,className:o.name,children:["(",i.citizenid,") ",i.firstname," ",i.lastname]}),z(de,{spacing:10,mt:3,children:[x(Qk,{stroke:1.5,size:"1rem",className:o.icon}),x(ie,{fz:"xs",c:"dimmed",children:i.gender})]}),z(de,{spacing:10,mt:5,children:[x(Tpe,{stroke:1.5,size:"1rem",className:o.icon}),x(ie,{fz:"xs",c:"dimmed",children:i.phone})]})]})]})},i.citizenid))})]})},[Ume,Da]=wu("RichTextEditor was not found in tree");function Jn(e){this.content=e}Jn.prototype={constructor:Jn,find:function(e){for(var t=0;t>1}};Jn.from=function(e){if(e instanceof Jn)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Jn(t)};function z7(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let o=e.child(r),i=t.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)n++;return n}if(o.content.size||i.content.size){let s=z7(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function A7(e,t,n,r){for(let o=e.childCount,i=t.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let s=e.child(--o),a=t.child(--i),c=s.nodeSize;if(s==a){n-=c,r-=c;continue}if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let u=0,f=Math.min(s.text.length,a.text.length);for(;ut&&r(c,o+a,i||null,s)!==!1&&c.content.size){let f=a+1;c.nodesBetween(Math.max(0,t-f),Math.min(c.content.size,n-f),r,o+f)}a=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,o){let i="",s=!0;return this.nodesBetween(t,n,(a,c)=>{a.isText?(i+=a.text.slice(Math.max(t,c)-c,n-c),s=!r):a.isLeaf?(o?i+=typeof o=="function"?o(a):o:a.type.spec.leafText&&(i+=a.type.spec.leafText(a)),s=!r):!s&&a.isBlock&&(i+=r,s=!0)},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);it)for(let i=0,s=0;st&&((sn)&&(a.isText?a=a.cut(Math.max(0,t-s),Math.min(a.text.length,n-s)):a=a.cut(Math.max(0,t-s-1),Math.min(a.content.size,n-s-1))),r.push(a),o+=a.nodeSize),s=c}return new se(r,o)}cutByIndex(t,n){return t==n?se.empty:t==0&&n==this.content.length?this:new se(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[t]=n,new se(o,i)}addToStart(t){return new se([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new se(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;nthis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let r=0,o=0;;r++){let i=this.child(r),s=o+i.nodeSize;if(s>=t)return s==t||n>0?Eh(r+1,s):Eh(r,o);o=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return se.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new se(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return se.empty;let n,r=0;for(let o=0;othis.type.rank&&(n||(n=t.slice(0,o)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;nr.type.rank-o.type.rank),n}};bt.none=[];class Qv extends Error{}class ye{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=j7(this.content,t+this.openStart,n);return r&&new ye(r,this.openStart,this.openEnd)}removeBetween(t,n){return new ye(D7(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return ye.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ye(se.fromJSON(t,n.content),r,o)}static maxOpen(t,n=!0){let r=0,o=0;for(let i=t.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=t.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)o++;return new ye(t,r,o)}}ye.empty=new ye(se.empty,0,0);function D7(e,t,n){let{index:r,offset:o}=e.findIndex(t),i=e.maybeChild(r),{index:s,offset:a}=e.findIndex(n);if(o==t||i.isText){if(a!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,i.copy(D7(i.content,t-o-1,n-o-1)))}function j7(e,t,n,r){let{index:o,offset:i}=e.findIndex(t),s=e.maybeChild(o);if(i==t||s.isText)return r&&!r.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let a=j7(s.content,t-i-1,n);return a&&e.replaceChild(o,s.copy(a))}function Zme(e,t,n){if(n.openStart>e.depth)throw new Qv("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Qv("Inconsistent open depths");return B7(e,t,n,0)}function B7(e,t,n,r){let o=e.index(r),i=e.node(r);if(o==t.index(r)&&r=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Fd(e,t,n,r){let o=(t||e).node(n),i=0,s=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(Pl(e.nodeAfter,r),i++));for(let a=i;ao&&bS(e,t,o+1),s=r.depth>o&&bS(n,r,o+1),a=[];return Fd(null,e,o,a),i&&s&&t.index(o)==n.index(o)?(F7(i,s),Pl(Cl(i,V7(e,t,n,r,o+1)),a)):(i&&Pl(Cl(i,ey(e,t,o+1)),a),Fd(t,n,o,a),s&&Pl(Cl(s,ey(n,r,o+1)),a)),Fd(r,null,o,a),new se(a)}function ey(e,t,n){let r=[];if(Fd(null,e,n,r),e.depth>n){let o=bS(e,t,n+1);Pl(Cl(o,ey(e,t,n+1)),r)}return Fd(t,null,n,r),new se(r)}function Kme(e,t){let n=t.depth-e.openStart,o=t.node(n).copy(e.content);for(let i=n-1;i>=0;i--)o=t.node(i).copy(se.from(o));return{start:o.resolveNoCache(e.openStart+n),end:o.resolveNoCache(o.content.size-e.openEnd-n)}}class Ef{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=t.child(n);return r?t.child(n).cut(r):o}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let i=0;i0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new ty(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,i=n;for(let s=t;;){let{index:a,offset:c}=s.content.findIndex(i),u=i-c;if(r.push(s,a,o+c),!u||(s=s.child(a),s.isText))break;i=u-1,o+=c+1}return new Ef(n,r,i)}static resolveCached(t,n){for(let o=0;ot&&this.nodesBetween(t,n,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),H7(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=se.empty,o=0,i=r.childCount){let s=this.contentMatchAt(t).matchFragment(r,o,i),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let c=o;cn.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let o=se.fromJSON(t,n.content);return t.nodeType(n.type).create(n.attrs,o,r)}};Ol.prototype.text=void 0;class ny extends Ol{constructor(t,n,r,o){if(super(t,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):H7(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new ny(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new ny(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function H7(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class Bl{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new Yme(t,n);if(r.next==null)return Bl.empty;let o=W7(r);r.next&&r.err("Unexpected trailing text");let i=rge(nge(o));return oge(i,r),i}matchType(t){for(let n=0;nu.createAndFill()));for(let u=0;u=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let o=0;o{let i=o+(r.validEnd?"*":" ")+" ";for(let s=0;s"+t.indexOf(r.next[s].next);return i}).join(` +`)}}Bl.empty=new Bl(!0);class Yme{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function W7(e){let t=[];do t.push(Jme(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function Jme(e){let t=[];do t.push(Xme(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function Xme(e){let t=tge(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=Qme(e,t);else break;return t}function RT(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function Qme(e,t){let n=RT(e),r=n;return e.eat(",")&&(e.next!="}"?r=RT(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function ege(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let o=[];for(let i in n){let s=n[i];s.groups.indexOf(t)>-1&&o.push(s)}return o.length==0&&e.err("No node type or group '"+t+"' found"),o}function tge(e){if(e.eat("(")){let t=W7(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=ege(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function nge(e){let t=[[]];return o(i(e,0),n()),t;function n(){return t.push([])-1}function r(s,a,c){let u={term:c,to:a};return t[s].push(u),u}function o(s,a){s.forEach(c=>c.to=a)}function i(s,a){if(s.type=="choice")return s.exprs.reduce((c,u)=>c.concat(i(u,a)),[]);if(s.type=="seq")for(let c=0;;c++){let u=i(s.exprs[c],a);if(c==s.exprs.length-1)return u;o(u,a=n())}else if(s.type=="star"){let c=n();return r(a,c),o(i(s.expr,c),c),[r(c)]}else if(s.type=="plus"){let c=n();return o(i(s.expr,a),c),o(i(s.expr,c),c),[r(c)]}else{if(s.type=="opt")return[r(a)].concat(i(s.expr,a));if(s.type=="range"){let c=a;for(let u=0;u{e[s].forEach(({term:a,to:c})=>{if(!a)return;let u;for(let f=0;f{u||o.push([a,u=[]]),u.indexOf(f)==-1&&u.push(f)})})});let i=t[r.join(",")]=new Bl(r.indexOf(e.length-1)>-1);for(let s=0;s-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;nr[i]=new q7(i,n,s));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class ige{constructor(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}get isRequired(){return!this.hasDefault}}class Y0{constructor(t,n,r,o){this.name=t,this.rank=n,this.schema=r,this.spec=o,this.attrs=G7(o.attrs),this.excluded=null;let i=Z7(this.attrs);this.instance=i?new bt(this,i):null}create(t=null){return!t&&this.instance?this.instance:new bt(this,K7(this.attrs,t))}static compile(t,n){let r=Object.create(null),o=0;return t.forEach((i,s)=>r[i]=new Y0(i,o++,n,s)),r}removeFromSet(t){for(var n=0;n-1}}class sge{constructor(t){this.cached=Object.create(null);let n=this.spec={};for(let o in t)n[o]=t[o];n.nodes=Jn.from(t.nodes),n.marks=Jn.from(t.marks||{}),this.nodes=zT.compile(this.spec.nodes,this),this.marks=Y0.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],s=i.spec.content||"",a=i.spec.marks;i.contentMatch=r[s]||(r[s]=Bl.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet=a=="_"?null:a?AT(this,a.split(" ")):a==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:AT(this,s.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,r,o){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof zT){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,o)}text(t,n){let r=this.nodes.text;return new ny(r,r.defaultAttrs,t,bt.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeFromJSON(t){return Ol.fromJSON(this,t)}markFromJSON(t){return bt.fromJSON(this,t)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}}function AT(e,t){let n=[];for(let r=0;r-1)&&n.push(s=c)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class fu{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[],n.forEach(r=>{r.tag?this.tags.push(r):r.style&&this.styles.push(r)}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let o=t.nodes[r.node];return o.contentMatch.matchType(o)})}parse(t,n={}){let r=new jT(this,n,!1);return r.addAll(t,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new jT(this,n,!0);return r.addAll(t,n.from,n.to),ye.maxOpen(r.finish())}matchTag(t,n,r){for(let o=r?this.tags.indexOf(r)+1:0;ot.length&&(a.charCodeAt(t.length)!=61||a.slice(t.length+1)!=n))){if(s.getAttrs){let c=s.getAttrs(n);if(c===!1)continue;s.attrs=c||void 0}return s}}}static schemaRules(t){let n=[];function r(o){let i=o.priority==null?50:o.priority,s=0;for(;s{r(s=BT(s)),s.mark||s.ignore||s.clearMark||(s.mark=o)})}for(let o in t.nodes){let i=t.nodes[o].spec.parseDOM;i&&i.forEach(s=>{r(s=BT(s)),s.node||s.ignore||s.mark||(s.node=o)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new fu(t,fu.schemaRules(t)))}}const Y7={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},age={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},J7={ol:!0,ul:!0},ry=1,oy=2,Vd=4;function DT(e,t,n){return t!=null?(t?ry:0)|(t==="full"?oy:0):e&&e.whitespace=="pre"?ry|oy:n&~Vd}class $h{constructor(t,n,r,o,i,s,a){this.type=t,this.attrs=n,this.marks=r,this.pendingMarks=o,this.solid=i,this.options=a,this.content=[],this.activeMarks=bt.none,this.stashMarks=[],this.match=s||(a&Vd?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(se.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(t.type))?(this.match=r,o):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&ry)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let n=se.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(se.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}popFromStashMark(t){for(let n=this.stashMarks.length-1;n>=0;n--)if(t.eq(this.stashMarks[n]))return this.stashMarks.splice(n,1)[0]}applyPending(t){for(let n=0,r=this.pendingMarks;n{s.clearMark(a)&&(r=a.addToSet(r))}):n=this.parser.schema.marks[s.mark].create(s.attrs).addToSet(n),s.consuming===!1)i=s;else break}return[n,r]}addElementByRule(t,n,r){let o,i,s;n.node?(i=this.parser.schema.nodes[n.node],i.isLeaf?this.insertNode(i.create(n.attrs))||this.leafFallback(t):o=this.enter(i,n.attrs||null,n.preserveWhitespace)):(s=this.parser.schema.marks[n.mark].create(n.attrs),this.addPendingMark(s));let a=this.top;if(i&&i.isLeaf)this.findInside(t);else if(r)this.addElement(t,r);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(c=>this.insertNode(c));else{let c=t;typeof n.contentElement=="string"?c=t.querySelector(n.contentElement):typeof n.contentElement=="function"?c=n.contentElement(t):n.contentElement&&(c=n.contentElement),this.findAround(t,c,!0),this.addAll(c)}o&&this.sync(a)&&this.open--,s&&this.removePendingMark(s,a)}addAll(t,n,r){let o=n||0;for(let i=n?t.childNodes[n]:t.firstChild,s=r==null?null:t.childNodes[r];i!=s;i=i.nextSibling,++o)this.findAtPoint(t,o),this.addDOM(i);this.findAtPoint(t,o)}findPlace(t){let n,r;for(let o=this.open;o>=0;o--){let i=this.nodes[o],s=i.findWrapping(t);if(s&&(!n||n.length>s.length)&&(n=s,r=i,!s.length)||i.solid)break}if(!n)return!1;this.sync(r);for(let o=0;othis.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(t){for(let n=this.open;n>=0;n--)if(this.nodes[n]==t)return this.open=n,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)t+=r[o].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=(a,c)=>{for(;a>=0;a--){let u=n[a];if(u==""){if(a==n.length-1||a==0)continue;for(;c>=i;c--)if(s(a-1,c))return!0;return!1}else{let f=c>0||c==0&&o?this.nodes[c].type:r&&c>=i?r.node(c-i).type:null;if(!f||f.name!=u&&f.groups.indexOf(u)==-1)return!1;c--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}addPendingMark(t){let n=fge(t,this.top.pendingMarks);n&&this.top.stashMarks.push(n),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)}removePendingMark(t,n){for(let r=this.open;r>=0;r--){let o=this.nodes[r];if(o.pendingMarks.lastIndexOf(t)>-1)o.pendingMarks=t.removeFromSet(o.pendingMarks);else{o.activeMarks=t.removeFromSet(o.activeMarks);let s=o.popFromStashMark(t);s&&o.type&&o.type.allowsMarkType(s.type)&&(o.activeMarks=s.addToSet(o.activeMarks))}if(o==n)break}}}function lge(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&J7.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function cge(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function uge(e){let t=/\s*([\w-]+)\s*:\s*([^;]+)/g,n,r=[];for(;n=t.exec(e);)r.push(n[1],n[2].trim());return r}function BT(e){let t={};for(let n in e)t[n]=e[n];return t}function dge(e,t){let n=t.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(e))continue;let i=[],s=a=>{i.push(a);for(let c=0;c{if(i.length||s.marks.length){let a=0,c=0;for(;a=0;o--){let i=this.serializeMark(t.marks[o],t.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(t,n,r={}){let o=this.marks[t.type.name];return o&&zi.renderSpec(nw(r),o(t,n))}static renderSpec(t,n,r=null){if(typeof n=="string")return{dom:t.createTextNode(n)};if(n.nodeType!=null)return{dom:n};if(n.dom&&n.dom.nodeType!=null)return n;let o=n[0],i=o.indexOf(" ");i>0&&(r=o.slice(0,i),o=o.slice(i+1));let s,a=r?t.createElementNS(r,o):t.createElement(o),c=n[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let f in c)if(c[f]!=null){let p=f.indexOf(" ");p>0?a.setAttributeNS(f.slice(0,p),f.slice(p+1),c[f]):a.setAttribute(f,c[f])}}for(let f=u;fu)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:h,contentDOM:g}=zi.renderSpec(t,p,r);if(a.appendChild(h),g){if(s)throw new RangeError("Multiple content holes");s=g}}}return{dom:a,contentDOM:s}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new zi(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=FT(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return FT(t.marks)}}function FT(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function nw(e){return e.document||window.document}const X7=65535,Q7=Math.pow(2,16);function pge(e,t){return e+t*Q7}function VT(e){return e&X7}function hge(e){return(e-(e&X7))/Q7}const ej=1,tj=2,dm=4,nj=8;class xS{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&nj)>0}get deletedBefore(){return(this.delInfo&(ej|dm))>0}get deletedAfter(){return(this.delInfo&(tj|dm))>0}get deletedAcross(){return(this.delInfo&dm)>0}}class zo{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&zo.empty)return zo.empty}recover(t){let n=0,r=VT(t);if(!this.inverted)for(let o=0;ot)break;let u=this.ranges[a+i],f=this.ranges[a+s],p=c+u;if(t<=p){let h=u?t==c?-1:t==p?1:n:n,g=c+o+(h<0?0:f);if(r)return g;let y=t==(n<0?c:p)?null:pge(a/3,t-c),_=t==c?tj:t==p?ej:dm;return(n<0?t!=c:t!=p)&&(_|=nj),new xS(g,_,y)}o+=f-u}return r?t+o:new xS(t+o,0,null)}touches(t,n){let r=0,o=VT(n),i=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;at)break;let u=this.ranges[a+i],f=c+u;if(t<=f&&a==o*3)return!0;r+=this.ranges[a+s]-u}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o=0;n--){let o=t.getMirror(n);this.appendMap(t.maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let t=new Zc;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;ri&&c!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),o),n.openStart,n.openEnd);return $n.fromReplace(t,this.from,this.to,i)}invert(){return new Ai(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new ta(n.pos,r.pos,this.mark)}merge(t){return t instanceof ta&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new ta(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new ta(n.from,n.to,t.markFromJSON(n.mark))}}ro.jsonID("addMark",ta);class Ai extends ro{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new ye(uP(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),t),n.openStart,n.openEnd);return $n.fromReplace(t,this.from,this.to,r)}invert(){return new ta(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Ai(n.pos,r.pos,this.mark)}merge(t){return t instanceof Ai&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Ai(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Ai(n.from,n.to,t.markFromJSON(n.mark))}}ro.jsonID("removeMark",Ai);class na extends ro{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return $n.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return $n.fromReplace(t,this.pos,this.pos+1,new ye(se.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;or.pos?null:new jn(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new jn(n.from,n.to,n.gapFrom,n.gapTo,ye.fromJSON(t,n.slice),n.insert,!!n.structure)}}ro.jsonID("replaceAround",jn);function kS(e,t,n){let r=e.resolve(t),o=n-t,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let s=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}}return!1}function mge(e,t,n,r){let o=[],i=[],s,a;e.doc.nodesBetween(t,n,(c,u,f)=>{if(!c.isInline)return;let p=c.marks;if(!r.isInSet(p)&&f.type.allowsMarkType(r.type)){let h=Math.max(u,t),g=Math.min(u+c.nodeSize,n),y=r.addToSet(p);for(let _=0;_e.step(c)),i.forEach(c=>e.step(c))}function gge(e,t,n,r){let o=[],i=0;e.doc.nodesBetween(t,n,(s,a)=>{if(!s.isInline)return;i++;let c=null;if(r instanceof Y0){let u=s.marks,f;for(;f=r.isInSet(u);)(c||(c=[])).push(f),u=f.removeFromSet(u)}else r?r.isInSet(s.marks)&&(c=[r]):c=s.marks;if(c&&c.length){let u=Math.min(a+s.nodeSize,n);for(let f=0;fe.step(new Ai(s.from,s.to,s.style)))}function vge(e,t,n,r=n.contentMatch){let o=e.doc.nodeAt(t),i=[],s=t+1;for(let a=0;a=0;a--)e.step(i[a])}function yge(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Iu(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth;;--r){let o=e.$from.node(r),i=e.$from.index(r),s=e.$to.indexAfter(r);if(rn;y--)_||r.index(y)>0?(_=!0,f=se.from(r.node(y).copy(f)),p++):c--;let h=se.empty,g=0;for(let y=i,_=!1;y>n;y--)_||o.after(y+1)=0;s--){if(r.size){let a=n[s].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=se.from(n[s].type.create(n[s].attrs,r))}let o=t.start,i=t.end;e.step(new jn(o,i,o,i,new ye(r,0,0),n.length,!0))}function xge(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=e.steps.length;e.doc.nodesBetween(t,n,(s,a)=>{if(s.isTextblock&&!s.hasMarkup(r,o)&&kge(e.doc,e.mapping.slice(i).map(a),r)){e.clearIncompatible(e.mapping.slice(i).map(a,1),r);let c=e.mapping.slice(i),u=c.map(a,1),f=c.map(a+s.nodeSize,1);return e.step(new jn(u,f,u+1,f-1,new ye(se.from(r.create(o,null,s.marks)),0,0),1,!0)),!1}})}function kge(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function Pge(e,t,n,r,o){let i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new jn(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new ye(se.from(s),0,0),1,!0))}function Kc(e,t,n=1,r){let o=e.resolve(t),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let u=o.depth-1,f=n-2;u>i;u--,f--){let p=o.node(u),h=o.index(u);if(p.type.spec.isolating)return!1;let g=p.content.cutByIndex(h,p.childCount),y=r&&r[f]||p;if(y!=p&&(g=g.replaceChild(0,y.type.create(y.attrs))),!p.canReplace(h+1,p.childCount)||!y.type.validContent(g))return!1}let a=o.indexAfter(i),c=r&&r[0];return o.node(i).canReplaceWith(a,a,c?c.type:o.node(i+1).type)}function Cge(e,t,n=1,r){let o=e.doc.resolve(t),i=se.empty,s=se.empty;for(let a=o.depth,c=o.depth-n,u=n-1;a>c;a--,u--){i=se.from(o.node(a).copy(i));let f=r&&r[u];s=se.from(f?f.type.create(f.attrs,s):o.node(a).copy(s))}e.step(new yr(t,t,new ye(i.append(s),n,n),!0))}function ja(e,t){let n=e.resolve(t),r=n.index();return rj(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function rj(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function oj(e,t,n=-1){let r=e.resolve(t);for(let o=r.depth;;o--){let i,s,a=r.index(o);if(o==r.depth?(i=r.nodeBefore,s=r.nodeAfter):n>0?(i=r.node(o+1),a++,s=r.node(o).maybeChild(a)):(i=r.node(o).maybeChild(a-1),s=r.node(o+1)),i&&!i.isTextblock&&rj(i,s)&&r.node(o).canReplace(a,a+1))return t;if(o==0)break;t=n<0?r.before(o):r.after(o)}}function Oge(e,t,n){let r=new yr(t-n,t+n,ye.empty,!0);e.step(r)}function Ege(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,n))return r.after(o+1);if(i=0;s--){let a=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,c=r.index(s)+(a>0?1:0),u=r.node(s),f=!1;if(i==1)f=u.canReplace(c,c,o);else{let p=u.contentMatchAt(c).findWrapping(o.firstChild.type);f=p&&u.canReplaceWith(c,c,p[0])}if(f)return a==0?r.pos:a<0?r.before(s+1):r.after(s+1)}return null}function fP(e,t,n=t,r=ye.empty){if(t==n&&!r.size)return null;let o=e.resolve(t),i=e.resolve(n);return sj(o,i,r)?new yr(t,n,r):new $ge(o,i,r).fit()}function sj(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class $ge{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=se.empty;for(let o=0;o<=t.depth;o++){let i=t.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(t.indexAfter(o))})}for(let o=t.depth;o>0;o--)this.placed=se.from(t.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(t<0?this.$to:r.doc.resolve(t));if(!o)return null;let i=this.placed,s=r.depth,a=o.depth;for(;s&&a&&i.childCount==1;)i=i.firstChild.content,s--,a--;let c=new ye(i,s,a);return t>-1?new jn(r.pos,t,this.$to.pos,this.$to.end(),c,n):c.size||r.pos!=this.$to.pos?new yr(r.pos,o.pos,c):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r1&&(o=0),i.type.spec.isolating&&o<=r){t=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=ow(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let s=o.firstChild;for(let a=this.depth;a>=0;a--){let{type:c,match:u}=this.frontier[a],f,p=null;if(n==1&&(s?u.matchType(s.type)||(p=u.fillBefore(se.from(s),!1)):i&&c.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:a,parent:i,inject:p};if(n==2&&s&&(f=u.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:a,parent:i,wrap:f};if(i&&u.matchType(i.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=ow(t,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new ye(t,n+1,Math.max(r,o.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=ow(t,n);if(o.childCount<=1&&n>0){let i=t.size-n<=n+o.size;this.unplaced=new ye(Sd(t,n-1,1),n-1,i?n-1:r)}else this.unplaced=new ye(Sd(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:o,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let _=0;_1||c==0||_.content.size)&&(p=k,f.push(aj(_.mark(h.allowedMarks(_.marks)),u==1?c:0,u==a.childCount?g:-1)))}let y=u==a.childCount;y||(g=-1),this.placed=xd(this.placed,n,se.from(f)),this.frontier[n].match=p,y&&g<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let _=0,k=a;_1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],i=n=0;a--){let{match:c,type:u}=this.frontier[a],f=iw(t,a,u,c,!0);if(!f||f.childCount)continue e}return{depth:n,fit:s,move:i?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=xd(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let o=t.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,t.index(r));this.openFrontierNode(o.type,o.attrs,i)}return t}openFrontierNode(t,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(t),this.placed=xd(this.placed,this.depth,se.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(se.empty,!0);n.childCount&&(this.placed=xd(this.placed,this.frontier.length,n))}}function Sd(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(Sd(e.firstChild.content,t-1,n)))}function xd(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(xd(e.lastChild.content,t-1,n)))}function ow(e,t){for(let n=0;n1&&(r=r.replaceChild(0,aj(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(se.empty,!0)))),e.copy(r)}function iw(e,t,n,r,o){let i=e.node(t),s=o?e.indexAfter(t):e.index(t);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let a=r.fillBefore(i.content,!0,s);return a&&!Mge(n,i.content,s)?a:null}function Mge(e,t,n){for(let r=n;r0;h--,g--){let y=o.node(h).type.spec;if(y.defining||y.definingAsContext||y.isolating)break;s.indexOf(h)>-1?a=h:o.before(h)==g&&s.splice(1,0,-h)}let c=s.indexOf(a),u=[],f=r.openStart;for(let h=r.content,g=0;;g++){let y=h.firstChild;if(u.push(y),g==r.openStart)break;h=y.content}for(let h=f-1;h>=0;h--){let g=u[h].type,y=Tge(g);if(y&&o.node(c).type!=g)f=h;else if(y||!g.isTextblock)break}for(let h=r.openStart;h>=0;h--){let g=(h+f+1)%(r.openStart+1),y=u[g];if(y)for(let _=0;_=0&&(e.replace(t,n,r),!(e.steps.length>p));h--){let g=s[h];g<0||(t=o.before(g),n=i.after(g))}}function lj(e,t,n,r,o){if(tr){let i=o.contentMatchAt(0),s=i.fillBefore(e).append(e);e=s.append(i.matchFragment(s).fillBefore(se.empty,!0))}return e}function Nge(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let o=Ege(e.doc,t,r.type);o!=null&&(t=n=o)}e.replaceRange(t,n,new ye(se.from(r),0,0))}function Rge(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),i=cj(r,o);for(let s=0;s0&&(c||r.node(a-1).canReplace(r.index(a-1),o.indexAfter(a-1))))return e.delete(r.before(a),o.after(a))}for(let s=1;s<=r.depth&&s<=o.depth;s++)if(t-r.start(s)==r.depth-s&&n>r.end(s)&&o.end(s)-n!=o.depth-s)return e.delete(r.before(s),n);e.delete(t,n)}function cj(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let o=r;o>=0;o--){let i=e.start(o);if(it.pos+(t.depth-o)||e.node(o).type.spec.isolating||t.node(o).type.spec.isolating)break;(i==t.start(o)||o==e.depth&&o==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&o&&t.start(o-1)==i-1)&&n.push(o)}return n}class Gc extends ro{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return $n.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return $n.fromReplace(t,this.pos,this.pos+1,new ye(se.from(o),0,n.isLeaf?0:1))}getMap(){return zo.empty}invert(t){return new Gc(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Gc(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Gc(n.pos,n.attr,n.value)}}ro.jsonID("attr",Gc);let hu=class extends Error{};hu=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};hu.prototype=Object.create(Error.prototype);hu.prototype.constructor=hu;hu.prototype.name="TransformError";class uj{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Zc}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new hu(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,r=ye.empty){let o=fP(this.doc,t,n,r);return o&&this.step(o),this}replaceWith(t,n,r){return this.replace(t,n,new ye(se.from(r),0,0))}delete(t,n){return this.replace(t,n,ye.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return Ige(this,t,n,r),this}replaceRangeWith(t,n,r){return Nge(this,t,n,r),this}deleteRange(t,n){return Rge(this,t,n),this}lift(t,n){return _ge(this,t,n),this}join(t,n=1){return Oge(this,t,n),this}wrap(t,n){return Sge(this,t,n),this}setBlockType(t,n=t,r,o=null){return xge(this,t,n,r,o),this}setNodeMarkup(t,n,r=null,o){return Pge(this,t,n,r,o),this}setNodeAttribute(t,n,r){return this.step(new Gc(t,n,r)),this}addNodeMark(t,n){return this.step(new na(t,n)),this}removeNodeMark(t,n){if(!(n instanceof bt)){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n=n.isInSet(r.marks),!n)return this}return this.step(new pu(t,n)),this}split(t,n=1,r){return Cge(this,t,n,r),this}addMark(t,n,r){return mge(this,t,n,r),this}removeMark(t,n,r){return gge(this,t,n,r),this}clearIncompatible(t,n,r){return vge(this,t,n,r),this}}const sw=Object.create(null);class Ue{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new Lge(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n=0;i--){let s=n<0?hc(t.node(0),t.node(i),t.before(i+1),t.index(i),n,r):hc(t.node(0),t.node(i),t.after(i+1),t.index(i)+1,n,r);if(s)return s}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new ri(t.node(0))}static atStart(t){return hc(t,t,0,0,1)||new ri(t)}static atEnd(t){return hc(t,t,t.content.size,t.childCount,-1)||new ri(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=sw[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in sw)throw new RangeError("Duplicate use of selection JSON ID "+t);return sw[t]=n,n.prototype.jsonID=t,n}getBookmark(){return qe.between(this.$anchor,this.$head).getBookmark()}}Ue.prototype.visible=!0;class Lge{constructor(t,n){this.$from=t,this.$to=n}}let WT=!1;function UT(e){!WT&&!e.parent.inlineContent&&(WT=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class qe extends Ue{constructor(t,n=t){UT(t),UT(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return Ue.near(r);let o=t.resolve(n.map(this.anchor));return new qe(o.parent.inlineContent?o:r,r)}replace(t,n=ye.empty){if(super.replace(t,n),n==ye.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof qe&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new J0(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new qe(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let o=t.resolve(n);return new this(o,r==n?o:t.resolve(r))}static between(t,n,r){let o=t.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let i=Ue.findFrom(n,r,!0)||Ue.findFrom(n,-r,!0);if(i)n=i.$head;else return Ue.near(n,r)}return t.parent.inlineContent||(o==0?t=n:(t=(Ue.findFrom(t,-r,!0)||Ue.findFrom(t,r,!0)).$anchor,t.pos0?0:1);o>0?s=0;s+=o){let a=t.child(s);if(a.isAtom){if(!i&&Ie.isSelectable(a))return Ie.create(e,n-(o<0?a.nodeSize:0))}else{let c=hc(e,a,n+o,o<0?a.childCount:0,o,i);if(c)return c}n+=a.nodeSize*o}return null}function ZT(e,t,n){let r=e.steps.length-1;if(r{s==null&&(s=f)}),e.setSelection(Ue.near(e.doc.resolve(s),n))}const KT=1,Mh=2,GT=4;class Age extends uj{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(t){return this.storedMarks=t,this.updated|=Mh,this}ensureMarks(t){return bt.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Mh)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~Mh,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let r=this.selection;return n&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||bt.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,r){let o=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(o.text(t),!0):this.deleteSelection();{if(r==null&&(r=n),r=r??n,!t)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let s=this.doc.resolve(n);i=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(t,i)),this.selection.empty||this.setSelection(Ue.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=GT,this}get scrolledIntoView(){return(this.updated>)>0}}function qT(e,t){return!t||!e?e:e.bind(t)}class kd{constructor(t,n,r){this.name=t,this.init=qT(n.init,r),this.apply=qT(n.apply,r)}}const Dge=[new kd("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new kd("selection",{init(e,t){return e.selection||Ue.atStart(t.doc)},apply(e){return e.selection}}),new kd("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new kd("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class aw{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Dge.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new kd(r.key,r.spec.state,r))})}}class Mc{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,n=-1){for(let r=0;rr.toJSON())),t&&typeof t=="object")for(let r in t){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=t[r],i=o.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(o,this[o.key]))}return n}static fromJSON(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let o=new aw(t.schema,t.plugins),i=new Mc(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=Ol.fromJSON(t.schema,n.doc);else if(s.name=="selection")i.selection=Ue.fromJSON(i.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let a in r){let c=r[a],u=c.spec.state;if(c.key==s.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){i[s.name]=u.fromJSON.call(c,t,n[a],i);return}}i[s.name]=s.init(t,i)}}),i}}function dj(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):r=="handleDOMEvents"&&(o=dj(o,t,{})),n[r]=o}return n}class Ar{constructor(t){this.spec=t,this.props={},t.props&&dj(t.props,this,this.props),this.key=t.key?t.key.key:fj("plugin")}getState(t){return t[this.key]}}const lw=Object.create(null);function fj(e){return e in lw?e+"$"+ ++lw[e]:(lw[e]=0,e+"$")}class pi{constructor(t="key"){this.key=fj(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const fo=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},$f=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let YT=null;const is=function(e,t,n){let r=YT||(YT=document.createRange());return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},Fl=function(e,t,n,r){return n&&(JT(e,t,n,r,-1)||JT(e,t,n,r,1))},jge=/^(img|br|input|textarea|hr)$/i;function JT(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:Ri(e))){let i=e.parentNode;if(!i||i.nodeType!=1||Fge(e)||jge.test(e.nodeName)||e.contentEditable=="false")return!1;t=fo(e)+(o<0?0:1),e=i}else if(e.nodeType==1){if(e=e.childNodes[t+(o<0?-1:0)],e.contentEditable=="false")return!1;t=o<0?Ri(e):0}else return!1}}function Ri(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Bge(e,t,n){for(let r=t==0,o=t==Ri(e);r||o;){if(e==n)return!0;let i=fo(e);if(e=e.parentNode,!e)return!1;r=r&&i==0,o=o&&i==Ri(e)}}function Fge(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const X0=function(e){return e.focusNode&&Fl(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function sl(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function Vge(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}const $a=typeof navigator<"u"?navigator:null,XT=typeof document<"u"?document:null,Ba=$a&&$a.userAgent||"",PS=/Edge\/(\d+)/.exec(Ba),pj=/MSIE \d/.exec(Ba),CS=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ba),eo=!!(pj||CS||PS),wa=pj?document.documentMode:CS?+CS[1]:PS?+PS[1]:0,ci=!eo&&/gecko\/(\d+)/i.test(Ba);ci&&+(/Firefox\/(\d+)/.exec(Ba)||[0,0])[1];const OS=!eo&&/Chrome\/(\d+)/.exec(Ba),Or=!!OS,Hge=OS?+OS[1]:0,Mr=!eo&&!!$a&&/Apple Computer/.test($a.vendor),mu=Mr&&(/Mobile\/\w+/.test(Ba)||!!$a&&$a.maxTouchPoints>2),Mo=mu||($a?/Mac/.test($a.platform):!1),qo=/Android \d/.test(Ba),Q0=!!XT&&"webkitFontSmoothing"in XT.documentElement.style,Wge=Q0?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function Uge(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Ls(e,t){return typeof e=="number"?e:e[t]}function Zge(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function QT(e,t,n){let r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument;for(let s=n||e.dom;s;s=$f(s)){if(s.nodeType!=1)continue;let a=s,c=a==i.body,u=c?Uge(i):Zge(a),f=0,p=0;if(t.topu.bottom-Ls(r,"bottom")&&(p=t.bottom-u.bottom+Ls(o,"bottom")),t.leftu.right-Ls(r,"right")&&(f=t.right-u.right+Ls(o,"right")),f||p)if(c)i.defaultView.scrollBy(f,p);else{let h=a.scrollLeft,g=a.scrollTop;p&&(a.scrollTop+=p),f&&(a.scrollLeft+=f);let y=a.scrollLeft-h,_=a.scrollTop-g;t={left:t.left-y,top:t.top-_,right:t.right-y,bottom:t.bottom-_}}if(c)break}}function Kge(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,o;for(let i=(t.left+t.right)/2,s=n+1;s=n-20){r=a,o=c.top;break}}return{refDOM:r,refTop:o,stack:hj(e.dom)}}function hj(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=$f(r));return t}function Gge({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;mj(n,r==0?0:r-t)}function mj(e,t){for(let n=0;n=a){s=Math.max(h.bottom,s),a=Math.min(h.top,a);let g=h.left>t.left?h.left-t.left:h.right=(h.left+h.right)/2?1:0));continue}}!n&&(t.left>=h.right&&t.top>=h.top||t.left>=h.left&&t.top>=h.bottom)&&(i=u+1)}}return n&&n.nodeType==3?Yge(n,o):!n||r&&n.nodeType==1?{node:e,offset:i}:gj(n,o)}function Yge(e,t){let n=e.nodeValue.length,r=document.createRange();for(let o=0;o=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}function hP(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function Jge(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(r,o,i)}function Qge(e,t,n,r){let o=-1;for(let i=t,s=!1;i!=e.dom;){let a=e.docView.nearestDesc(i,!0);if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent&&!s||!a.contentDOM)){let c=a.dom.getBoundingClientRect();if(a.node.isBlock&&a.parent&&!s&&(s=!0,c.left>r.left||c.top>r.top?o=a.posBefore:(c.right-1?o:e.docView.posFromDOM(t,n,-1)}function vj(e,t,n){let r=e.childNodes.length;if(r&&n.topt.top&&o++}r==e.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(s=Qge(e,r,o,t))}s==null&&(s=Xge(e,i,t));let a=e.docView.nearestDesc(i,!0);return{pos:s,inside:a?a.posAtStart-a.border:-1}}function js(e,t){let n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}const tve=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function yj(e,t,n){let{node:r,offset:o,atom:i}=e.docView.domFromPos(t,n<0?-1:1),s=Q0||ci;if(r.nodeType==3)if(s&&(tve.test(r.nodeValue)||(n<0?!o:o==r.nodeValue.length))){let c=js(is(r,o,o),n);if(ci&&o&&/\s/.test(r.nodeValue[o-1])&&o=0&&o==r.nodeValue.length?(c--,f=1):n<0?c--:u++,md(js(is(r,c,u),1),f<0)}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==Ri(r))){let c=r.childNodes[o-1];if(c.nodeType==1)return cw(c.getBoundingClientRect(),!1)}if(i==null&&o=0)}if(i==null&&o&&(n<0||o==Ri(r))){let c=r.childNodes[o-1],u=c.nodeType==3?is(c,Ri(c)-(s?0:1)):c.nodeType==1&&(c.nodeName!="BR"||!c.nextSibling)?c:null;if(u)return md(js(u,1),!1)}if(i==null&&o=0)}function md(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function cw(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function _j(e,t,n){let r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}function nve(e,t,n){let r=t.selection,o=n=="up"?r.$from:r.$to;return _j(e,t,()=>{let{node:i}=e.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let a=e.docView.nearestDesc(i,!0);if(!a)break;if(a.node.isBlock){i=a.contentDOM||a.dom;break}i=a.dom.parentNode}let s=yj(e,o.pos,1);for(let a=i.firstChild;a;a=a.nextSibling){let c;if(a.nodeType==1)c=a.getClientRects();else if(a.nodeType==3)c=is(a,0,a.nodeValue.length).getClientRects();else continue;for(let u=0;uf.top+1&&(n=="up"?s.top-f.top>(f.bottom-s.top)*2:f.bottom-s.bottom>(s.bottom-f.top)*2))return!1}}return!0})}const rve=/[\u0590-\u08ac]/;function ove(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,a=e.domSelection();return!rve.test(r.parent.textContent)||!a.modify?n=="left"||n=="backward"?i:s:_j(e,t,()=>{let{focusNode:c,focusOffset:u,anchorNode:f,anchorOffset:p}=e.domSelectionRange(),h=a.caretBidiLevel;a.modify("move",n,"character");let g=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:y,focusOffset:_}=e.domSelectionRange(),k=y&&!g.contains(y.nodeType==1?y:y.parentNode)||c==y&&u==_;try{a.collapse(f,p),c&&(c!=f||u!=p)&&a.extend&&a.extend(c,u)}catch{}return h!=null&&(a.caretBidiLevel=h),k})}let eI=null,tI=null,nI=!1;function ive(e,t,n){return eI==t&&tI==n?nI:(eI=t,tI=n,nI=n=="up"||n=="down"?nve(e,t,n):ove(e,t,n))}const oi=0,rI=1,Tc=2,Ui=3;class dp{constructor(t,n,r,o){this.parent=t,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=oi,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;nfo(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&n==t.childNodes.length)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let r=!0,o=t;o;o=o.parentNode){let i=this.getDesc(o),s;if(i&&(!n||i.node))if(r&&(s=i.nodeDOM)&&!(s.nodeType==1?s.contains(t.nodeType==1?t:t.parentNode):s==t))r=!1;else return i}}getDesc(t){let n=t.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(t,n,r){for(let o=t;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(t,n,r)}return-1}descAt(t){for(let n=0,r=0;nt||s instanceof bj){o=t-i;break}i=a}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof wj&&i.side>=0;r--);if(n<=0){let i,s=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,s=!1);return i&&n&&s&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?fo(i.dom)+1:0}}else{let i,s=!0;for(;i=r=f&&n<=u-c.border&&c.node&&c.contentDOM&&this.contentDOM.contains(c.contentDOM))return c.parseRange(t,n,f);t=s;for(let p=a;p>0;p--){let h=this.children[p-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){o=fo(h.dom)+1;break}t-=h.size}o==-1&&(o=0)}if(o>-1&&(u>n||a==this.children.length-1)){n=u;for(let f=a+1;fg&&s<_)return y.setSelection(t-g-y.border,n-g-y.border,r,o);g=_}let a=this.domFromPos(t,t?-1:1),c=n==t?a:this.domFromPos(n,n?-1:1),u=r.getSelection(),f=!1;if((ci||Mr)&&t==n){let{node:h,offset:g}=a;if(h.nodeType==3){if(f=!!(g&&h.nodeValue[g-1]==` +`),f&&g==h.nodeValue.length)for(let y=h,_;y;y=y.parentNode){if(_=y.nextSibling){_.nodeName=="BR"&&(a=c={node:_.parentNode,offset:fo(_)+1});break}let k=y.pmViewDesc;if(k&&k.node&&k.node.isBlock)break}}else{let y=h.childNodes[g-1];f=y&&(y.nodeName=="BR"||y.contentEditable=="false")}}if(ci&&u.focusNode&&u.focusNode!=c.node&&u.focusNode.nodeType==1){let h=u.focusNode.childNodes[u.focusOffset];h&&h.contentEditable=="false"&&(o=!0)}if(!(o||f&&Mr)&&Fl(a.node,a.offset,u.anchorNode,u.anchorOffset)&&Fl(c.node,c.offset,u.focusNode,u.focusOffset))return;let p=!1;if((u.extend||t==n)&&!f){u.collapse(a.node,a.offset);try{t!=n&&u.extend(c.node,c.offset),p=!0}catch{}}if(!p){if(t>n){let g=a;a=c,c=g}let h=document.createRange();h.setEnd(c.node,c.offset),h.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(h)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,o=0;o=r:tr){let a=r+i.border,c=s-i.border;if(t>=a&&n<=c){this.dirty=t==r||n==s?Tc:rI,t==a&&n==c&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Ui:i.markDirty(t-a,n-a);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?Tc:Ui}r=s}this.dirty=Tc}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?Tc:rI;n.dirty{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(t,[],s,null),this.widget=n,this.widget=n,i=this}matchesWidget(t){return this.dirty==oi&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class sve extends dp{constructor(t,n,r,o){super(t,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class Vl extends dp{constructor(t,n,r,o){super(t,[],r,o),this.mark=n}static create(t,n,r,o){let i=o.nodeViews[n.type.name],s=i&&i(n,o,r);return(!s||!s.dom)&&(s=zi.renderSpec(document,n.type.spec.toDOM(n,r))),new Vl(t,n,s.dom,s.contentDOM||s.dom)}parseRule(){return this.dirty&Ui||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM||void 0}}matchesMark(t){return this.dirty!=Ui&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=oi){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty0&&(i=MS(i,0,t,r));for(let a=0;a{if(!c)return s;if(c.parent)return c.parent.posBeforeChild(c)},r,o),f=u&&u.dom,p=u&&u.contentDOM;if(n.isText){if(!f)f=document.createTextNode(n.text);else if(f.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else f||({dom:f,contentDOM:p}=zi.renderSpec(document,n.type.spec.toDOM(n)));!p&&!n.isText&&f.nodeName!="BR"&&(f.hasAttribute("contenteditable")||(f.contentEditable="false"),n.type.spec.draggable&&(f.draggable=!0));let h=f;return f=kj(f,r,n),u?c=new ave(t,n,r,o,f,p||null,h,u,i,s+1):n.isText?new e1(t,n,r,o,f,h,i):new Hl(t,n,r,o,f,p||null,h,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>se.empty)}return t}matchesNode(t,n,r){return this.dirty==oi&&t.eq(this.node)&&$S(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,o=n,i=t.composing?this.localCompositionInfo(t,n):null,s=i&&i.pos>-1?i:null,a=i&&i.pos<0,c=new cve(this,s&&s.node,t);fve(this.node,this.innerDeco,(u,f,p)=>{u.spec.marks?c.syncToMarks(u.spec.marks,r,t):u.type.side>=0&&!p&&c.syncToMarks(f==this.node.childCount?bt.none:this.node.child(f).marks,r,t),c.placeWidget(u,t,o)},(u,f,p,h)=>{c.syncToMarks(u.marks,r,t);let g;c.findNodeMatch(u,f,p,h)||a&&t.state.selection.from>o&&t.state.selection.to-1&&c.updateNodeAt(u,f,p,g,t)||c.updateNextNode(u,f,p,t,h)||c.addNode(u,f,p,t,o),o+=u.nodeSize}),c.syncToMarks([],r,t),this.node.isTextblock&&c.addTextblockHacks(),c.destroyRest(),(c.changed||this.dirty==Tc)&&(s&&this.protectLocalComposition(t,s),Sj(this.contentDOM,this.children,t),mu&&pve(this.dom))}localCompositionInfo(t,n){let{from:r,to:o}=t.state.selection;if(!(t.state.selection instanceof qe)||rn+this.node.content.size)return null;let i=t.domSelectionRange(),s=hve(i.focusNode,i.focusOffset);if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let a=s.nodeValue,c=mve(this.node.content,a,r-n,o-n);return c<0?null:{node:s,pos:c,text:a}}else return{node:s,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let s=new sve(this,i,n,o);t.input.compositionNodes.push(s),this.children=MS(this.children,r,r+o.length,t,s)}update(t,n,r,o){return this.dirty==Ui||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,r,o),!0)}updateInner(t,n,r,o){this.updateOuterDeco(n),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=oi}updateOuterDeco(t){if($S(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=xj(this.dom,this.nodeDOM,ES(this.outerDeco,this.node,n),ES(t,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function oI(e,t,n,r,o){return kj(r,t,e),new Hl(void 0,e,t,n,r,r,r,o,0)}class e1 extends Hl{constructor(t,n,r,o,i,s,a){super(t,n,r,o,i,null,s,a,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,r,o){return this.dirty==Ui||this.dirty!=oi&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=oi||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=t,this.dirty=oi,!0)}inParent(){let t=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,r){let o=this.node.cut(t,n),i=document.createTextNode(o.text);return new e1(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Ui)}get domAtom(){return!1}}class bj extends dp{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==oi&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class ave extends Hl{constructor(t,n,r,o,i,s,a,c,u,f){super(t,n,r,o,i,s,a,u,f),this.spec=c}update(t,n,r,o){if(this.dirty==Ui)return!1;if(this.spec.update){let i=this.spec.update(t,n,r);return i&&this.updateInner(t,n,r,o),i}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,r,o){this.spec.setSelection?this.spec.setSelection(t,n,r):super.setSelection(t,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function Sj(e,t,n){let r=e.firstChild,o=!1;for(let i=0;i>1,s=Math.min(i,t.length);for(;o-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let c=Vl.create(this.top,t[i],n,r);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,i++}}findNodeMatch(t,n,r,o){let i=-1,s;if(o>=this.preMatch.index&&(s=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&s.matchesNode(t,n,r))i=this.top.children.indexOf(s,this.index);else for(let a=this.index,c=Math.min(this.top.children.length,a+5);a0;){let a;for(;;)if(r){let u=n.children[r-1];if(u instanceof Vl)n=u,r=u.children.length;else{a=u,r--;break}}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let c=a.node;if(c){if(c!=e.child(o-1))break;--o,i.set(a,o),s.push(a)}}return{index:o,matched:i,matches:s.reverse()}}function dve(e,t){return e.type.side-t.type.side}function fve(e,t,n,r){let o=t.locals(e),i=0;if(o.length==0){for(let u=0;ui;)a.push(o[s++]);let h=i+f.nodeSize;if(f.isText){let y=h;s!y.inline):a.slice();r(f,g,t.forChild(i,f),p),i=h}}function pve(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function hve(e,t){for(;;){if(e.nodeType==3)return e;if(e.nodeType==1&&t>0){if(e.childNodes.length>t&&e.childNodes[t].nodeType==3)return e.childNodes[t];e=e.childNodes[t-1],t=Ri(e)}else if(e.nodeType==1&&t=n){let u=a=0&&u+t.length+a>=n)return a+u;if(n==r&&c.length>=r+t.length-a&&c.slice(r-a,r-a+t.length)==t)return r}}return-1}function MS(e,t,n,r,o){let i=[];for(let s=0,a=0;s=n||f<=t?i.push(c):(un&&i.push(c.slice(n-u,c.size,r)))}return i}function mP(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let o=e.docView.nearestDesc(n.focusNode),i=o&&o.size==0,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a=r.resolve(s),c,u;if(X0(n)){for(c=a;o&&!o.node;)o=o.parent;let f=o.node;if(o&&f.isAtom&&Ie.isSelectable(f)&&o.parent&&!(f.isInline&&Bge(n.focusNode,n.focusOffset,o.dom))){let p=o.posBefore;u=new Ie(s==p?a:r.resolve(p))}}else{let f=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(f<0)return null;c=r.resolve(f)}if(!u){let f=t=="pointer"||e.state.selection.head{(n.anchorNode!=r||n.anchorOffset!=o)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!Pj(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function vve(e){let t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o=r.nodeName=="IMG";o?n.setEnd(r.parentNode,fo(r)+1):n.setEnd(r,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&eo&&wa<=11&&(r.disabled=!0,r.disabled=!1)}function Cj(e,t){if(t instanceof Ie){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(cI(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else cI(e)}function cI(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function gP(e,t,n,r){return e.someProp("createSelectionBetween",o=>o(e,t,n))||qe.between(t,n,r)}function uI(e){return e.editable&&!e.hasFocus()?!1:Oj(e)}function Oj(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function yve(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Fl(t.node,t.offset,n.anchorNode,n.anchorOffset)}function TS(e,t){let{$anchor:n,$head:r}=e.selection,o=t>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return i&&Ue.findFrom(i,t)}function al(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function dI(e,t,n){let r=e.state.selection;if(r instanceof qe){if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){let o=TS(e.state,t);return o&&o instanceof Ie?al(e,o):!1}else if(!(Mo&&n.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter,s;if(!i||i.isText)return!1;let a=t<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(s=e.docView.descAt(a))&&!s.contentDOM?Ie.isSelectable(i)?al(e,new Ie(t<0?e.state.doc.resolve(o.pos-i.nodeSize):o)):Q0?al(e,new qe(e.state.doc.resolve(t<0?a:a+i.nodeSize))):!1:!1}}else{if(r instanceof Ie&&r.node.isInline)return al(e,new qe(t>0?r.$to:r.$from));{let o=TS(e.state,t);return o?al(e,o):!1}}}function iy(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Wd(e){let t=e.pmViewDesc;return t&&t.size==0&&(e.nextSibling||e.nodeName!="BR")}function dw(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,s=!1;for(ci&&n.nodeType==1&&r0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(Wd(a))o=n,i=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(Ej(n))break;{let a=n.previousSibling;for(;a&&Wd(a);)o=n.parentNode,i=fo(a),a=a.previousSibling;if(a)n=a,r=iy(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?IS(e,n,r):o&&IS(e,o,i)}function fw(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o=iy(n),i,s;for(;;)if(r{e.state==o&&ps(e)},50)}function fI(e,t,n){let r=e.state.selection;if(r instanceof qe&&!r.empty||n.indexOf("s")>-1||Mo&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=TS(e.state,t);if(s&&s instanceof Ie)return al(e,s)}if(!o.parent.inlineContent){let s=t<0?o:i,a=r instanceof ri?Ue.near(s,t):Ue.findFrom(s,t);return a?al(e,a):!1}return!1}function pI(e,t){if(!(e.state.selection instanceof qe))return!0;let{$head:n,$anchor:r,empty:o}=e.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let i=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let s=e.state.tr;return t<0?s.delete(n.pos-i.nodeSize,n.pos):s.delete(n.pos,n.pos+i.nodeSize),e.dispatch(s),!0}return!1}function hI(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function _ve(e){if(!Mr||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;hI(e,r,"true"),setTimeout(()=>hI(e,r,"false"),20)}return!1}function wve(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function bve(e,t){let n=t.keyCode,r=wve(t);return n==8||Mo&&n==72&&r=="c"?pI(e,-1)||dw(e):n==46||Mo&&n==68&&r=="c"?pI(e,1)||fw(e):n==13||n==27?!0:n==37||Mo&&n==66&&r=="c"?dI(e,-1,r)||dw(e):n==39||Mo&&n==70&&r=="c"?dI(e,1,r)||fw(e):n==38||Mo&&n==80&&r=="c"?fI(e,-1,r)||dw(e):n==40||Mo&&n==78&&r=="c"?_ve(e)||fI(e,1,r)||fw(e):r==(Mo?"m":"c")&&(n==66||n==73||n==89||n==90)}function $j(e,t){e.someProp("transformCopied",g=>{t=g(t,e)});let n=[],{content:r,openStart:o,openEnd:i}=t;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let g=r.firstChild;n.push(g.type.name,g.attrs!=g.type.defaultAttrs?g.attrs:null),r=g.content}let s=e.someProp("clipboardSerializer")||zi.fromSchema(e.state.schema),a=Lj(),c=a.createElement("div");c.appendChild(s.serializeFragment(r,{document:a}));let u=c.firstChild,f,p=0;for(;u&&u.nodeType==1&&(f=Rj[u.nodeName.toLowerCase()]);){for(let g=f.length-1;g>=0;g--){let y=a.createElement(f[g]);for(;c.firstChild;)y.appendChild(c.firstChild);c.appendChild(y),p++}u=c.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${o} ${i}${p?` -${p}`:""} ${JSON.stringify(n)}`);let h=e.someProp("clipboardTextSerializer",g=>g(t,e))||t.content.textBetween(0,t.content.size,` + +`);return{dom:c,text:h}}function Mj(e,t,n,r,o){let i=o.parent.type.spec.code,s,a;if(!n&&!t)return null;let c=t&&(r||i||!n);if(c){if(e.someProp("transformPastedText",h=>{t=h(t,i||r,e)}),i)return t?new ye(se.from(e.state.schema.text(t.replace(/\r\n?/g,` +`))),0,0):ye.empty;let p=e.someProp("clipboardTextParser",h=>h(t,o,r,e));if(p)a=p;else{let h=o.marks(),{schema:g}=e.state,y=zi.fromSchema(g);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(_=>{let k=s.appendChild(document.createElement("p"));_&&k.appendChild(y.serializeNode(g.text(_,h)))})}}else e.someProp("transformPastedHTML",p=>{n=p(n,e)}),s=kve(n),Q0&&Pve(s);let u=s&&s.querySelector("[data-pm-slice]"),f=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(f&&f[3])for(let p=+f[3];p>0;p--){let h=s.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;s=h}if(a||(a=(e.someProp("clipboardParser")||e.someProp("domParser")||fu.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(c||f),context:o,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!Sve.test(h.parentNode.nodeName)?{ignore:!0}:null}})),f)a=Cve(mI(a,+f[1],+f[2]),f[4]);else if(a=ye.maxOpen(xve(a.content,o),!0),a.openStart||a.openEnd){let p=0,h=0;for(let g=a.content.firstChild;p{a=p(a,e)}),a}const Sve=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function xve(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let o=t.node(n).contentMatchAt(t.index(n)),i,s=[];if(e.forEach(a=>{if(!s)return;let c=o.findWrapping(a.type),u;if(!c)return s=null;if(u=s.length&&i.length&&Ij(c,i,a,s[s.length-1],0))s[s.length-1]=u;else{s.length&&(s[s.length-1]=Nj(s[s.length-1],i.length));let f=Tj(a,c);s.push(f),o=o.matchType(f.type),i=c}}),s)return se.from(s)}return e}function Tj(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,se.from(e));return e}function Ij(e,t,n,r,o){if(o=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,e.childCount>1||i<=o).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(se.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function mI(e,t,n){return t]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=Lj().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),o;if((o=r&&Rj[r[1].toLowerCase()])&&(e=o.map(i=>"<"+i+">").join("")+e+o.map(i=>"").reverse().join("")),n.innerHTML=e,o)for(let i=0;i=0;a-=2){let c=n.nodes[r[a]];if(!c||c.hasRequiredAttrs())break;o=se.from(c.create(r[a+1],o)),i++,s++}return new ye(o,i,s)}const Tr={},Ir={},Ove={touchstart:!0,touchmove:!0};class Eve{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function $ve(e){for(let t in Tr){let n=Tr[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{Tve(e,r)&&!vP(e,r)&&(e.editable||!(r.type in Ir))&&n(e,r)},Ove[t]?{passive:!0}:void 0)}Mr&&e.dom.addEventListener("input",()=>null),RS(e)}function ra(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function Mve(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function RS(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>vP(e,r))})}function vP(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function Tve(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function Ive(e,t){!vP(e,t)&&Tr[t.type]&&(e.editable||!(t.type in Ir))&&Tr[t.type](e,t)}Ir.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!Aj(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(qo&&Or&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),mu&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",o=>o(e,sl(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||bve(e,n)?n.preventDefault():ra(e,"key")};Ir.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};Ir.keypress=(e,t)=>{let n=t;if(Aj(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Mo&&n.metaKey)return;if(e.someProp("handleKeyPress",o=>o(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof qe)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode);!/[\r\n]/.test(o)&&!e.someProp("handleTextInput",i=>i(e,r.$from.pos,r.$to.pos,o))&&e.dispatch(e.state.tr.insertText(o).scrollIntoView()),n.preventDefault()}};function t1(e){return{left:e.clientX,top:e.clientY}}function Nve(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function yP(e,t,n,r,o){if(r==-1)return!1;let i=e.state.doc.resolve(r);for(let s=i.depth+1;s>0;s--)if(e.someProp(t,a=>s>i.depth?a(e,n,i.nodeAfter,i.before(s),o,!0):a(e,n,i.node(s),i.before(s),o,!1)))return!0;return!1}function qc(e,t,n){e.focused||e.focus();let r=e.state.tr.setSelection(t);n=="pointer"&&r.setMeta("pointer",!0),e.dispatch(r)}function Rve(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&Ie.isSelectable(r)?(qc(e,new Ie(n),"pointer"),!0):!1}function Lve(e,t){if(t==-1)return!1;let n=e.state.selection,r,o;n instanceof Ie&&(r=n.node);let i=e.state.doc.resolve(t);for(let s=i.depth+1;s>0;s--){let a=s>i.depth?i.nodeAfter:i.node(s);if(Ie.isSelectable(a)){r&&n.$from.depth>0&&s>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?o=i.before(n.$from.depth):o=i.before(s);break}}return o!=null?(qc(e,Ie.create(e.state.doc,o),"pointer"),!0):!1}function zve(e,t,n,r,o){return yP(e,"handleClickOn",t,n,r)||e.someProp("handleClick",i=>i(e,t,r))||(o?Lve(e,n):Rve(e,n))}function Ave(e,t,n,r){return yP(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",o=>o(e,t,r))}function Dve(e,t,n,r){return yP(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",o=>o(e,t,r))||jve(e,n,r)}function jve(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(qc(e,qe.create(r,0,r.content.size),"pointer"),!0):!1;let o=r.resolve(t);for(let i=o.depth+1;i>0;i--){let s=i>o.depth?o.nodeAfter:o.node(i),a=o.before(i);if(s.inlineContent)qc(e,qe.create(r,a+1,a+1+s.content.size),"pointer");else if(Ie.isSelectable(s))qc(e,Ie.create(r,a),"pointer");else continue;return!0}}function _P(e){return sy(e)}const zj=Mo?"metaKey":"ctrlKey";Tr.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=_P(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&Nve(n,e.input.lastClick)&&!n[zj]&&(e.input.lastClick.type=="singleClick"?i="doubleClick":e.input.lastClick.type=="doubleClick"&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};let s=e.posAtCoords(t1(n));s&&(i=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new Bve(e,s,n,!!r)):(i=="doubleClick"?Ave:Dve)(e,s.pos,s.inside,n)?n.preventDefault():ra(e,"pointer"))};class Bve{constructor(t,n,r,o){this.view=t,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[zj],this.allowDefault=r.shiftKey;let i,s;if(n.inside>-1)i=t.state.doc.nodeAt(n.inside),s=n.inside;else{let f=t.state.doc.resolve(n.pos);i=f.parent,s=f.depth?f.before():0}const a=o?null:r.target,c=a?t.docView.nearestDesc(a,!0):null;this.target=c?c.dom:null;let{selection:u}=t.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||u instanceof Ie&&u.from<=s&&u.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&ci&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),ra(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>ps(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(t1(t))),this.updateAllowDefault(t),this.allowDefault||!n?ra(this.view,"pointer"):zve(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||Mr&&this.mightDrag&&!this.mightDrag.node.isAtom||Or&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(qc(this.view,Ue.near(this.view.state.doc.resolve(n.pos)),"pointer"),t.preventDefault()):ra(this.view,"pointer")}move(t){this.updateAllowDefault(t),ra(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}Tr.touchstart=e=>{e.input.lastTouch=Date.now(),_P(e),ra(e,"pointer")};Tr.touchmove=e=>{e.input.lastTouch=Date.now(),ra(e,"pointer")};Tr.contextmenu=e=>_P(e);function Aj(e,t){return e.composing?!0:Mr&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const Fve=qo?5e3:-1;Ir.compositionstart=Ir.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))e.markCursor=e.state.storedMarks||n.marks(),sy(e,!0),e.markCursor=null;else if(sy(e),ci&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(s.nodeType==3){e.domSelection().collapse(s,s.nodeValue.length);break}else o=s,i=-1}}e.input.composing=!0}Dj(e,Fve)};Ir.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,Dj(e,20))};function Dj(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>sy(e),t))}function jj(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Vve());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function Vve(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function sy(e,t=!1){if(!(qo&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),jj(e),t||e.docView&&e.docView.dirty){let n=mP(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}}function Hve(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}const gu=eo&&wa<15||mu&&Wge<604;Tr.copy=Ir.cut=(e,t)=>{let n=t,r=e.state.selection,o=n.type=="cut";if(r.empty)return;let i=gu?null:n.clipboardData,s=r.content(),{dom:a,text:c}=$j(e,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",c)):Hve(e,a),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function Wve(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function Uve(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Mf(e,r.value,null,e.input.shiftKey,t):Mf(e,r.textContent,r.innerHTML,e.input.shiftKey,t)},50)}function Mf(e,t,n,r,o){let i=Mj(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",c=>c(e,o,i||ye.empty)))return!0;if(!i)return!1;let s=Wve(i),a=s?e.state.tr.replaceSelectionWith(s,e.input.shiftKey):e.state.tr.replaceSelection(i);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}Ir.paste=(e,t)=>{let n=t;if(e.composing&&!qo)return;let r=gu?null:n.clipboardData;r&&Mf(e,r.getData("text/plain"),r.getData("text/html"),e.input.shiftKey,n)?n.preventDefault():Uve(e,n)};class Zve{constructor(t,n){this.slice=t,this.move=n}}const Bj=Mo?"altKey":"ctrlKey";Tr.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=e.state.selection,i=o.empty?null:e.posAtCoords(t1(n));if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof Ie?o.to-1:o.to))){if(r&&r.mightDrag)e.dispatch(e.state.tr.setSelection(Ie.create(e.state.doc,r.mightDrag.pos)));else if(n.target&&n.target.nodeType==1){let u=e.docView.nearestDesc(n.target,!0);u&&u.node.type.spec.draggable&&u!=e.docView&&e.dispatch(e.state.tr.setSelection(Ie.create(e.state.doc,u.posBefore)))}}let s=e.state.selection.content(),{dom:a,text:c}=$j(e,s);n.dataTransfer.clearData(),n.dataTransfer.setData(gu?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",gu||n.dataTransfer.setData("text/plain",c),e.dragging=new Zve(s,!n[Bj])};Tr.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};Ir.dragover=Ir.dragenter=(e,t)=>t.preventDefault();Ir.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let o=e.posAtCoords(t1(n));if(!o)return;let i=e.state.doc.resolve(o.pos),s=r&&r.slice;s?e.someProp("transformPasted",y=>{s=y(s,e)}):s=Mj(e,n.dataTransfer.getData(gu?"Text":"text/plain"),gu?null:n.dataTransfer.getData("text/html"),!1,i);let a=!!(r&&!n[Bj]);if(e.someProp("handleDrop",y=>y(e,n,s||ye.empty,a))){n.preventDefault();return}if(!s)return;n.preventDefault();let c=s?ij(e.state.doc,i.pos,s):i.pos;c==null&&(c=i.pos);let u=e.state.tr;a&&u.deleteSelection();let f=u.mapping.map(c),p=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,h=u.doc;if(p?u.replaceRangeWith(f,f,s.content.firstChild):u.replaceRange(f,f,s),u.doc.eq(h))return;let g=u.doc.resolve(f);if(p&&Ie.isSelectable(s.content.firstChild)&&g.nodeAfter&&g.nodeAfter.sameMarkup(s.content.firstChild))u.setSelection(new Ie(g));else{let y=u.mapping.map(c);u.mapping.maps[u.mapping.maps.length-1].forEach((_,k,b,S)=>y=S),u.setSelection(gP(e,g,u.doc.resolve(y)))}e.focus(),e.dispatch(u.setMeta("uiEvent","drop"))};Tr.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&ps(e)},20))};Tr.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};Tr.beforeinput=(e,t)=>{if(Or&&qo&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:r}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=r||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",i=>i(e,sl(8,"Backspace")))))return;let{$cursor:o}=e.state.selection;o&&o.pos>0&&e.dispatch(e.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let e in Ir)Tr[e]=Ir[e];function Tf(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class wP{constructor(t,n){this.toDOM=t,this.spec=n||El,this.side=this.spec.side||0}map(t,n,r,o){let{pos:i,deleted:s}=t.mapResult(n.from+o,this.side<0?-1:1);return s?null:new Do(i-r,i-r,this)}valid(){return!0}eq(t){return this==t||t instanceof wP&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Tf(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class ba{constructor(t,n){this.attrs=t,this.spec=n||El}map(t,n,r,o){let i=t.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,s=t.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=s?null:new Do(i,s,this)}valid(t,n){return n.from=t&&(!i||i(a.spec))&&r.push(a.copy(a.from+o,a.to+o))}for(let s=0;st){let a=this.children[s]+1;this.children[s+2].findInner(t-a,n-a,r,o+a,i)}}map(t,n,r){return this==mr||t.maps.length==0?this:this.mapInner(t,n,0,0,r||El)}mapInner(t,n,r,o,i){let s;for(let a=0;a{let u=c+r,f;if(f=Vj(n,a,u)){for(o||(o=this.children.slice());ia&&p.to=t){this.children[a]==t&&(r=this.children[a+2]);break}let i=t+1,s=i+n.content.size;for(let a=0;ai&&c.type instanceof ba){let u=Math.max(i,c.from)-i,f=Math.min(s,c.to)-i;uo.map(t,n,El));return qs.from(r)}forChild(t,n){if(n.isLeaf)return Pn.empty;let r=[];for(let o=0;on instanceof Pn)?t:t.reduce((n,r)=>n.concat(r instanceof Pn?r:r.members),[]))}}}function Kve(e,t,n,r,o,i,s){let a=e.slice();for(let u=0,f=i;u{let k=_-y-(g-h);for(let b=0;bS+f-p)continue;let P=a[b]+f-p;g>=P?a[b+1]=h<=P?-2:-1:y>=o&&k&&(a[b]+=k,a[b+1]+=k)}p+=k}),f=n.maps[u].map(f,-1)}let c=!1;for(let u=0;u=r.content.size){c=!0;continue}let h=n.map(e[u+1]+i,-1),g=h-o,{index:y,offset:_}=r.content.findIndex(p),k=r.maybeChild(y);if(k&&_==p&&_+k.nodeSize==g){let b=a[u+2].mapInner(n,k,f+1,e[u]+i+1,s);b!=mr?(a[u]=p,a[u+1]=g,a[u+2]=b):(a[u+1]=-2,c=!0)}else c=!0}if(c){let u=Gve(a,e,t,n,o,i,s),f=ay(u,r,0,s);t=f.local;for(let p=0;pn&&s.to{let u=Vj(e,a,c+n);if(u){i=!0;let f=ay(u,a,n+c+1,r);f!=mr&&o.push(c,c+a.nodeSize,f)}});let s=Fj(i?Hj(e):e,-n).sort($l);for(let a=0;a0;)t++;e.splice(t,0,n)}function pw(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=mr&&t.push(r)}),e.cursorWrapper&&t.push(Pn.create(e.state.doc,[e.cursorWrapper.deco])),qs.from(t)}const qve={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Yve=eo&&wa<=11;class Jve{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class Xve{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Jve,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;oo.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),Yve&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,qve)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let n=0;nthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(uI(this.view)){if(this.suppressingSelectionUpdates)return ps(this.view);if(eo&&wa<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Fl(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let n=new Set,r;for(let i=t.focusNode;i;i=$f(i))n.add(i);for(let i=t.anchorNode;i;i=$f(i))if(n.has(i)){r=i;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.observer?this.observer.takeRecords():[];this.queue.length&&(n=this.queue.concat(n),this.queue.length=0);let r=t.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&uI(t)&&!this.ignoreSelectionChange(r),i=-1,s=-1,a=!1,c=[];if(t.editable)for(let f=0;f1){let f=c.filter(p=>p.nodeName=="BR");if(f.length==2){let p=f[0],h=f[1];p.parentNode&&p.parentNode.parentNode==h.parentNode?h.remove():p.remove()}}let u=null;i<0&&o&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)-1||o)&&(i>-1&&(t.docView.markDirty(i,s),Qve(t)),this.handleDOMChange(i,s,a,c),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||ps(t),this.currentSelection.set(r))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let r=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(r==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!r||r.ignoreMutation(t))return null;if(t.type=="childList"){for(let f=0;fo;k--){let b=r.childNodes[k-1],S=b.pmViewDesc;if(b.nodeName=="BR"&&!S){i=k;break}if(!S||S.size)break}let p=e.state.doc,h=e.someProp("domParser")||fu.fromSchema(e.state.schema),g=p.resolve(s),y=null,_=h.parse(r,{topNode:g.parent,topMatch:g.parent.contentMatchAt(g.index()),topOpen:!0,from:o,to:i,preserveWhitespace:g.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:nye,context:g});if(u&&u[0].pos!=null){let k=u[0].pos,b=u[1]&&u[1].pos;b==null&&(b=k),y={anchor:k+s,head:b+s}}return{doc:_,sel:y,from:s,to:a}}function nye(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(Mr&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(e.parentNode.lastChild==e||Mr&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const rye=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function oye(e,t,n,r,o){if(t<0){let R=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,F=mP(e,R);if(F&&!e.state.selection.eq(F)){if(Or&&qo&&e.input.lastKeyCode===13&&Date.now()-100D(e,sl(13,"Enter"))))return;let B=e.state.tr.setSelection(F);R=="pointer"?B.setMeta("pointer",!0):R=="key"&&B.scrollIntoView(),e.dispatch(B)}return}let i=e.state.doc.resolve(t),s=i.sharedDepth(n);t=i.before(s+1),n=e.state.doc.resolve(n).after(s+1);let a=e.state.selection,c=tye(e,t,n),u=e.state.doc,f=u.slice(c.from,c.to),p,h;e.input.lastKeyCode===8&&Date.now()-100Date.now()-225||qo)&&o.some(R=>R.nodeType==1&&!rye.test(R.nodeName))&&(!g||g.endA>=g.endB)&&e.someProp("handleKeyDown",R=>R(e,sl(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!g)if(r&&a instanceof qe&&!a.empty&&a.$head.sameParent(a.$anchor)&&!e.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))g={start:a.from,endA:a.to,endB:a.to};else{if(c.sel){let R=wI(e,e.state.doc,c.sel);R&&!R.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(R))}return}if(Or&&e.cursorWrapper&&c.sel&&c.sel.anchor==e.cursorWrapper.deco.from&&c.sel.head==c.sel.anchor){let R=g.endB-g.start;c.sel={anchor:c.sel.anchor+R,head:c.sel.anchor+R}}e.input.domChangeCount++,e.state.selection.frome.state.selection.from&&g.start<=e.state.selection.from+2&&e.state.selection.from>=c.from?g.start=e.state.selection.from:g.endA=e.state.selection.to-2&&e.state.selection.to<=c.to&&(g.endB+=e.state.selection.to-g.endA,g.endA=e.state.selection.to)),eo&&wa<=11&&g.endB==g.start+1&&g.endA==g.start&&g.start>c.from&&c.doc.textBetween(g.start-c.from-1,g.start-c.from+1)=="  "&&(g.start--,g.endA--,g.endB--);let y=c.doc.resolveNoCache(g.start-c.from),_=c.doc.resolveNoCache(g.endB-c.from),k=u.resolve(g.start),b=y.sameParent(_)&&y.parent.inlineContent&&k.end()>=g.endA,S;if((mu&&e.input.lastIOSEnter>Date.now()-225&&(!b||o.some(R=>R.nodeName=="DIV"||R.nodeName=="P"))||!b&&y.posR(e,sl(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>g.start&&sye(u,g.start,g.endA,y,_)&&e.someProp("handleKeyDown",R=>R(e,sl(8,"Backspace")))){qo&&Or&&e.domObserver.suppressSelectionUpdates();return}Or&&qo&&g.endB==g.start&&(e.input.lastAndroidDelete=Date.now()),qo&&!b&&y.start()!=_.start()&&_.parentOffset==0&&y.depth==_.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==g.endA&&(g.endB-=2,_=c.doc.resolveNoCache(g.endB-c.from),setTimeout(()=>{e.someProp("handleKeyDown",function(R){return R(e,sl(13,"Enter"))})},20));let P=g.start,E=g.endA,$,I,N;if(b){if(y.pos==_.pos)eo&&wa<=11&&y.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>ps(e),20)),$=e.state.tr.delete(P,E),I=u.resolve(g.start).marksAcross(u.resolve(g.endA));else if(g.endA==g.endB&&(N=iye(y.parent.content.cut(y.parentOffset,_.parentOffset),k.parent.content.cut(k.parentOffset,g.endA-k.start()))))$=e.state.tr,N.type=="add"?$.addMark(P,E,N.mark):$.removeMark(P,E,N.mark);else if(y.parent.child(y.index()).isText&&y.index()==_.index()-(_.textOffset?0:1)){let R=y.parent.textBetween(y.parentOffset,_.parentOffset);if(e.someProp("handleTextInput",F=>F(e,P,E,R)))return;$=e.state.tr.insertText(R,P,E)}}if($||($=e.state.tr.replace(P,E,c.doc.slice(g.start-c.from,g.endB-c.from))),c.sel){let R=wI(e,$.doc,c.sel);R&&!(Or&&qo&&e.composing&&R.empty&&(g.start!=g.endB||e.input.lastAndroidDeletet.content.size?null:gP(e,t.resolve(n.anchor),t.resolve(n.head))}function iye(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,o=n,i=r,s,a,c;for(let f=0;ff.mark(a.addToSet(f.marks));else if(o.length==0&&i.length==1)a=i[0],s="remove",c=f=>f.mark(a.removeFromSet(f.marks));else return null;let u=[];for(let f=0;fn||hw(s,!0,!1)0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n){let i=e.node(r).maybeChild(e.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function aye(e,t,n,r,o){let i=e.findDiffStart(t,n);if(i==null)return null;let{a:s,b:a}=e.findDiffEnd(t,n+e.size,n+t.size);if(o=="end"){let c=Math.max(0,i-Math.min(s,a));r-=s+c-i}if(s=s?i-r:0;i-=c,a=i+(a-s),s=i}else if(a=a?i-r:0;i-=c,s=i+(s-a),a=i}return{start:i,endA:s,endB:a}}class lye{constructor(t,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Eve,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(PI),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=xI(this),SI(this),this.nodeViews=kI(this),this.docView=oI(this.state.doc,bI(this),pw(this),this.dom,this),this.domObserver=new Xve(this,(r,o,i,s)=>oye(this,r,o,i,s)),this.domObserver.start(),$ve(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&RS(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(PI),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in t)n[r]=t[r];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){let r=this.state,o=!1,i=!1;t.storedMarks&&this.composing&&(jj(this),i=!0),this.state=t;let s=r.plugins!=t.plugins||this._props.plugins!=n.plugins;if(s||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let h=kI(this);uye(h,this.nodeViews)&&(this.nodeViews=h,o=!0)}(s||n.handleDOMEvents!=this._props.handleDOMEvents)&&RS(this),this.editable=xI(this),SI(this);let a=pw(this),c=bI(this),u=r.plugins!=t.plugins&&!r.doc.eq(t.doc)?"reset":t.scrollToSelection>r.scrollToSelection?"to selection":"preserve",f=o||!this.docView.matchesNode(t.doc,c,a);(f||!t.selection.eq(r.selection))&&(i=!0);let p=u=="preserve"&&i&&this.dom.style.overflowAnchor==null&&Kge(this);if(i){this.domObserver.stop();let h=f&&(eo||Or)&&!this.composing&&!r.selection.empty&&!t.selection.empty&&cye(r.selection,t.selection);if(f){let g=Or?this.trackWrites=this.domSelectionRange().focusNode:null;(o||!this.docView.update(t.doc,c,a,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=oI(t.doc,c,a,this.dom,this)),g&&!this.trackWrites&&(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&yve(this))?ps(this,h):(Cj(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(r),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():p&&Gge(p)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof Ie){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&QT(this,n.getBoundingClientRect(),t)}else QT(this,this.coordsAtPos(this.state.selection.head,1),t)}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;nn.ownerDocument.getSelection()),this._root=n}return t||document}posAtCoords(t){return eve(this,t)}coordsAtPos(t,n=1){return yj(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,r=-1){let o=this.docView.posFromDOM(t,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(t,n){return ive(this,n||this.state,t)}pasteHTML(t,n){return Mf(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return Mf(this,t,null,!0,n||new ClipboardEvent("paste"))}destroy(){this.docView&&(Mve(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],pw(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return this.docView==null}dispatchEvent(t){return Ive(this,t)}dispatch(t){let n=this._props.dispatchTransaction;n?n.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){return Mr&&this.root.nodeType===11&&Vge(this.dom.ownerDocument)==this.dom?eye(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function bI(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),t.translate="no",e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let r in n)r=="class"&&(t.class+=" "+n[r]),r=="style"?t.style=(t.style?t.style+";":"")+n[r]:!t[r]&&r!="contenteditable"&&r!="nodeName"&&(t[r]=String(n[r]))}),[Do.node(0,e.state.doc.content.size,t)]}function SI(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Do.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function xI(e){return!e.someProp("editable",t=>t(e.state)===!1)}function cye(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function kI(e){let t=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(t,o)||(t[o]=r[o])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function uye(e,t){let n=0,r=0;for(let o in e){if(e[o]!=t[o])return!0;n++}for(let o in t)r++;return n!=r}function PI(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Ma={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},ly={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},CI=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent),dye=typeof navigator<"u"&&/Mac/.test(navigator.platform),fye=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),pye=dye||CI&&+CI[1]<57;for(var er=0;er<10;er++)Ma[48+er]=Ma[96+er]=String(er);for(var er=1;er<=24;er++)Ma[er+111]="F"+er;for(var er=65;er<=90;er++)Ma[er]=String.fromCharCode(er+32),ly[er]=String.fromCharCode(er);for(var mw in Ma)ly.hasOwnProperty(mw)||(ly[mw]=Ma[mw]);function hye(e){var t=pye&&(e.ctrlKey||e.altKey||e.metaKey)||fye&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?ly:Ma)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const mye=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function gye(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,o,i,s;for(let a=0;a127)&&(i=Ma[r.keyCode])&&i!=o){let a=t[gw(i,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}const _ye=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function wye(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}const bye=(e,t,n)=>{let r=wye(e,n);if(!r)return!1;let o=Uj(r);if(!o){let s=r.blockRange(),a=s&&Iu(s);return a==null?!1:(t&&t(e.tr.lift(s,a).scrollIntoView()),!0)}let i=o.nodeBefore;if(!i.type.spec.isolating&&Gj(e,o,t))return!0;if(r.parent.content.size==0&&(vu(i,"end")||Ie.isSelectable(i))){let s=fP(e.doc,r.before(),r.after(),ye.empty);if(s&&s.slice.size{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;i=Uj(r)}let s=i&&i.nodeBefore;return!s||!Ie.isSelectable(s)?!1:(t&&t(e.tr.setSelection(Ie.create(e.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function Uj(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function xye(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset{let r=xye(e,n);if(!r)return!1;let o=Zj(r);if(!o)return!1;let i=o.nodeAfter;if(Gj(e,o,t))return!0;if(r.parent.content.size==0&&(vu(i,"start")||Ie.isSelectable(i))){let s=fP(e.doc,r.before(),r.after(),ye.empty);if(s&&s.slice.size{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset=0;t--){let n=e.node(t);if(e.index(t)+1{let n=e.selection,r=n instanceof Ie,o;if(r){if(n.node.isTextblock||!ja(e.doc,n.from))return!1;o=n.from}else if(o=oj(e.doc,n.from,-1),o==null)return!1;if(t){let i=e.tr.join(o);r&&i.setSelection(Ie.create(i.doc,o-e.doc.resolve(o).nodeBefore.nodeSize)),t(i.scrollIntoView())}return!0},Oye=(e,t)=>{let n=e.selection,r;if(n instanceof Ie){if(n.node.isTextblock||!ja(e.doc,n.to))return!1;r=n.to}else if(r=oj(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},Eye=(e,t)=>{let{$from:n,$to:r}=e.selection,o=n.blockRange(r),i=o&&Iu(o);return i==null?!1:(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)},$ye=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(` +`).scrollIntoView()),!0)};function Kj(e){for(let t=0;t{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=Kj(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(t){let a=n.after(),c=e.tr.replaceWith(a,a,s.createAndFill());c.setSelection(Ue.near(c.doc.resolve(a),1)),t(c.scrollIntoView())}return!0},Tye=(e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof ri||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=Kj(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){let s=(!r.parentOffset&&o.index(){let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(Kc(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&Iu(r);return o==null?!1:(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)},Nye=(e,t)=>{let{$from:n,to:r}=e.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),t&&t(e.tr.setSelection(Ie.create(e.doc,o))),!0)};function Rye(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,i=t.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&t.parent.canReplace(i-1,i)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(i,i+1)||!(o.isTextblock||ja(e.doc,t.pos))?!1:(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),!0)}function Gj(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,i,s;if(r.type.spec.isolating||o.type.spec.isolating)return!1;if(Rye(e,t,n))return!0;let a=t.parent.canReplace(t.index(),t.index()+1);if(a&&(i=(s=r.contentMatchAt(r.childCount)).findWrapping(o.type))&&s.matchType(i[0]||o.type).validEnd){if(n){let p=t.pos+o.nodeSize,h=se.empty;for(let _=i.length-1;_>=0;_--)h=se.from(i[_].create(null,h));h=se.from(r.copy(h));let g=e.tr.step(new jn(t.pos-1,p,t.pos,p,new ye(h,1,0),i.length,!0)),y=p+2*i.length;ja(g.doc,y)&&g.join(y),n(g.scrollIntoView())}return!0}let c=Ue.findFrom(t,1),u=c&&c.$from.blockRange(c.$to),f=u&&Iu(u);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(u,f).scrollIntoView()),!0;if(a&&vu(o,"start",!0)&&vu(r,"end")){let p=r,h=[];for(;h.push(p),!p.isTextblock;)p=p.lastChild;let g=o,y=1;for(;!g.isTextblock;g=g.firstChild)y++;if(p.canReplace(p.childCount,p.childCount,g.content)){if(n){let _=se.empty;for(let b=h.length-1;b>=0;b--)_=se.from(h[b].copy(_));let k=e.tr.step(new jn(t.pos-h.length,t.pos+o.nodeSize,t.pos+y,t.pos+o.nodeSize-y,new ye(_,h.length,0),0,!0));n(k.scrollIntoView())}return!0}}return!1}function qj(e){return function(t,n){let r=t.selection,o=e<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(n&&n(t.tr.setSelection(qe.create(t.doc,e<0?o.start(i):o.end(i)))),!0):!1}}const Lye=qj(-1),zye=qj(1);function Aye(e,t=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),a=s&&dP(s,e,t);return a?(r&&r(n.tr.wrap(s,a).scrollIntoView()),!0):!1}}function OI(e,t=null){return function(n,r){let o=!1;for(let i=0;i{if(o)return!1;if(!(!c.isTextblock||c.hasMarkup(e,t)))if(c.type==e)o=!0;else{let f=n.doc.resolve(u),p=f.index();o=f.parent.canReplaceWith(p,p+1,e)}})}if(!o)return!1;if(r){let i=n.tr;for(let s=0;s=2&&o.node(s.depth-1).type.compatibleContent(e)&&s.startIndex==0){if(o.index(s.depth-1)==0)return!1;let f=n.doc.resolve(s.start-2);c=new ty(f,f,s.depth),s.endIndex=0;f--)i=se.from(n[f].type.create(n[f].attrs,i));e.step(new jn(t.start-(r?2:0),t.end,t.start,t.end,new ye(i,0,0),n.length,!0));let s=0;for(let f=0;fs.childCount>0&&s.firstChild.type==e);return i?n?r.node(i.depth-1).type==e?Fye(t,n,e,i):Vye(t,n,i):!0:!1}}function Fye(e,t,n,r){let o=e.tr,i=r.end,s=r.$to.end(r.depth);i_;y--)g-=o.child(y).nodeSize,r.delete(g-1,g+1);let i=r.doc.resolve(n.start),s=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,c=n.endIndex==o.childCount,u=i.node(-1),f=i.index(-1);if(!u.canReplace(f+(a?0:1),f+1,s.content.append(c?se.empty:se.from(o))))return!1;let p=i.pos,h=p+s.nodeSize;return r.step(new jn(p-(a?1:0),h+(c?1:0),p+1,h-1,new ye((a?se.empty:se.from(o.copy(se.empty))).append(c?se.empty:se.from(o.copy(se.empty))),a?0:1,c?0:1),a?0:1)),t(r.scrollIntoView()),!0}function Hye(e){return function(t,n){let{$from:r,$to:o}=t.selection,i=r.blockRange(o,u=>u.childCount>0&&u.firstChild.type==e);if(!i)return!1;let s=i.startIndex;if(s==0)return!1;let a=i.parent,c=a.child(s-1);if(c.type!=e)return!1;if(n){let u=c.lastChild&&c.lastChild.type==a.type,f=se.from(u?e.create():null),p=new ye(se.from(e.create(null,se.from(a.type.create(null,f)))),u?3:1,0),h=i.start,g=i.end;n(t.tr.step(new jn(h-(u?3:1),g,h,g,p,1,!0)).scrollIntoView())}return!0}}function n1(e){const{state:t,transaction:n}=e;let{selection:r}=n,{doc:o}=n,{storedMarks:i}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),filterTransaction:t.filterTransaction,plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,i=n.storedMarks,n}}}class r1{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:n,state:r}=this,{view:o}=n,{tr:i}=r,s=this.buildProps(i);return Object.fromEntries(Object.entries(t).map(([a,c])=>[a,(...f)=>{const p=c(...f)(s);return!i.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(i),p}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,n=!0){const{rawCommands:r,editor:o,state:i}=this,{view:s}=o,a=[],c=!!t,u=t||i.tr,f=()=>(!c&&n&&!u.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(u),a.every(h=>h===!0)),p={...Object.fromEntries(Object.entries(r).map(([h,g])=>[h,(..._)=>{const k=this.buildProps(u,n),b=g(..._)(k);return a.push(b),p}])),run:f};return p}createCan(t){const{rawCommands:n,state:r}=this,o=!1,i=t||r.tr,s=this.buildProps(i,o);return{...Object.fromEntries(Object.entries(n).map(([c,u])=>[c,(...f)=>u(...f)({...s,dispatch:void 0})])),chain:()=>this.createChain(i,o)}}buildProps(t,n=!0){const{rawCommands:r,editor:o,state:i}=this,{view:s}=o;i.storedMarks&&t.setStoredMarks(i.storedMarks);const a={tr:t,editor:o,view:s,state:n1({state:i,transaction:t}),dispatch:n?()=>{}:void 0,chain:()=>this.createChain(t),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(r).map(([c,u])=>[c,(...f)=>u(...f)(a)]))}};return a}}class Wye{constructor(){this.callbacks={}}on(t,n){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(n),this}emit(t,...n){const r=this.callbacks[t];return r&&r.forEach(o=>o.apply(this,n)),this}off(t,n){const r=this.callbacks[t];return r&&(n?this.callbacks[t]=r.filter(o=>o!==n):delete this.callbacks[t]),this}removeAllListeners(){this.callbacks={}}}function Se(e,t,n){return e.config[t]===void 0&&e.parent?Se(e.parent,t,n):typeof e.config[t]=="function"?e.config[t].bind({...n,parent:e.parent?Se(e.parent,t,n):null}):e.config[t]}function o1(e){const t=e.filter(o=>o.type==="extension"),n=e.filter(o=>o.type==="node"),r=e.filter(o=>o.type==="mark");return{baseExtensions:t,nodeExtensions:n,markExtensions:r}}function Yj(e){const t=[],{nodeExtensions:n,markExtensions:r}=o1(e),o=[...n,...r],i={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach(s=>{const a={name:s.name,options:s.options,storage:s.storage},c=Se(s,"addGlobalAttributes",a);if(!c)return;c().forEach(f=>{f.types.forEach(p=>{Object.entries(f.attributes).forEach(([h,g])=>{t.push({type:p,name:h,attribute:{...i,...g}})})})})}),o.forEach(s=>{const a={name:s.name,options:s.options,storage:s.storage},c=Se(s,"addAttributes",a);if(!c)return;const u=c();Object.entries(u).forEach(([f,p])=>{const h={...i,...p};typeof h?.default=="function"&&(h.default=h.default()),h?.isRequired&&h?.default===void 0&&delete h.default,t.push({type:s.name,name:f,attribute:h})})}),t}function Hn(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function Mt(...e){return e.filter(t=>!!t).reduce((t,n)=>{const r={...t};return Object.entries(n).forEach(([o,i])=>{if(!r[o]){r[o]=i;return}o==="class"?r[o]=[r[o],i].join(" "):o==="style"?r[o]=[r[o],i].join("; "):r[o]=i}),r},{})}function LS(e,t){return t.filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(e.attrs)||{}:{[n.name]:e.attrs[n.name]}).reduce((n,r)=>Mt(n,r),{})}function Jj(e){return typeof e=="function"}function We(e,t=void 0,...n){return Jj(e)?t?e.bind(t)(...n):e(...n):e}function Uye(e={}){return Object.keys(e).length===0&&e.constructor===Object}function Zye(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function EI(e,t){return e.style?e:{...e,getAttrs:n=>{const r=e.getAttrs?e.getAttrs(n):e.attrs;if(r===!1)return!1;const o=t.reduce((i,s)=>{const a=s.attribute.parseHTML?s.attribute.parseHTML(n):Zye(n.getAttribute(s.name));return a==null?i:{...i,[s.name]:a}},{});return{...r,...o}}}}function $I(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>t==="attrs"&&Uye(n)?!1:n!=null))}function Kye(e,t){var n;const r=Yj(e),{nodeExtensions:o,markExtensions:i}=o1(e),s=(n=o.find(u=>Se(u,"topNode")))===null||n===void 0?void 0:n.name,a=Object.fromEntries(o.map(u=>{const f=r.filter(b=>b.type===u.name),p={name:u.name,options:u.options,storage:u.storage,editor:t},h=e.reduce((b,S)=>{const P=Se(S,"extendNodeSchema",p);return{...b,...P?P(u):{}}},{}),g=$I({...h,content:We(Se(u,"content",p)),marks:We(Se(u,"marks",p)),group:We(Se(u,"group",p)),inline:We(Se(u,"inline",p)),atom:We(Se(u,"atom",p)),selectable:We(Se(u,"selectable",p)),draggable:We(Se(u,"draggable",p)),code:We(Se(u,"code",p)),defining:We(Se(u,"defining",p)),isolating:We(Se(u,"isolating",p)),attrs:Object.fromEntries(f.map(b=>{var S;return[b.name,{default:(S=b?.attribute)===null||S===void 0?void 0:S.default}]}))}),y=We(Se(u,"parseHTML",p));y&&(g.parseDOM=y.map(b=>EI(b,f)));const _=Se(u,"renderHTML",p);_&&(g.toDOM=b=>_({node:b,HTMLAttributes:LS(b,f)}));const k=Se(u,"renderText",p);return k&&(g.toText=k),[u.name,g]})),c=Object.fromEntries(i.map(u=>{const f=r.filter(k=>k.type===u.name),p={name:u.name,options:u.options,storage:u.storage,editor:t},h=e.reduce((k,b)=>{const S=Se(b,"extendMarkSchema",p);return{...k,...S?S(u):{}}},{}),g=$I({...h,inclusive:We(Se(u,"inclusive",p)),excludes:We(Se(u,"excludes",p)),group:We(Se(u,"group",p)),spanning:We(Se(u,"spanning",p)),code:We(Se(u,"code",p)),attrs:Object.fromEntries(f.map(k=>{var b;return[k.name,{default:(b=k?.attribute)===null||b===void 0?void 0:b.default}]}))}),y=We(Se(u,"parseHTML",p));y&&(g.parseDOM=y.map(k=>EI(k,f)));const _=Se(u,"renderHTML",p);return _&&(g.toDOM=k=>_({mark:k,HTMLAttributes:LS(k,f)})),[u.name,g]}));return new sge({topNode:s,nodes:a,marks:c})}function vw(e,t){return t.nodes[e]||t.marks[e]||null}function MI(e,t){return Array.isArray(t)?t.some(n=>(typeof n=="string"?n:n.name)===e.name):t}const Gye=(e,t=500)=>{let n="";const r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(o,i,s,a)=>{var c,u;const f=((u=(c=o.type.spec).toText)===null||u===void 0?void 0:u.call(c,{node:o,pos:i,parent:s,index:a}))||o.textContent||"%leaf%";n+=f.slice(0,Math.max(0,r-i))}),n};function xP(e){return Object.prototype.toString.call(e)==="[object RegExp]"}class i1{constructor(t){this.find=t.find,this.handler=t.handler}}const qye=(e,t)=>{if(xP(t))return t.exec(e);const n=t(e);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function yw(e){var t;const{editor:n,from:r,to:o,text:i,rules:s,plugin:a}=e,{view:c}=n;if(c.composing)return!1;const u=c.state.doc.resolve(r);if(u.parent.type.spec.code||!((t=u.nodeBefore||u.nodeAfter)===null||t===void 0)&&t.marks.find(h=>h.type.spec.code))return!1;let f=!1;const p=Gye(u)+i;return s.forEach(h=>{if(f)return;const g=qye(p,h.find);if(!g)return;const y=c.state.tr,_=n1({state:c.state,transaction:y}),k={from:r-(g[0].length-i.length),to:o},{commands:b,chain:S,can:P}=new r1({editor:n,state:_});h.handler({state:_,range:k,match:g,commands:b,chain:S,can:P})===null||!y.steps.length||(y.setMeta(a,{transform:y,from:r,to:o,text:i}),c.dispatch(y),f=!0)}),f}function Yye(e){const{editor:t,rules:n}=e,r=new Ar({state:{init(){return null},apply(o,i){const s=o.getMeta(r);return s||(o.selectionSet||o.docChanged?null:i)}},props:{handleTextInput(o,i,s,a){return yw({editor:t,from:i,to:s,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:i}=o.state.selection;i&&yw({editor:t,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(o,i){if(i.key!=="Enter")return!1;const{$cursor:s}=o.state.selection;return s?yw({editor:t,from:s.pos,to:s.pos,text:` +`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function Jye(e){return typeof e=="number"}class Xye{constructor(t){this.find=t.find,this.handler=t.handler}}const Qye=(e,t)=>{if(xP(t))return[...e.matchAll(t)];const n=t(e);return n?n.map(r=>{const o=[r.text];return o.index=r.index,o.input=e,o.data=r.data,r.replaceWith&&(r.text.includes(r.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),o.push(r.replaceWith)),o}):[]};function e0e(e){const{editor:t,state:n,from:r,to:o,rule:i}=e,{commands:s,chain:a,can:c}=new r1({editor:t,state:n}),u=[];return n.doc.nodesBetween(r,o,(p,h)=>{if(!p.isTextblock||p.type.spec.code)return;const g=Math.max(r,h),y=Math.min(o,h+p.content.size),_=p.textBetween(g-h,y-h,void 0,"");Qye(_,i.find).forEach(b=>{if(b.index===void 0)return;const S=g+b.index+1,P=S+b[0].length,E={from:n.tr.mapping.map(S),to:n.tr.mapping.map(P)},$=i.handler({state:n,range:E,match:b,commands:s,chain:a,can:c});u.push($)})}),u.every(p=>p!==null)}function t0e(e){const{editor:t,rules:n}=e;let r=null,o=!1,i=!1;return n.map(a=>new Ar({view(c){const u=f=>{var p;r=!((p=c.dom.parentElement)===null||p===void 0)&&p.contains(f.target)?c.dom.parentElement:null};return window.addEventListener("dragstart",u),{destroy(){window.removeEventListener("dragstart",u)}}},props:{handleDOMEvents:{drop:c=>(i=r===c.dom.parentElement,!1),paste:(c,u)=>{var f;const p=(f=u.clipboardData)===null||f===void 0?void 0:f.getData("text/html");return o=!!p?.includes("data-pm-slice"),!1}}},appendTransaction:(c,u,f)=>{const p=c[0],h=p.getMeta("uiEvent")==="paste"&&!o,g=p.getMeta("uiEvent")==="drop"&&!i;if(!h&&!g)return;const y=u.doc.content.findDiffStart(f.doc.content),_=u.doc.content.findDiffEnd(f.doc.content);if(!Jye(y)||!_||y===_.b)return;const k=f.tr,b=n1({state:f,transaction:k});if(!(!e0e({editor:t,state:b,from:Math.max(y-1,0),to:_.b-1,rule:a})||!k.steps.length))return k}}))}function n0e(e){const t=e.filter((n,r)=>e.indexOf(n)!==r);return[...new Set(t)]}class Ic{constructor(t,n){this.splittableMarks=[],this.editor=n,this.extensions=Ic.resolve(t),this.schema=Kye(this.extensions,n),this.extensions.forEach(r=>{var o;this.editor.extensionStorage[r.name]=r.storage;const i={name:r.name,options:r.options,storage:r.storage,editor:this.editor,type:vw(r.name,this.schema)};r.type==="mark"&&(!((o=We(Se(r,"keepOnSplit",i)))!==null&&o!==void 0)||o)&&this.splittableMarks.push(r.name);const s=Se(r,"onBeforeCreate",i);s&&this.editor.on("beforeCreate",s);const a=Se(r,"onCreate",i);a&&this.editor.on("create",a);const c=Se(r,"onUpdate",i);c&&this.editor.on("update",c);const u=Se(r,"onSelectionUpdate",i);u&&this.editor.on("selectionUpdate",u);const f=Se(r,"onTransaction",i);f&&this.editor.on("transaction",f);const p=Se(r,"onFocus",i);p&&this.editor.on("focus",p);const h=Se(r,"onBlur",i);h&&this.editor.on("blur",h);const g=Se(r,"onDestroy",i);g&&this.editor.on("destroy",g)})}static resolve(t){const n=Ic.sort(Ic.flatten(t)),r=n0e(n.map(o=>o.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(o=>`'${o}'`).join(", ")}]. This can lead to issues.`),n}static flatten(t){return t.map(n=>{const r={name:n.name,options:n.options,storage:n.storage},o=Se(n,"addExtensions",r);return o?[n,...this.flatten(o())]:n}).flat(10)}static sort(t){return t.sort((r,o)=>{const i=Se(r,"priority")||100,s=Se(o,"priority")||100;return i>s?-1:i{const r={name:n.name,options:n.options,storage:n.storage,editor:this.editor,type:vw(n.name,this.schema)},o=Se(n,"addCommands",r);return o?{...t,...o()}:t},{})}get plugins(){const{editor:t}=this,n=Ic.sort([...this.extensions].reverse()),r=[],o=[],i=n.map(s=>{const a={name:s.name,options:s.options,storage:s.storage,editor:t,type:vw(s.name,this.schema)},c=[],u=Se(s,"addKeyboardShortcuts",a);let f={};if(s.type==="mark"&&s.config.exitable&&(f.ArrowRight=()=>br.handleExit({editor:t,mark:s})),u){const _=Object.fromEntries(Object.entries(u()).map(([k,b])=>[k,()=>b({editor:t})]));f={...f,..._}}const p=yye(f);c.push(p);const h=Se(s,"addInputRules",a);MI(s,t.options.enableInputRules)&&h&&r.push(...h());const g=Se(s,"addPasteRules",a);MI(s,t.options.enablePasteRules)&&g&&o.push(...g());const y=Se(s,"addProseMirrorPlugins",a);if(y){const _=y();c.push(..._)}return c}).flat();return[Yye({editor:t,rules:r}),...t0e({editor:t,rules:o}),...i]}get attributes(){return Yj(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:n}=o1(this.extensions);return Object.fromEntries(n.filter(r=>!!Se(r,"addNodeView")).map(r=>{const o=this.attributes.filter(c=>c.type===r.name),i={name:r.name,options:r.options,storage:r.storage,editor:t,type:Hn(r.name,this.schema)},s=Se(r,"addNodeView",i);if(!s)return[];const a=(c,u,f,p)=>{const h=LS(c,o);return s()({editor:t,node:c,getPos:f,decorations:p,HTMLAttributes:h,extension:r})};return[r.name,a]}))}}function r0e(e){return Object.prototype.toString.call(e).slice(8,-1)}function _w(e){return r0e(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function s1(e,t){const n={...e};return _w(e)&&_w(t)&&Object.keys(t).forEach(r=>{_w(t[r])?r in e?n[r]=s1(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Object.assign(n,{[r]:t[r]})}),n}class Nr{constructor(t={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=We(Se(this,"addOptions",{name:this.name}))),this.storage=We(Se(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new Nr(t)}configure(t={}){const n=this.extend();return n.options=s1(this.options,t),n.storage=We(Se(n,"addStorage",{name:n.name,options:n.options})),n}extend(t={}){const n=new Nr(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=We(Se(n,"addOptions",{name:n.name})),n.storage=We(Se(n,"addStorage",{name:n.name,options:n.options})),n}}function Xj(e,t,n){const{from:r,to:o}=t,{blockSeparator:i=` + +`,textSerializers:s={}}=n||{};let a="",c=!0;return e.nodesBetween(r,o,(u,f,p,h)=>{var g;const y=s?.[u.type.name];y?(u.isBlock&&!c&&(a+=i,c=!0),p&&(a+=y({node:u,pos:f,parent:p,index:h,range:t}))):u.isText?(a+=(g=u?.text)===null||g===void 0?void 0:g.slice(Math.max(r,f)-f,o-f),c=!1):u.isBlock&&!c&&(a+=i,c=!0)}),a}function Qj(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}const o0e=Nr.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new Ar({key:new pi("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:o}=t,{ranges:i}=o,s=Math.min(...i.map(f=>f.$from.pos)),a=Math.max(...i.map(f=>f.$to.pos)),c=Qj(n);return Xj(r,{from:s,to:a},{textSerializers:c})}}})]}}),i0e=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window?.getSelection())===null||n===void 0||n.removeAllRanges())}),!0),s0e=(e=!1)=>({commands:t})=>t.setContent("",e),a0e=()=>({state:e,tr:t,dispatch:n})=>{const{selection:r}=t,{ranges:o}=r;return n&&o.forEach(({$from:i,$to:s})=>{e.doc.nodesBetween(i.pos,s.pos,(a,c)=>{if(a.type.isText)return;const{doc:u,mapping:f}=t,p=u.resolve(f.map(c)),h=u.resolve(f.map(c+a.nodeSize)),g=p.blockRange(h);if(!g)return;const y=Iu(g);if(a.type.isTextblock){const{defaultType:_}=p.parent.contentMatchAt(p.index());t.setNodeMarkup(g.start,_)}(y||y===0)&&t.lift(g,y)})}),!0},l0e=e=>t=>e(t),c0e=()=>({state:e,dispatch:t})=>Tye(e,t),u0e=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;const o=e.selection.$anchor;for(let i=o.depth;i>0;i-=1)if(o.node(i).type===r.type){if(t){const a=o.before(i),c=o.after(i);e.delete(a,c).scrollIntoView()}return!0}return!1},d0e=e=>({tr:t,state:n,dispatch:r})=>{const o=Hn(e,n.schema),i=t.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===o){if(r){const c=i.before(s),u=i.after(s);t.delete(c,u).scrollIntoView()}return!0}return!1},f0e=e=>({tr:t,dispatch:n})=>{const{from:r,to:o}=e;return n&&t.delete(r,o),!0},p0e=()=>({state:e,dispatch:t})=>_ye(e,t),h0e=()=>({commands:e})=>e.keyboardShortcut("Enter"),m0e=()=>({state:e,dispatch:t})=>Mye(e,t);function cy(e,t,n={strict:!0}){const r=Object.keys(t);return r.length?r.every(o=>n.strict?t[o]===e[o]:xP(t[o])?t[o].test(e[o]):t[o]===e[o]):!0}function zS(e,t,n={}){return e.find(r=>r.type===t&&cy(r.attrs,n))}function g0e(e,t,n={}){return!!zS(e,t,n)}function kP(e,t,n={}){if(!e||!t)return;let r=e.parent.childAfter(e.parentOffset);if(e.parentOffset===r.offset&&r.offset!==0&&(r=e.parent.childBefore(e.parentOffset)),!r.node)return;const o=zS([...r.node.marks],t,n);if(!o)return;let i=r.index,s=e.start()+r.offset,a=i+1,c=s+r.node.nodeSize;for(zS([...r.node.marks],t,n);i>0&&o.isInSet(e.parent.child(i-1).marks);)i-=1,s-=e.parent.child(i).nodeSize;for(;a({tr:n,state:r,dispatch:o})=>{const i=Fa(e,r.schema),{doc:s,selection:a}=n,{$from:c,from:u,to:f}=a;if(o){const p=kP(c,i,t);if(p&&p.from<=u&&p.to>=f){const h=qe.create(s,p.from,p.to);n.setSelection(h)}}return!0},y0e=e=>t=>{const n=typeof e=="function"?e(t):e;for(let r=0;r({editor:n,view:r,tr:o,dispatch:i})=>{t={scrollIntoView:!0,...t};const s=()=>{PP()&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t?.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&e===null||e===!1)return!0;if(i&&e===null&&!eB(n.state.selection))return s(),!0;const a=tB(o.doc,e)||n.state.selection,c=n.state.selection.eq(a);return i&&(c||o.setSelection(a),c&&o.storedMarks&&o.setStoredMarks(o.storedMarks),s()),!0},w0e=(e,t)=>n=>e.every((r,o)=>t(r,{...n,index:o})),b0e=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t);function TI(e){const t=`${e}`;return new window.DOMParser().parseFromString(t,"text/html").body}function uy(e,t,n){if(n={slice:!0,parseOptions:{},...n},typeof e=="object"&&e!==null)try{return Array.isArray(e)&&e.length>0?se.fromArray(e.map(r=>t.nodeFromJSON(r))):t.nodeFromJSON(e)}catch(r){return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",r),uy("",t,n)}if(typeof e=="string"){const r=fu.fromSchema(t);return n.slice?r.parseSlice(TI(e),n.parseOptions).content:r.parse(TI(e),n.parseOptions)}return uy("",t,n)}function S0e(e,t,n){const r=e.steps.length-1;if(r{s===0&&(s=f)}),e.setSelection(Ue.near(e.doc.resolve(s),n))}const x0e=e=>e.toString().startsWith("<"),k0e=(e,t,n)=>({tr:r,dispatch:o,editor:i})=>{if(o){n={parseOptions:{},updateSelection:!0,...n};const s=uy(t,i.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions}});if(s.toString()==="<>")return!0;let{from:a,to:c}=typeof e=="number"?{from:e,to:e}:e,u=!0,f=!0;if((x0e(s)?s:[s]).forEach(h=>{h.check(),u=u?h.isText&&h.marks.length===0:!1,f=f?h.isBlock:!1}),a===c&&f){const{parent:h}=r.doc.resolve(a);h.isTextblock&&!h.type.spec.code&&!h.childCount&&(a-=1,c+=1)}u?Array.isArray(t)?r.insertText(t.map(h=>h.text||"").join(""),a,c):typeof t=="object"&&t&&t.text?r.insertText(t.text,a,c):r.insertText(t,a,c):r.replaceWith(a,c,s),n.updateSelection&&S0e(r,r.steps.length-1,-1)}return!0},P0e=()=>({state:e,dispatch:t})=>Cye(e,t),C0e=()=>({state:e,dispatch:t})=>Oye(e,t),O0e=()=>({state:e,dispatch:t})=>bye(e,t),E0e=()=>({state:e,dispatch:t})=>kye(e,t);function nB(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function $0e(e){const t=e.split(/-(?!$)/);let n=t[t.length-1];n==="Space"&&(n=" ");let r,o,i,s;for(let a=0;a({editor:t,view:n,tr:r,dispatch:o})=>{const i=$0e(e).split(/-(?!$)/),s=i.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),a=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),c=t.captureTransaction(()=>{n.someProp("handleKeyDown",u=>u(n,a))});return c?.steps.forEach(u=>{const f=u.map(r.mapping);f&&o&&r.maybeStep(f)}),!0};function If(e,t,n={}){const{from:r,to:o,empty:i}=e.selection,s=t?Hn(t,e.schema):null,a=[];e.doc.nodesBetween(r,o,(p,h)=>{if(p.isText)return;const g=Math.max(r,h),y=Math.min(o,h+p.nodeSize);a.push({node:p,from:g,to:y})});const c=o-r,u=a.filter(p=>s?s.name===p.node.type.name:!0).filter(p=>cy(p.node.attrs,n,{strict:!1}));return i?!!u.length:u.reduce((p,h)=>p+h.to-h.from,0)>=c}const T0e=(e,t={})=>({state:n,dispatch:r})=>{const o=Hn(e,n.schema);return If(n,o,t)?Eye(n,r):!1},I0e=()=>({state:e,dispatch:t})=>Iye(e,t),N0e=e=>({state:t,dispatch:n})=>{const r=Hn(e,t.schema);return Bye(r)(t,n)},R0e=()=>({state:e,dispatch:t})=>$ye(e,t);function a1(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function II(e,t){const n=typeof t=="string"?[t]:t;return Object.keys(e).reduce((r,o)=>(n.includes(o)||(r[o]=e[o]),r),{})}const L0e=(e,t)=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=a1(typeof e=="string"?e:e.name,r.schema);return a?(a==="node"&&(i=Hn(e,r.schema)),a==="mark"&&(s=Fa(e,r.schema)),o&&n.selection.ranges.forEach(c=>{r.doc.nodesBetween(c.$from.pos,c.$to.pos,(u,f)=>{i&&i===u.type&&n.setNodeMarkup(f,void 0,II(u.attrs,t)),s&&u.marks.length&&u.marks.forEach(p=>{s===p.type&&n.addMark(f,f+u.nodeSize,s.create(II(p.attrs,t)))})})}),!0):!1},z0e=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),A0e=()=>({tr:e,commands:t})=>t.setTextSelection({from:0,to:e.doc.content.size}),D0e=()=>({state:e,dispatch:t})=>Sye(e,t),j0e=()=>({state:e,dispatch:t})=>Pye(e,t),B0e=()=>({state:e,dispatch:t})=>Nye(e,t),F0e=()=>({state:e,dispatch:t})=>zye(e,t),V0e=()=>({state:e,dispatch:t})=>Lye(e,t);function rB(e,t,n={}){return uy(e,t,{slice:!1,parseOptions:n})}const H0e=(e,t=!1,n={})=>({tr:r,editor:o,dispatch:i})=>{const{doc:s}=r,a=rB(e,o.schema,n);return i&&r.replaceWith(0,s.content.size,a).setMeta("preventUpdate",!t),!0};function W0e(e,t){const n=new uj(e);return t.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function U0e(e){for(let t=0;t{n(o)&&r.push({node:o,pos:i})}),r}function K0e(e,t){for(let n=e.depth;n>0;n-=1){const r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function CP(e){return t=>K0e(t.$from,e)}function G0e(e,t){const n=zi.fromSchema(t).serializeFragment(e),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}function q0e(e,t){const n={from:0,to:e.content.size};return Xj(e,n,t)}function fp(e,t){const n=Fa(t,e.schema),{from:r,to:o,empty:i}=e.selection,s=[];i?(e.storedMarks&&s.push(...e.storedMarks),s.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,o,c=>{s.push(...c.marks)});const a=s.find(c=>c.type.name===n.name);return a?{...a.attrs}:{}}function Y0e(e,t){const n=Hn(t,e.schema),{from:r,to:o}=e.selection,i=[];e.doc.nodesBetween(r,o,a=>{i.push(a)});const s=i.reverse().find(a=>a.type.name===n.name);return s?{...s.attrs}:{}}function oB(e,t){const n=a1(typeof t=="string"?t:t.name,e.schema);return n==="node"?Y0e(e,t):n==="mark"?fp(e,t):{}}function J0e(e,t=JSON.stringify){const n={};return e.filter(r=>{const o=t(r);return Object.prototype.hasOwnProperty.call(n,o)?!1:n[o]=!0})}function X0e(e){const t=J0e(e);return t.length===1?t:t.filter((n,r)=>!t.filter((i,s)=>s!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function Q0e(e){const{mapping:t,steps:n}=e,r=[];return t.maps.forEach((o,i)=>{const s=[];if(o.ranges.length)o.forEach((a,c)=>{s.push({from:a,to:c})});else{const{from:a,to:c}=n[i];if(a===void 0||c===void 0)return;s.push({from:a,to:c})}s.forEach(({from:a,to:c})=>{const u=t.slice(i).map(a,-1),f=t.slice(i).map(c),p=t.invert().map(u,-1),h=t.invert().map(f);r.push({oldRange:{from:p,to:h},newRange:{from:u,to:f}})})}),X0e(r)}function dy(e,t,n){const r=[];return e===t?n.resolve(e).marks().forEach(o=>{const i=n.resolve(e-1),s=kP(i,o.type);s&&r.push({mark:o,...s})}):n.nodesBetween(e,t,(o,i)=>{r.push(...o.marks.map(s=>({from:i,to:i+o.nodeSize,mark:s})))}),r}function fm(e,t,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const o=e.find(i=>i.type===t&&i.name===r);return o?o.attribute.keepOnSplit:!1}))}function AS(e,t,n={}){const{empty:r,ranges:o}=e.selection,i=t?Fa(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(p=>i?i.name===p.type.name:!0).find(p=>cy(p.attrs,n,{strict:!1}));let s=0;const a=[];if(o.forEach(({$from:p,$to:h})=>{const g=p.pos,y=h.pos;e.doc.nodesBetween(g,y,(_,k)=>{if(!_.isText&&!_.marks.length)return;const b=Math.max(g,k),S=Math.min(y,k+_.nodeSize),P=S-b;s+=P,a.push(..._.marks.map(E=>({mark:E,from:b,to:S})))})}),s===0)return!1;const c=a.filter(p=>i?i.name===p.mark.type.name:!0).filter(p=>cy(p.mark.attrs,n,{strict:!1})).reduce((p,h)=>p+h.to-h.from,0),u=a.filter(p=>i?p.mark.type!==i&&p.mark.type.excludes(i):!0).reduce((p,h)=>p+h.to-h.from,0);return(c>0?c+u:c)>=s}function e1e(e,t,n={}){if(!t)return If(e,null,n)||AS(e,null,n);const r=a1(t,e.schema);return r==="node"?If(e,t,n):r==="mark"?AS(e,t,n):!1}function NI(e,t){const{nodeExtensions:n}=o1(t),r=n.find(s=>s.name===e);if(!r)return!1;const o={name:r.name,options:r.options,storage:r.storage},i=We(Se(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function t1e(e){var t;const n=(t=e.type.createAndFill())===null||t===void 0?void 0:t.toJSON(),r=e.toJSON();return JSON.stringify(n)===JSON.stringify(r)}function n1e(e,t,n){var r;const{selection:o}=t;let i=null;if(eB(o)&&(i=o.$cursor),i){const a=(r=e.storedMarks)!==null&&r!==void 0?r:i.marks();return!!n.isInSet(a)||!a.some(c=>c.type.excludes(n))}const{ranges:s}=o;return s.some(({$from:a,$to:c})=>{let u=a.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(a.pos,c.pos,(f,p,h)=>{if(u)return!1;if(f.isInline){const g=!h||h.type.allowsMarkType(n),y=!!n.isInSet(f.marks)||!f.marks.some(_=>_.type.excludes(n));u=g&&y}return!u}),u})}const r1e=(e,t={})=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=n,{empty:s,ranges:a}=i,c=Fa(e,r.schema);if(o)if(s){const u=fp(r,c);n.addStoredMark(c.create({...u,...t}))}else a.forEach(u=>{const f=u.$from.pos,p=u.$to.pos;r.doc.nodesBetween(f,p,(h,g)=>{const y=Math.max(g,f),_=Math.min(g+h.nodeSize,p);h.marks.find(b=>b.type===c)?h.marks.forEach(b=>{c===b.type&&n.addMark(y,_,c.create({...b.attrs,...t}))}):n.addMark(y,_,c.create(t))})});return n1e(r,n,c)},o1e=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),i1e=(e,t={})=>({state:n,dispatch:r,chain:o})=>{const i=Hn(e,n.schema);return i.isTextblock?o().command(({commands:s})=>OI(i,t)(n)?!0:s.clearNodes()).command(({state:s})=>OI(i,t)(s,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},s1e=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,o=vl(e,0,r.content.size),i=Ie.create(r,o);t.setSelection(i)}return!0},a1e=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,{from:o,to:i}=typeof e=="number"?{from:e,to:e}:e,s=qe.atStart(r).from,a=qe.atEnd(r).to,c=vl(o,s,a),u=vl(i,s,a),f=qe.create(r,c,u);t.setSelection(f)}return!0},l1e=e=>({state:t,dispatch:n})=>{const r=Hn(e,t.schema);return Hye(r)(t,n)};function RI(e,t){const n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){const r=n.filter(o=>t?.includes(o.type.name));e.tr.ensureMarks(r)}}const c1e=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:o})=>{const{selection:i,doc:s}=t,{$from:a,$to:c}=i,u=o.extensionManager.attributes,f=fm(u,a.node().type.name,a.node().attrs);if(i instanceof Ie&&i.node.isBlock)return!a.parentOffset||!Kc(s,a.pos)?!1:(r&&(e&&RI(n,o.extensionManager.splittableMarks),t.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;if(r){const p=c.parentOffset===c.parent.content.size;i instanceof qe&&t.deleteSelection();const h=a.depth===0?void 0:U0e(a.node(-1).contentMatchAt(a.indexAfter(-1)));let g=p&&h?[{type:h,attrs:f}]:void 0,y=Kc(t.doc,t.mapping.map(a.pos),1,g);if(!g&&!y&&Kc(t.doc,t.mapping.map(a.pos),1,h?[{type:h}]:void 0)&&(y=!0,g=h?[{type:h,attrs:f}]:void 0),y&&(t.split(t.mapping.map(a.pos),1,g),h&&!p&&!a.parentOffset&&a.parent.type!==h)){const _=t.mapping.map(a.before()),k=t.doc.resolve(_);a.node(-1).canReplaceWith(k.index(),k.index()+1,h)&&t.setNodeMarkup(t.mapping.map(a.before()),h)}e&&RI(n,o.extensionManager.splittableMarks),t.scrollIntoView()}return!0},u1e=e=>({tr:t,state:n,dispatch:r,editor:o})=>{var i;const s=Hn(e,n.schema),{$from:a,$to:c}=n.selection,u=n.selection.node;if(u&&u.isBlock||a.depth<2||!a.sameParent(c))return!1;const f=a.node(-1);if(f.type!==s)return!1;const p=o.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==s||a.index(-2)!==a.node(-2).childCount-1)return!1;if(r){let k=se.empty;const b=a.index(-1)?1:a.index(-2)?2:3;for(let N=a.depth-b;N>=a.depth-3;N-=1)k=se.from(a.node(N).copy(k));const S=a.indexAfter(-1){if(I>-1)return!1;N.isTextblock&&N.content.size===0&&(I=R+1)}),I>-1&&t.setSelection(qe.near(t.doc.resolve(I))),t.scrollIntoView()}return!0}const h=c.pos===a.end()?f.contentMatchAt(0).defaultType:null,g=fm(p,f.type.name,f.attrs),y=fm(p,a.node().type.name,a.node().attrs);t.delete(a.pos,c.pos);const _=h?[{type:s,attrs:g},{type:h,attrs:y}]:[{type:s,attrs:g}];if(!Kc(t.doc,a.pos,2))return!1;if(r){const{selection:k,storedMarks:b}=n,{splittableMarks:S}=o.extensionManager,P=b||k.$to.parentOffset&&k.$from.marks();if(t.split(a.pos,2,_).scrollIntoView(),!P||!r)return!0;const E=P.filter($=>S.includes($.type.name));t.ensureMarks(E)}return!0},ww=(e,t)=>{const n=CP(s=>s.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const o=e.doc.nodeAt(r);return n.node.type===o?.type&&ja(e.doc,n.pos)&&e.join(n.pos),!0},bw=(e,t)=>{const n=CP(s=>s.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const o=e.doc.nodeAt(r);return n.node.type===o?.type&&ja(e.doc,r)&&e.join(r),!0},d1e=(e,t,n,r={})=>({editor:o,tr:i,state:s,dispatch:a,chain:c,commands:u,can:f})=>{const{extensions:p,splittableMarks:h}=o.extensionManager,g=Hn(e,s.schema),y=Hn(t,s.schema),{selection:_,storedMarks:k}=s,{$from:b,$to:S}=_,P=b.blockRange(S),E=k||_.$to.parentOffset&&_.$from.marks();if(!P)return!1;const $=CP(I=>NI(I.type.name,p))(_);if(P.depth>=1&&$&&P.depth-$.depth<=1){if($.node.type===g)return u.liftListItem(y);if(NI($.node.type.name,p)&&g.validContent($.node.content)&&a)return c().command(()=>(i.setNodeMarkup($.pos,g),!0)).command(()=>ww(i,g)).command(()=>bw(i,g)).run()}return!n||!E||!a?c().command(()=>f().wrapInList(g,r)?!0:u.clearNodes()).wrapInList(g,r).command(()=>ww(i,g)).command(()=>bw(i,g)).run():c().command(()=>{const I=f().wrapInList(g,r),N=E.filter(R=>h.includes(R.type.name));return i.ensureMarks(N),I?!0:u.clearNodes()}).wrapInList(g,r).command(()=>ww(i,g)).command(()=>bw(i,g)).run()},f1e=(e,t={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=n,s=Fa(e,r.schema);return AS(r,s,t)?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,t)},p1e=(e,t,n={})=>({state:r,commands:o})=>{const i=Hn(e,r.schema),s=Hn(t,r.schema);return If(r,i,n)?o.setNode(s):o.setNode(i,n)},h1e=(e,t={})=>({state:n,commands:r})=>{const o=Hn(e,n.schema);return If(n,o,t)?r.lift(o):r.wrapIn(o,t)},m1e=()=>({state:e,dispatch:t})=>{const n=e.plugins;for(let r=0;r=0;c-=1)s.step(a.steps[c].invert(a.docs[c]));if(i.text){const c=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,e.schema.text(i.text,c))}else s.delete(i.from,i.to)}return!0}}return!1},g1e=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,{empty:r,ranges:o}=n;return r||t&&o.forEach(i=>{e.removeMark(i.$from.pos,i.$to.pos)}),!0},v1e=(e,t={})=>({tr:n,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:s=!1}=t,{selection:a}=n,c=Fa(e,r.schema),{$from:u,empty:f,ranges:p}=a;if(!o)return!0;if(f&&s){let{from:h,to:g}=a;const y=(i=u.marks().find(k=>k.type===c))===null||i===void 0?void 0:i.attrs,_=kP(u,c,y);_&&(h=_.from,g=_.to),n.removeMark(h,g,c)}else p.forEach(h=>{n.removeMark(h.$from.pos,h.$to.pos,c)});return n.removeStoredMark(c),!0},y1e=(e,t={})=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=a1(typeof e=="string"?e:e.name,r.schema);return a?(a==="node"&&(i=Hn(e,r.schema)),a==="mark"&&(s=Fa(e,r.schema)),o&&n.selection.ranges.forEach(c=>{const u=c.$from.pos,f=c.$to.pos;r.doc.nodesBetween(u,f,(p,h)=>{i&&i===p.type&&n.setNodeMarkup(h,void 0,{...p.attrs,...t}),s&&p.marks.length&&p.marks.forEach(g=>{if(s===g.type){const y=Math.max(h,u),_=Math.min(h+p.nodeSize,f);n.addMark(y,_,s.create({...g.attrs,...t}))}})})}),!0):!1},_1e=(e,t={})=>({state:n,dispatch:r})=>{const o=Hn(e,n.schema);return Aye(o,t)(n,r)},w1e=(e,t={})=>({state:n,dispatch:r})=>{const o=Hn(e,n.schema);return Dye(o,t)(n,r)};var b1e=Object.freeze({__proto__:null,blur:i0e,clearContent:s0e,clearNodes:a0e,command:l0e,createParagraphNear:c0e,deleteCurrentNode:u0e,deleteNode:d0e,deleteRange:f0e,deleteSelection:p0e,enter:h0e,exitCode:m0e,extendMarkRange:v0e,first:y0e,focus:_0e,forEach:w0e,insertContent:b0e,insertContentAt:k0e,joinUp:P0e,joinDown:C0e,joinBackward:O0e,joinForward:E0e,keyboardShortcut:M0e,lift:T0e,liftEmptyBlock:I0e,liftListItem:N0e,newlineInCode:R0e,resetAttributes:L0e,scrollIntoView:z0e,selectAll:A0e,selectNodeBackward:D0e,selectNodeForward:j0e,selectParentNode:B0e,selectTextblockEnd:F0e,selectTextblockStart:V0e,setContent:H0e,setMark:r1e,setMeta:o1e,setNode:i1e,setNodeSelection:s1e,setTextSelection:a1e,sinkListItem:l1e,splitBlock:c1e,splitListItem:u1e,toggleList:d1e,toggleMark:f1e,toggleNode:p1e,toggleWrap:h1e,undoInputRule:m1e,unsetAllMarks:g1e,unsetMark:v1e,updateAttributes:y1e,wrapIn:_1e,wrapInList:w1e});const S1e=Nr.create({name:"commands",addCommands(){return{...b1e}}}),x1e=Nr.create({name:"editable",addProseMirrorPlugins(){return[new Ar({key:new pi("editable"),props:{editable:()=>this.editor.options.editable}})]}}),k1e=Nr.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new Ar({key:new pi("focusEvents"),props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;const r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;const r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),P1e=Nr.create({name:"keymap",addKeyboardShortcuts(){const e=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:a})=>{const{selection:c,doc:u}=a,{empty:f,$anchor:p}=c,{pos:h,parent:g}=p,y=Ue.atStart(u).from===h;return!f||!y||!g.type.isTextblock||g.textContent.length?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},i={...r,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return PP()||nB()?i:o},addProseMirrorPlugins(){return[new Ar({key:new pi("clearDocument"),appendTransaction:(e,t,n)=>{if(!(e.some(y=>y.docChanged)&&!t.doc.eq(n.doc)))return;const{empty:o,from:i,to:s}=t.selection,a=Ue.atStart(t.doc).from,c=Ue.atEnd(t.doc).to;if(o||!(i===a&&s===c)||!(n.doc.textBetween(0,n.doc.content.size," "," ").length===0))return;const p=n.tr,h=n1({state:n,transaction:p}),{commands:g}=new r1({editor:this.editor,state:h});if(g.clearNodes(),!!p.steps.length)return p}})]}}),C1e=Nr.create({name:"tabindex",addProseMirrorPlugins(){return[new Ar({key:new pi("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});var O1e=Object.freeze({__proto__:null,ClipboardTextSerializer:o0e,Commands:S1e,Editable:x1e,FocusEvents:k1e,Keymap:P1e,Tabindex:C1e});const E1e=`.ProseMirror { + position: relative; +} + +.ProseMirror { + word-wrap: break-word; + white-space: pre-wrap; + white-space: break-spaces; + -webkit-font-variant-ligatures: none; + font-variant-ligatures: none; + font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */ +} + +.ProseMirror [contenteditable="false"] { + white-space: normal; +} + +.ProseMirror [contenteditable="false"] [contenteditable="true"] { + white-space: pre-wrap; +} + +.ProseMirror pre { + white-space: pre-wrap; +} + +img.ProseMirror-separator { + display: inline !important; + border: none !important; + margin: 0 !important; + width: 1px !important; + height: 1px !important; +} + +.ProseMirror-gapcursor { + display: none; + pointer-events: none; + position: absolute; + margin: 0; +} + +.ProseMirror-gapcursor:after { + content: ""; + display: block; + position: absolute; + top: -2px; + width: 20px; + border-top: 1px solid black; + animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite; +} + +@keyframes ProseMirror-cursor-blink { + to { + visibility: hidden; + } +} + +.ProseMirror-hideselection *::selection { + background: transparent; +} + +.ProseMirror-hideselection *::-moz-selection { + background: transparent; +} + +.ProseMirror-hideselection * { + caret-color: transparent; +} + +.ProseMirror-focused .ProseMirror-gapcursor { + display: block; +} + +.tippy-box[data-animation=fade][data-state=hidden] { + opacity: 0 +}`;function $1e(e,t){const n=document.querySelector("style[data-tiptap-style]");if(n!==null)return n;const r=document.createElement("style");return t&&r.setAttribute("nonce",t),r.setAttribute("data-tiptap-style",""),r.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(r),r}let M1e=class extends Wye{constructor(t={}){super(),this.isFocused=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}))},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=$1e(E1e,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,n=!0){this.setOptions({editable:t}),n&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(t,n){const r=Jj(n)?n(t,[...this.state.plugins]):[...this.state.plugins,t],o=this.state.reconfigure({plugins:r});this.view.updateState(o)}unregisterPlugin(t){if(this.isDestroyed)return;const n=typeof t=="string"?`${t}$`:t.key,r=this.state.reconfigure({plugins:this.state.plugins.filter(o=>!o.key.startsWith(n))});this.view.updateState(r)}createExtensionManager(){const n=[...this.options.enableCoreExtensions?Object.values(O1e):[],...this.options.extensions].filter(r=>["extension","node","mark"].includes(r?.type));this.extensionManager=new Ic(n,this)}createCommandManager(){this.commandManager=new r1({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){const t=rB(this.options.content,this.schema,this.options.parseOptions),n=tB(t,this.options.autofocus);this.view=new lye(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:Mc.create({doc:t,selection:n||void 0})});const r=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(r),this.createNodeViews();const o=this.view.dom;o.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const n=this.capturedTransaction;return this.capturedTransaction=null,n}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(s=>{var a;return(a=this.capturedTransaction)===null||a===void 0?void 0:a.step(s)});return}const n=this.state.apply(t),r=!this.state.selection.eq(n.selection);this.view.updateState(n),this.emit("transaction",{editor:this,transaction:t}),r&&this.emit("selectionUpdate",{editor:this,transaction:t});const o=t.getMeta("focus"),i=t.getMeta("blur");o&&this.emit("focus",{editor:this,event:o.event,transaction:t}),i&&this.emit("blur",{editor:this,event:i.event,transaction:t}),!(!t.docChanged||t.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:t})}getAttributes(t){return oB(this.state,t)}isActive(t,n){const r=typeof t=="string"?t:null,o=typeof t=="string"?n:t;return e1e(this.state,r,o)}getJSON(){return this.state.doc.toJSON()}getHTML(){return G0e(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:n=` + +`,textSerializers:r={}}=t||{};return q0e(this.state.doc,{blockSeparator:n,textSerializers:{...Qj(this.schema),...r}})}get isEmpty(){return t1e(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}get isDestroyed(){var t;return!(!((t=this.view)===null||t===void 0)&&t.docView)}};function Wl(e){return new i1({find:e.find,handler:({state:t,range:n,match:r})=>{const o=We(e.getAttributes,void 0,r);if(o===!1||o===null)return null;const{tr:i}=t,s=r[r.length-1],a=r[0];let c=n.to;if(s){const u=a.search(/\S/),f=n.from+a.indexOf(s),p=f+s.length;if(dy(n.from,n.to,t.doc).filter(g=>g.mark.type.excluded.find(_=>_===e.type&&_!==g.mark.type)).filter(g=>g.to>f).length)return null;pn.from&&i.delete(n.from+u,f),c=n.from+u+s.length,i.addMark(n.from+u,c,e.type.create(o||{})),i.removeStoredMark(e.type)}}})}function iB(e){return new i1({find:e.find,handler:({state:t,range:n,match:r})=>{const o=We(e.getAttributes,void 0,r)||{},{tr:i}=t,s=n.from;let a=n.to;if(r[1]){const c=r[0].lastIndexOf(r[1]);let u=s+c;u>a?u=a:a=u+r[1].length;const f=r[0][r[0].length-1];i.insertText(f,s+r[0].length-1),i.replaceWith(u,a,e.type.create(o))}else r[0]&&i.replaceWith(s,a,e.type.create(o))}})}function DS(e){return new i1({find:e.find,handler:({state:t,range:n,match:r})=>{const o=t.doc.resolve(n.from),i=We(e.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,i)}})}function Nf(e){return new i1({find:e.find,handler:({state:t,range:n,match:r,chain:o})=>{const i=We(e.getAttributes,void 0,r)||{},s=t.tr.delete(n.from,n.to),c=s.doc.resolve(n.from).blockRange(),u=c&&dP(c,e.type,i);if(!u)return null;if(s.wrap(c,u),e.keepMarks&&e.editor){const{selection:p,storedMarks:h}=t,{splittableMarks:g}=e.editor.extensionManager,y=h||p.$to.parentOffset&&p.$from.marks();if(y){const _=y.filter(k=>g.includes(k.type.name));s.ensureMarks(_)}}if(e.keepAttributes){const p=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(p,i).run()}const f=s.doc.resolve(n.from-1).nodeBefore;f&&f.type===e.type&&ja(s.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,f))&&s.join(n.from-1)}})}class br{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=We(Se(this,"addOptions",{name:this.name}))),this.storage=We(Se(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new br(t)}configure(t={}){const n=this.extend();return n.options=s1(this.options,t),n.storage=We(Se(n,"addStorage",{name:n.name,options:n.options})),n}extend(t={}){const n=new br(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=We(Se(n,"addOptions",{name:n.name})),n.storage=We(Se(n,"addStorage",{name:n.name,options:n.options})),n}static handleExit({editor:t,mark:n}){const{tr:r}=t.state,o=t.state.selection.$from;if(o.pos===o.end()){const s=o.marks();if(!!!s.find(u=>u?.type.name===n.name))return!1;const c=s.find(u=>u?.type.name===n.name);return c&&r.removeStoredMark(c),r.insertText(" ",o.pos),t.view.dispatch(r),!0}return!1}}class sr{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=We(Se(this,"addOptions",{name:this.name}))),this.storage=We(Se(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new sr(t)}configure(t={}){const n=this.extend();return n.options=s1(this.options,t),n.storage=We(Se(n,"addStorage",{name:n.name,options:n.options})),n}extend(t={}){const n=new sr(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=We(Se(n,"addOptions",{name:n.name})),n.storage=We(Se(n,"addStorage",{name:n.name,options:n.options})),n}}function Ta(e){return new Xye({find:e.find,handler:({state:t,range:n,match:r})=>{const o=We(e.getAttributes,void 0,r);if(o===!1||o===null)return null;const{tr:i}=t,s=r[r.length-1],a=r[0];let c=n.to;if(s){const u=a.search(/\S/),f=n.from+a.indexOf(s),p=f+s.length;if(dy(n.from,n.to,t.doc).filter(g=>g.mark.type.excluded.find(_=>_===e.type&&_!==g.mark.type)).filter(g=>g.to>f).length)return null;pn.from&&i.delete(n.from+u,f),c=n.from+u+s.length,i.addMark(n.from+u,c,e.type.create(o||{})),i.removeStoredMark(e.type)}}})}class T1e extends M1e{constructor(){super(...arguments),this.contentComponent=null}}const I1e=({renderers:e})=>O.createElement(O.Fragment,null,Object.entries(e).map(([t,n])=>qG.createPortal(n.reactElement,n.element,t)));class N1e extends O.Component{constructor(t){super(t),this.editorContentRef=O.createRef(),this.initialized=!1,this.state={renderers:{}}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const{editor:t}=this.props;if(t&&t.options.element){if(t.contentComponent)return;const n=this.editorContentRef.current;n.append(...t.options.element.childNodes),t.setOptions({element:n}),t.contentComponent=this,t.createNodeViews(),this.initialized=!0}}maybeFlushSync(t){this.initialized?_r.flushSync(t):t()}setRenderer(t,n){this.maybeFlushSync(()=>{this.setState(({renderers:r})=>({renderers:{...r,[t]:n}}))})}removeRenderer(t){this.maybeFlushSync(()=>{this.setState(({renderers:n})=>{const r={...n};return delete r[t],{renderers:r}})})}componentWillUnmount(){const{editor:t}=this.props;if(!t||(this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),t.contentComponent=null,!t.options.element.firstChild))return;const n=document.createElement("div");n.append(...t.options.element.childNodes),t.setOptions({element:n})}render(){const{editor:t,...n}=this.props;return O.createElement(O.Fragment,null,O.createElement("div",{ref:this.editorContentRef,...n}),O.createElement(I1e,{renderers:this.state.renderers}))}}const R1e=O.memo(N1e),L1e=v.createContext({onDragStart:void 0}),z1e=()=>v.useContext(L1e);O.forwardRef((e,t)=>{const{onDragStart:n}=z1e(),r=e.as||"div";return O.createElement(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});function A1e(){const[,e]=v.useState(0);return()=>e(t=>t+1)}const D1e=(e={},t=[])=>{const[n,r]=v.useState(null),o=A1e(),{onBeforeCreate:i,onBlur:s,onCreate:a,onDestroy:c,onFocus:u,onSelectionUpdate:f,onTransaction:p,onUpdate:h}=e,g=v.useRef(i),y=v.useRef(s),_=v.useRef(a),k=v.useRef(c),b=v.useRef(u),S=v.useRef(f),P=v.useRef(p),E=v.useRef(h);return v.useEffect(()=>{n&&(i&&(n.off("beforeCreate",g.current),n.on("beforeCreate",i),g.current=i),s&&(n.off("blur",y.current),n.on("blur",s),y.current=s),a&&(n.off("create",_.current),n.on("create",a),_.current=a),c&&(n.off("destroy",k.current),n.on("destroy",c),k.current=c),u&&(n.off("focus",b.current),n.on("focus",u),b.current=u),f&&(n.off("selectionUpdate",S.current),n.on("selectionUpdate",f),S.current=f),p&&(n.off("transaction",P.current),n.on("transaction",p),P.current=p),h&&(n.off("update",E.current),n.on("update",h),E.current=h))},[i,s,a,c,u,f,p,h,n]),v.useEffect(()=>{let $=!0;const I=new T1e(e);return r(I),I.on("transaction",()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{$&&o()})})}),()=>{I.destroy(),$=!1}},t),n};var j1e=Object.defineProperty,LI=Object.getOwnPropertySymbols,B1e=Object.prototype.hasOwnProperty,F1e=Object.prototype.propertyIsEnumerable,zI=(e,t,n)=>t in e?j1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Sw=(e,t)=>{for(var n in t||(t={}))B1e.call(t,n)&&zI(e,n,t[n]);if(LI)for(var n of LI(t))F1e.call(t,n)&&zI(e,n,t[n]);return e};function V1e(e,t){if(!e)return null;const n=t.colorScheme==="dark"?5:7;return{pre:{background:t.colorScheme==="dark"?t.colors.dark[8]:t.fn.rgba(t.colors.gray[0],.65),borderRadius:t.fn.radius(),color:t.colorScheme==="dark"?t.colors.dark[0]:t.colors.gray[9],fontFamily:t.fontFamilyMonospace,padding:`${t.spacing.md} ${t.spacing.xl}`,"& code":{background:"none",color:"inherit",fontSize:t.fontSizes.sm,padding:0}," & .hljs-comment, & .hljs-quote":{color:t.colorScheme==="dark"?t.colors.dark[2]:t.colors.gray[5]},"& .hljs-variable, & .hljs-template-variable, & .hljs-attribute, & .hljs-tag, & .hljs-name, & .hljs-regexp, & .hljs-link, & .hljs-name, & .hljs-selector-id, & .hljs-selector-class":{color:t.colors.red[n]},"& .hljs-number, & .hljs-meta, & .hljs-built_in, & .hljs-builtin-name, & .hljs-literal, & .hljs-type, & .hljs-params":{color:t.colors[t.colorScheme==="dark"?"cyan":"blue"][n]},"& .hljs-string, & .hljs-symbol, & .hljs-bullet":{color:t.colors.red[n]},"& .hljs-title, & .hljs-section":{color:t.colors[t.colorScheme==="dark"?"yellow":"pink"][n]},"& .hljs-keyword, & .hljs-selector-tag":{color:t.colors.violet[n]},"& .hljs-emphasis":{fontStyle:"italic"},"& .hljs-strong":{fontWeight:700}}}}function H1e(e){return e?{"& li > p":{margin:0},"& ul li, & ol li":{marginTop:T(2)},"& ul, & ol":{marginTop:T(5),marginBottom:T(5)},"& p":{marginBottom:T(7)},"& h1, & h2, & h3, & h4, & h5, & h6, & p":{marginTop:0}}:null}var W1e=te((e,{withCodeHighlightStyles:t,withTypographyStyles:n})=>({typographyStylesProvider:Sw({},H1e(n)),content:Sw({backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,borderRadius:e.fn.radius(),"& .ProseMirror":{outline:0,padding:e.spacing.md},"& .ProseMirror > *:last-child":{marginBottom:0},"& .ProseMirror p.is-editor-empty:first-of-type::before":Sw({content:"attr(data-placeholder)",pointerEvents:"none",userSelect:"none",float:"left",height:0},e.fn.placeholderStyles())},V1e(t,e))}));const U1e=W1e;var Z1e=Object.defineProperty,fy=Object.getOwnPropertySymbols,sB=Object.prototype.hasOwnProperty,aB=Object.prototype.propertyIsEnumerable,AI=(e,t,n)=>t in e?Z1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,K1e=(e,t)=>{for(var n in t||(t={}))sB.call(t,n)&&AI(e,n,t[n]);if(fy)for(var n of fy(t))aB.call(t,n)&&AI(e,n,t[n]);return e},G1e=(e,t)=>{var n={};for(var r in e)sB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&fy)for(var r of fy(e))t.indexOf(r)<0&&aB.call(e,r)&&(n[r]=e[r]);return n};const q1e={},lB=v.forwardRef((e,t)=>{const n=ue("RichTextEditorContent",q1e,e),{className:r}=n,o=G1e(n,["className"]),{editor:i,withCodeHighlightStyles:s,withTypographyStyles:a,classNames:c,styles:u,unstyled:f,variant:p}=Da(),{classes:h,cx:g}=U1e({withCodeHighlightStyles:s,withTypographyStyles:a},{name:"RichTextEditor",classNames:c,styles:u,unstyled:f,variant:p});return O.createElement(s7,{className:g(h.typographyStylesProvider,r),unstyled:!a||f,ref:t},O.createElement(_e,K1e({component:R1e,editor:i,className:h.content},o)))});lB.displayName="@mantine/tiptap/Content";var Y1e=Object.defineProperty,DI=Object.getOwnPropertySymbols,J1e=Object.prototype.hasOwnProperty,X1e=Object.prototype.propertyIsEnumerable,jI=(e,t,n)=>t in e?Y1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,BI=(e,t)=>{for(var n in t||(t={}))J1e.call(t,n)&&jI(e,n,t[n]);if(DI)for(var n of DI(t))X1e.call(t,n)&&jI(e,n,t[n]);return e},Q1e=te(e=>{const t=e.fn.variant({variant:"light"});return{control:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,minWidth:T(26),height:T(26),display:"flex",justifyContent:"center",alignItems:"center",border:`${T(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,borderRadius:e.fn.radius(),cursor:"default","&[data-interactive]":BI({cursor:"pointer"},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),"&[data-active]":{backgroundColor:t.background,color:t.color,"&:hover":BI({},e.fn.hover({backgroundColor:t.hover}))}}}});const e_e=Q1e;var t_e=Object.defineProperty,py=Object.getOwnPropertySymbols,cB=Object.prototype.hasOwnProperty,uB=Object.prototype.propertyIsEnumerable,FI=(e,t,n)=>t in e?t_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,n_e=(e,t)=>{for(var n in t||(t={}))cB.call(t,n)&&FI(e,n,t[n]);if(py)for(var n of py(t))uB.call(t,n)&&FI(e,n,t[n]);return e},r_e=(e,t)=>{var n={};for(var r in e)cB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&py)for(var r of py(e))t.indexOf(r)<0&&uB.call(e,r)&&(n[r]=e[r]);return n};const o_e={interactive:!0},pp=v.forwardRef((e,t)=>{const n=ue("RichTextEditorControl",o_e,e),{className:r,active:o,children:i,interactive:s}=n,a=r_e(n,["className","active","children","interactive"]),{classNames:c,styles:u,unstyled:f,variant:p}=Da(),{classes:h,cx:g}=e_e(null,{name:"RichTextEditor",classNames:c,styles:u,unstyled:f,variant:p});return O.createElement(Bn,n_e({className:g(h.control,r),"data-rich-text-editor-control":!0,tabIndex:s?0:-1,"data-interactive":s||void 0,"data-active":o||void 0,"aria-pressed":o&&s||void 0,"aria-hidden":!s||void 0,ref:t,unstyled:f},a),i)});pp.displayName="@mantine/tiptap/Control";var i_e=te(e=>({controlsGroup:{display:"flex","& [data-rich-text-editor-control]":{borderRadius:0,"&:not(:last-of-type)":{borderRight:0},"&:last-of-type":{borderTopRightRadius:e.fn.radius(),borderBottomRightRadius:e.fn.radius()},"&:first-of-type":{borderTopLeftRadius:e.fn.radius(),borderBottomLeftRadius:e.fn.radius()}}}}));const s_e=i_e;var a_e=Object.defineProperty,hy=Object.getOwnPropertySymbols,dB=Object.prototype.hasOwnProperty,fB=Object.prototype.propertyIsEnumerable,VI=(e,t,n)=>t in e?a_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,l_e=(e,t)=>{for(var n in t||(t={}))dB.call(t,n)&&VI(e,n,t[n]);if(hy)for(var n of hy(t))fB.call(t,n)&&VI(e,n,t[n]);return e},c_e=(e,t)=>{var n={};for(var r in e)dB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&hy)for(var r of hy(e))t.indexOf(r)<0&&fB.call(e,r)&&(n[r]=e[r]);return n};const u_e={},pB=v.forwardRef((e,t)=>{const n=ue("RichTextEditorControlsGroup",u_e,e),{className:r,children:o}=n,i=c_e(n,["className","children"]),{classNames:s,styles:a,unstyled:c}=Da(),{classes:u,cx:f}=s_e(null,{name:"RichTextEditor",classNames:s,styles:a,unstyled:c});return O.createElement(_e,l_e({className:f(u.controlsGroup,r),ref:t},i),o)});pB.displayName="@mantine/tiptap/ControlsGroup";var d_e=te((e,{sticky:t,stickyOffset:n})=>({toolbar:{position:t?"sticky":"static",top:t?T(n):void 0,padding:`${e.spacing.xs} ${e.spacing.md}`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,zIndex:1,borderTopRightRadius:e.fn.radius(),borderTopLeftRadius:e.fn.radius(),borderBottom:`${T(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`}}));const f_e=d_e;var p_e=Object.defineProperty,my=Object.getOwnPropertySymbols,hB=Object.prototype.hasOwnProperty,mB=Object.prototype.propertyIsEnumerable,HI=(e,t,n)=>t in e?p_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,h_e=(e,t)=>{for(var n in t||(t={}))hB.call(t,n)&&HI(e,n,t[n]);if(my)for(var n of my(t))mB.call(t,n)&&HI(e,n,t[n]);return e},m_e=(e,t)=>{var n={};for(var r in e)hB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&my)for(var r of my(e))t.indexOf(r)<0&&mB.call(e,r)&&(n[r]=e[r]);return n};const g_e={stickyOffset:0},gB=v.forwardRef((e,t)=>{const n=ue("RichTextEditorToolbar",g_e,e),{className:r,children:o,sticky:i,stickyOffset:s}=n,a=m_e(n,["className","children","sticky","stickyOffset"]),c=Da(),{classes:u,cx:f}=f_e({sticky:i,stickyOffset:s},{name:"RichTextEditor",classNames:c.classNames,styles:c.styles,unstyled:c.unstyled,variant:c.variant});return O.createElement(de,h_e({className:f(u.toolbar,r),ref:t},a),o)});gB.displayName="@mantine/tiptap/Toolbar";const v_e={linkControlLabel:"Link",colorPickerControlLabel:"Text color",highlightControlLabel:"Highlight text",colorControlLabel:e=>`Set text color ${e}`,boldControlLabel:"Bold",italicControlLabel:"Italic",underlineControlLabel:"Underline",strikeControlLabel:"Strikethrough",clearFormattingControlLabel:"Clear formatting",unlinkControlLabel:"Remove link",bulletListControlLabel:"Bullet list",orderedListControlLabel:"Ordered list",h1ControlLabel:"Heading 1",h2ControlLabel:"Heading 2",h3ControlLabel:"Heading 3",h4ControlLabel:"Heading 4",h5ControlLabel:"Heading 5",h6ControlLabel:"Heading 6",blockquoteControlLabel:"Blockquote",alignLeftControlLabel:"Align text: left",alignCenterControlLabel:"Align text: center",alignRightControlLabel:"Align text: right",alignJustifyControlLabel:"Align text: justify",codeControlLabel:"Code",codeBlockControlLabel:"Code block",subscriptControlLabel:"Subscript",superscriptControlLabel:"Superscript",unsetColorControlLabel:"Unset color",hrControlLabel:"Horizontal line",linkEditorInputLabel:"Enter URL",linkEditorInputPlaceholder:"https://example.com/",linkEditorExternalLink:"Open link in a new tab",linkEditorInternalLink:"Open link in the same tab",linkEditorSave:"Save",colorPickerCancel:"Cancel",colorPickerClear:"Clear color",colorPickerColorPicker:"Color picker",colorPickerPalette:"Color palette",colorPickerSave:"Save",colorPickerColorLabel:e=>`Set text color ${e}`};var y_e=te(e=>({root:{position:"relative",border:`${T(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,borderRadius:e.fn.radius()}}));const __e=y_e;var w_e=Object.defineProperty,gy=Object.getOwnPropertySymbols,vB=Object.prototype.hasOwnProperty,yB=Object.prototype.propertyIsEnumerable,WI=(e,t,n)=>t in e?w_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,b_e=(e,t)=>{for(var n in t||(t={}))vB.call(t,n)&&WI(e,n,t[n]);if(gy)for(var n of gy(t))yB.call(t,n)&&WI(e,n,t[n]);return e},S_e=(e,t)=>{var n={};for(var r in e)vB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&gy)for(var r of gy(e))t.indexOf(r)<0&&yB.call(e,r)&&(n[r]=e[r]);return n};const OP=v.forwardRef((e,t)=>{var n=e,{className:r,active:o,icon:i}=n,s=S_e(n,["className","active","icon"]);return O.createElement(pp,b_e({active:o,ref:t},s),O.createElement(i,{size:"1rem"}))});OP.displayName="@mantine/tiptap/ControlBase";var x_e=Object.defineProperty,UI=Object.getOwnPropertySymbols,k_e=Object.prototype.hasOwnProperty,P_e=Object.prototype.propertyIsEnumerable,ZI=(e,t,n)=>t in e?x_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,C_e=(e,t)=>{for(var n in t||(t={}))k_e.call(t,n)&&ZI(e,n,t[n]);if(UI)for(var n of UI(t))P_e.call(t,n)&&ZI(e,n,t[n]);return e};function Tt({label:e,isActive:t,operation:n,icon:r}){return v.forwardRef((o,i)=>{const{editor:s,labels:a}=Da(),c=a[e];return O.createElement(OP,C_e({"aria-label":c,title:c,active:t?.name?s?.isActive(t.name,t.attributes):!1,ref:i,onClick:()=>s?.chain().focus()[n.name](n.attributes).run(),icon:r},o))})}var O_e=Object.defineProperty,E_e=Object.defineProperties,$_e=Object.getOwnPropertyDescriptors,KI=Object.getOwnPropertySymbols,M_e=Object.prototype.hasOwnProperty,T_e=Object.prototype.propertyIsEnumerable,GI=(e,t,n)=>t in e?O_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,It=(e,t)=>{for(var n in t||(t={}))M_e.call(t,n)&&GI(e,n,t[n]);if(KI)for(var n of KI(t))T_e.call(t,n)&&GI(e,n,t[n]);return e},Nt=(e,t)=>E_e(e,$_e(t));const I_e=Tt({label:"boldControlLabel",icon:e=>O.createElement(Bfe,Nt(It({},e),{stroke:1.5})),isActive:{name:"bold"},operation:{name:"toggleBold"}}),N_e=Tt({label:"italicControlLabel",icon:e=>O.createElement(mpe,Nt(It({},e),{stroke:1.5})),isActive:{name:"italic"},operation:{name:"toggleItalic"}}),R_e=Tt({label:"underlineControlLabel",icon:e=>O.createElement(Bpe,Nt(It({},e),{stroke:1.5})),isActive:{name:"underline"},operation:{name:"toggleUnderline"}}),L_e=Tt({label:"strikeControlLabel",icon:e=>O.createElement(Ape,Nt(It({},e),{stroke:1.5})),isActive:{name:"strike"},operation:{name:"toggleStrike"}}),z_e=Tt({label:"clearFormattingControlLabel",icon:e=>O.createElement(Gfe,Nt(It({},e),{stroke:1.5})),operation:{name:"unsetAllMarks"}}),A_e=Tt({label:"unlinkControlLabel",icon:e=>O.createElement(Fpe,Nt(It({},e),{stroke:1.5})),operation:{name:"unsetLink"}}),D_e=Tt({label:"bulletListControlLabel",icon:e=>O.createElement(wpe,Nt(It({},e),{stroke:1.5})),isActive:{name:"bulletList"},operation:{name:"toggleBulletList"}}),j_e=Tt({label:"orderedListControlLabel",icon:e=>O.createElement(_pe,Nt(It({},e),{stroke:1.5})),isActive:{name:"orderedList"},operation:{name:"toggleOrderedList"}}),B_e=Tt({label:"h1ControlLabel",icon:e=>O.createElement(spe,Nt(It({},e),{stroke:1.5})),isActive:{name:"heading",attributes:{level:1}},operation:{name:"toggleHeading",attributes:{level:1}}}),F_e=Tt({label:"h2ControlLabel",icon:e=>O.createElement(ape,Nt(It({},e),{stroke:1.5})),isActive:{name:"heading",attributes:{level:2}},operation:{name:"toggleHeading",attributes:{level:2}}}),V_e=Tt({label:"h3ControlLabel",icon:e=>O.createElement(lpe,Nt(It({},e),{stroke:1.5})),isActive:{name:"heading",attributes:{level:3}},operation:{name:"toggleHeading",attributes:{level:3}}}),H_e=Tt({label:"h4ControlLabel",icon:e=>O.createElement(cpe,Nt(It({},e),{stroke:1.5})),isActive:{name:"heading",attributes:{level:4}},operation:{name:"toggleHeading",attributes:{level:4}}}),W_e=Tt({label:"h5ControlLabel",icon:e=>O.createElement(upe,Nt(It({},e),{stroke:1.5})),isActive:{name:"heading",attributes:{level:5}},operation:{name:"toggleHeading",attributes:{level:5}}}),U_e=Tt({label:"h6ControlLabel",icon:e=>O.createElement(dpe,Nt(It({},e),{stroke:1.5})),isActive:{name:"heading",attributes:{level:6}},operation:{name:"toggleHeading",attributes:{level:6}}}),Z_e=Tt({label:"blockquoteControlLabel",icon:e=>O.createElement(jfe,Nt(It({},e),{stroke:1.5})),isActive:{name:"blockquote"},operation:{name:"toggleBlockquote"}}),K_e=Tt({label:"alignLeftControlLabel",icon:e=>O.createElement(Lfe,Nt(It({},e),{stroke:1.5})),operation:{name:"setTextAlign",attributes:"left"}}),G_e=Tt({label:"alignRightControlLabel",icon:e=>O.createElement(zfe,Nt(It({},e),{stroke:1.5})),operation:{name:"setTextAlign",attributes:"right"}}),q_e=Tt({label:"alignCenterControlLabel",icon:e=>O.createElement(Nfe,Nt(It({},e),{stroke:1.5})),operation:{name:"setTextAlign",attributes:"center"}}),Y_e=Tt({label:"alignJustifyControlLabel",icon:e=>O.createElement(Rfe,Nt(It({},e),{stroke:1.5})),operation:{name:"setTextAlign",attributes:"justify"}}),J_e=Tt({label:"subscriptControlLabel",icon:e=>O.createElement(Dpe,Nt(It({},e),{stroke:1.5})),isActive:{name:"subscript"},operation:{name:"toggleSubscript"}}),X_e=Tt({label:"superscriptControlLabel",icon:e=>O.createElement(jpe,Nt(It({},e),{stroke:1.5})),isActive:{name:"superscript"},operation:{name:"toggleSuperscript"}}),Q_e=Tt({label:"codeControlLabel",icon:e=>O.createElement(Xk,Nt(It({},e),{stroke:1.5})),isActive:{name:"code"},operation:{name:"toggleCode"}}),ewe=Tt({label:"codeBlockControlLabel",icon:e=>O.createElement(Xk,Nt(It({},e),{stroke:1.5})),isActive:{name:"codeBlock"},operation:{name:"toggleCodeBlock"}}),twe=Tt({label:"highlightControlLabel",icon:e=>O.createElement(fpe,Nt(It({},e),{stroke:1.5})),isActive:{name:"highlight"},operation:{name:"toggleHighlight"}}),nwe=Tt({label:"hrControlLabel",icon:e=>O.createElement(vpe,Nt(It({},e),{stroke:1.5})),operation:{name:"setHorizontalRule"}}),rwe=Tt({label:"unsetColorControlLabel",icon:e=>O.createElement(b7,Nt(It({},e),{stroke:1.5})),operation:{name:"unsetColor"}});var owe=Object.defineProperty,qI=Object.getOwnPropertySymbols,iwe=Object.prototype.hasOwnProperty,swe=Object.prototype.propertyIsEnumerable,YI=(e,t,n)=>t in e?owe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,awe=(e,t)=>{for(var n in t||(t={}))iwe.call(t,n)&&YI(e,n,t[n]);if(qI)for(var n of qI(t))swe.call(t,n)&&YI(e,n,t[n]);return e},lwe=te(e=>{const t=e.fn.variant({variant:"light"});return{linkEditor:{display:"flex"},linkEditorInput:{borderTopRightRadius:0,borderBottomRightRadius:0,borderRight:0},linkEditorExternalControl:{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):e.white,border:`${T(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,height:T(24),width:T(24),display:"flex",justifyContent:"center",alignItems:"center",borderRadius:e.fn.radius(),"&[data-active]":awe({backgroundColor:t.background,borderColor:t.border,color:t.color},e.fn.hover({background:t.hover}))},linkEditorSave:{borderTopLeftRadius:0,borderBottomLeftRadius:0}}});const cwe=lwe;var uwe=Object.defineProperty,dwe=Object.defineProperties,fwe=Object.getOwnPropertyDescriptors,vy=Object.getOwnPropertySymbols,_B=Object.prototype.hasOwnProperty,wB=Object.prototype.propertyIsEnumerable,JI=(e,t,n)=>t in e?uwe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jS=(e,t)=>{for(var n in t||(t={}))_B.call(t,n)&&JI(e,n,t[n]);if(vy)for(var n of vy(t))wB.call(t,n)&&JI(e,n,t[n]);return e},pwe=(e,t)=>dwe(e,fwe(t)),bB=(e,t)=>{var n={};for(var r in e)_B.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&vy)for(var r of vy(e))t.indexOf(r)<0&&wB.call(e,r)&&(n[r]=e[r]);return n};const hwe=e=>{var t=e,{size:n}=t,r=bB(t,["size"]);return O.createElement(ype,jS({size:n,stroke:1.5},r))},mwe={},gwe=v.forwardRef((e,t)=>{const n=ue("RichTextEditorLinkControl",mwe,e),{icon:r,popoverProps:o,disableTooltips:i}=n,s=bB(n,["icon","popoverProps","disableTooltips"]),{editor:a,labels:c,classNames:u,styles:f,unstyled:p,variant:h}=Da(),{classes:g}=cwe(null,{name:"RichTextEditor",classNames:u,styles:f,unstyled:p,variant:h}),[y,_]=pZ(""),[k,b]=v.useState(!1),[S,{open:P,close:E}]=Su(!1),$=()=>{P();const F=a?.getAttributes("link");_(F?.href||""),b(F?.target==="_blank")},I=()=>{E(),_(""),b(!1)},N=()=>{I(),y===""?a.chain().focus().extendMarkRange("link").unsetLink().run():a.chain().focus().extendMarkRange("link").setLink({href:y,target:k?"_blank":null}).run()},R=F=>{F.key==="Enter"&&(F.preventDefault(),N())};return Xc("edit-link",$,!1),O.createElement(Ft,jS({trapFocus:!0,shadow:"md",withinPortal:!0,opened:S,onClose:I,offset:-44,zIndex:1e4,unstyled:p},o),O.createElement(Ft.Target,null,O.createElement(OP,pwe(jS({icon:r||hwe,"aria-label":c.linkControlLabel,title:c.linkControlLabel,onClick:$,active:a?.isActive("link"),unstyled:p},s),{ref:t}))),O.createElement(Ft.Dropdown,{sx:F=>({backgroundColor:F.colorScheme==="dark"?F.colors.dark[7]:F.white})},O.createElement("div",{className:g.linkEditor},O.createElement(hn,{placeholder:c.linkEditorInputPlaceholder,"aria-label":c.linkEditorInputLabel,type:"url",value:y,onChange:_,classNames:{input:g.linkEditorInput},onKeyDown:R,unstyled:p,rightSection:O.createElement(tn,{label:k?c.linkEditorExternalLink:c.linkEditorInternalLink,events:{hover:!0,focus:!0,touch:!0},withinPortal:!0,withArrow:!0,disabled:i,unstyled:p,zIndex:1e4},O.createElement(Bn,{onClick:()=>b(F=>!F),"data-active":k||void 0,className:g.linkEditorExternalControl,unstyled:p},O.createElement(tpe,{size:T(14),stroke:1.5})))}),O.createElement(Fn,{variant:"default",onClick:N,className:g.linkEditorSave,unstyled:p},c.linkEditorSave))))});var vwe=Object.defineProperty,ywe=Object.defineProperties,_we=Object.getOwnPropertyDescriptors,yy=Object.getOwnPropertySymbols,SB=Object.prototype.hasOwnProperty,xB=Object.prototype.propertyIsEnumerable,XI=(e,t,n)=>t in e?vwe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xw=(e,t)=>{for(var n in t||(t={}))SB.call(t,n)&&XI(e,n,t[n]);if(yy)for(var n of yy(t))xB.call(t,n)&&XI(e,n,t[n]);return e},wwe=(e,t)=>ywe(e,_we(t)),bwe=(e,t)=>{var n={};for(var r in e)SB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&yy)for(var r of yy(e))t.indexOf(r)<0&&xB.call(e,r)&&(n[r]=e[r]);return n};const Swe={},kB=v.forwardRef((e,t)=>{const n=ue("RichTextEditorColorPickerControl",Swe,e),{popoverProps:r,colors:o,colorPickerProps:i}=n,s=bwe(n,["popoverProps","colors","colorPickerProps"]),{editor:a,labels:c,unstyled:u}=Da(),[f,{toggle:p,close:h}]=Su(!1),[g,y]=v.useState("palette"),_=a?.getAttributes("textStyle").color||"#000",k=(P,E=!0)=>{a.chain().focus().setColor(P).run(),E&&h()},b=()=>{a.chain().focus().unsetColor().run(),h()},S=o.map((P,E)=>O.createElement(xf,{key:E,component:"button",color:P,onClick:()=>k(P),size:26,radius:"xs",sx:{cursor:"pointer"},title:c.colorPickerColorLabel(P),"aria-label":c.colorPickerColorLabel(P),unstyled:u}));return O.createElement(Ft,xw({opened:f,withinPortal:!0,trapFocus:!0,onClose:h,unstyled:u},r),O.createElement(Ft.Target,null,O.createElement(pp,wwe(xw({"aria-label":c.colorPickerControlLabel,title:c.colorPickerControlLabel},s),{ref:t,onClick:p}),O.createElement(xf,{color:_,size:14,unstyled:u}))),O.createElement(Ft.Dropdown,{sx:P=>({backgroundColor:P.colorScheme==="dark"?P.colors.dark[7]:P.white})},g==="palette"&&O.createElement(G8,{cols:7,spacing:2},S),g==="colorPicker"&&O.createElement(XD,xw({defaultValue:_,onChange:P=>k(P,!1),unstyled:u},i)),O.createElement(tn.Group,{closeDelay:200},O.createElement(de,{position:"right",spacing:"xs",mt:"sm"},g==="palette"&&O.createElement(vt,{variant:"default",onClick:h,unstyled:u,title:c.colorPickerCancel,"aria-label":c.colorPickerCancel},O.createElement(Kv,{stroke:1.5,size:"1rem"})),O.createElement(vt,{variant:"default",onClick:b,unstyled:u,title:c.colorPickerClear,"aria-label":c.colorPickerClear},O.createElement(b7,{stroke:1.5,size:"1rem"})),g==="palette"?O.createElement(vt,{variant:"default",onClick:()=>y("colorPicker"),unstyled:u,title:c.colorPickerColorPicker,"aria-label":c.colorPickerColorPicker},O.createElement(qfe,{stroke:1.5,size:"1rem"})):O.createElement(vt,{variant:"default",onClick:()=>y("palette"),unstyled:u,"aria-label":c.colorPickerPalette,title:c.colorPickerPalette},O.createElement(Epe,{stroke:1.5,size:"1rem"})),g==="colorPicker"&&O.createElement(vt,{variant:"default",onClick:h,unstyled:u,title:c.colorPickerSave,"aria-label":c.colorPickerSave},O.createElement(Zfe,{stroke:1.5,size:"1rem"}))))))});kB.displayName="@mantine/tiptap/ColorPickerControl";var xwe=Object.defineProperty,kwe=Object.defineProperties,Pwe=Object.getOwnPropertyDescriptors,_y=Object.getOwnPropertySymbols,PB=Object.prototype.hasOwnProperty,CB=Object.prototype.propertyIsEnumerable,QI=(e,t,n)=>t in e?xwe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cwe=(e,t)=>{for(var n in t||(t={}))PB.call(t,n)&&QI(e,n,t[n]);if(_y)for(var n of _y(t))CB.call(t,n)&&QI(e,n,t[n]);return e},Owe=(e,t)=>kwe(e,Pwe(t)),Ewe=(e,t)=>{var n={};for(var r in e)PB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&_y)for(var r of _y(e))t.indexOf(r)<0&&CB.call(e,r)&&(n[r]=e[r]);return n};const $we={},Mwe=v.forwardRef((e,t)=>{const n=ue("RichTextEditorColorControl",$we,e),{color:r}=n,o=Ewe(n,["color"]),{editor:i,labels:s,unstyled:a}=Da(),c=i?.getAttributes("textStyle").color||null,u=s.colorControlLabel(r);return O.createElement(pp,Owe(Cwe({active:c===r,"aria-label":u,title:u,onClick:()=>i.chain().focus().setColor(r).run()},o),{ref:t}),O.createElement(xf,{color:r,size:14,unstyled:a}))});var Twe=Object.defineProperty,Iwe=Object.defineProperties,Nwe=Object.getOwnPropertyDescriptors,wy=Object.getOwnPropertySymbols,OB=Object.prototype.hasOwnProperty,EB=Object.prototype.propertyIsEnumerable,e3=(e,t,n)=>t in e?Twe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kw=(e,t)=>{for(var n in t||(t={}))OB.call(t,n)&&e3(e,n,t[n]);if(wy)for(var n of wy(t))EB.call(t,n)&&e3(e,n,t[n]);return e},Rwe=(e,t)=>Iwe(e,Nwe(t)),Lwe=(e,t)=>{var n={};for(var r in e)OB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&wy)for(var r of wy(e))t.indexOf(r)<0&&EB.call(e,r)&&(n[r]=e[r]);return n};const zwe={withCodeHighlightStyles:!0,withTypographyStyles:!0},Ce=v.forwardRef((e,t)=>{const n=ue("RichTextEditor",zwe,e),{editor:r,children:o,className:i,labels:s,withCodeHighlightStyles:a,withTypographyStyles:c,classNames:u,styles:f,unstyled:p,variant:h}=n,g=Lwe(n,["editor","children","className","labels","withCodeHighlightStyles","withTypographyStyles","classNames","styles","unstyled","variant"]),{classes:y,cx:_}=__e(null,{name:"RichTextEditor",classNames:u,styles:f,unstyled:p,variant:h}),k=v.useMemo(()=>kw(kw({},v_e),s),[s]);return O.createElement(Ume,{value:{editor:r,labels:k,withCodeHighlightStyles:a,withTypographyStyles:c,classNames:u,styles:f,unstyled:p,variant:h}},O.createElement(_e,Rwe(kw({className:_(y.root,i)},g),{ref:t}),o))});Ce.Content=lB;Ce.Control=pp;Ce.ControlsGroup=pB;Ce.Toolbar=gB;Ce.Bold=I_e;Ce.Italic=N_e;Ce.Strikethrough=L_e;Ce.Underline=R_e;Ce.ClearFormatting=z_e;Ce.H1=B_e;Ce.H2=F_e;Ce.H3=V_e;Ce.H4=H_e;Ce.H5=W_e;Ce.H6=U_e;Ce.BulletList=D_e;Ce.OrderedList=j_e;Ce.Link=gwe;Ce.Unlink=A_e;Ce.Blockquote=Z_e;Ce.AlignLeft=K_e;Ce.AlignRight=G_e;Ce.AlignCenter=q_e;Ce.AlignJustify=Y_e;Ce.Superscript=X_e;Ce.Subscript=J_e;Ce.Code=Q_e;Ce.CodeBlock=ewe;Ce.ColorPicker=kB;Ce.Color=Mwe;Ce.Highlight=twe;Ce.Hr=nwe;Ce.UnsetColor=rwe;Ce.displayName="@mantine/tiptap/RichTextEditor";const Awe="aaa1rp3barth4b0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0faromeo7ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re2s2c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y0eats7k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking0channel11l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t0isalat7u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0at2delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d0network8tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntdoor4ier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5gtv3iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0eles2s3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1nder2le4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster5ia3d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4de2k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0cys3drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7serati6ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic3tual5v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rthwesternmutual14on4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3ssagens7y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cher3ks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w0time7i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ffany5ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0channel7ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lkswagen7vo3te1ing3o2yage5u0elos6wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Dwe="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5تصالات6رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",yu=(e,t)=>{for(const n in t)e[n]=t[n];return e},BS="numeric",FS="ascii",VS="alpha",pm="asciinumeric",Th="alphanumeric",HS="domain",$B="emoji",jwe="scheme",Bwe="slashscheme",t3="whitespace";function Fwe(e,t){return e in t||(t[e]=[]),t[e]}function yl(e,t,n){t[BS]&&(t[pm]=!0,t[Th]=!0),t[FS]&&(t[pm]=!0,t[VS]=!0),t[pm]&&(t[Th]=!0),t[VS]&&(t[Th]=!0),t[Th]&&(t[HS]=!0),t[$B]&&(t[HS]=!0);for(const r in t){const o=Fwe(r,n);o.indexOf(e)<0&&o.push(e)}}function Vwe(e,t){const n={};for(const r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function qr(e){e===void 0&&(e=null),this.j={},this.jr=[],this.jd=null,this.t=e}qr.groups={};qr.prototype={accepts(){return!!this.t},go(e){const t=this,n=t.j[e];if(n)return n;for(let r=0;re.ta(t,n,r,o),$o=(e,t,n,r,o)=>e.tr(t,n,r,o),n3=(e,t,n,r,o)=>e.ts(t,n,r,o),le=(e,t,n,r,o)=>e.tt(t,n,r,o),ts="WORD",WS="UWORD",Rf="LOCALHOST",US="TLD",ZS="UTLD",hm="SCHEME",gc="SLASH_SCHEME",EP="NUM",MB="WS",$P="NL",Nc="OPENBRACE",Ud="OPENBRACKET",Zd="OPENANGLEBRACKET",Kd="OPENPAREN",ll="CLOSEBRACE",Rc="CLOSEBRACKET",Lc="CLOSEANGLEBRACKET",cl="CLOSEPAREN",by="AMPERSAND",Sy="APOSTROPHE",xy="ASTERISK",Ws="AT",ky="BACKSLASH",Py="BACKTICK",Cy="CARET",Ys="COLON",MP="COMMA",Oy="DOLLAR",Si="DOT",Ey="EQUALS",TP="EXCLAMATION",xi="HYPHEN",$y="PERCENT",My="PIPE",Ty="PLUS",Iy="POUND",Ny="QUERY",IP="QUOTE",NP="SEMI",ki="SLASH",Gd="TILDE",Ry="UNDERSCORE",TB="EMOJI",Ly="SYM";var IB=Object.freeze({__proto__:null,WORD:ts,UWORD:WS,LOCALHOST:Rf,TLD:US,UTLD:ZS,SCHEME:hm,SLASH_SCHEME:gc,NUM:EP,WS:MB,NL:$P,OPENBRACE:Nc,OPENBRACKET:Ud,OPENANGLEBRACKET:Zd,OPENPAREN:Kd,CLOSEBRACE:ll,CLOSEBRACKET:Rc,CLOSEANGLEBRACKET:Lc,CLOSEPAREN:cl,AMPERSAND:by,APOSTROPHE:Sy,ASTERISK:xy,AT:Ws,BACKSLASH:ky,BACKTICK:Py,CARET:Cy,COLON:Ys,COMMA:MP,DOLLAR:Oy,DOT:Si,EQUALS:Ey,EXCLAMATION:TP,HYPHEN:xi,PERCENT:$y,PIPE:My,PLUS:Ty,POUND:Iy,QUERY:Ny,QUOTE:IP,SEMI:NP,SLASH:ki,TILDE:Gd,UNDERSCORE:Ry,EMOJI:TB,SYM:Ly});const fc=/[a-z]/,Pw=/\p{L}/u,Cw=/\p{Emoji}/u,Ow=/\d/,r3=/\s/,o3=` +`,Hwe="️",Wwe="‍";let Ih=null,Nh=null;function Uwe(e){e===void 0&&(e=[]);const t={};qr.groups=t;const n=new qr;Ih==null&&(Ih=i3(Awe)),Nh==null&&(Nh=i3(Dwe)),le(n,"'",Sy),le(n,"{",Nc),le(n,"[",Ud),le(n,"<",Zd),le(n,"(",Kd),le(n,"}",ll),le(n,"]",Rc),le(n,">",Lc),le(n,")",cl),le(n,"&",by),le(n,"*",xy),le(n,"@",Ws),le(n,"`",Py),le(n,"^",Cy),le(n,":",Ys),le(n,",",MP),le(n,"$",Oy),le(n,".",Si),le(n,"=",Ey),le(n,"!",TP),le(n,"-",xi),le(n,"%",$y),le(n,"|",My),le(n,"+",Ty),le(n,"#",Iy),le(n,"?",Ny),le(n,'"',IP),le(n,"/",ki),le(n,";",NP),le(n,"~",Gd),le(n,"_",Ry),le(n,"\\",ky);const r=$o(n,Ow,EP,{[BS]:!0});$o(r,Ow,r);const o=$o(n,fc,ts,{[FS]:!0});$o(o,fc,o);const i=$o(n,Pw,WS,{[VS]:!0});$o(i,fc),$o(i,Pw,i);const s=$o(n,r3,MB,{[t3]:!0});le(n,o3,$P,{[t3]:!0}),le(s,o3),$o(s,r3,s);const a=$o(n,Cw,TB,{[$B]:!0});$o(a,Cw,a),le(a,Hwe,a);const c=le(a,Wwe);$o(c,Cw,a);const u=[[fc,o]],f=[[fc,null],[Pw,i]];for(let p=0;pp[0]>h[0]?1:-1);for(let p=0;p=0?y[HS]=!0:fc.test(h)?Ow.test(h)?y[pm]=!0:y[FS]=!0:y[BS]=!0,n3(n,h,h,y)}return n3(n,"localhost",Rf,{ascii:!0}),n.jd=new qr(Ly),{start:n,tokens:yu({groups:t},IB)}}function Zwe(e,t){const n=Kwe(t.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,o=[];let i=0,s=0;for(;s=0&&(p+=n[s].length,h++),u+=n[s].length,i+=n[s].length,s++;i-=p,s-=h,u-=p,o.push({t:f.t,v:t.slice(i-u,i),s:i-u,e:i})}return o}function Kwe(e){const t=[],n=e.length;let r=0;for(;r56319||r+1===n||(i=e.charCodeAt(r+1))<56320||i>57343?e[r]:e.slice(r,r+2);t.push(s),r+=s.length}return t}function zs(e,t,n,r,o){let i;const s=t.length;for(let a=0;a=0;)i++;if(i>0){t.push(n.join(""));for(let s=parseInt(e.substring(r,r+i),10);s>0;s--)n.pop();r+=i}else n.push(e[r]),r++}return t}const Lf={defaultProtocol:"http",events:null,format:s3,formatHref:s3,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function RP(e,t){t===void 0&&(t=null);let n=yu({},Lf);e&&(n=yu(n,e instanceof RP?e.o:e));const r=n.ignoreTags,o=[];for(let i=0;in?r.substring(0,n)+"…":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e){return e===void 0&&(e=Lf.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),o=e.get("tagName",n,t),i=this.toFormattedString(e),s={},a=e.get("className",n,t),c=e.get("target",n,t),u=e.get("rel",n,t),f=e.getObj("attributes",n,t),p=e.getObj("events",n,t);return s.href=r,a&&(s.class=a),c&&(s.target=c),u&&(s.rel=u),f&&yu(s,f),{tagName:o,attributes:s,content:i,eventListeners:p}}};function l1(e,t){class n extends NB{constructor(o,i){super(o,i),this.t=e}}for(const r in t)n.prototype[r]=t[r];return n.t=e,n}const a3=l1("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),l3=l1("text"),Gwe=l1("nl"),el=l1("url",{isLink:!0,toHref(e){return e===void 0&&(e=Lf.defaultProtocol),this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk;return e.length>=2&&e[0].t!==Rf&&e[1].t===Ys}}),Rn=e=>new qr(e);function qwe(e){let{groups:t}=e;const n=t.domain.concat([by,xy,Ws,ky,Py,Cy,Oy,Ey,xi,EP,$y,My,Ty,Iy,ki,Ly,Gd,Ry]),r=[Sy,Lc,ll,Rc,cl,Ys,MP,Si,TP,Zd,Nc,Ud,Kd,Ny,IP,NP],o=[by,Sy,xy,ky,Py,Cy,ll,Oy,Ey,xi,Nc,$y,My,Ty,Iy,Ny,ki,Ly,Gd,Ry],i=Rn(),s=le(i,Gd);Ee(s,o,s),Ee(s,t.domain,s);const a=Rn(),c=Rn(),u=Rn();Ee(i,t.domain,a),Ee(i,t.scheme,c),Ee(i,t.slashscheme,u),Ee(a,o,s),Ee(a,t.domain,a);const f=le(a,Ws);le(s,Ws,f),le(c,Ws,f),le(u,Ws,f);const p=le(s,Si);Ee(p,o,s),Ee(p,t.domain,s);const h=Rn();Ee(f,t.domain,h),Ee(h,t.domain,h);const g=le(h,Si);Ee(g,t.domain,h);const y=Rn(a3);Ee(g,t.tld,y),Ee(g,t.utld,y),le(f,Rf,y);const _=le(h,xi);Ee(_,t.domain,h),Ee(y,t.domain,h),le(y,Si,g),le(y,xi,_);const k=le(y,Ys);Ee(k,t.numeric,a3);const b=le(a,xi),S=le(a,Si);Ee(b,t.domain,a),Ee(S,o,s),Ee(S,t.domain,a);const P=Rn(el);Ee(S,t.tld,P),Ee(S,t.utld,P),Ee(P,t.domain,a),Ee(P,o,s),le(P,Si,S),le(P,xi,b),le(P,Ws,f);const E=le(P,Ys),$=Rn(el);Ee(E,t.numeric,$);const I=Rn(el),N=Rn();Ee(I,n,I),Ee(I,r,N),Ee(N,n,I),Ee(N,r,N),le(P,ki,I),le($,ki,I);const R=le(c,Ys),F=le(u,Ys),B=le(F,ki),D=le(B,ki);Ee(c,t.domain,a),le(c,Si,S),le(c,xi,b),Ee(u,t.domain,a),le(u,Si,S),le(u,xi,b),Ee(R,t.domain,I),le(R,ki,I),Ee(D,t.domain,I),Ee(D,n,I),le(D,ki,I);const K=le(I,Nc),W=le(I,Ud),V=le(I,Zd),U=le(I,Kd);le(N,Nc,K),le(N,Ud,W),le(N,Zd,V),le(N,Kd,U),le(K,ll,I),le(W,Rc,I),le(V,Lc,I),le(U,cl,I),le(K,ll,I);const J=Rn(el),G=Rn(el),A=Rn(el),q=Rn(el);Ee(K,n,J),Ee(W,n,G),Ee(V,n,A),Ee(U,n,q);const H=Rn(),ee=Rn(),re=Rn(),he=Rn();return Ee(K,r),Ee(W,r),Ee(V,r),Ee(U,r),Ee(J,n,J),Ee(G,n,G),Ee(A,n,A),Ee(q,n,q),Ee(J,r,J),Ee(G,r,G),Ee(A,r,A),Ee(q,r,q),Ee(H,n,H),Ee(ee,n,G),Ee(re,n,A),Ee(he,n,q),Ee(H,r,H),Ee(ee,r,ee),Ee(re,r,re),Ee(he,r,he),le(G,Rc,I),le(A,Lc,I),le(q,cl,I),le(J,ll,I),le(ee,Rc,I),le(re,Lc,I),le(he,cl,I),le(H,cl,I),le(i,Rf,P),le(i,$P,Gwe),{start:i,tokens:IB}}function Ywe(e,t,n){let r=n.length,o=0,i=[],s=[];for(;o=0&&h++,o++,f++;if(h<0)o-=f,o0&&(i.push(Ew(l3,t,s)),s=[]),o-=h,f-=h;const g=p.t,y=n.slice(o-f,o);i.push(Ew(g,t,y))}}return s.length>0&&i.push(Ew(l3,t,s)),i}function Ew(e,t,n){const r=n[0].s,o=n[n.length-1].e,i=t.slice(r,o);return new e(i,n)}const Jwe=typeof console<"u"&&console&&console.warn||(()=>{}),Xwe="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Gt={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function Qwe(){qr.groups={},Gt.scanner=null,Gt.parser=null,Gt.tokenQueue=[],Gt.pluginQueue=[],Gt.customSchemes=[],Gt.initialized=!1}function c3(e,t){if(t===void 0&&(t=!1),Gt.initialized&&Jwe(`linkifyjs: already initialized - will not register custom scheme "${e}" ${Xwe}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error(`linkifyjs: incorrect scheme format. + 1. Must only contain digits, lowercase ASCII letters or "-" + 2. Cannot start or end with "-" + 3. "-" cannot repeat`);Gt.customSchemes.push([e,t])}function ebe(){Gt.scanner=Uwe(Gt.customSchemes);for(let e=0;e{const o=t.some(f=>f.docChanged)&&!n.doc.eq(r.doc),i=t.some(f=>f.getMeta("preventAutolink"));if(!o||i)return;const{tr:s}=r,a=W0e(n.doc,[...t]),{mapping:c}=a;if(Q0e(a).forEach(({oldRange:f,newRange:p})=>{dy(f.from,f.to,n.doc).filter(_=>_.mark.type===e.type).forEach(_=>{const k=c.map(_.from),b=c.map(_.to),S=dy(k,b,r.doc).filter(R=>R.mark.type===e.type);if(!S.length)return;const P=S[0],E=n.doc.textBetween(_.from,_.to,void 0," "),$=r.doc.textBetween(P.from,P.to,void 0," "),I=u3(E),N=u3($);I&&!N&&s.removeMark(P.from,P.to,e.type)});const h=Z0e(r.doc,p,_=>_.isTextblock);let g,y;if(h.length>1?(g=h[0],y=r.doc.textBetween(g.pos,g.pos+g.node.nodeSize,void 0," ")):h.length&&r.doc.textBetween(p.from,p.to," "," ").endsWith(" ")&&(g=h[0],y=r.doc.textBetween(g.pos,p.to,void 0," ")),g&&y){const _=y.split(" ").filter(S=>S!=="");if(_.length<=0)return!1;const k=_[_.length-1],b=g.pos+y.lastIndexOf(k);if(!k)return!1;LP(k).filter(S=>S.isLink).filter(S=>e.validate?e.validate(S.value):!0).map(S=>({...S,from:b+S.start+1,to:b+S.end+1})).forEach(S=>{s.addMark(S.from,S.to,e.type.create({href:S.href}))})}}),!!s.steps.length)return s}})}function nbe(e){return new Ar({key:new pi("handleClickLink"),props:{handleClick:(t,n,r)=>{var o,i,s;if(r.button!==0)return!1;const a=oB(t.state,e.type.name),c=(o=r.target)===null||o===void 0?void 0:o.closest("a"),u=(i=c?.href)!==null&&i!==void 0?i:a.href,f=(s=c?.target)!==null&&s!==void 0?s:a.target;return c&&u?(window.open(u,f),!0):!1}}})}function rbe(e){return new Ar({key:new pi("handlePasteLink"),props:{handlePaste:(t,n,r)=>{const{state:o}=t,{selection:i}=o,{empty:s}=i;if(s)return!1;let a="";r.content.forEach(u=>{a+=u.textContent});const c=LP(a).find(u=>u.isLink&&u.value===a);return!a||!c?!1:(e.editor.commands.setMark(e.type,{href:c.href}),!0)}}})}const obe=br.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(e=>{if(typeof e=="string"){c3(e);return}c3(e.scheme,e.optionalSlashes)})},onDestroy(){Qwe()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}},addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:'a[href]:not([href *= "javascript:" i])'}]},renderHTML({HTMLAttributes:e}){return["a",Mt(this.options.HTMLAttributes,e),0]},addCommands(){return{setLink:e=>({chain:t})=>t().setMark(this.name,e).setMeta("preventAutolink",!0).run(),toggleLink:e=>({chain:t})=>t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Ta({find:e=>LP(e).filter(t=>this.options.validate?this.options.validate(t.value):!0).filter(t=>t.isLink).map(t=>({text:t.value,index:t.start,data:t})),type:this.type,getAttributes:e=>{var t;return{href:(t=e.data)===null||t===void 0?void 0:t.href}}})]},addProseMirrorPlugins(){const e=[];return this.options.autolink&&e.push(tbe({type:this.type,validate:this.options.validate})),this.options.openOnClick&&e.push(nbe({type:this.type})),this.options.linkOnPaste&&e.push(rbe({editor:this.editor,type:this.type})),e}}),ibe=obe.extend({addKeyboardShortcuts:()=>({"Mod-k":()=>(window.dispatchEvent(new Event("edit-link")),!0)})}).configure({openOnClick:!1}),sbe=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))$/,abe=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))/g,lbe=br.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:e=>e.getAttribute("data-color")||e.style.backgroundColor,renderHTML:e=>e.color?{"data-color":e.color,style:`background-color: ${e.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:e}){return["mark",Mt(this.options.HTMLAttributes,e),0]},addCommands(){return{setHighlight:e=>({commands:t})=>t.setMark(this.name,e),toggleHighlight:e=>({commands:t})=>t.toggleMark(this.name,e),unsetHighlight:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[Wl({find:sbe,type:this.type})]},addPasteRules(){return[Ta({find:abe,type:this.type})]}}),cbe=/^\s*>\s$/,ube=sr.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return["blockquote",Mt(this.options.HTMLAttributes,e),0]},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Nf({find:cbe,type:this.type})]}}),dbe=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,fbe=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,pbe=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,hbe=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,mbe=br.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return["strong",Mt(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Wl({find:dbe,type:this.type}),Wl({find:pbe,type:this.type})]},addPasteRules(){return[Ta({find:fbe,type:this.type}),Ta({find:hbe,type:this.type})]}}),gbe=sr.create({name:"listItem",addOptions(){return{HTMLAttributes:{}}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",Mt(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),d3=br.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["span",Mt(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=fp(e,this.type);return Object.entries(n).some(([,o])=>!!o)?!0:t.unsetMark(this.name)}}}}),f3=/^\s*([-+*])\s$/,vbe=sr.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:e}){return["ul",Mt(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(gbe.name,this.editor.getAttributes(d3.name)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=Nf({find:f3,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Nf({find:f3,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(d3.name),editor:this.editor})),[e]}}),ybe=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/,_be=/(?:^|\s)((?:`)((?:[^`]+))(?:`))/g,wbe=br.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",Mt(this.options.HTMLAttributes,e),0]},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Wl({find:ybe,type:this.type})]},addPasteRules(){return[Ta({find:_be,type:this.type})]}}),bbe=/^```([a-z]+)?[\s\n]$/,Sbe=/^~~~([a-z]+)?[\s\n]$/,xbe=sr.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:e=>{var t;const{languageClassPrefix:n}=this.options,i=[...((t=e.firstElementChild)===null||t===void 0?void 0:t.classList)||[]].filter(s=>s.startsWith(n)).map(s=>s.replace(n,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:t}){return["pre",Mt(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:t}=e,{selection:n}=t,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;const i=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith(` + +`);return!i||!s?!1:e.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;const{state:t}=e,{selection:n,doc:r}=t,{$from:o,empty:i}=n;if(!i||o.parent.type!==this.type||!(o.parentOffset===o.parent.nodeSize-2))return!1;const a=o.after();return a===void 0||r.nodeAt(a)?!1:e.commands.exitCode()}}},addInputRules(){return[DS({find:bbe,type:this.type,getAttributes:e=>({language:e[1]})}),DS({find:Sbe,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new Ar({key:new pi("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;const n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,i=o?.mode;if(!n||!i)return!1;const{tr:s}=e.state;return s.replaceSelectionWith(this.type.create({language:i})),s.setSelection(qe.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.insertText(n.replace(/\r\n?/g,` +`)),s.setMeta("paste",!0),e.dispatch(s),!0}}})]}}),kbe=sr.create({name:"doc",topNode:!0,content:"block+"});function Pbe(e={}){return new Ar({view(t){return new Cbe(t,e)}})}class Cbe{constructor(t,n){var r;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(o=>{let i=s=>{this[o](s)};return t.dom.addEventListener(o,i),{name:o,handler:i}})}destroy(){this.handlers.forEach(({name:t,handler:n})=>this.editorView.dom.removeEventListener(t,n))}update(t,n){this.cursorPos!=null&&n.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,t==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t=this.editorView.state.doc.resolve(this.cursorPos),n=!t.parent.inlineContent,r;if(n){let a=t.nodeBefore,c=t.nodeAfter;if(a||c){let u=this.editorView.nodeDOM(this.cursorPos-(a?a.nodeSize:0));if(u){let f=u.getBoundingClientRect(),p=a?f.bottom:f.top;a&&c&&(p=(p+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),r={left:f.left,right:f.right,top:p-this.width/2,bottom:p+this.width/2}}}}if(!r){let a=this.editorView.coordsAtPos(this.cursorPos);r={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.bottom}}let o=this.editorView.dom.offsetParent;this.element||(this.element=o.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let i,s;if(!o||o==document.body&&getComputedStyle(o).position=="static")i=-pageXOffset,s=-pageYOffset;else{let a=o.getBoundingClientRect();i=a.left-o.scrollLeft,s=a.top-o.scrollTop}this.element.style.left=r.left-i+"px",this.element.style.top=r.top-s+"px",this.element.style.width=r.right-r.left+"px",this.element.style.height=r.bottom-r.top+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),o=r&&r.type.spec.disableDropCursor,i=typeof o=="function"?o(this.editorView,n,t):o;if(n&&!i){let s=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=ij(this.editorView.state.doc,s,this.editorView.dragging.slice);a!=null&&(s=a)}this.setCursor(s),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){(t.target==this.editorView.dom||!this.editorView.dom.contains(t.relatedTarget))&&this.setCursor(null)}}const Obe=Nr.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[Pbe(this.options)]}});class nn extends Ue{constructor(t){super(t,t)}map(t,n){let r=t.resolve(n.map(this.head));return nn.valid(r)?new nn(r):Ue.near(r)}content(){return ye.empty}eq(t){return t instanceof nn&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new nn(t.resolve(n.pos))}getBookmark(){return new zP(this.anchor)}static valid(t){let n=t.parent;if(n.isTextblock||!Ebe(t)||!$be(t))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(t.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(t,n,r=!1){e:for(;;){if(!r&&nn.valid(t))return t;let o=t.pos,i=null;for(let s=t.depth;;s--){let a=t.node(s);if(n>0?t.indexAfter(s)0){i=a.child(n>0?t.indexAfter(s):t.index(s)-1);break}else if(s==0)return null;o+=n;let c=t.doc.resolve(o);if(nn.valid(c))return c}for(;;){let s=n>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!Ie.isSelectable(i)){t=t.doc.resolve(o+i.nodeSize*n),r=!1;continue e}break}i=s,o+=n;let a=t.doc.resolve(o);if(nn.valid(a))return a}return null}}}nn.prototype.visible=!1;nn.findFrom=nn.findGapCursorFrom;Ue.jsonID("gapcursor",nn);class zP{constructor(t){this.pos=t}map(t){return new zP(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return nn.valid(n)?new nn(n):Ue.near(n)}}function Ebe(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function $be(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function Mbe(){return new Ar({props:{decorations:Rbe,createSelectionBetween(e,t,n){return t.pos==n.pos&&nn.valid(n)?new nn(n):null},handleClick:Ibe,handleKeyDown:Tbe,handleDOMEvents:{beforeinput:Nbe}}})}const Tbe=Wj({ArrowLeft:Rh("horiz",-1),ArrowRight:Rh("horiz",1),ArrowUp:Rh("vert",-1),ArrowDown:Rh("vert",1)});function Rh(e,t){const n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(r,o,i){let s=r.selection,a=t>0?s.$to:s.$from,c=s.empty;if(s instanceof qe){if(!i.endOfTextblock(n)||a.depth==0)return!1;c=!1,a=r.doc.resolve(t>0?a.after():a.before())}let u=nn.findGapCursorFrom(a,t,c);return u?(o&&o(r.tr.setSelection(new nn(u))),!0):!1}}function Ibe(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!nn.valid(r))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&Ie.isSelectable(e.state.doc.nodeAt(o.inside))?!1:(e.dispatch(e.state.tr.setSelection(new nn(r))),!0)}function Nbe(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof nn))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let o=se.empty;for(let s=r.length-1;s>=0;s--)o=se.from(r[s].createAndFill(null,o));let i=e.state.tr.replace(n.pos,n.pos,new ye(o,0,0));return i.setSelection(qe.near(i.doc.resolve(n.pos+1))),e.dispatch(i),!1}function Rbe(e){if(!(e.selection instanceof nn))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",Pn.create(e.doc,[Do.widget(e.selection.head,t,{key:"gapcursor"})])}const Lbe=Nr.create({name:"gapCursor",addProseMirrorPlugins(){return[Mbe()]},extendNodeSchema(e){var t;const n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=We(Se(e,"allowGapCursor",n)))!==null&&t!==void 0?t:null}}}),zbe=sr.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",Mt(this.options.HTMLAttributes,e)]},renderText(){return` +`},addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{const{selection:o,storedMarks:i}=n;if(o.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:a}=r.extensionManager,c=i||o.$to.parentOffset&&o.$from.marks();return t().insertContent({type:this.name}).command(({tr:u,dispatch:f})=>{if(f&&c&&s){const p=c.filter(h=>a.includes(h.type.name));u.ensureMarks(p)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Abe=sr.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,Mt(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,"paragraph",e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>DS({find:new RegExp(`^(#{1,${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}});var zy=200,rr=function(){};rr.prototype.append=function(t){return t.length?(t=rr.from(t),!this.length&&t||t.length=n?rr.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};rr.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};rr.prototype.forEach=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(t,n,r,0):this.forEachInvertedInner(t,n,r,0)};rr.prototype.map=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(i,s){return o.push(t(i,s))},n,r),o};rr.from=function(t){return t instanceof rr?t:t&&t.length?new LB(t):rr.empty};var LB=function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(o,i){return o==0&&i==this.length?this:new t(this.values.slice(o,i))},t.prototype.getInner=function(o){return this.values[o]},t.prototype.forEachInner=function(o,i,s,a){for(var c=i;c=s;c--)if(o(this.values[c],a+c)===!1)return!1},t.prototype.leafAppend=function(o){if(this.length+o.length<=zy)return new t(this.values.concat(o.flatten()))},t.prototype.leafPrepend=function(o){if(this.length+o.length<=zy)return new t(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(rr);rr.empty=new LB([]);var Dbe=function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(r){return ra&&this.right.forEachInner(r,Math.max(o-a,0),Math.min(this.length,i)-a,s+a)===!1)return!1},t.prototype.forEachInvertedInner=function(r,o,i,s){var a=this.left.length;if(o>a&&this.right.forEachInvertedInner(r,o-a,Math.max(i,a)-a,s+a)===!1||i=i?this.right.slice(r-i,o-i):this.left.slice(r,i).append(this.right.slice(0,o-i))},t.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new t(this.left,o)},t.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new t(o,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t}(rr),zB=rr;const jbe=500;class Jo{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,i;n&&(o=this.remapping(r,this.items.length),i=o.maps.length);let s=t.tr,a,c,u=[],f=[];return this.items.forEach((p,h)=>{if(!p.step){o||(o=this.remapping(r,h+1),i=o.maps.length),i--,f.push(p);return}if(o){f.push(new Pi(p.map));let g=p.step.map(o.slice(i)),y;g&&s.maybeStep(g).doc&&(y=s.mapping.maps[s.mapping.maps.length-1],u.push(new Pi(y,void 0,void 0,u.length+f.length))),i--,y&&o.appendMap(y,i)}else s.maybeStep(p.step);if(p.selection)return a=o?p.selection.map(o.slice(i)):p.selection,c=new Jo(this.items.slice(0,r).append(f.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:s,selection:a}}addTransform(t,n,r,o){let i=[],s=this.eventCount,a=this.items,c=!o&&a.length?a.get(a.length-1):null;for(let f=0;fFbe&&(a=Bbe(a,u),s-=u),new Jo(a.append(i),s)}remapping(t,n){let r=new Zc;return this.items.forEach((o,i)=>{let s=o.mirrorOffset!=null&&i-o.mirrorOffset>=t?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,s)},t,n),r}addMaps(t){return this.eventCount==0?this:new Jo(this.items.append(t.map(n=>new Pi(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),i=t.mapping,s=t.steps.length,a=this.eventCount;this.items.forEach(h=>{h.selection&&a--},o);let c=n;this.items.forEach(h=>{let g=i.getMirror(--c);if(g==null)return;s=Math.min(s,g);let y=i.maps[g];if(h.step){let _=t.steps[g].invert(t.docs[g]),k=h.selection&&h.selection.map(i.slice(c+1,g));k&&a++,r.push(new Pi(y,_,k))}else r.push(new Pi(y))},o);let u=[];for(let h=n;hjbe&&(p=p.compress(this.items.length-r.length)),p}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,o=[],i=0;return this.items.forEach((s,a)=>{if(a>=t)o.push(s),s.selection&&i++;else if(s.step){let c=s.step.map(n.slice(r)),u=c&&c.getMap();if(r--,u&&n.appendMap(u,r),c){let f=s.selection&&s.selection.map(n.slice(r));f&&i++;let p=new Pi(u.invert(),c,f),h,g=o.length-1;(h=o.length&&o[g].merge(p))?o[g]=h:o.push(p)}}else s.map&&r--},this.items.length,0),new Jo(zB.from(o.reverse()),i)}}Jo.empty=new Jo(zB.empty,0);function Bbe(e,t){let n;return e.forEach((r,o)=>{if(r.selection&&t--==0)return n=o,!1}),e.slice(n)}class Pi{constructor(t,n,r,o){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=o}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new Pi(n.getMap().invert(),n,this.selection)}}}class Us{constructor(t,n,r,o){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=o}}const Fbe=20;function Vbe(e,t,n,r){let o=n.getMeta(Sa),i;if(o)return o.historyState;n.getMeta(Wbe)&&(e=new Us(e.done,e.undone,null,0));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(s&&s.getMeta(Sa))return s.getMeta(Sa).redo?new Us(e.done.addTransform(n,void 0,r,mm(t)),e.undone,p3(n.mapping.maps[n.steps.length-1]),e.prevTime):new Us(e.done,e.undone.addTransform(n,void 0,r,mm(t)),null,e.prevTime);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let a=e.prevTime==0||!s&&(e.prevTime<(n.time||0)-r.newGroupDelay||!Hbe(n,e.prevRanges)),c=s?$w(e.prevRanges,n.mapping):p3(n.mapping.maps[n.steps.length-1]);return new Us(e.done.addTransform(n,a?t.selection.getBookmark():void 0,r,mm(t)),Jo.empty,c,n.time)}else return(i=n.getMeta("rebased"))?new Us(e.done.rebased(n,i),e.undone.rebased(n,i),$w(e.prevRanges,n.mapping),e.prevTime):new Us(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),$w(e.prevRanges,n.mapping),e.prevTime)}function Hbe(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((r,o)=>{for(let i=0;i=t[i]&&(n=!0)}),n}function p3(e){let t=[];return e.forEach((n,r,o,i)=>t.push(o,i)),t}function $w(e,t){if(!e)return null;let n=[];for(let r=0;r{let n=Sa.getState(e);return!n||n.done.eventCount==0?!1:(t&&AB(n,e,t,!1),!0)},jB=(e,t)=>{let n=Sa.getState(e);return!n||n.undone.eventCount==0?!1:(t&&AB(n,e,t,!0),!0)},Zbe=Nr.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>DB(e,t),redo:()=>({state:e,dispatch:t})=>jB(e,t)}},addProseMirrorPlugins(){return[Ube(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),Kbe=sr.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",Mt(this.options.HTMLAttributes,e)]},addCommands(){return{setHorizontalRule:()=>({chain:e})=>e().insertContent({type:this.name}).command(({tr:t,dispatch:n})=>{var r;if(n){const{$to:o}=t.selection,i=o.end();if(o.nodeAfter)t.setSelection(qe.create(t.doc,o.pos));else{const s=(r=o.parent.type.contentMatch.defaultType)===null||r===void 0?void 0:r.create();s&&(t.insert(i,s),t.setSelection(qe.create(t.doc,i)))}t.scrollIntoView()}return!0}).run()}},addInputRules(){return[iB({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),Gbe=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,qbe=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,Ybe=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,Jbe=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,Xbe=br.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",Mt(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Wl({find:Gbe,type:this.type}),Wl({find:Ybe,type:this.type})]},addPasteRules(){return[Ta({find:qbe,type:this.type}),Ta({find:Jbe,type:this.type})]}}),Qbe=sr.create({name:"listItem",addOptions(){return{HTMLAttributes:{}}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",Mt(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),eSe=sr.create({name:"listItem",addOptions(){return{HTMLAttributes:{}}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",Mt(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),m3=br.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["span",Mt(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=fp(e,this.type);return Object.entries(n).some(([,o])=>!!o)?!0:t.unsetMark(this.name)}}}}),g3=/^(\d+)\.\s$/,tSe=sr.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){const{start:t,...n}=e;return t===1?["ol",Mt(this.options.HTMLAttributes,n),0]:["ol",Mt(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(eSe.name,this.editor.getAttributes(m3.name)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=Nf({find:g3,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Nf({find:g3,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(m3.name)}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1],editor:this.editor})),[e]}}),nSe=sr.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",Mt(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),rSe=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,oSe=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,iSe=br.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",Mt(this.options.HTMLAttributes,e),0]},addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-x":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Wl({find:rSe,type:this.type})]},addPasteRules(){return[Ta({find:oSe,type:this.type})]}}),sSe=sr.create({name:"text",group:"inline"}),aSe=Nr.create({name:"starterKit",addExtensions(){var e,t,n,r,o,i,s,a,c,u,f,p,h,g,y,_,k,b;const S=[];return this.options.blockquote!==!1&&S.push(ube.configure((e=this.options)===null||e===void 0?void 0:e.blockquote)),this.options.bold!==!1&&S.push(mbe.configure((t=this.options)===null||t===void 0?void 0:t.bold)),this.options.bulletList!==!1&&S.push(vbe.configure((n=this.options)===null||n===void 0?void 0:n.bulletList)),this.options.code!==!1&&S.push(wbe.configure((r=this.options)===null||r===void 0?void 0:r.code)),this.options.codeBlock!==!1&&S.push(xbe.configure((o=this.options)===null||o===void 0?void 0:o.codeBlock)),this.options.document!==!1&&S.push(kbe.configure((i=this.options)===null||i===void 0?void 0:i.document)),this.options.dropcursor!==!1&&S.push(Obe.configure((s=this.options)===null||s===void 0?void 0:s.dropcursor)),this.options.gapcursor!==!1&&S.push(Lbe.configure((a=this.options)===null||a===void 0?void 0:a.gapcursor)),this.options.hardBreak!==!1&&S.push(zbe.configure((c=this.options)===null||c===void 0?void 0:c.hardBreak)),this.options.heading!==!1&&S.push(Abe.configure((u=this.options)===null||u===void 0?void 0:u.heading)),this.options.history!==!1&&S.push(Zbe.configure((f=this.options)===null||f===void 0?void 0:f.history)),this.options.horizontalRule!==!1&&S.push(Kbe.configure((p=this.options)===null||p===void 0?void 0:p.horizontalRule)),this.options.italic!==!1&&S.push(Xbe.configure((h=this.options)===null||h===void 0?void 0:h.italic)),this.options.listItem!==!1&&S.push(Qbe.configure((g=this.options)===null||g===void 0?void 0:g.listItem)),this.options.orderedList!==!1&&S.push(tSe.configure((y=this.options)===null||y===void 0?void 0:y.orderedList)),this.options.paragraph!==!1&&S.push(nSe.configure((_=this.options)===null||_===void 0?void 0:_.paragraph)),this.options.strike!==!1&&S.push(iSe.configure((k=this.options)===null||k===void 0?void 0:k.strike)),this.options.text!==!1&&S.push(sSe.configure((b=this.options)===null||b===void 0?void 0:b.text)),S}}),lSe=br.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",Mt(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),cSe=Nr.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:e=>e.style.textAlign||this.options.defaultAlignment,renderHTML:e=>e.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${e.textAlign}`}}}}]},addCommands(){return{setTextAlign:e=>({commands:t})=>this.options.alignments.includes(e)?this.options.types.every(n=>t.updateAttributes(n,{textAlign:e})):!1,unsetTextAlign:()=>({commands:e})=>this.options.types.every(t=>e.resetAttributes(t,"textAlign"))}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),uSe=br.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(e){return e!=="super"?!1:null}}]},renderHTML({HTMLAttributes:e}){return["sup",Mt(this.options.HTMLAttributes,e),0]},addCommands(){return{setSuperscript:()=>({commands:e})=>e.setMark(this.name),toggleSuperscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSuperscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),dSe=br.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(e){return e!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:e}){return["sub",Mt(this.options.HTMLAttributes,e),0]},addCommands(){return{setSubscript:()=>({commands:e})=>e.setMark(this.name),toggleSubscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSubscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),fSe=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,pSe=sr.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",Mt(this.options.HTMLAttributes,e)]},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[iB({find:fSe,type:this.type,getAttributes:e=>{const[,,t,n,r]=e;return{src:n,alt:t,title:r}}})]}}),hSe=br.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["span",Mt(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=fp(e,this.type);return Object.entries(n).some(([,o])=>!!o)?!0:t.unsetMark(this.name)}}}}),mSe=Nr.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:e=>{var t;return(t=e.style.color)===null||t===void 0?void 0:t.replace(/['"]+/g,"")},renderHTML:e=>e.color?{style:`color: ${e.color}`}:{}}}}]},addCommands(){return{setColor:e=>({chain:t})=>t().setMark("textStyle",{color:e}).run(),unsetColor:()=>({chain:e})=>e().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),gSe=[aSe,lSe,ibe,uSe,dSe,lbe,mSe,hSe,pSe,cSe.configure({types:["heading","paragraph"]})],BB=({tiptapExtensions:e,initialContent:t,editable:n,onChange:r,styles:o,contentAreaStyle:i})=>{const[s,a]=v.useState(!1),[c,u]=v.useState(""),f=D1e({extensions:e||gSe,content:t,editable:n,onUpdate({editor:p}){r(p.getHTML())}});return f?x(to,{children:z(Ce,{editor:f,styles:o,style:{borderRadius:2},children:[z(Ce.Toolbar,{sticky:!0,children:[z(Ce.ControlsGroup,{children:[x(Ce.Bold,{}),x(Ce.Italic,{}),x(Ce.Underline,{}),x(Ce.Strikethrough,{}),x(Ce.ClearFormatting,{}),x(Ce.Highlight,{})]}),z(Ce.ControlsGroup,{children:[x(Ce.Hr,{}),x(Ce.BulletList,{}),x(Ce.OrderedList,{})]}),z(Ce.ControlsGroup,{children:[x(Ce.Link,{}),x(Ce.Unlink,{})]}),z(Ce.ControlsGroup,{children:[x(Ce.AlignLeft,{}),x(Ce.AlignCenter,{}),x(Ce.AlignJustify,{}),x(Ce.AlignRight,{})]}),z(Ce.ControlsGroup,{children:[z(Ft,{opened:s,onClose:()=>a(!1),children:[x(Ft.Target,{children:x(Ce.Control,{onClick:()=>a(!0),title:"Insert Image",children:x(Ipe,{size:"1rem"})})}),z(Ft.Dropdown,{children:[x(hn,{label:"Image URL",value:c,onChange:p=>u(p.currentTarget.value)}),x(J8,{h:"lg"}),x(Fn,{onClick:()=>{f.commands.setImage({src:c})&&(a(!1),u(""))},children:"Add"})]})]}),x(Ce.ColorPicker,{colors:["#25262b","#868e96","#fa5252","#e64980","#be4bdb","#7950f2","#4c6ef5","#228be6","#15aabf","#12b886","#40c057","#82c91e","#fab005","#fd7e14"]})]})]}),x(ir,{style:i,children:x(Ce.Content,{})})]})}):x(to,{})},vSe=te(e=>({action:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0],...e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]})}})),ySe=e=>{const{selectedProfile:t}=ks(),{classes:n,theme:r}=vSe(),[o,i]=v.useState([]),[s,a]=v.useState([]),[c,u]=v.useState(t?.notes?t.notes:"Place user information here...");v.useEffect(()=>{const g=t?t.tags:[],y=[{value:"dangerous",label:"Dangerous",backgroundcolor:"#C92A2A"},{value:"whatever",label:"Whatever",backgroundcolor:"#141517"}];i([...y,...g.filter(_=>!y.some(k=>k.value===_.value))]),a(t?t?.tags.map(_=>_.value):[])},[t]);function f({onRemove:g,label:y,backgroundcolor:_}){const k=_;return x("div",{children:z(_e,{sx:b=>({display:"flex",cursor:"default",alignItems:"center",backgroundColor:k,border:`${T(1)} solid ${b.colorScheme==="dark"?b.colors.dark[7]:b.colors.gray[4]}`,paddingLeft:b.spacing.xs,marginLeft:5,marginTop:5,marginBottom:5,borderRadius:b.radius.sm}),children:[x(_e,{sx:{lineHeight:1,fontSize:T(12)},children:y}),x(tp,{onMouseDown:g,variant:"transparent",size:22,iconSize:14,tabIndex:-1})]})})}const p=g=>{const y=s.filter(k=>!g.includes(k)),_=g.filter(k=>!s.includes(k));y.length>0?h(y[0]):_.length>0&&a(g)},h=g=>{a(y=>y.filter(_=>_!==g))};return z(zr,{p:"md",withBorder:!0,style:{width:"100%",height:500,backgroundColor:"rgb(34, 35, 37)"},children:[z(de,{position:"apart",children:[x(ie,{weight:500,children:"Citizen"}),z(de,{spacing:8,mr:0,children:[x(tn,{label:"Save",withArrow:!0,color:"dark",position:"bottom",children:x(vt,{className:n.action,onClick:()=>{e.saveProfile(t?{...t,notes:c,tags:o.filter(g=>s.includes(g.value))}:null)},disabled:!t,children:x(x7,{size:16,color:r.colors.green[6]})})}),x(tn,{label:"Unlink",withArrow:!0,color:"dark",position:"bottom",children:x(vt,{className:n.action,onClick:()=>{e.onClick(null)},disabled:!t,children:x(k7,{size:16,color:r.colors.gray[5]})})})]})]}),x(fn,{my:"sm"}),z(Wi,{gap:"md",justify:"flex-start",direction:"row",wrap:"wrap",children:[z(Wi,{gap:"md",direction:"row",wrap:"wrap",w:628,children:[x(Vk,{width:260,height:180,src:t?t.image:"",alt:"Placeholder for citizen picture",withPlaceholder:!0}),z(Dl,{spacing:"xs",w:350,children:[x(hn,{icon:x(hpe,{size:16}),style:{backgroundColor:"#1d1e20"},placeholder:t?t.citizenid:"Citizen ID",radius:"xs",disabled:!0}),x(hn,{icon:x(Wpe,{size:16}),style:{backgroundColor:"#1d1e20"},placeholder:t?t.firstname+" "+t.lastname:"Fullname",radius:"xs",disabled:!0}),x(hn,{icon:x(ope,{size:16}),style:{backgroundColor:"#1d1e20"},placeholder:t?t.nationality:"Nationality",radius:"xs",disabled:!0}),x(hn,{icon:x(Yfe,{size:16}),style:{backgroundColor:"#1d1e20"},placeholder:t?t.phone:"Phone number",radius:"xs",disabled:!0})]}),x(BB,{initialContent:t?.notes?t.notes:"",editable:!!t,onChange:g=>u(g),styles:{content:{backgroundColor:"rgb(34, 35, 37)"},toolbar:{backgroundColor:"#252628"},controlsGroup:{pointerEvents:t?"auto":"none",backgroundColor:t?"#1A1B1E":"#282828"}},contentAreaStyle:{height:170,width:625,padding:0}},t?.citizenid)]}),x(ir,{h:370,children:z(Dl,{spacing:5,w:400,children:[t&&x(va,{color:"green.7",order:6,children:"Last Seen: Recently"}),x(ie,{size:"md",weight:500,children:"Tags"}),x(Hk,{disabled:!t,data:o,value:s,onChange:p,placeholder:"Select or create tags",creatable:!0,searchable:!0,valueComponent:f,getCreateLabel:g=>`+ Create ${g}`,onCreate:g=>{const[y,_]=g.split(":"),k=o.find(b=>b.value===y);if(k)a(b=>[...b,k.value]);else{const b={value:y,label:y,backgroundcolor:_||"#141517"};return i([...o,b]),a([...s,b.value]),b}}}),z("div",{children:[z(de,{spacing:5,mr:0,children:[x(ie,{size:"md",weight:500,children:"Licenses"}),x(tn,{label:"Create new license",withArrow:!0,color:"dark",position:"bottom",children:x(vt,{style:{width:18,minWidth:0,minHeight:0,height:T(20)},disabled:!t,children:x(Lo,{size:16})})})]}),x(de,{style:{gap:3},children:t&&t.licenses.map((g,y)=>x(Dk,{defaultChecked:!0,variant:"light",radius:"xs",color:g.color,children:g.licenseType},y))})]}),z("div",{children:[x(ie,{size:"md",weight:500,style:{marginBottom:2},children:"Employment"}),x(de,{style:{gap:3},children:t&&t.employment.map((g,y)=>z(Qt,{color:"indigo",radius:"xs",variant:"dot",style:{height:"1.5rem"},children:[g.companyName," (",g.jobPosition,")"]},y))})]}),z("div",{children:[x(ie,{size:"md",weight:500,style:{marginBottom:2},children:"Properties"}),x(de,{style:{gap:3},children:t&&t.properties.map((g,y)=>x(Qt,{style:{height:"1.5rem"},radius:"xs",color:"teal",variant:"dot",children:z(Al,{children:[g.type==="House"?x(ppe,{size:18,style:{paddingRight:5}}):x(w7,{size:18,style:{paddingRight:5}}),g.address," (",g.type,")"]})},y))})]}),z("div",{children:[x(ie,{size:"md",weight:500,style:{marginBottom:2},children:"Vehicles"}),x(de,{style:{gap:3},children:t&&t.vehicles.map((g,y)=>x(Qt,{style:{height:"1.5rem"},radius:"xs",color:g.color,variant:"dot",children:z(Al,{children:[x(_a,{size:18,style:{paddingRight:5}}),g.model," (",g.plate,")"]})},y))})]})]})})]})]})},Lh={id:0,title:"",details:"Incident description...",location:"",tags:[],involvedOfficers:[],involvedCivilians:[],evidence:[],involvedCriminals:[],timeStamp:new Date,createdBy:{citizenid:"",firstname:"",lastname:""}},Va=fi((e,t)=>({incidents:[],selectedIncident:null,newIncident:{...Lh},resetNewIncident:()=>e(n=>({...n,newIncident:Lh})),setIncidents:n=>{e(()=>({incidents:[...n]}))},setIncident:n=>{e(()=>({selectedIncident:n}))},getIncident:n=>{const{incidents:r}=t();return r.find(o=>o.id===n)||null},createNewIncident:(n,r,o)=>{let i=-1;return e(s=>Ci(s,a=>{i=Math.max(...s.incidents.map(p=>p.id),0)+1;const u=Aa.getState(),f={...s.newIncident,id:i,title:n,details:r,location:o,timeStamp:new Date,createdBy:{citizenid:u.citizenid,firstname:u.firstname,lastname:u.lastname}};a.incidents.push(f),a.newIncident={...Lh}})),i},addCriminal:n=>{e(r=>Ci(r,o=>{const i=o.selectedIncident?o.selectedIncident:o.newIncident;i.involvedCriminals.some(a=>a.citizenId===n.citizenId)?console.log("The criminal is already added!"):i.involvedCriminals.push(n)}))},removeCriminal:n=>{e(r=>Ci(r,o=>{const i=o.selectedIncident?o.selectedIncident:o.newIncident,s=i.involvedCriminals.findIndex(a=>a.citizenId===n);s!==-1?i.involvedCriminals.splice(s,1):console.log("Criminal not found!")}))},addChargeToCriminal:(n,r)=>{e(o=>Ci(o,i=>{const a=(i.selectedIncident?i.selectedIncident:i.newIncident).involvedCriminals.find(c=>c.citizenId===n);if(a){const c=a.charges.find(u=>u.id===r.id);c?c.amountOfAddedCharges+=1:a.charges.push(r)}else console.log("The criminal is not involved in this incident!")}))},setCriminalPleadedGuilty:(n,r)=>{e(o=>Ci(o,i=>{const a=(i.selectedIncident?i.selectedIncident:i.newIncident).involvedCriminals.find(c=>c.citizenId===n);a?a.pleadedGuilty=r:console.log("The criminal is not involved in this incident!")}))},setCriminalProcessed:(n,r)=>{e(o=>Ci(o,i=>{const a=(i.selectedIncident?i.selectedIncident:i.newIncident).involvedCriminals.find(c=>c.citizenId===n);a?a.processed=r:console.log("The criminal is not involved in this incident!")}))},saveIncident:()=>{let n=-1;return e(r=>Ci(r,o=>{if(r.selectedIncident){const i=o.incidents.findIndex(s=>s.id===r.selectedIncident?.id);i!==-1&&(o.incidents[i]=r.selectedIncident,n=o.incidents[i].id)}else o.incidents.push(r.newIncident),n=o.incidents[o.incidents.length-1].id;o.newIncident=Lh,o.selectedIncident=null})),n}})),_Se=te(e=>({action:{backgroundColor:e.colors.dark[2],...e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]})},user:{display:"block",width:"100%",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black},item:{paddingTop:"5px",paddingBottom:"5px",paddingRight:"10px",paddingLeft:"10px",backgroundColor:"#1d1e20","&:hover":{backgroundColor:"#17181b"}}})),wSe=()=>{const{classes:e}=_Se(),{incidents:t,setIncident:n,getIncident:r}=Va(),{selectedProfile:o}=ks(),[i,s]=v.useState([]),a=qk();function c(u){if(!u)return s([]);const f=[];t.forEach(p=>{p.involvedCriminals.some(g=>g.citizenId===u)&&f.push(p)}),s(f)}return v.useEffect(()=>{c(o?.citizenid)},[o]),z(zr,{p:"md",withBorder:!0,style:{width:539,height:368,backgroundColor:"rgb(34, 35, 37)"},children:[x(de,{position:"apart",children:x(ie,{weight:500,children:"Known Convictions"})}),x(fn,{my:"sm"}),x(ir,{h:300,children:x(Dl,{spacing:"xs",children:i.map(u=>x(Bn,{className:e.user,children:z(et,{withArrow:!0,children:[x(et.Target,{children:z(de,{className:e.item,children:[z("div",{style:{flex:1},children:[x(ie,{size:"sm",weight:500,children:u.title}),z(ie,{color:"dimmed",size:"xs",children:["ID: ",u.id]})]}),x(Z0,{size:14,stroke:1.5})]})}),x(et.Dropdown,{children:x(et.Item,{icon:x(P7,{size:14}),onClick:()=>{n(r(u.id)),a("/incidents")},children:"View Incident"})})]})},u.id))})})]})},bSe=te(e=>({action:{backgroundColor:e.colors.dark[2],...e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]})},user:{display:"block",width:"100%",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black},item:{paddingTop:"5px",paddingBottom:"5px",paddingRight:"10px",paddingLeft:"10px",backgroundColor:"#1d1e20","&:hover":{backgroundColor:"#17181b"}}})),SSe=()=>{const{classes:e}=bSe(),{incidents:t}=Va(),{selectedProfile:n}=ks(),[r,o]=v.useState([]);function i(s){if(!s)return o([]);const a=[];t.forEach(c=>{c.involvedCivilians.some(f=>f.citizenid===s)&&a.push(c)}),o(a)}return v.useEffect(()=>{i(n?.citizenid)},[n]),z(zr,{p:"md",withBorder:!0,style:{width:540,height:368,backgroundColor:"rgb(34, 35, 37)"},children:[x(de,{position:"apart",children:x(ie,{weight:500,children:"Involved Incidents"})}),x(fn,{my:"sm"}),x(ir,{h:300,children:x(Dl,{spacing:"xs",children:r.map(s=>x(Bn,{className:e.user,children:z(et,{withArrow:!0,children:[x(et.Target,{children:z(de,{className:e.item,children:[z("div",{style:{flex:1},children:[x(ie,{size:"sm",weight:500,children:s.title}),z(ie,{color:"dimmed",size:"xs",children:["ID: ",s.id]})]}),x(Z0,{size:14,stroke:1.5})]})}),x(et.Dropdown,{children:x(et.Item,{icon:x(P7,{size:14}),children:"View Incident"})})]})},s.id))})})]})},c1=x("svg",{width:"54",height:"54",viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:n0.colors.blue[6],children:x("g",{fill:"none",fillRule:"evenodd",children:z("g",{transform:"translate(1 1)",strokeWidth:"2",children:[x("circle",{strokeOpacity:".5",cx:"18",cy:"18",r:"18"}),x("path",{d:"M36 18c0-9.94-8.06-18-18-18",children:x("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})})]})})}),xSe=te(e=>({profiles:{height:880,margin:20,display:"flex",gap:15}})),kSe=()=>{const[e,t]=v.useState(!1),{setProfile:n,selectedProfile:r,replaceProfile:o}=ks(),[i,{toggle:s,close:a}]=Su(!1),{addToRecentActivity:c}=G0(),{firstname:u,lastname:f}=Aa(),{classes:p,cx:h}=xSe();v.useEffect(()=>{if(!r)return;let _=r;n(null),t(!0),setTimeout(()=>{t(!1),n(_)},650)},[]);const g=_=>{t(!0),setTimeout(()=>{t(!1),n(_)},650)},y=_=>{s(),c({category:"Profiles",type:"Updated",doneBy:u+" "+f,timeAgo:new Date().valueOf(),timeAgotext:"",activityID:_?.citizenid??""}),o(_||{}),setTimeout(()=>{a()},2e3)};return z("div",{className:p.profiles,children:[x(Wme,{onClick:g}),z(Dl,{sx:_=>({gap:12}),children:[x(op,{visible:e,overlayOpacity:.95,overlayColor:"rgb(34, 35, 37)",transitionDuration:250,loader:c1,style:{left:705,width:"60.25%",height:"96%",top:19,borderRadius:"0.25rem"}}),x(ySe,{onClick:g,saveProfile:y}),z(Wi,{gap:"md",justify:"flex-start",align:"center",direction:"row",wrap:"wrap",children:[x(wSe,{}),x(SSe,{})]})]}),x(xs,{mounted:i,transition:"scale",duration:200,timingFunction:"ease",children:_=>x(_k,{style:{..._,position:"fixed",bottom:15,left:"50%",transform:"translateX(-50%)",width:400},icon:x(y7,{size:"1rem"}),color:"green",radius:"xs",variant:"filled",children:"You sucessfully updated the profile"})})]})};function FB(e,t){const n=v.useRef(t);v.useEffect(function(){t!==n.current&&e.attributionControl!=null&&(n.current!=null&&e.attributionControl.removeAttribution(n.current),t!=null&&e.attributionControl.addAttribution(t)),n.current=t},[e,t])}const PSe=1;function CSe(e){return Object.freeze({__version:PSe,map:e})}function VB(e,t){return Object.freeze({...e,...t})}const HB=v.createContext(null),WB=HB.Provider;function AP(){const e=v.useContext(HB);if(e==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return e}function OSe(e){function t(n,r){const{instance:o,context:i}=e(n).current;return v.useImperativeHandle(r,()=>o),n.children==null?null:O.createElement(WB,{value:i},n.children)}return v.forwardRef(t)}function ESe(e){function t(n,r){const[o,i]=v.useState(!1),{instance:s}=e(n,i).current;v.useImperativeHandle(r,()=>s),v.useEffect(function(){o&&s.update()},[s,o,n.children]);const a=s._contentNode;return a?_r.createPortal(n.children,a):null}return v.forwardRef(t)}function UB(e,t){const n=v.useRef();v.useEffect(function(){return t!=null&&e.instance.on(t),n.current=t,function(){n.current!=null&&e.instance.off(n.current),n.current=null}},[e,t])}function ZB(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function $Se(e,t){return function(r,o){const i=AP(),s=e(ZB(r,i),i);return FB(i.map,r.attribution),UB(s.current,r.eventHandlers),t(s.current,i,r,o),s}}var ii={},MSe={get exports(){return ii},set exports(e){ii=e}};/* @preserve + * Leaflet 1.9.3, a JS library for interactive maps. https://leafletjs.com + * (c) 2010-2022 Vladimir Agafonkin, (c) 2010-2011 CloudMade + */(function(e,t){(function(n,r){r(t)})(fx,function(n){var r="1.9.3";function o(l){var d,m,w,C;for(m=1,w=arguments.length;m"u"||!L||!L.Mixin)){l=P(l)?l:[l];for(var d=0;d0?Math.floor(l):Math.ceil(l)};A.prototype={clone:function(){return new A(this.x,this.y)},add:function(l){return this.clone()._add(H(l))},_add:function(l){return this.x+=l.x,this.y+=l.y,this},subtract:function(l){return this.clone()._subtract(H(l))},_subtract:function(l){return this.x-=l.x,this.y-=l.y,this},divideBy:function(l){return this.clone()._divideBy(l)},_divideBy:function(l){return this.x/=l,this.y/=l,this},multiplyBy:function(l){return this.clone()._multiplyBy(l)},_multiplyBy:function(l){return this.x*=l,this.y*=l,this},scaleBy:function(l){return new A(this.x*l.x,this.y*l.y)},unscaleBy:function(l){return new A(this.x/l.x,this.y/l.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=q(this.x),this.y=q(this.y),this},distanceTo:function(l){l=H(l);var d=l.x-this.x,m=l.y-this.y;return Math.sqrt(d*d+m*m)},equals:function(l){return l=H(l),l.x===this.x&&l.y===this.y},contains:function(l){return l=H(l),Math.abs(l.x)<=Math.abs(this.x)&&Math.abs(l.y)<=Math.abs(this.y)},toString:function(){return"Point("+h(this.x)+", "+h(this.y)+")"}};function H(l,d,m){return l instanceof A?l:P(l)?new A(l[0],l[1]):l==null?l:typeof l=="object"&&"x"in l&&"y"in l?new A(l.x,l.y):new A(l,d,m)}function ee(l,d){if(l)for(var m=d?[l,d]:l,w=0,C=m.length;w=this.min.x&&m.x<=this.max.x&&d.y>=this.min.y&&m.y<=this.max.y},intersects:function(l){l=re(l);var d=this.min,m=this.max,w=l.min,C=l.max,M=C.x>=d.x&&w.x<=m.x,j=C.y>=d.y&&w.y<=m.y;return M&&j},overlaps:function(l){l=re(l);var d=this.min,m=this.max,w=l.min,C=l.max,M=C.x>d.x&&w.xd.y&&w.y=d.lat&&C.lat<=m.lat&&w.lng>=d.lng&&C.lng<=m.lng},intersects:function(l){l=Pe(l);var d=this._southWest,m=this._northEast,w=l.getSouthWest(),C=l.getNorthEast(),M=C.lat>=d.lat&&w.lat<=m.lat,j=C.lng>=d.lng&&w.lng<=m.lng;return M&&j},overlaps:function(l){l=Pe(l);var d=this._southWest,m=this._northEast,w=l.getSouthWest(),C=l.getNorthEast(),M=C.lat>d.lat&&w.latd.lng&&w.lng1,Ne=function(){var l=!1;try{var d=Object.defineProperty({},"passive",{get:function(){l=!0}});window.addEventListener("testPassiveEventSupport",p,d),window.removeEventListener("testPassiveEventSupport",p,d)}catch{}return l}(),Zn=function(){return!!document.createElement("canvas").getContext}(),xt=!!(document.createElementNS&&Vt("svg").createSVGRect),lt=!!xt&&function(){var l=document.createElement("div");return l.innerHTML="",(l.firstChild&&l.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),Zt=!xt&&function(){try{var l=document.createElement("div");l.innerHTML='';var d=l.firstChild;return d.style.behavior="url(#default#VML)",d&&typeof d.adj=="object"}catch{return!1}}(),Nn=navigator.platform.indexOf("Mac")===0,cr=navigator.platform.indexOf("Linux")===0;function Dt(l){return navigator.userAgent.toLowerCase().indexOf(l)>=0}var ve={ie:wn,ielt9:Un,edge:Ze,webkit:mn,android:Rt,android23:st,androidStock:kr,opera:Tn,chrome:on,gecko:Ht,safari:sn,phantom:an,opera12:ln,win:Po,ie3d:Ve,webkit3d:ge,gecko3d:$e,any3d:Xt,mobile:Wt,mobileWebkit:Ut,mobileWebkit3d:In,msPointer:Fr,pointer:tt,touch:wt,touchNative:at,mobileOpera:nt,mobileGecko:Xe,retina:mt,passiveEvents:Ne,canvas:Zn,svg:xt,vml:Zt,inlineSvg:lt,mac:Nn,linux:cr},Kn=ve.msPointer?"MSPointerDown":"pointerdown",Vr=ve.msPointer?"MSPointerMove":"pointermove",Hr=ve.msPointer?"MSPointerUp":"pointerup",be=ve.msPointer?"MSPointerCancel":"pointercancel",Qe={touchstart:Kn,touchmove:Vr,touchend:Hr,touchcancel:be},Ae={touchstart:Du,touchmove:Os,touchend:Os,touchcancel:Os},dt={},ur=!1;function Xl(l,d,m){return d==="touchstart"&&Pr(),Ae[d]?(m=Ae[d].bind(this,m),l.addEventListener(Qe[d],m,!1),m):(console.warn("wrong event specified:",d),p)}function Ps(l,d,m){if(!Qe[d]){console.warn("wrong event specified:",d);return}l.removeEventListener(Qe[d],m,!1)}function Au(l){dt[l.pointerId]=l}function Kt(l){dt[l.pointerId]&&(dt[l.pointerId]=l)}function Cs(l){delete dt[l.pointerId]}function Pr(){ur||(document.addEventListener(Kn,Au,!0),document.addEventListener(Vr,Kt,!0),document.addEventListener(Hr,Cs,!0),document.addEventListener(be,Cs,!0),ur=!0)}function Os(l,d){if(d.pointerType!==(d.MSPOINTER_TYPE_MOUSE||"mouse")){d.touches=[];for(var m in dt)d.touches.push(dt[m]);d.changedTouches=[d],l(d)}}function Du(l,d){d.MSPOINTER_TYPE_TOUCH&&d.pointerType===d.MSPOINTER_TYPE_TOUCH&&qn(d),Os(l,d)}function Ha(l){var d={},m,w;for(w in l)m=l[w],d[w]=m&&m.bind?m.bind(l):m;return l=d,d.type="dblclick",d.detail=2,d.isTrusted=!1,d._simulated=!0,d}var Ke=200;function kt(l,d){l.addEventListener("dblclick",d);var m=0,w;function C(M){if(M.detail!==1){w=M.detail;return}if(!(M.pointerType==="mouse"||M.sourceCapabilities&&!M.sourceCapabilities.firesTouchEvents)){var j=m2(M);if(!(j.some(function(Y){return Y instanceof HTMLLabelElement&&Y.attributes.for})&&!j.some(function(Y){return Y instanceof HTMLInputElement||Y instanceof HTMLSelectElement}))){var Z=Date.now();Z-m<=Ke?(w++,w===2&&d(Ha(M))):w=1,m=Z}}}return l.addEventListener("click",C),{dblclick:d,simDblclick:C}}function cn(l,d){l.removeEventListener("dblclick",d.dblclick),l.removeEventListener("click",d.simDblclick)}var xe=_p(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Ye=_p(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Gn=Ye==="webkitTransition"||Ye==="OTransition"?Ye+"End":"transitionend";function dr(l){return typeof l=="string"?document.getElementById(l):l}function bn(l,d){var m=l.style[d]||l.currentStyle&&l.currentStyle[d];if((!m||m==="auto")&&document.defaultView){var w=document.defaultView.getComputedStyle(l,null);m=w?w[d]:null}return m==="auto"?null:m}function Le(l,d,m){var w=document.createElement(l);return w.className=d||"",m&&m.appendChild(w),w}function De(l){var d=l.parentNode;d&&d.removeChild(l)}function Sn(l){for(;l.firstChild;)l.removeChild(l.firstChild)}function Wr(l){var d=l.parentNode;d&&d.lastChild!==l&&d.appendChild(l)}function Ur(l){var d=l.parentNode;d&&d.firstChild!==l&&d.insertBefore(l,d.firstChild)}function k1(l,d){if(l.classList!==void 0)return l.classList.contains(d);var m=yp(l);return m.length>0&&new RegExp("(^|\\s)"+d+"(\\s|$)").test(m)}function He(l,d){if(l.classList!==void 0)for(var m=y(d),w=0,C=m.length;w0?2*window.devicePixelRatio:1;function v2(l){return ve.edge?l.wheelDeltaY/2:l.deltaY&&l.deltaMode===0?-l.deltaY/kF:l.deltaY&&l.deltaMode===1?-l.deltaY*20:l.deltaY&&l.deltaMode===2?-l.deltaY*60:l.deltaX||l.deltaZ?0:l.wheelDelta?(l.wheelDeltaY||l.wheelDelta)/2:l.detail&&Math.abs(l.detail)<32765?-l.detail*20:l.detail?l.detail/-32765*60:0}function z1(l,d){var m=d.relatedTarget;if(!m)return!0;try{for(;m&&m!==l;)m=m.parentNode}catch{return!1}return m!==l}var PF={__proto__:null,on:je,off:Pt,stopPropagation:Za,disableScrollPropagation:L1,disableClickPropagation:Vu,preventDefault:qn,stop:Ka,getPropagationPath:m2,getMousePosition:g2,getWheelDelta:v2,isExternalTarget:z1,addListener:je,removeListener:Pt},y2=G.extend({run:function(l,d,m,w){this.stop(),this._el=l,this._inProgress=!0,this._duration=m||.25,this._easeOutPower=1/Math.max(w||.5,.2),this._startPos=Ua(l),this._offset=d.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=D(this._animate,this),this._step()},_step:function(l){var d=+new Date-this._startTime,m=this._duration*1e3;dthis.options.maxZoom)?this.setZoom(l):this},panInsideBounds:function(l,d){this._enforcingBounds=!0;var m=this.getCenter(),w=this._limitCenter(m,this._zoom,Pe(l));return m.equals(w)||this.panTo(w,d),this._enforcingBounds=!1,this},panInside:function(l,d){d=d||{};var m=H(d.paddingTopLeft||d.padding||[0,0]),w=H(d.paddingBottomRight||d.padding||[0,0]),C=this.project(this.getCenter()),M=this.project(l),j=this.getPixelBounds(),Z=re([j.min.add(m),j.max.subtract(w)]),Y=Z.getSize();if(!Z.contains(M)){this._enforcingBounds=!0;var oe=M.subtract(Z.getCenter()),me=Z.extend(M).getSize().subtract(Y);C.x+=oe.x<0?-me.x:me.x,C.y+=oe.y<0?-me.y:me.y,this.panTo(this.unproject(C),d),this._enforcingBounds=!1}return this},invalidateSize:function(l){if(!this._loaded)return this;l=o({animate:!1,pan:!0},l===!0?{animate:!0}:l);var d=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var m=this.getSize(),w=d.divideBy(2).round(),C=m.divideBy(2).round(),M=w.subtract(C);return!M.x&&!M.y?this:(l.animate&&l.pan?this.panBy(M):(l.pan&&this._rawPanBy(M),this.fire("move"),l.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(s(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:d,newSize:m}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(l){if(l=this._locateOptions=o({timeout:1e4,watch:!1},l),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var d=s(this._handleGeolocationResponse,this),m=s(this._handleGeolocationError,this);return l.watch?this._locationWatchId=navigator.geolocation.watchPosition(d,m,l):navigator.geolocation.getCurrentPosition(d,m,l),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(l){if(this._container._leaflet_id){var d=l.code,m=l.message||(d===1?"permission denied":d===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:d,message:"Geolocation error: "+m+"."})}},_handleGeolocationResponse:function(l){if(this._container._leaflet_id){var d=l.coords.latitude,m=l.coords.longitude,w=new X(d,m),C=w.toBounds(l.coords.accuracy*2),M=this._locateOptions;if(M.setView){var j=this.getBoundsZoom(C);this.setView(w,M.maxZoom?Math.min(j,M.maxZoom):j)}var Z={latlng:w,bounds:C,timestamp:l.timestamp};for(var Y in l.coords)typeof l.coords[Y]=="number"&&(Z[Y]=l.coords[Y]);this.fire("locationfound",Z)}},addHandler:function(l,d){if(!d)return this;var m=this[l]=new d(this);return this._handlers.push(m),this.options[l]&&m.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),De(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(K(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var l;for(l in this._layers)this._layers[l].remove();for(l in this._panes)De(this._panes[l]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(l,d){var m="leaflet-pane"+(l?" leaflet-"+l.replace("Pane","")+"-pane":""),w=Le("div",m,d||this._mapPane);return l&&(this._panes[l]=w),w},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var l=this.getPixelBounds(),d=this.unproject(l.getBottomLeft()),m=this.unproject(l.getTopRight());return new he(d,m)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(l,d,m){l=Pe(l),m=H(m||[0,0]);var w=this.getZoom()||0,C=this.getMinZoom(),M=this.getMaxZoom(),j=l.getNorthWest(),Z=l.getSouthEast(),Y=this.getSize().subtract(m),oe=re(this.project(Z,w),this.project(j,w)).getSize(),me=ve.any3d?this.options.zoomSnap:1,Re=Y.x/oe.x,rt=Y.y/oe.y,Eo=d?Math.max(Re,rt):Math.min(Re,rt);return w=this.getScaleZoom(Eo,w),me&&(w=Math.round(w/(me/100))*(me/100),w=d?Math.ceil(w/me)*me:Math.floor(w/me)*me),Math.max(C,Math.min(M,w))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new A(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(l,d){var m=this._getTopLeftPoint(l,d);return new ee(m,m.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(l){return this.options.crs.getProjectedBounds(l===void 0?this.getZoom():l)},getPane:function(l){return typeof l=="string"?this._panes[l]:l},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(l,d){var m=this.options.crs;return d=d===void 0?this._zoom:d,m.scale(l)/m.scale(d)},getScaleZoom:function(l,d){var m=this.options.crs;d=d===void 0?this._zoom:d;var w=m.zoom(l*m.scale(d));return isNaN(w)?1/0:w},project:function(l,d){return d=d===void 0?this._zoom:d,this.options.crs.latLngToPoint(ne(l),d)},unproject:function(l,d){return d=d===void 0?this._zoom:d,this.options.crs.pointToLatLng(H(l),d)},layerPointToLatLng:function(l){var d=H(l).add(this.getPixelOrigin());return this.unproject(d)},latLngToLayerPoint:function(l){var d=this.project(ne(l))._round();return d._subtract(this.getPixelOrigin())},wrapLatLng:function(l){return this.options.crs.wrapLatLng(ne(l))},wrapLatLngBounds:function(l){return this.options.crs.wrapLatLngBounds(Pe(l))},distance:function(l,d){return this.options.crs.distance(ne(l),ne(d))},containerPointToLayerPoint:function(l){return H(l).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(l){return H(l).add(this._getMapPanePos())},containerPointToLatLng:function(l){var d=this.containerPointToLayerPoint(H(l));return this.layerPointToLatLng(d)},latLngToContainerPoint:function(l){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ne(l)))},mouseEventToContainerPoint:function(l){return g2(l,this._container)},mouseEventToLayerPoint:function(l){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(l))},mouseEventToLatLng:function(l){return this.layerPointToLatLng(this.mouseEventToLayerPoint(l))},_initContainer:function(l){var d=this._container=dr(l);if(d){if(d._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");je(d,"scroll",this._onScroll,this),this._containerId=c(d)},_initLayout:function(){var l=this._container;this._fadeAnimated=this.options.fadeAnimation&&ve.any3d,He(l,"leaflet-container"+(ve.touch?" leaflet-touch":"")+(ve.retina?" leaflet-retina":"")+(ve.ielt9?" leaflet-oldie":"")+(ve.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var d=bn(l,"position");d!=="absolute"&&d!=="relative"&&d!=="fixed"&&d!=="sticky"&&(l.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var l=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),gn(this._mapPane,new A(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(He(l.markerPane,"leaflet-zoom-hide"),He(l.shadowPane,"leaflet-zoom-hide"))},_resetView:function(l,d,m){gn(this._mapPane,new A(0,0));var w=!this._loaded;this._loaded=!0,d=this._limitZoom(d),this.fire("viewprereset");var C=this._zoom!==d;this._moveStart(C,m)._move(l,d)._moveEnd(C),this.fire("viewreset"),w&&this.fire("load")},_moveStart:function(l,d){return l&&this.fire("zoomstart"),d||this.fire("movestart"),this},_move:function(l,d,m,w){d===void 0&&(d=this._zoom);var C=this._zoom!==d;return this._zoom=d,this._lastCenter=l,this._pixelOrigin=this._getNewPixelOrigin(l),w?m&&m.pinch&&this.fire("zoom",m):((C||m&&m.pinch)&&this.fire("zoom",m),this.fire("move",m)),this},_moveEnd:function(l){return l&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return K(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(l){gn(this._mapPane,this._getMapPanePos().subtract(l))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(l){this._targets={},this._targets[c(this._container)]=this;var d=l?Pt:je;d(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&d(window,"resize",this._onResize,this),ve.any3d&&this.options.transform3DLimit&&(l?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){K(this._resizeRequest),this._resizeRequest=D(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var l=this._getMapPanePos();Math.max(Math.abs(l.x),Math.abs(l.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(l,d){for(var m=[],w,C=d==="mouseout"||d==="mouseover",M=l.target||l.srcElement,j=!1;M;){if(w=this._targets[c(M)],w&&(d==="click"||d==="preclick")&&this._draggableMoved(w)){j=!0;break}if(w&&w.listens(d,!0)&&(C&&!z1(M,l)||(m.push(w),C))||M===this._container)break;M=M.parentNode}return!m.length&&!j&&!C&&this.listens(d,!0)&&(m=[this]),m},_isClickDisabled:function(l){for(;l&&l!==this._container;){if(l._leaflet_disable_click)return!0;l=l.parentNode}},_handleDOMEvent:function(l){var d=l.target||l.srcElement;if(!(!this._loaded||d._leaflet_disable_events||l.type==="click"&&this._isClickDisabled(d))){var m=l.type;m==="mousedown"&&M1(d),this._fireDOMEvent(l,m)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(l,d,m){if(l.type==="click"){var w=o({},l);w.type="preclick",this._fireDOMEvent(w,w.type,m)}var C=this._findEventTargets(l,d);if(m){for(var M=[],j=0;j0?Math.round(l-d)/2:Math.max(0,Math.ceil(l))-Math.max(0,Math.floor(d))},_limitZoom:function(l){var d=this.getMinZoom(),m=this.getMaxZoom(),w=ve.any3d?this.options.zoomSnap:1;return w&&(l=Math.round(l/w)*w),Math.max(d,Math.min(m,l))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){un(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(l,d){var m=this._getCenterOffset(l)._trunc();return(d&&d.animate)!==!0&&!this.getSize().contains(m)?!1:(this.panBy(m,d),!0)},_createAnimProxy:function(){var l=this._proxy=Le("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(l),this.on("zoomanim",function(d){var m=xe,w=this._proxy.style[m];Wa(this._proxy,this.project(d.center,d.zoom),this.getZoomScale(d.zoom,1)),w===this._proxy.style[m]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){De(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var l=this.getCenter(),d=this.getZoom();Wa(this._proxy,this.project(l,d),this.getZoomScale(d,1))},_catchTransitionEnd:function(l){this._animatingZoom&&l.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(l,d,m){if(this._animatingZoom)return!0;if(m=m||{},!this._zoomAnimated||m.animate===!1||this._nothingToAnimate()||Math.abs(d-this._zoom)>this.options.zoomAnimationThreshold)return!1;var w=this.getZoomScale(d),C=this._getCenterOffset(l)._divideBy(1-1/w);return m.animate!==!0&&!this.getSize().contains(C)?!1:(D(function(){this._moveStart(!0,!1)._animateZoom(l,d,!0)},this),!0)},_animateZoom:function(l,d,m,w){this._mapPane&&(m&&(this._animatingZoom=!0,this._animateToCenter=l,this._animateToZoom=d,He(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:l,zoom:d,noUpdate:w}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(s(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&un(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function CF(l,d){return new it(l,d)}var Ho=V.extend({options:{position:"topright"},initialize:function(l){_(this,l)},getPosition:function(){return this.options.position},setPosition:function(l){var d=this._map;return d&&d.removeControl(this),this.options.position=l,d&&d.addControl(this),this},getContainer:function(){return this._container},addTo:function(l){this.remove(),this._map=l;var d=this._container=this.onAdd(l),m=this.getPosition(),w=l._controlCorners[m];return He(d,"leaflet-control"),m.indexOf("bottom")!==-1?w.insertBefore(d,w.firstChild):w.appendChild(d),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(De(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(l){this._map&&l&&l.screenX>0&&l.screenY>0&&this._map.getContainer().focus()}}),Hu=function(l){return new Ho(l)};it.include({addControl:function(l){return l.addTo(this),this},removeControl:function(l){return l.remove(),this},_initControlPos:function(){var l=this._controlCorners={},d="leaflet-",m=this._controlContainer=Le("div",d+"control-container",this._container);function w(C,M){var j=d+C+" "+d+M;l[C+M]=Le("div",j,m)}w("top","left"),w("top","right"),w("bottom","left"),w("bottom","right")},_clearControlPos:function(){for(var l in this._controlCorners)De(this._controlCorners[l]);De(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var _2=Ho.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(l,d,m,w){return m1,this._baseLayersList.style.display=l?"":"none"),this._separator.style.display=d&&l?"":"none",this},_onLayerChange:function(l){this._handlingClick||this._update();var d=this._getLayer(c(l.target)),m=d.overlay?l.type==="add"?"overlayadd":"overlayremove":l.type==="add"?"baselayerchange":null;m&&this._map.fire(m,d)},_createRadioElement:function(l,d){var m='",w=document.createElement("div");return w.innerHTML=m,w.firstChild},_addItem:function(l){var d=document.createElement("label"),m=this._map.hasLayer(l.layer),w;l.overlay?(w=document.createElement("input"),w.type="checkbox",w.className="leaflet-control-layers-selector",w.defaultChecked=m):w=this._createRadioElement("leaflet-base-layers_"+c(this),m),this._layerControlInputs.push(w),w.layerId=c(l.layer),je(w,"click",this._onInputClick,this);var C=document.createElement("span");C.innerHTML=" "+l.name;var M=document.createElement("span");d.appendChild(M),M.appendChild(w),M.appendChild(C);var j=l.overlay?this._overlaysList:this._baseLayersList;return j.appendChild(d),this._checkDisabledLayers(),d},_onInputClick:function(){var l=this._layerControlInputs,d,m,w=[],C=[];this._handlingClick=!0;for(var M=l.length-1;M>=0;M--)d=l[M],m=this._getLayer(d.layerId).layer,d.checked?w.push(m):d.checked||C.push(m);for(M=0;M=0;C--)d=l[C],m=this._getLayer(d.layerId).layer,d.disabled=m.options.minZoom!==void 0&&wm.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var l=this._section;je(l,"click",qn),this.expand(),setTimeout(function(){Pt(l,"click",qn)})}}),OF=function(l,d,m){return new _2(l,d,m)},A1=Ho.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(l){var d="leaflet-control-zoom",m=Le("div",d+" leaflet-bar"),w=this.options;return this._zoomInButton=this._createButton(w.zoomInText,w.zoomInTitle,d+"-in",m,this._zoomIn),this._zoomOutButton=this._createButton(w.zoomOutText,w.zoomOutTitle,d+"-out",m,this._zoomOut),this._updateDisabled(),l.on("zoomend zoomlevelschange",this._updateDisabled,this),m},onRemove:function(l){l.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(l){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(l.shiftKey?3:1))},_createButton:function(l,d,m,w,C){var M=Le("a",m,w);return M.innerHTML=l,M.href="#",M.title=d,M.setAttribute("role","button"),M.setAttribute("aria-label",d),Vu(M),je(M,"click",Ka),je(M,"click",C,this),je(M,"click",this._refocusOnMap,this),M},_updateDisabled:function(){var l=this._map,d="leaflet-disabled";un(this._zoomInButton,d),un(this._zoomOutButton,d),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||l._zoom===l.getMinZoom())&&(He(this._zoomOutButton,d),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||l._zoom===l.getMaxZoom())&&(He(this._zoomInButton,d),this._zoomInButton.setAttribute("aria-disabled","true"))}});it.mergeOptions({zoomControl:!0}),it.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new A1,this.addControl(this.zoomControl))});var EF=function(l){return new A1(l)},w2=Ho.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(l){var d="leaflet-control-scale",m=Le("div",d),w=this.options;return this._addScales(w,d+"-line",m),l.on(w.updateWhenIdle?"moveend":"move",this._update,this),l.whenReady(this._update,this),m},onRemove:function(l){l.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(l,d,m){l.metric&&(this._mScale=Le("div",d,m)),l.imperial&&(this._iScale=Le("div",d,m))},_update:function(){var l=this._map,d=l.getSize().y/2,m=l.distance(l.containerPointToLatLng([0,d]),l.containerPointToLatLng([this.options.maxWidth,d]));this._updateScales(m)},_updateScales:function(l){this.options.metric&&l&&this._updateMetric(l),this.options.imperial&&l&&this._updateImperial(l)},_updateMetric:function(l){var d=this._getRoundNum(l),m=d<1e3?d+" m":d/1e3+" km";this._updateScale(this._mScale,m,d/l)},_updateImperial:function(l){var d=l*3.2808399,m,w,C;d>5280?(m=d/5280,w=this._getRoundNum(m),this._updateScale(this._iScale,w+" mi",w/m)):(C=this._getRoundNum(d),this._updateScale(this._iScale,C+" ft",C/d))},_updateScale:function(l,d,m){l.style.width=Math.round(this.options.maxWidth*m)+"px",l.innerHTML=d},_getRoundNum:function(l){var d=Math.pow(10,(Math.floor(l)+"").length-1),m=l/d;return m=m>=10?10:m>=5?5:m>=3?3:m>=2?2:1,d*m}}),$F=function(l){return new w2(l)},MF='',D1=Ho.extend({options:{position:"bottomright",prefix:''+(ve.inlineSvg?MF+" ":"")+"Leaflet"},initialize:function(l){_(this,l),this._attributions={}},onAdd:function(l){l.attributionControl=this,this._container=Le("div","leaflet-control-attribution"),Vu(this._container);for(var d in l._layers)l._layers[d].getAttribution&&this.addAttribution(l._layers[d].getAttribution());return this._update(),l.on("layeradd",this._addAttribution,this),this._container},onRemove:function(l){l.off("layeradd",this._addAttribution,this)},_addAttribution:function(l){l.layer.getAttribution&&(this.addAttribution(l.layer.getAttribution()),l.layer.once("remove",function(){this.removeAttribution(l.layer.getAttribution())},this))},setPrefix:function(l){return this.options.prefix=l,this._update(),this},addAttribution:function(l){return l?(this._attributions[l]||(this._attributions[l]=0),this._attributions[l]++,this._update(),this):this},removeAttribution:function(l){return l?(this._attributions[l]&&(this._attributions[l]--,this._update()),this):this},_update:function(){if(this._map){var l=[];for(var d in this._attributions)this._attributions[d]&&l.push(d);var m=[];this.options.prefix&&m.push(this.options.prefix),l.length&&m.push(l.join(", ")),this._container.innerHTML=m.join(' ')}}});it.mergeOptions({attributionControl:!0}),it.addInitHook(function(){this.options.attributionControl&&new D1().addTo(this)});var TF=function(l){return new D1(l)};Ho.Layers=_2,Ho.Zoom=A1,Ho.Scale=w2,Ho.Attribution=D1,Hu.layers=OF,Hu.zoom=EF,Hu.scale=$F,Hu.attribution=TF;var mi=V.extend({initialize:function(l){this._map=l},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});mi.addTo=function(l,d){return l.addHandler(d,this),this};var IF={Events:J},b2=ve.touch?"touchstart mousedown":"mousedown",Es=G.extend({options:{clickTolerance:3},initialize:function(l,d,m,w){_(this,w),this._element=l,this._dragStartTarget=d||l,this._preventOutline=m},enable:function(){this._enabled||(je(this._dragStartTarget,b2,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Es._dragging===this&&this.finishDrag(!0),Pt(this._dragStartTarget,b2,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(l){if(this._enabled&&(this._moved=!1,!k1(this._element,"leaflet-zoom-anim"))){if(l.touches&&l.touches.length!==1){Es._dragging===this&&this.finishDrag();return}if(!(Es._dragging||l.shiftKey||l.which!==1&&l.button!==1&&!l.touches)&&(Es._dragging=this,this._preventOutline&&M1(this._element),O1(),ju(),!this._moving)){this.fire("down");var d=l.touches?l.touches[0]:l,m=p2(this._element);this._startPoint=new A(d.clientX,d.clientY),this._startPos=Ua(this._element),this._parentScale=T1(m);var w=l.type==="mousedown";je(document,w?"mousemove":"touchmove",this._onMove,this),je(document,w?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(l){if(this._enabled){if(l.touches&&l.touches.length>1){this._moved=!0;return}var d=l.touches&&l.touches.length===1?l.touches[0]:l,m=new A(d.clientX,d.clientY)._subtract(this._startPoint);!m.x&&!m.y||Math.abs(m.x)+Math.abs(m.y)M&&(j=Z,M=Y);M>m&&(d[j]=1,j1(l,d,m,w,j),j1(l,d,m,j,C))}function LF(l,d){for(var m=[l[0]],w=1,C=0,M=l.length;wd&&(m.push(l[w]),C=w);return Cd.max.x&&(m|=2),l.yd.max.y&&(m|=8),m}function zF(l,d){var m=d.x-l.x,w=d.y-l.y;return m*m+w*w}function Wu(l,d,m,w){var C=d.x,M=d.y,j=m.x-C,Z=m.y-M,Y=j*j+Z*Z,oe;return Y>0&&(oe=((l.x-C)*j+(l.y-M)*Z)/Y,oe>1?(C=m.x,M=m.y):oe>0&&(C+=j*oe,M+=Z*oe)),j=l.x-C,Z=l.y-M,w?j*j+Z*Z:new A(C,M)}function Oo(l){return!P(l[0])||typeof l[0][0]!="object"&&typeof l[0][0]<"u"}function C2(l){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Oo(l)}function O2(l,d){var m,w,C,M,j,Z,Y,oe;if(!l||l.length===0)throw new Error("latlngs not passed");Oo(l)||(console.warn("latlngs are not flat! Only the first ring will be used"),l=l[0]);var me=[];for(var Re in l)me.push(d.project(ne(l[Re])));var rt=me.length;for(m=0,w=0;mw){Y=(M-w)/C,oe=[Z.x-Y*(Z.x-j.x),Z.y-Y*(Z.y-j.y)];break}return d.unproject(H(oe))}var AF={__proto__:null,simplify:S2,pointToSegmentDistance:x2,closestPointOnSegment:NF,clipSegment:P2,_getEdgeIntersection:Sp,_getBitCode:Ga,_sqClosestPointOnSegment:Wu,isFlat:Oo,_flat:C2,polylineCenter:O2};function E2(l,d,m){var w,C=[1,4,2,8],M,j,Z,Y,oe,me,Re,rt;for(M=0,me=l.length;M1e-7;Z++)oe=C*Math.sin(j),oe=Math.pow((1-oe)/(1+oe),C/2),Y=Math.PI/2-2*Math.atan(M*oe)-j,j+=Y;return new X(j*d,l.x*d/m)}},jF={__proto__:null,LonLat:B1,Mercator:F1,SphericalMercator:Te},BF=o({},Oe,{code:"EPSG:3395",projection:F1,transformation:function(){var l=.5/(Math.PI*F1.R);return Fe(l,.5,-l,.5)}()}),M2=o({},Oe,{code:"EPSG:4326",projection:B1,transformation:Fe(1/180,1,-1/180,.5)}),FF=o({},fe,{projection:B1,transformation:Fe(1,0,-1,0),scale:function(l){return Math.pow(2,l)},zoom:function(l){return Math.log(l)/Math.LN2},distance:function(l,d){var m=d.lng-l.lng,w=d.lat-l.lat;return Math.sqrt(m*m+w*w)},infinite:!0});fe.Earth=Oe,fe.EPSG3395=BF,fe.EPSG3857=St,fe.EPSG900913=ft,fe.EPSG4326=M2,fe.Simple=FF;var Wo=G.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(l){return l.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(l){return l&&l.removeLayer(this),this},getPane:function(l){return this._map.getPane(l?this.options[l]||l:this.options.pane)},addInteractiveTarget:function(l){return this._map._targets[c(l)]=this,this},removeInteractiveTarget:function(l){return delete this._map._targets[c(l)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(l){var d=l.target;if(d.hasLayer(this)){if(this._map=d,this._zoomAnimated=d._zoomAnimated,this.getEvents){var m=this.getEvents();d.on(m,this),this.once("remove",function(){d.off(m,this)},this)}this.onAdd(d),this.fire("add"),d.fire("layeradd",{layer:this})}}});it.include({addLayer:function(l){if(!l._layerAdd)throw new Error("The provided object is not a Layer.");var d=c(l);return this._layers[d]?this:(this._layers[d]=l,l._mapToAdd=this,l.beforeAdd&&l.beforeAdd(this),this.whenReady(l._layerAdd,l),this)},removeLayer:function(l){var d=c(l);return this._layers[d]?(this._loaded&&l.onRemove(this),delete this._layers[d],this._loaded&&(this.fire("layerremove",{layer:l}),l.fire("remove")),l._map=l._mapToAdd=null,this):this},hasLayer:function(l){return c(l)in this._layers},eachLayer:function(l,d){for(var m in this._layers)l.call(d,this._layers[m]);return this},_addLayers:function(l){l=l?P(l)?l:[l]:[];for(var d=0,m=l.length;dthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&d[0]instanceof X&&d[0].equals(d[m-1])&&d.pop(),d},_setLatLngs:function(l){Yi.prototype._setLatLngs.call(this,l),Oo(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Oo(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var l=this._renderer._bounds,d=this.options.weight,m=new A(d,d);if(l=new ee(l.min.subtract(m),l.max.add(m)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(l))){if(this.options.noClip){this._parts=this._rings;return}for(var w=0,C=this._rings.length,M;wl.y!=C.y>l.y&&l.x<(C.x-w.x)*(l.y-w.y)/(C.y-w.y)+w.x&&(d=!d);return d||Yi.prototype._containsPoint.call(this,l,!0)}});function qF(l,d){return new tc(l,d)}var Ji=qi.extend({initialize:function(l,d){_(this,d),this._layers={},l&&this.addData(l)},addData:function(l){var d=P(l)?l:l.features,m,w,C;if(d){for(m=0,w=d.length;m0?w:[d.src];return}P(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(d.style,"objectFit")&&(d.style.objectFit="fill"),d.autoplay=!!this.options.autoplay,d.loop=!!this.options.loop,d.muted=!!this.options.muted,d.playsInline=!!this.options.playsInline;for(var M=0;MC?(d.height=C+"px",He(l,M)):un(l,M),this._containerWidth=this._container.offsetWidth},_animateZoom:function(l){var d=this._map._latLngToNewLayerPoint(this._latlng,l.zoom,l.center),m=this._getAnchor();gn(this._container,d.add(m))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var l=this._map,d=parseInt(bn(this._container,"marginBottom"),10)||0,m=this._container.offsetHeight+d,w=this._containerWidth,C=new A(this._containerLeft,-m-this._containerBottom);C._add(Ua(this._container));var M=l.layerPointToContainerPoint(C),j=H(this.options.autoPanPadding),Z=H(this.options.autoPanPaddingTopLeft||j),Y=H(this.options.autoPanPaddingBottomRight||j),oe=l.getSize(),me=0,Re=0;M.x+w+Y.x>oe.x&&(me=M.x+w-oe.x+Y.x),M.x-me-Z.x<0&&(me=M.x-Z.x),M.y+m+Y.y>oe.y&&(Re=M.y+m-oe.y+Y.y),M.y-Re-Z.y<0&&(Re=M.y-Z.y),(me||Re)&&(this.options.keepInView&&(this._autopanning=!0),l.fire("autopanstart").panBy([me,Re]))}},_getAnchor:function(){return H(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),eV=function(l,d){return new Mp(l,d)};it.mergeOptions({closePopupOnClick:!0}),it.include({openPopup:function(l,d,m){return this._initOverlay(Mp,l,d,m).openOn(this),this},closePopup:function(l){return l=arguments.length?l:this._popup,l&&l.close(),this}}),Wo.include({bindPopup:function(l,d){return this._popup=this._initOverlay(Mp,this._popup,l,d),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(l){return this._popup&&(this instanceof qi||(this._popup._source=this),this._popup._prepareOpen(l||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(l){return this._popup&&this._popup.setContent(l),this},getPopup:function(){return this._popup},_openPopup:function(l){if(!(!this._popup||!this._map)){Ka(l);var d=l.layer||l.target;if(this._popup._source===d&&!(d instanceof $s)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(l.latlng);return}this._popup._source=d,this.openPopup(l.latlng)}},_movePopup:function(l){this._popup.setLatLng(l.latlng)},_onKeyPress:function(l){l.originalEvent.keyCode===13&&this._openPopup(l)}});var Tp=gi.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(l){gi.prototype.onAdd.call(this,l),this.setOpacity(this.options.opacity),l.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(l){gi.prototype.onRemove.call(this,l),l.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var l=gi.prototype.getEvents.call(this);return this.options.permanent||(l.preclick=this.close),l},_initLayout:function(){var l="leaflet-tooltip",d=l+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Le("div",d),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+c(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(l){var d,m,w=this._map,C=this._container,M=w.latLngToContainerPoint(w.getCenter()),j=w.layerPointToContainerPoint(l),Z=this.options.direction,Y=C.offsetWidth,oe=C.offsetHeight,me=H(this.options.offset),Re=this._getAnchor();Z==="top"?(d=Y/2,m=oe):Z==="bottom"?(d=Y/2,m=0):Z==="center"?(d=Y/2,m=oe/2):Z==="right"?(d=0,m=oe/2):Z==="left"?(d=Y,m=oe/2):j.xthis.options.maxZoom||mw?this._retainParent(C,M,j,w):!1)},_retainChildren:function(l,d,m,w){for(var C=2*l;C<2*l+2;C++)for(var M=2*d;M<2*d+2;M++){var j=new A(C,M);j.z=m+1;var Z=this._tileCoordsToKey(j),Y=this._tiles[Z];if(Y&&Y.active){Y.retain=!0;continue}else Y&&Y.loaded&&(Y.retain=!0);m+1this.options.maxZoom||this.options.minZoom!==void 0&&C1){this._setView(l,m);return}for(var Re=C.min.y;Re<=C.max.y;Re++)for(var rt=C.min.x;rt<=C.max.x;rt++){var Eo=new A(rt,Re);if(Eo.z=this._tileZoom,!!this._isValidTile(Eo)){var qa=this._tiles[this._tileCoordsToKey(Eo)];qa?qa.current=!0:j.push(Eo)}}if(j.sort(function(Ms,Z1){return Ms.distanceTo(M)-Z1.distanceTo(M)}),j.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Np=document.createDocumentFragment();for(rt=0;rtm.max.x)||!d.wrapLat&&(l.ym.max.y))return!1}if(!this.options.bounds)return!0;var w=this._tileCoordsToBounds(l);return Pe(this.options.bounds).overlaps(w)},_keyToBounds:function(l){return this._tileCoordsToBounds(this._keyToTileCoords(l))},_tileCoordsToNwSe:function(l){var d=this._map,m=this.getTileSize(),w=l.scaleBy(m),C=w.add(m),M=d.unproject(w,l.z),j=d.unproject(C,l.z);return[M,j]},_tileCoordsToBounds:function(l){var d=this._tileCoordsToNwSe(l),m=new he(d[0],d[1]);return this.options.noWrap||(m=this._map.wrapLatLngBounds(m)),m},_tileCoordsToKey:function(l){return l.x+":"+l.y+":"+l.z},_keyToTileCoords:function(l){var d=l.split(":"),m=new A(+d[0],+d[1]);return m.z=+d[2],m},_removeTile:function(l){var d=this._tiles[l];d&&(De(d.el),delete this._tiles[l],this.fire("tileunload",{tile:d.el,coords:this._keyToTileCoords(l)}))},_initTile:function(l){He(l,"leaflet-tile");var d=this.getTileSize();l.style.width=d.x+"px",l.style.height=d.y+"px",l.onselectstart=p,l.onmousemove=p,ve.ielt9&&this.options.opacity<1&&Co(l,this.options.opacity)},_addTile:function(l,d){var m=this._getTilePos(l),w=this._tileCoordsToKey(l),C=this.createTile(this._wrapCoords(l),s(this._tileReady,this,l));this._initTile(C),this.createTile.length<2&&D(s(this._tileReady,this,l,null,C)),gn(C,m),this._tiles[w]={el:C,coords:l,current:!0},d.appendChild(C),this.fire("tileloadstart",{tile:C,coords:l})},_tileReady:function(l,d,m){d&&this.fire("tileerror",{error:d,tile:m,coords:l});var w=this._tileCoordsToKey(l);m=this._tiles[w],m&&(m.loaded=+new Date,this._map._fadeAnimated?(Co(m.el,0),K(this._fadeFrame),this._fadeFrame=D(this._updateOpacity,this)):(m.active=!0,this._pruneTiles()),d||(He(m.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:m.el,coords:l})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),ve.ielt9||!this._map._fadeAnimated?D(this._pruneTiles,this):setTimeout(s(this._pruneTiles,this),250)))},_getTilePos:function(l){return l.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(l){var d=new A(this._wrapX?f(l.x,this._wrapX):l.x,this._wrapY?f(l.y,this._wrapY):l.y);return d.z=l.z,d},_pxBoundsToTileRange:function(l){var d=this.getTileSize();return new ee(l.min.unscaleBy(d).floor(),l.max.unscaleBy(d).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var l in this._tiles)if(!this._tiles[l].loaded)return!1;return!0}});function rV(l){return new Zu(l)}var rc=Zu.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(l,d){this._url=l,d=_(this,d),d.detectRetina&&ve.retina&&d.maxZoom>0?(d.tileSize=Math.floor(d.tileSize/2),d.zoomReverse?(d.zoomOffset--,d.minZoom=Math.min(d.maxZoom,d.minZoom+1)):(d.zoomOffset++,d.maxZoom=Math.max(d.minZoom,d.maxZoom-1)),d.minZoom=Math.max(0,d.minZoom)):d.zoomReverse?d.minZoom=Math.min(d.maxZoom,d.minZoom):d.maxZoom=Math.max(d.minZoom,d.maxZoom),typeof d.subdomains=="string"&&(d.subdomains=d.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(l,d){return this._url===l&&d===void 0&&(d=!0),this._url=l,d||this.redraw(),this},createTile:function(l,d){var m=document.createElement("img");return je(m,"load",s(this._tileOnLoad,this,d,m)),je(m,"error",s(this._tileOnError,this,d,m)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(m.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(m.referrerPolicy=this.options.referrerPolicy),m.alt="",m.src=this.getTileUrl(l),m},getTileUrl:function(l){var d={r:ve.retina?"@2x":"",s:this._getSubdomain(l),x:l.x,y:l.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var m=this._globalTileRange.max.y-l.y;this.options.tms&&(d.y=m),d["-y"]=m}return S(this._url,o(d,this.options))},_tileOnLoad:function(l,d){ve.ielt9?setTimeout(s(l,this,null,d),0):l(null,d)},_tileOnError:function(l,d,m){var w=this.options.errorTileUrl;w&&d.getAttribute("src")!==w&&(d.src=w),l(m,d)},_onTileRemove:function(l){l.tile.onload=null},_getZoomForUrl:function(){var l=this._tileZoom,d=this.options.maxZoom,m=this.options.zoomReverse,w=this.options.zoomOffset;return m&&(l=d-l),l+w},_getSubdomain:function(l){var d=Math.abs(l.x+l.y)%this.options.subdomains.length;return this.options.subdomains[d]},_abortLoading:function(){var l,d;for(l in this._tiles)if(this._tiles[l].coords.z!==this._tileZoom&&(d=this._tiles[l].el,d.onload=p,d.onerror=p,!d.complete)){d.src=$;var m=this._tiles[l].coords;De(d),delete this._tiles[l],this.fire("tileabort",{tile:d,coords:m})}},_removeTile:function(l){var d=this._tiles[l];if(d)return d.el.setAttribute("src",$),Zu.prototype._removeTile.call(this,l)},_tileReady:function(l,d,m){if(!(!this._map||m&&m.getAttribute("src")===$))return Zu.prototype._tileReady.call(this,l,d,m)}});function A2(l,d){return new rc(l,d)}var D2=rc.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(l,d){this._url=l;var m=o({},this.defaultWmsParams);for(var w in d)w in this.options||(m[w]=d[w]);d=_(this,d);var C=d.detectRetina&&ve.retina?2:1,M=this.getTileSize();m.width=M.x*C,m.height=M.y*C,this.wmsParams=m},onAdd:function(l){this._crs=this.options.crs||l.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var d=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[d]=this._crs.code,rc.prototype.onAdd.call(this,l)},getTileUrl:function(l){var d=this._tileCoordsToNwSe(l),m=this._crs,w=re(m.project(d[0]),m.project(d[1])),C=w.min,M=w.max,j=(this._wmsVersion>=1.3&&this._crs===M2?[C.y,C.x,M.y,M.x]:[C.x,C.y,M.x,M.y]).join(","),Z=rc.prototype.getTileUrl.call(this,l);return Z+k(this.wmsParams,Z,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+j},setParams:function(l,d){return o(this.wmsParams,l),d||this.redraw(),this}});function oV(l,d){return new D2(l,d)}rc.WMS=D2,A2.wms=oV;var Xi=Wo.extend({options:{padding:.1},initialize:function(l){_(this,l),c(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&He(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var l={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(l.zoomanim=this._onAnimZoom),l},_onAnimZoom:function(l){this._updateTransform(l.center,l.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(l,d){var m=this._map.getZoomScale(d,this._zoom),w=this._map.getSize().multiplyBy(.5+this.options.padding),C=this._map.project(this._center,d),M=w.multiplyBy(-m).add(C).subtract(this._map._getNewPixelOrigin(l,d));ve.any3d?Wa(this._container,M,m):gn(this._container,M)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var l in this._layers)this._layers[l]._reset()},_onZoomEnd:function(){for(var l in this._layers)this._layers[l]._project()},_updatePaths:function(){for(var l in this._layers)this._layers[l]._update()},_update:function(){var l=this.options.padding,d=this._map.getSize(),m=this._map.containerPointToLayerPoint(d.multiplyBy(-l)).round();this._bounds=new ee(m,m.add(d.multiplyBy(1+l*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),j2=Xi.extend({options:{tolerance:0},getEvents:function(){var l=Xi.prototype.getEvents.call(this);return l.viewprereset=this._onViewPreReset,l},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Xi.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var l=this._container=document.createElement("canvas");je(l,"mousemove",this._onMouseMove,this),je(l,"click dblclick mousedown mouseup contextmenu",this._onClick,this),je(l,"mouseout",this._handleMouseOut,this),l._leaflet_disable_events=!0,this._ctx=l.getContext("2d")},_destroyContainer:function(){K(this._redrawRequest),delete this._ctx,De(this._container),Pt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var l;this._redrawBounds=null;for(var d in this._layers)l=this._layers[d],l._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Xi.prototype._update.call(this);var l=this._bounds,d=this._container,m=l.getSize(),w=ve.retina?2:1;gn(d,l.min),d.width=w*m.x,d.height=w*m.y,d.style.width=m.x+"px",d.style.height=m.y+"px",ve.retina&&this._ctx.scale(2,2),this._ctx.translate(-l.min.x,-l.min.y),this.fire("update")}},_reset:function(){Xi.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(l){this._updateDashArray(l),this._layers[c(l)]=l;var d=l._order={layer:l,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=d),this._drawLast=d,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(l){this._requestRedraw(l)},_removePath:function(l){var d=l._order,m=d.next,w=d.prev;m?m.prev=w:this._drawLast=w,w?w.next=m:this._drawFirst=m,delete l._order,delete this._layers[c(l)],this._requestRedraw(l)},_updatePath:function(l){this._extendRedrawBounds(l),l._project(),l._update(),this._requestRedraw(l)},_updateStyle:function(l){this._updateDashArray(l),this._requestRedraw(l)},_updateDashArray:function(l){if(typeof l.options.dashArray=="string"){var d=l.options.dashArray.split(/[, ]+/),m=[],w,C;for(C=0;C')}}catch{}return function(l){return document.createElement("<"+l+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),iV={_initContainer:function(){this._container=Le("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Xi.prototype._update.call(this),this.fire("update"))},_initPath:function(l){var d=l._container=Ku("shape");He(d,"leaflet-vml-shape "+(this.options.className||"")),d.coordsize="1 1",l._path=Ku("path"),d.appendChild(l._path),this._updateStyle(l),this._layers[c(l)]=l},_addPath:function(l){var d=l._container;this._container.appendChild(d),l.options.interactive&&l.addInteractiveTarget(d)},_removePath:function(l){var d=l._container;De(d),l.removeInteractiveTarget(d),delete this._layers[c(l)]},_updateStyle:function(l){var d=l._stroke,m=l._fill,w=l.options,C=l._container;C.stroked=!!w.stroke,C.filled=!!w.fill,w.stroke?(d||(d=l._stroke=Ku("stroke")),C.appendChild(d),d.weight=w.weight+"px",d.color=w.color,d.opacity=w.opacity,w.dashArray?d.dashStyle=P(w.dashArray)?w.dashArray.join(" "):w.dashArray.replace(/( *, *)/g," "):d.dashStyle="",d.endcap=w.lineCap.replace("butt","flat"),d.joinstyle=w.lineJoin):d&&(C.removeChild(d),l._stroke=null),w.fill?(m||(m=l._fill=Ku("fill")),C.appendChild(m),m.color=w.fillColor||w.color,m.opacity=w.fillOpacity):m&&(C.removeChild(m),l._fill=null)},_updateCircle:function(l){var d=l._point.round(),m=Math.round(l._radius),w=Math.round(l._radiusY||m);this._setPath(l,l._empty()?"M0 0":"AL "+d.x+","+d.y+" "+m+","+w+" 0,"+65535*360)},_setPath:function(l,d){l._path.v=d},_bringToFront:function(l){Wr(l._container)},_bringToBack:function(l){Ur(l._container)}},Ip=ve.vml?Ku:Vt,Gu=Xi.extend({_initContainer:function(){this._container=Ip("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Ip("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){De(this._container),Pt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Xi.prototype._update.call(this);var l=this._bounds,d=l.getSize(),m=this._container;(!this._svgSize||!this._svgSize.equals(d))&&(this._svgSize=d,m.setAttribute("width",d.x),m.setAttribute("height",d.y)),gn(m,l.min),m.setAttribute("viewBox",[l.min.x,l.min.y,d.x,d.y].join(" ")),this.fire("update")}},_initPath:function(l){var d=l._path=Ip("path");l.options.className&&He(d,l.options.className),l.options.interactive&&He(d,"leaflet-interactive"),this._updateStyle(l),this._layers[c(l)]=l},_addPath:function(l){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(l._path),l.addInteractiveTarget(l._path)},_removePath:function(l){De(l._path),l.removeInteractiveTarget(l._path),delete this._layers[c(l)]},_updatePath:function(l){l._project(),l._update()},_updateStyle:function(l){var d=l._path,m=l.options;d&&(m.stroke?(d.setAttribute("stroke",m.color),d.setAttribute("stroke-opacity",m.opacity),d.setAttribute("stroke-width",m.weight),d.setAttribute("stroke-linecap",m.lineCap),d.setAttribute("stroke-linejoin",m.lineJoin),m.dashArray?d.setAttribute("stroke-dasharray",m.dashArray):d.removeAttribute("stroke-dasharray"),m.dashOffset?d.setAttribute("stroke-dashoffset",m.dashOffset):d.removeAttribute("stroke-dashoffset")):d.setAttribute("stroke","none"),m.fill?(d.setAttribute("fill",m.fillColor||m.color),d.setAttribute("fill-opacity",m.fillOpacity),d.setAttribute("fill-rule",m.fillRule||"evenodd")):d.setAttribute("fill","none"))},_updatePoly:function(l,d){this._setPath(l,rn(l._parts,d))},_updateCircle:function(l){var d=l._point,m=Math.max(Math.round(l._radius),1),w=Math.max(Math.round(l._radiusY),1)||m,C="a"+m+","+w+" 0 1,0 ",M=l._empty()?"M0 0":"M"+(d.x-m)+","+d.y+C+m*2+",0 "+C+-m*2+",0 ";this._setPath(l,M)},_setPath:function(l,d){l._path.setAttribute("d",d)},_bringToFront:function(l){Wr(l._path)},_bringToBack:function(l){Ur(l._path)}});ve.vml&&Gu.include(iV);function F2(l){return ve.svg||ve.vml?new Gu(l):null}it.include({getRenderer:function(l){var d=l.options.renderer||this._getPaneRenderer(l.options.pane)||this.options.renderer||this._renderer;return d||(d=this._renderer=this._createRenderer()),this.hasLayer(d)||this.addLayer(d),d},_getPaneRenderer:function(l){if(l==="overlayPane"||l===void 0)return!1;var d=this._paneRenderers[l];return d===void 0&&(d=this._createRenderer({pane:l}),this._paneRenderers[l]=d),d},_createRenderer:function(l){return this.options.preferCanvas&&B2(l)||F2(l)}});var V2=tc.extend({initialize:function(l,d){tc.prototype.initialize.call(this,this._boundsToLatLngs(l),d)},setBounds:function(l){return this.setLatLngs(this._boundsToLatLngs(l))},_boundsToLatLngs:function(l){return l=Pe(l),[l.getSouthWest(),l.getNorthWest(),l.getNorthEast(),l.getSouthEast()]}});function sV(l,d){return new V2(l,d)}Gu.create=Ip,Gu.pointsToPath=rn,Ji.geometryToLayer=Pp,Ji.coordsToLatLng=H1,Ji.coordsToLatLngs=Cp,Ji.latLngToCoords=W1,Ji.latLngsToCoords=Op,Ji.getFeature=nc,Ji.asFeature=Ep,it.mergeOptions({boxZoom:!0});var H2=mi.extend({initialize:function(l){this._map=l,this._container=l._container,this._pane=l._panes.overlayPane,this._resetStateTimeout=0,l.on("unload",this._destroy,this)},addHooks:function(){je(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Pt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){De(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(l){if(!l.shiftKey||l.which!==1&&l.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),ju(),O1(),this._startPoint=this._map.mouseEventToContainerPoint(l),je(document,{contextmenu:Ka,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(l){this._moved||(this._moved=!0,this._box=Le("div","leaflet-zoom-box",this._container),He(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(l);var d=new ee(this._point,this._startPoint),m=d.getSize();gn(this._box,d.min),this._box.style.width=m.x+"px",this._box.style.height=m.y+"px"},_finish:function(){this._moved&&(De(this._box),un(this._container,"leaflet-crosshair")),Bu(),E1(),Pt(document,{contextmenu:Ka,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(l){if(!(l.which!==1&&l.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(s(this._resetState,this),0);var d=new he(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(d).fire("boxzoomend",{boxZoomBounds:d})}},_onKeyDown:function(l){l.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});it.addInitHook("addHandler","boxZoom",H2),it.mergeOptions({doubleClickZoom:!0});var W2=mi.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(l){var d=this._map,m=d.getZoom(),w=d.options.zoomDelta,C=l.originalEvent.shiftKey?m-w:m+w;d.options.doubleClickZoom==="center"?d.setZoom(C):d.setZoomAround(l.containerPoint,C)}});it.addInitHook("addHandler","doubleClickZoom",W2),it.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var U2=mi.extend({addHooks:function(){if(!this._draggable){var l=this._map;this._draggable=new Es(l._mapPane,l._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),l.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),l.on("zoomend",this._onZoomEnd,this),l.whenReady(this._onZoomEnd,this))}He(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){un(this._map._container,"leaflet-grab"),un(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var l=this._map;if(l._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var d=Pe(this._map.options.maxBounds);this._offsetLimit=re(this._map.latLngToContainerPoint(d.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(d.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;l.fire("movestart").fire("dragstart"),l.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(l){if(this._map.options.inertia){var d=this._lastTime=+new Date,m=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(m),this._times.push(d),this._prunePositions(d)}this._map.fire("move",l).fire("drag",l)},_prunePositions:function(l){for(;this._positions.length>1&&l-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var l=this._map.getSize().divideBy(2),d=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=d.subtract(l).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(l,d){return l-(l-d)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var l=this._draggable._newPos.subtract(this._draggable._startPos),d=this._offsetLimit;l.xd.max.x&&(l.x=this._viscousLimit(l.x,d.max.x)),l.y>d.max.y&&(l.y=this._viscousLimit(l.y,d.max.y)),this._draggable._newPos=this._draggable._startPos.add(l)}},_onPreDragWrap:function(){var l=this._worldWidth,d=Math.round(l/2),m=this._initialWorldOffset,w=this._draggable._newPos.x,C=(w-d+m)%l+d-m,M=(w+d+m)%l-d-m,j=Math.abs(C+m)0?M:-M))-d;this._delta=0,this._startTime=null,j&&(l.options.scrollWheelZoom==="center"?l.setZoom(d+j):l.setZoomAround(this._lastMousePos,d+j))}});it.addInitHook("addHandler","scrollWheelZoom",K2);var aV=600;it.mergeOptions({tapHold:ve.touchNative&&ve.safari&&ve.mobile,tapTolerance:15});var G2=mi.extend({addHooks:function(){je(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Pt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(l){if(clearTimeout(this._holdTimeout),l.touches.length===1){var d=l.touches[0];this._startPos=this._newPos=new A(d.clientX,d.clientY),this._holdTimeout=setTimeout(s(function(){this._cancel(),this._isTapValid()&&(je(document,"touchend",qn),je(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",d))},this),aV),je(document,"touchend touchcancel contextmenu",this._cancel,this),je(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function l(){Pt(document,"touchend",qn),Pt(document,"touchend touchcancel",l)},_cancel:function(){clearTimeout(this._holdTimeout),Pt(document,"touchend touchcancel contextmenu",this._cancel,this),Pt(document,"touchmove",this._onMove,this)},_onMove:function(l){var d=l.touches[0];this._newPos=new A(d.clientX,d.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(l,d){var m=new MouseEvent(l,{bubbles:!0,cancelable:!0,view:window,screenX:d.screenX,screenY:d.screenY,clientX:d.clientX,clientY:d.clientY});m._simulated=!0,d.target.dispatchEvent(m)}});it.addInitHook("addHandler","tapHold",G2),it.mergeOptions({touchZoom:ve.touch,bounceAtZoomLimits:!0});var q2=mi.extend({addHooks:function(){He(this._map._container,"leaflet-touch-zoom"),je(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){un(this._map._container,"leaflet-touch-zoom"),Pt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(l){var d=this._map;if(!(!l.touches||l.touches.length!==2||d._animatingZoom||this._zooming)){var m=d.mouseEventToContainerPoint(l.touches[0]),w=d.mouseEventToContainerPoint(l.touches[1]);this._centerPoint=d.getSize()._divideBy(2),this._startLatLng=d.containerPointToLatLng(this._centerPoint),d.options.touchZoom!=="center"&&(this._pinchStartLatLng=d.containerPointToLatLng(m.add(w)._divideBy(2))),this._startDist=m.distanceTo(w),this._startZoom=d.getZoom(),this._moved=!1,this._zooming=!0,d._stop(),je(document,"touchmove",this._onTouchMove,this),je(document,"touchend touchcancel",this._onTouchEnd,this),qn(l)}},_onTouchMove:function(l){if(!(!l.touches||l.touches.length!==2||!this._zooming)){var d=this._map,m=d.mouseEventToContainerPoint(l.touches[0]),w=d.mouseEventToContainerPoint(l.touches[1]),C=m.distanceTo(w)/this._startDist;if(this._zoom=d.getScaleZoom(C,this._startZoom),!d.options.bounceAtZoomLimits&&(this._zoomd.getMaxZoom()&&C>1)&&(this._zoom=d._limitZoom(this._zoom)),d.options.touchZoom==="center"){if(this._center=this._startLatLng,C===1)return}else{var M=m._add(w)._divideBy(2)._subtract(this._centerPoint);if(C===1&&M.x===0&&M.y===0)return;this._center=d.unproject(d.project(this._pinchStartLatLng,this._zoom).subtract(M),this._zoom)}this._moved||(d._moveStart(!0,!1),this._moved=!0),K(this._animRequest);var j=s(d._move,d,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=D(j,this,!0),qn(l)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,K(this._animRequest),Pt(document,"touchmove",this._onTouchMove,this),Pt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});it.addInitHook("addHandler","touchZoom",q2),it.BoxZoom=H2,it.DoubleClickZoom=W2,it.Drag=U2,it.Keyboard=Z2,it.ScrollWheelZoom=K2,it.TapHold=G2,it.TouchZoom=q2,n.Bounds=ee,n.Browser=ve,n.CRS=fe,n.Canvas=j2,n.Circle=V1,n.CircleMarker=kp,n.Class=V,n.Control=Ho,n.DivIcon=z2,n.DivOverlay=gi,n.DomEvent=PF,n.DomUtil=xF,n.Draggable=Es,n.Evented=G,n.FeatureGroup=qi,n.GeoJSON=Ji,n.GridLayer=Zu,n.Handler=mi,n.Icon=ec,n.ImageOverlay=$p,n.LatLng=X,n.LatLngBounds=he,n.Layer=Wo,n.LayerGroup=Ql,n.LineUtil=AF,n.Map=it,n.Marker=xp,n.Mixin=IF,n.Path=$s,n.Point=A,n.PolyUtil=DF,n.Polygon=tc,n.Polyline=Yi,n.Popup=Mp,n.PosAnimation=y2,n.Projection=jF,n.Rectangle=V2,n.Renderer=Xi,n.SVG=Gu,n.SVGOverlay=L2,n.TileLayer=rc,n.Tooltip=Tp,n.Transformation=ut,n.Util=W,n.VideoOverlay=R2,n.bind=s,n.bounds=re,n.canvas=B2,n.circle=KF,n.circleMarker=ZF,n.control=Hu,n.divIcon=nV,n.extend=o,n.featureGroup=HF,n.geoJSON=N2,n.geoJson=YF,n.gridLayer=rV,n.icon=WF,n.imageOverlay=JF,n.latLng=ne,n.latLngBounds=Pe,n.layerGroup=VF,n.map=CF,n.marker=UF,n.point=H,n.polygon=qF,n.polyline=GF,n.popup=eV,n.rectangle=sV,n.setOptions=_,n.stamp=c,n.svg=F2,n.svgOverlay=QF,n.tileLayer=A2,n.tooltip=tV,n.transformation=Fe,n.version=r,n.videoOverlay=XF;var lV=window.L;n.noConflict=function(){return window.L=lV,this},window.L=n})})(MSe,ii);const zc=ii;function DP(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function KB(e,t){return t==null?function(r,o){const i=v.useRef();return i.current||(i.current=e(r,o)),i}:function(r,o){const i=v.useRef();i.current||(i.current=e(r,o));const s=v.useRef(r),{instance:a}=i.current;return v.useEffect(function(){s.current!==r&&(t(a,r,s.current),s.current=r)},[a,r,o]),i}}function TSe(e,t){v.useEffect(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){t.layerContainer?.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function ISe(e){return function(n){const r=AP(),o=e(ZB(n,r),r);return FB(r.map,n.attribution),UB(o.current,n.eventHandlers),TSe(o.current,r),o}}function GB(e,t){const n=KB(e,t),r=ISe(n);return OSe(r)}function NSe(e,t){const n=KB(e),r=$Se(n,t);return ESe(r)}function RSe(e,t,n){t.bounds instanceof ii.LatLngBounds&&t.bounds!==n.bounds&&e.setBounds(t.bounds),t.opacity!=null&&t.opacity!==n.opacity&&e.setOpacity(t.opacity),t.zIndex!=null&&t.zIndex!==n.zIndex&&e.setZIndex(t.zIndex)}function LSe(){return AP().map}const zSe=GB(function({bounds:t,url:n,...r},o){const i=new ii.ImageOverlay(n,t,r);return DP(i,VB(o,{overlayContainer:i}))},function(t,n,r){if(RSe(t,n,r),n.bounds!==r.bounds){const o=n.bounds instanceof ii.LatLngBounds?n.bounds:new ii.LatLngBounds(n.bounds);t.setBounds(o)}n.url!==r.url&&t.setUrl(n.url)});function KS(){return KS=Object.assign||function(e){for(var t=1;tg?.map??null,[g]);const _=v.useCallback(b=>{if(b!==null&&g===null){const S=new ii.Map(b,f);n!=null&&u!=null?S.setView(n,u):e!=null&&S.fitBounds(e,t),c!=null&&S.whenReady(c),y(CSe(S))}},[]);v.useEffect(()=>()=>{g?.map.remove()},[g]);const k=g?O.createElement(WB,{value:g},r):s??null;return O.createElement("div",KS({},h,{ref:_}),k)}const DSe=v.forwardRef(ASe),jSe=GB(function({position:t,...n},r){const o=new ii.Marker(t,n);return DP(o,VB(r,{overlayContainer:o}))},function(t,n,r){n.position!==r.position&&t.setLatLng(n.position),n.icon!=null&&n.icon!==r.icon&&t.setIcon(n.icon),n.zIndexOffset!=null&&n.zIndexOffset!==r.zIndexOffset&&t.setZIndexOffset(n.zIndexOffset),n.opacity!=null&&n.opacity!==r.opacity&&t.setOpacity(n.opacity),t.dragging!=null&&n.draggable!==r.draggable&&(n.draggable===!0?t.dragging.enable():t.dragging.disable())}),BSe=NSe(function(t,n){const r=new ii.Popup(t,n.overlayContainer);return DP(r,n)},function(t,n,{position:r},o){v.useEffect(function(){const{instance:s}=t;function a(u){u.popup===s&&(s.update(),o(!0))}function c(u){u.popup===s&&o(!1)}return n.map.on({popupopen:a,popupclose:c}),n.overlayContainer==null?(r!=null&&s.setLatLng(r),s.openOn(n.map)):n.overlayContainer.bindPopup(s),function(){n.map.off({popupopen:a,popupclose:c}),n.overlayContainer?.unbindPopup(),n.map.removeLayer(s)}},[t,n,o,r])});var Nu={};/** + * @license React + * react-dom-server-legacy.browser.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var qB=v;function Be(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n