@obsfx/trekker-dashboard 1.11.2 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/bin/trekker-dashboard.js +32 -32
- package/dist/client/assets/index-De2cFKKZ.css +1 -0
- package/dist/client/assets/index-baOAD-fx.js +347 -0
- package/dist/client/index.html +2 -2
- package/dist/server/index.js +19575 -19339
- package/package.json +58 -45
- package/dist/client/assets/index-TQccN0iy.js +0 -342
- package/dist/client/assets/index-v4HrZd8l.css +0 -1
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
var xx=e=>{throw TypeError(e)};var Th=(e,t,n)=>t.has(e)||xx("Cannot "+n);var F=(e,t,n)=>(Th(e,t,"read from private field"),n?n.call(e):t.get(e)),ze=(e,t,n)=>t.has(e)?xx("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ee=(e,t,n,r)=>(Th(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Ze=(e,t,n)=>(Th(e,t,"access private method"),n);var Gu=(e,t,n,r)=>({set _(o){Ee(e,t,o,n)},get _(){return F(e,t,r)}});function hP(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const l=Object.getOwnPropertyDescriptor(r,o);l&&Object.defineProperty(e,o,l.get?l:{enumerable:!0,get:()=>r[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 l of o)if(l.type==="childList")for(const a of l.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();var Xu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ph={exports:{}},Zl={},Nh={exports:{}},Qe={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var wx;function pP(){if(wx)return Qe;wx=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),a=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.iterator;function v(M){return M===null||typeof M!="object"?null:(M=h&&M[h]||M["@@iterator"],typeof M=="function"?M:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,k={};function C(M,Q,j){this.props=M,this.context=Q,this.refs=k,this.updater=j||g}C.prototype.isReactComponent={},C.prototype.setState=function(M,Q){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,Q,"setState")},C.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function E(){}E.prototype=C.prototype;function _(M,Q,j){this.props=M,this.context=Q,this.refs=k,this.updater=j||g}var P=_.prototype=new E;P.constructor=_,S(P,C.prototype),P.isPureReactComponent=!0;var R=Array.isArray,I=Object.prototype.hasOwnProperty,A={current:null},H={key:!0,ref:!0,__self:!0,__source:!0};function B(M,Q,j){var ue,ve={},xe=null,re=null;if(Q!=null)for(ue in Q.ref!==void 0&&(re=Q.ref),Q.key!==void 0&&(xe=""+Q.key),Q)I.call(Q,ue)&&!H.hasOwnProperty(ue)&&(ve[ue]=Q[ue]);var me=arguments.length-2;if(me===1)ve.children=j;else if(1<me){for(var Se=Array(me),be=0;be<me;be++)Se[be]=arguments[be+2];ve.children=Se}if(M&&M.defaultProps)for(ue in me=M.defaultProps,me)ve[ue]===void 0&&(ve[ue]=me[ue]);return{$$typeof:e,type:M,key:xe,ref:re,props:ve,_owner:A.current}}function ne(M,Q){return{$$typeof:e,type:M.type,key:Q,ref:M.ref,props:M.props,_owner:M._owner}}function O(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function Y(M){var Q={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(j){return Q[j]})}var G=/\/+/g;function ae(M,Q){return typeof M=="object"&&M!==null&&M.key!=null?Y(""+M.key):Q.toString(36)}function q(M,Q,j,ue,ve){var xe=typeof M;(xe==="undefined"||xe==="boolean")&&(M=null);var re=!1;if(M===null)re=!0;else switch(xe){case"string":case"number":re=!0;break;case"object":switch(M.$$typeof){case e:case t:re=!0}}if(re)return re=M,ve=ve(re),M=ue===""?"."+ae(re,0):ue,R(ve)?(j="",M!=null&&(j=M.replace(G,"$&/")+"/"),q(ve,Q,j,"",function(be){return be})):ve!=null&&(O(ve)&&(ve=ne(ve,j+(!ve.key||re&&re.key===ve.key?"":(""+ve.key).replace(G,"$&/")+"/")+M)),Q.push(ve)),1;if(re=0,ue=ue===""?".":ue+":",R(M))for(var me=0;me<M.length;me++){xe=M[me];var Se=ue+ae(xe,me);re+=q(xe,Q,j,Se,ve)}else if(Se=v(M),typeof Se=="function")for(M=Se.call(M),me=0;!(xe=M.next()).done;)xe=xe.value,Se=ue+ae(xe,me++),re+=q(xe,Q,j,Se,ve);else if(xe==="object")throw Q=String(M),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.");return re}function U(M,Q,j){if(M==null)return M;var ue=[],ve=0;return q(M,ue,"","",function(xe){return Q.call(j,xe,ve++)}),ue}function Z(M){if(M._status===-1){var Q=M._result;Q=Q(),Q.then(function(j){(M._status===0||M._status===-1)&&(M._status=1,M._result=j)},function(j){(M._status===0||M._status===-1)&&(M._status=2,M._result=j)}),M._status===-1&&(M._status=0,M._result=Q)}if(M._status===1)return M._result.default;throw M._result}var J={current:null},D={transition:null},K={ReactCurrentDispatcher:J,ReactCurrentBatchConfig:D,ReactCurrentOwner:A};function N(){throw Error("act(...) is not supported in production builds of React.")}return Qe.Children={map:U,forEach:function(M,Q,j){U(M,function(){Q.apply(this,arguments)},j)},count:function(M){var Q=0;return U(M,function(){Q++}),Q},toArray:function(M){return U(M,function(Q){return Q})||[]},only:function(M){if(!O(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},Qe.Component=C,Qe.Fragment=n,Qe.Profiler=o,Qe.PureComponent=_,Qe.StrictMode=r,Qe.Suspense=d,Qe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=K,Qe.act=N,Qe.cloneElement=function(M,Q,j){if(M==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var ue=S({},M.props),ve=M.key,xe=M.ref,re=M._owner;if(Q!=null){if(Q.ref!==void 0&&(xe=Q.ref,re=A.current),Q.key!==void 0&&(ve=""+Q.key),M.type&&M.type.defaultProps)var me=M.type.defaultProps;for(Se in Q)I.call(Q,Se)&&!H.hasOwnProperty(Se)&&(ue[Se]=Q[Se]===void 0&&me!==void 0?me[Se]:Q[Se])}var Se=arguments.length-2;if(Se===1)ue.children=j;else if(1<Se){me=Array(Se);for(var be=0;be<Se;be++)me[be]=arguments[be+2];ue.children=me}return{$$typeof:e,type:M.type,key:ve,ref:xe,props:ue,_owner:re}},Qe.createContext=function(M){return M={$$typeof:a,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},M.Provider={$$typeof:l,_context:M},M.Consumer=M},Qe.createElement=B,Qe.createFactory=function(M){var Q=B.bind(null,M);return Q.type=M,Q},Qe.createRef=function(){return{current:null}},Qe.forwardRef=function(M){return{$$typeof:u,render:M}},Qe.isValidElement=O,Qe.lazy=function(M){return{$$typeof:p,_payload:{_status:-1,_result:M},_init:Z}},Qe.memo=function(M,Q){return{$$typeof:f,type:M,compare:Q===void 0?null:Q}},Qe.startTransition=function(M){var Q=D.transition;D.transition={};try{M()}finally{D.transition=Q}},Qe.unstable_act=N,Qe.useCallback=function(M,Q){return J.current.useCallback(M,Q)},Qe.useContext=function(M){return J.current.useContext(M)},Qe.useDebugValue=function(){},Qe.useDeferredValue=function(M){return J.current.useDeferredValue(M)},Qe.useEffect=function(M,Q){return J.current.useEffect(M,Q)},Qe.useId=function(){return J.current.useId()},Qe.useImperativeHandle=function(M,Q,j){return J.current.useImperativeHandle(M,Q,j)},Qe.useInsertionEffect=function(M,Q){return J.current.useInsertionEffect(M,Q)},Qe.useLayoutEffect=function(M,Q){return J.current.useLayoutEffect(M,Q)},Qe.useMemo=function(M,Q){return J.current.useMemo(M,Q)},Qe.useReducer=function(M,Q,j){return J.current.useReducer(M,Q,j)},Qe.useRef=function(M){return J.current.useRef(M)},Qe.useState=function(M){return J.current.useState(M)},Qe.useSyncExternalStore=function(M,Q,j){return J.current.useSyncExternalStore(M,Q,j)},Qe.useTransition=function(){return J.current.useTransition()},Qe.version="18.3.1",Qe}var bx;function vm(){return bx||(bx=1,Nh.exports=pP()),Nh.exports}/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var kx;function mP(){if(kx)return Zl;kx=1;var e=vm(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function a(u,d,f){var p,h={},v=null,g=null;f!==void 0&&(v=""+f),d.key!==void 0&&(v=""+d.key),d.ref!==void 0&&(g=d.ref);for(p in d)r.call(d,p)&&!l.hasOwnProperty(p)&&(h[p]=d[p]);if(u&&u.defaultProps)for(p in d=u.defaultProps,d)h[p]===void 0&&(h[p]=d[p]);return{$$typeof:t,type:u,key:v,ref:g,props:h,_owner:o.current}}return Zl.Fragment=n,Zl.jsx=a,Zl.jsxs=a,Zl}var Sx;function gP(){return Sx||(Sx=1,Ph.exports=mP()),Ph.exports}var y=gP(),b=vm();const le=Qo(b),xm=hP({__proto__:null,default:le},[b]);var Ju={},Rh={exports:{}},In={},jh={exports:{}},Ah={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Cx;function yP(){return Cx||(Cx=1,function(e){function t(D,K){var N=D.length;D.push(K);e:for(;0<N;){var M=N-1>>>1,Q=D[M];if(0<o(Q,K))D[M]=K,D[N]=Q,N=M;else break e}}function n(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var K=D[0],N=D.pop();if(N!==K){D[0]=N;e:for(var M=0,Q=D.length,j=Q>>>1;M<j;){var ue=2*(M+1)-1,ve=D[ue],xe=ue+1,re=D[xe];if(0>o(ve,N))xe<Q&&0>o(re,ve)?(D[M]=re,D[xe]=N,M=xe):(D[M]=ve,D[ue]=N,M=ue);else if(xe<Q&&0>o(re,N))D[M]=re,D[xe]=N,M=xe;else break e}}return K}function o(D,K){var N=D.sortIndex-K.sortIndex;return N!==0?N:D.id-K.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var a=Date,u=a.now();e.unstable_now=function(){return a.now()-u}}var d=[],f=[],p=1,h=null,v=3,g=!1,S=!1,k=!1,C=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function P(D){for(var K=n(f);K!==null;){if(K.callback===null)r(f);else if(K.startTime<=D)r(f),K.sortIndex=K.expirationTime,t(d,K);else break;K=n(f)}}function R(D){if(k=!1,P(D),!S)if(n(d)!==null)S=!0,Z(I);else{var K=n(f);K!==null&&J(R,K.startTime-D)}}function I(D,K){S=!1,k&&(k=!1,E(B),B=-1),g=!0;var N=v;try{for(P(K),h=n(d);h!==null&&(!(h.expirationTime>K)||D&&!Y());){var M=h.callback;if(typeof M=="function"){h.callback=null,v=h.priorityLevel;var Q=M(h.expirationTime<=K);K=e.unstable_now(),typeof Q=="function"?h.callback=Q:h===n(d)&&r(d),P(K)}else r(d);h=n(d)}if(h!==null)var j=!0;else{var ue=n(f);ue!==null&&J(R,ue.startTime-K),j=!1}return j}finally{h=null,v=N,g=!1}}var A=!1,H=null,B=-1,ne=5,O=-1;function Y(){return!(e.unstable_now()-O<ne)}function G(){if(H!==null){var D=e.unstable_now();O=D;var K=!0;try{K=H(!0,D)}finally{K?ae():(A=!1,H=null)}}else A=!1}var ae;if(typeof _=="function")ae=function(){_(G)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,U=q.port2;q.port1.onmessage=G,ae=function(){U.postMessage(null)}}else ae=function(){C(G,0)};function Z(D){H=D,A||(A=!0,ae())}function J(D,K){B=C(function(){D(e.unstable_now())},K)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(D){D.callback=null},e.unstable_continueExecution=function(){S||g||(S=!0,Z(I))},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ne=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(D){switch(v){case 1:case 2:case 3:var K=3;break;default:K=v}var N=v;v=K;try{return D()}finally{v=N}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(D,K){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var N=v;v=D;try{return K()}finally{v=N}},e.unstable_scheduleCallback=function(D,K,N){var M=e.unstable_now();switch(typeof N=="object"&&N!==null?(N=N.delay,N=typeof N=="number"&&0<N?M+N:M):N=M,D){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=N+Q,D={id:p++,callback:K,priorityLevel:D,startTime:N,expirationTime:Q,sortIndex:-1},N>M?(D.sortIndex=N,t(f,D),n(d)===null&&D===n(f)&&(k?(E(B),B=-1):k=!0,J(R,N-M))):(D.sortIndex=Q,t(d,D),S||g||(S=!0,Z(I))),D},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(D){var K=v;return function(){var N=v;v=K;try{return D.apply(this,arguments)}finally{v=N}}}}(Ah)),Ah}var Ex;function vP(){return Ex||(Ex=1,jh.exports=yP()),jh.exports}/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var _x;function xP(){if(_x)return In;_x=1;var e=vm(),t=vP();function n(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,c=1;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function l(i,s){a(i,s),a(i+"Capture",s)}function a(i,s){for(o[i]=s,i=0;i<s.length;i++)r.add(s[i])}var u=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=Object.prototype.hasOwnProperty,f=/^[: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]*$/,p={},h={};function v(i){return d.call(h,i)?!0:d.call(p,i)?!1:f.test(i)?h[i]=!0:(p[i]=!0,!1)}function g(i,s,c,m){if(c!==null&&c.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return m?!1:c!==null?!c.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function S(i,s,c,m){if(s===null||typeof s>"u"||g(i,s,c,m))return!0;if(m)return!1;if(c!==null)switch(c.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function k(i,s,c,m,x,w,T){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=m,this.attributeNamespace=x,this.mustUseProperty=c,this.propertyName=i,this.type=s,this.sanitizeURL=w,this.removeEmptyString=T}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){C[i]=new k(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];C[s]=new k(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){C[i]=new k(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){C[i]=new k(i,2,!1,i,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(i){C[i]=new k(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){C[i]=new k(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){C[i]=new k(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){C[i]=new k(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){C[i]=new k(i,5,!1,i.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function _(i){return i[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(i){var s=i.replace(E,_);C[s]=new k(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(E,_);C[s]=new k(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(E,_);C[s]=new k(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){C[i]=new k(i,1,!1,i.toLowerCase(),null,!1,!1)}),C.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){C[i]=new k(i,1,!1,i.toLowerCase(),null,!0,!0)});function P(i,s,c,m){var x=C.hasOwnProperty(s)?C[s]:null;(x!==null?x.type!==0:m||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(S(s,c,x,m)&&(c=null),m||x===null?v(s)&&(c===null?i.removeAttribute(s):i.setAttribute(s,""+c)):x.mustUseProperty?i[x.propertyName]=c===null?x.type===3?!1:"":c:(s=x.attributeName,m=x.attributeNamespace,c===null?i.removeAttribute(s):(x=x.type,c=x===3||x===4&&c===!0?"":""+c,m?i.setAttributeNS(m,s,c):i.setAttribute(s,c))))}var R=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,I=Symbol.for("react.element"),A=Symbol.for("react.portal"),H=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),ne=Symbol.for("react.profiler"),O=Symbol.for("react.provider"),Y=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),ae=Symbol.for("react.suspense"),q=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),J=Symbol.for("react.offscreen"),D=Symbol.iterator;function K(i){return i===null||typeof i!="object"?null:(i=D&&i[D]||i["@@iterator"],typeof i=="function"?i:null)}var N=Object.assign,M;function Q(i){if(M===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);M=s&&s[1]||""}return`
|
|
34
|
+
`+M+i}var j=!1;function ue(i,s){if(!i||j)return"";j=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(ie){var m=ie}Reflect.construct(i,[],s)}else{try{s.call()}catch(ie){m=ie}i.call(s.prototype)}else{try{throw Error()}catch(ie){m=ie}i()}}catch(ie){if(ie&&m&&typeof ie.stack=="string"){for(var x=ie.stack.split(`
|
|
35
|
+
`),w=m.stack.split(`
|
|
36
|
+
`),T=x.length-1,z=w.length-1;1<=T&&0<=z&&x[T]!==w[z];)z--;for(;1<=T&&0<=z;T--,z--)if(x[T]!==w[z]){if(T!==1||z!==1)do if(T--,z--,0>z||x[T]!==w[z]){var V=`
|
|
37
|
+
`+x[T].replace(" at new "," at ");return i.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",i.displayName)),V}while(1<=T&&0<=z);break}}}finally{j=!1,Error.prepareStackTrace=c}return(i=i?i.displayName||i.name:"")?Q(i):""}function ve(i){switch(i.tag){case 5:return Q(i.type);case 16:return Q("Lazy");case 13:return Q("Suspense");case 19:return Q("SuspenseList");case 0:case 2:case 15:return i=ue(i.type,!1),i;case 11:return i=ue(i.type.render,!1),i;case 1:return i=ue(i.type,!0),i;default:return""}}function xe(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case H:return"Fragment";case A:return"Portal";case ne:return"Profiler";case B:return"StrictMode";case ae:return"Suspense";case q:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case Y:return(i.displayName||"Context")+".Consumer";case O:return(i._context.displayName||"Context")+".Provider";case G:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case U:return s=i.displayName||null,s!==null?s:xe(i.type)||"Memo";case Z:s=i._payload,i=i._init;try{return xe(i(s))}catch{}}return null}function re(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return xe(s);case 8:return s===B?"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 s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function me(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Se(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function be(i){var s=Se(i)?"checked":"value",c=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),m=""+i[s];if(!i.hasOwnProperty(s)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var x=c.get,w=c.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return x.call(this)},set:function(T){m=""+T,w.call(this,T)}}),Object.defineProperty(i,s,{enumerable:c.enumerable}),{getValue:function(){return m},setValue:function(T){m=""+T},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function Ie(i){i._valueTracker||(i._valueTracker=be(i))}function Ue(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var c=s.getValue(),m="";return i&&(m=Se(i)?i.checked?"true":"false":i.value),i=m,i!==c?(s.setValue(i),!0):!1}function ot(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}function It(i,s){var c=s.checked;return N({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c??i._wrapperState.initialChecked})}function Zt(i,s){var c=s.defaultValue==null?"":s.defaultValue,m=s.checked!=null?s.checked:s.defaultChecked;c=me(s.value!=null?s.value:c),i._wrapperState={initialChecked:m,initialValue:c,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function on(i,s){s=s.checked,s!=null&&P(i,"checked",s,!1)}function Xt(i,s){on(i,s);var c=me(s.value),m=s.type;if(c!=null)m==="number"?(c===0&&i.value===""||i.value!=c)&&(i.value=""+c):i.value!==""+c&&(i.value=""+c);else if(m==="submit"||m==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?fn(i,s.type,c):s.hasOwnProperty("defaultValue")&&fn(i,s.type,me(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function Bn(i,s,c){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var m=s.type;if(!(m!=="submit"&&m!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,c||s===i.value||(i.value=s),i.defaultValue=s}c=i.name,c!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,c!==""&&(i.name=c)}function fn(i,s,c){(s!=="number"||ot(i.ownerDocument)!==i)&&(c==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+c&&(i.defaultValue=""+c))}var qt=Array.isArray;function L(i,s,c,m){if(i=i.options,s){s={};for(var x=0;x<c.length;x++)s["$"+c[x]]=!0;for(c=0;c<i.length;c++)x=s.hasOwnProperty("$"+i[c].value),i[c].selected!==x&&(i[c].selected=x),x&&m&&(i[c].defaultSelected=!0)}else{for(c=""+me(c),s=null,x=0;x<i.length;x++){if(i[x].value===c){i[x].selected=!0,m&&(i[x].defaultSelected=!0);return}s!==null||i[x].disabled||(s=i[x])}s!==null&&(s.selected=!0)}}function ee(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return N({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function oe(i,s){var c=s.value;if(c==null){if(c=s.children,s=s.defaultValue,c!=null){if(s!=null)throw Error(n(92));if(qt(c)){if(1<c.length)throw Error(n(93));c=c[0]}s=c}s==null&&(s=""),c=s}i._wrapperState={initialValue:me(c)}}function we(i,s){var c=me(s.value),m=me(s.defaultValue);c!=null&&(c=""+c,c!==i.value&&(i.value=c),s.defaultValue==null&&i.defaultValue!==c&&(i.defaultValue=c)),m!=null&&(i.defaultValue=""+m)}function ye(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function $(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function se(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?$(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var ke,_e=function(i){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,c,m,x){MSApp.execUnsafeLocalFunction(function(){return i(s,c,m,x)})}:i}(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(ke=ke||document.createElement("div"),ke.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=ke.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function De(i,s){if(s){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=s;return}}i.textContent=s}var dt={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},kt=["Webkit","ms","Moz","O"];Object.keys(dt).forEach(function(i){kt.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),dt[s]=dt[i]})});function Jt(i,s,c){return s==null||typeof s=="boolean"||s===""?"":c||typeof s!="number"||s===0||dt.hasOwnProperty(i)&&dt[i]?(""+s).trim():s+"px"}function En(i,s){i=i.style;for(var c in s)if(s.hasOwnProperty(c)){var m=c.indexOf("--")===0,x=Jt(c,s[c],m);c==="float"&&(c="cssFloat"),m?i.setProperty(c,x):i[c]=x}}var _n=N({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 Tt(i,s){if(s){if(_n[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function hn(i,s){if(i.indexOf("-")===-1)return typeof s.is=="string";switch(i){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 Vt=null;function pn(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var ul=null,Be=null,Ge=null;function ft(i){if(i=jl(i)){if(typeof ul!="function")throw Error(n(280));var s=i.stateNode;s&&(s=fu(s),ul(i.stateNode,i.type,s))}}function Tn(i){Be?Ge?Ge.push(i):Ge=[i]:Be=i}function Un(){if(Be){var i=Be,s=Ge;if(Ge=Be=null,ft(i),s)for(i=0;i<s.length;i++)ft(s[i])}}function co(i,s){return i(s)}function Ua(){}var Ud=!1;function Vg(i,s,c){if(Ud)return i(s,c);Ud=!0;try{return co(i,s,c)}finally{Ud=!1,(Be!==null||Ge!==null)&&(Ua(),Un())}}function cl(i,s){var c=i.stateNode;if(c===null)return null;var m=fu(c);if(m===null)return null;c=m[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(i=i.type,m=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!m;break e;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error(n(231,s,typeof c));return c}var Hd=!1;if(u)try{var dl={};Object.defineProperty(dl,"passive",{get:function(){Hd=!0}}),window.addEventListener("test",dl,dl),window.removeEventListener("test",dl,dl)}catch{Hd=!1}function x_(i,s,c,m,x,w,T,z,V){var ie=Array.prototype.slice.call(arguments,3);try{s.apply(c,ie)}catch(fe){this.onError(fe)}}var fl=!1,Ha=null,Wa=!1,Wd=null,w_={onError:function(i){fl=!0,Ha=i}};function b_(i,s,c,m,x,w,T,z,V){fl=!1,Ha=null,x_.apply(w_,arguments)}function k_(i,s,c,m,x,w,T,z,V){if(b_.apply(this,arguments),fl){if(fl){var ie=Ha;fl=!1,Ha=null}else throw Error(n(198));Wa||(Wa=!0,Wd=ie)}}function fo(i){var s=i,c=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,s.flags&4098&&(c=s.return),i=s.return;while(i)}return s.tag===3?c:null}function Bg(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function Ug(i){if(fo(i)!==i)throw Error(n(188))}function S_(i){var s=i.alternate;if(!s){if(s=fo(i),s===null)throw Error(n(188));return s!==i?null:i}for(var c=i,m=s;;){var x=c.return;if(x===null)break;var w=x.alternate;if(w===null){if(m=x.return,m!==null){c=m;continue}break}if(x.child===w.child){for(w=x.child;w;){if(w===c)return Ug(x),i;if(w===m)return Ug(x),s;w=w.sibling}throw Error(n(188))}if(c.return!==m.return)c=x,m=w;else{for(var T=!1,z=x.child;z;){if(z===c){T=!0,c=x,m=w;break}if(z===m){T=!0,m=x,c=w;break}z=z.sibling}if(!T){for(z=w.child;z;){if(z===c){T=!0,c=w,m=x;break}if(z===m){T=!0,m=w,c=x;break}z=z.sibling}if(!T)throw Error(n(189))}}if(c.alternate!==m)throw Error(n(190))}if(c.tag!==3)throw Error(n(188));return c.stateNode.current===c?i:s}function Hg(i){return i=S_(i),i!==null?Wg(i):null}function Wg(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=Wg(i);if(s!==null)return s;i=i.sibling}return null}var Zg=t.unstable_scheduleCallback,qg=t.unstable_cancelCallback,C_=t.unstable_shouldYield,E_=t.unstable_requestPaint,jt=t.unstable_now,__=t.unstable_getCurrentPriorityLevel,Zd=t.unstable_ImmediatePriority,Qg=t.unstable_UserBlockingPriority,Za=t.unstable_NormalPriority,T_=t.unstable_LowPriority,Yg=t.unstable_IdlePriority,qa=null,Ar=null;function P_(i){if(Ar&&typeof Ar.onCommitFiberRoot=="function")try{Ar.onCommitFiberRoot(qa,i,void 0,(i.current.flags&128)===128)}catch{}}var pr=Math.clz32?Math.clz32:j_,N_=Math.log,R_=Math.LN2;function j_(i){return i>>>=0,i===0?32:31-(N_(i)/R_|0)|0}var Qa=64,Ya=4194304;function hl(i){switch(i&-i){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 i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function Ka(i,s){var c=i.pendingLanes;if(c===0)return 0;var m=0,x=i.suspendedLanes,w=i.pingedLanes,T=c&268435455;if(T!==0){var z=T&~x;z!==0?m=hl(z):(w&=T,w!==0&&(m=hl(w)))}else T=c&~x,T!==0?m=hl(T):w!==0&&(m=hl(w));if(m===0)return 0;if(s!==0&&s!==m&&!(s&x)&&(x=m&-m,w=s&-s,x>=w||x===16&&(w&4194240)!==0))return s;if(m&4&&(m|=c&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=m;0<s;)c=31-pr(s),x=1<<c,m|=i[c],s&=~x;return m}function A_(i,s){switch(i){case 1:case 2:case 4:return s+250;case 8:case 16:case 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 s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function I_(i,s){for(var c=i.suspendedLanes,m=i.pingedLanes,x=i.expirationTimes,w=i.pendingLanes;0<w;){var T=31-pr(w),z=1<<T,V=x[T];V===-1?(!(z&c)||z&m)&&(x[T]=A_(z,s)):V<=s&&(i.expiredLanes|=z),w&=~z}}function qd(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function Kg(){var i=Qa;return Qa<<=1,!(Qa&4194240)&&(Qa=64),i}function Qd(i){for(var s=[],c=0;31>c;c++)s.push(i);return s}function pl(i,s,c){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-pr(s),i[s]=c}function O_(i,s){var c=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var m=i.eventTimes;for(i=i.expirationTimes;0<c;){var x=31-pr(c),w=1<<x;s[x]=0,m[x]=-1,i[x]=-1,c&=~w}}function Yd(i,s){var c=i.entangledLanes|=s;for(i=i.entanglements;c;){var m=31-pr(c),x=1<<m;x&s|i[m]&s&&(i[m]|=s),c&=~x}}var lt=0;function Gg(i){return i&=-i,1<i?4<i?i&268435455?16:536870912:4:1}var Xg,Kd,Jg,ey,ty,Gd=!1,Ga=[],vi=null,xi=null,wi=null,ml=new Map,gl=new Map,bi=[],D_="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ny(i,s){switch(i){case"focusin":case"focusout":vi=null;break;case"dragenter":case"dragleave":xi=null;break;case"mouseover":case"mouseout":wi=null;break;case"pointerover":case"pointerout":ml.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":gl.delete(s.pointerId)}}function yl(i,s,c,m,x,w){return i===null||i.nativeEvent!==w?(i={blockedOn:s,domEventName:c,eventSystemFlags:m,nativeEvent:w,targetContainers:[x]},s!==null&&(s=jl(s),s!==null&&Kd(s)),i):(i.eventSystemFlags|=m,s=i.targetContainers,x!==null&&s.indexOf(x)===-1&&s.push(x),i)}function z_(i,s,c,m,x){switch(s){case"focusin":return vi=yl(vi,i,s,c,m,x),!0;case"dragenter":return xi=yl(xi,i,s,c,m,x),!0;case"mouseover":return wi=yl(wi,i,s,c,m,x),!0;case"pointerover":var w=x.pointerId;return ml.set(w,yl(ml.get(w)||null,i,s,c,m,x)),!0;case"gotpointercapture":return w=x.pointerId,gl.set(w,yl(gl.get(w)||null,i,s,c,m,x)),!0}return!1}function ry(i){var s=ho(i.target);if(s!==null){var c=fo(s);if(c!==null){if(s=c.tag,s===13){if(s=Bg(c),s!==null){i.blockedOn=s,ty(i.priority,function(){Jg(c)});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Xa(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var c=Jd(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(c===null){c=i.nativeEvent;var m=new c.constructor(c.type,c);Vt=m,c.target.dispatchEvent(m),Vt=null}else return s=jl(c),s!==null&&Kd(s),i.blockedOn=c,!1;s.shift()}return!0}function iy(i,s,c){Xa(i)&&c.delete(s)}function M_(){Gd=!1,vi!==null&&Xa(vi)&&(vi=null),xi!==null&&Xa(xi)&&(xi=null),wi!==null&&Xa(wi)&&(wi=null),ml.forEach(iy),gl.forEach(iy)}function vl(i,s){i.blockedOn===s&&(i.blockedOn=null,Gd||(Gd=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,M_)))}function xl(i){function s(x){return vl(x,i)}if(0<Ga.length){vl(Ga[0],i);for(var c=1;c<Ga.length;c++){var m=Ga[c];m.blockedOn===i&&(m.blockedOn=null)}}for(vi!==null&&vl(vi,i),xi!==null&&vl(xi,i),wi!==null&&vl(wi,i),ml.forEach(s),gl.forEach(s),c=0;c<bi.length;c++)m=bi[c],m.blockedOn===i&&(m.blockedOn=null);for(;0<bi.length&&(c=bi[0],c.blockedOn===null);)ry(c),c.blockedOn===null&&bi.shift()}var Go=R.ReactCurrentBatchConfig,Ja=!0;function L_(i,s,c,m){var x=lt,w=Go.transition;Go.transition=null;try{lt=1,Xd(i,s,c,m)}finally{lt=x,Go.transition=w}}function F_(i,s,c,m){var x=lt,w=Go.transition;Go.transition=null;try{lt=4,Xd(i,s,c,m)}finally{lt=x,Go.transition=w}}function Xd(i,s,c,m){if(Ja){var x=Jd(i,s,c,m);if(x===null)yf(i,s,m,eu,c),ny(i,m);else if(z_(x,i,s,c,m))m.stopPropagation();else if(ny(i,m),s&4&&-1<D_.indexOf(i)){for(;x!==null;){var w=jl(x);if(w!==null&&Xg(w),w=Jd(i,s,c,m),w===null&&yf(i,s,m,eu,c),w===x)break;x=w}x!==null&&m.stopPropagation()}else yf(i,s,m,null,c)}}var eu=null;function Jd(i,s,c,m){if(eu=null,i=pn(m),i=ho(i),i!==null)if(s=fo(i),s===null)i=null;else if(c=s.tag,c===13){if(i=Bg(s),i!==null)return i;i=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return eu=i,null}function oy(i){switch(i){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(__()){case Zd:return 1;case Qg:return 4;case Za:case T_:return 16;case Yg:return 536870912;default:return 16}default:return 16}}var ki=null,ef=null,tu=null;function sy(){if(tu)return tu;var i,s=ef,c=s.length,m,x="value"in ki?ki.value:ki.textContent,w=x.length;for(i=0;i<c&&s[i]===x[i];i++);var T=c-i;for(m=1;m<=T&&s[c-m]===x[w-m];m++);return tu=x.slice(i,1<m?1-m:void 0)}function nu(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function ru(){return!0}function ly(){return!1}function Hn(i){function s(c,m,x,w,T){this._reactName=c,this._targetInst=x,this.type=m,this.nativeEvent=w,this.target=T,this.currentTarget=null;for(var z in i)i.hasOwnProperty(z)&&(c=i[z],this[z]=c?c(w):w[z]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?ru:ly,this.isPropagationStopped=ly,this}return N(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=ru)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=ru)},persist:function(){},isPersistent:ru}),s}var Xo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},tf=Hn(Xo),wl=N({},Xo,{view:0,detail:0}),$_=Hn(wl),nf,rf,bl,iu=N({},wl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:sf,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==bl&&(bl&&i.type==="mousemove"?(nf=i.screenX-bl.screenX,rf=i.screenY-bl.screenY):rf=nf=0,bl=i),nf)},movementY:function(i){return"movementY"in i?i.movementY:rf}}),ay=Hn(iu),V_=N({},iu,{dataTransfer:0}),B_=Hn(V_),U_=N({},wl,{relatedTarget:0}),of=Hn(U_),H_=N({},Xo,{animationName:0,elapsedTime:0,pseudoElement:0}),W_=Hn(H_),Z_=N({},Xo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),q_=Hn(Z_),Q_=N({},Xo,{data:0}),uy=Hn(Q_),Y_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},K_={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},G_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function X_(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=G_[i])?!!s[i]:!1}function sf(){return X_}var J_=N({},wl,{key:function(i){if(i.key){var s=Y_[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=nu(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?K_[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:sf,charCode:function(i){return i.type==="keypress"?nu(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?nu(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),eT=Hn(J_),tT=N({},iu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cy=Hn(tT),nT=N({},wl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:sf}),rT=Hn(nT),iT=N({},Xo,{propertyName:0,elapsedTime:0,pseudoElement:0}),oT=Hn(iT),sT=N({},iu,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),lT=Hn(sT),aT=[9,13,27,32],lf=u&&"CompositionEvent"in window,kl=null;u&&"documentMode"in document&&(kl=document.documentMode);var uT=u&&"TextEvent"in window&&!kl,dy=u&&(!lf||kl&&8<kl&&11>=kl),fy=" ",hy=!1;function py(i,s){switch(i){case"keyup":return aT.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function my(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Jo=!1;function cT(i,s){switch(i){case"compositionend":return my(s);case"keypress":return s.which!==32?null:(hy=!0,fy);case"textInput":return i=s.data,i===fy&&hy?null:i;default:return null}}function dT(i,s){if(Jo)return i==="compositionend"||!lf&&py(i,s)?(i=sy(),tu=ef=ki=null,Jo=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return dy&&s.locale!=="ko"?null:s.data;default:return null}}var fT={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function gy(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!fT[i.type]:s==="textarea"}function yy(i,s,c,m){Tn(m),s=uu(s,"onChange"),0<s.length&&(c=new tf("onChange","change",null,c,m),i.push({event:c,listeners:s}))}var Sl=null,Cl=null;function hT(i){Dy(i,0)}function ou(i){var s=is(i);if(Ue(s))return i}function pT(i,s){if(i==="change")return s}var vy=!1;if(u){var af;if(u){var uf="oninput"in document;if(!uf){var xy=document.createElement("div");xy.setAttribute("oninput","return;"),uf=typeof xy.oninput=="function"}af=uf}else af=!1;vy=af&&(!document.documentMode||9<document.documentMode)}function wy(){Sl&&(Sl.detachEvent("onpropertychange",by),Cl=Sl=null)}function by(i){if(i.propertyName==="value"&&ou(Cl)){var s=[];yy(s,Cl,i,pn(i)),Vg(hT,s)}}function mT(i,s,c){i==="focusin"?(wy(),Sl=s,Cl=c,Sl.attachEvent("onpropertychange",by)):i==="focusout"&&wy()}function gT(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return ou(Cl)}function yT(i,s){if(i==="click")return ou(s)}function vT(i,s){if(i==="input"||i==="change")return ou(s)}function xT(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var mr=typeof Object.is=="function"?Object.is:xT;function El(i,s){if(mr(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var c=Object.keys(i),m=Object.keys(s);if(c.length!==m.length)return!1;for(m=0;m<c.length;m++){var x=c[m];if(!d.call(s,x)||!mr(i[x],s[x]))return!1}return!0}function ky(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function Sy(i,s){var c=ky(i);i=0;for(var m;c;){if(c.nodeType===3){if(m=i+c.textContent.length,i<=s&&m>=s)return{node:c,offset:s-i};i=m}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=ky(c)}}function Cy(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?Cy(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function Ey(){for(var i=window,s=ot();s instanceof i.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch{c=!1}if(c)i=s.contentWindow;else break;s=ot(i.document)}return s}function cf(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function wT(i){var s=Ey(),c=i.focusedElem,m=i.selectionRange;if(s!==c&&c&&c.ownerDocument&&Cy(c.ownerDocument.documentElement,c)){if(m!==null&&cf(c)){if(s=m.start,i=m.end,i===void 0&&(i=s),"selectionStart"in c)c.selectionStart=s,c.selectionEnd=Math.min(i,c.value.length);else if(i=(s=c.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var x=c.textContent.length,w=Math.min(m.start,x);m=m.end===void 0?w:Math.min(m.end,x),!i.extend&&w>m&&(x=m,m=w,w=x),x=Sy(c,w);var T=Sy(c,m);x&&T&&(i.rangeCount!==1||i.anchorNode!==x.node||i.anchorOffset!==x.offset||i.focusNode!==T.node||i.focusOffset!==T.offset)&&(s=s.createRange(),s.setStart(x.node,x.offset),i.removeAllRanges(),w>m?(i.addRange(s),i.extend(T.node,T.offset)):(s.setEnd(T.node,T.offset),i.addRange(s)))}}for(s=[],i=c;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<s.length;c++)i=s[c],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var bT=u&&"documentMode"in document&&11>=document.documentMode,es=null,df=null,_l=null,ff=!1;function _y(i,s,c){var m=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;ff||es==null||es!==ot(m)||(m=es,"selectionStart"in m&&cf(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),_l&&El(_l,m)||(_l=m,m=uu(df,"onSelect"),0<m.length&&(s=new tf("onSelect","select",null,s,c),i.push({event:s,listeners:m}),s.target=es)))}function su(i,s){var c={};return c[i.toLowerCase()]=s.toLowerCase(),c["Webkit"+i]="webkit"+s,c["Moz"+i]="moz"+s,c}var ts={animationend:su("Animation","AnimationEnd"),animationiteration:su("Animation","AnimationIteration"),animationstart:su("Animation","AnimationStart"),transitionend:su("Transition","TransitionEnd")},hf={},Ty={};u&&(Ty=document.createElement("div").style,"AnimationEvent"in window||(delete ts.animationend.animation,delete ts.animationiteration.animation,delete ts.animationstart.animation),"TransitionEvent"in window||delete ts.transitionend.transition);function lu(i){if(hf[i])return hf[i];if(!ts[i])return i;var s=ts[i],c;for(c in s)if(s.hasOwnProperty(c)&&c in Ty)return hf[i]=s[c];return i}var Py=lu("animationend"),Ny=lu("animationiteration"),Ry=lu("animationstart"),jy=lu("transitionend"),Ay=new Map,Iy="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Si(i,s){Ay.set(i,s),l(s,[i])}for(var pf=0;pf<Iy.length;pf++){var mf=Iy[pf],kT=mf.toLowerCase(),ST=mf[0].toUpperCase()+mf.slice(1);Si(kT,"on"+ST)}Si(Py,"onAnimationEnd"),Si(Ny,"onAnimationIteration"),Si(Ry,"onAnimationStart"),Si("dblclick","onDoubleClick"),Si("focusin","onFocus"),Si("focusout","onBlur"),Si(jy,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Tl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),CT=new Set("cancel close invalid load scroll toggle".split(" ").concat(Tl));function Oy(i,s,c){var m=i.type||"unknown-event";i.currentTarget=c,k_(m,s,void 0,i),i.currentTarget=null}function Dy(i,s){s=(s&4)!==0;for(var c=0;c<i.length;c++){var m=i[c],x=m.event;m=m.listeners;e:{var w=void 0;if(s)for(var T=m.length-1;0<=T;T--){var z=m[T],V=z.instance,ie=z.currentTarget;if(z=z.listener,V!==w&&x.isPropagationStopped())break e;Oy(x,z,ie),w=V}else for(T=0;T<m.length;T++){if(z=m[T],V=z.instance,ie=z.currentTarget,z=z.listener,V!==w&&x.isPropagationStopped())break e;Oy(x,z,ie),w=V}}}if(Wa)throw i=Wd,Wa=!1,Wd=null,i}function gt(i,s){var c=s[Sf];c===void 0&&(c=s[Sf]=new Set);var m=i+"__bubble";c.has(m)||(zy(s,i,2,!1),c.add(m))}function gf(i,s,c){var m=0;s&&(m|=4),zy(c,i,m,s)}var au="_reactListening"+Math.random().toString(36).slice(2);function Pl(i){if(!i[au]){i[au]=!0,r.forEach(function(c){c!=="selectionchange"&&(CT.has(c)||gf(c,!1,i),gf(c,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[au]||(s[au]=!0,gf("selectionchange",!1,s))}}function zy(i,s,c,m){switch(oy(s)){case 1:var x=L_;break;case 4:x=F_;break;default:x=Xd}c=x.bind(null,s,c,i),x=void 0,!Hd||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(x=!0),m?x!==void 0?i.addEventListener(s,c,{capture:!0,passive:x}):i.addEventListener(s,c,!0):x!==void 0?i.addEventListener(s,c,{passive:x}):i.addEventListener(s,c,!1)}function yf(i,s,c,m,x){var w=m;if(!(s&1)&&!(s&2)&&m!==null)e:for(;;){if(m===null)return;var T=m.tag;if(T===3||T===4){var z=m.stateNode.containerInfo;if(z===x||z.nodeType===8&&z.parentNode===x)break;if(T===4)for(T=m.return;T!==null;){var V=T.tag;if((V===3||V===4)&&(V=T.stateNode.containerInfo,V===x||V.nodeType===8&&V.parentNode===x))return;T=T.return}for(;z!==null;){if(T=ho(z),T===null)return;if(V=T.tag,V===5||V===6){m=w=T;continue e}z=z.parentNode}}m=m.return}Vg(function(){var ie=w,fe=pn(c),he=[];e:{var de=Ay.get(i);if(de!==void 0){var Te=tf,Ne=i;switch(i){case"keypress":if(nu(c)===0)break e;case"keydown":case"keyup":Te=eT;break;case"focusin":Ne="focus",Te=of;break;case"focusout":Ne="blur",Te=of;break;case"beforeblur":case"afterblur":Te=of;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Te=ay;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Te=B_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Te=rT;break;case Py:case Ny:case Ry:Te=W_;break;case jy:Te=oT;break;case"scroll":Te=$_;break;case"wheel":Te=lT;break;case"copy":case"cut":case"paste":Te=q_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Te=cy}var Ae=(s&4)!==0,At=!Ae&&i==="scroll",X=Ae?de!==null?de+"Capture":null:de;Ae=[];for(var W=ie,te;W!==null;){te=W;var ge=te.stateNode;if(te.tag===5&&ge!==null&&(te=ge,X!==null&&(ge=cl(W,X),ge!=null&&Ae.push(Nl(W,ge,te)))),At)break;W=W.return}0<Ae.length&&(de=new Te(de,Ne,null,c,fe),he.push({event:de,listeners:Ae}))}}if(!(s&7)){e:{if(de=i==="mouseover"||i==="pointerover",Te=i==="mouseout"||i==="pointerout",de&&c!==Vt&&(Ne=c.relatedTarget||c.fromElement)&&(ho(Ne)||Ne[Kr]))break e;if((Te||de)&&(de=fe.window===fe?fe:(de=fe.ownerDocument)?de.defaultView||de.parentWindow:window,Te?(Ne=c.relatedTarget||c.toElement,Te=ie,Ne=Ne?ho(Ne):null,Ne!==null&&(At=fo(Ne),Ne!==At||Ne.tag!==5&&Ne.tag!==6)&&(Ne=null)):(Te=null,Ne=ie),Te!==Ne)){if(Ae=ay,ge="onMouseLeave",X="onMouseEnter",W="mouse",(i==="pointerout"||i==="pointerover")&&(Ae=cy,ge="onPointerLeave",X="onPointerEnter",W="pointer"),At=Te==null?de:is(Te),te=Ne==null?de:is(Ne),de=new Ae(ge,W+"leave",Te,c,fe),de.target=At,de.relatedTarget=te,ge=null,ho(fe)===ie&&(Ae=new Ae(X,W+"enter",Ne,c,fe),Ae.target=te,Ae.relatedTarget=At,ge=Ae),At=ge,Te&&Ne)t:{for(Ae=Te,X=Ne,W=0,te=Ae;te;te=ns(te))W++;for(te=0,ge=X;ge;ge=ns(ge))te++;for(;0<W-te;)Ae=ns(Ae),W--;for(;0<te-W;)X=ns(X),te--;for(;W--;){if(Ae===X||X!==null&&Ae===X.alternate)break t;Ae=ns(Ae),X=ns(X)}Ae=null}else Ae=null;Te!==null&&My(he,de,Te,Ae,!1),Ne!==null&&At!==null&&My(he,At,Ne,Ae,!0)}}e:{if(de=ie?is(ie):window,Te=de.nodeName&&de.nodeName.toLowerCase(),Te==="select"||Te==="input"&&de.type==="file")var Oe=pT;else if(gy(de))if(vy)Oe=vT;else{Oe=gT;var Le=mT}else(Te=de.nodeName)&&Te.toLowerCase()==="input"&&(de.type==="checkbox"||de.type==="radio")&&(Oe=yT);if(Oe&&(Oe=Oe(i,ie))){yy(he,Oe,c,fe);break e}Le&&Le(i,de,ie),i==="focusout"&&(Le=de._wrapperState)&&Le.controlled&&de.type==="number"&&fn(de,"number",de.value)}switch(Le=ie?is(ie):window,i){case"focusin":(gy(Le)||Le.contentEditable==="true")&&(es=Le,df=ie,_l=null);break;case"focusout":_l=df=es=null;break;case"mousedown":ff=!0;break;case"contextmenu":case"mouseup":case"dragend":ff=!1,_y(he,c,fe);break;case"selectionchange":if(bT)break;case"keydown":case"keyup":_y(he,c,fe)}var Fe;if(lf)e:{switch(i){case"compositionstart":var He="onCompositionStart";break e;case"compositionend":He="onCompositionEnd";break e;case"compositionupdate":He="onCompositionUpdate";break e}He=void 0}else Jo?py(i,c)&&(He="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(He="onCompositionStart");He&&(dy&&c.locale!=="ko"&&(Jo||He!=="onCompositionStart"?He==="onCompositionEnd"&&Jo&&(Fe=sy()):(ki=fe,ef="value"in ki?ki.value:ki.textContent,Jo=!0)),Le=uu(ie,He),0<Le.length&&(He=new uy(He,i,null,c,fe),he.push({event:He,listeners:Le}),Fe?He.data=Fe:(Fe=my(c),Fe!==null&&(He.data=Fe)))),(Fe=uT?cT(i,c):dT(i,c))&&(ie=uu(ie,"onBeforeInput"),0<ie.length&&(fe=new uy("onBeforeInput","beforeinput",null,c,fe),he.push({event:fe,listeners:ie}),fe.data=Fe))}Dy(he,s)})}function Nl(i,s,c){return{instance:i,listener:s,currentTarget:c}}function uu(i,s){for(var c=s+"Capture",m=[];i!==null;){var x=i,w=x.stateNode;x.tag===5&&w!==null&&(x=w,w=cl(i,c),w!=null&&m.unshift(Nl(i,w,x)),w=cl(i,s),w!=null&&m.push(Nl(i,w,x))),i=i.return}return m}function ns(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function My(i,s,c,m,x){for(var w=s._reactName,T=[];c!==null&&c!==m;){var z=c,V=z.alternate,ie=z.stateNode;if(V!==null&&V===m)break;z.tag===5&&ie!==null&&(z=ie,x?(V=cl(c,w),V!=null&&T.unshift(Nl(c,V,z))):x||(V=cl(c,w),V!=null&&T.push(Nl(c,V,z)))),c=c.return}T.length!==0&&i.push({event:s,listeners:T})}var ET=/\r\n?/g,_T=/\u0000|\uFFFD/g;function Ly(i){return(typeof i=="string"?i:""+i).replace(ET,`
|
|
38
|
+
`).replace(_T,"")}function cu(i,s,c){if(s=Ly(s),Ly(i)!==s&&c)throw Error(n(425))}function du(){}var vf=null,xf=null;function wf(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var bf=typeof setTimeout=="function"?setTimeout:void 0,TT=typeof clearTimeout=="function"?clearTimeout:void 0,Fy=typeof Promise=="function"?Promise:void 0,PT=typeof queueMicrotask=="function"?queueMicrotask:typeof Fy<"u"?function(i){return Fy.resolve(null).then(i).catch(NT)}:bf;function NT(i){setTimeout(function(){throw i})}function kf(i,s){var c=s,m=0;do{var x=c.nextSibling;if(i.removeChild(c),x&&x.nodeType===8)if(c=x.data,c==="/$"){if(m===0){i.removeChild(x),xl(s);return}m--}else c!=="$"&&c!=="$?"&&c!=="$!"||m++;c=x}while(c);xl(s)}function Ci(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return i}function $y(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"){if(s===0)return i;s--}else c==="/$"&&s++}i=i.previousSibling}return null}var rs=Math.random().toString(36).slice(2),Ir="__reactFiber$"+rs,Rl="__reactProps$"+rs,Kr="__reactContainer$"+rs,Sf="__reactEvents$"+rs,RT="__reactListeners$"+rs,jT="__reactHandles$"+rs;function ho(i){var s=i[Ir];if(s)return s;for(var c=i.parentNode;c;){if(s=c[Kr]||c[Ir]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(i=$y(i);i!==null;){if(c=i[Ir])return c;i=$y(i)}return s}i=c,c=i.parentNode}return null}function jl(i){return i=i[Ir]||i[Kr],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function is(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function fu(i){return i[Rl]||null}var Cf=[],os=-1;function Ei(i){return{current:i}}function yt(i){0>os||(i.current=Cf[os],Cf[os]=null,os--)}function pt(i,s){os++,Cf[os]=i.current,i.current=s}var _i={},sn=Ei(_i),Pn=Ei(!1),po=_i;function ss(i,s){var c=i.type.contextTypes;if(!c)return _i;var m=i.stateNode;if(m&&m.__reactInternalMemoizedUnmaskedChildContext===s)return m.__reactInternalMemoizedMaskedChildContext;var x={},w;for(w in c)x[w]=s[w];return m&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=x),x}function Nn(i){return i=i.childContextTypes,i!=null}function hu(){yt(Pn),yt(sn)}function Vy(i,s,c){if(sn.current!==_i)throw Error(n(168));pt(sn,s),pt(Pn,c)}function By(i,s,c){var m=i.stateNode;if(s=s.childContextTypes,typeof m.getChildContext!="function")return c;m=m.getChildContext();for(var x in m)if(!(x in s))throw Error(n(108,re(i)||"Unknown",x));return N({},c,m)}function pu(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||_i,po=sn.current,pt(sn,i),pt(Pn,Pn.current),!0}function Uy(i,s,c){var m=i.stateNode;if(!m)throw Error(n(169));c?(i=By(i,s,po),m.__reactInternalMemoizedMergedChildContext=i,yt(Pn),yt(sn),pt(sn,i)):yt(Pn),pt(Pn,c)}var Gr=null,mu=!1,Ef=!1;function Hy(i){Gr===null?Gr=[i]:Gr.push(i)}function AT(i){mu=!0,Hy(i)}function Ti(){if(!Ef&&Gr!==null){Ef=!0;var i=0,s=lt;try{var c=Gr;for(lt=1;i<c.length;i++){var m=c[i];do m=m(!0);while(m!==null)}Gr=null,mu=!1}catch(x){throw Gr!==null&&(Gr=Gr.slice(i+1)),Zg(Zd,Ti),x}finally{lt=s,Ef=!1}}return null}var ls=[],as=0,gu=null,yu=0,nr=[],rr=0,mo=null,Xr=1,Jr="";function go(i,s){ls[as++]=yu,ls[as++]=gu,gu=i,yu=s}function Wy(i,s,c){nr[rr++]=Xr,nr[rr++]=Jr,nr[rr++]=mo,mo=i;var m=Xr;i=Jr;var x=32-pr(m)-1;m&=~(1<<x),c+=1;var w=32-pr(s)+x;if(30<w){var T=x-x%5;w=(m&(1<<T)-1).toString(32),m>>=T,x-=T,Xr=1<<32-pr(s)+x|c<<x|m,Jr=w+i}else Xr=1<<w|c<<x|m,Jr=i}function _f(i){i.return!==null&&(go(i,1),Wy(i,1,0))}function Tf(i){for(;i===gu;)gu=ls[--as],ls[as]=null,yu=ls[--as],ls[as]=null;for(;i===mo;)mo=nr[--rr],nr[rr]=null,Jr=nr[--rr],nr[rr]=null,Xr=nr[--rr],nr[rr]=null}var Wn=null,Zn=null,xt=!1,gr=null;function Zy(i,s){var c=lr(5,null,null,0);c.elementType="DELETED",c.stateNode=s,c.return=i,s=i.deletions,s===null?(i.deletions=[c],i.flags|=16):s.push(c)}function qy(i,s){switch(i.tag){case 5:var c=i.type;return s=s.nodeType!==1||c.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,Wn=i,Zn=Ci(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Wn=i,Zn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(c=mo!==null?{id:Xr,overflow:Jr}:null,i.memoizedState={dehydrated:s,treeContext:c,retryLane:1073741824},c=lr(18,null,null,0),c.stateNode=s,c.return=i,i.child=c,Wn=i,Zn=null,!0):!1;default:return!1}}function Pf(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Nf(i){if(xt){var s=Zn;if(s){var c=s;if(!qy(i,s)){if(Pf(i))throw Error(n(418));s=Ci(c.nextSibling);var m=Wn;s&&qy(i,s)?Zy(m,c):(i.flags=i.flags&-4097|2,xt=!1,Wn=i)}}else{if(Pf(i))throw Error(n(418));i.flags=i.flags&-4097|2,xt=!1,Wn=i}}}function Qy(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Wn=i}function vu(i){if(i!==Wn)return!1;if(!xt)return Qy(i),xt=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!wf(i.type,i.memoizedProps)),s&&(s=Zn)){if(Pf(i))throw Yy(),Error(n(418));for(;s;)Zy(i,s),s=Ci(s.nextSibling)}if(Qy(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="/$"){if(s===0){Zn=Ci(i.nextSibling);break e}s--}else c!=="$"&&c!=="$!"&&c!=="$?"||s++}i=i.nextSibling}Zn=null}}else Zn=Wn?Ci(i.stateNode.nextSibling):null;return!0}function Yy(){for(var i=Zn;i;)i=Ci(i.nextSibling)}function us(){Zn=Wn=null,xt=!1}function Rf(i){gr===null?gr=[i]:gr.push(i)}var IT=R.ReactCurrentBatchConfig;function Al(i,s,c){if(i=c.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(c._owner){if(c=c._owner,c){if(c.tag!==1)throw Error(n(309));var m=c.stateNode}if(!m)throw Error(n(147,i));var x=m,w=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===w?s.ref:(s=function(T){var z=x.refs;T===null?delete z[w]:z[w]=T},s._stringRef=w,s)}if(typeof i!="string")throw Error(n(284));if(!c._owner)throw Error(n(290,i))}return i}function xu(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function Ky(i){var s=i._init;return s(i._payload)}function Gy(i){function s(X,W){if(i){var te=X.deletions;te===null?(X.deletions=[W],X.flags|=16):te.push(W)}}function c(X,W){if(!i)return null;for(;W!==null;)s(X,W),W=W.sibling;return null}function m(X,W){for(X=new Map;W!==null;)W.key!==null?X.set(W.key,W):X.set(W.index,W),W=W.sibling;return X}function x(X,W){return X=Di(X,W),X.index=0,X.sibling=null,X}function w(X,W,te){return X.index=te,i?(te=X.alternate,te!==null?(te=te.index,te<W?(X.flags|=2,W):te):(X.flags|=2,W)):(X.flags|=1048576,W)}function T(X){return i&&X.alternate===null&&(X.flags|=2),X}function z(X,W,te,ge){return W===null||W.tag!==6?(W=bh(te,X.mode,ge),W.return=X,W):(W=x(W,te),W.return=X,W)}function V(X,W,te,ge){var Oe=te.type;return Oe===H?fe(X,W,te.props.children,ge,te.key):W!==null&&(W.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===Z&&Ky(Oe)===W.type)?(ge=x(W,te.props),ge.ref=Al(X,W,te),ge.return=X,ge):(ge=Uu(te.type,te.key,te.props,null,X.mode,ge),ge.ref=Al(X,W,te),ge.return=X,ge)}function ie(X,W,te,ge){return W===null||W.tag!==4||W.stateNode.containerInfo!==te.containerInfo||W.stateNode.implementation!==te.implementation?(W=kh(te,X.mode,ge),W.return=X,W):(W=x(W,te.children||[]),W.return=X,W)}function fe(X,W,te,ge,Oe){return W===null||W.tag!==7?(W=Co(te,X.mode,ge,Oe),W.return=X,W):(W=x(W,te),W.return=X,W)}function he(X,W,te){if(typeof W=="string"&&W!==""||typeof W=="number")return W=bh(""+W,X.mode,te),W.return=X,W;if(typeof W=="object"&&W!==null){switch(W.$$typeof){case I:return te=Uu(W.type,W.key,W.props,null,X.mode,te),te.ref=Al(X,null,W),te.return=X,te;case A:return W=kh(W,X.mode,te),W.return=X,W;case Z:var ge=W._init;return he(X,ge(W._payload),te)}if(qt(W)||K(W))return W=Co(W,X.mode,te,null),W.return=X,W;xu(X,W)}return null}function de(X,W,te,ge){var Oe=W!==null?W.key:null;if(typeof te=="string"&&te!==""||typeof te=="number")return Oe!==null?null:z(X,W,""+te,ge);if(typeof te=="object"&&te!==null){switch(te.$$typeof){case I:return te.key===Oe?V(X,W,te,ge):null;case A:return te.key===Oe?ie(X,W,te,ge):null;case Z:return Oe=te._init,de(X,W,Oe(te._payload),ge)}if(qt(te)||K(te))return Oe!==null?null:fe(X,W,te,ge,null);xu(X,te)}return null}function Te(X,W,te,ge,Oe){if(typeof ge=="string"&&ge!==""||typeof ge=="number")return X=X.get(te)||null,z(W,X,""+ge,Oe);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case I:return X=X.get(ge.key===null?te:ge.key)||null,V(W,X,ge,Oe);case A:return X=X.get(ge.key===null?te:ge.key)||null,ie(W,X,ge,Oe);case Z:var Le=ge._init;return Te(X,W,te,Le(ge._payload),Oe)}if(qt(ge)||K(ge))return X=X.get(te)||null,fe(W,X,ge,Oe,null);xu(W,ge)}return null}function Ne(X,W,te,ge){for(var Oe=null,Le=null,Fe=W,He=W=0,Kt=null;Fe!==null&&He<te.length;He++){Fe.index>He?(Kt=Fe,Fe=null):Kt=Fe.sibling;var tt=de(X,Fe,te[He],ge);if(tt===null){Fe===null&&(Fe=Kt);break}i&&Fe&&tt.alternate===null&&s(X,Fe),W=w(tt,W,He),Le===null?Oe=tt:Le.sibling=tt,Le=tt,Fe=Kt}if(He===te.length)return c(X,Fe),xt&&go(X,He),Oe;if(Fe===null){for(;He<te.length;He++)Fe=he(X,te[He],ge),Fe!==null&&(W=w(Fe,W,He),Le===null?Oe=Fe:Le.sibling=Fe,Le=Fe);return xt&&go(X,He),Oe}for(Fe=m(X,Fe);He<te.length;He++)Kt=Te(Fe,X,He,te[He],ge),Kt!==null&&(i&&Kt.alternate!==null&&Fe.delete(Kt.key===null?He:Kt.key),W=w(Kt,W,He),Le===null?Oe=Kt:Le.sibling=Kt,Le=Kt);return i&&Fe.forEach(function(zi){return s(X,zi)}),xt&&go(X,He),Oe}function Ae(X,W,te,ge){var Oe=K(te);if(typeof Oe!="function")throw Error(n(150));if(te=Oe.call(te),te==null)throw Error(n(151));for(var Le=Oe=null,Fe=W,He=W=0,Kt=null,tt=te.next();Fe!==null&&!tt.done;He++,tt=te.next()){Fe.index>He?(Kt=Fe,Fe=null):Kt=Fe.sibling;var zi=de(X,Fe,tt.value,ge);if(zi===null){Fe===null&&(Fe=Kt);break}i&&Fe&&zi.alternate===null&&s(X,Fe),W=w(zi,W,He),Le===null?Oe=zi:Le.sibling=zi,Le=zi,Fe=Kt}if(tt.done)return c(X,Fe),xt&&go(X,He),Oe;if(Fe===null){for(;!tt.done;He++,tt=te.next())tt=he(X,tt.value,ge),tt!==null&&(W=w(tt,W,He),Le===null?Oe=tt:Le.sibling=tt,Le=tt);return xt&&go(X,He),Oe}for(Fe=m(X,Fe);!tt.done;He++,tt=te.next())tt=Te(Fe,X,He,tt.value,ge),tt!==null&&(i&&tt.alternate!==null&&Fe.delete(tt.key===null?He:tt.key),W=w(tt,W,He),Le===null?Oe=tt:Le.sibling=tt,Le=tt);return i&&Fe.forEach(function(fP){return s(X,fP)}),xt&&go(X,He),Oe}function At(X,W,te,ge){if(typeof te=="object"&&te!==null&&te.type===H&&te.key===null&&(te=te.props.children),typeof te=="object"&&te!==null){switch(te.$$typeof){case I:e:{for(var Oe=te.key,Le=W;Le!==null;){if(Le.key===Oe){if(Oe=te.type,Oe===H){if(Le.tag===7){c(X,Le.sibling),W=x(Le,te.props.children),W.return=X,X=W;break e}}else if(Le.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===Z&&Ky(Oe)===Le.type){c(X,Le.sibling),W=x(Le,te.props),W.ref=Al(X,Le,te),W.return=X,X=W;break e}c(X,Le);break}else s(X,Le);Le=Le.sibling}te.type===H?(W=Co(te.props.children,X.mode,ge,te.key),W.return=X,X=W):(ge=Uu(te.type,te.key,te.props,null,X.mode,ge),ge.ref=Al(X,W,te),ge.return=X,X=ge)}return T(X);case A:e:{for(Le=te.key;W!==null;){if(W.key===Le)if(W.tag===4&&W.stateNode.containerInfo===te.containerInfo&&W.stateNode.implementation===te.implementation){c(X,W.sibling),W=x(W,te.children||[]),W.return=X,X=W;break e}else{c(X,W);break}else s(X,W);W=W.sibling}W=kh(te,X.mode,ge),W.return=X,X=W}return T(X);case Z:return Le=te._init,At(X,W,Le(te._payload),ge)}if(qt(te))return Ne(X,W,te,ge);if(K(te))return Ae(X,W,te,ge);xu(X,te)}return typeof te=="string"&&te!==""||typeof te=="number"?(te=""+te,W!==null&&W.tag===6?(c(X,W.sibling),W=x(W,te),W.return=X,X=W):(c(X,W),W=bh(te,X.mode,ge),W.return=X,X=W),T(X)):c(X,W)}return At}var cs=Gy(!0),Xy=Gy(!1),wu=Ei(null),bu=null,ds=null,jf=null;function Af(){jf=ds=bu=null}function If(i){var s=wu.current;yt(wu),i._currentValue=s}function Of(i,s,c){for(;i!==null;){var m=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,m!==null&&(m.childLanes|=s)):m!==null&&(m.childLanes&s)!==s&&(m.childLanes|=s),i===c)break;i=i.return}}function fs(i,s){bu=i,jf=ds=null,i=i.dependencies,i!==null&&i.firstContext!==null&&(i.lanes&s&&(Rn=!0),i.firstContext=null)}function ir(i){var s=i._currentValue;if(jf!==i)if(i={context:i,memoizedValue:s,next:null},ds===null){if(bu===null)throw Error(n(308));ds=i,bu.dependencies={lanes:0,firstContext:i}}else ds=ds.next=i;return s}var yo=null;function Df(i){yo===null?yo=[i]:yo.push(i)}function Jy(i,s,c,m){var x=s.interleaved;return x===null?(c.next=c,Df(s)):(c.next=x.next,x.next=c),s.interleaved=c,ei(i,m)}function ei(i,s){i.lanes|=s;var c=i.alternate;for(c!==null&&(c.lanes|=s),c=i,i=i.return;i!==null;)i.childLanes|=s,c=i.alternate,c!==null&&(c.childLanes|=s),c=i,i=i.return;return c.tag===3?c.stateNode:null}var Pi=!1;function zf(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ev(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function ti(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function Ni(i,s,c){var m=i.updateQueue;if(m===null)return null;if(m=m.shared,et&2){var x=m.pending;return x===null?s.next=s:(s.next=x.next,x.next=s),m.pending=s,ei(i,c)}return x=m.interleaved,x===null?(s.next=s,Df(m)):(s.next=x.next,x.next=s),m.interleaved=s,ei(i,c)}function ku(i,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194240)!==0)){var m=s.lanes;m&=i.pendingLanes,c|=m,s.lanes=c,Yd(i,c)}}function tv(i,s){var c=i.updateQueue,m=i.alternate;if(m!==null&&(m=m.updateQueue,c===m)){var x=null,w=null;if(c=c.firstBaseUpdate,c!==null){do{var T={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};w===null?x=w=T:w=w.next=T,c=c.next}while(c!==null);w===null?x=w=s:w=w.next=s}else x=w=s;c={baseState:m.baseState,firstBaseUpdate:x,lastBaseUpdate:w,shared:m.shared,effects:m.effects},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=s:i.next=s,c.lastBaseUpdate=s}function Su(i,s,c,m){var x=i.updateQueue;Pi=!1;var w=x.firstBaseUpdate,T=x.lastBaseUpdate,z=x.shared.pending;if(z!==null){x.shared.pending=null;var V=z,ie=V.next;V.next=null,T===null?w=ie:T.next=ie,T=V;var fe=i.alternate;fe!==null&&(fe=fe.updateQueue,z=fe.lastBaseUpdate,z!==T&&(z===null?fe.firstBaseUpdate=ie:z.next=ie,fe.lastBaseUpdate=V))}if(w!==null){var he=x.baseState;T=0,fe=ie=V=null,z=w;do{var de=z.lane,Te=z.eventTime;if((m&de)===de){fe!==null&&(fe=fe.next={eventTime:Te,lane:0,tag:z.tag,payload:z.payload,callback:z.callback,next:null});e:{var Ne=i,Ae=z;switch(de=s,Te=c,Ae.tag){case 1:if(Ne=Ae.payload,typeof Ne=="function"){he=Ne.call(Te,he,de);break e}he=Ne;break e;case 3:Ne.flags=Ne.flags&-65537|128;case 0:if(Ne=Ae.payload,de=typeof Ne=="function"?Ne.call(Te,he,de):Ne,de==null)break e;he=N({},he,de);break e;case 2:Pi=!0}}z.callback!==null&&z.lane!==0&&(i.flags|=64,de=x.effects,de===null?x.effects=[z]:de.push(z))}else Te={eventTime:Te,lane:de,tag:z.tag,payload:z.payload,callback:z.callback,next:null},fe===null?(ie=fe=Te,V=he):fe=fe.next=Te,T|=de;if(z=z.next,z===null){if(z=x.shared.pending,z===null)break;de=z,z=de.next,de.next=null,x.lastBaseUpdate=de,x.shared.pending=null}}while(!0);if(fe===null&&(V=he),x.baseState=V,x.firstBaseUpdate=ie,x.lastBaseUpdate=fe,s=x.shared.interleaved,s!==null){x=s;do T|=x.lane,x=x.next;while(x!==s)}else w===null&&(x.shared.lanes=0);wo|=T,i.lanes=T,i.memoizedState=he}}function nv(i,s,c){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var m=i[s],x=m.callback;if(x!==null){if(m.callback=null,m=c,typeof x!="function")throw Error(n(191,x));x.call(m)}}}var Il={},Or=Ei(Il),Ol=Ei(Il),Dl=Ei(Il);function vo(i){if(i===Il)throw Error(n(174));return i}function Mf(i,s){switch(pt(Dl,s),pt(Ol,i),pt(Or,Il),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:se(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=se(s,i)}yt(Or),pt(Or,s)}function hs(){yt(Or),yt(Ol),yt(Dl)}function rv(i){vo(Dl.current);var s=vo(Or.current),c=se(s,i.type);s!==c&&(pt(Ol,i),pt(Or,c))}function Lf(i){Ol.current===i&&(yt(Or),yt(Ol))}var St=Ei(0);function Cu(i){for(var s=i;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if(s.flags&128)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Ff=[];function $f(){for(var i=0;i<Ff.length;i++)Ff[i]._workInProgressVersionPrimary=null;Ff.length=0}var Eu=R.ReactCurrentDispatcher,Vf=R.ReactCurrentBatchConfig,xo=0,Ct=null,Bt=null,Qt=null,_u=!1,zl=!1,Ml=0,OT=0;function ln(){throw Error(n(321))}function Bf(i,s){if(s===null)return!1;for(var c=0;c<s.length&&c<i.length;c++)if(!mr(i[c],s[c]))return!1;return!0}function Uf(i,s,c,m,x,w){if(xo=w,Ct=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Eu.current=i===null||i.memoizedState===null?LT:FT,i=c(m,x),zl){w=0;do{if(zl=!1,Ml=0,25<=w)throw Error(n(301));w+=1,Qt=Bt=null,s.updateQueue=null,Eu.current=$T,i=c(m,x)}while(zl)}if(Eu.current=Nu,s=Bt!==null&&Bt.next!==null,xo=0,Qt=Bt=Ct=null,_u=!1,s)throw Error(n(300));return i}function Hf(){var i=Ml!==0;return Ml=0,i}function Dr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qt===null?Ct.memoizedState=Qt=i:Qt=Qt.next=i,Qt}function or(){if(Bt===null){var i=Ct.alternate;i=i!==null?i.memoizedState:null}else i=Bt.next;var s=Qt===null?Ct.memoizedState:Qt.next;if(s!==null)Qt=s,Bt=i;else{if(i===null)throw Error(n(310));Bt=i,i={memoizedState:Bt.memoizedState,baseState:Bt.baseState,baseQueue:Bt.baseQueue,queue:Bt.queue,next:null},Qt===null?Ct.memoizedState=Qt=i:Qt=Qt.next=i}return Qt}function Ll(i,s){return typeof s=="function"?s(i):s}function Wf(i){var s=or(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var m=Bt,x=m.baseQueue,w=c.pending;if(w!==null){if(x!==null){var T=x.next;x.next=w.next,w.next=T}m.baseQueue=x=w,c.pending=null}if(x!==null){w=x.next,m=m.baseState;var z=T=null,V=null,ie=w;do{var fe=ie.lane;if((xo&fe)===fe)V!==null&&(V=V.next={lane:0,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null}),m=ie.hasEagerState?ie.eagerState:i(m,ie.action);else{var he={lane:fe,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null};V===null?(z=V=he,T=m):V=V.next=he,Ct.lanes|=fe,wo|=fe}ie=ie.next}while(ie!==null&&ie!==w);V===null?T=m:V.next=z,mr(m,s.memoizedState)||(Rn=!0),s.memoizedState=m,s.baseState=T,s.baseQueue=V,c.lastRenderedState=m}if(i=c.interleaved,i!==null){x=i;do w=x.lane,Ct.lanes|=w,wo|=w,x=x.next;while(x!==i)}else x===null&&(c.lanes=0);return[s.memoizedState,c.dispatch]}function Zf(i){var s=or(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var m=c.dispatch,x=c.pending,w=s.memoizedState;if(x!==null){c.pending=null;var T=x=x.next;do w=i(w,T.action),T=T.next;while(T!==x);mr(w,s.memoizedState)||(Rn=!0),s.memoizedState=w,s.baseQueue===null&&(s.baseState=w),c.lastRenderedState=w}return[w,m]}function iv(){}function ov(i,s){var c=Ct,m=or(),x=s(),w=!mr(m.memoizedState,x);if(w&&(m.memoizedState=x,Rn=!0),m=m.queue,qf(av.bind(null,c,m,i),[i]),m.getSnapshot!==s||w||Qt!==null&&Qt.memoizedState.tag&1){if(c.flags|=2048,Fl(9,lv.bind(null,c,m,x,s),void 0,null),Yt===null)throw Error(n(349));xo&30||sv(c,s,x)}return x}function sv(i,s,c){i.flags|=16384,i={getSnapshot:s,value:c},s=Ct.updateQueue,s===null?(s={lastEffect:null,stores:null},Ct.updateQueue=s,s.stores=[i]):(c=s.stores,c===null?s.stores=[i]:c.push(i))}function lv(i,s,c,m){s.value=c,s.getSnapshot=m,uv(s)&&cv(i)}function av(i,s,c){return c(function(){uv(s)&&cv(i)})}function uv(i){var s=i.getSnapshot;i=i.value;try{var c=s();return!mr(i,c)}catch{return!0}}function cv(i){var s=ei(i,1);s!==null&&wr(s,i,1,-1)}function dv(i){var s=Dr();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ll,lastRenderedState:i},s.queue=i,i=i.dispatch=MT.bind(null,Ct,i),[s.memoizedState,i]}function Fl(i,s,c,m){return i={tag:i,create:s,destroy:c,deps:m,next:null},s=Ct.updateQueue,s===null?(s={lastEffect:null,stores:null},Ct.updateQueue=s,s.lastEffect=i.next=i):(c=s.lastEffect,c===null?s.lastEffect=i.next=i:(m=c.next,c.next=i,i.next=m,s.lastEffect=i)),i}function fv(){return or().memoizedState}function Tu(i,s,c,m){var x=Dr();Ct.flags|=i,x.memoizedState=Fl(1|s,c,void 0,m===void 0?null:m)}function Pu(i,s,c,m){var x=or();m=m===void 0?null:m;var w=void 0;if(Bt!==null){var T=Bt.memoizedState;if(w=T.destroy,m!==null&&Bf(m,T.deps)){x.memoizedState=Fl(s,c,w,m);return}}Ct.flags|=i,x.memoizedState=Fl(1|s,c,w,m)}function hv(i,s){return Tu(8390656,8,i,s)}function qf(i,s){return Pu(2048,8,i,s)}function pv(i,s){return Pu(4,2,i,s)}function mv(i,s){return Pu(4,4,i,s)}function gv(i,s){if(typeof s=="function")return i=i(),s(i),function(){s(null)};if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function yv(i,s,c){return c=c!=null?c.concat([i]):null,Pu(4,4,gv.bind(null,s,i),c)}function Qf(){}function vv(i,s){var c=or();s=s===void 0?null:s;var m=c.memoizedState;return m!==null&&s!==null&&Bf(s,m[1])?m[0]:(c.memoizedState=[i,s],i)}function xv(i,s){var c=or();s=s===void 0?null:s;var m=c.memoizedState;return m!==null&&s!==null&&Bf(s,m[1])?m[0]:(i=i(),c.memoizedState=[i,s],i)}function wv(i,s,c){return xo&21?(mr(c,s)||(c=Kg(),Ct.lanes|=c,wo|=c,i.baseState=!0),s):(i.baseState&&(i.baseState=!1,Rn=!0),i.memoizedState=c)}function DT(i,s){var c=lt;lt=c!==0&&4>c?c:4,i(!0);var m=Vf.transition;Vf.transition={};try{i(!1),s()}finally{lt=c,Vf.transition=m}}function bv(){return or().memoizedState}function zT(i,s,c){var m=Ii(i);if(c={lane:m,action:c,hasEagerState:!1,eagerState:null,next:null},kv(i))Sv(s,c);else if(c=Jy(i,s,c,m),c!==null){var x=gn();wr(c,i,m,x),Cv(c,s,m)}}function MT(i,s,c){var m=Ii(i),x={lane:m,action:c,hasEagerState:!1,eagerState:null,next:null};if(kv(i))Sv(s,x);else{var w=i.alternate;if(i.lanes===0&&(w===null||w.lanes===0)&&(w=s.lastRenderedReducer,w!==null))try{var T=s.lastRenderedState,z=w(T,c);if(x.hasEagerState=!0,x.eagerState=z,mr(z,T)){var V=s.interleaved;V===null?(x.next=x,Df(s)):(x.next=V.next,V.next=x),s.interleaved=x;return}}catch{}finally{}c=Jy(i,s,x,m),c!==null&&(x=gn(),wr(c,i,m,x),Cv(c,s,m))}}function kv(i){var s=i.alternate;return i===Ct||s!==null&&s===Ct}function Sv(i,s){zl=_u=!0;var c=i.pending;c===null?s.next=s:(s.next=c.next,c.next=s),i.pending=s}function Cv(i,s,c){if(c&4194240){var m=s.lanes;m&=i.pendingLanes,c|=m,s.lanes=c,Yd(i,c)}}var Nu={readContext:ir,useCallback:ln,useContext:ln,useEffect:ln,useImperativeHandle:ln,useInsertionEffect:ln,useLayoutEffect:ln,useMemo:ln,useReducer:ln,useRef:ln,useState:ln,useDebugValue:ln,useDeferredValue:ln,useTransition:ln,useMutableSource:ln,useSyncExternalStore:ln,useId:ln,unstable_isNewReconciler:!1},LT={readContext:ir,useCallback:function(i,s){return Dr().memoizedState=[i,s===void 0?null:s],i},useContext:ir,useEffect:hv,useImperativeHandle:function(i,s,c){return c=c!=null?c.concat([i]):null,Tu(4194308,4,gv.bind(null,s,i),c)},useLayoutEffect:function(i,s){return Tu(4194308,4,i,s)},useInsertionEffect:function(i,s){return Tu(4,2,i,s)},useMemo:function(i,s){var c=Dr();return s=s===void 0?null:s,i=i(),c.memoizedState=[i,s],i},useReducer:function(i,s,c){var m=Dr();return s=c!==void 0?c(s):s,m.memoizedState=m.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},m.queue=i,i=i.dispatch=zT.bind(null,Ct,i),[m.memoizedState,i]},useRef:function(i){var s=Dr();return i={current:i},s.memoizedState=i},useState:dv,useDebugValue:Qf,useDeferredValue:function(i){return Dr().memoizedState=i},useTransition:function(){var i=dv(!1),s=i[0];return i=DT.bind(null,i[1]),Dr().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,c){var m=Ct,x=Dr();if(xt){if(c===void 0)throw Error(n(407));c=c()}else{if(c=s(),Yt===null)throw Error(n(349));xo&30||sv(m,s,c)}x.memoizedState=c;var w={value:c,getSnapshot:s};return x.queue=w,hv(av.bind(null,m,w,i),[i]),m.flags|=2048,Fl(9,lv.bind(null,m,w,c,s),void 0,null),c},useId:function(){var i=Dr(),s=Yt.identifierPrefix;if(xt){var c=Jr,m=Xr;c=(m&~(1<<32-pr(m)-1)).toString(32)+c,s=":"+s+"R"+c,c=Ml++,0<c&&(s+="H"+c.toString(32)),s+=":"}else c=OT++,s=":"+s+"r"+c.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},FT={readContext:ir,useCallback:vv,useContext:ir,useEffect:qf,useImperativeHandle:yv,useInsertionEffect:pv,useLayoutEffect:mv,useMemo:xv,useReducer:Wf,useRef:fv,useState:function(){return Wf(Ll)},useDebugValue:Qf,useDeferredValue:function(i){var s=or();return wv(s,Bt.memoizedState,i)},useTransition:function(){var i=Wf(Ll)[0],s=or().memoizedState;return[i,s]},useMutableSource:iv,useSyncExternalStore:ov,useId:bv,unstable_isNewReconciler:!1},$T={readContext:ir,useCallback:vv,useContext:ir,useEffect:qf,useImperativeHandle:yv,useInsertionEffect:pv,useLayoutEffect:mv,useMemo:xv,useReducer:Zf,useRef:fv,useState:function(){return Zf(Ll)},useDebugValue:Qf,useDeferredValue:function(i){var s=or();return Bt===null?s.memoizedState=i:wv(s,Bt.memoizedState,i)},useTransition:function(){var i=Zf(Ll)[0],s=or().memoizedState;return[i,s]},useMutableSource:iv,useSyncExternalStore:ov,useId:bv,unstable_isNewReconciler:!1};function yr(i,s){if(i&&i.defaultProps){s=N({},s),i=i.defaultProps;for(var c in i)s[c]===void 0&&(s[c]=i[c]);return s}return s}function Yf(i,s,c,m){s=i.memoizedState,c=c(m,s),c=c==null?s:N({},s,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var Ru={isMounted:function(i){return(i=i._reactInternals)?fo(i)===i:!1},enqueueSetState:function(i,s,c){i=i._reactInternals;var m=gn(),x=Ii(i),w=ti(m,x);w.payload=s,c!=null&&(w.callback=c),s=Ni(i,w,x),s!==null&&(wr(s,i,x,m),ku(s,i,x))},enqueueReplaceState:function(i,s,c){i=i._reactInternals;var m=gn(),x=Ii(i),w=ti(m,x);w.tag=1,w.payload=s,c!=null&&(w.callback=c),s=Ni(i,w,x),s!==null&&(wr(s,i,x,m),ku(s,i,x))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var c=gn(),m=Ii(i),x=ti(c,m);x.tag=2,s!=null&&(x.callback=s),s=Ni(i,x,m),s!==null&&(wr(s,i,m,c),ku(s,i,m))}};function Ev(i,s,c,m,x,w,T){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(m,w,T):s.prototype&&s.prototype.isPureReactComponent?!El(c,m)||!El(x,w):!0}function _v(i,s,c){var m=!1,x=_i,w=s.contextType;return typeof w=="object"&&w!==null?w=ir(w):(x=Nn(s)?po:sn.current,m=s.contextTypes,w=(m=m!=null)?ss(i,x):_i),s=new s(c,w),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Ru,i.stateNode=s,s._reactInternals=i,m&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=x,i.__reactInternalMemoizedMaskedChildContext=w),s}function Tv(i,s,c,m){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,m),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,m),s.state!==i&&Ru.enqueueReplaceState(s,s.state,null)}function Kf(i,s,c,m){var x=i.stateNode;x.props=c,x.state=i.memoizedState,x.refs={},zf(i);var w=s.contextType;typeof w=="object"&&w!==null?x.context=ir(w):(w=Nn(s)?po:sn.current,x.context=ss(i,w)),x.state=i.memoizedState,w=s.getDerivedStateFromProps,typeof w=="function"&&(Yf(i,s,w,c),x.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(s=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),s!==x.state&&Ru.enqueueReplaceState(x,x.state,null),Su(i,c,x,m),x.state=i.memoizedState),typeof x.componentDidMount=="function"&&(i.flags|=4194308)}function ps(i,s){try{var c="",m=s;do c+=ve(m),m=m.return;while(m);var x=c}catch(w){x=`
|
|
39
|
+
Error generating stack: `+w.message+`
|
|
40
|
+
`+w.stack}return{value:i,source:s,stack:x,digest:null}}function Gf(i,s,c){return{value:i,source:null,stack:c??null,digest:s??null}}function Xf(i,s){try{console.error(s.value)}catch(c){setTimeout(function(){throw c})}}var VT=typeof WeakMap=="function"?WeakMap:Map;function Pv(i,s,c){c=ti(-1,c),c.tag=3,c.payload={element:null};var m=s.value;return c.callback=function(){Mu||(Mu=!0,hh=m),Xf(i,s)},c}function Nv(i,s,c){c=ti(-1,c),c.tag=3;var m=i.type.getDerivedStateFromError;if(typeof m=="function"){var x=s.value;c.payload=function(){return m(x)},c.callback=function(){Xf(i,s)}}var w=i.stateNode;return w!==null&&typeof w.componentDidCatch=="function"&&(c.callback=function(){Xf(i,s),typeof m!="function"&&(ji===null?ji=new Set([this]):ji.add(this));var T=s.stack;this.componentDidCatch(s.value,{componentStack:T!==null?T:""})}),c}function Rv(i,s,c){var m=i.pingCache;if(m===null){m=i.pingCache=new VT;var x=new Set;m.set(s,x)}else x=m.get(s),x===void 0&&(x=new Set,m.set(s,x));x.has(c)||(x.add(c),i=tP.bind(null,i,s,c),s.then(i,i))}function jv(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function Av(i,s,c,m,x){return i.mode&1?(i.flags|=65536,i.lanes=x,i):(i===s?i.flags|=65536:(i.flags|=128,c.flags|=131072,c.flags&=-52805,c.tag===1&&(c.alternate===null?c.tag=17:(s=ti(-1,1),s.tag=2,Ni(c,s,1))),c.lanes|=1),i)}var BT=R.ReactCurrentOwner,Rn=!1;function mn(i,s,c,m){s.child=i===null?Xy(s,null,c,m):cs(s,i.child,c,m)}function Iv(i,s,c,m,x){c=c.render;var w=s.ref;return fs(s,x),m=Uf(i,s,c,m,w,x),c=Hf(),i!==null&&!Rn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~x,ni(i,s,x)):(xt&&c&&_f(s),s.flags|=1,mn(i,s,m,x),s.child)}function Ov(i,s,c,m,x){if(i===null){var w=c.type;return typeof w=="function"&&!wh(w)&&w.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(s.tag=15,s.type=w,Dv(i,s,w,m,x)):(i=Uu(c.type,null,m,s,s.mode,x),i.ref=s.ref,i.return=s,s.child=i)}if(w=i.child,!(i.lanes&x)){var T=w.memoizedProps;if(c=c.compare,c=c!==null?c:El,c(T,m)&&i.ref===s.ref)return ni(i,s,x)}return s.flags|=1,i=Di(w,m),i.ref=s.ref,i.return=s,s.child=i}function Dv(i,s,c,m,x){if(i!==null){var w=i.memoizedProps;if(El(w,m)&&i.ref===s.ref)if(Rn=!1,s.pendingProps=m=w,(i.lanes&x)!==0)i.flags&131072&&(Rn=!0);else return s.lanes=i.lanes,ni(i,s,x)}return Jf(i,s,c,m,x)}function zv(i,s,c){var m=s.pendingProps,x=m.children,w=i!==null?i.memoizedState:null;if(m.mode==="hidden")if(!(s.mode&1))s.memoizedState={baseLanes:0,cachePool:null,transitions:null},pt(gs,qn),qn|=c;else{if(!(c&1073741824))return i=w!==null?w.baseLanes|c:c,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,pt(gs,qn),qn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},m=w!==null?w.baseLanes:c,pt(gs,qn),qn|=m}else w!==null?(m=w.baseLanes|c,s.memoizedState=null):m=c,pt(gs,qn),qn|=m;return mn(i,s,x,c),s.child}function Mv(i,s){var c=s.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(s.flags|=512,s.flags|=2097152)}function Jf(i,s,c,m,x){var w=Nn(c)?po:sn.current;return w=ss(s,w),fs(s,x),c=Uf(i,s,c,m,w,x),m=Hf(),i!==null&&!Rn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~x,ni(i,s,x)):(xt&&m&&_f(s),s.flags|=1,mn(i,s,c,x),s.child)}function Lv(i,s,c,m,x){if(Nn(c)){var w=!0;pu(s)}else w=!1;if(fs(s,x),s.stateNode===null)Au(i,s),_v(s,c,m),Kf(s,c,m,x),m=!0;else if(i===null){var T=s.stateNode,z=s.memoizedProps;T.props=z;var V=T.context,ie=c.contextType;typeof ie=="object"&&ie!==null?ie=ir(ie):(ie=Nn(c)?po:sn.current,ie=ss(s,ie));var fe=c.getDerivedStateFromProps,he=typeof fe=="function"||typeof T.getSnapshotBeforeUpdate=="function";he||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(z!==m||V!==ie)&&Tv(s,T,m,ie),Pi=!1;var de=s.memoizedState;T.state=de,Su(s,m,T,x),V=s.memoizedState,z!==m||de!==V||Pn.current||Pi?(typeof fe=="function"&&(Yf(s,c,fe,m),V=s.memoizedState),(z=Pi||Ev(s,c,z,m,de,V,ie))?(he||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount()),typeof T.componentDidMount=="function"&&(s.flags|=4194308)):(typeof T.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=m,s.memoizedState=V),T.props=m,T.state=V,T.context=ie,m=z):(typeof T.componentDidMount=="function"&&(s.flags|=4194308),m=!1)}else{T=s.stateNode,ev(i,s),z=s.memoizedProps,ie=s.type===s.elementType?z:yr(s.type,z),T.props=ie,he=s.pendingProps,de=T.context,V=c.contextType,typeof V=="object"&&V!==null?V=ir(V):(V=Nn(c)?po:sn.current,V=ss(s,V));var Te=c.getDerivedStateFromProps;(fe=typeof Te=="function"||typeof T.getSnapshotBeforeUpdate=="function")||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(z!==he||de!==V)&&Tv(s,T,m,V),Pi=!1,de=s.memoizedState,T.state=de,Su(s,m,T,x);var Ne=s.memoizedState;z!==he||de!==Ne||Pn.current||Pi?(typeof Te=="function"&&(Yf(s,c,Te,m),Ne=s.memoizedState),(ie=Pi||Ev(s,c,ie,m,de,Ne,V)||!1)?(fe||typeof T.UNSAFE_componentWillUpdate!="function"&&typeof T.componentWillUpdate!="function"||(typeof T.componentWillUpdate=="function"&&T.componentWillUpdate(m,Ne,V),typeof T.UNSAFE_componentWillUpdate=="function"&&T.UNSAFE_componentWillUpdate(m,Ne,V)),typeof T.componentDidUpdate=="function"&&(s.flags|=4),typeof T.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof T.componentDidUpdate!="function"||z===i.memoizedProps&&de===i.memoizedState||(s.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||z===i.memoizedProps&&de===i.memoizedState||(s.flags|=1024),s.memoizedProps=m,s.memoizedState=Ne),T.props=m,T.state=Ne,T.context=V,m=ie):(typeof T.componentDidUpdate!="function"||z===i.memoizedProps&&de===i.memoizedState||(s.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||z===i.memoizedProps&&de===i.memoizedState||(s.flags|=1024),m=!1)}return eh(i,s,c,m,w,x)}function eh(i,s,c,m,x,w){Mv(i,s);var T=(s.flags&128)!==0;if(!m&&!T)return x&&Uy(s,c,!1),ni(i,s,w);m=s.stateNode,BT.current=s;var z=T&&typeof c.getDerivedStateFromError!="function"?null:m.render();return s.flags|=1,i!==null&&T?(s.child=cs(s,i.child,null,w),s.child=cs(s,null,z,w)):mn(i,s,z,w),s.memoizedState=m.state,x&&Uy(s,c,!0),s.child}function Fv(i){var s=i.stateNode;s.pendingContext?Vy(i,s.pendingContext,s.pendingContext!==s.context):s.context&&Vy(i,s.context,!1),Mf(i,s.containerInfo)}function $v(i,s,c,m,x){return us(),Rf(x),s.flags|=256,mn(i,s,c,m),s.child}var th={dehydrated:null,treeContext:null,retryLane:0};function nh(i){return{baseLanes:i,cachePool:null,transitions:null}}function Vv(i,s,c){var m=s.pendingProps,x=St.current,w=!1,T=(s.flags&128)!==0,z;if((z=T)||(z=i!==null&&i.memoizedState===null?!1:(x&2)!==0),z?(w=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(x|=1),pt(St,x&1),i===null)return Nf(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?(s.mode&1?i.data==="$!"?s.lanes=8:s.lanes=1073741824:s.lanes=1,null):(T=m.children,i=m.fallback,w?(m=s.mode,w=s.child,T={mode:"hidden",children:T},!(m&1)&&w!==null?(w.childLanes=0,w.pendingProps=T):w=Hu(T,m,0,null),i=Co(i,m,c,null),w.return=s,i.return=s,w.sibling=i,s.child=w,s.child.memoizedState=nh(c),s.memoizedState=th,i):rh(s,T));if(x=i.memoizedState,x!==null&&(z=x.dehydrated,z!==null))return UT(i,s,T,m,z,x,c);if(w){w=m.fallback,T=s.mode,x=i.child,z=x.sibling;var V={mode:"hidden",children:m.children};return!(T&1)&&s.child!==x?(m=s.child,m.childLanes=0,m.pendingProps=V,s.deletions=null):(m=Di(x,V),m.subtreeFlags=x.subtreeFlags&14680064),z!==null?w=Di(z,w):(w=Co(w,T,c,null),w.flags|=2),w.return=s,m.return=s,m.sibling=w,s.child=m,m=w,w=s.child,T=i.child.memoizedState,T=T===null?nh(c):{baseLanes:T.baseLanes|c,cachePool:null,transitions:T.transitions},w.memoizedState=T,w.childLanes=i.childLanes&~c,s.memoizedState=th,m}return w=i.child,i=w.sibling,m=Di(w,{mode:"visible",children:m.children}),!(s.mode&1)&&(m.lanes=c),m.return=s,m.sibling=null,i!==null&&(c=s.deletions,c===null?(s.deletions=[i],s.flags|=16):c.push(i)),s.child=m,s.memoizedState=null,m}function rh(i,s){return s=Hu({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function ju(i,s,c,m){return m!==null&&Rf(m),cs(s,i.child,null,c),i=rh(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function UT(i,s,c,m,x,w,T){if(c)return s.flags&256?(s.flags&=-257,m=Gf(Error(n(422))),ju(i,s,T,m)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(w=m.fallback,x=s.mode,m=Hu({mode:"visible",children:m.children},x,0,null),w=Co(w,x,T,null),w.flags|=2,m.return=s,w.return=s,m.sibling=w,s.child=m,s.mode&1&&cs(s,i.child,null,T),s.child.memoizedState=nh(T),s.memoizedState=th,w);if(!(s.mode&1))return ju(i,s,T,null);if(x.data==="$!"){if(m=x.nextSibling&&x.nextSibling.dataset,m)var z=m.dgst;return m=z,w=Error(n(419)),m=Gf(w,m,void 0),ju(i,s,T,m)}if(z=(T&i.childLanes)!==0,Rn||z){if(m=Yt,m!==null){switch(T&-T){case 4:x=2;break;case 16:x=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:x=32;break;case 536870912:x=268435456;break;default:x=0}x=x&(m.suspendedLanes|T)?0:x,x!==0&&x!==w.retryLane&&(w.retryLane=x,ei(i,x),wr(m,i,x,-1))}return xh(),m=Gf(Error(n(421))),ju(i,s,T,m)}return x.data==="$?"?(s.flags|=128,s.child=i.child,s=nP.bind(null,i),x._reactRetry=s,null):(i=w.treeContext,Zn=Ci(x.nextSibling),Wn=s,xt=!0,gr=null,i!==null&&(nr[rr++]=Xr,nr[rr++]=Jr,nr[rr++]=mo,Xr=i.id,Jr=i.overflow,mo=s),s=rh(s,m.children),s.flags|=4096,s)}function Bv(i,s,c){i.lanes|=s;var m=i.alternate;m!==null&&(m.lanes|=s),Of(i.return,s,c)}function ih(i,s,c,m,x){var w=i.memoizedState;w===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:m,tail:c,tailMode:x}:(w.isBackwards=s,w.rendering=null,w.renderingStartTime=0,w.last=m,w.tail=c,w.tailMode=x)}function Uv(i,s,c){var m=s.pendingProps,x=m.revealOrder,w=m.tail;if(mn(i,s,m.children,c),m=St.current,m&2)m=m&1|2,s.flags|=128;else{if(i!==null&&i.flags&128)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&Bv(i,c,s);else if(i.tag===19)Bv(i,c,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}m&=1}if(pt(St,m),!(s.mode&1))s.memoizedState=null;else switch(x){case"forwards":for(c=s.child,x=null;c!==null;)i=c.alternate,i!==null&&Cu(i)===null&&(x=c),c=c.sibling;c=x,c===null?(x=s.child,s.child=null):(x=c.sibling,c.sibling=null),ih(s,!1,x,c,w);break;case"backwards":for(c=null,x=s.child,s.child=null;x!==null;){if(i=x.alternate,i!==null&&Cu(i)===null){s.child=x;break}i=x.sibling,x.sibling=c,c=x,x=i}ih(s,!0,c,null,w);break;case"together":ih(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function Au(i,s){!(s.mode&1)&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function ni(i,s,c){if(i!==null&&(s.dependencies=i.dependencies),wo|=s.lanes,!(c&s.childLanes))return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,c=Di(i,i.pendingProps),s.child=c,c.return=s;i.sibling!==null;)i=i.sibling,c=c.sibling=Di(i,i.pendingProps),c.return=s;c.sibling=null}return s.child}function HT(i,s,c){switch(s.tag){case 3:Fv(s),us();break;case 5:rv(s);break;case 1:Nn(s.type)&&pu(s);break;case 4:Mf(s,s.stateNode.containerInfo);break;case 10:var m=s.type._context,x=s.memoizedProps.value;pt(wu,m._currentValue),m._currentValue=x;break;case 13:if(m=s.memoizedState,m!==null)return m.dehydrated!==null?(pt(St,St.current&1),s.flags|=128,null):c&s.child.childLanes?Vv(i,s,c):(pt(St,St.current&1),i=ni(i,s,c),i!==null?i.sibling:null);pt(St,St.current&1);break;case 19:if(m=(c&s.childLanes)!==0,i.flags&128){if(m)return Uv(i,s,c);s.flags|=128}if(x=s.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),pt(St,St.current),m)break;return null;case 22:case 23:return s.lanes=0,zv(i,s,c)}return ni(i,s,c)}var Hv,oh,Wv,Zv;Hv=function(i,s){for(var c=s.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return;c=c.return}c.sibling.return=c.return,c=c.sibling}},oh=function(){},Wv=function(i,s,c,m){var x=i.memoizedProps;if(x!==m){i=s.stateNode,vo(Or.current);var w=null;switch(c){case"input":x=It(i,x),m=It(i,m),w=[];break;case"select":x=N({},x,{value:void 0}),m=N({},m,{value:void 0}),w=[];break;case"textarea":x=ee(i,x),m=ee(i,m),w=[];break;default:typeof x.onClick!="function"&&typeof m.onClick=="function"&&(i.onclick=du)}Tt(c,m);var T;c=null;for(ie in x)if(!m.hasOwnProperty(ie)&&x.hasOwnProperty(ie)&&x[ie]!=null)if(ie==="style"){var z=x[ie];for(T in z)z.hasOwnProperty(T)&&(c||(c={}),c[T]="")}else ie!=="dangerouslySetInnerHTML"&&ie!=="children"&&ie!=="suppressContentEditableWarning"&&ie!=="suppressHydrationWarning"&&ie!=="autoFocus"&&(o.hasOwnProperty(ie)?w||(w=[]):(w=w||[]).push(ie,null));for(ie in m){var V=m[ie];if(z=x!=null?x[ie]:void 0,m.hasOwnProperty(ie)&&V!==z&&(V!=null||z!=null))if(ie==="style")if(z){for(T in z)!z.hasOwnProperty(T)||V&&V.hasOwnProperty(T)||(c||(c={}),c[T]="");for(T in V)V.hasOwnProperty(T)&&z[T]!==V[T]&&(c||(c={}),c[T]=V[T])}else c||(w||(w=[]),w.push(ie,c)),c=V;else ie==="dangerouslySetInnerHTML"?(V=V?V.__html:void 0,z=z?z.__html:void 0,V!=null&&z!==V&&(w=w||[]).push(ie,V)):ie==="children"?typeof V!="string"&&typeof V!="number"||(w=w||[]).push(ie,""+V):ie!=="suppressContentEditableWarning"&&ie!=="suppressHydrationWarning"&&(o.hasOwnProperty(ie)?(V!=null&&ie==="onScroll"&>("scroll",i),w||z===V||(w=[])):(w=w||[]).push(ie,V))}c&&(w=w||[]).push("style",c);var ie=w;(s.updateQueue=ie)&&(s.flags|=4)}},Zv=function(i,s,c,m){c!==m&&(s.flags|=4)};function $l(i,s){if(!xt)switch(i.tailMode){case"hidden":s=i.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var m=null;c!==null;)c.alternate!==null&&(m=c),c=c.sibling;m===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:m.sibling=null}}function an(i){var s=i.alternate!==null&&i.alternate.child===i.child,c=0,m=0;if(s)for(var x=i.child;x!==null;)c|=x.lanes|x.childLanes,m|=x.subtreeFlags&14680064,m|=x.flags&14680064,x.return=i,x=x.sibling;else for(x=i.child;x!==null;)c|=x.lanes|x.childLanes,m|=x.subtreeFlags,m|=x.flags,x.return=i,x=x.sibling;return i.subtreeFlags|=m,i.childLanes=c,s}function WT(i,s,c){var m=s.pendingProps;switch(Tf(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return an(s),null;case 1:return Nn(s.type)&&hu(),an(s),null;case 3:return m=s.stateNode,hs(),yt(Pn),yt(sn),$f(),m.pendingContext&&(m.context=m.pendingContext,m.pendingContext=null),(i===null||i.child===null)&&(vu(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&!(s.flags&256)||(s.flags|=1024,gr!==null&&(gh(gr),gr=null))),oh(i,s),an(s),null;case 5:Lf(s);var x=vo(Dl.current);if(c=s.type,i!==null&&s.stateNode!=null)Wv(i,s,c,m,x),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!m){if(s.stateNode===null)throw Error(n(166));return an(s),null}if(i=vo(Or.current),vu(s)){m=s.stateNode,c=s.type;var w=s.memoizedProps;switch(m[Ir]=s,m[Rl]=w,i=(s.mode&1)!==0,c){case"dialog":gt("cancel",m),gt("close",m);break;case"iframe":case"object":case"embed":gt("load",m);break;case"video":case"audio":for(x=0;x<Tl.length;x++)gt(Tl[x],m);break;case"source":gt("error",m);break;case"img":case"image":case"link":gt("error",m),gt("load",m);break;case"details":gt("toggle",m);break;case"input":Zt(m,w),gt("invalid",m);break;case"select":m._wrapperState={wasMultiple:!!w.multiple},gt("invalid",m);break;case"textarea":oe(m,w),gt("invalid",m)}Tt(c,w),x=null;for(var T in w)if(w.hasOwnProperty(T)){var z=w[T];T==="children"?typeof z=="string"?m.textContent!==z&&(w.suppressHydrationWarning!==!0&&cu(m.textContent,z,i),x=["children",z]):typeof z=="number"&&m.textContent!==""+z&&(w.suppressHydrationWarning!==!0&&cu(m.textContent,z,i),x=["children",""+z]):o.hasOwnProperty(T)&&z!=null&&T==="onScroll"&>("scroll",m)}switch(c){case"input":Ie(m),Bn(m,w,!0);break;case"textarea":Ie(m),ye(m);break;case"select":case"option":break;default:typeof w.onClick=="function"&&(m.onclick=du)}m=x,s.updateQueue=m,m!==null&&(s.flags|=4)}else{T=x.nodeType===9?x:x.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=$(c)),i==="http://www.w3.org/1999/xhtml"?c==="script"?(i=T.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof m.is=="string"?i=T.createElement(c,{is:m.is}):(i=T.createElement(c),c==="select"&&(T=i,m.multiple?T.multiple=!0:m.size&&(T.size=m.size))):i=T.createElementNS(i,c),i[Ir]=s,i[Rl]=m,Hv(i,s,!1,!1),s.stateNode=i;e:{switch(T=hn(c,m),c){case"dialog":gt("cancel",i),gt("close",i),x=m;break;case"iframe":case"object":case"embed":gt("load",i),x=m;break;case"video":case"audio":for(x=0;x<Tl.length;x++)gt(Tl[x],i);x=m;break;case"source":gt("error",i),x=m;break;case"img":case"image":case"link":gt("error",i),gt("load",i),x=m;break;case"details":gt("toggle",i),x=m;break;case"input":Zt(i,m),x=It(i,m),gt("invalid",i);break;case"option":x=m;break;case"select":i._wrapperState={wasMultiple:!!m.multiple},x=N({},m,{value:void 0}),gt("invalid",i);break;case"textarea":oe(i,m),x=ee(i,m),gt("invalid",i);break;default:x=m}Tt(c,x),z=x;for(w in z)if(z.hasOwnProperty(w)){var V=z[w];w==="style"?En(i,V):w==="dangerouslySetInnerHTML"?(V=V?V.__html:void 0,V!=null&&_e(i,V)):w==="children"?typeof V=="string"?(c!=="textarea"||V!=="")&&De(i,V):typeof V=="number"&&De(i,""+V):w!=="suppressContentEditableWarning"&&w!=="suppressHydrationWarning"&&w!=="autoFocus"&&(o.hasOwnProperty(w)?V!=null&&w==="onScroll"&>("scroll",i):V!=null&&P(i,w,V,T))}switch(c){case"input":Ie(i),Bn(i,m,!1);break;case"textarea":Ie(i),ye(i);break;case"option":m.value!=null&&i.setAttribute("value",""+me(m.value));break;case"select":i.multiple=!!m.multiple,w=m.value,w!=null?L(i,!!m.multiple,w,!1):m.defaultValue!=null&&L(i,!!m.multiple,m.defaultValue,!0);break;default:typeof x.onClick=="function"&&(i.onclick=du)}switch(c){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}}m&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return an(s),null;case 6:if(i&&s.stateNode!=null)Zv(i,s,i.memoizedProps,m);else{if(typeof m!="string"&&s.stateNode===null)throw Error(n(166));if(c=vo(Dl.current),vo(Or.current),vu(s)){if(m=s.stateNode,c=s.memoizedProps,m[Ir]=s,(w=m.nodeValue!==c)&&(i=Wn,i!==null))switch(i.tag){case 3:cu(m.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&cu(m.nodeValue,c,(i.mode&1)!==0)}w&&(s.flags|=4)}else m=(c.nodeType===9?c:c.ownerDocument).createTextNode(m),m[Ir]=s,s.stateNode=m}return an(s),null;case 13:if(yt(St),m=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(xt&&Zn!==null&&s.mode&1&&!(s.flags&128))Yy(),us(),s.flags|=98560,w=!1;else if(w=vu(s),m!==null&&m.dehydrated!==null){if(i===null){if(!w)throw Error(n(318));if(w=s.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(n(317));w[Ir]=s}else us(),!(s.flags&128)&&(s.memoizedState=null),s.flags|=4;an(s),w=!1}else gr!==null&&(gh(gr),gr=null),w=!0;if(!w)return s.flags&65536?s:null}return s.flags&128?(s.lanes=c,s):(m=m!==null,m!==(i!==null&&i.memoizedState!==null)&&m&&(s.child.flags|=8192,s.mode&1&&(i===null||St.current&1?Ut===0&&(Ut=3):xh())),s.updateQueue!==null&&(s.flags|=4),an(s),null);case 4:return hs(),oh(i,s),i===null&&Pl(s.stateNode.containerInfo),an(s),null;case 10:return If(s.type._context),an(s),null;case 17:return Nn(s.type)&&hu(),an(s),null;case 19:if(yt(St),w=s.memoizedState,w===null)return an(s),null;if(m=(s.flags&128)!==0,T=w.rendering,T===null)if(m)$l(w,!1);else{if(Ut!==0||i!==null&&i.flags&128)for(i=s.child;i!==null;){if(T=Cu(i),T!==null){for(s.flags|=128,$l(w,!1),m=T.updateQueue,m!==null&&(s.updateQueue=m,s.flags|=4),s.subtreeFlags=0,m=c,c=s.child;c!==null;)w=c,i=m,w.flags&=14680066,T=w.alternate,T===null?(w.childLanes=0,w.lanes=i,w.child=null,w.subtreeFlags=0,w.memoizedProps=null,w.memoizedState=null,w.updateQueue=null,w.dependencies=null,w.stateNode=null):(w.childLanes=T.childLanes,w.lanes=T.lanes,w.child=T.child,w.subtreeFlags=0,w.deletions=null,w.memoizedProps=T.memoizedProps,w.memoizedState=T.memoizedState,w.updateQueue=T.updateQueue,w.type=T.type,i=T.dependencies,w.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),c=c.sibling;return pt(St,St.current&1|2),s.child}i=i.sibling}w.tail!==null&&jt()>ys&&(s.flags|=128,m=!0,$l(w,!1),s.lanes=4194304)}else{if(!m)if(i=Cu(T),i!==null){if(s.flags|=128,m=!0,c=i.updateQueue,c!==null&&(s.updateQueue=c,s.flags|=4),$l(w,!0),w.tail===null&&w.tailMode==="hidden"&&!T.alternate&&!xt)return an(s),null}else 2*jt()-w.renderingStartTime>ys&&c!==1073741824&&(s.flags|=128,m=!0,$l(w,!1),s.lanes=4194304);w.isBackwards?(T.sibling=s.child,s.child=T):(c=w.last,c!==null?c.sibling=T:s.child=T,w.last=T)}return w.tail!==null?(s=w.tail,w.rendering=s,w.tail=s.sibling,w.renderingStartTime=jt(),s.sibling=null,c=St.current,pt(St,m?c&1|2:c&1),s):(an(s),null);case 22:case 23:return vh(),m=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==m&&(s.flags|=8192),m&&s.mode&1?qn&1073741824&&(an(s),s.subtreeFlags&6&&(s.flags|=8192)):an(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function ZT(i,s){switch(Tf(s),s.tag){case 1:return Nn(s.type)&&hu(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return hs(),yt(Pn),yt(sn),$f(),i=s.flags,i&65536&&!(i&128)?(s.flags=i&-65537|128,s):null;case 5:return Lf(s),null;case 13:if(yt(St),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));us()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return yt(St),null;case 4:return hs(),null;case 10:return If(s.type._context),null;case 22:case 23:return vh(),null;case 24:return null;default:return null}}var Iu=!1,un=!1,qT=typeof WeakSet=="function"?WeakSet:Set,Pe=null;function ms(i,s){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(m){Pt(i,s,m)}else c.current=null}function sh(i,s,c){try{c()}catch(m){Pt(i,s,m)}}var qv=!1;function QT(i,s){if(vf=Ja,i=Ey(),cf(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var m=c.getSelection&&c.getSelection();if(m&&m.rangeCount!==0){c=m.anchorNode;var x=m.anchorOffset,w=m.focusNode;m=m.focusOffset;try{c.nodeType,w.nodeType}catch{c=null;break e}var T=0,z=-1,V=-1,ie=0,fe=0,he=i,de=null;t:for(;;){for(var Te;he!==c||x!==0&&he.nodeType!==3||(z=T+x),he!==w||m!==0&&he.nodeType!==3||(V=T+m),he.nodeType===3&&(T+=he.nodeValue.length),(Te=he.firstChild)!==null;)de=he,he=Te;for(;;){if(he===i)break t;if(de===c&&++ie===x&&(z=T),de===w&&++fe===m&&(V=T),(Te=he.nextSibling)!==null)break;he=de,de=he.parentNode}he=Te}c=z===-1||V===-1?null:{start:z,end:V}}else c=null}c=c||{start:0,end:0}}else c=null;for(xf={focusedElem:i,selectionRange:c},Ja=!1,Pe=s;Pe!==null;)if(s=Pe,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Pe=i;else for(;Pe!==null;){s=Pe;try{var Ne=s.alternate;if(s.flags&1024)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Ne!==null){var Ae=Ne.memoizedProps,At=Ne.memoizedState,X=s.stateNode,W=X.getSnapshotBeforeUpdate(s.elementType===s.type?Ae:yr(s.type,Ae),At);X.__reactInternalSnapshotBeforeUpdate=W}break;case 3:var te=s.stateNode.containerInfo;te.nodeType===1?te.textContent="":te.nodeType===9&&te.documentElement&&te.removeChild(te.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ge){Pt(s,s.return,ge)}if(i=s.sibling,i!==null){i.return=s.return,Pe=i;break}Pe=s.return}return Ne=qv,qv=!1,Ne}function Vl(i,s,c){var m=s.updateQueue;if(m=m!==null?m.lastEffect:null,m!==null){var x=m=m.next;do{if((x.tag&i)===i){var w=x.destroy;x.destroy=void 0,w!==void 0&&sh(s,c,w)}x=x.next}while(x!==m)}}function Ou(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var c=s=s.next;do{if((c.tag&i)===i){var m=c.create;c.destroy=m()}c=c.next}while(c!==s)}}function lh(i){var s=i.ref;if(s!==null){var c=i.stateNode;switch(i.tag){case 5:i=c;break;default:i=c}typeof s=="function"?s(i):s.current=i}}function Qv(i){var s=i.alternate;s!==null&&(i.alternate=null,Qv(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[Ir],delete s[Rl],delete s[Sf],delete s[RT],delete s[jT])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function Yv(i){return i.tag===5||i.tag===3||i.tag===4}function Kv(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Yv(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function ah(i,s,c){var m=i.tag;if(m===5||m===6)i=i.stateNode,s?c.nodeType===8?c.parentNode.insertBefore(i,s):c.insertBefore(i,s):(c.nodeType===8?(s=c.parentNode,s.insertBefore(i,c)):(s=c,s.appendChild(i)),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=du));else if(m!==4&&(i=i.child,i!==null))for(ah(i,s,c),i=i.sibling;i!==null;)ah(i,s,c),i=i.sibling}function uh(i,s,c){var m=i.tag;if(m===5||m===6)i=i.stateNode,s?c.insertBefore(i,s):c.appendChild(i);else if(m!==4&&(i=i.child,i!==null))for(uh(i,s,c),i=i.sibling;i!==null;)uh(i,s,c),i=i.sibling}var en=null,vr=!1;function Ri(i,s,c){for(c=c.child;c!==null;)Gv(i,s,c),c=c.sibling}function Gv(i,s,c){if(Ar&&typeof Ar.onCommitFiberUnmount=="function")try{Ar.onCommitFiberUnmount(qa,c)}catch{}switch(c.tag){case 5:un||ms(c,s);case 6:var m=en,x=vr;en=null,Ri(i,s,c),en=m,vr=x,en!==null&&(vr?(i=en,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):en.removeChild(c.stateNode));break;case 18:en!==null&&(vr?(i=en,c=c.stateNode,i.nodeType===8?kf(i.parentNode,c):i.nodeType===1&&kf(i,c),xl(i)):kf(en,c.stateNode));break;case 4:m=en,x=vr,en=c.stateNode.containerInfo,vr=!0,Ri(i,s,c),en=m,vr=x;break;case 0:case 11:case 14:case 15:if(!un&&(m=c.updateQueue,m!==null&&(m=m.lastEffect,m!==null))){x=m=m.next;do{var w=x,T=w.destroy;w=w.tag,T!==void 0&&(w&2||w&4)&&sh(c,s,T),x=x.next}while(x!==m)}Ri(i,s,c);break;case 1:if(!un&&(ms(c,s),m=c.stateNode,typeof m.componentWillUnmount=="function"))try{m.props=c.memoizedProps,m.state=c.memoizedState,m.componentWillUnmount()}catch(z){Pt(c,s,z)}Ri(i,s,c);break;case 21:Ri(i,s,c);break;case 22:c.mode&1?(un=(m=un)||c.memoizedState!==null,Ri(i,s,c),un=m):Ri(i,s,c);break;default:Ri(i,s,c)}}function Xv(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new qT),s.forEach(function(m){var x=rP.bind(null,i,m);c.has(m)||(c.add(m),m.then(x,x))})}}function xr(i,s){var c=s.deletions;if(c!==null)for(var m=0;m<c.length;m++){var x=c[m];try{var w=i,T=s,z=T;e:for(;z!==null;){switch(z.tag){case 5:en=z.stateNode,vr=!1;break e;case 3:en=z.stateNode.containerInfo,vr=!0;break e;case 4:en=z.stateNode.containerInfo,vr=!0;break e}z=z.return}if(en===null)throw Error(n(160));Gv(w,T,x),en=null,vr=!1;var V=x.alternate;V!==null&&(V.return=null),x.return=null}catch(ie){Pt(x,s,ie)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)Jv(s,i),s=s.sibling}function Jv(i,s){var c=i.alternate,m=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(xr(s,i),zr(i),m&4){try{Vl(3,i,i.return),Ou(3,i)}catch(Ae){Pt(i,i.return,Ae)}try{Vl(5,i,i.return)}catch(Ae){Pt(i,i.return,Ae)}}break;case 1:xr(s,i),zr(i),m&512&&c!==null&&ms(c,c.return);break;case 5:if(xr(s,i),zr(i),m&512&&c!==null&&ms(c,c.return),i.flags&32){var x=i.stateNode;try{De(x,"")}catch(Ae){Pt(i,i.return,Ae)}}if(m&4&&(x=i.stateNode,x!=null)){var w=i.memoizedProps,T=c!==null?c.memoizedProps:w,z=i.type,V=i.updateQueue;if(i.updateQueue=null,V!==null)try{z==="input"&&w.type==="radio"&&w.name!=null&&on(x,w),hn(z,T);var ie=hn(z,w);for(T=0;T<V.length;T+=2){var fe=V[T],he=V[T+1];fe==="style"?En(x,he):fe==="dangerouslySetInnerHTML"?_e(x,he):fe==="children"?De(x,he):P(x,fe,he,ie)}switch(z){case"input":Xt(x,w);break;case"textarea":we(x,w);break;case"select":var de=x._wrapperState.wasMultiple;x._wrapperState.wasMultiple=!!w.multiple;var Te=w.value;Te!=null?L(x,!!w.multiple,Te,!1):de!==!!w.multiple&&(w.defaultValue!=null?L(x,!!w.multiple,w.defaultValue,!0):L(x,!!w.multiple,w.multiple?[]:"",!1))}x[Rl]=w}catch(Ae){Pt(i,i.return,Ae)}}break;case 6:if(xr(s,i),zr(i),m&4){if(i.stateNode===null)throw Error(n(162));x=i.stateNode,w=i.memoizedProps;try{x.nodeValue=w}catch(Ae){Pt(i,i.return,Ae)}}break;case 3:if(xr(s,i),zr(i),m&4&&c!==null&&c.memoizedState.isDehydrated)try{xl(s.containerInfo)}catch(Ae){Pt(i,i.return,Ae)}break;case 4:xr(s,i),zr(i);break;case 13:xr(s,i),zr(i),x=i.child,x.flags&8192&&(w=x.memoizedState!==null,x.stateNode.isHidden=w,!w||x.alternate!==null&&x.alternate.memoizedState!==null||(fh=jt())),m&4&&Xv(i);break;case 22:if(fe=c!==null&&c.memoizedState!==null,i.mode&1?(un=(ie=un)||fe,xr(s,i),un=ie):xr(s,i),zr(i),m&8192){if(ie=i.memoizedState!==null,(i.stateNode.isHidden=ie)&&!fe&&i.mode&1)for(Pe=i,fe=i.child;fe!==null;){for(he=Pe=fe;Pe!==null;){switch(de=Pe,Te=de.child,de.tag){case 0:case 11:case 14:case 15:Vl(4,de,de.return);break;case 1:ms(de,de.return);var Ne=de.stateNode;if(typeof Ne.componentWillUnmount=="function"){m=de,c=de.return;try{s=m,Ne.props=s.memoizedProps,Ne.state=s.memoizedState,Ne.componentWillUnmount()}catch(Ae){Pt(m,c,Ae)}}break;case 5:ms(de,de.return);break;case 22:if(de.memoizedState!==null){nx(he);continue}}Te!==null?(Te.return=de,Pe=Te):nx(he)}fe=fe.sibling}e:for(fe=null,he=i;;){if(he.tag===5){if(fe===null){fe=he;try{x=he.stateNode,ie?(w=x.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none"):(z=he.stateNode,V=he.memoizedProps.style,T=V!=null&&V.hasOwnProperty("display")?V.display:null,z.style.display=Jt("display",T))}catch(Ae){Pt(i,i.return,Ae)}}}else if(he.tag===6){if(fe===null)try{he.stateNode.nodeValue=ie?"":he.memoizedProps}catch(Ae){Pt(i,i.return,Ae)}}else if((he.tag!==22&&he.tag!==23||he.memoizedState===null||he===i)&&he.child!==null){he.child.return=he,he=he.child;continue}if(he===i)break e;for(;he.sibling===null;){if(he.return===null||he.return===i)break e;fe===he&&(fe=null),he=he.return}fe===he&&(fe=null),he.sibling.return=he.return,he=he.sibling}}break;case 19:xr(s,i),zr(i),m&4&&Xv(i);break;case 21:break;default:xr(s,i),zr(i)}}function zr(i){var s=i.flags;if(s&2){try{e:{for(var c=i.return;c!==null;){if(Yv(c)){var m=c;break e}c=c.return}throw Error(n(160))}switch(m.tag){case 5:var x=m.stateNode;m.flags&32&&(De(x,""),m.flags&=-33);var w=Kv(i);uh(i,w,x);break;case 3:case 4:var T=m.stateNode.containerInfo,z=Kv(i);ah(i,z,T);break;default:throw Error(n(161))}}catch(V){Pt(i,i.return,V)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function YT(i,s,c){Pe=i,ex(i)}function ex(i,s,c){for(var m=(i.mode&1)!==0;Pe!==null;){var x=Pe,w=x.child;if(x.tag===22&&m){var T=x.memoizedState!==null||Iu;if(!T){var z=x.alternate,V=z!==null&&z.memoizedState!==null||un;z=Iu;var ie=un;if(Iu=T,(un=V)&&!ie)for(Pe=x;Pe!==null;)T=Pe,V=T.child,T.tag===22&&T.memoizedState!==null?rx(x):V!==null?(V.return=T,Pe=V):rx(x);for(;w!==null;)Pe=w,ex(w),w=w.sibling;Pe=x,Iu=z,un=ie}tx(i)}else x.subtreeFlags&8772&&w!==null?(w.return=x,Pe=w):tx(i)}}function tx(i){for(;Pe!==null;){var s=Pe;if(s.flags&8772){var c=s.alternate;try{if(s.flags&8772)switch(s.tag){case 0:case 11:case 15:un||Ou(5,s);break;case 1:var m=s.stateNode;if(s.flags&4&&!un)if(c===null)m.componentDidMount();else{var x=s.elementType===s.type?c.memoizedProps:yr(s.type,c.memoizedProps);m.componentDidUpdate(x,c.memoizedState,m.__reactInternalSnapshotBeforeUpdate)}var w=s.updateQueue;w!==null&&nv(s,w,m);break;case 3:var T=s.updateQueue;if(T!==null){if(c=null,s.child!==null)switch(s.child.tag){case 5:c=s.child.stateNode;break;case 1:c=s.child.stateNode}nv(s,T,c)}break;case 5:var z=s.stateNode;if(c===null&&s.flags&4){c=z;var V=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":V.autoFocus&&c.focus();break;case"img":V.src&&(c.src=V.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var ie=s.alternate;if(ie!==null){var fe=ie.memoizedState;if(fe!==null){var he=fe.dehydrated;he!==null&&xl(he)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}un||s.flags&512&&lh(s)}catch(de){Pt(s,s.return,de)}}if(s===i){Pe=null;break}if(c=s.sibling,c!==null){c.return=s.return,Pe=c;break}Pe=s.return}}function nx(i){for(;Pe!==null;){var s=Pe;if(s===i){Pe=null;break}var c=s.sibling;if(c!==null){c.return=s.return,Pe=c;break}Pe=s.return}}function rx(i){for(;Pe!==null;){var s=Pe;try{switch(s.tag){case 0:case 11:case 15:var c=s.return;try{Ou(4,s)}catch(V){Pt(s,c,V)}break;case 1:var m=s.stateNode;if(typeof m.componentDidMount=="function"){var x=s.return;try{m.componentDidMount()}catch(V){Pt(s,x,V)}}var w=s.return;try{lh(s)}catch(V){Pt(s,w,V)}break;case 5:var T=s.return;try{lh(s)}catch(V){Pt(s,T,V)}}}catch(V){Pt(s,s.return,V)}if(s===i){Pe=null;break}var z=s.sibling;if(z!==null){z.return=s.return,Pe=z;break}Pe=s.return}}var KT=Math.ceil,Du=R.ReactCurrentDispatcher,ch=R.ReactCurrentOwner,sr=R.ReactCurrentBatchConfig,et=0,Yt=null,Ot=null,tn=0,qn=0,gs=Ei(0),Ut=0,Bl=null,wo=0,zu=0,dh=0,Ul=null,jn=null,fh=0,ys=1/0,ri=null,Mu=!1,hh=null,ji=null,Lu=!1,Ai=null,Fu=0,Hl=0,ph=null,$u=-1,Vu=0;function gn(){return et&6?jt():$u!==-1?$u:$u=jt()}function Ii(i){return i.mode&1?et&2&&tn!==0?tn&-tn:IT.transition!==null?(Vu===0&&(Vu=Kg()),Vu):(i=lt,i!==0||(i=window.event,i=i===void 0?16:oy(i.type)),i):1}function wr(i,s,c,m){if(50<Hl)throw Hl=0,ph=null,Error(n(185));pl(i,c,m),(!(et&2)||i!==Yt)&&(i===Yt&&(!(et&2)&&(zu|=c),Ut===4&&Oi(i,tn)),An(i,m),c===1&&et===0&&!(s.mode&1)&&(ys=jt()+500,mu&&Ti()))}function An(i,s){var c=i.callbackNode;I_(i,s);var m=Ka(i,i===Yt?tn:0);if(m===0)c!==null&&qg(c),i.callbackNode=null,i.callbackPriority=0;else if(s=m&-m,i.callbackPriority!==s){if(c!=null&&qg(c),s===1)i.tag===0?AT(ox.bind(null,i)):Hy(ox.bind(null,i)),PT(function(){!(et&6)&&Ti()}),c=null;else{switch(Gg(m)){case 1:c=Zd;break;case 4:c=Qg;break;case 16:c=Za;break;case 536870912:c=Yg;break;default:c=Za}c=hx(c,ix.bind(null,i))}i.callbackPriority=s,i.callbackNode=c}}function ix(i,s){if($u=-1,Vu=0,et&6)throw Error(n(327));var c=i.callbackNode;if(vs()&&i.callbackNode!==c)return null;var m=Ka(i,i===Yt?tn:0);if(m===0)return null;if(m&30||m&i.expiredLanes||s)s=Bu(i,m);else{s=m;var x=et;et|=2;var w=lx();(Yt!==i||tn!==s)&&(ri=null,ys=jt()+500,ko(i,s));do try{JT();break}catch(z){sx(i,z)}while(!0);Af(),Du.current=w,et=x,Ot!==null?s=0:(Yt=null,tn=0,s=Ut)}if(s!==0){if(s===2&&(x=qd(i),x!==0&&(m=x,s=mh(i,x))),s===1)throw c=Bl,ko(i,0),Oi(i,m),An(i,jt()),c;if(s===6)Oi(i,m);else{if(x=i.current.alternate,!(m&30)&&!GT(x)&&(s=Bu(i,m),s===2&&(w=qd(i),w!==0&&(m=w,s=mh(i,w))),s===1))throw c=Bl,ko(i,0),Oi(i,m),An(i,jt()),c;switch(i.finishedWork=x,i.finishedLanes=m,s){case 0:case 1:throw Error(n(345));case 2:So(i,jn,ri);break;case 3:if(Oi(i,m),(m&130023424)===m&&(s=fh+500-jt(),10<s)){if(Ka(i,0)!==0)break;if(x=i.suspendedLanes,(x&m)!==m){gn(),i.pingedLanes|=i.suspendedLanes&x;break}i.timeoutHandle=bf(So.bind(null,i,jn,ri),s);break}So(i,jn,ri);break;case 4:if(Oi(i,m),(m&4194240)===m)break;for(s=i.eventTimes,x=-1;0<m;){var T=31-pr(m);w=1<<T,T=s[T],T>x&&(x=T),m&=~w}if(m=x,m=jt()-m,m=(120>m?120:480>m?480:1080>m?1080:1920>m?1920:3e3>m?3e3:4320>m?4320:1960*KT(m/1960))-m,10<m){i.timeoutHandle=bf(So.bind(null,i,jn,ri),m);break}So(i,jn,ri);break;case 5:So(i,jn,ri);break;default:throw Error(n(329))}}}return An(i,jt()),i.callbackNode===c?ix.bind(null,i):null}function mh(i,s){var c=Ul;return i.current.memoizedState.isDehydrated&&(ko(i,s).flags|=256),i=Bu(i,s),i!==2&&(s=jn,jn=c,s!==null&&gh(s)),i}function gh(i){jn===null?jn=i:jn.push.apply(jn,i)}function GT(i){for(var s=i;;){if(s.flags&16384){var c=s.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var m=0;m<c.length;m++){var x=c[m],w=x.getSnapshot;x=x.value;try{if(!mr(w(),x))return!1}catch{return!1}}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Oi(i,s){for(s&=~dh,s&=~zu,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var c=31-pr(s),m=1<<c;i[c]=-1,s&=~m}}function ox(i){if(et&6)throw Error(n(327));vs();var s=Ka(i,0);if(!(s&1))return An(i,jt()),null;var c=Bu(i,s);if(i.tag!==0&&c===2){var m=qd(i);m!==0&&(s=m,c=mh(i,m))}if(c===1)throw c=Bl,ko(i,0),Oi(i,s),An(i,jt()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,So(i,jn,ri),An(i,jt()),null}function yh(i,s){var c=et;et|=1;try{return i(s)}finally{et=c,et===0&&(ys=jt()+500,mu&&Ti())}}function bo(i){Ai!==null&&Ai.tag===0&&!(et&6)&&vs();var s=et;et|=1;var c=sr.transition,m=lt;try{if(sr.transition=null,lt=1,i)return i()}finally{lt=m,sr.transition=c,et=s,!(et&6)&&Ti()}}function vh(){qn=gs.current,yt(gs)}function ko(i,s){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,TT(c)),Ot!==null)for(c=Ot.return;c!==null;){var m=c;switch(Tf(m),m.tag){case 1:m=m.type.childContextTypes,m!=null&&hu();break;case 3:hs(),yt(Pn),yt(sn),$f();break;case 5:Lf(m);break;case 4:hs();break;case 13:yt(St);break;case 19:yt(St);break;case 10:If(m.type._context);break;case 22:case 23:vh()}c=c.return}if(Yt=i,Ot=i=Di(i.current,null),tn=qn=s,Ut=0,Bl=null,dh=zu=wo=0,jn=Ul=null,yo!==null){for(s=0;s<yo.length;s++)if(c=yo[s],m=c.interleaved,m!==null){c.interleaved=null;var x=m.next,w=c.pending;if(w!==null){var T=w.next;w.next=x,m.next=T}c.pending=m}yo=null}return i}function sx(i,s){do{var c=Ot;try{if(Af(),Eu.current=Nu,_u){for(var m=Ct.memoizedState;m!==null;){var x=m.queue;x!==null&&(x.pending=null),m=m.next}_u=!1}if(xo=0,Qt=Bt=Ct=null,zl=!1,Ml=0,ch.current=null,c===null||c.return===null){Ut=1,Bl=s,Ot=null;break}e:{var w=i,T=c.return,z=c,V=s;if(s=tn,z.flags|=32768,V!==null&&typeof V=="object"&&typeof V.then=="function"){var ie=V,fe=z,he=fe.tag;if(!(fe.mode&1)&&(he===0||he===11||he===15)){var de=fe.alternate;de?(fe.updateQueue=de.updateQueue,fe.memoizedState=de.memoizedState,fe.lanes=de.lanes):(fe.updateQueue=null,fe.memoizedState=null)}var Te=jv(T);if(Te!==null){Te.flags&=-257,Av(Te,T,z,w,s),Te.mode&1&&Rv(w,ie,s),s=Te,V=ie;var Ne=s.updateQueue;if(Ne===null){var Ae=new Set;Ae.add(V),s.updateQueue=Ae}else Ne.add(V);break e}else{if(!(s&1)){Rv(w,ie,s),xh();break e}V=Error(n(426))}}else if(xt&&z.mode&1){var At=jv(T);if(At!==null){!(At.flags&65536)&&(At.flags|=256),Av(At,T,z,w,s),Rf(ps(V,z));break e}}w=V=ps(V,z),Ut!==4&&(Ut=2),Ul===null?Ul=[w]:Ul.push(w),w=T;do{switch(w.tag){case 3:w.flags|=65536,s&=-s,w.lanes|=s;var X=Pv(w,V,s);tv(w,X);break e;case 1:z=V;var W=w.type,te=w.stateNode;if(!(w.flags&128)&&(typeof W.getDerivedStateFromError=="function"||te!==null&&typeof te.componentDidCatch=="function"&&(ji===null||!ji.has(te)))){w.flags|=65536,s&=-s,w.lanes|=s;var ge=Nv(w,z,s);tv(w,ge);break e}}w=w.return}while(w!==null)}ux(c)}catch(Oe){s=Oe,Ot===c&&c!==null&&(Ot=c=c.return);continue}break}while(!0)}function lx(){var i=Du.current;return Du.current=Nu,i===null?Nu:i}function xh(){(Ut===0||Ut===3||Ut===2)&&(Ut=4),Yt===null||!(wo&268435455)&&!(zu&268435455)||Oi(Yt,tn)}function Bu(i,s){var c=et;et|=2;var m=lx();(Yt!==i||tn!==s)&&(ri=null,ko(i,s));do try{XT();break}catch(x){sx(i,x)}while(!0);if(Af(),et=c,Du.current=m,Ot!==null)throw Error(n(261));return Yt=null,tn=0,Ut}function XT(){for(;Ot!==null;)ax(Ot)}function JT(){for(;Ot!==null&&!C_();)ax(Ot)}function ax(i){var s=fx(i.alternate,i,qn);i.memoizedProps=i.pendingProps,s===null?ux(i):Ot=s,ch.current=null}function ux(i){var s=i;do{var c=s.alternate;if(i=s.return,s.flags&32768){if(c=ZT(c,s),c!==null){c.flags&=32767,Ot=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Ut=6,Ot=null;return}}else if(c=WT(c,s,qn),c!==null){Ot=c;return}if(s=s.sibling,s!==null){Ot=s;return}Ot=s=i}while(s!==null);Ut===0&&(Ut=5)}function So(i,s,c){var m=lt,x=sr.transition;try{sr.transition=null,lt=1,eP(i,s,c,m)}finally{sr.transition=x,lt=m}return null}function eP(i,s,c,m){do vs();while(Ai!==null);if(et&6)throw Error(n(327));c=i.finishedWork;var x=i.finishedLanes;if(c===null)return null;if(i.finishedWork=null,i.finishedLanes=0,c===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var w=c.lanes|c.childLanes;if(O_(i,w),i===Yt&&(Ot=Yt=null,tn=0),!(c.subtreeFlags&2064)&&!(c.flags&2064)||Lu||(Lu=!0,hx(Za,function(){return vs(),null})),w=(c.flags&15990)!==0,c.subtreeFlags&15990||w){w=sr.transition,sr.transition=null;var T=lt;lt=1;var z=et;et|=4,ch.current=null,QT(i,c),Jv(c,i),wT(xf),Ja=!!vf,xf=vf=null,i.current=c,YT(c),E_(),et=z,lt=T,sr.transition=w}else i.current=c;if(Lu&&(Lu=!1,Ai=i,Fu=x),w=i.pendingLanes,w===0&&(ji=null),P_(c.stateNode),An(i,jt()),s!==null)for(m=i.onRecoverableError,c=0;c<s.length;c++)x=s[c],m(x.value,{componentStack:x.stack,digest:x.digest});if(Mu)throw Mu=!1,i=hh,hh=null,i;return Fu&1&&i.tag!==0&&vs(),w=i.pendingLanes,w&1?i===ph?Hl++:(Hl=0,ph=i):Hl=0,Ti(),null}function vs(){if(Ai!==null){var i=Gg(Fu),s=sr.transition,c=lt;try{if(sr.transition=null,lt=16>i?16:i,Ai===null)var m=!1;else{if(i=Ai,Ai=null,Fu=0,et&6)throw Error(n(331));var x=et;for(et|=4,Pe=i.current;Pe!==null;){var w=Pe,T=w.child;if(Pe.flags&16){var z=w.deletions;if(z!==null){for(var V=0;V<z.length;V++){var ie=z[V];for(Pe=ie;Pe!==null;){var fe=Pe;switch(fe.tag){case 0:case 11:case 15:Vl(8,fe,w)}var he=fe.child;if(he!==null)he.return=fe,Pe=he;else for(;Pe!==null;){fe=Pe;var de=fe.sibling,Te=fe.return;if(Qv(fe),fe===ie){Pe=null;break}if(de!==null){de.return=Te,Pe=de;break}Pe=Te}}}var Ne=w.alternate;if(Ne!==null){var Ae=Ne.child;if(Ae!==null){Ne.child=null;do{var At=Ae.sibling;Ae.sibling=null,Ae=At}while(Ae!==null)}}Pe=w}}if(w.subtreeFlags&2064&&T!==null)T.return=w,Pe=T;else e:for(;Pe!==null;){if(w=Pe,w.flags&2048)switch(w.tag){case 0:case 11:case 15:Vl(9,w,w.return)}var X=w.sibling;if(X!==null){X.return=w.return,Pe=X;break e}Pe=w.return}}var W=i.current;for(Pe=W;Pe!==null;){T=Pe;var te=T.child;if(T.subtreeFlags&2064&&te!==null)te.return=T,Pe=te;else e:for(T=W;Pe!==null;){if(z=Pe,z.flags&2048)try{switch(z.tag){case 0:case 11:case 15:Ou(9,z)}}catch(Oe){Pt(z,z.return,Oe)}if(z===T){Pe=null;break e}var ge=z.sibling;if(ge!==null){ge.return=z.return,Pe=ge;break e}Pe=z.return}}if(et=x,Ti(),Ar&&typeof Ar.onPostCommitFiberRoot=="function")try{Ar.onPostCommitFiberRoot(qa,i)}catch{}m=!0}return m}finally{lt=c,sr.transition=s}}return!1}function cx(i,s,c){s=ps(c,s),s=Pv(i,s,1),i=Ni(i,s,1),s=gn(),i!==null&&(pl(i,1,s),An(i,s))}function Pt(i,s,c){if(i.tag===3)cx(i,i,c);else for(;s!==null;){if(s.tag===3){cx(s,i,c);break}else if(s.tag===1){var m=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(ji===null||!ji.has(m))){i=ps(c,i),i=Nv(s,i,1),s=Ni(s,i,1),i=gn(),s!==null&&(pl(s,1,i),An(s,i));break}}s=s.return}}function tP(i,s,c){var m=i.pingCache;m!==null&&m.delete(s),s=gn(),i.pingedLanes|=i.suspendedLanes&c,Yt===i&&(tn&c)===c&&(Ut===4||Ut===3&&(tn&130023424)===tn&&500>jt()-fh?ko(i,0):dh|=c),An(i,s)}function dx(i,s){s===0&&(i.mode&1?(s=Ya,Ya<<=1,!(Ya&130023424)&&(Ya=4194304)):s=1);var c=gn();i=ei(i,s),i!==null&&(pl(i,s,c),An(i,c))}function nP(i){var s=i.memoizedState,c=0;s!==null&&(c=s.retryLane),dx(i,c)}function rP(i,s){var c=0;switch(i.tag){case 13:var m=i.stateNode,x=i.memoizedState;x!==null&&(c=x.retryLane);break;case 19:m=i.stateNode;break;default:throw Error(n(314))}m!==null&&m.delete(s),dx(i,c)}var fx;fx=function(i,s,c){if(i!==null)if(i.memoizedProps!==s.pendingProps||Pn.current)Rn=!0;else{if(!(i.lanes&c)&&!(s.flags&128))return Rn=!1,HT(i,s,c);Rn=!!(i.flags&131072)}else Rn=!1,xt&&s.flags&1048576&&Wy(s,yu,s.index);switch(s.lanes=0,s.tag){case 2:var m=s.type;Au(i,s),i=s.pendingProps;var x=ss(s,sn.current);fs(s,c),x=Uf(null,s,m,i,x,c);var w=Hf();return s.flags|=1,typeof x=="object"&&x!==null&&typeof x.render=="function"&&x.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,Nn(m)?(w=!0,pu(s)):w=!1,s.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,zf(s),x.updater=Ru,s.stateNode=x,x._reactInternals=s,Kf(s,m,i,c),s=eh(null,s,m,!0,w,c)):(s.tag=0,xt&&w&&_f(s),mn(null,s,x,c),s=s.child),s;case 16:m=s.elementType;e:{switch(Au(i,s),i=s.pendingProps,x=m._init,m=x(m._payload),s.type=m,x=s.tag=oP(m),i=yr(m,i),x){case 0:s=Jf(null,s,m,i,c);break e;case 1:s=Lv(null,s,m,i,c);break e;case 11:s=Iv(null,s,m,i,c);break e;case 14:s=Ov(null,s,m,yr(m.type,i),c);break e}throw Error(n(306,m,""))}return s;case 0:return m=s.type,x=s.pendingProps,x=s.elementType===m?x:yr(m,x),Jf(i,s,m,x,c);case 1:return m=s.type,x=s.pendingProps,x=s.elementType===m?x:yr(m,x),Lv(i,s,m,x,c);case 3:e:{if(Fv(s),i===null)throw Error(n(387));m=s.pendingProps,w=s.memoizedState,x=w.element,ev(i,s),Su(s,m,null,c);var T=s.memoizedState;if(m=T.element,w.isDehydrated)if(w={element:m,isDehydrated:!1,cache:T.cache,pendingSuspenseBoundaries:T.pendingSuspenseBoundaries,transitions:T.transitions},s.updateQueue.baseState=w,s.memoizedState=w,s.flags&256){x=ps(Error(n(423)),s),s=$v(i,s,m,c,x);break e}else if(m!==x){x=ps(Error(n(424)),s),s=$v(i,s,m,c,x);break e}else for(Zn=Ci(s.stateNode.containerInfo.firstChild),Wn=s,xt=!0,gr=null,c=Xy(s,null,m,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(us(),m===x){s=ni(i,s,c);break e}mn(i,s,m,c)}s=s.child}return s;case 5:return rv(s),i===null&&Nf(s),m=s.type,x=s.pendingProps,w=i!==null?i.memoizedProps:null,T=x.children,wf(m,x)?T=null:w!==null&&wf(m,w)&&(s.flags|=32),Mv(i,s),mn(i,s,T,c),s.child;case 6:return i===null&&Nf(s),null;case 13:return Vv(i,s,c);case 4:return Mf(s,s.stateNode.containerInfo),m=s.pendingProps,i===null?s.child=cs(s,null,m,c):mn(i,s,m,c),s.child;case 11:return m=s.type,x=s.pendingProps,x=s.elementType===m?x:yr(m,x),Iv(i,s,m,x,c);case 7:return mn(i,s,s.pendingProps,c),s.child;case 8:return mn(i,s,s.pendingProps.children,c),s.child;case 12:return mn(i,s,s.pendingProps.children,c),s.child;case 10:e:{if(m=s.type._context,x=s.pendingProps,w=s.memoizedProps,T=x.value,pt(wu,m._currentValue),m._currentValue=T,w!==null)if(mr(w.value,T)){if(w.children===x.children&&!Pn.current){s=ni(i,s,c);break e}}else for(w=s.child,w!==null&&(w.return=s);w!==null;){var z=w.dependencies;if(z!==null){T=w.child;for(var V=z.firstContext;V!==null;){if(V.context===m){if(w.tag===1){V=ti(-1,c&-c),V.tag=2;var ie=w.updateQueue;if(ie!==null){ie=ie.shared;var fe=ie.pending;fe===null?V.next=V:(V.next=fe.next,fe.next=V),ie.pending=V}}w.lanes|=c,V=w.alternate,V!==null&&(V.lanes|=c),Of(w.return,c,s),z.lanes|=c;break}V=V.next}}else if(w.tag===10)T=w.type===s.type?null:w.child;else if(w.tag===18){if(T=w.return,T===null)throw Error(n(341));T.lanes|=c,z=T.alternate,z!==null&&(z.lanes|=c),Of(T,c,s),T=w.sibling}else T=w.child;if(T!==null)T.return=w;else for(T=w;T!==null;){if(T===s){T=null;break}if(w=T.sibling,w!==null){w.return=T.return,T=w;break}T=T.return}w=T}mn(i,s,x.children,c),s=s.child}return s;case 9:return x=s.type,m=s.pendingProps.children,fs(s,c),x=ir(x),m=m(x),s.flags|=1,mn(i,s,m,c),s.child;case 14:return m=s.type,x=yr(m,s.pendingProps),x=yr(m.type,x),Ov(i,s,m,x,c);case 15:return Dv(i,s,s.type,s.pendingProps,c);case 17:return m=s.type,x=s.pendingProps,x=s.elementType===m?x:yr(m,x),Au(i,s),s.tag=1,Nn(m)?(i=!0,pu(s)):i=!1,fs(s,c),_v(s,m,x),Kf(s,m,x,c),eh(null,s,m,!0,i,c);case 19:return Uv(i,s,c);case 22:return zv(i,s,c)}throw Error(n(156,s.tag))};function hx(i,s){return Zg(i,s)}function iP(i,s,c,m){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function lr(i,s,c,m){return new iP(i,s,c,m)}function wh(i){return i=i.prototype,!(!i||!i.isReactComponent)}function oP(i){if(typeof i=="function")return wh(i)?1:0;if(i!=null){if(i=i.$$typeof,i===G)return 11;if(i===U)return 14}return 2}function Di(i,s){var c=i.alternate;return c===null?(c=lr(i.tag,s,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=s,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&14680064,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,s=i.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c}function Uu(i,s,c,m,x,w){var T=2;if(m=i,typeof i=="function")wh(i)&&(T=1);else if(typeof i=="string")T=5;else e:switch(i){case H:return Co(c.children,x,w,s);case B:T=8,x|=8;break;case ne:return i=lr(12,c,s,x|2),i.elementType=ne,i.lanes=w,i;case ae:return i=lr(13,c,s,x),i.elementType=ae,i.lanes=w,i;case q:return i=lr(19,c,s,x),i.elementType=q,i.lanes=w,i;case J:return Hu(c,x,w,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case O:T=10;break e;case Y:T=9;break e;case G:T=11;break e;case U:T=14;break e;case Z:T=16,m=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=lr(T,c,s,x),s.elementType=i,s.type=m,s.lanes=w,s}function Co(i,s,c,m){return i=lr(7,i,m,s),i.lanes=c,i}function Hu(i,s,c,m){return i=lr(22,i,m,s),i.elementType=J,i.lanes=c,i.stateNode={isHidden:!1},i}function bh(i,s,c){return i=lr(6,i,null,s),i.lanes=c,i}function kh(i,s,c){return s=lr(4,i.children!==null?i.children:[],i.key,s),s.lanes=c,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function sP(i,s,c,m,x){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Qd(0),this.expirationTimes=Qd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qd(0),this.identifierPrefix=m,this.onRecoverableError=x,this.mutableSourceEagerHydrationData=null}function Sh(i,s,c,m,x,w,T,z,V){return i=new sP(i,s,c,z,V),s===1?(s=1,w===!0&&(s|=8)):s=0,w=lr(3,null,null,s),i.current=w,w.stateNode=i,w.memoizedState={element:m,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},zf(w),i}function lP(i,s,c){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:A,key:m==null?null:""+m,children:i,containerInfo:s,implementation:c}}function px(i){if(!i)return _i;i=i._reactInternals;e:{if(fo(i)!==i||i.tag!==1)throw Error(n(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(Nn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var c=i.type;if(Nn(c))return By(i,c,s)}return s}function mx(i,s,c,m,x,w,T,z,V){return i=Sh(c,m,!0,i,x,w,T,z,V),i.context=px(null),c=i.current,m=gn(),x=Ii(c),w=ti(m,x),w.callback=s??null,Ni(c,w,x),i.current.lanes=x,pl(i,x,m),An(i,m),i}function Wu(i,s,c,m){var x=s.current,w=gn(),T=Ii(x);return c=px(c),s.context===null?s.context=c:s.pendingContext=c,s=ti(w,T),s.payload={element:i},m=m===void 0?null:m,m!==null&&(s.callback=m),i=Ni(x,s,T),i!==null&&(wr(i,x,T,w),ku(i,x,T)),T}function Zu(i){if(i=i.current,!i.child)return null;switch(i.child.tag){case 5:return i.child.stateNode;default:return i.child.stateNode}}function gx(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<s?c:s}}function Ch(i,s){gx(i,s),(i=i.alternate)&&gx(i,s)}function aP(){return null}var yx=typeof reportError=="function"?reportError:function(i){console.error(i)};function Eh(i){this._internalRoot=i}qu.prototype.render=Eh.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));Wu(i,s,null,null)},qu.prototype.unmount=Eh.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;bo(function(){Wu(null,i,null,null)}),s[Kr]=null}};function qu(i){this._internalRoot=i}qu.prototype.unstable_scheduleHydration=function(i){if(i){var s=ey();i={blockedOn:null,target:i,priority:s};for(var c=0;c<bi.length&&s!==0&&s<bi[c].priority;c++);bi.splice(c,0,i),c===0&&ry(i)}};function _h(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function Qu(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function vx(){}function uP(i,s,c,m,x){if(x){if(typeof m=="function"){var w=m;m=function(){var ie=Zu(T);w.call(ie)}}var T=mx(s,m,i,0,null,!1,!1,"",vx);return i._reactRootContainer=T,i[Kr]=T.current,Pl(i.nodeType===8?i.parentNode:i),bo(),T}for(;x=i.lastChild;)i.removeChild(x);if(typeof m=="function"){var z=m;m=function(){var ie=Zu(V);z.call(ie)}}var V=Sh(i,0,!1,null,null,!1,!1,"",vx);return i._reactRootContainer=V,i[Kr]=V.current,Pl(i.nodeType===8?i.parentNode:i),bo(function(){Wu(s,V,c,m)}),V}function Yu(i,s,c,m,x){var w=c._reactRootContainer;if(w){var T=w;if(typeof x=="function"){var z=x;x=function(){var V=Zu(T);z.call(V)}}Wu(s,T,i,x)}else T=uP(c,s,i,x,m);return Zu(T)}Xg=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var c=hl(s.pendingLanes);c!==0&&(Yd(s,c|1),An(s,jt()),!(et&6)&&(ys=jt()+500,Ti()))}break;case 13:bo(function(){var m=ei(i,1);if(m!==null){var x=gn();wr(m,i,1,x)}}),Ch(i,1)}},Kd=function(i){if(i.tag===13){var s=ei(i,134217728);if(s!==null){var c=gn();wr(s,i,134217728,c)}Ch(i,134217728)}},Jg=function(i){if(i.tag===13){var s=Ii(i),c=ei(i,s);if(c!==null){var m=gn();wr(c,i,s,m)}Ch(i,s)}},ey=function(){return lt},ty=function(i,s){var c=lt;try{return lt=i,s()}finally{lt=c}},ul=function(i,s,c){switch(s){case"input":if(Xt(i,c),s=c.name,c.type==="radio"&&s!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<c.length;s++){var m=c[s];if(m!==i&&m.form===i.form){var x=fu(m);if(!x)throw Error(n(90));Ue(m),Xt(m,x)}}}break;case"textarea":we(i,c);break;case"select":s=c.value,s!=null&&L(i,!!c.multiple,s,!1)}},co=yh,Ua=bo;var cP={usingClientEntryPoint:!1,Events:[jl,is,fu,Tn,Un,yh]},Wl={findFiberByHostInstance:ho,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},dP={bundleType:Wl.bundleType,version:Wl.version,rendererPackageName:Wl.rendererPackageName,rendererConfig:Wl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:R.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=Hg(i),i===null?null:i.stateNode},findFiberByHostInstance:Wl.findFiberByHostInstance||aP,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ku=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ku.isDisabled&&Ku.supportsFiber)try{qa=Ku.inject(dP),Ar=Ku}catch{}}return In.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=cP,In.createPortal=function(i,s){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!_h(s))throw Error(n(200));return lP(i,s,null,c)},In.createRoot=function(i,s){if(!_h(i))throw Error(n(299));var c=!1,m="",x=yx;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onRecoverableError!==void 0&&(x=s.onRecoverableError)),s=Sh(i,1,!1,null,null,c,!1,m,x),i[Kr]=s.current,Pl(i.nodeType===8?i.parentNode:i),new Eh(s)},In.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=Hg(s),i=i===null?null:i.stateNode,i},In.flushSync=function(i){return bo(i)},In.hydrate=function(i,s,c){if(!Qu(s))throw Error(n(200));return Yu(null,i,s,!0,c)},In.hydrateRoot=function(i,s,c){if(!_h(i))throw Error(n(405));var m=c!=null&&c.hydratedSources||null,x=!1,w="",T=yx;if(c!=null&&(c.unstable_strictMode===!0&&(x=!0),c.identifierPrefix!==void 0&&(w=c.identifierPrefix),c.onRecoverableError!==void 0&&(T=c.onRecoverableError)),s=mx(s,null,i,1,c??null,x,!1,w,T),i[Kr]=s.current,Pl(i),m)for(i=0;i<m.length;i++)c=m[i],x=c._getVersion,x=x(c._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[c,x]:s.mutableSourceEagerHydrationData.push(c,x);return new qu(s)},In.render=function(i,s,c){if(!Qu(s))throw Error(n(200));return Yu(null,i,s,!1,c)},In.unmountComponentAtNode=function(i){if(!Qu(i))throw Error(n(40));return i._reactRootContainer?(bo(function(){Yu(null,null,i,!1,function(){i._reactRootContainer=null,i[Kr]=null})}),!0):!1},In.unstable_batchedUpdates=yh,In.unstable_renderSubtreeIntoContainer=function(i,s,c,m){if(!Qu(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Yu(i,s,c,!1,m)},In.version="18.3.1-next-f1338f8080-20240426",In}var Tx;function Ob(){if(Tx)return Rh.exports;Tx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Rh.exports=xP(),Rh.exports}var Px;function wP(){if(Px)return Ju;Px=1;var e=Ob();return Ju.createRoot=e.createRoot,Ju.hydrateRoot=e.hydrateRoot,Ju}var bP=wP();const kP=Qo(bP);/**
|
|
41
|
+
* react-router v7.12.0
|
|
42
|
+
*
|
|
43
|
+
* Copyright (c) Remix Software Inc.
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the MIT license found in the
|
|
46
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
47
|
+
*
|
|
48
|
+
* @license MIT
|
|
49
|
+
*/var Nx="popstate";function SP(e={}){function t(r,o){let{pathname:l,search:a,hash:u}=r.location;return yp("",{pathname:l,search:a,hash:u},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:ua(o)}return EP(t,n,null,e)}function Et(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Pr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function CP(){return Math.random().toString(36).substring(2,10)}function Rx(e,t){return{usr:e.state,key:e.key,idx:t}}function yp(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ks(t):t,state:n,key:t&&t.key||r||CP()}}function ua({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Ks(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function EP(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:l=!1}=r,a=o.history,u="POP",d=null,f=p();f==null&&(f=0,a.replaceState({...a.state,idx:f},""));function p(){return(a.state||{idx:null}).idx}function h(){u="POP";let C=p(),E=C==null?null:C-f;f=C,d&&d({action:u,location:k.location,delta:E})}function v(C,E){u="PUSH";let _=yp(k.location,C,E);f=p()+1;let P=Rx(_,f),R=k.createHref(_);try{a.pushState(P,"",R)}catch(I){if(I instanceof DOMException&&I.name==="DataCloneError")throw I;o.location.assign(R)}l&&d&&d({action:u,location:k.location,delta:1})}function g(C,E){u="REPLACE";let _=yp(k.location,C,E);f=p();let P=Rx(_,f),R=k.createHref(_);a.replaceState(P,"",R),l&&d&&d({action:u,location:k.location,delta:0})}function S(C){return _P(C)}let k={get action(){return u},get location(){return e(o,a)},listen(C){if(d)throw new Error("A history only accepts one active listener");return o.addEventListener(Nx,h),d=C,()=>{o.removeEventListener(Nx,h),d=null}},createHref(C){return t(o,C)},createURL:S,encodeLocation(C){let E=S(C);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:v,replace:g,go(C){return a.go(C)}};return k}function _P(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Et(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:ua(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function Db(e,t,n="/"){return TP(e,t,n,!1)}function TP(e,t,n,r){let o=typeof t=="string"?Ks(t):t,l=hi(o.pathname||"/",n);if(l==null)return null;let a=zb(e);PP(a);let u=null;for(let d=0;u==null&&d<a.length;++d){let f=FP(l);u=MP(a[d],f,r)}return u}function zb(e,t=[],n=[],r="",o=!1){let l=(a,u,d=o,f)=>{let p={relativePath:f===void 0?a.path||"":f,caseSensitive:a.caseSensitive===!0,childrenIndex:u,route:a};if(p.relativePath.startsWith("/")){if(!p.relativePath.startsWith(r)&&d)return;Et(p.relativePath.startsWith(r),`Absolute route path "${p.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(r.length)}let h=di([r,p.relativePath]),v=n.concat(p);a.children&&a.children.length>0&&(Et(a.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),zb(a.children,t,v,h,d)),!(a.path==null&&!a.index)&&t.push({path:h,score:DP(h,a.index),routesMeta:v})};return e.forEach((a,u)=>{var d;if(a.path===""||!((d=a.path)!=null&&d.includes("?")))l(a,u);else for(let f of Mb(a.path))l(a,u,!0,f)}),t}function Mb(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),l=n.replace(/\?$/,"");if(r.length===0)return o?[l,""]:[l];let a=Mb(r.join("/")),u=[];return u.push(...a.map(d=>d===""?l:[l,d].join("/"))),o&&u.push(...a),u.map(d=>e.startsWith("/")&&d===""?"/":d)}function PP(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:zP(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var NP=/^:[\w-]+$/,RP=3,jP=2,AP=1,IP=10,OP=-2,jx=e=>e==="*";function DP(e,t){let n=e.split("/"),r=n.length;return n.some(jx)&&(r+=OP),t&&(r+=jP),n.filter(o=>!jx(o)).reduce((o,l)=>o+(NP.test(l)?RP:l===""?AP:IP),r)}function zP(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 MP(e,t,n=!1){let{routesMeta:r}=e,o={},l="/",a=[];for(let u=0;u<r.length;++u){let d=r[u],f=u===r.length-1,p=l==="/"?t:t.slice(l.length)||"/",h=Tc({path:d.relativePath,caseSensitive:d.caseSensitive,end:f},p),v=d.route;if(!h&&f&&n&&!r[r.length-1].route.index&&(h=Tc({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},p)),!h)return null;Object.assign(o,h.params),a.push({params:o,pathname:di([l,h.pathname]),pathnameBase:UP(di([l,h.pathnameBase])),route:v}),h.pathnameBase!=="/"&&(l=di([l,h.pathnameBase]))}return a}function Tc(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=LP(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let l=o[0],a=l.replace(/(.)\/+$/,"$1"),u=o.slice(1);return{params:r.reduce((f,{paramName:p,isOptional:h},v)=>{if(p==="*"){let S=u[v]||"";a=l.slice(0,l.length-S.length).replace(/(.)\/+$/,"$1")}const g=u[v];return h&&!g?f[p]=void 0:f[p]=(g||"").replace(/%2F/g,"/"),f},{}),pathname:l,pathnameBase:a,pattern:e}}function LP(e,t=!1,n=!0){Pr(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,(a,u,d)=>(r.push({paramName:u,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function FP(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Pr(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function hi(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)||"/"}var Lb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,$P=e=>Lb.test(e);function VP(e,t="/"){let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?Ks(e):e,l;if(n)if($P(n))l=n;else{if(n.includes("//")){let a=n;n=n.replace(/\/\/+/g,"/"),Pr(!1,`Pathnames cannot have embedded double slashes - normalizing ${a} -> ${n}`)}n.startsWith("/")?l=Ax(n.substring(1),"/"):l=Ax(n,t)}else l=t;return{pathname:l,search:HP(r),hash:WP(o)}}function Ax(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 Ih(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 <Link to="..."> and the router will parse it for you.`}function BP(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Fb(e){let t=BP(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function $b(e,t,n,r=!1){let o;typeof e=="string"?o=Ks(e):(o={...e},Et(!o.pathname||!o.pathname.includes("?"),Ih("?","pathname","search",o)),Et(!o.pathname||!o.pathname.includes("#"),Ih("#","pathname","hash",o)),Et(!o.search||!o.search.includes("#"),Ih("#","search","hash",o)));let l=e===""||o.pathname==="",a=l?"/":o.pathname,u;if(a==null)u=n;else{let h=t.length-1;if(!r&&a.startsWith("..")){let v=a.split("/");for(;v[0]==="..";)v.shift(),h-=1;o.pathname=v.join("/")}u=h>=0?t[h]:"/"}let d=VP(o,u),f=a&&a!=="/"&&a.endsWith("/"),p=(l||a===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(f||p)&&(d.pathname+="/"),d}var di=e=>e.join("/").replace(/\/\/+/g,"/"),UP=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),HP=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,WP=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,ZP=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function qP(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function QP(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Vb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Bb(e,t){let n=e;if(typeof n!="string"||!Lb.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,o=!1;if(Vb)try{let l=new URL(window.location.href),a=n.startsWith("//")?new URL(l.protocol+n):new URL(n),u=hi(a.pathname,t);a.origin===l.origin&&u!=null?n=u+a.search+a.hash:o=!0}catch{Pr(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:o,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ub=["POST","PUT","PATCH","DELETE"];new Set(Ub);var YP=["GET",...Ub];new Set(YP);var Gs=b.createContext(null);Gs.displayName="DataRouter";var id=b.createContext(null);id.displayName="DataRouterState";var KP=b.createContext(!1),Hb=b.createContext({isTransitioning:!1});Hb.displayName="ViewTransition";var GP=b.createContext(new Map);GP.displayName="Fetchers";var XP=b.createContext(null);XP.displayName="Await";var dr=b.createContext(null);dr.displayName="Navigation";var Ta=b.createContext(null);Ta.displayName="Location";var gi=b.createContext({outlet:null,matches:[],isDataRoute:!1});gi.displayName="Route";var wm=b.createContext(null);wm.displayName="RouteError";var Wb="REACT_ROUTER_ERROR",JP="REDIRECT",eN="ROUTE_ERROR_RESPONSE";function tN(e){if(e.startsWith(`${Wb}:${JP}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function nN(e){if(e.startsWith(`${Wb}:${eN}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new ZP(t.status,t.statusText,t.data)}catch{}}function rN(e,{relative:t}={}){Et(Pa(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=b.useContext(dr),{hash:o,pathname:l,search:a}=Na(e,{relative:t}),u=l;return n!=="/"&&(u=l==="/"?n:di([n,l])),r.createHref({pathname:u,search:a,hash:o})}function Pa(){return b.useContext(Ta)!=null}function io(){return Et(Pa(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(Ta).location}var Zb="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function qb(e){b.useContext(dr).static||b.useLayoutEffect(e)}function iN(){let{isDataRoute:e}=b.useContext(gi);return e?yN():oN()}function oN(){Et(Pa(),"useNavigate() may be used only in the context of a <Router> component.");let e=b.useContext(Gs),{basename:t,navigator:n}=b.useContext(dr),{matches:r}=b.useContext(gi),{pathname:o}=io(),l=JSON.stringify(Fb(r)),a=b.useRef(!1);return qb(()=>{a.current=!0}),b.useCallback((d,f={})=>{if(Pr(a.current,Zb),!a.current)return;if(typeof d=="number"){n.go(d);return}let p=$b(d,JSON.parse(l),o,f.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:di([t,p.pathname])),(f.replace?n.replace:n.push)(p,f.state,f)},[t,n,l,o,e])}b.createContext(null);function Na(e,{relative:t}={}){let{matches:n}=b.useContext(gi),{pathname:r}=io(),o=JSON.stringify(Fb(n));return b.useMemo(()=>$b(e,JSON.parse(o),r,t==="path"),[e,o,r,t])}function sN(e,t){return Qb(e,t)}function Qb(e,t,n,r,o){var _;Et(Pa(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:l}=b.useContext(dr),{matches:a}=b.useContext(gi),u=a[a.length-1],d=u?u.params:{},f=u?u.pathname:"/",p=u?u.pathnameBase:"/",h=u&&u.route;{let P=h&&h.path||"";Kb(f,!h||P.endsWith("*")||P.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${P}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
50
|
+
|
|
51
|
+
Please change the parent <Route path="${P}"> to <Route path="${P==="/"?"*":`${P}/*`}">.`)}let v=io(),g;if(t){let P=typeof t=="string"?Ks(t):t;Et(p==="/"||((_=P.pathname)==null?void 0:_.startsWith(p)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${P.pathname}" was given in the \`location\` prop.`),g=P}else g=v;let S=g.pathname||"/",k=S;if(p!=="/"){let P=p.replace(/^\//,"").split("/");k="/"+S.replace(/^\//,"").split("/").slice(P.length).join("/")}let C=Db(e,{pathname:k});Pr(h||C!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),Pr(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let E=dN(C&&C.map(P=>Object.assign({},P,{params:Object.assign({},d,P.params),pathname:di([p,l.encodeLocation?l.encodeLocation(P.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:P.pathname]),pathnameBase:P.pathnameBase==="/"?p:di([p,l.encodeLocation?l.encodeLocation(P.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:P.pathnameBase])})),a,n,r,o);return t&&E?b.createElement(Ta.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...g},navigationType:"POP"}},E):E}function lN(){let e=gN(),t=qP(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},l={padding:"2px 4px",backgroundColor:r},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:l},"ErrorBoundary")," or"," ",b.createElement("code",{style:l},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),n?b.createElement("pre",{style:o},n):null,a)}var aN=b.createElement(lN,null),Yb=class extends b.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=nN(e.digest);n&&(e=n)}let t=e!==void 0?b.createElement(gi.Provider,{value:this.props.routeContext},b.createElement(wm.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?b.createElement(uN,{error:e},t):t}};Yb.contextType=KP;var Oh=new WeakMap;function uN({children:e,error:t}){let{basename:n}=b.useContext(dr);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=tN(t.digest);if(r){let o=Oh.get(t);if(o)throw o;let l=Bb(r.location,n);if(Vb&&!Oh.get(t))if(l.isExternal||r.reloadDocument)window.location.href=l.absoluteURL||l.to;else{const a=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(l.to,{replace:r.replace}));throw Oh.set(t,a),a}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l.absoluteURL||l.to}`})}}return e}function cN({routeContext:e,match:t,children:n}){let r=b.useContext(Gs);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),b.createElement(gi.Provider,{value:e},n)}function dN(e,t=[],n=null,r=null,o=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let l=e,a=n==null?void 0:n.errors;if(a!=null){let p=l.findIndex(h=>h.route.id&&(a==null?void 0:a[h.route.id])!==void 0);Et(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),l=l.slice(0,Math.min(l.length,p+1))}let u=!1,d=-1;if(n)for(let p=0;p<l.length;p++){let h=l[p];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(d=p),h.route.id){let{loaderData:v,errors:g}=n,S=h.route.loader&&!v.hasOwnProperty(h.route.id)&&(!g||g[h.route.id]===void 0);if(h.route.lazy||S){u=!0,d>=0?l=l.slice(0,d+1):l=[l[0]];break}}}let f=n&&r?(p,h)=>{var v,g;r(p,{location:n.location,params:((g=(v=n.matches)==null?void 0:v[0])==null?void 0:g.params)??{},unstable_pattern:QP(n.matches),errorInfo:h})}:void 0;return l.reduceRight((p,h,v)=>{let g,S=!1,k=null,C=null;n&&(g=a&&h.route.id?a[h.route.id]:void 0,k=h.route.errorElement||aN,u&&(d<0&&v===0?(Kb("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,C=null):d===v&&(S=!0,C=h.route.hydrateFallbackElement||null)));let E=t.concat(l.slice(0,v+1)),_=()=>{let P;return g?P=k:S?P=C:h.route.Component?P=b.createElement(h.route.Component,null):h.route.element?P=h.route.element:P=p,b.createElement(cN,{match:h,routeContext:{outlet:p,matches:E,isDataRoute:n!=null},children:P})};return n&&(h.route.ErrorBoundary||h.route.errorElement||v===0)?b.createElement(Yb,{location:n.location,revalidation:n.revalidation,component:k,error:g,children:_(),routeContext:{outlet:null,matches:E,isDataRoute:!0},onError:f}):_()},null)}function bm(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function fN(e){let t=b.useContext(Gs);return Et(t,bm(e)),t}function hN(e){let t=b.useContext(id);return Et(t,bm(e)),t}function pN(e){let t=b.useContext(gi);return Et(t,bm(e)),t}function km(e){let t=pN(e),n=t.matches[t.matches.length-1];return Et(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function mN(){return km("useRouteId")}function gN(){var r;let e=b.useContext(wm),t=hN("useRouteError"),n=km("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function yN(){let{router:e}=fN("useNavigate"),t=km("useNavigate"),n=b.useRef(!1);return qb(()=>{n.current=!0}),b.useCallback(async(o,l={})=>{Pr(n.current,Zb),n.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...l}))},[e,t])}var Ix={};function Kb(e,t,n){!t&&!Ix[e]&&(Ix[e]=!0,Pr(!1,n))}b.memo(vN);function vN({routes:e,future:t,state:n,onError:r}){return Qb(e,void 0,n,r,t)}function Gb(e){Et(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function xN({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:l=!1,unstable_useTransitions:a}){Et(!Pa(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),d=b.useMemo(()=>({basename:u,navigator:o,static:l,unstable_useTransitions:a,future:{}}),[u,o,l,a]);typeof n=="string"&&(n=Ks(n));let{pathname:f="/",search:p="",hash:h="",state:v=null,key:g="default"}=n,S=b.useMemo(()=>{let k=hi(f,u);return k==null?null:{location:{pathname:k,search:p,hash:h,state:v,key:g},navigationType:r}},[u,f,p,h,v,g,r]);return Pr(S!=null,`<Router basename="${u}"> is not able to match the URL "${f}${p}${h}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:b.createElement(dr.Provider,{value:d},b.createElement(Ta.Provider,{children:t,value:S}))}function wN({children:e,location:t}){return sN(vp(e),t)}function vp(e,t=[]){let n=[];return b.Children.forEach(e,(r,o)=>{if(!b.isValidElement(r))return;let l=[...t,o];if(r.type===b.Fragment){n.push.apply(n,vp(r.props.children,l));return}Et(r.type===Gb,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Et(!r.props.index||!r.props.children,"An index route cannot have child routes.");let a={id:r.props.id||l.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=vp(r.props.children,l)),n.push(a)}),n}var vc="get",xc="application/x-www-form-urlencoded";function od(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function bN(e){return od(e)&&e.tagName.toLowerCase()==="button"}function kN(e){return od(e)&&e.tagName.toLowerCase()==="form"}function SN(e){return od(e)&&e.tagName.toLowerCase()==="input"}function CN(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function EN(e,t){return e.button===0&&(!t||t==="_self")&&!CN(e)}var ec=null;function _N(){if(ec===null)try{new FormData(document.createElement("form"),0),ec=!1}catch{ec=!0}return ec}var TN=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Dh(e){return e!=null&&!TN.has(e)?(Pr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${xc}"`),null):e}function PN(e,t){let n,r,o,l,a;if(kN(e)){let u=e.getAttribute("action");r=u?hi(u,t):null,n=e.getAttribute("method")||vc,o=Dh(e.getAttribute("enctype"))||xc,l=new FormData(e)}else if(bN(e)||SN(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=e.getAttribute("formaction")||u.getAttribute("action");if(r=d?hi(d,t):null,n=e.getAttribute("formmethod")||u.getAttribute("method")||vc,o=Dh(e.getAttribute("formenctype"))||Dh(u.getAttribute("enctype"))||xc,l=new FormData(u,e),!_N()){let{name:f,type:p,value:h}=e;if(p==="image"){let v=f?`${f}.`:"";l.append(`${v}x`,"0"),l.append(`${v}y`,"0")}else f&&l.append(f,h)}}else{if(od(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=vc,r=null,o=xc,a=e}return l&&o==="text/plain"&&(a=l,l=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:l,body:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Sm(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function NN(e,t,n,r){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${r}`:o.pathname=`${o.pathname}.${r}`:o.pathname==="/"?o.pathname=`_root.${r}`:t&&hi(o.pathname,t)==="/"?o.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${r}`,o}async function RN(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function jN(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function AN(e,t,n){let r=await Promise.all(e.map(async o=>{let l=t.routes[o.route.id];if(l){let a=await RN(l,n);return a.links?a.links():[]}return[]}));return zN(r.flat(1).filter(jN).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Ox(e,t,n,r,o,l){let a=(d,f)=>n[f]?d.route.id!==n[f].route.id:!0,u=(d,f)=>{var p;return n[f].pathname!==d.pathname||((p=n[f].route.path)==null?void 0:p.endsWith("*"))&&n[f].params["*"]!==d.params["*"]};return l==="assets"?t.filter((d,f)=>a(d,f)||u(d,f)):l==="data"?t.filter((d,f)=>{var h;let p=r.routes[d.route.id];if(!p||!p.hasLoader)return!1;if(a(d,f)||u(d,f))return!0;if(d.route.shouldRevalidate){let v=d.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((h=n[0])==null?void 0:h.params)||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function IN(e,t,{includeHydrateFallback:n}={}){return ON(e.map(r=>{let o=t.routes[r.route.id];if(!o)return[];let l=[o.module];return o.clientActionModule&&(l=l.concat(o.clientActionModule)),o.clientLoaderModule&&(l=l.concat(o.clientLoaderModule)),n&&o.hydrateFallbackModule&&(l=l.concat(o.hydrateFallbackModule)),o.imports&&(l=l.concat(o.imports)),l}).flat(1))}function ON(e){return[...new Set(e)]}function DN(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function zN(e,t){let n=new Set;return new Set(t),e.reduce((r,o)=>{let l=JSON.stringify(DN(o));return n.has(l)||(n.add(l),r.push({key:l,link:o})),r},[])}function Xb(){let e=b.useContext(Gs);return Sm(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function MN(){let e=b.useContext(id);return Sm(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Cm=b.createContext(void 0);Cm.displayName="FrameworkContext";function Jb(){let e=b.useContext(Cm);return Sm(e,"You must render this element inside a <HydratedRouter> element"),e}function LN(e,t){let n=b.useContext(Cm),[r,o]=b.useState(!1),[l,a]=b.useState(!1),{onFocus:u,onBlur:d,onMouseEnter:f,onMouseLeave:p,onTouchStart:h}=t,v=b.useRef(null);b.useEffect(()=>{if(e==="render"&&a(!0),e==="viewport"){let k=E=>{E.forEach(_=>{a(_.isIntersecting)})},C=new IntersectionObserver(k,{threshold:.5});return v.current&&C.observe(v.current),()=>{C.disconnect()}}},[e]),b.useEffect(()=>{if(r){let k=setTimeout(()=>{a(!0)},100);return()=>{clearTimeout(k)}}},[r]);let g=()=>{o(!0)},S=()=>{o(!1),a(!1)};return n?e!=="intent"?[l,v,{}]:[l,v,{onFocus:ql(u,g),onBlur:ql(d,S),onMouseEnter:ql(f,g),onMouseLeave:ql(p,S),onTouchStart:ql(h,g)}]:[!1,v,{}]}function ql(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function FN({page:e,...t}){let{router:n}=Xb(),r=b.useMemo(()=>Db(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?b.createElement(VN,{page:e,matches:r,...t}):null}function $N(e){let{manifest:t,routeModules:n}=Jb(),[r,o]=b.useState([]);return b.useEffect(()=>{let l=!1;return AN(e,t,n).then(a=>{l||o(a)}),()=>{l=!0}},[e,t,n]),r}function VN({page:e,matches:t,...n}){let r=io(),{future:o,manifest:l,routeModules:a}=Jb(),{basename:u}=Xb(),{loaderData:d,matches:f}=MN(),p=b.useMemo(()=>Ox(e,t,f,l,r,"data"),[e,t,f,l,r]),h=b.useMemo(()=>Ox(e,t,f,l,r,"assets"),[e,t,f,l,r]),v=b.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let k=new Set,C=!1;if(t.forEach(_=>{var R;let P=l.routes[_.route.id];!P||!P.hasLoader||(!p.some(I=>I.route.id===_.route.id)&&_.route.id in d&&((R=a[_.route.id])!=null&&R.shouldRevalidate)||P.hasClientLoader?C=!0:k.add(_.route.id))}),k.size===0)return[];let E=NN(e,u,o.unstable_trailingSlashAwareDataRequests,"data");return C&&k.size>0&&E.searchParams.set("_routes",t.filter(_=>k.has(_.route.id)).map(_=>_.route.id).join(",")),[E.pathname+E.search]},[u,o.unstable_trailingSlashAwareDataRequests,d,r,l,p,t,e,a]),g=b.useMemo(()=>IN(h,l),[h,l]),S=$N(h);return b.createElement(b.Fragment,null,v.map(k=>b.createElement("link",{key:k,rel:"prefetch",as:"fetch",href:k,...n})),g.map(k=>b.createElement("link",{key:k,rel:"modulepreload",href:k,...n})),S.map(({key:k,link:C})=>b.createElement("link",{key:k,nonce:n.nonce,...C})))}function BN(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var UN=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{UN&&(window.__reactRouterVersion="7.12.0")}catch{}function HN({basename:e,children:t,unstable_useTransitions:n,window:r}){let o=b.useRef();o.current==null&&(o.current=SP({window:r,v5Compat:!0}));let l=o.current,[a,u]=b.useState({action:l.action,location:l.location}),d=b.useCallback(f=>{n===!1?u(f):b.startTransition(()=>u(f))},[n]);return b.useLayoutEffect(()=>l.listen(d),[l,d]),b.createElement(xN,{basename:e,children:t,location:a.location,navigationType:a.action,navigator:l,unstable_useTransitions:n})}var ek=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,tk=b.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:o,reloadDocument:l,replace:a,state:u,target:d,to:f,preventScrollReset:p,viewTransition:h,unstable_defaultShouldRevalidate:v,...g},S){let{basename:k,unstable_useTransitions:C}=b.useContext(dr),E=typeof f=="string"&&ek.test(f),_=Bb(f,k);f=_.to;let P=rN(f,{relative:o}),[R,I,A]=LN(r,g),H=qN(f,{replace:a,state:u,target:d,preventScrollReset:p,relative:o,viewTransition:h,unstable_defaultShouldRevalidate:v,unstable_useTransitions:C});function B(O){t&&t(O),O.defaultPrevented||H(O)}let ne=b.createElement("a",{...g,...A,href:_.absoluteURL||P,onClick:_.isExternal||l?t:B,ref:BN(S,I),target:d,"data-discover":!E&&n==="render"?"true":void 0});return R&&!E?b.createElement(b.Fragment,null,ne,b.createElement(FN,{page:P})):ne});tk.displayName="Link";var nk=b.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:o=!1,style:l,to:a,viewTransition:u,children:d,...f},p){let h=Na(a,{relative:f.relative}),v=io(),g=b.useContext(id),{navigator:S,basename:k}=b.useContext(dr),C=g!=null&&XN(h)&&u===!0,E=S.encodeLocation?S.encodeLocation(h).pathname:h.pathname,_=v.pathname,P=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;n||(_=_.toLowerCase(),P=P?P.toLowerCase():null,E=E.toLowerCase()),P&&k&&(P=hi(P,k)||P);const R=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let I=_===E||!o&&_.startsWith(E)&&_.charAt(R)==="/",A=P!=null&&(P===E||!o&&P.startsWith(E)&&P.charAt(E.length)==="/"),H={isActive:I,isPending:A,isTransitioning:C},B=I?t:void 0,ne;typeof r=="function"?ne=r(H):ne=[r,I?"active":null,A?"pending":null,C?"transitioning":null].filter(Boolean).join(" ");let O=typeof l=="function"?l(H):l;return b.createElement(tk,{...f,"aria-current":B,className:ne,ref:p,style:O,to:a,viewTransition:u},typeof d=="function"?d(H):d)});nk.displayName="NavLink";var WN=b.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:l,method:a=vc,action:u,onSubmit:d,relative:f,preventScrollReset:p,viewTransition:h,unstable_defaultShouldRevalidate:v,...g},S)=>{let{unstable_useTransitions:k}=b.useContext(dr),C=KN(),E=GN(u,{relative:f}),_=a.toLowerCase()==="get"?"get":"post",P=typeof u=="string"&&ek.test(u),R=I=>{if(d&&d(I),I.defaultPrevented)return;I.preventDefault();let A=I.nativeEvent.submitter,H=(A==null?void 0:A.getAttribute("formmethod"))||a,B=()=>C(A||I.currentTarget,{fetcherKey:t,method:H,navigate:n,replace:o,state:l,relative:f,preventScrollReset:p,viewTransition:h,unstable_defaultShouldRevalidate:v});k&&n!==!1?b.startTransition(()=>B()):B()};return b.createElement("form",{ref:S,method:_,action:E,onSubmit:r?d:R,...g,"data-discover":!P&&e==="render"?"true":void 0})});WN.displayName="Form";function ZN(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function rk(e){let t=b.useContext(Gs);return Et(t,ZN(e)),t}function qN(e,{target:t,replace:n,state:r,preventScrollReset:o,relative:l,viewTransition:a,unstable_defaultShouldRevalidate:u,unstable_useTransitions:d}={}){let f=iN(),p=io(),h=Na(e,{relative:l});return b.useCallback(v=>{if(EN(v,t)){v.preventDefault();let g=n!==void 0?n:ua(p)===ua(h),S=()=>f(e,{replace:g,state:r,preventScrollReset:o,relative:l,viewTransition:a,unstable_defaultShouldRevalidate:u});d?b.startTransition(()=>S()):S()}},[p,f,h,n,r,t,e,o,l,a,u,d])}var QN=0,YN=()=>`__${String(++QN)}__`;function KN(){let{router:e}=rk("useSubmit"),{basename:t}=b.useContext(dr),n=mN(),r=e.fetch,o=e.navigate;return b.useCallback(async(l,a={})=>{let{action:u,method:d,encType:f,formData:p,body:h}=PN(l,t);if(a.navigate===!1){let v=a.fetcherKey||YN();await r(v,n,a.action||u,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:p,body:h,formMethod:a.method||d,formEncType:a.encType||f,flushSync:a.flushSync})}else await o(a.action||u,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:p,body:h,formMethod:a.method||d,formEncType:a.encType||f,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,o,t,n])}function GN(e,{relative:t}={}){let{basename:n}=b.useContext(dr),r=b.useContext(gi);Et(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),l={...Na(e||".",{relative:t})},a=io();if(e==null){l.search=a.search;let u=new URLSearchParams(l.search),d=u.getAll("index");if(d.some(p=>p==="")){u.delete("index"),d.filter(h=>h).forEach(h=>u.append("index",h));let p=u.toString();l.search=p?`?${p}`:""}}return(!e||e===".")&&o.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(l.pathname=l.pathname==="/"?n:di([n,l.pathname])),ua(l)}function XN(e,{relative:t}={}){let n=b.useContext(Hb);Et(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=rk("useViewTransitionState"),o=Na(e,{relative:t});if(!n.isTransitioning)return!1;let l=hi(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=hi(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Tc(o.pathname,a)!=null||Tc(o.pathname,l)!=null}var Ra=Ob();const ik=Qo(Ra);/**
|
|
52
|
+
* @license lucide-react v0.562.0 - ISC
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the ISC license.
|
|
55
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/const JN=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),eR=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Dx=e=>{const t=eR(e);return t.charAt(0).toUpperCase()+t.slice(1)},ok=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),tR=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
57
|
+
* @license lucide-react v0.562.0 - ISC
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the ISC license.
|
|
60
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
+
*/var nR={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
62
|
+
* @license lucide-react v0.562.0 - ISC
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the ISC license.
|
|
65
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/const rR=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:l,iconNode:a,...u},d)=>b.createElement("svg",{ref:d,...nR,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ok("lucide",o),...!l&&!tR(u)&&{"aria-hidden":"true"},...u},[...a.map(([f,p])=>b.createElement(f,p)),...Array.isArray(l)?l:[l]]));/**
|
|
67
|
+
* @license lucide-react v0.562.0 - ISC
|
|
68
|
+
*
|
|
69
|
+
* This source code is licensed under the ISC license.
|
|
70
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
+
*/const rt=(e,t)=>{const n=b.forwardRef(({className:r,...o},l)=>b.createElement(rR,{ref:l,iconNode:t,className:ok(`lucide-${JN(Dx(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Dx(e),n};/**
|
|
72
|
+
* @license lucide-react v0.562.0 - ISC
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the ISC license.
|
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/const iR=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],sk=rt("archive",iR);/**
|
|
77
|
+
* @license lucide-react v0.562.0 - ISC
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the ISC license.
|
|
80
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
+
*/const oR=[["path",{d:"M3 19V5",key:"rwsyhb"}],["path",{d:"m13 6-6 6 6 6",key:"1yhaz7"}],["path",{d:"M7 12h14",key:"uoisry"}]],lk=rt("arrow-left-to-line",oR);/**
|
|
82
|
+
* @license lucide-react v0.562.0 - ISC
|
|
83
|
+
*
|
|
84
|
+
* This source code is licensed under the ISC license.
|
|
85
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
+
*/const sR=[["path",{d:"M3 5v14",key:"1nt18q"}],["path",{d:"M21 12H7",key:"13ipq5"}],["path",{d:"m15 18 6-6-6-6",key:"6tx3qv"}]],ak=rt("arrow-right-from-line",sR);/**
|
|
87
|
+
* @license lucide-react v0.562.0 - ISC
|
|
88
|
+
*
|
|
89
|
+
* This source code is licensed under the ISC license.
|
|
90
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
+
*/const lR=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]],aR=rt("bell-off",lR);/**
|
|
92
|
+
* @license lucide-react v0.562.0 - ISC
|
|
93
|
+
*
|
|
94
|
+
* This source code is licensed under the ISC license.
|
|
95
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
+
*/const uR=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}]],cR=rt("bell-ring",uR);/**
|
|
97
|
+
* @license lucide-react v0.562.0 - ISC
|
|
98
|
+
*
|
|
99
|
+
* This source code is licensed under the ISC license.
|
|
100
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
+
*/const dR=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],zx=rt("bell",dR);/**
|
|
102
|
+
* @license lucide-react v0.562.0 - ISC
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the ISC license.
|
|
105
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
+
*/const fR=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],uk=rt("check",fR);/**
|
|
107
|
+
* @license lucide-react v0.562.0 - ISC
|
|
108
|
+
*
|
|
109
|
+
* This source code is licensed under the ISC license.
|
|
110
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
+
*/const hR=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ck=rt("chevron-down",hR);/**
|
|
112
|
+
* @license lucide-react v0.562.0 - ISC
|
|
113
|
+
*
|
|
114
|
+
* This source code is licensed under the ISC license.
|
|
115
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
+
*/const pR=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],mR=rt("chevron-left",pR);/**
|
|
117
|
+
* @license lucide-react v0.562.0 - ISC
|
|
118
|
+
*
|
|
119
|
+
* This source code is licensed under the ISC license.
|
|
120
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
+
*/const gR=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Em=rt("chevron-right",gR);/**
|
|
122
|
+
* @license lucide-react v0.562.0 - ISC
|
|
123
|
+
*
|
|
124
|
+
* This source code is licensed under the ISC license.
|
|
125
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
+
*/const yR=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],vR=rt("chevron-up",yR);/**
|
|
127
|
+
* @license lucide-react v0.562.0 - ISC
|
|
128
|
+
*
|
|
129
|
+
* This source code is licensed under the ISC license.
|
|
130
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
+
*/const xR=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],wR=rt("chevrons-up-down",xR);/**
|
|
132
|
+
* @license lucide-react v0.562.0 - ISC
|
|
133
|
+
*
|
|
134
|
+
* This source code is licensed under the ISC license.
|
|
135
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
+
*/const bR=[["path",{d:"M6 3v12",key:"qpgusn"}],["path",{d:"M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6z",key:"1d02ji"}],["path",{d:"M6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6z",key:"chk6ph"}],["path",{d:"M15 6a9 9 0 0 0-9 9",key:"or332x"}],["path",{d:"M18 15v6",key:"9wciyi"}],["path",{d:"M21 18h-6",key:"139f0c"}]],kR=rt("git-branch-plus",bR);/**
|
|
137
|
+
* @license lucide-react v0.562.0 - ISC
|
|
138
|
+
*
|
|
139
|
+
* This source code is licensed under the ISC license.
|
|
140
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
+
*/const SR=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],dk=rt("git-branch",SR);/**
|
|
142
|
+
* @license lucide-react v0.562.0 - ISC
|
|
143
|
+
*
|
|
144
|
+
* This source code is licensed under the ISC license.
|
|
145
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
+
*/const CR=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],fk=rt("history",CR);/**
|
|
147
|
+
* @license lucide-react v0.562.0 - ISC
|
|
148
|
+
*
|
|
149
|
+
* This source code is licensed under the ISC license.
|
|
150
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
+
*/const ER=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],_R=rt("kanban",ER);/**
|
|
152
|
+
* @license lucide-react v0.562.0 - ISC
|
|
153
|
+
*
|
|
154
|
+
* This source code is licensed under the ISC license.
|
|
155
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
+
*/const TR=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],sd=rt("layers",TR);/**
|
|
157
|
+
* @license lucide-react v0.562.0 - ISC
|
|
158
|
+
*
|
|
159
|
+
* This source code is licensed under the ISC license.
|
|
160
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
+
*/const PR=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],NR=rt("list",PR);/**
|
|
162
|
+
* @license lucide-react v0.562.0 - ISC
|
|
163
|
+
*
|
|
164
|
+
* This source code is licensed under the ISC license.
|
|
165
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
+
*/const RR=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],jR=rt("loader-circle",RR);/**
|
|
167
|
+
* @license lucide-react v0.562.0 - ISC
|
|
168
|
+
*
|
|
169
|
+
* This source code is licensed under the ISC license.
|
|
170
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
+
*/const AR=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],IR=rt("message-square",AR);/**
|
|
172
|
+
* @license lucide-react v0.562.0 - ISC
|
|
173
|
+
*
|
|
174
|
+
* This source code is licensed under the ISC license.
|
|
175
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
+
*/const OR=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],DR=rt("moon",OR);/**
|
|
177
|
+
* @license lucide-react v0.562.0 - ISC
|
|
178
|
+
*
|
|
179
|
+
* This source code is licensed under the ISC license.
|
|
180
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
+
*/const zR=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],MR=rt("package",zR);/**
|
|
182
|
+
* @license lucide-react v0.562.0 - ISC
|
|
183
|
+
*
|
|
184
|
+
* This source code is licensed under the ISC license.
|
|
185
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
+
*/const LR=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],hk=rt("pencil",LR);/**
|
|
187
|
+
* @license lucide-react v0.562.0 - ISC
|
|
188
|
+
*
|
|
189
|
+
* This source code is licensed under the ISC license.
|
|
190
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
+
*/const FR=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],_m=rt("plus",FR);/**
|
|
192
|
+
* @license lucide-react v0.562.0 - ISC
|
|
193
|
+
*
|
|
194
|
+
* This source code is licensed under the ISC license.
|
|
195
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
+
*/const $R=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],VR=rt("search",$R);/**
|
|
197
|
+
* @license lucide-react v0.562.0 - ISC
|
|
198
|
+
*
|
|
199
|
+
* This source code is licensed under the ISC license.
|
|
200
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
+
*/const BR=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],pk=rt("sliders-horizontal",BR);/**
|
|
202
|
+
* @license lucide-react v0.562.0 - ISC
|
|
203
|
+
*
|
|
204
|
+
* This source code is licensed under the ISC license.
|
|
205
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
+
*/const UR=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],ja=rt("square-check",UR);/**
|
|
207
|
+
* @license lucide-react v0.562.0 - ISC
|
|
208
|
+
*
|
|
209
|
+
* This source code is licensed under the ISC license.
|
|
210
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
+
*/const HR=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],WR=rt("square-x",HR);/**
|
|
212
|
+
* @license lucide-react v0.562.0 - ISC
|
|
213
|
+
*
|
|
214
|
+
* This source code is licensed under the ISC license.
|
|
215
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
+
*/const ZR=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],qR=rt("square",ZR);/**
|
|
217
|
+
* @license lucide-react v0.562.0 - ISC
|
|
218
|
+
*
|
|
219
|
+
* This source code is licensed under the ISC license.
|
|
220
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
+
*/const QR=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],YR=rt("sun",QR);/**
|
|
222
|
+
* @license lucide-react v0.562.0 - ISC
|
|
223
|
+
*
|
|
224
|
+
* This source code is licensed under the ISC license.
|
|
225
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
+
*/const KR=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],mk=rt("trash-2",KR);/**
|
|
227
|
+
* @license lucide-react v0.562.0 - ISC
|
|
228
|
+
*
|
|
229
|
+
* This source code is licensed under the ISC license.
|
|
230
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
+
*/const GR=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ld=rt("x",GR);function gk(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=gk(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function yk(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=gk(e))&&(r&&(r+=" "),r+=t);return r}const XR=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},JR=(e,t)=>({classGroupId:e,validator:t}),vk=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Pc="-",Mx=[],ej="arbitrary..",tj=e=>{const t=rj(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return nj(a);const u=a.split(Pc),d=u[0]===""&&u.length>1?1:0;return xk(u,d,t)},getConflictingClassGroupIds:(a,u)=>{if(u){const d=r[a],f=n[a];return d?f?XR(f,d):d:f||Mx}return n[a]||Mx}}},xk=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],l=n.nextPart.get(o);if(l){const f=xk(e,t+1,l);if(f)return f}const a=n.validators;if(a===null)return;const u=t===0?e.join(Pc):e.slice(t).join(Pc),d=a.length;for(let f=0;f<d;f++){const p=a[f];if(p.validator(u))return p.classGroupId}},nj=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?ej+r:void 0})(),rj=e=>{const{theme:t,classGroups:n}=e;return ij(n,t)},ij=(e,t)=>{const n=vk();for(const r in e){const o=e[r];Tm(o,n,r,t)}return n},Tm=(e,t,n,r)=>{const o=e.length;for(let l=0;l<o;l++){const a=e[l];oj(a,t,n,r)}},oj=(e,t,n,r)=>{if(typeof e=="string"){sj(e,t,n);return}if(typeof e=="function"){lj(e,t,n,r);return}aj(e,t,n,r)},sj=(e,t,n)=>{const r=e===""?t:wk(t,e);r.classGroupId=n},lj=(e,t,n,r)=>{if(uj(e)){Tm(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(JR(n,e))},aj=(e,t,n,r)=>{const o=Object.entries(e),l=o.length;for(let a=0;a<l;a++){const[u,d]=o[a];Tm(d,wk(t,u),n,r)}},wk=(e,t)=>{let n=e;const r=t.split(Pc),o=r.length;for(let l=0;l<o;l++){const a=r[l];let u=n.nextPart.get(a);u||(u=vk(),n.nextPart.set(a,u)),n=u}return n},uj=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,cj=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(l,a)=>{n[l]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(l){let a=n[l];if(a!==void 0)return a;if((a=r[l])!==void 0)return o(l,a),a},set(l,a){l in n?n[l]=a:o(l,a)}}},xp="!",Lx=":",dj=[],Fx=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),fj=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const l=[];let a=0,u=0,d=0,f;const p=o.length;for(let k=0;k<p;k++){const C=o[k];if(a===0&&u===0){if(C===Lx){l.push(o.slice(d,k)),d=k+1;continue}if(C==="/"){f=k;continue}}C==="["?a++:C==="]"?a--:C==="("?u++:C===")"&&u--}const h=l.length===0?o:o.slice(d);let v=h,g=!1;h.endsWith(xp)?(v=h.slice(0,-1),g=!0):h.startsWith(xp)&&(v=h.slice(1),g=!0);const S=f&&f>d?f-d:void 0;return Fx(l,g,v,S)};if(t){const o=t+Lx,l=r;r=a=>a.startsWith(o)?l(a.slice(o.length)):Fx(dj,!1,a,void 0,!0)}if(n){const o=r;r=l=>n({className:l,parseClassName:o})}return r},hj=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let l=0;l<n.length;l++){const a=n[l],u=a[0]==="[",d=t.has(a);u||d?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(a)):o.push(a)}return o.length>0&&(o.sort(),r.push(...o)),r}},pj=e=>({cache:cj(e.cacheSize),parseClassName:fj(e),sortModifiers:hj(e),...tj(e)}),mj=/\s+/,gj=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:l}=t,a=[],u=e.trim().split(mj);let d="";for(let f=u.length-1;f>=0;f-=1){const p=u[f],{isExternal:h,modifiers:v,hasImportantModifier:g,baseClassName:S,maybePostfixModifierPosition:k}=n(p);if(h){d=p+(d.length>0?" "+d:d);continue}let C=!!k,E=r(C?S.substring(0,k):S);if(!E){if(!C){d=p+(d.length>0?" "+d:d);continue}if(E=r(S),!E){d=p+(d.length>0?" "+d:d);continue}C=!1}const _=v.length===0?"":v.length===1?v[0]:l(v).join(":"),P=g?_+xp:_,R=P+E;if(a.indexOf(R)>-1)continue;a.push(R);const I=o(E,C);for(let A=0;A<I.length;++A){const H=I[A];a.push(P+H)}d=p+(d.length>0?" "+d:d)}return d},yj=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=bk(n))&&(o&&(o+=" "),o+=r);return o},bk=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=bk(e[r]))&&(n&&(n+=" "),n+=t);return n},vj=(e,...t)=>{let n,r,o,l;const a=d=>{const f=t.reduce((p,h)=>h(p),e());return n=pj(f),r=n.cache.get,o=n.cache.set,l=u,u(d)},u=d=>{const f=r(d);if(f)return f;const p=gj(d,n);return o(d,p),p};return l=a,(...d)=>l(yj(...d))},xj=[],Ht=e=>{const t=n=>n[e]||xj;return t.isThemeGetter=!0,t},kk=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Sk=/^\((?:(\w[\w-]*):)?(.+)\)$/i,wj=/^\d+\/\d+$/,bj=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,kj=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Sj=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Cj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ej=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xs=e=>wj.test(e),qe=e=>!!e&&!Number.isNaN(Number(e)),Mi=e=>!!e&&Number.isInteger(Number(e)),zh=e=>e.endsWith("%")&&qe(e.slice(0,-1)),ii=e=>bj.test(e),_j=()=>!0,Tj=e=>kj.test(e)&&!Sj.test(e),Ck=()=>!1,Pj=e=>Cj.test(e),Nj=e=>Ej.test(e),Rj=e=>!Re(e)&&!je(e),jj=e=>Xs(e,Tk,Ck),Re=e=>kk.test(e),Eo=e=>Xs(e,Pk,Tj),Mh=e=>Xs(e,zj,qe),$x=e=>Xs(e,Ek,Ck),Aj=e=>Xs(e,_k,Nj),tc=e=>Xs(e,Nk,Pj),je=e=>Sk.test(e),Ql=e=>Js(e,Pk),Ij=e=>Js(e,Mj),Vx=e=>Js(e,Ek),Oj=e=>Js(e,Tk),Dj=e=>Js(e,_k),nc=e=>Js(e,Nk,!0),Xs=(e,t,n)=>{const r=kk.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Js=(e,t,n=!1)=>{const r=Sk.exec(e);return r?r[1]?t(r[1]):n:!1},Ek=e=>e==="position"||e==="percentage",_k=e=>e==="image"||e==="url",Tk=e=>e==="length"||e==="size"||e==="bg-size",Pk=e=>e==="length",zj=e=>e==="number",Mj=e=>e==="family-name",Nk=e=>e==="shadow",Lj=()=>{const e=Ht("color"),t=Ht("font"),n=Ht("text"),r=Ht("font-weight"),o=Ht("tracking"),l=Ht("leading"),a=Ht("breakpoint"),u=Ht("container"),d=Ht("spacing"),f=Ht("radius"),p=Ht("shadow"),h=Ht("inset-shadow"),v=Ht("text-shadow"),g=Ht("drop-shadow"),S=Ht("blur"),k=Ht("perspective"),C=Ht("aspect"),E=Ht("ease"),_=Ht("animate"),P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],I=()=>[...R(),je,Re],A=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto","contain","none"],B=()=>[je,Re,d],ne=()=>[xs,"full","auto",...B()],O=()=>[Mi,"none","subgrid",je,Re],Y=()=>["auto",{span:["full",Mi,je,Re]},Mi,je,Re],G=()=>[Mi,"auto",je,Re],ae=()=>["auto","min","max","fr",je,Re],q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],U=()=>["start","end","center","stretch","center-safe","end-safe"],Z=()=>["auto",...B()],J=()=>[xs,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...B()],D=()=>[e,je,Re],K=()=>[...R(),Vx,$x,{position:[je,Re]}],N=()=>["no-repeat",{repeat:["","x","y","space","round"]}],M=()=>["auto","cover","contain",Oj,jj,{size:[je,Re]}],Q=()=>[zh,Ql,Eo],j=()=>["","none","full",f,je,Re],ue=()=>["",qe,Ql,Eo],ve=()=>["solid","dashed","dotted","double"],xe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],re=()=>[qe,zh,Vx,$x],me=()=>["","none",S,je,Re],Se=()=>["none",qe,je,Re],be=()=>["none",qe,je,Re],Ie=()=>[qe,je,Re],Ue=()=>[xs,"full",...B()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ii],breakpoint:[ii],color:[_j],container:[ii],"drop-shadow":[ii],ease:["in","out","in-out"],font:[Rj],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ii],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ii],shadow:[ii],spacing:["px",qe],text:[ii],"text-shadow":[ii],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",xs,Re,je,C]}],container:["container"],columns:[{columns:[qe,Re,je,u]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:I()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ne()}],"inset-x":[{"inset-x":ne()}],"inset-y":[{"inset-y":ne()}],start:[{start:ne()}],end:[{end:ne()}],top:[{top:ne()}],right:[{right:ne()}],bottom:[{bottom:ne()}],left:[{left:ne()}],visibility:["visible","invisible","collapse"],z:[{z:[Mi,"auto",je,Re]}],basis:[{basis:[xs,"full","auto",u,...B()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[qe,xs,"auto","initial","none",Re]}],grow:[{grow:["",qe,je,Re]}],shrink:[{shrink:["",qe,je,Re]}],order:[{order:[Mi,"first","last","none",je,Re]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:Y()}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:Y()}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ae()}],"auto-rows":[{"auto-rows":ae()}],gap:[{gap:B()}],"gap-x":[{"gap-x":B()}],"gap-y":[{"gap-y":B()}],"justify-content":[{justify:[...q(),"normal"]}],"justify-items":[{"justify-items":[...U(),"normal"]}],"justify-self":[{"justify-self":["auto",...U()]}],"align-content":[{content:["normal",...q()]}],"align-items":[{items:[...U(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...U(),{baseline:["","last"]}]}],"place-content":[{"place-content":q()}],"place-items":[{"place-items":[...U(),"baseline"]}],"place-self":[{"place-self":["auto",...U()]}],p:[{p:B()}],px:[{px:B()}],py:[{py:B()}],ps:[{ps:B()}],pe:[{pe:B()}],pt:[{pt:B()}],pr:[{pr:B()}],pb:[{pb:B()}],pl:[{pl:B()}],m:[{m:Z()}],mx:[{mx:Z()}],my:[{my:Z()}],ms:[{ms:Z()}],me:[{me:Z()}],mt:[{mt:Z()}],mr:[{mr:Z()}],mb:[{mb:Z()}],ml:[{ml:Z()}],"space-x":[{"space-x":B()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":B()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],w:[{w:[u,"screen",...J()]}],"min-w":[{"min-w":[u,"screen","none",...J()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[a]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",n,Ql,Eo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,je,Mh]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",zh,Re]}],"font-family":[{font:[Ij,Re,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,je,Re]}],"line-clamp":[{"line-clamp":[qe,"none",je,Mh]}],leading:[{leading:[l,...B()]}],"list-image":[{"list-image":["none",je,Re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",je,Re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[qe,"from-font","auto",je,Eo]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[qe,"auto",je,Re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",je,Re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",je,Re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:K()}],"bg-repeat":[{bg:N()}],"bg-size":[{bg:M()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Mi,je,Re],radial:["",je,Re],conic:[Mi,je,Re]},Dj,Aj]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:Q()}],"gradient-via-pos":[{via:Q()}],"gradient-to-pos":[{to:Q()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:j()}],"rounded-s":[{"rounded-s":j()}],"rounded-e":[{"rounded-e":j()}],"rounded-t":[{"rounded-t":j()}],"rounded-r":[{"rounded-r":j()}],"rounded-b":[{"rounded-b":j()}],"rounded-l":[{"rounded-l":j()}],"rounded-ss":[{"rounded-ss":j()}],"rounded-se":[{"rounded-se":j()}],"rounded-ee":[{"rounded-ee":j()}],"rounded-es":[{"rounded-es":j()}],"rounded-tl":[{"rounded-tl":j()}],"rounded-tr":[{"rounded-tr":j()}],"rounded-br":[{"rounded-br":j()}],"rounded-bl":[{"rounded-bl":j()}],"border-w":[{border:ue()}],"border-w-x":[{"border-x":ue()}],"border-w-y":[{"border-y":ue()}],"border-w-s":[{"border-s":ue()}],"border-w-e":[{"border-e":ue()}],"border-w-t":[{"border-t":ue()}],"border-w-r":[{"border-r":ue()}],"border-w-b":[{"border-b":ue()}],"border-w-l":[{"border-l":ue()}],"divide-x":[{"divide-x":ue()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ue()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[qe,je,Re]}],"outline-w":[{outline:["",qe,Ql,Eo]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",p,nc,tc]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",h,nc,tc]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[qe,Eo]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":ue()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",v,nc,tc]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[qe,je,Re]}],"mix-blend":[{"mix-blend":[...xe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":xe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":re()}],"mask-image-linear-to-pos":[{"mask-linear-to":re()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":re()}],"mask-image-t-to-pos":[{"mask-t-to":re()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":re()}],"mask-image-r-to-pos":[{"mask-r-to":re()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":re()}],"mask-image-b-to-pos":[{"mask-b-to":re()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":re()}],"mask-image-l-to-pos":[{"mask-l-to":re()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":re()}],"mask-image-x-to-pos":[{"mask-x-to":re()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":re()}],"mask-image-y-to-pos":[{"mask-y-to":re()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[je,Re]}],"mask-image-radial-from-pos":[{"mask-radial-from":re()}],"mask-image-radial-to-pos":[{"mask-radial-to":re()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":re()}],"mask-image-conic-to-pos":[{"mask-conic-to":re()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:K()}],"mask-repeat":[{mask:N()}],"mask-size":[{mask:M()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",je,Re]}],filter:[{filter:["","none",je,Re]}],blur:[{blur:me()}],brightness:[{brightness:[qe,je,Re]}],contrast:[{contrast:[qe,je,Re]}],"drop-shadow":[{"drop-shadow":["","none",g,nc,tc]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",qe,je,Re]}],"hue-rotate":[{"hue-rotate":[qe,je,Re]}],invert:[{invert:["",qe,je,Re]}],saturate:[{saturate:[qe,je,Re]}],sepia:[{sepia:["",qe,je,Re]}],"backdrop-filter":[{"backdrop-filter":["","none",je,Re]}],"backdrop-blur":[{"backdrop-blur":me()}],"backdrop-brightness":[{"backdrop-brightness":[qe,je,Re]}],"backdrop-contrast":[{"backdrop-contrast":[qe,je,Re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",qe,je,Re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[qe,je,Re]}],"backdrop-invert":[{"backdrop-invert":["",qe,je,Re]}],"backdrop-opacity":[{"backdrop-opacity":[qe,je,Re]}],"backdrop-saturate":[{"backdrop-saturate":[qe,je,Re]}],"backdrop-sepia":[{"backdrop-sepia":["",qe,je,Re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":B()}],"border-spacing-x":[{"border-spacing-x":B()}],"border-spacing-y":[{"border-spacing-y":B()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",je,Re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[qe,"initial",je,Re]}],ease:[{ease:["linear","initial",E,je,Re]}],delay:[{delay:[qe,je,Re]}],animate:[{animate:["none",_,je,Re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,je,Re]}],"perspective-origin":[{"perspective-origin":I()}],rotate:[{rotate:Se()}],"rotate-x":[{"rotate-x":Se()}],"rotate-y":[{"rotate-y":Se()}],"rotate-z":[{"rotate-z":Se()}],scale:[{scale:be()}],"scale-x":[{"scale-x":be()}],"scale-y":[{"scale-y":be()}],"scale-z":[{"scale-z":be()}],"scale-3d":["scale-3d"],skew:[{skew:Ie()}],"skew-x":[{"skew-x":Ie()}],"skew-y":[{"skew-y":Ie()}],transform:[{transform:[je,Re,"","none","gpu","cpu"]}],"transform-origin":[{origin:I()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ue()}],"translate-x":[{"translate-x":Ue()}],"translate-y":[{"translate-y":Ue()}],"translate-z":[{"translate-z":Ue()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",je,Re]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",je,Re]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[qe,Ql,Eo,Mh]}],stroke:[{stroke:["none",...D()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Fj=vj(Lj);function Ve(...e){return Fj(yk(e))}const Rk={create:{icon:_m,color:"text-green-500"},update:{icon:hk,color:"text-blue-500"},delete:{icon:mk,color:"text-red-500"}};function jk({action:e,className:t}){const n=Rk[e],r=n.icon;return y.jsx(r,{className:Ve("h-4 w-4",n.color,t)})}function Ak(e){return Rk[e].color}const $j={epic:sd,task:ja,subtask:dk};function Ik({items:e}){return y.jsx("nav",{className:"flex items-center gap-1.5",children:e.map((t,n)=>{const r=n===e.length-1,o=!r&&t.onClick,l=$j[t.type];let a;return o&&(a=t.onClick),y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsxs("div",{className:Ve("flex items-center gap-1",o&&"cursor-pointer hover:text-foreground"),onClick:a,title:t.title,children:[y.jsx(l,{className:"h-3.5 w-3.5"}),y.jsx("span",{className:"font-mono text-sm text-muted-foreground",children:t.id})]}),!r&&y.jsx(Em,{className:"h-3 w-3 opacity-50"})]},t.id)})})}function Vj(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Bj=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Uj=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Hj={};function Bx(e,t){return(Hj.jsx?Uj:Bj).test(e)}const Wj=/[ \t\n\f\r]/g;function Zj(e){return typeof e=="object"?e.type==="text"?Ux(e.value):!1:Ux(e)}function Ux(e){return e.replace(Wj,"")===""}class Aa{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Aa.prototype.normal={};Aa.prototype.property={};Aa.prototype.space=void 0;function Ok(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Aa(n,r,t)}function wp(e){return e.toLowerCase()}class $n{constructor(t,n){this.attribute=n,this.property=t}}$n.prototype.attribute="";$n.prototype.booleanish=!1;$n.prototype.boolean=!1;$n.prototype.commaOrSpaceSeparated=!1;$n.prototype.commaSeparated=!1;$n.prototype.defined=!1;$n.prototype.mustUseProperty=!1;$n.prototype.number=!1;$n.prototype.overloadedBoolean=!1;$n.prototype.property="";$n.prototype.spaceSeparated=!1;$n.prototype.space=void 0;let qj=0;const We=Yo(),Mt=Yo(),bp=Yo(),pe=Yo(),mt=Yo(),Ns=Yo(),Qn=Yo();function Yo(){return 2**++qj}const kp=Object.freeze(Object.defineProperty({__proto__:null,boolean:We,booleanish:Mt,commaOrSpaceSeparated:Qn,commaSeparated:Ns,number:pe,overloadedBoolean:bp,spaceSeparated:mt},Symbol.toStringTag,{value:"Module"})),Lh=Object.keys(kp);class Pm extends $n{constructor(t,n,r,o){let l=-1;if(super(t,n),Hx(this,"space",o),typeof r=="number")for(;++l<Lh.length;){const a=Lh[l];Hx(this,Lh[l],(r&kp[a])===kp[a])}}}Pm.prototype.defined=!0;function Hx(e,t,n){n&&(e[t]=n)}function el(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const l=new Pm(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),t[r]=l,n[wp(r)]=r,n[wp(l.attribute)]=r}return new Aa(t,n,e.space)}const Dk=el({properties:{ariaActiveDescendant:null,ariaAtomic:Mt,ariaAutoComplete:null,ariaBusy:Mt,ariaChecked:Mt,ariaColCount:pe,ariaColIndex:pe,ariaColSpan:pe,ariaControls:mt,ariaCurrent:null,ariaDescribedBy:mt,ariaDetails:null,ariaDisabled:Mt,ariaDropEffect:mt,ariaErrorMessage:null,ariaExpanded:Mt,ariaFlowTo:mt,ariaGrabbed:Mt,ariaHasPopup:null,ariaHidden:Mt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:mt,ariaLevel:pe,ariaLive:null,ariaModal:Mt,ariaMultiLine:Mt,ariaMultiSelectable:Mt,ariaOrientation:null,ariaOwns:mt,ariaPlaceholder:null,ariaPosInSet:pe,ariaPressed:Mt,ariaReadOnly:Mt,ariaRelevant:null,ariaRequired:Mt,ariaRoleDescription:mt,ariaRowCount:pe,ariaRowIndex:pe,ariaRowSpan:pe,ariaSelected:Mt,ariaSetSize:pe,ariaSort:null,ariaValueMax:pe,ariaValueMin:pe,ariaValueNow:pe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function zk(e,t){return t in e?e[t]:t}function Mk(e,t){return zk(e,t.toLowerCase())}const Qj=el({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ns,acceptCharset:mt,accessKey:mt,action:null,allow:null,allowFullScreen:We,allowPaymentRequest:We,allowUserMedia:We,alt:null,as:null,async:We,autoCapitalize:null,autoComplete:mt,autoFocus:We,autoPlay:We,blocking:mt,capture:null,charSet:null,checked:We,cite:null,className:mt,cols:pe,colSpan:null,content:null,contentEditable:Mt,controls:We,controlsList:mt,coords:pe|Ns,crossOrigin:null,data:null,dateTime:null,decoding:null,default:We,defer:We,dir:null,dirName:null,disabled:We,download:bp,draggable:Mt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:We,formTarget:null,headers:mt,height:pe,hidden:bp,high:pe,href:null,hrefLang:null,htmlFor:mt,httpEquiv:mt,id:null,imageSizes:null,imageSrcSet:null,inert:We,inputMode:null,integrity:null,is:null,isMap:We,itemId:null,itemProp:mt,itemRef:mt,itemScope:We,itemType:mt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:We,low:pe,manifest:null,max:null,maxLength:pe,media:null,method:null,min:null,minLength:pe,multiple:We,muted:We,name:null,nonce:null,noModule:We,noValidate:We,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:We,optimum:pe,pattern:null,ping:mt,placeholder:null,playsInline:We,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:We,referrerPolicy:null,rel:mt,required:We,reversed:We,rows:pe,rowSpan:pe,sandbox:mt,scope:null,scoped:We,seamless:We,selected:We,shadowRootClonable:We,shadowRootDelegatesFocus:We,shadowRootMode:null,shape:null,size:pe,sizes:null,slot:null,span:pe,spellCheck:Mt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:pe,step:null,style:null,tabIndex:pe,target:null,title:null,translate:null,type:null,typeMustMatch:We,useMap:null,value:Mt,width:pe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:mt,axis:null,background:null,bgColor:null,border:pe,borderColor:null,bottomMargin:pe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:We,declare:We,event:null,face:null,frame:null,frameBorder:null,hSpace:pe,leftMargin:pe,link:null,longDesc:null,lowSrc:null,marginHeight:pe,marginWidth:pe,noResize:We,noHref:We,noShade:We,noWrap:We,object:null,profile:null,prompt:null,rev:null,rightMargin:pe,rules:null,scheme:null,scrolling:Mt,standby:null,summary:null,text:null,topMargin:pe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:pe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:We,disableRemotePlayback:We,prefix:null,property:null,results:pe,security:null,unselectable:null},space:"html",transform:Mk}),Yj=el({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Qn,accentHeight:pe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:pe,amplitude:pe,arabicForm:null,ascent:pe,attributeName:null,attributeType:null,azimuth:pe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:pe,by:null,calcMode:null,capHeight:pe,className:mt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:pe,diffuseConstant:pe,direction:null,display:null,dur:null,divisor:pe,dominantBaseline:null,download:We,dx:null,dy:null,edgeMode:null,editable:null,elevation:pe,enableBackground:null,end:null,event:null,exponent:pe,externalResourcesRequired:null,fill:null,fillOpacity:pe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ns,g2:Ns,glyphName:Ns,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:pe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:pe,horizOriginX:pe,horizOriginY:pe,id:null,ideographic:pe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:pe,k:pe,k1:pe,k2:pe,k3:pe,k4:pe,kernelMatrix:Qn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:pe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:pe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:pe,overlineThickness:pe,paintOrder:null,panose1:null,path:null,pathLength:pe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:mt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:pe,pointsAtY:pe,pointsAtZ:pe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Qn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Qn,rev:Qn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Qn,requiredFeatures:Qn,requiredFonts:Qn,requiredFormats:Qn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:pe,specularExponent:pe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:pe,strikethroughThickness:pe,string:null,stroke:null,strokeDashArray:Qn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:pe,strokeOpacity:pe,strokeWidth:null,style:null,surfaceScale:pe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Qn,tabIndex:pe,tableValues:null,target:null,targetX:pe,targetY:pe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Qn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:pe,underlineThickness:pe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:pe,values:null,vAlphabetic:pe,vMathematical:pe,vectorEffect:null,vHanging:pe,vIdeographic:pe,version:null,vertAdvY:pe,vertOriginX:pe,vertOriginY:pe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:pe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:zk}),Lk=el({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Fk=el({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Mk}),$k=el({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Kj={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Gj=/[A-Z]/g,Wx=/-[a-z]/g,Xj=/^data[-\w.:]+$/i;function Jj(e,t){const n=wp(t);let r=t,o=$n;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Xj.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(Wx,t2);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!Wx.test(l)){let a=l.replace(Gj,e2);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=Pm}return new o(r,t)}function e2(e){return"-"+e.toLowerCase()}function t2(e){return e.charAt(1).toUpperCase()}const n2=Ok([Dk,Qj,Lk,Fk,$k],"html"),Nm=Ok([Dk,Yj,Lk,Fk,$k],"svg");function r2(e){return e.join(" ").trim()}var ws={},Fh,Zx;function i2(){if(Zx)return Fh;Zx=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,u=/^\s+|\s+$/g,d=`
|
|
232
|
+
`,f="/",p="*",h="",v="comment",g="declaration";function S(C,E){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];E=E||{};var _=1,P=1;function R(q){var U=q.match(t);U&&(_+=U.length);var Z=q.lastIndexOf(d);P=~Z?q.length-Z:P+q.length}function I(){var q={line:_,column:P};return function(U){return U.position=new A(q),ne(),U}}function A(q){this.start=q,this.end={line:_,column:P},this.source=E.source}A.prototype.content=C;function H(q){var U=new Error(E.source+":"+_+":"+P+": "+q);if(U.reason=q,U.filename=E.source,U.line=_,U.column=P,U.source=C,!E.silent)throw U}function B(q){var U=q.exec(C);if(U){var Z=U[0];return R(Z),C=C.slice(Z.length),U}}function ne(){B(n)}function O(q){var U;for(q=q||[];U=Y();)U!==!1&&q.push(U);return q}function Y(){var q=I();if(!(f!=C.charAt(0)||p!=C.charAt(1))){for(var U=2;h!=C.charAt(U)&&(p!=C.charAt(U)||f!=C.charAt(U+1));)++U;if(U+=2,h===C.charAt(U-1))return H("End of comment missing");var Z=C.slice(2,U-2);return P+=2,R(Z),C=C.slice(U),P+=2,q({type:v,comment:Z})}}function G(){var q=I(),U=B(r);if(U){if(Y(),!B(o))return H("property missing ':'");var Z=B(l),J=q({type:g,property:k(U[0].replace(e,h)),value:Z?k(Z[0].replace(e,h)):h});return B(a),J}}function ae(){var q=[];O(q);for(var U;U=G();)U!==!1&&(q.push(U),O(q));return q}return ne(),ae()}function k(C){return C?C.replace(u,h):h}return Fh=S,Fh}var qx;function o2(){if(qx)return ws;qx=1;var e=ws&&ws.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=n;const t=e(i2());function n(r,o){let l=null;if(!r||typeof r!="string")return l;const a=(0,t.default)(r),u=typeof o=="function";return a.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:p}=d;u?o(f,p,d):p&&(l=l||{},l[f]=p)}),l}return ws}var Yl={},Qx;function s2(){if(Qx)return Yl;Qx=1,Object.defineProperty(Yl,"__esModule",{value:!0}),Yl.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,l=function(f){return!f||n.test(f)||e.test(f)},a=function(f,p){return p.toUpperCase()},u=function(f,p){return"".concat(p,"-")},d=function(f,p){return p===void 0&&(p={}),l(f)?f:(f=f.toLowerCase(),p.reactCompat?f=f.replace(o,u):f=f.replace(r,u),f.replace(t,a))};return Yl.camelCase=d,Yl}var Kl,Yx;function l2(){if(Yx)return Kl;Yx=1;var e=Kl&&Kl.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(o2()),n=s2();function r(o,l){var a={};return!o||typeof o!="string"||(0,t.default)(o,function(u,d){u&&d&&(a[(0,n.camelCase)(u,l)]=d)}),a}return r.default=r,Kl=r,Kl}var a2=l2();const u2=Qo(a2),Vk=Bk("end"),Rm=Bk("start");function Bk(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function c2(e){const t=Rm(e),n=Vk(e);if(t&&n)return{start:t,end:n}}function ra(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Kx(e.position):"start"in e||"end"in e?Kx(e):"line"in e||"column"in e?Sp(e):""}function Sp(e){return Gx(e&&e.line)+":"+Gx(e&&e.column)}function Kx(e){return Sp(e&&e.start)+"-"+Sp(e&&e.end)}function Gx(e){return e&&typeof e=="number"?e:1}class dn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",l={},a=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?o=t:!l.cause&&t&&(a=!0,o=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?l.ruleId=r:(l.source=r.slice(0,d),l.ruleId=r.slice(d+1))}if(!l.place&&l.ancestors&&l.ancestors){const d=l.ancestors[l.ancestors.length-1];d&&(l.place=d.position)}const u=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=u?u.line:void 0,this.name=ra(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=a&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}dn.prototype.file="";dn.prototype.name="";dn.prototype.reason="";dn.prototype.message="";dn.prototype.stack="";dn.prototype.column=void 0;dn.prototype.line=void 0;dn.prototype.ancestors=void 0;dn.prototype.cause=void 0;dn.prototype.fatal=void 0;dn.prototype.place=void 0;dn.prototype.ruleId=void 0;dn.prototype.source=void 0;const jm={}.hasOwnProperty,d2=new Map,f2=/[A-Z]/g,h2=new Set(["table","tbody","thead","tfoot","tr"]),p2=new Set(["td","th"]),Uk="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function m2(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=S2(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=k2(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Nm:n2,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=Hk(o,e,void 0);return l&&typeof l!="string"?l:o.create(e,o.Fragment,{children:l||void 0},void 0)}function Hk(e,t,n){if(t.type==="element")return g2(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return y2(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return x2(e,t,n);if(t.type==="mdxjsEsm")return v2(e,t);if(t.type==="root")return w2(e,t,n);if(t.type==="text")return b2(e,t)}function g2(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Nm,e.schema=o),e.ancestors.push(t);const l=Zk(e,t.tagName,!1),a=C2(e,t);let u=Im(e,t);return h2.has(t.tagName)&&(u=u.filter(function(d){return typeof d=="string"?!Zj(d):!0})),Wk(e,a,l,t),Am(a,u),e.ancestors.pop(),e.schema=r,e.create(t,l,a,n)}function y2(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ca(e,t.position)}function v2(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ca(e,t.position)}function x2(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Nm,e.schema=o),e.ancestors.push(t);const l=t.name===null?e.Fragment:Zk(e,t.name,!0),a=E2(e,t),u=Im(e,t);return Wk(e,a,l,t),Am(a,u),e.ancestors.pop(),e.schema=r,e.create(t,l,a,n)}function w2(e,t,n){const r={};return Am(r,Im(e,t)),e.create(t,e.Fragment,r,n)}function b2(e,t){return t.value}function Wk(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Am(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function k2(e,t,n){return r;function r(o,l,a,u){const f=Array.isArray(a.children)?n:t;return u?f(l,a,u):f(l,a)}}function S2(e,t){return n;function n(r,o,l,a){const u=Array.isArray(l.children),d=Rm(r);return t(o,l,a,u,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function C2(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&jm.call(t.properties,o)){const l=_2(e,o,t.properties[o]);if(l){const[a,u]=l;e.tableCellAlignToStyle&&a==="align"&&typeof u=="string"&&p2.has(t.tagName)?r=u:n[a]=u}}if(r){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function E2(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const a=l.expression;a.type;const u=a.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else ca(e,t.position);else{const o=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,l=e.evaluater.evaluateExpression(u.expression)}else ca(e,t.position);else l=r.value===null?!0:r.value;n[o]=l}return n}function Im(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:d2;for(;++r<t.children.length;){const l=t.children[r];let a;if(e.passKeys){const d=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(d){const f=o.get(d)||0;a=d+"-"+f,o.set(d,f+1)}}const u=Hk(e,l,a);u!==void 0&&n.push(u)}return n}function _2(e,t,n){const r=Jj(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Vj(n):r2(n)),r.property==="style"){let o=typeof n=="object"?n:T2(e,String(n));return e.stylePropertyNameCase==="css"&&(o=P2(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?Kj[r.property]||r.property:r.attribute,n]}}function T2(e,t){try{return u2(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new dn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=Uk+"#cannot-parse-style-attribute",o}}function Zk(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let l=-1,a;for(;++l<o.length;){const u=Bx(o[l])?{type:"Identifier",name:o[l]}:{type:"Literal",value:o[l]};a=a?{type:"MemberExpression",object:a,property:u,computed:!!(l&&u.type==="Literal"),optional:!1}:u}r=a}else r=Bx(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return jm.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);ca(e)}function ca(e,t){const n=new dn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Uk+"#cannot-handle-mdx-estrees-without-createevaluater",n}function P2(e){const t={};let n;for(n in e)jm.call(e,n)&&(t[N2(n)]=e[n]);return t}function N2(e){let t=e.replace(f2,R2);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function R2(e){return"-"+e.toLowerCase()}const $h={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},j2={};function Om(e,t){const n=j2,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return qk(e,r,o)}function qk(e,t,n){if(A2(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Xx(e.children,t,n)}return Array.isArray(e)?Xx(e,t,n):""}function Xx(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=qk(e[o],t,n);return r.join("")}function A2(e){return!!(e&&typeof e=="object")}const Jx=document.createElement("i");function Dm(e){const t="&"+e+";";Jx.innerHTML=t;const n=Jx.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Jn(e,t,n,r){const o=e.length;let l=0,a;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);l<r.length;)a=r.slice(l,l+1e4),a.unshift(t,0),e.splice(...a),l+=1e4,t+=1e4}function cr(e,t){return e.length>0?(Jn(e,e.length,0,t),e):t}const ew={}.hasOwnProperty;function Qk(e){const t={};let n=-1;for(;++n<e.length;)I2(t,e[n]);return t}function I2(e,t){let n;for(n in t){const o=(ew.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let a;if(l)for(a in l){ew.call(o,a)||(o[a]=[]);const u=l[a];O2(o[a],Array.isArray(u)?u:u?[u]:[])}}}function O2(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Jn(e,0,0,r)}function Yk(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Tr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const kn=oo(/[A-Za-z]/),cn=oo(/[\dA-Za-z]/),D2=oo(/[#-'*+\--9=?A-Z^-~]/);function Nc(e){return e!==null&&(e<32||e===127)}const Cp=oo(/\d/),z2=oo(/[\dA-Fa-f]/),M2=oo(/[!-/:-@[-`{-~]/);function $e(e){return e!==null&&e<-2}function ht(e){return e!==null&&(e<0||e===32)}function Ke(e){return e===-2||e===-1||e===32}const ad=oo(new RegExp("\\p{P}|\\p{S}","u")),Fo=oo(/\s/);function oo(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function tl(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const l=e.charCodeAt(n);let a="";if(l===37&&cn(e.charCodeAt(n+1))&&cn(e.charCodeAt(n+2)))o=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(a=String.fromCharCode(l));else if(l>55295&&l<57344){const u=e.charCodeAt(n+1);l<56320&&u>56319&&u<57344?(a=String.fromCharCode(l,u),o=1):a="�"}else a=String.fromCharCode(l);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Je(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let l=0;return a;function a(d){return Ke(d)?(e.enter(n),u(d)):t(d)}function u(d){return Ke(d)&&l++<o?(e.consume(d),u):(e.exit(n),t(d))}}const L2={tokenize:F2};function F2(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Je(e,t,"linePrefix")}function o(u){return e.enter("paragraph"),l(u)}function l(u){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,a(u)}function a(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return $e(u)?(e.consume(u),e.exit("chunkText"),l):(e.consume(u),a)}}const $2={tokenize:V2},tw={tokenize:B2};function V2(e){const t=this,n=[];let r=0,o,l,a;return u;function u(P){if(r<n.length){const R=n[r];return t.containerState=R[1],e.attempt(R[0].continuation,d,f)(P)}return f(P)}function d(P){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&_();const R=t.events.length;let I=R,A;for(;I--;)if(t.events[I][0]==="exit"&&t.events[I][1].type==="chunkFlow"){A=t.events[I][1].end;break}E(r);let H=R;for(;H<t.events.length;)t.events[H][1].end={...A},H++;return Jn(t.events,I+1,0,t.events.slice(R)),t.events.length=H,f(P)}return u(P)}function f(P){if(r===n.length){if(!o)return v(P);if(o.currentConstruct&&o.currentConstruct.concrete)return S(P);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(tw,p,h)(P)}function p(P){return o&&_(),E(r),v(P)}function h(P){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,S(P)}function v(P){return t.containerState={},e.attempt(tw,g,S)(P)}function g(P){return r++,n.push([t.currentConstruct,t.containerState]),v(P)}function S(P){if(P===null){o&&_(),E(0),e.consume(P);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:l}),k(P)}function k(P){if(P===null){C(e.exit("chunkFlow"),!0),E(0),e.consume(P);return}return $e(P)?(e.consume(P),C(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(P),k)}function C(P,R){const I=t.sliceStream(P);if(R&&I.push(null),P.previous=l,l&&(l.next=P),l=P,o.defineSkip(P.start),o.write(I),t.parser.lazy[P.start.line]){let A=o.events.length;for(;A--;)if(o.events[A][1].start.offset<a&&(!o.events[A][1].end||o.events[A][1].end.offset>a))return;const H=t.events.length;let B=H,ne,O;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){if(ne){O=t.events[B][1].end;break}ne=!0}for(E(r),A=H;A<t.events.length;)t.events[A][1].end={...O},A++;Jn(t.events,B+1,0,t.events.slice(H)),t.events.length=A}}function E(P){let R=n.length;for(;R-- >P;){const I=n[R];t.containerState=I[1],I[0].exit.call(t,e)}n.length=P}function _(){o.write([null]),l=void 0,o=void 0,t.containerState._closeFlow=void 0}}function B2(e,t,n){return Je(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ws(e){if(e===null||ht(e)||Fo(e))return 1;if(ad(e))return 2}function ud(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const l=e[o].resolveAll;l&&!r.includes(l)&&(t=l(t,n),r.push(l))}return t}const Ep={name:"attention",resolveAll:U2,tokenize:H2};function U2(e,t){let n=-1,r,o,l,a,u,d,f,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h={...e[r][1].end},v={...e[n][1].start};nw(h,-d),nw(v,d),a={type:d>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},u={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:v},l={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},o={type:d>1?"strong":"emphasis",start:{...a.start},end:{...u.end}},e[r][1].end={...a.start},e[n][1].start={...u.end},f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=cr(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=cr(f,[["enter",o,t],["enter",a,t],["exit",a,t],["enter",l,t]]),f=cr(f,ud(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=cr(f,[["exit",l,t],["enter",u,t],["exit",u,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=cr(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Jn(e,r-1,n-r+3,f),n=r+f.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function H2(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Ws(r);let l;return a;function a(d){return l=d,e.enter("attentionSequence"),u(d)}function u(d){if(d===l)return e.consume(d),u;const f=e.exit("attentionSequence"),p=Ws(d),h=!p||p===2&&o||n.includes(d),v=!o||o===2&&p||n.includes(r);return f._open=!!(l===42?h:h&&(o||!v)),f._close=!!(l===42?v:v&&(p||!h)),t(d)}}function nw(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const W2={name:"autolink",tokenize:Z2};function Z2(e,t,n){let r=0;return o;function o(g){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(g){return kn(g)?(e.consume(g),a):g===64?n(g):f(g)}function a(g){return g===43||g===45||g===46||cn(g)?(r=1,u(g)):f(g)}function u(g){return g===58?(e.consume(g),r=0,d):(g===43||g===45||g===46||cn(g))&&r++<32?(e.consume(g),u):(r=0,f(g))}function d(g){return g===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):g===null||g===32||g===60||Nc(g)?n(g):(e.consume(g),d)}function f(g){return g===64?(e.consume(g),p):D2(g)?(e.consume(g),f):n(g)}function p(g){return cn(g)?h(g):n(g)}function h(g){return g===46?(e.consume(g),r=0,p):g===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):v(g)}function v(g){if((g===45||cn(g))&&r++<63){const S=g===45?v:h;return e.consume(g),S}return n(g)}}const Ia={partial:!0,tokenize:q2};function q2(e,t,n){return r;function r(l){return Ke(l)?Je(e,o,"linePrefix")(l):o(l)}function o(l){return l===null||$e(l)?t(l):n(l)}}const Kk={continuation:{tokenize:Y2},exit:K2,name:"blockQuote",tokenize:Q2};function Q2(e,t,n){const r=this;return o;function o(a){if(a===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),l}return n(a)}function l(a){return Ke(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function Y2(e,t,n){const r=this;return o;function o(a){return Ke(a)?Je(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):l(a)}function l(a){return e.attempt(Kk,t,n)(a)}}function K2(e){e.exit("blockQuote")}const Gk={name:"characterEscape",tokenize:G2};function G2(e,t,n){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),o}function o(l){return M2(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const Xk={name:"characterReference",tokenize:X2};function X2(e,t,n){const r=this;let o=0,l,a;return u;function u(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),d}function d(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),l=31,a=cn,p(h))}function f(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,a=z2,p):(e.enter("characterReferenceValue"),l=7,a=Cp,p(h))}function p(h){if(h===59&&o){const v=e.exit("characterReferenceValue");return a===cn&&!Dm(r.sliceSerialize(v))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(h)&&o++<l?(e.consume(h),p):n(h)}}const rw={partial:!0,tokenize:eA},iw={concrete:!0,name:"codeFenced",tokenize:J2};function J2(e,t,n){const r=this,o={partial:!0,tokenize:I};let l=0,a=0,u;return d;function d(A){return f(A)}function f(A){const H=r.events[r.events.length-1];return l=H&&H[1].type==="linePrefix"?H[2].sliceSerialize(H[1],!0).length:0,u=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(A)}function p(A){return A===u?(a++,e.consume(A),p):a<3?n(A):(e.exit("codeFencedFenceSequence"),Ke(A)?Je(e,h,"whitespace")(A):h(A))}function h(A){return A===null||$e(A)?(e.exit("codeFencedFence"),r.interrupt?t(A):e.check(rw,k,R)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(A))}function v(A){return A===null||$e(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(A)):Ke(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Je(e,g,"whitespace")(A)):A===96&&A===u?n(A):(e.consume(A),v)}function g(A){return A===null||$e(A)?h(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(A))}function S(A){return A===null||$e(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(A)):A===96&&A===u?n(A):(e.consume(A),S)}function k(A){return e.attempt(o,R,C)(A)}function C(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),E}function E(A){return l>0&&Ke(A)?Je(e,_,"linePrefix",l+1)(A):_(A)}function _(A){return A===null||$e(A)?e.check(rw,k,R)(A):(e.enter("codeFlowValue"),P(A))}function P(A){return A===null||$e(A)?(e.exit("codeFlowValue"),_(A)):(e.consume(A),P)}function R(A){return e.exit("codeFenced"),t(A)}function I(A,H,B){let ne=0;return O;function O(U){return A.enter("lineEnding"),A.consume(U),A.exit("lineEnding"),Y}function Y(U){return A.enter("codeFencedFence"),Ke(U)?Je(A,G,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):G(U)}function G(U){return U===u?(A.enter("codeFencedFenceSequence"),ae(U)):B(U)}function ae(U){return U===u?(ne++,A.consume(U),ae):ne>=a?(A.exit("codeFencedFenceSequence"),Ke(U)?Je(A,q,"whitespace")(U):q(U)):B(U)}function q(U){return U===null||$e(U)?(A.exit("codeFencedFence"),H(U)):B(U)}}}function eA(e,t,n){const r=this;return o;function o(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),l)}function l(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const Vh={name:"codeIndented",tokenize:nA},tA={partial:!0,tokenize:rA};function nA(e,t,n){const r=this;return o;function o(f){return e.enter("codeIndented"),Je(e,l,"linePrefix",5)(f)}function l(f){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?a(f):n(f)}function a(f){return f===null?d(f):$e(f)?e.attempt(tA,a,d)(f):(e.enter("codeFlowValue"),u(f))}function u(f){return f===null||$e(f)?(e.exit("codeFlowValue"),a(f)):(e.consume(f),u)}function d(f){return e.exit("codeIndented"),t(f)}}function rA(e,t,n){const r=this;return o;function o(a){return r.parser.lazy[r.now().line]?n(a):$e(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):Je(e,l,"linePrefix",5)(a)}function l(a){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(a):$e(a)?o(a):n(a)}}const iA={name:"codeText",previous:sA,resolve:oA,tokenize:lA};function oA(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function sA(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function lA(e,t,n){let r=0,o,l;return a;function a(h){return e.enter("codeText"),e.enter("codeTextSequence"),u(h)}function u(h){return h===96?(e.consume(h),r++,u):(e.exit("codeTextSequence"),d(h))}function d(h){return h===null?n(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),d):h===96?(l=e.enter("codeTextSequence"),o=0,p(h)):$e(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(h))}function f(h){return h===null||h===32||h===96||$e(h)?(e.exit("codeTextData"),d(h)):(e.consume(h),f)}function p(h){return h===96?(e.consume(h),o++,p):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(l.type="codeTextData",f(h))}}class aA{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Gl(this.left,r),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Gl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Gl(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Gl(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Gl(this.left,n.reverse())}}}function Gl(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Jk(e){const t={};let n=-1,r,o,l,a,u,d,f;const p=new aA(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(r=p.get(n),n&&r[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,l=0,l<d.length&&d[l][1].type==="lineEndingBlank"&&(l+=2),l<d.length&&d[l][1].type==="content"))for(;++l<d.length&&d[l][1].type!=="content";)d[l][1].type==="chunkText"&&(d[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,uA(p,n)),n=t[n],f=!0);else if(r[1]._container){for(l=n,o=void 0;l--;)if(a=p.get(l),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),a[1].type="lineEnding",o=l);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;o&&(r[1].end={...p.get(o)[1].start},u=p.slice(o,n),u.unshift(r),p.splice(o,n-o+1,u))}}return Jn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function uA(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const l=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const u=a.events,d=[],f={};let p,h,v=-1,g=n,S=0,k=0;const C=[k];for(;g;){for(;e.get(++o)[1]!==g;);l.push(o),g._tokenizer||(p=r.sliceStream(g),g.next||p.push(null),h&&a.defineSkip(g.start),g._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(p),g._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),h=g,g=g.next}for(g=n;++v<u.length;)u[v][0]==="exit"&&u[v-1][0]==="enter"&&u[v][1].type===u[v-1][1].type&&u[v][1].start.line!==u[v][1].end.line&&(k=v+1,C.push(k),g._tokenizer=void 0,g.previous=void 0,g=g.next);for(a.events=[],g?(g._tokenizer=void 0,g.previous=void 0):C.pop(),v=C.length;v--;){const E=u.slice(C[v],C[v+1]),_=l.pop();d.push([_,_+E.length-1]),e.splice(_,2,E)}for(d.reverse(),v=-1;++v<d.length;)f[S+d[v][0]]=S+d[v][1],S+=d[v][1]-d[v][0]-1;return f}const cA={resolve:fA,tokenize:hA},dA={partial:!0,tokenize:pA};function fA(e){return Jk(e),e}function hA(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(u)}function o(u){return u===null?l(u):$e(u)?e.check(dA,a,l)(u):(e.consume(u),o)}function l(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function a(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function pA(e,t,n){const r=this;return o;function o(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Je(e,l,"linePrefix")}function l(a){if(a===null||$e(a))return n(a);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function e1(e,t,n,r,o,l,a,u,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return h;function h(E){return E===60?(e.enter(r),e.enter(o),e.enter(l),e.consume(E),e.exit(l),v):E===null||E===32||E===41||Nc(E)?n(E):(e.enter(r),e.enter(a),e.enter(u),e.enter("chunkString",{contentType:"string"}),k(E))}function v(E){return E===62?(e.enter(l),e.consume(E),e.exit(l),e.exit(o),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),g(E))}function g(E){return E===62?(e.exit("chunkString"),e.exit(u),v(E)):E===null||E===60||$e(E)?n(E):(e.consume(E),E===92?S:g)}function S(E){return E===60||E===62||E===92?(e.consume(E),g):g(E)}function k(E){return!p&&(E===null||E===41||ht(E))?(e.exit("chunkString"),e.exit(u),e.exit(a),e.exit(r),t(E)):p<f&&E===40?(e.consume(E),p++,k):E===41?(e.consume(E),p--,k):E===null||E===32||E===40||Nc(E)?n(E):(e.consume(E),E===92?C:k)}function C(E){return E===40||E===41||E===92?(e.consume(E),k):k(E)}}function t1(e,t,n,r,o,l){const a=this;let u=0,d;return f;function f(g){return e.enter(r),e.enter(o),e.consume(g),e.exit(o),e.enter(l),p}function p(g){return u>999||g===null||g===91||g===93&&!d||g===94&&!u&&"_hiddenFootnoteSupport"in a.parser.constructs?n(g):g===93?(e.exit(l),e.enter(o),e.consume(g),e.exit(o),e.exit(r),t):$e(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===null||g===91||g===93||$e(g)||u++>999?(e.exit("chunkString"),p(g)):(e.consume(g),d||(d=!Ke(g)),g===92?v:h)}function v(g){return g===91||g===92||g===93?(e.consume(g),u++,h):h(g)}}function n1(e,t,n,r,o,l){let a;return u;function u(v){return v===34||v===39||v===40?(e.enter(r),e.enter(o),e.consume(v),e.exit(o),a=v===40?41:v,d):n(v)}function d(v){return v===a?(e.enter(o),e.consume(v),e.exit(o),e.exit(r),t):(e.enter(l),f(v))}function f(v){return v===a?(e.exit(l),d(a)):v===null?n(v):$e(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),Je(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===a||v===null||$e(v)?(e.exit("chunkString"),f(v)):(e.consume(v),v===92?h:p)}function h(v){return v===a||v===92?(e.consume(v),p):p(v)}}function ia(e,t){let n;return r;function r(o){return $e(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Ke(o)?Je(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const mA={name:"definition",tokenize:yA},gA={partial:!0,tokenize:vA};function yA(e,t,n){const r=this;let o;return l;function l(g){return e.enter("definition"),a(g)}function a(g){return t1.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function u(g){return o=Tr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),d):n(g)}function d(g){return ht(g)?ia(e,f)(g):f(g)}function f(g){return e1(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function p(g){return e.attempt(gA,h,h)(g)}function h(g){return Ke(g)?Je(e,v,"whitespace")(g):v(g)}function v(g){return g===null||$e(g)?(e.exit("definition"),r.parser.defined.push(o),t(g)):n(g)}}function vA(e,t,n){return r;function r(u){return ht(u)?ia(e,o)(u):n(u)}function o(u){return n1(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function l(u){return Ke(u)?Je(e,a,"whitespace")(u):a(u)}function a(u){return u===null||$e(u)?t(u):n(u)}}const xA={name:"hardBreakEscape",tokenize:wA};function wA(e,t,n){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),o}function o(l){return $e(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const bA={name:"headingAtx",resolve:kA,tokenize:SA};function kA(e,t){let n=e.length-2,r=3,o,l;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},l={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Jn(e,r,n-r+1,[["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t]])),e}function SA(e,t,n){let r=0;return o;function o(p){return e.enter("atxHeading"),l(p)}function l(p){return e.enter("atxHeadingSequence"),a(p)}function a(p){return p===35&&r++<6?(e.consume(p),a):p===null||ht(p)?(e.exit("atxHeadingSequence"),u(p)):n(p)}function u(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||$e(p)?(e.exit("atxHeading"),t(p)):Ke(p)?Je(e,u,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),u(p))}function f(p){return p===null||p===35||ht(p)?(e.exit("atxHeadingText"),u(p)):(e.consume(p),f)}}const CA=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ow=["pre","script","style","textarea"],EA={concrete:!0,name:"htmlFlow",resolveTo:PA,tokenize:NA},_A={partial:!0,tokenize:jA},TA={partial:!0,tokenize:RA};function PA(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function NA(e,t,n){const r=this;let o,l,a,u,d;return f;function f(j){return p(j)}function p(j){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(j),h}function h(j){return j===33?(e.consume(j),v):j===47?(e.consume(j),l=!0,k):j===63?(e.consume(j),o=3,r.interrupt?t:N):kn(j)?(e.consume(j),a=String.fromCharCode(j),C):n(j)}function v(j){return j===45?(e.consume(j),o=2,g):j===91?(e.consume(j),o=5,u=0,S):kn(j)?(e.consume(j),o=4,r.interrupt?t:N):n(j)}function g(j){return j===45?(e.consume(j),r.interrupt?t:N):n(j)}function S(j){const ue="CDATA[";return j===ue.charCodeAt(u++)?(e.consume(j),u===ue.length?r.interrupt?t:G:S):n(j)}function k(j){return kn(j)?(e.consume(j),a=String.fromCharCode(j),C):n(j)}function C(j){if(j===null||j===47||j===62||ht(j)){const ue=j===47,ve=a.toLowerCase();return!ue&&!l&&ow.includes(ve)?(o=1,r.interrupt?t(j):G(j)):CA.includes(a.toLowerCase())?(o=6,ue?(e.consume(j),E):r.interrupt?t(j):G(j)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(j):l?_(j):P(j))}return j===45||cn(j)?(e.consume(j),a+=String.fromCharCode(j),C):n(j)}function E(j){return j===62?(e.consume(j),r.interrupt?t:G):n(j)}function _(j){return Ke(j)?(e.consume(j),_):O(j)}function P(j){return j===47?(e.consume(j),O):j===58||j===95||kn(j)?(e.consume(j),R):Ke(j)?(e.consume(j),P):O(j)}function R(j){return j===45||j===46||j===58||j===95||cn(j)?(e.consume(j),R):I(j)}function I(j){return j===61?(e.consume(j),A):Ke(j)?(e.consume(j),I):P(j)}function A(j){return j===null||j===60||j===61||j===62||j===96?n(j):j===34||j===39?(e.consume(j),d=j,H):Ke(j)?(e.consume(j),A):B(j)}function H(j){return j===d?(e.consume(j),d=null,ne):j===null||$e(j)?n(j):(e.consume(j),H)}function B(j){return j===null||j===34||j===39||j===47||j===60||j===61||j===62||j===96||ht(j)?I(j):(e.consume(j),B)}function ne(j){return j===47||j===62||Ke(j)?P(j):n(j)}function O(j){return j===62?(e.consume(j),Y):n(j)}function Y(j){return j===null||$e(j)?G(j):Ke(j)?(e.consume(j),Y):n(j)}function G(j){return j===45&&o===2?(e.consume(j),Z):j===60&&o===1?(e.consume(j),J):j===62&&o===4?(e.consume(j),M):j===63&&o===3?(e.consume(j),N):j===93&&o===5?(e.consume(j),K):$e(j)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(_A,Q,ae)(j)):j===null||$e(j)?(e.exit("htmlFlowData"),ae(j)):(e.consume(j),G)}function ae(j){return e.check(TA,q,Q)(j)}function q(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),U}function U(j){return j===null||$e(j)?ae(j):(e.enter("htmlFlowData"),G(j))}function Z(j){return j===45?(e.consume(j),N):G(j)}function J(j){return j===47?(e.consume(j),a="",D):G(j)}function D(j){if(j===62){const ue=a.toLowerCase();return ow.includes(ue)?(e.consume(j),M):G(j)}return kn(j)&&a.length<8?(e.consume(j),a+=String.fromCharCode(j),D):G(j)}function K(j){return j===93?(e.consume(j),N):G(j)}function N(j){return j===62?(e.consume(j),M):j===45&&o===2?(e.consume(j),N):G(j)}function M(j){return j===null||$e(j)?(e.exit("htmlFlowData"),Q(j)):(e.consume(j),M)}function Q(j){return e.exit("htmlFlow"),t(j)}}function RA(e,t,n){const r=this;return o;function o(a){return $e(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),l):n(a)}function l(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function jA(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Ia,t,n)}}const AA={name:"htmlText",tokenize:IA};function IA(e,t,n){const r=this;let o,l,a;return u;function u(N){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(N),d}function d(N){return N===33?(e.consume(N),f):N===47?(e.consume(N),I):N===63?(e.consume(N),P):kn(N)?(e.consume(N),B):n(N)}function f(N){return N===45?(e.consume(N),p):N===91?(e.consume(N),l=0,S):kn(N)?(e.consume(N),_):n(N)}function p(N){return N===45?(e.consume(N),g):n(N)}function h(N){return N===null?n(N):N===45?(e.consume(N),v):$e(N)?(a=h,J(N)):(e.consume(N),h)}function v(N){return N===45?(e.consume(N),g):h(N)}function g(N){return N===62?Z(N):N===45?v(N):h(N)}function S(N){const M="CDATA[";return N===M.charCodeAt(l++)?(e.consume(N),l===M.length?k:S):n(N)}function k(N){return N===null?n(N):N===93?(e.consume(N),C):$e(N)?(a=k,J(N)):(e.consume(N),k)}function C(N){return N===93?(e.consume(N),E):k(N)}function E(N){return N===62?Z(N):N===93?(e.consume(N),E):k(N)}function _(N){return N===null||N===62?Z(N):$e(N)?(a=_,J(N)):(e.consume(N),_)}function P(N){return N===null?n(N):N===63?(e.consume(N),R):$e(N)?(a=P,J(N)):(e.consume(N),P)}function R(N){return N===62?Z(N):P(N)}function I(N){return kn(N)?(e.consume(N),A):n(N)}function A(N){return N===45||cn(N)?(e.consume(N),A):H(N)}function H(N){return $e(N)?(a=H,J(N)):Ke(N)?(e.consume(N),H):Z(N)}function B(N){return N===45||cn(N)?(e.consume(N),B):N===47||N===62||ht(N)?ne(N):n(N)}function ne(N){return N===47?(e.consume(N),Z):N===58||N===95||kn(N)?(e.consume(N),O):$e(N)?(a=ne,J(N)):Ke(N)?(e.consume(N),ne):Z(N)}function O(N){return N===45||N===46||N===58||N===95||cn(N)?(e.consume(N),O):Y(N)}function Y(N){return N===61?(e.consume(N),G):$e(N)?(a=Y,J(N)):Ke(N)?(e.consume(N),Y):ne(N)}function G(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),o=N,ae):$e(N)?(a=G,J(N)):Ke(N)?(e.consume(N),G):(e.consume(N),q)}function ae(N){return N===o?(e.consume(N),o=void 0,U):N===null?n(N):$e(N)?(a=ae,J(N)):(e.consume(N),ae)}function q(N){return N===null||N===34||N===39||N===60||N===61||N===96?n(N):N===47||N===62||ht(N)?ne(N):(e.consume(N),q)}function U(N){return N===47||N===62||ht(N)?ne(N):n(N)}function Z(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),t):n(N)}function J(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),D}function D(N){return Ke(N)?Je(e,K,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):K(N)}function K(N){return e.enter("htmlTextData"),a(N)}}const zm={name:"labelEnd",resolveAll:MA,resolveTo:LA,tokenize:FA},OA={tokenize:$A},DA={tokenize:VA},zA={tokenize:BA};function MA(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&Jn(e,0,e.length,n),e}function LA(e,t){let n=e.length,r=0,o,l,a,u;for(;n--;)if(o=e[n][1],l){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(l=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(a=n);const d={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[l][1].start},end:{...e[a][1].end}},p={type:"labelText",start:{...e[l+r+2][1].end},end:{...e[a-2][1].start}};return u=[["enter",d,t],["enter",f,t]],u=cr(u,e.slice(l+1,l+r+3)),u=cr(u,[["enter",p,t]]),u=cr(u,ud(t.parser.constructs.insideSpan.null,e.slice(l+r+4,a-3),t)),u=cr(u,[["exit",p,t],e[a-2],e[a-1],["exit",f,t]]),u=cr(u,e.slice(a+1)),u=cr(u,[["exit",d,t]]),Jn(e,l,e.length,u),e}function FA(e,t,n){const r=this;let o=r.events.length,l,a;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){l=r.events[o][1];break}return u;function u(v){return l?l._inactive?h(v):(a=r.parser.defined.includes(Tr(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),d):n(v)}function d(v){return v===40?e.attempt(OA,p,a?p:h)(v):v===91?e.attempt(DA,p,a?f:h)(v):a?p(v):h(v)}function f(v){return e.attempt(zA,p,h)(v)}function p(v){return t(v)}function h(v){return l._balanced=!0,n(v)}}function $A(e,t,n){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),o}function o(h){return ht(h)?ia(e,l)(h):l(h)}function l(h){return h===41?p(h):e1(e,a,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function a(h){return ht(h)?ia(e,d)(h):p(h)}function u(h){return n(h)}function d(h){return h===34||h===39||h===40?n1(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):p(h)}function f(h){return ht(h)?ia(e,p)(h):p(h)}function p(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function VA(e,t,n){const r=this;return o;function o(u){return t1.call(r,e,l,a,"reference","referenceMarker","referenceString")(u)}function l(u){return r.parser.defined.includes(Tr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function a(u){return n(u)}}function BA(e,t,n){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),o}function o(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const UA={name:"labelStartImage",resolveAll:zm.resolveAll,tokenize:HA};function HA(e,t,n){const r=this;return o;function o(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),l}function l(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),a):n(u)}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const WA={name:"labelStartLink",resolveAll:zm.resolveAll,tokenize:ZA};function ZA(e,t,n){const r=this;return o;function o(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),l}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Bh={name:"lineEnding",tokenize:qA};function qA(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Je(e,t,"linePrefix")}}const wc={name:"thematicBreak",tokenize:QA};function QA(e,t,n){let r=0,o;return l;function l(f){return e.enter("thematicBreak"),a(f)}function a(f){return o=f,u(f)}function u(f){return f===o?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||$e(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===o?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Ke(f)?Je(e,u,"whitespace")(f):u(f))}}const On={continuation:{tokenize:XA},exit:eI,name:"list",tokenize:GA},YA={partial:!0,tokenize:tI},KA={partial:!0,tokenize:JA};function GA(e,t,n){const r=this,o=r.events[r.events.length-1];let l=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,a=0;return u;function u(g){const S=r.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!r.containerState.marker||g===r.containerState.marker:Cp(g)){if(r.containerState.type||(r.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(wc,n,f)(g):f(g);if(!r.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(g)}return n(g)}function d(g){return Cp(g)&&++a<10?(e.consume(g),d):(!r.interrupt||a<2)&&(r.containerState.marker?g===r.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),f(g)):n(g)}function f(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||g,e.check(Ia,r.interrupt?n:p,e.attempt(YA,v,h))}function p(g){return r.containerState.initialBlankLine=!0,l++,v(g)}function h(g){return Ke(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),v):n(g)}function v(g){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(g)}}function XA(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ia,o,l);function o(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Je(e,t,"listItemIndent",r.containerState.size+1)(u)}function l(u){return r.containerState.furtherBlankLines||!Ke(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(KA,t,a)(u))}function a(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,Je(e,e.attempt(On,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function JA(e,t,n){const r=this;return Je(e,o,"listItemIndent",r.containerState.size+1);function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(l):n(l)}}function eI(e){e.exit(this.containerState.type)}function tI(e,t,n){const r=this;return Je(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(l){const a=r.events[r.events.length-1];return!Ke(l)&&a&&a[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const sw={name:"setextUnderline",resolveTo:nI,tokenize:rI};function nI(e,t){let n=e.length,r,o,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",l?(e.splice(o,0,["enter",a,t]),e.splice(l+1,0,["exit",e[r][1],t]),e[r][1].end={...e[l][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function rI(e,t,n){const r=this;let o;return l;function l(f){let p=r.events.length,h;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){h=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),o=f,a(f)):n(f)}function a(f){return e.enter("setextHeadingLineSequence"),u(f)}function u(f){return f===o?(e.consume(f),u):(e.exit("setextHeadingLineSequence"),Ke(f)?Je(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||$e(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const iI={tokenize:oI};function oI(e){const t=this,n=e.attempt(Ia,r,e.attempt(this.parser.constructs.flowInitial,o,Je(e,e.attempt(this.parser.constructs.flow,o,e.attempt(cA,o)),"linePrefix")));return n;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const sI={resolveAll:i1()},lI=r1("string"),aI=r1("text");function r1(e){return{resolveAll:i1(e==="text"?uI:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],l=n.attempt(o,a,u);return a;function a(p){return f(p)?l(p):u(p)}function u(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return f(p)?(n.exit("data"),l(p)):(n.consume(p),d)}function f(p){if(p===null)return!0;const h=o[p];let v=-1;if(h)for(;++v<h.length;){const g=h[v];if(!g.previous||g.previous.call(r,r.previous))return!0}return!1}}}function i1(e){return t;function t(n,r){let o=-1,l;for(;++o<=n.length;)l===void 0?n[o]&&n[o][1].type==="data"&&(l=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==l+2&&(n[l][1].end=n[o-1][1].end,n.splice(l+2,o-l-2),o=l+2),l=void 0);return e?e(n,r):n}}function uI(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let l=o.length,a=-1,u=0,d;for(;l--;){const f=o[l];if(typeof f=="string"){for(a=f.length;f.charCodeAt(a-1)===32;)u++,a--;if(a)break;a=-1}else if(f===-2)d=!0,u++;else if(f!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const f={type:n===e.length||d||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?a:r.start._bufferIndex+a,_index:r.start._index+l,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...f.start},r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const cI={42:On,43:On,45:On,48:On,49:On,50:On,51:On,52:On,53:On,54:On,55:On,56:On,57:On,62:Kk},dI={91:mA},fI={[-2]:Vh,[-1]:Vh,32:Vh},hI={35:bA,42:wc,45:[sw,wc],60:EA,61:sw,95:wc,96:iw,126:iw},pI={38:Xk,92:Gk},mI={[-5]:Bh,[-4]:Bh,[-3]:Bh,33:UA,38:Xk,42:Ep,60:[W2,AA],91:WA,92:[xA,Gk],93:zm,95:Ep,96:iA},gI={null:[Ep,sI]},yI={null:[42,95]},vI={null:[]},xI=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:yI,contentInitial:dI,disable:vI,document:cI,flow:hI,flowInitial:fI,insideSpan:gI,string:pI,text:mI},Symbol.toStringTag,{value:"Module"}));function wI(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},l=[];let a=[],u=[];const d={attempt:H(I),check:H(A),consume:_,enter:P,exit:R,interrupt:H(A,{interrupt:!0})},f={code:null,containerState:{},defineSkip:k,events:[],now:S,parser:e,previous:null,sliceSerialize:v,sliceStream:g,write:h};let p=t.tokenize.call(f,d);return t.resolveAll&&l.push(t),f;function h(Y){return a=cr(a,Y),C(),a[a.length-1]!==null?[]:(B(t,0),f.events=ud(l,f.events,f),f.events)}function v(Y,G){return kI(g(Y),G)}function g(Y){return bI(a,Y)}function S(){const{_bufferIndex:Y,_index:G,line:ae,column:q,offset:U}=r;return{_bufferIndex:Y,_index:G,line:ae,column:q,offset:U}}function k(Y){o[Y.line]=Y.column,O()}function C(){let Y;for(;r._index<a.length;){const G=a[r._index];if(typeof G=="string")for(Y=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===Y&&r._bufferIndex<G.length;)E(G.charCodeAt(r._bufferIndex));else E(G)}}function E(Y){p=p(Y)}function _(Y){$e(Y)?(r.line++,r.column=1,r.offset+=Y===-3?2:1,O()):Y!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=Y}function P(Y,G){const ae=G||{};return ae.type=Y,ae.start=S(),f.events.push(["enter",ae,f]),u.push(ae),ae}function R(Y){const G=u.pop();return G.end=S(),f.events.push(["exit",G,f]),G}function I(Y,G){B(Y,G.from)}function A(Y,G){G.restore()}function H(Y,G){return ae;function ae(q,U,Z){let J,D,K,N;return Array.isArray(q)?Q(q):"tokenize"in q?Q([q]):M(q);function M(xe){return re;function re(me){const Se=me!==null&&xe[me],be=me!==null&&xe.null,Ie=[...Array.isArray(Se)?Se:Se?[Se]:[],...Array.isArray(be)?be:be?[be]:[]];return Q(Ie)(me)}}function Q(xe){return J=xe,D=0,xe.length===0?Z:j(xe[D])}function j(xe){return re;function re(me){return N=ne(),K=xe,xe.partial||(f.currentConstruct=xe),xe.name&&f.parser.constructs.disable.null.includes(xe.name)?ve():xe.tokenize.call(G?Object.assign(Object.create(f),G):f,d,ue,ve)(me)}}function ue(xe){return Y(K,N),U}function ve(xe){return N.restore(),++D<J.length?j(J[D]):Z}}}function B(Y,G){Y.resolveAll&&!l.includes(Y)&&l.push(Y),Y.resolve&&Jn(f.events,G,f.events.length-G,Y.resolve(f.events.slice(G),f)),Y.resolveTo&&(f.events=Y.resolveTo(f.events,f))}function ne(){const Y=S(),G=f.previous,ae=f.currentConstruct,q=f.events.length,U=Array.from(u);return{from:q,restore:Z};function Z(){r=Y,f.previous=G,f.currentConstruct=ae,f.events.length=q,u=U,O()}}function O(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function bI(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,l=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,l)];else{if(a=e.slice(n,o),r>-1){const u=a[0];typeof u=="string"?a[0]=u.slice(r):a.shift()}l>0&&a.push(e[o].slice(0,l))}return a}function kI(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const l=e[n];let a;if(typeof l=="string")a=l;else switch(l){case-5:{a="\r";break}case-4:{a=`
|
|
233
|
+
`;break}case-3:{a=`\r
|
|
234
|
+
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&o)continue;a=" ";break}default:a=String.fromCharCode(l)}o=l===-2,r.push(a)}return r.join("")}function SI(e){const r={constructs:Qk([xI,...(e||{}).extensions||[]]),content:o(L2),defined:[],document:o($2),flow:o(iI),lazy:{},string:o(lI),text:o(aI)};return r;function o(l){return a;function a(u){return wI(r,l,u)}}}function CI(e){for(;!Jk(e););return e}const lw=/[\0\t\n\r]/g;function EI(){let e=1,t="",n=!0,r;return o;function o(l,a,u){const d=[];let f,p,h,v,g;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(a||void 0).decode(l)),h=0,t="",n&&(l.charCodeAt(0)===65279&&h++,n=void 0);h<l.length;){if(lw.lastIndex=h,f=lw.exec(l),v=f&&f.index!==void 0?f.index:l.length,g=l.charCodeAt(v),!f){t=l.slice(h);break}if(g===10&&h===v&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),h<v&&(d.push(l.slice(h,v)),e+=v-h),g){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}h=v+1}return u&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const _I=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function TI(e){return e.replace(_I,PI)}function PI(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),l=o===120||o===88;return Yk(n.slice(l?2:1),l?16:10)}return Dm(n)||e}const o1={}.hasOwnProperty;function NI(e,t,n){return typeof t!="string"&&(n=t,t=void 0),RI(n)(CI(SI(n).document().write(EI()(e,t,!0))))}function RI(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(fn),autolinkProtocol:ne,autolinkEmail:ne,atxHeading:l(Zt),blockQuote:l(be),characterEscape:ne,characterReference:ne,codeFenced:l(Ie),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:l(Ie,a),codeText:l(Ue,a),codeTextData:ne,data:ne,codeFlowValue:ne,definition:l(ot),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:l(It),hardBreakEscape:l(on),hardBreakTrailing:l(on),htmlFlow:l(Xt,a),htmlFlowData:ne,htmlText:l(Xt,a),htmlTextData:ne,image:l(Bn),label:a,link:l(fn),listItem:l(L),listItemValue:v,listOrdered:l(qt,h),listUnordered:l(qt),paragraph:l(ee),reference:j,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:l(Zt),strong:l(oe),thematicBreak:l(ye)},exit:{atxHeading:d(),atxHeadingSequence:I,autolink:d(),autolinkEmail:Se,autolinkProtocol:me,blockQuote:d(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:ve,characterReferenceMarkerNumeric:ve,characterReferenceValue:xe,characterReference:re,codeFenced:d(C),codeFencedFence:k,codeFencedFenceInfo:g,codeFencedFenceMeta:S,codeFlowValue:O,codeIndented:d(E),codeText:d(U),codeTextData:O,data:O,definition:d(),definitionDestinationString:R,definitionLabelString:_,definitionTitleString:P,emphasis:d(),hardBreakEscape:d(G),hardBreakTrailing:d(G),htmlFlow:d(ae),htmlFlowData:O,htmlText:d(q),htmlTextData:O,image:d(J),label:K,labelText:D,lineEnding:Y,link:d(Z),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ue,resourceDestinationString:N,resourceTitleString:M,resource:Q,setextHeading:d(B),setextHeadingLineSequence:H,setextHeadingText:A,strong:d(),thematicBreak:d()}};s1(t,(e||{}).mdastExtensions||[]);const n={};return r;function r($){let se={type:"root",children:[]};const ke={stack:[se],tokenStack:[],config:t,enter:u,exit:f,buffer:a,resume:p,data:n},_e=[];let De=-1;for(;++De<$.length;)if($[De][1].type==="listOrdered"||$[De][1].type==="listUnordered")if($[De][0]==="enter")_e.push(De);else{const dt=_e.pop();De=o($,dt,De)}for(De=-1;++De<$.length;){const dt=t[$[De][0]];o1.call(dt,$[De][1].type)&&dt[$[De][1].type].call(Object.assign({sliceSerialize:$[De][2].sliceSerialize},ke),$[De][1])}if(ke.tokenStack.length>0){const dt=ke.tokenStack[ke.tokenStack.length-1];(dt[1]||aw).call(ke,void 0,dt[0])}for(se.position={start:Li($.length>0?$[0][1].start:{line:1,column:1,offset:0}),end:Li($.length>0?$[$.length-2][1].end:{line:1,column:1,offset:0})},De=-1;++De<t.transforms.length;)se=t.transforms[De](se)||se;return se}function o($,se,ke){let _e=se-1,De=-1,dt=!1,kt,Jt,En,_n;for(;++_e<=ke;){const Tt=$[_e];switch(Tt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Tt[0]==="enter"?De++:De--,_n=void 0;break}case"lineEndingBlank":{Tt[0]==="enter"&&(kt&&!_n&&!De&&!En&&(En=_e),_n=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:_n=void 0}if(!De&&Tt[0]==="enter"&&Tt[1].type==="listItemPrefix"||De===-1&&Tt[0]==="exit"&&(Tt[1].type==="listUnordered"||Tt[1].type==="listOrdered")){if(kt){let hn=_e;for(Jt=void 0;hn--;){const Vt=$[hn];if(Vt[1].type==="lineEnding"||Vt[1].type==="lineEndingBlank"){if(Vt[0]==="exit")continue;Jt&&($[Jt][1].type="lineEndingBlank",dt=!0),Vt[1].type="lineEnding",Jt=hn}else if(!(Vt[1].type==="linePrefix"||Vt[1].type==="blockQuotePrefix"||Vt[1].type==="blockQuotePrefixWhitespace"||Vt[1].type==="blockQuoteMarker"||Vt[1].type==="listItemIndent"))break}En&&(!Jt||En<Jt)&&(kt._spread=!0),kt.end=Object.assign({},Jt?$[Jt][1].start:Tt[1].end),$.splice(Jt||_e,0,["exit",kt,Tt[2]]),_e++,ke++}if(Tt[1].type==="listItemPrefix"){const hn={type:"listItem",_spread:!1,start:Object.assign({},Tt[1].start),end:void 0};kt=hn,$.splice(_e,0,["enter",hn,Tt[2]]),_e++,ke++,En=void 0,_n=!0}}}return $[se][1]._spread=dt,ke}function l($,se){return ke;function ke(_e){u.call(this,$(_e),_e),se&&se.call(this,_e)}}function a(){this.stack.push({type:"fragment",children:[]})}function u($,se,ke){this.stack[this.stack.length-1].children.push($),this.stack.push($),this.tokenStack.push([se,ke||void 0]),$.position={start:Li(se.start),end:void 0}}function d($){return se;function se(ke){$&&$.call(this,ke),f.call(this,ke)}}function f($,se){const ke=this.stack.pop(),_e=this.tokenStack.pop();if(_e)_e[0].type!==$.type&&(se?se.call(this,$,_e[0]):(_e[1]||aw).call(this,$,_e[0]));else throw new Error("Cannot close `"+$.type+"` ("+ra({start:$.start,end:$.end})+"): it’s not open");ke.position.end=Li($.end)}function p(){return Om(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function v($){if(this.data.expectingFirstListItemValue){const se=this.stack[this.stack.length-2];se.start=Number.parseInt(this.sliceSerialize($),10),this.data.expectingFirstListItemValue=void 0}}function g(){const $=this.resume(),se=this.stack[this.stack.length-1];se.lang=$}function S(){const $=this.resume(),se=this.stack[this.stack.length-1];se.meta=$}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const $=this.resume(),se=this.stack[this.stack.length-1];se.value=$.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const $=this.resume(),se=this.stack[this.stack.length-1];se.value=$.replace(/(\r?\n|\r)$/g,"")}function _($){const se=this.resume(),ke=this.stack[this.stack.length-1];ke.label=se,ke.identifier=Tr(this.sliceSerialize($)).toLowerCase()}function P(){const $=this.resume(),se=this.stack[this.stack.length-1];se.title=$}function R(){const $=this.resume(),se=this.stack[this.stack.length-1];se.url=$}function I($){const se=this.stack[this.stack.length-1];if(!se.depth){const ke=this.sliceSerialize($).length;se.depth=ke}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function H($){const se=this.stack[this.stack.length-1];se.depth=this.sliceSerialize($).codePointAt(0)===61?1:2}function B(){this.data.setextHeadingSlurpLineEnding=void 0}function ne($){const ke=this.stack[this.stack.length-1].children;let _e=ke[ke.length-1];(!_e||_e.type!=="text")&&(_e=we(),_e.position={start:Li($.start),end:void 0},ke.push(_e)),this.stack.push(_e)}function O($){const se=this.stack.pop();se.value+=this.sliceSerialize($),se.position.end=Li($.end)}function Y($){const se=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ke=se.children[se.children.length-1];ke.position.end=Li($.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(se.type)&&(ne.call(this,$),O.call(this,$))}function G(){this.data.atHardBreak=!0}function ae(){const $=this.resume(),se=this.stack[this.stack.length-1];se.value=$}function q(){const $=this.resume(),se=this.stack[this.stack.length-1];se.value=$}function U(){const $=this.resume(),se=this.stack[this.stack.length-1];se.value=$}function Z(){const $=this.stack[this.stack.length-1];if(this.data.inReference){const se=this.data.referenceType||"shortcut";$.type+="Reference",$.referenceType=se,delete $.url,delete $.title}else delete $.identifier,delete $.label;this.data.referenceType=void 0}function J(){const $=this.stack[this.stack.length-1];if(this.data.inReference){const se=this.data.referenceType||"shortcut";$.type+="Reference",$.referenceType=se,delete $.url,delete $.title}else delete $.identifier,delete $.label;this.data.referenceType=void 0}function D($){const se=this.sliceSerialize($),ke=this.stack[this.stack.length-2];ke.label=TI(se),ke.identifier=Tr(se).toLowerCase()}function K(){const $=this.stack[this.stack.length-1],se=this.resume(),ke=this.stack[this.stack.length-1];if(this.data.inReference=!0,ke.type==="link"){const _e=$.children;ke.children=_e}else ke.alt=se}function N(){const $=this.resume(),se=this.stack[this.stack.length-1];se.url=$}function M(){const $=this.resume(),se=this.stack[this.stack.length-1];se.title=$}function Q(){this.data.inReference=void 0}function j(){this.data.referenceType="collapsed"}function ue($){const se=this.resume(),ke=this.stack[this.stack.length-1];ke.label=se,ke.identifier=Tr(this.sliceSerialize($)).toLowerCase(),this.data.referenceType="full"}function ve($){this.data.characterReferenceType=$.type}function xe($){const se=this.sliceSerialize($),ke=this.data.characterReferenceType;let _e;ke?(_e=Yk(se,ke==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):_e=Dm(se);const De=this.stack[this.stack.length-1];De.value+=_e}function re($){const se=this.stack.pop();se.position.end=Li($.end)}function me($){O.call(this,$);const se=this.stack[this.stack.length-1];se.url=this.sliceSerialize($)}function Se($){O.call(this,$);const se=this.stack[this.stack.length-1];se.url="mailto:"+this.sliceSerialize($)}function be(){return{type:"blockquote",children:[]}}function Ie(){return{type:"code",lang:null,meta:null,value:""}}function Ue(){return{type:"inlineCode",value:""}}function ot(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function It(){return{type:"emphasis",children:[]}}function Zt(){return{type:"heading",depth:0,children:[]}}function on(){return{type:"break"}}function Xt(){return{type:"html",value:""}}function Bn(){return{type:"image",title:null,url:"",alt:null}}function fn(){return{type:"link",title:null,url:"",children:[]}}function qt($){return{type:"list",ordered:$.type==="listOrdered",start:null,spread:$._spread,children:[]}}function L($){return{type:"listItem",spread:$._spread,checked:null,children:[]}}function ee(){return{type:"paragraph",children:[]}}function oe(){return{type:"strong",children:[]}}function we(){return{type:"text",value:""}}function ye(){return{type:"thematicBreak"}}}function Li(e){return{line:e.line,column:e.column,offset:e.offset}}function s1(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?s1(e,r):jI(e,r)}}function jI(e,t){let n;for(n in t)if(o1.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function aw(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ra({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ra({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ra({start:t.start,end:t.end})+") is still open")}function AI(e){const t=this;t.parser=n;function n(r){return NI(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function II(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function OI(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
235
|
+
`}]}function DI(e,t){const n=t.value?t.value+`
|
|
236
|
+
`:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let l={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function zI(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function MI(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function LI(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=tl(r.toLowerCase()),l=e.footnoteOrder.indexOf(r);let a,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=l+1,u+=1,e.footnoteCounts.set(r,u);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function FI(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $I(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function l1(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),l=o[0];l&&l.type==="text"?l.value="["+l.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&a.type==="text"?a.value+=r:o.push({type:"text",value:r}),o}function VI(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return l1(e,t);const o={src:tl(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const l={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,l),e.applyData(t,l)}function BI(e,t){const n={src:tl(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function UI(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function HI(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return l1(e,t);const o={href:tl(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const l={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function WI(e,t){const n={href:tl(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function ZI(e,t,n){const r=e.all(t),o=n?qI(n):a1(t),l={},a=[];if(typeof t.checked=="boolean"){const p=r[0];let h;p&&p.type==="element"&&p.tagName==="p"?h=p:(h={type:"element",tagName:"p",properties:{},children:[]},r.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const p=r[u];(o||u!==0||p.type!=="element"||p.tagName!=="p")&&a.push({type:"text",value:`
|
|
237
|
+
`}),p.type==="element"&&p.tagName==="p"&&!o?a.push(...p.children):a.push(p)}const d=r[r.length-1];d&&(o||d.type!=="element"||d.tagName!=="p")&&a.push({type:"text",value:`
|
|
238
|
+
`});const f={type:"element",tagName:"li",properties:l,children:a};return e.patch(t,f),e.applyData(t,f)}function qI(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=a1(n[r])}return t}function a1(e){const t=e.spread;return t??e.children.length>1}function QI(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const a=r[o];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,l),e.applyData(t,l)}function YI(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function KI(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function GI(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function XI(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),o.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=Rm(t.children[1]),d=Vk(t.children[t.children.length-1]);u&&d&&(a.position={start:u,end:d}),o.push(a)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,l),e.applyData(t,l)}function JI(e,t,n){const r=n?n.children:void 0,l=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,u=a?a.length:t.children.length;let d=-1;const f=[];for(;++d<u;){const h=t.children[d],v={},g=a?a[d]:void 0;g&&(v.align=g);let S={type:"element",tagName:l,properties:v,children:[]};h&&(S.children=e.all(h),e.patch(h,S),S=e.applyData(h,S)),f.push(S)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function eO(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const uw=9,cw=32;function tO(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const l=[];for(;r;)l.push(dw(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return l.push(dw(t.slice(o),o>0,!1)),l.join("")}function dw(e,t,n){let r=0,o=e.length;if(t){let l=e.codePointAt(r);for(;l===uw||l===cw;)r++,l=e.codePointAt(r)}if(n){let l=e.codePointAt(o-1);for(;l===uw||l===cw;)o--,l=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function nO(e,t){const n={type:"text",value:tO(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function rO(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const iO={blockquote:II,break:OI,code:DI,delete:zI,emphasis:MI,footnoteReference:LI,heading:FI,html:$I,imageReference:VI,image:BI,inlineCode:UI,linkReference:HI,link:WI,listItem:ZI,list:QI,paragraph:YI,root:KI,strong:GI,table:XI,tableCell:eO,tableRow:JI,text:nO,thematicBreak:rO,toml:rc,yaml:rc,definition:rc,footnoteDefinition:rc};function rc(){}const u1=-1,cd=0,oa=1,Rc=2,Mm=3,Lm=4,Fm=5,$m=6,c1=7,d1=8,fw=typeof self=="object"?self:globalThis,oO=(e,t)=>{const n=(o,l)=>(e.set(l,o),o),r=o=>{if(e.has(o))return e.get(o);const[l,a]=t[o];switch(l){case cd:case u1:return n(a,o);case oa:{const u=n([],o);for(const d of a)u.push(r(d));return u}case Rc:{const u=n({},o);for(const[d,f]of a)u[r(d)]=r(f);return u}case Mm:return n(new Date(a),o);case Lm:{const{source:u,flags:d}=a;return n(new RegExp(u,d),o)}case Fm:{const u=n(new Map,o);for(const[d,f]of a)u.set(r(d),r(f));return u}case $m:{const u=n(new Set,o);for(const d of a)u.add(r(d));return u}case c1:{const{name:u,message:d}=a;return n(new fw[u](d),o)}case d1:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:u}=new Uint8Array(a);return n(new DataView(u),a)}}return n(new fw[l](a),o)};return r},hw=e=>oO(new Map,e)(0),bs="",{toString:sO}={},{keys:lO}=Object,Xl=e=>{const t=typeof e;if(t!=="object"||!e)return[cd,t];const n=sO.call(e).slice(8,-1);switch(n){case"Array":return[oa,bs];case"Object":return[Rc,bs];case"Date":return[Mm,bs];case"RegExp":return[Lm,bs];case"Map":return[Fm,bs];case"Set":return[$m,bs];case"DataView":return[oa,n]}return n.includes("Array")?[oa,n]:n.includes("Error")?[c1,n]:[Rc,n]},ic=([e,t])=>e===cd&&(t==="function"||t==="symbol"),aO=(e,t,n,r)=>{const o=(a,u)=>{const d=r.push(a)-1;return n.set(u,d),d},l=a=>{if(n.has(a))return n.get(a);let[u,d]=Xl(a);switch(u){case cd:{let p=a;switch(d){case"bigint":u=d1,p=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return o([u1],a)}return o([u,p],a)}case oa:{if(d){let v=a;return d==="DataView"?v=new Uint8Array(a.buffer):d==="ArrayBuffer"&&(v=new Uint8Array(a)),o([d,[...v]],a)}const p=[],h=o([u,p],a);for(const v of a)p.push(l(v));return h}case Rc:{if(d)switch(d){case"BigInt":return o([d,a.toString()],a);case"Boolean":case"Number":case"String":return o([d,a.valueOf()],a)}if(t&&"toJSON"in a)return l(a.toJSON());const p=[],h=o([u,p],a);for(const v of lO(a))(e||!ic(Xl(a[v])))&&p.push([l(v),l(a[v])]);return h}case Mm:return o([u,a.toISOString()],a);case Lm:{const{source:p,flags:h}=a;return o([u,{source:p,flags:h}],a)}case Fm:{const p=[],h=o([u,p],a);for(const[v,g]of a)(e||!(ic(Xl(v))||ic(Xl(g))))&&p.push([l(v),l(g)]);return h}case $m:{const p=[],h=o([u,p],a);for(const v of a)(e||!ic(Xl(v)))&&p.push(l(v));return h}}const{message:f}=a;return o([u,{name:d,message:f}],a)};return l},pw=(e,{json:t,lossy:n}={})=>{const r=[];return aO(!(t||n),!!t,new Map,r)(e),r},jc=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?hw(pw(e,t)):structuredClone(e):(e,t)=>hw(pw(e,t));function uO(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function cO(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function dO(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||uO,r=e.options.footnoteBackLabel||cO,o=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const p=e.all(f),h=String(f.identifier).toUpperCase(),v=tl(h.toLowerCase());let g=0;const S=[],k=e.footnoteCounts.get(h);for(;k!==void 0&&++g<=k;){S.length>0&&S.push({type:"text",value:" "});let _=typeof n=="string"?n:n(d,g);typeof _=="string"&&(_={type:"text",value:_}),S.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+v+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,g),className:["data-footnote-backref"]},children:Array.isArray(_)?_:[_]})}const C=p[p.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const _=C.children[C.children.length-1];_&&_.type==="text"?_.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...S)}else p.push(...S);const E={type:"element",tagName:"li",properties:{id:t+"fn-"+v},children:e.wrap(p,!0)};e.patch(f,E),u.push(E)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...jc(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
239
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
|
|
240
|
+
`}]}}const dd=function(e){if(e==null)return mO;if(typeof e=="function")return fd(e);if(typeof e=="object")return Array.isArray(e)?fO(e):hO(e);if(typeof e=="string")return pO(e);throw new Error("Expected function, string, or object as test")};function fO(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=dd(e[n]);return fd(r);function r(...o){let l=-1;for(;++l<t.length;)if(t[l].apply(this,o))return!0;return!1}}function hO(e){const t=e;return fd(n);function n(r){const o=r;let l;for(l in e)if(o[l]!==t[l])return!1;return!0}}function pO(e){return fd(t);function t(n){return n&&n.type===e}}function fd(e){return t;function t(n,r,o){return!!(gO(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function mO(){return!0}function gO(e){return e!==null&&typeof e=="object"&&"type"in e}const f1=[],yO=!0,_p=!1,vO="skip";function h1(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const l=dd(o),a=r?-1:1;u(e,void 0,[])();function u(d,f,p){const h=d&&typeof d=="object"?d:{};if(typeof h.type=="string"){const g=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(d.type+(g?"<"+g+">":""))+")"})}return v;function v(){let g=f1,S,k,C;if((!t||l(d,f,p[p.length-1]||void 0))&&(g=xO(n(d,p)),g[0]===_p))return g;if("children"in d&&d.children){const E=d;if(E.children&&g[0]!==vO)for(k=(r?E.children.length:-1)+a,C=p.concat(E);k>-1&&k<E.children.length;){const _=E.children[k];if(S=u(_,k,C)(),S[0]===_p)return S;k=typeof S[1]=="number"?S[1]:k+a}}return g}}}function xO(e){return Array.isArray(e)?e:typeof e=="number"?[yO,e]:e==null?f1:[e]}function Vm(e,t,n,r){let o,l,a;typeof t=="function"&&typeof n!="function"?(l=void 0,a=t,o=n):(l=t,a=n,o=r),h1(e,l,u,o);function u(d,f){const p=f[f.length-1],h=p?p.children.indexOf(d):void 0;return a(d,h,p)}}const Tp={}.hasOwnProperty,wO={};function bO(e,t){const n=t||wO,r=new Map,o=new Map,l=new Map,a={...iO,...n.handlers},u={all:f,applyData:SO,definitionById:r,footnoteById:o,footnoteCounts:l,footnoteOrder:[],handlers:a,one:d,options:n,patch:kO,wrap:EO};return Vm(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const h=p.type==="definition"?r:o,v=String(p.identifier).toUpperCase();h.has(v)||h.set(v,p)}}),u;function d(p,h){const v=p.type,g=u.handlers[v];if(Tp.call(u.handlers,v)&&g)return g(u,p,h);if(u.options.passThrough&&u.options.passThrough.includes(v)){if("children"in p){const{children:k,...C}=p,E=jc(C);return E.children=u.all(p),E}return jc(p)}return(u.options.unknownHandler||CO)(u,p,h)}function f(p){const h=[];if("children"in p){const v=p.children;let g=-1;for(;++g<v.length;){const S=u.one(v[g],p);if(S){if(g&&v[g-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=mw(S.value)),!Array.isArray(S)&&S.type==="element")){const k=S.children[0];k&&k.type==="text"&&(k.value=mw(k.value))}Array.isArray(S)?h.push(...S):h.push(S)}}}return h}}function kO(e,t){e.position&&(t.position=c2(e))}function SO(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,l=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&l&&Object.assign(n.properties,jc(l)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function CO(e,t){const n=t.data||{},r="value"in t&&!(Tp.call(n,"hProperties")||Tp.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function EO(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
241
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
242
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
243
|
+
`}),n}function mw(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function gw(e,t){const n=bO(e,t),r=n.one(e,void 0),o=dO(n),l=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&l.children.push({type:"text",value:`
|
|
244
|
+
`},o),l}function _O(e,t){return e&&"run"in e?async function(n,r){const o=gw(n,{file:r,...t});await e.run(o,r)}:function(n,r){return gw(n,{file:r,...e||t})}}function yw(e){if(e)throw e}var Uh,vw;function TO(){if(vw)return Uh;vw=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},l=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var p=e.call(f,"constructor"),h=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!h)return!1;var v;for(v in f);return typeof v>"u"||e.call(f,v)},a=function(f,p){n&&p.name==="__proto__"?n(f,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):f[p.name]=p.newValue},u=function(f,p){if(p==="__proto__")if(e.call(f,p)){if(r)return r(f,p).value}else return;return f[p]};return Uh=function d(){var f,p,h,v,g,S,k=arguments[0],C=1,E=arguments.length,_=!1;for(typeof k=="boolean"&&(_=k,k=arguments[1]||{},C=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});C<E;++C)if(f=arguments[C],f!=null)for(p in f)h=u(k,p),v=u(f,p),k!==v&&(_&&v&&(l(v)||(g=o(v)))?(g?(g=!1,S=h&&o(h)?h:[]):S=h&&l(h)?h:{},a(k,{name:p,newValue:d(_,S,v)})):typeof v<"u"&&a(k,{name:p,newValue:v}));return k},Uh}var PO=TO();const Hh=Qo(PO);function Pp(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function NO(){const e=[],t={run:n,use:r};return t;function n(...o){let l=-1;const a=o.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);u(null,...o);function u(d,...f){const p=e[++l];let h=-1;if(d){a(d);return}for(;++h<o.length;)(f[h]===null||f[h]===void 0)&&(f[h]=o[h]);o=f,p?RO(p,u)(...f):a(null,...f)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function RO(e,t){let n;return r;function r(...a){const u=e.length>a.length;let d;u&&a.push(o);try{d=e.apply(this,a)}catch(f){const p=f;if(u&&n)throw p;return o(p)}u||(d&&d.then&&typeof d.then=="function"?d.then(l,o):d instanceof Error?o(d):l(d))}function o(a,...u){n||(n=!0,t(a,...u))}function l(a){o(null,a)}}const Mr={basename:jO,dirname:AO,extname:IO,join:OO,sep:"/"};function jO(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Oa(e);let n=0,r=-1,o=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(l){n=o+1;break}}else r<0&&(l=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,u=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(l){n=o+1;break}}else a<0&&(l=!0,a=o+1),u>-1&&(e.codePointAt(o)===t.codePointAt(u--)?u<0&&(r=o):(u=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function AO(e){if(Oa(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function IO(e){Oa(e);let t=e.length,n=-1,r=0,o=-1,l=0,a;for(;t--;){const u=e.codePointAt(t);if(u===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),u===46?o<0?o=t:l!==1&&(l=1):o>-1&&(l=-1)}return o<0||n<0||l===0||l===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function OO(...e){let t=-1,n;for(;++t<e.length;)Oa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":DO(n)}function DO(e){Oa(e);const t=e.codePointAt(0)===47;let n=zO(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function zO(e,t){let n="",r=0,o=-1,l=0,a=-1,u,d;for(;++a<=e.length;){if(a<e.length)u=e.codePointAt(a);else{if(u===47)break;u=47}if(u===47){if(!(o===a-1||l===1))if(o!==a-1&&l===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),o=a,l=0;continue}}else if(n.length>0){n="",r=0,o=a,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),r=a-o-1;o=a,l=0}else u===46&&l>-1?l++:l=-1}return n}function Oa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const MO={cwd:LO};function LO(){return"/"}function Np(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function FO(e){if(typeof e=="string")e=new URL(e);else if(!Np(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return $O(e)}function $O(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const Wh=["history","path","basename","stem","extname","dirname"];class p1{constructor(t){let n;t?Np(t)?n={path:t}:typeof t=="string"||VO(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":MO.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Wh.length;){const l=Wh[r];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let o;for(o in n)Wh.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Mr.basename(this.path):void 0}set basename(t){qh(t,"basename"),Zh(t,"basename"),this.path=Mr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Mr.dirname(this.path):void 0}set dirname(t){xw(this.basename,"dirname"),this.path=Mr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Mr.extname(this.path):void 0}set extname(t){if(Zh(t,"extname"),xw(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Mr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Np(t)&&(t=FO(t)),qh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Mr.basename(this.path,this.extname):void 0}set stem(t){qh(t,"stem"),Zh(t,"stem"),this.path=Mr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new dn(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Zh(e,t){if(e&&e.includes(Mr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Mr.sep+"`")}function qh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function xw(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function VO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const BO=function(e){const r=this.constructor.prototype,o=r[e],l=function(){return o.apply(l,arguments)};return Object.setPrototypeOf(l,r),l},UO={}.hasOwnProperty;class Bm extends BO{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=NO()}copy(){const t=new Bm;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Hh(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Kh("data",this.frozen),this.namespace[t]=n,this):UO.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Kh("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=oc(t),r=this.parser||this.Parser;return Qh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Qh("process",this.parser||this.Parser),Yh("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(l,a){const u=oc(t),d=r.parse(u);r.run(d,u,function(p,h,v){if(p||!h||!v)return f(p);const g=h,S=r.stringify(g,v);ZO(S)?v.value=S:v.result=S,f(p,v)});function f(p,h){p||!h?a(p):l?l(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),Qh("processSync",this.parser||this.Parser),Yh("processSync",this.compiler||this.Compiler),this.process(t,o),bw("processSync","process",n),r;function o(l,a){n=!0,yw(l),r=a}}run(t,n,r){ww(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?l(void 0,r):new Promise(l);function l(a,u){const d=oc(n);o.run(t,d,f);function f(p,h,v){const g=h||t;p?u(p):a?a(g):r(void 0,g,v)}}}runSync(t,n){let r=!1,o;return this.run(t,n,l),bw("runSync","run",r),o;function l(a,u){yw(a),o=u,r=!0}}stringify(t,n){this.freeze();const r=oc(n),o=this.compiler||this.Compiler;return Yh("stringify",o),ww(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(Kh("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...h]=f;d(p,h)}else a(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function a(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(f.plugins),f.settings&&(o.settings=Hh(!0,o.settings,f.settings))}function u(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const h=f[p];l(h)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let h=-1,v=-1;for(;++h<r.length;)if(r[h][0]===f){v=h;break}if(v===-1)r.push([f,...p]);else if(p.length>0){let[g,...S]=p;const k=r[v][1];Pp(k)&&Pp(g)&&(g=Hh(!0,k,g)),r[v]=[f,g,...S]}}}}const HO=new Bm().freeze();function Qh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Yh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Kh(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ww(e){if(!Pp(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function bw(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function oc(e){return WO(e)?e:new p1(e)}function WO(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function ZO(e){return typeof e=="string"||qO(e)}function qO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const QO="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",kw=[],Sw={allowDangerousHtml:!0},YO=/^(https?|ircs?|mailto|xmpp)$/i,KO=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function GO(e){const t=XO(e),n=JO(e);return eD(t.runSync(t.parse(n),n),e)}function XO(e){const t=e.rehypePlugins||kw,n=e.remarkPlugins||kw,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Sw}:Sw;return HO().use(AI).use(n).use(_O,r).use(t)}function JO(e){const t=e.children||"",n=new p1;return typeof t=="string"&&(n.value=t),n}function eD(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,l=t.disallowedElements,a=t.skipHtml,u=t.unwrapDisallowed,d=t.urlTransform||tD;for(const p of KO)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+QO+p.id,void 0);return Vm(e,f),m2(e,{Fragment:y.Fragment,components:o,ignoreInvalidStyle:!0,jsx:y.jsx,jsxs:y.jsxs,passKeys:!0,passNode:!0});function f(p,h,v){if(p.type==="raw"&&v&&typeof h=="number")return a?v.children.splice(h,1):v.children[h]={type:"text",value:p.value},h;if(p.type==="element"){let g;for(g in $h)if(Object.hasOwn($h,g)&&Object.hasOwn(p.properties,g)){const S=p.properties[g],k=$h[g];(k===null||k.includes(p.tagName))&&(p.properties[g]=d(String(S||""),g,p))}}if(p.type==="element"){let g=n?!n.includes(p.tagName):l?l.includes(p.tagName):!1;if(!g&&r&&typeof h=="number"&&(g=!r(p,h,v)),g&&v&&typeof h=="number")return u&&p.children?v.children.splice(h,1,...p.children):v.children.splice(h,1),h}}}function tD(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||YO.test(e.slice(0,t))?e:""}function Cw(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function nD(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function rD(e,t,n){const o=dd((n||{}).ignore||[]),l=iD(t);let a=-1;for(;++a<l.length;)h1(e,"text",u);function u(f,p){let h=-1,v;for(;++h<p.length;){const g=p[h],S=v?v.children:void 0;if(o(g,S?S.indexOf(g):void 0,v))return;v=g}if(v)return d(f,p)}function d(f,p){const h=p[p.length-1],v=l[a][0],g=l[a][1];let S=0;const C=h.children.indexOf(f);let E=!1,_=[];v.lastIndex=0;let P=v.exec(f.value);for(;P;){const R=P.index,I={index:P.index,input:P.input,stack:[...p,f]};let A=g(...P,I);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?v.lastIndex=R+1:(S!==R&&_.push({type:"text",value:f.value.slice(S,R)}),Array.isArray(A)?_.push(...A):A&&_.push(A),S=R+P[0].length,E=!0),!v.global)break;P=v.exec(f.value)}return E?(S<f.value.length&&_.push({type:"text",value:f.value.slice(S)}),h.children.splice(C,1,..._)):_=[f],C+_.length}}function iD(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const o=n[r];t.push([oD(o[0]),sD(o[1])])}return t}function oD(e){return typeof e=="string"?new RegExp(nD(e),"g"):e}function sD(e){return typeof e=="function"?e:function(){return e}}const Gh="phrasing",Xh=["autolink","link","image","label"];function lD(){return{transforms:[pD],enter:{literalAutolink:uD,literalAutolinkEmail:Jh,literalAutolinkHttp:Jh,literalAutolinkWww:Jh},exit:{literalAutolink:hD,literalAutolinkEmail:fD,literalAutolinkHttp:cD,literalAutolinkWww:dD}}}function aD(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Gh,notInConstruct:Xh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Gh,notInConstruct:Xh},{character:":",before:"[ps]",after:"\\/",inConstruct:Gh,notInConstruct:Xh}]}}function uD(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Jh(e){this.config.enter.autolinkProtocol.call(this,e)}function cD(e){this.config.exit.autolinkProtocol.call(this,e)}function dD(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function fD(e){this.config.exit.autolinkEmail.call(this,e)}function hD(e){this.exit(e)}function pD(e){rD(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,mD],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),gD]],{ignore:["link","linkReference"]})}function mD(e,t,n,r,o){let l="";if(!m1(o)||(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!yD(n)))return!1;const a=vD(n+r);if(!a[0])return!1;const u={type:"link",title:null,url:l+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[u,{type:"text",value:a[1]}]:u}function gD(e,t,n,r){return!m1(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function yD(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function vD(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=Cw(e,"(");let l=Cw(e,")");for(;r!==-1&&o>l;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),l++;return[e,n]}function m1(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Fo(n)||ad(n))&&(!t||n!==47)}g1.peek=TD;function xD(){this.buffer()}function wD(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function bD(){this.buffer()}function kD(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function SD(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Tr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function CD(e){this.exit(e)}function ED(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Tr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function _D(e){this.exit(e)}function TD(){return"["}function g1(e,t,n,r){const o=n.createTracker(r);let l=o.move("[^");const a=n.enter("footnoteReference"),u=n.enter("reference");return l+=o.move(n.safe(n.associationId(e),{after:"]",before:l})),u(),a(),l+=o.move("]"),l}function PD(){return{enter:{gfmFootnoteCallString:xD,gfmFootnoteCall:wD,gfmFootnoteDefinitionLabelString:bD,gfmFootnoteDefinition:kD},exit:{gfmFootnoteCallString:SD,gfmFootnoteCall:CD,gfmFootnoteDefinitionLabelString:ED,gfmFootnoteDefinition:_D}}}function ND(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:g1},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,l,a){const u=l.createTracker(a);let d=u.move("[^");const f=l.enter("footnoteDefinition"),p=l.enter("label");return d+=u.move(l.safe(l.associationId(r),{before:d,after:"]"})),p(),d+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),d+=u.move((t?`
|
|
245
|
+
`:" ")+l.indentLines(l.containerFlow(r,u.current()),t?y1:RD))),f(),d}}function RD(e,t,n){return t===0?e:y1(e,t,n)}function y1(e,t,n){return(n?"":" ")+e}const jD=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];v1.peek=zD;function AD(){return{canContainEols:["delete"],enter:{strikethrough:OD},exit:{strikethrough:DD}}}function ID(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:jD}],handlers:{delete:v1}}}function OD(e){this.enter({type:"delete",children:[]},e)}function DD(e){this.exit(e)}function v1(e,t,n,r){const o=n.createTracker(r),l=n.enter("strikethrough");let a=o.move("~~");return a+=n.containerPhrasing(e,{...o.current(),before:a,after:"~"}),a+=o.move("~~"),l(),a}function zD(){return"~"}function MD(e){return e.length}function LD(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||MD,l=[],a=[],u=[],d=[];let f=0,p=-1;for(;++p<e.length;){const k=[],C=[];let E=-1;for(e[p].length>f&&(f=e[p].length);++E<e[p].length;){const _=FD(e[p][E]);if(n.alignDelimiters!==!1){const P=o(_);C[E]=P,(d[E]===void 0||P>d[E])&&(d[E]=P)}k.push(_)}a[p]=k,u[p]=C}let h=-1;if(typeof r=="object"&&"length"in r)for(;++h<f;)l[h]=Ew(r[h]);else{const k=Ew(r);for(;++h<f;)l[h]=k}h=-1;const v=[],g=[];for(;++h<f;){const k=l[h];let C="",E="";k===99?(C=":",E=":"):k===108?C=":":k===114&&(E=":");let _=n.alignDelimiters===!1?1:Math.max(1,d[h]-C.length-E.length);const P=C+"-".repeat(_)+E;n.alignDelimiters!==!1&&(_=C.length+_+E.length,_>d[h]&&(d[h]=_),g[h]=_),v[h]=P}a.splice(1,0,v),u.splice(1,0,g),p=-1;const S=[];for(;++p<a.length;){const k=a[p],C=u[p];h=-1;const E=[];for(;++h<f;){const _=k[h]||"";let P="",R="";if(n.alignDelimiters!==!1){const I=d[h]-(C[h]||0),A=l[h];A===114?P=" ".repeat(I):A===99?I%2?(P=" ".repeat(I/2+.5),R=" ".repeat(I/2-.5)):(P=" ".repeat(I/2),R=P):R=" ".repeat(I)}n.delimiterStart!==!1&&!h&&E.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&_==="")&&(n.delimiterStart!==!1||h)&&E.push(" "),n.alignDelimiters!==!1&&E.push(P),E.push(_),n.alignDelimiters!==!1&&E.push(R),n.padding!==!1&&E.push(" "),(n.delimiterEnd!==!1||h!==f-1)&&E.push("|")}S.push(n.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return S.join(`
|
|
246
|
+
`)}function FD(e){return e==null?"":String(e)}function Ew(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function $D(e,t,n,r){const o=n.enter("blockquote"),l=n.createTracker(r);l.move("> "),l.shift(2);const a=n.indentLines(n.containerFlow(e,l.current()),VD);return o(),a}function VD(e,t,n){return">"+(n?"":" ")+e}function BD(e,t){return _w(e,t.inConstruct,!0)&&!_w(e,t.notInConstruct,!1)}function _w(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Tw(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
|
|
247
|
+
`&&BD(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
248
|
+
`}function UD(e,t){const n=String(e);let r=n.indexOf(t),o=r,l=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++l>a&&(a=l):l=1,o=r+t.length,r=n.indexOf(t,o);return a}function HD(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function WD(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function ZD(e,t,n,r){const o=WD(n),l=e.value||"",a=o==="`"?"GraveAccent":"Tilde";if(HD(e,n)){const h=n.enter("codeIndented"),v=n.indentLines(l,qD);return h(),v}const u=n.createTracker(r),d=o.repeat(Math.max(UD(l,o)+1,3)),f=n.enter("codeFenced");let p=u.move(d);if(e.lang){const h=n.enter(`codeFencedLang${a}`);p+=u.move(n.safe(e.lang,{before:p,after:" ",encode:["`"],...u.current()})),h()}if(e.lang&&e.meta){const h=n.enter(`codeFencedMeta${a}`);p+=u.move(" "),p+=u.move(n.safe(e.meta,{before:p,after:`
|
|
249
|
+
`,encode:["`"],...u.current()})),h()}return p+=u.move(`
|
|
250
|
+
`),l&&(p+=u.move(l+`
|
|
251
|
+
`)),p+=u.move(d),f(),p}function qD(e,t,n){return(n?"":" ")+e}function Um(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function QD(e,t,n,r){const o=Um(n),l=o==='"'?"Quote":"Apostrophe",a=n.enter("definition");let u=n.enter("label");const d=n.createTracker(r);let f=d.move("[");return f+=d.move(n.safe(n.associationId(e),{before:f,after:"]",...d.current()})),f+=d.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,{before:f,after:">",...d.current()})),f+=d.move(">")):(u=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,{before:f,after:e.title?" ":`
|
|
252
|
+
`,...d.current()}))),u(),e.title&&(u=n.enter(`title${l}`),f+=d.move(" "+o),f+=d.move(n.safe(e.title,{before:f,after:o,...d.current()})),f+=d.move(o),u()),a(),f}function YD(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function da(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ac(e,t,n){const r=Ws(e),o=Ws(t);return r===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}x1.peek=KD;function x1(e,t,n,r){const o=YD(n),l=n.enter("emphasis"),a=n.createTracker(r),u=a.move(o);let d=a.move(n.containerPhrasing(e,{after:o,before:u,...a.current()}));const f=d.charCodeAt(0),p=Ac(r.before.charCodeAt(r.before.length-1),f,o);p.inside&&(d=da(f)+d.slice(1));const h=d.charCodeAt(d.length-1),v=Ac(r.after.charCodeAt(0),h,o);v.inside&&(d=d.slice(0,-1)+da(h));const g=a.move(o);return l(),n.attentionEncodeSurroundingInfo={after:v.outside,before:p.outside},u+d+g}function KD(e,t,n){return n.options.emphasis||"*"}function GD(e,t){let n=!1;return Vm(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,_p}),!!((!e.depth||e.depth<3)&&Om(e)&&(t.options.setext||n))}function XD(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),l=n.createTracker(r);if(GD(e,n)){const p=n.enter("headingSetext"),h=n.enter("phrasing"),v=n.containerPhrasing(e,{...l.current(),before:`
|
|
253
|
+
`,after:`
|
|
254
|
+
`});return h(),p(),v+`
|
|
255
|
+
`+(o===1?"=":"-").repeat(v.length-(Math.max(v.lastIndexOf("\r"),v.lastIndexOf(`
|
|
256
|
+
`))+1))}const a="#".repeat(o),u=n.enter("headingAtx"),d=n.enter("phrasing");l.move(a+" ");let f=n.containerPhrasing(e,{before:"# ",after:`
|
|
257
|
+
`,...l.current()});return/^[\t ]/.test(f)&&(f=da(f.charCodeAt(0))+f.slice(1)),f=f?a+" "+f:a,n.options.closeAtx&&(f+=" "+a),d(),u(),f}w1.peek=JD;function w1(e){return e.value||""}function JD(){return"<"}b1.peek=ez;function b1(e,t,n,r){const o=Um(n),l=o==='"'?"Quote":"Apostrophe",a=n.enter("image");let u=n.enter("label");const d=n.createTracker(r);let f=d.move("![");return f+=d.move(n.safe(e.alt,{before:f,after:"]",...d.current()})),f+=d.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,{before:f,after:">",...d.current()})),f+=d.move(">")):(u=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,{before:f,after:e.title?" ":")",...d.current()}))),u(),e.title&&(u=n.enter(`title${l}`),f+=d.move(" "+o),f+=d.move(n.safe(e.title,{before:f,after:o,...d.current()})),f+=d.move(o),u()),f+=d.move(")"),a(),f}function ez(){return"!"}k1.peek=tz;function k1(e,t,n,r){const o=e.referenceType,l=n.enter("imageReference");let a=n.enter("label");const u=n.createTracker(r);let d=u.move("![");const f=n.safe(e.alt,{before:d,after:"]",...u.current()});d+=u.move(f+"]["),a();const p=n.stack;n.stack=[],a=n.enter("reference");const h=n.safe(n.associationId(e),{before:d,after:"]",...u.current()});return a(),n.stack=p,l(),o==="full"||!f||f!==h?d+=u.move(h+"]"):o==="shortcut"?d=d.slice(0,-1):d+=u.move("]"),d}function tz(){return"!"}S1.peek=nz;function S1(e,t,n){let r=e.value||"",o="`",l=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++l<n.unsafe.length;){const a=n.unsafe[l],u=n.compilePattern(a);let d;if(a.atBreak)for(;d=u.exec(r);){let f=d.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(d.index+1)}}return o+r+o}function nz(){return"`"}function C1(e,t){const n=Om(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}E1.peek=rz;function E1(e,t,n,r){const o=Um(n),l=o==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let u,d;if(C1(e,n)){const p=n.stack;n.stack=[],u=n.enter("autolink");let h=a.move("<");return h+=a.move(n.containerPhrasing(e,{before:h,after:">",...a.current()})),h+=a.move(">"),u(),n.stack=p,h}u=n.enter("link"),d=n.enter("label");let f=a.move("[");return f+=a.move(n.containerPhrasing(e,{before:f,after:"](",...a.current()})),f+=a.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=a.move("<"),f+=a.move(n.safe(e.url,{before:f,after:">",...a.current()})),f+=a.move(">")):(d=n.enter("destinationRaw"),f+=a.move(n.safe(e.url,{before:f,after:e.title?" ":")",...a.current()}))),d(),e.title&&(d=n.enter(`title${l}`),f+=a.move(" "+o),f+=a.move(n.safe(e.title,{before:f,after:o,...a.current()})),f+=a.move(o),d()),f+=a.move(")"),u(),f}function rz(e,t,n){return C1(e,n)?"<":"["}_1.peek=iz;function _1(e,t,n,r){const o=e.referenceType,l=n.enter("linkReference");let a=n.enter("label");const u=n.createTracker(r);let d=u.move("[");const f=n.containerPhrasing(e,{before:d,after:"]",...u.current()});d+=u.move(f+"]["),a();const p=n.stack;n.stack=[],a=n.enter("reference");const h=n.safe(n.associationId(e),{before:d,after:"]",...u.current()});return a(),n.stack=p,l(),o==="full"||!f||f!==h?d+=u.move(h+"]"):o==="shortcut"?d=d.slice(0,-1):d+=u.move("]"),d}function iz(){return"["}function Hm(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function oz(e){const t=Hm(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function sz(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function T1(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function lz(e,t,n,r){const o=n.enter("list"),l=n.bulletCurrent;let a=e.ordered?sz(n):Hm(n);const u=e.ordered?a==="."?")":".":oz(n);let d=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const p=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&p&&(!p.children||!p.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),T1(n)===a&&p){let h=-1;for(;++h<e.children.length;){const v=e.children[h];if(v&&v.type==="listItem"&&v.children&&v.children[0]&&v.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(a=u),n.bulletCurrent=a;const f=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=l,o(),f}function az(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function uz(e,t,n,r){const o=az(n);let l=n.bulletCurrent||Hm(n);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let a=l.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const u=n.createTracker(r);u.move(l+" ".repeat(a-l.length)),u.shift(a);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,u.current()),p);return d(),f;function p(h,v,g){return v?(g?"":" ".repeat(a))+h:(g?l:l+" ".repeat(a-l.length))+h}}function cz(e,t,n,r){const o=n.enter("paragraph"),l=n.enter("phrasing"),a=n.containerPhrasing(e,r);return l(),o(),a}const dz=dd(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function fz(e,t,n,r){return(e.children.some(function(a){return dz(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function hz(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}P1.peek=pz;function P1(e,t,n,r){const o=hz(n),l=n.enter("strong"),a=n.createTracker(r),u=a.move(o+o);let d=a.move(n.containerPhrasing(e,{after:o,before:u,...a.current()}));const f=d.charCodeAt(0),p=Ac(r.before.charCodeAt(r.before.length-1),f,o);p.inside&&(d=da(f)+d.slice(1));const h=d.charCodeAt(d.length-1),v=Ac(r.after.charCodeAt(0),h,o);v.inside&&(d=d.slice(0,-1)+da(h));const g=a.move(o+o);return l(),n.attentionEncodeSurroundingInfo={after:v.outside,before:p.outside},u+d+g}function pz(e,t,n){return n.options.strong||"*"}function mz(e,t,n,r){return n.safe(e.value,r)}function gz(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function yz(e,t,n){const r=(T1(n)+(n.options.ruleSpaces?" ":"")).repeat(gz(n));return n.options.ruleSpaces?r.slice(0,-1):r}const N1={blockquote:$D,break:Tw,code:ZD,definition:QD,emphasis:x1,hardBreak:Tw,heading:XD,html:w1,image:b1,imageReference:k1,inlineCode:S1,link:E1,linkReference:_1,list:lz,listItem:uz,paragraph:cz,root:fz,strong:P1,text:mz,thematicBreak:yz};function vz(){return{enter:{table:xz,tableData:Pw,tableHeader:Pw,tableRow:bz},exit:{codeText:kz,table:wz,tableData:ep,tableHeader:ep,tableRow:ep}}}function xz(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function wz(e){this.exit(e),this.data.inTable=void 0}function bz(e){this.enter({type:"tableRow",children:[]},e)}function ep(e){this.exit(e)}function Pw(e){this.enter({type:"tableCell",children:[]},e)}function kz(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Sz));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Sz(e,t){return t==="|"?t:e}function Cz(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
258
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:v,table:a,tableCell:d,tableRow:u}};function a(g,S,k,C){return f(p(g,k,C),g.align)}function u(g,S,k,C){const E=h(g,k,C),_=f([E]);return _.slice(0,_.indexOf(`
|
|
259
|
+
`))}function d(g,S,k,C){const E=k.enter("tableCell"),_=k.enter("phrasing"),P=k.containerPhrasing(g,{...C,before:l,after:l});return _(),E(),P}function f(g,S){return LD(g,{align:S,alignDelimiters:r,padding:n,stringLength:o})}function p(g,S,k){const C=g.children;let E=-1;const _=[],P=S.enter("table");for(;++E<C.length;)_[E]=h(C[E],S,k);return P(),_}function h(g,S,k){const C=g.children;let E=-1;const _=[],P=S.enter("tableRow");for(;++E<C.length;)_[E]=d(C[E],g,S,k);return P(),_}function v(g,S,k){let C=N1.inlineCode(g,S,k);return k.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function Ez(){return{exit:{taskListCheckValueChecked:Nw,taskListCheckValueUnchecked:Nw,paragraph:Tz}}}function _z(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Pz}}}function Nw(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Tz(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let l=-1,a;for(;++l<o.length;){const u=o[l];if(u.type==="paragraph"){a=u;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Pz(e,t,n,r){const o=e.children[0],l=typeof e.checked=="boolean"&&o&&o.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);l&&u.move(a);let d=N1.listItem(e,t,n,{...r,...u.current()});return l&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+a}}function Nz(){return[lD(),PD(),AD(),vz(),Ez()]}function Rz(e){return{extensions:[aD(),ND(e),ID(),Cz(e),_z()]}}const jz={tokenize:Mz,partial:!0},R1={tokenize:Lz,partial:!0},j1={tokenize:Fz,partial:!0},A1={tokenize:$z,partial:!0},Az={tokenize:Vz,partial:!0},I1={name:"wwwAutolink",tokenize:Dz,previous:D1},O1={name:"protocolAutolink",tokenize:zz,previous:z1},yi={name:"emailAutolink",tokenize:Oz,previous:M1},Zr={};function Iz(){return{text:Zr}}let _o=48;for(;_o<123;)Zr[_o]=yi,_o++,_o===58?_o=65:_o===91&&(_o=97);Zr[43]=yi;Zr[45]=yi;Zr[46]=yi;Zr[95]=yi;Zr[72]=[yi,O1];Zr[104]=[yi,O1];Zr[87]=[yi,I1];Zr[119]=[yi,I1];function Oz(e,t,n){const r=this;let o,l;return a;function a(h){return!Rp(h)||!M1.call(r,r.previous)||Wm(r.events)?n(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(h))}function u(h){return Rp(h)?(e.consume(h),u):h===64?(e.consume(h),d):n(h)}function d(h){return h===46?e.check(Az,p,f)(h):h===45||h===95||cn(h)?(l=!0,e.consume(h),d):p(h)}function f(h){return e.consume(h),o=!0,d}function p(h){return l&&o&&kn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(h)):n(h)}}function Dz(e,t,n){const r=this;return o;function o(a){return a!==87&&a!==119||!D1.call(r,r.previous)||Wm(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(jz,e.attempt(R1,e.attempt(j1,l),n),n)(a))}function l(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function zz(e,t,n){const r=this;let o="",l=!1;return a;function a(h){return(h===72||h===104)&&z1.call(r,r.previous)&&!Wm(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(h),e.consume(h),u):n(h)}function u(h){if(kn(h)&&o.length<5)return o+=String.fromCodePoint(h),e.consume(h),u;if(h===58){const v=o.toLowerCase();if(v==="http"||v==="https")return e.consume(h),d}return n(h)}function d(h){return h===47?(e.consume(h),l?f:(l=!0,d)):n(h)}function f(h){return h===null||Nc(h)||ht(h)||Fo(h)||ad(h)?n(h):e.attempt(R1,e.attempt(j1,p),n)(h)}function p(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function Mz(e,t,n){let r=0;return o;function o(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),o):a===46&&r===3?(e.consume(a),l):n(a)}function l(a){return a===null?n(a):t(a)}}function Lz(e,t,n){let r,o,l;return a;function a(f){return f===46||f===95?e.check(A1,d,u)(f):f===null||ht(f)||Fo(f)||f!==45&&ad(f)?d(f):(l=!0,e.consume(f),a)}function u(f){return f===95?r=!0:(o=r,r=void 0),e.consume(f),a}function d(f){return o||r||!l?n(f):t(f)}}function Fz(e,t){let n=0,r=0;return o;function o(a){return a===40?(n++,e.consume(a),o):a===41&&r<n?l(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(A1,t,l)(a):a===null||ht(a)||Fo(a)?t(a):(e.consume(a),o)}function l(a){return a===41&&r++,e.consume(a),o}}function $z(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),l):u===93?(e.consume(u),o):u===60||u===null||ht(u)||Fo(u)?t(u):n(u)}function o(u){return u===null||u===40||u===91||ht(u)||Fo(u)?t(u):r(u)}function l(u){return kn(u)?a(u):n(u)}function a(u){return u===59?(e.consume(u),r):kn(u)?(e.consume(u),a):n(u)}}function Vz(e,t,n){return r;function r(l){return e.consume(l),o}function o(l){return cn(l)?n(l):t(l)}}function D1(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ht(e)}function z1(e){return!kn(e)}function M1(e){return!(e===47||Rp(e))}function Rp(e){return e===43||e===45||e===46||e===95||cn(e)}function Wm(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Bz={tokenize:Kz,partial:!0};function Uz(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:qz,continuation:{tokenize:Qz},exit:Yz}},text:{91:{name:"gfmFootnoteCall",tokenize:Zz},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Hz,resolveTo:Wz}}}}function Hz(e,t,n){const r=this;let o=r.events.length;const l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const d=r.events[o][1];if(d.type==="labelImage"){a=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return u;function u(d){if(!a||!a._balanced)return n(d);const f=Tr(r.sliceSerialize({start:a.end,end:r.now()}));return f.codePointAt(0)!==94||!l.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function Wz(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",l,t],["enter",a,t],["exit",a,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function Zz(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l=0,a;return u;function u(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),d}function d(h){return h!==94?n(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(h){if(l>999||h===93&&!a||h===null||h===91||ht(h))return n(h);if(h===93){e.exit("chunkString");const v=e.exit("gfmFootnoteCallString");return o.includes(Tr(r.sliceSerialize(v)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(h)}return ht(h)||(a=!0),l++,e.consume(h),h===92?p:f}function p(h){return h===91||h===92||h===93?(e.consume(h),l++,f):f(h)}}function qz(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l,a=0,u;return d;function d(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(S)}function p(S){if(a>999||S===93&&!u||S===null||S===91||ht(S))return n(S);if(S===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return l=Tr(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),v}return ht(S)||(u=!0),a++,e.consume(S),S===92?h:p}function h(S){return S===91||S===92||S===93?(e.consume(S),a++,p):p(S)}function v(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),o.includes(l)||o.push(l),Je(e,g,"gfmFootnoteDefinitionWhitespace")):n(S)}function g(S){return t(S)}}function Qz(e,t,n){return e.check(Ia,t,e.attempt(Bz,t,n))}function Yz(e){e.exit("gfmFootnoteDefinition")}function Kz(e,t,n){const r=this;return Je(e,o,"gfmFootnoteDefinitionIndent",5);function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(l):n(l)}}function Gz(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:l,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(a,u){let d=-1;for(;++d<a.length;)if(a[d][0]==="enter"&&a[d][1].type==="strikethroughSequenceTemporary"&&a[d][1]._close){let f=d;for(;f--;)if(a[f][0]==="exit"&&a[f][1].type==="strikethroughSequenceTemporary"&&a[f][1]._open&&a[d][1].end.offset-a[d][1].start.offset===a[f][1].end.offset-a[f][1].start.offset){a[d][1].type="strikethroughSequence",a[f][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},a[f][1].start),end:Object.assign({},a[d][1].end)},h={type:"strikethroughText",start:Object.assign({},a[f][1].end),end:Object.assign({},a[d][1].start)},v=[["enter",p,u],["enter",a[f][1],u],["exit",a[f][1],u],["enter",h,u]],g=u.parser.constructs.insideSpan.null;g&&Jn(v,v.length,0,ud(g,a.slice(f+1,d),u)),Jn(v,v.length,0,[["exit",h,u],["enter",a[d][1],u],["exit",a[d][1],u],["exit",p,u]]),Jn(a,f-1,d-f+3,v),d=f+v.length-2;break}}for(d=-1;++d<a.length;)a[d][1].type==="strikethroughSequenceTemporary"&&(a[d][1].type="data");return a}function l(a,u,d){const f=this.previous,p=this.events;let h=0;return v;function v(S){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(S):(a.enter("strikethroughSequenceTemporary"),g(S))}function g(S){const k=Ws(f);if(S===126)return h>1?d(S):(a.consume(S),h++,g);if(h<2&&!n)return d(S);const C=a.exit("strikethroughSequenceTemporary"),E=Ws(S);return C._open=!E||E===2&&!!k,C._close=!k||k===2&&!!E,u(S)}}}class Xz{constructor(){this.map=[]}add(t,n,r){Jz(this,t,n,r)}consume(t){if(this.map.sort(function(l,a){return l[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const l of o)t.push(l);o=r.pop()}this.map.length=0}}function Jz(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function eM(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const l=r.length-1;r[l]=r[l]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function tM(){return{flow:{null:{name:"table",tokenize:nM,resolveAll:rM}}}}function nM(e,t,n){const r=this;let o=0,l=0,a;return u;function u(O){let Y=r.events.length-1;for(;Y>-1;){const q=r.events[Y][1].type;if(q==="lineEnding"||q==="linePrefix")Y--;else break}const G=Y>-1?r.events[Y][1].type:null,ae=G==="tableHead"||G==="tableRow"?A:d;return ae===A&&r.parser.lazy[r.now().line]?n(O):ae(O)}function d(O){return e.enter("tableHead"),e.enter("tableRow"),f(O)}function f(O){return O===124||(a=!0,l+=1),p(O)}function p(O){return O===null?n(O):$e(O)?l>1?(l=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),g):n(O):Ke(O)?Je(e,p,"whitespace")(O):(l+=1,a&&(a=!1,o+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),a=!0,p):(e.enter("data"),h(O)))}function h(O){return O===null||O===124||ht(O)?(e.exit("data"),p(O)):(e.consume(O),O===92?v:h)}function v(O){return O===92||O===124?(e.consume(O),h):h(O)}function g(O){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(O):(e.enter("tableDelimiterRow"),a=!1,Ke(O)?Je(e,S,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):S(O))}function S(O){return O===45||O===58?C(O):O===124?(a=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),k):I(O)}function k(O){return Ke(O)?Je(e,C,"whitespace")(O):C(O)}function C(O){return O===58?(l+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),E):O===45?(l+=1,E(O)):O===null||$e(O)?R(O):I(O)}function E(O){return O===45?(e.enter("tableDelimiterFiller"),_(O)):I(O)}function _(O){return O===45?(e.consume(O),_):O===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),P):(e.exit("tableDelimiterFiller"),P(O))}function P(O){return Ke(O)?Je(e,R,"whitespace")(O):R(O)}function R(O){return O===124?S(O):O===null||$e(O)?!a||o!==l?I(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(O)):I(O)}function I(O){return n(O)}function A(O){return e.enter("tableRow"),H(O)}function H(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),H):O===null||$e(O)?(e.exit("tableRow"),t(O)):Ke(O)?Je(e,H,"whitespace")(O):(e.enter("data"),B(O))}function B(O){return O===null||O===124||ht(O)?(e.exit("data"),H(O)):(e.consume(O),O===92?ne:B)}function ne(O){return O===92||O===124?(e.consume(O),B):B(O)}}function rM(e,t){let n=-1,r=!0,o=0,l=[0,0,0,0],a=[0,0,0,0],u=!1,d=0,f,p,h;const v=new Xz;for(;++n<e.length;){const g=e[n],S=g[1];g[0]==="enter"?S.type==="tableHead"?(u=!1,d!==0&&(Rw(v,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},v.add(n,0,[["enter",f,t]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(r=!0,h=void 0,l=[0,0,0,0],a=[0,n+1,0,0],u&&(u=!1,p={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},v.add(n,0,[["enter",p,t]])),o=S.type==="tableDelimiterRow"?2:p?3:1):o&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(l[1]!==0&&(a[0]=a[1],h=sc(v,t,l,o,void 0,h),l=[0,0,0,0]),a[2]=n)):S.type==="tableCellDivider"&&(r?r=!1:(l[1]!==0&&(a[0]=a[1],h=sc(v,t,l,o,void 0,h)),l=a,a=[l[1],n,0,0])):S.type==="tableHead"?(u=!0,d=n):S.type==="tableRow"||S.type==="tableDelimiterRow"?(d=n,l[1]!==0?(a[0]=a[1],h=sc(v,t,l,o,n,h)):a[1]!==0&&(h=sc(v,t,a,o,n,h)),o=0):o&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(a[3]=n)}for(d!==0&&Rw(v,t,d,f,p),v.consume(t.events),n=-1;++n<t.events.length;){const g=t.events[n];g[0]==="enter"&&g[1].type==="table"&&(g[1]._align=eM(t.events,n))}return e}function sc(e,t,n,r,o,l){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(l.end=Object.assign({},_s(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const d=_s(t.events,n[1]);if(l={type:a,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const f=_s(t.events,n[2]),p=_s(t.events,n[3]),h={type:u,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",h,t]]),r!==2){const v=t.events[n[2]],g=t.events[n[3]];if(v[1].end=Object.assign({},g[1].end),v[1].type="chunkText",v[1].contentType="text",n[3]>n[2]+1){const S=n[2]+1,k=n[3]-n[2]-1;e.add(S,k,[])}}e.add(n[3]+1,0,[["exit",h,t]])}return o!==void 0&&(l.end=Object.assign({},_s(t.events,o)),e.add(o,0,[["exit",l,t]]),l=void 0),l}function Rw(e,t,n,r,o){const l=[],a=_s(t.events,n);o&&(o.end=Object.assign({},a),l.push(["exit",o,t])),r.end=Object.assign({},a),l.push(["exit",r,t]),e.add(n+1,0,l)}function _s(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const iM={name:"tasklistCheck",tokenize:sM};function oM(){return{text:{91:iM}}}function sM(e,t,n){const r=this;return o;function o(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),l)}function l(d){return ht(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),a):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),a):n(d)}function a(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(d)}function u(d){return $e(d)?t(d):Ke(d)?e.check({tokenize:lM},t,n)(d):n(d)}}function lM(e,t,n){return Je(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function aM(e){return Qk([Iz(),Uz(),Gz(e),tM(),oM()])}const uM={};function cM(e){const t=this,n=e||uM,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),l=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(aM(n)),l.push(Nz()),a.push(Rz(n))}function dM({content:e,className:t}){return y.jsx("div",{className:Ve("prose prose-sm dark:prose-invert max-w-none break-words","prose-headings:font-semibold prose-headings:text-foreground","prose-p:text-muted-foreground prose-p:leading-relaxed","prose-a:text-primary prose-a:no-underline hover:prose-a:underline","prose-code:bg-muted prose-code:text-foreground prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-sm prose-code:before:content-none prose-code:after:content-none","prose-pre:bg-muted prose-pre:text-foreground prose-pre:border prose-pre:overflow-x-auto","prose-ul:text-muted-foreground prose-ol:text-muted-foreground","prose-li:marker:text-muted-foreground","prose-blockquote:border-l-primary prose-blockquote:text-muted-foreground","prose-table:text-sm","prose-th:text-left prose-th:font-semibold","prose-td:border prose-th:border",t),children:y.jsx(GO,{remarkPlugins:[cM],children:e})})}function jw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function nl(...e){return t=>{let n=!1;const r=e.map(o=>{const l=jw(o,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let o=0;o<r.length;o++){const l=r[o];typeof l=="function"?l():jw(e[o],null)}}}}function ct(...e){return b.useCallback(nl(...e),e)}var fM=Symbol.for("react.lazy"),Ic=xm[" use ".trim().toString()];function hM(e){return typeof e=="object"&&e!==null&&"then"in e}function L1(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===fM&&"_payload"in e&&hM(e._payload)}function Zm(e){const t=pM(e),n=b.forwardRef((r,o)=>{let{children:l,...a}=r;L1(l)&&typeof Ic=="function"&&(l=Ic(l._payload));const u=b.Children.toArray(l),d=u.find(gM);if(d){const f=d.props.children,p=u.map(h=>h===d?b.Children.count(f)>1?b.Children.only(null):b.isValidElement(f)?f.props.children:null:h);return y.jsx(t,{...a,ref:o,children:b.isValidElement(f)?b.cloneElement(f,void 0,p):null})}return y.jsx(t,{...a,ref:o,children:l})});return n.displayName=`${e}.Slot`,n}var F1=Zm("Slot");function pM(e){const t=b.forwardRef((n,r)=>{let{children:o,...l}=n;if(L1(o)&&typeof Ic=="function"&&(o=Ic(o._payload)),b.isValidElement(o)){const a=vM(o),u=yM(l,o.props);return o.type!==b.Fragment&&(u.ref=r?nl(r,a):a),b.cloneElement(o,u)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var mM=Symbol("radix.slottable");function gM(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===mM}function yM(e,t){const n={...t};for(const r in t){const o=e[r],l=t[r];/^on[A-Z]/.test(r)?o&&l?n[r]=(...u)=>{const d=l(...u);return o(...u),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...l}:r==="className"&&(n[r]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}function vM(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Aw=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Iw=yk,$1=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Iw(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:l}=t,a=Object.keys(o).map(f=>{const p=n==null?void 0:n[f],h=l==null?void 0:l[f];if(p===null)return null;const v=Aw(p)||Aw(h);return o[f][v]}),u=n&&Object.entries(n).reduce((f,p)=>{let[h,v]=p;return v===void 0||(f[h]=v),f},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,p)=>{let{class:h,className:v,...g}=p;return Object.entries(g).every(S=>{let[k,C]=S;return Array.isArray(C)?C.includes({...l,...u}[k]):{...l,...u}[k]===C})?[...f,h,v]:f},[]);return Iw(e,a,d,n==null?void 0:n.class,n==null?void 0:n.className)},xM=$1("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}}),nt=b.forwardRef(({className:e,variant:t="default",size:n="default",asChild:r=!1,loading:o=!1,loadingText:l,disabled:a,children:u,...d},f)=>{let p="button";r&&(p=F1);let h=u;return o&&(h=y.jsxs("span",{className:"inline-flex items-center gap-2",children:[y.jsx(jR,{className:"size-4 animate-spin","aria-hidden":"true"}),y.jsx("span",{children:l??u})]})),y.jsx(p,{ref:f,"data-slot":"button","data-variant":t,"data-size":n,className:Ve(xM({variant:t,size:n,className:e})),"aria-busy":o||void 0,disabled:a||o,...d,children:h})});nt.displayName="Button";function Ye(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function wM(e,t){const n=b.createContext(t),r=l=>{const{children:a,...u}=l,d=b.useMemo(()=>u,Object.values(u));return y.jsx(n.Provider,{value:d,children:a})};r.displayName=e+"Provider";function o(l){const a=b.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${l}\` must be used within \`${e}\``)}return[r,o]}function rl(e,t=[]){let n=[];function r(l,a){const u=b.createContext(a),d=n.length;n=[...n,a];const f=h=>{var E;const{scope:v,children:g,...S}=h,k=((E=v==null?void 0:v[e])==null?void 0:E[d])||u,C=b.useMemo(()=>S,Object.values(S));return y.jsx(k.Provider,{value:C,children:g})};f.displayName=l+"Provider";function p(h,v){var k;const g=((k=v==null?void 0:v[e])==null?void 0:k[d])||u,S=b.useContext(g);if(S)return S;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${l}\``)}return[f,p]}const o=()=>{const l=n.map(a=>b.createContext(a));return function(u){const d=(u==null?void 0:u[e])||l;return b.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return o.scopeName=e,[r,bM(o,...t)]}function bM(...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(l){const a=r.reduce((u,{useScope:d,scopeName:f})=>{const h=d(l)[`__scope${f}`];return{...u,...h}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var nn=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},kM=xm[" useId ".trim().toString()]||(()=>{}),SM=0;function Lo(e){const[t,n]=b.useState(kM());return nn(()=>{n(r=>r??String(SM++))},[e]),e||(t?`radix-${t}`:"")}var CM=xm[" useInsertionEffect ".trim().toString()]||nn;function Oc({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,l,a]=EM({defaultProp:t,onChange:n}),u=e!==void 0,d=u?e:o;{const p=b.useRef(e!==void 0);b.useEffect(()=>{const h=p.current;h!==u&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=u},[u,r])}const f=b.useCallback(p=>{var h;if(u){const v=_M(p)?p(e):p;v!==e&&((h=a.current)==null||h.call(a,v))}else l(p)},[u,e,l,a]);return[d,f]}function EM({defaultProp:e,onChange:t}){const[n,r]=b.useState(e),o=b.useRef(n),l=b.useRef(t);return CM(()=>{l.current=t},[t]),b.useEffect(()=>{var a;o.current!==n&&((a=l.current)==null||a.call(l,n),o.current=n)},[n,o]),[n,r,l]}function _M(e){return typeof e=="function"}function TM(e){const t=PM(e),n=b.forwardRef((r,o)=>{const{children:l,...a}=r,u=b.Children.toArray(l),d=u.find(RM);if(d){const f=d.props.children,p=u.map(h=>h===d?b.Children.count(f)>1?b.Children.only(null):b.isValidElement(f)?f.props.children:null:h);return y.jsx(t,{...a,ref:o,children:b.isValidElement(f)?b.cloneElement(f,void 0,p):null})}return y.jsx(t,{...a,ref:o,children:l})});return n.displayName=`${e}.Slot`,n}function PM(e){const t=b.forwardRef((n,r)=>{const{children:o,...l}=n;if(b.isValidElement(o)){const a=AM(o),u=jM(l,o.props);return o.type!==b.Fragment&&(u.ref=r?nl(r,a):a),b.cloneElement(o,u)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var NM=Symbol("radix.slottable");function RM(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===NM}function jM(e,t){const n={...t};for(const r in t){const o=e[r],l=t[r];/^on[A-Z]/.test(r)?o&&l?n[r]=(...u)=>{const d=l(...u);return o(...u),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...l}:r==="className"&&(n[r]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}function AM(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var IM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],it=IM.reduce((e,t)=>{const n=TM(`Primitive.${t}`),r=b.forwardRef((o,l)=>{const{asChild:a,...u}=o,d=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(d,{...u,ref:l})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function OM(e,t){e&&Ra.flushSync(()=>e.dispatchEvent(t))}function Ln(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function DM(e,t=globalThis==null?void 0:globalThis.document){const n=Ln(e);b.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var zM="DismissableLayer",jp="dismissableLayer.update",MM="dismissableLayer.pointerDownOutside",LM="dismissableLayer.focusOutside",Ow,V1=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),hd=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:l,onInteractOutside:a,onDismiss:u,...d}=e,f=b.useContext(V1),[p,h]=b.useState(null),v=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=b.useState({}),S=ct(t,H=>h(H)),k=Array.from(f.layers),[C]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),E=k.indexOf(C),_=p?k.indexOf(p):-1,P=f.layersWithOutsidePointerEventsDisabled.size>0,R=_>=E,I=VM(H=>{const B=H.target,ne=[...f.branches].some(O=>O.contains(B));!R||ne||(o==null||o(H),a==null||a(H),H.defaultPrevented||u==null||u())},v),A=BM(H=>{const B=H.target;[...f.branches].some(O=>O.contains(B))||(l==null||l(H),a==null||a(H),H.defaultPrevented||u==null||u())},v);return DM(H=>{_===f.layers.size-1&&(r==null||r(H),!H.defaultPrevented&&u&&(H.preventDefault(),u()))},v),b.useEffect(()=>{if(p)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Ow=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),Dw(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Ow)}},[p,v,n,f]),b.useEffect(()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),Dw())},[p,f]),b.useEffect(()=>{const H=()=>g({});return document.addEventListener(jp,H),()=>document.removeEventListener(jp,H)},[]),y.jsx(it.div,{...d,ref:S,style:{pointerEvents:P?R?"auto":"none":void 0,...e.style},onFocusCapture:Ye(e.onFocusCapture,A.onFocusCapture),onBlurCapture:Ye(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Ye(e.onPointerDownCapture,I.onPointerDownCapture)})});hd.displayName=zM;var FM="DismissableLayerBranch",$M=b.forwardRef((e,t)=>{const n=b.useContext(V1),r=b.useRef(null),o=ct(t,r);return b.useEffect(()=>{const l=r.current;if(l)return n.branches.add(l),()=>{n.branches.delete(l)}},[n.branches]),y.jsx(it.div,{...e,ref:o})});$M.displayName=FM;function VM(e,t=globalThis==null?void 0:globalThis.document){const n=Ln(e),r=b.useRef(!1),o=b.useRef(()=>{});return b.useEffect(()=>{const l=u=>{if(u.target&&!r.current){let d=function(){B1(MM,n,f,{discrete:!0})};const f={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",l),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function BM(e,t=globalThis==null?void 0:globalThis.document){const n=Ln(e),r=b.useRef(!1);return b.useEffect(()=>{const o=l=>{l.target&&!r.current&&B1(LM,n,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Dw(){const e=new CustomEvent(jp);document.dispatchEvent(e)}function B1(e,t,n,{discrete:r}){const o=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?OM(o,l):o.dispatchEvent(l)}var tp="focusScope.autoFocusOnMount",np="focusScope.autoFocusOnUnmount",zw={bubbles:!1,cancelable:!0},UM="FocusScope",qm=b.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:l,...a}=e,[u,d]=b.useState(null),f=Ln(o),p=Ln(l),h=b.useRef(null),v=ct(t,k=>d(k)),g=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let k=function(P){if(g.paused||!u)return;const R=P.target;u.contains(R)?h.current=R:Fi(h.current,{select:!0})},C=function(P){if(g.paused||!u)return;const R=P.relatedTarget;R!==null&&(u.contains(R)||Fi(h.current,{select:!0}))},E=function(P){if(document.activeElement===document.body)for(const I of P)I.removedNodes.length>0&&Fi(u)};document.addEventListener("focusin",k),document.addEventListener("focusout",C);const _=new MutationObserver(E);return u&&_.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",C),_.disconnect()}}},[r,u,g.paused]),b.useEffect(()=>{if(u){Lw.add(g);const k=document.activeElement;if(!u.contains(k)){const E=new CustomEvent(tp,zw);u.addEventListener(tp,f),u.dispatchEvent(E),E.defaultPrevented||(HM(YM(U1(u)),{select:!0}),document.activeElement===k&&Fi(u))}return()=>{u.removeEventListener(tp,f),setTimeout(()=>{const E=new CustomEvent(np,zw);u.addEventListener(np,p),u.dispatchEvent(E),E.defaultPrevented||Fi(k??document.body,{select:!0}),u.removeEventListener(np,p),Lw.remove(g)},0)}}},[u,f,p,g]);const S=b.useCallback(k=>{if(!n&&!r||g.paused)return;const C=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,E=document.activeElement;if(C&&E){const _=k.currentTarget,[P,R]=WM(_);P&&R?!k.shiftKey&&E===R?(k.preventDefault(),n&&Fi(P,{select:!0})):k.shiftKey&&E===P&&(k.preventDefault(),n&&Fi(R,{select:!0})):E===_&&k.preventDefault()}},[n,r,g.paused]);return y.jsx(it.div,{tabIndex:-1,...a,ref:v,onKeyDown:S})});qm.displayName=UM;function HM(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Fi(r,{select:t}),document.activeElement!==n)return}function WM(e){const t=U1(e),n=Mw(t,e),r=Mw(t.reverse(),e);return[n,r]}function U1(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Mw(e,t){for(const n of e)if(!ZM(n,{upTo:t}))return n}function ZM(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function qM(e){return e instanceof HTMLInputElement&&"select"in e}function Fi(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&qM(e)&&t&&e.select()}}var Lw=QM();function QM(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Fw(e,t),e.unshift(t)},remove(t){var n;e=Fw(e,t),(n=e[0])==null||n.resume()}}}function Fw(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function YM(e){return e.filter(t=>t.tagName!=="A")}var KM="Portal",pd=b.forwardRef((e,t)=>{var u;const{container:n,...r}=e,[o,l]=b.useState(!1);nn(()=>l(!0),[]);const a=n||o&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return a?ik.createPortal(y.jsx(it.div,{...r,ref:t}),a):null});pd.displayName=KM;function GM(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var qr=e=>{const{present:t,children:n}=e,r=XM(t),o=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),l=ct(r.ref,JM(o));return typeof n=="function"||r.isPresent?b.cloneElement(o,{ref:l}):null};qr.displayName="Presence";function XM(e){const[t,n]=b.useState(),r=b.useRef(null),o=b.useRef(e),l=b.useRef("none"),a=e?"mounted":"unmounted",[u,d]=GM(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const f=lc(r.current);l.current=u==="mounted"?f:"none"},[u]),nn(()=>{const f=r.current,p=o.current;if(p!==e){const v=l.current,g=lc(f);e?d("MOUNT"):g==="none"||(f==null?void 0:f.display)==="none"?d("UNMOUNT"):d(p&&v!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),nn(()=>{if(t){let f;const p=t.ownerDocument.defaultView??window,h=g=>{const k=lc(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&k&&(d("ANIMATION_END"),!o.current)){const C=t.style.animationFillMode;t.style.animationFillMode="forwards",f=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=C)})}},v=g=>{g.target===t&&(l.current=lc(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{p.clearTimeout(f),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:b.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function lc(e){return(e==null?void 0:e.animationName)||"none"}function JM(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var rp=0;function H1(){b.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??$w()),document.body.insertAdjacentElement("beforeend",e[1]??$w()),rp++,()=>{rp===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),rp--}},[])}function $w(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Vr=function(){return Vr=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},Vr.apply(this,arguments)};function W1(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function eL(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,l;r<o;r++)(l||!(r in t))&&(l||(l=Array.prototype.slice.call(t,0,r)),l[r]=t[r]);return e.concat(l||Array.prototype.slice.call(t))}var bc="right-scroll-bar-position",kc="width-before-scroll-bar",tL="with-scroll-bars-hidden",nL="--removed-body-scroll-bar-size";function ip(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function rL(e,t){var n=b.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var iL=typeof window<"u"?b.useLayoutEffect:b.useEffect,Vw=new WeakMap;function oL(e,t){var n=rL(null,function(r){return e.forEach(function(o){return ip(o,r)})});return iL(function(){var r=Vw.get(n);if(r){var o=new Set(r),l=new Set(e),a=n.current;o.forEach(function(u){l.has(u)||ip(u,null)}),l.forEach(function(u){o.has(u)||ip(u,a)})}Vw.set(n,e)},[e]),n}function sL(e){return e}function lL(e,t){t===void 0&&(t=sL);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(l){var a=t(l,r);return n.push(a),function(){n=n.filter(function(u){return u!==a})}},assignSyncMedium:function(l){for(r=!0;n.length;){var a=n;n=[],a.forEach(l)}n={push:function(u){return l(u)},filter:function(){return n}}},assignMedium:function(l){r=!0;var a=[];if(n.length){var u=n;n=[],u.forEach(l),a=n}var d=function(){var p=a;a=[],p.forEach(l)},f=function(){return Promise.resolve().then(d)};f(),n={push:function(p){a.push(p),f()},filter:function(p){return a=a.filter(p),n}}}};return o}function aL(e){e===void 0&&(e={});var t=lL(null);return t.options=Vr({async:!0,ssr:!1},e),t}var Z1=function(e){var t=e.sideCar,n=W1(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return b.createElement(r,Vr({},n))};Z1.isSideCarExport=!0;function uL(e,t){return e.useMedium(t),Z1}var q1=aL(),op=function(){},md=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:op,onWheelCapture:op,onTouchMoveCapture:op}),o=r[0],l=r[1],a=e.forwardProps,u=e.children,d=e.className,f=e.removeScrollBar,p=e.enabled,h=e.shards,v=e.sideCar,g=e.noRelative,S=e.noIsolation,k=e.inert,C=e.allowPinchZoom,E=e.as,_=E===void 0?"div":E,P=e.gapMode,R=W1(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),I=v,A=oL([n,t]),H=Vr(Vr({},R),o);return b.createElement(b.Fragment,null,p&&b.createElement(I,{sideCar:q1,removeScrollBar:f,shards:h,noRelative:g,noIsolation:S,inert:k,setCallbacks:l,allowPinchZoom:!!C,lockRef:n,gapMode:P}),a?b.cloneElement(b.Children.only(u),Vr(Vr({},H),{ref:A})):b.createElement(_,Vr({},H,{className:d,ref:A}),u))});md.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};md.classNames={fullWidth:kc,zeroRight:bc};var cL=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function dL(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=cL();return t&&e.setAttribute("nonce",t),e}function fL(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function hL(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var pL=function(){var e=0,t=null;return{add:function(n){e==0&&(t=dL())&&(fL(t,n),hL(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},mL=function(){var e=pL();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Q1=function(){var e=mL(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},gL={left:0,top:0,right:0,gap:0},sp=function(e){return parseInt(e||"",10)||0},yL=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[sp(n),sp(r),sp(o)]},vL=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return gL;var t=yL(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])}},xL=Q1(),Rs="data-scroll-locked",wL=function(e,t,n,r){var o=e.left,l=e.top,a=e.right,u=e.gap;return n===void 0&&(n="margin"),`
|
|
260
|
+
.`.concat(tL,` {
|
|
261
|
+
overflow: hidden `).concat(r,`;
|
|
262
|
+
padding-right: `).concat(u,"px ").concat(r,`;
|
|
263
|
+
}
|
|
264
|
+
body[`).concat(Rs,`] {
|
|
265
|
+
overflow: hidden `).concat(r,`;
|
|
266
|
+
overscroll-behavior: contain;
|
|
267
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
268
|
+
padding-left: `.concat(o,`px;
|
|
269
|
+
padding-top: `).concat(l,`px;
|
|
270
|
+
padding-right: `).concat(a,`px;
|
|
271
|
+
margin-left:0;
|
|
272
|
+
margin-top:0;
|
|
273
|
+
margin-right: `).concat(u,"px ").concat(r,`;
|
|
274
|
+
`),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.`).concat(bc,` {
|
|
278
|
+
right: `).concat(u,"px ").concat(r,`;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.`).concat(kc,` {
|
|
282
|
+
margin-right: `).concat(u,"px ").concat(r,`;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.`).concat(bc," .").concat(bc,` {
|
|
286
|
+
right: 0 `).concat(r,`;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.`).concat(kc," .").concat(kc,` {
|
|
290
|
+
margin-right: 0 `).concat(r,`;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
body[`).concat(Rs,`] {
|
|
294
|
+
`).concat(nL,": ").concat(u,`px;
|
|
295
|
+
}
|
|
296
|
+
`)},Bw=function(){var e=parseInt(document.body.getAttribute(Rs)||"0",10);return isFinite(e)?e:0},bL=function(){b.useEffect(function(){return document.body.setAttribute(Rs,(Bw()+1).toString()),function(){var e=Bw()-1;e<=0?document.body.removeAttribute(Rs):document.body.setAttribute(Rs,e.toString())}},[])},kL=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;bL();var l=b.useMemo(function(){return vL(o)},[o]);return b.createElement(xL,{styles:wL(l,!t,o,n?"":"!important")})},Ap=!1;if(typeof window<"u")try{var ac=Object.defineProperty({},"passive",{get:function(){return Ap=!0,!0}});window.addEventListener("test",ac,ac),window.removeEventListener("test",ac,ac)}catch{Ap=!1}var ks=Ap?{passive:!1}:!1,SL=function(e){return e.tagName==="TEXTAREA"},Y1=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!SL(e)&&n[t]==="visible")},CL=function(e){return Y1(e,"overflowY")},EL=function(e){return Y1(e,"overflowX")},Uw=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=K1(e,r);if(o){var l=G1(e,r),a=l[1],u=l[2];if(a>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},_L=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},TL=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},K1=function(e,t){return e==="v"?CL(t):EL(t)},G1=function(e,t){return e==="v"?_L(t):TL(t)},PL=function(e,t){return e==="h"&&t==="rtl"?-1:1},NL=function(e,t,n,r,o){var l=PL(e,window.getComputedStyle(t).direction),a=l*r,u=n.target,d=t.contains(u),f=!1,p=a>0,h=0,v=0;do{if(!u)break;var g=G1(e,u),S=g[0],k=g[1],C=g[2],E=k-C-l*S;(S||E)&&K1(e,u)&&(h+=E,v+=S);var _=u.parentNode;u=_&&_.nodeType===Node.DOCUMENT_FRAGMENT_NODE?_.host:_}while(!d&&u!==document.body||d&&(t.contains(u)||t===u));return(p&&Math.abs(h)<1||!p&&Math.abs(v)<1)&&(f=!0),f},uc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Hw=function(e){return[e.deltaX,e.deltaY]},Ww=function(e){return e&&"current"in e?e.current:e},RL=function(e,t){return e[0]===t[0]&&e[1]===t[1]},jL=function(e){return`
|
|
297
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
298
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
299
|
+
`)},AL=0,Ss=[];function IL(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),o=b.useState(AL++)[0],l=b.useState(Q1)[0],a=b.useRef(e);b.useEffect(function(){a.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var k=eL([e.lockRef.current],(e.shards||[]).map(Ww),!0).filter(Boolean);return k.forEach(function(C){return C.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),k.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var u=b.useCallback(function(k,C){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!a.current.allowPinchZoom;var E=uc(k),_=n.current,P="deltaX"in k?k.deltaX:_[0]-E[0],R="deltaY"in k?k.deltaY:_[1]-E[1],I,A=k.target,H=Math.abs(P)>Math.abs(R)?"h":"v";if("touches"in k&&H==="h"&&A.type==="range")return!1;var B=window.getSelection(),ne=B&&B.anchorNode,O=ne?ne===A||ne.contains(A):!1;if(O)return!1;var Y=Uw(H,A);if(!Y)return!0;if(Y?I=H:(I=H==="v"?"h":"v",Y=Uw(H,A)),!Y)return!1;if(!r.current&&"changedTouches"in k&&(P||R)&&(r.current=I),!I)return!0;var G=r.current||I;return NL(G,C,k,G==="h"?P:R)},[]),d=b.useCallback(function(k){var C=k;if(!(!Ss.length||Ss[Ss.length-1]!==l)){var E="deltaY"in C?Hw(C):uc(C),_=t.current.filter(function(I){return I.name===C.type&&(I.target===C.target||C.target===I.shadowParent)&&RL(I.delta,E)})[0];if(_&&_.should){C.cancelable&&C.preventDefault();return}if(!_){var P=(a.current.shards||[]).map(Ww).filter(Boolean).filter(function(I){return I.contains(C.target)}),R=P.length>0?u(C,P[0]):!a.current.noIsolation;R&&C.cancelable&&C.preventDefault()}}},[]),f=b.useCallback(function(k,C,E,_){var P={name:k,delta:C,target:E,should:_,shadowParent:OL(E)};t.current.push(P),setTimeout(function(){t.current=t.current.filter(function(R){return R!==P})},1)},[]),p=b.useCallback(function(k){n.current=uc(k),r.current=void 0},[]),h=b.useCallback(function(k){f(k.type,Hw(k),k.target,u(k,e.lockRef.current))},[]),v=b.useCallback(function(k){f(k.type,uc(k),k.target,u(k,e.lockRef.current))},[]);b.useEffect(function(){return Ss.push(l),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:v}),document.addEventListener("wheel",d,ks),document.addEventListener("touchmove",d,ks),document.addEventListener("touchstart",p,ks),function(){Ss=Ss.filter(function(k){return k!==l}),document.removeEventListener("wheel",d,ks),document.removeEventListener("touchmove",d,ks),document.removeEventListener("touchstart",p,ks)}},[]);var g=e.removeScrollBar,S=e.inert;return b.createElement(b.Fragment,null,S?b.createElement(l,{styles:jL(o)}):null,g?b.createElement(kL,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function OL(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const DL=uL(q1,IL);var Qm=b.forwardRef(function(e,t){return b.createElement(md,Vr({},e,{ref:t,sideCar:DL}))});Qm.classNames=md.classNames;var zL=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Cs=new WeakMap,cc=new WeakMap,dc={},lp=0,X1=function(e){return e&&(e.host||X1(e.parentNode))},ML=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=X1(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},LL=function(e,t,n,r){var o=ML(t,Array.isArray(e)?e:[e]);dc[n]||(dc[n]=new WeakMap);var l=dc[n],a=[],u=new Set,d=new Set(o),f=function(h){!h||u.has(h)||(u.add(h),f(h.parentNode))};o.forEach(f);var p=function(h){!h||d.has(h)||Array.prototype.forEach.call(h.children,function(v){if(u.has(v))p(v);else try{var g=v.getAttribute(r),S=g!==null&&g!=="false",k=(Cs.get(v)||0)+1,C=(l.get(v)||0)+1;Cs.set(v,k),l.set(v,C),a.push(v),k===1&&S&&cc.set(v,!0),C===1&&v.setAttribute(n,"true"),S||v.setAttribute(r,"true")}catch(E){console.error("aria-hidden: cannot operate on ",v,E)}})};return p(t),u.clear(),lp++,function(){a.forEach(function(h){var v=Cs.get(h)-1,g=l.get(h)-1;Cs.set(h,v),l.set(h,g),v||(cc.has(h)||h.removeAttribute(r),cc.delete(h)),g||h.removeAttribute(n)}),lp--,lp||(Cs=new WeakMap,Cs=new WeakMap,cc=new WeakMap,dc={})}},J1=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=zL(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),LL(r,o,n,"aria-hidden")):function(){return null}};function FL(e){const t=$L(e),n=b.forwardRef((r,o)=>{const{children:l,...a}=r,u=b.Children.toArray(l),d=u.find(BL);if(d){const f=d.props.children,p=u.map(h=>h===d?b.Children.count(f)>1?b.Children.only(null):b.isValidElement(f)?f.props.children:null:h);return y.jsx(t,{...a,ref:o,children:b.isValidElement(f)?b.cloneElement(f,void 0,p):null})}return y.jsx(t,{...a,ref:o,children:l})});return n.displayName=`${e}.Slot`,n}function $L(e){const t=b.forwardRef((n,r)=>{const{children:o,...l}=n;if(b.isValidElement(o)){const a=HL(o),u=UL(l,o.props);return o.type!==b.Fragment&&(u.ref=r?nl(r,a):a),b.cloneElement(o,u)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var VL=Symbol("radix.slottable");function BL(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===VL}function UL(e,t){const n={...t};for(const r in t){const o=e[r],l=t[r];/^on[A-Z]/.test(r)?o&&l?n[r]=(...u)=>{const d=l(...u);return o(...u),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...l}:r==="className"&&(n[r]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}function HL(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var gd="Dialog",[eS]=rl(gd),[WL,jr]=eS(gd),tS=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:l,modal:a=!0}=e,u=b.useRef(null),d=b.useRef(null),[f,p]=Oc({prop:r,defaultProp:o??!1,onChange:l,caller:gd});return y.jsx(WL,{scope:t,triggerRef:u,contentRef:d,contentId:Lo(),titleId:Lo(),descriptionId:Lo(),open:f,onOpenChange:p,onOpenToggle:b.useCallback(()=>p(h=>!h),[p]),modal:a,children:n})};tS.displayName=gd;var nS="DialogTrigger",ZL=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=jr(nS,n),l=ct(t,o.triggerRef);return y.jsx(it.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Gm(o.open),...r,ref:l,onClick:Ye(e.onClick,o.onOpenToggle)})});ZL.displayName=nS;var Ym="DialogPortal",[qL,rS]=eS(Ym,{forceMount:void 0}),iS=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,l=jr(Ym,t);return y.jsx(qL,{scope:t,forceMount:n,children:b.Children.map(r,a=>y.jsx(qr,{present:n||l.open,children:y.jsx(pd,{asChild:!0,container:o,children:a})}))})};iS.displayName=Ym;var Dc="DialogOverlay",oS=b.forwardRef((e,t)=>{const n=rS(Dc,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,l=jr(Dc,e.__scopeDialog);return l.modal?y.jsx(qr,{present:r||l.open,children:y.jsx(YL,{...o,ref:t})}):null});oS.displayName=Dc;var QL=FL("DialogOverlay.RemoveScroll"),YL=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=jr(Dc,n);return y.jsx(Qm,{as:QL,allowPinchZoom:!0,shards:[o.contentRef],children:y.jsx(it.div,{"data-state":Gm(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),$o="DialogContent",sS=b.forwardRef((e,t)=>{const n=rS($o,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,l=jr($o,e.__scopeDialog);return y.jsx(qr,{present:r||l.open,children:l.modal?y.jsx(KL,{...o,ref:t}):y.jsx(GL,{...o,ref:t})})});sS.displayName=$o;var KL=b.forwardRef((e,t)=>{const n=jr($o,e.__scopeDialog),r=b.useRef(null),o=ct(t,n.contentRef,r);return b.useEffect(()=>{const l=r.current;if(l)return J1(l)},[]),y.jsx(lS,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ye(e.onCloseAutoFocus,l=>{var a;l.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Ye(e.onPointerDownOutside,l=>{const a=l.detail.originalEvent,u=a.button===0&&a.ctrlKey===!0;(a.button===2||u)&&l.preventDefault()}),onFocusOutside:Ye(e.onFocusOutside,l=>l.preventDefault())})}),GL=b.forwardRef((e,t)=>{const n=jr($o,e.__scopeDialog),r=b.useRef(!1),o=b.useRef(!1);return y.jsx(lS,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{var a,u;(a=e.onCloseAutoFocus)==null||a.call(e,l),l.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),l.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:l=>{var d,f;(d=e.onInteractOutside)==null||d.call(e,l),l.defaultPrevented||(r.current=!0,l.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=l.target;((f=n.triggerRef.current)==null?void 0:f.contains(a))&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&o.current&&l.preventDefault()}})}),lS=b.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:l,...a}=e,u=jr($o,n),d=b.useRef(null),f=ct(t,d);return H1(),y.jsxs(y.Fragment,{children:[y.jsx(qm,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:l,children:y.jsx(hd,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":Gm(u.open),...a,ref:f,onDismiss:()=>u.onOpenChange(!1)})}),y.jsxs(y.Fragment,{children:[y.jsx(XL,{titleId:u.titleId}),y.jsx(eF,{contentRef:d,descriptionId:u.descriptionId})]})]})}),Km="DialogTitle",aS=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=jr(Km,n);return y.jsx(it.h2,{id:o.titleId,...r,ref:t})});aS.displayName=Km;var uS="DialogDescription",cS=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=jr(uS,n);return y.jsx(it.p,{id:o.descriptionId,...r,ref:t})});cS.displayName=uS;var dS="DialogClose",fS=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=jr(dS,n);return y.jsx(it.button,{type:"button",...r,ref:t,onClick:Ye(e.onClick,()=>o.onOpenChange(!1))})});fS.displayName=dS;function Gm(e){return e?"open":"closed"}var hS="DialogTitleWarning",[yW,pS]=wM(hS,{contentName:$o,titleName:Km,docsSlug:"dialog"}),XL=({titleId:e})=>{const t=pS(hS),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
300
|
+
|
|
301
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
302
|
+
|
|
303
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return b.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},JL="DialogDescriptionWarning",eF=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${pS(JL).contentName}}.`;return b.useEffect(()=>{var l;const o=(l=e.current)==null?void 0:l.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},mS=tS,gS=iS,yS=oS,vS=sS,xS=aS,tF=cS,wS=fS;function yd({...e}){return y.jsx(mS,{"data-slot":"dialog",...e})}function nF({...e}){return y.jsx(gS,{"data-slot":"dialog-portal",...e})}function rF({className:e,...t}){return y.jsx(yS,{"data-slot":"dialog-overlay",className:Ve("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function vd({className:e,children:t,showCloseButton:n=!0,...r}){return y.jsxs(nF,{"data-slot":"dialog-portal",children:[y.jsx(rF,{}),y.jsxs(vS,{"data-slot":"dialog-content",className:Ve("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg",e),...r,children:[t,n&&y.jsxs(wS,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[y.jsx(ld,{}),y.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function bS({className:e,...t}){return y.jsx("div",{"data-slot":"dialog-header",className:Ve("flex flex-col gap-2 text-center sm:text-left",e),...t})}function kS({className:e,...t}){return y.jsx("div",{"data-slot":"dialog-footer",className:Ve("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function SS({className:e,...t}){return y.jsx(xS,{"data-slot":"dialog-title",className:Ve("text-lg leading-none font-semibold",e),...t})}function CS({className:e,...t}){return y.jsx(tF,{"data-slot":"dialog-description",className:Ve("text-muted-foreground text-sm",e),...t})}function ES({open:e,onClose:t,breadcrumbItems:n,title:r,description:o,onEdit:l,children:a}){let u=y.jsx("p",{className:"text-sm text-muted-foreground italic",children:"No description"});return o&&(u=y.jsx(dM,{content:o})),y.jsx(yd,{open:e,onOpenChange:d=>!d&&t(),children:y.jsxs(vd,{className:"max-w-4xl p-0 gap-0 max-h-[90vh] overflow-hidden",children:[y.jsx("div",{className:"p-4 border-b flex items-center justify-between",children:y.jsx(Ik,{items:n})}),y.jsx("div",{className:"overflow-y-auto max-h-[calc(90vh-80px)]",children:y.jsxs("div",{className:"flex flex-col min-w-0",children:[y.jsxs("div",{className:"px-4 pt-4 pb-2 flex justify-between items-start",children:[y.jsx("h2",{className:"text-xl font-semibold",children:r}),y.jsxs(nt,{variant:"ghost",size:"sm",onClick:l,children:[y.jsx(hk,{className:"mr-1 h-4 w-4"}),"Edit"]})]}),y.jsxs("div",{className:"px-4 pb-4",children:[y.jsx("h4",{className:"text-xs uppercase text-muted-foreground font-semibold mb-2",children:"Description"}),u]}),a]})})]})})}function iF({isConfirming:e,entityName:t,onDelete:n,onConfirm:r,onCancel:o}){return e?y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"text-sm text-destructive",children:"Delete?"}),y.jsx(nt,{variant:"destructive",size:"sm",onClick:r,children:"Yes"}),y.jsx(nt,{variant:"outline",size:"sm",onClick:o,children:"No"})]}):y.jsxs(nt,{variant:"destructive",size:"sm",onClick:n,children:["Delete ",t]})}function _S({open:e,onClose:t,breadcrumbItems:n,formId:r,isSubmitting:o,isDeleting:l,entityName:a,onCancel:u,onDelete:d,onDeleteConfirm:f,onDeleteCancel:p,children:h}){return y.jsx(yd,{open:e,onOpenChange:v=>!v&&t(),children:y.jsxs(vd,{className:"max-w-lg p-0 gap-0 max-h-[90vh] overflow-hidden",children:[y.jsx("div",{className:"flex items-center border-b p-4",children:y.jsx(Ik,{items:n})}),y.jsx("div",{className:"overflow-y-auto max-h-[calc(90vh-140px)]",children:h}),y.jsxs("div",{className:"p-4 border-t flex items-center justify-between",children:[y.jsx(iF,{isConfirming:l,entityName:a,onDelete:d,onConfirm:f,onCancel:p}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(nt,{type:"button",variant:"outline",size:"sm",onClick:u,children:"Cancel"}),y.jsx(nt,{type:"submit",form:r,size:"sm",disabled:o,loading:o,loadingText:"Saving",children:"Save"})]})]})]})})}var Sc={exports:{}},oF=Sc.exports,Zw;function sF(){return Zw||(Zw=1,function(e,t){(function(n,r){e.exports=r()})(oF,function(){var n=1e3,r=6e4,o=36e5,l="millisecond",a="second",u="minute",d="hour",f="day",p="week",h="month",v="quarter",g="year",S="date",k="Invalid Date",C=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,E=/\[([^\]]+)]|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,_={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(q){var U=["th","st","nd","rd"],Z=q%100;return"["+q+(U[(Z-20)%10]||U[Z]||U[0])+"]"}},P=function(q,U,Z){var J=String(q);return!J||J.length>=U?q:""+Array(U+1-J.length).join(Z)+q},R={s:P,z:function(q){var U=-q.utcOffset(),Z=Math.abs(U),J=Math.floor(Z/60),D=Z%60;return(U<=0?"+":"-")+P(J,2,"0")+":"+P(D,2,"0")},m:function q(U,Z){if(U.date()<Z.date())return-q(Z,U);var J=12*(Z.year()-U.year())+(Z.month()-U.month()),D=U.clone().add(J,h),K=Z-D<0,N=U.clone().add(J+(K?-1:1),h);return+(-(J+(Z-D)/(K?D-N:N-D))||0)},a:function(q){return q<0?Math.ceil(q)||0:Math.floor(q)},p:function(q){return{M:h,y:g,w:p,d:f,D:S,h:d,m:u,s:a,ms:l,Q:v}[q]||String(q||"").toLowerCase().replace(/s$/,"")},u:function(q){return q===void 0}},I="en",A={};A[I]=_;var H="$isDayjsObject",B=function(q){return q instanceof G||!(!q||!q[H])},ne=function q(U,Z,J){var D;if(!U)return I;if(typeof U=="string"){var K=U.toLowerCase();A[K]&&(D=K),Z&&(A[K]=Z,D=K);var N=U.split("-");if(!D&&N.length>1)return q(N[0])}else{var M=U.name;A[M]=U,D=M}return!J&&D&&(I=D),D||!J&&I},O=function(q,U){if(B(q))return q.clone();var Z=typeof U=="object"?U:{};return Z.date=q,Z.args=arguments,new G(Z)},Y=R;Y.l=ne,Y.i=B,Y.w=function(q,U){return O(q,{locale:U.$L,utc:U.$u,x:U.$x,$offset:U.$offset})};var G=function(){function q(Z){this.$L=ne(Z.locale,null,!0),this.parse(Z),this.$x=this.$x||Z.x||{},this[H]=!0}var U=q.prototype;return U.parse=function(Z){this.$d=function(J){var D=J.date,K=J.utc;if(D===null)return new Date(NaN);if(Y.u(D))return new Date;if(D instanceof Date)return new Date(D);if(typeof D=="string"&&!/Z$/i.test(D)){var N=D.match(C);if(N){var M=N[2]-1||0,Q=(N[7]||"0").substring(0,3);return K?new Date(Date.UTC(N[1],M,N[3]||1,N[4]||0,N[5]||0,N[6]||0,Q)):new Date(N[1],M,N[3]||1,N[4]||0,N[5]||0,N[6]||0,Q)}}return new Date(D)}(Z),this.init()},U.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()},U.$utils=function(){return Y},U.isValid=function(){return this.$d.toString()!==k},U.isSame=function(Z,J){var D=O(Z);return this.startOf(J)<=D&&D<=this.endOf(J)},U.isAfter=function(Z,J){return O(Z)<this.startOf(J)},U.isBefore=function(Z,J){return this.endOf(J)<O(Z)},U.$g=function(Z,J,D){return Y.u(Z)?this[J]:this.set(D,Z)},U.unix=function(){return Math.floor(this.valueOf()/1e3)},U.valueOf=function(){return this.$d.getTime()},U.startOf=function(Z,J){var D=this,K=!!Y.u(J)||J,N=Y.p(Z),M=function(Se,be){var Ie=Y.w(D.$u?Date.UTC(D.$y,be,Se):new Date(D.$y,be,Se),D);return K?Ie:Ie.endOf(f)},Q=function(Se,be){return Y.w(D.toDate()[Se].apply(D.toDate("s"),(K?[0,0,0,0]:[23,59,59,999]).slice(be)),D)},j=this.$W,ue=this.$M,ve=this.$D,xe="set"+(this.$u?"UTC":"");switch(N){case g:return K?M(1,0):M(31,11);case h:return K?M(1,ue):M(0,ue+1);case p:var re=this.$locale().weekStart||0,me=(j<re?j+7:j)-re;return M(K?ve-me:ve+(6-me),ue);case f:case S:return Q(xe+"Hours",0);case d:return Q(xe+"Minutes",1);case u:return Q(xe+"Seconds",2);case a:return Q(xe+"Milliseconds",3);default:return this.clone()}},U.endOf=function(Z){return this.startOf(Z,!1)},U.$set=function(Z,J){var D,K=Y.p(Z),N="set"+(this.$u?"UTC":""),M=(D={},D[f]=N+"Date",D[S]=N+"Date",D[h]=N+"Month",D[g]=N+"FullYear",D[d]=N+"Hours",D[u]=N+"Minutes",D[a]=N+"Seconds",D[l]=N+"Milliseconds",D)[K],Q=K===f?this.$D+(J-this.$W):J;if(K===h||K===g){var j=this.clone().set(S,1);j.$d[M](Q),j.init(),this.$d=j.set(S,Math.min(this.$D,j.daysInMonth())).$d}else M&&this.$d[M](Q);return this.init(),this},U.set=function(Z,J){return this.clone().$set(Z,J)},U.get=function(Z){return this[Y.p(Z)]()},U.add=function(Z,J){var D,K=this;Z=Number(Z);var N=Y.p(J),M=function(ue){var ve=O(K);return Y.w(ve.date(ve.date()+Math.round(ue*Z)),K)};if(N===h)return this.set(h,this.$M+Z);if(N===g)return this.set(g,this.$y+Z);if(N===f)return M(1);if(N===p)return M(7);var Q=(D={},D[u]=r,D[d]=o,D[a]=n,D)[N]||1,j=this.$d.getTime()+Z*Q;return Y.w(j,this)},U.subtract=function(Z,J){return this.add(-1*Z,J)},U.format=function(Z){var J=this,D=this.$locale();if(!this.isValid())return D.invalidDate||k;var K=Z||"YYYY-MM-DDTHH:mm:ssZ",N=Y.z(this),M=this.$H,Q=this.$m,j=this.$M,ue=D.weekdays,ve=D.months,xe=D.meridiem,re=function(be,Ie,Ue,ot){return be&&(be[Ie]||be(J,K))||Ue[Ie].slice(0,ot)},me=function(be){return Y.s(M%12||12,be,"0")},Se=xe||function(be,Ie,Ue){var ot=be<12?"AM":"PM";return Ue?ot.toLowerCase():ot};return K.replace(E,function(be,Ie){return Ie||function(Ue){switch(Ue){case"YY":return String(J.$y).slice(-2);case"YYYY":return Y.s(J.$y,4,"0");case"M":return j+1;case"MM":return Y.s(j+1,2,"0");case"MMM":return re(D.monthsShort,j,ve,3);case"MMMM":return re(ve,j);case"D":return J.$D;case"DD":return Y.s(J.$D,2,"0");case"d":return String(J.$W);case"dd":return re(D.weekdaysMin,J.$W,ue,2);case"ddd":return re(D.weekdaysShort,J.$W,ue,3);case"dddd":return ue[J.$W];case"H":return String(M);case"HH":return Y.s(M,2,"0");case"h":return me(1);case"hh":return me(2);case"a":return Se(M,Q,!0);case"A":return Se(M,Q,!1);case"m":return String(Q);case"mm":return Y.s(Q,2,"0");case"s":return String(J.$s);case"ss":return Y.s(J.$s,2,"0");case"SSS":return Y.s(J.$ms,3,"0");case"Z":return N}return null}(be)||N.replace(":","")})},U.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},U.diff=function(Z,J,D){var K,N=this,M=Y.p(J),Q=O(Z),j=(Q.utcOffset()-this.utcOffset())*r,ue=this-Q,ve=function(){return Y.m(N,Q)};switch(M){case g:K=ve()/12;break;case h:K=ve();break;case v:K=ve()/3;break;case p:K=(ue-j)/6048e5;break;case f:K=(ue-j)/864e5;break;case d:K=ue/o;break;case u:K=ue/r;break;case a:K=ue/n;break;default:K=ue}return D?K:Y.a(K)},U.daysInMonth=function(){return this.endOf(h).$D},U.$locale=function(){return A[this.$L]},U.locale=function(Z,J){if(!Z)return this.$L;var D=this.clone(),K=ne(Z,J,!0);return K&&(D.$L=K),D},U.clone=function(){return Y.w(this.$d,this)},U.toDate=function(){return new Date(this.valueOf())},U.toJSON=function(){return this.isValid()?this.toISOString():null},U.toISOString=function(){return this.$d.toISOString()},U.toString=function(){return this.$d.toUTCString()},q}(),ae=G.prototype;return O.prototype=ae,[["$ms",l],["$s",a],["$m",u],["$H",d],["$W",f],["$M",h],["$y",g],["$D",S]].forEach(function(q){ae[q[1]]=function(U){return this.$g(U,q[0],q[1])}}),O.extend=function(q,U){return q.$i||(q(U,G,O),q.$i=!0),O},O.locale=ne,O.isDayjs=B,O.unix=function(q){return O(1e3*q)},O.en=A[I],O.Ls=A,O.p={},O})}(Sc)),Sc.exports}var lF=sF();const Cr=Qo(lF);var Cc={exports:{}},aF=Cc.exports,qw;function uF(){return qw||(qw=1,function(e,t){(function(n,r){e.exports=r()})(aF,function(){return function(n,r,o){n=n||{};var l=r.prototype,a={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function u(f,p,h,v){return l.fromToBase(f,p,h,v)}o.en.relativeTime=a,l.fromToBase=function(f,p,h,v,g){for(var S,k,C,E=h.$locale().relativeTime||a,_=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],P=_.length,R=0;R<P;R+=1){var I=_[R];I.d&&(S=v?o(f).diff(h,I.d,!0):h.diff(f,I.d,!0));var A=(n.rounding||Math.round)(Math.abs(S));if(C=S>0,A<=I.r||!I.r){A<=1&&R>0&&(I=_[R-1]);var H=E[I.l];g&&(A=g(""+A)),k=typeof H=="string"?H.replace("%d",A):H(A,p,I.l,C);break}}if(p)return k;var B=C?E.future:E.past;return typeof B=="function"?B(k):B.replace("%s",k)},l.to=function(f,p){return u(f,p,this,!0)},l.from=function(f,p){return u(f,p,this)};var d=function(f){return f.$u?o.utc():o()};l.toNow=function(f){return this.to(d(this),f)},l.fromNow=function(f){return this.from(d(this),f)}}})}(Cc)),Cc.exports}var cF=uF();const dF=Qo(cF),xd=["todo","in_progress","completed","wont_fix","archived"],Xm=["todo","in_progress","completed","archived"],zc=50,Ip=20,fF=[20,50,100],Jm=100,hF=5*1e3,pF=10,mF=60,gF=24,yF=7,vF=100,xF=67,wF=34,Zs={todo:"TODO",in_progress:"In Progress",completed:"Completed",wont_fix:"Won't Fix",archived:"Archived"},Qw={todo:{bg:"#6b7280",text:"#ffffff"},in_progress:{bg:"#3b82f6",text:"#ffffff"},completed:{bg:"#22c55e",text:"#ffffff"},wont_fix:{bg:"#f59e0b",text:"#ffffff"},archived:{bg:"#9ca3af",text:"#ffffff"}},Da={0:"Critical",1:"High",2:"Medium",3:"Low",4:"Backlog",5:"Someday"},Mc={0:{bg:"#dc2626",text:"#ffffff"},1:{bg:"#ea580c",text:"#ffffff"},2:{bg:"#ca8a04",text:"#ffffff"},3:{bg:"#6b7280",text:"#ffffff"},4:{bg:"#6b7280",text:"#ffffff"},5:{bg:"#9ca3af",text:"#ffffff"}};Cr.extend(dF);function Yw(e){return Cr(e).fromNow()}function bF(e,t="MMM D, YYYY"){return Cr(e).format(t)}function za(e){const t=Cr(),n=Cr(e),r=t.diff(n,"minute"),o=t.diff(n,"hour"),l=t.diff(n,"day");return r<1?"just now":r<mF?`${r}m ago`:o<gF?`${o}h ago`:l<yF?`${l}d ago`:n.format("MMM D, YYYY")}function TS({createdAt:e,updatedAt:t}){return y.jsxs("div",{className:"flex gap-3 justify-end",children:[y.jsxs("p",{className:"text-xs text-muted-foreground",children:["Created ",Yw(e)]}),y.jsxs("p",{className:"text-xs text-muted-foreground",children:["Updated ",Yw(t)]})]})}function Op(e,[t,n]){return Math.min(n,Math.max(t,e))}function Kw(e){const t=kF(e),n=b.forwardRef((r,o)=>{const{children:l,...a}=r,u=b.Children.toArray(l),d=u.find(CF);if(d){const f=d.props.children,p=u.map(h=>h===d?b.Children.count(f)>1?b.Children.only(null):b.isValidElement(f)?f.props.children:null:h);return y.jsx(t,{...a,ref:o,children:b.isValidElement(f)?b.cloneElement(f,void 0,p):null})}return y.jsx(t,{...a,ref:o,children:l})});return n.displayName=`${e}.Slot`,n}function kF(e){const t=b.forwardRef((n,r)=>{const{children:o,...l}=n;if(b.isValidElement(o)){const a=_F(o),u=EF(l,o.props);return o.type!==b.Fragment&&(u.ref=r?nl(r,a):a),b.cloneElement(o,u)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var SF=Symbol("radix.slottable");function CF(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===SF}function EF(e,t){const n={...t};for(const r in t){const o=e[r],l=t[r];/^on[A-Z]/.test(r)?o&&l?n[r]=(...u)=>{const d=l(...u);return o(...u),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...l}:r==="className"&&(n[r]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}function _F(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function TF(e){const t=e+"CollectionProvider",[n,r]=rl(t),[o,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=k=>{const{scope:C,children:E}=k,_=le.useRef(null),P=le.useRef(new Map).current;return y.jsx(o,{scope:C,itemMap:P,collectionRef:_,children:E})};a.displayName=t;const u=e+"CollectionSlot",d=Kw(u),f=le.forwardRef((k,C)=>{const{scope:E,children:_}=k,P=l(u,E),R=ct(C,P.collectionRef);return y.jsx(d,{ref:R,children:_})});f.displayName=u;const p=e+"CollectionItemSlot",h="data-radix-collection-item",v=Kw(p),g=le.forwardRef((k,C)=>{const{scope:E,children:_,...P}=k,R=le.useRef(null),I=ct(C,R),A=l(p,E);return le.useEffect(()=>(A.itemMap.set(R,{ref:R,...P}),()=>void A.itemMap.delete(R))),y.jsx(v,{[h]:"",ref:I,children:_})});g.displayName=p;function S(k){const C=l(e+"CollectionConsumer",k);return le.useCallback(()=>{const _=C.collectionRef.current;if(!_)return[];const P=Array.from(_.querySelectorAll(`[${h}]`));return Array.from(C.itemMap.values()).sort((A,H)=>P.indexOf(A.ref.current)-P.indexOf(H.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:a,Slot:f,ItemSlot:g},S,r]}var PF=b.createContext(void 0);function PS(e){const t=b.useContext(PF);return e||t||"ltr"}const NF=["top","right","bottom","left"],Xi=Math.min,Gn=Math.max,Lc=Math.round,fc=Math.floor,Ur=e=>({x:e,y:e}),RF={left:"right",right:"left",bottom:"top",top:"bottom"},jF={start:"end",end:"start"};function Dp(e,t,n){return Gn(e,Xi(t,n))}function pi(e,t){return typeof e=="function"?e(t):e}function mi(e){return e.split("-")[0]}function il(e){return e.split("-")[1]}function eg(e){return e==="x"?"y":"x"}function tg(e){return e==="y"?"height":"width"}const AF=new Set(["top","bottom"]);function Br(e){return AF.has(mi(e))?"y":"x"}function ng(e){return eg(Br(e))}function IF(e,t,n){n===void 0&&(n=!1);const r=il(e),o=ng(e),l=tg(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(a=Fc(a)),[a,Fc(a)]}function OF(e){const t=Fc(e);return[zp(e),t,zp(t)]}function zp(e){return e.replace(/start|end/g,t=>jF[t])}const Gw=["left","right"],Xw=["right","left"],DF=["top","bottom"],zF=["bottom","top"];function MF(e,t,n){switch(e){case"top":case"bottom":return n?t?Xw:Gw:t?Gw:Xw;case"left":case"right":return t?DF:zF;default:return[]}}function LF(e,t,n,r){const o=il(e);let l=MF(mi(e),n==="start",r);return o&&(l=l.map(a=>a+"-"+o),t&&(l=l.concat(l.map(zp)))),l}function Fc(e){return e.replace(/left|right|bottom|top/g,t=>RF[t])}function FF(e){return{top:0,right:0,bottom:0,left:0,...e}}function NS(e){return typeof e!="number"?FF(e):{top:e,right:e,bottom:e,left:e}}function $c(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Jw(e,t,n){let{reference:r,floating:o}=e;const l=Br(t),a=ng(t),u=tg(a),d=mi(t),f=l==="y",p=r.x+r.width/2-o.width/2,h=r.y+r.height/2-o.height/2,v=r[u]/2-o[u]/2;let g;switch(d){case"top":g={x:p,y:r.y-o.height};break;case"bottom":g={x:p,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:h};break;case"left":g={x:r.x-o.width,y:h};break;default:g={x:r.x,y:r.y}}switch(il(t)){case"start":g[a]-=v*(n&&f?-1:1);break;case"end":g[a]+=v*(n&&f?-1:1);break}return g}const $F=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:l=[],platform:a}=n,u=l.filter(Boolean),d=await(a.isRTL==null?void 0:a.isRTL(t));let f=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:h}=Jw(f,r,d),v=r,g={},S=0;for(let k=0;k<u.length;k++){const{name:C,fn:E}=u[k],{x:_,y:P,data:R,reset:I}=await E({x:p,y:h,initialPlacement:r,placement:v,strategy:o,middlewareData:g,rects:f,platform:a,elements:{reference:e,floating:t}});p=_??p,h=P??h,g={...g,[C]:{...g[C],...R}},I&&S<=50&&(S++,typeof I=="object"&&(I.placement&&(v=I.placement),I.rects&&(f=I.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):I.rects),{x:p,y:h}=Jw(f,v,d)),k=-1)}return{x:p,y:h,placement:v,strategy:o,middlewareData:g}};async function fa(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:l,rects:a,elements:u,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:h="floating",altBoundary:v=!1,padding:g=0}=pi(t,e),S=NS(g),C=u[v?h==="floating"?"reference":"floating":h],E=$c(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(C)))==null||n?C:C.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(u.floating)),boundary:f,rootBoundary:p,strategy:d})),_=h==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,P=await(l.getOffsetParent==null?void 0:l.getOffsetParent(u.floating)),R=await(l.isElement==null?void 0:l.isElement(P))?await(l.getScale==null?void 0:l.getScale(P))||{x:1,y:1}:{x:1,y:1},I=$c(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:_,offsetParent:P,strategy:d}):_);return{top:(E.top-I.top+S.top)/R.y,bottom:(I.bottom-E.bottom+S.bottom)/R.y,left:(E.left-I.left+S.left)/R.x,right:(I.right-E.right+S.right)/R.x}}const VF=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:l,platform:a,elements:u,middlewareData:d}=t,{element:f,padding:p=0}=pi(e,t)||{};if(f==null)return{};const h=NS(p),v={x:n,y:r},g=ng(o),S=tg(g),k=await a.getDimensions(f),C=g==="y",E=C?"top":"left",_=C?"bottom":"right",P=C?"clientHeight":"clientWidth",R=l.reference[S]+l.reference[g]-v[g]-l.floating[S],I=v[g]-l.reference[g],A=await(a.getOffsetParent==null?void 0:a.getOffsetParent(f));let H=A?A[P]:0;(!H||!await(a.isElement==null?void 0:a.isElement(A)))&&(H=u.floating[P]||l.floating[S]);const B=R/2-I/2,ne=H/2-k[S]/2-1,O=Xi(h[E],ne),Y=Xi(h[_],ne),G=O,ae=H-k[S]-Y,q=H/2-k[S]/2+B,U=Dp(G,q,ae),Z=!d.arrow&&il(o)!=null&&q!==U&&l.reference[S]/2-(q<G?O:Y)-k[S]/2<0,J=Z?q<G?q-G:q-ae:0;return{[g]:v[g]+J,data:{[g]:U,centerOffset:q-U-J,...Z&&{alignmentOffset:J}},reset:Z}}}),BF=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:l,rects:a,initialPlacement:u,platform:d,elements:f}=t,{mainAxis:p=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:k=!0,...C}=pi(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const E=mi(o),_=Br(u),P=mi(u)===u,R=await(d.isRTL==null?void 0:d.isRTL(f.floating)),I=v||(P||!k?[Fc(u)]:OF(u)),A=S!=="none";!v&&A&&I.push(...LF(u,k,S,R));const H=[u,...I],B=await fa(t,C),ne=[];let O=((r=l.flip)==null?void 0:r.overflows)||[];if(p&&ne.push(B[E]),h){const q=IF(o,a,R);ne.push(B[q[0]],B[q[1]])}if(O=[...O,{placement:o,overflows:ne}],!ne.every(q=>q<=0)){var Y,G;const q=(((Y=l.flip)==null?void 0:Y.index)||0)+1,U=H[q];if(U&&(!(h==="alignment"?_!==Br(U):!1)||O.every(D=>Br(D.placement)===_?D.overflows[0]>0:!0)))return{data:{index:q,overflows:O},reset:{placement:U}};let Z=(G=O.filter(J=>J.overflows[0]<=0).sort((J,D)=>J.overflows[1]-D.overflows[1])[0])==null?void 0:G.placement;if(!Z)switch(g){case"bestFit":{var ae;const J=(ae=O.filter(D=>{if(A){const K=Br(D.placement);return K===_||K==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(K=>K>0).reduce((K,N)=>K+N,0)]).sort((D,K)=>D[1]-K[1])[0])==null?void 0:ae[0];J&&(Z=J);break}case"initialPlacement":Z=u;break}if(o!==Z)return{reset:{placement:Z}}}return{}}}};function e0(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function t0(e){return NF.some(t=>e[t]>=0)}const UF=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=pi(e,t);switch(r){case"referenceHidden":{const l=await fa(t,{...o,elementContext:"reference"}),a=e0(l,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:t0(a)}}}case"escaped":{const l=await fa(t,{...o,altBoundary:!0}),a=e0(l,n.floating);return{data:{escapedOffsets:a,escaped:t0(a)}}}default:return{}}}}},RS=new Set(["left","top"]);async function HF(e,t){const{placement:n,platform:r,elements:o}=e,l=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=mi(n),u=il(n),d=Br(n)==="y",f=RS.has(a)?-1:1,p=l&&d?-1:1,h=pi(t,e);let{mainAxis:v,crossAxis:g,alignmentAxis:S}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return u&&typeof S=="number"&&(g=u==="end"?S*-1:S),d?{x:g*p,y:v*f}:{x:v*f,y:g*p}}const WF=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:l,placement:a,middlewareData:u}=t,d=await HF(t,e);return a===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:o+d.x,y:l+d.y,data:{...d,placement:a}}}}},ZF=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:l=!0,crossAxis:a=!1,limiter:u={fn:C=>{let{x:E,y:_}=C;return{x:E,y:_}}},...d}=pi(e,t),f={x:n,y:r},p=await fa(t,d),h=Br(mi(o)),v=eg(h);let g=f[v],S=f[h];if(l){const C=v==="y"?"top":"left",E=v==="y"?"bottom":"right",_=g+p[C],P=g-p[E];g=Dp(_,g,P)}if(a){const C=h==="y"?"top":"left",E=h==="y"?"bottom":"right",_=S+p[C],P=S-p[E];S=Dp(_,S,P)}const k=u.fn({...t,[v]:g,[h]:S});return{...k,data:{x:k.x-n,y:k.y-r,enabled:{[v]:l,[h]:a}}}}}},qF=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:l,middlewareData:a}=t,{offset:u=0,mainAxis:d=!0,crossAxis:f=!0}=pi(e,t),p={x:n,y:r},h=Br(o),v=eg(h);let g=p[v],S=p[h];const k=pi(u,t),C=typeof k=="number"?{mainAxis:k,crossAxis:0}:{mainAxis:0,crossAxis:0,...k};if(d){const P=v==="y"?"height":"width",R=l.reference[v]-l.floating[P]+C.mainAxis,I=l.reference[v]+l.reference[P]-C.mainAxis;g<R?g=R:g>I&&(g=I)}if(f){var E,_;const P=v==="y"?"width":"height",R=RS.has(mi(o)),I=l.reference[h]-l.floating[P]+(R&&((E=a.offset)==null?void 0:E[h])||0)+(R?0:C.crossAxis),A=l.reference[h]+l.reference[P]+(R?0:((_=a.offset)==null?void 0:_[h])||0)-(R?C.crossAxis:0);S<I?S=I:S>A&&(S=A)}return{[v]:g,[h]:S}}}},QF=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:l,platform:a,elements:u}=t,{apply:d=()=>{},...f}=pi(e,t),p=await fa(t,f),h=mi(o),v=il(o),g=Br(o)==="y",{width:S,height:k}=l.floating;let C,E;h==="top"||h==="bottom"?(C=h,E=v===(await(a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(E=h,C=v==="end"?"top":"bottom");const _=k-p.top-p.bottom,P=S-p.left-p.right,R=Xi(k-p[C],_),I=Xi(S-p[E],P),A=!t.middlewareData.shift;let H=R,B=I;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(B=P),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(H=_),A&&!v){const O=Gn(p.left,0),Y=Gn(p.right,0),G=Gn(p.top,0),ae=Gn(p.bottom,0);g?B=S-2*(O!==0||Y!==0?O+Y:Gn(p.left,p.right)):H=k-2*(G!==0||ae!==0?G+ae:Gn(p.top,p.bottom))}await d({...t,availableWidth:B,availableHeight:H});const ne=await a.getDimensions(u.floating);return S!==ne.width||k!==ne.height?{reset:{rects:!0}}:{}}}};function wd(){return typeof window<"u"}function ol(e){return jS(e)?(e.nodeName||"").toLowerCase():"#document"}function er(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qr(e){var t;return(t=(jS(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function jS(e){return wd()?e instanceof Node||e instanceof er(e).Node:!1}function Nr(e){return wd()?e instanceof Element||e instanceof er(e).Element:!1}function Hr(e){return wd()?e instanceof HTMLElement||e instanceof er(e).HTMLElement:!1}function n0(e){return!wd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof er(e).ShadowRoot}const YF=new Set(["inline","contents"]);function Ma(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Rr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!YF.has(o)}const KF=new Set(["table","td","th"]);function GF(e){return KF.has(ol(e))}const XF=[":popover-open",":modal"];function bd(e){return XF.some(t=>{try{return e.matches(t)}catch{return!1}})}const JF=["transform","translate","scale","rotate","perspective"],e4=["transform","translate","scale","rotate","perspective","filter"],t4=["paint","layout","strict","content"];function rg(e){const t=ig(),n=Nr(e)?Rr(e):e;return JF.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||e4.some(r=>(n.willChange||"").includes(r))||t4.some(r=>(n.contain||"").includes(r))}function n4(e){let t=Ji(e);for(;Hr(t)&&!qs(t);){if(rg(t))return t;if(bd(t))return null;t=Ji(t)}return null}function ig(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const r4=new Set(["html","body","#document"]);function qs(e){return r4.has(ol(e))}function Rr(e){return er(e).getComputedStyle(e)}function kd(e){return Nr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ji(e){if(ol(e)==="html")return e;const t=e.assignedSlot||e.parentNode||n0(e)&&e.host||Qr(e);return n0(t)?t.host:t}function AS(e){const t=Ji(e);return qs(t)?e.ownerDocument?e.ownerDocument.body:e.body:Hr(t)&&Ma(t)?t:AS(t)}function ha(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=AS(e),l=o===((r=e.ownerDocument)==null?void 0:r.body),a=er(o);if(l){const u=Mp(a);return t.concat(a,a.visualViewport||[],Ma(o)?o:[],u&&n?ha(u):[])}return t.concat(o,ha(o,[],n))}function Mp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function IS(e){const t=Rr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Hr(e),l=o?e.offsetWidth:n,a=o?e.offsetHeight:r,u=Lc(n)!==l||Lc(r)!==a;return u&&(n=l,r=a),{width:n,height:r,$:u}}function og(e){return Nr(e)?e:e.contextElement}function js(e){const t=og(e);if(!Hr(t))return Ur(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:l}=IS(t);let a=(l?Lc(n.width):n.width)/r,u=(l?Lc(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const i4=Ur(0);function OS(e){const t=er(e);return!ig()||!t.visualViewport?i4:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function o4(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==er(e)?!1:t}function Vo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),l=og(e);let a=Ur(1);t&&(r?Nr(r)&&(a=js(r)):a=js(e));const u=o4(l,n,r)?OS(l):Ur(0);let d=(o.left+u.x)/a.x,f=(o.top+u.y)/a.y,p=o.width/a.x,h=o.height/a.y;if(l){const v=er(l),g=r&&Nr(r)?er(r):r;let S=v,k=Mp(S);for(;k&&r&&g!==S;){const C=js(k),E=k.getBoundingClientRect(),_=Rr(k),P=E.left+(k.clientLeft+parseFloat(_.paddingLeft))*C.x,R=E.top+(k.clientTop+parseFloat(_.paddingTop))*C.y;d*=C.x,f*=C.y,p*=C.x,h*=C.y,d+=P,f+=R,S=er(k),k=Mp(S)}}return $c({width:p,height:h,x:d,y:f})}function Sd(e,t){const n=kd(e).scrollLeft;return t?t.left+n:Vo(Qr(e)).left+n}function DS(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Sd(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function s4(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const l=o==="fixed",a=Qr(r),u=t?bd(t.floating):!1;if(r===a||u&&l)return n;let d={scrollLeft:0,scrollTop:0},f=Ur(1);const p=Ur(0),h=Hr(r);if((h||!h&&!l)&&((ol(r)!=="body"||Ma(a))&&(d=kd(r)),Hr(r))){const g=Vo(r);f=js(r),p.x=g.x+r.clientLeft,p.y=g.y+r.clientTop}const v=a&&!h&&!l?DS(a,d):Ur(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+v.x,y:n.y*f.y-d.scrollTop*f.y+p.y+v.y}}function l4(e){return Array.from(e.getClientRects())}function a4(e){const t=Qr(e),n=kd(e),r=e.ownerDocument.body,o=Gn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),l=Gn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Sd(e);const u=-n.scrollTop;return Rr(r).direction==="rtl"&&(a+=Gn(t.clientWidth,r.clientWidth)-o),{width:o,height:l,x:a,y:u}}const r0=25;function u4(e,t){const n=er(e),r=Qr(e),o=n.visualViewport;let l=r.clientWidth,a=r.clientHeight,u=0,d=0;if(o){l=o.width,a=o.height;const p=ig();(!p||p&&t==="fixed")&&(u=o.offsetLeft,d=o.offsetTop)}const f=Sd(r);if(f<=0){const p=r.ownerDocument,h=p.body,v=getComputedStyle(h),g=p.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,S=Math.abs(r.clientWidth-h.clientWidth-g);S<=r0&&(l-=S)}else f<=r0&&(l+=f);return{width:l,height:a,x:u,y:d}}const c4=new Set(["absolute","fixed"]);function d4(e,t){const n=Vo(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,l=Hr(e)?js(e):Ur(1),a=e.clientWidth*l.x,u=e.clientHeight*l.y,d=o*l.x,f=r*l.y;return{width:a,height:u,x:d,y:f}}function i0(e,t,n){let r;if(t==="viewport")r=u4(e,n);else if(t==="document")r=a4(Qr(e));else if(Nr(t))r=d4(t,n);else{const o=OS(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return $c(r)}function zS(e,t){const n=Ji(e);return n===t||!Nr(n)||qs(n)?!1:Rr(n).position==="fixed"||zS(n,t)}function f4(e,t){const n=t.get(e);if(n)return n;let r=ha(e,[],!1).filter(u=>Nr(u)&&ol(u)!=="body"),o=null;const l=Rr(e).position==="fixed";let a=l?Ji(e):e;for(;Nr(a)&&!qs(a);){const u=Rr(a),d=rg(a);!d&&u.position==="fixed"&&(o=null),(l?!d&&!o:!d&&u.position==="static"&&!!o&&c4.has(o.position)||Ma(a)&&!d&&zS(e,a))?r=r.filter(p=>p!==a):o=u,a=Ji(a)}return t.set(e,r),r}function h4(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?bd(t)?[]:f4(t,this._c):[].concat(n),r],u=a[0],d=a.reduce((f,p)=>{const h=i0(t,p,o);return f.top=Gn(h.top,f.top),f.right=Xi(h.right,f.right),f.bottom=Xi(h.bottom,f.bottom),f.left=Gn(h.left,f.left),f},i0(t,u,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function p4(e){const{width:t,height:n}=IS(e);return{width:t,height:n}}function m4(e,t,n){const r=Hr(t),o=Qr(t),l=n==="fixed",a=Vo(e,!0,l,t);let u={scrollLeft:0,scrollTop:0};const d=Ur(0);function f(){d.x=Sd(o)}if(r||!r&&!l)if((ol(t)!=="body"||Ma(o))&&(u=kd(t)),r){const g=Vo(t,!0,l,t);d.x=g.x+t.clientLeft,d.y=g.y+t.clientTop}else o&&f();l&&!r&&o&&f();const p=o&&!r&&!l?DS(o,u):Ur(0),h=a.left+u.scrollLeft-d.x-p.x,v=a.top+u.scrollTop-d.y-p.y;return{x:h,y:v,width:a.width,height:a.height}}function ap(e){return Rr(e).position==="static"}function o0(e,t){if(!Hr(e)||Rr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Qr(e)===n&&(n=n.ownerDocument.body),n}function MS(e,t){const n=er(e);if(bd(e))return n;if(!Hr(e)){let o=Ji(e);for(;o&&!qs(o);){if(Nr(o)&&!ap(o))return o;o=Ji(o)}return n}let r=o0(e,t);for(;r&&GF(r)&&ap(r);)r=o0(r,t);return r&&qs(r)&&ap(r)&&!rg(r)?n:r||n4(e)||n}const g4=async function(e){const t=this.getOffsetParent||MS,n=this.getDimensions,r=await n(e.floating);return{reference:m4(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function y4(e){return Rr(e).direction==="rtl"}const v4={convertOffsetParentRelativeRectToViewportRelativeRect:s4,getDocumentElement:Qr,getClippingRect:h4,getOffsetParent:MS,getElementRects:g4,getClientRects:l4,getDimensions:p4,getScale:js,isElement:Nr,isRTL:y4};function LS(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function x4(e,t){let n=null,r;const o=Qr(e);function l(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function a(u,d){u===void 0&&(u=!1),d===void 0&&(d=1),l();const f=e.getBoundingClientRect(),{left:p,top:h,width:v,height:g}=f;if(u||t(),!v||!g)return;const S=fc(h),k=fc(o.clientWidth-(p+v)),C=fc(o.clientHeight-(h+g)),E=fc(p),P={rootMargin:-S+"px "+-k+"px "+-C+"px "+-E+"px",threshold:Gn(0,Xi(1,d))||1};let R=!0;function I(A){const H=A[0].intersectionRatio;if(H!==d){if(!R)return a();H?a(!1,H):r=setTimeout(()=>{a(!1,1e-7)},1e3)}H===1&&!LS(f,e.getBoundingClientRect())&&a(),R=!1}try{n=new IntersectionObserver(I,{...P,root:o.ownerDocument})}catch{n=new IntersectionObserver(I,P)}n.observe(e)}return a(!0),l}function w4(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=og(e),p=o||l?[...f?ha(f):[],...ha(t)]:[];p.forEach(E=>{o&&E.addEventListener("scroll",n,{passive:!0}),l&&E.addEventListener("resize",n)});const h=f&&u?x4(f,n):null;let v=-1,g=null;a&&(g=new ResizeObserver(E=>{let[_]=E;_&&_.target===f&&g&&(g.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var P;(P=g)==null||P.observe(t)})),n()}),f&&!d&&g.observe(f),g.observe(t));let S,k=d?Vo(e):null;d&&C();function C(){const E=Vo(e);k&&!LS(k,E)&&n(),k=E,S=requestAnimationFrame(C)}return n(),()=>{var E;p.forEach(_=>{o&&_.removeEventListener("scroll",n),l&&_.removeEventListener("resize",n)}),h==null||h(),(E=g)==null||E.disconnect(),g=null,d&&cancelAnimationFrame(S)}}const b4=WF,k4=ZF,S4=BF,C4=QF,E4=UF,s0=VF,_4=qF,T4=(e,t,n)=>{const r=new Map,o={platform:v4,...n},l={...o.platform,_c:r};return $F(e,t,{...o,platform:l})};var P4=typeof document<"u",N4=function(){},Ec=P4?b.useLayoutEffect:N4;function Vc(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(!Vc(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(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const l=o[r];if(!(l==="_owner"&&e.$$typeof)&&!Vc(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function FS(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function l0(e,t){const n=FS(e);return Math.round(t*n)/n}function up(e){const t=b.useRef(e);return Ec(()=>{t.current=e}),t}function R4(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:l,floating:a}={},transform:u=!0,whileElementsMounted:d,open:f}=e,[p,h]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,g]=b.useState(r);Vc(v,r)||g(r);const[S,k]=b.useState(null),[C,E]=b.useState(null),_=b.useCallback(D=>{D!==A.current&&(A.current=D,k(D))},[]),P=b.useCallback(D=>{D!==H.current&&(H.current=D,E(D))},[]),R=l||S,I=a||C,A=b.useRef(null),H=b.useRef(null),B=b.useRef(p),ne=d!=null,O=up(d),Y=up(o),G=up(f),ae=b.useCallback(()=>{if(!A.current||!H.current)return;const D={placement:t,strategy:n,middleware:v};Y.current&&(D.platform=Y.current),T4(A.current,H.current,D).then(K=>{const N={...K,isPositioned:G.current!==!1};q.current&&!Vc(B.current,N)&&(B.current=N,Ra.flushSync(()=>{h(N)}))})},[v,t,n,Y,G]);Ec(()=>{f===!1&&B.current.isPositioned&&(B.current.isPositioned=!1,h(D=>({...D,isPositioned:!1})))},[f]);const q=b.useRef(!1);Ec(()=>(q.current=!0,()=>{q.current=!1}),[]),Ec(()=>{if(R&&(A.current=R),I&&(H.current=I),R&&I){if(O.current)return O.current(R,I,ae);ae()}},[R,I,ae,O,ne]);const U=b.useMemo(()=>({reference:A,floating:H,setReference:_,setFloating:P}),[_,P]),Z=b.useMemo(()=>({reference:R,floating:I}),[R,I]),J=b.useMemo(()=>{const D={position:n,left:0,top:0};if(!Z.floating)return D;const K=l0(Z.floating,p.x),N=l0(Z.floating,p.y);return u?{...D,transform:"translate("+K+"px, "+N+"px)",...FS(Z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:K,top:N}},[n,u,Z.floating,p.x,p.y]);return b.useMemo(()=>({...p,update:ae,refs:U,elements:Z,floatingStyles:J}),[p,ae,U,Z,J])}const j4=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?s0({element:r.current,padding:o}).fn(n):{}:r?s0({element:r,padding:o}).fn(n):{}}}},A4=(e,t)=>({...b4(e),options:[e,t]}),I4=(e,t)=>({...k4(e),options:[e,t]}),O4=(e,t)=>({..._4(e),options:[e,t]}),D4=(e,t)=>({...S4(e),options:[e,t]}),z4=(e,t)=>({...C4(e),options:[e,t]}),M4=(e,t)=>({...E4(e),options:[e,t]}),L4=(e,t)=>({...j4(e),options:[e,t]});var F4="Arrow",$S=b.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...l}=e;return y.jsx(it.svg,{...l,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:y.jsx("polygon",{points:"0,0 30,0 15,10"})})});$S.displayName=F4;var $4=$S;function V4(e){const[t,n]=b.useState(void 0);return nn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const l=o[0];let a,u;if("borderBoxSize"in l){const d=l.borderBoxSize,f=Array.isArray(d)?d[0]:d;a=f.inlineSize,u=f.blockSize}else a=e.offsetWidth,u=e.offsetHeight;n({width:a,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var sg="Popper",[VS,Cd]=rl(sg),[B4,BS]=VS(sg),US=e=>{const{__scopePopper:t,children:n}=e,[r,o]=b.useState(null);return y.jsx(B4,{scope:t,anchor:r,onAnchorChange:o,children:n})};US.displayName=sg;var HS="PopperAnchor",WS=b.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,l=BS(HS,n),a=b.useRef(null),u=ct(t,a),d=b.useRef(null);return b.useEffect(()=>{const f=d.current;d.current=(r==null?void 0:r.current)||a.current,f!==d.current&&l.onAnchorChange(d.current)}),r?null:y.jsx(it.div,{...o,ref:u})});WS.displayName=HS;var lg="PopperContent",[U4,H4]=VS(lg),ZS=b.forwardRef((e,t)=>{var re,me,Se,be,Ie,Ue;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:l="center",alignOffset:a=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:h="partial",hideWhenDetached:v=!1,updatePositionStrategy:g="optimized",onPlaced:S,...k}=e,C=BS(lg,n),[E,_]=b.useState(null),P=ct(t,ot=>_(ot)),[R,I]=b.useState(null),A=V4(R),H=(A==null?void 0:A.width)??0,B=(A==null?void 0:A.height)??0,ne=r+(l!=="center"?"-"+l:""),O=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},Y=Array.isArray(f)?f:[f],G=Y.length>0,ae={padding:O,boundary:Y.filter(Z4),altBoundary:G},{refs:q,floatingStyles:U,placement:Z,isPositioned:J,middlewareData:D}=R4({strategy:"fixed",placement:ne,whileElementsMounted:(...ot)=>w4(...ot,{animationFrame:g==="always"}),elements:{reference:C.anchor},middleware:[A4({mainAxis:o+B,alignmentAxis:a}),d&&I4({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?O4():void 0,...ae}),d&&D4({...ae}),z4({...ae,apply:({elements:ot,rects:It,availableWidth:Zt,availableHeight:on})=>{const{width:Xt,height:Bn}=It.reference,fn=ot.floating.style;fn.setProperty("--radix-popper-available-width",`${Zt}px`),fn.setProperty("--radix-popper-available-height",`${on}px`),fn.setProperty("--radix-popper-anchor-width",`${Xt}px`),fn.setProperty("--radix-popper-anchor-height",`${Bn}px`)}}),R&&L4({element:R,padding:u}),q4({arrowWidth:H,arrowHeight:B}),v&&M4({strategy:"referenceHidden",...ae})]}),[K,N]=YS(Z),M=Ln(S);nn(()=>{J&&(M==null||M())},[J,M]);const Q=(re=D.arrow)==null?void 0:re.x,j=(me=D.arrow)==null?void 0:me.y,ue=((Se=D.arrow)==null?void 0:Se.centerOffset)!==0,[ve,xe]=b.useState();return nn(()=>{E&&xe(window.getComputedStyle(E).zIndex)},[E]),y.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:J?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ve,"--radix-popper-transform-origin":[(be=D.transformOrigin)==null?void 0:be.x,(Ie=D.transformOrigin)==null?void 0:Ie.y].join(" "),...((Ue=D.hide)==null?void 0:Ue.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:y.jsx(U4,{scope:n,placedSide:K,onArrowChange:I,arrowX:Q,arrowY:j,shouldHideArrow:ue,children:y.jsx(it.div,{"data-side":K,"data-align":N,...k,ref:P,style:{...k.style,animation:J?void 0:"none"}})})})});ZS.displayName=lg;var qS="PopperArrow",W4={top:"bottom",right:"left",bottom:"top",left:"right"},QS=b.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,l=H4(qS,r),a=W4[l.placedSide];return y.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:y.jsx($4,{...o,ref:n,style:{...o.style,display:"block"}})})});QS.displayName=qS;function Z4(e){return e!==null}var q4=e=>({name:"transformOrigin",options:e,fn(t){var C,E,_;const{placement:n,rects:r,middlewareData:o}=t,a=((C=o.arrow)==null?void 0:C.centerOffset)!==0,u=a?0:e.arrowWidth,d=a?0:e.arrowHeight,[f,p]=YS(n),h={start:"0%",center:"50%",end:"100%"}[p],v=(((E=o.arrow)==null?void 0:E.x)??0)+u/2,g=(((_=o.arrow)==null?void 0:_.y)??0)+d/2;let S="",k="";return f==="bottom"?(S=a?h:`${v}px`,k=`${-d}px`):f==="top"?(S=a?h:`${v}px`,k=`${r.floating.height+d}px`):f==="right"?(S=`${-d}px`,k=a?h:`${g}px`):f==="left"&&(S=`${r.floating.width+d}px`,k=a?h:`${g}px`),{data:{x:S,y:k}}}});function YS(e){const[t,n="center"]=e.split("-");return[t,n]}var KS=US,GS=WS,XS=ZS,JS=QS;function Q4(e){const t=Y4(e),n=b.forwardRef((r,o)=>{const{children:l,...a}=r,u=b.Children.toArray(l),d=u.find(G4);if(d){const f=d.props.children,p=u.map(h=>h===d?b.Children.count(f)>1?b.Children.only(null):b.isValidElement(f)?f.props.children:null:h);return y.jsx(t,{...a,ref:o,children:b.isValidElement(f)?b.cloneElement(f,void 0,p):null})}return y.jsx(t,{...a,ref:o,children:l})});return n.displayName=`${e}.Slot`,n}function Y4(e){const t=b.forwardRef((n,r)=>{const{children:o,...l}=n;if(b.isValidElement(o)){const a=J4(o),u=X4(l,o.props);return o.type!==b.Fragment&&(u.ref=r?nl(r,a):a),b.cloneElement(o,u)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var K4=Symbol("radix.slottable");function G4(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===K4}function X4(e,t){const n={...t};for(const r in t){const o=e[r],l=t[r];/^on[A-Z]/.test(r)?o&&l?n[r]=(...u)=>{const d=l(...u);return o(...u),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...l}:r==="className"&&(n[r]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}function J4(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function e$(e){const t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var eC=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),t$="VisuallyHidden",tC=b.forwardRef((e,t)=>y.jsx(it.span,{...e,ref:t,style:{...eC,...e.style}}));tC.displayName=t$;var n$=tC,r$=[" ","Enter","ArrowUp","ArrowDown"],i$=[" ","Enter"],Bo="Select",[Ed,_d,o$]=TF(Bo),[sl]=rl(Bo,[o$,Cd]),Td=Cd(),[s$,so]=sl(Bo),[l$,a$]=sl(Bo),nC=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:l,value:a,defaultValue:u,onValueChange:d,dir:f,name:p,autoComplete:h,disabled:v,required:g,form:S}=e,k=Td(t),[C,E]=b.useState(null),[_,P]=b.useState(null),[R,I]=b.useState(!1),A=PS(f),[H,B]=Oc({prop:r,defaultProp:o??!1,onChange:l,caller:Bo}),[ne,O]=Oc({prop:a,defaultProp:u,onChange:d,caller:Bo}),Y=b.useRef(null),G=C?S||!!C.closest("form"):!0,[ae,q]=b.useState(new Set),U=Array.from(ae).map(Z=>Z.props.value).join(";");return y.jsx(KS,{...k,children:y.jsxs(s$,{required:g,scope:t,trigger:C,onTriggerChange:E,valueNode:_,onValueNodeChange:P,valueNodeHasChildren:R,onValueNodeHasChildrenChange:I,contentId:Lo(),value:ne,onValueChange:O,open:H,onOpenChange:B,dir:A,triggerPointerDownPosRef:Y,disabled:v,children:[y.jsx(Ed.Provider,{scope:t,children:y.jsx(l$,{scope:e.__scopeSelect,onNativeOptionAdd:b.useCallback(Z=>{q(J=>new Set(J).add(Z))},[]),onNativeOptionRemove:b.useCallback(Z=>{q(J=>{const D=new Set(J);return D.delete(Z),D})},[]),children:n})}),G?y.jsxs(CC,{"aria-hidden":!0,required:g,tabIndex:-1,name:p,autoComplete:h,value:ne,onChange:Z=>O(Z.target.value),disabled:v,form:S,children:[ne===void 0?y.jsx("option",{value:""}):null,Array.from(ae)]},U):null]})})};nC.displayName=Bo;var rC="SelectTrigger",iC=b.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,l=Td(n),a=so(rC,n),u=a.disabled||r,d=ct(t,a.onTriggerChange),f=_d(n),p=b.useRef("touch"),[h,v,g]=_C(k=>{const C=f().filter(P=>!P.disabled),E=C.find(P=>P.value===a.value),_=TC(C,k,E);_!==void 0&&a.onValueChange(_.value)}),S=k=>{u||(a.onOpenChange(!0),g()),k&&(a.triggerPointerDownPosRef.current={x:Math.round(k.pageX),y:Math.round(k.pageY)})};return y.jsx(GS,{asChild:!0,...l,children:y.jsx(it.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":EC(a.value)?"":void 0,...o,ref:d,onClick:Ye(o.onClick,k=>{k.currentTarget.focus(),p.current!=="mouse"&&S(k)}),onPointerDown:Ye(o.onPointerDown,k=>{p.current=k.pointerType;const C=k.target;C.hasPointerCapture(k.pointerId)&&C.releasePointerCapture(k.pointerId),k.button===0&&k.ctrlKey===!1&&k.pointerType==="mouse"&&(S(k),k.preventDefault())}),onKeyDown:Ye(o.onKeyDown,k=>{const C=h.current!=="";!(k.ctrlKey||k.altKey||k.metaKey)&&k.key.length===1&&v(k.key),!(C&&k.key===" ")&&r$.includes(k.key)&&(S(),k.preventDefault())})})})});iC.displayName=rC;var oC="SelectValue",sC=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:l,placeholder:a="",...u}=e,d=so(oC,n),{onValueNodeHasChildrenChange:f}=d,p=l!==void 0,h=ct(t,d.onValueNodeChange);return nn(()=>{f(p)},[f,p]),y.jsx(it.span,{...u,ref:h,style:{pointerEvents:"none"},children:EC(d.value)?y.jsx(y.Fragment,{children:a}):l})});sC.displayName=oC;var u$="SelectIcon",lC=b.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return y.jsx(it.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});lC.displayName=u$;var c$="SelectPortal",aC=e=>y.jsx(pd,{asChild:!0,...e});aC.displayName=c$;var Uo="SelectContent",uC=b.forwardRef((e,t)=>{const n=so(Uo,e.__scopeSelect),[r,o]=b.useState();if(nn(()=>{o(new DocumentFragment)},[]),!n.open){const l=r;return l?Ra.createPortal(y.jsx(cC,{scope:e.__scopeSelect,children:y.jsx(Ed.Slot,{scope:e.__scopeSelect,children:y.jsx("div",{children:e.children})})}),l):null}return y.jsx(dC,{...e,ref:t})});uC.displayName=Uo;var br=10,[cC,lo]=sl(Uo),d$="SelectContentImpl",f$=Q4("SelectContent.RemoveScroll"),dC=b.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:l,onPointerDownOutside:a,side:u,sideOffset:d,align:f,alignOffset:p,arrowPadding:h,collisionBoundary:v,collisionPadding:g,sticky:S,hideWhenDetached:k,avoidCollisions:C,...E}=e,_=so(Uo,n),[P,R]=b.useState(null),[I,A]=b.useState(null),H=ct(t,re=>R(re)),[B,ne]=b.useState(null),[O,Y]=b.useState(null),G=_d(n),[ae,q]=b.useState(!1),U=b.useRef(!1);b.useEffect(()=>{if(P)return J1(P)},[P]),H1();const Z=b.useCallback(re=>{const[me,...Se]=G().map(Ue=>Ue.ref.current),[be]=Se.slice(-1),Ie=document.activeElement;for(const Ue of re)if(Ue===Ie||(Ue==null||Ue.scrollIntoView({block:"nearest"}),Ue===me&&I&&(I.scrollTop=0),Ue===be&&I&&(I.scrollTop=I.scrollHeight),Ue==null||Ue.focus(),document.activeElement!==Ie))return},[G,I]),J=b.useCallback(()=>Z([B,P]),[Z,B,P]);b.useEffect(()=>{ae&&J()},[ae,J]);const{onOpenChange:D,triggerPointerDownPosRef:K}=_;b.useEffect(()=>{if(P){let re={x:0,y:0};const me=be=>{var Ie,Ue;re={x:Math.abs(Math.round(be.pageX)-(((Ie=K.current)==null?void 0:Ie.x)??0)),y:Math.abs(Math.round(be.pageY)-(((Ue=K.current)==null?void 0:Ue.y)??0))}},Se=be=>{re.x<=10&&re.y<=10?be.preventDefault():P.contains(be.target)||D(!1),document.removeEventListener("pointermove",me),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",me),document.addEventListener("pointerup",Se,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",me),document.removeEventListener("pointerup",Se,{capture:!0})}}},[P,D,K]),b.useEffect(()=>{const re=()=>D(!1);return window.addEventListener("blur",re),window.addEventListener("resize",re),()=>{window.removeEventListener("blur",re),window.removeEventListener("resize",re)}},[D]);const[N,M]=_C(re=>{const me=G().filter(Ie=>!Ie.disabled),Se=me.find(Ie=>Ie.ref.current===document.activeElement),be=TC(me,re,Se);be&&setTimeout(()=>be.ref.current.focus())}),Q=b.useCallback((re,me,Se)=>{const be=!U.current&&!Se;(_.value!==void 0&&_.value===me||be)&&(ne(re),be&&(U.current=!0))},[_.value]),j=b.useCallback(()=>P==null?void 0:P.focus(),[P]),ue=b.useCallback((re,me,Se)=>{const be=!U.current&&!Se;(_.value!==void 0&&_.value===me||be)&&Y(re)},[_.value]),ve=r==="popper"?Lp:fC,xe=ve===Lp?{side:u,sideOffset:d,align:f,alignOffset:p,arrowPadding:h,collisionBoundary:v,collisionPadding:g,sticky:S,hideWhenDetached:k,avoidCollisions:C}:{};return y.jsx(cC,{scope:n,content:P,viewport:I,onViewportChange:A,itemRefCallback:Q,selectedItem:B,onItemLeave:j,itemTextRefCallback:ue,focusSelectedItem:J,selectedItemText:O,position:r,isPositioned:ae,searchRef:N,children:y.jsx(Qm,{as:f$,allowPinchZoom:!0,children:y.jsx(qm,{asChild:!0,trapped:_.open,onMountAutoFocus:re=>{re.preventDefault()},onUnmountAutoFocus:Ye(o,re=>{var me;(me=_.trigger)==null||me.focus({preventScroll:!0}),re.preventDefault()}),children:y.jsx(hd,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:a,onFocusOutside:re=>re.preventDefault(),onDismiss:()=>_.onOpenChange(!1),children:y.jsx(ve,{role:"listbox",id:_.contentId,"data-state":_.open?"open":"closed",dir:_.dir,onContextMenu:re=>re.preventDefault(),...E,...xe,onPlaced:()=>q(!0),ref:H,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:Ye(E.onKeyDown,re=>{const me=re.ctrlKey||re.altKey||re.metaKey;if(re.key==="Tab"&&re.preventDefault(),!me&&re.key.length===1&&M(re.key),["ArrowUp","ArrowDown","Home","End"].includes(re.key)){let be=G().filter(Ie=>!Ie.disabled).map(Ie=>Ie.ref.current);if(["ArrowUp","End"].includes(re.key)&&(be=be.slice().reverse()),["ArrowUp","ArrowDown"].includes(re.key)){const Ie=re.target,Ue=be.indexOf(Ie);be=be.slice(Ue+1)}setTimeout(()=>Z(be)),re.preventDefault()}})})})})})})});dC.displayName=d$;var h$="SelectItemAlignedPosition",fC=b.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,l=so(Uo,n),a=lo(Uo,n),[u,d]=b.useState(null),[f,p]=b.useState(null),h=ct(t,H=>p(H)),v=_d(n),g=b.useRef(!1),S=b.useRef(!0),{viewport:k,selectedItem:C,selectedItemText:E,focusSelectedItem:_}=a,P=b.useCallback(()=>{if(l.trigger&&l.valueNode&&u&&f&&k&&C&&E){const H=l.trigger.getBoundingClientRect(),B=f.getBoundingClientRect(),ne=l.valueNode.getBoundingClientRect(),O=E.getBoundingClientRect();if(l.dir!=="rtl"){const Ie=O.left-B.left,Ue=ne.left-Ie,ot=H.left-Ue,It=H.width+ot,Zt=Math.max(It,B.width),on=window.innerWidth-br,Xt=Op(Ue,[br,Math.max(br,on-Zt)]);u.style.minWidth=It+"px",u.style.left=Xt+"px"}else{const Ie=B.right-O.right,Ue=window.innerWidth-ne.right-Ie,ot=window.innerWidth-H.right-Ue,It=H.width+ot,Zt=Math.max(It,B.width),on=window.innerWidth-br,Xt=Op(Ue,[br,Math.max(br,on-Zt)]);u.style.minWidth=It+"px",u.style.right=Xt+"px"}const Y=v(),G=window.innerHeight-br*2,ae=k.scrollHeight,q=window.getComputedStyle(f),U=parseInt(q.borderTopWidth,10),Z=parseInt(q.paddingTop,10),J=parseInt(q.borderBottomWidth,10),D=parseInt(q.paddingBottom,10),K=U+Z+ae+D+J,N=Math.min(C.offsetHeight*5,K),M=window.getComputedStyle(k),Q=parseInt(M.paddingTop,10),j=parseInt(M.paddingBottom,10),ue=H.top+H.height/2-br,ve=G-ue,xe=C.offsetHeight/2,re=C.offsetTop+xe,me=U+Z+re,Se=K-me;if(me<=ue){const Ie=Y.length>0&&C===Y[Y.length-1].ref.current;u.style.bottom="0px";const Ue=f.clientHeight-k.offsetTop-k.offsetHeight,ot=Math.max(ve,xe+(Ie?j:0)+Ue+J),It=me+ot;u.style.height=It+"px"}else{const Ie=Y.length>0&&C===Y[0].ref.current;u.style.top="0px";const ot=Math.max(ue,U+k.offsetTop+(Ie?Q:0)+xe)+Se;u.style.height=ot+"px",k.scrollTop=me-ue+k.offsetTop}u.style.margin=`${br}px 0`,u.style.minHeight=N+"px",u.style.maxHeight=G+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[v,l.trigger,l.valueNode,u,f,k,C,E,l.dir,r]);nn(()=>P(),[P]);const[R,I]=b.useState();nn(()=>{f&&I(window.getComputedStyle(f).zIndex)},[f]);const A=b.useCallback(H=>{H&&S.current===!0&&(P(),_==null||_(),S.current=!1)},[P,_]);return y.jsx(m$,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:g,onScrollButtonChange:A,children:y.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:y.jsx(it.div,{...o,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});fC.displayName=h$;var p$="SelectPopperPosition",Lp=b.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=br,...l}=e,a=Td(n);return y.jsx(XS,{...a,...l,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...l.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Lp.displayName=p$;var[m$,ag]=sl(Uo,{}),Fp="SelectViewport",hC=b.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,l=lo(Fp,n),a=ag(Fp,n),u=ct(t,l.onViewportChange),d=b.useRef(0);return y.jsxs(y.Fragment,{children:[y.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),y.jsx(Ed.Slot,{scope:n,children:y.jsx(it.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Ye(o.onScroll,f=>{const p=f.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:v}=a;if(v!=null&&v.current&&h){const g=Math.abs(d.current-p.scrollTop);if(g>0){const S=window.innerHeight-br*2,k=parseFloat(h.style.minHeight),C=parseFloat(h.style.height),E=Math.max(k,C);if(E<S){const _=E+g,P=Math.min(S,_),R=_-P;h.style.height=P+"px",h.style.bottom==="0px"&&(p.scrollTop=R>0?R:0,h.style.justifyContent="flex-end")}}}d.current=p.scrollTop})})})]})});hC.displayName=Fp;var pC="SelectGroup",[g$,y$]=sl(pC),v$=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Lo();return y.jsx(g$,{scope:n,id:o,children:y.jsx(it.div,{role:"group","aria-labelledby":o,...r,ref:t})})});v$.displayName=pC;var mC="SelectLabel",x$=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=y$(mC,n);return y.jsx(it.div,{id:o.id,...r,ref:t})});x$.displayName=mC;var Bc="SelectItem",[w$,gC]=sl(Bc),yC=b.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:l,...a}=e,u=so(Bc,n),d=lo(Bc,n),f=u.value===r,[p,h]=b.useState(l??""),[v,g]=b.useState(!1),S=ct(t,_=>{var P;return(P=d.itemRefCallback)==null?void 0:P.call(d,_,r,o)}),k=Lo(),C=b.useRef("touch"),E=()=>{o||(u.onValueChange(r),u.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return y.jsx(w$,{scope:n,value:r,disabled:o,textId:k,isSelected:f,onItemTextChange:b.useCallback(_=>{h(P=>P||((_==null?void 0:_.textContent)??"").trim())},[]),children:y.jsx(Ed.ItemSlot,{scope:n,value:r,disabled:o,textValue:p,children:y.jsx(it.div,{role:"option","aria-labelledby":k,"data-highlighted":v?"":void 0,"aria-selected":f&&v,"data-state":f?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...a,ref:S,onFocus:Ye(a.onFocus,()=>g(!0)),onBlur:Ye(a.onBlur,()=>g(!1)),onClick:Ye(a.onClick,()=>{C.current!=="mouse"&&E()}),onPointerUp:Ye(a.onPointerUp,()=>{C.current==="mouse"&&E()}),onPointerDown:Ye(a.onPointerDown,_=>{C.current=_.pointerType}),onPointerMove:Ye(a.onPointerMove,_=>{var P;C.current=_.pointerType,o?(P=d.onItemLeave)==null||P.call(d):C.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ye(a.onPointerLeave,_=>{var P;_.currentTarget===document.activeElement&&((P=d.onItemLeave)==null||P.call(d))}),onKeyDown:Ye(a.onKeyDown,_=>{var R;((R=d.searchRef)==null?void 0:R.current)!==""&&_.key===" "||(i$.includes(_.key)&&E(),_.key===" "&&_.preventDefault())})})})})});yC.displayName=Bc;var ea="SelectItemText",vC=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...l}=e,a=so(ea,n),u=lo(ea,n),d=gC(ea,n),f=a$(ea,n),[p,h]=b.useState(null),v=ct(t,E=>h(E),d.onItemTextChange,E=>{var _;return(_=u.itemTextRefCallback)==null?void 0:_.call(u,E,d.value,d.disabled)}),g=p==null?void 0:p.textContent,S=b.useMemo(()=>y.jsx("option",{value:d.value,disabled:d.disabled,children:g},d.value),[d.disabled,d.value,g]),{onNativeOptionAdd:k,onNativeOptionRemove:C}=f;return nn(()=>(k(S),()=>C(S)),[k,C,S]),y.jsxs(y.Fragment,{children:[y.jsx(it.span,{id:d.textId,...l,ref:v}),d.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Ra.createPortal(l.children,a.valueNode):null]})});vC.displayName=ea;var xC="SelectItemIndicator",wC=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return gC(xC,n).isSelected?y.jsx(it.span,{"aria-hidden":!0,...r,ref:t}):null});wC.displayName=xC;var $p="SelectScrollUpButton",bC=b.forwardRef((e,t)=>{const n=lo($p,e.__scopeSelect),r=ag($p,e.__scopeSelect),[o,l]=b.useState(!1),a=ct(t,r.onScrollButtonChange);return nn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const f=d.scrollTop>0;l(f)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),o?y.jsx(SC,{...e,ref:a,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop-d.offsetHeight)}}):null});bC.displayName=$p;var Vp="SelectScrollDownButton",kC=b.forwardRef((e,t)=>{const n=lo(Vp,e.__scopeSelect),r=ag(Vp,e.__scopeSelect),[o,l]=b.useState(!1),a=ct(t,r.onScrollButtonChange);return nn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const f=d.scrollHeight-d.clientHeight,p=Math.ceil(d.scrollTop)<f;l(p)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),o?y.jsx(SC,{...e,ref:a,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop+d.offsetHeight)}}):null});kC.displayName=Vp;var SC=b.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,l=lo("SelectScrollButton",n),a=b.useRef(null),u=_d(n),d=b.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return b.useEffect(()=>()=>d(),[d]),nn(()=>{var p;const f=u().find(h=>h.ref.current===document.activeElement);(p=f==null?void 0:f.ref.current)==null||p.scrollIntoView({block:"nearest"})},[u]),y.jsx(it.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:Ye(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:Ye(o.onPointerMove,()=>{var f;(f=l.onItemLeave)==null||f.call(l),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:Ye(o.onPointerLeave,()=>{d()})})}),b$="SelectSeparator",k$=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return y.jsx(it.div,{"aria-hidden":!0,...r,ref:t})});k$.displayName=b$;var Bp="SelectArrow",S$=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Td(n),l=so(Bp,n),a=lo(Bp,n);return l.open&&a.position==="popper"?y.jsx(JS,{...o,...r,ref:t}):null});S$.displayName=Bp;var C$="SelectBubbleInput",CC=b.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=b.useRef(null),l=ct(r,o),a=e$(t);return b.useEffect(()=>{const u=o.current;if(!u)return;const d=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(d,"value").set;if(a!==t&&p){const h=new Event("change",{bubbles:!0});p.call(u,t),u.dispatchEvent(h)}},[a,t]),y.jsx(it.select,{...n,style:{...eC,...n.style},ref:l,defaultValue:t})});CC.displayName=C$;function EC(e){return e===""||e===void 0}function _C(e){const t=Ln(e),n=b.useRef(""),r=b.useRef(0),o=b.useCallback(a=>{const u=n.current+a;t(u),function d(f){n.current=f,window.clearTimeout(r.current),f!==""&&(r.current=window.setTimeout(()=>d(""),1e3))}(u)},[t]),l=b.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,l]}function TC(e,t,n){const o=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,l=n?e.indexOf(n):-1;let a=E$(e,Math.max(l,0));o.length===1&&(a=a.filter(f=>f!==n));const d=a.find(f=>f.textValue.toLowerCase().startsWith(o.toLowerCase()));return d!==n?d:void 0}function E$(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var _$=nC,T$=iC,P$=sC,N$=lC,R$=aC,j$=uC,A$=hC,I$=yC,O$=vC,D$=wC,z$=bC,M$=kC;function eo({...e}){return y.jsx(_$,{"data-slot":"select",...e})}function to({...e}){return y.jsx(P$,{"data-slot":"select-value",...e})}function no({className:e,size:t="default",children:n,...r}){return y.jsxs(T$,{"data-slot":"select-trigger","data-size":t,className:Ve("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:min-w-0 *:data-[slot=select-value]:truncate *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,y.jsx(N$,{asChild:!0,children:y.jsx(ck,{className:"size-4 opacity-50"})})]})}function ro({className:e,children:t,position:n="item-aligned",align:r="center",...o}){return y.jsx(R$,{children:y.jsxs(j$,{"data-slot":"select-content",className:Ve("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,align:r,...o,children:[y.jsx(L$,{}),y.jsx(A$,{className:Ve("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),y.jsx(F$,{})]})})}function Wr({className:e,children:t,...n}){return y.jsxs(I$,{"data-slot":"select-item",className:Ve("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[y.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:y.jsx(D$,{children:y.jsx(uk,{className:"size-4"})})}),y.jsx(O$,{children:t})]})}function L$({className:e,...t}){return y.jsx(z$,{"data-slot":"select-scroll-up-button",className:Ve("flex cursor-default items-center justify-center py-1",e),...t,children:y.jsx(vR,{className:"size-4"})})}function F$({className:e,...t}){return y.jsx(M$,{"data-slot":"select-scroll-down-button",className:Ve("flex cursor-default items-center justify-center py-1",e),...t,children:y.jsx(ck,{className:"size-4"})})}function Pd({value:e,onChange:t,triggerClassName:n}){return y.jsxs(eo,{value:e.toString(),onValueChange:r=>t(parseInt(r,10)),children:[y.jsx(no,{className:n,children:y.jsx(to,{})}),y.jsx(ro,{children:Object.entries(Da).map(([r,o])=>y.jsxs(Wr,{value:r,children:["P",r," - ",o]},r))})]})}function pa({children:e,count:t}){return y.jsxs("h4",{className:"text-xs uppercase text-muted-foreground font-semibold mb-3",children:[e,t&&` (${t.current}/${t.total})`]})}function PC({status:e,className:t}){const n=Ve("h-4 w-4 shrink-0",t);switch(e){case"completed":return y.jsx(ja,{className:Ve(n,"text-green-500")});case"archived":return y.jsx(sk,{className:Ve(n,"text-gray-400")});case"wont_fix":return y.jsx(WR,{className:Ve(n,"text-amber-500")});default:return y.jsx(qR,{className:Ve(n,"opacity-50")})}}function Nd({value:e,onChange:t,statuses:n,triggerClassName:r}){return y.jsxs(eo,{value:e,onValueChange:t,children:[y.jsx(no,{className:r,children:y.jsx(to,{})}),y.jsx(ro,{children:n.map(o=>y.jsx(Wr,{value:o,children:Zs[o]},o))})]})}const tr=b.forwardRef(({className:e,type:t,...n},r)=>y.jsx("input",{type:t,"data-slot":"input",className:Ve("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),ref:r,...n}));tr.displayName="Input";var $$=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],V$=$$.reduce((e,t)=>{const n=Zm(`Primitive.${t}`),r=b.forwardRef((o,l)=>{const{asChild:a,...u}=o,d=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(d,{...u,ref:l})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),B$="Label",NC=b.forwardRef((e,t)=>y.jsx(V$.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));NC.displayName=B$;var U$=NC;function Rt({className:e,...t}){return y.jsx(U$,{"data-slot":"label",className:Ve("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const La=b.forwardRef(({className:e,...t},n)=>y.jsx("textarea",{"data-slot":"textarea",className:Ve("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));La.displayName="Textarea";function H$({form:e,breadcrumbItems:t,open:n,isDeleting:r,onClose:o,onSubmit:l,onCancel:a,onDelete:u,onDeleteConfirm:d,onDeleteCancel:f}){const{watch:p,setValue:h,handleSubmit:v,formState:{isSubmitting:g,errors:S}}=e,k=p("title"),C=p("description"),E=p("status"),_=p("priority"),P=async R=>{await l(R)&&a()};return y.jsx(_S,{open:n,onClose:o,breadcrumbItems:t,formId:"epic-edit-form",isSubmitting:g,isDeleting:r,entityName:"Epic",onCancel:a,onDelete:u,onDeleteConfirm:d,onDeleteCancel:f,children:y.jsxs("form",{id:"epic-edit-form",onSubmit:v(P),className:"space-y-4 p-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Rt,{children:"Title"}),y.jsx(tr,{value:k,onChange:R=>h("title",R.target.value),placeholder:"Epic title",className:"text-lg font-semibold"}),S.title&&y.jsx("p",{className:"text-xs text-destructive",children:S.title.message})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Rt,{children:"Description"}),y.jsx(La,{value:C,onChange:R=>h("description",R.target.value),placeholder:"Epic description",rows:4})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Rt,{children:"Status"}),y.jsx(Nd,{value:E,onChange:R=>h("status",R),statuses:Xm})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Rt,{children:"Priority"}),y.jsx(Pd,{value:_,onChange:R=>h("priority",R)})]})]})]})})}const W$=["completed","archived","wont_fix"];function Up(e){return W$.includes(e)}function Z$({status:e,priority:t,tasks:n,createdAt:r,updatedAt:o,onStatusChange:l,onPriorityChange:a,onTaskClick:u}){const d=n.filter(p=>!p.parentTaskId),f=d.filter(p=>Up(p.status)).length;return y.jsx("div",{className:"p-4 bg-muted/30 rounded-b-md",children:y.jsxs("div",{className:"space-y-6",children:[y.jsxs("div",{children:[y.jsx(pa,{children:"Details"}),y.jsxs("div",{className:"space-y-2",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("span",{className:"text-sm text-muted-foreground",children:"Status"}),y.jsx(Nd,{value:e,onChange:l,statuses:Xm,triggerClassName:"w-auto h-8 text-right"})]}),y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("span",{className:"text-sm text-muted-foreground",children:"Priority"}),y.jsx(Pd,{value:t,onChange:a,triggerClassName:"w-auto h-8 text-right"})]})]})]}),d.length>0&&y.jsxs("div",{children:[y.jsx(pa,{count:{current:f,total:d.length},children:"Tasks"}),y.jsx("div",{className:"space-y-1",children:d.map(p=>{const h=Up(p.status);return y.jsxs(nt,{variant:"ghost",className:"w-full justify-start h-auto p-1.5 gap-2 whitespace-normal",onClick:()=>u==null?void 0:u(p),children:[y.jsx(PC,{status:p.status}),y.jsx("span",{className:"font-mono text-xs text-muted-foreground shrink-0",children:p.id}),y.jsx("span",{className:Ve("text-sm flex-1 text-left wrap-break-words",h&&"line-through text-muted-foreground"),children:p.title})]},p.id)})})]}),y.jsx(TS,{createdAt:r,updatedAt:o})]})})}function q$({epic:e,tasks:t,breadcrumbItems:n,status:r,priority:o,open:l,onClose:a,onEdit:u,onStatusChange:d,onPriorityChange:f,onTaskClick:p}){return y.jsx(ES,{open:l,onClose:a,breadcrumbItems:n,title:e.title,description:e.description,onEdit:u,children:y.jsx(Z$,{status:r,priority:o,tasks:t,createdAt:e.createdAt,updatedAt:e.updatedAt,onStatusChange:d,onPriorityChange:f,onTaskClick:p})})}function Q$(e){return[{id:e.id,title:e.title,type:"epic"}]}var Fa=e=>e.type==="checkbox",To=e=>e instanceof Date,Mn=e=>e==null;const RC=e=>typeof e=="object";var Lt=e=>!Mn(e)&&!Array.isArray(e)&&RC(e)&&!To(e),jC=e=>Lt(e)&&e.target?Fa(e.target)?e.target.checked:e.target.value:e,Y$=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,AC=(e,t)=>e.has(Y$(t)),K$=e=>{const t=e.constructor&&e.constructor.prototype;return Lt(t)&&t.hasOwnProperty("isPrototypeOf")},ug=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Dt(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(ug&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(Lt(e)&&K$(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=Dt(e[o]));return r}var Rd=e=>/^\w*$/.test(e),wt=e=>e===void 0,cg=e=>Array.isArray(e)?e.filter(Boolean):[],dg=e=>cg(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ce=(e,t,n)=>{if(!t||!Lt(e))return n;const r=(Rd(t)?[t]:dg(t)).reduce((o,l)=>Mn(o)?o:o[l],e);return wt(r)||r===e?wt(e[t])?n:e[t]:r},Kn=e=>typeof e=="boolean",Sn=e=>typeof e=="function",at=(e,t,n)=>{let r=-1;const o=Rd(t)?[t]:dg(t),l=o.length,a=l-1;for(;++r<l;){const u=o[r];let d=n;if(r!==a){const f=e[u];d=Lt(f)||Array.isArray(f)?f:isNaN(+o[r+1])?{}:[]}if(u==="__proto__"||u==="constructor"||u==="prototype")return;e[u]=d,e=e[u]}};const Uc={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Er={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},oi={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},IC=le.createContext(null);IC.displayName="HookFormControlContext";const fg=()=>le.useContext(IC);var OC=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const l in e)Object.defineProperty(o,l,{get:()=>{const a=l;return t._proxyFormState[a]!==Er.all&&(t._proxyFormState[a]=!r||Er.all),n&&(n[a]=!0),e[a]}});return o};const hg=typeof window<"u"?le.useLayoutEffect:le.useEffect;function G$(e){const t=fg(),{control:n=t,disabled:r,name:o,exact:l}=e||{},[a,u]=le.useState(n._formState),d=le.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return hg(()=>n._subscribe({name:o,formState:d.current,exact:l,callback:f=>{!r&&u({...n._formState,...f})}}),[o,r,l]),le.useEffect(()=>{d.current.isValid&&n._setValid(!0)},[n]),le.useMemo(()=>OC(a,n,d.current,!1),[a,n])}var Xn=e=>typeof e=="string",Hp=(e,t,n,r,o)=>Xn(e)?(r&&t.watch.add(e),Ce(n,e,o)):Array.isArray(e)?e.map(l=>(r&&t.watch.add(l),Ce(n,l))):(r&&(t.watchAll=!0),n),Wp=e=>Mn(e)||!RC(e);function _r(e,t,n=new WeakSet){if(Wp(e)||Wp(t))return Object.is(e,t);if(To(e)&&To(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const l of r){const a=e[l];if(!o.includes(l))return!1;if(l!=="ref"){const u=t[l];if(To(a)&&To(u)||Lt(a)&&Lt(u)||Array.isArray(a)&&Array.isArray(u)?!_r(a,u,n):!Object.is(a,u))return!1}}return!0}function X$(e){const t=fg(),{control:n=t,name:r,defaultValue:o,disabled:l,exact:a,compute:u}=e||{},d=le.useRef(o),f=le.useRef(u),p=le.useRef(void 0),h=le.useRef(n),v=le.useRef(r);f.current=u;const[g,S]=le.useState(()=>{const R=n._getWatch(r,d.current);return f.current?f.current(R):R}),k=le.useCallback(R=>{const I=Hp(r,n._names,R||n._formValues,!1,d.current);return f.current?f.current(I):I},[n._formValues,n._names,r]),C=le.useCallback(R=>{if(!l){const I=Hp(r,n._names,R||n._formValues,!1,d.current);if(f.current){const A=f.current(I);_r(A,p.current)||(S(A),p.current=A)}else S(I)}},[n._formValues,n._names,l,r]);hg(()=>((h.current!==n||!_r(v.current,r))&&(h.current=n,v.current=r,C()),n._subscribe({name:r,formState:{values:!0},exact:a,callback:R=>{C(R.values)}})),[n,a,r,C]),le.useEffect(()=>n._removeUnmounted());const E=h.current!==n,_=v.current,P=le.useMemo(()=>{if(l)return null;const R=!E&&!_r(_,r);return E||R?k():null},[l,E,r,_,k]);return P!==null?P:g}function J$(e){const t=fg(),{name:n,disabled:r,control:o=t,shouldUnregister:l,defaultValue:a,exact:u=!0}=e,d=AC(o._names.array,n),f=le.useMemo(()=>Ce(o._formValues,n,Ce(o._defaultValues,n,a)),[o,n,a]),p=X$({control:o,name:n,defaultValue:f,exact:u}),h=G$({control:o,name:n,exact:u}),v=le.useRef(e),g=le.useRef(void 0),S=le.useRef(o.register(n,{...e.rules,value:p,...Kn(e.disabled)?{disabled:e.disabled}:{}}));v.current=e;const k=le.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Ce(h.errors,n)},isDirty:{enumerable:!0,get:()=>!!Ce(h.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Ce(h.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Ce(h.validatingFields,n)},error:{enumerable:!0,get:()=>Ce(h.errors,n)}}),[h,n]),C=le.useCallback(R=>S.current.onChange({target:{value:jC(R),name:n},type:Uc.CHANGE}),[n]),E=le.useCallback(()=>S.current.onBlur({target:{value:Ce(o._formValues,n),name:n},type:Uc.BLUR}),[n,o._formValues]),_=le.useCallback(R=>{const I=Ce(o._fields,n);I&&I._f&&R&&(I._f.ref={focus:()=>Sn(R.focus)&&R.focus(),select:()=>Sn(R.select)&&R.select(),setCustomValidity:A=>Sn(R.setCustomValidity)&&R.setCustomValidity(A),reportValidity:()=>Sn(R.reportValidity)&&R.reportValidity()})},[o._fields,n]),P=le.useMemo(()=>({name:n,value:p,...Kn(r)||h.disabled?{disabled:h.disabled||r}:{},onChange:C,onBlur:E,ref:_}),[n,r,h.disabled,C,E,_,p]);return le.useEffect(()=>{const R=o._options.shouldUnregister||l,I=g.current;I&&I!==n&&!d&&o.unregister(I),o.register(n,{...v.current.rules,...Kn(v.current.disabled)?{disabled:v.current.disabled}:{}});const A=(H,B)=>{const ne=Ce(o._fields,H);ne&&ne._f&&(ne._f.mount=B)};if(A(n,!0),R){const H=Dt(Ce(o._options.defaultValues,n,v.current.defaultValue));at(o._defaultValues,n,H),wt(Ce(o._formValues,n))&&at(o._formValues,n,H)}return!d&&o.register(n),g.current=n,()=>{(d?R&&!o._state.action:R)?o.unregister(n):A(n,!1)}},[n,o,d,l]),le.useEffect(()=>{o._setDisabledField({disabled:r,name:n})},[r,n,o]),le.useMemo(()=>({field:P,formState:h,fieldState:k}),[P,h,k])}const Hc=e=>e.render(J$(e)),e3=le.createContext(null);e3.displayName="HookFormContext";var pg=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},sa=e=>Array.isArray(e)?e:[e],a0=()=>{let e=[];return{get observers(){return e},next:o=>{for(const l of e)l.next&&l.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(l=>l!==o)}}),unsubscribe:()=>{e=[]}}};function DC(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const o=e[r],l=t[r];if(o&&Lt(o)&&l){const a=DC(o,l);Lt(a)&&(n[r]=a)}else e[r]&&(n[r]=l)}return n}var wn=e=>Lt(e)&&!Object.keys(e).length,mg=e=>e.type==="file",Wc=e=>{if(!ug)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},zC=e=>e.type==="select-multiple",gg=e=>e.type==="radio",t3=e=>gg(e)||Fa(e),cp=e=>Wc(e)&&e.isConnected;function n3(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=wt(e)?r++:e[t[r++]];return e}function r3(e){for(const t in e)if(e.hasOwnProperty(t)&&!wt(e[t]))return!1;return!0}function zt(e,t){const n=Array.isArray(t)?t:Rd(t)?[t]:dg(t),r=n.length===1?e:n3(e,n),o=n.length-1,l=n[o];return r&&delete r[l],o!==0&&(Lt(r)&&wn(r)||Array.isArray(r)&&r3(r))&&zt(e,n.slice(0,-1)),e}var i3=e=>{for(const t in e)if(Sn(e[t]))return!0;return!1};function MC(e){return Array.isArray(e)||Lt(e)&&!i3(e)}function Zp(e,t={}){for(const n in e){const r=e[n];MC(r)?(t[n]=Array.isArray(r)?[]:{},Zp(r,t[n])):wt(r)||(t[n]=!0)}return t}function Ts(e,t,n){n||(n=Zp(t));for(const r in e){const o=e[r];if(MC(o))wt(t)||Wp(n[r])?n[r]=Zp(o,Array.isArray(o)?[]:{}):Ts(o,Mn(t)?{}:t[r],n[r]);else{const l=t[r];n[r]=!_r(o,l)}}return n}const u0={value:!1,isValid:!1},c0={value:!0,isValid:!0};var LC=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!wt(e[0].attributes.value)?wt(e[0].value)||e[0].value===""?c0:{value:e[0].value,isValid:!0}:c0:u0}return u0},FC=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>wt(e)?e:t?e===""?NaN:e&&+e:n&&Xn(e)?new Date(e):r?r(e):e;const d0={isValid:!1,value:null};var $C=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,d0):d0;function f0(e){const t=e.ref;return mg(t)?t.files:gg(t)?$C(e.refs).value:zC(t)?[...t.selectedOptions].map(({value:n})=>n):Fa(t)?LC(e.refs).value:FC(wt(t.value)?e.ref.value:t.value,e)}var o3=(e,t,n,r)=>{const o={};for(const l of e){const a=Ce(t,l);a&&at(o,l,a._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},Zc=e=>e instanceof RegExp,Jl=e=>wt(e)?e:Zc(e)?e.source:Lt(e)?Zc(e.value)?e.value.source:e.value:e,h0=e=>({isOnSubmit:!e||e===Er.onSubmit,isOnBlur:e===Er.onBlur,isOnChange:e===Er.onChange,isOnAll:e===Er.all,isOnTouch:e===Er.onTouched});const p0="AsyncFunction";var s3=e=>!!e&&!!e.validate&&!!(Sn(e.validate)&&e.validate.constructor.name===p0||Lt(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===p0)),l3=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),m0=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const la=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const l=Ce(e,o);if(l){const{_f:a,...u}=l;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],o)&&!r)return!0;if(a.ref&&t(a.ref,a.name)&&!r)return!0;if(la(u,t))break}else if(Lt(u)&&la(u,t))break}}};function g0(e,t,n){const r=Ce(e,n);if(r||Rd(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const l=o.join("."),a=Ce(t,l),u=Ce(e,l);if(a&&!Array.isArray(a)&&n!==l)return{name:n};if(u&&u.type)return{name:l,error:u};if(u&&u.root&&u.root.type)return{name:`${l}.root`,error:u.root};o.pop()}return{name:n}}var a3=(e,t,n,r)=>{n(e);const{name:o,...l}=e;return wn(l)||Object.keys(l).length>=Object.keys(t).length||Object.keys(l).find(a=>t[a]===(!r||Er.all))},u3=(e,t,n)=>!e||!t||e===t||sa(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),c3=(e,t,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:(n?r.isOnChange:o.isOnChange)?e:!0,d3=(e,t)=>!cg(Ce(e,t)).length&&zt(e,t),f3=(e,t,n)=>{const r=sa(Ce(e,n));return at(r,"root",t[n]),at(e,n,r),e};function y0(e,t,n="validate"){if(Xn(e)||Array.isArray(e)&&e.every(Xn)||Kn(e)&&!e)return{type:n,message:Xn(e)?e:"",ref:t}}var Es=e=>Lt(e)&&!Zc(e)?e:{value:e,message:""},v0=async(e,t,n,r,o,l)=>{const{ref:a,refs:u,required:d,maxLength:f,minLength:p,min:h,max:v,pattern:g,validate:S,name:k,valueAsNumber:C,mount:E}=e._f,_=Ce(n,k);if(!E||t.has(k))return{};const P=u?u[0]:a,R=G=>{o&&P.reportValidity&&(P.setCustomValidity(Kn(G)?"":G||""),P.reportValidity())},I={},A=gg(a),H=Fa(a),B=A||H,ne=(C||mg(a))&&wt(a.value)&&wt(_)||Wc(a)&&a.value===""||_===""||Array.isArray(_)&&!_.length,O=pg.bind(null,k,r,I),Y=(G,ae,q,U=oi.maxLength,Z=oi.minLength)=>{const J=G?ae:q;I[k]={type:G?U:Z,message:J,ref:a,...O(G?U:Z,J)}};if(l?!Array.isArray(_)||!_.length:d&&(!B&&(ne||Mn(_))||Kn(_)&&!_||H&&!LC(u).isValid||A&&!$C(u).isValid)){const{value:G,message:ae}=Xn(d)?{value:!!d,message:d}:Es(d);if(G&&(I[k]={type:oi.required,message:ae,ref:P,...O(oi.required,ae)},!r))return R(ae),I}if(!ne&&(!Mn(h)||!Mn(v))){let G,ae;const q=Es(v),U=Es(h);if(!Mn(_)&&!isNaN(_)){const Z=a.valueAsNumber||_&&+_;Mn(q.value)||(G=Z>q.value),Mn(U.value)||(ae=Z<U.value)}else{const Z=a.valueAsDate||new Date(_),J=N=>new Date(new Date().toDateString()+" "+N),D=a.type=="time",K=a.type=="week";Xn(q.value)&&_&&(G=D?J(_)>J(q.value):K?_>q.value:Z>new Date(q.value)),Xn(U.value)&&_&&(ae=D?J(_)<J(U.value):K?_<U.value:Z<new Date(U.value))}if((G||ae)&&(Y(!!G,q.message,U.message,oi.max,oi.min),!r))return R(I[k].message),I}if((f||p)&&!ne&&(Xn(_)||l&&Array.isArray(_))){const G=Es(f),ae=Es(p),q=!Mn(G.value)&&_.length>+G.value,U=!Mn(ae.value)&&_.length<+ae.value;if((q||U)&&(Y(q,G.message,ae.message),!r))return R(I[k].message),I}if(g&&!ne&&Xn(_)){const{value:G,message:ae}=Es(g);if(Zc(G)&&!_.match(G)&&(I[k]={type:oi.pattern,message:ae,ref:a,...O(oi.pattern,ae)},!r))return R(ae),I}if(S){if(Sn(S)){const G=await S(_,n),ae=y0(G,P);if(ae&&(I[k]={...ae,...O(oi.validate,ae.message)},!r))return R(ae.message),I}else if(Lt(S)){let G={};for(const ae in S){if(!wn(G)&&!r)break;const q=y0(await S[ae](_,n),P,ae);q&&(G={...q,...O(ae,q.message)},R(q.message),r&&(I[k]=G))}if(!wn(G)&&(I[k]={ref:P,...G},!r))return I}}return R(!0),I};const h3={mode:Er.onSubmit,reValidateMode:Er.onChange,shouldFocusError:!0};function p3(e={}){let t={...h3,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:Sn(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},o=Lt(t.defaultValues)||Lt(t.values)?Dt(t.defaultValues||t.values)||{}:{},l=t.shouldUnregister?{}:Dt(o),a={action:!1,mount:!1,watch:!1,keepIsValid:!1},u={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},d,f=0;const p={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},h={...p};let v={...h};const g={array:a0(),state:a0()},S=t.criteriaMode===Er.all,k=L=>ee=>{clearTimeout(f),f=setTimeout(L,ee)},C=async L=>{if(!a.keepIsValid&&!t.disabled&&(h.isValid||v.isValid||L)){let ee;t.resolver?(ee=wn((await B()).errors),E()):ee=await O(r,!0),ee!==n.isValid&&g.state.next({isValid:ee})}},E=(L,ee)=>{!t.disabled&&(h.isValidating||h.validatingFields||v.isValidating||v.validatingFields)&&((L||Array.from(u.mount)).forEach(oe=>{oe&&(ee?at(n.validatingFields,oe,ee):zt(n.validatingFields,oe))}),g.state.next({validatingFields:n.validatingFields,isValidating:!wn(n.validatingFields)}))},_=(L,ee=[],oe,we,ye=!0,$=!0)=>{if(we&&oe&&!t.disabled){if(a.action=!0,$&&Array.isArray(Ce(r,L))){const se=oe(Ce(r,L),we.argA,we.argB);ye&&at(r,L,se)}if($&&Array.isArray(Ce(n.errors,L))){const se=oe(Ce(n.errors,L),we.argA,we.argB);ye&&at(n.errors,L,se),d3(n.errors,L)}if((h.touchedFields||v.touchedFields)&&$&&Array.isArray(Ce(n.touchedFields,L))){const se=oe(Ce(n.touchedFields,L),we.argA,we.argB);ye&&at(n.touchedFields,L,se)}(h.dirtyFields||v.dirtyFields)&&(n.dirtyFields=Ts(o,l)),g.state.next({name:L,isDirty:G(L,ee),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else at(l,L,ee)},P=(L,ee)=>{at(n.errors,L,ee),g.state.next({errors:n.errors})},R=L=>{n.errors=L,g.state.next({errors:n.errors,isValid:!1})},I=(L,ee,oe,we)=>{const ye=Ce(r,L);if(ye){const $=Ce(l,L,wt(oe)?Ce(o,L):oe);wt($)||we&&we.defaultChecked||ee?at(l,L,ee?$:f0(ye._f)):U(L,$),a.mount&&!a.action&&C()}},A=(L,ee,oe,we,ye)=>{let $=!1,se=!1;const ke={name:L};if(!t.disabled){if(!oe||we){(h.isDirty||v.isDirty)&&(se=n.isDirty,n.isDirty=ke.isDirty=G(),$=se!==ke.isDirty);const _e=_r(Ce(o,L),ee);se=!!Ce(n.dirtyFields,L),_e?zt(n.dirtyFields,L):at(n.dirtyFields,L,!0),ke.dirtyFields=n.dirtyFields,$=$||(h.dirtyFields||v.dirtyFields)&&se!==!_e}if(oe){const _e=Ce(n.touchedFields,L);_e||(at(n.touchedFields,L,oe),ke.touchedFields=n.touchedFields,$=$||(h.touchedFields||v.touchedFields)&&_e!==oe)}$&&ye&&g.state.next(ke)}return $?ke:{}},H=(L,ee,oe,we)=>{const ye=Ce(n.errors,L),$=(h.isValid||v.isValid)&&Kn(ee)&&n.isValid!==ee;if(t.delayError&&oe?(d=k(()=>P(L,oe)),d(t.delayError)):(clearTimeout(f),d=null,oe?at(n.errors,L,oe):zt(n.errors,L)),(oe?!_r(ye,oe):ye)||!wn(we)||$){const se={...we,...$&&Kn(ee)?{isValid:ee}:{},errors:n.errors,name:L};n={...n,...se},g.state.next(se)}},B=async L=>(E(L,!0),await t.resolver(l,t.context,o3(L||u.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),ne=async L=>{const{errors:ee}=await B(L);if(E(L),L)for(const oe of L){const we=Ce(ee,oe);we?at(n.errors,oe,we):zt(n.errors,oe)}else n.errors=ee;return ee},O=async(L,ee,oe={valid:!0})=>{for(const we in L){const ye=L[we];if(ye){const{_f:$,...se}=ye;if($){const ke=u.array.has($.name),_e=ye._f&&s3(ye._f);_e&&h.validatingFields&&E([$.name],!0);const De=await v0(ye,u.disabled,l,S,t.shouldUseNativeValidation&&!ee,ke);if(_e&&h.validatingFields&&E([$.name]),De[$.name]&&(oe.valid=!1,ee||e.shouldUseNativeValidation))break;!ee&&(Ce(De,$.name)?ke?f3(n.errors,De,$.name):at(n.errors,$.name,De[$.name]):zt(n.errors,$.name))}!wn(se)&&await O(se,ee,oe)}}return oe.valid},Y=()=>{for(const L of u.unMount){const ee=Ce(r,L);ee&&(ee._f.refs?ee._f.refs.every(oe=>!cp(oe)):!cp(ee._f.ref))&&me(L)}u.unMount=new Set},G=(L,ee)=>!t.disabled&&(L&&ee&&at(l,L,ee),!_r(M(),o)),ae=(L,ee,oe)=>Hp(L,u,{...a.mount?l:wt(ee)?o:Xn(L)?{[L]:ee}:ee},oe,ee),q=L=>cg(Ce(a.mount?l:o,L,t.shouldUnregister?Ce(o,L,[]):[])),U=(L,ee,oe={})=>{const we=Ce(r,L);let ye=ee;if(we){const $=we._f;$&&(!$.disabled&&at(l,L,FC(ee,$)),ye=Wc($.ref)&&Mn(ee)?"":ee,zC($.ref)?[...$.ref.options].forEach(se=>se.selected=ye.includes(se.value)):$.refs?Fa($.ref)?$.refs.forEach(se=>{(!se.defaultChecked||!se.disabled)&&(Array.isArray(ye)?se.checked=!!ye.find(ke=>ke===se.value):se.checked=ye===se.value||!!ye)}):$.refs.forEach(se=>se.checked=se.value===ye):mg($.ref)?$.ref.value="":($.ref.value=ye,$.ref.type||g.state.next({name:L,values:Dt(l)})))}(oe.shouldDirty||oe.shouldTouch)&&A(L,ye,oe.shouldTouch,oe.shouldDirty,!0),oe.shouldValidate&&N(L)},Z=(L,ee,oe)=>{for(const we in ee){if(!ee.hasOwnProperty(we))return;const ye=ee[we],$=L+"."+we,se=Ce(r,$);(u.array.has(L)||Lt(ye)||se&&!se._f)&&!To(ye)?Z($,ye,oe):U($,ye,oe)}},J=(L,ee,oe={})=>{const we=Ce(r,L),ye=u.array.has(L),$=Dt(ee);at(l,L,$),ye?(g.array.next({name:L,values:Dt(l)}),(h.isDirty||h.dirtyFields||v.isDirty||v.dirtyFields)&&oe.shouldDirty&&g.state.next({name:L,dirtyFields:Ts(o,l),isDirty:G(L,$)})):we&&!we._f&&!Mn($)?Z(L,$,oe):U(L,$,oe),m0(L,u)?g.state.next({...n,name:L,values:Dt(l)}):g.state.next({name:a.mount?L:void 0,values:Dt(l)})},D=async L=>{a.mount=!0;const ee=L.target;let oe=ee.name,we=!0;const ye=Ce(r,oe),$=_e=>{we=Number.isNaN(_e)||To(_e)&&isNaN(_e.getTime())||_r(_e,Ce(l,oe,_e))},se=h0(t.mode),ke=h0(t.reValidateMode);if(ye){let _e,De;const dt=ee.type?f0(ye._f):jC(L),kt=L.type===Uc.BLUR||L.type===Uc.FOCUS_OUT,Jt=!l3(ye._f)&&!t.resolver&&!Ce(n.errors,oe)&&!ye._f.deps||c3(kt,Ce(n.touchedFields,oe),n.isSubmitted,ke,se),En=m0(oe,u,kt);at(l,oe,dt),kt?(!ee||!ee.readOnly)&&(ye._f.onBlur&&ye._f.onBlur(L),d&&d(0)):ye._f.onChange&&ye._f.onChange(L);const _n=A(oe,dt,kt),Tt=!wn(_n)||En;if(!kt&&g.state.next({name:oe,type:L.type,values:Dt(l)}),Jt)return(h.isValid||v.isValid)&&(t.mode==="onBlur"?kt&&C():kt||C()),Tt&&g.state.next({name:oe,...En?{}:_n});if(!kt&&En&&g.state.next({...n}),t.resolver){const{errors:hn}=await B([oe]);if(E([oe]),$(dt),we){const Vt=g0(n.errors,r,oe),pn=g0(hn,r,Vt.name||oe);_e=pn.error,oe=pn.name,De=wn(hn)}}else E([oe],!0),_e=(await v0(ye,u.disabled,l,S,t.shouldUseNativeValidation))[oe],E([oe]),$(dt),we&&(_e?De=!1:(h.isValid||v.isValid)&&(De=await O(r,!0)));we&&(ye._f.deps&&(!Array.isArray(ye._f.deps)||ye._f.deps.length>0)&&N(ye._f.deps),H(oe,De,_e,_n))}},K=(L,ee)=>{if(Ce(n.errors,ee)&&L.focus)return L.focus(),1},N=async(L,ee={})=>{let oe,we;const ye=sa(L);if(t.resolver){const $=await ne(wt(L)?L:ye);oe=wn($),we=L?!ye.some(se=>Ce($,se)):oe}else L?(we=(await Promise.all(ye.map(async $=>{const se=Ce(r,$);return await O(se&&se._f?{[$]:se}:se)}))).every(Boolean),!(!we&&!n.isValid)&&C()):we=oe=await O(r);return g.state.next({...!Xn(L)||(h.isValid||v.isValid)&&oe!==n.isValid?{}:{name:L},...t.resolver||!L?{isValid:oe}:{},errors:n.errors}),ee.shouldFocus&&!we&&la(r,K,L?ye:u.mount),we},M=(L,ee)=>{let oe={...a.mount?l:o};return ee&&(oe=DC(ee.dirtyFields?n.dirtyFields:n.touchedFields,oe)),wt(L)?oe:Xn(L)?Ce(oe,L):L.map(we=>Ce(oe,we))},Q=(L,ee)=>({invalid:!!Ce((ee||n).errors,L),isDirty:!!Ce((ee||n).dirtyFields,L),error:Ce((ee||n).errors,L),isValidating:!!Ce(n.validatingFields,L),isTouched:!!Ce((ee||n).touchedFields,L)}),j=L=>{L&&sa(L).forEach(ee=>zt(n.errors,ee)),g.state.next({errors:L?n.errors:{}})},ue=(L,ee,oe)=>{const we=(Ce(r,L,{_f:{}})._f||{}).ref,ye=Ce(n.errors,L)||{},{ref:$,message:se,type:ke,..._e}=ye;at(n.errors,L,{..._e,...ee,ref:we}),g.state.next({name:L,errors:n.errors,isValid:!1}),oe&&oe.shouldFocus&&we&&we.focus&&we.focus()},ve=(L,ee)=>Sn(L)?g.state.subscribe({next:oe=>"values"in oe&&L(ae(void 0,ee),oe)}):ae(L,ee,!0),xe=L=>g.state.subscribe({next:ee=>{u3(L.name,ee.name,L.exact)&&a3(ee,L.formState||h,Bn,L.reRenderRoot)&&L.callback({values:{...l},...n,...ee,defaultValues:o})}}).unsubscribe,re=L=>(a.mount=!0,v={...v,...L.formState},xe({...L,formState:{...p,...L.formState}})),me=(L,ee={})=>{for(const oe of L?sa(L):u.mount)u.mount.delete(oe),u.array.delete(oe),ee.keepValue||(zt(r,oe),zt(l,oe)),!ee.keepError&&zt(n.errors,oe),!ee.keepDirty&&zt(n.dirtyFields,oe),!ee.keepTouched&&zt(n.touchedFields,oe),!ee.keepIsValidating&&zt(n.validatingFields,oe),!t.shouldUnregister&&!ee.keepDefaultValue&&zt(o,oe);g.state.next({values:Dt(l)}),g.state.next({...n,...ee.keepDirty?{isDirty:G()}:{}}),!ee.keepIsValid&&C()},Se=({disabled:L,name:ee})=>{if(Kn(L)&&a.mount||L||u.disabled.has(ee)){const ye=u.disabled.has(ee)!==!!L;L?u.disabled.add(ee):u.disabled.delete(ee),ye&&a.mount&&!a.action&&C()}},be=(L,ee={})=>{let oe=Ce(r,L);const we=Kn(ee.disabled)||Kn(t.disabled);return at(r,L,{...oe||{},_f:{...oe&&oe._f?oe._f:{ref:{name:L}},name:L,mount:!0,...ee}}),u.mount.add(L),oe?Se({disabled:Kn(ee.disabled)?ee.disabled:t.disabled,name:L}):I(L,!0,ee.value),{...we?{disabled:ee.disabled||t.disabled}:{},...t.progressive?{required:!!ee.required,min:Jl(ee.min),max:Jl(ee.max),minLength:Jl(ee.minLength),maxLength:Jl(ee.maxLength),pattern:Jl(ee.pattern)}:{},name:L,onChange:D,onBlur:D,ref:ye=>{if(ye){be(L,ee),oe=Ce(r,L);const $=wt(ye.value)&&ye.querySelectorAll&&ye.querySelectorAll("input,select,textarea")[0]||ye,se=t3($),ke=oe._f.refs||[];if(se?ke.find(_e=>_e===$):$===oe._f.ref)return;at(r,L,{_f:{...oe._f,...se?{refs:[...ke.filter(cp),$,...Array.isArray(Ce(o,L))?[{}]:[]],ref:{type:$.type,name:L}}:{ref:$}}}),I(L,!1,void 0,$)}else oe=Ce(r,L,{}),oe._f&&(oe._f.mount=!1),(t.shouldUnregister||ee.shouldUnregister)&&!(AC(u.array,L)&&a.action)&&u.unMount.add(L)}}},Ie=()=>t.shouldFocusError&&la(r,K,u.mount),Ue=L=>{Kn(L)&&(g.state.next({disabled:L}),la(r,(ee,oe)=>{const we=Ce(r,oe);we&&(ee.disabled=we._f.disabled||L,Array.isArray(we._f.refs)&&we._f.refs.forEach(ye=>{ye.disabled=we._f.disabled||L}))},0,!1))},ot=(L,ee)=>async oe=>{let we;oe&&(oe.preventDefault&&oe.preventDefault(),oe.persist&&oe.persist());let ye=Dt(l);if(g.state.next({isSubmitting:!0}),t.resolver){const{errors:$,values:se}=await B();E(),n.errors=$,ye=Dt(se)}else await O(r);if(u.disabled.size)for(const $ of u.disabled)zt(ye,$);if(zt(n.errors,"root"),wn(n.errors)){g.state.next({errors:{}});try{await L(ye,oe)}catch($){we=$}}else ee&&await ee({...n.errors},oe),Ie(),setTimeout(Ie);if(g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:wn(n.errors)&&!we,submitCount:n.submitCount+1,errors:n.errors}),we)throw we},It=(L,ee={})=>{Ce(r,L)&&(wt(ee.defaultValue)?J(L,Dt(Ce(o,L))):(J(L,ee.defaultValue),at(o,L,Dt(ee.defaultValue))),ee.keepTouched||zt(n.touchedFields,L),ee.keepDirty||(zt(n.dirtyFields,L),n.isDirty=ee.defaultValue?G(L,Dt(Ce(o,L))):G()),ee.keepError||(zt(n.errors,L),h.isValid&&C()),g.state.next({...n}))},Zt=(L,ee={})=>{const oe=L?Dt(L):o,we=Dt(oe),ye=wn(L),$=ye?o:we;if(ee.keepDefaultValues||(o=oe),!ee.keepValues){if(ee.keepDirtyValues){const se=new Set([...u.mount,...Object.keys(Ts(o,l))]);for(const ke of Array.from(se)){const _e=Ce(n.dirtyFields,ke),De=Ce(l,ke),dt=Ce($,ke);_e&&!wt(De)?at($,ke,De):!_e&&!wt(dt)&&J(ke,dt)}}else{if(ug&&wt(L))for(const se of u.mount){const ke=Ce(r,se);if(ke&&ke._f){const _e=Array.isArray(ke._f.refs)?ke._f.refs[0]:ke._f.ref;if(Wc(_e)){const De=_e.closest("form");if(De){De.reset();break}}}}if(ee.keepFieldsRef)for(const se of u.mount)J(se,Ce($,se));else r={}}l=t.shouldUnregister?ee.keepDefaultValues?Dt(o):{}:Dt($),g.array.next({values:{...$}}),g.state.next({values:{...$}})}u={mount:ee.keepDirtyValues?u.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!h.isValid||!!ee.keepIsValid||!!ee.keepDirtyValues||!t.shouldUnregister&&!wn($),a.watch=!!t.shouldUnregister,a.keepIsValid=!!ee.keepIsValid,a.action=!1,ee.keepErrors||(n.errors={}),g.state.next({submitCount:ee.keepSubmitCount?n.submitCount:0,isDirty:ye?!1:ee.keepDirty?n.isDirty:!!(ee.keepDefaultValues&&!_r(L,o)),isSubmitted:ee.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:ye?{}:ee.keepDirtyValues?ee.keepDefaultValues&&l?Ts(o,l):n.dirtyFields:ee.keepDefaultValues&&L?Ts(o,L):ee.keepDirty?n.dirtyFields:{},touchedFields:ee.keepTouched?n.touchedFields:{},errors:ee.keepErrors?n.errors:{},isSubmitSuccessful:ee.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},on=(L,ee)=>Zt(Sn(L)?L(l):L,{...t.resetOptions,...ee}),Xt=(L,ee={})=>{const oe=Ce(r,L),we=oe&&oe._f;if(we){const ye=we.refs?we.refs[0]:we.ref;ye.focus&&setTimeout(()=>{ye.focus(),ee.shouldSelect&&Sn(ye.select)&&ye.select()})}},Bn=L=>{n={...n,...L}},qt={control:{register:be,unregister:me,getFieldState:Q,handleSubmit:ot,setError:ue,_subscribe:xe,_runSchema:B,_updateIsValidating:E,_focusError:Ie,_getWatch:ae,_getDirty:G,_setValid:C,_setFieldArray:_,_setDisabledField:Se,_setErrors:R,_getFieldArray:q,_reset:Zt,_resetDefaultValues:()=>Sn(t.defaultValues)&&t.defaultValues().then(L=>{on(L,t.resetOptions),g.state.next({isLoading:!1})}),_removeUnmounted:Y,_disableForm:Ue,_subjects:g,_proxyFormState:h,get _fields(){return r},get _formValues(){return l},get _state(){return a},set _state(L){a=L},get _defaultValues(){return o},get _names(){return u},set _names(L){u=L},get _formState(){return n},get _options(){return t},set _options(L){t={...t,...L}}},subscribe:re,trigger:N,register:be,handleSubmit:ot,watch:ve,setValue:J,getValues:M,reset:on,resetField:It,clearErrors:j,unregister:me,setError:ue,setFocus:Xt,getFieldState:Q};return{...qt,formControl:qt}}function yg(e={}){const t=le.useRef(void 0),n=le.useRef(void 0),[r,o]=le.useState({isDirty:!1,isValidating:!1,isLoading:Sn(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Sn(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!Sn(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:a,...u}=p3(e);t.current={...u,formState:r}}const l=t.current.control;return l._options=e,hg(()=>{const a=l._subscribe({formState:l._proxyFormState,callback:()=>o({...l._formState}),reRenderRoot:!0});return o(u=>({...u,isReady:!0})),l._formState.isReady=!0,a},[l]),le.useEffect(()=>l._disableForm(e.disabled),[l,e.disabled]),le.useEffect(()=>{e.mode&&(l._options.mode=e.mode),e.reValidateMode&&(l._options.reValidateMode=e.reValidateMode)},[l,e.mode,e.reValidateMode]),le.useEffect(()=>{e.errors&&(l._setErrors(e.errors),l._focusError())},[l,e.errors]),le.useEffect(()=>{e.shouldUnregister&&l._subjects.state.next({values:l._getWatch()})},[l,e.shouldUnregister]),le.useEffect(()=>{if(l._proxyFormState.isDirty){const a=l._getDirty();a!==r.isDirty&&l._subjects.state.next({isDirty:a})}},[l,r.isDirty]),le.useEffect(()=>{var a;e.values&&!_r(e.values,n.current)?(l._reset(e.values,{keepFieldsRef:!0,...l._options.resetOptions}),!((a=l._options.resetOptions)===null||a===void 0)&&a.keepIsValid||l._setValid(),n.current=e.values,o(u=>({...u}))):l._resetDefaultValues()},[l,e.values]),le.useEffect(()=>{l._state.mount||(l._setValid(),l._state.mount=!0),l._state.watch&&(l._state.watch=!1,l._subjects.state.next({...l._formState})),l._removeUnmounted()}),t.current.formState=le.useMemo(()=>OC(r,l),[l,r]),t.current}const x0=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Ce(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},qp=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?x0(r.ref,n,e):r&&r.refs&&r.refs.forEach(o=>x0(o,n,e))}},w0=(e,t)=>{t.shouldUseNativeValidation&&qp(e,t);const n={};for(const r in e){const o=Ce(t.fields,r),l=Object.assign(e[r]||{},{ref:o&&o.ref});if(m3(t.names||Object.keys(e),r)){const a=Object.assign({},Ce(n,r));at(a,"root",l),at(n,r,a)}else at(n,r,l)}return n},m3=(e,t)=>{const n=b0(t);return e.some(r=>b0(r).match(`^${n}\\.\\d+`))};function b0(e){return e.replace(/\]|\[/g,"")}function ce(e,t,n){function r(u,d){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:d,constr:a,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,d);const f=a.prototype,p=Object.keys(f);for(let h=0;h<p.length;h++){const v=p[h];v in u||(u[v]=f[v].bind(u))}}const o=(n==null?void 0:n.Parent)??Object;class l extends o{}Object.defineProperty(l,"name",{value:e});function a(u){var d;const f=n!=null&&n.Parent?new l:this;r(f,u),(d=f._zod).deferred??(d.deferred=[]);for(const p of f._zod.deferred)p();return f}return Object.defineProperty(a,"init",{value:r}),Object.defineProperty(a,Symbol.hasInstance,{value:u=>{var d,f;return n!=null&&n.Parent&&u instanceof n.Parent?!0:(f=(d=u==null?void 0:u._zod)==null?void 0:d.traits)==null?void 0:f.has(e)}}),Object.defineProperty(a,"name",{value:e}),a}class As extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class VC extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const BC={};function Ho(e){return BC}function UC(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function Qp(e,t){return typeof t=="bigint"?t.toString():t}function vg(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function xg(e){return e==null}function wg(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function g3(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let o=(r.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(r)){const d=r.match(/\d?e-(\d?)/);d!=null&&d[1]&&(o=Number.parseInt(d[1]))}const l=n>o?n:o,a=Number.parseInt(e.toFixed(l).replace(".","")),u=Number.parseInt(t.toFixed(l).replace(".",""));return a%u/10**l}const k0=Symbol("evaluating");function ut(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==k0)return r===void 0&&(r=k0,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Ko(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ao(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function S0(e){return JSON.stringify(e)}function y3(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const HC="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function qc(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const v3=vg(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function ma(e){if(qc(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(qc(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function WC(e){return ma(e)?{...e}:Array.isArray(e)?[...e]:e}const x3=new Set(["string","number","symbol"]);function jd(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function uo(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n!=null&&n.parent)&&(r._zod.parent=e),r}function Me(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function w3(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const b3={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function k3(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const l=ao(e._zod.def,{get shape(){const a={};for(const u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&(a[u]=n.shape[u])}return Ko(this,"shape",a),a},checks:[]});return uo(e,l)}function S3(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const l=ao(e._zod.def,{get shape(){const a={...e._zod.def.shape};for(const u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&delete a[u]}return Ko(this,"shape",a),a},checks:[]});return uo(e,l)}function C3(e,t){if(!ma(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const l=e._zod.def.shape;for(const a in t)if(Object.getOwnPropertyDescriptor(l,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=ao(e._zod.def,{get shape(){const l={...e._zod.def.shape,...t};return Ko(this,"shape",l),l}});return uo(e,o)}function E3(e,t){if(!ma(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=ao(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Ko(this,"shape",r),r}});return uo(e,n)}function _3(e,t){const n=ao(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Ko(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return uo(e,n)}function T3(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const a=ao(t._zod.def,{get shape(){const u=t._zod.def.shape,d={...u};if(n)for(const f in n){if(!(f in u))throw new Error(`Unrecognized key: "${f}"`);n[f]&&(d[f]=e?new e({type:"optional",innerType:u[f]}):u[f])}else for(const f in u)d[f]=e?new e({type:"optional",innerType:u[f]}):u[f];return Ko(this,"shape",d),d},checks:[]});return uo(t,a)}function P3(e,t,n){const r=ao(t._zod.def,{get shape(){const o=t._zod.def.shape,l={...o};if(n)for(const a in n){if(!(a in l))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(l[a]=new e({type:"nonoptional",innerType:o[a]}))}else for(const a in o)l[a]=new e({type:"nonoptional",innerType:o[a]});return Ko(this,"shape",l),l}});return uo(t,r)}function Ps(e,t=0){var n;if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(((n=e.issues[r])==null?void 0:n.continue)!==!0)return!0;return!1}function ZC(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function hc(e){return typeof e=="string"?e:e==null?void 0:e.message}function Wo(e,t,n){var o,l,a,u,d,f;const r={...e,path:e.path??[]};if(!e.message){const p=hc((a=(l=(o=e.inst)==null?void 0:o._zod.def)==null?void 0:l.error)==null?void 0:a.call(l,e))??hc((u=t==null?void 0:t.error)==null?void 0:u.call(t,e))??hc((d=n.customError)==null?void 0:d.call(n,e))??hc((f=n.localeError)==null?void 0:f.call(n,e))??"Invalid input";r.message=p}return delete r.inst,delete r.continue,t!=null&&t.reportInput||delete r.input,r}function bg(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ga(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const qC=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Qp,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},kg=ce("$ZodError",qC),Ad=ce("$ZodError",qC,{Parent:Error});function N3(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function R3(e,t=n=>n.message){const n={_errors:[]},r=o=>{for(const l of o.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(a=>r({issues:a}));else if(l.code==="invalid_key")r({issues:l.issues});else if(l.code==="invalid_element")r({issues:l.issues});else if(l.path.length===0)n._errors.push(t(l));else{let a=n,u=0;for(;u<l.path.length;){const d=l.path[u];u===l.path.length-1?(a[d]=a[d]||{_errors:[]},a[d]._errors.push(t(l))):a[d]=a[d]||{_errors:[]},a=a[d],u++}}};return r(e),n}const Id=e=>(t,n,r,o)=>{const l=r?Object.assign(r,{async:!1}):{async:!1},a=t._zod.run({value:n,issues:[]},l);if(a instanceof Promise)throw new As;if(a.issues.length){const u=new((o==null?void 0:o.Err)??e)(a.issues.map(d=>Wo(d,l,Ho())));throw HC(u,o==null?void 0:o.callee),u}return a.value},j3=Id(Ad),Od=e=>async(t,n,r,o)=>{const l=r?Object.assign(r,{async:!0}):{async:!0};let a=t._zod.run({value:n,issues:[]},l);if(a instanceof Promise&&(a=await a),a.issues.length){const u=new((o==null?void 0:o.Err)??e)(a.issues.map(d=>Wo(d,l,Ho())));throw HC(u,o==null?void 0:o.callee),u}return a.value},A3=Od(Ad),Dd=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},l=t._zod.run({value:n,issues:[]},o);if(l instanceof Promise)throw new As;return l.issues.length?{success:!1,error:new(e??kg)(l.issues.map(a=>Wo(a,o,Ho())))}:{success:!0,data:l.value}},I3=Dd(Ad),zd=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},o);return l instanceof Promise&&(l=await l),l.issues.length?{success:!1,error:new e(l.issues.map(a=>Wo(a,o,Ho())))}:{success:!0,data:l.value}},O3=zd(Ad),D3=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Id(e)(t,n,o)},z3=e=>(t,n,r)=>Id(e)(t,n,r),M3=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Od(e)(t,n,o)},L3=e=>async(t,n,r)=>Od(e)(t,n,r),F3=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Dd(e)(t,n,o)},$3=e=>(t,n,r)=>Dd(e)(t,n,r),V3=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return zd(e)(t,n,o)},B3=e=>async(t,n,r)=>zd(e)(t,n,r),U3=/^[cC][^\s-]{8,}$/,H3=/^[0-9a-z]+$/,W3=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Z3=/^[0-9a-vA-V]{20}$/,q3=/^[A-Za-z0-9]{27}$/,Q3=/^[a-zA-Z0-9_-]{21}$/,Y3=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,K3=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,C0=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,G3=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,X3="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function J3(){return new RegExp(X3,"u")}const e5=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,t5=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,n5=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,r5=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,i5=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,QC=/^[A-Za-z0-9_-]*$/,o5=/^\+[1-9]\d{6,14}$/,YC="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",s5=new RegExp(`^${YC}$`);function KC(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function l5(e){return new RegExp(`^${KC(e)}$`)}function a5(e){const t=KC({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${YC}T(?:${r})$`)}const u5=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},c5=/^-?\d+$/,d5=/^-?\d+(?:\.\d+)?$/,f5=/^[^A-Z]*$/,h5=/^[^a-z]*$/,Vn=ce("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),GC={number:"number",bigint:"bigint",object:"date"},XC=ce("$ZodCheckLessThan",(e,t)=>{Vn.init(e,t);const n=GC[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,l=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<l&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),JC=ce("$ZodCheckGreaterThan",(e,t)=>{Vn.init(e,t);const n=GC[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,l=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>l&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),p5=ce("$ZodCheckMultipleOf",(e,t)=>{Vn.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):g3(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),m5=ce("$ZodCheckNumberFormat",(e,t)=>{var a;Vn.init(e,t),t.format=t.format||"float64";const n=(a=t.format)==null?void 0:a.includes("int"),r=n?"int":"number",[o,l]=b3[t.format];e._zod.onattach.push(u=>{const d=u._zod.bag;d.format=t.format,d.minimum=o,d.maximum=l,n&&(d.pattern=c5)}),e._zod.check=u=>{const d=u.value;if(n){if(!Number.isInteger(d)){u.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:d,inst:e});return}if(!Number.isSafeInteger(d)){d>0?u.issues.push({input:d,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):u.issues.push({input:d,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}d<o&&u.issues.push({origin:"number",input:d,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),d>l&&u.issues.push({origin:"number",input:d,code:"too_big",maximum:l,inclusive:!0,inst:e,continue:!t.abort})}}),g5=ce("$ZodCheckMaxLength",(e,t)=>{var n;Vn.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!xg(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=t.maximum)return;const a=bg(o);r.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),y5=ce("$ZodCheckMinLength",(e,t)=>{var n;Vn.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!xg(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const a=bg(o);r.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),v5=ce("$ZodCheckLengthEquals",(e,t)=>{var n;Vn.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!xg(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,l=o.length;if(l===t.length)return;const a=bg(o),u=l>t.length;r.issues.push({origin:a,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Md=ce("$ZodCheckStringFormat",(e,t)=>{var n,r;Vn.init(e,t),e._zod.onattach.push(o=>{const l=o._zod.bag;l.format=t.format,t.pattern&&(l.patterns??(l.patterns=new Set),l.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),x5=ce("$ZodCheckRegex",(e,t)=>{Md.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),w5=ce("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=f5),Md.init(e,t)}),b5=ce("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=h5),Md.init(e,t)}),k5=ce("$ZodCheckIncludes",(e,t)=>{Vn.init(e,t);const n=jd(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const l=o._zod.bag;l.patterns??(l.patterns=new Set),l.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),S5=ce("$ZodCheckStartsWith",(e,t)=>{Vn.init(e,t);const n=new RegExp(`^${jd(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),C5=ce("$ZodCheckEndsWith",(e,t)=>{Vn.init(e,t);const n=new RegExp(`.*${jd(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),E5=ce("$ZodCheckOverwrite",(e,t)=>{Vn.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class _5{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
304
|
+
`).filter(a=>a),o=Math.min(...r.map(a=>a.length-a.trimStart().length)),l=r.map(a=>a.slice(o)).map(a=>" ".repeat(this.indent*2)+a);for(const a of l)this.content.push(a)}compile(){const t=Function,n=this==null?void 0:this.args,o=[...((this==null?void 0:this.content)??[""]).map(l=>` ${l}`)];return new t(...n,o.join(`
|
|
305
|
+
`))}}const T5={major:4,minor:3,patch:5},Ft=ce("$ZodType",(e,t)=>{var o;var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=T5;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const l of r)for(const a of l._zod.onattach)a(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),(o=e._zod.deferred)==null||o.push(()=>{e._zod.run=e._zod.parse});else{const l=(u,d,f)=>{let p=Ps(u),h;for(const v of d){if(v._zod.def.when){if(!v._zod.def.when(u))continue}else if(p)continue;const g=u.issues.length,S=v._zod.check(u);if(S instanceof Promise&&(f==null?void 0:f.async)===!1)throw new As;if(h||S instanceof Promise)h=(h??Promise.resolve()).then(async()=>{await S,u.issues.length!==g&&(p||(p=Ps(u,g)))});else{if(u.issues.length===g)continue;p||(p=Ps(u,g))}}return h?h.then(()=>u):u},a=(u,d,f)=>{if(Ps(u))return u.aborted=!0,u;const p=l(d,r,f);if(p instanceof Promise){if(f.async===!1)throw new As;return p.then(h=>e._zod.parse(h,f))}return e._zod.parse(p,f)};e._zod.run=(u,d)=>{if(d.skipChecks)return e._zod.parse(u,d);if(d.direction==="backward"){const p=e._zod.parse({value:u.value,issues:[]},{...d,skipChecks:!0});return p instanceof Promise?p.then(h=>a(h,u,d)):a(p,u,d)}const f=e._zod.parse(u,d);if(f instanceof Promise){if(d.async===!1)throw new As;return f.then(p=>l(p,r,d))}return l(f,r,d)}}ut(e,"~standard",()=>({validate:l=>{var a;try{const u=I3(e,l);return u.success?{value:u.data}:{issues:(a=u.error)==null?void 0:a.issues}}catch{return O3(e,l).then(d=>{var f;return d.success?{value:d.data}:{issues:(f=d.error)==null?void 0:f.issues}})}},vendor:"zod",version:1}))}),Sg=ce("$ZodString",(e,t)=>{var n;Ft.init(e,t),e._zod.pattern=[...((n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)??[]].pop()??u5(e._zod.bag),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),bt=ce("$ZodStringFormat",(e,t)=>{Md.init(e,t),Sg.init(e,t)}),P5=ce("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=K3),bt.init(e,t)}),N5=ce("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=C0(r))}else t.pattern??(t.pattern=C0());bt.init(e,t)}),R5=ce("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=G3),bt.init(e,t)}),j5=ce("$ZodURL",(e,t)=>{bt.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),A5=ce("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=J3()),bt.init(e,t)}),I5=ce("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Q3),bt.init(e,t)}),O5=ce("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=U3),bt.init(e,t)}),D5=ce("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=H3),bt.init(e,t)}),z5=ce("$ZodULID",(e,t)=>{t.pattern??(t.pattern=W3),bt.init(e,t)}),M5=ce("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Z3),bt.init(e,t)}),L5=ce("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=q3),bt.init(e,t)}),F5=ce("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=a5(t)),bt.init(e,t)}),$5=ce("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=s5),bt.init(e,t)}),V5=ce("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=l5(t)),bt.init(e,t)}),B5=ce("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Y3),bt.init(e,t)}),U5=ce("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=e5),bt.init(e,t),e._zod.bag.format="ipv4"}),H5=ce("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=t5),bt.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),W5=ce("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=n5),bt.init(e,t)}),Z5=ce("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=r5),bt.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[o,l]=r;if(!l)throw new Error;const a=Number(l);if(`${a}`!==l)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function eE(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const q5=ce("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=i5),bt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{eE(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Q5(e){if(!QC.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return eE(n)}const Y5=ce("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=QC),bt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Q5(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),K5=ce("$ZodE164",(e,t)=>{t.pattern??(t.pattern=o5),bt.init(e,t)});function G5(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const X5=ce("$ZodJWT",(e,t)=>{bt.init(e,t),e._zod.check=n=>{G5(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),tE=ce("$ZodNumber",(e,t)=>{Ft.init(e,t),e._zod.pattern=e._zod.bag.pattern??d5,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const o=n.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return n;const l=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...l?{received:l}:{}}),n}}),J5=ce("$ZodNumberFormat",(e,t)=>{m5.init(e,t),tE.init(e,t)}),e6=ce("$ZodUnknown",(e,t)=>{Ft.init(e,t),e._zod.parse=n=>n}),t6=ce("$ZodNever",(e,t)=>{Ft.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function E0(e,t,n){e.issues.length&&t.issues.push(...ZC(n,e.issues)),t.value[n]=e.value}const n6=ce("$ZodArray",(e,t)=>{Ft.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const l=[];for(let a=0;a<o.length;a++){const u=o[a],d=t.element._zod.run({value:u,issues:[]},r);d instanceof Promise?l.push(d.then(f=>E0(f,n,a))):E0(d,n,a)}return l.length?Promise.all(l).then(()=>n):n}});function Qc(e,t,n,r,o){if(e.issues.length){if(o&&!(n in r))return;t.issues.push(...ZC(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function nE(e){var r,o,l,a;const t=Object.keys(e.shape);for(const u of t)if(!((a=(l=(o=(r=e.shape)==null?void 0:r[u])==null?void 0:o._zod)==null?void 0:l.traits)!=null&&a.has("$ZodType")))throw new Error(`Invalid element at key "${u}": expected a Zod schema`);const n=w3(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function rE(e,t,n,r,o,l){const a=[],u=o.keySet,d=o.catchall._zod,f=d.def.type,p=d.optout==="optional";for(const h in t){if(u.has(h))continue;if(f==="never"){a.push(h);continue}const v=d.run({value:t[h],issues:[]},r);v instanceof Promise?e.push(v.then(g=>Qc(g,n,h,t,p))):Qc(v,n,h,t,p)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:l}),e.length?Promise.all(e).then(()=>n):n}const r6=ce("$ZodObject",(e,t)=>{Ft.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!(n!=null&&n.get)){const u=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...u};return Object.defineProperty(t,"shape",{value:d}),d}})}const r=vg(()=>nE(t));ut(e._zod,"propValues",()=>{const u=t.shape,d={};for(const f in u){const p=u[f]._zod;if(p.values){d[f]??(d[f]=new Set);for(const h of p.values)d[f].add(h)}}return d});const o=qc,l=t.catchall;let a;e._zod.parse=(u,d)=>{a??(a=r.value);const f=u.value;if(!o(f))return u.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),u;u.value={};const p=[],h=a.shape;for(const v of a.keys){const g=h[v],S=g._zod.optout==="optional",k=g._zod.run({value:f[v],issues:[]},d);k instanceof Promise?p.push(k.then(C=>Qc(C,u,v,f,S))):Qc(k,u,v,f,S)}return l?rE(p,f,u,d,r.value,e):p.length?Promise.all(p).then(()=>u):u}}),i6=ce("$ZodObjectJIT",(e,t)=>{r6.init(e,t);const n=e._zod.parse,r=vg(()=>nE(t)),o=v=>{var P;const g=new _5(["shape","payload","ctx"]),S=r.value,k=R=>{const I=S0(R);return`shape[${I}]._zod.run({ value: input[${I}], issues: [] }, ctx)`};g.write("const input = payload.value;");const C=Object.create(null);let E=0;for(const R of S.keys)C[R]=`key_${E++}`;g.write("const newResult = {};");for(const R of S.keys){const I=C[R],A=S0(R),H=v[R],B=((P=H==null?void 0:H._zod)==null?void 0:P.optout)==="optional";g.write(`const ${I} = ${k(R)};`),B?g.write(`
|
|
306
|
+
if (${I}.issues.length) {
|
|
307
|
+
if (${A} in input) {
|
|
308
|
+
payload.issues = payload.issues.concat(${I}.issues.map(iss => ({
|
|
309
|
+
...iss,
|
|
310
|
+
path: iss.path ? [${A}, ...iss.path] : [${A}]
|
|
311
|
+
})));
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
if (${I}.value === undefined) {
|
|
316
|
+
if (${A} in input) {
|
|
317
|
+
newResult[${A}] = undefined;
|
|
318
|
+
}
|
|
319
|
+
} else {
|
|
320
|
+
newResult[${A}] = ${I}.value;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
`):g.write(`
|
|
324
|
+
if (${I}.issues.length) {
|
|
325
|
+
payload.issues = payload.issues.concat(${I}.issues.map(iss => ({
|
|
326
|
+
...iss,
|
|
327
|
+
path: iss.path ? [${A}, ...iss.path] : [${A}]
|
|
328
|
+
})));
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
if (${I}.value === undefined) {
|
|
332
|
+
if (${A} in input) {
|
|
333
|
+
newResult[${A}] = undefined;
|
|
334
|
+
}
|
|
335
|
+
} else {
|
|
336
|
+
newResult[${A}] = ${I}.value;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
`)}g.write("payload.value = newResult;"),g.write("return payload;");const _=g.compile();return(R,I)=>_(v,R,I)};let l;const a=qc,u=!BC.jitless,f=u&&v3.value,p=t.catchall;let h;e._zod.parse=(v,g)=>{h??(h=r.value);const S=v.value;return a(S)?u&&f&&(g==null?void 0:g.async)===!1&&g.jitless!==!0?(l||(l=o(t.shape)),v=l(v,g),p?rE([],S,v,g,h,e):v):n(v,g):(v.issues.push({expected:"object",code:"invalid_type",input:S,inst:e}),v)}});function _0(e,t,n,r){for(const l of e)if(l.issues.length===0)return t.value=l.value,t;const o=e.filter(l=>!Ps(l));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(l=>l.issues.map(a=>Wo(a,r,Ho())))}),t)}const o6=ce("$ZodUnion",(e,t)=>{Ft.init(e,t),ut(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),ut(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),ut(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),ut(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(l=>l._zod.pattern);return new RegExp(`^(${o.map(l=>wg(l.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(o,l)=>{if(n)return r(o,l);let a=!1;const u=[];for(const d of t.options){const f=d._zod.run({value:o.value,issues:[]},l);if(f instanceof Promise)u.push(f),a=!0;else{if(f.issues.length===0)return f;u.push(f)}}return a?Promise.all(u).then(d=>_0(d,o,e,l)):_0(u,o,e,l)}}),s6=ce("$ZodIntersection",(e,t)=>{Ft.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,l=t.left._zod.run({value:o,issues:[]},r),a=t.right._zod.run({value:o,issues:[]},r);return l instanceof Promise||a instanceof Promise?Promise.all([l,a]).then(([d,f])=>T0(n,d,f)):T0(n,l,a)}});function Yp(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(ma(e)&&ma(t)){const n=Object.keys(t),r=Object.keys(e).filter(l=>n.indexOf(l)!==-1),o={...e,...t};for(const l of r){const a=Yp(e[l],t[l]);if(!a.valid)return{valid:!1,mergeErrorPath:[l,...a.mergeErrorPath]};o[l]=a.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=e[r],l=t[r],a=Yp(o,l);if(!a.valid)return{valid:!1,mergeErrorPath:[r,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function T0(e,t,n){const r=new Map;let o;for(const u of t.issues)if(u.code==="unrecognized_keys"){o??(o=u);for(const d of u.keys)r.has(d)||r.set(d,{}),r.get(d).l=!0}else e.issues.push(u);for(const u of n.issues)if(u.code==="unrecognized_keys")for(const d of u.keys)r.has(d)||r.set(d,{}),r.get(d).r=!0;else e.issues.push(u);const l=[...r].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(l.length&&o&&e.issues.push({...o,keys:l}),Ps(e))return e;const a=Yp(t.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}const l6=ce("$ZodEnum",(e,t)=>{Ft.init(e,t);const n=UC(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>x3.has(typeof o)).map(o=>typeof o=="string"?jd(o):o.toString()).join("|")})$`),e._zod.parse=(o,l)=>{const a=o.value;return r.has(a)||o.issues.push({code:"invalid_value",values:n,input:a,inst:e}),o}}),a6=ce("$ZodTransform",(e,t)=>{Ft.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new VC(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(a=>(n.value=a,n));if(o instanceof Promise)throw new As;return n.value=o,n}});function P0(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const iE=ce("$ZodOptional",(e,t)=>{Ft.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ut(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ut(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${wg(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(l=>P0(l,n.value)):P0(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),u6=ce("$ZodExactOptional",(e,t)=>{iE.init(e,t),ut(e._zod,"values",()=>t.innerType._zod.values),ut(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),c6=ce("$ZodNullable",(e,t)=>{Ft.init(e,t),ut(e._zod,"optin",()=>t.innerType._zod.optin),ut(e._zod,"optout",()=>t.innerType._zod.optout),ut(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${wg(n.source)}|null)$`):void 0}),ut(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),d6=ce("$ZodDefault",(e,t)=>{Ft.init(e,t),e._zod.optin="optional",ut(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(l=>N0(l,t)):N0(o,t)}});function N0(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const f6=ce("$ZodPrefault",(e,t)=>{Ft.init(e,t),e._zod.optin="optional",ut(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),h6=ce("$ZodNonOptional",(e,t)=>{Ft.init(e,t),ut(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(l=>R0(l,e)):R0(o,e)}});function R0(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const p6=ce("$ZodCatch",(e,t)=>{Ft.init(e,t),ut(e._zod,"optin",()=>t.innerType._zod.optin),ut(e._zod,"optout",()=>t.innerType._zod.optout),ut(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(l=>(n.value=l.value,l.issues.length&&(n.value=t.catchValue({...n,error:{issues:l.issues.map(a=>Wo(a,r,Ho()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(l=>Wo(l,r,Ho()))},input:n.value}),n.issues=[]),n)}}),m6=ce("$ZodPipe",(e,t)=>{Ft.init(e,t),ut(e._zod,"values",()=>t.in._zod.values),ut(e._zod,"optin",()=>t.in._zod.optin),ut(e._zod,"optout",()=>t.out._zod.optout),ut(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const l=t.out._zod.run(n,r);return l instanceof Promise?l.then(a=>pc(a,t.in,r)):pc(l,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(l=>pc(l,t.out,r)):pc(o,t.out,r)}});function pc(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const g6=ce("$ZodReadonly",(e,t)=>{Ft.init(e,t),ut(e._zod,"propValues",()=>t.innerType._zod.propValues),ut(e._zod,"values",()=>t.innerType._zod.values),ut(e._zod,"optin",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optin}),ut(e._zod,"optout",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optout}),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(j0):j0(o)}});function j0(e){return e.value=Object.freeze(e.value),e}const y6=ce("$ZodCustom",(e,t)=>{Vn.init(e,t),Ft.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(l=>A0(l,n,r,e));A0(o,n,r,e)}});function A0(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(ga(o))}}var I0;class v6{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function x6(){return new v6}(I0=globalThis).__zod_globalRegistry??(I0.__zod_globalRegistry=x6());const ta=globalThis.__zod_globalRegistry;function w6(e,t){return new e({type:"string",...Me(t)})}function b6(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Me(t)})}function O0(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Me(t)})}function k6(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Me(t)})}function S6(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Me(t)})}function C6(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Me(t)})}function E6(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Me(t)})}function _6(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Me(t)})}function T6(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Me(t)})}function P6(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Me(t)})}function N6(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Me(t)})}function R6(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Me(t)})}function j6(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Me(t)})}function A6(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Me(t)})}function I6(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Me(t)})}function O6(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Me(t)})}function D6(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Me(t)})}function z6(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Me(t)})}function M6(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Me(t)})}function L6(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Me(t)})}function F6(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Me(t)})}function $6(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Me(t)})}function V6(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Me(t)})}function B6(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Me(t)})}function U6(e,t){return new e({type:"string",format:"date",check:"string_format",...Me(t)})}function H6(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Me(t)})}function W6(e,t){return new e({type:"string",format:"duration",check:"string_format",...Me(t)})}function Z6(e,t){return new e({type:"number",checks:[],...Me(t)})}function q6(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Me(t)})}function Q6(e){return new e({type:"unknown"})}function Y6(e,t){return new e({type:"never",...Me(t)})}function D0(e,t){return new XC({check:"less_than",...Me(t),value:e,inclusive:!1})}function dp(e,t){return new XC({check:"less_than",...Me(t),value:e,inclusive:!0})}function z0(e,t){return new JC({check:"greater_than",...Me(t),value:e,inclusive:!1})}function fp(e,t){return new JC({check:"greater_than",...Me(t),value:e,inclusive:!0})}function M0(e,t){return new p5({check:"multiple_of",...Me(t),value:e})}function oE(e,t){return new g5({check:"max_length",...Me(t),maximum:e})}function Yc(e,t){return new y5({check:"min_length",...Me(t),minimum:e})}function sE(e,t){return new v5({check:"length_equals",...Me(t),length:e})}function K6(e,t){return new x5({check:"string_format",format:"regex",...Me(t),pattern:e})}function G6(e){return new w5({check:"string_format",format:"lowercase",...Me(e)})}function X6(e){return new b5({check:"string_format",format:"uppercase",...Me(e)})}function J6(e,t){return new k5({check:"string_format",format:"includes",...Me(t),includes:e})}function eV(e,t){return new S5({check:"string_format",format:"starts_with",...Me(t),prefix:e})}function tV(e,t){return new C5({check:"string_format",format:"ends_with",...Me(t),suffix:e})}function ll(e){return new E5({check:"overwrite",tx:e})}function nV(e){return ll(t=>t.normalize(e))}function rV(){return ll(e=>e.trim())}function iV(){return ll(e=>e.toLowerCase())}function oV(){return ll(e=>e.toUpperCase())}function sV(){return ll(e=>y3(e))}function lV(e,t,n){return new e({type:"array",element:t,...Me(n)})}function aV(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Me(n)})}function uV(e){const t=cV(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(ga(r,n.value,t._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(ga(o))}},e(n.value,n)));return t}function cV(e,t){const n=new Vn({check:"custom",...Me(t)});return n._zod.check=e,n}function lE(e){let t=(e==null?void 0:e.target)??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??ta,target:t,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function rn(e,t,n={path:[],schemaPath:[]}){var p,h;var r;const o=e._zod.def,l=t.seen.get(e);if(l)return l.count++,n.schemaPath.includes(e)&&(l.cycle=n.path),l.schema;const a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);const u=(h=(p=e._zod).toJSONSchema)==null?void 0:h.call(p);if(u)a.schema=u;else{const v={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,v);else{const S=a.schema,k=t.processors[o.type];if(!k)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);k(e,t,S,v)}const g=e._zod.parent;g&&(a.ref||(a.ref=g),rn(g,t,v),t.seen.get(g).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(a.schema,d),t.io==="input"&&yn(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&a.schema._prefault&&((r=a.schema).default??(r.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function aE(e,t){var a,u,d,f;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const p of e.seen.entries()){const h=(a=e.metadataRegistry.get(p[0]))==null?void 0:a.id;if(h){const v=r.get(h);if(v&&v!==p[0])throw new Error(`Duplicate schema id "${h}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(h,p[0])}}const o=p=>{var k;const h=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const C=(k=e.external.registry.get(p[0]))==null?void 0:k.id,E=e.external.uri??(P=>P);if(C)return{ref:E(C)};const _=p[1].defId??p[1].schema.id??`schema${e.counter++}`;return p[1].defId=_,{defId:_,ref:`${E("__shared")}#/${h}/${_}`}}if(p[1]===n)return{ref:"#"};const g=`#/${h}/`,S=p[1].schema.id??`__schema${e.counter++}`;return{defId:S,ref:g+S}},l=p=>{if(p[1].schema.$ref)return;const h=p[1],{ref:v,defId:g}=o(p);h.def={...h.schema},g&&(h.defId=g);const S=h.schema;for(const k in S)delete S[k];S.$ref=v};if(e.cycles==="throw")for(const p of e.seen.entries()){const h=p[1];if(h.cycle)throw new Error(`Cycle detected: #/${(u=h.cycle)==null?void 0:u.join("/")}/<root>
|
|
340
|
+
|
|
341
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const p of e.seen.entries()){const h=p[1];if(t===p[0]){l(p);continue}if(e.external){const g=(d=e.external.registry.get(p[0]))==null?void 0:d.id;if(t!==p[0]&&g){l(p);continue}}if((f=e.metadataRegistry.get(p[0]))==null?void 0:f.id){l(p);continue}if(h.cycle){l(p);continue}if(h.count>1&&e.reused==="ref"){l(p);continue}}}function uE(e,t){var a,u,d;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=f=>{const p=e.seen.get(f);if(p.ref===null)return;const h=p.def??p.schema,v={...h},g=p.ref;if(p.ref=null,g){r(g);const k=e.seen.get(g),C=k.schema;if(C.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(h.allOf=h.allOf??[],h.allOf.push(C)):Object.assign(h,C),Object.assign(h,v),f._zod.parent===g)for(const _ in h)_==="$ref"||_==="allOf"||_ in v||delete h[_];if(C.$ref)for(const _ in h)_==="$ref"||_==="allOf"||_ in k.def&&JSON.stringify(h[_])===JSON.stringify(k.def[_])&&delete h[_]}const S=f._zod.parent;if(S&&S!==g){r(S);const k=e.seen.get(S);if(k!=null&&k.schema.$ref&&(h.$ref=k.schema.$ref,k.def))for(const C in h)C==="$ref"||C==="allOf"||C in k.def&&JSON.stringify(h[C])===JSON.stringify(k.def[C])&&delete h[C]}e.override({zodSchema:f,jsonSchema:h,path:p.path??[]})};for(const f of[...e.seen.entries()].reverse())r(f[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,(a=e.external)!=null&&a.uri){const f=(u=e.external.registry.get(t))==null?void 0:u.id;if(!f)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(f)}Object.assign(o,n.def??n.schema);const l=((d=e.external)==null?void 0:d.defs)??{};for(const f of e.seen.entries()){const p=f[1];p.def&&p.defId&&(l[p.defId]=p.def)}e.external||Object.keys(l).length>0&&(e.target==="draft-2020-12"?o.$defs=l:o.definitions=l);try{const f=JSON.parse(JSON.stringify(o));return Object.defineProperty(f,"~standard",{value:{...t["~standard"],jsonSchema:{input:Kc(t,"input",e.processors),output:Kc(t,"output",e.processors)}},enumerable:!1,writable:!1}),f}catch{throw new Error("Error converting schema to JSON.")}}function yn(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return yn(r.element,n);if(r.type==="set")return yn(r.valueType,n);if(r.type==="lazy")return yn(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return yn(r.innerType,n);if(r.type==="intersection")return yn(r.left,n)||yn(r.right,n);if(r.type==="record"||r.type==="map")return yn(r.keyType,n)||yn(r.valueType,n);if(r.type==="pipe")return yn(r.in,n)||yn(r.out,n);if(r.type==="object"){for(const o in r.shape)if(yn(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(yn(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(yn(o,n))return!0;return!!(r.rest&&yn(r.rest,n))}return!1}const dV=(e,t={})=>n=>{const r=lE({...n,processors:t});return rn(e,r),aE(r,e),uE(r,e)},Kc=(e,t,n={})=>r=>{const{libraryOptions:o,target:l}=r??{},a=lE({...o??{},target:l,io:t,processors:n});return rn(e,a),aE(a,e),uE(a,e)},fV={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},hV=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:l,maximum:a,format:u,patterns:d,contentEncoding:f}=e._zod.bag;if(typeof l=="number"&&(o.minLength=l),typeof a=="number"&&(o.maxLength=a),u&&(o.format=fV[u]??u,o.format===""&&delete o.format,u==="time"&&delete o.format),f&&(o.contentEncoding=f),d&&d.size>0){const p=[...d];p.length===1?o.pattern=p[0].source:p.length>1&&(o.allOf=[...p.map(h=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:h.source}))])}},pV=(e,t,n,r)=>{const o=n,{minimum:l,maximum:a,format:u,multipleOf:d,exclusiveMaximum:f,exclusiveMinimum:p}=e._zod.bag;typeof u=="string"&&u.includes("int")?o.type="integer":o.type="number",typeof p=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.minimum=p,o.exclusiveMinimum=!0):o.exclusiveMinimum=p),typeof l=="number"&&(o.minimum=l,typeof p=="number"&&t.target!=="draft-04"&&(p>=l?delete o.minimum:delete o.exclusiveMinimum)),typeof f=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.maximum=f,o.exclusiveMaximum=!0):o.exclusiveMaximum=f),typeof a=="number"&&(o.maximum=a,typeof f=="number"&&t.target!=="draft-04"&&(f<=a?delete o.maximum:delete o.exclusiveMaximum)),typeof d=="number"&&(o.multipleOf=d)},mV=(e,t,n,r)=>{n.not={}},gV=(e,t,n,r)=>{},yV=(e,t,n,r)=>{const o=e._zod.def,l=UC(o.entries);l.every(a=>typeof a=="number")&&(n.type="number"),l.every(a=>typeof a=="string")&&(n.type="string"),n.enum=l},vV=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},xV=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},wV=(e,t,n,r)=>{const o=n,l=e._zod.def,{minimum:a,maximum:u}=e._zod.bag;typeof a=="number"&&(o.minItems=a),typeof u=="number"&&(o.maxItems=u),o.type="array",o.items=rn(l.element,t,{...r,path:[...r.path,"items"]})},bV=(e,t,n,r)=>{var f;const o=n,l=e._zod.def;o.type="object",o.properties={};const a=l.shape;for(const p in a)o.properties[p]=rn(a[p],t,{...r,path:[...r.path,"properties",p]});const u=new Set(Object.keys(a)),d=new Set([...u].filter(p=>{const h=l.shape[p]._zod;return t.io==="input"?h.optin===void 0:h.optout===void 0}));d.size>0&&(o.required=Array.from(d)),((f=l.catchall)==null?void 0:f._zod.def.type)==="never"?o.additionalProperties=!1:l.catchall?l.catchall&&(o.additionalProperties=rn(l.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},kV=(e,t,n,r)=>{const o=e._zod.def,l=o.inclusive===!1,a=o.options.map((u,d)=>rn(u,t,{...r,path:[...r.path,l?"oneOf":"anyOf",d]}));l?n.oneOf=a:n.anyOf=a},SV=(e,t,n,r)=>{const o=e._zod.def,l=rn(o.left,t,{...r,path:[...r.path,"allOf",0]}),a=rn(o.right,t,{...r,path:[...r.path,"allOf",1]}),u=f=>"allOf"in f&&Object.keys(f).length===1,d=[...u(l)?l.allOf:[l],...u(a)?a.allOf:[a]];n.allOf=d},CV=(e,t,n,r)=>{const o=e._zod.def,l=rn(o.innerType,t,r),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=o.innerType,n.nullable=!0):n.anyOf=[l,{type:"null"}]},EV=(e,t,n,r)=>{const o=e._zod.def;rn(o.innerType,t,r);const l=t.seen.get(e);l.ref=o.innerType},_V=(e,t,n,r)=>{const o=e._zod.def;rn(o.innerType,t,r);const l=t.seen.get(e);l.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},TV=(e,t,n,r)=>{const o=e._zod.def;rn(o.innerType,t,r);const l=t.seen.get(e);l.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},PV=(e,t,n,r)=>{const o=e._zod.def;rn(o.innerType,t,r);const l=t.seen.get(e);l.ref=o.innerType;let a;try{a=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},NV=(e,t,n,r)=>{const o=e._zod.def,l=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;rn(l,t,r);const a=t.seen.get(e);a.ref=l},RV=(e,t,n,r)=>{const o=e._zod.def;rn(o.innerType,t,r);const l=t.seen.get(e);l.ref=o.innerType,n.readOnly=!0},cE=(e,t,n,r)=>{const o=e._zod.def;rn(o.innerType,t,r);const l=t.seen.get(e);l.ref=o.innerType};function L0(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}function jV(e,t){for(var n={};e.length;){var r=e[0],o=r.code,l=r.message,a=r.path.join(".");if(!n[a])if("unionErrors"in r){var u=r.unionErrors[0].errors[0];n[a]={message:u.message,type:u.code}}else n[a]={message:l,type:o};if("unionErrors"in r&&r.unionErrors.forEach(function(p){return p.errors.forEach(function(h){return e.push(h)})}),t){var d=n[a].types,f=d&&d[r.code];n[a]=pg(a,t,n,o,f?[].concat(f,r.message):r.message)}e.shift()}return n}function AV(e,t){for(var n={};e.length;){var r=e[0],o=r.code,l=r.message,a=r.path.join(".");if(!n[a])if(r.code==="invalid_union"&&r.errors.length>0){var u=r.errors[0][0];n[a]={message:u.message,type:u.code}}else n[a]={message:l,type:o};if(r.code==="invalid_union"&&r.errors.forEach(function(p){return p.forEach(function(h){return e.push(h)})}),t){var d=n[a].types,f=d&&d[r.code];n[a]=pg(a,t,n,o,f?[].concat(f,r.message):r.message)}e.shift()}return n}function Cg(e,t,n){if(n===void 0&&(n={}),function(r){return"_def"in r&&typeof r._def=="object"&&"typeName"in r._def}(e))return function(r,o,l){try{return Promise.resolve(L0(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(a){return l.shouldUseNativeValidation&&qp({},l),{errors:{},values:n.raw?Object.assign({},r):a}})},function(a){if(function(u){return Array.isArray(u==null?void 0:u.issues)}(a))return{values:{},errors:w0(jV(a.errors,!l.shouldUseNativeValidation&&l.criteriaMode==="all"),l)};throw a}))}catch(a){return Promise.reject(a)}};if(function(r){return"_zod"in r&&typeof r._zod=="object"}(e))return function(r,o,l){try{return Promise.resolve(L0(function(){return Promise.resolve((n.mode==="sync"?j3:A3)(e,r,t)).then(function(a){return l.shouldUseNativeValidation&&qp({},l),{errors:{},values:n.raw?Object.assign({},r):a}})},function(a){if(function(u){return u instanceof kg}(a))return{values:{},errors:w0(AV(a.issues,!l.shouldUseNativeValidation&&l.criteriaMode==="all"),l)};throw a}))}catch(a){return Promise.reject(a)}};throw new Error("Invalid input: not a Zod schema")}var IV=e=>{switch(e){case"success":return zV;case"info":return LV;case"warning":return MV;case"error":return FV;default:return null}},OV=Array(12).fill(0),DV=({visible:e,className:t})=>le.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},le.createElement("div",{className:"sonner-spinner"},OV.map((n,r)=>le.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),zV=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),MV=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},le.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),LV=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),FV=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),$V=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},le.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),le.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),VV=()=>{let[e,t]=le.useState(document.hidden);return le.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Kp=1,BV=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Kp++,l=this.toasts.find(u=>u.id===o),a=e.dismissible===void 0?!0:e.dismissible;return l?this.toasts=this.toasts.map(u=>u.id===o?(this.publish({...u,...e,id:o,title:n}),{...u,...e,id:o,dismissible:a,title:n}):u):this.addToast({title:n,...r,dismissible:a,id:o}),o},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0,l,a=r.then(async d=>{if(l=["resolve",d],le.isValidElement(d))o=!1,this.create({id:n,type:"default",message:d});else if(HV(d)&&!d.ok){o=!1;let f=typeof t.error=="function"?await t.error(`HTTP error! status: ${d.status}`):t.error,p=typeof t.description=="function"?await t.description(`HTTP error! status: ${d.status}`):t.description;this.create({id:n,type:"error",message:f,description:p})}else if(t.success!==void 0){o=!1;let f=typeof t.success=="function"?await t.success(d):t.success,p=typeof t.description=="function"?await t.description(d):t.description;this.create({id:n,type:"success",message:f,description:p})}}).catch(async d=>{if(l=["reject",d],t.error!==void 0){o=!1;let f=typeof t.error=="function"?await t.error(d):t.error,p=typeof t.description=="function"?await t.description(d):t.description;this.create({id:n,type:"error",message:f,description:p})}}).finally(()=>{var d;o&&(this.dismiss(n),n=void 0),(d=t.finally)==null||d.call(t)}),u=()=>new Promise((d,f)=>a.then(()=>l[0]==="reject"?f(l[1]):d(l[1])).catch(f));return typeof n!="string"&&typeof n!="number"?{unwrap:u}:Object.assign(n,{unwrap:u})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Kp++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},Yn=new BV,UV=(e,t)=>{let n=(t==null?void 0:t.id)||Kp++;return Yn.addToast({title:e,...t,id:n}),n},HV=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",WV=UV,ZV=()=>Yn.toasts,vt=Object.assign(WV,{success:Yn.success,info:Yn.info,warning:Yn.warning,error:Yn.error,custom:Yn.custom,message:Yn.message,promise:Yn.promise,dismiss:Yn.dismiss,loading:Yn.loading},{getHistory:ZV});function qV(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}qV(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
342
|
+
`);function mc(e){return e.label!==void 0}var QV=3,YV="32px",F0=4e3,KV=356,GV=14,XV=20,JV=200;function eB(...e){return e.filter(Boolean).join(" ")}var tB=e=>{var t,n,r,o,l,a,u,d,f,p,h;let{invert:v,toast:g,unstyled:S,interacting:k,setHeights:C,visibleToasts:E,heights:_,index:P,toasts:R,expanded:I,removeToast:A,defaultRichColors:H,closeButton:B,style:ne,cancelButtonStyle:O,actionButtonStyle:Y,className:G="",descriptionClassName:ae="",duration:q,position:U,gap:Z,loadingIcon:J,expandByDefault:D,classNames:K,icons:N,closeButtonAriaLabel:M="Close toast",pauseWhenPageIsHidden:Q,cn:j}=e,[ue,ve]=le.useState(!1),[xe,re]=le.useState(!1),[me,Se]=le.useState(!1),[be,Ie]=le.useState(!1),[Ue,ot]=le.useState(!1),[It,Zt]=le.useState(0),[on,Xt]=le.useState(0),Bn=le.useRef(g.duration||q||F0),fn=le.useRef(null),qt=le.useRef(null),L=P===0,ee=P+1<=E,oe=g.type,we=g.dismissible!==!1,ye=g.className||"",$=g.descriptionClassName||"",se=le.useMemo(()=>_.findIndex(Be=>Be.toastId===g.id)||0,[_,g.id]),ke=le.useMemo(()=>{var Be;return(Be=g.closeButton)!=null?Be:B},[g.closeButton,B]);le.useMemo(()=>g.duration||q||F0,[g.duration,q]);let _e=le.useRef(0),De=le.useRef(0),dt=le.useRef(0),kt=le.useRef(null),[Jt,En]=U.split("-"),_n=le.useMemo(()=>_.reduce((Be,Ge,ft)=>ft>=se?Be:Be+Ge.height,0),[_,se]),Tt=VV(),hn=g.invert||v,Vt=oe==="loading";De.current=le.useMemo(()=>se*Z+_n,[se,_n]),le.useEffect(()=>{ve(!0)},[]),le.useEffect(()=>{let Be=qt.current;if(Be){let Ge=Be.getBoundingClientRect().height;return Xt(Ge),C(ft=>[{toastId:g.id,height:Ge,position:g.position},...ft]),()=>C(ft=>ft.filter(Tn=>Tn.toastId!==g.id))}},[C,g.id]),le.useLayoutEffect(()=>{if(!ue)return;let Be=qt.current,Ge=Be.style.height;Be.style.height="auto";let ft=Be.getBoundingClientRect().height;Be.style.height=Ge,Xt(ft),C(Tn=>Tn.find(Un=>Un.toastId===g.id)?Tn.map(Un=>Un.toastId===g.id?{...Un,height:ft}:Un):[{toastId:g.id,height:ft,position:g.position},...Tn])},[ue,g.title,g.description,C,g.id]);let pn=le.useCallback(()=>{re(!0),Zt(De.current),C(Be=>Be.filter(Ge=>Ge.toastId!==g.id)),setTimeout(()=>{A(g)},JV)},[g,A,C,De]);le.useEffect(()=>{if(g.promise&&oe==="loading"||g.duration===1/0||g.type==="loading")return;let Be;return I||k||Q&&Tt?(()=>{if(dt.current<_e.current){let Ge=new Date().getTime()-_e.current;Bn.current=Bn.current-Ge}dt.current=new Date().getTime()})():Bn.current!==1/0&&(_e.current=new Date().getTime(),Be=setTimeout(()=>{var Ge;(Ge=g.onAutoClose)==null||Ge.call(g,g),pn()},Bn.current)),()=>clearTimeout(Be)},[I,k,g,oe,Q,Tt,pn]),le.useEffect(()=>{g.delete&&pn()},[pn,g.delete]);function ul(){var Be,Ge,ft;return N!=null&&N.loading?le.createElement("div",{className:j(K==null?void 0:K.loader,(Be=g==null?void 0:g.classNames)==null?void 0:Be.loader,"sonner-loader"),"data-visible":oe==="loading"},N.loading):J?le.createElement("div",{className:j(K==null?void 0:K.loader,(Ge=g==null?void 0:g.classNames)==null?void 0:Ge.loader,"sonner-loader"),"data-visible":oe==="loading"},J):le.createElement(DV,{className:j(K==null?void 0:K.loader,(ft=g==null?void 0:g.classNames)==null?void 0:ft.loader),visible:oe==="loading"})}return le.createElement("li",{tabIndex:0,ref:qt,className:j(G,ye,K==null?void 0:K.toast,(t=g==null?void 0:g.classNames)==null?void 0:t.toast,K==null?void 0:K.default,K==null?void 0:K[oe],(n=g==null?void 0:g.classNames)==null?void 0:n[oe]),"data-sonner-toast":"","data-rich-colors":(r=g.richColors)!=null?r:H,"data-styled":!(g.jsx||g.unstyled||S),"data-mounted":ue,"data-promise":!!g.promise,"data-swiped":Ue,"data-removed":xe,"data-visible":ee,"data-y-position":Jt,"data-x-position":En,"data-index":P,"data-front":L,"data-swiping":me,"data-dismissible":we,"data-type":oe,"data-invert":hn,"data-swipe-out":be,"data-expanded":!!(I||D&&ue),style:{"--index":P,"--toasts-before":P,"--z-index":R.length-P,"--offset":`${xe?It:De.current}px`,"--initial-height":D?"auto":`${on}px`,...ne,...g.style},onPointerDown:Be=>{Vt||!we||(fn.current=new Date,Zt(De.current),Be.target.setPointerCapture(Be.pointerId),Be.target.tagName!=="BUTTON"&&(Se(!0),kt.current={x:Be.clientX,y:Be.clientY}))},onPointerUp:()=>{var Be,Ge,ft,Tn;if(be||!we)return;kt.current=null;let Un=Number(((Be=qt.current)==null?void 0:Be.style.getPropertyValue("--swipe-amount").replace("px",""))||0),co=new Date().getTime()-((Ge=fn.current)==null?void 0:Ge.getTime()),Ua=Math.abs(Un)/co;if(Math.abs(Un)>=XV||Ua>.11){Zt(De.current),(ft=g.onDismiss)==null||ft.call(g,g),pn(),Ie(!0),ot(!1);return}(Tn=qt.current)==null||Tn.style.setProperty("--swipe-amount","0px"),Se(!1)},onPointerMove:Be=>{var Ge,ft;if(!kt.current||!we)return;let Tn=Be.clientY-kt.current.y,Un=((Ge=window.getSelection())==null?void 0:Ge.toString().length)>0,co=Jt==="top"?Math.min(0,Tn):Math.max(0,Tn);Math.abs(co)>0&&ot(!0),!Un&&((ft=qt.current)==null||ft.style.setProperty("--swipe-amount",`${co}px`))}},ke&&!g.jsx?le.createElement("button",{"aria-label":M,"data-disabled":Vt,"data-close-button":!0,onClick:Vt||!we?()=>{}:()=>{var Be;pn(),(Be=g.onDismiss)==null||Be.call(g,g)},className:j(K==null?void 0:K.closeButton,(o=g==null?void 0:g.classNames)==null?void 0:o.closeButton)},(l=N==null?void 0:N.close)!=null?l:$V):null,g.jsx||le.isValidElement(g.title)?g.jsx?g.jsx:typeof g.title=="function"?g.title():g.title:le.createElement(le.Fragment,null,oe||g.icon||g.promise?le.createElement("div",{"data-icon":"",className:j(K==null?void 0:K.icon,(a=g==null?void 0:g.classNames)==null?void 0:a.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||ul():null,g.type!=="loading"?g.icon||(N==null?void 0:N[oe])||IV(oe):null):null,le.createElement("div",{"data-content":"",className:j(K==null?void 0:K.content,(u=g==null?void 0:g.classNames)==null?void 0:u.content)},le.createElement("div",{"data-title":"",className:j(K==null?void 0:K.title,(d=g==null?void 0:g.classNames)==null?void 0:d.title)},typeof g.title=="function"?g.title():g.title),g.description?le.createElement("div",{"data-description":"",className:j(ae,$,K==null?void 0:K.description,(f=g==null?void 0:g.classNames)==null?void 0:f.description)},typeof g.description=="function"?g.description():g.description):null),le.isValidElement(g.cancel)?g.cancel:g.cancel&&mc(g.cancel)?le.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||O,onClick:Be=>{var Ge,ft;mc(g.cancel)&&we&&((ft=(Ge=g.cancel).onClick)==null||ft.call(Ge,Be),pn())},className:j(K==null?void 0:K.cancelButton,(p=g==null?void 0:g.classNames)==null?void 0:p.cancelButton)},g.cancel.label):null,le.isValidElement(g.action)?g.action:g.action&&mc(g.action)?le.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||Y,onClick:Be=>{var Ge,ft;mc(g.action)&&((ft=(Ge=g.action).onClick)==null||ft.call(Ge,Be),!Be.defaultPrevented&&pn())},className:j(K==null?void 0:K.actionButton,(h=g==null?void 0:g.classNames)==null?void 0:h.actionButton)},g.action.label):null))};function $0(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var nB=b.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:l,closeButton:a,className:u,offset:d,theme:f="light",richColors:p,duration:h,style:v,visibleToasts:g=QV,toastOptions:S,dir:k=$0(),gap:C=GV,loadingIcon:E,icons:_,containerAriaLabel:P="Notifications",pauseWhenPageIsHidden:R,cn:I=eB}=e,[A,H]=le.useState([]),B=le.useMemo(()=>Array.from(new Set([r].concat(A.filter(Q=>Q.position).map(Q=>Q.position)))),[A,r]),[ne,O]=le.useState([]),[Y,G]=le.useState(!1),[ae,q]=le.useState(!1),[U,Z]=le.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),J=le.useRef(null),D=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),K=le.useRef(null),N=le.useRef(!1),M=le.useCallback(Q=>{H(j=>{var ue;return(ue=j.find(ve=>ve.id===Q.id))!=null&&ue.delete||Yn.dismiss(Q.id),j.filter(({id:ve})=>ve!==Q.id)})},[]);return le.useEffect(()=>Yn.subscribe(Q=>{if(Q.dismiss){H(j=>j.map(ue=>ue.id===Q.id?{...ue,delete:!0}:ue));return}setTimeout(()=>{ik.flushSync(()=>{H(j=>{let ue=j.findIndex(ve=>ve.id===Q.id);return ue!==-1?[...j.slice(0,ue),{...j[ue],...Q},...j.slice(ue+1)]:[Q,...j]})})})}),[]),le.useEffect(()=>{if(f!=="system"){Z(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Z("dark"):Z("light")),typeof window>"u")return;let Q=window.matchMedia("(prefers-color-scheme: dark)");try{Q.addEventListener("change",({matches:j})=>{Z(j?"dark":"light")})}catch{Q.addListener(({matches:ue})=>{try{Z(ue?"dark":"light")}catch(ve){console.error(ve)}})}},[f]),le.useEffect(()=>{A.length<=1&&G(!1)},[A]),le.useEffect(()=>{let Q=j=>{var ue,ve;o.every(xe=>j[xe]||j.code===xe)&&(G(!0),(ue=J.current)==null||ue.focus()),j.code==="Escape"&&(document.activeElement===J.current||(ve=J.current)!=null&&ve.contains(document.activeElement))&&G(!1)};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[o]),le.useEffect(()=>{if(J.current)return()=>{K.current&&(K.current.focus({preventScroll:!0}),K.current=null,N.current=!1)}},[J.current]),le.createElement("section",{"aria-label":`${P} ${D}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},B.map((Q,j)=>{var ue;let[ve,xe]=Q.split("-");return A.length?le.createElement("ol",{key:Q,dir:k==="auto"?$0():k,tabIndex:-1,ref:J,className:u,"data-sonner-toaster":!0,"data-theme":U,"data-y-position":ve,"data-lifted":Y&&A.length>1&&!l,"data-x-position":xe,style:{"--front-toast-height":`${((ue=ne[0])==null?void 0:ue.height)||0}px`,"--offset":typeof d=="number"?`${d}px`:d||YV,"--width":`${KV}px`,"--gap":`${C}px`,...v},onBlur:re=>{N.current&&!re.currentTarget.contains(re.relatedTarget)&&(N.current=!1,K.current&&(K.current.focus({preventScroll:!0}),K.current=null))},onFocus:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||N.current||(N.current=!0,K.current=re.relatedTarget)},onMouseEnter:()=>G(!0),onMouseMove:()=>G(!0),onMouseLeave:()=>{ae||G(!1)},onPointerDown:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||q(!0)},onPointerUp:()=>q(!1)},A.filter(re=>!re.position&&j===0||re.position===Q).map((re,me)=>{var Se,be;return le.createElement(tB,{key:re.id,icons:_,index:me,toast:re,defaultRichColors:p,duration:(Se=S==null?void 0:S.duration)!=null?Se:h,className:S==null?void 0:S.className,descriptionClassName:S==null?void 0:S.descriptionClassName,invert:n,visibleToasts:g,closeButton:(be=S==null?void 0:S.closeButton)!=null?be:a,interacting:ae,position:Q,style:S==null?void 0:S.style,unstyled:S==null?void 0:S.unstyled,classNames:S==null?void 0:S.classNames,cancelButtonStyle:S==null?void 0:S.cancelButtonStyle,actionButtonStyle:S==null?void 0:S.actionButtonStyle,removeToast:M,toasts:A.filter(Ie=>Ie.position==re.position),heights:ne.filter(Ie=>Ie.position==re.position),setHeights:O,expandByDefault:l,gap:C,loadingIcon:E,expanded:Y,pauseWhenPageIsHidden:R,cn:I})})):null}))});function dE(e,t){return e&&typeof e=="object"&&"error"in e&&typeof e.error=="string"?e.error:t}function V0(e){return e?{title:e.title,description:e.description??"",status:e.status,priority:e.priority}:{title:"",description:"",status:"todo",priority:2}}async function hp(e,t){const n=await fetch(`/api/epics/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){const r=await n.json();throw new Error(dE(r,"Failed to update epic"))}return n.json()}async function rB(e){const t=await fetch(`/api/epics/${e}`,{method:"DELETE"});if(!t.ok){const n=await t.json();throw new Error(dE(n,"Failed to delete epic"))}}const iB=ce("ZodISODateTime",(e,t)=>{F5.init(e,t),_t.init(e,t)});function oB(e){return B6(iB,e)}const sB=ce("ZodISODate",(e,t)=>{$5.init(e,t),_t.init(e,t)});function lB(e){return U6(sB,e)}const aB=ce("ZodISOTime",(e,t)=>{V5.init(e,t),_t.init(e,t)});function uB(e){return H6(aB,e)}const cB=ce("ZodISODuration",(e,t)=>{B5.init(e,t),_t.init(e,t)});function dB(e){return W6(cB,e)}const fB=(e,t)=>{kg.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>R3(e,n)},flatten:{value:n=>N3(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Qp,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Qp,2)}},isEmpty:{get(){return e.issues.length===0}}})},fr=ce("ZodError",fB,{Parent:Error}),hB=Id(fr),pB=Od(fr),mB=Dd(fr),gB=zd(fr),yB=D3(fr),vB=z3(fr),xB=M3(fr),wB=L3(fr),bB=F3(fr),kB=$3(fr),SB=V3(fr),CB=B3(fr),$t=ce("ZodType",(e,t)=>(Ft.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Kc(e,"input"),output:Kc(e,"output")}}),e.toJSONSchema=dV(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(ao(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>uo(e,n,r),e.brand=()=>e,e.register=(n,r)=>(n.add(e,r),e),e.parse=(n,r)=>hB(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>mB(e,n,r),e.parseAsync=async(n,r)=>pB(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>gB(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>yB(e,n,r),e.decode=(n,r)=>vB(e,n,r),e.encodeAsync=async(n,r)=>xB(e,n,r),e.decodeAsync=async(n,r)=>wB(e,n,r),e.safeEncode=(n,r)=>bB(e,n,r),e.safeDecode=(n,r)=>kB(e,n,r),e.safeEncodeAsync=async(n,r)=>SB(e,n,r),e.safeDecodeAsync=async(n,r)=>CB(e,n,r),e.refine=(n,r)=>e.check(y9(n,r)),e.superRefine=n=>e.check(v9(n)),e.overwrite=n=>e.check(ll(n)),e.optional=()=>W0(e),e.exactOptional=()=>i9(e),e.nullable=()=>Z0(e),e.nullish=()=>W0(Z0(e)),e.nonoptional=n=>c9(e,n),e.array=()=>QB(e),e.or=n=>GB([e,n]),e.and=n=>JB(e,n),e.transform=n=>q0(e,n9(n)),e.default=n=>l9(e,n),e.prefault=n=>u9(e,n),e.catch=n=>f9(e,n),e.pipe=n=>q0(e,n),e.readonly=()=>m9(e),e.describe=n=>{const r=e.clone();return ta.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){var n;return(n=ta.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return ta.get(e);const r=e.clone();return ta.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),fE=ce("_ZodString",(e,t)=>{Sg.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,o,l)=>hV(e,r,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(K6(...r)),e.includes=(...r)=>e.check(J6(...r)),e.startsWith=(...r)=>e.check(eV(...r)),e.endsWith=(...r)=>e.check(tV(...r)),e.min=(...r)=>e.check(Yc(...r)),e.max=(...r)=>e.check(oE(...r)),e.length=(...r)=>e.check(sE(...r)),e.nonempty=(...r)=>e.check(Yc(1,...r)),e.lowercase=r=>e.check(G6(r)),e.uppercase=r=>e.check(X6(r)),e.trim=()=>e.check(rV()),e.normalize=(...r)=>e.check(nV(...r)),e.toLowerCase=()=>e.check(iV()),e.toUpperCase=()=>e.check(oV()),e.slugify=()=>e.check(sV())}),EB=ce("ZodString",(e,t)=>{Sg.init(e,t),fE.init(e,t),e.email=n=>e.check(b6(_B,n)),e.url=n=>e.check(_6(TB,n)),e.jwt=n=>e.check(V6(BB,n)),e.emoji=n=>e.check(T6(PB,n)),e.guid=n=>e.check(O0(B0,n)),e.uuid=n=>e.check(k6(gc,n)),e.uuidv4=n=>e.check(S6(gc,n)),e.uuidv6=n=>e.check(C6(gc,n)),e.uuidv7=n=>e.check(E6(gc,n)),e.nanoid=n=>e.check(P6(NB,n)),e.guid=n=>e.check(O0(B0,n)),e.cuid=n=>e.check(N6(RB,n)),e.cuid2=n=>e.check(R6(jB,n)),e.ulid=n=>e.check(j6(AB,n)),e.base64=n=>e.check(L6(FB,n)),e.base64url=n=>e.check(F6($B,n)),e.xid=n=>e.check(A6(IB,n)),e.ksuid=n=>e.check(I6(OB,n)),e.ipv4=n=>e.check(O6(DB,n)),e.ipv6=n=>e.check(D6(zB,n)),e.cidrv4=n=>e.check(z6(MB,n)),e.cidrv6=n=>e.check(M6(LB,n)),e.e164=n=>e.check($6(VB,n)),e.datetime=n=>e.check(oB(n)),e.date=n=>e.check(lB(n)),e.time=n=>e.check(uB(n)),e.duration=n=>e.check(dB(n))});function Cn(e){return w6(EB,e)}const _t=ce("ZodStringFormat",(e,t)=>{bt.init(e,t),fE.init(e,t)}),_B=ce("ZodEmail",(e,t)=>{R5.init(e,t),_t.init(e,t)}),B0=ce("ZodGUID",(e,t)=>{P5.init(e,t),_t.init(e,t)}),gc=ce("ZodUUID",(e,t)=>{N5.init(e,t),_t.init(e,t)}),TB=ce("ZodURL",(e,t)=>{j5.init(e,t),_t.init(e,t)}),PB=ce("ZodEmoji",(e,t)=>{A5.init(e,t),_t.init(e,t)}),NB=ce("ZodNanoID",(e,t)=>{I5.init(e,t),_t.init(e,t)}),RB=ce("ZodCUID",(e,t)=>{O5.init(e,t),_t.init(e,t)}),jB=ce("ZodCUID2",(e,t)=>{D5.init(e,t),_t.init(e,t)}),AB=ce("ZodULID",(e,t)=>{z5.init(e,t),_t.init(e,t)}),IB=ce("ZodXID",(e,t)=>{M5.init(e,t),_t.init(e,t)}),OB=ce("ZodKSUID",(e,t)=>{L5.init(e,t),_t.init(e,t)}),DB=ce("ZodIPv4",(e,t)=>{U5.init(e,t),_t.init(e,t)}),zB=ce("ZodIPv6",(e,t)=>{H5.init(e,t),_t.init(e,t)}),MB=ce("ZodCIDRv4",(e,t)=>{W5.init(e,t),_t.init(e,t)}),LB=ce("ZodCIDRv6",(e,t)=>{Z5.init(e,t),_t.init(e,t)}),FB=ce("ZodBase64",(e,t)=>{q5.init(e,t),_t.init(e,t)}),$B=ce("ZodBase64URL",(e,t)=>{Y5.init(e,t),_t.init(e,t)}),VB=ce("ZodE164",(e,t)=>{K5.init(e,t),_t.init(e,t)}),BB=ce("ZodJWT",(e,t)=>{X5.init(e,t),_t.init(e,t)}),hE=ce("ZodNumber",(e,t)=>{tE.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,o,l)=>pV(e,r,o),e.gt=(r,o)=>e.check(z0(r,o)),e.gte=(r,o)=>e.check(fp(r,o)),e.min=(r,o)=>e.check(fp(r,o)),e.lt=(r,o)=>e.check(D0(r,o)),e.lte=(r,o)=>e.check(dp(r,o)),e.max=(r,o)=>e.check(dp(r,o)),e.int=r=>e.check(U0(r)),e.safe=r=>e.check(U0(r)),e.positive=r=>e.check(z0(0,r)),e.nonnegative=r=>e.check(fp(0,r)),e.negative=r=>e.check(D0(0,r)),e.nonpositive=r=>e.check(dp(0,r)),e.multipleOf=(r,o)=>e.check(M0(r,o)),e.step=(r,o)=>e.check(M0(r,o)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Eg(e){return Z6(hE,e)}const UB=ce("ZodNumberFormat",(e,t)=>{J5.init(e,t),hE.init(e,t)});function U0(e){return q6(UB,e)}const HB=ce("ZodUnknown",(e,t)=>{e6.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>gV()});function H0(){return Q6(HB)}const WB=ce("ZodNever",(e,t)=>{t6.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>mV(e,n,r)});function ZB(e){return Y6(WB,e)}const qB=ce("ZodArray",(e,t)=>{n6.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>wV(e,n,r,o),e.element=t.element,e.min=(n,r)=>e.check(Yc(n,r)),e.nonempty=n=>e.check(Yc(1,n)),e.max=(n,r)=>e.check(oE(n,r)),e.length=(n,r)=>e.check(sE(n,r)),e.unwrap=()=>e.element});function QB(e,t){return lV(qB,e,t)}const YB=ce("ZodObject",(e,t)=>{i6.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>bV(e,n,r,o),ut(e,"shape",()=>t.shape),e.keyof=()=>e9(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:H0()}),e.loose=()=>e.clone({...e._zod.def,catchall:H0()}),e.strict=()=>e.clone({...e._zod.def,catchall:ZB()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>C3(e,n),e.safeExtend=n=>E3(e,n),e.merge=n=>_3(e,n),e.pick=n=>k3(e,n),e.omit=n=>S3(e,n),e.partial=(...n)=>T3(pE,e,n[0]),e.required=(...n)=>P3(mE,e,n[0])});function _g(e,t){const n={type:"object",shape:e??{},...Me(t)};return new YB(n)}const KB=ce("ZodUnion",(e,t)=>{o6.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>kV(e,n,r,o),e.options=t.options});function GB(e,t){return new KB({type:"union",options:e,...Me(t)})}const XB=ce("ZodIntersection",(e,t)=>{s6.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>SV(e,n,r,o)});function JB(e,t){return new XB({type:"intersection",left:e,right:t})}const Gp=ce("ZodEnum",(e,t)=>{l6.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,o,l)=>yV(e,r,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const l={};for(const a of r)if(n.has(a))l[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Gp({...t,checks:[],...Me(o),entries:l})},e.exclude=(r,o)=>{const l={...t.entries};for(const a of r)if(n.has(a))delete l[a];else throw new Error(`Key ${a} not found in enum`);return new Gp({...t,checks:[],...Me(o),entries:l})}});function e9(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Gp({type:"enum",entries:n,...Me(t)})}const t9=ce("ZodTransform",(e,t)=>{a6.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>xV(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new VC(e.constructor.name);n.addIssue=l=>{if(typeof l=="string")n.issues.push(ga(l,n.value,t));else{const a=l;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),n.issues.push(ga(a))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(l=>(n.value=l,n)):(n.value=o,n)}});function n9(e){return new t9({type:"transform",transform:e})}const pE=ce("ZodOptional",(e,t)=>{iE.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>cE(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function W0(e){return new pE({type:"optional",innerType:e})}const r9=ce("ZodExactOptional",(e,t)=>{u6.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>cE(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function i9(e){return new r9({type:"optional",innerType:e})}const o9=ce("ZodNullable",(e,t)=>{c6.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>CV(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Z0(e){return new o9({type:"nullable",innerType:e})}const s9=ce("ZodDefault",(e,t)=>{d6.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>_V(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function l9(e,t){return new s9({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():WC(t)}})}const a9=ce("ZodPrefault",(e,t)=>{f6.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>TV(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function u9(e,t){return new a9({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():WC(t)}})}const mE=ce("ZodNonOptional",(e,t)=>{h6.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>EV(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function c9(e,t){return new mE({type:"nonoptional",innerType:e,...Me(t)})}const d9=ce("ZodCatch",(e,t)=>{p6.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>PV(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function f9(e,t){return new d9({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const h9=ce("ZodPipe",(e,t)=>{m6.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>NV(e,n,r,o),e.in=t.in,e.out=t.out});function q0(e,t){return new h9({type:"pipe",in:e,out:t})}const p9=ce("ZodReadonly",(e,t)=>{g6.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>RV(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function m9(e){return new p9({type:"readonly",innerType:e})}const g9=ce("ZodCustom",(e,t)=>{y6.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,r,o)=>vV(e,n)});function y9(e,t={}){return aV(g9,e,t)}function v9(e){return uV(e)}const x9=_g({title:Cn().min(1,"Title is required"),description:Cn(),status:Cn(),priority:Eg().min(0).max(5)});function Fn(e,t){return e instanceof Error?e.message:t}function w9({epic:e,open:t,isEditing:n,onClose:r,onUpdate:o}){const[l,a]=b.useState(!1),u=yg({resolver:Cg(x9),values:V0(e),resetOptions:{keepDirtyValues:!1}}),{reset:d,formState:{isSubmitting:f}}=u;return b.useEffect(()=>{a(!1)},[t,n]),{form:u,isSubmitting:f,isDeleting:l,setIsDeleting:a,handleSave:async k=>{if(e)try{return await hp(e.id,{title:k.title.trim(),description:k.description.trim()||null,status:k.status,priority:k.priority}),vt.success("Epic updated"),o(),!0}catch(C){return vt.error(Fn(C,"Failed to update epic")),!1}},handleDelete:async()=>{if(e)try{await rB(e.id),vt.success("Epic deleted"),r(),o()}catch(k){vt.error(Fn(k,"Failed to delete epic"))}},handleCancel:()=>{e&&d(V0(e)),a(!1)},handleStatusChange:async k=>{if(!e)return;const C=u.getValues("status");u.setValue("status",k);try{await hp(e.id,{status:k}),o()}catch(E){u.setValue("status",C),vt.error(Fn(E,"Failed to update status"))}},handlePriorityChange:async k=>{if(!e)return;const C=u.getValues("priority");u.setValue("priority",k);try{await hp(e.id,{priority:k}),o()}catch(E){u.setValue("priority",C),vt.error(Fn(E,"Failed to update priority"))}}}}function b9({epic:e,tasks:t=[],open:n,onClose:r,onUpdate:o,onTaskClick:l}){const[a,u]=b.useState(!1),{form:d,isDeleting:f,setIsDeleting:p,handleSave:h,handleDelete:v,handleCancel:g,handleStatusChange:S,handlePriorityChange:k}=w9({epic:e,open:n,isEditing:a,onClose:r,onUpdate:o}),C=()=>{u(!1),r()};if(!e)return null;const E=Q$(e),_=d.watch("status"),P=d.watch("priority"),R=()=>{g(),u(!1)};return y.jsxs(y.Fragment,{children:[y.jsx(q$,{epic:e,tasks:t,breadcrumbItems:E,status:_,priority:P,open:n&&!a,onClose:C,onEdit:()=>u(!0),onStatusChange:S,onPriorityChange:k,onTaskClick:l}),y.jsx(H$,{form:d,breadcrumbItems:E,open:n&&a,isDeleting:f,onClose:C,onSubmit:h,onCancel:R,onDelete:()=>p(!0),onDeleteConfirm:v,onDeleteCancel:()=>p(!1)})]})}function gE(e,t){return e.find(n=>n.id===t)}function yE(e,t){return e.find(n=>n.id===t)}function k9(e,t){return t?yE(e,t)??null:null}function S9(e,t){return e.filter(n=>n.parentTaskId===t)}function C9(e,t,n){const{onEpicClick:r,onTaskClick:o,task:l}=n,a=[];let u=null;l.epicId&&(u=gE(e,l.epicId)??null);const d=k9(t,l.parentTaskId);let f;r&&u&&(f=()=>r(u));let p;o&&d&&(p=()=>o(d));let h="task";return l.parentTaskId&&(h="subtask"),u&&a.push({id:u.id,title:u.title,type:"epic",onClick:f}),d&&a.push({id:d.id,title:d.title,type:"task",onClick:p}),a.push({id:l.id,title:l.title,type:h}),a}function E9({form:e,epics:t,breadcrumbItems:n,open:r,isDeleting:o,onClose:l,onSubmit:a,onCancel:u,onDelete:d,onDeleteConfirm:f,onDeleteCancel:p}){const{watch:h,setValue:v,handleSubmit:g,formState:{isSubmitting:S,errors:k}}=e,C=h("title"),E=h("description"),_=h("status"),P=h("priority"),R=h("tags"),I=h("epicId"),A=async B=>{await a(B)&&u()},H=B=>{if(B==="none"){v("epicId",null);return}v("epicId",B)};return y.jsx(_S,{open:r,onClose:l,breadcrumbItems:n,formId:"task-edit-form",isSubmitting:S,isDeleting:o,entityName:"Task",onCancel:u,onDelete:d,onDeleteConfirm:f,onDeleteCancel:p,children:y.jsxs("form",{id:"task-edit-form",onSubmit:g(A),className:"space-y-4 p-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Rt,{children:"Title"}),y.jsx(tr,{value:C,onChange:B=>v("title",B.target.value),placeholder:"Task title",className:"text-lg font-semibold"}),k.title&&y.jsx("p",{className:"text-xs text-destructive",children:k.title.message})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Rt,{children:"Description"}),y.jsx(La,{value:E,onChange:B=>v("description",B.target.value),placeholder:"Task description",rows:4})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Rt,{children:"Status"}),y.jsx(Nd,{value:_,onChange:B=>v("status",B),statuses:xd})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Rt,{children:"Priority"}),y.jsx(Pd,{value:P,onChange:B=>v("priority",B)})]})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Rt,{children:"Tags (comma-separated)"}),y.jsx(tr,{value:R,onChange:B=>v("tags",B.target.value),placeholder:"bug, frontend, urgent"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Rt,{children:"Epic"}),y.jsxs(eo,{value:I||"none",onValueChange:H,children:[y.jsx(no,{children:y.jsx(to,{})}),y.jsxs(ro,{children:[y.jsx(Wr,{value:"none",children:"No Epic"}),t.map(B=>y.jsxs(Wr,{value:B.id,children:[B.id,": ",B.title]},B.id))]})]})]})]})})}function _9({author:e,content:t,isSubmitting:n,onAuthorChange:r,onContentChange:o,onSubmit:l}){const a=n||!e.trim()||!t.trim();return y.jsxs("div",{className:"space-y-2",children:[y.jsx(tr,{placeholder:"Your name",value:e,onChange:u=>r(u.target.value)}),y.jsx(La,{placeholder:"Add a comment...",value:t,onChange:u=>o(u.target.value),rows:2}),y.jsx(nt,{size:"sm",type:"button",onClick:l,disabled:a,loading:n,loadingText:"Adding Comment",children:"Add Comment"})]})}function T9({comments:e,loading:t,onDelete:n}){return t?y.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."}):e.length===0?null:y.jsx("div",{className:"mb-4 space-y-3",children:e.map(r=>y.jsxs("div",{className:"group relative bg-muted/50 p-3",children:[y.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"text-sm font-medium",children:r.author}),y.jsx("span",{className:"text-xs text-muted-foreground",children:za(r.createdAt)})]}),y.jsx(nt,{variant:"ghost",size:"icon",className:"h-7 w-7 opacity-0 transition-opacity group-hover:opacity-100",onClick:()=>n(r.id),children:y.jsx(mk,{className:"h-3.5 w-3.5"})})]}),y.jsx("p",{className:"whitespace-pre-wrap text-sm text-muted-foreground",children:r.content})]},r.id))})}const Q0="trekker-comment-author";async function P9(e){const t=await fetch(`/api/tasks/${e}/comments`);if(!t.ok)throw new Error("Failed to fetch comments");return t.json()}function N9(e){const[t,n]=b.useState(""),[r,o]=b.useState([]),[l,a]=b.useState(""),[u,d]=b.useState(!0),[f,p]=b.useState(!1);b.useEffect(()=>{const g=localStorage.getItem(Q0);g&&n(g)},[]),b.useEffect(()=>{let g=!1;async function S(){d(!0);try{const k=await P9(e);g||o(k)}catch(k){console.error("Failed to fetch comments:",k)}finally{g||d(!1)}}return S(),()=>{g=!0}},[e]);async function h(){if(!t.trim()||!l.trim()){vt.error("Author and content are required");return}p(!0);try{localStorage.setItem(Q0,t);const g=await fetch(`/api/tasks/${e}/comments`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({author:t,content:l})});if(!g.ok){const k=await g.json();throw new Error(k.error??"Failed to add comment")}const S=await g.json();o(k=>[...k,S]),a(""),vt.success("Comment added")}catch(g){vt.error(Fn(g,"Failed to add comment"))}finally{p(!1)}}async function v(g){try{if(!(await fetch(`/api/comments/${g}`,{method:"DELETE"})).ok)throw new Error("Failed to delete comment");o(k=>k.filter(C=>C.id!==g)),vt.success("Comment deleted")}catch{vt.error("Failed to delete comment")}}return{author:t,comments:r,content:l,deleteComment:v,isSubmitting:f,loading:u,setAuthor:n,setContent:a,submitComment:h}}function R9({taskId:e}){const{author:t,comments:n,content:r,deleteComment:o,isSubmitting:l,loading:a,setAuthor:u,setContent:d,submitComment:f}=N9(e);return y.jsxs("div",{className:"p-4 mt-4 border-t",children:[y.jsxs("h4",{className:"text-sm font-medium mb-3",children:["Comments ",n.length>0&&`(${n.length})`]}),y.jsx(T9,{comments:n,loading:a,onDelete:o}),y.jsx(_9,{author:t,content:r,isSubmitting:l,onAuthorChange:u,onContentChange:d,onSubmit:()=>{f()}})]})}function vE({changes:e,compact:t=!1}){if(!e||Object.keys(e).length===0)return null;let n="space-y-1 text-xs";return t&&(n="space-y-0.5 text-xs"),y.jsx("div",{className:n,children:Object.entries(e).map(([r,o])=>y.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[y.jsxs("span",{className:"font-medium",children:[r,":"]}),y.jsx("span",{className:"line-through",children:String(o.from)}),y.jsx("span",{children:"→"}),y.jsx("span",{className:"text-foreground",children:String(o.to)})]},r))})}function j9({action:e,changes:t,showCreatedMessage:n,timestamp:r}){return y.jsxs("div",{className:"flex gap-2.5 border-b py-2.5 last:border-b-0",children:[y.jsx("div",{className:"mt-0.5",children:y.jsx(jk,{action:e,className:"h-3.5 w-3.5"})}),y.jsxs("div",{className:"min-w-0 flex-1",children:[y.jsxs("div",{className:"mb-0.5 flex items-center gap-2",children:[y.jsxs("span",{className:Ve("text-xs font-medium capitalize",Ak(e)),children:[e,"d"]}),y.jsx("span",{className:"text-xs text-muted-foreground",children:za(r)})]}),y.jsx(vE,{changes:t,compact:!0}),n&&y.jsx("p",{className:"text-xs text-muted-foreground",children:"Task created"})]})]})}function A9({event:e}){return y.jsx(j9,{action:e.action,changes:e.changes,showCreatedMessage:e.action==="create"&&!!e.snapshot,timestamp:e.timestamp})}var al=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},I9={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Vi,ym,Sb,O9=(Sb=class{constructor(){ze(this,Vi,I9);ze(this,ym,!1)}setTimeoutProvider(e){Ee(this,Vi,e)}setTimeout(e,t){return F(this,Vi).setTimeout(e,t)}clearTimeout(e){F(this,Vi).clearTimeout(e)}setInterval(e,t){return F(this,Vi).setInterval(e,t)}clearInterval(e){F(this,Vi).clearInterval(e)}},Vi=new WeakMap,ym=new WeakMap,Sb),Po=new O9;function D9(e){setTimeout(e,0)}var Zo=typeof window>"u"||"Deno"in globalThis;function bn(){}function z9(e,t){return typeof e=="function"?e(t):e}function Xp(e){return typeof e=="number"&&e>=0&&e!==1/0}function xE(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ki(e,t){return typeof e=="function"?e(t):e}function ur(e,t){return typeof e=="function"?e(t):e}function Y0(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:l,queryKey:a,stale:u}=e;if(a){if(r){if(t.queryHash!==Tg(a,t.options))return!1}else if(!ya(t.queryKey,a))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||o&&o!==t.state.fetchStatus||l&&!l(t))}function K0(e,t){const{exact:n,status:r,predicate:o,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(n){if(qo(t.options.mutationKey)!==qo(l))return!1}else if(!ya(t.options.mutationKey,l))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Tg(e,t){return((t==null?void 0:t.queryKeyHashFn)||qo)(e)}function qo(e){return JSON.stringify(e,(t,n)=>Jp(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function ya(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>ya(e[n],t[n])):!1}var M9=Object.prototype.hasOwnProperty;function wE(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=G0(e)&&G0(t);if(!r&&!(Jp(e)&&Jp(t)))return t;const l=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),u=a.length,d=r?new Array(u):{};let f=0;for(let p=0;p<u;p++){const h=r?p:a[p],v=e[h],g=t[h];if(v===g){d[h]=v,(r?p<l:M9.call(e,h))&&f++;continue}if(v===null||g===null||typeof v!="object"||typeof g!="object"){d[h]=g;continue}const S=wE(v,g,n+1);d[h]=S,S===v&&f++}return l===u&&f===l?e:d}function Gc(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function G0(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Jp(e){if(!X0(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!X0(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function X0(e){return Object.prototype.toString.call(e)==="[object Object]"}function L9(e){return new Promise(t=>{Po.setTimeout(t,e)})}function em(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?wE(e,t):t}function F9(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function $9(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Pg=Symbol();function bE(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Pg?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Ng(e,t){return typeof e=="function"?e(...t):!!e}function V9(e,t,n){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var No,Bi,Is,Cb,B9=(Cb=class extends al{constructor(){super();ze(this,No);ze(this,Bi);ze(this,Is);Ee(this,Is,t=>{if(!Zo&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){F(this,Bi)||this.setEventListener(F(this,Is))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,Bi))==null||t.call(this),Ee(this,Bi,void 0))}setEventListener(t){var n;Ee(this,Is,t),(n=F(this,Bi))==null||n.call(this),Ee(this,Bi,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){F(this,No)!==t&&(Ee(this,No,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof F(this,No)=="boolean"?F(this,No):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},No=new WeakMap,Bi=new WeakMap,Is=new WeakMap,Cb),Rg=new B9;function tm(){let e,t;const n=new Promise((o,l)=>{e=o,t=l});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}var U9=D9;function H9(){let e=[],t=0,n=u=>{u()},r=u=>{u()},o=U9;const l=u=>{t?e.push(u):o(()=>{n(u)})},a=()=>{const u=e;e=[],u.length&&o(()=>{r(()=>{u.forEach(d=>{n(d)})})})};return{batch:u=>{let d;t++;try{d=u()}finally{t--,t||a()}return d},batchCalls:u=>(...d)=>{l(()=>{u(...d)})},schedule:l,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{o=u}}}var Wt=H9(),Os,Ui,Ds,Eb,W9=(Eb=class extends al{constructor(){super();ze(this,Os,!0);ze(this,Ui);ze(this,Ds);Ee(this,Ds,t=>{if(!Zo&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){F(this,Ui)||this.setEventListener(F(this,Ds))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,Ui))==null||t.call(this),Ee(this,Ui,void 0))}setEventListener(t){var n;Ee(this,Ds,t),(n=F(this,Ui))==null||n.call(this),Ee(this,Ui,t(this.setOnline.bind(this)))}setOnline(t){F(this,Os)!==t&&(Ee(this,Os,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return F(this,Os)}},Os=new WeakMap,Ui=new WeakMap,Ds=new WeakMap,Eb),Xc=new W9;function Z9(e){return Math.min(1e3*2**e,3e4)}function kE(e){return(e??"online")==="online"?Xc.isOnline():!0}var nm=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function SE(e){let t=!1,n=0,r;const o=tm(),l=()=>o.status!=="pending",a=k=>{var C;if(!l()){const E=new nm(k);v(E),(C=e.onCancel)==null||C.call(e,E)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>Rg.isFocused()&&(e.networkMode==="always"||Xc.isOnline())&&e.canRun(),p=()=>kE(e.networkMode)&&e.canRun(),h=k=>{l()||(r==null||r(),o.resolve(k))},v=k=>{l()||(r==null||r(),o.reject(k))},g=()=>new Promise(k=>{var C;r=E=>{(l()||f())&&k(E)},(C=e.onPause)==null||C.call(e)}).then(()=>{var k;r=void 0,l()||(k=e.onContinue)==null||k.call(e)}),S=()=>{if(l())return;let k;const C=n===0?e.initialPromise:void 0;try{k=C??e.fn()}catch(E){k=Promise.reject(E)}Promise.resolve(k).then(h).catch(E=>{var A;if(l())return;const _=e.retry??(Zo?0:3),P=e.retryDelay??Z9,R=typeof P=="function"?P(n,E):P,I=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,E);if(t||!I){v(E);return}n++,(A=e.onFail)==null||A.call(e,n,E),L9(R).then(()=>f()?void 0:g()).then(()=>{t?v(E):S()})})};return{promise:o,status:()=>o.status,cancel:a,continue:()=>(r==null||r(),o),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?S():g().then(S),o)}}var Ro,_b,CE=(_b=class{constructor(){ze(this,Ro)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Xp(this.gcTime)&&Ee(this,Ro,Po.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Zo?1/0:5*60*1e3))}clearGcTimeout(){F(this,Ro)&&(Po.clearTimeout(F(this,Ro)),Ee(this,Ro,void 0))}},Ro=new WeakMap,_b),jo,zs,ar,Ao,Gt,ka,Io,kr,si,Tb,q9=(Tb=class extends CE{constructor(t){super();ze(this,kr);ze(this,jo);ze(this,zs);ze(this,ar);ze(this,Ao);ze(this,Gt);ze(this,ka);ze(this,Io);Ee(this,Io,!1),Ee(this,ka,t.defaultOptions),this.setOptions(t.options),this.observers=[],Ee(this,Ao,t.client),Ee(this,ar,F(this,Ao).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Ee(this,jo,eb(this.options)),this.state=t.state??F(this,jo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=F(this,Gt))==null?void 0:t.promise}setOptions(t){if(this.options={...F(this,ka),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=eb(this.options);n.data!==void 0&&(this.setState(J0(n.data,n.dataUpdatedAt)),Ee(this,jo,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&F(this,ar).remove(this)}setData(t,n){const r=em(this.state.data,t,this.options);return Ze(this,kr,si).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Ze(this,kr,si).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=F(this,Gt))==null?void 0:r.promise;return(o=F(this,Gt))==null||o.cancel(t),n?n.then(bn).catch(bn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(F(this,jo))}isActive(){return this.observers.some(t=>ur(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Pg||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ki(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!xE(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=F(this,Gt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=F(this,Gt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),F(this,ar).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(F(this,Gt)&&(F(this,Io)?F(this,Gt).cancel({revert:!0}):F(this,Gt).cancelRetry()),this.scheduleGc()),F(this,ar).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ze(this,kr,si).call(this,{type:"invalidate"})}async fetch(t,n){var d,f,p,h,v,g,S,k,C,E,_,P;if(this.state.fetchStatus!=="idle"&&((d=F(this,Gt))==null?void 0:d.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(F(this,Gt))return F(this,Gt).continueRetry(),F(this,Gt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const R=this.observers.find(I=>I.options.queryFn);R&&this.setOptions(R.options)}const r=new AbortController,o=R=>{Object.defineProperty(R,"signal",{enumerable:!0,get:()=>(Ee(this,Io,!0),r.signal)})},l=()=>{const R=bE(this.options,n),A=(()=>{const H={client:F(this,Ao),queryKey:this.queryKey,meta:this.meta};return o(H),H})();return Ee(this,Io,!1),this.options.persister?this.options.persister(R,A,this):R(A)},u=(()=>{const R={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:F(this,Ao),state:this.state,fetchFn:l};return o(R),R})();(f=this.options.behavior)==null||f.onFetch(u,this),Ee(this,zs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=u.fetchOptions)==null?void 0:p.meta))&&Ze(this,kr,si).call(this,{type:"fetch",meta:(h=u.fetchOptions)==null?void 0:h.meta}),Ee(this,Gt,SE({initialPromise:n==null?void 0:n.initialPromise,fn:u.fetchFn,onCancel:R=>{R instanceof nm&&R.revert&&this.setState({...F(this,zs),fetchStatus:"idle"}),r.abort()},onFail:(R,I)=>{Ze(this,kr,si).call(this,{type:"failed",failureCount:R,error:I})},onPause:()=>{Ze(this,kr,si).call(this,{type:"pause"})},onContinue:()=>{Ze(this,kr,si).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const R=await F(this,Gt).start();if(R===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(R),(g=(v=F(this,ar).config).onSuccess)==null||g.call(v,R,this),(k=(S=F(this,ar).config).onSettled)==null||k.call(S,R,this.state.error,this),R}catch(R){if(R instanceof nm){if(R.silent)return F(this,Gt).promise;if(R.revert){if(this.state.data===void 0)throw R;return this.state.data}}throw Ze(this,kr,si).call(this,{type:"error",error:R}),(E=(C=F(this,ar).config).onError)==null||E.call(C,R,this),(P=(_=F(this,ar).config).onSettled)==null||P.call(_,this.state.data,R,this),R}finally{this.scheduleGc()}}},jo=new WeakMap,zs=new WeakMap,ar=new WeakMap,Ao=new WeakMap,Gt=new WeakMap,ka=new WeakMap,Io=new WeakMap,kr=new WeakSet,si=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...EE(r.data,this.options),fetchMeta:t.meta??null};case"success":const o={...r,...J0(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ee(this,zs,t.manual?o:void 0),o;case"error":const l=t.error;return{...r,error:l,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Wt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),F(this,ar).notify({query:this,type:"updated",action:t})})},Tb);function EE(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:kE(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function J0(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function eb(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Dn,Xe,Sa,vn,Oo,Ms,li,Hi,Ca,Ls,Fs,Do,zo,Wi,$s,st,na,rm,im,om,sm,lm,am,um,_E,Pb,Q9=(Pb=class extends al{constructor(t,n){super();ze(this,st);ze(this,Dn);ze(this,Xe);ze(this,Sa);ze(this,vn);ze(this,Oo);ze(this,Ms);ze(this,li);ze(this,Hi);ze(this,Ca);ze(this,Ls);ze(this,Fs);ze(this,Do);ze(this,zo);ze(this,Wi);ze(this,$s,new Set);this.options=n,Ee(this,Dn,t),Ee(this,Hi,null),Ee(this,li,tm()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(F(this,Xe).addObserver(this),tb(F(this,Xe),this.options)?Ze(this,st,na).call(this):this.updateResult(),Ze(this,st,sm).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return cm(F(this,Xe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return cm(F(this,Xe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ze(this,st,lm).call(this),Ze(this,st,am).call(this),F(this,Xe).removeObserver(this)}setOptions(t){const n=this.options,r=F(this,Xe);if(this.options=F(this,Dn).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ur(this.options.enabled,F(this,Xe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ze(this,st,um).call(this),F(this,Xe).setOptions(this.options),n._defaulted&&!Gc(this.options,n)&&F(this,Dn).getQueryCache().notify({type:"observerOptionsUpdated",query:F(this,Xe),observer:this});const o=this.hasListeners();o&&nb(F(this,Xe),r,this.options,n)&&Ze(this,st,na).call(this),this.updateResult(),o&&(F(this,Xe)!==r||ur(this.options.enabled,F(this,Xe))!==ur(n.enabled,F(this,Xe))||Ki(this.options.staleTime,F(this,Xe))!==Ki(n.staleTime,F(this,Xe)))&&Ze(this,st,rm).call(this);const l=Ze(this,st,im).call(this);o&&(F(this,Xe)!==r||ur(this.options.enabled,F(this,Xe))!==ur(n.enabled,F(this,Xe))||l!==F(this,Wi))&&Ze(this,st,om).call(this,l)}getOptimisticResult(t){const n=F(this,Dn).getQueryCache().build(F(this,Dn),t),r=this.createResult(n,t);return K9(this,r)&&(Ee(this,vn,r),Ee(this,Ms,this.options),Ee(this,Oo,F(this,Xe).state)),r}getCurrentResult(){return F(this,vn)}trackResult(t,n){return new Proxy(t,{get:(r,o)=>(this.trackProp(o),n==null||n(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&F(this,li).status==="pending"&&F(this,li).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,o))})}trackProp(t){F(this,$s).add(t)}getCurrentQuery(){return F(this,Xe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=F(this,Dn).defaultQueryOptions(t),r=F(this,Dn).getQueryCache().build(F(this,Dn),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Ze(this,st,na).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),F(this,vn)))}createResult(t,n){var ne;const r=F(this,Xe),o=this.options,l=F(this,vn),a=F(this,Oo),u=F(this,Ms),f=t!==r?t.state:F(this,Sa),{state:p}=t;let h={...p},v=!1,g;if(n._optimisticResults){const O=this.hasListeners(),Y=!O&&tb(t,n),G=O&&nb(t,r,n,o);(Y||G)&&(h={...h,...EE(p.data,t.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:S,errorUpdatedAt:k,status:C}=h;g=h.data;let E=!1;if(n.placeholderData!==void 0&&g===void 0&&C==="pending"){let O;l!=null&&l.isPlaceholderData&&n.placeholderData===(u==null?void 0:u.placeholderData)?(O=l.data,E=!0):O=typeof n.placeholderData=="function"?n.placeholderData((ne=F(this,Fs))==null?void 0:ne.state.data,F(this,Fs)):n.placeholderData,O!==void 0&&(C="success",g=em(l==null?void 0:l.data,O,n),v=!0)}if(n.select&&g!==void 0&&!E)if(l&&g===(a==null?void 0:a.data)&&n.select===F(this,Ca))g=F(this,Ls);else try{Ee(this,Ca,n.select),g=n.select(g),g=em(l==null?void 0:l.data,g,n),Ee(this,Ls,g),Ee(this,Hi,null)}catch(O){Ee(this,Hi,O)}F(this,Hi)&&(S=F(this,Hi),g=F(this,Ls),k=Date.now(),C="error");const _=h.fetchStatus==="fetching",P=C==="pending",R=C==="error",I=P&&_,A=g!==void 0,B={status:C,fetchStatus:h.fetchStatus,isPending:P,isSuccess:C==="success",isError:R,isInitialLoading:I,isLoading:I,data:g,dataUpdatedAt:h.dataUpdatedAt,error:S,errorUpdatedAt:k,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>f.dataUpdateCount||h.errorUpdateCount>f.errorUpdateCount,isFetching:_,isRefetching:_&&!P,isLoadingError:R&&!A,isPaused:h.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:R&&A,isStale:jg(t,n),refetch:this.refetch,promise:F(this,li),isEnabled:ur(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const O=B.data!==void 0,Y=B.status==="error"&&!O,G=U=>{Y?U.reject(B.error):O&&U.resolve(B.data)},ae=()=>{const U=Ee(this,li,B.promise=tm());G(U)},q=F(this,li);switch(q.status){case"pending":t.queryHash===r.queryHash&&G(q);break;case"fulfilled":(Y||B.data!==q.value)&&ae();break;case"rejected":(!Y||B.error!==q.reason)&&ae();break}}return B}updateResult(){const t=F(this,vn),n=this.createResult(F(this,Xe),this.options);if(Ee(this,Oo,F(this,Xe).state),Ee(this,Ms,this.options),F(this,Oo).data!==void 0&&Ee(this,Fs,F(this,Xe)),Gc(n,t))return;Ee(this,vn,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,l=typeof o=="function"?o():o;if(l==="all"||!l&&!F(this,$s).size)return!0;const a=new Set(l??F(this,$s));return this.options.throwOnError&&a.add("error"),Object.keys(F(this,vn)).some(u=>{const d=u;return F(this,vn)[d]!==t[d]&&a.has(d)})};Ze(this,st,_E).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ze(this,st,sm).call(this)}},Dn=new WeakMap,Xe=new WeakMap,Sa=new WeakMap,vn=new WeakMap,Oo=new WeakMap,Ms=new WeakMap,li=new WeakMap,Hi=new WeakMap,Ca=new WeakMap,Ls=new WeakMap,Fs=new WeakMap,Do=new WeakMap,zo=new WeakMap,Wi=new WeakMap,$s=new WeakMap,st=new WeakSet,na=function(t){Ze(this,st,um).call(this);let n=F(this,Xe).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(bn)),n},rm=function(){Ze(this,st,lm).call(this);const t=Ki(this.options.staleTime,F(this,Xe));if(Zo||F(this,vn).isStale||!Xp(t))return;const r=xE(F(this,vn).dataUpdatedAt,t)+1;Ee(this,Do,Po.setTimeout(()=>{F(this,vn).isStale||this.updateResult()},r))},im=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(F(this,Xe)):this.options.refetchInterval)??!1},om=function(t){Ze(this,st,am).call(this),Ee(this,Wi,t),!(Zo||ur(this.options.enabled,F(this,Xe))===!1||!Xp(F(this,Wi))||F(this,Wi)===0)&&Ee(this,zo,Po.setInterval(()=>{(this.options.refetchIntervalInBackground||Rg.isFocused())&&Ze(this,st,na).call(this)},F(this,Wi)))},sm=function(){Ze(this,st,rm).call(this),Ze(this,st,om).call(this,Ze(this,st,im).call(this))},lm=function(){F(this,Do)&&(Po.clearTimeout(F(this,Do)),Ee(this,Do,void 0))},am=function(){F(this,zo)&&(Po.clearInterval(F(this,zo)),Ee(this,zo,void 0))},um=function(){const t=F(this,Dn).getQueryCache().build(F(this,Dn),this.options);if(t===F(this,Xe))return;const n=F(this,Xe);Ee(this,Xe,t),Ee(this,Sa,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},_E=function(t){Wt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(F(this,vn))}),F(this,Dn).getQueryCache().notify({query:F(this,Xe),type:"observerResultsUpdated"})})},Pb);function Y9(e,t){return ur(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function tb(e,t){return Y9(e,t)||e.state.data!==void 0&&cm(e,t,t.refetchOnMount)}function cm(e,t,n){if(ur(t.enabled,e)!==!1&&Ki(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&jg(e,t)}return!1}function nb(e,t,n,r){return(e!==t||ur(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&jg(e,n)}function jg(e,t){return ur(t.enabled,e)!==!1&&e.isStaleByTime(Ki(t.staleTime,e))}function K9(e,t){return!Gc(e.getCurrentResult(),t)}function rb(e){return{onFetch:(t,n)=>{var p,h,v,g,S;const r=t.options,o=(v=(h=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:h.fetchMore)==null?void 0:v.direction,l=((g=t.state.data)==null?void 0:g.pages)||[],a=((S=t.state.data)==null?void 0:S.pageParams)||[];let u={pages:[],pageParams:[]},d=0;const f=async()=>{let k=!1;const C=P=>{V9(P,()=>t.signal,()=>k=!0)},E=bE(t.options,t.fetchOptions),_=async(P,R,I)=>{if(k)return Promise.reject();if(R==null&&P.pages.length)return Promise.resolve(P);const H=(()=>{const Y={client:t.client,queryKey:t.queryKey,pageParam:R,direction:I?"backward":"forward",meta:t.options.meta};return C(Y),Y})(),B=await E(H),{maxPages:ne}=t.options,O=I?$9:F9;return{pages:O(P.pages,B,ne),pageParams:O(P.pageParams,R,ne)}};if(o&&l.length){const P=o==="backward",R=P?G9:ib,I={pages:l,pageParams:a},A=R(r,I);u=await _(I,A,P)}else{const P=e??l.length;do{const R=d===0?a[0]??r.initialPageParam:ib(r,u);if(d>0&&R==null)break;u=await _(u,R),d++}while(d<P)}return u};t.options.persister?t.fetchFn=()=>{var k,C;return(C=(k=t.options).persister)==null?void 0:C.call(k,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=f}}}function ib(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function G9(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Ea,Lr,xn,Mo,Fr,$i,Nb,X9=(Nb=class extends CE{constructor(t){super();ze(this,Fr);ze(this,Ea);ze(this,Lr);ze(this,xn);ze(this,Mo);Ee(this,Ea,t.client),this.mutationId=t.mutationId,Ee(this,xn,t.mutationCache),Ee(this,Lr,[]),this.state=t.state||TE(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){F(this,Lr).includes(t)||(F(this,Lr).push(t),this.clearGcTimeout(),F(this,xn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Ee(this,Lr,F(this,Lr).filter(n=>n!==t)),this.scheduleGc(),F(this,xn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){F(this,Lr).length||(this.state.status==="pending"?this.scheduleGc():F(this,xn).remove(this))}continue(){var t;return((t=F(this,Mo))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,u,d,f,p,h,v,g,S,k,C,E,_,P,R,I,A,H,B,ne;const n=()=>{Ze(this,Fr,$i).call(this,{type:"continue"})},r={client:F(this,Ea),meta:this.options.meta,mutationKey:this.options.mutationKey};Ee(this,Mo,SE({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(O,Y)=>{Ze(this,Fr,$i).call(this,{type:"failed",failureCount:O,error:Y})},onPause:()=>{Ze(this,Fr,$i).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>F(this,xn).canRun(this)}));const o=this.state.status==="pending",l=!F(this,Mo).canStart();try{if(o)n();else{Ze(this,Fr,$i).call(this,{type:"pending",variables:t,isPaused:l}),await((u=(a=F(this,xn).config).onMutate)==null?void 0:u.call(a,t,this,r));const Y=await((f=(d=this.options).onMutate)==null?void 0:f.call(d,t,r));Y!==this.state.context&&Ze(this,Fr,$i).call(this,{type:"pending",context:Y,variables:t,isPaused:l})}const O=await F(this,Mo).start();return await((h=(p=F(this,xn).config).onSuccess)==null?void 0:h.call(p,O,t,this.state.context,this,r)),await((g=(v=this.options).onSuccess)==null?void 0:g.call(v,O,t,this.state.context,r)),await((k=(S=F(this,xn).config).onSettled)==null?void 0:k.call(S,O,null,this.state.variables,this.state.context,this,r)),await((E=(C=this.options).onSettled)==null?void 0:E.call(C,O,null,t,this.state.context,r)),Ze(this,Fr,$i).call(this,{type:"success",data:O}),O}catch(O){try{await((P=(_=F(this,xn).config).onError)==null?void 0:P.call(_,O,t,this.state.context,this,r))}catch(Y){Promise.reject(Y)}try{await((I=(R=this.options).onError)==null?void 0:I.call(R,O,t,this.state.context,r))}catch(Y){Promise.reject(Y)}try{await((H=(A=F(this,xn).config).onSettled)==null?void 0:H.call(A,void 0,O,this.state.variables,this.state.context,this,r))}catch(Y){Promise.reject(Y)}try{await((ne=(B=this.options).onSettled)==null?void 0:ne.call(B,void 0,O,t,this.state.context,r))}catch(Y){Promise.reject(Y)}throw Ze(this,Fr,$i).call(this,{type:"error",error:O}),O}finally{F(this,xn).runNext(this)}}},Ea=new WeakMap,Lr=new WeakMap,xn=new WeakMap,Mo=new WeakMap,Fr=new WeakSet,$i=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Wt.batch(()=>{F(this,Lr).forEach(r=>{r.onMutationUpdate(t)}),F(this,xn).notify({mutation:this,type:"updated",action:t})})},Nb);function TE(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ai,Sr,_a,Rb,J9=(Rb=class extends al{constructor(t={}){super();ze(this,ai);ze(this,Sr);ze(this,_a);this.config=t,Ee(this,ai,new Set),Ee(this,Sr,new Map),Ee(this,_a,0)}build(t,n,r){const o=new X9({client:t,mutationCache:this,mutationId:++Gu(this,_a)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){F(this,ai).add(t);const n=yc(t);if(typeof n=="string"){const r=F(this,Sr).get(n);r?r.push(t):F(this,Sr).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(F(this,ai).delete(t)){const n=yc(t);if(typeof n=="string"){const r=F(this,Sr).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&F(this,Sr).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=yc(t);if(typeof n=="string"){const r=F(this,Sr).get(n),o=r==null?void 0:r.find(l=>l.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=yc(t);if(typeof n=="string"){const o=(r=F(this,Sr).get(n))==null?void 0:r.find(l=>l!==t&&l.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Wt.batch(()=>{F(this,ai).forEach(t=>{this.notify({type:"removed",mutation:t})}),F(this,ai).clear(),F(this,Sr).clear()})}getAll(){return Array.from(F(this,ai))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>K0(n,r))}findAll(t={}){return this.getAll().filter(n=>K0(t,n))}notify(t){Wt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Wt.batch(()=>Promise.all(t.map(n=>n.continue().catch(bn))))}},ai=new WeakMap,Sr=new WeakMap,_a=new WeakMap,Rb);function yc(e){var t;return(t=e.options.scope)==null?void 0:t.id}var ui,Zi,zn,ci,fi,_c,dm,jb,eU=(jb=class extends al{constructor(n,r){super();ze(this,fi);ze(this,ui);ze(this,Zi);ze(this,zn);ze(this,ci);Ee(this,ui,n),this.setOptions(r),this.bindMethods(),Ze(this,fi,_c).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=F(this,ui).defaultMutationOptions(n),Gc(this.options,r)||F(this,ui).getMutationCache().notify({type:"observerOptionsUpdated",mutation:F(this,zn),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&qo(r.mutationKey)!==qo(this.options.mutationKey)?this.reset():((o=F(this,zn))==null?void 0:o.state.status)==="pending"&&F(this,zn).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=F(this,zn))==null||n.removeObserver(this)}onMutationUpdate(n){Ze(this,fi,_c).call(this),Ze(this,fi,dm).call(this,n)}getCurrentResult(){return F(this,Zi)}reset(){var n;(n=F(this,zn))==null||n.removeObserver(this),Ee(this,zn,void 0),Ze(this,fi,_c).call(this),Ze(this,fi,dm).call(this)}mutate(n,r){var o;return Ee(this,ci,r),(o=F(this,zn))==null||o.removeObserver(this),Ee(this,zn,F(this,ui).getMutationCache().build(F(this,ui),this.options)),F(this,zn).addObserver(this),F(this,zn).execute(n)}},ui=new WeakMap,Zi=new WeakMap,zn=new WeakMap,ci=new WeakMap,fi=new WeakSet,_c=function(){var r;const n=((r=F(this,zn))==null?void 0:r.state)??TE();Ee(this,Zi,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},dm=function(n){Wt.batch(()=>{var r,o,l,a,u,d,f,p;if(F(this,ci)&&this.hasListeners()){const h=F(this,Zi).variables,v=F(this,Zi).context,g={client:F(this,ui),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(o=(r=F(this,ci)).onSuccess)==null||o.call(r,n.data,h,v,g)}catch(S){Promise.reject(S)}try{(a=(l=F(this,ci)).onSettled)==null||a.call(l,n.data,null,h,v,g)}catch(S){Promise.reject(S)}}else if((n==null?void 0:n.type)==="error"){try{(d=(u=F(this,ci)).onError)==null||d.call(u,n.error,h,v,g)}catch(S){Promise.reject(S)}try{(p=(f=F(this,ci)).onSettled)==null||p.call(f,void 0,n.error,h,v,g)}catch(S){Promise.reject(S)}}}this.listeners.forEach(h=>{h(F(this,Zi))})})},jb),$r,Ab,tU=(Ab=class extends al{constructor(t={}){super();ze(this,$r);this.config=t,Ee(this,$r,new Map)}build(t,n,r){const o=n.queryKey,l=n.queryHash??Tg(o,n);let a=this.get(l);return a||(a=new q9({client:t,queryKey:o,queryHash:l,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){F(this,$r).has(t.queryHash)||(F(this,$r).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=F(this,$r).get(t.queryHash);n&&(t.destroy(),n===t&&F(this,$r).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Wt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return F(this,$r).get(t)}getAll(){return[...F(this,$r).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Y0(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Y0(t,r)):n}notify(t){Wt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Wt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Wt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},$r=new WeakMap,Ab),Nt,qi,Qi,Vs,Bs,Yi,Us,Hs,Ib,nU=(Ib=class{constructor(e={}){ze(this,Nt);ze(this,qi);ze(this,Qi);ze(this,Vs);ze(this,Bs);ze(this,Yi);ze(this,Us);ze(this,Hs);Ee(this,Nt,e.queryCache||new tU),Ee(this,qi,e.mutationCache||new J9),Ee(this,Qi,e.defaultOptions||{}),Ee(this,Vs,new Map),Ee(this,Bs,new Map),Ee(this,Yi,0)}mount(){Gu(this,Yi)._++,F(this,Yi)===1&&(Ee(this,Us,Rg.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,Nt).onFocus())})),Ee(this,Hs,Xc.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,Nt).onOnline())})))}unmount(){var e,t;Gu(this,Yi)._--,F(this,Yi)===0&&((e=F(this,Us))==null||e.call(this),Ee(this,Us,void 0),(t=F(this,Hs))==null||t.call(this),Ee(this,Hs,void 0))}isFetching(e){return F(this,Nt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return F(this,qi).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=F(this,Nt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=F(this,Nt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ki(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return F(this,Nt).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=F(this,Nt).get(r.queryHash),l=o==null?void 0:o.state.data,a=z9(t,l);if(a!==void 0)return F(this,Nt).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Wt.batch(()=>F(this,Nt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=F(this,Nt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=F(this,Nt);Wt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=F(this,Nt);return Wt.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Wt.batch(()=>F(this,Nt).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(bn).catch(bn)}invalidateQueries(e,t={}){return Wt.batch(()=>(F(this,Nt).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Wt.batch(()=>F(this,Nt).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let l=o.fetch(void 0,n);return n.throwOnError||(l=l.catch(bn)),o.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(r).then(bn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=F(this,Nt).build(this,t);return n.isStaleByTime(Ki(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(bn).catch(bn)}fetchInfiniteQuery(e){return e.behavior=rb(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(bn).catch(bn)}ensureInfiniteQueryData(e){return e.behavior=rb(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Xc.isOnline()?F(this,qi).resumePausedMutations():Promise.resolve()}getQueryCache(){return F(this,Nt)}getMutationCache(){return F(this,qi)}getDefaultOptions(){return F(this,Qi)}setDefaultOptions(e){Ee(this,Qi,e)}setQueryDefaults(e,t){F(this,Vs).set(qo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...F(this,Vs).values()],n={};return t.forEach(r=>{ya(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){F(this,Bs).set(qo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...F(this,Bs).values()],n={};return t.forEach(r=>{ya(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...F(this,Qi).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Tg(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Pg&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...F(this,Qi).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){F(this,Nt).clear(),F(this,qi).clear()}},Nt=new WeakMap,qi=new WeakMap,Qi=new WeakMap,Vs=new WeakMap,Bs=new WeakMap,Yi=new WeakMap,Us=new WeakMap,Hs=new WeakMap,Ib),PE=b.createContext(void 0),$a=e=>{const t=b.useContext(PE);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},rU=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),y.jsx(PE.Provider,{value:e,children:t})),NE=b.createContext(!1),iU=()=>b.useContext(NE);NE.Provider;function oU(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var sU=b.createContext(oU()),lU=()=>b.useContext(sU),aU=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?Ng(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},uU=e=>{b.useEffect(()=>{e.clearReset()},[e])},cU=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Ng(n,[e.error,r])),dU=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>n(r(...o)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},fU=(e,t)=>e.isLoading&&e.isFetching&&!t,hU=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,ob=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function pU(e,t,n){var v,g,S,k;const r=iU(),o=lU(),l=$a(),a=l.defaultQueryOptions(e);(g=(v=l.getDefaultOptions().queries)==null?void 0:v._experimental_beforeQuery)==null||g.call(v,a);const u=l.getQueryCache().get(a.queryHash);a._optimisticResults=r?"isRestoring":"optimistic",dU(a),aU(a,o,u),uU(o);const d=!l.getQueryCache().get(a.queryHash),[f]=b.useState(()=>new t(l,a)),p=f.getOptimisticResult(a),h=!r&&e.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(C=>{const E=h?f.subscribe(Wt.batchCalls(C)):bn;return f.updateResult(),E},[f,h]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),b.useEffect(()=>{f.setOptions(a)},[a,f]),hU(a,p))throw ob(a,f,o);if(cU({result:p,errorResetBoundary:o,throwOnError:a.throwOnError,query:u,suspense:a.suspense}))throw p.error;if((k=(S=l.getDefaultOptions().queries)==null?void 0:S._experimental_afterQuery)==null||k.call(S,a,p),a.experimental_prefetchInRender&&!Zo&&fU(p,r)){const C=d?ob(a,f,o):u==null?void 0:u.promise;C==null||C.catch(bn).finally(()=>{f.updateResult()})}return a.notifyOnChangeProps?p:f.trackResult(p)}function Va(e,t){return pU(e,Q9)}function RE(e,t){const n=$a(),[r]=b.useState(()=>new eU(n,e));b.useEffect(()=>{r.setOptions(e)},[r,e]);const o=b.useSyncExternalStore(b.useCallback(a=>r.subscribe(Wt.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),l=b.useCallback((a,u)=>{r.mutate(a,u).catch(bn)},[r]);if(o.error&&Ng(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:l,mutateAsync:o.mutate}}function mU(e,t,n){if(n!==void 0){if(Array.isArray(n)){if(n.length===0)return;e.set(t,n.join(","));return}e.set(t,String(n))}}function gU(e){const t=new URLSearchParams;for(const[n,r]of Object.entries(e))mU(t,n,r);return t}async function jE(e,t,n){const r=gU(t);let o=e;const l=r.toString();l.length>0&&(o=`${e}?${l}`);const a=await fetch(o);if(!a.ok){const u=await a.json();throw new Error(u.error||n)}return a.json()}async function yU(e){return jE("/api/history",{entityId:e.entityId,type:e.types,action:e.actions,since:e.since,until:e.until,limit:e.limit,page:e.page},"Failed to fetch history")}function AE(e){return Va({queryKey:["history",e],queryFn:()=>yU(e)})}function vU({taskId:e}){const{data:t,isLoading:n,error:r}=AE({entityId:e,limit:zc});return n?y.jsx("div",{className:"p-4",children:y.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})}):r?y.jsx("div",{className:"p-4",children:y.jsxs("p",{className:"text-sm text-destructive",children:["Error: ",Fn(r,"Unknown error")]})}):t!=null&&t.events.length?y.jsxs("div",{className:"p-4",children:[y.jsxs("h4",{className:"text-sm font-medium mb-3",children:["History (",t.events.length,")"]}),y.jsx("div",{children:t.events.map(o=>y.jsx(A9,{event:o},o.id))})]}):y.jsx("div",{className:"p-4",children:y.jsx("p",{className:"text-sm text-muted-foreground italic",children:"No history"})})}function va({label:e,children:t,stacked:n=!1}){return n?y.jsxs("div",{children:[y.jsx("span",{className:"mb-1 block text-sm text-muted-foreground",children:e}),t]}):y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("span",{className:"text-sm text-muted-foreground",children:e}),t]})}function xU({epic:e,onEpicClick:t}){return t?y.jsx(va,{label:"Epic",children:y.jsxs("button",{type:"button",className:"flex items-center gap-0.5 text-sm text-purple-500 hover:text-purple-600",onClick:()=>t(e),children:[e.id,y.jsx(Em,{className:"h-3 w-3"})]})}):y.jsx(va,{label:"Epic",children:y.jsx("span",{className:"text-sm text-purple-500",children:e.id})})}const wU=$1("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function Gi({className:e,variant:t,asChild:n=!1,...r}){let o="span";return n&&(o=F1),y.jsx(o,{"data-slot":"badge",className:Ve(wU({variant:t}),e),...r})}function bU({tags:e}){return e.length===0?null:y.jsx(va,{label:"Tags",stacked:!0,children:y.jsx("div",{className:"flex flex-wrap gap-1",children:e.map(t=>y.jsx(Gi,{variant:"secondary",className:"text-xs",children:t},t))})})}function kU({task:e,onStatusChange:t,onPriorityChange:n,onEpicClick:r,getEpicById:o}){var u;let l=null;e.epicId&&(l=o(e.epicId)??null);const a=((u=e.tags)==null?void 0:u.split(",").map(d=>d.trim()).filter(Boolean))??[];return y.jsxs("div",{children:[y.jsx(pa,{children:"Details"}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(va,{label:"Status",children:y.jsx(Nd,{value:e.status,onChange:t,statuses:xd,triggerClassName:"w-auto h-8 text-right"})}),y.jsx(va,{label:"Priority",children:y.jsx(Pd,{value:e.priority,onChange:n,triggerClassName:"w-auto h-8 text-right"})}),l&&y.jsx(xU,{epic:l,onEpicClick:r}),y.jsx(bU,{tags:a})]})]})}function SU({taskId:e,variant:t,onClick:n}){let r=ak,o="Blocks this task";return t==="depends"&&(r=lk,o="Depends on this task"),y.jsxs("button",{className:Ve("inline-flex items-center gap-1 rounded-md px-2 py-1 font-mono text-xs","transition-colors hover:ring-1",t==="depends"&&"bg-amber-500/10 text-amber-600 hover:ring-amber-500/50 dark:text-amber-400",t==="blocks"&&"bg-rose-500/10 text-rose-600 hover:ring-rose-500/50 dark:text-rose-400"),onClick:n,title:o,children:[y.jsx(r,{className:"h-3 w-3"}),e]})}function CU({sections:e,onTaskClick:t}){return y.jsxs("div",{children:[y.jsx(pa,{children:"Dependencies"}),y.jsx("div",{className:"space-y-2",children:e.map(({title:n,taskIds:r,variant:o})=>y.jsxs("div",{children:[y.jsx("span",{className:"mb-1.5 block text-[10px] uppercase tracking-wider text-muted-foreground",children:n}),y.jsx("div",{className:"flex flex-wrap gap-1.5",children:r.map(l=>y.jsx(SU,{taskId:l,variant:o,onClick:()=>t(l)},l))})]},o))})]})}function EU({dependsOn:e,blocks:t,onTaskClick:n,getTaskById:r}){const o=[];if(e.length>0&&o.push({title:"Depends on",taskIds:e,variant:"depends"}),t.length>0&&o.push({title:"Blocks",taskIds:t,variant:"blocks"}),o.length===0)return null;function l(a){const u=r(a);u&&n&&n(u)}return y.jsx(CU,{sections:o,onTaskClick:l})}function _U({subtask:e,onClick:t}){const n=Up(e.status);return y.jsxs(nt,{variant:"ghost",className:"h-auto w-full justify-start gap-2 p-1.5",onClick:t,children:[y.jsx(PC,{status:e.status}),y.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:e.id}),y.jsx("span",{className:Ve("flex-1 truncate text-left text-sm",n&&"text-muted-foreground line-through"),children:e.title})]})}function TU({subtasks:e,onTaskClick:t}){if(e.length===0)return null;const n=e.filter(r=>r.status==="completed").length;return y.jsxs("div",{children:[y.jsx(pa,{count:{current:n,total:e.length},children:"Subtasks"}),y.jsx("div",{className:"space-y-1",children:e.map(r=>y.jsx(_U,{subtask:r,onClick:()=>t==null?void 0:t(r)},r.id))})]})}function PU({task:e,subtasks:t,onStatusChange:n,onPriorityChange:r,onTaskClick:o,onEpicClick:l,getEpicById:a,getTaskById:u}){const[d,f]=b.useState("comments");let p=y.jsx(vU,{taskId:e.id});return d==="comments"&&(p=y.jsx(R9,{taskId:e.id})),y.jsxs("div",{className:"bg-muted/50 rounded-b-md",children:[y.jsxs("div",{className:"p-4 space-y-6",children:[y.jsx(kU,{task:e,onStatusChange:n,onPriorityChange:r,onEpicClick:l,getEpicById:a}),y.jsx(EU,{dependsOn:e.dependsOn,blocks:e.blocks,onTaskClick:o,getTaskById:u}),y.jsx(TU,{subtasks:t,onTaskClick:o}),y.jsx(TS,{createdAt:e.createdAt,updatedAt:e.updatedAt})]}),y.jsxs("div",{className:"border-t",children:[y.jsxs("div",{className:"flex border-b",children:[y.jsxs(nt,{variant:"ghost",size:"sm",className:Ve("flex-1 rounded-none",d==="comments"&&"bg-accent"),onClick:()=>f("comments"),children:[y.jsx(IR,{className:"h-4 w-4 mr-1.5"}),"Comments"]}),y.jsxs(nt,{variant:"ghost",size:"sm",className:Ve("flex-1 rounded-none",d==="history"&&"bg-accent"),onClick:()=>f("history"),children:[y.jsx(fk,{className:"h-4 w-4 mr-1.5"}),"History"]})]}),p]})]})}function NU({task:e,subtasks:t,breadcrumbItems:n,status:r,priority:o,open:l,onClose:a,onEdit:u,onStatusChange:d,onPriorityChange:f,onTaskClick:p,onEpicClick:h,getEpicById:v,getTaskById:g}){return y.jsx(ES,{open:l,onClose:a,breadcrumbItems:n,title:e.title,description:e.description,onEdit:u,children:y.jsx(PU,{task:{...e,status:r,priority:o},subtasks:t,onStatusChange:d,onPriorityChange:f,onTaskClick:p,onEpicClick:h,getEpicById:v,getTaskById:g})})}function IE(e,t){return e&&typeof e=="object"&&"error"in e&&typeof e.error=="string"?e.error:t}function sb(e){return e?{title:e.title,description:e.description??"",status:e.status,priority:e.priority,tags:e.tags??"",epicId:e.epicId}:{title:"",description:"",status:"todo",priority:2,tags:"",epicId:null}}async function pp(e,t){const n=await fetch(`/api/tasks/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){const r=await n.json();throw new Error(IE(r,"Failed to update task"))}return n.json()}async function RU(e){const t=await fetch(`/api/tasks/${e}`,{method:"DELETE"});if(!t.ok){const n=await t.json();throw new Error(IE(n,"Failed to delete task"))}}const jU=_g({title:Cn().min(1,"Title is required"),description:Cn(),status:Cn(),priority:Eg().min(0).max(5),tags:Cn(),epicId:Cn().nullable()});function AU({task:e,open:t,isEditing:n,onClose:r,onUpdate:o}){const l=$a(),[a,u]=b.useState(!1),d=yg({resolver:Cg(jU),values:sb(e),resetOptions:{keepDirtyValues:!1}}),{reset:f,formState:{isSubmitting:p}}=d;return b.useEffect(()=>{u(!1)},[t,n]),{form:d,isSubmitting:p,isDeleting:a,setIsDeleting:u,handleSave:async C=>{if(e)try{return await pp(e.id,{title:C.title.trim(),description:C.description.trim()||null,status:C.status,priority:C.priority,tags:C.tags.trim()||null,epicId:C.epicId||null}),vt.success("Task updated"),o(),l.invalidateQueries({queryKey:["history"]}),!0}catch(E){return vt.error(Fn(E,"Failed to update task")),!1}},handleDelete:async()=>{if(e)try{await RU(e.id),vt.success("Task deleted"),r(),o(),l.invalidateQueries({queryKey:["history"]})}catch(C){vt.error(Fn(C,"Failed to delete task"))}},handleCancel:()=>{e&&f(sb(e)),u(!1)},handleStatusChange:async C=>{if(!e)return;const E=d.getValues("status");d.setValue("status",C);try{await pp(e.id,{status:C}),o(),l.invalidateQueries({queryKey:["history"]})}catch(_){d.setValue("status",E),vt.error(Fn(_,"Failed to update status"))}},handlePriorityChange:async C=>{if(!e)return;const E=d.getValues("priority");d.setValue("priority",C);try{await pp(e.id,{priority:C}),o(),l.invalidateQueries({queryKey:["history"]})}catch(_){d.setValue("priority",E),vt.error(Fn(_,"Failed to update priority"))}}}}function IU({task:e,epics:t,allTasks:n,open:r,onClose:o,onUpdate:l,onTaskClick:a,onEpicClick:u}){const[d,f]=b.useState(!1),{form:p,isDeleting:h,setIsDeleting:v,handleSave:g,handleDelete:S,handleCancel:k,handleStatusChange:C,handlePriorityChange:E}=AU({task:e,open:r,isEditing:d,onClose:o,onUpdate:l}),_=O=>gE(t,O),P=O=>yE(n,O),R=()=>{f(!1),o()};if(!e)return null;const I=S9(n,e.id),A=C9(t,n,{onEpicClick:u,onTaskClick:a,task:e}),H=p.watch("status"),B=p.watch("priority"),ne=()=>{k(),f(!1)};return y.jsxs(y.Fragment,{children:[y.jsx(NU,{task:e,subtasks:I,breadcrumbItems:A,status:H,priority:B,open:r&&!d,onClose:R,onEdit:()=>f(!0),onStatusChange:C,onPriorityChange:E,onTaskClick:a,onEpicClick:u,getEpicById:_,getTaskById:P}),y.jsx(E9,{form:p,epics:t,breadcrumbItems:A,open:r&&d,isDeleting:h,onClose:R,onSubmit:g,onCancel:ne,onDelete:()=>v(!0),onDeleteConfirm:S,onDeleteCancel:()=>v(!1)})]})}function Ag({allTasks:e,epics:t,selectedEpic:n,selectedEpicTasks:r,selectedTask:o,onCloseEpicDetail:l,onCloseTaskDetail:a,onEpicDetailTaskClick:u,onTaskDetailEpicClick:d,onTaskDetailTaskClick:f,onUpdate:p}){return y.jsxs(y.Fragment,{children:[y.jsx(IU,{task:o,epics:t,allTasks:e,open:o!==null,onClose:a,onUpdate:p,onTaskClick:f,onEpicClick:d}),y.jsx(b9,{epic:n,tasks:r,open:n!==null,onClose:l,onUpdate:p,onTaskClick:u})]})}function OE(e,t){return{...e,...t,page:1}}function Jc(e){return(e==null?void 0:e.join(","))??"all"}function fm(e,t){if(e==="all")return;const n=new Set(t.map(o=>o.value)),r=e.split(",").filter(o=>n.has(o));if(r.length>0)return r}function OU(e){if(e==="all")return;const t=e.split(",").map(Number).filter(n=>Number.isFinite(n));if(t.length>0)return t}function lb(e,t){if(e)return`${e}${t}`}function aa({allLabel:e,options:t,placeholder:n,value:r,widthClassName:o="w-[140px]",onValueChange:l}){return y.jsxs(eo,{value:r,onValueChange:l,children:[y.jsx(no,{className:o,children:y.jsx(to,{placeholder:n})}),y.jsxs(ro,{children:[e&&y.jsx(Wr,{value:"all",children:e}),t.map(({label:a,value:u})=>y.jsx(Wr,{value:u,children:a},u))]})]})}function DU({actionOptions:e,actionValue:t,sinceValue:n,typeOptions:r,typeValue:o,untilValue:l,onActionChange:a,onSinceChange:u,onTypeChange:d,onUntilChange:f}){return y.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[y.jsx(aa,{allLabel:"All Types",options:r,placeholder:"Type",value:o,onValueChange:d}),y.jsx(aa,{allLabel:"All Actions",options:e,placeholder:"Action",value:t,onValueChange:a}),y.jsx("input",{type:"date",className:"h-9 rounded-md border bg-background px-3 text-sm",value:n,onChange:p=>u(p.target.value),placeholder:"Since"}),y.jsx("input",{type:"date",className:"h-9 rounded-md border bg-background px-3 text-sm",value:l,onChange:p=>f(p.target.value),placeholder:"Until"})]})}const ab=[{value:"epic",label:"Epic"},{value:"task",label:"Task"},{value:"subtask",label:"Subtask"},{value:"comment",label:"Comment"},{value:"dependency",label:"Dependency"}],ub=[{value:"create",label:"Created"},{value:"update",label:"Updated"},{value:"delete",label:"Deleted"}];function zU({filters:e,onSetFilters:t}){var r,o;function n(l){t(OE(e,l))}return y.jsx(DU,{actionOptions:ub,actionValue:Jc(e.actions),sinceValue:((r=e.since)==null?void 0:r.split("T")[0])??"",typeOptions:ab,typeValue:Jc(e.types),untilValue:((o=e.until)==null?void 0:o.split("T")[0])??"",onActionChange:l=>n({actions:fm(l,ub)}),onSinceChange:l=>n({since:lb(l,"T00:00:00Z")}),onTypeChange:l=>n({types:fm(l,ab)}),onUntilChange:l=>n({until:lb(l,"T23:59:59Z")})})}function DE({page:e,summary:t,totalPages:n,onNext:r,onPrevious:o}){return y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("div",{children:t}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsxs(nt,{variant:"outline",size:"sm",onClick:o,disabled:e<=1,children:[y.jsx(mR,{className:"h-4 w-4"}),"Prev"]}),y.jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",e," of ",n]}),y.jsxs(nt,{variant:"outline",size:"sm",onClick:r,disabled:e>=n,children:["Next",y.jsx(Em,{className:"h-4 w-4"})]})]})]})}function MU({filters:e,onSetFilters:t,response:n,totalPages:r}){if(!n||n.total===0)return null;const o=e.page??1,l=e.limit??zc;return y.jsx(DE,{page:o,summary:y.jsxs("div",{className:"text-sm text-muted-foreground",children:["Showing ",(o-1)*l+1,"-",Math.min(o*l,n.total)," of"," ",n.total," events"]}),totalPages:r,onNext:()=>t({...e,page:o+1}),onPrevious:()=>t({...e,page:o-1})})}function LU(e){var r,o;const t=(r=e.snapshot)==null?void 0:r.title;if(typeof t=="string"&&t.length>0)return t;const n=(o=e.changes)==null?void 0:o.title;return n?typeof n.to=="string"&&n.to.length>0?n.to:typeof n.from=="string"&&n.from.length>0?n.from:null:null}function FU({event:e,onEntityClick:t}){const n=LU(e),r=e.action!=="delete"&&["epic","task","subtask"].includes(e.entityType);return y.jsxs("div",{className:"flex gap-3 p-4 border-b last:border-b-0 hover:bg-muted/30 transition-colors",children:[y.jsx("div",{className:"mt-0.5",children:y.jsx(jk,{action:e.action})}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[y.jsx("button",{className:Ve("font-mono text-sm",r&&"hover:underline cursor-pointer",e.action==="delete"&&"line-through text-muted-foreground"),onClick:()=>r&&t(e.entityType,e.entityId),disabled:!r,children:e.entityId}),y.jsxs("span",{className:Ve("text-sm font-medium",Ak(e.action)),children:[e.action,"d"]}),y.jsx(Gi,{variant:"outline",className:"text-xs",children:e.entityType})]}),n&&y.jsx("p",{className:Ve("text-sm mb-2",e.action==="delete"&&"line-through text-muted-foreground"),children:n}),y.jsx(vE,{changes:e.changes})]}),y.jsx("div",{className:"text-xs text-muted-foreground whitespace-nowrap",children:za(e.timestamp)})]})}function zE({content:e,emptyMessage:t,error:n,isEmpty:r,isLoading:o}){let l=e;return r&&(l=y.jsx("div",{className:"flex h-full items-center justify-center",children:y.jsx("span",{className:"text-muted-foreground",children:t})})),n&&(l=y.jsx("div",{className:"flex h-full items-center justify-center",children:y.jsxs("span",{className:"text-destructive",children:["Error: ",Fn(n,"Unknown error")]})})),o&&(l=y.jsx("div",{className:"flex h-full items-center justify-center",children:y.jsx("span",{className:"text-muted-foreground",children:"Loading..."})})),y.jsx("div",{className:"flex-1 overflow-auto rounded-lg border",children:l})}function $U({error:e,isLoading:t,onEntityClick:n,response:r}){return y.jsx(zE,{content:y.jsx("div",{children:r==null?void 0:r.events.map(o=>y.jsx(FU,{event:o,onEntityClick:n},o.id))}),emptyMessage:"No events found",error:e,isEmpty:!(r!=null&&r.events.length),isLoading:t})}async function VU(){const e=await fetch("/api/tasks");if(!e.ok)throw new Error("Failed to fetch tasks");return e.json()}async function BU(){const e=await fetch("/api/epics");if(!e.ok)throw new Error("Failed to fetch epics");return e.json()}async function UU(){const e=await fetch("/api/project");return e.ok?e.json():null}function HU(){return Va({queryKey:["tasks"],queryFn:VU})}function WU(){return Va({queryKey:["epics"],queryFn:BU})}function ZU(){return Va({queryKey:["project"],queryFn:UU})}function qU(){const e=$a();return RE({mutationFn:async t=>{const n=await fetch("/api/project/config",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){const r=await n.json();throw new Error(r.error||"Failed to update project config")}return n.json()},onSuccess:()=>{e.invalidateQueries({queryKey:["project"]})}})}function Ld(){const e=HU(),t=WU(),n=ZU();return{tasks:e.data??[],epics:t.data??[],project:n.data??null,isLoading:e.isLoading||t.isLoading,error:e.error||t.error,refetch:()=>{e.refetch(),t.refetch(),n.refetch()}}}function QU(){const e=$a();return RE({mutationFn:async()=>{const t=await fetch("/api/bulk-archive-completed",{method:"POST"});if(!t.ok){const n=await t.json();throw new Error(n.error||"Failed to archive completed items")}return t.json()},onSuccess:()=>{e.invalidateQueries({queryKey:["tasks"]}),e.invalidateQueries({queryKey:["epics"]})}})}const cb=e=>{let t;const n=new Set,r=(f,p)=>{const h=typeof f=="function"?f(t):f;if(!Object.is(h,t)){const v=t;t=p??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(g=>g(t,v))}},o=()=>t,u={setState:r,getState:o,getInitialState:()=>d,subscribe:f=>(n.add(f),()=>n.delete(f))},d=t=e(r,o,u);return u},YU=e=>e?cb(e):cb,KU=e=>e;function GU(e,t=KU){const n=le.useSyncExternalStore(e.subscribe,le.useCallback(()=>t(e.getState()),[e,t]),le.useCallback(()=>t(e.getInitialState()),[e,t]));return le.useDebugValue(n),n}const db=e=>{const t=YU(e),n=r=>GU(t,r);return Object.assign(n,t),n},XU=e=>e?db(e):db,xa=XU(e=>({selectedTaskId:null,selectedEpicId:null,showCreateModal:!1,createModalDefaults:{},connectionStatus:"disconnected",openTaskDetail:t=>e({selectedTaskId:t,selectedEpicId:null}),openEpicDetail:t=>e({selectedEpicId:t,selectedTaskId:null}),openCreateModal:(t={})=>e({showCreateModal:!0,createModalDefaults:t}),closeTaskDetail:()=>e({selectedTaskId:null}),closeEpicDetail:()=>e({selectedEpicId:null}),closeCreateModal:()=>e({showCreateModal:!1,createModalDefaults:{}}),closeAllModals:()=>e({selectedTaskId:null,selectedEpicId:null,showCreateModal:!1,createModalDefaults:{}}),setConnectionStatus:t=>e({connectionStatus:t})}));function JU(e,t){return t?e.find(n=>n.id===t)??null:null}function e8(e,t){return t?e.find(n=>n.id===t)??null:null}function Ig(e,t){const{selectedEpicId:n,selectedTaskId:r,closeEpicDetail:o,closeTaskDetail:l,openEpicDetail:a,openTaskDetail:u}=xa(),d=JU(e,r),f=e8(t,n);let p=[];f&&(p=e.filter(S=>S.epicId===f.id));function h(S,k){if(S==="epic"){a(k);return}u(k)}function v(S){l(),a(S.id)}function g(S){o();const k=e.find(C=>C.id===S.id);k&&u(k.id)}return{closeEpicDetail:o,closeTaskDetail:l,handleEpicModalTaskClick:g,handleTaskModalEpicClick:v,openEpicDetail:a,openHistoryEntity:h,openTaskDetail:u,selectedEpic:f,selectedEpicTasks:p,selectedTask:d}}function t8(){const{epics:e,refetch:t,tasks:n}=Ld(),r=Ig(n,e),[o,l]=b.useState({limit:zc,page:1}),{data:a,error:u,isLoading:d}=AE(o);function f(h,v){(h==="task"||h==="subtask"||h==="epic")&&r.openHistoryEntity(h,v)}let p=0;return a&&(p=Math.ceil(a.total/(o.limit??zc))),{...r,data:a,epics:e,error:u,filters:o,handleEntityClick:f,isLoading:d,refetch:t,setFilters:l,tasks:n,totalPages:p}}function n8(){const{closeEpicDetail:e,closeTaskDetail:t,data:n,epics:r,error:o,filters:l,handleEntityClick:a,handleEpicModalTaskClick:u,handleTaskModalEpicClick:d,isLoading:f,openTaskDetail:p,refetch:h,selectedEpic:v,selectedEpicTasks:g,selectedTask:S,setFilters:k,tasks:C,totalPages:E}=t8();return y.jsxs(y.Fragment,{children:[y.jsxs("main",{className:"flex flex-1 flex-col gap-4 overflow-hidden p-4",children:[y.jsx(zU,{filters:l,onSetFilters:k}),y.jsx($U,{error:o,isLoading:f,onEntityClick:a,response:n}),y.jsx(MU,{filters:l,onSetFilters:k,response:n,totalPages:E})]}),y.jsx(Ag,{allTasks:C,epics:r,selectedEpic:v,selectedEpicTasks:g,selectedTask:S,onCloseEpicDetail:e,onCloseTaskDetail:t,onEpicDetailTaskClick:u,onTaskDetailEpicClick:d,onTaskDetailTaskClick:_=>p(_.id),onUpdate:h})]})}var mp,fb;function r8(){if(fb)return mp;fb=1;var e="Expected a function",t=NaN,n="[object Symbol]",r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt,d=typeof Xu=="object"&&Xu&&Xu.Object===Object&&Xu,f=typeof self=="object"&&self&&self.Object===Object&&self,p=d||f||Function("return this")(),h=Object.prototype,v=h.toString,g=Math.max,S=Math.min,k=function(){return p.Date.now()};function C(I,A,H){var B,ne,O,Y,G,ae,q=0,U=!1,Z=!1,J=!0;if(typeof I!="function")throw new TypeError(e);A=R(A)||0,E(H)&&(U=!!H.leading,Z="maxWait"in H,O=Z?g(R(H.maxWait)||0,A):O,J="trailing"in H?!!H.trailing:J);function D(re){var me=B,Se=ne;return B=ne=void 0,q=re,Y=I.apply(Se,me),Y}function K(re){return q=re,G=setTimeout(Q,A),U?D(re):Y}function N(re){var me=re-ae,Se=re-q,be=A-me;return Z?S(be,O-Se):be}function M(re){var me=re-ae,Se=re-q;return ae===void 0||me>=A||me<0||Z&&Se>=O}function Q(){var re=k();if(M(re))return j(re);G=setTimeout(Q,N(re))}function j(re){return G=void 0,J&&B?D(re):(B=ne=void 0,Y)}function ue(){G!==void 0&&clearTimeout(G),q=0,B=ae=ne=G=void 0}function ve(){return G===void 0?Y:j(k())}function xe(){var re=k(),me=M(re);if(B=arguments,ne=this,ae=re,me){if(G===void 0)return K(ae);if(Z)return G=setTimeout(Q,A),D(ae)}return G===void 0&&(G=setTimeout(Q,A)),Y}return xe.cancel=ue,xe.flush=ve,xe}function E(I){var A=typeof I;return!!I&&(A=="object"||A=="function")}function _(I){return!!I&&typeof I=="object"}function P(I){return typeof I=="symbol"||_(I)&&v.call(I)==n}function R(I){if(typeof I=="number")return I;if(P(I))return t;if(E(I)){var A=typeof I.valueOf=="function"?I.valueOf():I;I=E(A)?A+"":A}if(typeof I!="string")return I===0?I:+I;I=I.replace(r,"");var H=l.test(I);return H||a.test(I)?u(I.slice(2),H?2:8):o.test(I)?t:+I}return mp=C,mp}r8();var i8=typeof window<"u"?b.useLayoutEffect:b.useEffect;function o8(e,t,n,r){const o=b.useRef(t);i8(()=>{o.current=t},[t]),b.useEffect(()=>{const l=window;if(!(l&&l.addEventListener))return;const a=u=>{o.current(u)};return l.addEventListener(e,a,r),()=>{l.removeEventListener(e,a,r)}},[e,n,r])}function ME(e,t,n="mousedown",r={}){o8(n,o=>{const l=o.target;if(!l||!l.isConnected)return;(Array.isArray(e)?e.filter(u=>!!u.current).every(u=>u.current&&!u.current.contains(l)):e.current&&!e.current.contains(l))&&t(o)},void 0,r)}function s8({open:e,onClose:t,children:n,className:r=""}){const o=b.useRef(null);return ME(o,t),e?y.jsx("div",{ref:o,className:`absolute right-0 top-full mt-1 z-50 rounded-md border bg-popover p-3 shadow-md ${r}`,children:n}):null}const hm=[{value:"created:desc",label:"Newest first"},{value:"created:asc",label:"Oldest first"},{value:"updated:desc",label:"Recently updated"},{value:"priority:asc",label:"Priority (high to low)"},{value:"priority:desc",label:"Priority (low to high)"},{value:"title:asc",label:"Title (A-Z)"},{value:"title:desc",label:"Title (Z-A)"}];function hb(e,t,n){switch(n){case"created:desc":return Cr(t.createdAt).valueOf()-Cr(e.createdAt).valueOf();case"created:asc":return Cr(e.createdAt).valueOf()-Cr(t.createdAt).valueOf();case"updated:desc":return Cr(t.updatedAt).valueOf()-Cr(e.updatedAt).valueOf();case"priority:asc":return e.priority-t.priority;case"priority:desc":return t.priority-e.priority;case"title:asc":return e.title.localeCompare(t.title);case"title:desc":return t.title.localeCompare(e.title);default:return 0}}const pb=[{value:"all",label:"All"},{value:"epic",label:"Epics only"},{value:"task",label:"Tasks only"}],ed={sort:"created:desc",type:"all"};function l8(e){return e.sort!==ed.sort||e.type!==ed.type}const mb="h-8 w-full rounded-md border bg-transparent px-2 text-sm outline-none focus:ring-1 focus:ring-ring";function a8({value:e,onChange:t}){const[n,r]=b.useState(!1),o=l8(e);return y.jsxs("div",{className:"relative",children:[y.jsxs(nt,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>r(!n),title:"Sort & filter",children:[y.jsx(pk,{className:"h-4 w-4"}),o&&y.jsx("span",{className:"absolute top-0.5 right-0.5 h-2 w-2 rounded-full bg-blue-500"})]}),y.jsxs(s8,{open:n,onClose:()=>r(!1),className:"w-52 flex flex-col gap-3",children:[y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Sort by"}),y.jsx("select",{value:e.sort,onChange:l=>{const a=l.target.value;hm.some(u=>u.value===a)&&t({...e,sort:a})},className:mb,children:hm.map(l=>y.jsx("option",{value:l.value,children:l.label},l.value))})]}),y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Show"}),y.jsx("select",{value:e.type,onChange:l=>{const a=l.target.value;pb.some(u=>u.value===a)&&t({...e,type:a})},className:mb,children:pb.map(l=>y.jsx("option",{value:l.value,children:l.label},l.value))})]}),o&&y.jsx("button",{onClick:()=>{t(ed),r(!1)},className:"text-xs text-muted-foreground hover:text-foreground underline self-end",children:"Reset"})]})]})}function LE({priority:e}){const t=Mc[e]||Mc[2];return y.jsxs(Gi,{className:"font-mono text-xs",title:Da[e],style:{backgroundColor:t.bg,color:t.text},children:["P",e]})}function u8(e,t=[]){let n=[];function r(l,a){const u=b.createContext(a);u.displayName=l+"Context";const d=n.length;n=[...n,a];const f=h=>{var E;const{scope:v,children:g,...S}=h,k=((E=v==null?void 0:v[e])==null?void 0:E[d])||u,C=b.useMemo(()=>S,Object.values(S));return y.jsx(k.Provider,{value:C,children:g})};f.displayName=l+"Provider";function p(h,v){var k;const g=((k=v==null?void 0:v[e])==null?void 0:k[d])||u,S=b.useContext(g);if(S)return S;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${l}\``)}return[f,p]}const o=()=>{const l=n.map(a=>b.createContext(a));return function(u){const d=(u==null?void 0:u[e])||l;return b.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return o.scopeName=e,[r,c8(o,...t)]}function c8(...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(l){const a=r.reduce((u,{useScope:d,scopeName:f})=>{const h=d(l)[`__scope${f}`];return{...u,...h}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var d8=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],FE=d8.reduce((e,t)=>{const n=Zm(`Primitive.${t}`),r=b.forwardRef((o,l)=>{const{asChild:a,...u}=o,d=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(d,{...u,ref:l})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Og="Progress",Dg=100,[f8]=u8(Og),[h8,p8]=f8(Og),$E=b.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:l=m8,...a}=e;(o||o===0)&&!gb(o)&&console.error(g8(`${o}`,"Progress"));const u=gb(o)?o:Dg;r!==null&&!yb(r,u)&&console.error(y8(`${r}`,"Progress"));const d=yb(r,u)?r:null,f=td(d)?l(d,u):void 0;return y.jsx(h8,{scope:n,value:d,max:u,children:y.jsx(FE.div,{"aria-valuemax":u,"aria-valuemin":0,"aria-valuenow":td(d)?d:void 0,"aria-valuetext":f,role:"progressbar","data-state":UE(d,u),"data-value":d??void 0,"data-max":u,...a,ref:t})})});$E.displayName=Og;var VE="ProgressIndicator",BE=b.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=p8(VE,n);return y.jsx(FE.div,{"data-state":UE(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});BE.displayName=VE;function m8(e,t){return`${Math.round(e/t*100)}%`}function UE(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function td(e){return typeof e=="number"}function gb(e){return td(e)&&!isNaN(e)&&e>0}function yb(e,t){return td(e)&&!isNaN(e)&&e<=t&&e>=0}function g8(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Dg}\`.`}function y8(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
343
|
+
- a positive number
|
|
344
|
+
- less than the value passed to \`max\` (or ${Dg} if no \`max\` prop is set)
|
|
345
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
346
|
+
|
|
347
|
+
Defaulting to \`null\`.`}var v8=$E,x8=BE;function HE({className:e,value:t,...n}){return y.jsx(v8,{"data-slot":"progress",className:Ve("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",e),...n,children:y.jsx(x8,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${Jm-(t||0)}%)`}})})}function w8({epic:e,taskCount:t,onClick:n}){let r=0;return t.total>0&&(r=Math.round(t.completed/t.total*Jm)),y.jsxs("div",{className:"p-2 cursor-pointer bg-blue-50 dark:bg-blue-800 hover:ring wrap-break-word",onClick:n,children:[y.jsxs("div",{className:"flex items-center justify-between mb-1",children:[y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsx(sd,{width:16}),y.jsx("span",{className:"font-mono text-xs font-medium text-foreground",children:e.id})]}),y.jsx(LE,{priority:e.priority})]}),y.jsx("h4",{className:"text-sm font-medium mb-2",children:e.title}),y.jsxs("div",{className:"border-t pt-1.5 flex flex-col gap-1.5",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("p",{className:"text-xs text-muted-foreground",children:[t.completed,"/",t.total," tasks"]}),y.jsxs("span",{className:"text-[10px] text-muted-foreground font-mono",children:[r,"%"]})]}),t.total>0&&y.jsx(HE,{value:r,className:"h-1.5"}),y.jsx("p",{className:"text-[10px] text-muted-foreground",children:za(e.createdAt)})]})]})}function b8({completed:e,total:t}){if(t===0)return null;const n=Math.round(e/t*Jm),r=o=>o===vF?"[&>div]:bg-green-500":o>=xF?"[&>div]:bg-blue-500":o>=wF?"[&>div]:bg-yellow-500":"[&>div]:bg-red-500";return y.jsxs("div",{className:"flex items-center gap-2 mt-1.5",children:[y.jsx(HE,{value:n,className:Ve("flex-1 h-1.5",r(n))}),y.jsxs("span",{className:"font-mono text-xs text-muted-foreground",children:[e,"/",t]})]})}function k8({task:e,epicName:t,subtasks:n,onClick:r}){var l;const o=n.filter(a=>a.status==="completed").length;return y.jsxs("div",{"data-task-id":e.id,className:"p-2 cursor-pointer hover:ring bg-accent w-full flex flex-col wrap-break-word",onClick:r,children:[y.jsxs("div",{className:"flex items-center justify-between mb-1",children:[y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsx(ja,{width:16}),y.jsx("span",{className:"font-mono text-xs font-medium text-foreground",children:e.id})]}),y.jsx(LE,{priority:e.priority})]}),y.jsx("h4",{className:"text-sm font-medium mb-1",children:e.title}),e.description&&y.jsx("p",{className:"text-xs text-muted-foreground mb-2 line-clamp-2",children:e.description}),(t||e.tags)&&y.jsxs("div",{className:"flex flex-wrap gap-2 mb-2",children:[t&&y.jsxs("p",{className:"text-xs flex gap-2 items-center",children:[y.jsx(sd,{width:16}),t]}),(l=e.tags)==null?void 0:l.split(",").map(a=>y.jsx(Gi,{variant:"outline",className:"text-xs",children:a.trim()},a))]}),(e.dependsOn.length>0||e.blocks.length>0)&&y.jsxs("div",{className:"pt-2 border-t flex flex-wrap gap-1",children:[e.dependsOn.map(a=>y.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-mono bg-amber-500/10 text-amber-600 dark:text-amber-400",title:`Depends on ${a}`,children:[y.jsx(lk,{className:"h-2.5 w-2.5"}),a]},a)),e.blocks.map(a=>y.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-mono bg-rose-500/10 text-rose-600 dark:text-rose-400",title:`Blocks ${a}`,children:[y.jsx(ak,{className:"h-2.5 w-2.5"}),a]},a))]}),n.length>0&&y.jsx(b8,{completed:o,total:n.length}),y.jsx("p",{className:"text-[10px] text-muted-foreground mt-1.5",children:za(e.createdAt)})]})}function S8({label:e,tasks:t,epics:n,allTasks:r,allEpics:o,onAddClick:l,onTaskClick:a,onEpicClick:u,onArchiveAll:d}){const[f,p]=b.useState(ed),h=b.useMemo(()=>f.type==="task"?[]:[...n].sort((E,_)=>hb(E,_,f.sort)),[n,f]),v=b.useMemo(()=>f.type==="epic"?[]:[...t].sort((E,_)=>hb(E,_,f.sort)),[t,f]),g=v.length+h.length,S=E=>{if(!E)return null;const _=o.find(P=>P.id===E);return(_==null?void 0:_.title)||E},k=E=>r.filter(_=>_.parentTaskId===E),C=E=>{const _=r.filter(R=>R.epicId===E&&!R.parentTaskId),P=_.filter(R=>R.status==="completed").length;return{total:_.length,completed:P}};return y.jsxs("div",{className:"w-[280px] min-w-[280px] max-w-[320px] flex flex-col border rounded-md",children:[y.jsxs("div",{className:"flex items-center justify-between border-b p-2 bg-accent/50",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"font-semibold text-sm",children:e}),y.jsx(Gi,{variant:"secondary",className:"text-xs",children:g})]}),y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx(a8,{value:f,onChange:p}),d&&g>0&&y.jsx(nt,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:d,title:"Archive all completed items",children:y.jsx(sk,{className:"h-4 w-4"})}),y.jsx(nt,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:l,title:`Add task to ${e}`,children:y.jsx(_m,{className:"h-4 w-4"})})]})]}),y.jsx("div",{className:"flex-1 min-h-[100px] overflow-y-auto",children:y.jsxs("div",{className:"flex flex-col gap-2 p-2",children:[h.map(E=>y.jsx(w8,{epic:E,taskCount:C(E.id),onClick:()=>u(E)},E.id)),v.map(E=>y.jsx(k8,{task:E,epicName:S(E.epicId),subtasks:k(E.id),onClick:()=>a(E)},E.id)),g===0&&y.jsx("div",{className:"flex items-center justify-center min-h-[80px] text-sm text-muted-foreground italic",children:"No items"})]})})]})}const C8=[{key:"todo",label:"TODO"},{key:"in_progress",label:"In Progress"},{key:"completed",label:"Completed"},{key:"wont_fix",label:"Won't Fix"}];function E8({tasks:e,epics:t,onAddClick:n,onTaskClick:r,onEpicClick:o,onArchiveAllCompleted:l}){const a=e.filter(p=>!p.parentTaskId),u=p=>a.filter(h=>h.status===p),d=p=>t.filter(h=>h.status===p);function f(p){if(p==="completed")return l}return y.jsx("div",{className:"flex gap-4 items-start flex-nowrap min-h-[calc(100vh-180px)]",children:C8.map(p=>y.jsx(S8,{label:p.label,tasks:u(p.key),epics:d(p.key),allTasks:e,allEpics:t,onAddClick:()=>n(p.key),onTaskClick:r,onEpicClick:o,onArchiveAll:f(p.key)},p.key))})}function _8({open:e,onOpenChange:t,title:n,description:r,confirmLabel:o="Confirm",cancelLabel:l="Cancel",onConfirm:a,variant:u="default"}){const d=()=>{a(),t(!1)};let f="default";return u==="destructive"&&(f="destructive"),y.jsx(yd,{open:e,onOpenChange:t,children:y.jsxs(vd,{className:"sm:max-w-[400px]",children:[y.jsxs(bS,{children:[y.jsx(SS,{children:n}),y.jsx(CS,{children:r})]}),y.jsxs(kS,{children:[y.jsx(nt,{variant:"outline",onClick:()=>t(!1),children:l}),y.jsx(nt,{variant:f,onClick:d,children:o})]})]})})}function wa(){return typeof window<"u"&&"Notification"in window}function T8(){return wa()?Notification.permission:"denied"}async function P8(){return wa()?Notification.requestPermission():"denied"}function N8(e){if(!wa()||Notification.permission!=="granted")return null;const t=new Notification(e.title,{body:e.body,icon:e.icon,tag:e.tag});return e.onClick&&(t.onclick=()=>{var n;window.focus(),(n=e.onClick)==null||n.call(e),t.close()}),t}function R8(e){const t=xa(r=>r.connectionStatus),n=b.useRef(e);return n.current=e,b.useEffect(()=>{const r=xa.getState().setConnectionStatus;r("connecting");const o=new EventSource("/api/events");return o.onopen=()=>{r("connected")},o.onmessage=l=>{var a;try{const u=JSON.parse(l.data);if(u.type==="connected"){r("connected");return}let d="",f="";switch(u.type){case"task_created":d=`Task ${u.taskId} created`,f=`"${u.taskTitle}"`;break;case"task_updated":d=`Task ${u.taskId} updated`,f=`"${u.taskTitle}" → ${Zs[u.status]||u.status}`;break;case"task_deleted":d=`Task ${u.taskId} deleted`,f=`"${u.taskTitle}"`;break;case"epic_created":d=`Epic ${u.epicId} created`,f=`"${u.epicTitle}"`;break;case"epic_updated":d=`Epic ${u.epicId} updated`,f=`"${u.epicTitle}" → ${Zs[u.status]||u.status}`;break;case"epic_deleted":d=`Epic ${u.epicId} deleted`,f=`"${u.epicTitle}"`;break}vt.info(d,{description:f}),N8({title:d,body:f,tag:u.type}),(a=n.current)==null||a.call(n)}catch{}},o.onerror=()=>{r("disconnected")},()=>{o.close(),r("disconnected")}},[]),{connectionStatus:t}}function j8(){const{tasks:e,epics:t,isLoading:n,error:r,refetch:o}=Ld(),l=QU(),a=Ig(e,t),{openCreateModal:u}=xa(),[d,f]=b.useState(!1);R8(o);function p(){f(!0)}function h(g){f(g)}function v(){l.mutate()}return{...a,bulkArchive:l,epics:t,error:r,handleArchiveAllCompleted:v,isLoading:n,openArchiveConfirm:p,openCreateModal:u,refetch:o,showArchiveConfirm:d,tasks:e,updateArchiveConfirm:h}}function A8(){const{closeEpicDetail:e,closeTaskDetail:t,epics:n,error:r,handleArchiveAllCompleted:o,handleEpicModalTaskClick:l,isLoading:a,openArchiveConfirm:u,openCreateModal:d,openEpicDetail:f,openTaskDetail:p,refetch:h,selectedEpic:v,selectedEpicTasks:g,selectedTask:S,showArchiveConfirm:k,tasks:C,updateArchiveConfirm:E}=j8();return a&&C.length===0?y.jsx("div",{className:"flex items-center justify-center flex-1",children:y.jsx("span",{className:"text-muted-foreground",children:"Loading..."})}):r?y.jsx("div",{className:"flex items-center justify-center flex-1",children:y.jsxs("span",{className:"text-destructive",children:["Error: ",Fn(r,"Unknown error")]})}):y.jsxs(y.Fragment,{children:[y.jsx("main",{className:"flex-1 p-4 overflow-x-auto",children:y.jsx(E8,{tasks:C,epics:n,onAddClick:_=>d({status:_}),onTaskClick:_=>p(_.id),onEpicClick:_=>f(_.id),onArchiveAllCompleted:u})}),y.jsx(_8,{open:k,onOpenChange:E,title:"Archive All Completed",description:"This will move all completed tasks and epics to the archived status. This action can be undone by manually changing their status back.",confirmLabel:"Archive All",onConfirm:o}),y.jsx(Ag,{allTasks:C,epics:n,selectedEpic:v,selectedEpicTasks:g,selectedTask:S,onCloseEpicDetail:e,onCloseTaskDetail:t,onEpicDetailTaskClick:l,onTaskDetailEpicClick:_=>{t(),f(_.id)},onTaskDetailTaskClick:_=>p(_.id),onUpdate:h})]})}function I8(e,t){return e.includes(t)?"default":"outline"}function O8({hasActiveFilters:e,priorityOptions:t,priorityValue:n,searchQuery:r,selectedTypes:o,sortOptions:l,sortValue:a,statusOptions:u,statusValue:d,typeOptions:f,onClearFilters:p,onPriorityChange:h,onSearchQueryChange:v,onSortChange:g,onStatusChange:S,onToggleTypeFilter:k}){return y.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[y.jsxs("div",{className:"relative w-64",children:[y.jsx(VR,{className:"absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),y.jsx(tr,{placeholder:"Search...",value:r,onChange:C=>v(C.target.value),className:"pl-9"})]}),y.jsx("div",{className:"flex gap-1",children:f.map(({label:C,value:E})=>y.jsx(nt,{variant:I8(o,E),size:"sm",onClick:()=>k(E),children:C},E))}),y.jsx(aa,{allLabel:"All Statuses",options:u,placeholder:"Status",value:d,onValueChange:S}),y.jsx(aa,{allLabel:"All Priorities",options:t,placeholder:"Priority",value:n,onValueChange:h}),y.jsx(aa,{options:l,placeholder:"Sort",value:a,widthClassName:"w-[180px]",onValueChange:g}),e&&y.jsxs(nt,{variant:"ghost",size:"sm",onClick:p,children:[y.jsx(ld,{className:"mr-1 h-4 w-4"}),"Clear"]})]})}const D8=[{value:"epic",label:"Epic"},{value:"task",label:"Task"},{value:"subtask",label:"Subtask"}],vb=xd.map(e=>({value:e,label:Zs[e]})),z8=Object.entries(Da).map(([e,t])=>({value:e,label:`P${e} - ${t}`}));function M8({filters:e,hasActiveFilters:t,onClearFilters:n,onSearchQueryChange:r,onSetFilters:o,onToggleTypeFilter:l,searchQuery:a}){function u(d){o(OE(e,d))}return y.jsx(O8,{hasActiveFilters:t,priorityOptions:z8,priorityValue:Jc(e.priorities),searchQuery:a,selectedTypes:e.types??[],sortOptions:hm,sortValue:e.sort??"created:desc",statusOptions:vb,statusValue:Jc(e.statuses),typeOptions:D8,onClearFilters:n,onPriorityChange:d=>u({priorities:OU(d)}),onSearchQueryChange:r,onSortChange:d=>u({sort:d}),onStatusChange:d=>u({statuses:fm(d,vb)}),onToggleTypeFilter:l})}function L8({filters:e,onSetFilters:t,response:n,totalPages:r}){if(!n||n.total===0)return null;const o=e.page??1,l=e.limit??Ip;return y.jsx(DE,{page:o,summary:y.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[y.jsxs("span",{children:["Showing ",(o-1)*l+1,"-",Math.min(o*l,n.total)," of"," ",n.total]}),y.jsxs(eo,{value:String(l),onValueChange:a=>t({...e,limit:Number(a),page:1}),children:[y.jsx(no,{className:"h-8 w-[80px]",children:y.jsx(to,{})}),y.jsx(ro,{children:fF.map(a=>y.jsx(Wr,{value:String(a),children:a},a))})]}),y.jsx("span",{children:"per page"})]}),totalPages:r,onNext:()=>t({...e,page:o+1}),onPrevious:()=>t({...e,page:o-1})})}function F8(e){return e==="epic"?"border-purple-500 text-purple-500":e==="task"?"border-blue-500 text-blue-500":"border-gray-500 text-gray-500"}function $8({error:e,isLoading:t,items:n,onRowClick:r,response:o}){return y.jsx(zE,{content:y.jsxs("table",{className:"w-full",children:[y.jsx("thead",{className:"sticky top-0 bg-muted/50",children:y.jsxs("tr",{className:"text-left text-sm",children:[y.jsx("th",{className:"px-4 py-3 font-medium",children:"ID"}),y.jsx("th",{className:"px-4 py-3 font-medium",children:"Type"}),y.jsx("th",{className:"px-4 py-3 font-medium",children:"Title"}),y.jsx("th",{className:"px-4 py-3 font-medium",children:"Status"}),y.jsx("th",{className:"px-4 py-3 font-medium",children:"Priority"}),y.jsx("th",{className:"px-4 py-3 font-medium",children:"Created"})]})}),y.jsx("tbody",{children:n.map(l=>{var a,u,d,f;return y.jsxs("tr",{className:"cursor-pointer border-t transition-colors hover:bg-muted/30",onClick:()=>r(l),children:[y.jsx("td",{className:"px-4 py-3 font-mono text-sm text-muted-foreground",children:l.id}),y.jsx("td",{className:"px-4 py-3",children:y.jsx(Gi,{variant:"outline",className:Ve(F8(l.type)),children:l.type})}),y.jsx("td",{className:"max-w-md truncate px-4 py-3",children:l.title}),y.jsx("td",{className:"px-4 py-3",children:y.jsx(Gi,{style:{backgroundColor:((a=Qw[l.status])==null?void 0:a.bg)??"#6b7280",color:((u=Qw[l.status])==null?void 0:u.text)??"#ffffff"},children:Zs[l.status]??l.status})}),y.jsx("td",{className:"px-4 py-3",children:y.jsxs(Gi,{variant:"outline",style:{borderColor:((d=Mc[l.priority])==null?void 0:d.bg)??"#6b7280",color:((f=Mc[l.priority])==null?void 0:f.bg)??"#6b7280"},children:["P",l.priority," - ",Da[l.priority]]})}),y.jsx("td",{className:"px-4 py-3 text-sm text-muted-foreground",children:bF(l.createdAt)})]},l.id)})})]}),emptyMessage:"No items found",error:e,isEmpty:!(o!=null&&o.items.length),isLoading:t})}async function V8(e){return jE("/api/list",{type:e.types,status:e.statuses,priority:e.priorities,sort:e.sort,limit:e.limit,page:e.page,since:e.since,until:e.until},"Failed to fetch list")}function B8(e){return Va({queryKey:["list",e],queryFn:()=>V8(e)})}function U8(){var E,_,P;const{epics:e,refetch:t,tasks:n}=Ld(),r=Ig(n,e),[o,l]=b.useState({limit:Ip,page:1,sort:"created:desc"}),[a,u]=b.useState(""),{data:d,error:f,isLoading:p}=B8(o);function h(R){if(R.type==="epic"){r.openEpicDetail(R.id);return}r.openTaskDetail(R.id)}function v(R){const I=o.types??[];let A=[...I,R];I.includes(R)&&(A=I.filter(B=>B!==R));let H=A;A.length===0&&(H=void 0),l({...o,types:H,page:1})}function g(){l({limit:o.limit,page:1,sort:o.sort}),u("")}let S=[];d&&(S=d.items.filter(R=>{if(!a)return!0;const I=a.toLowerCase();return R.title.toLowerCase().includes(I)||R.id.toLowerCase().includes(I)}));const k=!!((E=o.types)!=null&&E.length||(_=o.statuses)!=null&&_.length||(P=o.priorities)!=null&&P.length);let C=0;return d&&(C=Math.ceil(d.total/(o.limit??Ip))),{...r,clearFilters:g,data:d,epics:e,error:f,filteredItems:S,filters:o,handleRowClick:h,hasActiveFilters:k,isLoading:p,refetch:t,searchQuery:a,setFilters:l,setSearchQuery:u,tasks:n,toggleTypeFilter:v,totalPages:C}}function H8(){const{clearFilters:e,closeEpicDetail:t,closeTaskDetail:n,data:r,epics:o,error:l,filteredItems:a,filters:u,handleEpicModalTaskClick:d,handleRowClick:f,handleTaskModalEpicClick:p,hasActiveFilters:h,isLoading:v,openTaskDetail:g,refetch:S,searchQuery:k,selectedEpic:C,selectedEpicTasks:E,selectedTask:_,setFilters:P,setSearchQuery:R,tasks:I,toggleTypeFilter:A,totalPages:H}=U8();return y.jsxs(y.Fragment,{children:[y.jsxs("main",{className:"flex flex-1 flex-col gap-4 overflow-hidden p-4",children:[y.jsx(M8,{filters:u,hasActiveFilters:h,onClearFilters:e,onSearchQueryChange:R,onSetFilters:P,onToggleTypeFilter:A,searchQuery:k}),y.jsx($8,{error:l,isLoading:v,items:a,onRowClick:f,response:r}),y.jsx(L8,{filters:u,onSetFilters:P,response:r,totalPages:H})]}),y.jsx(Ag,{allTasks:I,epics:o,selectedEpic:C,selectedEpicTasks:E,selectedTask:_,onCloseEpicDetail:t,onCloseTaskDetail:n,onEpicDetailTaskClick:d,onTaskDetailEpicClick:p,onTaskDetailTaskClick:B=>g(B.id),onUpdate:S})]})}const WE=[{path:"/",label:"Kanban",Icon:_R,Page:A8},{path:"/list",label:"List",Icon:NR,Page:H8},{path:"/history",label:"History",Icon:fk,Page:n8}];var W8=Symbol("radix.slottable");function Z8(e){const t=({children:n})=>y.jsx(y.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=W8,t}var[Fd]=rl("Tooltip",[Cd]),$d=Cd(),ZE="TooltipProvider",q8=700,pm="tooltip.open",[Q8,zg]=Fd(ZE),qE=e=>{const{__scopeTooltip:t,delayDuration:n=q8,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:l}=e,a=b.useRef(!0),u=b.useRef(!1),d=b.useRef(0);return b.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),y.jsx(Q8,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:b.useCallback(()=>{window.clearTimeout(d.current),a.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:b.useCallback(f=>{u.current=f},[]),disableHoverableContent:o,children:l})};qE.displayName=ZE;var ba="Tooltip",[Y8,Ba]=Fd(ba),QE=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:l,disableHoverableContent:a,delayDuration:u}=e,d=zg(ba,e.__scopeTooltip),f=$d(t),[p,h]=b.useState(null),v=Lo(),g=b.useRef(0),S=a??d.disableHoverableContent,k=u??d.delayDuration,C=b.useRef(!1),[E,_]=Oc({prop:r,defaultProp:o??!1,onChange:H=>{H?(d.onOpen(),document.dispatchEvent(new CustomEvent(pm))):d.onClose(),l==null||l(H)},caller:ba}),P=b.useMemo(()=>E?C.current?"delayed-open":"instant-open":"closed",[E]),R=b.useCallback(()=>{window.clearTimeout(g.current),g.current=0,C.current=!1,_(!0)},[_]),I=b.useCallback(()=>{window.clearTimeout(g.current),g.current=0,_(!1)},[_]),A=b.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{C.current=!0,_(!0),g.current=0},k)},[k,_]);return b.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),y.jsx(KS,{...f,children:y.jsx(Y8,{scope:t,contentId:v,open:E,stateAttribute:P,trigger:p,onTriggerChange:h,onTriggerEnter:b.useCallback(()=>{d.isOpenDelayedRef.current?A():R()},[d.isOpenDelayedRef,A,R]),onTriggerLeave:b.useCallback(()=>{S?I():(window.clearTimeout(g.current),g.current=0)},[I,S]),onOpen:R,onClose:I,disableHoverableContent:S,children:n})})};QE.displayName=ba;var mm="TooltipTrigger",YE=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ba(mm,n),l=zg(mm,n),a=$d(n),u=b.useRef(null),d=ct(t,u,o.onTriggerChange),f=b.useRef(!1),p=b.useRef(!1),h=b.useCallback(()=>f.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),y.jsx(GS,{asChild:!0,...a,children:y.jsx(it.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:d,onPointerMove:Ye(e.onPointerMove,v=>{v.pointerType!=="touch"&&!p.current&&!l.isPointerInTransitRef.current&&(o.onTriggerEnter(),p.current=!0)}),onPointerLeave:Ye(e.onPointerLeave,()=>{o.onTriggerLeave(),p.current=!1}),onPointerDown:Ye(e.onPointerDown,()=>{o.open&&o.onClose(),f.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:Ye(e.onFocus,()=>{f.current||o.onOpen()}),onBlur:Ye(e.onBlur,o.onClose),onClick:Ye(e.onClick,o.onClose)})})});YE.displayName=mm;var Mg="TooltipPortal",[K8,G8]=Fd(Mg,{forceMount:void 0}),KE=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,l=Ba(Mg,t);return y.jsx(K8,{scope:t,forceMount:n,children:y.jsx(qr,{present:n||l.open,children:y.jsx(pd,{asChild:!0,container:o,children:r})})})};KE.displayName=Mg;var Qs="TooltipContent",GE=b.forwardRef((e,t)=>{const n=G8(Qs,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...l}=e,a=Ba(Qs,e.__scopeTooltip);return y.jsx(qr,{present:r||a.open,children:a.disableHoverableContent?y.jsx(XE,{side:o,...l,ref:t}):y.jsx(X8,{side:o,...l,ref:t})})}),X8=b.forwardRef((e,t)=>{const n=Ba(Qs,e.__scopeTooltip),r=zg(Qs,e.__scopeTooltip),o=b.useRef(null),l=ct(t,o),[a,u]=b.useState(null),{trigger:d,onClose:f}=n,p=o.current,{onPointerInTransitChange:h}=r,v=b.useCallback(()=>{u(null),h(!1)},[h]),g=b.useCallback((S,k)=>{const C=S.currentTarget,E={x:S.clientX,y:S.clientY},_=nH(E,C.getBoundingClientRect()),P=rH(E,_),R=iH(k.getBoundingClientRect()),I=sH([...P,...R]);u(I),h(!0)},[h]);return b.useEffect(()=>()=>v(),[v]),b.useEffect(()=>{if(d&&p){const S=C=>g(C,p),k=C=>g(C,d);return d.addEventListener("pointerleave",S),p.addEventListener("pointerleave",k),()=>{d.removeEventListener("pointerleave",S),p.removeEventListener("pointerleave",k)}}},[d,p,g,v]),b.useEffect(()=>{if(a){const S=k=>{const C=k.target,E={x:k.clientX,y:k.clientY},_=(d==null?void 0:d.contains(C))||(p==null?void 0:p.contains(C)),P=!oH(E,a);_?v():P&&(v(),f())};return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[d,p,a,f,v]),y.jsx(XE,{...e,ref:l})}),[J8,eH]=Fd(ba,{isInside:!1}),tH=Z8("TooltipContent"),XE=b.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:l,onPointerDownOutside:a,...u}=e,d=Ba(Qs,n),f=$d(n),{onClose:p}=d;return b.useEffect(()=>(document.addEventListener(pm,p),()=>document.removeEventListener(pm,p)),[p]),b.useEffect(()=>{if(d.trigger){const h=v=>{const g=v.target;g!=null&&g.contains(d.trigger)&&p()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[d.trigger,p]),y.jsx(hd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:a,onFocusOutside:h=>h.preventDefault(),onDismiss:p,children:y.jsxs(XS,{"data-state":d.stateAttribute,...f,...u,ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[y.jsx(tH,{children:r}),y.jsx(J8,{scope:n,isInside:!0,children:y.jsx(n$,{id:d.contentId,role:"tooltip",children:o||r})})]})})});GE.displayName=Qs;var JE="TooltipArrow",e_=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=$d(n);return eH(JE,n).isInside?null:y.jsx(JS,{...o,...r,ref:t})});e_.displayName=JE;function nH(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),l=Math.abs(t.left-e.x);switch(Math.min(n,r,o,l)){case l:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function rH(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function iH(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function oH(e,t){const{x:n,y:r}=e;let o=!1;for(let l=0,a=t.length-1;l<t.length;a=l++){const u=t[l],d=t[a],f=u.x,p=u.y,h=d.x,v=d.y;p>r!=v>r&&n<(h-f)*(r-p)/(v-p)+f&&(o=!o)}return o}function sH(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),lH(t)}function lH(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const l=t[t.length-1],a=t[t.length-2];if((l.x-a.x)*(o.y-a.y)>=(l.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const l=n[n.length-1],a=n[n.length-2];if((l.x-a.x)*(o.y-a.y)>=(l.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var aH=qE,uH=QE,cH=YE,dH=KE,fH=GE,hH=e_;function pH({delayDuration:e=0,...t}){return y.jsx(aH,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function mH({...e}){return y.jsx(uH,{"data-slot":"tooltip",...e})}function gH({...e}){return y.jsx(cH,{"data-slot":"tooltip-trigger",...e})}function yH({className:e,sideOffset:t=0,children:n,...r}){return y.jsx(dH,{children:y.jsxs(fH,{"data-slot":"tooltip-content",sideOffset:t,className:Ve("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...r,children:[n,y.jsx(hH,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}function vH(){const[e,t]=b.useState(!1),[n,r]=b.useState("default");if(b.useEffect(()=>{t(!0),wa()&&r(T8())},[]),!e)return y.jsx(nt,{variant:"outline",size:"icon",disabled:!0,children:y.jsx(zx,{className:"h-4 w-4"})});if(!wa())return null;const o=async()=>{if(n==="granted")return;const u=await P8();r(u)},l=()=>{switch(n){case"granted":return y.jsx(cR,{className:"h-4 w-4"});case"denied":return y.jsx(aR,{className:"h-4 w-4"});case"default":return y.jsx(zx,{className:"h-4 w-4"})}},a=()=>{switch(n){case"granted":return"Browser notifications enabled. You'll be notified of task and epic changes.";case"denied":return"Notifications blocked. Enable in browser settings.";case"default":return"Click to enable browser notifications"}};return y.jsxs(mH,{children:[y.jsx(gH,{asChild:!0,children:y.jsxs(nt,{variant:"outline",size:"icon",onClick:o,disabled:n==="denied",children:[l(),y.jsx("span",{className:"sr-only",children:a()})]})}),y.jsx(yH,{sideOffset:8,children:y.jsx("p",{children:a()})})]})}const t_=b.createContext(void 0),n_="theme";function r_(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function xH(){if(typeof window>"u")return"system";const e=localStorage.getItem(n_);return e==="light"||e==="dark"||e==="system"?e:"system"}function xb(e){return e==="system"?r_():e}function wH({children:e,defaultTheme:t="system",disableTransitionOnChange:n=!1}){const[r,o]=b.useState(()=>typeof window>"u"?t:xH()),[l,a]=b.useState(()=>xb(r)),u=d=>{o(d),localStorage.setItem(n_,d)};return b.useEffect(()=>{const d=xb(r);a(d);const f=document.documentElement;n&&f.style.setProperty("transition","none"),f.classList.remove("light","dark"),f.classList.add(d),n&&(f.offsetHeight,f.style.removeProperty("transition"))},[r,n]),b.useEffect(()=>{if(r!=="system")return;const d=window.matchMedia("(prefers-color-scheme: dark)"),f=()=>{a(r_())};return d.addEventListener("change",f),()=>d.removeEventListener("change",f)},[r]),y.jsx(t_.Provider,{value:{theme:r,setTheme:u,resolvedTheme:l},children:e})}function bH(){const e=b.useContext(t_);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e}function kH(){const{setTheme:e,resolvedTheme:t}=bH(),n=()=>{if(t==="dark"){e("light");return}e("dark")};let r=y.jsx(YR,{className:"h-4 w-4"});return t==="dark"&&(r=y.jsx(DR,{className:"h-4 w-4"})),y.jsxs(nt,{variant:"outline",size:"icon",onClick:n,children:[r,y.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}function SH({projectConfig:e,projectName:t,onNewClick:n,onProjectConfigClick:r}){const o=t&&y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx(MR,{className:"text-muted-foreground",width:16}),y.jsx("span",{className:"text-sm text-muted-foreground",children:t})]}),l=e&&y.jsxs(nt,{size:"sm",variant:"outline",onClick:r,children:[y.jsx(pk,{className:"mr-1 h-4 w-4"}),"Prefixes"]}),a=n&&y.jsxs(nt,{size:"sm",onClick:n,children:[y.jsx(_m,{className:"mr-1 h-4 w-4"}),"New"]});return y.jsxs("div",{className:"flex gap-6",children:[o,y.jsxs("div",{className:"flex items-center gap-2",children:[l,a,y.jsx(vH,{}),y.jsx(kH,{})]})]})}function CH(e){return e?Ve("flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium transition-colors","bg-background text-foreground shadow-sm"):Ve("flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium transition-colors","text-muted-foreground hover:bg-background/50 hover:text-foreground")}function EH(){return y.jsx("nav",{className:"flex items-center gap-1",children:WE.map(({path:e,label:t,Icon:n})=>y.jsxs(nk,{to:e,end:e==="/",className:({isActive:r})=>CH(r),children:[y.jsx(n,{className:"h-4 w-4"}),t]},e))})}const _H={issuePrefix:"",epicPrefix:"",commentPrefix:""};function wb(e){return e?{issuePrefix:e.issuePrefix,epicPrefix:e.epicPrefix,commentPrefix:e.commentPrefix}:_H}function TH({open:e,onOpenChange:t,projectConfig:n}){const[r,o]=b.useState(()=>wb(n)),l=qU();b.useEffect(()=>{o(wb(n))},[e,n]);function a(d,f){o(p=>({...p,[d]:f}))}async function u(d){d.preventDefault();try{await l.mutateAsync(r),vt.success("Project prefixes updated"),t(!1)}catch(f){vt.error(Fn(f,"Failed to update prefixes"))}}return{form:r,handleFieldChange:a,handleSubmit:u,isPending:l.isPending}}function PH({open:e,onOpenChange:t,projectName:n,projectConfig:r}){const{form:o,handleFieldChange:l,handleSubmit:a,isPending:u}=TH({open:e,onOpenChange:t,projectConfig:r});let d="";return n&&(d=`${n}: `),y.jsx(yd,{open:e,onOpenChange:t,children:y.jsxs(vd,{children:[y.jsxs(bS,{children:[y.jsx(SS,{children:"ID Prefixes"}),y.jsxs(CS,{children:[d,"Update task, epic, and comment prefixes. Changes affect only newly created IDs."]})]}),y.jsxs("form",{onSubmit:a,className:"space-y-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Rt,{htmlFor:"issue-prefix",children:"Issue prefix"}),y.jsx(tr,{id:"issue-prefix",value:o.issuePrefix,onChange:f=>l("issuePrefix",f.target.value),placeholder:"TREK",autoCapitalize:"characters",autoCorrect:"off",spellCheck:!1})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Rt,{htmlFor:"epic-prefix",children:"Epic prefix"}),y.jsx(tr,{id:"epic-prefix",value:o.epicPrefix,onChange:f=>l("epicPrefix",f.target.value),placeholder:"EPIC",autoCapitalize:"characters",autoCorrect:"off",spellCheck:!1})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Rt,{htmlFor:"comment-prefix",children:"Comment prefix"}),y.jsx(tr,{id:"comment-prefix",value:o.commentPrefix,onChange:f=>l("commentPrefix",f.target.value),placeholder:"CMT",autoCapitalize:"characters",autoCorrect:"off",spellCheck:!1})]}),y.jsxs(kS,{children:[y.jsx(nt,{type:"button",variant:"outline",onClick:()=>t(!1),children:"Cancel"}),y.jsx(nt,{type:"submit",disabled:u||!r,loading:u,loadingText:"Saving",children:"Save"})]})]})]})})}function NH({projectName:e,projectConfig:t,onNewClick:n}){const[r,o]=b.useState(!1);return y.jsxs(y.Fragment,{children:[y.jsxs("header",{className:"flex items-center justify-between border-b px-4 py-2 bg-accent/50",children:[y.jsxs("div",{className:"flex items-center gap-6",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(kR,{}),y.jsx("h1",{className:"text-lg font-bold",children:"trekker"})]}),y.jsx(EH,{})]}),y.jsx(SH,{projectName:e,projectConfig:t,onNewClick:n,onProjectConfigClick:()=>o(!0)})]}),y.jsx(PH,{open:r,onOpenChange:o,projectName:e,projectConfig:t})]})}function RH(e){return e.map(t=>({value:t.id,label:`${t.id}: ${t.title}`}))}function jH(e){return e.map(t=>({value:t.id,label:`${t.id}: ${t.title}`}))}function bb(e){return{title:"",description:"",status:e??"todo",priority:2,tags:"",epicId:null,parentTaskId:""}}function i_({options:e,value:t,onValueChange:n,placeholder:r="Select...",emptyText:o="No results found",className:l}){const[a,u]=b.useState(!1),[d,f]=b.useState(""),p=b.useRef(null),h=b.useRef(null),v=b.useMemo(()=>{if(!d)return e;const _=d.toLowerCase();return e.filter(P=>P.label.toLowerCase().includes(_)||P.value.toLowerCase().includes(_))},[e,d]),g=e.find(_=>_.value===t);b.useEffect(()=>{a&&setTimeout(()=>{var _;return(_=h.current)==null?void 0:_.focus()},pF)},[a]),ME(p,()=>{u(!1),f("")});const S=_=>{n(_===t?null:_),u(!1),f("")},k=_=>{_.stopPropagation(),n(null),f("")};let C=r;g&&(C=g.label);let E=v.map(_=>{const P=t===_.value;let R="mr-2 h-4 w-4 opacity-0";return P&&(R="mr-2 h-4 w-4 opacity-100"),y.jsxs("button",{type:"button",className:Ve("relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 px-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground",P&&"bg-accent"),onClick:()=>S(_.value),children:[y.jsx(uk,{className:R}),y.jsx("span",{className:"truncate",children:_.label})]},_.value)});return v.length===0&&(E=[y.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:o},"empty")]),y.jsxs("div",{ref:p,className:Ve("relative",l),children:[y.jsxs(nt,{type:"button",variant:"outline",role:"combobox","aria-expanded":a,className:"w-full justify-between font-normal",onClick:()=>{u(!a)},children:[y.jsx("span",{className:"truncate",children:C}),y.jsxs("div",{className:"flex items-center gap-1 ml-2 shrink-0",children:[t&&y.jsx(ld,{className:"h-4 w-4 opacity-50 hover:opacity-100",onClick:k}),y.jsx(wR,{className:"h-4 w-4 opacity-50"})]})]}),a&&y.jsxs("div",{className:"absolute z-50 mt-1 w-full rounded-md border bg-popover shadow-md",children:[y.jsx("div",{className:"p-2",children:y.jsx(tr,{ref:h,placeholder:"Search...",value:d,onChange:_=>f(_.target.value),className:"h-8"})}),y.jsx("div",{className:"max-h-[200px] overflow-y-auto p-1",children:E})]})]})}function AH({form:e,parentTasks:t}){var a;const{control:n,register:r,formState:{errors:o}}=e,l=b.useMemo(()=>jH(t),[t]);return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Rt,{children:"Tags (comma-separated)"}),y.jsx(tr,{...r("tags"),placeholder:"bug, frontend, urgent"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsxs(Rt,{children:["Parent Task ",y.jsx("span",{className:"text-destructive",children:"*"})]}),y.jsx(Hc,{control:n,name:"parentTaskId",render:({field:u})=>y.jsx(i_,{options:l,value:u.value||null,onValueChange:d=>u.onChange(d??""),placeholder:"Select a task...",emptyText:"No tasks found"})}),((a=o.parentTaskId)==null?void 0:a.message)&&y.jsx("p",{className:"text-sm text-destructive",children:o.parentTaskId.message})]})]})}function IH({form:e,epics:t}){const{control:n,register:r}=e,o=b.useMemo(()=>RH(t),[t]);return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Rt,{children:"Tags (comma-separated)"}),y.jsx(tr,{...r("tags"),placeholder:"bug, frontend, urgent"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Rt,{children:"Epic"}),y.jsx(Hc,{control:n,name:"epicId",render:({field:l})=>y.jsx(i_,{options:o,value:l.value,onValueChange:l.onChange,placeholder:"No Epic",emptyText:"No epics found"})})]})]})}function OH({form:e,type:t,epics:n,parentTasks:r}){const{register:o,control:l,formState:{errors:a}}=e;let u=xd;return t==="epic"&&(u=Xm),y.jsxs("div",{className:"flex flex-col gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsxs(Rt,{children:["Title ",y.jsx("span",{className:"text-destructive",children:"*"})]}),y.jsx(tr,{...o("title"),placeholder:`${t.charAt(0).toUpperCase()+t.slice(1)} title`}),a.title&&y.jsx("p",{className:"text-sm text-destructive",children:String(a.title.message)})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Rt,{children:"Description"}),y.jsx(La,{...o("description"),placeholder:"Optional description",rows:3})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Rt,{children:"Status"}),y.jsx(Hc,{control:l,name:"status",render:({field:d})=>y.jsxs(eo,{value:d.value,onValueChange:d.onChange,children:[y.jsx(no,{children:y.jsx(to,{})}),y.jsx(ro,{children:u.map(f=>y.jsx(Wr,{value:f,children:Zs[f]},f))})]})})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(Rt,{children:"Priority"}),y.jsx(Hc,{control:l,name:"priority",render:({field:d})=>y.jsxs(eo,{value:String(d.value),onValueChange:f=>d.onChange(parseInt(f,10)),children:[y.jsx(no,{children:y.jsx(to,{})}),y.jsx(ro,{children:Object.entries(Da).map(([f,p])=>y.jsxs(Wr,{value:f,children:["P",f," - ",p]},f))})]})})]})]}),t==="task"&&y.jsx(IH,{form:e,epics:n}),t==="subtask"&&y.jsx(AH,{form:e,parentTasks:r})]})}const DH=_g({title:Cn().min(1,"Title is required"),description:Cn(),status:Cn(),priority:Eg().min(0).max(5)}),gm=DH.extend({tags:Cn(),epicId:Cn().nullable(),parentTaskId:Cn()}),zH=gm.extend({parentTaskId:Cn().min(1,"Parent task is required")}),MH={epic:gm,task:gm,subtask:zH};function LH(e){return{title:e.title.trim(),description:e.description.trim()||null,status:e.status,priority:e.priority}}function FH(e){return{title:e.title.trim(),description:e.description.trim()||null,status:e.status,priority:e.priority,tags:e.tags.trim()||null,epicId:e.epicId||null,parentTaskId:null}}function $H(e){return{title:e.title.trim(),description:e.description.trim()||null,status:e.status,priority:e.priority,tags:e.tags.trim()||null,epicId:null,parentTaskId:e.parentTaskId}}function VH({type:e,defaultStatus:t,onClose:n,onCreated:r}){const o=yg({resolver:Cg(MH[e]),defaultValues:bb(t)});b.useEffect(()=>{o.reset(bb(t))},[e,t,o]);const{formState:{isSubmitting:l}}=o,a=async p=>{const h=await fetch("/api/epics",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(LH(p))});if(!h.ok){const v=await h.json();throw new Error(v.error||"Failed to create epic")}return h.json()},u=async p=>{const h=await fetch("/api/tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(FH(p))});if(!h.ok){const v=await h.json();throw new Error(v.error||"Failed to create task")}return h.json()},d=async p=>{const h=await fetch("/api/tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify($H(p))});if(!h.ok){const v=await h.json();throw new Error(v.error||"Failed to create subtask")}return h.json()},f=o.handleSubmit(async p=>{try{let h;e==="epic"?(h=await a(p),vt.success(`Epic ${h.id} created`)):e==="subtask"?(h=await d(p),vt.success(`Subtask ${h.id} created`)):(h=await u(p),vt.success(`Task ${h.id} created`)),n(),r()}catch(h){vt.error(Fn(h,"Failed to create"))}},p=>{const h=Object.values(p)[0];h!=null&&h.message&&typeof h.message=="string"&&vt.error(h.message)});return{form:o,isSubmitting:l,handleSubmit:f}}function BH(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var Lg="ScrollArea",[o_]=rl(Lg),[UH,hr]=o_(Lg),s_=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:l=600,...a}=e,[u,d]=b.useState(null),[f,p]=b.useState(null),[h,v]=b.useState(null),[g,S]=b.useState(null),[k,C]=b.useState(null),[E,_]=b.useState(0),[P,R]=b.useState(0),[I,A]=b.useState(!1),[H,B]=b.useState(!1),ne=ct(t,Y=>d(Y)),O=PS(o);return y.jsx(UH,{scope:n,type:r,dir:O,scrollHideDelay:l,scrollArea:u,viewport:f,onViewportChange:p,content:h,onContentChange:v,scrollbarX:g,onScrollbarXChange:S,scrollbarXEnabled:I,onScrollbarXEnabledChange:A,scrollbarY:k,onScrollbarYChange:C,scrollbarYEnabled:H,onScrollbarYEnabledChange:B,onCornerWidthChange:_,onCornerHeightChange:R,children:y.jsx(it.div,{dir:O,...a,ref:ne,style:{position:"relative","--radix-scroll-area-corner-width":E+"px","--radix-scroll-area-corner-height":P+"px",...e.style}})})});s_.displayName=Lg;var l_="ScrollAreaViewport",a_=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...l}=e,a=hr(l_,n),u=b.useRef(null),d=ct(t,u,a.onViewportChange);return y.jsxs(y.Fragment,{children:[y.jsx("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}"},nonce:o}),y.jsx(it.div,{"data-radix-scroll-area-viewport":"",...l,ref:d,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:y.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});a_.displayName=l_;var Yr="ScrollAreaScrollbar",u_=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=hr(Yr,e.__scopeScrollArea),{onScrollbarXEnabledChange:l,onScrollbarYEnabledChange:a}=o,u=e.orientation==="horizontal";return b.useEffect(()=>(u?l(!0):a(!0),()=>{u?l(!1):a(!1)}),[u,l,a]),o.type==="hover"?y.jsx(HH,{...r,ref:t,forceMount:n}):o.type==="scroll"?y.jsx(WH,{...r,ref:t,forceMount:n}):o.type==="auto"?y.jsx(c_,{...r,ref:t,forceMount:n}):o.type==="always"?y.jsx(Fg,{...r,ref:t}):null});u_.displayName=Yr;var HH=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=hr(Yr,e.__scopeScrollArea),[l,a]=b.useState(!1);return b.useEffect(()=>{const u=o.scrollArea;let d=0;if(u){const f=()=>{window.clearTimeout(d),a(!0)},p=()=>{d=window.setTimeout(()=>a(!1),o.scrollHideDelay)};return u.addEventListener("pointerenter",f),u.addEventListener("pointerleave",p),()=>{window.clearTimeout(d),u.removeEventListener("pointerenter",f),u.removeEventListener("pointerleave",p)}}},[o.scrollArea,o.scrollHideDelay]),y.jsx(qr,{present:n||l,children:y.jsx(c_,{"data-state":l?"visible":"hidden",...r,ref:t})})}),WH=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=hr(Yr,e.__scopeScrollArea),l=e.orientation==="horizontal",a=Bd(()=>d("SCROLL_END"),100),[u,d]=BH("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 b.useEffect(()=>{if(u==="idle"){const f=window.setTimeout(()=>d("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(f)}},[u,o.scrollHideDelay,d]),b.useEffect(()=>{const f=o.viewport,p=l?"scrollLeft":"scrollTop";if(f){let h=f[p];const v=()=>{const g=f[p];h!==g&&(d("SCROLL"),a()),h=g};return f.addEventListener("scroll",v),()=>f.removeEventListener("scroll",v)}},[o.viewport,l,d,a]),y.jsx(qr,{present:n||u!=="hidden",children:y.jsx(Fg,{"data-state":u==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Ye(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:Ye(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),c_=b.forwardRef((e,t)=>{const n=hr(Yr,e.__scopeScrollArea),{forceMount:r,...o}=e,[l,a]=b.useState(!1),u=e.orientation==="horizontal",d=Bd(()=>{if(n.viewport){const f=n.viewport.offsetWidth<n.viewport.scrollWidth,p=n.viewport.offsetHeight<n.viewport.scrollHeight;a(u?f:p)}},10);return Ys(n.viewport,d),Ys(n.content,d),y.jsx(qr,{present:r||l,children:y.jsx(Fg,{"data-state":l?"visible":"hidden",...o,ref:t})})}),Fg=b.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=hr(Yr,e.__scopeScrollArea),l=b.useRef(null),a=b.useRef(0),[u,d]=b.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=m_(u.viewport,u.content),p={...r,sizes:u,onSizesChange:d,hasThumb:f>0&&f<1,onThumbChange:v=>l.current=v,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:v=>a.current=v};function h(v,g){return GH(v,a.current,u,g)}return n==="horizontal"?y.jsx(ZH,{...p,ref:t,onThumbPositionChange:()=>{if(o.viewport&&l.current){const v=o.viewport.scrollLeft,g=kb(v,u,o.dir);l.current.style.transform=`translate3d(${g}px, 0, 0)`}},onWheelScroll:v=>{o.viewport&&(o.viewport.scrollLeft=v)},onDragScroll:v=>{o.viewport&&(o.viewport.scrollLeft=h(v,o.dir))}}):n==="vertical"?y.jsx(qH,{...p,ref:t,onThumbPositionChange:()=>{if(o.viewport&&l.current){const v=o.viewport.scrollTop,g=kb(v,u);l.current.style.transform=`translate3d(0, ${g}px, 0)`}},onWheelScroll:v=>{o.viewport&&(o.viewport.scrollTop=v)},onDragScroll:v=>{o.viewport&&(o.viewport.scrollTop=h(v))}}):null}),ZH=b.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,l=hr(Yr,e.__scopeScrollArea),[a,u]=b.useState(),d=b.useRef(null),f=ct(t,d,l.onScrollbarXChange);return b.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),y.jsx(f_,{"data-orientation":"horizontal",...o,ref:f,sizes:n,style:{bottom:0,left:l.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:l.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Vd(n)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.x),onDragScroll:p=>e.onDragScroll(p.x),onWheelScroll:(p,h)=>{if(l.viewport){const v=l.viewport.scrollLeft+p.deltaX;e.onWheelScroll(v),y_(v,h)&&p.preventDefault()}},onResize:()=>{d.current&&l.viewport&&a&&r({content:l.viewport.scrollWidth,viewport:l.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:rd(a.paddingLeft),paddingEnd:rd(a.paddingRight)}})}})}),qH=b.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,l=hr(Yr,e.__scopeScrollArea),[a,u]=b.useState(),d=b.useRef(null),f=ct(t,d,l.onScrollbarYChange);return b.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),y.jsx(f_,{"data-orientation":"vertical",...o,ref:f,sizes:n,style:{top:0,right:l.dir==="ltr"?0:void 0,left:l.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Vd(n)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.y),onDragScroll:p=>e.onDragScroll(p.y),onWheelScroll:(p,h)=>{if(l.viewport){const v=l.viewport.scrollTop+p.deltaY;e.onWheelScroll(v),y_(v,h)&&p.preventDefault()}},onResize:()=>{d.current&&l.viewport&&a&&r({content:l.viewport.scrollHeight,viewport:l.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:rd(a.paddingTop),paddingEnd:rd(a.paddingBottom)}})}})}),[QH,d_]=o_(Yr),f_=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:l,onThumbPointerUp:a,onThumbPointerDown:u,onThumbPositionChange:d,onDragScroll:f,onWheelScroll:p,onResize:h,...v}=e,g=hr(Yr,n),[S,k]=b.useState(null),C=ct(t,ne=>k(ne)),E=b.useRef(null),_=b.useRef(""),P=g.viewport,R=r.content-r.viewport,I=Ln(p),A=Ln(d),H=Bd(h,10);function B(ne){if(E.current){const O=ne.clientX-E.current.left,Y=ne.clientY-E.current.top;f({x:O,y:Y})}}return b.useEffect(()=>{const ne=O=>{const Y=O.target;(S==null?void 0:S.contains(Y))&&I(O,R)};return document.addEventListener("wheel",ne,{passive:!1}),()=>document.removeEventListener("wheel",ne,{passive:!1})},[P,S,R,I]),b.useEffect(A,[r,A]),Ys(S,H),Ys(g.content,H),y.jsx(QH,{scope:n,scrollbar:S,hasThumb:o,onThumbChange:Ln(l),onThumbPointerUp:Ln(a),onThumbPositionChange:A,onThumbPointerDown:Ln(u),children:y.jsx(it.div,{...v,ref:C,style:{position:"absolute",...v.style},onPointerDown:Ye(e.onPointerDown,ne=>{ne.button===0&&(ne.target.setPointerCapture(ne.pointerId),E.current=S.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",g.viewport&&(g.viewport.style.scrollBehavior="auto"),B(ne))}),onPointerMove:Ye(e.onPointerMove,B),onPointerUp:Ye(e.onPointerUp,ne=>{const O=ne.target;O.hasPointerCapture(ne.pointerId)&&O.releasePointerCapture(ne.pointerId),document.body.style.webkitUserSelect=_.current,g.viewport&&(g.viewport.style.scrollBehavior=""),E.current=null})})})}),nd="ScrollAreaThumb",h_=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=d_(nd,e.__scopeScrollArea);return y.jsx(qr,{present:n||o.hasThumb,children:y.jsx(YH,{ref:t,...r})})}),YH=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,l=hr(nd,n),a=d_(nd,n),{onThumbPositionChange:u}=a,d=ct(t,h=>a.onThumbChange(h)),f=b.useRef(void 0),p=Bd(()=>{f.current&&(f.current(),f.current=void 0)},100);return b.useEffect(()=>{const h=l.viewport;if(h){const v=()=>{if(p(),!f.current){const g=XH(h,u);f.current=g,u()}};return u(),h.addEventListener("scroll",v),()=>h.removeEventListener("scroll",v)}},[l.viewport,p,u]),y.jsx(it.div,{"data-state":a.hasThumb?"visible":"hidden",...o,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Ye(e.onPointerDownCapture,h=>{const g=h.target.getBoundingClientRect(),S=h.clientX-g.left,k=h.clientY-g.top;a.onThumbPointerDown({x:S,y:k})}),onPointerUp:Ye(e.onPointerUp,a.onThumbPointerUp)})});h_.displayName=nd;var $g="ScrollAreaCorner",p_=b.forwardRef((e,t)=>{const n=hr($g,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?y.jsx(KH,{...e,ref:t}):null});p_.displayName=$g;var KH=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=hr($g,n),[l,a]=b.useState(0),[u,d]=b.useState(0),f=!!(l&&u);return Ys(o.scrollbarX,()=>{var h;const p=((h=o.scrollbarX)==null?void 0:h.offsetHeight)||0;o.onCornerHeightChange(p),d(p)}),Ys(o.scrollbarY,()=>{var h;const p=((h=o.scrollbarY)==null?void 0:h.offsetWidth)||0;o.onCornerWidthChange(p),a(p)}),f?y.jsx(it.div,{...r,ref:t,style:{width:l,height:u,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function rd(e){return e?parseInt(e,10):0}function m_(e,t){const n=e/t;return isNaN(n)?0:n}function Vd(e){const t=m_(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function GH(e,t,n,r="ltr"){const o=Vd(n),l=o/2,a=t||l,u=o-a,d=n.scrollbar.paddingStart+a,f=n.scrollbar.size-n.scrollbar.paddingEnd-u,p=n.content-n.viewport,h=r==="ltr"?[0,p]:[p*-1,0];return g_([d,f],h)(e)}function kb(e,t,n="ltr"){const r=Vd(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,l=t.scrollbar.size-o,a=t.content-t.viewport,u=l-r,d=n==="ltr"?[0,a]:[a*-1,0],f=Op(e,d);return g_([0,a],[0,u])(f)}function g_(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 y_(e,t){return e>0&&e<t}var XH=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const l={left:e.scrollLeft,top:e.scrollTop},a=n.left!==l.left,u=n.top!==l.top;(a||u)&&t(),n=l,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function Bd(e,t){const n=Ln(e),r=b.useRef(0);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),b.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Ys(e,t){const n=Ln(t);nn(()=>{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])}var JH=s_,eW=a_,tW=p_;function nW({className:e,children:t,showScrollbar:n=!1,...r}){const o=n||void 0;let l;return n&&(l="opacity-100"),y.jsxs(JH,{"data-slot":"scroll-area",className:Ve("relative overflow-hidden",e),...r,children:[y.jsx(eW,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:t}),y.jsx(rW,{forceMount:o,className:l}),y.jsx(tW,{})]})}function rW({className:e,orientation:t="vertical",...n}){return y.jsx(u_,{"data-slot":"scroll-area-scrollbar",orientation:t,className:Ve("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...n,children:y.jsx(h_,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}function iW({...e}){return y.jsx(mS,{"data-slot":"sheet",...e})}function oW({...e}){return y.jsx(gS,{"data-slot":"sheet-portal",...e})}function sW({className:e,...t}){return y.jsx(yS,{"data-slot":"sheet-overlay",className:Ve("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function lW({className:e,children:t,side:n="right",...r}){return y.jsxs(oW,{children:[y.jsx(sW,{}),y.jsxs(vS,{"data-slot":"sheet-content",className:Ve("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...r,children:[t,y.jsxs(wS,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[y.jsx(ld,{className:"size-4"}),y.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function aW({className:e,...t}){return y.jsx("div",{"data-slot":"sheet-header",className:Ve("flex flex-col gap-1.5 p-4",e),...t})}function uW({className:e,...t}){return y.jsx("div",{"data-slot":"sheet-footer",className:Ve("mt-auto flex flex-col gap-2 p-4",e),...t})}function cW({className:e,...t}){return y.jsx(xS,{"data-slot":"sheet-title",className:Ve("text-foreground font-semibold",e),...t})}const gp=[{value:"epic",label:"Epic",icon:sd},{value:"task",label:"Task",icon:ja},{value:"subtask",label:"Subtask",icon:dk}];function dW({open:e,onClose:t,onCreated:n,epics:r,tasks:o,defaultStatus:l,defaultType:a}){var S;const[u,d]=b.useState("task"),f=o.filter(k=>!k.parentTaskId),{form:p,isSubmitting:h,handleSubmit:v}=VH({type:u,defaultStatus:l,onClose:t,onCreated:n});b.useEffect(()=>{e&&d(a||"task")},[e,a]);const g=((S=gp.find(k=>k.value===u))==null?void 0:S.icon)||ja;return y.jsx(iW,{open:e,onOpenChange:k=>!k&&t(),children:y.jsxs(lW,{side:"right",className:"p-0 flex flex-col w-full sm:max-w-md gap-0",children:[y.jsx(aW,{className:"shrink-0 border-b p-4",children:y.jsxs(cW,{className:"flex items-center gap-2",children:[y.jsx(g,{className:"h-5 w-5"}),"Create New ",u.charAt(0).toUpperCase()+u.slice(1)]})}),y.jsx(nW,{className:"flex-1 min-h-0",showScrollbar:!0,children:y.jsxs("form",{id:"create-form",onSubmit:v,className:"p-4 space-y-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(Rt,{children:"Type"}),y.jsxs(eo,{value:u,onValueChange:k=>{gp.some(C=>C.value===k)&&d(k)},children:[y.jsx(no,{children:y.jsx(to,{})}),y.jsx(ro,{children:gp.map(({value:k,label:C,icon:E})=>y.jsx(Wr,{value:k,children:y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(E,{className:"h-4 w-4"}),C]})},k))})]})]}),y.jsx(OH,{form:p,type:u,epics:r,parentTasks:f},u)]})}),y.jsxs(uW,{className:"shrink-0 border-t p-4",children:[y.jsx(nt,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),y.jsx(nt,{type:"submit",form:"create-form",disabled:h,loading:h,loadingText:"Creating",children:"Create"})]})]})})}const fW={connected:{color:"bg-green-500",label:"Connected to live updates"},connecting:{color:"bg-yellow-500",label:"Connecting..."},disconnected:{color:"bg-red-500",label:"Disconnected"}};function hW({status:e}){const t=fW[e];return y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsx("div",{className:Ve("h-2 w-2 rounded-full",t.color)}),y.jsx("span",{className:"text-xs text-muted-foreground",children:t.label})]})}function pW(){const e=io(),{tasks:t,epics:n,project:r,refetch:o}=Ld(),{connectionStatus:l,showCreateModal:a,createModalDefaults:u,openCreateModal:d,closeCreateModal:f}=xa(),p=e.pathname==="/";return y.jsxs("div",{className:"min-h-screen flex flex-col",children:[y.jsx(NH,{projectName:r==null?void 0:r.name,projectConfig:r==null?void 0:r.config,onNewClick:()=>d({status:"todo"})}),y.jsx(wN,{children:WE.map(({Page:h,path:v})=>y.jsx(Gb,{path:v,element:y.jsx(h,{})},v))}),y.jsx("footer",{className:"px-4 py-2 border-t",children:y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.length," tasks across ",n.length," epics"]}),p&&y.jsx(hW,{status:l})]})}),y.jsx(dW,{open:a,onClose:f,onCreated:o,epics:n,tasks:t,defaultStatus:u.status||"todo"})]})}function mW({children:e}){const[t]=b.useState(()=>new nU({defaultOptions:{queries:{staleTime:hF,refetchOnWindowFocus:!1}}}));return y.jsx(rU,{client:t,children:y.jsxs(wH,{defaultTheme:"system",disableTransitionOnChange:!0,children:[y.jsx(pH,{delayDuration:300,children:e}),y.jsx(nB,{position:"bottom-right",richColors:!0})]})})}const v_=document.getElementById("root");if(!v_)throw new Error("Missing root element");kP.createRoot(v_).render(y.jsx(le.StrictMode,{children:y.jsx(HN,{children:y.jsx(mW,{children:y.jsx(pW,{})})})}));
|