diff --git a/client/framework/qb_core.lua b/client/framework/qb_core.lua index f582e15..1dcc9a3 100644 --- a/client/framework/qb_core.lua +++ b/client/framework/qb_core.lua @@ -13,6 +13,7 @@ function qb.getOfficerData() officer.firstname = playerData.charinfo.firstname officer.lastname = playerData.charinfo.lastname officer.role = playerData.job.grade.name + officer.grade = playerData.job.grade.level return officer end diff --git a/client/framework/qbx_core.lua b/client/framework/qbx_core.lua index 95903c1..47d782a 100644 --- a/client/framework/qbx_core.lua +++ b/client/framework/qbx_core.lua @@ -13,6 +13,7 @@ function qb.getOfficerData() officer.firstname = playerData.charinfo.firstname officer.lastname = playerData.charinfo.lastname officer.role = playerData.job.grade.name + officer.grade = playerData.job.grade.level return officer end diff --git a/permissions.json b/permissions.json new file mode 100644 index 0000000..8ff9af7 --- /dev/null +++ b/permissions.json @@ -0,0 +1,10 @@ +{ + "create_announcement": 4, + "create_charge": 4, + "delete_charge": 4, + "edit_charge": 4, + "hire_officer": 4, + "set_officer_rank": 4, + "set_officer_roles": 4, + "fire_officer": 4 +} diff --git a/web/build/assets/index-3d12f69b.js b/web/build/assets/index-0518d1ff.js similarity index 71% rename from web/build/assets/index-3d12f69b.js rename to web/build/assets/index-0518d1ff.js index 2388f65..248a115 100644 --- a/web/build/assets/index-3d12f69b.js +++ b/web/build/assets/index-0518d1ff.js @@ -1,4 +1,4 @@ -function jH(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 qx=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ea(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function LH(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var q5={exports:{}},Ky={},J5={exports:{}},Xe={};/** +function jH(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 Kx=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ea(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function LH(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var qj={exports:{}},Yy={},Jj={exports:{}},Xe={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ function jH(e,t){for(var n=0;n"u")return _W;var t=wW(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])}},xW=c3(),SW=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),` + */var JH=_,XH=Symbol.for("react.element"),QH=Symbol.for("react.fragment"),eW=Object.prototype.hasOwnProperty,tW=JH.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,nW={key:!0,ref:!0,__self:!0,__source:!0};function i3(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)eW.call(t,r)&&!nW.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:XH,type:e,key:i,ref:s,props:o,_owner:tW.current}}Yy.Fragment=QH;Yy.jsx=i3;Yy.jsxs=i3;qj.exports=Yy;var h=qj.exports,Si=function(){return Si=Object.assign||function(t){for(var n,r=1,o=arguments.length;r"u")return _W;var t=wW(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])}},xW=c3(),SW=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(oW,` { overflow: hidden `).concat(r,`; padding-right: `).concat(a,"px ").concat(r,`; @@ -32,36 +32,36 @@ function jH(e,t){for(var n=0;na)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},EW=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},$W=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},d3=function(e,t){return e==="v"?CW(t):kW(t)},f3=function(e,t){return e==="v"?EW(t):$W(t)},MW=function(e,t){return e==="h"&&t==="rtl"?-1:1},NW=function(e,t,n,r,o){var i=MW(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,c=t.contains(a),u=!1,f=s>0,p=0,g=0;do{var v=f3(e,a),y=v[0],w=v[1],P=v[2],x=w-P-i*y;(y||x)&&d3(e,a)&&(p+=x,g+=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&&g===0||!o&&-s>g))&&(u=!0),u},bp=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},VC=function(e){return[e.deltaX,e.deltaY]},HC=function(e){return e&&"current"in e?e.current:e},TW=function(e,t){return e[0]===t[0]&&e[1]===t[1]},IW=function(e){return` +`)},PW=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=_.useMemo(function(){return bW(o)},[o]);return _.createElement(xW,{styles:SW(i,!t,o,n?"":"!important")})},Uw=!1;if(typeof window<"u")try{var _p=Object.defineProperty({},"passive",{get:function(){return Uw=!0,!0}});window.addEventListener("test",_p,_p),window.removeEventListener("test",_p,_p)}catch{Uw=!1}var nc=Uw?{passive:!1}:!1,OW=function(e){return e.tagName==="TEXTAREA"},u3=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!OW(e)&&n[t]==="visible")},CW=function(e){return u3(e,"overflowY")},kW=function(e){return u3(e,"overflowX")},FC=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=d3(e,r);if(o){var i=f3(e,r),s=i[1],a=i[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},EW=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},$W=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},d3=function(e,t){return e==="v"?CW(t):kW(t)},f3=function(e,t){return e==="v"?EW(t):$W(t)},MW=function(e,t){return e==="h"&&t==="rtl"?-1:1},NW=function(e,t,n,r,o){var i=MW(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,c=t.contains(a),u=!1,f=s>0,p=0,g=0;do{var v=f3(e,a),y=v[0],w=v[1],P=v[2],x=w-P-i*y;(y||x)&&d3(e,a)&&(p+=x,g+=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&&g===0||!o&&-s>g))&&(u=!0),u},wp=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},VC=function(e){return[e.deltaX,e.deltaY]},HC=function(e){return e&&"current"in e?e.current:e},TW=function(e,t){return e[0]===t[0]&&e[1]===t[1]},IW=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},jW=0,rc=[];function LW(e){var t=_.useRef([]),n=_.useRef([0,0]),r=_.useRef(),o=_.useState(jW++)[0],i=_.useState(c3)[0],s=_.useRef(e);_.useEffect(function(){s.current=e},[e]),_.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var w=rW([e.lockRef.current],(e.shards||[]).map(HC),!0).filter(Boolean);return w.forEach(function(P){return P.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),w.forEach(function(P){return P.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=_.useCallback(function(w,P){if("touches"in w&&w.touches.length===2)return!s.current.allowPinchZoom;var x=bp(w),S=n.current,O="deltaX"in w?w.deltaX:S[0]-x[0],E="deltaY"in w?w.deltaY:S[1]-x[1],$,N=w.target,I=Math.abs(O)>Math.abs(E)?"h":"v";if("touches"in w&&I==="h"&&N.type==="range")return!1;var R=FC(I,N);if(!R)return!0;if(R?$=I:($=I==="v"?"h":"v",R=FC(I,N)),!R)return!1;if(!r.current&&"changedTouches"in w&&(O||E)&&(r.current=$),!$)return!0;var B=r.current||$;return NW(B,P,w,B==="h"?O:E,!0)},[]),c=_.useCallback(function(w){var P=w;if(!(!rc.length||rc[rc.length-1]!==i)){var x="deltaY"in P?VC(P):bp(P),S=t.current.filter(function($){return $.name===P.type&&$.target===P.target&&TW($.delta,x)})[0];if(S&&S.should){P.cancelable&&P.preventDefault();return}if(!S){var O=(s.current.shards||[]).map(HC).filter(Boolean).filter(function($){return $.contains(P.target)}),E=O.length>0?a(P,O[0]):!s.current.noIsolation;E&&P.cancelable&&P.preventDefault()}}},[]),u=_.useCallback(function(w,P,x,S){var O={name:w,delta:P,target:x,should:S};t.current.push(O),setTimeout(function(){t.current=t.current.filter(function(E){return E!==O})},1)},[]),f=_.useCallback(function(w){n.current=bp(w),r.current=void 0},[]),p=_.useCallback(function(w){u(w.type,VC(w),w.target,a(w,e.lockRef.current))},[]),g=_.useCallback(function(w){u(w.type,bp(w),w.target,a(w,e.lockRef.current))},[]);_.useEffect(function(){return rc.push(i),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",c,nc),document.addEventListener("touchmove",c,nc),document.addEventListener("touchstart",f,nc),function(){rc=rc.filter(function(w){return w!==i}),document.removeEventListener("wheel",c,nc),document.removeEventListener("touchmove",c,nc),document.removeEventListener("touchstart",f,nc)}},[]);var v=e.removeScrollBar,y=e.inert;return _.createElement(_.Fragment,null,y?_.createElement(i,{styles:IW(o)}):null,v?_.createElement(PW,{gapMode:e.gapMode}):null)}const DW=fW(l3,LW);var p3=_.forwardRef(function(e,t){return _.createElement(qy,Pi({},e,{ref:t,sideCar:DW}))});p3.classNames=qy.classNames;const RW=p3;function pm(e,t){let n=e;for(;(n=n.parentElement)&&!n.matches(t););return n}function zW(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 AW(e,t,n){for(let r=e+1;r{var c;n?.(a);const u=Array.from(((c=pm(a.currentTarget,e))==null?void 0:c.querySelectorAll(t))||[]).filter(w=>BW(a.currentTarget,w,e)),f=u.findIndex(w=>a.currentTarget===w),p=AW(f,u,r),g=zW(f,u,r),v=i==="rtl"?g:p,y=i==="rtl"?p:g;switch(a.key){case"ArrowRight":{s==="horizontal"&&(a.stopPropagation(),a.preventDefault(),u[v].focus(),o&&u[v].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[g].focus(),o&&u[g].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 w=u.length-1;!u[w].disabled&&u[w].focus();break}}}}function VW(e,t,n){var r;return n?Array.from(((r=pm(n,t))==null?void 0:r.querySelectorAll(e))||[]).findIndex(o=>o===n):null}function bu(e){const t=_.createContext(null);return[({children:o,value:i})=>k.createElement(t.Provider,{value:i},o),()=>{const o=_.useContext(t);if(o===null)throw new Error(e);return o}]}function tS(e){return Array.isArray(e)?e:[e]}const HW=()=>{};function WW(e,t={active:!0}){return typeof e!="function"||!t.active?t.onKeyDown||HW:n=>{var r;n.key==="Escape"&&(e(n),(r=t.onTrigger)==null||r.call(t))}}function is(e,t){return n=>{e?.(n),t?.(n)}}function UW(e){return Object.keys(e)}function ZW(){const[e,t]=_.useState(-1);return[e,{setHovered:t,resetHovered:()=>t(-1)}]}function h3({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 GW(e,t){window.dispatchEvent(new CustomEvent(e,{detail:t}))}const YW=typeof window<"u"?_.useLayoutEffect:_.useEffect;function KW(e){function t(r){const o=Object.keys(r).reduce((i,s)=>(i[`${e}:${s}`]=a=>r[s](a.detail),i),{});YW(()=>(Object.keys(o).forEach(i=>{window.removeEventListener(i,o[i]),window.addEventListener(i,o[i])}),()=>Object.keys(o).forEach(i=>{window.removeEventListener(i,o[i])})),[o])}function n(r){return(...o)=>GW(`${e}:${String(r)}`,o[0])}return[t,n]}function Nf(e){return Array.isArray(e)||e===null?!1:typeof e=="object"?e.type!==k.Fragment:!1}function m3(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 QW=Object.defineProperty,WC=Object.getOwnPropertySymbols,eU=Object.prototype.hasOwnProperty,tU=Object.prototype.propertyIsEnumerable,UC=(e,t,n)=>t in e?QW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ZC=(e,t)=>{for(var n in t||(t={}))eU.call(t,n)&&UC(e,n,t[n]);if(WC)for(var n of WC(t))tU.call(t,n)&&UC(e,n,t[n]);return e};function nU(e){return t=>({WebkitTapHighlightColor:"transparent",[t||"&:focus"]:ZC({},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)"]:ZC({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)})}function Tf(e){return t=>typeof e.primaryShade=="number"?e.primaryShade:e.primaryShade[t||e.colorScheme]}function rS(e){const t=Tf(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 g3(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 y3(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 M=y3("rem"),ba=y3("em");function re({size:e,sizes:t,units:n}){return e in t?t[e]:typeof e=="number"?n==="em"?ba(e):M(e):e||t.md}function Ro(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 iU(e){return t=>`@media (min-width: ${ba(Ro(re({size:t,sizes:e.breakpoints})))})`}function sU(e){return t=>`@media (max-width: ${ba(Ro(re({size:t,sizes:e.breakpoints}))-1)})`}function aU(e){return/^#?([0-9A-F]{3}){1,2}$/i.test(e)}function lU(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 cU(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 oS(e){return aU(e)?lU(e):e.startsWith("rgb")?cU(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}=oS(e);return`rgba(${n}, ${r}, ${o}, ${t})`}function uU(e=0){return{position:"absolute",top:M(e),right:M(e),left:M(e),bottom:M(e)}}function dU(e,t){if(typeof e=="string"&&e.startsWith("var(--"))return e;const{r:n,g:r,b:o,a:i}=oS(e),s=1-t,a=c=>Math.round(c*s);return`rgba(${a(n)}, ${a(r)}, ${a(o)}, ${i})`}function fU(e,t){if(typeof e=="string"&&e.startsWith("var(--"))return e;const{r:n,g:r,b:o,a:i}=oS(e),s=a=>Math.round(a+(255-a)*t);return`rgba(${s(n)}, ${s(r)}, ${s(o)}, ${i})`}function pU(e){return t=>{if(typeof t=="number")return M(t);const n=typeof e.defaultRadius=="number"?e.defaultRadius:e.radius[e.defaultRadius]||e.defaultRadius;return e.radius[t]||t||n}}function hU(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 mU(e){const t=rS(e),n=Tf(e),r=v3(e);return({variant:o,color:i,gradient:s,primaryFallback:a})=>{const c=hU(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 gU(e){return t=>{const n=Tf(e)(t);return e.colors[e.primaryColor][n]}}function vU(e){return{"@media (hover: hover)":{"&:hover":e},"@media (hover: none)":{"&:active":e}}}function yU(e){return()=>({userSelect:"none",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]})}function _U(e){return()=>e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]}const hn={fontStyles:XW,themeColor:rS,focusStyles:nU,linearGradient:rU,radialGradient:oU,smallerThan:sU,largerThan:iU,rgba:pc,cover:uU,darken:dU,lighten:fU,radius:pU,variant:mU,primaryShade:Tf,hover:vU,gradient:v3,primaryColor:gU,placeholderStyles:yU,dimmed:_U};var wU=Object.defineProperty,bU=Object.defineProperties,xU=Object.getOwnPropertyDescriptors,GC=Object.getOwnPropertySymbols,SU=Object.prototype.hasOwnProperty,PU=Object.prototype.propertyIsEnumerable,YC=(e,t,n)=>t in e?wU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,OU=(e,t)=>{for(var n in t||(t={}))SU.call(t,n)&&YC(e,n,t[n]);if(GC)for(var n of GC(t))PU.call(t,n)&&YC(e,n,t[n]);return e},CU=(e,t)=>bU(e,xU(t));function _3(e){return CU(OU({},e),{fn:{fontStyles:hn.fontStyles(e),themeColor:hn.themeColor(e),focusStyles:hn.focusStyles(e),largerThan:hn.largerThan(e),smallerThan:hn.smallerThan(e),radialGradient:hn.radialGradient,linearGradient:hn.linearGradient,gradient:hn.gradient(e),rgba:hn.rgba,cover:hn.cover,lighten:hn.lighten,darken:hn.darken,primaryShade:hn.primaryShade(e),radius:hn.radius(e),variant:hn.variant(e),hover:hn.hover,primaryColor:hn.primaryColor(e),placeholderStyles:hn.placeholderStyles(e),dimmed:hn.dimmed(e)}})}const kU={dir:"ltr",primaryShade:{light:6,dark:8},focusRing:"auto",loader:"oval",colorScheme:"light",white:"#fff",black:"#000",defaultRadius:"sm",transitionTimingFunction:"ease",colors:JW,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]})}},Jy=_3(kU);function EU(e){if(e.sheet)return e.sheet;for(var t=0;t0?Rn(xu,--Wr):0,Jc--,cn===10&&(Jc=1,Qy--),cn}function fo(){return cn=Wr2||Yd(cn)>3?"":" "}function FU(e,t){for(;--t&&fo()&&!(cn<48||cn>102||cn>57&&cn<65||cn>70&&cn<97););return If(e,Mh()+(t<6&&Ni()==32&&fo()==32))}function Yw(e){for(;fo();)switch(cn){case e:return Wr;case 34:case 39:e!==34&&e!==39&&Yw(cn);break;case 40:e===41&&Yw(e);break;case 92:fo();break}return Wr}function VU(e,t){for(;fo()&&e+cn!==47+10;)if(e+cn===42+42&&Ni()===47)break;return"/*"+If(t,Wr-1)+"*"+Xy(e===47?e:fo())}function HU(e){for(;!Yd(Ni());)fo();return If(e,Wr)}function WU(e){return O3(Th("",null,null,null,[""],e=P3(e),0,[0],e))}function Th(e,t,n,r,o,i,s,a,c){for(var u=0,f=0,p=s,g=0,v=0,y=0,w=1,P=1,x=1,S=0,O="",E=o,$=i,N=r,I=O;P;)switch(y=S,S=fo()){case 40:if(y!=108&&Rn(I,p-1)==58){Gw(I+=ft(Nh(S),"&","&\f"),"&\f")!=-1&&(x=-1);break}case 34:case 39:case 91:I+=Nh(S);break;case 9:case 10:case 13:case 32:I+=BU(y);break;case 92:I+=FU(Mh()-1,7);continue;case 47:switch(Ni()){case 42:case 47:xp(UU(VU(fo(),Mh()),t,n),c);break;default:I+="/"}break;case 123*w:a[u++]=xi(I)*x;case 125*w:case 59:case 0:switch(S){case 0:case 125:P=0;case 59+f:x==-1&&(I=ft(I,/\f/g,"")),v>0&&xi(I)-p&&xp(v>32?qC(I+";",r,n,p-1):qC(ft(I," ","")+";",r,n,p-2),c);break;case 59:I+=";";default:if(xp(N=KC(I,t,n,u,f,o,a,O,E=[],$=[],p),i),S===123)if(f===0)Th(I,t,N,N,E,i,p,a,$);else switch(g===99&&Rn(I,3)===110?100:g){case 100:case 108:case 109:case 115:Th(e,N,N,r&&xp(KC(e,N,N,0,0,o,a,O,o,E=[],p),$),o,$,p,a,r?E:$);break;default:Th(I,N,N,N,[""],$,0,a,$)}}u=f=v=0,w=x=1,O=I="",p=s;break;case 58:p=1+xi(I),v=y;default:if(w<1){if(S==123)--w;else if(S==125&&w++==0&&AU()==125)continue}switch(I+=Xy(S),S*w){case 38:x=f>0?1:(I+="\f",-1);break;case 44:a[u++]=(xi(I)-1)*x,x=1;break;case 64:Ni()===45&&(I+=Nh(fo())),g=Ni(),f=p=xi(O=I+=HU(Mh())),S++;break;case 45:y===45&&xi(I)==2&&(w=0)}}return i}function KC(e,t,n,r,o,i,s,a,c,u,f){for(var p=o-1,g=o===0?i:[""],v=aS(g),y=0,w=0,P=0;y0?g[x]+" "+S:ft(S,/&\f/g,g[x])))&&(c[P++]=O);return e0(e,t,n,o===0?iS:a,c,u,f)}function UU(e,t,n){return e0(e,t,n,w3,Xy(zU()),Gd(e,2,-2),0)}function qC(e,t,n,r){return e0(e,t,n,sS,Gd(e,0,r),Gd(e,r+1,-1),r)}function Rc(e,t){for(var n="",r=aS(e),o=0;o6)switch(Rn(e,t+1)){case 109:if(Rn(e,t+4)!==45)break;case 102:return ft(e,/(.+:)(.+)-([^]+)/,"$1"+dt+"$2-$3$1"+hm+(Rn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Gw(e,"stretch")?C3(ft(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Rn(e,t+1)!==115)break;case 6444:switch(Rn(e,xi(e)-3-(~Gw(e,"!important")&&10))){case 107:return ft(e,":",":"+dt)+e;case 101:return ft(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+dt+(Rn(e,14)===45?"inline-":"")+"box$3$1"+dt+"$2$3$1"+Xn+"$2box$3")+e}break;case 5936:switch(Rn(e,t+11)){case 114:return dt+e+Xn+ft(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return dt+e+Xn+ft(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return dt+e+Xn+ft(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return dt+e+Xn+e+e}return e}var tZ=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case sS:t.return=C3(t.value,t.length);break;case b3:return Rc([Zu(t,{value:ft(t.value,"@","@"+dt)})],o);case iS:if(t.length)return RU(t.props,function(i){switch(DU(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Rc([Zu(t,{props:[ft(i,/:(read-\w+)/,":"+hm+"$1")]})],o);case"::placeholder":return Rc([Zu(t,{props:[ft(i,/:(plac\w+)/,":"+dt+"input-$1")]}),Zu(t,{props:[ft(i,/:(plac\w+)/,":"+hm+"$1")]}),Zu(t,{props:[ft(i,/:(plac\w+)/,Xn+"input-$1")]})],o)}return""})}},nZ=[tZ],k3=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(w){var P=w.getAttribute("data-emotion");P.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var o=t.stylisPlugins||nZ,i={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var P=w.getAttribute("data-emotion").split(" "),x=1;xMath.abs(E)?"h":"v";if("touches"in w&&I==="h"&&N.type==="range")return!1;var R=FC(I,N);if(!R)return!0;if(R?$=I:($=I==="v"?"h":"v",R=FC(I,N)),!R)return!1;if(!r.current&&"changedTouches"in w&&(O||E)&&(r.current=$),!$)return!0;var B=r.current||$;return NW(B,P,w,B==="h"?O:E,!0)},[]),c=_.useCallback(function(w){var P=w;if(!(!rc.length||rc[rc.length-1]!==i)){var x="deltaY"in P?VC(P):wp(P),S=t.current.filter(function($){return $.name===P.type&&$.target===P.target&&TW($.delta,x)})[0];if(S&&S.should){P.cancelable&&P.preventDefault();return}if(!S){var O=(s.current.shards||[]).map(HC).filter(Boolean).filter(function($){return $.contains(P.target)}),E=O.length>0?a(P,O[0]):!s.current.noIsolation;E&&P.cancelable&&P.preventDefault()}}},[]),u=_.useCallback(function(w,P,x,S){var O={name:w,delta:P,target:x,should:S};t.current.push(O),setTimeout(function(){t.current=t.current.filter(function(E){return E!==O})},1)},[]),f=_.useCallback(function(w){n.current=wp(w),r.current=void 0},[]),p=_.useCallback(function(w){u(w.type,VC(w),w.target,a(w,e.lockRef.current))},[]),g=_.useCallback(function(w){u(w.type,wp(w),w.target,a(w,e.lockRef.current))},[]);_.useEffect(function(){return rc.push(i),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",c,nc),document.addEventListener("touchmove",c,nc),document.addEventListener("touchstart",f,nc),function(){rc=rc.filter(function(w){return w!==i}),document.removeEventListener("wheel",c,nc),document.removeEventListener("touchmove",c,nc),document.removeEventListener("touchstart",f,nc)}},[]);var v=e.removeScrollBar,y=e.inert;return _.createElement(_.Fragment,null,y?_.createElement(i,{styles:IW(o)}):null,v?_.createElement(PW,{gapMode:e.gapMode}):null)}const DW=fW(l3,LW);var p3=_.forwardRef(function(e,t){return _.createElement(Ky,Si({},e,{ref:t,sideCar:DW}))});p3.classNames=Ky.classNames;const RW=p3;function fm(e,t){let n=e;for(;(n=n.parentElement)&&!n.matches(t););return n}function zW(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 AW(e,t,n){for(let r=e+1;r{var c;n?.(a);const u=Array.from(((c=fm(a.currentTarget,e))==null?void 0:c.querySelectorAll(t))||[]).filter(w=>BW(a.currentTarget,w,e)),f=u.findIndex(w=>a.currentTarget===w),p=AW(f,u,r),g=zW(f,u,r),v=i==="rtl"?g:p,y=i==="rtl"?p:g;switch(a.key){case"ArrowRight":{s==="horizontal"&&(a.stopPropagation(),a.preventDefault(),u[v].focus(),o&&u[v].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[g].focus(),o&&u[g].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 w=u.length-1;!u[w].disabled&&u[w].focus();break}}}}function VW(e,t,n){var r;return n?Array.from(((r=fm(n,t))==null?void 0:r.querySelectorAll(e))||[]).findIndex(o=>o===n):null}function wu(e){const t=_.createContext(null);return[({children:o,value:i})=>k.createElement(t.Provider,{value:i},o),()=>{const o=_.useContext(t);if(o===null)throw new Error(e);return o}]}function eS(e){return Array.isArray(e)?e:[e]}const HW=()=>{};function WW(e,t={active:!0}){return typeof e!="function"||!t.active?t.onKeyDown||HW:n=>{var r;n.key==="Escape"&&(e(n),(r=t.onTrigger)==null||r.call(t))}}function is(e,t){return n=>{e?.(n),t?.(n)}}function UW(e){return Object.keys(e)}function ZW(){const[e,t]=_.useState(-1);return[e,{setHovered:t,resetHovered:()=>t(-1)}]}function h3({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 GW(e,t){window.dispatchEvent(new CustomEvent(e,{detail:t}))}const YW=typeof window<"u"?_.useLayoutEffect:_.useEffect;function KW(e){function t(r){const o=Object.keys(r).reduce((i,s)=>(i[`${e}:${s}`]=a=>r[s](a.detail),i),{});YW(()=>(Object.keys(o).forEach(i=>{window.removeEventListener(i,o[i]),window.addEventListener(i,o[i])}),()=>Object.keys(o).forEach(i=>{window.removeEventListener(i,o[i])})),[o])}function n(r){return(...o)=>GW(`${e}:${String(r)}`,o[0])}return[t,n]}function Mf(e){return Array.isArray(e)||e===null?!1:typeof e=="object"?e.type!==k.Fragment:!1}function m3(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 QW=Object.defineProperty,WC=Object.getOwnPropertySymbols,eU=Object.prototype.hasOwnProperty,tU=Object.prototype.propertyIsEnumerable,UC=(e,t,n)=>t in e?QW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ZC=(e,t)=>{for(var n in t||(t={}))eU.call(t,n)&&UC(e,n,t[n]);if(WC)for(var n of WC(t))tU.call(t,n)&&UC(e,n,t[n]);return e};function nU(e){return t=>({WebkitTapHighlightColor:"transparent",[t||"&:focus"]:ZC({},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)"]:ZC({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)})}function Nf(e){return t=>typeof e.primaryShade=="number"?e.primaryShade:e.primaryShade[t||e.colorScheme]}function nS(e){const t=Nf(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 g3(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 y3(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 M=y3("rem"),ba=y3("em");function re({size:e,sizes:t,units:n}){return e in t?t[e]:typeof e=="number"?n==="em"?ba(e):M(e):e||t.md}function Ro(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 iU(e){return t=>`@media (min-width: ${ba(Ro(re({size:t,sizes:e.breakpoints})))})`}function sU(e){return t=>`@media (max-width: ${ba(Ro(re({size:t,sizes:e.breakpoints}))-1)})`}function aU(e){return/^#?([0-9A-F]{3}){1,2}$/i.test(e)}function lU(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 cU(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 rS(e){return aU(e)?lU(e):e.startsWith("rgb")?cU(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}=rS(e);return`rgba(${n}, ${r}, ${o}, ${t})`}function uU(e=0){return{position:"absolute",top:M(e),right:M(e),left:M(e),bottom:M(e)}}function dU(e,t){if(typeof e=="string"&&e.startsWith("var(--"))return e;const{r:n,g:r,b:o,a:i}=rS(e),s=1-t,a=c=>Math.round(c*s);return`rgba(${a(n)}, ${a(r)}, ${a(o)}, ${i})`}function fU(e,t){if(typeof e=="string"&&e.startsWith("var(--"))return e;const{r:n,g:r,b:o,a:i}=rS(e),s=a=>Math.round(a+(255-a)*t);return`rgba(${s(n)}, ${s(r)}, ${s(o)}, ${i})`}function pU(e){return t=>{if(typeof t=="number")return M(t);const n=typeof e.defaultRadius=="number"?e.defaultRadius:e.radius[e.defaultRadius]||e.defaultRadius;return e.radius[t]||t||n}}function hU(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 mU(e){const t=nS(e),n=Nf(e),r=v3(e);return({variant:o,color:i,gradient:s,primaryFallback:a})=>{const c=hU(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 gU(e){return t=>{const n=Nf(e)(t);return e.colors[e.primaryColor][n]}}function vU(e){return{"@media (hover: hover)":{"&:hover":e},"@media (hover: none)":{"&:active":e}}}function yU(e){return()=>({userSelect:"none",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]})}function _U(e){return()=>e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]}const hn={fontStyles:XW,themeColor:nS,focusStyles:nU,linearGradient:rU,radialGradient:oU,smallerThan:sU,largerThan:iU,rgba:pc,cover:uU,darken:dU,lighten:fU,radius:pU,variant:mU,primaryShade:Nf,hover:vU,gradient:v3,primaryColor:gU,placeholderStyles:yU,dimmed:_U};var wU=Object.defineProperty,bU=Object.defineProperties,xU=Object.getOwnPropertyDescriptors,GC=Object.getOwnPropertySymbols,SU=Object.prototype.hasOwnProperty,PU=Object.prototype.propertyIsEnumerable,YC=(e,t,n)=>t in e?wU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,OU=(e,t)=>{for(var n in t||(t={}))SU.call(t,n)&&YC(e,n,t[n]);if(GC)for(var n of GC(t))PU.call(t,n)&&YC(e,n,t[n]);return e},CU=(e,t)=>bU(e,xU(t));function _3(e){return CU(OU({},e),{fn:{fontStyles:hn.fontStyles(e),themeColor:hn.themeColor(e),focusStyles:hn.focusStyles(e),largerThan:hn.largerThan(e),smallerThan:hn.smallerThan(e),radialGradient:hn.radialGradient,linearGradient:hn.linearGradient,gradient:hn.gradient(e),rgba:hn.rgba,cover:hn.cover,lighten:hn.lighten,darken:hn.darken,primaryShade:hn.primaryShade(e),radius:hn.radius(e),variant:hn.variant(e),hover:hn.hover,primaryColor:hn.primaryColor(e),placeholderStyles:hn.placeholderStyles(e),dimmed:hn.dimmed(e)}})}const kU={dir:"ltr",primaryShade:{light:6,dark:8},focusRing:"auto",loader:"oval",colorScheme:"light",white:"#fff",black:"#000",defaultRadius:"sm",transitionTimingFunction:"ease",colors:JW,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]})}},qy=_3(kU);function EU(e){if(e.sheet)return e.sheet;for(var t=0;t0?Rn(bu,--Wr):0,qc--,cn===10&&(qc=1,Xy--),cn}function fo(){return cn=Wr2||Gd(cn)>3?"":" "}function FU(e,t){for(;--t&&fo()&&!(cn<48||cn>102||cn>57&&cn<65||cn>70&&cn<97););return Tf(e,$h()+(t<6&&Mi()==32&&fo()==32))}function Gw(e){for(;fo();)switch(cn){case e:return Wr;case 34:case 39:e!==34&&e!==39&&Gw(cn);break;case 40:e===41&&Gw(e);break;case 92:fo();break}return Wr}function VU(e,t){for(;fo()&&e+cn!==47+10;)if(e+cn===42+42&&Mi()===47)break;return"/*"+Tf(t,Wr-1)+"*"+Jy(e===47?e:fo())}function HU(e){for(;!Gd(Mi());)fo();return Tf(e,Wr)}function WU(e){return O3(Nh("",null,null,null,[""],e=P3(e),0,[0],e))}function Nh(e,t,n,r,o,i,s,a,c){for(var u=0,f=0,p=s,g=0,v=0,y=0,w=1,P=1,x=1,S=0,O="",E=o,$=i,N=r,I=O;P;)switch(y=S,S=fo()){case 40:if(y!=108&&Rn(I,p-1)==58){Zw(I+=ft(Mh(S),"&","&\f"),"&\f")!=-1&&(x=-1);break}case 34:case 39:case 91:I+=Mh(S);break;case 9:case 10:case 13:case 32:I+=BU(y);break;case 92:I+=FU($h()-1,7);continue;case 47:switch(Mi()){case 42:case 47:bp(UU(VU(fo(),$h()),t,n),c);break;default:I+="/"}break;case 123*w:a[u++]=bi(I)*x;case 125*w:case 59:case 0:switch(S){case 0:case 125:P=0;case 59+f:x==-1&&(I=ft(I,/\f/g,"")),v>0&&bi(I)-p&&bp(v>32?qC(I+";",r,n,p-1):qC(ft(I," ","")+";",r,n,p-2),c);break;case 59:I+=";";default:if(bp(N=KC(I,t,n,u,f,o,a,O,E=[],$=[],p),i),S===123)if(f===0)Nh(I,t,N,N,E,i,p,a,$);else switch(g===99&&Rn(I,3)===110?100:g){case 100:case 108:case 109:case 115:Nh(e,N,N,r&&bp(KC(e,N,N,0,0,o,a,O,o,E=[],p),$),o,$,p,a,r?E:$);break;default:Nh(I,N,N,N,[""],$,0,a,$)}}u=f=v=0,w=x=1,O=I="",p=s;break;case 58:p=1+bi(I),v=y;default:if(w<1){if(S==123)--w;else if(S==125&&w++==0&&AU()==125)continue}switch(I+=Jy(S),S*w){case 38:x=f>0?1:(I+="\f",-1);break;case 44:a[u++]=(bi(I)-1)*x,x=1;break;case 64:Mi()===45&&(I+=Mh(fo())),g=Mi(),f=p=bi(O=I+=HU($h())),S++;break;case 45:y===45&&bi(I)==2&&(w=0)}}return i}function KC(e,t,n,r,o,i,s,a,c,u,f){for(var p=o-1,g=o===0?i:[""],v=sS(g),y=0,w=0,P=0;y0?g[x]+" "+S:ft(S,/&\f/g,g[x])))&&(c[P++]=O);return Qy(e,t,n,o===0?oS:a,c,u,f)}function UU(e,t,n){return Qy(e,t,n,w3,Jy(zU()),Zd(e,2,-2),0)}function qC(e,t,n,r){return Qy(e,t,n,iS,Zd(e,0,r),Zd(e,r+1,-1),r)}function Rc(e,t){for(var n="",r=sS(e),o=0;o6)switch(Rn(e,t+1)){case 109:if(Rn(e,t+4)!==45)break;case 102:return ft(e,/(.+:)(.+)-([^]+)/,"$1"+dt+"$2-$3$1"+pm+(Rn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Zw(e,"stretch")?C3(ft(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Rn(e,t+1)!==115)break;case 6444:switch(Rn(e,bi(e)-3-(~Zw(e,"!important")&&10))){case 107:return ft(e,":",":"+dt)+e;case 101:return ft(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+dt+(Rn(e,14)===45?"inline-":"")+"box$3$1"+dt+"$2$3$1"+Xn+"$2box$3")+e}break;case 5936:switch(Rn(e,t+11)){case 114:return dt+e+Xn+ft(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return dt+e+Xn+ft(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return dt+e+Xn+ft(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return dt+e+Xn+e+e}return e}var tZ=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case iS:t.return=C3(t.value,t.length);break;case b3:return Rc([Uu(t,{value:ft(t.value,"@","@"+dt)})],o);case oS:if(t.length)return RU(t.props,function(i){switch(DU(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Rc([Uu(t,{props:[ft(i,/:(read-\w+)/,":"+pm+"$1")]})],o);case"::placeholder":return Rc([Uu(t,{props:[ft(i,/:(plac\w+)/,":"+dt+"input-$1")]}),Uu(t,{props:[ft(i,/:(plac\w+)/,":"+pm+"$1")]}),Uu(t,{props:[ft(i,/:(plac\w+)/,Xn+"input-$1")]})],o)}return""})}},nZ=[tZ],k3=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(w){var P=w.getAttribute("data-emotion");P.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var o=t.stylisPlugins||nZ,i={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var P=w.getAttribute("data-emotion").split(" "),x=1;x=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 mZ={animationIterationCount:1,aspectRatio: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},gZ=/[A-Z]|^ms/g,vZ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,I3=function(t){return t.charCodeAt(1)===45},QC=function(t){return t!=null&&typeof t!="boolean"},e_=KU(function(e){return I3(e)?e:e.replace(gZ,"-$&").toLowerCase()}),ek=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(vZ,function(r,o,i){return Si={name:o,styles:i,next:Si},o})}return mZ[t]!==1&&!I3(t)&&typeof n=="number"&&n!==0?n+"px":n};function Kd(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 Si={name:n.name,styles:n.styles,next:Si},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Si={name:r.name,styles:r.styles,next:Si},r=r.next;var o=n.styles+";";return o}return yZ(e,t,n)}case"function":{if(e!==void 0){var i=Si,s=n(e);return Si=i,Kd(e,t,s)}break}}if(t==null)return n;var a=t[n];return a!==void 0?a:n}function yZ(e,t,n){var r="";if(Array.isArray(n))for(var o=0;ot in e?OZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,MZ=(e,t)=>{for(var n in t||(t={}))EZ.call(t,n)&&ok(e,n,t[n]);if(rk)for(var n of rk(t))$Z.call(t,n)&&ok(e,n,t[n]);return e},NZ=(e,t)=>CZ(e,kZ(t));function TZ({theme:e}){return k.createElement(jf,{styles:{"*, *::before, *::after":{boxSizing:"border-box"},html:{colorScheme:e.colorScheme==="dark"?"dark":"light"},body:NZ(MZ({},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 Gu(e,t,n,r=M){Object.keys(t).forEach(o=>{e[`--mantine-${n}-${o}`]=r(t[o])})}function IZ({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}`};Gu(t,e.shadows,"shadow"),Gu(t,e.fontSizes,"font-size"),Gu(t,e.radius,"radius"),Gu(t,e.spacing,"spacing"),Gu(t,e.breakpoints,"breakpoints",ba),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}`}),k.createElement(jf,{styles:{":root":t}})}var jZ=Object.defineProperty,LZ=Object.defineProperties,DZ=Object.getOwnPropertyDescriptors,ik=Object.getOwnPropertySymbols,RZ=Object.prototype.hasOwnProperty,zZ=Object.prototype.propertyIsEnumerable,sk=(e,t,n)=>t in e?jZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ui=(e,t)=>{for(var n in t||(t={}))RZ.call(t,n)&&sk(e,n,t[n]);if(ik)for(var n of ik(t))zZ.call(t,n)&&sk(e,n,t[n]);return e},t_=(e,t)=>LZ(e,DZ(t));function AZ(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]=ui(ui({},e.headings.sizes[c]),t.headings.sizes[c]),a),{}):e.headings.sizes;return t_(ui({},o),{headings:t_(ui(ui({},e.headings),t.headings),{sizes:s})})}if(i==="breakpoints"&&t.breakpoints){const s=ui(ui({},e.breakpoints),t.breakpoints);return t_(ui({},o),{breakpoints:Object.fromEntries(Object.entries(s).sort((a,c)=>Ro(a[1])-Ro(c[1])))})}return o[i]=typeof t[i]=="object"?ui(ui({},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 BZ(e,t){return _3(AZ(e,t))}function D3(e){return Object.keys(e).reduce((t,n)=>(e[n]!==void 0&&(t[n]=e[n]),t),{})}const FZ={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:`${M(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 VZ(){return k.createElement(jf,{styles:FZ})}var HZ=Object.defineProperty,ak=Object.getOwnPropertySymbols,WZ=Object.prototype.hasOwnProperty,UZ=Object.prototype.propertyIsEnumerable,lk=(e,t,n)=>t in e?HZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Od=(e,t)=>{for(var n in t||(t={}))WZ.call(t,n)&&lk(e,n,t[n]);if(ak)for(var n of ak(t))UZ.call(t,n)&&lk(e,n,t[n]);return e};const mm=_.createContext({theme:Jy});function ir(){var e;return((e=_.useContext(mm))==null?void 0:e.theme)||Jy}function ZZ(e){const t=ir(),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 R3(){var e;return(e=_.useContext(mm))==null?void 0:e.emotionCache}function ae(e,t,n){var r;const o=ir(),i=(r=o.components[e])==null?void 0:r.defaultProps,s=typeof i=="function"?i(o):i;return Od(Od(Od({},t),s),D3(n))}function z3({theme:e,emotionCache:t,withNormalizeCSS:n=!1,withGlobalStyles:r=!1,withCSSVariables:o=!1,inherit:i=!1,children:s}){const a=_.useContext(mm),c=BZ(Jy,i?Od(Od({},a.theme),e):e);return k.createElement(SZ,{theme:c},k.createElement(mm.Provider,{value:{theme:c,emotionCache:t}},n&&k.createElement(VZ,null),r&&k.createElement(TZ,{theme:c}),o&&k.createElement(IZ,{theme:c}),typeof c.globalStyles=="function"&&k.createElement(jf,{styles:c.globalStyles(c)}),s))}z3.displayName="@mantine/core/MantineProvider";const GZ={app:100,modal:200,popover:300,overlay:400,max:9999};function ii(e){return GZ[e]}function YZ(e,t){const n=_.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 KZ=k3({key:"mantine",prepend:!0});function qZ(){return R3()||KZ}var JZ=Object.defineProperty,ck=Object.getOwnPropertySymbols,XZ=Object.prototype.hasOwnProperty,QZ=Object.prototype.propertyIsEnumerable,uk=(e,t,n)=>t in e?JZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eG=(e,t)=>{for(var n in t||(t={}))XZ.call(t,n)&&uk(e,n,t[n]);if(ck)for(var n of ck(t))QZ.call(t,n)&&uk(e,n,t[n]);return e};const n_="ref";function tG(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(!(n_ in n))return{args:e,ref:t};t=n[n_];const r=eG({},n);return delete r[n_],{args:[r],ref:t}}const{cssFactory:nG}=(()=>{function e(n,r,o){const i=[],s=fZ(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}=tG(s),u=dS(c,r.registered);return T3(r,u,!1),`${r.key}-${u.name}${a===void 0?"":` ${a}`}`};return{css:o,cx:(...s)=>e(r.registered,o,nS(s))}}return{cssFactory:t}})();function A3(){const e=qZ();return YZ(()=>nG({cache:e}),[e])}function rG({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 oG=Object.defineProperty,dk=Object.getOwnPropertySymbols,iG=Object.prototype.hasOwnProperty,sG=Object.prototype.propertyIsEnumerable,fk=(e,t,n)=>t in e?oG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,r_=(e,t)=>{for(var n in t||(t={}))iG.call(t,n)&&fk(e,n,t[n]);if(dk)for(var n of dk(t))sG.call(t,n)&&fk(e,n,t[n]);return e};function qw(e,t){return t&&Object.keys(t).forEach(n=>{e[n]?e[n]=r_(r_({},e[n]),t[n]):e[n]=r_({},t[n])}),e}function pk(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)=>qw(i,s),{}):o(e)}function aG({ctx:e,theme:t,params:n,variant:r,size:o}){return e.reduce((i,s)=>(s.variants&&r in s.variants&&qw(i,s.variants[r](t,n,{variant:r,size:o})),s.sizes&&o in s.sizes&&qw(i,s.sizes[o](t,n,{variant:r,size:o})),i),{})}function ue(e){const t=typeof e=="function"?e:()=>e;function n(r,o){const i=ir(),s=ZZ(o?.name),a=R3(),c={variant:o?.variant,size:o?.size},{css:u,cx:f}=A3(),p=t(i,r,c),g=pk(o?.styles,i,r,c),v=pk(s,i,r,c),y=aG({ctx:s,theme:i,params:r,variant:o?.variant,size:o?.size}),w=Object.fromEntries(Object.keys(p).map(P=>{const x=f({[u(p[P])]:!o?.unstyled},u(y[P]),u(v[P]),u(g[P]));return[P,x]}));return{classes:rG({cx:f,classes:w,context:s,classNames:o?.classNames,name:o?.name,cache:a}),cx:f,theme:i}}return n}function Ar(e){return`___ref-${e||""}`}function lG({styles:e}){const t=ir();return k.createElement(jf,{styles:L3(typeof e=="function"?e(t):e)})}var cG=Object.defineProperty,uG=Object.defineProperties,dG=Object.getOwnPropertyDescriptors,hk=Object.getOwnPropertySymbols,fG=Object.prototype.hasOwnProperty,pG=Object.prototype.propertyIsEnumerable,mk=(e,t,n)=>t in e?cG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yu=(e,t)=>{for(var n in t||(t={}))fG.call(t,n)&&mk(e,n,t[n]);if(hk)for(var n of hk(t))pG.call(t,n)&&mk(e,n,t[n]);return e},Ku=(e,t)=>uG(e,dG(t));const qu={in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${M(10)})`},transitionProperty:"transform, opacity"},Sp={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(-${M(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(${M(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(${M(20)}) rotate(-5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${M(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:Ku(Yu({},qu),{common:{transformOrigin:"center center"}}),"pop-bottom-left":Ku(Yu({},qu),{common:{transformOrigin:"bottom left"}}),"pop-bottom-right":Ku(Yu({},qu),{common:{transformOrigin:"bottom right"}}),"pop-top-left":Ku(Yu({},qu),{common:{transformOrigin:"top left"}}),"pop-top-right":Ku(Yu({},qu),{common:{transformOrigin:"top right"}})},gk=["mousedown","touchstart"];function hG(e,t,n){const r=_.useRef();return _.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||gk).forEach(i=>document.addEventListener(i,o)),()=>{(t||gk).forEach(i=>document.removeEventListener(i,o))}},[r,e,n]),r}function mG(e,t){try{return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}catch{return e.addListener(t),()=>e.removeListener(t)}}function gG(e,t){return typeof t=="boolean"?t:typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function vG(e,t,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){const[r,o]=_.useState(n?t:gG(e,t)),i=_.useRef();return _.useEffect(()=>{if("matchMedia"in window)return i.current=window.matchMedia(e),o(i.current.matches),mG(i.current,s=>o(s.matches))},[e]),r}function ia(e,t,n){return Math.min(Math.max(e,t),n)}const fS=typeof document<"u"?_.useLayoutEffect:_.useEffect;function Fn(e,t){const n=_.useRef(!1);_.useEffect(()=>()=>{n.current=!1},[]),_.useEffect(()=>{if(n.current)return e();n.current=!0},t)}function B3({opened:e,shouldReturnFocus:t=!0}){const n=_.useRef(),r=()=>{var o;n.current&&"focus"in n.current&&typeof n.current.focus=="function"&&((o=n.current)==null||o.focus({preventScroll:!0}))};return Fn(()=>{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 yG=/input|select|textarea|button|object/,F3="a, input, select, textarea, button, object, [tabindex]";function _G(e){return e.style.display==="none"}function wG(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(_G(n))return!1;n=n.parentNode}return!0}function V3(e){let t=e.getAttribute("tabindex");return t===null&&(t=void 0),parseInt(t,10)}function Jw(e){const t=e.nodeName.toLowerCase(),n=!Number.isNaN(V3(e));return(yG.test(t)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||n)&&wG(e)}function H3(e){const t=V3(e);return(Number.isNaN(t)||t>=0)&&Jw(e)}function bG(e){return Array.from(e.querySelectorAll(F3)).filter(H3)}function xG(e,t){const n=bG(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 zc(){return`mantine-${Math.random().toString(36).slice(2,11)}`}function SG(e,t="body > :not(script)"){const n=zc(),r=Array.from(document.querySelectorAll(t)).map(o=>{var i;if((i=o?.shadowRoot)!=null&&i.contains(e)||o.contains(e))return;const s=o.getAttribute("aria-hidden"),a=o.getAttribute("data-hidden"),c=o.getAttribute("data-focus-id");return o.setAttribute("data-focus-id",n),s===null||s==="false"?o.setAttribute("aria-hidden","true"):!a&&!c&&o.setAttribute("data-hidden",s),{node:o,ariaHidden:a||null}});return()=>{r.forEach(o=>{!o||n!==o.node.getAttribute("data-focus-id")||(o.ariaHidden===null?o.node.removeAttribute("aria-hidden"):o.node.setAttribute("aria-hidden",o.ariaHidden),o.node.removeAttribute("data-focus-id"),o.node.removeAttribute("data-hidden"))})}}function PG(e=!0){const t=_.useRef(),n=_.useRef(null),r=i=>{let s=i.querySelector("[data-autofocus]");if(!s){const a=Array.from(i.querySelectorAll(F3));s=a.find(H3)||a.find(Jw)||null,!s&&Jw(i)&&(s=i)}s&&s.focus({preventScroll:!0})},o=_.useCallback(i=>{if(e){if(i===null){n.current&&(n.current(),n.current=null);return}n.current=SG(i),t.current!==i&&(i?(setTimeout(()=>{i.getRootNode()&&r(i)}),t.current=i):t.current=null)}},[e]);return _.useEffect(()=>{if(!e)return;t.current&&setTimeout(()=>r(t.current));const i=s=>{s.key==="Tab"&&t.current&&xG(t.current,s)};return document.addEventListener("keydown",i),()=>{document.removeEventListener("keydown",i),n.current&&n.current()}},[e]),o}const OG=k["useId".toString()]||(()=>{});function CG(){const e=OG();return e?`mantine-${e.replace(/:/g,"")}`:""}function $a(e){const t=CG(),[n,r]=_.useState(t);return fS(()=>{r(zc())},[]),typeof e=="string"?e:typeof window>"u"?t:n}function gm(e,t,n){_.useEffect(()=>(window.addEventListener(e,t,n),()=>window.removeEventListener(e,t,n)),[e,t])}function W3(e,t){typeof e=="function"?e(t):typeof e=="object"&&e!==null&&"current"in e&&(e.current=t)}function kG(...e){return t=>{e.forEach(n=>W3(n,t))}}function ws(...e){return _.useCallback(kG(...e),e)}const U3=e=>({x:ia(e.x,0,1),y:ia(e.y,0,1)});function Z3(e,t,n="ltr"){const r=_.useRef(),o=_.useRef(!1),i=_.useRef(!1),s=_.useRef(0),[a,c]=_.useState(!1);return _.useEffect(()=>{o.current=!0},[]),_.useEffect(()=>{const u=({x:S,y:O})=>{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 $=ia((S-E.left)/E.width,0,1);e({x:n==="ltr"?$:1-$,y:ia((O-E.top)/E.height,0,1)})}}})},f=()=>{document.addEventListener("mousemove",w),document.addEventListener("mouseup",v),document.addEventListener("touchmove",x),document.addEventListener("touchend",v)},p=()=>{document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",v),document.removeEventListener("touchmove",x),document.removeEventListener("touchend",v)},g=()=>{!i.current&&o.current&&(i.current=!0,typeof t?.onScrubStart=="function"&&t.onScrubStart(),c(!0),f())},v=()=>{i.current&&o.current&&(i.current=!1,c(!1),p(),setTimeout(()=>{typeof t?.onScrubEnd=="function"&&t.onScrubEnd()},0))},y=S=>{g(),S.preventDefault(),w(S)},w=S=>u({x:S.clientX,y:S.clientY}),P=S=>{S.cancelable&&S.preventDefault(),g(),x(S)},x=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",P,{passive:!1}),()=>{r.current&&(r.current.removeEventListener("mousedown",y),r.current.removeEventListener("touchstart",P))}},[n,e]),{ref:r,active:a}}function go({value:e,defaultValue:t,finalValue:n,onChange:r=()=>{}}){const[o,i]=_.useState(t!==void 0?t:n),s=a=>{i(a),r?.(a)};return e!==void 0?[e,r,!0]:[o,s,!1]}function pS(e,t){return vG("(prefers-reduced-motion: reduce)",e,t)}const EG=e=>e<.5?2*e*e:-1+(4-2*e)*e,$G=({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 v=p-o;return v<=u.height*(i?0:1)||!i?v:0}const g=s?c.height:window.innerHeight;if(r==="end"){const v=p+o-g+u.height;return v>=-u.height*(i?0:1)||!i?v:0}return r==="center"?p-g/2+u.height/2:0}if(e==="x"){const p=f("left");if(p===0)return 0;if(r==="start"){const v=p-o;return v<=u.width||!i?v:0}const g=s?c.width:window.innerWidth;if(r==="end"){const v=p+o-g+u.width;return v>=-u.width||!i?v:0}return r==="center"?p-g/2+u.width/2:0}return 0},MG=({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]},NG=({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 G3({duration:e=1250,axis:t="y",onScrollFinish:n,easing:r=EG,offset:o=0,cancelable:i=!0,isList:s=!1}={}){const a=_.useRef(0),c=_.useRef(0),u=_.useRef(!1),f=_.useRef(null),p=_.useRef(null),g=pS(),v=()=>{a.current&&cancelAnimationFrame(a.current)},y=_.useCallback(({alignment:P="start"}={})=>{var x;u.current=!1,a.current&&v();const S=(x=MG({parent:f.current,axis:t}))!=null?x:0,O=$G({parent:f.current,target:p.current,axis:t,alignment:P,offset:o,isList:s})-(f.current?0:S);function E(){c.current===0&&(c.current=performance.now());const N=performance.now()-c.current,I=g||e===0?1:N/e,R=S+O*r(I);NG({parent:f.current,axis:t,distance:R}),!u.current&&I<1?a.current=requestAnimationFrame(E):(typeof n=="function"&&n(),c.current=0,a.current=0,v())}E()},[t,e,r,s,o,n,g]),w=()=>{i&&(u.current=!0)};return gm("wheel",w,{passive:!0}),gm("touchmove",w,{passive:!0}),_.useEffect(()=>v,[]),{scrollableRef:f,targetRef:p,scrollIntoView:y,cancel:v}}function vk(){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 TG(e={getValueInEffect:!0}){const[t,n]=_.useState(e.getValueInEffect?"undetermined":vk());return fS(()=>{e.getValueInEffect&&n(vk)},[]),t}function IG(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 jG(e){const[t,n]=_.useState(e);return[t,IG(n)]}function hS(e=!1,t){const{onOpen:n,onClose:r}=t||{},[o,i]=_.useState(e),s=_.useCallback(()=>{i(u=>u||(n?.(),!0))},[n]),a=_.useCallback(()=>{i(u=>u&&(r?.(),!1))},[r]),c=_.useCallback(()=>{o?a():s()},[a,s,o]);return[o,{open:s,close:a,toggle:c}]}function LG(e,t,n={autoInvoke:!1}){const r=_.useRef(null),o=_.useRef(null),i=_.useCallback((...a)=>{o.current||(o.current=window.setTimeout(()=>{r.current(a),o.current=null},t))},[t]),s=_.useCallback(()=>{o.current&&(window.clearTimeout(o.current),o.current=null)},[]);return _.useEffect(()=>{r.current=e},[e]),_.useEffect(()=>(n.autoInvoke&&i(),s),[s,t,n.autoInvoke,i]),{start:i,clear:s}}var yk=Object.getOwnPropertySymbols,DG=Object.prototype.hasOwnProperty,RG=Object.prototype.propertyIsEnumerable,zG=(e,t)=>{var n={};for(var r in e)DG.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&yk)for(var r of yk(e))t.indexOf(r)<0&&RG.call(e,r)&&(n[r]=e[r]);return n};function Dl(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:g,pb:v,pl:y,pr:w,bg:P,c:x,opacity:S,ff:O,fz:E,fw:$,lts:N,ta:I,lh:R,fs:B,tt:z,td:G,w:X,miw:Q,maw:V,h:H,mih:Z,mah:Y,bgsz:j,bgp:U,bgr:F,bga:K,pos:ee,top:fe,left:ie,bottom:J,right:ne,inset:le,display:_e}=t,Ne=zG(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:D3({m:n,mx:r,my:o,mt:i,mb:s,ml:a,mr:c,p:u,px:f,py:p,pt:g,pb:v,pl:y,pr:w,bg:P,c:x,opacity:S,ff:O,fz:E,fw:$,lts:N,ta:I,lh:R,fs:B,tt:z,td:G,w:X,miw:Q,maw:V,h:H,mih:Z,mah:Y,bgsz:j,bgp:U,bgr:F,bga:K,pos:ee,top:fe,left:ie,bottom:J,right:ne,inset:le,display:_e}),rest:Ne}}function AG(e,t){const n=Object.keys(e).filter(r=>r!=="base").sort((r,o)=>Ro(re({size:r,sizes:t.breakpoints}))-Ro(re({size:o,sizes:t.breakpoints})));return"base"in e?["base",...n]:n}function BG({value:e,theme:t,getValue:n,property:r}){if(e==null)return;if(typeof e=="object")return AG(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 FG(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 VG(e){return M(e)}function HG(e){return e}function WG(e,t){return re({size:e,sizes:t.fontSizes})}const UG=["-xs","-sm","-md","-lg","-xl"];function ZG(e,t){return UG.includes(e)?`calc(${re({size:e.replace("-",""),sizes:t.spacing})} * -1)`:re({size:e,sizes:t.spacing})}const GG={identity:HG,color:FG,size:VG,fontSize:WG,spacing:ZG},YG={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 KG=Object.defineProperty,_k=Object.getOwnPropertySymbols,qG=Object.prototype.hasOwnProperty,JG=Object.prototype.propertyIsEnumerable,wk=(e,t,n)=>t in e?KG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bk=(e,t)=>{for(var n in t||(t={}))qG.call(t,n)&&wk(e,n,t[n]);if(_k)for(var n of _k(t))JG.call(t,n)&&wk(e,n,t[n]);return e};function xk(e,t,n=YG){return Object.keys(n).reduce((o,i)=>(i in e&&e[i]!==void 0&&o.push(BG({value:e[i],getValue:GG[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]=bk(bk({},o[s]),i[s]):o[s]=i[s]}),o),{})}function Sk(e,t){return typeof e=="function"?e(t):e}function XG(e,t,n){const r=ir(),{css:o,cx:i}=A3();return Array.isArray(e)?i(n,o(xk(t,r)),e.map(s=>o(Sk(s,r)))):i(n,o(Sk(e,r)),o(xk(t,r)))}var QG=Object.defineProperty,vm=Object.getOwnPropertySymbols,Y3=Object.prototype.hasOwnProperty,K3=Object.prototype.propertyIsEnumerable,Pk=(e,t,n)=>t in e?QG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eY=(e,t)=>{for(var n in t||(t={}))Y3.call(t,n)&&Pk(e,n,t[n]);if(vm)for(var n of vm(t))K3.call(t,n)&&Pk(e,n,t[n]);return e},tY=(e,t)=>{var n={};for(var r in e)Y3.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&vm)for(var r of vm(e))t.indexOf(r)<0&&K3.call(e,r)&&(n[r]=e[r]);return n};const q3=_.forwardRef((e,t)=>{var n=e,{className:r,component:o,style:i,sx:s}=n,a=tY(n,["className","component","style","sx"]);const{systemStyles:c,rest:u}=Dl(a),f=o||"div";return k.createElement(f,eY({ref:t,className:XG(s,c,r),style:i},u))});q3.displayName="@mantine/core/Box";const Pe=q3;var nY=Object.defineProperty,rY=Object.defineProperties,oY=Object.getOwnPropertyDescriptors,Ok=Object.getOwnPropertySymbols,iY=Object.prototype.hasOwnProperty,sY=Object.prototype.propertyIsEnumerable,Ck=(e,t,n)=>t in e?nY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kk=(e,t)=>{for(var n in t||(t={}))iY.call(t,n)&&Ck(e,n,t[n]);if(Ok)for(var n of Ok(t))sY.call(t,n)&&Ck(e,n,t[n]);return e},aY=(e,t)=>rY(e,oY(t)),lY=ue(e=>({root:aY(kk(kk({},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 cY=lY;var uY=Object.defineProperty,ym=Object.getOwnPropertySymbols,J3=Object.prototype.hasOwnProperty,X3=Object.prototype.propertyIsEnumerable,Ek=(e,t,n)=>t in e?uY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dY=(e,t)=>{for(var n in t||(t={}))J3.call(t,n)&&Ek(e,n,t[n]);if(ym)for(var n of ym(t))X3.call(t,n)&&Ek(e,n,t[n]);return e},fY=(e,t)=>{var n={};for(var r in e)J3.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ym)for(var r of ym(e))t.indexOf(r)<0&&X3.call(e,r)&&(n[r]=e[r]);return n};const Q3=_.forwardRef((e,t)=>{const n=ae("UnstyledButton",{},e),{className:r,component:o="button",unstyled:i,variant:s}=n,a=fY(n,["className","component","unstyled","variant"]),{classes:c,cx:u}=cY(null,{name:"UnstyledButton",unstyled:i,variant:s});return k.createElement(Pe,dY({component:o,ref:t,className:u(c.root,r),type:o==="button"?"button":void 0},a))});Q3.displayName="@mantine/core/UnstyledButton";const ls=Q3;var eL={exports:{}},_o={},tL={exports:{}},nL={};/** + */var Nn=typeof Symbol=="function"&&Symbol.for,aS=Nn?Symbol.for("react.element"):60103,lS=Nn?Symbol.for("react.portal"):60106,e0=Nn?Symbol.for("react.fragment"):60107,t0=Nn?Symbol.for("react.strict_mode"):60108,n0=Nn?Symbol.for("react.profiler"):60114,r0=Nn?Symbol.for("react.provider"):60109,o0=Nn?Symbol.for("react.context"):60110,cS=Nn?Symbol.for("react.async_mode"):60111,i0=Nn?Symbol.for("react.concurrent_mode"):60111,s0=Nn?Symbol.for("react.forward_ref"):60112,a0=Nn?Symbol.for("react.suspense"):60113,rZ=Nn?Symbol.for("react.suspense_list"):60120,l0=Nn?Symbol.for("react.memo"):60115,c0=Nn?Symbol.for("react.lazy"):60116,oZ=Nn?Symbol.for("react.block"):60121,iZ=Nn?Symbol.for("react.fundamental"):60117,sZ=Nn?Symbol.for("react.responder"):60118,aZ=Nn?Symbol.for("react.scope"):60119;function yo(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case aS:switch(e=e.type,e){case cS:case i0:case e0:case n0:case t0:case a0:return e;default:switch(e=e&&e.$$typeof,e){case o0:case s0:case c0:case l0:case r0:return e;default:return t}}case lS:return t}}}function $3(e){return yo(e)===i0}_t.AsyncMode=cS;_t.ConcurrentMode=i0;_t.ContextConsumer=o0;_t.ContextProvider=r0;_t.Element=aS;_t.ForwardRef=s0;_t.Fragment=e0;_t.Lazy=c0;_t.Memo=l0;_t.Portal=lS;_t.Profiler=n0;_t.StrictMode=t0;_t.Suspense=a0;_t.isAsyncMode=function(e){return $3(e)||yo(e)===cS};_t.isConcurrentMode=$3;_t.isContextConsumer=function(e){return yo(e)===o0};_t.isContextProvider=function(e){return yo(e)===r0};_t.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===aS};_t.isForwardRef=function(e){return yo(e)===s0};_t.isFragment=function(e){return yo(e)===e0};_t.isLazy=function(e){return yo(e)===c0};_t.isMemo=function(e){return yo(e)===l0};_t.isPortal=function(e){return yo(e)===lS};_t.isProfiler=function(e){return yo(e)===n0};_t.isStrictMode=function(e){return yo(e)===t0};_t.isSuspense=function(e){return yo(e)===a0};_t.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===e0||e===i0||e===n0||e===t0||e===a0||e===rZ||typeof e=="object"&&e!==null&&(e.$$typeof===c0||e.$$typeof===l0||e.$$typeof===r0||e.$$typeof===o0||e.$$typeof===s0||e.$$typeof===iZ||e.$$typeof===sZ||e.$$typeof===aZ||e.$$typeof===oZ)};_t.typeOf=yo;E3.exports=_t;var lZ=E3.exports,M3=lZ,cZ={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},uZ={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},N3={};N3[M3.ForwardRef]=cZ;N3[M3.Memo]=uZ;var dZ=!0;function fZ(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):r+=o+" "}),r}var pZ=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||dZ===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},T3=function(t,n,r){pZ(t,n,r);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var i=n;do t.insert(n===i?"."+o:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function hZ(e){for(var t=0,n,r=0,o=e.length;o>=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 mZ={animationIterationCount:1,aspectRatio: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},gZ=/[A-Z]|^ms/g,vZ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,I3=function(t){return t.charCodeAt(1)===45},QC=function(t){return t!=null&&typeof t!="boolean"},Q1=KU(function(e){return I3(e)?e:e.replace(gZ,"-$&").toLowerCase()}),ek=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(vZ,function(r,o,i){return xi={name:o,styles:i,next:xi},o})}return mZ[t]!==1&&!I3(t)&&typeof n=="number"&&n!==0?n+"px":n};function Yd(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 xi={name:n.name,styles:n.styles,next:xi},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)xi={name:r.name,styles:r.styles,next:xi},r=r.next;var o=n.styles+";";return o}return yZ(e,t,n)}case"function":{if(e!==void 0){var i=xi,s=n(e);return xi=i,Yd(e,t,s)}break}}if(t==null)return n;var a=t[n];return a!==void 0?a:n}function yZ(e,t,n){var r="";if(Array.isArray(n))for(var o=0;ot in e?OZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,MZ=(e,t)=>{for(var n in t||(t={}))EZ.call(t,n)&&ok(e,n,t[n]);if(rk)for(var n of rk(t))$Z.call(t,n)&&ok(e,n,t[n]);return e},NZ=(e,t)=>CZ(e,kZ(t));function TZ({theme:e}){return k.createElement(If,{styles:{"*, *::before, *::after":{boxSizing:"border-box"},html:{colorScheme:e.colorScheme==="dark"?"dark":"light"},body:NZ(MZ({},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 Zu(e,t,n,r=M){Object.keys(t).forEach(o=>{e[`--mantine-${n}-${o}`]=r(t[o])})}function IZ({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}`};Zu(t,e.shadows,"shadow"),Zu(t,e.fontSizes,"font-size"),Zu(t,e.radius,"radius"),Zu(t,e.spacing,"spacing"),Zu(t,e.breakpoints,"breakpoints",ba),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}`}),k.createElement(If,{styles:{":root":t}})}var jZ=Object.defineProperty,LZ=Object.defineProperties,DZ=Object.getOwnPropertyDescriptors,ik=Object.getOwnPropertySymbols,RZ=Object.prototype.hasOwnProperty,zZ=Object.prototype.propertyIsEnumerable,sk=(e,t,n)=>t in e?jZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ui=(e,t)=>{for(var n in t||(t={}))RZ.call(t,n)&&sk(e,n,t[n]);if(ik)for(var n of ik(t))zZ.call(t,n)&&sk(e,n,t[n]);return e},e_=(e,t)=>LZ(e,DZ(t));function AZ(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]=ui(ui({},e.headings.sizes[c]),t.headings.sizes[c]),a),{}):e.headings.sizes;return e_(ui({},o),{headings:e_(ui(ui({},e.headings),t.headings),{sizes:s})})}if(i==="breakpoints"&&t.breakpoints){const s=ui(ui({},e.breakpoints),t.breakpoints);return e_(ui({},o),{breakpoints:Object.fromEntries(Object.entries(s).sort((a,c)=>Ro(a[1])-Ro(c[1])))})}return o[i]=typeof t[i]=="object"?ui(ui({},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 BZ(e,t){return _3(AZ(e,t))}function D3(e){return Object.keys(e).reduce((t,n)=>(e[n]!==void 0&&(t[n]=e[n]),t),{})}const FZ={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:`${M(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 VZ(){return k.createElement(If,{styles:FZ})}var HZ=Object.defineProperty,ak=Object.getOwnPropertySymbols,WZ=Object.prototype.hasOwnProperty,UZ=Object.prototype.propertyIsEnumerable,lk=(e,t,n)=>t in e?HZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pd=(e,t)=>{for(var n in t||(t={}))WZ.call(t,n)&&lk(e,n,t[n]);if(ak)for(var n of ak(t))UZ.call(t,n)&&lk(e,n,t[n]);return e};const hm=_.createContext({theme:qy});function ir(){var e;return((e=_.useContext(hm))==null?void 0:e.theme)||qy}function ZZ(e){const t=ir(),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 R3(){var e;return(e=_.useContext(hm))==null?void 0:e.emotionCache}function ae(e,t,n){var r;const o=ir(),i=(r=o.components[e])==null?void 0:r.defaultProps,s=typeof i=="function"?i(o):i;return Pd(Pd(Pd({},t),s),D3(n))}function z3({theme:e,emotionCache:t,withNormalizeCSS:n=!1,withGlobalStyles:r=!1,withCSSVariables:o=!1,inherit:i=!1,children:s}){const a=_.useContext(hm),c=BZ(qy,i?Pd(Pd({},a.theme),e):e);return k.createElement(SZ,{theme:c},k.createElement(hm.Provider,{value:{theme:c,emotionCache:t}},n&&k.createElement(VZ,null),r&&k.createElement(TZ,{theme:c}),o&&k.createElement(IZ,{theme:c}),typeof c.globalStyles=="function"&&k.createElement(If,{styles:c.globalStyles(c)}),s))}z3.displayName="@mantine/core/MantineProvider";const GZ={app:100,modal:200,popover:300,overlay:400,max:9999};function ii(e){return GZ[e]}function YZ(e,t){const n=_.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 KZ=k3({key:"mantine",prepend:!0});function qZ(){return R3()||KZ}var JZ=Object.defineProperty,ck=Object.getOwnPropertySymbols,XZ=Object.prototype.hasOwnProperty,QZ=Object.prototype.propertyIsEnumerable,uk=(e,t,n)=>t in e?JZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eG=(e,t)=>{for(var n in t||(t={}))XZ.call(t,n)&&uk(e,n,t[n]);if(ck)for(var n of ck(t))QZ.call(t,n)&&uk(e,n,t[n]);return e};const t_="ref";function tG(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(!(t_ in n))return{args:e,ref:t};t=n[t_];const r=eG({},n);return delete r[t_],{args:[r],ref:t}}const{cssFactory:nG}=(()=>{function e(n,r,o){const i=[],s=fZ(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}=tG(s),u=uS(c,r.registered);return T3(r,u,!1),`${r.key}-${u.name}${a===void 0?"":` ${a}`}`};return{css:o,cx:(...s)=>e(r.registered,o,tS(s))}}return{cssFactory:t}})();function A3(){const e=qZ();return YZ(()=>nG({cache:e}),[e])}function rG({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 oG=Object.defineProperty,dk=Object.getOwnPropertySymbols,iG=Object.prototype.hasOwnProperty,sG=Object.prototype.propertyIsEnumerable,fk=(e,t,n)=>t in e?oG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,n_=(e,t)=>{for(var n in t||(t={}))iG.call(t,n)&&fk(e,n,t[n]);if(dk)for(var n of dk(t))sG.call(t,n)&&fk(e,n,t[n]);return e};function Kw(e,t){return t&&Object.keys(t).forEach(n=>{e[n]?e[n]=n_(n_({},e[n]),t[n]):e[n]=n_({},t[n])}),e}function pk(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)=>Kw(i,s),{}):o(e)}function aG({ctx:e,theme:t,params:n,variant:r,size:o}){return e.reduce((i,s)=>(s.variants&&r in s.variants&&Kw(i,s.variants[r](t,n,{variant:r,size:o})),s.sizes&&o in s.sizes&&Kw(i,s.sizes[o](t,n,{variant:r,size:o})),i),{})}function ue(e){const t=typeof e=="function"?e:()=>e;function n(r,o){const i=ir(),s=ZZ(o?.name),a=R3(),c={variant:o?.variant,size:o?.size},{css:u,cx:f}=A3(),p=t(i,r,c),g=pk(o?.styles,i,r,c),v=pk(s,i,r,c),y=aG({ctx:s,theme:i,params:r,variant:o?.variant,size:o?.size}),w=Object.fromEntries(Object.keys(p).map(P=>{const x=f({[u(p[P])]:!o?.unstyled},u(y[P]),u(v[P]),u(g[P]));return[P,x]}));return{classes:rG({cx:f,classes:w,context:s,classNames:o?.classNames,name:o?.name,cache:a}),cx:f,theme:i}}return n}function Ar(e){return`___ref-${e||""}`}function lG({styles:e}){const t=ir();return k.createElement(If,{styles:L3(typeof e=="function"?e(t):e)})}var cG=Object.defineProperty,uG=Object.defineProperties,dG=Object.getOwnPropertyDescriptors,hk=Object.getOwnPropertySymbols,fG=Object.prototype.hasOwnProperty,pG=Object.prototype.propertyIsEnumerable,mk=(e,t,n)=>t in e?cG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gu=(e,t)=>{for(var n in t||(t={}))fG.call(t,n)&&mk(e,n,t[n]);if(hk)for(var n of hk(t))pG.call(t,n)&&mk(e,n,t[n]);return e},Yu=(e,t)=>uG(e,dG(t));const Ku={in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${M(10)})`},transitionProperty:"transform, opacity"},xp={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(-${M(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(${M(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(${M(20)}) rotate(-5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${M(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:Yu(Gu({},Ku),{common:{transformOrigin:"center center"}}),"pop-bottom-left":Yu(Gu({},Ku),{common:{transformOrigin:"bottom left"}}),"pop-bottom-right":Yu(Gu({},Ku),{common:{transformOrigin:"bottom right"}}),"pop-top-left":Yu(Gu({},Ku),{common:{transformOrigin:"top left"}}),"pop-top-right":Yu(Gu({},Ku),{common:{transformOrigin:"top right"}})},gk=["mousedown","touchstart"];function hG(e,t,n){const r=_.useRef();return _.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||gk).forEach(i=>document.addEventListener(i,o)),()=>{(t||gk).forEach(i=>document.removeEventListener(i,o))}},[r,e,n]),r}function mG(e,t){try{return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}catch{return e.addListener(t),()=>e.removeListener(t)}}function gG(e,t){return typeof t=="boolean"?t:typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function vG(e,t,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){const[r,o]=_.useState(n?t:gG(e,t)),i=_.useRef();return _.useEffect(()=>{if("matchMedia"in window)return i.current=window.matchMedia(e),o(i.current.matches),mG(i.current,s=>o(s.matches))},[e]),r}function ia(e,t,n){return Math.min(Math.max(e,t),n)}const dS=typeof document<"u"?_.useLayoutEffect:_.useEffect;function Fn(e,t){const n=_.useRef(!1);_.useEffect(()=>()=>{n.current=!1},[]),_.useEffect(()=>{if(n.current)return e();n.current=!0},t)}function B3({opened:e,shouldReturnFocus:t=!0}){const n=_.useRef(),r=()=>{var o;n.current&&"focus"in n.current&&typeof n.current.focus=="function"&&((o=n.current)==null||o.focus({preventScroll:!0}))};return Fn(()=>{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 yG=/input|select|textarea|button|object/,F3="a, input, select, textarea, button, object, [tabindex]";function _G(e){return e.style.display==="none"}function wG(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(_G(n))return!1;n=n.parentNode}return!0}function V3(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(V3(e));return(yG.test(t)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||n)&&wG(e)}function H3(e){const t=V3(e);return(Number.isNaN(t)||t>=0)&&qw(e)}function bG(e){return Array.from(e.querySelectorAll(F3)).filter(H3)}function xG(e,t){const n=bG(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 zc(){return`mantine-${Math.random().toString(36).slice(2,11)}`}function SG(e,t="body > :not(script)"){const n=zc(),r=Array.from(document.querySelectorAll(t)).map(o=>{var i;if((i=o?.shadowRoot)!=null&&i.contains(e)||o.contains(e))return;const s=o.getAttribute("aria-hidden"),a=o.getAttribute("data-hidden"),c=o.getAttribute("data-focus-id");return o.setAttribute("data-focus-id",n),s===null||s==="false"?o.setAttribute("aria-hidden","true"):!a&&!c&&o.setAttribute("data-hidden",s),{node:o,ariaHidden:a||null}});return()=>{r.forEach(o=>{!o||n!==o.node.getAttribute("data-focus-id")||(o.ariaHidden===null?o.node.removeAttribute("aria-hidden"):o.node.setAttribute("aria-hidden",o.ariaHidden),o.node.removeAttribute("data-focus-id"),o.node.removeAttribute("data-hidden"))})}}function PG(e=!0){const t=_.useRef(),n=_.useRef(null),r=i=>{let s=i.querySelector("[data-autofocus]");if(!s){const a=Array.from(i.querySelectorAll(F3));s=a.find(H3)||a.find(qw)||null,!s&&qw(i)&&(s=i)}s&&s.focus({preventScroll:!0})},o=_.useCallback(i=>{if(e){if(i===null){n.current&&(n.current(),n.current=null);return}n.current=SG(i),t.current!==i&&(i?(setTimeout(()=>{i.getRootNode()&&r(i)}),t.current=i):t.current=null)}},[e]);return _.useEffect(()=>{if(!e)return;t.current&&setTimeout(()=>r(t.current));const i=s=>{s.key==="Tab"&&t.current&&xG(t.current,s)};return document.addEventListener("keydown",i),()=>{document.removeEventListener("keydown",i),n.current&&n.current()}},[e]),o}const OG=k["useId".toString()]||(()=>{});function CG(){const e=OG();return e?`mantine-${e.replace(/:/g,"")}`:""}function $a(e){const t=CG(),[n,r]=_.useState(t);return dS(()=>{r(zc())},[]),typeof e=="string"?e:typeof window>"u"?t:n}function mm(e,t,n){_.useEffect(()=>(window.addEventListener(e,t,n),()=>window.removeEventListener(e,t,n)),[e,t])}function W3(e,t){typeof e=="function"?e(t):typeof e=="object"&&e!==null&&"current"in e&&(e.current=t)}function kG(...e){return t=>{e.forEach(n=>W3(n,t))}}function ws(...e){return _.useCallback(kG(...e),e)}const U3=e=>({x:ia(e.x,0,1),y:ia(e.y,0,1)});function Z3(e,t,n="ltr"){const r=_.useRef(),o=_.useRef(!1),i=_.useRef(!1),s=_.useRef(0),[a,c]=_.useState(!1);return _.useEffect(()=>{o.current=!0},[]),_.useEffect(()=>{const u=({x:S,y:O})=>{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 $=ia((S-E.left)/E.width,0,1);e({x:n==="ltr"?$:1-$,y:ia((O-E.top)/E.height,0,1)})}}})},f=()=>{document.addEventListener("mousemove",w),document.addEventListener("mouseup",v),document.addEventListener("touchmove",x),document.addEventListener("touchend",v)},p=()=>{document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",v),document.removeEventListener("touchmove",x),document.removeEventListener("touchend",v)},g=()=>{!i.current&&o.current&&(i.current=!0,typeof t?.onScrubStart=="function"&&t.onScrubStart(),c(!0),f())},v=()=>{i.current&&o.current&&(i.current=!1,c(!1),p(),setTimeout(()=>{typeof t?.onScrubEnd=="function"&&t.onScrubEnd()},0))},y=S=>{g(),S.preventDefault(),w(S)},w=S=>u({x:S.clientX,y:S.clientY}),P=S=>{S.cancelable&&S.preventDefault(),g(),x(S)},x=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",P,{passive:!1}),()=>{r.current&&(r.current.removeEventListener("mousedown",y),r.current.removeEventListener("touchstart",P))}},[n,e]),{ref:r,active:a}}function go({value:e,defaultValue:t,finalValue:n,onChange:r=()=>{}}){const[o,i]=_.useState(t!==void 0?t:n),s=a=>{i(a),r?.(a)};return e!==void 0?[e,r,!0]:[o,s,!1]}function fS(e,t){return vG("(prefers-reduced-motion: reduce)",e,t)}const EG=e=>e<.5?2*e*e:-1+(4-2*e)*e,$G=({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 v=p-o;return v<=u.height*(i?0:1)||!i?v:0}const g=s?c.height:window.innerHeight;if(r==="end"){const v=p+o-g+u.height;return v>=-u.height*(i?0:1)||!i?v:0}return r==="center"?p-g/2+u.height/2:0}if(e==="x"){const p=f("left");if(p===0)return 0;if(r==="start"){const v=p-o;return v<=u.width||!i?v:0}const g=s?c.width:window.innerWidth;if(r==="end"){const v=p+o-g+u.width;return v>=-u.width||!i?v:0}return r==="center"?p-g/2+u.width/2:0}return 0},MG=({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]},NG=({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 G3({duration:e=1250,axis:t="y",onScrollFinish:n,easing:r=EG,offset:o=0,cancelable:i=!0,isList:s=!1}={}){const a=_.useRef(0),c=_.useRef(0),u=_.useRef(!1),f=_.useRef(null),p=_.useRef(null),g=fS(),v=()=>{a.current&&cancelAnimationFrame(a.current)},y=_.useCallback(({alignment:P="start"}={})=>{var x;u.current=!1,a.current&&v();const S=(x=MG({parent:f.current,axis:t}))!=null?x:0,O=$G({parent:f.current,target:p.current,axis:t,alignment:P,offset:o,isList:s})-(f.current?0:S);function E(){c.current===0&&(c.current=performance.now());const N=performance.now()-c.current,I=g||e===0?1:N/e,R=S+O*r(I);NG({parent:f.current,axis:t,distance:R}),!u.current&&I<1?a.current=requestAnimationFrame(E):(typeof n=="function"&&n(),c.current=0,a.current=0,v())}E()},[t,e,r,s,o,n,g]),w=()=>{i&&(u.current=!0)};return mm("wheel",w,{passive:!0}),mm("touchmove",w,{passive:!0}),_.useEffect(()=>v,[]),{scrollableRef:f,targetRef:p,scrollIntoView:y,cancel:v}}function vk(){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 TG(e={getValueInEffect:!0}){const[t,n]=_.useState(e.getValueInEffect?"undetermined":vk());return dS(()=>{e.getValueInEffect&&n(vk)},[]),t}function IG(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 jG(e){const[t,n]=_.useState(e);return[t,IG(n)]}function pS(e=!1,t){const{onOpen:n,onClose:r}=t||{},[o,i]=_.useState(e),s=_.useCallback(()=>{i(u=>u||(n?.(),!0))},[n]),a=_.useCallback(()=>{i(u=>u&&(r?.(),!1))},[r]),c=_.useCallback(()=>{o?a():s()},[a,s,o]);return[o,{open:s,close:a,toggle:c}]}function LG(e,t,n={autoInvoke:!1}){const r=_.useRef(null),o=_.useRef(null),i=_.useCallback((...a)=>{o.current||(o.current=window.setTimeout(()=>{r.current(a),o.current=null},t))},[t]),s=_.useCallback(()=>{o.current&&(window.clearTimeout(o.current),o.current=null)},[]);return _.useEffect(()=>{r.current=e},[e]),_.useEffect(()=>(n.autoInvoke&&i(),s),[s,t,n.autoInvoke,i]),{start:i,clear:s}}var yk=Object.getOwnPropertySymbols,DG=Object.prototype.hasOwnProperty,RG=Object.prototype.propertyIsEnumerable,zG=(e,t)=>{var n={};for(var r in e)DG.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&yk)for(var r of yk(e))t.indexOf(r)<0&&RG.call(e,r)&&(n[r]=e[r]);return n};function Dl(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:g,pb:v,pl:y,pr:w,bg:P,c:x,opacity:S,ff:O,fz:E,fw:$,lts:N,ta:I,lh:R,fs:B,tt:z,td:G,w:X,miw:Q,maw:V,h:H,mih:Z,mah:Y,bgsz:j,bgp:W,bgr:F,bga:K,pos:ee,top:fe,left:ie,bottom:J,right:ne,inset:le,display:_e}=t,Ne=zG(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:D3({m:n,mx:r,my:o,mt:i,mb:s,ml:a,mr:c,p:u,px:f,py:p,pt:g,pb:v,pl:y,pr:w,bg:P,c:x,opacity:S,ff:O,fz:E,fw:$,lts:N,ta:I,lh:R,fs:B,tt:z,td:G,w:X,miw:Q,maw:V,h:H,mih:Z,mah:Y,bgsz:j,bgp:W,bgr:F,bga:K,pos:ee,top:fe,left:ie,bottom:J,right:ne,inset:le,display:_e}),rest:Ne}}function AG(e,t){const n=Object.keys(e).filter(r=>r!=="base").sort((r,o)=>Ro(re({size:r,sizes:t.breakpoints}))-Ro(re({size:o,sizes:t.breakpoints})));return"base"in e?["base",...n]:n}function BG({value:e,theme:t,getValue:n,property:r}){if(e==null)return;if(typeof e=="object")return AG(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 FG(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 VG(e){return M(e)}function HG(e){return e}function WG(e,t){return re({size:e,sizes:t.fontSizes})}const UG=["-xs","-sm","-md","-lg","-xl"];function ZG(e,t){return UG.includes(e)?`calc(${re({size:e.replace("-",""),sizes:t.spacing})} * -1)`:re({size:e,sizes:t.spacing})}const GG={identity:HG,color:FG,size:VG,fontSize:WG,spacing:ZG},YG={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 KG=Object.defineProperty,_k=Object.getOwnPropertySymbols,qG=Object.prototype.hasOwnProperty,JG=Object.prototype.propertyIsEnumerable,wk=(e,t,n)=>t in e?KG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bk=(e,t)=>{for(var n in t||(t={}))qG.call(t,n)&&wk(e,n,t[n]);if(_k)for(var n of _k(t))JG.call(t,n)&&wk(e,n,t[n]);return e};function xk(e,t,n=YG){return Object.keys(n).reduce((o,i)=>(i in e&&e[i]!==void 0&&o.push(BG({value:e[i],getValue:GG[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]=bk(bk({},o[s]),i[s]):o[s]=i[s]}),o),{})}function Sk(e,t){return typeof e=="function"?e(t):e}function XG(e,t,n){const r=ir(),{css:o,cx:i}=A3();return Array.isArray(e)?i(n,o(xk(t,r)),e.map(s=>o(Sk(s,r)))):i(n,o(Sk(e,r)),o(xk(t,r)))}var QG=Object.defineProperty,gm=Object.getOwnPropertySymbols,Y3=Object.prototype.hasOwnProperty,K3=Object.prototype.propertyIsEnumerable,Pk=(e,t,n)=>t in e?QG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eY=(e,t)=>{for(var n in t||(t={}))Y3.call(t,n)&&Pk(e,n,t[n]);if(gm)for(var n of gm(t))K3.call(t,n)&&Pk(e,n,t[n]);return e},tY=(e,t)=>{var n={};for(var r in e)Y3.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&gm)for(var r of gm(e))t.indexOf(r)<0&&K3.call(e,r)&&(n[r]=e[r]);return n};const q3=_.forwardRef((e,t)=>{var n=e,{className:r,component:o,style:i,sx:s}=n,a=tY(n,["className","component","style","sx"]);const{systemStyles:c,rest:u}=Dl(a),f=o||"div";return k.createElement(f,eY({ref:t,className:XG(s,c,r),style:i},u))});q3.displayName="@mantine/core/Box";const Pe=q3;var nY=Object.defineProperty,rY=Object.defineProperties,oY=Object.getOwnPropertyDescriptors,Ok=Object.getOwnPropertySymbols,iY=Object.prototype.hasOwnProperty,sY=Object.prototype.propertyIsEnumerable,Ck=(e,t,n)=>t in e?nY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kk=(e,t)=>{for(var n in t||(t={}))iY.call(t,n)&&Ck(e,n,t[n]);if(Ok)for(var n of Ok(t))sY.call(t,n)&&Ck(e,n,t[n]);return e},aY=(e,t)=>rY(e,oY(t)),lY=ue(e=>({root:aY(kk(kk({},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 cY=lY;var uY=Object.defineProperty,vm=Object.getOwnPropertySymbols,J3=Object.prototype.hasOwnProperty,X3=Object.prototype.propertyIsEnumerable,Ek=(e,t,n)=>t in e?uY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dY=(e,t)=>{for(var n in t||(t={}))J3.call(t,n)&&Ek(e,n,t[n]);if(vm)for(var n of vm(t))X3.call(t,n)&&Ek(e,n,t[n]);return e},fY=(e,t)=>{var n={};for(var r in e)J3.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&vm)for(var r of vm(e))t.indexOf(r)<0&&X3.call(e,r)&&(n[r]=e[r]);return n};const Q3=_.forwardRef((e,t)=>{const n=ae("UnstyledButton",{},e),{className:r,component:o="button",unstyled:i,variant:s}=n,a=fY(n,["className","component","unstyled","variant"]),{classes:c,cx:u}=cY(null,{name:"UnstyledButton",unstyled:i,variant:s});return k.createElement(Pe,dY({component:o,ref:t,className:u(c.root,r),type:o==="button"?"button":void 0},a))});Q3.displayName="@mantine/core/UnstyledButton";const ls=Q3;var eL={exports:{}},_o={},tL={exports:{}},nL={};/** * @license React * scheduler.production.min.js * @@ -69,7 +69,7 @@ function jH(e,t){for(var n=0;n>>1,ee=j[K];if(0>>1;Ko(J,F))neo(le,J)?(j[K]=le,j[ne]=F,K=ne):(j[K]=J,j[ie]=F,K=ie);else if(neo(le,F))j[K]=le,j[ne]=F,K=ne;else break e}}return U}function o(j,U){var F=j.sortIndex-U.sortIndex;return F!==0?F:j.id-U.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,g=3,v=!1,y=!1,w=!1,P=typeof setTimeout=="function"?setTimeout:null,x=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 O(j){for(var U=n(u);U!==null;){if(U.callback===null)r(u);else if(U.startTime<=j)r(u),U.sortIndex=U.expirationTime,t(c,U);else break;U=n(u)}}function E(j){if(w=!1,O(j),!y)if(n(c)!==null)y=!0,Z($);else{var U=n(u);U!==null&&Y(E,U.startTime-j)}}function $(j,U){y=!1,w&&(w=!1,x(R),R=-1),v=!0;var F=g;try{for(O(U),p=n(c);p!==null&&(!(p.expirationTime>U)||j&&!G());){var K=p.callback;if(typeof K=="function"){p.callback=null,g=p.priorityLevel;var ee=K(p.expirationTime<=U);U=e.unstable_now(),typeof ee=="function"?p.callback=ee:p===n(c)&&r(c),O(U)}else r(c);p=n(c)}if(p!==null)var fe=!0;else{var ie=n(u);ie!==null&&Y(E,ie.startTime-U),fe=!1}return fe}finally{p=null,g=F,v=!1}}var N=!1,I=null,R=-1,B=5,z=-1;function G(){return!(e.unstable_now()-zj||125K?(j.sortIndex=F,t(u,j),n(c)===null&&j===n(u)&&(w?(x(R),R=-1):w=!0,Y(E,F-K))):(j.sortIndex=ee,t(c,j),y||v||(y=!0,Z($))),j},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(j){var U=g;return function(){var F=g;g=U;try{return j.apply(this,arguments)}finally{g=F}}}})(nL);tL.exports=nL;var pY=tL.exports;/** + */(function(e){function t(j,W){var F=j.length;j.push(W);e:for(;0>>1,ee=j[K];if(0>>1;Ko(J,F))neo(le,J)?(j[K]=le,j[ne]=F,K=ne):(j[K]=J,j[ie]=F,K=ie);else if(neo(le,F))j[K]=le,j[ne]=F,K=ne;else break e}}return W}function o(j,W){var F=j.sortIndex-W.sortIndex;return F!==0?F:j.id-W.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,g=3,v=!1,y=!1,w=!1,P=typeof setTimeout=="function"?setTimeout:null,x=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 O(j){for(var W=n(u);W!==null;){if(W.callback===null)r(u);else if(W.startTime<=j)r(u),W.sortIndex=W.expirationTime,t(c,W);else break;W=n(u)}}function E(j){if(w=!1,O(j),!y)if(n(c)!==null)y=!0,Z($);else{var W=n(u);W!==null&&Y(E,W.startTime-j)}}function $(j,W){y=!1,w&&(w=!1,x(R),R=-1),v=!0;var F=g;try{for(O(W),p=n(c);p!==null&&(!(p.expirationTime>W)||j&&!G());){var K=p.callback;if(typeof K=="function"){p.callback=null,g=p.priorityLevel;var ee=K(p.expirationTime<=W);W=e.unstable_now(),typeof ee=="function"?p.callback=ee:p===n(c)&&r(c),O(W)}else r(c);p=n(c)}if(p!==null)var fe=!0;else{var ie=n(u);ie!==null&&Y(E,ie.startTime-W),fe=!1}return fe}finally{p=null,g=F,v=!1}}var N=!1,I=null,R=-1,B=5,z=-1;function G(){return!(e.unstable_now()-zj||125K?(j.sortIndex=F,t(u,j),n(c)===null&&j===n(u)&&(w?(x(R),R=-1):w=!0,Y(E,F-K))):(j.sortIndex=ee,t(c,j),y||v||(y=!0,Z($))),j},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(j){var W=g;return function(){var F=g;g=W;try{return j.apply(this,arguments)}finally{g=F}}}})(nL);tL.exports=nL;var pY=tL.exports;/** * @license React * react-dom.production.min.js * @@ -77,14 +77,14 @@ function jH(e,t){for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xw=Object.prototype.hasOwnProperty,hY=/^[: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]*$/,$k={},Mk={};function mY(e){return Xw.call(Mk,e)?!0:Xw.call($k,e)?!1:hY.test(e)?Mk[e]=!0:($k[e]=!0,!1)}function gY(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 vY(e,t,n,r){if(t===null||typeof t>"u"||gY(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 Sr(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 Hn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Hn[e]=new Sr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Hn[t]=new Sr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Hn[e]=new Sr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Hn[e]=new Sr(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){Hn[e]=new Sr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Hn[e]=new Sr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Hn[e]=new Sr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Hn[e]=new Sr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Hn[e]=new Sr(e,5,!1,e.toLowerCase(),null,!1,!1)});var mS=/[\-:]([a-z])/g;function gS(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(mS,gS);Hn[t]=new Sr(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(mS,gS);Hn[t]=new Sr(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(mS,gS);Hn[t]=new Sr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Hn[e]=new Sr(e,1,!1,e.toLowerCase(),null,!1,!1)});Hn.xlinkHref=new Sr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Hn[e]=new Sr(e,1,!1,e.toLowerCase(),null,!0,!0)});function vS(e,t,n,r){var o=Hn.hasOwnProperty(t)?Hn[t]:null;(o!==null?o.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Jw=Object.prototype.hasOwnProperty,hY=/^[: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]*$/,$k={},Mk={};function mY(e){return Jw.call(Mk,e)?!0:Jw.call($k,e)?!1:hY.test(e)?Mk[e]=!0:($k[e]=!0,!1)}function gY(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 vY(e,t,n,r){if(t===null||typeof t>"u"||gY(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 Sr(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 Hn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Hn[e]=new Sr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Hn[t]=new Sr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Hn[e]=new Sr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Hn[e]=new Sr(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){Hn[e]=new Sr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Hn[e]=new Sr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Hn[e]=new Sr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Hn[e]=new Sr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Hn[e]=new Sr(e,5,!1,e.toLowerCase(),null,!1,!1)});var hS=/[\-:]([a-z])/g;function mS(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(hS,mS);Hn[t]=new Sr(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(hS,mS);Hn[t]=new Sr(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(hS,mS);Hn[t]=new Sr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Hn[e]=new Sr(e,1,!1,e.toLowerCase(),null,!1,!1)});Hn.xlinkHref=new Sr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Hn[e]=new Sr(e,1,!1,e.toLowerCase(),null,!0,!0)});function gS(e,t,n,r){var o=Hn.hasOwnProperty(t)?Hn[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{i_=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?pd(e):""}function yY(e){switch(e.tag){case 5:return pd(e.type);case 16:return pd("Lazy");case 13:return pd("Suspense");case 19:return pd("SuspenseList");case 0:case 2:case 15:return e=s_(e.type,!1),e;case 11:return e=s_(e.type.render,!1),e;case 1:return e=s_(e.type,!0),e;default:return""}}function nb(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 Qw:return"Profiler";case yS:return"StrictMode";case eb:return"Suspense";case tb:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case sL:return(e.displayName||"Context")+".Consumer";case iL:return(e._context.displayName||"Context")+".Provider";case _S:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case wS:return t=e.displayName||null,t!==null?t:nb(e.type)||"Memo";case Vs:t=e._payload,e=e._init;try{return nb(e(t))}catch{}}return null}function _Y(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 nb(t);case 8:return t===yS?"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 xa(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function lL(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function wY(e){var t=lL(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 Op(e){e._valueTracker||(e._valueTracker=wY(e))}function cL(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=lL(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function _m(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 rb(e,t){var n=t.checked;return Ut({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Tk(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=xa(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 uL(e,t){t=t.checked,t!=null&&vS(e,"checked",t,!1)}function ob(e,t){uL(e,t);var n=xa(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")?ib(e,t.type,n):t.hasOwnProperty("defaultValue")&&ib(e,t.type,xa(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ik(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 ib(e,t,n){(t!=="number"||_m(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var hd=Array.isArray;function Ac(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Cp.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Jd(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Cd={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},bY=["Webkit","ms","Moz","O"];Object.keys(Cd).forEach(function(e){bY.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Cd[t]=Cd[e]})});function hL(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Cd.hasOwnProperty(e)&&Cd[e]?(""+t).trim():t+"px"}function mL(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=hL(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var xY=Ut({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 lb(e,t){if(t){if(xY[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ce(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ce(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ce(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ce(62))}}function cb(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 ub=null;function bS(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var db=null,Bc=null,Fc=null;function Dk(e){if(e=Rf(e)){if(typeof db!="function")throw Error(ce(280));var t=e.stateNode;t&&(t=m0(t),db(e.stateNode,e.type,t))}}function gL(e){Bc?Fc?Fc.push(e):Fc=[e]:Bc=e}function vL(){if(Bc){var e=Bc,t=Fc;if(Fc=Bc=null,Dk(e),t)for(e=0;e>>=0,e===0?32:31-(IY(e)/jY|0)|0}var kp=64,Ep=4194304;function md(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 Sm(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=md(a):(i&=s,i!==0&&(r=md(i)))}else s=n&~o,s!==0?r=md(s):i!==0&&(r=md(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 Lf(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Jo(t),e[t]=n}function zY(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=Ed),Uk=String.fromCharCode(32),Zk=!1;function RL(e,t){switch(e){case"keyup":return fK.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zL(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wc=!1;function hK(e,t){switch(e){case"compositionend":return zL(t);case"keypress":return t.which!==32?null:(Zk=!0,Uk);case"textInput":return e=t.data,e===Uk&&Zk?null:e;default:return null}}function mK(e,t){if(wc)return e==="compositionend"||!$S&&RL(e,t)?(e=LL(),jh=CS=qs=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=qk(n)}}function VL(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?VL(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function HL(){for(var e=window,t=_m();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=_m(e.document)}return t}function MS(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 PK(e){var t=HL(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&VL(n.ownerDocument.documentElement,n)){if(r!==null&&MS(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=Jk(n,i);var s=Jk(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,vb=null,Md=null,yb=!1;function Xk(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;yb||bc==null||bc!==_m(r)||(r=bc,"selectionStart"in r&&MS(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}),Md&&rf(Md,r)||(Md=r,r=Cm(vb,"onSelect"),0Pc||(e.current=Pb[Pc],Pb[Pc]=null,Pc--)}function kt(e,t){Pc++,Pb[Pc]=e.current,e.current=t}var Sa={},rr=Na(Sa),Br=Na(!1),Ol=Sa;function Qc(e,t){var n=e.type.contextTypes;if(!n)return Sa;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 Fr(e){return e=e.childContextTypes,e!=null}function Em(){Dt(Br),Dt(rr)}function i2(e,t,n){if(rr.current!==Sa)throw Error(ce(168));kt(rr,t),kt(Br,n)}function XL(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(ce(108,_Y(e)||"Unknown",o));return Ut({},n,r)}function $m(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Sa,Ol=rr.current,kt(rr,e),kt(Br,Br.current),!0}function s2(e,t,n){var r=e.stateNode;if(!r)throw Error(ce(169));n?(e=XL(e,t,Ol),r.__reactInternalMemoizedMergedChildContext=e,Dt(Br),Dt(rr),kt(rr,e)):Dt(Br),kt(Br,n)}var ts=null,g0=!1,w_=!1;function QL(e){ts===null?ts=[e]:ts.push(e)}function DK(e){g0=!0,QL(e)}function Ta(){if(!w_&&ts!==null){w_=!0;var e=0,t=yt;try{var n=ts;for(yt=1;e>=s,o-=s,ss=1<<32-Jo(t)+o|n<R?(B=I,I=null):B=I.sibling;var z=g(x,I,O[R],E);if(z===null){I===null&&(I=B);break}e&&I&&z.alternate===null&&t(x,I),S=i(z,S,R),N===null?$=z:N.sibling=z,N=z,I=B}if(R===O.length)return n(x,I),zt&&Ja(x,R),$;if(I===null){for(;RR?(B=I,I=null):B=I.sibling;var G=g(x,I,z.value,E);if(G===null){I===null&&(I=B);break}e&&I&&G.alternate===null&&t(x,I),S=i(G,S,R),N===null?$=G:N.sibling=G,N=G,I=B}if(z.done)return n(x,I),zt&&Ja(x,R),$;if(I===null){for(;!z.done;R++,z=O.next())z=p(x,z.value,E),z!==null&&(S=i(z,S,R),N===null?$=z:N.sibling=z,N=z);return zt&&Ja(x,R),$}for(I=r(x,I);!z.done;R++,z=O.next())z=v(I,x,R,z.value,E),z!==null&&(e&&z.alternate!==null&&I.delete(z.key===null?R:z.key),S=i(z,S,R),N===null?$=z:N.sibling=z,N=z);return e&&I.forEach(function(X){return t(x,X)}),zt&&Ja(x,R),$}function P(x,S,O,E){if(typeof O=="object"&&O!==null&&O.type===_c&&O.key===null&&(O=O.props.children),typeof O=="object"&&O!==null){switch(O.$$typeof){case Pp:e:{for(var $=O.key,N=S;N!==null;){if(N.key===$){if($=O.type,$===_c){if(N.tag===7){n(x,N.sibling),S=o(N,O.props.children),S.return=x,x=S;break e}}else if(N.elementType===$||typeof $=="object"&&$!==null&&$.$$typeof===Vs&&p2($)===N.type){n(x,N.sibling),S=o(N,O.props),S.ref=nd(x,N,O),S.return=x,x=S;break e}n(x,N);break}else t(x,N);N=N.sibling}O.type===_c?(S=yl(O.props.children,x.mode,E,O.key),S.return=x,x=S):(E=Vh(O.type,O.key,O.props,null,x.mode,E),E.ref=nd(x,S,O),E.return=x,x=E)}return s(x);case yc:e:{for(N=O.key;S!==null;){if(S.key===N)if(S.tag===4&&S.stateNode.containerInfo===O.containerInfo&&S.stateNode.implementation===O.implementation){n(x,S.sibling),S=o(S,O.children||[]),S.return=x,x=S;break e}else{n(x,S);break}else t(x,S);S=S.sibling}S=E_(O,x.mode,E),S.return=x,x=S}return s(x);case Vs:return N=O._init,P(x,S,N(O._payload),E)}if(hd(O))return y(x,S,O,E);if(Ju(O))return w(x,S,O,E);Lp(x,O)}return typeof O=="string"&&O!==""||typeof O=="number"?(O=""+O,S!==null&&S.tag===6?(n(x,S.sibling),S=o(S,O),S.return=x,x=S):(n(x,S),S=k_(O,x.mode,E),S.return=x,x=S),s(x)):n(x,S)}return P}var tu=aD(!0),lD=aD(!1),zf={},Ii=Na(zf),lf=Na(zf),cf=Na(zf);function ul(e){if(e===zf)throw Error(ce(174));return e}function AS(e,t){switch(kt(cf,t),kt(lf,e),kt(Ii,zf),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ab(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ab(t,e)}Dt(Ii),kt(Ii,t)}function nu(){Dt(Ii),Dt(lf),Dt(cf)}function cD(e){ul(cf.current);var t=ul(Ii.current),n=ab(t,e.type);t!==n&&(kt(lf,e),kt(Ii,n))}function BS(e){lf.current===e&&(Dt(Ii),Dt(lf))}var Ht=Na(0);function Lm(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 b_=[];function FS(){for(var e=0;en?n:4,e(!0);var r=x_.transition;x_.transition={};try{e(!1),t()}finally{yt=n,x_.transition=r}}function OD(){return Ao().memoizedState}function BK(e,t,n){var r=fa(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},CD(e))kD(t,n);else if(n=rD(e,t,n,r),n!==null){var o=vr();Xo(n,e,r,o),ED(n,t,r)}}function FK(e,t,n){var r=fa(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(CD(e))kD(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,ei(a,s)){var c=t.interleaved;c===null?(o.next=o,RS(t)):(o.next=c.next,c.next=o),t.interleaved=o;return}}catch{}finally{}n=rD(e,t,o,r),n!==null&&(o=vr(),Xo(n,e,r,o),ED(n,t,r))}}function CD(e){var t=e.alternate;return e===Wt||t!==null&&t===Wt}function kD(e,t){Nd=Dm=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ED(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,SS(e,n)}}var Rm={readContext:zo,useCallback:Kn,useContext:Kn,useEffect:Kn,useImperativeHandle:Kn,useInsertionEffect:Kn,useLayoutEffect:Kn,useMemo:Kn,useReducer:Kn,useRef:Kn,useState:Kn,useDebugValue:Kn,useDeferredValue:Kn,useTransition:Kn,useMutableSource:Kn,useSyncExternalStore:Kn,useId:Kn,unstable_isNewReconciler:!1},VK={readContext:zo,useCallback:function(e,t){return gi().memoizedState=[e,t===void 0?null:t],e},useContext:zo,useEffect:m2,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,zh(4194308,4,wD.bind(null,t,e),n)},useLayoutEffect:function(e,t){return zh(4194308,4,e,t)},useInsertionEffect:function(e,t){return zh(4,2,e,t)},useMemo:function(e,t){var n=gi();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=gi();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=BK.bind(null,Wt,e),[r.memoizedState,e]},useRef:function(e){var t=gi();return e={current:e},t.memoizedState=e},useState:h2,useDebugValue:ZS,useDeferredValue:function(e){return gi().memoizedState=e},useTransition:function(){var e=h2(!1),t=e[0];return e=AK.bind(null,e[1]),gi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Wt,o=gi();if(zt){if(n===void 0)throw Error(ce(407));n=n()}else{if(n=t(),Cn===null)throw Error(ce(349));kl&30||fD(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,m2(hD.bind(null,r,i,e),[e]),r.flags|=2048,ff(9,pD.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=gi(),t=Cn.identifierPrefix;if(zt){var n=as,r=ss;n=(r&~(1<<32-Jo(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=uf++,0")&&(c=c.replace("",e.displayName)),c}while(1<=s&&0<=a);break}}}finally{o_=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?fd(e):""}function yY(e){switch(e.tag){case 5:return fd(e.type);case 16:return fd("Lazy");case 13:return fd("Suspense");case 19:return fd("SuspenseList");case 0:case 2:case 15:return e=i_(e.type,!1),e;case 11:return e=i_(e.type.render,!1),e;case 1:return e=i_(e.type,!0),e;default:return""}}function tb(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 Xw:return"Profiler";case vS:return"StrictMode";case Qw:return"Suspense";case eb:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case sL:return(e.displayName||"Context")+".Consumer";case iL:return(e._context.displayName||"Context")+".Provider";case yS:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case _S:return t=e.displayName||null,t!==null?t:tb(e.type)||"Memo";case Vs:t=e._payload,e=e._init;try{return tb(e(t))}catch{}}return null}function _Y(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 tb(t);case 8:return t===vS?"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 xa(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function lL(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function wY(e){var t=lL(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 Pp(e){e._valueTracker||(e._valueTracker=wY(e))}function cL(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=lL(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ym(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 nb(e,t){var n=t.checked;return Ut({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Tk(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=xa(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 uL(e,t){t=t.checked,t!=null&&gS(e,"checked",t,!1)}function rb(e,t){uL(e,t);var n=xa(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")?ob(e,t.type,n):t.hasOwnProperty("defaultValue")&&ob(e,t.type,xa(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ik(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 ob(e,t,n){(t!=="number"||ym(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var pd=Array.isArray;function Ac(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Op.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function qd(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Od={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},bY=["Webkit","ms","Moz","O"];Object.keys(Od).forEach(function(e){bY.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Od[t]=Od[e]})});function hL(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Od.hasOwnProperty(e)&&Od[e]?(""+t).trim():t+"px"}function mL(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=hL(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var xY=Ut({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 ab(e,t){if(t){if(xY[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ce(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ce(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ce(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ce(62))}}function lb(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 cb=null;function wS(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ub=null,Bc=null,Fc=null;function Dk(e){if(e=Df(e)){if(typeof ub!="function")throw Error(ce(280));var t=e.stateNode;t&&(t=h0(t),ub(e.stateNode,e.type,t))}}function gL(e){Bc?Fc?Fc.push(e):Fc=[e]:Bc=e}function vL(){if(Bc){var e=Bc,t=Fc;if(Fc=Bc=null,Dk(e),t)for(e=0;e>>=0,e===0?32:31-(IY(e)/jY|0)|0}var Cp=64,kp=4194304;function hd(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 xm(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=hd(a):(i&=s,i!==0&&(r=hd(i)))}else s=n&~o,s!==0?r=hd(s):i!==0&&(r=hd(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 jf(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Jo(t),e[t]=n}function zY(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=kd),Uk=String.fromCharCode(32),Zk=!1;function RL(e,t){switch(e){case"keyup":return fK.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zL(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wc=!1;function hK(e,t){switch(e){case"compositionend":return zL(t);case"keypress":return t.which!==32?null:(Zk=!0,Uk);case"textInput":return e=t.data,e===Uk&&Zk?null:e;default:return null}}function mK(e,t){if(wc)return e==="compositionend"||!ES&&RL(e,t)?(e=LL(),Ih=OS=qs=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=qk(n)}}function VL(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?VL(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function HL(){for(var e=window,t=ym();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ym(e.document)}return t}function $S(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 PK(e){var t=HL(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&VL(n.ownerDocument.documentElement,n)){if(r!==null&&$S(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=Jk(n,i);var s=Jk(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,gb=null,$d=null,vb=!1;function Xk(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;vb||bc==null||bc!==ym(r)||(r=bc,"selectionStart"in r&&$S(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}),$d&&nf($d,r)||($d=r,r=Om(gb,"onSelect"),0Pc||(e.current=Sb[Pc],Sb[Pc]=null,Pc--)}function Ct(e,t){Pc++,Sb[Pc]=e.current,e.current=t}var Sa={},rr=Na(Sa),Br=Na(!1),Ol=Sa;function Xc(e,t){var n=e.type.contextTypes;if(!n)return Sa;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 Fr(e){return e=e.childContextTypes,e!=null}function km(){Lt(Br),Lt(rr)}function i2(e,t,n){if(rr.current!==Sa)throw Error(ce(168));Ct(rr,t),Ct(Br,n)}function XL(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(ce(108,_Y(e)||"Unknown",o));return Ut({},n,r)}function Em(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Sa,Ol=rr.current,Ct(rr,e),Ct(Br,Br.current),!0}function s2(e,t,n){var r=e.stateNode;if(!r)throw Error(ce(169));n?(e=XL(e,t,Ol),r.__reactInternalMemoizedMergedChildContext=e,Lt(Br),Lt(rr),Ct(rr,e)):Lt(Br),Ct(Br,n)}var ts=null,m0=!1,__=!1;function QL(e){ts===null?ts=[e]:ts.push(e)}function DK(e){m0=!0,QL(e)}function Ta(){if(!__&&ts!==null){__=!0;var e=0,t=yt;try{var n=ts;for(yt=1;e>=s,o-=s,ss=1<<32-Jo(t)+o|n<R?(B=I,I=null):B=I.sibling;var z=g(x,I,O[R],E);if(z===null){I===null&&(I=B);break}e&&I&&z.alternate===null&&t(x,I),S=i(z,S,R),N===null?$=z:N.sibling=z,N=z,I=B}if(R===O.length)return n(x,I),Rt&&Ja(x,R),$;if(I===null){for(;RR?(B=I,I=null):B=I.sibling;var G=g(x,I,z.value,E);if(G===null){I===null&&(I=B);break}e&&I&&G.alternate===null&&t(x,I),S=i(G,S,R),N===null?$=G:N.sibling=G,N=G,I=B}if(z.done)return n(x,I),Rt&&Ja(x,R),$;if(I===null){for(;!z.done;R++,z=O.next())z=p(x,z.value,E),z!==null&&(S=i(z,S,R),N===null?$=z:N.sibling=z,N=z);return Rt&&Ja(x,R),$}for(I=r(x,I);!z.done;R++,z=O.next())z=v(I,x,R,z.value,E),z!==null&&(e&&z.alternate!==null&&I.delete(z.key===null?R:z.key),S=i(z,S,R),N===null?$=z:N.sibling=z,N=z);return e&&I.forEach(function(X){return t(x,X)}),Rt&&Ja(x,R),$}function P(x,S,O,E){if(typeof O=="object"&&O!==null&&O.type===_c&&O.key===null&&(O=O.props.children),typeof O=="object"&&O!==null){switch(O.$$typeof){case Sp:e:{for(var $=O.key,N=S;N!==null;){if(N.key===$){if($=O.type,$===_c){if(N.tag===7){n(x,N.sibling),S=o(N,O.props.children),S.return=x,x=S;break e}}else if(N.elementType===$||typeof $=="object"&&$!==null&&$.$$typeof===Vs&&p2($)===N.type){n(x,N.sibling),S=o(N,O.props),S.ref=td(x,N,O),S.return=x,x=S;break e}n(x,N);break}else t(x,N);N=N.sibling}O.type===_c?(S=yl(O.props.children,x.mode,E,O.key),S.return=x,x=S):(E=Fh(O.type,O.key,O.props,null,x.mode,E),E.ref=td(x,S,O),E.return=x,x=E)}return s(x);case yc:e:{for(N=O.key;S!==null;){if(S.key===N)if(S.tag===4&&S.stateNode.containerInfo===O.containerInfo&&S.stateNode.implementation===O.implementation){n(x,S.sibling),S=o(S,O.children||[]),S.return=x,x=S;break e}else{n(x,S);break}else t(x,S);S=S.sibling}S=k_(O,x.mode,E),S.return=x,x=S}return s(x);case Vs:return N=O._init,P(x,S,N(O._payload),E)}if(pd(O))return y(x,S,O,E);if(qu(O))return w(x,S,O,E);jp(x,O)}return typeof O=="string"&&O!==""||typeof O=="number"?(O=""+O,S!==null&&S.tag===6?(n(x,S.sibling),S=o(S,O),S.return=x,x=S):(n(x,S),S=C_(O,x.mode,E),S.return=x,x=S),s(x)):n(x,S)}return P}var eu=aD(!0),lD=aD(!1),Rf={},Ti=Na(Rf),af=Na(Rf),lf=Na(Rf);function ul(e){if(e===Rf)throw Error(ce(174));return e}function zS(e,t){switch(Ct(lf,t),Ct(af,e),Ct(Ti,Rf),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:sb(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=sb(t,e)}Lt(Ti),Ct(Ti,t)}function tu(){Lt(Ti),Lt(af),Lt(lf)}function cD(e){ul(lf.current);var t=ul(Ti.current),n=sb(t,e.type);t!==n&&(Ct(af,e),Ct(Ti,n))}function AS(e){af.current===e&&(Lt(Ti),Lt(af))}var Ht=Na(0);function jm(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 w_=[];function BS(){for(var e=0;en?n:4,e(!0);var r=b_.transition;b_.transition={};try{e(!1),t()}finally{yt=n,b_.transition=r}}function OD(){return Ao().memoizedState}function BK(e,t,n){var r=fa(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},CD(e))kD(t,n);else if(n=rD(e,t,n,r),n!==null){var o=vr();Xo(n,e,r,o),ED(n,t,r)}}function FK(e,t,n){var r=fa(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(CD(e))kD(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,ei(a,s)){var c=t.interleaved;c===null?(o.next=o,DS(t)):(o.next=c.next,c.next=o),t.interleaved=o;return}}catch{}finally{}n=rD(e,t,o,r),n!==null&&(o=vr(),Xo(n,e,r,o),ED(n,t,r))}}function CD(e){var t=e.alternate;return e===Wt||t!==null&&t===Wt}function kD(e,t){Md=Lm=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ED(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,xS(e,n)}}var Dm={readContext:zo,useCallback:Kn,useContext:Kn,useEffect:Kn,useImperativeHandle:Kn,useInsertionEffect:Kn,useLayoutEffect:Kn,useMemo:Kn,useReducer:Kn,useRef:Kn,useState:Kn,useDebugValue:Kn,useDeferredValue:Kn,useTransition:Kn,useMutableSource:Kn,useSyncExternalStore:Kn,useId:Kn,unstable_isNewReconciler:!1},VK={readContext:zo,useCallback:function(e,t){return mi().memoizedState=[e,t===void 0?null:t],e},useContext:zo,useEffect:m2,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Rh(4194308,4,wD.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Rh(4194308,4,e,t)},useInsertionEffect:function(e,t){return Rh(4,2,e,t)},useMemo:function(e,t){var n=mi();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=mi();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=BK.bind(null,Wt,e),[r.memoizedState,e]},useRef:function(e){var t=mi();return e={current:e},t.memoizedState=e},useState:h2,useDebugValue:US,useDeferredValue:function(e){return mi().memoizedState=e},useTransition:function(){var e=h2(!1),t=e[0];return e=AK.bind(null,e[1]),mi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Wt,o=mi();if(Rt){if(n===void 0)throw Error(ce(407));n=n()}else{if(n=t(),Cn===null)throw Error(ce(349));kl&30||fD(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,m2(hD.bind(null,r,i,e),[e]),r.flags|=2048,df(9,pD.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=mi(),t=Cn.identifierPrefix;if(Rt){var n=as,r=ss;n=(r&~(1<<32-Jo(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=cf++,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[Oi]=t,e[af]=r,RD(e,t,!1,!1),t.stateNode=e;e:{switch(s=cb(n,r),n){case"dialog":Tt("cancel",e),Tt("close",e),o=r;break;case"iframe":case"object":case"embed":Tt("load",e),o=r;break;case"video":case"audio":for(o=0;oou&&(t.flags|=128,r=!0,rd(i,!1),t.lanes=4194304)}else{if(!r)if(e=Lm(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),rd(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!zt)return qn(t),null}else 2*Qt()-i.renderingStartTime>ou&&n!==1073741824&&(t.flags|=128,r=!0,rd(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=Qt(),t.sibling=null,n=Ht.current,kt(Ht,r?n&1|2:n&1),t):(qn(t),null);case 22:case 23:return XS(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?oo&1073741824&&(qn(t),t.subtreeFlags&6&&(t.flags|=8192)):qn(t),null;case 24:return null;case 25:return null}throw Error(ce(156,t.tag))}function qK(e,t){switch(TS(t),t.tag){case 1:return Fr(t.type)&&Em(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return nu(),Dt(Br),Dt(rr),FS(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return BS(t),null;case 13:if(Dt(Ht),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ce(340));eu()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Dt(Ht),null;case 4:return nu(),null;case 10:return DS(t.type._context),null;case 22:case 23:return XS(),null;case 24:return null;default:return null}}var Rp=!1,er=!1,JK=typeof WeakSet=="function"?WeakSet:Set,xe=null;function Ec(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Yt(e,t,r)}else n.current=null}function Db(e,t,n){try{n()}catch(r){Yt(e,t,r)}}var P2=!1;function XK(e,t){if(_b=Pm,e=HL(),MS(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,g=null;t:for(;;){for(var v;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),(v=p.firstChild)!==null;)g=p,p=v;for(;;){if(p===e)break t;if(g===n&&++u===o&&(a=s),g===i&&++f===r&&(c=s),(v=p.nextSibling)!==null)break;p=g,g=p.parentNode}p=v}n=a===-1||c===-1?null:{start:a,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(wb={focusedElem:e,selectionRange:n},Pm=!1,xe=t;xe!==null;)if(t=xe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,xe=e;else for(;xe!==null;){t=xe;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 w=y.memoizedProps,P=y.memoizedState,x=t.stateNode,S=x.getSnapshotBeforeUpdate(t.elementType===t.type?w:Zo(t.type,w),P);x.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var O=t.stateNode.containerInfo;O.nodeType===1?O.textContent="":O.nodeType===9&&O.documentElement&&O.removeChild(O.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ce(163))}}catch(E){Yt(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,xe=e;break}xe=t.return}return y=P2,P2=!1,y}function Td(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&&Db(t,n,i)}o=o.next}while(o!==r)}}function _0(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 Rb(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 BD(e){var t=e.alternate;t!==null&&(e.alternate=null,BD(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Oi],delete t[af],delete t[Sb],delete t[jK],delete t[LK])),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 FD(e){return e.tag===5||e.tag===3||e.tag===4}function O2(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||FD(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 zb(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=km));else if(r!==4&&(e=e.child,e!==null))for(zb(e,t,n),e=e.sibling;e!==null;)zb(e,t,n),e=e.sibling}function Ab(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(Ab(e,t,n),e=e.sibling;e!==null;)Ab(e,t,n),e=e.sibling}var jn=null,Go=!1;function Ns(e,t,n){for(n=n.child;n!==null;)VD(e,t,n),n=n.sibling}function VD(e,t,n){if(Ti&&typeof Ti.onCommitFiberUnmount=="function")try{Ti.onCommitFiberUnmount(d0,n)}catch{}switch(n.tag){case 5:er||Ec(n,t);case 6:var r=jn,o=Go;jn=null,Ns(e,t,n),jn=r,Go=o,jn!==null&&(Go?(e=jn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):jn.removeChild(n.stateNode));break;case 18:jn!==null&&(Go?(e=jn,n=n.stateNode,e.nodeType===8?__(e.parentNode,n):e.nodeType===1&&__(e,n),tf(e)):__(jn,n.stateNode));break;case 4:r=jn,o=Go,jn=n.stateNode.containerInfo,Go=!0,Ns(e,t,n),jn=r,Go=o;break;case 0:case 11:case 14:case 15:if(!er&&(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)&&Db(n,t,s),o=o.next}while(o!==r)}Ns(e,t,n);break;case 1:if(!er&&(Ec(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Yt(n,t,a)}Ns(e,t,n);break;case 21:Ns(e,t,n);break;case 22:n.mode&1?(er=(r=er)||n.memoizedState!==null,Ns(e,t,n),er=r):Ns(e,t,n);break;default:Ns(e,t,n)}}function C2(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new JK),t.forEach(function(r){var o=aq.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Wo(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=Qt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*eq(r/1960))-r,10e?16:e,Js===null)var r=!1;else{if(e=Js,Js=null,Bm=0,ot&6)throw Error(ce(331));var o=ot;for(ot|=4,xe=e.current;xe!==null;){var i=xe,s=i.child;if(xe.flags&16){var a=i.deletions;if(a!==null){for(var c=0;cQt()-qS?vl(e,0):KS|=n),Vr(e,t)}function qD(e,t){t===0&&(e.mode&1?(t=Ep,Ep<<=1,!(Ep&130023424)&&(Ep=4194304)):t=1);var n=vr();e=hs(e,t),e!==null&&(Lf(e,t,n),Vr(e,n))}function sq(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qD(e,n)}function aq(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(ce(314))}r!==null&&r.delete(t),qD(e,n)}var JD;JD=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Br.current)zr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return zr=!1,YK(e,t,n);zr=!!(e.flags&131072)}else zr=!1,zt&&t.flags&1048576&&eD(t,Nm,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ah(e,t),e=t.pendingProps;var o=Qc(t,rr.current);Hc(t,n),o=HS(null,t,r,e,o,n);var i=WS();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,Fr(r)?(i=!0,$m(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,zS(t),o.updater=v0,t.stateNode=o,o._reactInternals=t,$b(t,r,e,n),t=Tb(null,t,r,!0,i,n)):(t.tag=0,zt&&i&&NS(t),pr(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ah(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=cq(r),e=Zo(r,e),o){case 0:t=Nb(null,t,r,e,n);break e;case 1:t=b2(null,t,r,e,n);break e;case 11:t=_2(null,t,r,e,n);break e;case 14:t=w2(null,t,r,Zo(r.type,e),n);break e}throw Error(ce(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Zo(r,o),Nb(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Zo(r,o),b2(e,t,r,o,n);case 3:e:{if(jD(t),e===null)throw Error(ce(387));r=t.pendingProps,i=t.memoizedState,o=i.element,oD(e,t),jm(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=ru(Error(ce(423)),t),t=x2(e,t,r,n,o);break e}else if(r!==o){o=ru(Error(ce(424)),t),t=x2(e,t,r,n,o);break e}else for(uo=ca(t.stateNode.containerInfo.firstChild),po=t,zt=!0,Yo=null,n=lD(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(eu(),r===o){t=ms(e,t,n);break e}pr(e,t,r,n)}t=t.child}return t;case 5:return cD(t),e===null&&Cb(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,bb(r,o)?s=null:i!==null&&bb(r,i)&&(t.flags|=32),ID(e,t),pr(e,t,s,n),t.child;case 6:return e===null&&Cb(t),null;case 13:return LD(e,t,n);case 4:return AS(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=tu(t,null,r,n):pr(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Zo(r,o),_2(e,t,r,o,n);case 7:return pr(e,t,t.pendingProps,n),t.child;case 8:return pr(e,t,t.pendingProps.children,n),t.child;case 12:return pr(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,kt(Tm,r._currentValue),r._currentValue=s,i!==null)if(ei(i.value,s)){if(i.children===o.children&&!Br.current){t=ms(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=cs(-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),kb(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(ce(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),kb(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}pr(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Hc(t,n),o=zo(o),r=r(o),t.flags|=1,pr(e,t,r,n),t.child;case 14:return r=t.type,o=Zo(r,t.pendingProps),o=Zo(r.type,o),w2(e,t,r,o,n);case 15:return ND(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Zo(r,o),Ah(e,t),t.tag=1,Fr(r)?(e=!0,$m(t)):e=!1,Hc(t,n),sD(t,r,o),$b(t,r,o,n),Tb(null,t,r,!0,e,n);case 19:return DD(e,t,n);case 22:return TD(e,t,n)}throw Error(ce(156,t.tag))};function XD(e,t){return PL(e,t)}function lq(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 To(e,t,n,r){return new lq(e,t,n,r)}function eP(e){return e=e.prototype,!(!e||!e.isReactComponent)}function cq(e){if(typeof e=="function")return eP(e)?1:0;if(e!=null){if(e=e.$$typeof,e===_S)return 11;if(e===wS)return 14}return 2}function pa(e,t){var n=e.alternate;return n===null?(n=To(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 Vh(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")eP(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case _c:return yl(n.children,o,i,t);case yS:s=8,o|=8;break;case Qw:return e=To(12,n,t,o|2),e.elementType=Qw,e.lanes=i,e;case eb:return e=To(13,n,t,o),e.elementType=eb,e.lanes=i,e;case tb:return e=To(19,n,t,o),e.elementType=tb,e.lanes=i,e;case aL:return b0(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case iL:s=10;break e;case sL:s=9;break e;case _S:s=11;break e;case wS:s=14;break e;case Vs:s=16,r=null;break e}throw Error(ce(130,e==null?e:typeof e,""))}return t=To(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function yl(e,t,n,r){return e=To(7,e,r,t),e.lanes=n,e}function b0(e,t,n,r){return e=To(22,e,r,t),e.elementType=aL,e.lanes=n,e.stateNode={isHidden:!1},e}function k_(e,t,n){return e=To(6,e,null,t),e.lanes=n,e}function E_(e,t,n){return t=To(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function uq(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=l_(0),this.expirationTimes=l_(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=l_(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function tP(e,t,n,r,o,i,s,a,c){return e=new uq(e,t,n,a,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=To(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},zS(i),e}function dq(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(nR)}catch(e){console.error(e)}}nR(),eL.exports=_o;var xs=eL.exports;const gq=Ea(xs);var vq=Object.defineProperty,Hm=Object.getOwnPropertySymbols,rR=Object.prototype.hasOwnProperty,oR=Object.prototype.propertyIsEnumerable,j2=(e,t,n)=>t in e?vq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,L2=(e,t)=>{for(var n in t||(t={}))rR.call(t,n)&&j2(e,n,t[n]);if(Hm)for(var n of Hm(t))oR.call(t,n)&&j2(e,n,t[n]);return e},yq=(e,t)=>{var n={};for(var r in e)rR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Hm)for(var r of Hm(e))t.indexOf(r)<0&&oR.call(e,r)&&(n[r]=e[r]);return n};function _q(e){const t=e,{style:n}=t,r=yq(t,["style"]);return k.createElement("svg",L2({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:L2({width:M(16),height:M(16)},n)},r),k.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"}))}var wq=Object.defineProperty,bq=Object.defineProperties,xq=Object.getOwnPropertyDescriptors,D2=Object.getOwnPropertySymbols,Sq=Object.prototype.hasOwnProperty,Pq=Object.prototype.propertyIsEnumerable,R2=(e,t,n)=>t in e?wq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Wb=(e,t)=>{for(var n in t||(t={}))Sq.call(t,n)&&R2(e,n,t[n]);if(D2)for(var n of D2(t))Pq.call(t,n)&&R2(e,n,t[n]);return e},z2=(e,t)=>bq(e,xq(t));const Oq=["subtle","filled","outline","light","default","transparent","gradient"],Bp={xs:M(18),sm:M(22),md:M(28),lg:M(34),xl:M(44)};function Cq({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%"})}:Oq.includes(e)?Wb({border:`${M(1)} solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover})):null}var kq=ue((e,{radius:t,color:n,gradient:r},{variant:o,size:i})=>({root:z2(Wb({position:"relative",borderRadius:e.fn.radius(t),padding:0,lineHeight:1,display:"flex",alignItems:"center",justifyContent:"center",height:re({size:i,sizes:Bp}),minHeight:re({size:i,sizes:Bp}),width:re({size:i,sizes:Bp}),minWidth:re({size:i,sizes:Bp})},Cq({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":z2(Wb({content:'""'},e.fn.cover(M(-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 Eq=kq;var $q=Object.defineProperty,Wm=Object.getOwnPropertySymbols,iR=Object.prototype.hasOwnProperty,sR=Object.prototype.propertyIsEnumerable,A2=(e,t,n)=>t in e?$q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,B2=(e,t)=>{for(var n in t||(t={}))iR.call(t,n)&&A2(e,n,t[n]);if(Wm)for(var n of Wm(t))sR.call(t,n)&&A2(e,n,t[n]);return e},F2=(e,t)=>{var n={};for(var r in e)iR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Wm)for(var r of Wm(e))t.indexOf(r)<0&&sR.call(e,r)&&(n[r]=e[r]);return n};function Mq(e){var t=e,{size:n,color:r}=t,o=F2(t,["size","color"]);const i=o,{style:s}=i,a=F2(i,["style"]);return k.createElement("svg",B2({viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:r,style:B2({width:n},s)},a),k.createElement("rect",{y:"10",width:"15",height:"120",rx:"6"},k.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"}),k.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"})),k.createElement("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},k.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"}),k.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"})),k.createElement("rect",{x:"60",width:"15",height:"140",rx:"6"},k.createElement("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),k.createElement("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),k.createElement("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},k.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"}),k.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"})),k.createElement("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},k.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"}),k.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 Nq=Object.defineProperty,Um=Object.getOwnPropertySymbols,aR=Object.prototype.hasOwnProperty,lR=Object.prototype.propertyIsEnumerable,V2=(e,t,n)=>t in e?Nq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,H2=(e,t)=>{for(var n in t||(t={}))aR.call(t,n)&&V2(e,n,t[n]);if(Um)for(var n of Um(t))lR.call(t,n)&&V2(e,n,t[n]);return e},W2=(e,t)=>{var n={};for(var r in e)aR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Um)for(var r of Um(e))t.indexOf(r)<0&&lR.call(e,r)&&(n[r]=e[r]);return n};function Tq(e){var t=e,{size:n,color:r}=t,o=W2(t,["size","color"]);const i=o,{style:s}=i,a=W2(i,["style"]);return k.createElement("svg",H2({viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:r,style:H2({width:n,height:n},s)},a),k.createElement("g",{fill:"none",fillRule:"evenodd"},k.createElement("g",{transform:"translate(2.5 2.5)",strokeWidth:"5"},k.createElement("circle",{strokeOpacity:".5",cx:"16",cy:"16",r:"16"}),k.createElement("path",{d:"M32 16c0-9.94-8.06-16-16-16"},k.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"1s",repeatCount:"indefinite"})))))}var Iq=Object.defineProperty,Zm=Object.getOwnPropertySymbols,cR=Object.prototype.hasOwnProperty,uR=Object.prototype.propertyIsEnumerable,U2=(e,t,n)=>t in e?Iq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Z2=(e,t)=>{for(var n in t||(t={}))cR.call(t,n)&&U2(e,n,t[n]);if(Zm)for(var n of Zm(t))uR.call(t,n)&&U2(e,n,t[n]);return e},G2=(e,t)=>{var n={};for(var r in e)cR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Zm)for(var r of Zm(e))t.indexOf(r)<0&&uR.call(e,r)&&(n[r]=e[r]);return n};function jq(e){var t=e,{size:n,color:r}=t,o=G2(t,["size","color"]);const i=o,{style:s}=i,a=G2(i,["style"]);return k.createElement("svg",Z2({viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:r,style:Z2({width:n},s)},a),k.createElement("circle",{cx:"15",cy:"15",r:"15"},k.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),k.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})),k.createElement("circle",{cx:"60",cy:"15",r:"9",fillOpacity:"0.3"},k.createElement("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),k.createElement("animate",{attributeName:"fill-opacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})),k.createElement("circle",{cx:"105",cy:"15",r:"15"},k.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),k.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})))}var Lq=Object.defineProperty,Gm=Object.getOwnPropertySymbols,dR=Object.prototype.hasOwnProperty,fR=Object.prototype.propertyIsEnumerable,Y2=(e,t,n)=>t in e?Lq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Dq=(e,t)=>{for(var n in t||(t={}))dR.call(t,n)&&Y2(e,n,t[n]);if(Gm)for(var n of Gm(t))fR.call(t,n)&&Y2(e,n,t[n]);return e},Rq=(e,t)=>{var n={};for(var r in e)dR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Gm)for(var r of Gm(e))t.indexOf(r)<0&&fR.call(e,r)&&(n[r]=e[r]);return n};const $_={bars:Mq,oval:Tq,dots:jq},zq={xs:M(18),sm:M(22),md:M(36),lg:M(44),xl:M(58)},Aq={size:"md"};function en(e){const t=ae("Loader",Aq,e),{size:n,color:r,variant:o}=t,i=Rq(t,["size","color","variant"]),s=ir(),a=o in $_?o:s.loader;return k.createElement(Pe,Dq({role:"presentation",component:$_[a]||$_.bars,size:re({size:n,sizes:zq}),color:s.fn.variant({variant:"filled",primaryFallback:!1,color:r||s.primaryColor}).background},i))}en.displayName="@mantine/core/Loader";var Bq=Object.defineProperty,Ym=Object.getOwnPropertySymbols,pR=Object.prototype.hasOwnProperty,hR=Object.prototype.propertyIsEnumerable,K2=(e,t,n)=>t in e?Bq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,q2=(e,t)=>{for(var n in t||(t={}))pR.call(t,n)&&K2(e,n,t[n]);if(Ym)for(var n of Ym(t))hR.call(t,n)&&K2(e,n,t[n]);return e},Fq=(e,t)=>{var n={};for(var r in e)pR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ym)for(var r of Ym(e))t.indexOf(r)<0&&hR.call(e,r)&&(n[r]=e[r]);return n};const Vq={color:"gray",size:"md",variant:"subtle"},mR=_.forwardRef((e,t)=>{const n=ae("ActionIcon",Vq,e),{className:r,color:o,children:i,radius:s,size:a,variant:c,gradient:u,disabled:f,loaderProps:p,loading:g,unstyled:v,__staticSelector:y}=n,w=Fq(n,["className","color","children","radius","size","variant","gradient","disabled","loaderProps","loading","unstyled","__staticSelector"]),{classes:P,cx:x,theme:S}=Eq({radius:s,color:o,gradient:u},{name:["ActionIcon",y],unstyled:v,size:a,variant:c}),O=k.createElement(en,q2({color:S.fn.variant({color:o,variant:c}).color,size:"100%","data-action-icon-loader":!0},p));return k.createElement(ls,q2({className:x(P.root,r),ref:t,disabled:f,"data-disabled":f||void 0,"data-loading":g||void 0,unstyled:v},w),g?O:i)});mR.displayName="@mantine/core/ActionIcon";const Qe=mR;var Hq=Object.defineProperty,Wq=Object.defineProperties,Uq=Object.getOwnPropertyDescriptors,Km=Object.getOwnPropertySymbols,gR=Object.prototype.hasOwnProperty,vR=Object.prototype.propertyIsEnumerable,J2=(e,t,n)=>t in e?Hq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zq=(e,t)=>{for(var n in t||(t={}))gR.call(t,n)&&J2(e,n,t[n]);if(Km)for(var n of Km(t))vR.call(t,n)&&J2(e,n,t[n]);return e},Gq=(e,t)=>Wq(e,Uq(t)),Yq=(e,t)=>{var n={};for(var r in e)gR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Km)for(var r of Km(e))t.indexOf(r)<0&&vR.call(e,r)&&(n[r]=e[r]);return n};function yR(e){const t=ae("Portal",{},e),{children:n,target:r,className:o,innerRef:i}=t,s=Yq(t,["children","target","className","innerRef"]),a=ir(),[c,u]=_.useState(!1),f=_.useRef();return fS(()=>(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?xs.createPortal(k.createElement("div",Gq(Zq({className:o,dir:a.dir},s),{ref:i}),n),f.current):null}yR.displayName="@mantine/core/Portal";var Kq=Object.defineProperty,qm=Object.getOwnPropertySymbols,_R=Object.prototype.hasOwnProperty,wR=Object.prototype.propertyIsEnumerable,X2=(e,t,n)=>t in e?Kq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qq=(e,t)=>{for(var n in t||(t={}))_R.call(t,n)&&X2(e,n,t[n]);if(qm)for(var n of qm(t))wR.call(t,n)&&X2(e,n,t[n]);return e},Jq=(e,t)=>{var n={};for(var r in e)_R.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&qm)for(var r of qm(e))t.indexOf(r)<0&&wR.call(e,r)&&(n[r]=e[r]);return n};function Af(e){var t=e,{withinPortal:n=!0,children:r}=t,o=Jq(t,["withinPortal","children"]);return n?k.createElement(yR,qq({},o),r):k.createElement(k.Fragment,null,r)}Af.displayName="@mantine/core/OptionalPortal";var Xq=Object.defineProperty,Jm=Object.getOwnPropertySymbols,bR=Object.prototype.hasOwnProperty,xR=Object.prototype.propertyIsEnumerable,Q2=(e,t,n)=>t in e?Xq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eE=(e,t)=>{for(var n in t||(t={}))bR.call(t,n)&&Q2(e,n,t[n]);if(Jm)for(var n of Jm(t))xR.call(t,n)&&Q2(e,n,t[n]);return e},Qq=(e,t)=>{var n={};for(var r in e)bR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Jm)for(var r of Jm(e))t.indexOf(r)<0&&xR.call(e,r)&&(n[r]=e[r]);return n};function SR(e){const t=e,{width:n,height:r,style:o}=t,i=Qq(t,["width","height","style"]);return k.createElement("svg",eE({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:eE({width:n,height:r},o)},i),k.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"}))}SR.displayName="@mantine/core/CloseIcon";var eJ=Object.defineProperty,Xm=Object.getOwnPropertySymbols,PR=Object.prototype.hasOwnProperty,OR=Object.prototype.propertyIsEnumerable,tE=(e,t,n)=>t in e?eJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tJ=(e,t)=>{for(var n in t||(t={}))PR.call(t,n)&&tE(e,n,t[n]);if(Xm)for(var n of Xm(t))OR.call(t,n)&&tE(e,n,t[n]);return e},nJ=(e,t)=>{var n={};for(var r in e)PR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Xm)for(var r of Xm(e))t.indexOf(r)<0&&OR.call(e,r)&&(n[r]=e[r]);return n};const rJ={xs:M(12),sm:M(16),md:M(20),lg:M(28),xl:M(34)},oJ={size:"sm"},CR=_.forwardRef((e,t)=>{const n=ae("CloseButton",oJ,e),{iconSize:r,size:o,children:i}=n,s=nJ(n,["iconSize","size","children"]),a=M(r||rJ[o]);return k.createElement(Qe,tJ({ref:t,__staticSelector:"CloseButton",size:o},s),i||k.createElement(SR,{width:a,height:a}))});CR.displayName="@mantine/core/CloseButton";const C0=CR;var iJ=Object.defineProperty,sJ=Object.defineProperties,aJ=Object.getOwnPropertyDescriptors,nE=Object.getOwnPropertySymbols,lJ=Object.prototype.hasOwnProperty,cJ=Object.prototype.propertyIsEnumerable,rE=(e,t,n)=>t in e?iJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fp=(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},uJ=(e,t)=>sJ(e,aJ(t));function dJ({underline:e,strikethrough:t}){const n=[];return e&&n.push("underline"),t&&n.push("line-through"),n.length>0?n.join(" "):"none"}function fJ({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 pJ(e){return typeof e=="number"?{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical"}:null}function hJ({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 mJ=ue((e,{color:t,lineClamp:n,truncate:r,inline:o,inherit:i,underline:s,gradient:a,weight:c,transform:u,align:f,strikethrough:p,italic:g},{size:v})=>{const y=e.fn.variant({variant:"gradient",gradient:a});return{root:uJ(Fp(Fp(Fp(Fp({},e.fn.fontStyles()),e.fn.focusStyles()),pJ(n)),hJ({theme:e,truncate:r})),{color:fJ({color:t,theme:e}),fontFamily:i?"inherit":e.fontFamily,fontSize:i||v===void 0?"inherit":re({size:v,sizes:e.fontSizes}),lineHeight:i?"inherit":o?1:e.lineHeight,textDecoration:dJ({underline:s,strikethrough:p}),WebkitTapHighlightColor:"transparent",fontWeight:i?"inherit":c,textTransform:u,textAlign:f,fontStyle:g?"italic":void 0}),gradient:{backgroundImage:y.background,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"}}});const gJ=mJ;var vJ=Object.defineProperty,Qm=Object.getOwnPropertySymbols,kR=Object.prototype.hasOwnProperty,ER=Object.prototype.propertyIsEnumerable,oE=(e,t,n)=>t in e?vJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yJ=(e,t)=>{for(var n in t||(t={}))kR.call(t,n)&&oE(e,n,t[n]);if(Qm)for(var n of Qm(t))ER.call(t,n)&&oE(e,n,t[n]);return e},_J=(e,t)=>{var n={};for(var r in e)kR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Qm)for(var r of Qm(e))t.indexOf(r)<0&&ER.call(e,r)&&(n[r]=e[r]);return n};const wJ={variant:"text"},$R=_.forwardRef((e,t)=>{const n=ae("Text",wJ,e),{className:r,size:o,weight:i,transform:s,color:a,align:c,variant:u,lineClamp:f,truncate:p,gradient:g,inline:v,inherit:y,underline:w,strikethrough:P,italic:x,classNames:S,styles:O,unstyled:E,span:$,__staticSelector:N}=n,I=_J(n,["className","size","weight","transform","color","align","variant","lineClamp","truncate","gradient","inline","inherit","underline","strikethrough","italic","classNames","styles","unstyled","span","__staticSelector"]),{classes:R,cx:B}=gJ({color:a,lineClamp:f,truncate:p,inline:v,inherit:y,underline:w,strikethrough:P,italic:x,weight:i,transform:s,align:c,gradient:g},{unstyled:E,name:N||"Text",variant:u,size:o});return k.createElement(Pe,yJ({ref:t,className:B(R.root,{[R.gradient]:u==="gradient"},r),component:$?"span":"div"},I))});$R.displayName="@mantine/core/Text";const W=$R,MR=_.createContext({zIndex:1e3,fixed:!1,layout:"default"});MR.Provider;function bJ(){return _.useContext(MR)}function NR(e,t){if(!e)return[];const n=Object.keys(e).filter(r=>r!=="base").map(r=>[re({size:r,sizes:t.breakpoints,units:"em"}),e[r]]);return n.sort((r,o)=>Ro(r[0])-Ro(o[0])),n}var xJ=Object.defineProperty,SJ=Object.defineProperties,PJ=Object.getOwnPropertyDescriptors,iE=Object.getOwnPropertySymbols,OJ=Object.prototype.hasOwnProperty,CJ=Object.prototype.propertyIsEnumerable,sE=(e,t,n)=>t in e?xJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vp=(e,t)=>{for(var n in t||(t={}))OJ.call(t,n)&&sE(e,n,t[n]);if(iE)for(var n of iE(t))CJ.call(t,n)&&sE(e,n,t[n]);return e},aE=(e,t)=>SJ(e,PJ(t)),kJ=ue((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?NR(n,e).reduce((g,[v,y])=>(g[`@media (min-width: ${ba(v)})`]={width:M(y),minWidth:M(y)},g),{}):null,p=c?{[a==="navbar"?"borderRight":"borderLeft"]:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`}:{};return{root:aE(Vp(Vp(aE(Vp(Vp({},e.fn.fontStyles()),o),{top:u==="alt"?0:o?.top||"var(--mantine-header-height)",bottom:0,zIndex:s,height:t?M(t):u==="alt"?"auto":"calc(100vh - var(--mantine-header-height, 0rem) - var(--mantine-footer-height, 0rem))",width:n?.base?M(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: ${ba(Ro(re({size:i,sizes:e.breakpoints}))-1)})`]:{display:"none"}}})}});const EJ=kJ;var $J=Object.defineProperty,eg=Object.getOwnPropertySymbols,TR=Object.prototype.hasOwnProperty,IR=Object.prototype.propertyIsEnumerable,lE=(e,t,n)=>t in e?$J(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cE=(e,t)=>{for(var n in t||(t={}))TR.call(t,n)&&lE(e,n,t[n]);if(eg)for(var n of eg(t))IR.call(t,n)&&lE(e,n,t[n]);return e},MJ=(e,t)=>{var n={};for(var r in e)TR.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&&IR.call(e,r)&&(n[r]=e[r]);return n};const jR=_.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:g,styles:v,children:y,section:w,__staticSelector:P,unstyled:x,variant:S}=n,O=MJ(n,["width","height","fixed","position","zIndex","hiddenBreakpoint","hidden","withBorder","className","classNames","styles","children","section","__staticSelector","unstyled","variant"]);const E=bJ(),{classes:$,cx:N,theme:I}=EJ({width:r,height:o,fixed:E.fixed||i,position:s,hiddenBreakpoint:c,zIndex:a||E.zIndex||ii("app"),section:w,withBorder:f,layout:E.layout},{classNames:g,styles:v,name:P,unstyled:x,variant:S}),R=NR(r,I).reduce((B,[z,G])=>(B[`@media (min-width: ${ba(z)})`]={[`--mantine-${w}-width`]:M(G)},B),{});return k.createElement(Pe,cE({component:w==="navbar"?"nav":"aside",ref:t,"data-hidden":u||void 0,className:N($.root,p)},O),y,k.createElement(lG,{styles:()=>({":root":cE({[`--mantine-${w}-width`]:r?.base?M(r.base):"0rem"},R)})}))});jR.displayName="@mantine/core/HorizontalSection";var NJ=Object.defineProperty,tg=Object.getOwnPropertySymbols,LR=Object.prototype.hasOwnProperty,DR=Object.prototype.propertyIsEnumerable,uE=(e,t,n)=>t in e?NJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,TJ=(e,t)=>{for(var n in t||(t={}))LR.call(t,n)&&uE(e,n,t[n]);if(tg)for(var n of tg(t))DR.call(t,n)&&uE(e,n,t[n]);return e},IJ=(e,t)=>{var n={};for(var r in e)LR.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&&DR.call(e,r)&&(n[r]=e[r]);return n};const RR=_.forwardRef((e,t)=>{var n=e,{children:r,grow:o=!1,sx:i}=n,s=IJ(n,["children","grow","sx"]);return k.createElement(Pe,TJ({ref:t,sx:[{flex:o?1:0,boxSizing:"border-box"},...tS(i)]},s),r)});RR.displayName="@mantine/core/Section";const jJ=RR;var LJ=Object.defineProperty,dE=Object.getOwnPropertySymbols,DJ=Object.prototype.hasOwnProperty,RJ=Object.prototype.propertyIsEnumerable,fE=(e,t,n)=>t in e?LJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zJ=(e,t)=>{for(var n in t||(t={}))DJ.call(t,n)&&fE(e,n,t[n]);if(dE)for(var n of dE(t))RJ.call(t,n)&&fE(e,n,t[n]);return e};const AJ={fixed:!1,position:{top:0,left:0},hiddenBreakpoint:"md",hidden:!1},ng=_.forwardRef((e,t)=>{const n=ae("Navbar",AJ,e);return k.createElement(jR,zJ({section:"navbar",__staticSelector:"Navbar",ref:t},n))});ng.Section=jJ;ng.displayName="@mantine/core/Navbar";const Hp={xs:M(1),sm:M(2),md:M(3),lg:M(4),xl:M(5)};function Wp(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 BJ=ue((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:M(1),borderTop:`${re({size:n,sizes:Hp})} ${r} ${Wp(e,t)}`,marginRight:e.spacing.xs},"&::after":{content:'""',flex:1,borderTop:`${re({size:n,sizes:Hp})} ${r} ${Wp(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:M(re({size:n,sizes:Hp})),borderTopColor:Wp(e,t),borderTopStyle:r,margin:0},vertical:{border:0,alignSelf:"stretch",height:"auto",borderLeftWidth:M(re({size:n,sizes:Hp})),borderLeftColor:Wp(e,t),borderLeftStyle:r}}));const FJ=BJ;var VJ=Object.defineProperty,HJ=Object.defineProperties,WJ=Object.getOwnPropertyDescriptors,rg=Object.getOwnPropertySymbols,zR=Object.prototype.hasOwnProperty,AR=Object.prototype.propertyIsEnumerable,pE=(e,t,n)=>t in e?VJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hE=(e,t)=>{for(var n in t||(t={}))zR.call(t,n)&&pE(e,n,t[n]);if(rg)for(var n of rg(t))AR.call(t,n)&&pE(e,n,t[n]);return e},UJ=(e,t)=>HJ(e,WJ(t)),ZJ=(e,t)=>{var n={};for(var r in e)zR.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&&AR.call(e,r)&&(n[r]=e[r]);return n};const GJ={orientation:"horizontal",size:"xs",labelPosition:"left",variant:"solid"},Ye=_.forwardRef((e,t)=>{const n=ae("Divider",GJ,e),{className:r,color:o,orientation:i,size:s,label:a,labelPosition:c,labelProps:u,variant:f,styles:p,classNames:g,unstyled:v}=n,y=ZJ(n,["className","color","orientation","size","label","labelPosition","labelProps","variant","styles","classNames","unstyled"]),{classes:w,cx:P}=FJ({color:o},{classNames:g,styles:p,unstyled:v,name:"Divider",variant:f,size:s}),x=i==="vertical",S=i==="horizontal",O=!!a&&S,E=!u?.color;return k.createElement(Pe,hE({ref:t,className:P(w.root,{[w.vertical]:x,[w.horizontal]:S,[w.withLabel]:O},r),role:"separator"},y),O&&k.createElement(W,UJ(hE({},u),{size:u?.size||"xs",mt:M(2),className:P(w.label,w[c],{[w.labelDefaultStyles]:E})}),a))});Ye.displayName="@mantine/core/Divider";var YJ=Object.defineProperty,KJ=Object.defineProperties,qJ=Object.getOwnPropertyDescriptors,mE=Object.getOwnPropertySymbols,JJ=Object.prototype.hasOwnProperty,XJ=Object.prototype.propertyIsEnumerable,gE=(e,t,n)=>t in e?YJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vE=(e,t)=>{for(var n in t||(t={}))JJ.call(t,n)&&gE(e,n,t[n]);if(mE)for(var n of mE(t))XJ.call(t,n)&&gE(e,n,t[n]);return e},QJ=(e,t)=>KJ(e,qJ(t)),eX=ue((e,t,{size:n})=>({item:QJ(vE({},e.fn.fontStyles()),{boxSizing:"border-box",wordBreak:"break-all",textAlign:"left",width:"100%",padding:`calc(${re({size:n,sizes:e.spacing})} / 1.5) ${re({size:n,sizes:e.spacing})}`,cursor:"pointer",fontSize:re({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]":vE({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(${re({size:n,sizes:e.spacing})} / 2)`,paddingBottom:`calc(${re({size:n,sizes:e.spacing})} / 2)`,textAlign:"center"},separator:{boxSizing:"border-box",textAlign:"left",width:"100%",padding:`calc(${re({size:n,sizes:e.spacing})} / 1.5) ${re({size:n,sizes:e.spacing})}`},separatorLabel:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}));const tX=eX;var nX=Object.defineProperty,yE=Object.getOwnPropertySymbols,rX=Object.prototype.hasOwnProperty,oX=Object.prototype.propertyIsEnumerable,_E=(e,t,n)=>t in e?nX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,iX=(e,t)=>{for(var n in t||(t={}))rX.call(t,n)&&_E(e,n,t[n]);if(yE)for(var n of yE(t))oX.call(t,n)&&_E(e,n,t[n]);return e};function iP({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:g,creatable:v,createLabel:y,unstyled:w,variant:P}){const{classes:x}=tX(null,{classNames:n,styles:r,unstyled:w,name:s,variant:P,size:p}),S=[],O=[];let E=null;const $=(I,R)=>{const B=typeof o=="function"?o(I.value):!1;return k.createElement(f,iX({key:I.value,className:x.item,"data-disabled":I.disabled||void 0,"data-hovered":!I.disabled&&t===R||void 0,"data-selected":!I.disabled&&B||void 0,selected:B,onMouseEnter:()=>a(R),id:`${i}-${R}`,role:"option",tabIndex:-1,"aria-selected":t===R,ref:z=>{u&&u.current&&(u.current[I.value]=z)},onMouseDown:I.disabled?null:z=>{z.preventDefault(),c(I)},disabled:I.disabled,variant:P},I))};let N=null;if(e.forEach((I,R)=>{I.creatable?E=R:I.group?(N!==I.group&&(N=I.group,O.push(k.createElement("div",{className:x.separator,key:`__mantine-divider-${R}`},k.createElement(Ye,{classNames:{label:x.separatorLabel},label:I.group})))),O.push($(I,R))):S.push($(I,R))}),v){const I=e[E];S.push(k.createElement("div",{key:zc(),className:x.item,"data-hovered":t===E||void 0,onMouseEnter:()=>a(E),onMouseDown:R=>{R.preventDefault(),c(I)},tabIndex:-1,ref:R=>{u&&u.current&&(u.current[I.value]=R)}},y))}return O.length>0&&S.length>0&&S.unshift(k.createElement("div",{className:x.separator,key:"empty-group-separator"},k.createElement(Ye,null))),O.length>0||S.length>0?k.createElement(k.Fragment,null,O,S):k.createElement(W,{size:p,unstyled:w,className:x.nothingFound},g)}iP.displayName="@mantine/core/SelectItems";var sX=Object.defineProperty,og=Object.getOwnPropertySymbols,BR=Object.prototype.hasOwnProperty,FR=Object.prototype.propertyIsEnumerable,wE=(e,t,n)=>t in e?sX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,aX=(e,t)=>{for(var n in t||(t={}))BR.call(t,n)&&wE(e,n,t[n]);if(og)for(var n of og(t))FR.call(t,n)&&wE(e,n,t[n]);return e},lX=(e,t)=>{var n={};for(var r in e)BR.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&&FR.call(e,r)&&(n[r]=e[r]);return n};const sP=_.forwardRef((e,t)=>{var n=e,{label:r,value:o}=n,i=lX(n,["label","value"]);return k.createElement("div",aX({ref:t},i),r||o)});sP.displayName="@mantine/core/DefaultItem";function cX(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function VR(...e){return t=>e.forEach(n=>cX(n,t))}function Al(...e){return _.useCallback(VR(...e),e)}const HR=_.forwardRef((e,t)=>{const{children:n,...r}=e,o=_.Children.toArray(n),i=o.find(dX);if(i){const s=i.props.children,a=o.map(c=>c===i?_.Children.count(s)>1?_.Children.only(null):_.isValidElement(s)?s.props.children:null:c);return _.createElement(Ub,Lt({},r,{ref:t}),_.isValidElement(s)?_.cloneElement(s,void 0,a):null)}return _.createElement(Ub,Lt({},r,{ref:t}),n)});HR.displayName="Slot";const Ub=_.forwardRef((e,t)=>{const{children:n,...r}=e;return _.isValidElement(n)?_.cloneElement(n,{...fX(r,n.props),ref:VR(t,n.ref)}):_.Children.count(n)>1?_.Children.only(null):null});Ub.displayName="SlotClone";const uX=({children:e})=>_.createElement(_.Fragment,null,e);function dX(e){return _.isValidElement(e)&&e.type===uX}function fX(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 pX=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Bf=pX.reduce((e,t)=>{const n=_.forwardRef((r,o)=>{const{asChild:i,...s}=r,a=i?HR:t;return _.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),_.createElement(a,Lt({},s,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Zb=globalThis?.document?_.useLayoutEffect:()=>{};function hX(e,t){return _.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const Ff=e=>{const{present:t,children:n}=e,r=mX(t),o=typeof n=="function"?n({present:r.isPresent}):_.Children.only(n),i=Al(r.ref,o.ref);return typeof n=="function"||r.isPresent?_.cloneElement(o,{ref:i}):null};Ff.displayName="Presence";function mX(e){const[t,n]=_.useState(),r=_.useRef({}),o=_.useRef(e),i=_.useRef("none"),s=e?"mounted":"unmounted",[a,c]=hX(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const u=Up(r.current);i.current=a==="mounted"?u:"none"},[a]),Zb(()=>{const u=r.current,f=o.current;if(f!==e){const g=i.current,v=Up(u);e?c("MOUNT"):v==="none"||u?.display==="none"?c("UNMOUNT"):c(f&&g!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Zb(()=>{if(t){const u=p=>{const v=Up(r.current).includes(p.animationName);p.target===t&&v&&xs.flushSync(()=>c("ANIMATION_END"))},f=p=>{p.target===t&&(i.current=Up(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:_.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Up(e){return e?.animationName||"none"}function gX(e,t=[]){let n=[];function r(i,s){const a=_.createContext(s),c=n.length;n=[...n,s];function u(p){const{scope:g,children:v,...y}=p,w=g?.[e][c]||a,P=_.useMemo(()=>y,Object.values(y));return _.createElement(w.Provider,{value:P},v)}function f(p,g){const v=g?.[e][c]||a,y=_.useContext(v);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=>_.createContext(s));return function(a){const c=a?.[e]||i;return _.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,vX(o,...t)]}function vX(...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 _.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function el(e){const t=_.useRef(e);return _.useEffect(()=>{t.current=e}),_.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}const yX=_.createContext(void 0);function _X(e){const t=_.useContext(yX);return e||t||"ltr"}function wX(e,[t,n]){return Math.min(n,Math.max(t,e))}function _l(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function bX(e,t){return _.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const WR="ScrollArea",[UR,$Ie]=gX(WR),[xX,Fo]=UR(WR),SX=_.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:i=600,...s}=e,[a,c]=_.useState(null),[u,f]=_.useState(null),[p,g]=_.useState(null),[v,y]=_.useState(null),[w,P]=_.useState(null),[x,S]=_.useState(0),[O,E]=_.useState(0),[$,N]=_.useState(!1),[I,R]=_.useState(!1),B=Al(t,G=>c(G)),z=_X(o);return _.createElement(xX,{scope:n,type:r,dir:z,scrollHideDelay:i,scrollArea:a,viewport:u,onViewportChange:f,content:p,onContentChange:g,scrollbarX:v,onScrollbarXChange:y,scrollbarXEnabled:$,onScrollbarXEnabledChange:N,scrollbarY:w,onScrollbarYChange:P,scrollbarYEnabled:I,onScrollbarYEnabledChange:R,onCornerWidthChange:S,onCornerHeightChange:E},_.createElement(Bf.div,Lt({dir:z},s,{ref:B,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":O+"px",...e.style}})))}),PX="ScrollAreaViewport",OX=_.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,...o}=e,i=Fo(PX,n),s=_.useRef(null),a=Al(t,s,i.onViewportChange);return _.createElement(_.Fragment,null,_.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}"}}),_.createElement(Bf.div,Lt({"data-radix-scroll-area-viewport":""},o,{ref:a,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style}}),_.createElement("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"}},r)))}),Ss="ScrollAreaScrollbar",CX=_.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Fo(Ss,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:s}=o,a=e.orientation==="horizontal";return _.useEffect(()=>(a?i(!0):s(!0),()=>{a?i(!1):s(!1)}),[a,i,s]),o.type==="hover"?_.createElement(kX,Lt({},r,{ref:t,forceMount:n})):o.type==="scroll"?_.createElement(EX,Lt({},r,{ref:t,forceMount:n})):o.type==="auto"?_.createElement(ZR,Lt({},r,{ref:t,forceMount:n})):o.type==="always"?_.createElement(aP,Lt({},r,{ref:t})):null}),kX=_.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Fo(Ss,e.__scopeScrollArea),[i,s]=_.useState(!1);return _.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]),_.createElement(Ff,{present:n||i},_.createElement(ZR,Lt({"data-state":i?"visible":"hidden"},r,{ref:t})))}),EX=_.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Fo(Ss,e.__scopeScrollArea),i=e.orientation==="horizontal",s=E0(()=>c("SCROLL_END"),100),[a,c]=bX("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 _.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>c("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,o.scrollHideDelay,c]),_.useEffect(()=>{const u=o.viewport,f=i?"scrollLeft":"scrollTop";if(u){let p=u[f];const g=()=>{const v=u[f];p!==v&&(c("SCROLL"),s()),p=v};return u.addEventListener("scroll",g),()=>u.removeEventListener("scroll",g)}},[o.viewport,i,c,s]),_.createElement(Ff,{present:n||a!=="hidden"},_.createElement(aP,Lt({"data-state":a==="hidden"?"hidden":"visible"},r,{ref:t,onPointerEnter:_l(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:_l(e.onPointerLeave,()=>c("POINTER_LEAVE"))})))}),ZR=_.forwardRef((e,t)=>{const n=Fo(Ss,e.__scopeScrollArea),{forceMount:r,...o}=e,[i,s]=_.useState(!1),a=e.orientation==="horizontal",c=E0(()=>{if(n.viewport){const u=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=e,o=Fo(Ss,e.__scopeScrollArea),i=_.useRef(null),s=_.useRef(0),[a,c]=_.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=qR(a.viewport,a.content),f={...r,sizes:a,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:g=>i.current=g,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:g=>s.current=g};function p(g,v){return DX(g,s.current,a,v)}return n==="horizontal"?_.createElement($X,Lt({},f,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const g=o.viewport.scrollLeft,v=bE(g,a,o.dir);i.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:g=>{o.viewport&&(o.viewport.scrollLeft=g)},onDragScroll:g=>{o.viewport&&(o.viewport.scrollLeft=p(g,o.dir))}})):n==="vertical"?_.createElement(MX,Lt({},f,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const g=o.viewport.scrollTop,v=bE(g,a);i.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:g=>{o.viewport&&(o.viewport.scrollTop=g)},onDragScroll:g=>{o.viewport&&(o.viewport.scrollTop=p(g))}})):null}),$X=_.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=Fo(Ss,e.__scopeScrollArea),[s,a]=_.useState(),c=_.useRef(null),u=Al(t,c,i.onScrollbarXChange);return _.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),_.createElement(YR,Lt({"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":k0(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,p)=>{if(i.viewport){const g=i.viewport.scrollLeft+f.deltaX;e.onWheelScroll(g),XR(g,p)&&f.preventDefault()}},onResize:()=>{c.current&&i.viewport&&s&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:ig(s.paddingLeft),paddingEnd:ig(s.paddingRight)}})}}))}),MX=_.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=Fo(Ss,e.__scopeScrollArea),[s,a]=_.useState(),c=_.useRef(null),u=Al(t,c,i.onScrollbarYChange);return _.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),_.createElement(YR,Lt({"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":k0(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,p)=>{if(i.viewport){const g=i.viewport.scrollTop+f.deltaY;e.onWheelScroll(g),XR(g,p)&&f.preventDefault()}},onResize:()=>{c.current&&i.viewport&&s&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:ig(s.paddingTop),paddingEnd:ig(s.paddingBottom)}})}}))}),[NX,GR]=UR(Ss),YR=_.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:i,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:f,onResize:p,...g}=e,v=Fo(Ss,n),[y,w]=_.useState(null),P=Al(t,B=>w(B)),x=_.useRef(null),S=_.useRef(""),O=v.viewport,E=r.content-r.viewport,$=el(f),N=el(c),I=E0(p,10);function R(B){if(x.current){const z=B.clientX-x.current.left,G=B.clientY-x.current.top;u({x:z,y:G})}}return _.useEffect(()=>{const B=z=>{const G=z.target;y?.contains(G)&&$(z,E)};return document.addEventListener("wheel",B,{passive:!1}),()=>document.removeEventListener("wheel",B,{passive:!1})},[O,y,E,$]),_.useEffect(N,[r,N]),iu(y,I),iu(v.content,I),_.createElement(NX,{scope:n,scrollbar:y,hasThumb:o,onThumbChange:el(i),onThumbPointerUp:el(s),onThumbPositionChange:N,onThumbPointerDown:el(a)},_.createElement(Bf.div,Lt({},g,{ref:P,style:{position:"absolute",...g.style},onPointerDown:_l(e.onPointerDown,B=>{B.button===0&&(B.target.setPointerCapture(B.pointerId),x.current=y.getBoundingClientRect(),S.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",R(B))}),onPointerMove:_l(e.onPointerMove,R),onPointerUp:_l(e.onPointerUp,B=>{const z=B.target;z.hasPointerCapture(B.pointerId)&&z.releasePointerCapture(B.pointerId),document.body.style.webkitUserSelect=S.current,x.current=null})})))}),Gb="ScrollAreaThumb",TX=_.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=GR(Gb,e.__scopeScrollArea);return _.createElement(Ff,{present:n||o.hasThumb},_.createElement(IX,Lt({ref:t},r)))}),IX=_.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,i=Fo(Gb,n),s=GR(Gb,n),{onThumbPositionChange:a}=s,c=Al(t,p=>s.onThumbChange(p)),u=_.useRef(),f=E0(()=>{u.current&&(u.current(),u.current=void 0)},100);return _.useEffect(()=>{const p=i.viewport;if(p){const g=()=>{if(f(),!u.current){const v=RX(p,a);u.current=v,a()}};return a(),p.addEventListener("scroll",g),()=>p.removeEventListener("scroll",g)}},[i.viewport,f,a]),_.createElement(Bf.div,Lt({"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:_l(e.onPointerDownCapture,p=>{const v=p.target.getBoundingClientRect(),y=p.clientX-v.left,w=p.clientY-v.top;s.onThumbPointerDown({x:y,y:w})}),onPointerUp:_l(e.onPointerUp,s.onThumbPointerUp)}))}),KR="ScrollAreaCorner",jX=_.forwardRef((e,t)=>{const n=Fo(KR,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?_.createElement(LX,Lt({},e,{ref:t})):null}),LX=_.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=Fo(KR,n),[i,s]=_.useState(0),[a,c]=_.useState(0),u=!!(i&&a);return iu(o.scrollbarX,()=>{var f;const p=((f=o.scrollbarX)===null||f===void 0?void 0:f.offsetHeight)||0;o.onCornerHeightChange(p),c(p)}),iu(o.scrollbarY,()=>{var f;const p=((f=o.scrollbarY)===null||f===void 0?void 0:f.offsetWidth)||0;o.onCornerWidthChange(p),s(p)}),u?_.createElement(Bf.div,Lt({},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 ig(e){return e?parseInt(e,10):0}function qR(e,t){const n=e/t;return isNaN(n)?0:n}function k0(e){const t=qR(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function DX(e,t,n,r="ltr"){const o=k0(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 JR([c,u],p)(e)}function bE(e,t,n="ltr"){const r=k0(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=wX(e,c);return JR([0,s],[0,a])(u)}function JR(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 XR(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 E0(e,t){const n=el(e),r=_.useRef(0);return _.useEffect(()=>()=>window.clearTimeout(r.current),[]),_.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function iu(e,t){const n=el(t);Zb(()=>{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 zX=SX,AX=OX,xE=CX,SE=TX,BX=jX;var FX=ue((e,{scrollbarSize:t,offsetScrollbars:n,scrollbarHovered:r,hidden:o})=>({root:{overflow:"hidden"},viewport:{width:"100%",height:"100%",paddingRight:n?M(t):void 0,paddingBottom:n?M(t):void 0},scrollbar:{display:o?"none":"flex",userSelect:"none",touchAction:"none",boxSizing:"border-box",padding:`calc(${M(t)} / 5)`,transition:"background-color 150ms ease, opacity 150ms ease","&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0],[`& .${Ar("thumb")}`]:{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.white,.5):e.fn.rgba(e.black,.5)}},'&[data-orientation="vertical"]':{width:M(t)},'&[data-orientation="horizontal"]':{flexDirection:"column",height:M(t)},'&[data-state="hidden"]':{display:"none",opacity:0}},thumb:{ref:Ar("thumb"),flex:1,backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.white,.4):e.fn.rgba(e.black,.4),borderRadius:M(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:M(44),minHeight:M(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 VX=FX;var HX=Object.defineProperty,WX=Object.defineProperties,UX=Object.getOwnPropertyDescriptors,sg=Object.getOwnPropertySymbols,QR=Object.prototype.hasOwnProperty,ez=Object.prototype.propertyIsEnumerable,PE=(e,t,n)=>t in e?HX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yb=(e,t)=>{for(var n in t||(t={}))QR.call(t,n)&&PE(e,n,t[n]);if(sg)for(var n of sg(t))ez.call(t,n)&&PE(e,n,t[n]);return e},tz=(e,t)=>WX(e,UX(t)),nz=(e,t)=>{var n={};for(var r in e)QR.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&&ez.call(e,r)&&(n[r]=e[r]);return n};const rz={scrollbarSize:12,scrollHideDelay:1e3,type:"hover",offsetScrollbars:!1},$0=_.forwardRef((e,t)=>{const n=ae("ScrollArea",rz,e),{children:r,className:o,classNames:i,styles:s,scrollbarSize:a,scrollHideDelay:c,type:u,dir:f,offsetScrollbars:p,viewportRef:g,onScrollPositionChange:v,unstyled:y,variant:w,viewportProps:P}=n,x=nz(n,["children","className","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","variant","viewportProps"]),[S,O]=_.useState(!1),E=ir(),{classes:$,cx:N}=VX({scrollbarSize:a,offsetScrollbars:p,scrollbarHovered:S,hidden:u==="never"},{name:"ScrollArea",classNames:i,styles:s,unstyled:y,variant:w});return k.createElement(zX,{type:u==="never"?"always":u,scrollHideDelay:c,dir:f||E.dir,ref:t,asChild:!0},k.createElement(Pe,Yb({className:N($.root,o)},x),k.createElement(AX,tz(Yb({},P),{className:$.viewport,ref:g,onScroll:typeof v=="function"?({currentTarget:I})=>v({x:I.scrollLeft,y:I.scrollTop}):void 0}),r),k.createElement(xE,{orientation:"horizontal",className:$.scrollbar,forceMount:!0,onMouseEnter:()=>O(!0),onMouseLeave:()=>O(!1)},k.createElement(SE,{className:$.thumb})),k.createElement(xE,{orientation:"vertical",className:$.scrollbar,forceMount:!0,onMouseEnter:()=>O(!0),onMouseLeave:()=>O(!1)},k.createElement(SE,{className:$.thumb})),k.createElement(BX,{className:$.corner})))}),oz=_.forwardRef((e,t)=>{const n=ae("ScrollAreaAutosize",rz,e),{children:r,classNames:o,styles:i,scrollbarSize:s,scrollHideDelay:a,type:c,dir:u,offsetScrollbars:f,viewportRef:p,onScrollPositionChange:g,unstyled:v,sx:y,variant:w,viewportProps:P}=n,x=nz(n,["children","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","sx","variant","viewportProps"]);return k.createElement(Pe,tz(Yb({},x),{ref:t,sx:[{display:"flex"},...tS(y)]}),k.createElement(Pe,{sx:{display:"flex",flexDirection:"column",flex:1}},k.createElement($0,{classNames:o,styles:i,scrollHideDelay:a,scrollbarSize:s,type:c,dir:u,offsetScrollbars:f,viewportRef:p,onScrollPositionChange:g,unstyled:v,variant:w,viewportProps:P},r)))});oz.displayName="@mantine/core/ScrollAreaAutosize";$0.displayName="@mantine/core/ScrollArea";$0.Autosize=oz;const St=$0;var ZX=Object.defineProperty,GX=Object.defineProperties,YX=Object.getOwnPropertyDescriptors,ag=Object.getOwnPropertySymbols,iz=Object.prototype.hasOwnProperty,sz=Object.prototype.propertyIsEnumerable,OE=(e,t,n)=>t in e?ZX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,CE=(e,t)=>{for(var n in t||(t={}))iz.call(t,n)&&OE(e,n,t[n]);if(ag)for(var n of ag(t))sz.call(t,n)&&OE(e,n,t[n]);return e},KX=(e,t)=>GX(e,YX(t)),qX=(e,t)=>{var n={};for(var r in e)iz.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&&sz.call(e,r)&&(n[r]=e[r]);return n};const M0=_.forwardRef((e,t)=>{var n=e,{style:r}=n,o=qX(n,["style"]);return k.createElement(St,KX(CE({},o),{style:CE({width:"100%"},r),viewportProps:{tabIndex:-1},viewportRef:t}),o.children)});M0.displayName="@mantine/core/SelectScrollArea";var JX=ue(()=>({dropdown:{},itemsWrapper:{padding:M(4),display:"flex",width:"100%",boxSizing:"border-box"}}));const XX=JX,ti=Math.min,tr=Math.max,lg=Math.round,Zp=Math.floor,Pa=e=>({x:e,y:e}),QX={left:"right",right:"left",bottom:"top",top:"bottom"},eQ={start:"end",end:"start"};function Kb(e,t,n){return tr(e,ti(t,n))}function gs(e,t){return typeof e=="function"?e(t):e}function ni(e){return e.split("-")[0]}function Ou(e){return e.split("-")[1]}function lP(e){return e==="x"?"y":"x"}function cP(e){return e==="y"?"height":"width"}function Bl(e){return["top","bottom"].includes(ni(e))?"y":"x"}function uP(e){return lP(Bl(e))}function tQ(e,t,n){n===void 0&&(n=!1);const r=Ou(e),o=uP(e),i=cP(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=cg(s)),[s,cg(s)]}function nQ(e){const t=cg(e);return[qb(e),t,qb(t)]}function qb(e){return e.replace(/start|end/g,t=>eQ[t])}function rQ(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function oQ(e,t,n,r){const o=Ou(e);let i=rQ(ni(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(qb)))),i}function cg(e){return e.replace(/left|right|bottom|top/g,t=>QX[t])}function iQ(e){return{top:0,right:0,bottom:0,left:0,...e}}function dP(e){return typeof e!="number"?iQ(e):{top:e,right:e,bottom:e,left:e}}function su(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function kE(e,t,n){let{reference:r,floating:o}=e;const i=Bl(t),s=uP(t),a=cP(s),c=ni(t),u=i==="y",f=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,g=r[a]/2-o[a]/2;let v;switch(c){case"top":v={x:f,y:r.y-o.height};break;case"bottom":v={x:f,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:p};break;case"left":v={x:r.x-o.width,y:p};break;default:v={x:r.x,y:r.y}}switch(Ou(t)){case"start":v[s]-=g*(n&&u?-1:1);break;case"end":v[s]+=g*(n&&u?-1:1);break}return v}const sQ=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}=kE(u,r,c),g=r,v={},y=0;for(let w=0;w({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:c}=t,{element:u,padding:f=0}=gs(e,t)||{};if(u==null)return{};const p=dP(f),g={x:n,y:r},v=uP(o),y=cP(v),w=await s.getDimensions(u),P=v==="y",x=P?"top":"left",S=P?"bottom":"right",O=P?"clientHeight":"clientWidth",E=i.reference[y]+i.reference[v]-g[v]-i.floating[y],$=g[v]-i.reference[v],N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let I=N?N[O]:0;(!I||!await(s.isElement==null?void 0:s.isElement(N)))&&(I=a.floating[O]||i.floating[y]);const R=E/2-$/2,B=I/2-w[y]/2-1,z=ti(p[x],B),G=ti(p[S],B),X=z,Q=I-w[y]-G,V=I/2-w[y]/2+R,H=Kb(X,V,Q),Z=!c.arrow&&Ou(o)!=null&&V!=H&&i.reference[y]/2-(VX<=0)){var B,z;const X=(((B=i.flip)==null?void 0:B.index)||0)+1,Q=$[X];if(Q)return{data:{index:X,overflows:R},reset:{placement:Q}};let V=(z=R.filter(H=>H.overflows[0]<=0).sort((H,Z)=>H.overflows[1]-Z.overflows[1])[0])==null?void 0:z.placement;if(!V)switch(v){case"bestFit":{var G;const H=(G=R.map(Z=>[Z.placement,Z.overflows.filter(Y=>Y>0).reduce((Y,j)=>Y+j,0)]).sort((Z,Y)=>Z[1]-Y[1])[0])==null?void 0:G[0];H&&(V=H);break}case"initialPlacement":V=a;break}if(o!==V)return{reset:{placement:V}}}return{}}}};function lz(e){const t=ti(...e.map(i=>i.left)),n=ti(...e.map(i=>i.top)),r=tr(...e.map(i=>i.right)),o=tr(...e.map(i=>i.bottom));return{x:t,y:n,width:r-t,height:o-n}}function aQ(e){const t=e.slice().sort((o,i)=>o.y-i.y),n=[];let r=null;for(let o=0;or.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(o=>su(lz(o)))}const cz=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}=gs(e,t),f=Array.from(await(i.getClientRects==null?void 0:i.getClientRects(r.reference))||[]),p=aQ(f),g=su(lz(f)),v=dP(a);function y(){if(p.length===2&&p[0].left>p[1].right&&c!=null&&u!=null)return p.find(P=>c>P.left-v.left&&cP.top-v.top&&u=2){if(Bl(n)==="y"){const z=p[0],G=p[p.length-1],X=ni(n)==="top",Q=z.top,V=G.bottom,H=X?z.left:G.left,Z=X?z.right:G.right,Y=Z-H,j=V-Q;return{top:Q,bottom:V,left:H,right:Z,width:Y,height:j,x:H,y:Q}}const P=ni(n)==="left",x=tr(...p.map(z=>z.right)),S=ti(...p.map(z=>z.left)),O=p.filter(z=>P?z.left===S:z.right===x),E=O[0].top,$=O[O.length-1].bottom,N=S,I=x,R=I-N,B=$-E;return{top:E,bottom:$,left:N,right:I,width:R,height:B,x:N,y:E}}return g}const w=await i.getElementRects({reference:{getBoundingClientRect:y},floating:r.floating,strategy:s});return o.reference.x!==w.reference.x||o.reference.y!==w.reference.y||o.reference.width!==w.reference.width||o.reference.height!==w.reference.height?{reset:{rects:w}}:{}}}};async function lQ(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=ni(n),a=Ou(n),c=Bl(n)==="y",u=["left","top"].includes(s)?-1:1,f=i&&c?-1:1,p=gs(t,e);let{mainAxis:g,crossAxis:v,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return a&&typeof y=="number"&&(v=a==="end"?y*-1:y),c?{x:v*f,y:g*u}:{x:g*u,y:v*f}}const uz=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await lQ(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},pP=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:P=>{let{x,y:S}=P;return{x,y:S}}},...c}=gs(e,t),u={x:n,y:r},f=await fP(t,c),p=Bl(ni(o)),g=lP(p);let v=u[g],y=u[p];if(i){const P=g==="y"?"top":"left",x=g==="y"?"bottom":"right",S=v+f[P],O=v-f[x];v=Kb(S,v,O)}if(s){const P=p==="y"?"top":"left",x=p==="y"?"bottom":"right",S=y+f[P],O=y-f[x];y=Kb(S,y,O)}const w=a.fn({...t,[g]:v,[p]:y});return{...w,data:{x:w.x-n,y:w.y-r}}}}},cQ=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}=gs(e,t),f={x:n,y:r},p=Bl(o),g=lP(p);let v=f[g],y=f[p];const w=gs(a,t),P=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(c){const O=g==="y"?"height":"width",E=i.reference[g]-i.floating[O]+P.mainAxis,$=i.reference[g]+i.reference[O]-P.mainAxis;v$&&(v=$)}if(u){var x,S;const O=g==="y"?"width":"height",E=["top","left"].includes(ni(o)),$=i.reference[p]-i.floating[O]+(E&&((x=s.offset)==null?void 0:x[p])||0)+(E?0:P.crossAxis),N=i.reference[p]+i.reference[O]+(E?0:((S=s.offset)==null?void 0:S[p])||0)-(E?P.crossAxis:0);y<$?y=$:y>N&&(y=N)}return{[g]:v,[p]:y}}}},uQ=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}=gs(e,t),c=await fP(t,a),u=ni(n),f=Ou(n),p=Bl(n)==="y",{width:g,height:v}=r.floating;let y,w;u==="top"||u==="bottom"?(y=u,w=f===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(w=u,y=f==="end"?"top":"bottom");const P=v-c[y],x=g-c[w],S=!t.middlewareData.shift;let O=P,E=x;if(p){const N=g-c.left-c.right;E=f||S?ti(x,N):N}else{const N=v-c.top-c.bottom;O=f||S?ti(P,N):N}if(S&&!f){const N=tr(c.left,0),I=tr(c.right,0),R=tr(c.top,0),B=tr(c.bottom,0);p?E=g-2*(N!==0||I!==0?N+I:tr(c.left,c.right)):O=v-2*(R!==0||B!==0?R+B:tr(c.top,c.bottom))}await s({...t,availableWidth:E,availableHeight:O});const $=await o.getDimensions(i.floating);return g!==$.width||v!==$.height?{reset:{rects:!0}}:{}}}};function Oa(e){return dz(e)?(e.nodeName||"").toLowerCase():"#document"}function ho(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ps(e){var t;return(t=(dz(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dz(e){return e instanceof Node||e instanceof ho(e).Node}function vs(e){return e instanceof Element||e instanceof ho(e).Element}function ji(e){return e instanceof HTMLElement||e instanceof ho(e).HTMLElement}function $E(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ho(e).ShadowRoot}function Vf(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Bo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function dQ(e){return["table","td","th"].includes(Oa(e))}function hP(e){const t=mP(),n=Bo(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function fQ(e){let t=au(e);for(;ji(t)&&!N0(t);){if(hP(t))return t;t=au(t)}return null}function mP(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function N0(e){return["html","body","#document"].includes(Oa(e))}function Bo(e){return ho(e).getComputedStyle(e)}function T0(e){return vs(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function au(e){if(Oa(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$E(e)&&e.host||Ps(e);return $E(t)?t.host:t}function fz(e){const t=au(e);return N0(t)?e.ownerDocument?e.ownerDocument.body:e.body:ji(t)&&Vf(t)?t:fz(t)}function us(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=fz(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=ho(o);return i?t.concat(s,s.visualViewport||[],Vf(o)?o:[],s.frameElement&&n?us(s.frameElement):[]):t.concat(o,us(o,[],n))}function pz(e){const t=Bo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ji(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=lg(n)!==i||lg(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function gP(e){return vs(e)?e:e.contextElement}function Uc(e){const t=gP(e);if(!ji(t))return Pa(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=pz(t);let s=(i?lg(n.width):n.width)/r,a=(i?lg(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const pQ=Pa(0);function hz(e){const t=ho(e);return!mP()||!t.visualViewport?pQ:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function hQ(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ho(e)?!1:t}function Ml(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=gP(e);let s=Pa(1);t&&(r?vs(r)&&(s=Uc(r)):s=Uc(e));const a=hQ(i,n,r)?hz(i):Pa(0);let c=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,f=o.width/s.x,p=o.height/s.y;if(i){const g=ho(i),v=r&&vs(r)?ho(r):r;let y=g.frameElement;for(;y&&r&&v!==g;){const w=Uc(y),P=y.getBoundingClientRect(),x=Bo(y),S=P.left+(y.clientLeft+parseFloat(x.paddingLeft))*w.x,O=P.top+(y.clientTop+parseFloat(x.paddingTop))*w.y;c*=w.x,u*=w.y,f*=w.x,p*=w.y,c+=S,u+=O,y=ho(y).frameElement}}return su({width:f,height:p,x:c,y:u})}function mQ(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=ji(n),i=Ps(n);if(n===i)return t;let s={scrollLeft:0,scrollTop:0},a=Pa(1);const c=Pa(0);if((o||!o&&r!=="fixed")&&((Oa(n)!=="body"||Vf(i))&&(s=T0(n)),ji(n))){const u=Ml(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}}function gQ(e){return Array.from(e.getClientRects())}function mz(e){return Ml(Ps(e)).left+T0(e).scrollLeft}function vQ(e){const t=Ps(e),n=T0(e),r=e.ownerDocument.body,o=tr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=tr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+mz(e);const a=-n.scrollTop;return Bo(r).direction==="rtl"&&(s+=tr(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function yQ(e,t){const n=ho(e),r=Ps(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,c=0;if(o){i=o.width,s=o.height;const u=mP();(!u||u&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}return{width:i,height:s,x:a,y:c}}function _Q(e,t){const n=Ml(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ji(e)?Uc(e):Pa(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,c=o*i.x,u=r*i.y;return{width:s,height:a,x:c,y:u}}function ME(e,t,n){let r;if(t==="viewport")r=yQ(e,n);else if(t==="document")r=vQ(Ps(e));else if(vs(t))r=_Q(t,n);else{const o=hz(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return su(r)}function gz(e,t){const n=au(e);return n===t||!vs(n)||N0(n)?!1:Bo(n).position==="fixed"||gz(n,t)}function wQ(e,t){const n=t.get(e);if(n)return n;let r=us(e,[],!1).filter(a=>vs(a)&&Oa(a)!=="body"),o=null;const i=Bo(e).position==="fixed";let s=i?au(e):e;for(;vs(s)&&!N0(s);){const a=Bo(s),c=hP(s);!c&&a.position==="fixed"&&(o=null),(i?!c&&!o:!c&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Vf(s)&&!c&&gz(e,s))?r=r.filter(f=>f!==s):o=a,s=au(s)}return t.set(e,r),r}function bQ(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?wQ(t,this._c):[].concat(n),r],a=s[0],c=s.reduce((u,f)=>{const p=ME(t,f,o);return u.top=tr(p.top,u.top),u.right=ti(p.right,u.right),u.bottom=ti(p.bottom,u.bottom),u.left=tr(p.left,u.left),u},ME(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function xQ(e){return pz(e)}function SQ(e,t,n){const r=ji(t),o=Ps(t),i=n==="fixed",s=Ml(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const c=Pa(0);if(r||!r&&!i)if((Oa(t)!=="body"||Vf(o))&&(a=T0(t)),r){const u=Ml(t,!0,i,t);c.x=u.x+t.clientLeft,c.y=u.y+t.clientTop}else o&&(c.x=mz(o));return{x:s.left+a.scrollLeft-c.x,y:s.top+a.scrollTop-c.y,width:s.width,height:s.height}}function NE(e,t){return!ji(e)||Bo(e).position==="fixed"?null:t?t(e):e.offsetParent}function vz(e,t){const n=ho(e);if(!ji(e))return n;let r=NE(e,t);for(;r&&dQ(r)&&Bo(r).position==="static";)r=NE(r,t);return r&&(Oa(r)==="html"||Oa(r)==="body"&&Bo(r).position==="static"&&!hP(r))?n:r||fQ(e)||n}const PQ=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||vz,i=this.getDimensions;return{reference:SQ(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function OQ(e){return Bo(e).direction==="rtl"}const CQ={convertOffsetParentRelativeRectToViewportRelativeRect:mQ,getDocumentElement:Ps,getClippingRect:bQ,getOffsetParent:vz,getElementRects:PQ,getClientRects:gQ,getDimensions:xQ,getScale:Uc,isElement:vs,isRTL:OQ};function kQ(e,t){let n=null,r;const o=Ps(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function s(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const{left:u,top:f,width:p,height:g}=e.getBoundingClientRect();if(a||t(),!p||!g)return;const v=Zp(f),y=Zp(o.clientWidth-(u+p)),w=Zp(o.clientHeight-(f+g)),P=Zp(u),S={rootMargin:-v+"px "+-y+"px "+-w+"px "+-P+"px",threshold:tr(0,ti(1,c))||1};let O=!0;function E($){const N=$[0].intersectionRatio;if(N!==c){if(!O)return s();N?s(!1,N):r=setTimeout(()=>{s(!1,1e-7)},100)}O=!1}try{n=new IntersectionObserver(E,{...S,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,S)}n.observe(e)}return s(!0),i}function EQ(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=gP(e),f=o||i?[...u?us(u):[],...us(t)]:[];f.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),i&&x.addEventListener("resize",n)});const p=u&&a?kQ(u,n):null;let g=-1,v=null;s&&(v=new ResizeObserver(x=>{let[S]=x;S&&S.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{v&&v.observe(t)})),n()}),u&&!c&&v.observe(u),v.observe(t));let y,w=c?Ml(e):null;c&&P();function P(){const x=Ml(e);w&&(x.x!==w.x||x.y!==w.y||x.width!==w.width||x.height!==w.height)&&n(),w=x,y=requestAnimationFrame(P)}return n(),()=>{f.forEach(x=>{o&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),p&&p(),v&&v.disconnect(),v=null,c&&cancelAnimationFrame(y)}}const $Q=(e,t,n)=>{const r=new Map,o={platform:CQ,...n},i={...o.platform,_c:r};return sQ(e,t,{...o,platform:i})},yz=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?EE({element:t.current,padding:n}).fn(o):{}:t?EE({element:t,padding:n}).fn(o):{}}}};var Hh=typeof document<"u"?_.useLayoutEffect:_.useEffect;function ug(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(!ug(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)&&!ug(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function TE(e){const t=_.useRef(e);return Hh(()=>{t.current=e}),t}function MQ(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,whileElementsMounted:i,open:s}=e,[a,c]=_.useState({x:null,y:null,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[u,f]=_.useState(r);ug(u,r)||f(r);const p=_.useRef(null),g=_.useRef(null),v=_.useRef(a),y=TE(i),w=TE(o),[P,x]=_.useState(null),[S,O]=_.useState(null),E=_.useCallback(z=>{p.current!==z&&(p.current=z,x(z))},[]),$=_.useCallback(z=>{g.current!==z&&(g.current=z,O(z))},[]),N=_.useCallback(()=>{if(!p.current||!g.current)return;const z={placement:t,strategy:n,middleware:u};w.current&&(z.platform=w.current),$Q(p.current,g.current,z).then(G=>{const X={...G,isPositioned:!0};I.current&&!ug(v.current,X)&&(v.current=X,xs.flushSync(()=>{c(X)}))})},[u,t,n,w]);Hh(()=>{s===!1&&v.current.isPositioned&&(v.current.isPositioned=!1,c(z=>({...z,isPositioned:!1})))},[s]);const I=_.useRef(!1);Hh(()=>(I.current=!0,()=>{I.current=!1}),[]),Hh(()=>{if(P&&S){if(y.current)return y.current(P,S,N);N()}},[P,S,N,y]);const R=_.useMemo(()=>({reference:p,floating:g,setReference:E,setFloating:$}),[E,$]),B=_.useMemo(()=>({reference:P,floating:S}),[P,S]);return _.useMemo(()=>({...a,update:N,refs:R,elements:B,reference:E,floating:$}),[a,N,R,B,E,$])}var lu=typeof document<"u"?_.useLayoutEffect:_.useEffect;let M_=!1,NQ=0;const IE=()=>"floating-ui-"+NQ++;function TQ(){const[e,t]=_.useState(()=>M_?IE():void 0);return lu(()=>{e==null&&t(IE())},[]),_.useEffect(()=>{M_||(M_=!0)},[]),e}const IQ=Zd["useId".toString()],jE=IQ||TQ;function jQ(){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 LQ=_.createContext(null),DQ=_.createContext(null),_z=()=>{var e;return((e=_.useContext(LQ))==null?void 0:e.id)||null},vP=()=>_.useContext(DQ);function Xs(e){return e?.ownerDocument||document}function RQ(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function zQ(){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 yP(e){return Xs(e).defaultView||window}function Ei(e){return e?e instanceof yP(e).Element:!1}function wz(e){return e?e instanceof yP(e).HTMLElement:!1}function AQ(e){if(typeof ShadowRoot>"u")return!1;const t=yP(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function BQ(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(RQ())||t.test(zQ()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function FQ(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 bz(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function LE(e){const t=_.useRef(e);return lu(()=>{t.current=e}),t}const DE="data-floating-ui-safe-polygon";function Wh(e,t,n){return n&&!bz(n)?0:typeof e=="number"?e:e?.[t]}const VQ=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:g,floating:v},refs:y}=e,w=vP(),P=_z(),x=LE(o),S=LE(r),O=_.useRef(),E=_.useRef(),$=_.useRef(),N=_.useRef(),I=_.useRef(!0),R=_.useRef(!1),B=_.useRef(()=>{}),z=_.useCallback(()=>{var V;const H=(V=f.current.openEvent)==null?void 0:V.type;return H?.includes("mouse")&&H!=="mousedown"},[f]);_.useEffect(()=>{if(!n)return;function V(){clearTimeout(E.current),clearTimeout(N.current),I.current=!0}return p.on("dismiss",V),()=>{p.off("dismiss",V)}},[n,p]),_.useEffect(()=>{if(!n||!x.current||!c)return;function V(){z()&&u(!1)}const H=Xs(v).documentElement;return H.addEventListener("mouseleave",V),()=>{H.removeEventListener("mouseleave",V)}},[v,c,u,n,x,f,z]);const G=_.useCallback(function(V){V===void 0&&(V=!0);const H=Wh(S.current,"close",O.current);H&&!$.current?(clearTimeout(E.current),E.current=setTimeout(()=>u(!1),H)):V&&(clearTimeout(E.current),u(!1))},[S,u]),X=_.useCallback(()=>{B.current(),$.current=void 0},[]),Q=_.useCallback(()=>{if(R.current){const V=Xs(y.floating.current).body;V.style.pointerEvents="",V.removeAttribute(DE),R.current=!1}},[y]);return _.useEffect(()=>{if(!n)return;function V(){return f.current.openEvent?["click","mousedown"].includes(f.current.openEvent.type):!1}function H(j){if(clearTimeout(E.current),I.current=!1,i&&!bz(O.current)||s>0&&Wh(S.current,"open")===0)return;f.current.openEvent=j;const U=Wh(S.current,"open",O.current);U?E.current=setTimeout(()=>{u(!0)},U):u(!0)}function Z(j){if(V())return;B.current();const U=Xs(v);if(clearTimeout(N.current),x.current){c||clearTimeout(E.current),$.current=x.current({...e,tree:w,x:j.clientX,y:j.clientY,onClose(){Q(),X(),G()}});const F=$.current;U.addEventListener("mousemove",F),B.current=()=>{U.removeEventListener("mousemove",F)};return}G()}function Y(j){V()||x.current==null||x.current({...e,tree:w,x:j.clientX,y:j.clientY,onClose(){Q(),X(),G()}})(j)}if(Ei(g)){const j=g;return c&&j.addEventListener("mouseleave",Y),v?.addEventListener("mouseleave",Y),a&&j.addEventListener("mousemove",H,{once:!0}),j.addEventListener("mouseenter",H),j.addEventListener("mouseleave",Z),()=>{c&&j.removeEventListener("mouseleave",Y),v?.removeEventListener("mouseleave",Y),a&&j.removeEventListener("mousemove",H),j.removeEventListener("mouseenter",H),j.removeEventListener("mouseleave",Z)}}},[g,v,n,e,i,s,a,G,X,Q,u,c,w,S,x,f]),lu(()=>{var V;if(n&&c&&(V=x.current)!=null&&V.__options.blockPointerEvents&&z()){const Y=Xs(v).body;if(Y.setAttribute(DE,""),Y.style.pointerEvents="none",R.current=!0,Ei(g)&&v){var H,Z;const j=g,U=w==null||(H=w.nodesRef.current.find(F=>F.id===P))==null||(Z=H.context)==null?void 0:Z.elements.floating;return U&&(U.style.pointerEvents=""),j.style.pointerEvents="auto",v.style.pointerEvents="auto",()=>{j.style.pointerEvents="",v.style.pointerEvents=""}}}},[n,c,P,v,g,w,x,f,z]),lu(()=>{c||(O.current=void 0,X(),Q())},[c,X,Q]),_.useEffect(()=>()=>{X(),clearTimeout(E.current),clearTimeout(N.current),Q()},[n,X,Q]),_.useMemo(()=>{if(!n)return{};function V(H){O.current=H.pointerType}return{reference:{onPointerDown:V,onPointerEnter:V,onMouseMove(){c||s===0||(clearTimeout(N.current),N.current=setTimeout(()=>{I.current||u(!0)},s))}},floating:{onMouseEnter(){clearTimeout(E.current)},onMouseLeave(){p.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),G(!1)}}}},[p,n,s,c,u,G])},xz=_.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:()=>{},setState:()=>{},isInstantPhase:!1}),Sz=()=>_.useContext(xz),HQ=e=>{let{children:t,delay:n,timeoutMs:r=0}=e;const[o,i]=_.useReducer((c,u)=>({...c,...u}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),s=_.useRef(null),a=_.useCallback(c=>{i({currentId:c})},[]);return lu(()=>{o.currentId?s.current===null?s.current=o.currentId:i({isInstantPhase:!0}):(i({isInstantPhase:!1}),s.current=null)},[o.currentId]),_.createElement(xz.Provider,{value:_.useMemo(()=>({...o,setState:i,setCurrentId:a}),[o,i,a])},t)},WQ=(e,t)=>{let{open:n,onOpenChange:r}=e,{id:o}=t;const{currentId:i,setCurrentId:s,initialDelay:a,setState:c,timeoutMs:u}=Sz();_.useEffect(()=>{i&&(c({delay:{open:1,close:Wh(a,"close")}}),i!==o&&r(!1))},[o,r,c,i,a]),_.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]),_.useEffect(()=>{n&&s(o)},[n,s,o])};function UQ(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 RE(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&AQ(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function N_(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 ZQ(e){return"composedPath"in e?e.composedPath()[0]:e.target}const GQ=Zd["useInsertionEffect".toString()],YQ=GQ||(e=>e());function Pz(e){const t=_.useRef(()=>{});return YQ(()=>{t.current=e}),_.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o!1),$=typeof g=="function"?E:g,N=_.useRef(!1),{escapeKeyBubbles:I,outsidePressBubbles:R}=JQ(x);return _.useEffect(()=>{if(!n||!f)return;u.current.__escapeKeyBubbles=I,u.current.__outsidePressBubbles=R;function B(V){if(V.key==="Escape"){const H=S?N_(S.nodesRef.current,i):[];if(H.length>0){let Z=!0;if(H.forEach(Y=>{var j;if((j=Y.context)!=null&&j.open&&!Y.context.dataRef.current.__escapeKeyBubbles){Z=!1;return}}),!Z)return}o.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1)}}function z(V){const H=N.current;if(N.current=!1,H||typeof $=="function"&&!$(V))return;const Z=ZQ(V);if(wz(Z)&&c){const U=c.ownerDocument.defaultView||window,F=Z.scrollWidth>Z.clientWidth,K=Z.scrollHeight>Z.clientHeight;let ee=K&&V.offsetX>Z.clientWidth;if(K&&U.getComputedStyle(Z).direction==="rtl"&&(ee=V.offsetX<=Z.offsetWidth-Z.clientWidth),ee||F&&V.offsetY>Z.clientHeight)return}const Y=S&&N_(S.nodesRef.current,i).some(U=>{var F;return Uh(V,(F=U.context)==null?void 0:F.elements.floating)});if(Uh(V,c)||Uh(V,a)||Y)return;const j=S?N_(S.nodesRef.current,i):[];if(j.length>0){let U=!0;if(j.forEach(F=>{var K;if((K=F.context)!=null&&K.open&&!F.context.dataRef.current.__outsidePressBubbles){U=!1;return}}),!U)return}o.emit("dismiss",{type:"outsidePress",data:{returnFocus:O?{preventScroll:!0}:BQ(V)||FQ(V)}}),r(!1)}function G(){r(!1)}const X=Xs(c);p&&X.addEventListener("keydown",B),$&&X.addEventListener(v,z);let Q=[];return P&&(Ei(a)&&(Q=us(a)),Ei(c)&&(Q=Q.concat(us(c))),!Ei(s)&&s&&s.contextElement&&(Q=Q.concat(us(s.contextElement)))),Q=Q.filter(V=>{var H;return V!==((H=X.defaultView)==null?void 0:H.visualViewport)}),Q.forEach(V=>{V.addEventListener("scroll",G,{passive:!0})}),()=>{p&&X.removeEventListener("keydown",B),$&&X.removeEventListener(v,z),Q.forEach(V=>{V.removeEventListener("scroll",G)})}},[u,c,a,s,p,$,v,o,S,i,n,r,P,f,I,R,O]),_.useEffect(()=>{N.current=!1},[$,v]),_.useMemo(()=>f?{reference:{[KQ[w]]:()=>{y&&(o.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1))}},floating:{[qQ[v]]:()=>{N.current=!0}}}:{},[f,o,y,v,w,r])},QQ=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=_.useRef(""),g=_.useRef(!1),v=_.useRef();return _.useEffect(()=>{if(!u)return;const w=Xs(a).defaultView||window;function P(){!n&&wz(c)&&c===UQ(Xs(c))&&(g.current=!0)}return w.addEventListener("blur",P),()=>{w.removeEventListener("blur",P)}},[a,c,n,u]),_.useEffect(()=>{if(!u)return;function y(w){(w.type==="referencePress"||w.type==="escapeKey")&&(g.current=!0)}return i.on("dismiss",y),()=>{i.off("dismiss",y)}},[i,u]),_.useEffect(()=>()=>{clearTimeout(v.current)},[]),_.useMemo(()=>u?{reference:{onPointerDown(y){let{pointerType:w}=y;p.current=w,g.current=!!(w&&f)},onMouseLeave(){g.current=!1},onFocus(y){var w;g.current||y.type==="focus"&&((w=o.current.openEvent)==null?void 0:w.type)==="mousedown"&&o.current.openEvent&&Uh(o.current.openEvent,c)||(o.current.openEvent=y.nativeEvent,r(!0))},onBlur(y){g.current=!1;const w=y.relatedTarget,P=Ei(w)&&w.hasAttribute("data-floating-ui-focus-guard")&&w.getAttribute("data-type")==="outside";v.current=setTimeout(()=>{RE(s.floating.current,w)||RE(c,w)||P||r(!1)})}}}:{},[u,f,c,s,o,r])},eee=function(e,t){let{open:n}=e,{enabled:r=!0,role:o="dialog"}=t===void 0?{}:t;const i=jE(),s=jE();return _.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 _P(e){e===void 0&&(e={});const{open:t=!1,onOpenChange:n,nodeId:r}=e,o=MQ(e),i=vP(),s=_.useRef(null),a=_.useRef({}),c=_.useState(()=>jQ())[0],[u,f]=_.useState(null),p=_.useCallback(x=>{const S=Ei(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),contextElement:x}:x;o.refs.setReference(S)},[o.refs]),g=_.useCallback(x=>{(Ei(x)||x===null)&&(s.current=x,f(x)),(Ei(o.refs.reference.current)||o.refs.reference.current===null||x!==null&&!Ei(x))&&o.refs.setReference(x)},[o.refs]),v=_.useMemo(()=>({...o.refs,setReference:g,setPositionReference:p,domReference:s}),[o.refs,g,p]),y=_.useMemo(()=>({...o.elements,domReference:u}),[o.elements,u]),w=Pz(n),P=_.useMemo(()=>({...o,refs:v,elements:y,dataRef:a,nodeId:r,events:c,open:t,onOpenChange:w}),[o,r,c,t,w,v,y]);return lu(()=>{const x=i?.nodesRef.current.find(S=>S.id===r);x&&(x.context=P)}),_.useMemo(()=>({...o,context:P,refs:v,reference:g,positionReference:p}),[o,v,P,g,p])}function T_(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,g=new Array(p),v=0;vy(...g))}}}else o[a]=c}),o),{})}}const tee=function(e){e===void 0&&(e=[]);const t=e,n=_.useCallback(i=>T_(i,e,"reference"),t),r=_.useCallback(i=>T_(i,e,"floating"),t),o=_.useCallback(i=>T_(i,e,"item"),e.map(i=>i?.item));return _.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:o}),[n,r,o])};function Oz({opened:e,floating:t,position:n,positionDependencies:r}){const[o,i]=_.useState(0);_.useEffect(()=>{if(t.refs.reference.current&&t.refs.floating.current)return EQ(t.refs.reference.current,t.refs.floating.current,t.update)},[t.refs.reference.current,t.refs.floating.current,e,o,n]),Fn(()=>{t.update()},r),Fn(()=>{i(s=>s+1)},[e])}function nee(e){const t=[uz(e.offset)];return e.middlewares.shift&&t.push(pP({limiter:cQ()})),e.middlewares.flip&&t.push(az()),e.middlewares.inline&&t.push(cz()),t.push(yz({element:e.arrowRef,padding:e.arrowOffset})),t}function ree(e){const[t,n]=go({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=_P({placement:e.position,middleware:[...nee(e),...e.width==="target"?[uQ({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 Oz({opened:e.opened,position:e.position,positionDependencies:e.positionDependencies,floating:i}),Fn(()=>{var s;(s=e.onPositionChange)==null||s.call(e,i.placement)},[i.placement]),Fn(()=>{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 Cz={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"},[oee,kz]=bu(Cz.context);var iee=Object.defineProperty,see=Object.defineProperties,aee=Object.getOwnPropertyDescriptors,dg=Object.getOwnPropertySymbols,Ez=Object.prototype.hasOwnProperty,$z=Object.prototype.propertyIsEnumerable,zE=(e,t,n)=>t in e?iee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gp=(e,t)=>{for(var n in t||(t={}))Ez.call(t,n)&&zE(e,n,t[n]);if(dg)for(var n of dg(t))$z.call(t,n)&&zE(e,n,t[n]);return e},lee=(e,t)=>see(e,aee(t)),cee=(e,t)=>{var n={};for(var r in e)Ez.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&&$z.call(e,r)&&(n[r]=e[r]);return n};const uee={refProp:"ref",popupType:"dialog",shouldOverrideDefaultTargetId:!0},Mz=_.forwardRef((e,t)=>{const n=ae("PopoverTarget",uee,e),{children:r,refProp:o,popupType:i,shouldOverrideDefaultTargetId:s}=n,a=cee(n,["children","refProp","popupType","shouldOverrideDefaultTargetId"]);if(!Nf(r))throw new Error(Cz.children);const c=a,u=kz(),f=ws(u.reference,r.ref,t),p=u.withRoles?{"aria-haspopup":i,"aria-expanded":u.opened,"aria-controls":u.getDropdownId(),id:s?u.getTargetId():r.props.id}:{};return _.cloneElement(r,Gp(lee(Gp(Gp(Gp({},c),p),u.targetProps),{className:nS(u.targetProps.className,c.className,r.props.className),[o]:f}),u.controlled?null:{onClick:u.onToggle}))});Mz.displayName="@mantine/core/PopoverTarget";var dee=ue((e,{radius:t,shadow:n})=>({dropdown:{position:"absolute",backgroundColor:e.white,background:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`${M(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:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,zIndex:1}}));const fee=dee;var pee=Object.defineProperty,AE=Object.getOwnPropertySymbols,hee=Object.prototype.hasOwnProperty,mee=Object.prototype.propertyIsEnumerable,BE=(e,t,n)=>t in e?pee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ic=(e,t)=>{for(var n in t||(t={}))hee.call(t,n)&&BE(e,n,t[n]);if(AE)for(var n of AE(t))mee.call(t,n)&&BE(e,n,t[n]);return e};const FE={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function gee({transition:e,state:t,duration:n,timingFunction:r}){const o={transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof e=="string"?e in Sp?ic(ic(ic({transitionProperty:Sp[e].transitionProperty},o),Sp[e].common),Sp[e][FE[t]]):null:ic(ic(ic({transitionProperty:e.transitionProperty},o),e.common),e[FE[t]])}function vee({duration:e,exitDuration:t,timingFunction:n,mounted:r,onEnter:o,onExit:i,onEntered:s,onExited:a}){const c=ir(),u=pS(),f=c.respectReducedMotion?u:!1,[p,g]=_.useState(f?0:e),[v,y]=_.useState(r?"entered":"exited"),w=_.useRef(-1),P=x=>{const S=x?o:i,O=x?s:a;y(x?"pre-entering":"pre-exiting"),window.clearTimeout(w.current);const E=f?0:x?e:t;if(g(E),E===0)typeof S=="function"&&S(),typeof O=="function"&&O(),y(x?"entered":"exited");else{const $=window.setTimeout(()=>{typeof S=="function"&&S(),y(x?"entering":"exiting")},10);w.current=window.setTimeout(()=>{window.clearTimeout($),typeof O=="function"&&O(),y(x?"entered":"exited")},E)}};return Fn(()=>{P(r)},[r]),_.useEffect(()=>()=>window.clearTimeout(w.current),[]),{transitionDuration:p,transitionStatus:v,transitionTimingFunction:n||c.transitionTimingFunction}}function Os({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:g,transitionTimingFunction:v}=vee({mounted:o,exitDuration:r,duration:n,timingFunction:s,onExit:a,onEntered:c,onEnter:u,onExited:f});return p===0?o?k.createElement(k.Fragment,null,i({})):e?i({display:"none"}):null:g==="exited"?e?i({display:"none"}):null:k.createElement(k.Fragment,null,i(gee({transition:t,duration:p,state:g,timingFunction:v})))}Os.displayName="@mantine/core/Transition";function wP({children:e,active:t=!0,refProp:n="ref"}){const r=PG(t),o=ws(r,e?.ref);return Nf(e)?_.cloneElement(e,{[n]:o}):e}wP.displayName="@mantine/core/FocusTrap";var yee=Object.defineProperty,_ee=Object.defineProperties,wee=Object.getOwnPropertyDescriptors,VE=Object.getOwnPropertySymbols,bee=Object.prototype.hasOwnProperty,xee=Object.prototype.propertyIsEnumerable,HE=(e,t,n)=>t in e?yee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ts=(e,t)=>{for(var n in t||(t={}))bee.call(t,n)&&HE(e,n,t[n]);if(VE)for(var n of VE(t))xee.call(t,n)&&HE(e,n,t[n]);return e},Yp=(e,t)=>_ee(e,wee(t));function WE(e,t,n,r){return e==="center"||r==="center"?{top:t}:e==="end"?{bottom:n}:e==="start"?{top:n}:{}}function UE(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 See={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function Pee({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:o,arrowX:i,arrowY:s,dir:a}){const[c,u="center"]=e.split("-"),f={width:M(t),height:M(t),transform:"rotate(45deg)",position:"absolute",[See[c]]:M(r)},p=M(-t/2);return c==="left"?Yp(Ts(Ts({},f),WE(u,s,n,o)),{right:p,borderLeftColor:"transparent",borderBottomColor:"transparent"}):c==="right"?Yp(Ts(Ts({},f),WE(u,s,n,o)),{left:p,borderRightColor:"transparent",borderTopColor:"transparent"}):c==="top"?Yp(Ts(Ts({},f),UE(u,i,n,o,a)),{bottom:p,borderTopColor:"transparent",borderLeftColor:"transparent"}):c==="bottom"?Yp(Ts(Ts({},f),UE(u,i,n,o,a)),{top:p,borderBottomColor:"transparent",borderRightColor:"transparent"}):{}}var Oee=Object.defineProperty,Cee=Object.defineProperties,kee=Object.getOwnPropertyDescriptors,fg=Object.getOwnPropertySymbols,Nz=Object.prototype.hasOwnProperty,Tz=Object.prototype.propertyIsEnumerable,ZE=(e,t,n)=>t in e?Oee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Eee=(e,t)=>{for(var n in t||(t={}))Nz.call(t,n)&&ZE(e,n,t[n]);if(fg)for(var n of fg(t))Tz.call(t,n)&&ZE(e,n,t[n]);return e},$ee=(e,t)=>Cee(e,kee(t)),Mee=(e,t)=>{var n={};for(var r in e)Nz.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&&Tz.call(e,r)&&(n[r]=e[r]);return n};const bP=_.forwardRef((e,t)=>{var n=e,{position:r,arrowSize:o,arrowOffset:i,arrowRadius:s,arrowPosition:a,visible:c,arrowX:u,arrowY:f}=n,p=Mee(n,["position","arrowSize","arrowOffset","arrowRadius","arrowPosition","visible","arrowX","arrowY"]);const g=ir();return c?k.createElement("div",$ee(Eee({},p),{ref:t,style:Pee({position:r,arrowSize:o,arrowOffset:i,arrowRadius:s,arrowPosition:a,dir:g.dir,arrowX:u,arrowY:f})})):null});bP.displayName="@mantine/core/FloatingArrow";var Nee=Object.defineProperty,Tee=Object.defineProperties,Iee=Object.getOwnPropertyDescriptors,pg=Object.getOwnPropertySymbols,Iz=Object.prototype.hasOwnProperty,jz=Object.prototype.propertyIsEnumerable,GE=(e,t,n)=>t in e?Nee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sc=(e,t)=>{for(var n in t||(t={}))Iz.call(t,n)&&GE(e,n,t[n]);if(pg)for(var n of pg(t))jz.call(t,n)&&GE(e,n,t[n]);return e},Kp=(e,t)=>Tee(e,Iee(t)),jee=(e,t)=>{var n={};for(var r in e)Iz.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&&jz.call(e,r)&&(n[r]=e[r]);return n};const Lee={};function Lz(e){var t;const n=ae("PopoverDropdown",Lee,e),{style:r,className:o,children:i,onKeyDownCapture:s}=n,a=jee(n,["style","className","children","onKeyDownCapture"]),c=kz(),{classes:u,cx:f}=fee({radius:c.radius,shadow:c.shadow},{name:c.__staticSelector,classNames:c.classNames,styles:c.styles,unstyled:c.unstyled,variant:c.variant}),p=B3({opened:c.opened,shouldReturnFocus:c.returnFocus}),g=c.withRoles?{"aria-labelledby":c.getTargetId(),id:c.getDropdownId(),role:"dialog"}:{};return c.disabled?null:k.createElement(Af,Kp(sc({},c.portalProps),{withinPortal:c.withinPortal}),k.createElement(Os,Kp(sc({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}),v=>{var y,w;return k.createElement(wP,{active:c.trapFocus},k.createElement(Pe,sc(Kp(sc({},g),{tabIndex:-1,ref:c.floating,style:Kp(sc(sc({},r),v),{zIndex:c.zIndex,top:(y=c.y)!=null?y:0,left:(w=c.x)!=null?w:0,width:c.width==="target"?void 0:M(c.width)}),className:f(u.dropdown,o),onKeyDownCapture:WW(c.onClose,{active:c.closeOnEscape,onTrigger:p,onKeyDown:s}),"data-position":c.placement}),a),i,k.createElement(bP,{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})))}))}Lz.displayName="@mantine/core/PopoverDropdown";function Dz(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 YE=Object.getOwnPropertySymbols,Dee=Object.prototype.hasOwnProperty,Ree=Object.prototype.propertyIsEnumerable,zee=(e,t)=>{var n={};for(var r in e)Dee.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&YE)for(var r of YE(e))t.indexOf(r)<0&&Ree.call(e,r)&&(n[r]=e[r]);return n};const Aee={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:ii("popover"),__staticSelector:"Popover",width:"max-content"};function kn(e){var t,n,r,o,i,s;const a=_.useRef(null),c=ae("Popover",Aee,e),{children:u,position:f,offset:p,onPositionChange:g,positionDependencies:v,opened:y,transitionProps:w,width:P,middlewares:x,withArrow:S,arrowSize:O,arrowOffset:E,arrowRadius:$,arrowPosition:N,unstyled:I,classNames:R,styles:B,closeOnClickOutside:z,withinPortal:G,portalProps:X,closeOnEscape:Q,clickOutsideEvents:V,trapFocus:H,onClose:Z,onOpen:Y,onChange:j,zIndex:U,radius:F,shadow:K,id:ee,defaultOpened:fe,__staticSelector:ie,withRoles:J,disabled:ne,returnFocus:le,variant:_e,keepMounted:Ne}=c,we=zee(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"]),[He,Te]=_.useState(null),[je,it]=_.useState(null),bt=$a(ee),_n=ir(),pt=ree({middlewares:x,width:P,position:Dz(_n.dir,f),offset:typeof p=="number"?p+(S?O/2:0):p,arrowRef:a,arrowOffset:E,onPositionChange:g,positionDependencies:v,opened:y,defaultOpened:fe,onChange:j,onOpen:Y,onClose:Z});hG(()=>pt.opened&&z&&pt.onClose(),V,[He,je]);const Tn=_.useCallback(lt=>{Te(lt),pt.floating.reference(lt)},[pt.floating.reference]),kr=_.useCallback(lt=>{it(lt),pt.floating.floating(lt)},[pt.floating.floating]);return k.createElement(oee,{value:{returnFocus:le,disabled:ne,controlled:pt.controlled,reference:Tn,floating:kr,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:w,width:P,withArrow:S,arrowSize:O,arrowOffset:E,arrowRadius:$,arrowPosition:N,placement:pt.floating.placement,trapFocus:H,withinPortal:G,portalProps:X,zIndex:U,radius:F,shadow:K,closeOnEscape:Q,onClose:pt.onClose,onToggle:pt.onToggle,getTargetId:()=>`${bt}-target`,getDropdownId:()=>`${bt}-dropdown`,withRoles:J,targetProps:we,__staticSelector:ie,classNames:R,styles:B,unstyled:I,variant:_e,keepMounted:Ne}},u)}kn.Target=Mz;kn.Dropdown=Lz;kn.displayName="@mantine/core/Popover";var Bee=Object.defineProperty,hg=Object.getOwnPropertySymbols,Rz=Object.prototype.hasOwnProperty,zz=Object.prototype.propertyIsEnumerable,KE=(e,t,n)=>t in e?Bee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fee=(e,t)=>{for(var n in t||(t={}))Rz.call(t,n)&&KE(e,n,t[n]);if(hg)for(var n of hg(t))zz.call(t,n)&&KE(e,n,t[n]);return e},Vee=(e,t)=>{var n={};for(var r in e)Rz.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&&zz.call(e,r)&&(n[r]=e[r]);return n};function Hee(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,g=Vee(t,["children","component","maxHeight","direction","id","innerRef","__staticSelector","styles","classNames","unstyled"]);const{classes:v}=XX(null,{name:c,styles:u,classNames:f,unstyled:p});return k.createElement(kn.Dropdown,Fee({p:0,onMouseDown:y=>y.preventDefault()},g),k.createElement("div",{style:{maxHeight:M(o),display:"flex"}},k.createElement(Pe,{component:r||"div",id:`${s}-items`,"aria-labelledby":`${s}-label`,role:"listbox",onMouseDown:y=>y.preventDefault(),style:{flex:1,overflowY:r!==M0?"auto":void 0},"data-combobox-popover":!0,tabIndex:-1,ref:a},k.createElement("div",{className:v.itemsWrapper,style:{flexDirection:i}},n))))}function ha({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:g,styles:v,unstyled:y,readOnly:w,variant:P}){return k.createElement(kn,{unstyled:y,classNames:g,styles:v,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:w,onPositionChange:x=>c&&a?.(x==="top"?"column-reverse":"column"),variant:P},i)}ha.Target=kn.Target;ha.Dropdown=Hee;var Wee=Object.defineProperty,Uee=Object.defineProperties,Zee=Object.getOwnPropertyDescriptors,mg=Object.getOwnPropertySymbols,Az=Object.prototype.hasOwnProperty,Bz=Object.prototype.propertyIsEnumerable,qE=(e,t,n)=>t in e?Wee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qp=(e,t)=>{for(var n in t||(t={}))Az.call(t,n)&&qE(e,n,t[n]);if(mg)for(var n of mg(t))Bz.call(t,n)&&qE(e,n,t[n]);return e},Gee=(e,t)=>Uee(e,Zee(t)),Yee=(e,t)=>{var n={};for(var r in e)Az.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&&Bz.call(e,r)&&(n[r]=e[r]);return n};function xP(e,t,n){const r=ae(e,t,n),{label:o,description:i,error:s,required:a,classNames:c,styles:u,className:f,unstyled:p,__staticSelector:g,sx:v,errorProps:y,labelProps:w,descriptionProps:P,wrapperProps:x,id:S,size:O,style:E,inputContainer:$,inputWrapperOrder:N,withAsterisk:I,variant:R}=r,B=Yee(r,["label","description","error","required","classNames","styles","className","unstyled","__staticSelector","sx","errorProps","labelProps","descriptionProps","wrapperProps","id","size","style","inputContainer","inputWrapperOrder","withAsterisk","variant"]),z=$a(S),{systemStyles:G,rest:X}=Dl(B),Q=qp({label:o,description:i,error:s,required:a,classNames:c,className:f,__staticSelector:g,sx:v,errorProps:y,labelProps:w,descriptionProps:P,unstyled:p,styles:u,id:z,size:O,style:E,inputContainer:$,inputWrapperOrder:N,withAsterisk:I,variant:R},x);return Gee(qp({},X),{classNames:c,styles:u,unstyled:p,wrapperProps:qp(qp({},Q),G),inputProps:{required:a,classNames:c,styles:u,unstyled:p,id:z,size:O,__staticSelector:g,error:s,variant:R}})}var Kee=ue((e,t,{size:n})=>({label:{display:"inline-block",fontSize:re({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 qee=Kee;var Jee=Object.defineProperty,gg=Object.getOwnPropertySymbols,Fz=Object.prototype.hasOwnProperty,Vz=Object.prototype.propertyIsEnumerable,JE=(e,t,n)=>t in e?Jee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xee=(e,t)=>{for(var n in t||(t={}))Fz.call(t,n)&&JE(e,n,t[n]);if(gg)for(var n of gg(t))Vz.call(t,n)&&JE(e,n,t[n]);return e},Qee=(e,t)=>{var n={};for(var r in e)Fz.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&&Vz.call(e,r)&&(n[r]=e[r]);return n};const ete={labelElement:"label",size:"sm"},SP=_.forwardRef((e,t)=>{const n=ae("InputLabel",ete,e),{labelElement:r,children:o,required:i,size:s,classNames:a,styles:c,unstyled:u,className:f,htmlFor:p,__staticSelector:g,variant:v,onMouseDown:y}=n,w=Qee(n,["labelElement","children","required","size","classNames","styles","unstyled","className","htmlFor","__staticSelector","variant","onMouseDown"]),{classes:P,cx:x}=qee(null,{name:["InputWrapper",g],classNames:a,styles:c,unstyled:u,variant:v,size:s});return k.createElement(Pe,Xee({component:r,ref:t,className:x(P.label,f),htmlFor:r==="label"?p:void 0,onMouseDown:S=>{y?.(S),!S.defaultPrevented&&S.detail>1&&S.preventDefault()}},w),o,i&&k.createElement("span",{className:P.required,"aria-hidden":!0}," *"))});SP.displayName="@mantine/core/InputLabel";var tte=ue((e,t,{size:n})=>({error:{wordBreak:"break-word",color:e.fn.variant({variant:"filled",color:"red"}).background,fontSize:`calc(${re({size:n,sizes:e.fontSizes})} - ${M(2)})`,lineHeight:1.2,display:"block"}}));const nte=tte;var rte=Object.defineProperty,vg=Object.getOwnPropertySymbols,Hz=Object.prototype.hasOwnProperty,Wz=Object.prototype.propertyIsEnumerable,XE=(e,t,n)=>t in e?rte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ote=(e,t)=>{for(var n in t||(t={}))Hz.call(t,n)&&XE(e,n,t[n]);if(vg)for(var n of vg(t))Wz.call(t,n)&&XE(e,n,t[n]);return e},ite=(e,t)=>{var n={};for(var r in e)Hz.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&&Wz.call(e,r)&&(n[r]=e[r]);return n};const ste={size:"sm"},PP=_.forwardRef((e,t)=>{const n=ae("InputError",ste,e),{children:r,className:o,classNames:i,styles:s,unstyled:a,size:c,__staticSelector:u,variant:f}=n,p=ite(n,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:g,cx:v}=nte(null,{name:["InputWrapper",u],classNames:i,styles:s,unstyled:a,variant:f,size:c});return k.createElement(W,ote({className:v(g.error,o),ref:t},p),r)});PP.displayName="@mantine/core/InputError";var ate=ue((e,t,{size:n})=>({description:{wordBreak:"break-word",color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],fontSize:`calc(${re({size:n,sizes:e.fontSizes})} - ${M(2)})`,lineHeight:1.2,display:"block"}}));const lte=ate;var cte=Object.defineProperty,yg=Object.getOwnPropertySymbols,Uz=Object.prototype.hasOwnProperty,Zz=Object.prototype.propertyIsEnumerable,QE=(e,t,n)=>t in e?cte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ute=(e,t)=>{for(var n in t||(t={}))Uz.call(t,n)&&QE(e,n,t[n]);if(yg)for(var n of yg(t))Zz.call(t,n)&&QE(e,n,t[n]);return e},dte=(e,t)=>{var n={};for(var r in e)Uz.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&&Zz.call(e,r)&&(n[r]=e[r]);return n};const fte={size:"sm"},OP=_.forwardRef((e,t)=>{const n=ae("InputDescription",fte,e),{children:r,className:o,classNames:i,styles:s,unstyled:a,size:c,__staticSelector:u,variant:f}=n,p=dte(n,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:g,cx:v}=lte(null,{name:["InputWrapper",u],classNames:i,styles:s,unstyled:a,variant:f,size:c});return k.createElement(W,ute({color:"dimmed",className:v(g.description,o),ref:t,unstyled:a},p),r)});OP.displayName="@mantine/core/InputDescription";const Gz=_.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0}),pte=Gz.Provider,hte=()=>_.useContext(Gz);function mte(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 gte=Object.defineProperty,vte=Object.defineProperties,yte=Object.getOwnPropertyDescriptors,e$=Object.getOwnPropertySymbols,_te=Object.prototype.hasOwnProperty,wte=Object.prototype.propertyIsEnumerable,t$=(e,t,n)=>t in e?gte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bte=(e,t)=>{for(var n in t||(t={}))_te.call(t,n)&&t$(e,n,t[n]);if(e$)for(var n of e$(t))wte.call(t,n)&&t$(e,n,t[n]);return e},xte=(e,t)=>vte(e,yte(t)),Ste=ue(e=>({root:xte(bte({},e.fn.fontStyles()),{lineHeight:e.lineHeight})}));const Pte=Ste;var Ote=Object.defineProperty,Cte=Object.defineProperties,kte=Object.getOwnPropertyDescriptors,_g=Object.getOwnPropertySymbols,Yz=Object.prototype.hasOwnProperty,Kz=Object.prototype.propertyIsEnumerable,n$=(e,t,n)=>t in e?Ote(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Is=(e,t)=>{for(var n in t||(t={}))Yz.call(t,n)&&n$(e,n,t[n]);if(_g)for(var n of _g(t))Kz.call(t,n)&&n$(e,n,t[n]);return e},r$=(e,t)=>Cte(e,kte(t)),Ete=(e,t)=>{var n={};for(var r in e)Yz.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&&Kz.call(e,r)&&(n[r]=e[r]);return n};const $te={labelElement:"label",size:"sm",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},qz=_.forwardRef((e,t)=>{const n=ae("InputWrapper",$te,e),{className:r,label:o,children:i,required:s,id:a,error:c,description:u,labelElement:f,labelProps:p,descriptionProps:g,errorProps:v,classNames:y,styles:w,size:P,inputContainer:x,__staticSelector:S,unstyled:O,inputWrapperOrder:E,withAsterisk:$,variant:N}=n,I=Ete(n,["className","label","children","required","id","error","description","labelElement","labelProps","descriptionProps","errorProps","classNames","styles","size","inputContainer","__staticSelector","unstyled","inputWrapperOrder","withAsterisk","variant"]),{classes:R,cx:B}=Pte(null,{classNames:y,styles:w,name:["InputWrapper",S],unstyled:O,variant:N,size:P}),z={classNames:y,styles:w,unstyled:O,size:P,variant:N,__staticSelector:S},G=typeof $=="boolean"?$:s,X=a?`${a}-error`:v?.id,Q=a?`${a}-description`:g?.id,H=`${!!c&&typeof c!="boolean"?X:""} ${u?Q:""}`,Z=H.trim().length>0?H.trim():void 0,Y=o&&k.createElement(SP,Is(Is({key:"label",labelElement:f,id:a?`${a}-label`:void 0,htmlFor:a,required:G},z),p),o),j=u&&k.createElement(OP,r$(Is(Is({key:"description"},g),z),{size:g?.size||z.size,id:g?.id||Q}),u),U=k.createElement(_.Fragment,{key:"input"},x(i)),F=typeof c!="boolean"&&c&&k.createElement(PP,r$(Is(Is({},v),z),{size:v?.size||z.size,key:"error",id:v?.id||X}),c),K=E.map(ee=>{switch(ee){case"label":return Y;case"input":return U;case"description":return j;case"error":return F;default:return null}});return k.createElement(pte,{value:Is({describedBy:Z},mte(E,{hasDescription:!!j,hasError:!!F}))},k.createElement(Pe,Is({className:B(R.root,r),ref:t},I),K))});qz.displayName="@mantine/core/InputWrapper";var Mte=Object.defineProperty,wg=Object.getOwnPropertySymbols,Jz=Object.prototype.hasOwnProperty,Xz=Object.prototype.propertyIsEnumerable,o$=(e,t,n)=>t in e?Mte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nte=(e,t)=>{for(var n in t||(t={}))Jz.call(t,n)&&o$(e,n,t[n]);if(wg)for(var n of wg(t))Xz.call(t,n)&&o$(e,n,t[n]);return e},Tte=(e,t)=>{var n={};for(var r in e)Jz.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&&Xz.call(e,r)&&(n[r]=e[r]);return n};const Ite={},Qz=_.forwardRef((e,t)=>{const n=ae("InputPlaceholder",Ite,e),{sx:r}=n,o=Tte(n,["sx"]);return k.createElement(Pe,Nte({component:"span",sx:[i=>i.fn.placeholderStyles(),...tS(r)],ref:t},o))});Qz.displayName="@mantine/core/InputPlaceholder";var jte=Object.defineProperty,Lte=Object.defineProperties,Dte=Object.getOwnPropertyDescriptors,i$=Object.getOwnPropertySymbols,Rte=Object.prototype.hasOwnProperty,zte=Object.prototype.propertyIsEnumerable,s$=(e,t,n)=>t in e?jte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Jp=(e,t)=>{for(var n in t||(t={}))Rte.call(t,n)&&s$(e,n,t[n]);if(i$)for(var n of i$(t))zte.call(t,n)&&s$(e,n,t[n]);return e},I_=(e,t)=>Lte(e,Dte(t));const Dn={xs:M(30),sm:M(36),md:M(42),lg:M(50),xl:M(60)},Ate=["default","filled","unstyled"];function Bte({theme:e,variant:t}){return Ate.includes(t)?t==="default"?{border:`${M(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:`${M(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:M(28),outline:0,"&:focus, &:focus-within":{outline:"none",borderColor:"transparent"},"&:disabled":{backgroundColor:"transparent","&:focus, &:focus-within":{outline:"none",borderColor:"transparent"}}}:null}var Fte=ue((e,{multiline:t,radius:n,invalid:r,rightSectionWidth:o,withRightSection:i,iconWidth:s,offsetBottom:a,offsetTop:c,pointer:u},{variant:f,size:p})=>{const g=e.fn.variant({variant:"filled",color:"red"}).background,v=f==="default"||f==="filled"?{minHeight:re({size:p,sizes:Dn}),paddingLeft:`calc(${re({size:p,sizes:Dn})} / 3)`,paddingRight:i?o||re({size:p,sizes:Dn}):`calc(${re({size:p,sizes:Dn})} / 3)`,borderRadius:e.fn.radius(n)}:f==="unstyled"&&i?{paddingRight:o||re({size:p,sizes:Dn})}:null;return{wrapper:{position:"relative",marginTop:c?`calc(${e.spacing.xs} / 2)`:void 0,marginBottom:a?`calc(${e.spacing.xs} / 2)`:void 0,"&:has(input:disabled)":{"& .mantine-Input-rightSection":{display:"none"}}},input:I_(Jp(Jp(I_(Jp({},e.fn.fontStyles()),{height:t?f==="unstyled"?void 0:"auto":re({size:p,sizes:Dn}),WebkitTapHighlightColor:"transparent",lineHeight:t?e.lineHeight:`calc(${re({size:p,sizes:Dn})} - ${M(2)})`,appearance:"none",resize:"none",boxSizing:"border-box",fontSize:re({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}),Bte({theme:e,variant:f})),v),{"&: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",pointerEvents:"none","&::placeholder":{color:e.colors.dark[2]}},"&[data-invalid]":{color:g,borderColor:g,"&::placeholder":{opacity:1,color:g}},"&[data-with-icon]":{paddingLeft:typeof s=="number"?M(s):re({size:p,sizes:Dn})},"&::placeholder":I_(Jp({},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?M(s):re({size:p,sizes:Dn}),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||re({size:p,sizes:Dn})}}});const Vte=Fte;var Hte=Object.defineProperty,Wte=Object.defineProperties,Ute=Object.getOwnPropertyDescriptors,bg=Object.getOwnPropertySymbols,eA=Object.prototype.hasOwnProperty,tA=Object.prototype.propertyIsEnumerable,a$=(e,t,n)=>t in e?Hte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xp=(e,t)=>{for(var n in t||(t={}))eA.call(t,n)&&a$(e,n,t[n]);if(bg)for(var n of bg(t))tA.call(t,n)&&a$(e,n,t[n]);return e},l$=(e,t)=>Wte(e,Ute(t)),Zte=(e,t)=>{var n={};for(var r in e)eA.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&&tA.call(e,r)&&(n[r]=e[r]);return n};const Gte={size:"sm",variant:"default"},Fl=_.forwardRef((e,t)=>{const n=ae("Input",Gte,e),{className:r,error:o,required:i,disabled:s,variant:a,icon:c,style:u,rightSectionWidth:f,iconWidth:p,rightSection:g,rightSectionProps:v,radius:y,size:w,wrapperProps:P,classNames:x,styles:S,__staticSelector:O,multiline:E,sx:$,unstyled:N,pointer:I}=n,R=Zte(n,["className","error","required","disabled","variant","icon","style","rightSectionWidth","iconWidth","rightSection","rightSectionProps","radius","size","wrapperProps","classNames","styles","__staticSelector","multiline","sx","unstyled","pointer"]),{offsetBottom:B,offsetTop:z,describedBy:G}=hte(),{classes:X,cx:Q}=Vte({radius:y,multiline:E,invalid:!!o,rightSectionWidth:f?M(f):void 0,iconWidth:p,withRightSection:!!g,offsetBottom:B,offsetTop:z,pointer:I},{classNames:x,styles:S,name:["Input",O],unstyled:N,variant:a,size:w}),{systemStyles:V,rest:H}=Dl(R);return k.createElement(Pe,Xp(Xp({className:Q(X.wrapper,r),sx:$,style:u},V),P),c&&k.createElement("div",{className:X.icon},c),k.createElement(Pe,l$(Xp({component:"input"},H),{ref:t,required:i,"aria-invalid":!!o,"aria-describedby":G,disabled:s,"data-disabled":s||void 0,"data-with-icon":!!c||void 0,"data-invalid":!!o||void 0,className:X.input})),g&&k.createElement("div",l$(Xp({},v),{className:X.rightSection}),g))});Fl.displayName="@mantine/core/Input";Fl.Wrapper=qz;Fl.Label=SP;Fl.Description=OP;Fl.Error=PP;Fl.Placeholder=Qz;const et=Fl;var Yte=Object.defineProperty,xg=Object.getOwnPropertySymbols,nA=Object.prototype.hasOwnProperty,rA=Object.prototype.propertyIsEnumerable,c$=(e,t,n)=>t in e?Yte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kte=(e,t)=>{for(var n in t||(t={}))nA.call(t,n)&&c$(e,n,t[n]);if(xg)for(var n of xg(t))rA.call(t,n)&&c$(e,n,t[n]);return e},qte=(e,t)=>{var n={};for(var r in e)nA.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&&rA.call(e,r)&&(n[r]=e[r]);return n};function Jte(e){const t=e,{style:n}=t,r=qte(t,["style"]);return k.createElement("svg",Kte({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:n},r),k.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 Xte=Object.defineProperty,Qte=Object.defineProperties,ene=Object.getOwnPropertyDescriptors,u$=Object.getOwnPropertySymbols,tne=Object.prototype.hasOwnProperty,nne=Object.prototype.propertyIsEnumerable,d$=(e,t,n)=>t in e?Xte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rne=(e,t)=>{for(var n in t||(t={}))tne.call(t,n)&&d$(e,n,t[n]);if(u$)for(var n of u$(t))nne.call(t,n)&&d$(e,n,t[n]);return e},one=(e,t)=>Qte(e,ene(t));const oA=_.createContext(null);function ine({spacing:e,children:t}){return k.createElement(oA.Provider,{value:{spacing:e}},t)}function sne(){const e=_.useContext(oA);return e?one(rne({},e),{withinGroup:!0}):{spacing:null,withinGroup:!1}}var ane=ue((e,{spacing:t})=>({root:{display:"flex",paddingLeft:re({size:t,sizes:e.spacing})}}));const lne=ane;var cne=Object.defineProperty,Sg=Object.getOwnPropertySymbols,iA=Object.prototype.hasOwnProperty,sA=Object.prototype.propertyIsEnumerable,f$=(e,t,n)=>t in e?cne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,une=(e,t)=>{for(var n in t||(t={}))iA.call(t,n)&&f$(e,n,t[n]);if(Sg)for(var n of Sg(t))sA.call(t,n)&&f$(e,n,t[n]);return e},dne=(e,t)=>{var n={};for(var r in e)iA.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&&sA.call(e,r)&&(n[r]=e[r]);return n};const fne={},aA=_.forwardRef((e,t)=>{const n=ae("AvatarGroup",fne,e),{children:r,spacing:o="sm",unstyled:i,className:s,variant:a}=n,c=dne(n,["children","spacing","unstyled","className","variant"]),{classes:u,cx:f}=lne({spacing:o},{name:"AvatarGroup",unstyled:i,variant:a});return k.createElement(ine,{spacing:o},k.createElement(Pe,une({ref:t,className:f(u.root,s)},c),r))});aA.displayName="@mantine/core/AvatarGroup";var pne=Object.defineProperty,hne=Object.defineProperties,mne=Object.getOwnPropertyDescriptors,p$=Object.getOwnPropertySymbols,gne=Object.prototype.hasOwnProperty,vne=Object.prototype.propertyIsEnumerable,h$=(e,t,n)=>t in e?pne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,id=(e,t)=>{for(var n in t||(t={}))gne.call(t,n)&&h$(e,n,t[n]);if(p$)for(var n of p$(t))vne.call(t,n)&&h$(e,n,t[n]);return e},m$=(e,t)=>hne(e,mne(t));const yne=["filled","light","gradient","outline"],Qp={xs:M(16),sm:M(26),md:M(38),lg:M(56),xl:M(84)};function _ne({withinGroup:e,spacing:t,theme:n}){return e?{marginLeft:`calc(${re({size:t,sizes:n.spacing})} * -1)`,backgroundColor:`${n.colorScheme==="dark"?n.colors.dark[7]:n.white}`,border:`${M(2)} solid ${n.colorScheme==="dark"?n.colors.dark[7]:n.white}`}:null}function wne({theme:e,variant:t,color:n,gradient:r}){const o=e.fn.variant({variant:t,color:n,gradient:r});return yne.includes(t)?{placeholder:{color:o.color,backgroundColor:o.background,backgroundImage:t==="gradient"?o.background:void 0,border:`${M(t==="gradient"?0:1)} solid ${o.border}`},placeholderIcon:{color:o.color}}:{}}var bne=ue((e,{radius:t,withinGroup:n,spacing:r,color:o,gradient:i},{variant:s,size:a})=>{const c=wne({theme:e,color:o,gradient:i,variant:s});return{root:id(m$(id({},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:re({size:a,sizes:Qp}),minWidth:re({size:a,sizes:Qp}),height:re({size:a,sizes:Qp})}),_ne({withinGroup:n,spacing:r,theme:e})),image:{objectFit:"cover",width:"100%",height:"100%",display:"block"},placeholder:id(m$(id({},e.fn.fontStyles()),{fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",userSelect:"none",borderRadius:e.fn.radius(t),fontSize:`calc(${re({size:a,sizes:Qp})} / 2.5)`}),c.placeholder),placeholderIcon:id({width:"70%",height:"70%"},c.placeholderIcon)}});const xne=bne;var Sne=Object.defineProperty,Pne=Object.defineProperties,One=Object.getOwnPropertyDescriptors,Pg=Object.getOwnPropertySymbols,lA=Object.prototype.hasOwnProperty,cA=Object.prototype.propertyIsEnumerable,g$=(e,t,n)=>t in e?Sne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,v$=(e,t)=>{for(var n in t||(t={}))lA.call(t,n)&&g$(e,n,t[n]);if(Pg)for(var n of Pg(t))cA.call(t,n)&&g$(e,n,t[n]);return e},Cne=(e,t)=>Pne(e,One(t)),kne=(e,t)=>{var n={};for(var r in e)lA.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&&cA.call(e,r)&&(n[r]=e[r]);return n};const Ene={size:"md",color:"gray",variant:"light"},CP=_.forwardRef((e,t)=>{const n=ae("Avatar",Ene,e),{className:r,size:o,src:i,alt:s,radius:a,children:c,color:u,variant:f,gradient:p,classNames:g,styles:v,imageProps:y,unstyled:w}=n,P=kne(n,["className","size","src","alt","radius","children","color","variant","gradient","classNames","styles","imageProps","unstyled"]),x=sne(),[S,O]=_.useState(!i),{classes:E,cx:$}=xne({color:u,radius:a,withinGroup:x.withinGroup,spacing:x.spacing,gradient:p},{classNames:g,styles:v,unstyled:w,name:"Avatar",variant:f,size:o});return _.useEffect(()=>{O(!i)},[i]),k.createElement(Pe,v$({component:"div",className:$(E.root,r),ref:t},P),S?k.createElement("div",{className:E.placeholder,title:s},c||k.createElement(Jte,{className:E.placeholderIcon})):k.createElement("img",Cne(v$({},y),{className:E.image,src:i,alt:s,onError:()=>O(!0)})))});CP.displayName="@mantine/core/Avatar";CP.Group=aA;const kP=CP;var $ne=Object.defineProperty,Mne=Object.defineProperties,Nne=Object.getOwnPropertyDescriptors,y$=Object.getOwnPropertySymbols,Tne=Object.prototype.hasOwnProperty,Ine=Object.prototype.propertyIsEnumerable,_$=(e,t,n)=>t in e?$ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,j_=(e,t)=>{for(var n in t||(t={}))Tne.call(t,n)&&_$(e,n,t[n]);if(y$)for(var n of y$(t))Ine.call(t,n)&&_$(e,n,t[n]);return e},jne=(e,t)=>Mne(e,Nne(t));const Lne=["light","filled","outline","dot","gradient"],L_={xs:{fontSize:M(9),height:M(16)},sm:{fontSize:M(10),height:M(18)},md:{fontSize:M(11),height:M(20)},lg:{fontSize:M(13),height:M(26)},xl:{fontSize:M(16),height:M(32)}},Dne={xs:M(4),sm:M(4),md:M(6),lg:M(8),xl:M(10)};function Rne({theme:e,variant:t,color:n,size:r,gradient:o}){if(!Lne.includes(t))return null;if(t==="dot"){const s=re({size:r,sizes:Dne});return{backgroundColor:"transparent",color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],border:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[3]}`,paddingLeft:`calc(${re({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:`${M(t==="gradient"?0:1)} solid ${i.border}`}}var zne=ue((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:j_(jne(j_(j_({},e.fn.focusStyles()),e.fn.fontStyles()),{fontSize:a,height:c,WebkitTapHighlightColor:"transparent",lineHeight:`calc(${c} - ${M(2)})`,textDecoration:"none",padding:`0 calc(${re({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:M(.25),cursor:"inherit",textOverflow:"ellipsis",overflow:"hidden"}),Rne({theme:e,variant:i,color:t,size:s,gradient:r}))}});const Ane=zne;var Bne=Object.defineProperty,Og=Object.getOwnPropertySymbols,uA=Object.prototype.hasOwnProperty,dA=Object.prototype.propertyIsEnumerable,w$=(e,t,n)=>t in e?Bne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fne=(e,t)=>{for(var n in t||(t={}))uA.call(t,n)&&w$(e,n,t[n]);if(Og)for(var n of Og(t))dA.call(t,n)&&w$(e,n,t[n]);return e},Vne=(e,t)=>{var n={};for(var r in e)uA.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&&dA.call(e,r)&&(n[r]=e[r]);return n};const Hne={variant:"light",size:"md",radius:"xl"},fA=_.forwardRef((e,t)=>{const n=ae("Badge",Hne,e),{className:r,color:o,variant:i,fullWidth:s,children:a,size:c,leftSection:u,rightSection:f,radius:p,gradient:g,classNames:v,styles:y,unstyled:w}=n,P=Vne(n,["className","color","variant","fullWidth","children","size","leftSection","rightSection","radius","gradient","classNames","styles","unstyled"]),{classes:x,cx:S}=Ane({fullWidth:s,color:o,radius:p,gradient:g},{classNames:v,styles:y,name:"Badge",unstyled:w,variant:i,size:c});return k.createElement(Pe,Fne({className:S(x.root,r),ref:t},P),u&&k.createElement("span",{className:x.leftSection},u),k.createElement("span",{className:x.inner},a),f&&k.createElement("span",{className:x.rightSection},f))});fA.displayName="@mantine/core/Badge";const mt=fA;var Wne=ue((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(${M(n)} / 2)`},"&:last-of-type:not(:first-of-type)":{borderTopLeftRadius:0,[t==="vertical"?"borderTopRightRadius":"borderBottomLeftRadius"]:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${M(n)} / 2)`},"&:not(:first-of-type):not(:last-of-type)":{borderRadius:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${M(n)} / 2)`,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:`calc(${M(n)} / 2)`},"& + [data-button]":{[t==="vertical"?"marginTop":"marginLeft"]:`calc(${n} * -1)`,"@media (min-resolution: 192dpi)":{[t==="vertical"?"marginTop":"marginLeft"]:0}}}}}));const Une=Wne;var Zne=Object.defineProperty,Cg=Object.getOwnPropertySymbols,pA=Object.prototype.hasOwnProperty,hA=Object.prototype.propertyIsEnumerable,b$=(e,t,n)=>t in e?Zne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gne=(e,t)=>{for(var n in t||(t={}))pA.call(t,n)&&b$(e,n,t[n]);if(Cg)for(var n of Cg(t))hA.call(t,n)&&b$(e,n,t[n]);return e},Yne=(e,t)=>{var n={};for(var r in e)pA.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&&hA.call(e,r)&&(n[r]=e[r]);return n};const Kne={orientation:"horizontal",buttonBorderWidth:1},mA=_.forwardRef((e,t)=>{const n=ae("ButtonGroup",Kne,e),{className:r,orientation:o,buttonBorderWidth:i,unstyled:s}=n,a=Yne(n,["className","orientation","buttonBorderWidth","unstyled"]),{classes:c,cx:u}=Une({orientation:o,buttonBorderWidth:i},{name:"ButtonGroup",unstyled:s});return k.createElement(Pe,Gne({className:u(c.root,r),ref:t},a))});mA.displayName="@mantine/core/ButtonGroup";var qne=Object.defineProperty,Jne=Object.defineProperties,Xne=Object.getOwnPropertyDescriptors,x$=Object.getOwnPropertySymbols,Qne=Object.prototype.hasOwnProperty,ere=Object.prototype.propertyIsEnumerable,S$=(e,t,n)=>t in e?qne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ns=(e,t)=>{for(var n in t||(t={}))Qne.call(t,n)&&S$(e,n,t[n]);if(x$)for(var n of x$(t))ere.call(t,n)&&S$(e,n,t[n]);return e},Zh=(e,t)=>Jne(e,Xne(t));const tre=["filled","outline","light","white","default","subtle","gradient"],Jb={xs:{height:Dn.xs,paddingLeft:M(14),paddingRight:M(14)},sm:{height:Dn.sm,paddingLeft:M(18),paddingRight:M(18)},md:{height:Dn.md,paddingLeft:M(22),paddingRight:M(22)},lg:{height:Dn.lg,paddingLeft:M(26),paddingRight:M(26)},xl:{height:Dn.xl,paddingLeft:M(32),paddingRight:M(32)},"compact-xs":{height:M(22),paddingLeft:M(7),paddingRight:M(7)},"compact-sm":{height:M(26),paddingLeft:M(8),paddingRight:M(8)},"compact-md":{height:M(30),paddingLeft:M(10),paddingRight:M(10)},"compact-lg":{height:M(34),paddingLeft:M(12),paddingRight:M(12)},"compact-xl":{height:M(40),paddingLeft:M(14),paddingRight:M(14)}};function nre({compact:e,size:t,withLeftIcon:n,withRightIcon:r}){if(e)return Jb[`compact-${t}`];const o=Jb[t];return o?Zh(ns({},o),{paddingLeft:n?`calc(${o.paddingLeft} / 1.5)`:o.paddingLeft,paddingRight:r?`calc(${o.paddingRight} / 1.5)`:o.paddingRight}):{}}const rre=e=>({display:e?"block":"inline-block",width:e?"100%":"auto"});function ore({variant:e,theme:t,color:n,gradient:r}){if(!tre.includes(e))return null;const o=t.fn.variant({color:n,variant:e,gradient:r});return e==="gradient"?ns({border:0,backgroundImage:o.background,color:o.color},t.fn.hover({backgroundSize:"200%"})):ns({border:`${M(1)} solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover}))}var ire=ue((e,{radius:t,fullWidth:n,compact:r,withLeftIcon:o,withRightIcon:i,color:s,gradient:a},{variant:c,size:u})=>({root:Zh(ns(Zh(ns(ns(ns(ns({},nre({compact:r,size:u,withLeftIcon:o,withRightIcon:i})),e.fn.fontStyles()),e.fn.focusStyles()),rre(n)),{borderRadius:e.fn.radius(t),fontWeight:600,position:"relative",lineHeight:1,fontSize:re({size:u,sizes:e.fontSizes}),userSelect:"none",cursor:"pointer"}),ore({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":Zh(ns({content:'""'},e.fn.cover(M(-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 sre=ire;var are=Object.defineProperty,kg=Object.getOwnPropertySymbols,gA=Object.prototype.hasOwnProperty,vA=Object.prototype.propertyIsEnumerable,P$=(e,t,n)=>t in e?are(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,O$=(e,t)=>{for(var n in t||(t={}))gA.call(t,n)&&P$(e,n,t[n]);if(kg)for(var n of kg(t))vA.call(t,n)&&P$(e,n,t[n]);return e},lre=(e,t)=>{var n={};for(var r in e)gA.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&&vA.call(e,r)&&(n[r]=e[r]);return n};const cre={size:"sm",type:"button",variant:"filled",loaderPosition:"left"},EP=_.forwardRef((e,t)=>{const n=ae("Button",cre,e),{className:r,size:o,color:i,type:s,disabled:a,children:c,leftIcon:u,rightIcon:f,fullWidth:p,variant:g,radius:v,uppercase:y,compact:w,loading:P,loaderPosition:x,loaderProps:S,gradient:O,classNames:E,styles:$,unstyled:N}=n,I=lre(n,["className","size","color","type","disabled","children","leftIcon","rightIcon","fullWidth","variant","radius","uppercase","compact","loading","loaderPosition","loaderProps","gradient","classNames","styles","unstyled"]),{classes:R,cx:B,theme:z}=sre({radius:v,color:i,fullWidth:p,compact:w,gradient:O,withLeftIcon:!!u,withRightIcon:!!f},{name:"Button",unstyled:N,classNames:E,styles:$,variant:g,size:o}),G=z.fn.variant({color:i,variant:g}),X=k.createElement(en,O$({color:G.color,size:`calc(${re({size:o,sizes:Jb}).height} / 2)`},S));return k.createElement(ls,O$({className:B(R.root,r),type:s,disabled:a,"data-button":!0,"data-disabled":a||void 0,"data-loading":P||void 0,ref:t,unstyled:N},I),k.createElement("div",{className:R.inner},(u||P&&x==="left")&&k.createElement("span",{className:B(R.icon,R.leftIcon)},P&&x==="left"?X:u),P&&x==="center"&&k.createElement("span",{className:R.centerLoader},X),k.createElement("span",{className:R.label,style:{textTransform:y?"uppercase":void 0}},c),(f||P&&x==="right")&&k.createElement("span",{className:B(R.icon,R.rightIcon)},P&&x==="right"?X:f)))});EP.displayName="@mantine/core/Button";EP.Group=mA;const st=EP;var ure=ue((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:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`}}}));const dre=ure;var fre=Object.defineProperty,Eg=Object.getOwnPropertySymbols,yA=Object.prototype.hasOwnProperty,_A=Object.prototype.propertyIsEnumerable,C$=(e,t,n)=>t in e?fre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pre=(e,t)=>{for(var n in t||(t={}))yA.call(t,n)&&C$(e,n,t[n]);if(Eg)for(var n of Eg(t))_A.call(t,n)&&C$(e,n,t[n]);return e},hre=(e,t)=>{var n={};for(var r in e)yA.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&&_A.call(e,r)&&(n[r]=e[r]);return n};const mre={},wA=_.forwardRef((e,t)=>{const n=ae("Paper",mre,e),{className:r,children:o,radius:i,withBorder:s,shadow:a,unstyled:c,variant:u}=n,f=hre(n,["className","children","radius","withBorder","shadow","unstyled","variant"]),{classes:p,cx:g}=dre({radius:i,shadow:a},{name:"Paper",unstyled:c,variant:u});return k.createElement(Pe,pre({className:g(p.root,r),"data-with-border":s||void 0,ref:t},f),o)});wA.displayName="@mantine/core/Paper";const gre=wA;var vre=ue((e,{inline:t})=>({root:{display:t?"inline-flex":"flex",alignItems:"center",justifyContent:"center"}}));const yre=vre;var _re=Object.defineProperty,$g=Object.getOwnPropertySymbols,bA=Object.prototype.hasOwnProperty,xA=Object.prototype.propertyIsEnumerable,k$=(e,t,n)=>t in e?_re(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wre=(e,t)=>{for(var n in t||(t={}))bA.call(t,n)&&k$(e,n,t[n]);if($g)for(var n of $g(t))xA.call(t,n)&&k$(e,n,t[n]);return e},bre=(e,t)=>{var n={};for(var r in e)bA.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&&xA.call(e,r)&&(n[r]=e[r]);return n};const SA=_.forwardRef((e,t)=>{const n=ae("Center",{},e),{inline:r,className:o,unstyled:i,variant:s}=n,a=bre(n,["inline","className","unstyled","variant"]),{classes:c,cx:u}=yre({inline:r},{name:"Center",unstyled:i,variant:s});return k.createElement(Pe,wre({ref:t,className:u(c.root,o)},a))});SA.displayName="@mantine/core/Center";const Pr=SA,PA=_.createContext(null),xre=PA.Provider,Sre=()=>_.useContext(PA);var Pre=Object.defineProperty,Mg=Object.getOwnPropertySymbols,OA=Object.prototype.hasOwnProperty,CA=Object.prototype.propertyIsEnumerable,E$=(e,t,n)=>t in e?Pre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$$=(e,t)=>{for(var n in t||(t={}))OA.call(t,n)&&E$(e,n,t[n]);if(Mg)for(var n of Mg(t))CA.call(t,n)&&E$(e,n,t[n]);return e},Ore=(e,t)=>{var n={};for(var r in e)OA.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&&CA.call(e,r)&&(n[r]=e[r]);return n};const Cre={size:"sm"},kA=_.forwardRef((e,t)=>{const n=ae("CheckboxGroup",Cre,e),{children:r,value:o,defaultValue:i,onChange:s,size:a,wrapperProps:c}=n,u=Ore(n,["children","value","defaultValue","onChange","size","wrapperProps"]),[f,p]=go({value:o,defaultValue:i,finalValue:[],onChange:s}),g=v=>{const y=v.currentTarget.value;p(f.includes(y)?f.filter(w=>w!==y):[...f,y])};return k.createElement(xre,{value:{value:f,onChange:g,size:a}},k.createElement(et.Wrapper,$$($$({labelElement:"div",size:a,__staticSelector:"CheckboxGroup",ref:t},c),u),r))});kA.displayName="@mantine/core/CheckboxGroup";var kre=Object.defineProperty,Ng=Object.getOwnPropertySymbols,EA=Object.prototype.hasOwnProperty,$A=Object.prototype.propertyIsEnumerable,M$=(e,t,n)=>t in e?kre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Tg=(e,t)=>{for(var n in t||(t={}))EA.call(t,n)&&M$(e,n,t[n]);if(Ng)for(var n of Ng(t))$A.call(t,n)&&M$(e,n,t[n]);return e},MA=(e,t)=>{var n={};for(var r in e)EA.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&&$A.call(e,r)&&(n[r]=e[r]);return n};function Ere(e){const t=e,{width:n,height:r,style:o}=t,i=MA(t,["width","height","style"]);return k.createElement("svg",Tg({viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:Tg({width:n,height:r},o)},i),k.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 $re(e){var t=e,{indeterminate:n}=t,r=MA(t,["indeterminate"]);return n?k.createElement("svg",Tg({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6"},r),k.createElement("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})):k.createElement(Ere,Tg({},r))}var Mre=Object.defineProperty,Nre=Object.defineProperties,Tre=Object.getOwnPropertyDescriptors,N$=Object.getOwnPropertySymbols,Ire=Object.prototype.hasOwnProperty,jre=Object.prototype.propertyIsEnumerable,T$=(e,t,n)=>t in e?Mre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,I$=(e,t)=>{for(var n in t||(t={}))Ire.call(t,n)&&T$(e,n,t[n]);if(N$)for(var n of N$(t))jre.call(t,n)&&T$(e,n,t[n]);return e},j$=(e,t)=>Nre(e,Tre(t));const Lre={xs:M(16),sm:M(20),md:M(24),lg:M(30),xl:M(36)};var Dre=ue((e,{radius:t,color:n,transitionDuration:r,labelPosition:o,error:i,indeterminate:s},{size:a})=>{const c=re({size:a,sizes:Lre}),u=e.fn.variant({variant:"filled",color:n});return{icon:j$(I$({},e.fn.cover()),{ref:Ar("icon"),color:s?"inherit":e.white,transform:s?"none":`translateY(${M(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:j$(I$({},e.fn.focusStyles()),{appearance:"none",backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`${M(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,[`& + .${Ar("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",pointerEvents:"none",[`& + .${Ar("icon")}`]:{color:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[5]}}})}});const Rre=Dre;var zre=Object.defineProperty,Are=Object.defineProperties,Bre=Object.getOwnPropertyDescriptors,L$=Object.getOwnPropertySymbols,Fre=Object.prototype.hasOwnProperty,Vre=Object.prototype.propertyIsEnumerable,D$=(e,t,n)=>t in e?zre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hre=(e,t)=>{for(var n in t||(t={}))Fre.call(t,n)&&D$(e,n,t[n]);if(L$)for(var n of L$(t))Vre.call(t,n)&&D$(e,n,t[n]);return e},Wre=(e,t)=>Are(e,Bre(t));const D_={xs:M(16),sm:M(20),md:M(24),lg:M(30),xl:M(36)};var Ure=ue((e,{labelPosition:t},{size:n})=>({root:{},body:{display:"flex","&:has(input:disabled) label":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}},labelWrapper:Wre(Hre({},e.fn.fontStyles()),{display:"inline-flex",flexDirection:"column",WebkitTapHighlightColor:"transparent",fontSize:n in D_?re({size:n,sizes:e.fontSizes}):void 0,lineHeight:n in D_?re({size:n,sizes:D_}):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,"&:disabled, &[data-disabled]":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}}));const Zre=Ure;var Gre=Object.defineProperty,Ig=Object.getOwnPropertySymbols,NA=Object.prototype.hasOwnProperty,TA=Object.prototype.propertyIsEnumerable,R$=(e,t,n)=>t in e?Gre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yre=(e,t)=>{for(var n in t||(t={}))NA.call(t,n)&&R$(e,n,t[n]);if(Ig)for(var n of Ig(t))TA.call(t,n)&&R$(e,n,t[n]);return e},Kre=(e,t)=>{var n={};for(var r in e)NA.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&&TA.call(e,r)&&(n[r]=e[r]);return n};const $P=_.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:g,error:v,size:y,labelPosition:w,variant:P}=n,x=Kre(n,["__staticSelector","className","classNames","styles","unstyled","children","label","description","id","disabled","error","size","labelPosition","variant"]);const{classes:S,cx:O}=Zre({labelPosition:w},{name:r,styles:s,classNames:i,unstyled:a,variant:P,size:y});return k.createElement(Pe,Yre({className:O(S.root,o),ref:t},x),k.createElement("div",{className:O(S.body)},c,k.createElement("div",{className:S.labelWrapper},u!=null&&k.createElement("label",{className:S.label,"data-disabled":g||void 0,htmlFor:p},u),f&&k.createElement(et.Description,{className:S.description},f),v&&v!=="boolean"&&k.createElement(et.Error,{className:S.error},v))))});$P.displayName="@mantine/core/InlineInput";var qre=Object.defineProperty,jg=Object.getOwnPropertySymbols,IA=Object.prototype.hasOwnProperty,jA=Object.prototype.propertyIsEnumerable,z$=(e,t,n)=>t in e?qre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eh=(e,t)=>{for(var n in t||(t={}))IA.call(t,n)&&z$(e,n,t[n]);if(jg)for(var n of jg(t))jA.call(t,n)&&z$(e,n,t[n]);return e},Jre=(e,t)=>{var n={};for(var r in e)IA.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&&jA.call(e,r)&&(n[r]=e[r]);return n};const Xre={size:"sm",transitionDuration:100,icon:$re,labelPosition:"right"},mr=_.forwardRef((e,t)=>{const n=ae("Checkbox",Xre,e),{className:r,style:o,sx:i,checked:s,disabled:a,color:c,label:u,indeterminate:f,id:p,size:g,radius:v,wrapperProps:y,children:w,classNames:P,styles:x,transitionDuration:S,icon:O,unstyled:E,labelPosition:$,description:N,error:I,variant:R}=n,B=Jre(n,["className","style","sx","checked","disabled","color","label","indeterminate","id","size","radius","wrapperProps","children","classNames","styles","transitionDuration","icon","unstyled","labelPosition","description","error","variant"]),z=Sre(),G=$a(p),{systemStyles:X,rest:Q}=Dl(B),{classes:V}=Rre({radius:v,color:c,transitionDuration:S,labelPosition:$,error:!!I,indeterminate:f},{name:"Checkbox",classNames:P,styles:x,unstyled:E,variant:R,size:z?.size||g}),H=z?{checked:z.value.includes(Q.value),onChange:z.onChange}:{};return k.createElement($P,eh(eh({className:r,sx:i,style:o,id:G,size:z?.size||g,labelPosition:$,label:u,description:N,error:I,disabled:a,__staticSelector:"Checkbox",classNames:P,styles:x,unstyled:E,"data-checked":H.checked||void 0,variant:R},X),y),k.createElement("div",{className:V.inner},k.createElement("input",eh(eh({id:G,ref:t,type:"checkbox",className:V.input,checked:s,disabled:a},Q),H)),k.createElement(O,{indeterminate:f,className:V.icon})))});mr.displayName="@mantine/core/Checkbox";mr.Group=kA;var Qre=Object.defineProperty,eoe=Object.defineProperties,toe=Object.getOwnPropertyDescriptors,A$=Object.getOwnPropertySymbols,noe=Object.prototype.hasOwnProperty,roe=Object.prototype.propertyIsEnumerable,B$=(e,t,n)=>t in e?Qre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,F$=(e,t)=>{for(var n in t||(t={}))noe.call(t,n)&&B$(e,n,t[n]);if(A$)for(var n of A$(t))roe.call(t,n)&&B$(e,n,t[n]);return e},V$=(e,t)=>eoe(e,toe(t)),ooe=ue((e,{radius:t},{size:n})=>{const r=e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3];return{root:V$(F$({},e.fn.focusStyles()),{width:M(n),height:M(n),WebkitTapHighlightColor:"transparent",border:0,borderRadius:e.fn.radius(t),appearance:"none",WebkitAppearance:"none",padding:0,position:"relative",overflow:"hidden"}),overlay:V$(F$({},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 ${M(1)} inset, rgb(0, 0, 0, .15) 0 0 ${M(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:`${M(8)} ${M(8)}`,backgroundPosition:`0 0, 0 ${M(4)}, ${M(4)} -${M(4)}, -${M(4)} 0`}}});const ioe=ooe;var soe=Object.defineProperty,Lg=Object.getOwnPropertySymbols,LA=Object.prototype.hasOwnProperty,DA=Object.prototype.propertyIsEnumerable,H$=(e,t,n)=>t in e?soe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,aoe=(e,t)=>{for(var n in t||(t={}))LA.call(t,n)&&H$(e,n,t[n]);if(Lg)for(var n of Lg(t))DA.call(t,n)&&H$(e,n,t[n]);return e},loe=(e,t)=>{var n={};for(var r in e)LA.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&&DA.call(e,r)&&(n[r]=e[r]);return n};const coe={size:M(25),radius:M(25),withShadow:!0},RA=_.forwardRef((e,t)=>{const n=ae("ColorSwatch",coe,e),{color:r,size:o,radius:i,className:s,children:a,classNames:c,styles:u,unstyled:f,withShadow:p,variant:g}=n,v=loe(n,["color","size","radius","className","children","classNames","styles","unstyled","withShadow","variant"]),{classes:y,cx:w}=ioe({radius:i},{classNames:c,styles:u,unstyled:f,name:"ColorSwatch",size:o,variant:g});return k.createElement(Pe,aoe({className:w(y.root,s),ref:t},v),k.createElement("div",{className:w(y.alphaOverlay,y.overlay)}),p&&k.createElement("div",{className:w(y.shadowOverlay,y.overlay)}),k.createElement("div",{className:y.overlay,style:{backgroundColor:r}}),k.createElement("div",{className:w(y.children,y.overlay)},a))});RA.displayName="@mantine/core/ColorSwatch";const hf=RA,Ci={xs:M(8),sm:M(12),md:M(16),lg:M(20),xl:M(22)};var uoe=ue((e,t,{size:n})=>{const r=re({size:n,sizes:Ci});return{thumb:{overflow:"hidden",boxSizing:"border-box",position:"absolute",boxShadow:`0 0 ${M(1)} rgba(0, 0, 0, .6)`,border:`${M(2)} solid ${e.white}`,backgroundColor:"transparent",width:r,height:r,borderRadius:r}}});const doe=uoe;var foe=Object.defineProperty,W$=Object.getOwnPropertySymbols,poe=Object.prototype.hasOwnProperty,hoe=Object.prototype.propertyIsEnumerable,U$=(e,t,n)=>t in e?foe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,moe=(e,t)=>{for(var n in t||(t={}))poe.call(t,n)&&U$(e,n,t[n]);if(W$)for(var n of W$(t))hoe.call(t,n)&&U$(e,n,t[n]);return e};function MP({position:e,className:t,styles:n,classNames:r,style:o,size:i,__staticSelector:s,unstyled:a,variant:c}){const{classes:u,cx:f}=doe(null,{classNames:r,styles:n,name:s,unstyled:a,size:i,variant:c});return k.createElement("div",{className:f(u.thumb,t),style:moe({left:`calc(${e.x*100}% - ${Ci[i]} / 2)`,top:`calc(${e.y*100}% - ${Ci[i]} / 2)`},o)})}MP.displayName="@mantine/core/Thumb";var goe=Object.defineProperty,Z$=Object.getOwnPropertySymbols,voe=Object.prototype.hasOwnProperty,yoe=Object.prototype.propertyIsEnumerable,G$=(e,t,n)=>t in e?goe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Y$=(e,t)=>{for(var n in t||(t={}))voe.call(t,n)&&G$(e,n,t[n]);if(Z$)for(var n of Z$(t))yoe.call(t,n)&&G$(e,n,t[n]);return e},_oe=ue((e,t,{size:n})=>({sliderThumb:{ref:Ar("sliderThumb")},slider:{position:"relative",height:`calc(${re({size:n,sizes:Ci})} + ${M(2)})`,boxSizing:"border-box",marginLeft:`calc(${re({size:n,sizes:Ci})} / 2)`,marginRight:`calc(${re({size:n,sizes:Ci})} / 2)`,outline:0,[`&:focus .${Ar("sliderThumb")}`]:Y$({},e.focusRing==="always"||e.focusRing==="auto"?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),[`&:focus:not(:focus-visible) .${Ar("sliderThumb")}`]:Y$({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)},sliderOverlay:{position:"absolute",boxSizing:"border-box",top:0,bottom:0,left:`calc(${re({size:n,sizes:Ci})} * -1 / 2 - ${M(1)})`,right:`calc(${re({size:n,sizes:Ci})} * -1 / 2 - ${M(1)})`,borderRadius:1e3}}));const woe=_oe;var boe=Object.defineProperty,xoe=Object.defineProperties,Soe=Object.getOwnPropertyDescriptors,Dg=Object.getOwnPropertySymbols,zA=Object.prototype.hasOwnProperty,AA=Object.prototype.propertyIsEnumerable,K$=(e,t,n)=>t in e?boe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Poe=(e,t)=>{for(var n in t||(t={}))zA.call(t,n)&&K$(e,n,t[n]);if(Dg)for(var n of Dg(t))AA.call(t,n)&&K$(e,n,t[n]);return e},Ooe=(e,t)=>xoe(e,Soe(t)),Coe=(e,t)=>{var n={};for(var r in e)zA.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&&AA.call(e,r)&&(n[r]=e[r]);return n};const NP=_.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:g,classNames:v,styles:y,className:w,unstyled:P,variant:x}=n,S=Coe(n,["value","onChange","onChangeEnd","maxValue","round","size","thumbColor","__staticSelector","focusable","overlays","classNames","styles","className","unstyled","variant"]);const{classes:O,cx:E}=woe(null,{classNames:v,styles:y,name:f,unstyled:P,variant:x,size:c}),[$,N]=_.useState({y:0,x:r/s}),I=_.useRef($),R=Q=>a?Math.round(Q*s):Q*s,{ref:B}=Z3(({x:Q,y:V})=>{I.current={x:Q,y:V},o(R(Q))},{onScrubEnd:()=>{const{x:Q}=I.current;i(R(Q))}});Fn(()=>{N({y:0,x:r/s})},[r]);const z=(Q,V)=>{Q.preventDefault();const H=U3(V);o(R(H.x)),i(R(H.x))},G=Q=>{switch(Q.key){case"ArrowRight":{z(Q,{x:$.x+.05,y:$.y});break}case"ArrowLeft":{z(Q,{x:$.x-.05,y:$.y});break}}},X=g.map((Q,V)=>k.createElement("div",{className:O.sliderOverlay,style:Q,key:V}));return k.createElement(Pe,Ooe(Poe({},S),{ref:ws(B,t),className:E(O.slider,w),role:"slider","aria-valuenow":r,"aria-valuemax":s,"aria-valuemin":0,tabIndex:p?0:-1,onKeyDown:G}),X,k.createElement(MP,{__staticSelector:f,classNames:v,styles:y,position:$,style:{top:M(1),backgroundColor:u},className:O.sliderThumb,size:c}))});NP.displayName="@mantine/core/ColorSlider";var koe=Object.defineProperty,Eoe=Object.defineProperties,$oe=Object.getOwnPropertyDescriptors,Rg=Object.getOwnPropertySymbols,BA=Object.prototype.hasOwnProperty,FA=Object.prototype.propertyIsEnumerable,q$=(e,t,n)=>t in e?koe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Moe=(e,t)=>{for(var n in t||(t={}))BA.call(t,n)&&q$(e,n,t[n]);if(Rg)for(var n of Rg(t))FA.call(t,n)&&q$(e,n,t[n]);return e},Noe=(e,t)=>Eoe(e,$oe(t)),Toe=(e,t)=>{var n={};for(var r in e)BA.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&&FA.call(e,r)&&(n[r]=e[r]);return n};const Ioe={},VA=_.forwardRef((e,t)=>{const n=ae("HueSlider",Ioe,e),{value:r,onChange:o,onChangeEnd:i,__staticSelector:s}=n,a=Toe(n,["value","onChange","onChangeEnd","__staticSelector"]);return k.createElement(NP,Noe(Moe({},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 ${M(1)} inset, rgb(0, 0, 0, .15) 0 0 ${M(4)} inset`}]}))});VA.displayName="@mantine/core/HueSlider";var joe=Object.defineProperty,Loe=Object.defineProperties,Doe=Object.getOwnPropertyDescriptors,J$=Object.getOwnPropertySymbols,Roe=Object.prototype.hasOwnProperty,zoe=Object.prototype.propertyIsEnumerable,X$=(e,t,n)=>t in e?joe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Q$=(e,t)=>{for(var n in t||(t={}))Roe.call(t,n)&&X$(e,n,t[n]);if(J$)for(var n of J$(t))zoe.call(t,n)&&X$(e,n,t[n]);return e},eM=(e,t)=>Loe(e,Doe(t));function Io(e,t=0,n=10**t){return Math.round(n*e)/n}function Aoe({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 Boe={grad:360/400,turn:360,rad:360/(Math.PI*2)};function Foe(e,t="deg"){return Number(e)*(Boe[t]||1)}const Voe=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function tM(e){const t=Voe.exec(e);return t?Aoe({h:Foe(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 Xb({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:Io(60*(s<0?s+6:s),3),s:Io(o?i/o*100:0,3),v:Io(o/255*100,3),a:r}}function Qb(e){const t=e[0]==="#"?e.slice(1):e;return t.length===3?Xb({r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:1}):Xb({r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:1})}function Hoe(e){const t=e[0]==="#"?e.slice(1):e,n=s=>Io(parseInt(s,16)/255,3);if(t.length===4){const s=t.slice(0,3),a=n(t[3]+t[3]);return eM(Q$({},Qb(s)),{a})}const r=t.slice(0,6),o=n(t.slice(6,8));return eM(Q$({},Qb(r)),{a:o})}const Woe=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function nM(e){const t=Woe.exec(e);return t?Xb({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 HA={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},Uoe={hex:Qb,hexa:Hoe,rgb:nM,rgba:nM,hsl:tM,hsla:tM};function Zoe(e){for(const[,t]of Object.entries(HA))if(t.test(e))return!0;return!1}function th(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(HA))if(r.test(t))return Uoe[n](t);return{h:0,s:0,v:0,a:1}}var Goe=Object.defineProperty,Yoe=Object.defineProperties,Koe=Object.getOwnPropertyDescriptors,zg=Object.getOwnPropertySymbols,WA=Object.prototype.hasOwnProperty,UA=Object.prototype.propertyIsEnumerable,rM=(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={}))WA.call(t,n)&&rM(e,n,t[n]);if(zg)for(var n of zg(t))UA.call(t,n)&&rM(e,n,t[n]);return e},Joe=(e,t)=>Yoe(e,Koe(t)),Xoe=(e,t)=>{var n={};for(var r in e)WA.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&&UA.call(e,r)&&(n[r]=e[r]);return n};const Qoe={},ZA=_.forwardRef((e,t)=>{const n=ae("AlphaSlider",Qoe,e),{value:r,onChange:o,onChangeEnd:i,color:s,__staticSelector:a}=n,c=Xoe(n,["value","onChange","onChangeEnd","color","__staticSelector"]),u=ir(),f=u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[3];return k.createElement(NP,Joe(qoe({},c),{ref:t,value:r,onChange:p=>o(Io(p,2)),onChangeEnd:p=>i(Io(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:`${M(8)} ${M(8)}`,backgroundPosition:`0 0, 0 ${M(4)}, ${M(4)} -${M(4)}, -${M(4)} 0`},{backgroundImage:`linear-gradient(90deg, transparent, ${s})`},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${M(1)} inset, rgb(0, 0, 0, .15) 0 0 ${M(4)} inset`}]}))});ZA.displayName="@mantine/core/AlphaSlider";var eie=Object.defineProperty,oM=Object.getOwnPropertySymbols,tie=Object.prototype.hasOwnProperty,nie=Object.prototype.propertyIsEnumerable,iM=(e,t,n)=>t in e?eie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,R_=(e,t)=>{for(var n in t||(t={}))tie.call(t,n)&&iM(e,n,t[n]);if(oM)for(var n of oM(t))nie.call(t,n)&&iM(e,n,t[n]);return e};const rie={xs:M(100),sm:M(110),md:M(120),lg:M(140),xl:M(160)};var oie=ue((e,t,{size:n})=>({saturationThumb:{ref:Ar("saturationThumb")},saturation:{boxSizing:"border-box",position:"relative",height:re({size:n,sizes:rie}),borderRadius:e.radius.sm,margin:`calc(${re({size:n,sizes:Ci})} / 2)`,WebkitTapHighlightColor:"transparent",[`&:focus .${Ar("saturationThumb")}`]:R_({},e.focusRing==="always"||e.focusRing==="auto"?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),[`&:focus:not(:focus-visible) .${Ar("saturationThumb")}`]:R_({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)},saturationOverlay:R_({boxSizing:"border-box",borderRadius:e.radius.sm},e.fn.cover(`calc(${re({size:n,sizes:Ci})} * -1 / 2 - ${M(1)})`))}));const iie=oie;function GA({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:Io([s,u,c,c,f,s][p]*255),g:Io([f,s,s,u,c,c][p]*255),b:Io([c,c,f,s,s,u][p]*255),a:Io(r,2)}}function sM(e,t){const{r:n,g:r,b:o,a:i}=GA(e);return t?`rgba(${n}, ${r}, ${o}, ${Io(i,2)})`:`rgb(${n}, ${r}, ${o})`}function aM({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}%, ${Io(r,2)})`:`hsl(${s.h}, ${s.s}%, ${s.l}%)`}function Gh(e){const t=e.toString(16);return t.length<2?`0${t}`:t}function YA(e){const{r:t,g:n,b:r}=GA(e);return`#${Gh(t)}${Gh(n)}${Gh(r)}`}function sie(e){const t=Math.round(e.a*255);return`${YA(e)}${Gh(t)}`}const z_={hex:YA,hexa:e=>sie(e),rgb:e=>sM(e,!1),rgba:e=>sM(e,!0),hsl:e=>aM(e,!1),hsla:e=>aM(e,!0)};function zs(e,t){return t?e in z_?z_[e](t):z_.hex(t):"#000000"}function KA({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:g}=iie(null,{classNames:c,styles:u,name:o,unstyled:f,variant:p,size:i}),[v,y]=_.useState({x:e.s/100,y:1-e.v/100}),w=_.useRef(v),{ref:P}=Z3(({x:O,y:E})=>{w.current={x:O,y:E},t({s:Math.round(O*100),v:Math.round((1-E)*100)})},{onScrubEnd:()=>{const{x:O,y:E}=w.current;n({s:Math.round(O*100),v:Math.round((1-E)*100)})}});_.useEffect(()=>{y({x:e.s/100,y:1-e.v/100})},[e.s,e.v]);const x=(O,E)=>{O.preventDefault();const $=U3(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=O=>{switch(O.key){case"ArrowUp":{x(O,{y:v.y-.05,x:v.x});break}case"ArrowDown":{x(O,{y:v.y+.05,x:v.x});break}case"ArrowRight":{x(O,{x:v.x+.05,y:v.y});break}case"ArrowLeft":{x(O,{x:v.x-.05,y:v.y});break}}};return k.createElement("div",{className:g.saturation,ref:P,role:"slider","aria-label":a,"aria-valuenow":v.x,"aria-valuetext":zs("rgba",e),tabIndex:r?0:-1,onKeyDown:S},k.createElement("div",{className:g.saturationOverlay,style:{backgroundColor:`hsl(${e.h}, 100%, 50%)`}}),k.createElement("div",{className:g.saturationOverlay,style:{backgroundImage:"linear-gradient(90deg, #fff, transparent)"}}),k.createElement("div",{className:g.saturationOverlay,style:{backgroundImage:"linear-gradient(0deg, #000, transparent)"}}),k.createElement(MP,{__staticSelector:o,classNames:c,styles:u,position:v,className:g.saturationThumb,style:{backgroundColor:s},size:i}))}KA.displayName="@mantine/core/Saturation";var aie=ue((e,{swatchesPerRow:t})=>({swatch:{width:`calc(${100/t}% - ${M(4)})`,height:0,paddingBottom:`calc(${100/t}% - ${M(4)})`,margin:M(2),boxSizing:"content-box"},swatches:{boxSizing:"border-box",marginLeft:M(-2),marginRight:M(-2),display:"flex",flexWrap:"wrap"}}));const lie=aie;var cie=Object.defineProperty,Ag=Object.getOwnPropertySymbols,qA=Object.prototype.hasOwnProperty,JA=Object.prototype.propertyIsEnumerable,lM=(e,t,n)=>t in e?cie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,uie=(e,t)=>{for(var n in t||(t={}))qA.call(t,n)&&lM(e,n,t[n]);if(Ag)for(var n of Ag(t))JA.call(t,n)&&lM(e,n,t[n]);return e},die=(e,t)=>{var n={};for(var r in e)qA.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&&JA.call(e,r)&&(n[r]=e[r]);return n};function XA(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:g}=t,v=die(t,["data","swatchesPerRow","focusable","classNames","styles","__staticSelector","unstyled","setValue","onChangeEnd","variant","size"]);const{classes:y}=lie({swatchesPerRow:r},{classNames:i,styles:s,name:a,unstyled:c,variant:p,size:g}),w=n.map((P,x)=>k.createElement(hf,{className:y.swatch,component:"button",type:"button",color:P,key:x,radius:"sm",onClick:()=>{u(P),f?.(P)},style:{cursor:"pointer"},"aria-label":P,tabIndex:o?0:-1}));return k.createElement("div",uie({className:y.swatches},v),w)}XA.displayName="@mantine/core/Swatches";const fie={xs:M(180),sm:M(200),md:M(240),lg:M(280),xl:M(320)};var pie=ue((e,{fullWidth:t},{size:n})=>({preview:{},wrapper:{boxSizing:"border-box",width:t?"100%":re({size:n,sizes:fie}),padding:M(1)},body:{display:"flex",boxSizing:"border-box",paddingTop:`calc(${re({size:n,sizes:e.spacing})} / 2)`},sliders:{flex:1,boxSizing:"border-box","&:not(:only-child)":{marginRight:e.spacing.xs}},slider:{boxSizing:"border-box","& + &":{marginTop:M(5)}},swatch:{cursor:"pointer"}}));const hie=pie;var mie=Object.defineProperty,gie=Object.defineProperties,vie=Object.getOwnPropertyDescriptors,Bg=Object.getOwnPropertySymbols,QA=Object.prototype.hasOwnProperty,e4=Object.prototype.propertyIsEnumerable,cM=(e,t,n)=>t in e?mie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ac=(e,t)=>{for(var n in t||(t={}))QA.call(t,n)&&cM(e,n,t[n]);if(Bg)for(var n of Bg(t))e4.call(t,n)&&cM(e,n,t[n]);return e},A_=(e,t)=>gie(e,vie(t)),yie=(e,t)=>{var n={};for(var r in e)QA.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&&e4.call(e,r)&&(n[r]=e[r]);return n};const _ie={xs:26,sm:34,md:42,lg:50,xl:54},wie={swatchesPerRow:10,size:"sm",withPicker:!0,focusable:!0,__staticSelector:"ColorPicker"},t4=_.forwardRef((e,t)=>{const n=ae("ColorPicker",wie,e),{value:r,defaultValue:o,onChange:i,onChangeEnd:s,format:a,swatches:c,swatchesPerRow:u,size:f,withPicker:p,fullWidth:g,focusable:v,__staticSelector:y,saturationLabel:w,hueLabel:P,alphaLabel:x,className:S,styles:O,classNames:E,unstyled:$,onColorSwatchClick:N,variant:I}=n,R=yie(n,["value","defaultValue","onChange","onChangeEnd","format","swatches","swatchesPerRow","size","withPicker","fullWidth","focusable","__staticSelector","saturationLabel","hueLabel","alphaLabel","className","styles","classNames","unstyled","onColorSwatchClick","variant"]),{classes:B,cx:z}=hie({fullWidth:g},{classNames:E,styles:O,name:y,unstyled:$,variant:I,size:f}),G=_.useRef(a),X=_.useRef(null),Q=_.useRef(!0),V=a==="hexa"||a==="rgba"||a==="hsla",[H,Z,Y]=go({value:r,defaultValue:o,finalValue:"#FFFFFF",onChange:i}),[j,U]=_.useState(th(H)),F=K=>{Q.current=!1,U(ee=>{const fe=ac(ac({},ee),K);return X.current=zs(G.current,fe),fe}),Z(X.current),setTimeout(()=>{Q.current=!0},0)};return Fn(()=>{Zoe(r)&&Q.current&&(U(th(r)),Q.current=!0)},[r]),Fn(()=>{G.current=a,Z(zs(a,j))},[a]),k.createElement(Pe,ac({className:z(B.wrapper,S),ref:t},R),p&&k.createElement(k.Fragment,null,k.createElement(KA,{value:j,onChange:F,onChangeEnd:({s:K,v:ee})=>s?.(zs(G.current,A_(ac({},j),{s:K,v:ee}))),color:H,styles:O,classNames:E,size:f,focusable:v,saturationLabel:w,__staticSelector:y}),k.createElement("div",{className:B.body},k.createElement("div",{className:B.sliders},k.createElement(VA,{value:j.h,onChange:K=>F({h:K}),onChangeEnd:K=>s?.(zs(G.current,A_(ac({},j),{h:K}))),size:f,styles:O,classNames:E,focusable:v,"aria-label":P,__staticSelector:y}),V&&k.createElement(ZA,{value:j.a,onChange:K=>F({a:K}),onChangeEnd:K=>{s?.(zs(G.current,A_(ac({},j),{a:K})))},size:f,color:zs("hex",j),style:{marginTop:M(6)},styles:O,classNames:E,focusable:v,"aria-label":x,__staticSelector:y})),V&&k.createElement(hf,{color:H,radius:"sm",size:re({size:f,sizes:_ie}),className:B.preview}))),Array.isArray(c)&&k.createElement(XA,{data:c,style:{marginTop:M(5)},swatchesPerRow:u,focusable:v,classNames:E,styles:O,__staticSelector:y,setValue:Z,onChangeEnd:K=>{const ee=zs(a,th(K));N?.(ee),s?.(ee),Y||U(th(K))}}))});t4.displayName="@mantine/core/ColorPicker";const[bie,xie]=bu("Drawer component was not found in tree"),uM={xs:M(320),sm:M(380),md:M(440),lg:M(620),xl:M(780)};var Sie=ue((e,{position:t},{size:n})=>({header:{zIndex:1e3},content:{flex:t==="right"||t==="left"?`0 0 ${re({size:n,sizes:uM})}`:"0 0 100%",maxWidth:"100%",maxHeight:"100%",height:t==="right"||t==="left"?"100%":re({size:n,sizes:uM}),borderRadius:0,overflowY:"auto"},inner:{display:"flex",justifyContent:t==="right"?"flex-end":"flex-start",alignItems:t==="bottom"?"flex-end":"flex-start"}}));const Pie=Sie,[Oie,Cu]=bu("ModalBase component was not found in tree");var Cie=ue(()=>({close:{marginLeft:"auto",marginRight:0}}));const kie=Cie;var Eie=Object.defineProperty,Fg=Object.getOwnPropertySymbols,n4=Object.prototype.hasOwnProperty,r4=Object.prototype.propertyIsEnumerable,dM=(e,t,n)=>t in e?Eie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$ie=(e,t)=>{for(var n in t||(t={}))n4.call(t,n)&&dM(e,n,t[n]);if(Fg)for(var n of Fg(t))r4.call(t,n)&&dM(e,n,t[n]);return e},Mie=(e,t)=>{var n={};for(var r in e)n4.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&&r4.call(e,r)&&(n[r]=e[r]);return n};const Nie={size:"sm"},Tie=_.forwardRef((e,t)=>{const n=Cu(),r=ae(`${n.__staticSelector}CloseButton`,Nie,e),{className:o}=r,i=Mie(r,["className"]),{classes:s,cx:a}=kie(null,n.stylesApi);return k.createElement(C0,$ie({className:a(s.close,o),ref:t,onClick:n.onClose},i))});var Iie=ue(()=>({overlay:{}}));const jie=Iie;var Lie=Object.defineProperty,Die=Object.defineProperties,Rie=Object.getOwnPropertyDescriptors,fM=Object.getOwnPropertySymbols,zie=Object.prototype.hasOwnProperty,Aie=Object.prototype.propertyIsEnumerable,pM=(e,t,n)=>t in e?Lie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bie=(e,t)=>{for(var n in t||(t={}))zie.call(t,n)&&pM(e,n,t[n]);if(fM)for(var n of fM(t))Aie.call(t,n)&&pM(e,n,t[n]);return e},Fie=(e,t)=>Die(e,Rie(t)),Vie=ue((e,{color:t,opacity:n,blur:r,radius:o,gradient:i,fixed:s,zIndex:a})=>({root:Fie(Bie({},e.fn.cover(0)),{position:s?"fixed":"absolute",backgroundColor:i?void 0:e.fn.rgba(t,n),backgroundImage:i,backdropFilter:r?`blur(${M(r)})`:void 0,borderRadius:e.fn.radius(o),zIndex:a,"&[data-center]":{display:"flex",alignItems:"center",justifyContent:"center"}})}));const Hie=Vie;var Wie=Object.defineProperty,Vg=Object.getOwnPropertySymbols,o4=Object.prototype.hasOwnProperty,i4=Object.prototype.propertyIsEnumerable,hM=(e,t,n)=>t in e?Wie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Uie=(e,t)=>{for(var n in t||(t={}))o4.call(t,n)&&hM(e,n,t[n]);if(Vg)for(var n of Vg(t))i4.call(t,n)&&hM(e,n,t[n]);return e},Zie=(e,t)=>{var n={};for(var r in e)o4.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&&i4.call(e,r)&&(n[r]=e[r]);return n};const Gie={opacity:.6,color:"#000",zIndex:ii("modal"),radius:0},s4=_.forwardRef((e,t)=>{const n=ae("Overlay",Gie,e),{variant:r,opacity:o,color:i,blur:s,gradient:a,zIndex:c,radius:u,children:f,className:p,classNames:g,styles:v,unstyled:y,center:w,fixed:P}=n,x=Zie(n,["variant","opacity","color","blur","gradient","zIndex","radius","children","className","classNames","styles","unstyled","center","fixed"]),{classes:S,cx:O}=Hie({color:i,opacity:o,blur:s,radius:u,gradient:a,fixed:P,zIndex:c},{name:"Overlay",classNames:g,styles:v,unstyled:y,variant:r});return k.createElement(Pe,Uie({ref:t,className:O(S.root,p),"data-center":w||void 0},x),f)});s4.displayName="@mantine/core/Overlay";const a4=s4;var Yie=Object.defineProperty,Kie=Object.defineProperties,qie=Object.getOwnPropertyDescriptors,Hg=Object.getOwnPropertySymbols,l4=Object.prototype.hasOwnProperty,c4=Object.prototype.propertyIsEnumerable,mM=(e,t,n)=>t in e?Yie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sd=(e,t)=>{for(var n in t||(t={}))l4.call(t,n)&&mM(e,n,t[n]);if(Hg)for(var n of Hg(t))c4.call(t,n)&&mM(e,n,t[n]);return e},Jie=(e,t)=>Kie(e,qie(t)),Xie=(e,t)=>{var n={};for(var r in e)l4.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&&c4.call(e,r)&&(n[r]=e[r]);return n};const Qie={},ese=_.forwardRef((e,t)=>{const n=Cu(),r=ae(`${n.__staticSelector}Overlay`,Qie,e),{onClick:o,transitionProps:i,style:s,className:a}=r,c=Xie(r,["onClick","transitionProps","style","className"]),{classes:u,cx:f}=jie(null,n.stylesApi),p=g=>{o?.(g),n.closeOnClickOutside&&n.onClose()};return k.createElement(Os,Jie(sd(sd({mounted:n.opened},n.transitionProps),i),{transition:"fade"}),g=>k.createElement(a4,sd({ref:t,onClick:p,fixed:!0,style:sd(sd({},s),g),className:f(u.overlay,a),zIndex:n.zIndex},c)))});var tse=ue((e,{zIndex:t})=>({inner:{position:"fixed",width:"100%",top:0,bottom:0,maxHeight:"100%",zIndex:t,pointerEvents:"none"},content:{pointerEvents:"all"}}));const nse=tse;var rse=Object.defineProperty,Wg=Object.getOwnPropertySymbols,u4=Object.prototype.hasOwnProperty,d4=Object.prototype.propertyIsEnumerable,gM=(e,t,n)=>t in e?rse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ad=(e,t)=>{for(var n in t||(t={}))u4.call(t,n)&&gM(e,n,t[n]);if(Wg)for(var n of Wg(t))d4.call(t,n)&&gM(e,n,t[n]);return e},ose=(e,t)=>{var n={};for(var r in e)u4.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&&d4.call(e,r)&&(n[r]=e[r]);return n};const ise={},sse=_.forwardRef((e,t)=>{const n=Cu(),r=ae(`${n.__staticSelector}Content`,ise,e),{className:o,transitionProps:i,style:s,onKeyDown:a}=r,c=ose(r,["className","transitionProps","style","onKeyDown"]),{classes:u,cx:f}=nse({zIndex:n.zIndex},n.stylesApi),p=g=>{var v;((v=g.target)==null?void 0:v.getAttribute("data-mantine-stop-propagation"))!=="true"&&g.key==="Escape"&&n.closeOnEscape&&n.onClose(),a?.(g)};return k.createElement(Os,ad(ad({mounted:n.opened,transition:"pop"},n.transitionProps),i),g=>k.createElement("div",{className:f(u.inner)},k.createElement(wP,{active:n.opened&&n.trapFocus},k.createElement(gre,ad({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:ad(ad({},s),g),shadow:n.shadow},c),c.children))))});var ase=ue((e,{padding:t})=>{const n=re({size:t,sizes:e.spacing});return{header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:n,paddingRight:`calc(${n} - ${M(5)})`,position:"sticky",top:0,backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,zIndex:1e3}}});const lse=ase;var cse=Object.defineProperty,Ug=Object.getOwnPropertySymbols,f4=Object.prototype.hasOwnProperty,p4=Object.prototype.propertyIsEnumerable,vM=(e,t,n)=>t in e?cse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,use=(e,t)=>{for(var n in t||(t={}))f4.call(t,n)&&vM(e,n,t[n]);if(Ug)for(var n of Ug(t))p4.call(t,n)&&vM(e,n,t[n]);return e},dse=(e,t)=>{var n={};for(var r in e)f4.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&&p4.call(e,r)&&(n[r]=e[r]);return n};const fse={},pse=_.forwardRef((e,t)=>{const n=Cu(),r=ae(`${n.__staticSelector}Header`,fse,e),{className:o}=r,i=dse(r,["className"]),{classes:s,cx:a}=lse({padding:n.padding},n.stylesApi);return k.createElement(Pe,use({ref:t,className:a(s.header,o)},i))});var hse=ue(e=>({title:{lineHeight:1,padding:0,margin:0,fontWeight:400,fontSize:e.fontSizes.md}}));const mse=hse;var gse=Object.defineProperty,Zg=Object.getOwnPropertySymbols,h4=Object.prototype.hasOwnProperty,m4=Object.prototype.propertyIsEnumerable,yM=(e,t,n)=>t in e?gse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vse=(e,t)=>{for(var n in t||(t={}))h4.call(t,n)&&yM(e,n,t[n]);if(Zg)for(var n of Zg(t))m4.call(t,n)&&yM(e,n,t[n]);return e},yse=(e,t)=>{var n={};for(var r in e)h4.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&&m4.call(e,r)&&(n[r]=e[r]);return n};const _se={},wse=_.forwardRef((e,t)=>{const n=Cu(),r=ae(`${n.__staticSelector}Title`,_se,e),{className:o}=r,i=yse(r,["className"]),{classes:s,cx:a}=mse(null,n.stylesApi);return _.useEffect(()=>(n.setTitleMounted(!0),()=>n.setTitleMounted(!1)),[]),k.createElement(Pe,vse({component:"h2",id:n.getTitleId(),className:a(s.title,o),ref:t},i))});var bse=ue((e,{padding:t})=>({body:{padding:re({size:t,sizes:e.spacing}),"&:not(:only-child)":{paddingTop:0}}}));const xse=bse;var Sse=Object.defineProperty,Gg=Object.getOwnPropertySymbols,g4=Object.prototype.hasOwnProperty,v4=Object.prototype.propertyIsEnumerable,_M=(e,t,n)=>t in e?Sse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pse=(e,t)=>{for(var n in t||(t={}))g4.call(t,n)&&_M(e,n,t[n]);if(Gg)for(var n of Gg(t))v4.call(t,n)&&_M(e,n,t[n]);return e},Ose=(e,t)=>{var n={};for(var r in e)g4.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&&v4.call(e,r)&&(n[r]=e[r]);return n};const Cse={},kse=_.forwardRef((e,t)=>{const n=Cu(),r=ae(`${n.__staticSelector}Body`,Cse,e),{className:o}=r,i=Ose(r,["className"]),{classes:s,cx:a}=xse({padding:n.padding},n.stylesApi);return _.useEffect(()=>(n.setBodyMounted(!0),()=>n.setBodyMounted(!1)),[]),k.createElement(Pe,Pse({id:n.getBodyId(),className:a(s.body,o),ref:t},i))});function Ese({children:e}){return k.createElement(k.Fragment,null,e)}function $se({opened:e,transitionDuration:t}){const[n,r]=_.useState(e),o=_.useRef(),s=pS()?0:t;return _.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 Mse=ue(()=>({root:{}}));const Nse=Mse;var Tse=Object.defineProperty,Ise=Object.defineProperties,jse=Object.getOwnPropertyDescriptors,Yg=Object.getOwnPropertySymbols,y4=Object.prototype.hasOwnProperty,_4=Object.prototype.propertyIsEnumerable,wM=(e,t,n)=>t in e?Tse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,B_=(e,t)=>{for(var n in t||(t={}))y4.call(t,n)&&wM(e,n,t[n]);if(Yg)for(var n of Yg(t))_4.call(t,n)&&wM(e,n,t[n]);return e},bM=(e,t)=>Ise(e,jse(t)),Lse=(e,t)=>{var n={};for(var r in e)y4.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&&_4.call(e,r)&&(n[r]=e[r]);return n};const Hf={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:ii("modal"),padding:"md",size:"md",shadow:"xl"};function tt(e){const t=ae("ModalBase",Hf,e),{opened:n,onClose:r,children:o,closeOnClickOutside:i,__staticSelector:s,transitionProps:a,withinPortal:c,portalProps:u,keepMounted:f,target:p,zIndex:g,lockScroll:v,trapFocus:y,closeOnEscape:w,returnFocus:P,padding:x,shadow:S,id:O,size:E,variant:$,classNames:N,unstyled:I,styles:R,className:B}=t,z=Lse(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:G,cx:X}=Nse(null,{name:s,classNames:N,styles:R,unstyled:I,variant:$,size:E}),Q=$a(O),[V,H]=_.useState(!1),[Z,Y]=_.useState(!1),j=typeof a?.duration=="number"?a?.duration:200,U=$se({opened:n,transitionDuration:j});return gm("keydown",F=>{!y&&F.key==="Escape"&&w&&r()}),B3({opened:n,shouldReturnFocus:y&&P}),k.createElement(Af,bM(B_({},u),{withinPortal:c,target:p}),k.createElement(Oie,{value:{__staticSelector:s,opened:n,onClose:r,closeOnClickOutside:i,transitionProps:bM(B_({},a),{duration:j,keepMounted:f}),zIndex:g,padding:x,id:Q,getTitleId:()=>`${Q}-title`,getBodyId:()=>`${Q}-body`,titleMounted:V,bodyMounted:Z,setTitleMounted:H,setBodyMounted:Y,trapFocus:y,closeOnEscape:w,shadow:S,stylesApi:{name:s,size:E,variant:$,classNames:N,styles:R,unstyled:I}}},k.createElement(RW,{enabled:U&&v},k.createElement(Pe,B_({className:X(G.root,B)},z),o))))}tt.CloseButton=Tie;tt.Overlay=ese;tt.Content=sse;tt.Header=pse;tt.Title=wse;tt.Body=kse;tt.NativeScrollArea=Ese;var Dse=Object.defineProperty,Rse=Object.defineProperties,zse=Object.getOwnPropertyDescriptors,Kg=Object.getOwnPropertySymbols,w4=Object.prototype.hasOwnProperty,b4=Object.prototype.propertyIsEnumerable,xM=(e,t,n)=>t in e?Dse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yh=(e,t)=>{for(var n in t||(t={}))w4.call(t,n)&&xM(e,n,t[n]);if(Kg)for(var n of Kg(t))b4.call(t,n)&&xM(e,n,t[n]);return e},x4=(e,t)=>Rse(e,zse(t)),Ase=(e,t)=>{var n={};for(var r in e)w4.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&&b4.call(e,r)&&(n[r]=e[r]);return n};const Bse={top:"slide-down",bottom:"slide-up",left:"slide-right",right:"slide-left"},Fse={top:"slide-down",bottom:"slide-up",right:"slide-right",left:"slide-left"},Vse=x4(Yh({},Hf),{position:"left"});function S4(e){const t=ae("DrawerRoot",Vse,e),{classNames:n,variant:r,size:o,scrollAreaComponent:i,position:s,transitionProps:a}=t,c=Ase(t,["classNames","variant","size","scrollAreaComponent","position","transitionProps"]),{classes:u,cx:f,theme:p}=Pie({position:s},{name:"Drawer",variant:r,size:o}),g=(p.dir==="rtl"?Fse:Bse)[s];return k.createElement(bie,{value:{scrollAreaComponent:i}},k.createElement(tt,Yh({__staticSelector:"Drawer",size:o,variant:r,transitionProps:Yh({transition:g,duration:200},a),classNames:x4(Yh({},n),{content:f(u.content,n?.content),inner:f(u.inner,n?.inner)})},c)))}var Hse=Object.defineProperty,qg=Object.getOwnPropertySymbols,P4=Object.prototype.hasOwnProperty,O4=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={}))P4.call(t,n)&&SM(e,n,t[n]);if(qg)for(var n of qg(t))O4.call(t,n)&&SM(e,n,t[n]);return e},Use=(e,t)=>{var n={};for(var r in e)P4.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&&O4.call(e,r)&&(n[r]=e[r]);return n};const Zse={shadow:"xl"},C4=_.forwardRef((e,t)=>{const n=ae("ModalContent",Zse,e),{children:r,scrollAreaComponent:o}=n,i=Use(n,["children","scrollAreaComponent"]),s=xie(),a=o||s.scrollAreaComponent||tt.NativeScrollArea;return k.createElement(tt.Content,Wse({ref:t,radius:0},i),k.createElement(a,{style:{height:"100vh"}},r))});var Gse=Object.defineProperty,Yse=Object.defineProperties,Kse=Object.getOwnPropertyDescriptors,Jg=Object.getOwnPropertySymbols,k4=Object.prototype.hasOwnProperty,E4=Object.prototype.propertyIsEnumerable,PM=(e,t,n)=>t in e?Gse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kh=(e,t)=>{for(var n in t||(t={}))k4.call(t,n)&&PM(e,n,t[n]);if(Jg)for(var n of Jg(t))E4.call(t,n)&&PM(e,n,t[n]);return e},qse=(e,t)=>Yse(e,Kse(t)),Jse=(e,t)=>{var n={};for(var r in e)k4.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&&E4.call(e,r)&&(n[r]=e[r]);return n};const Xse=qse(Kh({},Hf),{withOverlay:!0,withCloseButton:!0});function Cs(e){const t=ae("Drawer",Xse,e),{title:n,withOverlay:r,overlayProps:o,withCloseButton:i,closeButtonProps:s,children:a}=t,c=Jse(t,["title","withOverlay","overlayProps","withCloseButton","closeButtonProps","children"]),u=!!n||i;return k.createElement(S4,Kh({},c),r&&k.createElement(tt.Overlay,Kh({},o)),k.createElement(C4,null,u&&k.createElement(tt.Header,null,n&&k.createElement(tt.Title,null,n),i&&k.createElement(tt.CloseButton,Kh({},s))),k.createElement(tt.Body,null,a)))}Cs.Root=S4;Cs.CloseButton=tt.CloseButton;Cs.Overlay=tt.Overlay;Cs.Content=C4;Cs.Header=tt.Header;Cs.Title=tt.Title;Cs.Body=tt.Body;Cs.NativeScrollArea=tt.NativeScrollArea;function Qse(e){return _.Children.toArray(e).filter(Boolean)}const eae={left:"flex-start",center:"center",right:"flex-end",apart:"space-between"};var tae=ue((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:eae[n],gap:re({size:t,sizes:e.spacing}),"& > *":{boxSizing:"border-box",maxWidth:o?`calc(${100/s}% - (${M(re({size:t,sizes:e.spacing}))} - ${re({size:t,sizes:e.spacing})} / ${s}))`:void 0,flexGrow:o?1:0}}}));const nae=tae;var rae=Object.defineProperty,Xg=Object.getOwnPropertySymbols,$4=Object.prototype.hasOwnProperty,M4=Object.prototype.propertyIsEnumerable,OM=(e,t,n)=>t in e?rae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oae=(e,t)=>{for(var n in t||(t={}))$4.call(t,n)&&OM(e,n,t[n]);if(Xg)for(var n of Xg(t))M4.call(t,n)&&OM(e,n,t[n]);return e},iae=(e,t)=>{var n={};for(var r in e)$4.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&&M4.call(e,r)&&(n[r]=e[r]);return n};const sae={position:"left",spacing:"md"},nt=_.forwardRef((e,t)=>{const n=ae("Group",sae,e),{className:r,position:o,align:i,children:s,noWrap:a,grow:c,spacing:u,unstyled:f,variant:p}=n,g=iae(n,["className","position","align","children","noWrap","grow","spacing","unstyled","variant"]),v=Qse(s),{classes:y,cx:w}=nae({align:i,grow:c,noWrap:a,spacing:u,position:o,count:v.length},{unstyled:f,name:"Group",variant:p});return k.createElement(Pe,oae({className:w(y.root,r),ref:t},g),v)});nt.displayName="@mantine/core/Group";function aae({open:e,close:t,openDelay:n,closeDelay:r}){const o=_.useRef(-1),i=_.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 _.useEffect(()=>s,[]),{openDropdown:a,closeDropdown:c}}var lae=Object.defineProperty,Qg=Object.getOwnPropertySymbols,N4=Object.prototype.hasOwnProperty,T4=Object.prototype.propertyIsEnumerable,CM=(e,t,n)=>t in e?lae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kM=(e,t)=>{for(var n in t||(t={}))N4.call(t,n)&&CM(e,n,t[n]);if(Qg)for(var n of Qg(t))T4.call(t,n)&&CM(e,n,t[n]);return e},cae=(e,t)=>{var n={};for(var r in e)N4.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&&T4.call(e,r)&&(n[r]=e[r]);return n};function uae(e){const t=e,{width:n,height:r,style:o}=t,i=cae(t,["width","height","style"]);return k.createElement("svg",kM({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:kM({width:n,height:r},o)},i),k.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 dae=Object.defineProperty,fae=Object.defineProperties,pae=Object.getOwnPropertyDescriptors,EM=Object.getOwnPropertySymbols,hae=Object.prototype.hasOwnProperty,mae=Object.prototype.propertyIsEnumerable,$M=(e,t,n)=>t in e?dae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,MM=(e,t)=>{for(var n in t||(t={}))hae.call(t,n)&&$M(e,n,t[n]);if(EM)for(var n of EM(t))mae.call(t,n)&&$M(e,n,t[n]);return e},NM=(e,t)=>fae(e,pae(t)),gae=ue((e,{radius:t})=>({root:{},imageWrapper:{position:"relative"},figure:{margin:0},image:NM(MM({},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:NM(MM({},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 vae=gae;var yae=Object.defineProperty,_ae=Object.defineProperties,wae=Object.getOwnPropertyDescriptors,ev=Object.getOwnPropertySymbols,I4=Object.prototype.hasOwnProperty,j4=Object.prototype.propertyIsEnumerable,TM=(e,t,n)=>t in e?yae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ld=(e,t)=>{for(var n in t||(t={}))I4.call(t,n)&&TM(e,n,t[n]);if(ev)for(var n of ev(t))j4.call(t,n)&&TM(e,n,t[n]);return e},bae=(e,t)=>_ae(e,wae(t)),xae=(e,t)=>{var n={};for(var r in e)I4.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&&j4.call(e,r)&&(n[r]=e[r]);return n};const Sae={fit:"cover",width:"100%",height:"auto",radius:0},ri=_.forwardRef((e,t)=>{const n=ae("Image",Sae,e),{className:r,alt:o,src:i,fit:s,width:a,height:c,radius:u,imageProps:f,withPlaceholder:p,placeholder:g,imageRef:v,classNames:y,styles:w,caption:P,unstyled:x,style:S,variant:O}=n,E=xae(n,["className","alt","src","fit","width","height","radius","imageProps","withPlaceholder","placeholder","imageRef","classNames","styles","caption","unstyled","style","variant"]),{classes:$,cx:N}=vae({radius:u},{classNames:y,styles:w,unstyled:x,name:"Image",variant:O}),[I,R]=_.useState(!i),B=p&&I;return Fn(()=>{R(!i)},[i]),k.createElement(Pe,ld({className:N($.root,r),style:ld({width:M(a)},S),ref:t},E),k.createElement("figure",{className:$.figure},k.createElement("div",{className:$.imageWrapper},k.createElement("img",bae(ld({src:i,alt:o,ref:v},f),{className:N($.image,f?.className),onError:z=>{R(!0),typeof f?.onError=="function"&&f.onError(z)},style:ld(ld({objectFit:s,width:M(a),height:M(c)},B&&{overflow:"hidden"}),f?.style)})),B&&k.createElement("div",{className:$.placeholder,title:o},g||k.createElement("div",null,k.createElement(uae,{width:M(40),height:M(40)})))),!!P&&k.createElement(W,{component:"figcaption",size:"sm",align:"center",className:$.caption},P)))});ri.displayName="@mantine/core/Image";var Pae=Object.defineProperty,Oae=Object.defineProperties,Cae=Object.getOwnPropertyDescriptors,IM=Object.getOwnPropertySymbols,kae=Object.prototype.hasOwnProperty,Eae=Object.prototype.propertyIsEnumerable,jM=(e,t,n)=>t in e?Pae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,LM=(e,t)=>{for(var n in t||(t={}))kae.call(t,n)&&jM(e,n,t[n]);if(IM)for(var n of IM(t))Eae.call(t,n)&&jM(e,n,t[n]);return e},DM=(e,t)=>Oae(e,Cae(t));const $ae=e=>PZ({from:{boxShadow:`0 0 ${M(.5)} 0 ${e}`,opacity:.6},to:{boxShadow:`0 0 ${M(.5)} ${M(4.4)} ${e}`,opacity:0}});function RM(e,t=0){const n={},[r,o]=e.split("-");let i="",s="";return r==="top"&&(n.top=t,s="-50%"),r==="middle"&&(n.top="50%",s="-50%"),r==="bottom"&&(n.bottom=t,s="50%"),o==="start"&&(n.left=t,i="-50%"),o==="center"&&(n.left="50%",i="-50%"),o==="end"&&(n.right=t,i="50%"),n.transform=`translate(${i}, ${s})`,n}var Mae=ue((e,{radius:t,color:n,position:r,offset:o,inline:i,withBorder:s,withLabel:a,zIndex:c},{size:u})=>{const{background:f}=e.fn.variant({variant:"filled",primaryFallback:!1,color:n||e.primaryColor}),p=M(u);return{root:{position:"relative",display:i?"inline-block":"block"},indicator:DM(LM({},RM(r,o)),{zIndex:c,position:"absolute",[a?"minWidth":"width"]:p,height:p,display:"flex",justifyContent:"center",alignItems:"center",fontSize:e.fontSizes.xs,paddingLeft:a?`calc(${e.spacing.xs} / 2)`:0,paddingRight:a?`calc(${e.spacing.xs} / 2)`:0,borderRadius:e.fn.radius(t),backgroundColor:e.fn.variant({variant:"filled",primaryFallback:!1,color:n||e.primaryColor}).background,border:s?`${M(2)} solid ${e.colorScheme==="dark"?e.colors.dark[7]:e.white}`:void 0,color:e.white,whiteSpace:"nowrap"}),processing:{animation:`${$ae(f)} 1000ms linear infinite`},common:DM(LM({},RM(r,o)),{position:"absolute",[a?"minWidth":"width"]:p,height:p,borderRadius:e.fn.radius(t)})}});const Nae=Mae;var Tae=Object.defineProperty,tv=Object.getOwnPropertySymbols,L4=Object.prototype.hasOwnProperty,D4=Object.prototype.propertyIsEnumerable,zM=(e,t,n)=>t in e?Tae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Iae=(e,t)=>{for(var n in t||(t={}))L4.call(t,n)&&zM(e,n,t[n]);if(tv)for(var n of tv(t))D4.call(t,n)&&zM(e,n,t[n]);return e},jae=(e,t)=>{var n={};for(var r in e)L4.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&&D4.call(e,r)&&(n[r]=e[r]);return n};const Lae={position:"top-end",offset:0,inline:!1,withBorder:!1,disabled:!1,processing:!1,size:10,radius:1e3,zIndex:ii("app")},R4=_.forwardRef((e,t)=>{const n=ae("Indicator",Lae,e),{children:r,position:o,offset:i,size:s,radius:a,inline:c,withBorder:u,className:f,color:p,styles:g,label:v,classNames:y,disabled:w,zIndex:P,unstyled:x,processing:S,variant:O}=n,E=jae(n,["children","position","offset","size","radius","inline","withBorder","className","color","styles","label","classNames","disabled","zIndex","unstyled","processing","variant"]),{classes:$,cx:N}=Nae({position:o,offset:i,radius:a,inline:c,color:p,withBorder:u,zIndex:P,withLabel:!!v},{name:"Indicator",classNames:y,styles:g,unstyled:x,variant:O,size:s});return k.createElement(Pe,Iae({ref:t,className:N($.root,f)},E),!w&&k.createElement(k.Fragment,null,k.createElement("div",{className:N($.indicator,$.common)},v),S&&k.createElement("div",{className:N($.processing,$.common)})),r)});R4.displayName="@mantine/core/Indicator";function Dae(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var Rae=_.useLayoutEffect,zae=function(t){var n=_.useRef(t);return Rae(function(){n.current=t}),n},AM=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},Aae=function(t,n){var r=_.useRef();return _.useCallback(function(o){t.current=o,r.current&&AM(r.current,null),r.current=n,n&&AM(n,o)},[n])},BM={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},FM=function(t){Object.keys(BM).forEach(function(n){t.style.setProperty(n,BM[n],"important")})},eo=null,Bae=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function Fae(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),eo||(eo=document.createElement("textarea"),eo.setAttribute("tabindex","-1"),eo.setAttribute("aria-hidden","true"),FM(eo)),eo.parentNode===null&&document.body.appendChild(eo);var o=e.paddingSize,i=e.borderSize,s=e.sizingStyle,a=s.boxSizing;Object.keys(s).forEach(function(g){var v=g;eo.style[v]=s[v]}),FM(eo),eo.value=t;var c=Bae(eo,e);eo.value="x";var u=eo.scrollHeight-o,f=u*n;a==="border-box"&&(f=f+o+i),c=Math.max(f,c);var p=u*r;return a==="border-box"&&(p=p+o+i),c=Math.min(p,c),[c,u]}var VM=function(){},Vae=function(t,n){return t.reduce(function(r,o){return r[o]=n[o],r},{})},Hae=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],Wae=!!document.documentElement.currentStyle,Uae=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=Vae(Hae,n),o=r.boxSizing;if(o==="")return null;Wae&&o==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var i=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),s=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:i,borderSize:s}},Zae=function(t){var n=zae(t);_.useLayoutEffect(function(){var r=function(i){n.current(i)};return window.addEventListener("resize",r),function(){window.removeEventListener("resize",r)}},[])},Gae=function(t,n){var r=t.cacheMeasurements,o=t.maxRows,i=t.minRows,s=t.onChange,a=s===void 0?VM:s,c=t.onHeightChange,u=c===void 0?VM:c,f=Dae(t,["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"]),p=f.value!==void 0,g=_.useRef(null),v=Aae(g,n),y=_.useRef(0),w=_.useRef(),P=function(){var O=g.current,E=r&&w.current?w.current:Uae(O);if(E){w.current=E;var $=Fae(E,O.value||O.placeholder||"x",i,o),N=$[0],I=$[1];y.current!==N&&(y.current=N,O.style.setProperty("height",N+"px","important"),u(N,{rowHeight:I}))}},x=function(O){p||P(),a(O)};return _.useLayoutEffect(P),Zae(P),_.createElement("textarea",Lt({},f,{onChange:x,ref:v}))},Yae=_.forwardRef(Gae);const Kae=Yae;var qae=ue(e=>({input:{paddingTop:e.spacing.xs,paddingBottom:e.spacing.xs}}));const Jae=qae;var Xae=Object.defineProperty,Qae=Object.defineProperties,ele=Object.getOwnPropertyDescriptors,nv=Object.getOwnPropertySymbols,z4=Object.prototype.hasOwnProperty,A4=Object.prototype.propertyIsEnumerable,HM=(e,t,n)=>t in e?Xae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lc=(e,t)=>{for(var n in t||(t={}))z4.call(t,n)&&HM(e,n,t[n]);if(nv)for(var n of nv(t))A4.call(t,n)&&HM(e,n,t[n]);return e},F_=(e,t)=>Qae(e,ele(t)),tle=(e,t)=>{var n={};for(var r in e)z4.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&&A4.call(e,r)&&(n[r]=e[r]);return n};const nle={autosize:!1,size:"sm",__staticSelector:"Textarea"},B4=_.forwardRef((e,t)=>{const n=ae("Textarea",nle,e),{autosize:r,maxRows:o,minRows:i,label:s,error:a,description:c,id:u,className:f,required:p,style:g,wrapperProps:v,classNames:y,styles:w,size:P,__staticSelector:x,sx:S,errorProps:O,descriptionProps:E,labelProps:$,inputWrapperOrder:N,inputContainer:I,unstyled:R,withAsterisk:B,variant:z}=n,G=tle(n,["autosize","maxRows","minRows","label","error","description","id","className","required","style","wrapperProps","classNames","styles","size","__staticSelector","sx","errorProps","descriptionProps","labelProps","inputWrapperOrder","inputContainer","unstyled","withAsterisk","variant"]),X=$a(u),{classes:Q,cx:V}=Jae(),{systemStyles:H,rest:Z}=Dl(G),Y=lc({required:p,ref:t,error:a,id:X,classNames:F_(lc({},y),{input:V(Q.input,y?.input)}),styles:w,__staticSelector:x,size:P,multiline:!0,unstyled:R,variant:z},Z);return k.createElement(et.Wrapper,lc(lc({label:s,error:a,id:X,description:c,required:p,style:g,className:f,classNames:y,styles:w,size:P,__staticSelector:x,sx:S,errorProps:O,labelProps:$,descriptionProps:E,inputContainer:I,inputWrapperOrder:N,unstyled:R,withAsterisk:B,variant:z},H),v),r?k.createElement(et,F_(lc({},Y),{component:Kae,maxRows:o,minRows:i})):k.createElement(et,F_(lc({},Y),{component:"textarea",rows:i})))});B4.displayName="@mantine/core/Textarea";var rle=Object.defineProperty,ole=Object.defineProperties,ile=Object.getOwnPropertyDescriptors,WM=Object.getOwnPropertySymbols,sle=Object.prototype.hasOwnProperty,ale=Object.prototype.propertyIsEnumerable,UM=(e,t,n)=>t in e?rle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lle=(e,t)=>{for(var n in t||(t={}))sle.call(t,n)&&UM(e,n,t[n]);if(WM)for(var n of WM(t))ale.call(t,n)&&UM(e,n,t[n]);return e},cle=(e,t)=>ole(e,ile(t)),ule=ue(e=>({root:cle(lle({},e.fn.cover()),{display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"})}));const dle=ule;var fle=Object.defineProperty,ple=Object.defineProperties,hle=Object.getOwnPropertyDescriptors,rv=Object.getOwnPropertySymbols,F4=Object.prototype.hasOwnProperty,V4=Object.prototype.propertyIsEnumerable,ZM=(e,t,n)=>t in e?fle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nh=(e,t)=>{for(var n in t||(t={}))F4.call(t,n)&&ZM(e,n,t[n]);if(rv)for(var n of rv(t))V4.call(t,n)&&ZM(e,n,t[n]);return e},mle=(e,t)=>ple(e,hle(t)),gle=(e,t)=>{var n={};for(var r in e)F4.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&&V4.call(e,r)&&(n[r]=e[r]);return n};const vle={overlayOpacity:.75,transitionDuration:0,radius:0,zIndex:ii("overlay")},Wf=_.forwardRef((e,t)=>{const n=ae("LoadingOverlay",vle,e),{className:r,visible:o,loaderProps:i,overlayOpacity:s,overlayColor:a,transitionDuration:c,exitTransitionDuration:u,zIndex:f,style:p,loader:g,radius:v,overlayBlur:y,unstyled:w,variant:P,keepMounted:x}=n,S=gle(n,["className","visible","loaderProps","overlayOpacity","overlayColor","transitionDuration","exitTransitionDuration","zIndex","style","loader","radius","overlayBlur","unstyled","variant","keepMounted"]),{classes:O,cx:E,theme:$}=dle(null,{name:"LoadingOverlay",unstyled:w,variant:P}),N=`calc(${f} + 1)`;return k.createElement(Os,{keepMounted:x,duration:c,exitDuration:u,mounted:o,transition:"fade"},I=>k.createElement(Pe,nh({className:E(O.root,r),style:mle(nh(nh({},I),p),{zIndex:f}),ref:t},S),g?k.createElement("div",{style:{zIndex:N}},g):k.createElement(en,nh({style:{zIndex:N}},i)),k.createElement(a4,{opacity:s,zIndex:f,radius:v,blur:y,unstyled:w,color:a||($.colorScheme==="dark"?$.colors.dark[5]:$.white)})))});Wf.displayName="@mantine/core/LoadingOverlay";const H4={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"},[yle,Uf]=bu(H4.context);var _le=ue(e=>({divider:{marginTop:M(4),marginBottom:M(4),borderTop:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`}}));const wle=_le;var ble=Object.defineProperty,ov=Object.getOwnPropertySymbols,W4=Object.prototype.hasOwnProperty,U4=Object.prototype.propertyIsEnumerable,GM=(e,t,n)=>t in e?ble(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xle=(e,t)=>{for(var n in t||(t={}))W4.call(t,n)&&GM(e,n,t[n]);if(ov)for(var n of ov(t))U4.call(t,n)&&GM(e,n,t[n]);return e},Sle=(e,t)=>{var n={};for(var r in e)W4.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&&U4.call(e,r)&&(n[r]=e[r]);return n};const Ple={},Z4=_.forwardRef((e,t)=>{const n=ae("MenuDivider",Ple,e),{children:r,className:o}=n,i=Sle(n,["children","className"]),{classNames:s,styles:a,unstyled:c,variant:u}=Uf(),{classes:f,cx:p}=wle(null,{name:"Menu",classNames:s,styles:a,unstyled:c,variant:u});return k.createElement(Pe,xle({className:p(f.divider,o),ref:t},i))});Z4.displayName="@mantine/core/MenuDivider";var Ole=Object.defineProperty,iv=Object.getOwnPropertySymbols,G4=Object.prototype.hasOwnProperty,Y4=Object.prototype.propertyIsEnumerable,YM=(e,t,n)=>t in e?Ole(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cle=(e,t)=>{for(var n in t||(t={}))G4.call(t,n)&&YM(e,n,t[n]);if(iv)for(var n of iv(t))Y4.call(t,n)&&YM(e,n,t[n]);return e},kle=(e,t)=>{var n={};for(var r in e)G4.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&&Y4.call(e,r)&&(n[r]=e[r]);return n};const Ele={};function K4(e){const t=ae("MenuDropdown",Ele,e),{children:n,onMouseEnter:r,onMouseLeave:o}=t,i=kle(t,["children","onMouseEnter","onMouseLeave"]),s=_.useRef(),a=Uf(),c=p=>{var g;(p.key==="ArrowUp"||p.key==="ArrowDown")&&(p.preventDefault(),(g=s.current.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||g.focus())},u=is(r,()=>a.trigger==="hover"&&a.openDropdown()),f=is(o,()=>a.trigger==="hover"&&a.closeDropdown());return k.createElement(kn.Dropdown,Cle({onMouseEnter:u,onMouseLeave:f,role:"menu","aria-orientation":"vertical"},i),k.createElement("div",{tabIndex:-1,"data-menu-dropdown":!0,"data-autofocus":!0,onKeyDown:c,ref:s,style:{outline:0}},n))}K4.displayName="@mantine/core/MenuDropdown";var $le=Object.defineProperty,Mle=Object.defineProperties,Nle=Object.getOwnPropertyDescriptors,KM=Object.getOwnPropertySymbols,Tle=Object.prototype.hasOwnProperty,Ile=Object.prototype.propertyIsEnumerable,qM=(e,t,n)=>t in e?$le(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jle=(e,t)=>{for(var n in t||(t={}))Tle.call(t,n)&&qM(e,n,t[n]);if(KM)for(var n of KM(t))Ile.call(t,n)&&qM(e,n,t[n]);return e},Lle=(e,t)=>Mle(e,Nle(t)),Dle=ue((e,{color:t,radius:n})=>({item:Lle(jle({},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 Rle=Dle;var zle=Object.defineProperty,Ale=Object.defineProperties,Ble=Object.getOwnPropertyDescriptors,sv=Object.getOwnPropertySymbols,q4=Object.prototype.hasOwnProperty,J4=Object.prototype.propertyIsEnumerable,JM=(e,t,n)=>t in e?zle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fle=(e,t)=>{for(var n in t||(t={}))q4.call(t,n)&&JM(e,n,t[n]);if(sv)for(var n of sv(t))J4.call(t,n)&&JM(e,n,t[n]);return e},Vle=(e,t)=>Ale(e,Ble(t)),Hle=(e,t)=>{var n={};for(var r in e)q4.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&&J4.call(e,r)&&(n[r]=e[r]);return n};const Wle={},X4=_.forwardRef((e,t)=>{const n=ae("MenuItem",Wle,e),{children:r,className:o,color:i,closeMenuOnClick:s,icon:a,rightSection:c}=n,u=Hle(n,["children","className","color","closeMenuOnClick","icon","rightSection"]),f=Uf(),{classes:p,cx:g,theme:v}=Rle({radius:f.radius,color:i},{name:"Menu",classNames:f.classNames,styles:f.styles,unstyled:f.unstyled,variant:f.variant}),y=_.useRef(),w=f.getItemIndex(y.current),P=u,x=is(P.onMouseLeave,()=>f.setHovered(-1)),S=is(P.onMouseEnter,()=>f.setHovered(f.getItemIndex(y.current))),O=is(P.onClick,()=>{typeof s=="boolean"?s&&f.closeDropdownImmediately():f.closeOnItemClick&&f.closeDropdownImmediately()}),E=is(P.onFocus,()=>f.setHovered(f.getItemIndex(y.current)));return k.createElement(Pe,Vle(Fle({component:"button",type:"button"},u),{tabIndex:-1,onFocus:E,className:g(p.item,o),ref:ws(y,t),role:"menuitem","data-menu-item":!0,"data-hovered":f.hovered===w?!0:void 0,onMouseEnter:S,onMouseLeave:x,onClick:O,onKeyDown:FW({siblingSelector:"[data-menu-item]",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:f.loop,dir:v.dir,orientation:"vertical",onKeyDown:P.onKeydown})}),a&&k.createElement("div",{className:p.itemIcon},a),r&&k.createElement("div",{className:p.itemLabel},r),c&&k.createElement("div",{className:p.itemRightSection},c))});X4.displayName="@mantine/core/MenuItem";const Ule=X4;var Zle=ue(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 Gle=Zle;var Yle=Object.defineProperty,av=Object.getOwnPropertySymbols,Q4=Object.prototype.hasOwnProperty,e6=Object.prototype.propertyIsEnumerable,XM=(e,t,n)=>t in e?Yle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kle=(e,t)=>{for(var n in t||(t={}))Q4.call(t,n)&&XM(e,n,t[n]);if(av)for(var n of av(t))e6.call(t,n)&&XM(e,n,t[n]);return e},qle=(e,t)=>{var n={};for(var r in e)Q4.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&&e6.call(e,r)&&(n[r]=e[r]);return n};const Jle={},t6=_.forwardRef((e,t)=>{const n=ae("MenuLabel",Jle,e),{children:r,className:o}=n,i=qle(n,["children","className"]),{classNames:s,styles:a,unstyled:c,variant:u}=Uf(),{classes:f,cx:p}=Gle(null,{name:"Menu",classNames:s,styles:a,unstyled:c,variant:u});return k.createElement(W,Kle({className:p(f.label,o),ref:t},i),r)});t6.displayName="@mantine/core/MenuLabel";var Xle=Object.defineProperty,lv=Object.getOwnPropertySymbols,n6=Object.prototype.hasOwnProperty,r6=Object.prototype.propertyIsEnumerable,QM=(e,t,n)=>t in e?Xle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qle=(e,t)=>{for(var n in t||(t={}))n6.call(t,n)&&QM(e,n,t[n]);if(lv)for(var n of lv(t))r6.call(t,n)&&QM(e,n,t[n]);return e},ece=(e,t)=>{var n={};for(var r in e)n6.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&&r6.call(e,r)&&(n[r]=e[r]);return n};const tce={refProp:"ref"},o6=_.forwardRef((e,t)=>{const n=ae("MenuTarget",tce,e),{children:r,refProp:o}=n,i=ece(n,["children","refProp"]);if(!Nf(r))throw new Error(H4.children);const s=Uf(),a=is(r.props.onClick,()=>s.trigger==="click"&&s.toggleDropdown()),c=is(r.props.onMouseEnter,()=>s.trigger==="hover"&&s.openDropdown()),u=is(r.props.onMouseLeave,()=>s.trigger==="hover"&&s.closeDropdown());return k.createElement(kn.Target,Qle({refProp:o,popupType:"menu",ref:t},i),_.cloneElement(r,{onClick:a,onMouseEnter:c,onMouseLeave:u,"data-expanded":s.opened?!0:void 0}))});o6.displayName="@mantine/core/MenuTarget";var nce=ue({dropdown:{padding:M(4)}});const rce=nce;var oce=Object.defineProperty,ice=Object.defineProperties,sce=Object.getOwnPropertyDescriptors,cv=Object.getOwnPropertySymbols,i6=Object.prototype.hasOwnProperty,s6=Object.prototype.propertyIsEnumerable,eN=(e,t,n)=>t in e?oce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tN=(e,t)=>{for(var n in t||(t={}))i6.call(t,n)&&eN(e,n,t[n]);if(cv)for(var n of cv(t))s6.call(t,n)&&eN(e,n,t[n]);return e},nN=(e,t)=>ice(e,sce(t)),ace=(e,t)=>{var n={};for(var r in e)i6.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&&s6.call(e,r)&&(n[r]=e[r]);return n};const lce={closeOnItemClick:!0,loop:!0,trigger:"click",openDelay:0,closeDelay:100};function It(e){const t=ae("Menu",lce,e),{children:n,onOpen:r,onClose:o,opened:i,defaultOpened:s,onChange:a,closeOnItemClick:c,loop:u,closeOnEscape:f,trigger:p,openDelay:g,closeDelay:v,classNames:y,styles:w,unstyled:P,radius:x,variant:S}=t,O=ace(t,["children","onOpen","onClose","opened","defaultOpened","onChange","closeOnItemClick","loop","closeOnEscape","trigger","openDelay","closeDelay","classNames","styles","unstyled","radius","variant"]),{classes:E,cx:$}=rce(),[N,{setHovered:I,resetHovered:R}]=ZW(),[B,z]=go({value:i,defaultValue:s,finalValue:!1,onChange:a}),G=()=>{z(!1),B&&o?.()},X=()=>{z(!0),!B&&r?.()},Q=()=>B?G():X(),{openDropdown:V,closeDropdown:H}=aae({open:X,close:G,closeDelay:v,openDelay:g}),Z=Y=>VW("[data-menu-item]","[data-menu-dropdown]",Y);return Fn(()=>{R()},[B]),k.createElement(yle,{value:{opened:B,toggleDropdown:Q,getItemIndex:Z,hovered:N,setHovered:I,closeOnItemClick:c,closeDropdown:p==="click"?G:H,openDropdown:p==="click"?X:V,closeDropdownImmediately:G,loop:u,trigger:p,radius:x,classNames:y,styles:w,unstyled:P,variant:S}},k.createElement(kn,nN(tN({},O),{radius:x,opened:B,onChange:Q,defaultOpened:s,trapFocus:p==="click",closeOnEscape:f&&p==="click",__staticSelector:"Menu",classNames:nN(tN({},y),{dropdown:$(E.dropdown,y?.dropdown)}),styles:w,unstyled:P,variant:S}),n))}It.displayName="@mantine/core/Menu";It.Item=Ule;It.Label=t6;It.Dropdown=K4;It.Target=o6;It.Divider=Z4;const[cce,uce]=bu("Modal component was not found in tree"),dce={xs:M(320),sm:M(380),md:M(440),lg:M(620),xl:M(780)};var fce=ue((e,{yOffset:t,xOffset:n,centered:r,fullScreen:o},{size:i})=>({content:{flex:o?"0 0 100%":`0 0 ${re({size:i,sizes:dce})}`,maxWidth:"100%",maxHeight:o?void 0:`calc(100dvh - (${M(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 pce=fce;var hce=Object.defineProperty,mce=Object.defineProperties,gce=Object.getOwnPropertyDescriptors,uv=Object.getOwnPropertySymbols,a6=Object.prototype.hasOwnProperty,l6=Object.prototype.propertyIsEnumerable,rN=(e,t,n)=>t in e?hce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ex=(e,t)=>{for(var n in t||(t={}))a6.call(t,n)&&rN(e,n,t[n]);if(uv)for(var n of uv(t))l6.call(t,n)&&rN(e,n,t[n]);return e},c6=(e,t)=>mce(e,gce(t)),vce=(e,t)=>{var n={};for(var r in e)a6.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&&l6.call(e,r)&&(n[r]=e[r]);return n};const yce=c6(ex({},Hf),{yOffset:"5dvh",xOffset:"5vw"});function u6(e){const t=ae("ModalRoot",yce,e),{classNames:n,variant:r,size:o,yOffset:i,xOffset:s,scrollAreaComponent:a,radius:c,centered:u,fullScreen:f}=t,p=vce(t,["classNames","variant","size","yOffset","xOffset","scrollAreaComponent","radius","centered","fullScreen"]),{classes:g,cx:v}=pce({yOffset:i,xOffset:s,centered:u,fullScreen:f},{name:"Modal",variant:r,size:o});return k.createElement(cce,{value:{yOffset:i,scrollAreaComponent:a,radius:c}},k.createElement(tt,ex({__staticSelector:"Modal",size:o,variant:r,classNames:c6(ex({},n),{content:v(g.content,n?.content),inner:v(g.inner,n?.inner)})},p)))}var _ce=Object.defineProperty,dv=Object.getOwnPropertySymbols,d6=Object.prototype.hasOwnProperty,f6=Object.prototype.propertyIsEnumerable,oN=(e,t,n)=>t in e?_ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wce=(e,t)=>{for(var n in t||(t={}))d6.call(t,n)&&oN(e,n,t[n]);if(dv)for(var n of dv(t))f6.call(t,n)&&oN(e,n,t[n]);return e},bce=(e,t)=>{var n={};for(var r in e)d6.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&&f6.call(e,r)&&(n[r]=e[r]);return n};const xce={shadow:"xl"},p6=_.forwardRef((e,t)=>{const n=ae("ModalContent",xce,e),{children:r,scrollAreaComponent:o}=n,i=bce(n,["children","scrollAreaComponent"]),s=uce(),a=o||s.scrollAreaComponent||tt.NativeScrollArea;return k.createElement(tt.Content,wce({ref:t,radius:s.radius},i),k.createElement(a,{style:{maxHeight:`calc(100dvh - (${M(s.yOffset)} * 2))`}},r))});var Sce=Object.defineProperty,Pce=Object.defineProperties,Oce=Object.getOwnPropertyDescriptors,fv=Object.getOwnPropertySymbols,h6=Object.prototype.hasOwnProperty,m6=Object.prototype.propertyIsEnumerable,iN=(e,t,n)=>t in e?Sce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qh=(e,t)=>{for(var n in t||(t={}))h6.call(t,n)&&iN(e,n,t[n]);if(fv)for(var n of fv(t))m6.call(t,n)&&iN(e,n,t[n]);return e},Cce=(e,t)=>Pce(e,Oce(t)),kce=(e,t)=>{var n={};for(var r in e)h6.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&&m6.call(e,r)&&(n[r]=e[r]);return n};const Ece=Cce(qh({},Hf),{transitionProps:{duration:200,transition:"pop"},withOverlay:!0,withCloseButton:!0});function zi(e){const t=ae("Modal",Ece,e),{title:n,withOverlay:r,overlayProps:o,withCloseButton:i,closeButtonProps:s,children:a}=t,c=kce(t,["title","withOverlay","overlayProps","withCloseButton","closeButtonProps","children"]),u=!!n||i;return k.createElement(u6,qh({},c),r&&k.createElement(tt.Overlay,qh({},o)),k.createElement(p6,null,u&&k.createElement(tt.Header,null,n&&k.createElement(tt.Title,null,n),i&&k.createElement(tt.CloseButton,qh({},s))),k.createElement(tt.Body,null,a)))}zi.Root=u6;zi.CloseButton=tt.CloseButton;zi.Overlay=tt.Overlay;zi.Content=p6;zi.Header=tt.Header;zi.Title=tt.Title;zi.Body=tt.Body;zi.NativeScrollArea=tt.NativeScrollArea;const g6={xs:M(16),sm:M(22),md:M(26),lg:M(30),xl:M(36)},$ce={xs:M(10),sm:M(12),md:M(14),lg:M(16),xl:M(18)};var Mce=ue((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:re({size:o,sizes:g6}),paddingLeft:`calc(${re({size:o,sizes:e.spacing})} / 1.5)`,paddingRight:t||r?re({size:o,sizes:e.spacing}):0,fontWeight:500,fontSize:re({size:o,sizes:$ce}),borderRadius:re({size:n,sizes:e.radius}),cursor:t?"not-allowed":"default",userSelect:"none",maxWidth:`calc(100% - ${M(10)})`},defaultValueRemove:{color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],marginLeft:`calc(${re({size:o,sizes:e.spacing})} / 6)`},defaultValueLabel:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}));const Nce=Mce;var Tce=Object.defineProperty,pv=Object.getOwnPropertySymbols,v6=Object.prototype.hasOwnProperty,y6=Object.prototype.propertyIsEnumerable,sN=(e,t,n)=>t in e?Tce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ice=(e,t)=>{for(var n in t||(t={}))v6.call(t,n)&&sN(e,n,t[n]);if(pv)for(var n of pv(t))y6.call(t,n)&&sN(e,n,t[n]);return e},jce=(e,t)=>{var n={};for(var r in e)v6.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&&y6.call(e,r)&&(n[r]=e[r]);return n};const Lce={xs:16,sm:22,md:24,lg:26,xl:30};function _6(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:g}=t,v=jce(t,["label","classNames","styles","className","onRemove","disabled","readOnly","size","radius","variant","unstyled"]);const{classes:y,cx:w}=Nce({disabled:a,readOnly:c,radius:f},{name:"MultiSelect",classNames:r,styles:o,unstyled:g,size:u,variant:p});return k.createElement("div",Ice({className:w(y.defaultValue,i)},v),k.createElement("span",{className:y.defaultValueLabel},n),!a&&!c&&k.createElement(C0,{"aria-hidden":!0,onMouseDown:s,size:Lce[u],radius:2,color:"blue",variant:"transparent",iconSize:"70%",className:y.defaultValueRemove,tabIndex:-1,unstyled:g}))}_6.displayName="@mantine/core/MultiSelect/DefaultValue";function Dce({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 Rce=Object.defineProperty,hv=Object.getOwnPropertySymbols,w6=Object.prototype.hasOwnProperty,b6=Object.prototype.propertyIsEnumerable,aN=(e,t,n)=>t in e?Rce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lN=(e,t)=>{for(var n in t||(t={}))w6.call(t,n)&&aN(e,n,t[n]);if(hv)for(var n of hv(t))b6.call(t,n)&&aN(e,n,t[n]);return e},zce=(e,t)=>{var n={};for(var r in e)w6.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&&b6.call(e,r)&&(n[r]=e[r]);return n};const Ace={xs:M(14),sm:M(18),md:M(20),lg:M(24),xl:M(28)};function Bce(e){var t=e,{size:n,error:r,style:o}=t,i=zce(t,["size","error","style"]);const s=ir(),a=re({size:n,sizes:Ace});return k.createElement("svg",lN({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:lN({color:r?s.colors.red[6]:s.colors.gray[6],width:a,height:a},o),"data-chevron":!0},i),k.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 Fce=Object.defineProperty,Vce=Object.defineProperties,Hce=Object.getOwnPropertyDescriptors,cN=Object.getOwnPropertySymbols,Wce=Object.prototype.hasOwnProperty,Uce=Object.prototype.propertyIsEnumerable,uN=(e,t,n)=>t in e?Fce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zce=(e,t)=>{for(var n in t||(t={}))Wce.call(t,n)&&uN(e,n,t[n]);if(cN)for(var n of cN(t))Uce.call(t,n)&&uN(e,n,t[n]);return e},Gce=(e,t)=>Vce(e,Hce(t));function x6({shouldClear:e,clearButtonProps:t,onClear:n,size:r,error:o}){return e?k.createElement(C0,Gce(Zce({},t),{variant:"transparent",onClick:n,size:r,onMouseDown:i=>i.preventDefault()})):k.createElement(Bce,{error:o,size:r})}x6.displayName="@mantine/core/SelectRightSection";var Yce=Object.defineProperty,Kce=Object.defineProperties,qce=Object.getOwnPropertyDescriptors,mv=Object.getOwnPropertySymbols,S6=Object.prototype.hasOwnProperty,P6=Object.prototype.propertyIsEnumerable,dN=(e,t,n)=>t in e?Yce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,V_=(e,t)=>{for(var n in t||(t={}))S6.call(t,n)&&dN(e,n,t[n]);if(mv)for(var n of mv(t))P6.call(t,n)&&dN(e,n,t[n]);return e},fN=(e,t)=>Kce(e,qce(t)),Jce=(e,t)=>{var n={};for(var r in e)S6.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&&P6.call(e,r)&&(n[r]=e[r]);return n};function O6(e){var t=e,{styles:n,rightSection:r,rightSectionWidth:o,theme:i}=t,s=Jce(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)&&k.createElement(x6,V_({},s)),styles:fN(V_({},a),{rightSection:fN(V_({},a?.rightSection),{pointerEvents:s.shouldClear?void 0:"none"})})}}var Xce=Object.defineProperty,Qce=Object.defineProperties,eue=Object.getOwnPropertyDescriptors,pN=Object.getOwnPropertySymbols,tue=Object.prototype.hasOwnProperty,nue=Object.prototype.propertyIsEnumerable,hN=(e,t,n)=>t in e?Xce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rue=(e,t)=>{for(var n in t||(t={}))tue.call(t,n)&&hN(e,n,t[n]);if(pN)for(var n of pN(t))nue.call(t,n)&&hN(e,n,t[n]);return e},oue=(e,t)=>Qce(e,eue(t)),iue=ue((e,{invalid:t},{size:n})=>({wrapper:{position:"relative","&:has(input:disabled)":{cursor:"not-allowed",pointerEvents:"none","& .mantine-MultiSelect-input":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,"&::placeholder":{color:e.colors.dark[2]}},"& .mantine-MultiSelect-defaultValue":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[3],color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7]}}},values:{minHeight:`calc(${re({size:n,sizes:Dn})} - ${M(2)})`,display:"flex",alignItems:"center",flexWrap:"wrap",marginLeft:`calc(-${e.spacing.xs} / 2)`,boxSizing:"border-box","&[data-clearable]":{marginRight:re({size:n,sizes:Dn})}},value:{margin:`calc(${e.spacing.xs} / 2 - ${M(2)}) calc(${e.spacing.xs} / 2)`},searchInput:oue(rue({},e.fn.fontStyles()),{flex:1,minWidth:M(60),backgroundColor:"transparent",border:0,outline:0,fontSize:re({size:n,sizes:e.fontSizes}),padding:0,marginLeft:`calc(${e.spacing.xs} / 2)`,appearance:"none",color:"inherit",maxHeight:re({size:n,sizes:g6}),"&::placeholder":{opacity:1,color:t?e.colors.red[e.fn.primaryShade()]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]},"&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}),searchInputEmpty:{width:"100%"},searchInputInputHidden:{flex:0,width:0,minWidth:0,margin:0,overflow:"hidden"},searchInputPointer:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}},input:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}}));const sue=iue;var aue=Object.defineProperty,lue=Object.defineProperties,cue=Object.getOwnPropertyDescriptors,gv=Object.getOwnPropertySymbols,C6=Object.prototype.hasOwnProperty,k6=Object.prototype.propertyIsEnumerable,mN=(e,t,n)=>t in e?aue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cc=(e,t)=>{for(var n in t||(t={}))C6.call(t,n)&&mN(e,n,t[n]);if(gv)for(var n of gv(t))k6.call(t,n)&&mN(e,n,t[n]);return e},gN=(e,t)=>lue(e,cue(t)),uue=(e,t)=>{var n={};for(var r in e)C6.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&&k6.call(e,r)&&(n[r]=e[r]);return n};function due(e,t,n){return t?!1:n.label.toLowerCase().trim().includes(e.toLowerCase().trim())}function fue(e,t){return!!e&&!t.some(n=>n.value.toLowerCase()===e.toLowerCase())}function vN(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 pue={size:"sm",valueComponent:_6,itemComponent:sP,transitionProps:{transition:"fade",duration:0},maxDropdownHeight:220,shadow:"sm",searchable:!1,filter:due,limit:1/0,clearSearchOnChange:!0,clearable:!1,clearSearchOnBlur:!1,disabled:!1,initiallyOpened:!1,creatable:!1,shouldCreate:fue,switchDirectionOnFlip:!1,zIndex:ii("popover"),selectOnBlur:!1,positionDependencies:[],dropdownPosition:"flip"},TP=_.forwardRef((e,t)=>{const n=ae("MultiSelect",pue,e),{className:r,style:o,required:i,label:s,description:a,size:c,error:u,classNames:f,styles:p,wrapperProps:g,value:v,defaultValue:y,data:w,onChange:P,valueComponent:x,itemComponent:S,id:O,transitionProps:E,maxDropdownHeight:$,shadow:N,nothingFound:I,onFocus:R,onBlur:B,searchable:z,placeholder:G,filter:X,limit:Q,clearSearchOnChange:V,clearable:H,clearSearchOnBlur:Z,variant:Y,onSearchChange:j,searchValue:U,disabled:F,initiallyOpened:K,radius:ee,icon:fe,rightSection:ie,rightSectionWidth:J,creatable:ne,getCreateLabel:le,shouldCreate:_e,onCreate:Ne,sx:we,dropdownComponent:He,onDropdownClose:Te,onDropdownOpen:je,maxSelectedValues:it,withinPortal:bt,portalProps:_n,switchDirectionOnFlip:pt,zIndex:Tn,selectOnBlur:kr,name:lt,dropdownPosition:Zn,errorProps:Jt,labelProps:ht,descriptionProps:xo,form:Yr,positionDependencies:ar,onKeyDown:Kr,unstyled:Bt,inputContainer:qr,inputWrapperOrder:pn,readOnly:wn,withAsterisk:Er,clearButtonProps:gt,hoverOnSearchChange:be,disableSelectedItemFiltering:De}=n,Jr=uue(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","portalProps","switchDirectionOnFlip","zIndex","selectOnBlur","name","dropdownPosition","errorProps","labelProps","descriptionProps","form","positionDependencies","onKeyDown","unstyled","inputContainer","inputWrapperOrder","readOnly","withAsterisk","clearButtonProps","hoverOnSearchChange","disableSelectedItemFiltering"]),{classes:Rt,cx:Zt,theme:$r}=sue({invalid:!!u},{name:"MultiSelect",classNames:f,styles:p,unstyled:Bt,size:c,variant:Y}),{systemStyles:xt,rest:nn}=Dl(Jr),Gn=_.useRef(),Aa=_.useRef({}),Yn=$a(O),[bn,Ft]=_.useState(K),[Gt,Xr]=_.useState(-1),[So,lr]=_.useState("column"),[cr,Hi]=go({value:U,defaultValue:"",finalValue:void 0,onChange:j}),[Es,ur]=_.useState(!1),{scrollIntoView:Oe,targetRef:Ba,scrollableRef:Yl}=G3({duration:0,offset:5,cancelable:!1,isList:!0}),Fa=ne&&typeof le=="function";let Se=null;const ct=w.map(Ie=>typeof Ie=="string"?{label:Ie,value:Ie}:Ie),rn=h3({data:ct}),[ze,Wi]=go({value:vN(v,w),defaultValue:vN(y,w),finalValue:[],onChange:P}),Qr=_.useRef(!!it&&it{if(!wn){const vt=ze.filter(xn=>xn!==Ie);Wi(vt),it&&vt.length{Hi(Ie.currentTarget.value),!F&&!Qr.current&&z&&Ft(!0)},x1=Ie=>{typeof R=="function"&&R(Ie),!F&&!Qr.current&&z&&Ft(!0)},on=Dce({data:rn,searchable:z,searchValue:cr,limit:Q,filter:X,value:ze,disableSelectedItemFiltering:De});Fa&&_e(cr,rn)&&(Se=le(cr),on.push({label:cr,value:cr,creatable:!0}));const Ui=Math.min(Gt,on.length-1),Va=(Ie,vt,xn)=>{let Fe=Ie;for(;xn(Fe);)if(Fe=vt(Fe),!on[Fe].disabled)return Fe;return Ie};Fn(()=>{Xr(be&&cr?0:-1)},[cr,be]),Fn(()=>{!F&&ze.length>w.length&&Ft(!1),it&&ze.length=it&&(Qr.current=!0,Ft(!1))},[ze]);const Kl=Ie=>{if(!wn)if(V&&Hi(""),ze.includes(Ie.value))np(Ie.value);else{if(Ie.creatable&&typeof Ne=="function"){const vt=Ne(Ie.value);typeof vt<"u"&&vt!==null&&Wi(typeof vt=="string"?[...ze,vt]:[...ze,vt.value])}else Wi([...ze,Ie.value]);ze.length===it-1&&(Qr.current=!0,Ft(!1)),on.length===1&&Ft(!1)}},S1=Ie=>{typeof B=="function"&&B(Ie),kr&&on[Ui]&&bn&&Kl(on[Ui]),Z&&Hi(""),Ft(!1)},P1=Ie=>{if(Es||(Kr?.(Ie),wn)||Ie.key!=="Backspace"&&it&&Qr.current)return;const vt=So==="column",xn=()=>{Xr(ut=>{var Mr;const Po=Va(ut,Nr=>Nr+1,Nr=>Nr{Xr(ut=>{var Mr;const Po=Va(ut,Nr=>Nr-1,Nr=>Nr>0);return bn&&(Ba.current=Aa.current[(Mr=on[Po])==null?void 0:Mr.value],Oe({alignment:vt?"start":"end"})),Po})};switch(Ie.key){case"ArrowUp":{Ie.preventDefault(),Ft(!0),vt?Fe():xn();break}case"ArrowDown":{Ie.preventDefault(),Ft(!0),vt?xn():Fe();break}case"Enter":{Ie.preventDefault(),on[Ui]&&bn?Kl(on[Ui]):Ft(!0);break}case" ":{z||(Ie.preventDefault(),on[Ui]&&bn?Kl(on[Ui]):Ft(!0));break}case"Backspace":{ze.length>0&&cr.length===0&&(Wi(ze.slice(0,-1)),Ft(!0),it&&(Qr.current=!1));break}case"Home":{if(!z){Ie.preventDefault(),bn||Ft(!0);const ut=on.findIndex(Mr=>!Mr.disabled);Xr(ut),Oe({alignment:vt?"end":"start"})}break}case"End":{if(!z){Ie.preventDefault(),bn||Ft(!0);const ut=on.map(Mr=>!!Mr.disabled).lastIndexOf(!1);Xr(ut),Oe({alignment:vt?"end":"start"})}break}case"Escape":Ft(!1)}},O1=ze.map(Ie=>{let vt=rn.find(xn=>xn.value===Ie&&!xn.disabled);return!vt&&Fa&&(vt={value:Ie,label:Ie}),vt}).filter(Ie=>!!Ie).map((Ie,vt)=>k.createElement(x,gN(cc({},Ie),{variant:Y,disabled:F,className:Rt.value,readOnly:wn,onRemove:xn=>{xn.preventDefault(),xn.stopPropagation(),np(Ie.value)},key:Ie.value,size:c,styles:p,classNames:f,radius:ee,index:vt}))),C1=Ie=>ze.includes(Ie),Lu=()=>{var Ie;Hi(""),Wi([]),(Ie=Gn.current)==null||Ie.focus(),it&&(Qr.current=!1)},si=!wn&&(on.length>0?bn:bn&&!!I);return Fn(()=>{const Ie=si?je:Te;typeof Ie=="function"&&Ie()},[si]),k.createElement(et.Wrapper,cc(cc({required:i,id:Yn,label:s,error:u,description:a,size:c,className:r,style:o,classNames:f,styles:p,__staticSelector:"MultiSelect",sx:we,errorProps:Jt,descriptionProps:xo,labelProps:ht,inputContainer:qr,inputWrapperOrder:pn,unstyled:Bt,withAsterisk:Er,variant:Y},xt),g),k.createElement(ha,{opened:si,transitionProps:E,shadow:"sm",withinPortal:bt,portalProps:_n,__staticSelector:"MultiSelect",onDirectionChange:lr,switchDirectionOnFlip:pt,zIndex:Tn,dropdownPosition:Zn,positionDependencies:[...ar,cr],classNames:f,styles:p,unstyled:Bt,variant:Y},k.createElement(ha.Target,null,k.createElement("div",{className:Rt.wrapper,role:"combobox","aria-haspopup":"listbox","aria-owns":bn&&si?`${Yn}-items`:null,"aria-controls":Yn,"aria-expanded":bn,onMouseLeave:()=>Xr(-1),tabIndex:-1},k.createElement("input",{type:"hidden",name:lt,value:ze.join(","),form:Yr,disabled:F}),k.createElement(et,cc({__staticSelector:"MultiSelect",style:{overflow:"hidden"},component:"div",multiline:!0,size:c,variant:Y,disabled:F,error:u,required:i,radius:ee,icon:fe,unstyled:Bt,onMouseDown:Ie=>{var vt;Ie.preventDefault(),!F&&!Qr.current&&Ft(!bn),(vt=Gn.current)==null||vt.focus()},classNames:gN(cc({},f),{input:Zt({[Rt.input]:!z},f?.input)})},O6({theme:$r,rightSection:ie,rightSectionWidth:J,styles:p,size:c,shouldClear:H&&ze.length>0,onClear:Lu,error:u,disabled:F,clearButtonProps:gt,readOnly:wn})),k.createElement("div",{className:Rt.values,"data-clearable":H||void 0},O1,k.createElement("input",cc({ref:ws(t,Gn),type:"search",id:Yn,className:Zt(Rt.searchInput,{[Rt.searchInputPointer]:!z,[Rt.searchInputInputHidden]:!bn&&ze.length>0||!z&&ze.length>0,[Rt.searchInputEmpty]:ze.length===0}),onKeyDown:P1,value:cr,onChange:b1,onFocus:x1,onBlur:S1,readOnly:!z||Qr.current||wn,placeholder:ze.length===0?G:void 0,disabled:F,"data-mantine-stop-propagation":bn,autoComplete:"off",onCompositionStart:()=>ur(!0),onCompositionEnd:()=>ur(!1)},nn)))))),k.createElement(ha.Dropdown,{component:He||M0,maxHeight:$,direction:So,id:Yn,innerRef:Yl,__staticSelector:"MultiSelect",classNames:f,styles:p},k.createElement(iP,{data:on,hovered:Ui,classNames:f,styles:p,uuid:Yn,__staticSelector:"MultiSelect",onItemHover:Xr,onItemSelect:Kl,itemsRefs:Aa,itemComponent:S,size:c,nothingFound:I,isItemSelected:C1,creatable:ne&&!!Se,createLabel:Se,unstyled:Bt,variant:Y}))))});TP.displayName="@mantine/core/MultiSelect";const hue=(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 yN({direction:e,size:t}){return k.createElement("svg",{style:{width:M(t),height:M(t),transform:e==="up"?"rotate(180deg)":void 0},viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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 E6={xs:M(20),sm:M(24),md:M(30),lg:M(34),xl:M(36)};var mue=ue((e,{radius:t},{size:n})=>({rightSection:{display:"flex",flexDirection:"column",height:`calc(100% - ${M(2)})`,margin:M(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:re({size:n,sizes:E6}),padding:0,WebkitTapHighlightColor:"transparent",borderBottom:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,borderLeft:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,borderTop:0,borderRight:0,backgroundColor:"transparent",marginRight:M(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 gue=mue;var vue=Object.defineProperty,yue=Object.defineProperties,_ue=Object.getOwnPropertyDescriptors,vv=Object.getOwnPropertySymbols,$6=Object.prototype.hasOwnProperty,M6=Object.prototype.propertyIsEnumerable,_N=(e,t,n)=>t in e?vue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,H_=(e,t)=>{for(var n in t||(t={}))$6.call(t,n)&&_N(e,n,t[n]);if(vv)for(var n of vv(t))M6.call(t,n)&&_N(e,n,t[n]);return e},wue=(e,t)=>yue(e,_ue(t)),bue=(e,t)=>{var n={};for(var r in e)$6.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&&M6.call(e,r)&&(n[r]=e[r]);return n};const xue={type:"text",size:"sm",__staticSelector:"TextInput"},yn=_.forwardRef((e,t)=>{const n=xP("TextInput",xue,e),{inputProps:r,wrapperProps:o}=n,i=bue(n,["inputProps","wrapperProps"]);return k.createElement(et.Wrapper,H_({},o),k.createElement(et,wue(H_(H_({},r),i),{ref:t})))});yn.displayName="@mantine/core/TextInput";var Sue=Object.defineProperty,Pue=Object.defineProperties,Oue=Object.getOwnPropertyDescriptors,yv=Object.getOwnPropertySymbols,N6=Object.prototype.hasOwnProperty,T6=Object.prototype.propertyIsEnumerable,wN=(e,t,n)=>t in e?Sue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cue=(e,t)=>{for(var n in t||(t={}))N6.call(t,n)&&wN(e,n,t[n]);if(yv)for(var n of yv(t))T6.call(t,n)&&wN(e,n,t[n]);return e},kue=(e,t)=>Pue(e,Oue(t)),Eue=(e,t)=>{var n={};for(var r in e)N6.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&&T6.call(e,r)&&(n[r]=e[r]);return n};const $ue=e=>e||"",Mue=e=>{if(e==="-")return e;let t=e;t[0]==="."&&(t=`0${e}`);const n=parseFloat(t);return Number.isNaN(n)?"":e},bN={xs:M(10),sm:M(14),md:M(16),lg:M(18),xl:M(20)},Nue={step:1,hideControls:!1,size:"sm",precision:0,noClampOnBlur:!1,removeTrailingZeros:!1,decimalSeparator:".",formatter:$ue,parser:Mue,type:"text"},ma=_.forwardRef((e,t)=>{const n=ae("NumberInput",Nue,e),{readOnly:r,disabled:o,value:i,onChange:s,decimalSeparator:a,thousandsSeparator:c,min:u,max:f,startValue:p,step:g,stepHoldInterval:v,stepHoldDelay:y,onFocus:w,onBlur:P,onKeyDown:x,onKeyUp:S,hideControls:O,radius:E,variant:$,precision:N,removeTrailingZeros:I,defaultValue:R,noClampOnBlur:B,handlersRef:z,classNames:G,styles:X,size:Q,rightSection:V,rightSectionWidth:H,formatter:Z,parser:Y,inputMode:j,unstyled:U,type:F}=n,K=Eue(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:ee,cx:fe}=gue({radius:E},{classNames:G,styles:X,unstyled:U,name:"NumberInput",variant:$,size:Q}),ie=be=>{if(be==="")return"";let De=be.toFixed(N);return I&&N>0&&(De=De.replace(new RegExp(`[0]{0,${N}}$`),""),De.endsWith(".")&&(De=De.slice(0,-1))),De},J=be=>{let De=be;return a&&(De=De.replace(".",a)),Z(De)},ne=be=>{let De=be;return a&&(De=De.replaceAll(c,"").replace(a,".")),Y(De)},le=be=>J(ie(be)),[_e,Ne]=_.useState(typeof i=="number"?i:typeof R=="number"?R:""),[we,He]=_.useState(()=>le(_e)),Te=_.useRef(),[je,it]=_.useState(!1),bt=(be,De)=>{if(!je||De){const Jr=le(be);Jr!==we&&He(Jr)}be!==_e&&Ne(be)},_n=typeof u=="number"?u:-1/0,pt=typeof f=="number"?f:1/0,Tn=_.useRef();Tn.current=()=>{var be;let De;_e===""?De=(be=p??u)!=null?be:0:De=parseFloat(ie(ia(_e+g,_n,pt))),bt(De,!0),s?.(De)};const kr=_.useRef();kr.current=()=>{var be;let De;_e===""?De=(be=p??u)!=null?be:0:De=parseFloat(ie(ia(_e-g,_n,pt))),bt(De,!0),s?.(De)},W3(z,{increment:Tn.current,decrement:kr.current}),_.useEffect(()=>{je||bt(i===void 0?_e:i,!0)},[i,je]);const lt=y!==void 0&&v!==void 0,Zn=_.useRef(null),Jt=_.useRef(0),ht=()=>{Zn.current&&window.clearTimeout(Zn.current),Zn.current=null,Jt.current=0},xo=be=>{be?Tn.current():kr.current(),Jt.current+=1},Yr=be=>{if(xo(be),lt){const De=typeof v=="number"?v:v(Jt.current);Zn.current=window.setTimeout(()=>Yr(be),De)}},ar=(be,De)=>{be.preventDefault(),Te.current.focus(),xo(De),lt&&(Zn.current=window.setTimeout(()=>Yr(De),y))};_.useEffect(()=>(ht(),ht),[]);const Kr=k.createElement("div",{className:ee.rightSection},k.createElement("button",{type:"button",tabIndex:-1,"aria-hidden":!0,disabled:_e>=f,className:fe(ee.control,ee.controlUp),onPointerDown:be=>{ar(be,!0)},onPointerUp:ht,onPointerLeave:ht},k.createElement(yN,{size:re({size:Q,sizes:bN}),direction:"up"})),k.createElement("button",{type:"button",tabIndex:-1,"aria-hidden":!0,disabled:_e<=u,className:fe(ee.control,ee.controlDown),onPointerDown:be=>{ar(be,!1)},onPointerUp:ht,onPointerLeave:ht},k.createElement(yN,{size:re({size:Q,sizes:bN}),direction:"down"}))),Bt=be=>{let De=be;(De[0]===`${a}`||De[0]===".")&&(De=`0${De}`);const Jr=parseFloat(ie(parseFloat(ne(De)))),Rt=B?Jr:ia(Jr,_n,pt),Zt=Number.isNaN(Rt)?"":Rt,$r=_e!==Zt;He(be),bt(Zt),$r&&s?.(Zt)},qr=be=>{be.nativeEvent.isComposing||Bt(be.target.value)},pn=be=>{it(!0),w?.(be)},wn=be=>{it(!1),P?.(be)},Er=be=>{if(typeof x=="function"&&x(be),be.repeat&<&&(be.key==="ArrowUp"||be.key==="ArrowDown")){be.preventDefault();return}r||(be.key==="ArrowUp"?ar(be,!0):be.key==="ArrowDown"&&ar(be,!1))},gt=be=>{typeof S=="function"&&S(be),(be.key==="ArrowUp"||be.key==="ArrowDown")&&ht()};return k.createElement(yn,kue(Cue({},K),{type:F,variant:$,value:we,disabled:o,readOnly:r,ref:ws(Te,t),onChange:qr,onFocus:pn,onBlur:wn,onKeyDown:Er,onKeyUp:gt,rightSection:V||(o||r||O||$==="unstyled"?null:Kr),rightSectionWidth:H??`calc(${re({size:Q,sizes:E6})} + ${M(1)})`,radius:E,max:f,min:u,step:g,size:Q,styles:X,classNames:G,inputMode:j||hue(g,N,TG()),__staticSelector:"NumberInput",unstyled:U}))});ma.displayName="@mantine/core/NumberInput";const I6=_.createContext(!1),Tue=I6.Provider,Iue=()=>_.useContext(I6);function j6({children:e,openDelay:t=0,closeDelay:n=0}){return k.createElement(Tue,{value:!0},k.createElement(HQ,{delay:{open:t,close:n}},e))}j6.displayName="@mantine/core/TooltipGroup";var jue=Object.defineProperty,Lue=Object.defineProperties,Due=Object.getOwnPropertyDescriptors,xN=Object.getOwnPropertySymbols,Rue=Object.prototype.hasOwnProperty,zue=Object.prototype.propertyIsEnumerable,SN=(e,t,n)=>t in e?jue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,PN=(e,t)=>{for(var n in t||(t={}))Rue.call(t,n)&&SN(e,n,t[n]);if(xN)for(var n of xN(t))zue.call(t,n)&&SN(e,n,t[n]);return e},Aue=(e,t)=>Lue(e,Due(t));function Bue(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 Fue=ue((e,{color:t,radius:n,width:r,multiline:o})=>({tooltip:Aue(PN(PN({},e.fn.fontStyles()),Bue(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 L6=Fue,D6={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 Vue({offset:e,position:t}){const[n,r]=_.useState(!1),o=_.useRef(),{x:i,y:s,reference:a,floating:c,refs:u,update:f,placement:p}=_P({placement:t,middleware:[pP({crossAxis:!0,padding:5,rootBoundary:"document"})]}),g=p.includes("right")?e:t.includes("left")?e*-1:0,v=p.includes("bottom")?e:t.includes("top")?e*-1:0,y=_.useCallback(({clientX:w,clientY:P})=>{a({getBoundingClientRect(){return{width:0,height:0,x:w,y:P,left:w+g,top:P+v,right:w,bottom:P}}})},[a]);return _.useEffect(()=>{if(u.floating.current){const w=o.current;w.addEventListener("mousemove",y);const P=us(u.floating.current);return P.forEach(x=>{x.addEventListener("scroll",f)}),()=>{w.removeEventListener("mousemove",y),P.forEach(x=>{x.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 Hue=Object.defineProperty,Wue=Object.defineProperties,Uue=Object.getOwnPropertyDescriptors,_v=Object.getOwnPropertySymbols,R6=Object.prototype.hasOwnProperty,z6=Object.prototype.propertyIsEnumerable,ON=(e,t,n)=>t in e?Hue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rh=(e,t)=>{for(var n in t||(t={}))R6.call(t,n)&&ON(e,n,t[n]);if(_v)for(var n of _v(t))z6.call(t,n)&&ON(e,n,t[n]);return e},oh=(e,t)=>Wue(e,Uue(t)),Zue=(e,t)=>{var n={};for(var r in e)R6.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&&z6.call(e,r)&&(n[r]=e[r]);return n};const Gue={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:ii("popover")};function A6(e){var t;const n=ae("TooltipFloating",Gue,e),{children:r,refProp:o,withinPortal:i,portalProps:s,style:a,className:c,classNames:u,styles:f,unstyled:p,radius:g,color:v,label:y,offset:w,position:P,multiline:x,width:S,zIndex:O,disabled:E,variant:$}=n,N=Zue(n,["children","refProp","withinPortal","portalProps","style","className","classNames","styles","unstyled","radius","color","label","offset","position","multiline","width","zIndex","disabled","variant"]),{handleMouseMove:I,x:R,y:B,opened:z,boundaryRef:G,floating:X,setOpened:Q}=Vue({offset:w,position:P}),{classes:V,cx:H}=L6({radius:g,color:v,multiline:x,width:S},{name:"TooltipFloating",classNames:u,styles:f,unstyled:p,variant:$});if(!Nf(r))throw new Error(D6.children);const Z=ws(G,r.ref),Y=U=>{var F,K;(K=(F=r.props).onMouseEnter)==null||K.call(F,U),I(U),Q(!0)},j=U=>{var F,K;(K=(F=r.props).onMouseLeave)==null||K.call(F,U),Q(!1)};return k.createElement(k.Fragment,null,k.createElement(Af,oh(rh({},s),{withinPortal:i}),k.createElement(Pe,oh(rh({},N),{ref:X,className:H(V.tooltip,c),style:oh(rh({},a),{zIndex:O,display:!E&&z?"block":"none",top:B??"",left:(t=Math.round(R))!=null?t:""})}),y)),_.cloneElement(r,oh(rh({},r.props),{[o]:Z,onMouseEnter:Y,onMouseLeave:j})))}A6.displayName="@mantine/core/TooltipFloating";function Yue(e){const[t,n]=_.useState(!1),o=typeof e.opened=="boolean"?e.opened:t,i=Iue(),s=$a(),{delay:a,currentId:c,setCurrentId:u}=Sz(),f=_.useCallback(R=>{n(R),R&&u(s)},[u,s]),{x:p,y:g,reference:v,floating:y,context:w,refs:P,update:x,placement:S,middlewareData:{arrow:{x:O,y:E}={}}}=_P({placement:e.position,open:o,onOpenChange:f,middleware:[uz(e.offset),pP({padding:8}),az(),yz({element:e.arrowRef,padding:e.arrowOffset}),...e.inline?[cz()]:[]]}),{getReferenceProps:$,getFloatingProps:N}=tee([VQ(w,{enabled:e.events.hover,delay:i?a:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events.touch}),QQ(w,{enabled:e.events.focus,keyboardOnly:!0}),eee(w,{role:"tooltip"}),XQ(w,{enabled:typeof e.opened===void 0}),WQ(w,{id:s})]);return Oz({opened:o,position:e.position,positionDependencies:e.positionDependencies,floating:{refs:P,update:x}}),Fn(()=>{var R;(R=e.onPositionChange)==null||R.call(e,S)},[S]),{x:p,y:g,arrowX:O,arrowY:E,reference:v,floating:y,getFloatingProps:N,getReferenceProps:$,isGroupPhase:o&&c&&c!==s,opened:o,placement:S}}var Kue=Object.defineProperty,que=Object.defineProperties,Jue=Object.getOwnPropertyDescriptors,wv=Object.getOwnPropertySymbols,B6=Object.prototype.hasOwnProperty,F6=Object.prototype.propertyIsEnumerable,CN=(e,t,n)=>t in e?Kue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ya=(e,t)=>{for(var n in t||(t={}))B6.call(t,n)&&CN(e,n,t[n]);if(wv)for(var n of wv(t))F6.call(t,n)&&CN(e,n,t[n]);return e},W_=(e,t)=>que(e,Jue(t)),Xue=(e,t)=>{var n={};for(var r in e)B6.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&&F6.call(e,r)&&(n[r]=e[r]);return n};const Que={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:ii("popover"),positionDependencies:[]},I0=_.forwardRef((e,t)=>{var n;const r=_.useRef(null),o=ae("Tooltip",Que,e),{children:i,position:s,refProp:a,label:c,openDelay:u,closeDelay:f,onPositionChange:p,opened:g,withinPortal:v,portalProps:y,radius:w,color:P,classNames:x,styles:S,unstyled:O,style:E,className:$,withArrow:N,arrowSize:I,arrowOffset:R,arrowRadius:B,arrowPosition:z,offset:G,transitionProps:X,multiline:Q,width:V,events:H,zIndex:Z,disabled:Y,positionDependencies:j,onClick:U,onMouseEnter:F,onMouseLeave:K,inline:ee,variant:fe,keepMounted:ie}=o,J=Xue(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:le,theme:_e}=L6({radius:w,color:P,width:V,multiline:Q},{name:"Tooltip",classNames:x,styles:S,unstyled:O,variant:fe}),Ne=Yue({position:Dz(_e.dir,s),closeDelay:f,openDelay:u,onPositionChange:p,opened:g,events:H,arrowRef:r,arrowOffset:R,offset:G+(N?I/2:0),positionDependencies:[...j,i],inline:ee});if(!Nf(i))throw new Error(D6.children);const we=ws(Ne.reference,i.ref,t);return k.createElement(k.Fragment,null,k.createElement(Af,W_(Ya({},y),{withinPortal:v}),k.createElement(Os,W_(Ya({keepMounted:ie,mounted:!Y&&Ne.opened},X),{transition:X.transition||"fade",duration:Ne.isGroupPhase?10:(n=X.duration)!=null?n:100}),He=>{var Te,je;return k.createElement(Pe,Ya(Ya({},J),Ne.getFloatingProps({ref:Ne.floating,className:ne.tooltip,style:W_(Ya(Ya({},E),He),{zIndex:Z,top:(Te=Ne.y)!=null?Te:0,left:(je=Ne.x)!=null?je:0})})),c,k.createElement(bP,{ref:r,arrowX:Ne.arrowX,arrowY:Ne.arrowY,visible:N,position:Ne.placement,arrowSize:I,arrowOffset:R,arrowRadius:B,arrowPosition:z,className:ne.arrow}))})),_.cloneElement(i,Ne.getReferenceProps(Ya({onClick:U,onMouseEnter:F,onMouseLeave:K,onMouseMove:e.onMouseMove,onPointerDown:e.onPointerDown,onPointerEnter:e.onPointerEnter,[a]:we,className:le($,i.props.className)},i.props))))});I0.Group=j6;I0.Floating=A6;I0.displayName="@mantine/core/Tooltip";const At=I0;function ede({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 tde=ue(()=>({input:{"&:not(:disabled)":{cursor:"pointer","&::selection":{backgroundColor:"transparent"}}}}));const nde=tde;var rde=Object.defineProperty,ode=Object.defineProperties,ide=Object.getOwnPropertyDescriptors,bv=Object.getOwnPropertySymbols,V6=Object.prototype.hasOwnProperty,H6=Object.prototype.propertyIsEnumerable,kN=(e,t,n)=>t in e?rde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cd=(e,t)=>{for(var n in t||(t={}))V6.call(t,n)&&kN(e,n,t[n]);if(bv)for(var n of bv(t))H6.call(t,n)&&kN(e,n,t[n]);return e},U_=(e,t)=>ode(e,ide(t)),sde=(e,t)=>{var n={};for(var r in e)V6.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&&H6.call(e,r)&&(n[r]=e[r]);return n};function ade(e,t){return t.label.toLowerCase().trim().includes(e.toLowerCase().trim())}function lde(e,t){return!!e&&!t.some(n=>n.label.toLowerCase()===e.toLowerCase())}const cde={required:!1,size:"sm",shadow:"sm",itemComponent:sP,transitionProps:{transition:"fade",duration:0},initiallyOpened:!1,filter:ade,maxDropdownHeight:220,searchable:!1,clearable:!1,limit:1/0,disabled:!1,creatable:!1,shouldCreate:lde,selectOnBlur:!1,switchDirectionOnFlip:!1,filterDataOnExactSearchMatch:!1,zIndex:ii("popover"),positionDependencies:[],dropdownPosition:"flip"},Nl=_.forwardRef((e,t)=>{const n=xP("Select",cde,e),{inputProps:r,wrapperProps:o,shadow:i,data:s,value:a,defaultValue:c,onChange:u,itemComponent:f,onKeyDown:p,onBlur:g,onFocus:v,transitionProps:y,initiallyOpened:w,unstyled:P,classNames:x,styles:S,filter:O,maxDropdownHeight:E,searchable:$,clearable:N,nothingFound:I,limit:R,disabled:B,onSearchChange:z,searchValue:G,rightSection:X,rightSectionWidth:Q,creatable:V,getCreateLabel:H,shouldCreate:Z,selectOnBlur:Y,onCreate:j,dropdownComponent:U,onDropdownClose:F,onDropdownOpen:K,withinPortal:ee,portalProps:fe,switchDirectionOnFlip:ie,zIndex:J,name:ne,dropdownPosition:le,allowDeselect:_e,placeholder:Ne,filterDataOnExactSearchMatch:we,form:He,positionDependencies:Te,readOnly:je,clearButtonProps:it,hoverOnSearchChange:bt}=n,_n=sde(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:Tn,theme:kr}=nde(),[lt,Zn]=_.useState(w),[Jt,ht]=_.useState(-1),xo=_.useRef(),Yr=_.useRef({}),[ar,Kr]=_.useState("column"),Bt=ar==="column",{scrollIntoView:qr,targetRef:pn,scrollableRef:wn}=G3({duration:0,offset:5,cancelable:!1,isList:!0}),Er=_e===void 0?N:_e,gt=Se=>{if(lt!==Se){Zn(Se);const ct=Se?K:F;typeof ct=="function"&&ct()}},be=V&&typeof H=="function";let De=null;const Jr=s.map(Se=>typeof Se=="string"?{label:Se,value:Se}:Se),Rt=h3({data:Jr}),[Zt,$r,xt]=go({value:a,defaultValue:c,finalValue:null,onChange:u}),nn=Rt.find(Se=>Se.value===Zt),[Gn,Aa]=go({value:G,defaultValue:nn?.label||"",finalValue:void 0,onChange:z}),Yn=Se=>{Aa(Se),$&&typeof z=="function"&&z(Se)},bn=()=>{var Se;je||($r(null),xt||Yn(""),(Se=xo.current)==null||Se.focus())};_.useEffect(()=>{const Se=Rt.find(ct=>ct.value===Zt);Se?Yn(Se.label):(!be||!Zt)&&Yn("")},[Zt]),_.useEffect(()=>{nn&&(!$||!lt)&&Yn(nn.label)},[nn?.label]);const Ft=Se=>{if(!je)if(Er&&nn?.value===Se.value)$r(null),gt(!1);else{if(Se.creatable&&typeof j=="function"){const ct=j(Se.value);typeof ct<"u"&&ct!==null&&$r(typeof ct=="string"?ct:ct.value)}else $r(Se.value);xt||Yn(Se.label),ht(-1),gt(!1),xo.current.focus()}},Gt=ede({data:Rt,searchable:$,limit:R,searchValue:Gn,filter:O,filterDataOnExactSearchMatch:we,value:Zt});be&&Z(Gn,Gt)&&(De=H(Gn),Gt.push({label:Gn,value:Gn,creatable:!0}));const Xr=(Se,ct,rn)=>{let ze=Se;for(;rn(ze);)if(ze=ct(ze),!Gt[ze].disabled)return ze;return Se};Fn(()=>{ht(bt&&Gn?0:-1)},[Gn,bt]);const So=Zt?Gt.findIndex(Se=>Se.value===Zt):0,lr=!je&&(Gt.length>0?lt:lt&&!!I),cr=()=>{ht(Se=>{var ct;const rn=Xr(Se,ze=>ze-1,ze=>ze>0);return pn.current=Yr.current[(ct=Gt[rn])==null?void 0:ct.value],lr&&qr({alignment:Bt?"start":"end"}),rn})},Hi=()=>{ht(Se=>{var ct;const rn=Xr(Se,ze=>ze+1,ze=>zewindow.setTimeout(()=>{var Se;pn.current=Yr.current[(Se=Gt[So])==null?void 0:Se.value],qr({alignment:Bt?"end":"start"})},50);Fn(()=>{lr&&Es()},[lr]);const ur=Se=>{switch(typeof p=="function"&&p(Se),Se.key){case"ArrowUp":{Se.preventDefault(),lt?Bt?cr():Hi():(ht(So),gt(!0),Es());break}case"ArrowDown":{Se.preventDefault(),lt?Bt?Hi():cr():(ht(So),gt(!0),Es());break}case"Home":{if(!$){Se.preventDefault(),lt||gt(!0);const ct=Gt.findIndex(rn=>!rn.disabled);ht(ct),lr&&qr({alignment:Bt?"end":"start"})}break}case"End":{if(!$){Se.preventDefault(),lt||gt(!0);const ct=Gt.map(rn=>!!rn.disabled).lastIndexOf(!1);ht(ct),lr&&qr({alignment:Bt?"end":"start"})}break}case"Escape":{Se.preventDefault(),gt(!1),ht(-1);break}case" ":{$||(Se.preventDefault(),Gt[Jt]&<?Ft(Gt[Jt]):(gt(!0),ht(So),Es()));break}case"Enter":$||Se.preventDefault(),Gt[Jt]&<&&(Se.preventDefault(),Ft(Gt[Jt]))}},Oe=Se=>{typeof g=="function"&&g(Se);const ct=Rt.find(rn=>rn.value===Zt);Y&&Gt[Jt]&<&&Ft(Gt[Jt]),Yn(ct?.label||""),gt(!1)},Ba=Se=>{typeof v=="function"&&v(Se),$&>(!0)},Yl=Se=>{je||(Yn(Se.currentTarget.value),N&&Se.currentTarget.value===""&&$r(null),ht(-1),gt(!0))},Fa=()=>{je||(gt(!lt),Zt&&!lt&&ht(So))};return k.createElement(et.Wrapper,U_(cd({},o),{__staticSelector:"Select"}),k.createElement(ha,{opened:lr,transitionProps:y,shadow:i,withinPortal:ee,portalProps:fe,__staticSelector:"Select",onDirectionChange:Kr,switchDirectionOnFlip:ie,zIndex:J,dropdownPosition:le,positionDependencies:[...Te,Gn],classNames:x,styles:S,unstyled:P,variant:r.variant},k.createElement(ha.Target,null,k.createElement("div",{role:"combobox","aria-haspopup":"listbox","aria-owns":lr?`${r.id}-items`:null,"aria-controls":r.id,"aria-expanded":lr,onMouseLeave:()=>ht(-1),tabIndex:-1},k.createElement("input",{type:"hidden",name:ne,value:Zt||"",form:He,disabled:B}),k.createElement(et,cd(U_(cd(cd({autoComplete:"off",type:"search"},r),_n),{ref:ws(t,xo),onKeyDown:ur,__staticSelector:"Select",value:Gn,placeholder:Ne,onChange:Yl,"aria-autocomplete":"list","aria-controls":lr?`${r.id}-items`:null,"aria-activedescendant":Jt>=0?`${r.id}-${Jt}`:null,onMouseDown:Fa,onBlur:Oe,onFocus:Ba,readOnly:!$||je,disabled:B,"data-mantine-stop-propagation":lr,name:null,classNames:U_(cd({},x),{input:Tn({[pt.input]:!$},x?.input)})}),O6({theme:kr,rightSection:X,rightSectionWidth:Q,styles:S,size:r.size,shouldClear:N&&!!nn,onClear:bn,error:o.error,clearButtonProps:it,disabled:B,readOnly:je}))))),k.createElement(ha.Dropdown,{component:U||M0,maxHeight:E,direction:ar,id:r.id,innerRef:wn,__staticSelector:"Select",classNames:x,styles:S},k.createElement(iP,{data:Gt,hovered:Jt,classNames:x,styles:S,isItemSelected:Se=>Se===Zt,uuid:r.id,__staticSelector:"Select",onItemHover:ht,onItemSelect:Ft,itemsRefs:Yr,itemComponent:f,size:r.size,nothingFound:I,creatable:be&&!!De,createLabel:De,"aria-label":o.label,unstyled:P,variant:r.variant}))))});Nl.displayName="@mantine/core/Select";function ude(e,t){if(t.length===0)return t;const n="maxWidth"in t[0]?"maxWidth":"minWidth",r=[...t].sort((o,i)=>Ro(re({size:i[n],sizes:e.breakpoints}))-Ro(re({size:o[n],sizes:e.breakpoints})));return n==="minWidth"?r.reverse():r}var dde=Object.defineProperty,EN=Object.getOwnPropertySymbols,fde=Object.prototype.hasOwnProperty,pde=Object.prototype.propertyIsEnumerable,$N=(e,t,n)=>t in e?dde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hde=(e,t)=>{for(var n in t||(t={}))fde.call(t,n)&&$N(e,n,t[n]);if(EN)for(var n of EN(t))pde.call(t,n)&&$N(e,n,t[n]);return e},mde=ue((e,{spacing:t,breakpoints:n,cols:r,verticalSpacing:o})=>{const i=o!=null,s=ude(e,n).reduce((a,c)=>{var u,f;const p="maxWidth"in c?"max-width":"min-width",g=re({size:p==="max-width"?c.maxWidth:c.minWidth,sizes:e.breakpoints,units:"em"}),v=Ro(g)-(p==="max-width"?1:0);return a[`@media (${p}: ${ba(v)})`]={gridTemplateColumns:`repeat(${c.cols}, minmax(0, 1fr))`,gap:`${re({size:(u=c.verticalSpacing)!=null?u:i?o:t,sizes:e.spacing})} ${re({size:(f=c.spacing)!=null?f:t,sizes:e.spacing})}`},a},{});return{root:hde({boxSizing:"border-box",display:"grid",gridTemplateColumns:`repeat(${r}, minmax(0, 1fr))`,gap:`${re({size:i?o:t,sizes:e.spacing})} ${re({size:t,sizes:e.spacing})}`},s)}});const gde=mde;var vde=Object.defineProperty,xv=Object.getOwnPropertySymbols,W6=Object.prototype.hasOwnProperty,U6=Object.prototype.propertyIsEnumerable,MN=(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={}))W6.call(t,n)&&MN(e,n,t[n]);if(xv)for(var n of xv(t))U6.call(t,n)&&MN(e,n,t[n]);return e},_de=(e,t)=>{var n={};for(var r in e)W6.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&&U6.call(e,r)&&(n[r]=e[r]);return n};const wde={breakpoints:[],cols:1,spacing:"md"},IP=_.forwardRef((e,t)=>{const n=ae("SimpleGrid",wde,e),{className:r,breakpoints:o,cols:i,spacing:s,verticalSpacing:a,children:c,unstyled:u,variant:f}=n,p=_de(n,["className","breakpoints","cols","spacing","verticalSpacing","children","unstyled","variant"]),{classes:g,cx:v}=gde({breakpoints:o,cols:i,spacing:s,verticalSpacing:a},{name:"SimpleGrid",unstyled:u,variant:f});return k.createElement(Pe,yde({className:v(g.root,r),ref:t},p),c)});IP.displayName="@mantine/core/SimpleGrid";var bde=ue((e,{spacing:t,align:n,justify:r})=>({root:{display:"flex",flexDirection:"column",alignItems:n,justifyContent:r,gap:re({size:t,sizes:e.spacing})}}));const xde=bde;var Sde=Object.defineProperty,Sv=Object.getOwnPropertySymbols,Z6=Object.prototype.hasOwnProperty,G6=Object.prototype.propertyIsEnumerable,NN=(e,t,n)=>t in e?Sde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pde=(e,t)=>{for(var n in t||(t={}))Z6.call(t,n)&&NN(e,n,t[n]);if(Sv)for(var n of Sv(t))G6.call(t,n)&&NN(e,n,t[n]);return e},Ode=(e,t)=>{var n={};for(var r in e)Z6.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&&G6.call(e,r)&&(n[r]=e[r]);return n};const Cde={spacing:"md",align:"stretch",justify:"flex-start"},Je=_.forwardRef((e,t)=>{const n=ae("Stack",Cde,e),{spacing:r,className:o,align:i,justify:s,unstyled:a,variant:c}=n,u=Ode(n,["spacing","className","align","justify","unstyled","variant"]),{classes:f,cx:p}=xde({spacing:r,align:i,justify:s},{name:"Stack",unstyled:a,variant:c});return k.createElement(Pe,Pde({className:p(f.root,o),ref:t},u))});Je.displayName="@mantine/core/Stack";const Y6=_.createContext(null),kde=Y6.Provider,Ede=()=>_.useContext(Y6);var $de=Object.defineProperty,Pv=Object.getOwnPropertySymbols,K6=Object.prototype.hasOwnProperty,q6=Object.prototype.propertyIsEnumerable,TN=(e,t,n)=>t in e?$de(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,IN=(e,t)=>{for(var n in t||(t={}))K6.call(t,n)&&TN(e,n,t[n]);if(Pv)for(var n of Pv(t))q6.call(t,n)&&TN(e,n,t[n]);return e},Mde=(e,t)=>{var n={};for(var r in e)K6.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&&q6.call(e,r)&&(n[r]=e[r]);return n};const Nde={size:"sm"},J6=_.forwardRef((e,t)=>{const n=ae("SwitchGroup",Nde,e),{children:r,value:o,defaultValue:i,onChange:s,size:a,wrapperProps:c}=n,u=Mde(n,["children","value","defaultValue","onChange","size","wrapperProps"]),[f,p]=go({value:o,defaultValue:i,finalValue:[],onChange:s}),g=v=>{const y=v.currentTarget.value;p(f.includes(y)?f.filter(w=>w!==y):[...f,y])};return k.createElement(kde,{value:{value:f,onChange:g,size:a}},k.createElement(et.Wrapper,IN(IN({labelElement:"div",size:a,__staticSelector:"SwitchGroup",ref:t},c),u),r))});J6.displayName="@mantine/core/SwitchGroup";var Tde=Object.defineProperty,Ide=Object.defineProperties,jde=Object.getOwnPropertyDescriptors,jN=Object.getOwnPropertySymbols,Lde=Object.prototype.hasOwnProperty,Dde=Object.prototype.propertyIsEnumerable,LN=(e,t,n)=>t in e?Tde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rde=(e,t)=>{for(var n in t||(t={}))Lde.call(t,n)&&LN(e,n,t[n]);if(jN)for(var n of jN(t))Dde.call(t,n)&&LN(e,n,t[n]);return e},zde=(e,t)=>Ide(e,jde(t));const Ade={xs:M(16),sm:M(20),md:M(24),lg:M(30),xl:M(36)},Bde={xs:M(32),sm:M(38),md:M(46),lg:M(56),xl:M(72)},Fde={xs:M(12),sm:M(14),md:M(18),lg:M(22),xl:M(28)},Vde={xs:M(5),sm:M(6),md:M(7),lg:M(9),xl:M(11)},Hde={xs:M(4),sm:M(5),md:M(6),lg:M(8),xl:M(10)};var Wde=ue((e,{radius:t,color:n,labelPosition:r,error:o},{size:i})=>{const s=re({size:i,sizes:Fde}),a=re({size:t,sizes:e.radius}),c=e.fn.variant({variant:"filled",color:n}),u=re({size:i,sizes:Bde}),f=M(i==="xs"?1:2),p=e.fn.variant({variant:"filled",color:"red"}).background;return{root:{position:"relative"},input:{height:0,width:0,overflow:"hidden",whiteSpace:"nowrap",padding:0,WebkitClipPath:"inset(50%)",clipPath:"inset(50%)",position:"absolute"},track:zde(Rde({},e.fn.focusStyles("input:focus + &")),{cursor:e.cursorType,overflow:"hidden",WebkitTapHighlightColor:"transparent",position:"relative",borderRadius:a,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[2],border:`${M(1)} solid ${o?p:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,height:re({size:i,sizes:Ade}),minWidth:u,margin:0,transitionProperty:"background-color, border-color",transitionTimingFunction:e.transitionTimingFunction,transitionDuration:"150ms",boxSizing:"border-box",appearance:"none",display:"flex",alignItems:"center",fontSize:re({size:i,sizes:Vde}),fontWeight:600,order:r==="left"?2:1,userSelect:"none",zIndex:0,lineHeight:0,color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[6],transition:`color 150ms ${e.transitionTimingFunction}`,"input:checked + &":{backgroundColor:c.background,borderColor:c.background,color:e.white,transition:`color 150ms ${e.transitionTimingFunction}`},"input:disabled + &":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],borderColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],cursor:"not-allowed",pointerEvents:"none"}}),thumb:{position:"absolute",zIndex:1,borderRadius:a,boxSizing:"border-box",display:"flex",backgroundColor:e.white,height:s,width:s,border:`${M(1)} solid ${e.colorScheme==="dark"?e.white:e.colors.gray[3]}`,left:f,transition:`left 150ms ${e.transitionTimingFunction}`,"& > *":{margin:"auto"},"@media (prefers-reduced-motion)":{transitionDuration:e.respectReducedMotion?"0ms":""},"input:checked + * > &":{left:`calc(100% - ${s} - ${f})`,borderColor:e.white},"input:disabled + * > &":{borderColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],backgroundColor:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[0]}},trackLabel:{height:"100%",display:"grid",placeContent:"center",minWidth:`calc(${u} - ${s})`,paddingInline:re({size:i,sizes:Hde}),marginLeft:`calc(${s} + ${f})`,transition:`margin 150ms ${e.transitionTimingFunction}`,"input:checked + * > &":{marginLeft:0,marginRight:`calc(${s} + ${f})`}}}});const Ude=Wde;var Zde=Object.defineProperty,Gde=Object.defineProperties,Yde=Object.getOwnPropertyDescriptors,Ov=Object.getOwnPropertySymbols,X6=Object.prototype.hasOwnProperty,Q6=Object.prototype.propertyIsEnumerable,DN=(e,t,n)=>t in e?Zde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Z_=(e,t)=>{for(var n in t||(t={}))X6.call(t,n)&&DN(e,n,t[n]);if(Ov)for(var n of Ov(t))Q6.call(t,n)&&DN(e,n,t[n]);return e},Kde=(e,t)=>Gde(e,Yde(t)),qde=(e,t)=>{var n={};for(var r in e)X6.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&&Q6.call(e,r)&&(n[r]=e[r]);return n};const Jde={offLabel:"",onLabel:"",size:"sm",radius:"xl",error:!1},Ld=_.forwardRef((e,t)=>{var n;const r=ae("Switch",Jde,e),{className:o,color:i,label:s,offLabel:a,onLabel:c,id:u,style:f,size:p,radius:g,wrapperProps:v,children:y,unstyled:w,styles:P,classNames:x,thumbIcon:S,sx:O,checked:E,defaultChecked:$,onChange:N,labelPosition:I,description:R,error:B,disabled:z,variant:G}=r,X=qde(r,["className","color","label","offLabel","onLabel","id","style","size","radius","wrapperProps","children","unstyled","styles","classNames","thumbIcon","sx","checked","defaultChecked","onChange","labelPosition","description","error","disabled","variant"]),Q=Ede(),V=Q?.size||p,{classes:H,cx:Z}=Ude({color:i,radius:g,labelPosition:I,error:!!B},{name:"Switch",classNames:x,styles:P,unstyled:w,size:V,variant:G}),{systemStyles:Y,rest:j}=Dl(X),U=$a(u),F=Q?{checked:Q.value.includes(j.value),onChange:Q.onChange}:{},[K,ee]=go({value:(n=F.checked)!=null?n:E,defaultValue:$,finalValue:!1});return k.createElement($P,Z_(Z_({className:Z(o,H.root),sx:O,style:f,id:U,size:Q?.size||p,labelPosition:I,label:s,description:R,error:B,disabled:z,__staticSelector:"Switch",classNames:x,styles:P,unstyled:w,"data-checked":F.checked||void 0,variant:G},Y),v),k.createElement("input",Kde(Z_({},j),{disabled:z,checked:K,onChange:fe=>{Q?F.onChange(fe):N?.(fe),ee(fe.currentTarget.checked)},id:U,ref:t,type:"checkbox",className:H.input})),k.createElement("label",{htmlFor:U,className:H.track},k.createElement("div",{className:H.thumb},S),k.createElement("div",{className:H.trackLabel},K?c:a)))});Ld.displayName="@mantine/core/Switch";Ld.Group=J6;var Xde=Object.defineProperty,Qde=Object.defineProperties,efe=Object.getOwnPropertyDescriptors,RN=Object.getOwnPropertySymbols,tfe=Object.prototype.hasOwnProperty,nfe=Object.prototype.propertyIsEnumerable,zN=(e,t,n)=>t in e?Xde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rfe=(e,t)=>{for(var n in t||(t={}))tfe.call(t,n)&&zN(e,n,t[n]);if(RN)for(var n of RN(t))nfe.call(t,n)&&zN(e,n,t[n]);return e},ofe=(e,t)=>Qde(e,efe(t)),ife=ue((e,{captionSide:t,horizontalSpacing:n,verticalSpacing:r,fontSize:o,withBorder:i,withColumnBorders:s})=>{const a=`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`;return{root:ofe(rfe({},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:re({size:o,sizes:e.fontSizes}),padding:`${re({size:r,sizes:e.spacing})} ${re({size:n,sizes:e.spacing})}`},"& > thead > tr > th":{borderBottom:a},"& > tfoot > tr > th, & > tbody > tr > th":{borderTop:a},"& > tbody > tr > td":{padding:`${re({size:r,sizes:e.spacing})} ${re({size:n,sizes:e.spacing})}`,borderTop:a,fontSize:re({size:o,sizes:e.fontSizes})},"& > tbody > tr:first-of-type > td, & > tbody > tr:first-of-type > th":{borderTop:"none"},"& > thead > tr > th, & > tbody > tr > 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 sfe=ife;var afe=Object.defineProperty,lfe=Object.defineProperties,cfe=Object.getOwnPropertyDescriptors,Cv=Object.getOwnPropertySymbols,e8=Object.prototype.hasOwnProperty,t8=Object.prototype.propertyIsEnumerable,AN=(e,t,n)=>t in e?afe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ufe=(e,t)=>{for(var n in t||(t={}))e8.call(t,n)&&AN(e,n,t[n]);if(Cv)for(var n of Cv(t))t8.call(t,n)&&AN(e,n,t[n]);return e},dfe=(e,t)=>lfe(e,cfe(t)),ffe=(e,t)=>{var n={};for(var r in e)e8.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&&t8.call(e,r)&&(n[r]=e[r]);return n};const pfe={striped:!1,highlightOnHover:!1,captionSide:"top",horizontalSpacing:"xs",fontSize:"sm",verticalSpacing:7,withBorder:!1,withColumnBorders:!1},Zc=_.forwardRef((e,t)=>{const n=ae("Table",pfe,e),{className:r,children:o,striped:i,highlightOnHover:s,captionSide:a,horizontalSpacing:c,verticalSpacing:u,fontSize:f,unstyled:p,withBorder:g,withColumnBorders:v,variant:y}=n,w=ffe(n,["className","children","striped","highlightOnHover","captionSide","horizontalSpacing","verticalSpacing","fontSize","unstyled","withBorder","withColumnBorders","variant"]),{classes:P,cx:x}=sfe({captionSide:a,verticalSpacing:u,horizontalSpacing:c,fontSize:f,withBorder:g,withColumnBorders:v},{unstyled:p,name:"Table",variant:y});return k.createElement(Pe,dfe(ufe({},w),{component:"table",ref:t,className:x(P.root,r),"data-striped":i||void 0,"data-hover":s||void 0}),o)});Zc.displayName="@mantine/core/Table";var hfe=Object.defineProperty,mfe=Object.defineProperties,gfe=Object.getOwnPropertyDescriptors,BN=Object.getOwnPropertySymbols,vfe=Object.prototype.hasOwnProperty,yfe=Object.prototype.propertyIsEnumerable,FN=(e,t,n)=>t in e?hfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,VN=(e,t)=>{for(var n in t||(t={}))vfe.call(t,n)&&FN(e,n,t[n]);if(BN)for(var n of BN(t))yfe.call(t,n)&&FN(e,n,t[n]);return e},_fe=(e,t)=>mfe(e,gfe(t));const wfe={xs:M(16),sm:M(20),md:M(26),lg:M(32),xl:M(40)},bfe=["filled","light","gradient","outline","default"];function xfe({theme:e,variant:t,color:n,gradient:r}){if(!bfe.includes(t))return null;const o=e.fn.variant({variant:t,color:n||e.primaryColor,gradient:r,primaryFallback:!1});return{backgroundColor:o.background,color:o.color,backgroundImage:t==="gradient"?o.background:void 0,border:`${M(t==="gradient"?0:1)} solid ${o.border}`}}var Sfe=ue((e,{color:t,radius:n,gradient:r},{variant:o,size:i})=>{const s=re({size:i,sizes:wfe});return{root:VN(_fe(VN({},e.fn.fontStyles()),{display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:s,height:s,minWidth:s,minHeight:s,borderRadius:e.fn.radius(n)}),xfe({theme:e,variant:o,gradient:r,color:t}))}});const Pfe=Sfe;var Ofe=Object.defineProperty,kv=Object.getOwnPropertySymbols,n8=Object.prototype.hasOwnProperty,r8=Object.prototype.propertyIsEnumerable,HN=(e,t,n)=>t in e?Ofe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cfe=(e,t)=>{for(var n in t||(t={}))n8.call(t,n)&&HN(e,n,t[n]);if(kv)for(var n of kv(t))r8.call(t,n)&&HN(e,n,t[n]);return e},kfe=(e,t)=>{var n={};for(var r in e)n8.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&&r8.call(e,r)&&(n[r]=e[r]);return n};const Efe={size:"md",variant:"filled"},tx=_.forwardRef((e,t)=>{const n=ae("ThemeIcon",Efe,e),{className:r,size:o,radius:i,variant:s,color:a,children:c,gradient:u,unstyled:f}=n,p=kfe(n,["className","size","radius","variant","color","children","gradient","unstyled"]),{classes:g,cx:v}=Pfe({variant:s,radius:i,color:a,gradient:u},{name:"ThemeIcon",unstyled:f,variant:s,size:o});return k.createElement(Pe,Cfe({className:v(g.root,r),ref:t},p),c)});tx.displayName="@mantine/core/ThemeIcon";var $fe=Object.defineProperty,Mfe=Object.defineProperties,Nfe=Object.getOwnPropertyDescriptors,WN=Object.getOwnPropertySymbols,Tfe=Object.prototype.hasOwnProperty,Ife=Object.prototype.propertyIsEnumerable,UN=(e,t,n)=>t in e?$fe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jfe=(e,t)=>{for(var n in t||(t={}))Tfe.call(t,n)&&UN(e,n,t[n]);if(WN)for(var n of WN(t))Ife.call(t,n)&&UN(e,n,t[n]);return e},Lfe=(e,t)=>Mfe(e,Nfe(t));function Dfe(e,t,n){return typeof e<"u"?e in n.headings.sizes?n.headings.sizes[e].fontSize:M(e):n.headings.sizes[t].fontSize}function Rfe(e,t,n){return typeof e<"u"&&e in n.headings.sizes?n.headings.sizes[e].lineHeight:n.headings.sizes[t].lineHeight}var zfe=ue((e,{element:t,weight:n,inline:r},{size:o})=>({root:Lfe(jfe({},e.fn.fontStyles()),{fontFamily:e.headings.fontFamily,fontWeight:n||e.headings.sizes[t].fontWeight||e.headings.fontWeight,fontSize:Dfe(o,t,e),lineHeight:r?1:Rfe(o,t,e),margin:0})}));const Afe=zfe;var Bfe=Object.defineProperty,Ev=Object.getOwnPropertySymbols,o8=Object.prototype.hasOwnProperty,i8=Object.prototype.propertyIsEnumerable,ZN=(e,t,n)=>t in e?Bfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ffe=(e,t)=>{for(var n in t||(t={}))o8.call(t,n)&&ZN(e,n,t[n]);if(Ev)for(var n of Ev(t))i8.call(t,n)&&ZN(e,n,t[n]);return e},Vfe=(e,t)=>{var n={};for(var r in e)o8.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&&i8.call(e,r)&&(n[r]=e[r]);return n};const Hfe={order:1},s8=_.forwardRef((e,t)=>{const n=ae("Title",Hfe,e),{className:r,order:o,children:i,unstyled:s,size:a,weight:c,inline:u,variant:f}=n,p=Vfe(n,["className","order","children","unstyled","size","weight","inline","variant"]),{classes:g,cx:v}=Afe({element:`h${o}`,weight:c,inline:u},{name:"Title",unstyled:s,variant:f,size:a});return[1,2,3,4,5,6].includes(o)?k.createElement(W,Ffe({variant:f,component:`h${o}`,ref:t,className:v(g.root,r)},p),i):null});s8.displayName="@mantine/core/Title";var Wfe=Object.defineProperty,Ufe=Object.defineProperties,Zfe=Object.getOwnPropertyDescriptors,GN=Object.getOwnPropertySymbols,Gfe=Object.prototype.hasOwnProperty,Yfe=Object.prototype.propertyIsEnumerable,YN=(e,t,n)=>t in e?Wfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ih=(e,t)=>{for(var n in t||(t={}))Gfe.call(t,n)&&YN(e,n,t[n]);if(GN)for(var n of GN(t))Yfe.call(t,n)&&YN(e,n,t[n]);return e},sh=(e,t)=>Ufe(e,Zfe(t)),Kfe=ue(e=>{const t=UW(e.headings.sizes).reduce((n,r)=>{const o=e.headings.sizes[r];return n[`& ${r}`]=sh(ih({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(${M(o.fontSize)} / 1.3)`}}),n},{});return{root:sh(ih(sh(ih({},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:`${M(1)} dashed ${e.colors.gray[e.colorScheme==="dark"?4:6]}`},"& a":sh(ih({},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:`${M(1)} ${M(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:`${M(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:`${M(7)} ${M(10)}`},"& thead th":{borderBottom:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`},"& tfoot th":{borderTop:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`},"& td":{padding:`${M(7)} ${M(10)}`,borderBottom:`${M(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:`${M(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 qfe=Kfe;var Jfe=Object.defineProperty,$v=Object.getOwnPropertySymbols,a8=Object.prototype.hasOwnProperty,l8=Object.prototype.propertyIsEnumerable,KN=(e,t,n)=>t in e?Jfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xfe=(e,t)=>{for(var n in t||(t={}))a8.call(t,n)&&KN(e,n,t[n]);if($v)for(var n of $v(t))l8.call(t,n)&&KN(e,n,t[n]);return e},Qfe=(e,t)=>{var n={};for(var r in e)a8.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&&l8.call(e,r)&&(n[r]=e[r]);return n};const c8=_.forwardRef((e,t)=>{const n=ae("TypographyStylesProvider",{},e),{className:r,unstyled:o,variant:i}=n,s=Qfe(n,["className","unstyled","variant"]),{classes:a,cx:c}=qfe(null,{name:"TypographyStylesProvider",unstyled:o,variant:i});return k.createElement(Pe,Xfe({className:c(a.root,r),ref:t},s))});c8.displayName="@mantine/core/TypographyStylesProvider";var nx={},qN=xs;nx.createRoot=qN.createRoot,nx.hydrateRoot=qN.hydrateRoot;/** +`+i.stack}return{value:e,source:t,stack:o,digest:null}}function P_(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function $b(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var UK=typeof WeakMap=="function"?WeakMap:Map;function $D(e,t,n){n=cs(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){zm||(zm=!0,Ab=r),$b(e,t)},n}function MD(e,t,n){n=cs(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){$b(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){$b(e,t),typeof r!="function"&&(da===null?da=new Set([this]):da.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function g2(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new UK;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=iq.bind(null,e,t,n),t.then(e,e))}function v2(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function y2(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=cs(-1,1),t.tag=2,ua(n,t,1))),n.lanes|=1),e)}var ZK=bs.ReactCurrentOwner,zr=!1;function pr(e,t,n,r){t.child=e===null?lD(t,null,n,r):eu(t,e.child,n,r)}function _2(e,t,n,r,o){n=n.render;var i=t.ref;return Hc(t,o),r=VS(e,t,n,r,i,o),n=HS(),e!==null&&!zr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,ms(e,t,o)):(Rt&&n&&MS(t),t.flags|=1,pr(e,t,r,o),t.child)}function w2(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!QS(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,ND(e,t,i,r,o)):(e=Fh(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:nf,n(s,r)&&e.ref===t.ref)return ms(e,t,o)}return t.flags|=1,e=pa(i,r),e.ref=t.ref,e.return=t,t.child=e}function ND(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(nf(i,r)&&e.ref===t.ref)if(zr=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(zr=!0);else return t.lanes=e.lanes,ms(e,t,o)}return Mb(e,t,n,r,o)}function TD(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ct($c,oo),oo|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ct($c,oo),oo|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Ct($c,oo),oo|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Ct($c,oo),oo|=r;return pr(e,t,o,n),t.child}function ID(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Mb(e,t,n,r,o){var i=Fr(n)?Ol:rr.current;return i=Xc(t,i),Hc(t,o),n=VS(e,t,n,r,i,o),r=HS(),e!==null&&!zr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,ms(e,t,o)):(Rt&&r&&MS(t),t.flags|=1,pr(e,t,n,o),t.child)}function b2(e,t,n,r,o){if(Fr(n)){var i=!0;Em(t)}else i=!1;if(Hc(t,o),t.stateNode===null)zh(e,t),sD(t,n,r),Eb(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var c=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=zo(u):(u=Fr(n)?Ol:rr.current,u=Xc(t,u));var f=n.getDerivedStateFromProps,p=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function";p||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||c!==u)&&f2(t,s,r,u),Hs=!1;var g=t.memoizedState;s.state=g,Im(t,r,s,o),c=t.memoizedState,a!==r||g!==c||Br.current||Hs?(typeof f=="function"&&(kb(t,n,f,r),c=t.memoizedState),(a=Hs||d2(t,n,a,r,g,c,u))?(p||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),s.props=r,s.state=c,s.context=u,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,oD(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Zo(t.type,a),s.props=u,p=t.pendingProps,g=s.context,c=n.contextType,typeof c=="object"&&c!==null?c=zo(c):(c=Fr(n)?Ol:rr.current,c=Xc(t,c));var v=n.getDerivedStateFromProps;(f=typeof v=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==p||g!==c)&&f2(t,s,r,c),Hs=!1,g=t.memoizedState,s.state=g,Im(t,r,s,o);var y=t.memoizedState;a!==p||g!==y||Br.current||Hs?(typeof v=="function"&&(kb(t,n,v,r),y=t.memoizedState),(u=Hs||d2(t,n,u,r,g,y,c)||!1)?(f||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,y,c),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,y,c)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),s.props=r,s.state=y,s.context=c,r=u):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),r=!1)}return Nb(e,t,n,r,i,o)}function Nb(e,t,n,r,o,i){ID(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&s2(t,n,!1),ms(e,t,i);r=t.stateNode,ZK.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=eu(t,e.child,null,i),t.child=eu(t,null,a,i)):pr(e,t,a,i),t.memoizedState=r.state,o&&s2(t,n,!0),t.child}function jD(e){var t=e.stateNode;t.pendingContext?i2(e,t.pendingContext,t.pendingContext!==t.context):t.context&&i2(e,t.context,!1),zS(e,t.containerInfo)}function x2(e,t,n,r,o){return Qc(),TS(o),t.flags|=256,pr(e,t,n,r),t.child}var Tb={dehydrated:null,treeContext:null,retryLane:0};function Ib(e){return{baseLanes:e,cachePool:null,transitions:null}}function LD(e,t,n){var r=t.pendingProps,o=Ht.current,i=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),Ct(Ht,o&1),e===null)return Ob(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,i?(r=t.mode,i=t.child,s={mode:"hidden",children:s},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=s):i=w0(s,r,0,null),e=yl(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Ib(n),t.memoizedState=Tb,e):ZS(t,s));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return GK(e,t,s,r,a,o,n);if(i){i=r.fallback,s=t.mode,o=e.child,a=o.sibling;var c={mode:"hidden",children:r.children};return!(s&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=pa(o,c),r.subtreeFlags=o.subtreeFlags&14680064),a!==null?i=pa(a,i):(i=yl(i,s,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,s=e.child.memoizedState,s=s===null?Ib(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=Tb,r}return i=e.child,e=i.sibling,r=pa(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function ZS(e,t){return t=w0({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Lp(e,t,n,r){return r!==null&&TS(r),eu(t,e.child,null,n),e=ZS(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function GK(e,t,n,r,o,i,s){if(n)return t.flags&256?(t.flags&=-257,r=P_(Error(ce(422))),Lp(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=w0({mode:"visible",children:r.children},o,0,null),i=yl(i,o,s,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&eu(t,e.child,null,s),t.child.memoizedState=Ib(s),t.memoizedState=Tb,i);if(!(t.mode&1))return Lp(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(ce(419)),r=P_(i,r,void 0),Lp(e,t,s,r)}if(a=(s&e.childLanes)!==0,zr||a){if(r=Cn,r!==null){switch(s&-s){case 4:o=2;break;case 16:o=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|s)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,hs(e,o),Xo(r,e,o,-1))}return XS(),r=P_(Error(ce(421))),Lp(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=sq.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,uo=ca(o.nextSibling),po=t,Rt=!0,Yo=null,e!==null&&(Mo[No++]=ss,Mo[No++]=as,Mo[No++]=Cl,ss=e.id,as=e.overflow,Cl=t),t=ZS(t,r.children),t.flags|=4096,t)}function S2(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Cb(e.return,t,n)}function O_(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function DD(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(pr(e,t,r.children,n),r=Ht.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&S2(e,n,t);else if(e.tag===19)S2(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ct(Ht,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&jm(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),O_(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&jm(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}O_(t,!0,n,null,i);break;case"together":O_(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function zh(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ms(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),El|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(ce(153));if(t.child!==null){for(e=t.child,n=pa(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=pa(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function YK(e,t,n){switch(t.tag){case 3:jD(t),Qc();break;case 5:cD(t);break;case 1:Fr(t.type)&&Em(t);break;case 4:zS(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Ct(Nm,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ct(Ht,Ht.current&1),t.flags|=128,null):n&t.child.childLanes?LD(e,t,n):(Ct(Ht,Ht.current&1),e=ms(e,t,n),e!==null?e.sibling:null);Ct(Ht,Ht.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return DD(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Ct(Ht,Ht.current),r)break;return null;case 22:case 23:return t.lanes=0,TD(e,t,n)}return ms(e,t,n)}var RD,jb,zD,AD;RD=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};jb=function(){};zD=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,ul(Ti.current);var i=null;switch(n){case"input":o=nb(e,o),r=nb(e,r),i=[];break;case"select":o=Ut({},o,{value:void 0}),r=Ut({},r,{value:void 0}),i=[];break;case"textarea":o=ib(e,o),r=ib(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Cm)}ab(n,r);var s;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var a=o[u];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Kd.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var c=r[u];if(a=o?.[u],r.hasOwnProperty(u)&&c!==a&&(c!=null||a!=null))if(u==="style")if(a){for(s in a)!a.hasOwnProperty(s)||c&&c.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in c)c.hasOwnProperty(s)&&a[s]!==c[s]&&(n||(n={}),n[s]=c[s])}else n||(i||(i=[]),i.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,a=a?a.__html:void 0,c!=null&&a!==c&&(i=i||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(i=i||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Kd.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&Nt("scroll",e),i||a===c||(i=[])):(i=i||[]).push(u,c))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};AD=function(e,t,n,r){n!==r&&(t.flags|=4)};function nd(e,t){if(!Rt)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function qn(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function KK(e,t,n){var r=t.pendingProps;switch(NS(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qn(t),null;case 1:return Fr(t.type)&&km(),qn(t),null;case 3:return r=t.stateNode,tu(),Lt(Br),Lt(rr),BS(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ip(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Yo!==null&&(Vb(Yo),Yo=null))),jb(e,t),qn(t),null;case 5:AS(t);var o=ul(lf.current);if(n=t.type,e!==null&&t.stateNode!=null)zD(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(ce(166));return qn(t),null}if(e=ul(Ti.current),Ip(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Pi]=t,r[sf]=i,e=(t.mode&1)!==0,n){case"dialog":Nt("cancel",r),Nt("close",r);break;case"iframe":case"object":case"embed":Nt("load",r);break;case"video":case"audio":for(o=0;o<\/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[Pi]=t,e[sf]=r,RD(e,t,!1,!1),t.stateNode=e;e:{switch(s=lb(n,r),n){case"dialog":Nt("cancel",e),Nt("close",e),o=r;break;case"iframe":case"object":case"embed":Nt("load",e),o=r;break;case"video":case"audio":for(o=0;oru&&(t.flags|=128,r=!0,nd(i,!1),t.lanes=4194304)}else{if(!r)if(e=jm(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),nd(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Rt)return qn(t),null}else 2*Qt()-i.renderingStartTime>ru&&n!==1073741824&&(t.flags|=128,r=!0,nd(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=Qt(),t.sibling=null,n=Ht.current,Ct(Ht,r?n&1|2:n&1),t):(qn(t),null);case 22:case 23:return JS(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?oo&1073741824&&(qn(t),t.subtreeFlags&6&&(t.flags|=8192)):qn(t),null;case 24:return null;case 25:return null}throw Error(ce(156,t.tag))}function qK(e,t){switch(NS(t),t.tag){case 1:return Fr(t.type)&&km(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return tu(),Lt(Br),Lt(rr),BS(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return AS(t),null;case 13:if(Lt(Ht),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ce(340));Qc()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Lt(Ht),null;case 4:return tu(),null;case 10:return LS(t.type._context),null;case 22:case 23:return JS(),null;case 24:return null;default:return null}}var Dp=!1,er=!1,JK=typeof WeakSet=="function"?WeakSet:Set,xe=null;function Ec(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Yt(e,t,r)}else n.current=null}function Lb(e,t,n){try{n()}catch(r){Yt(e,t,r)}}var P2=!1;function XK(e,t){if(yb=Sm,e=HL(),$S(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,g=null;t:for(;;){for(var v;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),(v=p.firstChild)!==null;)g=p,p=v;for(;;){if(p===e)break t;if(g===n&&++u===o&&(a=s),g===i&&++f===r&&(c=s),(v=p.nextSibling)!==null)break;p=g,g=p.parentNode}p=v}n=a===-1||c===-1?null:{start:a,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(_b={focusedElem:e,selectionRange:n},Sm=!1,xe=t;xe!==null;)if(t=xe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,xe=e;else for(;xe!==null;){t=xe;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 w=y.memoizedProps,P=y.memoizedState,x=t.stateNode,S=x.getSnapshotBeforeUpdate(t.elementType===t.type?w:Zo(t.type,w),P);x.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var O=t.stateNode.containerInfo;O.nodeType===1?O.textContent="":O.nodeType===9&&O.documentElement&&O.removeChild(O.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ce(163))}}catch(E){Yt(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,xe=e;break}xe=t.return}return y=P2,P2=!1,y}function Nd(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&&Lb(t,n,i)}o=o.next}while(o!==r)}}function y0(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 Db(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 BD(e){var t=e.alternate;t!==null&&(e.alternate=null,BD(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Pi],delete t[sf],delete t[xb],delete t[jK],delete t[LK])),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 FD(e){return e.tag===5||e.tag===3||e.tag===4}function O2(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||FD(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 Rb(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=Cm));else if(r!==4&&(e=e.child,e!==null))for(Rb(e,t,n),e=e.sibling;e!==null;)Rb(e,t,n),e=e.sibling}function zb(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(zb(e,t,n),e=e.sibling;e!==null;)zb(e,t,n),e=e.sibling}var jn=null,Go=!1;function Ns(e,t,n){for(n=n.child;n!==null;)VD(e,t,n),n=n.sibling}function VD(e,t,n){if(Ni&&typeof Ni.onCommitFiberUnmount=="function")try{Ni.onCommitFiberUnmount(u0,n)}catch{}switch(n.tag){case 5:er||Ec(n,t);case 6:var r=jn,o=Go;jn=null,Ns(e,t,n),jn=r,Go=o,jn!==null&&(Go?(e=jn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):jn.removeChild(n.stateNode));break;case 18:jn!==null&&(Go?(e=jn,n=n.stateNode,e.nodeType===8?y_(e.parentNode,n):e.nodeType===1&&y_(e,n),ef(e)):y_(jn,n.stateNode));break;case 4:r=jn,o=Go,jn=n.stateNode.containerInfo,Go=!0,Ns(e,t,n),jn=r,Go=o;break;case 0:case 11:case 14:case 15:if(!er&&(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)&&Lb(n,t,s),o=o.next}while(o!==r)}Ns(e,t,n);break;case 1:if(!er&&(Ec(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Yt(n,t,a)}Ns(e,t,n);break;case 21:Ns(e,t,n);break;case 22:n.mode&1?(er=(r=er)||n.memoizedState!==null,Ns(e,t,n),er=r):Ns(e,t,n);break;default:Ns(e,t,n)}}function C2(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new JK),t.forEach(function(r){var o=aq.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Wo(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=Qt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*eq(r/1960))-r,10e?16:e,Js===null)var r=!1;else{if(e=Js,Js=null,Am=0,ot&6)throw Error(ce(331));var o=ot;for(ot|=4,xe=e.current;xe!==null;){var i=xe,s=i.child;if(xe.flags&16){var a=i.deletions;if(a!==null){for(var c=0;cQt()-KS?vl(e,0):YS|=n),Vr(e,t)}function qD(e,t){t===0&&(e.mode&1?(t=kp,kp<<=1,!(kp&130023424)&&(kp=4194304)):t=1);var n=vr();e=hs(e,t),e!==null&&(jf(e,t,n),Vr(e,n))}function sq(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qD(e,n)}function aq(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(ce(314))}r!==null&&r.delete(t),qD(e,n)}var JD;JD=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Br.current)zr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return zr=!1,YK(e,t,n);zr=!!(e.flags&131072)}else zr=!1,Rt&&t.flags&1048576&&eD(t,Mm,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;zh(e,t),e=t.pendingProps;var o=Xc(t,rr.current);Hc(t,n),o=VS(null,t,r,e,o,n);var i=HS();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,Fr(r)?(i=!0,Em(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,RS(t),o.updater=g0,t.stateNode=o,o._reactInternals=t,Eb(t,r,e,n),t=Nb(null,t,r,!0,i,n)):(t.tag=0,Rt&&i&&MS(t),pr(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(zh(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=cq(r),e=Zo(r,e),o){case 0:t=Mb(null,t,r,e,n);break e;case 1:t=b2(null,t,r,e,n);break e;case 11:t=_2(null,t,r,e,n);break e;case 14:t=w2(null,t,r,Zo(r.type,e),n);break e}throw Error(ce(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Zo(r,o),Mb(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Zo(r,o),b2(e,t,r,o,n);case 3:e:{if(jD(t),e===null)throw Error(ce(387));r=t.pendingProps,i=t.memoizedState,o=i.element,oD(e,t),Im(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=nu(Error(ce(423)),t),t=x2(e,t,r,n,o);break e}else if(r!==o){o=nu(Error(ce(424)),t),t=x2(e,t,r,n,o);break e}else for(uo=ca(t.stateNode.containerInfo.firstChild),po=t,Rt=!0,Yo=null,n=lD(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Qc(),r===o){t=ms(e,t,n);break e}pr(e,t,r,n)}t=t.child}return t;case 5:return cD(t),e===null&&Ob(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,wb(r,o)?s=null:i!==null&&wb(r,i)&&(t.flags|=32),ID(e,t),pr(e,t,s,n),t.child;case 6:return e===null&&Ob(t),null;case 13:return LD(e,t,n);case 4:return zS(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=eu(t,null,r,n):pr(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Zo(r,o),_2(e,t,r,o,n);case 7:return pr(e,t,t.pendingProps,n),t.child;case 8:return pr(e,t,t.pendingProps.children,n),t.child;case 12:return pr(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,Ct(Nm,r._currentValue),r._currentValue=s,i!==null)if(ei(i.value,s)){if(i.children===o.children&&!Br.current){t=ms(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=cs(-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),Cb(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(ce(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Cb(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}pr(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Hc(t,n),o=zo(o),r=r(o),t.flags|=1,pr(e,t,r,n),t.child;case 14:return r=t.type,o=Zo(r,t.pendingProps),o=Zo(r.type,o),w2(e,t,r,o,n);case 15:return ND(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Zo(r,o),zh(e,t),t.tag=1,Fr(r)?(e=!0,Em(t)):e=!1,Hc(t,n),sD(t,r,o),Eb(t,r,o,n),Nb(null,t,r,!0,e,n);case 19:return DD(e,t,n);case 22:return TD(e,t,n)}throw Error(ce(156,t.tag))};function XD(e,t){return PL(e,t)}function lq(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 To(e,t,n,r){return new lq(e,t,n,r)}function QS(e){return e=e.prototype,!(!e||!e.isReactComponent)}function cq(e){if(typeof e=="function")return QS(e)?1:0;if(e!=null){if(e=e.$$typeof,e===yS)return 11;if(e===_S)return 14}return 2}function pa(e,t){var n=e.alternate;return n===null?(n=To(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 Fh(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")QS(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case _c:return yl(n.children,o,i,t);case vS:s=8,o|=8;break;case Xw:return e=To(12,n,t,o|2),e.elementType=Xw,e.lanes=i,e;case Qw:return e=To(13,n,t,o),e.elementType=Qw,e.lanes=i,e;case eb:return e=To(19,n,t,o),e.elementType=eb,e.lanes=i,e;case aL:return w0(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case iL:s=10;break e;case sL:s=9;break e;case yS:s=11;break e;case _S:s=14;break e;case Vs:s=16,r=null;break e}throw Error(ce(130,e==null?e:typeof e,""))}return t=To(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function yl(e,t,n,r){return e=To(7,e,r,t),e.lanes=n,e}function w0(e,t,n,r){return e=To(22,e,r,t),e.elementType=aL,e.lanes=n,e.stateNode={isHidden:!1},e}function C_(e,t,n){return e=To(6,e,null,t),e.lanes=n,e}function k_(e,t,n){return t=To(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function uq(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=a_(0),this.expirationTimes=a_(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=a_(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function eP(e,t,n,r,o,i,s,a,c){return e=new uq(e,t,n,a,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=To(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},RS(i),e}function dq(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(nR)}catch(e){console.error(e)}}nR(),eL.exports=_o;var xs=eL.exports;const gq=Ea(xs);var vq=Object.defineProperty,Vm=Object.getOwnPropertySymbols,rR=Object.prototype.hasOwnProperty,oR=Object.prototype.propertyIsEnumerable,j2=(e,t,n)=>t in e?vq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,L2=(e,t)=>{for(var n in t||(t={}))rR.call(t,n)&&j2(e,n,t[n]);if(Vm)for(var n of Vm(t))oR.call(t,n)&&j2(e,n,t[n]);return e},yq=(e,t)=>{var n={};for(var r in e)rR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Vm)for(var r of Vm(e))t.indexOf(r)<0&&oR.call(e,r)&&(n[r]=e[r]);return n};function _q(e){const t=e,{style:n}=t,r=yq(t,["style"]);return k.createElement("svg",L2({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:L2({width:M(16),height:M(16)},n)},r),k.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"}))}var wq=Object.defineProperty,bq=Object.defineProperties,xq=Object.getOwnPropertyDescriptors,D2=Object.getOwnPropertySymbols,Sq=Object.prototype.hasOwnProperty,Pq=Object.prototype.propertyIsEnumerable,R2=(e,t,n)=>t in e?wq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hb=(e,t)=>{for(var n in t||(t={}))Sq.call(t,n)&&R2(e,n,t[n]);if(D2)for(var n of D2(t))Pq.call(t,n)&&R2(e,n,t[n]);return e},z2=(e,t)=>bq(e,xq(t));const Oq=["subtle","filled","outline","light","default","transparent","gradient"],Ap={xs:M(18),sm:M(22),md:M(28),lg:M(34),xl:M(44)};function Cq({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%"})}:Oq.includes(e)?Hb({border:`${M(1)} solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover})):null}var kq=ue((e,{radius:t,color:n,gradient:r},{variant:o,size:i})=>({root:z2(Hb({position:"relative",borderRadius:e.fn.radius(t),padding:0,lineHeight:1,display:"flex",alignItems:"center",justifyContent:"center",height:re({size:i,sizes:Ap}),minHeight:re({size:i,sizes:Ap}),width:re({size:i,sizes:Ap}),minWidth:re({size:i,sizes:Ap})},Cq({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":z2(Hb({content:'""'},e.fn.cover(M(-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 Eq=kq;var $q=Object.defineProperty,Hm=Object.getOwnPropertySymbols,iR=Object.prototype.hasOwnProperty,sR=Object.prototype.propertyIsEnumerable,A2=(e,t,n)=>t in e?$q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,B2=(e,t)=>{for(var n in t||(t={}))iR.call(t,n)&&A2(e,n,t[n]);if(Hm)for(var n of Hm(t))sR.call(t,n)&&A2(e,n,t[n]);return e},F2=(e,t)=>{var n={};for(var r in e)iR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Hm)for(var r of Hm(e))t.indexOf(r)<0&&sR.call(e,r)&&(n[r]=e[r]);return n};function Mq(e){var t=e,{size:n,color:r}=t,o=F2(t,["size","color"]);const i=o,{style:s}=i,a=F2(i,["style"]);return k.createElement("svg",B2({viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:r,style:B2({width:n},s)},a),k.createElement("rect",{y:"10",width:"15",height:"120",rx:"6"},k.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"}),k.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"})),k.createElement("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},k.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"}),k.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"})),k.createElement("rect",{x:"60",width:"15",height:"140",rx:"6"},k.createElement("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),k.createElement("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),k.createElement("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},k.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"}),k.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"})),k.createElement("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},k.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"}),k.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 Nq=Object.defineProperty,Wm=Object.getOwnPropertySymbols,aR=Object.prototype.hasOwnProperty,lR=Object.prototype.propertyIsEnumerable,V2=(e,t,n)=>t in e?Nq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,H2=(e,t)=>{for(var n in t||(t={}))aR.call(t,n)&&V2(e,n,t[n]);if(Wm)for(var n of Wm(t))lR.call(t,n)&&V2(e,n,t[n]);return e},W2=(e,t)=>{var n={};for(var r in e)aR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Wm)for(var r of Wm(e))t.indexOf(r)<0&&lR.call(e,r)&&(n[r]=e[r]);return n};function Tq(e){var t=e,{size:n,color:r}=t,o=W2(t,["size","color"]);const i=o,{style:s}=i,a=W2(i,["style"]);return k.createElement("svg",H2({viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:r,style:H2({width:n,height:n},s)},a),k.createElement("g",{fill:"none",fillRule:"evenodd"},k.createElement("g",{transform:"translate(2.5 2.5)",strokeWidth:"5"},k.createElement("circle",{strokeOpacity:".5",cx:"16",cy:"16",r:"16"}),k.createElement("path",{d:"M32 16c0-9.94-8.06-16-16-16"},k.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"1s",repeatCount:"indefinite"})))))}var Iq=Object.defineProperty,Um=Object.getOwnPropertySymbols,cR=Object.prototype.hasOwnProperty,uR=Object.prototype.propertyIsEnumerable,U2=(e,t,n)=>t in e?Iq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Z2=(e,t)=>{for(var n in t||(t={}))cR.call(t,n)&&U2(e,n,t[n]);if(Um)for(var n of Um(t))uR.call(t,n)&&U2(e,n,t[n]);return e},G2=(e,t)=>{var n={};for(var r in e)cR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Um)for(var r of Um(e))t.indexOf(r)<0&&uR.call(e,r)&&(n[r]=e[r]);return n};function jq(e){var t=e,{size:n,color:r}=t,o=G2(t,["size","color"]);const i=o,{style:s}=i,a=G2(i,["style"]);return k.createElement("svg",Z2({viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:r,style:Z2({width:n},s)},a),k.createElement("circle",{cx:"15",cy:"15",r:"15"},k.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),k.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})),k.createElement("circle",{cx:"60",cy:"15",r:"9",fillOpacity:"0.3"},k.createElement("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),k.createElement("animate",{attributeName:"fill-opacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})),k.createElement("circle",{cx:"105",cy:"15",r:"15"},k.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),k.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})))}var Lq=Object.defineProperty,Zm=Object.getOwnPropertySymbols,dR=Object.prototype.hasOwnProperty,fR=Object.prototype.propertyIsEnumerable,Y2=(e,t,n)=>t in e?Lq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Dq=(e,t)=>{for(var n in t||(t={}))dR.call(t,n)&&Y2(e,n,t[n]);if(Zm)for(var n of Zm(t))fR.call(t,n)&&Y2(e,n,t[n]);return e},Rq=(e,t)=>{var n={};for(var r in e)dR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Zm)for(var r of Zm(e))t.indexOf(r)<0&&fR.call(e,r)&&(n[r]=e[r]);return n};const E_={bars:Mq,oval:Tq,dots:jq},zq={xs:M(18),sm:M(22),md:M(36),lg:M(44),xl:M(58)},Aq={size:"md"};function en(e){const t=ae("Loader",Aq,e),{size:n,color:r,variant:o}=t,i=Rq(t,["size","color","variant"]),s=ir(),a=o in E_?o:s.loader;return k.createElement(Pe,Dq({role:"presentation",component:E_[a]||E_.bars,size:re({size:n,sizes:zq}),color:s.fn.variant({variant:"filled",primaryFallback:!1,color:r||s.primaryColor}).background},i))}en.displayName="@mantine/core/Loader";var Bq=Object.defineProperty,Gm=Object.getOwnPropertySymbols,pR=Object.prototype.hasOwnProperty,hR=Object.prototype.propertyIsEnumerable,K2=(e,t,n)=>t in e?Bq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,q2=(e,t)=>{for(var n in t||(t={}))pR.call(t,n)&&K2(e,n,t[n]);if(Gm)for(var n of Gm(t))hR.call(t,n)&&K2(e,n,t[n]);return e},Fq=(e,t)=>{var n={};for(var r in e)pR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Gm)for(var r of Gm(e))t.indexOf(r)<0&&hR.call(e,r)&&(n[r]=e[r]);return n};const Vq={color:"gray",size:"md",variant:"subtle"},mR=_.forwardRef((e,t)=>{const n=ae("ActionIcon",Vq,e),{className:r,color:o,children:i,radius:s,size:a,variant:c,gradient:u,disabled:f,loaderProps:p,loading:g,unstyled:v,__staticSelector:y}=n,w=Fq(n,["className","color","children","radius","size","variant","gradient","disabled","loaderProps","loading","unstyled","__staticSelector"]),{classes:P,cx:x,theme:S}=Eq({radius:s,color:o,gradient:u},{name:["ActionIcon",y],unstyled:v,size:a,variant:c}),O=k.createElement(en,q2({color:S.fn.variant({color:o,variant:c}).color,size:"100%","data-action-icon-loader":!0},p));return k.createElement(ls,q2({className:x(P.root,r),ref:t,disabled:f,"data-disabled":f||void 0,"data-loading":g||void 0,unstyled:v},w),g?O:i)});mR.displayName="@mantine/core/ActionIcon";const Qe=mR;var Hq=Object.defineProperty,Wq=Object.defineProperties,Uq=Object.getOwnPropertyDescriptors,Ym=Object.getOwnPropertySymbols,gR=Object.prototype.hasOwnProperty,vR=Object.prototype.propertyIsEnumerable,J2=(e,t,n)=>t in e?Hq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zq=(e,t)=>{for(var n in t||(t={}))gR.call(t,n)&&J2(e,n,t[n]);if(Ym)for(var n of Ym(t))vR.call(t,n)&&J2(e,n,t[n]);return e},Gq=(e,t)=>Wq(e,Uq(t)),Yq=(e,t)=>{var n={};for(var r in e)gR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ym)for(var r of Ym(e))t.indexOf(r)<0&&vR.call(e,r)&&(n[r]=e[r]);return n};function yR(e){const t=ae("Portal",{},e),{children:n,target:r,className:o,innerRef:i}=t,s=Yq(t,["children","target","className","innerRef"]),a=ir(),[c,u]=_.useState(!1),f=_.useRef();return dS(()=>(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?xs.createPortal(k.createElement("div",Gq(Zq({className:o,dir:a.dir},s),{ref:i}),n),f.current):null}yR.displayName="@mantine/core/Portal";var Kq=Object.defineProperty,Km=Object.getOwnPropertySymbols,_R=Object.prototype.hasOwnProperty,wR=Object.prototype.propertyIsEnumerable,X2=(e,t,n)=>t in e?Kq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qq=(e,t)=>{for(var n in t||(t={}))_R.call(t,n)&&X2(e,n,t[n]);if(Km)for(var n of Km(t))wR.call(t,n)&&X2(e,n,t[n]);return e},Jq=(e,t)=>{var n={};for(var r in e)_R.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Km)for(var r of Km(e))t.indexOf(r)<0&&wR.call(e,r)&&(n[r]=e[r]);return n};function zf(e){var t=e,{withinPortal:n=!0,children:r}=t,o=Jq(t,["withinPortal","children"]);return n?k.createElement(yR,qq({},o),r):k.createElement(k.Fragment,null,r)}zf.displayName="@mantine/core/OptionalPortal";var Xq=Object.defineProperty,qm=Object.getOwnPropertySymbols,bR=Object.prototype.hasOwnProperty,xR=Object.prototype.propertyIsEnumerable,Q2=(e,t,n)=>t in e?Xq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eE=(e,t)=>{for(var n in t||(t={}))bR.call(t,n)&&Q2(e,n,t[n]);if(qm)for(var n of qm(t))xR.call(t,n)&&Q2(e,n,t[n]);return e},Qq=(e,t)=>{var n={};for(var r in e)bR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&qm)for(var r of qm(e))t.indexOf(r)<0&&xR.call(e,r)&&(n[r]=e[r]);return n};function SR(e){const t=e,{width:n,height:r,style:o}=t,i=Qq(t,["width","height","style"]);return k.createElement("svg",eE({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:eE({width:n,height:r},o)},i),k.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"}))}SR.displayName="@mantine/core/CloseIcon";var eJ=Object.defineProperty,Jm=Object.getOwnPropertySymbols,PR=Object.prototype.hasOwnProperty,OR=Object.prototype.propertyIsEnumerable,tE=(e,t,n)=>t in e?eJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tJ=(e,t)=>{for(var n in t||(t={}))PR.call(t,n)&&tE(e,n,t[n]);if(Jm)for(var n of Jm(t))OR.call(t,n)&&tE(e,n,t[n]);return e},nJ=(e,t)=>{var n={};for(var r in e)PR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Jm)for(var r of Jm(e))t.indexOf(r)<0&&OR.call(e,r)&&(n[r]=e[r]);return n};const rJ={xs:M(12),sm:M(16),md:M(20),lg:M(28),xl:M(34)},oJ={size:"sm"},CR=_.forwardRef((e,t)=>{const n=ae("CloseButton",oJ,e),{iconSize:r,size:o,children:i}=n,s=nJ(n,["iconSize","size","children"]),a=M(r||rJ[o]);return k.createElement(Qe,tJ({ref:t,__staticSelector:"CloseButton",size:o},s),i||k.createElement(SR,{width:a,height:a}))});CR.displayName="@mantine/core/CloseButton";const O0=CR;var iJ=Object.defineProperty,sJ=Object.defineProperties,aJ=Object.getOwnPropertyDescriptors,nE=Object.getOwnPropertySymbols,lJ=Object.prototype.hasOwnProperty,cJ=Object.prototype.propertyIsEnumerable,rE=(e,t,n)=>t in e?iJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bp=(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},uJ=(e,t)=>sJ(e,aJ(t));function dJ({underline:e,strikethrough:t}){const n=[];return e&&n.push("underline"),t&&n.push("line-through"),n.length>0?n.join(" "):"none"}function fJ({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 pJ(e){return typeof e=="number"?{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical"}:null}function hJ({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 mJ=ue((e,{color:t,lineClamp:n,truncate:r,inline:o,inherit:i,underline:s,gradient:a,weight:c,transform:u,align:f,strikethrough:p,italic:g},{size:v})=>{const y=e.fn.variant({variant:"gradient",gradient:a});return{root:uJ(Bp(Bp(Bp(Bp({},e.fn.fontStyles()),e.fn.focusStyles()),pJ(n)),hJ({theme:e,truncate:r})),{color:fJ({color:t,theme:e}),fontFamily:i?"inherit":e.fontFamily,fontSize:i||v===void 0?"inherit":re({size:v,sizes:e.fontSizes}),lineHeight:i?"inherit":o?1:e.lineHeight,textDecoration:dJ({underline:s,strikethrough:p}),WebkitTapHighlightColor:"transparent",fontWeight:i?"inherit":c,textTransform:u,textAlign:f,fontStyle:g?"italic":void 0}),gradient:{backgroundImage:y.background,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"}}});const gJ=mJ;var vJ=Object.defineProperty,Xm=Object.getOwnPropertySymbols,kR=Object.prototype.hasOwnProperty,ER=Object.prototype.propertyIsEnumerable,oE=(e,t,n)=>t in e?vJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yJ=(e,t)=>{for(var n in t||(t={}))kR.call(t,n)&&oE(e,n,t[n]);if(Xm)for(var n of Xm(t))ER.call(t,n)&&oE(e,n,t[n]);return e},_J=(e,t)=>{var n={};for(var r in e)kR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Xm)for(var r of Xm(e))t.indexOf(r)<0&&ER.call(e,r)&&(n[r]=e[r]);return n};const wJ={variant:"text"},$R=_.forwardRef((e,t)=>{const n=ae("Text",wJ,e),{className:r,size:o,weight:i,transform:s,color:a,align:c,variant:u,lineClamp:f,truncate:p,gradient:g,inline:v,inherit:y,underline:w,strikethrough:P,italic:x,classNames:S,styles:O,unstyled:E,span:$,__staticSelector:N}=n,I=_J(n,["className","size","weight","transform","color","align","variant","lineClamp","truncate","gradient","inline","inherit","underline","strikethrough","italic","classNames","styles","unstyled","span","__staticSelector"]),{classes:R,cx:B}=gJ({color:a,lineClamp:f,truncate:p,inline:v,inherit:y,underline:w,strikethrough:P,italic:x,weight:i,transform:s,align:c,gradient:g},{unstyled:E,name:N||"Text",variant:u,size:o});return k.createElement(Pe,yJ({ref:t,className:B(R.root,{[R.gradient]:u==="gradient"},r),component:$?"span":"div"},I))});$R.displayName="@mantine/core/Text";const U=$R,MR=_.createContext({zIndex:1e3,fixed:!1,layout:"default"});MR.Provider;function bJ(){return _.useContext(MR)}function NR(e,t){if(!e)return[];const n=Object.keys(e).filter(r=>r!=="base").map(r=>[re({size:r,sizes:t.breakpoints,units:"em"}),e[r]]);return n.sort((r,o)=>Ro(r[0])-Ro(o[0])),n}var xJ=Object.defineProperty,SJ=Object.defineProperties,PJ=Object.getOwnPropertyDescriptors,iE=Object.getOwnPropertySymbols,OJ=Object.prototype.hasOwnProperty,CJ=Object.prototype.propertyIsEnumerable,sE=(e,t,n)=>t in e?xJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fp=(e,t)=>{for(var n in t||(t={}))OJ.call(t,n)&&sE(e,n,t[n]);if(iE)for(var n of iE(t))CJ.call(t,n)&&sE(e,n,t[n]);return e},aE=(e,t)=>SJ(e,PJ(t)),kJ=ue((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?NR(n,e).reduce((g,[v,y])=>(g[`@media (min-width: ${ba(v)})`]={width:M(y),minWidth:M(y)},g),{}):null,p=c?{[a==="navbar"?"borderRight":"borderLeft"]:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`}:{};return{root:aE(Fp(Fp(aE(Fp(Fp({},e.fn.fontStyles()),o),{top:u==="alt"?0:o?.top||"var(--mantine-header-height)",bottom:0,zIndex:s,height:t?M(t):u==="alt"?"auto":"calc(100vh - var(--mantine-header-height, 0rem) - var(--mantine-footer-height, 0rem))",width:n?.base?M(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: ${ba(Ro(re({size:i,sizes:e.breakpoints}))-1)})`]:{display:"none"}}})}});const EJ=kJ;var $J=Object.defineProperty,Qm=Object.getOwnPropertySymbols,TR=Object.prototype.hasOwnProperty,IR=Object.prototype.propertyIsEnumerable,lE=(e,t,n)=>t in e?$J(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cE=(e,t)=>{for(var n in t||(t={}))TR.call(t,n)&&lE(e,n,t[n]);if(Qm)for(var n of Qm(t))IR.call(t,n)&&lE(e,n,t[n]);return e},MJ=(e,t)=>{var n={};for(var r in e)TR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Qm)for(var r of Qm(e))t.indexOf(r)<0&&IR.call(e,r)&&(n[r]=e[r]);return n};const jR=_.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:g,styles:v,children:y,section:w,__staticSelector:P,unstyled:x,variant:S}=n,O=MJ(n,["width","height","fixed","position","zIndex","hiddenBreakpoint","hidden","withBorder","className","classNames","styles","children","section","__staticSelector","unstyled","variant"]);const E=bJ(),{classes:$,cx:N,theme:I}=EJ({width:r,height:o,fixed:E.fixed||i,position:s,hiddenBreakpoint:c,zIndex:a||E.zIndex||ii("app"),section:w,withBorder:f,layout:E.layout},{classNames:g,styles:v,name:P,unstyled:x,variant:S}),R=NR(r,I).reduce((B,[z,G])=>(B[`@media (min-width: ${ba(z)})`]={[`--mantine-${w}-width`]:M(G)},B),{});return k.createElement(Pe,cE({component:w==="navbar"?"nav":"aside",ref:t,"data-hidden":u||void 0,className:N($.root,p)},O),y,k.createElement(lG,{styles:()=>({":root":cE({[`--mantine-${w}-width`]:r?.base?M(r.base):"0rem"},R)})}))});jR.displayName="@mantine/core/HorizontalSection";var NJ=Object.defineProperty,eg=Object.getOwnPropertySymbols,LR=Object.prototype.hasOwnProperty,DR=Object.prototype.propertyIsEnumerable,uE=(e,t,n)=>t in e?NJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,TJ=(e,t)=>{for(var n in t||(t={}))LR.call(t,n)&&uE(e,n,t[n]);if(eg)for(var n of eg(t))DR.call(t,n)&&uE(e,n,t[n]);return e},IJ=(e,t)=>{var n={};for(var r in e)LR.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&&DR.call(e,r)&&(n[r]=e[r]);return n};const RR=_.forwardRef((e,t)=>{var n=e,{children:r,grow:o=!1,sx:i}=n,s=IJ(n,["children","grow","sx"]);return k.createElement(Pe,TJ({ref:t,sx:[{flex:o?1:0,boxSizing:"border-box"},...eS(i)]},s),r)});RR.displayName="@mantine/core/Section";const jJ=RR;var LJ=Object.defineProperty,dE=Object.getOwnPropertySymbols,DJ=Object.prototype.hasOwnProperty,RJ=Object.prototype.propertyIsEnumerable,fE=(e,t,n)=>t in e?LJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zJ=(e,t)=>{for(var n in t||(t={}))DJ.call(t,n)&&fE(e,n,t[n]);if(dE)for(var n of dE(t))RJ.call(t,n)&&fE(e,n,t[n]);return e};const AJ={fixed:!1,position:{top:0,left:0},hiddenBreakpoint:"md",hidden:!1},tg=_.forwardRef((e,t)=>{const n=ae("Navbar",AJ,e);return k.createElement(jR,zJ({section:"navbar",__staticSelector:"Navbar",ref:t},n))});tg.Section=jJ;tg.displayName="@mantine/core/Navbar";const Vp={xs:M(1),sm:M(2),md:M(3),lg:M(4),xl:M(5)};function Hp(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 BJ=ue((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:M(1),borderTop:`${re({size:n,sizes:Vp})} ${r} ${Hp(e,t)}`,marginRight:e.spacing.xs},"&::after":{content:'""',flex:1,borderTop:`${re({size:n,sizes:Vp})} ${r} ${Hp(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:M(re({size:n,sizes:Vp})),borderTopColor:Hp(e,t),borderTopStyle:r,margin:0},vertical:{border:0,alignSelf:"stretch",height:"auto",borderLeftWidth:M(re({size:n,sizes:Vp})),borderLeftColor:Hp(e,t),borderLeftStyle:r}}));const FJ=BJ;var VJ=Object.defineProperty,HJ=Object.defineProperties,WJ=Object.getOwnPropertyDescriptors,ng=Object.getOwnPropertySymbols,zR=Object.prototype.hasOwnProperty,AR=Object.prototype.propertyIsEnumerable,pE=(e,t,n)=>t in e?VJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hE=(e,t)=>{for(var n in t||(t={}))zR.call(t,n)&&pE(e,n,t[n]);if(ng)for(var n of ng(t))AR.call(t,n)&&pE(e,n,t[n]);return e},UJ=(e,t)=>HJ(e,WJ(t)),ZJ=(e,t)=>{var n={};for(var r in e)zR.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&&AR.call(e,r)&&(n[r]=e[r]);return n};const GJ={orientation:"horizontal",size:"xs",labelPosition:"left",variant:"solid"},Ye=_.forwardRef((e,t)=>{const n=ae("Divider",GJ,e),{className:r,color:o,orientation:i,size:s,label:a,labelPosition:c,labelProps:u,variant:f,styles:p,classNames:g,unstyled:v}=n,y=ZJ(n,["className","color","orientation","size","label","labelPosition","labelProps","variant","styles","classNames","unstyled"]),{classes:w,cx:P}=FJ({color:o},{classNames:g,styles:p,unstyled:v,name:"Divider",variant:f,size:s}),x=i==="vertical",S=i==="horizontal",O=!!a&&S,E=!u?.color;return k.createElement(Pe,hE({ref:t,className:P(w.root,{[w.vertical]:x,[w.horizontal]:S,[w.withLabel]:O},r),role:"separator"},y),O&&k.createElement(U,UJ(hE({},u),{size:u?.size||"xs",mt:M(2),className:P(w.label,w[c],{[w.labelDefaultStyles]:E})}),a))});Ye.displayName="@mantine/core/Divider";var YJ=Object.defineProperty,KJ=Object.defineProperties,qJ=Object.getOwnPropertyDescriptors,mE=Object.getOwnPropertySymbols,JJ=Object.prototype.hasOwnProperty,XJ=Object.prototype.propertyIsEnumerable,gE=(e,t,n)=>t in e?YJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vE=(e,t)=>{for(var n in t||(t={}))JJ.call(t,n)&&gE(e,n,t[n]);if(mE)for(var n of mE(t))XJ.call(t,n)&&gE(e,n,t[n]);return e},QJ=(e,t)=>KJ(e,qJ(t)),eX=ue((e,t,{size:n})=>({item:QJ(vE({},e.fn.fontStyles()),{boxSizing:"border-box",wordBreak:"break-all",textAlign:"left",width:"100%",padding:`calc(${re({size:n,sizes:e.spacing})} / 1.5) ${re({size:n,sizes:e.spacing})}`,cursor:"pointer",fontSize:re({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]":vE({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(${re({size:n,sizes:e.spacing})} / 2)`,paddingBottom:`calc(${re({size:n,sizes:e.spacing})} / 2)`,textAlign:"center"},separator:{boxSizing:"border-box",textAlign:"left",width:"100%",padding:`calc(${re({size:n,sizes:e.spacing})} / 1.5) ${re({size:n,sizes:e.spacing})}`},separatorLabel:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}));const tX=eX;var nX=Object.defineProperty,yE=Object.getOwnPropertySymbols,rX=Object.prototype.hasOwnProperty,oX=Object.prototype.propertyIsEnumerable,_E=(e,t,n)=>t in e?nX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,iX=(e,t)=>{for(var n in t||(t={}))rX.call(t,n)&&_E(e,n,t[n]);if(yE)for(var n of yE(t))oX.call(t,n)&&_E(e,n,t[n]);return e};function oP({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:g,creatable:v,createLabel:y,unstyled:w,variant:P}){const{classes:x}=tX(null,{classNames:n,styles:r,unstyled:w,name:s,variant:P,size:p}),S=[],O=[];let E=null;const $=(I,R)=>{const B=typeof o=="function"?o(I.value):!1;return k.createElement(f,iX({key:I.value,className:x.item,"data-disabled":I.disabled||void 0,"data-hovered":!I.disabled&&t===R||void 0,"data-selected":!I.disabled&&B||void 0,selected:B,onMouseEnter:()=>a(R),id:`${i}-${R}`,role:"option",tabIndex:-1,"aria-selected":t===R,ref:z=>{u&&u.current&&(u.current[I.value]=z)},onMouseDown:I.disabled?null:z=>{z.preventDefault(),c(I)},disabled:I.disabled,variant:P},I))};let N=null;if(e.forEach((I,R)=>{I.creatable?E=R:I.group?(N!==I.group&&(N=I.group,O.push(k.createElement("div",{className:x.separator,key:`__mantine-divider-${R}`},k.createElement(Ye,{classNames:{label:x.separatorLabel},label:I.group})))),O.push($(I,R))):S.push($(I,R))}),v){const I=e[E];S.push(k.createElement("div",{key:zc(),className:x.item,"data-hovered":t===E||void 0,onMouseEnter:()=>a(E),onMouseDown:R=>{R.preventDefault(),c(I)},tabIndex:-1,ref:R=>{u&&u.current&&(u.current[I.value]=R)}},y))}return O.length>0&&S.length>0&&S.unshift(k.createElement("div",{className:x.separator,key:"empty-group-separator"},k.createElement(Ye,null))),O.length>0||S.length>0?k.createElement(k.Fragment,null,O,S):k.createElement(U,{size:p,unstyled:w,className:x.nothingFound},g)}oP.displayName="@mantine/core/SelectItems";var sX=Object.defineProperty,rg=Object.getOwnPropertySymbols,BR=Object.prototype.hasOwnProperty,FR=Object.prototype.propertyIsEnumerable,wE=(e,t,n)=>t in e?sX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,aX=(e,t)=>{for(var n in t||(t={}))BR.call(t,n)&&wE(e,n,t[n]);if(rg)for(var n of rg(t))FR.call(t,n)&&wE(e,n,t[n]);return e},lX=(e,t)=>{var n={};for(var r in e)BR.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&&FR.call(e,r)&&(n[r]=e[r]);return n};const iP=_.forwardRef((e,t)=>{var n=e,{label:r,value:o}=n,i=lX(n,["label","value"]);return k.createElement("div",aX({ref:t},i),r||o)});iP.displayName="@mantine/core/DefaultItem";function cX(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function VR(...e){return t=>e.forEach(n=>cX(n,t))}function Al(...e){return _.useCallback(VR(...e),e)}const HR=_.forwardRef((e,t)=>{const{children:n,...r}=e,o=_.Children.toArray(n),i=o.find(dX);if(i){const s=i.props.children,a=o.map(c=>c===i?_.Children.count(s)>1?_.Children.only(null):_.isValidElement(s)?s.props.children:null:c);return _.createElement(Wb,jt({},r,{ref:t}),_.isValidElement(s)?_.cloneElement(s,void 0,a):null)}return _.createElement(Wb,jt({},r,{ref:t}),n)});HR.displayName="Slot";const Wb=_.forwardRef((e,t)=>{const{children:n,...r}=e;return _.isValidElement(n)?_.cloneElement(n,{...fX(r,n.props),ref:VR(t,n.ref)}):_.Children.count(n)>1?_.Children.only(null):null});Wb.displayName="SlotClone";const uX=({children:e})=>_.createElement(_.Fragment,null,e);function dX(e){return _.isValidElement(e)&&e.type===uX}function fX(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 pX=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Af=pX.reduce((e,t)=>{const n=_.forwardRef((r,o)=>{const{asChild:i,...s}=r,a=i?HR:t;return _.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),_.createElement(a,jt({},s,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Ub=globalThis?.document?_.useLayoutEffect:()=>{};function hX(e,t){return _.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const Bf=e=>{const{present:t,children:n}=e,r=mX(t),o=typeof n=="function"?n({present:r.isPresent}):_.Children.only(n),i=Al(r.ref,o.ref);return typeof n=="function"||r.isPresent?_.cloneElement(o,{ref:i}):null};Bf.displayName="Presence";function mX(e){const[t,n]=_.useState(),r=_.useRef({}),o=_.useRef(e),i=_.useRef("none"),s=e?"mounted":"unmounted",[a,c]=hX(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const u=Wp(r.current);i.current=a==="mounted"?u:"none"},[a]),Ub(()=>{const u=r.current,f=o.current;if(f!==e){const g=i.current,v=Wp(u);e?c("MOUNT"):v==="none"||u?.display==="none"?c("UNMOUNT"):c(f&&g!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Ub(()=>{if(t){const u=p=>{const v=Wp(r.current).includes(p.animationName);p.target===t&&v&&xs.flushSync(()=>c("ANIMATION_END"))},f=p=>{p.target===t&&(i.current=Wp(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:_.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Wp(e){return e?.animationName||"none"}function gX(e,t=[]){let n=[];function r(i,s){const a=_.createContext(s),c=n.length;n=[...n,s];function u(p){const{scope:g,children:v,...y}=p,w=g?.[e][c]||a,P=_.useMemo(()=>y,Object.values(y));return _.createElement(w.Provider,{value:P},v)}function f(p,g){const v=g?.[e][c]||a,y=_.useContext(v);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=>_.createContext(s));return function(a){const c=a?.[e]||i;return _.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,vX(o,...t)]}function vX(...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 _.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function el(e){const t=_.useRef(e);return _.useEffect(()=>{t.current=e}),_.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}const yX=_.createContext(void 0);function _X(e){const t=_.useContext(yX);return e||t||"ltr"}function wX(e,[t,n]){return Math.min(n,Math.max(t,e))}function _l(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function bX(e,t){return _.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const WR="ScrollArea",[UR,PIe]=gX(WR),[xX,Fo]=UR(WR),SX=_.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:i=600,...s}=e,[a,c]=_.useState(null),[u,f]=_.useState(null),[p,g]=_.useState(null),[v,y]=_.useState(null),[w,P]=_.useState(null),[x,S]=_.useState(0),[O,E]=_.useState(0),[$,N]=_.useState(!1),[I,R]=_.useState(!1),B=Al(t,G=>c(G)),z=_X(o);return _.createElement(xX,{scope:n,type:r,dir:z,scrollHideDelay:i,scrollArea:a,viewport:u,onViewportChange:f,content:p,onContentChange:g,scrollbarX:v,onScrollbarXChange:y,scrollbarXEnabled:$,onScrollbarXEnabledChange:N,scrollbarY:w,onScrollbarYChange:P,scrollbarYEnabled:I,onScrollbarYEnabledChange:R,onCornerWidthChange:S,onCornerHeightChange:E},_.createElement(Af.div,jt({dir:z},s,{ref:B,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":O+"px",...e.style}})))}),PX="ScrollAreaViewport",OX=_.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,...o}=e,i=Fo(PX,n),s=_.useRef(null),a=Al(t,s,i.onViewportChange);return _.createElement(_.Fragment,null,_.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}"}}),_.createElement(Af.div,jt({"data-radix-scroll-area-viewport":""},o,{ref:a,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style}}),_.createElement("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"}},r)))}),Ss="ScrollAreaScrollbar",CX=_.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Fo(Ss,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:s}=o,a=e.orientation==="horizontal";return _.useEffect(()=>(a?i(!0):s(!0),()=>{a?i(!1):s(!1)}),[a,i,s]),o.type==="hover"?_.createElement(kX,jt({},r,{ref:t,forceMount:n})):o.type==="scroll"?_.createElement(EX,jt({},r,{ref:t,forceMount:n})):o.type==="auto"?_.createElement(ZR,jt({},r,{ref:t,forceMount:n})):o.type==="always"?_.createElement(sP,jt({},r,{ref:t})):null}),kX=_.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Fo(Ss,e.__scopeScrollArea),[i,s]=_.useState(!1);return _.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]),_.createElement(Bf,{present:n||i},_.createElement(ZR,jt({"data-state":i?"visible":"hidden"},r,{ref:t})))}),EX=_.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Fo(Ss,e.__scopeScrollArea),i=e.orientation==="horizontal",s=k0(()=>c("SCROLL_END"),100),[a,c]=bX("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 _.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>c("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,o.scrollHideDelay,c]),_.useEffect(()=>{const u=o.viewport,f=i?"scrollLeft":"scrollTop";if(u){let p=u[f];const g=()=>{const v=u[f];p!==v&&(c("SCROLL"),s()),p=v};return u.addEventListener("scroll",g),()=>u.removeEventListener("scroll",g)}},[o.viewport,i,c,s]),_.createElement(Bf,{present:n||a!=="hidden"},_.createElement(sP,jt({"data-state":a==="hidden"?"hidden":"visible"},r,{ref:t,onPointerEnter:_l(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:_l(e.onPointerLeave,()=>c("POINTER_LEAVE"))})))}),ZR=_.forwardRef((e,t)=>{const n=Fo(Ss,e.__scopeScrollArea),{forceMount:r,...o}=e,[i,s]=_.useState(!1),a=e.orientation==="horizontal",c=k0(()=>{if(n.viewport){const u=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=e,o=Fo(Ss,e.__scopeScrollArea),i=_.useRef(null),s=_.useRef(0),[a,c]=_.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=qR(a.viewport,a.content),f={...r,sizes:a,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:g=>i.current=g,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:g=>s.current=g};function p(g,v){return DX(g,s.current,a,v)}return n==="horizontal"?_.createElement($X,jt({},f,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const g=o.viewport.scrollLeft,v=bE(g,a,o.dir);i.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:g=>{o.viewport&&(o.viewport.scrollLeft=g)},onDragScroll:g=>{o.viewport&&(o.viewport.scrollLeft=p(g,o.dir))}})):n==="vertical"?_.createElement(MX,jt({},f,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const g=o.viewport.scrollTop,v=bE(g,a);i.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:g=>{o.viewport&&(o.viewport.scrollTop=g)},onDragScroll:g=>{o.viewport&&(o.viewport.scrollTop=p(g))}})):null}),$X=_.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=Fo(Ss,e.__scopeScrollArea),[s,a]=_.useState(),c=_.useRef(null),u=Al(t,c,i.onScrollbarXChange);return _.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),_.createElement(YR,jt({"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":C0(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,p)=>{if(i.viewport){const g=i.viewport.scrollLeft+f.deltaX;e.onWheelScroll(g),XR(g,p)&&f.preventDefault()}},onResize:()=>{c.current&&i.viewport&&s&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:og(s.paddingLeft),paddingEnd:og(s.paddingRight)}})}}))}),MX=_.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=Fo(Ss,e.__scopeScrollArea),[s,a]=_.useState(),c=_.useRef(null),u=Al(t,c,i.onScrollbarYChange);return _.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),_.createElement(YR,jt({"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":C0(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,p)=>{if(i.viewport){const g=i.viewport.scrollTop+f.deltaY;e.onWheelScroll(g),XR(g,p)&&f.preventDefault()}},onResize:()=>{c.current&&i.viewport&&s&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:og(s.paddingTop),paddingEnd:og(s.paddingBottom)}})}}))}),[NX,GR]=UR(Ss),YR=_.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:i,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:f,onResize:p,...g}=e,v=Fo(Ss,n),[y,w]=_.useState(null),P=Al(t,B=>w(B)),x=_.useRef(null),S=_.useRef(""),O=v.viewport,E=r.content-r.viewport,$=el(f),N=el(c),I=k0(p,10);function R(B){if(x.current){const z=B.clientX-x.current.left,G=B.clientY-x.current.top;u({x:z,y:G})}}return _.useEffect(()=>{const B=z=>{const G=z.target;y?.contains(G)&&$(z,E)};return document.addEventListener("wheel",B,{passive:!1}),()=>document.removeEventListener("wheel",B,{passive:!1})},[O,y,E,$]),_.useEffect(N,[r,N]),ou(y,I),ou(v.content,I),_.createElement(NX,{scope:n,scrollbar:y,hasThumb:o,onThumbChange:el(i),onThumbPointerUp:el(s),onThumbPositionChange:N,onThumbPointerDown:el(a)},_.createElement(Af.div,jt({},g,{ref:P,style:{position:"absolute",...g.style},onPointerDown:_l(e.onPointerDown,B=>{B.button===0&&(B.target.setPointerCapture(B.pointerId),x.current=y.getBoundingClientRect(),S.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",R(B))}),onPointerMove:_l(e.onPointerMove,R),onPointerUp:_l(e.onPointerUp,B=>{const z=B.target;z.hasPointerCapture(B.pointerId)&&z.releasePointerCapture(B.pointerId),document.body.style.webkitUserSelect=S.current,x.current=null})})))}),Zb="ScrollAreaThumb",TX=_.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=GR(Zb,e.__scopeScrollArea);return _.createElement(Bf,{present:n||o.hasThumb},_.createElement(IX,jt({ref:t},r)))}),IX=_.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,i=Fo(Zb,n),s=GR(Zb,n),{onThumbPositionChange:a}=s,c=Al(t,p=>s.onThumbChange(p)),u=_.useRef(),f=k0(()=>{u.current&&(u.current(),u.current=void 0)},100);return _.useEffect(()=>{const p=i.viewport;if(p){const g=()=>{if(f(),!u.current){const v=RX(p,a);u.current=v,a()}};return a(),p.addEventListener("scroll",g),()=>p.removeEventListener("scroll",g)}},[i.viewport,f,a]),_.createElement(Af.div,jt({"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:_l(e.onPointerDownCapture,p=>{const v=p.target.getBoundingClientRect(),y=p.clientX-v.left,w=p.clientY-v.top;s.onThumbPointerDown({x:y,y:w})}),onPointerUp:_l(e.onPointerUp,s.onThumbPointerUp)}))}),KR="ScrollAreaCorner",jX=_.forwardRef((e,t)=>{const n=Fo(KR,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?_.createElement(LX,jt({},e,{ref:t})):null}),LX=_.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=Fo(KR,n),[i,s]=_.useState(0),[a,c]=_.useState(0),u=!!(i&&a);return ou(o.scrollbarX,()=>{var f;const p=((f=o.scrollbarX)===null||f===void 0?void 0:f.offsetHeight)||0;o.onCornerHeightChange(p),c(p)}),ou(o.scrollbarY,()=>{var f;const p=((f=o.scrollbarY)===null||f===void 0?void 0:f.offsetWidth)||0;o.onCornerWidthChange(p),s(p)}),u?_.createElement(Af.div,jt({},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 og(e){return e?parseInt(e,10):0}function qR(e,t){const n=e/t;return isNaN(n)?0:n}function C0(e){const t=qR(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function DX(e,t,n,r="ltr"){const o=C0(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 JR([c,u],p)(e)}function bE(e,t,n="ltr"){const r=C0(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=wX(e,c);return JR([0,s],[0,a])(u)}function JR(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 XR(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 k0(e,t){const n=el(e),r=_.useRef(0);return _.useEffect(()=>()=>window.clearTimeout(r.current),[]),_.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function ou(e,t){const n=el(t);Ub(()=>{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 zX=SX,AX=OX,xE=CX,SE=TX,BX=jX;var FX=ue((e,{scrollbarSize:t,offsetScrollbars:n,scrollbarHovered:r,hidden:o})=>({root:{overflow:"hidden"},viewport:{width:"100%",height:"100%",paddingRight:n?M(t):void 0,paddingBottom:n?M(t):void 0},scrollbar:{display:o?"none":"flex",userSelect:"none",touchAction:"none",boxSizing:"border-box",padding:`calc(${M(t)} / 5)`,transition:"background-color 150ms ease, opacity 150ms ease","&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0],[`& .${Ar("thumb")}`]:{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.white,.5):e.fn.rgba(e.black,.5)}},'&[data-orientation="vertical"]':{width:M(t)},'&[data-orientation="horizontal"]':{flexDirection:"column",height:M(t)},'&[data-state="hidden"]':{display:"none",opacity:0}},thumb:{ref:Ar("thumb"),flex:1,backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.white,.4):e.fn.rgba(e.black,.4),borderRadius:M(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:M(44),minHeight:M(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 VX=FX;var HX=Object.defineProperty,WX=Object.defineProperties,UX=Object.getOwnPropertyDescriptors,ig=Object.getOwnPropertySymbols,QR=Object.prototype.hasOwnProperty,ez=Object.prototype.propertyIsEnumerable,PE=(e,t,n)=>t in e?HX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gb=(e,t)=>{for(var n in t||(t={}))QR.call(t,n)&&PE(e,n,t[n]);if(ig)for(var n of ig(t))ez.call(t,n)&&PE(e,n,t[n]);return e},tz=(e,t)=>WX(e,UX(t)),nz=(e,t)=>{var n={};for(var r in e)QR.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&&ez.call(e,r)&&(n[r]=e[r]);return n};const rz={scrollbarSize:12,scrollHideDelay:1e3,type:"hover",offsetScrollbars:!1},E0=_.forwardRef((e,t)=>{const n=ae("ScrollArea",rz,e),{children:r,className:o,classNames:i,styles:s,scrollbarSize:a,scrollHideDelay:c,type:u,dir:f,offsetScrollbars:p,viewportRef:g,onScrollPositionChange:v,unstyled:y,variant:w,viewportProps:P}=n,x=nz(n,["children","className","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","variant","viewportProps"]),[S,O]=_.useState(!1),E=ir(),{classes:$,cx:N}=VX({scrollbarSize:a,offsetScrollbars:p,scrollbarHovered:S,hidden:u==="never"},{name:"ScrollArea",classNames:i,styles:s,unstyled:y,variant:w});return k.createElement(zX,{type:u==="never"?"always":u,scrollHideDelay:c,dir:f||E.dir,ref:t,asChild:!0},k.createElement(Pe,Gb({className:N($.root,o)},x),k.createElement(AX,tz(Gb({},P),{className:$.viewport,ref:g,onScroll:typeof v=="function"?({currentTarget:I})=>v({x:I.scrollLeft,y:I.scrollTop}):void 0}),r),k.createElement(xE,{orientation:"horizontal",className:$.scrollbar,forceMount:!0,onMouseEnter:()=>O(!0),onMouseLeave:()=>O(!1)},k.createElement(SE,{className:$.thumb})),k.createElement(xE,{orientation:"vertical",className:$.scrollbar,forceMount:!0,onMouseEnter:()=>O(!0),onMouseLeave:()=>O(!1)},k.createElement(SE,{className:$.thumb})),k.createElement(BX,{className:$.corner})))}),oz=_.forwardRef((e,t)=>{const n=ae("ScrollAreaAutosize",rz,e),{children:r,classNames:o,styles:i,scrollbarSize:s,scrollHideDelay:a,type:c,dir:u,offsetScrollbars:f,viewportRef:p,onScrollPositionChange:g,unstyled:v,sx:y,variant:w,viewportProps:P}=n,x=nz(n,["children","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","sx","variant","viewportProps"]);return k.createElement(Pe,tz(Gb({},x),{ref:t,sx:[{display:"flex"},...eS(y)]}),k.createElement(Pe,{sx:{display:"flex",flexDirection:"column",flex:1}},k.createElement(E0,{classNames:o,styles:i,scrollHideDelay:a,scrollbarSize:s,type:c,dir:u,offsetScrollbars:f,viewportRef:p,onScrollPositionChange:g,unstyled:v,variant:w,viewportProps:P},r)))});oz.displayName="@mantine/core/ScrollAreaAutosize";E0.displayName="@mantine/core/ScrollArea";E0.Autosize=oz;const At=E0;var ZX=Object.defineProperty,GX=Object.defineProperties,YX=Object.getOwnPropertyDescriptors,sg=Object.getOwnPropertySymbols,iz=Object.prototype.hasOwnProperty,sz=Object.prototype.propertyIsEnumerable,OE=(e,t,n)=>t in e?ZX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,CE=(e,t)=>{for(var n in t||(t={}))iz.call(t,n)&&OE(e,n,t[n]);if(sg)for(var n of sg(t))sz.call(t,n)&&OE(e,n,t[n]);return e},KX=(e,t)=>GX(e,YX(t)),qX=(e,t)=>{var n={};for(var r in e)iz.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&&sz.call(e,r)&&(n[r]=e[r]);return n};const $0=_.forwardRef((e,t)=>{var n=e,{style:r}=n,o=qX(n,["style"]);return k.createElement(At,KX(CE({},o),{style:CE({width:"100%"},r),viewportProps:{tabIndex:-1},viewportRef:t}),o.children)});$0.displayName="@mantine/core/SelectScrollArea";var JX=ue(()=>({dropdown:{},itemsWrapper:{padding:M(4),display:"flex",width:"100%",boxSizing:"border-box"}}));const XX=JX,ti=Math.min,tr=Math.max,ag=Math.round,Up=Math.floor,Pa=e=>({x:e,y:e}),QX={left:"right",right:"left",bottom:"top",top:"bottom"},eQ={start:"end",end:"start"};function Yb(e,t,n){return tr(e,ti(t,n))}function gs(e,t){return typeof e=="function"?e(t):e}function ni(e){return e.split("-")[0]}function Pu(e){return e.split("-")[1]}function aP(e){return e==="x"?"y":"x"}function lP(e){return e==="y"?"height":"width"}function Bl(e){return["top","bottom"].includes(ni(e))?"y":"x"}function cP(e){return aP(Bl(e))}function tQ(e,t,n){n===void 0&&(n=!1);const r=Pu(e),o=cP(e),i=lP(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=lg(s)),[s,lg(s)]}function nQ(e){const t=lg(e);return[Kb(e),t,Kb(t)]}function Kb(e){return e.replace(/start|end/g,t=>eQ[t])}function rQ(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function oQ(e,t,n,r){const o=Pu(e);let i=rQ(ni(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Kb)))),i}function lg(e){return e.replace(/left|right|bottom|top/g,t=>QX[t])}function iQ(e){return{top:0,right:0,bottom:0,left:0,...e}}function uP(e){return typeof e!="number"?iQ(e):{top:e,right:e,bottom:e,left:e}}function iu(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function kE(e,t,n){let{reference:r,floating:o}=e;const i=Bl(t),s=cP(t),a=lP(s),c=ni(t),u=i==="y",f=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,g=r[a]/2-o[a]/2;let v;switch(c){case"top":v={x:f,y:r.y-o.height};break;case"bottom":v={x:f,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:p};break;case"left":v={x:r.x-o.width,y:p};break;default:v={x:r.x,y:r.y}}switch(Pu(t)){case"start":v[s]-=g*(n&&u?-1:1);break;case"end":v[s]+=g*(n&&u?-1:1);break}return v}const sQ=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}=kE(u,r,c),g=r,v={},y=0;for(let w=0;w({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:c}=t,{element:u,padding:f=0}=gs(e,t)||{};if(u==null)return{};const p=uP(f),g={x:n,y:r},v=cP(o),y=lP(v),w=await s.getDimensions(u),P=v==="y",x=P?"top":"left",S=P?"bottom":"right",O=P?"clientHeight":"clientWidth",E=i.reference[y]+i.reference[v]-g[v]-i.floating[y],$=g[v]-i.reference[v],N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let I=N?N[O]:0;(!I||!await(s.isElement==null?void 0:s.isElement(N)))&&(I=a.floating[O]||i.floating[y]);const R=E/2-$/2,B=I/2-w[y]/2-1,z=ti(p[x],B),G=ti(p[S],B),X=z,Q=I-w[y]-G,V=I/2-w[y]/2+R,H=Yb(X,V,Q),Z=!c.arrow&&Pu(o)!=null&&V!=H&&i.reference[y]/2-(VX<=0)){var B,z;const X=(((B=i.flip)==null?void 0:B.index)||0)+1,Q=$[X];if(Q)return{data:{index:X,overflows:R},reset:{placement:Q}};let V=(z=R.filter(H=>H.overflows[0]<=0).sort((H,Z)=>H.overflows[1]-Z.overflows[1])[0])==null?void 0:z.placement;if(!V)switch(v){case"bestFit":{var G;const H=(G=R.map(Z=>[Z.placement,Z.overflows.filter(Y=>Y>0).reduce((Y,j)=>Y+j,0)]).sort((Z,Y)=>Z[1]-Y[1])[0])==null?void 0:G[0];H&&(V=H);break}case"initialPlacement":V=a;break}if(o!==V)return{reset:{placement:V}}}return{}}}};function lz(e){const t=ti(...e.map(i=>i.left)),n=ti(...e.map(i=>i.top)),r=tr(...e.map(i=>i.right)),o=tr(...e.map(i=>i.bottom));return{x:t,y:n,width:r-t,height:o-n}}function aQ(e){const t=e.slice().sort((o,i)=>o.y-i.y),n=[];let r=null;for(let o=0;or.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(o=>iu(lz(o)))}const cz=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}=gs(e,t),f=Array.from(await(i.getClientRects==null?void 0:i.getClientRects(r.reference))||[]),p=aQ(f),g=iu(lz(f)),v=uP(a);function y(){if(p.length===2&&p[0].left>p[1].right&&c!=null&&u!=null)return p.find(P=>c>P.left-v.left&&cP.top-v.top&&u=2){if(Bl(n)==="y"){const z=p[0],G=p[p.length-1],X=ni(n)==="top",Q=z.top,V=G.bottom,H=X?z.left:G.left,Z=X?z.right:G.right,Y=Z-H,j=V-Q;return{top:Q,bottom:V,left:H,right:Z,width:Y,height:j,x:H,y:Q}}const P=ni(n)==="left",x=tr(...p.map(z=>z.right)),S=ti(...p.map(z=>z.left)),O=p.filter(z=>P?z.left===S:z.right===x),E=O[0].top,$=O[O.length-1].bottom,N=S,I=x,R=I-N,B=$-E;return{top:E,bottom:$,left:N,right:I,width:R,height:B,x:N,y:E}}return g}const w=await i.getElementRects({reference:{getBoundingClientRect:y},floating:r.floating,strategy:s});return o.reference.x!==w.reference.x||o.reference.y!==w.reference.y||o.reference.width!==w.reference.width||o.reference.height!==w.reference.height?{reset:{rects:w}}:{}}}};async function lQ(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=ni(n),a=Pu(n),c=Bl(n)==="y",u=["left","top"].includes(s)?-1:1,f=i&&c?-1:1,p=gs(t,e);let{mainAxis:g,crossAxis:v,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return a&&typeof y=="number"&&(v=a==="end"?y*-1:y),c?{x:v*f,y:g*u}:{x:g*u,y:v*f}}const uz=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await lQ(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},fP=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:P=>{let{x,y:S}=P;return{x,y:S}}},...c}=gs(e,t),u={x:n,y:r},f=await dP(t,c),p=Bl(ni(o)),g=aP(p);let v=u[g],y=u[p];if(i){const P=g==="y"?"top":"left",x=g==="y"?"bottom":"right",S=v+f[P],O=v-f[x];v=Yb(S,v,O)}if(s){const P=p==="y"?"top":"left",x=p==="y"?"bottom":"right",S=y+f[P],O=y-f[x];y=Yb(S,y,O)}const w=a.fn({...t,[g]:v,[p]:y});return{...w,data:{x:w.x-n,y:w.y-r}}}}},cQ=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}=gs(e,t),f={x:n,y:r},p=Bl(o),g=aP(p);let v=f[g],y=f[p];const w=gs(a,t),P=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(c){const O=g==="y"?"height":"width",E=i.reference[g]-i.floating[O]+P.mainAxis,$=i.reference[g]+i.reference[O]-P.mainAxis;v$&&(v=$)}if(u){var x,S;const O=g==="y"?"width":"height",E=["top","left"].includes(ni(o)),$=i.reference[p]-i.floating[O]+(E&&((x=s.offset)==null?void 0:x[p])||0)+(E?0:P.crossAxis),N=i.reference[p]+i.reference[O]+(E?0:((S=s.offset)==null?void 0:S[p])||0)-(E?P.crossAxis:0);y<$?y=$:y>N&&(y=N)}return{[g]:v,[p]:y}}}},uQ=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}=gs(e,t),c=await dP(t,a),u=ni(n),f=Pu(n),p=Bl(n)==="y",{width:g,height:v}=r.floating;let y,w;u==="top"||u==="bottom"?(y=u,w=f===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(w=u,y=f==="end"?"top":"bottom");const P=v-c[y],x=g-c[w],S=!t.middlewareData.shift;let O=P,E=x;if(p){const N=g-c.left-c.right;E=f||S?ti(x,N):N}else{const N=v-c.top-c.bottom;O=f||S?ti(P,N):N}if(S&&!f){const N=tr(c.left,0),I=tr(c.right,0),R=tr(c.top,0),B=tr(c.bottom,0);p?E=g-2*(N!==0||I!==0?N+I:tr(c.left,c.right)):O=v-2*(R!==0||B!==0?R+B:tr(c.top,c.bottom))}await s({...t,availableWidth:E,availableHeight:O});const $=await o.getDimensions(i.floating);return g!==$.width||v!==$.height?{reset:{rects:!0}}:{}}}};function Oa(e){return dz(e)?(e.nodeName||"").toLowerCase():"#document"}function ho(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ps(e){var t;return(t=(dz(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dz(e){return e instanceof Node||e instanceof ho(e).Node}function vs(e){return e instanceof Element||e instanceof ho(e).Element}function Ii(e){return e instanceof HTMLElement||e instanceof ho(e).HTMLElement}function $E(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ho(e).ShadowRoot}function Ff(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Bo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function dQ(e){return["table","td","th"].includes(Oa(e))}function pP(e){const t=hP(),n=Bo(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function fQ(e){let t=su(e);for(;Ii(t)&&!M0(t);){if(pP(t))return t;t=su(t)}return null}function hP(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function M0(e){return["html","body","#document"].includes(Oa(e))}function Bo(e){return ho(e).getComputedStyle(e)}function N0(e){return vs(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function su(e){if(Oa(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$E(e)&&e.host||Ps(e);return $E(t)?t.host:t}function fz(e){const t=su(e);return M0(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ii(t)&&Ff(t)?t:fz(t)}function us(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=fz(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=ho(o);return i?t.concat(s,s.visualViewport||[],Ff(o)?o:[],s.frameElement&&n?us(s.frameElement):[]):t.concat(o,us(o,[],n))}function pz(e){const t=Bo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ii(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=ag(n)!==i||ag(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function mP(e){return vs(e)?e:e.contextElement}function Uc(e){const t=mP(e);if(!Ii(t))return Pa(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=pz(t);let s=(i?ag(n.width):n.width)/r,a=(i?ag(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const pQ=Pa(0);function hz(e){const t=ho(e);return!hP()||!t.visualViewport?pQ:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function hQ(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ho(e)?!1:t}function Ml(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=mP(e);let s=Pa(1);t&&(r?vs(r)&&(s=Uc(r)):s=Uc(e));const a=hQ(i,n,r)?hz(i):Pa(0);let c=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,f=o.width/s.x,p=o.height/s.y;if(i){const g=ho(i),v=r&&vs(r)?ho(r):r;let y=g.frameElement;for(;y&&r&&v!==g;){const w=Uc(y),P=y.getBoundingClientRect(),x=Bo(y),S=P.left+(y.clientLeft+parseFloat(x.paddingLeft))*w.x,O=P.top+(y.clientTop+parseFloat(x.paddingTop))*w.y;c*=w.x,u*=w.y,f*=w.x,p*=w.y,c+=S,u+=O,y=ho(y).frameElement}}return iu({width:f,height:p,x:c,y:u})}function mQ(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Ii(n),i=Ps(n);if(n===i)return t;let s={scrollLeft:0,scrollTop:0},a=Pa(1);const c=Pa(0);if((o||!o&&r!=="fixed")&&((Oa(n)!=="body"||Ff(i))&&(s=N0(n)),Ii(n))){const u=Ml(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}}function gQ(e){return Array.from(e.getClientRects())}function mz(e){return Ml(Ps(e)).left+N0(e).scrollLeft}function vQ(e){const t=Ps(e),n=N0(e),r=e.ownerDocument.body,o=tr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=tr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+mz(e);const a=-n.scrollTop;return Bo(r).direction==="rtl"&&(s+=tr(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function yQ(e,t){const n=ho(e),r=Ps(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,c=0;if(o){i=o.width,s=o.height;const u=hP();(!u||u&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}return{width:i,height:s,x:a,y:c}}function _Q(e,t){const n=Ml(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ii(e)?Uc(e):Pa(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,c=o*i.x,u=r*i.y;return{width:s,height:a,x:c,y:u}}function ME(e,t,n){let r;if(t==="viewport")r=yQ(e,n);else if(t==="document")r=vQ(Ps(e));else if(vs(t))r=_Q(t,n);else{const o=hz(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return iu(r)}function gz(e,t){const n=su(e);return n===t||!vs(n)||M0(n)?!1:Bo(n).position==="fixed"||gz(n,t)}function wQ(e,t){const n=t.get(e);if(n)return n;let r=us(e,[],!1).filter(a=>vs(a)&&Oa(a)!=="body"),o=null;const i=Bo(e).position==="fixed";let s=i?su(e):e;for(;vs(s)&&!M0(s);){const a=Bo(s),c=pP(s);!c&&a.position==="fixed"&&(o=null),(i?!c&&!o:!c&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ff(s)&&!c&&gz(e,s))?r=r.filter(f=>f!==s):o=a,s=su(s)}return t.set(e,r),r}function bQ(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?wQ(t,this._c):[].concat(n),r],a=s[0],c=s.reduce((u,f)=>{const p=ME(t,f,o);return u.top=tr(p.top,u.top),u.right=ti(p.right,u.right),u.bottom=ti(p.bottom,u.bottom),u.left=tr(p.left,u.left),u},ME(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function xQ(e){return pz(e)}function SQ(e,t,n){const r=Ii(t),o=Ps(t),i=n==="fixed",s=Ml(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const c=Pa(0);if(r||!r&&!i)if((Oa(t)!=="body"||Ff(o))&&(a=N0(t)),r){const u=Ml(t,!0,i,t);c.x=u.x+t.clientLeft,c.y=u.y+t.clientTop}else o&&(c.x=mz(o));return{x:s.left+a.scrollLeft-c.x,y:s.top+a.scrollTop-c.y,width:s.width,height:s.height}}function NE(e,t){return!Ii(e)||Bo(e).position==="fixed"?null:t?t(e):e.offsetParent}function vz(e,t){const n=ho(e);if(!Ii(e))return n;let r=NE(e,t);for(;r&&dQ(r)&&Bo(r).position==="static";)r=NE(r,t);return r&&(Oa(r)==="html"||Oa(r)==="body"&&Bo(r).position==="static"&&!pP(r))?n:r||fQ(e)||n}const PQ=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||vz,i=this.getDimensions;return{reference:SQ(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function OQ(e){return Bo(e).direction==="rtl"}const CQ={convertOffsetParentRelativeRectToViewportRelativeRect:mQ,getDocumentElement:Ps,getClippingRect:bQ,getOffsetParent:vz,getElementRects:PQ,getClientRects:gQ,getDimensions:xQ,getScale:Uc,isElement:vs,isRTL:OQ};function kQ(e,t){let n=null,r;const o=Ps(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function s(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const{left:u,top:f,width:p,height:g}=e.getBoundingClientRect();if(a||t(),!p||!g)return;const v=Up(f),y=Up(o.clientWidth-(u+p)),w=Up(o.clientHeight-(f+g)),P=Up(u),S={rootMargin:-v+"px "+-y+"px "+-w+"px "+-P+"px",threshold:tr(0,ti(1,c))||1};let O=!0;function E($){const N=$[0].intersectionRatio;if(N!==c){if(!O)return s();N?s(!1,N):r=setTimeout(()=>{s(!1,1e-7)},100)}O=!1}try{n=new IntersectionObserver(E,{...S,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,S)}n.observe(e)}return s(!0),i}function EQ(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=mP(e),f=o||i?[...u?us(u):[],...us(t)]:[];f.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),i&&x.addEventListener("resize",n)});const p=u&&a?kQ(u,n):null;let g=-1,v=null;s&&(v=new ResizeObserver(x=>{let[S]=x;S&&S.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{v&&v.observe(t)})),n()}),u&&!c&&v.observe(u),v.observe(t));let y,w=c?Ml(e):null;c&&P();function P(){const x=Ml(e);w&&(x.x!==w.x||x.y!==w.y||x.width!==w.width||x.height!==w.height)&&n(),w=x,y=requestAnimationFrame(P)}return n(),()=>{f.forEach(x=>{o&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),p&&p(),v&&v.disconnect(),v=null,c&&cancelAnimationFrame(y)}}const $Q=(e,t,n)=>{const r=new Map,o={platform:CQ,...n},i={...o.platform,_c:r};return sQ(e,t,{...o,platform:i})},yz=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?EE({element:t.current,padding:n}).fn(o):{}:t?EE({element:t,padding:n}).fn(o):{}}}};var Vh=typeof document<"u"?_.useLayoutEffect:_.useEffect;function cg(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(!cg(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)&&!cg(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function TE(e){const t=_.useRef(e);return Vh(()=>{t.current=e}),t}function MQ(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,whileElementsMounted:i,open:s}=e,[a,c]=_.useState({x:null,y:null,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[u,f]=_.useState(r);cg(u,r)||f(r);const p=_.useRef(null),g=_.useRef(null),v=_.useRef(a),y=TE(i),w=TE(o),[P,x]=_.useState(null),[S,O]=_.useState(null),E=_.useCallback(z=>{p.current!==z&&(p.current=z,x(z))},[]),$=_.useCallback(z=>{g.current!==z&&(g.current=z,O(z))},[]),N=_.useCallback(()=>{if(!p.current||!g.current)return;const z={placement:t,strategy:n,middleware:u};w.current&&(z.platform=w.current),$Q(p.current,g.current,z).then(G=>{const X={...G,isPositioned:!0};I.current&&!cg(v.current,X)&&(v.current=X,xs.flushSync(()=>{c(X)}))})},[u,t,n,w]);Vh(()=>{s===!1&&v.current.isPositioned&&(v.current.isPositioned=!1,c(z=>({...z,isPositioned:!1})))},[s]);const I=_.useRef(!1);Vh(()=>(I.current=!0,()=>{I.current=!1}),[]),Vh(()=>{if(P&&S){if(y.current)return y.current(P,S,N);N()}},[P,S,N,y]);const R=_.useMemo(()=>({reference:p,floating:g,setReference:E,setFloating:$}),[E,$]),B=_.useMemo(()=>({reference:P,floating:S}),[P,S]);return _.useMemo(()=>({...a,update:N,refs:R,elements:B,reference:E,floating:$}),[a,N,R,B,E,$])}var au=typeof document<"u"?_.useLayoutEffect:_.useEffect;let $_=!1,NQ=0;const IE=()=>"floating-ui-"+NQ++;function TQ(){const[e,t]=_.useState(()=>$_?IE():void 0);return au(()=>{e==null&&t(IE())},[]),_.useEffect(()=>{$_||($_=!0)},[]),e}const IQ=Ud["useId".toString()],jE=IQ||TQ;function jQ(){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 LQ=_.createContext(null),DQ=_.createContext(null),_z=()=>{var e;return((e=_.useContext(LQ))==null?void 0:e.id)||null},gP=()=>_.useContext(DQ);function Xs(e){return e?.ownerDocument||document}function RQ(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function zQ(){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 vP(e){return Xs(e).defaultView||window}function ki(e){return e?e instanceof vP(e).Element:!1}function wz(e){return e?e instanceof vP(e).HTMLElement:!1}function AQ(e){if(typeof ShadowRoot>"u")return!1;const t=vP(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function BQ(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(RQ())||t.test(zQ()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function FQ(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 bz(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function LE(e){const t=_.useRef(e);return au(()=>{t.current=e}),t}const DE="data-floating-ui-safe-polygon";function Hh(e,t,n){return n&&!bz(n)?0:typeof e=="number"?e:e?.[t]}const VQ=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:g,floating:v},refs:y}=e,w=gP(),P=_z(),x=LE(o),S=LE(r),O=_.useRef(),E=_.useRef(),$=_.useRef(),N=_.useRef(),I=_.useRef(!0),R=_.useRef(!1),B=_.useRef(()=>{}),z=_.useCallback(()=>{var V;const H=(V=f.current.openEvent)==null?void 0:V.type;return H?.includes("mouse")&&H!=="mousedown"},[f]);_.useEffect(()=>{if(!n)return;function V(){clearTimeout(E.current),clearTimeout(N.current),I.current=!0}return p.on("dismiss",V),()=>{p.off("dismiss",V)}},[n,p]),_.useEffect(()=>{if(!n||!x.current||!c)return;function V(){z()&&u(!1)}const H=Xs(v).documentElement;return H.addEventListener("mouseleave",V),()=>{H.removeEventListener("mouseleave",V)}},[v,c,u,n,x,f,z]);const G=_.useCallback(function(V){V===void 0&&(V=!0);const H=Hh(S.current,"close",O.current);H&&!$.current?(clearTimeout(E.current),E.current=setTimeout(()=>u(!1),H)):V&&(clearTimeout(E.current),u(!1))},[S,u]),X=_.useCallback(()=>{B.current(),$.current=void 0},[]),Q=_.useCallback(()=>{if(R.current){const V=Xs(y.floating.current).body;V.style.pointerEvents="",V.removeAttribute(DE),R.current=!1}},[y]);return _.useEffect(()=>{if(!n)return;function V(){return f.current.openEvent?["click","mousedown"].includes(f.current.openEvent.type):!1}function H(j){if(clearTimeout(E.current),I.current=!1,i&&!bz(O.current)||s>0&&Hh(S.current,"open")===0)return;f.current.openEvent=j;const W=Hh(S.current,"open",O.current);W?E.current=setTimeout(()=>{u(!0)},W):u(!0)}function Z(j){if(V())return;B.current();const W=Xs(v);if(clearTimeout(N.current),x.current){c||clearTimeout(E.current),$.current=x.current({...e,tree:w,x:j.clientX,y:j.clientY,onClose(){Q(),X(),G()}});const F=$.current;W.addEventListener("mousemove",F),B.current=()=>{W.removeEventListener("mousemove",F)};return}G()}function Y(j){V()||x.current==null||x.current({...e,tree:w,x:j.clientX,y:j.clientY,onClose(){Q(),X(),G()}})(j)}if(ki(g)){const j=g;return c&&j.addEventListener("mouseleave",Y),v?.addEventListener("mouseleave",Y),a&&j.addEventListener("mousemove",H,{once:!0}),j.addEventListener("mouseenter",H),j.addEventListener("mouseleave",Z),()=>{c&&j.removeEventListener("mouseleave",Y),v?.removeEventListener("mouseleave",Y),a&&j.removeEventListener("mousemove",H),j.removeEventListener("mouseenter",H),j.removeEventListener("mouseleave",Z)}}},[g,v,n,e,i,s,a,G,X,Q,u,c,w,S,x,f]),au(()=>{var V;if(n&&c&&(V=x.current)!=null&&V.__options.blockPointerEvents&&z()){const Y=Xs(v).body;if(Y.setAttribute(DE,""),Y.style.pointerEvents="none",R.current=!0,ki(g)&&v){var H,Z;const j=g,W=w==null||(H=w.nodesRef.current.find(F=>F.id===P))==null||(Z=H.context)==null?void 0:Z.elements.floating;return W&&(W.style.pointerEvents=""),j.style.pointerEvents="auto",v.style.pointerEvents="auto",()=>{j.style.pointerEvents="",v.style.pointerEvents=""}}}},[n,c,P,v,g,w,x,f,z]),au(()=>{c||(O.current=void 0,X(),Q())},[c,X,Q]),_.useEffect(()=>()=>{X(),clearTimeout(E.current),clearTimeout(N.current),Q()},[n,X,Q]),_.useMemo(()=>{if(!n)return{};function V(H){O.current=H.pointerType}return{reference:{onPointerDown:V,onPointerEnter:V,onMouseMove(){c||s===0||(clearTimeout(N.current),N.current=setTimeout(()=>{I.current||u(!0)},s))}},floating:{onMouseEnter(){clearTimeout(E.current)},onMouseLeave(){p.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),G(!1)}}}},[p,n,s,c,u,G])},xz=_.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:()=>{},setState:()=>{},isInstantPhase:!1}),Sz=()=>_.useContext(xz),HQ=e=>{let{children:t,delay:n,timeoutMs:r=0}=e;const[o,i]=_.useReducer((c,u)=>({...c,...u}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),s=_.useRef(null),a=_.useCallback(c=>{i({currentId:c})},[]);return au(()=>{o.currentId?s.current===null?s.current=o.currentId:i({isInstantPhase:!0}):(i({isInstantPhase:!1}),s.current=null)},[o.currentId]),_.createElement(xz.Provider,{value:_.useMemo(()=>({...o,setState:i,setCurrentId:a}),[o,i,a])},t)},WQ=(e,t)=>{let{open:n,onOpenChange:r}=e,{id:o}=t;const{currentId:i,setCurrentId:s,initialDelay:a,setState:c,timeoutMs:u}=Sz();_.useEffect(()=>{i&&(c({delay:{open:1,close:Hh(a,"close")}}),i!==o&&r(!1))},[o,r,c,i,a]),_.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]),_.useEffect(()=>{n&&s(o)},[n,s,o])};function UQ(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 RE(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&AQ(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function M_(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 ZQ(e){return"composedPath"in e?e.composedPath()[0]:e.target}const GQ=Ud["useInsertionEffect".toString()],YQ=GQ||(e=>e());function Pz(e){const t=_.useRef(()=>{});return YQ(()=>{t.current=e}),_.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o!1),$=typeof g=="function"?E:g,N=_.useRef(!1),{escapeKeyBubbles:I,outsidePressBubbles:R}=JQ(x);return _.useEffect(()=>{if(!n||!f)return;u.current.__escapeKeyBubbles=I,u.current.__outsidePressBubbles=R;function B(V){if(V.key==="Escape"){const H=S?M_(S.nodesRef.current,i):[];if(H.length>0){let Z=!0;if(H.forEach(Y=>{var j;if((j=Y.context)!=null&&j.open&&!Y.context.dataRef.current.__escapeKeyBubbles){Z=!1;return}}),!Z)return}o.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1)}}function z(V){const H=N.current;if(N.current=!1,H||typeof $=="function"&&!$(V))return;const Z=ZQ(V);if(wz(Z)&&c){const W=c.ownerDocument.defaultView||window,F=Z.scrollWidth>Z.clientWidth,K=Z.scrollHeight>Z.clientHeight;let ee=K&&V.offsetX>Z.clientWidth;if(K&&W.getComputedStyle(Z).direction==="rtl"&&(ee=V.offsetX<=Z.offsetWidth-Z.clientWidth),ee||F&&V.offsetY>Z.clientHeight)return}const Y=S&&M_(S.nodesRef.current,i).some(W=>{var F;return Wh(V,(F=W.context)==null?void 0:F.elements.floating)});if(Wh(V,c)||Wh(V,a)||Y)return;const j=S?M_(S.nodesRef.current,i):[];if(j.length>0){let W=!0;if(j.forEach(F=>{var K;if((K=F.context)!=null&&K.open&&!F.context.dataRef.current.__outsidePressBubbles){W=!1;return}}),!W)return}o.emit("dismiss",{type:"outsidePress",data:{returnFocus:O?{preventScroll:!0}:BQ(V)||FQ(V)}}),r(!1)}function G(){r(!1)}const X=Xs(c);p&&X.addEventListener("keydown",B),$&&X.addEventListener(v,z);let Q=[];return P&&(ki(a)&&(Q=us(a)),ki(c)&&(Q=Q.concat(us(c))),!ki(s)&&s&&s.contextElement&&(Q=Q.concat(us(s.contextElement)))),Q=Q.filter(V=>{var H;return V!==((H=X.defaultView)==null?void 0:H.visualViewport)}),Q.forEach(V=>{V.addEventListener("scroll",G,{passive:!0})}),()=>{p&&X.removeEventListener("keydown",B),$&&X.removeEventListener(v,z),Q.forEach(V=>{V.removeEventListener("scroll",G)})}},[u,c,a,s,p,$,v,o,S,i,n,r,P,f,I,R,O]),_.useEffect(()=>{N.current=!1},[$,v]),_.useMemo(()=>f?{reference:{[KQ[w]]:()=>{y&&(o.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1))}},floating:{[qQ[v]]:()=>{N.current=!0}}}:{},[f,o,y,v,w,r])},QQ=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=_.useRef(""),g=_.useRef(!1),v=_.useRef();return _.useEffect(()=>{if(!u)return;const w=Xs(a).defaultView||window;function P(){!n&&wz(c)&&c===UQ(Xs(c))&&(g.current=!0)}return w.addEventListener("blur",P),()=>{w.removeEventListener("blur",P)}},[a,c,n,u]),_.useEffect(()=>{if(!u)return;function y(w){(w.type==="referencePress"||w.type==="escapeKey")&&(g.current=!0)}return i.on("dismiss",y),()=>{i.off("dismiss",y)}},[i,u]),_.useEffect(()=>()=>{clearTimeout(v.current)},[]),_.useMemo(()=>u?{reference:{onPointerDown(y){let{pointerType:w}=y;p.current=w,g.current=!!(w&&f)},onMouseLeave(){g.current=!1},onFocus(y){var w;g.current||y.type==="focus"&&((w=o.current.openEvent)==null?void 0:w.type)==="mousedown"&&o.current.openEvent&&Wh(o.current.openEvent,c)||(o.current.openEvent=y.nativeEvent,r(!0))},onBlur(y){g.current=!1;const w=y.relatedTarget,P=ki(w)&&w.hasAttribute("data-floating-ui-focus-guard")&&w.getAttribute("data-type")==="outside";v.current=setTimeout(()=>{RE(s.floating.current,w)||RE(c,w)||P||r(!1)})}}}:{},[u,f,c,s,o,r])},eee=function(e,t){let{open:n}=e,{enabled:r=!0,role:o="dialog"}=t===void 0?{}:t;const i=jE(),s=jE();return _.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 yP(e){e===void 0&&(e={});const{open:t=!1,onOpenChange:n,nodeId:r}=e,o=MQ(e),i=gP(),s=_.useRef(null),a=_.useRef({}),c=_.useState(()=>jQ())[0],[u,f]=_.useState(null),p=_.useCallback(x=>{const S=ki(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),contextElement:x}:x;o.refs.setReference(S)},[o.refs]),g=_.useCallback(x=>{(ki(x)||x===null)&&(s.current=x,f(x)),(ki(o.refs.reference.current)||o.refs.reference.current===null||x!==null&&!ki(x))&&o.refs.setReference(x)},[o.refs]),v=_.useMemo(()=>({...o.refs,setReference:g,setPositionReference:p,domReference:s}),[o.refs,g,p]),y=_.useMemo(()=>({...o.elements,domReference:u}),[o.elements,u]),w=Pz(n),P=_.useMemo(()=>({...o,refs:v,elements:y,dataRef:a,nodeId:r,events:c,open:t,onOpenChange:w}),[o,r,c,t,w,v,y]);return au(()=>{const x=i?.nodesRef.current.find(S=>S.id===r);x&&(x.context=P)}),_.useMemo(()=>({...o,context:P,refs:v,reference:g,positionReference:p}),[o,v,P,g,p])}function N_(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,g=new Array(p),v=0;vy(...g))}}}else o[a]=c}),o),{})}}const tee=function(e){e===void 0&&(e=[]);const t=e,n=_.useCallback(i=>N_(i,e,"reference"),t),r=_.useCallback(i=>N_(i,e,"floating"),t),o=_.useCallback(i=>N_(i,e,"item"),e.map(i=>i?.item));return _.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:o}),[n,r,o])};function Oz({opened:e,floating:t,position:n,positionDependencies:r}){const[o,i]=_.useState(0);_.useEffect(()=>{if(t.refs.reference.current&&t.refs.floating.current)return EQ(t.refs.reference.current,t.refs.floating.current,t.update)},[t.refs.reference.current,t.refs.floating.current,e,o,n]),Fn(()=>{t.update()},r),Fn(()=>{i(s=>s+1)},[e])}function nee(e){const t=[uz(e.offset)];return e.middlewares.shift&&t.push(fP({limiter:cQ()})),e.middlewares.flip&&t.push(az()),e.middlewares.inline&&t.push(cz()),t.push(yz({element:e.arrowRef,padding:e.arrowOffset})),t}function ree(e){const[t,n]=go({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=yP({placement:e.position,middleware:[...nee(e),...e.width==="target"?[uQ({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 Oz({opened:e.opened,position:e.position,positionDependencies:e.positionDependencies,floating:i}),Fn(()=>{var s;(s=e.onPositionChange)==null||s.call(e,i.placement)},[i.placement]),Fn(()=>{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 Cz={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"},[oee,kz]=wu(Cz.context);var iee=Object.defineProperty,see=Object.defineProperties,aee=Object.getOwnPropertyDescriptors,ug=Object.getOwnPropertySymbols,Ez=Object.prototype.hasOwnProperty,$z=Object.prototype.propertyIsEnumerable,zE=(e,t,n)=>t in e?iee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zp=(e,t)=>{for(var n in t||(t={}))Ez.call(t,n)&&zE(e,n,t[n]);if(ug)for(var n of ug(t))$z.call(t,n)&&zE(e,n,t[n]);return e},lee=(e,t)=>see(e,aee(t)),cee=(e,t)=>{var n={};for(var r in e)Ez.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&&$z.call(e,r)&&(n[r]=e[r]);return n};const uee={refProp:"ref",popupType:"dialog",shouldOverrideDefaultTargetId:!0},Mz=_.forwardRef((e,t)=>{const n=ae("PopoverTarget",uee,e),{children:r,refProp:o,popupType:i,shouldOverrideDefaultTargetId:s}=n,a=cee(n,["children","refProp","popupType","shouldOverrideDefaultTargetId"]);if(!Mf(r))throw new Error(Cz.children);const c=a,u=kz(),f=ws(u.reference,r.ref,t),p=u.withRoles?{"aria-haspopup":i,"aria-expanded":u.opened,"aria-controls":u.getDropdownId(),id:s?u.getTargetId():r.props.id}:{};return _.cloneElement(r,Zp(lee(Zp(Zp(Zp({},c),p),u.targetProps),{className:tS(u.targetProps.className,c.className,r.props.className),[o]:f}),u.controlled?null:{onClick:u.onToggle}))});Mz.displayName="@mantine/core/PopoverTarget";var dee=ue((e,{radius:t,shadow:n})=>({dropdown:{position:"absolute",backgroundColor:e.white,background:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`${M(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:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,zIndex:1}}));const fee=dee;var pee=Object.defineProperty,AE=Object.getOwnPropertySymbols,hee=Object.prototype.hasOwnProperty,mee=Object.prototype.propertyIsEnumerable,BE=(e,t,n)=>t in e?pee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ic=(e,t)=>{for(var n in t||(t={}))hee.call(t,n)&&BE(e,n,t[n]);if(AE)for(var n of AE(t))mee.call(t,n)&&BE(e,n,t[n]);return e};const FE={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function gee({transition:e,state:t,duration:n,timingFunction:r}){const o={transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof e=="string"?e in xp?ic(ic(ic({transitionProperty:xp[e].transitionProperty},o),xp[e].common),xp[e][FE[t]]):null:ic(ic(ic({transitionProperty:e.transitionProperty},o),e.common),e[FE[t]])}function vee({duration:e,exitDuration:t,timingFunction:n,mounted:r,onEnter:o,onExit:i,onEntered:s,onExited:a}){const c=ir(),u=fS(),f=c.respectReducedMotion?u:!1,[p,g]=_.useState(f?0:e),[v,y]=_.useState(r?"entered":"exited"),w=_.useRef(-1),P=x=>{const S=x?o:i,O=x?s:a;y(x?"pre-entering":"pre-exiting"),window.clearTimeout(w.current);const E=f?0:x?e:t;if(g(E),E===0)typeof S=="function"&&S(),typeof O=="function"&&O(),y(x?"entered":"exited");else{const $=window.setTimeout(()=>{typeof S=="function"&&S(),y(x?"entering":"exiting")},10);w.current=window.setTimeout(()=>{window.clearTimeout($),typeof O=="function"&&O(),y(x?"entered":"exited")},E)}};return Fn(()=>{P(r)},[r]),_.useEffect(()=>()=>window.clearTimeout(w.current),[]),{transitionDuration:p,transitionStatus:v,transitionTimingFunction:n||c.transitionTimingFunction}}function Os({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:g,transitionTimingFunction:v}=vee({mounted:o,exitDuration:r,duration:n,timingFunction:s,onExit:a,onEntered:c,onEnter:u,onExited:f});return p===0?o?k.createElement(k.Fragment,null,i({})):e?i({display:"none"}):null:g==="exited"?e?i({display:"none"}):null:k.createElement(k.Fragment,null,i(gee({transition:t,duration:p,state:g,timingFunction:v})))}Os.displayName="@mantine/core/Transition";function _P({children:e,active:t=!0,refProp:n="ref"}){const r=PG(t),o=ws(r,e?.ref);return Mf(e)?_.cloneElement(e,{[n]:o}):e}_P.displayName="@mantine/core/FocusTrap";var yee=Object.defineProperty,_ee=Object.defineProperties,wee=Object.getOwnPropertyDescriptors,VE=Object.getOwnPropertySymbols,bee=Object.prototype.hasOwnProperty,xee=Object.prototype.propertyIsEnumerable,HE=(e,t,n)=>t in e?yee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ts=(e,t)=>{for(var n in t||(t={}))bee.call(t,n)&&HE(e,n,t[n]);if(VE)for(var n of VE(t))xee.call(t,n)&&HE(e,n,t[n]);return e},Gp=(e,t)=>_ee(e,wee(t));function WE(e,t,n,r){return e==="center"||r==="center"?{top:t}:e==="end"?{bottom:n}:e==="start"?{top:n}:{}}function UE(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 See={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function Pee({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:o,arrowX:i,arrowY:s,dir:a}){const[c,u="center"]=e.split("-"),f={width:M(t),height:M(t),transform:"rotate(45deg)",position:"absolute",[See[c]]:M(r)},p=M(-t/2);return c==="left"?Gp(Ts(Ts({},f),WE(u,s,n,o)),{right:p,borderLeftColor:"transparent",borderBottomColor:"transparent"}):c==="right"?Gp(Ts(Ts({},f),WE(u,s,n,o)),{left:p,borderRightColor:"transparent",borderTopColor:"transparent"}):c==="top"?Gp(Ts(Ts({},f),UE(u,i,n,o,a)),{bottom:p,borderTopColor:"transparent",borderLeftColor:"transparent"}):c==="bottom"?Gp(Ts(Ts({},f),UE(u,i,n,o,a)),{top:p,borderBottomColor:"transparent",borderRightColor:"transparent"}):{}}var Oee=Object.defineProperty,Cee=Object.defineProperties,kee=Object.getOwnPropertyDescriptors,dg=Object.getOwnPropertySymbols,Nz=Object.prototype.hasOwnProperty,Tz=Object.prototype.propertyIsEnumerable,ZE=(e,t,n)=>t in e?Oee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Eee=(e,t)=>{for(var n in t||(t={}))Nz.call(t,n)&&ZE(e,n,t[n]);if(dg)for(var n of dg(t))Tz.call(t,n)&&ZE(e,n,t[n]);return e},$ee=(e,t)=>Cee(e,kee(t)),Mee=(e,t)=>{var n={};for(var r in e)Nz.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&&Tz.call(e,r)&&(n[r]=e[r]);return n};const wP=_.forwardRef((e,t)=>{var n=e,{position:r,arrowSize:o,arrowOffset:i,arrowRadius:s,arrowPosition:a,visible:c,arrowX:u,arrowY:f}=n,p=Mee(n,["position","arrowSize","arrowOffset","arrowRadius","arrowPosition","visible","arrowX","arrowY"]);const g=ir();return c?k.createElement("div",$ee(Eee({},p),{ref:t,style:Pee({position:r,arrowSize:o,arrowOffset:i,arrowRadius:s,arrowPosition:a,dir:g.dir,arrowX:u,arrowY:f})})):null});wP.displayName="@mantine/core/FloatingArrow";var Nee=Object.defineProperty,Tee=Object.defineProperties,Iee=Object.getOwnPropertyDescriptors,fg=Object.getOwnPropertySymbols,Iz=Object.prototype.hasOwnProperty,jz=Object.prototype.propertyIsEnumerable,GE=(e,t,n)=>t in e?Nee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sc=(e,t)=>{for(var n in t||(t={}))Iz.call(t,n)&&GE(e,n,t[n]);if(fg)for(var n of fg(t))jz.call(t,n)&&GE(e,n,t[n]);return e},Yp=(e,t)=>Tee(e,Iee(t)),jee=(e,t)=>{var n={};for(var r in e)Iz.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&&jz.call(e,r)&&(n[r]=e[r]);return n};const Lee={};function Lz(e){var t;const n=ae("PopoverDropdown",Lee,e),{style:r,className:o,children:i,onKeyDownCapture:s}=n,a=jee(n,["style","className","children","onKeyDownCapture"]),c=kz(),{classes:u,cx:f}=fee({radius:c.radius,shadow:c.shadow},{name:c.__staticSelector,classNames:c.classNames,styles:c.styles,unstyled:c.unstyled,variant:c.variant}),p=B3({opened:c.opened,shouldReturnFocus:c.returnFocus}),g=c.withRoles?{"aria-labelledby":c.getTargetId(),id:c.getDropdownId(),role:"dialog"}:{};return c.disabled?null:k.createElement(zf,Yp(sc({},c.portalProps),{withinPortal:c.withinPortal}),k.createElement(Os,Yp(sc({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}),v=>{var y,w;return k.createElement(_P,{active:c.trapFocus},k.createElement(Pe,sc(Yp(sc({},g),{tabIndex:-1,ref:c.floating,style:Yp(sc(sc({},r),v),{zIndex:c.zIndex,top:(y=c.y)!=null?y:0,left:(w=c.x)!=null?w:0,width:c.width==="target"?void 0:M(c.width)}),className:f(u.dropdown,o),onKeyDownCapture:WW(c.onClose,{active:c.closeOnEscape,onTrigger:p,onKeyDown:s}),"data-position":c.placement}),a),i,k.createElement(wP,{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})))}))}Lz.displayName="@mantine/core/PopoverDropdown";function Dz(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 YE=Object.getOwnPropertySymbols,Dee=Object.prototype.hasOwnProperty,Ree=Object.prototype.propertyIsEnumerable,zee=(e,t)=>{var n={};for(var r in e)Dee.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&YE)for(var r of YE(e))t.indexOf(r)<0&&Ree.call(e,r)&&(n[r]=e[r]);return n};const Aee={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:ii("popover"),__staticSelector:"Popover",width:"max-content"};function kn(e){var t,n,r,o,i,s;const a=_.useRef(null),c=ae("Popover",Aee,e),{children:u,position:f,offset:p,onPositionChange:g,positionDependencies:v,opened:y,transitionProps:w,width:P,middlewares:x,withArrow:S,arrowSize:O,arrowOffset:E,arrowRadius:$,arrowPosition:N,unstyled:I,classNames:R,styles:B,closeOnClickOutside:z,withinPortal:G,portalProps:X,closeOnEscape:Q,clickOutsideEvents:V,trapFocus:H,onClose:Z,onOpen:Y,onChange:j,zIndex:W,radius:F,shadow:K,id:ee,defaultOpened:fe,__staticSelector:ie,withRoles:J,disabled:ne,returnFocus:le,variant:_e,keepMounted:Ne}=c,we=zee(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"]),[He,Te]=_.useState(null),[je,it]=_.useState(null),bt=$a(ee),_n=ir(),pt=ree({middlewares:x,width:P,position:Dz(_n.dir,f),offset:typeof p=="number"?p+(S?O/2:0):p,arrowRef:a,arrowOffset:E,onPositionChange:g,positionDependencies:v,opened:y,defaultOpened:fe,onChange:j,onOpen:Y,onClose:Z});hG(()=>pt.opened&&z&&pt.onClose(),V,[He,je]);const Tn=_.useCallback(lt=>{Te(lt),pt.floating.reference(lt)},[pt.floating.reference]),kr=_.useCallback(lt=>{it(lt),pt.floating.floating(lt)},[pt.floating.floating]);return k.createElement(oee,{value:{returnFocus:le,disabled:ne,controlled:pt.controlled,reference:Tn,floating:kr,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:w,width:P,withArrow:S,arrowSize:O,arrowOffset:E,arrowRadius:$,arrowPosition:N,placement:pt.floating.placement,trapFocus:H,withinPortal:G,portalProps:X,zIndex:W,radius:F,shadow:K,closeOnEscape:Q,onClose:pt.onClose,onToggle:pt.onToggle,getTargetId:()=>`${bt}-target`,getDropdownId:()=>`${bt}-dropdown`,withRoles:J,targetProps:we,__staticSelector:ie,classNames:R,styles:B,unstyled:I,variant:_e,keepMounted:Ne}},u)}kn.Target=Mz;kn.Dropdown=Lz;kn.displayName="@mantine/core/Popover";var Bee=Object.defineProperty,pg=Object.getOwnPropertySymbols,Rz=Object.prototype.hasOwnProperty,zz=Object.prototype.propertyIsEnumerable,KE=(e,t,n)=>t in e?Bee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fee=(e,t)=>{for(var n in t||(t={}))Rz.call(t,n)&&KE(e,n,t[n]);if(pg)for(var n of pg(t))zz.call(t,n)&&KE(e,n,t[n]);return e},Vee=(e,t)=>{var n={};for(var r in e)Rz.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&&zz.call(e,r)&&(n[r]=e[r]);return n};function Hee(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,g=Vee(t,["children","component","maxHeight","direction","id","innerRef","__staticSelector","styles","classNames","unstyled"]);const{classes:v}=XX(null,{name:c,styles:u,classNames:f,unstyled:p});return k.createElement(kn.Dropdown,Fee({p:0,onMouseDown:y=>y.preventDefault()},g),k.createElement("div",{style:{maxHeight:M(o),display:"flex"}},k.createElement(Pe,{component:r||"div",id:`${s}-items`,"aria-labelledby":`${s}-label`,role:"listbox",onMouseDown:y=>y.preventDefault(),style:{flex:1,overflowY:r!==$0?"auto":void 0},"data-combobox-popover":!0,tabIndex:-1,ref:a},k.createElement("div",{className:v.itemsWrapper,style:{flexDirection:i}},n))))}function ha({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:g,styles:v,unstyled:y,readOnly:w,variant:P}){return k.createElement(kn,{unstyled:y,classNames:g,styles:v,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:w,onPositionChange:x=>c&&a?.(x==="top"?"column-reverse":"column"),variant:P},i)}ha.Target=kn.Target;ha.Dropdown=Hee;var Wee=Object.defineProperty,Uee=Object.defineProperties,Zee=Object.getOwnPropertyDescriptors,hg=Object.getOwnPropertySymbols,Az=Object.prototype.hasOwnProperty,Bz=Object.prototype.propertyIsEnumerable,qE=(e,t,n)=>t in e?Wee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kp=(e,t)=>{for(var n in t||(t={}))Az.call(t,n)&&qE(e,n,t[n]);if(hg)for(var n of hg(t))Bz.call(t,n)&&qE(e,n,t[n]);return e},Gee=(e,t)=>Uee(e,Zee(t)),Yee=(e,t)=>{var n={};for(var r in e)Az.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};function bP(e,t,n){const r=ae(e,t,n),{label:o,description:i,error:s,required:a,classNames:c,styles:u,className:f,unstyled:p,__staticSelector:g,sx:v,errorProps:y,labelProps:w,descriptionProps:P,wrapperProps:x,id:S,size:O,style:E,inputContainer:$,inputWrapperOrder:N,withAsterisk:I,variant:R}=r,B=Yee(r,["label","description","error","required","classNames","styles","className","unstyled","__staticSelector","sx","errorProps","labelProps","descriptionProps","wrapperProps","id","size","style","inputContainer","inputWrapperOrder","withAsterisk","variant"]),z=$a(S),{systemStyles:G,rest:X}=Dl(B),Q=Kp({label:o,description:i,error:s,required:a,classNames:c,className:f,__staticSelector:g,sx:v,errorProps:y,labelProps:w,descriptionProps:P,unstyled:p,styles:u,id:z,size:O,style:E,inputContainer:$,inputWrapperOrder:N,withAsterisk:I,variant:R},x);return Gee(Kp({},X),{classNames:c,styles:u,unstyled:p,wrapperProps:Kp(Kp({},Q),G),inputProps:{required:a,classNames:c,styles:u,unstyled:p,id:z,size:O,__staticSelector:g,error:s,variant:R}})}var Kee=ue((e,t,{size:n})=>({label:{display:"inline-block",fontSize:re({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 qee=Kee;var Jee=Object.defineProperty,mg=Object.getOwnPropertySymbols,Fz=Object.prototype.hasOwnProperty,Vz=Object.prototype.propertyIsEnumerable,JE=(e,t,n)=>t in e?Jee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xee=(e,t)=>{for(var n in t||(t={}))Fz.call(t,n)&&JE(e,n,t[n]);if(mg)for(var n of mg(t))Vz.call(t,n)&&JE(e,n,t[n]);return e},Qee=(e,t)=>{var n={};for(var r in e)Fz.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&&Vz.call(e,r)&&(n[r]=e[r]);return n};const ete={labelElement:"label",size:"sm"},xP=_.forwardRef((e,t)=>{const n=ae("InputLabel",ete,e),{labelElement:r,children:o,required:i,size:s,classNames:a,styles:c,unstyled:u,className:f,htmlFor:p,__staticSelector:g,variant:v,onMouseDown:y}=n,w=Qee(n,["labelElement","children","required","size","classNames","styles","unstyled","className","htmlFor","__staticSelector","variant","onMouseDown"]),{classes:P,cx:x}=qee(null,{name:["InputWrapper",g],classNames:a,styles:c,unstyled:u,variant:v,size:s});return k.createElement(Pe,Xee({component:r,ref:t,className:x(P.label,f),htmlFor:r==="label"?p:void 0,onMouseDown:S=>{y?.(S),!S.defaultPrevented&&S.detail>1&&S.preventDefault()}},w),o,i&&k.createElement("span",{className:P.required,"aria-hidden":!0}," *"))});xP.displayName="@mantine/core/InputLabel";var tte=ue((e,t,{size:n})=>({error:{wordBreak:"break-word",color:e.fn.variant({variant:"filled",color:"red"}).background,fontSize:`calc(${re({size:n,sizes:e.fontSizes})} - ${M(2)})`,lineHeight:1.2,display:"block"}}));const nte=tte;var rte=Object.defineProperty,gg=Object.getOwnPropertySymbols,Hz=Object.prototype.hasOwnProperty,Wz=Object.prototype.propertyIsEnumerable,XE=(e,t,n)=>t in e?rte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ote=(e,t)=>{for(var n in t||(t={}))Hz.call(t,n)&&XE(e,n,t[n]);if(gg)for(var n of gg(t))Wz.call(t,n)&&XE(e,n,t[n]);return e},ite=(e,t)=>{var n={};for(var r in e)Hz.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&&Wz.call(e,r)&&(n[r]=e[r]);return n};const ste={size:"sm"},SP=_.forwardRef((e,t)=>{const n=ae("InputError",ste,e),{children:r,className:o,classNames:i,styles:s,unstyled:a,size:c,__staticSelector:u,variant:f}=n,p=ite(n,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:g,cx:v}=nte(null,{name:["InputWrapper",u],classNames:i,styles:s,unstyled:a,variant:f,size:c});return k.createElement(U,ote({className:v(g.error,o),ref:t},p),r)});SP.displayName="@mantine/core/InputError";var ate=ue((e,t,{size:n})=>({description:{wordBreak:"break-word",color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],fontSize:`calc(${re({size:n,sizes:e.fontSizes})} - ${M(2)})`,lineHeight:1.2,display:"block"}}));const lte=ate;var cte=Object.defineProperty,vg=Object.getOwnPropertySymbols,Uz=Object.prototype.hasOwnProperty,Zz=Object.prototype.propertyIsEnumerable,QE=(e,t,n)=>t in e?cte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ute=(e,t)=>{for(var n in t||(t={}))Uz.call(t,n)&&QE(e,n,t[n]);if(vg)for(var n of vg(t))Zz.call(t,n)&&QE(e,n,t[n]);return e},dte=(e,t)=>{var n={};for(var r in e)Uz.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&&Zz.call(e,r)&&(n[r]=e[r]);return n};const fte={size:"sm"},PP=_.forwardRef((e,t)=>{const n=ae("InputDescription",fte,e),{children:r,className:o,classNames:i,styles:s,unstyled:a,size:c,__staticSelector:u,variant:f}=n,p=dte(n,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:g,cx:v}=lte(null,{name:["InputWrapper",u],classNames:i,styles:s,unstyled:a,variant:f,size:c});return k.createElement(U,ute({color:"dimmed",className:v(g.description,o),ref:t,unstyled:a},p),r)});PP.displayName="@mantine/core/InputDescription";const Gz=_.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0}),pte=Gz.Provider,hte=()=>_.useContext(Gz);function mte(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 gte=Object.defineProperty,vte=Object.defineProperties,yte=Object.getOwnPropertyDescriptors,e$=Object.getOwnPropertySymbols,_te=Object.prototype.hasOwnProperty,wte=Object.prototype.propertyIsEnumerable,t$=(e,t,n)=>t in e?gte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bte=(e,t)=>{for(var n in t||(t={}))_te.call(t,n)&&t$(e,n,t[n]);if(e$)for(var n of e$(t))wte.call(t,n)&&t$(e,n,t[n]);return e},xte=(e,t)=>vte(e,yte(t)),Ste=ue(e=>({root:xte(bte({},e.fn.fontStyles()),{lineHeight:e.lineHeight})}));const Pte=Ste;var Ote=Object.defineProperty,Cte=Object.defineProperties,kte=Object.getOwnPropertyDescriptors,yg=Object.getOwnPropertySymbols,Yz=Object.prototype.hasOwnProperty,Kz=Object.prototype.propertyIsEnumerable,n$=(e,t,n)=>t in e?Ote(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Is=(e,t)=>{for(var n in t||(t={}))Yz.call(t,n)&&n$(e,n,t[n]);if(yg)for(var n of yg(t))Kz.call(t,n)&&n$(e,n,t[n]);return e},r$=(e,t)=>Cte(e,kte(t)),Ete=(e,t)=>{var n={};for(var r in e)Yz.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&&Kz.call(e,r)&&(n[r]=e[r]);return n};const $te={labelElement:"label",size:"sm",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},qz=_.forwardRef((e,t)=>{const n=ae("InputWrapper",$te,e),{className:r,label:o,children:i,required:s,id:a,error:c,description:u,labelElement:f,labelProps:p,descriptionProps:g,errorProps:v,classNames:y,styles:w,size:P,inputContainer:x,__staticSelector:S,unstyled:O,inputWrapperOrder:E,withAsterisk:$,variant:N}=n,I=Ete(n,["className","label","children","required","id","error","description","labelElement","labelProps","descriptionProps","errorProps","classNames","styles","size","inputContainer","__staticSelector","unstyled","inputWrapperOrder","withAsterisk","variant"]),{classes:R,cx:B}=Pte(null,{classNames:y,styles:w,name:["InputWrapper",S],unstyled:O,variant:N,size:P}),z={classNames:y,styles:w,unstyled:O,size:P,variant:N,__staticSelector:S},G=typeof $=="boolean"?$:s,X=a?`${a}-error`:v?.id,Q=a?`${a}-description`:g?.id,H=`${!!c&&typeof c!="boolean"?X:""} ${u?Q:""}`,Z=H.trim().length>0?H.trim():void 0,Y=o&&k.createElement(xP,Is(Is({key:"label",labelElement:f,id:a?`${a}-label`:void 0,htmlFor:a,required:G},z),p),o),j=u&&k.createElement(PP,r$(Is(Is({key:"description"},g),z),{size:g?.size||z.size,id:g?.id||Q}),u),W=k.createElement(_.Fragment,{key:"input"},x(i)),F=typeof c!="boolean"&&c&&k.createElement(SP,r$(Is(Is({},v),z),{size:v?.size||z.size,key:"error",id:v?.id||X}),c),K=E.map(ee=>{switch(ee){case"label":return Y;case"input":return W;case"description":return j;case"error":return F;default:return null}});return k.createElement(pte,{value:Is({describedBy:Z},mte(E,{hasDescription:!!j,hasError:!!F}))},k.createElement(Pe,Is({className:B(R.root,r),ref:t},I),K))});qz.displayName="@mantine/core/InputWrapper";var Mte=Object.defineProperty,_g=Object.getOwnPropertySymbols,Jz=Object.prototype.hasOwnProperty,Xz=Object.prototype.propertyIsEnumerable,o$=(e,t,n)=>t in e?Mte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nte=(e,t)=>{for(var n in t||(t={}))Jz.call(t,n)&&o$(e,n,t[n]);if(_g)for(var n of _g(t))Xz.call(t,n)&&o$(e,n,t[n]);return e},Tte=(e,t)=>{var n={};for(var r in e)Jz.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&&Xz.call(e,r)&&(n[r]=e[r]);return n};const Ite={},Qz=_.forwardRef((e,t)=>{const n=ae("InputPlaceholder",Ite,e),{sx:r}=n,o=Tte(n,["sx"]);return k.createElement(Pe,Nte({component:"span",sx:[i=>i.fn.placeholderStyles(),...eS(r)],ref:t},o))});Qz.displayName="@mantine/core/InputPlaceholder";var jte=Object.defineProperty,Lte=Object.defineProperties,Dte=Object.getOwnPropertyDescriptors,i$=Object.getOwnPropertySymbols,Rte=Object.prototype.hasOwnProperty,zte=Object.prototype.propertyIsEnumerable,s$=(e,t,n)=>t in e?jte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qp=(e,t)=>{for(var n in t||(t={}))Rte.call(t,n)&&s$(e,n,t[n]);if(i$)for(var n of i$(t))zte.call(t,n)&&s$(e,n,t[n]);return e},T_=(e,t)=>Lte(e,Dte(t));const Dn={xs:M(30),sm:M(36),md:M(42),lg:M(50),xl:M(60)},Ate=["default","filled","unstyled"];function Bte({theme:e,variant:t}){return Ate.includes(t)?t==="default"?{border:`${M(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:`${M(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:M(28),outline:0,"&:focus, &:focus-within":{outline:"none",borderColor:"transparent"},"&:disabled":{backgroundColor:"transparent","&:focus, &:focus-within":{outline:"none",borderColor:"transparent"}}}:null}var Fte=ue((e,{multiline:t,radius:n,invalid:r,rightSectionWidth:o,withRightSection:i,iconWidth:s,offsetBottom:a,offsetTop:c,pointer:u},{variant:f,size:p})=>{const g=e.fn.variant({variant:"filled",color:"red"}).background,v=f==="default"||f==="filled"?{minHeight:re({size:p,sizes:Dn}),paddingLeft:`calc(${re({size:p,sizes:Dn})} / 3)`,paddingRight:i?o||re({size:p,sizes:Dn}):`calc(${re({size:p,sizes:Dn})} / 3)`,borderRadius:e.fn.radius(n)}:f==="unstyled"&&i?{paddingRight:o||re({size:p,sizes:Dn})}:null;return{wrapper:{position:"relative",marginTop:c?`calc(${e.spacing.xs} / 2)`:void 0,marginBottom:a?`calc(${e.spacing.xs} / 2)`:void 0,"&:has(input:disabled)":{"& .mantine-Input-rightSection":{display:"none"}}},input:T_(qp(qp(T_(qp({},e.fn.fontStyles()),{height:t?f==="unstyled"?void 0:"auto":re({size:p,sizes:Dn}),WebkitTapHighlightColor:"transparent",lineHeight:t?e.lineHeight:`calc(${re({size:p,sizes:Dn})} - ${M(2)})`,appearance:"none",resize:"none",boxSizing:"border-box",fontSize:re({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}),Bte({theme:e,variant:f})),v),{"&: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",pointerEvents:"none","&::placeholder":{color:e.colors.dark[2]}},"&[data-invalid]":{color:g,borderColor:g,"&::placeholder":{opacity:1,color:g}},"&[data-with-icon]":{paddingLeft:typeof s=="number"?M(s):re({size:p,sizes:Dn})},"&::placeholder":T_(qp({},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?M(s):re({size:p,sizes:Dn}),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||re({size:p,sizes:Dn})}}});const Vte=Fte;var Hte=Object.defineProperty,Wte=Object.defineProperties,Ute=Object.getOwnPropertyDescriptors,wg=Object.getOwnPropertySymbols,eA=Object.prototype.hasOwnProperty,tA=Object.prototype.propertyIsEnumerable,a$=(e,t,n)=>t in e?Hte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Jp=(e,t)=>{for(var n in t||(t={}))eA.call(t,n)&&a$(e,n,t[n]);if(wg)for(var n of wg(t))tA.call(t,n)&&a$(e,n,t[n]);return e},l$=(e,t)=>Wte(e,Ute(t)),Zte=(e,t)=>{var n={};for(var r in e)eA.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&&tA.call(e,r)&&(n[r]=e[r]);return n};const Gte={size:"sm",variant:"default"},Fl=_.forwardRef((e,t)=>{const n=ae("Input",Gte,e),{className:r,error:o,required:i,disabled:s,variant:a,icon:c,style:u,rightSectionWidth:f,iconWidth:p,rightSection:g,rightSectionProps:v,radius:y,size:w,wrapperProps:P,classNames:x,styles:S,__staticSelector:O,multiline:E,sx:$,unstyled:N,pointer:I}=n,R=Zte(n,["className","error","required","disabled","variant","icon","style","rightSectionWidth","iconWidth","rightSection","rightSectionProps","radius","size","wrapperProps","classNames","styles","__staticSelector","multiline","sx","unstyled","pointer"]),{offsetBottom:B,offsetTop:z,describedBy:G}=hte(),{classes:X,cx:Q}=Vte({radius:y,multiline:E,invalid:!!o,rightSectionWidth:f?M(f):void 0,iconWidth:p,withRightSection:!!g,offsetBottom:B,offsetTop:z,pointer:I},{classNames:x,styles:S,name:["Input",O],unstyled:N,variant:a,size:w}),{systemStyles:V,rest:H}=Dl(R);return k.createElement(Pe,Jp(Jp({className:Q(X.wrapper,r),sx:$,style:u},V),P),c&&k.createElement("div",{className:X.icon},c),k.createElement(Pe,l$(Jp({component:"input"},H),{ref:t,required:i,"aria-invalid":!!o,"aria-describedby":G,disabled:s,"data-disabled":s||void 0,"data-with-icon":!!c||void 0,"data-invalid":!!o||void 0,className:X.input})),g&&k.createElement("div",l$(Jp({},v),{className:X.rightSection}),g))});Fl.displayName="@mantine/core/Input";Fl.Wrapper=qz;Fl.Label=xP;Fl.Description=PP;Fl.Error=SP;Fl.Placeholder=Qz;const et=Fl;var Yte=Object.defineProperty,bg=Object.getOwnPropertySymbols,nA=Object.prototype.hasOwnProperty,rA=Object.prototype.propertyIsEnumerable,c$=(e,t,n)=>t in e?Yte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kte=(e,t)=>{for(var n in t||(t={}))nA.call(t,n)&&c$(e,n,t[n]);if(bg)for(var n of bg(t))rA.call(t,n)&&c$(e,n,t[n]);return e},qte=(e,t)=>{var n={};for(var r in e)nA.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&&rA.call(e,r)&&(n[r]=e[r]);return n};function Jte(e){const t=e,{style:n}=t,r=qte(t,["style"]);return k.createElement("svg",Kte({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:n},r),k.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 Xte=Object.defineProperty,Qte=Object.defineProperties,ene=Object.getOwnPropertyDescriptors,u$=Object.getOwnPropertySymbols,tne=Object.prototype.hasOwnProperty,nne=Object.prototype.propertyIsEnumerable,d$=(e,t,n)=>t in e?Xte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rne=(e,t)=>{for(var n in t||(t={}))tne.call(t,n)&&d$(e,n,t[n]);if(u$)for(var n of u$(t))nne.call(t,n)&&d$(e,n,t[n]);return e},one=(e,t)=>Qte(e,ene(t));const oA=_.createContext(null);function ine({spacing:e,children:t}){return k.createElement(oA.Provider,{value:{spacing:e}},t)}function sne(){const e=_.useContext(oA);return e?one(rne({},e),{withinGroup:!0}):{spacing:null,withinGroup:!1}}var ane=ue((e,{spacing:t})=>({root:{display:"flex",paddingLeft:re({size:t,sizes:e.spacing})}}));const lne=ane;var cne=Object.defineProperty,xg=Object.getOwnPropertySymbols,iA=Object.prototype.hasOwnProperty,sA=Object.prototype.propertyIsEnumerable,f$=(e,t,n)=>t in e?cne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,une=(e,t)=>{for(var n in t||(t={}))iA.call(t,n)&&f$(e,n,t[n]);if(xg)for(var n of xg(t))sA.call(t,n)&&f$(e,n,t[n]);return e},dne=(e,t)=>{var n={};for(var r in e)iA.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&&sA.call(e,r)&&(n[r]=e[r]);return n};const fne={},aA=_.forwardRef((e,t)=>{const n=ae("AvatarGroup",fne,e),{children:r,spacing:o="sm",unstyled:i,className:s,variant:a}=n,c=dne(n,["children","spacing","unstyled","className","variant"]),{classes:u,cx:f}=lne({spacing:o},{name:"AvatarGroup",unstyled:i,variant:a});return k.createElement(ine,{spacing:o},k.createElement(Pe,une({ref:t,className:f(u.root,s)},c),r))});aA.displayName="@mantine/core/AvatarGroup";var pne=Object.defineProperty,hne=Object.defineProperties,mne=Object.getOwnPropertyDescriptors,p$=Object.getOwnPropertySymbols,gne=Object.prototype.hasOwnProperty,vne=Object.prototype.propertyIsEnumerable,h$=(e,t,n)=>t in e?pne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,od=(e,t)=>{for(var n in t||(t={}))gne.call(t,n)&&h$(e,n,t[n]);if(p$)for(var n of p$(t))vne.call(t,n)&&h$(e,n,t[n]);return e},m$=(e,t)=>hne(e,mne(t));const yne=["filled","light","gradient","outline"],Xp={xs:M(16),sm:M(26),md:M(38),lg:M(56),xl:M(84)};function _ne({withinGroup:e,spacing:t,theme:n}){return e?{marginLeft:`calc(${re({size:t,sizes:n.spacing})} * -1)`,backgroundColor:`${n.colorScheme==="dark"?n.colors.dark[7]:n.white}`,border:`${M(2)} solid ${n.colorScheme==="dark"?n.colors.dark[7]:n.white}`}:null}function wne({theme:e,variant:t,color:n,gradient:r}){const o=e.fn.variant({variant:t,color:n,gradient:r});return yne.includes(t)?{placeholder:{color:o.color,backgroundColor:o.background,backgroundImage:t==="gradient"?o.background:void 0,border:`${M(t==="gradient"?0:1)} solid ${o.border}`},placeholderIcon:{color:o.color}}:{}}var bne=ue((e,{radius:t,withinGroup:n,spacing:r,color:o,gradient:i},{variant:s,size:a})=>{const c=wne({theme:e,color:o,gradient:i,variant:s});return{root:od(m$(od({},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:re({size:a,sizes:Xp}),minWidth:re({size:a,sizes:Xp}),height:re({size:a,sizes:Xp})}),_ne({withinGroup:n,spacing:r,theme:e})),image:{objectFit:"cover",width:"100%",height:"100%",display:"block"},placeholder:od(m$(od({},e.fn.fontStyles()),{fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",userSelect:"none",borderRadius:e.fn.radius(t),fontSize:`calc(${re({size:a,sizes:Xp})} / 2.5)`}),c.placeholder),placeholderIcon:od({width:"70%",height:"70%"},c.placeholderIcon)}});const xne=bne;var Sne=Object.defineProperty,Pne=Object.defineProperties,One=Object.getOwnPropertyDescriptors,Sg=Object.getOwnPropertySymbols,lA=Object.prototype.hasOwnProperty,cA=Object.prototype.propertyIsEnumerable,g$=(e,t,n)=>t in e?Sne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,v$=(e,t)=>{for(var n in t||(t={}))lA.call(t,n)&&g$(e,n,t[n]);if(Sg)for(var n of Sg(t))cA.call(t,n)&&g$(e,n,t[n]);return e},Cne=(e,t)=>Pne(e,One(t)),kne=(e,t)=>{var n={};for(var r in e)lA.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&&cA.call(e,r)&&(n[r]=e[r]);return n};const Ene={size:"md",color:"gray",variant:"light"},OP=_.forwardRef((e,t)=>{const n=ae("Avatar",Ene,e),{className:r,size:o,src:i,alt:s,radius:a,children:c,color:u,variant:f,gradient:p,classNames:g,styles:v,imageProps:y,unstyled:w}=n,P=kne(n,["className","size","src","alt","radius","children","color","variant","gradient","classNames","styles","imageProps","unstyled"]),x=sne(),[S,O]=_.useState(!i),{classes:E,cx:$}=xne({color:u,radius:a,withinGroup:x.withinGroup,spacing:x.spacing,gradient:p},{classNames:g,styles:v,unstyled:w,name:"Avatar",variant:f,size:o});return _.useEffect(()=>{O(!i)},[i]),k.createElement(Pe,v$({component:"div",className:$(E.root,r),ref:t},P),S?k.createElement("div",{className:E.placeholder,title:s},c||k.createElement(Jte,{className:E.placeholderIcon})):k.createElement("img",Cne(v$({},y),{className:E.image,src:i,alt:s,onError:()=>O(!0)})))});OP.displayName="@mantine/core/Avatar";OP.Group=aA;const CP=OP;var $ne=Object.defineProperty,Mne=Object.defineProperties,Nne=Object.getOwnPropertyDescriptors,y$=Object.getOwnPropertySymbols,Tne=Object.prototype.hasOwnProperty,Ine=Object.prototype.propertyIsEnumerable,_$=(e,t,n)=>t in e?$ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,I_=(e,t)=>{for(var n in t||(t={}))Tne.call(t,n)&&_$(e,n,t[n]);if(y$)for(var n of y$(t))Ine.call(t,n)&&_$(e,n,t[n]);return e},jne=(e,t)=>Mne(e,Nne(t));const Lne=["light","filled","outline","dot","gradient"],j_={xs:{fontSize:M(9),height:M(16)},sm:{fontSize:M(10),height:M(18)},md:{fontSize:M(11),height:M(20)},lg:{fontSize:M(13),height:M(26)},xl:{fontSize:M(16),height:M(32)}},Dne={xs:M(4),sm:M(4),md:M(6),lg:M(8),xl:M(10)};function Rne({theme:e,variant:t,color:n,size:r,gradient:o}){if(!Lne.includes(t))return null;if(t==="dot"){const s=re({size:r,sizes:Dne});return{backgroundColor:"transparent",color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],border:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[3]}`,paddingLeft:`calc(${re({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:`${M(t==="gradient"?0:1)} solid ${i.border}`}}var zne=ue((e,{color:t,radius:n,gradient:r,fullWidth:o},{variant:i,size:s})=>{const{fontSize:a,height:c}=s in j_?j_[s]:j_.md;return{leftSection:{marginRight:`calc(${e.spacing.xs} / 2)`},rightSection:{marginLeft:`calc(${e.spacing.xs} / 2)`},inner:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},root:I_(jne(I_(I_({},e.fn.focusStyles()),e.fn.fontStyles()),{fontSize:a,height:c,WebkitTapHighlightColor:"transparent",lineHeight:`calc(${c} - ${M(2)})`,textDecoration:"none",padding:`0 calc(${re({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:M(.25),cursor:"inherit",textOverflow:"ellipsis",overflow:"hidden"}),Rne({theme:e,variant:i,color:t,size:s,gradient:r}))}});const Ane=zne;var Bne=Object.defineProperty,Pg=Object.getOwnPropertySymbols,uA=Object.prototype.hasOwnProperty,dA=Object.prototype.propertyIsEnumerable,w$=(e,t,n)=>t in e?Bne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fne=(e,t)=>{for(var n in t||(t={}))uA.call(t,n)&&w$(e,n,t[n]);if(Pg)for(var n of Pg(t))dA.call(t,n)&&w$(e,n,t[n]);return e},Vne=(e,t)=>{var n={};for(var r in e)uA.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&&dA.call(e,r)&&(n[r]=e[r]);return n};const Hne={variant:"light",size:"md",radius:"xl"},fA=_.forwardRef((e,t)=>{const n=ae("Badge",Hne,e),{className:r,color:o,variant:i,fullWidth:s,children:a,size:c,leftSection:u,rightSection:f,radius:p,gradient:g,classNames:v,styles:y,unstyled:w}=n,P=Vne(n,["className","color","variant","fullWidth","children","size","leftSection","rightSection","radius","gradient","classNames","styles","unstyled"]),{classes:x,cx:S}=Ane({fullWidth:s,color:o,radius:p,gradient:g},{classNames:v,styles:y,name:"Badge",unstyled:w,variant:i,size:c});return k.createElement(Pe,Fne({className:S(x.root,r),ref:t},P),u&&k.createElement("span",{className:x.leftSection},u),k.createElement("span",{className:x.inner},a),f&&k.createElement("span",{className:x.rightSection},f))});fA.displayName="@mantine/core/Badge";const mt=fA;var Wne=ue((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(${M(n)} / 2)`},"&:last-of-type:not(:first-of-type)":{borderTopLeftRadius:0,[t==="vertical"?"borderTopRightRadius":"borderBottomLeftRadius"]:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${M(n)} / 2)`},"&:not(:first-of-type):not(:last-of-type)":{borderRadius:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${M(n)} / 2)`,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:`calc(${M(n)} / 2)`},"& + [data-button]":{[t==="vertical"?"marginTop":"marginLeft"]:`calc(${n} * -1)`,"@media (min-resolution: 192dpi)":{[t==="vertical"?"marginTop":"marginLeft"]:0}}}}}));const Une=Wne;var Zne=Object.defineProperty,Og=Object.getOwnPropertySymbols,pA=Object.prototype.hasOwnProperty,hA=Object.prototype.propertyIsEnumerable,b$=(e,t,n)=>t in e?Zne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gne=(e,t)=>{for(var n in t||(t={}))pA.call(t,n)&&b$(e,n,t[n]);if(Og)for(var n of Og(t))hA.call(t,n)&&b$(e,n,t[n]);return e},Yne=(e,t)=>{var n={};for(var r in e)pA.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&&hA.call(e,r)&&(n[r]=e[r]);return n};const Kne={orientation:"horizontal",buttonBorderWidth:1},mA=_.forwardRef((e,t)=>{const n=ae("ButtonGroup",Kne,e),{className:r,orientation:o,buttonBorderWidth:i,unstyled:s}=n,a=Yne(n,["className","orientation","buttonBorderWidth","unstyled"]),{classes:c,cx:u}=Une({orientation:o,buttonBorderWidth:i},{name:"ButtonGroup",unstyled:s});return k.createElement(Pe,Gne({className:u(c.root,r),ref:t},a))});mA.displayName="@mantine/core/ButtonGroup";var qne=Object.defineProperty,Jne=Object.defineProperties,Xne=Object.getOwnPropertyDescriptors,x$=Object.getOwnPropertySymbols,Qne=Object.prototype.hasOwnProperty,ere=Object.prototype.propertyIsEnumerable,S$=(e,t,n)=>t in e?qne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ns=(e,t)=>{for(var n in t||(t={}))Qne.call(t,n)&&S$(e,n,t[n]);if(x$)for(var n of x$(t))ere.call(t,n)&&S$(e,n,t[n]);return e},Uh=(e,t)=>Jne(e,Xne(t));const tre=["filled","outline","light","white","default","subtle","gradient"],qb={xs:{height:Dn.xs,paddingLeft:M(14),paddingRight:M(14)},sm:{height:Dn.sm,paddingLeft:M(18),paddingRight:M(18)},md:{height:Dn.md,paddingLeft:M(22),paddingRight:M(22)},lg:{height:Dn.lg,paddingLeft:M(26),paddingRight:M(26)},xl:{height:Dn.xl,paddingLeft:M(32),paddingRight:M(32)},"compact-xs":{height:M(22),paddingLeft:M(7),paddingRight:M(7)},"compact-sm":{height:M(26),paddingLeft:M(8),paddingRight:M(8)},"compact-md":{height:M(30),paddingLeft:M(10),paddingRight:M(10)},"compact-lg":{height:M(34),paddingLeft:M(12),paddingRight:M(12)},"compact-xl":{height:M(40),paddingLeft:M(14),paddingRight:M(14)}};function nre({compact:e,size:t,withLeftIcon:n,withRightIcon:r}){if(e)return qb[`compact-${t}`];const o=qb[t];return o?Uh(ns({},o),{paddingLeft:n?`calc(${o.paddingLeft} / 1.5)`:o.paddingLeft,paddingRight:r?`calc(${o.paddingRight} / 1.5)`:o.paddingRight}):{}}const rre=e=>({display:e?"block":"inline-block",width:e?"100%":"auto"});function ore({variant:e,theme:t,color:n,gradient:r}){if(!tre.includes(e))return null;const o=t.fn.variant({color:n,variant:e,gradient:r});return e==="gradient"?ns({border:0,backgroundImage:o.background,color:o.color},t.fn.hover({backgroundSize:"200%"})):ns({border:`${M(1)} solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover}))}var ire=ue((e,{radius:t,fullWidth:n,compact:r,withLeftIcon:o,withRightIcon:i,color:s,gradient:a},{variant:c,size:u})=>({root:Uh(ns(Uh(ns(ns(ns(ns({},nre({compact:r,size:u,withLeftIcon:o,withRightIcon:i})),e.fn.fontStyles()),e.fn.focusStyles()),rre(n)),{borderRadius:e.fn.radius(t),fontWeight:600,position:"relative",lineHeight:1,fontSize:re({size:u,sizes:e.fontSizes}),userSelect:"none",cursor:"pointer"}),ore({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":Uh(ns({content:'""'},e.fn.cover(M(-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 sre=ire;var are=Object.defineProperty,Cg=Object.getOwnPropertySymbols,gA=Object.prototype.hasOwnProperty,vA=Object.prototype.propertyIsEnumerable,P$=(e,t,n)=>t in e?are(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,O$=(e,t)=>{for(var n in t||(t={}))gA.call(t,n)&&P$(e,n,t[n]);if(Cg)for(var n of Cg(t))vA.call(t,n)&&P$(e,n,t[n]);return e},lre=(e,t)=>{var n={};for(var r in e)gA.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&&vA.call(e,r)&&(n[r]=e[r]);return n};const cre={size:"sm",type:"button",variant:"filled",loaderPosition:"left"},kP=_.forwardRef((e,t)=>{const n=ae("Button",cre,e),{className:r,size:o,color:i,type:s,disabled:a,children:c,leftIcon:u,rightIcon:f,fullWidth:p,variant:g,radius:v,uppercase:y,compact:w,loading:P,loaderPosition:x,loaderProps:S,gradient:O,classNames:E,styles:$,unstyled:N}=n,I=lre(n,["className","size","color","type","disabled","children","leftIcon","rightIcon","fullWidth","variant","radius","uppercase","compact","loading","loaderPosition","loaderProps","gradient","classNames","styles","unstyled"]),{classes:R,cx:B,theme:z}=sre({radius:v,color:i,fullWidth:p,compact:w,gradient:O,withLeftIcon:!!u,withRightIcon:!!f},{name:"Button",unstyled:N,classNames:E,styles:$,variant:g,size:o}),G=z.fn.variant({color:i,variant:g}),X=k.createElement(en,O$({color:G.color,size:`calc(${re({size:o,sizes:qb}).height} / 2)`},S));return k.createElement(ls,O$({className:B(R.root,r),type:s,disabled:a,"data-button":!0,"data-disabled":a||void 0,"data-loading":P||void 0,ref:t,unstyled:N},I),k.createElement("div",{className:R.inner},(u||P&&x==="left")&&k.createElement("span",{className:B(R.icon,R.leftIcon)},P&&x==="left"?X:u),P&&x==="center"&&k.createElement("span",{className:R.centerLoader},X),k.createElement("span",{className:R.label,style:{textTransform:y?"uppercase":void 0}},c),(f||P&&x==="right")&&k.createElement("span",{className:B(R.icon,R.rightIcon)},P&&x==="right"?X:f)))});kP.displayName="@mantine/core/Button";kP.Group=mA;const st=kP;var ure=ue((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:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`}}}));const dre=ure;var fre=Object.defineProperty,kg=Object.getOwnPropertySymbols,yA=Object.prototype.hasOwnProperty,_A=Object.prototype.propertyIsEnumerable,C$=(e,t,n)=>t in e?fre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pre=(e,t)=>{for(var n in t||(t={}))yA.call(t,n)&&C$(e,n,t[n]);if(kg)for(var n of kg(t))_A.call(t,n)&&C$(e,n,t[n]);return e},hre=(e,t)=>{var n={};for(var r in e)yA.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&&_A.call(e,r)&&(n[r]=e[r]);return n};const mre={},wA=_.forwardRef((e,t)=>{const n=ae("Paper",mre,e),{className:r,children:o,radius:i,withBorder:s,shadow:a,unstyled:c,variant:u}=n,f=hre(n,["className","children","radius","withBorder","shadow","unstyled","variant"]),{classes:p,cx:g}=dre({radius:i,shadow:a},{name:"Paper",unstyled:c,variant:u});return k.createElement(Pe,pre({className:g(p.root,r),"data-with-border":s||void 0,ref:t},f),o)});wA.displayName="@mantine/core/Paper";const gre=wA;var vre=ue((e,{inline:t})=>({root:{display:t?"inline-flex":"flex",alignItems:"center",justifyContent:"center"}}));const yre=vre;var _re=Object.defineProperty,Eg=Object.getOwnPropertySymbols,bA=Object.prototype.hasOwnProperty,xA=Object.prototype.propertyIsEnumerable,k$=(e,t,n)=>t in e?_re(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wre=(e,t)=>{for(var n in t||(t={}))bA.call(t,n)&&k$(e,n,t[n]);if(Eg)for(var n of Eg(t))xA.call(t,n)&&k$(e,n,t[n]);return e},bre=(e,t)=>{var n={};for(var r in e)bA.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&&xA.call(e,r)&&(n[r]=e[r]);return n};const SA=_.forwardRef((e,t)=>{const n=ae("Center",{},e),{inline:r,className:o,unstyled:i,variant:s}=n,a=bre(n,["inline","className","unstyled","variant"]),{classes:c,cx:u}=yre({inline:r},{name:"Center",unstyled:i,variant:s});return k.createElement(Pe,wre({ref:t,className:u(c.root,o)},a))});SA.displayName="@mantine/core/Center";const Pr=SA,PA=_.createContext(null),xre=PA.Provider,Sre=()=>_.useContext(PA);var Pre=Object.defineProperty,$g=Object.getOwnPropertySymbols,OA=Object.prototype.hasOwnProperty,CA=Object.prototype.propertyIsEnumerable,E$=(e,t,n)=>t in e?Pre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$$=(e,t)=>{for(var n in t||(t={}))OA.call(t,n)&&E$(e,n,t[n]);if($g)for(var n of $g(t))CA.call(t,n)&&E$(e,n,t[n]);return e},Ore=(e,t)=>{var n={};for(var r in e)OA.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&&CA.call(e,r)&&(n[r]=e[r]);return n};const Cre={size:"sm"},kA=_.forwardRef((e,t)=>{const n=ae("CheckboxGroup",Cre,e),{children:r,value:o,defaultValue:i,onChange:s,size:a,wrapperProps:c}=n,u=Ore(n,["children","value","defaultValue","onChange","size","wrapperProps"]),[f,p]=go({value:o,defaultValue:i,finalValue:[],onChange:s}),g=v=>{const y=v.currentTarget.value;p(f.includes(y)?f.filter(w=>w!==y):[...f,y])};return k.createElement(xre,{value:{value:f,onChange:g,size:a}},k.createElement(et.Wrapper,$$($$({labelElement:"div",size:a,__staticSelector:"CheckboxGroup",ref:t},c),u),r))});kA.displayName="@mantine/core/CheckboxGroup";var kre=Object.defineProperty,Mg=Object.getOwnPropertySymbols,EA=Object.prototype.hasOwnProperty,$A=Object.prototype.propertyIsEnumerable,M$=(e,t,n)=>t in e?kre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ng=(e,t)=>{for(var n in t||(t={}))EA.call(t,n)&&M$(e,n,t[n]);if(Mg)for(var n of Mg(t))$A.call(t,n)&&M$(e,n,t[n]);return e},MA=(e,t)=>{var n={};for(var r in e)EA.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&&$A.call(e,r)&&(n[r]=e[r]);return n};function Ere(e){const t=e,{width:n,height:r,style:o}=t,i=MA(t,["width","height","style"]);return k.createElement("svg",Ng({viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:Ng({width:n,height:r},o)},i),k.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 $re(e){var t=e,{indeterminate:n}=t,r=MA(t,["indeterminate"]);return n?k.createElement("svg",Ng({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6"},r),k.createElement("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})):k.createElement(Ere,Ng({},r))}var Mre=Object.defineProperty,Nre=Object.defineProperties,Tre=Object.getOwnPropertyDescriptors,N$=Object.getOwnPropertySymbols,Ire=Object.prototype.hasOwnProperty,jre=Object.prototype.propertyIsEnumerable,T$=(e,t,n)=>t in e?Mre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,I$=(e,t)=>{for(var n in t||(t={}))Ire.call(t,n)&&T$(e,n,t[n]);if(N$)for(var n of N$(t))jre.call(t,n)&&T$(e,n,t[n]);return e},j$=(e,t)=>Nre(e,Tre(t));const Lre={xs:M(16),sm:M(20),md:M(24),lg:M(30),xl:M(36)};var Dre=ue((e,{radius:t,color:n,transitionDuration:r,labelPosition:o,error:i,indeterminate:s},{size:a})=>{const c=re({size:a,sizes:Lre}),u=e.fn.variant({variant:"filled",color:n});return{icon:j$(I$({},e.fn.cover()),{ref:Ar("icon"),color:s?"inherit":e.white,transform:s?"none":`translateY(${M(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:j$(I$({},e.fn.focusStyles()),{appearance:"none",backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`${M(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,[`& + .${Ar("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",pointerEvents:"none",[`& + .${Ar("icon")}`]:{color:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[5]}}})}});const Rre=Dre;var zre=Object.defineProperty,Are=Object.defineProperties,Bre=Object.getOwnPropertyDescriptors,L$=Object.getOwnPropertySymbols,Fre=Object.prototype.hasOwnProperty,Vre=Object.prototype.propertyIsEnumerable,D$=(e,t,n)=>t in e?zre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hre=(e,t)=>{for(var n in t||(t={}))Fre.call(t,n)&&D$(e,n,t[n]);if(L$)for(var n of L$(t))Vre.call(t,n)&&D$(e,n,t[n]);return e},Wre=(e,t)=>Are(e,Bre(t));const L_={xs:M(16),sm:M(20),md:M(24),lg:M(30),xl:M(36)};var Ure=ue((e,{labelPosition:t},{size:n})=>({root:{},body:{display:"flex","&:has(input:disabled) label":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}},labelWrapper:Wre(Hre({},e.fn.fontStyles()),{display:"inline-flex",flexDirection:"column",WebkitTapHighlightColor:"transparent",fontSize:n in L_?re({size:n,sizes:e.fontSizes}):void 0,lineHeight:n in L_?re({size:n,sizes:L_}):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,"&:disabled, &[data-disabled]":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}}));const Zre=Ure;var Gre=Object.defineProperty,Tg=Object.getOwnPropertySymbols,NA=Object.prototype.hasOwnProperty,TA=Object.prototype.propertyIsEnumerable,R$=(e,t,n)=>t in e?Gre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yre=(e,t)=>{for(var n in t||(t={}))NA.call(t,n)&&R$(e,n,t[n]);if(Tg)for(var n of Tg(t))TA.call(t,n)&&R$(e,n,t[n]);return e},Kre=(e,t)=>{var n={};for(var r in e)NA.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&&TA.call(e,r)&&(n[r]=e[r]);return n};const EP=_.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:g,error:v,size:y,labelPosition:w,variant:P}=n,x=Kre(n,["__staticSelector","className","classNames","styles","unstyled","children","label","description","id","disabled","error","size","labelPosition","variant"]);const{classes:S,cx:O}=Zre({labelPosition:w},{name:r,styles:s,classNames:i,unstyled:a,variant:P,size:y});return k.createElement(Pe,Yre({className:O(S.root,o),ref:t},x),k.createElement("div",{className:O(S.body)},c,k.createElement("div",{className:S.labelWrapper},u!=null&&k.createElement("label",{className:S.label,"data-disabled":g||void 0,htmlFor:p},u),f&&k.createElement(et.Description,{className:S.description},f),v&&v!=="boolean"&&k.createElement(et.Error,{className:S.error},v))))});EP.displayName="@mantine/core/InlineInput";var qre=Object.defineProperty,Ig=Object.getOwnPropertySymbols,IA=Object.prototype.hasOwnProperty,jA=Object.prototype.propertyIsEnumerable,z$=(e,t,n)=>t in e?qre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qp=(e,t)=>{for(var n in t||(t={}))IA.call(t,n)&&z$(e,n,t[n]);if(Ig)for(var n of Ig(t))jA.call(t,n)&&z$(e,n,t[n]);return e},Jre=(e,t)=>{var n={};for(var r in e)IA.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&&jA.call(e,r)&&(n[r]=e[r]);return n};const Xre={size:"sm",transitionDuration:100,icon:$re,labelPosition:"right"},mr=_.forwardRef((e,t)=>{const n=ae("Checkbox",Xre,e),{className:r,style:o,sx:i,checked:s,disabled:a,color:c,label:u,indeterminate:f,id:p,size:g,radius:v,wrapperProps:y,children:w,classNames:P,styles:x,transitionDuration:S,icon:O,unstyled:E,labelPosition:$,description:N,error:I,variant:R}=n,B=Jre(n,["className","style","sx","checked","disabled","color","label","indeterminate","id","size","radius","wrapperProps","children","classNames","styles","transitionDuration","icon","unstyled","labelPosition","description","error","variant"]),z=Sre(),G=$a(p),{systemStyles:X,rest:Q}=Dl(B),{classes:V}=Rre({radius:v,color:c,transitionDuration:S,labelPosition:$,error:!!I,indeterminate:f},{name:"Checkbox",classNames:P,styles:x,unstyled:E,variant:R,size:z?.size||g}),H=z?{checked:z.value.includes(Q.value),onChange:z.onChange}:{};return k.createElement(EP,Qp(Qp({className:r,sx:i,style:o,id:G,size:z?.size||g,labelPosition:$,label:u,description:N,error:I,disabled:a,__staticSelector:"Checkbox",classNames:P,styles:x,unstyled:E,"data-checked":H.checked||void 0,variant:R},X),y),k.createElement("div",{className:V.inner},k.createElement("input",Qp(Qp({id:G,ref:t,type:"checkbox",className:V.input,checked:s,disabled:a},Q),H)),k.createElement(O,{indeterminate:f,className:V.icon})))});mr.displayName="@mantine/core/Checkbox";mr.Group=kA;var Qre=Object.defineProperty,eoe=Object.defineProperties,toe=Object.getOwnPropertyDescriptors,A$=Object.getOwnPropertySymbols,noe=Object.prototype.hasOwnProperty,roe=Object.prototype.propertyIsEnumerable,B$=(e,t,n)=>t in e?Qre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,F$=(e,t)=>{for(var n in t||(t={}))noe.call(t,n)&&B$(e,n,t[n]);if(A$)for(var n of A$(t))roe.call(t,n)&&B$(e,n,t[n]);return e},V$=(e,t)=>eoe(e,toe(t)),ooe=ue((e,{radius:t},{size:n})=>{const r=e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3];return{root:V$(F$({},e.fn.focusStyles()),{width:M(n),height:M(n),WebkitTapHighlightColor:"transparent",border:0,borderRadius:e.fn.radius(t),appearance:"none",WebkitAppearance:"none",padding:0,position:"relative",overflow:"hidden"}),overlay:V$(F$({},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 ${M(1)} inset, rgb(0, 0, 0, .15) 0 0 ${M(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:`${M(8)} ${M(8)}`,backgroundPosition:`0 0, 0 ${M(4)}, ${M(4)} -${M(4)}, -${M(4)} 0`}}});const ioe=ooe;var soe=Object.defineProperty,jg=Object.getOwnPropertySymbols,LA=Object.prototype.hasOwnProperty,DA=Object.prototype.propertyIsEnumerable,H$=(e,t,n)=>t in e?soe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,aoe=(e,t)=>{for(var n in t||(t={}))LA.call(t,n)&&H$(e,n,t[n]);if(jg)for(var n of jg(t))DA.call(t,n)&&H$(e,n,t[n]);return e},loe=(e,t)=>{var n={};for(var r in e)LA.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&&DA.call(e,r)&&(n[r]=e[r]);return n};const coe={size:M(25),radius:M(25),withShadow:!0},RA=_.forwardRef((e,t)=>{const n=ae("ColorSwatch",coe,e),{color:r,size:o,radius:i,className:s,children:a,classNames:c,styles:u,unstyled:f,withShadow:p,variant:g}=n,v=loe(n,["color","size","radius","className","children","classNames","styles","unstyled","withShadow","variant"]),{classes:y,cx:w}=ioe({radius:i},{classNames:c,styles:u,unstyled:f,name:"ColorSwatch",size:o,variant:g});return k.createElement(Pe,aoe({className:w(y.root,s),ref:t},v),k.createElement("div",{className:w(y.alphaOverlay,y.overlay)}),p&&k.createElement("div",{className:w(y.shadowOverlay,y.overlay)}),k.createElement("div",{className:y.overlay,style:{backgroundColor:r}}),k.createElement("div",{className:w(y.children,y.overlay)},a))});RA.displayName="@mantine/core/ColorSwatch";const pf=RA,Oi={xs:M(8),sm:M(12),md:M(16),lg:M(20),xl:M(22)};var uoe=ue((e,t,{size:n})=>{const r=re({size:n,sizes:Oi});return{thumb:{overflow:"hidden",boxSizing:"border-box",position:"absolute",boxShadow:`0 0 ${M(1)} rgba(0, 0, 0, .6)`,border:`${M(2)} solid ${e.white}`,backgroundColor:"transparent",width:r,height:r,borderRadius:r}}});const doe=uoe;var foe=Object.defineProperty,W$=Object.getOwnPropertySymbols,poe=Object.prototype.hasOwnProperty,hoe=Object.prototype.propertyIsEnumerable,U$=(e,t,n)=>t in e?foe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,moe=(e,t)=>{for(var n in t||(t={}))poe.call(t,n)&&U$(e,n,t[n]);if(W$)for(var n of W$(t))hoe.call(t,n)&&U$(e,n,t[n]);return e};function $P({position:e,className:t,styles:n,classNames:r,style:o,size:i,__staticSelector:s,unstyled:a,variant:c}){const{classes:u,cx:f}=doe(null,{classNames:r,styles:n,name:s,unstyled:a,size:i,variant:c});return k.createElement("div",{className:f(u.thumb,t),style:moe({left:`calc(${e.x*100}% - ${Oi[i]} / 2)`,top:`calc(${e.y*100}% - ${Oi[i]} / 2)`},o)})}$P.displayName="@mantine/core/Thumb";var goe=Object.defineProperty,Z$=Object.getOwnPropertySymbols,voe=Object.prototype.hasOwnProperty,yoe=Object.prototype.propertyIsEnumerable,G$=(e,t,n)=>t in e?goe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Y$=(e,t)=>{for(var n in t||(t={}))voe.call(t,n)&&G$(e,n,t[n]);if(Z$)for(var n of Z$(t))yoe.call(t,n)&&G$(e,n,t[n]);return e},_oe=ue((e,t,{size:n})=>({sliderThumb:{ref:Ar("sliderThumb")},slider:{position:"relative",height:`calc(${re({size:n,sizes:Oi})} + ${M(2)})`,boxSizing:"border-box",marginLeft:`calc(${re({size:n,sizes:Oi})} / 2)`,marginRight:`calc(${re({size:n,sizes:Oi})} / 2)`,outline:0,[`&:focus .${Ar("sliderThumb")}`]:Y$({},e.focusRing==="always"||e.focusRing==="auto"?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),[`&:focus:not(:focus-visible) .${Ar("sliderThumb")}`]:Y$({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)},sliderOverlay:{position:"absolute",boxSizing:"border-box",top:0,bottom:0,left:`calc(${re({size:n,sizes:Oi})} * -1 / 2 - ${M(1)})`,right:`calc(${re({size:n,sizes:Oi})} * -1 / 2 - ${M(1)})`,borderRadius:1e3}}));const woe=_oe;var boe=Object.defineProperty,xoe=Object.defineProperties,Soe=Object.getOwnPropertyDescriptors,Lg=Object.getOwnPropertySymbols,zA=Object.prototype.hasOwnProperty,AA=Object.prototype.propertyIsEnumerable,K$=(e,t,n)=>t in e?boe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Poe=(e,t)=>{for(var n in t||(t={}))zA.call(t,n)&&K$(e,n,t[n]);if(Lg)for(var n of Lg(t))AA.call(t,n)&&K$(e,n,t[n]);return e},Ooe=(e,t)=>xoe(e,Soe(t)),Coe=(e,t)=>{var n={};for(var r in e)zA.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&&AA.call(e,r)&&(n[r]=e[r]);return n};const MP=_.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:g,classNames:v,styles:y,className:w,unstyled:P,variant:x}=n,S=Coe(n,["value","onChange","onChangeEnd","maxValue","round","size","thumbColor","__staticSelector","focusable","overlays","classNames","styles","className","unstyled","variant"]);const{classes:O,cx:E}=woe(null,{classNames:v,styles:y,name:f,unstyled:P,variant:x,size:c}),[$,N]=_.useState({y:0,x:r/s}),I=_.useRef($),R=Q=>a?Math.round(Q*s):Q*s,{ref:B}=Z3(({x:Q,y:V})=>{I.current={x:Q,y:V},o(R(Q))},{onScrubEnd:()=>{const{x:Q}=I.current;i(R(Q))}});Fn(()=>{N({y:0,x:r/s})},[r]);const z=(Q,V)=>{Q.preventDefault();const H=U3(V);o(R(H.x)),i(R(H.x))},G=Q=>{switch(Q.key){case"ArrowRight":{z(Q,{x:$.x+.05,y:$.y});break}case"ArrowLeft":{z(Q,{x:$.x-.05,y:$.y});break}}},X=g.map((Q,V)=>k.createElement("div",{className:O.sliderOverlay,style:Q,key:V}));return k.createElement(Pe,Ooe(Poe({},S),{ref:ws(B,t),className:E(O.slider,w),role:"slider","aria-valuenow":r,"aria-valuemax":s,"aria-valuemin":0,tabIndex:p?0:-1,onKeyDown:G}),X,k.createElement($P,{__staticSelector:f,classNames:v,styles:y,position:$,style:{top:M(1),backgroundColor:u},className:O.sliderThumb,size:c}))});MP.displayName="@mantine/core/ColorSlider";var koe=Object.defineProperty,Eoe=Object.defineProperties,$oe=Object.getOwnPropertyDescriptors,Dg=Object.getOwnPropertySymbols,BA=Object.prototype.hasOwnProperty,FA=Object.prototype.propertyIsEnumerable,q$=(e,t,n)=>t in e?koe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Moe=(e,t)=>{for(var n in t||(t={}))BA.call(t,n)&&q$(e,n,t[n]);if(Dg)for(var n of Dg(t))FA.call(t,n)&&q$(e,n,t[n]);return e},Noe=(e,t)=>Eoe(e,$oe(t)),Toe=(e,t)=>{var n={};for(var r in e)BA.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&&FA.call(e,r)&&(n[r]=e[r]);return n};const Ioe={},VA=_.forwardRef((e,t)=>{const n=ae("HueSlider",Ioe,e),{value:r,onChange:o,onChangeEnd:i,__staticSelector:s}=n,a=Toe(n,["value","onChange","onChangeEnd","__staticSelector"]);return k.createElement(MP,Noe(Moe({},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 ${M(1)} inset, rgb(0, 0, 0, .15) 0 0 ${M(4)} inset`}]}))});VA.displayName="@mantine/core/HueSlider";var joe=Object.defineProperty,Loe=Object.defineProperties,Doe=Object.getOwnPropertyDescriptors,J$=Object.getOwnPropertySymbols,Roe=Object.prototype.hasOwnProperty,zoe=Object.prototype.propertyIsEnumerable,X$=(e,t,n)=>t in e?joe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Q$=(e,t)=>{for(var n in t||(t={}))Roe.call(t,n)&&X$(e,n,t[n]);if(J$)for(var n of J$(t))zoe.call(t,n)&&X$(e,n,t[n]);return e},eM=(e,t)=>Loe(e,Doe(t));function Io(e,t=0,n=10**t){return Math.round(n*e)/n}function Aoe({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 Boe={grad:360/400,turn:360,rad:360/(Math.PI*2)};function Foe(e,t="deg"){return Number(e)*(Boe[t]||1)}const Voe=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function tM(e){const t=Voe.exec(e);return t?Aoe({h:Foe(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 Jb({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:Io(60*(s<0?s+6:s),3),s:Io(o?i/o*100:0,3),v:Io(o/255*100,3),a:r}}function Xb(e){const t=e[0]==="#"?e.slice(1):e;return t.length===3?Jb({r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:1}):Jb({r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:1})}function Hoe(e){const t=e[0]==="#"?e.slice(1):e,n=s=>Io(parseInt(s,16)/255,3);if(t.length===4){const s=t.slice(0,3),a=n(t[3]+t[3]);return eM(Q$({},Xb(s)),{a})}const r=t.slice(0,6),o=n(t.slice(6,8));return eM(Q$({},Xb(r)),{a:o})}const Woe=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function nM(e){const t=Woe.exec(e);return t?Jb({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 HA={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},Uoe={hex:Xb,hexa:Hoe,rgb:nM,rgba:nM,hsl:tM,hsla:tM};function Zoe(e){for(const[,t]of Object.entries(HA))if(t.test(e))return!0;return!1}function eh(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(HA))if(r.test(t))return Uoe[n](t);return{h:0,s:0,v:0,a:1}}var Goe=Object.defineProperty,Yoe=Object.defineProperties,Koe=Object.getOwnPropertyDescriptors,Rg=Object.getOwnPropertySymbols,WA=Object.prototype.hasOwnProperty,UA=Object.prototype.propertyIsEnumerable,rM=(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={}))WA.call(t,n)&&rM(e,n,t[n]);if(Rg)for(var n of Rg(t))UA.call(t,n)&&rM(e,n,t[n]);return e},Joe=(e,t)=>Yoe(e,Koe(t)),Xoe=(e,t)=>{var n={};for(var r in e)WA.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&&UA.call(e,r)&&(n[r]=e[r]);return n};const Qoe={},ZA=_.forwardRef((e,t)=>{const n=ae("AlphaSlider",Qoe,e),{value:r,onChange:o,onChangeEnd:i,color:s,__staticSelector:a}=n,c=Xoe(n,["value","onChange","onChangeEnd","color","__staticSelector"]),u=ir(),f=u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[3];return k.createElement(MP,Joe(qoe({},c),{ref:t,value:r,onChange:p=>o(Io(p,2)),onChangeEnd:p=>i(Io(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:`${M(8)} ${M(8)}`,backgroundPosition:`0 0, 0 ${M(4)}, ${M(4)} -${M(4)}, -${M(4)} 0`},{backgroundImage:`linear-gradient(90deg, transparent, ${s})`},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${M(1)} inset, rgb(0, 0, 0, .15) 0 0 ${M(4)} inset`}]}))});ZA.displayName="@mantine/core/AlphaSlider";var eie=Object.defineProperty,oM=Object.getOwnPropertySymbols,tie=Object.prototype.hasOwnProperty,nie=Object.prototype.propertyIsEnumerable,iM=(e,t,n)=>t in e?eie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,D_=(e,t)=>{for(var n in t||(t={}))tie.call(t,n)&&iM(e,n,t[n]);if(oM)for(var n of oM(t))nie.call(t,n)&&iM(e,n,t[n]);return e};const rie={xs:M(100),sm:M(110),md:M(120),lg:M(140),xl:M(160)};var oie=ue((e,t,{size:n})=>({saturationThumb:{ref:Ar("saturationThumb")},saturation:{boxSizing:"border-box",position:"relative",height:re({size:n,sizes:rie}),borderRadius:e.radius.sm,margin:`calc(${re({size:n,sizes:Oi})} / 2)`,WebkitTapHighlightColor:"transparent",[`&:focus .${Ar("saturationThumb")}`]:D_({},e.focusRing==="always"||e.focusRing==="auto"?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),[`&:focus:not(:focus-visible) .${Ar("saturationThumb")}`]:D_({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)},saturationOverlay:D_({boxSizing:"border-box",borderRadius:e.radius.sm},e.fn.cover(`calc(${re({size:n,sizes:Oi})} * -1 / 2 - ${M(1)})`))}));const iie=oie;function GA({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:Io([s,u,c,c,f,s][p]*255),g:Io([f,s,s,u,c,c][p]*255),b:Io([c,c,f,s,s,u][p]*255),a:Io(r,2)}}function sM(e,t){const{r:n,g:r,b:o,a:i}=GA(e);return t?`rgba(${n}, ${r}, ${o}, ${Io(i,2)})`:`rgb(${n}, ${r}, ${o})`}function aM({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}%, ${Io(r,2)})`:`hsl(${s.h}, ${s.s}%, ${s.l}%)`}function Zh(e){const t=e.toString(16);return t.length<2?`0${t}`:t}function YA(e){const{r:t,g:n,b:r}=GA(e);return`#${Zh(t)}${Zh(n)}${Zh(r)}`}function sie(e){const t=Math.round(e.a*255);return`${YA(e)}${Zh(t)}`}const R_={hex:YA,hexa:e=>sie(e),rgb:e=>sM(e,!1),rgba:e=>sM(e,!0),hsl:e=>aM(e,!1),hsla:e=>aM(e,!0)};function zs(e,t){return t?e in R_?R_[e](t):R_.hex(t):"#000000"}function KA({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:g}=iie(null,{classNames:c,styles:u,name:o,unstyled:f,variant:p,size:i}),[v,y]=_.useState({x:e.s/100,y:1-e.v/100}),w=_.useRef(v),{ref:P}=Z3(({x:O,y:E})=>{w.current={x:O,y:E},t({s:Math.round(O*100),v:Math.round((1-E)*100)})},{onScrubEnd:()=>{const{x:O,y:E}=w.current;n({s:Math.round(O*100),v:Math.round((1-E)*100)})}});_.useEffect(()=>{y({x:e.s/100,y:1-e.v/100})},[e.s,e.v]);const x=(O,E)=>{O.preventDefault();const $=U3(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=O=>{switch(O.key){case"ArrowUp":{x(O,{y:v.y-.05,x:v.x});break}case"ArrowDown":{x(O,{y:v.y+.05,x:v.x});break}case"ArrowRight":{x(O,{x:v.x+.05,y:v.y});break}case"ArrowLeft":{x(O,{x:v.x-.05,y:v.y});break}}};return k.createElement("div",{className:g.saturation,ref:P,role:"slider","aria-label":a,"aria-valuenow":v.x,"aria-valuetext":zs("rgba",e),tabIndex:r?0:-1,onKeyDown:S},k.createElement("div",{className:g.saturationOverlay,style:{backgroundColor:`hsl(${e.h}, 100%, 50%)`}}),k.createElement("div",{className:g.saturationOverlay,style:{backgroundImage:"linear-gradient(90deg, #fff, transparent)"}}),k.createElement("div",{className:g.saturationOverlay,style:{backgroundImage:"linear-gradient(0deg, #000, transparent)"}}),k.createElement($P,{__staticSelector:o,classNames:c,styles:u,position:v,className:g.saturationThumb,style:{backgroundColor:s},size:i}))}KA.displayName="@mantine/core/Saturation";var aie=ue((e,{swatchesPerRow:t})=>({swatch:{width:`calc(${100/t}% - ${M(4)})`,height:0,paddingBottom:`calc(${100/t}% - ${M(4)})`,margin:M(2),boxSizing:"content-box"},swatches:{boxSizing:"border-box",marginLeft:M(-2),marginRight:M(-2),display:"flex",flexWrap:"wrap"}}));const lie=aie;var cie=Object.defineProperty,zg=Object.getOwnPropertySymbols,qA=Object.prototype.hasOwnProperty,JA=Object.prototype.propertyIsEnumerable,lM=(e,t,n)=>t in e?cie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,uie=(e,t)=>{for(var n in t||(t={}))qA.call(t,n)&&lM(e,n,t[n]);if(zg)for(var n of zg(t))JA.call(t,n)&&lM(e,n,t[n]);return e},die=(e,t)=>{var n={};for(var r in e)qA.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&&JA.call(e,r)&&(n[r]=e[r]);return n};function XA(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:g}=t,v=die(t,["data","swatchesPerRow","focusable","classNames","styles","__staticSelector","unstyled","setValue","onChangeEnd","variant","size"]);const{classes:y}=lie({swatchesPerRow:r},{classNames:i,styles:s,name:a,unstyled:c,variant:p,size:g}),w=n.map((P,x)=>k.createElement(pf,{className:y.swatch,component:"button",type:"button",color:P,key:x,radius:"sm",onClick:()=>{u(P),f?.(P)},style:{cursor:"pointer"},"aria-label":P,tabIndex:o?0:-1}));return k.createElement("div",uie({className:y.swatches},v),w)}XA.displayName="@mantine/core/Swatches";const fie={xs:M(180),sm:M(200),md:M(240),lg:M(280),xl:M(320)};var pie=ue((e,{fullWidth:t},{size:n})=>({preview:{},wrapper:{boxSizing:"border-box",width:t?"100%":re({size:n,sizes:fie}),padding:M(1)},body:{display:"flex",boxSizing:"border-box",paddingTop:`calc(${re({size:n,sizes:e.spacing})} / 2)`},sliders:{flex:1,boxSizing:"border-box","&:not(:only-child)":{marginRight:e.spacing.xs}},slider:{boxSizing:"border-box","& + &":{marginTop:M(5)}},swatch:{cursor:"pointer"}}));const hie=pie;var mie=Object.defineProperty,gie=Object.defineProperties,vie=Object.getOwnPropertyDescriptors,Ag=Object.getOwnPropertySymbols,QA=Object.prototype.hasOwnProperty,e4=Object.prototype.propertyIsEnumerable,cM=(e,t,n)=>t in e?mie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ac=(e,t)=>{for(var n in t||(t={}))QA.call(t,n)&&cM(e,n,t[n]);if(Ag)for(var n of Ag(t))e4.call(t,n)&&cM(e,n,t[n]);return e},z_=(e,t)=>gie(e,vie(t)),yie=(e,t)=>{var n={};for(var r in e)QA.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&&e4.call(e,r)&&(n[r]=e[r]);return n};const _ie={xs:26,sm:34,md:42,lg:50,xl:54},wie={swatchesPerRow:10,size:"sm",withPicker:!0,focusable:!0,__staticSelector:"ColorPicker"},t4=_.forwardRef((e,t)=>{const n=ae("ColorPicker",wie,e),{value:r,defaultValue:o,onChange:i,onChangeEnd:s,format:a,swatches:c,swatchesPerRow:u,size:f,withPicker:p,fullWidth:g,focusable:v,__staticSelector:y,saturationLabel:w,hueLabel:P,alphaLabel:x,className:S,styles:O,classNames:E,unstyled:$,onColorSwatchClick:N,variant:I}=n,R=yie(n,["value","defaultValue","onChange","onChangeEnd","format","swatches","swatchesPerRow","size","withPicker","fullWidth","focusable","__staticSelector","saturationLabel","hueLabel","alphaLabel","className","styles","classNames","unstyled","onColorSwatchClick","variant"]),{classes:B,cx:z}=hie({fullWidth:g},{classNames:E,styles:O,name:y,unstyled:$,variant:I,size:f}),G=_.useRef(a),X=_.useRef(null),Q=_.useRef(!0),V=a==="hexa"||a==="rgba"||a==="hsla",[H,Z,Y]=go({value:r,defaultValue:o,finalValue:"#FFFFFF",onChange:i}),[j,W]=_.useState(eh(H)),F=K=>{Q.current=!1,W(ee=>{const fe=ac(ac({},ee),K);return X.current=zs(G.current,fe),fe}),Z(X.current),setTimeout(()=>{Q.current=!0},0)};return Fn(()=>{Zoe(r)&&Q.current&&(W(eh(r)),Q.current=!0)},[r]),Fn(()=>{G.current=a,Z(zs(a,j))},[a]),k.createElement(Pe,ac({className:z(B.wrapper,S),ref:t},R),p&&k.createElement(k.Fragment,null,k.createElement(KA,{value:j,onChange:F,onChangeEnd:({s:K,v:ee})=>s?.(zs(G.current,z_(ac({},j),{s:K,v:ee}))),color:H,styles:O,classNames:E,size:f,focusable:v,saturationLabel:w,__staticSelector:y}),k.createElement("div",{className:B.body},k.createElement("div",{className:B.sliders},k.createElement(VA,{value:j.h,onChange:K=>F({h:K}),onChangeEnd:K=>s?.(zs(G.current,z_(ac({},j),{h:K}))),size:f,styles:O,classNames:E,focusable:v,"aria-label":P,__staticSelector:y}),V&&k.createElement(ZA,{value:j.a,onChange:K=>F({a:K}),onChangeEnd:K=>{s?.(zs(G.current,z_(ac({},j),{a:K})))},size:f,color:zs("hex",j),style:{marginTop:M(6)},styles:O,classNames:E,focusable:v,"aria-label":x,__staticSelector:y})),V&&k.createElement(pf,{color:H,radius:"sm",size:re({size:f,sizes:_ie}),className:B.preview}))),Array.isArray(c)&&k.createElement(XA,{data:c,style:{marginTop:M(5)},swatchesPerRow:u,focusable:v,classNames:E,styles:O,__staticSelector:y,setValue:Z,onChangeEnd:K=>{const ee=zs(a,eh(K));N?.(ee),s?.(ee),Y||W(eh(K))}}))});t4.displayName="@mantine/core/ColorPicker";const[bie,xie]=wu("Drawer component was not found in tree"),uM={xs:M(320),sm:M(380),md:M(440),lg:M(620),xl:M(780)};var Sie=ue((e,{position:t},{size:n})=>({header:{zIndex:1e3},content:{flex:t==="right"||t==="left"?`0 0 ${re({size:n,sizes:uM})}`:"0 0 100%",maxWidth:"100%",maxHeight:"100%",height:t==="right"||t==="left"?"100%":re({size:n,sizes:uM}),borderRadius:0,overflowY:"auto"},inner:{display:"flex",justifyContent:t==="right"?"flex-end":"flex-start",alignItems:t==="bottom"?"flex-end":"flex-start"}}));const Pie=Sie,[Oie,Ou]=wu("ModalBase component was not found in tree");var Cie=ue(()=>({close:{marginLeft:"auto",marginRight:0}}));const kie=Cie;var Eie=Object.defineProperty,Bg=Object.getOwnPropertySymbols,n4=Object.prototype.hasOwnProperty,r4=Object.prototype.propertyIsEnumerable,dM=(e,t,n)=>t in e?Eie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$ie=(e,t)=>{for(var n in t||(t={}))n4.call(t,n)&&dM(e,n,t[n]);if(Bg)for(var n of Bg(t))r4.call(t,n)&&dM(e,n,t[n]);return e},Mie=(e,t)=>{var n={};for(var r in e)n4.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&&r4.call(e,r)&&(n[r]=e[r]);return n};const Nie={size:"sm"},Tie=_.forwardRef((e,t)=>{const n=Ou(),r=ae(`${n.__staticSelector}CloseButton`,Nie,e),{className:o}=r,i=Mie(r,["className"]),{classes:s,cx:a}=kie(null,n.stylesApi);return k.createElement(O0,$ie({className:a(s.close,o),ref:t,onClick:n.onClose},i))});var Iie=ue(()=>({overlay:{}}));const jie=Iie;var Lie=Object.defineProperty,Die=Object.defineProperties,Rie=Object.getOwnPropertyDescriptors,fM=Object.getOwnPropertySymbols,zie=Object.prototype.hasOwnProperty,Aie=Object.prototype.propertyIsEnumerable,pM=(e,t,n)=>t in e?Lie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bie=(e,t)=>{for(var n in t||(t={}))zie.call(t,n)&&pM(e,n,t[n]);if(fM)for(var n of fM(t))Aie.call(t,n)&&pM(e,n,t[n]);return e},Fie=(e,t)=>Die(e,Rie(t)),Vie=ue((e,{color:t,opacity:n,blur:r,radius:o,gradient:i,fixed:s,zIndex:a})=>({root:Fie(Bie({},e.fn.cover(0)),{position:s?"fixed":"absolute",backgroundColor:i?void 0:e.fn.rgba(t,n),backgroundImage:i,backdropFilter:r?`blur(${M(r)})`:void 0,borderRadius:e.fn.radius(o),zIndex:a,"&[data-center]":{display:"flex",alignItems:"center",justifyContent:"center"}})}));const Hie=Vie;var Wie=Object.defineProperty,Fg=Object.getOwnPropertySymbols,o4=Object.prototype.hasOwnProperty,i4=Object.prototype.propertyIsEnumerable,hM=(e,t,n)=>t in e?Wie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Uie=(e,t)=>{for(var n in t||(t={}))o4.call(t,n)&&hM(e,n,t[n]);if(Fg)for(var n of Fg(t))i4.call(t,n)&&hM(e,n,t[n]);return e},Zie=(e,t)=>{var n={};for(var r in e)o4.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&&i4.call(e,r)&&(n[r]=e[r]);return n};const Gie={opacity:.6,color:"#000",zIndex:ii("modal"),radius:0},s4=_.forwardRef((e,t)=>{const n=ae("Overlay",Gie,e),{variant:r,opacity:o,color:i,blur:s,gradient:a,zIndex:c,radius:u,children:f,className:p,classNames:g,styles:v,unstyled:y,center:w,fixed:P}=n,x=Zie(n,["variant","opacity","color","blur","gradient","zIndex","radius","children","className","classNames","styles","unstyled","center","fixed"]),{classes:S,cx:O}=Hie({color:i,opacity:o,blur:s,radius:u,gradient:a,fixed:P,zIndex:c},{name:"Overlay",classNames:g,styles:v,unstyled:y,variant:r});return k.createElement(Pe,Uie({ref:t,className:O(S.root,p),"data-center":w||void 0},x),f)});s4.displayName="@mantine/core/Overlay";const a4=s4;var Yie=Object.defineProperty,Kie=Object.defineProperties,qie=Object.getOwnPropertyDescriptors,Vg=Object.getOwnPropertySymbols,l4=Object.prototype.hasOwnProperty,c4=Object.prototype.propertyIsEnumerable,mM=(e,t,n)=>t in e?Yie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,id=(e,t)=>{for(var n in t||(t={}))l4.call(t,n)&&mM(e,n,t[n]);if(Vg)for(var n of Vg(t))c4.call(t,n)&&mM(e,n,t[n]);return e},Jie=(e,t)=>Kie(e,qie(t)),Xie=(e,t)=>{var n={};for(var r in e)l4.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&&c4.call(e,r)&&(n[r]=e[r]);return n};const Qie={},ese=_.forwardRef((e,t)=>{const n=Ou(),r=ae(`${n.__staticSelector}Overlay`,Qie,e),{onClick:o,transitionProps:i,style:s,className:a}=r,c=Xie(r,["onClick","transitionProps","style","className"]),{classes:u,cx:f}=jie(null,n.stylesApi),p=g=>{o?.(g),n.closeOnClickOutside&&n.onClose()};return k.createElement(Os,Jie(id(id({mounted:n.opened},n.transitionProps),i),{transition:"fade"}),g=>k.createElement(a4,id({ref:t,onClick:p,fixed:!0,style:id(id({},s),g),className:f(u.overlay,a),zIndex:n.zIndex},c)))});var tse=ue((e,{zIndex:t})=>({inner:{position:"fixed",width:"100%",top:0,bottom:0,maxHeight:"100%",zIndex:t,pointerEvents:"none"},content:{pointerEvents:"all"}}));const nse=tse;var rse=Object.defineProperty,Hg=Object.getOwnPropertySymbols,u4=Object.prototype.hasOwnProperty,d4=Object.prototype.propertyIsEnumerable,gM=(e,t,n)=>t in e?rse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sd=(e,t)=>{for(var n in t||(t={}))u4.call(t,n)&&gM(e,n,t[n]);if(Hg)for(var n of Hg(t))d4.call(t,n)&&gM(e,n,t[n]);return e},ose=(e,t)=>{var n={};for(var r in e)u4.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&&d4.call(e,r)&&(n[r]=e[r]);return n};const ise={},sse=_.forwardRef((e,t)=>{const n=Ou(),r=ae(`${n.__staticSelector}Content`,ise,e),{className:o,transitionProps:i,style:s,onKeyDown:a}=r,c=ose(r,["className","transitionProps","style","onKeyDown"]),{classes:u,cx:f}=nse({zIndex:n.zIndex},n.stylesApi),p=g=>{var v;((v=g.target)==null?void 0:v.getAttribute("data-mantine-stop-propagation"))!=="true"&&g.key==="Escape"&&n.closeOnEscape&&n.onClose(),a?.(g)};return k.createElement(Os,sd(sd({mounted:n.opened,transition:"pop"},n.transitionProps),i),g=>k.createElement("div",{className:f(u.inner)},k.createElement(_P,{active:n.opened&&n.trapFocus},k.createElement(gre,sd({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:sd(sd({},s),g),shadow:n.shadow},c),c.children))))});var ase=ue((e,{padding:t})=>{const n=re({size:t,sizes:e.spacing});return{header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:n,paddingRight:`calc(${n} - ${M(5)})`,position:"sticky",top:0,backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,zIndex:1e3}}});const lse=ase;var cse=Object.defineProperty,Wg=Object.getOwnPropertySymbols,f4=Object.prototype.hasOwnProperty,p4=Object.prototype.propertyIsEnumerable,vM=(e,t,n)=>t in e?cse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,use=(e,t)=>{for(var n in t||(t={}))f4.call(t,n)&&vM(e,n,t[n]);if(Wg)for(var n of Wg(t))p4.call(t,n)&&vM(e,n,t[n]);return e},dse=(e,t)=>{var n={};for(var r in e)f4.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&&p4.call(e,r)&&(n[r]=e[r]);return n};const fse={},pse=_.forwardRef((e,t)=>{const n=Ou(),r=ae(`${n.__staticSelector}Header`,fse,e),{className:o}=r,i=dse(r,["className"]),{classes:s,cx:a}=lse({padding:n.padding},n.stylesApi);return k.createElement(Pe,use({ref:t,className:a(s.header,o)},i))});var hse=ue(e=>({title:{lineHeight:1,padding:0,margin:0,fontWeight:400,fontSize:e.fontSizes.md}}));const mse=hse;var gse=Object.defineProperty,Ug=Object.getOwnPropertySymbols,h4=Object.prototype.hasOwnProperty,m4=Object.prototype.propertyIsEnumerable,yM=(e,t,n)=>t in e?gse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vse=(e,t)=>{for(var n in t||(t={}))h4.call(t,n)&&yM(e,n,t[n]);if(Ug)for(var n of Ug(t))m4.call(t,n)&&yM(e,n,t[n]);return e},yse=(e,t)=>{var n={};for(var r in e)h4.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&&m4.call(e,r)&&(n[r]=e[r]);return n};const _se={},wse=_.forwardRef((e,t)=>{const n=Ou(),r=ae(`${n.__staticSelector}Title`,_se,e),{className:o}=r,i=yse(r,["className"]),{classes:s,cx:a}=mse(null,n.stylesApi);return _.useEffect(()=>(n.setTitleMounted(!0),()=>n.setTitleMounted(!1)),[]),k.createElement(Pe,vse({component:"h2",id:n.getTitleId(),className:a(s.title,o),ref:t},i))});var bse=ue((e,{padding:t})=>({body:{padding:re({size:t,sizes:e.spacing}),"&:not(:only-child)":{paddingTop:0}}}));const xse=bse;var Sse=Object.defineProperty,Zg=Object.getOwnPropertySymbols,g4=Object.prototype.hasOwnProperty,v4=Object.prototype.propertyIsEnumerable,_M=(e,t,n)=>t in e?Sse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pse=(e,t)=>{for(var n in t||(t={}))g4.call(t,n)&&_M(e,n,t[n]);if(Zg)for(var n of Zg(t))v4.call(t,n)&&_M(e,n,t[n]);return e},Ose=(e,t)=>{var n={};for(var r in e)g4.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&&v4.call(e,r)&&(n[r]=e[r]);return n};const Cse={},kse=_.forwardRef((e,t)=>{const n=Ou(),r=ae(`${n.__staticSelector}Body`,Cse,e),{className:o}=r,i=Ose(r,["className"]),{classes:s,cx:a}=xse({padding:n.padding},n.stylesApi);return _.useEffect(()=>(n.setBodyMounted(!0),()=>n.setBodyMounted(!1)),[]),k.createElement(Pe,Pse({id:n.getBodyId(),className:a(s.body,o),ref:t},i))});function Ese({children:e}){return k.createElement(k.Fragment,null,e)}function $se({opened:e,transitionDuration:t}){const[n,r]=_.useState(e),o=_.useRef(),s=fS()?0:t;return _.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 Mse=ue(()=>({root:{}}));const Nse=Mse;var Tse=Object.defineProperty,Ise=Object.defineProperties,jse=Object.getOwnPropertyDescriptors,Gg=Object.getOwnPropertySymbols,y4=Object.prototype.hasOwnProperty,_4=Object.prototype.propertyIsEnumerable,wM=(e,t,n)=>t in e?Tse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,A_=(e,t)=>{for(var n in t||(t={}))y4.call(t,n)&&wM(e,n,t[n]);if(Gg)for(var n of Gg(t))_4.call(t,n)&&wM(e,n,t[n]);return e},bM=(e,t)=>Ise(e,jse(t)),Lse=(e,t)=>{var n={};for(var r in e)y4.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&&_4.call(e,r)&&(n[r]=e[r]);return n};const Vf={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:ii("modal"),padding:"md",size:"md",shadow:"xl"};function tt(e){const t=ae("ModalBase",Vf,e),{opened:n,onClose:r,children:o,closeOnClickOutside:i,__staticSelector:s,transitionProps:a,withinPortal:c,portalProps:u,keepMounted:f,target:p,zIndex:g,lockScroll:v,trapFocus:y,closeOnEscape:w,returnFocus:P,padding:x,shadow:S,id:O,size:E,variant:$,classNames:N,unstyled:I,styles:R,className:B}=t,z=Lse(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:G,cx:X}=Nse(null,{name:s,classNames:N,styles:R,unstyled:I,variant:$,size:E}),Q=$a(O),[V,H]=_.useState(!1),[Z,Y]=_.useState(!1),j=typeof a?.duration=="number"?a?.duration:200,W=$se({opened:n,transitionDuration:j});return mm("keydown",F=>{!y&&F.key==="Escape"&&w&&r()}),B3({opened:n,shouldReturnFocus:y&&P}),k.createElement(zf,bM(A_({},u),{withinPortal:c,target:p}),k.createElement(Oie,{value:{__staticSelector:s,opened:n,onClose:r,closeOnClickOutside:i,transitionProps:bM(A_({},a),{duration:j,keepMounted:f}),zIndex:g,padding:x,id:Q,getTitleId:()=>`${Q}-title`,getBodyId:()=>`${Q}-body`,titleMounted:V,bodyMounted:Z,setTitleMounted:H,setBodyMounted:Y,trapFocus:y,closeOnEscape:w,shadow:S,stylesApi:{name:s,size:E,variant:$,classNames:N,styles:R,unstyled:I}}},k.createElement(RW,{enabled:W&&v},k.createElement(Pe,A_({className:X(G.root,B)},z),o))))}tt.CloseButton=Tie;tt.Overlay=ese;tt.Content=sse;tt.Header=pse;tt.Title=wse;tt.Body=kse;tt.NativeScrollArea=Ese;var Dse=Object.defineProperty,Rse=Object.defineProperties,zse=Object.getOwnPropertyDescriptors,Yg=Object.getOwnPropertySymbols,w4=Object.prototype.hasOwnProperty,b4=Object.prototype.propertyIsEnumerable,xM=(e,t,n)=>t in e?Dse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gh=(e,t)=>{for(var n in t||(t={}))w4.call(t,n)&&xM(e,n,t[n]);if(Yg)for(var n of Yg(t))b4.call(t,n)&&xM(e,n,t[n]);return e},x4=(e,t)=>Rse(e,zse(t)),Ase=(e,t)=>{var n={};for(var r in e)w4.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&&b4.call(e,r)&&(n[r]=e[r]);return n};const Bse={top:"slide-down",bottom:"slide-up",left:"slide-right",right:"slide-left"},Fse={top:"slide-down",bottom:"slide-up",right:"slide-right",left:"slide-left"},Vse=x4(Gh({},Vf),{position:"left"});function S4(e){const t=ae("DrawerRoot",Vse,e),{classNames:n,variant:r,size:o,scrollAreaComponent:i,position:s,transitionProps:a}=t,c=Ase(t,["classNames","variant","size","scrollAreaComponent","position","transitionProps"]),{classes:u,cx:f,theme:p}=Pie({position:s},{name:"Drawer",variant:r,size:o}),g=(p.dir==="rtl"?Fse:Bse)[s];return k.createElement(bie,{value:{scrollAreaComponent:i}},k.createElement(tt,Gh({__staticSelector:"Drawer",size:o,variant:r,transitionProps:Gh({transition:g,duration:200},a),classNames:x4(Gh({},n),{content:f(u.content,n?.content),inner:f(u.inner,n?.inner)})},c)))}var Hse=Object.defineProperty,Kg=Object.getOwnPropertySymbols,P4=Object.prototype.hasOwnProperty,O4=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={}))P4.call(t,n)&&SM(e,n,t[n]);if(Kg)for(var n of Kg(t))O4.call(t,n)&&SM(e,n,t[n]);return e},Use=(e,t)=>{var n={};for(var r in e)P4.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&&O4.call(e,r)&&(n[r]=e[r]);return n};const Zse={shadow:"xl"},C4=_.forwardRef((e,t)=>{const n=ae("ModalContent",Zse,e),{children:r,scrollAreaComponent:o}=n,i=Use(n,["children","scrollAreaComponent"]),s=xie(),a=o||s.scrollAreaComponent||tt.NativeScrollArea;return k.createElement(tt.Content,Wse({ref:t,radius:0},i),k.createElement(a,{style:{height:"100vh"}},r))});var Gse=Object.defineProperty,Yse=Object.defineProperties,Kse=Object.getOwnPropertyDescriptors,qg=Object.getOwnPropertySymbols,k4=Object.prototype.hasOwnProperty,E4=Object.prototype.propertyIsEnumerable,PM=(e,t,n)=>t in e?Gse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yh=(e,t)=>{for(var n in t||(t={}))k4.call(t,n)&&PM(e,n,t[n]);if(qg)for(var n of qg(t))E4.call(t,n)&&PM(e,n,t[n]);return e},qse=(e,t)=>Yse(e,Kse(t)),Jse=(e,t)=>{var n={};for(var r in e)k4.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&&E4.call(e,r)&&(n[r]=e[r]);return n};const Xse=qse(Yh({},Vf),{withOverlay:!0,withCloseButton:!0});function Cs(e){const t=ae("Drawer",Xse,e),{title:n,withOverlay:r,overlayProps:o,withCloseButton:i,closeButtonProps:s,children:a}=t,c=Jse(t,["title","withOverlay","overlayProps","withCloseButton","closeButtonProps","children"]),u=!!n||i;return k.createElement(S4,Yh({},c),r&&k.createElement(tt.Overlay,Yh({},o)),k.createElement(C4,null,u&&k.createElement(tt.Header,null,n&&k.createElement(tt.Title,null,n),i&&k.createElement(tt.CloseButton,Yh({},s))),k.createElement(tt.Body,null,a)))}Cs.Root=S4;Cs.CloseButton=tt.CloseButton;Cs.Overlay=tt.Overlay;Cs.Content=C4;Cs.Header=tt.Header;Cs.Title=tt.Title;Cs.Body=tt.Body;Cs.NativeScrollArea=tt.NativeScrollArea;function Qse(e){return _.Children.toArray(e).filter(Boolean)}const eae={left:"flex-start",center:"center",right:"flex-end",apart:"space-between"};var tae=ue((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:eae[n],gap:re({size:t,sizes:e.spacing}),"& > *":{boxSizing:"border-box",maxWidth:o?`calc(${100/s}% - (${M(re({size:t,sizes:e.spacing}))} - ${re({size:t,sizes:e.spacing})} / ${s}))`:void 0,flexGrow:o?1:0}}}));const nae=tae;var rae=Object.defineProperty,Jg=Object.getOwnPropertySymbols,$4=Object.prototype.hasOwnProperty,M4=Object.prototype.propertyIsEnumerable,OM=(e,t,n)=>t in e?rae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oae=(e,t)=>{for(var n in t||(t={}))$4.call(t,n)&&OM(e,n,t[n]);if(Jg)for(var n of Jg(t))M4.call(t,n)&&OM(e,n,t[n]);return e},iae=(e,t)=>{var n={};for(var r in e)$4.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&&M4.call(e,r)&&(n[r]=e[r]);return n};const sae={position:"left",spacing:"md"},nt=_.forwardRef((e,t)=>{const n=ae("Group",sae,e),{className:r,position:o,align:i,children:s,noWrap:a,grow:c,spacing:u,unstyled:f,variant:p}=n,g=iae(n,["className","position","align","children","noWrap","grow","spacing","unstyled","variant"]),v=Qse(s),{classes:y,cx:w}=nae({align:i,grow:c,noWrap:a,spacing:u,position:o,count:v.length},{unstyled:f,name:"Group",variant:p});return k.createElement(Pe,oae({className:w(y.root,r),ref:t},g),v)});nt.displayName="@mantine/core/Group";function aae({open:e,close:t,openDelay:n,closeDelay:r}){const o=_.useRef(-1),i=_.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 _.useEffect(()=>s,[]),{openDropdown:a,closeDropdown:c}}var lae=Object.defineProperty,Xg=Object.getOwnPropertySymbols,N4=Object.prototype.hasOwnProperty,T4=Object.prototype.propertyIsEnumerable,CM=(e,t,n)=>t in e?lae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kM=(e,t)=>{for(var n in t||(t={}))N4.call(t,n)&&CM(e,n,t[n]);if(Xg)for(var n of Xg(t))T4.call(t,n)&&CM(e,n,t[n]);return e},cae=(e,t)=>{var n={};for(var r in e)N4.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&&T4.call(e,r)&&(n[r]=e[r]);return n};function uae(e){const t=e,{width:n,height:r,style:o}=t,i=cae(t,["width","height","style"]);return k.createElement("svg",kM({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:kM({width:n,height:r},o)},i),k.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 dae=Object.defineProperty,fae=Object.defineProperties,pae=Object.getOwnPropertyDescriptors,EM=Object.getOwnPropertySymbols,hae=Object.prototype.hasOwnProperty,mae=Object.prototype.propertyIsEnumerable,$M=(e,t,n)=>t in e?dae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,MM=(e,t)=>{for(var n in t||(t={}))hae.call(t,n)&&$M(e,n,t[n]);if(EM)for(var n of EM(t))mae.call(t,n)&&$M(e,n,t[n]);return e},NM=(e,t)=>fae(e,pae(t)),gae=ue((e,{radius:t})=>({root:{},imageWrapper:{position:"relative"},figure:{margin:0},image:NM(MM({},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:NM(MM({},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 vae=gae;var yae=Object.defineProperty,_ae=Object.defineProperties,wae=Object.getOwnPropertyDescriptors,Qg=Object.getOwnPropertySymbols,I4=Object.prototype.hasOwnProperty,j4=Object.prototype.propertyIsEnumerable,TM=(e,t,n)=>t in e?yae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ad=(e,t)=>{for(var n in t||(t={}))I4.call(t,n)&&TM(e,n,t[n]);if(Qg)for(var n of Qg(t))j4.call(t,n)&&TM(e,n,t[n]);return e},bae=(e,t)=>_ae(e,wae(t)),xae=(e,t)=>{var n={};for(var r in e)I4.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&&j4.call(e,r)&&(n[r]=e[r]);return n};const Sae={fit:"cover",width:"100%",height:"auto",radius:0},ri=_.forwardRef((e,t)=>{const n=ae("Image",Sae,e),{className:r,alt:o,src:i,fit:s,width:a,height:c,radius:u,imageProps:f,withPlaceholder:p,placeholder:g,imageRef:v,classNames:y,styles:w,caption:P,unstyled:x,style:S,variant:O}=n,E=xae(n,["className","alt","src","fit","width","height","radius","imageProps","withPlaceholder","placeholder","imageRef","classNames","styles","caption","unstyled","style","variant"]),{classes:$,cx:N}=vae({radius:u},{classNames:y,styles:w,unstyled:x,name:"Image",variant:O}),[I,R]=_.useState(!i),B=p&&I;return Fn(()=>{R(!i)},[i]),k.createElement(Pe,ad({className:N($.root,r),style:ad({width:M(a)},S),ref:t},E),k.createElement("figure",{className:$.figure},k.createElement("div",{className:$.imageWrapper},k.createElement("img",bae(ad({src:i,alt:o,ref:v},f),{className:N($.image,f?.className),onError:z=>{R(!0),typeof f?.onError=="function"&&f.onError(z)},style:ad(ad({objectFit:s,width:M(a),height:M(c)},B&&{overflow:"hidden"}),f?.style)})),B&&k.createElement("div",{className:$.placeholder,title:o},g||k.createElement("div",null,k.createElement(uae,{width:M(40),height:M(40)})))),!!P&&k.createElement(U,{component:"figcaption",size:"sm",align:"center",className:$.caption},P)))});ri.displayName="@mantine/core/Image";var Pae=Object.defineProperty,Oae=Object.defineProperties,Cae=Object.getOwnPropertyDescriptors,IM=Object.getOwnPropertySymbols,kae=Object.prototype.hasOwnProperty,Eae=Object.prototype.propertyIsEnumerable,jM=(e,t,n)=>t in e?Pae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,LM=(e,t)=>{for(var n in t||(t={}))kae.call(t,n)&&jM(e,n,t[n]);if(IM)for(var n of IM(t))Eae.call(t,n)&&jM(e,n,t[n]);return e},DM=(e,t)=>Oae(e,Cae(t));const $ae=e=>PZ({from:{boxShadow:`0 0 ${M(.5)} 0 ${e}`,opacity:.6},to:{boxShadow:`0 0 ${M(.5)} ${M(4.4)} ${e}`,opacity:0}});function RM(e,t=0){const n={},[r,o]=e.split("-");let i="",s="";return r==="top"&&(n.top=t,s="-50%"),r==="middle"&&(n.top="50%",s="-50%"),r==="bottom"&&(n.bottom=t,s="50%"),o==="start"&&(n.left=t,i="-50%"),o==="center"&&(n.left="50%",i="-50%"),o==="end"&&(n.right=t,i="50%"),n.transform=`translate(${i}, ${s})`,n}var Mae=ue((e,{radius:t,color:n,position:r,offset:o,inline:i,withBorder:s,withLabel:a,zIndex:c},{size:u})=>{const{background:f}=e.fn.variant({variant:"filled",primaryFallback:!1,color:n||e.primaryColor}),p=M(u);return{root:{position:"relative",display:i?"inline-block":"block"},indicator:DM(LM({},RM(r,o)),{zIndex:c,position:"absolute",[a?"minWidth":"width"]:p,height:p,display:"flex",justifyContent:"center",alignItems:"center",fontSize:e.fontSizes.xs,paddingLeft:a?`calc(${e.spacing.xs} / 2)`:0,paddingRight:a?`calc(${e.spacing.xs} / 2)`:0,borderRadius:e.fn.radius(t),backgroundColor:e.fn.variant({variant:"filled",primaryFallback:!1,color:n||e.primaryColor}).background,border:s?`${M(2)} solid ${e.colorScheme==="dark"?e.colors.dark[7]:e.white}`:void 0,color:e.white,whiteSpace:"nowrap"}),processing:{animation:`${$ae(f)} 1000ms linear infinite`},common:DM(LM({},RM(r,o)),{position:"absolute",[a?"minWidth":"width"]:p,height:p,borderRadius:e.fn.radius(t)})}});const Nae=Mae;var Tae=Object.defineProperty,ev=Object.getOwnPropertySymbols,L4=Object.prototype.hasOwnProperty,D4=Object.prototype.propertyIsEnumerable,zM=(e,t,n)=>t in e?Tae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Iae=(e,t)=>{for(var n in t||(t={}))L4.call(t,n)&&zM(e,n,t[n]);if(ev)for(var n of ev(t))D4.call(t,n)&&zM(e,n,t[n]);return e},jae=(e,t)=>{var n={};for(var r in e)L4.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&&D4.call(e,r)&&(n[r]=e[r]);return n};const Lae={position:"top-end",offset:0,inline:!1,withBorder:!1,disabled:!1,processing:!1,size:10,radius:1e3,zIndex:ii("app")},R4=_.forwardRef((e,t)=>{const n=ae("Indicator",Lae,e),{children:r,position:o,offset:i,size:s,radius:a,inline:c,withBorder:u,className:f,color:p,styles:g,label:v,classNames:y,disabled:w,zIndex:P,unstyled:x,processing:S,variant:O}=n,E=jae(n,["children","position","offset","size","radius","inline","withBorder","className","color","styles","label","classNames","disabled","zIndex","unstyled","processing","variant"]),{classes:$,cx:N}=Nae({position:o,offset:i,radius:a,inline:c,color:p,withBorder:u,zIndex:P,withLabel:!!v},{name:"Indicator",classNames:y,styles:g,unstyled:x,variant:O,size:s});return k.createElement(Pe,Iae({ref:t,className:N($.root,f)},E),!w&&k.createElement(k.Fragment,null,k.createElement("div",{className:N($.indicator,$.common)},v),S&&k.createElement("div",{className:N($.processing,$.common)})),r)});R4.displayName="@mantine/core/Indicator";function Dae(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var Rae=_.useLayoutEffect,zae=function(t){var n=_.useRef(t);return Rae(function(){n.current=t}),n},AM=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},Aae=function(t,n){var r=_.useRef();return _.useCallback(function(o){t.current=o,r.current&&AM(r.current,null),r.current=n,n&&AM(n,o)},[n])},BM={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},FM=function(t){Object.keys(BM).forEach(function(n){t.style.setProperty(n,BM[n],"important")})},eo=null,Bae=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function Fae(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),eo||(eo=document.createElement("textarea"),eo.setAttribute("tabindex","-1"),eo.setAttribute("aria-hidden","true"),FM(eo)),eo.parentNode===null&&document.body.appendChild(eo);var o=e.paddingSize,i=e.borderSize,s=e.sizingStyle,a=s.boxSizing;Object.keys(s).forEach(function(g){var v=g;eo.style[v]=s[v]}),FM(eo),eo.value=t;var c=Bae(eo,e);eo.value="x";var u=eo.scrollHeight-o,f=u*n;a==="border-box"&&(f=f+o+i),c=Math.max(f,c);var p=u*r;return a==="border-box"&&(p=p+o+i),c=Math.min(p,c),[c,u]}var VM=function(){},Vae=function(t,n){return t.reduce(function(r,o){return r[o]=n[o],r},{})},Hae=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],Wae=!!document.documentElement.currentStyle,Uae=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=Vae(Hae,n),o=r.boxSizing;if(o==="")return null;Wae&&o==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var i=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),s=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:i,borderSize:s}},Zae=function(t){var n=zae(t);_.useLayoutEffect(function(){var r=function(i){n.current(i)};return window.addEventListener("resize",r),function(){window.removeEventListener("resize",r)}},[])},Gae=function(t,n){var r=t.cacheMeasurements,o=t.maxRows,i=t.minRows,s=t.onChange,a=s===void 0?VM:s,c=t.onHeightChange,u=c===void 0?VM:c,f=Dae(t,["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"]),p=f.value!==void 0,g=_.useRef(null),v=Aae(g,n),y=_.useRef(0),w=_.useRef(),P=function(){var O=g.current,E=r&&w.current?w.current:Uae(O);if(E){w.current=E;var $=Fae(E,O.value||O.placeholder||"x",i,o),N=$[0],I=$[1];y.current!==N&&(y.current=N,O.style.setProperty("height",N+"px","important"),u(N,{rowHeight:I}))}},x=function(O){p||P(),a(O)};return _.useLayoutEffect(P),Zae(P),_.createElement("textarea",jt({},f,{onChange:x,ref:v}))},Yae=_.forwardRef(Gae);const Kae=Yae;var qae=ue(e=>({input:{paddingTop:e.spacing.xs,paddingBottom:e.spacing.xs}}));const Jae=qae;var Xae=Object.defineProperty,Qae=Object.defineProperties,ele=Object.getOwnPropertyDescriptors,tv=Object.getOwnPropertySymbols,z4=Object.prototype.hasOwnProperty,A4=Object.prototype.propertyIsEnumerable,HM=(e,t,n)=>t in e?Xae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lc=(e,t)=>{for(var n in t||(t={}))z4.call(t,n)&&HM(e,n,t[n]);if(tv)for(var n of tv(t))A4.call(t,n)&&HM(e,n,t[n]);return e},B_=(e,t)=>Qae(e,ele(t)),tle=(e,t)=>{var n={};for(var r in e)z4.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&&A4.call(e,r)&&(n[r]=e[r]);return n};const nle={autosize:!1,size:"sm",__staticSelector:"Textarea"},B4=_.forwardRef((e,t)=>{const n=ae("Textarea",nle,e),{autosize:r,maxRows:o,minRows:i,label:s,error:a,description:c,id:u,className:f,required:p,style:g,wrapperProps:v,classNames:y,styles:w,size:P,__staticSelector:x,sx:S,errorProps:O,descriptionProps:E,labelProps:$,inputWrapperOrder:N,inputContainer:I,unstyled:R,withAsterisk:B,variant:z}=n,G=tle(n,["autosize","maxRows","minRows","label","error","description","id","className","required","style","wrapperProps","classNames","styles","size","__staticSelector","sx","errorProps","descriptionProps","labelProps","inputWrapperOrder","inputContainer","unstyled","withAsterisk","variant"]),X=$a(u),{classes:Q,cx:V}=Jae(),{systemStyles:H,rest:Z}=Dl(G),Y=lc({required:p,ref:t,error:a,id:X,classNames:B_(lc({},y),{input:V(Q.input,y?.input)}),styles:w,__staticSelector:x,size:P,multiline:!0,unstyled:R,variant:z},Z);return k.createElement(et.Wrapper,lc(lc({label:s,error:a,id:X,description:c,required:p,style:g,className:f,classNames:y,styles:w,size:P,__staticSelector:x,sx:S,errorProps:O,labelProps:$,descriptionProps:E,inputContainer:I,inputWrapperOrder:N,unstyled:R,withAsterisk:B,variant:z},H),v),r?k.createElement(et,B_(lc({},Y),{component:Kae,maxRows:o,minRows:i})):k.createElement(et,B_(lc({},Y),{component:"textarea",rows:i})))});B4.displayName="@mantine/core/Textarea";var rle=Object.defineProperty,ole=Object.defineProperties,ile=Object.getOwnPropertyDescriptors,WM=Object.getOwnPropertySymbols,sle=Object.prototype.hasOwnProperty,ale=Object.prototype.propertyIsEnumerable,UM=(e,t,n)=>t in e?rle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lle=(e,t)=>{for(var n in t||(t={}))sle.call(t,n)&&UM(e,n,t[n]);if(WM)for(var n of WM(t))ale.call(t,n)&&UM(e,n,t[n]);return e},cle=(e,t)=>ole(e,ile(t)),ule=ue(e=>({root:cle(lle({},e.fn.cover()),{display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"})}));const dle=ule;var fle=Object.defineProperty,ple=Object.defineProperties,hle=Object.getOwnPropertyDescriptors,nv=Object.getOwnPropertySymbols,F4=Object.prototype.hasOwnProperty,V4=Object.prototype.propertyIsEnumerable,ZM=(e,t,n)=>t in e?fle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,th=(e,t)=>{for(var n in t||(t={}))F4.call(t,n)&&ZM(e,n,t[n]);if(nv)for(var n of nv(t))V4.call(t,n)&&ZM(e,n,t[n]);return e},mle=(e,t)=>ple(e,hle(t)),gle=(e,t)=>{var n={};for(var r in e)F4.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&&V4.call(e,r)&&(n[r]=e[r]);return n};const vle={overlayOpacity:.75,transitionDuration:0,radius:0,zIndex:ii("overlay")},Hf=_.forwardRef((e,t)=>{const n=ae("LoadingOverlay",vle,e),{className:r,visible:o,loaderProps:i,overlayOpacity:s,overlayColor:a,transitionDuration:c,exitTransitionDuration:u,zIndex:f,style:p,loader:g,radius:v,overlayBlur:y,unstyled:w,variant:P,keepMounted:x}=n,S=gle(n,["className","visible","loaderProps","overlayOpacity","overlayColor","transitionDuration","exitTransitionDuration","zIndex","style","loader","radius","overlayBlur","unstyled","variant","keepMounted"]),{classes:O,cx:E,theme:$}=dle(null,{name:"LoadingOverlay",unstyled:w,variant:P}),N=`calc(${f} + 1)`;return k.createElement(Os,{keepMounted:x,duration:c,exitDuration:u,mounted:o,transition:"fade"},I=>k.createElement(Pe,th({className:E(O.root,r),style:mle(th(th({},I),p),{zIndex:f}),ref:t},S),g?k.createElement("div",{style:{zIndex:N}},g):k.createElement(en,th({style:{zIndex:N}},i)),k.createElement(a4,{opacity:s,zIndex:f,radius:v,blur:y,unstyled:w,color:a||($.colorScheme==="dark"?$.colors.dark[5]:$.white)})))});Hf.displayName="@mantine/core/LoadingOverlay";const H4={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"},[yle,Wf]=wu(H4.context);var _le=ue(e=>({divider:{marginTop:M(4),marginBottom:M(4),borderTop:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`}}));const wle=_le;var ble=Object.defineProperty,rv=Object.getOwnPropertySymbols,W4=Object.prototype.hasOwnProperty,U4=Object.prototype.propertyIsEnumerable,GM=(e,t,n)=>t in e?ble(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xle=(e,t)=>{for(var n in t||(t={}))W4.call(t,n)&&GM(e,n,t[n]);if(rv)for(var n of rv(t))U4.call(t,n)&&GM(e,n,t[n]);return e},Sle=(e,t)=>{var n={};for(var r in e)W4.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&&U4.call(e,r)&&(n[r]=e[r]);return n};const Ple={},Z4=_.forwardRef((e,t)=>{const n=ae("MenuDivider",Ple,e),{children:r,className:o}=n,i=Sle(n,["children","className"]),{classNames:s,styles:a,unstyled:c,variant:u}=Wf(),{classes:f,cx:p}=wle(null,{name:"Menu",classNames:s,styles:a,unstyled:c,variant:u});return k.createElement(Pe,xle({className:p(f.divider,o),ref:t},i))});Z4.displayName="@mantine/core/MenuDivider";var Ole=Object.defineProperty,ov=Object.getOwnPropertySymbols,G4=Object.prototype.hasOwnProperty,Y4=Object.prototype.propertyIsEnumerable,YM=(e,t,n)=>t in e?Ole(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cle=(e,t)=>{for(var n in t||(t={}))G4.call(t,n)&&YM(e,n,t[n]);if(ov)for(var n of ov(t))Y4.call(t,n)&&YM(e,n,t[n]);return e},kle=(e,t)=>{var n={};for(var r in e)G4.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&&Y4.call(e,r)&&(n[r]=e[r]);return n};const Ele={};function K4(e){const t=ae("MenuDropdown",Ele,e),{children:n,onMouseEnter:r,onMouseLeave:o}=t,i=kle(t,["children","onMouseEnter","onMouseLeave"]),s=_.useRef(),a=Wf(),c=p=>{var g;(p.key==="ArrowUp"||p.key==="ArrowDown")&&(p.preventDefault(),(g=s.current.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||g.focus())},u=is(r,()=>a.trigger==="hover"&&a.openDropdown()),f=is(o,()=>a.trigger==="hover"&&a.closeDropdown());return k.createElement(kn.Dropdown,Cle({onMouseEnter:u,onMouseLeave:f,role:"menu","aria-orientation":"vertical"},i),k.createElement("div",{tabIndex:-1,"data-menu-dropdown":!0,"data-autofocus":!0,onKeyDown:c,ref:s,style:{outline:0}},n))}K4.displayName="@mantine/core/MenuDropdown";var $le=Object.defineProperty,Mle=Object.defineProperties,Nle=Object.getOwnPropertyDescriptors,KM=Object.getOwnPropertySymbols,Tle=Object.prototype.hasOwnProperty,Ile=Object.prototype.propertyIsEnumerable,qM=(e,t,n)=>t in e?$le(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jle=(e,t)=>{for(var n in t||(t={}))Tle.call(t,n)&&qM(e,n,t[n]);if(KM)for(var n of KM(t))Ile.call(t,n)&&qM(e,n,t[n]);return e},Lle=(e,t)=>Mle(e,Nle(t)),Dle=ue((e,{color:t,radius:n})=>({item:Lle(jle({},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 Rle=Dle;var zle=Object.defineProperty,Ale=Object.defineProperties,Ble=Object.getOwnPropertyDescriptors,iv=Object.getOwnPropertySymbols,q4=Object.prototype.hasOwnProperty,J4=Object.prototype.propertyIsEnumerable,JM=(e,t,n)=>t in e?zle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fle=(e,t)=>{for(var n in t||(t={}))q4.call(t,n)&&JM(e,n,t[n]);if(iv)for(var n of iv(t))J4.call(t,n)&&JM(e,n,t[n]);return e},Vle=(e,t)=>Ale(e,Ble(t)),Hle=(e,t)=>{var n={};for(var r in e)q4.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&&J4.call(e,r)&&(n[r]=e[r]);return n};const Wle={},X4=_.forwardRef((e,t)=>{const n=ae("MenuItem",Wle,e),{children:r,className:o,color:i,closeMenuOnClick:s,icon:a,rightSection:c}=n,u=Hle(n,["children","className","color","closeMenuOnClick","icon","rightSection"]),f=Wf(),{classes:p,cx:g,theme:v}=Rle({radius:f.radius,color:i},{name:"Menu",classNames:f.classNames,styles:f.styles,unstyled:f.unstyled,variant:f.variant}),y=_.useRef(),w=f.getItemIndex(y.current),P=u,x=is(P.onMouseLeave,()=>f.setHovered(-1)),S=is(P.onMouseEnter,()=>f.setHovered(f.getItemIndex(y.current))),O=is(P.onClick,()=>{typeof s=="boolean"?s&&f.closeDropdownImmediately():f.closeOnItemClick&&f.closeDropdownImmediately()}),E=is(P.onFocus,()=>f.setHovered(f.getItemIndex(y.current)));return k.createElement(Pe,Vle(Fle({component:"button",type:"button"},u),{tabIndex:-1,onFocus:E,className:g(p.item,o),ref:ws(y,t),role:"menuitem","data-menu-item":!0,"data-hovered":f.hovered===w?!0:void 0,onMouseEnter:S,onMouseLeave:x,onClick:O,onKeyDown:FW({siblingSelector:"[data-menu-item]",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:f.loop,dir:v.dir,orientation:"vertical",onKeyDown:P.onKeydown})}),a&&k.createElement("div",{className:p.itemIcon},a),r&&k.createElement("div",{className:p.itemLabel},r),c&&k.createElement("div",{className:p.itemRightSection},c))});X4.displayName="@mantine/core/MenuItem";const Ule=X4;var Zle=ue(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 Gle=Zle;var Yle=Object.defineProperty,sv=Object.getOwnPropertySymbols,Q4=Object.prototype.hasOwnProperty,e6=Object.prototype.propertyIsEnumerable,XM=(e,t,n)=>t in e?Yle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kle=(e,t)=>{for(var n in t||(t={}))Q4.call(t,n)&&XM(e,n,t[n]);if(sv)for(var n of sv(t))e6.call(t,n)&&XM(e,n,t[n]);return e},qle=(e,t)=>{var n={};for(var r in e)Q4.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&&e6.call(e,r)&&(n[r]=e[r]);return n};const Jle={},t6=_.forwardRef((e,t)=>{const n=ae("MenuLabel",Jle,e),{children:r,className:o}=n,i=qle(n,["children","className"]),{classNames:s,styles:a,unstyled:c,variant:u}=Wf(),{classes:f,cx:p}=Gle(null,{name:"Menu",classNames:s,styles:a,unstyled:c,variant:u});return k.createElement(U,Kle({className:p(f.label,o),ref:t},i),r)});t6.displayName="@mantine/core/MenuLabel";var Xle=Object.defineProperty,av=Object.getOwnPropertySymbols,n6=Object.prototype.hasOwnProperty,r6=Object.prototype.propertyIsEnumerable,QM=(e,t,n)=>t in e?Xle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qle=(e,t)=>{for(var n in t||(t={}))n6.call(t,n)&&QM(e,n,t[n]);if(av)for(var n of av(t))r6.call(t,n)&&QM(e,n,t[n]);return e},ece=(e,t)=>{var n={};for(var r in e)n6.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&&r6.call(e,r)&&(n[r]=e[r]);return n};const tce={refProp:"ref"},o6=_.forwardRef((e,t)=>{const n=ae("MenuTarget",tce,e),{children:r,refProp:o}=n,i=ece(n,["children","refProp"]);if(!Mf(r))throw new Error(H4.children);const s=Wf(),a=is(r.props.onClick,()=>s.trigger==="click"&&s.toggleDropdown()),c=is(r.props.onMouseEnter,()=>s.trigger==="hover"&&s.openDropdown()),u=is(r.props.onMouseLeave,()=>s.trigger==="hover"&&s.closeDropdown());return k.createElement(kn.Target,Qle({refProp:o,popupType:"menu",ref:t},i),_.cloneElement(r,{onClick:a,onMouseEnter:c,onMouseLeave:u,"data-expanded":s.opened?!0:void 0}))});o6.displayName="@mantine/core/MenuTarget";var nce=ue({dropdown:{padding:M(4)}});const rce=nce;var oce=Object.defineProperty,ice=Object.defineProperties,sce=Object.getOwnPropertyDescriptors,lv=Object.getOwnPropertySymbols,i6=Object.prototype.hasOwnProperty,s6=Object.prototype.propertyIsEnumerable,eN=(e,t,n)=>t in e?oce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tN=(e,t)=>{for(var n in t||(t={}))i6.call(t,n)&&eN(e,n,t[n]);if(lv)for(var n of lv(t))s6.call(t,n)&&eN(e,n,t[n]);return e},nN=(e,t)=>ice(e,sce(t)),ace=(e,t)=>{var n={};for(var r in e)i6.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&&s6.call(e,r)&&(n[r]=e[r]);return n};const lce={closeOnItemClick:!0,loop:!0,trigger:"click",openDelay:0,closeDelay:100};function Tt(e){const t=ae("Menu",lce,e),{children:n,onOpen:r,onClose:o,opened:i,defaultOpened:s,onChange:a,closeOnItemClick:c,loop:u,closeOnEscape:f,trigger:p,openDelay:g,closeDelay:v,classNames:y,styles:w,unstyled:P,radius:x,variant:S}=t,O=ace(t,["children","onOpen","onClose","opened","defaultOpened","onChange","closeOnItemClick","loop","closeOnEscape","trigger","openDelay","closeDelay","classNames","styles","unstyled","radius","variant"]),{classes:E,cx:$}=rce(),[N,{setHovered:I,resetHovered:R}]=ZW(),[B,z]=go({value:i,defaultValue:s,finalValue:!1,onChange:a}),G=()=>{z(!1),B&&o?.()},X=()=>{z(!0),!B&&r?.()},Q=()=>B?G():X(),{openDropdown:V,closeDropdown:H}=aae({open:X,close:G,closeDelay:v,openDelay:g}),Z=Y=>VW("[data-menu-item]","[data-menu-dropdown]",Y);return Fn(()=>{R()},[B]),k.createElement(yle,{value:{opened:B,toggleDropdown:Q,getItemIndex:Z,hovered:N,setHovered:I,closeOnItemClick:c,closeDropdown:p==="click"?G:H,openDropdown:p==="click"?X:V,closeDropdownImmediately:G,loop:u,trigger:p,radius:x,classNames:y,styles:w,unstyled:P,variant:S}},k.createElement(kn,nN(tN({},O),{radius:x,opened:B,onChange:Q,defaultOpened:s,trapFocus:p==="click",closeOnEscape:f&&p==="click",__staticSelector:"Menu",classNames:nN(tN({},y),{dropdown:$(E.dropdown,y?.dropdown)}),styles:w,unstyled:P,variant:S}),n))}Tt.displayName="@mantine/core/Menu";Tt.Item=Ule;Tt.Label=t6;Tt.Dropdown=K4;Tt.Target=o6;Tt.Divider=Z4;const[cce,uce]=wu("Modal component was not found in tree"),dce={xs:M(320),sm:M(380),md:M(440),lg:M(620),xl:M(780)};var fce=ue((e,{yOffset:t,xOffset:n,centered:r,fullScreen:o},{size:i})=>({content:{flex:o?"0 0 100%":`0 0 ${re({size:i,sizes:dce})}`,maxWidth:"100%",maxHeight:o?void 0:`calc(100dvh - (${M(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 pce=fce;var hce=Object.defineProperty,mce=Object.defineProperties,gce=Object.getOwnPropertyDescriptors,cv=Object.getOwnPropertySymbols,a6=Object.prototype.hasOwnProperty,l6=Object.prototype.propertyIsEnumerable,rN=(e,t,n)=>t in e?hce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qb=(e,t)=>{for(var n in t||(t={}))a6.call(t,n)&&rN(e,n,t[n]);if(cv)for(var n of cv(t))l6.call(t,n)&&rN(e,n,t[n]);return e},c6=(e,t)=>mce(e,gce(t)),vce=(e,t)=>{var n={};for(var r in e)a6.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&&l6.call(e,r)&&(n[r]=e[r]);return n};const yce=c6(Qb({},Vf),{yOffset:"5dvh",xOffset:"5vw"});function u6(e){const t=ae("ModalRoot",yce,e),{classNames:n,variant:r,size:o,yOffset:i,xOffset:s,scrollAreaComponent:a,radius:c,centered:u,fullScreen:f}=t,p=vce(t,["classNames","variant","size","yOffset","xOffset","scrollAreaComponent","radius","centered","fullScreen"]),{classes:g,cx:v}=pce({yOffset:i,xOffset:s,centered:u,fullScreen:f},{name:"Modal",variant:r,size:o});return k.createElement(cce,{value:{yOffset:i,scrollAreaComponent:a,radius:c}},k.createElement(tt,Qb({__staticSelector:"Modal",size:o,variant:r,classNames:c6(Qb({},n),{content:v(g.content,n?.content),inner:v(g.inner,n?.inner)})},p)))}var _ce=Object.defineProperty,uv=Object.getOwnPropertySymbols,d6=Object.prototype.hasOwnProperty,f6=Object.prototype.propertyIsEnumerable,oN=(e,t,n)=>t in e?_ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wce=(e,t)=>{for(var n in t||(t={}))d6.call(t,n)&&oN(e,n,t[n]);if(uv)for(var n of uv(t))f6.call(t,n)&&oN(e,n,t[n]);return e},bce=(e,t)=>{var n={};for(var r in e)d6.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&&f6.call(e,r)&&(n[r]=e[r]);return n};const xce={shadow:"xl"},p6=_.forwardRef((e,t)=>{const n=ae("ModalContent",xce,e),{children:r,scrollAreaComponent:o}=n,i=bce(n,["children","scrollAreaComponent"]),s=uce(),a=o||s.scrollAreaComponent||tt.NativeScrollArea;return k.createElement(tt.Content,wce({ref:t,radius:s.radius},i),k.createElement(a,{style:{maxHeight:`calc(100dvh - (${M(s.yOffset)} * 2))`}},r))});var Sce=Object.defineProperty,Pce=Object.defineProperties,Oce=Object.getOwnPropertyDescriptors,dv=Object.getOwnPropertySymbols,h6=Object.prototype.hasOwnProperty,m6=Object.prototype.propertyIsEnumerable,iN=(e,t,n)=>t in e?Sce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kh=(e,t)=>{for(var n in t||(t={}))h6.call(t,n)&&iN(e,n,t[n]);if(dv)for(var n of dv(t))m6.call(t,n)&&iN(e,n,t[n]);return e},Cce=(e,t)=>Pce(e,Oce(t)),kce=(e,t)=>{var n={};for(var r in e)h6.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&&m6.call(e,r)&&(n[r]=e[r]);return n};const Ece=Cce(Kh({},Vf),{transitionProps:{duration:200,transition:"pop"},withOverlay:!0,withCloseButton:!0});function Ri(e){const t=ae("Modal",Ece,e),{title:n,withOverlay:r,overlayProps:o,withCloseButton:i,closeButtonProps:s,children:a}=t,c=kce(t,["title","withOverlay","overlayProps","withCloseButton","closeButtonProps","children"]),u=!!n||i;return k.createElement(u6,Kh({},c),r&&k.createElement(tt.Overlay,Kh({},o)),k.createElement(p6,null,u&&k.createElement(tt.Header,null,n&&k.createElement(tt.Title,null,n),i&&k.createElement(tt.CloseButton,Kh({},s))),k.createElement(tt.Body,null,a)))}Ri.Root=u6;Ri.CloseButton=tt.CloseButton;Ri.Overlay=tt.Overlay;Ri.Content=p6;Ri.Header=tt.Header;Ri.Title=tt.Title;Ri.Body=tt.Body;Ri.NativeScrollArea=tt.NativeScrollArea;const g6={xs:M(16),sm:M(22),md:M(26),lg:M(30),xl:M(36)},$ce={xs:M(10),sm:M(12),md:M(14),lg:M(16),xl:M(18)};var Mce=ue((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:re({size:o,sizes:g6}),paddingLeft:`calc(${re({size:o,sizes:e.spacing})} / 1.5)`,paddingRight:t||r?re({size:o,sizes:e.spacing}):0,fontWeight:500,fontSize:re({size:o,sizes:$ce}),borderRadius:re({size:n,sizes:e.radius}),cursor:t?"not-allowed":"default",userSelect:"none",maxWidth:`calc(100% - ${M(10)})`},defaultValueRemove:{color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],marginLeft:`calc(${re({size:o,sizes:e.spacing})} / 6)`},defaultValueLabel:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}));const Nce=Mce;var Tce=Object.defineProperty,fv=Object.getOwnPropertySymbols,v6=Object.prototype.hasOwnProperty,y6=Object.prototype.propertyIsEnumerable,sN=(e,t,n)=>t in e?Tce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ice=(e,t)=>{for(var n in t||(t={}))v6.call(t,n)&&sN(e,n,t[n]);if(fv)for(var n of fv(t))y6.call(t,n)&&sN(e,n,t[n]);return e},jce=(e,t)=>{var n={};for(var r in e)v6.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&&y6.call(e,r)&&(n[r]=e[r]);return n};const Lce={xs:16,sm:22,md:24,lg:26,xl:30};function _6(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:g}=t,v=jce(t,["label","classNames","styles","className","onRemove","disabled","readOnly","size","radius","variant","unstyled"]);const{classes:y,cx:w}=Nce({disabled:a,readOnly:c,radius:f},{name:"MultiSelect",classNames:r,styles:o,unstyled:g,size:u,variant:p});return k.createElement("div",Ice({className:w(y.defaultValue,i)},v),k.createElement("span",{className:y.defaultValueLabel},n),!a&&!c&&k.createElement(O0,{"aria-hidden":!0,onMouseDown:s,size:Lce[u],radius:2,color:"blue",variant:"transparent",iconSize:"70%",className:y.defaultValueRemove,tabIndex:-1,unstyled:g}))}_6.displayName="@mantine/core/MultiSelect/DefaultValue";function Dce({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 Rce=Object.defineProperty,pv=Object.getOwnPropertySymbols,w6=Object.prototype.hasOwnProperty,b6=Object.prototype.propertyIsEnumerable,aN=(e,t,n)=>t in e?Rce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lN=(e,t)=>{for(var n in t||(t={}))w6.call(t,n)&&aN(e,n,t[n]);if(pv)for(var n of pv(t))b6.call(t,n)&&aN(e,n,t[n]);return e},zce=(e,t)=>{var n={};for(var r in e)w6.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&&b6.call(e,r)&&(n[r]=e[r]);return n};const Ace={xs:M(14),sm:M(18),md:M(20),lg:M(24),xl:M(28)};function Bce(e){var t=e,{size:n,error:r,style:o}=t,i=zce(t,["size","error","style"]);const s=ir(),a=re({size:n,sizes:Ace});return k.createElement("svg",lN({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:lN({color:r?s.colors.red[6]:s.colors.gray[6],width:a,height:a},o),"data-chevron":!0},i),k.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 Fce=Object.defineProperty,Vce=Object.defineProperties,Hce=Object.getOwnPropertyDescriptors,cN=Object.getOwnPropertySymbols,Wce=Object.prototype.hasOwnProperty,Uce=Object.prototype.propertyIsEnumerable,uN=(e,t,n)=>t in e?Fce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zce=(e,t)=>{for(var n in t||(t={}))Wce.call(t,n)&&uN(e,n,t[n]);if(cN)for(var n of cN(t))Uce.call(t,n)&&uN(e,n,t[n]);return e},Gce=(e,t)=>Vce(e,Hce(t));function x6({shouldClear:e,clearButtonProps:t,onClear:n,size:r,error:o}){return e?k.createElement(O0,Gce(Zce({},t),{variant:"transparent",onClick:n,size:r,onMouseDown:i=>i.preventDefault()})):k.createElement(Bce,{error:o,size:r})}x6.displayName="@mantine/core/SelectRightSection";var Yce=Object.defineProperty,Kce=Object.defineProperties,qce=Object.getOwnPropertyDescriptors,hv=Object.getOwnPropertySymbols,S6=Object.prototype.hasOwnProperty,P6=Object.prototype.propertyIsEnumerable,dN=(e,t,n)=>t in e?Yce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,F_=(e,t)=>{for(var n in t||(t={}))S6.call(t,n)&&dN(e,n,t[n]);if(hv)for(var n of hv(t))P6.call(t,n)&&dN(e,n,t[n]);return e},fN=(e,t)=>Kce(e,qce(t)),Jce=(e,t)=>{var n={};for(var r in e)S6.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&&P6.call(e,r)&&(n[r]=e[r]);return n};function O6(e){var t=e,{styles:n,rightSection:r,rightSectionWidth:o,theme:i}=t,s=Jce(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)&&k.createElement(x6,F_({},s)),styles:fN(F_({},a),{rightSection:fN(F_({},a?.rightSection),{pointerEvents:s.shouldClear?void 0:"none"})})}}var Xce=Object.defineProperty,Qce=Object.defineProperties,eue=Object.getOwnPropertyDescriptors,pN=Object.getOwnPropertySymbols,tue=Object.prototype.hasOwnProperty,nue=Object.prototype.propertyIsEnumerable,hN=(e,t,n)=>t in e?Xce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rue=(e,t)=>{for(var n in t||(t={}))tue.call(t,n)&&hN(e,n,t[n]);if(pN)for(var n of pN(t))nue.call(t,n)&&hN(e,n,t[n]);return e},oue=(e,t)=>Qce(e,eue(t)),iue=ue((e,{invalid:t},{size:n})=>({wrapper:{position:"relative","&:has(input:disabled)":{cursor:"not-allowed",pointerEvents:"none","& .mantine-MultiSelect-input":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,"&::placeholder":{color:e.colors.dark[2]}},"& .mantine-MultiSelect-defaultValue":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[3],color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7]}}},values:{minHeight:`calc(${re({size:n,sizes:Dn})} - ${M(2)})`,display:"flex",alignItems:"center",flexWrap:"wrap",marginLeft:`calc(-${e.spacing.xs} / 2)`,boxSizing:"border-box","&[data-clearable]":{marginRight:re({size:n,sizes:Dn})}},value:{margin:`calc(${e.spacing.xs} / 2 - ${M(2)}) calc(${e.spacing.xs} / 2)`},searchInput:oue(rue({},e.fn.fontStyles()),{flex:1,minWidth:M(60),backgroundColor:"transparent",border:0,outline:0,fontSize:re({size:n,sizes:e.fontSizes}),padding:0,marginLeft:`calc(${e.spacing.xs} / 2)`,appearance:"none",color:"inherit",maxHeight:re({size:n,sizes:g6}),"&::placeholder":{opacity:1,color:t?e.colors.red[e.fn.primaryShade()]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]},"&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}),searchInputEmpty:{width:"100%"},searchInputInputHidden:{flex:0,width:0,minWidth:0,margin:0,overflow:"hidden"},searchInputPointer:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}},input:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}}));const sue=iue;var aue=Object.defineProperty,lue=Object.defineProperties,cue=Object.getOwnPropertyDescriptors,mv=Object.getOwnPropertySymbols,C6=Object.prototype.hasOwnProperty,k6=Object.prototype.propertyIsEnumerable,mN=(e,t,n)=>t in e?aue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cc=(e,t)=>{for(var n in t||(t={}))C6.call(t,n)&&mN(e,n,t[n]);if(mv)for(var n of mv(t))k6.call(t,n)&&mN(e,n,t[n]);return e},gN=(e,t)=>lue(e,cue(t)),uue=(e,t)=>{var n={};for(var r in e)C6.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&&k6.call(e,r)&&(n[r]=e[r]);return n};function due(e,t,n){return t?!1:n.label.toLowerCase().trim().includes(e.toLowerCase().trim())}function fue(e,t){return!!e&&!t.some(n=>n.value.toLowerCase()===e.toLowerCase())}function vN(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 pue={size:"sm",valueComponent:_6,itemComponent:iP,transitionProps:{transition:"fade",duration:0},maxDropdownHeight:220,shadow:"sm",searchable:!1,filter:due,limit:1/0,clearSearchOnChange:!0,clearable:!1,clearSearchOnBlur:!1,disabled:!1,initiallyOpened:!1,creatable:!1,shouldCreate:fue,switchDirectionOnFlip:!1,zIndex:ii("popover"),selectOnBlur:!1,positionDependencies:[],dropdownPosition:"flip"},NP=_.forwardRef((e,t)=>{const n=ae("MultiSelect",pue,e),{className:r,style:o,required:i,label:s,description:a,size:c,error:u,classNames:f,styles:p,wrapperProps:g,value:v,defaultValue:y,data:w,onChange:P,valueComponent:x,itemComponent:S,id:O,transitionProps:E,maxDropdownHeight:$,shadow:N,nothingFound:I,onFocus:R,onBlur:B,searchable:z,placeholder:G,filter:X,limit:Q,clearSearchOnChange:V,clearable:H,clearSearchOnBlur:Z,variant:Y,onSearchChange:j,searchValue:W,disabled:F,initiallyOpened:K,radius:ee,icon:fe,rightSection:ie,rightSectionWidth:J,creatable:ne,getCreateLabel:le,shouldCreate:_e,onCreate:Ne,sx:we,dropdownComponent:He,onDropdownClose:Te,onDropdownOpen:je,maxSelectedValues:it,withinPortal:bt,portalProps:_n,switchDirectionOnFlip:pt,zIndex:Tn,selectOnBlur:kr,name:lt,dropdownPosition:Zn,errorProps:Jt,labelProps:ht,descriptionProps:xo,form:Yr,positionDependencies:ar,onKeyDown:Kr,unstyled:Bt,inputContainer:qr,inputWrapperOrder:pn,readOnly:wn,withAsterisk:Er,clearButtonProps:gt,hoverOnSearchChange:be,disableSelectedItemFiltering:De}=n,Jr=uue(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","portalProps","switchDirectionOnFlip","zIndex","selectOnBlur","name","dropdownPosition","errorProps","labelProps","descriptionProps","form","positionDependencies","onKeyDown","unstyled","inputContainer","inputWrapperOrder","readOnly","withAsterisk","clearButtonProps","hoverOnSearchChange","disableSelectedItemFiltering"]),{classes:Dt,cx:Zt,theme:$r}=sue({invalid:!!u},{name:"MultiSelect",classNames:f,styles:p,unstyled:Bt,size:c,variant:Y}),{systemStyles:xt,rest:nn}=Dl(Jr),Gn=_.useRef(),Aa=_.useRef({}),Yn=$a(O),[bn,Ft]=_.useState(K),[Gt,Xr]=_.useState(-1),[So,lr]=_.useState("column"),[cr,Vi]=go({value:W,defaultValue:"",finalValue:void 0,onChange:j}),[Es,ur]=_.useState(!1),{scrollIntoView:Oe,targetRef:Ba,scrollableRef:Yl}=G3({duration:0,offset:5,cancelable:!1,isList:!0}),Fa=ne&&typeof le=="function";let Se=null;const ct=w.map(Ie=>typeof Ie=="string"?{label:Ie,value:Ie}:Ie),rn=h3({data:ct}),[ze,Hi]=go({value:vN(v,w),defaultValue:vN(y,w),finalValue:[],onChange:P}),Qr=_.useRef(!!it&&it{if(!wn){const vt=ze.filter(xn=>xn!==Ie);Hi(vt),it&&vt.length{Vi(Ie.currentTarget.value),!F&&!Qr.current&&z&&Ft(!0)},b1=Ie=>{typeof R=="function"&&R(Ie),!F&&!Qr.current&&z&&Ft(!0)},on=Dce({data:rn,searchable:z,searchValue:cr,limit:Q,filter:X,value:ze,disableSelectedItemFiltering:De});Fa&&_e(cr,rn)&&(Se=le(cr),on.push({label:cr,value:cr,creatable:!0}));const Wi=Math.min(Gt,on.length-1),Va=(Ie,vt,xn)=>{let Fe=Ie;for(;xn(Fe);)if(Fe=vt(Fe),!on[Fe].disabled)return Fe;return Ie};Fn(()=>{Xr(be&&cr?0:-1)},[cr,be]),Fn(()=>{!F&&ze.length>w.length&&Ft(!1),it&&ze.length=it&&(Qr.current=!0,Ft(!1))},[ze]);const Kl=Ie=>{if(!wn)if(V&&Vi(""),ze.includes(Ie.value))tp(Ie.value);else{if(Ie.creatable&&typeof Ne=="function"){const vt=Ne(Ie.value);typeof vt<"u"&&vt!==null&&Hi(typeof vt=="string"?[...ze,vt]:[...ze,vt.value])}else Hi([...ze,Ie.value]);ze.length===it-1&&(Qr.current=!0,Ft(!1)),on.length===1&&Ft(!1)}},x1=Ie=>{typeof B=="function"&&B(Ie),kr&&on[Wi]&&bn&&Kl(on[Wi]),Z&&Vi(""),Ft(!1)},S1=Ie=>{if(Es||(Kr?.(Ie),wn)||Ie.key!=="Backspace"&&it&&Qr.current)return;const vt=So==="column",xn=()=>{Xr(ut=>{var Mr;const Po=Va(ut,Nr=>Nr+1,Nr=>Nr{Xr(ut=>{var Mr;const Po=Va(ut,Nr=>Nr-1,Nr=>Nr>0);return bn&&(Ba.current=Aa.current[(Mr=on[Po])==null?void 0:Mr.value],Oe({alignment:vt?"start":"end"})),Po})};switch(Ie.key){case"ArrowUp":{Ie.preventDefault(),Ft(!0),vt?Fe():xn();break}case"ArrowDown":{Ie.preventDefault(),Ft(!0),vt?xn():Fe();break}case"Enter":{Ie.preventDefault(),on[Wi]&&bn?Kl(on[Wi]):Ft(!0);break}case" ":{z||(Ie.preventDefault(),on[Wi]&&bn?Kl(on[Wi]):Ft(!0));break}case"Backspace":{ze.length>0&&cr.length===0&&(Hi(ze.slice(0,-1)),Ft(!0),it&&(Qr.current=!1));break}case"Home":{if(!z){Ie.preventDefault(),bn||Ft(!0);const ut=on.findIndex(Mr=>!Mr.disabled);Xr(ut),Oe({alignment:vt?"end":"start"})}break}case"End":{if(!z){Ie.preventDefault(),bn||Ft(!0);const ut=on.map(Mr=>!!Mr.disabled).lastIndexOf(!1);Xr(ut),Oe({alignment:vt?"end":"start"})}break}case"Escape":Ft(!1)}},P1=ze.map(Ie=>{let vt=rn.find(xn=>xn.value===Ie&&!xn.disabled);return!vt&&Fa&&(vt={value:Ie,label:Ie}),vt}).filter(Ie=>!!Ie).map((Ie,vt)=>k.createElement(x,gN(cc({},Ie),{variant:Y,disabled:F,className:Dt.value,readOnly:wn,onRemove:xn=>{xn.preventDefault(),xn.stopPropagation(),tp(Ie.value)},key:Ie.value,size:c,styles:p,classNames:f,radius:ee,index:vt}))),O1=Ie=>ze.includes(Ie),ju=()=>{var Ie;Vi(""),Hi([]),(Ie=Gn.current)==null||Ie.focus(),it&&(Qr.current=!1)},si=!wn&&(on.length>0?bn:bn&&!!I);return Fn(()=>{const Ie=si?je:Te;typeof Ie=="function"&&Ie()},[si]),k.createElement(et.Wrapper,cc(cc({required:i,id:Yn,label:s,error:u,description:a,size:c,className:r,style:o,classNames:f,styles:p,__staticSelector:"MultiSelect",sx:we,errorProps:Jt,descriptionProps:xo,labelProps:ht,inputContainer:qr,inputWrapperOrder:pn,unstyled:Bt,withAsterisk:Er,variant:Y},xt),g),k.createElement(ha,{opened:si,transitionProps:E,shadow:"sm",withinPortal:bt,portalProps:_n,__staticSelector:"MultiSelect",onDirectionChange:lr,switchDirectionOnFlip:pt,zIndex:Tn,dropdownPosition:Zn,positionDependencies:[...ar,cr],classNames:f,styles:p,unstyled:Bt,variant:Y},k.createElement(ha.Target,null,k.createElement("div",{className:Dt.wrapper,role:"combobox","aria-haspopup":"listbox","aria-owns":bn&&si?`${Yn}-items`:null,"aria-controls":Yn,"aria-expanded":bn,onMouseLeave:()=>Xr(-1),tabIndex:-1},k.createElement("input",{type:"hidden",name:lt,value:ze.join(","),form:Yr,disabled:F}),k.createElement(et,cc({__staticSelector:"MultiSelect",style:{overflow:"hidden"},component:"div",multiline:!0,size:c,variant:Y,disabled:F,error:u,required:i,radius:ee,icon:fe,unstyled:Bt,onMouseDown:Ie=>{var vt;Ie.preventDefault(),!F&&!Qr.current&&Ft(!bn),(vt=Gn.current)==null||vt.focus()},classNames:gN(cc({},f),{input:Zt({[Dt.input]:!z},f?.input)})},O6({theme:$r,rightSection:ie,rightSectionWidth:J,styles:p,size:c,shouldClear:H&&ze.length>0,onClear:ju,error:u,disabled:F,clearButtonProps:gt,readOnly:wn})),k.createElement("div",{className:Dt.values,"data-clearable":H||void 0},P1,k.createElement("input",cc({ref:ws(t,Gn),type:"search",id:Yn,className:Zt(Dt.searchInput,{[Dt.searchInputPointer]:!z,[Dt.searchInputInputHidden]:!bn&&ze.length>0||!z&&ze.length>0,[Dt.searchInputEmpty]:ze.length===0}),onKeyDown:S1,value:cr,onChange:w1,onFocus:b1,onBlur:x1,readOnly:!z||Qr.current||wn,placeholder:ze.length===0?G:void 0,disabled:F,"data-mantine-stop-propagation":bn,autoComplete:"off",onCompositionStart:()=>ur(!0),onCompositionEnd:()=>ur(!1)},nn)))))),k.createElement(ha.Dropdown,{component:He||$0,maxHeight:$,direction:So,id:Yn,innerRef:Yl,__staticSelector:"MultiSelect",classNames:f,styles:p},k.createElement(oP,{data:on,hovered:Wi,classNames:f,styles:p,uuid:Yn,__staticSelector:"MultiSelect",onItemHover:Xr,onItemSelect:Kl,itemsRefs:Aa,itemComponent:S,size:c,nothingFound:I,isItemSelected:O1,creatable:ne&&!!Se,createLabel:Se,unstyled:Bt,variant:Y}))))});NP.displayName="@mantine/core/MultiSelect";const hue=(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 yN({direction:e,size:t}){return k.createElement("svg",{style:{width:M(t),height:M(t),transform:e==="up"?"rotate(180deg)":void 0},viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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 E6={xs:M(20),sm:M(24),md:M(30),lg:M(34),xl:M(36)};var mue=ue((e,{radius:t},{size:n})=>({rightSection:{display:"flex",flexDirection:"column",height:`calc(100% - ${M(2)})`,margin:M(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:re({size:n,sizes:E6}),padding:0,WebkitTapHighlightColor:"transparent",borderBottom:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,borderLeft:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,borderTop:0,borderRight:0,backgroundColor:"transparent",marginRight:M(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 gue=mue;var vue=Object.defineProperty,yue=Object.defineProperties,_ue=Object.getOwnPropertyDescriptors,gv=Object.getOwnPropertySymbols,$6=Object.prototype.hasOwnProperty,M6=Object.prototype.propertyIsEnumerable,_N=(e,t,n)=>t in e?vue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,V_=(e,t)=>{for(var n in t||(t={}))$6.call(t,n)&&_N(e,n,t[n]);if(gv)for(var n of gv(t))M6.call(t,n)&&_N(e,n,t[n]);return e},wue=(e,t)=>yue(e,_ue(t)),bue=(e,t)=>{var n={};for(var r in e)$6.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&&M6.call(e,r)&&(n[r]=e[r]);return n};const xue={type:"text",size:"sm",__staticSelector:"TextInput"},yn=_.forwardRef((e,t)=>{const n=bP("TextInput",xue,e),{inputProps:r,wrapperProps:o}=n,i=bue(n,["inputProps","wrapperProps"]);return k.createElement(et.Wrapper,V_({},o),k.createElement(et,wue(V_(V_({},r),i),{ref:t})))});yn.displayName="@mantine/core/TextInput";var Sue=Object.defineProperty,Pue=Object.defineProperties,Oue=Object.getOwnPropertyDescriptors,vv=Object.getOwnPropertySymbols,N6=Object.prototype.hasOwnProperty,T6=Object.prototype.propertyIsEnumerable,wN=(e,t,n)=>t in e?Sue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cue=(e,t)=>{for(var n in t||(t={}))N6.call(t,n)&&wN(e,n,t[n]);if(vv)for(var n of vv(t))T6.call(t,n)&&wN(e,n,t[n]);return e},kue=(e,t)=>Pue(e,Oue(t)),Eue=(e,t)=>{var n={};for(var r in e)N6.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&&T6.call(e,r)&&(n[r]=e[r]);return n};const $ue=e=>e||"",Mue=e=>{if(e==="-")return e;let t=e;t[0]==="."&&(t=`0${e}`);const n=parseFloat(t);return Number.isNaN(n)?"":e},bN={xs:M(10),sm:M(14),md:M(16),lg:M(18),xl:M(20)},Nue={step:1,hideControls:!1,size:"sm",precision:0,noClampOnBlur:!1,removeTrailingZeros:!1,decimalSeparator:".",formatter:$ue,parser:Mue,type:"text"},ma=_.forwardRef((e,t)=>{const n=ae("NumberInput",Nue,e),{readOnly:r,disabled:o,value:i,onChange:s,decimalSeparator:a,thousandsSeparator:c,min:u,max:f,startValue:p,step:g,stepHoldInterval:v,stepHoldDelay:y,onFocus:w,onBlur:P,onKeyDown:x,onKeyUp:S,hideControls:O,radius:E,variant:$,precision:N,removeTrailingZeros:I,defaultValue:R,noClampOnBlur:B,handlersRef:z,classNames:G,styles:X,size:Q,rightSection:V,rightSectionWidth:H,formatter:Z,parser:Y,inputMode:j,unstyled:W,type:F}=n,K=Eue(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:ee,cx:fe}=gue({radius:E},{classNames:G,styles:X,unstyled:W,name:"NumberInput",variant:$,size:Q}),ie=be=>{if(be==="")return"";let De=be.toFixed(N);return I&&N>0&&(De=De.replace(new RegExp(`[0]{0,${N}}$`),""),De.endsWith(".")&&(De=De.slice(0,-1))),De},J=be=>{let De=be;return a&&(De=De.replace(".",a)),Z(De)},ne=be=>{let De=be;return a&&(De=De.replaceAll(c,"").replace(a,".")),Y(De)},le=be=>J(ie(be)),[_e,Ne]=_.useState(typeof i=="number"?i:typeof R=="number"?R:""),[we,He]=_.useState(()=>le(_e)),Te=_.useRef(),[je,it]=_.useState(!1),bt=(be,De)=>{if(!je||De){const Jr=le(be);Jr!==we&&He(Jr)}be!==_e&&Ne(be)},_n=typeof u=="number"?u:-1/0,pt=typeof f=="number"?f:1/0,Tn=_.useRef();Tn.current=()=>{var be;let De;_e===""?De=(be=p??u)!=null?be:0:De=parseFloat(ie(ia(_e+g,_n,pt))),bt(De,!0),s?.(De)};const kr=_.useRef();kr.current=()=>{var be;let De;_e===""?De=(be=p??u)!=null?be:0:De=parseFloat(ie(ia(_e-g,_n,pt))),bt(De,!0),s?.(De)},W3(z,{increment:Tn.current,decrement:kr.current}),_.useEffect(()=>{je||bt(i===void 0?_e:i,!0)},[i,je]);const lt=y!==void 0&&v!==void 0,Zn=_.useRef(null),Jt=_.useRef(0),ht=()=>{Zn.current&&window.clearTimeout(Zn.current),Zn.current=null,Jt.current=0},xo=be=>{be?Tn.current():kr.current(),Jt.current+=1},Yr=be=>{if(xo(be),lt){const De=typeof v=="number"?v:v(Jt.current);Zn.current=window.setTimeout(()=>Yr(be),De)}},ar=(be,De)=>{be.preventDefault(),Te.current.focus(),xo(De),lt&&(Zn.current=window.setTimeout(()=>Yr(De),y))};_.useEffect(()=>(ht(),ht),[]);const Kr=k.createElement("div",{className:ee.rightSection},k.createElement("button",{type:"button",tabIndex:-1,"aria-hidden":!0,disabled:_e>=f,className:fe(ee.control,ee.controlUp),onPointerDown:be=>{ar(be,!0)},onPointerUp:ht,onPointerLeave:ht},k.createElement(yN,{size:re({size:Q,sizes:bN}),direction:"up"})),k.createElement("button",{type:"button",tabIndex:-1,"aria-hidden":!0,disabled:_e<=u,className:fe(ee.control,ee.controlDown),onPointerDown:be=>{ar(be,!1)},onPointerUp:ht,onPointerLeave:ht},k.createElement(yN,{size:re({size:Q,sizes:bN}),direction:"down"}))),Bt=be=>{let De=be;(De[0]===`${a}`||De[0]===".")&&(De=`0${De}`);const Jr=parseFloat(ie(parseFloat(ne(De)))),Dt=B?Jr:ia(Jr,_n,pt),Zt=Number.isNaN(Dt)?"":Dt,$r=_e!==Zt;He(be),bt(Zt),$r&&s?.(Zt)},qr=be=>{be.nativeEvent.isComposing||Bt(be.target.value)},pn=be=>{it(!0),w?.(be)},wn=be=>{it(!1),P?.(be)},Er=be=>{if(typeof x=="function"&&x(be),be.repeat&<&&(be.key==="ArrowUp"||be.key==="ArrowDown")){be.preventDefault();return}r||(be.key==="ArrowUp"?ar(be,!0):be.key==="ArrowDown"&&ar(be,!1))},gt=be=>{typeof S=="function"&&S(be),(be.key==="ArrowUp"||be.key==="ArrowDown")&&ht()};return k.createElement(yn,kue(Cue({},K),{type:F,variant:$,value:we,disabled:o,readOnly:r,ref:ws(Te,t),onChange:qr,onFocus:pn,onBlur:wn,onKeyDown:Er,onKeyUp:gt,rightSection:V||(o||r||O||$==="unstyled"?null:Kr),rightSectionWidth:H??`calc(${re({size:Q,sizes:E6})} + ${M(1)})`,radius:E,max:f,min:u,step:g,size:Q,styles:X,classNames:G,inputMode:j||hue(g,N,TG()),__staticSelector:"NumberInput",unstyled:W}))});ma.displayName="@mantine/core/NumberInput";const I6=_.createContext(!1),Tue=I6.Provider,Iue=()=>_.useContext(I6);function j6({children:e,openDelay:t=0,closeDelay:n=0}){return k.createElement(Tue,{value:!0},k.createElement(HQ,{delay:{open:t,close:n}},e))}j6.displayName="@mantine/core/TooltipGroup";var jue=Object.defineProperty,Lue=Object.defineProperties,Due=Object.getOwnPropertyDescriptors,xN=Object.getOwnPropertySymbols,Rue=Object.prototype.hasOwnProperty,zue=Object.prototype.propertyIsEnumerable,SN=(e,t,n)=>t in e?jue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,PN=(e,t)=>{for(var n in t||(t={}))Rue.call(t,n)&&SN(e,n,t[n]);if(xN)for(var n of xN(t))zue.call(t,n)&&SN(e,n,t[n]);return e},Aue=(e,t)=>Lue(e,Due(t));function Bue(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 Fue=ue((e,{color:t,radius:n,width:r,multiline:o})=>({tooltip:Aue(PN(PN({},e.fn.fontStyles()),Bue(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 L6=Fue,D6={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 Vue({offset:e,position:t}){const[n,r]=_.useState(!1),o=_.useRef(),{x:i,y:s,reference:a,floating:c,refs:u,update:f,placement:p}=yP({placement:t,middleware:[fP({crossAxis:!0,padding:5,rootBoundary:"document"})]}),g=p.includes("right")?e:t.includes("left")?e*-1:0,v=p.includes("bottom")?e:t.includes("top")?e*-1:0,y=_.useCallback(({clientX:w,clientY:P})=>{a({getBoundingClientRect(){return{width:0,height:0,x:w,y:P,left:w+g,top:P+v,right:w,bottom:P}}})},[a]);return _.useEffect(()=>{if(u.floating.current){const w=o.current;w.addEventListener("mousemove",y);const P=us(u.floating.current);return P.forEach(x=>{x.addEventListener("scroll",f)}),()=>{w.removeEventListener("mousemove",y),P.forEach(x=>{x.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 Hue=Object.defineProperty,Wue=Object.defineProperties,Uue=Object.getOwnPropertyDescriptors,yv=Object.getOwnPropertySymbols,R6=Object.prototype.hasOwnProperty,z6=Object.prototype.propertyIsEnumerable,ON=(e,t,n)=>t in e?Hue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nh=(e,t)=>{for(var n in t||(t={}))R6.call(t,n)&&ON(e,n,t[n]);if(yv)for(var n of yv(t))z6.call(t,n)&&ON(e,n,t[n]);return e},rh=(e,t)=>Wue(e,Uue(t)),Zue=(e,t)=>{var n={};for(var r in e)R6.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&&z6.call(e,r)&&(n[r]=e[r]);return n};const Gue={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:ii("popover")};function A6(e){var t;const n=ae("TooltipFloating",Gue,e),{children:r,refProp:o,withinPortal:i,portalProps:s,style:a,className:c,classNames:u,styles:f,unstyled:p,radius:g,color:v,label:y,offset:w,position:P,multiline:x,width:S,zIndex:O,disabled:E,variant:$}=n,N=Zue(n,["children","refProp","withinPortal","portalProps","style","className","classNames","styles","unstyled","radius","color","label","offset","position","multiline","width","zIndex","disabled","variant"]),{handleMouseMove:I,x:R,y:B,opened:z,boundaryRef:G,floating:X,setOpened:Q}=Vue({offset:w,position:P}),{classes:V,cx:H}=L6({radius:g,color:v,multiline:x,width:S},{name:"TooltipFloating",classNames:u,styles:f,unstyled:p,variant:$});if(!Mf(r))throw new Error(D6.children);const Z=ws(G,r.ref),Y=W=>{var F,K;(K=(F=r.props).onMouseEnter)==null||K.call(F,W),I(W),Q(!0)},j=W=>{var F,K;(K=(F=r.props).onMouseLeave)==null||K.call(F,W),Q(!1)};return k.createElement(k.Fragment,null,k.createElement(zf,rh(nh({},s),{withinPortal:i}),k.createElement(Pe,rh(nh({},N),{ref:X,className:H(V.tooltip,c),style:rh(nh({},a),{zIndex:O,display:!E&&z?"block":"none",top:B??"",left:(t=Math.round(R))!=null?t:""})}),y)),_.cloneElement(r,rh(nh({},r.props),{[o]:Z,onMouseEnter:Y,onMouseLeave:j})))}A6.displayName="@mantine/core/TooltipFloating";function Yue(e){const[t,n]=_.useState(!1),o=typeof e.opened=="boolean"?e.opened:t,i=Iue(),s=$a(),{delay:a,currentId:c,setCurrentId:u}=Sz(),f=_.useCallback(R=>{n(R),R&&u(s)},[u,s]),{x:p,y:g,reference:v,floating:y,context:w,refs:P,update:x,placement:S,middlewareData:{arrow:{x:O,y:E}={}}}=yP({placement:e.position,open:o,onOpenChange:f,middleware:[uz(e.offset),fP({padding:8}),az(),yz({element:e.arrowRef,padding:e.arrowOffset}),...e.inline?[cz()]:[]]}),{getReferenceProps:$,getFloatingProps:N}=tee([VQ(w,{enabled:e.events.hover,delay:i?a:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events.touch}),QQ(w,{enabled:e.events.focus,keyboardOnly:!0}),eee(w,{role:"tooltip"}),XQ(w,{enabled:typeof e.opened===void 0}),WQ(w,{id:s})]);return Oz({opened:o,position:e.position,positionDependencies:e.positionDependencies,floating:{refs:P,update:x}}),Fn(()=>{var R;(R=e.onPositionChange)==null||R.call(e,S)},[S]),{x:p,y:g,arrowX:O,arrowY:E,reference:v,floating:y,getFloatingProps:N,getReferenceProps:$,isGroupPhase:o&&c&&c!==s,opened:o,placement:S}}var Kue=Object.defineProperty,que=Object.defineProperties,Jue=Object.getOwnPropertyDescriptors,_v=Object.getOwnPropertySymbols,B6=Object.prototype.hasOwnProperty,F6=Object.prototype.propertyIsEnumerable,CN=(e,t,n)=>t in e?Kue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ya=(e,t)=>{for(var n in t||(t={}))B6.call(t,n)&&CN(e,n,t[n]);if(_v)for(var n of _v(t))F6.call(t,n)&&CN(e,n,t[n]);return e},H_=(e,t)=>que(e,Jue(t)),Xue=(e,t)=>{var n={};for(var r in e)B6.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&&F6.call(e,r)&&(n[r]=e[r]);return n};const Que={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:ii("popover"),positionDependencies:[]},T0=_.forwardRef((e,t)=>{var n;const r=_.useRef(null),o=ae("Tooltip",Que,e),{children:i,position:s,refProp:a,label:c,openDelay:u,closeDelay:f,onPositionChange:p,opened:g,withinPortal:v,portalProps:y,radius:w,color:P,classNames:x,styles:S,unstyled:O,style:E,className:$,withArrow:N,arrowSize:I,arrowOffset:R,arrowRadius:B,arrowPosition:z,offset:G,transitionProps:X,multiline:Q,width:V,events:H,zIndex:Z,disabled:Y,positionDependencies:j,onClick:W,onMouseEnter:F,onMouseLeave:K,inline:ee,variant:fe,keepMounted:ie}=o,J=Xue(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:le,theme:_e}=L6({radius:w,color:P,width:V,multiline:Q},{name:"Tooltip",classNames:x,styles:S,unstyled:O,variant:fe}),Ne=Yue({position:Dz(_e.dir,s),closeDelay:f,openDelay:u,onPositionChange:p,opened:g,events:H,arrowRef:r,arrowOffset:R,offset:G+(N?I/2:0),positionDependencies:[...j,i],inline:ee});if(!Mf(i))throw new Error(D6.children);const we=ws(Ne.reference,i.ref,t);return k.createElement(k.Fragment,null,k.createElement(zf,H_(Ya({},y),{withinPortal:v}),k.createElement(Os,H_(Ya({keepMounted:ie,mounted:!Y&&Ne.opened},X),{transition:X.transition||"fade",duration:Ne.isGroupPhase?10:(n=X.duration)!=null?n:100}),He=>{var Te,je;return k.createElement(Pe,Ya(Ya({},J),Ne.getFloatingProps({ref:Ne.floating,className:ne.tooltip,style:H_(Ya(Ya({},E),He),{zIndex:Z,top:(Te=Ne.y)!=null?Te:0,left:(je=Ne.x)!=null?je:0})})),c,k.createElement(wP,{ref:r,arrowX:Ne.arrowX,arrowY:Ne.arrowY,visible:N,position:Ne.placement,arrowSize:I,arrowOffset:R,arrowRadius:B,arrowPosition:z,className:ne.arrow}))})),_.cloneElement(i,Ne.getReferenceProps(Ya({onClick:W,onMouseEnter:F,onMouseLeave:K,onMouseMove:e.onMouseMove,onPointerDown:e.onPointerDown,onPointerEnter:e.onPointerEnter,[a]:we,className:le($,i.props.className)},i.props))))});T0.Group=j6;T0.Floating=A6;T0.displayName="@mantine/core/Tooltip";const zt=T0;function ede({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 tde=ue(()=>({input:{"&:not(:disabled)":{cursor:"pointer","&::selection":{backgroundColor:"transparent"}}}}));const nde=tde;var rde=Object.defineProperty,ode=Object.defineProperties,ide=Object.getOwnPropertyDescriptors,wv=Object.getOwnPropertySymbols,V6=Object.prototype.hasOwnProperty,H6=Object.prototype.propertyIsEnumerable,kN=(e,t,n)=>t in e?rde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ld=(e,t)=>{for(var n in t||(t={}))V6.call(t,n)&&kN(e,n,t[n]);if(wv)for(var n of wv(t))H6.call(t,n)&&kN(e,n,t[n]);return e},W_=(e,t)=>ode(e,ide(t)),sde=(e,t)=>{var n={};for(var r in e)V6.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&&H6.call(e,r)&&(n[r]=e[r]);return n};function ade(e,t){return t.label.toLowerCase().trim().includes(e.toLowerCase().trim())}function lde(e,t){return!!e&&!t.some(n=>n.label.toLowerCase()===e.toLowerCase())}const cde={required:!1,size:"sm",shadow:"sm",itemComponent:iP,transitionProps:{transition:"fade",duration:0},initiallyOpened:!1,filter:ade,maxDropdownHeight:220,searchable:!1,clearable:!1,limit:1/0,disabled:!1,creatable:!1,shouldCreate:lde,selectOnBlur:!1,switchDirectionOnFlip:!1,filterDataOnExactSearchMatch:!1,zIndex:ii("popover"),positionDependencies:[],dropdownPosition:"flip"},Nl=_.forwardRef((e,t)=>{const n=bP("Select",cde,e),{inputProps:r,wrapperProps:o,shadow:i,data:s,value:a,defaultValue:c,onChange:u,itemComponent:f,onKeyDown:p,onBlur:g,onFocus:v,transitionProps:y,initiallyOpened:w,unstyled:P,classNames:x,styles:S,filter:O,maxDropdownHeight:E,searchable:$,clearable:N,nothingFound:I,limit:R,disabled:B,onSearchChange:z,searchValue:G,rightSection:X,rightSectionWidth:Q,creatable:V,getCreateLabel:H,shouldCreate:Z,selectOnBlur:Y,onCreate:j,dropdownComponent:W,onDropdownClose:F,onDropdownOpen:K,withinPortal:ee,portalProps:fe,switchDirectionOnFlip:ie,zIndex:J,name:ne,dropdownPosition:le,allowDeselect:_e,placeholder:Ne,filterDataOnExactSearchMatch:we,form:He,positionDependencies:Te,readOnly:je,clearButtonProps:it,hoverOnSearchChange:bt}=n,_n=sde(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:Tn,theme:kr}=nde(),[lt,Zn]=_.useState(w),[Jt,ht]=_.useState(-1),xo=_.useRef(),Yr=_.useRef({}),[ar,Kr]=_.useState("column"),Bt=ar==="column",{scrollIntoView:qr,targetRef:pn,scrollableRef:wn}=G3({duration:0,offset:5,cancelable:!1,isList:!0}),Er=_e===void 0?N:_e,gt=Se=>{if(lt!==Se){Zn(Se);const ct=Se?K:F;typeof ct=="function"&&ct()}},be=V&&typeof H=="function";let De=null;const Jr=s.map(Se=>typeof Se=="string"?{label:Se,value:Se}:Se),Dt=h3({data:Jr}),[Zt,$r,xt]=go({value:a,defaultValue:c,finalValue:null,onChange:u}),nn=Dt.find(Se=>Se.value===Zt),[Gn,Aa]=go({value:G,defaultValue:nn?.label||"",finalValue:void 0,onChange:z}),Yn=Se=>{Aa(Se),$&&typeof z=="function"&&z(Se)},bn=()=>{var Se;je||($r(null),xt||Yn(""),(Se=xo.current)==null||Se.focus())};_.useEffect(()=>{const Se=Dt.find(ct=>ct.value===Zt);Se?Yn(Se.label):(!be||!Zt)&&Yn("")},[Zt]),_.useEffect(()=>{nn&&(!$||!lt)&&Yn(nn.label)},[nn?.label]);const Ft=Se=>{if(!je)if(Er&&nn?.value===Se.value)$r(null),gt(!1);else{if(Se.creatable&&typeof j=="function"){const ct=j(Se.value);typeof ct<"u"&&ct!==null&&$r(typeof ct=="string"?ct:ct.value)}else $r(Se.value);xt||Yn(Se.label),ht(-1),gt(!1),xo.current.focus()}},Gt=ede({data:Dt,searchable:$,limit:R,searchValue:Gn,filter:O,filterDataOnExactSearchMatch:we,value:Zt});be&&Z(Gn,Gt)&&(De=H(Gn),Gt.push({label:Gn,value:Gn,creatable:!0}));const Xr=(Se,ct,rn)=>{let ze=Se;for(;rn(ze);)if(ze=ct(ze),!Gt[ze].disabled)return ze;return Se};Fn(()=>{ht(bt&&Gn?0:-1)},[Gn,bt]);const So=Zt?Gt.findIndex(Se=>Se.value===Zt):0,lr=!je&&(Gt.length>0?lt:lt&&!!I),cr=()=>{ht(Se=>{var ct;const rn=Xr(Se,ze=>ze-1,ze=>ze>0);return pn.current=Yr.current[(ct=Gt[rn])==null?void 0:ct.value],lr&&qr({alignment:Bt?"start":"end"}),rn})},Vi=()=>{ht(Se=>{var ct;const rn=Xr(Se,ze=>ze+1,ze=>zewindow.setTimeout(()=>{var Se;pn.current=Yr.current[(Se=Gt[So])==null?void 0:Se.value],qr({alignment:Bt?"end":"start"})},50);Fn(()=>{lr&&Es()},[lr]);const ur=Se=>{switch(typeof p=="function"&&p(Se),Se.key){case"ArrowUp":{Se.preventDefault(),lt?Bt?cr():Vi():(ht(So),gt(!0),Es());break}case"ArrowDown":{Se.preventDefault(),lt?Bt?Vi():cr():(ht(So),gt(!0),Es());break}case"Home":{if(!$){Se.preventDefault(),lt||gt(!0);const ct=Gt.findIndex(rn=>!rn.disabled);ht(ct),lr&&qr({alignment:Bt?"end":"start"})}break}case"End":{if(!$){Se.preventDefault(),lt||gt(!0);const ct=Gt.map(rn=>!!rn.disabled).lastIndexOf(!1);ht(ct),lr&&qr({alignment:Bt?"end":"start"})}break}case"Escape":{Se.preventDefault(),gt(!1),ht(-1);break}case" ":{$||(Se.preventDefault(),Gt[Jt]&<?Ft(Gt[Jt]):(gt(!0),ht(So),Es()));break}case"Enter":$||Se.preventDefault(),Gt[Jt]&<&&(Se.preventDefault(),Ft(Gt[Jt]))}},Oe=Se=>{typeof g=="function"&&g(Se);const ct=Dt.find(rn=>rn.value===Zt);Y&&Gt[Jt]&<&&Ft(Gt[Jt]),Yn(ct?.label||""),gt(!1)},Ba=Se=>{typeof v=="function"&&v(Se),$&>(!0)},Yl=Se=>{je||(Yn(Se.currentTarget.value),N&&Se.currentTarget.value===""&&$r(null),ht(-1),gt(!0))},Fa=()=>{je||(gt(!lt),Zt&&!lt&&ht(So))};return k.createElement(et.Wrapper,W_(ld({},o),{__staticSelector:"Select"}),k.createElement(ha,{opened:lr,transitionProps:y,shadow:i,withinPortal:ee,portalProps:fe,__staticSelector:"Select",onDirectionChange:Kr,switchDirectionOnFlip:ie,zIndex:J,dropdownPosition:le,positionDependencies:[...Te,Gn],classNames:x,styles:S,unstyled:P,variant:r.variant},k.createElement(ha.Target,null,k.createElement("div",{role:"combobox","aria-haspopup":"listbox","aria-owns":lr?`${r.id}-items`:null,"aria-controls":r.id,"aria-expanded":lr,onMouseLeave:()=>ht(-1),tabIndex:-1},k.createElement("input",{type:"hidden",name:ne,value:Zt||"",form:He,disabled:B}),k.createElement(et,ld(W_(ld(ld({autoComplete:"off",type:"search"},r),_n),{ref:ws(t,xo),onKeyDown:ur,__staticSelector:"Select",value:Gn,placeholder:Ne,onChange:Yl,"aria-autocomplete":"list","aria-controls":lr?`${r.id}-items`:null,"aria-activedescendant":Jt>=0?`${r.id}-${Jt}`:null,onMouseDown:Fa,onBlur:Oe,onFocus:Ba,readOnly:!$||je,disabled:B,"data-mantine-stop-propagation":lr,name:null,classNames:W_(ld({},x),{input:Tn({[pt.input]:!$},x?.input)})}),O6({theme:kr,rightSection:X,rightSectionWidth:Q,styles:S,size:r.size,shouldClear:N&&!!nn,onClear:bn,error:o.error,clearButtonProps:it,disabled:B,readOnly:je}))))),k.createElement(ha.Dropdown,{component:W||$0,maxHeight:E,direction:ar,id:r.id,innerRef:wn,__staticSelector:"Select",classNames:x,styles:S},k.createElement(oP,{data:Gt,hovered:Jt,classNames:x,styles:S,isItemSelected:Se=>Se===Zt,uuid:r.id,__staticSelector:"Select",onItemHover:ht,onItemSelect:Ft,itemsRefs:Yr,itemComponent:f,size:r.size,nothingFound:I,creatable:be&&!!De,createLabel:De,"aria-label":o.label,unstyled:P,variant:r.variant}))))});Nl.displayName="@mantine/core/Select";function ude(e,t){if(t.length===0)return t;const n="maxWidth"in t[0]?"maxWidth":"minWidth",r=[...t].sort((o,i)=>Ro(re({size:i[n],sizes:e.breakpoints}))-Ro(re({size:o[n],sizes:e.breakpoints})));return n==="minWidth"?r.reverse():r}var dde=Object.defineProperty,EN=Object.getOwnPropertySymbols,fde=Object.prototype.hasOwnProperty,pde=Object.prototype.propertyIsEnumerable,$N=(e,t,n)=>t in e?dde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hde=(e,t)=>{for(var n in t||(t={}))fde.call(t,n)&&$N(e,n,t[n]);if(EN)for(var n of EN(t))pde.call(t,n)&&$N(e,n,t[n]);return e},mde=ue((e,{spacing:t,breakpoints:n,cols:r,verticalSpacing:o})=>{const i=o!=null,s=ude(e,n).reduce((a,c)=>{var u,f;const p="maxWidth"in c?"max-width":"min-width",g=re({size:p==="max-width"?c.maxWidth:c.minWidth,sizes:e.breakpoints,units:"em"}),v=Ro(g)-(p==="max-width"?1:0);return a[`@media (${p}: ${ba(v)})`]={gridTemplateColumns:`repeat(${c.cols}, minmax(0, 1fr))`,gap:`${re({size:(u=c.verticalSpacing)!=null?u:i?o:t,sizes:e.spacing})} ${re({size:(f=c.spacing)!=null?f:t,sizes:e.spacing})}`},a},{});return{root:hde({boxSizing:"border-box",display:"grid",gridTemplateColumns:`repeat(${r}, minmax(0, 1fr))`,gap:`${re({size:i?o:t,sizes:e.spacing})} ${re({size:t,sizes:e.spacing})}`},s)}});const gde=mde;var vde=Object.defineProperty,bv=Object.getOwnPropertySymbols,W6=Object.prototype.hasOwnProperty,U6=Object.prototype.propertyIsEnumerable,MN=(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={}))W6.call(t,n)&&MN(e,n,t[n]);if(bv)for(var n of bv(t))U6.call(t,n)&&MN(e,n,t[n]);return e},_de=(e,t)=>{var n={};for(var r in e)W6.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&&U6.call(e,r)&&(n[r]=e[r]);return n};const wde={breakpoints:[],cols:1,spacing:"md"},TP=_.forwardRef((e,t)=>{const n=ae("SimpleGrid",wde,e),{className:r,breakpoints:o,cols:i,spacing:s,verticalSpacing:a,children:c,unstyled:u,variant:f}=n,p=_de(n,["className","breakpoints","cols","spacing","verticalSpacing","children","unstyled","variant"]),{classes:g,cx:v}=gde({breakpoints:o,cols:i,spacing:s,verticalSpacing:a},{name:"SimpleGrid",unstyled:u,variant:f});return k.createElement(Pe,yde({className:v(g.root,r),ref:t},p),c)});TP.displayName="@mantine/core/SimpleGrid";var bde=ue((e,{spacing:t,align:n,justify:r})=>({root:{display:"flex",flexDirection:"column",alignItems:n,justifyContent:r,gap:re({size:t,sizes:e.spacing})}}));const xde=bde;var Sde=Object.defineProperty,xv=Object.getOwnPropertySymbols,Z6=Object.prototype.hasOwnProperty,G6=Object.prototype.propertyIsEnumerable,NN=(e,t,n)=>t in e?Sde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pde=(e,t)=>{for(var n in t||(t={}))Z6.call(t,n)&&NN(e,n,t[n]);if(xv)for(var n of xv(t))G6.call(t,n)&&NN(e,n,t[n]);return e},Ode=(e,t)=>{var n={};for(var r in e)Z6.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&&G6.call(e,r)&&(n[r]=e[r]);return n};const Cde={spacing:"md",align:"stretch",justify:"flex-start"},Je=_.forwardRef((e,t)=>{const n=ae("Stack",Cde,e),{spacing:r,className:o,align:i,justify:s,unstyled:a,variant:c}=n,u=Ode(n,["spacing","className","align","justify","unstyled","variant"]),{classes:f,cx:p}=xde({spacing:r,align:i,justify:s},{name:"Stack",unstyled:a,variant:c});return k.createElement(Pe,Pde({className:p(f.root,o),ref:t},u))});Je.displayName="@mantine/core/Stack";const Y6=_.createContext(null),kde=Y6.Provider,Ede=()=>_.useContext(Y6);var $de=Object.defineProperty,Sv=Object.getOwnPropertySymbols,K6=Object.prototype.hasOwnProperty,q6=Object.prototype.propertyIsEnumerable,TN=(e,t,n)=>t in e?$de(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,IN=(e,t)=>{for(var n in t||(t={}))K6.call(t,n)&&TN(e,n,t[n]);if(Sv)for(var n of Sv(t))q6.call(t,n)&&TN(e,n,t[n]);return e},Mde=(e,t)=>{var n={};for(var r in e)K6.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&&q6.call(e,r)&&(n[r]=e[r]);return n};const Nde={size:"sm"},J6=_.forwardRef((e,t)=>{const n=ae("SwitchGroup",Nde,e),{children:r,value:o,defaultValue:i,onChange:s,size:a,wrapperProps:c}=n,u=Mde(n,["children","value","defaultValue","onChange","size","wrapperProps"]),[f,p]=go({value:o,defaultValue:i,finalValue:[],onChange:s}),g=v=>{const y=v.currentTarget.value;p(f.includes(y)?f.filter(w=>w!==y):[...f,y])};return k.createElement(kde,{value:{value:f,onChange:g,size:a}},k.createElement(et.Wrapper,IN(IN({labelElement:"div",size:a,__staticSelector:"SwitchGroup",ref:t},c),u),r))});J6.displayName="@mantine/core/SwitchGroup";var Tde=Object.defineProperty,Ide=Object.defineProperties,jde=Object.getOwnPropertyDescriptors,jN=Object.getOwnPropertySymbols,Lde=Object.prototype.hasOwnProperty,Dde=Object.prototype.propertyIsEnumerable,LN=(e,t,n)=>t in e?Tde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rde=(e,t)=>{for(var n in t||(t={}))Lde.call(t,n)&&LN(e,n,t[n]);if(jN)for(var n of jN(t))Dde.call(t,n)&&LN(e,n,t[n]);return e},zde=(e,t)=>Ide(e,jde(t));const Ade={xs:M(16),sm:M(20),md:M(24),lg:M(30),xl:M(36)},Bde={xs:M(32),sm:M(38),md:M(46),lg:M(56),xl:M(72)},Fde={xs:M(12),sm:M(14),md:M(18),lg:M(22),xl:M(28)},Vde={xs:M(5),sm:M(6),md:M(7),lg:M(9),xl:M(11)},Hde={xs:M(4),sm:M(5),md:M(6),lg:M(8),xl:M(10)};var Wde=ue((e,{radius:t,color:n,labelPosition:r,error:o},{size:i})=>{const s=re({size:i,sizes:Fde}),a=re({size:t,sizes:e.radius}),c=e.fn.variant({variant:"filled",color:n}),u=re({size:i,sizes:Bde}),f=M(i==="xs"?1:2),p=e.fn.variant({variant:"filled",color:"red"}).background;return{root:{position:"relative"},input:{height:0,width:0,overflow:"hidden",whiteSpace:"nowrap",padding:0,WebkitClipPath:"inset(50%)",clipPath:"inset(50%)",position:"absolute"},track:zde(Rde({},e.fn.focusStyles("input:focus + &")),{cursor:e.cursorType,overflow:"hidden",WebkitTapHighlightColor:"transparent",position:"relative",borderRadius:a,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[2],border:`${M(1)} solid ${o?p:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,height:re({size:i,sizes:Ade}),minWidth:u,margin:0,transitionProperty:"background-color, border-color",transitionTimingFunction:e.transitionTimingFunction,transitionDuration:"150ms",boxSizing:"border-box",appearance:"none",display:"flex",alignItems:"center",fontSize:re({size:i,sizes:Vde}),fontWeight:600,order:r==="left"?2:1,userSelect:"none",zIndex:0,lineHeight:0,color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[6],transition:`color 150ms ${e.transitionTimingFunction}`,"input:checked + &":{backgroundColor:c.background,borderColor:c.background,color:e.white,transition:`color 150ms ${e.transitionTimingFunction}`},"input:disabled + &":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],borderColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],cursor:"not-allowed",pointerEvents:"none"}}),thumb:{position:"absolute",zIndex:1,borderRadius:a,boxSizing:"border-box",display:"flex",backgroundColor:e.white,height:s,width:s,border:`${M(1)} solid ${e.colorScheme==="dark"?e.white:e.colors.gray[3]}`,left:f,transition:`left 150ms ${e.transitionTimingFunction}`,"& > *":{margin:"auto"},"@media (prefers-reduced-motion)":{transitionDuration:e.respectReducedMotion?"0ms":""},"input:checked + * > &":{left:`calc(100% - ${s} - ${f})`,borderColor:e.white},"input:disabled + * > &":{borderColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],backgroundColor:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[0]}},trackLabel:{height:"100%",display:"grid",placeContent:"center",minWidth:`calc(${u} - ${s})`,paddingInline:re({size:i,sizes:Hde}),marginLeft:`calc(${s} + ${f})`,transition:`margin 150ms ${e.transitionTimingFunction}`,"input:checked + * > &":{marginLeft:0,marginRight:`calc(${s} + ${f})`}}}});const Ude=Wde;var Zde=Object.defineProperty,Gde=Object.defineProperties,Yde=Object.getOwnPropertyDescriptors,Pv=Object.getOwnPropertySymbols,X6=Object.prototype.hasOwnProperty,Q6=Object.prototype.propertyIsEnumerable,DN=(e,t,n)=>t in e?Zde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,U_=(e,t)=>{for(var n in t||(t={}))X6.call(t,n)&&DN(e,n,t[n]);if(Pv)for(var n of Pv(t))Q6.call(t,n)&&DN(e,n,t[n]);return e},Kde=(e,t)=>Gde(e,Yde(t)),qde=(e,t)=>{var n={};for(var r in e)X6.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&&Q6.call(e,r)&&(n[r]=e[r]);return n};const Jde={offLabel:"",onLabel:"",size:"sm",radius:"xl",error:!1},jd=_.forwardRef((e,t)=>{var n;const r=ae("Switch",Jde,e),{className:o,color:i,label:s,offLabel:a,onLabel:c,id:u,style:f,size:p,radius:g,wrapperProps:v,children:y,unstyled:w,styles:P,classNames:x,thumbIcon:S,sx:O,checked:E,defaultChecked:$,onChange:N,labelPosition:I,description:R,error:B,disabled:z,variant:G}=r,X=qde(r,["className","color","label","offLabel","onLabel","id","style","size","radius","wrapperProps","children","unstyled","styles","classNames","thumbIcon","sx","checked","defaultChecked","onChange","labelPosition","description","error","disabled","variant"]),Q=Ede(),V=Q?.size||p,{classes:H,cx:Z}=Ude({color:i,radius:g,labelPosition:I,error:!!B},{name:"Switch",classNames:x,styles:P,unstyled:w,size:V,variant:G}),{systemStyles:Y,rest:j}=Dl(X),W=$a(u),F=Q?{checked:Q.value.includes(j.value),onChange:Q.onChange}:{},[K,ee]=go({value:(n=F.checked)!=null?n:E,defaultValue:$,finalValue:!1});return k.createElement(EP,U_(U_({className:Z(o,H.root),sx:O,style:f,id:W,size:Q?.size||p,labelPosition:I,label:s,description:R,error:B,disabled:z,__staticSelector:"Switch",classNames:x,styles:P,unstyled:w,"data-checked":F.checked||void 0,variant:G},Y),v),k.createElement("input",Kde(U_({},j),{disabled:z,checked:K,onChange:fe=>{Q?F.onChange(fe):N?.(fe),ee(fe.currentTarget.checked)},id:W,ref:t,type:"checkbox",className:H.input})),k.createElement("label",{htmlFor:W,className:H.track},k.createElement("div",{className:H.thumb},S),k.createElement("div",{className:H.trackLabel},K?c:a)))});jd.displayName="@mantine/core/Switch";jd.Group=J6;var Xde=Object.defineProperty,Qde=Object.defineProperties,efe=Object.getOwnPropertyDescriptors,RN=Object.getOwnPropertySymbols,tfe=Object.prototype.hasOwnProperty,nfe=Object.prototype.propertyIsEnumerable,zN=(e,t,n)=>t in e?Xde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rfe=(e,t)=>{for(var n in t||(t={}))tfe.call(t,n)&&zN(e,n,t[n]);if(RN)for(var n of RN(t))nfe.call(t,n)&&zN(e,n,t[n]);return e},ofe=(e,t)=>Qde(e,efe(t)),ife=ue((e,{captionSide:t,horizontalSpacing:n,verticalSpacing:r,fontSize:o,withBorder:i,withColumnBorders:s})=>{const a=`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`;return{root:ofe(rfe({},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:re({size:o,sizes:e.fontSizes}),padding:`${re({size:r,sizes:e.spacing})} ${re({size:n,sizes:e.spacing})}`},"& > thead > tr > th":{borderBottom:a},"& > tfoot > tr > th, & > tbody > tr > th":{borderTop:a},"& > tbody > tr > td":{padding:`${re({size:r,sizes:e.spacing})} ${re({size:n,sizes:e.spacing})}`,borderTop:a,fontSize:re({size:o,sizes:e.fontSizes})},"& > tbody > tr:first-of-type > td, & > tbody > tr:first-of-type > th":{borderTop:"none"},"& > thead > tr > th, & > tbody > tr > 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 sfe=ife;var afe=Object.defineProperty,lfe=Object.defineProperties,cfe=Object.getOwnPropertyDescriptors,Ov=Object.getOwnPropertySymbols,e8=Object.prototype.hasOwnProperty,t8=Object.prototype.propertyIsEnumerable,AN=(e,t,n)=>t in e?afe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ufe=(e,t)=>{for(var n in t||(t={}))e8.call(t,n)&&AN(e,n,t[n]);if(Ov)for(var n of Ov(t))t8.call(t,n)&&AN(e,n,t[n]);return e},dfe=(e,t)=>lfe(e,cfe(t)),ffe=(e,t)=>{var n={};for(var r in e)e8.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&&t8.call(e,r)&&(n[r]=e[r]);return n};const pfe={striped:!1,highlightOnHover:!1,captionSide:"top",horizontalSpacing:"xs",fontSize:"sm",verticalSpacing:7,withBorder:!1,withColumnBorders:!1},IP=_.forwardRef((e,t)=>{const n=ae("Table",pfe,e),{className:r,children:o,striped:i,highlightOnHover:s,captionSide:a,horizontalSpacing:c,verticalSpacing:u,fontSize:f,unstyled:p,withBorder:g,withColumnBorders:v,variant:y}=n,w=ffe(n,["className","children","striped","highlightOnHover","captionSide","horizontalSpacing","verticalSpacing","fontSize","unstyled","withBorder","withColumnBorders","variant"]),{classes:P,cx:x}=sfe({captionSide:a,verticalSpacing:u,horizontalSpacing:c,fontSize:f,withBorder:g,withColumnBorders:v},{unstyled:p,name:"Table",variant:y});return k.createElement(Pe,dfe(ufe({},w),{component:"table",ref:t,className:x(P.root,r),"data-striped":i||void 0,"data-hover":s||void 0}),o)});IP.displayName="@mantine/core/Table";var hfe=Object.defineProperty,mfe=Object.defineProperties,gfe=Object.getOwnPropertyDescriptors,BN=Object.getOwnPropertySymbols,vfe=Object.prototype.hasOwnProperty,yfe=Object.prototype.propertyIsEnumerable,FN=(e,t,n)=>t in e?hfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,VN=(e,t)=>{for(var n in t||(t={}))vfe.call(t,n)&&FN(e,n,t[n]);if(BN)for(var n of BN(t))yfe.call(t,n)&&FN(e,n,t[n]);return e},_fe=(e,t)=>mfe(e,gfe(t));const wfe={xs:M(16),sm:M(20),md:M(26),lg:M(32),xl:M(40)},bfe=["filled","light","gradient","outline","default"];function xfe({theme:e,variant:t,color:n,gradient:r}){if(!bfe.includes(t))return null;const o=e.fn.variant({variant:t,color:n||e.primaryColor,gradient:r,primaryFallback:!1});return{backgroundColor:o.background,color:o.color,backgroundImage:t==="gradient"?o.background:void 0,border:`${M(t==="gradient"?0:1)} solid ${o.border}`}}var Sfe=ue((e,{color:t,radius:n,gradient:r},{variant:o,size:i})=>{const s=re({size:i,sizes:wfe});return{root:VN(_fe(VN({},e.fn.fontStyles()),{display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:s,height:s,minWidth:s,minHeight:s,borderRadius:e.fn.radius(n)}),xfe({theme:e,variant:o,gradient:r,color:t}))}});const Pfe=Sfe;var Ofe=Object.defineProperty,Cv=Object.getOwnPropertySymbols,n8=Object.prototype.hasOwnProperty,r8=Object.prototype.propertyIsEnumerable,HN=(e,t,n)=>t in e?Ofe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cfe=(e,t)=>{for(var n in t||(t={}))n8.call(t,n)&&HN(e,n,t[n]);if(Cv)for(var n of Cv(t))r8.call(t,n)&&HN(e,n,t[n]);return e},kfe=(e,t)=>{var n={};for(var r in e)n8.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&&r8.call(e,r)&&(n[r]=e[r]);return n};const Efe={size:"md",variant:"filled"},ex=_.forwardRef((e,t)=>{const n=ae("ThemeIcon",Efe,e),{className:r,size:o,radius:i,variant:s,color:a,children:c,gradient:u,unstyled:f}=n,p=kfe(n,["className","size","radius","variant","color","children","gradient","unstyled"]),{classes:g,cx:v}=Pfe({variant:s,radius:i,color:a,gradient:u},{name:"ThemeIcon",unstyled:f,variant:s,size:o});return k.createElement(Pe,Cfe({className:v(g.root,r),ref:t},p),c)});ex.displayName="@mantine/core/ThemeIcon";var $fe=Object.defineProperty,Mfe=Object.defineProperties,Nfe=Object.getOwnPropertyDescriptors,WN=Object.getOwnPropertySymbols,Tfe=Object.prototype.hasOwnProperty,Ife=Object.prototype.propertyIsEnumerable,UN=(e,t,n)=>t in e?$fe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jfe=(e,t)=>{for(var n in t||(t={}))Tfe.call(t,n)&&UN(e,n,t[n]);if(WN)for(var n of WN(t))Ife.call(t,n)&&UN(e,n,t[n]);return e},Lfe=(e,t)=>Mfe(e,Nfe(t));function Dfe(e,t,n){return typeof e<"u"?e in n.headings.sizes?n.headings.sizes[e].fontSize:M(e):n.headings.sizes[t].fontSize}function Rfe(e,t,n){return typeof e<"u"&&e in n.headings.sizes?n.headings.sizes[e].lineHeight:n.headings.sizes[t].lineHeight}var zfe=ue((e,{element:t,weight:n,inline:r},{size:o})=>({root:Lfe(jfe({},e.fn.fontStyles()),{fontFamily:e.headings.fontFamily,fontWeight:n||e.headings.sizes[t].fontWeight||e.headings.fontWeight,fontSize:Dfe(o,t,e),lineHeight:r?1:Rfe(o,t,e),margin:0})}));const Afe=zfe;var Bfe=Object.defineProperty,kv=Object.getOwnPropertySymbols,o8=Object.prototype.hasOwnProperty,i8=Object.prototype.propertyIsEnumerable,ZN=(e,t,n)=>t in e?Bfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ffe=(e,t)=>{for(var n in t||(t={}))o8.call(t,n)&&ZN(e,n,t[n]);if(kv)for(var n of kv(t))i8.call(t,n)&&ZN(e,n,t[n]);return e},Vfe=(e,t)=>{var n={};for(var r in e)o8.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&&i8.call(e,r)&&(n[r]=e[r]);return n};const Hfe={order:1},s8=_.forwardRef((e,t)=>{const n=ae("Title",Hfe,e),{className:r,order:o,children:i,unstyled:s,size:a,weight:c,inline:u,variant:f}=n,p=Vfe(n,["className","order","children","unstyled","size","weight","inline","variant"]),{classes:g,cx:v}=Afe({element:`h${o}`,weight:c,inline:u},{name:"Title",unstyled:s,variant:f,size:a});return[1,2,3,4,5,6].includes(o)?k.createElement(U,Ffe({variant:f,component:`h${o}`,ref:t,className:v(g.root,r)},p),i):null});s8.displayName="@mantine/core/Title";var Wfe=Object.defineProperty,Ufe=Object.defineProperties,Zfe=Object.getOwnPropertyDescriptors,GN=Object.getOwnPropertySymbols,Gfe=Object.prototype.hasOwnProperty,Yfe=Object.prototype.propertyIsEnumerable,YN=(e,t,n)=>t in e?Wfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oh=(e,t)=>{for(var n in t||(t={}))Gfe.call(t,n)&&YN(e,n,t[n]);if(GN)for(var n of GN(t))Yfe.call(t,n)&&YN(e,n,t[n]);return e},ih=(e,t)=>Ufe(e,Zfe(t)),Kfe=ue(e=>{const t=UW(e.headings.sizes).reduce((n,r)=>{const o=e.headings.sizes[r];return n[`& ${r}`]=ih(oh({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(${M(o.fontSize)} / 1.3)`}}),n},{});return{root:ih(oh(ih(oh({},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:`${M(1)} dashed ${e.colors.gray[e.colorScheme==="dark"?4:6]}`},"& a":ih(oh({},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:`${M(1)} ${M(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:`${M(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:`${M(7)} ${M(10)}`},"& thead th":{borderBottom:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`},"& tfoot th":{borderTop:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`},"& td":{padding:`${M(7)} ${M(10)}`,borderBottom:`${M(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:`${M(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 qfe=Kfe;var Jfe=Object.defineProperty,Ev=Object.getOwnPropertySymbols,a8=Object.prototype.hasOwnProperty,l8=Object.prototype.propertyIsEnumerable,KN=(e,t,n)=>t in e?Jfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xfe=(e,t)=>{for(var n in t||(t={}))a8.call(t,n)&&KN(e,n,t[n]);if(Ev)for(var n of Ev(t))l8.call(t,n)&&KN(e,n,t[n]);return e},Qfe=(e,t)=>{var n={};for(var r in e)a8.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&&l8.call(e,r)&&(n[r]=e[r]);return n};const c8=_.forwardRef((e,t)=>{const n=ae("TypographyStylesProvider",{},e),{className:r,unstyled:o,variant:i}=n,s=Qfe(n,["className","unstyled","variant"]),{classes:a,cx:c}=qfe(null,{name:"TypographyStylesProvider",unstyled:o,variant:i});return k.createElement(Pe,Xfe({className:c(a.root,r),ref:t},s))});c8.displayName="@mantine/core/TypographyStylesProvider";var tx={},qN=xs;tx.createRoot=qN.createRoot,tx.hydrateRoot=qN.hydrateRoot;/** * @remix-run/router v1.9.0 * * Copyright (c) Remix Software Inc. @@ -93,7 +93,7 @@ Error generating stack: `+i.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function mf(){return mf=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function j0(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function tpe(){return Math.random().toString(36).substr(2,8)}function XN(e,t){return{usr:e.state,key:e.key,idx:t}}function rx(e,t,n,r){return n===void 0&&(n=null),mf({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Vl(t):t,{state:n,key:t&&t.key||r||tpe()})}function Mv(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 Vl(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 npe(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,s=o.history,a=Qs.Pop,c=null,u=f();u==null&&(u=0,s.replaceState(mf({},s.state,{idx:u}),""));function f(){return(s.state||{idx:null}).idx}function p(){a=Qs.Pop;let P=f(),x=P==null?null:P-u;u=P,c&&c({action:a,location:w.location,delta:x})}function g(P,x){a=Qs.Push;let S=rx(w.location,P,x);n&&n(S,P),u=f()+1;let O=XN(S,u),E=w.createHref(S);try{s.pushState(O,"",E)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;o.location.assign(E)}i&&c&&c({action:a,location:w.location,delta:1})}function v(P,x){a=Qs.Replace;let S=rx(w.location,P,x);n&&n(S,P),u=f();let O=XN(S,u),E=w.createHref(S);s.replaceState(O,"",E),i&&c&&c({action:a,location:w.location,delta:0})}function y(P){let x=o.location.origin!=="null"?o.location.origin:o.location.href,S=typeof P=="string"?P:Mv(P);return fn(x,"No window.location.(origin|href) available to create URL for href: "+S),new URL(S,x)}let w={get action(){return a},get location(){return e(o,s)},listen(P){if(c)throw new Error("A history only accepts one active listener");return o.addEventListener(JN,p),c=P,()=>{o.removeEventListener(JN,p),c=null}},createHref(P){return t(o,P)},createURL:y,encodeLocation(P){let x=y(P);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:g,replace:v,go(P){return s.go(P)}};return w}var QN;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(QN||(QN={}));function rpe(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Vl(t):t,o=jP(r.pathname||"/",n);if(o==null)return null;let i=u8(e);ope(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("/")&&(fn(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=ga([r,c.relativePath]),f=n.concat(c);i.children&&i.children.length>0&&(fn(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),u8(i.children,t,f,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:dpe(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 d8(i.path))o(i,s,c)}),t}function d8(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=d8(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 ope(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:fpe(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const ipe=/^:\w+$/,spe=3,ape=2,lpe=1,cpe=10,upe=-2,eT=e=>e==="*";function dpe(e,t){let n=e.split("/"),r=n.length;return n.some(eT)&&(r+=upe),t&&(r+=ape),n.filter(o=>!eT(o)).reduce((o,i)=>o+(ipe.test(i)?spe:i===""?lpe:cpe),r)}function fpe(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 ppe(e,t){let{routesMeta:n}=e,r={},o="/",i=[];for(let s=0;s{if(f==="*"){let g=a[p]||"";s=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}return u[f]=vpe(a[p]||"",f),u},{}),pathname:i,pathnameBase:s,pattern:e}}function mpe(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),j0(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 gpe(e){try{return decodeURI(e)}catch(t){return j0(!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 vpe(e,t){try{return decodeURIComponent(e)}catch(n){return j0(!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 jP(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 ype(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?Vl(e):e;return{pathname:n?n.startsWith("/")?n:_pe(n,t):t,search:bpe(r),hash:xpe(o)}}function _pe(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 G_(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 f8(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function p8(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=Vl(e):(o=mf({},e),fn(!o.pathname||!o.pathname.includes("?"),G_("?","pathname","search",o)),fn(!o.pathname||!o.pathname.includes("#"),G_("#","pathname","hash",o)),fn(!o.search||!o.search.includes("#"),G_("#","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 g=s.split("/");for(;g[0]==="..";)g.shift(),p-=1;o.pathname=g.join("/")}a=p>=0?t[p]:"/"}let c=ype(o,a),u=s&&s!=="/"&&s.endsWith("/"),f=(i||s===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||f)&&(c.pathname+="/"),c}const ga=e=>e.join("/").replace(/\/\/+/g,"/"),wpe=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),bpe=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,xpe=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Spe(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const h8=["post","put","patch","delete"];new Set(h8);const Ppe=["get",...h8];new Set(Ppe);/** + */function hf(){return hf=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function I0(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function tpe(){return Math.random().toString(36).substr(2,8)}function XN(e,t){return{usr:e.state,key:e.key,idx:t}}function nx(e,t,n,r){return n===void 0&&(n=null),hf({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Vl(t):t,{state:n,key:t&&t.key||r||tpe()})}function $v(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 Vl(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 npe(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,s=o.history,a=Qs.Pop,c=null,u=f();u==null&&(u=0,s.replaceState(hf({},s.state,{idx:u}),""));function f(){return(s.state||{idx:null}).idx}function p(){a=Qs.Pop;let P=f(),x=P==null?null:P-u;u=P,c&&c({action:a,location:w.location,delta:x})}function g(P,x){a=Qs.Push;let S=nx(w.location,P,x);n&&n(S,P),u=f()+1;let O=XN(S,u),E=w.createHref(S);try{s.pushState(O,"",E)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;o.location.assign(E)}i&&c&&c({action:a,location:w.location,delta:1})}function v(P,x){a=Qs.Replace;let S=nx(w.location,P,x);n&&n(S,P),u=f();let O=XN(S,u),E=w.createHref(S);s.replaceState(O,"",E),i&&c&&c({action:a,location:w.location,delta:0})}function y(P){let x=o.location.origin!=="null"?o.location.origin:o.location.href,S=typeof P=="string"?P:$v(P);return fn(x,"No window.location.(origin|href) available to create URL for href: "+S),new URL(S,x)}let w={get action(){return a},get location(){return e(o,s)},listen(P){if(c)throw new Error("A history only accepts one active listener");return o.addEventListener(JN,p),c=P,()=>{o.removeEventListener(JN,p),c=null}},createHref(P){return t(o,P)},createURL:y,encodeLocation(P){let x=y(P);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:g,replace:v,go(P){return s.go(P)}};return w}var QN;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(QN||(QN={}));function rpe(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Vl(t):t,o=jP(r.pathname||"/",n);if(o==null)return null;let i=u8(e);ope(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("/")&&(fn(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=ga([r,c.relativePath]),f=n.concat(c);i.children&&i.children.length>0&&(fn(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),u8(i.children,t,f,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:dpe(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 d8(i.path))o(i,s,c)}),t}function d8(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=d8(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 ope(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:fpe(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const ipe=/^:\w+$/,spe=3,ape=2,lpe=1,cpe=10,upe=-2,eT=e=>e==="*";function dpe(e,t){let n=e.split("/"),r=n.length;return n.some(eT)&&(r+=upe),t&&(r+=ape),n.filter(o=>!eT(o)).reduce((o,i)=>o+(ipe.test(i)?spe:i===""?lpe:cpe),r)}function fpe(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 ppe(e,t){let{routesMeta:n}=e,r={},o="/",i=[];for(let s=0;s{if(f==="*"){let g=a[p]||"";s=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}return u[f]=vpe(a[p]||"",f),u},{}),pathname:i,pathnameBase:s,pattern:e}}function mpe(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),I0(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 gpe(e){try{return decodeURI(e)}catch(t){return I0(!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 vpe(e,t){try{return decodeURIComponent(e)}catch(n){return I0(!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 jP(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 ype(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?Vl(e):e;return{pathname:n?n.startsWith("/")?n:_pe(n,t):t,search:bpe(r),hash:xpe(o)}}function _pe(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 Z_(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 f8(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function p8(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=Vl(e):(o=hf({},e),fn(!o.pathname||!o.pathname.includes("?"),Z_("?","pathname","search",o)),fn(!o.pathname||!o.pathname.includes("#"),Z_("#","pathname","hash",o)),fn(!o.search||!o.search.includes("#"),Z_("#","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 g=s.split("/");for(;g[0]==="..";)g.shift(),p-=1;o.pathname=g.join("/")}a=p>=0?t[p]:"/"}let c=ype(o,a),u=s&&s!=="/"&&s.endsWith("/"),f=(i||s===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||f)&&(c.pathname+="/"),c}const ga=e=>e.join("/").replace(/\/\/+/g,"/"),wpe=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),bpe=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,xpe=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Spe(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const h8=["post","put","patch","delete"];new Set(h8);const Ppe=["get",...h8];new Set(Ppe);/** * React Router v6.16.0 * * Copyright (c) Remix Software Inc. @@ -102,7 +102,7 @@ Error generating stack: `+i.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Nv(){return Nv=Object.assign?Object.assign.bind():function(e){for(var t=1;tc.pathnameBase)),s=_.useRef(!1);return v8(()=>{s.current=!0}),_.useCallback(function(c,u){if(u===void 0&&(u={}),!s.current)return;if(typeof c=="number"){n.go(c);return}let f=p8(c,JSON.parse(i),o,u.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:ga([t,f.pathname])),(u.replace?n.replace:n.push)(f,u.state,u)},[t,n,i,o,e])}function DP(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=_.useContext(Wl),{pathname:o}=ku(),i=JSON.stringify(f8(r).map(s=>s.pathnameBase));return _.useMemo(()=>p8(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function kpe(e,t){return Epe(e,t)}function Epe(e,t,n){Zf()||fn(!1);let{navigator:r}=_.useContext(Hl),{matches:o}=_.useContext(Wl),i=o[o.length-1],s=i?i.params:{};i&&i.pathname;let a=i?i.pathnameBase:"/";i&&i.route;let c=ku(),u;if(t){var f;let w=typeof t=="string"?Vl(t):t;a==="/"||(f=w.pathname)!=null&&f.startsWith(a)||fn(!1),u=w}else u=c;let p=u.pathname||"/",g=a==="/"?p:p.slice(a.length)||"/",v=rpe(e,{pathname:g}),y=Ipe(v&&v.map(w=>Object.assign({},w,{params:Object.assign({},s,w.params),pathname:ga([a,r.encodeLocation?r.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?a:ga([a,r.encodeLocation?r.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),o,n);return t&&y?_.createElement(L0.Provider,{value:{location:Nv({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Qs.Pop}},y):y}function $pe(){let e=Rpe(),t=Spe(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 _.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},t),n?_.createElement("pre",{style:o},n):null,i)}const Mpe=_.createElement($pe,null);class Npe extends _.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?_.createElement(Wl.Provider,{value:this.props.routeContext},_.createElement(g8.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Tpe(e){let{routeContext:t,match:n,children:r}=e,o=_.useContext(LP);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),_.createElement(Wl.Provider,{value:t},r)}function Ipe(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let i=e,s=(r=n)==null?void 0:r.errors;if(s!=null){let a=i.findIndex(c=>c.route.id&&s?.[c.route.id]);a>=0||fn(!1),i=i.slice(0,Math.min(i.length,a+1))}return i.reduceRight((a,c,u)=>{let f=c.route.id?s?.[c.route.id]:null,p=null;n&&(p=c.route.errorElement||Mpe);let g=t.concat(i.slice(0,u+1)),v=()=>{let y;return f?y=p:c.route.Component?y=_.createElement(c.route.Component,null):c.route.element?y=c.route.element:y=a,_.createElement(Tpe,{match:c,routeContext:{outlet:a,matches:g,isDataRoute:n!=null},children:y})};return n&&(c.route.ErrorBoundary||c.route.errorElement||u===0)?_.createElement(Npe,{location:n.location,revalidation:n.revalidation,component:p,error:f,children:v(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):v()},null)}var y8=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(y8||{}),Tv=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Tv||{});function jpe(e){let t=_.useContext(LP);return t||fn(!1),t}function Lpe(e){let t=_.useContext(m8);return t||fn(!1),t}function Dpe(e){let t=_.useContext(Wl);return t||fn(!1),t}function _8(e){let t=Dpe(),n=t.matches[t.matches.length-1];return n.route.id||fn(!1),n.route.id}function Rpe(){var e;let t=_.useContext(g8),n=Lpe(Tv.UseRouteError),r=_8(Tv.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function zpe(){let{router:e}=jpe(y8.UseNavigateStable),t=_8(Tv.UseNavigateStable),n=_.useRef(!1);return v8(()=>{n.current=!0}),_.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Nv({fromRouteId:t},i)))},[e,t])}function fi(e){fn(!1)}function Ape(e){let{basename:t="/",children:n=null,location:r,navigationType:o=Qs.Pop,navigator:i,static:s=!1}=e;Zf()&&fn(!1);let a=t.replace(/^\/*/,"/"),c=_.useMemo(()=>({basename:a,navigator:i,static:s}),[a,i,s]);typeof r=="string"&&(r=Vl(r));let{pathname:u="/",search:f="",hash:p="",state:g=null,key:v="default"}=r,y=_.useMemo(()=>{let w=jP(u,a);return w==null?null:{location:{pathname:w,search:f,hash:p,state:g,key:v},navigationType:o}},[a,u,f,p,g,v,o]);return y==null?null:_.createElement(Hl.Provider,{value:c},_.createElement(L0.Provider,{children:n,value:y}))}function Bpe(e){let{children:t,location:n}=e;return kpe(ox(t),n)}new Promise(()=>{});function ox(e,t){t===void 0&&(t=[]);let n=[];return _.Children.forEach(e,(r,o)=>{if(!_.isValidElement(r))return;let i=[...t,o];if(r.type===_.Fragment){n.push.apply(n,ox(r.props.children,i));return}r.type!==fi&&fn(!1),!r.props.index||!r.props.children||fn(!1);let 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=ox(r.props.children,i)),n.push(s)}),n}/** + */function Mv(){return Mv=Object.assign?Object.assign.bind():function(e){for(var t=1;tc.pathnameBase)),s=_.useRef(!1);return v8(()=>{s.current=!0}),_.useCallback(function(c,u){if(u===void 0&&(u={}),!s.current)return;if(typeof c=="number"){n.go(c);return}let f=p8(c,JSON.parse(i),o,u.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:ga([t,f.pathname])),(u.replace?n.replace:n.push)(f,u.state,u)},[t,n,i,o,e])}function DP(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=_.useContext(Wl),{pathname:o}=Cu(),i=JSON.stringify(f8(r).map(s=>s.pathnameBase));return _.useMemo(()=>p8(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function kpe(e,t){return Epe(e,t)}function Epe(e,t,n){Uf()||fn(!1);let{navigator:r}=_.useContext(Hl),{matches:o}=_.useContext(Wl),i=o[o.length-1],s=i?i.params:{};i&&i.pathname;let a=i?i.pathnameBase:"/";i&&i.route;let c=Cu(),u;if(t){var f;let w=typeof t=="string"?Vl(t):t;a==="/"||(f=w.pathname)!=null&&f.startsWith(a)||fn(!1),u=w}else u=c;let p=u.pathname||"/",g=a==="/"?p:p.slice(a.length)||"/",v=rpe(e,{pathname:g}),y=Ipe(v&&v.map(w=>Object.assign({},w,{params:Object.assign({},s,w.params),pathname:ga([a,r.encodeLocation?r.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?a:ga([a,r.encodeLocation?r.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),o,n);return t&&y?_.createElement(j0.Provider,{value:{location:Mv({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Qs.Pop}},y):y}function $pe(){let e=Rpe(),t=Spe(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 _.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},t),n?_.createElement("pre",{style:o},n):null,i)}const Mpe=_.createElement($pe,null);class Npe extends _.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?_.createElement(Wl.Provider,{value:this.props.routeContext},_.createElement(g8.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Tpe(e){let{routeContext:t,match:n,children:r}=e,o=_.useContext(LP);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),_.createElement(Wl.Provider,{value:t},r)}function Ipe(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let i=e,s=(r=n)==null?void 0:r.errors;if(s!=null){let a=i.findIndex(c=>c.route.id&&s?.[c.route.id]);a>=0||fn(!1),i=i.slice(0,Math.min(i.length,a+1))}return i.reduceRight((a,c,u)=>{let f=c.route.id?s?.[c.route.id]:null,p=null;n&&(p=c.route.errorElement||Mpe);let g=t.concat(i.slice(0,u+1)),v=()=>{let y;return f?y=p:c.route.Component?y=_.createElement(c.route.Component,null):c.route.element?y=c.route.element:y=a,_.createElement(Tpe,{match:c,routeContext:{outlet:a,matches:g,isDataRoute:n!=null},children:y})};return n&&(c.route.ErrorBoundary||c.route.errorElement||u===0)?_.createElement(Npe,{location:n.location,revalidation:n.revalidation,component:p,error:f,children:v(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):v()},null)}var y8=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(y8||{}),Nv=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Nv||{});function jpe(e){let t=_.useContext(LP);return t||fn(!1),t}function Lpe(e){let t=_.useContext(m8);return t||fn(!1),t}function Dpe(e){let t=_.useContext(Wl);return t||fn(!1),t}function _8(e){let t=Dpe(),n=t.matches[t.matches.length-1];return n.route.id||fn(!1),n.route.id}function Rpe(){var e;let t=_.useContext(g8),n=Lpe(Nv.UseRouteError),r=_8(Nv.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function zpe(){let{router:e}=jpe(y8.UseNavigateStable),t=_8(Nv.UseNavigateStable),n=_.useRef(!1);return v8(()=>{n.current=!0}),_.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Mv({fromRouteId:t},i)))},[e,t])}function Ji(e){fn(!1)}function Ape(e){let{basename:t="/",children:n=null,location:r,navigationType:o=Qs.Pop,navigator:i,static:s=!1}=e;Uf()&&fn(!1);let a=t.replace(/^\/*/,"/"),c=_.useMemo(()=>({basename:a,navigator:i,static:s}),[a,i,s]);typeof r=="string"&&(r=Vl(r));let{pathname:u="/",search:f="",hash:p="",state:g=null,key:v="default"}=r,y=_.useMemo(()=>{let w=jP(u,a);return w==null?null:{location:{pathname:w,search:f,hash:p,state:g,key:v},navigationType:o}},[a,u,f,p,g,v,o]);return y==null?null:_.createElement(Hl.Provider,{value:c},_.createElement(j0.Provider,{children:n,value:y}))}function Bpe(e){let{children:t,location:n}=e;return kpe(rx(t),n)}new Promise(()=>{});function rx(e,t){t===void 0&&(t=[]);let n=[];return _.Children.forEach(e,(r,o)=>{if(!_.isValidElement(r))return;let i=[...t,o];if(r.type===_.Fragment){n.push.apply(n,rx(r.props.children,i));return}r.type!==Ji&&fn(!1),!r.props.index||!r.props.children||fn(!1);let 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=rx(r.props.children,i)),n.push(s)}),n}/** * React Router DOM v6.16.0 * * Copyright (c) Remix Software Inc. @@ -111,7 +111,7 @@ Error generating stack: `+i.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Iv(){return Iv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function Fpe(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Vpe(e,t){return e.button===0&&(!t||t==="_self")&&!Fpe(e)}const Hpe=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],Wpe=["aria-current","caseSensitive","className","end","style","to","children"],Upe="startTransition",tT=Zd[Upe];function Zpe(e){let{basename:t,children:n,future:r,window:o}=e,i=_.useRef();i.current==null&&(i.current=epe({window:o,v5Compat:!0}));let s=i.current,[a,c]=_.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},f=_.useCallback(p=>{u&&tT?tT(()=>c(p)):c(p)},[c,u]);return _.useLayoutEffect(()=>s.listen(f),[s,f]),_.createElement(Ape,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s})}const Gpe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ype=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Kpe=_.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:s,state:a,target:c,to:u,preventScrollReset:f}=t,p=w8(t,Hpe),{basename:g}=_.useContext(Hl),v,y=!1;if(typeof u=="string"&&Ype.test(u)&&(v=u,Gpe))try{let S=new URL(window.location.href),O=u.startsWith("//")?new URL(S.protocol+u):new URL(u),E=jP(O.pathname,g);O.origin===S.origin&&E!=null?u=E+O.search+O.hash:y=!0}catch{}let w=Ope(u,{relative:o}),P=Jpe(u,{replace:s,state:a,target:c,preventScrollReset:f,relative:o});function x(S){r&&r(S),S.defaultPrevented||P(S)}return _.createElement("a",Iv({},p,{href:v||w,onClick:y||i?r:x,ref:n,target:c}))}),qpe=_.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=w8(t,Wpe),p=DP(c,{relative:f.relative}),g=ku(),v=_.useContext(m8),{navigator:y}=_.useContext(Hl),w=y.encodeLocation?y.encodeLocation(p).pathname:p.pathname,P=g.pathname,x=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;o||(P=P.toLowerCase(),x=x?x.toLowerCase():null,w=w.toLowerCase());let S=P===w||!s&&P.startsWith(w)&&P.charAt(w.length)==="/",O=x!=null&&(x===w||!s&&x.startsWith(w)&&x.charAt(w.length)==="/"),E=S?r:void 0,$;typeof i=="function"?$=i({isActive:S,isPending:O}):$=[i,S?"active":null,O?"pending":null].filter(Boolean).join(" ");let N=typeof a=="function"?a({isActive:S,isPending:O}):a;return _.createElement(Kpe,Iv({},f,{"aria-current":E,className:$,ref:n,style:N,to:c}),typeof u=="function"?u({isActive:S,isPending:O}):u)});var nT;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(nT||(nT={}));var rT;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(rT||(rT={}));function Jpe(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:s}=t===void 0?{}:t,a=Ul(),c=ku(),u=DP(e,{relative:s});return _.useCallback(f=>{if(Vpe(f,n)){f.preventDefault();let p=r!==void 0?r:Mv(c)===Mv(u);a(e,{replace:p,state:o,preventScrollReset:i,relative:s})}},[c,a,u,r,o,n,e,i,s])}/** + */function Tv(){return Tv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function Fpe(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Vpe(e,t){return e.button===0&&(!t||t==="_self")&&!Fpe(e)}const Hpe=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],Wpe=["aria-current","caseSensitive","className","end","style","to","children"],Upe="startTransition",tT=Ud[Upe];function Zpe(e){let{basename:t,children:n,future:r,window:o}=e,i=_.useRef();i.current==null&&(i.current=epe({window:o,v5Compat:!0}));let s=i.current,[a,c]=_.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},f=_.useCallback(p=>{u&&tT?tT(()=>c(p)):c(p)},[c,u]);return _.useLayoutEffect(()=>s.listen(f),[s,f]),_.createElement(Ape,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s})}const Gpe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ype=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Kpe=_.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:s,state:a,target:c,to:u,preventScrollReset:f}=t,p=w8(t,Hpe),{basename:g}=_.useContext(Hl),v,y=!1;if(typeof u=="string"&&Ype.test(u)&&(v=u,Gpe))try{let S=new URL(window.location.href),O=u.startsWith("//")?new URL(S.protocol+u):new URL(u),E=jP(O.pathname,g);O.origin===S.origin&&E!=null?u=E+O.search+O.hash:y=!0}catch{}let w=Ope(u,{relative:o}),P=Jpe(u,{replace:s,state:a,target:c,preventScrollReset:f,relative:o});function x(S){r&&r(S),S.defaultPrevented||P(S)}return _.createElement("a",Tv({},p,{href:v||w,onClick:y||i?r:x,ref:n,target:c}))}),qpe=_.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=w8(t,Wpe),p=DP(c,{relative:f.relative}),g=Cu(),v=_.useContext(m8),{navigator:y}=_.useContext(Hl),w=y.encodeLocation?y.encodeLocation(p).pathname:p.pathname,P=g.pathname,x=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;o||(P=P.toLowerCase(),x=x?x.toLowerCase():null,w=w.toLowerCase());let S=P===w||!s&&P.startsWith(w)&&P.charAt(w.length)==="/",O=x!=null&&(x===w||!s&&x.startsWith(w)&&x.charAt(w.length)==="/"),E=S?r:void 0,$;typeof i=="function"?$=i({isActive:S,isPending:O}):$=[i,S?"active":null,O?"pending":null].filter(Boolean).join(" ");let N=typeof a=="function"?a({isActive:S,isPending:O}):a;return _.createElement(Kpe,Tv({},f,{"aria-current":E,className:$,ref:n,style:N,to:c}),typeof u=="function"?u({isActive:S,isPending:O}):u)});var nT;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(nT||(nT={}));var rT;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(rT||(rT={}));function Jpe(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:s}=t===void 0?{}:t,a=Ul(),c=Cu(),u=DP(e,{relative:s});return _.useCallback(f=>{if(Vpe(f,n)){f.preventDefault();let p=r!==void 0?r:$v(c)===$v(u);a(e,{replace:p,state:o,preventScrollReset:i,relative:s})}},[c,a,u,r,o,n,e,i,s])}/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. @@ -166,7 +166,7 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var ix=he("outline","badge-tm","IconBadgeTm",[["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:"M6 9h4",key:"svg-1"}],["path",{d:"M8 9v6",key:"svg-2"}],["path",{d:"M13 15v-6l2 3l2 -3v6",key:"svg-3"}]]);/** + */var ox=he("outline","badge-tm","IconBadgeTm",[["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:"M6 9h4",key:"svg-1"}],["path",{d:"M8 9v6",key:"svg-2"}],["path",{d:"M13 15v-6l2 3l2 -3v6",key:"svg-3"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. @@ -226,7 +226,7 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var D0=he("outline","clock","IconClock",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 7v5l3 3",key:"svg-1"}]]);/** + */var L0=he("outline","clock","IconClock",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 7v5l3 3",key:"svg-1"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. @@ -276,7 +276,7 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var R0=he("outline","file-off","IconFileOff",[["path",{d:"M3 3l18 18",key:"svg-0"}],["path",{d:"M7 3h7l5 5v7m0 4a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-14",key:"svg-1"}]]);/** + */var D0=he("outline","file-off","IconFileOff",[["path",{d:"M3 3l18 18",key:"svg-0"}],["path",{d:"M7 3h7l5 5v7m0 4a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-14",key:"svg-1"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. @@ -366,7 +366,7 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var z0=he("outline","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"}]]);/** + */var R0=he("outline","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"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. @@ -396,7 +396,7 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var cu=he("outline","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"}]]);/** + */var lu=he("outline","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"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. @@ -441,7 +441,7 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var Eu=he("outline","plus","IconPlus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]);/** + */var ku=he("outline","plus","IconPlus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. @@ -491,7 +491,7 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var A0=he("outline","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"}]]);/** + */var z0=he("outline","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"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. @@ -536,12 +536,12 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var Gf=he("outline","user-x","IconUserX",[["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 -4h3.5",key:"svg-1"}],["path",{d:"M22 22l-5 -5",key:"svg-2"}],["path",{d:"M17 22l5 -5",key:"svg-3"}]]);/** + */var Zf=he("outline","user-x","IconUserX",[["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 -4h3.5",key:"svg-1"}],["path",{d:"M22 22l-5 -5",key:"svg-2"}],["path",{d:"M17 22l5 -5",key:"svg-3"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var B0=he("outline","users-group","IconUsersGroup",[["path",{d:"M10 13a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M8 21v-1a2 2 0 0 1 2 -2h4a2 2 0 0 1 2 2v1",key:"svg-1"}],["path",{d:"M15 5a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-2"}],["path",{d:"M17 10h2a2 2 0 0 1 2 2v1",key:"svg-3"}],["path",{d:"M5 5a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-4"}],["path",{d:"M3 13v-1a2 2 0 0 1 2 -2h2",key:"svg-5"}]]);/** + */var A0=he("outline","users-group","IconUsersGroup",[["path",{d:"M10 13a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M8 21v-1a2 2 0 0 1 2 -2h4a2 2 0 0 1 2 2v1",key:"svg-1"}],["path",{d:"M15 5a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-2"}],["path",{d:"M17 10h2a2 2 0 0 1 2 2v1",key:"svg-3"}],["path",{d:"M5 5a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-4"}],["path",{d:"M3 13v-1a2 2 0 0 1 2 -2h2",key:"svg-5"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. @@ -551,7 +551,7 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var uu=he("outline","x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);/** + */var cu=he("outline","x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. @@ -569,7 +569,7 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var du=_;function nme(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var rme=typeof Object.is=="function"?Object.is:nme,ome=du.useState,ime=du.useEffect,sme=du.useLayoutEffect,ame=du.useDebugValue;function lme(e,t){var n=t(),r=ome({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return sme(function(){o.value=n,o.getSnapshot=t,Y_(o)&&i({inst:o})},[e,n,t]),ime(function(){return Y_(o)&&i({inst:o}),e(function(){Y_(o)&&i({inst:o})})},[e]),ame(n),n}function Y_(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!rme(e,n)}catch{return!0}}function cme(e,t){return t()}var ume=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?cme:lme;D8.useSyncExternalStore=du.useSyncExternalStore!==void 0?du.useSyncExternalStore:ume;L8.exports=D8;var dme=L8.exports;/** + */var uu=_;function nme(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var rme=typeof Object.is=="function"?Object.is:nme,ome=uu.useState,ime=uu.useEffect,sme=uu.useLayoutEffect,ame=uu.useDebugValue;function lme(e,t){var n=t(),r=ome({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return sme(function(){o.value=n,o.getSnapshot=t,G_(o)&&i({inst:o})},[e,n,t]),ime(function(){return G_(o)&&i({inst:o}),e(function(){G_(o)&&i({inst:o})})},[e]),ame(n),n}function G_(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!rme(e,n)}catch{return!0}}function cme(e,t){return t()}var ume=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?cme:lme;D8.useSyncExternalStore=uu.useSyncExternalStore!==void 0?uu.useSyncExternalStore:ume;L8.exports=D8;var dme=L8.exports;/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * @@ -577,18 +577,18 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var F0=_,fme=dme;function pme(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var hme=typeof Object.is=="function"?Object.is:pme,mme=fme.useSyncExternalStore,gme=F0.useRef,vme=F0.useEffect,yme=F0.useMemo,_me=F0.useDebugValue;j8.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=gme(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=yme(function(){function c(v){if(!u){if(u=!0,f=v,v=r(v),o!==void 0&&s.hasValue){var y=s.value;if(o(y,v))return p=y}return p=v}if(y=p,hme(f,v))return y;var w=r(v);return o!==void 0&&o(y,w)?y:(f=v,p=w)}var u=!1,f,p,g=n===void 0?null:n;return[function(){return c(t())},g===null?void 0:function(){return c(g())}]},[t,n,r,o]);var a=mme(e,i[0],i[1]);return vme(function(){s.hasValue=!0,s.value=a},[a]),_me(a),a};I8.exports=j8;var wme=I8.exports;const bme=Ea(wme),{useSyncExternalStoreWithSelector:xme}=bme;function Sme(e,t=e.getState,n){const r=xme(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return _.useDebugValue(r),r}const iT=e=>{const t=typeof e=="function"?tme(e):e,n=(r,o)=>Sme(t,r,o);return Object.assign(n,t),n},tn=e=>e?iT(e):iT,at=()=>!window.invokeNative,Pme=()=>{},R8=tn(e=>({showApp:!!at(),setVisibility:t=>e({showApp:t}),show:()=>e({showApp:!0}),hide:()=>e({showApp:!1}),toggle:()=>e(t=>({showApp:!t.showApp}))})),Ome={citizenid:"1993201",firstname:"Bubble",lastname:"Test",role:"Chief",image:"https://i.imgur.com/P4uYdfu.jpeg",callSign:103,unit:1},bo=tn(e=>({personalData:at()?Ome:{citizenid:"",firstname:"",lastname:"",role:"",image:"",callSign:0},setPersonalData:t=>e(n=>({personalData:typeof t=="function"?t(n.personalData):{...n.personalData,...t}}))}));async function me(e,t,n){if(at())return n?(await new Promise(a=>setTimeout(a,n.delay)),n.data):await new Promise(a=>a);const r={method:"post",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(t)},o=window.GetParentResourceName?window.GetParentResourceName():"nui-frame-app";return await(await fetch(`https://${o}/${e}`,r)).json()}const z8=[];for(let e=0;e<25;e++)z8[e]={firstname:"Firstname",lastname:`Lastname ${e+1}`,dob:Date.now(),citizenid:e.toString()};const ZP={firstname:"John",lastname:"Doe",citizenid:"BUB193Z4A",dob:Date.now(),phoneNumber:"123456789",notes:"

",vehicles:["Sultan Custom (88ZOH526)","Sultan Custom (07NCV529)","Sultan Custom (07NCV545)","Sultan Custom (07NCV521)"],relatedReports:[{title:"Report title",id:1,author:"Some One",date:"13/03/2023"},{title:"Report title",id:2,author:"Some One",date:"13/03/2023"},{title:"Report title",id:3,author:"Some One",date:"13/03/2023"},{title:"Report title",id:4,author:"Some One",date:"13/03/2023"}],relatedIncidents:[{title:"Incident 1",author:"Someone nice",date:"13/03/2023",id:1}]},Cme=[{id:"vehicles",title:"Vehicles",icon:"car"}],Li=tn(e=>({profileCards:[],selectedProfile:null,isProfileWanted:!1,getPlayers:async()=>at()?{profiles:z8}:await me("getAllProfiles"),setSelectedProfile:t=>{at()&&e({selectedProfile:ZP,profileCards:Cme}),e({selectedProfile:t})},setProfileCards:t=>e({profileCards:t}),setIsProfileWanted:t=>{e({isProfileWanted:t})}})),kme={"OFFENSES AGAINST PERSONS":[{label:"Speeding",description:"Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aperiam, doloribus eveniet facere ipsam, ipsum minus modi molestiae nesciunt odio saepe sapiente sed sint voluptatibus voluptatum!",type:"infraction",time:0,fine:2500,points:4},{label:"Loitering",description:"Standing go brrr",type:"misdemeanor",time:90,fine:25e3,points:0},{label:"Something else 1",description:"Standing go brrr",type:"misdemeanor",time:90,fine:25e3,points:0},{label:"Something else 2",description:"Standing go brrr",type:"misdemeanor",time:90,fine:25e3,points:0},{label:"Something else 3",description:"Standing go brrr",type:"misdemeanor",time:90,fine:25e3,points:0}],"OFFENSES AGAINST PROPERTY":[{label:"Robbery of a financial institution",description:"Bank robbery go brrr",type:"felony",time:30,fine:3e3,points:0},{label:"Something else 2 in OFFENSES AGAINST",description:"Standing go brrr",type:"felony",time:90,fine:25e3,points:0},{label:"Something else 3 in OFFENSES AGAINST",description:"Standing go brrr",type:"felony",time:90,fine:25e3,points:0},{label:"Something else 4 in OFFENSES AGAINST",description:"Standing go brrr",type:"felony",time:90,fine:25e3,points:0}]},Yf=tn(e=>({charges:at()?kme:{},setCharges:t=>{e(n=>({charges:typeof t=="function"?t(n.charges):t}))}})),sT=[{firstname:"John",lastname:"Doe",callsign:"1A-01",citizenid:"ABCD1234",playerId:1,position:[0,0,0],unitId:1},{firstname:"Jenna",lastname:"Doe",callsign:"1A-02",citizenid:"ABCD1235",playerId:2,position:[0,0,0]}],GP=tn(e=>({officers:at()?sT:[],activeOfficers:at()?sT:[],getOfficers:async()=>{try{const t=await me("getOfficers");return e({officers:t}),{officers:t}}catch(t){return console.error("Failed to fetch officers:",t),{officers:[]}}},getActiveOfficers:async()=>{try{const t=await me("getActiveOfficers"),n=Object.values(t);return e({activeOfficers:n}),{activeOfficers:n}}catch(t){return console.error("Failed to fetch active officers:",t),{activeOfficers:[]}}},setOfficers:t=>e({officers:t}),addOfficer:t=>e(n=>({officers:[...n.officers,t]})),removeOfficer:t=>e(n=>({officers:n.officers.filter(r=>r.citizenid!==t)}))})),Kf=tn(e=>({config:{isDispatchEnabled:!0},setConfig:t=>e({config:t})})),Eme=ue(e=>({link:{...e.fn.focusStyles(),display:"flex",alignItems:"center",textDecoration:"none",fontSize:e.fontSizes.xs,color:e.colors.gray[2],padding:`${e.spacing.xs} ${e.spacing.xs}`,fontWeight:500,"&:hover":{borderRadius:e.radius.sm,background:"linear-gradient(90deg, rgba(51,124,255,0.5) 0%, rgba(187,187,187,0) 100%)",color:e.colorScheme==="dark"?e.white:e.black,[`& .${Ar("icon")}`]:{color:e.colorScheme==="dark"?e.white:e.black}}},linkIcon:{ref:Ar("icon"),color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],marginRight:e.spacing.sm},linkActive:{"&, &:hover":{borderRadius:e.radius.sm,background:"linear-gradient(90deg, rgba(51,124,255,0.5) 0%, rgba(187,187,187,0) 100%)",[`& .${Ar("icon")}`]:{color:"white"}}},chevron:{transition:"transform 200ms ease"}})),$me=[{link:"",label:"Dashboard",icon:Ehe}],Mme=[{link:"profiles",label:"Profiles",icon:UP},{link:"incidents",label:"Incidents",icon:VP},{link:"reports",label:"Reports",icon:AP},{link:"vehicles",label:"Vehicles",icon:ks},{link:"dispatch",label:"Dispatch",icon:cu}],Nme=[{label:"Roster",link:"roster",icon:qhe},{label:"Charges",link:"charges",icon:_he}],Tme=()=>{const{config:e}=Kf(),{classes:t,cx:n,theme:r}=Eme(),[o,i]=_.useState(""),{firstname:s,lastname:a,callSign:c,role:u}=bo(g=>g.personalData),f=ku(),p=g=>g.map(v=>v.link==="dispatch"&&!e.isDispatchEnabled?null:h.jsxs(qpe,{to:`/${v.link}`,onClick:()=>i(v.link),className:n(t.link,{[t.linkActive]:o===v.link}),children:[h.jsx(v.icon,{className:t.linkIcon,stroke:1.5}),h.jsx("span",{children:v.label})]},v.link));return _.useEffect(()=>{i(f.pathname.split("/")[1])},[f]),h.jsxs(ng,{p:"xs",style:{backgroundColor:"#242527",borderTopLeftRadius:5,borderBottomLeftRadius:5,maxWidth:300,height:"100%"},children:[h.jsxs(ng.Section,{children:[h.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:h.jsx(ri,{radius:"md",width:150,height:150,fit:"contain",src:eme,alt:"LSPD Logo"})}),h.jsx(Ye,{my:"sm"}),h.jsxs(St,{h:632,scrollbarSize:2,children:[h.jsx(W,{size:"xs",weight:500,color:"dimmed",style:{margin:8},children:"Home"}),p($me),h.jsx(W,{size:"xs",weight:500,color:"dimmed",style:{margin:8},children:"Pages"}),p(Mme),h.jsx(W,{size:"xs",weight:500,color:"dimmed",style:{margin:8},children:"Staff"}),p(Nme)]})]}),h.jsx(Pe,{sx:{paddingTop:5,borderTop:`${M(1)} solid ${r.colorScheme==="dark"?r.colors.dark[4]:r.colors.gray[2]}`},children:h.jsx("div",{style:{display:"block",width:"100%",color:"#e9ecef",padding:"0.625rem"},children:h.jsx(nt,{children:h.jsxs(Pe,{sx:{flex:1},children:[h.jsxs(W,{size:"sm",weight:500,children:[s," ",a]}),h.jsxs(W,{color:"dimmed",size:"xs",children:[u," | ",c]})]})})})})]})};var A8={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(qx,function(){var n=1e3,r=6e4,o=36e5,i="millisecond",s="second",a="minute",c="hour",u="day",f="week",p="month",g="quarter",v="year",y="date",w="Invalid Date",P=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|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(V){var H=["th","st","nd","rd"],Z=V%100;return"["+V+(H[(Z-20)%10]||H[Z]||H[0])+"]"}},O=function(V,H,Z){var Y=String(V);return!Y||Y.length>=H?V:""+Array(H+1-Y.length).join(Z)+V},E={s:O,z:function(V){var H=-V.utcOffset(),Z=Math.abs(H),Y=Math.floor(Z/60),j=Z%60;return(H<=0?"+":"-")+O(Y,2,"0")+":"+O(j,2,"0")},m:function V(H,Z){if(H.date()1)return V(F[0])}else{var K=H.name;N[K]=H,j=K}return!Y&&j&&($=j),j||!Y&&$},z=function(V,H){if(R(V))return V.clone();var Z=typeof H=="object"?H:{};return Z.date=V,Z.args=arguments,new X(Z)},G=E;G.l=B,G.i=R,G.w=function(V,H){return z(V,{locale:H.$L,utc:H.$u,x:H.$x,$offset:H.$offset})};var X=function(){function V(Z){this.$L=B(Z.locale,null,!0),this.parse(Z),this.$x=this.$x||Z.x||{},this[I]=!0}var H=V.prototype;return H.parse=function(Z){this.$d=function(Y){var j=Y.date,U=Y.utc;if(j===null)return new Date(NaN);if(G.u(j))return new Date;if(j instanceof Date)return new Date(j);if(typeof j=="string"&&!/Z$/i.test(j)){var F=j.match(P);if(F){var K=F[2]-1||0,ee=(F[7]||"0").substring(0,3);return U?new Date(Date.UTC(F[1],K,F[3]||1,F[4]||0,F[5]||0,F[6]||0,ee)):new Date(F[1],K,F[3]||1,F[4]||0,F[5]||0,F[6]||0,ee)}}return new Date(j)}(Z),this.init()},H.init=function(){var Z=this.$d;this.$y=Z.getFullYear(),this.$M=Z.getMonth(),this.$D=Z.getDate(),this.$W=Z.getDay(),this.$H=Z.getHours(),this.$m=Z.getMinutes(),this.$s=Z.getSeconds(),this.$ms=Z.getMilliseconds()},H.$utils=function(){return G},H.isValid=function(){return this.$d.toString()!==w},H.isSame=function(Z,Y){var j=z(Z);return this.startOf(Y)<=j&&j<=this.endOf(Y)},H.isAfter=function(Z,Y){return z(Z)0,N<=$.r||!$.r){N<=1&&E>0&&($=S[E-1]);var I=x[$.l];v&&(N=v(""+N)),w=typeof I=="string"?I.replace("%d",N):I(N,f,$.l,P);break}}if(f)return w;var R=P?x.future:x.past;return typeof R=="function"?R(w):R.replace("%s",w)},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)}}})})(B8);var jme=B8.exports;const F8=Ea(jme);const aT={title:"Debug Incident title",id:0,description:"

This is a incident description

",officersInvolved:[{firstname:"Callum",lastname:"Graham",callsign:188,citizenid:"132142",playerId:1,position:[0,0,0]},{firstname:"Jacob",lastname:"Gray",callsign:273,citizenid:"152312",playerId:1,position:[0,0,0]},{firstname:"Edward",lastname:"Atkinson",callsign:125,citizenid:"948213",playerId:1,position:[0,0,0]}],evidence:[],criminals:[{firstname:"Archie",lastname:"Moss",dob:Date.now(),issueWarrant:!1,processed:!1,pleadedGuilty:!1,citizenid:"0",charges:[],penalty:{time:0,fine:0,reduction:null,points:0}}]},Ur=tn(e=>({incident:aT,isIncidentActive:!1,setActiveIncident:t=>{at()&&e({incident:aT}),e({incident:t})},updateIncidentField:(t,n)=>{e(r=>({incident:{...r.incident,[t]:n}}))},setIncidentActive:t=>{e({isIncidentActive:t})},setDescription:t=>{e(n=>({incident:{...n.incident,description:t}}))},setCriminals:t=>{e(n=>({incident:{...n.incident,criminals:typeof t=="function"?t(n.incident.criminals):t}}))},setCriminal:(t,n)=>{e(r=>{const o=r.incident.criminals.map(i=>i.citizenid===t?typeof n=="function"?n(i):{...i,...n}:i);return{incident:{...r.incident,criminals:o}}})},setOfficersInvolved:t=>{e(n=>({incident:{...n.incident,officersInvolved:typeof t=="function"?t(n.incident.officersInvolved):t}}))},setEvidence:t=>{e(n=>({incident:{...n.incident,evidence:typeof t=="function"?t(n.incident.evidence):t}}))}})),Lme=[{type:"created",category:"profiles",firstname:"Bubble",lastname:"Test",date:"string",activityid:1,citizenid:"BUB193Z4A"},{type:"updated",category:"profiles",firstname:"Bubble",lastname:"Test",date:"string",activityid:1,citizenid:"BUB193Z4A"},{type:"deleted",category:"profiles",firstname:"Bubble",lastname:"Test",date:"string",activityid:1,citizenid:"BUB193Z4A"},{type:"created",category:"incidents",firstname:"Bubble",lastname:"Test",date:"string",activityid:1,citizenid:"BUB193Z4A"},{type:"created",category:"profiles",firstname:"Bubble",lastname:"Test",date:"string",activityid:1,citizenid:"BUB193Z4A"},{type:"created",category:"profiles",firstname:"Bubble",lastname:"Test",date:"string",activityid:1,citizenid:"BUB193Z4A"},{type:"created",category:"profiles",firstname:"Bubble",lastname:"Test",date:"string",activityid:1,citizenid:"BUB193Z4A"},{type:"created",category:"profiles",firstname:"Bubble",lastname:"Test",date:"string",activityid:1,citizenid:"BUB193Z4A"}],Dme=tn(e=>({recentActivity:at()?Lme:[],getRecentActivity:async()=>{try{const t=await me("getRecentActivity");return e({recentActivity:t}),{recentActivity:t}}catch(t){return console.error("Failed to fetch recent activities:",t),{recentActivity:[]}}},setRecentActivities:t=>e({recentActivity:t})})),Rme="Configuration",zme="Logout",Ame="Welcome back, %s %s",Bme="Active Officers",Fme="Callsign",Vme="Attached Unit",Hme="Active Warrants",Wme="Expires in",Ume="No warrants found",Zme="Recent Activity",Gme="Type",Yme="Category",Kme="Done by",qme="Time ago",Jme="Dispatch",Xme="Responding Units",Qme="No recent calls found",ege="Announcements",tge="Create announcement",nge="All Announcements",rge="No announcements found",oge="Create",ige="View all",sge="Profiles",age="Search...",lge="DOB",cge="Citizen ID",uge="No profiles found",dge="No profile selected",fge="Edit Citizen",pge="No %s registered",hge="Related reports",mge="No related reports",gge="Related incidents",vge="No related incidents",yge="Remove Charge",_ge="No incident selected",wge="Add Criminal",bge="Unlink",xge="Officers involved",Sge="Add officer",Pge="Remove officer",Oge="Are you sure you want to remove %s %s (%s) from involved officers?",Cge="Confirm",kge="Cancel",Ege="Evidence",$ge="Add evidence",Mge="Incidents",Nge="Create incident",Tge="Remove evidence",Ige="Are you sure you want to remove %s from evidence?",jge="month(s)",Lge="Remove criminal",Dge="Remove %s %s? Removing them will also remove the charges from their profile.",Rge="Go to profile",zge="Save criminal",Age="Edit charges",Bge="Issue warrant",Fge="Suspect hasn't been processed and charged",Vge="Warrant expiration date",Hge="Reduction",Wge="No reduction",Uge="Time",Zge="Fine",Gge="Pleaded guilty",Yge="Processed",Kge="Current Charges",qge="All Charges",Jge="point(s)",Xge="Add Charge",Qge="Incident title",eve="Incident title is required",tve="No officers found",nve="Image label is required",rve="Image URL is required",ove="Image label",ive="Image URL",sve="Take picture",ave="No report selected",lve="Citizens involved",cve="Add citizen",uve="Are you sure you want to remove %s %s from involved citizens",dve="Images",fve="Add image",pve="Reports",hve="Create report",mve="Report title",gve="Report title is required",vve="No citizens found",yve="Units",_ve="Manage members",wve="Leave Unit",bve="Create unit",xve="Unit officers",Sve="Set officers assigned to this unit",Pve="Unit vehicle type",Ove="Active Calls",Cve="Responding units (%s)",kve="Find on map",Eve="Set waypoint",$ve="Detach from call",Mve="Respond",Nve="Manage roster",Tve="Roster",Ive="members",jve="Members",Lve="Hire officer",Dve="Today",Rve="Yesterday",zve="Set callsign",Ave="Set rank",Bve="Set roles",Fve="Fire officer",Vve="Are you sure you want to fire %s %s?",Hve="Officer",Wve="APU",Uve="AIR",Zve="MC",Gve="K9",Yve="FTO",Kve="Last active",qve="Role",Jve="Rank",Xve="Callsign already in use",Qve="The citizen with this citizen id is already hired",eye="Citizen ID of the citizen you want to hire",tye="Callsign of the new officer you want to hire",nye="Create Charge",rye="Charge Label",oye="Charge Description",iye="Charge Category",sye="Charge Fine",aye="Charge Jailtime",lye="Charge Points",cye="Charge Type",uye="Delete charge",dye="Are you sure you want to delete %s",fye="Edit Charge",pye="Edit",hye="Delete Incident",mye="Are you sure you want to delete %s",gye="Change picture",vye="Image",yye="Image URL to use as the profile image",_ye="Vehicles",wye="No vehicle selected",bye="Vehicle Information",xye="Save vehicle",Sye="Known information",Pye="Wanted",Oye="MARK UNWANTED",Cye="MARK WANTED",kye="Select items",Eye="Create BOLO",$ye="Plate",Mye="Reason",Nye="BOLO expiration date",Tye="Delete BOLO",Iye="Are you sure you want to delete the BOLO for: %s",jye="Image URL to use as the vehicle image",Lye="BOLO",Dye="BOLOS",Rye="BOLO expires at:",zye="Expires at:",Aye="No bolos found",Bye="Go to vehicle",Fye="You are already responding or not a part of a unit",Vye="You responded to the recent call",Hye={configuration:Rme,logout:zme,welcome_back:Ame,active_officers:Bme,callsign:Fme,attached_unit:Vme,active_warrants:Hme,expires_in:Wme,no_warrants_found:Ume,recent_activity:Zme,type:Gme,category:Yme,done_by:Kme,time_ago:qme,dispatch:Jme,responding_units:Xme,no_recent_calls_found:Qme,announcements:ege,create_announcement:tge,all_announcements:nge,no_announcements_found:rge,create:oge,view_all:ige,profiles:sge,search:age,dob:lge,citizen_id:cge,no_profiles_found:uge,no_profile_selected:dge,edit_citizen:fge,no_cardid_registered:pge,related_reports:hge,no_related_reports:mge,related_incidents:gge,no_related_incidents:vge,remove_charge:yge,no_incident_selected:_ge,add_criminal:wge,unlink:bge,officers_involved:xge,add_officer:Sge,remove_officer:Pge,remove_officer_confirm:Oge,confirm:Cge,cancel:kge,evidence:Ege,add_evidence:$ge,incidents:Mge,create_incident:Nge,remove_evidence:Tge,remove_evidence_confirm:Ige,months:jge,remove_criminal:Lge,remove_criminal_confirm:Dge,go_to_profile:Rge,save_criminal:zge,edit_charges:Age,issue_warrant:Bge,issue_warrant_description:Fge,warrant_expiration_date:Vge,reduction:Hge,no_reduction:Wge,time:Uge,fine:Zge,pleaded_guilty:Gge,processed:Yge,current_charges:Kge,all_charges:qge,points:Jge,add_charge:Xge,incident_title:Qge,incident_title_required:eve,no_officers_found:tve,image_label_required:nve,image_url_required:rve,image_label:ove,image_url:ive,take_picture:sve,no_report_selected:ave,citizens_involved:lve,add_citizen:cve,remove_citizen_confirm:uve,images:dve,add_image:fve,reports:pve,create_report:hve,report_title:mve,report_title_required:gve,no_citizens_found:vve,units:yve,manage_members:_ve,leave_unit:wve,create_unit:bve,unit_officers:xve,unit_officers_description:Sve,unit_vehicle_type:Pve,active_calls:Ove,respond_units_amount:Cve,find_on_map:kve,set_waypoint:Eve,detach_from_call:$ve,respond:Mve,manage_roster:Nve,roster:Tve,members:Ive,members_capitalized:jve,hire_officer:Lve,today:Dve,yesterday:Rve,set_callsign:zve,set_rank:Ave,set_roles:Bve,fire_officer:Fve,fire_officer_description:Vve,officer:Hve,apu:Wve,air:Uve,mc:Zve,k9:Gve,fto:Yve,last_active:Kve,role:qve,rank:Jve,callsign_in_use:Xve,citizen_id_already_hired:Qve,citizen_id_you_want_to_hire:eye,callsign_you_want_to_hire:tye,create_charge:nye,charge_label:rye,charge_description:oye,charge_category:iye,charge_fine:sye,charge_jailtime:aye,charge_points:lye,charge_type:cye,delete_charge:uye,delete_charge_confirm:dye,edit_charge:fye,edit:pye,delete_incident:hye,delete_incident_confirm:mye,change_picture:gye,image:vye,avatar_description:yye,vehicles:_ye,no_vehicle_selected:wye,vehicle_information:bye,save_vehicle:xye,known_information:Sye,wanted:Pye,mark_unwanted:Oye,mark_wanted:Cye,select_items:kye,create_bolo:Eye,plate:$ye,reason:Mye,bolo_expiration_date:Nye,delete_bolo:Tye,delete_bolo_confirm:Iye,avatar_description_vehicle:jye,bolo:Lye,bolos:Dye,bolo_expires_at:Rye,expires_at:zye,no_bolos_found:Aye,goto_vehicle:Bye,already_responding_or_part_of_unit:Fye,responded_to_recent_call:Vye};var V8={},V0={},H8={},H0={};Object.defineProperty(H0,"__esModule",{value:!0});H0.boolean=void 0;const Wye=function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return["true","t","yes","y","on","1"].includes(e.trim().toLowerCase());case"[object Number]":return e.valueOf()===1;case"[object Boolean]":return e.valueOf();default:return!1}};H0.boolean=Wye;var W0={};Object.defineProperty(W0,"__esModule",{value:!0});W0.isBooleanable=void 0;const Uye=function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return["true","t","yes","y","on","1","false","f","no","n","off","0"].includes(e.trim().toLowerCase());case"[object Number]":return[0,1].includes(e.valueOf());case"[object Boolean]":return!0;default:return!1}};W0.isBooleanable=Uye;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isBooleanable=e.boolean=void 0;const t=H0;Object.defineProperty(e,"boolean",{enumerable:!0,get:function(){return t.boolean}});const n=W0;Object.defineProperty(e,"isBooleanable",{enumerable:!0,get:function(){return n.isBooleanable}})})(H8);var U0={};Object.defineProperty(U0,"__esModule",{value:!0});U0.tokenize=void 0;const Zye=/(?:%(?([+0-]|-\+))?(?\d+)?(?\d+\$)?(?\.\d+)?(?[%BCESb-iosux]))|(\\%)/g,Gye=e=>{let t;const n=[];let r=0,o=0,i=null;for(;(t=Zye.exec(e))!==null;){t.index>o&&(i={literal:e.slice(o,t.index),type:"literal"},n.push(i));const s=t[0];o=t.index+s.length,s==="\\%"||s==="%%"?i&&i.type==="literal"?i.literal+="%":(i={literal:"%",type:"literal"},n.push(i)):t.groups&&(i={conversion:t.groups.conversion,flag:t.groups.flag||null,placeholder:s,position:t.groups.position?Number.parseInt(t.groups.position,10)-1:r++,precision:t.groups.precision?Number.parseInt(t.groups.precision.slice(1),10):null,type:"placeholder",width:t.groups.width?Number.parseInt(t.groups.width,10):null},n.push(i))}return o<=e.length-1&&(i&&i.type==="literal"?i.literal+=e.slice(o):n.push({literal:e.slice(o),type:"literal"})),n};U0.tokenize=Gye;Object.defineProperty(V0,"__esModule",{value:!0});V0.createPrintf=void 0;const lT=H8,Yye=U0,Kye=(e,t)=>t.placeholder,qye=e=>{var t;const n=(i,s,a)=>a==="-"?i.padEnd(s," "):a==="-+"?((Number(i)>=0?"+":"")+i).padEnd(s," "):a==="+"?((Number(i)>=0?"+":"")+i).padStart(s," "):a==="0"?i.padStart(s,"0"):i.padStart(s," "),r=(t=e?.formatUnboundExpression)!==null&&t!==void 0?t:Kye,o={};return(i,...s)=>{let a=o[i];a||(a=o[i]=Yye.tokenize(i));let c="";for(const u of a)if(u.type==="literal")c+=u.literal;else{let f=s[u.position];if(f===void 0)c+=r(i,u,s);else if(u.conversion==="b")c+=lT.boolean(f)?"true":"false";else if(u.conversion==="B")c+=lT.boolean(f)?"TRUE":"FALSE";else if(u.conversion==="c")c+=f;else if(u.conversion==="C")c+=String(f).toUpperCase();else if(u.conversion==="i"||u.conversion==="d")f=String(Math.trunc(f)),u.width!==null&&(f=n(f,u.width,u.flag)),c+=f;else if(u.conversion==="e")c+=Number(f).toExponential();else if(u.conversion==="E")c+=Number(f).toExponential().toUpperCase();else if(u.conversion==="f")u.precision!==null&&(f=Number(f).toFixed(u.precision)),u.width!==null&&(f=n(String(f),u.width,u.flag)),c+=f;else if(u.conversion==="o")c+=(Number.parseInt(String(f),10)>>>0).toString(8);else if(u.conversion==="s")u.width!==null&&(f=n(String(f),u.width,u.flag)),c+=f;else if(u.conversion==="S")u.width!==null&&(f=n(String(f),u.width,u.flag)),c+=String(f).toUpperCase();else if(u.conversion==="u")c+=Number.parseInt(String(f),10)>>>0;else if(u.conversion==="x")f=(Number.parseInt(String(f),10)>>>0).toString(16),u.width!==null&&(f=n(String(f),u.width,u.flag)),c+=f;else throw new Error("Unknown format specifier.")}return c}};V0.createPrintf=qye;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.printf=e.createPrintf=void 0;const t=V0;Object.defineProperty(e,"createPrintf",{enumerable:!0,get:function(){return t.createPrintf}}),e.printf=t.createPrintf()})(V8);const D={};String.prototype.format=function(...e){return V8.printf(this,...e)};function Jye(e){for(const t in D)D[t]=t;for(const[t,n]of Object.entries(e))D[t]=n}if(at())for(const[e,t]of Object.entries(Hye))D[e]=t;pe.extend(F8);const Xye=()=>{const e=Li(u=>u.setSelectedProfile),{setActiveIncident:t,setIncidentActive:n}=Ur(),{getRecentActivity:r,recentActivity:o}=Dme(),i=Ul(),s=u=>{const f=pe(u).fromNow();return a(f)},a=u=>u.charAt(0).toUpperCase()+u.slice(1);_.useEffect(()=>{r()},[]);const c=o.map((u,f)=>h.jsxs("tr",{children:[h.jsx("td",{children:h.jsx(mt,{color:u.type==="created"?"green":u.type==="updated"?"yellow":"red",radius:"sm",children:a(u.type)})}),h.jsx("td",{children:h.jsx(W,{children:a(u.category)})}),h.jsx("td",{children:h.jsxs(W,{children:[u.firstname," ",u.lastname]})}),h.jsx("td",{children:h.jsx(W,{children:s(u.date)})}),h.jsx("td",{children:u.type!=="deleted"&&h.jsx(nt,{spacing:0,position:"right",children:h.jsx(At,{label:"View",color:"gray",position:"bottom",withArrow:!0,children:h.jsx(Qe,{onClick:async()=>{if(u.category==="profiles"){const p=await me("getProfile",u.citizenid,{data:{...ZP}});e(p)}else if(u.category==="incidents"){const p=await me("getIncident",u.activityid,{data:{id:1,officersInvolved:[],evidence:[],title:"Funny title",description:"

",criminals:[]}});t(p),n(!0)}i(`/${u.category}`)},children:h.jsx(vhe,{size:"1.1rem",stroke:1.5,color:"white"})})})})})]},f));return h.jsxs("div",{className:"recent-activity-content",children:[h.jsx(W,{style:{fontSize:18,color:"white"},weight:500,children:D.recent_activity}),h.jsx(St,{className:"recent-activity",children:h.jsxs(Zc,{verticalSpacing:"sm",children:[h.jsx("thead",{className:"table-header",children:h.jsxs("tr",{children:[h.jsx("th",{children:D.type}),h.jsx("th",{children:D.category}),h.jsx("th",{children:D.done_by}),h.jsx("th",{children:D.time_ago}),h.jsx("th",{})]})}),h.jsx("tbody",{children:c})]})})]})},YP=_.createContext(null);YP.displayName="@mantine/modals/ModalsContext";function Qye(){const e=_.useContext(YP);if(!e)throw new Error("[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component");return e}var e0e=Object.defineProperty,t0e=Object.defineProperties,n0e=Object.getOwnPropertyDescriptors,cT=Object.getOwnPropertySymbols,r0e=Object.prototype.hasOwnProperty,o0e=Object.prototype.propertyIsEnumerable,uT=(e,t,n)=>t in e?e0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,K_=(e,t)=>{for(var n in t||(t={}))r0e.call(t,n)&&uT(e,n,t[n]);if(cT)for(var n of cT(t))o0e.call(t,n)&&uT(e,n,t[n]);return e},dT=(e,t)=>t0e(e,n0e(t));function i0e({id:e,cancelProps:t,confirmProps:n,labels:r={cancel:"",confirm:""},closeOnConfirm:o=!0,closeOnCancel:i=!0,groupProps:s,onCancel:a,onConfirm:c,children:u}){const{cancel:f,confirm:p}=r,g=Qye(),v=w=>{typeof t?.onClick=="function"&&t?.onClick(w),typeof a=="function"&&a(),i&&g.closeModal(e)},y=w=>{typeof n?.onClick=="function"&&n?.onClick(w),typeof c=="function"&&c(),o&&g.closeModal(e)};return k.createElement(k.Fragment,null,u&&k.createElement(Pe,{mb:"md"},u),k.createElement(nt,K_({position:"right"},s),k.createElement(st,dT(K_({variant:"default"},t),{onClick:v}),t?.children||f),k.createElement(st,dT(K_({},n),{onClick:y}),n?.children||p)))}function fT(e,t){var n,r,o,i;t&&e.type==="confirm"&&((r=(n=e.props).onCancel)==null||r.call(n)),(i=(o=e.props).onClose)==null||i.call(o)}function s0e(e,t){switch(t.type){case"OPEN":return{current:t.modal,modals:[...e.modals,t.modal]};case"CLOSE":{const n=e.modals.find(o=>o.id===t.modalId);if(!n)return e;fT(n,t.canceled);const r=e.modals.filter(o=>o.id!==t.modalId);return{current:r[r.length-1]||e.current,modals:r}}case"CLOSE_ALL":return e.modals.length?(e.modals.concat().reverse().forEach(n=>{fT(n,t.canceled)}),{current:e.current,modals:[]}):e;default:return e}}const[a0e,qf]=KW("mantine-modals"),l0e=qf("openModal"),c0e=qf("closeModal"),u0e=qf("closeAllModals"),d0e=qf("openConfirmModal"),f0e=e=>qf("openContextModal")(e),ke={open:l0e,close:c0e,closeAll:u0e,openConfirmModal:d0e,openContextModal:f0e};var p0e=Object.defineProperty,h0e=Object.defineProperties,m0e=Object.getOwnPropertyDescriptors,jv=Object.getOwnPropertySymbols,W8=Object.prototype.hasOwnProperty,U8=Object.prototype.propertyIsEnumerable,pT=(e,t,n)=>t in e?p0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Jh=(e,t)=>{for(var n in t||(t={}))W8.call(t,n)&&pT(e,n,t[n]);if(jv)for(var n of jv(t))U8.call(t,n)&&pT(e,n,t[n]);return e},hT=(e,t)=>h0e(e,m0e(t)),Qa=(e,t)=>{var n={};for(var r in e)W8.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&&U8.call(e,r)&&(n[r]=e[r]);return n};function g0e(e){if(!e)return{confirmProps:{},modalProps:{}};const t=e,{id:n,children:r,onCancel:o,onConfirm:i,closeOnConfirm:s,closeOnCancel:a,cancelProps:c,confirmProps:u,groupProps:f,labels:p}=t,g=Qa(t,["id","children","onCancel","onConfirm","closeOnConfirm","closeOnCancel","cancelProps","confirmProps","groupProps","labels"]);return{confirmProps:{id:n,children:r,onCancel:o,onConfirm:i,closeOnConfirm:s,closeOnCancel:a,cancelProps:c,confirmProps:u,groupProps:f,labels:p},modalProps:Jh({id:n},g)}}function v0e({children:e,modalProps:t,labels:n,modals:r}){const[o,i]=_.useReducer(s0e,{modals:[],current:null}),s=_.useRef(o);s.current=o;const a=_.useCallback(P=>{i({type:"CLOSE_ALL",canceled:P})},[s,i]),c=_.useCallback(P=>{var x=P,{modalId:S}=x,O=Qa(x,["modalId"]);const E=S||zc();return i({type:"OPEN",modal:{id:E,type:"content",props:O}}),E},[i]),u=_.useCallback(P=>{var x=P,{modalId:S}=x,O=Qa(x,["modalId"]);const E=S||zc();return i({type:"OPEN",modal:{id:E,type:"confirm",props:O}}),E},[i]),f=_.useCallback((P,x)=>{var S=x,{modalId:O}=S,E=Qa(S,["modalId"]);const $=O||zc();return i({type:"OPEN",modal:{id:$,type:"context",props:E,ctx:P}}),$},[i]),p=_.useCallback((P,x)=>{i({type:"CLOSE",modalId:P,canceled:x})},[s,i]);a0e({openModal:c,openConfirmModal:u,openContextModal:P=>{var x=P,{modal:S}=x,O=Qa(x,["modal"]);return f(S,O)},closeModal:p,closeContextModal:p,closeAllModals:a});const g={modals:o.modals,openModal:c,openConfirmModal:u,openContextModal:f,closeModal:p,closeContextModal:p,closeAll:a},v=()=>{const P=s.current.current;switch(P?.type){case"context":{const x=P.props,{innerProps:S}=x,O=Qa(x,["innerProps"]),E=r[P.ctx];return{modalProps:O,content:k.createElement(E,{innerProps:S,context:g,id:P.id})}}case"confirm":{const{modalProps:x,confirmProps:S}=g0e(P.props);return{modalProps:x,content:k.createElement(i0e,hT(Jh({},S),{id:P.id,labels:P.props.labels||n}))}}case"content":{const x=P.props,{children:S}=x;return{modalProps:Qa(x,["children"]),content:k.createElement(k.Fragment,null,S)}}default:return{modalProps:{},content:null}}},{modalProps:y,content:w}=v();return k.createElement(YP.Provider,{value:g},k.createElement(zi,hT(Jh(Jh({zIndex:ii("modal")+1},t),y),{opened:o.modals.length>0,onClose:()=>p(o.current.id)}),w),e)}const[y0e,ja]=bu("RichTextEditor was not found in tree");function Ln(e){this.content=e}Ln.prototype={constructor:Ln,find:function(e){for(var t=0;t>1}};Ln.from=function(e){if(e instanceof Ln)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Ln(t)};function Z8(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=Z8(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function G8(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?ah(r+1,s):ah(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}};wt.none=[];class Dv 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=K8(this.content,t+this.openStart,n);return r&&new ye(r,this.openStart,this.openEnd)}removeBetween(t,n){return new ye(Y8(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 Y8(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(Y8(i.content,t-o-1,n-o-1)))}function K8(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=K8(s.content,t-i-1,n);return a&&e.replaceChild(o,s.copy(a))}function _0e(e,t,n){if(n.openStart>e.depth)throw new Dv("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Dv("Inconsistent open depths");return q8(e,t,n,0)}function q8(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 Dd(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&&(wl(e.nodeAfter,r),i++));for(let a=i;ao&&ax(e,t,o+1),s=r.depth>o&&ax(n,r,o+1),a=[];return Dd(null,e,o,a),i&&s&&t.index(o)==n.index(o)?(J8(i,s),wl(bl(i,X8(e,t,n,r,o+1)),a)):(i&&wl(bl(i,Rv(e,t,o+1)),a),Dd(t,n,o,a),s&&wl(bl(s,Rv(n,r,o+1)),a)),Dd(r,null,o,a),new se(a)}function Rv(e,t,n){let r=[];if(Dd(null,e,n,r),e.depth>n){let o=ax(e,t,n+1);wl(bl(o,Rv(e,t,n+1)),r)}return Dd(t,null,n,r),new se(r)}function w0e(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 gf{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 zv(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 gf(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()+")"),Q8(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)}};xl.prototype.text=void 0;class Av extends xl{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):Q8(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 Av(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new Av(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 Q8(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class Tl{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new S0e(t,n);if(r.next==null)return Tl.empty;let o=e7(r);r.next&&r.err("Unexpected trailing text");let i=M0e($0e(o));return N0e(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(` -`)}}Tl.empty=new Tl(!0);class S0e{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 e7(e){let t=[];do t.push(P0e(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function P0e(e){let t=[];do t.push(O0e(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function O0e(e){let t=E0e(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=C0e(e,t);else break;return t}function mT(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function C0e(e,t){let n=mT(e),r=n;return e.eat(",")&&(e.next!="}"?r=mT(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function k0e(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 E0e(e){if(e.eat("(")){let t=e7(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=k0e(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 $0e(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 Tl(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 i7(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 T0e{constructor(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}get isRequired(){return!this.hasDefault}}class Z0{constructor(t,n,r,o){this.name=t,this.rank=n,this.schema=r,this.spec=o,this.attrs=o7(o.attrs),this.excluded=null;let i=n7(this.attrs);this.instance=i?new wt(this,i):null}create(t=null){return!t&&this.instance?this.instance:new wt(this,r7(this.attrs,t))}static compile(t,n){let r=Object.create(null),o=0;return t.forEach((i,s)=>r[i]=new Z0(i,o++,n,s)),r}removeFromSet(t){for(var n=0;n-1}}class I0e{constructor(t){this.cached=Object.create(null);let n=this.spec={};for(let o in t)n[o]=t[o];n.nodes=Ln.from(t.nodes),n.marks=Ln.from(t.marks||{}),this.nodes=vT.compile(this.spec.nodes,this),this.marks=Z0.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]=Tl.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet=a=="_"?null:a?yT(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==""?[]:yT(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 vT){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 Av(r,r.defaultAttrs,t,wt.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeFromJSON(t){return xl.fromJSON(this,t)}markFromJSON(t){return wt.fromJSON(this,t)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}}function yT(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 wT(this,n,!1);return r.addAll(t,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new wT(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 s7={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},j0e={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},a7={ol:!0,ul:!0},Bv=1,Fv=2,Rd=4;function _T(e,t,n){return t!=null?(t?Bv:0)|(t==="full"?Fv:0):e&&e.whitespace=="pre"?Bv|Fv:n&~Rd}class lh{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=wt.none,this.stashMarks=[],this.match=s||(a&Rd?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&Bv)){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{const t=typeof e=="function"?tme(e):e,n=(r,o)=>Sme(t,r,o);return Object.assign(n,t),n},tn=e=>e?iT(e):iT,at=()=>!window.invokeNative,Pme=()=>{},R8=tn(e=>({showApp:!!at(),setVisibility:t=>e({showApp:t}),show:()=>e({showApp:!0}),hide:()=>e({showApp:!1}),toggle:()=>e(t=>({showApp:!t.showApp}))})),Ome={citizenid:"1993201",firstname:"Bubble",lastname:"Test",role:"Chief",image:"https://i.imgur.com/P4uYdfu.jpeg",callSign:103,unit:1},bo=tn(e=>({personalData:at()?Ome:{citizenid:"",firstname:"",lastname:"",role:"",image:"",callSign:0},setPersonalData:t=>e(n=>({personalData:typeof t=="function"?t(n.personalData):{...n.personalData,...t}}))}));async function me(e,t,n){if(at())return n?(await new Promise(a=>setTimeout(a,n.delay)),n.data):await new Promise(a=>a);const r={method:"post",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(t)},o=window.GetParentResourceName?window.GetParentResourceName():"nui-frame-app";return await(await fetch(`https://${o}/${e}`,r)).json()}const z8=[];for(let e=0;e<25;e++)z8[e]={firstname:"Firstname",lastname:`Lastname ${e+1}`,dob:Date.now(),citizenid:e.toString()};const ZP={firstname:"John",lastname:"Doe",citizenid:"BUB193Z4A",dob:Date.now(),phoneNumber:"123456789",notes:"

",vehicles:["Sultan Custom (88ZOH526)","Sultan Custom (07NCV529)","Sultan Custom (07NCV545)","Sultan Custom (07NCV521)"],relatedReports:[{title:"Report title",id:1,author:"Some One",date:"13/03/2023"},{title:"Report title",id:2,author:"Some One",date:"13/03/2023"},{title:"Report title",id:3,author:"Some One",date:"13/03/2023"},{title:"Report title",id:4,author:"Some One",date:"13/03/2023"}],relatedIncidents:[{title:"Incident 1",author:"Someone nice",date:"13/03/2023",id:1}]},Cme=[{id:"vehicles",title:"Vehicles",icon:"car"}],ji=tn(e=>({profileCards:[],selectedProfile:null,isProfileWanted:!1,getPlayers:async()=>at()?{profiles:z8}:await me("getAllProfiles"),setSelectedProfile:t=>{at()&&e({selectedProfile:ZP,profileCards:Cme}),e({selectedProfile:t})},setProfileCards:t=>e({profileCards:t}),setIsProfileWanted:t=>{e({isProfileWanted:t})}})),kme={"OFFENSES AGAINST PERSONS":[{label:"Speeding",description:"Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aperiam, doloribus eveniet facere ipsam, ipsum minus modi molestiae nesciunt odio saepe sapiente sed sint voluptatibus voluptatum!",type:"infraction",time:0,fine:2500,points:4},{label:"Loitering",description:"Standing go brrr",type:"misdemeanor",time:90,fine:25e3,points:0},{label:"Something else 1",description:"Standing go brrr",type:"misdemeanor",time:90,fine:25e3,points:0},{label:"Something else 2",description:"Standing go brrr",type:"misdemeanor",time:90,fine:25e3,points:0},{label:"Something else 3",description:"Standing go brrr",type:"misdemeanor",time:90,fine:25e3,points:0}],"OFFENSES AGAINST PROPERTY":[{label:"Robbery of a financial institution",description:"Bank robbery go brrr",type:"felony",time:30,fine:3e3,points:0},{label:"Something else 2 in OFFENSES AGAINST",description:"Standing go brrr",type:"felony",time:90,fine:25e3,points:0},{label:"Something else 3 in OFFENSES AGAINST",description:"Standing go brrr",type:"felony",time:90,fine:25e3,points:0},{label:"Something else 4 in OFFENSES AGAINST",description:"Standing go brrr",type:"felony",time:90,fine:25e3,points:0}]},Gf=tn(e=>({charges:at()?kme:{},setCharges:t=>{e(n=>({charges:typeof t=="function"?t(n.charges):t}))}})),sT=[{firstname:"John",lastname:"Doe",callsign:"1A-01",citizenid:"ABCD1234",playerId:1,position:[0,0,0],unitId:1},{firstname:"Jenna",lastname:"Doe",callsign:"1A-02",citizenid:"ABCD1235",playerId:2,position:[0,0,0]}],GP=tn(e=>({officers:at()?sT:[],activeOfficers:at()?sT:[],getOfficers:async()=>{try{const t=await me("getOfficers");return e({officers:t}),{officers:t}}catch(t){return console.error("Failed to fetch officers:",t),{officers:[]}}},getActiveOfficers:async()=>{try{const t=await me("getActiveOfficers"),n=Object.values(t);return e({activeOfficers:n}),{activeOfficers:n}}catch(t){return console.error("Failed to fetch active officers:",t),{activeOfficers:[]}}},setOfficers:t=>e({officers:t}),addOfficer:t=>e(n=>({officers:[...n.officers,t]})),removeOfficer:t=>e(n=>({officers:n.officers.filter(r=>r.citizenid!==t)}))})),Yf=tn(e=>({config:{isDispatchEnabled:!0},setConfig:t=>e({config:t})})),Eme=ue(e=>({link:{...e.fn.focusStyles(),display:"flex",alignItems:"center",textDecoration:"none",fontSize:e.fontSizes.xs,color:e.colors.gray[2],padding:`${e.spacing.xs} ${e.spacing.xs}`,fontWeight:500,"&:hover":{borderRadius:e.radius.sm,background:"linear-gradient(90deg, rgba(51,124,255,0.5) 0%, rgba(187,187,187,0) 100%)",color:e.colorScheme==="dark"?e.white:e.black,[`& .${Ar("icon")}`]:{color:e.colorScheme==="dark"?e.white:e.black}}},linkIcon:{ref:Ar("icon"),color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],marginRight:e.spacing.sm},linkActive:{"&, &:hover":{borderRadius:e.radius.sm,background:"linear-gradient(90deg, rgba(51,124,255,0.5) 0%, rgba(187,187,187,0) 100%)",[`& .${Ar("icon")}`]:{color:"white"}}},chevron:{transition:"transform 200ms ease"}})),$me=[{link:"",label:"Dashboard",icon:Ehe}],Mme=[{link:"profiles",label:"Profiles",icon:UP},{link:"incidents",label:"Incidents",icon:VP},{link:"reports",label:"Reports",icon:AP},{link:"vehicles",label:"Vehicles",icon:ks},{link:"dispatch",label:"Dispatch",icon:lu}],Nme=[{label:"Roster",link:"roster",icon:qhe},{label:"Charges",link:"charges",icon:_he}],Tme=()=>{const{config:e}=Yf(),{classes:t,cx:n,theme:r}=Eme(),[o,i]=_.useState(""),{firstname:s,lastname:a,callSign:c,role:u}=bo(g=>g.personalData),f=Cu(),p=g=>g.map(v=>v.link==="dispatch"&&!e.isDispatchEnabled?null:h.jsxs(qpe,{to:`/${v.link}`,onClick:()=>i(v.link),className:n(t.link,{[t.linkActive]:o===v.link}),children:[h.jsx(v.icon,{className:t.linkIcon,stroke:1.5}),h.jsx("span",{children:v.label})]},v.link));return _.useEffect(()=>{i(f.pathname.split("/")[1])},[f]),h.jsxs(tg,{p:"xs",style:{backgroundColor:"#242527",borderTopLeftRadius:5,borderBottomLeftRadius:5,maxWidth:300,height:"100%"},children:[h.jsxs(tg.Section,{children:[h.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:h.jsx(ri,{radius:"md",width:150,height:150,fit:"contain",src:eme,alt:"LSPD Logo"})}),h.jsx(Ye,{my:"sm"}),h.jsxs(At,{h:632,scrollbarSize:2,children:[h.jsx(U,{size:"xs",weight:500,color:"dimmed",style:{margin:8},children:"Home"}),p($me),h.jsx(U,{size:"xs",weight:500,color:"dimmed",style:{margin:8},children:"Pages"}),p(Mme),h.jsx(U,{size:"xs",weight:500,color:"dimmed",style:{margin:8},children:"Staff"}),p(Nme)]})]}),h.jsx(Pe,{sx:{paddingTop:5,borderTop:`${M(1)} solid ${r.colorScheme==="dark"?r.colors.dark[4]:r.colors.gray[2]}`},children:h.jsx("div",{style:{display:"block",width:"100%",color:"#e9ecef",padding:"0.625rem"},children:h.jsx(nt,{children:h.jsxs(Pe,{sx:{flex:1},children:[h.jsxs(U,{size:"sm",weight:500,children:[s," ",a]}),h.jsxs(U,{color:"dimmed",size:"xs",children:[u," | ",c]})]})})})})]})};var A8={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Kx,function(){var n=1e3,r=6e4,o=36e5,i="millisecond",s="second",a="minute",c="hour",u="day",f="week",p="month",g="quarter",v="year",y="date",w="Invalid Date",P=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|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(V){var H=["th","st","nd","rd"],Z=V%100;return"["+V+(H[(Z-20)%10]||H[Z]||H[0])+"]"}},O=function(V,H,Z){var Y=String(V);return!Y||Y.length>=H?V:""+Array(H+1-Y.length).join(Z)+V},E={s:O,z:function(V){var H=-V.utcOffset(),Z=Math.abs(H),Y=Math.floor(Z/60),j=Z%60;return(H<=0?"+":"-")+O(Y,2,"0")+":"+O(j,2,"0")},m:function V(H,Z){if(H.date()1)return V(F[0])}else{var K=H.name;N[K]=H,j=K}return!Y&&j&&($=j),j||!Y&&$},z=function(V,H){if(R(V))return V.clone();var Z=typeof H=="object"?H:{};return Z.date=V,Z.args=arguments,new X(Z)},G=E;G.l=B,G.i=R,G.w=function(V,H){return z(V,{locale:H.$L,utc:H.$u,x:H.$x,$offset:H.$offset})};var X=function(){function V(Z){this.$L=B(Z.locale,null,!0),this.parse(Z),this.$x=this.$x||Z.x||{},this[I]=!0}var H=V.prototype;return H.parse=function(Z){this.$d=function(Y){var j=Y.date,W=Y.utc;if(j===null)return new Date(NaN);if(G.u(j))return new Date;if(j instanceof Date)return new Date(j);if(typeof j=="string"&&!/Z$/i.test(j)){var F=j.match(P);if(F){var K=F[2]-1||0,ee=(F[7]||"0").substring(0,3);return W?new Date(Date.UTC(F[1],K,F[3]||1,F[4]||0,F[5]||0,F[6]||0,ee)):new Date(F[1],K,F[3]||1,F[4]||0,F[5]||0,F[6]||0,ee)}}return new Date(j)}(Z),this.init()},H.init=function(){var Z=this.$d;this.$y=Z.getFullYear(),this.$M=Z.getMonth(),this.$D=Z.getDate(),this.$W=Z.getDay(),this.$H=Z.getHours(),this.$m=Z.getMinutes(),this.$s=Z.getSeconds(),this.$ms=Z.getMilliseconds()},H.$utils=function(){return G},H.isValid=function(){return this.$d.toString()!==w},H.isSame=function(Z,Y){var j=z(Z);return this.startOf(Y)<=j&&j<=this.endOf(Y)},H.isAfter=function(Z,Y){return z(Z)0,N<=$.r||!$.r){N<=1&&E>0&&($=S[E-1]);var I=x[$.l];v&&(N=v(""+N)),w=typeof I=="string"?I.replace("%d",N):I(N,f,$.l,P);break}}if(f)return w;var R=P?x.future:x.past;return typeof R=="function"?R(w):R.replace("%s",w)},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)}}})})(B8);var jme=B8.exports;const F8=Ea(jme);const aT={title:"Debug Incident title",id:0,description:"

This is a incident description

",officersInvolved:[{firstname:"Callum",lastname:"Graham",callsign:188,citizenid:"132142",playerId:1,position:[0,0,0]},{firstname:"Jacob",lastname:"Gray",callsign:273,citizenid:"152312",playerId:1,position:[0,0,0]},{firstname:"Edward",lastname:"Atkinson",callsign:125,citizenid:"948213",playerId:1,position:[0,0,0]}],evidence:[],criminals:[{firstname:"Archie",lastname:"Moss",dob:Date.now(),issueWarrant:!1,processed:!1,pleadedGuilty:!1,citizenid:"0",charges:[],penalty:{time:0,fine:0,reduction:null,points:0}}]},Ur=tn(e=>({incident:aT,isIncidentActive:!1,setActiveIncident:t=>{at()&&e({incident:aT}),e({incident:t})},updateIncidentField:(t,n)=>{e(r=>({incident:{...r.incident,[t]:n}}))},setIncidentActive:t=>{e({isIncidentActive:t})},setDescription:t=>{e(n=>({incident:{...n.incident,description:t}}))},setCriminals:t=>{e(n=>({incident:{...n.incident,criminals:typeof t=="function"?t(n.incident.criminals):t}}))},setCriminal:(t,n)=>{e(r=>{const o=r.incident.criminals.map(i=>i.citizenid===t?typeof n=="function"?n(i):{...i,...n}:i);return{incident:{...r.incident,criminals:o}}})},setOfficersInvolved:t=>{e(n=>({incident:{...n.incident,officersInvolved:typeof t=="function"?t(n.incident.officersInvolved):t}}))},setEvidence:t=>{e(n=>({incident:{...n.incident,evidence:typeof t=="function"?t(n.incident.evidence):t}}))}})),Lme=[{type:"created",category:"profiles",firstname:"Bubble",lastname:"Test",date:"string",activityid:1,citizenid:"BUB193Z4A"},{type:"updated",category:"profiles",firstname:"Bubble",lastname:"Test",date:"string",activityid:1,citizenid:"BUB193Z4A"},{type:"deleted",category:"profiles",firstname:"Bubble",lastname:"Test",date:"string",activityid:1,citizenid:"BUB193Z4A"},{type:"created",category:"incidents",firstname:"Bubble",lastname:"Test",date:"string",activityid:1,citizenid:"BUB193Z4A"},{type:"created",category:"profiles",firstname:"Bubble",lastname:"Test",date:"string",activityid:1,citizenid:"BUB193Z4A"},{type:"created",category:"profiles",firstname:"Bubble",lastname:"Test",date:"string",activityid:1,citizenid:"BUB193Z4A"},{type:"created",category:"profiles",firstname:"Bubble",lastname:"Test",date:"string",activityid:1,citizenid:"BUB193Z4A"},{type:"created",category:"profiles",firstname:"Bubble",lastname:"Test",date:"string",activityid:1,citizenid:"BUB193Z4A"}],Dme=tn(e=>({recentActivity:at()?Lme:[],getRecentActivity:async()=>{try{const t=await me("getRecentActivity");return e({recentActivity:t}),{recentActivity:t}}catch(t){return console.error("Failed to fetch recent activities:",t),{recentActivity:[]}}},setRecentActivities:t=>e({recentActivity:t})})),Rme="Configuration",zme="Logout",Ame="Welcome back, %s %s",Bme="Active Officers",Fme="Callsign",Vme="Attached Unit",Hme="Active Warrants",Wme="Expires in",Ume="No warrants found",Zme="Recent Activity",Gme="Type",Yme="Category",Kme="Done by",qme="Time ago",Jme="Dispatch",Xme="Responding Units",Qme="No recent calls found",ege="Announcements",tge="Create announcement",nge="All Announcements",rge="No announcements found",oge="Create",ige="View all",sge="Profiles",age="Search...",lge="DOB",cge="Citizen ID",uge="No profiles found",dge="No profile selected",fge="Edit Citizen",pge="No %s registered",hge="Related reports",mge="No related reports",gge="Related incidents",vge="No related incidents",yge="Remove Charge",_ge="No incident selected",wge="Add Criminal",bge="Unlink",xge="Officers involved",Sge="Add officer",Pge="Remove officer",Oge="Are you sure you want to remove %s %s (%s) from involved officers?",Cge="Confirm",kge="Cancel",Ege="Evidence",$ge="Add evidence",Mge="Incidents",Nge="Create incident",Tge="Remove evidence",Ige="Are you sure you want to remove %s from evidence?",jge="month(s)",Lge="Remove criminal",Dge="Remove %s %s? Removing them will also remove the charges from their profile.",Rge="Go to profile",zge="Save criminal",Age="Edit charges",Bge="Issue warrant",Fge="Suspect hasn't been processed and charged",Vge="Warrant expiration date",Hge="Reduction",Wge="No reduction",Uge="Time",Zge="Fine",Gge="Pleaded guilty",Yge="Processed",Kge="Current Charges",qge="All Charges",Jge="point(s)",Xge="Add Charge",Qge="Incident title",eve="Incident title is required",tve="No officers found",nve="Image label is required",rve="Image URL is required",ove="Image label",ive="Image URL",sve="Take picture",ave="No report selected",lve="Citizens involved",cve="Add citizen",uve="Are you sure you want to remove %s %s from involved citizens",dve="Images",fve="Add image",pve="Reports",hve="Create report",mve="Report title",gve="Report title is required",vve="No citizens found",yve="Units",_ve="Manage members",wve="Leave Unit",bve="Create unit",xve="Unit officers",Sve="Set officers assigned to this unit",Pve="Unit vehicle type",Ove="Active Calls",Cve="Responding units (%s)",kve="Find on map",Eve="Set waypoint",$ve="Detach from call",Mve="Respond",Nve="Manage roster",Tve="Roster",Ive="members",jve="Members",Lve="Hire officer",Dve="Today",Rve="Yesterday",zve="Set callsign",Ave="Set rank",Bve="Set roles",Fve="Fire officer",Vve="Are you sure you want to fire %s %s?",Hve="Officer",Wve="APU",Uve="AIR",Zve="MC",Gve="K9",Yve="FTO",Kve="Last active",qve="Role",Jve="Rank",Xve="Callsign already in use",Qve="The citizen with this citizen id is already hired",eye="Citizen ID of the citizen you want to hire",tye="Callsign of the new officer you want to hire",nye="Create Charge",rye="Charge Label",oye="Charge Description",iye="Charge Category",sye="Charge Fine",aye="Charge Jailtime",lye="Charge Points",cye="Charge Type",uye="Delete charge",dye="Are you sure you want to delete %s",fye="Edit Charge",pye="Edit",hye="Delete Incident",mye="Are you sure you want to delete %s",gye="Change picture",vye="Image",yye="Image URL to use as the profile image",_ye="Vehicles",wye="No vehicle selected",bye="Vehicle Information",xye="Save vehicle",Sye="Known information",Pye="Wanted",Oye="MARK UNWANTED",Cye="MARK WANTED",kye="Select items",Eye="Create BOLO",$ye="Plate",Mye="Reason",Nye="BOLO expiration date",Tye="Delete BOLO",Iye="Are you sure you want to delete the BOLO for: %s",jye="Image URL to use as the vehicle image",Lye="BOLO",Dye="BOLOS",Rye="BOLO expires at:",zye="Expires at:",Aye="No bolos found",Bye="Go to vehicle",Fye="You are already responding or not a part of a unit",Vye="You responded to the recent call",Hye={configuration:Rme,logout:zme,welcome_back:Ame,active_officers:Bme,callsign:Fme,attached_unit:Vme,active_warrants:Hme,expires_in:Wme,no_warrants_found:Ume,recent_activity:Zme,type:Gme,category:Yme,done_by:Kme,time_ago:qme,dispatch:Jme,responding_units:Xme,no_recent_calls_found:Qme,announcements:ege,create_announcement:tge,all_announcements:nge,no_announcements_found:rge,create:oge,view_all:ige,profiles:sge,search:age,dob:lge,citizen_id:cge,no_profiles_found:uge,no_profile_selected:dge,edit_citizen:fge,no_cardid_registered:pge,related_reports:hge,no_related_reports:mge,related_incidents:gge,no_related_incidents:vge,remove_charge:yge,no_incident_selected:_ge,add_criminal:wge,unlink:bge,officers_involved:xge,add_officer:Sge,remove_officer:Pge,remove_officer_confirm:Oge,confirm:Cge,cancel:kge,evidence:Ege,add_evidence:$ge,incidents:Mge,create_incident:Nge,remove_evidence:Tge,remove_evidence_confirm:Ige,months:jge,remove_criminal:Lge,remove_criminal_confirm:Dge,go_to_profile:Rge,save_criminal:zge,edit_charges:Age,issue_warrant:Bge,issue_warrant_description:Fge,warrant_expiration_date:Vge,reduction:Hge,no_reduction:Wge,time:Uge,fine:Zge,pleaded_guilty:Gge,processed:Yge,current_charges:Kge,all_charges:qge,points:Jge,add_charge:Xge,incident_title:Qge,incident_title_required:eve,no_officers_found:tve,image_label_required:nve,image_url_required:rve,image_label:ove,image_url:ive,take_picture:sve,no_report_selected:ave,citizens_involved:lve,add_citizen:cve,remove_citizen_confirm:uve,images:dve,add_image:fve,reports:pve,create_report:hve,report_title:mve,report_title_required:gve,no_citizens_found:vve,units:yve,manage_members:_ve,leave_unit:wve,create_unit:bve,unit_officers:xve,unit_officers_description:Sve,unit_vehicle_type:Pve,active_calls:Ove,respond_units_amount:Cve,find_on_map:kve,set_waypoint:Eve,detach_from_call:$ve,respond:Mve,manage_roster:Nve,roster:Tve,members:Ive,members_capitalized:jve,hire_officer:Lve,today:Dve,yesterday:Rve,set_callsign:zve,set_rank:Ave,set_roles:Bve,fire_officer:Fve,fire_officer_description:Vve,officer:Hve,apu:Wve,air:Uve,mc:Zve,k9:Gve,fto:Yve,last_active:Kve,role:qve,rank:Jve,callsign_in_use:Xve,citizen_id_already_hired:Qve,citizen_id_you_want_to_hire:eye,callsign_you_want_to_hire:tye,create_charge:nye,charge_label:rye,charge_description:oye,charge_category:iye,charge_fine:sye,charge_jailtime:aye,charge_points:lye,charge_type:cye,delete_charge:uye,delete_charge_confirm:dye,edit_charge:fye,edit:pye,delete_incident:hye,delete_incident_confirm:mye,change_picture:gye,image:vye,avatar_description:yye,vehicles:_ye,no_vehicle_selected:wye,vehicle_information:bye,save_vehicle:xye,known_information:Sye,wanted:Pye,mark_unwanted:Oye,mark_wanted:Cye,select_items:kye,create_bolo:Eye,plate:$ye,reason:Mye,bolo_expiration_date:Nye,delete_bolo:Tye,delete_bolo_confirm:Iye,avatar_description_vehicle:jye,bolo:Lye,bolos:Dye,bolo_expires_at:Rye,expires_at:zye,no_bolos_found:Aye,goto_vehicle:Bye,already_responding_or_part_of_unit:Fye,responded_to_recent_call:Vye};var V8={},F0={},H8={},V0={};Object.defineProperty(V0,"__esModule",{value:!0});V0.boolean=void 0;const Wye=function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return["true","t","yes","y","on","1"].includes(e.trim().toLowerCase());case"[object Number]":return e.valueOf()===1;case"[object Boolean]":return e.valueOf();default:return!1}};V0.boolean=Wye;var H0={};Object.defineProperty(H0,"__esModule",{value:!0});H0.isBooleanable=void 0;const Uye=function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return["true","t","yes","y","on","1","false","f","no","n","off","0"].includes(e.trim().toLowerCase());case"[object Number]":return[0,1].includes(e.valueOf());case"[object Boolean]":return!0;default:return!1}};H0.isBooleanable=Uye;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isBooleanable=e.boolean=void 0;const t=V0;Object.defineProperty(e,"boolean",{enumerable:!0,get:function(){return t.boolean}});const n=H0;Object.defineProperty(e,"isBooleanable",{enumerable:!0,get:function(){return n.isBooleanable}})})(H8);var W0={};Object.defineProperty(W0,"__esModule",{value:!0});W0.tokenize=void 0;const Zye=/(?:%(?([+0-]|-\+))?(?\d+)?(?\d+\$)?(?\.\d+)?(?[%BCESb-iosux]))|(\\%)/g,Gye=e=>{let t;const n=[];let r=0,o=0,i=null;for(;(t=Zye.exec(e))!==null;){t.index>o&&(i={literal:e.slice(o,t.index),type:"literal"},n.push(i));const s=t[0];o=t.index+s.length,s==="\\%"||s==="%%"?i&&i.type==="literal"?i.literal+="%":(i={literal:"%",type:"literal"},n.push(i)):t.groups&&(i={conversion:t.groups.conversion,flag:t.groups.flag||null,placeholder:s,position:t.groups.position?Number.parseInt(t.groups.position,10)-1:r++,precision:t.groups.precision?Number.parseInt(t.groups.precision.slice(1),10):null,type:"placeholder",width:t.groups.width?Number.parseInt(t.groups.width,10):null},n.push(i))}return o<=e.length-1&&(i&&i.type==="literal"?i.literal+=e.slice(o):n.push({literal:e.slice(o),type:"literal"})),n};W0.tokenize=Gye;Object.defineProperty(F0,"__esModule",{value:!0});F0.createPrintf=void 0;const lT=H8,Yye=W0,Kye=(e,t)=>t.placeholder,qye=e=>{var t;const n=(i,s,a)=>a==="-"?i.padEnd(s," "):a==="-+"?((Number(i)>=0?"+":"")+i).padEnd(s," "):a==="+"?((Number(i)>=0?"+":"")+i).padStart(s," "):a==="0"?i.padStart(s,"0"):i.padStart(s," "),r=(t=e?.formatUnboundExpression)!==null&&t!==void 0?t:Kye,o={};return(i,...s)=>{let a=o[i];a||(a=o[i]=Yye.tokenize(i));let c="";for(const u of a)if(u.type==="literal")c+=u.literal;else{let f=s[u.position];if(f===void 0)c+=r(i,u,s);else if(u.conversion==="b")c+=lT.boolean(f)?"true":"false";else if(u.conversion==="B")c+=lT.boolean(f)?"TRUE":"FALSE";else if(u.conversion==="c")c+=f;else if(u.conversion==="C")c+=String(f).toUpperCase();else if(u.conversion==="i"||u.conversion==="d")f=String(Math.trunc(f)),u.width!==null&&(f=n(f,u.width,u.flag)),c+=f;else if(u.conversion==="e")c+=Number(f).toExponential();else if(u.conversion==="E")c+=Number(f).toExponential().toUpperCase();else if(u.conversion==="f")u.precision!==null&&(f=Number(f).toFixed(u.precision)),u.width!==null&&(f=n(String(f),u.width,u.flag)),c+=f;else if(u.conversion==="o")c+=(Number.parseInt(String(f),10)>>>0).toString(8);else if(u.conversion==="s")u.width!==null&&(f=n(String(f),u.width,u.flag)),c+=f;else if(u.conversion==="S")u.width!==null&&(f=n(String(f),u.width,u.flag)),c+=String(f).toUpperCase();else if(u.conversion==="u")c+=Number.parseInt(String(f),10)>>>0;else if(u.conversion==="x")f=(Number.parseInt(String(f),10)>>>0).toString(16),u.width!==null&&(f=n(String(f),u.width,u.flag)),c+=f;else throw new Error("Unknown format specifier.")}return c}};F0.createPrintf=qye;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.printf=e.createPrintf=void 0;const t=F0;Object.defineProperty(e,"createPrintf",{enumerable:!0,get:function(){return t.createPrintf}}),e.printf=t.createPrintf()})(V8);const D={};String.prototype.format=function(...e){return V8.printf(this,...e)};function Jye(e){for(const t in D)D[t]=t;for(const[t,n]of Object.entries(e))D[t]=n}if(at())for(const[e,t]of Object.entries(Hye))D[e]=t;pe.extend(F8);const Xye=()=>{const e=ji(u=>u.setSelectedProfile),{setActiveIncident:t,setIncidentActive:n}=Ur(),{getRecentActivity:r,recentActivity:o}=Dme(),i=Ul(),s=u=>{const f=pe(u).fromNow();return a(f)},a=u=>u.charAt(0).toUpperCase()+u.slice(1);_.useEffect(()=>{r()},[]);const c=o.map((u,f)=>h.jsxs("tr",{children:[h.jsx("td",{children:h.jsx(mt,{color:u.type==="created"?"green":u.type==="updated"?"yellow":"red",radius:"sm",children:a(u.type)})}),h.jsx("td",{children:h.jsx(U,{children:a(u.category)})}),h.jsx("td",{children:h.jsxs(U,{children:[u.firstname," ",u.lastname]})}),h.jsx("td",{children:h.jsx(U,{children:s(u.date)})}),h.jsx("td",{children:u.type!=="deleted"&&h.jsx(nt,{spacing:0,position:"right",children:h.jsx(zt,{label:"View",color:"gray",position:"bottom",withArrow:!0,children:h.jsx(Qe,{onClick:async()=>{if(u.category==="profiles"){const p=await me("getProfile",u.citizenid,{data:{...ZP}});e(p)}else if(u.category==="incidents"){const p=await me("getIncident",u.activityid,{data:{id:1,officersInvolved:[],evidence:[],title:"Funny title",description:"

",criminals:[]}});t(p),n(!0)}i(`/${u.category}`)},children:h.jsx(vhe,{size:"1.1rem",stroke:1.5,color:"white"})})})})})]},f));return h.jsxs("div",{className:"recent-activity-content",children:[h.jsx(U,{style:{fontSize:18,color:"white"},weight:500,children:D.recent_activity}),h.jsx(At,{className:"recent-activity",children:h.jsxs(IP,{verticalSpacing:"sm",children:[h.jsx("thead",{className:"table-header",children:h.jsxs("tr",{children:[h.jsx("th",{children:D.type}),h.jsx("th",{children:D.category}),h.jsx("th",{children:D.done_by}),h.jsx("th",{children:D.time_ago}),h.jsx("th",{})]})}),h.jsx("tbody",{children:c})]})})]})},YP=_.createContext(null);YP.displayName="@mantine/modals/ModalsContext";function Qye(){const e=_.useContext(YP);if(!e)throw new Error("[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component");return e}var e0e=Object.defineProperty,t0e=Object.defineProperties,n0e=Object.getOwnPropertyDescriptors,cT=Object.getOwnPropertySymbols,r0e=Object.prototype.hasOwnProperty,o0e=Object.prototype.propertyIsEnumerable,uT=(e,t,n)=>t in e?e0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Y_=(e,t)=>{for(var n in t||(t={}))r0e.call(t,n)&&uT(e,n,t[n]);if(cT)for(var n of cT(t))o0e.call(t,n)&&uT(e,n,t[n]);return e},dT=(e,t)=>t0e(e,n0e(t));function i0e({id:e,cancelProps:t,confirmProps:n,labels:r={cancel:"",confirm:""},closeOnConfirm:o=!0,closeOnCancel:i=!0,groupProps:s,onCancel:a,onConfirm:c,children:u}){const{cancel:f,confirm:p}=r,g=Qye(),v=w=>{typeof t?.onClick=="function"&&t?.onClick(w),typeof a=="function"&&a(),i&&g.closeModal(e)},y=w=>{typeof n?.onClick=="function"&&n?.onClick(w),typeof c=="function"&&c(),o&&g.closeModal(e)};return k.createElement(k.Fragment,null,u&&k.createElement(Pe,{mb:"md"},u),k.createElement(nt,Y_({position:"right"},s),k.createElement(st,dT(Y_({variant:"default"},t),{onClick:v}),t?.children||f),k.createElement(st,dT(Y_({},n),{onClick:y}),n?.children||p)))}function fT(e,t){var n,r,o,i;t&&e.type==="confirm"&&((r=(n=e.props).onCancel)==null||r.call(n)),(i=(o=e.props).onClose)==null||i.call(o)}function s0e(e,t){switch(t.type){case"OPEN":return{current:t.modal,modals:[...e.modals,t.modal]};case"CLOSE":{const n=e.modals.find(o=>o.id===t.modalId);if(!n)return e;fT(n,t.canceled);const r=e.modals.filter(o=>o.id!==t.modalId);return{current:r[r.length-1]||e.current,modals:r}}case"CLOSE_ALL":return e.modals.length?(e.modals.concat().reverse().forEach(n=>{fT(n,t.canceled)}),{current:e.current,modals:[]}):e;default:return e}}const[a0e,Kf]=KW("mantine-modals"),l0e=Kf("openModal"),c0e=Kf("closeModal"),u0e=Kf("closeAllModals"),d0e=Kf("openConfirmModal"),f0e=e=>Kf("openContextModal")(e),ke={open:l0e,close:c0e,closeAll:u0e,openConfirmModal:d0e,openContextModal:f0e};var p0e=Object.defineProperty,h0e=Object.defineProperties,m0e=Object.getOwnPropertyDescriptors,Iv=Object.getOwnPropertySymbols,W8=Object.prototype.hasOwnProperty,U8=Object.prototype.propertyIsEnumerable,pT=(e,t,n)=>t in e?p0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qh=(e,t)=>{for(var n in t||(t={}))W8.call(t,n)&&pT(e,n,t[n]);if(Iv)for(var n of Iv(t))U8.call(t,n)&&pT(e,n,t[n]);return e},hT=(e,t)=>h0e(e,m0e(t)),Qa=(e,t)=>{var n={};for(var r in e)W8.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&&U8.call(e,r)&&(n[r]=e[r]);return n};function g0e(e){if(!e)return{confirmProps:{},modalProps:{}};const t=e,{id:n,children:r,onCancel:o,onConfirm:i,closeOnConfirm:s,closeOnCancel:a,cancelProps:c,confirmProps:u,groupProps:f,labels:p}=t,g=Qa(t,["id","children","onCancel","onConfirm","closeOnConfirm","closeOnCancel","cancelProps","confirmProps","groupProps","labels"]);return{confirmProps:{id:n,children:r,onCancel:o,onConfirm:i,closeOnConfirm:s,closeOnCancel:a,cancelProps:c,confirmProps:u,groupProps:f,labels:p},modalProps:qh({id:n},g)}}function v0e({children:e,modalProps:t,labels:n,modals:r}){const[o,i]=_.useReducer(s0e,{modals:[],current:null}),s=_.useRef(o);s.current=o;const a=_.useCallback(P=>{i({type:"CLOSE_ALL",canceled:P})},[s,i]),c=_.useCallback(P=>{var x=P,{modalId:S}=x,O=Qa(x,["modalId"]);const E=S||zc();return i({type:"OPEN",modal:{id:E,type:"content",props:O}}),E},[i]),u=_.useCallback(P=>{var x=P,{modalId:S}=x,O=Qa(x,["modalId"]);const E=S||zc();return i({type:"OPEN",modal:{id:E,type:"confirm",props:O}}),E},[i]),f=_.useCallback((P,x)=>{var S=x,{modalId:O}=S,E=Qa(S,["modalId"]);const $=O||zc();return i({type:"OPEN",modal:{id:$,type:"context",props:E,ctx:P}}),$},[i]),p=_.useCallback((P,x)=>{i({type:"CLOSE",modalId:P,canceled:x})},[s,i]);a0e({openModal:c,openConfirmModal:u,openContextModal:P=>{var x=P,{modal:S}=x,O=Qa(x,["modal"]);return f(S,O)},closeModal:p,closeContextModal:p,closeAllModals:a});const g={modals:o.modals,openModal:c,openConfirmModal:u,openContextModal:f,closeModal:p,closeContextModal:p,closeAll:a},v=()=>{const P=s.current.current;switch(P?.type){case"context":{const x=P.props,{innerProps:S}=x,O=Qa(x,["innerProps"]),E=r[P.ctx];return{modalProps:O,content:k.createElement(E,{innerProps:S,context:g,id:P.id})}}case"confirm":{const{modalProps:x,confirmProps:S}=g0e(P.props);return{modalProps:x,content:k.createElement(i0e,hT(qh({},S),{id:P.id,labels:P.props.labels||n}))}}case"content":{const x=P.props,{children:S}=x;return{modalProps:Qa(x,["children"]),content:k.createElement(k.Fragment,null,S)}}default:return{modalProps:{},content:null}}},{modalProps:y,content:w}=v();return k.createElement(YP.Provider,{value:g},k.createElement(Ri,hT(qh(qh({zIndex:ii("modal")+1},t),y),{opened:o.modals.length>0,onClose:()=>p(o.current.id)}),w),e)}const[y0e,ja]=wu("RichTextEditor was not found in tree");function Ln(e){this.content=e}Ln.prototype={constructor:Ln,find:function(e){for(var t=0;t>1}};Ln.from=function(e){if(e instanceof Ln)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Ln(t)};function Z8(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=Z8(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function G8(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?sh(r+1,s):sh(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}};wt.none=[];class Lv 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=K8(this.content,t+this.openStart,n);return r&&new ye(r,this.openStart,this.openEnd)}removeBetween(t,n){return new ye(Y8(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 Y8(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(Y8(i.content,t-o-1,n-o-1)))}function K8(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=K8(s.content,t-i-1,n);return a&&e.replaceChild(o,s.copy(a))}function _0e(e,t,n){if(n.openStart>e.depth)throw new Lv("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Lv("Inconsistent open depths");return q8(e,t,n,0)}function q8(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 Ld(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&&(wl(e.nodeAfter,r),i++));for(let a=i;ao&&sx(e,t,o+1),s=r.depth>o&&sx(n,r,o+1),a=[];return Ld(null,e,o,a),i&&s&&t.index(o)==n.index(o)?(J8(i,s),wl(bl(i,X8(e,t,n,r,o+1)),a)):(i&&wl(bl(i,Dv(e,t,o+1)),a),Ld(t,n,o,a),s&&wl(bl(s,Dv(n,r,o+1)),a)),Ld(r,null,o,a),new se(a)}function Dv(e,t,n){let r=[];if(Ld(null,e,n,r),e.depth>n){let o=sx(e,t,n+1);wl(bl(o,Dv(e,t,n+1)),r)}return Ld(t,null,n,r),new se(r)}function w0e(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 mf{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 Rv(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 mf(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()+")"),Q8(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)}};xl.prototype.text=void 0;class zv extends xl{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):Q8(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 zv(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new zv(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 Q8(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class Tl{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new S0e(t,n);if(r.next==null)return Tl.empty;let o=e7(r);r.next&&r.err("Unexpected trailing text");let i=M0e($0e(o));return N0e(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(` +`)}}Tl.empty=new Tl(!0);class S0e{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 e7(e){let t=[];do t.push(P0e(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function P0e(e){let t=[];do t.push(O0e(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function O0e(e){let t=E0e(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=C0e(e,t);else break;return t}function mT(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function C0e(e,t){let n=mT(e),r=n;return e.eat(",")&&(e.next!="}"?r=mT(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function k0e(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 E0e(e){if(e.eat("(")){let t=e7(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=k0e(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 $0e(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 Tl(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 i7(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 T0e{constructor(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}get isRequired(){return!this.hasDefault}}class U0{constructor(t,n,r,o){this.name=t,this.rank=n,this.schema=r,this.spec=o,this.attrs=o7(o.attrs),this.excluded=null;let i=n7(this.attrs);this.instance=i?new wt(this,i):null}create(t=null){return!t&&this.instance?this.instance:new wt(this,r7(this.attrs,t))}static compile(t,n){let r=Object.create(null),o=0;return t.forEach((i,s)=>r[i]=new U0(i,o++,n,s)),r}removeFromSet(t){for(var n=0;n-1}}class I0e{constructor(t){this.cached=Object.create(null);let n=this.spec={};for(let o in t)n[o]=t[o];n.nodes=Ln.from(t.nodes),n.marks=Ln.from(t.marks||{}),this.nodes=vT.compile(this.spec.nodes,this),this.marks=U0.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]=Tl.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet=a=="_"?null:a?yT(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==""?[]:yT(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 vT){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 zv(r,r.defaultAttrs,t,wt.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeFromJSON(t){return xl.fromJSON(this,t)}markFromJSON(t){return wt.fromJSON(this,t)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}}function yT(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 du{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 wT(this,n,!1);return r.addAll(t,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new wT(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 du(t,du.schemaRules(t)))}}const s7={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},j0e={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},a7={ol:!0,ul:!0},Av=1,Bv=2,Dd=4;function _T(e,t,n){return t!=null?(t?Av:0)|(t==="full"?Bv:0):e&&e.whitespace=="pre"?Av|Bv:n&~Dd}class ah{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=wt.none,this.stashMarks=[],this.match=s||(a&Dd?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&Av)){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;nthis.addAll(t)),s&&this.sync(a),this.needsBlock=c}else this.withStyleRules(t,()=>{this.addElementByRule(t,i,i.consuming===!1?o:void 0)})}leafFallback(t){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(` -`))}ignoreFallback(t){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(t){let n=wt.none,r=wt.none;for(let o=0;o{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=A0e(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 L0e(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&a7.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function D0e(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function R0e(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 z0e(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&&$i.renderSpec(Q_(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:g,contentDOM:v}=$i.renderSpec(t,p,r);if(a.appendChild(g),v){if(s)throw new RangeError("Multiple content holes");s=v}}}return{dom:a,contentDOM:s}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new $i(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=xT(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return xT(t.marks)}}function xT(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function Q_(e){return e.document||window.document}const l7=65535,c7=Math.pow(2,16);function B0e(e,t){return e+t*c7}function ST(e){return e&l7}function F0e(e){return(e-(e&l7))/c7}const u7=1,d7=2,Xh=4,f7=8;class cx{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&f7)>0}get deletedBefore(){return(this.delInfo&(u7|Xh))>0}get deletedAfter(){return(this.delInfo&(d7|Xh))>0}get deletedAcross(){return(this.delInfo&Xh)>0}}class co{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&co.empty)return co.empty}recover(t){let n=0,r=ST(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 g=u?t==c?-1:t==p?1:n:n,v=c+o+(g<0?0:f);if(r)return v;let y=t==(n<0?c:p)?null:B0e(a/3,t-c),w=t==c?d7:t==p?u7:Xh;return(n<0?t!=c:t!=p)&&(w|=f7),new cx(v,w,y)}o+=f-u}return r?t+o:new cx(t+o,0,null)}touches(t,n){let r=0,o=ST(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 Gc;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 dn.fromReplace(t,this.from,this.to,i)}invert(){return new Mi(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 ea(n.pos,r.pos,this.mark)}merge(t){return t instanceof ea&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new ea(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 ea(n.from,n.to,t.markFromJSON(n.mark))}}sr.jsonID("addMark",ea);class Mi extends sr{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(KP(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),t),n.openStart,n.openEnd);return dn.fromReplace(t,this.from,this.to,r)}invert(){return new ea(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 Mi(n.pos,r.pos,this.mark)}merge(t){return t instanceof Mi&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Mi(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 Mi(n.from,n.to,t.markFromJSON(n.mark))}}sr.jsonID("removeMark",Mi);class ta extends sr{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return dn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return dn.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 En(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 En(n.from,n.to,n.gapFrom,n.gapTo,ye.fromJSON(t,n.slice),n.insert,!!n.structure)}}sr.jsonID("replaceAround",En);function ux(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 V0e(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 g=Math.max(u,t),v=Math.min(u+c.nodeSize,n),y=r.addToSet(p);for(let w=0;we.step(c)),i.forEach(c=>e.step(c))}function H0e(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 Z0){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 Mi(s.from,s.to,s.style)))}function W0e(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 U0e(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function $u(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--)w||r.index(y)>0?(w=!0,f=se.from(r.node(y).copy(f)),p++):c--;let g=se.empty,v=0;for(let y=i,w=!1;y>n;y--)w||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 En(o,i,o,i,new ye(r,0,0),n.length,!0))}function q0e(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)&&J0e(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 En(u,f,u+1,f-1,new ye(se.from(r.create(o,null,s.marks)),0,0),1,!0)),!1}})}function J0e(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function X0e(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 En(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new ye(se.from(s),0,0),1,!0))}function Yc(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),g=o.index(u);if(p.type.spec.isolating)return!1;let v=p.content.cutByIndex(g,p.childCount),y=r&&r[f+1];y&&(v=v.replaceChild(0,y.type.create(y.attrs)));let w=r&&r[f]||p;if(!p.canReplace(g+1,p.childCount)||!w.type.validContent(v))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 Q0e(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 zn(t,t,new ye(i.append(s),n,n),!0))}function La(e,t){let n=e.resolve(t),r=n.index();return p7(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function p7(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function G0(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&&p7(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 e1e(e,t,n){let r=new zn(t-n,t+n,ye.empty,!0);e.step(r)}function t1e(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 JP(e,t,n=t,r=ye.empty){if(t==n&&!r.size)return null;let o=e.resolve(t),i=e.resolve(n);return m7(o,i,r)?new zn(t,n,r):new n1e(o,i,r).fit()}function m7(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class n1e{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 En(r.pos,t,this.$to.pos,this.$to.end(),c,n):c.size||r.pos!=this.$to.pos?new zn(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=tw(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=tw(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=tw(t,n);if(o.childCount<=1&&n>0){let i=t.size-n<=n+o.size;this.unplaced=new ye(vd(t,n-1,1),n-1,i?n-1:r)}else this.unplaced=new ye(vd(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 w=0;w1||c==0||w.content.size)&&(p=P,f.push(g7(w.mark(g.allowedMarks(w.marks)),u==1?c:0,u==a.childCount?v:-1)))}let y=u==a.childCount;y||(v=-1),this.placed=yd(this.placed,n,se.from(f)),this.frontier[n].match=p,y&&v<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let w=0,P=a;w1&&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=nw(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=yd(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=yd(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=yd(this.placed,this.frontier.length,n))}}function vd(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(vd(e.firstChild.content,t-1,n)))}function yd(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(yd(e.lastChild.content,t-1,n)))}function tw(e,t){for(let n=0;n1&&(r=r.replaceChild(0,g7(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 nw(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&&!r1e(n,i.content,s)?a:null}function r1e(e,t,n){for(let r=n;r0;g--,v--){let y=o.node(g).type.spec;if(y.defining||y.definingAsContext||y.isolating)break;s.indexOf(g)>-1?a=g:o.before(g)==v&&s.splice(1,0,-g)}let c=s.indexOf(a),u=[],f=r.openStart;for(let g=r.content,v=0;;v++){let y=g.firstChild;if(u.push(y),v==r.openStart)break;g=y.content}for(let g=f-1;g>=0;g--){let v=u[g],y=o1e(v.type);if(y&&!v.sameMarkup(o.node(Math.abs(a)-1)))f=g;else if(y||!v.type.isTextblock)break}for(let g=r.openStart;g>=0;g--){let v=(g+f+1)%(r.openStart+1),y=u[v];if(y)for(let w=0;w=0&&(e.replace(t,n,r),!(e.steps.length>p));g--){let v=s[g];v<0||(t=o.before(v),n=i.after(v))}}function v7(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 s1e(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let o=t1e(e.doc,t,r.type);o!=null&&(t=n=o)}e.replaceRange(t,n,new ye(se.from(r),0,0))}function a1e(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),i=y7(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 y7(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 Kc extends sr{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 dn.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 dn.fromReplace(t,this.pos,this.pos+1,new ye(se.from(o),0,n.isLeaf?0:1))}getMap(){return co.empty}invert(t){return new Kc(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 Kc(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 Kc(n.pos,n.attr,n.value)}}sr.jsonID("attr",Kc);class vf extends sr{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let o in t.attrs)n[o]=t.attrs[o];n[this.attr]=this.value;let r=t.type.create(n,t.content,t.marks);return dn.ok(r)}getMap(){return co.empty}invert(t){return new vf(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new vf(n.attr,n.value)}}sr.jsonID("docAttr",vf);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 _7{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Gc}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=JP(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 i1e(this,t,n,r),this}replaceRangeWith(t,n,r){return s1e(this,t,n,r),this}deleteRange(t,n){return a1e(this,t,n),this}lift(t,n){return Z0e(this,t,n),this}join(t,n=1){return e1e(this,t,n),this}wrap(t,n){return K0e(this,t,n),this}setBlockType(t,n=t,r,o=null){return q0e(this,t,n,r,o),this}setNodeMarkup(t,n,r=null,o){return X0e(this,t,n,r,o),this}setNodeAttribute(t,n,r){return this.step(new Kc(t,n,r)),this}setDocAttribute(t,n){return this.step(new vf(t,n)),this}addNodeMark(t,n){return this.step(new ta(t,n)),this}removeNodeMark(t,n){if(!(n instanceof wt)){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 Q0e(this,t,n,r),this}addMark(t,n,r){return V0e(this,t,n,r),this}removeMark(t,n,r){return H0e(this,t,n,r),this}clearIncompatible(t,n,r){return W0e(this,t,n,r),this}}const rw=Object.create(null);class Ze{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new l1e(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 Qo(t.node(0))}static atStart(t){return hc(t,t,0,0,1)||new Qo(t)}static atEnd(t){return hc(t,t,t.content.size,t.childCount,-1)||new Qo(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=rw[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 rw)throw new RangeError("Duplicate use of selection JSON ID "+t);return rw[t]=n,n.prototype.jsonID=t,n}getBookmark(){return Ve.between(this.$anchor,this.$head).getBookmark()}}Ze.prototype.visible=!0;class l1e{constructor(t,n){this.$from=t,this.$to=n}}let OT=!1;function CT(e){!OT&&!e.parent.inlineContent&&(OT=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class Ve extends Ze{constructor(t,n=t){CT(t),CT(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 Ze.near(r);let o=t.resolve(n.map(this.anchor));return new Ve(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 Ve&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new Y0(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 Ve(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=Ze.findFrom(n,r,!0)||Ze.findFrom(n,-r,!0);if(i)n=i.$head;else return Ze.near(n,r)}return t.parent.inlineContent||(o==0?t=n:(t=(Ze.findFrom(t,-r,!0)||Ze.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&&Le.isSelectable(a))return Le.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 kT(e,t,n){let r=e.steps.length-1;if(r{s==null&&(s=f)}),e.setSelection(Ze.near(e.doc.resolve(s),n))}const ET=1,ch=2,$T=4;class u1e extends _7{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|=ch,this}ensureMarks(t){return wt.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&ch)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~ch,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)||wt.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(Ze.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|=$T,this}get scrolledIntoView(){return(this.updated&$T)>0}}function MT(e,t){return!t||!e?e:e.bind(t)}class _d{constructor(t,n,r){this.name=t,this.init=MT(n.init,r),this.apply=MT(n.apply,r)}}const d1e=[new _d("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new _d("selection",{init(e,t){return e.selection||Ze.atStart(t.doc)},apply(e){return e.selection}}),new _d("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new _d("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class ow{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=d1e.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 _d(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 ow(t.schema,t.plugins),i=new Mc(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=xl.fromJSON(t.schema,n.doc);else if(s.name=="selection")i.selection=Ze.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 w7(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):r=="handleDOMEvents"&&(o=w7(o,t,{})),n[r]=o}return n}class Zr{constructor(t){this.spec=t,this.props={},t.props&&w7(t.props,this,this.props),this.key=t.key?t.key.key:b7("plugin")}getState(t){return t[this.key]}}const iw=Object.create(null);function b7(e){return e in iw?e+"$"+ ++iw[e]:(iw[e]=0,e+"$")}class Ai{constructor(t="key"){this.key=b7(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const hr=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},yf=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let NT=null;const es=function(e,t,n){let r=NT||(NT=document.createRange());return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},Il=function(e,t,n,r){return n&&(TT(e,t,n,r,-1)||TT(e,t,n,r,1))},f1e=/^(img|br|input|textarea|hr)$/i;function TT(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:ki(e))){let i=e.parentNode;if(!i||i.nodeType!=1||QP(e)||f1e.test(e.nodeName)||e.contentEditable=="false")return!1;t=hr(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?ki(e):0}else return!1}}function ki(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function p1e(e,t,n){for(let r=t==0,o=t==ki(e);r||o;){if(e==n)return!0;let i=hr(e);if(e=e.parentNode,!e)return!1;r=r&&i==0,o=o&&i==ki(e)}}function QP(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 K0=function(e){return e.focusNode&&Il(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function tl(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function h1e(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function m1e(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:r.offset}}catch{}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:r.startOffset}}}const Di=typeof navigator<"u"?navigator:null,IT=typeof document<"u"?document:null,Da=Di&&Di.userAgent||"",dx=/Edge\/(\d+)/.exec(Da),x7=/MSIE \d/.exec(Da),fx=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Da),Hr=!!(x7||fx||dx),va=x7?document.documentMode:fx?+fx[1]:dx?+dx[1]:0,oi=!Hr&&/gecko\/(\d+)/i.test(Da);oi&&+(/Firefox\/(\d+)/.exec(Da)||[0,0])[1];const px=!Hr&&/Chrome\/(\d+)/.exec(Da),nr=!!px,g1e=px?+px[1]:0,yr=!Hr&&!!Di&&/Apple Computer/.test(Di.vendor),mu=yr&&(/Mobile\/\w+/.test(Da)||!!Di&&Di.maxTouchPoints>2),$o=mu||(Di?/Mac/.test(Di.platform):!1),v1e=Di?/Win/.test(Di.platform):!1,Ko=/Android \d/.test(Da),Jf=!!IT&&"webkitFontSmoothing"in IT.documentElement.style,y1e=Jf?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function _1e(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function qi(e,t){return typeof e=="number"?e:e[t]}function w1e(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 jT(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=yf(s)){if(s.nodeType!=1)continue;let a=s,c=a==i.body,u=c?_1e(i):w1e(a),f=0,p=0;if(t.topu.bottom-qi(r,"bottom")&&(p=t.bottom-t.top>u.bottom-u.top?t.top+qi(o,"top")-u.top:t.bottom-u.bottom+qi(o,"bottom")),t.leftu.right-qi(r,"right")&&(f=t.right-u.right+qi(o,"right")),f||p)if(c)i.defaultView.scrollBy(f,p);else{let g=a.scrollLeft,v=a.scrollTop;p&&(a.scrollTop+=p),f&&(a.scrollLeft+=f);let y=a.scrollLeft-g,w=a.scrollTop-v;t={left:t.left-y,top:t.top-w,right:t.right-y,bottom:t.bottom-w}}if(c||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function b1e(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:S7(e.dom)}}function S7(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=yf(r));return t}function x1e({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;P7(n,r==0?0:r-t)}function P7(e,t){for(let n=0;n=a){s=Math.max(y.bottom,s),a=Math.min(y.top,a);let w=y.left>t.left?y.left-t.left:y.right=(y.left+y.right)/2?1:0));continue}}else y.top>t.top&&!c&&y.left<=t.left&&y.right>=t.left&&(c=f,u={left:Math.max(y.left,Math.min(y.right,t.left)),top:y.top});!n&&(t.left>=y.right&&t.top>=y.top||t.left>=y.left&&t.top>=y.bottom)&&(i=p+1)}}return!n&&c&&(n=c,o=u,r=0),n&&n.nodeType==3?P1e(n,o):!n||r&&n.nodeType==1?{node:e,offset:i}:O7(n,o)}function P1e(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 eO(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function O1e(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 k1e(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 C7(e,t,n){let r=e.childNodes.length;if(r&&n.topt.top&&o++}let u;Jf&&o&&r.nodeType==1&&(u=r.childNodes[o-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=t.top&&o--,r==e.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?a=e.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(a=k1e(e,r,o,t))}a==null&&(a=C1e(e,s,t));let c=e.docView.nearestDesc(s,!0);return{pos:a,inside:c?c.posAtStart-c.border:-1}}function LT(e){return e.top=0&&o==r.nodeValue.length?(c--,f=1):n<0?c--:u++,ud(As(es(r,c,u),f),f<0)}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==ki(r))){let c=r.childNodes[o-1];if(c.nodeType==1)return sw(c.getBoundingClientRect(),!1)}if(i==null&&o=0)}if(i==null&&o&&(n<0||o==ki(r))){let c=r.childNodes[o-1],u=c.nodeType==3?es(c,ki(c)-(s?0:1)):c.nodeType==1&&(c.nodeName!="BR"||!c.nextSibling)?c:null;if(u)return ud(As(u,1),!1)}if(i==null&&o=0)}function ud(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 sw(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 E7(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 M1e(e,t,n){let r=t.selection,o=n=="up"?r.$from:r.$to;return E7(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=k7(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=es(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 N1e=/[\u0590-\u08ac]/;function T1e(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!N1e.test(r.parent.textContent)||!a.modify?n=="left"||n=="backward"?i:s:E7(e,t,()=>{let{focusNode:c,focusOffset:u,anchorNode:f,anchorOffset:p}=e.domSelectionRange(),g=a.caretBidiLevel;a.modify("move",n,"character");let v=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:y,focusOffset:w}=e.domSelectionRange(),P=y&&!v.contains(y.nodeType==1?y:y.parentNode)||c==y&&u==w;try{a.collapse(f,p),c&&(c!=f||u!=p)&&a.extend&&a.extend(c,u)}catch{}return g!=null&&(a.caretBidiLevel=g),P})}let DT=null,RT=null,zT=!1;function I1e(e,t,n){return DT==t&&RT==n?zT:(DT=t,RT=n,zT=n=="up"||n=="down"?M1e(e,t,n):T1e(e,t,n))}const Do=0,AT=1,dl=2,Ri=3;class Xf{constructor(t,n,r,o){this.parent=t,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=Do,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;nhr(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 M7){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 $7&&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?hr(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 g=this.children[p-1];if(g.size&&g.dom.parentNode==this.contentDOM&&!g.emptyChildAt(1)){o=hr(g.dom)+1;break}t-=g.size}o==-1&&(o=0)}if(o>-1&&(u>n||a==this.children.length-1)){n=u;for(let f=a+1;fv&&sn){let v=a;a=c,c=v}let g=document.createRange();g.setEnd(c.node,c.offset),g.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(g)}}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?dl:AT,t==a&&n==c&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Ri:i.markDirty(t-a,n-a);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?dl:Ri}r=s}this.dirty=dl}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?dl:AT;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==Do&&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 j1e extends Xf{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 jl extends Xf{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=$i.renderSpec(document,n.type.spec.toDOM(n,r))),new jl(t,n,s.dom,s.contentDOM||s.dom)}parseRule(){return this.dirty&Ri||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=Ri&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=Do){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty0&&(i=gx(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}=$i.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 g=f;return f=I7(f,r,n),u?c=new L1e(t,n,r,o,f,p||null,g,u,i,s+1):n.isText?new q0(t,n,r,o,f,g,i):new ya(t,n,r,o,f,p||null,g,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==Do&&t.eq(this.node)&&mx(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 R1e(this,s&&s.node,t);B1e(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?wt.none:this.node.child(f).marks,r,t),c.placeWidget(u,t,o)},(u,f,p,g)=>{c.syncToMarks(u.marks,r,t);let v;c.findNodeMatch(u,f,p,g)||a&&t.state.selection.from>o&&t.state.selection.to-1&&c.updateNodeAt(u,f,p,v,t)||c.updateNextNode(u,f,p,t,g,o)||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==dl)&&(s&&this.protectLocalComposition(t,s),N7(this.contentDOM,this.children,t),mu&&F1e(this.dom))}localCompositionInfo(t,n){let{from:r,to:o}=t.state.selection;if(!(t.state.selection instanceof Ve)||rn+this.node.content.size)return null;let i=t.domSelectionRange(),s=V1e(i.focusNode,i.focusOffset);if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let a=s.nodeValue,c=H1e(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 j1e(this,i,n,o);t.input.compositionNodes.push(s),this.children=gx(this.children,r,r+o.length,t,s)}update(t,n,r,o){return this.dirty==Ri||!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=Do}updateOuterDeco(t){if(mx(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=T7(this.dom,this.nodeDOM,hx(this.outerDeco,this.node,n),hx(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 BT(e,t,n,r,o){I7(r,t,e);let i=new ya(void 0,e,t,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class q0 extends ya{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==Ri||this.dirty!=Do&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Do||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=Do,!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 q0(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=Ri)}get domAtom(){return!1}}class M7 extends Xf{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==Do&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class L1e extends ya{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==Ri)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 N7(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=jl.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 jl)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 A1e(e,t){return e.type.side-t.type.side}function B1e(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 y=i+g.nodeSize;if(g.isText){let P=y;s!P.inline):a.slice();r(g,w,t.forChild(i,g),v),i=y}}function F1e(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 V1e(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=ki(e)}else if(e.nodeType==1&&t=n){if(i>=r&&c.slice(r-t.length-a,r-a)==t)return r-t.length;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 gx(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 tO(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(K0(n)){for(c=a;o&&!o.node;)o=o.parent;let f=o.node;if(o&&f.isAtom&&Le.isSelectable(f)&&o.parent&&!(f.isInline&&p1e(n.focusNode,n.focusOffset,o.dom))){let p=o.posBefore;u=new Le(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(()=>{(!j7(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function U1e(e){let t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o=r.nodeName=="IMG";o?n.setEnd(r.parentNode,hr(r)+1):n.setEnd(r,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&Hr&&va<=11&&(r.disabled=!0,r.disabled=!1)}function L7(e,t){if(t instanceof Le){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(UT(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else UT(e)}function UT(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function nO(e,t,n,r){return e.someProp("createSelectionBetween",o=>o(e,t,n))||Ve.between(t,n,r)}function ZT(e){return e.editable&&!e.hasFocus()?!1:D7(e)}function D7(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 Z1e(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Il(t.node,t.offset,n.anchorNode,n.anchorOffset)}function vx(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&&Ze.findFrom(i,t)}function nl(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function GT(e,t,n){let r=e.state.selection;if(r instanceof Ve){if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"forward":"backward")){let o=vx(e.state,t);return o&&o instanceof Le?nl(e,o):!1}else if(!($o&&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?Le.isSelectable(i)?nl(e,new Le(t<0?e.state.doc.resolve(o.pos-i.nodeSize):o)):Jf?nl(e,new Ve(e.state.doc.resolve(t<0?a:a+i.nodeSize))):!1:!1}}else{if(r instanceof Le&&r.node.isInline)return nl(e,new Ve(t>0?r.$to:r.$from));{let o=vx(e.state,t);return o?nl(e,o):!1}}}function Vv(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Ad(e,t){if(e.contentEditable=="false")return!0;let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function dc(e,t){return t<0?G1e(e):Y1e(e)}function G1e(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,s=!1;for(oi&&n.nodeType==1&&r0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(Ad(a,-1))o=n,i=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(R7(n))break;{let a=n.previousSibling;for(;a&&Ad(a,-1);)o=n.parentNode,i=hr(a),a=a.previousSibling;if(a)n=a,r=Vv(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?yx(e,n,r):o&&yx(e,o,i)}function Y1e(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o=Vv(n),i,s;for(;;)if(r{e.state==o&&ds(e)},50)}function YT(e,t){let n=e.state.doc.resolve(t);if(!(nr||v1e)&&n.parent.inlineContent){let o=e.coordsAtPos(t);if(t>n.start()){let i=e.coordsAtPos(t-1),s=(i.top+i.bottom)/2;if(s>o.top&&s1)return i.lefto.top&&s1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function KT(e,t,n){let r=e.state.selection;if(r instanceof Ve&&!r.empty||n.indexOf("s")>-1||$o&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=vx(e.state,t);if(s&&s instanceof Le)return nl(e,s)}if(!o.parent.inlineContent){let s=t<0?o:i,a=r instanceof Qo?Ze.near(s,t):Ze.findFrom(s,t);return a?nl(e,a):!1}return!1}function qT(e,t){if(!(e.state.selection instanceof Ve))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 JT(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function J1e(e){if(!yr||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;JT(e,r,"true"),setTimeout(()=>JT(e,r,"false"),20)}return!1}function X1e(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function Q1e(e,t){let n=t.keyCode,r=X1e(t);if(n==8||$o&&n==72&&r=="c")return qT(e,-1)||dc(e,-1);if(n==46&&!t.shiftKey||$o&&n==68&&r=="c")return qT(e,1)||dc(e,1);if(n==13||n==27)return!0;if(n==37||$o&&n==66&&r=="c"){let o=n==37?YT(e,e.state.selection.from)=="ltr"?-1:1:-1;return GT(e,o,r)||dc(e,o)}else if(n==39||$o&&n==70&&r=="c"){let o=n==39?YT(e,e.state.selection.from)=="ltr"?1:-1:1;return GT(e,o,r)||dc(e,o)}else{if(n==38||$o&&n==80&&r=="c")return KT(e,-1,r)||dc(e,-1);if(n==40||$o&&n==78&&r=="c")return J1e(e)||KT(e,1,r)||dc(e,1);if(r==($o?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function z7(e,t){e.someProp("transformCopied",v=>{t=v(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 v=r.firstChild;n.push(v.type.name,v.attrs!=v.type.defaultAttrs?v.attrs:null),r=v.content}let s=e.someProp("clipboardSerializer")||$i.fromSchema(e.state.schema),a=W7(),c=a.createElement("div");c.appendChild(s.serializeFragment(r,{document:a}));let u=c.firstChild,f,p=0;for(;u&&u.nodeType==1&&(f=H7[u.nodeName.toLowerCase()]);){for(let v=f.length-1;v>=0;v--){let y=a.createElement(f[v]);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 g=e.someProp("clipboardTextSerializer",v=>v(t,e))||t.content.textBetween(0,t.content.size,` +`))}ignoreFallback(t){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(t){let n=wt.none,r=wt.none;for(let o=0;o{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=A0e(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 L0e(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&a7.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function D0e(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function R0e(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 z0e(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&&Ei.renderSpec(X_(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:g,contentDOM:v}=Ei.renderSpec(t,p,r);if(a.appendChild(g),v){if(s)throw new RangeError("Multiple content holes");s=v}}}return{dom:a,contentDOM:s}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new Ei(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=xT(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return xT(t.marks)}}function xT(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function X_(e){return e.document||window.document}const l7=65535,c7=Math.pow(2,16);function B0e(e,t){return e+t*c7}function ST(e){return e&l7}function F0e(e){return(e-(e&l7))/c7}const u7=1,d7=2,Jh=4,f7=8;class lx{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&f7)>0}get deletedBefore(){return(this.delInfo&(u7|Jh))>0}get deletedAfter(){return(this.delInfo&(d7|Jh))>0}get deletedAcross(){return(this.delInfo&Jh)>0}}class co{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&co.empty)return co.empty}recover(t){let n=0,r=ST(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 g=u?t==c?-1:t==p?1:n:n,v=c+o+(g<0?0:f);if(r)return v;let y=t==(n<0?c:p)?null:B0e(a/3,t-c),w=t==c?d7:t==p?u7:Jh;return(n<0?t!=c:t!=p)&&(w|=f7),new lx(v,w,y)}o+=f-u}return r?t+o:new lx(t+o,0,null)}touches(t,n){let r=0,o=ST(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 dn.fromReplace(t,this.from,this.to,i)}invert(){return new $i(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 ea(n.pos,r.pos,this.mark)}merge(t){return t instanceof ea&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new ea(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 ea(n.from,n.to,t.markFromJSON(n.mark))}}sr.jsonID("addMark",ea);class $i extends sr{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(KP(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),t),n.openStart,n.openEnd);return dn.fromReplace(t,this.from,this.to,r)}invert(){return new ea(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 $i(n.pos,r.pos,this.mark)}merge(t){return t instanceof $i&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new $i(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 $i(n.from,n.to,t.markFromJSON(n.mark))}}sr.jsonID("removeMark",$i);class ta extends sr{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return dn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return dn.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 En(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 En(n.from,n.to,n.gapFrom,n.gapTo,ye.fromJSON(t,n.slice),n.insert,!!n.structure)}}sr.jsonID("replaceAround",En);function cx(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 V0e(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 g=Math.max(u,t),v=Math.min(u+c.nodeSize,n),y=r.addToSet(p);for(let w=0;we.step(c)),i.forEach(c=>e.step(c))}function H0e(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 U0){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 $i(s.from,s.to,s.style)))}function W0e(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 U0e(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Eu(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--)w||r.index(y)>0?(w=!0,f=se.from(r.node(y).copy(f)),p++):c--;let g=se.empty,v=0;for(let y=i,w=!1;y>n;y--)w||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 En(o,i,o,i,new ye(r,0,0),n.length,!0))}function q0e(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)&&J0e(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 En(u,f,u+1,f-1,new ye(se.from(r.create(o,null,s.marks)),0,0),1,!0)),!1}})}function J0e(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function X0e(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 En(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new ye(se.from(s),0,0),1,!0))}function Gc(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),g=o.index(u);if(p.type.spec.isolating)return!1;let v=p.content.cutByIndex(g,p.childCount),y=r&&r[f+1];y&&(v=v.replaceChild(0,y.type.create(y.attrs)));let w=r&&r[f]||p;if(!p.canReplace(g+1,p.childCount)||!w.type.validContent(v))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 Q0e(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 zn(t,t,new ye(i.append(s),n,n),!0))}function La(e,t){let n=e.resolve(t),r=n.index();return p7(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function p7(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function Z0(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&&p7(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 e1e(e,t,n){let r=new zn(t-n,t+n,ye.empty,!0);e.step(r)}function t1e(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 JP(e,t,n=t,r=ye.empty){if(t==n&&!r.size)return null;let o=e.resolve(t),i=e.resolve(n);return m7(o,i,r)?new zn(t,n,r):new n1e(o,i,r).fit()}function m7(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class n1e{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 En(r.pos,t,this.$to.pos,this.$to.end(),c,n):c.size||r.pos!=this.$to.pos?new zn(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=ew(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=ew(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=ew(t,n);if(o.childCount<=1&&n>0){let i=t.size-n<=n+o.size;this.unplaced=new ye(gd(t,n-1,1),n-1,i?n-1:r)}else this.unplaced=new ye(gd(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 w=0;w1||c==0||w.content.size)&&(p=P,f.push(g7(w.mark(g.allowedMarks(w.marks)),u==1?c:0,u==a.childCount?v:-1)))}let y=u==a.childCount;y||(v=-1),this.placed=vd(this.placed,n,se.from(f)),this.frontier[n].match=p,y&&v<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let w=0,P=a;w1&&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=tw(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=vd(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=vd(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=vd(this.placed,this.frontier.length,n))}}function gd(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(gd(e.firstChild.content,t-1,n)))}function vd(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(vd(e.lastChild.content,t-1,n)))}function ew(e,t){for(let n=0;n1&&(r=r.replaceChild(0,g7(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 tw(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&&!r1e(n,i.content,s)?a:null}function r1e(e,t,n){for(let r=n;r0;g--,v--){let y=o.node(g).type.spec;if(y.defining||y.definingAsContext||y.isolating)break;s.indexOf(g)>-1?a=g:o.before(g)==v&&s.splice(1,0,-g)}let c=s.indexOf(a),u=[],f=r.openStart;for(let g=r.content,v=0;;v++){let y=g.firstChild;if(u.push(y),v==r.openStart)break;g=y.content}for(let g=f-1;g>=0;g--){let v=u[g],y=o1e(v.type);if(y&&!v.sameMarkup(o.node(Math.abs(a)-1)))f=g;else if(y||!v.type.isTextblock)break}for(let g=r.openStart;g>=0;g--){let v=(g+f+1)%(r.openStart+1),y=u[v];if(y)for(let w=0;w=0&&(e.replace(t,n,r),!(e.steps.length>p));g--){let v=s[g];v<0||(t=o.before(v),n=i.after(v))}}function v7(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 s1e(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let o=t1e(e.doc,t,r.type);o!=null&&(t=n=o)}e.replaceRange(t,n,new ye(se.from(r),0,0))}function a1e(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),i=y7(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 y7(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 Yc extends sr{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 dn.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 dn.fromReplace(t,this.pos,this.pos+1,new ye(se.from(o),0,n.isLeaf?0:1))}getMap(){return co.empty}invert(t){return new Yc(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 Yc(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 Yc(n.pos,n.attr,n.value)}}sr.jsonID("attr",Yc);class gf extends sr{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let o in t.attrs)n[o]=t.attrs[o];n[this.attr]=this.value;let r=t.type.create(n,t.content,t.marks);return dn.ok(r)}getMap(){return co.empty}invert(t){return new gf(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new gf(n.attr,n.value)}}sr.jsonID("docAttr",gf);let pu=class extends Error{};pu=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};pu.prototype=Object.create(Error.prototype);pu.prototype.constructor=pu;pu.prototype.name="TransformError";class _7{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 pu(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=JP(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 i1e(this,t,n,r),this}replaceRangeWith(t,n,r){return s1e(this,t,n,r),this}deleteRange(t,n){return a1e(this,t,n),this}lift(t,n){return Z0e(this,t,n),this}join(t,n=1){return e1e(this,t,n),this}wrap(t,n){return K0e(this,t,n),this}setBlockType(t,n=t,r,o=null){return q0e(this,t,n,r,o),this}setNodeMarkup(t,n,r=null,o){return X0e(this,t,n,r,o),this}setNodeAttribute(t,n,r){return this.step(new Yc(t,n,r)),this}setDocAttribute(t,n){return this.step(new gf(t,n)),this}addNodeMark(t,n){return this.step(new ta(t,n)),this}removeNodeMark(t,n){if(!(n instanceof wt)){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 fu(t,n)),this}split(t,n=1,r){return Q0e(this,t,n,r),this}addMark(t,n,r){return V0e(this,t,n,r),this}removeMark(t,n,r){return H0e(this,t,n,r),this}clearIncompatible(t,n,r){return W0e(this,t,n,r),this}}const nw=Object.create(null);class Ze{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new l1e(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 Qo(t.node(0))}static atStart(t){return hc(t,t,0,0,1)||new Qo(t)}static atEnd(t){return hc(t,t,t.content.size,t.childCount,-1)||new Qo(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=nw[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 nw)throw new RangeError("Duplicate use of selection JSON ID "+t);return nw[t]=n,n.prototype.jsonID=t,n}getBookmark(){return Ve.between(this.$anchor,this.$head).getBookmark()}}Ze.prototype.visible=!0;class l1e{constructor(t,n){this.$from=t,this.$to=n}}let OT=!1;function CT(e){!OT&&!e.parent.inlineContent&&(OT=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class Ve extends Ze{constructor(t,n=t){CT(t),CT(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 Ze.near(r);let o=t.resolve(n.map(this.anchor));return new Ve(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 Ve&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new G0(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 Ve(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=Ze.findFrom(n,r,!0)||Ze.findFrom(n,-r,!0);if(i)n=i.$head;else return Ze.near(n,r)}return t.parent.inlineContent||(o==0?t=n:(t=(Ze.findFrom(t,-r,!0)||Ze.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&&Le.isSelectable(a))return Le.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 kT(e,t,n){let r=e.steps.length-1;if(r{s==null&&(s=f)}),e.setSelection(Ze.near(e.doc.resolve(s),n))}const ET=1,lh=2,$T=4;class u1e extends _7{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|=lh,this}ensureMarks(t){return wt.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&lh)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~lh,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)||wt.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(Ze.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|=$T,this}get scrolledIntoView(){return(this.updated&$T)>0}}function MT(e,t){return!t||!e?e:e.bind(t)}class yd{constructor(t,n,r){this.name=t,this.init=MT(n.init,r),this.apply=MT(n.apply,r)}}const d1e=[new yd("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new yd("selection",{init(e,t){return e.selection||Ze.atStart(t.doc)},apply(e){return e.selection}}),new yd("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new yd("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class rw{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=d1e.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 yd(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 rw(t.schema,t.plugins),i=new Mc(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=xl.fromJSON(t.schema,n.doc);else if(s.name=="selection")i.selection=Ze.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 w7(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):r=="handleDOMEvents"&&(o=w7(o,t,{})),n[r]=o}return n}class Zr{constructor(t){this.spec=t,this.props={},t.props&&w7(t.props,this,this.props),this.key=t.key?t.key.key:b7("plugin")}getState(t){return t[this.key]}}const ow=Object.create(null);function b7(e){return e in ow?e+"$"+ ++ow[e]:(ow[e]=0,e+"$")}class zi{constructor(t="key"){this.key=b7(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const hr=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},vf=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let NT=null;const es=function(e,t,n){let r=NT||(NT=document.createRange());return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},Il=function(e,t,n,r){return n&&(TT(e,t,n,r,-1)||TT(e,t,n,r,1))},f1e=/^(img|br|input|textarea|hr)$/i;function TT(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:Ci(e))){let i=e.parentNode;if(!i||i.nodeType!=1||QP(e)||f1e.test(e.nodeName)||e.contentEditable=="false")return!1;t=hr(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?Ci(e):0}else return!1}}function Ci(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function p1e(e,t,n){for(let r=t==0,o=t==Ci(e);r||o;){if(e==n)return!0;let i=hr(e);if(e=e.parentNode,!e)return!1;r=r&&i==0,o=o&&i==Ci(e)}}function QP(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 Y0=function(e){return e.focusNode&&Il(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function tl(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function h1e(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function m1e(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:r.offset}}catch{}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:r.startOffset}}}const Li=typeof navigator<"u"?navigator:null,IT=typeof document<"u"?document:null,Da=Li&&Li.userAgent||"",ux=/Edge\/(\d+)/.exec(Da),x7=/MSIE \d/.exec(Da),dx=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Da),Hr=!!(x7||dx||ux),va=x7?document.documentMode:dx?+dx[1]:ux?+ux[1]:0,oi=!Hr&&/gecko\/(\d+)/i.test(Da);oi&&+(/Firefox\/(\d+)/.exec(Da)||[0,0])[1];const fx=!Hr&&/Chrome\/(\d+)/.exec(Da),nr=!!fx,g1e=fx?+fx[1]:0,yr=!Hr&&!!Li&&/Apple Computer/.test(Li.vendor),hu=yr&&(/Mobile\/\w+/.test(Da)||!!Li&&Li.maxTouchPoints>2),$o=hu||(Li?/Mac/.test(Li.platform):!1),v1e=Li?/Win/.test(Li.platform):!1,Ko=/Android \d/.test(Da),qf=!!IT&&"webkitFontSmoothing"in IT.documentElement.style,y1e=qf?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function _1e(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Ki(e,t){return typeof e=="number"?e:e[t]}function w1e(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 jT(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=vf(s)){if(s.nodeType!=1)continue;let a=s,c=a==i.body,u=c?_1e(i):w1e(a),f=0,p=0;if(t.topu.bottom-Ki(r,"bottom")&&(p=t.bottom-t.top>u.bottom-u.top?t.top+Ki(o,"top")-u.top:t.bottom-u.bottom+Ki(o,"bottom")),t.leftu.right-Ki(r,"right")&&(f=t.right-u.right+Ki(o,"right")),f||p)if(c)i.defaultView.scrollBy(f,p);else{let g=a.scrollLeft,v=a.scrollTop;p&&(a.scrollTop+=p),f&&(a.scrollLeft+=f);let y=a.scrollLeft-g,w=a.scrollTop-v;t={left:t.left-y,top:t.top-w,right:t.right-y,bottom:t.bottom-w}}if(c||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function b1e(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:S7(e.dom)}}function S7(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=vf(r));return t}function x1e({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;P7(n,r==0?0:r-t)}function P7(e,t){for(let n=0;n=a){s=Math.max(y.bottom,s),a=Math.min(y.top,a);let w=y.left>t.left?y.left-t.left:y.right=(y.left+y.right)/2?1:0));continue}}else y.top>t.top&&!c&&y.left<=t.left&&y.right>=t.left&&(c=f,u={left:Math.max(y.left,Math.min(y.right,t.left)),top:y.top});!n&&(t.left>=y.right&&t.top>=y.top||t.left>=y.left&&t.top>=y.bottom)&&(i=p+1)}}return!n&&c&&(n=c,o=u,r=0),n&&n.nodeType==3?P1e(n,o):!n||r&&n.nodeType==1?{node:e,offset:i}:O7(n,o)}function P1e(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 eO(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function O1e(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 k1e(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 C7(e,t,n){let r=e.childNodes.length;if(r&&n.topt.top&&o++}let u;qf&&o&&r.nodeType==1&&(u=r.childNodes[o-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=t.top&&o--,r==e.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?a=e.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(a=k1e(e,r,o,t))}a==null&&(a=C1e(e,s,t));let c=e.docView.nearestDesc(s,!0);return{pos:a,inside:c?c.posAtStart-c.border:-1}}function LT(e){return e.top=0&&o==r.nodeValue.length?(c--,f=1):n<0?c--:u++,cd(As(es(r,c,u),f),f<0)}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==Ci(r))){let c=r.childNodes[o-1];if(c.nodeType==1)return iw(c.getBoundingClientRect(),!1)}if(i==null&&o=0)}if(i==null&&o&&(n<0||o==Ci(r))){let c=r.childNodes[o-1],u=c.nodeType==3?es(c,Ci(c)-(s?0:1)):c.nodeType==1&&(c.nodeName!="BR"||!c.nextSibling)?c:null;if(u)return cd(As(u,1),!1)}if(i==null&&o=0)}function cd(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 iw(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 E7(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 M1e(e,t,n){let r=t.selection,o=n=="up"?r.$from:r.$to;return E7(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=k7(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=es(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 N1e=/[\u0590-\u08ac]/;function T1e(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!N1e.test(r.parent.textContent)||!a.modify?n=="left"||n=="backward"?i:s:E7(e,t,()=>{let{focusNode:c,focusOffset:u,anchorNode:f,anchorOffset:p}=e.domSelectionRange(),g=a.caretBidiLevel;a.modify("move",n,"character");let v=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:y,focusOffset:w}=e.domSelectionRange(),P=y&&!v.contains(y.nodeType==1?y:y.parentNode)||c==y&&u==w;try{a.collapse(f,p),c&&(c!=f||u!=p)&&a.extend&&a.extend(c,u)}catch{}return g!=null&&(a.caretBidiLevel=g),P})}let DT=null,RT=null,zT=!1;function I1e(e,t,n){return DT==t&&RT==n?zT:(DT=t,RT=n,zT=n=="up"||n=="down"?M1e(e,t,n):T1e(e,t,n))}const Do=0,AT=1,dl=2,Di=3;class Jf{constructor(t,n,r,o){this.parent=t,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=Do,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;nhr(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 M7){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 $7&&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?hr(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 g=this.children[p-1];if(g.size&&g.dom.parentNode==this.contentDOM&&!g.emptyChildAt(1)){o=hr(g.dom)+1;break}t-=g.size}o==-1&&(o=0)}if(o>-1&&(u>n||a==this.children.length-1)){n=u;for(let f=a+1;fv&&sn){let v=a;a=c,c=v}let g=document.createRange();g.setEnd(c.node,c.offset),g.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(g)}}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?dl:AT,t==a&&n==c&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Di:i.markDirty(t-a,n-a);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?dl:Di}r=s}this.dirty=dl}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?dl:AT;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==Do&&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 j1e extends Jf{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 jl extends Jf{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=Ei.renderSpec(document,n.type.spec.toDOM(n,r))),new jl(t,n,s.dom,s.contentDOM||s.dom)}parseRule(){return this.dirty&Di||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=Di&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=Do){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty0&&(i=mx(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}=Ei.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 g=f;return f=I7(f,r,n),u?c=new L1e(t,n,r,o,f,p||null,g,u,i,s+1):n.isText?new K0(t,n,r,o,f,g,i):new ya(t,n,r,o,f,p||null,g,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==Do&&t.eq(this.node)&&hx(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 R1e(this,s&&s.node,t);B1e(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?wt.none:this.node.child(f).marks,r,t),c.placeWidget(u,t,o)},(u,f,p,g)=>{c.syncToMarks(u.marks,r,t);let v;c.findNodeMatch(u,f,p,g)||a&&t.state.selection.from>o&&t.state.selection.to-1&&c.updateNodeAt(u,f,p,v,t)||c.updateNextNode(u,f,p,t,g,o)||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==dl)&&(s&&this.protectLocalComposition(t,s),N7(this.contentDOM,this.children,t),hu&&F1e(this.dom))}localCompositionInfo(t,n){let{from:r,to:o}=t.state.selection;if(!(t.state.selection instanceof Ve)||rn+this.node.content.size)return null;let i=t.domSelectionRange(),s=V1e(i.focusNode,i.focusOffset);if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let a=s.nodeValue,c=H1e(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 j1e(this,i,n,o);t.input.compositionNodes.push(s),this.children=mx(this.children,r,r+o.length,t,s)}update(t,n,r,o){return this.dirty==Di||!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=Do}updateOuterDeco(t){if(hx(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=T7(this.dom,this.nodeDOM,px(this.outerDeco,this.node,n),px(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 BT(e,t,n,r,o){I7(r,t,e);let i=new ya(void 0,e,t,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class K0 extends ya{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==Di||this.dirty!=Do&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Do||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=Do,!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 K0(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=Di)}get domAtom(){return!1}}class M7 extends Jf{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==Do&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class L1e extends ya{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==Di)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 N7(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=jl.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 jl)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 A1e(e,t){return e.type.side-t.type.side}function B1e(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 y=i+g.nodeSize;if(g.isText){let P=y;s!P.inline):a.slice();r(g,w,t.forChild(i,g),v),i=y}}function F1e(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 V1e(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=Ci(e)}else if(e.nodeType==1&&t=n){if(i>=r&&c.slice(r-t.length-a,r-a)==t)return r-t.length;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 mx(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 tO(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(Y0(n)){for(c=a;o&&!o.node;)o=o.parent;let f=o.node;if(o&&f.isAtom&&Le.isSelectable(f)&&o.parent&&!(f.isInline&&p1e(n.focusNode,n.focusOffset,o.dom))){let p=o.posBefore;u=new Le(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(()=>{(!j7(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function U1e(e){let t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o=r.nodeName=="IMG";o?n.setEnd(r.parentNode,hr(r)+1):n.setEnd(r,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&Hr&&va<=11&&(r.disabled=!0,r.disabled=!1)}function L7(e,t){if(t instanceof Le){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(UT(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else UT(e)}function UT(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function nO(e,t,n,r){return e.someProp("createSelectionBetween",o=>o(e,t,n))||Ve.between(t,n,r)}function ZT(e){return e.editable&&!e.hasFocus()?!1:D7(e)}function D7(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 Z1e(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Il(t.node,t.offset,n.anchorNode,n.anchorOffset)}function gx(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&&Ze.findFrom(i,t)}function nl(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function GT(e,t,n){let r=e.state.selection;if(r instanceof Ve){if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"forward":"backward")){let o=gx(e.state,t);return o&&o instanceof Le?nl(e,o):!1}else if(!($o&&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?Le.isSelectable(i)?nl(e,new Le(t<0?e.state.doc.resolve(o.pos-i.nodeSize):o)):qf?nl(e,new Ve(e.state.doc.resolve(t<0?a:a+i.nodeSize))):!1:!1}}else{if(r instanceof Le&&r.node.isInline)return nl(e,new Ve(t>0?r.$to:r.$from));{let o=gx(e.state,t);return o?nl(e,o):!1}}}function Fv(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function zd(e,t){if(e.contentEditable=="false")return!0;let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function dc(e,t){return t<0?G1e(e):Y1e(e)}function G1e(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,s=!1;for(oi&&n.nodeType==1&&r0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(zd(a,-1))o=n,i=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(R7(n))break;{let a=n.previousSibling;for(;a&&zd(a,-1);)o=n.parentNode,i=hr(a),a=a.previousSibling;if(a)n=a,r=Fv(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?vx(e,n,r):o&&vx(e,o,i)}function Y1e(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o=Fv(n),i,s;for(;;)if(r{e.state==o&&ds(e)},50)}function YT(e,t){let n=e.state.doc.resolve(t);if(!(nr||v1e)&&n.parent.inlineContent){let o=e.coordsAtPos(t);if(t>n.start()){let i=e.coordsAtPos(t-1),s=(i.top+i.bottom)/2;if(s>o.top&&s1)return i.lefto.top&&s1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function KT(e,t,n){let r=e.state.selection;if(r instanceof Ve&&!r.empty||n.indexOf("s")>-1||$o&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=gx(e.state,t);if(s&&s instanceof Le)return nl(e,s)}if(!o.parent.inlineContent){let s=t<0?o:i,a=r instanceof Qo?Ze.near(s,t):Ze.findFrom(s,t);return a?nl(e,a):!1}return!1}function qT(e,t){if(!(e.state.selection instanceof Ve))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 JT(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function J1e(e){if(!yr||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;JT(e,r,"true"),setTimeout(()=>JT(e,r,"false"),20)}return!1}function X1e(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function Q1e(e,t){let n=t.keyCode,r=X1e(t);if(n==8||$o&&n==72&&r=="c")return qT(e,-1)||dc(e,-1);if(n==46&&!t.shiftKey||$o&&n==68&&r=="c")return qT(e,1)||dc(e,1);if(n==13||n==27)return!0;if(n==37||$o&&n==66&&r=="c"){let o=n==37?YT(e,e.state.selection.from)=="ltr"?-1:1:-1;return GT(e,o,r)||dc(e,o)}else if(n==39||$o&&n==70&&r=="c"){let o=n==39?YT(e,e.state.selection.from)=="ltr"?1:-1:1;return GT(e,o,r)||dc(e,o)}else{if(n==38||$o&&n==80&&r=="c")return KT(e,-1,r)||dc(e,-1);if(n==40||$o&&n==78&&r=="c")return J1e(e)||KT(e,1,r)||dc(e,1);if(r==($o?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function z7(e,t){e.someProp("transformCopied",v=>{t=v(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 v=r.firstChild;n.push(v.type.name,v.attrs!=v.type.defaultAttrs?v.attrs:null),r=v.content}let s=e.someProp("clipboardSerializer")||Ei.fromSchema(e.state.schema),a=W7(),c=a.createElement("div");c.appendChild(s.serializeFragment(r,{document:a}));let u=c.firstChild,f,p=0;for(;u&&u.nodeType==1&&(f=H7[u.nodeName.toLowerCase()]);){for(let v=f.length-1;v>=0;v--){let y=a.createElement(f[v]);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 g=e.someProp("clipboardTextSerializer",v=>v(t,e))||t.content.textBetween(0,t.content.size,` `);return{dom:c,text:g}}function A7(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",g=>{t=g(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",g=>g(t,o,r,e));if(p)a=p;else{let g=o.marks(),{schema:v}=e.state,y=$i.fromSchema(v);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(w=>{let P=s.appendChild(document.createElement("p"));w&&P.appendChild(y.serializeNode(v.text(w,g)))})}}else e.someProp("transformPastedHTML",p=>{n=p(n,e)}),s=n_e(n),Jf&&r_e(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 g=s.firstChild;for(;g&&g.nodeType!=1;)g=g.nextSibling;if(!g)break;s=g}if(a||(a=(e.someProp("clipboardParser")||e.someProp("domParser")||fu.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(c||f),context:o,ruleFromNode(g){return g.nodeName=="BR"&&!g.nextSibling&&g.parentNode&&!e_e.test(g.parentNode.nodeName)?{ignore:!0}:null}})),f)a=o_e(XT(a,+f[1],+f[2]),f[4]);else if(a=ye.maxOpen(t_e(a.content,o),!0),a.openStart||a.openEnd){let p=0,g=0;for(let v=a.content.firstChild;p{a=p(a,e)}),a}const e_e=/^(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 t_e(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&&F7(c,i,a,s[s.length-1],0))s[s.length-1]=u;else{s.length&&(s[s.length-1]=V7(s[s.length-1],i.length));let f=B7(a,c);s.push(f),o=o.matchType(f.type),i=c}}),s)return se.from(s)}return e}function B7(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,se.from(e));return e}function F7(e,t,n,r,o){if(o1&&(i=0),o=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,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 XT(e,t,n){return t]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=W7().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),o;if((o=r&&H7[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 _r={},wr={},i_e={touchstart:!0,touchmove:!0};class s_e{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.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function a_e(e){for(let t in _r){let n=_r[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{c_e(e,r)&&!rO(e,r)&&(e.editable||!(r.type in wr))&&n(e,r)},i_e[t]?{passive:!0}:void 0)}yr&&e.dom.addEventListener("input",()=>null),wx(e)}function na(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function l_e(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 wx(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>rO(e,r))})}function rO(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function c_e(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 u_e(e,t){!rO(e,t)&&_r[t.type]&&(e.editable||!(t.type in wr))&&_r[t.type](e,t)}wr.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!Z7(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(Ko&&nr&&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,tl(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||Q1e(e,n)?n.preventDefault():na(e,"key")};wr.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};wr.keypress=(e,t)=>{let n=t;if(Z7(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||$o&&n.metaKey)return;if(e.someProp("handleKeyPress",o=>o(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof Ve)||!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 J0(e){return{left:e.clientX,top:e.clientY}}function d_e(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function oO(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 f_e(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&Le.isSelectable(r)?(qc(e,new Le(n),"pointer"),!0):!1}function p_e(e,t){if(t==-1)return!1;let n=e.state.selection,r,o;n instanceof Le&&(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(Le.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,Le.create(e.state.doc,o),"pointer"),!0):!1}function h_e(e,t,n,r,o){return oO(e,"handleClickOn",t,n,r)||e.someProp("handleClick",i=>i(e,t,r))||(o?p_e(e,n):f_e(e,n))}function m_e(e,t,n,r){return oO(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",o=>o(e,t,r))}function g_e(e,t,n,r){return oO(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",o=>o(e,t,r))||v_e(e,n,r)}function v_e(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(qc(e,Ve.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,Ve.create(r,a+1,a+1+s.content.size),"pointer");else if(Le.isSelectable(s))qc(e,Le.create(r,a),"pointer");else continue;return!0}}function iO(e){return Hv(e)}const U7=$o?"metaKey":"ctrlKey";_r.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=iO(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&d_e(n,e.input.lastClick)&&!n[U7]&&(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(J0(n));s&&(i=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new y_e(e,s,n,!!r)):(i=="doubleClick"?m_e:g_e)(e,s.pos,s.inside,n)?n.preventDefault():na(e,"pointer"))};class y_e{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[U7],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 Le&&u.from<=s&&u.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&oi&&!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)),na(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(()=>ds(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(J0(t))),this.updateAllowDefault(t),this.allowDefault||!n?na(this.view,"pointer"):h_e(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||yr&&this.mightDrag&&!this.mightDrag.node.isAtom||nr&&!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,Ze.near(this.view.state.doc.resolve(n.pos)),"pointer"),t.preventDefault()):na(this.view,"pointer")}move(t){this.updateAllowDefault(t),na(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)}}_r.touchstart=e=>{e.input.lastTouch=Date.now(),iO(e),na(e,"pointer")};_r.touchmove=e=>{e.input.lastTouch=Date.now(),na(e,"pointer")};_r.contextmenu=e=>iO(e);function Z7(e,t){return e.composing?!0:yr&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const __e=Ko?5e3:-1;wr.compositionstart=wr.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(),Hv(e,!0),e.markCursor=null;else if(Hv(e),oi&&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}G7(e,__e)};wr.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,G7(e,20))};function G7(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>Hv(e),t))}function Y7(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=w_e());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function w_e(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function Hv(e,t=!1){if(!(Ko&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),Y7(e),t||e.docView&&e.docView.dirty){let n=tO(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}}function b_e(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=Hr&&va<15||mu&&y1e<604;_r.copy=wr.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}=z7(e,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",c)):b_e(e,a),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function x_e(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function S_e(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();let o=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?_f(e,r.value,null,o,t):_f(e,r.textContent,r.innerHTML,o,t)},50)}function _f(e,t,n,r,o){let i=A7(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=x_e(i),a=s?e.state.tr.replaceSelectionWith(s,r):e.state.tr.replaceSelection(i);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}wr.paste=(e,t)=>{let n=t;if(e.composing&&!Ko)return;let r=gu?null:n.clipboardData,o=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&_f(e,r.getData("text/plain"),r.getData("text/html"),o,n)?n.preventDefault():S_e(e,n)};class P_e{constructor(t,n){this.slice=t,this.move=n}}const K7=$o?"altKey":"ctrlKey";_r.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(J0(n));if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof Le?o.to-1:o.to))){if(r&&r.mightDrag)e.dispatch(e.state.tr.setSelection(Le.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(Le.create(e.state.doc,u.posBefore)))}}let s=e.state.selection.content(),{dom:a,text:c}=z7(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 P_e(s,!n[K7])};_r.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};wr.dragover=wr.dragenter=(e,t)=>t.preventDefault();wr.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let o=e.posAtCoords(J0(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=A7(e,n.dataTransfer.getData(gu?"Text":"text/plain"),gu?null:n.dataTransfer.getData("text/html"),!1,i);let a=!!(r&&!n[K7]);if(e.someProp("handleDrop",y=>y(e,n,s||ye.empty,a))){n.preventDefault();return}if(!s)return;n.preventDefault();let c=s?h7(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,g=u.doc;if(p?u.replaceRangeWith(f,f,s.content.firstChild):u.replaceRange(f,f,s),u.doc.eq(g))return;let v=u.doc.resolve(f);if(p&&Le.isSelectable(s.content.firstChild)&&v.nodeAfter&&v.nodeAfter.sameMarkup(s.content.firstChild))u.setSelection(new Le(v));else{let y=u.mapping.map(c);u.mapping.maps[u.mapping.maps.length-1].forEach((w,P,x,S)=>y=S),u.setSelection(nO(e,v,u.doc.resolve(y)))}e.focus(),e.dispatch(u.setMeta("uiEvent","drop"))};_r.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())&&ds(e)},20))};_r.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)};_r.beforeinput=(e,t)=>{if(nr&&Ko&&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,tl(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 wr)_r[e]=wr[e];function wf(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 Wv{constructor(t,n){this.toDOM=t,this.spec=n||Sl,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 jo(i-r,i-r,this)}valid(){return!0}eq(t){return this==t||t instanceof Wv&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&wf(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class _a{constructor(t,n){this.attrs=t,this.spec=n||Sl}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 jo(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==Qn||t.maps.length==0?this:this.mapInner(t,n,0,0,r||Sl)}mapInner(t,n,r,o,i){let s;for(let a=0;a{let u=c+r,f;if(f=J7(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 _a){let u=Math.max(i,c.from)-i,f=Math.min(s,c.to)-i;uo.map(t,n,Sl));return Ys.from(r)}forChild(t,n){if(n.isLeaf)return gn.empty;let r=[];for(let o=0;on instanceof gn)?t:t.reduce((n,r)=>n.concat(r instanceof gn?r:r.members),[]))}}}function O_e(e,t,n,r,o,i,s){let a=e.slice();for(let u=0,f=i;u{let P=w-y-(v-g);for(let x=0;xS+f-p)continue;let O=a[x]+f-p;v>=O?a[x+1]=g<=O?-2:-1:y>=o&&P&&(a[x]+=P,a[x+1]+=P)}p+=P}),f=n.maps[u].map(f,-1)}let c=!1;for(let u=0;u=r.content.size){c=!0;continue}let g=n.map(e[u+1]+i,-1),v=g-o,{index:y,offset:w}=r.content.findIndex(p),P=r.maybeChild(y);if(P&&w==p&&w+P.nodeSize==v){let x=a[u+2].mapInner(n,P,f+1,e[u]+i+1,s);x!=Qn?(a[u]=p,a[u+1]=v,a[u+2]=x):(a[u+1]=-2,c=!0)}else c=!0}if(c){let u=C_e(a,e,t,n,o,i,s),f=Uv(u,r,0,s);t=f.local;for(let p=0;pn&&s.to{let u=J7(e,a,c+n);if(u){i=!0;let f=Uv(u,a,n+c+1,r);f!=Qn&&o.push(c,c+a.nodeSize,f)}});let s=q7(i?X7(e):e,-n).sort(Pl);for(let a=0;a0;)t++;e.splice(t,0,n)}function lw(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=Qn&&t.push(r)}),e.cursorWrapper&&t.push(gn.create(e.state.doc,[e.cursorWrapper.deco])),Ys.from(t)}const k_e={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},E_e=Hr&&va<=11;class $_e{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 M_e{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new $_e,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()}),E_e&&(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,k_e)),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(ZT(this.view)){if(this.suppressingSelectionUpdates)return ds(this.view);if(Hr&&va<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Il(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=yf(i))n.add(i);for(let i=t.anchorNode;i;i=yf(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}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&ZT(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],g=f[1];p.parentNode&&p.parentNode.parentNode==g.parentNode?g.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),N_e(t)),this.handleDOMChange(i,s,a,c),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||ds(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;P--){let x=r.childNodes[P-1],S=x.pmViewDesc;if(x.nodeName=="BR"&&!S){i=P;break}if(!S||S.size)break}let p=e.state.doc,g=e.someProp("domParser")||fu.fromSchema(e.state.schema),v=p.resolve(s),y=null,w=g.parse(r,{topNode:v.parent,topMatch:v.parent.contentMatchAt(v.index()),topOpen:!0,from:o,to:i,preserveWhitespace:v.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:j_e,context:v});if(u&&u[0].pos!=null){let P=u[0].pos,x=u[1]&&u[1].pos;x==null&&(x=P),y={anchor:P+s,head:x+s}}return{doc:w,sel:y,from:s,to:a}}function j_e(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(yr&&/^(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||yr&&/^(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 L_e=/^(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 D_e(e,t,n,r,o){let i=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let B=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,z=tO(e,B);if(z&&!e.state.selection.eq(z)){if(nr&&Ko&&e.input.lastKeyCode===13&&Date.now()-100X(e,tl(13,"Enter"))))return;let G=e.state.tr.setSelection(z);B=="pointer"?G.setMeta("pointer",!0):B=="key"&&G.scrollIntoView(),i&&G.setMeta("composition",i),e.dispatch(G)}return}let s=e.state.doc.resolve(t),a=s.sharedDepth(n);t=s.before(a+1),n=e.state.doc.resolve(n).after(a+1);let c=e.state.selection,u=I_e(e,t,n),f=e.state.doc,p=f.slice(u.from,u.to),g,v;e.input.lastKeyCode===8&&Date.now()-100Date.now()-225||Ko)&&o.some(B=>B.nodeType==1&&!L_e.test(B.nodeName))&&(!y||y.endA>=y.endB)&&e.someProp("handleKeyDown",B=>B(e,tl(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!y)if(r&&c instanceof Ve&&!c.empty&&c.$head.sameParent(c.$anchor)&&!e.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))y={start:c.from,endA:c.to,endB:c.to};else{if(u.sel){let B=rI(e,e.state.doc,u.sel);if(B&&!B.eq(e.state.selection)){let z=e.state.tr.setSelection(B);i&&z.setMeta("composition",i),e.dispatch(z)}}return}if(nr&&e.cursorWrapper&&u.sel&&u.sel.anchor==e.cursorWrapper.deco.from&&u.sel.head==u.sel.anchor){let B=y.endB-y.start;u.sel={anchor:u.sel.anchor+B,head:u.sel.anchor+B}}e.input.domChangeCount++,e.state.selection.frome.state.selection.from&&y.start<=e.state.selection.from+2&&e.state.selection.from>=u.from?y.start=e.state.selection.from:y.endA=e.state.selection.to-2&&e.state.selection.to<=u.to&&(y.endB+=e.state.selection.to-y.endA,y.endA=e.state.selection.to)),Hr&&va<=11&&y.endB==y.start+1&&y.endA==y.start&&y.start>u.from&&u.doc.textBetween(y.start-u.from-1,y.start-u.from+1)=="  "&&(y.start--,y.endA--,y.endB--);let w=u.doc.resolveNoCache(y.start-u.from),P=u.doc.resolveNoCache(y.endB-u.from),x=f.resolve(y.start),S=w.sameParent(P)&&w.parent.inlineContent&&x.end()>=y.endA,O;if((mu&&e.input.lastIOSEnter>Date.now()-225&&(!S||o.some(B=>B.nodeName=="DIV"||B.nodeName=="P"))||!S&&w.posB(e,tl(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>y.start&&z_e(f,y.start,y.endA,w,P)&&e.someProp("handleKeyDown",B=>B(e,tl(8,"Backspace")))){Ko&&nr&&e.domObserver.suppressSelectionUpdates();return}nr&&Ko&&y.endB==y.start&&(e.input.lastAndroidDelete=Date.now()),Ko&&!S&&w.start()!=P.start()&&P.parentOffset==0&&w.depth==P.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==y.endA&&(y.endB-=2,P=u.doc.resolveNoCache(y.endB-u.from),setTimeout(()=>{e.someProp("handleKeyDown",function(B){return B(e,tl(13,"Enter"))})},20));let E=y.start,$=y.endA,N,I,R;if(S){if(w.pos==P.pos)Hr&&va<=11&&w.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>ds(e),20)),N=e.state.tr.delete(E,$),I=f.resolve(y.start).marksAcross(f.resolve(y.endA));else if(y.endA==y.endB&&(R=R_e(w.parent.content.cut(w.parentOffset,P.parentOffset),x.parent.content.cut(x.parentOffset,y.endA-x.start()))))N=e.state.tr,R.type=="add"?N.addMark(E,$,R.mark):N.removeMark(E,$,R.mark);else if(w.parent.child(w.index()).isText&&w.index()==P.index()-(P.textOffset?0:1)){let B=w.parent.textBetween(w.parentOffset,P.parentOffset);if(e.someProp("handleTextInput",z=>z(e,E,$,B)))return;N=e.state.tr.insertText(B,E,$)}}if(N||(N=e.state.tr.replace(E,$,u.doc.slice(y.start-u.from,y.endB-u.from))),u.sel){let B=rI(e,N.doc,u.sel);B&&!(nr&&Ko&&e.composing&&B.empty&&(y.start!=y.endB||e.input.lastAndroidDeletet.content.size?null:nO(e,t.resolve(n.anchor),t.resolve(n.head))}function R_e(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||cw(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 A_e(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 B_e{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 s_e,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(lI),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=sI(this),iI(this),this.nodeViews=aI(this),this.docView=BT(this.state.doc,oI(this),lw(this),this.dom,this),this.domObserver=new M_e(this,(r,o,i,s)=>D_e(this,r,o,i,s)),this.domObserver.start(),a_e(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&&wx(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(lI),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&&(Y7(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 g=aI(this);V_e(g,this.nodeViews)&&(this.nodeViews=g,o=!0)}(s||n.handleDOMEvents!=this._props.handleDOMEvents)&&wx(this),this.editable=sI(this),iI(this);let a=lw(this),c=oI(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&&b1e(this);if(i){this.domObserver.stop();let g=f&&(Hr||nr)&&!this.composing&&!r.selection.empty&&!t.selection.empty&&F_e(r.selection,t.selection);if(f){let v=nr?this.trackWrites=this.domSelectionRange().focusNode:null;(o||!this.docView.update(t.doc,c,a,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=BT(t.doc,c,a,this.dom,this)),v&&!this.trackWrites&&(g=!0)}g||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&Z1e(this))?ds(this,g):(L7(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(r),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():p&&x1e(p)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof Le){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&jT(this,n.getBoundingClientRect(),t)}else jT(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}updateRoot(){this._root=null}posAtCoords(t){return E1e(this,t)}coordsAtPos(t,n=1){return k7(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 I1e(this,n||this.state,t)}pasteHTML(t,n){return _f(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return _f(this,t,null,!0,n||new ClipboardEvent("paste"))}destroy(){this.docView&&(l_e(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],lw(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 u_e(this,t)}dispatch(t){let n=this._props.dispatchTransaction;n?n.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){return yr&&this.root.nodeType===11&&h1e(this.dom.ownerDocument)==this.dom?T_e(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function oI(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),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]))}),t.translate||(t.translate="no"),[jo.node(0,e.state.doc.content.size,t)]}function iI(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:jo.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function sI(e){return!e.someProp("editable",t=>t(e.state)===!1)}function F_e(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 aI(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 V_e(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 lI(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 Ca={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:"'"},Zv={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},H_e=typeof navigator<"u"&&/Mac/.test(navigator.platform),W_e=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var An=0;An<10;An++)Ca[48+An]=Ca[96+An]=String(An);for(var An=1;An<=24;An++)Ca[An+111]="F"+An;for(var An=65;An<=90;An++)Ca[An]=String.fromCharCode(An+32),Zv[An]=String.fromCharCode(An);for(var uw in Ca)Zv.hasOwnProperty(uw)||(Zv[uw]=Ca[uw]);function U_e(e){var t=H_e&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||W_e&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?Zv:Ca)[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 Z_e=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function G_e(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,o,i,s;for(let a=0;a127)&&(i=Ca[r.keyCode])&&i!=o){let a=t[dw(i,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}const q_e=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function J_e(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}const X_e=(e,t,n)=>{let r=J_e(e,n);if(!r)return!1;let o=e9(r);if(!o){let s=r.blockRange(),a=s&&$u(s);return a==null?!1:(t&&t(e.tr.lift(s,a).scrollIntoView()),!0)}let i=o.nodeBefore;if(!i.type.spec.isolating&&r9(e,o,t))return!0;if(r.parent.content.size==0&&(vu(i,"end")||Le.isSelectable(i))){let s=JP(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=e9(r)}let s=i&&i.nodeBefore;return!s||!Le.isSelectable(s)?!1:(t&&t(e.tr.setSelection(Le.create(e.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function e9(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 ewe(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset{let r=ewe(e,n);if(!r)return!1;let o=t9(r);if(!o)return!1;let i=o.nodeAfter;if(r9(e,o,t))return!0;if(r.parent.content.size==0&&(vu(i,"start")||Le.isSelectable(i))){let s=JP(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 Le,o;if(r){if(n.node.isTextblock||!La(e.doc,n.from))return!1;o=n.from}else if(o=G0(e.doc,n.from,-1),o==null)return!1;if(t){let i=e.tr.join(o);r&&i.setSelection(Le.create(i.doc,o-e.doc.resolve(o).nodeBefore.nodeSize)),t(i.scrollIntoView())}return!0},owe=(e,t)=>{let n=e.selection,r;if(n instanceof Le){if(n.node.isTextblock||!La(e.doc,n.to))return!1;r=n.to}else if(r=G0(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},iwe=(e,t)=>{let{$from:n,$to:r}=e.selection,o=n.blockRange(r),i=o&&$u(o);return i==null?!1:(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)},swe=(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 n9(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=n9(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(Ze.near(c.doc.resolve(a),1)),t(c.scrollIntoView())}return!0},lwe=(e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof Qo||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=n9(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(Yc(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&$u(r);return o==null?!1:(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)},uwe=(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(Le.create(e.doc,o))),!0)};function dwe(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||La(e.doc,t.pos))?!1:(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),!0)}function r9(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,i,s;if(r.type.spec.isolating||o.type.spec.isolating)return!1;if(dwe(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,g=se.empty;for(let w=i.length-1;w>=0;w--)g=se.from(i[w].create(null,g));g=se.from(r.copy(g));let v=e.tr.step(new En(t.pos-1,p,t.pos,p,new ye(g,1,0),i.length,!0)),y=p+2*i.length;La(v.doc,y)&&v.join(y),n(v.scrollIntoView())}return!0}let c=Ze.findFrom(t,1),u=c&&c.$from.blockRange(c.$to),f=u&&$u(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,g=[];for(;g.push(p),!p.isTextblock;)p=p.lastChild;let v=o,y=1;for(;!v.isTextblock;v=v.firstChild)y++;if(p.canReplace(p.childCount,p.childCount,v.content)){if(n){let w=se.empty;for(let x=g.length-1;x>=0;x--)w=se.from(g[x].copy(w));let P=e.tr.step(new En(t.pos-g.length,t.pos+o.nodeSize,t.pos+y,t.pos+o.nodeSize-y,new ye(w,g.length,0),0,!0));n(P.scrollIntoView())}return!0}}return!1}function o9(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(Ve.create(t.doc,e<0?o.start(i):o.end(i)))),!0):!1}}const fwe=o9(-1),pwe=o9(1);function hwe(e,t=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),a=s&&qP(s,e,t);return a?(r&&r(n.tr.wrap(s,a).scrollIntoView()),!0):!1}}function cI(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 zv(f,f,s.depth),s.endIndex=0;f--)i=se.from(n[f].type.create(n[f].attrs,i));e.step(new En(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?ywe(t,n,e,i):_we(t,n,i):!0:!1}}function ywe(e,t,n,r){let o=e.tr,i=r.end,s=r.$to.end(r.depth);iw;y--)v-=o.child(y).nodeSize,r.delete(v-1,v+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,g=p+s.nodeSize;return r.step(new En(p-(a?1:0),g+(c?1:0),p+1,g-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 wwe(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),g=i.start,v=i.end;n(t.tr.step(new En(g-(u?3:1),v,g,v,p,1,!0)).scrollIntoView())}return!0}}function X0(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 Q0{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(g=>g===!0)),p={...Object.fromEntries(Object.entries(r).map(([g,v])=>[g,(...w)=>{const P=this.buildProps(u,n),x=v(...w)(P);return a.push(x),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,a={tr:t,editor:o,view:s,state:X0({state:i,transaction:t}),dispatch:n?()=>{}:void 0,chain:()=>this.createChain(t,n),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(r).map(([c,u])=>[c,(...f)=>u(...f)(a)]))}};return a}}class bwe{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 Ce(e,t,n){return e.config[t]===void 0&&e.parent?Ce(e.parent,t,n):typeof e.config[t]=="function"?e.config[t].bind({...n,parent:e.parent?Ce(e.parent,t,n):null}):e.config[t]}function e1(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 i9(e){const t=[],{nodeExtensions:n,markExtensions:r}=e1(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=Ce(s,"addGlobalAttributes",a);if(!c)return;c().forEach(f=>{f.types.forEach(p=>{Object.entries(f.attributes).forEach(([g,v])=>{t.push({type:p,name:g,attribute:{...i,...v}})})})})}),o.forEach(s=>{const a={name:s.name,options:s.options,storage:s.storage},c=Ce(s,"addAttributes",a);if(!c)return;const u=c();Object.entries(u).forEach(([f,p])=>{const g={...i,...p};typeof g?.default=="function"&&(g.default=g.default()),g?.isRequired&&g?.default===void 0&&delete g.default,t.push({type:s.name,name:f,attribute:g})})}),t}function Mn(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 Et(...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}if(o==="class"){const a=i?i.split(" "):[],c=r[o]?r[o].split(" "):[],u=a.filter(f=>!c.includes(f));r[o]=[...c,...u].join(" ")}else o==="style"?r[o]=[r[o],i].join("; "):r[o]=i}),r},{})}function bx(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)=>Et(n,r),{})}function s9(e){return typeof e=="function"}function Ue(e,t=void 0,...n){return s9(e)?t?e.bind(t)(...n):e(...n):e}function xwe(e={}){return Object.keys(e).length===0&&e.constructor===Object}function Swe(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function uI(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):Swe(n.getAttribute(s.name));return a==null?i:{...i,[s.name]:a}},{});return{...r,...o}}}}function dI(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>t==="attrs"&&xwe(n)?!1:n!=null))}function Pwe(e,t){var n;const r=i9(e),{nodeExtensions:o,markExtensions:i}=e1(e),s=(n=o.find(u=>Ce(u,"topNode")))===null||n===void 0?void 0:n.name,a=Object.fromEntries(o.map(u=>{const f=r.filter(x=>x.type===u.name),p={name:u.name,options:u.options,storage:u.storage,editor:t},g=e.reduce((x,S)=>{const O=Ce(S,"extendNodeSchema",p);return{...x,...O?O(u):{}}},{}),v=dI({...g,content:Ue(Ce(u,"content",p)),marks:Ue(Ce(u,"marks",p)),group:Ue(Ce(u,"group",p)),inline:Ue(Ce(u,"inline",p)),atom:Ue(Ce(u,"atom",p)),selectable:Ue(Ce(u,"selectable",p)),draggable:Ue(Ce(u,"draggable",p)),code:Ue(Ce(u,"code",p)),defining:Ue(Ce(u,"defining",p)),isolating:Ue(Ce(u,"isolating",p)),attrs:Object.fromEntries(f.map(x=>{var S;return[x.name,{default:(S=x?.attribute)===null||S===void 0?void 0:S.default}]}))}),y=Ue(Ce(u,"parseHTML",p));y&&(v.parseDOM=y.map(x=>uI(x,f)));const w=Ce(u,"renderHTML",p);w&&(v.toDOM=x=>w({node:x,HTMLAttributes:bx(x,f)}));const P=Ce(u,"renderText",p);return P&&(v.toText=P),[u.name,v]})),c=Object.fromEntries(i.map(u=>{const f=r.filter(P=>P.type===u.name),p={name:u.name,options:u.options,storage:u.storage,editor:t},g=e.reduce((P,x)=>{const S=Ce(x,"extendMarkSchema",p);return{...P,...S?S(u):{}}},{}),v=dI({...g,inclusive:Ue(Ce(u,"inclusive",p)),excludes:Ue(Ce(u,"excludes",p)),group:Ue(Ce(u,"group",p)),spanning:Ue(Ce(u,"spanning",p)),code:Ue(Ce(u,"code",p)),attrs:Object.fromEntries(f.map(P=>{var x;return[P.name,{default:(x=P?.attribute)===null||x===void 0?void 0:x.default}]}))}),y=Ue(Ce(u,"parseHTML",p));y&&(v.parseDOM=y.map(P=>uI(P,f)));const w=Ce(u,"renderHTML",p);return w&&(v.toDOM=P=>w({mark:P,HTMLAttributes:bx(P,f)})),[u.name,v]}));return new I0e({topNode:s,nodes:a,marks:c})}function fw(e,t){return t.nodes[e]||t.marks[e]||null}function fI(e,t){return Array.isArray(t)?t.some(n=>(typeof n=="string"?n:n.name)===e.name):t}const Owe=(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 lO(e){return Object.prototype.toString.call(e)==="[object RegExp]"}class t1{constructor(t){this.find=t.find,this.handler=t.handler}}const Cwe=(e,t)=>{if(lO(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 pw(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(g=>g.type.spec.code))return!1;let f=!1;const p=Owe(u)+i;return s.forEach(g=>{if(f)return;const v=Cwe(p,g.find);if(!v)return;const y=c.state.tr,w=X0({state:c.state,transaction:y}),P={from:r-(v[0].length-i.length),to:o},{commands:x,chain:S,can:O}=new Q0({editor:n,state:w});g.handler({state:w,range:P,match:v,commands:x,chain:S,can:O})===null||!y.steps.length||(y.setMeta(a,{transform:y,from:r,to:o,text:i}),c.dispatch(y),f=!0)}),f}function kwe(e){const{editor:t,rules:n}=e,r=new Zr({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 pw({editor:t,from:i,to:s,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:i}=o.state.selection;i&&pw({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?pw({editor:t,from:s.pos,to:s.pos,text:` -`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function Ewe(e){return typeof e=="number"}class $we{constructor(t){this.find=t.find,this.handler=t.handler}}const Mwe=(e,t)=>{if(lO(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 Nwe(e){const{editor:t,state:n,from:r,to:o,rule:i,pasteEvent:s,dropEvent:a}=e,{commands:c,chain:u,can:f}=new Q0({editor:t,state:n}),p=[];return n.doc.nodesBetween(r,o,(v,y)=>{if(!v.isTextblock||v.type.spec.code)return;const w=Math.max(r,y),P=Math.min(o,y+v.content.size),x=v.textBetween(w-y,P-y,void 0,"");Mwe(x,i.find).forEach(O=>{if(O.index===void 0)return;const E=w+O.index+1,$=E+O[0].length,N={from:n.tr.mapping.map(E),to:n.tr.mapping.map($)},I=i.handler({state:n,range:N,match:O,commands:c,chain:u,can:f,pasteEvent:s,dropEvent:a});p.push(I)})}),p.every(v=>v!==null)}function Twe(e){const{editor:t,rules:n}=e;let r=null,o=!1,i=!1,s=new ClipboardEvent("paste"),a=new DragEvent("drop");return n.map(u=>new Zr({view(f){const p=g=>{var v;r=!((v=f.dom.parentElement)===null||v===void 0)&&v.contains(g.target)?f.dom.parentElement:null};return window.addEventListener("dragstart",p),{destroy(){window.removeEventListener("dragstart",p)}}},props:{handleDOMEvents:{drop:(f,p)=>(i=r===f.dom.parentElement,a=p,!1),paste:(f,p)=>{var g;const v=(g=p.clipboardData)===null||g===void 0?void 0:g.getData("text/html");return s=p,o=!!v?.includes("data-pm-slice"),!1}}},appendTransaction:(f,p,g)=>{const v=f[0],y=v.getMeta("uiEvent")==="paste"&&!o,w=v.getMeta("uiEvent")==="drop"&&!i;if(!y&&!w)return;const P=p.doc.content.findDiffStart(g.doc.content),x=p.doc.content.findDiffEnd(g.doc.content);if(!Ewe(P)||!x||P===x.b)return;const S=g.tr,O=X0({state:g,transaction:S});if(!(!Nwe({editor:t,state:O,from:Math.max(P-1,0),to:x.b-1,rule:u,pasteEvent:s,dropEvent:a})||!S.steps.length))return a=new DragEvent("drop"),s=new ClipboardEvent("paste"),S}}))}function Iwe(e){const t=e.filter((n,r)=>e.indexOf(n)!==r);return[...new Set(t)]}class Nc{constructor(t,n){this.splittableMarks=[],this.editor=n,this.extensions=Nc.resolve(t),this.schema=Pwe(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:fw(r.name,this.schema)};r.type==="mark"&&(!((o=Ue(Ce(r,"keepOnSplit",i)))!==null&&o!==void 0)||o)&&this.splittableMarks.push(r.name);const s=Ce(r,"onBeforeCreate",i);s&&this.editor.on("beforeCreate",s);const a=Ce(r,"onCreate",i);a&&this.editor.on("create",a);const c=Ce(r,"onUpdate",i);c&&this.editor.on("update",c);const u=Ce(r,"onSelectionUpdate",i);u&&this.editor.on("selectionUpdate",u);const f=Ce(r,"onTransaction",i);f&&this.editor.on("transaction",f);const p=Ce(r,"onFocus",i);p&&this.editor.on("focus",p);const g=Ce(r,"onBlur",i);g&&this.editor.on("blur",g);const v=Ce(r,"onDestroy",i);v&&this.editor.on("destroy",v)})}static resolve(t){const n=Nc.sort(Nc.flatten(t)),r=Iwe(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=Ce(n,"addExtensions",r);return o?[n,...this.flatten(o())]:n}).flat(10)}static sort(t){return t.sort((r,o)=>{const i=Ce(r,"priority")||100,s=Ce(o,"priority")||100;return i>s?-1:i{const r={name:n.name,options:n.options,storage:n.storage,editor:this.editor,type:fw(n.name,this.schema)},o=Ce(n,"addCommands",r);return o?{...t,...o()}:t},{})}get plugins(){const{editor:t}=this,n=Nc.sort([...this.extensions].reverse()),r=[],o=[],i=n.map(s=>{const a={name:s.name,options:s.options,storage:s.storage,editor:t,type:fw(s.name,this.schema)},c=[],u=Ce(s,"addKeyboardShortcuts",a);let f={};if(s.type==="mark"&&s.config.exitable&&(f.ArrowRight=()=>or.handleExit({editor:t,mark:s})),u){const w=Object.fromEntries(Object.entries(u()).map(([P,x])=>[P,()=>x({editor:t})]));f={...f,...w}}const p=K_e(f);c.push(p);const g=Ce(s,"addInputRules",a);fI(s,t.options.enableInputRules)&&g&&r.push(...g());const v=Ce(s,"addPasteRules",a);fI(s,t.options.enablePasteRules)&&v&&o.push(...v());const y=Ce(s,"addProseMirrorPlugins",a);if(y){const w=y();c.push(...w)}return c}).flat();return[kwe({editor:t,rules:r}),...Twe({editor:t,rules:o}),...i]}get attributes(){return i9(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:n}=e1(this.extensions);return Object.fromEntries(n.filter(r=>!!Ce(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:Mn(r.name,this.schema)},s=Ce(r,"addNodeView",i);if(!s)return[];const a=(c,u,f,p)=>{const g=bx(c,o);return s()({editor:t,node:c,getPos:f,decorations:p,HTMLAttributes:g,extension:r})};return[r.name,a]}))}}function jwe(e){return Object.prototype.toString.call(e).slice(8,-1)}function hw(e){return jwe(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function n1(e,t){const n={...e};return hw(e)&&hw(t)&&Object.keys(t).forEach(r=>{hw(t[r])?r in e?n[r]=n1(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Object.assign(n,{[r]:t[r]})}),n}class br{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=Ue(Ce(this,"addOptions",{name:this.name}))),this.storage=Ue(Ce(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new br(t)}configure(t={}){const n=this.extend();return n.options=n1(this.options,t),n.storage=Ue(Ce(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=Ue(Ce(n,"addOptions",{name:n.name})),n.storage=Ue(Ce(n,"addStorage",{name:n.name,options:n.options})),n}}function a9(e,t,n){const{from:r,to:o}=t,{blockSeparator:i=` +`))),0,0):ye.empty;let p=e.someProp("clipboardTextParser",g=>g(t,o,r,e));if(p)a=p;else{let g=o.marks(),{schema:v}=e.state,y=Ei.fromSchema(v);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(w=>{let P=s.appendChild(document.createElement("p"));w&&P.appendChild(y.serializeNode(v.text(w,g)))})}}else e.someProp("transformPastedHTML",p=>{n=p(n,e)}),s=n_e(n),qf&&r_e(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 g=s.firstChild;for(;g&&g.nodeType!=1;)g=g.nextSibling;if(!g)break;s=g}if(a||(a=(e.someProp("clipboardParser")||e.someProp("domParser")||du.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(c||f),context:o,ruleFromNode(g){return g.nodeName=="BR"&&!g.nextSibling&&g.parentNode&&!e_e.test(g.parentNode.nodeName)?{ignore:!0}:null}})),f)a=o_e(XT(a,+f[1],+f[2]),f[4]);else if(a=ye.maxOpen(t_e(a.content,o),!0),a.openStart||a.openEnd){let p=0,g=0;for(let v=a.content.firstChild;p{a=p(a,e)}),a}const e_e=/^(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 t_e(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&&F7(c,i,a,s[s.length-1],0))s[s.length-1]=u;else{s.length&&(s[s.length-1]=V7(s[s.length-1],i.length));let f=B7(a,c);s.push(f),o=o.matchType(f.type),i=c}}),s)return se.from(s)}return e}function B7(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,se.from(e));return e}function F7(e,t,n,r,o){if(o1&&(i=0),o=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,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 XT(e,t,n){return t]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=W7().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),o;if((o=r&&H7[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 _r={},wr={},i_e={touchstart:!0,touchmove:!0};class s_e{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.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function a_e(e){for(let t in _r){let n=_r[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{c_e(e,r)&&!rO(e,r)&&(e.editable||!(r.type in wr))&&n(e,r)},i_e[t]?{passive:!0}:void 0)}yr&&e.dom.addEventListener("input",()=>null),_x(e)}function na(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function l_e(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 _x(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>rO(e,r))})}function rO(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function c_e(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 u_e(e,t){!rO(e,t)&&_r[t.type]&&(e.editable||!(t.type in wr))&&_r[t.type](e,t)}wr.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!Z7(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(Ko&&nr&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),hu&&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,tl(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||Q1e(e,n)?n.preventDefault():na(e,"key")};wr.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};wr.keypress=(e,t)=>{let n=t;if(Z7(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||$o&&n.metaKey)return;if(e.someProp("handleKeyPress",o=>o(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof Ve)||!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 q0(e){return{left:e.clientX,top:e.clientY}}function d_e(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function oO(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 Kc(e,t,n){e.focused||e.focus();let r=e.state.tr.setSelection(t);n=="pointer"&&r.setMeta("pointer",!0),e.dispatch(r)}function f_e(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&Le.isSelectable(r)?(Kc(e,new Le(n),"pointer"),!0):!1}function p_e(e,t){if(t==-1)return!1;let n=e.state.selection,r,o;n instanceof Le&&(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(Le.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?(Kc(e,Le.create(e.state.doc,o),"pointer"),!0):!1}function h_e(e,t,n,r,o){return oO(e,"handleClickOn",t,n,r)||e.someProp("handleClick",i=>i(e,t,r))||(o?p_e(e,n):f_e(e,n))}function m_e(e,t,n,r){return oO(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",o=>o(e,t,r))}function g_e(e,t,n,r){return oO(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",o=>o(e,t,r))||v_e(e,n,r)}function v_e(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(Kc(e,Ve.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)Kc(e,Ve.create(r,a+1,a+1+s.content.size),"pointer");else if(Le.isSelectable(s))Kc(e,Le.create(r,a),"pointer");else continue;return!0}}function iO(e){return Vv(e)}const U7=$o?"metaKey":"ctrlKey";_r.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=iO(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&d_e(n,e.input.lastClick)&&!n[U7]&&(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(q0(n));s&&(i=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new y_e(e,s,n,!!r)):(i=="doubleClick"?m_e:g_e)(e,s.pos,s.inside,n)?n.preventDefault():na(e,"pointer"))};class y_e{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[U7],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 Le&&u.from<=s&&u.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&oi&&!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)),na(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(()=>ds(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(q0(t))),this.updateAllowDefault(t),this.allowDefault||!n?na(this.view,"pointer"):h_e(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||yr&&this.mightDrag&&!this.mightDrag.node.isAtom||nr&&!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)?(Kc(this.view,Ze.near(this.view.state.doc.resolve(n.pos)),"pointer"),t.preventDefault()):na(this.view,"pointer")}move(t){this.updateAllowDefault(t),na(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)}}_r.touchstart=e=>{e.input.lastTouch=Date.now(),iO(e),na(e,"pointer")};_r.touchmove=e=>{e.input.lastTouch=Date.now(),na(e,"pointer")};_r.contextmenu=e=>iO(e);function Z7(e,t){return e.composing?!0:yr&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const __e=Ko?5e3:-1;wr.compositionstart=wr.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(),Vv(e,!0),e.markCursor=null;else if(Vv(e),oi&&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}G7(e,__e)};wr.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,G7(e,20))};function G7(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>Vv(e),t))}function Y7(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=w_e());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function w_e(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function Vv(e,t=!1){if(!(Ko&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),Y7(e),t||e.docView&&e.docView.dirty){let n=tO(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}}function b_e(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 mu=Hr&&va<15||hu&&y1e<604;_r.copy=wr.cut=(e,t)=>{let n=t,r=e.state.selection,o=n.type=="cut";if(r.empty)return;let i=mu?null:n.clipboardData,s=r.content(),{dom:a,text:c}=z7(e,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",c)):b_e(e,a),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function x_e(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function S_e(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();let o=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?yf(e,r.value,null,o,t):yf(e,r.textContent,r.innerHTML,o,t)},50)}function yf(e,t,n,r,o){let i=A7(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=x_e(i),a=s?e.state.tr.replaceSelectionWith(s,r):e.state.tr.replaceSelection(i);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}wr.paste=(e,t)=>{let n=t;if(e.composing&&!Ko)return;let r=mu?null:n.clipboardData,o=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&yf(e,r.getData("text/plain"),r.getData("text/html"),o,n)?n.preventDefault():S_e(e,n)};class P_e{constructor(t,n){this.slice=t,this.move=n}}const K7=$o?"altKey":"ctrlKey";_r.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(q0(n));if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof Le?o.to-1:o.to))){if(r&&r.mightDrag)e.dispatch(e.state.tr.setSelection(Le.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(Le.create(e.state.doc,u.posBefore)))}}let s=e.state.selection.content(),{dom:a,text:c}=z7(e,s);n.dataTransfer.clearData(),n.dataTransfer.setData(mu?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",mu||n.dataTransfer.setData("text/plain",c),e.dragging=new P_e(s,!n[K7])};_r.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};wr.dragover=wr.dragenter=(e,t)=>t.preventDefault();wr.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let o=e.posAtCoords(q0(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=A7(e,n.dataTransfer.getData(mu?"Text":"text/plain"),mu?null:n.dataTransfer.getData("text/html"),!1,i);let a=!!(r&&!n[K7]);if(e.someProp("handleDrop",y=>y(e,n,s||ye.empty,a))){n.preventDefault();return}if(!s)return;n.preventDefault();let c=s?h7(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,g=u.doc;if(p?u.replaceRangeWith(f,f,s.content.firstChild):u.replaceRange(f,f,s),u.doc.eq(g))return;let v=u.doc.resolve(f);if(p&&Le.isSelectable(s.content.firstChild)&&v.nodeAfter&&v.nodeAfter.sameMarkup(s.content.firstChild))u.setSelection(new Le(v));else{let y=u.mapping.map(c);u.mapping.maps[u.mapping.maps.length-1].forEach((w,P,x,S)=>y=S),u.setSelection(nO(e,v,u.doc.resolve(y)))}e.focus(),e.dispatch(u.setMeta("uiEvent","drop"))};_r.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())&&ds(e)},20))};_r.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)};_r.beforeinput=(e,t)=>{if(nr&&Ko&&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,tl(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 wr)_r[e]=wr[e];function _f(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 Hv{constructor(t,n){this.toDOM=t,this.spec=n||Sl,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 jo(i-r,i-r,this)}valid(){return!0}eq(t){return this==t||t instanceof Hv&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&_f(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class _a{constructor(t,n){this.attrs=t,this.spec=n||Sl}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 jo(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==Qn||t.maps.length==0?this:this.mapInner(t,n,0,0,r||Sl)}mapInner(t,n,r,o,i){let s;for(let a=0;a{let u=c+r,f;if(f=J7(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 _a){let u=Math.max(i,c.from)-i,f=Math.min(s,c.to)-i;uo.map(t,n,Sl));return Ys.from(r)}forChild(t,n){if(n.isLeaf)return gn.empty;let r=[];for(let o=0;on instanceof gn)?t:t.reduce((n,r)=>n.concat(r instanceof gn?r:r.members),[]))}}}function O_e(e,t,n,r,o,i,s){let a=e.slice();for(let u=0,f=i;u{let P=w-y-(v-g);for(let x=0;xS+f-p)continue;let O=a[x]+f-p;v>=O?a[x+1]=g<=O?-2:-1:y>=o&&P&&(a[x]+=P,a[x+1]+=P)}p+=P}),f=n.maps[u].map(f,-1)}let c=!1;for(let u=0;u=r.content.size){c=!0;continue}let g=n.map(e[u+1]+i,-1),v=g-o,{index:y,offset:w}=r.content.findIndex(p),P=r.maybeChild(y);if(P&&w==p&&w+P.nodeSize==v){let x=a[u+2].mapInner(n,P,f+1,e[u]+i+1,s);x!=Qn?(a[u]=p,a[u+1]=v,a[u+2]=x):(a[u+1]=-2,c=!0)}else c=!0}if(c){let u=C_e(a,e,t,n,o,i,s),f=Wv(u,r,0,s);t=f.local;for(let p=0;pn&&s.to{let u=J7(e,a,c+n);if(u){i=!0;let f=Wv(u,a,n+c+1,r);f!=Qn&&o.push(c,c+a.nodeSize,f)}});let s=q7(i?X7(e):e,-n).sort(Pl);for(let a=0;a0;)t++;e.splice(t,0,n)}function aw(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=Qn&&t.push(r)}),e.cursorWrapper&&t.push(gn.create(e.state.doc,[e.cursorWrapper.deco])),Ys.from(t)}const k_e={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},E_e=Hr&&va<=11;class $_e{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 M_e{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new $_e,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()}),E_e&&(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,k_e)),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(ZT(this.view)){if(this.suppressingSelectionUpdates)return ds(this.view);if(Hr&&va<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Il(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=vf(i))n.add(i);for(let i=t.anchorNode;i;i=vf(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}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&ZT(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],g=f[1];p.parentNode&&p.parentNode.parentNode==g.parentNode?g.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),N_e(t)),this.handleDOMChange(i,s,a,c),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||ds(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;P--){let x=r.childNodes[P-1],S=x.pmViewDesc;if(x.nodeName=="BR"&&!S){i=P;break}if(!S||S.size)break}let p=e.state.doc,g=e.someProp("domParser")||du.fromSchema(e.state.schema),v=p.resolve(s),y=null,w=g.parse(r,{topNode:v.parent,topMatch:v.parent.contentMatchAt(v.index()),topOpen:!0,from:o,to:i,preserveWhitespace:v.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:j_e,context:v});if(u&&u[0].pos!=null){let P=u[0].pos,x=u[1]&&u[1].pos;x==null&&(x=P),y={anchor:P+s,head:x+s}}return{doc:w,sel:y,from:s,to:a}}function j_e(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(yr&&/^(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||yr&&/^(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 L_e=/^(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 D_e(e,t,n,r,o){let i=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let B=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,z=tO(e,B);if(z&&!e.state.selection.eq(z)){if(nr&&Ko&&e.input.lastKeyCode===13&&Date.now()-100X(e,tl(13,"Enter"))))return;let G=e.state.tr.setSelection(z);B=="pointer"?G.setMeta("pointer",!0):B=="key"&&G.scrollIntoView(),i&&G.setMeta("composition",i),e.dispatch(G)}return}let s=e.state.doc.resolve(t),a=s.sharedDepth(n);t=s.before(a+1),n=e.state.doc.resolve(n).after(a+1);let c=e.state.selection,u=I_e(e,t,n),f=e.state.doc,p=f.slice(u.from,u.to),g,v;e.input.lastKeyCode===8&&Date.now()-100Date.now()-225||Ko)&&o.some(B=>B.nodeType==1&&!L_e.test(B.nodeName))&&(!y||y.endA>=y.endB)&&e.someProp("handleKeyDown",B=>B(e,tl(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!y)if(r&&c instanceof Ve&&!c.empty&&c.$head.sameParent(c.$anchor)&&!e.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))y={start:c.from,endA:c.to,endB:c.to};else{if(u.sel){let B=rI(e,e.state.doc,u.sel);if(B&&!B.eq(e.state.selection)){let z=e.state.tr.setSelection(B);i&&z.setMeta("composition",i),e.dispatch(z)}}return}if(nr&&e.cursorWrapper&&u.sel&&u.sel.anchor==e.cursorWrapper.deco.from&&u.sel.head==u.sel.anchor){let B=y.endB-y.start;u.sel={anchor:u.sel.anchor+B,head:u.sel.anchor+B}}e.input.domChangeCount++,e.state.selection.frome.state.selection.from&&y.start<=e.state.selection.from+2&&e.state.selection.from>=u.from?y.start=e.state.selection.from:y.endA=e.state.selection.to-2&&e.state.selection.to<=u.to&&(y.endB+=e.state.selection.to-y.endA,y.endA=e.state.selection.to)),Hr&&va<=11&&y.endB==y.start+1&&y.endA==y.start&&y.start>u.from&&u.doc.textBetween(y.start-u.from-1,y.start-u.from+1)=="  "&&(y.start--,y.endA--,y.endB--);let w=u.doc.resolveNoCache(y.start-u.from),P=u.doc.resolveNoCache(y.endB-u.from),x=f.resolve(y.start),S=w.sameParent(P)&&w.parent.inlineContent&&x.end()>=y.endA,O;if((hu&&e.input.lastIOSEnter>Date.now()-225&&(!S||o.some(B=>B.nodeName=="DIV"||B.nodeName=="P"))||!S&&w.posB(e,tl(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>y.start&&z_e(f,y.start,y.endA,w,P)&&e.someProp("handleKeyDown",B=>B(e,tl(8,"Backspace")))){Ko&&nr&&e.domObserver.suppressSelectionUpdates();return}nr&&Ko&&y.endB==y.start&&(e.input.lastAndroidDelete=Date.now()),Ko&&!S&&w.start()!=P.start()&&P.parentOffset==0&&w.depth==P.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==y.endA&&(y.endB-=2,P=u.doc.resolveNoCache(y.endB-u.from),setTimeout(()=>{e.someProp("handleKeyDown",function(B){return B(e,tl(13,"Enter"))})},20));let E=y.start,$=y.endA,N,I,R;if(S){if(w.pos==P.pos)Hr&&va<=11&&w.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>ds(e),20)),N=e.state.tr.delete(E,$),I=f.resolve(y.start).marksAcross(f.resolve(y.endA));else if(y.endA==y.endB&&(R=R_e(w.parent.content.cut(w.parentOffset,P.parentOffset),x.parent.content.cut(x.parentOffset,y.endA-x.start()))))N=e.state.tr,R.type=="add"?N.addMark(E,$,R.mark):N.removeMark(E,$,R.mark);else if(w.parent.child(w.index()).isText&&w.index()==P.index()-(P.textOffset?0:1)){let B=w.parent.textBetween(w.parentOffset,P.parentOffset);if(e.someProp("handleTextInput",z=>z(e,E,$,B)))return;N=e.state.tr.insertText(B,E,$)}}if(N||(N=e.state.tr.replace(E,$,u.doc.slice(y.start-u.from,y.endB-u.from))),u.sel){let B=rI(e,N.doc,u.sel);B&&!(nr&&Ko&&e.composing&&B.empty&&(y.start!=y.endB||e.input.lastAndroidDeletet.content.size?null:nO(e,t.resolve(n.anchor),t.resolve(n.head))}function R_e(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||lw(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 A_e(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 B_e{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 s_e,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(lI),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=sI(this),iI(this),this.nodeViews=aI(this),this.docView=BT(this.state.doc,oI(this),aw(this),this.dom,this),this.domObserver=new M_e(this,(r,o,i,s)=>D_e(this,r,o,i,s)),this.domObserver.start(),a_e(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&&_x(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(lI),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&&(Y7(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 g=aI(this);V_e(g,this.nodeViews)&&(this.nodeViews=g,o=!0)}(s||n.handleDOMEvents!=this._props.handleDOMEvents)&&_x(this),this.editable=sI(this),iI(this);let a=aw(this),c=oI(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&&b1e(this);if(i){this.domObserver.stop();let g=f&&(Hr||nr)&&!this.composing&&!r.selection.empty&&!t.selection.empty&&F_e(r.selection,t.selection);if(f){let v=nr?this.trackWrites=this.domSelectionRange().focusNode:null;(o||!this.docView.update(t.doc,c,a,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=BT(t.doc,c,a,this.dom,this)),v&&!this.trackWrites&&(g=!0)}g||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&Z1e(this))?ds(this,g):(L7(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(r),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():p&&x1e(p)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof Le){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&jT(this,n.getBoundingClientRect(),t)}else jT(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}updateRoot(){this._root=null}posAtCoords(t){return E1e(this,t)}coordsAtPos(t,n=1){return k7(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 I1e(this,n||this.state,t)}pasteHTML(t,n){return yf(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return yf(this,t,null,!0,n||new ClipboardEvent("paste"))}destroy(){this.docView&&(l_e(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],aw(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 u_e(this,t)}dispatch(t){let n=this._props.dispatchTransaction;n?n.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){return yr&&this.root.nodeType===11&&h1e(this.dom.ownerDocument)==this.dom?T_e(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function oI(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),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]))}),t.translate||(t.translate="no"),[jo.node(0,e.state.doc.content.size,t)]}function iI(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:jo.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function sI(e){return!e.someProp("editable",t=>t(e.state)===!1)}function F_e(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 aI(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 V_e(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 lI(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 Ca={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:"'"},Uv={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},H_e=typeof navigator<"u"&&/Mac/.test(navigator.platform),W_e=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var An=0;An<10;An++)Ca[48+An]=Ca[96+An]=String(An);for(var An=1;An<=24;An++)Ca[An+111]="F"+An;for(var An=65;An<=90;An++)Ca[An]=String.fromCharCode(An+32),Uv[An]=String.fromCharCode(An);for(var cw in Ca)Uv.hasOwnProperty(cw)||(Uv[cw]=Ca[cw]);function U_e(e){var t=H_e&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||W_e&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?Uv:Ca)[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 Z_e=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function G_e(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,o,i,s;for(let a=0;a127)&&(i=Ca[r.keyCode])&&i!=o){let a=t[uw(i,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}const q_e=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function J_e(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}const X_e=(e,t,n)=>{let r=J_e(e,n);if(!r)return!1;let o=e9(r);if(!o){let s=r.blockRange(),a=s&&Eu(s);return a==null?!1:(t&&t(e.tr.lift(s,a).scrollIntoView()),!0)}let i=o.nodeBefore;if(!i.type.spec.isolating&&r9(e,o,t))return!0;if(r.parent.content.size==0&&(gu(i,"end")||Le.isSelectable(i))){let s=JP(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=e9(r)}let s=i&&i.nodeBefore;return!s||!Le.isSelectable(s)?!1:(t&&t(e.tr.setSelection(Le.create(e.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function e9(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 ewe(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset{let r=ewe(e,n);if(!r)return!1;let o=t9(r);if(!o)return!1;let i=o.nodeAfter;if(r9(e,o,t))return!0;if(r.parent.content.size==0&&(gu(i,"start")||Le.isSelectable(i))){let s=JP(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 Le,o;if(r){if(n.node.isTextblock||!La(e.doc,n.from))return!1;o=n.from}else if(o=Z0(e.doc,n.from,-1),o==null)return!1;if(t){let i=e.tr.join(o);r&&i.setSelection(Le.create(i.doc,o-e.doc.resolve(o).nodeBefore.nodeSize)),t(i.scrollIntoView())}return!0},owe=(e,t)=>{let n=e.selection,r;if(n instanceof Le){if(n.node.isTextblock||!La(e.doc,n.to))return!1;r=n.to}else if(r=Z0(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},iwe=(e,t)=>{let{$from:n,$to:r}=e.selection,o=n.blockRange(r),i=o&&Eu(o);return i==null?!1:(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)},swe=(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 n9(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=n9(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(Ze.near(c.doc.resolve(a),1)),t(c.scrollIntoView())}return!0},lwe=(e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof Qo||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=n9(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(Gc(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&Eu(r);return o==null?!1:(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)},uwe=(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(Le.create(e.doc,o))),!0)};function dwe(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||La(e.doc,t.pos))?!1:(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),!0)}function r9(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,i,s;if(r.type.spec.isolating||o.type.spec.isolating)return!1;if(dwe(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,g=se.empty;for(let w=i.length-1;w>=0;w--)g=se.from(i[w].create(null,g));g=se.from(r.copy(g));let v=e.tr.step(new En(t.pos-1,p,t.pos,p,new ye(g,1,0),i.length,!0)),y=p+2*i.length;La(v.doc,y)&&v.join(y),n(v.scrollIntoView())}return!0}let c=Ze.findFrom(t,1),u=c&&c.$from.blockRange(c.$to),f=u&&Eu(u);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(u,f).scrollIntoView()),!0;if(a&&gu(o,"start",!0)&&gu(r,"end")){let p=r,g=[];for(;g.push(p),!p.isTextblock;)p=p.lastChild;let v=o,y=1;for(;!v.isTextblock;v=v.firstChild)y++;if(p.canReplace(p.childCount,p.childCount,v.content)){if(n){let w=se.empty;for(let x=g.length-1;x>=0;x--)w=se.from(g[x].copy(w));let P=e.tr.step(new En(t.pos-g.length,t.pos+o.nodeSize,t.pos+y,t.pos+o.nodeSize-y,new ye(w,g.length,0),0,!0));n(P.scrollIntoView())}return!0}}return!1}function o9(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(Ve.create(t.doc,e<0?o.start(i):o.end(i)))),!0):!1}}const fwe=o9(-1),pwe=o9(1);function hwe(e,t=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),a=s&&qP(s,e,t);return a?(r&&r(n.tr.wrap(s,a).scrollIntoView()),!0):!1}}function cI(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 Rv(f,f,s.depth),s.endIndex=0;f--)i=se.from(n[f].type.create(n[f].attrs,i));e.step(new En(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?ywe(t,n,e,i):_we(t,n,i):!0:!1}}function ywe(e,t,n,r){let o=e.tr,i=r.end,s=r.$to.end(r.depth);iw;y--)v-=o.child(y).nodeSize,r.delete(v-1,v+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,g=p+s.nodeSize;return r.step(new En(p-(a?1:0),g+(c?1:0),p+1,g-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 wwe(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),g=i.start,v=i.end;n(t.tr.step(new En(g-(u?3:1),v,g,v,p,1,!0)).scrollIntoView())}return!0}}function J0(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 X0{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(g=>g===!0)),p={...Object.fromEntries(Object.entries(r).map(([g,v])=>[g,(...w)=>{const P=this.buildProps(u,n),x=v(...w)(P);return a.push(x),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,a={tr:t,editor:o,view:s,state:J0({state:i,transaction:t}),dispatch:n?()=>{}:void 0,chain:()=>this.createChain(t,n),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(r).map(([c,u])=>[c,(...f)=>u(...f)(a)]))}};return a}}class bwe{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 Ce(e,t,n){return e.config[t]===void 0&&e.parent?Ce(e.parent,t,n):typeof e.config[t]=="function"?e.config[t].bind({...n,parent:e.parent?Ce(e.parent,t,n):null}):e.config[t]}function Q0(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 i9(e){const t=[],{nodeExtensions:n,markExtensions:r}=Q0(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=Ce(s,"addGlobalAttributes",a);if(!c)return;c().forEach(f=>{f.types.forEach(p=>{Object.entries(f.attributes).forEach(([g,v])=>{t.push({type:p,name:g,attribute:{...i,...v}})})})})}),o.forEach(s=>{const a={name:s.name,options:s.options,storage:s.storage},c=Ce(s,"addAttributes",a);if(!c)return;const u=c();Object.entries(u).forEach(([f,p])=>{const g={...i,...p};typeof g?.default=="function"&&(g.default=g.default()),g?.isRequired&&g?.default===void 0&&delete g.default,t.push({type:s.name,name:f,attribute:g})})}),t}function Mn(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 kt(...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}if(o==="class"){const a=i?i.split(" "):[],c=r[o]?r[o].split(" "):[],u=a.filter(f=>!c.includes(f));r[o]=[...c,...u].join(" ")}else o==="style"?r[o]=[r[o],i].join("; "):r[o]=i}),r},{})}function wx(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)=>kt(n,r),{})}function s9(e){return typeof e=="function"}function Ue(e,t=void 0,...n){return s9(e)?t?e.bind(t)(...n):e(...n):e}function xwe(e={}){return Object.keys(e).length===0&&e.constructor===Object}function Swe(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function uI(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):Swe(n.getAttribute(s.name));return a==null?i:{...i,[s.name]:a}},{});return{...r,...o}}}}function dI(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>t==="attrs"&&xwe(n)?!1:n!=null))}function Pwe(e,t){var n;const r=i9(e),{nodeExtensions:o,markExtensions:i}=Q0(e),s=(n=o.find(u=>Ce(u,"topNode")))===null||n===void 0?void 0:n.name,a=Object.fromEntries(o.map(u=>{const f=r.filter(x=>x.type===u.name),p={name:u.name,options:u.options,storage:u.storage,editor:t},g=e.reduce((x,S)=>{const O=Ce(S,"extendNodeSchema",p);return{...x,...O?O(u):{}}},{}),v=dI({...g,content:Ue(Ce(u,"content",p)),marks:Ue(Ce(u,"marks",p)),group:Ue(Ce(u,"group",p)),inline:Ue(Ce(u,"inline",p)),atom:Ue(Ce(u,"atom",p)),selectable:Ue(Ce(u,"selectable",p)),draggable:Ue(Ce(u,"draggable",p)),code:Ue(Ce(u,"code",p)),defining:Ue(Ce(u,"defining",p)),isolating:Ue(Ce(u,"isolating",p)),attrs:Object.fromEntries(f.map(x=>{var S;return[x.name,{default:(S=x?.attribute)===null||S===void 0?void 0:S.default}]}))}),y=Ue(Ce(u,"parseHTML",p));y&&(v.parseDOM=y.map(x=>uI(x,f)));const w=Ce(u,"renderHTML",p);w&&(v.toDOM=x=>w({node:x,HTMLAttributes:wx(x,f)}));const P=Ce(u,"renderText",p);return P&&(v.toText=P),[u.name,v]})),c=Object.fromEntries(i.map(u=>{const f=r.filter(P=>P.type===u.name),p={name:u.name,options:u.options,storage:u.storage,editor:t},g=e.reduce((P,x)=>{const S=Ce(x,"extendMarkSchema",p);return{...P,...S?S(u):{}}},{}),v=dI({...g,inclusive:Ue(Ce(u,"inclusive",p)),excludes:Ue(Ce(u,"excludes",p)),group:Ue(Ce(u,"group",p)),spanning:Ue(Ce(u,"spanning",p)),code:Ue(Ce(u,"code",p)),attrs:Object.fromEntries(f.map(P=>{var x;return[P.name,{default:(x=P?.attribute)===null||x===void 0?void 0:x.default}]}))}),y=Ue(Ce(u,"parseHTML",p));y&&(v.parseDOM=y.map(P=>uI(P,f)));const w=Ce(u,"renderHTML",p);return w&&(v.toDOM=P=>w({mark:P,HTMLAttributes:wx(P,f)})),[u.name,v]}));return new I0e({topNode:s,nodes:a,marks:c})}function dw(e,t){return t.nodes[e]||t.marks[e]||null}function fI(e,t){return Array.isArray(t)?t.some(n=>(typeof n=="string"?n:n.name)===e.name):t}const Owe=(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 lO(e){return Object.prototype.toString.call(e)==="[object RegExp]"}class e1{constructor(t){this.find=t.find,this.handler=t.handler}}const Cwe=(e,t)=>{if(lO(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 fw(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(g=>g.type.spec.code))return!1;let f=!1;const p=Owe(u)+i;return s.forEach(g=>{if(f)return;const v=Cwe(p,g.find);if(!v)return;const y=c.state.tr,w=J0({state:c.state,transaction:y}),P={from:r-(v[0].length-i.length),to:o},{commands:x,chain:S,can:O}=new X0({editor:n,state:w});g.handler({state:w,range:P,match:v,commands:x,chain:S,can:O})===null||!y.steps.length||(y.setMeta(a,{transform:y,from:r,to:o,text:i}),c.dispatch(y),f=!0)}),f}function kwe(e){const{editor:t,rules:n}=e,r=new Zr({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 fw({editor:t,from:i,to:s,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:i}=o.state.selection;i&&fw({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?fw({editor:t,from:s.pos,to:s.pos,text:` +`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function Ewe(e){return typeof e=="number"}class $we{constructor(t){this.find=t.find,this.handler=t.handler}}const Mwe=(e,t)=>{if(lO(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 Nwe(e){const{editor:t,state:n,from:r,to:o,rule:i,pasteEvent:s,dropEvent:a}=e,{commands:c,chain:u,can:f}=new X0({editor:t,state:n}),p=[];return n.doc.nodesBetween(r,o,(v,y)=>{if(!v.isTextblock||v.type.spec.code)return;const w=Math.max(r,y),P=Math.min(o,y+v.content.size),x=v.textBetween(w-y,P-y,void 0,"");Mwe(x,i.find).forEach(O=>{if(O.index===void 0)return;const E=w+O.index+1,$=E+O[0].length,N={from:n.tr.mapping.map(E),to:n.tr.mapping.map($)},I=i.handler({state:n,range:N,match:O,commands:c,chain:u,can:f,pasteEvent:s,dropEvent:a});p.push(I)})}),p.every(v=>v!==null)}function Twe(e){const{editor:t,rules:n}=e;let r=null,o=!1,i=!1,s=new ClipboardEvent("paste"),a=new DragEvent("drop");return n.map(u=>new Zr({view(f){const p=g=>{var v;r=!((v=f.dom.parentElement)===null||v===void 0)&&v.contains(g.target)?f.dom.parentElement:null};return window.addEventListener("dragstart",p),{destroy(){window.removeEventListener("dragstart",p)}}},props:{handleDOMEvents:{drop:(f,p)=>(i=r===f.dom.parentElement,a=p,!1),paste:(f,p)=>{var g;const v=(g=p.clipboardData)===null||g===void 0?void 0:g.getData("text/html");return s=p,o=!!v?.includes("data-pm-slice"),!1}}},appendTransaction:(f,p,g)=>{const v=f[0],y=v.getMeta("uiEvent")==="paste"&&!o,w=v.getMeta("uiEvent")==="drop"&&!i;if(!y&&!w)return;const P=p.doc.content.findDiffStart(g.doc.content),x=p.doc.content.findDiffEnd(g.doc.content);if(!Ewe(P)||!x||P===x.b)return;const S=g.tr,O=J0({state:g,transaction:S});if(!(!Nwe({editor:t,state:O,from:Math.max(P-1,0),to:x.b-1,rule:u,pasteEvent:s,dropEvent:a})||!S.steps.length))return a=new DragEvent("drop"),s=new ClipboardEvent("paste"),S}}))}function Iwe(e){const t=e.filter((n,r)=>e.indexOf(n)!==r);return[...new Set(t)]}class Nc{constructor(t,n){this.splittableMarks=[],this.editor=n,this.extensions=Nc.resolve(t),this.schema=Pwe(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:dw(r.name,this.schema)};r.type==="mark"&&(!((o=Ue(Ce(r,"keepOnSplit",i)))!==null&&o!==void 0)||o)&&this.splittableMarks.push(r.name);const s=Ce(r,"onBeforeCreate",i);s&&this.editor.on("beforeCreate",s);const a=Ce(r,"onCreate",i);a&&this.editor.on("create",a);const c=Ce(r,"onUpdate",i);c&&this.editor.on("update",c);const u=Ce(r,"onSelectionUpdate",i);u&&this.editor.on("selectionUpdate",u);const f=Ce(r,"onTransaction",i);f&&this.editor.on("transaction",f);const p=Ce(r,"onFocus",i);p&&this.editor.on("focus",p);const g=Ce(r,"onBlur",i);g&&this.editor.on("blur",g);const v=Ce(r,"onDestroy",i);v&&this.editor.on("destroy",v)})}static resolve(t){const n=Nc.sort(Nc.flatten(t)),r=Iwe(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=Ce(n,"addExtensions",r);return o?[n,...this.flatten(o())]:n}).flat(10)}static sort(t){return t.sort((r,o)=>{const i=Ce(r,"priority")||100,s=Ce(o,"priority")||100;return i>s?-1:i{const r={name:n.name,options:n.options,storage:n.storage,editor:this.editor,type:dw(n.name,this.schema)},o=Ce(n,"addCommands",r);return o?{...t,...o()}:t},{})}get plugins(){const{editor:t}=this,n=Nc.sort([...this.extensions].reverse()),r=[],o=[],i=n.map(s=>{const a={name:s.name,options:s.options,storage:s.storage,editor:t,type:dw(s.name,this.schema)},c=[],u=Ce(s,"addKeyboardShortcuts",a);let f={};if(s.type==="mark"&&s.config.exitable&&(f.ArrowRight=()=>or.handleExit({editor:t,mark:s})),u){const w=Object.fromEntries(Object.entries(u()).map(([P,x])=>[P,()=>x({editor:t})]));f={...f,...w}}const p=K_e(f);c.push(p);const g=Ce(s,"addInputRules",a);fI(s,t.options.enableInputRules)&&g&&r.push(...g());const v=Ce(s,"addPasteRules",a);fI(s,t.options.enablePasteRules)&&v&&o.push(...v());const y=Ce(s,"addProseMirrorPlugins",a);if(y){const w=y();c.push(...w)}return c}).flat();return[kwe({editor:t,rules:r}),...Twe({editor:t,rules:o}),...i]}get attributes(){return i9(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:n}=Q0(this.extensions);return Object.fromEntries(n.filter(r=>!!Ce(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:Mn(r.name,this.schema)},s=Ce(r,"addNodeView",i);if(!s)return[];const a=(c,u,f,p)=>{const g=wx(c,o);return s()({editor:t,node:c,getPos:f,decorations:p,HTMLAttributes:g,extension:r})};return[r.name,a]}))}}function jwe(e){return Object.prototype.toString.call(e).slice(8,-1)}function pw(e){return jwe(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function t1(e,t){const n={...e};return pw(e)&&pw(t)&&Object.keys(t).forEach(r=>{pw(t[r])?r in e?n[r]=t1(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Object.assign(n,{[r]:t[r]})}),n}class br{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=Ue(Ce(this,"addOptions",{name:this.name}))),this.storage=Ue(Ce(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new br(t)}configure(t={}){const n=this.extend();return n.options=t1(this.options,t),n.storage=Ue(Ce(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=Ue(Ce(n,"addOptions",{name:n.name})),n.storage=Ue(Ce(n,"addStorage",{name:n.name,options:n.options})),n}}function a9(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,g)=>{var v;const y=s?.[u.type.name];y?(u.isBlock&&!c&&(a+=i,c=!0),p&&(a+=y({node:u,pos:f,parent:p,index:g,range:t}))):u.isText?(a+=(v=u?.text)===null||v===void 0?void 0:v.slice(Math.max(r,f)-f,o-f),c=!1):u.isBlock&&!c&&(a+=i,c=!0)}),a}function l9(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}const Lwe=br.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new Zr({key:new Ai("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=l9(n);return a9(r,{from:s,to:a},{textSerializers:c})}}})]}}),Dwe=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window?.getSelection())===null||n===void 0||n.removeAllRanges())}),!0),Rwe=(e=!1)=>({commands:t})=>t.setContent("",e),zwe=()=>({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)),g=u.resolve(f.map(c+a.nodeSize)),v=p.blockRange(g);if(!v)return;const y=$u(v);if(a.type.isTextblock){const{defaultType:w}=p.parent.contentMatchAt(p.index());t.setNodeMarkup(v.start,w)}(y||y===0)&&t.lift(v,y)})}),!0},Awe=e=>t=>e(t),Bwe=()=>({state:e,dispatch:t})=>lwe(e,t),Fwe=(e,t)=>({editor:n,tr:r})=>{const{state:o}=n,i=o.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);const s=r.mapping.map(t);return r.insert(s,i.content),r.setSelection(new Ve(r.doc.resolve(s-1))),!0},Vwe=()=>({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},Hwe=e=>({tr:t,state:n,dispatch:r})=>{const o=Mn(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},Wwe=e=>({tr:t,dispatch:n})=>{const{from:r,to:o}=e;return n&&t.delete(r,o),!0},Uwe=()=>({state:e,dispatch:t})=>q_e(e,t),Zwe=()=>({commands:e})=>e.keyboardShortcut("Enter"),Gwe=()=>({state:e,dispatch:t})=>awe(e,t);function Gv(e,t,n={strict:!0}){const r=Object.keys(t);return r.length?r.every(o=>n.strict?t[o]===e[o]:lO(t[o])?t[o].test(e[o]):t[o]===e[o]):!0}function xx(e,t,n={}){return e.find(r=>r.type===t&&Gv(r.attrs,n))}function Ywe(e,t,n={}){return!!xx(e,t,n)}function cO(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=xx([...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(xx([...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=Ra(e,r.schema),{doc:s,selection:a}=n,{$from:c,from:u,to:f}=a;if(o){const p=cO(c,i,t);if(p&&p.from<=u&&p.to>=f){const g=Ve.create(s,p.from,p.to);n.setSelection(g)}}return!0},qwe=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=()=>{uO()&&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&&!c9(n.state.selection))return s(),!0;const a=u9(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},Xwe=(e,t)=>n=>e.every((r,o)=>t(r,{...n,index:o})),Qwe=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t);function pI(e){const t=`${e}`;return new window.DOMParser().parseFromString(t,"text/html").body}function Yv(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),Yv("",t,n)}if(typeof e=="string"){const r=fu.fromSchema(t);return n.slice?r.parseSlice(pI(e),n.parseOptions).content:r.parse(pI(e),n.parseOptions)}return Yv("",t,n)}function ebe(e,t,n){const r=e.steps.length-1;if(r{s===0&&(s=f)}),e.setSelection(Ze.near(e.doc.resolve(s),n))}const tbe=e=>e.toString().startsWith("<"),nbe=(e,t,n)=>({tr:r,dispatch:o,editor:i})=>{if(o){n={parseOptions:{},updateSelection:!0,...n};const s=Yv(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}:{from:e.from,to:e.to},u=!0,f=!0;if((tbe(s)?s:[s]).forEach(g=>{g.check(),u=u?g.isText&&g.marks.length===0:!1,f=f?g.isBlock:!1}),a===c&&f){const{parent:g}=r.doc.resolve(a);g.isTextblock&&!g.type.spec.code&&!g.childCount&&(a-=1,c+=1)}u?Array.isArray(t)?r.insertText(t.map(g=>g.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&&ebe(r,r.steps.length-1,-1)}return!0},rbe=()=>({state:e,dispatch:t})=>rwe(e,t),obe=()=>({state:e,dispatch:t})=>owe(e,t),ibe=()=>({state:e,dispatch:t})=>X_e(e,t),sbe=()=>({state:e,dispatch:t})=>twe(e,t),abe=()=>({tr:e,state:t,dispatch:n})=>{try{const r=G0(t.doc,t.selection.$from.pos,-1);return r==null?!1:(e.join(r,2),n&&n(e),!0)}catch{return!1}},lbe=()=>({state:e,dispatch:t,tr:n})=>{try{const r=G0(e.doc,e.selection.$from.pos,1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}};function dO(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function cbe(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=cbe(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 bf(e,t,n={}){const{from:r,to:o,empty:i}=e.selection,s=t?Mn(t,e.schema):null,a=[];e.doc.nodesBetween(r,o,(p,g)=>{if(p.isText)return;const v=Math.max(r,g),y=Math.min(o,g+p.nodeSize);a.push({node:p,from:v,to:y})});const c=o-r,u=a.filter(p=>s?s.name===p.node.type.name:!0).filter(p=>Gv(p.node.attrs,n,{strict:!1}));return i?!!u.length:u.reduce((p,g)=>p+g.to-g.from,0)>=c}const dbe=(e,t={})=>({state:n,dispatch:r})=>{const o=Mn(e,n.schema);return bf(n,o,t)?iwe(n,r):!1},fbe=()=>({state:e,dispatch:t})=>cwe(e,t),pbe=e=>({state:t,dispatch:n})=>{const r=Mn(e,t.schema);return vwe(r)(t,n)},hbe=()=>({state:e,dispatch:t})=>swe(e,t);function r1(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function hI(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 mbe=(e,t)=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=r1(typeof e=="string"?e:e.name,r.schema);return a?(a==="node"&&(i=Mn(e,r.schema)),a==="mark"&&(s=Ra(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,hI(u.attrs,t)),s&&u.marks.length&&u.marks.forEach(p=>{s===p.type&&n.addMark(f,f+u.nodeSize,s.create(hI(p.attrs,t)))})})}),!0):!1},gbe=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),vbe=()=>({tr:e,commands:t})=>t.setTextSelection({from:0,to:e.doc.content.size}),ybe=()=>({state:e,dispatch:t})=>Q_e(e,t),_be=()=>({state:e,dispatch:t})=>nwe(e,t),wbe=()=>({state:e,dispatch:t})=>uwe(e,t),bbe=()=>({state:e,dispatch:t})=>pwe(e,t),xbe=()=>({state:e,dispatch:t})=>fwe(e,t);function d9(e,t,n={}){return Yv(e,t,{slice:!1,parseOptions:n})}const Sbe=(e,t=!1,n={})=>({tr:r,editor:o,dispatch:i})=>{const{doc:s}=r,a=d9(e,o.schema,n);return i&&r.replaceWith(0,s.content.size,a).setMeta("preventUpdate",!t),!0};function Qf(e,t){const n=Ra(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 Pbe(e,t){const n=new _7(e);return t.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function Obe(e){for(let t=0;t{n(o)&&r.push({node:o,pos:i})}),r}function kbe(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 fO(e){return t=>kbe(t.$from,e)}function Ebe(e,t){const n=$i.fromSchema(t).serializeFragment(e),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}function $be(e,t){const n={from:0,to:e.content.size};return a9(e,n,t)}function Mbe(e,t){const n=Mn(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 f9(e,t){const n=r1(typeof t=="string"?t:t.name,e.schema);return n==="node"?Mbe(e,t):n==="mark"?Qf(e,t):{}}function Nbe(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 Tbe(e){const t=Nbe(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 Ibe(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),g=t.invert().map(f);r.push({oldRange:{from:p,to:g},newRange:{from:u,to:f}})})}),Tbe(r)}function pO(e,t,n){const r=[];return e===t?n.resolve(e).marks().forEach(o=>{const i=n.resolve(e-1),s=cO(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 Qh(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 Sx(e,t,n={}){const{empty:r,ranges:o}=e.selection,i=t?Ra(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(p=>i?i.name===p.type.name:!0).find(p=>Gv(p.attrs,n,{strict:!1}));let s=0;const a=[];if(o.forEach(({$from:p,$to:g})=>{const v=p.pos,y=g.pos;e.doc.nodesBetween(v,y,(w,P)=>{if(!w.isText&&!w.marks.length)return;const x=Math.max(v,P),S=Math.min(y,P+w.nodeSize),O=S-x;s+=O,a.push(...w.marks.map(E=>({mark:E,from:x,to:S})))})}),s===0)return!1;const c=a.filter(p=>i?i.name===p.mark.type.name:!0).filter(p=>Gv(p.mark.attrs,n,{strict:!1})).reduce((p,g)=>p+g.to-g.from,0),u=a.filter(p=>i?p.mark.type!==i&&p.mark.type.excludes(i):!0).reduce((p,g)=>p+g.to-g.from,0);return(c>0?c+u:c)>=s}function jbe(e,t,n={}){if(!t)return bf(e,null,n)||Sx(e,null,n);const r=r1(t,e.schema);return r==="node"?bf(e,t,n):r==="mark"?Sx(e,t,n):!1}function mI(e,t){const{nodeExtensions:n}=e1(t),r=n.find(s=>s.name===e);if(!r)return!1;const o={name:r.name,options:r.options,storage:r.storage},i=Ue(Ce(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function Lbe(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 Dbe(e,t,n){var r;const{selection:o}=t;let i=null;if(c9(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,g)=>{if(u)return!1;if(f.isInline){const v=!g||g.type.allowsMarkType(n),y=!!n.isInSet(f.marks)||!f.marks.some(w=>w.type.excludes(n));u=v&&y}return!u}),u})}const Rbe=(e,t={})=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=n,{empty:s,ranges:a}=i,c=Ra(e,r.schema);if(o)if(s){const u=Qf(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,(g,v)=>{const y=Math.max(v,f),w=Math.min(v+g.nodeSize,p);g.marks.find(x=>x.type===c)?g.marks.forEach(x=>{c===x.type&&n.addMark(y,w,c.create({...x.attrs,...t}))}):n.addMark(y,w,c.create(t))})});return Dbe(r,n,c)},zbe=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),Abe=(e,t={})=>({state:n,dispatch:r,chain:o})=>{const i=Mn(e,n.schema);return i.isTextblock?o().command(({commands:s})=>cI(i,t)(n)?!0:s.clearNodes()).command(({state:s})=>cI(i,t)(s,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},Bbe=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,o=pl(e,0,r.content.size),i=Le.create(r,o);t.setSelection(i)}return!0},Fbe=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,{from:o,to:i}=typeof e=="number"?{from:e,to:e}:e,s=Ve.atStart(r).from,a=Ve.atEnd(r).to,c=pl(o,s,a),u=pl(i,s,a),f=Ve.create(r,c,u);t.setSelection(f)}return!0},Vbe=e=>({state:t,dispatch:n})=>{const r=Mn(e,t.schema);return wwe(r)(t,n)};function gI(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 Hbe=({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=Qh(u,a.node().type.name,a.node().attrs);if(i instanceof Le&&i.node.isBlock)return!a.parentOffset||!Yc(s,a.pos)?!1:(r&&(e&&gI(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 Ve&&t.deleteSelection();const g=a.depth===0?void 0:Obe(a.node(-1).contentMatchAt(a.indexAfter(-1)));let v=p&&g?[{type:g,attrs:f}]:void 0,y=Yc(t.doc,t.mapping.map(a.pos),1,v);if(!v&&!y&&Yc(t.doc,t.mapping.map(a.pos),1,g?[{type:g}]:void 0)&&(y=!0,v=g?[{type:g,attrs:f}]:void 0),y&&(t.split(t.mapping.map(a.pos),1,v),g&&!p&&!a.parentOffset&&a.parent.type!==g)){const w=t.mapping.map(a.before()),P=t.doc.resolve(w);a.node(-1).canReplaceWith(P.index(),P.index()+1,g)&&t.setNodeMarkup(t.mapping.map(a.before()),g)}e&&gI(n,o.extensionManager.splittableMarks),t.scrollIntoView()}return!0},Wbe=e=>({tr:t,state:n,dispatch:r,editor:o})=>{var i;const s=Mn(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 P=se.empty;const x=a.index(-1)?1:a.index(-2)?2:3;for(let I=a.depth-x;I>=a.depth-3;I-=1)P=se.from(a.node(I).copy(P));const S=a.indexAfter(-1){if(N>-1)return!1;I.isTextblock&&I.content.size===0&&(N=R+1)}),N>-1&&t.setSelection(Ve.near(t.doc.resolve(N))),t.scrollIntoView()}return!0}const g=c.pos===a.end()?f.contentMatchAt(0).defaultType:null,v=Qh(p,f.type.name,f.attrs),y=Qh(p,a.node().type.name,a.node().attrs);t.delete(a.pos,c.pos);const w=g?[{type:s,attrs:v},{type:g,attrs:y}]:[{type:s,attrs:v}];if(!Yc(t.doc,a.pos,2))return!1;if(r){const{selection:P,storedMarks:x}=n,{splittableMarks:S}=o.extensionManager,O=x||P.$to.parentOffset&&P.$from.marks();if(t.split(a.pos,2,w).scrollIntoView(),!O||!r)return!0;const E=O.filter($=>S.includes($.type.name));t.ensureMarks(E)}return!0},mw=(e,t)=>{const n=fO(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&&La(e.doc,n.pos)&&e.join(n.pos),!0},gw=(e,t)=>{const n=fO(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&&La(e.doc,r)&&e.join(r),!0},Ube=(e,t,n,r={})=>({editor:o,tr:i,state:s,dispatch:a,chain:c,commands:u,can:f})=>{const{extensions:p,splittableMarks:g}=o.extensionManager,v=Mn(e,s.schema),y=Mn(t,s.schema),{selection:w,storedMarks:P}=s,{$from:x,$to:S}=w,O=x.blockRange(S),E=P||w.$to.parentOffset&&w.$from.marks();if(!O)return!1;const $=fO(N=>mI(N.type.name,p))(w);if(O.depth>=1&&$&&O.depth-$.depth<=1){if($.node.type===v)return u.liftListItem(y);if(mI($.node.type.name,p)&&v.validContent($.node.content)&&a)return c().command(()=>(i.setNodeMarkup($.pos,v),!0)).command(()=>mw(i,v)).command(()=>gw(i,v)).run()}return!n||!E||!a?c().command(()=>f().wrapInList(v,r)?!0:u.clearNodes()).wrapInList(v,r).command(()=>mw(i,v)).command(()=>gw(i,v)).run():c().command(()=>{const N=f().wrapInList(v,r),I=E.filter(R=>g.includes(R.type.name));return i.ensureMarks(I),N?!0:u.clearNodes()}).wrapInList(v,r).command(()=>mw(i,v)).command(()=>gw(i,v)).run()},Zbe=(e,t={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=n,s=Ra(e,r.schema);return Sx(r,s,t)?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,t)},Gbe=(e,t,n={})=>({state:r,commands:o})=>{const i=Mn(e,r.schema),s=Mn(t,r.schema);return bf(r,i,n)?o.setNode(s):o.setNode(i,n)},Ybe=(e,t={})=>({state:n,commands:r})=>{const o=Mn(e,n.schema);return bf(n,o,t)?r.lift(o):r.wrapIn(o,t)},Kbe=()=>({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},qbe=()=>({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},Jbe=(e,t={})=>({tr:n,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:s=!1}=t,{selection:a}=n,c=Ra(e,r.schema),{$from:u,empty:f,ranges:p}=a;if(!o)return!0;if(f&&s){let{from:g,to:v}=a;const y=(i=u.marks().find(P=>P.type===c))===null||i===void 0?void 0:i.attrs,w=cO(u,c,y);w&&(g=w.from,v=w.to),n.removeMark(g,v,c)}else p.forEach(g=>{n.removeMark(g.$from.pos,g.$to.pos,c)});return n.removeStoredMark(c),!0},Xbe=(e,t={})=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=r1(typeof e=="string"?e:e.name,r.schema);return a?(a==="node"&&(i=Mn(e,r.schema)),a==="mark"&&(s=Ra(e,r.schema)),o&&n.selection.ranges.forEach(c=>{const u=c.$from.pos,f=c.$to.pos;r.doc.nodesBetween(u,f,(p,g)=>{i&&i===p.type&&n.setNodeMarkup(g,void 0,{...p.attrs,...t}),s&&p.marks.length&&p.marks.forEach(v=>{if(s===v.type){const y=Math.max(g,u),w=Math.min(g+p.nodeSize,f);n.addMark(y,w,s.create({...v.attrs,...t}))}})})}),!0):!1},Qbe=(e,t={})=>({state:n,dispatch:r})=>{const o=Mn(e,n.schema);return hwe(o,t)(n,r)},exe=(e,t={})=>({state:n,dispatch:r})=>{const o=Mn(e,n.schema);return mwe(o,t)(n,r)};var txe=Object.freeze({__proto__:null,blur:Dwe,clearContent:Rwe,clearNodes:zwe,command:Awe,createParagraphNear:Bwe,cut:Fwe,deleteCurrentNode:Vwe,deleteNode:Hwe,deleteRange:Wwe,deleteSelection:Uwe,enter:Zwe,exitCode:Gwe,extendMarkRange:Kwe,first:qwe,focus:Jwe,forEach:Xwe,insertContent:Qwe,insertContentAt:nbe,joinUp:rbe,joinDown:obe,joinBackward:ibe,joinForward:sbe,joinItemBackward:abe,joinItemForward:lbe,keyboardShortcut:ube,lift:dbe,liftEmptyBlock:fbe,liftListItem:pbe,newlineInCode:hbe,resetAttributes:mbe,scrollIntoView:gbe,selectAll:vbe,selectNodeBackward:ybe,selectNodeForward:_be,selectParentNode:wbe,selectTextblockEnd:bbe,selectTextblockStart:xbe,setContent:Sbe,setMark:Rbe,setMeta:zbe,setNode:Abe,setNodeSelection:Bbe,setTextSelection:Fbe,sinkListItem:Vbe,splitBlock:Hbe,splitListItem:Wbe,toggleList:Ube,toggleMark:Zbe,toggleNode:Gbe,toggleWrap:Ybe,undoInputRule:Kbe,unsetAllMarks:qbe,unsetMark:Jbe,updateAttributes:Xbe,wrapIn:Qbe,wrapInList:exe});const nxe=br.create({name:"commands",addCommands(){return{...txe}}}),rxe=br.create({name:"editable",addProseMirrorPlugins(){return[new Zr({key:new Ai("editable"),props:{editable:()=>this.editor.options.editable}})]}}),oxe=br.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new Zr({key:new Ai("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}}}})]}}),ixe=br.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:g,parent:v}=p,y=p.parent.isTextblock?a.doc.resolve(g-1):p,w=y.parent.type.spec.isolating,P=p.pos-p.parentOffset,x=w&&y.parent.childCount===1?P===p.pos:Ze.atStart(u).from===g;return!f||!x||!v.type.isTextblock||v.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 uO()||dO()?i:o},addProseMirrorPlugins(){return[new Zr({key:new Ai("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=Ze.atStart(t.doc).from,c=Ze.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,g=X0({state:n,transaction:p}),{commands:v}=new Q0({editor:this.editor,state:g});if(v.clearNodes(),!!p.steps.length)return p}})]}}),sxe=br.create({name:"tabindex",addProseMirrorPlugins(){return[new Zr({key:new Ai("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});var axe=Object.freeze({__proto__:null,ClipboardTextSerializer:Lwe,Commands:nxe,Editable:rxe,FocusEvents:oxe,Keymap:ixe,Tabindex:sxe});const lxe=`.ProseMirror { +`,textSerializers:s={}}=n||{};let a="",c=!0;return e.nodesBetween(r,o,(u,f,p,g)=>{var v;const y=s?.[u.type.name];y?(u.isBlock&&!c&&(a+=i,c=!0),p&&(a+=y({node:u,pos:f,parent:p,index:g,range:t}))):u.isText?(a+=(v=u?.text)===null||v===void 0?void 0:v.slice(Math.max(r,f)-f,o-f),c=!1):u.isBlock&&!c&&(a+=i,c=!0)}),a}function l9(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}const Lwe=br.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new Zr({key:new zi("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=l9(n);return a9(r,{from:s,to:a},{textSerializers:c})}}})]}}),Dwe=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window?.getSelection())===null||n===void 0||n.removeAllRanges())}),!0),Rwe=(e=!1)=>({commands:t})=>t.setContent("",e),zwe=()=>({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)),g=u.resolve(f.map(c+a.nodeSize)),v=p.blockRange(g);if(!v)return;const y=Eu(v);if(a.type.isTextblock){const{defaultType:w}=p.parent.contentMatchAt(p.index());t.setNodeMarkup(v.start,w)}(y||y===0)&&t.lift(v,y)})}),!0},Awe=e=>t=>e(t),Bwe=()=>({state:e,dispatch:t})=>lwe(e,t),Fwe=(e,t)=>({editor:n,tr:r})=>{const{state:o}=n,i=o.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);const s=r.mapping.map(t);return r.insert(s,i.content),r.setSelection(new Ve(r.doc.resolve(s-1))),!0},Vwe=()=>({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},Hwe=e=>({tr:t,state:n,dispatch:r})=>{const o=Mn(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},Wwe=e=>({tr:t,dispatch:n})=>{const{from:r,to:o}=e;return n&&t.delete(r,o),!0},Uwe=()=>({state:e,dispatch:t})=>q_e(e,t),Zwe=()=>({commands:e})=>e.keyboardShortcut("Enter"),Gwe=()=>({state:e,dispatch:t})=>awe(e,t);function Zv(e,t,n={strict:!0}){const r=Object.keys(t);return r.length?r.every(o=>n.strict?t[o]===e[o]:lO(t[o])?t[o].test(e[o]):t[o]===e[o]):!0}function bx(e,t,n={}){return e.find(r=>r.type===t&&Zv(r.attrs,n))}function Ywe(e,t,n={}){return!!bx(e,t,n)}function cO(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=bx([...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(bx([...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=Ra(e,r.schema),{doc:s,selection:a}=n,{$from:c,from:u,to:f}=a;if(o){const p=cO(c,i,t);if(p&&p.from<=u&&p.to>=f){const g=Ve.create(s,p.from,p.to);n.setSelection(g)}}return!0},qwe=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=()=>{uO()&&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&&!c9(n.state.selection))return s(),!0;const a=u9(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},Xwe=(e,t)=>n=>e.every((r,o)=>t(r,{...n,index:o})),Qwe=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t);function pI(e){const t=`${e}`;return new window.DOMParser().parseFromString(t,"text/html").body}function Gv(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),Gv("",t,n)}if(typeof e=="string"){const r=du.fromSchema(t);return n.slice?r.parseSlice(pI(e),n.parseOptions).content:r.parse(pI(e),n.parseOptions)}return Gv("",t,n)}function ebe(e,t,n){const r=e.steps.length-1;if(r{s===0&&(s=f)}),e.setSelection(Ze.near(e.doc.resolve(s),n))}const tbe=e=>e.toString().startsWith("<"),nbe=(e,t,n)=>({tr:r,dispatch:o,editor:i})=>{if(o){n={parseOptions:{},updateSelection:!0,...n};const s=Gv(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}:{from:e.from,to:e.to},u=!0,f=!0;if((tbe(s)?s:[s]).forEach(g=>{g.check(),u=u?g.isText&&g.marks.length===0:!1,f=f?g.isBlock:!1}),a===c&&f){const{parent:g}=r.doc.resolve(a);g.isTextblock&&!g.type.spec.code&&!g.childCount&&(a-=1,c+=1)}u?Array.isArray(t)?r.insertText(t.map(g=>g.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&&ebe(r,r.steps.length-1,-1)}return!0},rbe=()=>({state:e,dispatch:t})=>rwe(e,t),obe=()=>({state:e,dispatch:t})=>owe(e,t),ibe=()=>({state:e,dispatch:t})=>X_e(e,t),sbe=()=>({state:e,dispatch:t})=>twe(e,t),abe=()=>({tr:e,state:t,dispatch:n})=>{try{const r=Z0(t.doc,t.selection.$from.pos,-1);return r==null?!1:(e.join(r,2),n&&n(e),!0)}catch{return!1}},lbe=()=>({state:e,dispatch:t,tr:n})=>{try{const r=Z0(e.doc,e.selection.$from.pos,1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}};function dO(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function cbe(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=cbe(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 wf(e,t,n={}){const{from:r,to:o,empty:i}=e.selection,s=t?Mn(t,e.schema):null,a=[];e.doc.nodesBetween(r,o,(p,g)=>{if(p.isText)return;const v=Math.max(r,g),y=Math.min(o,g+p.nodeSize);a.push({node:p,from:v,to:y})});const c=o-r,u=a.filter(p=>s?s.name===p.node.type.name:!0).filter(p=>Zv(p.node.attrs,n,{strict:!1}));return i?!!u.length:u.reduce((p,g)=>p+g.to-g.from,0)>=c}const dbe=(e,t={})=>({state:n,dispatch:r})=>{const o=Mn(e,n.schema);return wf(n,o,t)?iwe(n,r):!1},fbe=()=>({state:e,dispatch:t})=>cwe(e,t),pbe=e=>({state:t,dispatch:n})=>{const r=Mn(e,t.schema);return vwe(r)(t,n)},hbe=()=>({state:e,dispatch:t})=>swe(e,t);function n1(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function hI(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 mbe=(e,t)=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=n1(typeof e=="string"?e:e.name,r.schema);return a?(a==="node"&&(i=Mn(e,r.schema)),a==="mark"&&(s=Ra(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,hI(u.attrs,t)),s&&u.marks.length&&u.marks.forEach(p=>{s===p.type&&n.addMark(f,f+u.nodeSize,s.create(hI(p.attrs,t)))})})}),!0):!1},gbe=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),vbe=()=>({tr:e,commands:t})=>t.setTextSelection({from:0,to:e.doc.content.size}),ybe=()=>({state:e,dispatch:t})=>Q_e(e,t),_be=()=>({state:e,dispatch:t})=>nwe(e,t),wbe=()=>({state:e,dispatch:t})=>uwe(e,t),bbe=()=>({state:e,dispatch:t})=>pwe(e,t),xbe=()=>({state:e,dispatch:t})=>fwe(e,t);function d9(e,t,n={}){return Gv(e,t,{slice:!1,parseOptions:n})}const Sbe=(e,t=!1,n={})=>({tr:r,editor:o,dispatch:i})=>{const{doc:s}=r,a=d9(e,o.schema,n);return i&&r.replaceWith(0,s.content.size,a).setMeta("preventUpdate",!t),!0};function Xf(e,t){const n=Ra(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 Pbe(e,t){const n=new _7(e);return t.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function Obe(e){for(let t=0;t{n(o)&&r.push({node:o,pos:i})}),r}function kbe(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 fO(e){return t=>kbe(t.$from,e)}function Ebe(e,t){const n=Ei.fromSchema(t).serializeFragment(e),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}function $be(e,t){const n={from:0,to:e.content.size};return a9(e,n,t)}function Mbe(e,t){const n=Mn(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 f9(e,t){const n=n1(typeof t=="string"?t:t.name,e.schema);return n==="node"?Mbe(e,t):n==="mark"?Xf(e,t):{}}function Nbe(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 Tbe(e){const t=Nbe(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 Ibe(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),g=t.invert().map(f);r.push({oldRange:{from:p,to:g},newRange:{from:u,to:f}})})}),Tbe(r)}function pO(e,t,n){const r=[];return e===t?n.resolve(e).marks().forEach(o=>{const i=n.resolve(e-1),s=cO(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 Xh(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 xx(e,t,n={}){const{empty:r,ranges:o}=e.selection,i=t?Ra(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(p=>i?i.name===p.type.name:!0).find(p=>Zv(p.attrs,n,{strict:!1}));let s=0;const a=[];if(o.forEach(({$from:p,$to:g})=>{const v=p.pos,y=g.pos;e.doc.nodesBetween(v,y,(w,P)=>{if(!w.isText&&!w.marks.length)return;const x=Math.max(v,P),S=Math.min(y,P+w.nodeSize),O=S-x;s+=O,a.push(...w.marks.map(E=>({mark:E,from:x,to:S})))})}),s===0)return!1;const c=a.filter(p=>i?i.name===p.mark.type.name:!0).filter(p=>Zv(p.mark.attrs,n,{strict:!1})).reduce((p,g)=>p+g.to-g.from,0),u=a.filter(p=>i?p.mark.type!==i&&p.mark.type.excludes(i):!0).reduce((p,g)=>p+g.to-g.from,0);return(c>0?c+u:c)>=s}function jbe(e,t,n={}){if(!t)return wf(e,null,n)||xx(e,null,n);const r=n1(t,e.schema);return r==="node"?wf(e,t,n):r==="mark"?xx(e,t,n):!1}function mI(e,t){const{nodeExtensions:n}=Q0(t),r=n.find(s=>s.name===e);if(!r)return!1;const o={name:r.name,options:r.options,storage:r.storage},i=Ue(Ce(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function Lbe(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 Dbe(e,t,n){var r;const{selection:o}=t;let i=null;if(c9(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,g)=>{if(u)return!1;if(f.isInline){const v=!g||g.type.allowsMarkType(n),y=!!n.isInSet(f.marks)||!f.marks.some(w=>w.type.excludes(n));u=v&&y}return!u}),u})}const Rbe=(e,t={})=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=n,{empty:s,ranges:a}=i,c=Ra(e,r.schema);if(o)if(s){const u=Xf(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,(g,v)=>{const y=Math.max(v,f),w=Math.min(v+g.nodeSize,p);g.marks.find(x=>x.type===c)?g.marks.forEach(x=>{c===x.type&&n.addMark(y,w,c.create({...x.attrs,...t}))}):n.addMark(y,w,c.create(t))})});return Dbe(r,n,c)},zbe=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),Abe=(e,t={})=>({state:n,dispatch:r,chain:o})=>{const i=Mn(e,n.schema);return i.isTextblock?o().command(({commands:s})=>cI(i,t)(n)?!0:s.clearNodes()).command(({state:s})=>cI(i,t)(s,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},Bbe=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,o=pl(e,0,r.content.size),i=Le.create(r,o);t.setSelection(i)}return!0},Fbe=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,{from:o,to:i}=typeof e=="number"?{from:e,to:e}:e,s=Ve.atStart(r).from,a=Ve.atEnd(r).to,c=pl(o,s,a),u=pl(i,s,a),f=Ve.create(r,c,u);t.setSelection(f)}return!0},Vbe=e=>({state:t,dispatch:n})=>{const r=Mn(e,t.schema);return wwe(r)(t,n)};function gI(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 Hbe=({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=Xh(u,a.node().type.name,a.node().attrs);if(i instanceof Le&&i.node.isBlock)return!a.parentOffset||!Gc(s,a.pos)?!1:(r&&(e&&gI(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 Ve&&t.deleteSelection();const g=a.depth===0?void 0:Obe(a.node(-1).contentMatchAt(a.indexAfter(-1)));let v=p&&g?[{type:g,attrs:f}]:void 0,y=Gc(t.doc,t.mapping.map(a.pos),1,v);if(!v&&!y&&Gc(t.doc,t.mapping.map(a.pos),1,g?[{type:g}]:void 0)&&(y=!0,v=g?[{type:g,attrs:f}]:void 0),y&&(t.split(t.mapping.map(a.pos),1,v),g&&!p&&!a.parentOffset&&a.parent.type!==g)){const w=t.mapping.map(a.before()),P=t.doc.resolve(w);a.node(-1).canReplaceWith(P.index(),P.index()+1,g)&&t.setNodeMarkup(t.mapping.map(a.before()),g)}e&&gI(n,o.extensionManager.splittableMarks),t.scrollIntoView()}return!0},Wbe=e=>({tr:t,state:n,dispatch:r,editor:o})=>{var i;const s=Mn(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 P=se.empty;const x=a.index(-1)?1:a.index(-2)?2:3;for(let I=a.depth-x;I>=a.depth-3;I-=1)P=se.from(a.node(I).copy(P));const S=a.indexAfter(-1){if(N>-1)return!1;I.isTextblock&&I.content.size===0&&(N=R+1)}),N>-1&&t.setSelection(Ve.near(t.doc.resolve(N))),t.scrollIntoView()}return!0}const g=c.pos===a.end()?f.contentMatchAt(0).defaultType:null,v=Xh(p,f.type.name,f.attrs),y=Xh(p,a.node().type.name,a.node().attrs);t.delete(a.pos,c.pos);const w=g?[{type:s,attrs:v},{type:g,attrs:y}]:[{type:s,attrs:v}];if(!Gc(t.doc,a.pos,2))return!1;if(r){const{selection:P,storedMarks:x}=n,{splittableMarks:S}=o.extensionManager,O=x||P.$to.parentOffset&&P.$from.marks();if(t.split(a.pos,2,w).scrollIntoView(),!O||!r)return!0;const E=O.filter($=>S.includes($.type.name));t.ensureMarks(E)}return!0},hw=(e,t)=>{const n=fO(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&&La(e.doc,n.pos)&&e.join(n.pos),!0},mw=(e,t)=>{const n=fO(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&&La(e.doc,r)&&e.join(r),!0},Ube=(e,t,n,r={})=>({editor:o,tr:i,state:s,dispatch:a,chain:c,commands:u,can:f})=>{const{extensions:p,splittableMarks:g}=o.extensionManager,v=Mn(e,s.schema),y=Mn(t,s.schema),{selection:w,storedMarks:P}=s,{$from:x,$to:S}=w,O=x.blockRange(S),E=P||w.$to.parentOffset&&w.$from.marks();if(!O)return!1;const $=fO(N=>mI(N.type.name,p))(w);if(O.depth>=1&&$&&O.depth-$.depth<=1){if($.node.type===v)return u.liftListItem(y);if(mI($.node.type.name,p)&&v.validContent($.node.content)&&a)return c().command(()=>(i.setNodeMarkup($.pos,v),!0)).command(()=>hw(i,v)).command(()=>mw(i,v)).run()}return!n||!E||!a?c().command(()=>f().wrapInList(v,r)?!0:u.clearNodes()).wrapInList(v,r).command(()=>hw(i,v)).command(()=>mw(i,v)).run():c().command(()=>{const N=f().wrapInList(v,r),I=E.filter(R=>g.includes(R.type.name));return i.ensureMarks(I),N?!0:u.clearNodes()}).wrapInList(v,r).command(()=>hw(i,v)).command(()=>mw(i,v)).run()},Zbe=(e,t={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=n,s=Ra(e,r.schema);return xx(r,s,t)?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,t)},Gbe=(e,t,n={})=>({state:r,commands:o})=>{const i=Mn(e,r.schema),s=Mn(t,r.schema);return wf(r,i,n)?o.setNode(s):o.setNode(i,n)},Ybe=(e,t={})=>({state:n,commands:r})=>{const o=Mn(e,n.schema);return wf(n,o,t)?r.lift(o):r.wrapIn(o,t)},Kbe=()=>({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},qbe=()=>({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},Jbe=(e,t={})=>({tr:n,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:s=!1}=t,{selection:a}=n,c=Ra(e,r.schema),{$from:u,empty:f,ranges:p}=a;if(!o)return!0;if(f&&s){let{from:g,to:v}=a;const y=(i=u.marks().find(P=>P.type===c))===null||i===void 0?void 0:i.attrs,w=cO(u,c,y);w&&(g=w.from,v=w.to),n.removeMark(g,v,c)}else p.forEach(g=>{n.removeMark(g.$from.pos,g.$to.pos,c)});return n.removeStoredMark(c),!0},Xbe=(e,t={})=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=n1(typeof e=="string"?e:e.name,r.schema);return a?(a==="node"&&(i=Mn(e,r.schema)),a==="mark"&&(s=Ra(e,r.schema)),o&&n.selection.ranges.forEach(c=>{const u=c.$from.pos,f=c.$to.pos;r.doc.nodesBetween(u,f,(p,g)=>{i&&i===p.type&&n.setNodeMarkup(g,void 0,{...p.attrs,...t}),s&&p.marks.length&&p.marks.forEach(v=>{if(s===v.type){const y=Math.max(g,u),w=Math.min(g+p.nodeSize,f);n.addMark(y,w,s.create({...v.attrs,...t}))}})})}),!0):!1},Qbe=(e,t={})=>({state:n,dispatch:r})=>{const o=Mn(e,n.schema);return hwe(o,t)(n,r)},exe=(e,t={})=>({state:n,dispatch:r})=>{const o=Mn(e,n.schema);return mwe(o,t)(n,r)};var txe=Object.freeze({__proto__:null,blur:Dwe,clearContent:Rwe,clearNodes:zwe,command:Awe,createParagraphNear:Bwe,cut:Fwe,deleteCurrentNode:Vwe,deleteNode:Hwe,deleteRange:Wwe,deleteSelection:Uwe,enter:Zwe,exitCode:Gwe,extendMarkRange:Kwe,first:qwe,focus:Jwe,forEach:Xwe,insertContent:Qwe,insertContentAt:nbe,joinUp:rbe,joinDown:obe,joinBackward:ibe,joinForward:sbe,joinItemBackward:abe,joinItemForward:lbe,keyboardShortcut:ube,lift:dbe,liftEmptyBlock:fbe,liftListItem:pbe,newlineInCode:hbe,resetAttributes:mbe,scrollIntoView:gbe,selectAll:vbe,selectNodeBackward:ybe,selectNodeForward:_be,selectParentNode:wbe,selectTextblockEnd:bbe,selectTextblockStart:xbe,setContent:Sbe,setMark:Rbe,setMeta:zbe,setNode:Abe,setNodeSelection:Bbe,setTextSelection:Fbe,sinkListItem:Vbe,splitBlock:Hbe,splitListItem:Wbe,toggleList:Ube,toggleMark:Zbe,toggleNode:Gbe,toggleWrap:Ybe,undoInputRule:Kbe,unsetAllMarks:qbe,unsetMark:Jbe,updateAttributes:Xbe,wrapIn:Qbe,wrapInList:exe});const nxe=br.create({name:"commands",addCommands(){return{...txe}}}),rxe=br.create({name:"editable",addProseMirrorPlugins(){return[new Zr({key:new zi("editable"),props:{editable:()=>this.editor.options.editable}})]}}),oxe=br.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new Zr({key:new zi("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}}}})]}}),ixe=br.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:g,parent:v}=p,y=p.parent.isTextblock?a.doc.resolve(g-1):p,w=y.parent.type.spec.isolating,P=p.pos-p.parentOffset,x=w&&y.parent.childCount===1?P===p.pos:Ze.atStart(u).from===g;return!f||!x||!v.type.isTextblock||v.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 uO()||dO()?i:o},addProseMirrorPlugins(){return[new Zr({key:new zi("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=Ze.atStart(t.doc).from,c=Ze.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,g=J0({state:n,transaction:p}),{commands:v}=new X0({editor:this.editor,state:g});if(v.clearNodes(),!!p.steps.length)return p}})]}}),sxe=br.create({name:"tabindex",addProseMirrorPlugins(){return[new Zr({key:new zi("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});var axe=Object.freeze({__proto__:null,ClipboardTextSerializer:Lwe,Commands:nxe,Editable:rxe,FocusEvents:oxe,Keymap:ixe,Tabindex:sxe});const lxe=`.ProseMirror { position: relative; } @@ -662,20 +662,20 @@ img.ProseMirror-separator { .tippy-box[data-animation=fade][data-state=hidden] { opacity: 0 -}`;function cxe(e,t,n){const r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(r!==null)return r;const o=document.createElement("style");return t&&o.setAttribute("nonce",t),o.setAttribute(`data-tiptap-style${n?`-${n}`:""}`,""),o.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(o),o}let uxe=class extends bwe{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=cxe(lxe,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=s9(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(axe):[],...this.options.extensions].filter(r=>["extension","node","mark"].includes(r?.type));this.extensionManager=new Nc(n,this)}createCommandManager(){this.commandManager=new Q0({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){const t=d9(this.options.content,this.schema,this.options.parseOptions),n=u9(t,this.options.autofocus);this.view=new B_e(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(),this.prependClass();const o=this.view.dom;o.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}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 f9(this.state,t)}isActive(t,n){const r=typeof t=="string"?t:null,o=typeof t=="string"?n:t;return jbe(this.state,r,o)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Ebe(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:n=` +}`;function cxe(e,t,n){const r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(r!==null)return r;const o=document.createElement("style");return t&&o.setAttribute("nonce",t),o.setAttribute(`data-tiptap-style${n?`-${n}`:""}`,""),o.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(o),o}let uxe=class extends bwe{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=cxe(lxe,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=s9(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(axe):[],...this.options.extensions].filter(r=>["extension","node","mark"].includes(r?.type));this.extensionManager=new Nc(n,this)}createCommandManager(){this.commandManager=new X0({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){const t=d9(this.options.content,this.schema,this.options.parseOptions),n=u9(t,this.options.autofocus);this.view=new B_e(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(),this.prependClass();const o=this.view.dom;o.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}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 f9(this.state,t)}isActive(t,n){const r=typeof t=="string"?t:null,o=typeof t=="string"?n:t;return jbe(this.state,r,o)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Ebe(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:n=` -`,textSerializers:r={}}=t||{};return $be(this.state.doc,{blockSeparator:n,textSerializers:{...l9(this.schema),...r}})}get isEmpty(){return Lbe(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 Ll(e){return new t1({find:e.find,handler:({state:t,range:n,match:r})=>{const o=Ue(e.getAttributes,void 0,r);if(o===!1||o===null)return null;const{tr:i}=t,s=r[r.length-1],a=r[0];if(s){const c=a.search(/\S/),u=n.from+a.indexOf(s),f=u+s.length;if(pO(n.from,n.to,t.doc).filter(v=>v.mark.type.excluded.find(w=>w===e.type&&w!==v.mark.type)).filter(v=>v.to>u).length)return null;fn.from&&i.delete(n.from+c,u);const g=n.from+c+s.length;i.addMark(n.from+c,g,e.type.create(o||{})),i.removeStoredMark(e.type)}}})}function p9(e){return new t1({find:e.find,handler:({state:t,range:n,match:r})=>{const o=Ue(e.getAttributes,void 0,r)||{},{tr:i}=t,s=n.from;let a=n.to;const c=e.type.create(o);if(r[1]){const u=r[0].lastIndexOf(r[1]);let f=s+u;f>a?f=a:a=f+r[1].length;const p=r[0][r[0].length-1];i.insertText(p,s+r[0].length-1),i.replaceWith(f,a,c)}else r[0]&&i.insert(s-1,e.type.create(o)).delete(i.mapping.map(s),i.mapping.map(a));i.scrollIntoView()}})}function Px(e){return new t1({find:e.find,handler:({state:t,range:n,match:r})=>{const o=t.doc.resolve(n.from),i=Ue(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 xf(e){return new t1({find:e.find,handler:({state:t,range:n,match:r,chain:o})=>{const i=Ue(e.getAttributes,void 0,r)||{},s=t.tr.delete(n.from,n.to),c=s.doc.resolve(n.from).blockRange(),u=c&&qP(c,e.type,i);if(!u)return null;if(s.wrap(c,u),e.keepMarks&&e.editor){const{selection:p,storedMarks:g}=t,{splittableMarks:v}=e.editor.extensionManager,y=g||p.$to.parentOffset&&p.$from.marks();if(y){const w=y.filter(P=>v.includes(P.type.name));s.ensureMarks(w)}}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&&La(s.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,f))&&s.join(n.from-1)}})}class or{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=Ue(Ce(this,"addOptions",{name:this.name}))),this.storage=Ue(Ce(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new or(t)}configure(t={}){const n=this.extend();return n.options=n1(this.options,t),n.storage=Ue(Ce(n,"addStorage",{name:n.name,options:n.options})),n}extend(t={}){const n=new or(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=Ue(Ce(n,"addOptions",{name:n.name})),n.storage=Ue(Ce(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}}let Gr=class Ox{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=Ue(Ce(this,"addOptions",{name:this.name}))),this.storage=Ue(Ce(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new Ox(t)}configure(t={}){const n=this.extend();return n.options=n1(this.options,t),n.storage=Ue(Ce(n,"addStorage",{name:n.name,options:n.options})),n}extend(t={}){const n=new Ox(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=Ue(Ce(n,"addOptions",{name:n.name})),n.storage=Ue(Ce(n,"addStorage",{name:n.name,options:n.options})),n}};function ka(e){return new $we({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:o})=>{const i=Ue(e.getAttributes,void 0,r,o);if(i===!1||i===null)return null;const{tr:s}=t,a=r[r.length-1],c=r[0];let u=n.to;if(a){const f=c.search(/\S/),p=n.from+c.indexOf(a),g=p+a.length;if(pO(n.from,n.to,t.doc).filter(y=>y.mark.type.excluded.find(P=>P===e.type&&P!==y.mark.type)).filter(y=>y.to>p).length)return null;gn.from&&s.delete(n.from+f,p),u=n.from+f+a.length,s.addMark(n.from+f,u,e.type.create(i||{})),s.removeStoredMark(e.type)}}})}const dxe=({renderers:e})=>k.createElement(k.Fragment,null,Object.entries(e).map(([t,n])=>gq.createPortal(n.reactElement,n.element,t)));class fxe extends k.Component{constructor(t){super(t),this.editorContentRef=k.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?xs.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 k.createElement(k.Fragment,null,k.createElement("div",{ref:this.editorContentRef,...n}),k.createElement(dxe,{renderers:this.state.renderers}))}}const pxe=e=>{const t=k.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return k.createElement(fxe,{key:t,...e})},hxe=k.memo(pxe);class mxe extends uxe{constructor(){super(...arguments),this.contentComponent=null}}function gxe(){const[,e]=_.useState(0);return()=>e(t=>t+1)}const h9=(e={},t=[])=>{const[n,r]=_.useState(null),o=gxe(),{onBeforeCreate:i,onBlur:s,onCreate:a,onDestroy:c,onFocus:u,onSelectionUpdate:f,onTransaction:p,onUpdate:g}=e,v=_.useRef(i),y=_.useRef(s),w=_.useRef(a),P=_.useRef(c),x=_.useRef(u),S=_.useRef(f),O=_.useRef(p),E=_.useRef(g);return _.useEffect(()=>{n&&(i&&(n.off("beforeCreate",v.current),n.on("beforeCreate",i),v.current=i),s&&(n.off("blur",y.current),n.on("blur",s),y.current=s),a&&(n.off("create",w.current),n.on("create",a),w.current=a),c&&(n.off("destroy",P.current),n.on("destroy",c),P.current=c),u&&(n.off("focus",x.current),n.on("focus",u),x.current=u),f&&(n.off("selectionUpdate",S.current),n.on("selectionUpdate",f),S.current=f),p&&(n.off("transaction",O.current),n.on("transaction",p),O.current=p),g&&(n.off("update",E.current),n.on("update",g),E.current=g))},[i,s,a,c,u,f,p,g,n]),_.useEffect(()=>{let $=!0;const N=new mxe(e);return r(N),N.on("transaction",()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{$&&o()})})}),()=>{$=!1}},t),_.useEffect(()=>()=>{n?.destroy()},[n]),n},vxe=_.createContext({editor:null});vxe.Consumer;const yxe=_.createContext({onDragStart:void 0}),_xe=()=>_.useContext(yxe);k.forwardRef((e,t)=>{const{onDragStart:n}=_xe(),r=e.as||"div";return k.createElement(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});var wxe=Object.defineProperty,vI=Object.getOwnPropertySymbols,bxe=Object.prototype.hasOwnProperty,xxe=Object.prototype.propertyIsEnumerable,yI=(e,t,n)=>t in e?wxe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vw=(e,t)=>{for(var n in t||(t={}))bxe.call(t,n)&&yI(e,n,t[n]);if(vI)for(var n of vI(t))xxe.call(t,n)&&yI(e,n,t[n]);return e};function Sxe(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 Pxe(e){return e?{"& li > p":{margin:0},"& ul li, & ol li":{marginTop:M(2)},"& ul, & ol":{marginTop:M(5),marginBottom:M(5)},"& p":{marginBottom:M(7)},"& h1, & h2, & h3, & h4, & h5, & h6, & p":{marginTop:0}}:null}var Oxe=ue((e,{withCodeHighlightStyles:t,withTypographyStyles:n})=>({typographyStylesProvider:vw({},Pxe(n)),content:vw({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":vw({content:"attr(data-placeholder)",pointerEvents:"none",userSelect:"none",float:"left",height:0},e.fn.placeholderStyles())},Sxe(t,e))}));const Cxe=Oxe;var kxe=Object.defineProperty,Kv=Object.getOwnPropertySymbols,m9=Object.prototype.hasOwnProperty,g9=Object.prototype.propertyIsEnumerable,_I=(e,t,n)=>t in e?kxe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Exe=(e,t)=>{for(var n in t||(t={}))m9.call(t,n)&&_I(e,n,t[n]);if(Kv)for(var n of Kv(t))g9.call(t,n)&&_I(e,n,t[n]);return e},$xe=(e,t)=>{var n={};for(var r in e)m9.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&&g9.call(e,r)&&(n[r]=e[r]);return n};const Mxe={},v9=_.forwardRef((e,t)=>{const n=ae("RichTextEditorContent",Mxe,e),{className:r}=n,o=$xe(n,["className"]),{editor:i,withCodeHighlightStyles:s,withTypographyStyles:a,classNames:c,styles:u,unstyled:f,variant:p}=ja(),{classes:g,cx:v}=Cxe({withCodeHighlightStyles:s,withTypographyStyles:a},{name:"RichTextEditor",classNames:c,styles:u,unstyled:f,variant:p});return k.createElement(c8,{className:v(g.typographyStylesProvider,r),unstyled:!a||f,ref:t},k.createElement(Pe,Exe({component:hxe,editor:i,className:g.content},o)))});v9.displayName="@mantine/tiptap/Content";var Nxe=Object.defineProperty,wI=Object.getOwnPropertySymbols,Txe=Object.prototype.hasOwnProperty,Ixe=Object.prototype.propertyIsEnumerable,bI=(e,t,n)=>t in e?Nxe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xI=(e,t)=>{for(var n in t||(t={}))Txe.call(t,n)&&bI(e,n,t[n]);if(wI)for(var n of wI(t))Ixe.call(t,n)&&bI(e,n,t[n]);return e},jxe=ue(e=>{const t=e.fn.variant({variant:"light"});return{control:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,minWidth:M(26),height:M(26),display:"flex",justifyContent:"center",alignItems:"center",border:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,borderRadius:e.fn.radius(),cursor:"default","&[data-interactive]":xI({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":xI({},e.fn.hover({backgroundColor:t.hover}))}}}});const Lxe=jxe;var Dxe=Object.defineProperty,qv=Object.getOwnPropertySymbols,y9=Object.prototype.hasOwnProperty,_9=Object.prototype.propertyIsEnumerable,SI=(e,t,n)=>t in e?Dxe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rxe=(e,t)=>{for(var n in t||(t={}))y9.call(t,n)&&SI(e,n,t[n]);if(qv)for(var n of qv(t))_9.call(t,n)&&SI(e,n,t[n]);return e},zxe=(e,t)=>{var n={};for(var r in e)y9.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&qv)for(var r of qv(e))t.indexOf(r)<0&&_9.call(e,r)&&(n[r]=e[r]);return n};const Axe={interactive:!0},ep=_.forwardRef((e,t)=>{const n=ae("RichTextEditorControl",Axe,e),{className:r,active:o,children:i,interactive:s}=n,a=zxe(n,["className","active","children","interactive"]),{classNames:c,styles:u,unstyled:f,variant:p}=ja(),{classes:g,cx:v}=Lxe(null,{name:"RichTextEditor",classNames:c,styles:u,unstyled:f,variant:p});return k.createElement(ls,Rxe({className:v(g.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)});ep.displayName="@mantine/tiptap/Control";var Bxe=ue(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 Fxe=Bxe;var Vxe=Object.defineProperty,Jv=Object.getOwnPropertySymbols,w9=Object.prototype.hasOwnProperty,b9=Object.prototype.propertyIsEnumerable,PI=(e,t,n)=>t in e?Vxe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hxe=(e,t)=>{for(var n in t||(t={}))w9.call(t,n)&&PI(e,n,t[n]);if(Jv)for(var n of Jv(t))b9.call(t,n)&&PI(e,n,t[n]);return e},Wxe=(e,t)=>{var n={};for(var r in e)w9.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&&b9.call(e,r)&&(n[r]=e[r]);return n};const Uxe={},x9=_.forwardRef((e,t)=>{const n=ae("RichTextEditorControlsGroup",Uxe,e),{className:r,children:o}=n,i=Wxe(n,["className","children"]),{classNames:s,styles:a,unstyled:c}=ja(),{classes:u,cx:f}=Fxe(null,{name:"RichTextEditor",classNames:s,styles:a,unstyled:c});return k.createElement(Pe,Hxe({className:f(u.controlsGroup,r),ref:t},i),o)});x9.displayName="@mantine/tiptap/ControlsGroup";var Zxe=ue((e,{sticky:t,stickyOffset:n})=>({toolbar:{position:t?"sticky":"static",top:t?M(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:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`}}));const Gxe=Zxe;var Yxe=Object.defineProperty,Xv=Object.getOwnPropertySymbols,S9=Object.prototype.hasOwnProperty,P9=Object.prototype.propertyIsEnumerable,OI=(e,t,n)=>t in e?Yxe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kxe=(e,t)=>{for(var n in t||(t={}))S9.call(t,n)&&OI(e,n,t[n]);if(Xv)for(var n of Xv(t))P9.call(t,n)&&OI(e,n,t[n]);return e},qxe=(e,t)=>{var n={};for(var r in e)S9.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&&P9.call(e,r)&&(n[r]=e[r]);return n};const Jxe={stickyOffset:0},O9=_.forwardRef((e,t)=>{const n=ae("RichTextEditorToolbar",Jxe,e),{className:r,children:o,sticky:i,stickyOffset:s}=n,a=qxe(n,["className","children","sticky","stickyOffset"]),c=ja(),{classes:u,cx:f}=Gxe({sticky:i,stickyOffset:s},{name:"RichTextEditor",classNames:c.classNames,styles:c.styles,unstyled:c.unstyled,variant:c.variant});return k.createElement(nt,Kxe({className:f(u.toolbar,r),ref:t},a),o)});O9.displayName="@mantine/tiptap/Toolbar";const Xxe={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 Qxe=ue(e=>({root:{position:"relative",border:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,borderRadius:e.fn.radius()}}));const eSe=Qxe;var tSe=Object.defineProperty,Qv=Object.getOwnPropertySymbols,C9=Object.prototype.hasOwnProperty,k9=Object.prototype.propertyIsEnumerable,CI=(e,t,n)=>t in e?tSe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nSe=(e,t)=>{for(var n in t||(t={}))C9.call(t,n)&&CI(e,n,t[n]);if(Qv)for(var n of Qv(t))k9.call(t,n)&&CI(e,n,t[n]);return e},rSe=(e,t)=>{var n={};for(var r in e)C9.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Qv)for(var r of Qv(e))t.indexOf(r)<0&&k9.call(e,r)&&(n[r]=e[r]);return n};const hO=_.forwardRef((e,t)=>{var n=e,{className:r,active:o,icon:i}=n,s=rSe(n,["className","active","icon"]);return k.createElement(ep,nSe({active:o,ref:t},s),k.createElement(i,{size:"1rem"}))});hO.displayName="@mantine/tiptap/ControlBase";var oSe=Object.defineProperty,kI=Object.getOwnPropertySymbols,iSe=Object.prototype.hasOwnProperty,sSe=Object.prototype.propertyIsEnumerable,EI=(e,t,n)=>t in e?oSe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,aSe=(e,t)=>{for(var n in t||(t={}))iSe.call(t,n)&&EI(e,n,t[n]);if(kI)for(var n of kI(t))sSe.call(t,n)&&EI(e,n,t[n]);return e};function $t({label:e,isActive:t,operation:n,icon:r}){return _.forwardRef((o,i)=>{const{editor:s,labels:a}=ja(),c=a[e];return k.createElement(hO,aSe({"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 lSe=Object.defineProperty,cSe=Object.defineProperties,uSe=Object.getOwnPropertyDescriptors,$I=Object.getOwnPropertySymbols,dSe=Object.prototype.hasOwnProperty,fSe=Object.prototype.propertyIsEnumerable,MI=(e,t,n)=>t in e?lSe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mt=(e,t)=>{for(var n in t||(t={}))dSe.call(t,n)&&MI(e,n,t[n]);if($I)for(var n of $I(t))fSe.call(t,n)&&MI(e,n,t[n]);return e},Nt=(e,t)=>cSe(e,uSe(t));const pSe=$t({label:"boldControlLabel",icon:e=>k.createElement(lhe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"bold"},operation:{name:"toggleBold"}}),hSe=$t({label:"italicControlLabel",icon:e=>k.createElement(khe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"italic"},operation:{name:"toggleItalic"}}),mSe=$t({label:"underlineControlLabel",icon:e=>k.createElement(Ghe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"underline"},operation:{name:"toggleUnderline"}}),gSe=$t({label:"strikeControlLabel",icon:e=>k.createElement(Hhe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"strike"},operation:{name:"toggleStrike"}}),vSe=$t({label:"clearFormattingControlLabel",icon:e=>k.createElement(dhe,Nt(Mt({},e),{stroke:1.5})),operation:{name:"unsetAllMarks"}}),ySe=$t({label:"unlinkControlLabel",icon:e=>k.createElement(N8,Nt(Mt({},e),{stroke:1.5})),operation:{name:"unsetLink"}}),_Se=$t({label:"bulletListControlLabel",icon:e=>k.createElement(jhe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"bulletList"},operation:{name:"toggleBulletList"}}),wSe=$t({label:"orderedListControlLabel",icon:e=>k.createElement(Ihe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"orderedList"},operation:{name:"toggleOrderedList"}}),bSe=$t({label:"h1ControlLabel",icon:e=>k.createElement(whe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"heading",attributes:{level:1}},operation:{name:"toggleHeading",attributes:{level:1}}}),xSe=$t({label:"h2ControlLabel",icon:e=>k.createElement(bhe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"heading",attributes:{level:2}},operation:{name:"toggleHeading",attributes:{level:2}}}),SSe=$t({label:"h3ControlLabel",icon:e=>k.createElement(xhe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"heading",attributes:{level:3}},operation:{name:"toggleHeading",attributes:{level:3}}}),PSe=$t({label:"h4ControlLabel",icon:e=>k.createElement(She,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"heading",attributes:{level:4}},operation:{name:"toggleHeading",attributes:{level:4}}}),OSe=$t({label:"h5ControlLabel",icon:e=>k.createElement(Phe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"heading",attributes:{level:5}},operation:{name:"toggleHeading",attributes:{level:5}}}),CSe=$t({label:"h6ControlLabel",icon:e=>k.createElement(Ohe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"heading",attributes:{level:6}},operation:{name:"toggleHeading",attributes:{level:6}}}),kSe=$t({label:"blockquoteControlLabel",icon:e=>k.createElement(ahe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"blockquote"},operation:{name:"toggleBlockquote"}}),ESe=$t({label:"alignLeftControlLabel",icon:e=>k.createElement(the,Nt(Mt({},e),{stroke:1.5})),operation:{name:"setTextAlign",attributes:"left"}}),$Se=$t({label:"alignRightControlLabel",icon:e=>k.createElement(nhe,Nt(Mt({},e),{stroke:1.5})),operation:{name:"setTextAlign",attributes:"right"}}),MSe=$t({label:"alignCenterControlLabel",icon:e=>k.createElement(Qpe,Nt(Mt({},e),{stroke:1.5})),operation:{name:"setTextAlign",attributes:"center"}}),NSe=$t({label:"alignJustifyControlLabel",icon:e=>k.createElement(ehe,Nt(Mt({},e),{stroke:1.5})),operation:{name:"setTextAlign",attributes:"justify"}}),TSe=$t({label:"subscriptControlLabel",icon:e=>k.createElement(Whe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"subscript"},operation:{name:"toggleSubscript"}}),ISe=$t({label:"superscriptControlLabel",icon:e=>k.createElement(Uhe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"superscript"},operation:{name:"toggleSuperscript"}}),jSe=$t({label:"codeControlLabel",icon:e=>k.createElement(P8,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"code"},operation:{name:"toggleCode"}}),LSe=$t({label:"codeBlockControlLabel",icon:e=>k.createElement(P8,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"codeBlock"},operation:{name:"toggleCodeBlock"}}),DSe=$t({label:"highlightControlLabel",icon:e=>k.createElement(Che,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"highlight"},operation:{name:"toggleHighlight"}}),RSe=$t({label:"hrControlLabel",icon:e=>k.createElement(Mhe,Nt(Mt({},e),{stroke:1.5})),operation:{name:"setHorizontalRule"}}),zSe=$t({label:"unsetColorControlLabel",icon:e=>k.createElement(S8,Nt(Mt({},e),{stroke:1.5})),operation:{name:"unsetColor"}});var ASe=Object.defineProperty,NI=Object.getOwnPropertySymbols,BSe=Object.prototype.hasOwnProperty,FSe=Object.prototype.propertyIsEnumerable,TI=(e,t,n)=>t in e?ASe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,VSe=(e,t)=>{for(var n in t||(t={}))BSe.call(t,n)&&TI(e,n,t[n]);if(NI)for(var n of NI(t))FSe.call(t,n)&&TI(e,n,t[n]);return e},HSe=ue(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:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,height:M(24),width:M(24),display:"flex",justifyContent:"center",alignItems:"center",borderRadius:e.fn.radius(),"&[data-active]":VSe({backgroundColor:t.background,borderColor:t.border,color:t.color},e.fn.hover({background:t.hover}))},linkEditorSave:{borderTopLeftRadius:0,borderBottomLeftRadius:0}}});const WSe=HSe;var USe=Object.defineProperty,ZSe=Object.defineProperties,GSe=Object.getOwnPropertyDescriptors,ey=Object.getOwnPropertySymbols,E9=Object.prototype.hasOwnProperty,$9=Object.prototype.propertyIsEnumerable,II=(e,t,n)=>t in e?USe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cx=(e,t)=>{for(var n in t||(t={}))E9.call(t,n)&&II(e,n,t[n]);if(ey)for(var n of ey(t))$9.call(t,n)&&II(e,n,t[n]);return e},YSe=(e,t)=>ZSe(e,GSe(t)),M9=(e,t)=>{var n={};for(var r in e)E9.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ey)for(var r of ey(e))t.indexOf(r)<0&&$9.call(e,r)&&(n[r]=e[r]);return n};const KSe=e=>{var t=e,{size:n}=t,r=M9(t,["size"]);return k.createElement(Nhe,Cx({size:n,stroke:1.5},r))},qSe={initialExternal:!1},JSe=_.forwardRef((e,t)=>{const n=ae("RichTextEditorLinkControl",qSe,e),{icon:r,popoverProps:o,disableTooltips:i,initialExternal:s}=n,a=M9(n,["icon","popoverProps","disableTooltips","initialExternal"]),{editor:c,labels:u,classNames:f,styles:p,unstyled:g,variant:v}=ja(),{classes:y}=WSe(null,{name:"RichTextEditor",classNames:f,styles:p,unstyled:g,variant:v}),[w,P]=jG(""),[x,S]=_.useState(s),[O,{open:E,close:$}]=hS(!1),N=()=>{E();const z=c?.getAttributes("link");P(z?.href||""),S(z?.target==="_blank")},I=()=>{$(),P(""),S(s)},R=()=>{I(),w===""?c.chain().focus().extendMarkRange("link").unsetLink().run():c.chain().focus().extendMarkRange("link").setLink({href:w,target:x?"_blank":null}).run()},B=z=>{z.key==="Enter"&&(z.preventDefault(),R())};return gm("edit-link",N,!1),k.createElement(kn,Cx({trapFocus:!0,shadow:"md",withinPortal:!0,opened:O,onClose:I,offset:-44,zIndex:1e4,unstyled:g},o),k.createElement(kn.Target,null,k.createElement(hO,YSe(Cx({icon:r||KSe,"aria-label":u.linkControlLabel,title:u.linkControlLabel,onClick:N,active:c?.isActive("link"),unstyled:g},a),{ref:t}))),k.createElement(kn.Dropdown,{sx:z=>({backgroundColor:z.colorScheme==="dark"?z.colors.dark[7]:z.white})},k.createElement("div",{className:y.linkEditor},k.createElement(yn,{placeholder:u.linkEditorInputPlaceholder,"aria-label":u.linkEditorInputLabel,type:"url",value:w,onChange:P,classNames:{input:y.linkEditorInput},onKeyDown:B,unstyled:g,rightSection:k.createElement(At,{label:x?u.linkEditorExternalLink:u.linkEditorInternalLink,events:{hover:!0,focus:!0,touch:!0},withinPortal:!0,withArrow:!0,disabled:i,unstyled:g,zIndex:1e4},k.createElement(ls,{onClick:()=>S(z=>!z),"data-active":x||void 0,className:y.linkEditorExternalControl,unstyled:g},k.createElement(ghe,{size:M(14),stroke:1.5})))}),k.createElement(st,{variant:"default",onClick:R,className:y.linkEditorSave,unstyled:g},u.linkEditorSave))))});var XSe=Object.defineProperty,QSe=Object.defineProperties,ePe=Object.getOwnPropertyDescriptors,ty=Object.getOwnPropertySymbols,N9=Object.prototype.hasOwnProperty,T9=Object.prototype.propertyIsEnumerable,jI=(e,t,n)=>t in e?XSe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yw=(e,t)=>{for(var n in t||(t={}))N9.call(t,n)&&jI(e,n,t[n]);if(ty)for(var n of ty(t))T9.call(t,n)&&jI(e,n,t[n]);return e},tPe=(e,t)=>QSe(e,ePe(t)),nPe=(e,t)=>{var n={};for(var r in e)N9.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ty)for(var r of ty(e))t.indexOf(r)<0&&T9.call(e,r)&&(n[r]=e[r]);return n};const rPe={},I9=_.forwardRef((e,t)=>{const n=ae("RichTextEditorColorPickerControl",rPe,e),{popoverProps:r,colors:o,colorPickerProps:i}=n,s=nPe(n,["popoverProps","colors","colorPickerProps"]),{editor:a,labels:c,unstyled:u}=ja(),[f,{toggle:p,close:g}]=hS(!1),[v,y]=_.useState("palette"),w=ir(),P=a?.getAttributes("textStyle").color||(w.colorScheme==="dark"?w.colors.dark[1]:w.black),x=(E,$=!0)=>{a.chain().focus().setColor(E).run(),$&&g()},S=()=>{a.chain().focus().unsetColor().run(),g()},O=o.map((E,$)=>k.createElement(hf,{key:$,component:"button",color:E,onClick:()=>x(E),size:26,radius:"xs",sx:{cursor:"pointer"},title:c.colorPickerColorLabel(E),"aria-label":c.colorPickerColorLabel(E),unstyled:u}));return k.createElement(kn,yw({opened:f,withinPortal:!0,trapFocus:!0,onClose:g,unstyled:u},r),k.createElement(kn.Target,null,k.createElement(ep,tPe(yw({"aria-label":c.colorPickerControlLabel,title:c.colorPickerControlLabel},s),{ref:t,onClick:p}),k.createElement(hf,{color:P,size:14,unstyled:u}))),k.createElement(kn.Dropdown,{sx:()=>({backgroundColor:w.colorScheme==="dark"?w.colors.dark[7]:w.white})},v==="palette"&&k.createElement(IP,{cols:7,spacing:2},O),v==="colorPicker"&&k.createElement(t4,yw({defaultValue:P,onChange:E=>x(E,!1),unstyled:u},i)),k.createElement(At.Group,{closeDelay:200},k.createElement(nt,{position:"right",spacing:"xs",mt:"sm"},v==="palette"&&k.createElement(Qe,{variant:"default",onClick:g,unstyled:u,title:c.colorPickerCancel,"aria-label":c.colorPickerCancel},k.createElement(uu,{stroke:1.5,size:"1rem"})),k.createElement(Qe,{variant:"default",onClick:S,unstyled:u,title:c.colorPickerClear,"aria-label":c.colorPickerClear},k.createElement(S8,{stroke:1.5,size:"1rem"})),v==="palette"?k.createElement(Qe,{variant:"default",onClick:()=>y("colorPicker"),unstyled:u,title:c.colorPickerColorPicker,"aria-label":c.colorPickerColorPicker},k.createElement(phe,{stroke:1.5,size:"1rem"})):k.createElement(Qe,{variant:"default",onClick:()=>y("palette"),unstyled:u,"aria-label":c.colorPickerPalette,title:c.colorPickerPalette},k.createElement($8,{stroke:1.5,size:"1rem"})),v==="colorPicker"&&k.createElement(Qe,{variant:"default",onClick:g,unstyled:u,title:c.colorPickerSave,"aria-label":c.colorPickerSave},k.createElement(uhe,{stroke:1.5,size:"1rem"}))))))});I9.displayName="@mantine/tiptap/ColorPickerControl";var oPe=Object.defineProperty,iPe=Object.defineProperties,sPe=Object.getOwnPropertyDescriptors,ny=Object.getOwnPropertySymbols,j9=Object.prototype.hasOwnProperty,L9=Object.prototype.propertyIsEnumerable,LI=(e,t,n)=>t in e?oPe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,aPe=(e,t)=>{for(var n in t||(t={}))j9.call(t,n)&&LI(e,n,t[n]);if(ny)for(var n of ny(t))L9.call(t,n)&&LI(e,n,t[n]);return e},lPe=(e,t)=>iPe(e,sPe(t)),cPe=(e,t)=>{var n={};for(var r in e)j9.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ny)for(var r of ny(e))t.indexOf(r)<0&&L9.call(e,r)&&(n[r]=e[r]);return n};const uPe={},dPe=_.forwardRef((e,t)=>{const n=ae("RichTextEditorColorControl",uPe,e),{color:r}=n,o=cPe(n,["color"]),{editor:i,labels:s,unstyled:a}=ja(),c=i?.getAttributes("textStyle").color||null,u=s.colorControlLabel(r);return k.createElement(ep,lPe(aPe({active:c===r,"aria-label":u,title:u,onClick:()=>i.chain().focus().setColor(r).run()},o),{ref:t}),k.createElement(hf,{color:r,size:14,unstyled:a}))});var fPe=Object.defineProperty,pPe=Object.defineProperties,hPe=Object.getOwnPropertyDescriptors,ry=Object.getOwnPropertySymbols,D9=Object.prototype.hasOwnProperty,R9=Object.prototype.propertyIsEnumerable,DI=(e,t,n)=>t in e?fPe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_w=(e,t)=>{for(var n in t||(t={}))D9.call(t,n)&&DI(e,n,t[n]);if(ry)for(var n of ry(t))R9.call(t,n)&&DI(e,n,t[n]);return e},mPe=(e,t)=>pPe(e,hPe(t)),gPe=(e,t)=>{var n={};for(var r in e)D9.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ry)for(var r of ry(e))t.indexOf(r)<0&&R9.call(e,r)&&(n[r]=e[r]);return n};const vPe={withCodeHighlightStyles:!0,withTypographyStyles:!0},Ee=_.forwardRef((e,t)=>{const n=ae("RichTextEditor",vPe,e),{editor:r,children:o,className:i,labels:s,withCodeHighlightStyles:a,withTypographyStyles:c,classNames:u,styles:f,unstyled:p,variant:g}=n,v=gPe(n,["editor","children","className","labels","withCodeHighlightStyles","withTypographyStyles","classNames","styles","unstyled","variant"]),{classes:y,cx:w}=eSe(null,{name:"RichTextEditor",classNames:u,styles:f,unstyled:p,variant:g}),P=_.useMemo(()=>_w(_w({},Xxe),s),[s]);return k.createElement(y0e,{value:{editor:r,labels:P,withCodeHighlightStyles:a,withTypographyStyles:c,classNames:u,styles:f,unstyled:p,variant:g}},k.createElement(Pe,mPe(_w({className:w(y.root,i)},v),{ref:t}),o))});Ee.Content=v9;Ee.Control=ep;Ee.ControlsGroup=x9;Ee.Toolbar=O9;Ee.Bold=pSe;Ee.Italic=hSe;Ee.Strikethrough=gSe;Ee.Underline=mSe;Ee.ClearFormatting=vSe;Ee.H1=bSe;Ee.H2=xSe;Ee.H3=SSe;Ee.H4=PSe;Ee.H5=OSe;Ee.H6=CSe;Ee.BulletList=_Se;Ee.OrderedList=wSe;Ee.Link=JSe;Ee.Unlink=ySe;Ee.Blockquote=kSe;Ee.AlignLeft=ESe;Ee.AlignRight=$Se;Ee.AlignCenter=MSe;Ee.AlignJustify=NSe;Ee.Superscript=ISe;Ee.Subscript=TSe;Ee.Code=jSe;Ee.CodeBlock=LSe;Ee.ColorPicker=I9;Ee.Color=dPe;Ee.Highlight=DSe;Ee.Hr=RSe;Ee.UnsetColor=zSe;Ee.displayName="@mantine/tiptap/RichTextEditor";const yPe="aaa1rp3barth4b0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0faromeo7ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re2s2c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y0eats7k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking0channel11l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t0isalat7u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0at2delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d0network8tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntdoor4ier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5gtv3iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0eles2s3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1nder2le4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster5ia3d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4de2k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0cys3drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7serati6ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic3tual5v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rthwesternmutual14on4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3ssagens7y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cher3ks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w0time7i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ffany5ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0channel7ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lkswagen7vo3te1ing3o2yage5u0elos6wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",_Pe="ελ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},kx="numeric",Ex="ascii",$x="alpha",em="asciinumeric",uh="alphanumeric",Mx="domain",z9="emoji",wPe="scheme",bPe="slashscheme",RI="whitespace";function xPe(e,t){return e in t||(t[e]=[]),t[e]}function hl(e,t,n){t[kx]&&(t[em]=!0,t[uh]=!0),t[Ex]&&(t[em]=!0,t[$x]=!0),t[em]&&(t[uh]=!0),t[$x]&&(t[uh]=!0),t[uh]&&(t[Mx]=!0),t[z9]&&(t[Mx]=!0);for(const r in t){const o=xPe(r,n);o.indexOf(e)<0&&o.push(e)}}function SPe(e,t){const n={};for(const r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function Rr(e){e===void 0&&(e=null),this.j={},this.jr=[],this.jd=null,this.t=e}Rr.groups={};Rr.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),Eo=(e,t,n,r,o)=>e.tr(t,n,r,o),zI=(e,t,n,r,o)=>e.ts(t,n,r,o),de=(e,t,n,r,o)=>e.tt(t,n,r,o),Xi="WORD",Nx="UWORD",Sf="LOCALHOST",Tx="TLD",Ix="UTLD",tm="SCHEME",gc="SLASH_SCHEME",mO="NUM",A9="WS",gO="NL",Tc="OPENBRACE",Bd="OPENBRACKET",Fd="OPENANGLEBRACKET",Vd="OPENPAREN",rl="CLOSEBRACE",Ic="CLOSEBRACKET",jc="CLOSEANGLEBRACKET",ol="CLOSEPAREN",oy="AMPERSAND",iy="APOSTROPHE",sy="ASTERISK",Ws="AT",ay="BACKSLASH",ly="BACKTICK",cy="CARET",Ks="COLON",vO="COMMA",uy="DOLLAR",vi="DOT",dy="EQUALS",yO="EXCLAMATION",yi="HYPHEN",fy="PERCENT",py="PIPE",hy="PLUS",my="POUND",gy="QUERY",_O="QUOTE",wO="SEMI",_i="SLASH",Hd="TILDE",vy="UNDERSCORE",B9="EMOJI",yy="SYM";var F9=Object.freeze({__proto__:null,WORD:Xi,UWORD:Nx,LOCALHOST:Sf,TLD:Tx,UTLD:Ix,SCHEME:tm,SLASH_SCHEME:gc,NUM:mO,WS:A9,NL:gO,OPENBRACE:Tc,OPENBRACKET:Bd,OPENANGLEBRACKET:Fd,OPENPAREN:Vd,CLOSEBRACE:rl,CLOSEBRACKET:Ic,CLOSEANGLEBRACKET:jc,CLOSEPAREN:ol,AMPERSAND:oy,APOSTROPHE:iy,ASTERISK:sy,AT:Ws,BACKSLASH:ay,BACKTICK:ly,CARET:cy,COLON:Ks,COMMA:vO,DOLLAR:uy,DOT:vi,EQUALS:dy,EXCLAMATION:yO,HYPHEN:yi,PERCENT:fy,PIPE:py,PLUS:hy,POUND:my,QUERY:gy,QUOTE:_O,SEMI:wO,SLASH:_i,TILDE:Hd,UNDERSCORE:vy,EMOJI:B9,SYM:yy});const fc=/[a-z]/,ww=/\p{L}/u,bw=/\p{Emoji}/u,xw=/\d/,AI=/\s/,BI=` -`,PPe="️",OPe="‍";let dh=null,fh=null;function CPe(e){e===void 0&&(e=[]);const t={};Rr.groups=t;const n=new Rr;dh==null&&(dh=FI(yPe)),fh==null&&(fh=FI(_Pe)),de(n,"'",iy),de(n,"{",Tc),de(n,"[",Bd),de(n,"<",Fd),de(n,"(",Vd),de(n,"}",rl),de(n,"]",Ic),de(n,">",jc),de(n,")",ol),de(n,"&",oy),de(n,"*",sy),de(n,"@",Ws),de(n,"`",ly),de(n,"^",cy),de(n,":",Ks),de(n,",",vO),de(n,"$",uy),de(n,".",vi),de(n,"=",dy),de(n,"!",yO),de(n,"-",yi),de(n,"%",fy),de(n,"|",py),de(n,"+",hy),de(n,"#",my),de(n,"?",gy),de(n,'"',_O),de(n,"/",_i),de(n,";",wO),de(n,"~",Hd),de(n,"_",vy),de(n,"\\",ay);const r=Eo(n,xw,mO,{[kx]:!0});Eo(r,xw,r);const o=Eo(n,fc,Xi,{[Ex]:!0});Eo(o,fc,o);const i=Eo(n,ww,Nx,{[$x]:!0});Eo(i,fc),Eo(i,ww,i);const s=Eo(n,AI,A9,{[RI]:!0});de(n,BI,gO,{[RI]:!0}),de(s,BI),Eo(s,AI,s);const a=Eo(n,bw,B9,{[z9]:!0});Eo(a,bw,a),de(a,PPe,a);const c=de(a,OPe);Eo(c,bw,a);const u=[[fc,o]],f=[[fc,null],[ww,i]];for(let p=0;pp[0]>g[0]?1:-1);for(let p=0;p=0?y[Mx]=!0:fc.test(g)?xw.test(g)?y[em]=!0:y[Ex]=!0:y[kx]=!0,zI(n,g,g,y)}return zI(n,"localhost",Sf,{ascii:!0}),n.jd=new Rr(yy),{start:n,tokens:yu({groups:t},F9)}}function kPe(e,t){const n=EPe(t.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,o=[];let i=0,s=0;for(;s=0&&(p+=n[s].length,g++),u+=n[s].length,i+=n[s].length,s++;i-=p,s-=g,u-=p,o.push({t:f.t,v:t.slice(i-u,i),s:i-u,e:i})}return o}function EPe(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 js(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 Pf={defaultProtocol:"http",events:null,format:VI,formatHref:VI,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function bO(e,t){t===void 0&&(t=null);let n=yu({},Pf);e&&(n=yu(n,e instanceof bO?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=Pf.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 o1(e,t){class n extends V9{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 HI=o1("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),WI=o1("text"),$Pe=o1("nl"),Ka=o1("url",{isLink:!0,toHref(e){return e===void 0&&(e=Pf.defaultProtocol),this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk;return e.length>=2&&e[0].t!==Sf&&e[1].t===Ks}}),Pn=e=>new Rr(e);function MPe(e){let{groups:t}=e;const n=t.domain.concat([oy,sy,Ws,ay,ly,cy,uy,dy,yi,mO,fy,py,hy,my,_i,yy,Hd,vy]),r=[iy,jc,rl,Ic,ol,Ks,vO,vi,yO,Fd,Tc,Bd,Vd,gy,_O,wO],o=[oy,iy,sy,ay,ly,cy,rl,uy,dy,yi,Tc,fy,py,hy,my,gy,_i,yy,Hd,vy],i=Pn(),s=de(i,Hd);Me(s,o,s),Me(s,t.domain,s);const a=Pn(),c=Pn(),u=Pn();Me(i,t.domain,a),Me(i,t.scheme,c),Me(i,t.slashscheme,u),Me(a,o,s),Me(a,t.domain,a);const f=de(a,Ws);de(s,Ws,f),de(c,Ws,f),de(u,Ws,f);const p=de(s,vi);Me(p,o,s),Me(p,t.domain,s);const g=Pn();Me(f,t.domain,g),Me(g,t.domain,g);const v=de(g,vi);Me(v,t.domain,g);const y=Pn(HI);Me(v,t.tld,y),Me(v,t.utld,y),de(f,Sf,y);const w=de(g,yi);Me(w,t.domain,g),Me(y,t.domain,g),de(y,vi,v),de(y,yi,w);const P=de(y,Ks);Me(P,t.numeric,HI);const x=de(a,yi),S=de(a,vi);Me(x,t.domain,a),Me(S,o,s),Me(S,t.domain,a);const O=Pn(Ka);Me(S,t.tld,O),Me(S,t.utld,O),Me(O,t.domain,a),Me(O,o,s),de(O,vi,S),de(O,yi,x),de(O,Ws,f);const E=de(O,Ks),$=Pn(Ka);Me(E,t.numeric,$);const N=Pn(Ka),I=Pn();Me(N,n,N),Me(N,r,I),Me(I,n,N),Me(I,r,I),de(O,_i,N),de($,_i,N);const R=de(c,Ks),B=de(u,Ks),z=de(B,_i),G=de(z,_i);Me(c,t.domain,a),de(c,vi,S),de(c,yi,x),Me(u,t.domain,a),de(u,vi,S),de(u,yi,x),Me(R,t.domain,N),de(R,_i,N),Me(G,t.domain,N),Me(G,n,N),de(G,_i,N);const X=de(N,Tc),Q=de(N,Bd),V=de(N,Fd),H=de(N,Vd);de(I,Tc,X),de(I,Bd,Q),de(I,Fd,V),de(I,Vd,H),de(X,rl,N),de(Q,Ic,N),de(V,jc,N),de(H,ol,N),de(X,rl,N);const Z=Pn(Ka),Y=Pn(Ka),j=Pn(Ka),U=Pn(Ka);Me(X,n,Z),Me(Q,n,Y),Me(V,n,j),Me(H,n,U);const F=Pn(),K=Pn(),ee=Pn(),fe=Pn();return Me(X,r),Me(Q,r),Me(V,r),Me(H,r),Me(Z,n,Z),Me(Y,n,Y),Me(j,n,j),Me(U,n,U),Me(Z,r,Z),Me(Y,r,Y),Me(j,r,j),Me(U,r,U),Me(F,n,F),Me(K,n,Y),Me(ee,n,j),Me(fe,n,U),Me(F,r,F),Me(K,r,K),Me(ee,r,ee),Me(fe,r,fe),de(Y,Ic,N),de(j,jc,N),de(U,ol,N),de(Z,rl,N),de(K,Ic,N),de(ee,jc,N),de(fe,ol,N),de(F,ol,N),de(i,Sf,O),de(i,gO,$Pe),{start:i,tokens:F9}}function NPe(e,t,n){let r=n.length,o=0,i=[],s=[];for(;o=0&&g++,o++,f++;if(g<0)o-=f,o0&&(i.push(Sw(WI,t,s)),s=[]),o-=g,f-=g;const v=p.t,y=n.slice(o-f,o);i.push(Sw(v,t,y))}}return s.length>0&&i.push(Sw(WI,t,s)),i}function Sw(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 TPe=typeof console<"u"&&console&&console.warn||(()=>{}),IPe="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Vt={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function jPe(){Rr.groups={},Vt.scanner=null,Vt.parser=null,Vt.tokenQueue=[],Vt.pluginQueue=[],Vt.customSchemes=[],Vt.initialized=!1}function UI(e,t){if(t===void 0&&(t=!1),Vt.initialized&&TPe(`linkifyjs: already initialized - will not register custom scheme "${e}" ${IPe}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error(`linkifyjs: incorrect scheme format. +`,textSerializers:r={}}=t||{};return $be(this.state.doc,{blockSeparator:n,textSerializers:{...l9(this.schema),...r}})}get isEmpty(){return Lbe(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 Ll(e){return new e1({find:e.find,handler:({state:t,range:n,match:r})=>{const o=Ue(e.getAttributes,void 0,r);if(o===!1||o===null)return null;const{tr:i}=t,s=r[r.length-1],a=r[0];if(s){const c=a.search(/\S/),u=n.from+a.indexOf(s),f=u+s.length;if(pO(n.from,n.to,t.doc).filter(v=>v.mark.type.excluded.find(w=>w===e.type&&w!==v.mark.type)).filter(v=>v.to>u).length)return null;fn.from&&i.delete(n.from+c,u);const g=n.from+c+s.length;i.addMark(n.from+c,g,e.type.create(o||{})),i.removeStoredMark(e.type)}}})}function p9(e){return new e1({find:e.find,handler:({state:t,range:n,match:r})=>{const o=Ue(e.getAttributes,void 0,r)||{},{tr:i}=t,s=n.from;let a=n.to;const c=e.type.create(o);if(r[1]){const u=r[0].lastIndexOf(r[1]);let f=s+u;f>a?f=a:a=f+r[1].length;const p=r[0][r[0].length-1];i.insertText(p,s+r[0].length-1),i.replaceWith(f,a,c)}else r[0]&&i.insert(s-1,e.type.create(o)).delete(i.mapping.map(s),i.mapping.map(a));i.scrollIntoView()}})}function Sx(e){return new e1({find:e.find,handler:({state:t,range:n,match:r})=>{const o=t.doc.resolve(n.from),i=Ue(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 bf(e){return new e1({find:e.find,handler:({state:t,range:n,match:r,chain:o})=>{const i=Ue(e.getAttributes,void 0,r)||{},s=t.tr.delete(n.from,n.to),c=s.doc.resolve(n.from).blockRange(),u=c&&qP(c,e.type,i);if(!u)return null;if(s.wrap(c,u),e.keepMarks&&e.editor){const{selection:p,storedMarks:g}=t,{splittableMarks:v}=e.editor.extensionManager,y=g||p.$to.parentOffset&&p.$from.marks();if(y){const w=y.filter(P=>v.includes(P.type.name));s.ensureMarks(w)}}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&&La(s.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,f))&&s.join(n.from-1)}})}class or{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=Ue(Ce(this,"addOptions",{name:this.name}))),this.storage=Ue(Ce(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new or(t)}configure(t={}){const n=this.extend();return n.options=t1(this.options,t),n.storage=Ue(Ce(n,"addStorage",{name:n.name,options:n.options})),n}extend(t={}){const n=new or(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=Ue(Ce(n,"addOptions",{name:n.name})),n.storage=Ue(Ce(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}}let Gr=class Px{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=Ue(Ce(this,"addOptions",{name:this.name}))),this.storage=Ue(Ce(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new Px(t)}configure(t={}){const n=this.extend();return n.options=t1(this.options,t),n.storage=Ue(Ce(n,"addStorage",{name:n.name,options:n.options})),n}extend(t={}){const n=new Px(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=Ue(Ce(n,"addOptions",{name:n.name})),n.storage=Ue(Ce(n,"addStorage",{name:n.name,options:n.options})),n}};function ka(e){return new $we({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:o})=>{const i=Ue(e.getAttributes,void 0,r,o);if(i===!1||i===null)return null;const{tr:s}=t,a=r[r.length-1],c=r[0];let u=n.to;if(a){const f=c.search(/\S/),p=n.from+c.indexOf(a),g=p+a.length;if(pO(n.from,n.to,t.doc).filter(y=>y.mark.type.excluded.find(P=>P===e.type&&P!==y.mark.type)).filter(y=>y.to>p).length)return null;gn.from&&s.delete(n.from+f,p),u=n.from+f+a.length,s.addMark(n.from+f,u,e.type.create(i||{})),s.removeStoredMark(e.type)}}})}const dxe=({renderers:e})=>k.createElement(k.Fragment,null,Object.entries(e).map(([t,n])=>gq.createPortal(n.reactElement,n.element,t)));class fxe extends k.Component{constructor(t){super(t),this.editorContentRef=k.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?xs.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 k.createElement(k.Fragment,null,k.createElement("div",{ref:this.editorContentRef,...n}),k.createElement(dxe,{renderers:this.state.renderers}))}}const pxe=e=>{const t=k.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return k.createElement(fxe,{key:t,...e})},hxe=k.memo(pxe);class mxe extends uxe{constructor(){super(...arguments),this.contentComponent=null}}function gxe(){const[,e]=_.useState(0);return()=>e(t=>t+1)}const h9=(e={},t=[])=>{const[n,r]=_.useState(null),o=gxe(),{onBeforeCreate:i,onBlur:s,onCreate:a,onDestroy:c,onFocus:u,onSelectionUpdate:f,onTransaction:p,onUpdate:g}=e,v=_.useRef(i),y=_.useRef(s),w=_.useRef(a),P=_.useRef(c),x=_.useRef(u),S=_.useRef(f),O=_.useRef(p),E=_.useRef(g);return _.useEffect(()=>{n&&(i&&(n.off("beforeCreate",v.current),n.on("beforeCreate",i),v.current=i),s&&(n.off("blur",y.current),n.on("blur",s),y.current=s),a&&(n.off("create",w.current),n.on("create",a),w.current=a),c&&(n.off("destroy",P.current),n.on("destroy",c),P.current=c),u&&(n.off("focus",x.current),n.on("focus",u),x.current=u),f&&(n.off("selectionUpdate",S.current),n.on("selectionUpdate",f),S.current=f),p&&(n.off("transaction",O.current),n.on("transaction",p),O.current=p),g&&(n.off("update",E.current),n.on("update",g),E.current=g))},[i,s,a,c,u,f,p,g,n]),_.useEffect(()=>{let $=!0;const N=new mxe(e);return r(N),N.on("transaction",()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{$&&o()})})}),()=>{$=!1}},t),_.useEffect(()=>()=>{n?.destroy()},[n]),n},vxe=_.createContext({editor:null});vxe.Consumer;const yxe=_.createContext({onDragStart:void 0}),_xe=()=>_.useContext(yxe);k.forwardRef((e,t)=>{const{onDragStart:n}=_xe(),r=e.as||"div";return k.createElement(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});var wxe=Object.defineProperty,vI=Object.getOwnPropertySymbols,bxe=Object.prototype.hasOwnProperty,xxe=Object.prototype.propertyIsEnumerable,yI=(e,t,n)=>t in e?wxe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gw=(e,t)=>{for(var n in t||(t={}))bxe.call(t,n)&&yI(e,n,t[n]);if(vI)for(var n of vI(t))xxe.call(t,n)&&yI(e,n,t[n]);return e};function Sxe(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 Pxe(e){return e?{"& li > p":{margin:0},"& ul li, & ol li":{marginTop:M(2)},"& ul, & ol":{marginTop:M(5),marginBottom:M(5)},"& p":{marginBottom:M(7)},"& h1, & h2, & h3, & h4, & h5, & h6, & p":{marginTop:0}}:null}var Oxe=ue((e,{withCodeHighlightStyles:t,withTypographyStyles:n})=>({typographyStylesProvider:gw({},Pxe(n)),content:gw({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":gw({content:"attr(data-placeholder)",pointerEvents:"none",userSelect:"none",float:"left",height:0},e.fn.placeholderStyles())},Sxe(t,e))}));const Cxe=Oxe;var kxe=Object.defineProperty,Yv=Object.getOwnPropertySymbols,m9=Object.prototype.hasOwnProperty,g9=Object.prototype.propertyIsEnumerable,_I=(e,t,n)=>t in e?kxe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Exe=(e,t)=>{for(var n in t||(t={}))m9.call(t,n)&&_I(e,n,t[n]);if(Yv)for(var n of Yv(t))g9.call(t,n)&&_I(e,n,t[n]);return e},$xe=(e,t)=>{var n={};for(var r in e)m9.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&&g9.call(e,r)&&(n[r]=e[r]);return n};const Mxe={},v9=_.forwardRef((e,t)=>{const n=ae("RichTextEditorContent",Mxe,e),{className:r}=n,o=$xe(n,["className"]),{editor:i,withCodeHighlightStyles:s,withTypographyStyles:a,classNames:c,styles:u,unstyled:f,variant:p}=ja(),{classes:g,cx:v}=Cxe({withCodeHighlightStyles:s,withTypographyStyles:a},{name:"RichTextEditor",classNames:c,styles:u,unstyled:f,variant:p});return k.createElement(c8,{className:v(g.typographyStylesProvider,r),unstyled:!a||f,ref:t},k.createElement(Pe,Exe({component:hxe,editor:i,className:g.content},o)))});v9.displayName="@mantine/tiptap/Content";var Nxe=Object.defineProperty,wI=Object.getOwnPropertySymbols,Txe=Object.prototype.hasOwnProperty,Ixe=Object.prototype.propertyIsEnumerable,bI=(e,t,n)=>t in e?Nxe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xI=(e,t)=>{for(var n in t||(t={}))Txe.call(t,n)&&bI(e,n,t[n]);if(wI)for(var n of wI(t))Ixe.call(t,n)&&bI(e,n,t[n]);return e},jxe=ue(e=>{const t=e.fn.variant({variant:"light"});return{control:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,minWidth:M(26),height:M(26),display:"flex",justifyContent:"center",alignItems:"center",border:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,borderRadius:e.fn.radius(),cursor:"default","&[data-interactive]":xI({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":xI({},e.fn.hover({backgroundColor:t.hover}))}}}});const Lxe=jxe;var Dxe=Object.defineProperty,Kv=Object.getOwnPropertySymbols,y9=Object.prototype.hasOwnProperty,_9=Object.prototype.propertyIsEnumerable,SI=(e,t,n)=>t in e?Dxe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rxe=(e,t)=>{for(var n in t||(t={}))y9.call(t,n)&&SI(e,n,t[n]);if(Kv)for(var n of Kv(t))_9.call(t,n)&&SI(e,n,t[n]);return e},zxe=(e,t)=>{var n={};for(var r in e)y9.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&&_9.call(e,r)&&(n[r]=e[r]);return n};const Axe={interactive:!0},Qf=_.forwardRef((e,t)=>{const n=ae("RichTextEditorControl",Axe,e),{className:r,active:o,children:i,interactive:s}=n,a=zxe(n,["className","active","children","interactive"]),{classNames:c,styles:u,unstyled:f,variant:p}=ja(),{classes:g,cx:v}=Lxe(null,{name:"RichTextEditor",classNames:c,styles:u,unstyled:f,variant:p});return k.createElement(ls,Rxe({className:v(g.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)});Qf.displayName="@mantine/tiptap/Control";var Bxe=ue(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 Fxe=Bxe;var Vxe=Object.defineProperty,qv=Object.getOwnPropertySymbols,w9=Object.prototype.hasOwnProperty,b9=Object.prototype.propertyIsEnumerable,PI=(e,t,n)=>t in e?Vxe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hxe=(e,t)=>{for(var n in t||(t={}))w9.call(t,n)&&PI(e,n,t[n]);if(qv)for(var n of qv(t))b9.call(t,n)&&PI(e,n,t[n]);return e},Wxe=(e,t)=>{var n={};for(var r in e)w9.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&qv)for(var r of qv(e))t.indexOf(r)<0&&b9.call(e,r)&&(n[r]=e[r]);return n};const Uxe={},x9=_.forwardRef((e,t)=>{const n=ae("RichTextEditorControlsGroup",Uxe,e),{className:r,children:o}=n,i=Wxe(n,["className","children"]),{classNames:s,styles:a,unstyled:c}=ja(),{classes:u,cx:f}=Fxe(null,{name:"RichTextEditor",classNames:s,styles:a,unstyled:c});return k.createElement(Pe,Hxe({className:f(u.controlsGroup,r),ref:t},i),o)});x9.displayName="@mantine/tiptap/ControlsGroup";var Zxe=ue((e,{sticky:t,stickyOffset:n})=>({toolbar:{position:t?"sticky":"static",top:t?M(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:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`}}));const Gxe=Zxe;var Yxe=Object.defineProperty,Jv=Object.getOwnPropertySymbols,S9=Object.prototype.hasOwnProperty,P9=Object.prototype.propertyIsEnumerable,OI=(e,t,n)=>t in e?Yxe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kxe=(e,t)=>{for(var n in t||(t={}))S9.call(t,n)&&OI(e,n,t[n]);if(Jv)for(var n of Jv(t))P9.call(t,n)&&OI(e,n,t[n]);return e},qxe=(e,t)=>{var n={};for(var r in e)S9.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&&P9.call(e,r)&&(n[r]=e[r]);return n};const Jxe={stickyOffset:0},O9=_.forwardRef((e,t)=>{const n=ae("RichTextEditorToolbar",Jxe,e),{className:r,children:o,sticky:i,stickyOffset:s}=n,a=qxe(n,["className","children","sticky","stickyOffset"]),c=ja(),{classes:u,cx:f}=Gxe({sticky:i,stickyOffset:s},{name:"RichTextEditor",classNames:c.classNames,styles:c.styles,unstyled:c.unstyled,variant:c.variant});return k.createElement(nt,Kxe({className:f(u.toolbar,r),ref:t},a),o)});O9.displayName="@mantine/tiptap/Toolbar";const Xxe={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 Qxe=ue(e=>({root:{position:"relative",border:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,borderRadius:e.fn.radius()}}));const eSe=Qxe;var tSe=Object.defineProperty,Xv=Object.getOwnPropertySymbols,C9=Object.prototype.hasOwnProperty,k9=Object.prototype.propertyIsEnumerable,CI=(e,t,n)=>t in e?tSe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nSe=(e,t)=>{for(var n in t||(t={}))C9.call(t,n)&&CI(e,n,t[n]);if(Xv)for(var n of Xv(t))k9.call(t,n)&&CI(e,n,t[n]);return e},rSe=(e,t)=>{var n={};for(var r in e)C9.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&&k9.call(e,r)&&(n[r]=e[r]);return n};const hO=_.forwardRef((e,t)=>{var n=e,{className:r,active:o,icon:i}=n,s=rSe(n,["className","active","icon"]);return k.createElement(Qf,nSe({active:o,ref:t},s),k.createElement(i,{size:"1rem"}))});hO.displayName="@mantine/tiptap/ControlBase";var oSe=Object.defineProperty,kI=Object.getOwnPropertySymbols,iSe=Object.prototype.hasOwnProperty,sSe=Object.prototype.propertyIsEnumerable,EI=(e,t,n)=>t in e?oSe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,aSe=(e,t)=>{for(var n in t||(t={}))iSe.call(t,n)&&EI(e,n,t[n]);if(kI)for(var n of kI(t))sSe.call(t,n)&&EI(e,n,t[n]);return e};function Et({label:e,isActive:t,operation:n,icon:r}){return _.forwardRef((o,i)=>{const{editor:s,labels:a}=ja(),c=a[e];return k.createElement(hO,aSe({"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 lSe=Object.defineProperty,cSe=Object.defineProperties,uSe=Object.getOwnPropertyDescriptors,$I=Object.getOwnPropertySymbols,dSe=Object.prototype.hasOwnProperty,fSe=Object.prototype.propertyIsEnumerable,MI=(e,t,n)=>t in e?lSe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$t=(e,t)=>{for(var n in t||(t={}))dSe.call(t,n)&&MI(e,n,t[n]);if($I)for(var n of $I(t))fSe.call(t,n)&&MI(e,n,t[n]);return e},Mt=(e,t)=>cSe(e,uSe(t));const pSe=Et({label:"boldControlLabel",icon:e=>k.createElement(lhe,Mt($t({},e),{stroke:1.5})),isActive:{name:"bold"},operation:{name:"toggleBold"}}),hSe=Et({label:"italicControlLabel",icon:e=>k.createElement(khe,Mt($t({},e),{stroke:1.5})),isActive:{name:"italic"},operation:{name:"toggleItalic"}}),mSe=Et({label:"underlineControlLabel",icon:e=>k.createElement(Ghe,Mt($t({},e),{stroke:1.5})),isActive:{name:"underline"},operation:{name:"toggleUnderline"}}),gSe=Et({label:"strikeControlLabel",icon:e=>k.createElement(Hhe,Mt($t({},e),{stroke:1.5})),isActive:{name:"strike"},operation:{name:"toggleStrike"}}),vSe=Et({label:"clearFormattingControlLabel",icon:e=>k.createElement(dhe,Mt($t({},e),{stroke:1.5})),operation:{name:"unsetAllMarks"}}),ySe=Et({label:"unlinkControlLabel",icon:e=>k.createElement(N8,Mt($t({},e),{stroke:1.5})),operation:{name:"unsetLink"}}),_Se=Et({label:"bulletListControlLabel",icon:e=>k.createElement(jhe,Mt($t({},e),{stroke:1.5})),isActive:{name:"bulletList"},operation:{name:"toggleBulletList"}}),wSe=Et({label:"orderedListControlLabel",icon:e=>k.createElement(Ihe,Mt($t({},e),{stroke:1.5})),isActive:{name:"orderedList"},operation:{name:"toggleOrderedList"}}),bSe=Et({label:"h1ControlLabel",icon:e=>k.createElement(whe,Mt($t({},e),{stroke:1.5})),isActive:{name:"heading",attributes:{level:1}},operation:{name:"toggleHeading",attributes:{level:1}}}),xSe=Et({label:"h2ControlLabel",icon:e=>k.createElement(bhe,Mt($t({},e),{stroke:1.5})),isActive:{name:"heading",attributes:{level:2}},operation:{name:"toggleHeading",attributes:{level:2}}}),SSe=Et({label:"h3ControlLabel",icon:e=>k.createElement(xhe,Mt($t({},e),{stroke:1.5})),isActive:{name:"heading",attributes:{level:3}},operation:{name:"toggleHeading",attributes:{level:3}}}),PSe=Et({label:"h4ControlLabel",icon:e=>k.createElement(She,Mt($t({},e),{stroke:1.5})),isActive:{name:"heading",attributes:{level:4}},operation:{name:"toggleHeading",attributes:{level:4}}}),OSe=Et({label:"h5ControlLabel",icon:e=>k.createElement(Phe,Mt($t({},e),{stroke:1.5})),isActive:{name:"heading",attributes:{level:5}},operation:{name:"toggleHeading",attributes:{level:5}}}),CSe=Et({label:"h6ControlLabel",icon:e=>k.createElement(Ohe,Mt($t({},e),{stroke:1.5})),isActive:{name:"heading",attributes:{level:6}},operation:{name:"toggleHeading",attributes:{level:6}}}),kSe=Et({label:"blockquoteControlLabel",icon:e=>k.createElement(ahe,Mt($t({},e),{stroke:1.5})),isActive:{name:"blockquote"},operation:{name:"toggleBlockquote"}}),ESe=Et({label:"alignLeftControlLabel",icon:e=>k.createElement(the,Mt($t({},e),{stroke:1.5})),operation:{name:"setTextAlign",attributes:"left"}}),$Se=Et({label:"alignRightControlLabel",icon:e=>k.createElement(nhe,Mt($t({},e),{stroke:1.5})),operation:{name:"setTextAlign",attributes:"right"}}),MSe=Et({label:"alignCenterControlLabel",icon:e=>k.createElement(Qpe,Mt($t({},e),{stroke:1.5})),operation:{name:"setTextAlign",attributes:"center"}}),NSe=Et({label:"alignJustifyControlLabel",icon:e=>k.createElement(ehe,Mt($t({},e),{stroke:1.5})),operation:{name:"setTextAlign",attributes:"justify"}}),TSe=Et({label:"subscriptControlLabel",icon:e=>k.createElement(Whe,Mt($t({},e),{stroke:1.5})),isActive:{name:"subscript"},operation:{name:"toggleSubscript"}}),ISe=Et({label:"superscriptControlLabel",icon:e=>k.createElement(Uhe,Mt($t({},e),{stroke:1.5})),isActive:{name:"superscript"},operation:{name:"toggleSuperscript"}}),jSe=Et({label:"codeControlLabel",icon:e=>k.createElement(P8,Mt($t({},e),{stroke:1.5})),isActive:{name:"code"},operation:{name:"toggleCode"}}),LSe=Et({label:"codeBlockControlLabel",icon:e=>k.createElement(P8,Mt($t({},e),{stroke:1.5})),isActive:{name:"codeBlock"},operation:{name:"toggleCodeBlock"}}),DSe=Et({label:"highlightControlLabel",icon:e=>k.createElement(Che,Mt($t({},e),{stroke:1.5})),isActive:{name:"highlight"},operation:{name:"toggleHighlight"}}),RSe=Et({label:"hrControlLabel",icon:e=>k.createElement(Mhe,Mt($t({},e),{stroke:1.5})),operation:{name:"setHorizontalRule"}}),zSe=Et({label:"unsetColorControlLabel",icon:e=>k.createElement(S8,Mt($t({},e),{stroke:1.5})),operation:{name:"unsetColor"}});var ASe=Object.defineProperty,NI=Object.getOwnPropertySymbols,BSe=Object.prototype.hasOwnProperty,FSe=Object.prototype.propertyIsEnumerable,TI=(e,t,n)=>t in e?ASe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,VSe=(e,t)=>{for(var n in t||(t={}))BSe.call(t,n)&&TI(e,n,t[n]);if(NI)for(var n of NI(t))FSe.call(t,n)&&TI(e,n,t[n]);return e},HSe=ue(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:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,height:M(24),width:M(24),display:"flex",justifyContent:"center",alignItems:"center",borderRadius:e.fn.radius(),"&[data-active]":VSe({backgroundColor:t.background,borderColor:t.border,color:t.color},e.fn.hover({background:t.hover}))},linkEditorSave:{borderTopLeftRadius:0,borderBottomLeftRadius:0}}});const WSe=HSe;var USe=Object.defineProperty,ZSe=Object.defineProperties,GSe=Object.getOwnPropertyDescriptors,Qv=Object.getOwnPropertySymbols,E9=Object.prototype.hasOwnProperty,$9=Object.prototype.propertyIsEnumerable,II=(e,t,n)=>t in e?USe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ox=(e,t)=>{for(var n in t||(t={}))E9.call(t,n)&&II(e,n,t[n]);if(Qv)for(var n of Qv(t))$9.call(t,n)&&II(e,n,t[n]);return e},YSe=(e,t)=>ZSe(e,GSe(t)),M9=(e,t)=>{var n={};for(var r in e)E9.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Qv)for(var r of Qv(e))t.indexOf(r)<0&&$9.call(e,r)&&(n[r]=e[r]);return n};const KSe=e=>{var t=e,{size:n}=t,r=M9(t,["size"]);return k.createElement(Nhe,Ox({size:n,stroke:1.5},r))},qSe={initialExternal:!1},JSe=_.forwardRef((e,t)=>{const n=ae("RichTextEditorLinkControl",qSe,e),{icon:r,popoverProps:o,disableTooltips:i,initialExternal:s}=n,a=M9(n,["icon","popoverProps","disableTooltips","initialExternal"]),{editor:c,labels:u,classNames:f,styles:p,unstyled:g,variant:v}=ja(),{classes:y}=WSe(null,{name:"RichTextEditor",classNames:f,styles:p,unstyled:g,variant:v}),[w,P]=jG(""),[x,S]=_.useState(s),[O,{open:E,close:$}]=pS(!1),N=()=>{E();const z=c?.getAttributes("link");P(z?.href||""),S(z?.target==="_blank")},I=()=>{$(),P(""),S(s)},R=()=>{I(),w===""?c.chain().focus().extendMarkRange("link").unsetLink().run():c.chain().focus().extendMarkRange("link").setLink({href:w,target:x?"_blank":null}).run()},B=z=>{z.key==="Enter"&&(z.preventDefault(),R())};return mm("edit-link",N,!1),k.createElement(kn,Ox({trapFocus:!0,shadow:"md",withinPortal:!0,opened:O,onClose:I,offset:-44,zIndex:1e4,unstyled:g},o),k.createElement(kn.Target,null,k.createElement(hO,YSe(Ox({icon:r||KSe,"aria-label":u.linkControlLabel,title:u.linkControlLabel,onClick:N,active:c?.isActive("link"),unstyled:g},a),{ref:t}))),k.createElement(kn.Dropdown,{sx:z=>({backgroundColor:z.colorScheme==="dark"?z.colors.dark[7]:z.white})},k.createElement("div",{className:y.linkEditor},k.createElement(yn,{placeholder:u.linkEditorInputPlaceholder,"aria-label":u.linkEditorInputLabel,type:"url",value:w,onChange:P,classNames:{input:y.linkEditorInput},onKeyDown:B,unstyled:g,rightSection:k.createElement(zt,{label:x?u.linkEditorExternalLink:u.linkEditorInternalLink,events:{hover:!0,focus:!0,touch:!0},withinPortal:!0,withArrow:!0,disabled:i,unstyled:g,zIndex:1e4},k.createElement(ls,{onClick:()=>S(z=>!z),"data-active":x||void 0,className:y.linkEditorExternalControl,unstyled:g},k.createElement(ghe,{size:M(14),stroke:1.5})))}),k.createElement(st,{variant:"default",onClick:R,className:y.linkEditorSave,unstyled:g},u.linkEditorSave))))});var XSe=Object.defineProperty,QSe=Object.defineProperties,ePe=Object.getOwnPropertyDescriptors,ey=Object.getOwnPropertySymbols,N9=Object.prototype.hasOwnProperty,T9=Object.prototype.propertyIsEnumerable,jI=(e,t,n)=>t in e?XSe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vw=(e,t)=>{for(var n in t||(t={}))N9.call(t,n)&&jI(e,n,t[n]);if(ey)for(var n of ey(t))T9.call(t,n)&&jI(e,n,t[n]);return e},tPe=(e,t)=>QSe(e,ePe(t)),nPe=(e,t)=>{var n={};for(var r in e)N9.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ey)for(var r of ey(e))t.indexOf(r)<0&&T9.call(e,r)&&(n[r]=e[r]);return n};const rPe={},I9=_.forwardRef((e,t)=>{const n=ae("RichTextEditorColorPickerControl",rPe,e),{popoverProps:r,colors:o,colorPickerProps:i}=n,s=nPe(n,["popoverProps","colors","colorPickerProps"]),{editor:a,labels:c,unstyled:u}=ja(),[f,{toggle:p,close:g}]=pS(!1),[v,y]=_.useState("palette"),w=ir(),P=a?.getAttributes("textStyle").color||(w.colorScheme==="dark"?w.colors.dark[1]:w.black),x=(E,$=!0)=>{a.chain().focus().setColor(E).run(),$&&g()},S=()=>{a.chain().focus().unsetColor().run(),g()},O=o.map((E,$)=>k.createElement(pf,{key:$,component:"button",color:E,onClick:()=>x(E),size:26,radius:"xs",sx:{cursor:"pointer"},title:c.colorPickerColorLabel(E),"aria-label":c.colorPickerColorLabel(E),unstyled:u}));return k.createElement(kn,vw({opened:f,withinPortal:!0,trapFocus:!0,onClose:g,unstyled:u},r),k.createElement(kn.Target,null,k.createElement(Qf,tPe(vw({"aria-label":c.colorPickerControlLabel,title:c.colorPickerControlLabel},s),{ref:t,onClick:p}),k.createElement(pf,{color:P,size:14,unstyled:u}))),k.createElement(kn.Dropdown,{sx:()=>({backgroundColor:w.colorScheme==="dark"?w.colors.dark[7]:w.white})},v==="palette"&&k.createElement(TP,{cols:7,spacing:2},O),v==="colorPicker"&&k.createElement(t4,vw({defaultValue:P,onChange:E=>x(E,!1),unstyled:u},i)),k.createElement(zt.Group,{closeDelay:200},k.createElement(nt,{position:"right",spacing:"xs",mt:"sm"},v==="palette"&&k.createElement(Qe,{variant:"default",onClick:g,unstyled:u,title:c.colorPickerCancel,"aria-label":c.colorPickerCancel},k.createElement(cu,{stroke:1.5,size:"1rem"})),k.createElement(Qe,{variant:"default",onClick:S,unstyled:u,title:c.colorPickerClear,"aria-label":c.colorPickerClear},k.createElement(S8,{stroke:1.5,size:"1rem"})),v==="palette"?k.createElement(Qe,{variant:"default",onClick:()=>y("colorPicker"),unstyled:u,title:c.colorPickerColorPicker,"aria-label":c.colorPickerColorPicker},k.createElement(phe,{stroke:1.5,size:"1rem"})):k.createElement(Qe,{variant:"default",onClick:()=>y("palette"),unstyled:u,"aria-label":c.colorPickerPalette,title:c.colorPickerPalette},k.createElement($8,{stroke:1.5,size:"1rem"})),v==="colorPicker"&&k.createElement(Qe,{variant:"default",onClick:g,unstyled:u,title:c.colorPickerSave,"aria-label":c.colorPickerSave},k.createElement(uhe,{stroke:1.5,size:"1rem"}))))))});I9.displayName="@mantine/tiptap/ColorPickerControl";var oPe=Object.defineProperty,iPe=Object.defineProperties,sPe=Object.getOwnPropertyDescriptors,ty=Object.getOwnPropertySymbols,j9=Object.prototype.hasOwnProperty,L9=Object.prototype.propertyIsEnumerable,LI=(e,t,n)=>t in e?oPe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,aPe=(e,t)=>{for(var n in t||(t={}))j9.call(t,n)&&LI(e,n,t[n]);if(ty)for(var n of ty(t))L9.call(t,n)&&LI(e,n,t[n]);return e},lPe=(e,t)=>iPe(e,sPe(t)),cPe=(e,t)=>{var n={};for(var r in e)j9.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ty)for(var r of ty(e))t.indexOf(r)<0&&L9.call(e,r)&&(n[r]=e[r]);return n};const uPe={},dPe=_.forwardRef((e,t)=>{const n=ae("RichTextEditorColorControl",uPe,e),{color:r}=n,o=cPe(n,["color"]),{editor:i,labels:s,unstyled:a}=ja(),c=i?.getAttributes("textStyle").color||null,u=s.colorControlLabel(r);return k.createElement(Qf,lPe(aPe({active:c===r,"aria-label":u,title:u,onClick:()=>i.chain().focus().setColor(r).run()},o),{ref:t}),k.createElement(pf,{color:r,size:14,unstyled:a}))});var fPe=Object.defineProperty,pPe=Object.defineProperties,hPe=Object.getOwnPropertyDescriptors,ny=Object.getOwnPropertySymbols,D9=Object.prototype.hasOwnProperty,R9=Object.prototype.propertyIsEnumerable,DI=(e,t,n)=>t in e?fPe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yw=(e,t)=>{for(var n in t||(t={}))D9.call(t,n)&&DI(e,n,t[n]);if(ny)for(var n of ny(t))R9.call(t,n)&&DI(e,n,t[n]);return e},mPe=(e,t)=>pPe(e,hPe(t)),gPe=(e,t)=>{var n={};for(var r in e)D9.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ny)for(var r of ny(e))t.indexOf(r)<0&&R9.call(e,r)&&(n[r]=e[r]);return n};const vPe={withCodeHighlightStyles:!0,withTypographyStyles:!0},Ee=_.forwardRef((e,t)=>{const n=ae("RichTextEditor",vPe,e),{editor:r,children:o,className:i,labels:s,withCodeHighlightStyles:a,withTypographyStyles:c,classNames:u,styles:f,unstyled:p,variant:g}=n,v=gPe(n,["editor","children","className","labels","withCodeHighlightStyles","withTypographyStyles","classNames","styles","unstyled","variant"]),{classes:y,cx:w}=eSe(null,{name:"RichTextEditor",classNames:u,styles:f,unstyled:p,variant:g}),P=_.useMemo(()=>yw(yw({},Xxe),s),[s]);return k.createElement(y0e,{value:{editor:r,labels:P,withCodeHighlightStyles:a,withTypographyStyles:c,classNames:u,styles:f,unstyled:p,variant:g}},k.createElement(Pe,mPe(yw({className:w(y.root,i)},v),{ref:t}),o))});Ee.Content=v9;Ee.Control=Qf;Ee.ControlsGroup=x9;Ee.Toolbar=O9;Ee.Bold=pSe;Ee.Italic=hSe;Ee.Strikethrough=gSe;Ee.Underline=mSe;Ee.ClearFormatting=vSe;Ee.H1=bSe;Ee.H2=xSe;Ee.H3=SSe;Ee.H4=PSe;Ee.H5=OSe;Ee.H6=CSe;Ee.BulletList=_Se;Ee.OrderedList=wSe;Ee.Link=JSe;Ee.Unlink=ySe;Ee.Blockquote=kSe;Ee.AlignLeft=ESe;Ee.AlignRight=$Se;Ee.AlignCenter=MSe;Ee.AlignJustify=NSe;Ee.Superscript=ISe;Ee.Subscript=TSe;Ee.Code=jSe;Ee.CodeBlock=LSe;Ee.ColorPicker=I9;Ee.Color=dPe;Ee.Highlight=DSe;Ee.Hr=RSe;Ee.UnsetColor=zSe;Ee.displayName="@mantine/tiptap/RichTextEditor";const yPe="aaa1rp3barth4b0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0faromeo7ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re2s2c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y0eats7k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking0channel11l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t0isalat7u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0at2delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d0network8tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntdoor4ier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5gtv3iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0eles2s3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1nder2le4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster5ia3d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4de2k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0cys3drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7serati6ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic3tual5v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rthwesternmutual14on4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3ssagens7y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cher3ks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w0time7i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ffany5ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0channel7ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lkswagen7vo3te1ing3o2yage5u0elos6wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",_Pe="ελ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",vu=(e,t)=>{for(const n in t)e[n]=t[n];return e},Cx="numeric",kx="ascii",Ex="alpha",Qh="asciinumeric",ch="alphanumeric",$x="domain",z9="emoji",wPe="scheme",bPe="slashscheme",RI="whitespace";function xPe(e,t){return e in t||(t[e]=[]),t[e]}function hl(e,t,n){t[Cx]&&(t[Qh]=!0,t[ch]=!0),t[kx]&&(t[Qh]=!0,t[Ex]=!0),t[Qh]&&(t[ch]=!0),t[Ex]&&(t[ch]=!0),t[ch]&&(t[$x]=!0),t[z9]&&(t[$x]=!0);for(const r in t){const o=xPe(r,n);o.indexOf(e)<0&&o.push(e)}}function SPe(e,t){const n={};for(const r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function Rr(e){e===void 0&&(e=null),this.j={},this.jr=[],this.jd=null,this.t=e}Rr.groups={};Rr.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),Eo=(e,t,n,r,o)=>e.tr(t,n,r,o),zI=(e,t,n,r,o)=>e.ts(t,n,r,o),de=(e,t,n,r,o)=>e.tt(t,n,r,o),Xi="WORD",Mx="UWORD",xf="LOCALHOST",Nx="TLD",Tx="UTLD",em="SCHEME",gc="SLASH_SCHEME",mO="NUM",A9="WS",gO="NL",Tc="OPENBRACE",Ad="OPENBRACKET",Bd="OPENANGLEBRACKET",Fd="OPENPAREN",rl="CLOSEBRACE",Ic="CLOSEBRACKET",jc="CLOSEANGLEBRACKET",ol="CLOSEPAREN",ry="AMPERSAND",oy="APOSTROPHE",iy="ASTERISK",Ws="AT",sy="BACKSLASH",ay="BACKTICK",ly="CARET",Ks="COLON",vO="COMMA",cy="DOLLAR",gi="DOT",uy="EQUALS",yO="EXCLAMATION",vi="HYPHEN",dy="PERCENT",fy="PIPE",py="PLUS",hy="POUND",my="QUERY",_O="QUOTE",wO="SEMI",yi="SLASH",Vd="TILDE",gy="UNDERSCORE",B9="EMOJI",vy="SYM";var F9=Object.freeze({__proto__:null,WORD:Xi,UWORD:Mx,LOCALHOST:xf,TLD:Nx,UTLD:Tx,SCHEME:em,SLASH_SCHEME:gc,NUM:mO,WS:A9,NL:gO,OPENBRACE:Tc,OPENBRACKET:Ad,OPENANGLEBRACKET:Bd,OPENPAREN:Fd,CLOSEBRACE:rl,CLOSEBRACKET:Ic,CLOSEANGLEBRACKET:jc,CLOSEPAREN:ol,AMPERSAND:ry,APOSTROPHE:oy,ASTERISK:iy,AT:Ws,BACKSLASH:sy,BACKTICK:ay,CARET:ly,COLON:Ks,COMMA:vO,DOLLAR:cy,DOT:gi,EQUALS:uy,EXCLAMATION:yO,HYPHEN:vi,PERCENT:dy,PIPE:fy,PLUS:py,POUND:hy,QUERY:my,QUOTE:_O,SEMI:wO,SLASH:yi,TILDE:Vd,UNDERSCORE:gy,EMOJI:B9,SYM:vy});const fc=/[a-z]/,_w=/\p{L}/u,ww=/\p{Emoji}/u,bw=/\d/,AI=/\s/,BI=` +`,PPe="️",OPe="‍";let uh=null,dh=null;function CPe(e){e===void 0&&(e=[]);const t={};Rr.groups=t;const n=new Rr;uh==null&&(uh=FI(yPe)),dh==null&&(dh=FI(_Pe)),de(n,"'",oy),de(n,"{",Tc),de(n,"[",Ad),de(n,"<",Bd),de(n,"(",Fd),de(n,"}",rl),de(n,"]",Ic),de(n,">",jc),de(n,")",ol),de(n,"&",ry),de(n,"*",iy),de(n,"@",Ws),de(n,"`",ay),de(n,"^",ly),de(n,":",Ks),de(n,",",vO),de(n,"$",cy),de(n,".",gi),de(n,"=",uy),de(n,"!",yO),de(n,"-",vi),de(n,"%",dy),de(n,"|",fy),de(n,"+",py),de(n,"#",hy),de(n,"?",my),de(n,'"',_O),de(n,"/",yi),de(n,";",wO),de(n,"~",Vd),de(n,"_",gy),de(n,"\\",sy);const r=Eo(n,bw,mO,{[Cx]:!0});Eo(r,bw,r);const o=Eo(n,fc,Xi,{[kx]:!0});Eo(o,fc,o);const i=Eo(n,_w,Mx,{[Ex]:!0});Eo(i,fc),Eo(i,_w,i);const s=Eo(n,AI,A9,{[RI]:!0});de(n,BI,gO,{[RI]:!0}),de(s,BI),Eo(s,AI,s);const a=Eo(n,ww,B9,{[z9]:!0});Eo(a,ww,a),de(a,PPe,a);const c=de(a,OPe);Eo(c,ww,a);const u=[[fc,o]],f=[[fc,null],[_w,i]];for(let p=0;pp[0]>g[0]?1:-1);for(let p=0;p=0?y[$x]=!0:fc.test(g)?bw.test(g)?y[Qh]=!0:y[kx]=!0:y[Cx]=!0,zI(n,g,g,y)}return zI(n,"localhost",xf,{ascii:!0}),n.jd=new Rr(vy),{start:n,tokens:vu({groups:t},F9)}}function kPe(e,t){const n=EPe(t.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,o=[];let i=0,s=0;for(;s=0&&(p+=n[s].length,g++),u+=n[s].length,i+=n[s].length,s++;i-=p,s-=g,u-=p,o.push({t:f.t,v:t.slice(i-u,i),s:i-u,e:i})}return o}function EPe(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 js(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 Sf={defaultProtocol:"http",events:null,format:VI,formatHref:VI,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function bO(e,t){t===void 0&&(t=null);let n=vu({},Sf);e&&(n=vu(n,e instanceof bO?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=Sf.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&&vu(s,f),{tagName:o,attributes:s,content:i,eventListeners:p}}};function r1(e,t){class n extends V9{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 HI=r1("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),WI=r1("text"),$Pe=r1("nl"),Ka=r1("url",{isLink:!0,toHref(e){return e===void 0&&(e=Sf.defaultProtocol),this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk;return e.length>=2&&e[0].t!==xf&&e[1].t===Ks}}),Pn=e=>new Rr(e);function MPe(e){let{groups:t}=e;const n=t.domain.concat([ry,iy,Ws,sy,ay,ly,cy,uy,vi,mO,dy,fy,py,hy,yi,vy,Vd,gy]),r=[oy,jc,rl,Ic,ol,Ks,vO,gi,yO,Bd,Tc,Ad,Fd,my,_O,wO],o=[ry,oy,iy,sy,ay,ly,rl,cy,uy,vi,Tc,dy,fy,py,hy,my,yi,vy,Vd,gy],i=Pn(),s=de(i,Vd);Me(s,o,s),Me(s,t.domain,s);const a=Pn(),c=Pn(),u=Pn();Me(i,t.domain,a),Me(i,t.scheme,c),Me(i,t.slashscheme,u),Me(a,o,s),Me(a,t.domain,a);const f=de(a,Ws);de(s,Ws,f),de(c,Ws,f),de(u,Ws,f);const p=de(s,gi);Me(p,o,s),Me(p,t.domain,s);const g=Pn();Me(f,t.domain,g),Me(g,t.domain,g);const v=de(g,gi);Me(v,t.domain,g);const y=Pn(HI);Me(v,t.tld,y),Me(v,t.utld,y),de(f,xf,y);const w=de(g,vi);Me(w,t.domain,g),Me(y,t.domain,g),de(y,gi,v),de(y,vi,w);const P=de(y,Ks);Me(P,t.numeric,HI);const x=de(a,vi),S=de(a,gi);Me(x,t.domain,a),Me(S,o,s),Me(S,t.domain,a);const O=Pn(Ka);Me(S,t.tld,O),Me(S,t.utld,O),Me(O,t.domain,a),Me(O,o,s),de(O,gi,S),de(O,vi,x),de(O,Ws,f);const E=de(O,Ks),$=Pn(Ka);Me(E,t.numeric,$);const N=Pn(Ka),I=Pn();Me(N,n,N),Me(N,r,I),Me(I,n,N),Me(I,r,I),de(O,yi,N),de($,yi,N);const R=de(c,Ks),B=de(u,Ks),z=de(B,yi),G=de(z,yi);Me(c,t.domain,a),de(c,gi,S),de(c,vi,x),Me(u,t.domain,a),de(u,gi,S),de(u,vi,x),Me(R,t.domain,N),de(R,yi,N),Me(G,t.domain,N),Me(G,n,N),de(G,yi,N);const X=de(N,Tc),Q=de(N,Ad),V=de(N,Bd),H=de(N,Fd);de(I,Tc,X),de(I,Ad,Q),de(I,Bd,V),de(I,Fd,H),de(X,rl,N),de(Q,Ic,N),de(V,jc,N),de(H,ol,N),de(X,rl,N);const Z=Pn(Ka),Y=Pn(Ka),j=Pn(Ka),W=Pn(Ka);Me(X,n,Z),Me(Q,n,Y),Me(V,n,j),Me(H,n,W);const F=Pn(),K=Pn(),ee=Pn(),fe=Pn();return Me(X,r),Me(Q,r),Me(V,r),Me(H,r),Me(Z,n,Z),Me(Y,n,Y),Me(j,n,j),Me(W,n,W),Me(Z,r,Z),Me(Y,r,Y),Me(j,r,j),Me(W,r,W),Me(F,n,F),Me(K,n,Y),Me(ee,n,j),Me(fe,n,W),Me(F,r,F),Me(K,r,K),Me(ee,r,ee),Me(fe,r,fe),de(Y,Ic,N),de(j,jc,N),de(W,ol,N),de(Z,rl,N),de(K,Ic,N),de(ee,jc,N),de(fe,ol,N),de(F,ol,N),de(i,xf,O),de(i,gO,$Pe),{start:i,tokens:F9}}function NPe(e,t,n){let r=n.length,o=0,i=[],s=[];for(;o=0&&g++,o++,f++;if(g<0)o-=f,o0&&(i.push(xw(WI,t,s)),s=[]),o-=g,f-=g;const v=p.t,y=n.slice(o-f,o);i.push(xw(v,t,y))}}return s.length>0&&i.push(xw(WI,t,s)),i}function xw(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 TPe=typeof console<"u"&&console&&console.warn||(()=>{}),IPe="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Vt={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function jPe(){Rr.groups={},Vt.scanner=null,Vt.parser=null,Vt.tokenQueue=[],Vt.pluginQueue=[],Vt.customSchemes=[],Vt.initialized=!1}function UI(e,t){if(t===void 0&&(t=!1),Vt.initialized&&TPe(`linkifyjs: already initialized - will not register custom scheme "${e}" ${IPe}`),!/^[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`);Vt.customSchemes.push([e,t])}function LPe(){Vt.scanner=CPe(Vt.customSchemes);for(let e=0;e{const o=t.some(u=>u.docChanged)&&!n.doc.eq(r.doc),i=t.some(u=>u.getMeta("preventAutolink"));if(!o||i)return;const{tr:s}=r,a=Pbe(n.doc,[...t]);if(Ibe(a).forEach(({newRange:u})=>{const f=Cbe(r.doc,u,v=>v.isTextblock);let p,g;if(f.length>1?(p=f[0],g=r.doc.textBetween(p.pos,p.pos+p.node.nodeSize,void 0," ")):f.length&&r.doc.textBetween(u.from,u.to," "," ").endsWith(" ")&&(p=f[0],g=r.doc.textBetween(p.pos,u.to,void 0," ")),p&&g){const v=g.split(" ").filter(P=>P!=="");if(v.length<=0)return!1;const y=v[v.length-1],w=p.pos+g.lastIndexOf(y);if(!y)return!1;H9(y).filter(P=>P.isLink).map(P=>({...P,from:w+P.start+1,to:w+P.end+1})).filter(P=>r.schema.marks.code?!r.doc.rangeHasMark(P.from,P.to,r.schema.marks.code):!0).filter(P=>e.validate?e.validate(P.value):!0).forEach(P=>{pO(P.from,P.to,r.doc).some(x=>x.mark.type===e.type)||s.addMark(P.from,P.to,e.type.create({href:P.href}))})}}),!!s.steps.length)return s}})}function zPe(e){return new Zr({key:new Ai("handleClickLink"),props:{handleClick:(t,n,r)=>{var o,i;if(r.button!==0||r.target.nodeName!=="A")return!1;const a=f9(t.state,e.type.name),c=r.target,u=(o=c?.href)!==null&&o!==void 0?o:a.href,f=(i=c?.target)!==null&&i!==void 0?i:a.target;return c&&u?(t.editable&&window.open(u,f),!0):!1}}})}const APe=or.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(e=>{if(typeof e=="string"){UI(e);return}UI(e.scheme,e.optionalSlashes)})},onDestroy(){jPe()},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},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:'a[href]:not([href *= "javascript:" i])'}]},renderHTML({HTMLAttributes:e}){return["a",Et(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[ka({find:e=>H9(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,t)=>{var n,r;const o=(n=t.clipboardData)===null||n===void 0?void 0:n.getData("text/html"),i=/href="([^"]*)"/,s=o?.match(i);return s?{href:s[1]}:{href:(r=e.data)===null||r===void 0?void 0:r.href}}})]},addProseMirrorPlugins(){const e=[];return this.options.autolink&&e.push(RPe({type:this.type,validate:this.options.validate})),this.options.openOnClick&&e.push(zPe({type:this.type})),e}}),W9=APe.extend({addKeyboardShortcuts:()=>({"Mod-k":()=>(window.dispatchEvent(new Event("edit-link")),!0)})}).configure({openOnClick:!1}),BPe=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))$/,FPe=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))/g,U9=or.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",Et(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[Ll({find:BPe,type:this.type})]},addPasteRules(){return[ka({find:FPe,type:this.type})]}}),VPe=/^\s*>\s$/,HPe=Gr.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return["blockquote",Et(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[xf({find:VPe,type:this.type})]}}),WPe=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,UPe=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,ZPe=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,GPe=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,YPe=or.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",Et(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[Ll({find:WPe,type:this.type}),Ll({find:ZPe,type:this.type})]},addPasteRules(){return[ka({find:UPe,type:this.type}),ka({find:GPe,type:this.type})]}}),KPe=Gr.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",Et(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)}}}),ZI=or.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["span",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=Qf(e,this.type);return Object.entries(n).some(([,o])=>!!o)?!0:t.unsetMark(this.name)}}}}),GI=/^\s*([-+*])\s$/,qPe=Gr.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",Et(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(KPe.name,this.editor.getAttributes(ZI.name)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=xf({find:GI,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=xf({find:GI,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(ZI.name),editor:this.editor})),[e]}}),JPe=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/,XPe=/(?:^|\s)((?:`)((?:[^`]+))(?:`))/g,QPe=or.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",Et(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[Ll({find:JPe,type:this.type})]},addPasteRules(){return[ka({find:XPe,type:this.type})]}}),eOe=/^```([a-z]+)?[\s\n]$/,tOe=/^~~~([a-z]+)?[\s\n]$/,nOe=Gr.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",Et(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(` + 3. "-" cannot repeat`);Vt.customSchemes.push([e,t])}function LPe(){Vt.scanner=CPe(Vt.customSchemes);for(let e=0;e{const o=t.some(u=>u.docChanged)&&!n.doc.eq(r.doc),i=t.some(u=>u.getMeta("preventAutolink"));if(!o||i)return;const{tr:s}=r,a=Pbe(n.doc,[...t]);if(Ibe(a).forEach(({newRange:u})=>{const f=Cbe(r.doc,u,v=>v.isTextblock);let p,g;if(f.length>1?(p=f[0],g=r.doc.textBetween(p.pos,p.pos+p.node.nodeSize,void 0," ")):f.length&&r.doc.textBetween(u.from,u.to," "," ").endsWith(" ")&&(p=f[0],g=r.doc.textBetween(p.pos,u.to,void 0," ")),p&&g){const v=g.split(" ").filter(P=>P!=="");if(v.length<=0)return!1;const y=v[v.length-1],w=p.pos+g.lastIndexOf(y);if(!y)return!1;H9(y).filter(P=>P.isLink).map(P=>({...P,from:w+P.start+1,to:w+P.end+1})).filter(P=>r.schema.marks.code?!r.doc.rangeHasMark(P.from,P.to,r.schema.marks.code):!0).filter(P=>e.validate?e.validate(P.value):!0).forEach(P=>{pO(P.from,P.to,r.doc).some(x=>x.mark.type===e.type)||s.addMark(P.from,P.to,e.type.create({href:P.href}))})}}),!!s.steps.length)return s}})}function zPe(e){return new Zr({key:new zi("handleClickLink"),props:{handleClick:(t,n,r)=>{var o,i;if(r.button!==0||r.target.nodeName!=="A")return!1;const a=f9(t.state,e.type.name),c=r.target,u=(o=c?.href)!==null&&o!==void 0?o:a.href,f=(i=c?.target)!==null&&i!==void 0?i:a.target;return c&&u?(t.editable&&window.open(u,f),!0):!1}}})}const APe=or.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(e=>{if(typeof e=="string"){UI(e);return}UI(e.scheme,e.optionalSlashes)})},onDestroy(){jPe()},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},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:'a[href]:not([href *= "javascript:" i])'}]},renderHTML({HTMLAttributes:e}){return["a",kt(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[ka({find:e=>H9(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,t)=>{var n,r;const o=(n=t.clipboardData)===null||n===void 0?void 0:n.getData("text/html"),i=/href="([^"]*)"/,s=o?.match(i);return s?{href:s[1]}:{href:(r=e.data)===null||r===void 0?void 0:r.href}}})]},addProseMirrorPlugins(){const e=[];return this.options.autolink&&e.push(RPe({type:this.type,validate:this.options.validate})),this.options.openOnClick&&e.push(zPe({type:this.type})),e}}),W9=APe.extend({addKeyboardShortcuts:()=>({"Mod-k":()=>(window.dispatchEvent(new Event("edit-link")),!0)})}).configure({openOnClick:!1}),BPe=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))$/,FPe=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))/g,U9=or.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",kt(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[Ll({find:BPe,type:this.type})]},addPasteRules(){return[ka({find:FPe,type:this.type})]}}),VPe=/^\s*>\s$/,HPe=Gr.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return["blockquote",kt(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[bf({find:VPe,type:this.type})]}}),WPe=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,UPe=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,ZPe=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,GPe=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,YPe=or.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",kt(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[Ll({find:WPe,type:this.type}),Ll({find:ZPe,type:this.type})]},addPasteRules(){return[ka({find:UPe,type:this.type}),ka({find:GPe,type:this.type})]}}),KPe=Gr.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",kt(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)}}}),ZI=or.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["span",kt(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=Xf(e,this.type);return Object.entries(n).some(([,o])=>!!o)?!0:t.unsetMark(this.name)}}}}),GI=/^\s*([-+*])\s$/,qPe=Gr.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",kt(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(KPe.name,this.editor.getAttributes(ZI.name)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=bf({find:GI,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=bf({find:GI,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(ZI.name),editor:this.editor})),[e]}}),JPe=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/,XPe=/(?:^|\s)((?:`)((?:[^`]+))(?:`))/g,QPe=or.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",kt(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[Ll({find:JPe,type:this.type})]},addPasteRules(){return[ka({find:XPe,type:this.type})]}}),eOe=/^```([a-z]+)?[\s\n]$/,tOe=/^~~~([a-z]+)?[\s\n]$/,nOe=Gr.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",kt(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[Px({find:eOe,type:this.type,getAttributes:e=>({language:e[1]})}),Px({find:tOe,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new Zr({key:new Ai("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(Ve.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}}})]}}),rOe=Gr.create({name:"doc",topNode:!0,content:"block+"});function oOe(e={}){return new Zr({view(t){return new iOe(t,e)}})}class iOe{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=h7(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 sOe=br.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[oOe(this.options)]}});class Kt extends Ze{constructor(t){super(t,t)}map(t,n){let r=t.resolve(n.map(this.head));return Kt.valid(r)?new Kt(r):Ze.near(r)}content(){return ye.empty}eq(t){return t instanceof Kt&&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 Kt(t.resolve(n.pos))}getBookmark(){return new xO(this.anchor)}static valid(t){let n=t.parent;if(n.isTextblock||!aOe(t)||!lOe(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&&Kt.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(Kt.valid(c))return c}for(;;){let s=n>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!Le.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(Kt.valid(a))return a}return null}}}Kt.prototype.visible=!1;Kt.findFrom=Kt.findGapCursorFrom;Ze.jsonID("gapcursor",Kt);class xO{constructor(t){this.pos=t}map(t){return new xO(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return Kt.valid(n)?new Kt(n):Ze.near(n)}}function aOe(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 lOe(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 cOe(){return new Zr({props:{decorations:pOe,createSelectionBetween(e,t,n){return t.pos==n.pos&&Kt.valid(n)?new Kt(n):null},handleClick:dOe,handleKeyDown:uOe,handleDOMEvents:{beforeinput:fOe}}})}const uOe=Q7({ArrowLeft:ph("horiz",-1),ArrowRight:ph("horiz",1),ArrowUp:ph("vert",-1),ArrowDown:ph("vert",1)});function ph(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 Ve){if(!i.endOfTextblock(n)||a.depth==0)return!1;c=!1,a=r.doc.resolve(t>0?a.after():a.before())}let u=Kt.findGapCursorFrom(a,t,c);return u?(o&&o(r.tr.setSelection(new Kt(u))),!0):!1}}function dOe(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!Kt.valid(r))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&Le.isSelectable(e.state.doc.nodeAt(o.inside))?!1:(e.dispatch(e.state.tr.setSelection(new Kt(r))),!0)}function fOe(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof Kt))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(Ve.near(i.doc.resolve(n.pos+1))),e.dispatch(i),!1}function pOe(e){if(!(e.selection instanceof Kt))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",gn.create(e.doc,[jo.widget(e.selection.head,t,{key:"gapcursor"})])}const hOe=br.create({name:"gapCursor",addProseMirrorPlugins(){return[cOe()]},extendNodeSchema(e){var t;const n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=Ue(Ce(e,"allowGapCursor",n)))!==null&&t!==void 0?t:null}}}),mOe=Gr.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",Et(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(g=>a.includes(g.type.name));u.ensureMarks(p)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),gOe=Gr.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]}`,Et(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=>Px({find:new RegExp(`^(#{1,${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}});var _y=200,$n=function(){};$n.prototype.append=function(t){return t.length?(t=$n.from(t),!this.length&&t||t.length<_y&&this.leafAppend(t)||this.length<_y&&t.leafPrepend(this)||this.appendInner(t)):this};$n.prototype.prepend=function(t){return t.length?$n.from(t).append(this):this};$n.prototype.appendInner=function(t){return new vOe(this,t)};$n.prototype.slice=function(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.length),t>=n?$n.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};$n.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};$n.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)};$n.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};$n.from=function(t){return t instanceof $n?t:t&&t.length?new Z9(t):$n.empty};var Z9=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<=_y)return new t(this.values.concat(o.flatten()))},t.prototype.leafPrepend=function(o){if(this.length+o.length<=_y)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}($n);$n.empty=new Z9([]);var vOe=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}($n);const yOe=500;class qo{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,g)=>{if(!p.step){o||(o=this.remapping(r,g+1),i=o.maps.length),i--,f.push(p);return}if(o){f.push(new wi(p.map));let v=p.step.map(o.slice(i)),y;v&&s.maybeStep(v).doc&&(y=s.mapping.maps[s.mapping.maps.length-1],u.push(new wi(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 qo(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;fwOe&&(a=_Oe(a,u),s-=u),new qo(a.append(i),s)}remapping(t,n){let r=new Gc;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 qo(this.items.append(t.map(n=>new wi(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(g=>{g.selection&&a--},o);let c=n;this.items.forEach(g=>{let v=i.getMirror(--c);if(v==null)return;s=Math.min(s,v);let y=i.maps[v];if(g.step){let w=t.steps[v].invert(t.docs[v]),P=g.selection&&g.selection.map(i.slice(c+1,v));P&&a++,r.push(new wi(y,w,P))}else r.push(new wi(y))},o);let u=[];for(let g=n;gyOe&&(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 wi(u.invert(),c,f),g,v=o.length-1;(g=o.length&&o[v].merge(p))?o[v]=g:o.push(p)}}else s.map&&r--},this.items.length,0),new qo($n.from(o.reverse()),i)}}qo.empty=new qo($n.empty,0);function _Oe(e,t){let n;return e.forEach((r,o)=>{if(r.selection&&t--==0)return n=o,!1}),e.slice(n)}class wi{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 wi(n.getMap().invert(),n,this.selection)}}}class Us{constructor(t,n,r,o,i){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}}const wOe=20;function bOe(e,t,n,r){let o=n.getMeta(wa),i;if(o)return o.historyState;n.getMeta(SOe)&&(e=new Us(e.done,e.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(s&&s.getMeta(wa))return s.getMeta(wa).redo?new Us(e.done.addTransform(n,void 0,r,nm(t)),e.undone,YI(n.mapping.maps[n.steps.length-1]),e.prevTime,e.prevComposition):new Us(e.done,e.undone.addTransform(n,void 0,r,nm(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),c=e.prevTime==0||!s&&e.prevComposition!=a&&(e.prevTime<(n.time||0)-r.newGroupDelay||!xOe(n,e.prevRanges)),u=s?Pw(e.prevRanges,n.mapping):YI(n.mapping.maps[n.steps.length-1]);return new Us(e.done.addTransform(n,c?t.selection.getBookmark():void 0,r,nm(t)),qo.empty,u,n.time,a??e.prevComposition)}else return(i=n.getMeta("rebased"))?new Us(e.done.rebased(n,i),e.undone.rebased(n,i),Pw(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new Us(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),Pw(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function xOe(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 YI(e){let t=[];return e.forEach((n,r,o,i)=>t.push(o,i)),t}function Pw(e,t){if(!e)return null;let n=[];for(let r=0;r{let n=wa.getState(e);return!n||n.done.eventCount==0?!1:(t&&G9(n,e,t,!1),!0)},K9=(e,t)=>{let n=wa.getState(e);return!n||n.undone.eventCount==0?!1:(t&&G9(n,e,t,!0),!0)},OOe=br.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>Y9(e,t),redo:()=>({state:e,dispatch:t})=>K9(e,t)}},addProseMirrorPlugins(){return[POe(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-Z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-Y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Shift-Mod-Z":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),COe=Gr.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",Et(this.options.HTMLAttributes,e)]},addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{const{$to:n}=t.selection,r=e();return n.parentOffset===0?r.insertContentAt(Math.max(n.pos-2,0),{type:this.name}):r.insertContent({type:this.name}),r.command(({tr:o,dispatch:i})=>{var s;if(i){const{$to:a}=o.selection,c=a.end();if(a.nodeAfter)a.nodeAfter.isTextblock?o.setSelection(Ve.create(o.doc,a.pos+1)):a.nodeAfter.isBlock?o.setSelection(Le.create(o.doc,a.pos)):o.setSelection(Ve.create(o.doc,a.pos));else{const u=(s=a.parent.type.contentMatch.defaultType)===null||s===void 0?void 0:s.create();u&&(o.insert(c,u),o.setSelection(Ve.create(o.doc,c+1)))}o.scrollIntoView()}return!0}).run()}}},addInputRules(){return[p9({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),kOe=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,EOe=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,$Oe=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,MOe=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,NOe=or.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",Et(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[Ll({find:kOe,type:this.type}),Ll({find:$Oe,type:this.type})]},addPasteRules(){return[ka({find:EOe,type:this.type}),ka({find:MOe,type:this.type})]}}),TOe=Gr.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",Et(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)}}}),IOe=Gr.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",Et(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)}}}),qI=or.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["span",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=Qf(e,this.type);return Object.entries(n).some(([,o])=>!!o)?!0:t.unsetMark(this.name)}}}}),JI=/^(\d+)\.\s$/,jOe=Gr.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",Et(this.options.HTMLAttributes,n),0]:["ol",Et(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(IOe.name,this.editor.getAttributes(qI.name)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=xf({find:JI,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=xf({find:JI,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(qI.name)}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1],editor:this.editor})),[e]}}),LOe=Gr.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),DOe=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,ROe=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,zOe=or.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",Et(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(){const e={};return dO()?e["Mod-Shift-s"]=()=>this.editor.commands.toggleStrike():e["Ctrl-Shift-s"]=()=>this.editor.commands.toggleStrike(),e},addInputRules(){return[Ll({find:DOe,type:this.type})]},addPasteRules(){return[ka({find:ROe,type:this.type})]}}),AOe=Gr.create({name:"text",group:"inline"}),q9=br.create({name:"starterKit",addExtensions(){var e,t,n,r,o,i,s,a,c,u,f,p,g,v,y,w,P,x;const S=[];return this.options.blockquote!==!1&&S.push(HPe.configure((e=this.options)===null||e===void 0?void 0:e.blockquote)),this.options.bold!==!1&&S.push(YPe.configure((t=this.options)===null||t===void 0?void 0:t.bold)),this.options.bulletList!==!1&&S.push(qPe.configure((n=this.options)===null||n===void 0?void 0:n.bulletList)),this.options.code!==!1&&S.push(QPe.configure((r=this.options)===null||r===void 0?void 0:r.code)),this.options.codeBlock!==!1&&S.push(nOe.configure((o=this.options)===null||o===void 0?void 0:o.codeBlock)),this.options.document!==!1&&S.push(rOe.configure((i=this.options)===null||i===void 0?void 0:i.document)),this.options.dropcursor!==!1&&S.push(sOe.configure((s=this.options)===null||s===void 0?void 0:s.dropcursor)),this.options.gapcursor!==!1&&S.push(hOe.configure((a=this.options)===null||a===void 0?void 0:a.gapcursor)),this.options.hardBreak!==!1&&S.push(mOe.configure((c=this.options)===null||c===void 0?void 0:c.hardBreak)),this.options.heading!==!1&&S.push(gOe.configure((u=this.options)===null||u===void 0?void 0:u.heading)),this.options.history!==!1&&S.push(OOe.configure((f=this.options)===null||f===void 0?void 0:f.history)),this.options.horizontalRule!==!1&&S.push(COe.configure((p=this.options)===null||p===void 0?void 0:p.horizontalRule)),this.options.italic!==!1&&S.push(NOe.configure((g=this.options)===null||g===void 0?void 0:g.italic)),this.options.listItem!==!1&&S.push(TOe.configure((v=this.options)===null||v===void 0?void 0:v.listItem)),this.options.orderedList!==!1&&S.push(jOe.configure((y=this.options)===null||y===void 0?void 0:y.orderedList)),this.options.paragraph!==!1&&S.push(LOe.configure((w=this.options)===null||w===void 0?void 0:w.paragraph)),this.options.strike!==!1&&S.push(zOe.configure((P=this.options)===null||P===void 0?void 0:P.strike)),this.options.text!==!1&&S.push(AOe.configure((x=this.options)===null||x===void 0?void 0:x.text)),S}}),J9=or.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",Et(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()}}}),X9=br.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")}}}),Q9=or.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",Et(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()}}}),eB=or.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",Et(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()}}}),BOe=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,tB=Gr.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",Et(this.options.HTMLAttributes,e)]},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[p9({find:BOe,type:this.type,getAttributes:e=>{const[,,t,n,r]=e;return{src:n,alt:t,title:r}}})]}}),nB=or.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["span",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=Qf(e,this.type);return Object.entries(n).some(([,o])=>!!o)?!0:t.unsetMark(this.name)}}}}),rB=br.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()}}}),FOe=ue({saveButton:{position:"absolute",top:5,right:5,zIndex:99}}),tp=({content:e="

",onChange:t,styles:n,contentAreaStyle:r,onSave:o})=>{const{classes:i}=FOe(),[s,a]=_.useState(!1),c=h9({content:e,extensions:[q9,J9,W9,Q9,eB,U9,rB,nB,tB,X9.configure({types:["heading","paragraph"]})]});return _.useEffect(()=>{c?.commands.setContent(e,!0)},[e]),_.useEffect(()=>{if(t&&t(c?.getHTML()),!o)return;const u=setTimeout(()=>{c?.getHTML()!==e?a(!0):a(!1)},500);return()=>clearTimeout(u)},[c?.getHTML()]),h.jsx(h.Fragment,{children:h.jsxs(Ee,{editor:c,styles:n,style:{borderRadius:2},children:[h.jsxs(Ee.Toolbar,{sticky:!0,children:[h.jsxs(Ee.ControlsGroup,{children:[h.jsx(Ee.Bold,{}),h.jsx(Ee.Italic,{}),h.jsx(Ee.Underline,{}),h.jsx(Ee.Strikethrough,{}),h.jsx(Ee.ClearFormatting,{}),h.jsx(Ee.Highlight,{})]}),h.jsxs(Ee.ControlsGroup,{children:[h.jsx(Ee.Hr,{}),h.jsx(Ee.BulletList,{}),h.jsx(Ee.OrderedList,{})]}),h.jsxs(Ee.ControlsGroup,{children:[h.jsx(Ee.Link,{}),h.jsx(Ee.Unlink,{})]}),h.jsxs(Ee.ControlsGroup,{children:[h.jsx(Ee.AlignLeft,{}),h.jsx(Ee.AlignCenter,{}),h.jsx(Ee.AlignJustify,{}),h.jsx(Ee.AlignRight,{})]}),h.jsx(Ee.ControlsGroup,{children:h.jsx(Ee.ColorPicker,{colors:["#25262b","#868e96","#fa5252","#e64980","#be4bdb","#7950f2","#4c6ef5","#228be6","#15aabf","#12b886","#40c057","#82c91e","#fab005","#fd7e14"]})})]}),c&&h.jsxs(St,{style:r,children:[h.jsx(Os,{mounted:!!(s&&o),transition:"slide-down",children:u=>h.jsx(Qe,{style:u,className:i.saveButton,color:"dark",variant:"default",size:26,onClick:()=>{a(!1),o&&o(c?.getHTML())},children:h.jsx(O8,{size:20})})}),h.jsx(Ee.Content,{})]})]})})},VOe=[{contents:"Dsadaasd Hello there buddy, this is a message from the server.",id:1,playerId:1,position:[0,0,0],callsign:132,firstname:"Fdsadas",lastname:"DSasd",citizenid:"dsadas",image:"https://cdn.vectorstock.com/i/preview-1x/97/68/account-avatar-dark-mode-glyph-ui-icon-vector-44429768.jpg",createdAt:Date.now()-3e5},{contents:"Dsadaasd Hello there buddy, this is a message from the server.",id:2,playerId:1,position:[0,0,0],callsign:132,firstname:"Fdsadas",lastname:"DSasd",citizenid:"dsadas",image:"https://cdn.vectorstock.com/i/preview-1x/97/68/account-avatar-dark-mode-glyph-ui-icon-vector-44429768.jpg",createdAt:Date.now()-9e5},{contents:"Dsadaasd Hello there buddy, this is a message from the server.",id:3,playerId:1,position:[0,0,0],callsign:132,firstname:"Fdsadas",lastname:"DSasd",citizenid:"dsadas",image:"https://cdn.vectorstock.com/i/preview-1x/97/68/account-avatar-dark-mode-glyph-ui-icon-vector-44429768.jpg",createdAt:Date.now()-12e20},{contents:"Dsadaasd Hello there buddy",id:4,playerId:1,position:[0,0,0],callsign:132,firstname:"fad",lastname:"DSasd",citizenid:"dsadas",image:"https://cdn.vectorstock.com/i/preview-1x/97/68/account-avatar-dark-mode-glyph-ui-icon-vector-44429768.jpg",createdAt:Date.now()},{contents:"Dsadaasd Hello there buddy",id:5,playerId:1,position:[0,0,0],callsign:132,firstname:"fad",lastname:"DSasd",citizenid:"dsadas",image:"https://cdn.vectorstock.com/i/preview-1x/97/68/account-avatar-dark-mode-glyph-ui-icon-vector-44429768.jpg",createdAt:Date.now()}],SO=tn(e=>({announcements:[],fetchAnnouncements:async()=>{if(at())e({announcements:[...VOe]});else{const t=await me("getAnnouncements");e({announcements:[...t.announcements]})}}})),HOe=()=>{const{fetchAnnouncements:e}=SO(s=>({fetchAnnouncements:s.fetchAnnouncements})),[t,n]=_.useState(!1),[r,o]=_.useState(""),i=async()=>{if(!at()){if(n(!0),!await me("createAnnouncement",{contents:r}))return;e(),n(!1)}ke.closeAll()};return h.jsxs(Je,{h:400,style:{flex:"0 0 43.5rem"},children:[h.jsx(tp,{content:"",onChange:s=>o(s||""),styles:{content:{backgroundColor:"#1A1B1E"},toolbar:{backgroundColor:"#2C2E33"},controlsGroup:{pointerEvents:"auto",backgroundColor:"#282828"}},contentAreaStyle:{height:270,width:406,padding:0}}),h.jsx(st,{variant:"light",color:"gray",fullWidth:!0,onClick:()=>i(),loading:t,children:D.create})]})},WOe=e=>{const t=h9({extensions:[q9,J9,W9,Q9,eB,U9,rB,nB,tB,X9],content:e.contents,editable:!1});return h.jsx(Je,{children:h.jsx(Ee,{editor:t,children:h.jsx(Ee.Content,{})})})};pe.extend(F8);const oB=({announcement:e})=>{const t=`

${e.contents}

`;function n(r){return r.replace(/<\/?[^>]+(>|$)/g,"")}return h.jsxs("div",{className:"announcement-list-card",onClick:()=>{ke.open({title:h.jsxs(W,{style:{fontSize:16,color:"white"},weight:500,children:[`${e.firstname} ${e.lastname}`," | ",pe(e.createdAt).fromNow()]}),centered:!0,children:h.jsx(WOe,{contents:t})})},children:[h.jsx(nt,{position:"apart",children:h.jsxs(nt,{children:[h.jsx(kP,{color:"blue",src:e.image}),h.jsxs(Je,{spacing:0,children:[h.jsx(W,{fw:500,c:"white",children:`${e.firstname} ${e.lastname}`}),h.jsx(W,{size:"xs",c:"dark.2",children:pe(e.createdAt).fromNow()})]})]})}),h.jsx(W,{c:"gray.4",size:"sm",lineClamp:1,children:n(t)})]})},UOe=()=>{const{announcements:e}=SO(n=>({announcements:n.announcements})),t=[...e].sort((n,r)=>Number(new Date(r.createdAt))-Number(new Date(n.createdAt)));return h.jsx(St,{h:600,children:h.jsx("div",{className:"announcement-card-content",children:t.length>0?t.map(n=>h.jsx(oB,{announcement:n},n.id)):h.jsx(W,{color:"dimmed",size:"xs",children:D.no_announcements_found})})})},ZOe=()=>{const{announcements:e,fetchAnnouncements:t}=SO(a=>({announcements:a.announcements,fetchAnnouncements:a.fetchAnnouncements})),[n,r]=_.useState(!1),{role:o}=bo(a=>a.personalData);function i(a){return!(a==="Chief"||a==="Assistant Chief"||a==="Captain"||a==="Lieutenant"||a==="Sergeant")}const s=[...e].sort((a,c)=>Number(new Date(c.createdAt))-Number(new Date(a.createdAt))).slice(0,3);return _.useEffect(()=>{r(!0),(async()=>await t())().then(()=>{r(!1)})},[]),h.jsxs("div",{className:"card-background",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.announcements}),h.jsxs("div",{className:"card-title-icons",children:[h.jsx(At,{label:D.create_announcement,withArrow:!0,color:"gray",position:"bottom",children:h.jsx(Qe,{variant:"light",color:"dark",disabled:i(o),onClick:()=>{ke.open({title:h.jsx(W,{style:{fontSize:16,color:"white"},weight:500,children:D.create_announcement}),centered:!0,children:h.jsx(HOe,{})})},children:h.jsx(Eu,{size:16,color:"white"})})}),h.jsx(At,{label:D.view_all,withArrow:!0,color:"gray",position:"bottom",children:h.jsx(Qe,{variant:"light",color:"dark",onClick:()=>{ke.open({title:h.jsx(W,{style:{fontSize:16,color:"white"},weight:500,children:D.all_announcements}),centered:!0,children:h.jsx(UOe,{})})},children:h.jsx($he,{size:16,color:"white"})})}),h.jsx(Vhe,{size:M(25),color:"white"})]})]}),h.jsx(Ye,{mt:5,mb:5}),h.jsx("div",{className:"announcement-card-content",children:n?h.jsx(Pr,{h:"100%",children:h.jsx(en,{})}):s.length>0?s.map(a=>h.jsx(oB,{announcement:a},a.id)):h.jsx(W,{color:"dimmed",size:"xs",children:D.no_announcements_found})})]})},GOe=[{citizenid:"AF30442",firstname:"Billy",lastname:"Bob",incidentid:3,expiresAt:Date.now(),image:"https://i.imgur.com/dqopYB9b.jpg"},{citizenid:"AF30442",firstname:"Billy",lastname:"Bob",incidentid:3,expiresAt:Date.now(),image:"https://i.imgur.com/dqopYB9b.jpg"},{citizenid:"AF30442",firstname:"Billy",lastname:"Bob",incidentid:3,expiresAt:Date.now(),image:"https://i.imgur.com/dqopYB9b.jpg"},{citizenid:"AF30442",firstname:"Billy",lastname:"Bob",incidentid:3,expiresAt:Date.now(),image:"https://i.imgur.com/dqopYB9b.jpg"},{citizenid:"AF30442",firstname:"Billy",lastname:"Bob",incidentid:3,expiresAt:Date.now(),image:"https://i.imgur.com/dqopYB9b.jpg"},{citizenid:"AF30442",firstname:"Billy",lastname:"Bob",incidentid:3,expiresAt:Date.now(),image:"https://i.imgur.com/dqopYB9b.jpg"}],YOe=tn(e=>({warrants:at()?GOe:[],getWarrants:async()=>{try{const t=await me("getWarrants");return e({warrants:t}),{warrants:t}}catch(t){return console.error("Failed to fetch recent activities:",t),{warrants:[]}}},setWarrants:t=>e({warrants:t})})),KOe=()=>{const{warrants:e,getWarrants:t}=YOe(),[n,r]=_.useState(!1),o=Ul(),{setActiveIncident:i,setIncidentActive:s}=Ur();return _.useEffect(()=>{r(!0),(async()=>{t()})().then(()=>{r(!1)})},[]),h.jsxs("div",{className:"card-background",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.active_warrants}),h.jsx(Yhe,{size:M(25),color:"white"})]}),h.jsx(Ye,{mt:5,mb:5}),h.jsx(St,{h:290,children:h.jsx("div",{className:"warrants-card-content",children:n?h.jsx(Pr,{h:"100%",children:h.jsx(en,{})}):e.length>0?e.map(a=>h.jsx(nt,{position:"apart",className:"warrants-card",onClick:async()=>{if(at())return;const c=await me("getIncident",a.incidentid);i(c),s(!0),o("/incidents")},children:h.jsxs(nt,{children:[h.jsx(kP,{color:"blue",src:a.image}),h.jsxs(Je,{spacing:0,children:[h.jsx(W,{fw:500,c:"white",children:`${a.firstname} ${a.lastname}`}),h.jsxs(W,{size:"xs",c:"dark.2",children:[D.expires_in,": ",pe().to(a.expiresAt,!0)]})]})]})})):h.jsx(W,{color:"dimmed",size:"xs",children:D.no_warrants_found})})})]})},_u=e=>e?Object.entries(e).map(t=>({id:+t[0],...t[1]})):[],qOe=e=>Array.isArray(e)?e.map(t=>({...t,units:_u(t.units)})):Object.entries(e).map(t=>{const n={...t[1],units:[]};return n.units=_u(t[1].units),n}),wd=e=>e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1),JOe=[{id:1,time:Date.now(),location:"Somewhere",coords:[350,350],linked:!1,offense:"Bank robbery",code:"10-29",blip:162,units:[{name:"Unit 132",type:"car",members:[{firstname:"Billy",lastname:"Bob",callsign:132,citizenid:"321553",playerId:1,position:[0,0,0]}],id:132},{name:"Unit 322",type:"heli",members:[{firstname:"Marc",lastname:"Marshall",callsign:322,citizenid:"451503",playerId:1,position:[0,0,0]}],id:322}]},{id:2,time:Date.now(),location:"Somewhere",info:[{label:"Sultan RS",icon:"gun"},{label:"XYZ 123",icon:"badge-tm"}],coords:[255,150],blip:51,linked:!1,offense:"Officer Down",code:"10-13",units:[{name:"Unit 132",type:"car",members:[{firstname:"Billy",lastname:"Bob",callsign:132,citizenid:"311342",playerId:1,position:[0,0,0]},{firstname:"Martin",lastname:"Contreras",callsign:521,citizenid:"912132",playerId:1,position:[0,0,0]}],id:132},{name:"Unit 823",type:"heli",members:[{firstname:"Bobby",lastname:"Hopkins",callsign:823,citizenid:"100341",playerId:1,position:[0,0,0]}],id:823},{name:"Unit 531",type:"motor",members:[{firstname:"Connor",lastname:"Collins",callsign:531,citizenid:"913213",playerId:1,position:[0,0,0]}],id:531},{name:"Unit 274",type:"boat",members:[{firstname:"Corey",lastname:"Hayes",callsign:274,citizenid:"920132",playerId:1,position:[0,0,0]}],id:274}]},{id:3,time:Date.now(),location:"Somewhere",coords:[500,750],linked:!1,blip:310,offense:"Officer Down",code:"10-13",units:[{name:"Unit 1",type:"car",members:[{firstname:"Billy",lastname:"bob",callsign:132,citizenid:"913213",playerId:1,position:[0,0,0]}],id:136},{name:"Unit 6",type:"heli",members:[{firstname:"Freddie",lastname:"Reid",callsign:823,citizenid:"920132",playerId:2,position:[0,0,0]}],id:823}]}],XOe=async()=>{if(at())return JOe;const e=await me("getCalls");return qOe(e)},Mu=tn(e=>({calls:[],fetchCalls:async()=>{const t=await XOe();e({calls:t})},updateCallUnits:(t,n)=>{e(r=>{const o=r.calls.findIndex(s=>s.id===t);if(o===-1)return r;const i=[...r.calls];return i[o]={...i[o],units:n},{calls:i}})},addCall:t=>{e(n=>({calls:[t,...n.calls]}))},setCalls:t=>e({calls:t})})),iB=()=>Mu(e=>e.calls),QOe=()=>Mu(e=>e.fetchCalls),eCe=()=>{const{calls:e,fetchCalls:t}=Mu(),[n,r]=_.useState(!1),o=Ul();_.useEffect(()=>{r(!0),(async()=>{t()})().then(()=>{r(!1)})},[]);const i=_.useMemo(()=>e.sort((s,a)=>a.id-s.id),[e]);return h.jsxs("div",{className:"card-background",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.dispatch}),h.jsx(Bhe,{size:M(25),color:"white"})]}),h.jsx(Ye,{mt:5,mb:5}),h.jsx(St,{h:330,children:h.jsx("div",{className:"warrants-card-content",children:n?h.jsx(Pr,{h:"100%",children:h.jsx(en,{})}):i.length>0?i.map(s=>h.jsx("div",{className:"active-dispatchcall-card",onClick:()=>{o("/dispatch")},children:h.jsxs(nt,{style:{width:"100%"},children:[h.jsxs("div",{style:{flex:1},children:[h.jsxs(W,{style:{fontSize:13,color:"white"},weight:500,children:["(",s.code,") ",s.offense]}),h.jsxs("div",{style:{display:"flex",gap:5},children:[h.jsx(D0,{size:16,color:"#C1C2C5"}),h.jsx(W,{color:"dimmed",size:"xs",children:pe(s.time).fromNow()})]})]}),h.jsxs(W,{color:"dimmed",size:"xs",children:[D.responding_units,": ",s.units.length]})]})})):h.jsx(W,{color:"dimmed",size:"xs",children:D.no_recent_calls_found})})})]})},tCe=[{plate:"AF30442",reason:"This vehicle is wanted because its been a part of a murder and we need to confiscate it to check for evidence",expiresAt:pe(new Date).format("DD-MM-YYYY")},{plate:"AF30442",reason:"Billy",expiresAt:pe(new Date).format("DD-MM-YYYY")}],nCe=tn(e=>({bolos:at()?tCe:[],getBolos:async()=>{try{const t=await me("getBolos");return e({bolos:t}),{bolos:t}}catch(t){return console.error("Failed to fetch recent activities:",t),{bolos:[]}}},setBolos:t=>e({bolos:t})})),sB=[];for(let e=0;e<25;e++)sB[e]={plate:`44HJJO263${e+1}`,model:"Adder"};const PO={plate:"44HJJO263",model:"gauntlet2",owner:"John Doe (ABC123AW)",color:"Red",notes:"string",class:"Muscle",knownInformation:["Gaunlet"]},OO={plate:"44HJJO263",model:"sultan3",owner:"John Doe (ABC123AW)",color:"Black",notes:"string",class:"Super",knownInformation:["Adder"]},Nu=tn(e=>({selectedVehicle:null,isVehicleBOLO:!1,BOLOExpirationDate:"",getVehicles:async()=>at()?sB:await me("getAllVehicles"),setSelectedVehicle:t=>{at()&&e({selectedVehicle:Math.random()*10>5?PO:OO}),e({selectedVehicle:t})},setIsVehicleBOLO(t){e({isVehicleBOLO:t})},setBOLOExpirationDate(t){e({BOLOExpirationDate:t})}})),rCe=e=>{const{setSelectedVehicle:t,setIsVehicleBOLO:n,setBOLOExpirationDate:r}=Nu(),o=Math.random()*10>5?PO:OO,i=Ul();return h.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:10},children:[h.jsx(Ye,{}),h.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[h.jsx(W,{style:{fontSize:18,color:"white"},weight:500,children:D.reason}),h.jsx(W,{c:"gray.4",size:"sm",children:e.bolo.reason}),h.jsxs(W,{c:"dimmed",size:"xs",mt:5,children:[D.expires_at," ",e.bolo.expiresAt]})]}),h.jsx(Ye,{}),h.jsx("div",{style:{display:"flex",flexDirection:"column",gap:10,alignItems:"center",width:"100%",justifyContent:"center"},children:h.jsx(st,{variant:"light",color:"gray",w:200,onClick:async()=>{t(null);const s=await me("getVehicle",{plate:e.bolo.plate},{data:{...o}}),a=await me("isVehicleBOLO",{plate:e.bolo.plate},{data:!1});if(a){const c=await me("getBOLOExpirationDate",{plate:e.bolo.plate},{data:"12/12/2024"});r(c)}t(s),n(a),i("/vehicles"),ke.closeAll()},children:D.goto_vehicle})})]})},oCe=()=>{const{bolos:e,getBolos:t}=nCe(),[n,r]=_.useState(!1);return _.useEffect(()=>{r(!0),(async()=>{t()})().then(()=>{r(!1)})},[]),h.jsxs("div",{className:"card-background",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.bolos}),h.jsx(Xhe,{size:M(25),color:"white"})]}),h.jsx(Ye,{mt:5,mb:5}),h.jsx(St,{h:290,children:h.jsx("div",{className:"warrants-card-content",children:n?h.jsx(Pr,{h:"100%",children:h.jsx(en,{})}):e.length>0?e.map(o=>h.jsx("div",{className:"bolos-card",onClick:async()=>{const i=await me("getBolo",{plate:o.plate},{data:{plate:"ABCDEFG",reason:"A pretty nice and cool reason",expiresAt:pe(new Date).format("DD-MM-YYYY")}});ke.open({title:h.jsxs("div",{style:{display:"flex",gap:10,alignItems:"center"},children:[h.jsx(ix,{size:20,color:"#C1C2C5"}),h.jsx(W,{style:{fontSize:16,color:"white"},weight:500,children:i.plate})]}),centered:!0,children:h.jsx(rCe,{bolo:i})})},children:h.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:5,width:"100%"},children:[h.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[h.jsxs("div",{style:{display:"flex",gap:5,alignItems:"center"},children:[h.jsx(ix,{size:20,color:"#C1C2C5"}),h.jsx(W,{style:{fontSize:13,color:"white"},weight:500,children:o.plate})]}),h.jsxs(W,{color:"dimmed",size:"xs",children:[D.expires_at," ",o.expiresAt]})]}),h.jsx(W,{c:"gray.4",size:"xs",lineClamp:2,children:o.reason})]})})):h.jsx(W,{color:"dimmed",size:"xs",children:D.no_bolos_found})})})]})},iCe=()=>{const{config:e}=Kf(),{firstname:t,lastname:n}=bo(i=>i.personalData),{activeOfficers:r,getActiveOfficers:o}=GP();return _.useEffect(()=>{o()},[]),h.jsxs("div",{className:"dashboard",children:[h.jsxs("div",{className:"left-side",children:[h.jsxs("div",{className:"header",children:[h.jsx(W,{style:{fontSize:24,color:"white"},weight:500,children:D.welcome_back.format(t,n)}),h.jsxs(W,{color:"dimmed",size:"xs",style:{display:"flex",gap:10},children:[h.jsx(RP,{size:M(18)})," ",h.jsx(W,{color:"dimmed",size:14,children:new Date().toLocaleDateString("en-EN",{weekday:"long",year:"numeric",month:"long",day:"numeric"})})]})]}),h.jsx(Ye,{}),h.jsx(Xye,{}),h.jsxs("div",{className:"content-bottom",children:[h.jsx(KOe,{}),h.jsx(ZOe,{}),h.jsx(oCe,{})]})]}),h.jsx(Ye,{orientation:"vertical"}),h.jsxs("div",{className:"right-side",children:[h.jsx("div",{className:"card-background",children:h.jsxs(St,{h:400,children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.active_officers}),h.jsxs("div",{className:"right-side-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:r.length}),h.jsx(B0,{size:M(20),color:"white"})]})]}),h.jsx(Ye,{mt:5,mb:5}),h.jsx("div",{className:"card-content",children:r.length>0?h.jsx("div",{className:"active-officers-cards",children:r.map(i=>h.jsx("div",{className:"active-officer-card",children:h.jsxs(nt,{style:{width:"100%"},children:[h.jsxs("div",{style:{flex:1},children:[h.jsxs(W,{style:{fontSize:13,color:"white"},weight:500,children:[i.firstname," ",i.lastname]}),h.jsxs(W,{color:"dimmed",size:"xs",children:[D.callsign,": ",i.callsign]})]}),h.jsxs(W,{color:"dimmed",size:"xs",children:[D.attached_unit,": ",i.unitId||"None"]})]})}))}):h.jsx(W,{color:"dimmed",size:"xs",children:"No active officers"})})]})}),e.isDispatchEnabled&&h.jsx(eCe,{})]})]})};const sCe=e=>h.jsxs("div",{className:"card-background profile-card-info",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:e.title}),typeof e.icon=="string"?h.jsx("i",{className:`ti ti-${e.icon}`,style:{fontSize:24,color:"white"}}):h.jsx(e.icon,{})]}),h.jsx(Ye,{style:{width:"100%"}}),h.jsx("div",{className:"profile-card-info-badges",children:e.children})]}),XI={title:"Debug Report title",id:0,description:"

This is a incident description

",evidence:[],officersInvolved:[{firstname:"Callum",lastname:"Graham",callsign:188,citizenid:"132142",playerId:1,position:[0,0,0]},{firstname:"Jacob",lastname:"Gray",callsign:273,citizenid:"152312",playerId:1,position:[0,0,0]},{firstname:"Edward",lastname:"Atkinson",callsign:125,citizenid:"948213",playerId:1,position:[0,0,0]}],citizensInvolved:[{firstname:"John",lastname:"Doe",citizenid:"BUB193Z4A",dob:Date.now()}]},Bi=tn(e=>({report:XI,isReportActive:!1,setActiveReport:t=>{at()&&e({report:XI}),e({report:t})},setReportActive:t=>{e({isReportActive:t})},setDescription:t=>{e(n=>({report:{...n.report,description:t}}))},setOfficersInvolved:t=>{e(n=>({report:{...n.report,officersInvolved:typeof t=="function"?t(n.report.officersInvolved):t}}))},setCitizensInvolved:t=>{e(n=>({report:{...n.report,citizensInvolved:typeof t=="function"?t(n.report.citizensInvolved):t}}))},setEvidence:t=>{e(n=>({report:{...n.report,evidence:typeof t=="function"?t(n.report.evidence):t}}))}})),aCe=()=>{const{setActiveReport:e,setReportActive:t}=Bi(),n=Li(u=>u.selectedProfile),r=Li(u=>u.profileCards),{setActiveIncident:o,setIncidentActive:i}=Ur(),s=Ul();if(!n)return h.jsx("div",{className:"content-width",children:h.jsx("div",{className:"card-background",children:h.jsxs("div",{className:"profile-no-selected",children:[h.jsx(WP,{size:M(50),color:"white"}),h.jsx(W,{style:{fontSize:15,color:"white"},weight:600,children:D.no_profile_selected})]})})});async function a(u){if(at())return s("/reports");const f=await me("getReport",u);e(f),t(!0),s("/reports")}async function c(u){if(at())return s("/incidents");const f=await me("getIncident",u);o(f),i(!0),s("/incidents")}return h.jsx("div",{className:"content-width",children:h.jsx(St,{h:860,children:h.jsxs("div",{className:"additional-profile-info",children:[r.map(u=>h.jsx(sCe,{title:u.title,icon:u.icon,children:h.jsx("div",{className:"profile-card-info-badges",children:n[u.id]?n[u.id].map(f=>h.jsx(mt,{color:"gray",variant:"filled",className:"profile-info-badge",radius:"md",children:f},f)):h.jsx(W,{color:"dimmed",size:"xs",children:D.no_cardid_registered.format(u.id)})})})),h.jsxs("div",{className:"card-background profile-card-info",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.related_reports}),h.jsx(AP,{size:M(25),color:"white"})]}),h.jsx(Ye,{style:{width:"100%"}}),n.relatedReports&&(n.relatedReports.length>0?n.relatedReports.map(u=>h.jsxs("div",{className:"related-reports-card",onClick:()=>{a(u.id)},children:[h.jsx(W,{style:{fontSize:15,color:"white"},weight:500,children:u.title}),h.jsxs("div",{className:"related-reports-extra-info",children:[h.jsxs(W,{style:{fontSize:12},weight:500,color:"dimmed",children:[u.author," - Date: ",u.date]}),h.jsxs(W,{style:{fontSize:12},weight:500,color:"dimmed",children:["#",u.id]})]})]},u.id)):h.jsx(W,{color:"dimmed",size:"xs",children:D.no_related_reports}))]}),h.jsxs("div",{className:"card-background profile-card-info",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.related_incidents}),h.jsx(VP,{size:M(25),color:"white"})]}),h.jsx(Ye,{style:{width:"100%"}}),n.relatedIncidents&&(n.relatedIncidents.length>0?n.relatedIncidents.map(u=>h.jsxs("div",{className:"related-reports-card",onClick:()=>{c(u.id)},children:[h.jsx(W,{style:{fontSize:15,color:"white"},weight:500,children:u.title}),h.jsxs("div",{className:"related-reports-extra-info",children:[h.jsxs(W,{style:{fontSize:12},weight:500,color:"dimmed",children:[u.author," - Date: ",u.date]}),h.jsxs(W,{style:{fontSize:12},weight:500,color:"dimmed",children:["#",u.id]})]})]},u.id)):h.jsx(W,{color:"dimmed",size:"xs",children:D.no_related_incidents}))]})]})})})},lCe=e=>{const{setSelectedProfile:t,selectedProfile:n}=Li(),r=_.useRef(null),[o,i]=_.useState(!1),s=async()=>{if(!n)return;i(!0);const a=r.current?.value;await me("updateProfileImage",{citizenId:n.citizenid,image:a},{data:1}),t({...n,image:a}),ke.closeAll()};return h.jsxs(Je,{children:[h.jsx(yn,{defaultValue:e.image,ref:r,label:D.image,description:D.avatar_description,placeholder:"https://r2.fivemanage.com/placeholder.jpg"}),h.jsx(st,{variant:"light",color:"gray",onClick:s,loading:o,children:"Confirm"})]})},cCe=()=>{const{selectedProfile:e,setSelectedProfile:t,isProfileWanted:n}=Li(),[r,o]=_.useState(!1);return e?h.jsx("div",{className:"content-width",children:h.jsx("div",{className:"card-background",children:h.jsxs("div",{className:"profile-card-content",children:[h.jsxs("div",{className:"profile-card-header",children:[h.jsxs(W,{style:{fontSize:14,color:"white"},children:[D.edit_citizen," #",e.citizenid]}),h.jsx("div",{className:"profile-card-header-buttons",children:h.jsx(At,{label:"Unlink",withArrow:!0,color:"gray",position:"bottom",children:h.jsx(Qe,{variant:"filled",color:"gray",onClick:()=>{t(null)},children:h.jsx(z0,{size:16,color:"white"})})})})]}),h.jsx(Ye,{style:{width:"100%"}}),h.jsxs("div",{className:"profile-card-profile-content",children:[h.jsxs("div",{className:"profile-card-wrapper",children:[h.jsxs("div",{className:"profile-card-image",onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),children:[r&&h.jsx(Qe,{style:{position:"absolute",top:5,right:5,zIndex:99},onClick:()=>ke.open({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.change_picture}),centered:!0,size:"sm",children:h.jsx(lCe,{image:e.image})}),children:h.jsx(zP,{})}),h.jsx(ri,{width:145,height:180,src:e.image??"https://r2.fivemanage.com/s64hZD0G9WtYHbURWCuSc/placeholder.jpg",radius:"md",alt:"With default placeholder",withPlaceholder:!0}),n&&h.jsx(ri,{className:"watermark",src:"https://r2.fivemanage.com/s64hZD0G9WtYHbURWCuSc/wanted-stamp.png",radius:"md",alt:"With default placeholder",withPlaceholder:!0})]}),h.jsxs("div",{className:"profile-card-inputs",children:[h.jsx(et,{disabled:!0,icon:h.jsx(k8,{size:16}),placeholder:e.citizenid,size:"xs"}),h.jsx(et,{disabled:!0,icon:h.jsx(Jhe,{size:16}),placeholder:e.firstname+" "+e.lastname,size:"xs"}),h.jsx(et,{disabled:!0,icon:h.jsx(che,{size:16}),placeholder:pe(e.dob).format("DD/MM/YYYY"),size:"xs"}),h.jsx(et,{disabled:!0,icon:h.jsx(hhe,{size:16}),placeholder:e.phoneNumber,size:"xs"}),h.jsx(et,{disabled:!0,icon:h.jsx(yhe,{size:16}),placeholder:e.fingerprint??"No fingerprint found",size:"xs"})]})]}),h.jsx(Ye,{style:{width:"100%"}}),h.jsx("div",{className:"profile-card-information",children:h.jsx(tp,{content:e.notes,onSave:i=>{t({...e,notes:i}),me("saveProfileNotes",{citizenid:e.citizenid,notes:i})},styles:{content:{backgroundColor:"#242527"},toolbar:{backgroundColor:"#2C2E33"},controlsGroup:{pointerEvents:"auto",backgroundColor:"#282828"}},contentAreaStyle:{height:475,width:413,padding:0}})})]})]})})}):h.jsx("div",{className:"content-width",children:h.jsx("div",{className:"card-background",children:h.jsxs("div",{className:"profile-no-selected",children:[h.jsx(WP,{size:M(50),color:"white"}),h.jsx(W,{style:{fontSize:15,color:"white"},weight:600,children:D.no_profile_selected})]})})})},uCe=e=>{const[t,n]=_.useState(""),r=Li(f=>f.getPlayers),[o,i]=_.useState([]),[s,a]=_.useState(o),[c,u]=_.useState(!1);return _.useEffect(()=>{u(!0),(async()=>await r())().then(p=>{i(p.profiles),a(p.profiles),u(!1)})},[]),_.useEffect(()=>{if(t.trim()==="")a(o);else{const f=o.filter(p=>(p.citizenid||"").includes(t)||(p.firstname||"").toLowerCase().includes(t.toLowerCase())||(p.lastname||"").toLowerCase().includes(t.toLowerCase())||(p.firstname+" "+p.lastname||"").toLowerCase().includes(t.toLowerCase()));a(f)}},[t,s]),h.jsx("div",{className:"content-width",children:h.jsxs("div",{className:"card-background",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.profiles}),h.jsx(UP,{size:M(25),color:"white"})]}),h.jsx(et,{icon:h.jsx(Ia,{}),variant:"filled",placeholder:D.search,mt:10,mb:10,value:t,onChange:f=>n(f.target.value)}),h.jsx(Ye,{mt:5,mb:5}),h.jsx("div",{className:"profiles-card-content",children:h.jsx(St,{h:860,children:h.jsx("div",{className:"profiles-card-content-flex",children:c?h.jsx(Pr,{h:"100%",children:h.jsx(en,{})}):s.length>0?s.map(f=>h.jsxs("div",{className:"profile-card",onClick:()=>e.handleProfileClick(f),children:[h.jsx(ri,{width:65,height:65,src:f.image??"https://cdn.vectorstock.com/i/preview-1x/97/68/account-avatar-dark-mode-glyph-ui-icon-vector-44429768.jpg",radius:"lg",alt:"With default placeholder",withPlaceholder:!0}),h.jsxs("div",{children:[h.jsxs(W,{weight:600,style:{fontSize:13,color:"white"},children:[f.firstname," ",f.lastname]}),h.jsxs(W,{style:{fontSize:12,color:"white"},children:[D.dob,": ",pe(f.dob).format("DD/MM/YYYY")]}),h.jsxs(W,{style:{fontSize:12,color:"white"},children:[D.citizen_id,": ",f.citizenid]})]})]},f.citizenid)):h.jsx(W,{color:"dimmed",size:"xs",children:D.no_profiles_found})})})})]})})},i1=h.jsx("svg",{width:"54",height:"54",viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:Jy.colors.blue[6],children:h.jsx("g",{fill:"none",fillRule:"evenodd",children:h.jsxs("g",{transform:"translate(1 1)",strokeWidth:"2",children:[h.jsx("circle",{strokeOpacity:".5",cx:"18",cy:"18",r:"18"}),h.jsx("path",{d:"M36 18c0-9.94-8.06-18-18-18",children:h.jsx("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})})]})})}),dCe=()=>{const[e,t]=_.useState(!1),{setIsProfileWanted:n,setSelectedProfile:r}=Li(),o=async i=>{t(!0),r(null),n(!1);const s=await me("getProfile",i.citizenid,{data:{...ZP,firstName:i.firstname,lastName:i.lastname,citizenid:i.citizenid}}),a=await me("isProfileWanted",i.citizenid,{data:!1});t(!1),r(s),n(a)};return h.jsxs("div",{className:"profiles",children:[h.jsx(uCe,{handleProfileClick:o}),h.jsx(Wf,{visible:e,overlayOpacity:.97,overlayColor:"rgb(34, 35, 37)",transitionDuration:250,loader:i1,style:{left:795,width:935,height:"96%",top:19,borderRadius:"0.25rem"}}),h.jsx(cCe,{}),h.jsx(aCe,{})]})};var fCe=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var s=i[o];if(!e(t[s],n[s]))return!1}return!0}return t!==t&&n!==n};const QI=Ea(fCe);function jx(e){return e===null||typeof e!="object"?{}:Object.keys(e).reduce((t,n)=>{const r=e[n];return r!=null&&r!==!1&&(t[n]=r),t},{})}var pCe=Object.defineProperty,ej=Object.getOwnPropertySymbols,hCe=Object.prototype.hasOwnProperty,mCe=Object.prototype.propertyIsEnumerable,tj=(e,t,n)=>t in e?pCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gCe=(e,t)=>{for(var n in t||(t={}))hCe.call(t,n)&&tj(e,n,t[n]);if(ej)for(var n of ej(t))mCe.call(t,n)&&tj(e,n,t[n]);return e};function aB(e,t){if(t===null||typeof t!="object")return{};const n=gCe({},t);return Object.keys(t).forEach(r=>{r.includes(`${String(e)}.`)&&delete n[r]}),n}const vCe="__MANTINE_FORM_INDEX__";function nj(e,t){return t?typeof t=="boolean"?t:Array.isArray(t)?t.includes(e.replace(/[.][0-9]/g,`.${vCe}`)):!1:!1}function rj(e,t,n){typeof n.value=="object"&&(n.value=Lc(n.value)),!n.enumerable||n.get||n.set||!n.configurable||!n.writable||t==="__proto__"?Object.defineProperty(e,t,n):e[t]=n.value}function Lc(e){if(typeof e!="object")return e;var t=0,n,r,o,i=Object.prototype.toString.call(e);if(i==="[object Object]"?o=Object.create(e.__proto__||null):i==="[object Array]"?o=Array(e.length):i==="[object Set]"?(o=new Set,e.forEach(function(s){o.add(Lc(s))})):i==="[object Map]"?(o=new Map,e.forEach(function(s,a){o.set(Lc(a),Lc(s))})):i==="[object Date]"?o=new Date(+e):i==="[object RegExp]"?o=new RegExp(e.source,e.flags):i==="[object DataView]"?o=new e.constructor(Lc(e.buffer)):i==="[object ArrayBuffer]"?o=e.slice(0):i.slice(-6)==="Array]"&&(o=new e.constructor(e)),o){for(r=Object.getOwnPropertySymbols(e);t0,errors:t}}function Lx(e,t,n="",r={}){return typeof e!="object"||e===null?r:Object.keys(e).reduce((o,i)=>{const s=e[i],a=`${n===""?"":`${n}.`}${i}`,c=rs(a,t);let u=!1;return typeof s=="function"&&(o[a]=s(c,t,a)),typeof s=="object"&&Array.isArray(c)&&(u=!0,c.forEach((f,p)=>Lx(s,t,`${a}.${p}`,o))),typeof s=="object"&&typeof c=="object"&&c!==null&&(u||Lx(s,t,a,o)),o},r)}function Dx(e,t){return oj(typeof e=="function"?e(t):Lx(e,t))}function hh(e,t,n){if(typeof e!="string")return{hasError:!1,error:null};const r=Dx(t,n),o=Object.keys(r.errors).find(i=>e.split(".").every((s,a)=>s===i.split(".")[a]));return{hasError:!!o,error:o?r.errors[o]:null}}function yCe(e,{from:t,to:n},r){const o=rs(e,r);if(!Array.isArray(o))return r;const i=[...o],s=o[t];return i.splice(t,1),i.splice(n,0,s),s1(e,i,r)}var _Ce=Object.defineProperty,ij=Object.getOwnPropertySymbols,wCe=Object.prototype.hasOwnProperty,bCe=Object.prototype.propertyIsEnumerable,sj=(e,t,n)=>t in e?_Ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xCe=(e,t)=>{for(var n in t||(t={}))wCe.call(t,n)&&sj(e,n,t[n]);if(ij)for(var n of ij(t))bCe.call(t,n)&&sj(e,n,t[n]);return e};function SCe(e,{from:t,to:n},r){const o=`${e}.${t}`,i=`${e}.${n}`,s=xCe({},r);return Object.keys(r).every(a=>{let c,u;if(a.startsWith(o)&&(c=a,u=a.replace(o,i)),a.startsWith(i)&&(c=a.replace(i,o),u=a),c&&u){const f=s[c],p=s[u];return p===void 0?delete s[c]:s[c]=p,f===void 0?delete s[u]:s[u]=f,!1}return!0}),s}function PCe(e,t,n){const r=rs(e,n);return Array.isArray(r)?s1(e,r.filter((o,i)=>i!==t),n):n}var OCe=Object.defineProperty,aj=Object.getOwnPropertySymbols,CCe=Object.prototype.hasOwnProperty,kCe=Object.prototype.propertyIsEnumerable,lj=(e,t,n)=>t in e?OCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ECe=(e,t)=>{for(var n in t||(t={}))CCe.call(t,n)&&lj(e,n,t[n]);if(aj)for(var n of aj(t))kCe.call(t,n)&&lj(e,n,t[n]);return e};function cj(e,t){const n=e.substring(t.length+1).split(".")[0];return parseInt(n,10)}function uj(e,t,n,r){if(t===void 0)return n;const o=`${String(e)}`;let i=n;r===-1&&(i=aB(`${o}.${t}`,i));const s=ECe({},i),a=new Set;return Object.entries(i).filter(([c])=>{if(!c.startsWith(`${o}.`))return!1;const u=cj(c,o);return Number.isNaN(u)?!1:u>=t}).forEach(([c,u])=>{const f=cj(c,o),p=c.replace(`${o}.${f}`,`${o}.${f+r}`);s[p]=u,a.add(p),a.has(c)||delete s[c]}),s}function $Ce(e,t,n,r){const o=rs(e,r);if(!Array.isArray(o))return r;const i=[...o];return i.splice(typeof n=="number"?n:i.length,0,t),s1(e,i,r)}function dj(e,t){const n=Object.keys(e);if(typeof t=="string"){const r=n.filter(o=>o.startsWith(`${t}.`));return e[t]||r.some(o=>e[o])||!1}return n.some(r=>e[r])}function MCe(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 instanceof HTMLInputElement?n.type==="checkbox"?e(n.checked):e(n.value):(n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement)&&e(n.value)}else e(t)}}var NCe=Object.defineProperty,TCe=Object.defineProperties,ICe=Object.getOwnPropertyDescriptors,fj=Object.getOwnPropertySymbols,jCe=Object.prototype.hasOwnProperty,LCe=Object.prototype.propertyIsEnumerable,pj=(e,t,n)=>t in e?NCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ls=(e,t)=>{for(var n in t||(t={}))jCe.call(t,n)&&pj(e,n,t[n]);if(fj)for(var n of fj(t))LCe.call(t,n)&&pj(e,n,t[n]);return e},Cw=(e,t)=>TCe(e,ICe(t));function Zl({initialValues:e={},initialErrors:t={},initialDirty:n={},initialTouched:r={},clearInputErrorOnChange:o=!0,validateInputOnChange:i=!1,validateInputOnBlur:s=!1,transformValues:a=u=>u,validate:c}={}){const[u,f]=_.useState(r),[p,g]=_.useState(n),[v,y]=_.useState(e),[w,P]=_.useState(jx(t)),x=_.useRef(e),S=J=>{x.current=J},O=_.useCallback(()=>f({}),[]),E=J=>{const ne=J?Ls(Ls({},v),J):v;S(ne),g({})},$=_.useCallback(J=>P(ne=>jx(typeof J=="function"?J(ne):J)),[]),N=_.useCallback(()=>P({}),[]),I=_.useCallback(()=>{y(e),N(),S(e),g({}),O()},[]),R=_.useCallback((J,ne)=>$(le=>Cw(Ls({},le),{[J]:ne})),[]),B=_.useCallback(J=>$(ne=>{if(typeof J!="string")return ne;const le=Ls({},ne);return delete le[J],le}),[]),z=_.useCallback(J=>g(ne=>{if(typeof J!="string")return ne;const le=aB(J,ne);return delete le[J],le}),[]),G=_.useCallback((J,ne)=>{const le=nj(J,i);z(J),f(_e=>Cw(Ls({},_e),{[J]:!0})),y(_e=>{const Ne=s1(J,ne,_e);if(le){const we=hh(J,c,Ne);we.hasError?R(J,we.error):B(J)}return Ne}),!le&&o&&R(J,null)},[]),X=_.useCallback(J=>{y(ne=>{const le=typeof J=="function"?J(ne):J;return Ls(Ls({},ne),le)}),o&&N()},[]),Q=_.useCallback((J,ne)=>{z(J),y(le=>yCe(J,ne,le)),P(le=>SCe(J,ne,le))},[]),V=_.useCallback((J,ne)=>{z(J),y(le=>PCe(J,ne,le)),P(le=>uj(J,ne,le,-1))},[]),H=_.useCallback((J,ne,le)=>{z(J),y(_e=>$Ce(J,ne,le,_e)),P(_e=>uj(J,le,_e,1))},[]),Z=_.useCallback(()=>{const J=Dx(c,v);return P(J.errors),J},[v,c]),Y=_.useCallback(J=>{const ne=hh(J,c,v);return ne.hasError?R(J,ne.error):B(J),ne},[v,c]),j=(J,{type:ne="input",withError:le=!0,withFocus:_e=!0}={})=>{const we={onChange:MCe(He=>G(J,He))};return le&&(we.error=w[J]),ne==="checkbox"?we.checked=rs(J,v):we.value=rs(J,v),_e&&(we.onFocus=()=>f(He=>Cw(Ls({},He),{[J]:!0})),we.onBlur=()=>{if(nj(J,s)){const He=hh(J,c,v);He.hasError?R(J,He.error):B(J)}}),we},U=(J,ne)=>le=>{le?.preventDefault();const _e=Z();_e.hasErrors?ne?.(_e.errors,v,le):J?.(a(v),le)},F=J=>a(J||v),K=_.useCallback(J=>{J.preventDefault(),I()},[]),ee=J=>{if(J){const le=rs(J,p);if(typeof le=="boolean")return le;const _e=rs(J,v),Ne=rs(J,x.current);return!QI(_e,Ne)}return Object.keys(p).length>0?dj(p):!QI(v,x.current)},fe=_.useCallback(J=>dj(u,J),[u]),ie=_.useCallback(J=>J?!hh(J,c,v).hasError:!Dx(c,v).hasErrors,[v,c]);return{values:v,errors:w,setValues:X,setErrors:$,setFieldValue:G,setFieldError:R,clearFieldError:B,clearErrors:N,reset:I,validate:Z,validateField:Y,reorderListItem:Q,removeListItem:V,insertListItem:H,getInputProps:j,onSubmit:U,onReset:K,isDirty:ee,isTouched:fe,setTouched:f,setDirty:g,resetTouched:O,resetDirty:E,isValid:ie,getTransformedValues:F}}const DCe=()=>{const{setActiveIncident:e,setIncidentActive:t}=Ur(),n=Zl({initialValues:{title:""},validate:{title:o=>o.length===0?D.incident_title_required:null}}),r=async o=>{ke.closeAll();const i=await me("createIncident",o.title,{data:1});e({title:o.title,id:i,criminals:[],description:"

",evidence:[],officersInvolved:[]}),t(!0)};return h.jsx("form",{onSubmit:n.onSubmit(o=>r(o)),children:h.jsxs(Je,{children:[h.jsx(yn,{label:D.incident_title,"data-autofocus":!0,withAsterisk:!0,...n.getInputProps("title")}),h.jsx(st,{type:"submit",fullWidth:!0,variant:"light",color:"gray",children:D.confirm})]})})},cB=[];for(let e=0;e<25;e++)cB[e]={title:`Incident ${e+1}`,id:e,author:"Some One",date:Date.now()};const RCe=async()=>at()?{incidents:cB}:await me("getIncidents"),uB=tn(e=>({incidents:[],fetchIncidents:async()=>{const t=await RCe();e({incidents:t.incidents})},setIncidents:t=>{e(n=>({incidents:typeof t=="function"?t(n.incidents):t}))}})),zCe=e=>{const{incidents:t,fetchIncidents:n}=uB(),[r,o]=_.useState(!1),[i,s]=_.useState(""),a=500,[c,u]=_.useState(i),[f,p]=_.useState(null),[g,v]=_.useState(t);return _.useEffect(()=>{f!==null&&clearTimeout(f),o(!0);const y=setTimeout(()=>{u(i),o(!1)},a);return p(y),()=>{clearTimeout(y)}},[i]),_.useEffect(()=>{if(c.trim()==="")v(t);else{const y=t.filter(w=>(w.title||"").toLocaleLowerCase().includes(i.toLocaleLowerCase())||(w.author||"").toLocaleLowerCase().includes(i.toLocaleLowerCase()));v(y)}},[c,t]),_.useEffect(()=>{o(!0),(async()=>await n())().then(()=>{o(!1)})},[]),h.jsx("div",{className:"content-width",children:h.jsxs("div",{className:"card-background",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.incidents}),h.jsx(VP,{size:M(25),color:"white"})]}),h.jsx(et,{icon:h.jsx(Ia,{}),variant:"filled",placeholder:D.search,mt:10,mb:10,onChange:y=>s(y.target.value)}),h.jsxs(st,{fullWidth:!0,variant:"light",color:"gray",onClick:()=>ke.open({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.create_incident}),centered:!0,size:"sm",children:h.jsx(DCe,{})}),children:[h.jsx(C8,{size:M(18),style:{marginRight:5}})," ",D.create_incident]}),h.jsx(Ye,{mt:10,mb:10}),h.jsx("div",{className:"incidents-cards-content",children:h.jsx(St,{h:680,children:h.jsx("div",{className:"profiles-card-content-flex",children:r?h.jsx(Pr,{children:h.jsx(en,{})}):g.map(y=>h.jsx("div",{className:"incident-card",onClick:()=>e.handleIncidentClick(y),children:h.jsxs("div",{className:"incident-card-content",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:y.title}),h.jsxs("div",{className:"incident-card-dimmed-text",children:[h.jsxs(W,{color:"dimmed",size:"xs",children:[y.author," - ",new Date(y.date).toLocaleDateString()]}),h.jsxs(W,{color:"dimmed",size:"xs",children:["#",y.id]})]})]})},y.id))})})})]})})},ACe=()=>{const{incident:e,setOfficersInvolved:t}=Ur(),[n,r]=_.useState(""),{officers:o,getOfficers:i}=GP(),[s,a]=_.useState(o),c=500,[u,f]=_.useState(n),[p,g]=_.useState(!1),[v,y]=_.useState(null);_.useEffect(()=>{v!==null&&clearTimeout(v),g(!0);const P=setTimeout(()=>{f(n),g(!1)},c);return y(P),()=>{clearTimeout(P)}},[n]),_.useEffect(()=>{if(u.trim()==="")a(o);else{const P=o.filter(x=>(x.citizenid||"").toLowerCase().includes(n.toLowerCase())||(x.firstname||"").toLowerCase().includes(n.toLowerCase())||(x.lastname||"").toLowerCase().includes(n.toLowerCase())||(x.firstname+" "+x.lastname||"").toLowerCase().includes(n.toLowerCase()));a(P)}},[u,o]),_.useEffect(()=>{i()},[]);const w=async P=>{if(e.officersInvolved.some(x=>x.citizenid===P.citizenid))return ke.closeAll();await me("addOfficer",{id:e.id,citizenid:P.citizenid},{data:1}),ke.closeAll(),t(x=>x.some(S=>S.citizenid===P.citizenid)?x:[...x,{firstname:P.firstname,lastname:P.lastname,callsign:P.callsign,citizenid:P.citizenid,playerId:P.playerId,position:[1,1,1]}])};return h.jsx("form",{children:h.jsxs(Je,{children:[h.jsx(et,{icon:h.jsx(Ia,{}),variant:"filled",placeholder:D.search,mt:10,mb:10,value:n,onChange:P=>r(P.target.value)}),p?h.jsx(Pr,{children:h.jsx(en,{})}):s.length>0?s.map(P=>h.jsxs("div",{className:"add-officer-card",onClick:()=>w(P),children:[h.jsxs(W,{weight:500,style:{fontSize:13,color:"white"},children:[P.firstname," ",P.lastname]}),h.jsxs(W,{style:{fontSize:13,color:"white"},children:[D.callsign,": ",P.callsign]})]},P.citizenid)):h.jsxs(Je,{spacing:0,c:"dark.2",justify:"center",align:"center",children:[h.jsx(Gf,{size:36}),h.jsx(W,{size:"xl",children:D.no_officers_found})]})]})})},BCe=()=>{const[e,t]=_.useState(!1),{incident:n,setEvidence:r}=Ur(),o=Zl({initialValues:{label:"",image:""},validate:{label:s=>s.length===0?D.image_label_required:null,image:s=>s.length===0?D.image_url_required:null}}),i=async s=>{t(!0),await me("addEvidence",{id:n.id,evidence:{...s}},{data:1}),r(a=>[...a,s]),t(!1),ke.closeAll()};return h.jsx("form",{onSubmit:o.onSubmit(s=>i(s)),children:h.jsxs(Je,{children:[h.jsx(yn,{label:D.image_label,withAsterisk:!0,...o.getInputProps("label")}),h.jsx(yn,{label:h.jsxs("div",{style:{display:"flex",gap:10,alignItems:"center",marginBottom:5},children:[h.jsx(W,{children:D.image_url}),h.jsx(At,{label:D.take_picture,withArrow:!0,color:"gray",children:h.jsx(Qe,{disabled:o.getInputProps("label").value==="",variant:"default",size:"sm",p:1.5,onClick:async()=>{await me("takePicture",{id:n.id,imageLabel:o.getInputProps("label").value,type:"incident"},{data:1})},children:h.jsx(x8,{size:"1.125rem"})})})]}),placeholder:"https://i.imgur.com/dqopYB9b.jpg",...o.getInputProps("image")}),h.jsx(st,{variant:"light",color:"gray",type:"submit",loading:e,children:D.add_evidence})]})})},FCe=ue(()=>({container:{position:"relative"},image:{zIndex:2,"&:hover":{cursor:"pointer"}},actionIcon:{position:"absolute",top:0,right:0,zIndex:1}})),VCe=({evidence:e})=>{const{classes:t}=FCe(),[n,r]=_.useState(!1),{incident:o,setEvidence:i}=Ur();return h.jsx(At,{label:e.label,withArrow:!0,color:"gray",children:h.jsxs(Pe,{className:t.container,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:[h.jsx(ri,{src:e.image,radius:"sm",width:105,height:105,className:t.image,onClick:()=>ke.open({children:h.jsx(ri,{src:e.image,onClick:()=>ke.closeAll()}),withCloseButton:!1,centered:!0,padding:0,size:"unset",transitionProps:{transition:"pop"}})},`${e.label}-${e.image}`),n&&h.jsx(Qe,{variant:"filled",color:"red",radius:"sm",size:"xs",className:t.actionIcon,onClick:()=>ke.openConfirmModal({title:h.jsx(W,{style:{fontSize:16,color:"white"},weight:500,children:D.remove_evidence}),centered:!0,children:h.jsx(W,{size:"sm",c:"dark.2",children:D.remove_evidence_confirm.format(e.label)}),labels:{confirm:D.confirm,cancel:D.cancel},confirmProps:{color:"red"},groupProps:{spacing:6},onConfirm:async()=>{await me("removeEvidence",{id:o.id,label:e.label,image:e.image},{data:1}),i(s=>s.filter(a=>a.image!==e.image&&a.label!==e.label))}}),children:h.jsx(uu,{})})]})})},HCe=()=>{const{incident:e,isIncidentActive:t,setIncidentActive:n,setOfficersInvolved:r,setDescription:o}=Ur(),{setIncidents:i}=uB();return t?h.jsx(St,{h:860,children:h.jsxs("div",{className:"incident-content-width",children:[h.jsxs("div",{className:"incident-middle-content",children:[h.jsxs("div",{className:"profile-card-header",children:[h.jsx(W,{style:{fontSize:15,color:"white"},children:e.title}),h.jsxs("div",{className:"profile-card-header-buttons",children:[h.jsx(At,{label:D.delete_incident,withArrow:!0,color:"gray",position:"bottom",children:h.jsx(Qe,{variant:"filled",color:"red",onClick:()=>{ke.openConfirmModal({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.delete_incident}),size:"sm",centered:!0,labels:{confirm:D.confirm,cancel:D.cancel},groupProps:{spacing:6},confirmProps:{color:"red"},onConfirm:async()=>{await me("deleteIncident",{id:e.id},{data:1})&&i(a=>a.filter(c=>c.id!==e.id)),n(!1)},children:h.jsx(W,{size:"sm",c:"dark.2",children:D.delete_incident_confirm.format(e.title)})})},children:h.jsx(A0,{size:16,color:"white"})})}),h.jsx(At,{label:D.unlink,withArrow:!0,color:"gray",position:"bottom",children:h.jsx(Qe,{variant:"filled",color:"gray",onClick:()=>{n(!1)},children:h.jsx(z0,{size:16,color:"white"})})})]})]}),h.jsx(Ye,{style:{width:"100%"}}),h.jsx("div",{className:"incident-middle-card",children:h.jsx(tp,{content:e.description,onSave:s=>{me("saveIncidentContents",{incidentId:e.id,contents:s}),o(s)},styles:{content:{backgroundColor:"#242527"},toolbar:{backgroundColor:"#2C2E33"},controlsGroup:{pointerEvents:"auto",backgroundColor:"#282828"}},contentAreaStyle:{height:270,width:413,padding:0}})})]}),h.jsxs("div",{className:"card-background profile-card-info",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.officers_involved}),h.jsx(B0,{size:M(25),color:"white"})]}),h.jsx(Ye,{style:{width:"100%"}}),h.jsxs("div",{className:"profile-card-info-badges",children:[h.jsx(mt,{color:"gray",variant:"filled",className:"incident-info-badge-main",radius:"md",onClick:()=>ke.open({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.add_officer}),centered:!0,size:"sm",children:h.jsx(ACe,{})}),children:D.add_officer}),e.officersInvolved.map(s=>h.jsxs(mt,{color:"gray",variant:"filled",className:"incident-info-badge",rightSection:h.jsx(Qe,{size:"xs",radius:"xl",variant:"transparent",onClick:()=>{ke.openConfirmModal({title:h.jsx(W,{style:{fontSize:16,color:"white"},weight:500,children:D.remove_officer}),centered:!0,children:h.jsx(W,{size:"sm",c:"dark.2",children:D.remove_officer_confirm.format(s.firstname,s.lastname,s.callsign)}),confirmProps:{color:"red"},groupProps:{spacing:6},labels:{confirm:D.confirm,cancel:D.cancel},onConfirm:async()=>{await me("removeOfficer",{id:e.id,citizenid:s.citizenid},{data:1}),r(a=>a.filter(c=>c.citizenid!==s.citizenid))}})},children:h.jsx(uu,{size:M(10)})}),children:[s.firstname," ",s.lastname," ",s.callsign?`(${s.callsign})`:""]},s.citizenid))]})]}),h.jsxs("div",{className:"card-background profile-card-info",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.evidence}),h.jsx(M8,{size:M(25),color:"white"})]}),h.jsx(Ye,{style:{width:"100%"}}),h.jsxs("div",{className:"profile-card-info-badges",children:[h.jsx(st,{onClick:()=>ke.open({centered:!0,title:h.jsx(W,{style:{fontSize:16,color:"white"},weight:500,children:D.add_evidence}),children:h.jsx(BCe,{}),size:"sm"}),variant:"filled",color:"gray",w:105,h:105,children:h.jsx(Eu,{size:36})}),e.evidence.map(s=>h.jsx(VCe,{evidence:s},`${s.image}-${s.label}`))]})]})]})}):h.jsx("div",{className:"content-width",children:h.jsx("div",{className:"card-background",children:h.jsxs("div",{className:"profile-no-selected",children:[h.jsx(R0,{size:M(50),color:"white"}),h.jsx(W,{style:{fontSize:15,color:"white"},weight:600,children:D.no_incident_selected})]})})})},hj=[{firstname:"John",lastname:"Doe",dob:Date.now(),citizenid:"12345"},{firstname:"Jane",lastname:"Smith",dob:Date.now(),citizenid:"67890"},{firstname:"David",lastname:"Williams",dob:Date.now(),citizenid:"13579"},{firstname:"Samantha",lastname:"Jones",dob:Date.now(),citizenid:"24680"},{firstname:"Robert",lastname:"Garcia",dob:Date.now(),citizenid:"97531"},{firstname:"Emily",lastname:"Brown",dob:Date.now(),citizenid:"11223"},{firstname:"Michael",lastname:"Davis",dob:Date.now(),citizenid:"33445"},{firstname:"Sarah",lastname:"Wilson",dob:Date.now(),citizenid:"55667"},{firstname:"James",lastname:"Taylor",dob:Date.now(),citizenid:"77889"},{firstname:"Laura",lastname:"Moore",dob:Date.now(),citizenid:"99001"},{firstname:"Kevin",lastname:"Martin",dob:Date.now(),citizenid:"12321"},{firstname:"Jessica",lastname:"Lee",dob:Date.now(),citizenid:"34543"},{firstname:"Daniel",lastname:"Perez",dob:Date.now(),citizenid:"56765"},{firstname:"Nancy",lastname:"White",dob:Date.now(),citizenid:"78987"},{firstname:"Steven",lastname:"Harris",dob:Date.now(),citizenid:"90109"},{firstname:"Lisa",lastname:"Clark",dob:Date.now(),citizenid:"12212"},{firstname:"Paul",lastname:"Rodriguez",dob:Date.now(),citizenid:"34434"},{firstname:"Anna",lastname:"Lewis",dob:Date.now(),citizenid:"56656"},{firstname:"Charles",lastname:"Walker",dob:Date.now(),citizenid:"78878"},{firstname:"Susan",lastname:"Allen",dob:Date.now(),citizenid:"90090"}],WCe=tn(e=>({criminalProfiles:at()?hj:[],getCriminalProfiles:async()=>{const t=await me("getCriminalProfiles",{data:hj,delay:300});e({criminalProfiles:t})},setCriminalProfiles:t=>e({criminalProfiles:t})})),UCe=e=>{let t=e.length,n;for(;t!==0;)n=Math.floor(Math.random()*t),t--,[e[t],e[n]]=[e[n],e[t]];return e},ZCe=()=>{const{incident:e,setCriminals:t}=Ur(),[n,r]=_.useState(""),{criminalProfiles:o,getCriminalProfiles:i}=WCe(),[s,a]=_.useState(o),c=500,[u,f]=_.useState(n),[p,g]=_.useState(!1),[v,y]=_.useState(null);_.useEffect(()=>{v!==null&&clearTimeout(v),g(!0);const P=setTimeout(()=>{f(n),g(!1)},c);return y(P),()=>{clearTimeout(P)}},[n]),_.useEffect(()=>{if(u.trim()==="")a(UCe([...o]).slice(0,5));else{const P=o.filter(x=>(x.citizenid||"").toLowerCase().includes(n.toLowerCase())||(x.firstname||"").toLowerCase().includes(n.toLowerCase())||(x.lastname||"").toLowerCase().includes(n.toLowerCase())||(x.firstname+" "+x.lastname||"").toLowerCase().includes(n.toLowerCase()));a(P)}},[u,o]),_.useEffect(()=>{(async()=>{await i()})()},[]);const w=async P=>{await me("addCriminal",{id:e.id,criminalId:P.citizenid},{data:1}),ke.closeAll(),t(x=>x.some(S=>S.citizenid===P.citizenid)?x:[...x,{citizenid:P.citizenid,dob:P.dob,firstname:P.firstname,lastname:P.lastname,image:P.image,charges:[],issueWarrant:!1,pleadedGuilty:!1,processed:!1,penalty:{time:0,reduction:0,points:0,fine:0}}])};return h.jsx("form",{children:h.jsxs(Je,{children:[h.jsx(et,{icon:h.jsx(Ia,{}),variant:"filled",placeholder:D.search,mt:10,mb:10,value:n,onChange:P=>r(P.target.value)}),p?h.jsx(Pr,{children:h.jsx(en,{})}):s.length>0?s.map(P=>h.jsxs("div",{className:"profile-card",onClick:()=>w(P),children:[h.jsx(ri,{width:65,height:65,src:P.image??"https://cdn.vectorstock.com/i/preview-1x/97/68/account-avatar-dark-mode-glyph-ui-icon-vector-44429768.jpg",radius:"lg",alt:"With default placeholder",withPlaceholder:!0}),h.jsxs("div",{children:[h.jsxs(W,{weight:600,style:{fontSize:13,color:"white"},children:[P.firstname," ",P.lastname]}),h.jsxs(W,{style:{fontSize:12,color:"white"},children:[D.dob,": ",P.dob]}),h.jsxs(W,{style:{fontSize:12,color:"white"},children:[D.citizen_id,": ",P.citizenid]})]})]},P.citizenid)):h.jsxs(Je,{spacing:0,c:"dark.2",justify:"center",align:"center",children:[h.jsx(Gf,{size:36}),h.jsx(W,{size:"xl",children:D.no_profiles_found})]})]})})};var GCe=Object.defineProperty,YCe=Object.defineProperties,KCe=Object.getOwnPropertyDescriptors,wy=Object.getOwnPropertySymbols,dB=Object.prototype.hasOwnProperty,fB=Object.prototype.propertyIsEnumerable,mj=(e,t,n)=>t in e?GCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gj=(e,t)=>{for(var n in t||(t={}))dB.call(t,n)&&mj(e,n,t[n]);if(wy)for(var n of wy(t))fB.call(t,n)&&mj(e,n,t[n]);return e},vj=(e,t)=>YCe(e,KCe(t)),qCe=(e,t)=>{var n={};for(var r in e)dB.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&&fB.call(e,r)&&(n[r]=e[r]);return n};function Rx(e){var t=e,{direction:n,style:r}=t,o=qCe(t,["direction","style"]);const i=ir();return k.createElement(_q,vj(gj({},o),{style:vj(gj({},r),{transform:n==="next"&&i.dir==="ltr"||n==="previous"&&i.dir==="rtl"?"rotate(270deg)":"rotate(90deg)"})}))}Rx.displayName="@mantine/dates/Chevron";var JCe=Object.defineProperty,XCe=Object.defineProperties,QCe=Object.getOwnPropertyDescriptors,yj=Object.getOwnPropertySymbols,eke=Object.prototype.hasOwnProperty,tke=Object.prototype.propertyIsEnumerable,_j=(e,t,n)=>t in e?JCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mh=(e,t)=>{for(var n in t||(t={}))eke.call(t,n)&&_j(e,n,t[n]);if(yj)for(var n of yj(t))tke.call(t,n)&&_j(e,n,t[n]);return e},wj=(e,t)=>XCe(e,QCe(t));const Of={xs:M(30),sm:M(36),md:M(42),lg:M(48),xl:M(54)};var nke=ue((e,{radius:t,isStatic:n},{size:r})=>{const o=e.fn.variant({variant:"filled"}),i=e.fn.variant({variant:"light"});return{day:wj(mh({width:re({size:r,sizes:Of}),height:re({size:r,sizes:Of}),fontSize:re({size:r,sizes:e.fontSizes}),display:"inline-flex",justifyContent:"center",alignItems:"center",userSelect:n?void 0:"none",cursor:n?"default":"pointer",borderRadius:e.fn.radius(t)},n?null:e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),{"&:active":n?void 0:e.activeStyles,"&[data-disabled]":wj(mh({color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4],cursor:"not-allowed"},e.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}}),"&[data-weekend]":{color:e.colors.red[e.fn.primaryShade()]},"&[data-outside]":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]},"&[data-in-range]":mh({backgroundColor:i.background,borderRadius:0},n?null:e.fn.hover({backgroundColor:i.hover})),"&[data-first-in-range]":{borderTopLeftRadius:e.radius.sm,borderBottomLeftRadius:e.radius.sm},"&[data-last-in-range]":{borderTopRightRadius:e.radius.sm,borderBottomRightRadius:e.radius.sm},"&[data-selected]":mh({color:o.color,backgroundColor:o.background},n?null:e.fn.hover({backgroundColor:o.hover})),"&[data-hidden]":{display:"none"}})}});const rke=nke;var oke=Object.defineProperty,ike=Object.defineProperties,ske=Object.getOwnPropertyDescriptors,bj=Object.getOwnPropertySymbols,ake=Object.prototype.hasOwnProperty,lke=Object.prototype.propertyIsEnumerable,xj=(e,t,n)=>t in e?oke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gh=(e,t)=>{for(var n in t||(t={}))ake.call(t,n)&&xj(e,n,t[n]);if(bj)for(var n of bj(t))lke.call(t,n)&&xj(e,n,t[n]);return e},vh=(e,t)=>ike(e,ske(t)),cke=ue((e,t,{size:n})=>{const r=re({size:n,sizes:Of});return{calendarHeaderControlIcon:{},calendarHeader:{display:"flex",maxWidth:`calc(${r} * 7 + ${M(7)})`},calendarHeaderControl:vh(gh({width:r,height:r,borderRadius:e.fn.radius(),display:"flex",justifyContent:"center",alignItems:"center",userSelect:"none"},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),{"&:active":e.activeStyles,"&[data-disabled]":vh(gh({opacity:.2,cursor:"not-allowed"},e.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}})}),calendarHeaderLevel:vh(gh({height:r,borderRadius:e.fn.radius(),display:"flex",justifyContent:"center",alignItems:"center",userSelect:"none",flex:1,fontSize:re({size:n,sizes:e.fontSizes}),fontWeight:500,textTransform:"capitalize"},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),{"&:active":e.activeStyles,"&[data-static]":vh(gh({cursor:"default",userSelect:"unset"},e.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}})})}});const uke=cke;var dke=Object.defineProperty,by=Object.getOwnPropertySymbols,pB=Object.prototype.hasOwnProperty,hB=Object.prototype.propertyIsEnumerable,Sj=(e,t,n)=>t in e?dke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fke=(e,t)=>{for(var n in t||(t={}))pB.call(t,n)&&Sj(e,n,t[n]);if(by)for(var n of by(t))hB.call(t,n)&&Sj(e,n,t[n]);return e},pke=(e,t)=>{var n={};for(var r in e)pB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&by)for(var r of by(e))t.indexOf(r)<0&&hB.call(e,r)&&(n[r]=e[r]);return n};const hke={nextDisabled:!1,previousDisabled:!1,hasNextLevel:!0,withNext:!0,withPrevious:!0,size:"sm"},a1=_.forwardRef((e,t)=>{const n=ae("CalendarHeader",hke,e),{className:r,nextIcon:o,previousIcon:i,nextLabel:s,previousLabel:a,onNext:c,onPrevious:u,onLevelClick:f,label:p,classNames:g,styles:v,unstyled:y,nextDisabled:w,previousDisabled:P,hasNextLevel:x,levelControlAriaLabel:S,withNext:O,withPrevious:E,__staticSelector:$,__preventFocus:N,__stopPropagation:I,size:R,variant:B}=n,z=pke(n,["className","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","label","classNames","styles","unstyled","nextDisabled","previousDisabled","hasNextLevel","levelControlAriaLabel","withNext","withPrevious","__staticSelector","__preventFocus","__stopPropagation","size","variant"]),{classes:G,cx:X}=uke(null,{name:["CalendarHeader",$],classNames:g,styles:v,unstyled:y,size:R,variant:B}),Q=N?V=>V.preventDefault():void 0;return k.createElement(Pe,fke({className:X(G.calendarHeader,r),ref:t},z),E&&k.createElement(ls,{className:G.calendarHeaderControl,"data-previous":!0,"aria-label":a,onClick:u,unstyled:y,onMouseDown:Q,disabled:P,"data-disabled":P||void 0,tabIndex:N?-1:0,"data-mantine-stop-propagation":I||void 0},i||k.createElement(Rx,{className:G.calendarHeaderControlIcon,direction:"previous","data-previous":!0})),k.createElement(ls,{component:x?"button":"div",className:G.calendarHeaderLevel,onClick:x?f:void 0,unstyled:y,onMouseDown:x?Q:void 0,disabled:!x,"data-static":!x||void 0,"aria-label":S,tabIndex:N||!x?-1:0,"data-mantine-stop-propagation":I||void 0},p),O&&k.createElement(ls,{className:G.calendarHeaderControl,"data-next":!0,"aria-label":s,onClick:c,unstyled:y,onMouseDown:Q,disabled:w,"data-disabled":w||void 0,tabIndex:N?-1:0,"data-mantine-stop-propagation":I||void 0},o||k.createElement(Rx,{className:G.calendarHeaderControlIcon,direction:"next","data-next":!0})))});a1.displayName="@mantine/dates/CalendarHeader";function kw(e,t){return e?e==="month"?0:e==="year"?1:2:t}function mke(e){return e===0?"month":e===1?"year":"decade"}function dd(e,t,n){return mke(ia(kw(e,0),kw(t,0),kw(n,2)))}var gke=ue(()=>({calendar:{}}));const vke=gke;var yke=ue((e,t,{size:n})=>({monthLevelGroup:{display:"flex","& [data-month-level]:not(:last-of-type)":{marginRight:re({size:n,sizes:e.spacing})}}}));const _ke=yke;var wke=ue(e=>({monthLevel:{},calendarHeader:{marginBottom:e.spacing.xs}}));const bke=wke,xke={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–"},Ske=_.createContext(xke);var Pke=Object.defineProperty,Oke=Object.defineProperties,Cke=Object.getOwnPropertyDescriptors,Pj=Object.getOwnPropertySymbols,kke=Object.prototype.hasOwnProperty,Eke=Object.prototype.propertyIsEnumerable,Oj=(e,t,n)=>t in e?Pke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$ke=(e,t)=>{for(var n in t||(t={}))kke.call(t,n)&&Oj(e,n,t[n]);if(Pj)for(var n of Pj(t))Eke.call(t,n)&&Oj(e,n,t[n]);return e},Mke=(e,t)=>Oke(e,Cke(t));function za(){const e=_.useContext(Ske),t=_.useCallback(i=>i||e.locale,[e.locale]),n=_.useCallback(i=>typeof i=="number"?i:e.firstDayOfWeek,[e.firstDayOfWeek]),r=_.useCallback(i=>Array.isArray(i)?i:e.weekendDays,[e.weekendDays]),o=_.useCallback(i=>typeof i=="string"?i:e.labelSeparator,[e.labelSeparator]);return Mke($ke({},e),{getLocale:t,getFirstDayOfWeek:n,getWeekendDays:r,getLabelSeparator:o})}function Nke(e,t=1){const n=new Date(e);for(;n.getDay()!==t;)n.setDate(n.getDate()-1);return n}function Tke(e,t=1){const n=new Date(e),r=t===0?6:t-1;for(;n.getDay()!==r;)n.setDate(n.getDate()+1);return n}function Ike(e,t=1){const n=e.getMonth(),r=new Date(e.getFullYear(),n,1),o=new Date(e.getFullYear(),e.getMonth()+1,0),i=Tke(o,t),s=Nke(r,t),a=[];for(;s<=i;){const c=[];for(let u=0;u<7;u+=1)c.push(new Date(s)),s.setDate(s.getDate()+1);a.push(c)}return a}function mB(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function gB(e,t){return t instanceof Date?pe(e).isBefore(pe(t).add(1,"day"),"day"):!0}function vB(e,t){return t instanceof Date?pe(e).isAfter(pe(t).subtract(1,"day"),"day"):!0}var jke=Object.defineProperty,Lke=Object.defineProperties,Dke=Object.getOwnPropertyDescriptors,Cj=Object.getOwnPropertySymbols,Rke=Object.prototype.hasOwnProperty,zke=Object.prototype.propertyIsEnumerable,kj=(e,t,n)=>t in e?jke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ake=(e,t)=>{for(var n in t||(t={}))Rke.call(t,n)&&kj(e,n,t[n]);if(Cj)for(var n of Cj(t))zke.call(t,n)&&kj(e,n,t[n]);return e},Bke=(e,t)=>Lke(e,Dke(t)),Fke=ue(e=>({monthThead:{},monthRow:{},monthTbody:{},monthCell:{padding:0,"&[data-with-spacing]":{padding:M(.5)}},month:Bke(Ake({},e.fn.fontStyles()),{borderCollapse:"collapse",tableLayout:"fixed","& *":{boxSizing:"border-box"}})}));const Vke=Fke;function Hke(e,t,n,r,o,i,s){const a=e.flat().filter(f=>{var p;return gB(f,n)&&vB(f,t)&&!o?.(f)&&!((p=r?.(f))!=null&&p.disabled)&&(!i||mB(f,s))}),c=a.find(f=>{var p;return(p=r?.(f))==null?void 0:p.selected});if(c)return c;const u=a.find(f=>pe().isSame(f,"date"));return u||a[0]}var Wke=Object.defineProperty,xy=Object.getOwnPropertySymbols,yB=Object.prototype.hasOwnProperty,_B=Object.prototype.propertyIsEnumerable,Ej=(e,t,n)=>t in e?Wke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Uke=(e,t)=>{for(var n in t||(t={}))yB.call(t,n)&&Ej(e,n,t[n]);if(xy)for(var n of xy(t))_B.call(t,n)&&Ej(e,n,t[n]);return e},Zke=(e,t)=>{var n={};for(var r in e)yB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&xy)for(var r of xy(e))t.indexOf(r)<0&&_B.call(e,r)&&(n[r]=e[r]);return n};const Gke={tabIndex:0,size:"sm"},wB=_.forwardRef((e,t)=>{const n=ae("Day",Gke,e),{className:r,date:o,radius:i,disabled:s,styles:a,classNames:c,unstyled:u,__staticSelector:f,weekend:p,outside:g,selected:v,renderDay:y,inRange:w,firstInRange:P,lastInRange:x,hidden:S,static:O,variant:E,size:$}=n,N=Zke(n,["className","date","radius","disabled","styles","classNames","unstyled","__staticSelector","weekend","outside","selected","renderDay","inRange","firstInRange","lastInRange","hidden","static","variant","size"]),{classes:I,cx:R}=rke({radius:i,isStatic:O},{name:["Day",f],classNames:c,styles:a,unstyled:u,variant:E,size:$});return k.createElement(ls,Uke({component:O?"div":"button",ref:t,className:R(I.day,r),disabled:s,"data-today":pe(o).isSame(new Date,"day")||void 0,"data-hidden":S||void 0,"data-disabled":s||void 0,"data-weekend":!s&&!g&&p||void 0,"data-outside":!s&&g||void 0,"data-selected":!s&&v||void 0,"data-in-range":w&&!s||void 0,"data-first-in-range":P&&!s||void 0,"data-last-in-range":x&&!s||void 0,unstyled:u},N),y?.(o)||o.getDate())});wB.displayName="@mantine/dates/Day";function Yke({locale:e,format:t="dd",firstDayOfWeek:n=1}){const r=pe().day(n),o=[];for(let i=0;i<7;i+=1)typeof t=="string"?o.push(pe(r).add(i,"days").locale(e).format(t)):o.push(t(pe(r).add(i,"days").toDate()));return o}var Kke=ue((e,t,{size:n})=>({weekdaysRow:{},weekday:{color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[5],fontWeight:400,fontSize:re({size:n,sizes:e.fontSizes}),textTransform:"capitalize",paddingBottom:`calc(${re({size:n,sizes:e.spacing})} / 2)`}}));const qke=Kke;var Jke=Object.defineProperty,Sy=Object.getOwnPropertySymbols,bB=Object.prototype.hasOwnProperty,xB=Object.prototype.propertyIsEnumerable,$j=(e,t,n)=>t in e?Jke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xke=(e,t)=>{for(var n in t||(t={}))bB.call(t,n)&&$j(e,n,t[n]);if(Sy)for(var n of Sy(t))xB.call(t,n)&&$j(e,n,t[n]);return e},Qke=(e,t)=>{var n={};for(var r in e)bB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Sy)for(var r of Sy(e))t.indexOf(r)<0&&xB.call(e,r)&&(n[r]=e[r]);return n};const e2e={weekdayFormat:"dd",cellComponent:"th",size:"sm"},SB=_.forwardRef((e,t)=>{const n=ae("WeekdaysRow",e2e,e),{className:r,locale:o,firstDayOfWeek:i,weekdayFormat:s,cellComponent:a,__staticSelector:c,classNames:u,styles:f,unstyled:p,variant:g,size:v}=n,y=Qke(n,["className","locale","firstDayOfWeek","weekdayFormat","cellComponent","__staticSelector","classNames","styles","unstyled","variant","size"]),w=za(),{classes:P,cx:x}=qke(null,{name:["WeekdaysRow",c],classNames:u,styles:f,unstyled:p,variant:g,size:v}),S=Yke({locale:w.getLocale(o),format:s,firstDayOfWeek:w.getFirstDayOfWeek(i)}).map((O,E)=>k.createElement(a,{key:E,className:P.weekday},O));return k.createElement(Pe,Xke({component:"tr",ref:t,className:x(P.weekdaysRow,r)},y),S)});SB.displayName="@mantine/dates/WeekdaysRow";var t2e=Object.defineProperty,n2e=Object.defineProperties,r2e=Object.getOwnPropertyDescriptors,Py=Object.getOwnPropertySymbols,PB=Object.prototype.hasOwnProperty,OB=Object.prototype.propertyIsEnumerable,Mj=(e,t,n)=>t in e?t2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yh=(e,t)=>{for(var n in t||(t={}))PB.call(t,n)&&Mj(e,n,t[n]);if(Py)for(var n of Py(t))OB.call(t,n)&&Mj(e,n,t[n]);return e},Ew=(e,t)=>n2e(e,r2e(t)),o2e=(e,t)=>{var n={};for(var r in e)PB.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&&OB.call(e,r)&&(n[r]=e[r]);return n};const i2e={size:"sm",withCellSpacing:!0},CB=_.forwardRef((e,t)=>{const n=ae("Month",i2e,e),{className:r,classNames:o,styles:i,unstyled:s,__staticSelector:a,locale:c,firstDayOfWeek:u,weekdayFormat:f,month:p,weekendDays:g,getDayProps:v,excludeDate:y,minDate:w,maxDate:P,renderDay:x,hideOutsideDates:S,hideWeekdays:O,getDayAriaLabel:E,static:$,__getDayRef:N,__onDayKeyDown:I,__onDayClick:R,__onDayMouseEnter:B,__preventFocus:z,__stopPropagation:G,withCellSpacing:X,size:Q,variant:V}=n,H=o2e(n,["className","classNames","styles","unstyled","__staticSelector","locale","firstDayOfWeek","weekdayFormat","month","weekendDays","getDayProps","excludeDate","minDate","maxDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","static","__getDayRef","__onDayKeyDown","__onDayClick","__onDayMouseEnter","__preventFocus","__stopPropagation","withCellSpacing","size","variant"]),Z=za(),{classes:Y,cx:j}=Vke(null,{name:["Month",a],classNames:o,styles:i,unstyled:s,variant:V,size:Q}),U={__staticSelector:a||"Month",classNames:o,styles:i,unstyled:s,variant:V,size:Q},F=Ike(p,Z.getFirstDayOfWeek(u)),K=Hke(F,w,P,v,y,S,p),ee=F.map((fe,ie)=>{const J=fe.map((ne,le)=>{const _e=!mB(ne,p),Ne=E?.(ne)||pe(ne).locale(c||Z.locale).format("D MMMM YYYY"),we=v?.(ne),He=pe(ne).isSame(K,"date");return k.createElement("td",{key:ne.toString(),className:Y.monthCell,"data-with-spacing":X||void 0},k.createElement(wB,Ew(yh(Ew(yh({},U),{"data-mantine-stop-propagation":G||void 0,renderDay:x,date:ne,weekend:Z.getWeekendDays(g).includes(ne.getDay()),outside:_e,hidden:S?_e:!1,"aria-label":Ne,static:$,disabled:y?.(ne)||!gB(ne,P)||!vB(ne,w),ref:Te=>N?.(ie,le,Te)}),we),{onKeyDown:Te=>{var je;(je=we?.onKeyDown)==null||je.call(we,Te),I?.(Te,{rowIndex:ie,cellIndex:le,date:ne})},onMouseEnter:Te=>{var je;(je=we?.onMouseEnter)==null||je.call(we,Te),B?.(Te,ne)},onClick:Te=>{var je;(je=we?.onClick)==null||je.call(we,Te),R?.(Te,ne)},onMouseDown:Te=>{var je;(je=we?.onMouseDown)==null||je.call(we,Te),z&&Te.preventDefault()},tabIndex:z||!He?-1:0})))});return k.createElement("tr",{key:ie,className:Y.monthRow},J)});return k.createElement(Pe,yh({component:"table",className:j(Y.month,r),ref:t},H),!O&&k.createElement("thead",{className:Y.monthThead},k.createElement(SB,Ew(yh({},U),{locale:c,firstDayOfWeek:u,weekdayFormat:f}))),k.createElement("tbody",{className:Y.monthTbody},ee))});CB.displayName="@mantine/dates/Month";var s2e=Object.defineProperty,Oy=Object.getOwnPropertySymbols,kB=Object.prototype.hasOwnProperty,EB=Object.prototype.propertyIsEnumerable,Nj=(e,t,n)=>t in e?s2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$w=(e,t)=>{for(var n in t||(t={}))kB.call(t,n)&&Nj(e,n,t[n]);if(Oy)for(var n of Oy(t))EB.call(t,n)&&Nj(e,n,t[n]);return e},a2e=(e,t)=>{var n={};for(var r in e)kB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Oy)for(var r of Oy(e))t.indexOf(r)<0&&EB.call(e,r)&&(n[r]=e[r]);return n};const l2e={monthLabelFormat:"MMMM YYYY"},$B=_.forwardRef((e,t)=>{const n=ae("MonthLevel",l2e,e),{month:r,locale:o,firstDayOfWeek:i,weekdayFormat:s,weekendDays:a,getDayProps:c,excludeDate:u,minDate:f,maxDate:p,renderDay:g,hideOutsideDates:v,hideWeekdays:y,getDayAriaLabel:w,__getDayRef:P,__onDayKeyDown:x,__onDayClick:S,__onDayMouseEnter:O,withCellSpacing:E,__preventFocus:$,__stopPropagation:N,nextIcon:I,previousIcon:R,nextLabel:B,previousLabel:z,onNext:G,onPrevious:X,onLevelClick:Q,nextDisabled:V,previousDisabled:H,hasNextLevel:Z,levelControlAriaLabel:Y,withNext:j,withPrevious:U,className:F,monthLabelFormat:K,classNames:ee,styles:fe,unstyled:ie,__staticSelector:J,size:ne,variant:le,static:_e}=n,Ne=a2e(n,["month","locale","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","minDate","maxDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","__getDayRef","__onDayKeyDown","__onDayClick","__onDayMouseEnter","withCellSpacing","__preventFocus","__stopPropagation","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","levelControlAriaLabel","withNext","withPrevious","className","monthLabelFormat","classNames","styles","unstyled","__staticSelector","size","variant","static"]),{classes:we,cx:He}=bke(null,{name:["MonthLevel",J],classNames:ee,styles:fe,unstyled:ie,variant:le,size:ne}),Te=za(),je={__staticSelector:J||"MonthLevel",classNames:ee,styles:fe,unstyled:ie,variant:le,size:ne},it=typeof V=="boolean"?V:p?!pe(r).endOf("month").isBefore(p):!1,bt=typeof H=="boolean"?H:f?!pe(r).startOf("month").isAfter(f):!1;return k.createElement(Pe,$w({className:He(we.monthLevel,F),"data-month-level":!0,ref:t},Ne),k.createElement(a1,$w({label:typeof K=="function"?K(r):pe(r).locale(o||Te.locale).format(K),className:we.calendarHeader,__preventFocus:$,__stopPropagation:N,nextIcon:I,previousIcon:R,nextLabel:B,previousLabel:z,onNext:G,onPrevious:X,onLevelClick:Q,nextDisabled:it,previousDisabled:bt,hasNextLevel:Z,levelControlAriaLabel:Y,withNext:j,withPrevious:U},je)),k.createElement(CB,$w({month:r,locale:o,firstDayOfWeek:i,weekdayFormat:s,weekendDays:a,getDayProps:c,excludeDate:u,minDate:f,maxDate:p,renderDay:g,hideOutsideDates:v,hideWeekdays:y,getDayAriaLabel:w,__getDayRef:P,__onDayKeyDown:x,__onDayClick:S,__onDayMouseEnter:O,__preventFocus:$,__stopPropagation:N,static:_e,withCellSpacing:E},je)))});$B.displayName="@mantine/dates/MonthLevel";function c2e({direction:e,levelIndex:t,rowIndex:n,cellIndex:r,size:o}){switch(e){case"up":return t===0&&n===0?null:n===0?{levelIndex:t-1,rowIndex:r<=o[t-1][o[t-1].length-1]-1?o[t-1].length-1:o[t-1].length-2,cellIndex:r}:{levelIndex:t,rowIndex:n-1,cellIndex:r};case"down":return n===o[t].length-1?{levelIndex:t+1,rowIndex:0,cellIndex:r}:n===o[t].length-2&&r>=o[t][o[t].length-1]?{levelIndex:t+1,rowIndex:0,cellIndex:r}:{levelIndex:t,rowIndex:n+1,cellIndex:r};case"left":return t===0&&n===0&&r===0?null:n===0&&r===0?{levelIndex:t-1,rowIndex:o[t-1].length-1,cellIndex:o[t-1][o[t-1].length-1]-1}:r===0?{levelIndex:t,rowIndex:n-1,cellIndex:o[t][n-1]-1}:{levelIndex:t,rowIndex:n,cellIndex:r-1};case"right":return n===o[t].length-1&&r===o[t][n]-1?{levelIndex:t+1,rowIndex:0,cellIndex:0}:r===o[t][n]-1?{levelIndex:t,rowIndex:n+1,cellIndex:0}:{levelIndex:t,rowIndex:n,cellIndex:r+1};default:return{levelIndex:t,rowIndex:n,cellIndex:r}}}function MB({controlsRef:e,direction:t,levelIndex:n,rowIndex:r,cellIndex:o,size:i}){var s,a;const c=c2e({direction:t,size:i,rowIndex:r,cellIndex:o,levelIndex:n});if(!c)return;const u=(a=(s=e.current[c.levelIndex])==null?void 0:s[c.rowIndex])==null?void 0:a[c.cellIndex];u&&(u.disabled||u.getAttribute("data-hidden")||u.getAttribute("data-outside")?MB({controlsRef:e,direction:t,levelIndex:c.levelIndex,cellIndex:c.cellIndex,rowIndex:c.rowIndex,size:i}):u.focus())}function u2e(e){switch(e){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function d2e(e){return e.current.map(t=>t.map(n=>n.length))}function CO({controlsRef:e,levelIndex:t,rowIndex:n,cellIndex:r,event:o}){const i=u2e(o.key);if(i){o.preventDefault();const s=d2e(e);MB({controlsRef:e,direction:i,levelIndex:t,rowIndex:n,cellIndex:r,size:s})}}var f2e=Object.defineProperty,Cy=Object.getOwnPropertySymbols,NB=Object.prototype.hasOwnProperty,TB=Object.prototype.propertyIsEnumerable,Tj=(e,t,n)=>t in e?f2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,p2e=(e,t)=>{for(var n in t||(t={}))NB.call(t,n)&&Tj(e,n,t[n]);if(Cy)for(var n of Cy(t))TB.call(t,n)&&Tj(e,n,t[n]);return e},h2e=(e,t)=>{var n={};for(var r in e)NB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Cy)for(var r of Cy(e))t.indexOf(r)<0&&TB.call(e,r)&&(n[r]=e[r]);return n};const m2e={numberOfColumns:1},IB=_.forwardRef((e,t)=>{const n=ae("MonthLevelGroup",m2e,e),{month:r,locale:o,firstDayOfWeek:i,weekdayFormat:s,weekendDays:a,getDayProps:c,excludeDate:u,minDate:f,maxDate:p,renderDay:g,hideOutsideDates:v,hideWeekdays:y,getDayAriaLabel:w,__onDayClick:P,__onDayMouseEnter:x,withCellSpacing:S,__preventFocus:O,nextIcon:E,previousIcon:$,nextLabel:N,previousLabel:I,onNext:R,onPrevious:B,onLevelClick:z,nextDisabled:G,previousDisabled:X,hasNextLevel:Q,className:V,classNames:H,styles:Z,unstyled:Y,numberOfColumns:j,levelControlAriaLabel:U,monthLabelFormat:F,__staticSelector:K,__stopPropagation:ee,size:fe,variant:ie,static:J}=n,ne=h2e(n,["month","locale","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","minDate","maxDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","__onDayClick","__onDayMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","className","classNames","styles","unstyled","numberOfColumns","levelControlAriaLabel","monthLabelFormat","__staticSelector","__stopPropagation","size","variant","static"]),{classes:le,cx:_e}=_ke(null,{name:["MonthLevelGroup",K],classNames:H,styles:Z,unstyled:Y,variant:ie,size:fe}),Ne=_.useRef([]),we=Array(j).fill(0).map((He,Te)=>{const je=pe(r).add(Te,"months").toDate();return k.createElement($B,{key:Te,month:je,withNext:Te===j-1,withPrevious:Te===0,monthLabelFormat:F,__stopPropagation:ee,__onDayClick:P,__onDayMouseEnter:x,__onDayKeyDown:(it,bt)=>CO({levelIndex:Te,rowIndex:bt.rowIndex,cellIndex:bt.cellIndex,event:it,controlsRef:Ne}),__getDayRef:(it,bt,_n)=>{Array.isArray(Ne.current[Te])||(Ne.current[Te]=[]),Array.isArray(Ne.current[Te][it])||(Ne.current[Te][it]=[]),Ne.current[Te][it][bt]=_n},levelControlAriaLabel:typeof U=="function"?U(je):U,locale:o,firstDayOfWeek:i,weekdayFormat:s,weekendDays:a,getDayProps:c,excludeDate:u,minDate:f,maxDate:p,renderDay:g,hideOutsideDates:v,hideWeekdays:y,getDayAriaLabel:w,__preventFocus:O,nextIcon:E,previousIcon:$,nextLabel:N,previousLabel:I,onNext:R,onPrevious:B,onLevelClick:z,nextDisabled:G,previousDisabled:X,hasNextLevel:Q,classNames:H,styles:Z,unstyled:Y,__staticSelector:K||"MonthLevelGroup",size:fe,variant:ie,static:J,withCellSpacing:S})});return k.createElement(Pe,p2e({className:_e(le.monthLevelGroup,V),ref:t},ne),we)});IB.displayName="@mantine/dates/MonthLevelGroup";var g2e=ue((e,t,{size:n})=>({yearLevelGroup:{display:"flex","& [data-year-level]:not(:last-of-type)":{marginRight:re({size:n,sizes:e.spacing})}}}));const v2e=g2e;var y2e=ue(e=>({yearLevel:{},calendarHeader:{marginBottom:e.spacing.xs}}));const _2e=y2e;function w2e(e){const t=pe(e).startOf("year").toDate(),n=[[],[],[],[]];let r=0;for(let o=0;o<4;o+=1)for(let i=0;i<3;i+=1)n[o].push(pe(t).add(r,"months").toDate()),r+=1;return n}function jB(e,t,n){return!t&&!n?!1:!!(t&&pe(e).isBefore(t,"month")||n&&pe(e).isAfter(n,"month"))}var b2e=ue(()=>({monthsList:{borderCollapse:"collapse",borderWidth:0,cursor:"pointer"},monthsListCell:{padding:0,"&[data-with-spacing]":{padding:M(.5)}},monthsListRow:{}}));const x2e=b2e;function S2e(e,t,n,r){const o=e.flat().filter(a=>{var c;return!jB(a,t,n)&&!((c=r?.(a))!=null&&c.disabled)}),i=o.find(a=>{var c;return(c=r?.(a))==null?void 0:c.selected});if(i)return i;const s=o.find(a=>pe().isSame(a,"month"));return s||o[0]}var P2e=Object.defineProperty,O2e=Object.defineProperties,C2e=Object.getOwnPropertyDescriptors,Ij=Object.getOwnPropertySymbols,k2e=Object.prototype.hasOwnProperty,E2e=Object.prototype.propertyIsEnumerable,jj=(e,t,n)=>t in e?P2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_h=(e,t)=>{for(var n in t||(t={}))k2e.call(t,n)&&jj(e,n,t[n]);if(Ij)for(var n of Ij(t))E2e.call(t,n)&&jj(e,n,t[n]);return e},Lj=(e,t)=>O2e(e,C2e(t)),$2e=ue((e,t,{size:n})=>{const r=e.fn.variant({variant:"filled"}),o=e.fn.variant({variant:"light"});return{pickerControl:Lj(_h({fontSize:re({size:n,sizes:e.fontSizes}),height:re({size:n,sizes:Of}),width:`calc((${re({size:n,sizes:Of})} * 7) / 3 + ${M(1.5)})`,display:"flex",justifyContent:"center",alignItems:"center",userSelect:"none",borderRadius:e.fn.radius()},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),{"&:active":e.activeStyles,"&[data-in-range]":_h({backgroundColor:o.background,borderRadius:0},e.fn.hover({backgroundColor:o.hover})),"&[data-first-in-range]":{borderRadius:0,borderTopLeftRadius:e.radius.sm,borderBottomLeftRadius:e.radius.sm},"&[data-last-in-range]":{borderRadius:0,borderTopRightRadius:e.radius.sm,borderBottomRightRadius:e.radius.sm},"&[data-last-in-range][data-first-in-range]":{borderRadius:e.radius.sm},"&[data-selected]":_h({color:r.color,backgroundColor:r.background},e.fn.hover({backgroundColor:r.hover})),"&[data-disabled]":Lj(_h({color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4],cursor:"not-allowed"},e.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}})})}});const M2e=$2e;var N2e=Object.defineProperty,ky=Object.getOwnPropertySymbols,LB=Object.prototype.hasOwnProperty,DB=Object.prototype.propertyIsEnumerable,Dj=(e,t,n)=>t in e?N2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,T2e=(e,t)=>{for(var n in t||(t={}))LB.call(t,n)&&Dj(e,n,t[n]);if(ky)for(var n of ky(t))DB.call(t,n)&&Dj(e,n,t[n]);return e},I2e=(e,t)=>{var n={};for(var r in e)LB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ky)for(var r of ky(e))t.indexOf(r)<0&&DB.call(e,r)&&(n[r]=e[r]);return n};const j2e={size:"sm"},kO=_.forwardRef((e,t)=>{const n=ae("PickerControl",j2e,e),{className:r,children:o,disabled:i,selected:s,classNames:a,styles:c,unstyled:u,firstInRange:f,lastInRange:p,inRange:g,__staticSelector:v,size:y,variant:w}=n,P=I2e(n,["className","children","disabled","selected","classNames","styles","unstyled","firstInRange","lastInRange","inRange","__staticSelector","size","variant"]),{classes:x,cx:S}=M2e(null,{name:["PickerControl",v],classNames:a,styles:c,unstyled:u,variant:w,size:y});return k.createElement(ls,T2e({className:S(x.pickerControl,r),ref:t,unstyled:u,"data-picker-control":!0,"data-selected":s&&!i||void 0,"data-disabled":i||void 0,"data-in-range":g&&!i&&!s||void 0,"data-first-in-range":f&&!i||void 0,"data-last-in-range":p&&!i||void 0,disabled:i},P),o)});kO.displayName="@mantine/dates/PickerControl";var L2e=Object.defineProperty,D2e=Object.defineProperties,R2e=Object.getOwnPropertyDescriptors,Ey=Object.getOwnPropertySymbols,RB=Object.prototype.hasOwnProperty,zB=Object.prototype.propertyIsEnumerable,Rj=(e,t,n)=>t in e?L2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zj=(e,t)=>{for(var n in t||(t={}))RB.call(t,n)&&Rj(e,n,t[n]);if(Ey)for(var n of Ey(t))zB.call(t,n)&&Rj(e,n,t[n]);return e},z2e=(e,t)=>D2e(e,R2e(t)),A2e=(e,t)=>{var n={};for(var r in e)RB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ey)for(var r of Ey(e))t.indexOf(r)<0&&zB.call(e,r)&&(n[r]=e[r]);return n};const B2e={monthsListFormat:"MMM",size:"sm",withCellSpacing:!0},AB=_.forwardRef((e,t)=>{const n=ae("MonthsList",B2e,e),{year:r,className:o,monthsListFormat:i,locale:s,minDate:a,maxDate:c,getMonthControlProps:u,classNames:f,styles:p,unstyled:g,__staticSelector:v,__getControlRef:y,__onControlKeyDown:w,__onControlClick:P,__onControlMouseEnter:x,__preventFocus:S,size:O,variant:E,__stopPropagation:$,withCellSpacing:N}=n,I=A2e(n,["year","className","monthsListFormat","locale","minDate","maxDate","getMonthControlProps","classNames","styles","unstyled","__staticSelector","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","__preventFocus","size","variant","__stopPropagation","withCellSpacing"]),{classes:R,cx:B}=x2e(null,{name:["MonthsList",v],classNames:f,styles:p,unstyled:g,variant:E,size:O}),z=za(),G=w2e(r),X=S2e(G,a,c,u),Q=G.map((V,H)=>{const Z=V.map((Y,j)=>{const U=u?.(Y),F=pe(Y).isSame(X,"month");return k.createElement("td",{key:j,className:R.monthsListCell,"data-with-spacing":N||void 0},k.createElement(kO,z2e(zj({variant:E,size:O,classNames:f,styles:p,unstyled:g,__staticSelector:v||"MonthsList","data-mantine-stop-propagation":$||void 0,disabled:jB(Y,a,c),ref:K=>y?.(H,j,K)},U),{onKeyDown:K=>{var ee;(ee=U?.onKeyDown)==null||ee.call(U,K),w?.(K,{rowIndex:H,cellIndex:j,date:Y})},onClick:K=>{var ee;(ee=U?.onClick)==null||ee.call(U,K),P?.(K,Y)},onMouseEnter:K=>{var ee;(ee=U?.onMouseEnter)==null||ee.call(U,K),x?.(K,Y)},onMouseDown:K=>{var ee;(ee=U?.onMouseDown)==null||ee.call(U,K),S&&K.preventDefault()},tabIndex:S||!F?-1:0}),pe(Y).locale(z.getLocale(s)).format(i)))});return k.createElement("tr",{key:H,className:R.monthsListRow},Z)});return k.createElement(Pe,zj({component:"table",ref:t,className:B(R.monthsList,o)},I),k.createElement("tbody",null,Q))});AB.displayName="@mantine/dates/MonthsList";var F2e=Object.defineProperty,$y=Object.getOwnPropertySymbols,BB=Object.prototype.hasOwnProperty,FB=Object.prototype.propertyIsEnumerable,Aj=(e,t,n)=>t in e?F2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mw=(e,t)=>{for(var n in t||(t={}))BB.call(t,n)&&Aj(e,n,t[n]);if($y)for(var n of $y(t))FB.call(t,n)&&Aj(e,n,t[n]);return e},V2e=(e,t)=>{var n={};for(var r in e)BB.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&&FB.call(e,r)&&(n[r]=e[r]);return n};const H2e={yearLabelFormat:"YYYY",size:"sm"},VB=_.forwardRef((e,t)=>{const n=ae("YearLevel",H2e,e),{year:r,locale:o,minDate:i,maxDate:s,monthsListFormat:a,getMonthControlProps:c,__getControlRef:u,__onControlKeyDown:f,__onControlClick:p,__onControlMouseEnter:g,withCellSpacing:v,__preventFocus:y,nextIcon:w,previousIcon:P,nextLabel:x,previousLabel:S,onNext:O,onPrevious:E,onLevelClick:$,nextDisabled:N,previousDisabled:I,hasNextLevel:R,levelControlAriaLabel:B,withNext:z,withPrevious:G,className:X,yearLabelFormat:Q,classNames:V,styles:H,unstyled:Z,__staticSelector:Y,__stopPropagation:j,size:U,variant:F}=n,K=V2e(n,["year","locale","minDate","maxDate","monthsListFormat","getMonthControlProps","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","levelControlAriaLabel","withNext","withPrevious","className","yearLabelFormat","classNames","styles","unstyled","__staticSelector","__stopPropagation","size","variant"]),{classes:ee,cx:fe}=_2e(null,{name:["YearLevel",Y],classNames:V,styles:H,unstyled:Z,size:U,variant:F}),ie=za(),J={__staticSelector:Y||"YearLevel",classNames:V,styles:H,unstyled:Z,size:U,variant:F},ne=typeof N=="boolean"?N:s?!pe(r).endOf("year").isBefore(s):!1,le=typeof I=="boolean"?I:i?!pe(r).startOf("year").isAfter(i):!1;return k.createElement(Pe,Mw({className:fe(ee.yearLevel,X),"data-year-level":!0,ref:t},K),k.createElement(a1,Mw({label:typeof Q=="function"?Q(r):pe(r).locale(o||ie.locale).format(Q),className:ee.calendarHeader,__preventFocus:y,__stopPropagation:j,nextIcon:w,previousIcon:P,nextLabel:x,previousLabel:S,onNext:O,onPrevious:E,onLevelClick:$,nextDisabled:ne,previousDisabled:le,hasNextLevel:R,levelControlAriaLabel:B,withNext:z,withPrevious:G},J)),k.createElement(AB,Mw({year:r,locale:o,minDate:i,maxDate:s,monthsListFormat:a,getMonthControlProps:c,__getControlRef:u,__onControlKeyDown:f,__onControlClick:p,__onControlMouseEnter:g,__preventFocus:y,__stopPropagation:j,withCellSpacing:v},J)))});VB.displayName="@mantine/dates/YearLevel";var W2e=Object.defineProperty,My=Object.getOwnPropertySymbols,HB=Object.prototype.hasOwnProperty,WB=Object.prototype.propertyIsEnumerable,Bj=(e,t,n)=>t in e?W2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,U2e=(e,t)=>{for(var n in t||(t={}))HB.call(t,n)&&Bj(e,n,t[n]);if(My)for(var n of My(t))WB.call(t,n)&&Bj(e,n,t[n]);return e},Z2e=(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&&WB.call(e,r)&&(n[r]=e[r]);return n};const G2e={numberOfColumns:1,size:"sm"},UB=_.forwardRef((e,t)=>{const n=ae("YearLevelGroup",G2e,e),{year:r,locale:o,minDate:i,maxDate:s,monthsListFormat:a,getMonthControlProps:c,__onControlClick:u,__onControlMouseEnter:f,withCellSpacing:p,__preventFocus:g,nextIcon:v,previousIcon:y,nextLabel:w,previousLabel:P,onNext:x,onPrevious:S,onLevelClick:O,nextDisabled:E,previousDisabled:$,hasNextLevel:N,className:I,classNames:R,styles:B,unstyled:z,__staticSelector:G,__stopPropagation:X,numberOfColumns:Q,levelControlAriaLabel:V,yearLabelFormat:H,variant:Z,size:Y}=n,j=Z2e(n,["year","locale","minDate","maxDate","monthsListFormat","getMonthControlProps","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","className","classNames","styles","unstyled","__staticSelector","__stopPropagation","numberOfColumns","levelControlAriaLabel","yearLabelFormat","variant","size"]),{classes:U,cx:F}=v2e(null,{name:["YearLevelGroup",G],styles:B,classNames:R,unstyled:z,variant:Z,size:Y}),K=_.useRef([]),ee=Array(Q).fill(0).map((fe,ie)=>{const J=pe(r).add(ie,"years").toDate();return k.createElement(VB,{key:ie,variant:Z,size:Y,monthsListFormat:a,year:J,withNext:ie===Q-1,withPrevious:ie===0,yearLabelFormat:H,__stopPropagation:X,__onControlClick:u,__onControlMouseEnter:f,__onControlKeyDown:(ne,le)=>CO({levelIndex:ie,rowIndex:le.rowIndex,cellIndex:le.cellIndex,event:ne,controlsRef:K}),__getControlRef:(ne,le,_e)=>{Array.isArray(K.current[ie])||(K.current[ie]=[]),Array.isArray(K.current[ie][ne])||(K.current[ie][ne]=[]),K.current[ie][ne][le]=_e},levelControlAriaLabel:typeof V=="function"?V(J):V,locale:o,minDate:i,maxDate:s,__preventFocus:g,nextIcon:v,previousIcon:y,nextLabel:w,previousLabel:P,onNext:x,onPrevious:S,onLevelClick:O,nextDisabled:E,previousDisabled:$,hasNextLevel:N,getMonthControlProps:c,classNames:R,styles:B,unstyled:z,__staticSelector:G||"YearLevelGroup",withCellSpacing:p})});return k.createElement(Pe,U2e({className:F(U.yearLevelGroup,I),ref:t},j),ee)});UB.displayName="@mantine/dates/YearLevelGroup";var Y2e=ue(e=>({decadeLevelGroup:{display:"flex",gap:e.spacing.md}}));const K2e=Y2e;function ZB(e){const t=e.getFullYear(),n=t-t%10;let r=0;const o=[[],[],[],[]];for(let i=0;i<4;i+=1){const s=i===3?1:3;for(let a=0;a({decadeLevel:{},calendarHeader:{marginBottom:e.spacing.xs}}));const X2e=J2e;function GB(e,t,n){return!t&&!n?!1:!!(t&&pe(e).isBefore(t,"year")||n&&pe(e).isAfter(n,"year"))}var Q2e=ue(()=>({yearsList:{borderCollapse:"collapse",borderWidth:0},yearsListCell:{padding:0,"&[data-with-spacing]":{padding:M(.5)}},yearsListRow:{}}));const eEe=Q2e;function tEe(e,t,n,r){const o=e.flat().filter(a=>{var c;return!GB(a,t,n)&&!((c=r?.(a))!=null&&c.disabled)}),i=o.find(a=>{var c;return(c=r?.(a))==null?void 0:c.selected});if(i)return i;const s=o.find(a=>pe().isSame(a,"year"));return s||o[0]}var nEe=Object.defineProperty,rEe=Object.defineProperties,oEe=Object.getOwnPropertyDescriptors,Ny=Object.getOwnPropertySymbols,YB=Object.prototype.hasOwnProperty,KB=Object.prototype.propertyIsEnumerable,Fj=(e,t,n)=>t in e?nEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vj=(e,t)=>{for(var n in t||(t={}))YB.call(t,n)&&Fj(e,n,t[n]);if(Ny)for(var n of Ny(t))KB.call(t,n)&&Fj(e,n,t[n]);return e},iEe=(e,t)=>rEe(e,oEe(t)),sEe=(e,t)=>{var n={};for(var r in e)YB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ny)for(var r of Ny(e))t.indexOf(r)<0&&KB.call(e,r)&&(n[r]=e[r]);return n};const aEe={yearsListFormat:"YYYY",size:"sm",withCellSpacing:!0},qB=_.forwardRef((e,t)=>{const n=ae("YearsList",aEe,e),{decade:r,className:o,yearsListFormat:i,locale:s,minDate:a,maxDate:c,getYearControlProps:u,classNames:f,styles:p,unstyled:g,__staticSelector:v,__getControlRef:y,__onControlKeyDown:w,__onControlClick:P,__onControlMouseEnter:x,__preventFocus:S,__stopPropagation:O,size:E,variant:$,withCellSpacing:N}=n,I=sEe(n,["decade","className","yearsListFormat","locale","minDate","maxDate","getYearControlProps","classNames","styles","unstyled","__staticSelector","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","__preventFocus","__stopPropagation","size","variant","withCellSpacing"]),{classes:R,cx:B}=eEe(null,{name:["YearsList",v],classNames:f,styles:p,unstyled:g,variant:$,size:E}),z=za(),G=ZB(r),X=tEe(G,a,c,u),Q=G.map((V,H)=>{const Z=V.map((Y,j)=>{const U=u?.(Y),F=pe(Y).isSame(X,"year");return k.createElement("td",{key:j,className:R.yearsListCell,"data-with-spacing":N||void 0},k.createElement(kO,iEe(Vj({size:E,variant:$,classNames:f,styles:p,unstyled:g,__staticSelector:v||"YearsList","data-mantine-stop-propagation":O||void 0,disabled:GB(Y,a,c),ref:K=>y?.(H,j,K)},U),{onKeyDown:K=>{var ee;(ee=U?.onKeyDown)==null||ee.call(U,K),w?.(K,{rowIndex:H,cellIndex:j,date:Y})},onClick:K=>{var ee;(ee=U?.onClick)==null||ee.call(U,K),P?.(K,Y)},onMouseEnter:K=>{var ee;(ee=U?.onMouseEnter)==null||ee.call(U,K),x?.(K,Y)},onMouseDown:K=>{var ee;(ee=U?.onMouseDown)==null||ee.call(U,K),S&&K.preventDefault()},tabIndex:S||!F?-1:0}),pe(Y).locale(z.getLocale(s)).format(i)))});return k.createElement("tr",{key:H,className:R.yearsListRow},Z)});return k.createElement(Pe,Vj({component:"table",ref:t,className:B(R.yearsList,o)},I),k.createElement("tbody",null,Q))});qB.displayName="@mantine/dates/YearsList";var lEe=Object.defineProperty,Ty=Object.getOwnPropertySymbols,JB=Object.prototype.hasOwnProperty,XB=Object.prototype.propertyIsEnumerable,Hj=(e,t,n)=>t in e?lEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nw=(e,t)=>{for(var n in t||(t={}))JB.call(t,n)&&Hj(e,n,t[n]);if(Ty)for(var n of Ty(t))XB.call(t,n)&&Hj(e,n,t[n]);return e},cEe=(e,t)=>{var n={};for(var r in e)JB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ty)for(var r of Ty(e))t.indexOf(r)<0&&XB.call(e,r)&&(n[r]=e[r]);return n};const uEe={decadeLabelFormat:"YYYY"},QB=_.forwardRef((e,t)=>{const n=ae("DecadeLevel",uEe,e),{decade:r,locale:o,minDate:i,maxDate:s,yearsListFormat:a,getYearControlProps:c,__getControlRef:u,__onControlKeyDown:f,__onControlClick:p,__onControlMouseEnter:g,withCellSpacing:v,__preventFocus:y,nextIcon:w,previousIcon:P,nextLabel:x,previousLabel:S,onNext:O,onPrevious:E,nextDisabled:$,previousDisabled:N,levelControlAriaLabel:I,withNext:R,withPrevious:B,className:z,decadeLabelFormat:G,classNames:X,styles:Q,unstyled:V,__staticSelector:H,__stopPropagation:Z,variant:Y,size:j}=n,U=cEe(n,["decade","locale","minDate","maxDate","yearsListFormat","getYearControlProps","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","nextDisabled","previousDisabled","levelControlAriaLabel","withNext","withPrevious","className","decadeLabelFormat","classNames","styles","unstyled","__staticSelector","__stopPropagation","variant","size"]),{classes:F,cx:K}=X2e(null,{name:["DecadeLevel",H],classNames:X,styles:Q,unstyled:V,variant:Y,size:j}),ee=za(),[fe,ie]=q2e(r),J={__staticSelector:H||"DecadeLevel",classNames:X,styles:Q,unstyled:V,variant:Y,size:j},ne=typeof $=="boolean"?$:s?!pe(ie).endOf("year").isBefore(s):!1,le=typeof N=="boolean"?N:i?!pe(fe).startOf("year").isAfter(i):!1,_e=(Ne,we)=>pe(Ne).locale(o||ee.locale).format(we);return k.createElement(Pe,Nw({className:K(F.decadeLevel,z),"data-decade-level":!0,ref:t},U),k.createElement(a1,Nw({label:typeof G=="function"?G(fe,ie):`${_e(fe,G)} – ${_e(ie,G)}`,className:F.calendarHeader,__preventFocus:y,__stopPropagation:Z,nextIcon:w,previousIcon:P,nextLabel:x,previousLabel:S,onNext:O,onPrevious:E,nextDisabled:ne,previousDisabled:le,hasNextLevel:!1,levelControlAriaLabel:I,withNext:R,withPrevious:B},J)),k.createElement(qB,Nw({decade:r,locale:o,minDate:i,maxDate:s,yearsListFormat:a,getYearControlProps:c,__getControlRef:u,__onControlKeyDown:f,__onControlClick:p,__onControlMouseEnter:g,__preventFocus:y,__stopPropagation:Z,withCellSpacing:v},J)))});QB.displayName="@mantine/dates/DecadeLevel";var dEe=Object.defineProperty,Iy=Object.getOwnPropertySymbols,eF=Object.prototype.hasOwnProperty,tF=Object.prototype.propertyIsEnumerable,Wj=(e,t,n)=>t in e?dEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fEe=(e,t)=>{for(var n in t||(t={}))eF.call(t,n)&&Wj(e,n,t[n]);if(Iy)for(var n of Iy(t))tF.call(t,n)&&Wj(e,n,t[n]);return e},pEe=(e,t)=>{var n={};for(var r in e)eF.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Iy)for(var r of Iy(e))t.indexOf(r)<0&&tF.call(e,r)&&(n[r]=e[r]);return n};const hEe={numberOfColumns:1},nF=_.forwardRef((e,t)=>{const n=ae("DecadeLevelGroup",hEe,e),{decade:r,locale:o,minDate:i,maxDate:s,yearsListFormat:a,getYearControlProps:c,__onControlClick:u,__onControlMouseEnter:f,withCellSpacing:p,__preventFocus:g,nextIcon:v,previousIcon:y,nextLabel:w,previousLabel:P,onNext:x,onPrevious:S,nextDisabled:O,previousDisabled:E,className:$,classNames:N,styles:I,unstyled:R,__staticSelector:B,__stopPropagation:z,numberOfColumns:G,levelControlAriaLabel:X,decadeLabelFormat:Q,variant:V,size:H}=n,Z=pEe(n,["decade","locale","minDate","maxDate","yearsListFormat","getYearControlProps","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","nextDisabled","previousDisabled","className","classNames","styles","unstyled","__staticSelector","__stopPropagation","numberOfColumns","levelControlAriaLabel","decadeLabelFormat","variant","size"]),{classes:Y,cx:j}=K2e(null,{name:["DecadeLevelGroup",B],styles:I,classNames:N,unstyled:R,variant:V,size:H}),U=_.useRef([]),F=Array(G).fill(0).map((K,ee)=>{const fe=pe(r).add(ee*10,"years").toDate();return k.createElement(QB,{key:ee,variant:V,size:H,yearsListFormat:a,decade:fe,withNext:ee===G-1,withPrevious:ee===0,decadeLabelFormat:Q,__onControlClick:u,__onControlMouseEnter:f,__onControlKeyDown:(ie,J)=>CO({levelIndex:ee,rowIndex:J.rowIndex,cellIndex:J.cellIndex,event:ie,controlsRef:U}),__getControlRef:(ie,J,ne)=>{Array.isArray(U.current[ee])||(U.current[ee]=[]),Array.isArray(U.current[ee][ie])||(U.current[ee][ie]=[]),U.current[ee][ie][J]=ne},levelControlAriaLabel:typeof X=="function"?X(fe):X,locale:o,minDate:i,maxDate:s,__preventFocus:g,__stopPropagation:z,nextIcon:v,previousIcon:y,nextLabel:w,previousLabel:P,onNext:x,onPrevious:S,nextDisabled:O,previousDisabled:E,getYearControlProps:c,__staticSelector:B||"DecadeLevelGroup",classNames:N,styles:I,unstyled:R,withCellSpacing:p})});return k.createElement(Pe,fEe({className:j(Y.decadeLevelGroup,$),ref:t},Z),F)});nF.displayName="@mantine/dates/DecadeLevelGroup";var mEe=Object.defineProperty,jy=Object.getOwnPropertySymbols,rF=Object.prototype.hasOwnProperty,oF=Object.prototype.propertyIsEnumerable,Uj=(e,t,n)=>t in e?mEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wh=(e,t)=>{for(var n in t||(t={}))rF.call(t,n)&&Uj(e,n,t[n]);if(jy)for(var n of jy(t))oF.call(t,n)&&Uj(e,n,t[n]);return e},gEe=(e,t)=>{var n={};for(var r in e)rF.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&jy)for(var r of jy(e))t.indexOf(r)<0&&oF.call(e,r)&&(n[r]=e[r]);return n};const vEe={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0},iF=_.forwardRef((e,t)=>{const n=ae("Calendar",vEe,e),{maxLevel:r,minLevel:o,defaultLevel:i,level:s,onLevelChange:a,date:c,defaultDate:u,onDateChange:f,numberOfColumns:p,columnsToScroll:g,ariaLabels:v,onYearSelect:y,onMonthSelect:w,onYearMouseEnter:P,onMonthMouseEnter:x,__updateDateOnYearSelect:S,__updateDateOnMonthSelect:O,firstDayOfWeek:E,weekdayFormat:$,weekendDays:N,getDayProps:I,excludeDate:R,renderDay:B,hideOutsideDates:z,hideWeekdays:G,getDayAriaLabel:X,monthLabelFormat:Q,nextIcon:V,previousIcon:H,__onDayClick:Z,__onDayMouseEnter:Y,withCellSpacing:j,monthsListFormat:U,getMonthControlProps:F,yearLabelFormat:K,yearsListFormat:ee,getYearControlProps:fe,decadeLabelFormat:ie,minDate:J,maxDate:ne,locale:le,className:_e,classNames:Ne,styles:we,__staticSelector:He,unstyled:Te,variant:je,size:it,__preventFocus:bt,__stopPropagation:_n,onNextDecade:pt,onPreviousDecade:Tn,onNextYear:kr,onPreviousYear:lt,onNextMonth:Zn,onPreviousMonth:Jt,static:ht}=n,xo=gEe(n,["maxLevel","minLevel","defaultLevel","level","onLevelChange","date","defaultDate","onDateChange","numberOfColumns","columnsToScroll","ariaLabels","onYearSelect","onMonthSelect","onYearMouseEnter","onMonthMouseEnter","__updateDateOnYearSelect","__updateDateOnMonthSelect","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","monthLabelFormat","nextIcon","previousIcon","__onDayClick","__onDayMouseEnter","withCellSpacing","monthsListFormat","getMonthControlProps","yearLabelFormat","yearsListFormat","getYearControlProps","decadeLabelFormat","minDate","maxDate","locale","className","classNames","styles","__staticSelector","unstyled","variant","size","__preventFocus","__stopPropagation","onNextDecade","onPreviousDecade","onNextYear","onPreviousYear","onNextMonth","onPreviousMonth","static"]),{classes:Yr,cx:ar}=vke(null,{name:["Calendar",He],classNames:Ne,styles:we,unstyled:Te,variant:je,size:it}),[Kr,Bt]=go({value:s?dd(s,o,r):void 0,defaultValue:i?dd(i,o,r):void 0,finalValue:dd(void 0,o,r),onChange:a}),[qr,pn]=go({value:c,defaultValue:u,finalValue:null,onChange:f}),wn={__staticSelector:He||"Calendar",styles:we,classNames:Ne,unstyled:Te,variant:je,size:it},Er=g||p||1,gt=qr||new Date,be=()=>{const xt=pe(gt).add(Er,"month").toDate();Zn?.(xt),pn(xt)},De=()=>{const xt=pe(gt).subtract(Er,"month").toDate();Jt?.(xt),pn(xt)},Jr=()=>{const xt=pe(gt).add(Er,"year").toDate();kr?.(xt),pn(xt)},Rt=()=>{const xt=pe(gt).subtract(Er,"year").toDate();lt?.(xt),pn(xt)},Zt=()=>{const xt=pe(gt).add(10*Er,"year").toDate();pt?.(xt),pn(xt)},$r=()=>{const xt=pe(gt).subtract(10*Er,"year").toDate();Tn?.(xt),pn(xt)};return k.createElement(Pe,wh({className:ar(Yr.calendar,_e),ref:t},xo),Kr==="month"&&k.createElement(IB,wh({month:gt,minDate:J,maxDate:ne,firstDayOfWeek:E,weekdayFormat:$,weekendDays:N,getDayProps:I,excludeDate:R,renderDay:B,hideOutsideDates:z,hideWeekdays:G,getDayAriaLabel:X,onNext:be,onPrevious:De,hasNextLevel:r!=="month",onLevelClick:()=>Bt("year"),numberOfColumns:p,locale:le,levelControlAriaLabel:v?.monthLevelControl,nextLabel:v?.nextMonth,nextIcon:V,previousLabel:v?.previousMonth,previousIcon:H,monthLabelFormat:Q,__onDayClick:Z,__onDayMouseEnter:Y,__preventFocus:bt,__stopPropagation:_n,static:ht,withCellSpacing:j},wn)),Kr==="year"&&k.createElement(UB,wh({year:gt,numberOfColumns:p,minDate:J,maxDate:ne,monthsListFormat:U,getMonthControlProps:F,locale:le,onNext:Jr,onPrevious:Rt,hasNextLevel:r!=="month"&&r!=="year",onLevelClick:()=>Bt("decade"),levelControlAriaLabel:v?.yearLevelControl,nextLabel:v?.nextYear,nextIcon:V,previousLabel:v?.previousYear,previousIcon:H,yearLabelFormat:K,__onControlMouseEnter:x,__onControlClick:(xt,nn)=>{O&&pn(nn),Bt(dd("month",o,r)),w?.(nn)},__preventFocus:bt,__stopPropagation:_n,withCellSpacing:j},wn)),Kr==="decade"&&k.createElement(nF,wh({decade:gt,minDate:J,maxDate:ne,yearsListFormat:ee,getYearControlProps:fe,locale:le,onNext:Zt,onPrevious:$r,numberOfColumns:p,nextLabel:v?.nextDecade,nextIcon:V,previousLabel:v?.previousDecade,previousIcon:H,decadeLabelFormat:ie,__onControlMouseEnter:P,__onControlClick:(xt,nn)=>{S&&pn(nn),Bt(dd("year",o,r)),y?.(nn)},__preventFocus:bt,__stopPropagation:_n,withCellSpacing:j},wn)))});iF.displayName="@mantine/dates/Calendar";var Zj=Object.getOwnPropertySymbols,yEe=Object.prototype.hasOwnProperty,_Ee=Object.prototype.propertyIsEnumerable,wEe=(e,t)=>{var n={};for(var r in e)yEe.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Zj)for(var r of Zj(e))t.indexOf(r)<0&&_Ee.call(e,r)&&(n[r]=e[r]);return n};function bEe(e){const t=e,{maxLevel:n,minLevel:r,defaultLevel:o,level:i,onLevelChange:s,nextIcon:a,previousIcon:c,date:u,defaultDate:f,onDateChange:p,numberOfColumns:g,columnsToScroll:v,ariaLabels:y,onYearSelect:w,onMonthSelect:P,onYearMouseEnter:x,onMonthMouseEnter:S,onNextMonth:O,onPreviousMonth:E,onNextYear:$,onPreviousYear:N,onNextDecade:I,onPreviousDecade:R,withCellSpacing:B,__updateDateOnYearSelect:z,__updateDateOnMonthSelect:G,firstDayOfWeek:X,weekdayFormat:Q,weekendDays:V,getDayProps:H,excludeDate:Z,renderDay:Y,hideOutsideDates:j,hideWeekdays:U,getDayAriaLabel:F,monthLabelFormat:K,monthsListFormat:ee,getMonthControlProps:fe,yearLabelFormat:ie,yearsListFormat:J,getYearControlProps:ne,decadeLabelFormat:le,allowSingleDateInRange:_e,allowDeselect:Ne,minDate:we,maxDate:He,locale:Te}=t,je=wEe(t,["maxLevel","minLevel","defaultLevel","level","onLevelChange","nextIcon","previousIcon","date","defaultDate","onDateChange","numberOfColumns","columnsToScroll","ariaLabels","onYearSelect","onMonthSelect","onYearMouseEnter","onMonthMouseEnter","onNextMonth","onPreviousMonth","onNextYear","onPreviousYear","onNextDecade","onPreviousDecade","withCellSpacing","__updateDateOnYearSelect","__updateDateOnMonthSelect","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","monthLabelFormat","monthsListFormat","getMonthControlProps","yearLabelFormat","yearsListFormat","getYearControlProps","decadeLabelFormat","allowSingleDateInRange","allowDeselect","minDate","maxDate","locale"]);return{calendarProps:{maxLevel:n,minLevel:r,defaultLevel:o,level:i,onLevelChange:s,nextIcon:a,previousIcon:c,date:u,defaultDate:f,onDateChange:p,numberOfColumns:g,columnsToScroll:v,ariaLabels:y,onYearSelect:w,onMonthSelect:P,onYearMouseEnter:x,onMonthMouseEnter:S,onNextMonth:O,onPreviousMonth:E,onNextYear:$,onPreviousYear:N,onNextDecade:I,onPreviousDecade:R,withCellSpacing:B,__updateDateOnYearSelect:z,__updateDateOnMonthSelect:G,firstDayOfWeek:X,weekdayFormat:Q,weekendDays:V,getDayProps:H,excludeDate:Z,renderDay:Y,hideOutsideDates:j,hideWeekdays:U,getDayAriaLabel:F,monthLabelFormat:K,monthsListFormat:ee,getMonthControlProps:fe,yearLabelFormat:ie,yearsListFormat:J,getYearControlProps:ne,decadeLabelFormat:le,allowSingleDateInRange:_e,allowDeselect:Ne,minDate:we,maxDate:He,locale:Te},others:je}}function xEe(e,t){if(t==="range"&&Array.isArray(e)){const[n,r]=e;return n?r?`${n.toISOString()} – ${r.toISOString()}`:`${n.toISOString()} –`:""}return t==="multiple"&&Array.isArray(e)?e.map(n=>n.toISOString()).join(", "):!Array.isArray(e)&&e?e.toISOString():""}function sF({value:e,type:t,name:n,form:r}){return k.createElement("input",{type:"hidden",value:xEe(e,t),name:n,form:r})}sF.displayName="@mantine/dates/HiddenDatesInput";const Gj=e=>e==="range"?[null,null]:e==="multiple"?[]:null;function aF({type:e,value:t,defaultValue:n,onChange:r}){const o=_.useRef(e),[i,s]=go({value:t,defaultValue:n,onChange:r,finalValue:Gj(e)});let a=i;return o.current!==e&&(o.current=e,t===void 0&&(a=n!==void 0?n:Gj(e),s(a))),[a,s]}function Yj(e,t){const n=[...t].sort((r,o)=>r.getTime()-o.getTime());return pe(n[0]).startOf("day").subtract(1,"ms").isBefore(e)&&pe(n[1]).endOf("day").add(1,"ms").isAfter(e)}function SEe({type:e,level:t,value:n,defaultValue:r,onChange:o,allowSingleDateInRange:i,allowDeselect:s,onMouseLeave:a}){const[c,u]=aF({type:e,value:n,defaultValue:r,onChange:o}),[f,p]=_.useState(e==="range"&&c[0]&&!c[1]?c[0]:null),[g,v]=_.useState(null),y=$=>{if(e==="range"){if(f instanceof Date&&!c[1]){if(pe($).isSame(f,t)&&!i){p(null),v(null),u([null,null]);return}const N=[$,f];N.sort((I,R)=>I.getTime()-R.getTime()),u(N),v(null),p(null);return}if(c[0]&&!c[1]&&pe($).isSame(c[0],t)&&!i){p(null),v(null),u([null,null]);return}u([$,null]),v(null),p($);return}if(e==="multiple"){c.some(N=>pe(N).isSame($,t))?u(c.filter(N=>!pe(N).isSame($,t))):u([...c,$]);return}c&&s&&pe($).isSame(c,t)?u(null):u($)},w=$=>f instanceof Date&&g instanceof Date?Yj($,[g,f]):c[0]instanceof Date&&c[1]instanceof Date?Yj($,c):!1,P=e==="range"?$=>{a?.($),v(null)}:a,x=$=>c[0]instanceof Date&&pe($).isSame(c[0],t)?!(g&&pe(g).isBefore(c[0])):!1,S=$=>c[1]instanceof Date?pe($).isSame(c[1],t):!(c[0]instanceof Date)||!g?!1:pe(g).isBefore(c[0])&&pe($).isSame(c[0],t);return{onDateChange:y,onRootMouseLeave:P,onHoveredDateChange:e==="range"&&f?v:()=>{},getControlProps:$=>{if(e==="range")return{selected:c.some(I=>I&&pe(I).isSame($,t)),inRange:w($),firstInRange:x($),lastInRange:S($),"data-autofocus":!!c[0]&&pe(c[0]).isSame($,t)||void 0};if(e==="multiple")return{selected:c.some(I=>I&&pe(I).isSame($,t)),"data-autofocus":!!c[0]&&pe(c[0]).isSame($,t)||void 0};const N=pe(c).isSame($,t);return{selected:N,"data-autofocus":N||void 0}},_value:c,setValue:u}}var PEe=Object.defineProperty,Ly=Object.getOwnPropertySymbols,lF=Object.prototype.hasOwnProperty,cF=Object.prototype.propertyIsEnumerable,Kj=(e,t,n)=>t in e?PEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Tw=(e,t)=>{for(var n in t||(t={}))lF.call(t,n)&&Kj(e,n,t[n]);if(Ly)for(var n of Ly(t))cF.call(t,n)&&Kj(e,n,t[n]);return e},OEe=(e,t)=>{var n={};for(var r in e)lF.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ly)for(var r of Ly(e))t.indexOf(r)<0&&cF.call(e,r)&&(n[r]=e[r]);return n};const CEe={type:"default",numberOfColumns:1},uF=_.forwardRef((e,t)=>{const n=ae("DatePicker",CEe,e),{type:r,defaultValue:o,value:i,onChange:s,__staticSelector:a,getDayProps:c,allowSingleDateInRange:u,allowDeselect:f,onMouseLeave:p,numberOfColumns:g}=n,v=OEe(n,["type","defaultValue","value","onChange","__staticSelector","getDayProps","allowSingleDateInRange","allowDeselect","onMouseLeave","numberOfColumns"]),{onDateChange:y,onRootMouseLeave:w,onHoveredDateChange:P,getControlProps:x}=SEe({type:r,level:"day",allowDeselect:f,allowSingleDateInRange:u,value:i,defaultValue:o,onChange:s,onMouseLeave:p});return k.createElement(iF,Tw({ref:t,minLevel:"month",__staticSelector:a||"DatePicker",onMouseLeave:w,hideOutsideDates:g!==1,numberOfColumns:g,__onDayMouseEnter:(S,O)=>P(O),__onDayClick:(S,O)=>y(O),getDayProps:S=>Tw(Tw({},x(S)),c?.(S))},v))});uF.displayName="@mantine/dates/DatePicker";function kEe({type:e,date:t,locale:n,format:r,labelSeparator:o}){const i=s=>pe(s).locale(n).format(r);return e==="default"?t===null?"":i(t):e==="multiple"?t.map(i).join(", "):e==="range"?t[0]&&t[1]?`${i(t[0])} ${o} ${i(t[1])}`:t[0]?`${i(t[0])} ${o} `:"":""}function EEe({type:e,value:t,defaultValue:n,onChange:r,locale:o,format:i,closeOnChange:s,sortDates:a,labelSeparator:c}){const u=za(),[f,p]=hS(!1),[g,v]=aF({type:e,value:t,defaultValue:n,onChange:r}),y=kEe({type:e,date:g,locale:u.getLocale(o),format:i,labelSeparator:u.getLabelSeparator(c)}),w=S=>{s&&(e==="default"&&p.close(),e==="range"&&S[0]&&S[1]&&p.close()),v(a&&e==="multiple"?[...S].sort((O,E)=>O.getTime()-E.getTime()):S)},P=()=>w(e==="range"?[null,null]:e==="multiple"?[]:null),x=e==="range"?!!g[0]:e==="multiple"?g.length>0:g!==null;return{_value:g,setValue:w,onClear:P,shouldClear:x,formattedValue:y,dropdownOpened:f,dropdownHandlers:p}}function $Ee({minDate:e,maxDate:t}){const n=new Date;return!e&&!t?n:pe(n).isBefore(e)?e:pe(n).isAfter(t)?t:n}var MEe=ue(()=>({placeholder:{},input:{cursor:"pointer",lineHeight:"unset","&[data-read-only]":{cursor:"default"}}}));const NEe=MEe;var TEe=Object.defineProperty,IEe=Object.defineProperties,jEe=Object.getOwnPropertyDescriptors,Dy=Object.getOwnPropertySymbols,dF=Object.prototype.hasOwnProperty,fF=Object.prototype.propertyIsEnumerable,qj=(e,t,n)=>t in e?TEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qa=(e,t)=>{for(var n in t||(t={}))dF.call(t,n)&&qj(e,n,t[n]);if(Dy)for(var n of Dy(t))fF.call(t,n)&&qj(e,n,t[n]);return e},Jj=(e,t)=>IEe(e,jEe(t)),LEe=(e,t)=>{var n={};for(var r in e)dF.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Dy)for(var r of Dy(e))t.indexOf(r)<0&&fF.call(e,r)&&(n[r]=e[r]);return n};const DEe={},pF=_.forwardRef((e,t)=>{const n=xP("PickerInputBase",DEe,e),{inputProps:r,wrapperProps:o,placeholder:i,classNames:s,styles:a,unstyled:c,popoverProps:u,modalProps:f,dropdownType:p,children:g,formattedValue:v,dropdownHandlers:y,dropdownOpened:w,onClick:P,clearable:x,onClear:S,clearButtonProps:O,rightSection:E,shouldClear:$,readOnly:N,disabled:I,value:R,name:B,form:z,type:G}=n,X=LEe(n,["inputProps","wrapperProps","placeholder","classNames","styles","unstyled","popoverProps","modalProps","dropdownType","children","formattedValue","dropdownHandlers","dropdownOpened","onClick","clearable","onClear","clearButtonProps","rightSection","shouldClear","readOnly","disabled","value","name","form","type"]),{classes:Q,cx:V}=NEe(null,{name:r.__staticSelector,classNames:s,styles:a,unstyled:c,variant:r.variant,size:r.size}),H=E||(x&&$&&!N&&!I?k.createElement(C0,qa({variant:"transparent",onClick:S,unstyled:c,size:r.size},O)):null),Z=()=>{G==="range"&&R[0]&&!R[1]&&S(),y.close()},Y=o.label;return k.createElement(k.Fragment,null,p==="modal"&&!N&&k.createElement(zi,qa({opened:w,onClose:Z,withCloseButton:!1,size:"auto","data-dates-modal":!0,unstyled:c},f),g),k.createElement(et.Wrapper,qa({},o),k.createElement(kn,qa({position:"bottom-start",opened:w,onClose:Z,disabled:p==="modal"||N,trapFocus:!0,returnFocus:!0,unstyled:c},u),k.createElement(kn.Target,{shouldOverrideDefaultTargetId:!Y},k.createElement(et,qa(Jj(qa({"aria-label":v,"data-dates-input":!0,"data-read-only":N||void 0,disabled:I,component:"button",type:"button",multiline:!0,onClick:j=>{P?.(j),y.toggle()},rightSection:H},r),{ref:t,classNames:Jj(qa({},s),{input:V(Q.input,s?.input)})}),X),v||k.createElement(et.Placeholder,{className:Q.placeholder,sx:{color:r.error?"inherit":void 0}},i))),k.createElement(kn.Dropdown,{"data-dates-dropdown":!0},g))),k.createElement(sF,{value:R,name:B,form:z,type:G}))});pF.displayName="@mantine/dates/PickerInputBase";var REe=Object.defineProperty,zEe=Object.defineProperties,AEe=Object.getOwnPropertyDescriptors,Ry=Object.getOwnPropertySymbols,hF=Object.prototype.hasOwnProperty,mF=Object.prototype.propertyIsEnumerable,Xj=(e,t,n)=>t in e?REe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qj=(e,t)=>{for(var n in t||(t={}))hF.call(t,n)&&Xj(e,n,t[n]);if(Ry)for(var n of Ry(t))mF.call(t,n)&&Xj(e,n,t[n]);return e},BEe=(e,t)=>zEe(e,AEe(t)),FEe=(e,t)=>{var n={};for(var r in e)hF.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ry)for(var r of Ry(e))t.indexOf(r)<0&&mF.call(e,r)&&(n[r]=e[r]);return n};const VEe={type:"default",valueFormat:"MMMM D, YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},EO=_.forwardRef((e,t)=>{const n=ae("DatePickerInput",VEe,e),{type:r,value:o,defaultValue:i,onChange:s,valueFormat:a,labelSeparator:c,locale:u,classNames:f,styles:p,unstyled:g,closeOnChange:v,size:y,variant:w,dropdownType:P,sortDates:x,maxDate:S,minDate:O,defaultDate:E}=n,$=FEe(n,["type","value","defaultValue","onChange","valueFormat","labelSeparator","locale","classNames","styles","unstyled","closeOnChange","size","variant","dropdownType","sortDates","maxDate","minDate","defaultDate"]),{calendarProps:N,others:I}=bEe($),{_value:R,setValue:B,formattedValue:z,dropdownHandlers:G,dropdownOpened:X,onClear:Q,shouldClear:V}=EEe({type:r,value:o,defaultValue:i,onChange:s,locale:u,format:a,labelSeparator:c,closeOnChange:v,sortDates:x}),H=E||$Ee({maxDate:S,minDate:O});return k.createElement(pF,Qj({formattedValue:z,dropdownOpened:X,dropdownHandlers:G,classNames:f,styles:p,unstyled:g,__staticSelector:"DatePickerInput",ref:t,onClear:Q,shouldClear:V,value:R,type:r,size:y,variant:w,dropdownType:P},I),k.createElement(uF,BEe(Qj({},N),{size:y,variant:w,type:r,value:R,defaultDate:Array.isArray(R)?R[0]||H:R||H,onChange:B,locale:u,classNames:f,styles:p,unstyled:g,__staticSelector:"DatePickerInput",__stopPropagation:P==="popover",maxDate:S,minDate:O})))});EO.displayName="@mantine/dates/DatePickerInput";const l1=tn(e=>({selectedCharges:[],setSelectedCharges:t=>e(n=>({selectedCharges:typeof t=="function"?t(n.selectedCharges):t})),setSelectedCharge:(t,n)=>{e(r=>({selectedCharges:r.selectedCharges.map(o=>o.label===t?n(o):o)}))}})),HEe=ue(e=>({wrapper:{width:105,display:"flex",alignItems:"center",justifyContent:"space-between",padding:`${M(.5)} ${e.spacing.xs}`,borderRadius:e.radius.sm,border:`${M(1)} solid ${e.colorScheme==="dark"?"transparent":e.colors.gray[3]}`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.white,"&:focus-within":{borderColor:e.colors[e.primaryColor][6]}},control:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,border:`${M(1)} solid ${e.colorScheme==="dark"?"transparent":e.colors.gray[3]}`,"&:disabled":{borderColor:e.colorScheme==="dark"?"transparent":e.colors.gray[3],opacity:.8,backgroundColor:"transparent"}},input:{textAlign:"center",paddingRight:`${e.spacing.md} !important`,paddingLeft:`${e.spacing.sm} !important`,height:M(18),flex:1,"&:disabled":{backgroundColor:"#2C2E33",cursor:"auto",color:"#C1C2C5"}}})),WEe=({charge:e,index:t})=>{const{classes:n}=HEe(),{setSelectedCharge:r,setSelectedCharges:o}=l1();return h.jsxs("div",{className:"edit-charges-modal-charge-card",children:[h.jsx(W,{fz:"sm",fw:500,c:"white",style:{textAlign:"center"},children:e.label}),h.jsxs("div",{style:{display:"flex",gap:5,justifyContent:"center"},children:[h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,margin:5,fontWeight:500},children:["$",e.fine," fine"]}),h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,margin:5,fontWeight:500},children:[e.time," month(s)"]}),h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,margin:5,fontWeight:500},children:[e.points," point(s)"]})]}),h.jsx(At,{label:e.description,multiline:!0,withArrow:!0,color:"gray",children:h.jsx(W,{fz:"xs",fw:500,mt:5,style:{textAlign:"center"},lineClamp:2,children:e.description})}),h.jsxs(nt,{position:"apart",style:{gap:5},children:[h.jsx(mt,{radius:"xs",variant:"filled",style:{fontSize:10,padding:12.5,fontWeight:500},color:e.type.toLocaleLowerCase()==="felony"?"red":e.type.toLocaleLowerCase()==="infraction"?"green":"yellow",children:e.type}),h.jsxs(nt,{style:{gap:5},children:[h.jsx(At,{label:D.remove_charge,withArrow:!0,color:"gray",children:h.jsx(Qe,{onClick:()=>{o(i=>i.filter((s,a)=>a!==t))},h:31,className:"action-icon",children:h.jsx(A0,{size:18})})}),h.jsxs("div",{className:n.wrapper,children:[h.jsx(Qe,{size:18,variant:"transparent",onClick:()=>r(e.label,i=>({...i,count:--i.count})),disabled:e.count===1,className:n.control,onMouseDown:i=>i.preventDefault(),children:h.jsx(Rhe,{size:"1rem",stroke:1.5})}),h.jsx(ma,{variant:"unstyled",min:1,max:99,value:e.count,classNames:{input:n.input},disabled:!0}),h.jsx(Qe,{size:18,variant:"transparent",onClick:()=>r(e.label,i=>({...i,count:++i.count})),className:n.control,onMouseDown:i=>i.preventDefault(),children:h.jsx(Eu,{size:"1rem",stroke:1.5})})]})]})]})]})},UEe=e=>{const t={reduction:null,fine:0,time:0,points:0};for(let n=0;n{const[t,n]=_.useState(!1),{selectedCharges:r,setSelectedCharges:o}=l1(),{setCriminal:i}=Ur();return h.jsx(st,{variant:"light",color:"gray",loading:t,onClick:async()=>{n(!0);const s=await me("getRecommendedWarrantExpiry",r,{data:Date.now()});i(e.citizenid,a=>({...a,charges:r,penalty:UEe(r),warrantExpiry:new Date(s)})),n(!1),o([]),ke.closeAll()},children:D.confirm})},GEe=({criminal:e})=>{const{selectedCharges:t,setSelectedCharges:n}=l1(),{charges:r}=Yf(),[o,i]=_.useState({}),[s,a]=_.useState(!1),[c,u]=_.useState(null),f=500,[p,g]=_.useState(""),[v,y]=_.useState(p);return _.useEffect(()=>{c!==null&&clearTimeout(c),a(!0);const w=setTimeout(()=>{y(p),a(!1)},f);return u(w),()=>{clearTimeout(w)}},[p]),_.useEffect(()=>{if(v.trim()==="")i(r);else{const w=Object.entries(r).reduce((P,[x,S])=>{const O=v.trim()?S.filter(E=>E.label.toLowerCase().includes(v.toLowerCase())):S;return O.length>0&&(P[x]=O),P},{});i(w)}},[v,r]),h.jsxs("div",{className:"edit-charges-modal",children:[h.jsx(Ye,{}),h.jsxs("div",{className:"edit-charges-modal-content",children:[h.jsxs("div",{className:"edit-charges-modal-current-charges",children:[h.jsx(W,{fz:"md",fw:500,c:"white",mb:5,children:D.current_charges}),h.jsx(St,{h:620,children:h.jsx("div",{className:"edit-charges-modal-added-charges",children:t.map((w,P)=>h.jsx(WEe,{charge:w,index:P},P))})}),h.jsx(ZEe,{criminal:e})]}),h.jsx(Ye,{orientation:"vertical"}),h.jsxs("div",{className:"edit-charges-modal-all-charges",children:[h.jsxs("div",{className:"edit-charges-modal-all-charges-header",children:[h.jsx(W,{fz:"md",fw:500,c:"white",mb:5,children:D.all_charges}),h.jsx(yn,{radius:"xs",variant:"filled",placeholder:D.search,w:300,value:p,onChange:w=>g(w.target.value)})]}),h.jsx(St,{h:635,children:h.jsx("div",{className:"edit-charges-modal-all-charges-list",children:s?h.jsx("div",{style:{display:"flex",width:"100%",marginTop:100,justifyContent:"center",alignItems:"center"},children:h.jsx(en,{})}):h.jsx(h.Fragment,{children:Object.entries(o).map(([w,P])=>h.jsxs("div",{children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:w}),h.jsx("div",{className:"edit-charges-modal-charges-content",children:P.map((x,S)=>h.jsxs("div",{className:"edit-charges-modal-charge-card",children:[h.jsx(W,{fz:"sm",fw:500,c:"white",style:{textAlign:"center"},children:x.label}),h.jsxs("div",{style:{display:"flex",gap:5,justifyContent:"center"},children:[h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,margin:5,fontWeight:500},children:["$",x.fine," fine"]}),h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,margin:5,fontWeight:500},children:[x.time," ",D.months]}),h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,margin:5,fontWeight:500},children:[x.points," ",D.points]})]}),h.jsx(At,{label:x.description,multiline:!0,withArrow:!0,color:"gray",children:h.jsx(W,{fz:"xs",fw:500,mt:5,style:{textAlign:"center"},lineClamp:2,children:x.description})}),h.jsxs(nt,{position:"apart",children:[h.jsx(mt,{radius:"xs",variant:"filled",style:{fontSize:10,padding:12.5,fontWeight:500},color:x.type.toLocaleLowerCase()==="felony"?"red":x.type.toLocaleLowerCase()==="infraction"?"green":"yellow",children:x.type}),h.jsx(At,{label:D.add_charge,withArrow:!0,color:"gray",children:h.jsx(Qe,{onClick:()=>n(O=>{const E=O.findIndex($=>$.label===x.label);return E===-1?[...O,{...x,count:1}]:O.map(($,N)=>N===E?{...$,count:++$.count}:$)}),h:31,className:"action-icon",children:h.jsx(Eu,{size:18})})})]})]},S))})]},w))})})})]})]})]})},gF=e=>Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0}).format(e),e5=[25,50,75,80,90],zy=(e,t)=>t?Math.round(e-t/100*e):e,YEe=e=>{const t=[];if(!e)return[];for(let n=0;n{const{incident:t,setCriminals:n,setCriminal:r}=Ur(),{setSelectedCharges:o}=l1(),{setSelectedProfile:i}=Li(),s=Ul();return h.jsxs("div",{className:"incident-criminal-card-background",children:[h.jsxs("div",{className:"incident-criminal-card-header",children:[h.jsxs(W,{style:{fontSize:15,color:"white"},weight:600,children:[e.firstname," ",e.lastname]}),h.jsxs("div",{className:"incident-criminal-card-buttons",children:[h.jsx(At,{label:D.remove_criminal,withArrow:!0,color:"gray",position:"bottom",children:h.jsx(Qe,{variant:"light",color:"red",onClick:()=>{ke.openConfirmModal({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.remove_criminal}),size:"sm",centered:!0,labels:{confirm:D.confirm,cancel:D.cancel},groupProps:{spacing:6},confirmProps:{color:"red"},onConfirm:async()=>{await me("removeCriminal",{id:t.id,criminalId:e.citizenid},{data:1})&&n(c=>c.filter(u=>u.citizenid!==e.citizenid))},children:h.jsx(W,{size:"sm",c:"dark.2",children:D.remove_criminal_confirm.format(e.firstname,e.lastname)})})},children:h.jsx(A0,{size:16,color:"white"})})}),h.jsx(At,{label:D.go_to_profile,withArrow:!0,color:"gray",position:"bottom",children:h.jsx(Qe,{variant:"light",color:"dark",onClick:async()=>{if(!at()){const a=await me("getProfile",e.citizenid);i(a)}s("/profiles")},children:h.jsx(Khe,{size:16,color:"white"})})}),h.jsx(At,{label:D.save_criminal,withArrow:!0,color:"gray",position:"bottom",children:h.jsx(Qe,{variant:"light",color:"dark",onClick:()=>{me("saveCriminal",{id:t.id,criminal:{...e,warrantExpiry:e.warrantExpiry?pe(e.warrantExpiry).format("YYYY-MM-DD HH:mm:ss"):null}},{data:1})},children:h.jsx(O8,{size:16,color:"white"})})})]})]}),h.jsxs(W,{color:"dimmed",size:"xs",children:["#",e.citizenid]}),h.jsxs("div",{className:"incident-criminal-content",children:[h.jsxs("div",{className:"incident-criminal-edit-charges-badges",children:[h.jsx(mt,{radius:"xs",variant:"light",style:{color:"white",fontSize:10,padding:12.5,cursor:"pointer",backgroundColor:"#343a40"},w:125,onClick:()=>{o(e.charges),ke.open({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.edit_charges}),styles:{body:{height:700,overflow:"hidden"},content:{width:1400}},centered:!0,size:1445,children:h.jsx(GEe,{criminal:e})})},children:D.edit_charges}),e.charges.map((a,c)=>h.jsxs(mt,{radius:"xs",variant:"filled",style:{fontSize:10,padding:12.5,fontWeight:500},color:a.type.toLowerCase()==="felony"?"red":a.type.toLowerCase()==="infraction"?"green":"yellow",children:[a.count,"x ",a.label]},c))]}),h.jsx(Ye,{style:{width:"100%"}}),h.jsx(mr,{label:D.issue_warrant,description:D.issue_warrant_description,checked:e.issueWarrant,onChange:()=>r(e.citizenid,a=>({...a,issueWarrant:!a.issueWarrant}))}),e.issueWarrant?h.jsx(EO,{icon:h.jsx(RP,{size:20}),label:D.warrant_expiration_date,placeholder:"2023-03-12",weekendDays:[],minDate:new Date,value:e.warrantExpiry?new Date(e.warrantExpiry):null,onChange:a=>{r(e.citizenid,c=>({...c,warrantExpiry:a}))}}):h.jsxs(h.Fragment,{children:[h.jsx(Nl,{label:D.reduction,value:e.penalty.reduction?e.penalty.reduction.toString():null,data:YEe(e.penalty),icon:h.jsx(fhe,{size:20}),onChange:a=>r(e.citizenid,c=>({...c,penalty:c.penalty?{...c.penalty,reduction:a?+a:null}:{reduction:a?+a:null,time:0,fine:0,points:0}})),clearable:!0,placeholder:D.no_reduction,variant:"filled"}),h.jsxs(nt,{children:[h.jsxs(W,{size:"xs",style:{color:"white"},children:[D.time,": ",zy(e.penalty.time,e.penalty.reduction)," ",D.months]}),h.jsxs(W,{size:"xs",style:{color:"white"},children:[D.fine,": ",gF(zy(e.penalty.fine,e.penalty.reduction))]})]}),h.jsxs(nt,{children:[h.jsx(mr,{label:D.pleaded_guilty,checked:e.pleadedGuilty,onChange:()=>r(e.citizenid,a=>({...a,pleadedGuilty:!a.pleadedGuilty}))}),h.jsx(mr,{label:D.processed,checked:e.processed,onChange:()=>r(e.citizenid,a=>({...a,processed:!a.processed}))})]})]})]})]})},qEe=()=>{const{incident:e,isIncidentActive:t}=Ur();return t?h.jsx(St,{h:860,children:h.jsxs("div",{className:"incident-criminals-content-width",children:[h.jsxs(st,{fullWidth:!0,variant:"light",color:"gray",onClick:()=>ke.open({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.add_criminal}),centered:!0,size:"sm",children:h.jsx(ZCe,{})}),children:[h.jsx(T8,{size:M(18),style:{marginRight:5}})," ",D.add_criminal]}),e.criminals.map(n=>h.jsx(KEe,{criminal:n},n.citizenid))]})}):h.jsx("div",{className:"content-width",children:h.jsx("div",{className:"card-background",children:h.jsxs("div",{className:"profile-no-selected",children:[h.jsx(R0,{size:M(50),color:"white"}),h.jsx(W,{style:{fontSize:15,color:"white"},weight:600,children:D.no_incident_selected})]})})})},JEe=()=>{const{setActiveIncident:e,setIncidentActive:t}=Ur(),[n,r]=_.useState(!1),o=async i=>{r(!0);const s=await me("getIncident",i.id,{data:{id:1,officersInvolved:[],evidence:[],title:i.title,description:"

",criminals:[]}});e(s),t(!0),r(!1)};return h.jsxs("div",{className:"incidents",children:[h.jsx(zCe,{handleIncidentClick:o}),h.jsx(Wf,{visible:n,overlayOpacity:.97,overlayColor:"rgb(34, 35, 37)",transitionDuration:250,loader:i1,style:{left:795,width:935,height:"96%",top:19,borderRadius:"0.25rem"}}),h.jsx(HCe,{}),h.jsx(qEe,{})]})};const XEe=[{firstname:"John",lastname:"Doe",callsign:"1A-01",citizenid:"ABCD1234",playerId:1,position:[0,0,0],unitId:1,image:"",title:"Chief",apu:!0,air:!0,mc:!0,k9:!0,fto:!0,lastActive:Date.now()},{firstname:"Jenna",lastname:"Doe",callsign:"1A-02",citizenid:"ABCD1235",playerId:2,position:[0,0,0],image:"",title:"Captain",apu:!1,air:!0,mc:!0,k9:!1,fto:!1,lastActive:Date.now()}],Tu=tn(e=>({rosterOfficers:at()?XEe:[],getRosterOfficers:async()=>{try{const t=await me("fetchRoster");return e({rosterOfficers:t}),{rosterOfficers:t}}catch(t){return console.error("Failed to fetch recent activities:",t),{rosterOfficers:[]}}},setRosterOfficers:t=>{e(n=>({rosterOfficers:typeof t=="function"?t(n.rosterOfficers):t}))}})),QEe=({officer:e})=>{const[t,n]=_.useState(!1),{setRosterOfficers:r}=Tu(),o=Zl({initialValues:{callsign:e.callsign}});return h.jsx("form",{onSubmit:o.onSubmit(async i=>{n(!0);const s=await me("setOfficerCallSign",{citizenid:e.citizenid,callsign:i.callsign},{data:!0,delay:500});if(n(!1),!s)return o.setFieldError("callSign",D.callsign_in_use);r(a=>a.map(c=>c.citizenid===e.citizenid?{...e,callsign:i.callsign}:c)),ke.closeAll()}),children:h.jsxs(Je,{children:[h.jsx(yn,{label:D.callsign,...o.getInputProps("callsign")}),h.jsx(st,{type:"submit",color:"gray",loading:t,variant:"light",children:D.confirm})]})})},e$e=({officer:e})=>{const t=["Cadet","Probationary Trooper","Trooper","Senior Trooper","Master Trooper","Corporal","Sergeant","Lieutenant","Captain","Assistant Chief","Chief"],[n,r]=_.useState(null),[o,i]=_.useState(!1),{setRosterOfficers:s}=Tu(),a=async()=>{n===null||(i(!0),!await me("setOfficerRank",{citizenId:e.citizenid,grade:+n},{data:!0}))||(s(u=>u.map(f=>f.citizenid===e.citizenid?{...e,title:`${t[n]}`}:f)),i(!1),ke.closeAll())};return h.jsxs(Je,{children:[h.jsx(Nl,{withinPortal:!0,value:n!==null?n.toString():null,data:t?t.map((c,u)=>({label:c,value:u.toString()})):[],onChange:c=>r(c!==null?+c:null),label:D.rank}),h.jsx(st,{variant:"light",color:"gray",onClick:a,loading:o,children:D.confirm})]})},t$e=({officer:e})=>{const[t,n]=_.useState(!1),{setRosterOfficers:r}=Tu(),[o,i]=_.useState(e.apu||!1),[s,a]=_.useState(e.air||!1),[c,u]=_.useState(e.mc||!1),[f,p]=_.useState(e.k9||!1),[g,v]=_.useState(e.fto||!1),y=async()=>{n(!0),await me("setOfficerRoles",{citizenid:e.citizenid,roles:{apu:o,air:s,mc:c,k9:f,fto:g}},{data:!0,delay:500}),n(!1),r(w=>w.map(P=>P.citizenid===e.citizenid?{...e,apu:o,air:s,mc:c,k9:f,fto:g}:P)),ke.closeAll()};return h.jsxs(Je,{children:[h.jsxs("div",{style:{display:"flex",gap:15,alignItems:"center",justifyContent:"center"},children:[h.jsx(mr,{label:D.apu,checked:o,onChange:()=>{i(!o)}}),h.jsx(mr,{label:D.air,checked:s,onChange:()=>{a(!s)}}),h.jsx(mr,{label:D.mc,checked:c,onChange:()=>{u(!c)}}),h.jsx(mr,{label:D.k9,checked:f,onChange:()=>{p(!f)}}),h.jsx(mr,{label:D.fto,checked:g,onChange:()=>{v(!g)}})]}),h.jsx(st,{type:"submit",color:"gray",loading:t,variant:"light",onClick:y,children:D.confirm})]})},n$e=({officers:e,hasPermission:t})=>{const{setRosterOfficers:n}=Tu(),r=s=>s.charAt(0).toUpperCase()+s.slice(1),o=s=>{const a=pe(),c=pe(s),u=a.diff(c,"day");return r(u===0?D.today:u===1?D.yesterday:pe(s).fromNow())},i=e.map(s=>h.jsxs("tr",{children:[h.jsx("td",{children:h.jsxs(nt,{spacing:"sm",children:[h.jsx(kP,{size:55,src:s.image,radius:5}),h.jsx("div",{children:h.jsxs(W,{fz:"sm",fw:500,children:[s.firstname," ",s.lastname]})})]})}),h.jsx("td",{children:s.callsign}),h.jsx("td",{children:h.jsx(mr,{checked:s.apu,disabled:!0,styles:{input:{"&:disabled ":{backgroundColor:s.apu?"#1971c2":"#373A40"}}}})}),h.jsx("td",{children:h.jsx(mr,{checked:s.air,disabled:!0,styles:{input:{"&:disabled ":{backgroundColor:s.air?"#1971c2":"#373A40"}}}})}),h.jsx("td",{children:h.jsx(mr,{checked:s.mc,disabled:!0,styles:{input:{"&:disabled ":{backgroundColor:s.mc?"#1971c2":"#373A40"}}}})}),h.jsx("td",{children:h.jsx(mr,{checked:s.k9,disabled:!0,styles:{input:{"&:disabled ":{backgroundColor:s.k9?"#1971c2":"#373A40"}}}})}),h.jsx("td",{children:h.jsx(mr,{checked:s.fto,disabled:!0,styles:{input:{"&:disabled ":{backgroundColor:s.fto?"#1971c2":"#373A40"}}}})}),h.jsx("td",{children:s.lastActive?o(s.lastActive):""}),h.jsx("td",{children:h.jsx(et,{disabled:!0,icon:h.jsx(b8,{size:16}),variant:"unstyled",placeholder:s.title,size:"xs"})}),h.jsx("td",{children:h.jsx(nt,{spacing:2,position:"right",children:h.jsxs(It,{withinPortal:!0,withArrow:!0,position:"bottom-end",children:[h.jsx(It.Target,{children:h.jsx(Qe,{children:h.jsx(Fhe,{size:"1.2rem",stroke:1.5})})}),h.jsxs(It.Dropdown,{children:[h.jsx(It.Item,{icon:h.jsx(zhe,{size:20}),onClick:()=>ke.open({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.set_callsign}),children:h.jsx(QEe,{officer:s}),size:"xs",centered:!0}),children:D.set_callsign}),h.jsx(It.Item,{disabled:t,icon:h.jsx(ohe,{size:20}),onClick:()=>ke.open({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.set_rank}),centered:!0,size:"xs",children:h.jsx(e$e,{officer:s})}),children:D.set_rank}),h.jsx(It.Item,{disabled:t,icon:h.jsx(The,{size:20}),onClick:()=>ke.open({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.set_roles}),centered:!0,size:"sm",children:h.jsx(t$e,{officer:s})}),children:D.set_roles}),h.jsx(It.Item,{icon:h.jsx(Gf,{size:20}),color:"red",disabled:t,onClick:()=>ke.openConfirmModal({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.fire_officer}),children:h.jsx(W,{c:"dark.2",size:"sm",children:D.fire_officer_description.format(s.firstname,s.lastname)}),labels:{confirm:D.confirm,cancel:D.cancel},centered:!0,groupProps:{spacing:6},confirmProps:{color:"red"},onConfirm:async()=>{await me("fireOfficer",s.citizenid,{data:!0})&&(n(c=>c.filter(u=>u.citizenid!==s.citizenid)),ke.closeAll())}}),children:D.fire_officer})]})]})})})]},s.citizenid));return h.jsx(St,{h:735,children:h.jsxs(Zc,{verticalSpacing:"sm",children:[h.jsx("thead",{children:h.jsxs("tr",{children:[h.jsx("th",{children:D.officer}),h.jsx("th",{children:D.callsign}),h.jsx("th",{children:D.apu}),h.jsx("th",{children:D.air}),h.jsx("th",{children:D.mc}),h.jsx("th",{children:D.k9}),h.jsx("th",{children:D.fto}),h.jsx("th",{children:D.last_active}),h.jsx("th",{children:D.role}),h.jsx("th",{})]})}),h.jsx("tbody",{children:i})]})})},r$e=()=>{const{getRosterOfficers:e}=Tu(),[t,n]=_.useState(!1),r=Zl({initialValues:{citizenid:"",callsign:""}});return h.jsx("form",{onSubmit:r.onSubmit(async o=>{n(!0);const i=await me("hireOfficer",{citizenid:o.citizenid,callsign:o.callsign,lastActive:Date.now()},{data:!1,delay:500});if(n(!1),!i)return r.setFieldError("citizenid",D.citizen_id_already_hired);await e(),ke.closeAll()}),children:h.jsxs(Je,{children:[h.jsx(yn,{label:D.citizen_id,description:D.citizen_id_you_want_to_hire,required:!0,...r.getInputProps("citizenid")}),h.jsx(yn,{label:D.callsign,description:D.callsign_you_want_to_hire,required:!0,...r.getInputProps("callsign")}),h.jsx(st,{variant:"light",color:"gray",type:"submit",loading:t,children:D.confirm})]})})},o$e=()=>{const{rosterOfficers:e,getRosterOfficers:t}=Tu(),[n,r]=_.useState(""),[o,i]=_.useState(e),s=200,[a,c]=_.useState(n),[u,f]=_.useState(null),[p,g]=_.useState(!1),v=bo(w=>w.personalData.role);function y(w){return!(w==="Chief"||w==="Assistant Chief"||w==="Captain"||w==="Lieutenant"||w==="Sergeant")}return _.useEffect(()=>{u!==null&&clearTimeout(u),g(!0);const w=setTimeout(()=>{c(n),g(!1)},s);return f(w),()=>{clearTimeout(w)}},[n]),_.useEffect(()=>{if(a.trim()==="")i(e);else{const w=e.filter(P=>(P.firstname||"").toLocaleLowerCase().includes(n.toLocaleLowerCase())||(P.lastname||"").toLocaleLowerCase().includes(n.toLocaleLowerCase()));i(w)}},[a,e]),_.useEffect(()=>{g(!0),(async()=>await t())().then(()=>{g(!1)})},[]),h.jsxs("div",{className:"roster",children:[h.jsxs("div",{className:"roster-top",children:[h.jsxs("div",{children:[h.jsx(W,{style:{fontSize:12},weight:500,c:"dimmed",children:D.manage_roster}),h.jsx(W,{style:{fontSize:24,color:"white"},weight:500,children:D.roster})]}),h.jsxs("div",{className:"roster-top-right",style:{display:"flex",gap:15,alignItems:"center"},children:[h.jsxs(W,{style:{fontSize:13,textAlign:"center"},weight:500,c:"dimmed",children:[e.length," ",D.members]}),h.jsx(yn,{placeholder:D.search,variant:"filled",value:n,onChange:w=>r(w.target.value)}),h.jsx(st,{leftIcon:h.jsx(T8,{size:20}),style:{backgroundColor:"rgba(51, 124, 255, 0.2)",color:"rgba(159, 194, 255, 1)"},onClick:()=>ke.open({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.hire_officer}),centered:!0,size:"xs",children:h.jsx(r$e,{})}),disabled:y(v),children:D.hire_officer})]})]}),h.jsx("div",{className:"roster-list",children:p?h.jsx(Pr,{children:h.jsx(en,{})}):h.jsx(n$e,{officers:o,hasPermission:y(v)})})]})};const i$e=({charge:e})=>{const{setCharges:t}=Yf(),[n,r]=_.useState(!1),[o,i]=_.useState(e.fine),[s,a]=_.useState(e.time),[c,u]=_.useState(e.points),f=bo(v=>v.personalData.role);function p(v){return!(v==="Chief"||v==="Assistant Chief"||v==="Captain"||v==="Lieutenant"||v==="Sergeant")}const g=async()=>{r(!0),await me("editCharge",{chargelabel:e.label,fine:o,time:s,points:c},{data:!0})&&(r(!1),t(y=>{const w={...y};return Object.keys(y).forEach(P=>{w[P]=y[P].map(x=>x.label===e.label?{...e,fine:Number(o),time:Number(s),points:Number(c)}:x)}),w}),ke.closeAll())};return h.jsxs(Je,{children:[h.jsx(ma,{withAsterisk:!0,label:D.charge_fine,value:o,onChange:i,min:0,variant:"filled",placeholder:D.charge_fine,parser:v=>v.replace(/\$\s?|(,*)/g,""),formatter:v=>Number.isNaN(parseFloat(v))?"$ ":`$ ${v}`.replace(/\B(?{const{setCharges:t}=Yf(),n=bo(o=>o.personalData.role);function r(o){return!(o==="Chief"||o==="Assistant Chief"||o==="Captain"||o==="Lieutenant"||o==="Sergeant")}return h.jsxs("div",{className:"charges-charge-card",children:[h.jsx(W,{fz:"sm",fw:500,c:"white",style:{textAlign:"center"},children:e.label}),h.jsxs("div",{style:{display:"flex",gap:5,justifyContent:"center"},children:[h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,fontWeight:500},children:["$",e.fine," ",D.fine]}),h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,fontWeight:500},children:[e.time," ",D.months]}),h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,fontWeight:500},children:[e.points," ",D.points]})]}),h.jsx(At,{label:e.description,multiline:!0,withArrow:!0,color:"gray",children:h.jsx(W,{fz:"xs",fw:500,mt:2,style:{textAlign:"center",color:"white"},lineClamp:2,children:e.description})}),h.jsxs(nt,{position:"apart",style:{flex:"1"},children:[h.jsx(mt,{radius:"xs",variant:"filled",style:{fontSize:10,padding:12.5,fontWeight:500},color:e.type.toLocaleLowerCase()==="felony"?"red":e.type.toLocaleLowerCase()==="infraction"?"green":"yellow",children:e.type.charAt(0).toUpperCase()+e.type.slice(1)}),h.jsxs("div",{style:{display:"flex",gap:5,alignItems:"center"},children:[h.jsx(Qe,{variant:"light",disabled:r(n),onClick:()=>{ke.openConfirmModal({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.delete_charge}),size:"sm",centered:!0,labels:{confirm:D.confirm,cancel:D.cancel},groupProps:{spacing:6},confirmProps:{color:"red"},onConfirm:async()=>{await me("deleteCharge",{label:e.label},{data:1})&&t(i=>{const s={};return Object.keys(i).forEach(a=>{s[a]=i[a].filter(c=>c.label!==e.label)}),s})},children:h.jsx(W,{size:"sm",c:"dark.2",children:D.delete_charge_confirm.format(e.label)})})},children:h.jsx(A0,{size:16,color:r(n)?"gray":"white"})}),h.jsx(st,{disabled:r(n),color:"gray",compact:!0,onClick:()=>ke.open({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.edit_charge}),centered:!0,size:"sm",children:h.jsx(i$e,{charge:e})}),children:D.edit})]})]})]})},a$e=()=>{const{charges:e,setCharges:t}=Yf(),n=bo(E=>E.personalData.role),[r,o]=_.useState(""),[i,s]=_.useState(""),[a,c]=_.useState(""),[u,f]=_.useState(0),[p,g]=_.useState(0),[v,y]=_.useState(0),[w,P]=_.useState("infraction");function x(E){return!(E==="Chief"||E==="Assistant Chief"||E==="Captain"||E==="Lieutenant"||E==="Sergeant")}const S=E=>E.sort(($,N)=>{const I={infraction:1,misdemeanor:2,felony:3};return I[$.type]-I[N.type]}),O=async()=>{r.length<3||i.length<3||a.length<2||u===""||u<=0||w.length<3||(at()?t(E=>{const $={...E};return $[a].push({label:r,description:i,fine:u,time:Number(p),points:Number(v),type:w}),$}):(await me("createCharge",{label:r,description:i,category:a,fine:u,time:p,points:v,type:w},{data:1}),t(E=>{const $={...E};return $[a].push({label:r,description:i,fine:u,time:Number(p),points:Number(v),type:w}),$})),o(""),s(""),c(""),f(0),g(0),y(0),P("infraction"))};return h.jsxs("div",{className:"charges",children:[h.jsx("div",{className:"top-side-create-charges",children:h.jsxs("div",{className:"charges-create",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.create_charge}),h.jsxs("div",{className:"charges-create-content",children:[h.jsx(yn,{withAsterisk:!0,label:D.charge_label,variant:"filled",placeholder:D.charge_label,value:r,onChange:E=>o(E.target.value),w:200,disabled:x(n)}),h.jsx(yn,{withAsterisk:!0,label:D.charge_description,variant:"filled",placeholder:D.charge_description,value:i,onChange:E=>s(E.target.value),w:250,disabled:x(n)}),h.jsx(Nl,{withAsterisk:!0,label:D.charge_category,placeholder:D.charge_category,variant:"filled",data:[{value:"OFFENSES AGAINST PERSONS",label:"OFFENSES AGAINST PERSONS"},{value:"OFFENSES INVOLVING THEFT",label:"OFFENSES INVOLVING THEFT"},{value:"OFFENSES INVOLVING FRAUD",label:"OFFENSES INVOLVING FRAUD"},{value:"OFFENSES INVOLVING DAMAGE TO PROPERTY",label:"OFFENSES INVOLVING DAMAGE TO PROPERTY"},{value:"OFFENSES AGAINST PUBLIC ADMINISTRATION",label:"OFFENSES AGAINST PUBLIC ADMINISTRATION"},{value:"OFFENSES AGAINST PUBLIC ORDER",label:"OFFENSES AGAINST PUBLIC ORDER"},{value:"OFFENSES AGAINST HEALTH AND MORALS",label:"OFFENSES AGAINST HEALTH AND MORALS"},{value:"OFFENSES AGAINST PUBLIC SAFETY",label:"OFFENSES AGAINST PUBLIC SAFETY"},{value:"OFFENSES INVOLVING THE OPERATION OF A VEHICLE",label:"OFFENSES INVOLVING THE OPERATION OF A VEHICLE"},{value:"OFFENSES INVOLVING THE WELL-BEING OF WILDLIFE",label:"OFFENSES INVOLVING THE WELL-BEING OF WILDLIFE"}],value:a,onChange:E=>c(E),w:275,disabled:x(n)}),h.jsx(ma,{withAsterisk:!0,label:D.charge_fine,value:u,onChange:f,min:0,variant:"filled",placeholder:D.charge_fine,w:140,parser:E=>E.replace(/\$\s?|(,*)/g,""),formatter:E=>Number.isNaN(parseFloat(E))?"$ ":`$ ${E}`.replace(/\B(?P(E)})]}),h.jsx("div",{className:"charges-create-buttons",children:h.jsx(st,{color:"green",disabled:x(n),onClick:O,children:D.create})})]})}),h.jsx(St,{h:700,scrollbarSize:4,children:h.jsx("div",{className:"charges-all-charges",children:h.jsx("div",{className:"charges-category",children:Object.entries(e).map(([E,$])=>h.jsxs("div",{children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:E}),h.jsx("div",{className:"charges-cards-row",children:S($).map(N=>h.jsx(s$e,{charge:N},N.label))})]},E))})})})]})};const l$e=ue(e=>({header:{position:"sticky",top:-1,backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,transition:"box-shadow 150ms ease","&::after":{content:'""',position:"absolute",left:0,right:0,bottom:0,borderBottom:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[2]}`}},scrolled:{boxShadow:e.shadows.sm}})),c$e=[{code:"10-0",description:"Mistet mistænkte af syne"},{code:"10-3",description:"Stop radio transmission"},{code:"10-4",description:"Modtaget"},{code:"10-6",description:"Ikke tilgængelig"},{code:"10-7",description:"Off-Duty"},{code:"10-8",description:"On-duty"},{code:"10-9",description:"Gentag"},{code:"10-10",description:"Skift radio frekvens"},{code:"10-13",description:"Skud affyret"},{code:"10-14",description:"Stolen numberplate"},{code:"10-15",description:"Igangværende biltyveri"},{code:"10-16",description:"Brug for persontransport"},{code:"10-19",description:"Kører tilbage til stationen"},{code:"10-20",description:"Position"},{code:"10-22",description:"Ignorer sidste signal"},{code:"10-23",description:"Ankommet til _____"},{code:"10-25",description:"Mangler køremakker"},{code:"10-26",description:"Person i varetægt"},{code:"10-28",description:"Tjek MDT for oplysninger"},{code:"10-37",description:"Afvent"},{code:"10-38",description:"Trafikstop"},{code:"10-39",description:"Mistænkelig adfærd"},{code:"10-43",description:"Kald en læge"},{code:"10-50",description:"Færdselsuheld"},{code:"10-51",description:"Totalskadet køretøj"},{code:"10-56",description:"Butiks-/juvelrøveri"},{code:"10-66",description:"Husrøveri"},{code:"10-76",description:"På vej til"},{code:"10-77",description:"Ankomsttid / ETA"},{code:"10-78",description:"Brug for assistance"},{code:"10-80",description:"Biljagt"},{code:"10-81",description:"Jagt til fods"},{code:"10-85",description:"Helikopter enhed"},{code:"10-89",description:"Betjent nede"},{code:"10-90",description:"Bankrøveri"},{code:"10-92",description:"Oil Rig Angreb"},{code:"10-98",description:"Fængselsudbrud"},{code:"10-99",description:"Efterlyst person"},{code:"10-101",description:"Status"}],u$e=[{code:"Code 1",description:"Almindelig kørsel"},{code:"Code 2",description:"Kørsel med lys"},{code:"Code 3",description:"Kørsel med lys & sirene"},{code:"Code 4",description:"Alt under kontrol"},{code:"Code 5",description:"Felony stop"}],d$e=[{code:"Kode rød",description:"Stop med nødvendig force"},{code:"Kode orange",description:"Pit tilladt hvis muligt"},{code:"Kode grøn",description:"Følg efter personen"},{code:"Ocean king",description:"Besvarer 10-101"},{code:"Signal 100",description:"Alt radio kommunikation stoppes"}],f$e=()=>{const{classes:e,cx:t}=l$e(),[n,r]=_.useState(!1),o=c$e.map(a=>h.jsxs("tr",{children:[h.jsx("td",{children:a.code}),h.jsx("td",{children:a.description})]},a.code)),i=u$e.map(a=>h.jsxs("tr",{children:[h.jsx("td",{children:a.code}),h.jsx("td",{children:a.description})]},a.code)),s=d$e.map(a=>h.jsxs("tr",{children:[h.jsx("td",{children:a.code}),h.jsx("td",{children:a.description})]},a.code));return h.jsxs("div",{className:"codes-and-command",children:[h.jsxs("div",{className:"codes-and-command-background",children:[h.jsx(W,{color:"white",size:"md",weight:600,children:"10 Codes"}),h.jsx(St,{h:800,onScrollPositionChange:({y:a})=>r(a!==0),children:h.jsxs(Zc,{striped:!0,withBorder:!0,children:[h.jsx("thead",{className:t(e.header,{[e.scrolled]:n}),children:h.jsxs("tr",{children:[h.jsx("th",{children:"Code"}),h.jsx("th",{children:"Description"})]})}),h.jsx("tbody",{children:o})]})})]}),h.jsxs("div",{className:"codes-and-command-extra",children:[h.jsxs("div",{className:"command-background",children:[h.jsx(W,{color:"white",size:"md",weight:600,children:"Codes Meaning"}),h.jsx(St,{h:300,children:h.jsxs(Zc,{striped:!0,withBorder:!0,children:[h.jsx("thead",{className:t(e.header),children:h.jsxs("tr",{children:[h.jsx("th",{children:"Codes"}),h.jsx("th",{children:"Meaning"})]})}),h.jsx("tbody",{children:i})]})})]}),h.jsxs("div",{className:"command-background",children:[h.jsx(W,{color:"white",size:"md",weight:600,children:"Codes Color Meaning"}),h.jsx(St,{h:300,children:h.jsxs(Zc,{striped:!0,withBorder:!0,children:[h.jsx("thead",{className:t(e.header),children:h.jsxs("tr",{children:[h.jsx("th",{children:"Color Codes"}),h.jsx("th",{children:"Meaning"})]})}),h.jsx("tbody",{children:s})]})})]})]})]})};var zx={exports:{}};/* @preserve +`);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[Sx({find:eOe,type:this.type,getAttributes:e=>({language:e[1]})}),Sx({find:tOe,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new Zr({key:new zi("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(Ve.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}}})]}}),rOe=Gr.create({name:"doc",topNode:!0,content:"block+"});function oOe(e={}){return new Zr({view(t){return new iOe(t,e)}})}class iOe{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=h7(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 sOe=br.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[oOe(this.options)]}});class Kt extends Ze{constructor(t){super(t,t)}map(t,n){let r=t.resolve(n.map(this.head));return Kt.valid(r)?new Kt(r):Ze.near(r)}content(){return ye.empty}eq(t){return t instanceof Kt&&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 Kt(t.resolve(n.pos))}getBookmark(){return new xO(this.anchor)}static valid(t){let n=t.parent;if(n.isTextblock||!aOe(t)||!lOe(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&&Kt.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(Kt.valid(c))return c}for(;;){let s=n>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!Le.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(Kt.valid(a))return a}return null}}}Kt.prototype.visible=!1;Kt.findFrom=Kt.findGapCursorFrom;Ze.jsonID("gapcursor",Kt);class xO{constructor(t){this.pos=t}map(t){return new xO(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return Kt.valid(n)?new Kt(n):Ze.near(n)}}function aOe(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 lOe(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 cOe(){return new Zr({props:{decorations:pOe,createSelectionBetween(e,t,n){return t.pos==n.pos&&Kt.valid(n)?new Kt(n):null},handleClick:dOe,handleKeyDown:uOe,handleDOMEvents:{beforeinput:fOe}}})}const uOe=Q7({ArrowLeft:fh("horiz",-1),ArrowRight:fh("horiz",1),ArrowUp:fh("vert",-1),ArrowDown:fh("vert",1)});function fh(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 Ve){if(!i.endOfTextblock(n)||a.depth==0)return!1;c=!1,a=r.doc.resolve(t>0?a.after():a.before())}let u=Kt.findGapCursorFrom(a,t,c);return u?(o&&o(r.tr.setSelection(new Kt(u))),!0):!1}}function dOe(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!Kt.valid(r))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&Le.isSelectable(e.state.doc.nodeAt(o.inside))?!1:(e.dispatch(e.state.tr.setSelection(new Kt(r))),!0)}function fOe(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof Kt))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(Ve.near(i.doc.resolve(n.pos+1))),e.dispatch(i),!1}function pOe(e){if(!(e.selection instanceof Kt))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",gn.create(e.doc,[jo.widget(e.selection.head,t,{key:"gapcursor"})])}const hOe=br.create({name:"gapCursor",addProseMirrorPlugins(){return[cOe()]},extendNodeSchema(e){var t;const n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=Ue(Ce(e,"allowGapCursor",n)))!==null&&t!==void 0?t:null}}}),mOe=Gr.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",kt(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(g=>a.includes(g.type.name));u.ensureMarks(p)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),gOe=Gr.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]}`,kt(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=>Sx({find:new RegExp(`^(#{1,${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}});var yy=200,$n=function(){};$n.prototype.append=function(t){return t.length?(t=$n.from(t),!this.length&&t||t.length=n?$n.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};$n.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};$n.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)};$n.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};$n.from=function(t){return t instanceof $n?t:t&&t.length?new Z9(t):$n.empty};var Z9=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<=yy)return new t(this.values.concat(o.flatten()))},t.prototype.leafPrepend=function(o){if(this.length+o.length<=yy)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}($n);$n.empty=new Z9([]);var vOe=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}($n);const yOe=500;class qo{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,g)=>{if(!p.step){o||(o=this.remapping(r,g+1),i=o.maps.length),i--,f.push(p);return}if(o){f.push(new _i(p.map));let v=p.step.map(o.slice(i)),y;v&&s.maybeStep(v).doc&&(y=s.mapping.maps[s.mapping.maps.length-1],u.push(new _i(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 qo(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;fwOe&&(a=_Oe(a,u),s-=u),new qo(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 qo(this.items.append(t.map(n=>new _i(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(g=>{g.selection&&a--},o);let c=n;this.items.forEach(g=>{let v=i.getMirror(--c);if(v==null)return;s=Math.min(s,v);let y=i.maps[v];if(g.step){let w=t.steps[v].invert(t.docs[v]),P=g.selection&&g.selection.map(i.slice(c+1,v));P&&a++,r.push(new _i(y,w,P))}else r.push(new _i(y))},o);let u=[];for(let g=n;gyOe&&(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 _i(u.invert(),c,f),g,v=o.length-1;(g=o.length&&o[v].merge(p))?o[v]=g:o.push(p)}}else s.map&&r--},this.items.length,0),new qo($n.from(o.reverse()),i)}}qo.empty=new qo($n.empty,0);function _Oe(e,t){let n;return e.forEach((r,o)=>{if(r.selection&&t--==0)return n=o,!1}),e.slice(n)}class _i{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 _i(n.getMap().invert(),n,this.selection)}}}class Us{constructor(t,n,r,o,i){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}}const wOe=20;function bOe(e,t,n,r){let o=n.getMeta(wa),i;if(o)return o.historyState;n.getMeta(SOe)&&(e=new Us(e.done,e.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(s&&s.getMeta(wa))return s.getMeta(wa).redo?new Us(e.done.addTransform(n,void 0,r,tm(t)),e.undone,YI(n.mapping.maps[n.steps.length-1]),e.prevTime,e.prevComposition):new Us(e.done,e.undone.addTransform(n,void 0,r,tm(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),c=e.prevTime==0||!s&&e.prevComposition!=a&&(e.prevTime<(n.time||0)-r.newGroupDelay||!xOe(n,e.prevRanges)),u=s?Sw(e.prevRanges,n.mapping):YI(n.mapping.maps[n.steps.length-1]);return new Us(e.done.addTransform(n,c?t.selection.getBookmark():void 0,r,tm(t)),qo.empty,u,n.time,a??e.prevComposition)}else return(i=n.getMeta("rebased"))?new Us(e.done.rebased(n,i),e.undone.rebased(n,i),Sw(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new Us(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),Sw(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function xOe(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 YI(e){let t=[];return e.forEach((n,r,o,i)=>t.push(o,i)),t}function Sw(e,t){if(!e)return null;let n=[];for(let r=0;r{let n=wa.getState(e);return!n||n.done.eventCount==0?!1:(t&&G9(n,e,t,!1),!0)},K9=(e,t)=>{let n=wa.getState(e);return!n||n.undone.eventCount==0?!1:(t&&G9(n,e,t,!0),!0)},OOe=br.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>Y9(e,t),redo:()=>({state:e,dispatch:t})=>K9(e,t)}},addProseMirrorPlugins(){return[POe(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-Z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-Y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Shift-Mod-Z":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),COe=Gr.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",kt(this.options.HTMLAttributes,e)]},addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{const{$to:n}=t.selection,r=e();return n.parentOffset===0?r.insertContentAt(Math.max(n.pos-2,0),{type:this.name}):r.insertContent({type:this.name}),r.command(({tr:o,dispatch:i})=>{var s;if(i){const{$to:a}=o.selection,c=a.end();if(a.nodeAfter)a.nodeAfter.isTextblock?o.setSelection(Ve.create(o.doc,a.pos+1)):a.nodeAfter.isBlock?o.setSelection(Le.create(o.doc,a.pos)):o.setSelection(Ve.create(o.doc,a.pos));else{const u=(s=a.parent.type.contentMatch.defaultType)===null||s===void 0?void 0:s.create();u&&(o.insert(c,u),o.setSelection(Ve.create(o.doc,c+1)))}o.scrollIntoView()}return!0}).run()}}},addInputRules(){return[p9({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),kOe=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,EOe=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,$Oe=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,MOe=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,NOe=or.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",kt(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[Ll({find:kOe,type:this.type}),Ll({find:$Oe,type:this.type})]},addPasteRules(){return[ka({find:EOe,type:this.type}),ka({find:MOe,type:this.type})]}}),TOe=Gr.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",kt(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)}}}),IOe=Gr.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",kt(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)}}}),qI=or.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["span",kt(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=Xf(e,this.type);return Object.entries(n).some(([,o])=>!!o)?!0:t.unsetMark(this.name)}}}}),JI=/^(\d+)\.\s$/,jOe=Gr.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",kt(this.options.HTMLAttributes,n),0]:["ol",kt(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(IOe.name,this.editor.getAttributes(qI.name)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=bf({find:JI,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=bf({find:JI,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(qI.name)}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1],editor:this.editor})),[e]}}),LOe=Gr.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",kt(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),DOe=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,ROe=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,zOe=or.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",kt(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(){const e={};return dO()?e["Mod-Shift-s"]=()=>this.editor.commands.toggleStrike():e["Ctrl-Shift-s"]=()=>this.editor.commands.toggleStrike(),e},addInputRules(){return[Ll({find:DOe,type:this.type})]},addPasteRules(){return[ka({find:ROe,type:this.type})]}}),AOe=Gr.create({name:"text",group:"inline"}),q9=br.create({name:"starterKit",addExtensions(){var e,t,n,r,o,i,s,a,c,u,f,p,g,v,y,w,P,x;const S=[];return this.options.blockquote!==!1&&S.push(HPe.configure((e=this.options)===null||e===void 0?void 0:e.blockquote)),this.options.bold!==!1&&S.push(YPe.configure((t=this.options)===null||t===void 0?void 0:t.bold)),this.options.bulletList!==!1&&S.push(qPe.configure((n=this.options)===null||n===void 0?void 0:n.bulletList)),this.options.code!==!1&&S.push(QPe.configure((r=this.options)===null||r===void 0?void 0:r.code)),this.options.codeBlock!==!1&&S.push(nOe.configure((o=this.options)===null||o===void 0?void 0:o.codeBlock)),this.options.document!==!1&&S.push(rOe.configure((i=this.options)===null||i===void 0?void 0:i.document)),this.options.dropcursor!==!1&&S.push(sOe.configure((s=this.options)===null||s===void 0?void 0:s.dropcursor)),this.options.gapcursor!==!1&&S.push(hOe.configure((a=this.options)===null||a===void 0?void 0:a.gapcursor)),this.options.hardBreak!==!1&&S.push(mOe.configure((c=this.options)===null||c===void 0?void 0:c.hardBreak)),this.options.heading!==!1&&S.push(gOe.configure((u=this.options)===null||u===void 0?void 0:u.heading)),this.options.history!==!1&&S.push(OOe.configure((f=this.options)===null||f===void 0?void 0:f.history)),this.options.horizontalRule!==!1&&S.push(COe.configure((p=this.options)===null||p===void 0?void 0:p.horizontalRule)),this.options.italic!==!1&&S.push(NOe.configure((g=this.options)===null||g===void 0?void 0:g.italic)),this.options.listItem!==!1&&S.push(TOe.configure((v=this.options)===null||v===void 0?void 0:v.listItem)),this.options.orderedList!==!1&&S.push(jOe.configure((y=this.options)===null||y===void 0?void 0:y.orderedList)),this.options.paragraph!==!1&&S.push(LOe.configure((w=this.options)===null||w===void 0?void 0:w.paragraph)),this.options.strike!==!1&&S.push(zOe.configure((P=this.options)===null||P===void 0?void 0:P.strike)),this.options.text!==!1&&S.push(AOe.configure((x=this.options)===null||x===void 0?void 0:x.text)),S}}),J9=or.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",kt(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()}}}),X9=br.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")}}}),Q9=or.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",kt(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()}}}),eB=or.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",kt(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()}}}),BOe=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,tB=Gr.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",kt(this.options.HTMLAttributes,e)]},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[p9({find:BOe,type:this.type,getAttributes:e=>{const[,,t,n,r]=e;return{src:n,alt:t,title:r}}})]}}),nB=or.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["span",kt(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=Xf(e,this.type);return Object.entries(n).some(([,o])=>!!o)?!0:t.unsetMark(this.name)}}}}),rB=br.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()}}}),FOe=ue({saveButton:{position:"absolute",top:5,right:5,zIndex:99}}),ep=({content:e="

",onChange:t,styles:n,contentAreaStyle:r,onSave:o})=>{const{classes:i}=FOe(),[s,a]=_.useState(!1),c=h9({content:e,extensions:[q9,J9,W9,Q9,eB,U9,rB,nB,tB,X9.configure({types:["heading","paragraph"]})]});return _.useEffect(()=>{c?.commands.setContent(e,!0)},[e]),_.useEffect(()=>{if(t&&t(c?.getHTML()),!o)return;const u=setTimeout(()=>{c?.getHTML()!==e?a(!0):a(!1)},500);return()=>clearTimeout(u)},[c?.getHTML()]),h.jsx(h.Fragment,{children:h.jsxs(Ee,{editor:c,styles:n,style:{borderRadius:2},children:[h.jsxs(Ee.Toolbar,{sticky:!0,children:[h.jsxs(Ee.ControlsGroup,{children:[h.jsx(Ee.Bold,{}),h.jsx(Ee.Italic,{}),h.jsx(Ee.Underline,{}),h.jsx(Ee.Strikethrough,{}),h.jsx(Ee.ClearFormatting,{}),h.jsx(Ee.Highlight,{})]}),h.jsxs(Ee.ControlsGroup,{children:[h.jsx(Ee.Hr,{}),h.jsx(Ee.BulletList,{}),h.jsx(Ee.OrderedList,{})]}),h.jsxs(Ee.ControlsGroup,{children:[h.jsx(Ee.Link,{}),h.jsx(Ee.Unlink,{})]}),h.jsxs(Ee.ControlsGroup,{children:[h.jsx(Ee.AlignLeft,{}),h.jsx(Ee.AlignCenter,{}),h.jsx(Ee.AlignJustify,{}),h.jsx(Ee.AlignRight,{})]}),h.jsx(Ee.ControlsGroup,{children:h.jsx(Ee.ColorPicker,{colors:["#25262b","#868e96","#fa5252","#e64980","#be4bdb","#7950f2","#4c6ef5","#228be6","#15aabf","#12b886","#40c057","#82c91e","#fab005","#fd7e14"]})})]}),c&&h.jsxs(At,{style:r,children:[h.jsx(Os,{mounted:!!(s&&o),transition:"slide-down",children:u=>h.jsx(Qe,{style:u,className:i.saveButton,color:"dark",variant:"default",size:26,onClick:()=>{a(!1),o&&o(c?.getHTML())},children:h.jsx(O8,{size:20})})}),h.jsx(Ee.Content,{})]})]})})},VOe=[{contents:"Dsadaasd Hello there buddy, this is a message from the server.",id:1,playerId:1,position:[0,0,0],callsign:132,firstname:"Fdsadas",lastname:"DSasd",citizenid:"dsadas",image:"https://cdn.vectorstock.com/i/preview-1x/97/68/account-avatar-dark-mode-glyph-ui-icon-vector-44429768.jpg",createdAt:Date.now()-3e5},{contents:"Dsadaasd Hello there buddy, this is a message from the server.",id:2,playerId:1,position:[0,0,0],callsign:132,firstname:"Fdsadas",lastname:"DSasd",citizenid:"dsadas",image:"https://cdn.vectorstock.com/i/preview-1x/97/68/account-avatar-dark-mode-glyph-ui-icon-vector-44429768.jpg",createdAt:Date.now()-9e5},{contents:"Dsadaasd Hello there buddy, this is a message from the server.",id:3,playerId:1,position:[0,0,0],callsign:132,firstname:"Fdsadas",lastname:"DSasd",citizenid:"dsadas",image:"https://cdn.vectorstock.com/i/preview-1x/97/68/account-avatar-dark-mode-glyph-ui-icon-vector-44429768.jpg",createdAt:Date.now()-12e20},{contents:"Dsadaasd Hello there buddy",id:4,playerId:1,position:[0,0,0],callsign:132,firstname:"fad",lastname:"DSasd",citizenid:"dsadas",image:"https://cdn.vectorstock.com/i/preview-1x/97/68/account-avatar-dark-mode-glyph-ui-icon-vector-44429768.jpg",createdAt:Date.now()},{contents:"Dsadaasd Hello there buddy",id:5,playerId:1,position:[0,0,0],callsign:132,firstname:"fad",lastname:"DSasd",citizenid:"dsadas",image:"https://cdn.vectorstock.com/i/preview-1x/97/68/account-avatar-dark-mode-glyph-ui-icon-vector-44429768.jpg",createdAt:Date.now()}],SO=tn(e=>({announcements:[],fetchAnnouncements:async()=>{if(at())e({announcements:[...VOe]});else{const t=await me("getAnnouncements");e({announcements:[...t.announcements]})}}})),HOe=()=>{const{fetchAnnouncements:e}=SO(s=>({fetchAnnouncements:s.fetchAnnouncements})),[t,n]=_.useState(!1),[r,o]=_.useState(""),i=async()=>{if(!at()){if(n(!0),!await me("createAnnouncement",{contents:r}))return;e(),n(!1)}ke.closeAll()};return h.jsxs(Je,{h:400,style:{flex:"0 0 43.5rem"},children:[h.jsx(ep,{content:"",onChange:s=>o(s||""),styles:{content:{backgroundColor:"#1A1B1E"},toolbar:{backgroundColor:"#2C2E33"},controlsGroup:{pointerEvents:"auto",backgroundColor:"#282828"}},contentAreaStyle:{height:270,width:406,padding:0}}),h.jsx(st,{variant:"light",color:"gray",fullWidth:!0,onClick:()=>i(),loading:t,children:D.create})]})},WOe=e=>{const t=h9({extensions:[q9,J9,W9,Q9,eB,U9,rB,nB,tB,X9],content:e.contents,editable:!1});return h.jsx(Je,{children:h.jsx(Ee,{editor:t,children:h.jsx(Ee.Content,{})})})};pe.extend(F8);const oB=({announcement:e})=>{const t=`

${e.contents}

`;function n(r){return r.replace(/<\/?[^>]+(>|$)/g,"")}return h.jsxs("div",{className:"announcement-list-card",onClick:()=>{ke.open({title:h.jsxs(U,{style:{fontSize:16,color:"white"},weight:500,children:[`${e.firstname} ${e.lastname}`," |"," ",pe(e.createdAt).fromNow()]}),centered:!0,children:h.jsx(WOe,{contents:t})})},children:[h.jsx(nt,{position:"apart",children:h.jsxs(nt,{children:[h.jsx(CP,{color:"blue",src:e.image}),h.jsxs(Je,{spacing:0,children:[h.jsx(U,{fw:500,c:"white",children:`${e.firstname} ${e.lastname}`}),h.jsx(U,{size:"xs",c:"dark.2",children:pe(e.createdAt).fromNow()})]})]})}),h.jsx(U,{c:"gray.4",size:"sm",lineClamp:1,children:n(t)})]})},UOe=()=>{const{announcements:e}=SO(n=>({announcements:n.announcements})),t=[...e].sort((n,r)=>Number(new Date(r.createdAt))-Number(new Date(n.createdAt)));return h.jsx(At,{h:600,children:h.jsx("div",{className:"announcement-card-content",children:t.length>0?t.map(n=>h.jsx(oB,{announcement:n},n.id)):h.jsx(U,{color:"dimmed",size:"xs",children:D.no_announcements_found})})})},ZOe=()=>{const{announcements:e,fetchAnnouncements:t}=SO(a=>({announcements:a.announcements,fetchAnnouncements:a.fetchAnnouncements})),[n,r]=_.useState(!1),{role:o}=bo(a=>a.personalData);function i(a){return!(a==="Chief"||a==="Assistant Chief"||a==="Captain"||a==="Lieutenant"||a==="Sergeant")}const s=[...e].sort((a,c)=>Number(new Date(c.createdAt))-Number(new Date(a.createdAt))).slice(0,3);return _.useEffect(()=>{r(!0),(async()=>await t())().then(()=>{r(!1)})},[]),h.jsxs("div",{className:"card-background",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(U,{style:{fontSize:17,color:"white"},weight:500,children:D.announcements}),h.jsxs("div",{className:"card-title-icons",children:[h.jsx(zt,{label:D.create_announcement,withArrow:!0,color:"gray",position:"bottom",children:h.jsx(Qe,{variant:"light",color:"dark",disabled:i(o),onClick:()=>{ke.open({title:h.jsx(U,{style:{fontSize:16,color:"white"},weight:500,children:D.create_announcement}),centered:!0,children:h.jsx(HOe,{})})},children:h.jsx(ku,{size:16,color:"white"})})}),h.jsx(zt,{label:D.view_all,withArrow:!0,color:"gray",position:"bottom",children:h.jsx(Qe,{variant:"light",color:"dark",onClick:()=>{ke.open({title:h.jsx(U,{style:{fontSize:16,color:"white"},weight:500,children:D.all_announcements}),centered:!0,children:h.jsx(UOe,{})})},children:h.jsx($he,{size:16,color:"white"})})}),h.jsx(Vhe,{size:M(25),color:"white"})]})]}),h.jsx(Ye,{mt:5,mb:5}),h.jsx("div",{className:"announcement-card-content",children:n?h.jsx(Pr,{h:"100%",children:h.jsx(en,{})}):s.length>0?s.map(a=>h.jsx(oB,{announcement:a},a.id)):h.jsx(U,{color:"dimmed",size:"xs",children:D.no_announcements_found})})]})},GOe=[{citizenid:"AF30442",firstname:"Billy",lastname:"Bob",incidentid:3,expiresAt:Date.now(),image:"https://i.imgur.com/dqopYB9b.jpg"},{citizenid:"AF30442",firstname:"Billy",lastname:"Bob",incidentid:3,expiresAt:Date.now(),image:"https://i.imgur.com/dqopYB9b.jpg"},{citizenid:"AF30442",firstname:"Billy",lastname:"Bob",incidentid:3,expiresAt:Date.now(),image:"https://i.imgur.com/dqopYB9b.jpg"},{citizenid:"AF30442",firstname:"Billy",lastname:"Bob",incidentid:3,expiresAt:Date.now(),image:"https://i.imgur.com/dqopYB9b.jpg"},{citizenid:"AF30442",firstname:"Billy",lastname:"Bob",incidentid:3,expiresAt:Date.now(),image:"https://i.imgur.com/dqopYB9b.jpg"},{citizenid:"AF30442",firstname:"Billy",lastname:"Bob",incidentid:3,expiresAt:Date.now(),image:"https://i.imgur.com/dqopYB9b.jpg"}],YOe=tn(e=>({warrants:at()?GOe:[],getWarrants:async()=>{try{const t=await me("getWarrants");return e({warrants:t}),{warrants:t}}catch(t){return console.error("Failed to fetch recent activities:",t),{warrants:[]}}},setWarrants:t=>e({warrants:t})})),KOe=()=>{const{warrants:e,getWarrants:t}=YOe(),[n,r]=_.useState(!1),o=Ul(),{setActiveIncident:i,setIncidentActive:s}=Ur();return _.useEffect(()=>{r(!0),(async()=>{t()})().then(()=>{r(!1)})},[]),h.jsxs("div",{className:"card-background",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(U,{style:{fontSize:17,color:"white"},weight:500,children:D.active_warrants}),h.jsx(Yhe,{size:M(25),color:"white"})]}),h.jsx(Ye,{mt:5,mb:5}),h.jsx(At,{h:290,children:h.jsx("div",{className:"warrants-card-content",children:n?h.jsx(Pr,{h:"100%",children:h.jsx(en,{})}):e.length>0?e.map(a=>h.jsx(nt,{position:"apart",className:"warrants-card",onClick:async()=>{if(at())return;const c=await me("getIncident",a.incidentid);i(c),s(!0),o("/incidents")},children:h.jsxs(nt,{children:[h.jsx(CP,{color:"blue",src:a.image}),h.jsxs(Je,{spacing:0,children:[h.jsx(U,{fw:500,c:"white",children:`${a.firstname} ${a.lastname}`}),h.jsxs(U,{size:"xs",c:"dark.2",children:[D.expires_in,":"," ",pe().to(a.expiresAt,!0)]})]})]})})):h.jsx(U,{color:"dimmed",size:"xs",children:D.no_warrants_found})})})]})},yu=e=>e?Object.entries(e).map(t=>({id:+t[0],...t[1]})):[],qOe=e=>Array.isArray(e)?e.map(t=>({...t,units:yu(t.units)})):Object.entries(e).map(t=>{const n={...t[1],units:[]};return n.units=yu(t[1].units),n}),_d=e=>e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1),JOe=[{id:1,time:Date.now(),location:"Somewhere",coords:[350,350],linked:!1,offense:"Bank robbery",code:"10-29",blip:162,units:[{name:"Unit 132",type:"car",members:[{firstname:"Billy",lastname:"Bob",callsign:132,citizenid:"321553",playerId:1,position:[0,0,0]}],id:132},{name:"Unit 322",type:"heli",members:[{firstname:"Marc",lastname:"Marshall",callsign:322,citizenid:"451503",playerId:1,position:[0,0,0]}],id:322}]},{id:2,time:Date.now(),location:"Somewhere",info:[{label:"Sultan RS",icon:"gun"},{label:"XYZ 123",icon:"badge-tm"}],coords:[255,150],blip:51,linked:!1,offense:"Officer Down",code:"10-13",units:[{name:"Unit 132",type:"car",members:[{firstname:"Billy",lastname:"Bob",callsign:132,citizenid:"311342",playerId:1,position:[0,0,0]},{firstname:"Martin",lastname:"Contreras",callsign:521,citizenid:"912132",playerId:1,position:[0,0,0]}],id:132},{name:"Unit 823",type:"heli",members:[{firstname:"Bobby",lastname:"Hopkins",callsign:823,citizenid:"100341",playerId:1,position:[0,0,0]}],id:823},{name:"Unit 531",type:"motor",members:[{firstname:"Connor",lastname:"Collins",callsign:531,citizenid:"913213",playerId:1,position:[0,0,0]}],id:531},{name:"Unit 274",type:"boat",members:[{firstname:"Corey",lastname:"Hayes",callsign:274,citizenid:"920132",playerId:1,position:[0,0,0]}],id:274}]},{id:3,time:Date.now(),location:"Somewhere",coords:[500,750],linked:!1,blip:310,offense:"Officer Down",code:"10-13",units:[{name:"Unit 1",type:"car",members:[{firstname:"Billy",lastname:"bob",callsign:132,citizenid:"913213",playerId:1,position:[0,0,0]}],id:136},{name:"Unit 6",type:"heli",members:[{firstname:"Freddie",lastname:"Reid",callsign:823,citizenid:"920132",playerId:2,position:[0,0,0]}],id:823}]}],XOe=async()=>{if(at())return JOe;const e=await me("getCalls");return qOe(e)},$u=tn(e=>({calls:[],fetchCalls:async()=>{const t=await XOe();e({calls:t})},updateCallUnits:(t,n)=>{e(r=>{const o=r.calls.findIndex(s=>s.id===t);if(o===-1)return r;const i=[...r.calls];return i[o]={...i[o],units:n},{calls:i}})},addCall:t=>{e(n=>({calls:[t,...n.calls]}))},setCalls:t=>e({calls:t})})),iB=()=>$u(e=>e.calls),QOe=()=>$u(e=>e.fetchCalls),eCe=()=>{const{calls:e,fetchCalls:t}=$u(),[n,r]=_.useState(!1),o=Ul();_.useEffect(()=>{r(!0),(async()=>{t()})().then(()=>{r(!1)})},[]);const i=_.useMemo(()=>e.sort((s,a)=>a.id-s.id),[e]);return h.jsxs("div",{className:"card-background",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(U,{style:{fontSize:17,color:"white"},weight:500,children:D.dispatch}),h.jsx(Bhe,{size:M(25),color:"white"})]}),h.jsx(Ye,{mt:5,mb:5}),h.jsx(At,{h:330,children:h.jsx("div",{className:"warrants-card-content",children:n?h.jsx(Pr,{h:"100%",children:h.jsx(en,{})}):i.length>0?i.map(s=>h.jsx("div",{className:"active-dispatchcall-card",onClick:()=>{o("/dispatch")},children:h.jsxs(nt,{style:{width:"100%"},children:[h.jsxs("div",{style:{flex:1},children:[h.jsxs(U,{style:{fontSize:13,color:"white"},weight:500,children:["(",s.code,") ",s.offense]}),h.jsxs("div",{style:{display:"flex",gap:5},children:[h.jsx(L0,{size:16,color:"#C1C2C5"}),h.jsx(U,{color:"dimmed",size:"xs",children:pe(s.time).fromNow()})]})]}),h.jsxs(U,{color:"dimmed",size:"xs",children:[D.responding_units,": ",s.units.length]})]})})):h.jsx(U,{color:"dimmed",size:"xs",children:D.no_recent_calls_found})})})]})},tCe=[{plate:"AF30442",reason:"This vehicle is wanted because its been a part of a murder and we need to confiscate it to check for evidence",expiresAt:pe(new Date).format("DD-MM-YYYY")},{plate:"AF30442",reason:"Billy",expiresAt:pe(new Date).format("DD-MM-YYYY")}],nCe=tn(e=>({bolos:at()?tCe:[],getBolos:async()=>{try{const t=await me("getBolos");return e({bolos:t}),{bolos:t}}catch(t){return console.error("Failed to fetch recent activities:",t),{bolos:[]}}},setBolos:t=>e({bolos:t})})),sB=[];for(let e=0;e<25;e++)sB[e]={plate:`44HJJO263${e+1}`,model:"Adder"};const PO={plate:"44HJJO263",model:"gauntlet2",owner:"John Doe (ABC123AW)",color:"Red",notes:"string",class:"Muscle",knownInformation:["Gaunlet"]},OO={plate:"44HJJO263",model:"sultan3",owner:"John Doe (ABC123AW)",color:"Black",notes:"string",class:"Super",knownInformation:["Adder"]},Mu=tn(e=>({selectedVehicle:null,isVehicleBOLO:!1,BOLOExpirationDate:"",getVehicles:async()=>at()?sB:await me("getAllVehicles"),setSelectedVehicle:t=>{at()&&e({selectedVehicle:Math.random()*10>5?PO:OO}),e({selectedVehicle:t})},setIsVehicleBOLO(t){e({isVehicleBOLO:t})},setBOLOExpirationDate(t){e({BOLOExpirationDate:t})}})),rCe=e=>{const{setSelectedVehicle:t,setIsVehicleBOLO:n,setBOLOExpirationDate:r}=Mu(),o=Math.random()*10>5?PO:OO,i=Ul();return h.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:10},children:[h.jsx(Ye,{}),h.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[h.jsx(U,{style:{fontSize:18,color:"white"},weight:500,children:D.reason}),h.jsx(U,{c:"gray.4",size:"sm",children:e.bolo.reason}),h.jsxs(U,{c:"dimmed",size:"xs",mt:5,children:[D.expires_at," ",e.bolo.expiresAt]})]}),h.jsx(Ye,{}),h.jsx("div",{style:{display:"flex",flexDirection:"column",gap:10,alignItems:"center",width:"100%",justifyContent:"center"},children:h.jsx(st,{variant:"light",color:"gray",w:200,onClick:async()=>{t(null);const s=await me("getVehicle",{plate:e.bolo.plate},{data:{...o}}),a=await me("isVehicleBOLO",{plate:e.bolo.plate},{data:!1});if(a){const c=await me("getBOLOExpirationDate",{plate:e.bolo.plate},{data:"12/12/2024"});r(c)}t(s),n(a),i("/vehicles"),ke.closeAll()},children:D.goto_vehicle})})]})},oCe=()=>{const{bolos:e,getBolos:t}=nCe(),[n,r]=_.useState(!1);return _.useEffect(()=>{r(!0),(async()=>{t()})().then(()=>{r(!1)})},[]),h.jsxs("div",{className:"card-background",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(U,{style:{fontSize:17,color:"white"},weight:500,children:D.bolos}),h.jsx(Xhe,{size:M(25),color:"white"})]}),h.jsx(Ye,{mt:5,mb:5}),h.jsx(At,{h:290,children:h.jsx("div",{className:"warrants-card-content",children:n?h.jsx(Pr,{h:"100%",children:h.jsx(en,{})}):e.length>0?e.map(o=>h.jsx("div",{className:"bolos-card",onClick:async()=>{const i=await me("getBolo",{plate:o.plate},{data:{plate:"ABCDEFG",reason:"A pretty nice and cool reason",expiresAt:pe(new Date).format("DD-MM-YYYY")}});ke.open({title:h.jsxs("div",{style:{display:"flex",gap:10,alignItems:"center"},children:[h.jsx(ox,{size:20,color:"#C1C2C5"}),h.jsx(U,{style:{fontSize:16,color:"white"},weight:500,children:i.plate})]}),centered:!0,children:h.jsx(rCe,{bolo:i})})},children:h.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:5,width:"100%"},children:[h.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[h.jsxs("div",{style:{display:"flex",gap:5,alignItems:"center"},children:[h.jsx(ox,{size:20,color:"#C1C2C5"}),h.jsx(U,{style:{fontSize:13,color:"white"},weight:500,children:o.plate})]}),h.jsxs(U,{color:"dimmed",size:"xs",children:[D.expires_at," ",o.expiresAt]})]}),h.jsx(U,{c:"gray.4",size:"xs",lineClamp:2,children:o.reason})]})})):h.jsx(U,{color:"dimmed",size:"xs",children:D.no_bolos_found})})})]})},iCe=()=>{const{config:e}=Yf(),{firstname:t,lastname:n}=bo(i=>i.personalData),{activeOfficers:r,getActiveOfficers:o}=GP();return _.useEffect(()=>{o()},[]),h.jsxs("div",{className:"dashboard",children:[h.jsxs("div",{className:"left-side",children:[h.jsxs("div",{className:"header",children:[h.jsx(U,{style:{fontSize:24,color:"white"},weight:500,children:D.welcome_back.format(t,n)}),h.jsxs(U,{color:"dimmed",size:"xs",style:{display:"flex",gap:10},children:[h.jsx(RP,{size:M(18)})," ",h.jsx(U,{color:"dimmed",size:14,children:new Date().toLocaleDateString("en-EN",{weekday:"long",year:"numeric",month:"long",day:"numeric"})})]})]}),h.jsx(Ye,{}),h.jsx(Xye,{}),h.jsxs("div",{className:"content-bottom",children:[h.jsx(KOe,{}),h.jsx(ZOe,{}),h.jsx(oCe,{})]})]}),h.jsx(Ye,{orientation:"vertical"}),h.jsxs("div",{className:"right-side",children:[h.jsx("div",{className:"card-background",children:h.jsxs(At,{h:400,children:[h.jsxs("div",{className:"card-title",children:[h.jsx(U,{style:{fontSize:17,color:"white"},weight:500,children:D.active_officers}),h.jsxs("div",{className:"right-side-title",children:[h.jsx(U,{style:{fontSize:17,color:"white"},weight:500,children:r.length}),h.jsx(A0,{size:M(20),color:"white"})]})]}),h.jsx(Ye,{mt:5,mb:5}),h.jsx("div",{className:"card-content",children:r.length>0?h.jsx("div",{className:"active-officers-cards",children:r.map(i=>h.jsx("div",{className:"active-officer-card",children:h.jsxs(nt,{style:{width:"100%"},children:[h.jsxs("div",{style:{flex:1},children:[h.jsxs(U,{style:{fontSize:13,color:"white"},weight:500,children:[i.firstname," ",i.lastname]}),h.jsxs(U,{color:"dimmed",size:"xs",children:[D.callsign,": ",i.callsign]})]}),h.jsxs(U,{color:"dimmed",size:"xs",children:[D.attached_unit,": ",i.unitId||"None"]})]})}))}):h.jsx(U,{color:"dimmed",size:"xs",children:"No active officers"})})]})}),e.isDispatchEnabled&&h.jsx(eCe,{})]})]})};const sCe=e=>h.jsxs("div",{className:"card-background profile-card-info",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(U,{style:{fontSize:17,color:"white"},weight:500,children:e.title}),typeof e.icon=="string"?h.jsx("i",{className:`ti ti-${e.icon}`,style:{fontSize:24,color:"white"}}):h.jsx(e.icon,{})]}),h.jsx(Ye,{style:{width:"100%"}}),h.jsx("div",{className:"profile-card-info-badges",children:e.children})]}),XI={title:"Debug Report title",id:0,description:"

This is a incident description

",evidence:[],officersInvolved:[{firstname:"Callum",lastname:"Graham",callsign:188,citizenid:"132142",playerId:1,position:[0,0,0]},{firstname:"Jacob",lastname:"Gray",callsign:273,citizenid:"152312",playerId:1,position:[0,0,0]},{firstname:"Edward",lastname:"Atkinson",callsign:125,citizenid:"948213",playerId:1,position:[0,0,0]}],citizensInvolved:[{firstname:"John",lastname:"Doe",citizenid:"BUB193Z4A",dob:Date.now()}]},Ai=tn(e=>({report:XI,isReportActive:!1,setActiveReport:t=>{at()&&e({report:XI}),e({report:t})},setReportActive:t=>{e({isReportActive:t})},setDescription:t=>{e(n=>({report:{...n.report,description:t}}))},setOfficersInvolved:t=>{e(n=>({report:{...n.report,officersInvolved:typeof t=="function"?t(n.report.officersInvolved):t}}))},setCitizensInvolved:t=>{e(n=>({report:{...n.report,citizensInvolved:typeof t=="function"?t(n.report.citizensInvolved):t}}))},setEvidence:t=>{e(n=>({report:{...n.report,evidence:typeof t=="function"?t(n.report.evidence):t}}))}})),aCe=()=>{const{setActiveReport:e,setReportActive:t}=Ai(),n=ji(u=>u.selectedProfile),r=ji(u=>u.profileCards),{setActiveIncident:o,setIncidentActive:i}=Ur(),s=Ul();if(!n)return h.jsx("div",{className:"content-width",children:h.jsx("div",{className:"card-background",children:h.jsxs("div",{className:"profile-no-selected",children:[h.jsx(WP,{size:M(50),color:"white"}),h.jsx(U,{style:{fontSize:15,color:"white"},weight:600,children:D.no_profile_selected})]})})});async function a(u){if(at())return s("/reports");const f=await me("getReport",u);e(f),t(!0),s("/reports")}async function c(u){if(at())return s("/incidents");const f=await me("getIncident",u);o(f),i(!0),s("/incidents")}return h.jsx("div",{className:"content-width",children:h.jsx(At,{h:860,children:h.jsxs("div",{className:"additional-profile-info",children:[r.map(u=>h.jsx(sCe,{title:u.title,icon:u.icon,children:h.jsx("div",{className:"profile-card-info-badges",children:n[u.id]?n[u.id].map(f=>h.jsx(mt,{color:"gray",variant:"filled",className:"profile-info-badge",radius:"md",children:f},f)):h.jsx(U,{color:"dimmed",size:"xs",children:D.no_cardid_registered.format(u.id)})})})),h.jsxs("div",{className:"card-background profile-card-info",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(U,{style:{fontSize:17,color:"white"},weight:500,children:D.related_reports}),h.jsx(AP,{size:M(25),color:"white"})]}),h.jsx(Ye,{style:{width:"100%"}}),n.relatedReports&&(n.relatedReports.length>0?n.relatedReports.map(u=>h.jsxs("div",{className:"related-reports-card",onClick:()=>{a(u.id)},children:[h.jsx(U,{style:{fontSize:15,color:"white"},weight:500,children:u.title}),h.jsxs("div",{className:"related-reports-extra-info",children:[h.jsxs(U,{style:{fontSize:12},weight:500,color:"dimmed",children:[u.author," - Date: ",u.date]}),h.jsxs(U,{style:{fontSize:12},weight:500,color:"dimmed",children:["#",u.id]})]})]},u.id)):h.jsx(U,{color:"dimmed",size:"xs",children:D.no_related_reports}))]}),h.jsxs("div",{className:"card-background profile-card-info",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(U,{style:{fontSize:17,color:"white"},weight:500,children:D.related_incidents}),h.jsx(VP,{size:M(25),color:"white"})]}),h.jsx(Ye,{style:{width:"100%"}}),n.relatedIncidents&&(n.relatedIncidents.length>0?n.relatedIncidents.map(u=>h.jsxs("div",{className:"related-reports-card",onClick:()=>{c(u.id)},children:[h.jsx(U,{style:{fontSize:15,color:"white"},weight:500,children:u.title}),h.jsxs("div",{className:"related-reports-extra-info",children:[h.jsxs(U,{style:{fontSize:12},weight:500,color:"dimmed",children:[u.author," - Date: ",u.date]}),h.jsxs(U,{style:{fontSize:12},weight:500,color:"dimmed",children:["#",u.id]})]})]},u.id)):h.jsx(U,{color:"dimmed",size:"xs",children:D.no_related_incidents}))]})]})})})},lCe=e=>{const{setSelectedProfile:t,selectedProfile:n}=ji(),r=_.useRef(null),[o,i]=_.useState(!1),s=async()=>{if(!n)return;i(!0);const a=r.current?.value;await me("updateProfileImage",{citizenId:n.citizenid,image:a},{data:1}),t({...n,image:a}),ke.closeAll()};return h.jsxs(Je,{children:[h.jsx(yn,{defaultValue:e.image,ref:r,label:D.image,description:D.avatar_description,placeholder:"https://r2.fivemanage.com/placeholder.jpg"}),h.jsx(st,{variant:"light",color:"gray",onClick:s,loading:o,children:"Confirm"})]})},cCe=()=>{const{selectedProfile:e,setSelectedProfile:t,isProfileWanted:n}=ji(),[r,o]=_.useState(!1);return e?h.jsx("div",{className:"content-width",children:h.jsx("div",{className:"card-background",children:h.jsxs("div",{className:"profile-card-content",children:[h.jsxs("div",{className:"profile-card-header",children:[h.jsxs(U,{style:{fontSize:14,color:"white"},children:[D.edit_citizen," #",e.citizenid]}),h.jsx("div",{className:"profile-card-header-buttons",children:h.jsx(zt,{label:"Unlink",withArrow:!0,color:"gray",position:"bottom",children:h.jsx(Qe,{variant:"filled",color:"gray",onClick:()=>{t(null)},children:h.jsx(R0,{size:16,color:"white"})})})})]}),h.jsx(Ye,{style:{width:"100%"}}),h.jsxs("div",{className:"profile-card-profile-content",children:[h.jsxs("div",{className:"profile-card-wrapper",children:[h.jsxs("div",{className:"profile-card-image",onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),children:[r&&h.jsx(Qe,{style:{position:"absolute",top:5,right:5,zIndex:99},onClick:()=>ke.open({title:h.jsx(U,{style:{fontSize:17,color:"white"},weight:500,children:D.change_picture}),centered:!0,size:"sm",children:h.jsx(lCe,{image:e.image})}),children:h.jsx(zP,{})}),h.jsx(ri,{width:145,height:180,src:e.image??"https://r2.fivemanage.com/s64hZD0G9WtYHbURWCuSc/placeholder.jpg",radius:"md",alt:"With default placeholder",withPlaceholder:!0}),n&&h.jsx(ri,{className:"watermark",src:"https://r2.fivemanage.com/s64hZD0G9WtYHbURWCuSc/wanted-stamp.png",radius:"md",alt:"With default placeholder",withPlaceholder:!0})]}),h.jsxs("div",{className:"profile-card-inputs",children:[h.jsx(et,{disabled:!0,icon:h.jsx(k8,{size:16}),placeholder:e.citizenid,size:"xs"}),h.jsx(et,{disabled:!0,icon:h.jsx(Jhe,{size:16}),placeholder:e.firstname+" "+e.lastname,size:"xs"}),h.jsx(et,{disabled:!0,icon:h.jsx(che,{size:16}),placeholder:pe(e.dob).format("DD/MM/YYYY"),size:"xs"}),h.jsx(et,{disabled:!0,icon:h.jsx(hhe,{size:16}),placeholder:e.phoneNumber,size:"xs"}),h.jsx(et,{disabled:!0,icon:h.jsx(yhe,{size:16}),placeholder:e.fingerprint??"No fingerprint found",size:"xs"})]})]}),h.jsx(Ye,{style:{width:"100%"}}),h.jsx("div",{className:"profile-card-information",children:h.jsx(ep,{content:e.notes,onSave:i=>{t({...e,notes:i}),me("saveProfileNotes",{citizenid:e.citizenid,notes:i})},styles:{content:{backgroundColor:"#242527"},toolbar:{backgroundColor:"#2C2E33"},controlsGroup:{pointerEvents:"auto",backgroundColor:"#282828"}},contentAreaStyle:{height:475,width:413,padding:0}})})]})]})})}):h.jsx("div",{className:"content-width",children:h.jsx("div",{className:"card-background",children:h.jsxs("div",{className:"profile-no-selected",children:[h.jsx(WP,{size:M(50),color:"white"}),h.jsx(U,{style:{fontSize:15,color:"white"},weight:600,children:D.no_profile_selected})]})})})},uCe=e=>{const[t,n]=_.useState(""),r=ji(f=>f.getPlayers),[o,i]=_.useState([]),[s,a]=_.useState(o),[c,u]=_.useState(!1);return _.useEffect(()=>{u(!0),(async()=>await r())().then(p=>{i(p.profiles),a(p.profiles),u(!1)})},[]),_.useEffect(()=>{if(t.trim()==="")a(o);else{const f=o.filter(p=>(p.citizenid||"").includes(t)||(p.firstname||"").toLowerCase().includes(t.toLowerCase())||(p.lastname||"").toLowerCase().includes(t.toLowerCase())||(p.firstname+" "+p.lastname||"").toLowerCase().includes(t.toLowerCase()));a(f)}},[t,s]),h.jsx("div",{className:"content-width",children:h.jsxs("div",{className:"card-background",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(U,{style:{fontSize:17,color:"white"},weight:500,children:D.profiles}),h.jsx(UP,{size:M(25),color:"white"})]}),h.jsx(et,{icon:h.jsx(Ia,{}),variant:"filled",placeholder:D.search,mt:10,mb:10,value:t,onChange:f=>n(f.target.value)}),h.jsx(Ye,{mt:5,mb:5}),h.jsx("div",{className:"profiles-card-content",children:h.jsx(At,{h:860,children:h.jsx("div",{className:"profiles-card-content-flex",children:c?h.jsx(Pr,{h:"100%",children:h.jsx(en,{})}):s.length>0?s.map(f=>h.jsxs("div",{className:"profile-card",onClick:()=>e.handleProfileClick(f),children:[h.jsx(ri,{width:65,height:65,src:f.image??"https://cdn.vectorstock.com/i/preview-1x/97/68/account-avatar-dark-mode-glyph-ui-icon-vector-44429768.jpg",radius:"lg",alt:"With default placeholder",withPlaceholder:!0}),h.jsxs("div",{children:[h.jsxs(U,{weight:600,style:{fontSize:13,color:"white"},children:[f.firstname," ",f.lastname]}),h.jsxs(U,{style:{fontSize:12,color:"white"},children:[D.dob,": ",pe(f.dob).format("DD/MM/YYYY")]}),h.jsxs(U,{style:{fontSize:12,color:"white"},children:[D.citizen_id,": ",f.citizenid]})]})]},f.citizenid)):h.jsx(U,{color:"dimmed",size:"xs",children:D.no_profiles_found})})})})]})})},o1=h.jsx("svg",{width:"54",height:"54",viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:qy.colors.blue[6],children:h.jsx("g",{fill:"none",fillRule:"evenodd",children:h.jsxs("g",{transform:"translate(1 1)",strokeWidth:"2",children:[h.jsx("circle",{strokeOpacity:".5",cx:"18",cy:"18",r:"18"}),h.jsx("path",{d:"M36 18c0-9.94-8.06-18-18-18",children:h.jsx("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})})]})})}),dCe=()=>{const[e,t]=_.useState(!1),{setIsProfileWanted:n,setSelectedProfile:r}=ji(),o=async i=>{t(!0),r(null),n(!1);const s=await me("getProfile",i.citizenid,{data:{...ZP,firstName:i.firstname,lastName:i.lastname,citizenid:i.citizenid}}),a=await me("isProfileWanted",i.citizenid,{data:!1});t(!1),r(s),n(a)};return h.jsxs("div",{className:"profiles",children:[h.jsx(uCe,{handleProfileClick:o}),h.jsx(Hf,{visible:e,overlayOpacity:.97,overlayColor:"rgb(34, 35, 37)",transitionDuration:250,loader:o1,style:{left:795,width:935,height:"96%",top:19,borderRadius:"0.25rem"}}),h.jsx(cCe,{}),h.jsx(aCe,{})]})};var fCe=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var s=i[o];if(!e(t[s],n[s]))return!1}return!0}return t!==t&&n!==n};const QI=Ea(fCe);function Ix(e){return e===null||typeof e!="object"?{}:Object.keys(e).reduce((t,n)=>{const r=e[n];return r!=null&&r!==!1&&(t[n]=r),t},{})}var pCe=Object.defineProperty,e5=Object.getOwnPropertySymbols,hCe=Object.prototype.hasOwnProperty,mCe=Object.prototype.propertyIsEnumerable,t5=(e,t,n)=>t in e?pCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gCe=(e,t)=>{for(var n in t||(t={}))hCe.call(t,n)&&t5(e,n,t[n]);if(e5)for(var n of e5(t))mCe.call(t,n)&&t5(e,n,t[n]);return e};function aB(e,t){if(t===null||typeof t!="object")return{};const n=gCe({},t);return Object.keys(t).forEach(r=>{r.includes(`${String(e)}.`)&&delete n[r]}),n}const vCe="__MANTINE_FORM_INDEX__";function n5(e,t){return t?typeof t=="boolean"?t:Array.isArray(t)?t.includes(e.replace(/[.][0-9]/g,`.${vCe}`)):!1:!1}function r5(e,t,n){typeof n.value=="object"&&(n.value=Lc(n.value)),!n.enumerable||n.get||n.set||!n.configurable||!n.writable||t==="__proto__"?Object.defineProperty(e,t,n):e[t]=n.value}function Lc(e){if(typeof e!="object")return e;var t=0,n,r,o,i=Object.prototype.toString.call(e);if(i==="[object Object]"?o=Object.create(e.__proto__||null):i==="[object Array]"?o=Array(e.length):i==="[object Set]"?(o=new Set,e.forEach(function(s){o.add(Lc(s))})):i==="[object Map]"?(o=new Map,e.forEach(function(s,a){o.set(Lc(a),Lc(s))})):i==="[object Date]"?o=new Date(+e):i==="[object RegExp]"?o=new RegExp(e.source,e.flags):i==="[object DataView]"?o=new e.constructor(Lc(e.buffer)):i==="[object ArrayBuffer]"?o=e.slice(0):i.slice(-6)==="Array]"&&(o=new e.constructor(e)),o){for(r=Object.getOwnPropertySymbols(e);t0,errors:t}}function jx(e,t,n="",r={}){return typeof e!="object"||e===null?r:Object.keys(e).reduce((o,i)=>{const s=e[i],a=`${n===""?"":`${n}.`}${i}`,c=rs(a,t);let u=!1;return typeof s=="function"&&(o[a]=s(c,t,a)),typeof s=="object"&&Array.isArray(c)&&(u=!0,c.forEach((f,p)=>jx(s,t,`${a}.${p}`,o))),typeof s=="object"&&typeof c=="object"&&c!==null&&(u||jx(s,t,a,o)),o},r)}function Lx(e,t){return o5(typeof e=="function"?e(t):jx(e,t))}function ph(e,t,n){if(typeof e!="string")return{hasError:!1,error:null};const r=Lx(t,n),o=Object.keys(r.errors).find(i=>e.split(".").every((s,a)=>s===i.split(".")[a]));return{hasError:!!o,error:o?r.errors[o]:null}}function yCe(e,{from:t,to:n},r){const o=rs(e,r);if(!Array.isArray(o))return r;const i=[...o],s=o[t];return i.splice(t,1),i.splice(n,0,s),i1(e,i,r)}var _Ce=Object.defineProperty,i5=Object.getOwnPropertySymbols,wCe=Object.prototype.hasOwnProperty,bCe=Object.prototype.propertyIsEnumerable,s5=(e,t,n)=>t in e?_Ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xCe=(e,t)=>{for(var n in t||(t={}))wCe.call(t,n)&&s5(e,n,t[n]);if(i5)for(var n of i5(t))bCe.call(t,n)&&s5(e,n,t[n]);return e};function SCe(e,{from:t,to:n},r){const o=`${e}.${t}`,i=`${e}.${n}`,s=xCe({},r);return Object.keys(r).every(a=>{let c,u;if(a.startsWith(o)&&(c=a,u=a.replace(o,i)),a.startsWith(i)&&(c=a.replace(i,o),u=a),c&&u){const f=s[c],p=s[u];return p===void 0?delete s[c]:s[c]=p,f===void 0?delete s[u]:s[u]=f,!1}return!0}),s}function PCe(e,t,n){const r=rs(e,n);return Array.isArray(r)?i1(e,r.filter((o,i)=>i!==t),n):n}var OCe=Object.defineProperty,a5=Object.getOwnPropertySymbols,CCe=Object.prototype.hasOwnProperty,kCe=Object.prototype.propertyIsEnumerable,l5=(e,t,n)=>t in e?OCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ECe=(e,t)=>{for(var n in t||(t={}))CCe.call(t,n)&&l5(e,n,t[n]);if(a5)for(var n of a5(t))kCe.call(t,n)&&l5(e,n,t[n]);return e};function c5(e,t){const n=e.substring(t.length+1).split(".")[0];return parseInt(n,10)}function u5(e,t,n,r){if(t===void 0)return n;const o=`${String(e)}`;let i=n;r===-1&&(i=aB(`${o}.${t}`,i));const s=ECe({},i),a=new Set;return Object.entries(i).filter(([c])=>{if(!c.startsWith(`${o}.`))return!1;const u=c5(c,o);return Number.isNaN(u)?!1:u>=t}).forEach(([c,u])=>{const f=c5(c,o),p=c.replace(`${o}.${f}`,`${o}.${f+r}`);s[p]=u,a.add(p),a.has(c)||delete s[c]}),s}function $Ce(e,t,n,r){const o=rs(e,r);if(!Array.isArray(o))return r;const i=[...o];return i.splice(typeof n=="number"?n:i.length,0,t),i1(e,i,r)}function d5(e,t){const n=Object.keys(e);if(typeof t=="string"){const r=n.filter(o=>o.startsWith(`${t}.`));return e[t]||r.some(o=>e[o])||!1}return n.some(r=>e[r])}function MCe(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 instanceof HTMLInputElement?n.type==="checkbox"?e(n.checked):e(n.value):(n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement)&&e(n.value)}else e(t)}}var NCe=Object.defineProperty,TCe=Object.defineProperties,ICe=Object.getOwnPropertyDescriptors,f5=Object.getOwnPropertySymbols,jCe=Object.prototype.hasOwnProperty,LCe=Object.prototype.propertyIsEnumerable,p5=(e,t,n)=>t in e?NCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ls=(e,t)=>{for(var n in t||(t={}))jCe.call(t,n)&&p5(e,n,t[n]);if(f5)for(var n of f5(t))LCe.call(t,n)&&p5(e,n,t[n]);return e},Ow=(e,t)=>TCe(e,ICe(t));function Zl({initialValues:e={},initialErrors:t={},initialDirty:n={},initialTouched:r={},clearInputErrorOnChange:o=!0,validateInputOnChange:i=!1,validateInputOnBlur:s=!1,transformValues:a=u=>u,validate:c}={}){const[u,f]=_.useState(r),[p,g]=_.useState(n),[v,y]=_.useState(e),[w,P]=_.useState(Ix(t)),x=_.useRef(e),S=J=>{x.current=J},O=_.useCallback(()=>f({}),[]),E=J=>{const ne=J?Ls(Ls({},v),J):v;S(ne),g({})},$=_.useCallback(J=>P(ne=>Ix(typeof J=="function"?J(ne):J)),[]),N=_.useCallback(()=>P({}),[]),I=_.useCallback(()=>{y(e),N(),S(e),g({}),O()},[]),R=_.useCallback((J,ne)=>$(le=>Ow(Ls({},le),{[J]:ne})),[]),B=_.useCallback(J=>$(ne=>{if(typeof J!="string")return ne;const le=Ls({},ne);return delete le[J],le}),[]),z=_.useCallback(J=>g(ne=>{if(typeof J!="string")return ne;const le=aB(J,ne);return delete le[J],le}),[]),G=_.useCallback((J,ne)=>{const le=n5(J,i);z(J),f(_e=>Ow(Ls({},_e),{[J]:!0})),y(_e=>{const Ne=i1(J,ne,_e);if(le){const we=ph(J,c,Ne);we.hasError?R(J,we.error):B(J)}return Ne}),!le&&o&&R(J,null)},[]),X=_.useCallback(J=>{y(ne=>{const le=typeof J=="function"?J(ne):J;return Ls(Ls({},ne),le)}),o&&N()},[]),Q=_.useCallback((J,ne)=>{z(J),y(le=>yCe(J,ne,le)),P(le=>SCe(J,ne,le))},[]),V=_.useCallback((J,ne)=>{z(J),y(le=>PCe(J,ne,le)),P(le=>u5(J,ne,le,-1))},[]),H=_.useCallback((J,ne,le)=>{z(J),y(_e=>$Ce(J,ne,le,_e)),P(_e=>u5(J,le,_e,1))},[]),Z=_.useCallback(()=>{const J=Lx(c,v);return P(J.errors),J},[v,c]),Y=_.useCallback(J=>{const ne=ph(J,c,v);return ne.hasError?R(J,ne.error):B(J),ne},[v,c]),j=(J,{type:ne="input",withError:le=!0,withFocus:_e=!0}={})=>{const we={onChange:MCe(He=>G(J,He))};return le&&(we.error=w[J]),ne==="checkbox"?we.checked=rs(J,v):we.value=rs(J,v),_e&&(we.onFocus=()=>f(He=>Ow(Ls({},He),{[J]:!0})),we.onBlur=()=>{if(n5(J,s)){const He=ph(J,c,v);He.hasError?R(J,He.error):B(J)}}),we},W=(J,ne)=>le=>{le?.preventDefault();const _e=Z();_e.hasErrors?ne?.(_e.errors,v,le):J?.(a(v),le)},F=J=>a(J||v),K=_.useCallback(J=>{J.preventDefault(),I()},[]),ee=J=>{if(J){const le=rs(J,p);if(typeof le=="boolean")return le;const _e=rs(J,v),Ne=rs(J,x.current);return!QI(_e,Ne)}return Object.keys(p).length>0?d5(p):!QI(v,x.current)},fe=_.useCallback(J=>d5(u,J),[u]),ie=_.useCallback(J=>J?!ph(J,c,v).hasError:!Lx(c,v).hasErrors,[v,c]);return{values:v,errors:w,setValues:X,setErrors:$,setFieldValue:G,setFieldError:R,clearFieldError:B,clearErrors:N,reset:I,validate:Z,validateField:Y,reorderListItem:Q,removeListItem:V,insertListItem:H,getInputProps:j,onSubmit:W,onReset:K,isDirty:ee,isTouched:fe,setTouched:f,setDirty:g,resetTouched:O,resetDirty:E,isValid:ie,getTransformedValues:F}}const DCe=()=>{const{setActiveIncident:e,setIncidentActive:t}=Ur(),n=Zl({initialValues:{title:""},validate:{title:o=>o.length===0?D.incident_title_required:null}}),r=async o=>{ke.closeAll();const i=await me("createIncident",o.title,{data:1});e({title:o.title,id:i,criminals:[],description:"

",evidence:[],officersInvolved:[]}),t(!0)};return h.jsx("form",{onSubmit:n.onSubmit(o=>r(o)),children:h.jsxs(Je,{children:[h.jsx(yn,{label:D.incident_title,"data-autofocus":!0,withAsterisk:!0,...n.getInputProps("title")}),h.jsx(st,{type:"submit",fullWidth:!0,variant:"light",color:"gray",children:D.confirm})]})})},cB=[];for(let e=0;e<25;e++)cB[e]={title:`Incident ${e+1}`,id:e,author:"Some One",date:Date.now()};const RCe=async()=>at()?{incidents:cB}:await me("getIncidents"),uB=tn(e=>({incidents:[],fetchIncidents:async()=>{const t=await RCe();e({incidents:t.incidents})},setIncidents:t=>{e(n=>({incidents:typeof t=="function"?t(n.incidents):t}))}})),zCe=e=>{const{incidents:t,fetchIncidents:n}=uB(),[r,o]=_.useState(!1),[i,s]=_.useState(""),a=500,[c,u]=_.useState(i),[f,p]=_.useState(null),[g,v]=_.useState(t);return _.useEffect(()=>{f!==null&&clearTimeout(f),o(!0);const y=setTimeout(()=>{u(i),o(!1)},a);return p(y),()=>{clearTimeout(y)}},[i]),_.useEffect(()=>{if(c.trim()==="")v(t);else{const y=t.filter(w=>(w.title||"").toLocaleLowerCase().includes(i.toLocaleLowerCase())||(w.author||"").toLocaleLowerCase().includes(i.toLocaleLowerCase()));v(y)}},[c,t]),_.useEffect(()=>{o(!0),(async()=>await n())().then(()=>{o(!1)})},[]),h.jsx("div",{className:"content-width",children:h.jsxs("div",{className:"card-background",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(U,{style:{fontSize:17,color:"white"},weight:500,children:D.incidents}),h.jsx(VP,{size:M(25),color:"white"})]}),h.jsx(et,{icon:h.jsx(Ia,{}),variant:"filled",placeholder:D.search,mt:10,mb:10,onChange:y=>s(y.target.value)}),h.jsxs(st,{fullWidth:!0,variant:"light",color:"gray",onClick:()=>ke.open({title:h.jsx(U,{style:{fontSize:17,color:"white"},weight:500,children:D.create_incident}),centered:!0,size:"sm",children:h.jsx(DCe,{})}),children:[h.jsx(C8,{size:M(18),style:{marginRight:5}})," ",D.create_incident]}),h.jsx(Ye,{mt:10,mb:10}),h.jsx("div",{className:"incidents-cards-content",children:h.jsx(At,{h:680,children:h.jsx("div",{className:"profiles-card-content-flex",children:r?h.jsx(Pr,{children:h.jsx(en,{})}):g.map(y=>h.jsx("div",{className:"incident-card",onClick:()=>e.handleIncidentClick(y),children:h.jsxs("div",{className:"incident-card-content",children:[h.jsx(U,{style:{fontSize:17,color:"white"},weight:500,children:y.title}),h.jsxs("div",{className:"incident-card-dimmed-text",children:[h.jsxs(U,{color:"dimmed",size:"xs",children:[y.author," -"," ",new Date(y.date).toLocaleDateString()]}),h.jsxs(U,{color:"dimmed",size:"xs",children:["#",y.id]})]})]})},y.id))})})})]})})},ACe=()=>{const{incident:e,setOfficersInvolved:t}=Ur(),[n,r]=_.useState(""),{officers:o,getOfficers:i}=GP(),[s,a]=_.useState(o),c=500,[u,f]=_.useState(n),[p,g]=_.useState(!1),[v,y]=_.useState(null);_.useEffect(()=>{v!==null&&clearTimeout(v),g(!0);const P=setTimeout(()=>{f(n),g(!1)},c);return y(P),()=>{clearTimeout(P)}},[n]),_.useEffect(()=>{if(u.trim()==="")a(o);else{const P=o.filter(x=>(x.citizenid||"").toLowerCase().includes(n.toLowerCase())||(x.firstname||"").toLowerCase().includes(n.toLowerCase())||(x.lastname||"").toLowerCase().includes(n.toLowerCase())||(x.firstname+" "+x.lastname||"").toLowerCase().includes(n.toLowerCase()));a(P)}},[u,o]),_.useEffect(()=>{i()},[]);const w=async P=>{if(e.officersInvolved.some(x=>x.citizenid===P.citizenid))return ke.closeAll();await me("addOfficer",{id:e.id,citizenid:P.citizenid},{data:1}),ke.closeAll(),t(x=>x.some(S=>S.citizenid===P.citizenid)?x:[...x,{firstname:P.firstname,lastname:P.lastname,callsign:P.callsign,citizenid:P.citizenid,playerId:P.playerId,position:[1,1,1]}])};return h.jsx("form",{children:h.jsxs(Je,{children:[h.jsx(et,{icon:h.jsx(Ia,{}),variant:"filled",placeholder:D.search,mt:10,mb:10,value:n,onChange:P=>r(P.target.value)}),p?h.jsx(Pr,{children:h.jsx(en,{})}):s.length>0?s.map(P=>h.jsxs("div",{className:"add-officer-card",onClick:()=>w(P),children:[h.jsxs(U,{weight:500,style:{fontSize:13,color:"white"},children:[P.firstname," ",P.lastname]}),h.jsxs(U,{style:{fontSize:13,color:"white"},children:[D.callsign,": ",P.callsign]})]},P.citizenid)):h.jsxs(Je,{spacing:0,c:"dark.2",justify:"center",align:"center",children:[h.jsx(Zf,{size:36}),h.jsx(U,{size:"xl",children:D.no_officers_found})]})]})})},BCe=()=>{const[e,t]=_.useState(!1),{incident:n,setEvidence:r}=Ur(),o=Zl({initialValues:{label:"",image:""},validate:{label:s=>s.length===0?D.image_label_required:null,image:s=>s.length===0?D.image_url_required:null}}),i=async s=>{t(!0),await me("addEvidence",{id:n.id,evidence:{...s}},{data:1}),r(a=>[...a,s]),t(!1),ke.closeAll()};return h.jsx("form",{onSubmit:o.onSubmit(s=>i(s)),children:h.jsxs(Je,{children:[h.jsx(yn,{label:D.image_label,withAsterisk:!0,...o.getInputProps("label")}),h.jsx(yn,{label:h.jsxs("div",{style:{display:"flex",gap:10,alignItems:"center",marginBottom:5},children:[h.jsx(U,{children:D.image_url}),h.jsx(zt,{label:D.take_picture,withArrow:!0,color:"gray",children:h.jsx(Qe,{disabled:o.getInputProps("label").value==="",variant:"default",size:"sm",p:1.5,onClick:async()=>{await me("takePicture",{id:n.id,imageLabel:o.getInputProps("label").value,type:"incident"},{data:1})},children:h.jsx(x8,{size:"1.125rem"})})})]}),placeholder:"https://i.imgur.com/dqopYB9b.jpg",...o.getInputProps("image")}),h.jsx(st,{variant:"light",color:"gray",type:"submit",loading:e,children:D.add_evidence})]})})},FCe=ue(()=>({container:{position:"relative"},image:{zIndex:2,"&:hover":{cursor:"pointer"}},actionIcon:{position:"absolute",top:0,right:0,zIndex:1}})),VCe=({evidence:e})=>{const{classes:t}=FCe(),[n,r]=_.useState(!1),{incident:o,setEvidence:i}=Ur();return h.jsx(zt,{label:e.label,withArrow:!0,color:"gray",children:h.jsxs(Pe,{className:t.container,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:[h.jsx(ri,{src:e.image,radius:"sm",width:105,height:105,className:t.image,onClick:()=>ke.open({children:h.jsx(ri,{src:e.image,onClick:()=>ke.closeAll()}),withCloseButton:!1,centered:!0,padding:0,size:"unset",transitionProps:{transition:"pop"}})},`${e.label}-${e.image}`),n&&h.jsx(Qe,{variant:"filled",color:"red",radius:"sm",size:"xs",className:t.actionIcon,onClick:()=>ke.openConfirmModal({title:h.jsx(U,{style:{fontSize:16,color:"white"},weight:500,children:D.remove_evidence}),centered:!0,children:h.jsx(U,{size:"sm",c:"dark.2",children:D.remove_evidence_confirm.format(e.label)}),labels:{confirm:D.confirm,cancel:D.cancel},confirmProps:{color:"red"},groupProps:{spacing:6},onConfirm:async()=>{await me("removeEvidence",{id:o.id,label:e.label,image:e.image},{data:1}),i(s=>s.filter(a=>a.image!==e.image&&a.label!==e.label))}}),children:h.jsx(cu,{})})]})})},HCe=()=>{const{incident:e,isIncidentActive:t,setIncidentActive:n,setOfficersInvolved:r,setDescription:o}=Ur(),{setIncidents:i}=uB();return t?h.jsx(At,{h:860,children:h.jsxs("div",{className:"incident-content-width",children:[h.jsxs("div",{className:"incident-middle-content",children:[h.jsxs("div",{className:"profile-card-header",children:[h.jsx(U,{style:{fontSize:15,color:"white"},children:e.title}),h.jsxs("div",{className:"profile-card-header-buttons",children:[h.jsx(zt,{label:D.delete_incident,withArrow:!0,color:"gray",position:"bottom",children:h.jsx(Qe,{variant:"filled",color:"red",onClick:()=>{ke.openConfirmModal({title:h.jsx(U,{style:{fontSize:17,color:"white"},weight:500,children:D.delete_incident}),size:"sm",centered:!0,labels:{confirm:D.confirm,cancel:D.cancel},groupProps:{spacing:6},confirmProps:{color:"red"},onConfirm:async()=>{await me("deleteIncident",{id:e.id},{data:1})&&i(a=>a.filter(c=>c.id!==e.id)),n(!1)},children:h.jsx(U,{size:"sm",c:"dark.2",children:D.delete_incident_confirm.format(e.title)})})},children:h.jsx(z0,{size:16,color:"white"})})}),h.jsx(zt,{label:D.unlink,withArrow:!0,color:"gray",position:"bottom",children:h.jsx(Qe,{variant:"filled",color:"gray",onClick:()=>{n(!1)},children:h.jsx(R0,{size:16,color:"white"})})})]})]}),h.jsx(Ye,{style:{width:"100%"}}),h.jsx("div",{className:"incident-middle-card",children:h.jsx(ep,{content:e.description,onSave:s=>{me("saveIncidentContents",{incidentId:e.id,contents:s}),o(s)},styles:{content:{backgroundColor:"#242527"},toolbar:{backgroundColor:"#2C2E33"},controlsGroup:{pointerEvents:"auto",backgroundColor:"#282828"}},contentAreaStyle:{height:270,width:413,padding:0}})})]}),h.jsxs("div",{className:"card-background profile-card-info",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(U,{style:{fontSize:17,color:"white"},weight:500,children:D.officers_involved}),h.jsx(A0,{size:M(25),color:"white"})]}),h.jsx(Ye,{style:{width:"100%"}}),h.jsxs("div",{className:"profile-card-info-badges",children:[h.jsx(mt,{color:"gray",variant:"filled",className:"incident-info-badge-main",radius:"md",onClick:()=>ke.open({title:h.jsx(U,{style:{fontSize:17,color:"white"},weight:500,children:D.add_officer}),centered:!0,size:"sm",children:h.jsx(ACe,{})}),children:D.add_officer}),e.officersInvolved.map(s=>h.jsxs(mt,{color:"gray",variant:"filled",className:"incident-info-badge",rightSection:h.jsx(Qe,{size:"xs",radius:"xl",variant:"transparent",onClick:()=>{ke.openConfirmModal({title:h.jsx(U,{style:{fontSize:16,color:"white"},weight:500,children:D.remove_officer}),centered:!0,children:h.jsx(U,{size:"sm",c:"dark.2",children:D.remove_officer_confirm.format(s.firstname,s.lastname,s.callsign)}),confirmProps:{color:"red"},groupProps:{spacing:6},labels:{confirm:D.confirm,cancel:D.cancel},onConfirm:async()=>{await me("removeOfficer",{id:e.id,citizenid:s.citizenid},{data:1}),r(a=>a.filter(c=>c.citizenid!==s.citizenid))}})},children:h.jsx(cu,{size:M(10)})}),children:[s.firstname," ",s.lastname," ",s.callsign?`(${s.callsign})`:""]},s.citizenid))]})]}),h.jsxs("div",{className:"card-background profile-card-info",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(U,{style:{fontSize:17,color:"white"},weight:500,children:D.evidence}),h.jsx(M8,{size:M(25),color:"white"})]}),h.jsx(Ye,{style:{width:"100%"}}),h.jsxs("div",{className:"profile-card-info-badges",children:[h.jsx(st,{onClick:()=>ke.open({centered:!0,title:h.jsx(U,{style:{fontSize:16,color:"white"},weight:500,children:D.add_evidence}),children:h.jsx(BCe,{}),size:"sm"}),variant:"filled",color:"gray",w:105,h:105,children:h.jsx(ku,{size:36})}),e.evidence.map(s=>h.jsx(VCe,{evidence:s},`${s.image}-${s.label}`))]})]})]})}):h.jsx("div",{className:"content-width",children:h.jsx("div",{className:"card-background",children:h.jsxs("div",{className:"profile-no-selected",children:[h.jsx(D0,{size:M(50),color:"white"}),h.jsx(U,{style:{fontSize:15,color:"white"},weight:600,children:D.no_incident_selected})]})})})},h5=[{firstname:"John",lastname:"Doe",dob:Date.now(),citizenid:"12345"},{firstname:"Jane",lastname:"Smith",dob:Date.now(),citizenid:"67890"},{firstname:"David",lastname:"Williams",dob:Date.now(),citizenid:"13579"},{firstname:"Samantha",lastname:"Jones",dob:Date.now(),citizenid:"24680"},{firstname:"Robert",lastname:"Garcia",dob:Date.now(),citizenid:"97531"},{firstname:"Emily",lastname:"Brown",dob:Date.now(),citizenid:"11223"},{firstname:"Michael",lastname:"Davis",dob:Date.now(),citizenid:"33445"},{firstname:"Sarah",lastname:"Wilson",dob:Date.now(),citizenid:"55667"},{firstname:"James",lastname:"Taylor",dob:Date.now(),citizenid:"77889"},{firstname:"Laura",lastname:"Moore",dob:Date.now(),citizenid:"99001"},{firstname:"Kevin",lastname:"Martin",dob:Date.now(),citizenid:"12321"},{firstname:"Jessica",lastname:"Lee",dob:Date.now(),citizenid:"34543"},{firstname:"Daniel",lastname:"Perez",dob:Date.now(),citizenid:"56765"},{firstname:"Nancy",lastname:"White",dob:Date.now(),citizenid:"78987"},{firstname:"Steven",lastname:"Harris",dob:Date.now(),citizenid:"90109"},{firstname:"Lisa",lastname:"Clark",dob:Date.now(),citizenid:"12212"},{firstname:"Paul",lastname:"Rodriguez",dob:Date.now(),citizenid:"34434"},{firstname:"Anna",lastname:"Lewis",dob:Date.now(),citizenid:"56656"},{firstname:"Charles",lastname:"Walker",dob:Date.now(),citizenid:"78878"},{firstname:"Susan",lastname:"Allen",dob:Date.now(),citizenid:"90090"}],WCe=tn(e=>({criminalProfiles:at()?h5:[],getCriminalProfiles:async()=>{const t=await me("getCriminalProfiles",{data:h5,delay:300});e({criminalProfiles:t})},setCriminalProfiles:t=>e({criminalProfiles:t})})),UCe=e=>{let t=e.length,n;for(;t!==0;)n=Math.floor(Math.random()*t),t--,[e[t],e[n]]=[e[n],e[t]];return e},ZCe=()=>{const{incident:e,setCriminals:t}=Ur(),[n,r]=_.useState(""),{criminalProfiles:o,getCriminalProfiles:i}=WCe(),[s,a]=_.useState(o),c=500,[u,f]=_.useState(n),[p,g]=_.useState(!1),[v,y]=_.useState(null);_.useEffect(()=>{v!==null&&clearTimeout(v),g(!0);const P=setTimeout(()=>{f(n),g(!1)},c);return y(P),()=>{clearTimeout(P)}},[n]),_.useEffect(()=>{if(u.trim()==="")a(UCe([...o]).slice(0,5));else{const P=o.filter(x=>(x.citizenid||"").toLowerCase().includes(n.toLowerCase())||(x.firstname||"").toLowerCase().includes(n.toLowerCase())||(x.lastname||"").toLowerCase().includes(n.toLowerCase())||(x.firstname+" "+x.lastname||"").toLowerCase().includes(n.toLowerCase()));a(P)}},[u,o]),_.useEffect(()=>{(async()=>{await i()})()},[]);const w=async P=>{await me("addCriminal",{id:e.id,criminalId:P.citizenid},{data:1}),ke.closeAll(),t(x=>x.some(S=>S.citizenid===P.citizenid)?x:[...x,{citizenid:P.citizenid,dob:P.dob,firstname:P.firstname,lastname:P.lastname,image:P.image,charges:[],issueWarrant:!1,pleadedGuilty:!1,processed:!1,penalty:{time:0,reduction:0,points:0,fine:0}}])};return h.jsx("form",{children:h.jsxs(Je,{children:[h.jsx(et,{icon:h.jsx(Ia,{}),variant:"filled",placeholder:D.search,mt:10,mb:10,value:n,onChange:P=>r(P.target.value)}),p?h.jsx(Pr,{children:h.jsx(en,{})}):s.length>0?s.map(P=>h.jsxs("div",{className:"profile-card",onClick:()=>w(P),children:[h.jsx(ri,{width:65,height:65,src:P.image??"https://cdn.vectorstock.com/i/preview-1x/97/68/account-avatar-dark-mode-glyph-ui-icon-vector-44429768.jpg",radius:"lg",alt:"With default placeholder",withPlaceholder:!0}),h.jsxs("div",{children:[h.jsxs(U,{weight:600,style:{fontSize:13,color:"white"},children:[P.firstname," ",P.lastname]}),h.jsxs(U,{style:{fontSize:12,color:"white"},children:[D.dob,": ",P.dob]}),h.jsxs(U,{style:{fontSize:12,color:"white"},children:[D.citizen_id,": ",P.citizenid]})]})]},P.citizenid)):h.jsxs(Je,{spacing:0,c:"dark.2",justify:"center",align:"center",children:[h.jsx(Zf,{size:36}),h.jsx(U,{size:"xl",children:D.no_profiles_found})]})]})})};var GCe=Object.defineProperty,YCe=Object.defineProperties,KCe=Object.getOwnPropertyDescriptors,_y=Object.getOwnPropertySymbols,dB=Object.prototype.hasOwnProperty,fB=Object.prototype.propertyIsEnumerable,m5=(e,t,n)=>t in e?GCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,g5=(e,t)=>{for(var n in t||(t={}))dB.call(t,n)&&m5(e,n,t[n]);if(_y)for(var n of _y(t))fB.call(t,n)&&m5(e,n,t[n]);return e},v5=(e,t)=>YCe(e,KCe(t)),qCe=(e,t)=>{var n={};for(var r in e)dB.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&&fB.call(e,r)&&(n[r]=e[r]);return n};function Dx(e){var t=e,{direction:n,style:r}=t,o=qCe(t,["direction","style"]);const i=ir();return k.createElement(_q,v5(g5({},o),{style:v5(g5({},r),{transform:n==="next"&&i.dir==="ltr"||n==="previous"&&i.dir==="rtl"?"rotate(270deg)":"rotate(90deg)"})}))}Dx.displayName="@mantine/dates/Chevron";var JCe=Object.defineProperty,XCe=Object.defineProperties,QCe=Object.getOwnPropertyDescriptors,y5=Object.getOwnPropertySymbols,eke=Object.prototype.hasOwnProperty,tke=Object.prototype.propertyIsEnumerable,_5=(e,t,n)=>t in e?JCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hh=(e,t)=>{for(var n in t||(t={}))eke.call(t,n)&&_5(e,n,t[n]);if(y5)for(var n of y5(t))tke.call(t,n)&&_5(e,n,t[n]);return e},w5=(e,t)=>XCe(e,QCe(t));const Pf={xs:M(30),sm:M(36),md:M(42),lg:M(48),xl:M(54)};var nke=ue((e,{radius:t,isStatic:n},{size:r})=>{const o=e.fn.variant({variant:"filled"}),i=e.fn.variant({variant:"light"});return{day:w5(hh({width:re({size:r,sizes:Pf}),height:re({size:r,sizes:Pf}),fontSize:re({size:r,sizes:e.fontSizes}),display:"inline-flex",justifyContent:"center",alignItems:"center",userSelect:n?void 0:"none",cursor:n?"default":"pointer",borderRadius:e.fn.radius(t)},n?null:e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),{"&:active":n?void 0:e.activeStyles,"&[data-disabled]":w5(hh({color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4],cursor:"not-allowed"},e.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}}),"&[data-weekend]":{color:e.colors.red[e.fn.primaryShade()]},"&[data-outside]":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]},"&[data-in-range]":hh({backgroundColor:i.background,borderRadius:0},n?null:e.fn.hover({backgroundColor:i.hover})),"&[data-first-in-range]":{borderTopLeftRadius:e.radius.sm,borderBottomLeftRadius:e.radius.sm},"&[data-last-in-range]":{borderTopRightRadius:e.radius.sm,borderBottomRightRadius:e.radius.sm},"&[data-selected]":hh({color:o.color,backgroundColor:o.background},n?null:e.fn.hover({backgroundColor:o.hover})),"&[data-hidden]":{display:"none"}})}});const rke=nke;var oke=Object.defineProperty,ike=Object.defineProperties,ske=Object.getOwnPropertyDescriptors,b5=Object.getOwnPropertySymbols,ake=Object.prototype.hasOwnProperty,lke=Object.prototype.propertyIsEnumerable,x5=(e,t,n)=>t in e?oke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mh=(e,t)=>{for(var n in t||(t={}))ake.call(t,n)&&x5(e,n,t[n]);if(b5)for(var n of b5(t))lke.call(t,n)&&x5(e,n,t[n]);return e},gh=(e,t)=>ike(e,ske(t)),cke=ue((e,t,{size:n})=>{const r=re({size:n,sizes:Pf});return{calendarHeaderControlIcon:{},calendarHeader:{display:"flex",maxWidth:`calc(${r} * 7 + ${M(7)})`},calendarHeaderControl:gh(mh({width:r,height:r,borderRadius:e.fn.radius(),display:"flex",justifyContent:"center",alignItems:"center",userSelect:"none"},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),{"&:active":e.activeStyles,"&[data-disabled]":gh(mh({opacity:.2,cursor:"not-allowed"},e.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}})}),calendarHeaderLevel:gh(mh({height:r,borderRadius:e.fn.radius(),display:"flex",justifyContent:"center",alignItems:"center",userSelect:"none",flex:1,fontSize:re({size:n,sizes:e.fontSizes}),fontWeight:500,textTransform:"capitalize"},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),{"&:active":e.activeStyles,"&[data-static]":gh(mh({cursor:"default",userSelect:"unset"},e.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}})})}});const uke=cke;var dke=Object.defineProperty,wy=Object.getOwnPropertySymbols,pB=Object.prototype.hasOwnProperty,hB=Object.prototype.propertyIsEnumerable,S5=(e,t,n)=>t in e?dke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fke=(e,t)=>{for(var n in t||(t={}))pB.call(t,n)&&S5(e,n,t[n]);if(wy)for(var n of wy(t))hB.call(t,n)&&S5(e,n,t[n]);return e},pke=(e,t)=>{var n={};for(var r in e)pB.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&&hB.call(e,r)&&(n[r]=e[r]);return n};const hke={nextDisabled:!1,previousDisabled:!1,hasNextLevel:!0,withNext:!0,withPrevious:!0,size:"sm"},s1=_.forwardRef((e,t)=>{const n=ae("CalendarHeader",hke,e),{className:r,nextIcon:o,previousIcon:i,nextLabel:s,previousLabel:a,onNext:c,onPrevious:u,onLevelClick:f,label:p,classNames:g,styles:v,unstyled:y,nextDisabled:w,previousDisabled:P,hasNextLevel:x,levelControlAriaLabel:S,withNext:O,withPrevious:E,__staticSelector:$,__preventFocus:N,__stopPropagation:I,size:R,variant:B}=n,z=pke(n,["className","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","label","classNames","styles","unstyled","nextDisabled","previousDisabled","hasNextLevel","levelControlAriaLabel","withNext","withPrevious","__staticSelector","__preventFocus","__stopPropagation","size","variant"]),{classes:G,cx:X}=uke(null,{name:["CalendarHeader",$],classNames:g,styles:v,unstyled:y,size:R,variant:B}),Q=N?V=>V.preventDefault():void 0;return k.createElement(Pe,fke({className:X(G.calendarHeader,r),ref:t},z),E&&k.createElement(ls,{className:G.calendarHeaderControl,"data-previous":!0,"aria-label":a,onClick:u,unstyled:y,onMouseDown:Q,disabled:P,"data-disabled":P||void 0,tabIndex:N?-1:0,"data-mantine-stop-propagation":I||void 0},i||k.createElement(Dx,{className:G.calendarHeaderControlIcon,direction:"previous","data-previous":!0})),k.createElement(ls,{component:x?"button":"div",className:G.calendarHeaderLevel,onClick:x?f:void 0,unstyled:y,onMouseDown:x?Q:void 0,disabled:!x,"data-static":!x||void 0,"aria-label":S,tabIndex:N||!x?-1:0,"data-mantine-stop-propagation":I||void 0},p),O&&k.createElement(ls,{className:G.calendarHeaderControl,"data-next":!0,"aria-label":s,onClick:c,unstyled:y,onMouseDown:Q,disabled:w,"data-disabled":w||void 0,tabIndex:N?-1:0,"data-mantine-stop-propagation":I||void 0},o||k.createElement(Dx,{className:G.calendarHeaderControlIcon,direction:"next","data-next":!0})))});s1.displayName="@mantine/dates/CalendarHeader";function Cw(e,t){return e?e==="month"?0:e==="year"?1:2:t}function mke(e){return e===0?"month":e===1?"year":"decade"}function ud(e,t,n){return mke(ia(Cw(e,0),Cw(t,0),Cw(n,2)))}var gke=ue(()=>({calendar:{}}));const vke=gke;var yke=ue((e,t,{size:n})=>({monthLevelGroup:{display:"flex","& [data-month-level]:not(:last-of-type)":{marginRight:re({size:n,sizes:e.spacing})}}}));const _ke=yke;var wke=ue(e=>({monthLevel:{},calendarHeader:{marginBottom:e.spacing.xs}}));const bke=wke,xke={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–"},Ske=_.createContext(xke);var Pke=Object.defineProperty,Oke=Object.defineProperties,Cke=Object.getOwnPropertyDescriptors,P5=Object.getOwnPropertySymbols,kke=Object.prototype.hasOwnProperty,Eke=Object.prototype.propertyIsEnumerable,O5=(e,t,n)=>t in e?Pke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$ke=(e,t)=>{for(var n in t||(t={}))kke.call(t,n)&&O5(e,n,t[n]);if(P5)for(var n of P5(t))Eke.call(t,n)&&O5(e,n,t[n]);return e},Mke=(e,t)=>Oke(e,Cke(t));function za(){const e=_.useContext(Ske),t=_.useCallback(i=>i||e.locale,[e.locale]),n=_.useCallback(i=>typeof i=="number"?i:e.firstDayOfWeek,[e.firstDayOfWeek]),r=_.useCallback(i=>Array.isArray(i)?i:e.weekendDays,[e.weekendDays]),o=_.useCallback(i=>typeof i=="string"?i:e.labelSeparator,[e.labelSeparator]);return Mke($ke({},e),{getLocale:t,getFirstDayOfWeek:n,getWeekendDays:r,getLabelSeparator:o})}function Nke(e,t=1){const n=new Date(e);for(;n.getDay()!==t;)n.setDate(n.getDate()-1);return n}function Tke(e,t=1){const n=new Date(e),r=t===0?6:t-1;for(;n.getDay()!==r;)n.setDate(n.getDate()+1);return n}function Ike(e,t=1){const n=e.getMonth(),r=new Date(e.getFullYear(),n,1),o=new Date(e.getFullYear(),e.getMonth()+1,0),i=Tke(o,t),s=Nke(r,t),a=[];for(;s<=i;){const c=[];for(let u=0;u<7;u+=1)c.push(new Date(s)),s.setDate(s.getDate()+1);a.push(c)}return a}function mB(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function gB(e,t){return t instanceof Date?pe(e).isBefore(pe(t).add(1,"day"),"day"):!0}function vB(e,t){return t instanceof Date?pe(e).isAfter(pe(t).subtract(1,"day"),"day"):!0}var jke=Object.defineProperty,Lke=Object.defineProperties,Dke=Object.getOwnPropertyDescriptors,C5=Object.getOwnPropertySymbols,Rke=Object.prototype.hasOwnProperty,zke=Object.prototype.propertyIsEnumerable,k5=(e,t,n)=>t in e?jke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ake=(e,t)=>{for(var n in t||(t={}))Rke.call(t,n)&&k5(e,n,t[n]);if(C5)for(var n of C5(t))zke.call(t,n)&&k5(e,n,t[n]);return e},Bke=(e,t)=>Lke(e,Dke(t)),Fke=ue(e=>({monthThead:{},monthRow:{},monthTbody:{},monthCell:{padding:0,"&[data-with-spacing]":{padding:M(.5)}},month:Bke(Ake({},e.fn.fontStyles()),{borderCollapse:"collapse",tableLayout:"fixed","& *":{boxSizing:"border-box"}})}));const Vke=Fke;function Hke(e,t,n,r,o,i,s){const a=e.flat().filter(f=>{var p;return gB(f,n)&&vB(f,t)&&!o?.(f)&&!((p=r?.(f))!=null&&p.disabled)&&(!i||mB(f,s))}),c=a.find(f=>{var p;return(p=r?.(f))==null?void 0:p.selected});if(c)return c;const u=a.find(f=>pe().isSame(f,"date"));return u||a[0]}var Wke=Object.defineProperty,by=Object.getOwnPropertySymbols,yB=Object.prototype.hasOwnProperty,_B=Object.prototype.propertyIsEnumerable,E5=(e,t,n)=>t in e?Wke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Uke=(e,t)=>{for(var n in t||(t={}))yB.call(t,n)&&E5(e,n,t[n]);if(by)for(var n of by(t))_B.call(t,n)&&E5(e,n,t[n]);return e},Zke=(e,t)=>{var n={};for(var r in e)yB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&by)for(var r of by(e))t.indexOf(r)<0&&_B.call(e,r)&&(n[r]=e[r]);return n};const Gke={tabIndex:0,size:"sm"},wB=_.forwardRef((e,t)=>{const n=ae("Day",Gke,e),{className:r,date:o,radius:i,disabled:s,styles:a,classNames:c,unstyled:u,__staticSelector:f,weekend:p,outside:g,selected:v,renderDay:y,inRange:w,firstInRange:P,lastInRange:x,hidden:S,static:O,variant:E,size:$}=n,N=Zke(n,["className","date","radius","disabled","styles","classNames","unstyled","__staticSelector","weekend","outside","selected","renderDay","inRange","firstInRange","lastInRange","hidden","static","variant","size"]),{classes:I,cx:R}=rke({radius:i,isStatic:O},{name:["Day",f],classNames:c,styles:a,unstyled:u,variant:E,size:$});return k.createElement(ls,Uke({component:O?"div":"button",ref:t,className:R(I.day,r),disabled:s,"data-today":pe(o).isSame(new Date,"day")||void 0,"data-hidden":S||void 0,"data-disabled":s||void 0,"data-weekend":!s&&!g&&p||void 0,"data-outside":!s&&g||void 0,"data-selected":!s&&v||void 0,"data-in-range":w&&!s||void 0,"data-first-in-range":P&&!s||void 0,"data-last-in-range":x&&!s||void 0,unstyled:u},N),y?.(o)||o.getDate())});wB.displayName="@mantine/dates/Day";function Yke({locale:e,format:t="dd",firstDayOfWeek:n=1}){const r=pe().day(n),o=[];for(let i=0;i<7;i+=1)typeof t=="string"?o.push(pe(r).add(i,"days").locale(e).format(t)):o.push(t(pe(r).add(i,"days").toDate()));return o}var Kke=ue((e,t,{size:n})=>({weekdaysRow:{},weekday:{color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[5],fontWeight:400,fontSize:re({size:n,sizes:e.fontSizes}),textTransform:"capitalize",paddingBottom:`calc(${re({size:n,sizes:e.spacing})} / 2)`}}));const qke=Kke;var Jke=Object.defineProperty,xy=Object.getOwnPropertySymbols,bB=Object.prototype.hasOwnProperty,xB=Object.prototype.propertyIsEnumerable,$5=(e,t,n)=>t in e?Jke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xke=(e,t)=>{for(var n in t||(t={}))bB.call(t,n)&&$5(e,n,t[n]);if(xy)for(var n of xy(t))xB.call(t,n)&&$5(e,n,t[n]);return e},Qke=(e,t)=>{var n={};for(var r in e)bB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&xy)for(var r of xy(e))t.indexOf(r)<0&&xB.call(e,r)&&(n[r]=e[r]);return n};const e2e={weekdayFormat:"dd",cellComponent:"th",size:"sm"},SB=_.forwardRef((e,t)=>{const n=ae("WeekdaysRow",e2e,e),{className:r,locale:o,firstDayOfWeek:i,weekdayFormat:s,cellComponent:a,__staticSelector:c,classNames:u,styles:f,unstyled:p,variant:g,size:v}=n,y=Qke(n,["className","locale","firstDayOfWeek","weekdayFormat","cellComponent","__staticSelector","classNames","styles","unstyled","variant","size"]),w=za(),{classes:P,cx:x}=qke(null,{name:["WeekdaysRow",c],classNames:u,styles:f,unstyled:p,variant:g,size:v}),S=Yke({locale:w.getLocale(o),format:s,firstDayOfWeek:w.getFirstDayOfWeek(i)}).map((O,E)=>k.createElement(a,{key:E,className:P.weekday},O));return k.createElement(Pe,Xke({component:"tr",ref:t,className:x(P.weekdaysRow,r)},y),S)});SB.displayName="@mantine/dates/WeekdaysRow";var t2e=Object.defineProperty,n2e=Object.defineProperties,r2e=Object.getOwnPropertyDescriptors,Sy=Object.getOwnPropertySymbols,PB=Object.prototype.hasOwnProperty,OB=Object.prototype.propertyIsEnumerable,M5=(e,t,n)=>t in e?t2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vh=(e,t)=>{for(var n in t||(t={}))PB.call(t,n)&&M5(e,n,t[n]);if(Sy)for(var n of Sy(t))OB.call(t,n)&&M5(e,n,t[n]);return e},kw=(e,t)=>n2e(e,r2e(t)),o2e=(e,t)=>{var n={};for(var r in e)PB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Sy)for(var r of Sy(e))t.indexOf(r)<0&&OB.call(e,r)&&(n[r]=e[r]);return n};const i2e={size:"sm",withCellSpacing:!0},CB=_.forwardRef((e,t)=>{const n=ae("Month",i2e,e),{className:r,classNames:o,styles:i,unstyled:s,__staticSelector:a,locale:c,firstDayOfWeek:u,weekdayFormat:f,month:p,weekendDays:g,getDayProps:v,excludeDate:y,minDate:w,maxDate:P,renderDay:x,hideOutsideDates:S,hideWeekdays:O,getDayAriaLabel:E,static:$,__getDayRef:N,__onDayKeyDown:I,__onDayClick:R,__onDayMouseEnter:B,__preventFocus:z,__stopPropagation:G,withCellSpacing:X,size:Q,variant:V}=n,H=o2e(n,["className","classNames","styles","unstyled","__staticSelector","locale","firstDayOfWeek","weekdayFormat","month","weekendDays","getDayProps","excludeDate","minDate","maxDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","static","__getDayRef","__onDayKeyDown","__onDayClick","__onDayMouseEnter","__preventFocus","__stopPropagation","withCellSpacing","size","variant"]),Z=za(),{classes:Y,cx:j}=Vke(null,{name:["Month",a],classNames:o,styles:i,unstyled:s,variant:V,size:Q}),W={__staticSelector:a||"Month",classNames:o,styles:i,unstyled:s,variant:V,size:Q},F=Ike(p,Z.getFirstDayOfWeek(u)),K=Hke(F,w,P,v,y,S,p),ee=F.map((fe,ie)=>{const J=fe.map((ne,le)=>{const _e=!mB(ne,p),Ne=E?.(ne)||pe(ne).locale(c||Z.locale).format("D MMMM YYYY"),we=v?.(ne),He=pe(ne).isSame(K,"date");return k.createElement("td",{key:ne.toString(),className:Y.monthCell,"data-with-spacing":X||void 0},k.createElement(wB,kw(vh(kw(vh({},W),{"data-mantine-stop-propagation":G||void 0,renderDay:x,date:ne,weekend:Z.getWeekendDays(g).includes(ne.getDay()),outside:_e,hidden:S?_e:!1,"aria-label":Ne,static:$,disabled:y?.(ne)||!gB(ne,P)||!vB(ne,w),ref:Te=>N?.(ie,le,Te)}),we),{onKeyDown:Te=>{var je;(je=we?.onKeyDown)==null||je.call(we,Te),I?.(Te,{rowIndex:ie,cellIndex:le,date:ne})},onMouseEnter:Te=>{var je;(je=we?.onMouseEnter)==null||je.call(we,Te),B?.(Te,ne)},onClick:Te=>{var je;(je=we?.onClick)==null||je.call(we,Te),R?.(Te,ne)},onMouseDown:Te=>{var je;(je=we?.onMouseDown)==null||je.call(we,Te),z&&Te.preventDefault()},tabIndex:z||!He?-1:0})))});return k.createElement("tr",{key:ie,className:Y.monthRow},J)});return k.createElement(Pe,vh({component:"table",className:j(Y.month,r),ref:t},H),!O&&k.createElement("thead",{className:Y.monthThead},k.createElement(SB,kw(vh({},W),{locale:c,firstDayOfWeek:u,weekdayFormat:f}))),k.createElement("tbody",{className:Y.monthTbody},ee))});CB.displayName="@mantine/dates/Month";var s2e=Object.defineProperty,Py=Object.getOwnPropertySymbols,kB=Object.prototype.hasOwnProperty,EB=Object.prototype.propertyIsEnumerable,N5=(e,t,n)=>t in e?s2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ew=(e,t)=>{for(var n in t||(t={}))kB.call(t,n)&&N5(e,n,t[n]);if(Py)for(var n of Py(t))EB.call(t,n)&&N5(e,n,t[n]);return e},a2e=(e,t)=>{var n={};for(var r in e)kB.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&&EB.call(e,r)&&(n[r]=e[r]);return n};const l2e={monthLabelFormat:"MMMM YYYY"},$B=_.forwardRef((e,t)=>{const n=ae("MonthLevel",l2e,e),{month:r,locale:o,firstDayOfWeek:i,weekdayFormat:s,weekendDays:a,getDayProps:c,excludeDate:u,minDate:f,maxDate:p,renderDay:g,hideOutsideDates:v,hideWeekdays:y,getDayAriaLabel:w,__getDayRef:P,__onDayKeyDown:x,__onDayClick:S,__onDayMouseEnter:O,withCellSpacing:E,__preventFocus:$,__stopPropagation:N,nextIcon:I,previousIcon:R,nextLabel:B,previousLabel:z,onNext:G,onPrevious:X,onLevelClick:Q,nextDisabled:V,previousDisabled:H,hasNextLevel:Z,levelControlAriaLabel:Y,withNext:j,withPrevious:W,className:F,monthLabelFormat:K,classNames:ee,styles:fe,unstyled:ie,__staticSelector:J,size:ne,variant:le,static:_e}=n,Ne=a2e(n,["month","locale","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","minDate","maxDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","__getDayRef","__onDayKeyDown","__onDayClick","__onDayMouseEnter","withCellSpacing","__preventFocus","__stopPropagation","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","levelControlAriaLabel","withNext","withPrevious","className","monthLabelFormat","classNames","styles","unstyled","__staticSelector","size","variant","static"]),{classes:we,cx:He}=bke(null,{name:["MonthLevel",J],classNames:ee,styles:fe,unstyled:ie,variant:le,size:ne}),Te=za(),je={__staticSelector:J||"MonthLevel",classNames:ee,styles:fe,unstyled:ie,variant:le,size:ne},it=typeof V=="boolean"?V:p?!pe(r).endOf("month").isBefore(p):!1,bt=typeof H=="boolean"?H:f?!pe(r).startOf("month").isAfter(f):!1;return k.createElement(Pe,Ew({className:He(we.monthLevel,F),"data-month-level":!0,ref:t},Ne),k.createElement(s1,Ew({label:typeof K=="function"?K(r):pe(r).locale(o||Te.locale).format(K),className:we.calendarHeader,__preventFocus:$,__stopPropagation:N,nextIcon:I,previousIcon:R,nextLabel:B,previousLabel:z,onNext:G,onPrevious:X,onLevelClick:Q,nextDisabled:it,previousDisabled:bt,hasNextLevel:Z,levelControlAriaLabel:Y,withNext:j,withPrevious:W},je)),k.createElement(CB,Ew({month:r,locale:o,firstDayOfWeek:i,weekdayFormat:s,weekendDays:a,getDayProps:c,excludeDate:u,minDate:f,maxDate:p,renderDay:g,hideOutsideDates:v,hideWeekdays:y,getDayAriaLabel:w,__getDayRef:P,__onDayKeyDown:x,__onDayClick:S,__onDayMouseEnter:O,__preventFocus:$,__stopPropagation:N,static:_e,withCellSpacing:E},je)))});$B.displayName="@mantine/dates/MonthLevel";function c2e({direction:e,levelIndex:t,rowIndex:n,cellIndex:r,size:o}){switch(e){case"up":return t===0&&n===0?null:n===0?{levelIndex:t-1,rowIndex:r<=o[t-1][o[t-1].length-1]-1?o[t-1].length-1:o[t-1].length-2,cellIndex:r}:{levelIndex:t,rowIndex:n-1,cellIndex:r};case"down":return n===o[t].length-1?{levelIndex:t+1,rowIndex:0,cellIndex:r}:n===o[t].length-2&&r>=o[t][o[t].length-1]?{levelIndex:t+1,rowIndex:0,cellIndex:r}:{levelIndex:t,rowIndex:n+1,cellIndex:r};case"left":return t===0&&n===0&&r===0?null:n===0&&r===0?{levelIndex:t-1,rowIndex:o[t-1].length-1,cellIndex:o[t-1][o[t-1].length-1]-1}:r===0?{levelIndex:t,rowIndex:n-1,cellIndex:o[t][n-1]-1}:{levelIndex:t,rowIndex:n,cellIndex:r-1};case"right":return n===o[t].length-1&&r===o[t][n]-1?{levelIndex:t+1,rowIndex:0,cellIndex:0}:r===o[t][n]-1?{levelIndex:t,rowIndex:n+1,cellIndex:0}:{levelIndex:t,rowIndex:n,cellIndex:r+1};default:return{levelIndex:t,rowIndex:n,cellIndex:r}}}function MB({controlsRef:e,direction:t,levelIndex:n,rowIndex:r,cellIndex:o,size:i}){var s,a;const c=c2e({direction:t,size:i,rowIndex:r,cellIndex:o,levelIndex:n});if(!c)return;const u=(a=(s=e.current[c.levelIndex])==null?void 0:s[c.rowIndex])==null?void 0:a[c.cellIndex];u&&(u.disabled||u.getAttribute("data-hidden")||u.getAttribute("data-outside")?MB({controlsRef:e,direction:t,levelIndex:c.levelIndex,cellIndex:c.cellIndex,rowIndex:c.rowIndex,size:i}):u.focus())}function u2e(e){switch(e){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function d2e(e){return e.current.map(t=>t.map(n=>n.length))}function CO({controlsRef:e,levelIndex:t,rowIndex:n,cellIndex:r,event:o}){const i=u2e(o.key);if(i){o.preventDefault();const s=d2e(e);MB({controlsRef:e,direction:i,levelIndex:t,rowIndex:n,cellIndex:r,size:s})}}var f2e=Object.defineProperty,Oy=Object.getOwnPropertySymbols,NB=Object.prototype.hasOwnProperty,TB=Object.prototype.propertyIsEnumerable,T5=(e,t,n)=>t in e?f2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,p2e=(e,t)=>{for(var n in t||(t={}))NB.call(t,n)&&T5(e,n,t[n]);if(Oy)for(var n of Oy(t))TB.call(t,n)&&T5(e,n,t[n]);return e},h2e=(e,t)=>{var n={};for(var r in e)NB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Oy)for(var r of Oy(e))t.indexOf(r)<0&&TB.call(e,r)&&(n[r]=e[r]);return n};const m2e={numberOfColumns:1},IB=_.forwardRef((e,t)=>{const n=ae("MonthLevelGroup",m2e,e),{month:r,locale:o,firstDayOfWeek:i,weekdayFormat:s,weekendDays:a,getDayProps:c,excludeDate:u,minDate:f,maxDate:p,renderDay:g,hideOutsideDates:v,hideWeekdays:y,getDayAriaLabel:w,__onDayClick:P,__onDayMouseEnter:x,withCellSpacing:S,__preventFocus:O,nextIcon:E,previousIcon:$,nextLabel:N,previousLabel:I,onNext:R,onPrevious:B,onLevelClick:z,nextDisabled:G,previousDisabled:X,hasNextLevel:Q,className:V,classNames:H,styles:Z,unstyled:Y,numberOfColumns:j,levelControlAriaLabel:W,monthLabelFormat:F,__staticSelector:K,__stopPropagation:ee,size:fe,variant:ie,static:J}=n,ne=h2e(n,["month","locale","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","minDate","maxDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","__onDayClick","__onDayMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","className","classNames","styles","unstyled","numberOfColumns","levelControlAriaLabel","monthLabelFormat","__staticSelector","__stopPropagation","size","variant","static"]),{classes:le,cx:_e}=_ke(null,{name:["MonthLevelGroup",K],classNames:H,styles:Z,unstyled:Y,variant:ie,size:fe}),Ne=_.useRef([]),we=Array(j).fill(0).map((He,Te)=>{const je=pe(r).add(Te,"months").toDate();return k.createElement($B,{key:Te,month:je,withNext:Te===j-1,withPrevious:Te===0,monthLabelFormat:F,__stopPropagation:ee,__onDayClick:P,__onDayMouseEnter:x,__onDayKeyDown:(it,bt)=>CO({levelIndex:Te,rowIndex:bt.rowIndex,cellIndex:bt.cellIndex,event:it,controlsRef:Ne}),__getDayRef:(it,bt,_n)=>{Array.isArray(Ne.current[Te])||(Ne.current[Te]=[]),Array.isArray(Ne.current[Te][it])||(Ne.current[Te][it]=[]),Ne.current[Te][it][bt]=_n},levelControlAriaLabel:typeof W=="function"?W(je):W,locale:o,firstDayOfWeek:i,weekdayFormat:s,weekendDays:a,getDayProps:c,excludeDate:u,minDate:f,maxDate:p,renderDay:g,hideOutsideDates:v,hideWeekdays:y,getDayAriaLabel:w,__preventFocus:O,nextIcon:E,previousIcon:$,nextLabel:N,previousLabel:I,onNext:R,onPrevious:B,onLevelClick:z,nextDisabled:G,previousDisabled:X,hasNextLevel:Q,classNames:H,styles:Z,unstyled:Y,__staticSelector:K||"MonthLevelGroup",size:fe,variant:ie,static:J,withCellSpacing:S})});return k.createElement(Pe,p2e({className:_e(le.monthLevelGroup,V),ref:t},ne),we)});IB.displayName="@mantine/dates/MonthLevelGroup";var g2e=ue((e,t,{size:n})=>({yearLevelGroup:{display:"flex","& [data-year-level]:not(:last-of-type)":{marginRight:re({size:n,sizes:e.spacing})}}}));const v2e=g2e;var y2e=ue(e=>({yearLevel:{},calendarHeader:{marginBottom:e.spacing.xs}}));const _2e=y2e;function w2e(e){const t=pe(e).startOf("year").toDate(),n=[[],[],[],[]];let r=0;for(let o=0;o<4;o+=1)for(let i=0;i<3;i+=1)n[o].push(pe(t).add(r,"months").toDate()),r+=1;return n}function jB(e,t,n){return!t&&!n?!1:!!(t&&pe(e).isBefore(t,"month")||n&&pe(e).isAfter(n,"month"))}var b2e=ue(()=>({monthsList:{borderCollapse:"collapse",borderWidth:0,cursor:"pointer"},monthsListCell:{padding:0,"&[data-with-spacing]":{padding:M(.5)}},monthsListRow:{}}));const x2e=b2e;function S2e(e,t,n,r){const o=e.flat().filter(a=>{var c;return!jB(a,t,n)&&!((c=r?.(a))!=null&&c.disabled)}),i=o.find(a=>{var c;return(c=r?.(a))==null?void 0:c.selected});if(i)return i;const s=o.find(a=>pe().isSame(a,"month"));return s||o[0]}var P2e=Object.defineProperty,O2e=Object.defineProperties,C2e=Object.getOwnPropertyDescriptors,I5=Object.getOwnPropertySymbols,k2e=Object.prototype.hasOwnProperty,E2e=Object.prototype.propertyIsEnumerable,j5=(e,t,n)=>t in e?P2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yh=(e,t)=>{for(var n in t||(t={}))k2e.call(t,n)&&j5(e,n,t[n]);if(I5)for(var n of I5(t))E2e.call(t,n)&&j5(e,n,t[n]);return e},L5=(e,t)=>O2e(e,C2e(t)),$2e=ue((e,t,{size:n})=>{const r=e.fn.variant({variant:"filled"}),o=e.fn.variant({variant:"light"});return{pickerControl:L5(yh({fontSize:re({size:n,sizes:e.fontSizes}),height:re({size:n,sizes:Pf}),width:`calc((${re({size:n,sizes:Pf})} * 7) / 3 + ${M(1.5)})`,display:"flex",justifyContent:"center",alignItems:"center",userSelect:"none",borderRadius:e.fn.radius()},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),{"&:active":e.activeStyles,"&[data-in-range]":yh({backgroundColor:o.background,borderRadius:0},e.fn.hover({backgroundColor:o.hover})),"&[data-first-in-range]":{borderRadius:0,borderTopLeftRadius:e.radius.sm,borderBottomLeftRadius:e.radius.sm},"&[data-last-in-range]":{borderRadius:0,borderTopRightRadius:e.radius.sm,borderBottomRightRadius:e.radius.sm},"&[data-last-in-range][data-first-in-range]":{borderRadius:e.radius.sm},"&[data-selected]":yh({color:r.color,backgroundColor:r.background},e.fn.hover({backgroundColor:r.hover})),"&[data-disabled]":L5(yh({color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4],cursor:"not-allowed"},e.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}})})}});const M2e=$2e;var N2e=Object.defineProperty,Cy=Object.getOwnPropertySymbols,LB=Object.prototype.hasOwnProperty,DB=Object.prototype.propertyIsEnumerable,D5=(e,t,n)=>t in e?N2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,T2e=(e,t)=>{for(var n in t||(t={}))LB.call(t,n)&&D5(e,n,t[n]);if(Cy)for(var n of Cy(t))DB.call(t,n)&&D5(e,n,t[n]);return e},I2e=(e,t)=>{var n={};for(var r in e)LB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Cy)for(var r of Cy(e))t.indexOf(r)<0&&DB.call(e,r)&&(n[r]=e[r]);return n};const j2e={size:"sm"},kO=_.forwardRef((e,t)=>{const n=ae("PickerControl",j2e,e),{className:r,children:o,disabled:i,selected:s,classNames:a,styles:c,unstyled:u,firstInRange:f,lastInRange:p,inRange:g,__staticSelector:v,size:y,variant:w}=n,P=I2e(n,["className","children","disabled","selected","classNames","styles","unstyled","firstInRange","lastInRange","inRange","__staticSelector","size","variant"]),{classes:x,cx:S}=M2e(null,{name:["PickerControl",v],classNames:a,styles:c,unstyled:u,variant:w,size:y});return k.createElement(ls,T2e({className:S(x.pickerControl,r),ref:t,unstyled:u,"data-picker-control":!0,"data-selected":s&&!i||void 0,"data-disabled":i||void 0,"data-in-range":g&&!i&&!s||void 0,"data-first-in-range":f&&!i||void 0,"data-last-in-range":p&&!i||void 0,disabled:i},P),o)});kO.displayName="@mantine/dates/PickerControl";var L2e=Object.defineProperty,D2e=Object.defineProperties,R2e=Object.getOwnPropertyDescriptors,ky=Object.getOwnPropertySymbols,RB=Object.prototype.hasOwnProperty,zB=Object.prototype.propertyIsEnumerable,R5=(e,t,n)=>t in e?L2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,z5=(e,t)=>{for(var n in t||(t={}))RB.call(t,n)&&R5(e,n,t[n]);if(ky)for(var n of ky(t))zB.call(t,n)&&R5(e,n,t[n]);return e},z2e=(e,t)=>D2e(e,R2e(t)),A2e=(e,t)=>{var n={};for(var r in e)RB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ky)for(var r of ky(e))t.indexOf(r)<0&&zB.call(e,r)&&(n[r]=e[r]);return n};const B2e={monthsListFormat:"MMM",size:"sm",withCellSpacing:!0},AB=_.forwardRef((e,t)=>{const n=ae("MonthsList",B2e,e),{year:r,className:o,monthsListFormat:i,locale:s,minDate:a,maxDate:c,getMonthControlProps:u,classNames:f,styles:p,unstyled:g,__staticSelector:v,__getControlRef:y,__onControlKeyDown:w,__onControlClick:P,__onControlMouseEnter:x,__preventFocus:S,size:O,variant:E,__stopPropagation:$,withCellSpacing:N}=n,I=A2e(n,["year","className","monthsListFormat","locale","minDate","maxDate","getMonthControlProps","classNames","styles","unstyled","__staticSelector","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","__preventFocus","size","variant","__stopPropagation","withCellSpacing"]),{classes:R,cx:B}=x2e(null,{name:["MonthsList",v],classNames:f,styles:p,unstyled:g,variant:E,size:O}),z=za(),G=w2e(r),X=S2e(G,a,c,u),Q=G.map((V,H)=>{const Z=V.map((Y,j)=>{const W=u?.(Y),F=pe(Y).isSame(X,"month");return k.createElement("td",{key:j,className:R.monthsListCell,"data-with-spacing":N||void 0},k.createElement(kO,z2e(z5({variant:E,size:O,classNames:f,styles:p,unstyled:g,__staticSelector:v||"MonthsList","data-mantine-stop-propagation":$||void 0,disabled:jB(Y,a,c),ref:K=>y?.(H,j,K)},W),{onKeyDown:K=>{var ee;(ee=W?.onKeyDown)==null||ee.call(W,K),w?.(K,{rowIndex:H,cellIndex:j,date:Y})},onClick:K=>{var ee;(ee=W?.onClick)==null||ee.call(W,K),P?.(K,Y)},onMouseEnter:K=>{var ee;(ee=W?.onMouseEnter)==null||ee.call(W,K),x?.(K,Y)},onMouseDown:K=>{var ee;(ee=W?.onMouseDown)==null||ee.call(W,K),S&&K.preventDefault()},tabIndex:S||!F?-1:0}),pe(Y).locale(z.getLocale(s)).format(i)))});return k.createElement("tr",{key:H,className:R.monthsListRow},Z)});return k.createElement(Pe,z5({component:"table",ref:t,className:B(R.monthsList,o)},I),k.createElement("tbody",null,Q))});AB.displayName="@mantine/dates/MonthsList";var F2e=Object.defineProperty,Ey=Object.getOwnPropertySymbols,BB=Object.prototype.hasOwnProperty,FB=Object.prototype.propertyIsEnumerable,A5=(e,t,n)=>t in e?F2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$w=(e,t)=>{for(var n in t||(t={}))BB.call(t,n)&&A5(e,n,t[n]);if(Ey)for(var n of Ey(t))FB.call(t,n)&&A5(e,n,t[n]);return e},V2e=(e,t)=>{var n={};for(var r in e)BB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ey)for(var r of Ey(e))t.indexOf(r)<0&&FB.call(e,r)&&(n[r]=e[r]);return n};const H2e={yearLabelFormat:"YYYY",size:"sm"},VB=_.forwardRef((e,t)=>{const n=ae("YearLevel",H2e,e),{year:r,locale:o,minDate:i,maxDate:s,monthsListFormat:a,getMonthControlProps:c,__getControlRef:u,__onControlKeyDown:f,__onControlClick:p,__onControlMouseEnter:g,withCellSpacing:v,__preventFocus:y,nextIcon:w,previousIcon:P,nextLabel:x,previousLabel:S,onNext:O,onPrevious:E,onLevelClick:$,nextDisabled:N,previousDisabled:I,hasNextLevel:R,levelControlAriaLabel:B,withNext:z,withPrevious:G,className:X,yearLabelFormat:Q,classNames:V,styles:H,unstyled:Z,__staticSelector:Y,__stopPropagation:j,size:W,variant:F}=n,K=V2e(n,["year","locale","minDate","maxDate","monthsListFormat","getMonthControlProps","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","levelControlAriaLabel","withNext","withPrevious","className","yearLabelFormat","classNames","styles","unstyled","__staticSelector","__stopPropagation","size","variant"]),{classes:ee,cx:fe}=_2e(null,{name:["YearLevel",Y],classNames:V,styles:H,unstyled:Z,size:W,variant:F}),ie=za(),J={__staticSelector:Y||"YearLevel",classNames:V,styles:H,unstyled:Z,size:W,variant:F},ne=typeof N=="boolean"?N:s?!pe(r).endOf("year").isBefore(s):!1,le=typeof I=="boolean"?I:i?!pe(r).startOf("year").isAfter(i):!1;return k.createElement(Pe,$w({className:fe(ee.yearLevel,X),"data-year-level":!0,ref:t},K),k.createElement(s1,$w({label:typeof Q=="function"?Q(r):pe(r).locale(o||ie.locale).format(Q),className:ee.calendarHeader,__preventFocus:y,__stopPropagation:j,nextIcon:w,previousIcon:P,nextLabel:x,previousLabel:S,onNext:O,onPrevious:E,onLevelClick:$,nextDisabled:ne,previousDisabled:le,hasNextLevel:R,levelControlAriaLabel:B,withNext:z,withPrevious:G},J)),k.createElement(AB,$w({year:r,locale:o,minDate:i,maxDate:s,monthsListFormat:a,getMonthControlProps:c,__getControlRef:u,__onControlKeyDown:f,__onControlClick:p,__onControlMouseEnter:g,__preventFocus:y,__stopPropagation:j,withCellSpacing:v},J)))});VB.displayName="@mantine/dates/YearLevel";var W2e=Object.defineProperty,$y=Object.getOwnPropertySymbols,HB=Object.prototype.hasOwnProperty,WB=Object.prototype.propertyIsEnumerable,B5=(e,t,n)=>t in e?W2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,U2e=(e,t)=>{for(var n in t||(t={}))HB.call(t,n)&&B5(e,n,t[n]);if($y)for(var n of $y(t))WB.call(t,n)&&B5(e,n,t[n]);return e},Z2e=(e,t)=>{var n={};for(var r in e)HB.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&&WB.call(e,r)&&(n[r]=e[r]);return n};const G2e={numberOfColumns:1,size:"sm"},UB=_.forwardRef((e,t)=>{const n=ae("YearLevelGroup",G2e,e),{year:r,locale:o,minDate:i,maxDate:s,monthsListFormat:a,getMonthControlProps:c,__onControlClick:u,__onControlMouseEnter:f,withCellSpacing:p,__preventFocus:g,nextIcon:v,previousIcon:y,nextLabel:w,previousLabel:P,onNext:x,onPrevious:S,onLevelClick:O,nextDisabled:E,previousDisabled:$,hasNextLevel:N,className:I,classNames:R,styles:B,unstyled:z,__staticSelector:G,__stopPropagation:X,numberOfColumns:Q,levelControlAriaLabel:V,yearLabelFormat:H,variant:Z,size:Y}=n,j=Z2e(n,["year","locale","minDate","maxDate","monthsListFormat","getMonthControlProps","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","className","classNames","styles","unstyled","__staticSelector","__stopPropagation","numberOfColumns","levelControlAriaLabel","yearLabelFormat","variant","size"]),{classes:W,cx:F}=v2e(null,{name:["YearLevelGroup",G],styles:B,classNames:R,unstyled:z,variant:Z,size:Y}),K=_.useRef([]),ee=Array(Q).fill(0).map((fe,ie)=>{const J=pe(r).add(ie,"years").toDate();return k.createElement(VB,{key:ie,variant:Z,size:Y,monthsListFormat:a,year:J,withNext:ie===Q-1,withPrevious:ie===0,yearLabelFormat:H,__stopPropagation:X,__onControlClick:u,__onControlMouseEnter:f,__onControlKeyDown:(ne,le)=>CO({levelIndex:ie,rowIndex:le.rowIndex,cellIndex:le.cellIndex,event:ne,controlsRef:K}),__getControlRef:(ne,le,_e)=>{Array.isArray(K.current[ie])||(K.current[ie]=[]),Array.isArray(K.current[ie][ne])||(K.current[ie][ne]=[]),K.current[ie][ne][le]=_e},levelControlAriaLabel:typeof V=="function"?V(J):V,locale:o,minDate:i,maxDate:s,__preventFocus:g,nextIcon:v,previousIcon:y,nextLabel:w,previousLabel:P,onNext:x,onPrevious:S,onLevelClick:O,nextDisabled:E,previousDisabled:$,hasNextLevel:N,getMonthControlProps:c,classNames:R,styles:B,unstyled:z,__staticSelector:G||"YearLevelGroup",withCellSpacing:p})});return k.createElement(Pe,U2e({className:F(W.yearLevelGroup,I),ref:t},j),ee)});UB.displayName="@mantine/dates/YearLevelGroup";var Y2e=ue(e=>({decadeLevelGroup:{display:"flex",gap:e.spacing.md}}));const K2e=Y2e;function ZB(e){const t=e.getFullYear(),n=t-t%10;let r=0;const o=[[],[],[],[]];for(let i=0;i<4;i+=1){const s=i===3?1:3;for(let a=0;a({decadeLevel:{},calendarHeader:{marginBottom:e.spacing.xs}}));const X2e=J2e;function GB(e,t,n){return!t&&!n?!1:!!(t&&pe(e).isBefore(t,"year")||n&&pe(e).isAfter(n,"year"))}var Q2e=ue(()=>({yearsList:{borderCollapse:"collapse",borderWidth:0},yearsListCell:{padding:0,"&[data-with-spacing]":{padding:M(.5)}},yearsListRow:{}}));const eEe=Q2e;function tEe(e,t,n,r){const o=e.flat().filter(a=>{var c;return!GB(a,t,n)&&!((c=r?.(a))!=null&&c.disabled)}),i=o.find(a=>{var c;return(c=r?.(a))==null?void 0:c.selected});if(i)return i;const s=o.find(a=>pe().isSame(a,"year"));return s||o[0]}var nEe=Object.defineProperty,rEe=Object.defineProperties,oEe=Object.getOwnPropertyDescriptors,My=Object.getOwnPropertySymbols,YB=Object.prototype.hasOwnProperty,KB=Object.prototype.propertyIsEnumerable,F5=(e,t,n)=>t in e?nEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,V5=(e,t)=>{for(var n in t||(t={}))YB.call(t,n)&&F5(e,n,t[n]);if(My)for(var n of My(t))KB.call(t,n)&&F5(e,n,t[n]);return e},iEe=(e,t)=>rEe(e,oEe(t)),sEe=(e,t)=>{var n={};for(var r in e)YB.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&&KB.call(e,r)&&(n[r]=e[r]);return n};const aEe={yearsListFormat:"YYYY",size:"sm",withCellSpacing:!0},qB=_.forwardRef((e,t)=>{const n=ae("YearsList",aEe,e),{decade:r,className:o,yearsListFormat:i,locale:s,minDate:a,maxDate:c,getYearControlProps:u,classNames:f,styles:p,unstyled:g,__staticSelector:v,__getControlRef:y,__onControlKeyDown:w,__onControlClick:P,__onControlMouseEnter:x,__preventFocus:S,__stopPropagation:O,size:E,variant:$,withCellSpacing:N}=n,I=sEe(n,["decade","className","yearsListFormat","locale","minDate","maxDate","getYearControlProps","classNames","styles","unstyled","__staticSelector","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","__preventFocus","__stopPropagation","size","variant","withCellSpacing"]),{classes:R,cx:B}=eEe(null,{name:["YearsList",v],classNames:f,styles:p,unstyled:g,variant:$,size:E}),z=za(),G=ZB(r),X=tEe(G,a,c,u),Q=G.map((V,H)=>{const Z=V.map((Y,j)=>{const W=u?.(Y),F=pe(Y).isSame(X,"year");return k.createElement("td",{key:j,className:R.yearsListCell,"data-with-spacing":N||void 0},k.createElement(kO,iEe(V5({size:E,variant:$,classNames:f,styles:p,unstyled:g,__staticSelector:v||"YearsList","data-mantine-stop-propagation":O||void 0,disabled:GB(Y,a,c),ref:K=>y?.(H,j,K)},W),{onKeyDown:K=>{var ee;(ee=W?.onKeyDown)==null||ee.call(W,K),w?.(K,{rowIndex:H,cellIndex:j,date:Y})},onClick:K=>{var ee;(ee=W?.onClick)==null||ee.call(W,K),P?.(K,Y)},onMouseEnter:K=>{var ee;(ee=W?.onMouseEnter)==null||ee.call(W,K),x?.(K,Y)},onMouseDown:K=>{var ee;(ee=W?.onMouseDown)==null||ee.call(W,K),S&&K.preventDefault()},tabIndex:S||!F?-1:0}),pe(Y).locale(z.getLocale(s)).format(i)))});return k.createElement("tr",{key:H,className:R.yearsListRow},Z)});return k.createElement(Pe,V5({component:"table",ref:t,className:B(R.yearsList,o)},I),k.createElement("tbody",null,Q))});qB.displayName="@mantine/dates/YearsList";var lEe=Object.defineProperty,Ny=Object.getOwnPropertySymbols,JB=Object.prototype.hasOwnProperty,XB=Object.prototype.propertyIsEnumerable,H5=(e,t,n)=>t in e?lEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mw=(e,t)=>{for(var n in t||(t={}))JB.call(t,n)&&H5(e,n,t[n]);if(Ny)for(var n of Ny(t))XB.call(t,n)&&H5(e,n,t[n]);return e},cEe=(e,t)=>{var n={};for(var r in e)JB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ny)for(var r of Ny(e))t.indexOf(r)<0&&XB.call(e,r)&&(n[r]=e[r]);return n};const uEe={decadeLabelFormat:"YYYY"},QB=_.forwardRef((e,t)=>{const n=ae("DecadeLevel",uEe,e),{decade:r,locale:o,minDate:i,maxDate:s,yearsListFormat:a,getYearControlProps:c,__getControlRef:u,__onControlKeyDown:f,__onControlClick:p,__onControlMouseEnter:g,withCellSpacing:v,__preventFocus:y,nextIcon:w,previousIcon:P,nextLabel:x,previousLabel:S,onNext:O,onPrevious:E,nextDisabled:$,previousDisabled:N,levelControlAriaLabel:I,withNext:R,withPrevious:B,className:z,decadeLabelFormat:G,classNames:X,styles:Q,unstyled:V,__staticSelector:H,__stopPropagation:Z,variant:Y,size:j}=n,W=cEe(n,["decade","locale","minDate","maxDate","yearsListFormat","getYearControlProps","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","nextDisabled","previousDisabled","levelControlAriaLabel","withNext","withPrevious","className","decadeLabelFormat","classNames","styles","unstyled","__staticSelector","__stopPropagation","variant","size"]),{classes:F,cx:K}=X2e(null,{name:["DecadeLevel",H],classNames:X,styles:Q,unstyled:V,variant:Y,size:j}),ee=za(),[fe,ie]=q2e(r),J={__staticSelector:H||"DecadeLevel",classNames:X,styles:Q,unstyled:V,variant:Y,size:j},ne=typeof $=="boolean"?$:s?!pe(ie).endOf("year").isBefore(s):!1,le=typeof N=="boolean"?N:i?!pe(fe).startOf("year").isAfter(i):!1,_e=(Ne,we)=>pe(Ne).locale(o||ee.locale).format(we);return k.createElement(Pe,Mw({className:K(F.decadeLevel,z),"data-decade-level":!0,ref:t},W),k.createElement(s1,Mw({label:typeof G=="function"?G(fe,ie):`${_e(fe,G)} – ${_e(ie,G)}`,className:F.calendarHeader,__preventFocus:y,__stopPropagation:Z,nextIcon:w,previousIcon:P,nextLabel:x,previousLabel:S,onNext:O,onPrevious:E,nextDisabled:ne,previousDisabled:le,hasNextLevel:!1,levelControlAriaLabel:I,withNext:R,withPrevious:B},J)),k.createElement(qB,Mw({decade:r,locale:o,minDate:i,maxDate:s,yearsListFormat:a,getYearControlProps:c,__getControlRef:u,__onControlKeyDown:f,__onControlClick:p,__onControlMouseEnter:g,__preventFocus:y,__stopPropagation:Z,withCellSpacing:v},J)))});QB.displayName="@mantine/dates/DecadeLevel";var dEe=Object.defineProperty,Ty=Object.getOwnPropertySymbols,eF=Object.prototype.hasOwnProperty,tF=Object.prototype.propertyIsEnumerable,W5=(e,t,n)=>t in e?dEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fEe=(e,t)=>{for(var n in t||(t={}))eF.call(t,n)&&W5(e,n,t[n]);if(Ty)for(var n of Ty(t))tF.call(t,n)&&W5(e,n,t[n]);return e},pEe=(e,t)=>{var n={};for(var r in e)eF.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ty)for(var r of Ty(e))t.indexOf(r)<0&&tF.call(e,r)&&(n[r]=e[r]);return n};const hEe={numberOfColumns:1},nF=_.forwardRef((e,t)=>{const n=ae("DecadeLevelGroup",hEe,e),{decade:r,locale:o,minDate:i,maxDate:s,yearsListFormat:a,getYearControlProps:c,__onControlClick:u,__onControlMouseEnter:f,withCellSpacing:p,__preventFocus:g,nextIcon:v,previousIcon:y,nextLabel:w,previousLabel:P,onNext:x,onPrevious:S,nextDisabled:O,previousDisabled:E,className:$,classNames:N,styles:I,unstyled:R,__staticSelector:B,__stopPropagation:z,numberOfColumns:G,levelControlAriaLabel:X,decadeLabelFormat:Q,variant:V,size:H}=n,Z=pEe(n,["decade","locale","minDate","maxDate","yearsListFormat","getYearControlProps","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","nextDisabled","previousDisabled","className","classNames","styles","unstyled","__staticSelector","__stopPropagation","numberOfColumns","levelControlAriaLabel","decadeLabelFormat","variant","size"]),{classes:Y,cx:j}=K2e(null,{name:["DecadeLevelGroup",B],styles:I,classNames:N,unstyled:R,variant:V,size:H}),W=_.useRef([]),F=Array(G).fill(0).map((K,ee)=>{const fe=pe(r).add(ee*10,"years").toDate();return k.createElement(QB,{key:ee,variant:V,size:H,yearsListFormat:a,decade:fe,withNext:ee===G-1,withPrevious:ee===0,decadeLabelFormat:Q,__onControlClick:u,__onControlMouseEnter:f,__onControlKeyDown:(ie,J)=>CO({levelIndex:ee,rowIndex:J.rowIndex,cellIndex:J.cellIndex,event:ie,controlsRef:W}),__getControlRef:(ie,J,ne)=>{Array.isArray(W.current[ee])||(W.current[ee]=[]),Array.isArray(W.current[ee][ie])||(W.current[ee][ie]=[]),W.current[ee][ie][J]=ne},levelControlAriaLabel:typeof X=="function"?X(fe):X,locale:o,minDate:i,maxDate:s,__preventFocus:g,__stopPropagation:z,nextIcon:v,previousIcon:y,nextLabel:w,previousLabel:P,onNext:x,onPrevious:S,nextDisabled:O,previousDisabled:E,getYearControlProps:c,__staticSelector:B||"DecadeLevelGroup",classNames:N,styles:I,unstyled:R,withCellSpacing:p})});return k.createElement(Pe,fEe({className:j(Y.decadeLevelGroup,$),ref:t},Z),F)});nF.displayName="@mantine/dates/DecadeLevelGroup";var mEe=Object.defineProperty,Iy=Object.getOwnPropertySymbols,rF=Object.prototype.hasOwnProperty,oF=Object.prototype.propertyIsEnumerable,U5=(e,t,n)=>t in e?mEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_h=(e,t)=>{for(var n in t||(t={}))rF.call(t,n)&&U5(e,n,t[n]);if(Iy)for(var n of Iy(t))oF.call(t,n)&&U5(e,n,t[n]);return e},gEe=(e,t)=>{var n={};for(var r in e)rF.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Iy)for(var r of Iy(e))t.indexOf(r)<0&&oF.call(e,r)&&(n[r]=e[r]);return n};const vEe={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0},iF=_.forwardRef((e,t)=>{const n=ae("Calendar",vEe,e),{maxLevel:r,minLevel:o,defaultLevel:i,level:s,onLevelChange:a,date:c,defaultDate:u,onDateChange:f,numberOfColumns:p,columnsToScroll:g,ariaLabels:v,onYearSelect:y,onMonthSelect:w,onYearMouseEnter:P,onMonthMouseEnter:x,__updateDateOnYearSelect:S,__updateDateOnMonthSelect:O,firstDayOfWeek:E,weekdayFormat:$,weekendDays:N,getDayProps:I,excludeDate:R,renderDay:B,hideOutsideDates:z,hideWeekdays:G,getDayAriaLabel:X,monthLabelFormat:Q,nextIcon:V,previousIcon:H,__onDayClick:Z,__onDayMouseEnter:Y,withCellSpacing:j,monthsListFormat:W,getMonthControlProps:F,yearLabelFormat:K,yearsListFormat:ee,getYearControlProps:fe,decadeLabelFormat:ie,minDate:J,maxDate:ne,locale:le,className:_e,classNames:Ne,styles:we,__staticSelector:He,unstyled:Te,variant:je,size:it,__preventFocus:bt,__stopPropagation:_n,onNextDecade:pt,onPreviousDecade:Tn,onNextYear:kr,onPreviousYear:lt,onNextMonth:Zn,onPreviousMonth:Jt,static:ht}=n,xo=gEe(n,["maxLevel","minLevel","defaultLevel","level","onLevelChange","date","defaultDate","onDateChange","numberOfColumns","columnsToScroll","ariaLabels","onYearSelect","onMonthSelect","onYearMouseEnter","onMonthMouseEnter","__updateDateOnYearSelect","__updateDateOnMonthSelect","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","monthLabelFormat","nextIcon","previousIcon","__onDayClick","__onDayMouseEnter","withCellSpacing","monthsListFormat","getMonthControlProps","yearLabelFormat","yearsListFormat","getYearControlProps","decadeLabelFormat","minDate","maxDate","locale","className","classNames","styles","__staticSelector","unstyled","variant","size","__preventFocus","__stopPropagation","onNextDecade","onPreviousDecade","onNextYear","onPreviousYear","onNextMonth","onPreviousMonth","static"]),{classes:Yr,cx:ar}=vke(null,{name:["Calendar",He],classNames:Ne,styles:we,unstyled:Te,variant:je,size:it}),[Kr,Bt]=go({value:s?ud(s,o,r):void 0,defaultValue:i?ud(i,o,r):void 0,finalValue:ud(void 0,o,r),onChange:a}),[qr,pn]=go({value:c,defaultValue:u,finalValue:null,onChange:f}),wn={__staticSelector:He||"Calendar",styles:we,classNames:Ne,unstyled:Te,variant:je,size:it},Er=g||p||1,gt=qr||new Date,be=()=>{const xt=pe(gt).add(Er,"month").toDate();Zn?.(xt),pn(xt)},De=()=>{const xt=pe(gt).subtract(Er,"month").toDate();Jt?.(xt),pn(xt)},Jr=()=>{const xt=pe(gt).add(Er,"year").toDate();kr?.(xt),pn(xt)},Dt=()=>{const xt=pe(gt).subtract(Er,"year").toDate();lt?.(xt),pn(xt)},Zt=()=>{const xt=pe(gt).add(10*Er,"year").toDate();pt?.(xt),pn(xt)},$r=()=>{const xt=pe(gt).subtract(10*Er,"year").toDate();Tn?.(xt),pn(xt)};return k.createElement(Pe,_h({className:ar(Yr.calendar,_e),ref:t},xo),Kr==="month"&&k.createElement(IB,_h({month:gt,minDate:J,maxDate:ne,firstDayOfWeek:E,weekdayFormat:$,weekendDays:N,getDayProps:I,excludeDate:R,renderDay:B,hideOutsideDates:z,hideWeekdays:G,getDayAriaLabel:X,onNext:be,onPrevious:De,hasNextLevel:r!=="month",onLevelClick:()=>Bt("year"),numberOfColumns:p,locale:le,levelControlAriaLabel:v?.monthLevelControl,nextLabel:v?.nextMonth,nextIcon:V,previousLabel:v?.previousMonth,previousIcon:H,monthLabelFormat:Q,__onDayClick:Z,__onDayMouseEnter:Y,__preventFocus:bt,__stopPropagation:_n,static:ht,withCellSpacing:j},wn)),Kr==="year"&&k.createElement(UB,_h({year:gt,numberOfColumns:p,minDate:J,maxDate:ne,monthsListFormat:W,getMonthControlProps:F,locale:le,onNext:Jr,onPrevious:Dt,hasNextLevel:r!=="month"&&r!=="year",onLevelClick:()=>Bt("decade"),levelControlAriaLabel:v?.yearLevelControl,nextLabel:v?.nextYear,nextIcon:V,previousLabel:v?.previousYear,previousIcon:H,yearLabelFormat:K,__onControlMouseEnter:x,__onControlClick:(xt,nn)=>{O&&pn(nn),Bt(ud("month",o,r)),w?.(nn)},__preventFocus:bt,__stopPropagation:_n,withCellSpacing:j},wn)),Kr==="decade"&&k.createElement(nF,_h({decade:gt,minDate:J,maxDate:ne,yearsListFormat:ee,getYearControlProps:fe,locale:le,onNext:Zt,onPrevious:$r,numberOfColumns:p,nextLabel:v?.nextDecade,nextIcon:V,previousLabel:v?.previousDecade,previousIcon:H,decadeLabelFormat:ie,__onControlMouseEnter:P,__onControlClick:(xt,nn)=>{S&&pn(nn),Bt(ud("year",o,r)),y?.(nn)},__preventFocus:bt,__stopPropagation:_n,withCellSpacing:j},wn)))});iF.displayName="@mantine/dates/Calendar";var Z5=Object.getOwnPropertySymbols,yEe=Object.prototype.hasOwnProperty,_Ee=Object.prototype.propertyIsEnumerable,wEe=(e,t)=>{var n={};for(var r in e)yEe.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Z5)for(var r of Z5(e))t.indexOf(r)<0&&_Ee.call(e,r)&&(n[r]=e[r]);return n};function bEe(e){const t=e,{maxLevel:n,minLevel:r,defaultLevel:o,level:i,onLevelChange:s,nextIcon:a,previousIcon:c,date:u,defaultDate:f,onDateChange:p,numberOfColumns:g,columnsToScroll:v,ariaLabels:y,onYearSelect:w,onMonthSelect:P,onYearMouseEnter:x,onMonthMouseEnter:S,onNextMonth:O,onPreviousMonth:E,onNextYear:$,onPreviousYear:N,onNextDecade:I,onPreviousDecade:R,withCellSpacing:B,__updateDateOnYearSelect:z,__updateDateOnMonthSelect:G,firstDayOfWeek:X,weekdayFormat:Q,weekendDays:V,getDayProps:H,excludeDate:Z,renderDay:Y,hideOutsideDates:j,hideWeekdays:W,getDayAriaLabel:F,monthLabelFormat:K,monthsListFormat:ee,getMonthControlProps:fe,yearLabelFormat:ie,yearsListFormat:J,getYearControlProps:ne,decadeLabelFormat:le,allowSingleDateInRange:_e,allowDeselect:Ne,minDate:we,maxDate:He,locale:Te}=t,je=wEe(t,["maxLevel","minLevel","defaultLevel","level","onLevelChange","nextIcon","previousIcon","date","defaultDate","onDateChange","numberOfColumns","columnsToScroll","ariaLabels","onYearSelect","onMonthSelect","onYearMouseEnter","onMonthMouseEnter","onNextMonth","onPreviousMonth","onNextYear","onPreviousYear","onNextDecade","onPreviousDecade","withCellSpacing","__updateDateOnYearSelect","__updateDateOnMonthSelect","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","monthLabelFormat","monthsListFormat","getMonthControlProps","yearLabelFormat","yearsListFormat","getYearControlProps","decadeLabelFormat","allowSingleDateInRange","allowDeselect","minDate","maxDate","locale"]);return{calendarProps:{maxLevel:n,minLevel:r,defaultLevel:o,level:i,onLevelChange:s,nextIcon:a,previousIcon:c,date:u,defaultDate:f,onDateChange:p,numberOfColumns:g,columnsToScroll:v,ariaLabels:y,onYearSelect:w,onMonthSelect:P,onYearMouseEnter:x,onMonthMouseEnter:S,onNextMonth:O,onPreviousMonth:E,onNextYear:$,onPreviousYear:N,onNextDecade:I,onPreviousDecade:R,withCellSpacing:B,__updateDateOnYearSelect:z,__updateDateOnMonthSelect:G,firstDayOfWeek:X,weekdayFormat:Q,weekendDays:V,getDayProps:H,excludeDate:Z,renderDay:Y,hideOutsideDates:j,hideWeekdays:W,getDayAriaLabel:F,monthLabelFormat:K,monthsListFormat:ee,getMonthControlProps:fe,yearLabelFormat:ie,yearsListFormat:J,getYearControlProps:ne,decadeLabelFormat:le,allowSingleDateInRange:_e,allowDeselect:Ne,minDate:we,maxDate:He,locale:Te},others:je}}function xEe(e,t){if(t==="range"&&Array.isArray(e)){const[n,r]=e;return n?r?`${n.toISOString()} – ${r.toISOString()}`:`${n.toISOString()} –`:""}return t==="multiple"&&Array.isArray(e)?e.map(n=>n.toISOString()).join(", "):!Array.isArray(e)&&e?e.toISOString():""}function sF({value:e,type:t,name:n,form:r}){return k.createElement("input",{type:"hidden",value:xEe(e,t),name:n,form:r})}sF.displayName="@mantine/dates/HiddenDatesInput";const G5=e=>e==="range"?[null,null]:e==="multiple"?[]:null;function aF({type:e,value:t,defaultValue:n,onChange:r}){const o=_.useRef(e),[i,s]=go({value:t,defaultValue:n,onChange:r,finalValue:G5(e)});let a=i;return o.current!==e&&(o.current=e,t===void 0&&(a=n!==void 0?n:G5(e),s(a))),[a,s]}function Y5(e,t){const n=[...t].sort((r,o)=>r.getTime()-o.getTime());return pe(n[0]).startOf("day").subtract(1,"ms").isBefore(e)&&pe(n[1]).endOf("day").add(1,"ms").isAfter(e)}function SEe({type:e,level:t,value:n,defaultValue:r,onChange:o,allowSingleDateInRange:i,allowDeselect:s,onMouseLeave:a}){const[c,u]=aF({type:e,value:n,defaultValue:r,onChange:o}),[f,p]=_.useState(e==="range"&&c[0]&&!c[1]?c[0]:null),[g,v]=_.useState(null),y=$=>{if(e==="range"){if(f instanceof Date&&!c[1]){if(pe($).isSame(f,t)&&!i){p(null),v(null),u([null,null]);return}const N=[$,f];N.sort((I,R)=>I.getTime()-R.getTime()),u(N),v(null),p(null);return}if(c[0]&&!c[1]&&pe($).isSame(c[0],t)&&!i){p(null),v(null),u([null,null]);return}u([$,null]),v(null),p($);return}if(e==="multiple"){c.some(N=>pe(N).isSame($,t))?u(c.filter(N=>!pe(N).isSame($,t))):u([...c,$]);return}c&&s&&pe($).isSame(c,t)?u(null):u($)},w=$=>f instanceof Date&&g instanceof Date?Y5($,[g,f]):c[0]instanceof Date&&c[1]instanceof Date?Y5($,c):!1,P=e==="range"?$=>{a?.($),v(null)}:a,x=$=>c[0]instanceof Date&&pe($).isSame(c[0],t)?!(g&&pe(g).isBefore(c[0])):!1,S=$=>c[1]instanceof Date?pe($).isSame(c[1],t):!(c[0]instanceof Date)||!g?!1:pe(g).isBefore(c[0])&&pe($).isSame(c[0],t);return{onDateChange:y,onRootMouseLeave:P,onHoveredDateChange:e==="range"&&f?v:()=>{},getControlProps:$=>{if(e==="range")return{selected:c.some(I=>I&&pe(I).isSame($,t)),inRange:w($),firstInRange:x($),lastInRange:S($),"data-autofocus":!!c[0]&&pe(c[0]).isSame($,t)||void 0};if(e==="multiple")return{selected:c.some(I=>I&&pe(I).isSame($,t)),"data-autofocus":!!c[0]&&pe(c[0]).isSame($,t)||void 0};const N=pe(c).isSame($,t);return{selected:N,"data-autofocus":N||void 0}},_value:c,setValue:u}}var PEe=Object.defineProperty,jy=Object.getOwnPropertySymbols,lF=Object.prototype.hasOwnProperty,cF=Object.prototype.propertyIsEnumerable,K5=(e,t,n)=>t in e?PEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nw=(e,t)=>{for(var n in t||(t={}))lF.call(t,n)&&K5(e,n,t[n]);if(jy)for(var n of jy(t))cF.call(t,n)&&K5(e,n,t[n]);return e},OEe=(e,t)=>{var n={};for(var r in e)lF.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&jy)for(var r of jy(e))t.indexOf(r)<0&&cF.call(e,r)&&(n[r]=e[r]);return n};const CEe={type:"default",numberOfColumns:1},uF=_.forwardRef((e,t)=>{const n=ae("DatePicker",CEe,e),{type:r,defaultValue:o,value:i,onChange:s,__staticSelector:a,getDayProps:c,allowSingleDateInRange:u,allowDeselect:f,onMouseLeave:p,numberOfColumns:g}=n,v=OEe(n,["type","defaultValue","value","onChange","__staticSelector","getDayProps","allowSingleDateInRange","allowDeselect","onMouseLeave","numberOfColumns"]),{onDateChange:y,onRootMouseLeave:w,onHoveredDateChange:P,getControlProps:x}=SEe({type:r,level:"day",allowDeselect:f,allowSingleDateInRange:u,value:i,defaultValue:o,onChange:s,onMouseLeave:p});return k.createElement(iF,Nw({ref:t,minLevel:"month",__staticSelector:a||"DatePicker",onMouseLeave:w,hideOutsideDates:g!==1,numberOfColumns:g,__onDayMouseEnter:(S,O)=>P(O),__onDayClick:(S,O)=>y(O),getDayProps:S=>Nw(Nw({},x(S)),c?.(S))},v))});uF.displayName="@mantine/dates/DatePicker";function kEe({type:e,date:t,locale:n,format:r,labelSeparator:o}){const i=s=>pe(s).locale(n).format(r);return e==="default"?t===null?"":i(t):e==="multiple"?t.map(i).join(", "):e==="range"?t[0]&&t[1]?`${i(t[0])} ${o} ${i(t[1])}`:t[0]?`${i(t[0])} ${o} `:"":""}function EEe({type:e,value:t,defaultValue:n,onChange:r,locale:o,format:i,closeOnChange:s,sortDates:a,labelSeparator:c}){const u=za(),[f,p]=pS(!1),[g,v]=aF({type:e,value:t,defaultValue:n,onChange:r}),y=kEe({type:e,date:g,locale:u.getLocale(o),format:i,labelSeparator:u.getLabelSeparator(c)}),w=S=>{s&&(e==="default"&&p.close(),e==="range"&&S[0]&&S[1]&&p.close()),v(a&&e==="multiple"?[...S].sort((O,E)=>O.getTime()-E.getTime()):S)},P=()=>w(e==="range"?[null,null]:e==="multiple"?[]:null),x=e==="range"?!!g[0]:e==="multiple"?g.length>0:g!==null;return{_value:g,setValue:w,onClear:P,shouldClear:x,formattedValue:y,dropdownOpened:f,dropdownHandlers:p}}function $Ee({minDate:e,maxDate:t}){const n=new Date;return!e&&!t?n:pe(n).isBefore(e)?e:pe(n).isAfter(t)?t:n}var MEe=ue(()=>({placeholder:{},input:{cursor:"pointer",lineHeight:"unset","&[data-read-only]":{cursor:"default"}}}));const NEe=MEe;var TEe=Object.defineProperty,IEe=Object.defineProperties,jEe=Object.getOwnPropertyDescriptors,Ly=Object.getOwnPropertySymbols,dF=Object.prototype.hasOwnProperty,fF=Object.prototype.propertyIsEnumerable,q5=(e,t,n)=>t in e?TEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qa=(e,t)=>{for(var n in t||(t={}))dF.call(t,n)&&q5(e,n,t[n]);if(Ly)for(var n of Ly(t))fF.call(t,n)&&q5(e,n,t[n]);return e},J5=(e,t)=>IEe(e,jEe(t)),LEe=(e,t)=>{var n={};for(var r in e)dF.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ly)for(var r of Ly(e))t.indexOf(r)<0&&fF.call(e,r)&&(n[r]=e[r]);return n};const DEe={},pF=_.forwardRef((e,t)=>{const n=bP("PickerInputBase",DEe,e),{inputProps:r,wrapperProps:o,placeholder:i,classNames:s,styles:a,unstyled:c,popoverProps:u,modalProps:f,dropdownType:p,children:g,formattedValue:v,dropdownHandlers:y,dropdownOpened:w,onClick:P,clearable:x,onClear:S,clearButtonProps:O,rightSection:E,shouldClear:$,readOnly:N,disabled:I,value:R,name:B,form:z,type:G}=n,X=LEe(n,["inputProps","wrapperProps","placeholder","classNames","styles","unstyled","popoverProps","modalProps","dropdownType","children","formattedValue","dropdownHandlers","dropdownOpened","onClick","clearable","onClear","clearButtonProps","rightSection","shouldClear","readOnly","disabled","value","name","form","type"]),{classes:Q,cx:V}=NEe(null,{name:r.__staticSelector,classNames:s,styles:a,unstyled:c,variant:r.variant,size:r.size}),H=E||(x&&$&&!N&&!I?k.createElement(O0,qa({variant:"transparent",onClick:S,unstyled:c,size:r.size},O)):null),Z=()=>{G==="range"&&R[0]&&!R[1]&&S(),y.close()},Y=o.label;return k.createElement(k.Fragment,null,p==="modal"&&!N&&k.createElement(Ri,qa({opened:w,onClose:Z,withCloseButton:!1,size:"auto","data-dates-modal":!0,unstyled:c},f),g),k.createElement(et.Wrapper,qa({},o),k.createElement(kn,qa({position:"bottom-start",opened:w,onClose:Z,disabled:p==="modal"||N,trapFocus:!0,returnFocus:!0,unstyled:c},u),k.createElement(kn.Target,{shouldOverrideDefaultTargetId:!Y},k.createElement(et,qa(J5(qa({"aria-label":v,"data-dates-input":!0,"data-read-only":N||void 0,disabled:I,component:"button",type:"button",multiline:!0,onClick:j=>{P?.(j),y.toggle()},rightSection:H},r),{ref:t,classNames:J5(qa({},s),{input:V(Q.input,s?.input)})}),X),v||k.createElement(et.Placeholder,{className:Q.placeholder,sx:{color:r.error?"inherit":void 0}},i))),k.createElement(kn.Dropdown,{"data-dates-dropdown":!0},g))),k.createElement(sF,{value:R,name:B,form:z,type:G}))});pF.displayName="@mantine/dates/PickerInputBase";var REe=Object.defineProperty,zEe=Object.defineProperties,AEe=Object.getOwnPropertyDescriptors,Dy=Object.getOwnPropertySymbols,hF=Object.prototype.hasOwnProperty,mF=Object.prototype.propertyIsEnumerable,X5=(e,t,n)=>t in e?REe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Q5=(e,t)=>{for(var n in t||(t={}))hF.call(t,n)&&X5(e,n,t[n]);if(Dy)for(var n of Dy(t))mF.call(t,n)&&X5(e,n,t[n]);return e},BEe=(e,t)=>zEe(e,AEe(t)),FEe=(e,t)=>{var n={};for(var r in e)hF.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Dy)for(var r of Dy(e))t.indexOf(r)<0&&mF.call(e,r)&&(n[r]=e[r]);return n};const VEe={type:"default",valueFormat:"MMMM D, YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},EO=_.forwardRef((e,t)=>{const n=ae("DatePickerInput",VEe,e),{type:r,value:o,defaultValue:i,onChange:s,valueFormat:a,labelSeparator:c,locale:u,classNames:f,styles:p,unstyled:g,closeOnChange:v,size:y,variant:w,dropdownType:P,sortDates:x,maxDate:S,minDate:O,defaultDate:E}=n,$=FEe(n,["type","value","defaultValue","onChange","valueFormat","labelSeparator","locale","classNames","styles","unstyled","closeOnChange","size","variant","dropdownType","sortDates","maxDate","minDate","defaultDate"]),{calendarProps:N,others:I}=bEe($),{_value:R,setValue:B,formattedValue:z,dropdownHandlers:G,dropdownOpened:X,onClear:Q,shouldClear:V}=EEe({type:r,value:o,defaultValue:i,onChange:s,locale:u,format:a,labelSeparator:c,closeOnChange:v,sortDates:x}),H=E||$Ee({maxDate:S,minDate:O});return k.createElement(pF,Q5({formattedValue:z,dropdownOpened:X,dropdownHandlers:G,classNames:f,styles:p,unstyled:g,__staticSelector:"DatePickerInput",ref:t,onClear:Q,shouldClear:V,value:R,type:r,size:y,variant:w,dropdownType:P},I),k.createElement(uF,BEe(Q5({},N),{size:y,variant:w,type:r,value:R,defaultDate:Array.isArray(R)?R[0]||H:R||H,onChange:B,locale:u,classNames:f,styles:p,unstyled:g,__staticSelector:"DatePickerInput",__stopPropagation:P==="popover",maxDate:S,minDate:O})))});EO.displayName="@mantine/dates/DatePickerInput";const a1=tn(e=>({selectedCharges:[],setSelectedCharges:t=>e(n=>({selectedCharges:typeof t=="function"?t(n.selectedCharges):t})),setSelectedCharge:(t,n)=>{e(r=>({selectedCharges:r.selectedCharges.map(o=>o.label===t?n(o):o)}))}})),HEe=ue(e=>({wrapper:{width:105,display:"flex",alignItems:"center",justifyContent:"space-between",padding:`${M(.5)} ${e.spacing.xs}`,borderRadius:e.radius.sm,border:`${M(1)} solid ${e.colorScheme==="dark"?"transparent":e.colors.gray[3]}`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.white,"&:focus-within":{borderColor:e.colors[e.primaryColor][6]}},control:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,border:`${M(1)} solid ${e.colorScheme==="dark"?"transparent":e.colors.gray[3]}`,"&:disabled":{borderColor:e.colorScheme==="dark"?"transparent":e.colors.gray[3],opacity:.8,backgroundColor:"transparent"}},input:{textAlign:"center",paddingRight:`${e.spacing.md} !important`,paddingLeft:`${e.spacing.sm} !important`,height:M(18),flex:1,"&:disabled":{backgroundColor:"#2C2E33",cursor:"auto",color:"#C1C2C5"}}})),WEe=({charge:e,index:t})=>{const{classes:n}=HEe(),{setSelectedCharge:r,setSelectedCharges:o}=a1();return h.jsxs("div",{className:"edit-charges-modal-charge-card",children:[h.jsx(U,{fz:"sm",fw:500,c:"white",style:{textAlign:"center"},children:e.label}),h.jsxs("div",{style:{display:"flex",gap:5,justifyContent:"center"},children:[h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,margin:5,fontWeight:500},children:["$",e.fine," fine"]}),h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,margin:5,fontWeight:500},children:[e.time," month(s)"]}),h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,margin:5,fontWeight:500},children:[e.points," point(s)"]})]}),h.jsx(zt,{label:e.description,multiline:!0,withArrow:!0,color:"gray",children:h.jsx(U,{fz:"xs",fw:500,mt:5,style:{textAlign:"center"},lineClamp:2,children:e.description})}),h.jsxs(nt,{position:"apart",style:{gap:5},children:[h.jsx(mt,{radius:"xs",variant:"filled",style:{fontSize:10,padding:12.5,fontWeight:500},color:e.type.toLocaleLowerCase()==="felony"?"red":e.type.toLocaleLowerCase()==="infraction"?"green":"yellow",children:e.type}),h.jsxs(nt,{style:{gap:5},children:[h.jsx(zt,{label:D.remove_charge,withArrow:!0,color:"gray",children:h.jsx(Qe,{onClick:()=>{o(i=>i.filter((s,a)=>a!==t))},h:31,className:"action-icon",children:h.jsx(z0,{size:18})})}),h.jsxs("div",{className:n.wrapper,children:[h.jsx(Qe,{size:18,variant:"transparent",onClick:()=>r(e.label,i=>({...i,count:--i.count})),disabled:e.count===1,className:n.control,onMouseDown:i=>i.preventDefault(),children:h.jsx(Rhe,{size:"1rem",stroke:1.5})}),h.jsx(ma,{variant:"unstyled",min:1,max:99,value:e.count,classNames:{input:n.input},disabled:!0}),h.jsx(Qe,{size:18,variant:"transparent",onClick:()=>r(e.label,i=>({...i,count:++i.count})),className:n.control,onMouseDown:i=>i.preventDefault(),children:h.jsx(ku,{size:"1rem",stroke:1.5})})]})]})]})]})},UEe=e=>{const t={reduction:null,fine:0,time:0,points:0};for(let n=0;n{const[t,n]=_.useState(!1),{selectedCharges:r,setSelectedCharges:o}=a1(),{setCriminal:i}=Ur();return h.jsx(st,{variant:"light",color:"gray",loading:t,onClick:async()=>{n(!0);const s=await me("getRecommendedWarrantExpiry",r,{data:Date.now()});i(e.citizenid,a=>({...a,charges:r,penalty:UEe(r),warrantExpiry:new Date(s)})),n(!1),o([]),ke.closeAll()},children:D.confirm})},GEe=({criminal:e})=>{const{selectedCharges:t,setSelectedCharges:n}=a1(),{charges:r}=Gf(),[o,i]=_.useState({}),[s,a]=_.useState(!1),[c,u]=_.useState(null),f=500,[p,g]=_.useState(""),[v,y]=_.useState(p);return _.useEffect(()=>{c!==null&&clearTimeout(c),a(!0);const w=setTimeout(()=>{y(p),a(!1)},f);return u(w),()=>{clearTimeout(w)}},[p]),_.useEffect(()=>{if(v.trim()==="")i(r);else{const w=Object.entries(r).reduce((P,[x,S])=>{const O=v.trim()?S.filter(E=>E.label.toLowerCase().includes(v.toLowerCase())):S;return O.length>0&&(P[x]=O),P},{});i(w)}},[v,r]),h.jsxs("div",{className:"edit-charges-modal",children:[h.jsx(Ye,{}),h.jsxs("div",{className:"edit-charges-modal-content",children:[h.jsxs("div",{className:"edit-charges-modal-current-charges",children:[h.jsx(U,{fz:"md",fw:500,c:"white",mb:5,children:D.current_charges}),h.jsx(At,{h:620,children:h.jsx("div",{className:"edit-charges-modal-added-charges",children:t.map((w,P)=>h.jsx(WEe,{charge:w,index:P},P))})}),h.jsx(ZEe,{criminal:e})]}),h.jsx(Ye,{orientation:"vertical"}),h.jsxs("div",{className:"edit-charges-modal-all-charges",children:[h.jsxs("div",{className:"edit-charges-modal-all-charges-header",children:[h.jsx(U,{fz:"md",fw:500,c:"white",mb:5,children:D.all_charges}),h.jsx(yn,{radius:"xs",variant:"filled",placeholder:D.search,w:300,value:p,onChange:w=>g(w.target.value)})]}),h.jsx(At,{h:635,children:h.jsx("div",{className:"edit-charges-modal-all-charges-list",children:s?h.jsx("div",{style:{display:"flex",width:"100%",marginTop:100,justifyContent:"center",alignItems:"center"},children:h.jsx(en,{})}):h.jsx(h.Fragment,{children:Object.entries(o).map(([w,P])=>h.jsxs("div",{children:[h.jsx(U,{style:{fontSize:17,color:"white"},weight:500,children:w}),h.jsx("div",{className:"edit-charges-modal-charges-content",children:P.map((x,S)=>h.jsxs("div",{className:"edit-charges-modal-charge-card",children:[h.jsx(U,{fz:"sm",fw:500,c:"white",style:{textAlign:"center"},children:x.label}),h.jsxs("div",{style:{display:"flex",gap:5,justifyContent:"center"},children:[h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,margin:5,fontWeight:500},children:["$",x.fine," fine"]}),h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,margin:5,fontWeight:500},children:[x.time," ",D.months]}),h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,margin:5,fontWeight:500},children:[x.points," ",D.points]})]}),h.jsx(zt,{label:x.description,multiline:!0,withArrow:!0,color:"gray",children:h.jsx(U,{fz:"xs",fw:500,mt:5,style:{textAlign:"center"},lineClamp:2,children:x.description})}),h.jsxs(nt,{position:"apart",children:[h.jsx(mt,{radius:"xs",variant:"filled",style:{fontSize:10,padding:12.5,fontWeight:500},color:x.type.toLocaleLowerCase()==="felony"?"red":x.type.toLocaleLowerCase()==="infraction"?"green":"yellow",children:x.type}),h.jsx(zt,{label:D.add_charge,withArrow:!0,color:"gray",children:h.jsx(Qe,{onClick:()=>n(O=>{const E=O.findIndex($=>$.label===x.label);return E===-1?[...O,{...x,count:1}]:O.map(($,N)=>N===E?{...$,count:++$.count}:$)}),h:31,className:"action-icon",children:h.jsx(ku,{size:18})})})]})]},S))})]},w))})})})]})]})]})},gF=e=>Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0}).format(e),ej=[25,50,75,80,90],Ry=(e,t)=>t?Math.round(e-t/100*e):e,YEe=e=>{const t=[];if(!e)return[];for(let n=0;n{const{incident:t,setCriminals:n,setCriminal:r}=Ur(),{setSelectedCharges:o}=a1(),{setSelectedProfile:i}=ji(),s=Ul();return h.jsxs("div",{className:"incident-criminal-card-background",children:[h.jsxs("div",{className:"incident-criminal-card-header",children:[h.jsxs(U,{style:{fontSize:15,color:"white"},weight:600,children:[e.firstname," ",e.lastname]}),h.jsxs("div",{className:"incident-criminal-card-buttons",children:[h.jsx(zt,{label:D.remove_criminal,withArrow:!0,color:"gray",position:"bottom",children:h.jsx(Qe,{variant:"light",color:"red",onClick:()=>{ke.openConfirmModal({title:h.jsx(U,{style:{fontSize:17,color:"white"},weight:500,children:D.remove_criminal}),size:"sm",centered:!0,labels:{confirm:D.confirm,cancel:D.cancel},groupProps:{spacing:6},confirmProps:{color:"red"},onConfirm:async()=>{await me("removeCriminal",{id:t.id,criminalId:e.citizenid},{data:1})&&n(c=>c.filter(u=>u.citizenid!==e.citizenid))},children:h.jsx(U,{size:"sm",c:"dark.2",children:D.remove_criminal_confirm.format(e.firstname,e.lastname)})})},children:h.jsx(z0,{size:16,color:"white"})})}),h.jsx(zt,{label:D.go_to_profile,withArrow:!0,color:"gray",position:"bottom",children:h.jsx(Qe,{variant:"light",color:"dark",onClick:async()=>{if(!at()){const a=await me("getProfile",e.citizenid);i(a)}s("/profiles")},children:h.jsx(Khe,{size:16,color:"white"})})}),h.jsx(zt,{label:D.save_criminal,withArrow:!0,color:"gray",position:"bottom",children:h.jsx(Qe,{variant:"light",color:"dark",onClick:()=>{me("saveCriminal",{id:t.id,criminal:{...e,warrantExpiry:e.warrantExpiry?pe(e.warrantExpiry).format("YYYY-MM-DD HH:mm:ss"):null}},{data:1})},children:h.jsx(O8,{size:16,color:"white"})})})]})]}),h.jsxs(U,{color:"dimmed",size:"xs",children:["#",e.citizenid]}),h.jsxs("div",{className:"incident-criminal-content",children:[h.jsxs("div",{className:"incident-criminal-edit-charges-badges",children:[h.jsx(mt,{radius:"xs",variant:"light",style:{color:"white",fontSize:10,padding:12.5,cursor:"pointer",backgroundColor:"#343a40"},w:125,onClick:()=>{o(e.charges),ke.open({title:h.jsx(U,{style:{fontSize:17,color:"white"},weight:500,children:D.edit_charges}),styles:{body:{height:700,overflow:"hidden"},content:{width:1400}},centered:!0,size:1445,children:h.jsx(GEe,{criminal:e})})},children:D.edit_charges}),e.charges.map((a,c)=>h.jsxs(mt,{radius:"xs",variant:"filled",style:{fontSize:10,padding:12.5,fontWeight:500},color:a.type.toLowerCase()==="felony"?"red":a.type.toLowerCase()==="infraction"?"green":"yellow",children:[a.count,"x ",a.label]},c))]}),h.jsx(Ye,{style:{width:"100%"}}),h.jsx(mr,{label:D.issue_warrant,description:D.issue_warrant_description,checked:e.issueWarrant,onChange:()=>r(e.citizenid,a=>({...a,issueWarrant:!a.issueWarrant}))}),e.issueWarrant?h.jsx(EO,{icon:h.jsx(RP,{size:20}),label:D.warrant_expiration_date,placeholder:"2023-03-12",weekendDays:[],minDate:new Date,value:e.warrantExpiry?new Date(e.warrantExpiry):null,onChange:a=>{r(e.citizenid,c=>({...c,warrantExpiry:a}))}}):h.jsxs(h.Fragment,{children:[h.jsx(Nl,{label:D.reduction,value:e.penalty.reduction?e.penalty.reduction.toString():null,data:YEe(e.penalty),icon:h.jsx(fhe,{size:20}),onChange:a=>r(e.citizenid,c=>({...c,penalty:c.penalty?{...c.penalty,reduction:a?+a:null}:{reduction:a?+a:null,time:0,fine:0,points:0}})),clearable:!0,placeholder:D.no_reduction,variant:"filled"}),h.jsxs(nt,{children:[h.jsxs(U,{size:"xs",style:{color:"white"},children:[D.time,":"," ",Ry(e.penalty.time,e.penalty.reduction)," ",D.months]}),h.jsxs(U,{size:"xs",style:{color:"white"},children:[D.fine,":"," ",gF(Ry(e.penalty.fine,e.penalty.reduction))]})]}),h.jsxs(nt,{children:[h.jsx(mr,{label:D.pleaded_guilty,checked:e.pleadedGuilty,onChange:()=>r(e.citizenid,a=>({...a,pleadedGuilty:!a.pleadedGuilty}))}),h.jsx(mr,{label:D.processed,checked:e.processed,onChange:()=>r(e.citizenid,a=>({...a,processed:!a.processed}))})]})]})]})]})},qEe=()=>{const{incident:e,isIncidentActive:t}=Ur();return t?h.jsx(At,{h:860,children:h.jsxs("div",{className:"incident-criminals-content-width",children:[h.jsxs(st,{fullWidth:!0,variant:"light",color:"gray",onClick:()=>ke.open({title:h.jsx(U,{style:{fontSize:17,color:"white"},weight:500,children:D.add_criminal}),centered:!0,size:"sm",children:h.jsx(ZCe,{})}),children:[h.jsx(T8,{size:M(18),style:{marginRight:5}})," ",D.add_criminal]}),e.criminals.map(n=>h.jsx(KEe,{criminal:n},n.citizenid))]})}):h.jsx("div",{className:"content-width",children:h.jsx("div",{className:"card-background",children:h.jsxs("div",{className:"profile-no-selected",children:[h.jsx(D0,{size:M(50),color:"white"}),h.jsx(U,{style:{fontSize:15,color:"white"},weight:600,children:D.no_incident_selected})]})})})},JEe=()=>{const{setActiveIncident:e,setIncidentActive:t}=Ur(),[n,r]=_.useState(!1),o=async i=>{r(!0);const s=await me("getIncident",i.id,{data:{id:1,officersInvolved:[],evidence:[],title:i.title,description:"

",criminals:[]}});e(s),t(!0),r(!1)};return h.jsxs("div",{className:"incidents",children:[h.jsx(zCe,{handleIncidentClick:o}),h.jsx(Hf,{visible:n,overlayOpacity:.97,overlayColor:"rgb(34, 35, 37)",transitionDuration:250,loader:o1,style:{left:795,width:935,height:"96%",top:19,borderRadius:"0.25rem"}}),h.jsx(HCe,{}),h.jsx(qEe,{})]})};const XEe=[{firstname:"John",lastname:"Doe",callsign:"1A-01",citizenid:"ABCD1234",playerId:1,position:[0,0,0],unitId:1,image:"",title:"Chief",apu:!0,air:!0,mc:!0,k9:!0,fto:!0,lastActive:Date.now()},{firstname:"Jenna",lastname:"Doe",callsign:"1A-02",citizenid:"ABCD1235",playerId:2,position:[0,0,0],image:"",title:"Captain",apu:!1,air:!0,mc:!0,k9:!1,fto:!1,lastActive:Date.now()}],Nu=tn(e=>({rosterOfficers:at()?XEe:[],getRosterOfficers:async()=>{try{const t=await me("fetchRoster");return e({rosterOfficers:t}),{rosterOfficers:t}}catch(t){return console.error("Failed to fetch recent activities:",t),{rosterOfficers:[]}}},setRosterOfficers:t=>{e(n=>({rosterOfficers:typeof t=="function"?t(n.rosterOfficers):t}))}})),QEe=({officer:e})=>{const[t,n]=_.useState(!1),{setRosterOfficers:r}=Nu(),o=Zl({initialValues:{callsign:e.callsign}});return h.jsx("form",{onSubmit:o.onSubmit(async i=>{n(!0);const s=await me("setOfficerCallSign",{citizenid:e.citizenid,callsign:i.callsign},{data:!0,delay:500});if(n(!1),!s)return o.setFieldError("callSign",D.callsign_in_use);r(a=>a.map(c=>c.citizenid===e.citizenid?{...e,callsign:i.callsign}:c)),ke.closeAll()}),children:h.jsxs(Je,{children:[h.jsx(yn,{label:D.callsign,...o.getInputProps("callsign")}),h.jsx(st,{type:"submit",color:"gray",loading:t,variant:"light",children:D.confirm})]})})},e$e=({officer:e})=>{const t=["Cadet","Probationary Trooper","Trooper","Senior Trooper","Master Trooper","Corporal","Sergeant","Lieutenant","Captain","Assistant Chief","Chief"],[n,r]=_.useState(null),[o,i]=_.useState(!1),{setRosterOfficers:s}=Nu(),a=async()=>{n===null||(i(!0),!await me("setOfficerRank",{citizenId:e.citizenid,grade:+n},{data:!0}))||(s(u=>u.map(f=>f.citizenid===e.citizenid?{...e,title:`${t[n]}`}:f)),i(!1),ke.closeAll())};return h.jsxs(Je,{children:[h.jsx(Nl,{withinPortal:!0,value:n!==null?n.toString():null,data:t?t.map((c,u)=>({label:c,value:u.toString()})):[],onChange:c=>r(c!==null?+c:null),label:D.rank}),h.jsx(st,{variant:"light",color:"gray",onClick:a,loading:o,children:D.confirm})]})},t$e=({officer:e})=>{const[t,n]=_.useState(!1),{setRosterOfficers:r}=Nu(),[o,i]=_.useState(e.apu||!1),[s,a]=_.useState(e.air||!1),[c,u]=_.useState(e.mc||!1),[f,p]=_.useState(e.k9||!1),[g,v]=_.useState(e.fto||!1),y=async()=>{n(!0),await me("setOfficerRoles",{citizenid:e.citizenid,roles:{apu:o,air:s,mc:c,k9:f,fto:g}},{data:!0,delay:500}),n(!1),r(w=>w.map(P=>P.citizenid===e.citizenid?{...e,apu:o,air:s,mc:c,k9:f,fto:g}:P)),ke.closeAll()};return h.jsxs(Je,{children:[h.jsxs("div",{style:{display:"flex",gap:15,alignItems:"center",justifyContent:"center"},children:[h.jsx(mr,{label:D.apu,checked:o,onChange:()=>{i(!o)}}),h.jsx(mr,{label:D.air,checked:s,onChange:()=>{a(!s)}}),h.jsx(mr,{label:D.mc,checked:c,onChange:()=>{u(!c)}}),h.jsx(mr,{label:D.k9,checked:f,onChange:()=>{p(!f)}}),h.jsx(mr,{label:D.fto,checked:g,onChange:()=>{v(!g)}})]}),h.jsx(st,{type:"submit",color:"gray",loading:t,variant:"light",onClick:y,children:D.confirm})]})},n$e=({officers:e,hasPermission:t})=>{const{setRosterOfficers:n}=Nu(),r=s=>s.charAt(0).toUpperCase()+s.slice(1),o=s=>{const a=pe(),c=pe(s),u=a.diff(c,"day");return r(u===0?D.today:u===1?D.yesterday:pe(s).fromNow())},i=e.map(s=>h.jsxs("tr",{children:[h.jsx("td",{children:h.jsxs(nt,{spacing:"sm",children:[h.jsx(CP,{size:55,src:s.image,radius:5}),h.jsx("div",{children:h.jsxs(U,{fz:"sm",fw:500,children:[s.firstname," ",s.lastname]})})]})}),h.jsx("td",{children:s.callsign}),h.jsx("td",{children:h.jsx(mr,{checked:s.apu,disabled:!0,styles:{input:{"&:disabled ":{backgroundColor:s.apu?"#1971c2":"#373A40"}}}})}),h.jsx("td",{children:h.jsx(mr,{checked:s.air,disabled:!0,styles:{input:{"&:disabled ":{backgroundColor:s.air?"#1971c2":"#373A40"}}}})}),h.jsx("td",{children:h.jsx(mr,{checked:s.mc,disabled:!0,styles:{input:{"&:disabled ":{backgroundColor:s.mc?"#1971c2":"#373A40"}}}})}),h.jsx("td",{children:h.jsx(mr,{checked:s.k9,disabled:!0,styles:{input:{"&:disabled ":{backgroundColor:s.k9?"#1971c2":"#373A40"}}}})}),h.jsx("td",{children:h.jsx(mr,{checked:s.fto,disabled:!0,styles:{input:{"&:disabled ":{backgroundColor:s.fto?"#1971c2":"#373A40"}}}})}),h.jsx("td",{children:s.lastActive?o(s.lastActive):""}),h.jsx("td",{children:h.jsx(et,{disabled:!0,icon:h.jsx(b8,{size:16}),variant:"unstyled",placeholder:s.title,size:"xs"})}),h.jsx("td",{children:h.jsx(nt,{spacing:2,position:"right",children:h.jsxs(Tt,{withinPortal:!0,withArrow:!0,position:"bottom-end",children:[h.jsx(Tt.Target,{children:h.jsx(Qe,{children:h.jsx(Fhe,{size:"1.2rem",stroke:1.5})})}),h.jsxs(Tt.Dropdown,{children:[h.jsx(Tt.Item,{icon:h.jsx(zhe,{size:20}),onClick:()=>ke.open({title:h.jsx(U,{style:{fontSize:17,color:"white"},weight:500,children:D.set_callsign}),children:h.jsx(QEe,{officer:s}),size:"xs",centered:!0}),children:D.set_callsign}),h.jsx(Tt.Item,{disabled:t,icon:h.jsx(ohe,{size:20}),onClick:()=>ke.open({title:h.jsx(U,{style:{fontSize:17,color:"white"},weight:500,children:D.set_rank}),centered:!0,size:"xs",children:h.jsx(e$e,{officer:s})}),children:D.set_rank}),h.jsx(Tt.Item,{disabled:t,icon:h.jsx(The,{size:20}),onClick:()=>ke.open({title:h.jsx(U,{style:{fontSize:17,color:"white"},weight:500,children:D.set_roles}),centered:!0,size:"sm",children:h.jsx(t$e,{officer:s})}),children:D.set_roles}),h.jsx(Tt.Item,{icon:h.jsx(Zf,{size:20}),color:"red",disabled:t,onClick:()=>ke.openConfirmModal({title:h.jsx(U,{style:{fontSize:17,color:"white"},weight:500,children:D.fire_officer}),children:h.jsx(U,{c:"dark.2",size:"sm",children:D.fire_officer_description.format(s.firstname,s.lastname)}),labels:{confirm:D.confirm,cancel:D.cancel},centered:!0,groupProps:{spacing:6},confirmProps:{color:"red"},onConfirm:async()=>{await me("fireOfficer",s.citizenid,{data:!0})&&(n(c=>c.filter(u=>u.citizenid!==s.citizenid)),ke.closeAll())}}),children:D.fire_officer})]})]})})})]},s.citizenid));return h.jsx(At,{h:735,children:h.jsxs(IP,{verticalSpacing:"sm",children:[h.jsx("thead",{children:h.jsxs("tr",{children:[h.jsx("th",{children:D.officer}),h.jsx("th",{children:D.callsign}),h.jsx("th",{children:D.apu}),h.jsx("th",{children:D.air}),h.jsx("th",{children:D.mc}),h.jsx("th",{children:D.k9}),h.jsx("th",{children:D.fto}),h.jsx("th",{children:D.last_active}),h.jsx("th",{children:D.role}),h.jsx("th",{})]})}),h.jsx("tbody",{children:i})]})})},r$e=()=>{const{getRosterOfficers:e}=Nu(),[t,n]=_.useState(!1),r=Zl({initialValues:{citizenid:"",callsign:""}});return h.jsx("form",{onSubmit:r.onSubmit(async o=>{n(!0);const i=await me("hireOfficer",{citizenid:o.citizenid,callsign:o.callsign,lastActive:Date.now()},{data:!1,delay:500});if(n(!1),!i)return r.setFieldError("citizenid",D.citizen_id_already_hired);await e(),ke.closeAll()}),children:h.jsxs(Je,{children:[h.jsx(yn,{label:D.citizen_id,description:D.citizen_id_you_want_to_hire,required:!0,...r.getInputProps("citizenid")}),h.jsx(yn,{label:D.callsign,description:D.callsign_you_want_to_hire,required:!0,...r.getInputProps("callsign")}),h.jsx(st,{variant:"light",color:"gray",type:"submit",loading:t,children:D.confirm})]})})},o$e=()=>{const{rosterOfficers:e,getRosterOfficers:t}=Nu(),[n,r]=_.useState(""),[o,i]=_.useState(e),s=200,[a,c]=_.useState(n),[u,f]=_.useState(null),[p,g]=_.useState(!1),v=bo(w=>w.personalData.role);function y(w){return!(w==="Chief"||w==="Assistant Chief"||w==="Captain"||w==="Lieutenant"||w==="Sergeant")}return _.useEffect(()=>{u!==null&&clearTimeout(u),g(!0);const w=setTimeout(()=>{c(n),g(!1)},s);return f(w),()=>{clearTimeout(w)}},[n]),_.useEffect(()=>{if(a.trim()==="")i(e);else{const w=e.filter(P=>(P.firstname||"").toLocaleLowerCase().includes(n.toLocaleLowerCase())||(P.lastname||"").toLocaleLowerCase().includes(n.toLocaleLowerCase()));i(w)}},[a,e]),_.useEffect(()=>{g(!0),(async()=>await t())().then(()=>{g(!1)})},[]),h.jsxs("div",{className:"roster",children:[h.jsxs("div",{className:"roster-top",children:[h.jsxs("div",{children:[h.jsx(U,{style:{fontSize:12},weight:500,c:"dimmed",children:D.manage_roster}),h.jsx(U,{style:{fontSize:24,color:"white"},weight:500,children:D.roster})]}),h.jsxs("div",{className:"roster-top-right",style:{display:"flex",gap:15,alignItems:"center"},children:[h.jsxs(U,{style:{fontSize:13,textAlign:"center"},weight:500,c:"dimmed",children:[e.length," ",D.members]}),h.jsx(yn,{placeholder:D.search,variant:"filled",value:n,onChange:w=>r(w.target.value)}),h.jsx(st,{leftIcon:h.jsx(T8,{size:20}),style:{backgroundColor:"rgba(51, 124, 255, 0.2)",color:"rgba(159, 194, 255, 1)"},onClick:()=>ke.open({title:h.jsx(U,{style:{fontSize:17,color:"white"},weight:500,children:D.hire_officer}),centered:!0,size:"xs",children:h.jsx(r$e,{})}),disabled:y(v),children:D.hire_officer})]})]}),h.jsx("div",{className:"roster-list",children:p?h.jsx(Pr,{children:h.jsx(en,{})}):h.jsx(n$e,{officers:o,hasPermission:y(v)})})]})};const i$e=({charge:e})=>{const{setCharges:t}=Gf(),[n,r]=_.useState(!1),[o,i]=_.useState(e.fine),[s,a]=_.useState(e.time),[c,u]=_.useState(e.points),f=bo(v=>v.personalData.role);function p(v){return!(v==="Chief"||v==="Assistant Chief"||v==="Captain"||v==="Lieutenant"||v==="Sergeant")}const g=async()=>{r(!0),await me("editCharge",{chargelabel:e.label,fine:o,time:s,points:c},{data:!0})&&(r(!1),t(y=>{const w={...y};return Object.keys(y).forEach(P=>{w[P]=y[P].map(x=>x.label===e.label?{...e,fine:Number(o),time:Number(s),points:Number(c)}:x)}),w}),ke.closeAll())};return h.jsxs(Je,{children:[h.jsx(ma,{withAsterisk:!0,label:D.charge_fine,value:o,onChange:i,min:0,variant:"filled",placeholder:D.charge_fine,parser:v=>v.replace(/\$\s?|(,*)/g,""),formatter:v=>Number.isNaN(parseFloat(v))?"$ ":`$ ${v}`.replace(/\B(?{const{setCharges:t}=Gf(),n=bo(o=>o.personalData.role);function r(o){return!(o==="Chief"||o==="Assistant Chief"||o==="Captain"||o==="Lieutenant"||o==="Sergeant")}return h.jsxs("div",{className:"charges-charge-card",children:[h.jsx(U,{fz:"sm",fw:500,c:"white",style:{textAlign:"center"},children:e.label}),h.jsxs("div",{style:{display:"flex",gap:5,justifyContent:"center"},children:[h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,fontWeight:500},children:["$",e.fine," ",D.fine]}),h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,fontWeight:500},children:[e.time," ",D.months]}),h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,fontWeight:500},children:[e.points," ",D.points]})]}),h.jsx(zt,{label:e.description,multiline:!0,withArrow:!0,color:"gray",children:h.jsx(U,{fz:"xs",fw:500,mt:2,style:{textAlign:"center",color:"white"},lineClamp:2,children:e.description})}),h.jsxs(nt,{position:"apart",style:{flex:"1"},children:[h.jsx(mt,{radius:"xs",variant:"filled",style:{fontSize:10,padding:12.5,fontWeight:500},color:e.type.toLocaleLowerCase()==="felony"?"red":e.type.toLocaleLowerCase()==="infraction"?"green":"yellow",children:e.type.charAt(0).toUpperCase()+e.type.slice(1)}),h.jsxs("div",{style:{display:"flex",gap:5,alignItems:"center"},children:[h.jsx(Qe,{variant:"light",disabled:r(n),onClick:()=>{ke.openConfirmModal({title:h.jsx(U,{style:{fontSize:17,color:"white"},weight:500,children:D.delete_charge}),size:"sm",centered:!0,labels:{confirm:D.confirm,cancel:D.cancel},groupProps:{spacing:6},confirmProps:{color:"red"},onConfirm:async()=>{await me("deleteCharge",{label:e.label},{data:1})&&t(i=>{const s={};return Object.keys(i).forEach(a=>{s[a]=i[a].filter(c=>c.label!==e.label)}),s})},children:h.jsx(U,{size:"sm",c:"dark.2",children:D.delete_charge_confirm.format(e.label)})})},children:h.jsx(z0,{size:16,color:r(n)?"gray":"white"})}),h.jsx(st,{disabled:r(n),color:"gray",compact:!0,onClick:()=>ke.open({title:h.jsx(U,{style:{fontSize:17,color:"white"},weight:500,children:D.edit_charge}),centered:!0,size:"sm",children:h.jsx(i$e,{charge:e})}),children:D.edit})]})]})]})},a$e=()=>{const{charges:e,setCharges:t}=Gf(),n=bo(E=>E.personalData.role),[r,o]=_.useState(""),[i,s]=_.useState(""),[a,c]=_.useState(""),[u,f]=_.useState(0),[p,g]=_.useState(0),[v,y]=_.useState(0),[w,P]=_.useState("infraction");function x(E){return!(E==="Chief"||E==="Assistant Chief"||E==="Captain"||E==="Lieutenant"||E==="Sergeant")}const S=E=>E.sort(($,N)=>{const I={infraction:1,misdemeanor:2,felony:3};return I[$.type]-I[N.type]}),O=async()=>{r.length<3||i.length<3||a.length<2||u===""||u<=0||w.length<3||(at()?t(E=>{const $={...E};return $[a].push({label:r,description:i,fine:u,time:Number(p),points:Number(v),type:w}),$}):(await me("createCharge",{label:r,description:i,category:a,fine:u,time:p,points:v,type:w},{data:1}),t(E=>{const $={...E};return $[a].push({label:r,description:i,fine:u,time:Number(p),points:Number(v),type:w}),$})),o(""),s(""),c(""),f(0),g(0),y(0),P("infraction"))};return h.jsxs("div",{className:"charges",children:[h.jsx("div",{className:"top-side-create-charges",children:h.jsxs("div",{className:"charges-create",children:[h.jsx(U,{style:{fontSize:17,color:"white"},weight:500,children:D.create_charge}),h.jsxs("div",{className:"charges-create-content",children:[h.jsx(yn,{withAsterisk:!0,label:D.charge_label,variant:"filled",placeholder:D.charge_label,value:r,onChange:E=>o(E.target.value),w:200,disabled:x(n)}),h.jsx(yn,{withAsterisk:!0,label:D.charge_description,variant:"filled",placeholder:D.charge_description,value:i,onChange:E=>s(E.target.value),w:250,disabled:x(n)}),h.jsx(Nl,{withAsterisk:!0,label:D.charge_category,placeholder:D.charge_category,variant:"filled",data:[{value:"OFFENSES AGAINST PERSONS",label:"OFFENSES AGAINST PERSONS"},{value:"OFFENSES INVOLVING THEFT",label:"OFFENSES INVOLVING THEFT"},{value:"OFFENSES INVOLVING FRAUD",label:"OFFENSES INVOLVING FRAUD"},{value:"OFFENSES INVOLVING DAMAGE TO PROPERTY",label:"OFFENSES INVOLVING DAMAGE TO PROPERTY"},{value:"OFFENSES AGAINST PUBLIC ADMINISTRATION",label:"OFFENSES AGAINST PUBLIC ADMINISTRATION"},{value:"OFFENSES AGAINST PUBLIC ORDER",label:"OFFENSES AGAINST PUBLIC ORDER"},{value:"OFFENSES AGAINST HEALTH AND MORALS",label:"OFFENSES AGAINST HEALTH AND MORALS"},{value:"OFFENSES AGAINST PUBLIC SAFETY",label:"OFFENSES AGAINST PUBLIC SAFETY"},{value:"OFFENSES INVOLVING THE OPERATION OF A VEHICLE",label:"OFFENSES INVOLVING THE OPERATION OF A VEHICLE"},{value:"OFFENSES INVOLVING THE WELL-BEING OF WILDLIFE",label:"OFFENSES INVOLVING THE WELL-BEING OF WILDLIFE"}],value:a,onChange:E=>c(E),w:275,disabled:x(n)}),h.jsx(ma,{withAsterisk:!0,label:D.charge_fine,value:u,onChange:f,min:0,variant:"filled",placeholder:D.charge_fine,w:140,parser:E=>E.replace(/\$\s?|(,*)/g,""),formatter:E=>Number.isNaN(parseFloat(E))?"$ ":`$ ${E}`.replace(/\B(?P(E)})]}),h.jsx("div",{className:"charges-create-buttons",children:h.jsx(st,{color:"green",disabled:x(n),onClick:O,children:D.create})})]})}),h.jsx(At,{h:700,scrollbarSize:4,children:h.jsx("div",{className:"charges-all-charges",children:h.jsx("div",{className:"charges-category",children:Object.entries(e).map(([E,$])=>h.jsxs("div",{children:[h.jsx(U,{style:{fontSize:17,color:"white"},weight:500,children:E}),h.jsx("div",{className:"charges-cards-row",children:S($).map(N=>h.jsx(s$e,{charge:N},N.label))})]},E))})})})]})};var Rx={exports:{}};/* @preserve * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade - */(function(e,t){(function(n,r){r(t)})(qx,function(n){var r="1.9.4";function o(l){var d,m,b,C;for(m=1,b=arguments.length;m"u"||!L||!L.Mixin)){l=O(l)?l:[l];for(var d=0;d0?Math.floor(l):Math.ceil(l)};j.prototype={clone:function(){return new j(this.x,this.y)},add:function(l){return this.clone()._add(F(l))},_add:function(l){return this.x+=l.x,this.y+=l.y,this},subtract:function(l){return this.clone()._subtract(F(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 j(this.x*l.x,this.y*l.y)},unscaleBy:function(l){return new j(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=U(this.x),this.y=U(this.y),this},distanceTo:function(l){l=F(l);var d=l.x-this.x,m=l.y-this.y;return Math.sqrt(d*d+m*m)},equals:function(l){return l=F(l),l.x===this.x&&l.y===this.y},contains:function(l){return l=F(l),Math.abs(l.x)<=Math.abs(this.x)&&Math.abs(l.y)<=Math.abs(this.y)},toString:function(){return"Point("+g(this.x)+", "+g(this.y)+")"}};function F(l,d,m){return l instanceof j?l:O(l)?new j(l[0],l[1]):l==null?l:typeof l=="object"&&"x"in l&&"y"in l?new j(l.x,l.y):new j(l,d,m)}function K(l,d){if(l)for(var m=d?[l,d]:l,b=0,C=m.length;b=this.min.x&&m.x<=this.max.x&&d.y>=this.min.y&&m.y<=this.max.y},intersects:function(l){l=ee(l);var d=this.min,m=this.max,b=l.min,C=l.max,T=C.x>=d.x&&b.x<=m.x,A=C.y>=d.y&&b.y<=m.y;return T&&A},overlaps:function(l){l=ee(l);var d=this.min,m=this.max,b=l.min,C=l.max,T=C.x>d.x&&b.xd.y&&b.y=d.lat&&C.lat<=m.lat&&b.lng>=d.lng&&C.lng<=m.lng},intersects:function(l){l=ie(l);var d=this._southWest,m=this._northEast,b=l.getSouthWest(),C=l.getNorthEast(),T=C.lat>=d.lat&&b.lat<=m.lat,A=C.lng>=d.lng&&b.lng<=m.lng;return T&&A},overlaps:function(l){l=ie(l);var d=this._southWest,m=this._northEast,b=l.getSouthWest(),C=l.getNorthEast(),T=C.lat>d.lat&&b.latd.lng&&b.lng1,Gt=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}(),Xr=function(){return!!document.createElement("canvas").getContext}(),So=!!(document.createElementNS&&bt("svg").createSVGRect),lr=!!So&&function(){var l=document.createElement("div");return l.innerHTML="",(l.firstChild&&l.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),cr=!So&&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}}(),Hi=navigator.platform.indexOf("Mac")===0,Es=navigator.platform.indexOf("Linux")===0;function ur(l){return navigator.userAgent.toLowerCase().indexOf(l)>=0}var Oe={ie:Tn,ielt9:kr,edge:lt,webkit:Zn,android:Jt,android23:ht,androidStock:Yr,opera:ar,chrome:Kr,gecko:Bt,safari:qr,phantom:pn,opera12:wn,win:Er,ie3d:gt,webkit3d:be,gecko3d:De,any3d:Jr,mobile:Rt,mobileWebkit:Zt,mobileWebkit3d:$r,msPointer:xt,pointer:nn,touch:Aa,touchNative:Gn,mobileOpera:Yn,mobileGecko:bn,retina:Ft,passiveEvents:Gt,canvas:Xr,svg:So,vml:cr,inlineSvg:lr,mac:Hi,linux:Es},Ba=Oe.msPointer?"MSPointerDown":"pointerdown",Yl=Oe.msPointer?"MSPointerMove":"pointermove",Fa=Oe.msPointer?"MSPointerUp":"pointerup",Se=Oe.msPointer?"MSPointerCancel":"pointercancel",ct={touchstart:Ba,touchmove:Yl,touchend:Fa,touchcancel:Se},rn={touchstart:Kl,touchmove:Va,touchend:Va,touchcancel:Va},ze={},Wi=!1;function Qr(l,d,m){return d==="touchstart"&&Ui(),rn[d]?(m=rn[d].bind(this,m),l.addEventListener(ct[d],m,!1),m):(console.warn("wrong event specified:",d),p)}function np(l,d,m){if(!ct[d]){console.warn("wrong event specified:",d);return}l.removeEventListener(ct[d],m,!1)}function b1(l){ze[l.pointerId]=l}function x1(l){ze[l.pointerId]&&(ze[l.pointerId]=l)}function on(l){delete ze[l.pointerId]}function Ui(){Wi||(document.addEventListener(Ba,b1,!0),document.addEventListener(Yl,x1,!0),document.addEventListener(Fa,on,!0),document.addEventListener(Se,on,!0),Wi=!0)}function Va(l,d){if(d.pointerType!==(d.MSPOINTER_TYPE_MOUSE||"mouse")){d.touches=[];for(var m in ze)d.touches.push(ze[m]);d.changedTouches=[d],l(d)}}function Kl(l,d){d.MSPOINTER_TYPE_TOUCH&&d.pointerType===d.MSPOINTER_TYPE_TOUCH&&In(d),Va(l,d)}function S1(l){var d={},m,b;for(b in l)m=l[b],d[b]=m&&m.bind?m.bind(l):m;return l=d,d.type="dblclick",d.detail=2,d.isTrusted=!1,d._simulated=!0,d}var P1=200;function O1(l,d){l.addEventListener("dblclick",d);var m=0,b;function C(T){if(T.detail!==1){b=T.detail;return}if(!(T.pointerType==="mouse"||T.sourceCapabilities&&!T.sourceCapabilities.firesTouchEvents)){var A=QO(T);if(!(A.some(function(te){return te instanceof HTMLLabelElement&&te.attributes.for})&&!A.some(function(te){return te instanceof HTMLInputElement||te instanceof HTMLSelectElement}))){var q=Date.now();q-m<=P1?(b++,b===2&&d(S1(T))):b=1,m=q}}}return l.addEventListener("click",C),{dblclick:d,simDblclick:C}}function C1(l,d){l.removeEventListener("dblclick",d.dblclick),l.removeEventListener("click",d.simDblclick)}var Lu=op(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),si=op(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Ie=si==="webkitTransition"||si==="OTransition"?si+"End":"transitionend";function vt(l){return typeof l=="string"?document.getElementById(l):l}function xn(l,d){var m=l.style[d]||l.currentStyle&&l.currentStyle[d];if((!m||m==="auto")&&document.defaultView){var b=document.defaultView.getComputedStyle(l,null);m=b?b[d]:null}return m==="auto"?null:m}function Fe(l,d,m){var b=document.createElement(l);return b.className=d||"",m&&m.appendChild(b),b}function ut(l){var d=l.parentNode;d&&d.removeChild(l)}function Mr(l){for(;l.firstChild;)l.removeChild(l.firstChild)}function Po(l){var d=l.parentNode;d&&d.lastChild!==l&&d.appendChild(l)}function Nr(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=rp(l);return m.length>0&&new RegExp("(^|\\s)"+d+"(\\s|$)").test(m)}function We(l,d){if(l.classList!==void 0)for(var m=y(d),b=0,C=m.length;b0?2*window.devicePixelRatio:1;function tC(l){return Oe.edge?l.wheelDeltaY/2:l.deltaY&&l.deltaMode===0?-l.deltaY/FV: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 A1(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 VV={__proto__:null,on:Ae,off:Pt,stopPropagation:Ua,disableScrollPropagation:z1,disableClickPropagation:Au,preventDefault:In,stop:Za,getPropagationPath:QO,getMousePosition:eC,getWheelDelta:tC,isExternalTarget:A1,addListener:Ae,removeListener:Pt},nC=Y.extend({run:function(l,d,m,b){this.stop(),this._el=l,this._inProgress=!0,this._duration=m||.25,this._easeOutPower=1/Math.max(b||.5,.2),this._startPos=Wa(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=G(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(),b=this._limitCenter(m,this._zoom,ie(l));return m.equals(b)||this.panTo(b,d),this._enforcingBounds=!1,this},panInside:function(l,d){d=d||{};var m=F(d.paddingTopLeft||d.padding||[0,0]),b=F(d.paddingBottomRight||d.padding||[0,0]),C=this.project(this.getCenter()),T=this.project(l),A=this.getPixelBounds(),q=ee([A.min.add(m),A.max.subtract(b)]),te=q.getSize();if(!q.contains(T)){this._enforcingBounds=!0;var oe=T.subtract(q.getCenter()),ve=q.extend(T).getSize().subtract(te);C.x+=oe.x<0?-ve.x:ve.x,C.y+=oe.y<0?-ve.y:ve.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(),b=d.divideBy(2).round(),C=m.divideBy(2).round(),T=b.subtract(C);return!T.x&&!T.y?this:(l.animate&&l.pan?this.panBy(T):(l.pan&&this._rawPanBy(T),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,b=new J(d,m),C=b.toBounds(l.coords.accuracy*2),T=this._locateOptions;if(T.setView){var A=this.getBoundsZoom(C);this.setView(b,T.maxZoom?Math.min(A,T.maxZoom):A)}var q={latlng:b,bounds:C,timestamp:l.timestamp};for(var te in l.coords)typeof l.coords[te]=="number"&&(q[te]=l.coords[te]);this.fire("locationfound",q)}},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(),ut(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(X(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)ut(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":""),b=Fe("div",m,d||this._mapPane);return l&&(this._panes[l]=b),b},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 fe(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=ie(l),m=F(m||[0,0]);var b=this.getZoom()||0,C=this.getMinZoom(),T=this.getMaxZoom(),A=l.getNorthWest(),q=l.getSouthEast(),te=this.getSize().subtract(m),oe=ee(this.project(q,b),this.project(A,b)).getSize(),ve=Oe.any3d?this.options.zoomSnap:1,Re=te.x/oe.x,Ke=te.y/oe.y,dr=d?Math.max(Re,Ke):Math.min(Re,Ke);return b=this.getScaleZoom(dr,b),ve&&(b=Math.round(b/(ve/100))*(ve/100),b=d?Math.ceil(b/ve)*ve:Math.floor(b/ve)*ve),Math.max(C,Math.min(T,b))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new j(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 K(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 b=m.zoom(l*m.scale(d));return isNaN(b)?1/0:b},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(F(l),d)},layerPointToLatLng:function(l){var d=F(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(ie(l))},distance:function(l,d){return this.options.crs.distance(ne(l),ne(d))},containerPointToLayerPoint:function(l){return F(l).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(l){return F(l).add(this._getMapPanePos())},containerPointToLatLng:function(l){var d=this.containerPointToLayerPoint(F(l));return this.layerPointToLatLng(d)},latLngToContainerPoint:function(l){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ne(l)))},mouseEventToContainerPoint:function(l){return eC(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=vt(l);if(d){if(d._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Ae(d,"scroll",this._onScroll,this),this._containerId=c(d)},_initLayout:function(){var l=this._container;this._fadeAnimated=this.options.fadeAnimation&&Oe.any3d,We(l,"leaflet-container"+(Oe.touch?" leaflet-touch":"")+(Oe.retina?" leaflet-retina":"")+(Oe.ielt9?" leaflet-oldie":"")+(Oe.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var d=xn(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),sn(this._mapPane,new j(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(We(l.markerPane,"leaflet-zoom-hide"),We(l.shadowPane,"leaflet-zoom-hide"))},_resetView:function(l,d,m){sn(this._mapPane,new j(0,0));var b=!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"),b&&this.fire("load")},_moveStart:function(l,d){return l&&this.fire("zoomstart"),d||this.fire("movestart"),this},_move:function(l,d,m,b){d===void 0&&(d=this._zoom);var C=this._zoom!==d;return this._zoom=d,this._lastCenter=l,this._pixelOrigin=this._getNewPixelOrigin(l),b?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 X(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(l){sn(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:Ae;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),Oe.any3d&&this.options.transform3DLimit&&(l?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){X(this._resizeRequest),this._resizeRequest=G(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=[],b,C=d==="mouseout"||d==="mouseover",T=l.target||l.srcElement,A=!1;T;){if(b=this._targets[c(T)],b&&(d==="click"||d==="preclick")&&this._draggableMoved(b)){A=!0;break}if(b&&b.listens(d,!0)&&(C&&!A1(T,l)||(m.push(b),C))||T===this._container)break;T=T.parentNode}return!m.length&&!A&&!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"&&I1(d),this._fireDOMEvent(l,m)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(l,d,m){if(l.type==="click"){var b=o({},l);b.type="preclick",this._fireDOMEvent(b,b.type,m)}var C=this._findEventTargets(l,d);if(m){for(var T=[],A=0;A0?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(),b=Oe.any3d?this.options.zoomSnap:1;return b&&(l=Math.round(l/b)*b),Math.max(d,Math.min(m,l))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Xt(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=Fe("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(l),this.on("zoomanim",function(d){var m=Lu,b=this._proxy.style[m];Ha(this._proxy,this.project(d.center,d.zoom),this.getZoomScale(d.zoom,1)),b===this._proxy.style[m]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ut(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var l=this.getCenter(),d=this.getZoom();Ha(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 b=this.getZoomScale(d),C=this._getCenterOffset(l)._divideBy(1-1/b);return m.animate!==!0&&!this.getSize().contains(C)?!1:(G(function(){this._moveStart(!0,m.noMoveStart||!1)._animateZoom(l,d,!0)},this),!0)},_animateZoom:function(l,d,m,b){this._mapPane&&(m&&(this._animatingZoom=!0,this._animateToCenter=l,this._animateToZoom=d,We(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:l,zoom:d,noUpdate:b}),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&&Xt(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 HV(l,d){return new rt(l,d)}var Vo=V.extend({options:{position:"topright"},initialize:function(l){w(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(),b=l._controlCorners[m];return We(d,"leaflet-control"),m.indexOf("bottom")!==-1?b.insertBefore(d,b.firstChild):b.appendChild(d),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ut(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()}}),Bu=function(l){return new Vo(l)};rt.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=Fe("div",d+"control-container",this._container);function b(C,T){var A=d+C+" "+d+T;l[C+T]=Fe("div",A,m)}b("top","left"),b("top","right"),b("bottom","left"),b("bottom","right")},_clearControlPos:function(){for(var l in this._controlCorners)ut(this._controlCorners[l]);ut(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var rC=Vo.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(l,d,m,b){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='",b=document.createElement("div");return b.innerHTML=m,b.firstChild},_addItem:function(l){var d=document.createElement("label"),m=this._map.hasLayer(l.layer),b;l.overlay?(b=document.createElement("input"),b.type="checkbox",b.className="leaflet-control-layers-selector",b.defaultChecked=m):b=this._createRadioElement("leaflet-base-layers_"+c(this),m),this._layerControlInputs.push(b),b.layerId=c(l.layer),Ae(b,"click",this._onInputClick,this);var C=document.createElement("span");C.innerHTML=" "+l.name;var T=document.createElement("span");d.appendChild(T),T.appendChild(b),T.appendChild(C);var A=l.overlay?this._overlaysList:this._baseLayersList;return A.appendChild(d),this._checkDisabledLayers(),d},_onInputClick:function(){if(!this._preventClick){var l=this._layerControlInputs,d,m,b=[],C=[];this._handlingClick=!0;for(var T=l.length-1;T>=0;T--)d=l[T],m=this._getLayer(d.layerId).layer,d.checked?b.push(m):d.checked||C.push(m);for(T=0;T=0;C--)d=l[C],m=this._getLayer(d.layerId).layer,d.disabled=m.options.minZoom!==void 0&&bm.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var l=this._section;this._preventClick=!0,Ae(l,"click",In),this.expand();var d=this;setTimeout(function(){Pt(l,"click",In),d._preventClick=!1})}}),WV=function(l,d,m){return new rC(l,d,m)},B1=Vo.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(l){var d="leaflet-control-zoom",m=Fe("div",d+" leaflet-bar"),b=this.options;return this._zoomInButton=this._createButton(b.zoomInText,b.zoomInTitle,d+"-in",m,this._zoomIn),this._zoomOutButton=this._createButton(b.zoomOutText,b.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,b,C){var T=Fe("a",m,b);return T.innerHTML=l,T.href="#",T.title=d,T.setAttribute("role","button"),T.setAttribute("aria-label",d),Au(T),Ae(T,"click",Za),Ae(T,"click",C,this),Ae(T,"click",this._refocusOnMap,this),T},_updateDisabled:function(){var l=this._map,d="leaflet-disabled";Xt(this._zoomInButton,d),Xt(this._zoomOutButton,d),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||l._zoom===l.getMinZoom())&&(We(this._zoomOutButton,d),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||l._zoom===l.getMaxZoom())&&(We(this._zoomInButton,d),this._zoomInButton.setAttribute("aria-disabled","true"))}});rt.mergeOptions({zoomControl:!0}),rt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new B1,this.addControl(this.zoomControl))});var UV=function(l){return new B1(l)},oC=Vo.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(l){var d="leaflet-control-scale",m=Fe("div",d),b=this.options;return this._addScales(b,d+"-line",m),l.on(b.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=Fe("div",d,m)),l.imperial&&(this._iScale=Fe("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,b,C;d>5280?(m=d/5280,b=this._getRoundNum(m),this._updateScale(this._iScale,b+" mi",b/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}}),ZV=function(l){return new oC(l)},GV='',F1=Vo.extend({options:{position:"bottomright",prefix:''+(Oe.inlineSvg?GV+" ":"")+"Leaflet"},initialize:function(l){w(this,l),this._attributions={}},onAdd:function(l){l.attributionControl=this,this._container=Fe("div","leaflet-control-attribution"),Au(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(' ')}}});rt.mergeOptions({attributionControl:!0}),rt.addInitHook(function(){this.options.attributionControl&&new F1().addTo(this)});var YV=function(l){return new F1(l)};Vo.Layers=rC,Vo.Zoom=B1,Vo.Scale=oC,Vo.Attribution=F1,Bu.layers=WV,Bu.zoom=UV,Bu.scale=ZV,Bu.attribution=YV;var li=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}});li.addTo=function(l,d){return l.addHandler(d,this),this};var KV={Events:Z},iC=Oe.touch?"touchstart mousedown":"mousedown",$s=Y.extend({options:{clickTolerance:3},initialize:function(l,d,m,b){w(this,b),this._element=l,this._dragStartTarget=d||l,this._preventOutline=m},enable:function(){this._enabled||(Ae(this._dragStartTarget,iC,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&($s._dragging===this&&this.finishDrag(!0),Pt(this._dragStartTarget,iC,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){$s._dragging===this&&this.finishDrag();return}if(!($s._dragging||l.shiftKey||l.which!==1&&l.button!==1&&!l.touches)&&($s._dragging=this,this._preventOutline&&I1(this._element),M1(),Du(),!this._moving)){this.fire("down");var d=l.touches?l.touches[0]:l,m=JO(this._element);this._startPoint=new j(d.clientX,d.clientY),this._startPos=Wa(this._element),this._parentScale=j1(m);var b=l.type==="mousedown";Ae(document,b?"mousemove":"touchmove",this._onMove,this),Ae(document,b?"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 j(d.clientX,d.clientY)._subtract(this._startPoint);!m.x&&!m.y||Math.abs(m.x)+Math.abs(m.y)T&&(A=q,T=te);T>m&&(d[A]=1,H1(l,d,m,b,A),H1(l,d,m,A,C))}function QV(l,d){for(var m=[l[0]],b=1,C=0,T=l.length;bd&&(m.push(l[b]),C=b);return Cd.max.x&&(m|=2),l.yd.max.y&&(m|=8),m}function eH(l,d){var m=d.x-l.x,b=d.y-l.y;return m*m+b*b}function Fu(l,d,m,b){var C=d.x,T=d.y,A=m.x-C,q=m.y-T,te=A*A+q*q,oe;return te>0&&(oe=((l.x-C)*A+(l.y-T)*q)/te,oe>1?(C=m.x,T=m.y):oe>0&&(C+=A*oe,T+=q*oe)),A=l.x-C,q=l.y-T,b?A*A+q*q:new j(C,T)}function Co(l){return!O(l[0])||typeof l[0][0]!="object"&&typeof l[0][0]<"u"}function fC(l){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Co(l)}function pC(l,d){var m,b,C,T,A,q,te,oe;if(!l||l.length===0)throw new Error("latlngs not passed");Co(l)||(console.warn("latlngs are not flat! Only the first ring will be used"),l=l[0]);var ve=ne([0,0]),Re=ie(l),Ke=Re.getNorthWest().distanceTo(Re.getSouthWest())*Re.getNorthEast().distanceTo(Re.getNorthWest());Ke<1700&&(ve=V1(l));var dr=l.length,Sn=[];for(m=0;mb){te=(T-b)/C,oe=[q.x-te*(q.x-A.x),q.y-te*(q.y-A.y)];break}var Tr=d.unproject(F(oe));return ne([Tr.lat+ve.lat,Tr.lng+ve.lng])}var tH={__proto__:null,simplify:lC,pointToSegmentDistance:cC,closestPointOnSegment:JV,clipSegment:dC,_getEdgeIntersection:ap,_getBitCode:Ga,_sqClosestPointOnSegment:Fu,isFlat:Co,_flat:fC,polylineCenter:pC},W1={project:function(l){return new j(l.lng,l.lat)},unproject:function(l){return new J(l.y,l.x)},bounds:new K([-180,-90],[180,90])},U1={R:6378137,R_MINOR:6356752314245179e-9,bounds:new K([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(l){var d=Math.PI/180,m=this.R,b=l.lat*d,C=this.R_MINOR/m,T=Math.sqrt(1-C*C),A=T*Math.sin(b),q=Math.tan(Math.PI/4-b/2)/Math.pow((1-A)/(1+A),T/2);return b=-m*Math.log(Math.max(q,1e-10)),new j(l.lng*d*m,b)},unproject:function(l){for(var d=180/Math.PI,m=this.R,b=this.R_MINOR/m,C=Math.sqrt(1-b*b),T=Math.exp(-l.y/m),A=Math.PI/2-2*Math.atan(T),q=0,te=.1,oe;q<15&&Math.abs(te)>1e-7;q++)oe=C*Math.sin(A),oe=Math.pow((1-oe)/(1+oe),C/2),te=Math.PI/2-2*Math.atan(T*oe)-A,A+=te;return new J(A*d,l.x*d/m)}},nH={__proto__:null,LonLat:W1,Mercator:U1,SphericalMercator:we},rH=o({},_e,{code:"EPSG:3395",projection:U1,transformation:function(){var l=.5/(Math.PI*U1.R);return Te(l,.5,-l,.5)}()}),hC=o({},_e,{code:"EPSG:4326",projection:W1,transformation:Te(1/180,1,-1/180,.5)}),oH=o({},le,{projection:W1,transformation:Te(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,b=d.lat-l.lat;return Math.sqrt(m*m+b*b)},infinite:!0});le.Earth=_e,le.EPSG3395=rH,le.EPSG3857=je,le.EPSG900913=it,le.EPSG4326=hC,le.Simple=oH;var Ho=Y.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})}}});rt.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?O(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 J&&d[0].equals(d[m-1])&&d.pop(),d},_setLatLngs:function(l){Gi.prototype._setLatLngs.call(this,l),Co(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Co(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var l=this._renderer._bounds,d=this.options.weight,m=new j(d,d);if(l=new K(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 b=0,C=this._rings.length,T;bl.y!=C.y>l.y&&l.x<(C.x-b.x)*(l.y-b.y)/(C.y-b.y)+b.x&&(d=!d);return d||Gi.prototype._containsPoint.call(this,l,!0)}});function fH(l,d){return new Xl(l,d)}var Yi=Zi.extend({initialize:function(l,d){w(this,d),this._layers={},l&&this.addData(l)},addData:function(l){var d=O(l)?l:l.features,m,b,C;if(d){for(m=0,b=d.length;m0&&C.push(C[0].slice()),C}function Ql(l,d){return l.feature?o({},l.feature,{geometry:d}):pp(d)}function pp(l){return l.type==="Feature"||l.type==="FeatureCollection"?l:{type:"Feature",properties:{},geometry:l}}var K1={toGeoJSON:function(l){return Ql(this,{type:"Point",coordinates:Y1(this.getLatLng(),l)})}};lp.include(K1),Z1.include(K1),cp.include(K1),Gi.include({toGeoJSON:function(l){var d=!Co(this._latlngs),m=fp(this._latlngs,d?1:0,!1,l);return Ql(this,{type:(d?"Multi":"")+"LineString",coordinates:m})}}),Xl.include({toGeoJSON:function(l){var d=!Co(this._latlngs),m=d&&!Co(this._latlngs[0]),b=fp(this._latlngs,m?2:d?1:0,!0,l);return d||(b=[b]),Ql(this,{type:(m?"Multi":"")+"Polygon",coordinates:b})}}),ql.include({toMultiPoint:function(l){var d=[];return this.eachLayer(function(m){d.push(m.toGeoJSON(l).geometry.coordinates)}),Ql(this,{type:"MultiPoint",coordinates:d})},toGeoJSON:function(l){var d=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(d==="MultiPoint")return this.toMultiPoint(l);var m=d==="GeometryCollection",b=[];return this.eachLayer(function(C){if(C.toGeoJSON){var T=C.toGeoJSON(l);if(m)b.push(T.geometry);else{var A=pp(T);A.type==="FeatureCollection"?b.push.apply(b,A.features):b.push(A)}}}),m?Ql(this,{geometries:b,type:"GeometryCollection"}):{type:"FeatureCollection",features:b}}});function vC(l,d){return new Yi(l,d)}var pH=vC,hp=Ho.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(l,d,m){this._url=l,this._bounds=ie(d),w(this,m)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(We(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ut(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(l){return this.options.opacity=l,this._image&&this._updateOpacity(),this},setStyle:function(l){return l.opacity&&this.setOpacity(l.opacity),this},bringToFront:function(){return this._map&&Po(this._image),this},bringToBack:function(){return this._map&&Nr(this._image),this},setUrl:function(l){return this._url=l,this._image&&(this._image.src=l),this},setBounds:function(l){return this._bounds=ie(l),this._map&&this._reset(),this},getEvents:function(){var l={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(l.zoomanim=this._animateZoom),l},setZIndex:function(l){return this.options.zIndex=l,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var l=this._url.tagName==="IMG",d=this._image=l?this._url:Fe("img");if(We(d,"leaflet-image-layer"),this._zoomAnimated&&We(d,"leaflet-zoom-animated"),this.options.className&&We(d,this.options.className),d.onselectstart=p,d.onmousemove=p,d.onload=s(this.fire,this,"load"),d.onerror=s(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(d.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),l){this._url=d.src;return}d.src=this._url,d.alt=this.options.alt},_animateZoom:function(l){var d=this._map.getZoomScale(l.zoom),m=this._map._latLngBoundsToNewLayerBounds(this._bounds,l.zoom,l.center).min;Ha(this._image,m,d)},_reset:function(){var l=this._image,d=new K(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),m=d.getSize();sn(l,d.min),l.style.width=m.x+"px",l.style.height=m.y+"px"},_updateOpacity:function(){Oo(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var l=this.options.errorOverlayUrl;l&&this._url!==l&&(this._url=l,this._image.src=l)},getCenter:function(){return this._bounds.getCenter()}}),hH=function(l,d,m){return new hp(l,d,m)},yC=hp.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var l=this._url.tagName==="VIDEO",d=this._image=l?this._url:Fe("video");if(We(d,"leaflet-image-layer"),this._zoomAnimated&&We(d,"leaflet-zoom-animated"),this.options.className&&We(d,this.options.className),d.onselectstart=p,d.onmousemove=p,d.onloadeddata=s(this.fire,this,"load"),l){for(var m=d.getElementsByTagName("source"),b=[],C=0;C0?b:[d.src];return}O(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 T=0;TC?(d.height=C+"px",We(l,T)):Xt(l,T),this._containerWidth=this._container.offsetWidth},_animateZoom:function(l){var d=this._map._latLngToNewLayerPoint(this._latlng,l.zoom,l.center),m=this._getAnchor();sn(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(xn(this._container,"marginBottom"),10)||0,m=this._container.offsetHeight+d,b=this._containerWidth,C=new j(this._containerLeft,-m-this._containerBottom);C._add(Wa(this._container));var T=l.layerPointToContainerPoint(C),A=F(this.options.autoPanPadding),q=F(this.options.autoPanPaddingTopLeft||A),te=F(this.options.autoPanPaddingBottomRight||A),oe=l.getSize(),ve=0,Re=0;T.x+b+te.x>oe.x&&(ve=T.x+b-oe.x+te.x),T.x-ve-q.x<0&&(ve=T.x-q.x),T.y+m+te.y>oe.y&&(Re=T.y+m-oe.y+te.y),T.y-Re-q.y<0&&(Re=T.y-q.y),(ve||Re)&&(this.options.keepInView&&(this._autopanning=!0),l.fire("autopanstart").panBy([ve,Re]))}},_getAnchor:function(){return F(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),vH=function(l,d){return new mp(l,d)};rt.mergeOptions({closePopupOnClick:!0}),rt.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}}),Ho.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 Zi||(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)){Za(l);var d=l.layer||l.target;if(this._popup._source===d&&!(d instanceof Ms)){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 gp=ci.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(l){ci.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){ci.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=ci.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=Fe("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,b=this._map,C=this._container,T=b.latLngToContainerPoint(b.getCenter()),A=b.layerPointToContainerPoint(l),q=this.options.direction,te=C.offsetWidth,oe=C.offsetHeight,ve=F(this.options.offset),Re=this._getAnchor();q==="top"?(d=te/2,m=oe):q==="bottom"?(d=te/2,m=0):q==="center"?(d=te/2,m=oe/2):q==="right"?(d=0,m=oe/2):q==="left"?(d=te,m=oe/2):A.xthis.options.maxZoom||mb?this._retainParent(C,T,A,b):!1)},_retainChildren:function(l,d,m,b){for(var C=2*l;C<2*l+2;C++)for(var T=2*d;T<2*d+2;T++){var A=new j(C,T);A.z=m+1;var q=this._tileCoordsToKey(A),te=this._tiles[q];if(te&&te.active){te.retain=!0;continue}else te&&te.loaded&&(te.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 Ke=C.min.x;Ke<=C.max.x;Ke++){var dr=new j(Ke,Re);if(dr.z=this._tileZoom,!!this._isValidTile(dr)){var Sn=this._tiles[this._tileCoordsToKey(dr)];Sn?Sn.current=!0:A.push(dr)}}if(A.sort(function(Tr,tc){return Tr.distanceTo(T)-tc.distanceTo(T)}),A.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var ko=document.createDocumentFragment();for(Ke=0;Kem.max.x)||!d.wrapLat&&(l.ym.max.y))return!1}if(!this.options.bounds)return!0;var b=this._tileCoordsToBounds(l);return ie(this.options.bounds).overlaps(b)},_keyToBounds:function(l){return this._tileCoordsToBounds(this._keyToTileCoords(l))},_tileCoordsToNwSe:function(l){var d=this._map,m=this.getTileSize(),b=l.scaleBy(m),C=b.add(m),T=d.unproject(b,l.z),A=d.unproject(C,l.z);return[T,A]},_tileCoordsToBounds:function(l){var d=this._tileCoordsToNwSe(l),m=new fe(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 j(+d[0],+d[1]);return m.z=+d[2],m},_removeTile:function(l){var d=this._tiles[l];d&&(ut(d.el),delete this._tiles[l],this.fire("tileunload",{tile:d.el,coords:this._keyToTileCoords(l)}))},_initTile:function(l){We(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,Oe.ielt9&&this.options.opacity<1&&Oo(l,this.options.opacity)},_addTile:function(l,d){var m=this._getTilePos(l),b=this._tileCoordsToKey(l),C=this.createTile(this._wrapCoords(l),s(this._tileReady,this,l));this._initTile(C),this.createTile.length<2&&G(s(this._tileReady,this,l,null,C)),sn(C,m),this._tiles[b]={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 b=this._tileCoordsToKey(l);m=this._tiles[b],m&&(m.loaded=+new Date,this._map._fadeAnimated?(Oo(m.el,0),X(this._fadeFrame),this._fadeFrame=G(this._updateOpacity,this)):(m.active=!0,this._pruneTiles()),d||(We(m.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:m.el,coords:l})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Oe.ielt9||!this._map._fadeAnimated?G(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 j(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 K(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 wH(l){return new Hu(l)}var ec=Hu.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=w(this,d),d.detectRetina&&Oe.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 Ae(m,"load",s(this._tileOnLoad,this,d,m)),Ae(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:Oe.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){Oe.ielt9?setTimeout(s(l,this,null,d),0):l(null,d)},_tileOnError:function(l,d,m){var b=this.options.errorTileUrl;b&&d.getAttribute("src")!==b&&(d.src=b),l(m,d)},_onTileRemove:function(l){l.tile.onload=null},_getZoomForUrl:function(){var l=this._tileZoom,d=this.options.maxZoom,m=this.options.zoomReverse,b=this.options.zoomOffset;return m&&(l=d-l),l+b},_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;ut(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",$),Hu.prototype._removeTile.call(this,l)},_tileReady:function(l,d,m){if(!(!this._map||m&&m.getAttribute("src")===$))return Hu.prototype._tileReady.call(this,l,d,m)}});function bC(l,d){return new ec(l,d)}var xC=ec.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 b in d)b in this.options||(m[b]=d[b]);d=w(this,d);var C=d.detectRetina&&Oe.retina?2:1,T=this.getTileSize();m.width=T.x*C,m.height=T.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,ec.prototype.onAdd.call(this,l)},getTileUrl:function(l){var d=this._tileCoordsToNwSe(l),m=this._crs,b=ee(m.project(d[0]),m.project(d[1])),C=b.min,T=b.max,A=(this._wmsVersion>=1.3&&this._crs===hC?[C.y,C.x,T.y,T.x]:[C.x,C.y,T.x,T.y]).join(","),q=ec.prototype.getTileUrl.call(this,l);return q+P(this.wmsParams,q,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+A},setParams:function(l,d){return o(this.wmsParams,l),d||this.redraw(),this}});function bH(l,d){return new xC(l,d)}ec.WMS=xC,bC.wms=bH;var Ki=Ho.extend({options:{padding:.1},initialize:function(l){w(this,l),c(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),We(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),b=this._map.getSize().multiplyBy(.5+this.options.padding),C=this._map.project(this._center,d),T=b.multiplyBy(-m).add(C).subtract(this._map._getNewPixelOrigin(l,d));Oe.any3d?Ha(this._container,T,m):sn(this._container,T)},_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 K(m,m.add(d.multiplyBy(1+l*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),SC=Ki.extend({options:{tolerance:0},getEvents:function(){var l=Ki.prototype.getEvents.call(this);return l.viewprereset=this._onViewPreReset,l},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Ki.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var l=this._container=document.createElement("canvas");Ae(l,"mousemove",this._onMouseMove,this),Ae(l,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ae(l,"mouseout",this._handleMouseOut,this),l._leaflet_disable_events=!0,this._ctx=l.getContext("2d")},_destroyContainer:function(){X(this._redrawRequest),delete this._ctx,ut(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)){Ki.prototype._update.call(this);var l=this._bounds,d=this._container,m=l.getSize(),b=Oe.retina?2:1;sn(d,l.min),d.width=b*m.x,d.height=b*m.y,d.style.width=m.x+"px",d.style.height=m.y+"px",Oe.retina&&this._ctx.scale(2,2),this._ctx.translate(-l.min.x,-l.min.y),this.fire("update")}},_reset:function(){Ki.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,b=d.prev;m?m.prev=b:this._drawLast=b,b?b.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=[],b,C;for(C=0;C')}}catch{}return function(l){return document.createElement("<"+l+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),xH={_initContainer:function(){this._container=Fe("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Ki.prototype._update.call(this),this.fire("update"))},_initPath:function(l){var d=l._container=Wu("shape");We(d,"leaflet-vml-shape "+(this.options.className||"")),d.coordsize="1 1",l._path=Wu("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;ut(d),l.removeInteractiveTarget(d),delete this._layers[c(l)]},_updateStyle:function(l){var d=l._stroke,m=l._fill,b=l.options,C=l._container;C.stroked=!!b.stroke,C.filled=!!b.fill,b.stroke?(d||(d=l._stroke=Wu("stroke")),C.appendChild(d),d.weight=b.weight+"px",d.color=b.color,d.opacity=b.opacity,b.dashArray?d.dashStyle=O(b.dashArray)?b.dashArray.join(" "):b.dashArray.replace(/( *, *)/g," "):d.dashStyle="",d.endcap=b.lineCap.replace("butt","flat"),d.joinstyle=b.lineJoin):d&&(C.removeChild(d),l._stroke=null),b.fill?(m||(m=l._fill=Wu("fill")),C.appendChild(m),m.color=b.fillColor||b.color,m.opacity=b.fillOpacity):m&&(C.removeChild(m),l._fill=null)},_updateCircle:function(l){var d=l._point.round(),m=Math.round(l._radius),b=Math.round(l._radiusY||m);this._setPath(l,l._empty()?"M0 0":"AL "+d.x+","+d.y+" "+m+","+b+" 0,"+65535*360)},_setPath:function(l,d){l._path.v=d},_bringToFront:function(l){Po(l._container)},_bringToBack:function(l){Nr(l._container)}},vp=Oe.vml?Wu:bt,Uu=Ki.extend({_initContainer:function(){this._container=vp("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=vp("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ut(this._container),Pt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Ki.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)),sn(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=vp("path");l.options.className&&We(d,l.options.className),l.options.interactive&&We(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){ut(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,_n(l._parts,d))},_updateCircle:function(l){var d=l._point,m=Math.max(Math.round(l._radius),1),b=Math.max(Math.round(l._radiusY),1)||m,C="a"+m+","+b+" 0 1,0 ",T=l._empty()?"M0 0":"M"+(d.x-m)+","+d.y+C+m*2+",0 "+C+-m*2+",0 ";this._setPath(l,T)},_setPath:function(l,d){l._path.setAttribute("d",d)},_bringToFront:function(l){Po(l._path)},_bringToBack:function(l){Nr(l._path)}});Oe.vml&&Uu.include(xH);function OC(l){return Oe.svg||Oe.vml?new Uu(l):null}rt.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&&PC(l)||OC(l)}});var CC=Xl.extend({initialize:function(l,d){Xl.prototype.initialize.call(this,this._boundsToLatLngs(l),d)},setBounds:function(l){return this.setLatLngs(this._boundsToLatLngs(l))},_boundsToLatLngs:function(l){return l=ie(l),[l.getSouthWest(),l.getNorthWest(),l.getNorthEast(),l.getSouthEast()]}});function SH(l,d){return new CC(l,d)}Uu.create=vp,Uu.pointsToPath=_n,Yi.geometryToLayer=up,Yi.coordsToLatLng=G1,Yi.coordsToLatLngs=dp,Yi.latLngToCoords=Y1,Yi.latLngsToCoords=fp,Yi.getFeature=Ql,Yi.asFeature=pp,rt.mergeOptions({boxZoom:!0});var kC=li.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(){Ae(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Pt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ut(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(),Du(),M1(),this._startPoint=this._map.mouseEventToContainerPoint(l),Ae(document,{contextmenu:Za,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(l){this._moved||(this._moved=!0,this._box=Fe("div","leaflet-zoom-box",this._container),We(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(l);var d=new K(this._point,this._startPoint),m=d.getSize();sn(this._box,d.min),this._box.style.width=m.x+"px",this._box.style.height=m.y+"px"},_finish:function(){this._moved&&(ut(this._box),Xt(this._container,"leaflet-crosshair")),Ru(),N1(),Pt(document,{contextmenu:Za,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 fe(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())}});rt.addInitHook("addHandler","boxZoom",kC),rt.mergeOptions({doubleClickZoom:!0});var EC=li.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(),b=d.options.zoomDelta,C=l.originalEvent.shiftKey?m-b:m+b;d.options.doubleClickZoom==="center"?d.setZoom(C):d.setZoomAround(l.containerPoint,C)}});rt.addInitHook("addHandler","doubleClickZoom",EC),rt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var $C=li.extend({addHooks:function(){if(!this._draggable){var l=this._map;this._draggable=new $s(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))}We(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Xt(this._map._container,"leaflet-grab"),Xt(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=ie(this._map.options.maxBounds);this._offsetLimit=ee(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,b=this._draggable._newPos.x,C=(b-d+m)%l+d-m,T=(b+d+m)%l-d-m,A=Math.abs(C+m)0?T:-T))-d;this._delta=0,this._startTime=null,A&&(l.options.scrollWheelZoom==="center"?l.setZoom(d+A):l.setZoomAround(this._lastMousePos,d+A))}});rt.addInitHook("addHandler","scrollWheelZoom",NC);var PH=600;rt.mergeOptions({tapHold:Oe.touchNative&&Oe.safari&&Oe.mobile,tapTolerance:15});var TC=li.extend({addHooks:function(){Ae(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 j(d.clientX,d.clientY),this._holdTimeout=setTimeout(s(function(){this._cancel(),this._isTapValid()&&(Ae(document,"touchend",In),Ae(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",d))},this),PH),Ae(document,"touchend touchcancel contextmenu",this._cancel,this),Ae(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function l(){Pt(document,"touchend",In),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 j(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)}});rt.addInitHook("addHandler","tapHold",TC),rt.mergeOptions({touchZoom:Oe.touch,bounceAtZoomLimits:!0});var IC=li.extend({addHooks:function(){We(this._map._container,"leaflet-touch-zoom"),Ae(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Xt(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]),b=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(b)._divideBy(2))),this._startDist=m.distanceTo(b),this._startZoom=d.getZoom(),this._moved=!1,this._zooming=!0,d._stop(),Ae(document,"touchmove",this._onTouchMove,this),Ae(document,"touchend touchcancel",this._onTouchEnd,this),In(l)}},_onTouchMove:function(l){if(!(!l.touches||l.touches.length!==2||!this._zooming)){var d=this._map,m=d.mouseEventToContainerPoint(l.touches[0]),b=d.mouseEventToContainerPoint(l.touches[1]),C=m.distanceTo(b)/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 T=m._add(b)._divideBy(2)._subtract(this._centerPoint);if(C===1&&T.x===0&&T.y===0)return;this._center=d.unproject(d.project(this._pinchStartLatLng,this._zoom).subtract(T),this._zoom)}this._moved||(d._moveStart(!0,!1),this._moved=!0),X(this._animRequest);var A=s(d._move,d,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=G(A,this,!0),In(l)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,X(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))}});rt.addInitHook("addHandler","touchZoom",IC),rt.BoxZoom=kC,rt.DoubleClickZoom=EC,rt.Drag=$C,rt.Keyboard=MC,rt.ScrollWheelZoom=NC,rt.TapHold=TC,rt.TouchZoom=IC,n.Bounds=K,n.Browser=Oe,n.CRS=le,n.Canvas=SC,n.Circle=Z1,n.CircleMarker=cp,n.Class=V,n.Control=Vo,n.DivIcon=wC,n.DivOverlay=ci,n.DomEvent=VV,n.DomUtil=BV,n.Draggable=$s,n.Evented=Y,n.FeatureGroup=Zi,n.GeoJSON=Yi,n.GridLayer=Hu,n.Handler=li,n.Icon=Jl,n.ImageOverlay=hp,n.LatLng=J,n.LatLngBounds=fe,n.Layer=Ho,n.LayerGroup=ql,n.LineUtil=tH,n.Map=rt,n.Marker=lp,n.Mixin=KV,n.Path=Ms,n.Point=j,n.PolyUtil=qV,n.Polygon=Xl,n.Polyline=Gi,n.Popup=mp,n.PosAnimation=nC,n.Projection=nH,n.Rectangle=CC,n.Renderer=Ki,n.SVG=Uu,n.SVGOverlay=_C,n.TileLayer=ec,n.Tooltip=gp,n.Transformation=He,n.Util=Q,n.VideoOverlay=yC,n.bind=s,n.bounds=ee,n.canvas=PC,n.circle=uH,n.circleMarker=cH,n.control=Bu,n.divIcon=_H,n.extend=o,n.featureGroup=sH,n.geoJSON=vC,n.geoJson=pH,n.gridLayer=wH,n.icon=aH,n.imageOverlay=hH,n.latLng=ne,n.latLngBounds=ie,n.layerGroup=iH,n.map=HV,n.marker=lH,n.point=F,n.polygon=fH,n.polyline=dH,n.popup=vH,n.rectangle=SH,n.setOptions=w,n.stamp=c,n.svg=OC,n.svgOverlay=gH,n.tileLayer=bC,n.tooltip=yH,n.transformation=Te,n.version=r,n.videoOverlay=mH;var OH=window.L;n.noConflict=function(){return window.L=OH,this},window.L=n})})(zx,zx.exports);var c1=zx.exports;const bi=Ea(c1);function vF(e,t){const n=_.useRef(t);_.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 p$e=1;function h$e(e){return Object.freeze({__version:p$e,map:e})}function m$e(e,t){return Object.freeze({...e,...t})}const yF=_.createContext(null),_F=yF.Provider;function $O(){const e=_.useContext(yF);if(e==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return e}function g$e(e){function t(n,r){const{instance:o,context:i}=e(n).current;return _.useImperativeHandle(r,()=>o),n.children==null?null:k.createElement(_F,{value:i},n.children)}return _.forwardRef(t)}function v$e(e){function t(n,r){const[o,i]=_.useState(!1),{instance:s}=e(n,i).current;_.useImperativeHandle(r,()=>s),_.useEffect(function(){o&&s.update()},[s,o,n.children]);const a=s._contentNode;return a?xs.createPortal(n.children,a):null}return _.forwardRef(t)}function wF(e,t){const n=_.useRef();_.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 bF(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function y$e(e,t){return function(r,o){const i=$O(),s=e(bF(r,i),i);return vF(i.map,r.attribution),wF(s.current,r.eventHandlers),t(s.current,i,r,o),s}}function xF(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function SF(e,t){return t==null?function(r,o){const i=_.useRef();return i.current||(i.current=e(r,o)),i}:function(r,o){const i=_.useRef();i.current||(i.current=e(r,o));const s=_.useRef(r),{instance:a}=i.current;return _.useEffect(function(){s.current!==r&&(t(a,r,s.current),s.current=r)},[a,r,o]),i}}function _$e(e,t){_.useEffect(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){t.layerContainer?.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function w$e(e){return function(n){const r=$O(),o=e(bF(n,r),r);return vF(r.map,n.attribution),wF(o.current,n.eventHandlers),_$e(o.current,r),o}}function b$e(e,t){const n=SF(e,t),r=w$e(n);return g$e(r)}function x$e(e,t){const n=SF(e),r=y$e(n,t);return v$e(r)}function S$e(){return $O().map}function Ax(){return Ax=Object.assign||function(e){for(var t=1;tv?.map??null,[v]);const w=_.useCallback(x=>{if(x!==null&&v===null){const S=new c1.Map(x,f);n!=null&&u!=null?S.setView(n,u):e!=null&&S.fitBounds(e,t),c!=null&&S.whenReady(c),y(h$e(S))}},[]);_.useEffect(()=>()=>{v?.map.remove()},[v]);const P=v?k.createElement(_F,{value:v},r):s??null;return k.createElement("div",Ax({},g,{ref:w}),P)}const O$e=_.forwardRef(P$e),PF=b$e(function({position:t,...n},r){const o=new c1.Marker(t,n);return xF(o,m$e(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())}),C$e=x$e(function(t,n){const r=new c1.Popup(t,n.overlayContainer);return xF(r,n)},function(t,n,{position:r},o){_.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])}),k$e=e=>{const t=S$e(),n=bi.tileLayer(`https://s.rsg.sc/sc/images/games/GTAV/map/${e.mapLayer}/{z}/{x}/{y}.jpg`,{maxZoom:7,minZoom:2,bounds:bi.latLngBounds(bi.latLng(0,128),bi.latLng(-192,0))}),r=bi.latLngBounds(bi.latLng(0,128),bi.latLng(-192,0));return t.setMaxBounds(r),t.attributionControl.setPrefix(!1),t.setView([0,0],2),t.addLayer(n),null};var Iu={};/** + */(function(e,t){(function(n,r){r(t)})(Kx,function(n){var r="1.9.4";function o(l){var d,m,b,C;for(m=1,b=arguments.length;m"u"||!L||!L.Mixin)){l=O(l)?l:[l];for(var d=0;d0?Math.floor(l):Math.ceil(l)};j.prototype={clone:function(){return new j(this.x,this.y)},add:function(l){return this.clone()._add(F(l))},_add:function(l){return this.x+=l.x,this.y+=l.y,this},subtract:function(l){return this.clone()._subtract(F(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 j(this.x*l.x,this.y*l.y)},unscaleBy:function(l){return new j(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=W(this.x),this.y=W(this.y),this},distanceTo:function(l){l=F(l);var d=l.x-this.x,m=l.y-this.y;return Math.sqrt(d*d+m*m)},equals:function(l){return l=F(l),l.x===this.x&&l.y===this.y},contains:function(l){return l=F(l),Math.abs(l.x)<=Math.abs(this.x)&&Math.abs(l.y)<=Math.abs(this.y)},toString:function(){return"Point("+g(this.x)+", "+g(this.y)+")"}};function F(l,d,m){return l instanceof j?l:O(l)?new j(l[0],l[1]):l==null?l:typeof l=="object"&&"x"in l&&"y"in l?new j(l.x,l.y):new j(l,d,m)}function K(l,d){if(l)for(var m=d?[l,d]:l,b=0,C=m.length;b=this.min.x&&m.x<=this.max.x&&d.y>=this.min.y&&m.y<=this.max.y},intersects:function(l){l=ee(l);var d=this.min,m=this.max,b=l.min,C=l.max,T=C.x>=d.x&&b.x<=m.x,A=C.y>=d.y&&b.y<=m.y;return T&&A},overlaps:function(l){l=ee(l);var d=this.min,m=this.max,b=l.min,C=l.max,T=C.x>d.x&&b.xd.y&&b.y=d.lat&&C.lat<=m.lat&&b.lng>=d.lng&&C.lng<=m.lng},intersects:function(l){l=ie(l);var d=this._southWest,m=this._northEast,b=l.getSouthWest(),C=l.getNorthEast(),T=C.lat>=d.lat&&b.lat<=m.lat,A=C.lng>=d.lng&&b.lng<=m.lng;return T&&A},overlaps:function(l){l=ie(l);var d=this._southWest,m=this._northEast,b=l.getSouthWest(),C=l.getNorthEast(),T=C.lat>d.lat&&b.latd.lng&&b.lng1,Gt=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}(),Xr=function(){return!!document.createElement("canvas").getContext}(),So=!!(document.createElementNS&&bt("svg").createSVGRect),lr=!!So&&function(){var l=document.createElement("div");return l.innerHTML="",(l.firstChild&&l.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),cr=!So&&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}}(),Vi=navigator.platform.indexOf("Mac")===0,Es=navigator.platform.indexOf("Linux")===0;function ur(l){return navigator.userAgent.toLowerCase().indexOf(l)>=0}var Oe={ie:Tn,ielt9:kr,edge:lt,webkit:Zn,android:Jt,android23:ht,androidStock:Yr,opera:ar,chrome:Kr,gecko:Bt,safari:qr,phantom:pn,opera12:wn,win:Er,ie3d:gt,webkit3d:be,gecko3d:De,any3d:Jr,mobile:Dt,mobileWebkit:Zt,mobileWebkit3d:$r,msPointer:xt,pointer:nn,touch:Aa,touchNative:Gn,mobileOpera:Yn,mobileGecko:bn,retina:Ft,passiveEvents:Gt,canvas:Xr,svg:So,vml:cr,inlineSvg:lr,mac:Vi,linux:Es},Ba=Oe.msPointer?"MSPointerDown":"pointerdown",Yl=Oe.msPointer?"MSPointerMove":"pointermove",Fa=Oe.msPointer?"MSPointerUp":"pointerup",Se=Oe.msPointer?"MSPointerCancel":"pointercancel",ct={touchstart:Ba,touchmove:Yl,touchend:Fa,touchcancel:Se},rn={touchstart:Kl,touchmove:Va,touchend:Va,touchcancel:Va},ze={},Hi=!1;function Qr(l,d,m){return d==="touchstart"&&Wi(),rn[d]?(m=rn[d].bind(this,m),l.addEventListener(ct[d],m,!1),m):(console.warn("wrong event specified:",d),p)}function tp(l,d,m){if(!ct[d]){console.warn("wrong event specified:",d);return}l.removeEventListener(ct[d],m,!1)}function w1(l){ze[l.pointerId]=l}function b1(l){ze[l.pointerId]&&(ze[l.pointerId]=l)}function on(l){delete ze[l.pointerId]}function Wi(){Hi||(document.addEventListener(Ba,w1,!0),document.addEventListener(Yl,b1,!0),document.addEventListener(Fa,on,!0),document.addEventListener(Se,on,!0),Hi=!0)}function Va(l,d){if(d.pointerType!==(d.MSPOINTER_TYPE_MOUSE||"mouse")){d.touches=[];for(var m in ze)d.touches.push(ze[m]);d.changedTouches=[d],l(d)}}function Kl(l,d){d.MSPOINTER_TYPE_TOUCH&&d.pointerType===d.MSPOINTER_TYPE_TOUCH&&In(d),Va(l,d)}function x1(l){var d={},m,b;for(b in l)m=l[b],d[b]=m&&m.bind?m.bind(l):m;return l=d,d.type="dblclick",d.detail=2,d.isTrusted=!1,d._simulated=!0,d}var S1=200;function P1(l,d){l.addEventListener("dblclick",d);var m=0,b;function C(T){if(T.detail!==1){b=T.detail;return}if(!(T.pointerType==="mouse"||T.sourceCapabilities&&!T.sourceCapabilities.firesTouchEvents)){var A=QO(T);if(!(A.some(function(te){return te instanceof HTMLLabelElement&&te.attributes.for})&&!A.some(function(te){return te instanceof HTMLInputElement||te instanceof HTMLSelectElement}))){var q=Date.now();q-m<=S1?(b++,b===2&&d(x1(T))):b=1,m=q}}}return l.addEventListener("click",C),{dblclick:d,simDblclick:C}}function O1(l,d){l.removeEventListener("dblclick",d.dblclick),l.removeEventListener("click",d.simDblclick)}var ju=rp(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),si=rp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Ie=si==="webkitTransition"||si==="OTransition"?si+"End":"transitionend";function vt(l){return typeof l=="string"?document.getElementById(l):l}function xn(l,d){var m=l.style[d]||l.currentStyle&&l.currentStyle[d];if((!m||m==="auto")&&document.defaultView){var b=document.defaultView.getComputedStyle(l,null);m=b?b[d]:null}return m==="auto"?null:m}function Fe(l,d,m){var b=document.createElement(l);return b.className=d||"",m&&m.appendChild(b),b}function ut(l){var d=l.parentNode;d&&d.removeChild(l)}function Mr(l){for(;l.firstChild;)l.removeChild(l.firstChild)}function Po(l){var d=l.parentNode;d&&d.lastChild!==l&&d.appendChild(l)}function Nr(l){var d=l.parentNode;d&&d.firstChild!==l&&d.insertBefore(l,d.firstChild)}function C1(l,d){if(l.classList!==void 0)return l.classList.contains(d);var m=np(l);return m.length>0&&new RegExp("(^|\\s)"+d+"(\\s|$)").test(m)}function We(l,d){if(l.classList!==void 0)for(var m=y(d),b=0,C=m.length;b0?2*window.devicePixelRatio:1;function tC(l){return Oe.edge?l.wheelDeltaY/2:l.deltaY&&l.deltaMode===0?-l.deltaY/FV: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 VV={__proto__:null,on:Ae,off:St,stopPropagation:Ua,disableScrollPropagation:R1,disableClickPropagation:zu,preventDefault:In,stop:Za,getPropagationPath:QO,getMousePosition:eC,getWheelDelta:tC,isExternalTarget:z1,addListener:Ae,removeListener:St},nC=Y.extend({run:function(l,d,m,b){this.stop(),this._el=l,this._inProgress=!0,this._duration=m||.25,this._easeOutPower=1/Math.max(b||.5,.2),this._startPos=Wa(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=G(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(),b=this._limitCenter(m,this._zoom,ie(l));return m.equals(b)||this.panTo(b,d),this._enforcingBounds=!1,this},panInside:function(l,d){d=d||{};var m=F(d.paddingTopLeft||d.padding||[0,0]),b=F(d.paddingBottomRight||d.padding||[0,0]),C=this.project(this.getCenter()),T=this.project(l),A=this.getPixelBounds(),q=ee([A.min.add(m),A.max.subtract(b)]),te=q.getSize();if(!q.contains(T)){this._enforcingBounds=!0;var oe=T.subtract(q.getCenter()),ve=q.extend(T).getSize().subtract(te);C.x+=oe.x<0?-ve.x:ve.x,C.y+=oe.y<0?-ve.y:ve.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(),b=d.divideBy(2).round(),C=m.divideBy(2).round(),T=b.subtract(C);return!T.x&&!T.y?this:(l.animate&&l.pan?this.panBy(T):(l.pan&&this._rawPanBy(T),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,b=new J(d,m),C=b.toBounds(l.coords.accuracy*2),T=this._locateOptions;if(T.setView){var A=this.getBoundsZoom(C);this.setView(b,T.maxZoom?Math.min(A,T.maxZoom):A)}var q={latlng:b,bounds:C,timestamp:l.timestamp};for(var te in l.coords)typeof l.coords[te]=="number"&&(q[te]=l.coords[te]);this.fire("locationfound",q)}},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(),ut(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(X(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)ut(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":""),b=Fe("div",m,d||this._mapPane);return l&&(this._panes[l]=b),b},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 fe(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=ie(l),m=F(m||[0,0]);var b=this.getZoom()||0,C=this.getMinZoom(),T=this.getMaxZoom(),A=l.getNorthWest(),q=l.getSouthEast(),te=this.getSize().subtract(m),oe=ee(this.project(q,b),this.project(A,b)).getSize(),ve=Oe.any3d?this.options.zoomSnap:1,Re=te.x/oe.x,Ke=te.y/oe.y,dr=d?Math.max(Re,Ke):Math.min(Re,Ke);return b=this.getScaleZoom(dr,b),ve&&(b=Math.round(b/(ve/100))*(ve/100),b=d?Math.ceil(b/ve)*ve:Math.floor(b/ve)*ve),Math.max(C,Math.min(T,b))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new j(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 K(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 b=m.zoom(l*m.scale(d));return isNaN(b)?1/0:b},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(F(l),d)},layerPointToLatLng:function(l){var d=F(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(ie(l))},distance:function(l,d){return this.options.crs.distance(ne(l),ne(d))},containerPointToLayerPoint:function(l){return F(l).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(l){return F(l).add(this._getMapPanePos())},containerPointToLatLng:function(l){var d=this.containerPointToLayerPoint(F(l));return this.layerPointToLatLng(d)},latLngToContainerPoint:function(l){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ne(l)))},mouseEventToContainerPoint:function(l){return eC(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=vt(l);if(d){if(d._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Ae(d,"scroll",this._onScroll,this),this._containerId=c(d)},_initLayout:function(){var l=this._container;this._fadeAnimated=this.options.fadeAnimation&&Oe.any3d,We(l,"leaflet-container"+(Oe.touch?" leaflet-touch":"")+(Oe.retina?" leaflet-retina":"")+(Oe.ielt9?" leaflet-oldie":"")+(Oe.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var d=xn(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),sn(this._mapPane,new j(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(We(l.markerPane,"leaflet-zoom-hide"),We(l.shadowPane,"leaflet-zoom-hide"))},_resetView:function(l,d,m){sn(this._mapPane,new j(0,0));var b=!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"),b&&this.fire("load")},_moveStart:function(l,d){return l&&this.fire("zoomstart"),d||this.fire("movestart"),this},_move:function(l,d,m,b){d===void 0&&(d=this._zoom);var C=this._zoom!==d;return this._zoom=d,this._lastCenter=l,this._pixelOrigin=this._getNewPixelOrigin(l),b?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 X(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(l){sn(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?St:Ae;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),Oe.any3d&&this.options.transform3DLimit&&(l?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){X(this._resizeRequest),this._resizeRequest=G(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=[],b,C=d==="mouseout"||d==="mouseover",T=l.target||l.srcElement,A=!1;T;){if(b=this._targets[c(T)],b&&(d==="click"||d==="preclick")&&this._draggableMoved(b)){A=!0;break}if(b&&b.listens(d,!0)&&(C&&!z1(T,l)||(m.push(b),C))||T===this._container)break;T=T.parentNode}return!m.length&&!A&&!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"&&T1(d),this._fireDOMEvent(l,m)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(l,d,m){if(l.type==="click"){var b=o({},l);b.type="preclick",this._fireDOMEvent(b,b.type,m)}var C=this._findEventTargets(l,d);if(m){for(var T=[],A=0;A0?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(),b=Oe.any3d?this.options.zoomSnap:1;return b&&(l=Math.round(l/b)*b),Math.max(d,Math.min(m,l))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Xt(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=Fe("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(l),this.on("zoomanim",function(d){var m=ju,b=this._proxy.style[m];Ha(this._proxy,this.project(d.center,d.zoom),this.getZoomScale(d.zoom,1)),b===this._proxy.style[m]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ut(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var l=this.getCenter(),d=this.getZoom();Ha(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 b=this.getZoomScale(d),C=this._getCenterOffset(l)._divideBy(1-1/b);return m.animate!==!0&&!this.getSize().contains(C)?!1:(G(function(){this._moveStart(!0,m.noMoveStart||!1)._animateZoom(l,d,!0)},this),!0)},_animateZoom:function(l,d,m,b){this._mapPane&&(m&&(this._animatingZoom=!0,this._animateToCenter=l,this._animateToZoom=d,We(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:l,zoom:d,noUpdate:b}),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&&Xt(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 HV(l,d){return new rt(l,d)}var Vo=V.extend({options:{position:"topright"},initialize:function(l){w(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(),b=l._controlCorners[m];return We(d,"leaflet-control"),m.indexOf("bottom")!==-1?b.insertBefore(d,b.firstChild):b.appendChild(d),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ut(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()}}),Au=function(l){return new Vo(l)};rt.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=Fe("div",d+"control-container",this._container);function b(C,T){var A=d+C+" "+d+T;l[C+T]=Fe("div",A,m)}b("top","left"),b("top","right"),b("bottom","left"),b("bottom","right")},_clearControlPos:function(){for(var l in this._controlCorners)ut(this._controlCorners[l]);ut(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var rC=Vo.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(l,d,m,b){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='",b=document.createElement("div");return b.innerHTML=m,b.firstChild},_addItem:function(l){var d=document.createElement("label"),m=this._map.hasLayer(l.layer),b;l.overlay?(b=document.createElement("input"),b.type="checkbox",b.className="leaflet-control-layers-selector",b.defaultChecked=m):b=this._createRadioElement("leaflet-base-layers_"+c(this),m),this._layerControlInputs.push(b),b.layerId=c(l.layer),Ae(b,"click",this._onInputClick,this);var C=document.createElement("span");C.innerHTML=" "+l.name;var T=document.createElement("span");d.appendChild(T),T.appendChild(b),T.appendChild(C);var A=l.overlay?this._overlaysList:this._baseLayersList;return A.appendChild(d),this._checkDisabledLayers(),d},_onInputClick:function(){if(!this._preventClick){var l=this._layerControlInputs,d,m,b=[],C=[];this._handlingClick=!0;for(var T=l.length-1;T>=0;T--)d=l[T],m=this._getLayer(d.layerId).layer,d.checked?b.push(m):d.checked||C.push(m);for(T=0;T=0;C--)d=l[C],m=this._getLayer(d.layerId).layer,d.disabled=m.options.minZoom!==void 0&&bm.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var l=this._section;this._preventClick=!0,Ae(l,"click",In),this.expand();var d=this;setTimeout(function(){St(l,"click",In),d._preventClick=!1})}}),WV=function(l,d,m){return new rC(l,d,m)},A1=Vo.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(l){var d="leaflet-control-zoom",m=Fe("div",d+" leaflet-bar"),b=this.options;return this._zoomInButton=this._createButton(b.zoomInText,b.zoomInTitle,d+"-in",m,this._zoomIn),this._zoomOutButton=this._createButton(b.zoomOutText,b.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,b,C){var T=Fe("a",m,b);return T.innerHTML=l,T.href="#",T.title=d,T.setAttribute("role","button"),T.setAttribute("aria-label",d),zu(T),Ae(T,"click",Za),Ae(T,"click",C,this),Ae(T,"click",this._refocusOnMap,this),T},_updateDisabled:function(){var l=this._map,d="leaflet-disabled";Xt(this._zoomInButton,d),Xt(this._zoomOutButton,d),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||l._zoom===l.getMinZoom())&&(We(this._zoomOutButton,d),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||l._zoom===l.getMaxZoom())&&(We(this._zoomInButton,d),this._zoomInButton.setAttribute("aria-disabled","true"))}});rt.mergeOptions({zoomControl:!0}),rt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new A1,this.addControl(this.zoomControl))});var UV=function(l){return new A1(l)},oC=Vo.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(l){var d="leaflet-control-scale",m=Fe("div",d),b=this.options;return this._addScales(b,d+"-line",m),l.on(b.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=Fe("div",d,m)),l.imperial&&(this._iScale=Fe("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,b,C;d>5280?(m=d/5280,b=this._getRoundNum(m),this._updateScale(this._iScale,b+" mi",b/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}}),ZV=function(l){return new oC(l)},GV='',B1=Vo.extend({options:{position:"bottomright",prefix:''+(Oe.inlineSvg?GV+" ":"")+"Leaflet"},initialize:function(l){w(this,l),this._attributions={}},onAdd:function(l){l.attributionControl=this,this._container=Fe("div","leaflet-control-attribution"),zu(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(' ')}}});rt.mergeOptions({attributionControl:!0}),rt.addInitHook(function(){this.options.attributionControl&&new B1().addTo(this)});var YV=function(l){return new B1(l)};Vo.Layers=rC,Vo.Zoom=A1,Vo.Scale=oC,Vo.Attribution=B1,Au.layers=WV,Au.zoom=UV,Au.scale=ZV,Au.attribution=YV;var li=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}});li.addTo=function(l,d){return l.addHandler(d,this),this};var KV={Events:Z},iC=Oe.touch?"touchstart mousedown":"mousedown",$s=Y.extend({options:{clickTolerance:3},initialize:function(l,d,m,b){w(this,b),this._element=l,this._dragStartTarget=d||l,this._preventOutline=m},enable:function(){this._enabled||(Ae(this._dragStartTarget,iC,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&($s._dragging===this&&this.finishDrag(!0),St(this._dragStartTarget,iC,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(l){if(this._enabled&&(this._moved=!1,!C1(this._element,"leaflet-zoom-anim"))){if(l.touches&&l.touches.length!==1){$s._dragging===this&&this.finishDrag();return}if(!($s._dragging||l.shiftKey||l.which!==1&&l.button!==1&&!l.touches)&&($s._dragging=this,this._preventOutline&&T1(this._element),$1(),Lu(),!this._moving)){this.fire("down");var d=l.touches?l.touches[0]:l,m=JO(this._element);this._startPoint=new j(d.clientX,d.clientY),this._startPos=Wa(this._element),this._parentScale=I1(m);var b=l.type==="mousedown";Ae(document,b?"mousemove":"touchmove",this._onMove,this),Ae(document,b?"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 j(d.clientX,d.clientY)._subtract(this._startPoint);!m.x&&!m.y||Math.abs(m.x)+Math.abs(m.y)T&&(A=q,T=te);T>m&&(d[A]=1,V1(l,d,m,b,A),V1(l,d,m,A,C))}function QV(l,d){for(var m=[l[0]],b=1,C=0,T=l.length;bd&&(m.push(l[b]),C=b);return Cd.max.x&&(m|=2),l.yd.max.y&&(m|=8),m}function eH(l,d){var m=d.x-l.x,b=d.y-l.y;return m*m+b*b}function Bu(l,d,m,b){var C=d.x,T=d.y,A=m.x-C,q=m.y-T,te=A*A+q*q,oe;return te>0&&(oe=((l.x-C)*A+(l.y-T)*q)/te,oe>1?(C=m.x,T=m.y):oe>0&&(C+=A*oe,T+=q*oe)),A=l.x-C,q=l.y-T,b?A*A+q*q:new j(C,T)}function Co(l){return!O(l[0])||typeof l[0][0]!="object"&&typeof l[0][0]<"u"}function fC(l){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Co(l)}function pC(l,d){var m,b,C,T,A,q,te,oe;if(!l||l.length===0)throw new Error("latlngs not passed");Co(l)||(console.warn("latlngs are not flat! Only the first ring will be used"),l=l[0]);var ve=ne([0,0]),Re=ie(l),Ke=Re.getNorthWest().distanceTo(Re.getSouthWest())*Re.getNorthEast().distanceTo(Re.getNorthWest());Ke<1700&&(ve=F1(l));var dr=l.length,Sn=[];for(m=0;mb){te=(T-b)/C,oe=[q.x-te*(q.x-A.x),q.y-te*(q.y-A.y)];break}var Tr=d.unproject(F(oe));return ne([Tr.lat+ve.lat,Tr.lng+ve.lng])}var tH={__proto__:null,simplify:lC,pointToSegmentDistance:cC,closestPointOnSegment:JV,clipSegment:dC,_getEdgeIntersection:sp,_getBitCode:Ga,_sqClosestPointOnSegment:Bu,isFlat:Co,_flat:fC,polylineCenter:pC},H1={project:function(l){return new j(l.lng,l.lat)},unproject:function(l){return new J(l.y,l.x)},bounds:new K([-180,-90],[180,90])},W1={R:6378137,R_MINOR:6356752314245179e-9,bounds:new K([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(l){var d=Math.PI/180,m=this.R,b=l.lat*d,C=this.R_MINOR/m,T=Math.sqrt(1-C*C),A=T*Math.sin(b),q=Math.tan(Math.PI/4-b/2)/Math.pow((1-A)/(1+A),T/2);return b=-m*Math.log(Math.max(q,1e-10)),new j(l.lng*d*m,b)},unproject:function(l){for(var d=180/Math.PI,m=this.R,b=this.R_MINOR/m,C=Math.sqrt(1-b*b),T=Math.exp(-l.y/m),A=Math.PI/2-2*Math.atan(T),q=0,te=.1,oe;q<15&&Math.abs(te)>1e-7;q++)oe=C*Math.sin(A),oe=Math.pow((1-oe)/(1+oe),C/2),te=Math.PI/2-2*Math.atan(T*oe)-A,A+=te;return new J(A*d,l.x*d/m)}},nH={__proto__:null,LonLat:H1,Mercator:W1,SphericalMercator:we},rH=o({},_e,{code:"EPSG:3395",projection:W1,transformation:function(){var l=.5/(Math.PI*W1.R);return Te(l,.5,-l,.5)}()}),hC=o({},_e,{code:"EPSG:4326",projection:H1,transformation:Te(1/180,1,-1/180,.5)}),oH=o({},le,{projection:H1,transformation:Te(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,b=d.lat-l.lat;return Math.sqrt(m*m+b*b)},infinite:!0});le.Earth=_e,le.EPSG3395=rH,le.EPSG3857=je,le.EPSG900913=it,le.EPSG4326=hC,le.Simple=oH;var Ho=Y.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})}}});rt.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?O(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 J&&d[0].equals(d[m-1])&&d.pop(),d},_setLatLngs:function(l){Zi.prototype._setLatLngs.call(this,l),Co(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Co(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var l=this._renderer._bounds,d=this.options.weight,m=new j(d,d);if(l=new K(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 b=0,C=this._rings.length,T;bl.y!=C.y>l.y&&l.x<(C.x-b.x)*(l.y-b.y)/(C.y-b.y)+b.x&&(d=!d);return d||Zi.prototype._containsPoint.call(this,l,!0)}});function fH(l,d){return new Xl(l,d)}var Gi=Ui.extend({initialize:function(l,d){w(this,d),this._layers={},l&&this.addData(l)},addData:function(l){var d=O(l)?l:l.features,m,b,C;if(d){for(m=0,b=d.length;m0&&C.push(C[0].slice()),C}function Ql(l,d){return l.feature?o({},l.feature,{geometry:d}):fp(d)}function fp(l){return l.type==="Feature"||l.type==="FeatureCollection"?l:{type:"Feature",properties:{},geometry:l}}var Y1={toGeoJSON:function(l){return Ql(this,{type:"Point",coordinates:G1(this.getLatLng(),l)})}};ap.include(Y1),U1.include(Y1),lp.include(Y1),Zi.include({toGeoJSON:function(l){var d=!Co(this._latlngs),m=dp(this._latlngs,d?1:0,!1,l);return Ql(this,{type:(d?"Multi":"")+"LineString",coordinates:m})}}),Xl.include({toGeoJSON:function(l){var d=!Co(this._latlngs),m=d&&!Co(this._latlngs[0]),b=dp(this._latlngs,m?2:d?1:0,!0,l);return d||(b=[b]),Ql(this,{type:(m?"Multi":"")+"Polygon",coordinates:b})}}),ql.include({toMultiPoint:function(l){var d=[];return this.eachLayer(function(m){d.push(m.toGeoJSON(l).geometry.coordinates)}),Ql(this,{type:"MultiPoint",coordinates:d})},toGeoJSON:function(l){var d=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(d==="MultiPoint")return this.toMultiPoint(l);var m=d==="GeometryCollection",b=[];return this.eachLayer(function(C){if(C.toGeoJSON){var T=C.toGeoJSON(l);if(m)b.push(T.geometry);else{var A=fp(T);A.type==="FeatureCollection"?b.push.apply(b,A.features):b.push(A)}}}),m?Ql(this,{geometries:b,type:"GeometryCollection"}):{type:"FeatureCollection",features:b}}});function vC(l,d){return new Gi(l,d)}var pH=vC,pp=Ho.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(l,d,m){this._url=l,this._bounds=ie(d),w(this,m)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(We(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ut(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(l){return this.options.opacity=l,this._image&&this._updateOpacity(),this},setStyle:function(l){return l.opacity&&this.setOpacity(l.opacity),this},bringToFront:function(){return this._map&&Po(this._image),this},bringToBack:function(){return this._map&&Nr(this._image),this},setUrl:function(l){return this._url=l,this._image&&(this._image.src=l),this},setBounds:function(l){return this._bounds=ie(l),this._map&&this._reset(),this},getEvents:function(){var l={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(l.zoomanim=this._animateZoom),l},setZIndex:function(l){return this.options.zIndex=l,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var l=this._url.tagName==="IMG",d=this._image=l?this._url:Fe("img");if(We(d,"leaflet-image-layer"),this._zoomAnimated&&We(d,"leaflet-zoom-animated"),this.options.className&&We(d,this.options.className),d.onselectstart=p,d.onmousemove=p,d.onload=s(this.fire,this,"load"),d.onerror=s(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(d.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),l){this._url=d.src;return}d.src=this._url,d.alt=this.options.alt},_animateZoom:function(l){var d=this._map.getZoomScale(l.zoom),m=this._map._latLngBoundsToNewLayerBounds(this._bounds,l.zoom,l.center).min;Ha(this._image,m,d)},_reset:function(){var l=this._image,d=new K(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),m=d.getSize();sn(l,d.min),l.style.width=m.x+"px",l.style.height=m.y+"px"},_updateOpacity:function(){Oo(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var l=this.options.errorOverlayUrl;l&&this._url!==l&&(this._url=l,this._image.src=l)},getCenter:function(){return this._bounds.getCenter()}}),hH=function(l,d,m){return new pp(l,d,m)},yC=pp.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var l=this._url.tagName==="VIDEO",d=this._image=l?this._url:Fe("video");if(We(d,"leaflet-image-layer"),this._zoomAnimated&&We(d,"leaflet-zoom-animated"),this.options.className&&We(d,this.options.className),d.onselectstart=p,d.onmousemove=p,d.onloadeddata=s(this.fire,this,"load"),l){for(var m=d.getElementsByTagName("source"),b=[],C=0;C0?b:[d.src];return}O(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 T=0;TC?(d.height=C+"px",We(l,T)):Xt(l,T),this._containerWidth=this._container.offsetWidth},_animateZoom:function(l){var d=this._map._latLngToNewLayerPoint(this._latlng,l.zoom,l.center),m=this._getAnchor();sn(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(xn(this._container,"marginBottom"),10)||0,m=this._container.offsetHeight+d,b=this._containerWidth,C=new j(this._containerLeft,-m-this._containerBottom);C._add(Wa(this._container));var T=l.layerPointToContainerPoint(C),A=F(this.options.autoPanPadding),q=F(this.options.autoPanPaddingTopLeft||A),te=F(this.options.autoPanPaddingBottomRight||A),oe=l.getSize(),ve=0,Re=0;T.x+b+te.x>oe.x&&(ve=T.x+b-oe.x+te.x),T.x-ve-q.x<0&&(ve=T.x-q.x),T.y+m+te.y>oe.y&&(Re=T.y+m-oe.y+te.y),T.y-Re-q.y<0&&(Re=T.y-q.y),(ve||Re)&&(this.options.keepInView&&(this._autopanning=!0),l.fire("autopanstart").panBy([ve,Re]))}},_getAnchor:function(){return F(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),vH=function(l,d){return new hp(l,d)};rt.mergeOptions({closePopupOnClick:!0}),rt.include({openPopup:function(l,d,m){return this._initOverlay(hp,l,d,m).openOn(this),this},closePopup:function(l){return l=arguments.length?l:this._popup,l&&l.close(),this}}),Ho.include({bindPopup:function(l,d){return this._popup=this._initOverlay(hp,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 Ui||(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)){Za(l);var d=l.layer||l.target;if(this._popup._source===d&&!(d instanceof Ms)){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 mp=ci.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(l){ci.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){ci.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=ci.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=Fe("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,b=this._map,C=this._container,T=b.latLngToContainerPoint(b.getCenter()),A=b.layerPointToContainerPoint(l),q=this.options.direction,te=C.offsetWidth,oe=C.offsetHeight,ve=F(this.options.offset),Re=this._getAnchor();q==="top"?(d=te/2,m=oe):q==="bottom"?(d=te/2,m=0):q==="center"?(d=te/2,m=oe/2):q==="right"?(d=0,m=oe/2):q==="left"?(d=te,m=oe/2):A.xthis.options.maxZoom||mb?this._retainParent(C,T,A,b):!1)},_retainChildren:function(l,d,m,b){for(var C=2*l;C<2*l+2;C++)for(var T=2*d;T<2*d+2;T++){var A=new j(C,T);A.z=m+1;var q=this._tileCoordsToKey(A),te=this._tiles[q];if(te&&te.active){te.retain=!0;continue}else te&&te.loaded&&(te.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 Ke=C.min.x;Ke<=C.max.x;Ke++){var dr=new j(Ke,Re);if(dr.z=this._tileZoom,!!this._isValidTile(dr)){var Sn=this._tiles[this._tileCoordsToKey(dr)];Sn?Sn.current=!0:A.push(dr)}}if(A.sort(function(Tr,tc){return Tr.distanceTo(T)-tc.distanceTo(T)}),A.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var ko=document.createDocumentFragment();for(Ke=0;Kem.max.x)||!d.wrapLat&&(l.ym.max.y))return!1}if(!this.options.bounds)return!0;var b=this._tileCoordsToBounds(l);return ie(this.options.bounds).overlaps(b)},_keyToBounds:function(l){return this._tileCoordsToBounds(this._keyToTileCoords(l))},_tileCoordsToNwSe:function(l){var d=this._map,m=this.getTileSize(),b=l.scaleBy(m),C=b.add(m),T=d.unproject(b,l.z),A=d.unproject(C,l.z);return[T,A]},_tileCoordsToBounds:function(l){var d=this._tileCoordsToNwSe(l),m=new fe(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 j(+d[0],+d[1]);return m.z=+d[2],m},_removeTile:function(l){var d=this._tiles[l];d&&(ut(d.el),delete this._tiles[l],this.fire("tileunload",{tile:d.el,coords:this._keyToTileCoords(l)}))},_initTile:function(l){We(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,Oe.ielt9&&this.options.opacity<1&&Oo(l,this.options.opacity)},_addTile:function(l,d){var m=this._getTilePos(l),b=this._tileCoordsToKey(l),C=this.createTile(this._wrapCoords(l),s(this._tileReady,this,l));this._initTile(C),this.createTile.length<2&&G(s(this._tileReady,this,l,null,C)),sn(C,m),this._tiles[b]={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 b=this._tileCoordsToKey(l);m=this._tiles[b],m&&(m.loaded=+new Date,this._map._fadeAnimated?(Oo(m.el,0),X(this._fadeFrame),this._fadeFrame=G(this._updateOpacity,this)):(m.active=!0,this._pruneTiles()),d||(We(m.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:m.el,coords:l})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Oe.ielt9||!this._map._fadeAnimated?G(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 j(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 K(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 wH(l){return new Vu(l)}var ec=Vu.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=w(this,d),d.detectRetina&&Oe.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 Ae(m,"load",s(this._tileOnLoad,this,d,m)),Ae(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:Oe.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){Oe.ielt9?setTimeout(s(l,this,null,d),0):l(null,d)},_tileOnError:function(l,d,m){var b=this.options.errorTileUrl;b&&d.getAttribute("src")!==b&&(d.src=b),l(m,d)},_onTileRemove:function(l){l.tile.onload=null},_getZoomForUrl:function(){var l=this._tileZoom,d=this.options.maxZoom,m=this.options.zoomReverse,b=this.options.zoomOffset;return m&&(l=d-l),l+b},_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;ut(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",$),Vu.prototype._removeTile.call(this,l)},_tileReady:function(l,d,m){if(!(!this._map||m&&m.getAttribute("src")===$))return Vu.prototype._tileReady.call(this,l,d,m)}});function bC(l,d){return new ec(l,d)}var xC=ec.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 b in d)b in this.options||(m[b]=d[b]);d=w(this,d);var C=d.detectRetina&&Oe.retina?2:1,T=this.getTileSize();m.width=T.x*C,m.height=T.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,ec.prototype.onAdd.call(this,l)},getTileUrl:function(l){var d=this._tileCoordsToNwSe(l),m=this._crs,b=ee(m.project(d[0]),m.project(d[1])),C=b.min,T=b.max,A=(this._wmsVersion>=1.3&&this._crs===hC?[C.y,C.x,T.y,T.x]:[C.x,C.y,T.x,T.y]).join(","),q=ec.prototype.getTileUrl.call(this,l);return q+P(this.wmsParams,q,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+A},setParams:function(l,d){return o(this.wmsParams,l),d||this.redraw(),this}});function bH(l,d){return new xC(l,d)}ec.WMS=xC,bC.wms=bH;var Yi=Ho.extend({options:{padding:.1},initialize:function(l){w(this,l),c(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),We(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),b=this._map.getSize().multiplyBy(.5+this.options.padding),C=this._map.project(this._center,d),T=b.multiplyBy(-m).add(C).subtract(this._map._getNewPixelOrigin(l,d));Oe.any3d?Ha(this._container,T,m):sn(this._container,T)},_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 K(m,m.add(d.multiplyBy(1+l*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),SC=Yi.extend({options:{tolerance:0},getEvents:function(){var l=Yi.prototype.getEvents.call(this);return l.viewprereset=this._onViewPreReset,l},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Yi.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var l=this._container=document.createElement("canvas");Ae(l,"mousemove",this._onMouseMove,this),Ae(l,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ae(l,"mouseout",this._handleMouseOut,this),l._leaflet_disable_events=!0,this._ctx=l.getContext("2d")},_destroyContainer:function(){X(this._redrawRequest),delete this._ctx,ut(this._container),St(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)){Yi.prototype._update.call(this);var l=this._bounds,d=this._container,m=l.getSize(),b=Oe.retina?2:1;sn(d,l.min),d.width=b*m.x,d.height=b*m.y,d.style.width=m.x+"px",d.style.height=m.y+"px",Oe.retina&&this._ctx.scale(2,2),this._ctx.translate(-l.min.x,-l.min.y),this.fire("update")}},_reset:function(){Yi.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,b=d.prev;m?m.prev=b:this._drawLast=b,b?b.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=[],b,C;for(C=0;C')}}catch{}return function(l){return document.createElement("<"+l+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),xH={_initContainer:function(){this._container=Fe("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Yi.prototype._update.call(this),this.fire("update"))},_initPath:function(l){var d=l._container=Hu("shape");We(d,"leaflet-vml-shape "+(this.options.className||"")),d.coordsize="1 1",l._path=Hu("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;ut(d),l.removeInteractiveTarget(d),delete this._layers[c(l)]},_updateStyle:function(l){var d=l._stroke,m=l._fill,b=l.options,C=l._container;C.stroked=!!b.stroke,C.filled=!!b.fill,b.stroke?(d||(d=l._stroke=Hu("stroke")),C.appendChild(d),d.weight=b.weight+"px",d.color=b.color,d.opacity=b.opacity,b.dashArray?d.dashStyle=O(b.dashArray)?b.dashArray.join(" "):b.dashArray.replace(/( *, *)/g," "):d.dashStyle="",d.endcap=b.lineCap.replace("butt","flat"),d.joinstyle=b.lineJoin):d&&(C.removeChild(d),l._stroke=null),b.fill?(m||(m=l._fill=Hu("fill")),C.appendChild(m),m.color=b.fillColor||b.color,m.opacity=b.fillOpacity):m&&(C.removeChild(m),l._fill=null)},_updateCircle:function(l){var d=l._point.round(),m=Math.round(l._radius),b=Math.round(l._radiusY||m);this._setPath(l,l._empty()?"M0 0":"AL "+d.x+","+d.y+" "+m+","+b+" 0,"+65535*360)},_setPath:function(l,d){l._path.v=d},_bringToFront:function(l){Po(l._container)},_bringToBack:function(l){Nr(l._container)}},gp=Oe.vml?Hu:bt,Wu=Yi.extend({_initContainer:function(){this._container=gp("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=gp("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ut(this._container),St(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Yi.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)),sn(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=gp("path");l.options.className&&We(d,l.options.className),l.options.interactive&&We(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){ut(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,_n(l._parts,d))},_updateCircle:function(l){var d=l._point,m=Math.max(Math.round(l._radius),1),b=Math.max(Math.round(l._radiusY),1)||m,C="a"+m+","+b+" 0 1,0 ",T=l._empty()?"M0 0":"M"+(d.x-m)+","+d.y+C+m*2+",0 "+C+-m*2+",0 ";this._setPath(l,T)},_setPath:function(l,d){l._path.setAttribute("d",d)},_bringToFront:function(l){Po(l._path)},_bringToBack:function(l){Nr(l._path)}});Oe.vml&&Wu.include(xH);function OC(l){return Oe.svg||Oe.vml?new Wu(l):null}rt.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&&PC(l)||OC(l)}});var CC=Xl.extend({initialize:function(l,d){Xl.prototype.initialize.call(this,this._boundsToLatLngs(l),d)},setBounds:function(l){return this.setLatLngs(this._boundsToLatLngs(l))},_boundsToLatLngs:function(l){return l=ie(l),[l.getSouthWest(),l.getNorthWest(),l.getNorthEast(),l.getSouthEast()]}});function SH(l,d){return new CC(l,d)}Wu.create=gp,Wu.pointsToPath=_n,Gi.geometryToLayer=cp,Gi.coordsToLatLng=Z1,Gi.coordsToLatLngs=up,Gi.latLngToCoords=G1,Gi.latLngsToCoords=dp,Gi.getFeature=Ql,Gi.asFeature=fp,rt.mergeOptions({boxZoom:!0});var kC=li.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(){Ae(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){St(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ut(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(),Lu(),$1(),this._startPoint=this._map.mouseEventToContainerPoint(l),Ae(document,{contextmenu:Za,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(l){this._moved||(this._moved=!0,this._box=Fe("div","leaflet-zoom-box",this._container),We(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(l);var d=new K(this._point,this._startPoint),m=d.getSize();sn(this._box,d.min),this._box.style.width=m.x+"px",this._box.style.height=m.y+"px"},_finish:function(){this._moved&&(ut(this._box),Xt(this._container,"leaflet-crosshair")),Du(),M1(),St(document,{contextmenu:Za,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 fe(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())}});rt.addInitHook("addHandler","boxZoom",kC),rt.mergeOptions({doubleClickZoom:!0});var EC=li.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(),b=d.options.zoomDelta,C=l.originalEvent.shiftKey?m-b:m+b;d.options.doubleClickZoom==="center"?d.setZoom(C):d.setZoomAround(l.containerPoint,C)}});rt.addInitHook("addHandler","doubleClickZoom",EC),rt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var $C=li.extend({addHooks:function(){if(!this._draggable){var l=this._map;this._draggable=new $s(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))}We(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Xt(this._map._container,"leaflet-grab"),Xt(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=ie(this._map.options.maxBounds);this._offsetLimit=ee(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,b=this._draggable._newPos.x,C=(b-d+m)%l+d-m,T=(b+d+m)%l-d-m,A=Math.abs(C+m)0?T:-T))-d;this._delta=0,this._startTime=null,A&&(l.options.scrollWheelZoom==="center"?l.setZoom(d+A):l.setZoomAround(this._lastMousePos,d+A))}});rt.addInitHook("addHandler","scrollWheelZoom",NC);var PH=600;rt.mergeOptions({tapHold:Oe.touchNative&&Oe.safari&&Oe.mobile,tapTolerance:15});var TC=li.extend({addHooks:function(){Ae(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){St(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 j(d.clientX,d.clientY),this._holdTimeout=setTimeout(s(function(){this._cancel(),this._isTapValid()&&(Ae(document,"touchend",In),Ae(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",d))},this),PH),Ae(document,"touchend touchcancel contextmenu",this._cancel,this),Ae(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function l(){St(document,"touchend",In),St(document,"touchend touchcancel",l)},_cancel:function(){clearTimeout(this._holdTimeout),St(document,"touchend touchcancel contextmenu",this._cancel,this),St(document,"touchmove",this._onMove,this)},_onMove:function(l){var d=l.touches[0];this._newPos=new j(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)}});rt.addInitHook("addHandler","tapHold",TC),rt.mergeOptions({touchZoom:Oe.touch,bounceAtZoomLimits:!0});var IC=li.extend({addHooks:function(){We(this._map._container,"leaflet-touch-zoom"),Ae(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Xt(this._map._container,"leaflet-touch-zoom"),St(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]),b=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(b)._divideBy(2))),this._startDist=m.distanceTo(b),this._startZoom=d.getZoom(),this._moved=!1,this._zooming=!0,d._stop(),Ae(document,"touchmove",this._onTouchMove,this),Ae(document,"touchend touchcancel",this._onTouchEnd,this),In(l)}},_onTouchMove:function(l){if(!(!l.touches||l.touches.length!==2||!this._zooming)){var d=this._map,m=d.mouseEventToContainerPoint(l.touches[0]),b=d.mouseEventToContainerPoint(l.touches[1]),C=m.distanceTo(b)/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 T=m._add(b)._divideBy(2)._subtract(this._centerPoint);if(C===1&&T.x===0&&T.y===0)return;this._center=d.unproject(d.project(this._pinchStartLatLng,this._zoom).subtract(T),this._zoom)}this._moved||(d._moveStart(!0,!1),this._moved=!0),X(this._animRequest);var A=s(d._move,d,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=G(A,this,!0),In(l)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,X(this._animRequest),St(document,"touchmove",this._onTouchMove,this),St(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))}});rt.addInitHook("addHandler","touchZoom",IC),rt.BoxZoom=kC,rt.DoubleClickZoom=EC,rt.Drag=$C,rt.Keyboard=MC,rt.ScrollWheelZoom=NC,rt.TapHold=TC,rt.TouchZoom=IC,n.Bounds=K,n.Browser=Oe,n.CRS=le,n.Canvas=SC,n.Circle=U1,n.CircleMarker=lp,n.Class=V,n.Control=Vo,n.DivIcon=wC,n.DivOverlay=ci,n.DomEvent=VV,n.DomUtil=BV,n.Draggable=$s,n.Evented=Y,n.FeatureGroup=Ui,n.GeoJSON=Gi,n.GridLayer=Vu,n.Handler=li,n.Icon=Jl,n.ImageOverlay=pp,n.LatLng=J,n.LatLngBounds=fe,n.Layer=Ho,n.LayerGroup=ql,n.LineUtil=tH,n.Map=rt,n.Marker=ap,n.Mixin=KV,n.Path=Ms,n.Point=j,n.PolyUtil=qV,n.Polygon=Xl,n.Polyline=Zi,n.Popup=hp,n.PosAnimation=nC,n.Projection=nH,n.Rectangle=CC,n.Renderer=Yi,n.SVG=Wu,n.SVGOverlay=_C,n.TileLayer=ec,n.Tooltip=mp,n.Transformation=He,n.Util=Q,n.VideoOverlay=yC,n.bind=s,n.bounds=ee,n.canvas=PC,n.circle=uH,n.circleMarker=cH,n.control=Au,n.divIcon=_H,n.extend=o,n.featureGroup=sH,n.geoJSON=vC,n.geoJson=pH,n.gridLayer=wH,n.icon=aH,n.imageOverlay=hH,n.latLng=ne,n.latLngBounds=ie,n.layerGroup=iH,n.map=HV,n.marker=lH,n.point=F,n.polygon=fH,n.polyline=dH,n.popup=vH,n.rectangle=SH,n.setOptions=w,n.stamp=c,n.svg=OC,n.svgOverlay=gH,n.tileLayer=bC,n.tooltip=yH,n.transformation=Te,n.version=r,n.videoOverlay=mH;var OH=window.L;n.noConflict=function(){return window.L=OH,this},window.L=n})})(Rx,Rx.exports);var l1=Rx.exports;const wi=Ea(l1);function vF(e,t){const n=_.useRef(t);_.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 l$e=1;function c$e(e){return Object.freeze({__version:l$e,map:e})}function u$e(e,t){return Object.freeze({...e,...t})}const yF=_.createContext(null),_F=yF.Provider;function $O(){const e=_.useContext(yF);if(e==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return e}function d$e(e){function t(n,r){const{instance:o,context:i}=e(n).current;return _.useImperativeHandle(r,()=>o),n.children==null?null:k.createElement(_F,{value:i},n.children)}return _.forwardRef(t)}function f$e(e){function t(n,r){const[o,i]=_.useState(!1),{instance:s}=e(n,i).current;_.useImperativeHandle(r,()=>s),_.useEffect(function(){o&&s.update()},[s,o,n.children]);const a=s._contentNode;return a?xs.createPortal(n.children,a):null}return _.forwardRef(t)}function wF(e,t){const n=_.useRef();_.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 bF(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function p$e(e,t){return function(r,o){const i=$O(),s=e(bF(r,i),i);return vF(i.map,r.attribution),wF(s.current,r.eventHandlers),t(s.current,i,r,o),s}}function xF(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function SF(e,t){return t==null?function(r,o){const i=_.useRef();return i.current||(i.current=e(r,o)),i}:function(r,o){const i=_.useRef();i.current||(i.current=e(r,o));const s=_.useRef(r),{instance:a}=i.current;return _.useEffect(function(){s.current!==r&&(t(a,r,s.current),s.current=r)},[a,r,o]),i}}function h$e(e,t){_.useEffect(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){t.layerContainer?.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function m$e(e){return function(n){const r=$O(),o=e(bF(n,r),r);return vF(r.map,n.attribution),wF(o.current,n.eventHandlers),h$e(o.current,r),o}}function g$e(e,t){const n=SF(e,t),r=m$e(n);return d$e(r)}function v$e(e,t){const n=SF(e),r=p$e(n,t);return f$e(r)}function y$e(){return $O().map}function zx(){return zx=Object.assign||function(e){for(var t=1;tv?.map??null,[v]);const w=_.useCallback(x=>{if(x!==null&&v===null){const S=new l1.Map(x,f);n!=null&&u!=null?S.setView(n,u):e!=null&&S.fitBounds(e,t),c!=null&&S.whenReady(c),y(c$e(S))}},[]);_.useEffect(()=>()=>{v?.map.remove()},[v]);const P=v?k.createElement(_F,{value:v},r):s??null;return k.createElement("div",zx({},g,{ref:w}),P)}const w$e=_.forwardRef(_$e),PF=g$e(function({position:t,...n},r){const o=new l1.Marker(t,n);return xF(o,u$e(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())}),b$e=v$e(function(t,n){const r=new l1.Popup(t,n.overlayContainer);return xF(r,n)},function(t,n,{position:r},o){_.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])}),x$e=e=>{const t=y$e(),n=wi.tileLayer(`https://s.rsg.sc/sc/images/games/GTAV/map/${e.mapLayer}/{z}/{x}/{y}.jpg`,{maxZoom:7,minZoom:2,bounds:wi.latLngBounds(wi.latLng(0,128),wi.latLng(-192,0))}),r=wi.latLngBounds(wi.latLng(0,128),wi.latLng(-192,0));return t.setMaxBounds(r),t.attributionControl.setPrefix(!1),t.setView([0,0],2),t.addLayer(n),null};var Tu={};/** * @license React * react-dom-server-legacy.browser.production.min.js * @@ -683,13 +683,13 @@ img.ProseMirror-separator { * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var OF=_;function Be(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n