@nickmeriano/task 0.11.0 → 0.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 +175 -1
- package/dist/board/github.d.ts +68 -0
- package/dist/board/github.d.ts.map +1 -0
- package/dist/board/github.js +112 -0
- package/dist/board/github.js.map +1 -0
- package/dist/board/handler.d.ts +50 -0
- package/dist/board/handler.d.ts.map +1 -0
- package/dist/board/handler.js +183 -0
- package/dist/board/handler.js.map +1 -0
- package/dist/board/handler.test.d.ts +11 -0
- package/dist/board/handler.test.d.ts.map +1 -0
- package/dist/board/handler.test.js +229 -0
- package/dist/board/handler.test.js.map +1 -0
- package/dist/board/pages-function.d.ts +23 -0
- package/dist/board/pages-function.d.ts.map +1 -0
- package/dist/board/pages-function.js +34 -0
- package/dist/board/pages-function.js.map +1 -0
- package/dist/board/source.d.ts +118 -0
- package/dist/board/source.d.ts.map +1 -0
- package/dist/board/source.js +333 -0
- package/dist/board/source.js.map +1 -0
- package/dist/board/source.test.d.ts +12 -0
- package/dist/board/source.test.d.ts.map +1 -0
- package/dist/board/source.test.js +165 -0
- package/dist/board/source.test.js.map +1 -0
- package/dist/board/tar.d.ts +28 -0
- package/dist/board/tar.d.ts.map +1 -0
- package/dist/board/tar.js +188 -0
- package/dist/board/tar.js.map +1 -0
- package/dist/board/tar.test.d.ts +9 -0
- package/dist/board/tar.test.d.ts.map +1 -0
- package/dist/board/tar.test.js +110 -0
- package/dist/board/tar.test.js.map +1 -0
- package/dist/cli.js +37 -2
- package/dist/cli.js.map +1 -1
- package/dist/export.d.ts +31 -0
- package/dist/export.d.ts.map +1 -1
- package/dist/export.js +61 -1
- package/dist/export.js.map +1 -1
- package/dist/export.test.js +80 -1
- package/dist/export.test.js.map +1 -1
- package/dist/functions/board.js +709 -0
- package/dist/git-serve.d.ts +14 -1
- package/dist/git-serve.d.ts.map +1 -1
- package/dist/git-serve.js +30 -2
- package/dist/git-serve.js.map +1 -1
- package/dist/git-serve.test.d.ts +1 -0
- package/dist/git-serve.test.d.ts.map +1 -1
- package/dist/git-serve.test.js +36 -1
- package/dist/git-serve.test.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/skill/SKILL.md +10 -3
- package/src/board/github.ts +151 -0
- package/src/board/handler.test.ts +276 -0
- package/src/board/handler.ts +228 -0
- package/src/board/pages-function.ts +42 -0
- package/src/board/source.test.ts +203 -0
- package/src/board/source.ts +422 -0
- package/src/board/tar.test.ts +128 -0
- package/src/board/tar.ts +199 -0
- package/src/cli.ts +36 -2
- package/src/export.test.ts +108 -1
- package/src/export.ts +79 -1
- package/src/git-serve.test.ts +41 -1
- package/src/git-serve.ts +30 -2
- package/src/index.ts +10 -0
- package/ui/dist/assets/index-B8M_DaOt.js +229 -0
- package/ui/dist/index.html +1 -1
- package/ui/dist/assets/index-mJmm4sWq.js +0 -229
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function SS(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var mb={exports:{}},qu={};var x5;function aP(){if(x5)return qu;x5=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(r,i,s){var a=null;if(s!==void 0&&(a=""+s),i.key!==void 0&&(a=""+i.key),"key"in i){s={};for(var u in i)u!=="key"&&(s[u]=i[u])}else s=i;return i=s.ref,{$$typeof:t,type:r,key:a,ref:i!==void 0?i:null,props:s}}return qu.Fragment=e,qu.jsx=n,qu.jsxs=n,qu}var v5;function lP(){return v5||(v5=1,mb.exports=aP()),mb.exports}var C=lP(),gb={exports:{}},Te={};var k5;function uP(){if(k5)return Te;k5=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),a=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),g=Symbol.iterator;function b(L){return L===null||typeof L!="object"?null:(L=g&&L[g]||L["@@iterator"],typeof L=="function"?L:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,E={};function D(L,H,ie){this.props=L,this.context=H,this.refs=E,this.updater=ie||x}D.prototype.isReactComponent={},D.prototype.setState=function(L,H){if(typeof L!="object"&&typeof L!="function"&&L!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,L,H,"setState")},D.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function T(){}T.prototype=D.prototype;function $(L,H,ie){this.props=L,this.context=H,this.refs=E,this.updater=ie||x}var A=$.prototype=new T;A.constructor=$,k(A,D.prototype),A.isPureReactComponent=!0;var B=Array.isArray;function R(){}var M={H:null,A:null,T:null,S:null},O=Object.prototype.hasOwnProperty;function j(L,H,ie){var le=ie.ref;return{$$typeof:t,type:L,key:H,ref:le!==void 0?le:null,props:ie}}function q(L,H){return j(L.type,H,L.props)}function X(L){return typeof L=="object"&&L!==null&&L.$$typeof===t}function G(L){var H={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(ie){return H[ie]})}var Z=/\/+/g;function F(L,H){return typeof L=="object"&&L!==null&&L.key!=null?G(""+L.key):H.toString(36)}function te(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(R,R):(L.status="pending",L.then(function(H){L.status==="pending"&&(L.status="fulfilled",L.value=H)},function(H){L.status==="pending"&&(L.status="rejected",L.reason=H)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function P(L,H,ie,le,de){var he=typeof L;(he==="undefined"||he==="boolean")&&(L=null);var Ce=!1;if(L===null)Ce=!0;else switch(he){case"bigint":case"string":case"number":Ce=!0;break;case"object":switch(L.$$typeof){case t:case e:Ce=!0;break;case h:return Ce=L._init,P(Ce(L._payload),H,ie,le,de)}}if(Ce)return de=de(L),Ce=le===""?"."+F(L,0):le,B(de)?(ie="",Ce!=null&&(ie=Ce.replace(Z,"$&/")+"/"),P(de,H,ie,"",function(En){return En})):de!=null&&(X(de)&&(de=q(de,ie+(de.key==null||L&&L.key===de.key?"":(""+de.key).replace(Z,"$&/")+"/")+Ce)),H.push(de)),1;Ce=0;var Qe=le===""?".":le+":";if(B(L))for(var $e=0;$e<L.length;$e++)le=L[$e],he=Qe+F(le,$e),Ce+=P(le,H,ie,he,de);else if($e=b(L),typeof $e=="function")for(L=$e.call(L),$e=0;!(le=L.next()).done;)le=le.value,he=Qe+F(le,$e++),Ce+=P(le,H,ie,he,de);else if(he==="object"){if(typeof L.then=="function")return P(te(L),H,ie,le,de);throw H=String(L),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return Ce}function _(L,H,ie){if(L==null)return L;var le=[],de=0;return P(L,le,"","",function(he){return H.call(ie,he,de++)}),le}function W(L){if(L._status===-1){var H=L._result;H=H(),H.then(function(ie){(L._status===0||L._status===-1)&&(L._status=1,L._result=ie)},function(ie){(L._status===0||L._status===-1)&&(L._status=2,L._result=ie)}),L._status===-1&&(L._status=0,L._result=H)}if(L._status===1)return L._result.default;throw L._result}var ee=typeof reportError=="function"?reportError:function(L){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof L=="object"&&L!==null&&typeof L.message=="string"?String(L.message):String(L),error:L});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",L);return}console.error(L)},z={map:_,forEach:function(L,H,ie){_(L,function(){H.apply(this,arguments)},ie)},count:function(L){var H=0;return _(L,function(){H++}),H},toArray:function(L){return _(L,function(H){return H})||[]},only:function(L){if(!X(L))throw Error("React.Children.only expected to receive a single React element child.");return L}};return Te.Activity=m,Te.Children=z,Te.Component=D,Te.Fragment=n,Te.Profiler=i,Te.PureComponent=$,Te.StrictMode=r,Te.Suspense=c,Te.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Te.__COMPILER_RUNTIME={__proto__:null,c:function(L){return M.H.useMemoCache(L)}},Te.cache=function(L){return function(){return L.apply(null,arguments)}},Te.cacheSignal=function(){return null},Te.cloneElement=function(L,H,ie){if(L==null)throw Error("The argument must be a React element, but you passed "+L+".");var le=k({},L.props),de=L.key;if(H!=null)for(he in H.key!==void 0&&(de=""+H.key),H)!O.call(H,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&H.ref===void 0||(le[he]=H[he]);var he=arguments.length-2;if(he===1)le.children=ie;else if(1<he){for(var Ce=Array(he),Qe=0;Qe<he;Qe++)Ce[Qe]=arguments[Qe+2];le.children=Ce}return j(L.type,de,le)},Te.createContext=function(L){return L={$$typeof:a,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null},L.Provider=L,L.Consumer={$$typeof:s,_context:L},L},Te.createElement=function(L,H,ie){var le,de={},he=null;if(H!=null)for(le in H.key!==void 0&&(he=""+H.key),H)O.call(H,le)&&le!=="key"&&le!=="__self"&&le!=="__source"&&(de[le]=H[le]);var Ce=arguments.length-2;if(Ce===1)de.children=ie;else if(1<Ce){for(var Qe=Array(Ce),$e=0;$e<Ce;$e++)Qe[$e]=arguments[$e+2];de.children=Qe}if(L&&L.defaultProps)for(le in Ce=L.defaultProps,Ce)de[le]===void 0&&(de[le]=Ce[le]);return j(L,he,de)},Te.createRef=function(){return{current:null}},Te.forwardRef=function(L){return{$$typeof:u,render:L}},Te.isValidElement=X,Te.lazy=function(L){return{$$typeof:h,_payload:{_status:-1,_result:L},_init:W}},Te.memo=function(L,H){return{$$typeof:f,type:L,compare:H===void 0?null:H}},Te.startTransition=function(L){var H=M.T,ie={};M.T=ie;try{var le=L(),de=M.S;de!==null&&de(ie,le),typeof le=="object"&&le!==null&&typeof le.then=="function"&&le.then(R,ee)}catch(he){ee(he)}finally{H!==null&&ie.types!==null&&(H.types=ie.types),M.T=H}},Te.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Te.use=function(L){return M.H.use(L)},Te.useActionState=function(L,H,ie){return M.H.useActionState(L,H,ie)},Te.useCallback=function(L,H){return M.H.useCallback(L,H)},Te.useContext=function(L){return M.H.useContext(L)},Te.useDebugValue=function(){},Te.useDeferredValue=function(L,H){return M.H.useDeferredValue(L,H)},Te.useEffect=function(L,H){return M.H.useEffect(L,H)},Te.useEffectEvent=function(L){return M.H.useEffectEvent(L)},Te.useId=function(){return M.H.useId()},Te.useImperativeHandle=function(L,H,ie){return M.H.useImperativeHandle(L,H,ie)},Te.useInsertionEffect=function(L,H){return M.H.useInsertionEffect(L,H)},Te.useLayoutEffect=function(L,H){return M.H.useLayoutEffect(L,H)},Te.useMemo=function(L,H){return M.H.useMemo(L,H)},Te.useOptimistic=function(L,H){return M.H.useOptimistic(L,H)},Te.useReducer=function(L,H,ie){return M.H.useReducer(L,H,ie)},Te.useRef=function(L){return M.H.useRef(L)},Te.useState=function(L){return M.H.useState(L)},Te.useSyncExternalStore=function(L,H,ie){return M.H.useSyncExternalStore(L,H,ie)},Te.useTransition=function(){return M.H.useTransition()},Te.version="19.2.4",Te}var C5;function dd(){return C5||(C5=1,gb.exports=uP()),gb.exports}var S=dd();const V=SS(S);var bb={exports:{}},Gu={},yb={exports:{}},xb={};var E5;function cP(){return E5||(E5=1,(function(t){function e(P,_){var W=P.length;P.push(_);e:for(;0<W;){var ee=W-1>>>1,z=P[ee];if(0<i(z,_))P[ee]=_,P[W]=z,W=ee;else break e}}function n(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var _=P[0],W=P.pop();if(W!==_){P[0]=W;e:for(var ee=0,z=P.length,L=z>>>1;ee<L;){var H=2*(ee+1)-1,ie=P[H],le=H+1,de=P[le];if(0>i(ie,W))le<z&&0>i(de,ie)?(P[ee]=de,P[le]=W,ee=le):(P[ee]=ie,P[H]=W,ee=H);else if(le<z&&0>i(de,W))P[ee]=de,P[le]=W,ee=le;else break e}}return _}function i(P,_){var W=P.sortIndex-_.sortIndex;return W!==0?W:P.id-_.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var a=Date,u=a.now();t.unstable_now=function(){return a.now()-u}}var c=[],f=[],h=1,m=null,g=3,b=!1,x=!1,k=!1,E=!1,D=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function A(P){for(var _=n(f);_!==null;){if(_.callback===null)r(f);else if(_.startTime<=P)r(f),_.sortIndex=_.expirationTime,e(c,_);else break;_=n(f)}}function B(P){if(k=!1,A(P),!x)if(n(c)!==null)x=!0,R||(R=!0,G());else{var _=n(f);_!==null&&te(B,_.startTime-P)}}var R=!1,M=-1,O=5,j=-1;function q(){return E?!0:!(t.unstable_now()-j<O)}function X(){if(E=!1,R){var P=t.unstable_now();j=P;var _=!0;try{e:{x=!1,k&&(k=!1,T(M),M=-1),b=!0;var W=g;try{t:{for(A(P),m=n(c);m!==null&&!(m.expirationTime>P&&q());){var ee=m.callback;if(typeof ee=="function"){m.callback=null,g=m.priorityLevel;var z=ee(m.expirationTime<=P);if(P=t.unstable_now(),typeof z=="function"){m.callback=z,A(P),_=!0;break t}m===n(c)&&r(c),A(P)}else r(c);m=n(c)}if(m!==null)_=!0;else{var L=n(f);L!==null&&te(B,L.startTime-P),_=!1}}break e}finally{m=null,g=W,b=!1}_=void 0}}finally{_?G():R=!1}}}var G;if(typeof $=="function")G=function(){$(X)};else if(typeof MessageChannel<"u"){var Z=new MessageChannel,F=Z.port2;Z.port1.onmessage=X,G=function(){F.postMessage(null)}}else G=function(){D(X,0)};function te(P,_){M=D(function(){P(t.unstable_now())},_)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(P){P.callback=null},t.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<P?Math.floor(1e3/P):5},t.unstable_getCurrentPriorityLevel=function(){return g},t.unstable_next=function(P){switch(g){case 1:case 2:case 3:var _=3;break;default:_=g}var W=g;g=_;try{return P()}finally{g=W}},t.unstable_requestPaint=function(){E=!0},t.unstable_runWithPriority=function(P,_){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var W=g;g=P;try{return _()}finally{g=W}},t.unstable_scheduleCallback=function(P,_,W){var ee=t.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?ee+W:ee):W=ee,P){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=W+z,P={id:h++,callback:_,priorityLevel:P,startTime:W,expirationTime:z,sortIndex:-1},W>ee?(P.sortIndex=W,e(f,P),n(c)===null&&P===n(f)&&(k?(T(M),M=-1):k=!0,te(B,W-ee))):(P.sortIndex=z,e(c,P),x||b||(x=!0,R||(R=!0,G()))),P},t.unstable_shouldYield=q,t.unstable_wrapCallback=function(P){var _=g;return function(){var W=g;g=_;try{return P.apply(this,arguments)}finally{g=W}}}})(xb)),xb}var D5;function dP(){return D5||(D5=1,yb.exports=cP()),yb.exports}var vb={exports:{}},un={};var S5;function fP(){if(S5)return un;S5=1;var t=dd();function e(c){var f="https://react.dev/errors/"+c;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)f+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+c+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(e(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function s(c,f,h){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:m==null?null:""+m,children:c,containerInfo:f,implementation:h}}var a=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(c,f){if(c==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return un.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,un.createPortal=function(c,f){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(e(299));return s(c,f,null,h)},un.flushSync=function(c){var f=a.T,h=r.p;try{if(a.T=null,r.p=2,c)return c()}finally{a.T=f,r.p=h,r.d.f()}},un.preconnect=function(c,f){typeof c=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(c,f))},un.prefetchDNS=function(c){typeof c=="string"&&r.d.D(c)},un.preinit=function(c,f){if(typeof c=="string"&&f&&typeof f.as=="string"){var h=f.as,m=u(h,f.crossOrigin),g=typeof f.integrity=="string"?f.integrity:void 0,b=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;h==="style"?r.d.S(c,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:m,integrity:g,fetchPriority:b}):h==="script"&&r.d.X(c,{crossOrigin:m,integrity:g,fetchPriority:b,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},un.preinitModule=function(c,f){if(typeof c=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var h=u(f.as,f.crossOrigin);r.d.M(c,{crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(c)},un.preload=function(c,f){if(typeof c=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var h=f.as,m=u(h,f.crossOrigin);r.d.L(c,h,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},un.preloadModule=function(c,f){if(typeof c=="string")if(f){var h=u(f.as,f.crossOrigin);r.d.m(c,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(c)},un.requestFormReset=function(c){r.d.r(c)},un.unstable_batchedUpdates=function(c,f){return c(f)},un.useFormState=function(c,f,h){return a.H.useFormState(c,f,h)},un.useFormStatus=function(){return a.H.useHostTransitionStatus()},un.version="19.2.4",un}var w5;function wS(){if(w5)return vb.exports;w5=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),vb.exports=fP(),vb.exports}var $5;function hP(){if($5)return Gu;$5=1;var t=dP(),e=dd(),n=wS();function r(o){var l="https://react.dev/errors/"+o;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+o+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function s(o){var l=o,d=o;if(o.alternate)for(;l.return;)l=l.return;else{o=l;do l=o,(l.flags&4098)!==0&&(d=l.return),o=l.return;while(o)}return l.tag===3?d:null}function a(o){if(o.tag===13){var l=o.memoizedState;if(l===null&&(o=o.alternate,o!==null&&(l=o.memoizedState)),l!==null)return l.dehydrated}return null}function u(o){if(o.tag===31){var l=o.memoizedState;if(l===null&&(o=o.alternate,o!==null&&(l=o.memoizedState)),l!==null)return l.dehydrated}return null}function c(o){if(s(o)!==o)throw Error(r(188))}function f(o){var l=o.alternate;if(!l){if(l=s(o),l===null)throw Error(r(188));return l!==o?null:o}for(var d=o,p=l;;){var y=d.return;if(y===null)break;var v=y.alternate;if(v===null){if(p=y.return,p!==null){d=p;continue}break}if(y.child===v.child){for(v=y.child;v;){if(v===d)return c(y),o;if(v===p)return c(y),l;v=v.sibling}throw Error(r(188))}if(d.return!==p.return)d=y,p=v;else{for(var w=!1,N=y.child;N;){if(N===d){w=!0,d=y,p=v;break}if(N===p){w=!0,p=y,d=v;break}N=N.sibling}if(!w){for(N=v.child;N;){if(N===d){w=!0,d=v,p=y;break}if(N===p){w=!0,p=v,d=y;break}N=N.sibling}if(!w)throw Error(r(189))}}if(d.alternate!==p)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?o:l}function h(o){var l=o.tag;if(l===5||l===26||l===27||l===6)return o;for(o=o.child;o!==null;){if(l=h(o),l!==null)return l;o=o.sibling}return null}var m=Object.assign,g=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),$=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),q=Symbol.for("react.memo_cache_sentinel"),X=Symbol.iterator;function G(o){return o===null||typeof o!="object"?null:(o=X&&o[X]||o["@@iterator"],typeof o=="function"?o:null)}var Z=Symbol.for("react.client.reference");function F(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===Z?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case k:return"Fragment";case D:return"Profiler";case E:return"StrictMode";case B:return"Suspense";case R:return"SuspenseList";case j:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case x:return"Portal";case $:return o.displayName||"Context";case T:return(o._context.displayName||"Context")+".Consumer";case A:var l=o.render;return o=o.displayName,o||(o=l.displayName||l.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case M:return l=o.displayName||null,l!==null?l:F(o.type)||"Memo";case O:l=o._payload,o=o._init;try{return F(o(l))}catch{}}return null}var te=Array.isArray,P=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,_=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},ee=[],z=-1;function L(o){return{current:o}}function H(o){0>z||(o.current=ee[z],ee[z]=null,z--)}function ie(o,l){z++,ee[z]=o.current,o.current=l}var le=L(null),de=L(null),he=L(null),Ce=L(null);function Qe(o,l){switch(ie(he,l),ie(de,o),ie(le,null),l.nodeType){case 9:case 11:o=(o=l.documentElement)&&(o=o.namespaceURI)?_k(o):0;break;default:if(o=l.tagName,l=l.namespaceURI)l=_k(l),o=Vk(l,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}H(le),ie(le,o)}function $e(){H(le),H(de),H(he)}function En(o){o.memoizedState!==null&&ie(Ce,o);var l=le.current,d=Vk(l,o.type);l!==d&&(ie(de,o),ie(le,d))}function ln(o){de.current===o&&(H(le),H(de)),Ce.current===o&&(H(Ce),_u._currentValue=W)}var mn,br;function Ht(o){if(mn===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);mn=l&&l[1]||"",br=-1<d.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+mn+o+br}var Ui=!1;function Be(o,l){if(!o||Ui)return"";Ui=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var p={DetermineComponentFrameRoot:function(){try{if(l){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(ne){var J=ne}Reflect.construct(o,[],oe)}else{try{oe.call()}catch(ne){J=ne}o.call(oe.prototype)}}else{try{throw Error()}catch(ne){J=ne}(oe=o())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(ne){if(ne&&J&&typeof ne.stack=="string")return[ne.stack,J.stack]}return[null,null]}};p.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(p.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(p.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var v=p.DetermineComponentFrameRoot(),w=v[0],N=v[1];if(w&&N){var I=w.split(`
|
|
4
|
+
`),Y=N.split(`
|
|
5
|
+
`);for(y=p=0;p<I.length&&!I[p].includes("DetermineComponentFrameRoot");)p++;for(;y<Y.length&&!Y[y].includes("DetermineComponentFrameRoot");)y++;if(p===I.length||y===Y.length)for(p=I.length-1,y=Y.length-1;1<=p&&0<=y&&I[p]!==Y[y];)y--;for(;1<=p&&0<=y;p--,y--)if(I[p]!==Y[y]){if(p!==1||y!==1)do if(p--,y--,0>y||I[p]!==Y[y]){var re=`
|
|
6
|
+
`+I[p].replace(" at new "," at ");return o.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",o.displayName)),re}while(1<=p&&0<=y);break}}}finally{Ui=!1,Error.prepareStackTrace=d}return(d=o?o.displayName||o.name:"")?Ht(d):""}function Xr(o,l){switch(o.tag){case 26:case 27:case 5:return Ht(o.type);case 16:return Ht("Lazy");case 13:return o.child!==l&&l!==null?Ht("Suspense Fallback"):Ht("Suspense");case 19:return Ht("SuspenseList");case 0:case 15:return Be(o.type,!1);case 11:return Be(o.type.render,!1);case 1:return Be(o.type,!0);case 31:return Ht("Activity");default:return""}}function Jr(o){try{var l="",d=null;do l+=Xr(o,d),d=o,o=o.return;while(o);return l}catch(p){return`
|
|
7
|
+
Error generating stack: `+p.message+`
|
|
8
|
+
`+p.stack}}var io=Object.prototype.hasOwnProperty,Xl=t.unstable_scheduleCallback,Jl=t.unstable_cancelCallback,Md=t.unstable_shouldYield,It=t.unstable_requestPaint,gt=t.unstable_now,so=t.unstable_getCurrentPriorityLevel,Zl=t.unstable_ImmediatePriority,k1=t.unstable_UserBlockingPriority,Nd=t.unstable_NormalPriority,_N=t.unstable_LowPriority,C1=t.unstable_IdlePriority,VN=t.log,HN=t.unstable_setDisableYieldValue,eu=null,jn=null;function qi(o){if(typeof VN=="function"&&HN(o),jn&&typeof jn.setStrictMode=="function")try{jn.setStrictMode(eu,o)}catch{}}var Fn=Math.clz32?Math.clz32:GN,UN=Math.log,qN=Math.LN2;function GN(o){return o>>>=0,o===0?32:31-(UN(o)/qN|0)|0}var Rd=256,Od=262144,Pd=4194304;function oo(o){var l=o&42;if(l!==0)return l;switch(o&-o){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return o&261888;case 262144:case 524288:case 1048576:case 2097152:return o&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return o&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return o}}function zd(o,l,d){var p=o.pendingLanes;if(p===0)return 0;var y=0,v=o.suspendedLanes,w=o.pingedLanes;o=o.warmLanes;var N=p&134217727;return N!==0?(p=N&~v,p!==0?y=oo(p):(w&=N,w!==0?y=oo(w):d||(d=N&~o,d!==0&&(y=oo(d))))):(N=p&~v,N!==0?y=oo(N):w!==0?y=oo(w):d||(d=p&~o,d!==0&&(y=oo(d)))),y===0?0:l!==0&&l!==y&&(l&v)===0&&(v=y&-y,d=l&-l,v>=d||v===32&&(d&4194048)!==0)?l:y}function tu(o,l){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&l)===0}function WN(o,l){switch(o){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function E1(){var o=Pd;return Pd<<=1,(Pd&62914560)===0&&(Pd=4194304),o}function rg(o){for(var l=[],d=0;31>d;d++)l.push(o);return l}function nu(o,l){o.pendingLanes|=l,l!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function QN(o,l,d,p,y,v){var w=o.pendingLanes;o.pendingLanes=d,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=d,o.entangledLanes&=d,o.errorRecoveryDisabledLanes&=d,o.shellSuspendCounter=0;var N=o.entanglements,I=o.expirationTimes,Y=o.hiddenUpdates;for(d=w&~d;0<d;){var re=31-Fn(d),oe=1<<re;N[re]=0,I[re]=-1;var J=Y[re];if(J!==null)for(Y[re]=null,re=0;re<J.length;re++){var ne=J[re];ne!==null&&(ne.lane&=-536870913)}d&=~oe}p!==0&&D1(o,p,0),v!==0&&y===0&&o.tag!==0&&(o.suspendedLanes|=v&~(w&~l))}function D1(o,l,d){o.pendingLanes|=l,o.suspendedLanes&=~l;var p=31-Fn(l);o.entangledLanes|=l,o.entanglements[p]=o.entanglements[p]|1073741824|d&261930}function S1(o,l){var d=o.entangledLanes|=l;for(o=o.entanglements;d;){var p=31-Fn(d),y=1<<p;y&l|o[p]&l&&(o[p]|=l),d&=~y}}function w1(o,l){var d=l&-l;return d=(d&42)!==0?1:ig(d),(d&(o.suspendedLanes|l))!==0?0:d}function ig(o){switch(o){case 2:o=1;break;case 8:o=4;break;case 32:o=16;break;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:o=128;break;case 268435456:o=134217728;break;default:o=0}return o}function sg(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function $1(){var o=_.p;return o!==0?o:(o=window.event,o===void 0?32:f5(o.type))}function T1(o,l){var d=_.p;try{return _.p=o,l()}finally{_.p=d}}var Gi=Math.random().toString(36).slice(2),Yt="__reactFiber$"+Gi,Dn="__reactProps$"+Gi,Ca="__reactContainer$"+Gi,og="__reactEvents$"+Gi,YN="__reactListeners$"+Gi,XN="__reactHandles$"+Gi,A1="__reactResources$"+Gi,ru="__reactMarker$"+Gi;function ag(o){delete o[Yt],delete o[Dn],delete o[og],delete o[YN],delete o[XN]}function Ea(o){var l=o[Yt];if(l)return l;for(var d=o.parentNode;d;){if(l=d[Ca]||d[Yt]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(o=Yk(o);o!==null;){if(d=o[Yt])return d;o=Yk(o)}return l}o=d,d=o.parentNode}return null}function Da(o){if(o=o[Yt]||o[Ca]){var l=o.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return o}return null}function iu(o){var l=o.tag;if(l===5||l===26||l===27||l===6)return o.stateNode;throw Error(r(33))}function Sa(o){var l=o[A1];return l||(l=o[A1]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function Ut(o){o[ru]=!0}var B1=new Set,M1={};function ao(o,l){wa(o,l),wa(o+"Capture",l)}function wa(o,l){for(M1[o]=l,o=0;o<l.length;o++)B1.add(l[o])}var JN=RegExp("^[: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]*$"),N1={},R1={};function ZN(o){return io.call(R1,o)?!0:io.call(N1,o)?!1:JN.test(o)?R1[o]=!0:(N1[o]=!0,!1)}function Ld(o,l,d){if(ZN(l))if(d===null)o.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":o.removeAttribute(l);return;case"boolean":var p=l.toLowerCase().slice(0,5);if(p!=="data-"&&p!=="aria-"){o.removeAttribute(l);return}}o.setAttribute(l,""+d)}}function Id(o,l,d){if(d===null)o.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(l);return}o.setAttribute(l,""+d)}}function Zr(o,l,d,p){if(p===null)o.removeAttribute(d);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(d);return}o.setAttributeNS(l,d,""+p)}}function Jn(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function O1(o){var l=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function eR(o,l,d){var p=Object.getOwnPropertyDescriptor(o.constructor.prototype,l);if(!o.hasOwnProperty(l)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var y=p.get,v=p.set;return Object.defineProperty(o,l,{configurable:!0,get:function(){return y.call(this)},set:function(w){d=""+w,v.call(this,w)}}),Object.defineProperty(o,l,{enumerable:p.enumerable}),{getValue:function(){return d},setValue:function(w){d=""+w},stopTracking:function(){o._valueTracker=null,delete o[l]}}}}function lg(o){if(!o._valueTracker){var l=O1(o)?"checked":"value";o._valueTracker=eR(o,l,""+o[l])}}function P1(o){if(!o)return!1;var l=o._valueTracker;if(!l)return!0;var d=l.getValue(),p="";return o&&(p=O1(o)?o.checked?"true":"false":o.value),o=p,o!==d?(l.setValue(o),!0):!1}function jd(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}var tR=/[\n"\\]/g;function Zn(o){return o.replace(tR,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function ug(o,l,d,p,y,v,w,N){o.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?o.type=w:o.removeAttribute("type"),l!=null?w==="number"?(l===0&&o.value===""||o.value!=l)&&(o.value=""+Jn(l)):o.value!==""+Jn(l)&&(o.value=""+Jn(l)):w!=="submit"&&w!=="reset"||o.removeAttribute("value"),l!=null?cg(o,w,Jn(l)):d!=null?cg(o,w,Jn(d)):p!=null&&o.removeAttribute("value"),y==null&&v!=null&&(o.defaultChecked=!!v),y!=null&&(o.checked=y&&typeof y!="function"&&typeof y!="symbol"),N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?o.name=""+Jn(N):o.removeAttribute("name")}function z1(o,l,d,p,y,v,w,N){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(o.type=v),l!=null||d!=null){if(!(v!=="submit"&&v!=="reset"||l!=null)){lg(o);return}d=d!=null?""+Jn(d):"",l=l!=null?""+Jn(l):d,N||l===o.value||(o.value=l),o.defaultValue=l}p=p??y,p=typeof p!="function"&&typeof p!="symbol"&&!!p,o.checked=N?o.checked:!!p,o.defaultChecked=!!p,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(o.name=w),lg(o)}function cg(o,l,d){l==="number"&&jd(o.ownerDocument)===o||o.defaultValue===""+d||(o.defaultValue=""+d)}function $a(o,l,d,p){if(o=o.options,l){l={};for(var y=0;y<d.length;y++)l["$"+d[y]]=!0;for(d=0;d<o.length;d++)y=l.hasOwnProperty("$"+o[d].value),o[d].selected!==y&&(o[d].selected=y),y&&p&&(o[d].defaultSelected=!0)}else{for(d=""+Jn(d),l=null,y=0;y<o.length;y++){if(o[y].value===d){o[y].selected=!0,p&&(o[y].defaultSelected=!0);return}l!==null||o[y].disabled||(l=o[y])}l!==null&&(l.selected=!0)}}function L1(o,l,d){if(l!=null&&(l=""+Jn(l),l!==o.value&&(o.value=l),d==null)){o.defaultValue!==l&&(o.defaultValue=l);return}o.defaultValue=d!=null?""+Jn(d):""}function I1(o,l,d,p){if(l==null){if(p!=null){if(d!=null)throw Error(r(92));if(te(p)){if(1<p.length)throw Error(r(93));p=p[0]}d=p}d==null&&(d=""),l=d}d=Jn(l),o.defaultValue=d,p=o.textContent,p===d&&p!==""&&p!==null&&(o.value=p),lg(o)}function Ta(o,l){if(l){var d=o.firstChild;if(d&&d===o.lastChild&&d.nodeType===3){d.nodeValue=l;return}}o.textContent=l}var nR=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function j1(o,l,d){var p=l.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?p?o.setProperty(l,""):l==="float"?o.cssFloat="":o[l]="":p?o.setProperty(l,d):typeof d!="number"||d===0||nR.has(l)?l==="float"?o.cssFloat=d:o[l]=(""+d).trim():o[l]=d+"px"}function F1(o,l,d){if(l!=null&&typeof l!="object")throw Error(r(62));if(o=o.style,d!=null){for(var p in d)!d.hasOwnProperty(p)||l!=null&&l.hasOwnProperty(p)||(p.indexOf("--")===0?o.setProperty(p,""):p==="float"?o.cssFloat="":o[p]="");for(var y in l)p=l[y],l.hasOwnProperty(y)&&d[y]!==p&&j1(o,y,p)}else for(var v in l)l.hasOwnProperty(v)&&j1(o,v,l[v])}function dg(o){if(o.indexOf("-")===-1)return!1;switch(o){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 rR=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["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"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["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"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["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"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),iR=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Fd(o){return iR.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}function ei(){}var fg=null;function hg(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var Aa=null,Ba=null;function K1(o){var l=Da(o);if(l&&(o=l.stateNode)){var d=o[Dn]||null;e:switch(o=l.stateNode,l.type){case"input":if(ug(o,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name),l=d.name,d.type==="radio"&&l!=null){for(d=o;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll('input[name="'+Zn(""+l)+'"][type="radio"]'),l=0;l<d.length;l++){var p=d[l];if(p!==o&&p.form===o.form){var y=p[Dn]||null;if(!y)throw Error(r(90));ug(p,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(l=0;l<d.length;l++)p=d[l],p.form===o.form&&P1(p)}break e;case"textarea":L1(o,d.value,d.defaultValue);break e;case"select":l=d.value,l!=null&&$a(o,!!d.multiple,l,!1)}}}var pg=!1;function _1(o,l,d){if(pg)return o(l,d);pg=!0;try{var p=o(l);return p}finally{if(pg=!1,(Aa!==null||Ba!==null)&&(Tf(),Aa&&(l=Aa,o=Ba,Ba=Aa=null,K1(l),o)))for(l=0;l<o.length;l++)K1(o[l])}}function su(o,l){var d=o.stateNode;if(d===null)return null;var p=d[Dn]||null;if(p===null)return null;d=p[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(o=o.type,p=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!p;break e;default:o=!1}if(o)return null;if(d&&typeof d!="function")throw Error(r(231,l,typeof d));return d}var ti=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),mg=!1;if(ti)try{var ou={};Object.defineProperty(ou,"passive",{get:function(){mg=!0}}),window.addEventListener("test",ou,ou),window.removeEventListener("test",ou,ou)}catch{mg=!1}var Wi=null,gg=null,Kd=null;function V1(){if(Kd)return Kd;var o,l=gg,d=l.length,p,y="value"in Wi?Wi.value:Wi.textContent,v=y.length;for(o=0;o<d&&l[o]===y[o];o++);var w=d-o;for(p=1;p<=w&&l[d-p]===y[v-p];p++);return Kd=y.slice(o,1<p?1-p:void 0)}function _d(o){var l=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&l===13&&(o=13)):o=l,o===10&&(o=13),32<=o||o===13?o:0}function Vd(){return!0}function H1(){return!1}function Sn(o){function l(d,p,y,v,w){this._reactName=d,this._targetInst=y,this.type=p,this.nativeEvent=v,this.target=w,this.currentTarget=null;for(var N in o)o.hasOwnProperty(N)&&(d=o[N],this[N]=d?d(v):v[N]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?Vd:H1,this.isPropagationStopped=H1,this}return m(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=Vd)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=Vd)},persist:function(){},isPersistent:Vd}),l}var lo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Hd=Sn(lo),au=m({},lo,{view:0,detail:0}),sR=Sn(au),bg,yg,lu,Ud=m({},au,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vg,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==lu&&(lu&&o.type==="mousemove"?(bg=o.screenX-lu.screenX,yg=o.screenY-lu.screenY):yg=bg=0,lu=o),bg)},movementY:function(o){return"movementY"in o?o.movementY:yg}}),U1=Sn(Ud),oR=m({},Ud,{dataTransfer:0}),aR=Sn(oR),lR=m({},au,{relatedTarget:0}),xg=Sn(lR),uR=m({},lo,{animationName:0,elapsedTime:0,pseudoElement:0}),cR=Sn(uR),dR=m({},lo,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),fR=Sn(dR),hR=m({},lo,{data:0}),q1=Sn(hR),pR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},mR={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"},gR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function bR(o){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(o):(o=gR[o])?!!l[o]:!1}function vg(){return bR}var yR=m({},au,{key:function(o){if(o.key){var l=pR[o.key]||o.key;if(l!=="Unidentified")return l}return o.type==="keypress"?(o=_d(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?mR[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vg,charCode:function(o){return o.type==="keypress"?_d(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?_d(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),xR=Sn(yR),vR=m({},Ud,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),G1=Sn(vR),kR=m({},au,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vg}),CR=Sn(kR),ER=m({},lo,{propertyName:0,elapsedTime:0,pseudoElement:0}),DR=Sn(ER),SR=m({},Ud,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),wR=Sn(SR),$R=m({},lo,{newState:0,oldState:0}),TR=Sn($R),AR=[9,13,27,32],kg=ti&&"CompositionEvent"in window,uu=null;ti&&"documentMode"in document&&(uu=document.documentMode);var BR=ti&&"TextEvent"in window&&!uu,W1=ti&&(!kg||uu&&8<uu&&11>=uu),Q1=" ",Y1=!1;function X1(o,l){switch(o){case"keyup":return AR.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function J1(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var Ma=!1;function MR(o,l){switch(o){case"compositionend":return J1(l);case"keypress":return l.which!==32?null:(Y1=!0,Q1);case"textInput":return o=l.data,o===Q1&&Y1?null:o;default:return null}}function NR(o,l){if(Ma)return o==="compositionend"||!kg&&X1(o,l)?(o=V1(),Kd=gg=Wi=null,Ma=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return W1&&l.locale!=="ko"?null:l.data;default:return null}}var RR={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 Z1(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l==="input"?!!RR[o.type]:l==="textarea"}function ev(o,l,d,p){Aa?Ba?Ba.push(p):Ba=[p]:Aa=p,l=Pf(l,"onChange"),0<l.length&&(d=new Hd("onChange","change",null,d,p),o.push({event:d,listeners:l}))}var cu=null,du=null;function OR(o){zk(o,0)}function qd(o){var l=iu(o);if(P1(l))return o}function tv(o,l){if(o==="change")return l}var nv=!1;if(ti){var Cg;if(ti){var Eg="oninput"in document;if(!Eg){var rv=document.createElement("div");rv.setAttribute("oninput","return;"),Eg=typeof rv.oninput=="function"}Cg=Eg}else Cg=!1;nv=Cg&&(!document.documentMode||9<document.documentMode)}function iv(){cu&&(cu.detachEvent("onpropertychange",sv),du=cu=null)}function sv(o){if(o.propertyName==="value"&&qd(du)){var l=[];ev(l,du,o,hg(o)),_1(OR,l)}}function PR(o,l,d){o==="focusin"?(iv(),cu=l,du=d,cu.attachEvent("onpropertychange",sv)):o==="focusout"&&iv()}function zR(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return qd(du)}function LR(o,l){if(o==="click")return qd(l)}function IR(o,l){if(o==="input"||o==="change")return qd(l)}function jR(o,l){return o===l&&(o!==0||1/o===1/l)||o!==o&&l!==l}var Kn=typeof Object.is=="function"?Object.is:jR;function fu(o,l){if(Kn(o,l))return!0;if(typeof o!="object"||o===null||typeof l!="object"||l===null)return!1;var d=Object.keys(o),p=Object.keys(l);if(d.length!==p.length)return!1;for(p=0;p<d.length;p++){var y=d[p];if(!io.call(l,y)||!Kn(o[y],l[y]))return!1}return!0}function ov(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function av(o,l){var d=ov(o);o=0;for(var p;d;){if(d.nodeType===3){if(p=o+d.textContent.length,o<=l&&p>=l)return{node:d,offset:l-o};o=p}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=ov(d)}}function lv(o,l){return o&&l?o===l?!0:o&&o.nodeType===3?!1:l&&l.nodeType===3?lv(o,l.parentNode):"contains"in o?o.contains(l):o.compareDocumentPosition?!!(o.compareDocumentPosition(l)&16):!1:!1}function uv(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var l=jd(o.document);l instanceof o.HTMLIFrameElement;){try{var d=typeof l.contentWindow.location.href=="string"}catch{d=!1}if(d)o=l.contentWindow;else break;l=jd(o.document)}return l}function Dg(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l&&(l==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||l==="textarea"||o.contentEditable==="true")}var FR=ti&&"documentMode"in document&&11>=document.documentMode,Na=null,Sg=null,hu=null,wg=!1;function cv(o,l,d){var p=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;wg||Na==null||Na!==jd(p)||(p=Na,"selectionStart"in p&&Dg(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),hu&&fu(hu,p)||(hu=p,p=Pf(Sg,"onSelect"),0<p.length&&(l=new Hd("onSelect","select",null,l,d),o.push({event:l,listeners:p}),l.target=Na)))}function uo(o,l){var d={};return d[o.toLowerCase()]=l.toLowerCase(),d["Webkit"+o]="webkit"+l,d["Moz"+o]="moz"+l,d}var Ra={animationend:uo("Animation","AnimationEnd"),animationiteration:uo("Animation","AnimationIteration"),animationstart:uo("Animation","AnimationStart"),transitionrun:uo("Transition","TransitionRun"),transitionstart:uo("Transition","TransitionStart"),transitioncancel:uo("Transition","TransitionCancel"),transitionend:uo("Transition","TransitionEnd")},$g={},dv={};ti&&(dv=document.createElement("div").style,"AnimationEvent"in window||(delete Ra.animationend.animation,delete Ra.animationiteration.animation,delete Ra.animationstart.animation),"TransitionEvent"in window||delete Ra.transitionend.transition);function co(o){if($g[o])return $g[o];if(!Ra[o])return o;var l=Ra[o],d;for(d in l)if(l.hasOwnProperty(d)&&d in dv)return $g[o]=l[d];return o}var fv=co("animationend"),hv=co("animationiteration"),pv=co("animationstart"),KR=co("transitionrun"),_R=co("transitionstart"),VR=co("transitioncancel"),mv=co("transitionend"),gv=new Map,Tg="abort auxClick beforeToggle 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(" ");Tg.push("scrollEnd");function yr(o,l){gv.set(o,l),ao(l,[o])}var Gd=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)},er=[],Oa=0,Ag=0;function Wd(){for(var o=Oa,l=Ag=Oa=0;l<o;){var d=er[l];er[l++]=null;var p=er[l];er[l++]=null;var y=er[l];er[l++]=null;var v=er[l];if(er[l++]=null,p!==null&&y!==null){var w=p.pending;w===null?y.next=y:(y.next=w.next,w.next=y),p.pending=y}v!==0&&bv(d,y,v)}}function Qd(o,l,d,p){er[Oa++]=o,er[Oa++]=l,er[Oa++]=d,er[Oa++]=p,Ag|=p,o.lanes|=p,o=o.alternate,o!==null&&(o.lanes|=p)}function Bg(o,l,d,p){return Qd(o,l,d,p),Yd(o)}function fo(o,l){return Qd(o,null,null,l),Yd(o)}function bv(o,l,d){o.lanes|=d;var p=o.alternate;p!==null&&(p.lanes|=d);for(var y=!1,v=o.return;v!==null;)v.childLanes|=d,p=v.alternate,p!==null&&(p.childLanes|=d),v.tag===22&&(o=v.stateNode,o===null||o._visibility&1||(y=!0)),o=v,v=v.return;return o.tag===3?(v=o.stateNode,y&&l!==null&&(y=31-Fn(d),o=v.hiddenUpdates,p=o[y],p===null?o[y]=[l]:p.push(l),l.lane=d|536870912),v):null}function Yd(o){if(50<Pu)throw Pu=0,j0=null,Error(r(185));for(var l=o.return;l!==null;)o=l,l=o.return;return o.tag===3?o.stateNode:null}var Pa={};function HR(o,l,d,p){this.tag=o,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _n(o,l,d,p){return new HR(o,l,d,p)}function Mg(o){return o=o.prototype,!(!o||!o.isReactComponent)}function ni(o,l){var d=o.alternate;return d===null?(d=_n(o.tag,l,o.key,o.mode),d.elementType=o.elementType,d.type=o.type,d.stateNode=o.stateNode,d.alternate=o,o.alternate=d):(d.pendingProps=l,d.type=o.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=o.flags&65011712,d.childLanes=o.childLanes,d.lanes=o.lanes,d.child=o.child,d.memoizedProps=o.memoizedProps,d.memoizedState=o.memoizedState,d.updateQueue=o.updateQueue,l=o.dependencies,d.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},d.sibling=o.sibling,d.index=o.index,d.ref=o.ref,d.refCleanup=o.refCleanup,d}function yv(o,l){o.flags&=65011714;var d=o.alternate;return d===null?(o.childLanes=0,o.lanes=l,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=d.childLanes,o.lanes=d.lanes,o.child=d.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=d.memoizedProps,o.memoizedState=d.memoizedState,o.updateQueue=d.updateQueue,o.type=d.type,l=d.dependencies,o.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),o}function Xd(o,l,d,p,y,v){var w=0;if(p=o,typeof o=="function")Mg(o)&&(w=1);else if(typeof o=="string")w=QO(o,d,le.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case j:return o=_n(31,d,l,y),o.elementType=j,o.lanes=v,o;case k:return ho(d.children,y,v,l);case E:w=8,y|=24;break;case D:return o=_n(12,d,l,y|2),o.elementType=D,o.lanes=v,o;case B:return o=_n(13,d,l,y),o.elementType=B,o.lanes=v,o;case R:return o=_n(19,d,l,y),o.elementType=R,o.lanes=v,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case $:w=10;break e;case T:w=9;break e;case A:w=11;break e;case M:w=14;break e;case O:w=16,p=null;break e}w=29,d=Error(r(130,o===null?"null":typeof o,"")),p=null}return l=_n(w,d,l,y),l.elementType=o,l.type=p,l.lanes=v,l}function ho(o,l,d,p){return o=_n(7,o,p,l),o.lanes=d,o}function Ng(o,l,d){return o=_n(6,o,null,l),o.lanes=d,o}function xv(o){var l=_n(18,null,null,0);return l.stateNode=o,l}function Rg(o,l,d){return l=_n(4,o.children!==null?o.children:[],o.key,l),l.lanes=d,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}var vv=new WeakMap;function tr(o,l){if(typeof o=="object"&&o!==null){var d=vv.get(o);return d!==void 0?d:(l={value:o,source:l,stack:Jr(l)},vv.set(o,l),l)}return{value:o,source:l,stack:Jr(l)}}var za=[],La=0,Jd=null,pu=0,nr=[],rr=0,Qi=null,Rr=1,Or="";function ri(o,l){za[La++]=pu,za[La++]=Jd,Jd=o,pu=l}function kv(o,l,d){nr[rr++]=Rr,nr[rr++]=Or,nr[rr++]=Qi,Qi=o;var p=Rr;o=Or;var y=32-Fn(p)-1;p&=~(1<<y),d+=1;var v=32-Fn(l)+y;if(30<v){var w=y-y%5;v=(p&(1<<w)-1).toString(32),p>>=w,y-=w,Rr=1<<32-Fn(l)+y|d<<y|p,Or=v+o}else Rr=1<<v|d<<y|p,Or=o}function Og(o){o.return!==null&&(ri(o,1),kv(o,1,0))}function Pg(o){for(;o===Jd;)Jd=za[--La],za[La]=null,pu=za[--La],za[La]=null;for(;o===Qi;)Qi=nr[--rr],nr[rr]=null,Or=nr[--rr],nr[rr]=null,Rr=nr[--rr],nr[rr]=null}function Cv(o,l){nr[rr++]=Rr,nr[rr++]=Or,nr[rr++]=Qi,Rr=l.id,Or=l.overflow,Qi=o}var Xt=null,ut=null,Ve=!1,Yi=null,ir=!1,zg=Error(r(519));function Xi(o){var l=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw mu(tr(l,o)),zg}function Ev(o){var l=o.stateNode,d=o.type,p=o.memoizedProps;switch(l[Yt]=o,l[Dn]=p,d){case"dialog":Le("cancel",l),Le("close",l);break;case"iframe":case"object":case"embed":Le("load",l);break;case"video":case"audio":for(d=0;d<Lu.length;d++)Le(Lu[d],l);break;case"source":Le("error",l);break;case"img":case"image":case"link":Le("error",l),Le("load",l);break;case"details":Le("toggle",l);break;case"input":Le("invalid",l),z1(l,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":Le("invalid",l);break;case"textarea":Le("invalid",l),I1(l,p.value,p.defaultValue,p.children)}d=p.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||l.textContent===""+d||p.suppressHydrationWarning===!0||Fk(l.textContent,d)?(p.popover!=null&&(Le("beforetoggle",l),Le("toggle",l)),p.onScroll!=null&&Le("scroll",l),p.onScrollEnd!=null&&Le("scrollend",l),p.onClick!=null&&(l.onclick=ei),l=!0):l=!1,l||Xi(o,!0)}function Dv(o){for(Xt=o.return;Xt;)switch(Xt.tag){case 5:case 31:case 13:ir=!1;return;case 27:case 3:ir=!0;return;default:Xt=Xt.return}}function Ia(o){if(o!==Xt)return!1;if(!Ve)return Dv(o),Ve=!0,!1;var l=o.tag,d;if((d=l!==3&&l!==27)&&((d=l===5)&&(d=o.type,d=!(d!=="form"&&d!=="button")||eb(o.type,o.memoizedProps)),d=!d),d&&ut&&Xi(o),Dv(o),l===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));ut=Qk(o)}else if(l===31){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));ut=Qk(o)}else l===27?(l=ut,fs(o.type)?(o=sb,sb=null,ut=o):ut=l):ut=Xt?or(o.stateNode.nextSibling):null;return!0}function po(){ut=Xt=null,Ve=!1}function Lg(){var o=Yi;return o!==null&&(An===null?An=o:An.push.apply(An,o),Yi=null),o}function mu(o){Yi===null?Yi=[o]:Yi.push(o)}var Ig=L(null),mo=null,ii=null;function Ji(o,l,d){ie(Ig,l._currentValue),l._currentValue=d}function si(o){o._currentValue=Ig.current,H(Ig)}function jg(o,l,d){for(;o!==null;){var p=o.alternate;if((o.childLanes&l)!==l?(o.childLanes|=l,p!==null&&(p.childLanes|=l)):p!==null&&(p.childLanes&l)!==l&&(p.childLanes|=l),o===d)break;o=o.return}}function Fg(o,l,d,p){var y=o.child;for(y!==null&&(y.return=o);y!==null;){var v=y.dependencies;if(v!==null){var w=y.child;v=v.firstContext;e:for(;v!==null;){var N=v;v=y;for(var I=0;I<l.length;I++)if(N.context===l[I]){v.lanes|=d,N=v.alternate,N!==null&&(N.lanes|=d),jg(v.return,d,o),p||(w=null);break e}v=N.next}}else if(y.tag===18){if(w=y.return,w===null)throw Error(r(341));w.lanes|=d,v=w.alternate,v!==null&&(v.lanes|=d),jg(w,d,o),w=null}else w=y.child;if(w!==null)w.return=y;else for(w=y;w!==null;){if(w===o){w=null;break}if(y=w.sibling,y!==null){y.return=w.return,w=y;break}w=w.return}y=w}}function ja(o,l,d,p){o=null;for(var y=l,v=!1;y!==null;){if(!v){if((y.flags&524288)!==0)v=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var w=y.alternate;if(w===null)throw Error(r(387));if(w=w.memoizedProps,w!==null){var N=y.type;Kn(y.pendingProps.value,w.value)||(o!==null?o.push(N):o=[N])}}else if(y===Ce.current){if(w=y.alternate,w===null)throw Error(r(387));w.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(o!==null?o.push(_u):o=[_u])}y=y.return}o!==null&&Fg(l,o,d,p),l.flags|=262144}function Zd(o){for(o=o.firstContext;o!==null;){if(!Kn(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function go(o){mo=o,ii=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function Jt(o){return Sv(mo,o)}function ef(o,l){return mo===null&&go(o),Sv(o,l)}function Sv(o,l){var d=l._currentValue;if(l={context:l,memoizedValue:d,next:null},ii===null){if(o===null)throw Error(r(308));ii=l,o.dependencies={lanes:0,firstContext:l},o.flags|=524288}else ii=ii.next=l;return d}var UR=typeof AbortController<"u"?AbortController:function(){var o=[],l=this.signal={aborted:!1,addEventListener:function(d,p){o.push(p)}};this.abort=function(){l.aborted=!0,o.forEach(function(d){return d()})}},qR=t.unstable_scheduleCallback,GR=t.unstable_NormalPriority,Tt={$$typeof:$,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Kg(){return{controller:new UR,data:new Map,refCount:0}}function gu(o){o.refCount--,o.refCount===0&&qR(GR,function(){o.controller.abort()})}var bu=null,_g=0,Fa=0,Ka=null;function WR(o,l){if(bu===null){var d=bu=[];_g=0,Fa=U0(),Ka={status:"pending",value:void 0,then:function(p){d.push(p)}}}return _g++,l.then(wv,wv),l}function wv(){if(--_g===0&&bu!==null){Ka!==null&&(Ka.status="fulfilled");var o=bu;bu=null,Fa=0,Ka=null;for(var l=0;l<o.length;l++)(0,o[l])()}}function QR(o,l){var d=[],p={status:"pending",value:null,reason:null,then:function(y){d.push(y)}};return o.then(function(){p.status="fulfilled",p.value=l;for(var y=0;y<d.length;y++)(0,d[y])(l)},function(y){for(p.status="rejected",p.reason=y,y=0;y<d.length;y++)(0,d[y])(void 0)}),p}var $v=P.S;P.S=function(o,l){ck=gt(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&WR(o,l),$v!==null&&$v(o,l)};var bo=L(null);function Vg(){var o=bo.current;return o!==null?o:it.pooledCache}function tf(o,l){l===null?ie(bo,bo.current):ie(bo,l.pool)}function Tv(){var o=Vg();return o===null?null:{parent:Tt._currentValue,pool:o}}var _a=Error(r(460)),Hg=Error(r(474)),nf=Error(r(542)),rf={then:function(){}};function Av(o){return o=o.status,o==="fulfilled"||o==="rejected"}function Bv(o,l,d){switch(d=o[d],d===void 0?o.push(l):d!==l&&(l.then(ei,ei),l=d),l.status){case"fulfilled":return l.value;case"rejected":throw o=l.reason,Nv(o),o;default:if(typeof l.status=="string")l.then(ei,ei);else{if(o=it,o!==null&&100<o.shellSuspendCounter)throw Error(r(482));o=l,o.status="pending",o.then(function(p){if(l.status==="pending"){var y=l;y.status="fulfilled",y.value=p}},function(p){if(l.status==="pending"){var y=l;y.status="rejected",y.reason=p}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw o=l.reason,Nv(o),o}throw xo=l,_a}}function yo(o){try{var l=o._init;return l(o._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?(xo=d,_a):d}}var xo=null;function Mv(){if(xo===null)throw Error(r(459));var o=xo;return xo=null,o}function Nv(o){if(o===_a||o===nf)throw Error(r(483))}var Va=null,yu=0;function sf(o){var l=yu;return yu+=1,Va===null&&(Va=[]),Bv(Va,o,l)}function xu(o,l){l=l.props.ref,o.ref=l!==void 0?l:null}function of(o,l){throw l.$$typeof===g?Error(r(525)):(o=Object.prototype.toString.call(l),Error(r(31,o==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":o)))}function Rv(o){function l(U,K){if(o){var Q=U.deletions;Q===null?(U.deletions=[K],U.flags|=16):Q.push(K)}}function d(U,K){if(!o)return null;for(;K!==null;)l(U,K),K=K.sibling;return null}function p(U){for(var K=new Map;U!==null;)U.key!==null?K.set(U.key,U):K.set(U.index,U),U=U.sibling;return K}function y(U,K){return U=ni(U,K),U.index=0,U.sibling=null,U}function v(U,K,Q){return U.index=Q,o?(Q=U.alternate,Q!==null?(Q=Q.index,Q<K?(U.flags|=67108866,K):Q):(U.flags|=67108866,K)):(U.flags|=1048576,K)}function w(U){return o&&U.alternate===null&&(U.flags|=67108866),U}function N(U,K,Q,se){return K===null||K.tag!==6?(K=Ng(Q,U.mode,se),K.return=U,K):(K=y(K,Q),K.return=U,K)}function I(U,K,Q,se){var ve=Q.type;return ve===k?re(U,K,Q.props.children,se,Q.key):K!==null&&(K.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===O&&yo(ve)===K.type)?(K=y(K,Q.props),xu(K,Q),K.return=U,K):(K=Xd(Q.type,Q.key,Q.props,null,U.mode,se),xu(K,Q),K.return=U,K)}function Y(U,K,Q,se){return K===null||K.tag!==4||K.stateNode.containerInfo!==Q.containerInfo||K.stateNode.implementation!==Q.implementation?(K=Rg(Q,U.mode,se),K.return=U,K):(K=y(K,Q.children||[]),K.return=U,K)}function re(U,K,Q,se,ve){return K===null||K.tag!==7?(K=ho(Q,U.mode,se,ve),K.return=U,K):(K=y(K,Q),K.return=U,K)}function oe(U,K,Q){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return K=Ng(""+K,U.mode,Q),K.return=U,K;if(typeof K=="object"&&K!==null){switch(K.$$typeof){case b:return Q=Xd(K.type,K.key,K.props,null,U.mode,Q),xu(Q,K),Q.return=U,Q;case x:return K=Rg(K,U.mode,Q),K.return=U,K;case O:return K=yo(K),oe(U,K,Q)}if(te(K)||G(K))return K=ho(K,U.mode,Q,null),K.return=U,K;if(typeof K.then=="function")return oe(U,sf(K),Q);if(K.$$typeof===$)return oe(U,ef(U,K),Q);of(U,K)}return null}function J(U,K,Q,se){var ve=K!==null?K.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return ve!==null?null:N(U,K,""+Q,se);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case b:return Q.key===ve?I(U,K,Q,se):null;case x:return Q.key===ve?Y(U,K,Q,se):null;case O:return Q=yo(Q),J(U,K,Q,se)}if(te(Q)||G(Q))return ve!==null?null:re(U,K,Q,se,null);if(typeof Q.then=="function")return J(U,K,sf(Q),se);if(Q.$$typeof===$)return J(U,K,ef(U,Q),se);of(U,Q)}return null}function ne(U,K,Q,se,ve){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return U=U.get(Q)||null,N(K,U,""+se,ve);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case b:return U=U.get(se.key===null?Q:se.key)||null,I(K,U,se,ve);case x:return U=U.get(se.key===null?Q:se.key)||null,Y(K,U,se,ve);case O:return se=yo(se),ne(U,K,Q,se,ve)}if(te(se)||G(se))return U=U.get(Q)||null,re(K,U,se,ve,null);if(typeof se.then=="function")return ne(U,K,Q,sf(se),ve);if(se.$$typeof===$)return ne(U,K,Q,ef(K,se),ve);of(K,se)}return null}function be(U,K,Q,se){for(var ve=null,Ue=null,xe=K,Me=K=0,Ke=null;xe!==null&&Me<Q.length;Me++){xe.index>Me?(Ke=xe,xe=null):Ke=xe.sibling;var qe=J(U,xe,Q[Me],se);if(qe===null){xe===null&&(xe=Ke);break}o&&xe&&qe.alternate===null&&l(U,xe),K=v(qe,K,Me),Ue===null?ve=qe:Ue.sibling=qe,Ue=qe,xe=Ke}if(Me===Q.length)return d(U,xe),Ve&&ri(U,Me),ve;if(xe===null){for(;Me<Q.length;Me++)xe=oe(U,Q[Me],se),xe!==null&&(K=v(xe,K,Me),Ue===null?ve=xe:Ue.sibling=xe,Ue=xe);return Ve&&ri(U,Me),ve}for(xe=p(xe);Me<Q.length;Me++)Ke=ne(xe,U,Me,Q[Me],se),Ke!==null&&(o&&Ke.alternate!==null&&xe.delete(Ke.key===null?Me:Ke.key),K=v(Ke,K,Me),Ue===null?ve=Ke:Ue.sibling=Ke,Ue=Ke);return o&&xe.forEach(function(bs){return l(U,bs)}),Ve&&ri(U,Me),ve}function Ee(U,K,Q,se){if(Q==null)throw Error(r(151));for(var ve=null,Ue=null,xe=K,Me=K=0,Ke=null,qe=Q.next();xe!==null&&!qe.done;Me++,qe=Q.next()){xe.index>Me?(Ke=xe,xe=null):Ke=xe.sibling;var bs=J(U,xe,qe.value,se);if(bs===null){xe===null&&(xe=Ke);break}o&&xe&&bs.alternate===null&&l(U,xe),K=v(bs,K,Me),Ue===null?ve=bs:Ue.sibling=bs,Ue=bs,xe=Ke}if(qe.done)return d(U,xe),Ve&&ri(U,Me),ve;if(xe===null){for(;!qe.done;Me++,qe=Q.next())qe=oe(U,qe.value,se),qe!==null&&(K=v(qe,K,Me),Ue===null?ve=qe:Ue.sibling=qe,Ue=qe);return Ve&&ri(U,Me),ve}for(xe=p(xe);!qe.done;Me++,qe=Q.next())qe=ne(xe,U,Me,qe.value,se),qe!==null&&(o&&qe.alternate!==null&&xe.delete(qe.key===null?Me:qe.key),K=v(qe,K,Me),Ue===null?ve=qe:Ue.sibling=qe,Ue=qe);return o&&xe.forEach(function(oP){return l(U,oP)}),Ve&&ri(U,Me),ve}function nt(U,K,Q,se){if(typeof Q=="object"&&Q!==null&&Q.type===k&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case b:e:{for(var ve=Q.key;K!==null;){if(K.key===ve){if(ve=Q.type,ve===k){if(K.tag===7){d(U,K.sibling),se=y(K,Q.props.children),se.return=U,U=se;break e}}else if(K.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===O&&yo(ve)===K.type){d(U,K.sibling),se=y(K,Q.props),xu(se,Q),se.return=U,U=se;break e}d(U,K);break}else l(U,K);K=K.sibling}Q.type===k?(se=ho(Q.props.children,U.mode,se,Q.key),se.return=U,U=se):(se=Xd(Q.type,Q.key,Q.props,null,U.mode,se),xu(se,Q),se.return=U,U=se)}return w(U);case x:e:{for(ve=Q.key;K!==null;){if(K.key===ve)if(K.tag===4&&K.stateNode.containerInfo===Q.containerInfo&&K.stateNode.implementation===Q.implementation){d(U,K.sibling),se=y(K,Q.children||[]),se.return=U,U=se;break e}else{d(U,K);break}else l(U,K);K=K.sibling}se=Rg(Q,U.mode,se),se.return=U,U=se}return w(U);case O:return Q=yo(Q),nt(U,K,Q,se)}if(te(Q))return be(U,K,Q,se);if(G(Q)){if(ve=G(Q),typeof ve!="function")throw Error(r(150));return Q=ve.call(Q),Ee(U,K,Q,se)}if(typeof Q.then=="function")return nt(U,K,sf(Q),se);if(Q.$$typeof===$)return nt(U,K,ef(U,Q),se);of(U,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint"?(Q=""+Q,K!==null&&K.tag===6?(d(U,K.sibling),se=y(K,Q),se.return=U,U=se):(d(U,K),se=Ng(Q,U.mode,se),se.return=U,U=se),w(U)):d(U,K)}return function(U,K,Q,se){try{yu=0;var ve=nt(U,K,Q,se);return Va=null,ve}catch(xe){if(xe===_a||xe===nf)throw xe;var Ue=_n(29,xe,null,U.mode);return Ue.lanes=se,Ue.return=U,Ue}}}var vo=Rv(!0),Ov=Rv(!1),Zi=!1;function Ug(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qg(o,l){o=o.updateQueue,l.updateQueue===o&&(l.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function es(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function ts(o,l,d){var p=o.updateQueue;if(p===null)return null;if(p=p.shared,(Ge&2)!==0){var y=p.pending;return y===null?l.next=l:(l.next=y.next,y.next=l),p.pending=l,l=Yd(o),bv(o,null,d),l}return Qd(o,p,l,d),Yd(o)}function vu(o,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194048)!==0)){var p=l.lanes;p&=o.pendingLanes,d|=p,l.lanes=d,S1(o,d)}}function Gg(o,l){var d=o.updateQueue,p=o.alternate;if(p!==null&&(p=p.updateQueue,d===p)){var y=null,v=null;if(d=d.firstBaseUpdate,d!==null){do{var w={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};v===null?y=v=w:v=v.next=w,d=d.next}while(d!==null);v===null?y=v=l:v=v.next=l}else y=v=l;d={baseState:p.baseState,firstBaseUpdate:y,lastBaseUpdate:v,shared:p.shared,callbacks:p.callbacks},o.updateQueue=d;return}o=d.lastBaseUpdate,o===null?d.firstBaseUpdate=l:o.next=l,d.lastBaseUpdate=l}var Wg=!1;function ku(){if(Wg){var o=Ka;if(o!==null)throw o}}function Cu(o,l,d,p){Wg=!1;var y=o.updateQueue;Zi=!1;var v=y.firstBaseUpdate,w=y.lastBaseUpdate,N=y.shared.pending;if(N!==null){y.shared.pending=null;var I=N,Y=I.next;I.next=null,w===null?v=Y:w.next=Y,w=I;var re=o.alternate;re!==null&&(re=re.updateQueue,N=re.lastBaseUpdate,N!==w&&(N===null?re.firstBaseUpdate=Y:N.next=Y,re.lastBaseUpdate=I))}if(v!==null){var oe=y.baseState;w=0,re=Y=I=null,N=v;do{var J=N.lane&-536870913,ne=J!==N.lane;if(ne?(Fe&J)===J:(p&J)===J){J!==0&&J===Fa&&(Wg=!0),re!==null&&(re=re.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var be=o,Ee=N;J=l;var nt=d;switch(Ee.tag){case 1:if(be=Ee.payload,typeof be=="function"){oe=be.call(nt,oe,J);break e}oe=be;break e;case 3:be.flags=be.flags&-65537|128;case 0:if(be=Ee.payload,J=typeof be=="function"?be.call(nt,oe,J):be,J==null)break e;oe=m({},oe,J);break e;case 2:Zi=!0}}J=N.callback,J!==null&&(o.flags|=64,ne&&(o.flags|=8192),ne=y.callbacks,ne===null?y.callbacks=[J]:ne.push(J))}else ne={lane:J,tag:N.tag,payload:N.payload,callback:N.callback,next:null},re===null?(Y=re=ne,I=oe):re=re.next=ne,w|=J;if(N=N.next,N===null){if(N=y.shared.pending,N===null)break;ne=N,N=ne.next,ne.next=null,y.lastBaseUpdate=ne,y.shared.pending=null}}while(!0);re===null&&(I=oe),y.baseState=I,y.firstBaseUpdate=Y,y.lastBaseUpdate=re,v===null&&(y.shared.lanes=0),as|=w,o.lanes=w,o.memoizedState=oe}}function Pv(o,l){if(typeof o!="function")throw Error(r(191,o));o.call(l)}function zv(o,l){var d=o.callbacks;if(d!==null)for(o.callbacks=null,o=0;o<d.length;o++)Pv(d[o],l)}var Ha=L(null),af=L(0);function Lv(o,l){o=pi,ie(af,o),ie(Ha,l),pi=o|l.baseLanes}function Qg(){ie(af,pi),ie(Ha,Ha.current)}function Yg(){pi=af.current,H(Ha),H(af)}var Vn=L(null),sr=null;function ns(o){var l=o.alternate;ie(Dt,Dt.current&1),ie(Vn,o),sr===null&&(l===null||Ha.current!==null||l.memoizedState!==null)&&(sr=o)}function Xg(o){ie(Dt,Dt.current),ie(Vn,o),sr===null&&(sr=o)}function Iv(o){o.tag===22?(ie(Dt,Dt.current),ie(Vn,o),sr===null&&(sr=o)):rs()}function rs(){ie(Dt,Dt.current),ie(Vn,Vn.current)}function Hn(o){H(Vn),sr===o&&(sr=null),H(Dt)}var Dt=L(0);function lf(o){for(var l=o;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||rb(d)||ib(d)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var oi=0,Ae=null,et=null,At=null,uf=!1,Ua=!1,ko=!1,cf=0,Eu=0,qa=null,YR=0;function yt(){throw Error(r(321))}function Jg(o,l){if(l===null)return!1;for(var d=0;d<l.length&&d<o.length;d++)if(!Kn(o[d],l[d]))return!1;return!0}function Zg(o,l,d,p,y,v){return oi=v,Ae=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,P.H=o===null||o.memoizedState===null?k2:p0,ko=!1,v=d(p,y),ko=!1,Ua&&(v=Fv(l,d,p,y)),jv(o),v}function jv(o){P.H=wu;var l=et!==null&&et.next!==null;if(oi=0,At=et=Ae=null,uf=!1,Eu=0,qa=null,l)throw Error(r(300));o===null||Bt||(o=o.dependencies,o!==null&&Zd(o)&&(Bt=!0))}function Fv(o,l,d,p){Ae=o;var y=0;do{if(Ua&&(qa=null),Eu=0,Ua=!1,25<=y)throw Error(r(301));if(y+=1,At=et=null,o.updateQueue!=null){var v=o.updateQueue;v.lastEffect=null,v.events=null,v.stores=null,v.memoCache!=null&&(v.memoCache.index=0)}P.H=C2,v=l(d,p)}while(Ua);return v}function XR(){var o=P.H,l=o.useState()[0];return l=typeof l.then=="function"?Du(l):l,o=o.useState()[0],(et!==null?et.memoizedState:null)!==o&&(Ae.flags|=1024),l}function e0(){var o=cf!==0;return cf=0,o}function t0(o,l,d){l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~d}function n0(o){if(uf){for(o=o.memoizedState;o!==null;){var l=o.queue;l!==null&&(l.pending=null),o=o.next}uf=!1}oi=0,At=et=Ae=null,Ua=!1,Eu=cf=0,qa=null}function gn(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return At===null?Ae.memoizedState=At=o:At=At.next=o,At}function St(){if(et===null){var o=Ae.alternate;o=o!==null?o.memoizedState:null}else o=et.next;var l=At===null?Ae.memoizedState:At.next;if(l!==null)At=l,et=o;else{if(o===null)throw Ae.alternate===null?Error(r(467)):Error(r(310));et=o,o={memoizedState:et.memoizedState,baseState:et.baseState,baseQueue:et.baseQueue,queue:et.queue,next:null},At===null?Ae.memoizedState=At=o:At=At.next=o}return At}function df(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Du(o){var l=Eu;return Eu+=1,qa===null&&(qa=[]),o=Bv(qa,o,l),l=Ae,(At===null?l.memoizedState:At.next)===null&&(l=l.alternate,P.H=l===null||l.memoizedState===null?k2:p0),o}function ff(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return Du(o);if(o.$$typeof===$)return Jt(o)}throw Error(r(438,String(o)))}function r0(o){var l=null,d=Ae.updateQueue;if(d!==null&&(l=d.memoCache),l==null){var p=Ae.alternate;p!==null&&(p=p.updateQueue,p!==null&&(p=p.memoCache,p!=null&&(l={data:p.data.map(function(y){return y.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),d===null&&(d=df(),Ae.updateQueue=d),d.memoCache=l,d=l.data[l.index],d===void 0)for(d=l.data[l.index]=Array(o),p=0;p<o;p++)d[p]=q;return l.index++,d}function ai(o,l){return typeof l=="function"?l(o):l}function hf(o){var l=St();return i0(l,et,o)}function i0(o,l,d){var p=o.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=d;var y=o.baseQueue,v=p.pending;if(v!==null){if(y!==null){var w=y.next;y.next=v.next,v.next=w}l.baseQueue=y=v,p.pending=null}if(v=o.baseState,y===null)o.memoizedState=v;else{l=y.next;var N=w=null,I=null,Y=l,re=!1;do{var oe=Y.lane&-536870913;if(oe!==Y.lane?(Fe&oe)===oe:(oi&oe)===oe){var J=Y.revertLane;if(J===0)I!==null&&(I=I.next={lane:0,revertLane:0,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),oe===Fa&&(re=!0);else if((oi&J)===J){Y=Y.next,J===Fa&&(re=!0);continue}else oe={lane:0,revertLane:Y.revertLane,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},I===null?(N=I=oe,w=v):I=I.next=oe,Ae.lanes|=J,as|=J;oe=Y.action,ko&&d(v,oe),v=Y.hasEagerState?Y.eagerState:d(v,oe)}else J={lane:oe,revertLane:Y.revertLane,gesture:Y.gesture,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},I===null?(N=I=J,w=v):I=I.next=J,Ae.lanes|=oe,as|=oe;Y=Y.next}while(Y!==null&&Y!==l);if(I===null?w=v:I.next=N,!Kn(v,o.memoizedState)&&(Bt=!0,re&&(d=Ka,d!==null)))throw d;o.memoizedState=v,o.baseState=w,o.baseQueue=I,p.lastRenderedState=v}return y===null&&(p.lanes=0),[o.memoizedState,p.dispatch]}function s0(o){var l=St(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=o;var p=d.dispatch,y=d.pending,v=l.memoizedState;if(y!==null){d.pending=null;var w=y=y.next;do v=o(v,w.action),w=w.next;while(w!==y);Kn(v,l.memoizedState)||(Bt=!0),l.memoizedState=v,l.baseQueue===null&&(l.baseState=v),d.lastRenderedState=v}return[v,p]}function Kv(o,l,d){var p=Ae,y=St(),v=Ve;if(v){if(d===void 0)throw Error(r(407));d=d()}else d=l();var w=!Kn((et||y).memoizedState,d);if(w&&(y.memoizedState=d,Bt=!0),y=y.queue,l0(Hv.bind(null,p,y,o),[o]),y.getSnapshot!==l||w||At!==null&&At.memoizedState.tag&1){if(p.flags|=2048,Ga(9,{destroy:void 0},Vv.bind(null,p,y,d,l),null),it===null)throw Error(r(349));v||(oi&127)!==0||_v(p,l,d)}return d}function _v(o,l,d){o.flags|=16384,o={getSnapshot:l,value:d},l=Ae.updateQueue,l===null?(l=df(),Ae.updateQueue=l,l.stores=[o]):(d=l.stores,d===null?l.stores=[o]:d.push(o))}function Vv(o,l,d,p){l.value=d,l.getSnapshot=p,Uv(l)&&qv(o)}function Hv(o,l,d){return d(function(){Uv(l)&&qv(o)})}function Uv(o){var l=o.getSnapshot;o=o.value;try{var d=l();return!Kn(o,d)}catch{return!0}}function qv(o){var l=fo(o,2);l!==null&&Bn(l,o,2)}function o0(o){var l=gn();if(typeof o=="function"){var d=o;if(o=d(),ko){qi(!0);try{d()}finally{qi(!1)}}}return l.memoizedState=l.baseState=o,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ai,lastRenderedState:o},l}function Gv(o,l,d,p){return o.baseState=d,i0(o,et,typeof p=="function"?p:ai)}function JR(o,l,d,p,y){if(gf(o))throw Error(r(485));if(o=l.action,o!==null){var v={payload:y,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(w){v.listeners.push(w)}};P.T!==null?d(!0):v.isTransition=!1,p(v),d=l.pending,d===null?(v.next=l.pending=v,Wv(l,v)):(v.next=d.next,l.pending=d.next=v)}}function Wv(o,l){var d=l.action,p=l.payload,y=o.state;if(l.isTransition){var v=P.T,w={};P.T=w;try{var N=d(y,p),I=P.S;I!==null&&I(w,N),Qv(o,l,N)}catch(Y){a0(o,l,Y)}finally{v!==null&&w.types!==null&&(v.types=w.types),P.T=v}}else try{v=d(y,p),Qv(o,l,v)}catch(Y){a0(o,l,Y)}}function Qv(o,l,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(p){Yv(o,l,p)},function(p){return a0(o,l,p)}):Yv(o,l,d)}function Yv(o,l,d){l.status="fulfilled",l.value=d,Xv(l),o.state=d,l=o.pending,l!==null&&(d=l.next,d===l?o.pending=null:(d=d.next,l.next=d,Wv(o,d)))}function a0(o,l,d){var p=o.pending;if(o.pending=null,p!==null){p=p.next;do l.status="rejected",l.reason=d,Xv(l),l=l.next;while(l!==p)}o.action=null}function Xv(o){o=o.listeners;for(var l=0;l<o.length;l++)(0,o[l])()}function Jv(o,l){return l}function Zv(o,l){if(Ve){var d=it.formState;if(d!==null){e:{var p=Ae;if(Ve){if(ut){t:{for(var y=ut,v=ir;y.nodeType!==8;){if(!v){y=null;break t}if(y=or(y.nextSibling),y===null){y=null;break t}}v=y.data,y=v==="F!"||v==="F"?y:null}if(y){ut=or(y.nextSibling),p=y.data==="F!";break e}}Xi(p)}p=!1}p&&(l=d[0])}}return d=gn(),d.memoizedState=d.baseState=l,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jv,lastRenderedState:l},d.queue=p,d=y2.bind(null,Ae,p),p.dispatch=d,p=o0(!1),v=h0.bind(null,Ae,!1,p.queue),p=gn(),y={state:l,dispatch:null,action:o,pending:null},p.queue=y,d=JR.bind(null,Ae,y,v,d),y.dispatch=d,p.memoizedState=o,[l,d,!1]}function e2(o){var l=St();return t2(l,et,o)}function t2(o,l,d){if(l=i0(o,l,Jv)[0],o=hf(ai)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var p=Du(l)}catch(w){throw w===_a?nf:w}else p=l;l=St();var y=l.queue,v=y.dispatch;return d!==l.memoizedState&&(Ae.flags|=2048,Ga(9,{destroy:void 0},ZR.bind(null,y,d),null)),[p,v,o]}function ZR(o,l){o.action=l}function n2(o){var l=St(),d=et;if(d!==null)return t2(l,d,o);St(),l=l.memoizedState,d=St();var p=d.queue.dispatch;return d.memoizedState=o,[l,p,!1]}function Ga(o,l,d,p){return o={tag:o,create:d,deps:p,inst:l,next:null},l=Ae.updateQueue,l===null&&(l=df(),Ae.updateQueue=l),d=l.lastEffect,d===null?l.lastEffect=o.next=o:(p=d.next,d.next=o,o.next=p,l.lastEffect=o),o}function r2(){return St().memoizedState}function pf(o,l,d,p){var y=gn();Ae.flags|=o,y.memoizedState=Ga(1|l,{destroy:void 0},d,p===void 0?null:p)}function mf(o,l,d,p){var y=St();p=p===void 0?null:p;var v=y.memoizedState.inst;et!==null&&p!==null&&Jg(p,et.memoizedState.deps)?y.memoizedState=Ga(l,v,d,p):(Ae.flags|=o,y.memoizedState=Ga(1|l,v,d,p))}function i2(o,l){pf(8390656,8,o,l)}function l0(o,l){mf(2048,8,o,l)}function eO(o){Ae.flags|=4;var l=Ae.updateQueue;if(l===null)l=df(),Ae.updateQueue=l,l.events=[o];else{var d=l.events;d===null?l.events=[o]:d.push(o)}}function s2(o){var l=St().memoizedState;return eO({ref:l,nextImpl:o}),function(){if((Ge&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}function o2(o,l){return mf(4,2,o,l)}function a2(o,l){return mf(4,4,o,l)}function l2(o,l){if(typeof l=="function"){o=o();var d=l(o);return function(){typeof d=="function"?d():l(null)}}if(l!=null)return o=o(),l.current=o,function(){l.current=null}}function u2(o,l,d){d=d!=null?d.concat([o]):null,mf(4,4,l2.bind(null,l,o),d)}function u0(){}function c2(o,l){var d=St();l=l===void 0?null:l;var p=d.memoizedState;return l!==null&&Jg(l,p[1])?p[0]:(d.memoizedState=[o,l],o)}function d2(o,l){var d=St();l=l===void 0?null:l;var p=d.memoizedState;if(l!==null&&Jg(l,p[1]))return p[0];if(p=o(),ko){qi(!0);try{o()}finally{qi(!1)}}return d.memoizedState=[p,l],p}function c0(o,l,d){return d===void 0||(oi&1073741824)!==0&&(Fe&261930)===0?o.memoizedState=l:(o.memoizedState=d,o=fk(),Ae.lanes|=o,as|=o,d)}function f2(o,l,d,p){return Kn(d,l)?d:Ha.current!==null?(o=c0(o,d,p),Kn(o,l)||(Bt=!0),o):(oi&42)===0||(oi&1073741824)!==0&&(Fe&261930)===0?(Bt=!0,o.memoizedState=d):(o=fk(),Ae.lanes|=o,as|=o,l)}function h2(o,l,d,p,y){var v=_.p;_.p=v!==0&&8>v?v:8;var w=P.T,N={};P.T=N,h0(o,!1,l,d);try{var I=y(),Y=P.S;if(Y!==null&&Y(N,I),I!==null&&typeof I=="object"&&typeof I.then=="function"){var re=QR(I,p);Su(o,l,re,Gn(o))}else Su(o,l,p,Gn(o))}catch(oe){Su(o,l,{then:function(){},status:"rejected",reason:oe},Gn())}finally{_.p=v,w!==null&&N.types!==null&&(w.types=N.types),P.T=w}}function tO(){}function d0(o,l,d,p){if(o.tag!==5)throw Error(r(476));var y=p2(o).queue;h2(o,y,l,W,d===null?tO:function(){return m2(o),d(p)})}function p2(o){var l=o.memoizedState;if(l!==null)return l;l={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ai,lastRenderedState:W},next:null};var d={};return l.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ai,lastRenderedState:d},next:null},o.memoizedState=l,o=o.alternate,o!==null&&(o.memoizedState=l),l}function m2(o){var l=p2(o);l.next===null&&(l=o.alternate.memoizedState),Su(o,l.next.queue,{},Gn())}function f0(){return Jt(_u)}function g2(){return St().memoizedState}function b2(){return St().memoizedState}function nO(o){for(var l=o.return;l!==null;){switch(l.tag){case 24:case 3:var d=Gn();o=es(d);var p=ts(l,o,d);p!==null&&(Bn(p,l,d),vu(p,l,d)),l={cache:Kg()},o.payload=l;return}l=l.return}}function rO(o,l,d){var p=Gn();d={lane:p,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},gf(o)?x2(l,d):(d=Bg(o,l,d,p),d!==null&&(Bn(d,o,p),v2(d,l,p)))}function y2(o,l,d){var p=Gn();Su(o,l,d,p)}function Su(o,l,d,p){var y={lane:p,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null};if(gf(o))x2(l,y);else{var v=o.alternate;if(o.lanes===0&&(v===null||v.lanes===0)&&(v=l.lastRenderedReducer,v!==null))try{var w=l.lastRenderedState,N=v(w,d);if(y.hasEagerState=!0,y.eagerState=N,Kn(N,w))return Qd(o,l,y,0),it===null&&Wd(),!1}catch{}if(d=Bg(o,l,y,p),d!==null)return Bn(d,o,p),v2(d,l,p),!0}return!1}function h0(o,l,d,p){if(p={lane:2,revertLane:U0(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},gf(o)){if(l)throw Error(r(479))}else l=Bg(o,d,p,2),l!==null&&Bn(l,o,2)}function gf(o){var l=o.alternate;return o===Ae||l!==null&&l===Ae}function x2(o,l){Ua=uf=!0;var d=o.pending;d===null?l.next=l:(l.next=d.next,d.next=l),o.pending=l}function v2(o,l,d){if((d&4194048)!==0){var p=l.lanes;p&=o.pendingLanes,d|=p,l.lanes=d,S1(o,d)}}var wu={readContext:Jt,use:ff,useCallback:yt,useContext:yt,useEffect:yt,useImperativeHandle:yt,useLayoutEffect:yt,useInsertionEffect:yt,useMemo:yt,useReducer:yt,useRef:yt,useState:yt,useDebugValue:yt,useDeferredValue:yt,useTransition:yt,useSyncExternalStore:yt,useId:yt,useHostTransitionStatus:yt,useFormState:yt,useActionState:yt,useOptimistic:yt,useMemoCache:yt,useCacheRefresh:yt};wu.useEffectEvent=yt;var k2={readContext:Jt,use:ff,useCallback:function(o,l){return gn().memoizedState=[o,l===void 0?null:l],o},useContext:Jt,useEffect:i2,useImperativeHandle:function(o,l,d){d=d!=null?d.concat([o]):null,pf(4194308,4,l2.bind(null,l,o),d)},useLayoutEffect:function(o,l){return pf(4194308,4,o,l)},useInsertionEffect:function(o,l){pf(4,2,o,l)},useMemo:function(o,l){var d=gn();l=l===void 0?null:l;var p=o();if(ko){qi(!0);try{o()}finally{qi(!1)}}return d.memoizedState=[p,l],p},useReducer:function(o,l,d){var p=gn();if(d!==void 0){var y=d(l);if(ko){qi(!0);try{d(l)}finally{qi(!1)}}}else y=l;return p.memoizedState=p.baseState=y,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:y},p.queue=o,o=o.dispatch=rO.bind(null,Ae,o),[p.memoizedState,o]},useRef:function(o){var l=gn();return o={current:o},l.memoizedState=o},useState:function(o){o=o0(o);var l=o.queue,d=y2.bind(null,Ae,l);return l.dispatch=d,[o.memoizedState,d]},useDebugValue:u0,useDeferredValue:function(o,l){var d=gn();return c0(d,o,l)},useTransition:function(){var o=o0(!1);return o=h2.bind(null,Ae,o.queue,!0,!1),gn().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,l,d){var p=Ae,y=gn();if(Ve){if(d===void 0)throw Error(r(407));d=d()}else{if(d=l(),it===null)throw Error(r(349));(Fe&127)!==0||_v(p,l,d)}y.memoizedState=d;var v={value:d,getSnapshot:l};return y.queue=v,i2(Hv.bind(null,p,v,o),[o]),p.flags|=2048,Ga(9,{destroy:void 0},Vv.bind(null,p,v,d,l),null),d},useId:function(){var o=gn(),l=it.identifierPrefix;if(Ve){var d=Or,p=Rr;d=(p&~(1<<32-Fn(p)-1)).toString(32)+d,l="_"+l+"R_"+d,d=cf++,0<d&&(l+="H"+d.toString(32)),l+="_"}else d=YR++,l="_"+l+"r_"+d.toString(32)+"_";return o.memoizedState=l},useHostTransitionStatus:f0,useFormState:Zv,useActionState:Zv,useOptimistic:function(o){var l=gn();l.memoizedState=l.baseState=o;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=d,l=h0.bind(null,Ae,!0,d),d.dispatch=l,[o,l]},useMemoCache:r0,useCacheRefresh:function(){return gn().memoizedState=nO.bind(null,Ae)},useEffectEvent:function(o){var l=gn(),d={impl:o};return l.memoizedState=d,function(){if((Ge&2)!==0)throw Error(r(440));return d.impl.apply(void 0,arguments)}}},p0={readContext:Jt,use:ff,useCallback:c2,useContext:Jt,useEffect:l0,useImperativeHandle:u2,useInsertionEffect:o2,useLayoutEffect:a2,useMemo:d2,useReducer:hf,useRef:r2,useState:function(){return hf(ai)},useDebugValue:u0,useDeferredValue:function(o,l){var d=St();return f2(d,et.memoizedState,o,l)},useTransition:function(){var o=hf(ai)[0],l=St().memoizedState;return[typeof o=="boolean"?o:Du(o),l]},useSyncExternalStore:Kv,useId:g2,useHostTransitionStatus:f0,useFormState:e2,useActionState:e2,useOptimistic:function(o,l){var d=St();return Gv(d,et,o,l)},useMemoCache:r0,useCacheRefresh:b2};p0.useEffectEvent=s2;var C2={readContext:Jt,use:ff,useCallback:c2,useContext:Jt,useEffect:l0,useImperativeHandle:u2,useInsertionEffect:o2,useLayoutEffect:a2,useMemo:d2,useReducer:s0,useRef:r2,useState:function(){return s0(ai)},useDebugValue:u0,useDeferredValue:function(o,l){var d=St();return et===null?c0(d,o,l):f2(d,et.memoizedState,o,l)},useTransition:function(){var o=s0(ai)[0],l=St().memoizedState;return[typeof o=="boolean"?o:Du(o),l]},useSyncExternalStore:Kv,useId:g2,useHostTransitionStatus:f0,useFormState:n2,useActionState:n2,useOptimistic:function(o,l){var d=St();return et!==null?Gv(d,et,o,l):(d.baseState=o,[o,d.queue.dispatch])},useMemoCache:r0,useCacheRefresh:b2};C2.useEffectEvent=s2;function m0(o,l,d,p){l=o.memoizedState,d=d(p,l),d=d==null?l:m({},l,d),o.memoizedState=d,o.lanes===0&&(o.updateQueue.baseState=d)}var g0={enqueueSetState:function(o,l,d){o=o._reactInternals;var p=Gn(),y=es(p);y.payload=l,d!=null&&(y.callback=d),l=ts(o,y,p),l!==null&&(Bn(l,o,p),vu(l,o,p))},enqueueReplaceState:function(o,l,d){o=o._reactInternals;var p=Gn(),y=es(p);y.tag=1,y.payload=l,d!=null&&(y.callback=d),l=ts(o,y,p),l!==null&&(Bn(l,o,p),vu(l,o,p))},enqueueForceUpdate:function(o,l){o=o._reactInternals;var d=Gn(),p=es(d);p.tag=2,l!=null&&(p.callback=l),l=ts(o,p,d),l!==null&&(Bn(l,o,d),vu(l,o,d))}};function E2(o,l,d,p,y,v,w){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(p,v,w):l.prototype&&l.prototype.isPureReactComponent?!fu(d,p)||!fu(y,v):!0}function D2(o,l,d,p){o=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,p),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,p),l.state!==o&&g0.enqueueReplaceState(l,l.state,null)}function Co(o,l){var d=l;if("ref"in l){d={};for(var p in l)p!=="ref"&&(d[p]=l[p])}if(o=o.defaultProps){d===l&&(d=m({},d));for(var y in o)d[y]===void 0&&(d[y]=o[y])}return d}function S2(o){Gd(o)}function w2(o){console.error(o)}function $2(o){Gd(o)}function bf(o,l){try{var d=o.onUncaughtError;d(l.value,{componentStack:l.stack})}catch(p){setTimeout(function(){throw p})}}function T2(o,l,d){try{var p=o.onCaughtError;p(d.value,{componentStack:d.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function b0(o,l,d){return d=es(d),d.tag=3,d.payload={element:null},d.callback=function(){bf(o,l)},d}function A2(o){return o=es(o),o.tag=3,o}function B2(o,l,d,p){var y=d.type.getDerivedStateFromError;if(typeof y=="function"){var v=p.value;o.payload=function(){return y(v)},o.callback=function(){T2(l,d,p)}}var w=d.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(o.callback=function(){T2(l,d,p),typeof y!="function"&&(ls===null?ls=new Set([this]):ls.add(this));var N=p.stack;this.componentDidCatch(p.value,{componentStack:N!==null?N:""})})}function iO(o,l,d,p,y){if(d.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(l=d.alternate,l!==null&&ja(l,d,y,!0),d=Vn.current,d!==null){switch(d.tag){case 31:case 13:return sr===null?Af():d.alternate===null&&xt===0&&(xt=3),d.flags&=-257,d.flags|=65536,d.lanes=y,p===rf?d.flags|=16384:(l=d.updateQueue,l===null?d.updateQueue=new Set([p]):l.add(p),_0(o,p,y)),!1;case 22:return d.flags|=65536,p===rf?d.flags|=16384:(l=d.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([p])},d.updateQueue=l):(d=l.retryQueue,d===null?l.retryQueue=new Set([p]):d.add(p)),_0(o,p,y)),!1}throw Error(r(435,d.tag))}return _0(o,p,y),Af(),!1}if(Ve)return l=Vn.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=y,p!==zg&&(o=Error(r(422),{cause:p}),mu(tr(o,d)))):(p!==zg&&(l=Error(r(423),{cause:p}),mu(tr(l,d))),o=o.current.alternate,o.flags|=65536,y&=-y,o.lanes|=y,p=tr(p,d),y=b0(o.stateNode,p,y),Gg(o,y),xt!==4&&(xt=2)),!1;var v=Error(r(520),{cause:p});if(v=tr(v,d),Ou===null?Ou=[v]:Ou.push(v),xt!==4&&(xt=2),l===null)return!0;p=tr(p,d),d=l;do{switch(d.tag){case 3:return d.flags|=65536,o=y&-y,d.lanes|=o,o=b0(d.stateNode,p,o),Gg(d,o),!1;case 1:if(l=d.type,v=d.stateNode,(d.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(ls===null||!ls.has(v))))return d.flags|=65536,y&=-y,d.lanes|=y,y=A2(y),B2(y,o,d,p),Gg(d,y),!1}d=d.return}while(d!==null);return!1}var y0=Error(r(461)),Bt=!1;function Zt(o,l,d,p){l.child=o===null?Ov(l,null,d,p):vo(l,o.child,d,p)}function M2(o,l,d,p,y){d=d.render;var v=l.ref;if("ref"in p){var w={};for(var N in p)N!=="ref"&&(w[N]=p[N])}else w=p;return go(l),p=Zg(o,l,d,w,v,y),N=e0(),o!==null&&!Bt?(t0(o,l,y),li(o,l,y)):(Ve&&N&&Og(l),l.flags|=1,Zt(o,l,p,y),l.child)}function N2(o,l,d,p,y){if(o===null){var v=d.type;return typeof v=="function"&&!Mg(v)&&v.defaultProps===void 0&&d.compare===null?(l.tag=15,l.type=v,R2(o,l,v,p,y)):(o=Xd(d.type,null,p,l,l.mode,y),o.ref=l.ref,o.return=l,l.child=o)}if(v=o.child,!w0(o,y)){var w=v.memoizedProps;if(d=d.compare,d=d!==null?d:fu,d(w,p)&&o.ref===l.ref)return li(o,l,y)}return l.flags|=1,o=ni(v,p),o.ref=l.ref,o.return=l,l.child=o}function R2(o,l,d,p,y){if(o!==null){var v=o.memoizedProps;if(fu(v,p)&&o.ref===l.ref)if(Bt=!1,l.pendingProps=p=v,w0(o,y))(o.flags&131072)!==0&&(Bt=!0);else return l.lanes=o.lanes,li(o,l,y)}return x0(o,l,d,p,y)}function O2(o,l,d,p){var y=p.children,v=o!==null?o.memoizedState:null;if(o===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.mode==="hidden"){if((l.flags&128)!==0){if(v=v!==null?v.baseLanes|d:d,o!==null){for(p=l.child=o.child,y=0;p!==null;)y=y|p.lanes|p.childLanes,p=p.sibling;p=y&~v}else p=0,l.child=null;return P2(o,l,v,d,p)}if((d&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},o!==null&&tf(l,v!==null?v.cachePool:null),v!==null?Lv(l,v):Qg(),Iv(l);else return p=l.lanes=536870912,P2(o,l,v!==null?v.baseLanes|d:d,d,p)}else v!==null?(tf(l,v.cachePool),Lv(l,v),rs(),l.memoizedState=null):(o!==null&&tf(l,null),Qg(),rs());return Zt(o,l,y,d),l.child}function $u(o,l){return o!==null&&o.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function P2(o,l,d,p,y){var v=Vg();return v=v===null?null:{parent:Tt._currentValue,pool:v},l.memoizedState={baseLanes:d,cachePool:v},o!==null&&tf(l,null),Qg(),Iv(l),o!==null&&ja(o,l,p,!0),l.childLanes=y,null}function yf(o,l){return l=vf({mode:l.mode,children:l.children},o.mode),l.ref=o.ref,o.child=l,l.return=o,l}function z2(o,l,d){return vo(l,o.child,null,d),o=yf(l,l.pendingProps),o.flags|=2,Hn(l),l.memoizedState=null,o}function sO(o,l,d){var p=l.pendingProps,y=(l.flags&128)!==0;if(l.flags&=-129,o===null){if(Ve){if(p.mode==="hidden")return o=yf(l,p),l.lanes=536870912,$u(null,o);if(Xg(l),(o=ut)?(o=Wk(o,ir),o=o!==null&&o.data==="&"?o:null,o!==null&&(l.memoizedState={dehydrated:o,treeContext:Qi!==null?{id:Rr,overflow:Or}:null,retryLane:536870912,hydrationErrors:null},d=xv(o),d.return=l,l.child=d,Xt=l,ut=null)):o=null,o===null)throw Xi(l);return l.lanes=536870912,null}return yf(l,p)}var v=o.memoizedState;if(v!==null){var w=v.dehydrated;if(Xg(l),y)if(l.flags&256)l.flags&=-257,l=z2(o,l,d);else if(l.memoizedState!==null)l.child=o.child,l.flags|=128,l=null;else throw Error(r(558));else if(Bt||ja(o,l,d,!1),y=(d&o.childLanes)!==0,Bt||y){if(p=it,p!==null&&(w=w1(p,d),w!==0&&w!==v.retryLane))throw v.retryLane=w,fo(o,w),Bn(p,o,w),y0;Af(),l=z2(o,l,d)}else o=v.treeContext,ut=or(w.nextSibling),Xt=l,Ve=!0,Yi=null,ir=!1,o!==null&&Cv(l,o),l=yf(l,p),l.flags|=4096;return l}return o=ni(o.child,{mode:p.mode,children:p.children}),o.ref=l.ref,l.child=o,o.return=l,o}function xf(o,l){var d=l.ref;if(d===null)o!==null&&o.ref!==null&&(l.flags|=4194816);else{if(typeof d!="function"&&typeof d!="object")throw Error(r(284));(o===null||o.ref!==d)&&(l.flags|=4194816)}}function x0(o,l,d,p,y){return go(l),d=Zg(o,l,d,p,void 0,y),p=e0(),o!==null&&!Bt?(t0(o,l,y),li(o,l,y)):(Ve&&p&&Og(l),l.flags|=1,Zt(o,l,d,y),l.child)}function L2(o,l,d,p,y,v){return go(l),l.updateQueue=null,d=Fv(l,p,d,y),jv(o),p=e0(),o!==null&&!Bt?(t0(o,l,v),li(o,l,v)):(Ve&&p&&Og(l),l.flags|=1,Zt(o,l,d,v),l.child)}function I2(o,l,d,p,y){if(go(l),l.stateNode===null){var v=Pa,w=d.contextType;typeof w=="object"&&w!==null&&(v=Jt(w)),v=new d(p,v),l.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=g0,l.stateNode=v,v._reactInternals=l,v=l.stateNode,v.props=p,v.state=l.memoizedState,v.refs={},Ug(l),w=d.contextType,v.context=typeof w=="object"&&w!==null?Jt(w):Pa,v.state=l.memoizedState,w=d.getDerivedStateFromProps,typeof w=="function"&&(m0(l,d,w,p),v.state=l.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(w=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),w!==v.state&&g0.enqueueReplaceState(v,v.state,null),Cu(l,p,v,y),ku(),v.state=l.memoizedState),typeof v.componentDidMount=="function"&&(l.flags|=4194308),p=!0}else if(o===null){v=l.stateNode;var N=l.memoizedProps,I=Co(d,N);v.props=I;var Y=v.context,re=d.contextType;w=Pa,typeof re=="object"&&re!==null&&(w=Jt(re));var oe=d.getDerivedStateFromProps;re=typeof oe=="function"||typeof v.getSnapshotBeforeUpdate=="function",N=l.pendingProps!==N,re||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(N||Y!==w)&&D2(l,v,p,w),Zi=!1;var J=l.memoizedState;v.state=J,Cu(l,p,v,y),ku(),Y=l.memoizedState,N||J!==Y||Zi?(typeof oe=="function"&&(m0(l,d,oe,p),Y=l.memoizedState),(I=Zi||E2(l,d,I,p,J,Y,w))?(re||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(l.flags|=4194308)):(typeof v.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=p,l.memoizedState=Y),v.props=p,v.state=Y,v.context=w,p=I):(typeof v.componentDidMount=="function"&&(l.flags|=4194308),p=!1)}else{v=l.stateNode,qg(o,l),w=l.memoizedProps,re=Co(d,w),v.props=re,oe=l.pendingProps,J=v.context,Y=d.contextType,I=Pa,typeof Y=="object"&&Y!==null&&(I=Jt(Y)),N=d.getDerivedStateFromProps,(Y=typeof N=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(w!==oe||J!==I)&&D2(l,v,p,I),Zi=!1,J=l.memoizedState,v.state=J,Cu(l,p,v,y),ku();var ne=l.memoizedState;w!==oe||J!==ne||Zi||o!==null&&o.dependencies!==null&&Zd(o.dependencies)?(typeof N=="function"&&(m0(l,d,N,p),ne=l.memoizedState),(re=Zi||E2(l,d,re,p,J,ne,I)||o!==null&&o.dependencies!==null&&Zd(o.dependencies))?(Y||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(p,ne,I),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(p,ne,I)),typeof v.componentDidUpdate=="function"&&(l.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof v.componentDidUpdate!="function"||w===o.memoizedProps&&J===o.memoizedState||(l.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||w===o.memoizedProps&&J===o.memoizedState||(l.flags|=1024),l.memoizedProps=p,l.memoizedState=ne),v.props=p,v.state=ne,v.context=I,p=re):(typeof v.componentDidUpdate!="function"||w===o.memoizedProps&&J===o.memoizedState||(l.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||w===o.memoizedProps&&J===o.memoizedState||(l.flags|=1024),p=!1)}return v=p,xf(o,l),p=(l.flags&128)!==0,v||p?(v=l.stateNode,d=p&&typeof d.getDerivedStateFromError!="function"?null:v.render(),l.flags|=1,o!==null&&p?(l.child=vo(l,o.child,null,y),l.child=vo(l,null,d,y)):Zt(o,l,d,y),l.memoizedState=v.state,o=l.child):o=li(o,l,y),o}function j2(o,l,d,p){return po(),l.flags|=256,Zt(o,l,d,p),l.child}var v0={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function k0(o){return{baseLanes:o,cachePool:Tv()}}function C0(o,l,d){return o=o!==null?o.childLanes&~d:0,l&&(o|=qn),o}function F2(o,l,d){var p=l.pendingProps,y=!1,v=(l.flags&128)!==0,w;if((w=v)||(w=o!==null&&o.memoizedState===null?!1:(Dt.current&2)!==0),w&&(y=!0,l.flags&=-129),w=(l.flags&32)!==0,l.flags&=-33,o===null){if(Ve){if(y?ns(l):rs(),(o=ut)?(o=Wk(o,ir),o=o!==null&&o.data!=="&"?o:null,o!==null&&(l.memoizedState={dehydrated:o,treeContext:Qi!==null?{id:Rr,overflow:Or}:null,retryLane:536870912,hydrationErrors:null},d=xv(o),d.return=l,l.child=d,Xt=l,ut=null)):o=null,o===null)throw Xi(l);return ib(o)?l.lanes=32:l.lanes=536870912,null}var N=p.children;return p=p.fallback,y?(rs(),y=l.mode,N=vf({mode:"hidden",children:N},y),p=ho(p,y,d,null),N.return=l,p.return=l,N.sibling=p,l.child=N,p=l.child,p.memoizedState=k0(d),p.childLanes=C0(o,w,d),l.memoizedState=v0,$u(null,p)):(ns(l),E0(l,N))}var I=o.memoizedState;if(I!==null&&(N=I.dehydrated,N!==null)){if(v)l.flags&256?(ns(l),l.flags&=-257,l=D0(o,l,d)):l.memoizedState!==null?(rs(),l.child=o.child,l.flags|=128,l=null):(rs(),N=p.fallback,y=l.mode,p=vf({mode:"visible",children:p.children},y),N=ho(N,y,d,null),N.flags|=2,p.return=l,N.return=l,p.sibling=N,l.child=p,vo(l,o.child,null,d),p=l.child,p.memoizedState=k0(d),p.childLanes=C0(o,w,d),l.memoizedState=v0,l=$u(null,p));else if(ns(l),ib(N)){if(w=N.nextSibling&&N.nextSibling.dataset,w)var Y=w.dgst;w=Y,p=Error(r(419)),p.stack="",p.digest=w,mu({value:p,source:null,stack:null}),l=D0(o,l,d)}else if(Bt||ja(o,l,d,!1),w=(d&o.childLanes)!==0,Bt||w){if(w=it,w!==null&&(p=w1(w,d),p!==0&&p!==I.retryLane))throw I.retryLane=p,fo(o,p),Bn(w,o,p),y0;rb(N)||Af(),l=D0(o,l,d)}else rb(N)?(l.flags|=192,l.child=o.child,l=null):(o=I.treeContext,ut=or(N.nextSibling),Xt=l,Ve=!0,Yi=null,ir=!1,o!==null&&Cv(l,o),l=E0(l,p.children),l.flags|=4096);return l}return y?(rs(),N=p.fallback,y=l.mode,I=o.child,Y=I.sibling,p=ni(I,{mode:"hidden",children:p.children}),p.subtreeFlags=I.subtreeFlags&65011712,Y!==null?N=ni(Y,N):(N=ho(N,y,d,null),N.flags|=2),N.return=l,p.return=l,p.sibling=N,l.child=p,$u(null,p),p=l.child,N=o.child.memoizedState,N===null?N=k0(d):(y=N.cachePool,y!==null?(I=Tt._currentValue,y=y.parent!==I?{parent:I,pool:I}:y):y=Tv(),N={baseLanes:N.baseLanes|d,cachePool:y}),p.memoizedState=N,p.childLanes=C0(o,w,d),l.memoizedState=v0,$u(o.child,p)):(ns(l),d=o.child,o=d.sibling,d=ni(d,{mode:"visible",children:p.children}),d.return=l,d.sibling=null,o!==null&&(w=l.deletions,w===null?(l.deletions=[o],l.flags|=16):w.push(o)),l.child=d,l.memoizedState=null,d)}function E0(o,l){return l=vf({mode:"visible",children:l},o.mode),l.return=o,o.child=l}function vf(o,l){return o=_n(22,o,null,l),o.lanes=0,o}function D0(o,l,d){return vo(l,o.child,null,d),o=E0(l,l.pendingProps.children),o.flags|=2,l.memoizedState=null,o}function K2(o,l,d){o.lanes|=l;var p=o.alternate;p!==null&&(p.lanes|=l),jg(o.return,l,d)}function S0(o,l,d,p,y,v){var w=o.memoizedState;w===null?o.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:p,tail:d,tailMode:y,treeForkCount:v}:(w.isBackwards=l,w.rendering=null,w.renderingStartTime=0,w.last=p,w.tail=d,w.tailMode=y,w.treeForkCount=v)}function _2(o,l,d){var p=l.pendingProps,y=p.revealOrder,v=p.tail;p=p.children;var w=Dt.current,N=(w&2)!==0;if(N?(w=w&1|2,l.flags|=128):w&=1,ie(Dt,w),Zt(o,l,p,d),p=Ve?pu:0,!N&&o!==null&&(o.flags&128)!==0)e:for(o=l.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&K2(o,d,l);else if(o.tag===19)K2(o,d,l);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===l)break e;for(;o.sibling===null;){if(o.return===null||o.return===l)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}switch(y){case"forwards":for(d=l.child,y=null;d!==null;)o=d.alternate,o!==null&&lf(o)===null&&(y=d),d=d.sibling;d=y,d===null?(y=l.child,l.child=null):(y=d.sibling,d.sibling=null),S0(l,!1,y,d,v,p);break;case"backwards":case"unstable_legacy-backwards":for(d=null,y=l.child,l.child=null;y!==null;){if(o=y.alternate,o!==null&&lf(o)===null){l.child=y;break}o=y.sibling,y.sibling=d,d=y,y=o}S0(l,!0,d,null,v,p);break;case"together":S0(l,!1,null,null,void 0,p);break;default:l.memoizedState=null}return l.child}function li(o,l,d){if(o!==null&&(l.dependencies=o.dependencies),as|=l.lanes,(d&l.childLanes)===0)if(o!==null){if(ja(o,l,d,!1),(d&l.childLanes)===0)return null}else return null;if(o!==null&&l.child!==o.child)throw Error(r(153));if(l.child!==null){for(o=l.child,d=ni(o,o.pendingProps),l.child=d,d.return=l;o.sibling!==null;)o=o.sibling,d=d.sibling=ni(o,o.pendingProps),d.return=l;d.sibling=null}return l.child}function w0(o,l){return(o.lanes&l)!==0?!0:(o=o.dependencies,!!(o!==null&&Zd(o)))}function oO(o,l,d){switch(l.tag){case 3:Qe(l,l.stateNode.containerInfo),Ji(l,Tt,o.memoizedState.cache),po();break;case 27:case 5:En(l);break;case 4:Qe(l,l.stateNode.containerInfo);break;case 10:Ji(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,Xg(l),null;break;case 13:var p=l.memoizedState;if(p!==null)return p.dehydrated!==null?(ns(l),l.flags|=128,null):(d&l.child.childLanes)!==0?F2(o,l,d):(ns(l),o=li(o,l,d),o!==null?o.sibling:null);ns(l);break;case 19:var y=(o.flags&128)!==0;if(p=(d&l.childLanes)!==0,p||(ja(o,l,d,!1),p=(d&l.childLanes)!==0),y){if(p)return _2(o,l,d);l.flags|=128}if(y=l.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),ie(Dt,Dt.current),p)break;return null;case 22:return l.lanes=0,O2(o,l,d,l.pendingProps);case 24:Ji(l,Tt,o.memoizedState.cache)}return li(o,l,d)}function V2(o,l,d){if(o!==null)if(o.memoizedProps!==l.pendingProps)Bt=!0;else{if(!w0(o,d)&&(l.flags&128)===0)return Bt=!1,oO(o,l,d);Bt=(o.flags&131072)!==0}else Bt=!1,Ve&&(l.flags&1048576)!==0&&kv(l,pu,l.index);switch(l.lanes=0,l.tag){case 16:e:{var p=l.pendingProps;if(o=yo(l.elementType),l.type=o,typeof o=="function")Mg(o)?(p=Co(o,p),l.tag=1,l=I2(null,l,o,p,d)):(l.tag=0,l=x0(null,l,o,p,d));else{if(o!=null){var y=o.$$typeof;if(y===A){l.tag=11,l=M2(null,l,o,p,d);break e}else if(y===M){l.tag=14,l=N2(null,l,o,p,d);break e}}throw l=F(o)||o,Error(r(306,l,""))}}return l;case 0:return x0(o,l,l.type,l.pendingProps,d);case 1:return p=l.type,y=Co(p,l.pendingProps),I2(o,l,p,y,d);case 3:e:{if(Qe(l,l.stateNode.containerInfo),o===null)throw Error(r(387));p=l.pendingProps;var v=l.memoizedState;y=v.element,qg(o,l),Cu(l,p,null,d);var w=l.memoizedState;if(p=w.cache,Ji(l,Tt,p),p!==v.cache&&Fg(l,[Tt],d,!0),ku(),p=w.element,v.isDehydrated)if(v={element:p,isDehydrated:!1,cache:w.cache},l.updateQueue.baseState=v,l.memoizedState=v,l.flags&256){l=j2(o,l,p,d);break e}else if(p!==y){y=tr(Error(r(424)),l),mu(y),l=j2(o,l,p,d);break e}else for(o=l.stateNode.containerInfo,o.nodeType===9?o=o.body:o=o.nodeName==="HTML"?o.ownerDocument.body:o,ut=or(o.firstChild),Xt=l,Ve=!0,Yi=null,ir=!0,d=Ov(l,null,p,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(po(),p===y){l=li(o,l,d);break e}Zt(o,l,p,d)}l=l.child}return l;case 26:return xf(o,l),o===null?(d=e5(l.type,null,l.pendingProps,null))?l.memoizedState=d:Ve||(d=l.type,o=l.pendingProps,p=zf(he.current).createElement(d),p[Yt]=l,p[Dn]=o,en(p,d,o),Ut(p),l.stateNode=p):l.memoizedState=e5(l.type,o.memoizedProps,l.pendingProps,o.memoizedState),null;case 27:return En(l),o===null&&Ve&&(p=l.stateNode=Xk(l.type,l.pendingProps,he.current),Xt=l,ir=!0,y=ut,fs(l.type)?(sb=y,ut=or(p.firstChild)):ut=y),Zt(o,l,l.pendingProps.children,d),xf(o,l),o===null&&(l.flags|=4194304),l.child;case 5:return o===null&&Ve&&((y=p=ut)&&(p=zO(p,l.type,l.pendingProps,ir),p!==null?(l.stateNode=p,Xt=l,ut=or(p.firstChild),ir=!1,y=!0):y=!1),y||Xi(l)),En(l),y=l.type,v=l.pendingProps,w=o!==null?o.memoizedProps:null,p=v.children,eb(y,v)?p=null:w!==null&&eb(y,w)&&(l.flags|=32),l.memoizedState!==null&&(y=Zg(o,l,XR,null,null,d),_u._currentValue=y),xf(o,l),Zt(o,l,p,d),l.child;case 6:return o===null&&Ve&&((o=d=ut)&&(d=LO(d,l.pendingProps,ir),d!==null?(l.stateNode=d,Xt=l,ut=null,o=!0):o=!1),o||Xi(l)),null;case 13:return F2(o,l,d);case 4:return Qe(l,l.stateNode.containerInfo),p=l.pendingProps,o===null?l.child=vo(l,null,p,d):Zt(o,l,p,d),l.child;case 11:return M2(o,l,l.type,l.pendingProps,d);case 7:return Zt(o,l,l.pendingProps,d),l.child;case 8:return Zt(o,l,l.pendingProps.children,d),l.child;case 12:return Zt(o,l,l.pendingProps.children,d),l.child;case 10:return p=l.pendingProps,Ji(l,l.type,p.value),Zt(o,l,p.children,d),l.child;case 9:return y=l.type._context,p=l.pendingProps.children,go(l),y=Jt(y),p=p(y),l.flags|=1,Zt(o,l,p,d),l.child;case 14:return N2(o,l,l.type,l.pendingProps,d);case 15:return R2(o,l,l.type,l.pendingProps,d);case 19:return _2(o,l,d);case 31:return sO(o,l,d);case 22:return O2(o,l,d,l.pendingProps);case 24:return go(l),p=Jt(Tt),o===null?(y=Vg(),y===null&&(y=it,v=Kg(),y.pooledCache=v,v.refCount++,v!==null&&(y.pooledCacheLanes|=d),y=v),l.memoizedState={parent:p,cache:y},Ug(l),Ji(l,Tt,y)):((o.lanes&d)!==0&&(qg(o,l),Cu(l,null,null,d),ku()),y=o.memoizedState,v=l.memoizedState,y.parent!==p?(y={parent:p,cache:p},l.memoizedState=y,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=y),Ji(l,Tt,p)):(p=v.cache,Ji(l,Tt,p),p!==y.cache&&Fg(l,[Tt],d,!0))),Zt(o,l,l.pendingProps.children,d),l.child;case 29:throw l.pendingProps}throw Error(r(156,l.tag))}function ui(o){o.flags|=4}function $0(o,l,d,p,y){if((l=(o.mode&32)!==0)&&(l=!1),l){if(o.flags|=16777216,(y&335544128)===y)if(o.stateNode.complete)o.flags|=8192;else if(gk())o.flags|=8192;else throw xo=rf,Hg}else o.flags&=-16777217}function H2(o,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!s5(l))if(gk())o.flags|=8192;else throw xo=rf,Hg}function kf(o,l){l!==null&&(o.flags|=4),o.flags&16384&&(l=o.tag!==22?E1():536870912,o.lanes|=l,Xa|=l)}function Tu(o,l){if(!Ve)switch(o.tailMode){case"hidden":l=o.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?o.tail=null:d.sibling=null;break;case"collapsed":d=o.tail;for(var p=null;d!==null;)d.alternate!==null&&(p=d),d=d.sibling;p===null?l||o.tail===null?o.tail=null:o.tail.sibling=null:p.sibling=null}}function ct(o){var l=o.alternate!==null&&o.alternate.child===o.child,d=0,p=0;if(l)for(var y=o.child;y!==null;)d|=y.lanes|y.childLanes,p|=y.subtreeFlags&65011712,p|=y.flags&65011712,y.return=o,y=y.sibling;else for(y=o.child;y!==null;)d|=y.lanes|y.childLanes,p|=y.subtreeFlags,p|=y.flags,y.return=o,y=y.sibling;return o.subtreeFlags|=p,o.childLanes=d,l}function aO(o,l,d){var p=l.pendingProps;switch(Pg(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ct(l),null;case 1:return ct(l),null;case 3:return d=l.stateNode,p=null,o!==null&&(p=o.memoizedState.cache),l.memoizedState.cache!==p&&(l.flags|=2048),si(Tt),$e(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(o===null||o.child===null)&&(Ia(l)?ui(l):o===null||o.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Lg())),ct(l),null;case 26:var y=l.type,v=l.memoizedState;return o===null?(ui(l),v!==null?(ct(l),H2(l,v)):(ct(l),$0(l,y,null,p,d))):v?v!==o.memoizedState?(ui(l),ct(l),H2(l,v)):(ct(l),l.flags&=-16777217):(o=o.memoizedProps,o!==p&&ui(l),ct(l),$0(l,y,o,p,d)),null;case 27:if(ln(l),d=he.current,y=l.type,o!==null&&l.stateNode!=null)o.memoizedProps!==p&&ui(l);else{if(!p){if(l.stateNode===null)throw Error(r(166));return ct(l),null}o=le.current,Ia(l)?Ev(l):(o=Xk(y,p,d),l.stateNode=o,ui(l))}return ct(l),null;case 5:if(ln(l),y=l.type,o!==null&&l.stateNode!=null)o.memoizedProps!==p&&ui(l);else{if(!p){if(l.stateNode===null)throw Error(r(166));return ct(l),null}if(v=le.current,Ia(l))Ev(l);else{var w=zf(he.current);switch(v){case 1:v=w.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:v=w.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":v=w.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":v=w.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":v=w.createElement("div"),v.innerHTML="<script><\/script>",v=v.removeChild(v.firstChild);break;case"select":v=typeof p.is=="string"?w.createElement("select",{is:p.is}):w.createElement("select"),p.multiple?v.multiple=!0:p.size&&(v.size=p.size);break;default:v=typeof p.is=="string"?w.createElement(y,{is:p.is}):w.createElement(y)}}v[Yt]=l,v[Dn]=p;e:for(w=l.child;w!==null;){if(w.tag===5||w.tag===6)v.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===l)break e;for(;w.sibling===null;){if(w.return===null||w.return===l)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}l.stateNode=v;e:switch(en(v,y,p),y){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}p&&ui(l)}}return ct(l),$0(l,l.type,o===null?null:o.memoizedProps,l.pendingProps,d),null;case 6:if(o&&l.stateNode!=null)o.memoizedProps!==p&&ui(l);else{if(typeof p!="string"&&l.stateNode===null)throw Error(r(166));if(o=he.current,Ia(l)){if(o=l.stateNode,d=l.memoizedProps,p=null,y=Xt,y!==null)switch(y.tag){case 27:case 5:p=y.memoizedProps}o[Yt]=l,o=!!(o.nodeValue===d||p!==null&&p.suppressHydrationWarning===!0||Fk(o.nodeValue,d)),o||Xi(l,!0)}else o=zf(o).createTextNode(p),o[Yt]=l,l.stateNode=o}return ct(l),null;case 31:if(d=l.memoizedState,o===null||o.memoizedState!==null){if(p=Ia(l),d!==null){if(o===null){if(!p)throw Error(r(318));if(o=l.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(557));o[Yt]=l}else po(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;ct(l),o=!1}else d=Lg(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=d),o=!0;if(!o)return l.flags&256?(Hn(l),l):(Hn(l),null);if((l.flags&128)!==0)throw Error(r(558))}return ct(l),null;case 13:if(p=l.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(y=Ia(l),p!==null&&p.dehydrated!==null){if(o===null){if(!y)throw Error(r(318));if(y=l.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(r(317));y[Yt]=l}else po(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;ct(l),y=!1}else y=Lg(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=y),y=!0;if(!y)return l.flags&256?(Hn(l),l):(Hn(l),null)}return Hn(l),(l.flags&128)!==0?(l.lanes=d,l):(d=p!==null,o=o!==null&&o.memoizedState!==null,d&&(p=l.child,y=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(y=p.alternate.memoizedState.cachePool.pool),v=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(v=p.memoizedState.cachePool.pool),v!==y&&(p.flags|=2048)),d!==o&&d&&(l.child.flags|=8192),kf(l,l.updateQueue),ct(l),null);case 4:return $e(),o===null&&Q0(l.stateNode.containerInfo),ct(l),null;case 10:return si(l.type),ct(l),null;case 19:if(H(Dt),p=l.memoizedState,p===null)return ct(l),null;if(y=(l.flags&128)!==0,v=p.rendering,v===null)if(y)Tu(p,!1);else{if(xt!==0||o!==null&&(o.flags&128)!==0)for(o=l.child;o!==null;){if(v=lf(o),v!==null){for(l.flags|=128,Tu(p,!1),o=v.updateQueue,l.updateQueue=o,kf(l,o),l.subtreeFlags=0,o=d,d=l.child;d!==null;)yv(d,o),d=d.sibling;return ie(Dt,Dt.current&1|2),Ve&&ri(l,p.treeForkCount),l.child}o=o.sibling}p.tail!==null&>()>wf&&(l.flags|=128,y=!0,Tu(p,!1),l.lanes=4194304)}else{if(!y)if(o=lf(v),o!==null){if(l.flags|=128,y=!0,o=o.updateQueue,l.updateQueue=o,kf(l,o),Tu(p,!0),p.tail===null&&p.tailMode==="hidden"&&!v.alternate&&!Ve)return ct(l),null}else 2*gt()-p.renderingStartTime>wf&&d!==536870912&&(l.flags|=128,y=!0,Tu(p,!1),l.lanes=4194304);p.isBackwards?(v.sibling=l.child,l.child=v):(o=p.last,o!==null?o.sibling=v:l.child=v,p.last=v)}return p.tail!==null?(o=p.tail,p.rendering=o,p.tail=o.sibling,p.renderingStartTime=gt(),o.sibling=null,d=Dt.current,ie(Dt,y?d&1|2:d&1),Ve&&ri(l,p.treeForkCount),o):(ct(l),null);case 22:case 23:return Hn(l),Yg(),p=l.memoizedState!==null,o!==null?o.memoizedState!==null!==p&&(l.flags|=8192):p&&(l.flags|=8192),p?(d&536870912)!==0&&(l.flags&128)===0&&(ct(l),l.subtreeFlags&6&&(l.flags|=8192)):ct(l),d=l.updateQueue,d!==null&&kf(l,d.retryQueue),d=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),p=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(p=l.memoizedState.cachePool.pool),p!==d&&(l.flags|=2048),o!==null&&H(bo),null;case 24:return d=null,o!==null&&(d=o.memoizedState.cache),l.memoizedState.cache!==d&&(l.flags|=2048),si(Tt),ct(l),null;case 25:return null;case 30:return null}throw Error(r(156,l.tag))}function lO(o,l){switch(Pg(l),l.tag){case 1:return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 3:return si(Tt),$e(),o=l.flags,(o&65536)!==0&&(o&128)===0?(l.flags=o&-65537|128,l):null;case 26:case 27:case 5:return ln(l),null;case 31:if(l.memoizedState!==null){if(Hn(l),l.alternate===null)throw Error(r(340));po()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 13:if(Hn(l),o=l.memoizedState,o!==null&&o.dehydrated!==null){if(l.alternate===null)throw Error(r(340));po()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 19:return H(Dt),null;case 4:return $e(),null;case 10:return si(l.type),null;case 22:case 23:return Hn(l),Yg(),o!==null&&H(bo),o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 24:return si(Tt),null;case 25:return null;default:return null}}function U2(o,l){switch(Pg(l),l.tag){case 3:si(Tt),$e();break;case 26:case 27:case 5:ln(l);break;case 4:$e();break;case 31:l.memoizedState!==null&&Hn(l);break;case 13:Hn(l);break;case 19:H(Dt);break;case 10:si(l.type);break;case 22:case 23:Hn(l),Yg(),o!==null&&H(bo);break;case 24:si(Tt)}}function Au(o,l){try{var d=l.updateQueue,p=d!==null?d.lastEffect:null;if(p!==null){var y=p.next;d=y;do{if((d.tag&o)===o){p=void 0;var v=d.create,w=d.inst;p=v(),w.destroy=p}d=d.next}while(d!==y)}}catch(N){Xe(l,l.return,N)}}function is(o,l,d){try{var p=l.updateQueue,y=p!==null?p.lastEffect:null;if(y!==null){var v=y.next;p=v;do{if((p.tag&o)===o){var w=p.inst,N=w.destroy;if(N!==void 0){w.destroy=void 0,y=l;var I=d,Y=N;try{Y()}catch(re){Xe(y,I,re)}}}p=p.next}while(p!==v)}}catch(re){Xe(l,l.return,re)}}function q2(o){var l=o.updateQueue;if(l!==null){var d=o.stateNode;try{zv(l,d)}catch(p){Xe(o,o.return,p)}}}function G2(o,l,d){d.props=Co(o.type,o.memoizedProps),d.state=o.memoizedState;try{d.componentWillUnmount()}catch(p){Xe(o,l,p)}}function Bu(o,l){try{var d=o.ref;if(d!==null){switch(o.tag){case 26:case 27:case 5:var p=o.stateNode;break;case 30:p=o.stateNode;break;default:p=o.stateNode}typeof d=="function"?o.refCleanup=d(p):d.current=p}}catch(y){Xe(o,l,y)}}function Pr(o,l){var d=o.ref,p=o.refCleanup;if(d!==null)if(typeof p=="function")try{p()}catch(y){Xe(o,l,y)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(y){Xe(o,l,y)}else d.current=null}function W2(o){var l=o.type,d=o.memoizedProps,p=o.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":d.autoFocus&&p.focus();break e;case"img":d.src?p.src=d.src:d.srcSet&&(p.srcset=d.srcSet)}}catch(y){Xe(o,o.return,y)}}function T0(o,l,d){try{var p=o.stateNode;BO(p,o.type,d,l),p[Dn]=l}catch(y){Xe(o,o.return,y)}}function Q2(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&fs(o.type)||o.tag===4}function A0(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||Q2(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.tag===27&&fs(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function B0(o,l,d){var p=o.tag;if(p===5||p===6)o=o.stateNode,l?(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d).insertBefore(o,l):(l=d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,l.appendChild(o),d=d._reactRootContainer,d!=null||l.onclick!==null||(l.onclick=ei));else if(p!==4&&(p===27&&fs(o.type)&&(d=o.stateNode,l=null),o=o.child,o!==null))for(B0(o,l,d),o=o.sibling;o!==null;)B0(o,l,d),o=o.sibling}function Cf(o,l,d){var p=o.tag;if(p===5||p===6)o=o.stateNode,l?d.insertBefore(o,l):d.appendChild(o);else if(p!==4&&(p===27&&fs(o.type)&&(d=o.stateNode),o=o.child,o!==null))for(Cf(o,l,d),o=o.sibling;o!==null;)Cf(o,l,d),o=o.sibling}function Y2(o){var l=o.stateNode,d=o.memoizedProps;try{for(var p=o.type,y=l.attributes;y.length;)l.removeAttributeNode(y[0]);en(l,p,d),l[Yt]=o,l[Dn]=d}catch(v){Xe(o,o.return,v)}}var ci=!1,Mt=!1,M0=!1,X2=typeof WeakSet=="function"?WeakSet:Set,qt=null;function uO(o,l){if(o=o.containerInfo,J0=Vf,o=uv(o),Dg(o)){if("selectionStart"in o)var d={start:o.selectionStart,end:o.selectionEnd};else e:{d=(d=o.ownerDocument)&&d.defaultView||window;var p=d.getSelection&&d.getSelection();if(p&&p.rangeCount!==0){d=p.anchorNode;var y=p.anchorOffset,v=p.focusNode;p=p.focusOffset;try{d.nodeType,v.nodeType}catch{d=null;break e}var w=0,N=-1,I=-1,Y=0,re=0,oe=o,J=null;t:for(;;){for(var ne;oe!==d||y!==0&&oe.nodeType!==3||(N=w+y),oe!==v||p!==0&&oe.nodeType!==3||(I=w+p),oe.nodeType===3&&(w+=oe.nodeValue.length),(ne=oe.firstChild)!==null;)J=oe,oe=ne;for(;;){if(oe===o)break t;if(J===d&&++Y===y&&(N=w),J===v&&++re===p&&(I=w),(ne=oe.nextSibling)!==null)break;oe=J,J=oe.parentNode}oe=ne}d=N===-1||I===-1?null:{start:N,end:I}}else d=null}d=d||{start:0,end:0}}else d=null;for(Z0={focusedElem:o,selectionRange:d},Vf=!1,qt=l;qt!==null;)if(l=qt,o=l.child,(l.subtreeFlags&1028)!==0&&o!==null)o.return=l,qt=o;else for(;qt!==null;){switch(l=qt,v=l.alternate,o=l.flags,l.tag){case 0:if((o&4)!==0&&(o=l.updateQueue,o=o!==null?o.events:null,o!==null))for(d=0;d<o.length;d++)y=o[d],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((o&1024)!==0&&v!==null){o=void 0,d=l,y=v.memoizedProps,v=v.memoizedState,p=d.stateNode;try{var be=Co(d.type,y);o=p.getSnapshotBeforeUpdate(be,v),p.__reactInternalSnapshotBeforeUpdate=o}catch(Ee){Xe(d,d.return,Ee)}}break;case 3:if((o&1024)!==0){if(o=l.stateNode.containerInfo,d=o.nodeType,d===9)nb(o);else if(d===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":nb(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((o&1024)!==0)throw Error(r(163))}if(o=l.sibling,o!==null){o.return=l.return,qt=o;break}qt=l.return}}function J2(o,l,d){var p=d.flags;switch(d.tag){case 0:case 11:case 15:fi(o,d),p&4&&Au(5,d);break;case 1:if(fi(o,d),p&4)if(o=d.stateNode,l===null)try{o.componentDidMount()}catch(w){Xe(d,d.return,w)}else{var y=Co(d.type,l.memoizedProps);l=l.memoizedState;try{o.componentDidUpdate(y,l,o.__reactInternalSnapshotBeforeUpdate)}catch(w){Xe(d,d.return,w)}}p&64&&q2(d),p&512&&Bu(d,d.return);break;case 3:if(fi(o,d),p&64&&(o=d.updateQueue,o!==null)){if(l=null,d.child!==null)switch(d.child.tag){case 27:case 5:l=d.child.stateNode;break;case 1:l=d.child.stateNode}try{zv(o,l)}catch(w){Xe(d,d.return,w)}}break;case 27:l===null&&p&4&&Y2(d);case 26:case 5:fi(o,d),l===null&&p&4&&W2(d),p&512&&Bu(d,d.return);break;case 12:fi(o,d);break;case 31:fi(o,d),p&4&&tk(o,d);break;case 13:fi(o,d),p&4&&nk(o,d),p&64&&(o=d.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(d=yO.bind(null,d),IO(o,d))));break;case 22:if(p=d.memoizedState!==null||ci,!p){l=l!==null&&l.memoizedState!==null||Mt,y=ci;var v=Mt;ci=p,(Mt=l)&&!v?hi(o,d,(d.subtreeFlags&8772)!==0):fi(o,d),ci=y,Mt=v}break;case 30:break;default:fi(o,d)}}function Z2(o){var l=o.alternate;l!==null&&(o.alternate=null,Z2(l)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(l=o.stateNode,l!==null&&ag(l)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}var ft=null,wn=!1;function di(o,l,d){for(d=d.child;d!==null;)ek(o,l,d),d=d.sibling}function ek(o,l,d){if(jn&&typeof jn.onCommitFiberUnmount=="function")try{jn.onCommitFiberUnmount(eu,d)}catch{}switch(d.tag){case 26:Mt||Pr(d,l),di(o,l,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:Mt||Pr(d,l);var p=ft,y=wn;fs(d.type)&&(ft=d.stateNode,wn=!1),di(o,l,d),ju(d.stateNode),ft=p,wn=y;break;case 5:Mt||Pr(d,l);case 6:if(p=ft,y=wn,ft=null,di(o,l,d),ft=p,wn=y,ft!==null)if(wn)try{(ft.nodeType===9?ft.body:ft.nodeName==="HTML"?ft.ownerDocument.body:ft).removeChild(d.stateNode)}catch(v){Xe(d,l,v)}else try{ft.removeChild(d.stateNode)}catch(v){Xe(d,l,v)}break;case 18:ft!==null&&(wn?(o=ft,qk(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,d.stateNode),sl(o)):qk(ft,d.stateNode));break;case 4:p=ft,y=wn,ft=d.stateNode.containerInfo,wn=!0,di(o,l,d),ft=p,wn=y;break;case 0:case 11:case 14:case 15:is(2,d,l),Mt||is(4,d,l),di(o,l,d);break;case 1:Mt||(Pr(d,l),p=d.stateNode,typeof p.componentWillUnmount=="function"&&G2(d,l,p)),di(o,l,d);break;case 21:di(o,l,d);break;case 22:Mt=(p=Mt)||d.memoizedState!==null,di(o,l,d),Mt=p;break;default:di(o,l,d)}}function tk(o,l){if(l.memoizedState===null&&(o=l.alternate,o!==null&&(o=o.memoizedState,o!==null))){o=o.dehydrated;try{sl(o)}catch(d){Xe(l,l.return,d)}}}function nk(o,l){if(l.memoizedState===null&&(o=l.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{sl(o)}catch(d){Xe(l,l.return,d)}}function cO(o){switch(o.tag){case 31:case 13:case 19:var l=o.stateNode;return l===null&&(l=o.stateNode=new X2),l;case 22:return o=o.stateNode,l=o._retryCache,l===null&&(l=o._retryCache=new X2),l;default:throw Error(r(435,o.tag))}}function Ef(o,l){var d=cO(o);l.forEach(function(p){if(!d.has(p)){d.add(p);var y=xO.bind(null,o,p);p.then(y,y)}})}function $n(o,l){var d=l.deletions;if(d!==null)for(var p=0;p<d.length;p++){var y=d[p],v=o,w=l,N=w;e:for(;N!==null;){switch(N.tag){case 27:if(fs(N.type)){ft=N.stateNode,wn=!1;break e}break;case 5:ft=N.stateNode,wn=!1;break e;case 3:case 4:ft=N.stateNode.containerInfo,wn=!0;break e}N=N.return}if(ft===null)throw Error(r(160));ek(v,w,y),ft=null,wn=!1,v=y.alternate,v!==null&&(v.return=null),y.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)rk(l,o),l=l.sibling}var xr=null;function rk(o,l){var d=o.alternate,p=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:$n(l,o),Tn(o),p&4&&(is(3,o,o.return),Au(3,o),is(5,o,o.return));break;case 1:$n(l,o),Tn(o),p&512&&(Mt||d===null||Pr(d,d.return)),p&64&&ci&&(o=o.updateQueue,o!==null&&(p=o.callbacks,p!==null&&(d=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=d===null?p:d.concat(p))));break;case 26:var y=xr;if($n(l,o),Tn(o),p&512&&(Mt||d===null||Pr(d,d.return)),p&4){var v=d!==null?d.memoizedState:null;if(p=o.memoizedState,d===null)if(p===null)if(o.stateNode===null){e:{p=o.type,d=o.memoizedProps,y=y.ownerDocument||y;t:switch(p){case"title":v=y.getElementsByTagName("title")[0],(!v||v[ru]||v[Yt]||v.namespaceURI==="http://www.w3.org/2000/svg"||v.hasAttribute("itemprop"))&&(v=y.createElement(p),y.head.insertBefore(v,y.querySelector("head > title"))),en(v,p,d),v[Yt]=o,Ut(v),p=v;break e;case"link":var w=r5("link","href",y).get(p+(d.href||""));if(w){for(var N=0;N<w.length;N++)if(v=w[N],v.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&v.getAttribute("rel")===(d.rel==null?null:d.rel)&&v.getAttribute("title")===(d.title==null?null:d.title)&&v.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){w.splice(N,1);break t}}v=y.createElement(p),en(v,p,d),y.head.appendChild(v);break;case"meta":if(w=r5("meta","content",y).get(p+(d.content||""))){for(N=0;N<w.length;N++)if(v=w[N],v.getAttribute("content")===(d.content==null?null:""+d.content)&&v.getAttribute("name")===(d.name==null?null:d.name)&&v.getAttribute("property")===(d.property==null?null:d.property)&&v.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&v.getAttribute("charset")===(d.charSet==null?null:d.charSet)){w.splice(N,1);break t}}v=y.createElement(p),en(v,p,d),y.head.appendChild(v);break;default:throw Error(r(468,p))}v[Yt]=o,Ut(v),p=v}o.stateNode=p}else i5(y,o.type,o.stateNode);else o.stateNode=n5(y,p,o.memoizedProps);else v!==p?(v===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):v.count--,p===null?i5(y,o.type,o.stateNode):n5(y,p,o.memoizedProps)):p===null&&o.stateNode!==null&&T0(o,o.memoizedProps,d.memoizedProps)}break;case 27:$n(l,o),Tn(o),p&512&&(Mt||d===null||Pr(d,d.return)),d!==null&&p&4&&T0(o,o.memoizedProps,d.memoizedProps);break;case 5:if($n(l,o),Tn(o),p&512&&(Mt||d===null||Pr(d,d.return)),o.flags&32){y=o.stateNode;try{Ta(y,"")}catch(be){Xe(o,o.return,be)}}p&4&&o.stateNode!=null&&(y=o.memoizedProps,T0(o,y,d!==null?d.memoizedProps:y)),p&1024&&(M0=!0);break;case 6:if($n(l,o),Tn(o),p&4){if(o.stateNode===null)throw Error(r(162));p=o.memoizedProps,d=o.stateNode;try{d.nodeValue=p}catch(be){Xe(o,o.return,be)}}break;case 3:if(jf=null,y=xr,xr=Lf(l.containerInfo),$n(l,o),xr=y,Tn(o),p&4&&d!==null&&d.memoizedState.isDehydrated)try{sl(l.containerInfo)}catch(be){Xe(o,o.return,be)}M0&&(M0=!1,ik(o));break;case 4:p=xr,xr=Lf(o.stateNode.containerInfo),$n(l,o),Tn(o),xr=p;break;case 12:$n(l,o),Tn(o);break;case 31:$n(l,o),Tn(o),p&4&&(p=o.updateQueue,p!==null&&(o.updateQueue=null,Ef(o,p)));break;case 13:$n(l,o),Tn(o),o.child.flags&8192&&o.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(Sf=gt()),p&4&&(p=o.updateQueue,p!==null&&(o.updateQueue=null,Ef(o,p)));break;case 22:y=o.memoizedState!==null;var I=d!==null&&d.memoizedState!==null,Y=ci,re=Mt;if(ci=Y||y,Mt=re||I,$n(l,o),Mt=re,ci=Y,Tn(o),p&8192)e:for(l=o.stateNode,l._visibility=y?l._visibility&-2:l._visibility|1,y&&(d===null||I||ci||Mt||Eo(o)),d=null,l=o;;){if(l.tag===5||l.tag===26){if(d===null){I=d=l;try{if(v=I.stateNode,y)w=v.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{N=I.stateNode;var oe=I.memoizedProps.style,J=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;N.style.display=J==null||typeof J=="boolean"?"":(""+J).trim()}}catch(be){Xe(I,I.return,be)}}}else if(l.tag===6){if(d===null){I=l;try{I.stateNode.nodeValue=y?"":I.memoizedProps}catch(be){Xe(I,I.return,be)}}}else if(l.tag===18){if(d===null){I=l;try{var ne=I.stateNode;y?Gk(ne,!0):Gk(I.stateNode,!1)}catch(be){Xe(I,I.return,be)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===o)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break e;for(;l.sibling===null;){if(l.return===null||l.return===o)break e;d===l&&(d=null),l=l.return}d===l&&(d=null),l.sibling.return=l.return,l=l.sibling}p&4&&(p=o.updateQueue,p!==null&&(d=p.retryQueue,d!==null&&(p.retryQueue=null,Ef(o,d))));break;case 19:$n(l,o),Tn(o),p&4&&(p=o.updateQueue,p!==null&&(o.updateQueue=null,Ef(o,p)));break;case 30:break;case 21:break;default:$n(l,o),Tn(o)}}function Tn(o){var l=o.flags;if(l&2){try{for(var d,p=o.return;p!==null;){if(Q2(p)){d=p;break}p=p.return}if(d==null)throw Error(r(160));switch(d.tag){case 27:var y=d.stateNode,v=A0(o);Cf(o,v,y);break;case 5:var w=d.stateNode;d.flags&32&&(Ta(w,""),d.flags&=-33);var N=A0(o);Cf(o,N,w);break;case 3:case 4:var I=d.stateNode.containerInfo,Y=A0(o);B0(o,Y,I);break;default:throw Error(r(161))}}catch(re){Xe(o,o.return,re)}o.flags&=-3}l&4096&&(o.flags&=-4097)}function ik(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var l=o;ik(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),o=o.sibling}}function fi(o,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)J2(o,l.alternate,l),l=l.sibling}function Eo(o){for(o=o.child;o!==null;){var l=o;switch(l.tag){case 0:case 11:case 14:case 15:is(4,l,l.return),Eo(l);break;case 1:Pr(l,l.return);var d=l.stateNode;typeof d.componentWillUnmount=="function"&&G2(l,l.return,d),Eo(l);break;case 27:ju(l.stateNode);case 26:case 5:Pr(l,l.return),Eo(l);break;case 22:l.memoizedState===null&&Eo(l);break;case 30:Eo(l);break;default:Eo(l)}o=o.sibling}}function hi(o,l,d){for(d=d&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var p=l.alternate,y=o,v=l,w=v.flags;switch(v.tag){case 0:case 11:case 15:hi(y,v,d),Au(4,v);break;case 1:if(hi(y,v,d),p=v,y=p.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(Y){Xe(p,p.return,Y)}if(p=v,y=p.updateQueue,y!==null){var N=p.stateNode;try{var I=y.shared.hiddenCallbacks;if(I!==null)for(y.shared.hiddenCallbacks=null,y=0;y<I.length;y++)Pv(I[y],N)}catch(Y){Xe(p,p.return,Y)}}d&&w&64&&q2(v),Bu(v,v.return);break;case 27:Y2(v);case 26:case 5:hi(y,v,d),d&&p===null&&w&4&&W2(v),Bu(v,v.return);break;case 12:hi(y,v,d);break;case 31:hi(y,v,d),d&&w&4&&tk(y,v);break;case 13:hi(y,v,d),d&&w&4&&nk(y,v);break;case 22:v.memoizedState===null&&hi(y,v,d),Bu(v,v.return);break;case 30:break;default:hi(y,v,d)}l=l.sibling}}function N0(o,l){var d=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),o=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(o=l.memoizedState.cachePool.pool),o!==d&&(o!=null&&o.refCount++,d!=null&&gu(d))}function R0(o,l){o=null,l.alternate!==null&&(o=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==o&&(l.refCount++,o!=null&&gu(o))}function vr(o,l,d,p){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)sk(o,l,d,p),l=l.sibling}function sk(o,l,d,p){var y=l.flags;switch(l.tag){case 0:case 11:case 15:vr(o,l,d,p),y&2048&&Au(9,l);break;case 1:vr(o,l,d,p);break;case 3:vr(o,l,d,p),y&2048&&(o=null,l.alternate!==null&&(o=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==o&&(l.refCount++,o!=null&&gu(o)));break;case 12:if(y&2048){vr(o,l,d,p),o=l.stateNode;try{var v=l.memoizedProps,w=v.id,N=v.onPostCommit;typeof N=="function"&&N(w,l.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(I){Xe(l,l.return,I)}}else vr(o,l,d,p);break;case 31:vr(o,l,d,p);break;case 13:vr(o,l,d,p);break;case 23:break;case 22:v=l.stateNode,w=l.alternate,l.memoizedState!==null?v._visibility&2?vr(o,l,d,p):Mu(o,l):v._visibility&2?vr(o,l,d,p):(v._visibility|=2,Wa(o,l,d,p,(l.subtreeFlags&10256)!==0||!1)),y&2048&&N0(w,l);break;case 24:vr(o,l,d,p),y&2048&&R0(l.alternate,l);break;default:vr(o,l,d,p)}}function Wa(o,l,d,p,y){for(y=y&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var v=o,w=l,N=d,I=p,Y=w.flags;switch(w.tag){case 0:case 11:case 15:Wa(v,w,N,I,y),Au(8,w);break;case 23:break;case 22:var re=w.stateNode;w.memoizedState!==null?re._visibility&2?Wa(v,w,N,I,y):Mu(v,w):(re._visibility|=2,Wa(v,w,N,I,y)),y&&Y&2048&&N0(w.alternate,w);break;case 24:Wa(v,w,N,I,y),y&&Y&2048&&R0(w.alternate,w);break;default:Wa(v,w,N,I,y)}l=l.sibling}}function Mu(o,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var d=o,p=l,y=p.flags;switch(p.tag){case 22:Mu(d,p),y&2048&&N0(p.alternate,p);break;case 24:Mu(d,p),y&2048&&R0(p.alternate,p);break;default:Mu(d,p)}l=l.sibling}}var Nu=8192;function Qa(o,l,d){if(o.subtreeFlags&Nu)for(o=o.child;o!==null;)ok(o,l,d),o=o.sibling}function ok(o,l,d){switch(o.tag){case 26:Qa(o,l,d),o.flags&Nu&&o.memoizedState!==null&&YO(d,xr,o.memoizedState,o.memoizedProps);break;case 5:Qa(o,l,d);break;case 3:case 4:var p=xr;xr=Lf(o.stateNode.containerInfo),Qa(o,l,d),xr=p;break;case 22:o.memoizedState===null&&(p=o.alternate,p!==null&&p.memoizedState!==null?(p=Nu,Nu=16777216,Qa(o,l,d),Nu=p):Qa(o,l,d));break;default:Qa(o,l,d)}}function ak(o){var l=o.alternate;if(l!==null&&(o=l.child,o!==null)){l.child=null;do l=o.sibling,o.sibling=null,o=l;while(o!==null)}}function Ru(o){var l=o.deletions;if((o.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var p=l[d];qt=p,uk(p,o)}ak(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)lk(o),o=o.sibling}function lk(o){switch(o.tag){case 0:case 11:case 15:Ru(o),o.flags&2048&&is(9,o,o.return);break;case 3:Ru(o);break;case 12:Ru(o);break;case 22:var l=o.stateNode;o.memoizedState!==null&&l._visibility&2&&(o.return===null||o.return.tag!==13)?(l._visibility&=-3,Df(o)):Ru(o);break;default:Ru(o)}}function Df(o){var l=o.deletions;if((o.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var p=l[d];qt=p,uk(p,o)}ak(o)}for(o=o.child;o!==null;){switch(l=o,l.tag){case 0:case 11:case 15:is(8,l,l.return),Df(l);break;case 22:d=l.stateNode,d._visibility&2&&(d._visibility&=-3,Df(l));break;default:Df(l)}o=o.sibling}}function uk(o,l){for(;qt!==null;){var d=qt;switch(d.tag){case 0:case 11:case 15:is(8,d,l);break;case 23:case 22:if(d.memoizedState!==null&&d.memoizedState.cachePool!==null){var p=d.memoizedState.cachePool.pool;p!=null&&p.refCount++}break;case 24:gu(d.memoizedState.cache)}if(p=d.child,p!==null)p.return=d,qt=p;else e:for(d=o;qt!==null;){p=qt;var y=p.sibling,v=p.return;if(Z2(p),p===d){qt=null;break e}if(y!==null){y.return=v,qt=y;break e}qt=v}}}var dO={getCacheForType:function(o){var l=Jt(Tt),d=l.data.get(o);return d===void 0&&(d=o(),l.data.set(o,d)),d},cacheSignal:function(){return Jt(Tt).controller.signal}},fO=typeof WeakMap=="function"?WeakMap:Map,Ge=0,it=null,ze=null,Fe=0,Ye=0,Un=null,ss=!1,Ya=!1,O0=!1,pi=0,xt=0,as=0,Do=0,P0=0,qn=0,Xa=0,Ou=null,An=null,z0=!1,Sf=0,ck=0,wf=1/0,$f=null,ls=null,jt=0,us=null,Ja=null,mi=0,L0=0,I0=null,dk=null,Pu=0,j0=null;function Gn(){return(Ge&2)!==0&&Fe!==0?Fe&-Fe:P.T!==null?U0():$1()}function fk(){if(qn===0)if((Fe&536870912)===0||Ve){var o=Od;Od<<=1,(Od&3932160)===0&&(Od=262144),qn=o}else qn=536870912;return o=Vn.current,o!==null&&(o.flags|=32),qn}function Bn(o,l,d){(o===it&&(Ye===2||Ye===9)||o.cancelPendingCommit!==null)&&(Za(o,0),cs(o,Fe,qn,!1)),nu(o,d),((Ge&2)===0||o!==it)&&(o===it&&((Ge&2)===0&&(Do|=d),xt===4&&cs(o,Fe,qn,!1)),zr(o))}function hk(o,l,d){if((Ge&6)!==0)throw Error(r(327));var p=!d&&(l&127)===0&&(l&o.expiredLanes)===0||tu(o,l),y=p?mO(o,l):K0(o,l,!0),v=p;do{if(y===0){Ya&&!p&&cs(o,l,0,!1);break}else{if(d=o.current.alternate,v&&!hO(d)){y=K0(o,l,!1),v=!1;continue}if(y===2){if(v=l,o.errorRecoveryDisabledLanes&v)var w=0;else w=o.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){l=w;e:{var N=o;y=Ou;var I=N.current.memoizedState.isDehydrated;if(I&&(Za(N,w).flags|=256),w=K0(N,w,!1),w!==2){if(O0&&!I){N.errorRecoveryDisabledLanes|=v,Do|=v,y=4;break e}v=An,An=y,v!==null&&(An===null?An=v:An.push.apply(An,v))}y=w}if(v=!1,y!==2)continue}}if(y===1){Za(o,0),cs(o,l,0,!0);break}e:{switch(p=o,v=y,v){case 0:case 1:throw Error(r(345));case 4:if((l&4194048)!==l)break;case 6:cs(p,l,qn,!ss);break e;case 2:An=null;break;case 3:case 5:break;default:throw Error(r(329))}if((l&62914560)===l&&(y=Sf+300-gt(),10<y)){if(cs(p,l,qn,!ss),zd(p,0,!0)!==0)break e;mi=l,p.timeoutHandle=Hk(pk.bind(null,p,d,An,$f,z0,l,qn,Do,Xa,ss,v,"Throttled",-0,0),y);break e}pk(p,d,An,$f,z0,l,qn,Do,Xa,ss,v,null,-0,0)}}break}while(!0);zr(o)}function pk(o,l,d,p,y,v,w,N,I,Y,re,oe,J,ne){if(o.timeoutHandle=-1,oe=l.subtreeFlags,oe&8192||(oe&16785408)===16785408){oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ei},ok(l,v,oe);var be=(v&62914560)===v?Sf-gt():(v&4194048)===v?ck-gt():0;if(be=XO(oe,be),be!==null){mi=v,o.cancelPendingCommit=be(Ck.bind(null,o,l,v,d,p,y,w,N,I,re,oe,null,J,ne)),cs(o,v,w,!Y);return}}Ck(o,l,v,d,p,y,w,N,I)}function hO(o){for(var l=o;;){var d=l.tag;if((d===0||d===11||d===15)&&l.flags&16384&&(d=l.updateQueue,d!==null&&(d=d.stores,d!==null)))for(var p=0;p<d.length;p++){var y=d[p],v=y.getSnapshot;y=y.value;try{if(!Kn(v(),y))return!1}catch{return!1}}if(d=l.child,l.subtreeFlags&16384&&d!==null)d.return=l,l=d;else{if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function cs(o,l,d,p){l&=~P0,l&=~Do,o.suspendedLanes|=l,o.pingedLanes&=~l,p&&(o.warmLanes|=l),p=o.expirationTimes;for(var y=l;0<y;){var v=31-Fn(y),w=1<<v;p[v]=-1,y&=~w}d!==0&&D1(o,d,l)}function Tf(){return(Ge&6)===0?(zu(0),!1):!0}function F0(){if(ze!==null){if(Ye===0)var o=ze.return;else o=ze,ii=mo=null,n0(o),Va=null,yu=0,o=ze;for(;o!==null;)U2(o.alternate,o),o=o.return;ze=null}}function Za(o,l){var d=o.timeoutHandle;d!==-1&&(o.timeoutHandle=-1,RO(d)),d=o.cancelPendingCommit,d!==null&&(o.cancelPendingCommit=null,d()),mi=0,F0(),it=o,ze=d=ni(o.current,null),Fe=l,Ye=0,Un=null,ss=!1,Ya=tu(o,l),O0=!1,Xa=qn=P0=Do=as=xt=0,An=Ou=null,z0=!1,(l&8)!==0&&(l|=l&32);var p=o.entangledLanes;if(p!==0)for(o=o.entanglements,p&=l;0<p;){var y=31-Fn(p),v=1<<y;l|=o[y],p&=~v}return pi=l,Wd(),d}function mk(o,l){Ae=null,P.H=wu,l===_a||l===nf?(l=Mv(),Ye=3):l===Hg?(l=Mv(),Ye=4):Ye=l===y0?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,Un=l,ze===null&&(xt=1,bf(o,tr(l,o.current)))}function gk(){var o=Vn.current;return o===null?!0:(Fe&4194048)===Fe?sr===null:(Fe&62914560)===Fe||(Fe&536870912)!==0?o===sr:!1}function bk(){var o=P.H;return P.H=wu,o===null?wu:o}function yk(){var o=P.A;return P.A=dO,o}function Af(){xt=4,ss||(Fe&4194048)!==Fe&&Vn.current!==null||(Ya=!0),(as&134217727)===0&&(Do&134217727)===0||it===null||cs(it,Fe,qn,!1)}function K0(o,l,d){var p=Ge;Ge|=2;var y=bk(),v=yk();(it!==o||Fe!==l)&&($f=null,Za(o,l)),l=!1;var w=xt;e:do try{if(Ye!==0&&ze!==null){var N=ze,I=Un;switch(Ye){case 8:F0(),w=6;break e;case 3:case 2:case 9:case 6:Vn.current===null&&(l=!0);var Y=Ye;if(Ye=0,Un=null,el(o,N,I,Y),d&&Ya){w=0;break e}break;default:Y=Ye,Ye=0,Un=null,el(o,N,I,Y)}}pO(),w=xt;break}catch(re){mk(o,re)}while(!0);return l&&o.shellSuspendCounter++,ii=mo=null,Ge=p,P.H=y,P.A=v,ze===null&&(it=null,Fe=0,Wd()),w}function pO(){for(;ze!==null;)xk(ze)}function mO(o,l){var d=Ge;Ge|=2;var p=bk(),y=yk();it!==o||Fe!==l?($f=null,wf=gt()+500,Za(o,l)):Ya=tu(o,l);e:do try{if(Ye!==0&&ze!==null){l=ze;var v=Un;t:switch(Ye){case 1:Ye=0,Un=null,el(o,l,v,1);break;case 2:case 9:if(Av(v)){Ye=0,Un=null,vk(l);break}l=function(){Ye!==2&&Ye!==9||it!==o||(Ye=7),zr(o)},v.then(l,l);break e;case 3:Ye=7;break e;case 4:Ye=5;break e;case 7:Av(v)?(Ye=0,Un=null,vk(l)):(Ye=0,Un=null,el(o,l,v,7));break;case 5:var w=null;switch(ze.tag){case 26:w=ze.memoizedState;case 5:case 27:var N=ze;if(w?s5(w):N.stateNode.complete){Ye=0,Un=null;var I=N.sibling;if(I!==null)ze=I;else{var Y=N.return;Y!==null?(ze=Y,Bf(Y)):ze=null}break t}}Ye=0,Un=null,el(o,l,v,5);break;case 6:Ye=0,Un=null,el(o,l,v,6);break;case 8:F0(),xt=6;break e;default:throw Error(r(462))}}gO();break}catch(re){mk(o,re)}while(!0);return ii=mo=null,P.H=p,P.A=y,Ge=d,ze!==null?0:(it=null,Fe=0,Wd(),xt)}function gO(){for(;ze!==null&&!Md();)xk(ze)}function xk(o){var l=V2(o.alternate,o,pi);o.memoizedProps=o.pendingProps,l===null?Bf(o):ze=l}function vk(o){var l=o,d=l.alternate;switch(l.tag){case 15:case 0:l=L2(d,l,l.pendingProps,l.type,void 0,Fe);break;case 11:l=L2(d,l,l.pendingProps,l.type.render,l.ref,Fe);break;case 5:n0(l);default:U2(d,l),l=ze=yv(l,pi),l=V2(d,l,pi)}o.memoizedProps=o.pendingProps,l===null?Bf(o):ze=l}function el(o,l,d,p){ii=mo=null,n0(l),Va=null,yu=0;var y=l.return;try{if(iO(o,y,l,d,Fe)){xt=1,bf(o,tr(d,o.current)),ze=null;return}}catch(v){if(y!==null)throw ze=y,v;xt=1,bf(o,tr(d,o.current)),ze=null;return}l.flags&32768?(Ve||p===1?o=!0:Ya||(Fe&536870912)!==0?o=!1:(ss=o=!0,(p===2||p===9||p===3||p===6)&&(p=Vn.current,p!==null&&p.tag===13&&(p.flags|=16384))),kk(l,o)):Bf(l)}function Bf(o){var l=o;do{if((l.flags&32768)!==0){kk(l,ss);return}o=l.return;var d=aO(l.alternate,l,pi);if(d!==null){ze=d;return}if(l=l.sibling,l!==null){ze=l;return}ze=l=o}while(l!==null);xt===0&&(xt=5)}function kk(o,l){do{var d=lO(o.alternate,o);if(d!==null){d.flags&=32767,ze=d;return}if(d=o.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!l&&(o=o.sibling,o!==null)){ze=o;return}ze=o=d}while(o!==null);xt=6,ze=null}function Ck(o,l,d,p,y,v,w,N,I){o.cancelPendingCommit=null;do Mf();while(jt!==0);if((Ge&6)!==0)throw Error(r(327));if(l!==null){if(l===o.current)throw Error(r(177));if(v=l.lanes|l.childLanes,v|=Ag,QN(o,d,v,w,N,I),o===it&&(ze=it=null,Fe=0),Ja=l,us=o,mi=d,L0=v,I0=y,dk=p,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,vO(Nd,function(){return $k(),null})):(o.callbackNode=null,o.callbackPriority=0),p=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||p){p=P.T,P.T=null,y=_.p,_.p=2,w=Ge,Ge|=4;try{uO(o,l,d)}finally{Ge=w,_.p=y,P.T=p}}jt=1,Ek(),Dk(),Sk()}}function Ek(){if(jt===1){jt=0;var o=us,l=Ja,d=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||d){d=P.T,P.T=null;var p=_.p;_.p=2;var y=Ge;Ge|=4;try{rk(l,o);var v=Z0,w=uv(o.containerInfo),N=v.focusedElem,I=v.selectionRange;if(w!==N&&N&&N.ownerDocument&&lv(N.ownerDocument.documentElement,N)){if(I!==null&&Dg(N)){var Y=I.start,re=I.end;if(re===void 0&&(re=Y),"selectionStart"in N)N.selectionStart=Y,N.selectionEnd=Math.min(re,N.value.length);else{var oe=N.ownerDocument||document,J=oe&&oe.defaultView||window;if(J.getSelection){var ne=J.getSelection(),be=N.textContent.length,Ee=Math.min(I.start,be),nt=I.end===void 0?Ee:Math.min(I.end,be);!ne.extend&&Ee>nt&&(w=nt,nt=Ee,Ee=w);var U=av(N,Ee),K=av(N,nt);if(U&&K&&(ne.rangeCount!==1||ne.anchorNode!==U.node||ne.anchorOffset!==U.offset||ne.focusNode!==K.node||ne.focusOffset!==K.offset)){var Q=oe.createRange();Q.setStart(U.node,U.offset),ne.removeAllRanges(),Ee>nt?(ne.addRange(Q),ne.extend(K.node,K.offset)):(Q.setEnd(K.node,K.offset),ne.addRange(Q))}}}}for(oe=[],ne=N;ne=ne.parentNode;)ne.nodeType===1&&oe.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<oe.length;N++){var se=oe[N];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}Vf=!!J0,Z0=J0=null}finally{Ge=y,_.p=p,P.T=d}}o.current=l,jt=2}}function Dk(){if(jt===2){jt=0;var o=us,l=Ja,d=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||d){d=P.T,P.T=null;var p=_.p;_.p=2;var y=Ge;Ge|=4;try{J2(o,l.alternate,l)}finally{Ge=y,_.p=p,P.T=d}}jt=3}}function Sk(){if(jt===4||jt===3){jt=0,It();var o=us,l=Ja,d=mi,p=dk;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?jt=5:(jt=0,Ja=us=null,wk(o,o.pendingLanes));var y=o.pendingLanes;if(y===0&&(ls=null),sg(d),l=l.stateNode,jn&&typeof jn.onCommitFiberRoot=="function")try{jn.onCommitFiberRoot(eu,l,void 0,(l.current.flags&128)===128)}catch{}if(p!==null){l=P.T,y=_.p,_.p=2,P.T=null;try{for(var v=o.onRecoverableError,w=0;w<p.length;w++){var N=p[w];v(N.value,{componentStack:N.stack})}}finally{P.T=l,_.p=y}}(mi&3)!==0&&Mf(),zr(o),y=o.pendingLanes,(d&261930)!==0&&(y&42)!==0?o===j0?Pu++:(Pu=0,j0=o):Pu=0,zu(0)}}function wk(o,l){(o.pooledCacheLanes&=l)===0&&(l=o.pooledCache,l!=null&&(o.pooledCache=null,gu(l)))}function Mf(){return Ek(),Dk(),Sk(),$k()}function $k(){if(jt!==5)return!1;var o=us,l=L0;L0=0;var d=sg(mi),p=P.T,y=_.p;try{_.p=32>d?32:d,P.T=null,d=I0,I0=null;var v=us,w=mi;if(jt=0,Ja=us=null,mi=0,(Ge&6)!==0)throw Error(r(331));var N=Ge;if(Ge|=4,lk(v.current),sk(v,v.current,w,d),Ge=N,zu(0,!1),jn&&typeof jn.onPostCommitFiberRoot=="function")try{jn.onPostCommitFiberRoot(eu,v)}catch{}return!0}finally{_.p=y,P.T=p,wk(o,l)}}function Tk(o,l,d){l=tr(d,l),l=b0(o.stateNode,l,2),o=ts(o,l,2),o!==null&&(nu(o,2),zr(o))}function Xe(o,l,d){if(o.tag===3)Tk(o,o,d);else for(;l!==null;){if(l.tag===3){Tk(l,o,d);break}else if(l.tag===1){var p=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(ls===null||!ls.has(p))){o=tr(d,o),d=A2(2),p=ts(l,d,2),p!==null&&(B2(d,p,l,o),nu(p,2),zr(p));break}}l=l.return}}function _0(o,l,d){var p=o.pingCache;if(p===null){p=o.pingCache=new fO;var y=new Set;p.set(l,y)}else y=p.get(l),y===void 0&&(y=new Set,p.set(l,y));y.has(d)||(O0=!0,y.add(d),o=bO.bind(null,o,l,d),l.then(o,o))}function bO(o,l,d){var p=o.pingCache;p!==null&&p.delete(l),o.pingedLanes|=o.suspendedLanes&d,o.warmLanes&=~d,it===o&&(Fe&d)===d&&(xt===4||xt===3&&(Fe&62914560)===Fe&&300>gt()-Sf?(Ge&2)===0&&Za(o,0):P0|=d,Xa===Fe&&(Xa=0)),zr(o)}function Ak(o,l){l===0&&(l=E1()),o=fo(o,l),o!==null&&(nu(o,l),zr(o))}function yO(o){var l=o.memoizedState,d=0;l!==null&&(d=l.retryLane),Ak(o,d)}function xO(o,l){var d=0;switch(o.tag){case 31:case 13:var p=o.stateNode,y=o.memoizedState;y!==null&&(d=y.retryLane);break;case 19:p=o.stateNode;break;case 22:p=o.stateNode._retryCache;break;default:throw Error(r(314))}p!==null&&p.delete(l),Ak(o,d)}function vO(o,l){return Xl(o,l)}var Nf=null,tl=null,V0=!1,Rf=!1,H0=!1,ds=0;function zr(o){o!==tl&&o.next===null&&(tl===null?Nf=tl=o:tl=tl.next=o),Rf=!0,V0||(V0=!0,CO())}function zu(o,l){if(!H0&&Rf){H0=!0;do for(var d=!1,p=Nf;p!==null;){if(o!==0){var y=p.pendingLanes;if(y===0)var v=0;else{var w=p.suspendedLanes,N=p.pingedLanes;v=(1<<31-Fn(42|o)+1)-1,v&=y&~(w&~N),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(d=!0,Rk(p,v))}else v=Fe,v=zd(p,p===it?v:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(v&3)===0||tu(p,v)||(d=!0,Rk(p,v));p=p.next}while(d);H0=!1}}function kO(){Bk()}function Bk(){Rf=V0=!1;var o=0;ds!==0&&NO()&&(o=ds);for(var l=gt(),d=null,p=Nf;p!==null;){var y=p.next,v=Mk(p,l);v===0?(p.next=null,d===null?Nf=y:d.next=y,y===null&&(tl=d)):(d=p,(o!==0||(v&3)!==0)&&(Rf=!0)),p=y}jt!==0&&jt!==5||zu(o),ds!==0&&(ds=0)}function Mk(o,l){for(var d=o.suspendedLanes,p=o.pingedLanes,y=o.expirationTimes,v=o.pendingLanes&-62914561;0<v;){var w=31-Fn(v),N=1<<w,I=y[w];I===-1?((N&d)===0||(N&p)!==0)&&(y[w]=WN(N,l)):I<=l&&(o.expiredLanes|=N),v&=~N}if(l=it,d=Fe,d=zd(o,o===l?d:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),p=o.callbackNode,d===0||o===l&&(Ye===2||Ye===9)||o.cancelPendingCommit!==null)return p!==null&&p!==null&&Jl(p),o.callbackNode=null,o.callbackPriority=0;if((d&3)===0||tu(o,d)){if(l=d&-d,l===o.callbackPriority)return l;switch(p!==null&&Jl(p),sg(d)){case 2:case 8:d=k1;break;case 32:d=Nd;break;case 268435456:d=C1;break;default:d=Nd}return p=Nk.bind(null,o),d=Xl(d,p),o.callbackPriority=l,o.callbackNode=d,l}return p!==null&&p!==null&&Jl(p),o.callbackPriority=2,o.callbackNode=null,2}function Nk(o,l){if(jt!==0&&jt!==5)return o.callbackNode=null,o.callbackPriority=0,null;var d=o.callbackNode;if(Mf()&&o.callbackNode!==d)return null;var p=Fe;return p=zd(o,o===it?p:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),p===0?null:(hk(o,p,l),Mk(o,gt()),o.callbackNode!=null&&o.callbackNode===d?Nk.bind(null,o):null)}function Rk(o,l){if(Mf())return null;hk(o,l,!0)}function CO(){OO(function(){(Ge&6)!==0?Xl(Zl,kO):Bk()})}function U0(){if(ds===0){var o=Fa;o===0&&(o=Rd,Rd<<=1,(Rd&261888)===0&&(Rd=256)),ds=o}return ds}function Ok(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:Fd(""+o)}function Pk(o,l){var d=l.ownerDocument.createElement("input");return d.name=l.name,d.value=l.value,o.id&&d.setAttribute("form",o.id),l.parentNode.insertBefore(d,l),o=new FormData(o),d.parentNode.removeChild(d),o}function EO(o,l,d,p,y){if(l==="submit"&&d&&d.stateNode===y){var v=Ok((y[Dn]||null).action),w=p.submitter;w&&(l=(l=w[Dn]||null)?Ok(l.formAction):w.getAttribute("formAction"),l!==null&&(v=l,w=null));var N=new Hd("action","action",null,p,y);o.push({event:N,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(ds!==0){var I=w?Pk(y,w):new FormData(y);d0(d,{pending:!0,data:I,method:y.method,action:v},null,I)}}else typeof v=="function"&&(N.preventDefault(),I=w?Pk(y,w):new FormData(y),d0(d,{pending:!0,data:I,method:y.method,action:v},v,I))},currentTarget:y}]})}}for(var q0=0;q0<Tg.length;q0++){var G0=Tg[q0],DO=G0.toLowerCase(),SO=G0[0].toUpperCase()+G0.slice(1);yr(DO,"on"+SO)}yr(fv,"onAnimationEnd"),yr(hv,"onAnimationIteration"),yr(pv,"onAnimationStart"),yr("dblclick","onDoubleClick"),yr("focusin","onFocus"),yr("focusout","onBlur"),yr(KR,"onTransitionRun"),yr(_R,"onTransitionStart"),yr(VR,"onTransitionCancel"),yr(mv,"onTransitionEnd"),wa("onMouseEnter",["mouseout","mouseover"]),wa("onMouseLeave",["mouseout","mouseover"]),wa("onPointerEnter",["pointerout","pointerover"]),wa("onPointerLeave",["pointerout","pointerover"]),ao("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ao("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ao("onBeforeInput",["compositionend","keypress","textInput","paste"]),ao("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ao("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ao("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Lu="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(" "),wO=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Lu));function zk(o,l){l=(l&4)!==0;for(var d=0;d<o.length;d++){var p=o[d],y=p.event;p=p.listeners;e:{var v=void 0;if(l)for(var w=p.length-1;0<=w;w--){var N=p[w],I=N.instance,Y=N.currentTarget;if(N=N.listener,I!==v&&y.isPropagationStopped())break e;v=N,y.currentTarget=Y;try{v(y)}catch(re){Gd(re)}y.currentTarget=null,v=I}else for(w=0;w<p.length;w++){if(N=p[w],I=N.instance,Y=N.currentTarget,N=N.listener,I!==v&&y.isPropagationStopped())break e;v=N,y.currentTarget=Y;try{v(y)}catch(re){Gd(re)}y.currentTarget=null,v=I}}}}function Le(o,l){var d=l[og];d===void 0&&(d=l[og]=new Set);var p=o+"__bubble";d.has(p)||(Lk(l,o,2,!1),d.add(p))}function W0(o,l,d){var p=0;l&&(p|=4),Lk(d,o,p,l)}var Of="_reactListening"+Math.random().toString(36).slice(2);function Q0(o){if(!o[Of]){o[Of]=!0,B1.forEach(function(d){d!=="selectionchange"&&(wO.has(d)||W0(d,!1,o),W0(d,!0,o))});var l=o.nodeType===9?o:o.ownerDocument;l===null||l[Of]||(l[Of]=!0,W0("selectionchange",!1,l))}}function Lk(o,l,d,p){switch(f5(l)){case 2:var y=eP;break;case 8:y=tP;break;default:y=cb}d=y.bind(null,l,d,o),y=void 0,!mg||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(y=!0),p?y!==void 0?o.addEventListener(l,d,{capture:!0,passive:y}):o.addEventListener(l,d,!0):y!==void 0?o.addEventListener(l,d,{passive:y}):o.addEventListener(l,d,!1)}function Y0(o,l,d,p,y){var v=p;if((l&1)===0&&(l&2)===0&&p!==null)e:for(;;){if(p===null)return;var w=p.tag;if(w===3||w===4){var N=p.stateNode.containerInfo;if(N===y)break;if(w===4)for(w=p.return;w!==null;){var I=w.tag;if((I===3||I===4)&&w.stateNode.containerInfo===y)return;w=w.return}for(;N!==null;){if(w=Ea(N),w===null)return;if(I=w.tag,I===5||I===6||I===26||I===27){p=v=w;continue e}N=N.parentNode}}p=p.return}_1(function(){var Y=v,re=hg(d),oe=[];e:{var J=gv.get(o);if(J!==void 0){var ne=Hd,be=o;switch(o){case"keypress":if(_d(d)===0)break e;case"keydown":case"keyup":ne=xR;break;case"focusin":be="focus",ne=xg;break;case"focusout":be="blur",ne=xg;break;case"beforeblur":case"afterblur":ne=xg;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ne=U1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=aR;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=CR;break;case fv:case hv:case pv:ne=cR;break;case mv:ne=DR;break;case"scroll":case"scrollend":ne=sR;break;case"wheel":ne=wR;break;case"copy":case"cut":case"paste":ne=fR;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=G1;break;case"toggle":case"beforetoggle":ne=TR}var Ee=(l&4)!==0,nt=!Ee&&(o==="scroll"||o==="scrollend"),U=Ee?J!==null?J+"Capture":null:J;Ee=[];for(var K=Y,Q;K!==null;){var se=K;if(Q=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||Q===null||U===null||(se=su(K,U),se!=null&&Ee.push(Iu(K,se,Q))),nt)break;K=K.return}0<Ee.length&&(J=new ne(J,be,null,d,re),oe.push({event:J,listeners:Ee}))}}if((l&7)===0){e:{if(J=o==="mouseover"||o==="pointerover",ne=o==="mouseout"||o==="pointerout",J&&d!==fg&&(be=d.relatedTarget||d.fromElement)&&(Ea(be)||be[Ca]))break e;if((ne||J)&&(J=re.window===re?re:(J=re.ownerDocument)?J.defaultView||J.parentWindow:window,ne?(be=d.relatedTarget||d.toElement,ne=Y,be=be?Ea(be):null,be!==null&&(nt=s(be),Ee=be.tag,be!==nt||Ee!==5&&Ee!==27&&Ee!==6)&&(be=null)):(ne=null,be=Y),ne!==be)){if(Ee=U1,se="onMouseLeave",U="onMouseEnter",K="mouse",(o==="pointerout"||o==="pointerover")&&(Ee=G1,se="onPointerLeave",U="onPointerEnter",K="pointer"),nt=ne==null?J:iu(ne),Q=be==null?J:iu(be),J=new Ee(se,K+"leave",ne,d,re),J.target=nt,J.relatedTarget=Q,se=null,Ea(re)===Y&&(Ee=new Ee(U,K+"enter",be,d,re),Ee.target=Q,Ee.relatedTarget=nt,se=Ee),nt=se,ne&&be)t:{for(Ee=$O,U=ne,K=be,Q=0,se=U;se;se=Ee(se))Q++;se=0;for(var ve=K;ve;ve=Ee(ve))se++;for(;0<Q-se;)U=Ee(U),Q--;for(;0<se-Q;)K=Ee(K),se--;for(;Q--;){if(U===K||K!==null&&U===K.alternate){Ee=U;break t}U=Ee(U),K=Ee(K)}Ee=null}else Ee=null;ne!==null&&Ik(oe,J,ne,Ee,!1),be!==null&&nt!==null&&Ik(oe,nt,be,Ee,!0)}}e:{if(J=Y?iu(Y):window,ne=J.nodeName&&J.nodeName.toLowerCase(),ne==="select"||ne==="input"&&J.type==="file")var Ue=tv;else if(Z1(J))if(nv)Ue=IR;else{Ue=zR;var xe=PR}else ne=J.nodeName,!ne||ne.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?Y&&dg(Y.elementType)&&(Ue=tv):Ue=LR;if(Ue&&(Ue=Ue(o,Y))){ev(oe,Ue,d,re);break e}xe&&xe(o,J,Y),o==="focusout"&&Y&&J.type==="number"&&Y.memoizedProps.value!=null&&cg(J,"number",J.value)}switch(xe=Y?iu(Y):window,o){case"focusin":(Z1(xe)||xe.contentEditable==="true")&&(Na=xe,Sg=Y,hu=null);break;case"focusout":hu=Sg=Na=null;break;case"mousedown":wg=!0;break;case"contextmenu":case"mouseup":case"dragend":wg=!1,cv(oe,d,re);break;case"selectionchange":if(FR)break;case"keydown":case"keyup":cv(oe,d,re)}var Me;if(kg)e:{switch(o){case"compositionstart":var Ke="onCompositionStart";break e;case"compositionend":Ke="onCompositionEnd";break e;case"compositionupdate":Ke="onCompositionUpdate";break e}Ke=void 0}else Ma?X1(o,d)&&(Ke="onCompositionEnd"):o==="keydown"&&d.keyCode===229&&(Ke="onCompositionStart");Ke&&(W1&&d.locale!=="ko"&&(Ma||Ke!=="onCompositionStart"?Ke==="onCompositionEnd"&&Ma&&(Me=V1()):(Wi=re,gg="value"in Wi?Wi.value:Wi.textContent,Ma=!0)),xe=Pf(Y,Ke),0<xe.length&&(Ke=new q1(Ke,o,null,d,re),oe.push({event:Ke,listeners:xe}),Me?Ke.data=Me:(Me=J1(d),Me!==null&&(Ke.data=Me)))),(Me=BR?MR(o,d):NR(o,d))&&(Ke=Pf(Y,"onBeforeInput"),0<Ke.length&&(xe=new q1("onBeforeInput","beforeinput",null,d,re),oe.push({event:xe,listeners:Ke}),xe.data=Me)),EO(oe,o,Y,d,re)}zk(oe,l)})}function Iu(o,l,d){return{instance:o,listener:l,currentTarget:d}}function Pf(o,l){for(var d=l+"Capture",p=[];o!==null;){var y=o,v=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||v===null||(y=su(o,d),y!=null&&p.unshift(Iu(o,y,v)),y=su(o,l),y!=null&&p.push(Iu(o,y,v))),o.tag===3)return p;o=o.return}return[]}function $O(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function Ik(o,l,d,p,y){for(var v=l._reactName,w=[];d!==null&&d!==p;){var N=d,I=N.alternate,Y=N.stateNode;if(N=N.tag,I!==null&&I===p)break;N!==5&&N!==26&&N!==27||Y===null||(I=Y,y?(Y=su(d,v),Y!=null&&w.unshift(Iu(d,Y,I))):y||(Y=su(d,v),Y!=null&&w.push(Iu(d,Y,I)))),d=d.return}w.length!==0&&o.push({event:l,listeners:w})}var TO=/\r\n?/g,AO=/\u0000|\uFFFD/g;function jk(o){return(typeof o=="string"?o:""+o).replace(TO,`
|
|
9
|
+
`).replace(AO,"")}function Fk(o,l){return l=jk(l),jk(o)===l}function tt(o,l,d,p,y,v){switch(d){case"children":typeof p=="string"?l==="body"||l==="textarea"&&p===""||Ta(o,p):(typeof p=="number"||typeof p=="bigint")&&l!=="body"&&Ta(o,""+p);break;case"className":Id(o,"class",p);break;case"tabIndex":Id(o,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":Id(o,d,p);break;case"style":F1(o,p,v);break;case"data":if(l!=="object"){Id(o,"data",p);break}case"src":case"href":if(p===""&&(l!=="a"||d!=="href")){o.removeAttribute(d);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){o.removeAttribute(d);break}p=Fd(""+p),o.setAttribute(d,p);break;case"action":case"formAction":if(typeof p=="function"){o.setAttribute(d,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof v=="function"&&(d==="formAction"?(l!=="input"&&tt(o,l,"name",y.name,y,null),tt(o,l,"formEncType",y.formEncType,y,null),tt(o,l,"formMethod",y.formMethod,y,null),tt(o,l,"formTarget",y.formTarget,y,null)):(tt(o,l,"encType",y.encType,y,null),tt(o,l,"method",y.method,y,null),tt(o,l,"target",y.target,y,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){o.removeAttribute(d);break}p=Fd(""+p),o.setAttribute(d,p);break;case"onClick":p!=null&&(o.onclick=ei);break;case"onScroll":p!=null&&Le("scroll",o);break;case"onScrollEnd":p!=null&&Le("scrollend",o);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(d=p.__html,d!=null){if(y.children!=null)throw Error(r(60));o.innerHTML=d}}break;case"multiple":o.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":o.muted=p&&typeof p!="function"&&typeof p!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(p==null||typeof p=="function"||typeof p=="boolean"||typeof p=="symbol"){o.removeAttribute("xlink:href");break}d=Fd(""+p),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":p!=null&&typeof p!="function"&&typeof p!="symbol"?o.setAttribute(d,""+p):o.removeAttribute(d);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":p&&typeof p!="function"&&typeof p!="symbol"?o.setAttribute(d,""):o.removeAttribute(d);break;case"capture":case"download":p===!0?o.setAttribute(d,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?o.setAttribute(d,p):o.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?o.setAttribute(d,p):o.removeAttribute(d);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?o.removeAttribute(d):o.setAttribute(d,p);break;case"popover":Le("beforetoggle",o),Le("toggle",o),Ld(o,"popover",p);break;case"xlinkActuate":Zr(o,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":Zr(o,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":Zr(o,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":Zr(o,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":Zr(o,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":Zr(o,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":Zr(o,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":Zr(o,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":Zr(o,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":Ld(o,"is",p);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=rR.get(d)||d,Ld(o,d,p))}}function X0(o,l,d,p,y,v){switch(d){case"style":F1(o,p,v);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(d=p.__html,d!=null){if(y.children!=null)throw Error(r(60));o.innerHTML=d}}break;case"children":typeof p=="string"?Ta(o,p):(typeof p=="number"||typeof p=="bigint")&&Ta(o,""+p);break;case"onScroll":p!=null&&Le("scroll",o);break;case"onScrollEnd":p!=null&&Le("scrollend",o);break;case"onClick":p!=null&&(o.onclick=ei);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!M1.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(y=d.endsWith("Capture"),l=d.slice(2,y?d.length-7:void 0),v=o[Dn]||null,v=v!=null?v[d]:null,typeof v=="function"&&o.removeEventListener(l,v,y),typeof p=="function")){typeof v!="function"&&v!==null&&(d in o?o[d]=null:o.hasAttribute(d)&&o.removeAttribute(d)),o.addEventListener(l,p,y);break e}d in o?o[d]=p:p===!0?o.setAttribute(d,""):Ld(o,d,p)}}}function en(o,l,d){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Le("error",o),Le("load",o);var p=!1,y=!1,v;for(v in d)if(d.hasOwnProperty(v)){var w=d[v];if(w!=null)switch(v){case"src":p=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:tt(o,l,v,w,d,null)}}y&&tt(o,l,"srcSet",d.srcSet,d,null),p&&tt(o,l,"src",d.src,d,null);return;case"input":Le("invalid",o);var N=v=w=y=null,I=null,Y=null;for(p in d)if(d.hasOwnProperty(p)){var re=d[p];if(re!=null)switch(p){case"name":y=re;break;case"type":w=re;break;case"checked":I=re;break;case"defaultChecked":Y=re;break;case"value":v=re;break;case"defaultValue":N=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(r(137,l));break;default:tt(o,l,p,re,d,null)}}z1(o,v,N,I,Y,w,y,!1);return;case"select":Le("invalid",o),p=w=v=null;for(y in d)if(d.hasOwnProperty(y)&&(N=d[y],N!=null))switch(y){case"value":v=N;break;case"defaultValue":w=N;break;case"multiple":p=N;default:tt(o,l,y,N,d,null)}l=v,d=w,o.multiple=!!p,l!=null?$a(o,!!p,l,!1):d!=null&&$a(o,!!p,d,!0);return;case"textarea":Le("invalid",o),v=y=p=null;for(w in d)if(d.hasOwnProperty(w)&&(N=d[w],N!=null))switch(w){case"value":p=N;break;case"defaultValue":y=N;break;case"children":v=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(r(91));break;default:tt(o,l,w,N,d,null)}I1(o,p,y,v);return;case"option":for(I in d)d.hasOwnProperty(I)&&(p=d[I],p!=null)&&(I==="selected"?o.selected=p&&typeof p!="function"&&typeof p!="symbol":tt(o,l,I,p,d,null));return;case"dialog":Le("beforetoggle",o),Le("toggle",o),Le("cancel",o),Le("close",o);break;case"iframe":case"object":Le("load",o);break;case"video":case"audio":for(p=0;p<Lu.length;p++)Le(Lu[p],o);break;case"image":Le("error",o),Le("load",o);break;case"details":Le("toggle",o);break;case"embed":case"source":case"link":Le("error",o),Le("load",o);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Y in d)if(d.hasOwnProperty(Y)&&(p=d[Y],p!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:tt(o,l,Y,p,d,null)}return;default:if(dg(l)){for(re in d)d.hasOwnProperty(re)&&(p=d[re],p!==void 0&&X0(o,l,re,p,d,void 0));return}}for(N in d)d.hasOwnProperty(N)&&(p=d[N],p!=null&&tt(o,l,N,p,d,null))}function BO(o,l,d,p){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,v=null,w=null,N=null,I=null,Y=null,re=null;for(ne in d){var oe=d[ne];if(d.hasOwnProperty(ne)&&oe!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":I=oe;default:p.hasOwnProperty(ne)||tt(o,l,ne,null,p,oe)}}for(var J in p){var ne=p[J];if(oe=d[J],p.hasOwnProperty(J)&&(ne!=null||oe!=null))switch(J){case"type":v=ne;break;case"name":y=ne;break;case"checked":Y=ne;break;case"defaultChecked":re=ne;break;case"value":w=ne;break;case"defaultValue":N=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(r(137,l));break;default:ne!==oe&&tt(o,l,J,ne,p,oe)}}ug(o,w,N,I,Y,re,v,y);return;case"select":ne=w=N=J=null;for(v in d)if(I=d[v],d.hasOwnProperty(v)&&I!=null)switch(v){case"value":break;case"multiple":ne=I;default:p.hasOwnProperty(v)||tt(o,l,v,null,p,I)}for(y in p)if(v=p[y],I=d[y],p.hasOwnProperty(y)&&(v!=null||I!=null))switch(y){case"value":J=v;break;case"defaultValue":N=v;break;case"multiple":w=v;default:v!==I&&tt(o,l,y,v,p,I)}l=N,d=w,p=ne,J!=null?$a(o,!!d,J,!1):!!p!=!!d&&(l!=null?$a(o,!!d,l,!0):$a(o,!!d,d?[]:"",!1));return;case"textarea":ne=J=null;for(N in d)if(y=d[N],d.hasOwnProperty(N)&&y!=null&&!p.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:tt(o,l,N,null,p,y)}for(w in p)if(y=p[w],v=d[w],p.hasOwnProperty(w)&&(y!=null||v!=null))switch(w){case"value":J=y;break;case"defaultValue":ne=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(r(91));break;default:y!==v&&tt(o,l,w,y,p,v)}L1(o,J,ne);return;case"option":for(var be in d)J=d[be],d.hasOwnProperty(be)&&J!=null&&!p.hasOwnProperty(be)&&(be==="selected"?o.selected=!1:tt(o,l,be,null,p,J));for(I in p)J=p[I],ne=d[I],p.hasOwnProperty(I)&&J!==ne&&(J!=null||ne!=null)&&(I==="selected"?o.selected=J&&typeof J!="function"&&typeof J!="symbol":tt(o,l,I,J,p,ne));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ee in d)J=d[Ee],d.hasOwnProperty(Ee)&&J!=null&&!p.hasOwnProperty(Ee)&&tt(o,l,Ee,null,p,J);for(Y in p)if(J=p[Y],ne=d[Y],p.hasOwnProperty(Y)&&J!==ne&&(J!=null||ne!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(r(137,l));break;default:tt(o,l,Y,J,p,ne)}return;default:if(dg(l)){for(var nt in d)J=d[nt],d.hasOwnProperty(nt)&&J!==void 0&&!p.hasOwnProperty(nt)&&X0(o,l,nt,void 0,p,J);for(re in p)J=p[re],ne=d[re],!p.hasOwnProperty(re)||J===ne||J===void 0&&ne===void 0||X0(o,l,re,J,p,ne);return}}for(var U in d)J=d[U],d.hasOwnProperty(U)&&J!=null&&!p.hasOwnProperty(U)&&tt(o,l,U,null,p,J);for(oe in p)J=p[oe],ne=d[oe],!p.hasOwnProperty(oe)||J===ne||J==null&&ne==null||tt(o,l,oe,J,p,ne)}function Kk(o){switch(o){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function MO(){if(typeof performance.getEntriesByType=="function"){for(var o=0,l=0,d=performance.getEntriesByType("resource"),p=0;p<d.length;p++){var y=d[p],v=y.transferSize,w=y.initiatorType,N=y.duration;if(v&&N&&Kk(w)){for(w=0,N=y.responseEnd,p+=1;p<d.length;p++){var I=d[p],Y=I.startTime;if(Y>N)break;var re=I.transferSize,oe=I.initiatorType;re&&Kk(oe)&&(I=I.responseEnd,w+=re*(I<N?1:(N-Y)/(I-Y)))}if(--p,l+=8*(v+w)/(y.duration/1e3),o++,10<o)break}}if(0<o)return l/o/1e6}return navigator.connection&&(o=navigator.connection.downlink,typeof o=="number")?o:5}var J0=null,Z0=null;function zf(o){return o.nodeType===9?o:o.ownerDocument}function _k(o){switch(o){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Vk(o,l){if(o===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&l==="foreignObject"?0:o}function eb(o,l){return o==="textarea"||o==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var tb=null;function NO(){var o=window.event;return o&&o.type==="popstate"?o===tb?!1:(tb=o,!0):(tb=null,!1)}var Hk=typeof setTimeout=="function"?setTimeout:void 0,RO=typeof clearTimeout=="function"?clearTimeout:void 0,Uk=typeof Promise=="function"?Promise:void 0,OO=typeof queueMicrotask=="function"?queueMicrotask:typeof Uk<"u"?function(o){return Uk.resolve(null).then(o).catch(PO)}:Hk;function PO(o){setTimeout(function(){throw o})}function fs(o){return o==="head"}function qk(o,l){var d=l,p=0;do{var y=d.nextSibling;if(o.removeChild(d),y&&y.nodeType===8)if(d=y.data,d==="/$"||d==="/&"){if(p===0){o.removeChild(y),sl(l);return}p--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")p++;else if(d==="html")ju(o.ownerDocument.documentElement);else if(d==="head"){d=o.ownerDocument.head,ju(d);for(var v=d.firstChild;v;){var w=v.nextSibling,N=v.nodeName;v[ru]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&v.rel.toLowerCase()==="stylesheet"||d.removeChild(v),v=w}}else d==="body"&&ju(o.ownerDocument.body);d=y}while(d);sl(l)}function Gk(o,l){var d=o;o=0;do{var p=d.nextSibling;if(d.nodeType===1?l?(d._stashedDisplay=d.style.display,d.style.display="none"):(d.style.display=d._stashedDisplay||"",d.getAttribute("style")===""&&d.removeAttribute("style")):d.nodeType===3&&(l?(d._stashedText=d.nodeValue,d.nodeValue=""):d.nodeValue=d._stashedText||""),p&&p.nodeType===8)if(d=p.data,d==="/$"){if(o===0)break;o--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||o++;d=p}while(d)}function nb(o){var l=o.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var d=l;switch(l=l.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":nb(d),ag(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}o.removeChild(d)}}function zO(o,l,d,p){for(;o.nodeType===1;){var y=d;if(o.nodeName.toLowerCase()!==l.toLowerCase()){if(!p&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(p){if(!o[ru])switch(l){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(v=o.getAttribute("rel"),v==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(v!==y.rel||o.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||o.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||o.getAttribute("title")!==(y.title==null?null:y.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(v=o.getAttribute("src"),(v!==(y.src==null?null:y.src)||o.getAttribute("type")!==(y.type==null?null:y.type)||o.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&v&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(l==="input"&&o.type==="hidden"){var v=y.name==null?null:""+y.name;if(y.type==="hidden"&&o.getAttribute("name")===v)return o}else return o;if(o=or(o.nextSibling),o===null)break}return null}function LO(o,l,d){if(l==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!d||(o=or(o.nextSibling),o===null))return null;return o}function Wk(o,l){for(;o.nodeType!==8;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!l||(o=or(o.nextSibling),o===null))return null;return o}function rb(o){return o.data==="$?"||o.data==="$~"}function ib(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState!=="loading"}function IO(o,l){var d=o.ownerDocument;if(o.data==="$~")o._reactRetry=l;else if(o.data!=="$?"||d.readyState!=="loading")l();else{var p=function(){l(),d.removeEventListener("DOMContentLoaded",p)};d.addEventListener("DOMContentLoaded",p),o._reactRetry=p}}function or(o){for(;o!=null;o=o.nextSibling){var l=o.nodeType;if(l===1||l===3)break;if(l===8){if(l=o.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return o}var sb=null;function Qk(o){o=o.nextSibling;for(var l=0;o;){if(o.nodeType===8){var d=o.data;if(d==="/$"||d==="/&"){if(l===0)return or(o.nextSibling);l--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||l++}o=o.nextSibling}return null}function Yk(o){o=o.previousSibling;for(var l=0;o;){if(o.nodeType===8){var d=o.data;if(d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"){if(l===0)return o;l--}else d!=="/$"&&d!=="/&"||l++}o=o.previousSibling}return null}function Xk(o,l,d){switch(l=zf(d),o){case"html":if(o=l.documentElement,!o)throw Error(r(452));return o;case"head":if(o=l.head,!o)throw Error(r(453));return o;case"body":if(o=l.body,!o)throw Error(r(454));return o;default:throw Error(r(451))}}function ju(o){for(var l=o.attributes;l.length;)o.removeAttributeNode(l[0]);ag(o)}var ar=new Map,Jk=new Set;function Lf(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var gi=_.d;_.d={f:jO,r:FO,D:KO,C:_O,L:VO,m:HO,X:qO,S:UO,M:GO};function jO(){var o=gi.f(),l=Tf();return o||l}function FO(o){var l=Da(o);l!==null&&l.tag===5&&l.type==="form"?m2(l):gi.r(o)}var nl=typeof document>"u"?null:document;function Zk(o,l,d){var p=nl;if(p&&typeof l=="string"&&l){var y=Zn(l);y='link[rel="'+o+'"][href="'+y+'"]',typeof d=="string"&&(y+='[crossorigin="'+d+'"]'),Jk.has(y)||(Jk.add(y),o={rel:o,crossOrigin:d,href:l},p.querySelector(y)===null&&(l=p.createElement("link"),en(l,"link",o),Ut(l),p.head.appendChild(l)))}}function KO(o){gi.D(o),Zk("dns-prefetch",o,null)}function _O(o,l){gi.C(o,l),Zk("preconnect",o,l)}function VO(o,l,d){gi.L(o,l,d);var p=nl;if(p&&o&&l){var y='link[rel="preload"][as="'+Zn(l)+'"]';l==="image"&&d&&d.imageSrcSet?(y+='[imagesrcset="'+Zn(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(y+='[imagesizes="'+Zn(d.imageSizes)+'"]')):y+='[href="'+Zn(o)+'"]';var v=y;switch(l){case"style":v=rl(o);break;case"script":v=il(o)}ar.has(v)||(o=m({rel:"preload",href:l==="image"&&d&&d.imageSrcSet?void 0:o,as:l},d),ar.set(v,o),p.querySelector(y)!==null||l==="style"&&p.querySelector(Fu(v))||l==="script"&&p.querySelector(Ku(v))||(l=p.createElement("link"),en(l,"link",o),Ut(l),p.head.appendChild(l)))}}function HO(o,l){gi.m(o,l);var d=nl;if(d&&o){var p=l&&typeof l.as=="string"?l.as:"script",y='link[rel="modulepreload"][as="'+Zn(p)+'"][href="'+Zn(o)+'"]',v=y;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=il(o)}if(!ar.has(v)&&(o=m({rel:"modulepreload",href:o},l),ar.set(v,o),d.querySelector(y)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(Ku(v)))return}p=d.createElement("link"),en(p,"link",o),Ut(p),d.head.appendChild(p)}}}function UO(o,l,d){gi.S(o,l,d);var p=nl;if(p&&o){var y=Sa(p).hoistableStyles,v=rl(o);l=l||"default";var w=y.get(v);if(!w){var N={loading:0,preload:null};if(w=p.querySelector(Fu(v)))N.loading=5;else{o=m({rel:"stylesheet",href:o,"data-precedence":l},d),(d=ar.get(v))&&ob(o,d);var I=w=p.createElement("link");Ut(I),en(I,"link",o),I._p=new Promise(function(Y,re){I.onload=Y,I.onerror=re}),I.addEventListener("load",function(){N.loading|=1}),I.addEventListener("error",function(){N.loading|=2}),N.loading|=4,If(w,l,p)}w={type:"stylesheet",instance:w,count:1,state:N},y.set(v,w)}}}function qO(o,l){gi.X(o,l);var d=nl;if(d&&o){var p=Sa(d).hoistableScripts,y=il(o),v=p.get(y);v||(v=d.querySelector(Ku(y)),v||(o=m({src:o,async:!0},l),(l=ar.get(y))&&ab(o,l),v=d.createElement("script"),Ut(v),en(v,"link",o),d.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},p.set(y,v))}}function GO(o,l){gi.M(o,l);var d=nl;if(d&&o){var p=Sa(d).hoistableScripts,y=il(o),v=p.get(y);v||(v=d.querySelector(Ku(y)),v||(o=m({src:o,async:!0,type:"module"},l),(l=ar.get(y))&&ab(o,l),v=d.createElement("script"),Ut(v),en(v,"link",o),d.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},p.set(y,v))}}function e5(o,l,d,p){var y=(y=he.current)?Lf(y):null;if(!y)throw Error(r(446));switch(o){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(l=rl(d.href),d=Sa(y).hoistableStyles,p=d.get(l),p||(p={type:"style",instance:null,count:0,state:null},d.set(l,p)),p):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){o=rl(d.href);var v=Sa(y).hoistableStyles,w=v.get(o);if(w||(y=y.ownerDocument||y,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(o,w),(v=y.querySelector(Fu(o)))&&!v._p&&(w.instance=v,w.state.loading=5),ar.has(o)||(d={rel:"preload",as:"style",href:d.href,crossOrigin:d.crossOrigin,integrity:d.integrity,media:d.media,hrefLang:d.hrefLang,referrerPolicy:d.referrerPolicy},ar.set(o,d),v||WO(y,o,d,w.state))),l&&p===null)throw Error(r(528,""));return w}if(l&&p!==null)throw Error(r(529,""));return null;case"script":return l=d.async,d=d.src,typeof d=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=il(d),d=Sa(y).hoistableScripts,p=d.get(l),p||(p={type:"script",instance:null,count:0,state:null},d.set(l,p)),p):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,o))}}function rl(o){return'href="'+Zn(o)+'"'}function Fu(o){return'link[rel="stylesheet"]['+o+"]"}function t5(o){return m({},o,{"data-precedence":o.precedence,precedence:null})}function WO(o,l,d,p){o.querySelector('link[rel="preload"][as="style"]['+l+"]")?p.loading=1:(l=o.createElement("link"),p.preload=l,l.addEventListener("load",function(){return p.loading|=1}),l.addEventListener("error",function(){return p.loading|=2}),en(l,"link",d),Ut(l),o.head.appendChild(l))}function il(o){return'[src="'+Zn(o)+'"]'}function Ku(o){return"script[async]"+o}function n5(o,l,d){if(l.count++,l.instance===null)switch(l.type){case"style":var p=o.querySelector('style[data-href~="'+Zn(d.href)+'"]');if(p)return l.instance=p,Ut(p),p;var y=m({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return p=(o.ownerDocument||o).createElement("style"),Ut(p),en(p,"style",y),If(p,d.precedence,o),l.instance=p;case"stylesheet":y=rl(d.href);var v=o.querySelector(Fu(y));if(v)return l.state.loading|=4,l.instance=v,Ut(v),v;p=t5(d),(y=ar.get(y))&&ob(p,y),v=(o.ownerDocument||o).createElement("link"),Ut(v);var w=v;return w._p=new Promise(function(N,I){w.onload=N,w.onerror=I}),en(v,"link",p),l.state.loading|=4,If(v,d.precedence,o),l.instance=v;case"script":return v=il(d.src),(y=o.querySelector(Ku(v)))?(l.instance=y,Ut(y),y):(p=d,(y=ar.get(v))&&(p=m({},d),ab(p,y)),o=o.ownerDocument||o,y=o.createElement("script"),Ut(y),en(y,"link",p),o.head.appendChild(y),l.instance=y);case"void":return null;default:throw Error(r(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(p=l.instance,l.state.loading|=4,If(p,d.precedence,o));return l.instance}function If(o,l,d){for(var p=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=p.length?p[p.length-1]:null,v=y,w=0;w<p.length;w++){var N=p[w];if(N.dataset.precedence===l)v=N;else if(v!==y)break}v?v.parentNode.insertBefore(o,v.nextSibling):(l=d.nodeType===9?d.head:d,l.insertBefore(o,l.firstChild))}function ob(o,l){o.crossOrigin==null&&(o.crossOrigin=l.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=l.referrerPolicy),o.title==null&&(o.title=l.title)}function ab(o,l){o.crossOrigin==null&&(o.crossOrigin=l.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=l.referrerPolicy),o.integrity==null&&(o.integrity=l.integrity)}var jf=null;function r5(o,l,d){if(jf===null){var p=new Map,y=jf=new Map;y.set(d,p)}else y=jf,p=y.get(d),p||(p=new Map,y.set(d,p));if(p.has(o))return p;for(p.set(o,null),d=d.getElementsByTagName(o),y=0;y<d.length;y++){var v=d[y];if(!(v[ru]||v[Yt]||o==="link"&&v.getAttribute("rel")==="stylesheet")&&v.namespaceURI!=="http://www.w3.org/2000/svg"){var w=v.getAttribute(l)||"";w=o+w;var N=p.get(w);N?N.push(v):p.set(w,[v])}}return p}function i5(o,l,d){o=o.ownerDocument||o,o.head.insertBefore(d,l==="title"?o.querySelector("head > title"):null)}function QO(o,l,d){if(d===1||l.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;return l.rel==="stylesheet"?(o=l.disabled,typeof l.precedence=="string"&&o==null):!0;case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function s5(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}function YO(o,l,d,p){if(d.type==="stylesheet"&&(typeof p.media!="string"||matchMedia(p.media).matches!==!1)&&(d.state.loading&4)===0){if(d.instance===null){var y=rl(p.href),v=l.querySelector(Fu(y));if(v){l=v._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(o.count++,o=Ff.bind(o),l.then(o,o)),d.state.loading|=4,d.instance=v,Ut(v);return}v=l.ownerDocument||l,p=t5(p),(y=ar.get(y))&&ob(p,y),v=v.createElement("link"),Ut(v);var w=v;w._p=new Promise(function(N,I){w.onload=N,w.onerror=I}),en(v,"link",p),d.instance=v}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(d,l),(l=d.state.preload)&&(d.state.loading&3)===0&&(o.count++,d=Ff.bind(o),l.addEventListener("load",d),l.addEventListener("error",d))}}var lb=0;function XO(o,l){return o.stylesheets&&o.count===0&&_f(o,o.stylesheets),0<o.count||0<o.imgCount?function(d){var p=setTimeout(function(){if(o.stylesheets&&_f(o,o.stylesheets),o.unsuspend){var v=o.unsuspend;o.unsuspend=null,v()}},6e4+l);0<o.imgBytes&&lb===0&&(lb=62500*MO());var y=setTimeout(function(){if(o.waitingForImages=!1,o.count===0&&(o.stylesheets&&_f(o,o.stylesheets),o.unsuspend)){var v=o.unsuspend;o.unsuspend=null,v()}},(o.imgBytes>lb?50:800)+l);return o.unsuspend=d,function(){o.unsuspend=null,clearTimeout(p),clearTimeout(y)}}:null}function Ff(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)_f(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var Kf=null;function _f(o,l){o.stylesheets=null,o.unsuspend!==null&&(o.count++,Kf=new Map,l.forEach(JO,o),Kf=null,Ff.call(o))}function JO(o,l){if(!(l.state.loading&4)){var d=Kf.get(o);if(d)var p=d.get(null);else{d=new Map,Kf.set(o,d);for(var y=o.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v<y.length;v++){var w=y[v];(w.nodeName==="LINK"||w.getAttribute("media")!=="not all")&&(d.set(w.dataset.precedence,w),p=w)}p&&d.set(null,p)}y=l.instance,w=y.getAttribute("data-precedence"),v=d.get(w)||p,v===p&&d.set(null,y),d.set(w,y),this.count++,p=Ff.bind(this),y.addEventListener("load",p),y.addEventListener("error",p),v?v.parentNode.insertBefore(y,v.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(y,o.firstChild)),l.state.loading|=4}}var _u={$$typeof:$,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function ZO(o,l,d,p,y,v,w,N,I){this.tag=1,this.containerInfo=o,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=rg(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rg(0),this.hiddenUpdates=rg(null),this.identifierPrefix=p,this.onUncaughtError=y,this.onCaughtError=v,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=I,this.incompleteTransitions=new Map}function o5(o,l,d,p,y,v,w,N,I,Y,re,oe){return o=new ZO(o,l,d,w,I,Y,re,oe,N),l=1,v===!0&&(l|=24),v=_n(3,null,null,l),o.current=v,v.stateNode=o,l=Kg(),l.refCount++,o.pooledCache=l,l.refCount++,v.memoizedState={element:p,isDehydrated:d,cache:l},Ug(v),o}function a5(o){return o?(o=Pa,o):Pa}function l5(o,l,d,p,y,v){y=a5(y),p.context===null?p.context=y:p.pendingContext=y,p=es(l),p.payload={element:d},v=v===void 0?null:v,v!==null&&(p.callback=v),d=ts(o,p,l),d!==null&&(Bn(d,o,l),vu(d,o,l))}function u5(o,l){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var d=o.retryLane;o.retryLane=d!==0&&d<l?d:l}}function ub(o,l){u5(o,l),(o=o.alternate)&&u5(o,l)}function c5(o){if(o.tag===13||o.tag===31){var l=fo(o,67108864);l!==null&&Bn(l,o,67108864),ub(o,67108864)}}function d5(o){if(o.tag===13||o.tag===31){var l=Gn();l=ig(l);var d=fo(o,l);d!==null&&Bn(d,o,l),ub(o,l)}}var Vf=!0;function eP(o,l,d,p){var y=P.T;P.T=null;var v=_.p;try{_.p=2,cb(o,l,d,p)}finally{_.p=v,P.T=y}}function tP(o,l,d,p){var y=P.T;P.T=null;var v=_.p;try{_.p=8,cb(o,l,d,p)}finally{_.p=v,P.T=y}}function cb(o,l,d,p){if(Vf){var y=db(p);if(y===null)Y0(o,l,p,Hf,d),h5(o,p);else if(rP(y,o,l,d,p))p.stopPropagation();else if(h5(o,p),l&4&&-1<nP.indexOf(o)){for(;y!==null;){var v=Da(y);if(v!==null)switch(v.tag){case 3:if(v=v.stateNode,v.current.memoizedState.isDehydrated){var w=oo(v.pendingLanes);if(w!==0){var N=v;for(N.pendingLanes|=2,N.entangledLanes|=2;w;){var I=1<<31-Fn(w);N.entanglements[1]|=I,w&=~I}zr(v),(Ge&6)===0&&(wf=gt()+500,zu(0))}}break;case 31:case 13:N=fo(v,2),N!==null&&Bn(N,v,2),Tf(),ub(v,2)}if(v=db(p),v===null&&Y0(o,l,p,Hf,d),v===y)break;y=v}y!==null&&p.stopPropagation()}else Y0(o,l,p,null,d)}}function db(o){return o=hg(o),fb(o)}var Hf=null;function fb(o){if(Hf=null,o=Ea(o),o!==null){var l=s(o);if(l===null)o=null;else{var d=l.tag;if(d===13){if(o=a(l),o!==null)return o;o=null}else if(d===31){if(o=u(l),o!==null)return o;o=null}else if(d===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;o=null}else l!==o&&(o=null)}}return Hf=o,null}function f5(o){switch(o){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(so()){case Zl:return 2;case k1:return 8;case Nd:case _N:return 32;case C1:return 268435456;default:return 32}default:return 32}}var hb=!1,hs=null,ps=null,ms=null,Vu=new Map,Hu=new Map,gs=[],nP="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".split(" ");function h5(o,l){switch(o){case"focusin":case"focusout":hs=null;break;case"dragenter":case"dragleave":ps=null;break;case"mouseover":case"mouseout":ms=null;break;case"pointerover":case"pointerout":Vu.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hu.delete(l.pointerId)}}function Uu(o,l,d,p,y,v){return o===null||o.nativeEvent!==v?(o={blockedOn:l,domEventName:d,eventSystemFlags:p,nativeEvent:v,targetContainers:[y]},l!==null&&(l=Da(l),l!==null&&c5(l)),o):(o.eventSystemFlags|=p,l=o.targetContainers,y!==null&&l.indexOf(y)===-1&&l.push(y),o)}function rP(o,l,d,p,y){switch(l){case"focusin":return hs=Uu(hs,o,l,d,p,y),!0;case"dragenter":return ps=Uu(ps,o,l,d,p,y),!0;case"mouseover":return ms=Uu(ms,o,l,d,p,y),!0;case"pointerover":var v=y.pointerId;return Vu.set(v,Uu(Vu.get(v)||null,o,l,d,p,y)),!0;case"gotpointercapture":return v=y.pointerId,Hu.set(v,Uu(Hu.get(v)||null,o,l,d,p,y)),!0}return!1}function p5(o){var l=Ea(o.target);if(l!==null){var d=s(l);if(d!==null){if(l=d.tag,l===13){if(l=a(d),l!==null){o.blockedOn=l,T1(o.priority,function(){d5(d)});return}}else if(l===31){if(l=u(d),l!==null){o.blockedOn=l,T1(o.priority,function(){d5(d)});return}}else if(l===3&&d.stateNode.current.memoizedState.isDehydrated){o.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}o.blockedOn=null}function Uf(o){if(o.blockedOn!==null)return!1;for(var l=o.targetContainers;0<l.length;){var d=db(o.nativeEvent);if(d===null){d=o.nativeEvent;var p=new d.constructor(d.type,d);fg=p,d.target.dispatchEvent(p),fg=null}else return l=Da(d),l!==null&&c5(l),o.blockedOn=d,!1;l.shift()}return!0}function m5(o,l,d){Uf(o)&&d.delete(l)}function iP(){hb=!1,hs!==null&&Uf(hs)&&(hs=null),ps!==null&&Uf(ps)&&(ps=null),ms!==null&&Uf(ms)&&(ms=null),Vu.forEach(m5),Hu.forEach(m5)}function qf(o,l){o.blockedOn===l&&(o.blockedOn=null,hb||(hb=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,iP)))}var Gf=null;function g5(o){Gf!==o&&(Gf=o,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Gf===o&&(Gf=null);for(var l=0;l<o.length;l+=3){var d=o[l],p=o[l+1],y=o[l+2];if(typeof p!="function"){if(fb(p||d)===null)continue;break}var v=Da(d);v!==null&&(o.splice(l,3),l-=3,d0(v,{pending:!0,data:y,method:d.method,action:p},p,y))}}))}function sl(o){function l(I){return qf(I,o)}hs!==null&&qf(hs,o),ps!==null&&qf(ps,o),ms!==null&&qf(ms,o),Vu.forEach(l),Hu.forEach(l);for(var d=0;d<gs.length;d++){var p=gs[d];p.blockedOn===o&&(p.blockedOn=null)}for(;0<gs.length&&(d=gs[0],d.blockedOn===null);)p5(d),d.blockedOn===null&&gs.shift();if(d=(o.ownerDocument||o).$$reactFormReplay,d!=null)for(p=0;p<d.length;p+=3){var y=d[p],v=d[p+1],w=y[Dn]||null;if(typeof v=="function")w||g5(d);else if(w){var N=null;if(v&&v.hasAttribute("formAction")){if(y=v,w=v[Dn]||null)N=w.formAction;else if(fb(y)!==null)continue}else N=w.action;typeof N=="function"?d[p+1]=N:(d.splice(p,3),p-=3),g5(d)}}}function b5(){function o(v){v.canIntercept&&v.info==="react-transition"&&v.intercept({handler:function(){return new Promise(function(w){return y=w})},focusReset:"manual",scroll:"manual"})}function l(){y!==null&&(y(),y=null),p||setTimeout(d,20)}function d(){if(!p&&!navigation.transition){var v=navigation.currentEntry;v&&v.url!=null&&navigation.navigate(v.url,{state:v.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var p=!1,y=null;return navigation.addEventListener("navigate",o),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(d,100),function(){p=!0,navigation.removeEventListener("navigate",o),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),y!==null&&(y(),y=null)}}}function pb(o){this._internalRoot=o}Wf.prototype.render=pb.prototype.render=function(o){var l=this._internalRoot;if(l===null)throw Error(r(409));var d=l.current,p=Gn();l5(d,p,o,l,null,null)},Wf.prototype.unmount=pb.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var l=o.containerInfo;l5(o.current,2,null,o,null,null),Tf(),l[Ca]=null}};function Wf(o){this._internalRoot=o}Wf.prototype.unstable_scheduleHydration=function(o){if(o){var l=$1();o={blockedOn:null,target:o,priority:l};for(var d=0;d<gs.length&&l!==0&&l<gs[d].priority;d++);gs.splice(d,0,o),d===0&&p5(o)}};var y5=e.version;if(y5!=="19.2.4")throw Error(r(527,y5,"19.2.4"));_.findDOMNode=function(o){var l=o._reactInternals;if(l===void 0)throw typeof o.render=="function"?Error(r(188)):(o=Object.keys(o).join(","),Error(r(268,o)));return o=f(l),o=o!==null?h(o):null,o=o===null?null:o.stateNode,o};var sP={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Qf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qf.isDisabled&&Qf.supportsFiber)try{eu=Qf.inject(sP),jn=Qf}catch{}}return Gu.createRoot=function(o,l){if(!i(o))throw Error(r(299));var d=!1,p="",y=S2,v=w2,w=$2;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(p=l.identifierPrefix),l.onUncaughtError!==void 0&&(y=l.onUncaughtError),l.onCaughtError!==void 0&&(v=l.onCaughtError),l.onRecoverableError!==void 0&&(w=l.onRecoverableError)),l=o5(o,1,!1,null,null,d,p,null,y,v,w,b5),o[Ca]=l.current,Q0(o),new pb(l)},Gu.hydrateRoot=function(o,l,d){if(!i(o))throw Error(r(299));var p=!1,y="",v=S2,w=w2,N=$2,I=null;return d!=null&&(d.unstable_strictMode===!0&&(p=!0),d.identifierPrefix!==void 0&&(y=d.identifierPrefix),d.onUncaughtError!==void 0&&(v=d.onUncaughtError),d.onCaughtError!==void 0&&(w=d.onCaughtError),d.onRecoverableError!==void 0&&(N=d.onRecoverableError),d.formState!==void 0&&(I=d.formState)),l=o5(o,1,!0,l,d??null,p,y,I,v,w,N,b5),l.context=a5(null),d=l.current,p=Gn(),p=ig(p),y=es(p),y.callback=null,ts(d,y,p),d=p,l.current.lanes=d,nu(l,d),zr(l),o[Ca]=l.current,Q0(o),new Wf(l)},Gu.version="19.2.4",Gu}var T5;function pP(){if(T5)return bb.exports;T5=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),bb.exports=hP(),bb.exports}var mP=pP();const $S=S.createContext(void 0),fd=t=>{const e=S.useContext($S);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},gP=({client:t,children:e})=>(S.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),C.jsx($S.Provider,{value:t,children:e})),bP={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)};var yP=class{#e=bP;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,e){return this.#e.setTimeout(t,e)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,e){return this.#e.setInterval(t,e)}clearInterval(t){this.#e.clearInterval(t)}};const No=new yP;function xP(t){setTimeout(t,0)}const vP=typeof window>"u"||"Deno"in globalThis;function Nn(){}function kP(t,e){return typeof t=="function"?t(e):t}function TS(t){return typeof t=="number"&&t>=0&&t!==1/0}function AS(t,e){return Math.max(t+(e||0)-Date.now(),0)}function kt(t,e){return typeof t=="function"?t(e):t}function A5(t,e){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:a,stale:u}=t;if(a){if(r){if(e.queryHash!==a3(a,e.options))return!1}else if(!wl(e.queryKey,a))return!1}if(n!=="all"){const c=e.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof u=="boolean"&&e.isStale()!==u||i&&i!==e.state.fetchStatus||s&&!s(e))}function B5(t,e){const{exact:n,status:r,predicate:i,mutationKey:s}=t;if(s){if(!e.options.mutationKey)return!1;if(n){if(Lc(e.options.mutationKey)!==Lc(s))return!1}else if(!wl(e.options.mutationKey,s))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function a3(t,e){return(e?.queryKeyHashFn||Lc)(t)}function Lc(t){return JSON.stringify(t,(e,n)=>My(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function wl(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(Array.isArray(t)&&Array.isArray(e)){for(let r=0;r<e.length;r++)if(!wl(t[r],e[r]))return!1;return!0}const n=Object.keys(e);for(const r of n)if(!wl(t[r],e[r]))return!1;return!0}return!1}const CP=Object.prototype.hasOwnProperty;function BS(t,e,n=0){if(t===e)return t;if(n>500)return e;const r=M5(t)&&M5(e);if(!r&&!(My(t)&&My(e)))return e;const i=(r?t:Object.keys(t)).length,s=r?e:Object.keys(e),a=s.length,u=r?new Array(a):{};let c=0;for(let f=0;f<a;f++){const h=r?f:s[f],m=t[h],g=e[h];if(m===g){u[h]=m,(r?f<i:CP.call(t,h))&&c++;continue}if(m===null||g===null||typeof m!="object"||typeof g!="object"){u[h]=g;continue}const b=BS(m,g,n+1);u[h]=b,b===m&&c++}return i===a&&c===i?t:u}function kb(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function M5(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function My(t){if(!N5(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!N5(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function N5(t){return Object.prototype.toString.call(t)==="[object Object]"}function EP(t){return new Promise(e=>{No.setTimeout(e,t)})}function Ny(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?BS(t,e):e}function DP(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function SP(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}const l3=Symbol();function MS(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===l3?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function NS(t,e){return typeof t=="function"?t(...e):!!t}function wP(t,e,n){let r=!1,i;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(i??=e(),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),t}let $P=()=>vP;const u3=()=>$P();var hd=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},TP=class extends hd{#e;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}};const c3=new TP,AP=xP;function BP(){let t=[],e=0,n=u=>{u()},r=u=>{u()},i=AP;const s=u=>{e?t.push(u):i(()=>{n(u)})},a=()=>{const u=t;t=[],u.length&&i(()=>{r(()=>{u.forEach(c=>{n(c)})})})};return{batch:u=>{let c;e++;try{c=u()}finally{e--,e||a()}return c},batchCalls:u=>(...c)=>{s(()=>{u(...c)})},schedule:s,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{i=u}}}const nn=BP();var MP=class extends hd{#e=!0;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(e=>{e(t)}))}isOnline(){return this.#e}};const qh=new MP;function NP(t){return Math.min(1e3*2**t,3e4)}function RS(t){return(t??"online")==="online"?qh.isOnline():!0}var Ry=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function OS(t){let e=!1,n=0,r,i="pending",s,a;const u=new Promise((T,$)=>{s=T,a=$});u.catch(Nn);const c=()=>i!=="pending",f=T=>{if(!c()){const $=new Ry(T);k($),t.onCancel?.($)}},h=()=>{e=!0},m=()=>{e=!1},g=()=>c3.isFocused()&&(t.networkMode==="always"||qh.isOnline())&&t.canRun(),b=()=>RS(t.networkMode)&&t.canRun(),x=T=>{c()||(r?.(),i="resolved",s(T))},k=T=>{c()||(r?.(),i="rejected",a(T))},E=()=>new Promise(T=>{r=$=>{(c()||g())&&T($)},t.onPause?.()}).then(()=>{r=void 0,c()||t.onContinue?.()}),D=()=>{if(c())return;let T;const $=n===0?t.initialPromise:void 0;try{T=$??t.fn()}catch(A){T=Promise.reject(A)}Promise.resolve(T).then(x).catch(A=>{if(c())return;const B=t.retry??(u3()?0:3),R=t.retryDelay??NP,M=typeof R=="function"?R(n,A):R,O=B===!0||typeof B=="number"&&n<B||typeof B=="function"&&B(n,A);if(e||!O){k(A);return}n++,t.onFail?.(n,A),EP(M).then(()=>g()?void 0:E()).then(()=>{e?k(A):D()})})};return{promise:u,status:()=>i,cancel:f,continue:()=>(r?.(),u),cancelRetry:h,continueRetry:m,canStart:b,start:()=>(b()?D():E().then(D),u)}}var PS=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),TS(this.gcTime)&&(this.#e=No.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(u3()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(No.clearTimeout(this.#e),this.#e=void 0)}};function RP(t){return{onFetch:(e,n)=>{const r=e.options,i=e.fetchOptions?.meta?.fetchMore?.direction,s=e.state.data?.pages||[],a=e.state.data?.pageParams||[];let u={pages:[],pageParams:[]},c=0;const f=async()=>{let h=!1;const m=x=>{wP(x,()=>e.signal,()=>h=!0)},g=MS(e.options,e.fetchOptions),b=async(x,k,E)=>{if(h)return Promise.reject(e.signal.reason);if(k==null&&x.pages.length)return Promise.resolve(x);const T=(()=>{const R={client:e.client,queryKey:e.queryKey,pageParam:k,direction:E?"backward":"forward",meta:e.options.meta};return m(R),R})(),$=await g(T),{maxPages:A}=e.options,B=E?SP:DP;return{pages:B(x.pages,$,A),pageParams:B(x.pageParams,k,A)}};if(i&&s.length){const x=i==="backward",k=x?OP:R5,E={pages:s,pageParams:a};u=await b(E,k(r,E),x)}else{const x=t??s.length;do{const k=c===0?a[0]??r.initialPageParam:R5(r,u);if(c>0&&k==null)break;u=await b(u,k),c++}while(c<x)}return u};e.options.persister?e.fetchFn=()=>e.options.persister?.(f,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n):e.fetchFn=f}}}function R5(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function OP(t,{pages:e,pageParams:n}){return e.length>0?t.getPreviousPageParam?.(e[0],e,n[0],n):void 0}var PP=class extends PS{#e;#t;#n;#r;#s;#i;#o;#l;constructor(t){super(),this.#l=!1,this.#o=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#s=t.client,this.#r=this.#s.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=P5(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#i?.promise}setOptions(t){if(this.options={...this.#o,...t},t?._type&&(this.#e=t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=P5(this.options);e.data!==void 0&&(this.setState(O5(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(t,e){const n=Ny(this.state.data,t,this.options);return this.#a({data:n,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),n}setState(t){this.#a({type:"setState",state:t})}cancel(t){const e=this.#i?.promise;return this.#i?.cancel(t),e?e.then(Nn).catch(Nn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>kt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===l3||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>kt(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:!AS(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){const e=this.observers.indexOf(t);e!==-1&&(this.observers.splice(e,1),this.observers.length||(this.#i&&(this.#l||this.state.fetchStatus==="paused"&&this.state.status==="pending"?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#a({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#i?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(t&&this.setOptions(t),!this.options.queryFn){const c=this.observers.find(f=>f.options.queryFn);c&&this.setOptions(c.options)}const n=new AbortController,r=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(this.#l=!0,n.signal)})},i=()=>{const c=MS(this.options,e),h=(()=>{const m={client:this.#s,queryKey:this.queryKey,meta:this.meta};return r(m),m})();return this.#l=!1,this.options.persister?this.options.persister(c,h,this):c(h)},a=(()=>{const c={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:i};return r(c),c})();(this.#e==="infinite"?RP(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#a({type:"fetch",meta:a.fetchOptions?.meta});const u=this.#i=OS({initialPromise:e?.initialPromise,fn:a.fetchFn,onCancel:c=>{c instanceof Ry&&c.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(c,f)=>{this.#a({type:"failed",failureCount:c,error:f})},onPause:()=>{this.#a({type:"pause"})},onContinue:()=>{this.#a({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{const c=await u.start();if(c===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(c),this.#r.config.onSuccess?.(c,this),this.#r.config.onSettled?.(c,this.state.error,this),c}catch(c){if(c instanceof Ry){if(c.silent)return this.#i.promise;if(c.revert){if(this.state.data===void 0)throw c;return this.state.data}}throw this.#a({type:"error",error:c}),this.#r.config.onError?.(c,this),this.#r.config.onSettled?.(this.state.data,c,this),c}finally{this.#i===u&&(this.#i=void 0),this.scheduleGc()}}#a(t){const e=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...zS(n.data,this.options),fetchMeta:t.meta??null};case"success":const r={...n,...O5(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=t.manual?r:void 0,r;case"error":const i=t.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=e(this.state),nn.batch(()=>{this.observers.slice().forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:t})})}};function zS(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:RS(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function O5(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function P5(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,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 zP=class extends hd{#e;#t=void 0;#n=void 0;#r=void 0;#s;#i;#o;#l;#a;#h;#c;#d;#u;#p=new Set;constructor(t,e){super(),this.options=e,this.#e=t,this.#o=null,this.bindMethods(),this.setOptions(e)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),z5(this.#t,this.options)?this.#f():this.updateResult(),this.#x())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Oy(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Oy(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#v(),this.#k(),this.#t.removeObserver(this)}setOptions(t){const e=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof kt(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#C(),this.#t.setOptions(this.options),e._defaulted&&!kb(this.options,e)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&L5(this.#t,n,this.options,e)&&this.#f(),this.updateResult(),r&&(this.#t!==n||kt(this.options.enabled,this.#t)!==kt(e.enabled,this.#t)||kt(this.options.staleTime,this.#t)!==kt(e.staleTime,this.#t))&&this.#g();const i=this.#b();r&&(this.#t!==n||kt(this.options.enabled,this.#t)!==kt(e.enabled,this.#t)||i!==this.#u)&&this.#y(i)}getOptimisticResult(t){const e=this.#e.getQueryCache().build(this.#e,t),n=this.createResult(e,t);return kb(this.getCurrentResult(),n)||(this.#r=n,this.#i=this.options,this.#s=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(t,e){return new Proxy(t,{get:(n,r)=>(this.trackProp(r),e?.(r),Reflect.get(n,r))})}trackProp(t){this.#p.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#e.defaultQueryOptions(t),n=this.#e.getQueryCache().build(this.#e,e);let r=()=>{},i;const s=new Promise(a=>{i=a,r=this.#e.getQueryCache().subscribe(u=>{u.type==="updated"&&u.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),a(this.createResult(n,e)))})});return Promise.race([n.fetch().then(()=>{const a=this.createResult(n,e);return i?.(a),a}).finally(()=>{r()}),s])}fetch(t){return this.#f({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#f(t){this.#C();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(Nn)),e}#m(t){return!u3()&&kt(this.options.enabled,this.#t)!==!1&&TS(t)}#g(){this.#v();const t=kt(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#m(t))return;const e=AS(this.#r.dataUpdatedAt,t)+1;this.#c=No.setTimeout(()=>{this.#r.isStale||this.updateResult()},e)}#b(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(t){this.#k(),this.#u=t,!(this.#u===0||!this.#m(this.#u))&&(this.#d=No.setInterval(()=>{(this.options.refetchIntervalInBackground||c3.isFocused())&&this.#f()},this.#u))}#x(){this.#g(),this.#y(this.#b())}#v(){this.#c!==void 0&&(No.clearTimeout(this.#c),this.#c=void 0)}#k(){this.#d!==void 0&&(No.clearInterval(this.#d),this.#d=void 0)}createResult(t,e){const n=this.#t,r=this.options,i=this.#r,s=this.#s,a=this.#i,u=t!==n?t.state:this.#n,{state:c}=t;let f={...c},h=!1,m;if(e._optimisticResults){const B=this.hasListeners(),R=!B&&z5(t,e),M=B&&L5(t,n,e,r);(R||M)&&(f={...f,...zS(c.data,t.options)}),e._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:g,errorUpdatedAt:b,status:x}=f;m=f.data;let k=!1;if(e.placeholderData!==void 0&&m===void 0&&x==="pending"){let B;i?.isPlaceholderData&&e.placeholderData===a?.placeholderData?(B=i.data,k=!0):B=typeof e.placeholderData=="function"?e.placeholderData(this.#h?.state.data,this.#h):e.placeholderData,B!==void 0&&(x="success",m=Ny(i?.data,B,e),h=!0)}if(e.select&&m!==void 0&&!k)if(i&&m===s?.data&&e.select===this.#l)m=this.#a;else try{this.#l=e.select,m=e.select(m),m=Ny(i?.data,m,e),this.#a=m,this.#o=null}catch(B){this.#o=B}else m===void 0&&(this.#o=null);this.#o&&(g=this.#o,m=this.#a,b=Date.now(),x="error",h=!1);const E=f.fetchStatus==="fetching",D=x==="pending",T=x==="error",$=D&&E,A=m!==void 0;return{status:x,fetchStatus:f.fetchStatus,isPending:D,isSuccess:x==="success",isError:T,isInitialLoading:$,isLoading:$,data:m,dataUpdatedAt:f.dataUpdatedAt,error:g,errorUpdatedAt:b,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:E,isRefetching:E&&!D,isLoadingError:T&&!A,isPaused:f.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:T&&A,isStale:d3(t,e),refetch:this.refetch,isEnabled:kt(e.enabled,t)!==!1}}updateResult(){const t=this.#r,e=this.createResult(this.#t,this.options);if(this.#s=this.#t.state,this.#i=this.options,this.#s.data!==void 0&&(this.#h=this.#t),kb(e,t))return;this.#r=e;const r=(()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!this.#p.size)return!0;const a=new Set(s??this.#p);return this.options.throwOnError&&a.add("error"),Object.keys(this.#r).some(u=>{const c=u;return this.#r[c]!==t[c]&&a.has(c)})})();nn.batch(()=>{r&&this.listeners.forEach(i=>{i(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}#C(){const t=this.#e.getQueryCache().build(this.#e,this.options);if(t===this.#t)return;const e=this.#t;this.#t=t,this.#n=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#x()}};function LP(t,e){return kt(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&kt(e.retryOnMount,t)===!1)}function z5(t,e){return LP(t,e)||t.state.data!==void 0&&Oy(t,e,e.refetchOnMount)}function Oy(t,e,n){if(kt(e.enabled,t)!==!1&&kt(e.staleTime,t)!=="static"){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&d3(t,e)}return!1}function L5(t,e,n,r){return(t!==e||kt(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&d3(t,n)}function d3(t,e){return kt(e.enabled,t)!==!1&&t.isStaleByTime(kt(e.staleTime,t))}var IP=class extends PS{#e;#t;#n;#r;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#t=[],this.state=t.state||jP(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(e=>e!==t),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(t){const e=()=>{this.#s({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=OS({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(a,u)=>{this.#s({type:"failed",failureCount:a,error:u})},onPause:()=>{this.#s({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status==="pending",s=!r.canStart();try{if(i)e();else{this.#s({type:"pending",variables:t,isPaused:s}),this.#n.config.onMutate&&await this.#n.config.onMutate(t,this,n);const u=await this.options.onMutate?.(t,n);u!==this.state.context&&this.#s({type:"pending",context:u,variables:t,isPaused:s})}const a=await r.start();return await this.#n.config.onSuccess?.(a,t,this.state.context,this,n),await this.options.onSuccess?.(a,t,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,t,this.state.context,n),this.#s({type:"success",data:a}),a}catch(a){try{await this.#n.config.onError?.(a,t,this.state.context,this,n)}catch(u){Promise.reject(u)}try{await this.options.onError?.(a,t,this.state.context,n)}catch(u){Promise.reject(u)}try{await this.#n.config.onSettled?.(void 0,a,this.state.variables,this.state.context,this,n)}catch(u){Promise.reject(u)}try{await this.options.onSettled?.(void 0,a,t,this.state.context,n)}catch(u){Promise.reject(u)}throw this.#s({type:"error",error:a}),a}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#s(t){const e=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,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{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),nn.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function jP(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var FP=class extends hd{#e;#t;#n;constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#n=0}build(t,e,n){const r=new IP({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(e),state:n});return this.add(r),r}add(t){this.#e.add(t);const e=Yf(t);if(typeof e=="string"){const n=this.#t.get(e);n?n.push(t):this.#t.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const e=Yf(t);if(typeof e=="string"){const n=this.#t.get(e);if(n)if(n.length>1){const r=n.indexOf(t);r!==-1&&n.splice(r,1)}else n[0]===t&&this.#t.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=Yf(t);if(typeof e=="string"){const n=this.#t.get(e)?.find(r=>r.state.status==="pending");return!n||n===t}else return!0}runNext(t){const e=Yf(t);return typeof e=="string"?this.#t.get(e)?.find(n=>n!==t&&n.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){nn.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){const e={exact:!0,...t};return this.getAll().find(n=>B5(e,n))}findAll(t={}){return this.getAll().filter(e=>B5(t,e))}notify(t){nn.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return nn.batch(()=>Promise.all(t.map(e=>e.continue().catch(Nn))))}};function Yf(t){return t.options.scope?.id}var KP=class extends hd{#e;constructor(t={}){super(),this.config=t,this.#e=new Map}build(t,e,n){const r=e.queryKey,i=e.queryHash??a3(r,e);let s=this.get(i);return s||(s=new PP({client:t,queryKey:r,queryHash:i,options:t.defaultQueryOptions(e),state:n,defaultOptions:t.getQueryDefaults(r)}),this.add(s)),s}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#e.get(t.queryHash);e&&(t.destroy(),e===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){nn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(n=>A5(e,n))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(n=>A5(t,n)):e}notify(t){nn.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){nn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){nn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},_P=class{#e;#t;#n;#r;#s;#i;#o;#l;constructor(t={}){this.#e=t.queryCache||new KP,this.#t=t.mutationCache||new FP,this.#n=t.defaultOptions||{},this.#r=new Map,this.#s=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#o=c3.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=qh.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#o?.(),this.#o=void 0,this.#l?.(),this.#l=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=this.#e.build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(kt(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:e,state:n})=>[e,n.data])}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),i=this.#e.get(r.queryHash)?.state.data,s=kP(e,i);if(s!==void 0)return this.#e.build(this,r).setData(s,{...n,manual:!0})}setQueriesData(t,e,n){return nn.batch(()=>this.#e.findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state}removeQueries(t){const e=this.#e;nn.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=this.#e;return nn.batch(()=>{const r=n.findAll(t),i=new Set(r);return r.forEach(s=>{s.reset()}),this.refetchQueries({type:"active",predicate:s=>i.has(s)},e)})}cancelQueries(t,e={}){const n={revert:!0,...e},r=nn.batch(()=>this.#e.findAll(t).map(i=>i.cancel(n)));return Promise.all(r).then(Nn).catch(Nn)}invalidateQueries(t,e={}){return nn.batch(()=>(this.#e.findAll(t).forEach(n=>{n.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},r=nn.batch(()=>this.#e.findAll(t).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Nn)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Nn)}async query(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=this.#e.build(this,e),r=n.isStaleByTime(kt(e.staleTime,n))?await n.fetch(e):n.state.data,i=e.select;return i?i(r):r}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=this.#e.build(this,e);return n.isStaleByTime(kt(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Nn).catch(Nn)}infiniteQuery(t){return t._type="infinite",this.query(t)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Nn).catch(Nn)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return qh.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,e){this.#r.set(Lc(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#r.values()],n={};return e.forEach(r=>{wl(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){this.#s.set(Lc(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#s.values()],n={};return e.forEach(r=>{wl(t,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=a3(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===l3&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};const LS=S.createContext(!1),VP=()=>S.useContext(LS);LS.Provider;function HP(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const UP=S.createContext(HP()),qP=()=>S.useContext(UP),GP=(t,e,n)=>{const r=n?.state.error&&typeof t.throwOnError=="function"?NS(t.throwOnError,[n.state.error,n]):t.throwOnError;(t.suspense||r)&&(e.isReset()||(t.retryOnMount=!1))},WP=t=>{S.useEffect(()=>{t.clearReset()},[t])},QP=({result:t,errorResetBoundary:e,throwOnError:n,query:r,suspense:i})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(i&&t.data===void 0||NS(n,[t.error,r])),YP=t=>{if(t.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},XP=(t,e)=>t?.suspense&&e.isPending,JP=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function ZP(t,e,n){const r=VP(),i=qP(),s=fd(),a=s.defaultQueryOptions(t),u=s.getQueryCache().get(a.queryHash),c=t.subscribed!==!1;a._optimisticResults=r?"isRestoring":c?"optimistic":void 0,YP(a),GP(a,i,u),WP(i);const[f]=S.useState(()=>new e(s,a)),h=f.getOptimisticResult(a),m=!r&&c;if(S.useSyncExternalStore(S.useCallback(g=>{const b=m?f.subscribe(nn.batchCalls(g)):Nn;return f.updateResult(),b},[f,m]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),S.useEffect(()=>{f.setOptions(a)},[a,f]),XP(a,h))throw JP(a,f,i);if(QP({result:h,errorResetBoundary:i,throwOnError:a.throwOnError,query:u,suspense:a.suspense}))throw h.error;return a.notifyOnChangeProps?h:f.trackResult(h)}function Yr(t,e){return ZP(t,zP)}const Oi=["backlog","todo","in_progress","done","canceled"];function IS(t){return t.asks.filter(e=>!e.resolvedAt)}function jS(t,e){return t.blockedBy.some(n=>{const r=e.find(i=>i.key===n);return r&&r.status!=="done"&&r.status!=="canceled"})}const Ai={backlog:"Backlog",todo:"Todo",in_progress:"In Progress",done:"Done",canceled:"Canceled"};let f3="/api";function ez(t){f3=t.replace(/\/+$/,"")}class gl extends Error{status;reason;constructor(e,n,r){super(n),this.name="ApiError",this.status=e,this.reason=r}}let Py=null;function tz(t){Py=t}async function nz(){try{return typeof(await bt("/project"))?.prefix=="string"}catch{return!1}}async function bt(t,e){if(Py)return await Py(t,e);const n=await fetch(`${f3}${t}`,{headers:e?.body?{"Content-Type":"application/json"}:void 0,...e}),r=await n.json().catch(()=>({}));if(!n.ok)throw new gl(n.status,r.error??`${n.status}`,r.reason??null);return r}let rz=()=>new URLSearchParams(location.search).get("board");function FS(t){const e=new EventSource(`${f3}/events`);return e.onmessage=n=>{try{const r=JSON.parse(n.data);t(r.board)}catch{t(void 0)}},()=>e.close()}let KS=FS;function iz(t){KS=t??FS}function sz(t){return KS(t)}function dm(){return rz()}function Ii(){return typeof location>"u"?null:new URLSearchParams(location.search).get("ref")}function Cn(t){const e=new URLSearchParams,n=dm();n&&e.set("board",n);const r=Ii();r&&e.set("ref",r);const i=e.toString();return i?`${t}${t.includes("?")?"&":"?"}${i}`:t}function oz(t){return bt(Cn("/tasks"),{method:"POST",body:JSON.stringify(t)})}function _S(t,e){return bt(Cn(`/tasks/${t}`),{method:"PATCH",body:JSON.stringify(e)})}function az(t){return bt(Cn(`/tasks/${t}`),{method:"DELETE"})}function lz(t){return bt(Cn(`/tasks/${t}`))}function uz(t,e){return bt(Cn(`/tasks/${t}/comments`),{method:"POST",body:JSON.stringify({body:e})})}function cz(t,e){return bt(Cn(`/tasks/${t}/comments/${encodeURIComponent(e)}`),{method:"DELETE"})}function dz(t,e){return bt(Cn(`/tasks/${t}/asks`),{method:"POST",body:JSON.stringify({text:e})})}function fz(t,e,n){return bt(Cn(`/tasks/${t}/asks/${encodeURIComponent(e)}`),{method:"PATCH",body:JSON.stringify({resolved:n})})}function hz(t,e){return bt(Cn(`/tasks/${t}/asks/${encodeURIComponent(e)}`),{method:"DELETE"})}const VS=t=>t;function pz(){return Yr({queryKey:["boards",Ii()],queryFn:()=>bt(Cn("/boards")).then(t=>t.boards),placeholderData:VS})}function mz(t){return Yr({queryKey:["project",t,Ii()],queryFn:()=>bt(Cn("/project")),placeholderData:VS})}function gz(t){return Yr({queryKey:["tasks",t,Ii()],queryFn:()=>bt(Cn("/tasks")).then(e=>e.tasks)})}function bz(t){return Yr({queryKey:["goals",t,Ii()],queryFn:()=>bt(Cn("/goals")).then(e=>e.goals),retry:!1})}function HS(){const t=Ii();return Yr({queryKey:["inbox",t],queryFn:()=>bt(t?`/inbox?ref=${encodeURIComponent(t)}`:"/inbox").then(e=>e.inbox),retry:!1})}function yz(t,e){return Yr({queryKey:["task",t,Ii(),e],queryFn:()=>lz(e),enabled:e!==""})}function fm(t){return Yr({queryKey:["git","status"],queryFn:()=>bt("/git/status"),enabled:t,retry:!1,staleTime:3e3})}function xz(t){return Yr({queryKey:["git","branches"],queryFn:()=>bt("/git/branches").then(e=>e.branches),enabled:t,retry:!1,staleTime:1e4})}function zy(t,e){return Yr({queryKey:["git","pr",t],queryFn:()=>bt(`/git/pr?branch=${encodeURIComponent(t)}`),enabled:e&&t!==null,retry:!1,staleTime:3e4})}function vz(t){return bt("/git/commit",{method:"POST",body:JSON.stringify(t)})}function kz(t){return bt("/git/checkout",{method:"POST",body:JSON.stringify({branch:t})})}function US(t){return bt("/git/pr",{method:"POST",body:JSON.stringify(t)})}function Cz(t,e){return bt(Cn("/git/release"),{method:"POST",body:JSON.stringify({key:t,...e?{note:e}:{}})})}function Ez(t){return Yr({queryKey:["branches"],queryFn:()=>bt(Cn("/branches")).then(e=>e.branches),enabled:t,retry:!1,staleTime:6e4})}const Dz=!1;var qS=S.useLayoutEffect;function Sz(t,e,n){S.useEffect(()=>{if(!t.current||n||typeof IntersectionObserver!="function")return()=>e();const r=new IntersectionObserver(i=>{e(i.pop())},{rootMargin:"100px"});return r.observe(t.current),()=>{r.disconnect(),e()}},[e,n,t])}function wz(t){const e=S.useRef(null);return S.useImperativeHandle(t,()=>e.current,[]),e}function Ic(t){return t[t.length-1]}function $l(t,e){return typeof t=="function"?t(e):t}const GS=Object.prototype.hasOwnProperty,$z=Object.prototype.propertyIsEnumerable;function WS(t){for(const e in t)if(GS.call(t,e))return!0;return!1}const Tz=()=>Object.create(null),So=(t,e)=>Ro(t,e,Tz);function Ro(t,e,n=()=>({}),r=0){if(t===e)return t;if(r>500)return e;const i=e,s=F5(t)&&F5(i);if(!s&&!(Gh(t)&&Gh(i)))return i;const a=s?t:I5(t);if(!a)return i;const u=s?i:I5(i);if(!u)return i;const c=a.length,f=u.length,h=s?new Array(f):n();let m=0;for(let g=0;g<f;g++){const b=s?g:u[g],x=t[b],k=i[b];if(x===k){h[b]=x,(s?g<c:GS.call(t,b))&&m++;continue}if(x===null||k===null||typeof x!="object"||typeof k!="object"){h[b]=k;continue}const E=Ro(x,k,n,r+1);h[b]=E,E===x&&m++}return c===f&&m===c?t:h}function I5(t){const e=Object.keys(t);if(e.length!==Object.getOwnPropertyNames(t).length)return!1;const n=Object.getOwnPropertySymbols(t);if(n.length===0)return e;for(const r of n){if(!$z.call(t,r))return!1;e.push(r)}return e}function Gh(t){if(!j5(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const n=e.prototype;return!(!j5(n)||!n.hasOwnProperty("isPrototypeOf"))}function j5(t){return Object.prototype.toString.call(t)==="[object Object]"}function F5(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Ns(t,e,n){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let r=0,i=t.length;r<i;r++)if(!Ns(t[r],e[r],n))return!1;return!0}if(Gh(t)&&Gh(e)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const a in e)if((!r||e[a]!==void 0)&&!Ns(t[a],e[a],n))return!1;return!0}let i=0;if(!r)i=Object.keys(t).length;else for(const a in t)t[a]!==void 0&&i++;let s=0;for(const a in e)if((!r||e[a]!==void 0)&&(s++,s>i||!Ns(t[a],e[a],n)))return!1;return i===s}return!1}const Az=/[\x00-\x1f\x7f"<>`{}]/g;function Bz(t){return t.replace(Az,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function K5(t){let e;try{e=decodeURI(t)}catch{e=t.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return Bz(e)}const Mz=["http:","https:","mailto:","tel:"];function Wh(t,e){if(!t)return!1;try{const n=new URL(t);return!e.has(n.protocol)}catch{return!1}}function Wu(t){if(!t)return{path:t,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(t)&&!t.startsWith("//"))return{path:t,handledProtocolRelativeURL:!1};const e=/%25|%5C/gi;let n=0,r="",i;for(;(i=e.exec(t))!==null;)r+=K5(t.slice(n,i.index))+i[0],n=e.lastIndex;r=r+K5(n?t.slice(n):t);let s=!1;return r.startsWith("//")&&(s=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:s}}function Nz(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function Rz(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function h3(){throw new Error("Invariant failed")}function Qh(t){const e=new Map;let n,r;const i=s=>{s.next&&(s.prev?(s.prev.next=s.next,s.next.prev=s.prev,s.next=void 0,r&&(r.next=s,s.prev=r)):(s.next.prev=void 0,n=s.next,s.next=void 0,r&&(s.prev=r,r.next=s)),r=s)};return{get(s){const a=e.get(s);if(a)return i(a),a.value},set(s,a){if(e.size>=t&&n){const c=n;e.delete(c.key),c.next&&(n=c.next,c.next.prev=void 0),c===r&&(r=void 0)}const u=e.get(s);if(u)u.value=a,i(u);else{const c={key:s,value:a,prev:r};r&&(r.next=c),r=c,n||(n=c),e.set(s,c)}},clear(){e.clear(),n=void 0,r=void 0}}}const $s=4,QS=5;function YS(t,e,n=new Uint16Array(6)){const r=t.indexOf("/",e),i=r===-1?t.length:r,s=t.substring(e,i);if(!s||!s.includes("$"))return n[0]=0,n[1]=e,n[2]=e,n[3]=i,n[4]=i,n[5]=i,n;if(s==="$"){const c=t.length;return n[0]=2,n[1]=e,n[2]=e,n[3]=c,n[4]=c,n[5]=c,n}if(s.charCodeAt(0)===36)return n[0]=1,n[1]=e,n[2]=e+1,n[3]=i,n[4]=i,n[5]=i,n;const a=s.indexOf("{");let u;if(a!==-1&&a+1<s.length&&(u=s.indexOf("}",a))!==-1){const c=s.charCodeAt(a+1);if(c===45){if(a+2<s.length&&s.charCodeAt(a+2)===36){const f=a+3,h=u;if(f<h)return n[0]=3,n[1]=e+a,n[2]=e+f,n[3]=e+h,n[4]=e+u+1,n[5]=i,n}}else if(c===36){const f=a+1,h=a+2;return h===u?(n[0]=2,n[1]=e+a,n[2]=e+f,n[3]=e+h,n[4]=e+u+1,n[5]=t.length,n):(n[0]=1,n[1]=e+a,n[2]=e+h,n[3]=e+u,n[4]=e+u+1,n[5]=i,n)}}return n[0]=0,n[1]=e,n[2]=e,n[3]=i,n[4]=i,n[5]=i,n}function hm(t,e,n,r,i,s,a,u){u?.(n);let c=r;{const f=n.fullPath??n.from,h=n.options,m=f.length,g=h?.caseSensitive??t,b=h?.params?.parse??h?.parseParams;for(;c<m;){const k=YS(f,c,e);let E;const D=c,T=k[5];c=T+1,s++;const $=k[0];switch($){case 0:{const A=f.substring(k[2],k[3]);let B=A,R;g?R=i.static??=new Map:(B=A.toLowerCase(),R=i.staticInsensitive??=new Map);const M=R.get(B);if(M)E=M;else{const O=yl(f);O.parent=i,O.depth=s,E=O,R.set(B,O)}break}case 1:case 3:case 2:{let A=f.substring(D,k[1]),B=f.substring(k[4],T);const R=g&&!!(A||B);g||(A=A.toLowerCase(),B=B.toLowerCase());const M=$===1?i.dynamic:$===3?i.optional:i.wildcard,O=$!==2&&!b&&M?.find(j=>!j.parse&&j.caseSensitive===R&&j.prefix===A&&j.suffix===B);if(O)E=O;else{const j=Oz($,f,R,A,B);E=j,j.parent=i,j.depth=s;let q;$===1?q=i.dynamic??=[]:$===3?q=i.optional??=[]:q=i.wildcard??=[],q.push(j),q.length===2&&a?.push(q)}break}}i=E}if(b&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const k=yl(f);k.kind=QS,k.parent=i,s++,k.depth=s,i.pathless??=[],i.pathless.push(k),i=k}const x=(n.path||!n.children)&&!n.isRoot;if(x&&f.endsWith("/")){const k=yl(f);k.kind=$s,k.parent=i,s++,k.depth=s,i.index=k,i=k}i.parse=b??null,i.priority=h?.params?.priority??0,x&&!i.route&&(i.route=n,i.fullPath=f)}if(n.children)for(const f of n.children)hm(t,e,f,c,i,s,a,u)}function XS(t,e){if(t.parse&&!e.parse)return-1;if(!t.parse&&e.parse)return 1;if(t.parse&&e.parse&&(t.priority||e.priority))return e.priority-t.priority;if(t.prefix&&e.prefix&&t.prefix!==e.prefix){if(t.prefix.startsWith(e.prefix))return-1;if(e.prefix.startsWith(t.prefix))return 1}if(t.suffix&&e.suffix&&t.suffix!==e.suffix){if(t.suffix.endsWith(e.suffix))return-1;if(e.suffix.endsWith(t.suffix))return 1}return t.prefix&&!e.prefix?-1:!t.prefix&&e.prefix?1:t.suffix&&!e.suffix?-1:!t.suffix&&e.suffix?1:t.caseSensitive&&!e.caseSensitive?-1:!t.caseSensitive&&e.caseSensitive?1:0}function yl(t){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0}}function Oz(t,e,n,r,i){return{kind:t,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function Pz(t,e){const n=yl("/"),r=new Uint16Array(6),i=[];for(const s of t)hm(!1,r,s,1,n,0,i);for(const s of i)s.sort(XS);e.masksTree=n,e.flatCache=Qh(1e3)}function zz(t,e){t||="/";const n=e.flatCache.get(t);if(n!==void 0)return n;const r=p3(t,e.masksTree);return e.flatCache.set(t,r),r}function Lz(t,e,n,r,i){t||="/",r||="/";const s=e?`case\0${t}`:t;let a=i.singleCache.get(s);return a||(a=yl("/"),hm(e,new Uint16Array(6),{from:t},1,a,0),i.singleCache.set(s,a)),p3(r,a,n)}function Iz(t,e,n=!1){const r=n?t:`nofuzz\0${t}`,i=e.matchCache.get(r);if(i!==void 0)return i;t||="/";let s;try{s=p3(t,e.segmentTree,n)}catch(a){if(a instanceof URIError)s=null;else throw a}return s&&(s.branch=ZS(s.route)),e.matchCache.set(r,s),s}function jz(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}function Fz(t,e=!1,n){const r=yl(t.fullPath),i=new Uint16Array(6),s=[],a={},u={};let c=0;hm(e,i,t,1,r,0,s,f=>{if(n?.(f,c),f.id in a&&h3(),a[f.id]=f,c!==0&&f.path){const h=jz(f.fullPath);(!u[h]||f.fullPath.endsWith("/"))&&(u[h]=f)}c++});for(const f of s)f.sort(XS);return{processedTree:{segmentTree:r,singleCache:Qh(1e3),matchCache:Qh(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:u}}function p3(t,e,n=!1){const r=t.split("/"),i=_z(t,r,e,n);if(!i)return null;const[s]=JS(t,r,i);return{route:i.node.route,rawParams:s}}function JS(t,e,n){const r=Kz(n.node);let i=null;const s=Object.create(null);let a=n.extract?.part??0,u=n.extract?.node??0,c=n.extract?.path??0,f=n.extract?.segment??0;for(;u<r.length;a++,u++,c++,f++){const h=r[u];if(h.kind===$s)break;if(h.kind===QS){f--,a--,c--;continue}const m=e[a],g=c;if(m&&(c+=m.length),h.kind===1){i??=n.node.fullPath.split("/");const b=i[f],x=h.prefix.length;if(b.charCodeAt(x)===123){const k=h.suffix.length,E=b.substring(x+2,b.length-k-1),D=m.substring(x,m.length-k);s[E]=decodeURIComponent(D)}else{const k=b.substring(1);s[k]=decodeURIComponent(m)}}else if(h.kind===3){if(n.skipped&1<<u){a--,c=g-1;continue}i??=n.node.fullPath.split("/");const b=i[f],x=h.prefix.length,k=h.suffix.length,E=b.substring(x+3,b.length-k-1),D=h.suffix||h.prefix?m.substring(x,m.length-k):m;D&&(s[E]=decodeURIComponent(D))}else if(h.kind===2){const b=h,x=t.substring(g+b.prefix.length,t.length-b.suffix.length),k=decodeURIComponent(x);s["*"]=k,s._splat=k;break}}return n.rawParams&&Object.assign(s,n.rawParams),[s,{part:a,node:u,path:c,segment:f}]}function ZS(t){const e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}function Kz(t){const e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}function _z(t,e,n,r){if(t==="/"&&n.index)return{node:n.index,skipped:0};const i=!Ic(e),s=i&&t!=="/",a=e.length-(i?1:0),u=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}];let c=null,f=null;for(;u.length;){const h=u.pop(),{node:m,index:g,skipped:b,statics:x,dynamics:k,optionals:E}=h;let{extract:D,rawParams:T}=h;if(m.kind===2&&m.route&&!Jf(f,h))continue;if(m.parse){if(!_5(t,e,h))continue;T=h.rawParams,D=h.extract}r&&m.route&&m.kind!==$s&&Jf(c,h)&&(c=h);const $=g===a;if($&&(m.route&&(!s||m.kind===$s||m.kind===2)&&Jf(f,h)&&(f=h),!m.optional&&!m.wildcard&&!m.index&&!m.pathless))continue;const A=$?void 0:e[g];let B;if($&&m.index){const R={node:m.index,index:g,skipped:b,statics:x,dynamics:k,optionals:E,extract:D,rawParams:T};let M=!0;if(m.index.parse&&(_5(t,e,R)||(M=!1)),M){if(!k&&!E&&!b&&Vz(x,a))return R;Jf(f,R)&&(f=R)}}if(m.wildcard)for(let R=m.wildcard.length-1;R>=0;R--){const M=m.wildcard[R],{prefix:O,suffix:j}=M;if(!(O&&($||!(M.caseSensitive?A:B??=A.toLowerCase()).startsWith(O)))){if(j){if($)continue;const q=e.slice(g).join("/"),X=q.slice(-j.length);if((M.caseSensitive?X:X.toLowerCase())!==j||q.length-j.length<O.length)continue}u.push({node:M,index:a,skipped:b,statics:x,dynamics:k,optionals:E,extract:D,rawParams:T})}}if(m.optional){const R=b|1<<m.depth+1;for(let M=m.optional.length-1;M>=0;M--){const O=m.optional[M];u.push({node:O,index:g,skipped:R,statics:x,dynamics:k,optionals:E,extract:D,rawParams:T})}if(!$)for(let M=m.optional.length-1;M>=0;M--){const O=m.optional[M],{prefix:j,suffix:q}=O;if(j||q){const X=O.caseSensitive?A:B??=A.toLowerCase();if(j&&!X.startsWith(j)||q&&X.indexOf(q,X.length-q.length)<j.length)continue}u.push({node:O,index:g+1,skipped:b,statics:x,dynamics:k,optionals:E+Xf(a,g),extract:D,rawParams:T})}}if(!$&&m.dynamic&&A)for(let R=m.dynamic.length-1;R>=0;R--){const M=m.dynamic[R],{prefix:O,suffix:j}=M;if(O||j){const q=M.caseSensitive?A:B??=A.toLowerCase();if(O&&!q.startsWith(O)||j&&q.indexOf(j,q.length-j.length)<O.length)continue}u.push({node:M,index:g+1,skipped:b,statics:x,dynamics:k+Xf(a,g),optionals:E,extract:D,rawParams:T})}if(!$&&m.staticInsensitive){const R=m.staticInsensitive.get(B??=A.toLowerCase());R&&u.push({node:R,index:g+1,skipped:b,statics:x+Xf(a,g),dynamics:k,optionals:E,extract:D,rawParams:T})}if(!$&&m.static){const R=m.static.get(A);R&&u.push({node:R,index:g+1,skipped:b,statics:x+Xf(a,g),dynamics:k,optionals:E,extract:D,rawParams:T})}if(m.pathless)for(let R=m.pathless.length-1;R>=0;R--){const M=m.pathless[R];u.push({node:M,index:g,skipped:b,statics:x,dynamics:k,optionals:E,extract:D,rawParams:T})}}if(f)return f;if(r&&c){let h=c.index;for(let g=0;g<c.index;g++)h+=e[g].length;const m=h===t.length?"/":t.slice(h);return c.rawParams??=Object.create(null),c.rawParams["**"]=decodeURIComponent(m),c}return null}function Xf(t,e){return 2**(t-e-1)}function Vz(t,e){return t===2**(e-1)-1}function _5(t,e,n){let r,i;try{[r,i]=JS(t,e,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function Jf(t,e){return t?e.statics>t.statics||e.statics===t.statics&&(e.dynamics>t.dynamics||e.dynamics===t.dynamics&&(e.optionals>t.optionals||e.optionals===t.optionals&&((e.node.kind===$s)>(t.node.kind===$s)||e.node.kind===$s==(t.node.kind===$s)&&e.node.depth>t.node.depth))):!0}function Mh(t){return Nh(t.filter(e=>e!==void 0).join("/"))}function Nh(t){return t.replace(/\/{2,}/g,"/")}function ew(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}function Di(t){const e=t.length;return e>1&&t[e-1]==="/"?t.replace(/\/{1,}$/,""):t}function tw(t){return Di(ew(t))}function Yh(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}function Hz(t,e,n){return Yh(t,n)===Yh(e,n)}function Uz({base:t,to:e,trailingSlash:n="never",cache:r}){if(e.includes("//")&&(e=Nh(e)),e.startsWith("/"))return e.length===1||n==="preserve"?e:n==="always"?e.endsWith("/")?e:`${e}/`:e.endsWith("/")?e.slice(0,-1):e;const i=e===".";let s;if(r){s=i?t:t+"\0"+e;const f=r.get(s);if(f)return f}let a;if(i)a=t.split("/");else{for(t.includes("//")&&(t=Nh(t)),a=t.split("/");a.length>1&&Ic(a)==="";)a.pop();const f=e.split("/");for(let h=0,m=f.length;h<m;h++){const g=f[h];g===""?h?h===m-1&&a.push(g):a=[g]:g===".."?a.length>1?a.pop():a=[""]:g==="."||a.push(g)}}a.length>1&&(Ic(a)===""?n==="never"&&a.pop():n==="always"&&a.push(""));const u=a.join("/"),c=(i?Nh(u):u)||"/";return s&&r&&r.set(s,c),c}function qz(t){const e=new Map(t.map(i=>[encodeURIComponent(i),i])),n=Array.from(e.keys()).map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(n,"g");return i=>i.replace(r,s=>e.get(s)??s)}function Cb(t,e,n){const r=e[t];return typeof r!="string"?r:t==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(i=>H5(i,n)).join("/"):H5(r,n)}function V5({path:t,params:e,decoder:n,...r}){let i=!1;const s=Object.create(null);if(!t||t==="/")return{interpolatedPath:"/",usedParams:s,isMissingParams:i};if(!t.includes("$"))return{interpolatedPath:t,usedParams:s,isMissingParams:i};const a=t.length;let u=0,c,f="";for(;u<a;){const h=u;c=YS(t,h,c);const m=c[5];if(u=m+1,h===m)continue;const g=c[0];if(g===0){f+="/"+t.substring(h,m);continue}if(g===2){const b=e._splat;s._splat=b,s["*"]=b;const x=t.substring(h,c[1]),k=t.substring(c[4],m);if(!b){i=!0,(x||k)&&(f+="/"+x+k);continue}const E=Cb("_splat",e,n);f+="/"+x+E+k;continue}if(g===1){const b=t.substring(c[2],c[3]);!i&&!(b in e)&&(i=!0),s[b]=e[b];const x=t.substring(h,c[1]),k=t.substring(c[4],m),E=Cb(b,e,n)??"undefined";f+="/"+x+E+k;continue}if(g===3){const b=t.substring(c[2],c[3]),x=e[b];if(x==null)continue;s[b]=x;const k=t.substring(h,c[1]),E=t.substring(c[4],m),D=Cb(b,e,n)??"";f+="/"+k+D+E;continue}}return t.endsWith("/")&&(f+="/"),{usedParams:s,interpolatedPath:f||"/",isMissingParams:i}}function H5(t,e){const n=encodeURIComponent(t);return e?.(n)??n}function nw(t={}){if(t.isNotFound=!0,t.throw)throw t;return t}function Tl(t){return t?.isNotFound===!0}function Gz(){try{return sessionStorage}catch{return}}const Wz="tsr-scroll-restoration-v1_3",rw=Gz();function Qz(){try{return JSON.parse(rw?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}function Yz(){try{rw?.setItem(Wz,JSON.stringify(dl))}catch{}}const dl=Qz(),U5="data-scroll-restoration-id",Xz=t=>t.state.__TSR_key||t.href;function Jz(t){const e=t.getAttribute(U5);if(e)return`[${U5}="${e}"]`;let n="",r=t,i;for(;i=r.parentNode;){let s=1,a=r;for(;a=a.previousElementSibling;)s++;const u=`${r.localName}:nth-child(${s})`;n=n?`${u} > ${n}`:u,r=i}return n}let Zf=!1;const Rh="window";function Ly(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}function q5(t){const e=new Set;for(const n of t){if(n===Rh)continue;const r=Ly(n);r&&e.add(r)}return e}function Zz(t,e){const n=t.options.scrollRestoration,r=t._scroll;n&&(r.restoring=!0);const i=t.options.getScrollRestorationKey||Xz,s=new Set,a=u=>{const c=dl[u]||={};for(const f of s)f===document?c[Rh]={scrollX,scrollY}:f.isConnected&&(c[Jz(f)]={scrollX:f.scrollLeft,scrollY:f.scrollTop})};n&&!r.restoration&&(r.restoration=!0,Zf=!1,history.scrollRestoration="manual",document.addEventListener("scroll",u=>{Zf||s.add(u.target)},!0),t.subscribe("onBeforeLoad",u=>{u.fromLocation&&a(i(u.fromLocation)),s.clear()}),addEventListener("pagehide",()=>{a(i(t.stores.resolvedLocation.get()??t.stores.location.get())),Yz()})),!r.reset&&(r.reset=!0,t.subscribe("onRendered",u=>{const c=t.options.scrollRestorationBehavior,f=t.options.scrollToTopSelectors,h=r.next,m=r.hash;let g;if(s.clear(),r.next=!0,r.hash=!1,typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))return;const b=i(u.toLocation),x=u.fromLocation&&i(u.fromLocation);if(r.restoring&&x&&x!==b){const k=dl[x];if(k){let E=dl[b];for(const D in k){if(D===Rh){if(h)continue}else{const T=Ly(D);if(!T||h&&f&&(g??=q5(f),g.has(T)))continue}E||(E=dl[b]={}),E[D]??=k[D]}}}Zf=!0;try{const k=u.toLocation.hash,E=u.toLocation.state.__hashScrollIntoViewOptions??!0;let D=!1;if(h){!k&&f&&(g??=q5(f));const T=k&&E&&m,$=r.restoring?dl[b]:void 0;if($)for(const A in $){const{scrollX:B,scrollY:R}=$[A];if(A===Rh){if(T)continue;scrollTo({top:R,left:B,behavior:c}),D=!0}else{const M=Ly(A);M&&(M.scrollLeft=B,M.scrollTop=R,g?.delete(M))}}if(!k){const A={top:0,left:0,behavior:c};if(D||scrollTo(A),g)for(const B of g)B.scrollTo(A)}}!D&&k&&E&&document.getElementById(k)?.scrollIntoView(E)}finally{Zf=!1}}))}function eL(t,e=String){const n=new URLSearchParams;for(const r in t){const i=t[r];i!==void 0&&n.set(r,e(i))}return n.toString()}function Eb(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function tL(t){const e=new URLSearchParams(t),n=Object.create(null);for(const[r,i]of e.entries()){const s=n[r];s==null?n[r]=Eb(i):Array.isArray(s)?s.push(Eb(i)):n[r]=[s,Eb(i)]}return n}const nL=/^(?:\s|["[{\d-]|fa|nu|tr)/,rL=sL(JSON.parse),iL=oL(JSON.stringify,JSON.parse);function sL(t){return e=>{e[0]==="?"&&(e=e.substring(1));const n=tL(e);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=t(i)}catch{}}return n}}function oL(t,e){const n=e===JSON.parse;function r(i){if(i&&typeof i=="object")try{return t(i)}catch{}else if(e&&typeof i=="string"){if(n&&!nL.test(i))return i;try{return e(i),t(i)}catch{}}return i}return i=>{const s=eL(i,r);return s?`?${s}`:""}}const xl="__root__";function iw(t){if(t.statusCode=t.statusCode||t.code||307,!t.reloadDocument&&typeof t.href=="string")try{new URL(t.href),t.reloadDocument=!0}catch{}const e=new Headers(t.headers);t.href&&e.get("Location")===null&&e.set("Location",t.href);const n=new Response(null,{status:t.statusCode,headers:e});if(n.options=t,t.throw)throw n;return n}function sw(t){return t instanceof Response&&!!t.options}function aL(t){return{input:({url:e})=>{for(const n of t)e=Iy(n,e);return e},output:({url:e})=>{for(let n=t.length-1;n>=0;n--)e=ow(t[n],e);return e}}}function lL(t){const e=tw(t.basepath),n=`/${e}`,r=t.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:s})=>{const a=t.caseSensitive?s.pathname:s.pathname.toLowerCase();return a===r?s.pathname="/":a.startsWith(i)&&(s.pathname=s.pathname.slice(n.length)),s},output:({url:s})=>(s.pathname=Mh(["/",e,s.pathname]),s)}}function Iy(t,e){const n=t?.input?.({url:e});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return e}function ow(t,e){const n=t?.output?.({url:e});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return e}function uL(t,e){const{createMutableStore:n,createReadonlyStore:r,batch:i}=e,s=new Map,a=n("idle"),u=n(t),c=n(void 0),f=n([]),h=r(()=>f.get().map(k=>s.get(k).get())),m=r(()=>({status:a.get(),isLoading:a.get()==="pending",matches:h.get(),location:u.get(),resolvedLocation:c.get()}));function g(k){let E=s.get(k);return E||(E=n(void 0),s.set(k,E)),E}const b={status:a,location:u,resolvedLocation:c,ids:f,matches:h,byRoute:s,__store:m,getMatchStore:g,setMatches:x};function x(k){const E=f.get(),D=k.map(T=>T.routeId);i(()=>{Rz(E,D)||f.set(D);for(const T of E)D.includes(T)||s.get(T).set(()=>{});for(const T of k){const $=g(T.routeId);$.get()!==T&&$.set(T)}})}return b}var Rs="__TSR_index",G5="popstate",W5="beforeunload";function cL(t){let e=t.getLocation();const n=new Set,r=a=>{e=t.getLocation(),n.forEach(u=>u({location:e,action:a}))},i=a=>{t.notifyOnIndexChange??!0?r(a):e=t.getLocation()},s=async({task:a,navigateOpts:u,...c})=>{if(u?.ignoreBlocker??!1){a();return}const f=t.getBlockers?.()??[],h=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&f.length&&h)for(const m of f){const g=Xh(c.path,c.state);if(await m.blockerFn({currentLocation:e,nextLocation:g,action:c.type})){t.onBlocked?.();return}}a()};return{get location(){return e},get length(){return t.getLength()},subscribers:n,subscribe:a=>(n.add(a),()=>{n.delete(a)}),push:(a,u,c)=>{const f=e.state[Rs];u=Q5(f+1,u),s({task:()=>{t.pushState(a,u),r({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:a,state:u})},replace:(a,u,c)=>{const f=e.state[Rs];u=Q5(f,u),s({task:()=>{t.replaceState(a,u),r({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:a,state:u})},go:(a,u)=>{s({task:()=>{t.go(a),i({type:"GO",index:a})},navigateOpts:u,type:"GO"})},back:a=>{s({task:()=>{t.back(a?.ignoreBlocker??!1),i({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{s({task:()=>{t.forward(a?.ignoreBlocker??!1),i({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>e.state[Rs]!==0,createHref:a=>t.createHref(a),block:a=>{if(!t.setBlockers)return()=>{};const u=t.getBlockers?.()??[];return t.setBlockers([...u,a]),()=>{const c=t.getBlockers?.()??[];t.setBlockers?.(c.filter(f=>f!==a))}},flush:()=>t.flush?.(),destroy:()=>t.destroy?.(),notify:r}}function Q5(t,e){e||(e={});const n=m3();return{...e,key:n,__TSR_key:n,[Rs]:t}}function dL(t){const e=typeof document<"u"?window:void 0,n=e.history.pushState,r=e.history.replaceState;let i=[];const s=()=>i,a=M=>i=M,u=(M=>M),c=(()=>Xh(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){const M=m3();e.history.replaceState({[Rs]:0,key:M,__TSR_key:M},"")}let f=c(),h,m=!1,g=!1,b=!1,x=!1;const k=()=>f;let E;const D=()=>{E&&(R._ignoreSubscribers=!0,(E[2]?e.history.pushState:e.history.replaceState)(E[1],"",E[0]),R._ignoreSubscribers=!1,E=void 0,h=void 0)},T=(M,O,j)=>{const q=u(O),X=!!E;X||(h=f),f=Xh(O,j),E=[q,j,E?.[2]||M],X||queueMicrotask(()=>D())},$=M=>{f=c(),R.notify({type:M})},A=async()=>{if(g){g=!1;return}const M=c(),O=M.state[Rs]-f.state[Rs],j=O===1,q=O===-1,X=!j&&!q||m;m=!1;const G=X?"GO":q?"BACK":"FORWARD",Z=X?{type:"GO",index:O}:{type:q?"BACK":"FORWARD"};if(b)b=!1;else{const F=s();if(typeof document<"u"&&F.length){for(const te of F)if(await te.blockerFn({currentLocation:f,nextLocation:M,action:G})){g=!0,e.history.go(1),R.notify(Z);return}}}f=c(),R.notify(Z)},B=M=>{if(x){x=!1;return}let O=!1;const j=s();if(typeof document<"u"&&j.length)for(const q of j){const X=q.enableBeforeUnload??!0;if(X===!0){O=!0;break}if(typeof X=="function"&&X()===!0){O=!0;break}}if(O)return M.preventDefault(),M.returnValue=""},R=cL({getLocation:k,getLength:()=>e.history.length,pushState:(M,O)=>T(!0,M,O),replaceState:(M,O)=>T(!1,M,O),back:M=>(M&&(b=!0),x=!0,e.history.back()),forward:M=>{M&&(b=!0),x=!0,e.history.forward()},go:M=>{m=!0,e.history.go(M)},createHref:M=>u(M),flush:D,destroy:()=>{e.history.pushState=n,e.history.replaceState=r,e.removeEventListener(W5,B,{capture:!0}),e.removeEventListener(G5,A)},onBlocked:()=>{h&&f!==h&&(f=h)},getBlockers:s,setBlockers:a,notifyOnIndexChange:!1});return e.addEventListener(W5,B,{capture:!0}),e.addEventListener(G5,A),e.history.pushState=function(...M){const O=n.apply(e.history,M);return R._ignoreSubscribers||$("PUSH"),O},e.history.replaceState=function(...M){const O=r.apply(e.history,M);return R._ignoreSubscribers||$("REPLACE"),O},R}function fL(t){let e=t.replace(/[\x00-\x1f\x7f]/g,"");return e.startsWith("//")&&(e="/"+e.replace(/^\/+/,"")),e}function Xh(t,e){const n=fL(t),r=n.indexOf("#"),i=n.indexOf("?"),s=m3();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):"",search:i>-1?n.slice(i,r===-1?void 0:r):"",state:e||{[Rs]:0,key:s,__TSR_key:s}}}function m3(){return(Math.random()+1).toString(36).substring(7)}function Y5(t){return t.options.loader||t.options.beforeLoad||t.lazyFn||t.options.component?.preload||t.options.pendingComponent?.preload}function pm(t,e){return{fromLocation:e,toLocation:t,pathChanged:e?.pathname!==t.pathname,hrefChanged:e?.href!==t.href,hashChanged:e?.hash!==t.hash}}function X5({key:t,__TSR_key:e,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function hL(t,e,n,r){for(const i of e){if(r&&t._tx!==r)return;n.some(s=>s.routeId===i.routeId)||t.routesById[i.routeId].options.onLeave?.(i)}for(const i of n){if(r&&t._tx!==r)return;t.routesById[i.routeId].options[e.some(s=>s.routeId===i.routeId)?"onStay":"onEnter"]?.(i)}}var pL=class{constructor(t,e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=async n=>(n(),!1),this.update=n=>{const r=this.options,i=this.basepath??r?.basepath??"/",s=this.basepath===void 0,a=r?.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??Dz??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=qz(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=dL()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let f;this.resolvePathCache=Qh(1e3),f=this.buildRouteTree(),this.setRoutes(f)}if(!this.stores&&this.latestLocation){const f=this.getStoreConfig(this);this.batch=f.batch,this.stores=uL(this.latestLocation,f),Zz(this)}const u=this.options.basepath??"/",c=this.options.rewrite;if(s||i!==u||a!==c){this.basepath=u;const f=[],h=tw(u);h&&h!=="/"&&f.push(lL({basepath:u})),c&&f.push(c),this.rewrite=f.length===0?void 0:f.length===1?f[0]:aL(f),this.history&&this.updateLatestLocation(),this.stores&&this.stores.location.set(this.latestLocation)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=Fz(this.routeTree,this.options.caseSensitive,(r,i)=>{r.init({originalIndex:i})});return this.options.routeMasks&&Pz(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const i={eventType:n,fn:r};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=n=>{for(const r of this.subscribers)if(r.eventType===n.type)try{r.fn(n)}catch(i){console.error(i)}},this.parseLocation=(n,r)=>{const i=({pathname:c,search:f,hash:h,href:m,state:g})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const D=this.options.parseSearch(f),T=this.options.stringifySearch(D);return{href:c+T+h,publicHref:c+T+h,pathname:Wu(c).path,external:!1,searchStr:T,search:So(r?.search,D),hash:Wu(h.slice(1)).path,state:Ro(r?.state,g)}}const b=new URL(m,this.origin),x=Iy(this.rewrite,b),k=this.options.parseSearch(x.search),E=this.options.stringifySearch(k);return x.search=E,{href:x.href.replace(x.origin,""),publicHref:m,pathname:Wu(x.pathname).path,external:!!this.rewrite&&x.origin!==this.origin,searchStr:E,search:So(r?.search,k),hash:Wu(x.hash.slice(1)).path,state:Ro(r?.state,g)}},s=i(n),{__tempLocation:a,__tempKey:u}=s.state;if(a&&(!u||u===this.tempLocationKey)){const c=i(a);return c.state.key=s.state.key,c.state.__TSR_key=s.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:s}}return s},this.resolvePathWithBase=(n,r)=>Uz({base:n,to:r,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,i)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},i):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>{const r=Object.create(null),i=Iz(Di(n),this.processedTree,!0);return i&&Object.assign(r,i.rawParams),[i?.branch||[this.routesById.__root__],r,i?.route]},this.buildLocation=n=>{const r=(s={})=>{if(s.href){const j=Xh(s.href,{});s={...s,to:Iy(this.rewrite,new URL(j.pathname,this.origin)).pathname,search:this.options.parseSearch(j.search),hash:j.hash.slice(1)}}const a=s._fromLocation||this._pendingLocation||this.latestLocation,u=this.matchRoutesLightweight(a);s.from;const c=s.unsafeRelative==="path"?a.pathname:s.from??u[1],f=u[2],h=u[3],m=this.resolvePathWithBase(c,s.to?`${s.to}`:".");let g=J5(s.params,h);const b=this.routesByPath[Di(m)];let x;if(b)x=this.getRouteBranch(b);else if(m.includes("$"))x=[];else{const[j,q,X]=this.getMatchedRoutes(m);x=j,this.options.notFoundRoute&&(!X||X.path!=="/"&&q["**"])&&(x=[...x,this.options.notFoundRoute])}if(x.length&&WS(g))for(const j of x){const q=j.options.params?.stringify??j.options.stringifyParams;if(q){g===h&&(g=Object.assign(Object.create(null),g));try{Object.assign(g,q(g))}catch{}}}const k=n.leaveParams?m:Wu(V5({path:m,params:g,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let E=f;if(n._includeValidateSearch&&this.options.search?.strict){const j={};x.forEach(q=>{if(q.options.validateSearch)try{Object.assign(j,Oh(q.options.validateSearch,{...j,...E}))}catch{}}),E=j}E=gL(E,s,x,n._includeValidateSearch),E=So(f,E);const D=this.options.stringifySearch(E),T=s.hash===!0?a.hash:s.hash?$l(s.hash,a.hash):void 0,$=T?`#${T}`:"";let A=s.state===!0?a.state:s.state?$l(s.state,a.state):{};s.state&&(A=Ro(a.state,A));const B=`${k}${D}${$}`;let R,M,O=!1;if(this.rewrite){const j=new URL(B,this.origin),q=ow(this.rewrite,j);R=j.href.replace(j.origin,""),q.origin!==this.origin?(M=q.href,O=!0):M=q.pathname+q.search+q.hash}else R=Nz(B),M=R;return{publicHref:M,href:R,pathname:k,search:E,searchStr:D,state:A,hash:T??"",external:O,unmaskOnReload:s.unmaskOnReload}},i=r(n);if(n.mask)i.maskedLocation=r({from:n.from,...n.mask});else if(this.options.routeMasks){const s=zz(i.pathname,this.processedTree);if(s){const a=Object.assign(Object.create(null),s.rawParams),{from:u,params:c,...f}=s.route,h=J5(c,a);i.maskedLocation=r({from:n.from,...f,params:h})}}return i},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...i})=>{let s;const a=Di(this.latestLocation.href)===Di(i.href)&&Ns(X5(i.state),X5(this.latestLocation.state)),u=this._commitPromise;let c;const f=new Promise(h=>{c=h});if(f.resolve=()=>{c(),u?.resolve()},this._commitPromise=f,a)this.load();else{let{maskedLocation:h,hashScrollIntoView:m,...g}=i;h&&(g={...h,state:{...h.state,__tempKey:void 0,__tempLocation:{...g,search:g.searchStr,state:{...g.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(g.unmaskOnReload??this.options.unmaskOnReload??!1)&&(g.state.__tempKey=this.tempLocationKey)),g.state.__hashScrollIntoViewOptions=m??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,s=i.replace?"REPLACE":"PUSH",this.history[s==="REPLACE"?"replace":"push"](g.publicHref,g.state,{ignoreBlocker:r}),this.history.subscribers.size||this.load({action:{type:s}})}return this._scroll.next=i.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:i,viewTransition:s,ignoreBlocker:a,...u}={})=>{const c=this.buildLocation({...u,_includeValidateSearch:!0});this._pendingLocation=c;const f=this.commitLocation({...c,viewTransition:s,replace:n,resetScroll:r,hashScrollIntoView:i,ignoreBlocker:a});return queueMicrotask(()=>{this._pendingLocation===c&&(this._pendingLocation=void 0)}),f},this.navigate=async({to:n,reloadDocument:r,href:i,publicHref:s,...a})=>{let u=!1;if(i)try{new URL(`${i}`),u=!0}catch{}if(u&&!r&&(r=!0),r){if(n!==void 0||!i){const f=this.buildLocation({to:n,...a});i=i??f.publicHref,s=s??f.publicHref}const c=!u&&s?s:i;if(Wh(c,this.protocolAllowlist))return;if(!a.ignoreBlocker){const f=this.history.getBlockers?.()??[];for(const h of f)if(h?.blockerFn&&await h.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}a.replace?window.location.replace(c):window.location.href=c;return}return this.buildAndCommitLocation({...a,href:i,to:n,_isNavigate:!0})},this.load=async n=>{this.updateLatestLocation(),n?.action&&(this._scroll.hash=n.action.type==="PUSH"||n.action.type==="REPLACE"),await SL(this,n)},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document.startViewTransition=="function"){let i;if(typeof r=="object"&&window.CSS?.supports?.("selector(:active-view-transition-type(a))")){const s=this.latestLocation,a=this.stores.resolvedLocation.get(),u=typeof r.types=="function"?r.types(pm(s,a)):r.types;if(u===!1)return n();i={update:n,types:u}}else i=n;return document.startViewTransition(i).updateCallbackDone}return n()},this.invalidate=n=>{const r=this._committed,i=n?.filter,s=this._preloads,a=new Set([...r,...this._cache.values(),...[...s?.values()??[]].flat(),...this._tx?.[3]??[]].filter(f=>!i||i(f)).map(f=>f.id)),u=[];for(const[f,h]of s??[])h.some(m=>a.has(m.id))&&(s.delete(f),u.push(f));const c=f=>{if(a.has(f.id)){const h=this.routesById[f.routeId],m={...f,invalid:!0,...(n?.forcePending||f.status==="error"||f.status==="notFound")&&Y5(h)?{status:"pending",error:void 0}:void 0};return f._flight=void 0,m}return f};this._committed=r.map(c);for(const[f,h]of this._cache)a.has(f)&&(h.invalid=!0,n?.forcePending&&(h.status="pending"));for(const f of a)this._flights?.delete(f);for(const f of u)f.abort();return this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.resolveRedirect=n=>{const r=n.headers.get("Location");if(n.options.href){if(r)try{const i=new URL(r);if(this.origin&&i.origin===this.origin){const s=i.pathname+i.search+i.hash;n.options.href=s,n.headers.set("Location",s)}}catch{}}else{const i=this.buildLocation(n.options).publicHref||"/";n.options.href=i,n.headers.set("Location",i)}if(n.options.href&&Wh(n.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=this._cache,i=this._preloads,s=n?.filter,a=[],u=[];for(const[f,h]of r)(!s||s(h))&&(u.push(f),a.push(h));const c=[];for(const[f,h]of i??[])(!s||h.some(s))&&(c.push(f),a.push(...h));for(const f of u)r.delete(f);for(const f of c)i.delete(f);for(const f of a){const h=f._flight;f._flight=void 0,h&&!--h[2]&&(this._flights?.get(f.id)===h&&this._flights.delete(f.id),c.push(h[1]))}for(const f of c)f.abort()},this.loadRouteChunk=vl,this.preloadRoute=n=>wL(this,n),this.matchRoute=(n,r)=>{const i={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},s=this.buildLocation(i),a=this.stores.status.get()==="pending";if(r?.pending&&!a)return!1;const u=r?.pending??!a?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),c=Lz(s.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,u.pathname,this.processedTree);return!c||n.params&&!Ns(c.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?Ns(u.search,s.search,{partial:!0})?c.rawParams:!1:c.rawParams},this.getStoreConfig=e,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??iL,parseSearch:t.parseSearch??rL,protocolAllowlist:t.protocolAllowlist??Mz}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes({routesById:t,routesByPath:e,processedTree:n}){this.routesById=t,this.routesByPath=e,this.processedTree=n;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(t){let e=this.routeBranchCache.get(t);return e||(e=ZS(t),this.routeBranchCache.set(t,e)),e}matchRoutesInternal(t,e){const[n,r,i]=this.getMatchedRoutes(t.pathname);let s=n,a=!1;(i?i.path!=="/"&&r["**"]:Di(t.pathname))&&(this.options.notFoundRoute?s=[...s,this.options.notFoundRoute]:a=!0);const u=a?bL(this.options.notFoundMode,s):void 0,c=new Array(s.length),f=this._committed,h=(g,b)=>{const x=f[b];return x?.routeId===g.id?x:g===this.options.notFoundRoute?f.find(k=>k.routeId===g.id):void 0};let m;for(let g=0;g<s.length;g++){const b=s[g],x=c[g-1];let k,E,D;{const Z=x?.search??t.search,F=x?._strictSearch??void 0;try{const te=Oh(b.options.validateSearch,{...Z})??void 0;k={...Z,...te},E={...F,...te}}catch(te){let P=te;if(te instanceof Jh||(P=new Jh(te.message,{cause:te})),e?.throwOnError)throw P;k=Z,E={},D=P}}let T="",$="";try{T=b.options.loaderDeps?.({search:k})??"",$=T&&JSON.stringify(T)||""}catch(Z){if(e?.throwOnError)throw Z;D??=Z}const{interpolatedPath:A,usedParams:B}=V5({path:b.fullPath,params:r,decoder:this.pathParamsDecoder,server:this.isServer}),R=b.id+A+$,M=h(b,g),O=this._cache.get(R)??(M?.id===R?M:void 0);m=O?._strictParams??Object.assign(B,m);let j;if(!O)try{Z5(b,m)}catch(Z){if(Tl(Z)||sw(Z)?j=Z:j=new mL(Z.message,{cause:Z}),e?.throwOnError)throw j}const q=M?"stay":"enter";let X;if(O)X={...O,cause:q,search:So(M?M.search:O.search,k),_strictSearch:E,searchError:D};else{const Z=Y5(b)?"pending":"success";X={id:R,ssr:b.options.ssr,index:g,routeId:b.id,params:M?.params??m,_strictParams:m,pathname:A,updatedAt:Date.now(),search:M?So(M.search,k):k,_strictSearch:E,searchError:D,status:Z,isFetching:!1,error:void 0,paramsError:j,context:{},abortController:e?._controller??new AbortController,cause:q,loaderDeps:M?Ro(M.loaderDeps,T):T,invalid:!1,preload:!1,staticData:b.options.staticData||{},fullPath:b.fullPath}}const G=u===b.id;X._notFound&&!G&&(X.error=void 0),X._notFound=G,c[g]=X}for(let g=0;g<c.length;g++){const b=c[g];b.params=b.cause==="stay"?So(b.params,m):m,e?._controller&&(b.context={})}return c}matchRoutesLightweight(t){const e=Ic(this.stores.ids.get()),n=e?this.stores.byRoute.get(e).get():void 0,r=n?.id,i=this.lightweightCache.get(t);if(i&&i[0]===r)return i[1];const[s,a]=this.getMatchedRoutes(t.pathname),u=Ic(s),c={...t.search};for(const g of s)try{Object.assign(c,Oh(g.options.validateSearch,c))}catch{}const f=n&&n.routeId===u.id&&n.pathname===t.pathname;let h;if(f)h=n.params;else{const g=Object.assign(Object.create(null),a);for(const b of s)try{Z5(b,g)}catch{}h=g}const m=[s,u.fullPath,c,h];return this.lightweightCache.set(t,[r,m]),m}},Jh=class extends Error{},mL=class extends Error{};function Oh(t,e){if(t==null)return{};if("~standard"in t){const n=t["~standard"].validate(e);if(n instanceof Promise)throw new Jh("Async validation not supported");if(n.issues)throw new Jh(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in t?t.parse(e):typeof t=="function"?t(e):{}}function gL(t,e,n,r){const i=[];for(const a of n){const u=a.options;if("search"in u)u.search?.middlewares&&i.push(...u.search.middlewares);else if(u.preSearchFilters||u.postSearchFilters){const f=({search:h,next:m})=>{const g=m(u.preSearchFilters?u.preSearchFilters.reduce((b,x)=>x(b),h):h);return u.postSearchFilters?u.postSearchFilters.reduce((b,x)=>x(b),g):g};i.push(f)}const c=u.validateSearch;if(r&&c){const f=({search:h,next:m,meta:g})=>{const b=m(h);try{const x=Oh(c,b);if(g&&x)for(const k in x)k in b||(g.defaulted||=new Map).set(k,x[k]);return{...b,...x}}catch{}return b};i.push(f)}}const s=(a,u,c)=>{if(a>=i.length){if(!e.search)return{};if(e.search===!0)return u;const h=$l(e.search,u);return c&&(c.explicit=h),h}const f=(h,m)=>{if(m){const g=c||{};return{search:s(a+1,h,g),meta:g}}return s(a+1,h,c)};return i[a]({search:u,next:f,meta:c})};return s(0,t)}function bL(t,e){if(t!=="root"){let n;for(let r=e.length-1;r>=0;r--){const i=e[r];if(i.options.notFoundComponent)return i.id;n||=i.children&&i.id}if(n)return n}return xl}function J5(t,e){if(t===!1||t===null)return Object.create(null);if((t??!0)===!0)return e;const n=Object.assign(Object.create(null),e);return Object.assign(n,$l(t,n))}function Z5(t,e){const n=t.options.params?.parse??t.options.parseParams;n&&Object.assign(e,n(e))}function jy(t,e){return t.options[e]?.preload?.()}function yL(t,e){const n=jy(t,"component");let r=jy(t,"pendingComponent");return e&&(r?r=r.then(e):e()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function vl(t,e,n){const r=()=>e===!1?void 0:e?jy(t,e):yL(t,n),i=t._lazy;if(i)return i===!0?r():i.then(r);if(!t.lazyFn)return r();const s=t.lazyFn().then(a=>{{const{id:u,...c}=a.options;Object.assign(t.options,c),t._lazy=!0}},a=>{throw t._lazy=void 0,a});return t._lazy=s,s.then(r)}function g3(t){const e=t.findIndex(n=>n.status!=="success"||n._notFound)+1;return e&&e<t.length?t.slice(0,e):t}const qr=0,Bi=1,mm=2,Qn=3,Fs=[4];function jc(t){return typeof t[0]=="number"}function la(t,e){return e.aborted?Promise.race([Promise.reject(e),t]):new Promise((n,r)=>{const i=()=>r(e);e.addEventListener("abort",i,{once:!0}),Promise.resolve(t).then(n,r).finally(()=>e.removeEventListener("abort",i))})}function ua(t,e){return t.routesById[e.routeId]}function Fc(t,e,n){return sw(t)?[Qn,t]:Tl(t)?(t.routeId||=n,[mm,t]):e?(typeof t?.then=="function"&&(t=new Error("A Promise was thrown",{cause:t})),[Bi,t]):[qr,t]}function b3(t,e){let n=Fc(e,!0,t.id);if(n[0]!==Bi)return n;try{t.options.onError?.(n[1])}catch(r){n=Fc(r,!0,t.id)}return n}function bc(t,e,n,r,i){return i[0].signal.aborted?Fs:v3(t,e,n,b3(n,r),i)}async function xL(t,e,n,r,i,s){const[a,u]=e,c=n[0].signal,f=!!n[3];for(let h=n[6]??0;h<r;h++){const m=u[h],g=ua(t,m);m.abortController=n[0];const b=u[h-1]?.context??t.options.context??{},x={params:m.params,location:a,navigate:T=>t.navigate({...T,_fromLocation:a}),buildLocation:t.buildLocation,cause:f?"preload":m.cause,abortController:n[0],preload:f,matches:u,routeId:g.id};try{const T=m._ctx||=g.options.context?g.options.context({...x,deps:m.loaderDeps,context:b})||{}:void 0;m.context={...b,...T}}catch(T){return wi(t,m),[h,bc(t,e,g,T,n)]}if(c.aborted)return[h,Fs];const k=m.paramsError??m.searchError;if(k!==void 0)return wi(t,m),[h,bc(t,e,g,k,n)];const E=g.options.beforeLoad;if(!E)continue;const D=m.status;h>=s&&(m.status="pending",n[7]?.());try{Kc(t,m,"beforeLoad",n[0]);const T=await la(E({...x,search:m.search,context:m.context,...t.options.additionalContext}),c);if(c.aborted)return[h,Fs];const $=v3(t,e,g,Fc(T,!1,g.id),n);if($[0]!==qr)return wi(t,m),[h,$];m.context={...m.context,...T}}catch(T){return wi(t,m),[h,bc(t,e,g,T,n)]}finally{m.status=D,Kc(t,m,!1,n[0])}}i()}function y3(t,e,n){if(!(!n||--n[2])){if(t._flights?.get(e.id)===n){const r=t._tx;if(r&&!r[0].signal.aborted&&!r[3].includes(e)&&r[3].some(i=>i.id===e.id)&&r[3].some(i=>i.isFetching==="beforeLoad"))return;t._flights.delete(e.id)}return n[1]}}function wi(t,e){const n=e._flight;e._flight=void 0,y3(t,e,n)?.abort()}function zn(t,e,n,r){const i=[];for(const s of e)if(!n?.includes(s)){const a=s._flight;if(s._flight=void 0,r&&a?.[2]===1&&t._flights?.get(s.id)===a&&n?.some(u=>u.id===s.id))a[2]=0;else{const u=y3(t,s,a);u&&i.push(u)}}for(const s of i)s.abort()}function x3(t){for(const e of t){const n=e._flight;n&&n[2]++}}function Kc(t,e,n,r){if(e.isFetching=n,r&&t._tx?.[0]!==r)return;const i=t.stores.byRoute.get(e.routeId),s=i?.get();s?.id===e.id&&i.set({...s,isFetching:n})}function aw(t,e,n,r,i,s,a){const u=e[0];return{params:n.params,location:u,navigate:c=>t.navigate({...c,_fromLocation:u}),cause:a?"preload":n.cause,abortController:i,preload:a,deps:n.loaderDeps,parentMatchPromise:s,context:n.context,route:r,...t.options.additionalContext}}async function eC(t,e,n,r,i,s,a){const u=a[0],c=u.signal;if(c.aborted)return Fs;if(!i)return[qr,void 0];let f=n._flight;Kc(t,n,"loader",u);try{if(!f){const h=new AbortController;f=[Promise.resolve().then(()=>i(aw(t,e,n,r,h,s,!!a[3]))).then(m=>Fc(m,!1,r.id),m=>Fc(m,!0,r.id)).then(m=>(m[0]!==qr&&t._flights?.get(n.id)===f&&(t._flights.delete(n.id),f[2]||h.abort()),m[0]===Bi&&f[2]?b3(r,m[1]):m)),h,1],(t._flights??=new Map).set(n.id,f)}return n._flight=f,n.abortController=f[1],v3(t,e,r,await la(f[0],c),a)}catch(h){if(h!==c||!c.aborted)throw h;return wi(t,n),Fs}finally{Kc(t,n,!1,u)}}function tC(t,e,n){e[0]!==Qn&&(t.status="success",t.error=void 0,e[0]===qr?(t.loaderData=e[1],t.invalid=!1,t.updatedAt=Date.now(),t.preload=n):t.invalid=!0)}function vL(t,e,n){const r=t._cache.get(e.id);if(r!==n||t._committed.some(s=>s.id===e.id&&s._flight===e._flight))return;const i={...e,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,t._cache.set(e.id,i),r&&wi(t,r)}function nC(t,e){return e[0]===Bi||e[0]===mm?{...t,status:e[0]===Bi?"error":"notFound",error:e[1],_flight:void 0}:t}function kL(t,e,n,r,i,s,a){const u=e[1][n],c=ua(t,u),f=!!s[3],h=t._cache.get(u.id);let m,g=!1,b;try{if(u.status==="success"&&(m=c.options.shouldReload,typeof m=="function"&&(m=m(aw(t,e,u,c,s[0],i,f))),s[0].signal.aborted&&(b=Fs)),!b)if(u.status!=="success")g=!0;else{const G=f||u.preload?c.options.preloadStaleTime??t.options.defaultPreloadStaleTime??3e4:c.options.staleTime??t.options.defaultStaleTime??0;g=!!(u.invalid||m||m===void 0&&Date.now()-u.updatedAt>=G&&(s[5]||u.cause==="enter"||s[2].some(Z=>Z.routeId===u.routeId&&Z.id!==u.id)))}}catch(G){u.invalid=!0,wi(t,u),b=bc(t,e,c,G,s)}const x=c.options.loader,k=typeof x=="function",E=k?x:x?.handler,D=!f||c.options.preload!==!1;let T=D&&x?t._flights?.get(u.id):void 0;T===u._flight||b?T=void 0:T&&!g&&!f&&m===void 0?g=!0:g||(T=void 0);const $=!!(x&&g&&u.status==="success"&&!f&&!s[4]&&((k?void 0:x.staleReloadMode)??t.options.defaultStaleReloadMode)!=="blocking"),A=g&&D,B=A&&!$&&(u.status!=="success"||!!x),R=n>=a?s[7]:void 0,M=c.lazyFn&&c._lazy!==!0?R:void 0;if(A&&!x&&(u.invalid=!1,u.updatedAt=Date.now()),T&&T[2]++,B){const G=u._flight;u._flight=T,y3(t,u,G)?.abort(),n>=a&&(u.status="pending"),R?.()}A||(u.isFetching=!1);const O=(b?Promise.resolve(b):B?eC(t,e,u,c,E,i,s):Promise.resolve([qr,u.loaderData])).then(G=>(B&&(tC(u,G,f),G[0]===qr&&(x&&!s[0].signal.aborted&&vL(t,u,h),n>=a&&(u.status="pending"))),G)),j=la(Promise.resolve().then(()=>vl(c,void 0,M)),s[0].signal).then(()=>{},G=>e[1].some((Z,F)=>F<=n&&(Z.status==="error"||Z.status==="notFound"||Z._notFound))?void 0:[n,bc(t,e,c,G,s)]).then(G=>O.then(Z=>(B&&!G&&Z[0]===qr&&u.status==="pending"&&!s[0].signal.aborted&&(u.status="success",R?.()),G)));if(r.push([n,O,j]),!$)return O.then(G=>nC(u,G));const q={...u,status:"pending",preload:!1,_flight:T};u.invalid=!1,u.isFetching="loader";const X=eC(t,e,q,c,E,i,s).then(G=>(u.isFetching=!1,tC(q,G,!1),G));return(e[2]??=[]).push([n,X,j,q]),X.then(G=>nC(q,G))}async function Fy(t,e,n,r,i=0){const s=n?.[1][1];let a=s?.routeId?e.findIndex(u=>u.routeId===s.routeId):n?.[0]??e.length-1;a<0&&(a=0);for(let u=a;u>=0;u--){const c=ua(t,e[u]);try{const f=vl(c,!1);f&&await la(f,r)}catch(f){if(f===r&&r.aborted)throw f}if(c.options.notFoundComponent)return u}return s?.routeId?a:i}function Vo(t,e){e[2]&&(zn(t,e[2].map(n=>n[3])),e[2]=void 0)}async function rC(t,e,n,r){let i;try{await Promise.all(t.map(s=>s[1].then(async a=>{const u=s[0];if(!(r&&u>=await r)){if(a[0]>=Qn)throw[u,a];!i&&a[0]!==qr&&(i=[u,a],await Promise.all((n??[]).map(c=>{if(!(c[0]<=u))return c[1].then(f=>{if(f[0]===Qn)throw[c[0],f]})})))}})))}catch(s){return s}return e??i}function v3(t,e,n,r,i,s){for(;r[0]===Qn;){const a=r[1],u=a.options;if(u.reloadDocument?i[3]:i[1]>=20)return r;try{return u.href&&u.reloadDocument?(t.resolveRedirect(a),r):[Qn,a,t.buildLocation({...u,_fromLocation:e[0],_includeValidateSearch:!0})]}catch(c){r=s?[Bi,c]:b3(n,c),s=!0}}return r}async function lw(t,e,n,r,i,s){const a=e[1];let u=await i,c=!1;const f=a.findIndex(b=>b._notFound),h=b=>b[1][0]===mm?Fy(t,a,b,r.signal):b[0];let m=f<0?a.length:f;if((u?.[1][0]??0)>=Qn)m=0;else if(u){m=u[2]??=await h(u);for(const b of n){if(b[0]>=m)break;const x=await b[1];if(x[0]!==qr&&x[0]<Qn&&!("loaderData"in a[b[0]])){u=[b[0],x],m=u[2]=await h(u);break}}}for(const b of n){if(b[0]>=m)break;const x=await b[2];if(x){u=x;break}}if((u?.[1][0]??0)>=Qn){const b=u[1];if(b[0]!==Qn||b[1].options.reloadDocument||b[2])return Vo(t,e),b;c=!0,u=[0,[Bi,new Error("Too many redirects")]]}const g=u?u[2]??await h(u):f;if(g>=0){const b=u?.[1],x=b?.[0],k=a[g],E=b?.[1],D=()=>{b&&(k._notFound=void 0,x===Bi?k.status="error":(E.routeId=k.routeId,k.routeId===t.routeTree.id?(k.status="success",k._notFound=!0):k.status="notFound"),k.error=E,k.isFetching=!1)};D(),b||s?.();const T=ua(t,k);try{await la(b?Promise.resolve().then(()=>vl(T,x===Bi?"errorComponent":"notFoundComponent")):Promise.all([vl(T),vl(T,"notFoundComponent")]),r.signal)}catch($){if($===r.signal&&r.signal.aborted)return Vo(t,e),Fs}b?c&&(r.abort(),await Promise.all([...n.map($=>$[1]),...n.map($=>$[2]),...(e[2]??[]).map($=>$[1])]),Vo(t,e),zn(t,a),D()):k.status="success"}return e}async function uw(t,e,n,r=0,i=e[1].length){const s=e[1];for(let a=r;a<i;a++){const u=s[a],c=ua(t,u).options;if(c.head||c.scripts)try{const f={ssr:t.options.ssr,matches:s,match:u,params:u.params,loaderData:u.loaderData},[h,m]=await la(Promise.all([c.head?.(f),c.scripts?.(f)]),n);u.meta=h?.meta,u.links=h?.links,u.headScripts=h?.scripts,u.styles=h?.styles,u.scripts=m}catch(f){if(f===n&&n.aborted)break;console.error(f)}if(u.status!=="success"||u._notFound)break}return e}async function cw(t,e,n,r){const i=[e,n],s=r[0].signal;let a;try{const u=t.stores.matches.get();let c=n.findIndex(D=>D._notFound);if(t.options.notFoundMode!=="root"&&c>=0){const D=await Fy(t,n,void 0,s,c);n[c]._notFound=void 0,n[D]._notFound=!0,c=D}let f=c<0?n.length:c+1,h=0;for(;h<f&&h!==c;){const D=n[h],T=r[2][h],$=u[h];if(T?.id!==D.id||T.status!=="success"||T._notFound||D.preload||$?.id!==D.id||$.status!=="success"||$._notFound)break;h++}const m=[],g=r[6]??0;let b=g?Promise.resolve(n[g-1]):void 0;const x=()=>{for(let D=g;D<f&&!s.aborted;D++)b=kL(t,i,D,m,b,r,h)},k=await xL(t,i,r,f,x,h);if(k){if(r[4]=!0,f=k[0],k[1][0]===mm){const D=await Fy(t,n,k,s);k[2]=D,f=Math.min(f,D+1)}else k[1][0]>=Qn&&(f=0);x()}if(!s.aborted&&!r[3]){const D=[];for(const[T,$]of t._flights??[])$[2]||(t._flights.delete(T),D.push($[1]));for(const T of D)T.abort()}const E=lw(t,i,m,r[0],rC(m,k,i[2]),r[7]);i[2]?.length&&(i[3]=rC(i[2],void 0,void 0,E.then(D=>jc(D)?0:g3(n).length,()=>0))),a=await E}catch(u){if(Vo(t,i),u===s&&s.aborted)return Fs;throw u}return jc(a)?a:uw(t,a,s,r[6]===n.length?r[6]:0)}function Ky(t,e){if(t._tx!==e)return;const n=e[3],r=t.stores.matches.get();let i=t._pending;for(let s=0;s<n.length;s++){const a=n[s],u=a.status==="success"&&!a._notFound,c=r[s]?.id===a.id&&r[s]?.status==="pending";if(u&&!c)continue;const f=ua(t,a),h=u||a.invalid?0:f.options.pendingMs??t.options.defaultPendingMs,m=f.options.pendingComponent??t.options.defaultPendingComponent;if(!m||typeof h!="number"||h===1/0){i&&(i[0]=e,i[2]=0,i[4]=!0);return}const g=f.options.pendingMinMs??t.options.defaultPendingMinMs??0;let b=!1;if(i?.[1]===a.id?(b=i[0]!==e,i[0]=e):(clearTimeout(i?.[3]),t._pending=i=void 0),i||(t._pending=i=[e,a.id,c?Date.now()+g:e[4]+h,void 0,c||void 0,m]),i[4]&&!b&&i[5]===m)return;if(i[5]=m,!i[4]){clearTimeout(i[3]);const E=i[2]-Date.now();if(E>0){i[3]=setTimeout(()=>Ky(t,e),E);return}i[2]=0}const x=n.map(E=>({...E,_flight:void 0}));x[s].status="pending";const k=i[4]=t.startTransition(()=>t.stores.setMatches(x),x).then(E=>(E&&t._pending===i&&i[4]===k&&!i[2]&&(i[2]=Date.now()+g),E));return}}function Qu(t,e){const n=t._pending;(t._tx===e||!t._tx?.[3].some(r=>r.id===n?.[1]))&&(clearTimeout(n?.[3]),t._pending=void 0)}async function iC(t,e){const n=t._pending;if(!n)return;clearTimeout(n[3]);const r=n[2]-Date.now();if(!n[4]||r<=0||!g3(e[3]).some(s=>s.id===n[1]))return;let i;try{await la(new Promise(s=>{i=setTimeout(s,r)}),e[0].signal)}catch{}clearTimeout(i)}function dw(t,e){t._committed=e,t.stores.setMatches(e)}function CL(t,e,n,r){const i=t._committed,s=t._cache;for(const c of n)c.preload=!1,r&&(c._assetEnd=void 0);const a=g3(n).length,u=new Map;{const c=Date.now();for(const f of[...i,...s.values()]){if(f.status!=="success"||n.some((m,g)=>m.id===f.id&&(g<a||m.status==="success")))continue;const h=ua(t,f);!h.options.loader||c-f.updatedAt>=(f.preload?h.options.preloadGcTime??t.options.defaultPreloadGcTime??3e5:h.options.gcTime??t.options.defaultGcTime??3e5)||u.set(f.id,s.get(f.id)===f?f:{...f,_flight:void 0,isFetching:!1,context:{}})}}e[3]=[],t._cache=u,dw(t,n),zn(t,[...s.values(),...i],[...n,...u.values()]),hL(t,i,n,e)}async function eh(t,e){let n=t._tx;for(;n&&n!==e;){if(await n[5],t._tx===n)return;n=t._tx}}function fw(t,e,n){const r=n[1].options,i=n[2];if(!i)return t.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return t.navigate({href:i.publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});i._redirects=e[1]+1,t._pendingLocation=i;const s=t.commitLocation({...i,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{t._pendingLocation===i&&(t._pendingLocation=void 0)}),s}async function EL(t,e,n,r,i){const s=n.map(c=>({...c}));x3(s);for(const c of r)wi(t,s[c[0]]),s[c[0]]=c[3];const a=[e[2],s];let u;try{u=await lw(t,a,r,e[0],i)}catch(c){throw zn(t,s),c}if(jc(u)){zn(t,s),u[0]===Qn&&t._tx===e&&t._committed===n&&await fw(t,e,u);return}if(await uw(t,u,e[0].signal),t._tx!==e||t._committed!==n){zn(t,s);return}for(const c of s){const f=t._cache.get(c.id);f?._flight&&f._flight===c._flight&&(t._cache.delete(c.id),wi(t,f))}dw(t,s),zn(t,n,s)}async function DL(t,e,n,r,i,s){const a=await cw(t,e[2],e[3],[e[0],e[1],t._committed,void 0,i,n,s,r]);if(jc(a)){const m=a[0]===Qn&&t._tx===e;if((!m||a[1].options.reloadDocument)&&Qu(t,e),zn(t,e[3]),e[3]=[],!m)return;if(t._tx!==e){Qu(t,e);return}await fw(t,e,a);return}const u=a[1];if(t._tx===e&&await iC(t,e),t._tx!==e){Qu(t,e),zn(t,u),Vo(t,a);return}const c=e[2],f=pm(c,t.stores.resolvedLocation.get()),h=a[2];await t.startViewTransition(async()=>{if(t._tx===e&&await iC(t,e),t._tx!==e){Qu(t,e),zn(t,u),Vo(t,a);return}const m=()=>{Qu(t,e),CL(t,e,u,s),t._tx===e&&(t.emit({type:"onLoad",...f}),t._tx===e&&t.emit({type:"onBeforeRouteMount",...f}))},g=await t.startTransition(m,u);if(t._tx!==e){Vo(t,a);return}h?.length&&EL(t,e,u,h,a[3]).catch(console.error),t.batch(()=>{t.stores.resolvedLocation.set(c),t.stores.status.set("idle"),t._tx===e&&t.emit({type:"onResolved",...f}),g&&t._tx===e&&t.emit({type:"onRendered",...f})}),t._tx===e&&(t._commitPromise?.resolve(),t._commitPromise=void 0)})}async function SL(t,e){const n=t._tx,r=t.stores.resolvedLocation.get(),i=r??t.stores.location.get(),s=t.latestLocation,a=t._pendingLocation,u=a?.href===s.href?a._redirects??0:0,c=t._handoff,f=c?.[0](),h=new AbortController,m=t._preflight;if(t._preflight=h,f||c?.[1](),m?.abort(),!h.signal.aborted){const A=pm(s,r);t.emit({type:"onBeforeNavigate",...A}),h.signal.aborted||t.emit({type:"onBeforeLoad",...A})}if(h.signal.aborted){await eh(t,n);return}const g=i.href===s.href;let b=h;const x=t.matchRoutes(s,{_controller:h});x3(x);const k=f?c[1](x):void 0;if(k?b=f:f?.abort(),h.signal.aborted){zn(t,x),await eh(t,n);return}t._preflight=void 0;let E;const D=()=>DL(t,$,g,()=>Ky(t,$),e?.sync,k),T=e?.sync?new Promise(A=>E=A):Promise.resolve().then(D).then(),$=[b,u,s,x,Date.now(),T];if(t._tx=$,n){for(const A of t.stores.matches.get()){if(t._tx!==$)break;A.isFetching&&Kc(t,A,!1)}n[0].abort(),zn(t,n[3],$[3],!0)}if(t._tx!==$){zn(t,$[3]),$[3]=[],E?.(),await eh(t,$);return}t.batch(()=>{t.stores.status.set("pending"),t.stores.location.set(s)}),(k||!t._committed.length&&x[0]?.status!=="success"&&!x.some(A=>A._notFound))&&Ky(t,$),E?.(D()),await T,await eh(t,$)}async function wL(t,e){let n=t.buildLocation(e);for(let r=0;;r++){const i=t._committed,s=new AbortController;let a,u,c;try{try{a=t.matchRoutes(n,{_controller:s}),x3(a),u=(t._preloads??=new Map).set(s,a),c=await cw(t,n,a,[s,r,i,!0])}finally{u&&(u=u.delete(s),zn(t,a)),s.abort()}if(!jc(c))return c[1];if(!u||c.length<3)return;n=c[2]}catch(f){Tl(f)||console.error(f);return}}}const $L="Error preloading route! ☝️";var hw=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(t){if(this.init=e=>{this.originalIndex=e.originalIndex;const n=this.options,r=!n?.path&&!n?.id;this.parentRoute=this.options.getParentRoute?.(),r?this._path=xl:this.parentRoute||h3();let i=r?xl:n?.path;i&&i!=="/"&&(i=ew(i));const s=n?.id||i;let a=r?xl:Mh([this.parentRoute.id==="__root__"?"":this.parentRoute.id,s]);i==="__root__"&&(i="/"),a!=="__root__"&&(a=Mh(["/",a]));const u=a==="__root__"?"/":Mh([this.parentRoute.fullPath,i]);this._path=i,this._id=a,this._fullPath=u,this._to=Di(u)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e=="object"&&e!==null&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>iw({from:this.fullPath,...e}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},TL=class{constructor({id:t}){this.notFound=e=>nw({routeId:this.id,...e}),this.redirect=e=>iw({from:this.id,...e}),this.id=t}},AL=class extends hw{constructor(t){super(t)}},k3=class extends S.Component{constructor(...t){super(...t),this.state={error:null},this.reset=()=>{this.setState({error:null})}}static getDerivedStateFromProps(t,e){const n=t.getResetKey();return e.error&&e.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,e){this.props.onCatch?.(t,e)}render(){const t=this.state.error;return t?S.createElement(this.props.errorComponent??BL,{error:t,reset:this.reset}):this.props.children}};function BL({error:t}){const[e,n]=S.useState(!1);return C.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[C.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[C.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),C.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:e?"Hide Error":"Show Error"})]}),C.jsx("div",{style:{height:".25rem"}}),e?C.jsx("div",{children:C.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?C.jsx("code",{children:t.message}):null})}):null]})}function ML({children:t,fallback:e=null}){return C.jsx(V.Fragment,{children:pw()?t:e})}function pw(){return V.useSyncExternalStore(NL,()=>!0,()=>!1)}function NL(){return()=>{}}var mw=S.createContext(null);function In(t){return S.useContext(mw)}var gm=S.createContext(void 0),RL=S.createContext(void 0),ht=(t=>(t[t.None=0]="None",t[t.Mutable=1]="Mutable",t[t.Watching=2]="Watching",t[t.RecursedCheck=4]="RecursedCheck",t[t.Recursed=8]="Recursed",t[t.Dirty=16]="Dirty",t[t.Pending=32]="Pending",t))(ht||{});function OL({update:t,notify:e,unwatched:n}){return{link:r,unlink:i,propagate:s,checkDirty:a,shallowPropagate:u};function r(f,h,m){const g=h.depsTail;if(g!==void 0&&g.dep===f)return;const b=g!==void 0?g.nextDep:h.deps;if(b!==void 0&&b.dep===f){b.version=m,h.depsTail=b;return}const x=f.subsTail;if(x!==void 0&&x.version===m&&x.sub===h)return;const k=h.depsTail=f.subsTail={version:m,dep:f,sub:h,prevDep:g,nextDep:b,prevSub:x,nextSub:void 0};b!==void 0&&(b.prevDep=k),g!==void 0?g.nextDep=k:h.deps=k,x!==void 0?x.nextSub=k:f.subs=k}function i(f,h=f.sub){const m=f.dep,g=f.prevDep,b=f.nextDep,x=f.nextSub,k=f.prevSub;return b!==void 0?b.prevDep=g:h.depsTail=g,g!==void 0?g.nextDep=b:h.deps=b,x!==void 0?x.prevSub=k:m.subsTail=k,k!==void 0?k.nextSub=x:(m.subs=x)===void 0&&n(m),b}function s(f){let h=f.nextSub,m;e:do{const g=f.sub;let b=g.flags;if(b&60?b&12?b&4?!(b&48)&&c(f,g)?(g.flags=b|40,b&=1):b=0:g.flags=b&-9|32:b=0:g.flags=b|32,b&2&&e(g),b&1){const x=g.subs;if(x!==void 0){const k=(f=x).nextSub;k!==void 0&&(m={value:h,prev:m},h=k);continue}}if((f=h)!==void 0){h=f.nextSub;continue}for(;m!==void 0;)if(f=m.value,m=m.prev,f!==void 0){h=f.nextSub;continue e}break}while(!0)}function a(f,h){let m,g=0,b=!1;e:do{const x=f.dep,k=x.flags;if(h.flags&16)b=!0;else if((k&17)===17){if(t(x)){const E=x.subs;E.nextSub!==void 0&&u(E),b=!0}}else if((k&33)===33){(f.nextSub!==void 0||f.prevSub!==void 0)&&(m={value:f,prev:m}),f=x.deps,h=x,++g;continue}if(!b){const E=f.nextDep;if(E!==void 0){f=E;continue}}for(;g--;){const E=h.subs,D=E.nextSub!==void 0;if(D?(f=m.value,m=m.prev):f=E,b){if(t(h)){D&&u(E),h=f.sub;continue}b=!1}else h.flags&=-33;h=f.sub;const T=f.nextDep;if(T!==void 0){f=T;continue e}}return b}while(!0)}function u(f){do{const h=f.sub,m=h.flags;(m&48)===32&&(h.flags=m|16,(m&6)===2&&e(h))}while((f=f.nextSub)!==void 0)}function c(f,h){let m=h.depsTail;for(;m!==void 0;){if(m===f)return!0;m=m.prevDep}return!1}}function PL(t,e,n){const r=typeof t=="object",i=r?t:void 0;return{next:(r?t.next:t)?.bind(i),error:(r?t.error:e)?.bind(i),complete:(r?t.complete:n)?.bind(i)}}const _y=[];let Ph=0;const{link:sC,unlink:zL,propagate:LL,checkDirty:gw,shallowPropagate:oC}=OL({update(t){return t._update()},notify(t){_y[Vy++]=t,t.flags&=~ht.Watching},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=ht.Mutable|ht.Dirty,Zh(t))}});let th=0,Vy=0,Vr,Hy=0;function IL(t){try{++Hy,t()}finally{--Hy||bw()}}function Zh(t){const e=t.depsTail;let n=e!==void 0?e.nextDep:t.deps;for(;n!==void 0;)n=zL(n,t)}function bw(){if(!(Hy>0)){for(;th<Vy;){const t=_y[th];_y[th++]=void 0,t.notify()}th=0,Vy=0}}function aC(t,e){const n=typeof t=="function",r=t,i={_snapshot:n?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?ht.None:ht.Mutable,get(){return Vr!==void 0&&sC(i,Vr,Ph),i._snapshot},subscribe(s){const a=PL(s),u={current:!1},c=jL(()=>{i.get(),u.current?a.next?.(i._snapshot):u.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(s){const a=Vr,u=e?.compare??Object.is;if(n)Vr=i,++Ph,i.depsTail=void 0;else if(s===void 0)return!1;n&&(i.flags=ht.Mutable|ht.RecursedCheck);try{const c=i._snapshot,f=typeof s=="function"?s(c):s===void 0&&n?r(c):s;return c===void 0||!u(c,f)?(i._snapshot=f,!0):!1}finally{Vr=a,n&&(i.flags&=~ht.RecursedCheck),Zh(i)}}};return n?(i.flags=ht.Mutable|ht.Dirty,i.get=function(){const s=i.flags;if(s&ht.Dirty||s&ht.Pending&&gw(i.deps,i)){if(i._update()){const a=i.subs;a!==void 0&&oC(a)}}else s&ht.Pending&&(i.flags=s&~ht.Pending);return Vr!==void 0&&sC(i,Vr,Ph),i._snapshot}):i.set=function(s){if(i._update(s)){const a=i.subs;a!==void 0&&(LL(a),oC(a),bw())}},i}function jL(t){const e=()=>{const r=Vr;Vr=n,++Ph,n.depsTail=void 0,n.flags=ht.Watching|ht.RecursedCheck;try{return t()}finally{Vr=r,n.flags&=~ht.RecursedCheck,Zh(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:ht.Watching|ht.RecursedCheck,notify(){const r=this.flags;r&ht.Dirty||r&ht.Pending&&gw(this.deps,this)?e():this.flags=ht.Watching},stop(){this.flags=ht.None,this.depsTail=void 0,Zh(this)}};return e(),n}var Db={exports:{}},Sb={},wb={exports:{}},$b={};var lC;function FL(){if(lC)return $b;lC=1;var t=dd();function e(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,i=t.useEffect,s=t.useLayoutEffect,a=t.useDebugValue;function u(m,g){var b=g(),x=r({inst:{value:b,getSnapshot:g}}),k=x[0].inst,E=x[1];return s(function(){k.value=b,k.getSnapshot=g,c(k)&&E({inst:k})},[m,b,g]),i(function(){return c(k)&&E({inst:k}),m(function(){c(k)&&E({inst:k})})},[m]),a(b),b}function c(m){var g=m.getSnapshot;m=m.value;try{var b=g();return!n(m,b)}catch{return!0}}function f(m,g){return g()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return $b.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:h,$b}var uC;function yw(){return uC||(uC=1,wb.exports=FL()),wb.exports}var cC;function KL(){if(cC)return Sb;cC=1;var t=dd(),e=yw();function n(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:n,i=e.useSyncExternalStore,s=t.useRef,a=t.useEffect,u=t.useMemo,c=t.useDebugValue;return Sb.useSyncExternalStoreWithSelector=function(f,h,m,g,b){var x=s(null);if(x.current===null){var k={hasValue:!1,value:null};x.current=k}else k=x.current;x=u(function(){function D(R){if(!T){if(T=!0,$=R,R=g(R),b!==void 0&&k.hasValue){var M=k.value;if(b(M,R))return A=M}return A=R}if(M=A,r($,R))return M;var O=g(R);return b!==void 0&&b(M,O)?($=R,M):($=R,A=O)}var T=!1,$,A,B=m===void 0?null:m;return[function(){return D(h())},B===null?void 0:function(){return D(B())}]},[h,m,g,b]);var E=i(f,x[0],x[1]);return a(function(){k.hasValue=!0,k.value=E},[E]),c(E),E},Sb}var dC;function _L(){return dC||(dC=1,Db.exports=KL()),Db.exports}var xw=_L();function VL(t,e){return t===e}function Tr(t,e,n=VL){const r=S.useCallback(a=>{if(!t)return()=>{};const{unsubscribe:u}=t.subscribe(a);return u},[t]),i=S.useCallback(()=>t?.get(),[t]);return xw.useSyncExternalStoreWithSelector(r,i,i,e,n)}var fC={};function HL(t,e){const n=S.useRef();return r=>{const i=t?.select?t.select(r):r;return t?.structuralSharing??e.options.defaultStructuralSharing?n.current=Ro(n.current,i):i}}function Ws(t){const e=In(),n=S.useContext(t.from?RL:gm),r=t.from??n,i=e.stores.getMatchStore(r),s=HL(t,e),a=Tr(i,u=>u?s(u):fC);if(a!==fC)return a;(t.shouldThrow??!0)&&h3()}function C3(t){return Ws({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.loaderData):e.loaderData})}function E3(t){const{select:e,...n}=t;return Ws({...n,select:r=>e?e(r.loaderDeps):r.loaderDeps})}function D3(t){return Ws({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:e=>{const n=t.strict===!1?e.params:e._strictParams;return t.select?t.select(n):n}})}function Qs(t){return Ws({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.search):e.search})}function ji(t){const e=In();return S.useCallback(n=>e.navigate({...n,from:n.from??t?.from}),[t?.from,e])}function S3(t){return Ws({...t,select:e=>t.select?t.select(e.context):e.context})}function Tb(t){const e=S.useRef(t);return Ns(e.current,t,{ignoreUndefined:!1})||(e.current=t),e.current}function UL(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function qL(t,e,n){if(t?.external)return Wh(t.href,n)?void 0:t.href;if(!ZL(e)&&!(typeof e!="string"||e.indexOf(":")===-1))try{return new URL(e),Wh(e,n)?void 0:e}catch{}}function GL(t,e,n,r,i,s){if(s)return!1;if(n?.exact){if(!Hz(t.pathname,e.pathname,r))return!1}else{const a=Yh(t.pathname,r),u=Yh(e.pathname,r);if(!(a.startsWith(u)&&(a.length===u.length||a[u.length]==="/")))return!1}return(n?.includeSearch??!0)&&!Ns(t.search,e.search,{partial:!n?.exact,ignoreUndefined:!n?.explicitUndefined})?!1:n?.includeHash?i&&t.hash===e.hash:!0}function WL(t,e){const n=In(),r=wz(e),{activeProps:i,inactiveProps:s,activeOptions:a,to:u,preload:c,preloadDelay:f,preloadIntentProximity:h,hashScrollIntoView:m,replace:g,startTransition:b,resetScroll:x,viewTransition:k,children:E,target:D,disabled:T,style:$,className:A,onClick:B,onBlur:R,onFocus:M,onMouseEnter:O,onMouseLeave:j,onTouchStart:q,ignoreBlocker:X,params:G,search:Z,hash:F,state:te,mask:P,reloadDocument:_,unsafeRelative:W,from:ee,_fromLocation:z,...L}=t,H=pw(),ie=Tb(t.search),le=Tb(t.params),de=Tb(a),he=S.useMemo(()=>t,[n,t.from,t._fromLocation,t.hash,t.to,ie,le,t.state,t.mask,t.unsafeRelative]),Ce=S.useCallback(It=>{const gt=n.buildLocation({_fromLocation:It,...he}),so=JL(gt.maskedLocation?gt.maskedLocation.publicHref:gt.publicHref,gt.maskedLocation?gt.maskedLocation.external:gt.external,n.history,T),Zl=qL(so,u,n.protocolAllowlist);return[so?.href,Zl,GL(It,gt,de,n.basepath,H,Zl!==void 0)]},[de,T,H,he,n,u]),[Qe,$e,En]=Tr(n.stores.location,Ce,UL),ln=En?$l(i,{})??QL:Ab,mn=En?Ab:$l(s,{})??Ab,br=[A,ln.className,mn.className].filter(Boolean).join(" "),Ht=($||ln.style||mn.style)&&{...$,...ln.style,...mn.style},Ui=S.useRef(!1),Be=t.reloadDocument||$e||T?!1:c??n.options.defaultPreload,Xr=f??n.options.defaultPreloadDelay??0,Jr=S.useCallback(()=>{n.preloadRoute(he).catch(It=>{console.warn(It),console.warn($L)})},[n,he]),io=S.useCallback(It=>{if(!It){Bb(r);return}if(!(It.isIntersecting??Be==="intent")){It.isIntersecting===!1&&Bb(r);return}if(!Xr){Jr();return}yc.has(r)||yc.set(r,setTimeout(()=>{yc.delete(r),Jr()},Xr))},[Jr,r,Be,Xr]);Sz(r,io,Be!=="viewport"),S.useEffect(()=>{Ui.current||Be==="render"&&(Jr(),Ui.current=!0)},[Jr,Be]);const Xl=It=>{const gt=It.currentTarget.getAttribute("target"),so=D!==void 0?D:gt;!T&&!(It.metaKey||It.altKey||It.ctrlKey||It.shiftKey)&&!It.defaultPrevented&&(!so||so==="_self")&&It.button===0&&(It.preventDefault(),n.navigate({...he,replace:g,resetScroll:x,hashScrollIntoView:m,startTransition:b,viewTransition:k,ignoreBlocker:X}))};if($e)return{...L,ref:r,href:$e,...E&&{children:E},...D&&{target:D},...T&&{disabled:T},...$&&{style:$},...A&&{className:A},...B&&{onClick:B},...R&&{onBlur:R},...M&&{onFocus:M},...O&&{onMouseEnter:O},...j&&{onMouseLeave:j},...q&&{onTouchStart:q}};const Jl=()=>{Be==="intent"&&Jr()},Md=()=>{Be==="intent"&&Bb(r)};return{...L,...ln,...mn,href:Qe,ref:r,onClick:ol([B,Xl]),onBlur:ol([R,Md]),onFocus:ol([M,io]),onMouseEnter:ol([O,io]),onMouseLeave:ol([j,Md]),onTouchStart:ol([q,Jl]),disabled:!!T,target:D,...Ht&&{style:Ht},...br&&{className:br},...T&&YL,...En&&XL}}var Ab={},QL={className:"active"},YL={role:"link","aria-disabled":!0},XL={"data-status":"active","aria-current":"page"},yc=new WeakMap,Bb=t=>{clearTimeout(yc.get(t)),yc.delete(t)},ol=t=>e=>{for(const n of t)if(n){if(e.defaultPrevented)return;n(e)}};function JL(t,e,n,r){if(!r)return e?{href:t,external:!0}:{href:n.createHref(t)||"/",external:!1}}function ZL(t){if(typeof t!="string")return!1;const e=t.charCodeAt(0);return e===47?t.charCodeAt(1)!==47:e===46}var Al=S.forwardRef((t,e)=>{const{_asChild:n,...r}=t,{type:i,...s}=WL(r,e),a=typeof r.children=="function"?r.children({isActive:s["data-status"]==="active"}):r.children;if(!n){const{disabled:u,...c}=s;return S.createElement("a",c,a)}return S.createElement(n,s,a)});function vw(t){return new eI({id:t})}var eI=class extends TL{constructor({id:t}){super({id:t}),this.useMatch=e=>Ws({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>S3({...e,from:this.id}),this.useSearch=e=>Qs({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>D3({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>E3({...e,from:this.id,strict:!1}),this.useLoaderData=e=>C3({...e,from:this.id,strict:!1}),this.useNavigate=()=>ji({from:In().routesById[this.id].fullPath}),this.notFound=e=>nw({routeId:this.id,...e}),this.Link=V.forwardRef((e,n)=>{const r=In().routesById[this.id].fullPath;return C.jsx(Al,{ref:n,from:r,...e})})}},tI=class extends hw{constructor(t){super(t),this.useMatch=e=>Ws({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>S3({...e,from:this.id}),this.useSearch=e=>Qs({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>D3({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>E3({...e,from:this.id}),this.useLoaderData=e=>C3({...e,from:this.id}),this.useNavigate=()=>ji({from:this.fullPath}),this.Link=V.forwardRef((e,n)=>C.jsx(Al,{ref:n,from:this.fullPath,...e}))}};function w3(t){return new tI(t)}var nI=class extends AL{constructor(t){super(t),this.useMatch=e=>Ws({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>S3({...e,from:this.id}),this.useSearch=e=>Qs({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>D3({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>E3({...e,from:this.id}),this.useLoaderData=e=>C3({...e,from:this.id}),this.useNavigate=()=>ji({from:this.fullPath}),this.Link=V.forwardRef((e,n)=>C.jsx(Al,{ref:n,from:this.fullPath,...e}))}};function rI(t){return new nI(t)}function iI(t){const e=In(),n=`not-found-${Tr(e.stores.location,r=>r.pathname)}-${Tr(e.stores.status,r=>r)}`;return C.jsx(k3,{getResetKey:()=>n,onCatch:(r,i)=>{if(Tl(r))t.onCatch?.(r,i);else throw r},errorComponent:({error:r})=>{if(Tl(r))return t.fallback?.(r);throw r},children:t.children})}function sI(){return C.jsx("p",{children:"Not Found"})}function fl(t){return C.jsx(C.Fragment,{children:t.children})}function kw(t,e,n){return e.options.notFoundComponent?C.jsx(e.options.notFoundComponent,{...n}):t.options.defaultNotFoundComponent?C.jsx(t.options.defaultNotFoundComponent,{...n}):C.jsx(sI,{})}function bm(t,e){const n=e?.options.pendingComponent??t.options.defaultPendingComponent;return n?C.jsx(n,{}):null}var oI=(t,e)=>t[0]===e[0]&&t[1]===e[1],Cw=(t,e,n)=>!e.isRoot||e.options.shellComponent||e.options.wrapInSuspense||n===!1||n==="data-only"||!t.ssr,Ew=S.memo(function({routeId:e}){const n=In();return C.jsx(aI,{router:n,match:Tr(n.stores.getMatchStore(e),r=>r)})});function aI({router:t,match:e}){const n=t.routesById[e.routeId],r=bm(t,n),i=n.options.errorComponent??t.options.defaultErrorComponent,s=n.options.onCatch??t.options.defaultOnCatch,a=n.isRoot?n.options.notFoundComponent??t.options.notFoundRoute?.options.component:n.options.notFoundComponent,u=e.ssr===!1||e.ssr==="data-only",c=Cw(t,n,e.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||u))?S.Suspense:fl,f=i?k3:fl,h=a?iI:fl;return C.jsxs(n.isRoot?n.options.shellComponent??fl:fl,{children:[C.jsx(gm.Provider,{value:e.routeId,children:C.jsx(c,{fallback:r,children:C.jsx(f,{getResetKey:()=>e,errorComponent:i,onCatch:(m,g)=>{if(Tl(m))throw m.routeId??=e.routeId,m;s?.(m,g)},children:C.jsx(h,{fallback:m=>{if(m.routeId??=e.routeId,m.routeId!==e.routeId)throw m;return S.createElement(a,m)},children:u?C.jsx(ML,{fallback:r,children:C.jsx(hC,{match:e})}):C.jsx(hC,{match:e})})})})}),null]})}var hC=S.memo(function({match:e}){const n=In(),r=e.routeId,i=n.routesById[r],s=S.useMemo(()=>{const u=(i.options.remountDeps??n.options.defaultRemountDeps)?.({routeId:r,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return u?JSON.stringify(u):void 0},[r,e.loaderDeps,e._strictParams,e._strictSearch,i.options.remountDeps,n.options.defaultRemountDeps]),a=S.useMemo(()=>{const u=i.options.component??n.options.defaultComponent;return u?C.jsx(u,{},s):C.jsx(Dw,{})},[s,i.options.component,n.options.defaultComponent]);if(e.status==="pending"){if(n.ssr&&!Cw(n,i,e.ssr))return a;if(n._tx)throw n._tx[5];return bm(n,i)}if(e.status==="notFound")return kw(n,i,e.error);if(e.status==="error")throw e.error;return a}),Dw=S.memo(function(){const e=In(),n=S.useContext(gm);let r,i,s;{const u=e.stores.getMatchStore(n);[r,i]=Tr(u,c=>[!!c._notFound,c.error],oI),s=Tr(e.stores.ids,c=>c[c.indexOf(n)+1])}if(r)return kw(e,e.routesById[n],i);if(!s)return null;const a=C.jsx(Ew,{routeId:s});return n===xl?C.jsx(S.Suspense,{fallback:bm(e),children:a}):a});function Sw(t,e){const n=t[1];t.length=0,n?.(e)}function lI({t}){const e=In(),n=e._rendered??=[];return e.startTransition=(r,i)=>new Promise(s=>{Sw(n,!1),n.push(i,s),t(e),S.startTransition(r)}),qS(()=>{const r=e.history.subscribe(e.load);e.updateLatestLocation();const i=e.latestLocation,s=e.buildLocation({to:i.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(Di(i.publicHref)!==Di(s.publicHref))return e.commitLocation({...s,replace:!0,ignoreBlocker:!0}),r;const a=e.stores.resolvedLocation.get();return a?.href===i.href&&a.state.__TSR_key===i.state.__TSR_key?n.push(e.stores.matches.get(),u=>{u&&e.emit({type:"onRendered",...pm(a,a)})}):e._tx||e.load({sync:!0}).catch(console.error),r},[e,e.history]),null}function uI(){const t=In(),e=t.routesById[xl],n=bm(t,e),r=t.ssr?fl:S.Suspense,i=C.jsxs(C.Fragment,{children:[C.jsx(lI,{t:S.useState()[1]}),C.jsx(r,{fallback:n,children:C.jsx(cI,{})})]});return t.options.InnerWrap?C.jsx(t.options.InnerWrap,{children:i}):i}function cI(){const t=In(),e=t._rendered,n=Tr(t.stores.matches,a=>e[0]??a),r=n[0],i=r?.routeId;qS(()=>{e[0]===n&&Sw(e,!0)},[e,n]);const s=i?C.jsx(Ew,{routeId:i}):null;return C.jsx(gm.Provider,{value:i,children:t.options.disableGlobalCatchBoundary?s:C.jsx(k3,{getResetKey:()=>r,onCatch:void 0,children:s})})}function ww(){const t=In();return S.useCallback(e=>{const{pending:n,caseSensitive:r,fuzzy:i,includeSearch:s,...a}=e;return t.matchRoute(a,{pending:n,caseSensitive:r,fuzzy:i,includeSearch:s})},[t,Tr(t.stores.location,e=>e.href),Tr(t.stores.resolvedLocation,e=>e?.href),Tr(t.stores.status,e=>e)])}var dI=t=>({createMutableStore:aC,createReadonlyStore:aC,batch:IL}),fI=t=>new hI(t),hI=class extends pL{constructor(t){super(t,dI)}};function pI({router:t,children:e,...n}){WS(n)&&t.update({...t.options,...n,context:{...t.options.context,...n.context}});const r=C.jsx(mw.Provider,{value:t,children:e});return t.options.Wrap?C.jsx(t.options.Wrap,{children:r}):r}function mI({router:t,...e}){return C.jsx(pI,{router:t,...e,children:C.jsx(uI,{})})}function Ys(...t){return(...e)=>{for(let n of t)typeof n=="function"&&n(...e)}}const Ie=typeof document<"u"?V.useLayoutEffect:()=>{},$w={prefix:String(Math.round(Math.random()*1e10)),current:0},Tw=V.createContext($w),gI=V.createContext(!1);let Mb=new WeakMap;function bI(t=!1){let e=S.useContext(Tw),n=S.useRef(null);if(n.current===null&&!t){let r=V.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;if(r){let i=Mb.get(r);i==null?Mb.set(r,{id:e.current,state:r.memoizedState}):r.memoizedState!==i.state&&(e.current=i.id,Mb.delete(r))}n.current=++e.current}return n.current}function yI(t){let e=S.useContext(Tw),n=bI(!!t),r=`react-aria${e.prefix}`;return t||`${r}-${n}`}function xI(t){let e=V.useId(),[n]=S.useState(Xs()),r=n?"react-aria":`react-aria${$w.prefix}`;return t||`${r}-${e}`}const vI=typeof V.useId=="function"?xI:yI;function kI(){return!1}function CI(){return!0}function EI(t){return()=>{}}function Xs(){return typeof V.useSyncExternalStore=="function"?V.useSyncExternalStore(EI,kI,CI):S.useContext(gI)}function DI(t){let[e,n]=S.useState(t),r=S.useRef(e),i=S.useRef(null),s=S.useRef(()=>{if(!i.current)return;let u=i.current.next();if(u.done){i.current=null;return}r.current===u.value?s.current():n(u.value)});Ie(()=>{r.current=e,i.current&&s.current()});let a=S.useCallback(u=>{i.current=u(r.current),s.current()},[s]);return[e,a]}let SI=!!(typeof window<"u"&&window.document&&window.document.createElement),kl=new Map,sc;typeof FinalizationRegistry<"u"&&(sc=new FinalizationRegistry(t=>{kl.delete(t)}));function an(t){let[e,n]=S.useState(t),r=S.useRef(null),i=vI(e),s=S.useRef(null);if(sc&&sc.register(s,i),SI){const a=kl.get(i);a&&!a.includes(r)?a.push(r):kl.set(i,[r])}return Ie(()=>{let a=i;return()=>{sc&&sc.unregister(s),kl.delete(a)}},[i]),S.useEffect(()=>{let a=r.current;return a&&n(a),()=>{a&&(r.current=null)}}),i}function wI(t,e){if(t===e)return t;let n=kl.get(t);if(n)return n.forEach(i=>i.current=e),e;let r=kl.get(e);return r?(r.forEach(i=>i.current=t),t):e}function Ho(t=[]){let e=an(),[n,r]=DI(e),i=S.useCallback(()=>{r(function*(){yield e,yield document.getElementById(e)?e:void 0})},[e,r]);return Ie(i,[e,i,...t]),n}function pd(...t){return t.length===1&&t[0]?t[0]:e=>{let n=!1;const r=t.map(i=>{const s=pC(i,e);return n||=typeof s=="function",s});if(n)return()=>{r.forEach((i,s)=>{typeof i=="function"?i():pC(t[s],null)})}}}function pC(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Aw(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=Aw(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function $3(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=Aw(t))&&(r&&(r+=" "),r+=e);return r}function we(...t){let e={...t[0]};for(let n=1;n<t.length;n++){let r=t[n];for(let i in r){let s=e[i],a=r[i];typeof s=="function"&&typeof a=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?e[i]=Ys(s,a):(i==="className"||i==="UNSAFE_className")&&typeof s=="string"&&typeof a=="string"?e[i]=$3(s,a):i==="id"&&s&&a?e.id=wI(s,a):i==="ref"&&s&&a?e.ref=pd(s,a):e[i]=a!==void 0?a:s}}return e}function Js(t){const e=S.useRef(null),n=S.useRef(void 0),r=S.useCallback(i=>{if(typeof t=="function"){const s=t,a=s(i);return()=>{typeof a=="function"?a():s(null)}}else if(t)return t.current=i,()=>{t.current=null}},[t]);return S.useMemo(()=>({get current(){return e.current},set current(i){e.current=i,n.current&&(n.current(),n.current=void 0),i!=null&&(n.current=r(i))}}),[r])}const Ts=Symbol("default");function Nr({values:t,children:e}){for(let[n,r]of t)e=V.createElement(n.Provider,{value:r},e);return e}function $t(t){let{className:e,style:n,children:r,defaultClassName:i,defaultChildren:s,defaultStyle:a,values:u,render:c}=t;return S.useMemo(()=>{let f,h,m;return typeof e=="function"?f=e({...u,defaultClassName:i}):f=e,typeof n=="function"?h=n({...u,defaultStyle:a||{}}):h=n,typeof r=="function"?m=r({...u,defaultChildren:s}):r==null?m=s:m=r,{className:f??i,style:h||a?{...a,...h}:void 0,children:m??s,"data-rac":"",render:c?g=>c(g,u):void 0}},[e,n,r,i,s,a,u,c])}function Ks(t,e){return n=>e(typeof t=="function"?t(n):t,n)}function Kl(t,e){let n=S.useContext(t);if(e===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=e||Ts;if(!n.slots[r]){let i=new Intl.ListFormat().format(Object.keys(n.slots).map(a=>`"${a}"`)),s=e?`Invalid slot "${e}".`:"A slot prop is required.";throw new Error(`${s} Valid slot names are ${i}.`)}return n.slots[r]}return n}function Et(t,e,n){let r=Kl(n,t.slot)||{},{ref:i,...s}=r,a=Js(S.useMemo(()=>pd(e,i),[e,i])),u=we(s,t);return"style"in s&&s.style&&"style"in t&&t.style&&(typeof s.style=="function"||typeof t.style=="function"?u.style=c=>{let f=typeof s.style=="function"?s.style(c):s.style,h={...c.defaultStyle,...f},m=typeof t.style=="function"?t.style({...c,defaultStyle:h}):t.style;return{...h,...m}}:u.style={...s.style,...t.style}),[u,a]}function Bw(t=!0){let[e,n]=S.useState(t),r=S.useRef(!1),i=S.useCallback(s=>{r.current=!0,n(!!s)},[]);return Ie(()=>{r.current||n(!1)},[]),[i,e]}function Mw(t){const e=/^(data-.*)$/;let n={};for(const r in t)e.test(r)||(n[r]=t[r]);return n}function $I(t,e,n){let{render:r,...i}=e,s=S.useRef(null),a=S.useMemo(()=>pd(n,s),[n,s]);Ie(()=>{},[t,r]);let u={...i,ref:a};return r?r(u,void 0):V.createElement(t,u)}const mC={},ot=new Proxy({},{get(t,e){if(typeof e!="string")return;let n=mC[e];return n||(n=S.forwardRef($I.bind(null,e)),mC[e]=n),n}}),Nw="react-aria-clear-focus",Uy="react-aria-focus",je=t=>t?.ownerDocument??document,fn=t=>t&&"window"in t&&t.window===t?t:je(t).defaultView||window;function TI(t){return t!==null&&typeof t=="object"&&"nodeType"in t&&typeof t.nodeType=="number"}function AI(t){return TI(t)&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in t}let BI=!1;function Si(){return BI}function Se(t,e){if(!Si())return e&&t?t.contains(e):!1;if(!t||!e)return!1;let n=e;for(;n!==null;){if(n===t)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:AI(n)?n=n.host:n=n.parentNode}return!1}const _e=(t=document)=>{if(!Si())return t.activeElement;let e=t.activeElement;for(;e&&"shadowRoot"in e&&e.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e};function ce(t){if(Si()&&t.target instanceof Element&&t.target.shadowRoot){if("composedPath"in t)return t.composedPath()[0]??null;if("composedPath"in t.nativeEvent)return t.nativeEvent.composedPath()[0]??null}return t.target}function Bl(t){if(!t)return!1;let e=t.getRootNode(),n=fn(t);if(!(e instanceof n.Document||e instanceof n.ShadowRoot))return!1;let r=e.activeElement;return r!=null&&t.contains(r)}function T3(t){let e=Rw(je(t));e!==t&&(e&&qy(e,t),t&&ep(t,e))}function qy(t,e){t.dispatchEvent(new FocusEvent("blur",{relatedTarget:e})),t.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:e}))}function ep(t,e){t.dispatchEvent(new FocusEvent("focus",{relatedTarget:e})),t.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:e}))}function Rw(t){let e=_e(t),n=e?.getAttribute("aria-activedescendant");return n&&t.getElementById(n)||e}function Br(t){if(MI())t.focus({preventScroll:!0});else{let e=NI(t);t.focus(),RI(e)}}let nh=null;function MI(){if(nh==null){nh=!1;try{document.createElement("div").focus({get preventScroll(){return nh=!0,!0}})}catch{}}return nh}function NI(t){let e=t.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==r;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&n.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function RI(t){for(let{element:e,scrollTop:n,scrollLeft:r}of t)e.scrollTop=n,e.scrollLeft=r}const OI=typeof Element<"u"&&"checkVisibility"in Element.prototype;function PI(t){const e=fn(t);if(!(t instanceof e.HTMLElement)&&!(t instanceof e.SVGElement))return!1;let{display:n,visibility:r}=t.style,i=n!=="none"&&r!=="hidden"&&r!=="collapse";if(i){const{getComputedStyle:s}=fn(t);let{display:a,visibility:u}=s(t);i=a!=="none"&&u!=="hidden"&&u!=="collapse"}return i}function zI(t,e){return!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&(t.nodeName==="DETAILS"&&e&&e.nodeName!=="SUMMARY"?t.hasAttribute("open"):!0)}function A3(t,e){return OI?t.checkVisibility({visibilityProperty:!0})&&!t.closest("[data-react-aria-prevent-focus]"):t.nodeName!=="#comment"&&PI(t)&&zI(t,e)&&(!t.parentElement||A3(t.parentElement,t))}const B3=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"],LI=B3.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";B3.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const II=B3.join(':not([hidden]):not([tabindex="-1"]),');function Ow(t,e){return t.matches(LI)&&!Pw(t)&&(e?.skipVisibilityCheck||A3(t))}function tp(t){return t.matches(II)&&A3(t)&&!Pw(t)}function Pw(t){let e=t;for(;e!=null;){if(e instanceof fn(e).HTMLElement&&e.inert)return!0;e=e.parentElement}return!1}function M3(t){let e=t;return e.nativeEvent=t,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function zw(t,e){Object.defineProperty(t,"target",{value:e}),Object.defineProperty(t,"currentTarget",{value:e})}function Lw(t){let e=S.useRef({isFocused:!1,observer:null});return Ie(()=>{const n=e.current;return()=>{n.observer&&(n.observer.disconnect(),n.observer=null)}},[]),S.useCallback(n=>{let r=ce(n);if(r instanceof HTMLButtonElement||r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement){e.current.isFocused=!0;let i=r,s=a=>{if(e.current.isFocused=!1,i.disabled){let u=M3(a);t?.(u)}e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};i.addEventListener("focusout",s,{once:!0}),e.current.observer=new MutationObserver(()=>{if(e.current.isFocused&&i.disabled){e.current.observer?.disconnect();let a=i===_e()?null:_e();i.dispatchEvent(new FocusEvent("blur",{relatedTarget:a})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:a}))}}),e.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[t])}let np=!1;function jI(t){for(;t&&!Ow(t,{skipVisibilityCheck:!0});)t=t.parentElement;let e=fn(t),n=e.document.activeElement;if(!n||n===t)return;np=!0;let r=!1,i=h=>{(ce(h)===n||r)&&h.stopImmediatePropagation()},s=h=>{(ce(h)===n||r)&&(h.stopImmediatePropagation(),!t&&!r&&(r=!0,Br(n),c()))},a=h=>{(ce(h)===t||r)&&h.stopImmediatePropagation()},u=h=>{(ce(h)===t||r)&&(h.stopImmediatePropagation(),r||(r=!0,Br(n),c()))};e.addEventListener("blur",i,!0),e.addEventListener("focusout",s,!0),e.addEventListener("focusin",u,!0),e.addEventListener("focus",a,!0);let c=()=>{cancelAnimationFrame(f),e.removeEventListener("blur",i,!0),e.removeEventListener("focusout",s,!0),e.removeEventListener("focusin",u,!0),e.removeEventListener("focus",a,!0),np=!1,r=!1},f=requestAnimationFrame(c);return c}function ym(t){if(typeof window>"u"||window.navigator==null)return!1;let e=window.navigator.userAgentData?.brands;return Array.isArray(e)&&e.some(n=>t.test(n.brand))||t.test(window.navigator.userAgent)}function N3(t){return typeof window<"u"&&window.navigator!=null?t.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function Fi(t){let e=null;return()=>(e==null&&(e=t()),e)}const _s=Fi(function(){return N3(/^Mac/i)}),FI=Fi(function(){return N3(/^iPhone/i)}),R3=Fi(function(){return N3(/^iPad/i)||_s()&&navigator.maxTouchPoints>1}),Pi=Fi(function(){return FI()||R3()}),KI=Fi(function(){return _s()||Pi()}),O3=Fi(function(){return ym(/AppleWebKit/i)&&!Iw()}),Iw=Fi(function(){return ym(/Chrome/i)}),xm=Fi(function(){return ym(/Android/i)}),_I=Fi(function(){return ym(/Firefox/i)});function vm(t){return t.pointerType===""&&t.isTrusted?!0:xm()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function P3(t){return!xm()&&t.width===0&&t.height===0||t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"}const jw=S.createContext({isNative:!0,open:HI,useHref:t=>t});function VI(t){let{children:e,navigate:n,useHref:r}=t,i=S.useMemo(()=>({isNative:!1,open:(s,a,u,c)=>{Kw(s,f=>{Fw(f,a)?n(u,c):Wr(f,a)})},useHref:r||(s=>s)}),[n,r]);return V.createElement(jw.Provider,{value:i},e)}function _l(){return S.useContext(jw)}function Fw(t,e){let n=t.getAttribute("target");return(!n||n==="_self")&&t.origin===location.origin&&!t.hasAttribute("download")&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&!e.shiftKey}function Wr(t,e,n=!0){let{metaKey:r,ctrlKey:i,altKey:s,shiftKey:a}=e;_I()&&window.event?.type?.startsWith("key")&&t.target==="_blank"&&(_s()?r=!0:i=!0);let u=O3()&&_s()&&!R3()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:r,ctrlKey:i,altKey:s,shiftKey:a}):new MouseEvent("click",{metaKey:r,ctrlKey:i,altKey:s,shiftKey:a,detail:1,bubbles:!0,cancelable:!0});Wr.isOpening=n,Br(t),t.dispatchEvent(u),Wr.isOpening=!1}Wr.isOpening=!1;function Kw(t,e){if(t instanceof HTMLAnchorElement)e(t);else if(t.hasAttribute("data-href")){let n=document.createElement("a");n.href=t.getAttribute("data-href"),t.hasAttribute("data-target")&&(n.target=t.getAttribute("data-target")),t.hasAttribute("data-rel")&&(n.rel=t.getAttribute("data-rel")),t.hasAttribute("data-download")&&(n.download=t.getAttribute("data-download")),t.hasAttribute("data-ping")&&(n.ping=t.getAttribute("data-ping")),t.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=t.getAttribute("data-referrer-policy")),t.appendChild(n),e(n),t.removeChild(n)}}function HI(t,e){Kw(t,n=>Wr(n,e))}function UI(t){const n=_l().useHref(t.href??"");return{"data-href":t.href?n:void 0,"data-target":t.target,"data-rel":t.rel,"data-download":t.download,"data-ping":t.ping,"data-referrer-policy":t.referrerPolicy}}function _w(t){const n=_l().useHref(t?.href??"");let r={};if(t)for(let i of["href","target","rel","download","ping","referrerPolicy"])i in t&&(r[i]=i==="href"?n:t[i]);return r}function Vw(t,e,n,r){!e.isNative&&t.currentTarget instanceof HTMLAnchorElement&&t.currentTarget.href&&!t.isDefaultPrevented()&&Fw(t.currentTarget,t)&&n&&(t.preventDefault(),e.open(t.currentTarget,t,n,r))}let zi=null,Vl="keyboard";const _c=new Set;let xc=new Map,Jo=!1,Gy=!1;const qI={Tab:!0,Escape:!0};function km(t,e){for(let n of _c)n(t,e)}function GI(t){return!(t.metaKey||!_s()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function rp(t){Jo=!0,!Wr.isOpening&&GI(t)&&(zi="keyboard",Vl="keyboard",km("keyboard",t))}function Cl(t){zi="pointer",Vl="pointerType"in t?t.pointerType:"mouse",(t.type==="mousedown"||t.type==="pointerdown")&&(Jo=!0,km("pointer",t))}function Hw(t){!Wr.isOpening&&vm(t)&&(Jo=!0,zi="virtual",Vl="virtual")}function Uw(t){let e=fn(ce(t)),n=je(ce(t));ce(t)===e||ce(t)===n||np||!t.isTrusted||(!Jo&&!Gy&&(zi="virtual",Vl="virtual",km("virtual",t)),Jo=!1,Gy=!1)}function qw(){np||(Jo=!1,Gy=!0)}function ip(t){if(typeof window>"u"||typeof document>"u")return;const e=fn(t),n=je(t);if(xc.get(e))return;let r=e.HTMLElement.prototype.focus;Reflect.defineProperty(e.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:function(){Jo=!0,r.apply(this,arguments)}}),n.addEventListener("keydown",rp,!0),n.addEventListener("keyup",rp,!0),n.addEventListener("click",Hw,!0),e.addEventListener("focus",Uw,!0),e.addEventListener("blur",qw,!1),typeof PointerEvent<"u"&&(n.addEventListener("pointerdown",Cl,!0),n.addEventListener("pointermove",Cl,!0),n.addEventListener("pointerup",Cl,!0)),e.addEventListener("beforeunload",()=>{Gw(t)},{once:!0}),xc.set(e,{focus:r})}const Gw=(t,e)=>{const n=fn(t),r=je(t);e&&r.removeEventListener("DOMContentLoaded",e),xc.has(n)&&(Reflect.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:xc.get(n).focus}),r.removeEventListener("keydown",rp,!0),r.removeEventListener("keyup",rp,!0),r.removeEventListener("click",Hw,!0),n.removeEventListener("focus",Uw,!0),n.removeEventListener("blur",qw,!1),typeof PointerEvent<"u"&&(r.removeEventListener("pointerdown",Cl,!0),r.removeEventListener("pointermove",Cl,!0),r.removeEventListener("pointerup",Cl,!0)),xc.delete(n))};function WI(t){const e=je(t);let n;return e.readyState!=="loading"?ip(t):(n=()=>{ip(t)},e.addEventListener("DOMContentLoaded",n)),()=>Gw(t,n)}typeof document<"u"&&WI();function Ml(){return zi!=="pointer"}function Zo(){return zi}function Oo(t){zi=t,Vl=t==="pointer"?"mouse":t,km(t,null)}function QI(){return Vl}function Ww(){ip();let[t,e]=S.useState(zi);return S.useEffect(()=>{let n=()=>{e(zi)};return _c.add(n),()=>{_c.delete(n)}},[]),Xs()?null:t}const YI=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function XI(t,e,n){let r=n?ce(n):void 0,i=je(r),s=fn(r);const a=typeof s<"u"?s.HTMLInputElement:HTMLInputElement,u=typeof s<"u"?s.HTMLTextAreaElement:HTMLTextAreaElement,c=typeof s<"u"?s.HTMLElement:HTMLElement,f=typeof s<"u"?s.KeyboardEvent:KeyboardEvent;let h=_e(i);return t=t||h instanceof a&&!YI.has(h.type)||h instanceof u||h instanceof c&&h.isContentEditable,!(t&&e==="keyboard"&&n instanceof f&&!qI[n.key])}function JI(t,e,n){ip(),S.useEffect(()=>{if(n?.enabled===!1)return;let r=(i,s)=>{XI(!!n?.isTextInput,i,s)&&t(Ml())};return _c.add(r),()=>{_c.delete(r)}},e)}var Qw={};Qw={collectionLabel:"مقترحات"};var Yw={};Yw={collectionLabel:"Предложения"};var Xw={};Xw={collectionLabel:"Návrhy"};var Jw={};Jw={collectionLabel:"Forslag"};var Zw={};Zw={collectionLabel:"Empfehlungen"};var e$={};e$={collectionLabel:"Προτάσεις"};var t$={};t$={collectionLabel:"Suggestions"};var n$={};n$={collectionLabel:"Sugerencias"};var r$={};r$={collectionLabel:"Soovitused"};var i$={};i$={collectionLabel:"Ehdotukset"};var s$={};s$={collectionLabel:"Suggestions"};var o$={};o$={collectionLabel:"הצעות"};var a$={};a$={collectionLabel:"Prijedlozi"};var l$={};l$={collectionLabel:"Javaslatok"};var u$={};u$={collectionLabel:"Suggerimenti"};var c$={};c$={collectionLabel:"候補"};var d$={};d$={collectionLabel:"제안"};var f$={};f$={collectionLabel:"Pasiūlymai"};var h$={};h$={collectionLabel:"Ieteikumi"};var p$={};p$={collectionLabel:"Forslag"};var m$={};m$={collectionLabel:"Suggesties"};var g$={};g$={collectionLabel:"Sugestie"};var b$={};b$={collectionLabel:"Sugestões"};var y$={};y$={collectionLabel:"Sugestões"};var x$={};x$={collectionLabel:"Sugestii"};var v$={};v$={collectionLabel:"Предложения"};var k$={};k$={collectionLabel:"Návrhy"};var C$={};C$={collectionLabel:"Predlogi"};var E$={};E$={collectionLabel:"Predlozi"};var D$={};D$={collectionLabel:"Förslag"};var S$={};S$={collectionLabel:"Öneriler"};var w$={};w$={collectionLabel:"Пропозиції"};var $$={};$$={collectionLabel:"建议"};var T$={};T$={collectionLabel:"建議"};var A$={};A$={"ar-AE":Qw,"bg-BG":Yw,"cs-CZ":Xw,"da-DK":Jw,"de-DE":Zw,"el-GR":e$,"en-US":t$,"es-ES":n$,"et-EE":r$,"fi-FI":i$,"fr-FR":s$,"he-IL":o$,"hr-HR":a$,"hu-HU":l$,"it-IT":u$,"ja-JP":c$,"ko-KR":d$,"lt-LT":f$,"lv-LV":h$,"nb-NO":p$,"nl-NL":m$,"pl-PL":g$,"pt-BR":b$,"pt-PT":y$,"ro-RO":x$,"ru-RU":v$,"sk-SK":k$,"sl-SI":C$,"sr-SP":E$,"sv-SE":D$,"tr-TR":S$,"uk-UA":w$,"zh-CN":$$,"zh-TW":T$};function Ao(t){return _s()?t.metaKey:t.ctrlKey}const ZI=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function vc(t){return t instanceof HTMLInputElement&&!ZI.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable}const ej=V.useInsertionEffect??Ie;function Pt(t){const e=S.useRef(null);return ej(()=>{e.current=t},[t]),S.useCallback((...n)=>{const r=e.current;return r?.(...n)},[])}function oc(t,e,n,r){let i=Pt(n),s=n==null;S.useEffect(()=>{if(s||!t.current)return;let a=t.current;return a.addEventListener(e,i,r),()=>{a.removeEventListener(e,i,r)}},[t,e,r,s])}function z3(t,e){let{id:n,"aria-label":r,"aria-labelledby":i}=t;return n=an(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&e&&(r=e),{id:n,"aria-label":r,"aria-labelledby":i}}const tj=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),nj=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function rj(t){if(Intl.Locale){let n=new Intl.Locale(t).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return tj.has(n.script)}let e=t.split("-")[0];return nj.has(e)}const B$=Symbol.for("react-aria.i18n.locale");function M$(){let t=typeof window<"u"&&window[B$]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([t])}catch{t="en-US"}return{locale:t,direction:rj(t)?"rtl":"ltr"}}let Wy=M$(),ac=new Set;function gC(){Wy=M$();for(let t of ac)t(Wy)}function ij(){let t=Xs(),[e,n]=S.useState(Wy);return S.useEffect(()=>(ac.size===0&&window.addEventListener("languagechange",gC),ac.add(n),()=>{ac.delete(n),ac.size===0&&window.removeEventListener("languagechange",gC)}),[]),t?{locale:typeof window<"u"&&window[B$]||"en-US",direction:"ltr"}:e}const sj=V.createContext(null);function Ki(){let t=ij();return S.useContext(sj)||t}const oj=Symbol.for("react-aria.i18n.locale"),aj=Symbol.for("react-aria.i18n.strings");let rh;class Cm{constructor(e,n="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,r])=>r)),this.defaultLocale=n}getStringForLocale(e,n){let i=this.getStringsForLocale(n)[e];if(!i)throw new Error(`Could not find intl message ${e} in ${n} locale`);return i}getStringsForLocale(e){let n=this.strings[e];return n||(n=lj(e,this.strings,this.defaultLocale),this.strings[e]=n),n}static getGlobalDictionaryForPackage(e){if(typeof window>"u")return null;let n=window[oj];if(rh===void 0){let i=window[aj];if(!i)return null;rh={};for(let s in i)rh[s]=new Cm({[n]:i[s]},n)}let r=rh?.[e];if(!r)throw new Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}}function lj(t,e,n="en-US"){if(e[t])return e[t];let r=uj(t);if(e[r])return e[r];for(let i in e)if(i.startsWith(r+"-"))return e[i];return e[n]}function uj(t){return Intl.Locale?new Intl.Locale(t).language:t.split("-")[0]}const bC=new Map,yC=new Map;class cj{constructor(e,n){this.locale=e,this.strings=n}format(e,n){let r=this.strings.getStringForLocale(e,this.locale);return typeof r=="function"?r(n,this):r}plural(e,n,r="cardinal"){let i=n["="+e];if(i)return typeof i=="function"?i():i;let s=this.locale+":"+r,a=bC.get(s);a||(a=new Intl.PluralRules(this.locale,{type:r}),bC.set(s,a));let u=a.select(e);return i=n[u]||n.other,typeof i=="function"?i():i}number(e){let n=yC.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),yC.set(this.locale,n)),n.format(e)}select(e,n){let r=e[n]||e.other;return typeof r=="function"?r():r}}const xC=new WeakMap;function dj(t){let e=xC.get(t);return e||(e=new Cm(t),xC.set(t,e)),e}function fj(t,e){return e&&Cm.getGlobalDictionaryForPackage(e)||dj(t)}function gr(t,e){let{locale:n}=Ki(),r=fj(t,e);return S.useMemo(()=>new cj(n,r),[n,r])}function hj(t){return t&&t.__esModule?t.default:t}function pj(t,e){let{inputRef:n,collectionRef:r,filter:i,disableAutoFocusFirst:s=!1,disableVirtualFocus:a=!1}=t,u=an(),c=S.useRef(void 0),f=S.useRef(!1),h=S.useRef(null),m=Zo()==="virtual"&&(Pi()||xm()),[g,b]=S.useState(!m&&!a),[x,k]=S.useState(!1),[E,D]=S.useState(!1);S.useEffect(()=>()=>clearTimeout(c.current),[]);let T=Pt(H=>{!H.isTrusted&&g&&n.current&&_e(je(n.current))!==n.current&&QI()!=="touch"&&n.current.focus();let ie=ce(H);H.isTrusted||!ie||h.current===ie.id||(clearTimeout(c.current),ie!==r.current?f.current?(h.current=ie.id,c.current=setTimeout(()=>{e.setFocusedNodeId(ie.id)},500)):(h.current=ie.id,e.setFocusedNodeId(ie.id)):h.current&&!document.getElementById(h.current)&&(h.current=null,e.setFocusedNodeId(null)),f.current=!1)}),[$,A]=S.useState(null),B=S.useCallback(H=>{A(H),H!=null?(H.getAttribute("tabindex")!=null&&b(!1),k(!0)):k(!1)},[]);Ie(()=>($?.addEventListener("focusin",T),()=>{$?.removeEventListener("focusin",T)}),[$]);let R=Js(S.useMemo(()=>pd(r,B),[r,B])),M=S.useCallback(()=>{if(!r.current){D(!0);return}f.current=!0,r.current?.dispatchEvent(new CustomEvent(Uy,{cancelable:!0,bubbles:!0,detail:{focusStrategy:"first"}}))},[r]),O=S.useCallback(H=>{D(!1),T3(_e()),h.current=null,e.setFocusedNodeId(null);let ie=new CustomEvent(Nw,{cancelable:!0,bubbles:!0,detail:{clearFocusKey:H}});clearTimeout(c.current),f.current=!1,r.current?.dispatchEvent(ie)},[r,e]),j=S.useRef("");oc(n,"beforeinput",H=>{let{inputType:ie}=H;j.current=ie});let q=H=>{(j.current==="insertText"||j.current==="insertCompositionText"||j.current==="insertFromComposition")&&!s?M():j.current&&(j.current.includes("insert")||j.current.includes("delete")||j.current.includes("history"))&&(O(!0),Rw(document)===n.current&&ep(n.current,null)),e.setInputValue(H)},X=S.useRef(null),G=H=>{if(X.current=ce(H),H.nativeEvent.isComposing)return;let ie=h.current;switch(ie!==null&&je(n.current).getElementById(ie)==null&&(h.current=null,ie=null),H.key){case"a":if(Ao(H))return;break;case"Escape":if(H.isDefaultPrevented())return;break;case" ":return;case"Tab":"continuePropagation"in H&&H.continuePropagation();return;case"Home":case"End":case"PageDown":case"PageUp":case"ArrowUp":case"ArrowDown":case"ArrowRight":case"ArrowLeft":{if((H.key==="Home"||H.key==="End")&&ie==null&&H.shiftKey)return;if(H.key==="ArrowRight"||H.key==="ArrowLeft"){if(ie==null){H.isPropagationStopped()||H.stopPropagation();return}break}H.preventDefault();let de=new CustomEvent(Uy,{cancelable:!0,bubbles:!0});r.current?.dispatchEvent(de);break}}H.isPropagationStopped()||H.stopPropagation();let le=!0;if(r.current!==null)if(ie==null)le=r.current?.dispatchEvent(new KeyboardEvent(H.nativeEvent.type,H.nativeEvent))||!1;else{let de=document.getElementById(ie);de&&(le=de?.dispatchEvent(new KeyboardEvent(H.nativeEvent.type,H.nativeEvent))||!1)}if(le)switch(H.key){case"ArrowLeft":case"ArrowRight":O();break;case"Enter":ie!=null&&document.getElementById(ie)?.dispatchEvent(new PointerEvent("click",H.nativeEvent));break}else H.preventDefault()},Z=Pt(H=>{if(ce(H)===X.current){H.stopImmediatePropagation();let ie=h.current;ie==null?r.current?.dispatchEvent(new KeyboardEvent(H.type,H)):document.getElementById(ie)?.dispatchEvent(new KeyboardEvent(H.type,H))}});S.useEffect(()=>(document.addEventListener("keyup",Z,!0),()=>{document.removeEventListener("keyup",Z,!0)}),[]);let F=gr(hj(A$),"@react-aria/autocomplete"),te=z3({id:u,"aria-label":F.format("collectionLabel")}),P=S.useCallback((H,ie)=>i?i(H,e.inputValue,ie):!0,[e.inputValue,i]),_=H=>{if(!H.isTrusted)return;let ie=h.current?document.getElementById(h.current):null;ie&&qy(ie,H.relatedTarget)},W=H=>{if(!H.isTrusted)return;if(h.current?document.getElementById(h.current):null){let le=ce(H);queueMicrotask(()=>{qy(le,r.current),ep(r.current,le)})}},ee=H=>{H.button!==0||H.pointerType==="touch"||h.current==null||n.current==null||ce(H)===n.current&&O()},z={value:e.inputValue,onChange:q},L={onKeyDown:G,"aria-activedescendant":e.focusedNodeId??void 0,onBlur:_,onFocus:W,onPointerDown:ee};return z={...z,...g&&x&&L,enterKeyHint:"go","aria-controls":x?u:void 0,"aria-autocomplete":"list",autoCorrect:"off",spellCheck:"false",autoComplete:"off"},{inputProps:z,collectionProps:we(te,{shouldUseVirtualFocus:g,disallowTypeAhead:g,autoFocus:E?"first":!1}),collectionRef:R,filter:i!=null?P:void 0}}const mj=typeof document<"u"?V.useInsertionEffect??V.useLayoutEffect:()=>{};function Zs(t,e,n){let[r,i]=S.useState(t||e),s=S.useRef(r),a=S.useRef(t!==void 0),u=t!==void 0;S.useEffect(()=>{a.current,a.current=u},[u]);let c=u?t:r;mj(()=>{s.current=c});let[,f]=S.useReducer(()=>({}),{}),h=S.useCallback((m,...g)=>{let b=typeof m=="function"?m(s.current):m;Object.is(s.current,b)||(s.current=b,i(b),f(),n?.(b,...g))},[n]);return[c,h]}function gj(t){let{onInputChange:e,inputValue:n,defaultInputValue:r=""}=t,i=f=>{e&&e(f)},[s,a]=S.useState(null),[u,c]=Zs(n,r,i);return{inputValue:u,setInputValue:c,focusedNodeId:s,setFocusedNodeId:a}}const bj=S.createContext(null),yj=S.createContext(null),Vc=S.createContext(null),Em=S.createContext(null);function xj(t){let e=Kl(bj,t.slot);t=we(e,t);let{filter:n,disableAutoFocusFirst:r}=t,i=gj(t),s=S.useRef(null),a=S.useRef(null),{inputProps:u,collectionProps:c,collectionRef:f,filter:h}=pj({...Mw(t),filter:n,disableAutoFocusFirst:r,inputRef:s,collectionRef:a},i);return V.createElement(Nr,{values:[[yj,i],[Em,{...u,ref:s}],[Vc,{...c,filter:h,ref:f}]]},t.children)}class ca{constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,n,r){let i=this.clone();return n.addDescendants(i,e),i}}class N$ extends ca{filter(e,n,r){let[i,s]=R$(e,n,this.firstChildKey,r),a=this.clone();return a.firstChildKey=i,a.lastChildKey=s,a}}const p1=class p1 extends ca{};p1.type="header";let Qy=p1;const m1=class m1 extends ca{};m1.type="loader";let sp=m1;const g1=class g1 extends N${filter(e,n,r){if(r(this.textValue,this)){let i=this.clone();return n.addDescendants(i,e),i}return null}};g1.type="item";let op=g1;const b1=class b1 extends N${filter(e,n,r){let i=super.filter(e,n,r);if(i&&i.lastChildKey!==null){let s=e.getItem(i.lastChildKey);if(s&&s.type!=="header")return i}return null}};b1.type="section";let Yy=b1;class vj{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;e;)yield e,e=e.nextKey!=null?this.keyMap.get(e.nextKey):void 0}getChildren(e){let n=this.keyMap;return{*[Symbol.iterator](){let r=n.get(e),i=r?.firstChildKey!=null?n.get(r.firstChildKey):null;for(;i;)yield i,i=i.nextKey!=null?n.get(i.nextKey):void 0}}}getKeyBefore(e){let n=this.keyMap.get(e);if(!n)return null;if(n.prevKey!=null){for(n=this.keyMap.get(n.prevKey);n&&n.type!=="item"&&n.lastChildKey!=null;)n=this.keyMap.get(n.lastChildKey);return n?.key??null}return n.parentKey}getKeyAfter(e){let n=this.keyMap.get(e);if(!n)return null;if(n.type!=="item"&&n.firstChildKey!=null)return n.firstChildKey;for(;n;){if(n.nextKey!=null)return n.nextKey;if(n.parentKey!=null)n=this.keyMap.get(n.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;e?.lastChildKey!=null;)e=this.keyMap.get(e.lastChildKey);return e?.key??null}getItem(e){return this.keyMap.get(e)??null}at(){throw new Error("Not implemented")}clone(){let e=this.constructor,n=new e;return n.keyMap=new Map(this.keyMap),n.firstKey=this.firstKey,n.lastKey=this.lastKey,n.itemCount=this.itemCount,n}addNode(e){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");e.type==="item"&&this.keyMap.get(e.key)==null&&this.itemCount++,this.keyMap.set(e.key,e)}addDescendants(e,n){this.addNode(e);let r=n.getChildren(e.key);for(let i of r)this.addDescendants(i,n)}removeNode(e){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");let n=this.keyMap.get(e);n!=null&&n.type==="item"&&this.itemCount--,this.keyMap.delete(e)}commit(e,n,r=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=n,this.frozen=!r}filter(e){let n=new this.constructor,[r,i]=R$(this,n,this.firstKey,e);return n?.commit(r,i),n}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}}function R$(t,e,n,r){if(n==null)return[null,null];let i=null,s=null,a=t.getItem(n);for(;a!=null;){let u=a.filter(t,e,r);u!=null&&(u.nextKey=null,s&&(u.prevKey=s.key,s.nextKey=u.key),i==null&&(i=u),e.addNode(u),s=u),a=a.nextKey!=null?t.getItem(a.nextKey):null}if(s&&s.type==="separator"){let u=s.prevKey;e.removeNode(s.key),u!=null?(s=e.getItem(u),s.nextKey=null):s=null}return[i?.key??null,s?.key??null]}class O${constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){return this.parentNode?.isConnected||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e,this.ownerDocument.markDirty(this))}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild==null&&(this.firstChild=e),this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(e,n){if(n==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=n,e.previousSibling=n.previousSibling,e.index=n.index-1,this.firstChild===n?this.firstChild=e:n.previousSibling&&(n.previousSibling.nextSibling=e),n.previousSibling=e,e.parentNode=n.parentNode,this.invalidateChildIndices(e),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode===this&&(this._minInvalidChildIndex===e&&(this._minInvalidChildIndex=null),e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}}class El extends O${constructor(e,n){super(n),this.nodeType=8,this.isMutated=!0,this._index=0,this.isHidden=!1,this.node=null}get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof El?this.parentNode.level+(this.parentNode.node?.type==="item"?1:0):0}getMutableNode(){return this.node==null?null:(this.isMutated||(this.node=this.node.clone(),this.isMutated=!0),this.ownerDocument.markDirty(this),this.node)}updateNode(){let e=this.nextVisibleSibling,n=this.getMutableNode();if(n!=null&&(n.index=this.index,n.level=this.level,n.parentKey=this.parentNode instanceof El?this.parentNode.node?.key??null:null,n.prevKey=this.previousVisibleSibling?.node?.key??null,n.nextKey=e?.node?.key??null,n.hasChildNodes=!!this.firstChild,n.firstChildKey=this.firstVisibleChild?.node?.key??null,n.lastChildKey=this.lastVisibleChild?.node?.key??null,(n.colSpan!=null||n.colIndex!=null)&&e)){let r=(n.colIndex??n.index)+(n.colSpan??1);if(e.node!=null&&r!==e.node.colIndex){let i=e.getMutableNode();i.colIndex=r}}}setProps(e,n,r,i,s){let a,{value:u,textValue:c,id:f,...h}=e;if(this.node==null?(a=new r(f??`react-aria-${++this.ownerDocument.nodeId}`),this.node=a):a=this.getMutableNode(),h.ref=n,a.props=h,a.rendered=i,a.render=s,a.value=u,e["aria-label"]&&(a["aria-label"]=e["aria-label"]),a.textValue=c||(typeof h.children=="string"?h.children:"")||e["aria-label"]||"",f!=null&&f!==a.key)throw new Error("Cannot change the id of an item");h.colSpan!=null&&(a.colSpan=h.colSpan),this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?"none":""},set display(n){let r=n==="none";if(e.isHidden!==r){(e.parentNode?.firstVisibleChild===e||e.parentNode?.lastVisibleChild===e)&&e.ownerDocument.markDirty(e.parentNode);let i=e.previousVisibleSibling,s=e.nextVisibleSibling;i&&e.ownerDocument.markDirty(i),s&&e.ownerDocument.markDirty(s),e.isHidden=r,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}}class kj extends O${constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}get isConnected(){return!0}createElement(e){return new El(e,this)}getMutableCollection(){return this.nextCollection||(this.nextCollection=this.collection.clone()),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden||e.node==null)return;let n=this.getMutableCollection();if(!n.getItem(e.node.key))for(let r of e)this.addNode(r);n.addNode(e.node)}removeNode(e){for(let n of e)this.removeNode(n);e.node&&this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection:(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let e of this.dirtyNodes)e instanceof El&&(!e.isConnected||e.isHidden)?this.removeNode(e):e.updateChildIndices();for(let e of this.dirtyNodes)e instanceof El?(e.isConnected&&!e.isHidden&&(e.updateNode(),this.addNode(e)),e.node&&this.dirtyNodes.delete(e),e.isMutated=!1):this.dirtyNodes.delete(e);this.nextCollection&&(this.nextCollection.commit(this.firstVisibleChild?.node?.key??null,this.lastVisibleChild?.node?.key??null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null))}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0,this.isSSR||(this.collection=this.collection.clone());for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}}function P$(t){let{children:e,items:n,idScope:r,addIdAndValue:i,dependencies:s=[]}=t,a=S.useMemo(()=>{},[e]),u=S.useMemo(()=>new WeakMap,[...s,a]);return S.useMemo(()=>{if(n&&typeof e=="function"){let c=[];for(let f of n){let h=Cj(f)?f:null,m=h?u.get(h):null;if(!m){m=e(f);let g=m.props.id??f?.key??f?.id;r!=null&&m.props.id==null&&g!=null&&(g=r+":"+g);let b=g??c.length;m=S.cloneElement(m,i?{key:b,id:g,value:f}:{key:b}),h&&u.set(h,m)}c.push(m)}return c}else if(typeof e!="function")return e},[e,n,u,r,i])}function Cj(t){switch(typeof t){case"object":return t!=null;case"function":case"symbol":return!0;default:return!1}}let Ss=new Map,Xy=new Set;function vC(){if(typeof window>"u")return;function t(r){return"propertyName"in r}let e=r=>{let i=ce(r);if(!t(r)||!i)return;let s=Ss.get(i);s||(s=new Set,Ss.set(i,s),i.addEventListener("transitioncancel",n,{once:!0})),s.add(r.propertyName)},n=r=>{let i=ce(r);if(!t(r)||!i)return;let s=Ss.get(i);if(s&&(s.delete(r.propertyName),s.size===0&&(i.removeEventListener("transitioncancel",n),Ss.delete(i)),Ss.size===0)){for(let a of Xy)a();Xy.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?vC():document.addEventListener("DOMContentLoaded",vC));function Ej(){for(const[t]of Ss)"isConnected"in t&&!t.isConnected&&Ss.delete(t)}function z$(t){requestAnimationFrame(()=>{Ej(),Ss.size===0?t():Xy.add(t)})}function bn(t){if(!t.isConnected)return;const e=je(t);if(Zo()==="virtual"){let n=_e(e);z$(()=>{const r=_e(e);(r===n||r===e.body)&&t.isConnected&&Br(t)})}else Br(t)}function L$(t){let{isDisabled:e,onFocus:n,onBlur:r,onFocusChange:i}=t;const s=S.useCallback(c=>{if(ce(c)===c.currentTarget)return r&&r(c),i&&i(!1),!0},[r,i]),a=Lw(s),u=S.useCallback(c=>{let f=ce(c);const h=je(f),m=h?_e(h):_e();f===c.currentTarget&&f===m&&(n&&n(c),i&&i(!0),a(c))},[i,n,a]);return{focusProps:{onFocus:!e&&(n||i||r)?u:void 0,onBlur:!e&&(r||i)?s:void 0}}}function kC(t){if(!t)return;let e=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){e=!0},continuePropagation(){e=!1,typeof n.continuePropagation=="function"&&n.continuePropagation()},isPropagationStopped(){return e}};t(r),e&&n.stopPropagation()}}function I$(t){return{keyboardProps:t.isDisabled?{}:{onKeyDown:kC(t.onKeyDown),onKeyUp:kC(t.onKeyUp)}}}function L3(t,e){Ie(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}})}let Jy=V.createContext(null);function Dj(t){let e=S.useContext(Jy)||{};L3(e,t);let{ref:n,...r}=e;return r}function Dm(t,e){let{focusProps:n}=L$(t),{keyboardProps:r}=I$(t),i=we(n,r),s=Dj(e),a=t.isDisabled?{}:s,u=S.useRef(t.autoFocus);S.useEffect(()=>{u.current&&e.current&&bn(e.current),u.current=!1},[e]);let c=t.excludeFromTabOrder?-1:0;return t.isDisabled&&(c=void 0),{focusableProps:we({...i,tabIndex:c},a)}}typeof HTMLTemplateElement<"u"&&(Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.content.firstChild}}),Object.defineProperty(HTMLTemplateElement.prototype,"appendChild",{configurable:!0,enumerable:!0,value:function(t){return this.content.appendChild(t)}}),Object.defineProperty(HTMLTemplateElement.prototype,"removeChild",{configurable:!0,enumerable:!0,value:function(t){return this.content.removeChild(t)}}),Object.defineProperty(HTMLTemplateElement.prototype,"insertBefore",{configurable:!0,enumerable:!0,value:function(t,e){return this.content.insertBefore(t,e)}}));const ap=S.createContext(!1);function Sj(t){if(S.useContext(ap))return V.createElement(V.Fragment,null,t.children);let n=V.createElement(ap.Provider,{value:!0},t.children);return V.createElement("template",null,n)}function Sm(t){let e=(n,r)=>S.useContext(ap)?null:t(n,r);return e.displayName=t.displayName||t.name,S.forwardRef(e)}function j$(){return S.useContext(ap)}var Hl=wS();const F$=SS(Hl);var I3=yw();const K$=S.createContext(!1),Hc=S.createContext(null);function j3(t){if(S.useContext(Hc))return t.content;let{collection:n,document:r}=Aj(t.createCollection);return V.createElement(V.Fragment,null,V.createElement(Sj,null,V.createElement(Hc.Provider,{value:r},t.content)),V.createElement(wj,{render:t.children,collection:n}))}function wj({collection:t,render:e}){return e(t)}function $j(t,e,n){let r=Xs(),i=S.useRef(r);i.current=r;let s=S.useCallback(()=>i.current?n():e(),[e,n]);return I3.useSyncExternalStore(t,s)}const Tj=typeof V.useSyncExternalStore=="function"?V.useSyncExternalStore:$j;function Aj(t){let[e]=S.useState(()=>new kj(t?.()||new vj)),n=S.useCallback(a=>e.subscribe(a),[e]),r=S.useCallback(()=>{let a=e.getCollection();return e.isSSR&&e.resetAfterSSR(),a},[e]),i=S.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]);return{collection:Tj(n,r,i),document:e}}const Zy=S.createContext(null);function Bj(t){var n;return n=class extends ca{},n.type=t,n}function _$(t,e,n,r,i,s){typeof t=="string"&&(t=Bj(t));let a=S.useCallback(c=>{c?.setProps(e,n,t,r,s)},[e,n,r,s,t]),u=S.useContext(Zy);if(u){let c=u.ownerDocument.nodesByProps.get(e);return c||(c=u.ownerDocument.createElement(t.type),c.setProps(e,n,t,r,s),u.appendChild(c),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(e,c)),i?V.createElement(Zy.Provider,{value:c},i):null}return V.createElement(t.type,{ref:a},i)}function da(t,e){let n=({node:i})=>e(i.props,i.props.ref,i),r=S.forwardRef((i,s)=>{let a=S.useContext(Jy);if(!S.useContext(K$)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(i,s)}return _$(t,i,s,"children"in i?i.children:null,null,c=>V.createElement(Jy.Provider,{value:a},V.createElement(n,{node:c})))});return r.displayName=e.name,r}function Mj(t,e,n=V$){let r=({node:s})=>e(s.props,s.props.ref,s),i=S.forwardRef((s,a)=>{let u=n(s);return _$(t,s,a,null,u,c=>V.createElement(r,{node:c}))??V.createElement(V.Fragment,null)});return i.displayName=e.name,i}function V$(t){return P$({...t,addIdAndValue:!0})}const CC=S.createContext(null);function wm(t){let e=S.useContext(CC),n=(e?.dependencies||[]).concat(t.dependencies),r=t.idScope??e?.idScope,i=V$({...t,idScope:r,dependencies:n});return S.useContext(Hc)&&(i=V.createElement(Nj,null,i)),e=S.useMemo(()=>({dependencies:n,idScope:r}),[r,...n]),V.createElement(CC.Provider,{value:e},i)}function Nj({children:t}){let e=S.useContext(Hc),n=S.useMemo(()=>V.createElement(Hc.Provider,{value:null},V.createElement(K$.Provider,{value:!0},t)),[t]);return Xs()?V.createElement(Zy.Provider,{value:e},n):Hl.createPortal(n,e)}const Rj=S.createContext(null),H$={CollectionRoot({collection:t,renderDropIndicator:e}){return EC(t,null,e)},CollectionBranch({collection:t,parent:e,renderDropIndicator:n}){return EC(t,e,n)}};function EC(t,e,n){return P$({items:e?t.getChildren(e.key):t,dependencies:[n],children(r){if(r.type==="content")return V.createElement(V.Fragment,null);let i=r.render(r);return!n||r.type!=="item"?i:V.createElement(V.Fragment,null,n({type:"item",key:r.key,dropPosition:"before"}),i,Oj(t,r,n))}})}function Oj(t,e,n){let r=e.key,i=t.getKeyAfter(r),s=i!=null?t.getItem(i):null;for(;s!=null&&s.type!=="item";)i=t.getKeyAfter(s.key),s=i!=null?t.getItem(i):null;let a=e.nextKey!=null?t.getItem(e.nextKey):null;for(;a!=null&&a.type!=="item";)a=a.nextKey!=null?t.getItem(a.nextKey):null;let u=[];if(a==null){let c=e;for(;c?.type==="item"&&(!s||c.parentKey!==s.parentKey&&s.level<c.level);){let f=n({type:"item",key:c.key,dropPosition:"after"});S.isValidElement(f)&&u.push(S.cloneElement(f,{key:`${c.key}-after`})),c=c.parentKey!=null?t.getItem(c.parentKey):null}}return u}const Vs=S.createContext(H$);function Pj(t){return S.useMemo(()=>t!=null?new Set([t]):null,[t])}const zj=new Set(["id"]),Lj=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),Ij=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),jj=new Set(["dir","lang","hidden","inert","translate"]),DC=new Set(["onClick","onAuxClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onScroll","onWheel","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionCancel","onTransitionEnd","onTransitionRun","onTransitionStart"]),Fj=/^(data-.*)$/;function Ze(t,e={}){let{labelable:n,isLink:r,global:i,events:s=i,propNames:a}=e,u={};for(const c in t)Object.prototype.hasOwnProperty.call(t,c)&&(zj.has(c)||n&&Lj.has(c)||r&&Ij.has(c)||i&&jj.has(c)||s&&(DC.has(c)||c.endsWith("Capture")&&DC.has(c.slice(0,-7)))||a?.has(c)||Fj.test(c))&&(u[c]=t[c]);return u}let bl="default",e4="",zh=new WeakMap;function Kj(t){if(Pi()){if(bl==="default"){const e=je(t);e4=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}bl="disabled"}else if(t instanceof HTMLElement||t instanceof SVGElement){let e="userSelect"in t.style?"userSelect":"webkitUserSelect";zh.set(t,t.style[e]),t.style[e]="none"}}function SC(t){if(Pi()){if(bl!=="disabled")return;bl="restoring",setTimeout(()=>{z$(()=>{if(bl==="restoring"){const e=je(t);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=e4||""),e4="",bl="default"}})},300)}else if((t instanceof HTMLElement||t instanceof SVGElement)&&t&&zh.has(t)){let e=zh.get(t),n="userSelect"in t.style?"userSelect":"webkitUserSelect";t.style[n]==="none"&&(t.style[n]=e),t.getAttribute("style")===""&&t.removeAttribute("style"),zh.delete(t)}}function wC(t){return t?.defaultView?.__webpack_nonce__||globalThis.__webpack_nonce__||void 0}let Nb=new WeakMap;function U$(t){let e=t??(typeof document<"u"?document:void 0);if(!e)return wC(e);if(Nb.has(e))return Nb.get(e);let n=e.querySelector('meta[property="csp-nonce"]'),r=n&&n instanceof fn(n).HTMLMetaElement&&(n.nonce||n.content)||wC(e)||void 0;return r!==void 0&&Nb.set(e,r),r}const Uc=V.createContext({register:()=>{}});Uc.displayName="PressResponderContext";function md(){let t=S.useRef(new Map),e=S.useCallback((i,s,a,u)=>{let c=u?.once?(...f)=>{t.current.delete(a),a(...f)}:a;t.current.set(a,{type:s,eventTarget:i,fn:c,options:u}),i.addEventListener(s,c,u)},[]),n=S.useCallback((i,s,a,u)=>{let c=t.current.get(a)?.fn||a;i.removeEventListener(s,c,u),t.current.delete(a)},[]),r=S.useCallback(()=>{t.current.forEach((i,s)=>{n(i.eventTarget,i.type,s,i.options)})},[n]);return S.useEffect(()=>r,[r]),{addGlobalListener:e,removeGlobalListener:n,removeAllGlobalListeners:r}}function _j(t){let e=S.useContext(Uc);if(e){let{register:n,ref:r,...i}=e;t=we(i,t),n()}return L3(e,t.ref),t}class ih{#e;constructor(e,n,r,i){this.#e=!0;const a=(i?.target??r.currentTarget)?.getBoundingClientRect();let u,c=0,f,h=null;r.clientX!=null&&r.clientY!=null&&(f=r.clientX,h=r.clientY),a&&(f!=null&&h!=null?(u=f-a.left,c=h-a.top):(u=a.width/2,c=a.height/2)),this.type=e,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=u,this.y=c,this.key=r.key}continuePropagation(){this.#e=!1}get shouldStopPropagation(){return this.#e}}const $C=Symbol("linkClicked"),TC="react-aria-pressable-style",AC="data-react-aria-pressable";function gd(t){let{onPress:e,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:s,onClick:a,isDisabled:u,isPressed:c,preventFocusOnPress:f,shouldCancelOnPointerExit:h,allowTextSelectionOnPress:m,ref:g,...b}=_j(t),[x,k]=S.useState(!1),E=S.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:D,removeAllGlobalListeners:T}=md(),$=S.useCallback((F,te)=>{let P=E.current;if(u||P.didFirePressStart)return!1;let _=!0;if(P.isTriggeringEvent=!0,r){let W=new ih("pressstart",te,F);r(W),_=W.shouldStopPropagation}return n&&n(!0),P.isTriggeringEvent=!1,P.didFirePressStart=!0,k(!0),_},[u,r,n]),A=S.useCallback((F,te,P=!0)=>{let _=E.current;if(!_.didFirePressStart)return!1;_.didFirePressStart=!1,_.isTriggeringEvent=!0;let W=!0;if(i){let ee=new ih("pressend",te,F);i(ee),W=ee.shouldStopPropagation}if(n&&n(!1),k(!1),e&&P&&!u){let ee=new ih("press",te,F);e(ee),W&&=ee.shouldStopPropagation}return _.isTriggeringEvent=!1,W},[u,i,n,e]),B=Pt(A),R=S.useCallback((F,te)=>{let P=E.current;if(u)return!1;if(s){P.isTriggeringEvent=!0;let _=new ih("pressup",te,F);return s(_),P.isTriggeringEvent=!1,_.shouldStopPropagation}return!0},[u,s]),M=Pt(R),O=S.useCallback(F=>{let te=E.current;if(te.isPressed&&te.target){te.didFirePressStart&&te.pointerType!=null&&A(wo(te.target,F),te.pointerType,!1),te.isPressed=!1,te.isOverTarget=!1,te.activePointerId=null,te.pointerType=null,T(),m||SC(te.target);for(let P of te.disposables)P();te.disposables=[]}},[m,T,A]),j=Pt(O);S.useEffect(()=>{u&&E.current.isPressed&&j({currentTarget:E.current.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})},[u]);let q=S.useCallback(F=>{h&&O(F)},[h,O]),X=S.useCallback(F=>{u||a?.(F)},[u,a]),G=S.useCallback((F,te)=>{if(!u&&a){let P=new MouseEvent("click",F);zw(P,te),a(M3(P))}},[u,a]),Z=S.useMemo(()=>{let F=E.current,te={onKeyDown(_){if(Rb(_.nativeEvent,_.currentTarget)&&Se(_.currentTarget,ce(_))){BC(ce(_),_.key)&&_.preventDefault();let W=!0;!F.isPressed&&!_.repeat&&(F.target=_.currentTarget,F.isPressed=!0,F.pointerType="keyboard",W=$(_,"keyboard"));let ee=_.currentTarget,z=L=>{Rb(L,ee)&&!L.repeat&&Se(ee,ce(L))&&F.target&&M(wo(F.target,L),"keyboard")};D(je(_.currentTarget),"keyup",Ys(z,P),!0),W&&_.stopPropagation(),_.metaKey&&_s()&&F.metaKeyEvents?.set(_.key,_.nativeEvent)}else _.key==="Meta"&&(F.metaKeyEvents=new Map)},onClick(_){if(!(_&&!Se(_.currentTarget,ce(_)))&&_&&_.button===0&&!F.isTriggeringEvent&&!Wr.isOpening){let W=!0;if(u&&_.preventDefault(),!F.ignoreEmulatedMouseEvents&&!F.isPressed&&(F.pointerType==="virtual"||vm(_.nativeEvent))){let ee=$(_,"virtual"),z=M(_,"virtual"),L=B(_,"virtual");X(_),W=ee&&z&&L}else if(F.isPressed&&F.pointerType!=="keyboard"){let ee=F.pointerType||_.nativeEvent.pointerType||"virtual",z=M(wo(_.currentTarget,_),ee),L=B(wo(_.currentTarget,_),ee,!0);W=z&&L,F.isOverTarget=!1,X(_),j(_)}F.ignoreEmulatedMouseEvents=!1,W&&_.stopPropagation()}}},P=_=>{if(F.isPressed&&F.target&&Rb(_,F.target)){BC(ce(_),_.key)&&_.preventDefault();let W=ce(_),ee=Se(F.target,W);B(wo(F.target,_),"keyboard",ee),ee&&G(_,F.target),T(),_.key!=="Enter"&&F3(F.target)&&Se(F.target,W)&&!_[$C]&&(_[$C]=!0,Wr(F.target,_,!1)),F.isPressed=!1,F.metaKeyEvents?.delete(_.key)}else if(_.key==="Meta"&&F.metaKeyEvents?.size){let W=F.metaKeyEvents;F.metaKeyEvents=void 0;for(let ee of W.values())F.target?.dispatchEvent(new KeyboardEvent("keyup",ee))}};if(typeof PointerEvent<"u"){te.onPointerDown=ee=>{if(ee.button!==0||!Se(ee.currentTarget,ce(ee)))return;if(P3(ee.nativeEvent)){F.pointerType="virtual";return}F.pointerType=ee.pointerType;let z=!0;if(!F.isPressed){F.isPressed=!0,F.isOverTarget=!0,F.activePointerId=ee.pointerId,F.target=ee.currentTarget,m||Kj(F.target),z=$(ee,F.pointerType);let L=ce(ee);"releasePointerCapture"in L&&("hasPointerCapture"in L?L.hasPointerCapture(ee.pointerId)&&L.releasePointerCapture(ee.pointerId):L.releasePointerCapture(ee.pointerId)),D(je(ee.currentTarget),"pointerup",_,!1),D(je(ee.currentTarget),"pointercancel",W,!1)}z&&ee.stopPropagation()},te.onMouseDown=ee=>{if(Se(ee.currentTarget,ce(ee))&&ee.button===0){if(f){let z=jI(ee.target);z&&F.disposables.push(z)}ee.stopPropagation()}},te.onPointerUp=ee=>{!Se(ee.currentTarget,ce(ee))||F.pointerType==="virtual"||ee.button===0&&!F.isPressed&&M(ee,F.pointerType||ee.pointerType)},te.onPointerEnter=ee=>{ee.pointerId===F.activePointerId&&F.target&&!F.isOverTarget&&F.pointerType!=null&&(F.isOverTarget=!0,$(wo(F.target,ee),F.pointerType))},te.onPointerLeave=ee=>{ee.pointerId===F.activePointerId&&F.target&&F.isOverTarget&&F.pointerType!=null&&(F.isOverTarget=!1,B(wo(F.target,ee),F.pointerType,!1),q(ee))};let _=ee=>{if(ee.pointerId===F.activePointerId&&F.isPressed&&ee.button===0&&F.target){if(Se(F.target,ce(ee))&&F.pointerType!=null){let z=!1,L=setTimeout(()=>{F.isPressed&&F.target instanceof HTMLElement&&(z?j(ee):(Br(F.target),F.target.click()))},80);D(ee.currentTarget,"click",()=>z=!0,!0),F.disposables.push(()=>clearTimeout(L))}else j(ee);F.isOverTarget=!1}},W=ee=>{j(ee)};te.onDragStart=ee=>{Se(ee.currentTarget,ce(ee))&&j(ee)}}return te},[D,u,f,T,m,q,$,X,G]);return S.useEffect(()=>{if(!g)return;const F=je(g.current);if(!F||!F.head||F.getElementById(TC))return;const te=F.createElement("style");te.id=TC;let P=U$(F);P&&(te.nonce=P),te.textContent=`
|
|
10
|
+
@layer {
|
|
11
|
+
[${AC}] {
|
|
12
|
+
touch-action: pan-x pan-y pinch-zoom;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
`.trim(),F.head.prepend(te)},[g]),S.useEffect(()=>{let F=E.current;return()=>{m||SC(F.target??void 0);for(let te of F.disposables)te();F.disposables=[]}},[m]),{isPressed:c||x,pressProps:we(b,Z,{[AC]:!0})}}function F3(t){return t.tagName==="A"&&t.hasAttribute("href")}function Rb(t,e){const{key:n,code:r}=t,i=e,s=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof fn(i).HTMLInputElement&&!q$(i,n)||i instanceof fn(i).HTMLTextAreaElement||i.isContentEditable)&&!((s==="link"||!s&&F3(i))&&n!=="Enter")}function wo(t,e){let n=e.clientX,r=e.clientY;return{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:n,clientY:r,key:e.key}}function Vj(t){return t instanceof HTMLInputElement?!1:t instanceof HTMLButtonElement?t.type!=="submit"&&t.type!=="reset":!F3(t)}function BC(t,e){return t instanceof HTMLInputElement?!q$(t,e):Vj(t)}const Hj=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function q$(t,e){return t.type==="checkbox"||t.type==="radio"?e===" ":Hj.has(t.type)}function Uj(t,e){let{elementType:n="a",onPress:r,onPressStart:i,onPressEnd:s,onClick:a,isDisabled:u,...c}=t,f={};n!=="a"&&(f={role:"link",tabIndex:u?void 0:0});let{focusableProps:h}=Dm(t,e),{pressProps:m,isPressed:g}=gd({onPress:r,onPressStart:i,onPressEnd:s,onClick:a,isDisabled:u,ref:e}),b=Ze(c,{labelable:!0}),x=we(h,m),k=_l(),E=_w(t);return{isPressed:g,linkProps:we(b,E,{...x,...f,"aria-disabled":u||void 0,"aria-current":t["aria-current"],onClick:D=>{m.onClick?.(D),Vw(D,k,t.href,t.routerOptions)}})}}function K3(t){let{isDisabled:e,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=t,s=S.useRef({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:u}=md(),c=S.useCallback(m=>{Se(m.currentTarget,ce(m))&&s.current.isFocusWithin&&!Se(m.currentTarget,m.relatedTarget)&&(s.current.isFocusWithin=!1,u(),n&&n(m),i&&i(!1))},[n,i,s,u]),f=Lw(c),h=S.useCallback(m=>{if(!Se(m.currentTarget,ce(m)))return;let g=ce(m);const b=je(g),x=_e(b);if(!s.current.isFocusWithin&&x===g){r&&r(m),i&&i(!0),s.current.isFocusWithin=!0,f(m);let k=m.currentTarget;a(b,"focus",E=>{let D=ce(E);if(s.current.isFocusWithin&&!Se(k,D)){let T=new b.defaultView.FocusEvent("blur",{relatedTarget:D});zw(T,k);let $=M3(T);c($)}},{capture:!0})}},[r,i,f,a,c]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:h,onBlur:c}}}function Li(t={}){let{autoFocus:e=!1,isTextInput:n,within:r}=t,i=S.useRef({isFocused:!1,isFocusVisible:e||Ml()}),[s,a]=S.useState(!1),[u,c]=S.useState(()=>i.current.isFocused&&i.current.isFocusVisible),f=S.useCallback(()=>c(i.current.isFocused&&i.current.isFocusVisible),[]),h=S.useCallback(b=>{i.current.isFocused=b,i.current.isFocusVisible=Ml(),a(b),f()},[f]);JI(b=>{i.current.isFocusVisible=b,f()},[n,s],{enabled:s,isTextInput:n});let{focusProps:m}=L$({isDisabled:r,onFocusChange:h}),{focusWithinProps:g}=K3({isDisabled:!r,onFocusWithinChange:h});return{isFocused:s,isFocusVisible:u,focusProps:r?g:m}}let t4=!1,sh=0;function qj(){t4=!0,setTimeout(()=>{t4=!1},500)}function MC(t){t.pointerType==="touch"&&qj()}function Gj(){let t=je(null);if(!(typeof t>"u"))return sh===0&&typeof PointerEvent<"u"&&t.addEventListener("pointerup",MC),sh++,()=>{sh--,!(sh>0)&&typeof PointerEvent<"u"&&t.removeEventListener("pointerup",MC)}}function _i(t){let{onHoverStart:e,onHoverChange:n,onHoverEnd:r,isDisabled:i}=t,[s,a]=S.useState(!1),u=S.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;S.useEffect(Gj,[]);let{addGlobalListener:c,removeAllGlobalListeners:f}=md(),{hoverProps:h,triggerHoverEnd:m}=S.useMemo(()=>{let g=(k,E)=>{if(u.pointerType=E,i||E==="touch"||u.isHovered||!Se(k.currentTarget,ce(k)))return;u.isHovered=!0;let D=k.currentTarget;u.target=D,c(je(ce(k)),"pointerover",T=>{u.isHovered&&u.target&&!Se(u.target,ce(T))&&b(T,T.pointerType)},{capture:!0}),e&&e({type:"hoverstart",target:D,pointerType:E}),n&&n(!0),a(!0)},b=(k,E)=>{let D=u.target;u.pointerType="",u.target=null,!(E==="touch"||!u.isHovered||!D)&&(u.isHovered=!1,f(),r&&r({type:"hoverend",target:D,pointerType:E}),n&&n(!1),a(!1))},x={};return typeof PointerEvent<"u"&&(x.onPointerEnter=k=>{t4&&k.pointerType==="mouse"||g(k,k.pointerType)},x.onPointerLeave=k=>{!i&&Se(k.currentTarget,ce(k))&&b(k,k.pointerType)}),{hoverProps:x,triggerHoverEnd:b}},[e,n,r,i,u,c,f]);return S.useEffect(()=>{i&&m({currentTarget:u.target},u.pointerType)},[i]),{hoverProps:h,isHovered:s}}const G$=S.createContext(null),_3=S.forwardRef(function(e,n){[e,n]=Et(e,n,G$);let r=e.href&&!e.isDisabled?"a":"span",{linkProps:i,isPressed:s}=Uj({...e,elementType:r},n),a=ot[r],{hoverProps:u,isHovered:c}=_i(e),{focusProps:f,isFocused:h,isFocusVisible:m}=Li(),g=$t({...e,defaultClassName:"react-aria-Link",values:{isCurrent:!!e["aria-current"],isDisabled:e.isDisabled||!1,isPressed:s,isHovered:c,isFocused:h,isFocusVisible:m}}),b=Ze(e,{global:!0});return delete b.onClick,V.createElement(a,{ref:n,slot:e.slot||void 0,...we(b,g,i,u,f),"data-focused":h||void 0,"data-hovered":c||void 0,"data-pressed":s||void 0,"data-focus-visible":m||void 0,"data-current":!!e["aria-current"]||void 0,"data-disabled":e.isDisabled||void 0},g.children)});var W$={};W$={breadcrumbs:"عناصر الواجهة"};var Q$={};Q$={breadcrumbs:"Трохи хляб"};var Y$={};Y$={breadcrumbs:"Popis cesty"};var X$={};X$={breadcrumbs:"Brødkrummer"};var J$={};J$={breadcrumbs:"Breadcrumbs"};var Z$={};Z$={breadcrumbs:"Πλοηγήσεις breadcrumb"};var e6={};e6={breadcrumbs:"Breadcrumbs"};var t6={};t6={breadcrumbs:"Migas de pan"};var n6={};n6={breadcrumbs:"Lingiread"};var r6={};r6={breadcrumbs:"Navigointilinkit"};var i6={};i6={breadcrumbs:"Chemin de navigation"};var s6={};s6={breadcrumbs:"שבילי ניווט"};var o6={};o6={breadcrumbs:"Navigacijski putovi"};var a6={};a6={breadcrumbs:"Morzsamenü"};var l6={};l6={breadcrumbs:"Breadcrumb"};var u6={};u6={breadcrumbs:"パンくずリスト"};var c6={};c6={breadcrumbs:"탐색 표시"};var d6={};d6={breadcrumbs:"Naršymo kelias"};var f6={};f6={breadcrumbs:"Atpakaļceļi"};var h6={};h6={breadcrumbs:"Navigasjonsstier"};var p6={};p6={breadcrumbs:"Broodkruimels"};var m6={};m6={breadcrumbs:"Struktura nawigacyjna"};var g6={};g6={breadcrumbs:"Caminho detalhado"};var b6={};b6={breadcrumbs:"Categorias"};var y6={};y6={breadcrumbs:"Miez de pâine"};var x6={};x6={breadcrumbs:"Навигация"};var v6={};v6={breadcrumbs:"Navigačné prvky Breadcrumbs"};var k6={};k6={breadcrumbs:"Drobtine"};var C6={};C6={breadcrumbs:"Putanje navigacije"};var E6={};E6={breadcrumbs:"Sökvägar"};var D6={};D6={breadcrumbs:"İçerik haritaları"};var S6={};S6={breadcrumbs:"Навігаційна стежка"};var w6={};w6={breadcrumbs:"导航栏"};var $6={};$6={breadcrumbs:"導覽列"};var T6={};T6={"ar-AE":W$,"bg-BG":Q$,"cs-CZ":Y$,"da-DK":X$,"de-DE":J$,"el-GR":Z$,"en-US":e6,"es-ES":t6,"et-EE":n6,"fi-FI":r6,"fr-FR":i6,"he-IL":s6,"hr-HR":o6,"hu-HU":a6,"it-IT":l6,"ja-JP":u6,"ko-KR":c6,"lt-LT":d6,"lv-LV":f6,"nb-NO":h6,"nl-NL":p6,"pl-PL":m6,"pt-BR":g6,"pt-PT":b6,"ro-RO":y6,"ru-RU":x6,"sk-SK":v6,"sl-SI":k6,"sr-SP":C6,"sv-SE":E6,"tr-TR":D6,"uk-UA":S6,"zh-CN":w6,"zh-TW":$6};function Wj(t){return t&&t.__esModule?t.default:t}function Qj(t){let{"aria-label":e,...n}=t,r=gr(Wj(T6),"@react-aria/breadcrumbs");return{navProps:{...Ze(n,{labelable:!0}),"aria-label":e||r.format("breadcrumbs")}}}const n4=S.createContext(null),Yj=S.forwardRef(function(e,n){[e,n]=Et(e,n,n4);let{CollectionRoot:r}=S.useContext(Vs),{navProps:i}=Qj(e),s=Ze(e,{global:!0,labelable:!0});return V.createElement(j3,{content:V.createElement(wm,e)},a=>V.createElement(ot.ol,{render:e.render,ref:n,...we(s,i),slot:e.slot||void 0,style:e.style,className:e.className??"react-aria-Breadcrumbs"},V.createElement(n4.Provider,{value:e},V.createElement(r,{collection:a}))))}),y1=class y1 extends ca{};y1.type="item";let r4=y1;const Xj=da(r4,function(e,n,r){let i=r.nextKey==null,{isDisabled:s,onAction:a}=Kl(n4),u={"aria-current":i?"page":null,isDisabled:s||i,onPress:()=>a?.(r.key)},c=$t({...r.props,children:r.rendered,values:{isDisabled:s||i,isCurrent:i},defaultClassName:"react-aria-Breadcrumb"}),f=Ze(e,{global:!0,labelable:!0});return delete f.id,V.createElement(ot.li,{...f,...c,ref:n,"data-disabled":s||i||void 0,"data-current":i||void 0},V.createElement(G$.Provider,{value:u},c.children))}),V3=S.createContext({}),Jj=Sm(function(e,n){[e,n]=Et(e,n,V3);let{elementType:r="label",...i}=e,s=ot[r];return V.createElement(s,{className:"react-aria-Label",...i,ref:n})});function Zj(t){let{id:e,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:s="label"}=t;e=an(e);let a=an(),u={};n&&(r=r?`${a} ${r}`:a,u={id:a,htmlFor:s==="label"?e:void 0});let c=z3({id:e,"aria-label":i,"aria-labelledby":r});return{labelProps:u,fieldProps:c}}function i4(t,e=-1/0,n=1/0){return Math.min(Math.max(t,e),n)}const eF=S.createContext(null),A6=7e3;let al=null;function Po(t,e="assertive",n=A6){al?al.announce(t,e,n):(al=new tF,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?al.announce(t,e,n):setTimeout(()=>{al?.isAttached()&&al?.announce(t,e,n)},100))}class tF{constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<"u"&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}isAttached(){return this.node?.isConnected}createLog(e){let n=document.createElement("div");return n.setAttribute("role","log"),n.setAttribute("aria-live",e),n.setAttribute("aria-relevant","additions"),n}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,n="assertive",r=A6){if(!this.node)return;let i=document.createElement("div");typeof e=="object"?(i.setAttribute("role","img"),i.setAttribute("aria-labelledby",e["aria-labelledby"])):i.textContent=e,n==="assertive"?this.assertiveLog?.appendChild(i):this.politeLog?.appendChild(i),e!==""&&setTimeout(()=>{i.remove()},r)}clear(e){this.node&&((!e||e==="assertive")&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||e==="polite")&&this.politeLog&&(this.politeLog.innerHTML=""))}}function B6(t,e){let{elementType:n="button",isDisabled:r,onPress:i,onPressStart:s,onPressEnd:a,onPressUp:u,onPressChange:c,preventFocusOnPress:f,allowFocusWhenDisabled:h,onClick:m,href:g,target:b,rel:x,type:k="button"}=t,E;n==="button"?E={type:k,disabled:r,form:t.form,formAction:t.formAction,formEncType:t.formEncType,formMethod:t.formMethod,formNoValidate:t.formNoValidate,formTarget:t.formTarget,name:t.name,value:t.value}:E={role:"button",href:n==="a"&&!r?g:void 0,target:n==="a"?b:void 0,type:n==="input"?k:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?x:void 0};let{pressProps:D,isPressed:T}=gd({onPressStart:s,onPressEnd:a,onPressChange:c,onPress:i,onPressUp:u,onClick:m,isDisabled:r,preventFocusOnPress:f,ref:e}),{focusableProps:$}=Dm(t,e);h&&($.tabIndex=r?-1:$.tabIndex);let A=we($,D,Ze(t,{labelable:!0}));return{isPressed:T,buttonProps:we(E,A,{"aria-haspopup":t["aria-haspopup"],"aria-expanded":t["aria-expanded"],"aria-controls":t["aria-controls"],"aria-pressed":t["aria-pressed"],"aria-current":t["aria-current"],"aria-disabled":t["aria-disabled"]})}}const $m=S.createContext({}),M6=Sm(function(e,n){[e,n]=Et(e,n,$m);let r=e,{isPending:i}=r,{buttonProps:s,isPressed:a}=B6(e,n);s=rF(s,i);let{focusProps:u,isFocused:c,isFocusVisible:f}=Li(e),{hoverProps:h,isHovered:m}=_i({...e,isDisabled:e.isDisabled||i}),g={isHovered:m,isPressed:(r.isPressed||a)&&!i,isFocused:c,isFocusVisible:f,isDisabled:e.isDisabled||!1,isPending:i??!1},b=$t({...e,values:g,defaultClassName:"react-aria-Button"}),x=an(s.id),k=an(),E=s["aria-labelledby"];i&&(E?E=`${E} ${k}`:s["aria-label"]&&(E=`${x} ${k}`));let D=S.useRef(i);S.useEffect(()=>{let $={"aria-labelledby":E||x};(!D.current&&c&&i||D.current&&c&&!i)&&Po($,"assertive"),D.current=i},[i,c,E,x]);let T=Ze(e,{global:!0});return delete T.onClick,V.createElement(ot.button,{...we(T,b,s,u,h),type:s.type==="submit"&&i?"button":s.type,id:x,ref:n,"aria-labelledby":E,slot:e.slot||void 0,"aria-disabled":i?"true":s["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":g.isPressed||void 0,"data-hovered":m||void 0,"data-focused":c||void 0,"data-pending":i||void 0,"data-focus-visible":f||void 0},V.createElement(eF.Provider,{value:{id:k}},b.children))}),nF=/Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/;function rF(t,e){if(e){for(const n in t)n.startsWith("on")&&!nF.test(n)&&(t[n]=void 0);t.href=void 0,t.target=void 0}return t}const N6=S.createContext({}),iF=S.forwardRef(function(e,n){[e,n]=Et(e,n,N6);let{children:r,level:i=3,className:s,...a}=e,u=ot[`h${i}`];return V.createElement(u,{...a,ref:n,className:s??"react-aria-Heading"},r)}),H3=S.createContext({});function sF(t,e){const n=S.useRef(!0),r=S.useRef(null);let i=Pt(t);S.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[]),S.useEffect(()=>{let s=r.current;n.current?n.current=!1:(!s||e.some((a,u)=>!Object.is(a,s[u])))&&i(),r.current=e},e)}function Hs(t,e){if(!t)return!1;let n=window.getComputedStyle(t),r=document.scrollingElement||document.documentElement,i=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return t===r&&n.overflow!=="hidden"&&(i=!0),i&&e&&(i=t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth),i}function Ur(t,e){let n=t;for(Hs(n,e)&&(n=n.parentElement);n&&!Hs(n,e);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function Ob(t,e){let n=[],r=document.scrollingElement||document.documentElement;for(;t&&(Hs(t,e)&&n.push(t),t!==r);)t=t.parentElement;return n}function Lh(t,e,n={}){let{block:r="nearest",inline:i="nearest"}=n;if(t===e)return;let s=t.scrollTop,a=t.scrollLeft,u=e.getBoundingClientRect(),c=t.getBoundingClientRect(),f=window.getComputedStyle(e),h=window.getComputedStyle(t),m=document.scrollingElement||document.documentElement,g=t===m,b=t===m?0:c.top,x=t===m?t.clientHeight:c.bottom,k=t===m?0:c.left,E=t===m?t.clientWidth:c.right,D=parseFloat(f.scrollMarginTop)||0,T=parseFloat(f.scrollMarginBottom)||0,$=parseFloat(f.scrollMarginLeft)||0,A=parseFloat(f.scrollMarginRight)||0,B=parseFloat(h.scrollPaddingTop)||0,R=parseFloat(h.scrollPaddingBottom)||0,M=parseFloat(h.scrollPaddingLeft)||0,O=parseFloat(h.scrollPaddingRight)||0,j=parseFloat(h.borderTopWidth)||0,q=parseFloat(h.borderBottomWidth)||0,X=parseFloat(h.borderLeftWidth)||0,G=parseFloat(h.borderRightWidth)||0,Z=u.top-D,F=u.bottom+T,te=u.left-$,P=u.right+A,_=t===m?0:X+G,W=t===m?0:j+q,ee=t===m?0:t.offsetWidth-t.clientWidth-_,z=t===m?0:t.offsetHeight-t.clientHeight-W,L=b+(g?0:j)+B,H=x-(g?0:q)-R-z,ie=k+(g?0:X)+M,le=E-(g?0:G)-O;h.direction==="rtl"&&!Pi()?ie+=ee:le-=ee;let de=Z<L||F>H,he=te<ie||P>le;if(de&&r==="start")s+=Z-L;else if(de&&r==="center")s+=(Z+F)/2-(L+H)/2;else if(de&&r==="end")s+=F-H;else if(de&&r==="nearest"){let Ce=Z-L,Qe=F-H;s+=Math.abs(Ce)<=Math.abs(Qe)?Ce:Qe}if(he&&i==="start")a+=te-ie;else if(he&&i==="center")a+=(te+P)/2-(ie+le)/2;else if(he&&i==="end")a+=P-le;else if(he&&i==="nearest"){let Ce=te-ie,Qe=P-le;a+=Math.abs(Ce)<=Math.abs(Qe)?Ce:Qe}t.scrollTo({left:a,top:s})}function ks(t,e={}){let{containingElement:n}=e;if(t&&t.isConnected){let r=document.scrollingElement||document.documentElement;if(window.getComputedStyle(r).overflow==="hidden"){let{left:s,top:a}=t.getBoundingClientRect(),u=Ob(t,!0);for(let h of u)Lh(h,t);let{left:c,top:f}=t.getBoundingClientRect();if(Math.abs(s-c)>1||Math.abs(a-f)>1){u=n?Ob(n,!0):[];for(let h of u)Lh(h,n,{block:"center",inline:"center"});for(let h of Ob(t,!0))Lh(h,t)}}else{let{left:s,top:a}=t.getBoundingClientRect();t?.scrollIntoView?.({block:"nearest"});let{left:u,top:c}=t.getBoundingClientRect();(Math.abs(s-u)>1||Math.abs(a-c)>1)&&(n?.scrollIntoView?.({block:"center",inline:"center"}),t.scrollIntoView?.({block:"nearest"}))}}}let oF=0;const Pb=new Map;function bd(t){let[e,n]=S.useState();return Ie(()=>{if(!t)return;let r=Pb.get(t);if(r)n(r.element.id);else{let i=`react-aria-description-${oF++}`;n(i);let s=document.createElement("div");s.id=i,s.style.display="none",s.textContent=t,document.body.appendChild(s),r={refCount:0,element:s},Pb.set(t,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),Pb.delete(t))}},[t]),{"aria-describedby":t?e:void 0}}const NC={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function Tm(t={}){let{style:e,isFocusable:n}=t,[r,i]=S.useState(!1),{focusWithinProps:s}=K3({isDisabled:!n,onFocusWithinChange:u=>i(u)}),a=S.useMemo(()=>r?e:e?{...NC,...e}:NC,[r]);return{visuallyHiddenProps:{...s,style:a}}}function aF(t){let{children:e,elementType:n="div",isFocusable:r,style:i,...s}=t,{visuallyHiddenProps:a}=Tm(t);return V.createElement(n,we(s,a),e)}const lF=S.createContext(null),R6={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},O6={...R6,customError:!0,valid:!1},Yu={isInvalid:!1,validationDetails:R6,validationErrors:[]},uF=S.createContext({}),RC="__reactAriaFormValidationState";function cF(t){if(t[RC]){let{realtimeValidation:e,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:s}=t[RC];return{realtimeValidation:e,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:s}}return dF(t)}function dF(t){let{isInvalid:e,validationState:n,name:r,value:i,builtinValidation:s,validate:a,validationBehavior:u="aria"}=t;n&&(e||=n==="invalid");let c=e!==void 0?{isInvalid:e,validationErrors:[],validationDetails:O6}:null,f=S.useMemo(()=>{if(!a||i==null)return null;let q=fF(a,i);return OC(q)},[a,i]);s?.validationDetails.valid&&(s=void 0);let h=S.useContext(uF),m=S.useMemo(()=>r?Array.isArray(r)?r.flatMap(q=>s4(h[q])):s4(h[r]):[],[h,r]),[g,b]=S.useState(h),[x,k]=S.useState(!1);h!==g&&(b(h),k(!1));let E=S.useMemo(()=>OC(x?[]:m),[x,m]),D=S.useRef(Yu),[T,$]=S.useState(Yu),A=S.useRef(Yu),B=()=>{if(!R)return;M(!1);let q=f||s||D.current;zb(q,A.current)||(A.current=q,$(q))},[R,M]=S.useState(!1);return S.useEffect(B),{realtimeValidation:c||E||f||s||Yu,displayValidation:u==="native"?c||E||T:c||E||f||s||T,updateValidation(q){u==="aria"&&!zb(T,q)?$(q):D.current=q},resetValidation(){let q=Yu;zb(q,A.current)||(A.current=q,$(q)),u==="native"&&M(!1),k(!0)},commitValidation(){u==="native"&&M(!0),k(!0)}}}function s4(t){return t?Array.isArray(t)?t:[t]:[]}function fF(t,e){if(typeof t=="function"){let n=t(e);if(n&&typeof n!="boolean")return s4(n)}return[]}function OC(t){return t.length?{isInvalid:!0,validationErrors:t,validationDetails:O6}:null}function zb(t,e){return t===e?!0:!!t&&!!e&&t.isInvalid===e.isInvalid&&t.validationErrors.length===e.validationErrors.length&&t.validationErrors.every((n,r)=>n===e.validationErrors[r])&&Object.entries(t.validationDetails).every(([n,r])=>e.validationDetails[n]===r)}const hF=S.createContext(null);function pF(t){let{description:e,errorMessage:n,isInvalid:r,validationState:i}=t,{labelProps:s,fieldProps:a}=Zj(t),u=Ho([!!e,!!n,r,i]),c=Ho([!!e,!!n,r,i]);return a=we(a,{"aria-describedby":[u,c,t["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:s,fieldProps:a,descriptionProps:{id:u},errorMessageProps:{id:c}}}function mF(t,e,n){let r=Pt(i=>{n&&!i.defaultPrevented&&n(e)});S.useEffect(()=>{let i=t?.current?.form;return i?.addEventListener("reset",r),()=>{i?.removeEventListener("reset",r)}},[t])}function gF(t,e,n){let{validationBehavior:r,focus:i}=t;Ie(()=>{if(r==="native"&&n?.current&&"setCustomValidity"in n.current&&!n.current.disabled){let f=e.realtimeValidation.isInvalid?e.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(f),n.current.hasAttribute("title")||(n.current.title=""),e.realtimeValidation.isInvalid||e.updateValidation(yF(n.current))}});let s=S.useRef(!1),a=Pt(()=>{s.current||e.resetValidation()}),u=Pt(f=>{e.displayValidation.isInvalid||e.commitValidation();let h=n?.current?.form;!f.defaultPrevented&&n&&h&&xF(h)===n.current&&(i?i():n.current?.focus(),Oo("keyboard")),f.preventDefault()}),c=Pt(()=>{e.commitValidation()});S.useEffect(()=>{let f=n?.current;if(!f)return;let h=f.form,m=h?.reset;return h&&(h.reset=()=>{s.current=!window.event||window.event.type==="message"&&ce(window.event)instanceof MessagePort,m?.call(h),s.current=!1}),f.addEventListener("invalid",u),f.addEventListener("change",c),h?.addEventListener("reset",a),()=>{f.removeEventListener("invalid",u),f.removeEventListener("change",c),h?.removeEventListener("reset",a),h&&(h.reset=m)}},[n,r])}function bF(t){let e=t.validity;return{badInput:e.badInput,customError:e.customError,patternMismatch:e.patternMismatch,rangeOverflow:e.rangeOverflow,rangeUnderflow:e.rangeUnderflow,stepMismatch:e.stepMismatch,tooLong:e.tooLong,tooShort:e.tooShort,typeMismatch:e.typeMismatch,valueMissing:e.valueMissing,valid:e.valid}}function yF(t){return{isInvalid:!t.validity.valid,validationDetails:bF(t),validationErrors:t.validationMessage?[t.validationMessage]:[]}}function xF(t){for(let e=0;e<t.elements.length;e++){let n=t.elements[e];if(n.validity?.valid===!1)return n}return null}function vF(t={}){let{isReadOnly:e}=t,[n,r]=Zs(t.isSelected,t.defaultSelected||!1,t.onChange),[i]=S.useState(n);function s(u){e||r(u)}function a(){e||r(!n)}return{isSelected:n,defaultSelected:t.defaultSelected??i,setSelected:s,toggle:a}}const kF=S.createContext(null),CF=S.createContext(null),P6=S.createContext({}),EF=S.forwardRef(function(e,n){[e,n]=Et(e,n,P6);let{isDisabled:r,isInvalid:i,isReadOnly:s,onHoverStart:a,onHoverChange:u,onHoverEnd:c,...f}=e;r??=!!e["aria-disabled"]&&e["aria-disabled"]!=="false",i??=!!e["aria-invalid"]&&e["aria-invalid"]!=="false";let{hoverProps:h,isHovered:m}=_i({onHoverStart:a,onHoverChange:u,onHoverEnd:c,isDisabled:r}),{isFocused:g,isFocusVisible:b,focusProps:x}=Li({within:!0}),k=$t({...e,values:{isHovered:m,isFocusWithin:g,isFocusVisible:b,isDisabled:r,isInvalid:i},defaultClassName:"react-aria-Group"});return V.createElement(ot.div,{...we(f,x,h),...k,ref:n,role:e.role??"group",slot:e.slot??void 0,"data-focus-within":g||void 0,"data-hovered":m||void 0,"data-focus-visible":b||void 0,"data-disabled":r||void 0,"data-invalid":i||void 0,"data-readonly":s||void 0},k.children)}),z6=S.createContext({});let DF=t=>{let{onHoverStart:e,onHoverChange:n,onHoverEnd:r,...i}=t;return i};const L6=Sm(function(e,n){[e,n]=Et(e,n,z6);let{hoverProps:r,isHovered:i}=_i({...e,isDisabled:e.disabled}),{isFocused:s,isFocusVisible:a,focusProps:u}=Li({isTextInput:!0,autoFocus:e.autoFocus}),c=!!e["aria-invalid"]&&e["aria-invalid"]!=="false",f=$t({...e,values:{isHovered:i,isFocused:s,isFocusVisible:a,isDisabled:e.disabled||!1,isInvalid:c},defaultClassName:"react-aria-Input"});return V.createElement(ot.input,{...we(DF(e),u,r),...f,ref:n,"data-focused":s||void 0,"data-disabled":e.disabled||void 0,"data-hovered":i||void 0,"data-focus-visible":a||void 0,"data-invalid":c||void 0})});function SF(t,e){let{inputElementType:n="input",isDisabled:r=!1,isRequired:i=!1,isReadOnly:s=!1,type:a="text",validationBehavior:u="aria"}=t,[c,f]=Zs(t.value,t.defaultValue||"",t.onChange),{focusableProps:h}=Dm(t,e),m=cF({...t,value:c}),{isInvalid:g,validationErrors:b,validationDetails:x}=m.displayValidation,{labelProps:k,fieldProps:E,descriptionProps:D,errorMessageProps:T}=pF({...t,isInvalid:g,errorMessage:t.errorMessage||b}),$=Ze(t,{labelable:!0});const A={type:a,pattern:t.pattern};let[B]=S.useState(c);return mF(e,t.defaultValue??B,f),gF(t,m,e),{labelProps:k,inputProps:we($,n==="input"?A:void 0,{disabled:r,readOnly:s,required:i&&u==="native","aria-required":i&&u==="aria"||void 0,"aria-invalid":g||void 0,"aria-errormessage":t["aria-errormessage"],"aria-activedescendant":t["aria-activedescendant"],"aria-autocomplete":t["aria-autocomplete"],"aria-haspopup":t["aria-haspopup"],"aria-controls":t["aria-controls"],value:c,onChange:R=>f(ce(R).value),autoComplete:t.autoComplete,autoCapitalize:t.autoCapitalize,maxLength:t.maxLength,minLength:t.minLength,name:t.name,form:t.form,placeholder:t.placeholder,inputMode:t.inputMode,autoCorrect:t.autoCorrect,spellCheck:t.spellCheck,[parseInt(V.version,10)>=17?"enterKeyHint":"enterkeyhint"]:t.enterKeyHint,onCopy:t.onCopy,onCut:t.onCut,onPaste:t.onPaste,onCompositionEnd:t.onCompositionEnd,onCompositionStart:t.onCompositionStart,onCompositionUpdate:t.onCompositionUpdate,onSelect:t.onSelect,onBeforeInput:t.onBeforeInput,onInput:t.onInput,...h,...E}),descriptionProps:D,errorMessageProps:T,isInvalid:g,validationErrors:b,validationDetails:x}}const Am=S.createContext({}),I6=S.createContext(null),j6=S.forwardRef(function(e,n){let{render:r}=S.useContext(I6);return V.createElement(V.Fragment,null,r(e,n))});function wF(t,e){let n=t?.renderDropIndicator,r=t?.isVirtualDragging?.(),i=S.useCallback(s=>{if(r||e?.isDropTarget(s))return n?n(s):V.createElement(j6,{target:s})},[e?.target,r,n]);return t?.useDropIndicator?i:void 0}function $F(t,e,n){let r=t.focusedKey,i=null;if(e?.isVirtualDragging?.()&&n?.target?.type==="item"&&(i=n.target.key,n.target.dropPosition==="after")){let s=n.collection.getKeyAfter(i),a=null;if(s!=null){let u=n.collection.getItem(i)?.level??0;for(;s!=null;){let c=n.collection.getItem(s);if(!c)break;if(c.type!=="item"){s=n.collection.getKeyAfter(s);continue}if((c.level??0)<=u)break;a=s,s=n.collection.getKeyAfter(s)}}i=s??a??i}return S.useMemo(()=>new Set([r,i].filter(s=>s!=null)),[r,i])}const F6=S.createContext({}),TF=da(Qy,function(e,n){return[e,n]=Et(e,n,F6),V.createElement(ot.header,{className:"react-aria-Header",...e,ref:n},e.children)}),AF=S.createContext(null);function U3(t){let e=S.useRef({});return V.createElement(AF.Provider,{value:e},t.children)}const q3=S.createContext({isSelected:!1});function BF(t){let e=Ze(t,{labelable:!0}),n;return t.orientation==="vertical"&&(n="vertical"),t.elementType!=="hr"?{separatorProps:{...e,role:"separator","aria-orientation":n}}:{separatorProps:e}}const K6=S.createContext({}),x1=class x1 extends ca{filter(e,n){let r=n.getItem(this.prevKey);if(r&&r.type!=="separator"){let i=this.clone();return n.addDescendants(i,e),i}return null}};x1.type="separator";let o4=x1;const MF=da(o4,function(e,n){[e,n]=Et(e,n,K6);let{elementType:r,orientation:i,style:s,className:a,slot:u,...c}=e,f=r||"hr";f==="hr"&&i==="vertical"&&(f="div");let h=ot[f],{separatorProps:m}=BF({...c,elementType:r,orientation:i}),g=Ze(e,{global:!0});return V.createElement(h,{render:e.render,...we(g,m),style:s,className:a??"react-aria-Separator",ref:n,slot:u||void 0})});class NF{constructor(e,n,r,i){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=a=>{if(a.nodeType===Node.ELEMENT_NODE){const u=a.shadowRoot;if(u){const c=this._doc.createTreeWalker(u,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(c),NodeFilter.FILTER_ACCEPT}else{if(typeof this.filter=="function")return this.filter(a);if(this.filter?.acceptNode)return this.filter.acceptNode(a);if(this.filter===null)return NodeFilter.FILTER_ACCEPT}}return NodeFilter.FILTER_SKIP},this._doc=e,this.root=n,this.filter=i??null,this.whatToShow=r??NodeFilter.SHOW_ALL,this._currentNode=n,this._walkerStack.unshift(e.createTreeWalker(n,r,this._acceptNode));const s=n.shadowRoot;if(s){const a=this._doc.createTreeWalker(s,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(a)}}get currentNode(){return this._currentNode}set currentNode(e){if(!Se(this.root,e))throw new Error("Cannot set currentNode to a node that is not contained by the root node.");const n=[];let r=e,i=e;for(this._currentNode=e;r&&r!==this.root;)if(r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const a=r,u=this._doc.createTreeWalker(a,this.whatToShow,{acceptNode:this._acceptNode});n.push(u),u.currentNode=i,this._currentSetFor.add(u),r=i=a.host}else r=r.parentNode;const s=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});n.push(s),s.currentNode=i,this._currentSetFor.add(s),this._walkerStack=n}get doc(){return this._doc}firstChild(){let e=this.currentNode,n=this.nextNode();return Se(e,n)?(n&&(this.currentNode=n),n):(this.currentNode=e,null)}lastChild(){let n=this._walkerStack[0].lastChild();return n&&(this.currentNode=n),n}nextNode(){const e=this._walkerStack[0].nextNode();if(e){if(e.shadowRoot){let r;if(typeof this.filter=="function"?r=this.filter(e):this.filter?.acceptNode&&(r=this.filter.acceptNode(e)),r===NodeFilter.FILTER_ACCEPT)return this.currentNode=e,e;let i=this.nextNode();return i&&(this.currentNode=i),i}return e&&(this.currentNode=e),e}else if(this._walkerStack.length>1){this._walkerStack.shift();let n=this.nextNode();return n&&(this.currentNode=n),n}else return null}previousNode(){const e=this._walkerStack[0];if(e.currentNode===e.root){if(this._currentSetFor.has(e))if(this._currentSetFor.delete(e),this._walkerStack.length>1){this._walkerStack.shift();let r=this.previousNode();return r&&(this.currentNode=r),r}else return null;return null}const n=e.previousNode();if(n){if(n.shadowRoot){let i;if(typeof this.filter=="function"?i=this.filter(n):this.filter?.acceptNode&&(i=this.filter.acceptNode(n)),i===NodeFilter.FILTER_ACCEPT)return n&&(this.currentNode=n),n;let s=this.lastChild();return s&&(this.currentNode=s),s}return n&&(this.currentNode=n),n}else if(this._walkerStack.length>1){this._walkerStack.shift();let r=this.previousNode();return r&&(this.currentNode=r),r}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}}function _6(t,e,n,r){return Si()?new NF(t,e,n,r):t.createTreeWalker(e,n,r)}const PC=V.createContext(null),a4="react-aria-focus-scope-restore";let at=null;function G3(t){let{children:e,contain:n,restoreFocus:r,autoFocus:i}=t,s=S.useRef(null),a=S.useRef(null),u=S.useRef([]),{parentNode:c}=S.useContext(PC)||{},f=S.useMemo(()=>new u4({scopeRef:u}),[u]);Ie(()=>{let g=c||Nt.root;if(Nt.getTreeNode(g.scopeRef)&&at&&!lp(at,g.scopeRef)){let b=Nt.getTreeNode(at);b&&(g=b)}g.addChild(f),Nt.addNode(f)},[f,c]),Ie(()=>{let g=Nt.getTreeNode(u);g&&(g.contain=!!n)},[n]),Ie(()=>{let g=s.current?.nextSibling,b=[],x=k=>k.stopPropagation();for(;g&&g!==a.current;)b.push(g),g.addEventListener(a4,x),g=g.nextSibling;return u.current=b,()=>{for(let k of b)k.removeEventListener(a4,x)}},[e]),jF(u,r,n),zF(u,n),FF(u,r,n),IF(u,i),S.useEffect(()=>{const g=_e(je(u.current?u.current[0]:void 0));let b=null;if(mr(g,u.current)){for(let x of Nt.traverse())x.scopeRef&&mr(g,x.scopeRef.current)&&(b=x);b===Nt.getTreeNode(u)&&(at=b.scopeRef)}},[u]),Ie(()=>()=>{let g=Nt.getTreeNode(u)?.parent?.scopeRef??null;(u===at||lp(u,at))&&(!g||Nt.getTreeNode(g))&&(at=g),Nt.removeTreeNode(u)},[u]);let h=S.useMemo(()=>RF(u),[]),m=S.useMemo(()=>({focusManager:h,parentNode:f}),[f,h]);return V.createElement(PC.Provider,{value:m},V.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:s}),e,V.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:a}))}function RF(t){return{focusNext(e={}){let n=t.current,{from:r,tabbable:i,wrap:s,accept:a}=e,u=r||_e(je(n[0]??void 0)),c=n[0].previousElementSibling,f=zo(n),h=dn(f,{tabbable:i,accept:a},n);h.currentNode=mr(u,n)?u:c;let m=h.nextNode();return!m&&s&&(h.currentNode=c,m=h.nextNode()),m&&Pn(m,!0),m},focusPrevious(e={}){let n=t.current,{from:r,tabbable:i,wrap:s,accept:a}=e,u=r||_e(je(n[0]??void 0)),c=n[n.length-1].nextElementSibling,f=zo(n),h=dn(f,{tabbable:i,accept:a},n);h.currentNode=mr(u,n)?u:c;let m=h.previousNode();return!m&&s&&(h.currentNode=c,m=h.previousNode()),m&&Pn(m,!0),m},focusFirst(e={}){let n=t.current,{tabbable:r,accept:i}=e,s=zo(n),a=dn(s,{tabbable:r,accept:i},n);a.currentNode=n[0].previousElementSibling;let u=a.nextNode();return u&&Pn(u,!0),u},focusLast(e={}){let n=t.current,{tabbable:r,accept:i}=e,s=zo(n),a=dn(s,{tabbable:r,accept:i},n);a.currentNode=n[n.length-1].nextElementSibling;let u=a.previousNode();return u&&Pn(u,!0),u}}}function zo(t){return t[0].parentElement}function lc(t){let e=Nt.getTreeNode(at);for(;e&&e.scopeRef!==t;){if(e.contain)return!1;e=e.parent}return!0}function OF(t){if(!t.form)return Array.from(je(t).querySelectorAll(`input[type="radio"][name="${CSS.escape(t.name)}"]`)).filter(r=>!r.form);const e=t.form.elements.namedItem(t.name);let n=fn(t);return e instanceof n.RadioNodeList?Array.from(e).filter(r=>r instanceof n.HTMLInputElement):e instanceof n.HTMLInputElement?[e]:[]}function PF(t){if(t.checked)return!0;const e=OF(t);return e.length>0&&!e.some(n=>n.checked)}function zF(t,e){let n=S.useRef(void 0),r=S.useRef(void 0);Ie(()=>{let i=t.current;if(!e){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const s=je(i?i[0]:void 0);let a=f=>{if(f.key!=="Tab"||f.altKey||f.ctrlKey||f.metaKey||!lc(t)||f.isComposing)return;let h=_e(s),m=t.current;if(!m||!mr(h,m))return;let g=zo(m),b=dn(g,{tabbable:!0},m);if(!h)return;b.currentNode=h;let x=f.shiftKey?b.previousNode():b.nextNode();x||(b.currentNode=f.shiftKey?m[m.length-1].nextElementSibling:m[0].previousElementSibling,x=f.shiftKey?b.previousNode():b.nextNode()),f.preventDefault(),x&&(Pn(x,!0),x instanceof fn(x).HTMLInputElement&&x.select())},u=f=>{(!at||lp(at,t))&&mr(ce(f),t.current)?(at=t,n.current=ce(f)):lc(t)&&!As(ce(f),t)?n.current?n.current.focus():at&&at.current&&l4(at.current):lc(t)&&(n.current=ce(f))},c=f=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let h=Zo(),m=(h==="virtual"||h===null)&&xm()&&Iw(),g=_e(s);if(!m&&g&&lc(t)&&!As(g,t)){at=t;let b=ce(f);b&&b.isConnected?(n.current=b,n.current?.focus()):at.current&&l4(at.current)}})};return s.addEventListener("keydown",a,!1),s.addEventListener("focusin",u,!1),i?.forEach(f=>f.addEventListener("focusin",u,!1)),i?.forEach(f=>f.addEventListener("focusout",c,!1)),()=>{s.removeEventListener("keydown",a,!1),s.removeEventListener("focusin",u,!1),i?.forEach(f=>f.removeEventListener("focusin",u,!1)),i?.forEach(f=>f.removeEventListener("focusout",c,!1))}},[t,e]),Ie(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function V6(t){return As(t)}function mr(t,e){return!t||!e?!1:e.some(n=>Se(n,t))}function As(t,e=null){if(t instanceof Element&&t.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of Nt.traverse(Nt.getTreeNode(e)))if(n&&mr(t,n.current))return!0;return!1}function LF(t){return As(t,at)}function lp(t,e){let n=Nt.getTreeNode(e)?.parent;for(;n;){if(n.scopeRef===t)return!0;n=n.parent}return!1}function Pn(t,e=!1){if(t!=null&&!e)try{bn(t)}catch{}else if(t!=null)try{t.focus()}catch{}}function H6(t,e=!0){let n=t[0].previousElementSibling,r=zo(t),i=dn(r,{tabbable:e},t);i.currentNode=n;let s=i.nextNode();return e&&!s&&(r=zo(t),i=dn(r,{tabbable:!1},t),i.currentNode=n,s=i.nextNode()),s}function l4(t,e=!0){Pn(H6(t,e))}function IF(t,e){const n=V.useRef(e);S.useEffect(()=>{if(n.current){at=t;const r=je(t.current?t.current[0]:void 0);!mr(_e(r),at.current)&&t.current&&l4(t.current)}n.current=!1},[t])}function jF(t,e,n){Ie(()=>{if(e||n)return;let r=t.current;const i=je(r?r[0]:void 0);let s=a=>{let u=ce(a);mr(u,t.current)?at=t:V6(u)||(at=null)};return i.addEventListener("focusin",s,!1),r?.forEach(a=>a.addEventListener("focusin",s,!1)),()=>{i.removeEventListener("focusin",s,!1),r?.forEach(a=>a.removeEventListener("focusin",s,!1))}},[t,e,n])}function zC(t){let e=Nt.getTreeNode(at);for(;e&&e.scopeRef!==t;){if(e.nodeToRestore)return!1;e=e.parent}return e?.scopeRef===t}function FF(t,e,n){const r=S.useRef(typeof document<"u"?_e(je(t.current?t.current[0]:void 0)):null);Ie(()=>{let i=t.current;const s=je(i?i[0]:void 0);if(!e||n)return;let a=()=>{(!at||lp(at,t))&&mr(_e(s),t.current)&&(at=t)};return s.addEventListener("focusin",a,!1),i?.forEach(u=>u.addEventListener("focusin",a,!1)),()=>{s.removeEventListener("focusin",a,!1),i?.forEach(u=>u.removeEventListener("focusin",a,!1))}},[t,n]),Ie(()=>{const i=je(t.current?t.current[0]:void 0);if(!e)return;let s=a=>{if(a.key!=="Tab"||a.altKey||a.ctrlKey||a.metaKey||!lc(t)||a.isComposing)return;let u=i.activeElement;if(!As(u,t)||!zC(t))return;let c=Nt.getTreeNode(t);if(!c)return;let f=c.nodeToRestore,h=dn(i.body,{tabbable:!0});h.currentNode=u;let m=a.shiftKey?h.previousNode():h.nextNode();if((!f||!f.isConnected||f===i.body)&&(f=void 0,c.nodeToRestore=void 0),(!m||!As(m,t))&&f){h.currentNode=f;do m=a.shiftKey?h.previousNode():h.nextNode();while(As(m,t));a.preventDefault(),a.stopPropagation(),m?Pn(m,!0):V6(f)?Pn(f,!0):u.blur()}};return n||i.addEventListener("keydown",s,!0),()=>{n||i.removeEventListener("keydown",s,!0)}},[t,e,n]),Ie(()=>{const i=je(t.current?t.current[0]:void 0);if(!e)return;let s=Nt.getTreeNode(t);if(s)return s.nodeToRestore=r.current??void 0,()=>{let a=Nt.getTreeNode(t);if(!a)return;let u=a.nodeToRestore,c=_e(i);if(e&&u&&(c&&As(c,t)||c===i.body&&zC(t))){let f=Nt.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let h=f.getTreeNode(t);for(;h;){if(h.nodeToRestore&&h.nodeToRestore.isConnected){LC(h.nodeToRestore);return}h=h.parent}for(h=f.getTreeNode(t);h;){if(h.scopeRef&&h.scopeRef.current&&Nt.getTreeNode(h.scopeRef)){let m=H6(h.scopeRef.current,!0);LC(m);return}h=h.parent}}})}}},[t,e])}function LC(t){t.dispatchEvent(new CustomEvent(a4,{bubbles:!0,cancelable:!0}))&&Pn(t)}function dn(t,e,n){let r=e?.tabbable?tp:Ow,i=t?.nodeType===Node.ELEMENT_NODE?t:null,s=je(i),a=_6(s,t||s,NodeFilter.SHOW_ELEMENT,{acceptNode(u){return Se(e?.from,u)||e?.tabbable&&u.tagName==="INPUT"&&u.getAttribute("type")==="radio"&&(!PF(u)||a.currentNode.tagName==="INPUT"&&a.currentNode.type==="radio"&&a.currentNode.name===u.name)?NodeFilter.FILTER_REJECT:r(u)&&(!n||mr(u,n))&&(!e?.accept||e.accept(u))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e?.from&&(a.currentNode=e.from),a}function KF(t,e={}){return{focusNext(n={}){let r=t.current;if(!r)return null;let{from:i,tabbable:s=e.tabbable,wrap:a=e.wrap,accept:u=e.accept}=n,c=i||_e(je(r)),f=dn(r,{tabbable:s,accept:u});Se(r,c)&&(f.currentNode=c);let h=f.nextNode();return!h&&a&&(f.currentNode=r,h=f.nextNode()),h&&Pn(h,!0),h},focusPrevious(n=e){let r=t.current;if(!r)return null;let{from:i,tabbable:s=e.tabbable,wrap:a=e.wrap,accept:u=e.accept}=n,c=i||_e(je(r)),f=dn(r,{tabbable:s,accept:u});if(Se(r,c))f.currentNode=c;else{let m=Lb(f);return m&&Pn(m,!0),m??null}let h=f.previousNode();if(!h&&a){f.currentNode=r;let m=Lb(f);if(!m)return null;h=m}return h&&Pn(h,!0),h??null},focusFirst(n=e){let r=t.current;if(!r)return null;let{tabbable:i=e.tabbable,accept:s=e.accept}=n,u=dn(r,{tabbable:i,accept:s}).nextNode();return u&&Pn(u,!0),u},focusLast(n=e){let r=t.current;if(!r)return null;let{tabbable:i=e.tabbable,accept:s=e.accept}=n,a=dn(r,{tabbable:i,accept:s}),u=Lb(a);return u&&Pn(u,!0),u??null}}}function Lb(t){let e,n;do n=t.lastChild(),n&&(e=n);while(n);return e}class W3{constructor(){this.fastMap=new Map,this.root=new u4({scopeRef:null}),this.fastMap.set(null,this.root)}get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,n,r){let i=this.fastMap.get(n??null);if(!i)return;let s=new u4({scopeRef:e});i.addChild(s),s.parent=i,this.fastMap.set(e,s),r&&(s.nodeToRestore=r)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let n=this.fastMap.get(e);if(!n)return;let r=n.parent;for(let s of this.traverse())s!==n&&n.nodeToRestore&&s.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&mr(s.nodeToRestore,n.scopeRef.current)&&(s.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(s=>r&&r.addChild(s))),this.fastMap.delete(n.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let n of e.children)yield*this.traverse(n)}clone(){let e=new W3;for(let n of this.traverse())e.addTreeNode(n.scopeRef,n.parent?.scopeRef??null,n.nodeToRestore);return e}}class u4{constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}}let Nt=new W3;function c4(t){return KI()?t.altKey:t.ctrlKey}function Uo(t,e){let n=`[data-key="${CSS.escape(String(e))}"]`,r=t.current?.dataset.collection;return r&&(n=`[data-collection="${CSS.escape(r)}"]${n}`),t.current?.querySelector(n)}const U6=new WeakMap;function _F(t){let e=an();return U6.set(t,e),e}function VF(t){return U6.get(t)}const IC=1e3;function HF(t){let{keyboardDelegate:e,selectionManager:n,onTypeSelect:r}=t,i=S.useRef({search:"",timeout:void 0}),s=u=>{if(i.current.search.length>0&&u.key===" "){if(u.preventDefault(),(!("continuePropagation"in u)||"continuePropagation"in u&&!u.isPropagationStopped())&&u.stopPropagation(),i.current.search+=" ",e.getKeyForSearch!=null){let c=e.getKeyForSearch(i.current.search,n.focusedKey);c==null&&(c=e.getKeyForSearch(i.current.search)),c!=null&&(n.setFocusedKey(c),r&&r(c))}clearTimeout(i.current.timeout),i.current.timeout=setTimeout(()=>{i.current.search=""},IC)}},a=u=>{let c=UF(u.key);if(!(!c||u.ctrlKey||u.metaKey||u.altKey||!Se(u.currentTarget,ce(u))||i.current.search.length===0&&c===" ")){if(i.current.search+=c,e.getKeyForSearch!=null){let f=e.getKeyForSearch(i.current.search,n.focusedKey);if(f==null&&(f=e.getKeyForSearch(i.current.search)),f!=null)n.setFocusedKey(f),r&&r(f),u.preventDefault(),"continuePropagation"in u||u.stopPropagation();else{i.current.search="",clearTimeout(i.current.timeout),i.current.timeout=void 0;return}}clearTimeout(i.current.timeout),i.current.timeout=setTimeout(()=>{i.current.search=""},IC)}};return S.useEffect(()=>{let u=i.current.timeout;return()=>{clearTimeout(u)}},[i]),{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?s:void 0,onKeyDown:e.getKeyForSearch?a:void 0}}}function UF(t){return t.length===1||!/^[A-Z]/i.test(t)?t:""}function jC(t,e){const n=S.useRef(!0),r=S.useRef(null);Ie(()=>(n.current=!0,()=>{n.current=!1}),[]),Ie(()=>{n.current?n.current=!1:(!r.current||e.some((i,s)=>!Object.is(i,r[s])))&&t(),r.current=e},e)}function qF(t){let{selectionManager:e,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:s=!1,disallowEmptySelection:a=!1,disallowSelectAll:u=!1,escapeKeyBehavior:c="clearSelection",selectOnFocus:f=e.selectionBehavior==="replace",disallowTypeAhead:h=!1,shouldUseVirtualFocus:m,allowsTabNavigation:g=!1,scrollRef:b=r,linkBehavior:x="action",UNSTABLE_focusOnEntry:k}=t,{direction:E}=Ki(),D=_l(),T=P=>{if(P.altKey&&P.key==="Tab"&&P.preventDefault(),!r.current||!Se(r.current,ce(P)))return;const _=(W,ee)=>{if(W!=null){if(e.isLink(W)&&x==="selection"&&f&&!c4(P)){Hl.flushSync(()=>{e.setFocusedKey(W,ee)});let z=Uo(r,W),L=e.getItemProps(W);z&&D.open(z,P,L.href,L.routerOptions);return}if(e.setFocusedKey(W,ee),e.isLink(W)&&x==="override")return;P.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(W):f&&!c4(P)&&e.replaceSelection(W)}};switch(P.key){case"ArrowDown":if(n.getKeyBelow){let W=e.focusedKey!=null?n.getKeyBelow?.(e.focusedKey):n.getFirstKey?.();W==null&&s&&(W=n.getFirstKey?.(e.focusedKey)),W!=null&&(P.preventDefault(),_(W))}break;case"ArrowUp":if(n.getKeyAbove){let W=e.focusedKey!=null?n.getKeyAbove?.(e.focusedKey):n.getLastKey?.();W==null&&s&&(W=n.getLastKey?.(e.focusedKey)),W!=null&&(P.preventDefault(),_(W))}break;case"ArrowLeft":if(n.getKeyLeftOf){let W=e.focusedKey!=null?n.getKeyLeftOf?.(e.focusedKey):n.getFirstKey?.();W==null&&s&&(W=E==="rtl"?n.getFirstKey?.(e.focusedKey):n.getLastKey?.(e.focusedKey)),W!=null&&(P.preventDefault(),_(W,E==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){let W=e.focusedKey!=null?n.getKeyRightOf?.(e.focusedKey):n.getFirstKey?.();W==null&&s&&(W=E==="rtl"?n.getLastKey?.(e.focusedKey):n.getFirstKey?.(e.focusedKey)),W!=null&&(P.preventDefault(),_(W,E==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){if(e.focusedKey===null&&P.shiftKey)return;P.preventDefault();let W=n.getFirstKey(e.focusedKey,Ao(P));e.setFocusedKey(W),W!=null&&(Ao(P)&&P.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(W):f&&e.replaceSelection(W))}break;case"End":if(n.getLastKey){if(e.focusedKey===null&&P.shiftKey)return;P.preventDefault();let W=n.getLastKey(e.focusedKey,Ao(P));e.setFocusedKey(W),W!=null&&(Ao(P)&&P.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(W):f&&e.replaceSelection(W))}break;case"PageDown":if(n.getKeyPageBelow&&e.focusedKey!=null){let W=n.getKeyPageBelow(e.focusedKey);W!=null&&(P.preventDefault(),_(W))}break;case"PageUp":if(n.getKeyPageAbove&&e.focusedKey!=null){let W=n.getKeyPageAbove(e.focusedKey);W!=null&&(P.preventDefault(),_(W))}break;case"a":Ao(P)&&e.selectionMode==="multiple"&&u!==!0&&(P.preventDefault(),e.selectAll());break;case"Escape":c==="clearSelection"&&!a&&e.selectedKeys.size!==0&&(P.stopPropagation(),P.preventDefault(),e.clearSelection());break;case"Tab":if(!g){if(P.shiftKey)r.current.focus();else{let W=dn(r.current,{tabbable:!0}),ee,z;do z=W.lastChild(),z&&(ee=z);while(z);let L=_e();ee&&(!Bl(ee)||L&&!tp(L))&&Br(ee)}break}}},$=S.useRef({top:0,left:0});oc(b,"scroll",()=>{$.current={top:b.current?.scrollTop??0,left:b.current?.scrollLeft??0}});let A=P=>{if(e.isFocused){Se(P.currentTarget,ce(P))||e.setFocused(!1);return}if(!Se(P.currentTarget,ce(P)))return;let _=Zo();e.setFocused(!0);let W=ee=>{ee!=null&&(e.setFocusedKey(ee),f&&!e.isSelected(ee)&&e.replaceSelection(ee))};if(k&&(_==="keyboard"||_==="virtual"))W(k==="first"?n.getFirstKey?.():n.getLastKey?.());else if(e.focusedKey==null){let ee=P.relatedTarget;ee&&P.currentTarget.compareDocumentPosition(ee)&Node.DOCUMENT_POSITION_FOLLOWING?W(e.lastSelectedKey??n.getLastKey?.()):W(e.firstSelectedKey??n.getFirstKey?.())}else b.current&&(b.current.scrollTop=$.current.top,b.current.scrollLeft=$.current.left);if(e.focusedKey!=null&&b.current){let ee=Uo(r,e.focusedKey);ee instanceof HTMLElement&&(!Bl(ee)&&!m&&Br(ee),(_==="keyboard"||k&&_==="virtual")&&ks(ee,{containingElement:r.current}))}},B=P=>{Se(P.currentTarget,P.relatedTarget)||e.setFocused(!1)},R=S.useRef(!1);oc(r,Uy,m?P=>{let{detail:_}=P;P.stopPropagation(),e.setFocused(!0),_?.focusStrategy==="first"&&(R.current=!0)}:void 0);let M=n.getFirstKey?.()??null;jC(()=>{if(R.current)if(M==null){let P=_e();T3(r.current),ep(P,null),e.collection.size>0&&(R.current=!1)}else e.setFocusedKey(M),R.current=!1},[M,e.collection.size]),jC(()=>{e.collection.size>0&&(R.current=!1)},[e.focusedKey]),oc(r,Nw,m?P=>{P.stopPropagation(),e.setFocused(!1),P.detail?.clearFocusKey&&e.setFocusedKey(null)}:void 0);const O=S.useRef(i),j=S.useRef(!1);S.useEffect(()=>{if(O.current){let P=null;i==="first"&&(P=n.getFirstKey?.()??null),i==="last"&&(P=n.getLastKey?.()??null);let _=e.selectedKeys;if(_.size){for(let W of _)if(e.canSelectItem(W)){P=W;break}}e.setFocused(!0),e.setFocusedKey(P),P==null&&!m&&r.current&&bn(r.current),e.collection.size>0&&(O.current=!1,j.current=!0)}});let q=S.useRef(e.focusedKey),X=S.useRef(null);S.useEffect(()=>{if(e.isFocused&&e.focusedKey!=null&&(e.focusedKey!==q.current||j.current)&&b.current&&r.current){let P=Zo(),_=Uo(r,e.focusedKey);if(!(_ instanceof HTMLElement))return;(P==="keyboard"||j.current)&&(X.current&&cancelAnimationFrame(X.current),X.current=requestAnimationFrame(()=>{b.current&&(Lh(b.current,_),P!=="virtual"&&ks(_,{containingElement:r.current}))}))}!m&&e.isFocused&&e.focusedKey==null&&q.current!=null&&r.current&&bn(r.current),q.current=e.focusedKey,j.current=!1}),S.useEffect(()=>()=>{X.current&&cancelAnimationFrame(X.current)},[]),oc(r,"react-aria-focus-scope-restore",P=>{P.preventDefault(),e.setFocused(!0)});let G={onKeyDown:T,onFocus:A,onBlur:B,onMouseDown(P){b.current===ce(P)&&P.preventDefault()}},{typeSelectProps:Z}=HF({keyboardDelegate:n,selectionManager:e});h||(G=we(Z,G));let F;m||(F=e.focusedKey==null?0:-1);let te=_F(e.collection);return{collectionProps:we(G,{tabIndex:F,"data-collection":te})}}class FC{constructor(e){this.ref=e}getItemRect(e){let n=this.ref.current;if(!n)return null;let r=e!=null?Uo(this.ref,e):null;if(!r)return null;let i=n.getBoundingClientRect(),s=r.getBoundingClientRect();return{x:s.left-i.left-n.clientLeft+n.scrollLeft,y:s.top-i.top-n.clientTop+n.scrollTop,width:s.width,height:s.height}}getContentSize(){let e=this.ref.current;return{width:e?.scrollWidth??0,height:e?.scrollHeight??0}}getVisibleRect(){let e=this.ref.current;return{x:e?.scrollLeft??0,y:e?.scrollTop??0,width:e?.clientWidth??0,height:e?.clientHeight??0}}}class q6{constructor(...e){if(e.length===1){let n=e[0];this.collection=n.collection,this.ref=n.ref,this.collator=n.collator,this.disabledKeys=n.disabledKeys||new Set,this.disabledBehavior=n.disabledBehavior||"all",this.orientation=n.orientation||"vertical",this.direction=n.direction,this.layout=n.layout||"stack",this.layoutDelegate=n.layoutDelegate||new FC(n.ref)}else this.collection=e[0],this.disabledKeys=e[1],this.ref=e[2],this.collator=e[3],this.layout="stack",this.orientation="vertical",this.disabledBehavior="all",this.layoutDelegate=new FC(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}isDisabled(e){return this.disabledBehavior==="all"&&(e.props?.isDisabled||this.disabledKeys.has(e.key))&&e.props?.disabledBehavior!=="selection"}findNextNonDisabled(e,n,r=!1){let i=e;for(;i!=null;){let s=this.collection.getItem(i);if(s?.type==="item"&&(r||!this.isDisabled(s)))return i;i=n(i)}return null}getNextKey(e,n){let r=e;return r=this.collection.getKeyAfter(r),this.findNextNonDisabled(r,i=>this.collection.getKeyAfter(i),n?.includeDisabled)}getPreviousKey(e,n){let r=e;return r=this.collection.getKeyBefore(r),this.findNextNonDisabled(r,i=>this.collection.getKeyBefore(i),n?.includeDisabled)}findKey(e,n,r){let i=e,s=this.layoutDelegate.getItemRect(i);if(!s||i==null)return null;let a=s;do{if(i=n(i),i==null)break;s=this.layoutDelegate.getItemRect(i)}while(s&&r(a,s)&&i!=null);return i}isSameRow(e,n){return e.y===n.y||e.x!==n.x}isSameColumn(e,n){return e.x===n.x||e.y!==n.y}isReversed(e){let n=this.getNextKey(e),r=Uo(this.ref,e);if(n!=null){let s=Uo(this.ref,n);return!r||!s?!1:r.getBoundingClientRect().top>s.getBoundingClientRect().top}let i=this.getPreviousKey(e);if(i!=null){let s=Uo(this.ref,i);return!r||!s?!1:s.getBoundingClientRect().top>r.getBoundingClientRect().top}return!1}getKeyBelow(e,n){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,r=>this.getNextKey(r,n),this.isSameRow):this.orientation==="vertical"?this.isReversed(e)?this.getPreviousKey(e,n):this.getNextKey(e,n):this.getNextKey(e,n)}getKeyAbove(e,n){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,r=>this.getPreviousKey(r,n),this.isSameRow):this.orientation==="vertical"?this.isReversed(e)?this.getNextKey(e,n):this.getPreviousKey(e,n):this.getPreviousKey(e,n)}getNextColumn(e,n,r){return n?this.getPreviousKey(e,r):this.getNextKey(e,r)}getKeyRightOf(e,n){let r=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[r]?(e=this.layoutDelegate[r](e),this.findNextNonDisabled(e,i=>this.layoutDelegate[r](i),n?.includeDisabled)):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="rtl",n):this.findKey(e,i=>this.getNextColumn(i,this.direction==="rtl",n),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="rtl",n):null}getKeyLeftOf(e,n){let r=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[r]?(e=this.layoutDelegate[r](e),this.findNextNonDisabled(e,i=>this.layoutDelegate[r](i),n?.includeDisabled)):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="ltr",n):this.findKey(e,i=>this.getNextColumn(i,this.direction==="ltr",n),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="ltr",n):null}getFirstKey(){let e=this.collection.getFirstKey();return this.findNextNonDisabled(e,n=>this.collection.getKeyAfter(n))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,n=>this.collection.getKeyBefore(n))}getKeyPageAbove(e){let n=this.ref.current,r=this.layoutDelegate.getItemRect(e);if(!r)return null;let i=this.isReversed(e);if(n&&!Hs(n))return this.getFirstKey();let s=e;if(this.orientation==="horizontal"){let a=Math.max(0,r.x+r.width-this.layoutDelegate.getVisibleRect().width);for(;r&&r.x>a&&s!=null;)s=this.getKeyAbove(s),r=s==null?null:this.layoutDelegate.getItemRect(s)}else{let a=this.layoutDelegate.getVisibleRect(),u=i?r.y-a.height:Math.max(0,r.y+r.height-a.height);for(;r&&r.y>u&&s!=null;)s=this.getKeyAbove(s),r=s==null?null:this.layoutDelegate.getItemRect(s)}return s??(i?this.getLastKey():this.getFirstKey())}getKeyPageBelow(e){let n=this.ref.current,r=this.layoutDelegate.getItemRect(e);if(!r)return null;let i=this.isReversed(e);if(n&&!Hs(n))return this.getLastKey();let s=e;if(this.orientation==="horizontal"){let a=Math.min(this.layoutDelegate.getContentSize().width,r.x-r.width+this.layoutDelegate.getVisibleRect().width);for(;r&&r.x<a&&s!=null;)s=this.getKeyBelow(s),r=s==null?null:this.layoutDelegate.getItemRect(s)}else{let a=Math.min(this.layoutDelegate.getContentSize().height,r.y-r.height+this.layoutDelegate.getVisibleRect().height);for(;r&&r.y<a&&s!=null;)s=this.getKeyBelow(s),r=s==null?null:this.layoutDelegate.getItemRect(s)}return s??(i?this.getFirstKey():this.getLastKey())}getKeyForSearch(e,n){if(!this.collator)return null;let r=this.collection,i=n||this.getFirstKey();for(;i!=null;){let s=r.getItem(i);if(!s)return null;let a=s.textValue.slice(0,e.length);if(s.textValue&&this.collator.compare(a,e)===0)return i;i=this.getNextKey(i)}return null}}let Ib=new Map;function Q3(t){let{locale:e}=Ki(),n=e+(t?Object.entries(t).sort((i,s)=>i[0]<s[0]?-1:1).join():"");if(Ib.has(n))return Ib.get(n);let r=new Intl.Collator(e,t);return Ib.set(n,r),r}function G6(t){let{selectionManager:e,collection:n,disabledKeys:r,ref:i,keyboardDelegate:s,layoutDelegate:a,orientation:u}=t,c=Q3({usage:"search",sensitivity:"base"}),f=e.disabledBehavior,h=S.useMemo(()=>s||new q6({collection:n,disabledKeys:r,disabledBehavior:f,ref:i,collator:c,layoutDelegate:a,orientation:u}),[s,a,n,r,i,c,f,u]),{collectionProps:m}=qF({...t,ref:i,selectionManager:e,keyboardDelegate:h});return{listProps:m}}const GF=500;function W6(t){let{isDisabled:e,onLongPressStart:n,onLongPressEnd:r,onLongPress:i,threshold:s=GF,accessibilityDescription:a}=t;const u=S.useRef(void 0);let{addGlobalListener:c,removeGlobalListener:f}=md(),{pressProps:h}=gd({isDisabled:e,onPressStart(g){if(g.continuePropagation(),(g.pointerType==="mouse"||g.pointerType==="touch")&&(n&&n({...g,type:"longpressstart"}),u.current=setTimeout(()=>{g.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),je(g.target).activeElement!==g.target&&Br(g.target),i&&i({...g,type:"longpress"}),u.current=void 0},s),g.pointerType==="touch")){let b=k=>{k.preventDefault()},x=fn(g.target);c(g.target,"contextmenu",b,{once:!0}),c(x,"pointerup",()=>{setTimeout(()=>{f(g.target,"contextmenu",b)},30)},{once:!0})}},onPressEnd(g){u.current&&clearTimeout(u.current),r&&(g.pointerType==="mouse"||g.pointerType==="touch")&&r({...g,type:"longpressend"})}}),m=bd(i&&!e?a:void 0);return{longPressProps:we(h,m)}}function Q6(t){let{id:e,selectionManager:n,key:r,ref:i,shouldSelectOnPressUp:s,shouldUseVirtualFocus:a,focus:u,isDisabled:c,onAction:f,allowsDifferentPressOrigin:h,linkBehavior:m="action"}=t,g=_l();e=an(e);let b=z=>{if(z.pointerType==="keyboard"&&c4(z))n.toggleSelection(r);else{if(n.selectionMode==="none")return;if(n.isLink(r)){if(m==="selection"&&i.current){let L=n.getItemProps(r);g.open(i.current,z,L.href,L.routerOptions),n.setSelectedKeys(n.selectedKeys);return}else if(m==="override"||m==="none")return}n.selectionMode==="single"?n.isSelected(r)&&!n.disallowEmptySelection?n.toggleSelection(r):n.replaceSelection(r):z&&z.shiftKey?n.extendSelection(r):n.selectionBehavior==="toggle"||z&&(Ao(z)||z.pointerType==="touch"||z.pointerType==="virtual")?n.toggleSelection(r):n.replaceSelection(r)}};S.useEffect(()=>{r===n.focusedKey&&n.isFocused&&(a?T3(i.current):u?u():_e()!==i.current&&i.current&&bn(i.current))},[i,r,n.focusedKey,n.childFocusStrategy,n.isFocused,a]),c=c||n.isDisabled(r);let x={};!a&&!c?x={tabIndex:r===n.focusedKey?0:-1,onFocus(z){ce(z)===i.current&&n.setFocusedKey(r)}}:c&&(x.onMouseDown=z=>{z.preventDefault()}),S.useEffect(()=>{c&&n.focusedKey===r&&n.setFocusedKey(null)},[n,c,r]);let k=n.isLink(r)&&m==="override",E=f&&t.UNSTABLE_itemBehavior==="action",D=n.isLink(r)&&m!=="selection"&&m!=="none",T=!c&&n.canSelectItem(r)&&!k&&!E,$=(f||D)&&!c,A=$&&(n.selectionBehavior==="replace"?!T:!T||n.isEmpty),B=$&&T&&n.selectionBehavior==="replace",R=A||B,M=S.useRef(null),O=R&&T,j=S.useRef(!1),q=S.useRef(!1),X=n.getItemProps(r),G=z=>{f&&(f(),i.current?.dispatchEvent(new CustomEvent("react-aria-item-action",{bubbles:!0}))),D&&i.current&&g.open(i.current,z,X.href,X.routerOptions)},Z={ref:i};if(s?(Z.onPressStart=z=>{M.current=z.pointerType,j.current=O,z.pointerType==="keyboard"&&(!R||_C(z.key))&&b(z)},h?(Z.onPressUp=A?void 0:z=>{z.pointerType==="mouse"&&T&&b(z)},Z.onPress=A?G:z=>{z.pointerType!=="keyboard"&&z.pointerType!=="mouse"&&T&&b(z)}):Z.onPress=z=>{if(A||B&&z.pointerType!=="mouse"){if(z.pointerType==="keyboard"&&!KC(z.key))return;G(z)}else z.pointerType!=="keyboard"&&T&&b(z)}):(Z.onPressStart=z=>{M.current=z.pointerType,j.current=O,q.current=A,T&&(z.pointerType==="mouse"&&!A||z.pointerType==="keyboard"&&(!$||_C(z.key)))&&b(z)},Z.onPress=z=>{(z.pointerType==="touch"||z.pointerType==="pen"||z.pointerType==="virtual"||z.pointerType==="keyboard"&&R&&KC(z.key)||z.pointerType==="mouse"&&q.current)&&(R?G(z):T&&b(z))}),x["data-collection"]=VF(n.collection),x["data-key"]=r,Z.preventFocusOnPress=a,a&&(Z=we(Z,{onPressStart(z){z.pointerType!=="touch"&&(n.setFocused(!0),n.setFocusedKey(r))},onPress(z){z.pointerType==="touch"&&(n.setFocused(!0),n.setFocusedKey(r))}})),X)for(let z of["onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick"])X[z]&&(Z[z]=Ys(Z[z],X[z]));let{pressProps:F,isPressed:te}=gd(Z),P=B?z=>{M.current==="mouse"&&(z.stopPropagation(),z.preventDefault(),G(z))}:void 0,{longPressProps:_}=W6({isDisabled:!O,onLongPress(z){z.pointerType==="touch"&&(b(z),n.setSelectionBehavior("toggle"))}}),W=z=>{M.current==="touch"&&j.current&&z.preventDefault()},ee=m!=="none"&&n.isLink(r)?z=>{Wr.isOpening||z.preventDefault()}:void 0;return{itemProps:we(x,T||A||a&&!c?F:{},O?_:{},{onDoubleClick:P,onDragStartCapture:W,onClick:ee,id:e},a?{onMouseDown:z=>z.preventDefault()}:void 0),isPressed:te,isSelected:n.isSelected(r),isFocused:n.isFocused&&n.focusedKey===r,isDisabled:c,allowsSelection:T,hasAction:R}}function KC(t){return t==="Enter"}function _C(t){return t===" "}function Y6(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}function WF(t){return QF(t)}function QF(t,e){for(let n of t)return n}function jb(t,e,n){if(e.parentKey===n.parentKey)return e.index-n.index;let r=[...VC(t,e),e],i=[...VC(t,n),n],s=r.slice(0,i.length).findIndex((a,u)=>a!==i[u]);return s!==-1?(e=r[s],n=i[s],e.index-n.index):r.findIndex(a=>a===n)>=0?1:(i.findIndex(a=>a===e)>=0,-1)}function VC(t,e){let n=[],r=e;for(;r?.parentKey!=null;)r=t.getItem(r.parentKey),r&&n.unshift(r);return n}const HC=new WeakMap;function YF(t){let e=HC.get(t);if(e!=null)return e;let n=0,r=i=>{for(let s of i)s.type==="section"?r(Y6(s,t)):s.type==="item"&&n++};return r(t),HC.set(t,n),n}function X6(t){const e=S.version.split(".");return parseInt(e[0],10)>=19?t:t?"true":void 0}class UC{constructor(e){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let n=a=>{if(this.keyMap.set(a.key,a),a.childNodes&&a.type==="section")for(let u of a.childNodes)n(u)};for(let a of e)n(a);let r=null,i=0,s=0;for(let[a,u]of this.keyMap)r?(r.nextKey=a,u.prevKey=r.key):(this.firstKey=a,u.prevKey=void 0),u.type==="item"&&(u.index=i++),(u.type==="section"||u.type==="item")&&s++,r=u,r.nextKey=void 0;this._size=s,this.lastKey=r?.key??null}*[Symbol.iterator](){yield*this.iterable}get size(){return this._size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);return n?n.prevKey??null:null}getKeyAfter(e){let n=this.keyMap.get(e);return n?n.nextKey??null:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)??null}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}getChildren(e){return this.keyMap.get(e)?.childNodes||[]}}class Cr extends Set{constructor(e,n,r){super(e),e instanceof Cr?(this.anchorKey=n??e.anchorKey,this.currentKey=r??e.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}}function XF(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function Y3(t){let{selectionMode:e="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:s="all"}=t,a=S.useRef(!1),[,u]=S.useState(!1),c=S.useRef(null),f=S.useRef(null),[,h]=S.useState(null),m=S.useMemo(()=>qC(t.selectedKeys),[t.selectedKeys]),g=S.useMemo(()=>qC(t.defaultSelectedKeys,new Cr),[t.defaultSelectedKeys]),[b,x]=Zs(m,g,t.onSelectionChange),k=S.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[E,D]=S.useState(i);i==="replace"&&E==="toggle"&&typeof b=="object"&&b.size===0&&D("replace");let T=S.useRef(i);return S.useEffect(()=>{i!==T.current&&(D(i),T.current=i)},[i]),{selectionMode:e,disallowEmptySelection:n,selectionBehavior:E,setSelectionBehavior:D,get isFocused(){return a.current},setFocused($){a.current=$,u($)},get focusedKey(){return c.current},get childFocusStrategy(){return f.current},setFocusedKey($,A="first"){c.current=$,f.current=A,h($)},selectedKeys:b,setSelectedKeys($){(r||!XF($,b))&&x($)},disabledKeys:k,disabledBehavior:s}}function qC(t,e){return t?t==="all"?"all":new Cr(t):e}class yd{constructor(e,n,r){this.collection=e,this.state=n,this.allowsCellSelection=r?.allowsCellSelection??!1,this._isSelectAll=null,this.layoutDelegate=r?.layoutDelegate||null,this.fullCollection=r?.fullCollection||null}get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,n){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode==="none")return!1;let n=this.getKey(e);return n==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(n):this.state.selectedKeys.has(n)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=e.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!e||r&&jb(this.collection,r,e)<0)&&(e=r)}return e?.key??null}get lastSelectedKey(){let e=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!e||r&&jb(this.collection,r,e)>0)&&(e=r)}return e?.key??null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r;if(this.state.selectedKeys==="all")r=new Cr([n],n,n);else{let i=this.state.selectedKeys,s=i.anchorKey??n;r=new Cr(i,s,n);for(let a of this.getKeyRange(s,i.currentKey??n))r.delete(a);for(let a of this.getKeyRange(n,s))this.canSelectItem(a)&&r.add(a)}this.state.setSelectedKeys(r)}getKeyRange(e,n){let r=this.collection.getItem(e),i=this.collection.getItem(n);return r&&i?jb(this.collection,r,i)<=0?this.getKeyRangeInternal(e,n):this.getKeyRangeInternal(n,e):[]}getKeyRangeInternal(e,n){if(this.layoutDelegate?.getKeyRange)return this.layoutDelegate.getKeyRange(e,n);let r=[],i=e;for(;i!=null;){let s=this.collection.getItem(i);if(s&&(s.type==="item"||s.type==="cell"&&this.allowsCellSelection)&&r.push(i),i===n)return r;i=this.collection.getKeyAfter(i)}return[]}getKey(e){let n=this.collection.getItem(e);if(!n||n.type==="cell"&&this.allowsCellSelection)return e;for(;n&&n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r=new Cr(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(e){if(this.selectionMode==="none")return;let n=this.getKey(e);if(n==null)return;let r=this.canSelectItem(n)?new Cr([n],n,n):new Cr;this.state.setSelectedKeys(r)}setSelectedKeys(e){if(this.selectionMode==="none")return;let n=new Cr;for(let r of e){let i=this.getKey(r);if(i!=null&&(n.add(i),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let e=this.fullCollection??this.collection,n=[],r=i=>{for(;i!=null;){if(this.canSelectItemIn(i,e)){let s=e.getItem(i);s?.type==="item"&&n.push(i),s?.hasChildNodes&&(this.allowsCellSelection||s.type!=="item")&&r(WF(Y6(s,e))?.key??null)}i=e.getKeyAfter(i)}};return r(e.getFirstKey()),n}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new Cr)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(e.size!==n.size)return!1;for(let r of e)if(!n.has(r))return!1;for(let r of n)if(!e.has(r))return!1;return!0}canSelectItem(e){return this.canSelectItemIn(e,this.collection)}canSelectItemIn(e,n){if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let r=n.getItem(e);return!(!r||r?.props?.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){let n=this.collection.getItem(e);return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!n?.props?.isDisabled)&&n?.props?.disabledBehavior!=="selection"}isLink(e){return!!this.collection.getItem(e)?.props?.href}getItemProps(e){return this.collection.getItem(e)?.props}withCollection(e){return new yd(e,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0,fullCollection:this.fullCollection??this.collection})}}class JF{build(e,n){return this.context=n,GC(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:n,items:r}=e;if(V.isValidElement(n)&&n.type===V.Fragment)yield*this.iterateCollection({children:n.props.children,items:r});else if(typeof n=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");let i=0;for(let s of r)yield*this.getFullNode({value:s,index:i},{renderer:n}),i++}else{let i=[];V.Children.forEach(n,a=>{a&&i.push(a)});let s=0;for(let a of i){let u=this.getFullNode({element:a,index:s},{});for(let c of u)s++,yield c}}}getKey(e,n,r,i){if(e.key!=null)return e.key;if(n.type==="cell"&&n.key!=null)return`${i}${n.key}`;let s=n.value;if(s!=null){let a=s.key??s.id;if(a==null)throw new Error("No key found for item");return a}return i?`${i}.${n.index}`:`$.${n.index}`}getChildState(e,n){return{renderer:n.renderer||e.renderer}}*getFullNode(e,n,r,i){if(V.isValidElement(e.element)&&e.element.type===V.Fragment){let c=[];V.Children.forEach(e.element.props.children,h=>{c.push(h)});let f=e.index??0;for(const h of c)yield*this.getFullNode({element:h,index:f++},n,r,i);return}let s=e.element;if(!s&&e.value&&n&&n.renderer){let c=this.cache.get(e.value);if(c&&(!c.shouldInvalidate||!c.shouldInvalidate(this.context))){c.index=e.index,c.parentKey=i?i.key:null,yield c;return}s=n.renderer(e.value)}if(V.isValidElement(s)){let c=s.type;if(typeof c!="function"&&typeof c.getCollectionNode!="function"){let g=s.type;throw new Error(`Unknown element <${g}> in collection.`)}let f=c.getCollectionNode(s.props,this.context),h=e.index??0,m=f.next();for(;!m.done&&m.value;){let g=m.value;e.index=h;let b=g.key??null;b==null&&(b=g.element?null:this.getKey(s,e,n,r));let k=[...this.getFullNode({...g,key:b,index:h,wrapper:ZF(e.wrapper,g.wrapper)},this.getChildState(n,g),r?`${r}${s.key}`:s.key,i)];for(let E of k){if(E.value=g.value??e.value??null,E.value&&this.cache.set(E.value,E),e.type&&E.type!==e.type)throw new Error(`Unsupported type <${Fb(E.type)}> in <${Fb(i?.type??"unknown parent type")}>. Only <${Fb(e.type)}> is supported.`);h++,yield E}m=f.next(k)}return}if(e.key==null||e.type==null)return;let a=this,u={type:e.type,props:e.props,key:e.key,parentKey:i?i.key:null,value:e.value??null,level:(i?.level??0)+(i?.type==="item"?1:0),index:e.index,rendered:e.rendered,textValue:e.textValue??"","aria-label":e["aria-label"],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:GC(function*(){if(!e.hasChildNodes||!e.childNodes)return;let c=0;for(let f of e.childNodes()){f.key!=null&&(f.key=`${u.key}${f.key}`);let h=a.getFullNode({...f,index:c},a.getChildState(n,f),u.key,u);for(let m of h)c++,yield m}})};yield u}constructor(){this.cache=new WeakMap}}function GC(t){let e=[],n=null;return{*[Symbol.iterator](){for(let r of e)yield r;n||(n=t());for(let r of n)e.push(r),yield r}}}function ZF(t,e){if(t&&e)return n=>t(e(n));if(t)return t;if(e)return e}function Fb(t){return t[0].toUpperCase()+t.slice(1)}function J6(t,e,n){let r=S.useMemo(()=>new JF,[]),{children:i,items:s,collection:a}=t;return S.useMemo(()=>{if(a)return a;let c=r.build({children:i,items:s},n);return e(c)},[r,i,s,a,n,e])}function eK(t){let{filter:e,layoutDelegate:n}=t,r=Y3(t),i=S.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),s=S.useCallback(f=>e?new UC(e(f)):new UC(f),[e]),a=S.useMemo(()=>({suppressTextValueWarning:t.suppressTextValueWarning}),[t.suppressTextValueWarning]),u=J6(t,s,a),c=S.useMemo(()=>new yd(u,r,{layoutDelegate:n}),[u,r,n]);return Z6(u,c),{collection:u,disabledKeys:i,selectionManager:c}}function tK(t,e){let n=S.useMemo(()=>e?t.collection.filter(e):t.collection,[t.collection,e]),r=t.selectionManager.withCollection(n);return Z6(n,r),{collection:n,selectionManager:r,disabledKeys:t.disabledKeys}}function Z6(t,e){const n=S.useRef(null);S.useEffect(()=>{if(e.focusedKey!=null&&!t.getItem(e.focusedKey)&&n.current){let r=n.current.getKeyAfter(e.focusedKey),i=null;for(;r!=null;){let s=t.getItem(r);if(s&&s.type==="item"&&!e.isDisabled(r)){i=r;break}r=n.current.getKeyAfter(r)}if(i==null)for(r=n.current.getKeyBefore(e.focusedKey);r!=null;){let s=t.getItem(r);if(s&&s.type==="item"&&!e.isDisabled(r)){i=r;break}r=n.current.getKeyBefore(r)}e.setFocusedKey(i)}n.current=t},[t,e])}function eT(t,e){let{collection:n,onLoadMore:r,scrollOffset:i=1}=t,s=S.useRef(null),a=Pt(u=>{for(let c of u)c.isIntersecting&&r&&r()});Ie(()=>(e.current&&(s.current=new IntersectionObserver(a,{root:Ur(e?.current),rootMargin:`0px ${100*i}% ${100*i}% ${100*i}%`}),s.current.observe(e.current)),()=>{s.current&&s.current.disconnect()}),[n,e,i])}const qc=S.createContext(null);da(sp,function(e,n,r){let i=S.useContext(qc),{isLoading:s,onLoadMore:a,scrollOffset:u,...c}=e,f=S.useRef(null),h=S.useMemo(()=>({onLoadMore:a,collection:i?.collection,sentinelRef:f,scrollOffset:u}),[a,u,i?.collection]);eT(h,f);let m=$t({...c,id:void 0,children:r.rendered,defaultClassName:"react-aria-ListBoxLoadingIndicator",values:void 0}),g={tabIndex:-1};return V.createElement(V.Fragment,null,V.createElement("div",{style:{position:"relative",width:0,height:0},inert:X6(!0)},V.createElement("div",{"data-testid":"loadMoreSentinel",ref:f,style:{position:"absolute",height:1,width:1}})),s&&m.children&&V.createElement(V.Fragment,null,V.createElement(ot.div,{...we(Ze(e,{global:!0}),g),...m,role:"option",ref:n},m.children)))});const nK=S.createContext({placement:"bottom"}),rK=typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype;function WC(t){return t.dataset.liveAnnouncer==="true"||t.dataset.reactAriaTopLayer!==void 0}let Xu=new WeakMap,Mn=[];function X3(t,e){let n=fn(t?.[0]),r=e instanceof n.Element?{root:e}:e,i=r?.root??document.body,s=r?.shouldUseInert&&rK,a=new Set(t),u=new Set,c=E=>s&&E instanceof n.HTMLElement?E.inert:E.getAttribute("aria-hidden")==="true",f=(E,D)=>{s&&E instanceof n.HTMLElement?E.inert=D:D?E.setAttribute("aria-hidden","true"):(E.removeAttribute("aria-hidden"),E instanceof n.HTMLElement&&(E.inert=!1))},h=new Set;if(Si())for(let E of t){let D=E;for(;D&&D!==i;){let T=D.getRootNode();"shadowRoot"in T&&h.add(T.shadowRoot),D=T.parentNode}}let m=E=>{for(let A of E.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))a.add(A);let D=A=>{if(u.has(A)||a.has(A)||A.parentElement&&u.has(A.parentElement)&&A.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let B of a)if(Se(A,B))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},T=_6(je(E),E,NodeFilter.SHOW_ELEMENT,{acceptNode:D}),$=D(E);if($===NodeFilter.FILTER_ACCEPT&&g(E),$!==NodeFilter.FILTER_REJECT){let A=T.nextNode();for(;A!=null;)g(A),A=T.nextNode()}},g=E=>{let D=Xu.get(E)??0;c(E)&&D===0||(D===0&&f(E,!0),u.add(E),Xu.set(E,D+1))};Mn.length&&Mn[Mn.length-1].disconnect(),m(i);let b=new MutationObserver(E=>{for(let D of E)if(D.type==="childList"){if(D.target.isConnected&&![...a,...u].some(T=>Se(T,D.target)))for(let T of D.addedNodes)(T instanceof HTMLElement||T instanceof SVGElement)&&WC(T)?a.add(T):T instanceof Element&&m(T);if(Si()){for(let T of h)if(!T.isConnected){b.disconnect();break}}}});b.observe(i,{childList:!0,subtree:!0});let x=new Set;if(Si())for(let E of h){let D=new MutationObserver(T=>{for(let $ of T)if($.type==="childList"){if($.target.isConnected&&![...a,...u].some(A=>Se(A,$.target)))for(let A of $.addedNodes)(A instanceof HTMLElement||A instanceof SVGElement)&&WC(A)?a.add(A):A instanceof Element&&m(A);if(Si()){for(let A of h)if(!A.isConnected){b.disconnect();break}}}});D.observe(E,{childList:!0,subtree:!0}),x.add(D)}let k={visibleNodes:a,hiddenNodes:u,observe(){b.observe(i,{childList:!0,subtree:!0})},disconnect(){b.disconnect()}};return Mn.push(k),()=>{if(b.disconnect(),Si())for(let E of x)E.disconnect();for(let E of u){let D=Xu.get(E);D!=null&&(D===1?(f(E,!1),Xu.delete(E)):Xu.set(E,D-1))}k===Mn[Mn.length-1]?(Mn.pop(),Mn.length&&Mn[Mn.length-1].observe()):Mn.splice(Mn.indexOf(k),1)}}function iK(t){let e=Mn[Mn.length-1];if(e&&!e.visibleNodes.has(t))return e.visibleNodes.add(t),()=>{e.visibleNodes.delete(t)}}const dr={top:"top",bottom:"top",left:"left",right:"left"},up={top:"bottom",bottom:"top",left:"right",right:"left"},sK={top:"left",left:"top"},d4={top:"height",left:"width"},tT={width:"totalWidth",height:"totalHeight"},oh={};let oK=()=>typeof document<"u"?window.visualViewport:null;function QC(t,e){let n=0,r=0,i=0,s=0,a=0,u=0,c={},f=(e?.scale??1)>1;if(t.tagName==="BODY"||t.tagName==="HTML"){let h=document.documentElement;i=h.clientWidth,s=h.clientHeight,n=e?.width??i,r=e?.height??s,c.top=h.scrollTop||t.scrollTop,c.left=h.scrollLeft||t.scrollLeft,e&&(a=e.offsetTop,u=e.offsetLeft)}else({width:n,height:r,top:a,left:u}=Gc(t,!1)),c.top=t.scrollTop,c.left=t.scrollLeft,i=n,s=r;return O3()&&(t.tagName==="BODY"||t.tagName==="HTML")&&f&&(c.top=0,c.left=0,a=e?.pageTop??0,u=e?.pageLeft??0),{width:n,height:r,totalWidth:i,totalHeight:s,scroll:c,top:a,left:u}}function aK(t){return{top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}}function YC(t,e,n,r,i,s,a){let u=i.scroll[t]??0,c=r[d4[t]],f=a[t]+r.scroll[dr[t]]+s,h=a[t]+r.scroll[dr[t]]+c-s,m=e-u+r.scroll[dr[t]]+a[t]-r[dr[t]],g=e-u+n+r.scroll[dr[t]]+a[t]-r[dr[t]];return m<f?f-m:g>h?Math.max(h-g,f-m):0}function lK(t){let e=window.getComputedStyle(t);return{top:parseInt(e.marginTop,10)||0,bottom:parseInt(e.marginBottom,10)||0,left:parseInt(e.marginLeft,10)||0,right:parseInt(e.marginRight,10)||0}}function XC(t){if(oh[t])return oh[t];let[e,n]=t.split(" "),r=dr[e]||"right",i=sK[r];dr[n]||(n="center");let s=d4[r],a=d4[i];return oh[t]={placement:e,crossPlacement:n,axis:r,crossAxis:i,size:s,crossSize:a},oh[t]}function Kb(t,e,n,r,i,s,a,u,c,f,h){let{placement:m,crossPlacement:g,axis:b,crossAxis:x,size:k,crossSize:E}=r,D={};D[x]=t[x]??0,g==="center"?D[x]+=((t[E]??0)-(n[E]??0))/2:g!==x&&(D[x]+=(t[E]??0)-(n[E]??0)),D[x]+=s;const T=t[x]-n[E]+c+f,$=t[x]+t[E]-c-f;if(D[x]=i4(D[x],T,$),m===b){let A=u?h[k]:h[tT[k]];D[up[b]]=Math.floor(A-t[b]+i)}else D[b]=Math.floor(t[b]+t[k]+i);return D}function uK(t,e,n,r,i,s,a,u,c,f,h){let m=(t.top!=null?t.top:c[tT.height]-(t.bottom??0)-a)-(c.scroll.top??0),g=f?n.top:0,b={top:Math.max(e.top+g,(h?.offsetTop??e.top)+g),bottom:Math.min(e.top+e.height+g,(h?.offsetTop??0)+(h?.height??0))};return u!=="top"?Math.max(0,b.bottom-m-((i.top??0)+(i.bottom??0)+s)):Math.max(0,m+a-b.top-((i.top??0)+(i.bottom??0)+s))}function JC(t,e,n,r,i,s,a,u){let{placement:c,axis:f,size:h}=s;return c===f?Math.max(0,n[f]-(a.scroll[f]??0)-(t[f]+(u?e[f]:0))-(r[f]??0)-r[up[f]]-i):Math.max(0,t[h]+t[f]+(u?e[f]:0)-n[f]-n[h]+(a.scroll[f]??0)-(r[f]??0)-r[up[f]]-i)}function cK(t,e,n,r,i,s,a,u,c,f,h,m,g,b,x,k,E,D){let T=XC(t),{size:$,crossAxis:A,crossSize:B,placement:R,crossPlacement:M}=T,O=Kb(e,u,n,T,h,m,f,g,x,k,c),j=h,q=JC(u,f,e,i,s+h,T,c,E);if(a&&n[$]>q){let de=XC(`${up[R]} ${M}`),he=Kb(e,u,n,de,h,m,f,g,x,k,c);JC(u,f,e,i,s+h,de,c,E)>q&&(T=de,O=he,j=h)}let X="bottom";T.axis==="top"?T.placement==="top"?X="top":T.placement==="bottom"&&(X="bottom"):T.crossAxis==="top"&&(T.crossPlacement==="top"?X="bottom":T.crossPlacement==="bottom"&&(X="top"));let G=YC(A,O[A],n[B],u,c,s,f);O[A]+=G;let Z=uK(O,u,f,g,i,s,n.height,X,c,E,D);b&&b<Z&&(Z=b),n.height=Math.min(n.height,Z),O=Kb(e,u,n,T,j,m,f,g,x,k,c),G=YC(A,O[A],n[B],u,c,s,f),O[A]+=G;let F={},te=e[A]-O[A]-i[dr[A]],P=te+.5*e[B];const _=x/2+k,W=dr[A]==="left"?(i.left??0)+(i.right??0):(i.top??0)+(i.bottom??0),ee=n[B]-W-x/2-k,z=e[A]+x/2-(O[A]+i[dr[A]]),L=e[A]+e[B]-x/2-(O[A]+i[dr[A]]),H=i4(P,z,L);F[A]=i4(H,_,ee),{placement:R,crossPlacement:M}=T,x?te=F[A]:M==="right"?te+=e[B]:M==="center"&&(te+=e[B]/2);let ie=R==="left"||R==="top"?n[$]:0,le={x:R==="top"||R==="bottom"?te:ie,y:R==="left"||R==="right"?te:ie};return{position:O,maxHeight:Z,arrowOffsetLeft:F.left,arrowOffsetTop:F.top,placement:R,triggerAnchorPoint:le}}function dK(t){let{placement:e,targetNode:n,overlayNode:r,scrollNode:i,padding:s,shouldFlip:a,boundaryElement:u,offset:c,crossOffset:f,maxHeight:h,arrowSize:m=0,arrowBoundaryOffset:g=0,targetRect:b}=t,x=oK(),k=r instanceof HTMLElement?fK(r):document.documentElement,E=k===document.documentElement;const D=window.getComputedStyle(k).position;let T=!!D&&D!=="static",$=E?Gc(n,!1,b):ZC(n,k,!1,b);if(!E){let{marginTop:X,marginLeft:G}=window.getComputedStyle(n);$.top+=parseInt(X,10)||0,$.left+=parseInt(G,10)||0}let A=Gc(r,!0),B=lK(r);A.width+=(B.left??0)+(B.right??0),A.height+=(B.top??0)+(B.bottom??0);let R=aK(i),M=QC(u,x),O=QC(k,x),j;if((u.tagName==="BODY"||u.tagName==="HTML")&&!E){let X=Bm(k,!1);j={top:-(X.top-M.top),left:-(X.left-M.left),width:0,height:0}}else(u.tagName==="BODY"||u.tagName==="HTML")&&E?j={top:0,left:0,width:0,height:0}:j=ZC(u,k,!1);let q=Se(u,k);return cK(e,$,A,R,B,s,a,M,O,j,c,f,T,h,m,g,q,x)}function Bm(t,e){let{top:n,left:r,width:i,height:s}=t.getBoundingClientRect();return e&&t instanceof t.ownerDocument.defaultView.HTMLElement&&(i=t.offsetWidth,s=t.offsetHeight),{top:n,left:r,width:i,height:s}}function Gc(t,e,n){let{top:r,left:i,width:s,height:a}=n||Bm(t,e),{scrollTop:u,scrollLeft:c,clientTop:f,clientLeft:h}=document.documentElement;return{top:r+u-f,left:i+c-h,width:s,height:a}}function ZC(t,e,n,r){let i=window.getComputedStyle(t),s;if(i.position==="fixed")s=r||Bm(t,n);else{s=Gc(t,n,r);let a=Gc(e,n),u=window.getComputedStyle(e);a.top+=(parseInt(u.borderTopWidth,10)||0)-e.scrollTop,a.left+=(parseInt(u.borderLeftWidth,10)||0)-e.scrollLeft,s.top-=a.top,s.left-=a.left}return s.top-=parseInt(i.marginTop,10)||0,s.left-=parseInt(i.marginLeft,10)||0,s}function fK(t){let e=t.offsetParent;if(e&&e===document.body&&window.getComputedStyle(e).position==="static"&&!eE(e)&&(e=document.documentElement),e==null)for(e=t.parentElement;e&&!eE(e);)e=e.parentElement;return e||document.documentElement}function eE(t){let e=window.getComputedStyle(t);return e.transform!=="none"||/transform|perspective/.test(e.willChange)||e.filter!=="none"||e.contain==="paint"||"backdropFilter"in e&&e.backdropFilter!=="none"||"WebkitBackdropFilter"in e&&e.WebkitBackdropFilter!=="none"}const nT=new WeakMap;function hK(t){let{triggerRef:e,isOpen:n,onClose:r}=t;S.useEffect(()=>{if(!n||r===null)return;let i=s=>{let a=ce(s);if(!e.current||a instanceof Node&&!Se(a,e.current)||a instanceof HTMLInputElement||a instanceof HTMLTextAreaElement)return;let u=r||nT.get(e.current);u&&u()};return window.addEventListener("scroll",i,!0),()=>{window.removeEventListener("scroll",i,!0)}},[n,r,e])}function pK(){return typeof window.ResizeObserver<"u"}function f4(t){const{ref:e,box:n,onResize:r}=t;let i=Pt(r);S.useEffect(()=>{let s=e?.current;if(s)if(pK()){const a=new window.ResizeObserver(u=>{u.length&&i()});return a.observe(s,{box:n}),()=>{s&&a.unobserve(s)}}else return window.addEventListener("resize",i,!1),()=>{window.removeEventListener("resize",i,!1)}},[e,n])}let $o=typeof document<"u"?window.visualViewport:null;function mK(t){let{direction:e}=Ki(),{arrowSize:n,targetRef:r,overlayRef:i,arrowRef:s,scrollRef:a=i,placement:u="bottom",containerPadding:c=12,shouldFlip:f=!0,boundaryElement:h=typeof document<"u"?document.body:null,offset:m=0,crossOffset:g=0,shouldUpdatePosition:b=!0,isOpen:x=!0,onClose:k,maxHeight:E,arrowBoundaryOffset:D=0,getTargetRect:T}=t,[$,A]=S.useState(null),B=[b,u,i.current,r.current,s?.current,a.current,c,f,h,m,g,x,e,E,D,n],R=S.useRef($o?.scale);S.useEffect(()=>{x&&(R.current=$o?.scale)},[x]);let M=S.useCallback(()=>{if(b===!1||!x||!i.current||!r.current||!h||$o?.scale!==R.current)return;let q=null;if(a.current&&Bl(a.current)){let F=_e()?.getBoundingClientRect(),te=a.current.getBoundingClientRect();q={type:"top",offset:(F?.top??0)-te.top},q.offset>te.height/2&&(q.type="bottom",q.offset=(F?.bottom??0)-te.bottom)}let X=i.current;!E&&i.current&&(X.style.top="0px",X.style.bottom="",X.style.maxHeight=(window.visualViewport?.height??window.innerHeight)+"px");let G=dK({placement:bK(u,e),overlayNode:i.current,targetNode:r.current,scrollNode:a.current||i.current,padding:c,shouldFlip:f,boundaryElement:h,offset:m,crossOffset:g,maxHeight:E,arrowSize:n??(s?.current?Bm(s.current,!0).width:0),arrowBoundaryOffset:D,targetRect:T?.(r.current)});if(!G.position)return;X.style.top="",X.style.bottom="",X.style.left="",X.style.right="",Object.keys(G.position).forEach(F=>X.style[F]=G.position[F]+"px"),X.style.maxHeight=G.maxHeight!=null?G.maxHeight+"px":"";let Z=_e();if(q&&Z&&a.current){let F=Z.getBoundingClientRect(),te=a.current.getBoundingClientRect(),P=F[q.type]-te[q.type];a.current.scrollTop+=P-q.offset}A(G)},B);Ie(M,B),gK(M),f4({ref:i,onResize:M}),f4({ref:r,onResize:M});let O=S.useRef(!1);Ie(()=>{let q,X=()=>{O.current=!0,clearTimeout(q),q=setTimeout(()=>{O.current=!1},500),M()},G=()=>{O.current&&X()};return $o?.addEventListener("resize",X),$o?.addEventListener("scroll",G),()=>{$o?.removeEventListener("resize",X),$o?.removeEventListener("scroll",G)}},[M]);let j=S.useCallback(()=>{O.current||k?.()},[k,O]);return hK({triggerRef:r,isOpen:x,onClose:k&&j}),{overlayProps:{style:{position:$?"absolute":"fixed",top:$?void 0:0,left:$?void 0:0,zIndex:1e5,...$?.position,maxHeight:$?.maxHeight??"100vh"}},placement:$?.placement??null,triggerAnchorPoint:$?.triggerAnchorPoint??null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:$?.arrowOffsetLeft,top:$?.arrowOffsetTop}},updatePosition:M}}function gK(t){Ie(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t])}function bK(t,e){return e==="rtl"?t.replace("start","right").replace("end","left"):t.replace("start","left").replace("end","right")}function yK(t){let{ref:e,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=t,s=S.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=Pt(c=>{n&&tE(c,e)&&(i&&i(c),s.current.isPointerDown=!0)}),u=Pt(c=>{n&&n(c)});S.useEffect(()=>{let c=s.current;if(r)return;const f=e.current,h=je(f);if(typeof PointerEvent<"u"){let m=g=>{c.isPointerDown&&tE(g,e)&&u(g),c.isPointerDown=!1};return h.addEventListener("pointerdown",a,!0),h.addEventListener("click",m,!0),()=>{h.removeEventListener("pointerdown",a,!0),h.removeEventListener("click",m,!0)}}},[e,r])}function tE(t,e){if(t.button>0)return!1;let n=ce(t);if(n){const r=n.ownerDocument;if(!r||!Se(r.documentElement,n)||n.closest("[data-react-aria-top-layer]"))return!1}return e.current?!t.composedPath().includes(e.current):!1}const Lr=[];function rT(t,e){let{onClose:n,shouldCloseOnBlur:r,isOpen:i,isDismissable:s=!1,isKeyboardDismissDisabled:a=!1,shouldCloseOnInteractOutside:u}=t,c=S.useRef(void 0);S.useEffect(()=>{if(i&&!Lr.includes(e))return Lr.push(e),()=>{let x=Lr.indexOf(e);x>=0&&Lr.splice(x,1)}},[i,e]);let f=()=>{Lr[Lr.length-1]===e&&n&&n()},h=x=>{const k=Lr[Lr.length-1];c.current=k,(!u||u(ce(x)))&&k===e&&x.stopPropagation()},m=x=>{(!u||u(ce(x)))&&(Lr[Lr.length-1]===e&&x.stopPropagation(),c.current===e&&f()),c.current=void 0},g=x=>{x.key==="Escape"&&!a&&!x.nativeEvent.isComposing&&(x.stopPropagation(),x.preventDefault(),f())};yK({ref:e,onInteractOutside:s&&i?m:void 0,onInteractOutsideStart:h});let{focusWithinProps:b}=K3({isDisabled:!r,onBlurWithin:x=>{!x.relatedTarget||LF(x.relatedTarget)||(!u||u(x.relatedTarget))&&n?.()}});return{overlayProps:{onKeyDown:g,...b},underlayProps:{}}}const kc=typeof document<"u"&&window.visualViewport;let ah=0,_b;function iT(t={}){let{isDisabled:e}=t;Ie(()=>{if(!e)return ah++,ah===1&&(Pi()?_b=vK():_b=xK()),()=>{ah--,ah===0&&_b()}},[e])}function xK(){let t=window.innerWidth-document.documentElement.clientWidth;return Ys(t>0&&("scrollbarGutter"in document.documentElement.style?Ih(document.documentElement,"scrollbarGutter","stable"):Ih(document.documentElement,"paddingRight",`${t}px`)),Ih(document.documentElement,"overflow","hidden"))}function vK(){let t=Ih(document.documentElement,"overflow","hidden"),e,n=!1,r=h=>{let m=ce(h);e=Hs(m)?m:Ur(m,!0),n=!1;let g=m.ownerDocument.defaultView.getSelection();g&&!g.isCollapsed&&g.containsNode(m,!0)&&(n=!0),h.composedPath().some(b=>b instanceof HTMLInputElement&&b.type==="range")&&(n=!0),"selectionStart"in m&&"selectionEnd"in m&&m.selectionStart<m.selectionEnd&&m.ownerDocument.activeElement===m&&(n=!0)},i=document.createElement("style"),s=U$();s&&(i.nonce=s),i.textContent=`
|
|
16
|
+
@layer {
|
|
17
|
+
* {
|
|
18
|
+
overscroll-behavior: contain;
|
|
19
|
+
}
|
|
20
|
+
}`.trim(),document.head.prepend(i);let a=h=>{if(!(h.touches.length===2||n)){if(!e||e===document.documentElement||e===document.body){h.preventDefault();return}e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&h.preventDefault()}},u=h=>{let m=ce(h),g=h.relatedTarget;g&&vc(g)?(g.focus({preventScroll:!0}),nE(g,vc(m))):g||m.parentElement?.closest("[tabindex]")?.focus({preventScroll:!0})},c=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(h){let m=_e(),g=m!=null&&vc(m);c.call(this,{...h,preventScroll:!0}),(!h||!h.preventScroll)&&nE(this,g)};let f=Ys(Vb(document,"touchstart",r,{passive:!1,capture:!0}),Vb(document,"touchmove",a,{passive:!1,capture:!0}),Vb(document,"blur",u,!0));return()=>{t(),f(),i.remove(),HTMLElement.prototype.focus=c}}function Ih(t,e,n){let r=t.style[e];return t.style[e]=n,()=>{t.style[e]=r}}function Vb(t,e,n,r){return t.addEventListener(e,n,r),()=>{t.removeEventListener(e,n,r)}}function nE(t,e){e||!kc?rE(t):kc.addEventListener("resize",()=>rE(t),{once:!0})}function rE(t){let e=document.scrollingElement||document.documentElement,n=t;for(;n&&n!==e;){let r=Ur(n);if(r!==document.documentElement&&r!==document.body&&r!==n){let i=r.getBoundingClientRect(),s=n.getBoundingClientRect();if(s.top<i.top||s.bottom>i.top+n.clientHeight){let a=i.bottom;kc&&(a=Math.min(a,kc.offsetTop+kc.height));let u=s.top-i.top-((a-i.top)/2-s.height/2);r.scrollTo({top:Math.max(0,Math.min(r.scrollHeight-r.clientHeight,r.scrollTop+u)),behavior:"smooth"})}}n=r.parentElement}}function kK(t,e){let{triggerRef:n,popoverRef:r,groupRef:i,isNonModal:s,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:u,...c}=t,f=c.trigger==="SubmenuTrigger",{overlayProps:h,underlayProps:m}=rT({isOpen:e.isOpen,onClose:e.close,shouldCloseOnBlur:!0,isDismissable:!s||f,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:u},i??r),{overlayProps:g,arrowProps:b,placement:x,triggerAnchorPoint:k}=mK({...c,targetRef:n,overlayRef:r,isOpen:e.isOpen,onClose:s&&!f?e.close:null});return iT({isDisabled:s||!e.isOpen}),S.useEffect(()=>{if(e.isOpen&&r.current)return s?iK(i?.current??r.current):X3([i?.current??r.current],{shouldUseInert:!0})},[s,e.isOpen,r,i]),{popoverProps:we(h,g),arrowProps:b,underlayProps:m,placement:x,triggerAnchorPoint:k}}var sT={};sT={dismiss:"تجاهل"};var oT={};oT={dismiss:"Отхвърляне"};var aT={};aT={dismiss:"Odstranit"};var lT={};lT={dismiss:"Luk"};var uT={};uT={dismiss:"Schließen"};var cT={};cT={dismiss:"Απόρριψη"};var dT={};dT={dismiss:"Dismiss"};var fT={};fT={dismiss:"Descartar"};var hT={};hT={dismiss:"Lõpeta"};var pT={};pT={dismiss:"Hylkää"};var mT={};mT={dismiss:"Rejeter"};var gT={};gT={dismiss:"התעלם"};var bT={};bT={dismiss:"Odbaci"};var yT={};yT={dismiss:"Elutasítás"};var xT={};xT={dismiss:"Ignora"};var vT={};vT={dismiss:"閉じる"};var kT={};kT={dismiss:"무시"};var CT={};CT={dismiss:"Atmesti"};var ET={};ET={dismiss:"Nerādīt"};var DT={};DT={dismiss:"Lukk"};var ST={};ST={dismiss:"Negeren"};var wT={};wT={dismiss:"Zignoruj"};var $T={};$T={dismiss:"Descartar"};var TT={};TT={dismiss:"Dispensar"};var AT={};AT={dismiss:"Revocare"};var BT={};BT={dismiss:"Пропустить"};var MT={};MT={dismiss:"Zrušiť"};var NT={};NT={dismiss:"Opusti"};var RT={};RT={dismiss:"Odbaci"};var OT={};OT={dismiss:"Avvisa"};var PT={};PT={dismiss:"Kapat"};var zT={};zT={dismiss:"Скасувати"};var LT={};LT={dismiss:"取消"};var IT={};IT={dismiss:"關閉"};var jT={};jT={"ar-AE":sT,"bg-BG":oT,"cs-CZ":aT,"da-DK":lT,"de-DE":uT,"el-GR":cT,"en-US":dT,"es-ES":fT,"et-EE":hT,"fi-FI":pT,"fr-FR":mT,"he-IL":gT,"hr-HR":bT,"hu-HU":yT,"it-IT":xT,"ja-JP":vT,"ko-KR":kT,"lt-LT":CT,"lv-LV":ET,"nb-NO":DT,"nl-NL":ST,"pl-PL":wT,"pt-BR":$T,"pt-PT":TT,"ro-RO":AT,"ru-RU":BT,"sk-SK":MT,"sl-SI":NT,"sr-SP":RT,"sv-SE":OT,"tr-TR":PT,"uk-UA":zT,"zh-CN":LT,"zh-TW":IT};function CK(t){return t&&t.__esModule?t.default:t}function h4(t){let{onDismiss:e,...n}=t,r=gr(CK(jT),"@react-aria/overlays"),i=z3(n,r.format("dismiss")),s=()=>{e&&e()};return V.createElement(aF,null,V.createElement("button",{...i,tabIndex:-1,onClick:s,style:{width:1,height:1}}))}const FT=V.forwardRef(({children:t,...e},n)=>{let r=S.useRef(!1),i=S.useContext(Uc),s=we(i||{},{...e,register(){r.current=!0,i&&i.register()}});return s.ref=Js(n||i?.ref),L3(i,s.ref),S.useEffect(()=>{r.current||(r.current=!0)},[]),V.createElement(Uc.Provider,{value:s},t)});function EK({children:t}){let e=S.useMemo(()=>({register:()=>{}}),[]);return V.createElement(Uc.Provider,{value:e},t)}const DK=S.createContext({});function SK(){return S.useContext(DK)??{}}const KT=V.createContext(null);function p4(t){let e=Xs(),{portalContainer:n=e?null:document.body,isExiting:r}=t,[i,s]=S.useState(!1),a=S.useMemo(()=>({contain:i,setContain:s}),[i,s]),{getContainer:u}=SK();if(!t.portalContainer&&u&&(n=u()),!n)return null;let c=t.children;return t.disableFocusManagement||(c=V.createElement(G3,{restoreFocus:!0,contain:(t.shouldContainFocus||i)&&!r},c)),c=V.createElement(KT.Provider,{value:a},V.createElement(EK,null,c)),F$.createPortal(c,n)}function _T(){let e=S.useContext(KT)?.setContain;Ie(()=>{e?.(!0)},[e])}function J3(t){let[e,n]=Zs(t.isOpen,t.defaultOpen||!1,t.onOpenChange);const r=S.useCallback(()=>{n(!0)},[n]),i=S.useCallback(()=>{n(!1)},[n]),s=S.useCallback(()=>{n(!e)},[n,e]);return{isOpen:e,setOpen:n,open:r,close:i,toggle:s}}function Z3(t,e=!0){let[n,r]=S.useState(!0),i=n&&e;return Ie(()=>{if(i&&t.current&&"getAnimations"in t.current)for(let s of t.current.getAnimations())s instanceof CSSTransition&&s.cancel()},[t,i]),VT(t,i,S.useCallback(()=>r(!1),[])),i}function m4(t,e){let[n,r]=S.useState(e?"open":"closed");switch(n){case"open":e||r("exiting");break;case"closed":case"exiting":e&&r("open");break}let i=n==="exiting";return VT(t,i,S.useCallback(()=>{r(s=>s==="exiting"?"closed":s)},[])),i}function VT(t,e,n){Ie(()=>{if(e&&t.current){if(!("getAnimations"in t.current)){n();return}let r=t.current.getAnimations();if(r.length===0){n();return}let i=!1;return Promise.allSettled(r.map(s=>s.finished)).then(()=>{i||Hl.flushSync(()=>{n()})}),()=>{i=!0}}},[t,e,n])}const Wc=S.createContext(null),iE=S.createContext(null),Mm=S.forwardRef(function(e,n){[e,n]=Et(e,n,Wc);let r=S.useContext(fa),i=J3(e),s=e.isOpen!=null||e.defaultOpen!=null||!r?i:r,a=m4(n,s.isOpen)||e.isExiting||!1,u=j$(),{direction:c}=Ki();if(u){let f=e.children;return typeof f=="function"&&(f=f({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),V.createElement(V.Fragment,null,f)}return s&&!s.isOpen&&!a?null:V.createElement(wK,{...e,triggerRef:e.triggerRef,state:s,popoverRef:n,isExiting:a,dir:c})});function wK({state:t,isExiting:e,UNSTABLE_portalContainer:n,clearContexts:r,...i}){let s=S.useRef(null),a=S.useRef(null),u=S.useContext(iE),c=u&&i.trigger==="SubmenuTrigger",{popoverProps:f,underlayProps:h,arrowProps:m,placement:g,triggerAnchorPoint:b}=kK({...i,offset:i.offset??8,arrowRef:s,groupRef:c?u:a},t),x=i.popoverRef,k=Z3(x,!!g)||i.isEntering||!1,E=$t({...i,defaultClassName:"react-aria-Popover",values:{trigger:i.trigger||null,placement:g,isEntering:k,isExiting:e}}),D=!i.isNonModal||i.trigger==="SubmenuTrigger",[T,$]=S.useState(!1);Ie(()=>{x.current&&$(D&&!x.current.querySelector("[role=dialog]"))},[x,D]),S.useEffect(()=>{T&&(i.trigger!=="SubmenuTrigger"||Zo()!=="pointer")&&x.current&&!Bl(x.current)&&bn(x.current)},[T,x,i.trigger]);let A=S.useMemo(()=>{let q=E.children;if(r)for(let X of r)q=V.createElement(X.Provider,{value:null},q);return q},[E.children,r]),[B,R]=S.useState(null),M=S.useCallback(()=>{i.triggerRef.current&&R(i.triggerRef.current.getBoundingClientRect().width+"px")},[i.triggerRef]);Ie(M,[M]),f4({ref:E.style?.["--trigger-width"]?void 0:i.triggerRef,onResize:M});let O={...f.style,"--trigger-anchor-point":b?`${b.x}px ${b.y}px`:void 0,...E.style,"--trigger-width":E.style?.["--trigger-width"]||B},j=V.createElement(ot.div,{...we(Ze(i,{global:!0}),f),...E,role:T?"dialog":void 0,tabIndex:T?-1:void 0,"aria-label":i["aria-label"],"aria-labelledby":i["aria-labelledby"],ref:x,slot:i.slot||void 0,style:O,dir:i.dir,"data-trigger":i.trigger,"data-placement":g,"data-entering":k||void 0,"data-exiting":e||void 0},!i.isNonModal&&V.createElement(h4,{onDismiss:t.close}),V.createElement(nK.Provider,{value:{...m,placement:g,ref:s}},A),V.createElement(h4,{onDismiss:t.close}));return c?V.createElement(p4,{...i,shouldContainFocus:T,isExiting:e,portalContainer:n??u?.current??void 0},j):V.createElement(p4,{...i,shouldContainFocus:T,isExiting:e,portalContainer:n},!i.isNonModal&&t.isOpen&&V.createElement("div",{"data-testid":"underlay",...h,style:{position:"fixed",inset:0}}),V.createElement("div",{ref:a,style:{display:"contents"}},V.createElement(iE.Provider,{value:a},j)))}const $K=S.createContext({});var HT={};HT={longPressMessage:"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"};var UT={};UT={longPressMessage:"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"};var qT={};qT={longPressMessage:"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"};var GT={};GT={longPressMessage:"Langt tryk eller tryk på Alt + pil ned for at åbne menuen"};var WT={};WT={longPressMessage:"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"};var QT={};QT={longPressMessage:"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"};var YT={};YT={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var XT={};XT={longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"};var JT={};JT={longPressMessage:"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool"};var ZT={};ZT={longPressMessage:"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli"};var eA={};eA={longPressMessage:"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."};var tA={};tA={longPressMessage:"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"};var nA={};nA={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var rA={};rA={longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"};var iA={};iA={longPressMessage:"Premi a lungo o premi Alt + Freccia giù per aprire il menu"};var sA={};sA={longPressMessage:"長押しまたは Alt+下矢印キーでメニューを開く"};var oA={};oA={longPressMessage:"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"};var aA={};aA={longPressMessage:"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."};var lA={};lA={longPressMessage:"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"};var uA={};uA={longPressMessage:"Langt trykk eller trykk Alt + PilNed for å åpne menyen"};var cA={};cA={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var dA={};dA={longPressMessage:"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"};var fA={};fA={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var hA={};hA={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var pA={};pA={longPressMessage:"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"};var mA={};mA={longPressMessage:"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"};var gA={};gA={longPressMessage:"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"};var bA={};bA={longPressMessage:"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"};var yA={};yA={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var xA={};xA={longPressMessage:"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"};var vA={};vA={longPressMessage:"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"};var kA={};kA={longPressMessage:"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"};var CA={};CA={longPressMessage:"长按或按 Alt + 向下方向键以打开菜单"};var EA={};EA={longPressMessage:"長按或按 Alt+向下鍵以開啟功能表"};var DA={};DA={"ar-AE":HT,"bg-BG":UT,"cs-CZ":qT,"da-DK":GT,"de-DE":WT,"el-GR":QT,"en-US":YT,"es-ES":XT,"et-EE":JT,"fi-FI":ZT,"fr-FR":eA,"he-IL":tA,"hr-HR":nA,"hu-HU":rA,"it-IT":iA,"ja-JP":sA,"ko-KR":oA,"lt-LT":aA,"lv-LV":lA,"nb-NO":uA,"nl-NL":cA,"pl-PL":dA,"pt-BR":fA,"pt-PT":hA,"ro-RO":pA,"ru-RU":mA,"sk-SK":gA,"sl-SI":bA,"sr-SP":yA,"sv-SE":xA,"tr-TR":vA,"uk-UA":kA,"zh-CN":CA,"zh-TW":EA};function SA(t,e,n){let{type:r}=t,{isOpen:i}=e;S.useEffect(()=>{n&&n.current&&nT.set(n.current,e.close)});let s;r==="menu"?s=!0:r==="listbox"&&(s="listbox");let a=an();return{triggerProps:{"aria-haspopup":s,"aria-expanded":i,"aria-controls":i?a:void 0,onPress:e.toggle},overlayProps:{id:a}}}function TK(t){return t&&t.__esModule?t.default:t}function AK(t,e,n){let{type:r="menu",isDisabled:i,trigger:s="press"}=t,a=an(),{triggerProps:u,overlayProps:c}=SA({type:r},e,n),f=b=>{if(!i&&!(s==="longPress"&&!b.altKey)&&n&&n.current)switch(b.key){case"Enter":case" ":if(s==="longPress"||b.isDefaultPrevented())return;case"ArrowDown":"continuePropagation"in b||b.stopPropagation(),b.preventDefault(),e.toggle("first");break;case"ArrowUp":"continuePropagation"in b||b.stopPropagation(),b.preventDefault(),e.toggle("last");break;default:"continuePropagation"in b&&b.continuePropagation()}},h=gr(TK(DA),"@react-aria/menu"),{longPressProps:m}=W6({isDisabled:i||s!=="longPress",accessibilityDescription:h.format("longPressMessage"),onLongPressStart(){e.close()},onLongPress(){e.open("first")}}),g={preventFocusOnPress:!0,onPressStart(b){b.pointerType!=="touch"&&b.pointerType!=="keyboard"&&!i&&(Br(b.target),e.open(b.pointerType==="virtual"?"first":null))},onPress(b){b.pointerType==="touch"&&!i&&(Br(b.target),e.toggle())}};return delete u.onPress,{menuTriggerProps:{...u,...s==="press"?g:m,id:a,onKeyDown:f},menuProps:{...c,"aria-labelledby":a,autoFocus:e.focusStrategy||!0,onClose:e.close}}}const wA=new WeakMap;function BK(t,e,n){let{shouldFocusWrap:r=!0,onKeyDown:i,onKeyUp:s,...a}=t;!t["aria-label"]&&t["aria-labelledby"];let u=Ze(t,{labelable:!0}),{listProps:c}=G6({...a,ref:n,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,shouldFocusWrap:r,linkBehavior:"override"});return wA.set(e,{onClose:t.onClose,onAction:t.onAction,shouldUseVirtualFocus:t.shouldUseVirtualFocus}),{menuProps:we(u,{onKeyDown:i,onKeyUp:s},{role:"menu",...c,onKeyDown:f=>{(f.key!=="Escape"||t.shouldUseVirtualFocus)&&c.onKeyDown?.(f)}})}}function MK(t,e,n){let{id:r,key:i,closeOnSelect:s,shouldCloseOnSelect:a,isVirtualized:u,"aria-haspopup":c,onPressStart:f,onPressUp:h,onPress:m,onPressChange:g,onPressEnd:b,onClick:x,onHoverStart:k,onHoverChange:E,onHoverEnd:D,onKeyDown:T,onKeyUp:$,onFocus:A,onFocusChange:B,onBlur:R,selectionManager:M=e.selectionManager}=t,O=!!c,j=O&&t["aria-expanded"]==="true",q=t.isDisabled??M.isDisabled(i),X=t.isSelected??M.isSelected(i),G=wA.get(e),Z=e.collection.getItem(i),F=t.onClose||G.onClose,te=_l(),P=()=>{if(!O&&(Z?.props?.onAction?Z.props.onAction():t.onAction&&t.onAction(i),G.onAction)){let Be=G.onAction;Be(i,Z?.value)}},_="menuitem";O||(M.selectionMode==="single"?_="menuitemradio":M.selectionMode==="multiple"&&(_="menuitemcheckbox"));let W=Ho(),ee=Ho(),z=Ho(),L={id:r,"aria-disabled":q||void 0,role:_,"aria-label":t["aria-label"],"aria-labelledby":W,"aria-describedby":[t["aria-describedby"],ee,z].filter(Boolean).join(" ")||void 0,"aria-controls":t["aria-controls"],"aria-haspopup":c,"aria-expanded":t["aria-expanded"]};if(M.selectionMode!=="none"&&!O&&(L["aria-checked"]=X),u){let Be=Number(Z?.index);L["aria-posinset"]=Number.isNaN(Be)?void 0:Be+1,L["aria-setsize"]=YF(e.collection)}let H=S.useRef(!1),ie=Be=>{g?.(Be),H.current=Be},le=S.useRef(null),de=Be=>{Be.pointerType!=="keyboard"&&(le.current={pointerType:Be.pointerType}),Be.pointerType==="mouse"&&(H.current||Be.target.click()),h?.(Be)},he=Be=>{x?.(Be),P(),Vw(Be,te,Z.props.href,Z?.props.routerOptions);let Xr=le.current?.pointerType==="keyboard"?le.current?.key==="Enter"||M.selectionMode==="none"||M.isLink(i):M.selectionMode!=="multiple"||M.isLink(i);Xr=a??s??Xr,F&&!O&&Xr&&F(),le.current=null},{itemProps:Ce,isFocused:Qe}=Q6({id:r,selectionManager:M,key:i,ref:n,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:"none",shouldUseVirtualFocus:G.shouldUseVirtualFocus}),{pressProps:$e,isPressed:En}=gd({onPressStart:f,onPress:m,onPressUp:de,onPressChange:ie,onPressEnd:b,isDisabled:q}),{hoverProps:ln}=_i({isDisabled:q,onHoverStart(Be){!Ml()&&!(j&&c)&&(M.setFocused(!0),M.setFocusedKey(i)),k?.(Be)},onHoverChange:E,onHoverEnd:D}),{keyboardProps:mn}=I$({onKeyDown:Be=>{if(Be.repeat){Be.continuePropagation();return}switch(Be.key){case" ":le.current={pointerType:"keyboard",key:" "},ce(Be).click(),Oo("keyboard");break;case"Enter":le.current={pointerType:"keyboard",key:"Enter"},ce(Be).tagName!=="A"&&ce(Be).click(),Oo("keyboard");break;default:O||Be.continuePropagation(),T?.(Be);break}},onKeyUp:$}),{focusableProps:br}=Dm({onBlur:R,onFocus:A,onFocusChange:B},n),Ht=Ze(Z?.props);delete Ht.id;let Ui=_w(Z?.props);return{menuItemProps:{...L,...we(Ht,Ui,O?{onFocus:Ce.onFocus,"data-collection":Ce["data-collection"],"data-key":Ce["data-key"]}:Ce,$e,ln,mn,br,G.shouldUseVirtualFocus||O?{onMouseDown:Be=>Be.preventDefault()}:void 0,q?void 0:{onClick:he}),tabIndex:Ce.tabIndex!=null&&j&&!G.shouldUseVirtualFocus?-1:Ce.tabIndex},labelProps:{id:W},descriptionProps:{id:ee},keyboardShortcutProps:{id:z},isFocused:Qe,isFocusVisible:Qe&&M.isFocused&&Ml()&&!j,isSelected:X,isPressed:En,isDisabled:q}}function NK(t){let{heading:e,"aria-label":n}=t,r=an();return{itemProps:{role:"presentation"},headingProps:e?{id:r,role:"presentation"}:{},groupProps:{role:"group","aria-label":n,"aria-labelledby":e?r:void 0}}}function ex(t){let e=J3(t),[n,r]=S.useState(null),[i,s]=S.useState([]),a=()=>{s([]),e.close()};return{focusStrategy:n,...e,open(f=null){r(f),e.open()},toggle(f=null){r(f),e.toggle()},close(){a()},expandedKeysStack:i,openSubmenu:(f,h)=>{s(m=>h>m.length?m:[...m.slice(0,h),f])},closeSubmenu:(f,h)=>{s(m=>m[h]===f?m.slice(0,h):m)}}}class RK{constructor(e,{expandedKeys:n}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e,n=n||new Set;let r=a=>{if(this.keyMap.set(a.key,a),a.childNodes&&(a.type==="section"||n.has(a.key)))for(let u of a.childNodes)r(u)};for(let a of e)r(a);let i=null,s=0;for(let[a,u]of this.keyMap)i?(i.nextKey=a,u.prevKey=i.key):(this.firstKey=a,u.prevKey=void 0),u.type==="item"&&(u.index=s++),i=u,i.nextKey=void 0;this.lastKey=i?.key??null}*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);return n?n.prevKey??null:null}getKeyAfter(e){let n=this.keyMap.get(e);return n?n.nextKey??null:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)??null}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}}function OK(t){let{onExpandedChange:e}=t,[n,r]=Zs(t.expandedKeys?new Set(t.expandedKeys):void 0,t.defaultExpandedKeys?new Set(t.defaultExpandedKeys):new Set,e),i=Y3(t),s=S.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),a=J6(t,S.useCallback(c=>new RK(c,{expandedKeys:n}),[n]),null);return S.useEffect(()=>{i.focusedKey!=null&&!a.getItem(i.focusedKey)&&i.setFocusedKey(null)},[a,i.focusedKey]),{collection:a,expandedKeys:n,disabledKeys:s,toggleKey:c=>{r(PK(n,c))},setExpandedKeys:r,selectionManager:new yd(a,i)}}function PK(t,e){let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}const $A=S.createContext(null),tx=S.createContext(null),cp=S.createContext(null),dp=S.createContext(null);function nx(t){let e=ex(t),n=S.useRef(null),{menuTriggerProps:r,menuProps:i}=AK({...t,type:"menu"},e,n),s=S.useRef(null);return j$()?null:V.createElement(Nr,{values:[[$A,{...i,ref:s}],[fa,e],[cp,e],[Wc,{trigger:"MenuTrigger",triggerRef:n,scrollRef:s,placement:"bottom start","aria-labelledby":i["aria-labelledby"]}]]},V.createElement(FT,{...r,ref:n,isPressed:e.isOpen},t.children))}const zK=S.createContext(null),v1=class v1 extends ca{filter(e,n,r){let i=e.getItem(this.firstChildKey);if(i&&r(i.textValue,this)){let s=this.clone();return n.addDescendants(s,e),s}return null}};v1.type="submenutrigger";let sE=v1;const rx=S.forwardRef(function(e,n){return[e,n]=Et(e,n,$A),V.createElement(j3,{content:V.createElement(wm,e)},r=>V.createElement(LK,{props:e,collection:r,menuRef:n}))});function LK({props:t,collection:e,menuRef:n}){[t,n]=Et(t,n,Vc);let{filter:r,...i}=t,s=S.useMemo(()=>r?e.filter(r):e,[e,r]),a=OK({...t,collection:s,children:void 0}),u=S.useContext(cp),{isVirtualized:c,CollectionRoot:f}=S.useContext(Vs),{menuProps:h}=BK({...t,isVirtualized:c,onClose:t.onClose||u?.close},a,n),m=$t({...t,children:void 0,defaultClassName:"react-aria-Menu",values:{isEmpty:a.collection.size===0}}),g=null;a.collection.size===0&&t.renderEmptyState&&(g=V.createElement("div",{role:"menuitem",style:{display:"contents"}},t.renderEmptyState()));let b=Ze(t,{global:!0});return V.createElement(G3,null,V.createElement(ot.div,{...we(b,m,h),ref:n,slot:t.slot||void 0,"data-empty":a.collection.size===0||void 0,onScroll:t.onScroll},V.createElement(Nr,{values:[[tx,a],[K6,{elementType:"div"}],[Rj,{name:"MenuSection",render:TA}],[zK,{parentMenuRef:n,shouldUseVirtualFocus:i?.shouldUseVirtualFocus}],[Qc,{shouldCloseOnSelect:t.shouldCloseOnSelect}],[Vc,null],[Em,null],[dp,a.selectionManager],[cp,u??ex({})]]},V.createElement(U3,null,V.createElement(f,{collection:a.collection,persistedKeys:Pj(a.selectionManager.focusedKey),scrollRef:n}))),g))}class IK extends yd{constructor(e,n){super(e.collection,n),this.parent=e}get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(e,n){return this.parent.setFocusedKey(e,n)}setFocused(e){this.parent.setFocused(e)}get childFocusStrategy(){return this.parent.childFocusStrategy}}function TA(t,e,n,r="react-aria-MenuSection"){let i=S.useContext(tx),{CollectionBranch:s}=S.useContext(Vs),[a,u]=Bw(),{headingProps:c,groupProps:f}=NK({heading:u,"aria-label":n.props["aria-label"]??void 0}),h=$t({...t,id:void 0,children:void 0,defaultClassName:r,className:n.props?.className,style:n.props?.style,values:void 0}),m=S.useContext(dp),g=Y3(t),b=t.selectionMode!=null?new IK(m,g):m,x=Kl(Qc)?.shouldCloseOnSelect,k=Ze(t,{global:!0});return delete k.id,V.createElement(ot.section,{...we(k,h,f),ref:e},V.createElement(Nr,{values:[[F6,{...c,ref:a}],[dp,b],[Qc,{shouldCloseOnSelect:t.shouldCloseOnSelect??x}]]},V.createElement(s,{collection:i.collection,parent:n})))}const jK=Mj(Yy,TA),Qc=S.createContext(null),ix=da(op,function(e,n,r){[e,n]=Et(e,n,Qc);let i=Kl(Qc)?.id,s=S.useContext(tx),a=Js(n),u=S.useContext(dp),{isVirtualized:c}=S.useContext(Vs),{menuItemProps:f,labelProps:h,descriptionProps:m,keyboardShortcutProps:g,...b}=MK({...e,id:i,key:r.key,selectionManager:u,isVirtualized:c},s,a),{hoverProps:x,isHovered:k}=_i({isDisabled:b.isDisabled}),E=$t({...e,id:void 0,children:r.rendered,defaultClassName:"react-aria-MenuItem",values:{...b,isHovered:k,isFocusVisible:b.isFocusVisible,selectionMode:u.selectionMode,selectionBehavior:u.selectionBehavior,hasSubmenu:!!e["aria-haspopup"],isOpen:e["aria-expanded"]==="true"}}),D=e.href?ot.a:ot.div,T=Ze(e,{global:!0});return delete T.id,delete T.onClick,V.createElement(D,{...we(T,E,f,x),ref:a,"data-disabled":b.isDisabled||void 0,"data-hovered":k||void 0,"data-focused":b.isFocused||void 0,"data-focus-visible":b.isFocusVisible||void 0,"data-pressed":b.isPressed||void 0,"data-selected":b.isSelected||void 0,"data-selection-mode":u.selectionMode==="none"?void 0:u.selectionMode,"data-has-submenu":!!e["aria-haspopup"]||void 0,"data-open":e["aria-expanded"]==="true"||void 0},V.createElement(Nr,{values:[[H3,{slots:{[Ts]:h,label:h,description:m}}],[$K,g],[q3,{isSelected:b.isSelected}]]},E.children))});function FK(t,e){let{role:n="dialog"}=t,r=Ho();r=t["aria-label"]?void 0:r;let i=S.useRef(!1);return S.useEffect(()=>{if(e.current&&!Bl(e.current)){bn(e.current);let s=setTimeout(()=>{(_e()===e.current||_e()===document.body)&&(i.current=!0,e.current&&(e.current.blur(),bn(e.current)),i.current=!1)},500);return()=>{clearTimeout(s)}}},[e]),_T(),S.useRef(!1),S.useEffect(()=>{}),{dialogProps:{...Ze(t,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":t["aria-labelledby"]||r,onBlur:s=>{i.current&&s.stopPropagation()}},titleProps:{id:r}}}const AA=S.createContext(null),fa=S.createContext(null);function KK(t){let e=ex(t),n=S.useRef(null),{triggerProps:r,overlayProps:i}=SA({type:"dialog"},e,n);return r.id=an(),i["aria-labelledby"]=r.id,V.createElement(Nr,{values:[[fa,e],[cp,e],[AA,i],[Wc,{trigger:"DialogTrigger",triggerRef:n,"aria-labelledby":i["aria-labelledby"]}]]},V.createElement(FT,{...r,ref:n,isPressed:e.isOpen},t.children))}const _K=S.forwardRef(function(e,n){let r=e["aria-labelledby"];[e,n]=Et(e,n,AA);let{dialogProps:i,titleProps:s}=FK({...e,"aria-labelledby":r},n),a=S.useContext(fa);!i["aria-label"]&&!i["aria-labelledby"]&&e["aria-labelledby"]&&(i["aria-labelledby"]=e["aria-labelledby"]);let u=$t({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:a?.close||(()=>{})}}),c=Ze(e,{global:!0});return V.createElement(ot.section,{...we(c,u,i),render:e.render,ref:n,slot:e.slot||void 0},V.createElement(Nr,{values:[[N6,{slots:{[Ts]:{},title:{...s,level:2}}}],[$m,{slots:{[Ts]:{},close:{onPress:()=>a?.close()}}}]]},u.children))});function VK(t){let e=Q3({usage:"search",...t}),n=S.useCallback((s,a)=>a.length===0?!0:(s=s.normalize("NFC"),a=a.normalize("NFC"),e.compare(s.slice(0,a.length),a)===0),[e]),r=S.useCallback((s,a)=>a.length===0?!0:(s=s.normalize("NFC"),a=a.normalize("NFC"),e.compare(s.slice(-a.length),a)===0),[e]),i=S.useCallback((s,a)=>{if(a.length===0)return!0;s=s.normalize("NFC"),a=a.normalize("NFC");let u=0,c=a.length;for(;u+c<=s.length;u++){let f=s.slice(u,u+c);if(e.compare(a,f)===0)return!0}return!1},[e]);return S.useMemo(()=>({startsWith:n,endsWith:r,contains:i}),[n,r,i])}var Rt=(function(t){return t[t.none=0]="none",t[t.cancel=0]="cancel",t[t.move=1]="move",t[t.copy=2]="copy",t[t.link=4]="link",t[t.all=7]="all",t})({});const BA={...Rt,copyMove:3,copyLink:6,linkMove:5,all:7,uninitialized:7},MA=NA(BA);MA[7]="all";const Cc={none:"cancel",link:"link",copy:"copy",move:"move"},Hb=NA(Cc);function NA(t){let e={};for(let n in t)e[t[n]]=n;return e}const HK=new Set(["text/plain","text/uri-list","text/html"]),fp="application/vnd.react-aria.items+json",hp="application/octet-stream",sx=new WeakMap,RA=Symbol();function UK(t){let{id:e}=sx.get(t)||{};if(!e)throw new Error("Droppable item outside a droppable collection");return e}function qK(t){let{ref:e}=sx.get(t)||{};if(!e)throw new Error("Droppable item outside a droppable collection");return e}function qo(t){let e=new Set;for(let n of t)for(let r of Object.keys(n))e.add(r);return e}function OA(t){return t||(t="virtual"),t==="pointer"&&(t="virtual"),t==="virtual"&&typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(pointer: coarse)").matches&&(t="touch"),t}function ox(){return OA(Ww())}function PA(){return OA(Zo())}function GK(t,e){let n=new Map,r=!1,i=[];for(let s of e){let a=Object.keys(s);a.length>1&&(r=!0);let u={};for(let c of a){let f=n.get(c);f?r=!0:(f=[],n.set(c,f));let h=s[c];u[c]=h,f.push(h)}i.push(u)}for(let[s,a]of n)if(HK.has(s)){let u=a.join(`
|
|
21
|
+
`);t.items.add(u,s)}else t.items.add(a[0],s);if(r){let s=JSON.stringify(i);t.items.add(s,fp)}}class lh{constructor(e){this.types=new Set;let n=!1;for(let r of e.items)r.type!==fp&&(r.kind==="file"&&(n=!0),r.type?this.types.add(r.type):this.types.add(hp));this.includesUnknownTypes=!n&&e.types.includes("Files")}has(e){if(Array.isArray(e))return e.some(n=>this.has(n));if(this.includesUnknownTypes||e===RA&&this.types.has(hp)||e==="*/*")return!0;if(typeof e=="string"){if(e.endsWith("/*")){for(let n of this.types)if(n.startsWith(e.slice(0,-2)))return!0;return!1}return this.types.has(e)}return!1}}function WK(t){let e=[];if(!t)return e;let n=!1;if(t.types.includes(fp))try{let r=t.getData(fp),i=JSON.parse(r);for(let s of i)e.push({kind:"text",types:new Set(Object.keys(s)),getText:a=>Promise.resolve(s[a])});n=!0}catch{}if(!n){let r=new Map;for(let i of t.items)if(i.kind==="string")r.set(i.type||hp,t.getData(i.type));else if(i.kind==="file")if(typeof i.webkitGetAsEntry=="function"){let s=i.webkitGetAsEntry();if(!s)continue;s.isFile?e.push(g4(i.getAsFile())):s.isDirectory&&e.push(zA(s))}else e.push(g4(i.getAsFile()));r.size>0&&e.push({kind:"text",types:new Set(r.keys()),getText:i=>Promise.resolve(r.get(i))})}return e}function QK(t){return typeof t.text=="function"?t.text():new Promise((e,n)=>{let r=new FileReader;r.onload=()=>{e(r.result)},r.onerror=n,r.readAsText(t)})}function g4(t){if(!t)throw new Error("No file provided");return{kind:"file",type:t.type||hp,name:t.name,getText:()=>QK(t),getFile:()=>Promise.resolve(t)}}function zA(t){return{kind:"directory",name:t.name,getEntries:()=>YK(t)}}async function*YK(t){let e=t.createReader(),n;do{n=await new Promise((r,i)=>{e.readEntries(r,i)});for(let r of n)if(r.isFile){let i=await XK(r);yield g4(i)}else r.isDirectory&&(yield zA(r))}while(n.length>0)}function XK(t){return new Promise((e,n)=>t.file(e,n))}let Kt={draggingKeys:new Set};function JK(t){Kt.draggingCollectionRef=t}function ZK(t){Kt.draggingKeys=t}function ll(t){Kt.dropCollectionRef=t}function LA(){Kt={draggingKeys:new Set}}function e_(t){Kt=t}function Hr(t){let{draggingCollectionRef:e,dropCollectionRef:n}=Kt;return e?.current!=null&&e.current===(t?.current||n?.current)}let jh;function pp(t){jh=t}let b4=Rt.none;function Ub(t){b4=t}let y4=new Map,Ec=new Map,Sr=null,mp=new Set;function IA(t){return y4.set(t.element,t),Sr?.updateValidDropTargets(),()=>{y4.delete(t.element),Sr?.updateValidDropTargets()}}function t_(t){return Ec.set(t.element,t),()=>{Ec.delete(t.element)}}function n_(t,e){if(Sr)throw new Error("Cannot begin dragging while already dragging");Sr=new a_(t,e),requestAnimationFrame(()=>{Sr&&(Sr.setup(),PA()==="keyboard"&&Sr.next())});for(let n of mp)n()}function ax(){let[t,e]=S.useState(Sr);return S.useEffect(()=>{let n=()=>e(Sr);return mp.add(n),()=>{mp.delete(n)}},[]),t}function r_(){return!!Sr}function i_(){Sr=null;for(let t of mp)t()}const oE=["pointerdown","pointermove","pointerenter","pointerleave","pointerover","pointerout","pointerup","mousedown","mousemove","mouseenter","mouseleave","mouseover","mouseout","mouseup","touchstart","touchmove","touchend","focusin","focusout"],s_=["pointerup","mouseup","touchend"],o_={keyboard:"dragStartedKeyboard",touch:"dragStartedTouch",virtual:"dragStartedVirtual"};class a_{constructor(e,n){this.validDropTargets=[],this.currentDropTarget=null,this.currentDropItem=null,this.dropOperation=null,this.mutationObserver=null,this.restoreAriaHidden=null,this.isVirtualClick=!1,this.dragTarget=e,this.stringFormatter=n,this.onKeyDown=this.onKeyDown.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.onClick=this.onClick.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.cancelEvent=this.cancelEvent.bind(this),this.initialFocused=!1}setup(){document.addEventListener("keydown",this.onKeyDown,!0),document.addEventListener("keyup",this.onKeyUp,!0),window.addEventListener("focus",this.onFocus,!0),window.addEventListener("blur",this.onBlur,!0),document.addEventListener("click",this.onClick,!0),document.addEventListener("pointerdown",this.onPointerDown,!0);for(let e of oE)document.addEventListener(e,this.cancelEvent,!0);this.mutationObserver=new MutationObserver(()=>this.updateValidDropTargets()),this.updateValidDropTargets(),Po(this.stringFormatter.format(o_[PA()]))}teardown(){document.removeEventListener("keydown",this.onKeyDown,!0),document.removeEventListener("keyup",this.onKeyUp,!0),window.removeEventListener("focus",this.onFocus,!0),window.removeEventListener("blur",this.onBlur,!0),document.removeEventListener("click",this.onClick,!0),document.removeEventListener("pointerdown",this.onPointerDown,!0);for(let e of oE)document.removeEventListener(e,this.cancelEvent,!0);this.mutationObserver?.disconnect(),this.restoreAriaHidden?.()}onKeyDown(e){if(this.cancelEvent(e),e.key==="Escape"){this.cancel();return}e.key==="Tab"&&!(e.metaKey||e.altKey||e.ctrlKey)&&(e.shiftKey?this.previous():this.next()),typeof this.currentDropTarget?.onKeyDown=="function"&&this.currentDropTarget.onKeyDown(e,this.dragTarget)}onKeyUp(e){this.cancelEvent(e),e.key==="Enter"&&(e.altKey||Se(this.getCurrentActivateButton(),ce(e))?this.activate(this.currentDropTarget,this.currentDropItem):this.drop())}getCurrentActivateButton(){return this.currentDropItem?.activateButtonRef?.current??this.currentDropTarget?.activateButtonRef?.current??null}onFocus(e){let n=this.getCurrentActivateButton(),r=ce(e);if(r===n){this.cancelEvent(e);return}if(r!==this.dragTarget.element&&this.cancelEvent(e),!(r instanceof HTMLElement)||r===this.dragTarget.element)return;let i=this.validDropTargets.find(a=>a.element===r)||this.validDropTargets.find(a=>Se(a.element,r));if(!i){this.currentDropTarget?this.currentDropTarget.element.focus():this.dragTarget.element.focus();return}let s=Ec.get(r);i&&this.setCurrentDropTarget(i,s)}onBlur(e){let n=this.getCurrentActivateButton();if(n&&e.relatedTarget===n){this.cancelEvent(e);return}ce(e)!==this.dragTarget.element&&this.cancelEvent(e),(!e.relatedTarget||!(e.relatedTarget instanceof HTMLElement))&&(this.currentDropTarget?this.currentDropTarget.element.focus():this.dragTarget.element.focus())}onClick(e){if(this.cancelEvent(e),vm(e)||this.isVirtualClick){let n=Ec.values(),r=ce(e),i=[...n].find(u=>u.element===r||Se(u.activateButtonRef?.current,r)),s=this.validDropTargets.find(u=>Se(u.element,r)),a=i?.activateButtonRef?.current??s?.activateButtonRef?.current;if(Se(a,r)&&s){this.activate(s,i);return}if(ce(e)===this.dragTarget.element){this.cancel();return}s&&(this.setCurrentDropTarget(s,i),this.drop(i))}}onPointerDown(e){this.cancelEvent(e),this.isVirtualClick=P3(e)}cancelEvent(e){let n=ce(e);(e.type==="focusin"||e.type==="focusout")&&(n===this.dragTarget?.element||n===this.getCurrentActivateButton())||(s_.includes(e.type)||e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation())}updateValidDropTargets(){if(!this.mutationObserver)return;if(this.mutationObserver.disconnect(),this.restoreAriaHidden&&this.restoreAriaHidden(),this.validDropTargets=l_(this.dragTarget),this.validDropTargets.length>0){let i=this.findNearestDropTarget();this.validDropTargets=[...this.validDropTargets.slice(i),...this.validDropTargets.slice(0,i)]}this.currentDropTarget&&!this.validDropTargets.includes(this.currentDropTarget)&&this.setCurrentDropTarget(this.validDropTargets[0]);let e=qo(this.dragTarget.items),n=[...Ec.values()].filter(i=>typeof i.getDropOperation=="function"?i.getDropOperation(e,this.dragTarget.allowedDropOperations)!=="cancel":!0),r=this.validDropTargets.filter(i=>!n.some(s=>Se(i.element,s.element)));this.restoreAriaHidden=X3([this.dragTarget.element,...n.flatMap(i=>i.activateButtonRef?.current?[i.element,i.activateButtonRef?.current]:[i.element]),...r.flatMap(i=>i.activateButtonRef?.current?[i.element,i.activateButtonRef?.current]:[i.element])],{shouldUseInert:!0}),this.mutationObserver.observe(document.body,{subtree:!0,attributes:!0,attributeFilter:["aria-hidden","inert"]})}next(){if(!this.currentDropTarget){this.setCurrentDropTarget(this.validDropTargets[0]);return}let e=this.validDropTargets.indexOf(this.currentDropTarget);if(e<0){this.setCurrentDropTarget(this.validDropTargets[0]);return}e===this.validDropTargets.length-1?this.dragTarget.element.closest('[aria-hidden="true"], [inert]')?this.setCurrentDropTarget(this.validDropTargets[0]):(this.setCurrentDropTarget(null),this.dragTarget.element.focus()):this.setCurrentDropTarget(this.validDropTargets[e+1])}previous(){if(!this.currentDropTarget){this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length-1]);return}let e=this.validDropTargets.indexOf(this.currentDropTarget);if(e<0){this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length-1]);return}e===0?this.dragTarget.element.closest('[aria-hidden="true"], [inert]')?this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length-1]):(this.setCurrentDropTarget(null),this.dragTarget.element.focus()):this.setCurrentDropTarget(this.validDropTargets[e-1])}findNearestDropTarget(){let e=this.dragTarget.element.getBoundingClientRect(),n=1/0,r=-1;for(let i=0;i<this.validDropTargets.length;i++){let a=this.validDropTargets[i].element.getBoundingClientRect(),u=a.left-e.left,c=a.top-e.top,f=u*u+c*c;f<n&&(n=f,r=i)}return r}setCurrentDropTarget(e,n){if(e!==this.currentDropTarget){if(this.currentDropTarget&&typeof this.currentDropTarget.onDropExit=="function"){let r=this.currentDropTarget.element.getBoundingClientRect();this.currentDropTarget.onDropExit({type:"dropexit",x:r.left+r.width/2,y:r.top+r.height/2})}if(this.currentDropTarget=e,e){if(typeof e.onDropEnter=="function"){let r=e.element.getBoundingClientRect();e.onDropEnter({type:"dropenter",x:r.left+r.width/2,y:r.top+r.height/2},this.dragTarget)}n||e?.element.focus()}}if(n!=null&&n!==this.currentDropItem&&(this.currentDropTarget&&typeof this.currentDropTarget.onDropTargetEnter=="function"&&this.currentDropTarget.onDropTargetEnter(n.target),n.element.focus(),this.currentDropItem=n,!this.initialFocused)){let r=n?.element.getAttribute("aria-label");r&&Po(r,"polite"),this.initialFocused=!0}}end(){if(this.teardown(),i_(),typeof this.dragTarget.onDragEnd=="function"){let n=(this.currentDropTarget&&this.dropOperation!=="cancel"?this.currentDropTarget:this.dragTarget).element.getBoundingClientRect();this.dragTarget.onDragEnd({type:"dragend",x:n.x+n.width/2,y:n.y+n.height/2,dropOperation:this.dropOperation||"cancel"})}this.currentDropTarget&&!this.currentDropTarget.preventFocusOnDrop&&_e()?.dispatchEvent(new FocusEvent("focusin",{bubbles:!0})),this.setCurrentDropTarget(null)}cancel(){this.setCurrentDropTarget(null),this.end(),this.dragTarget.element.closest('[aria-hidden="true"], [inert]')||this.dragTarget.element.focus(),_e()?.dispatchEvent(new FocusEvent("focusin",{bubbles:!0})),Po(this.stringFormatter.format("dropCanceled"))}drop(e){if(!this.currentDropTarget){this.cancel();return}if(typeof e?.getDropOperation=="function"){let n=qo(this.dragTarget.items);this.dropOperation=e.getDropOperation(n,this.dragTarget.allowedDropOperations)}else if(typeof this.currentDropTarget.getDropOperation=="function"){let n=qo(this.dragTarget.items);this.dropOperation=this.currentDropTarget.getDropOperation(n,this.dragTarget.allowedDropOperations)}else this.dropOperation=this.dragTarget.allowedDropOperations[0];if(typeof this.currentDropTarget.onDrop=="function"){let n=this.dragTarget.items.map(i=>({kind:"text",types:new Set(Object.keys(i)),getText:s=>Promise.resolve(i[s])})),r=this.currentDropTarget.element.getBoundingClientRect();this.currentDropTarget.onDrop({type:"drop",x:r.left+r.width/2,y:r.top+r.height/2,items:n,dropOperation:this.dropOperation},e?.target??null)}this.end(),Po(this.stringFormatter.format("dropComplete"))}activate(e,n){if(e&&typeof e.onDropActivate=="function"){let r=n?.target??null,i=e.element.getBoundingClientRect();e.onDropActivate({type:"dropactivate",x:i.left+i.width/2,y:i.top+i.height/2},r)}}}function l_(t){let e=qo(t.items);return[...y4.values()].filter(n=>n.element.closest('[aria-hidden="true"], [inert]')?!1:typeof n.getDropOperation=="function"?n.getDropOperation(e,t.allowedDropOperations)!=="cancel":!0)}var jA={};jA={dragDescriptionKeyboard:"اضغط Enter لبدء السحب.",dragDescriptionKeyboardAlt:"اضغط على Alt + Enter لبدء السحب.",dragDescriptionLongPress:"اضغط باستمرار لبدء السحب.",dragDescriptionTouch:"اضغط مرتين لبدء السحب.",dragDescriptionVirtual:"انقر لبدء السحب.",dragItem:t=>`اسحب ${t.itemText}`,dragSelectedItems:(t,e)=>`اسحب ${e.plural(t.count,{one:()=>`${e.number(t.count)} عنصر محدد`,other:()=>`${e.number(t.count)} عناصر محددة`})}`,dragSelectedKeyboard:(t,e)=>`اضغط على Enter للسحب ${e.plural(t.count,{one:"عدد العناصر المختارة",other:"عدد العناصر المختارة"})}.`,dragSelectedKeyboardAlt:(t,e)=>`اضغط على مفتاحي Alt + Enter للسحب ${e.plural(t.count,{one:"عدد العناصر المختارة",other:"عدد العناصر المختارة"})}.`,dragSelectedLongPress:(t,e)=>`اضغط باستمرار للسحب ${e.plural(t.count,{one:"عدد العناصر المختارة",other:"عدد العناصر المختارة"})}.`,dragStartedKeyboard:"بدأ السحب. اضغط Tab للانتقال إلى موضع الإفلات، ثم اضغط Enter للإفلات، أو اضغط Escape للإلغاء.",dragStartedTouch:"بدأ السحب. انتقل إلى موضع الإفلات، ثم اضغط مرتين للإفلات.",dragStartedVirtual:"بدأ السحب. انتقل إلى مكان الإفلات، ثم انقر أو اضغط Enter للإفلات.",dropCanceled:"تم إلغاء الإفلات.",dropComplete:"اكتمل الإفلات.",dropDescriptionKeyboard:"اضغط Enter للإفلات. اضغط Escape لإلغاء السحب.",dropDescriptionTouch:"اضغط مرتين للإفلات.",dropDescriptionVirtual:"انقر للإفلات.",dropIndicator:"مؤشر الإفلات",dropOnItem:t=>`إفلات ${t.itemText}`,dropOnRoot:"الإفلات",endDragKeyboard:"السحب. اضغط Enter لإلغاء السحب.",endDragTouch:"السحب. اضغط مرتين لإلغاء السحب.",endDragVirtual:"السحب. انقر لإلغاء السحب.",insertAfter:t=>`أدخل بعد ${t.itemText}`,insertBefore:t=>`أدخل قبل ${t.itemText}`,insertBetween:t=>`أدخل بين ${t.beforeItemText} و ${t.afterItemText}`};var FA={};FA={dragDescriptionKeyboard:"Натиснете „Enter“, за да започнете да плъзгате.",dragDescriptionKeyboardAlt:"Натиснете Alt + Enter, за да започнете да плъзгате.",dragDescriptionLongPress:"Натиснете продължително, за да започнете да плъзгате.",dragDescriptionTouch:"Натиснете двукратно, за да започнете да плъзгате.",dragDescriptionVirtual:"Щракнете, за да започнете да плъзгате.",dragItem:t=>`Плъзни ${t.itemText}`,dragSelectedItems:(t,e)=>`Плъзни ${e.plural(t.count,{one:()=>`${e.number(t.count)} избран елемент`,other:()=>`${e.number(t.count)} избрани елемента`})}`,dragSelectedKeyboard:(t,e)=>`Натиснете Enter, за да плъзнете ${e.plural(t.count,{one:()=>`${e.number(t.count)} избран елемент`,other:()=>`${e.number(t.count)} избрани елементи`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Натиснете Alt и Enter, за да плъзнете ${e.plural(t.count,{one:()=>`${e.number(t.count)} избран елемент`,other:()=>`${e.number(t.count)} избрани елементи`})}.`,dragSelectedLongPress:(t,e)=>`Натиснете продължително, за да плъзнете ${e.plural(t.count,{one:()=>`${e.number(t.count)} избран елемент`,other:()=>`${e.number(t.count)} избрани елементи`})}.`,dragStartedKeyboard:"Започна плъзгане. Натиснете „Tab“, за да се придвижите до целта, след което натиснете „Enter“ за пускане или натиснете „Escape“ за отмяна.",dragStartedTouch:"Започна плъзгане. Придвижете се до целта, след което натиснете двукратно, за да пуснете.",dragStartedVirtual:"Започна плъзгане. Придвижете се до целта, след което щракнете или натиснете „Enter“ за пускане.",dropCanceled:"Пускането е отменено.",dropComplete:"Пускането е завършено.",dropDescriptionKeyboard:"Натиснете „Enter“ за пускане. Натиснете „Escape“ за отмяна на плъзгането.",dropDescriptionTouch:"Натиснете двукратно за пускане.",dropDescriptionVirtual:"Щракнете за пускане.",dropIndicator:"индикатор за пускане",dropOnItem:t=>`Пусни върху ${t.itemText}`,dropOnRoot:"Пусни върху",endDragKeyboard:"Плъзгане. Натиснете „Enter“ за отмяна на плъзгането.",endDragTouch:"Плъзгане. Натиснете двукратно за отмяна на плъзгането.",endDragVirtual:"Плъзгане. Щракнете за отмяна.",insertAfter:t=>`Вмъкни след ${t.itemText}`,insertBefore:t=>`Вмъкни преди ${t.itemText}`,insertBetween:t=>`Вмъкни между ${t.beforeItemText} и ${t.afterItemText}`};var KA={};KA={dragDescriptionKeyboard:"Stisknutím klávesy Enter začnete s přetahováním.",dragDescriptionKeyboardAlt:"Stisknutím Alt + Enter zahájíte přetahování.",dragDescriptionLongPress:"Dlouhým stisknutím zahájíte přetahování.",dragDescriptionTouch:"Poklepáním začnete s přetahováním.",dragDescriptionVirtual:"Kliknutím začnete s přetahováním.",dragItem:t=>`Přetáhnout ${t.itemText}`,dragSelectedItems:(t,e)=>`Přetáhnout ${e.plural(t.count,{one:()=>`${e.number(t.count)} vybranou položku`,few:()=>`${e.number(t.count)} vybrané položky`,other:()=>`${e.number(t.count)} vybraných položek`})}`,dragSelectedKeyboard:(t,e)=>`Stisknutím klávesy Enter přetáhněte ${e.plural(t.count,{one:()=>`${e.number(t.count)} vybranou položku`,other:()=>`${e.number(t.count)} vybrané položky`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Stisknutím Alt + Enter přetáhněte ${e.plural(t.count,{one:()=>`${e.number(t.count)} vybranou položku`,other:()=>`${e.number(t.count)} vybrané položky`})}.`,dragSelectedLongPress:(t,e)=>`Dlouhým stisknutím přetáhnete ${e.plural(t.count,{one:()=>`${e.number(t.count)} vybranou položku`,other:()=>`${e.number(t.count)} vybrané položky`})}.`,dragStartedKeyboard:"Začněte s přetahováním. Po stisknutí klávesy Tab najděte požadovaný cíl a stisknutím klávesy Enter přetažení dokončete nebo stisknutím klávesy Esc akci zrušte.",dragStartedTouch:"Začněte s přetahováním. Najděte požadovaný cíl a poklepáním přetažení dokončete.",dragStartedVirtual:"Začněte s přetahováním. Najděte požadovaný cíl a kliknutím nebo stisknutím klávesy Enter přetažení dokončete.",dropCanceled:"Přetažení bylo zrušeno.",dropComplete:"Přetažení bylo dokončeno.",dropDescriptionKeyboard:"Stisknutím klávesy Enter přetažení dokončete nebo stisknutím klávesy Esc akci zrušte.",dropDescriptionTouch:"Poklepáním přetažení dokončete.",dropDescriptionVirtual:"Kliknutím objekt přetáhněte.",dropIndicator:"indikátor přetažení",dropOnItem:t=>`Přetáhnout na ${t.itemText}`,dropOnRoot:"Přetáhnout na",endDragKeyboard:"Probíhá přetahování. Stisknutím klávesy Enter přetažení zrušíte.",endDragTouch:"Probíhá přetahování. Poklepáním přetažení zrušíte.",endDragVirtual:"Probíhá přetahování. Kliknutím přetažení zrušíte.",insertAfter:t=>`Vložit za ${t.itemText}`,insertBefore:t=>`Vložit před ${t.itemText}`,insertBetween:t=>`Vložit mezi ${t.beforeItemText} a ${t.afterItemText}`};var _A={};_A={dragDescriptionKeyboard:"Tryk på Enter for at starte med at trække.",dragDescriptionKeyboardAlt:"Tryk på Alt + Enter for at starte med at trække.",dragDescriptionLongPress:"Tryk længe for at starte med at trække.",dragDescriptionTouch:"Dobbelttryk for at starte med at trække.",dragDescriptionVirtual:"Klik for at starte med at trække.",dragItem:t=>`Træk ${t.itemText}`,dragSelectedItems:(t,e)=>`Træk ${e.plural(t.count,{one:()=>`${e.number(t.count)} valgt element`,other:()=>`${e.number(t.count)} valgte elementer`})}`,dragSelectedKeyboard:(t,e)=>`Tryk på Enter for at trække ${e.plural(t.count,{one:()=>`${e.number(t.count)} valgte element`,other:()=>`${e.number(t.count)} valgte elementer`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Tryk på Alt + Enter for at trække ${e.plural(t.count,{one:()=>`${e.number(t.count)} valgte element`,other:()=>`${e.number(t.count)} valgte elementer`})}.`,dragSelectedLongPress:(t,e)=>`Tryk længe for at trække ${e.plural(t.count,{one:()=>`${e.number(t.count)} valgte element`,other:()=>`${e.number(t.count)} valgte elementer`})}.`,dragStartedKeyboard:"Startet med at trække. Tryk på Tab for at gå til et slip-mål, tryk derefter på Enter for at slippe, eller tryk på Escape for at annullere.",dragStartedTouch:"Startet med at trække. Gå til et slip-mål, og dobbelttryk derefter for at slippe.",dragStartedVirtual:"Startet med at trække. Gå til et slip-mål, og klik eller tryk derefter på enter for at slippe.",dropCanceled:"Slip annulleret.",dropComplete:"Slip fuldført.",dropDescriptionKeyboard:"Tryk på Enter for at slippe. Tryk på Escape for at annullere trækning.",dropDescriptionTouch:"Dobbelttryk for at slippe.",dropDescriptionVirtual:"Klik for at slippe.",dropIndicator:"slip-indikator",dropOnItem:t=>`Slip på ${t.itemText}`,dropOnRoot:"Slip på",endDragKeyboard:"Trækning. Tryk på enter for at annullere træk.",endDragTouch:"Trækning. Dobbelttryk for at annullere træk.",endDragVirtual:"Trækning. Klik for at annullere trækning.",insertAfter:t=>`Indsæt efter ${t.itemText}`,insertBefore:t=>`Indsæt før ${t.itemText}`,insertBetween:t=>`Indsæt mellem ${t.beforeItemText} og ${t.afterItemText}`};var VA={};VA={dragDescriptionKeyboard:"Drücken Sie die Eingabetaste, um den Ziehvorgang zu starten.",dragDescriptionKeyboardAlt:"Alt + Eingabe drücken, um den Ziehvorgang zu starten.",dragDescriptionLongPress:"Lang drücken, um mit dem Ziehen zu beginnen.",dragDescriptionTouch:"Tippen Sie doppelt, um den Ziehvorgang zu starten.",dragDescriptionVirtual:"Zum Starten des Ziehvorgangs klicken.",dragItem:t=>`${t.itemText} ziehen`,dragSelectedItems:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} ausgewähltes Objekt`,other:()=>`${e.number(t.count)} ausgewählte Objekte`})} ziehen`,dragSelectedKeyboard:(t,e)=>`Eingabetaste drücken, um ${e.plural(t.count,{one:()=>`${e.number(t.count)} ausgewähltes Element`,other:()=>`${e.number(t.count)} ausgewählte Elemente`})} zu ziehen.`,dragSelectedKeyboardAlt:(t,e)=>`Alt + Eingabetaste drücken, um ${e.plural(t.count,{one:()=>`${e.number(t.count)} ausgewähltes Element`,other:()=>`${e.number(t.count)} ausgewählte Elemente`})} zu ziehen.`,dragSelectedLongPress:(t,e)=>`Lang drücken, um ${e.plural(t.count,{one:()=>`${e.number(t.count)} ausgewähltes Element`,other:()=>`${e.number(t.count)} ausgewählte Elemente`})} zu ziehen.`,dragStartedKeyboard:"Ziehvorgang gestartet. Drücken Sie die Tabulatortaste, um zu einem Ablegeziel zu navigieren und drücken Sie dann die Eingabetaste, um das Objekt abzulegen, oder Escape, um den Vorgang abzubrechen.",dragStartedTouch:"Ziehvorgang gestartet. Navigieren Sie zu einem Ablegeziel und tippen Sie doppelt, um das Objekt abzulegen.",dragStartedVirtual:"Ziehvorgang gestartet. Navigieren Sie zu einem Ablegeziel und klicken Sie oder drücken Sie die Eingabetaste, um das Objekt abzulegen.",dropCanceled:"Ablegen abgebrochen.",dropComplete:"Ablegen abgeschlossen.",dropDescriptionKeyboard:"Drücken Sie die Eingabetaste, um das Objekt abzulegen. Drücken Sie Escape, um den Vorgang abzubrechen.",dropDescriptionTouch:"Tippen Sie doppelt, um das Objekt abzulegen.",dropDescriptionVirtual:"Zum Ablegen klicken.",dropIndicator:"Ablegeanzeiger",dropOnItem:t=>`Auf ${t.itemText} ablegen`,dropOnRoot:"Ablegen auf",endDragKeyboard:"Ziehvorgang läuft. Drücken Sie die Eingabetaste, um den Vorgang abzubrechen.",endDragTouch:"Ziehvorgang läuft. Tippen Sie doppelt, um den Vorgang abzubrechen.",endDragVirtual:"Ziehvorgang läuft. Klicken Sie, um den Vorgang abzubrechen.",insertAfter:t=>`Nach ${t.itemText} einfügen`,insertBefore:t=>`Vor ${t.itemText} einfügen`,insertBetween:t=>`Zwischen ${t.beforeItemText} und ${t.afterItemText} einfügen`};var HA={};HA={dragDescriptionKeyboard:"Πατήστε Enter για έναρξη της μεταφοράς.",dragDescriptionKeyboardAlt:"Πατήστε Alt + Enter για έναρξη της μεταφοράς.",dragDescriptionLongPress:"Πατήστε παρατεταμένα για να ξεκινήσετε τη μεταφορά.",dragDescriptionTouch:"Πατήστε δύο φορές για έναρξη της μεταφοράς.",dragDescriptionVirtual:"Κάντε κλικ για να ξεκινήσετε τη μεταφορά.",dragItem:t=>`Μεταφορά ${t.itemText}`,dragSelectedItems:(t,e)=>`Μεταφορά σε ${e.plural(t.count,{one:()=>`${e.number(t.count)} επιλεγμένο στοιχείο`,other:()=>`${e.number(t.count)} επιλεγμένα στοιχεία`})}`,dragSelectedKeyboard:(t,e)=>`Πατήστε Enter για να σύρετε ${e.plural(t.count,{one:()=>`${e.number(t.count)} επιλεγμένο στοιχείο`,other:()=>`${e.number(t.count)} επιλεγμένα στοιχεία`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Πατήστε Alt + Enter για να σύρετε ${e.plural(t.count,{one:()=>`${e.number(t.count)} επιλεγμένο στοιχείο`,other:()=>`${e.number(t.count)} επιλεγμένα στοιχεία`})}.`,dragSelectedLongPress:(t,e)=>`Πατήστε παρατεταμένα για να σύρετε ${e.plural(t.count,{one:()=>`${e.number(t.count)} επιλεγμένο στοιχείο`,other:()=>`${e.number(t.count)} επιλεγμένα στοιχεία`})}.`,dragStartedKeyboard:"Η μεταφορά ξεκίνησε. Πατήστε το πλήκτρο Tab για να μεταβείτε σε έναν προορισμό απόθεσης και, στη συνέχεια, πατήστε Enter για απόθεση ή πατήστε Escape για ακύρωση.",dragStartedTouch:"Η μεταφορά ξεκίνησε. Μεταβείτε σε έναν προορισμό απόθεσης και, στη συνέχεια, πατήστε δύο φορές για απόθεση.",dragStartedVirtual:"Η μεταφορά ξεκίνησε. Μεταβείτε σε έναν προορισμό απόθεσης και, στη συνέχεια, κάντε κλικ ή πατήστε Enter για απόθεση.",dropCanceled:"Η απόθεση ακυρώθηκε.",dropComplete:"Η απόθεση ολοκληρώθηκε.",dropDescriptionKeyboard:"Πατήστε Enter για απόθεση. Πατήστε Escape για ακύρωση της μεταφοράς.",dropDescriptionTouch:"Πατήστε δύο φορές για απόθεση.",dropDescriptionVirtual:"Κάντε κλικ για απόθεση.",dropIndicator:"δείκτης απόθεσης",dropOnItem:t=>`Απόθεση σε ${t.itemText}`,dropOnRoot:"Απόθεση σε",endDragKeyboard:"Μεταφορά σε εξέλιξη. Πατήστε Enter για ακύρωση της μεταφοράς.",endDragTouch:"Μεταφορά σε εξέλιξη. Πατήστε δύο φορές για ακύρωση της μεταφοράς.",endDragVirtual:"Μεταφορά σε εξέλιξη. Κάντε κλικ για ακύρωση της μεταφοράς.",insertAfter:t=>`Εισαγωγή μετά από ${t.itemText}`,insertBefore:t=>`Εισαγωγή πριν από ${t.itemText}`,insertBetween:t=>`Εισαγωγή μεταξύ ${t.beforeItemText} και ${t.afterItemText}`};var UA={};UA={dragItem:t=>`Drag ${t.itemText}`,dragSelectedItems:(t,e)=>`Drag ${e.plural(t.count,{one:()=>`${e.number(t.count)} selected item`,other:()=>`${e.number(t.count)} selected items`})}`,dragDescriptionKeyboard:"Press Enter to start dragging.",dragDescriptionKeyboardAlt:"Press Alt + Enter to start dragging.",dragDescriptionTouch:"Double tap to start dragging.",dragDescriptionVirtual:"Click to start dragging.",dragDescriptionLongPress:"Long press to start dragging.",dragSelectedKeyboard:(t,e)=>`Press Enter to drag ${e.plural(t.count,{one:()=>`${e.number(t.count)} selected item`,other:()=>`${e.number(t.count)} selected items`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Press Alt + Enter to drag ${e.plural(t.count,{one:()=>`${e.number(t.count)} selected item`,other:()=>`${e.number(t.count)} selected items`})}.`,dragSelectedLongPress:(t,e)=>`Long press to drag ${e.plural(t.count,{one:()=>`${e.number(t.count)} selected item`,other:()=>`${e.number(t.count)} selected items`})}.`,dragStartedKeyboard:"Started dragging. Press Tab to navigate to a drop target, then press Enter to drop, or press Escape to cancel.",dragStartedTouch:"Started dragging. Navigate to a drop target, then double tap to drop.",dragStartedVirtual:"Started dragging. Navigate to a drop target, then click or press Enter to drop.",endDragKeyboard:"Dragging. Press Enter to cancel drag.",endDragTouch:"Dragging. Double tap to cancel drag.",endDragVirtual:"Dragging. Click to cancel drag.",dropDescriptionKeyboard:"Press Enter to drop. Press Escape to cancel drag.",dropDescriptionTouch:"Double tap to drop.",dropDescriptionVirtual:"Click to drop.",dropCanceled:"Drop canceled.",dropComplete:"Drop complete.",dropIndicator:"drop indicator",dropOnRoot:"Drop on",dropOnItem:t=>`Drop on ${t.itemText}`,insertBefore:t=>`Insert before ${t.itemText}`,insertBetween:t=>`Insert between ${t.beforeItemText} and ${t.afterItemText}`,insertAfter:t=>`Insert after ${t.itemText}`};var qA={};qA={dragDescriptionKeyboard:"Pulse Intro para empezar a arrastrar.",dragDescriptionKeyboardAlt:"Pulse Intro para empezar a arrastrar.",dragDescriptionLongPress:"Mantenga pulsado para comenzar a arrastrar.",dragDescriptionTouch:"Pulse dos veces para iniciar el arrastre.",dragDescriptionVirtual:"Haga clic para iniciar el arrastre.",dragItem:t=>`Arrastrar ${t.itemText}`,dragSelectedItems:(t,e)=>`Arrastrar ${e.plural(t.count,{one:()=>`${e.number(t.count)} elemento seleccionado`,other:()=>`${e.number(t.count)} elementos seleccionados`})}`,dragSelectedKeyboard:(t,e)=>`Pulse Intro para arrastrar ${e.plural(t.count,{one:()=>`${e.number(t.count)} elemento seleccionado`,other:()=>`${e.number(t.count)} elementos seleccionados`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Pulse Alt + Intro para arrastrar ${e.plural(t.count,{one:()=>`${e.number(t.count)} elemento seleccionado`,other:()=>`${e.number(t.count)} elementos seleccionados`})}.`,dragSelectedLongPress:(t,e)=>`Mantenga pulsado para arrastrar ${e.plural(t.count,{one:()=>`${e.number(t.count)} elemento seleccionado`,other:()=>`${e.number(t.count)} elementos seleccionados`})}.`,dragStartedKeyboard:"Se ha empezado a arrastrar. Pulse el tabulador para ir al destino donde se vaya a colocar y, a continuación, pulse Intro para soltar, o pulse Escape para cancelar.",dragStartedTouch:"Se ha empezado a arrastrar. Vaya al destino donde se vaya a colocar y, a continuación, pulse dos veces para soltar.",dragStartedVirtual:"Se ha empezado a arrastrar. Vaya al destino donde se vaya a colocar y, a continuación, haga clic o pulse Intro para soltar.",dropCanceled:"Se ha cancelado la colocación.",dropComplete:"Colocación finalizada.",dropDescriptionKeyboard:"Pulse Intro para soltar. Pulse Escape para cancelar el arrastre.",dropDescriptionTouch:"Pulse dos veces para soltar.",dropDescriptionVirtual:"Haga clic para soltar.",dropIndicator:"indicador de colocación",dropOnItem:t=>`Soltar en ${t.itemText}`,dropOnRoot:"Soltar en",endDragKeyboard:"Arrastrando. Pulse Intro para cancelar el arrastre.",endDragTouch:"Arrastrando. Pulse dos veces para cancelar el arrastre.",endDragVirtual:"Arrastrando. Haga clic para cancelar el arrastre.",insertAfter:t=>`Insertar después de ${t.itemText}`,insertBefore:t=>`Insertar antes de ${t.itemText}`,insertBetween:t=>`Insertar entre ${t.beforeItemText} y ${t.afterItemText}`};var GA={};GA={dragDescriptionKeyboard:"Lohistamise alustamiseks vajutage klahvi Enter.",dragDescriptionKeyboardAlt:"Lohistamise alustamiseks vajutage klahvikombinatsiooni Alt + Enter.",dragDescriptionLongPress:"Vajutage pikalt lohistamise alustamiseks.",dragDescriptionTouch:"Topeltpuudutage lohistamise alustamiseks.",dragDescriptionVirtual:"Klõpsake lohistamise alustamiseks.",dragItem:t=>`Lohista ${t.itemText}`,dragSelectedItems:(t,e)=>`Lohista ${e.plural(t.count,{one:()=>`${e.number(t.count)} valitud üksust`,other:()=>`${e.number(t.count)} valitud üksust`})}`,dragSelectedKeyboard:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} valitud üksuse`,other:()=>`${e.number(t.count)} valitud üksuse`})} lohistamiseks vajutage sisestusklahvi Enter.`,dragSelectedKeyboardAlt:(t,e)=>`Lohistamiseks vajutage klahvikombinatsiooni Alt + Enter ${e.plural(t.count,{one:()=>`${e.number(t.count)} valitud üksuse`,other:()=>`${e.number(t.count)} valitud üksuse`})} jaoks.`,dragSelectedLongPress:(t,e)=>`Pikk vajutus ${e.plural(t.count,{one:()=>`${e.number(t.count)} valitud üksuse`,other:()=>`${e.number(t.count)} valitud üksuse`})} lohistamiseks.`,dragStartedKeyboard:"Alustati lohistamist. Kukutamise sihtmärgi juurde navigeerimiseks vajutage klahvi Tab, seejärel vajutage kukutamiseks klahvi Enter või loobumiseks klahvi Escape.",dragStartedTouch:"Alustati lohistamist. Navigeerige kukutamise sihtmärgi juurde ja topeltpuudutage kukutamiseks.",dragStartedVirtual:"Alustati lohistamist. Navigeerige kukutamise sihtmärgi juurde ja kukutamiseks klõpsake või vajutage klahvi Enter.",dropCanceled:"Lohistamisest loobuti.",dropComplete:"Lohistamine on tehtud.",dropDescriptionKeyboard:"Kukutamiseks vajutage klahvi Enter. Lohistamisest loobumiseks vajutage klahvi Escape.",dropDescriptionTouch:"Kukutamiseks topeltpuudutage.",dropDescriptionVirtual:"Kukutamiseks klõpsake.",dropIndicator:"lohistamise indikaator",dropOnItem:t=>`Kukuta asukohta ${t.itemText}`,dropOnRoot:"Kukuta asukohta",endDragKeyboard:"Lohistamine. Lohistamisest loobumiseks vajutage klahvi Enter.",endDragTouch:"Lohistamine. Lohistamisest loobumiseks topeltpuudutage.",endDragVirtual:"Lohistamine. Lohistamisest loobumiseks klõpsake.",insertAfter:t=>`Sisesta ${t.itemText} järele`,insertBefore:t=>`Sisesta ${t.itemText} ette`,insertBetween:t=>`Sisesta ${t.beforeItemText} ja ${t.afterItemText} vahele`};var WA={};WA={dragDescriptionKeyboard:"Aloita vetäminen painamalla Enter-näppäintä.",dragDescriptionKeyboardAlt:"Aloita vetäminen painamalla Alt + Enter -näppäinyhdistelmää.",dragDescriptionLongPress:"Aloita vetäminen pitämällä painettuna.",dragDescriptionTouch:"Aloita vetäminen kaksoisnapauttamalla.",dragDescriptionVirtual:"Aloita vetäminen napsauttamalla.",dragItem:t=>`Vedä kohdetta ${t.itemText}`,dragSelectedItems:(t,e)=>`Vedä ${e.plural(t.count,{one:()=>`${e.number(t.count)} valittua kohdetta`,other:()=>`${e.number(t.count)} valittua kohdetta`})}`,dragSelectedKeyboard:(t,e)=>`Vedä painamalla Enter ${e.plural(t.count,{one:()=>`${e.number(t.count)} valittu kohde`,other:()=>`${e.number(t.count)} valittua kohdetta`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Vedä painamalla Alt + Enter ${e.plural(t.count,{one:()=>`${e.number(t.count)} valittu kohde`,other:()=>`${e.number(t.count)} valittua kohdetta`})}.`,dragSelectedLongPress:(t,e)=>`Vedä pitämällä painettuna ${e.plural(t.count,{one:()=>`${e.number(t.count)} valittu kohde`,other:()=>`${e.number(t.count)} valittua kohdetta`})}.`,dragStartedKeyboard:"Vetäminen aloitettu. Siirry pudotuskohteeseen painamalla sarkainnäppäintä ja sitten pudota painamalla Enter-näppäintä tai peruuta painamalla Escape-näppäintä.",dragStartedTouch:"Vetäminen aloitettu. Siirry pudotuskohteeseen ja pudota kaksoisnapauttamalla.",dragStartedVirtual:"Vetäminen aloitettu. Siirry pudotuskohteeseen ja pudota napsauttamalla tai painamalla Enter-näppäintä.",dropCanceled:"Pudotus peruutettu.",dropComplete:"Pudotus suoritettu.",dropDescriptionKeyboard:"Pudota painamalla Enter-näppäintä. Peruuta vetäminen painamalla Escape-näppäintä.",dropDescriptionTouch:"Pudota kaksoisnapauttamalla.",dropDescriptionVirtual:"Pudota napsauttamalla.",dropIndicator:"pudotuksen ilmaisin",dropOnItem:t=>`Pudota kohteeseen ${t.itemText}`,dropOnRoot:"Pudota kohteeseen",endDragKeyboard:"Vedetään. Peruuta vetäminen painamalla Enter-näppäintä.",endDragTouch:"Vedetään. Peruuta vetäminen kaksoisnapauttamalla.",endDragVirtual:"Vedetään. Peruuta vetäminen napsauttamalla.",insertAfter:t=>`Lisää kohteen ${t.itemText} jälkeen`,insertBefore:t=>`Lisää ennen kohdetta ${t.itemText}`,insertBetween:t=>`Lisää kohteiden ${t.beforeItemText} ja ${t.afterItemText} väliin`};var QA={};QA={dragDescriptionKeyboard:"Appuyez sur Entrée pour commencer le déplacement.",dragDescriptionKeyboardAlt:"Appuyez sur Alt + Entrée pour commencer à faire glisser.",dragDescriptionLongPress:"Appuyez de manière prolongée pour commencer à faire glisser.",dragDescriptionTouch:"Touchez deux fois pour commencer le déplacement.",dragDescriptionVirtual:"Cliquez pour commencer le déplacement.",dragItem:t=>`Déplacer ${t.itemText}`,dragSelectedItems:(t,e)=>`Déplacer ${e.plural(t.count,{one:()=>`${e.number(t.count)} élément sélectionné`,other:()=>`${e.number(t.count)} éléments sélectionnés`})}`,dragSelectedKeyboard:(t,e)=>`Appuyez sur Entrée pour faire glisser ${e.plural(t.count,{one:()=>`${e.number(t.count)} élément sélectionné`,other:()=>`${e.number(t.count)} éléments sélectionnés`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Appuyez sur Alt + Entrée pour faire glisser ${e.plural(t.count,{one:()=>`${e.number(t.count)} élément sélectionné`,other:()=>`${e.number(t.count)} éléments sélectionnés`})}.`,dragSelectedLongPress:(t,e)=>`Appuyez de manière prolongée pour faire glisser ${e.plural(t.count,{one:()=>`${e.number(t.count)} élément sélectionné`,other:()=>`${e.number(t.count)} éléments sélectionnés`})}.`,dragStartedKeyboard:"Déplacement commencé. Appuyez sur Tabulation pour accéder à une cible de dépôt, puis appuyez sur Entrée pour déposer, ou appuyez sur Échap pour annuler.",dragStartedTouch:"Déplacement commencé. Accédez à une cible de dépôt, puis touchez deux fois pour déposer.",dragStartedVirtual:"Déplacement commencé. Accédez à une cible de dépôt, puis cliquez ou appuyez sur Entrée pour déposer.",dropCanceled:"Dépôt annulé.",dropComplete:"Dépôt terminé.",dropDescriptionKeyboard:"Appuyez sur Entrée pour déposer. Appuyez sur Échap pour annuler le déplacement.",dropDescriptionTouch:"Touchez deux fois pour déposer.",dropDescriptionVirtual:"Cliquez pour déposer.",dropIndicator:"indicateur de dépôt",dropOnItem:t=>`Déposer sur ${t.itemText}`,dropOnRoot:"Déposer sur",endDragKeyboard:"Déplacement. Appuyez sur Entrée pour annuler le déplacement.",endDragTouch:"Déplacement. Touchez deux fois pour annuler le déplacement.",endDragVirtual:"Déplacement. Cliquez pour annuler le déplacement.",insertAfter:t=>`Insérer après ${t.itemText}`,insertBefore:t=>`Insérer avant ${t.itemText}`,insertBetween:t=>`Insérer entre ${t.beforeItemText} et ${t.afterItemText}`};var YA={};YA={dragDescriptionKeyboard:"הקש על Enter כדי להתחיל לגרור.",dragDescriptionKeyboardAlt:"הקש Alt + Enter כדי להתחיל לגרור.",dragDescriptionLongPress:"לחץ לחיצה ארוכה כדי להתחיל לגרור.",dragDescriptionTouch:"הקש פעמיים כדי להתחיל בגרירה.",dragDescriptionVirtual:"לחץ כדי להתחיל לגרור.",dragItem:t=>`גרור את ${t.itemText}`,dragSelectedItems:(t,e)=>`גרור ${e.plural(t.count,{one:()=>`פריט נבחר ${e.number(t.count)}`,other:()=>`${e.number(t.count)} פריטים שנבחרו`})}`,dragSelectedKeyboard:(t,e)=>`הקש על Enter כדי לגרור ${e.plural(t.count,{one:()=>`${e.number(t.count)} פריט שנבחר`,other:()=>`${e.number(t.count)} פריטים שנבחרו`})}.`,dragSelectedKeyboardAlt:(t,e)=>`הקש Alt + Enter כדי לגרור ${e.plural(t.count,{one:()=>`${e.number(t.count)} פריט שנבחר`,other:()=>`${e.number(t.count)} פריטים שנבחרו`})}.`,dragSelectedLongPress:(t,e)=>`לחץ לחיצה ארוכה כדי לגרור ${e.plural(t.count,{one:()=>`${e.number(t.count)} פריט שנבחר`,other:()=>`${e.number(t.count)} פריטים שנבחרו`})}.`,dragStartedKeyboard:"התחלת לגרור. הקש על Tab כדי לנווט לנקודת הגרירה ולאחר מכן הקש על Enter כדי לשחרר או על Escape כדי לבטל.",dragStartedTouch:"התחלת לגרור. נווט לנקודת השחרור ולאחר מכן הקש פעמיים כדי לשחרר.",dragStartedVirtual:"התחלת לגרור. נווט לנקודת השחרור ולאחר מכן לחץ או הקש על Enter כדי לשחרר.",dropCanceled:"השחרור בוטל.",dropComplete:"השחרור הושלם.",dropDescriptionKeyboard:"הקש על Enter כדי לשחרר. הקש על Escape כדי לבטל את הגרירה.",dropDescriptionTouch:"הקש פעמיים כדי לשחרר.",dropDescriptionVirtual:"לחץ כדי לשחרר.",dropIndicator:"מחוון שחרור",dropOnItem:t=>`שחרר על ${t.itemText}`,dropOnRoot:"שחרר על",endDragKeyboard:"גורר. הקש על Enter כדי לבטל את הגרירה.",endDragTouch:"גורר. הקש פעמיים כדי לבטל את הגרירה.",endDragVirtual:"גורר. לחץ כדי לבטל את הגרירה.",insertAfter:t=>`הוסף אחרי ${t.itemText}`,insertBefore:t=>`הוסף לפני ${t.itemText}`,insertBetween:t=>`הוסף בין ${t.beforeItemText} לבין ${t.afterItemText}`};var XA={};XA={dragDescriptionKeyboard:"Pritisnite Enter da biste počeli povlačiti.",dragDescriptionKeyboardAlt:"Pritisnite Alt + Enter za početak povlačenja.",dragDescriptionLongPress:"Dugo pritisnite za početak povlačenja.",dragDescriptionTouch:"Dvaput dodirnite da biste počeli povlačiti.",dragDescriptionVirtual:"Kliknite da biste počeli povlačiti.",dragItem:t=>`Povucite stavku ${t.itemText}`,dragSelectedItems:(t,e)=>`Povucite ${e.plural(t.count,{one:()=>`${e.number(t.count)} odabranu stavku`,other:()=>`ovoliko odabranih stavki: ${e.number(t.count)}`})}`,dragSelectedKeyboard:(t,e)=>`Pritisnite Enter za povlačenje ${e.plural(t.count,{one:()=>`${e.number(t.count)} odabrana stavka`,other:()=>`${e.number(t.count)} odabrane stavke`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Pritisnite Alt + Enter za povlačenje ${e.plural(t.count,{one:()=>`${e.number(t.count)} odabrana stavka`,other:()=>`${e.number(t.count)} odabrane stavke`})}.`,dragSelectedLongPress:(t,e)=>`Dugo pritisnite za povlačenje ${e.plural(t.count,{one:()=>`${e.number(t.count)} odabrana stavka`,other:()=>`${e.number(t.count)} odabrane stavke`})}.`,dragStartedKeyboard:"Počeli ste povlačiti. Pritisnite tipku tabulatora da biste došli do cilja ispuštanja, a zatim Enter da biste ispustili stavku ili Escape da biste prekinuli povlačenje.",dragStartedTouch:"Počeli ste povlačiti. Dođite do cilja ispuštanja, a zatim dvaput dodirnite da biste ispustili stavku.",dragStartedVirtual:"Počeli ste povlačiti. Dođite do cilja ispuštanja, a zatim kliknite ili pritisnite Enter da biste ispustili stavku.",dropCanceled:"Povlačenje je prekinuto.",dropComplete:"Ispuštanje je dovršeno.",dropDescriptionKeyboard:"Pritisnite Enter da biste ispustili stavku. Pritisnite Escape da biste prekinuli povlačenje.",dropDescriptionTouch:"Dvaput dodirnite da biste ispustili stavku.",dropDescriptionVirtual:"Kliknite da biste ispustili stavku.",dropIndicator:"pokazatelj ispuštanja",dropOnItem:t=>`Ispustite na stavku ${t.itemText}`,dropOnRoot:"Ispustite na",endDragKeyboard:"Povlačenje. Pritisnite Enter da biste prekinuli povlačenje.",endDragTouch:"Povlačenje. Dvaput dodirnite da biste prekinuli povlačenje.",endDragVirtual:"Povlačenje. Kliknite da biste prekinuli povlačenje.",insertAfter:t=>`Umetnite iza stavke ${t.itemText}`,insertBefore:t=>`Ispustite ispred stavke ${t.itemText}`,insertBetween:t=>`Umetnite između stavki ${t.beforeItemText} i ${t.afterItemText}`};var JA={};JA={dragDescriptionKeyboard:"Nyomja le az Enter billentyűt a húzás megkezdéséhez.",dragDescriptionKeyboardAlt:"Nyomja le az Alt + Enter billentyűket a húzás megkezdéséhez.",dragDescriptionLongPress:"Hosszan nyomja meg a húzás elindításához.",dragDescriptionTouch:"Koppintson duplán a húzás megkezdéséhez.",dragDescriptionVirtual:"Kattintson a húzás megkezdéséhez.",dragItem:t=>`${t.itemText} húzása`,dragSelectedItems:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} kijelölt elem`,other:()=>`${e.number(t.count)} kijelölt elem`})} húzása`,dragSelectedKeyboard:(t,e)=>`Nyomja meg az Entert ${e.plural(t.count,{one:()=>`${e.number(t.count)} kijelölt elem`,other:()=>`${e.number(t.count)} kijelölt elem`})} húzásához.`,dragSelectedKeyboardAlt:(t,e)=>`Nyomja meg az Alt + Enter billentyűket ${e.plural(t.count,{one:()=>`${e.number(t.count)} kijelölt elem`,other:()=>`${e.number(t.count)} kijelölt elem`})} húzásához.`,dragSelectedLongPress:(t,e)=>`Tartsa lenyomva hosszan ${e.plural(t.count,{one:()=>`${e.number(t.count)} kijelölt elem`,other:()=>`${e.number(t.count)} kijelölt elem`})} húzásához.`,dragStartedKeyboard:"Húzás megkezdve. Nyomja le a Tab billentyűt az elengedési célhoz navigálásához, majd nyomja le az Enter billentyűt az elengedéshez, vagy nyomja le az Escape billentyűt a megszakításhoz.",dragStartedTouch:"Húzás megkezdve. Navigáljon egy elengedési célhoz, majd koppintson duplán az elengedéshez.",dragStartedVirtual:"Húzás megkezdve. Navigáljon egy elengedési célhoz, majd kattintson vagy nyomja le az Enter billentyűt az elengedéshez.",dropCanceled:"Elengedés megszakítva.",dropComplete:"Elengedés teljesítve.",dropDescriptionKeyboard:"Nyomja le az Enter billentyűt az elengedéshez. Nyomja le az Escape billentyűt a húzás megszakításához.",dropDescriptionTouch:"Koppintson duplán az elengedéshez.",dropDescriptionVirtual:"Kattintson az elengedéshez.",dropIndicator:"elengedésjelző",dropOnItem:t=>`Elengedés erre: ${t.itemText}`,dropOnRoot:"Elengedés erre:",endDragKeyboard:"Húzás folyamatban. Nyomja le az Enter billentyűt a húzás megszakításához.",endDragTouch:"Húzás folyamatban. Koppintson duplán a húzás megszakításához.",endDragVirtual:"Húzás folyamatban. Kattintson a húzás megszakításához.",insertAfter:t=>`Beszúrás ${t.itemText} után`,insertBefore:t=>`Beszúrás ${t.itemText} elé`,insertBetween:t=>`Beszúrás ${t.beforeItemText} és ${t.afterItemText} közé`};var ZA={};ZA={dragDescriptionKeyboard:"Premi Invio per iniziare a trascinare.",dragDescriptionKeyboardAlt:"Premi Alt + Invio per iniziare a trascinare.",dragDescriptionLongPress:"Premi a lungo per iniziare a trascinare.",dragDescriptionTouch:"Tocca due volte per iniziare a trascinare.",dragDescriptionVirtual:"Fai clic per iniziare a trascinare.",dragItem:t=>`Trascina ${t.itemText}`,dragSelectedItems:(t,e)=>`Trascina ${e.plural(t.count,{one:()=>`${e.number(t.count)} altro elemento selezionato`,other:()=>`${e.number(t.count)} altri elementi selezionati`})}`,dragSelectedKeyboard:(t,e)=>`Premi Invio per trascinare ${e.plural(t.count,{one:()=>`${e.number(t.count)} elemento selezionato`,other:()=>`${e.number(t.count)} elementi selezionati`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Premi Alt + Invio per trascinare ${e.plural(t.count,{one:()=>`${e.number(t.count)} elemento selezionato`,other:()=>`${e.number(t.count)} elementi selezionati`})}.`,dragSelectedLongPress:(t,e)=>`Premi a lungo per trascinare ${e.plural(t.count,{one:()=>`${e.number(t.count)} elemento selezionato`,other:()=>`${e.number(t.count)} elementi selezionati`})}.`,dragStartedKeyboard:"Hai iniziato a trascinare. Premi Tab per arrivare sull’area di destinazione, quindi premi Invio per rilasciare o Esc per annullare.",dragStartedTouch:"Hai iniziato a trascinare. Arriva sull’area di destinazione, quindi tocca due volte per rilasciare.",dragStartedVirtual:"Hai iniziato a trascinare. Arriva sull’area di destinazione, quindi fai clic o premi Invio per rilasciare.",dropCanceled:"Rilascio annullato.",dropComplete:"Rilascio completato.",dropDescriptionKeyboard:"Premi Invio per rilasciare. Premi Esc per annullare.",dropDescriptionTouch:"Tocca due volte per rilasciare.",dropDescriptionVirtual:"Fai clic per rilasciare.",dropIndicator:"indicatore di rilascio",dropOnItem:t=>`Rilascia su ${t.itemText}`,dropOnRoot:"Rilascia su",endDragKeyboard:"Trascinamento. Premi Invio per annullare.",endDragTouch:"Trascinamento. Tocca due volte per annullare.",endDragVirtual:"Trascinamento. Fai clic per annullare.",insertAfter:t=>`Inserisci dopo ${t.itemText}`,insertBefore:t=>`Inserisci prima di ${t.itemText}`,insertBetween:t=>`Inserisci tra ${t.beforeItemText} e ${t.afterItemText}`};var eB={};eB={dragDescriptionKeyboard:"Enter キーを押してドラッグを開始してください。",dragDescriptionKeyboardAlt:"Alt+Enter キーを押してドラッグを開始します。",dragDescriptionLongPress:"長押ししてドラッグを開始します。",dragDescriptionTouch:"ダブルタップしてドラッグを開始します。",dragDescriptionVirtual:"クリックしてドラッグを開始します。",dragItem:t=>`${t.itemText} をドラッグ`,dragSelectedItems:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} 個の選択項目`,other:()=>`${e.number(t.count)} 個の選択項目`})} をドラッグ`,dragSelectedKeyboard:(t,e)=>`Enter キーを押して、${e.plural(t.count,{one:()=>`${e.number(t.count)} 選択した項目`,other:()=>`${e.number(t.count)} 選択した項目`})}をドラッグします。`,dragSelectedKeyboardAlt:(t,e)=>`Alt+Enter キーを押して、${e.plural(t.count,{one:()=>`${e.number(t.count)} 選択した項目`,other:()=>`${e.number(t.count)} 選択した項目`})}をドラッグします。`,dragSelectedLongPress:(t,e)=>`長押しして、${e.plural(t.count,{one:()=>`${e.number(t.count)} 選択した項目`,other:()=>`${e.number(t.count)} 選択した項目`})}をドラッグします。`,dragStartedKeyboard:"ドラッグを開始します。Tab キーを押してドロップターゲットにいどうし、Enter キーを押してドロップするか、Esc キーを押してキャンセルします。",dragStartedTouch:"ドラッグを開始しました。ドロップのターゲットに移動し、ダブルタップしてドロップします。",dragStartedVirtual:"ドラッグを開始しました。ドロップのターゲットに移動し、クリックまたは Enter キーを押してドロップします。",dropCanceled:"ドロップがキャンセルされました。",dropComplete:"ドロップが完了しました。",dropDescriptionKeyboard:"Enter キーを押してドロップします。Esc キーを押してドラッグをキャンセルします。",dropDescriptionTouch:"ダブルタップしてドロップします。",dropDescriptionVirtual:"クリックしてドロップします。",dropIndicator:"ドロップインジケーター",dropOnItem:t=>`${t.itemText} にドロップ`,dropOnRoot:"ドロップ場所",endDragKeyboard:"ドラッグしています。Enter キーを押してドラッグをキャンセルします。",endDragTouch:"ドラッグしています。ダブルタップしてドラッグをキャンセルします。",endDragVirtual:"ドラッグしています。クリックしてドラッグをキャンセルします。",insertAfter:t=>`${t.itemText} の後に挿入`,insertBefore:t=>`${t.itemText} の前に挿入`,insertBetween:t=>`${t.beforeItemText} と ${t.afterItemText} の間に挿入`};var tB={};tB={dragDescriptionKeyboard:"드래그를 시작하려면 Enter를 누르세요.",dragDescriptionKeyboardAlt:"드래그를 시작하려면 Alt + Enter를 누르십시오.",dragDescriptionLongPress:"드래그를 시작하려면 길게 누르십시오.",dragDescriptionTouch:"드래그를 시작하려면 더블 탭하세요.",dragDescriptionVirtual:"드래그를 시작하려면 클릭하세요.",dragItem:t=>`${t.itemText} 드래그`,dragSelectedItems:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)}개 선택 항목`,other:()=>`${e.number(t.count)}개 선택 항목`})} 드래그`,dragSelectedKeyboard:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)}개 선택 항목`,other:()=>`${e.number(t.count)}개 선택 항목`})}을 드래그하려면 Enter를 누르십시오.`,dragSelectedKeyboardAlt:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)}개 선택 항목`,other:()=>`${e.number(t.count)}개 선택 항목`})}을 드래그하려면 Alt + Enter를 누르십시오.`,dragSelectedLongPress:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)}개 선택 항목`,other:()=>`${e.number(t.count)}개 선택 항목`})}을 드래그하려면 길게 누르십시오.`,dragStartedKeyboard:"드래그가 시작되었습니다. Tab을 눌러 드롭 대상으로 이동한 다음 Enter를 눌러 드롭하거나 Esc를 눌러 취소하세요.",dragStartedTouch:"드래그가 시작되었습니다. 드롭 대상으로 이동한 다음 더블 탭하여 드롭하세요.",dragStartedVirtual:"드래그가 시작되었습니다. 드롭 대상으로 이동한 다음 클릭하거나 Enter를 눌러 드롭하세요.",dropCanceled:"드롭이 취소되었습니다.",dropComplete:"드롭이 완료되었습니다.",dropDescriptionKeyboard:"드롭하려면 Enter를 누르세요. 드래그를 취소하려면 Esc를 누르세요.",dropDescriptionTouch:"더블 탭하여 드롭하세요.",dropDescriptionVirtual:"드롭하려면 클릭하세요.",dropIndicator:"드롭 표시기",dropOnItem:t=>`${t.itemText}에 드롭`,dropOnRoot:"드롭 대상",endDragKeyboard:"드래그 중입니다. 드래그를 취소하려면 Enter를 누르세요.",endDragTouch:"드래그 중입니다. 드래그를 취소하려면 더블 탭하세요.",endDragVirtual:"드래그 중입니다. 드래그를 취소하려면 클릭하세요.",insertAfter:t=>`${t.itemText} 이후에 삽입`,insertBefore:t=>`${t.itemText} 이전에 삽입`,insertBetween:t=>`${t.beforeItemText} 및 ${t.afterItemText} 사이에 삽입`};var nB={};nB={dragDescriptionKeyboard:"Paspauskite „Enter“, kad pradėtumėte vilkti.",dragDescriptionKeyboardAlt:"Paspauskite „Alt + Enter“, kad pradėtumėte vilkti.",dragDescriptionLongPress:"Palaikykite nuspaudę, kad pradėtumėte vilkti.",dragDescriptionTouch:"Palieskite dukart, kad pradėtumėte vilkti.",dragDescriptionVirtual:"Spustelėkite, kad pradėtumėte vilkti.",dragItem:t=>`Vilkti ${t.itemText}`,dragSelectedItems:(t,e)=>`Vilkti ${e.plural(t.count,{one:()=>`${e.number(t.count)} pasirinktą elementą`,other:()=>`${e.number(t.count)} pasirinktus elementus`})}`,dragSelectedKeyboard:(t,e)=>`Paspauskite „Enter“, jei norite nuvilkti ${e.plural(t.count,{one:()=>`${e.number(t.count)} pasirinktą elementą`,other:()=>`${e.number(t.count)} pasirinktus elementus`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Paspauskite „Alt + Enter“, kad nuvilktumėte ${e.plural(t.count,{one:()=>`${e.number(t.count)} pasirinktą elementą`,other:()=>`${e.number(t.count)} pasirinktus elementus`})}.`,dragSelectedLongPress:(t,e)=>`Nuspaudę palaikykite, kad nuvilktumėte ${e.plural(t.count,{one:()=>`${e.number(t.count)} pasirinktą elementą`,other:()=>`${e.number(t.count)} pasirinktus elementus`})}.`,dragStartedKeyboard:"Pradėta vilkti. Paspauskite „Tab“, kad pereitumėte į tiesioginę paskirties vietą, tada paspauskite „Enter“, kad numestumėte, arba „Escape“, kad atšauktumėte.",dragStartedTouch:"Pradėta vilkti. Eikite į tiesioginę paskirties vietą, tada palieskite dukart, kad numestumėte.",dragStartedVirtual:"Pradėta vilkti. Eikite į tiesioginę paskirties vietą ir spustelėkite arba paspauskite „Enter“, kad numestumėte.",dropCanceled:"Numetimas atšauktas.",dropComplete:"Numesta.",dropDescriptionKeyboard:"Paspauskite „Enter“, kad numestumėte. Paspauskite „Escape“, kad atšauktumėte vilkimą.",dropDescriptionTouch:"Palieskite dukart, kad numestumėte.",dropDescriptionVirtual:"Spustelėkite, kad numestumėte.",dropIndicator:"numetimo indikatorius",dropOnItem:t=>`Numesti ant ${t.itemText}`,dropOnRoot:"Numesti ant",endDragKeyboard:"Velkama. Paspauskite „Enter“, kad atšauktumėte vilkimą.",endDragTouch:"Velkama. Spustelėkite dukart, kad atšauktumėte vilkimą.",endDragVirtual:"Velkama. Spustelėkite, kad atšauktumėte vilkimą.",insertAfter:t=>`Įterpti po ${t.itemText}`,insertBefore:t=>`Įterpti prieš ${t.itemText}`,insertBetween:t=>`Įterpti tarp ${t.beforeItemText} ir ${t.afterItemText}`};var rB={};rB={dragDescriptionKeyboard:"Nospiediet Enter, lai sāktu vilkšanu.",dragDescriptionKeyboardAlt:"Nospiediet taustiņu kombināciju Alt+Enter, lai sāktu vilkšanu.",dragDescriptionLongPress:"Turiet nospiestu, lai sāktu vilkšanu.",dragDescriptionTouch:"Veiciet dubultskārienu, lai sāktu vilkšanu.",dragDescriptionVirtual:"Noklikšķiniet, lai sāktu vilkšanu.",dragItem:t=>`Velciet ${t.itemText}`,dragSelectedItems:(t,e)=>`Velciet ${e.plural(t.count,{one:()=>`${e.number(t.count)} atlasīto vienumu`,other:()=>`${e.number(t.count)} atlasītos vienumus`})}`,dragSelectedKeyboard:(t,e)=>`Nospiediet taustiņu Enter, lai vilktu ${e.plural(t.count,{one:()=>`${e.number(t.count)} atlasīto vienumu`,other:()=>`${e.number(t.count)} atlasītos vienumus`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Nospiediet taustiņu kombināciju Alt+Enter, lai vilktu ${e.plural(t.count,{one:()=>`${e.number(t.count)} atlasīto vienumu`,other:()=>`${e.number(t.count)} atlasītos vienumus`})}.`,dragSelectedLongPress:(t,e)=>`Turiet nospiestu, lai vilktu ${e.plural(t.count,{one:()=>`${e.number(t.count)} atlasīto vienumu`,other:()=>`${e.number(t.count)} atlasītos vienumus`})}.`,dragStartedKeyboard:"Uzsākta vilkšana. Nospiediet taustiņu Tab, lai pārietu uz nomešanas mērķi, pēc tam nospiediet Enter, lai nomestu, vai nospiediet Escape, lai atceltu.",dragStartedTouch:"Uzsākta vilkšana. Pārejiet uz nomešanas mērķi, pēc tam veiciet dubultskārienu, lai nomestu.",dragStartedVirtual:"Uzsākta vilkšana. Pārejiet uz nomešanas mērķi, pēc tam nospiediet Enter, lai nomestu.",dropCanceled:"Nomešana atcelta.",dropComplete:"Nomešana pabeigta.",dropDescriptionKeyboard:"Nospiediet Enter, lai nomestu. Nospiediet Escape, lai atceltu vilkšanu.",dropDescriptionTouch:"Veiciet dubultskārienu, lai nomestu.",dropDescriptionVirtual:"Noklikšķiniet, lai nomestu.",dropIndicator:"nomešanas indikators",dropOnItem:t=>`Nometiet uz ${t.itemText}`,dropOnRoot:"Nometiet uz",endDragKeyboard:"Notiek vilkšana. Nospiediet Enter, lai atceltu vilkšanu.",endDragTouch:"Notiek vilkšana. Veiciet dubultskārienu, lai atceltu vilkšanu.",endDragVirtual:"Notiek vilkšana. Noklikšķiniet, lai atceltu vilkšanu.",insertAfter:t=>`Ievietojiet pēc ${t.itemText}`,insertBefore:t=>`Ievietojiet pirms ${t.itemText}`,insertBetween:t=>`Ievietojiet starp ${t.beforeItemText} un ${t.afterItemText}`};var iB={};iB={dragDescriptionKeyboard:"Trykk på Enter for å begynne å dra.",dragDescriptionKeyboardAlt:"Trykk på Alt + Enter for å begynne å dra.",dragDescriptionLongPress:"Trykk lenge for å begynne å dra.",dragDescriptionTouch:"Dobbelttrykk for å begynne å dra.",dragDescriptionVirtual:"Klikk for å begynne å dra.",dragItem:t=>`Dra ${t.itemText}`,dragSelectedItems:(t,e)=>`Dra ${e.plural(t.count,{one:()=>`${e.number(t.count)} merket element`,other:()=>`${e.number(t.count)} merkede elementer`})}`,dragSelectedKeyboard:(t,e)=>`Trykk Enter for å dra ${e.plural(t.count,{one:()=>`${e.number(t.count)} valgt element`,other:()=>`${e.number(t.count)} valgte elementer`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Trykk på Alt + Enter for å dra ${e.plural(t.count,{one:()=>`${e.number(t.count)} valgt element`,other:()=>`${e.number(t.count)} valgte elementer`})}.`,dragSelectedLongPress:(t,e)=>`Trykk lenge for å dra ${e.plural(t.count,{one:()=>`${e.number(t.count)} valgt element`,other:()=>`${e.number(t.count)} valgte elementer`})}.`,dragStartedKeyboard:"Begynte å dra. Trykk på Tab for å navigere til et mål, og trykk deretter på Enter for å slippe eller på Esc for å avbryte.",dragStartedTouch:"Begynte å dra. Naviger til et mål, og dobbelttrykk for å slippe.",dragStartedVirtual:"Begynte å dra. Naviger til et mål, og klikk eller trykk på Enter for å slippe.",dropCanceled:"Avbrøt slipping.",dropComplete:"Slippingen er fullført.",dropDescriptionKeyboard:"Trykk på Enter for å slippe. Trykk på Esc hvis du vil avbryte draingen.",dropDescriptionTouch:"Dobbelttrykk for å slippe.",dropDescriptionVirtual:"Klikk for å slippe.",dropIndicator:"slippeindikator",dropOnItem:t=>`Slipp på ${t.itemText}`,dropOnRoot:"Slipp på",endDragKeyboard:"Drar. Trykk på Enter hvis du vil avbryte.",endDragTouch:"Drar. Dobbelttrykk hvis du vil avbryte.",endDragVirtual:"Drar. Klikk hvis du vil avbryte.",insertAfter:t=>`Sett inn etter ${t.itemText}`,insertBefore:t=>`Sett inn før ${t.itemText}`,insertBetween:t=>`Sett inn mellom ${t.beforeItemText} og ${t.afterItemText}`};var sB={};sB={dragDescriptionKeyboard:"Druk op Enter om te slepen.",dragDescriptionKeyboardAlt:"Druk op Alt + Enter om te slepen.",dragDescriptionLongPress:"Houd lang ingedrukt om te slepen.",dragDescriptionTouch:"Dubbeltik om te slepen.",dragDescriptionVirtual:"Klik om met slepen te starten.",dragItem:t=>`${t.itemText} slepen`,dragSelectedItems:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} geselecteerd item`,other:()=>`${e.number(t.count)} geselecteerde items`})} slepen`,dragSelectedKeyboard:(t,e)=>`Druk op Enter om ${e.plural(t.count,{one:()=>`${e.number(t.count)} geselecteerd item`,other:()=>`${e.number(t.count)} geselecteerde items`})} te slepen.`,dragSelectedKeyboardAlt:(t,e)=>`Druk op Alt + Enter om ${e.plural(t.count,{one:()=>`${e.number(t.count)} geselecteerd item`,other:()=>`${e.number(t.count)} geselecteerde items`})} te slepen.`,dragSelectedLongPress:(t,e)=>`Houd lang ingedrukt om ${e.plural(t.count,{one:()=>`${e.number(t.count)} geselecteerd item`,other:()=>`${e.number(t.count)} geselecteerde items`})} te slepen.`,dragStartedKeyboard:"Begonnen met slepen. Druk op Tab om naar een locatie te gaan. Druk dan op Enter om neer te zetten, of op Esc om te annuleren.",dragStartedTouch:"Begonnen met slepen. Ga naar de gewenste locatie en dubbeltik om neer te zetten.",dragStartedVirtual:"Begonnen met slepen. Ga naar de gewenste locatie en klik of druk op Enter om neer te zetten.",dropCanceled:"Neerzetten geannuleerd.",dropComplete:"Neerzetten voltooid.",dropDescriptionKeyboard:"Druk op Enter om neer te zetten. Druk op Esc om het slepen te annuleren.",dropDescriptionTouch:"Dubbeltik om neer te zetten.",dropDescriptionVirtual:"Klik om neer te zetten.",dropIndicator:"aanwijzer voor neerzetten",dropOnItem:t=>`Neerzetten op ${t.itemText}`,dropOnRoot:"Neerzetten op",endDragKeyboard:"Bezig met slepen. Druk op Enter om te annuleren.",endDragTouch:"Bezig met slepen. Dubbeltik om te annuleren.",endDragVirtual:"Bezig met slepen. Klik om te annuleren.",insertAfter:t=>`Plaatsen na ${t.itemText}`,insertBefore:t=>`Plaatsen vóór ${t.itemText}`,insertBetween:t=>`Plaatsen tussen ${t.beforeItemText} en ${t.afterItemText}`};var oB={};oB={dragDescriptionKeyboard:"Naciśnij Enter, aby rozpocząć przeciąganie.",dragDescriptionKeyboardAlt:"Naciśnij Alt + Enter, aby rozpocząć przeciąganie.",dragDescriptionLongPress:"Naciśnij i przytrzymaj, aby rozpocząć przeciąganie.",dragDescriptionTouch:"Dotknij dwukrotnie, aby rozpocząć przeciąganie.",dragDescriptionVirtual:"Kliknij, aby rozpocząć przeciąganie.",dragItem:t=>`Przeciągnij ${t.itemText}`,dragSelectedItems:(t,e)=>`Przeciągnij ${e.plural(t.count,{one:()=>`${e.number(t.count)} wybrany element`,other:()=>`${e.number(t.count)} wybranych elementów`})}`,dragSelectedKeyboard:(t,e)=>`Naciśnij Enter, aby przeciągnąć ${e.plural(t.count,{one:()=>`${e.number(t.count)} wybrany element`,other:()=>`${e.number(t.count)} wybrane(-ych) elementy(-ów)`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Naciśnij Alt + Enter, aby przeciągnąć ${e.plural(t.count,{one:()=>`${e.number(t.count)} wybrany element`,other:()=>`${e.number(t.count)} wybrane(-ych) elementy(-ów)`})}.`,dragSelectedLongPress:(t,e)=>`Naciśnij i przytrzymaj, aby przeciągnąć ${e.plural(t.count,{one:()=>`${e.number(t.count)} wybrany element`,other:()=>`${e.number(t.count)} wybrane(-ych) elementy(-ów)`})}.`,dragStartedKeyboard:"Rozpoczęto przeciąganie. Naciśnij Tab, aby wybrać miejsce docelowe, a następnie naciśnij Enter, aby upuścić, lub Escape, aby anulować.",dragStartedTouch:"Rozpoczęto przeciąganie. Wybierz miejsce, w którym chcesz upuścić element, a następnie dotknij dwukrotnie, aby upuścić.F",dragStartedVirtual:"Rozpoczęto przeciąganie. Wybierz miejsce, w którym chcesz upuścić element, a następnie kliknij lub naciśnij Enter, aby upuścić.",dropCanceled:"Anulowano upuszczenie.",dropComplete:"Zakończono upuszczanie.",dropDescriptionKeyboard:"Naciśnij Enter, aby upuścić. Naciśnij Escape, aby anulować przeciągnięcie.",dropDescriptionTouch:"Dotknij dwukrotnie, aby upuścić.",dropDescriptionVirtual:"Kliknij, aby upuścić.",dropIndicator:"wskaźnik upuszczenia",dropOnItem:t=>`Upuść na ${t.itemText}`,dropOnRoot:"Upuść",endDragKeyboard:"Przeciąganie. Naciśnij Enter, aby anulować przeciągnięcie.",endDragTouch:"Przeciąganie. Kliknij dwukrotnie, aby anulować przeciągnięcie.",endDragVirtual:"Przeciąganie. Kliknij, aby anulować przeciąganie.",insertAfter:t=>`Umieść za ${t.itemText}`,insertBefore:t=>`Umieść przed ${t.itemText}`,insertBetween:t=>`Umieść między ${t.beforeItemText} i ${t.afterItemText}`};var aB={};aB={dragDescriptionKeyboard:"Pressione Enter para começar a arrastar.",dragDescriptionKeyboardAlt:"Pressione Alt + Enter para começar a arrastar.",dragDescriptionLongPress:"Pressione e segure para começar a arrastar.",dragDescriptionTouch:"Toque duas vezes para começar a arrastar.",dragDescriptionVirtual:"Clique para começar a arrastar.",dragItem:t=>`Arrastar ${t.itemText}`,dragSelectedItems:(t,e)=>`Arrastar ${e.plural(t.count,{one:()=>`${e.number(t.count)} item selecionado`,other:()=>`${e.number(t.count)} itens selecionados`})}`,dragSelectedKeyboard:(t,e)=>`Pressione Enter para arrastar ${e.plural(t.count,{one:()=>`${e.number(t.count)} o item selecionado`,other:()=>`${e.number(t.count)} os itens selecionados`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Pressione Alt + Enter para arrastar ${e.plural(t.count,{one:()=>`${e.number(t.count)} o item selecionado`,other:()=>`${e.number(t.count)} os itens selecionados`})}.`,dragSelectedLongPress:(t,e)=>`Pressione e segure para arrastar ${e.plural(t.count,{one:()=>`${e.number(t.count)} o item selecionado`,other:()=>`${e.number(t.count)} os itens selecionados`})}.`,dragStartedKeyboard:"Comece a arrastar. Pressione Tab para navegar até um alvo e, em seguida, pressione Enter para soltar ou pressione Escape para cancelar.",dragStartedTouch:"Comece a arrastar. Navegue até um alvo e toque duas vezes para soltar.",dragStartedVirtual:"Comece a arrastar. Navegue até um alvo e clique ou pressione Enter para soltar.",dropCanceled:"Liberação cancelada.",dropComplete:"Liberação concluída.",dropDescriptionKeyboard:"Pressione Enter para soltar. Pressione Escape para cancelar.",dropDescriptionTouch:"Toque duas vezes para soltar.",dropDescriptionVirtual:"Clique para soltar.",dropIndicator:"indicador de liberação",dropOnItem:t=>`Soltar em ${t.itemText}`,dropOnRoot:"Soltar",endDragKeyboard:"Arrastando. Pressione Enter para cancelar.",endDragTouch:"Arrastando. Toque duas vezes para cancelar.",endDragVirtual:"Arrastando. Clique para cancelar.",insertAfter:t=>`Inserir após ${t.itemText}`,insertBefore:t=>`Inserir antes de ${t.itemText}`,insertBetween:t=>`Inserir entre ${t.beforeItemText} e ${t.afterItemText}`};var lB={};lB={dragDescriptionKeyboard:"Prima Enter para iniciar o arrasto.",dragDescriptionKeyboardAlt:"Prima Alt + Enter para iniciar o arrasto.",dragDescriptionLongPress:"Prima longamente para começar a arrastar.",dragDescriptionTouch:"Faça duplo toque para começar a arrastar.",dragDescriptionVirtual:"Clique para iniciar o arrasto.",dragItem:t=>`Arrastar ${t.itemText}`,dragSelectedItems:(t,e)=>`Arrastar ${e.plural(t.count,{one:()=>`${e.number(t.count)} item selecionado`,other:()=>`${e.number(t.count)} itens selecionados`})}`,dragSelectedKeyboard:(t,e)=>`Prima Enter para arrastar ${e.plural(t.count,{one:()=>`${e.number(t.count)} o item selecionado`,other:()=>`${e.number(t.count)} os itens selecionados`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Prima Alt + Enter para arrastar ${e.plural(t.count,{one:()=>`${e.number(t.count)} o item selecionado`,other:()=>`${e.number(t.count)} os itens selecionados`})}.`,dragSelectedLongPress:(t,e)=>`Prima longamente para arrastar ${e.plural(t.count,{one:()=>`${e.number(t.count)} o item selecionado`,other:()=>`${e.number(t.count)} os itens selecionados`})}.`,dragStartedKeyboard:"Arrasto iniciado. Prima a tecla de tabulação para navegar para um destino para largar, e em seguida prima Enter para largar ou prima Escape para cancelar.",dragStartedTouch:"Arrasto iniciado. Navegue para um destino para largar, e em seguida faça duplo toque para largar.",dragStartedVirtual:"Arrasto iniciado. Navegue para um destino para largar, e em seguida clique ou prima Enter para largar.",dropCanceled:"Largar cancelado.",dropComplete:"Largar completo.",dropDescriptionKeyboard:"Prima Enter para largar. Prima Escape para cancelar o arrasto.",dropDescriptionTouch:"Faça duplo toque para largar.",dropDescriptionVirtual:"Clique para largar.",dropIndicator:"Indicador de largar",dropOnItem:t=>`Largar em ${t.itemText}`,dropOnRoot:"Largar em",endDragKeyboard:"A arrastar. Prima Enter para cancelar o arrasto.",endDragTouch:"A arrastar. Faça duplo toque para cancelar o arrasto.",endDragVirtual:"A arrastar. Clique para cancelar o arrasto.",insertAfter:t=>`Inserir depois de ${t.itemText}`,insertBefore:t=>`Inserir antes de ${t.itemText}`,insertBetween:t=>`Inserir entre ${t.beforeItemText} e ${t.afterItemText}`};var uB={};uB={dragDescriptionKeyboard:"Apăsați pe Enter pentru a începe glisarea.",dragDescriptionKeyboardAlt:"Apăsați pe Alt + Enter pentru a începe glisarea.",dragDescriptionLongPress:"Apăsați lung pentru a începe glisarea.",dragDescriptionTouch:"Atingeți de două ori pentru a începe să glisați.",dragDescriptionVirtual:"Faceți clic pentru a începe glisarea.",dragItem:t=>`Glisați ${t.itemText}`,dragSelectedItems:(t,e)=>`Glisați ${e.plural(t.count,{one:()=>`${e.number(t.count)} element selectat`,other:()=>`${e.number(t.count)} elemente selectate`})}`,dragSelectedKeyboard:(t,e)=>`Apăsați pe Enter pentru a glisa ${e.plural(t.count,{one:()=>`${e.number(t.count)} element selectat`,other:()=>`${e.number(t.count)} elemente selectate`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Apăsați pe Alt + Enter pentru a glisa ${e.plural(t.count,{one:()=>`${e.number(t.count)} element selectat`,other:()=>`${e.number(t.count)} elemente selectate`})}.`,dragSelectedLongPress:(t,e)=>`Apăsați lung pentru a glisa ${e.plural(t.count,{one:()=>`${e.number(t.count)} element selectat`,other:()=>`${e.number(t.count)} elemente selectate`})}.`,dragStartedKeyboard:"A început glisarea. Apăsați pe Tab pentru a naviga la o țintă de fixare, apoi apăsați pe Enter pentru a fixa sau apăsați pe Escape pentru a anula glisarea.",dragStartedTouch:"A început glisarea. Navigați la o țintă de fixare, apoi atingeți de două ori pentru a fixa.",dragStartedVirtual:"A început glisarea. Navigați la o țintă de fixare, apoi faceți clic sau apăsați pe Enter pentru a fixa.",dropCanceled:"Fixare anulată.",dropComplete:"Fixare finalizată.",dropDescriptionKeyboard:"Apăsați pe Enter pentru a fixa. Apăsați pe Escape pentru a anula glisarea.",dropDescriptionTouch:"Atingeți de două ori pentru a fixa.",dropDescriptionVirtual:"Faceți clic pentru a fixa.",dropIndicator:"indicator de fixare",dropOnItem:t=>`Fixați pe ${t.itemText}`,dropOnRoot:"Fixare pe",endDragKeyboard:"Se glisează. Apăsați pe Enter pentru a anula glisarea.",endDragTouch:"Se glisează. Atingeți de două ori pentru a anula glisarea.",endDragVirtual:"Se glisează. Faceți clic pentru a anula glisarea.",insertAfter:t=>`Inserați după ${t.itemText}`,insertBefore:t=>`Inserați înainte de ${t.itemText}`,insertBetween:t=>`Inserați între ${t.beforeItemText} și ${t.afterItemText}`};var cB={};cB={dragDescriptionKeyboard:"Нажмите клавишу Enter для начала перетаскивания.",dragDescriptionKeyboardAlt:"Нажмите Alt + Enter, чтобы начать перетаскивать.",dragDescriptionLongPress:"Нажмите и удерживайте, чтобы начать перетаскивать.",dragDescriptionTouch:"Дважды нажмите для начала перетаскивания.",dragDescriptionVirtual:"Щелкните для начала перетаскивания.",dragItem:t=>`Перетащить ${t.itemText}`,dragSelectedItems:(t,e)=>`Перетащить ${e.plural(t.count,{one:()=>`${e.number(t.count)} выбранный элемент`,other:()=>`${e.number(t.count)} выбранных элем`})}`,dragSelectedKeyboard:(t,e)=>`Нажмите Enter для перетаскивания ${e.plural(t.count,{one:()=>`${e.number(t.count)} выбранного элемента`,other:()=>`${e.number(t.count)} выбранных элементов`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Нажмите Alt + Enter для перетаскивания ${e.plural(t.count,{one:()=>`${e.number(t.count)} выбранного элемента`,other:()=>`${e.number(t.count)} выбранных элементов`})}.`,dragSelectedLongPress:(t,e)=>`Нажмите и удерживайте для перетаскивания ${e.plural(t.count,{one:()=>`${e.number(t.count)} выбранного элемента`,other:()=>`${e.number(t.count)} выбранных элементов`})}.`,dragStartedKeyboard:"Начато перетаскивание. Нажмите клавишу Tab для выбора цели, затем нажмите клавишу Enter, чтобы применить перетаскивание, или клавишу Escape для отмены действия.",dragStartedTouch:"Начато перетаскивание. Выберите цель, затем дважды нажмите, чтобы применить перетаскивание.",dragStartedVirtual:"Начато перетаскивание. Нажмите клавишу Tab для выбора цели, затем нажмите клавишу Enter, чтобы применить перетаскивание.",dropCanceled:"Перетаскивание отменено.",dropComplete:"Перетаскивание завершено.",dropDescriptionKeyboard:"Нажмите клавишу Enter, чтобы применить перетаскивание. Нажмите клавишу Escape для отмены.",dropDescriptionTouch:"Дважды нажмите, чтобы применить перетаскивание.",dropDescriptionVirtual:"Щелкните, чтобы применить перетаскивание.",dropIndicator:"индикатор перетаскивания",dropOnItem:t=>`Перетащить на ${t.itemText}`,dropOnRoot:"Перетащить на",endDragKeyboard:"Перетаскивание. Нажмите клавишу Enter для отмены.",endDragTouch:"Перетаскивание. Дважды нажмите для отмены.",endDragVirtual:"Перетаскивание. Щелкните для отмены.",insertAfter:t=>`Вставить после ${t.itemText}`,insertBefore:t=>`Вставить перед ${t.itemText}`,insertBetween:t=>`Вставить между ${t.beforeItemText} и ${t.afterItemText}`};var dB={};dB={dragDescriptionKeyboard:"Stlačením klávesu Enter začnete presúvanie.",dragDescriptionKeyboardAlt:"Stlačením klávesov Alt + Enter začnete presúvanie.",dragDescriptionLongPress:"Dlhým stlačením začnete presúvanie.",dragDescriptionTouch:"Dvojitým kliknutím začnete presúvanie.",dragDescriptionVirtual:"Kliknutím začnete presúvanie.",dragItem:t=>`Presunúť položku ${t.itemText}`,dragSelectedItems:(t,e)=>`Presunúť ${e.plural(t.count,{one:()=>`${e.number(t.count)} vybratú položku`,other:()=>`${e.number(t.count)} vybraté položky`})}`,dragSelectedKeyboard:(t,e)=>`Stlačením klávesu Enter presuniete ${e.plural(t.count,{one:()=>`${e.number(t.count)} vybratú položku`,other:()=>`${e.number(t.count)} vybratých položiek`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Stlačením klávesov Alt + Enter presuniete ${e.plural(t.count,{one:()=>`${e.number(t.count)} vybratú položku`,other:()=>`${e.number(t.count)} vybratých položiek`})}.`,dragSelectedLongPress:(t,e)=>`Dlhým stlačením presuniete ${e.plural(t.count,{one:()=>`${e.number(t.count)} vybratú položku`,other:()=>`${e.number(t.count)} vybratých položiek`})}.`,dragStartedKeyboard:"Presúvanie sa začalo. Do cieľového umiestnenia prejdete stlačením klávesu Tab. Ak chcete položku umiestniť, stlačte kláves Enter alebo stlačte kláves Esc, ak chcete presúvanie zrušiť.",dragStartedTouch:"Presúvanie sa začalo. Prejdite na cieľové umiestnenie a dvojitým kliknutím umiestnite položku.",dragStartedVirtual:"Presúvanie sa začalo. Prejdite na cieľové umiestnenie a kliknutím alebo stlačením klávesu Enter umiestnite položku.",dropCanceled:"Umiestnenie zrušené.",dropComplete:"Umiestnenie dokončené.",dropDescriptionKeyboard:"Stlačením klávesu Enter umiestnite položku. Stlačením klávesu Esc zrušíte presúvanie.",dropDescriptionTouch:"Dvojitým kliknutím umiestnite položku.",dropDescriptionVirtual:"Kliknutím umiestnite položku.",dropIndicator:"indikátor umiestnenia",dropOnItem:t=>`Umiestniť na položku ${t.itemText}`,dropOnRoot:"Umiestniť na",endDragKeyboard:"Prebieha presúvanie. Ak ho chcete zrušiť, stlačte kláves Enter.",endDragTouch:"Prebieha presúvanie. Dvojitým kliknutím ho môžete zrušiť.",endDragVirtual:"Prebieha presúvanie.",insertAfter:t=>`Vložiť za položku ${t.itemText}`,insertBefore:t=>`Vložiť pred položku ${t.itemText}`,insertBetween:t=>`Vložiť medzi položky ${t.beforeItemText} a ${t.afterItemText}`};var fB={};fB={dragDescriptionKeyboard:"Pritisnite tipko Enter za začetek vlečenja.",dragDescriptionKeyboardAlt:"Pritisnite tipki Alt + Enter za začetek vlečenja.",dragDescriptionLongPress:"Pritisnite in zadržite za začetek vlečenja.",dragDescriptionTouch:"Dvotapnite za začetek vlečenja.",dragDescriptionVirtual:"Kliknite za začetek vlečenja.",dragItem:t=>`Povleci ${t.itemText}`,dragSelectedItems:(t,e)=>`Povlecite ${e.plural(t.count,{one:()=>`${e.number(t.count)} izbran element`,other:()=>`izbrane elemente (${e.number(t.count)})`})}`,dragSelectedKeyboard:(t,e)=>`Pritisnite tipko Enter, da povlečete ${e.plural(t.count,{one:()=>`${e.number(t.count)} izbrani element`,other:()=>`${e.number(t.count)} izbranih elementov`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Pritisnite tipki Alt + Enter, da povlečete ${e.plural(t.count,{one:()=>`${e.number(t.count)} izbrani element`,other:()=>`${e.number(t.count)} izbranih elementov`})}.`,dragSelectedLongPress:(t,e)=>`Pritisnite in zadržite, da povlečete ${e.plural(t.count,{one:()=>`${e.number(t.count)} izbrani element`,other:()=>`${e.number(t.count)} izbranih elementov`})}.`,dragStartedKeyboard:"Vlečenje se je začelo. Pritisnite tipko Tab za pomik na mesto, kamor želite spustiti elemente, in pritisnite tipko Enter, da jih spustite, ali tipko Escape, da prekličete postopek.",dragStartedTouch:"Vlečenje se je začelo. Pomaknite se na mesto, kamor želite spustiti elemente, in dvotapnite, da jih spustite.",dragStartedVirtual:"Vlečenje se je začelo. Pomaknite se na mesto, kamor želite spustiti elemente, in kliknite ali pritisnite tipko Enter, da jih spustite.",dropCanceled:"Spust je preklican.",dropComplete:"Spust je končan.",dropDescriptionKeyboard:"Pritisnite tipko Enter, da spustite. Pritisnite tipko Escape, da prekličete vlečenje.",dropDescriptionTouch:"Dvotapnite, da spustite.",dropDescriptionVirtual:"Kliknite, da spustite.",dropIndicator:"indikator spusta",dropOnItem:t=>`Spusti na mesto ${t.itemText}`,dropOnRoot:"Spusti na mesto",endDragKeyboard:"Vlečenje. Pritisnite tipko Enter za preklic vlečenja.",endDragTouch:"Vlečenje. Dvotapnite za preklic vlečenja.",endDragVirtual:"Vlečenje. Kliknite, da prekličete vlečenje.",insertAfter:t=>`Vstavi za ${t.itemText}`,insertBefore:t=>`Vstavi pred ${t.itemText}`,insertBetween:t=>`Vstavi med ${t.beforeItemText} in ${t.afterItemText}`};var hB={};hB={dragDescriptionKeyboard:"Pritisnite Enter da biste započeli prevlačenje.",dragDescriptionKeyboardAlt:"Pritisnite Alt + Enter da biste započeli prevlačenje.",dragDescriptionLongPress:"Pritisnite dugo da biste započeli prevlačenje.",dragDescriptionTouch:"Dvaput dodirnite da biste započeli prevlačenje.",dragDescriptionVirtual:"Kliknite da biste započeli prevlačenje.",dragItem:t=>`Prevucite ${t.itemText}`,dragSelectedItems:(t,e)=>`Prevucite ${e.plural(t.count,{one:()=>`${e.number(t.count)} izabranu stavku`,other:()=>`${e.number(t.count)} izabrane stavke`})}`,dragSelectedKeyboard:(t,e)=>`Pritisnite Enter da biste prevukli ${e.plural(t.count,{one:()=>`${e.number(t.count)} izabranu stavku`,other:()=>`${e.number(t.count)} izabranih stavki`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Pritisnite Alt + Enter da biste prevukli ${e.plural(t.count,{one:()=>`${e.number(t.count)} izabranu stavku`,other:()=>`${e.number(t.count)} izabranih stavki`})}.`,dragSelectedLongPress:(t,e)=>`Pritisnite dugo da biste prevukli ${e.plural(t.count,{one:()=>`${e.number(t.count)} izabranu stavku`,other:()=>`${e.number(t.count)} izabranih stavki`})}.`,dragStartedKeyboard:"Prevlačenje je započeto. Pritisnite Tab da biste otišli do cilja za otpuštanje, zatim pritisnite Enter za ispuštanje ili pritisnite Escape za otkazivanje.",dragStartedTouch:"Prevlačenje je započeto. Idite do cilja za otpuštanje, a zatim dvaput dodirnite za otpuštanje.",dragStartedVirtual:"Prevlačenje je započeto. Idite do cilja za otpuštanje, a zatim kliknite ili pritinite Enter za otpuštanje.",dropCanceled:"Otpuštanje je otkazano.",dropComplete:"Prevlačenje je završeno.",dropDescriptionKeyboard:"Pritisnite Enter da biste otpustili. Pritisnite Escape da biste otkazali prevlačenje.",dropDescriptionTouch:"Dvaput dodirnite za otpuštanje.",dropDescriptionVirtual:"Kliknite za otpuštanje.",dropIndicator:"Indikator otpuštanja",dropOnItem:t=>`Otpusti na ${t.itemText}`,dropOnRoot:"Otpusti na",endDragKeyboard:"Prevlačenje u toku. Pritisnite Enter da biste otkazali prevlačenje.",endDragTouch:"Prevlačenje u toku. Dvaput dodirnite da biste otkazali prevlačenje.",endDragVirtual:"Prevlačenje u toku. Kliknite da biste otkazali prevlačenje.",insertAfter:t=>`Umetnite posle ${t.itemText}`,insertBefore:t=>`Umetnite ispred ${t.itemText}`,insertBetween:t=>`Umetnite između ${t.beforeItemText} i ${t.afterItemText}`};var pB={};pB={dragDescriptionKeyboard:"Tryck på enter för att börja dra.",dragDescriptionKeyboardAlt:"Tryck på Alt + Retur för att börja dra.",dragDescriptionLongPress:"Tryck länge för att börja dra.",dragDescriptionTouch:"Dubbeltryck för att börja dra.",dragDescriptionVirtual:"Klicka för att börja dra.",dragItem:t=>`Dra ${t.itemText}`,dragSelectedItems:(t,e)=>`Dra ${e.plural(t.count,{one:()=>`${e.number(t.count)} valt objekt`,other:()=>`${e.number(t.count)} valda objekt`})}`,dragSelectedKeyboard:(t,e)=>`Tryck på Retur för att dra ${e.plural(t.count,{one:()=>`${e.number(t.count)} markerat objekt`,other:()=>`${e.number(t.count)} markerade objekt`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Tryck på Alt + Retur för att dra ${e.plural(t.count,{one:()=>`${e.number(t.count)} markerat objekt`,other:()=>`${e.number(t.count)} markerade objekt`})}.`,dragSelectedLongPress:(t,e)=>`Tryck länge för att dra ${e.plural(t.count,{one:()=>`${e.number(t.count)} markerat objekt`,other:()=>`${e.number(t.count)} markerade objekt`})}.`,dragStartedKeyboard:"Börja dra. Tryck på tabb för att navigera till målet, tryck på enter för att släppa eller på escape för att avbryta.",dragStartedTouch:"Börja dra. Navigera till ett mål och dubbeltryck för att släppa.",dragStartedVirtual:"Börja dra. Navigera till ett mål och klicka eller tryck på enter för att släppa.",dropCanceled:"Släppåtgärd avbröts.",dropComplete:"Släppåtgärd klar.",dropDescriptionKeyboard:"Tryck på enter för att släppa. Tryck på escape för att avbryta dragåtgärd.",dropDescriptionTouch:"Dubbeltryck för att släppa.",dropDescriptionVirtual:"Klicka för att släppa.",dropIndicator:"släppindikator",dropOnItem:t=>`Släpp på ${t.itemText}`,dropOnRoot:"Släpp på",endDragKeyboard:"Drar. Tryck på enter för att avbryta dragåtgärd.",endDragTouch:"Drar. Dubbeltryck för att avbryta dragåtgärd.",endDragVirtual:"Drar. Klicka för att avbryta dragåtgärd.",insertAfter:t=>`Infoga efter ${t.itemText}`,insertBefore:t=>`Infoga före ${t.itemText}`,insertBetween:t=>`Infoga mellan ${t.beforeItemText} och ${t.afterItemText}`};var mB={};mB={dragDescriptionKeyboard:"Sürüklemeyi başlatmak için Enter'a basın.",dragDescriptionKeyboardAlt:"Sürüklemeyi başlatmak için Alt + Enter'a basın.",dragDescriptionLongPress:"Sürüklemeye başlamak için uzun basın.",dragDescriptionTouch:"Sürüklemeyi başlatmak için çift tıklayın.",dragDescriptionVirtual:"Sürüklemeyi başlatmak için tıklayın.",dragItem:t=>`${t.itemText}’i sürükle`,dragSelectedItems:(t,e)=>`Sürükle ${e.plural(t.count,{one:()=>`${e.number(t.count)} seçili öge`,other:()=>`${e.number(t.count)} seçili öge`})}`,dragSelectedKeyboard:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} seçilmiş öğe`,other:()=>`${e.number(t.count)} seçilmiş öğe`})} öğesini sürüklemek için Enter'a basın.`,dragSelectedKeyboardAlt:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} seçilmiş öğe`,other:()=>`${e.number(t.count)} seçilmiş öğe`})} öğesini sürüklemek için Alt + Enter tuşuna basın.`,dragSelectedLongPress:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} seçilmiş öğe`,other:()=>`${e.number(t.count)} seçilmiş öğe`})} öğesini sürüklemek için uzun basın.`,dragStartedKeyboard:"Sürükleme başlatıldı. Bir bırakma hedefine gitmek için Tab’a basın, ardından bırakmak için Enter’a basın veya iptal etmek için Escape’e basın.",dragStartedTouch:"Sürükleme başlatıldı. Bir bırakma hedefine gidin, ardından bırakmak için çift tıklayın.",dragStartedVirtual:"Sürükleme başlatıldı. Bir bırakma hedefine gidin, ardından bırakmak için Enter’a tıklayın veya basın.",dropCanceled:"Bırakma iptal edildi.",dropComplete:"Bırakma tamamlandı.",dropDescriptionKeyboard:"Bırakmak için Enter'a basın. Sürüklemeyi iptal etmek için Escape'e basın.",dropDescriptionTouch:"Bırakmak için çift tıklayın.",dropDescriptionVirtual:"Bırakmak için tıklayın.",dropIndicator:"bırakma göstergesi",dropOnItem:t=>`${t.itemText} üzerine bırak`,dropOnRoot:"Bırakın",endDragKeyboard:"Sürükleme. Sürüklemeyi iptal etmek için Enter'a basın.",endDragTouch:"Sürükleme. Sürüklemeyi iptal etmek için çift tıklayın.",endDragVirtual:"Sürükleme. Sürüklemeyi iptal etmek için tıklayın.",insertAfter:t=>`${t.itemText}’den sonra gir`,insertBefore:t=>`${t.itemText}’den önce gir`,insertBetween:t=>`${t.beforeItemText} ve ${t.afterItemText} arasına gir`};var gB={};gB={dragDescriptionKeyboard:"Натисніть Enter, щоб почати перетягування.",dragDescriptionKeyboardAlt:"Натисніть Alt + Enter, щоб почати перетягування.",dragDescriptionLongPress:"Натисніть і утримуйте, щоб почати перетягування.",dragDescriptionTouch:"Натисніть двічі, щоб почати перетягування.",dragDescriptionVirtual:"Натисніть, щоб почати перетягування.",dragItem:t=>`Перетягнути ${t.itemText}`,dragSelectedItems:(t,e)=>`Перетягніть ${e.plural(t.count,{one:()=>`${e.number(t.count)} вибраний елемент`,other:()=>`${e.number(t.count)} вибраних елем`})}`,dragSelectedKeyboard:(t,e)=>`Натисніть Enter, щоб перетягнути ${e.plural(t.count,{one:()=>`${e.number(t.count)} вибраний елемент`,other:()=>`${e.number(t.count)} вибраних елементи(-ів)`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Натисніть Alt + Enter, щоб перетягнути ${e.plural(t.count,{one:()=>`${e.number(t.count)} вибраний елемент`,other:()=>`${e.number(t.count)} вибраних елементи(-ів)`})}.`,dragSelectedLongPress:(t,e)=>`Утримуйте, щоб перетягнути ${e.plural(t.count,{one:()=>`${e.number(t.count)} вибраний елемент`,other:()=>`${e.number(t.count)} вибраних елементи(-ів)`})}.`,dragStartedKeyboard:"Перетягування почалося. Натисніть Tab, щоб перейти до цілі перетягування, потім натисніть Enter, щоб перетягнути, або Escape, щоб скасувати.",dragStartedTouch:"Перетягування почалося. Перейдіть до цілі перетягування, потім натисніть двічі, щоб перетягнути.",dragStartedVirtual:"Перетягування почалося. Перейдіть до цілі перетягування, потім натисніть Enter, щоб перетягнути.",dropCanceled:"Перетягування скасовано.",dropComplete:"Перетягування завершено.",dropDescriptionKeyboard:"Натисніть Enter, щоб перетягнути. Натисніть Escape, щоб скасувати перетягування.",dropDescriptionTouch:"Натисніть двічі, щоб перетягнути.",dropDescriptionVirtual:"Натисніть, щоб перетягнути.",dropIndicator:"індикатор перетягування",dropOnItem:t=>`Перетягнути на ${t.itemText}`,dropOnRoot:"Перетягнути на",endDragKeyboard:"Триває перетягування. Натисніть Enter, щоб скасувати перетягування.",endDragTouch:"Триває перетягування. Натисніть двічі, щоб скасувати перетягування.",endDragVirtual:"Триває перетягування. Натисніть, щоб скасувати перетягування.",insertAfter:t=>`Вставити після ${t.itemText}`,insertBefore:t=>`Вставити перед ${t.itemText}`,insertBetween:t=>`Вставити між ${t.beforeItemText} і ${t.afterItemText}`};var bB={};bB={dragDescriptionKeyboard:"按 Enter 开始拖动。",dragDescriptionKeyboardAlt:"按 Alt + Enter 开始拖动。",dragDescriptionLongPress:"长按以开始拖动。",dragDescriptionTouch:"双击开始拖动。",dragDescriptionVirtual:"单击开始拖动。",dragItem:t=>`拖动 ${t.itemText}`,dragSelectedItems:(t,e)=>`拖动 ${e.plural(t.count,{one:()=>`${e.number(t.count)} 选中项目`,other:()=>`${e.number(t.count)} 选中项目`})}`,dragSelectedKeyboard:(t,e)=>`按 Enter 以拖动 ${e.plural(t.count,{one:()=>`${e.number(t.count)} 个选定项`,other:()=>`${e.number(t.count)} 个选定项`})}。`,dragSelectedKeyboardAlt:(t,e)=>`按 Alt + Enter 以拖动 ${e.plural(t.count,{one:()=>`${e.number(t.count)} 个选定项`,other:()=>`${e.number(t.count)} 个选定项`})}。`,dragSelectedLongPress:(t,e)=>`长按以拖动 ${e.plural(t.count,{one:()=>`${e.number(t.count)} 个选定项`,other:()=>`${e.number(t.count)} 个选定项`})}。`,dragStartedKeyboard:"已开始拖动。按 Tab 导航到放置目标,然后按 Enter 放置或按 Escape 取消。",dragStartedTouch:"已开始拖动。导航到放置目标,然后双击放置。",dragStartedVirtual:"已开始拖动。导航到放置目标,然后单击或按 Enter 放置。",dropCanceled:"放置已取消。",dropComplete:"放置已完成。",dropDescriptionKeyboard:"按 Enter 放置。按 Escape 取消拖动。",dropDescriptionTouch:"双击放置。",dropDescriptionVirtual:"单击放置。",dropIndicator:"放置标记",dropOnItem:t=>`放置于 ${t.itemText}`,dropOnRoot:"放置于",endDragKeyboard:"正在拖动。按 Enter 取消拖动。",endDragTouch:"正在拖动。双击取消拖动。",endDragVirtual:"正在拖动。单击取消拖动。",insertAfter:t=>`插入到 ${t.itemText} 之后`,insertBefore:t=>`插入到 ${t.itemText} 之前`,insertBetween:t=>`插入到 ${t.beforeItemText} 和 ${t.afterItemText} 之间`};var yB={};yB={dragDescriptionKeyboard:"按 Enter 鍵以開始拖曳。",dragDescriptionKeyboardAlt:"按 Alt+Enter 鍵以開始拖曳。",dragDescriptionLongPress:"長按以開始拖曳。",dragDescriptionTouch:"輕點兩下以開始拖曳。",dragDescriptionVirtual:"按一下滑鼠以開始拖曳。",dragItem:t=>`拖曳「${t.itemText}」`,dragSelectedItems:(t,e)=>`拖曳 ${e.plural(t.count,{one:()=>`${e.number(t.count)} 個選定項目`,other:()=>`${e.number(t.count)} 個選定項目`})}`,dragSelectedKeyboard:(t,e)=>`按 Enter 鍵以拖曳 ${e.plural(t.count,{one:()=>`${e.number(t.count)} 個選定項目`,other:()=>`${e.number(t.count)} 個選定項目`})}。`,dragSelectedKeyboardAlt:(t,e)=>`按 Alt+Enter 鍵以拖曳 ${e.plural(t.count,{one:()=>`${e.number(t.count)} 個選定項目`,other:()=>`${e.number(t.count)} 個選定項目`})}。`,dragSelectedLongPress:(t,e)=>`長按以拖曳 ${e.plural(t.count,{one:()=>`${e.number(t.count)} 個選定項目`,other:()=>`${e.number(t.count)} 個選定項目`})}。`,dragStartedKeyboard:"已開始拖曳。按 Tab 鍵以瀏覽至放置目標,然後按 Enter 鍵以放置,或按 Escape 鍵以取消。",dragStartedTouch:"已開始拖曳。瀏覽至放置目標,然後輕點兩下以放置。",dragStartedVirtual:"已開始拖曳。瀏覽至放置目標,然後按一下滑鼠或按 Enter 鍵以放置。",dropCanceled:"放置已取消。",dropComplete:"放置已完成。",dropDescriptionKeyboard:"按 Enter 鍵以放置。按 Escape 鍵以取消拖曳。",dropDescriptionTouch:"輕點兩下以放置。",dropDescriptionVirtual:"按一下滑鼠以放置。",dropIndicator:"放置指示器",dropOnItem:t=>`放置在「${t.itemText}」上`,dropOnRoot:"放置在",endDragKeyboard:"拖曳中。按 Enter 鍵以取消拖曳。",endDragTouch:"拖曳中。輕點兩下以取消拖曳。",endDragVirtual:"拖曳中。按一下滑鼠以取消拖曳。",insertAfter:t=>`插入至「${t.itemText}」之後`,insertBefore:t=>`插入至「${t.itemText}」之前`,insertBetween:t=>`插入至「${t.beforeItemText}」和「${t.afterItemText}」之間`};var xd={};xd={"ar-AE":jA,"bg-BG":FA,"cs-CZ":KA,"da-DK":_A,"de-DE":VA,"el-GR":HA,"en-US":UA,"es-ES":qA,"et-EE":GA,"fi-FI":WA,"fr-FR":QA,"he-IL":YA,"hr-HR":XA,"hu-HU":JA,"it-IT":ZA,"ja-JP":eB,"ko-KR":tB,"lt-LT":nB,"lv-LV":rB,"nb-NO":iB,"nl-NL":sB,"pl-PL":oB,"pt-BR":aB,"pt-PT":lB,"ro-RO":uB,"ru-RU":cB,"sk-SK":dB,"sl-SI":fB,"sr-SP":hB,"sv-SE":pB,"tr-TR":mB,"uk-UA":gB,"zh-CN":bB,"zh-TW":yB};function u_(t){return t&&t.__esModule?t.default:t}const c_={keyboard:"dropDescriptionKeyboard",touch:"dropDescriptionTouch",virtual:"dropDescriptionVirtual"};function xB(){let t=gr(u_(xd),"@react-aria/dnd"),e=ox(),n=ax();return{dropProps:{...bd(n?t.format(c_[e]):""),onClick:()=>{}}}}const d_=800;function f_(t){let{hasDropButton:e,isDisabled:n}=t,[r,i]=S.useState(!1),s=S.useRef({x:0,y:0,dragOverElements:new Set,dropEffect:"none",allowedOperations:Rt.all,dropActivateTimer:void 0}).current,a=$=>{if(i(!0),typeof t.onDropEnter=="function"){let A=$.currentTarget.getBoundingClientRect();t.onDropEnter({type:"dropenter",x:$.clientX-A.x,y:$.clientY-A.y})}},u=$=>{if(i(!1),typeof t.onDropExit=="function"){let A=$.currentTarget.getBoundingClientRect();t.onDropExit({type:"dropexit",x:$.clientX-A.x,y:$.clientY-A.y})}},c=$=>{$.preventDefault(),$.stopPropagation();let A=aE($);if($.clientX===s.x&&$.clientY===s.y&&A===s.allowedOperations){$.dataTransfer.dropEffect=s.dropEffect;return}s.x=$.clientX,s.y=$.clientY;let B=s.dropEffect;if(A!==s.allowedOperations){let R=qb(A),M=R[0];if(typeof t.getDropOperation=="function"){let O=new lh($.dataTransfer);M=uh(A,t.getDropOperation(O,R))}s.dropEffect=Hb[M]||"none"}if(typeof t.getDropOperationForPoint=="function"){let R=new lh($.dataTransfer),M=$.currentTarget.getBoundingClientRect(),O=uh(A,t.getDropOperationForPoint(R,qb(A),s.x-M.x,s.y-M.y));s.dropEffect=Hb[O]||"none"}if(s.allowedOperations=A,$.dataTransfer.dropEffect=s.dropEffect,s.dropEffect==="none"&&B!=="none"?u($):s.dropEffect!=="none"&&B==="none"&&a($),typeof t.onDropMove=="function"&&s.dropEffect!=="none"){let R=$.currentTarget.getBoundingClientRect();t.onDropMove({type:"dropmove",x:s.x-R.x,y:s.y-R.y})}if(clearTimeout(s.dropActivateTimer),t.onDropActivate&&typeof t.onDropActivate=="function"&&s.dropEffect!=="none"){let R=t.onDropActivate,M=$.currentTarget.getBoundingClientRect();s.dropActivateTimer=setTimeout(()=>{R({type:"dropactivate",x:s.x-M.x,y:s.y-M.y})},d_)}},f=$=>{if($.preventDefault(),$.stopPropagation(),s.dragOverElements.add(ce($)),s.dragOverElements.size>1)return;let A=aE($),B=qb(A),R=B[0];if(typeof t.getDropOperation=="function"){let M=new lh($.dataTransfer);R=uh(A,t.getDropOperation(M,B))}if(typeof t.getDropOperationForPoint=="function"){let M=new lh($.dataTransfer),O=$.currentTarget.getBoundingClientRect();R=uh(A,t.getDropOperationForPoint(M,B,$.clientX-O.x,$.clientY-O.y))}s.x=$.clientX,s.y=$.clientY,s.allowedOperations=A,s.dropEffect=Hb[R]||"none",$.dataTransfer.dropEffect=s.dropEffect,R!=="cancel"&&a($)},h=$=>{$.preventDefault(),$.stopPropagation();let A=ce($);if(s.dragOverElements.delete(A),A===$.currentTarget)for(let B of s.dragOverElements)Se($.currentTarget,B)||s.dragOverElements.delete(B);s.dragOverElements.size>0||(s.dropEffect!=="none"&&u($),clearTimeout(s.dropActivateTimer))},m=$=>{if($.preventDefault(),$.stopPropagation(),pp(s.dropEffect),typeof t.onDrop=="function"){let B=Cc[s.dropEffect],R=WK($.dataTransfer),M=$.currentTarget.getBoundingClientRect(),O={type:"drop",x:$.clientX-M.x,y:$.clientY-M.y,items:R,dropOperation:B};t.onDrop(O)}let A={...Kt};s.dragOverElements.clear(),u($),clearTimeout(s.dropActivateTimer),A.draggingCollectionRef==null?pp(void 0):e_(A)},g=Pt($=>{typeof t.onDropEnter=="function"&&t.onDropEnter($)}),b=Pt($=>{typeof t.onDropExit=="function"&&t.onDropExit($)}),x=Pt($=>{typeof t.onDropActivate=="function"&&t.onDropActivate($)}),k=Pt($=>{typeof t.onDrop=="function"&&t.onDrop($)}),E=Pt(($,A)=>t.getDropOperation?t.getDropOperation($,A):A[0]),{ref:D}=t;Ie(()=>{if(!(n||!D.current))return IA({element:D.current,getDropOperation:E,onDropEnter($){i(!0),g($)},onDropExit($){i(!1),b($)},onDrop:k,onDropActivate:x})},[n,D]);let{dropProps:T}=xB();return n?{dropProps:{},dropButtonProps:{isDisabled:!0},isDropTarget:!1}:{dropProps:{...!e&&T,onDragEnter:f,onDragOver:c,onDragLeave:h,onDrop:m},dropButtonProps:{...e&&T},isDropTarget:r}}function aE(t){let e=BA[t.dataTransfer.effectAllowed];b4&&(e&=b4);let n=Rt.none;return _s()?(t.altKey&&(n|=Rt.copy),t.ctrlKey&&!R3()&&(n|=Rt.link),t.metaKey&&(n|=Rt.move)):(t.altKey&&(n|=Rt.link),t.shiftKey&&(n|=Rt.move),t.ctrlKey&&(n|=Rt.copy)),n?e&n:e}function qb(t){let e=[];return t&Rt.move&&e.push("move"),t&Rt.copy&&e.push("copy"),t&Rt.link&&e.push("link"),e}function uh(t,e){let n=Rt[e];return t&n?e:"cancel"}const lx=new WeakMap;function x4(t,e){let{id:n}=lx.get(t)??{};if(!n)throw new Error("Unknown list");return`${n}-${h_(e)}`}function h_(t){return typeof t=="string"?t.replace(/\s*/g,""):""+t}var vB={};vB={deselectedItem:t=>`${t.item} غير المحدد`,longPressToSelect:"اضغط مطولًا للدخول إلى وضع التحديد.",select:"تحديد",selectedAll:"جميع العناصر المحددة.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"لم يتم تحديد عناصر",one:()=>`${e.number(t.count)} عنصر محدد`,other:()=>`${e.number(t.count)} عنصر محدد`})}.`,selectedItem:t=>`${t.item} المحدد`};var kB={};kB={deselectedItem:t=>`${t.item} не е избран.`,longPressToSelect:"Натиснете и задръжте за да влезете в избирателен режим.",select:"Изберете",selectedAll:"Всички елементи са избрани.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Няма избрани елементи",one:()=>`${e.number(t.count)} избран елемент`,other:()=>`${e.number(t.count)} избрани елементи`})}.`,selectedItem:t=>`${t.item} избран.`};var CB={};CB={deselectedItem:t=>`Položka ${t.item} není vybrána.`,longPressToSelect:"Dlouhým stisknutím přejdete do režimu výběru.",select:"Vybrat",selectedAll:"Vybrány všechny položky.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Nevybrány žádné položky",one:()=>`Vybrána ${e.number(t.count)} položka`,other:()=>`Vybráno ${e.number(t.count)} položek`})}.`,selectedItem:t=>`Vybrána položka ${t.item}.`};var EB={};EB={deselectedItem:t=>`${t.item} ikke valgt.`,longPressToSelect:"Lav et langt tryk for at aktivere valgtilstand.",select:"Vælg",selectedAll:"Alle elementer valgt.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Ingen elementer valgt",one:()=>`${e.number(t.count)} element valgt`,other:()=>`${e.number(t.count)} elementer valgt`})}.`,selectedItem:t=>`${t.item} valgt.`};var DB={};DB={deselectedItem:t=>`${t.item} nicht ausgewählt.`,longPressToSelect:"Gedrückt halten, um Auswahlmodus zu öffnen.",select:"Auswählen",selectedAll:"Alle Elemente ausgewählt.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Keine Elemente ausgewählt",one:()=>`${e.number(t.count)} Element ausgewählt`,other:()=>`${e.number(t.count)} Elemente ausgewählt`})}.`,selectedItem:t=>`${t.item} ausgewählt.`};var SB={};SB={deselectedItem:t=>`Δεν επιλέχθηκε το στοιχείο ${t.item}.`,longPressToSelect:"Πατήστε παρατεταμένα για να μπείτε σε λειτουργία επιλογής.",select:"Επιλογή",selectedAll:"Επιλέχθηκαν όλα τα στοιχεία.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Δεν επιλέχθηκαν στοιχεία",one:()=>`Επιλέχθηκε ${e.number(t.count)} στοιχείο`,other:()=>`Επιλέχθηκαν ${e.number(t.count)} στοιχεία`})}.`,selectedItem:t=>`Επιλέχθηκε το στοιχείο ${t.item}.`};var wB={};wB={deselectedItem:t=>`${t.item} not selected.`,select:"Select",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"No items selected",one:()=>`${e.number(t.count)} item selected`,other:()=>`${e.number(t.count)} items selected`})}.`,selectedAll:"All items selected.",selectedItem:t=>`${t.item} selected.`,longPressToSelect:"Long press to enter selection mode."};var $B={};$B={deselectedItem:t=>`${t.item} no seleccionado.`,longPressToSelect:"Mantenga pulsado para abrir el modo de selección.",select:"Seleccionar",selectedAll:"Todos los elementos seleccionados.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Ningún elemento seleccionado",one:()=>`${e.number(t.count)} elemento seleccionado`,other:()=>`${e.number(t.count)} elementos seleccionados`})}.`,selectedItem:t=>`${t.item} seleccionado.`};var TB={};TB={deselectedItem:t=>`${t.item} pole valitud.`,longPressToSelect:"Valikurežiimi sisenemiseks vajutage pikalt.",select:"Vali",selectedAll:"Kõik üksused valitud.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Üksusi pole valitud",one:()=>`${e.number(t.count)} üksus valitud`,other:()=>`${e.number(t.count)} üksust valitud`})}.`,selectedItem:t=>`${t.item} valitud.`};var AB={};AB={deselectedItem:t=>`Kohdetta ${t.item} ei valittu.`,longPressToSelect:"Siirry valintatilaan painamalla pitkään.",select:"Valitse",selectedAll:"Kaikki kohteet valittu.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Ei yhtään kohdetta valittu",one:()=>`${e.number(t.count)} kohde valittu`,other:()=>`${e.number(t.count)} kohdetta valittu`})}.`,selectedItem:t=>`${t.item} valittu.`};var BB={};BB={deselectedItem:t=>`${t.item} non sélectionné.`,longPressToSelect:"Appuyez de manière prolongée pour passer en mode de sélection.",select:"Sélectionner",selectedAll:"Tous les éléments sélectionnés.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Aucun élément sélectionné",one:()=>`${e.number(t.count)} élément sélectionné`,other:()=>`${e.number(t.count)} éléments sélectionnés`})}.`,selectedItem:t=>`${t.item} sélectionné.`};var MB={};MB={deselectedItem:t=>`${t.item} לא נבחר.`,longPressToSelect:"הקשה ארוכה לכניסה למצב בחירה.",select:"בחר",selectedAll:"כל הפריטים נבחרו.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"לא נבחרו פריטים",one:()=>`פריט ${e.number(t.count)} נבחר`,other:()=>`${e.number(t.count)} פריטים נבחרו`})}.`,selectedItem:t=>`${t.item} נבחר.`};var NB={};NB={deselectedItem:t=>`Stavka ${t.item} nije odabrana.`,longPressToSelect:"Dugo pritisnite za ulazak u način odabira.",select:"Odaberite",selectedAll:"Odabrane su sve stavke.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Nije odabrana nijedna stavka",one:()=>`Odabrana je ${e.number(t.count)} stavka`,other:()=>`Odabrano je ${e.number(t.count)} stavki`})}.`,selectedItem:t=>`Stavka ${t.item} je odabrana.`};var RB={};RB={deselectedItem:t=>`${t.item} nincs kijelölve.`,longPressToSelect:"Nyomja hosszan a kijelöléshez.",select:"Kijelölés",selectedAll:"Az összes elem kijelölve.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Egy elem sincs kijelölve",one:()=>`${e.number(t.count)} elem kijelölve`,other:()=>`${e.number(t.count)} elem kijelölve`})}.`,selectedItem:t=>`${t.item} kijelölve.`};var OB={};OB={deselectedItem:t=>`${t.item} non selezionato.`,longPressToSelect:"Premi a lungo per passare alla modalità di selezione.",select:"Seleziona",selectedAll:"Tutti gli elementi selezionati.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Nessun elemento selezionato",one:()=>`${e.number(t.count)} elemento selezionato`,other:()=>`${e.number(t.count)} elementi selezionati`})}.`,selectedItem:t=>`${t.item} selezionato.`};var PB={};PB={deselectedItem:t=>`${t.item} が選択されていません。`,longPressToSelect:"長押しして選択モードを開きます。",select:"選択",selectedAll:"すべての項目を選択しました。",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"項目が選択されていません",one:()=>`${e.number(t.count)} 項目を選択しました`,other:()=>`${e.number(t.count)} 項目を選択しました`})}。`,selectedItem:t=>`${t.item} を選択しました。`};var zB={};zB={deselectedItem:t=>`${t.item}이(가) 선택되지 않았습니다.`,longPressToSelect:"선택 모드로 들어가려면 길게 누르십시오.",select:"선택",selectedAll:"모든 항목이 선택되었습니다.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"선택된 항목이 없습니다",one:()=>`${e.number(t.count)}개 항목이 선택되었습니다`,other:()=>`${e.number(t.count)}개 항목이 선택되었습니다`})}.`,selectedItem:t=>`${t.item}이(가) 선택되었습니다.`};var LB={};LB={deselectedItem:t=>`${t.item} nepasirinkta.`,longPressToSelect:"Norėdami įjungti pasirinkimo režimą, paspauskite ir palaikykite.",select:"Pasirinkti",selectedAll:"Pasirinkti visi elementai.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Nepasirinktas nė vienas elementas",one:()=>`Pasirinktas ${e.number(t.count)} elementas`,other:()=>`Pasirinkta elementų: ${e.number(t.count)}`})}.`,selectedItem:t=>`Pasirinkta: ${t.item}.`};var IB={};IB={deselectedItem:t=>`Vienums ${t.item} nav atlasīts.`,longPressToSelect:"Ilgi turiet nospiestu. lai ieslēgtu atlases režīmu.",select:"Atlasīt",selectedAll:"Atlasīti visi vienumi.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Nav atlasīts neviens vienums",one:()=>`Atlasīto vienumu skaits: ${e.number(t.count)}`,other:()=>`Atlasīto vienumu skaits: ${e.number(t.count)}`})}.`,selectedItem:t=>`Atlasīts vienums ${t.item}.`};var jB={};jB={deselectedItem:t=>`${t.item} er ikke valgt.`,longPressToSelect:"Bruk et langt trykk for å gå inn i valgmodus.",select:"Velg",selectedAll:"Alle elementer er valgt.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Ingen elementer er valgt",one:()=>`${e.number(t.count)} element er valgt`,other:()=>`${e.number(t.count)} elementer er valgt`})}.`,selectedItem:t=>`${t.item} er valgt.`};var FB={};FB={deselectedItem:t=>`${t.item} niet geselecteerd.`,longPressToSelect:"Druk lang om de selectiemodus te openen.",select:"Selecteren",selectedAll:"Alle items geselecteerd.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Geen items geselecteerd",one:()=>`${e.number(t.count)} item geselecteerd`,other:()=>`${e.number(t.count)} items geselecteerd`})}.`,selectedItem:t=>`${t.item} geselecteerd.`};var KB={};KB={deselectedItem:t=>`Nie zaznaczono ${t.item}.`,longPressToSelect:"Naciśnij i przytrzymaj, aby wejść do trybu wyboru.",select:"Zaznacz",selectedAll:"Wszystkie zaznaczone elementy.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Nie zaznaczono żadnych elementów",one:()=>`${e.number(t.count)} zaznaczony element`,other:()=>`${e.number(t.count)} zaznaczonych elementów`})}.`,selectedItem:t=>`Zaznaczono ${t.item}.`};var _B={};_B={deselectedItem:t=>`${t.item} não selecionado.`,longPressToSelect:"Mantenha pressionado para entrar no modo de seleção.",select:"Selecionar",selectedAll:"Todos os itens selecionados.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Nenhum item selecionado",one:()=>`${e.number(t.count)} item selecionado`,other:()=>`${e.number(t.count)} itens selecionados`})}.`,selectedItem:t=>`${t.item} selecionado.`};var VB={};VB={deselectedItem:t=>`${t.item} não selecionado.`,longPressToSelect:"Prima continuamente para entrar no modo de seleção.",select:"Selecionar",selectedAll:"Todos os itens selecionados.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Nenhum item selecionado",one:()=>`${e.number(t.count)} item selecionado`,other:()=>`${e.number(t.count)} itens selecionados`})}.`,selectedItem:t=>`${t.item} selecionado.`};var HB={};HB={deselectedItem:t=>`${t.item} neselectat.`,longPressToSelect:"Apăsați lung pentru a intra în modul de selectare.",select:"Selectare",selectedAll:"Toate elementele selectate.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Niciun element selectat",one:()=>`${e.number(t.count)} element selectat`,other:()=>`${e.number(t.count)} elemente selectate`})}.`,selectedItem:t=>`${t.item} selectat.`};var UB={};UB={deselectedItem:t=>`${t.item} не выбрано.`,longPressToSelect:"Нажмите и удерживайте для входа в режим выбора.",select:"Выбрать",selectedAll:"Выбраны все элементы.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Нет выбранных элементов",one:()=>`${e.number(t.count)} элемент выбран`,other:()=>`${e.number(t.count)} элементов выбрано`})}.`,selectedItem:t=>`${t.item} выбрано.`};var qB={};qB={deselectedItem:t=>`Nevybraté položky: ${t.item}.`,longPressToSelect:"Dlhším stlačením prejdite do režimu výberu.",select:"Vybrať",selectedAll:"Všetky vybraté položky.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Žiadne vybraté položky",one:()=>`${e.number(t.count)} vybratá položka`,other:()=>`Počet vybratých položiek:${e.number(t.count)}`})}.`,selectedItem:t=>`Vybraté položky: ${t.item}.`};var GB={};GB={deselectedItem:t=>`Element ${t.item} ni izbran.`,longPressToSelect:"Za izbirni način pritisnite in dlje časa držite.",select:"Izberite",selectedAll:"Vsi elementi so izbrani.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Noben element ni izbran",one:()=>`${e.number(t.count)} element je izbran`,other:()=>`${e.number(t.count)} elementov je izbranih`})}.`,selectedItem:t=>`Element ${t.item} je izbran.`};var WB={};WB={deselectedItem:t=>`${t.item} nije izabrano.`,longPressToSelect:"Dugo pritisnite za ulazak u režim biranja.",select:"Izaberite",selectedAll:"Izabrane su sve stavke.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Nije izabrana nijedna stavka",one:()=>`Izabrana je ${e.number(t.count)} stavka`,other:()=>`Izabrano je ${e.number(t.count)} stavki`})}.`,selectedItem:t=>`${t.item} je izabrano.`};var QB={};QB={deselectedItem:t=>`${t.item} ej markerat.`,longPressToSelect:"Tryck länge när du vill öppna väljarläge.",select:"Markera",selectedAll:"Alla markerade objekt.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Inga markerade objekt",one:()=>`${e.number(t.count)} markerat objekt`,other:()=>`${e.number(t.count)} markerade objekt`})}.`,selectedItem:t=>`${t.item} markerat.`};var YB={};YB={deselectedItem:t=>`${t.item} seçilmedi.`,longPressToSelect:"Seçim moduna girmek için uzun basın.",select:"Seç",selectedAll:"Tüm ögeler seçildi.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Hiçbir öge seçilmedi",one:()=>`${e.number(t.count)} öge seçildi`,other:()=>`${e.number(t.count)} öge seçildi`})}.`,selectedItem:t=>`${t.item} seçildi.`};var XB={};XB={deselectedItem:t=>`${t.item} не вибрано.`,longPressToSelect:"Виконайте довге натиснення, щоб перейти в режим вибору.",select:"Вибрати",selectedAll:"Усі елементи вибрано.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Жодних елементів не вибрано",one:()=>`${e.number(t.count)} елемент вибрано`,other:()=>`Вибрано елементів: ${e.number(t.count)}`})}.`,selectedItem:t=>`${t.item} вибрано.`};var JB={};JB={deselectedItem:t=>`未选择 ${t.item}。`,longPressToSelect:"长按以进入选择模式。",select:"选择",selectedAll:"已选择所有项目。",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"未选择项目",one:()=>`已选择 ${e.number(t.count)} 个项目`,other:()=>`已选择 ${e.number(t.count)} 个项目`})}。`,selectedItem:t=>`已选择 ${t.item}。`};var ZB={};ZB={deselectedItem:t=>`未選取「${t.item}」。`,longPressToSelect:"長按以進入選擇模式。",select:"選取",selectedAll:"已選取所有項目。",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"未選取任何項目",one:()=>`已選取 ${e.number(t.count)} 個項目`,other:()=>`已選取 ${e.number(t.count)} 個項目`})}。`,selectedItem:t=>`已選取「${t.item}」。`};var Nm={};Nm={"ar-AE":vB,"bg-BG":kB,"cs-CZ":CB,"da-DK":EB,"de-DE":DB,"el-GR":SB,"en-US":wB,"es-ES":$B,"et-EE":TB,"fi-FI":AB,"fr-FR":BB,"he-IL":MB,"hr-HR":NB,"hu-HU":RB,"it-IT":OB,"ja-JP":PB,"ko-KR":zB,"lt-LT":LB,"lv-LV":IB,"nb-NO":jB,"nl-NL":FB,"pl-PL":KB,"pt-BR":_B,"pt-PT":VB,"ro-RO":HB,"ru-RU":UB,"sk-SK":qB,"sl-SI":GB,"sr-SP":WB,"sv-SE":QB,"tr-TR":YB,"uk-UA":XB,"zh-CN":JB,"zh-TW":ZB};function p_(t){return t&&t.__esModule?t.default:t}function m_(t,e){let{getRowText:n=u=>e.collection.getTextValue?.(u)??e.collection.getItem(u)?.textValue}=t,r=gr(p_(Nm),"@react-aria/grid"),i=e.selectionManager.rawSelection,s=S.useRef(i),a=S.useCallback(()=>{if(!e.selectionManager.isFocused||i===s.current){s.current=i;return}let u=lE(i,s.current),c=lE(s.current,i),f=e.selectionManager.selectionBehavior==="replace",h=[];if(e.selectionManager.selectedKeys.size===1&&f){let m=e.selectionManager.selectedKeys.keys().next().value;if(m!=null&&e.collection.getItem(m)){let g=n(m);g&&h.push(r.format("selectedItem",{item:g}))}}else if(u.size===1&&c.size===0){let m=u.keys().next().value;if(m!=null){let g=n(m);g&&h.push(r.format("selectedItem",{item:g}))}}else if(c.size===1&&u.size===0){let m=c.keys().next().value;if(m!=null&&e.collection.getItem(m)){let g=n(m);g&&h.push(r.format("deselectedItem",{item:g}))}}e.selectionManager.selectionMode==="multiple"&&(h.length===0||i==="all"||i.size>1||s.current==="all"||s.current?.size>1)&&h.push(i==="all"?r.format("selectedAll"):r.format("selectedCount",{count:i.size})),h.length>0&&Po(h.join(" ")),s.current=i},[i,e.selectionManager.selectedKeys,e.selectionManager.isFocused,e.selectionManager.selectionBehavior,e.selectionManager.selectionMode,e.collection,n,r]);sF(()=>{if(e.selectionManager.isFocused)a();else{let u=requestAnimationFrame(a);return()=>cancelAnimationFrame(u)}},[i,e.selectionManager.isFocused])}function lE(t,e){let n=new Set;if(t==="all"||e==="all")return n;for(let r of t.keys())e.has(r)||n.add(r);return n}function g_(t,e){let n=e?.isDisabled,[r,i]=S.useState(!1);return Ie(()=>{if(t?.current&&!n){let s=()=>{if(t.current){let u=dn(t.current,{tabbable:!0});i(!!u.nextNode())}};s();let a=new MutationObserver(s);return a.observe(t.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{a.disconnect()}}}),n?!1:r}function b_(t){return t&&t.__esModule?t.default:t}function y_(t){let e=gr(b_(Nm),"@react-aria/grid"),n=Ww(),r=(n==="pointer"||n==="virtual"||n==null)&&typeof window<"u"&&"ontouchstart"in window,i=S.useMemo(()=>{let a=t.selectionManager.selectionMode,u=t.selectionManager.selectionBehavior,c;return r&&(c=e.format("longPressToSelect")),u==="replace"&&a!=="none"&&t.hasItemActions?c:void 0},[t.selectionManager.selectionMode,t.selectionManager.selectionBehavior,t.hasItemActions,e,r]);return bd(i)}function x_(t,e,n){let{isVirtualized:r,keyboardDelegate:i,layoutDelegate:s,onAction:a,disallowTypeAhead:u,linkBehavior:c="action",keyboardNavigationBehavior:f="arrow",escapeKeyBehavior:h="clearSelection",shouldSelectOnPressUp:m}=t;!t["aria-label"]&&!t["aria-labelledby"]&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let{listProps:g}=G6({selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,ref:n,keyboardDelegate:i,layoutDelegate:s,isVirtualized:r,selectOnFocus:e.selectionManager.selectionBehavior==="replace",shouldFocusWrap:t.shouldFocusWrap,linkBehavior:c,disallowTypeAhead:u,autoFocus:t.autoFocus,escapeKeyBehavior:h,UNSTABLE_focusOnEntry:t.UNSTABLE_focusOnEntry}),b=an(t.id);lx.set(e,{id:b,onAction:a,linkBehavior:c,keyboardNavigationBehavior:f,shouldSelectOnPressUp:m});let x=y_({selectionManager:e.selectionManager,hasItemActions:!!a}),k=g_(n,{isDisabled:e.collection.size!==0}),E=Ze(t,{labelable:!0}),D=we(E,{role:"grid",id:b,"aria-multiselectable":e.selectionManager.selectionMode==="multiple"?"true":void 0},e.collection.size===0?{tabIndex:k?-1:0}:g,x);return r&&(D["aria-rowcount"]=e.collection.size,D["aria-colcount"]=1),m_({},e),{gridProps:D}}const uE={expand:{ltr:"ArrowRight",rtl:"ArrowLeft"},collapse:{ltr:"ArrowLeft",rtl:"ArrowRight"}};function v_(t,e,n){let{node:r,isVirtualized:i}=t,{direction:s}=Ki(),{onAction:a,linkBehavior:u,keyboardNavigationBehavior:c,shouldSelectOnPressUp:f}=lx.get(e),h=Ho(),m=S.useRef(null),g=()=>{n.current!==null&&(m.current!=null&&r.key!==m.current||!Bl(n.current))&&bn(n.current)},b={},x=t.hasChildItems,k=e.selectionManager.isLink(r.key);if(r!=null&&"expandedKeys"in e){let G=e.collection.getChildren?.(r.key);x=x||[...G??[]].length>1,a==null&&!k&&e.selectionManager.selectionMode==="none"&&x&&(a=()=>e.toggleKey(r.key));let Z=x?e.expandedKeys.has(r.key):void 0,F=1,te=r.index;if(r.level>=0&&r?.parentKey!=null){let P=e.collection.getItem(r.parentKey);if(P){let _=k_(P,e.collection);F=[..._].filter(W=>W.type==="item").length,te>0&&_[0].type!=="item"&&(te-=1)}}else F=[...e.collection].filter(P=>P.level===0&&P.type==="item").length;b={"aria-expanded":Z,"aria-level":r.level+1,"aria-posinset":te+1,"aria-setsize":F}}let{itemProps:E,...D}=Q6({selectionManager:e.selectionManager,key:r.key,ref:n,isVirtualized:i,shouldSelectOnPressUp:t.shouldSelectOnPressUp||f,onAction:a||r.props?.onAction?Ys(r.props?.onAction,a?()=>a(r.key):void 0):void 0,focus:g,linkBehavior:u}),T=G=>{let Z=_e();if(!Se(G.currentTarget,ce(G))||!n.current||!Z)return;let F=dn(n.current);if(F.currentNode=Z,!cE(G,e,r,x,s,Z,n.current))switch(G.key){case"ArrowLeft":if(c==="arrow"){let te=s==="rtl"?F.nextNode():F.previousNode();if(te)G.preventDefault(),G.stopPropagation(),bn(te),ks(te,{containingElement:Ur(n.current)});else if(G.preventDefault(),G.stopPropagation(),s==="rtl")bn(n.current),ks(n.current,{containingElement:Ur(n.current)});else{F.currentNode=n.current;let P=dE(F);P&&(bn(P),ks(P,{containingElement:Ur(n.current)}))}}break;case"ArrowRight":if(c==="arrow"){let te=s==="rtl"?F.previousNode():F.nextNode();if(te)G.preventDefault(),G.stopPropagation(),bn(te),ks(te,{containingElement:Ur(n.current)});else if(G.preventDefault(),G.stopPropagation(),s==="ltr")bn(n.current),ks(n.current,{containingElement:Ur(n.current)});else{F.currentNode=n.current;let P=dE(F);P&&(bn(P),ks(P,{containingElement:Ur(n.current)}))}}break;case"ArrowUp":case"ArrowDown":!G.altKey&&Se(n.current,ce(G))&&(G.stopPropagation(),G.preventDefault(),n.current.parentElement?.dispatchEvent(new KeyboardEvent(G.nativeEvent.type,G.nativeEvent)));break}},$=G=>{if(m.current=r.key,ce(G)!==n.current){Ml()||e.selectionManager.setFocusedKey(r.key);return}},A=G=>{let Z=_e();if(!(!Se(G.currentTarget,ce(G))||!n.current||!Z)){if(c==="tab"){if(ce(G)!==n.current&&G.key!=="Tab"){G.stopPropagation();return}if(cE(G,e,r,x,s,Z,n.current))return}switch(G.key){case"Tab":if(c==="tab"){let F=dn(n.current,{tabbable:!0});F.currentNode=Z,(G.shiftKey?F.previousNode():F.nextNode())&&G.stopPropagation()}}}},B=UI(r.props),R=D.hasAction?B:{},M=we(E,R,{role:"row",onKeyDownCapture:c==="arrow"?T:void 0,onFocus:$,"aria-label":r["aria-label"]||r.textValue||void 0,"aria-selected":e.selectionManager.canSelectItem(r.key)?e.selectionManager.isSelected(r.key):void 0,"aria-disabled":e.selectionManager.isDisabled(r.key)||void 0,"aria-labelledby":h&&(r["aria-label"]||r.textValue)?`${x4(e,r.key)} ${h}`:void 0,id:x4(e,r.key)}),O=M.onKeyDown;M.onKeyDown=G=>{A(G),G.isPropagationStopped()||O?.(G)};let j=M.onPointerDown;M.onPointerDown=G=>{let Z=ce(G);if(Z&&Z!==n.current&&tp(Z)){G.stopPropagation();return}j?.(G)};let q=M.onMouseDown;if(M.onMouseDown=G=>{let Z=ce(G);if(Z&&Z!==n.current&&tp(Z)){G.stopPropagation();return}q?.(G)},i){let{collection:G}=e,Z=[...G];M["aria-rowindex"]=Z.find(F=>F.type==="section")?[...G.getKeys()].filter(F=>G.getItem(F)?.type!=="section").findIndex(F=>F===r.key)+1:r.index+1}let X={role:"gridcell","aria-colindex":1};return{rowProps:{...we(M,b)},gridCellProps:X,descriptionProps:{id:h},...D}}function cE(t,e,n,r,i,s,a){if(!("expandedKeys"in e)||s!==a)return!1;if(t.key===uE.expand[i]&&e.selectionManager.focusedKey===n.key&&r&&!e.expandedKeys.has(n.key))return e.toggleKey(n.key),t.stopPropagation(),!0;if(t.key===uE.collapse[i]&&e.selectionManager.focusedKey===n.key){if(r&&e.expandedKeys.has(n.key))return e.toggleKey(n.key),t.stopPropagation(),!0;if(!e.expandedKeys.has(n.key)&&n.parentKey&&e.collection.getItem(n.parentKey)?.type==="item")return e.selectionManager.setFocusedKey(n.parentKey),t.stopPropagation(),!0}return!1}function dE(t){let e=null,n=null;do n=t.lastChild(),n&&(e=n);while(n);return e}function k_(t,e){let n=e.getChildren?.(t.key),r=n?Array.from(n):[],i=r.length>0?r[0]:null,s=[];for(;i;)s.push(i),i=i.nextKey!=null?e.getItem(i.nextKey):null;return s}function C_(t){return t&&t.__esModule?t.default:t}function E_(t,e){let{key:n}=t,r=e.selectionManager,i=an(),s=!e.selectionManager.canSelectItem(n),a=e.selectionManager.isSelected(n),u=()=>r.toggleSelection(n);const c=gr(C_(Nm),"@react-aria/grid");return{checkboxProps:{id:i,"aria-label":c.format("select"),isSelected:a,isDisabled:s,onChange:u}}}function D_(t,e){let{key:n}=t;const{checkboxProps:r}=E_(t,e);return{checkboxProps:{...r,"aria-labelledby":`${r.id} ${x4(e,n)}`}}}const S_=S.createContext(null),w_=S.forwardRef(function(e,n){return[e,n]=Et(e,n,S_),V.createElement(j3,{content:V.createElement(wm,e)},r=>V.createElement($_,{props:e,collection:r,gridListRef:n}))});function $_({props:t,collection:e,gridListRef:n}){[t,n]=Et(t,n,Vc);let{shouldUseVirtualFocus:r,filter:i,disallowTypeAhead:s,UNSTABLE_focusOnEntry:a,...u}=t,{dragAndDropHooks:c,keyboardNavigationBehavior:f="arrow",layout:h="stack",orientation:m="vertical"}=t,{CollectionRoot:g,isVirtualized:b,layoutDelegate:x,dropTargetDelegate:k}=S.useContext(Vs),E=eK({...u,collection:e,children:void 0,layoutDelegate:x}),D=tK(E,i),T=Q3({usage:"search",sensitivity:"base"}),{disabledBehavior:$,disabledKeys:A}=D.selectionManager,{direction:B}=Ki(),R=S.useMemo(()=>new q6({collection:D.collection,collator:T,ref:n,disabledKeys:A,disabledBehavior:$,layoutDelegate:x,layout:h,orientation:m,direction:B}),[D.collection,n,h,m,A,$,x,T,B]),{gridProps:M}=x_({...u,keyboardDelegate:R,keyboardNavigationBehavior:h==="grid"?"tab":f,isVirtualized:b,shouldSelectOnPressUp:t.shouldSelectOnPressUp,disallowTypeAhead:s,UNSTABLE_focusOnEntry:a},D,n),O=D.selectionManager,j=!!c?.useDraggableCollectionState,q=!!c?.useDroppableCollectionState;S.useRef(j),S.useRef(q),S.useEffect(()=>{},[j,q]);let X,G,Z,F=!1,te=null,P=S.useRef(null);if(j&&c){X=c.useDraggableCollectionState({collection:D.collection,selectionManager:O,preview:c.renderDragPreview?P:void 0}),c.useDraggableCollection({},X,n);let he=c.DragPreview;te=c.renderDragPreview?V.createElement(he,{ref:P},c.renderDragPreview):null}if(q&&c){G=c.useDroppableCollectionState({collection:D.collection,selectionManager:O});let he=c.dropTargetDelegate||k||new c.ListDropTargetDelegate(e,n,{layout:h,direction:B,orientation:m});Z=c.useDroppableCollection({keyboardDelegate:R,dropTargetDelegate:he},G,n),F=G.isDropTarget({type:"root"})}let{focusProps:_,isFocused:W,isFocusVisible:ee}=Li(),z=D.collection.size===0,L={isDropTarget:F,orientation:m,isEmpty:z,isFocused:W,isFocusVisible:ee,layout:h,state:D},H=$t({...t,children:void 0,defaultClassName:"react-aria-GridList",values:L}),ie=null,le=null;if(z&&t.renderEmptyState){let he=t.renderEmptyState(L);ie=V.createElement("div",{role:"row","aria-rowindex":1,style:{display:"contents"}},V.createElement("div",{role:"gridcell",style:{display:"contents"}},he))}let de=Ze(t,{global:!0});return V.createElement(G3,null,V.createElement(ot.div,{...we(de,H,M,_,Z?.collectionProps,le),ref:n,slot:t.slot||void 0,onScroll:t.onScroll,"data-drop-target":F||void 0,"data-empty":z||void 0,"data-focused":W||void 0,"data-focus-visible":ee||void 0,"data-layout":h,"data-orientation":m},V.createElement(Nr,{values:[[qc,D],[Am,{dragAndDropHooks:c,dragState:X,dropState:G}],[I6,{render:A_}]]},q&&V.createElement(N_,null),V.createElement(U3,null,V.createElement(g,{collection:D.collection,scrollRef:n,persistedKeys:$F(O,c,G),renderDropIndicator:wF(c,G)}))),ie,te))}const T_=da(op,function(e,n,r){let i=S.useContext(qc),{dragAndDropHooks:s,dragState:a,dropState:u}=S.useContext(Am),c=Js(n),{isVirtualized:f}=S.useContext(Vs),h=a&&!(a.isDisabled||a.selectionManager.isDisabled(r.key)),{rowProps:m,gridCellProps:g,descriptionProps:b,...x}=v_({node:r,shouldSelectOnPressUp:!!a,isVirtualized:f},i,c),{hoverProps:k,isHovered:E}=_i({isDisabled:!x.allowsSelection&&!x.hasAction&&!h,onHoverStart:r.props.onHoverStart,onHoverChange:r.props.onHoverChange,onHoverEnd:r.props.onHoverEnd}),{isFocusVisible:D,focusProps:T}=Li(),{isFocusVisible:$,focusProps:A}=Li({within:!0}),{checkboxProps:B}=D_({key:r.key},i),R=i.selectionManager.disabledBehavior==="all"&&x.isDisabled?{isDisabled:!0}:{},M=null;a&&s&&(M=s.useDraggableItem({key:r.key,hasDragButton:!0},a));let O=null,j=S.useRef(null),{visuallyHiddenProps:q}=Tm();u&&s&&(O=s.useDropIndicator({target:{type:"item",key:r.key,dropPosition:"on"}},u,j));let X=a&&a.isDragging(r.key),G=$t({...e,id:void 0,children:r.rendered,defaultClassName:"react-aria-GridListItem",values:{...x,isHovered:E,isFocusVisible:D,isFocusVisibleWithin:$,selectionMode:i.selectionManager.selectionMode,selectionBehavior:i.selectionManager.selectionBehavior,allowsDragging:!!a,isDragging:X,isDropTarget:O?.isDropTarget,id:r.key,state:i}}),Z=S.useRef(null);S.useEffect(()=>{a&&!Z.current&&console.warn('Draggable items in a GridList must contain a <Button slot="drag"> element so that keyboard and screen reader users can drag them.')},[]),S.useEffect(()=>{r.textValue},[r.textValue]);let F=Ze(e,{global:!0});return delete F.id,delete F.onClick,V.createElement(V.Fragment,null,O&&!O.isHidden&&V.createElement("div",{role:"row",style:{position:"absolute"}},V.createElement("div",{role:"gridcell"},V.createElement("div",{role:"button",...q,...O?.dropIndicatorProps,ref:j}))),V.createElement(ot.div,{...we(F,G,m,T,A,k,M?.dragProps),ref:c,"data-selected":x.isSelected||void 0,"data-disabled":x.isDisabled||void 0,"data-hovered":E||void 0,"data-focused":x.isFocused||void 0,"data-focus-visible":D||void 0,"data-focus-visible-within":$||void 0,"data-pressed":x.isPressed||void 0,"data-allows-dragging":!!a||void 0,"data-dragging":X||void 0,"data-drop-target":O?.isDropTarget||void 0,"data-selection-mode":i.selectionManager.selectionMode==="none"?void 0:i.selectionManager.selectionMode},V.createElement("div",{...g,style:{display:"contents"}},V.createElement(Nr,{values:[[kF,{slots:{[Ts]:{},selection:B}}],[CF,{slots:{[Ts]:{},selection:B}}],[$m,{slots:{[Ts]:R,drag:{...M?.dragButtonProps,ref:Z,style:{pointerEvents:"none"}}}}],[H3,{slots:{[Ts]:{},description:b}}],[Vs,H$],[qc,null],[Vc,null],[Em,null],[q3,{isSelected:x.isSelected}]]},G.children))))});function A_(t,e){e=Js(e);let{dragAndDropHooks:n,dropState:r}=S.useContext(Am),i=S.useRef(null),{dropIndicatorProps:s,isHidden:a,isDropTarget:u}=n.useDropIndicator(t,r,i);return a?null:V.createElement(M_,{...t,dropIndicatorProps:s,isDropTarget:u,buttonRef:i,ref:e})}function B_(t,e){let{dropIndicatorProps:n,isDropTarget:r,buttonRef:i,...s}=t,{visuallyHiddenProps:a}=Tm(),u=$t({...s,defaultClassName:"react-aria-DropIndicator",values:{isDropTarget:r}});return V.createElement(ot.div,{...u,role:"row",ref:e,"data-drop-target":r||void 0},V.createElement("div",{role:"gridcell"},V.createElement("div",{...a,role:"button",...n,ref:i}),u.children))}const M_=S.forwardRef(B_);function N_(){let{dragAndDropHooks:t,dropState:e}=S.useContext(Am),n=S.useRef(null),{dropIndicatorProps:r}=t.useDropIndicator({target:{type:"root"}},e,n),i=e.isDropTarget({type:"root"}),{visuallyHiddenProps:s}=Tm();return!i&&r["aria-hidden"]?null:V.createElement("div",{role:"row","aria-hidden":r["aria-hidden"],style:{position:"absolute"}},V.createElement("div",{role:"gridcell"},V.createElement("div",{role:"button",...s,...r,ref:n})))}da(sp,function(e,n,r){let i=S.useContext(qc),{isVirtualized:s}=S.useContext(Vs),{isLoading:a,onLoadMore:u,scrollOffset:c,...f}=e,h=S.useRef(null),m=S.useMemo(()=>({onLoadMore:u,collection:i?.collection,sentinelRef:h,scrollOffset:c}),[u,c,i?.collection]);eT(m,h);let g=$t({...f,id:void 0,children:r.rendered,defaultClassName:"react-aria-GridListLoadingIndicator",values:void 0});return V.createElement(V.Fragment,null,V.createElement("div",{style:{position:"relative",width:0,height:0},inert:X6(!0)},V.createElement("div",{"data-testid":"loadMoreSentinel",ref:h,style:{position:"absolute",height:1,width:1}})),a&&g.children&&V.createElement(ot.div,{...g,...Ze(e,{global:!0}),role:"row",ref:n},V.createElement("div",{"aria-colindex":s?1:void 0,role:"gridcell"},g.children)))});function R_(t,e,n){let{overlayProps:r,underlayProps:i}=rT({...t,isOpen:e.isOpen,onClose:e.close},n);return iT({isDisabled:!e.isOpen}),_T(),S.useEffect(()=>{if(e.isOpen&&n.current)return X3([n.current],{shouldUseInert:!0})},[e.isOpen,n]),{modalProps:we(r),underlayProps:i}}let Rn=typeof document<"u"&&window.visualViewport;function O_(){let t=Xs(),[e,n]=S.useState(()=>t?{width:0,height:0}:Gb());return S.useEffect(()=>{let r=u=>{n(c=>u.width===c.width&&u.height===c.height?c:u)},i=()=>{Rn&&Rn.scale>1||r(Gb())},s,a=u=>{Rn&&Rn.scale>1||vc(ce(u))&&(s=requestAnimationFrame(()=>{let c=_e();(!c||!vc(c))&&r({width:document.documentElement.clientWidth,height:document.documentElement.clientHeight})}))};return r(Gb()),Pi()&&window.addEventListener("blur",a,!0),Rn?Rn.addEventListener("resize",i):window.addEventListener("resize",i),()=>{cancelAnimationFrame(s),Pi()&&window.removeEventListener("blur",a,!0),Rn?Rn.removeEventListener("resize",i):window.removeEventListener("resize",i)}},[]),e}function Gb(){return{width:Rn?Math.min(Rn.width*Rn.scale,document.documentElement.clientWidth):document.documentElement.clientWidth,height:Rn?Rn.height*Rn.scale:document.documentElement.clientHeight}}const P_=S.createContext(null),ux=S.createContext(null),z_=S.forwardRef(function(e,n){if(S.useContext(ux))return V.createElement(fE,{...e,modalRef:n},e.children);let{isDismissable:i,isKeyboardDismissDisabled:s,isOpen:a,defaultOpen:u,onOpenChange:c,children:f,isEntering:h,isExiting:m,UNSTABLE_portalContainer:g,shouldCloseOnInteractOutside:b,...x}=e;return V.createElement(e9,{isDismissable:i,isKeyboardDismissDisabled:s,isOpen:a,defaultOpen:u,onOpenChange:c,isEntering:h,isExiting:m,UNSTABLE_portalContainer:g,shouldCloseOnInteractOutside:b},V.createElement(fE,{...x,modalRef:n},f))});function L_(t,e){[t,e]=Et(t,e,P_);let n=S.useContext(fa),r=J3(t),i=t.isOpen!=null||t.defaultOpen!=null||!n?r:n,s=Js(e),a=S.useRef(null),u=m4(s,i.isOpen),c=m4(a,i.isOpen),f=u||c||t.isExiting||!1,h=Xs();return!i.isOpen&&!f||h?null:V.createElement(I_,{...t,state:i,isExiting:f,overlayRef:s,modalRef:a})}const e9=S.forwardRef(L_);function I_({UNSTABLE_portalContainer:t,...e}){let n=e.modalRef,{state:r}=e,{modalProps:i,underlayProps:s}=R_(e,r,n),a=Z3(e.overlayRef)||e.isEntering||!1,u=$t({...e,defaultClassName:"react-aria-ModalOverlay",values:{isEntering:a,isExiting:e.isExiting,state:r}}),c=O_(),f,h;if(typeof document<"u"){let g=Hs(document.body)?document.body:document.scrollingElement||document.documentElement,b=g.getBoundingClientRect().width%1,x=g.getBoundingClientRect().height%1;f=g.scrollWidth-b,h=g.scrollHeight-x}let m={...u.style,"--visual-viewport-width":c.width+"px","--visual-viewport-height":c.height+"px","--page-width":f!==void 0?f+"px":void 0,"--page-height":h!==void 0?h+"px":void 0};return V.createElement(p4,{isExiting:e.isExiting,portalContainer:t},V.createElement(ot.div,{...we(Ze(e,{global:!0}),s),...u,style:m,ref:e.overlayRef,"data-entering":a||void 0,"data-exiting":e.isExiting||void 0},V.createElement(Nr,{values:[[ux,{modalProps:i,modalRef:n,isExiting:e.isExiting,isDismissable:e.isDismissable}],[fa,r]]},u.children)))}function fE(t){let{modalProps:e,modalRef:n,isExiting:r,isDismissable:i}=S.useContext(ux),s=S.useContext(fa),a=S.useMemo(()=>pd(t.modalRef,n),[t.modalRef,n]),u=Js(a),c=Z3(u),f=$t({...t,defaultClassName:"react-aria-Modal",values:{isEntering:c,isExiting:r,state:s}});return V.createElement(ot.div,{...we(Ze(t,{global:!0}),e),...f,ref:u,"data-entering":c||void 0,"data-exiting":r||void 0},i&&V.createElement(h4,{onDismiss:s.close}),f.children)}var t9={};t9={"Clear search":"مسح البحث"};var n9={};n9={"Clear search":"Изчистване на търсене"};var r9={};r9={"Clear search":"Vymazat hledání"};var i9={};i9={"Clear search":"Ryd søgning"};var s9={};s9={"Clear search":"Suche zurücksetzen"};var o9={};o9={"Clear search":"Απαλοιφή αναζήτησης"};var a9={};a9={"Clear search":"Clear search"};var l9={};l9={"Clear search":"Borrar búsqueda"};var u9={};u9={"Clear search":"Tühjenda otsing"};var c9={};c9={"Clear search":"Tyhjennä haku"};var d9={};d9={"Clear search":"Effacer la recherche"};var f9={};f9={"Clear search":"נקה חיפוש"};var h9={};h9={"Clear search":"Obriši pretragu"};var p9={};p9={"Clear search":"Keresés törlése"};var m9={};m9={"Clear search":"Cancella ricerca"};var g9={};g9={"Clear search":"検索をクリア"};var b9={};b9={"Clear search":"검색 지우기"};var y9={};y9={"Clear search":"Išvalyti iešką"};var x9={};x9={"Clear search":"Notīrīt meklēšanu"};var v9={};v9={"Clear search":"Tøm søk"};var k9={};k9={"Clear search":"Zoekactie wissen"};var C9={};C9={"Clear search":"Wyczyść zawartość wyszukiwania"};var E9={};E9={"Clear search":"Limpar pesquisa"};var D9={};D9={"Clear search":"Limpar pesquisa"};var S9={};S9={"Clear search":"Ştergeţi căutarea"};var w9={};w9={"Clear search":"Очистить поиск"};var $9={};$9={"Clear search":"Vymazať vyhľadávanie"};var T9={};T9={"Clear search":"Počisti iskanje"};var A9={};A9={"Clear search":"Obriši pretragu"};var B9={};B9={"Clear search":"Rensa sökning"};var M9={};M9={"Clear search":"Aramayı temizle"};var N9={};N9={"Clear search":"Очистити пошук"};var R9={};R9={"Clear search":"清除搜索"};var O9={};O9={"Clear search":"清除搜尋條件"};var P9={};P9={"ar-AE":t9,"bg-BG":n9,"cs-CZ":r9,"da-DK":i9,"de-DE":s9,"el-GR":o9,"en-US":a9,"es-ES":l9,"et-EE":u9,"fi-FI":c9,"fr-FR":d9,"he-IL":f9,"hr-HR":h9,"hu-HU":p9,"it-IT":m9,"ja-JP":g9,"ko-KR":b9,"lt-LT":y9,"lv-LV":x9,"nb-NO":v9,"nl-NL":k9,"pl-PL":C9,"pt-BR":E9,"pt-PT":D9,"ro-RO":S9,"ru-RU":w9,"sk-SK":$9,"sl-SI":T9,"sr-SP":A9,"sv-SE":B9,"tr-TR":M9,"uk-UA":N9,"zh-CN":R9,"zh-TW":O9};function j_(t){return t&&t.__esModule?t.default:t}function F_(t,e,n){let r=gr(j_(P9),"@react-aria/searchfield"),{isDisabled:i,isReadOnly:s,onSubmit:a,onClear:u,type:c="search"}=t,f=D=>{const T=D.key;T==="Enter"&&(i||s)&&D.preventDefault(),!(i||s)&&(T==="Enter"&&a&&(D.preventDefault(),a(e.value)),T==="Escape"&&(e.value===""&&(!n.current||n.current.value==="")?D.continuePropagation():(D.preventDefault(),e.setValue(""),u&&u())))},h=()=>{e.setValue(""),u&&u()},m=()=>{n.current?.focus()},{labelProps:g,inputProps:b,descriptionProps:x,errorMessageProps:k,...E}=SF({...t,value:e.value,onChange:e.setValue,onKeyDown:s?t.onKeyDown:Ys(f,t.onKeyDown),type:c},n);return{labelProps:g,inputProps:{...b,defaultValue:void 0},clearButtonProps:{"aria-label":r.format("Clear search"),excludeFromTabOrder:!0,preventFocusOnPress:!0,isDisabled:i||s,onPress:h,onPressStart:m},descriptionProps:x,errorMessageProps:k,...E}}function K_(t){let[e,n]=Zs(hE(t.value),hE(t.defaultValue)||"",t.onChange);return{value:e,setValue:n}}function hE(t){if(t!=null)return t.toString()}const __=S.createContext(null),V_=Sm(function(e,n){[e,n]=Et(e,n,__);let{validationBehavior:r}=Kl(hF)||{},i=e.validationBehavior??r??"native",s=S.useRef(null);[e,s]=Et(e,s,Em);let[a,u]=Bw(!e["aria-label"]&&!e["aria-labelledby"]),c=K_({...e,validationBehavior:i}),{labelProps:f,inputProps:h,clearButtonProps:m,descriptionProps:g,errorMessageProps:b,...x}=F_({...Mw(e),label:u,validationBehavior:i},c,s),k=$t({...e,values:{isEmpty:c.value==="",isDisabled:e.isDisabled||!1,isInvalid:x.isInvalid||!1,isReadOnly:e.isReadOnly||!1,isRequired:e.isRequired||!1,state:c},defaultClassName:"react-aria-SearchField"}),E=Ze(e,{global:!0});return delete E.id,V.createElement(ot.div,{...E,...k,ref:n,slot:e.slot||void 0,"data-empty":c.value===""||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":x.isInvalid||void 0,"data-readonly":e.isReadOnly||void 0,"data-required":e.isRequired||void 0},V.createElement(Nr,{values:[[V3,{...f,ref:a}],[z6,{...h,ref:s}],[$m,m],[H3,{slots:{description:g,errorMessage:b}}],[P6,{isInvalid:x.isInvalid,isDisabled:e.isDisabled||!1}],[lF,x]]},k.children))}),H_=S.createContext({});let U_=t=>{let{onHoverStart:e,onHoverChange:n,onHoverEnd:r,...i}=t;return i};const q_=S.forwardRef(function(e,n){[e,n]=Et(e,n,H_);let{hoverProps:r,isHovered:i}=_i(e),{isFocused:s,isFocusVisible:a,focusProps:u}=Li({isTextInput:!0,autoFocus:e.autoFocus}),c=!!e["aria-invalid"]&&e["aria-invalid"]!=="false",f=$t({...e,values:{isHovered:i,isFocused:s,isFocusVisible:a,isDisabled:e.disabled||!1,isInvalid:c},defaultClassName:"react-aria-TextArea"});return V.createElement(ot.textarea,{...we(U_(e),u,r),...f,ref:n,"data-focused":s||void 0,"data-disabled":e.disabled||void 0,"data-hovered":i||void 0,"data-focus-visible":a||void 0,"data-invalid":c||void 0})});function z9(t,e,n){const{isSelected:r}=e,{isPressed:i,buttonProps:s}=B6({...t,onPress:Ys(e.toggle,t.onPress)},n);return{isPressed:i,isSelected:r,isDisabled:t.isDisabled||!1,buttonProps:we(s,{"aria-pressed":r})}}function G_(t,e){const{"aria-label":n,"aria-labelledby":r,orientation:i="horizontal"}=t;let[s,a]=S.useState(!1);Ie(()=>{a(!!(e.current&&e.current.parentElement?.closest('[role="toolbar"]')))});const{direction:u}=Ki(),c=u==="rtl"&&i==="horizontal";let f=KF(e);const h=x=>{if(Se(x.currentTarget,ce(x))){if(i==="horizontal"&&x.key==="ArrowRight"||i==="vertical"&&x.key==="ArrowDown")c?f.focusPrevious():f.focusNext();else if(i==="horizontal"&&x.key==="ArrowLeft"||i==="vertical"&&x.key==="ArrowUp")c?f.focusNext():f.focusPrevious();else if(x.key==="Tab"){m.current=_e(),x.shiftKey?f.focusFirst():f.focusLast();return}else return;x.stopPropagation(),x.preventDefault()}},m=S.useRef(null),g=x=>{!Se(x.currentTarget,x.relatedTarget)&&!m.current&&(m.current=ce(x))},b=x=>{m.current&&!Se(x.currentTarget,x.relatedTarget)&&Se(e.current,ce(x))&&(m.current?.focus(),m.current=null)};return{toolbarProps:{...Ze(t,{labelable:!0}),role:s?"group":"toolbar","aria-orientation":i,"aria-label":n,"aria-labelledby":n==null?r:void 0,onKeyDownCapture:s?void 0:h,onFocusCapture:s?void 0:b,onBlurCapture:s?void 0:g}}}function W_(t,e,n){let{isDisabled:r}=t,{toolbarProps:i}=G_(t,n);return{groupProps:{...i,role:e.selectionMode==="single"?"radiogroup":i.role,"aria-disabled":r}}}function Q_(t,e,n){let r={isSelected:e.selectedKeys.has(t.id),defaultSelected:!1,setSelected(c){e.setSelected(t.id,c)},toggle(){e.toggleKey(t.id)}},{isPressed:i,isSelected:s,isDisabled:a,buttonProps:u}=z9({...t,id:void 0,isDisabled:t.isDisabled||e.isDisabled},r,n);return e.selectionMode==="single"&&(u.role="radio",u["aria-checked"]=r.isSelected,delete u["aria-pressed"]),{isPressed:i,isSelected:s,isDisabled:a,buttonProps:u}}function Y_(t){let{selectionMode:e="single",disallowEmptySelection:n,isDisabled:r=!1}=t,[i,s]=Zs(S.useMemo(()=>t.selectedKeys?new Set(t.selectedKeys):void 0,[t.selectedKeys]),S.useMemo(()=>t.defaultSelectedKeys?new Set(t.defaultSelectedKeys):new Set,[t.defaultSelectedKeys]),t.onSelectionChange);return{selectionMode:e,isDisabled:r,selectedKeys:i,setSelectedKeys:s,toggleKey(a){let u;e==="multiple"?(u=new Set(i),u.has(a)&&(!n||u.size>1)?u.delete(a):u.add(a)):u=new Set(i.has(a)&&!n?[]:[a]),s(u)},setSelected(a,u){u!==i.has(a)&&this.toggleKey(a)}}}const X_=S.createContext({}),L9=S.createContext(null),J_=S.forwardRef(function(e,n){[e,n]=Et(e,n,X_);let r=Y_(e),{groupProps:i}=W_(e,r,n),s=$t({...e,values:{orientation:e.orientation||"horizontal",isDisabled:r.isDisabled,state:r},defaultClassName:"react-aria-ToggleButtonGroup"}),a=Ze(e,{global:!0});return V.createElement(ot.div,{...we(a,s,i),ref:n,slot:e.slot||void 0,"data-orientation":e.orientation||"horizontal","data-disabled":e.isDisabled||void 0},V.createElement(L9.Provider,{value:r},V.createElement(U3,null,s.children)))}),Z_=S.createContext({}),eV=S.forwardRef(function(e,n){[e,n]=Et(e,n,Z_);let r=S.useContext(L9),i=vF(r&&e.id!=null?{isSelected:r.selectedKeys.has(e.id),onChange(E){r.setSelected(e.id,E)}}:e),{buttonProps:s,isPressed:a,isSelected:u,isDisabled:c}=r&&e.id!=null?Q_({...e,id:e.id},r,n):z9({...e,id:e.id!=null?String(e.id):void 0},i,n),{focusProps:f,isFocused:h,isFocusVisible:m}=Li(e),{hoverProps:g,isHovered:b}=_i({...e,isDisabled:c}),x=$t({...e,id:void 0,values:{isHovered:b,isPressed:a,isFocused:h,isSelected:i.isSelected,isFocusVisible:m,isDisabled:c,state:i},defaultClassName:"react-aria-ToggleButton"}),k=Ze(e,{global:!0});return delete k.id,delete k.onClick,V.createElement(ot.button,{...we(k,x,s,f,g),ref:n,slot:e.slot||void 0,"data-focused":h||void 0,"data-disabled":c||void 0,"data-pressed":a||void 0,"data-selected":u||void 0,"data-hovered":b||void 0,"data-focus-visible":m||void 0},V.createElement(q3.Provider,{value:{isSelected:u}},x.children))});function tV(t,e,n,r,i=!1,s=!1){switch(r){case"left":return i?Wb(t,e,n,s,"left"):Qb(t,e,n,s,"left");case"right":return i?Qb(t,e,n,s,"right"):Wb(t,e,n,s,"right");case"up":return Qb(t,e,n,s);case"down":return Wb(t,e,n,s)}}function Wb(t,e,n,r=!1,i=null){if(!n)return{type:"root"};if(n.type==="root"){let s=t.getFirstKey?.()??null;return s!=null?{type:"item",key:s,dropPosition:"before"}:null}if(n.type==="item"){let s=null;i?s=i==="right"?t.getKeyRightOf?.(n.key,{includeDisabled:!0}):t.getKeyLeftOf?.(n.key,{includeDisabled:!0}):s=t.getKeyBelow?.(n.key,{includeDisabled:!0});let a=cx(e,n.key,u=>e.getKeyAfter(u));if(s!=null&&s!==a)return{type:"item",key:s,dropPosition:n.dropPosition};switch(n.dropPosition){case"before":return{type:"item",key:n.key,dropPosition:"on"};case"on":{let u=e.getItem(n.key),c=s!=null?e.getItem(s):null;return u&&c&&c.level>=u.level?{type:"item",key:c.key,dropPosition:"before"}:{type:"item",key:n.key,dropPosition:"after"}}case"after":{let u=e.getItem(n.key),c=u?.nextKey!=null?e.getItem(u.nextKey):null;for(;c!=null&&c.type!=="item";)c=c.nextKey!=null?e.getItem(c.nextKey):null;if(u&&c==null&&u.parentKey!=null){let f=e.getItem(u.parentKey);const h=f?.nextKey!=null?e.getItem(f.nextKey):null;if(h?.type==="item")return{type:"item",key:h.key,dropPosition:"before"};if(f?.type==="item")return{type:"item",key:f.key,dropPosition:"after"}}if(c)return{type:"item",key:c.key,dropPosition:"on"}}}}return r?{type:"root"}:null}function Qb(t,e,n,r=!1,i=null){if(!n||r&&n.type==="root"){let s=null,a=t.getLastKey?.();for(;a!=null;){let u=e.getItem(a);if(u?.type!=="item")break;s=a,a=u?.parentKey}return s!=null?{type:"item",key:s,dropPosition:"after"}:null}if(n.type==="item"){let s=null;i?s=i==="left"?t.getKeyLeftOf?.(n.key,{includeDisabled:!0}):t.getKeyRightOf?.(n.key,{includeDisabled:!0}):s=t.getKeyAbove?.(n.key,{includeDisabled:!0});let a=cx(e,n.key,u=>e.getKeyBefore(u));if(s!=null&&s!==a)return{type:"item",key:s,dropPosition:n.dropPosition};switch(n.dropPosition){case"before":{let u=e.getItem(n.key);if(u&&u.prevKey!=null){let c=pE(e,u.prevKey);if(c)return c}return s!=null?{type:"item",key:s,dropPosition:"on"}:{type:"root"}}case"on":return{type:"item",key:n.key,dropPosition:"before"};case"after":{let u=pE(e,n.key);return u||{type:"item",key:n.key,dropPosition:"on"}}}}return n.type!=="root"?{type:"root"}:null}function pE(t,e){let n=t.getItem(e),r=cx(t,e,s=>t.getKeyAfter(s)),i=r!=null?t.getItem(r):null;if(n&&i&&i.level>n.level){let s=null;if("lastChildKey"in n)for(s=n.lastChildKey!=null?t.getItem(n.lastChildKey):null;s&&s.type!=="item"&&s.prevKey!=null;)s=t.getItem(s.prevKey);else s=Array.from(n.childNodes).findLast(a=>a.type==="item")||null;if(s)return{type:"item",key:s.key,dropPosition:"after"}}return null}function cx(t,e,n){let r=n(e),i=r!=null?t.getItem(r):null;for(;i&&i.type!=="item";)r=n(i.key),i=r!=null?t.getItem(r):null;return r}const ch=20;function nV(t){let e=S.useRef(null),n=S.useRef(!0),r=S.useRef(!0);S.useEffect(()=>{if(t.current){e.current=Hs(t.current)?t.current:Ur(t.current);let a=window.getComputedStyle(e.current);n.current=/(auto|scroll)/.test(a.overflowX),r.current=/(auto|scroll)/.test(a.overflowY)}},[t]);let i=S.useRef({timer:void 0,dx:0,dy:0}).current;S.useEffect(()=>()=>{i.timer&&(cancelAnimationFrame(i.timer),i.timer=void 0)},[i]);let s=S.useCallback(()=>{n.current&&e.current&&(e.current.scrollLeft+=i.dx),r.current&&e.current&&(e.current.scrollTop+=i.dy),i.timer&&(i.timer=requestAnimationFrame(s))},[e,i]);return{move(a,u){if(!O3()||Pi()||!e.current)return;let c=e.current.getBoundingClientRect(),f=ch,h=ch,m=c.height-ch,g=c.width-ch;a<f||a>g||u<h||u>m?(a<f?i.dx=a-f:a>g&&(i.dx=a-g),u<h?i.dy=u-h:u>m&&(i.dy=u-m),i.timer||(i.timer=requestAnimationFrame(s))):this.stop()},stop(){i.timer&&(cancelAnimationFrame(i.timer),i.timer=void 0)}}}function rV(t,e,n){let r=S.useRef({props:t,state:e,nextTarget:null,dropOperation:null}).current;r.props=t,r.state=e;let i=S.useCallback(async g=>{let{onInsert:b,onRootDrop:x,onItemDrop:k,onReorder:E,onMove:D,acceptedDragTypes:T="all",shouldAcceptItemDrop:$}=r.props,{draggingKeys:A}=Kt,B=Hr(n),{target:R,dropOperation:M,items:O}=g,j=O;(T!=="all"||$)&&(j=O.filter(q=>{let X;return q.kind==="directory"?X=new Set([RA]):X=q.kind==="file"?new Set([q.type]):q.types,T==="all"||T.some(G=>X.has(G))?R.type==="item"&&R.dropPosition==="on"&&$?$(R,X):!0:!1})),j.length>0&&(R.type==="root"&&x&&await x({items:j,dropOperation:M}),R.type==="item"&&(R.dropPosition==="on"&&k&&await k({items:j,dropOperation:M,isInternal:B,target:R}),D&&B&&await D({keys:A,dropOperation:M,target:R}),R.dropPosition!=="on"&&(!B&&b&&await b({items:j,dropOperation:M,target:R}),B&&E&&await E({keys:A,dropOperation:M,target:R}))))},[r,n]),s=nV(n),{dropProps:a}=f_({ref:n,onDropEnter(){r.nextTarget!=null&&e.setTarget(r.nextTarget)},onDropMove(g){r.nextTarget!=null&&e.setTarget(r.nextTarget),s.move(g.x,g.y)},getDropOperationForPoint(g,b,x,k){let{draggingKeys:E,dropCollectionRef:D}=Kt,T=Hr(n),$=B=>e.getDropOperation({target:B,types:g,allowedOperations:b,isInternal:T,draggingKeys:E})!=="cancel",A=t.dropTargetDelegate.getDropTargetFromPoint(x,k,$);if(!A)return r.dropOperation="cancel",r.nextTarget=null,"cancel";if(r.dropOperation=e.getDropOperation({target:A,types:g,allowedOperations:b,isInternal:T,draggingKeys:E}),r.dropOperation==="cancel"){let B={type:"root"},R=e.getDropOperation({target:B,types:g,allowedOperations:b,isInternal:T,draggingKeys:E});R!=="cancel"&&(A=B,r.dropOperation=R)}return A&&r.dropOperation!=="cancel"&&n?.current!==D?.current&&ll(n),r.nextTarget=r.dropOperation==="cancel"?null:A,r.dropOperation},onDropExit(){ll(void 0),e.setTarget(null),s.stop()},onDropActivate(g){e.target?.type==="item"&&typeof t.onDropActivate=="function"&&t.onDropActivate({type:"dropactivate",x:g.x,y:g.y,target:e.target})},onDrop(g){ll(n),e.target&&f(g,e.target);let{draggingCollectionRef:b}=Kt;b==null&&LA()}}),u=S.useRef(null),c=S.useCallback(()=>{let{state:g}=r;if(u.current){let{target:b,collection:x,selectedKeys:k,focusedKey:E,isInternal:D,draggingKeys:T}=u.current;if(g.collection.size>x.size&&g.selectionManager.isSelectionEqual(k)){let $=new Set,A=g.collection.getFirstKey();for(;A!=null;){let B=g.collection.getItem(A);B?.type==="item"&&!x.getItem(B.key)&&$.add(B.key),B?.hasChildNodes&&g.collection.getItem(B.lastChildKey)?.type==="item"?A=B.firstChildKey:A=g.collection.getKeyAfter(A)}if(g.selectionManager.setSelectedKeys($),g.selectionManager.focusedKey===E){let B=$.keys().next().value;if(B!=null){let R=g.collection.getItem(B),M=u.current.target,O=g.collection.expandedKeys?g.collection.expandedKeys.has(R?.parentKey):!1;R&&(R?.type==="cell"||M.type==="item"&&M.dropPosition==="on"&&!O)&&(B=R.parentKey),B!=null&&g.selectionManager.setFocusedKey(B),g.selectionManager.selectionMode==="none"&&Oo("keyboard")}}}else E!=null&&g.selectionManager.focusedKey===E&&D&&b.type==="item"&&b.dropPosition!=="on"&&T.has(g.collection.getItem(E)?.parentKey)?(g.selectionManager.setFocusedKey(g.collection.getItem(E)?.parentKey??null),Oo("keyboard")):g.selectionManager.focusedKey===E&&b.type==="item"&&b.dropPosition==="on"&&g.collection.getItem(b.key)!=null?(g.selectionManager.setFocusedKey(b.key),Oo("keyboard")):g.selectionManager.focusedKey!=null&&!g.selectionManager.isSelected(g.selectionManager.focusedKey)&&Oo("keyboard");g.selectionManager.setFocused(!0)}},[r]),f=S.useCallback((g,b)=>{let{state:x}=r;u.current={timeout:void 0,focusedKey:x.selectionManager.focusedKey,collection:x.collection,selectedKeys:x.selectionManager.selectedKeys,draggingKeys:Kt.draggingKeys,isInternal:Hr(n),target:b},(r.props.onDrop||i)({type:"drop",x:g.x,y:g.y,target:b,items:g.items,dropOperation:g.dropOperation}),u.current.timeout=setTimeout(()=>{c(),u.current=null},50)},[r,i,n,c]);S.useEffect(()=>()=>{u.current&&clearTimeout(u.current.timeout)},[]),Ie(()=>{u.current&&e.collection!==u.current.collection&&c()});let{direction:h}=Ki();S.useEffect(()=>{if(!n.current)return;let g=(k,E=!0,D="down")=>tV(r.props.keyboardDelegate,r.state.collection,k,D,h==="rtl",E),b=(k,E=!0)=>g(k,E,"up"),x=(k,E,D,T,$=!0)=>{let A=0,B,{draggingKeys:R}=Kt,M=Hr(n);do{let O=T(k,$);if(!O)return null;k=O,B=r.state.getDropOperation({target:O,types:E,allowedOperations:D,isInternal:M,draggingKeys:R}),k.type==="root"&&A++}while(B==="cancel"&&!r.state.isDropTarget(k)&&A<2);return B==="cancel"?null:k};return IA({element:n.current,preventFocusOnDrop:!0,getDropOperation(k,E){if(r.state.target){let{draggingKeys:T}=Kt,$=Hr(n);return r.state.getDropOperation({target:r.state.target,types:k,allowedOperations:E,isInternal:$,draggingKeys:T})}return x(null,k,E,g)?"move":"cancel"},onDropEnter(k,E){let D=qo(E.items),T=r.state.selectionManager,$=null;ll(n);let A=T.focusedKey,B="after",R=A!=null?r.state.collection.getItem(A):null;if(R?.type==="cell"&&(A=R.parentKey),A!=null&&T.isSelected(A)&&(T.selectedKeys.size>1&&T.firstSelectedKey===A?B="before":A=T.lastSelectedKey),A!=null){$={type:"item",key:A,dropPosition:B};let{draggingKeys:M}=Kt,O=Hr(n);r.state.getDropOperation({target:$,types:D,allowedOperations:E.allowedDropOperations,isInternal:O,draggingKeys:M})==="cancel"&&($=x($,D,E.allowedDropOperations,g,!1)??x($,D,E.allowedDropOperations,b,!1))}$||($=x(null,D,E.allowedDropOperations,g)),r.state.setTarget($)},onDropExit(){ll(void 0),r.state.setTarget(null)},onDropTargetEnter(k){r.state.setTarget(k)},onDropActivate(k,E){E?.type==="item"&&E?.dropPosition==="on"&&typeof r.props.onDropActivate=="function"&&r.props.onDropActivate({type:"dropactivate",x:k.x,y:k.y,target:E})},onDrop(k,E){ll(n),r.state.target&&f(k,E||r.state.target)},onKeyDown(k,E){let{keyboardDelegate:D}=r.props,T=qo(E.items);switch(k.key){case"ArrowDown":if(D.getKeyBelow){let $=x(r.state.target,T,E.allowedDropOperations,(A,B)=>g(A,B,"down"));r.state.setTarget($)}break;case"ArrowUp":if(D.getKeyAbove){let $=x(r.state.target,T,E.allowedDropOperations,(A,B)=>g(A,B,"up"));r.state.setTarget($)}break;case"ArrowLeft":if(D.getKeyLeftOf){let $=x(r.state.target,T,E.allowedDropOperations,(A,B)=>g(A,B,"left"));r.state.setTarget($)}break;case"ArrowRight":if(D.getKeyRightOf){let $=x(r.state.target,T,E.allowedDropOperations,(A,B)=>g(A,B,"right"));r.state.setTarget($)}break;case"Home":if(D.getFirstKey){let $=x(null,T,E.allowedDropOperations,g);r.state.setTarget($)}break;case"End":if(D.getLastKey){let $=x(null,T,E.allowedDropOperations,b);r.state.setTarget($)}break;case"PageDown":if(D.getKeyPageBelow){let $=r.state.target;if(!$)$=x(null,T,E.allowedDropOperations,g);else{let A=D.getFirstKey?.();$.type==="item"&&(A=$.key);let B=null;A!=null&&(B=D.getKeyPageBelow(A));let R=$.type==="item"?$.dropPosition:"after";if((B==null||$.type==="item"&&$.key===D.getLastKey?.())&&(B=D.getLastKey?.()??null,R="after"),B==null)break;$={type:"item",key:B,dropPosition:R};let{draggingCollectionRef:M,draggingKeys:O}=Kt,j=M?.current===n?.current;r.state.getDropOperation({target:$,types:T,allowedOperations:E.allowedDropOperations,isInternal:j,draggingKeys:O})==="cancel"&&($=x($,T,E.allowedDropOperations,g,!1)??x($,T,E.allowedDropOperations,b,!1))}r.state.setTarget($??r.state.target)}break;case"PageUp":{if(!D.getKeyPageAbove)break;let $=r.state.target;if(!$)$=x(null,T,E.allowedDropOperations,b);else if($.type==="item"){if($.key===D.getFirstKey?.())$={type:"root"};else{let M=D.getKeyPageAbove($.key),O=$.dropPosition;if(M==null&&(M=D.getFirstKey?.(),O="before"),M==null)break;$={type:"item",key:M,dropPosition:O}}let{draggingKeys:A}=Kt,B=Hr(n);r.state.getDropOperation({target:$,types:T,allowedOperations:E.allowedDropOperations,isInternal:B,draggingKeys:A})==="cancel"&&($=x($,T,E.allowedDropOperations,b,!1)??x($,T,E.allowedDropOperations,g,!1))}r.state.setTarget($??r.state.target);break}}r.props.onKeyDown?.(k)}})},[r,n,f,h]);let m=an();return sx.set(e,{id:m,ref:n}),{collectionProps:we(a,{id:m,"aria-describedby":null})}}function I9(t,e,n){let{dropProps:r}=xB(),i=qK(e);S.useEffect(()=>{if(n.current)return t_({element:n.current,target:t.target,getDropOperation(h,m){let{draggingKeys:g}=Kt,b=Hr(i);return e.getDropOperation({target:t.target,types:h,allowedOperations:m,isInternal:b,draggingKeys:g})},activateButtonRef:t.activateButtonRef})},[n,t.target,e,i,t.activateButtonRef]);let s=ax(),{draggingKeys:a}=Kt,u=Hr(i),c=s&&e.getDropOperation({target:t.target,types:qo(s.dragTarget.items),allowedOperations:s.dragTarget.allowedDropOperations,isInternal:u,draggingKeys:a})!=="cancel",f=e.isDropTarget(t.target);return S.useEffect(()=>{s&&f&&n.current&&n.current.focus()},[f,s,n]),{dropProps:{...r,"aria-hidden":!s||c?void 0:"true"},isDropTarget:f}}function iV(t){return t&&t.__esModule?t.default:t}function sV(t,e,n){let{target:r}=t,{collection:i}=e,s=gr(iV(xd),"@react-aria/dnd"),a=ax(),{dropProps:u}=I9(t,e,n),c=an(),f=x=>x==null?"":i.getTextValue?.(x)??i.getItem(x)?.textValue??"",h="",m;if(r.type==="root")h=s.format("dropOnRoot"),m=`${c} ${UK(e)}`;else if(r.dropPosition==="on")h=s.format("dropOnItem",{itemText:f(r.key)});else{let x,k;if(r.dropPosition==="before"){let E=i.getItem(r.key)?.prevKey,D=E!=null?i.getItem(E):null;x=D?.type==="item"?D.key:null}else x=r.key;if(r.dropPosition==="after"){let E=i.getItem(r.key)?.nextKey,D=E!=null?i.getItem(E):null;k=D?.type==="item"?D.key:null}else k=r.key;x!=null&&k!=null?h=s.format("insertBetween",{beforeItemText:f(x),afterItemText:f(k)}):x!=null?h=s.format("insertAfter",{itemText:f(x)}):k!=null&&(h=s.format("insertBefore",{itemText:f(k)}))}let g=e.isDropTarget(r),b=a?u["aria-hidden"]:"true";return{dropIndicatorProps:{...u,id:c,"aria-roledescription":s.format("dropIndicator"),"aria-label":h,"aria-labelledby":m,"aria-hidden":b,tabIndex:-1},isDropTarget:g,isHidden:!g&&!!b}}function oV(t){return t&&t.__esModule?t.default:t}const mE={keyboard:{start:"dragDescriptionKeyboard",end:"endDragKeyboard"},touch:{start:"dragDescriptionTouch",end:"endDragTouch"},virtual:{start:"dragDescriptionVirtual",end:"endDragVirtual"}};function aV(t){let{hasDragButton:e,isDisabled:n}=t,r=gr(oV(xd),"@react-aria/dnd"),i=S.useRef({options:t,x:0,y:0}).current;i.options=t;let s=S.useRef(null),[a,u]=S.useState(!1),c=B=>{s.current=B,u(!!B)},{addGlobalListener:f,removeAllGlobalListeners:h}=md(),m=S.useRef(null),g=B=>{if(B.defaultPrevented)return;if(B.stopPropagation(),m.current==="virtual"){B.preventDefault(),E(ce(B)),m.current=null;return}typeof t.onDragStart=="function"&&t.onDragStart({type:"dragstart",x:B.clientX,y:B.clientY});let R=t.getItems();B.dataTransfer.clearData?.(),GK(B.dataTransfer,R);let M=Rt.all;if(typeof t.getAllowedDropOperations=="function"){let q=t.getAllowedDropOperations();M=Rt.none;for(let X of q)M|=Rt[X]||Rt.none}Ub(M);let O=MA[M]||"none";B.dataTransfer.effectAllowed=O==="cancel"?"none":O,typeof t.preview?.current=="function"&&t.preview.current(R,(q,X,G)=>{if(!q)return;let Z=q.getBoundingClientRect(),F=B.currentTarget.getBoundingClientRect(),te=B.clientX-F.x,P=B.clientY-F.y;(te>Z.width||P>Z.height)&&(te=Z.width/2,P=Z.height/2);let _=te,W=P;typeof X=="number"&&typeof G=="number"&&(_=X,W=G),_=Math.max(0,Math.min(_,Z.width)),W=Math.max(0,Math.min(W,Z.height));let ee=2*Math.round(Z.height/2);q.style.height=`${ee}px`,B.dataTransfer.setDragImage(q,_,W)}),f(window,"drop",q=>{q.preventDefault(),q.stopPropagation(),console.warn("Drags initiated from the React Aria useDrag hook may only be dropped on a target created with useDrop. This ensures that a keyboard and screen reader accessible alternative is available.")},{once:!0}),i.x=B.clientX,i.y=B.clientY;let j=ce(B);requestAnimationFrame(()=>{c(j)})},b=B=>{B.stopPropagation(),!(B.clientX===i.x&&B.clientY===i.y)&&(typeof t.onDragMove=="function"&&t.onDragMove({type:"dragmove",x:B.clientX,y:B.clientY}),i.x=B.clientX,i.y=B.clientY)},x=B=>{if(B.stopPropagation(),typeof t.onDragEnd=="function"){let R={type:"dragend",x:B.clientX,y:B.clientY,dropOperation:Cc[B.dataTransfer.dropEffect]};jh&&(R.dropOperation=Cc[jh]),t.onDragEnd(R)}c(null),h(),Ub(Rt.none),pp(void 0)};S.useEffect(()=>()=>{if(s.current&&(!s.current.isConnected||parseInt(S.version,10)<17)){if(typeof i.options.onDragEnd=="function"){let B={type:"dragend",x:0,y:0,dropOperation:Cc[jh||"none"]};i.options.onDragEnd(B)}c(null),Ub(Rt.none),pp(void 0)}},[i]);let k=B=>{B.pointerType!=="keyboard"&&B.pointerType!=="virtual"||E(B.target)},E=B=>{if(typeof i.options.onDragStart=="function"){let R=B.getBoundingClientRect();i.options.onDragStart({type:"dragstart",x:R.x+R.width/2,y:R.y+R.height/2})}n_({element:B,items:i.options.getItems(),allowedDropOperations:typeof i.options.getAllowedDropOperations=="function"?i.options.getAllowedDropOperations():["move","copy","link"],onDragEnd(R){c(null),typeof i.options.onDragEnd=="function"&&i.options.onDragEnd(R)}},r),c(B)},D=ox(),T=a?mE[D].end:mE[D].start,$=bd(r.format(T)),A={};return e||(A={...$,onPointerDown(B){if(m.current=P3(B.nativeEvent)?"virtual":B.pointerType,B.width<1&&B.height<1)m.current="virtual";else{let R=B.currentTarget.getBoundingClientRect(),M=B.clientX-R.x,O=B.clientY-R.y,j=R.width/2,q=R.height/2;Math.abs(M-j)<=.5&&Math.abs(O-q)<=.5?m.current="virtual":m.current=B.pointerType}},onKeyDownCapture(B){ce(B)===B.currentTarget&&B.key==="Enter"&&(B.preventDefault(),B.stopPropagation())},onKeyUpCapture(B){ce(B)===B.currentTarget&&B.key==="Enter"&&(B.preventDefault(),B.stopPropagation(),E(ce(B)))},onClick(B){(vm(B.nativeEvent)||m.current==="virtual")&&(B.preventDefault(),B.stopPropagation(),E(ce(B)))}}),n?{dragProps:{draggable:"false"},dragButtonProps:{},isDragging:!1}:{dragProps:{...A,draggable:"true",onDragStart:g,onDrag:b,onDragEnd:x},dragButtonProps:{...$,onPress:k},isDragging:a}}function lV(t){return t&&t.__esModule?t.default:t}const uV={keyboard:{selected:"dragSelectedKeyboard",notSelected:"dragDescriptionKeyboard"},touch:{selected:"dragSelectedLongPress",notSelected:"dragDescriptionLongPress"},virtual:{selected:"dragDescriptionVirtual",notSelected:"dragDescriptionVirtual"}};function cV(t,e){let n=gr(lV(xd),"@react-aria/dnd"),r=e.isDisabled||e.selectionManager.isDisabled(t.key),{dragProps:i,dragButtonProps:s}=aV({getItems(){return e.getItems(t.key)},preview:e.preview,getAllowedDropOperations:e.getAllowedDropOperations,hasDragButton:t.hasDragButton,onDragStart(b){e.startDrag(t.key,b),ZK(e.draggingKeys)},onDragMove(b){e.moveDrag(b)},onDragEnd(b){let{dropOperation:x}=b,k=x==="cancel"?!1:Hr();e.endDrag({...b,keys:e.draggingKeys,isInternal:k}),LA()}}),a=e.collection.getItem(t.key),u=e.getKeysForDrag(t.key).size,c=u>1&&e.selectionManager.isSelected(t.key),f,h,m=ox();if(!t.hasDragButton&&e.selectionManager.selectionMode!=="none"){let b=uV[m][c?"selected":"notSelected"];t.hasAction&&m==="keyboard"&&(b+="Alt"),c?h=n.format(b,{count:u}):h=n.format(b),delete i.onClick}else if(c)f=n.format("dragSelectedItems",{count:u});else{let b=e.collection.getTextValue?.(t.key)??a?.textValue??"";f=n.format("dragItem",{itemText:b})}let g=bd(h);if(h&&Object.assign(i,g),!t.hasDragButton&&t.hasAction){let{onKeyDownCapture:b,onKeyUpCapture:x}=i;m==="touch"&&delete i["aria-describedby"],i.onKeyDownCapture=k=>{k.altKey&&b?.(k)},i.onKeyUpCapture=k=>{k.altKey&&x?.(k)}}return{dragProps:r?{}:i,dragButtonProps:{...s,isDisabled:r,"aria-label":f}}}function dV(t,e,n){let{draggingCollectionRef:r}=Kt;e.draggingKeys.size>0&&r?.current!==n.current&&JK(n)}const fV=V.forwardRef(function(e,n){let r=e.children,[i,s]=S.useState(null),a=S.useRef(null),u=S.useRef(void 0);return S.useImperativeHandle(n,()=>(c,f)=>{let h=r(c),m,g,b;h&&typeof h=="object"&&"element"in h?(m=h.element,g=h.x,b=h.y):m=h,Hl.flushSync(()=>{s(m)}),f(a.current,g,b),u.current=requestAnimationFrame(()=>{s(null)})},[r]),S.useEffect(()=>()=>{u.current&&cancelAnimationFrame(u.current)},[]),i?V.createElement("div",{style:{zIndex:-100,position:"fixed",top:0,left:-1e5},ref:a},i):null});function hV(t){let{getItems:e,isDisabled:n,collection:r,selectionManager:i,onDragStart:s,onDragMove:a,onDragEnd:u,preview:c,getAllowedDropOperations:f}=t,[,h]=S.useState(!1),m=S.useRef(new Set),g=S.useRef(null),b=x=>{let k=new Set;if(i.isSelected(x))for(let E of i.selectedKeys){let D=r.getItem(E);if(D){let T=!1,$=D.parentKey;for(;$!=null;){if(i.selectedKeys.has($)){T=!0;break}let A=r.getItem($);$=A?A.parentKey:null}T||k.add(E)}}else k.add(x);return k};return{collection:r,selectionManager:i,get draggedKey(){return g.current},get draggingKeys(){return m.current},isDragging(x){return m.current.has(x)},getKeysForDrag:b,getItems(x){let k=b(x),E=[];for(let D of k){let T=r.getItem(D)?.value;T!=null&&E.push(T)}return e(b(x),E)},isDisabled:n,preview:c,getAllowedDropOperations:f,startDrag(x,k){let E=b(x);m.current=E,g.current=x,i.setFocused(!1),h(!0),typeof s=="function"&&s({...k,keys:E})},moveDrag(x){typeof a=="function"&&a({...x,keys:m.current})},endDrag(x){let{isInternal:k}=x;typeof u=="function"&&u({...x,keys:m.current,isInternal:k}),m.current=new Set,g.current=null,h(!1)}}}function pV(t){let{acceptedDragTypes:e="all",isDisabled:n,onInsert:r,onRootDrop:i,onItemDrop:s,onReorder:a,onMove:u,shouldAcceptItemDrop:c,collection:f,selectionManager:h,onDropEnter:m,getDropOperation:g,onDrop:b}=t,[x,k]=S.useState(null),E=S.useRef(null),D=$=>{if($.dropPosition==="before"){let A=f.getItem($.key);return A&&A.prevKey!=null?{type:"item",key:A.prevKey,dropPosition:"after"}:null}else if($.dropPosition==="after"){let A=f.getItem($.key);return A&&A.nextKey!=null?{type:"item",key:A.nextKey,dropPosition:"before"}:null}return null},T=S.useCallback($=>{let{target:A,types:B,allowedOperations:R,isInternal:M,draggingKeys:O}=$;if(n||!A)return"cancel";if(e==="all"||e.some(j=>B.has(j))){let j=r&&A.type==="item"&&!M&&(A.dropPosition==="before"||A.dropPosition==="after"),q=a&&A.type==="item"&&M&&(A.dropPosition==="before"||A.dropPosition==="after")&&mV(f,A,O),X=A.type!=="item"||A.dropPosition!=="on"||!c||c(A,B),G=u&&A.type==="item"&&M&&X,Z=i&&A.type==="root"&&!M,F=s&&A.type==="item"&&A.dropPosition==="on"&&!(M&&A.key!=null&&O.has(A.key))&&X;if(b||j||q||G||Z||F)return g?g(A,B,R):R[0]}return"cancel"},[n,f,e,g,r,i,s,c,a,u,b]);return{collection:f,selectionManager:h,isDisabled:n,target:x,setTarget($){if(this.isDropTarget($))return;let A=E.current;A&&typeof t.onDropExit=="function"&&t.onDropExit({type:"dropexit",x:0,y:0,target:A}),$&&typeof m=="function"&&m({type:"dropenter",x:0,y:0,target:$}),E.current=$??null,k($??null)},isDropTarget($){let A=E.current;return!A||!$?!1:Yb($,A)?!0:$?.type==="item"&&A?.type==="item"&&$.key!==A.key&&$.dropPosition!==A.dropPosition&&$.dropPosition!=="on"&&A.dropPosition!=="on"?Yb(D($),A)||Yb($,D(A)):!1},getDropOperation($){let{target:A,isInternal:B,draggingKeys:R}=$;if(B&&A.type==="item"&&R.size>0){if(R.has(A.key)&&A.dropPosition==="on")return"cancel";let M=A.key;for(;M!=null;){let j=f.getItem(M)?.parentKey;if(j!=null&&R.has(j))return"cancel";M=j??null}}return T($)}}}function Yb(t,e){if(!t)return!e;switch(t.type){case"root":return e?.type==="root";case"item":return e?.type==="item"&&e?.key===t.key&&e?.dropPosition===t.dropPosition}}function mV(t,e,n){let r=t.getItem(e.key);for(let i of n)if(t.getItem(i)?.parentKey!==r?.parentKey)return!1;return!0}class gV{constructor(e,n,r){this.collection=e,this.ref=n,this.layout=r?.layout||"stack",this.orientation=r?.orientation||"vertical",this.direction=r?.direction||"ltr"}getPrimaryStart(e){return this.orientation==="horizontal"?e.left:e.top}getPrimaryEnd(e){return this.orientation==="horizontal"?e.right:e.bottom}getSecondaryStart(e){return this.orientation==="horizontal"?e.top:e.left}getSecondaryEnd(e){return this.orientation==="horizontal"?e.bottom:e.right}getFlowStart(e){return this.layout==="stack"?this.getPrimaryStart(e):this.getSecondaryStart(e)}getFlowEnd(e){return this.layout==="stack"?this.getPrimaryEnd(e):this.getSecondaryEnd(e)}getFlowSize(e){return this.getFlowEnd(e)-this.getFlowStart(e)}getDropTargetFromPoint(e,n,r){if(this.collection[Symbol.iterator]().next().done||!this.ref.current)return{type:"root"};let i=this.ref.current.getBoundingClientRect(),s=this.orientation==="horizontal"?e:n,a=this.orientation==="horizontal"?n:e;s+=this.getPrimaryStart(i),a+=this.getSecondaryStart(i);let u=this.layout==="stack"?s:a,c=this.orientation==="horizontal"&&this.direction==="rtl",f=this.layout==="grid"&&this.orientation==="vertical"&&this.direction==="rtl",h=this.layout==="stack"?c:f,m=this.ref.current?.dataset.collection,g=this.ref.current.querySelectorAll(m?`[data-collection="${CSS.escape(m)}"]`:"[data-key]"),b=new Map;for(let $ of g)$ instanceof HTMLElement&&$.dataset.key!=null&&b.set($.dataset.key,$);let x=[...this.collection].filter($=>$.type==="item");if(x.length<1)return{type:"root"};let k=0,E=x.length;for(;k<E;){let $=Math.floor((k+E)/2),A=x[$],B=b.get(String(A.key));if(!B)break;let R=B.getBoundingClientRect(),M=O=>{O?k=$+1:E=$};if(s<this.getPrimaryStart(R))M(c);else if(s>this.getPrimaryEnd(R))M(!c);else if(a<this.getSecondaryStart(R))M(f);else if(a>this.getSecondaryEnd(R))M(!f);else{let O={type:"item",key:A.key,dropPosition:"on"};if(r(O))u<=this.getFlowStart(R)+5&&r({...O,dropPosition:"before"})?O.dropPosition=h?"after":"before":u>=this.getFlowEnd(R)-5&&r({...O,dropPosition:"after"})&&(O.dropPosition=h?"before":"after");else{let j=this.getFlowStart(R)+this.getFlowSize(R)/2;u<=j&&r({...O,dropPosition:"before"})?O.dropPosition=h?"after":"before":u>=j&&r({...O,dropPosition:"after"})&&(O.dropPosition=h?"before":"after")}return O}}let D=x[Math.min(k,x.length-1)];return i=b.get(String(D.key))?.getBoundingClientRect(),i&&(s<this.getPrimaryStart(i)||Math.abs(u-this.getFlowStart(i))<Math.abs(u-this.getFlowEnd(i)))?{type:"item",key:D.key,dropPosition:h?"after":"before"}:{type:"item",key:D.key,dropPosition:h?"before":"after"}}}function bV(t){return{dragAndDropHooks:S.useMemo(()=>{let{onDrop:n,onInsert:r,onItemDrop:i,onReorder:s,onMove:a,onRootDrop:u,getItems:c,renderDragPreview:f,renderDropIndicator:h,dropTargetDelegate:m}=t,g=!!c,b=!!(n||r||i||s||a||u),x={};return g&&(x.useDraggableCollectionState=function(E){return hV({...E,...t})},x.useDraggableCollection=dV,x.useDraggableItem=cV,x.DragPreview=fV,x.renderDragPreview=f,x.isVirtualDragging=r_),b&&(x.useDroppableCollectionState=function(E){return pV({...E,...t})},x.useDroppableItem=I9,x.useDroppableCollection=function(E,D,T){return rV({...E,...t},D,T)},x.useDropIndicator=sV,x.renderDropIndicator=h,x.dropTargetDelegate=m,x.ListDropTargetDelegate=gV),x},[t])}}function j9(t,e){const n=t&&t!=="/"?t.replace(/\/+$/,""):"";return!n||e===n||e.startsWith(`${n}/`)||e.startsWith(`${n}?`)?e:`${n}${e}`}const yV=new _P({defaultOptions:{queries:{staleTime:5e3,retry:1,refetchOnWindowFocus:!0}}});function xV({router:t}){return C.jsx(gP,{client:yV,children:C.jsx(VI,{navigate:e=>t.history.push(j9(t.basepath,e)),children:C.jsx(mI,{router:t})})})}const gE=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,bE=$3,ha=(t,e)=>n=>{var r;if(e?.variants==null)return bE(t,n?.class,n?.className);const{variants:i,defaultVariants:s}=e,a=Object.keys(i).map(f=>{const h=n?.[f],m=s?.[f];if(h===null)return null;const g=gE(h)||gE(m);return i[f][g]}),u=n&&Object.entries(n).reduce((f,h)=>{let[m,g]=h;return g===void 0||(f[m]=g),f},{}),c=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((f,h)=>{let{class:m,className:g,...b}=h;return Object.entries(b).every(x=>{let[k,E]=x;return Array.isArray(E)?E.includes({...s,...u}[k]):{...s,...u}[k]===E})?[...f,m,g]:f},[]);return bE(t,a,c,n?.class,n?.className)},vV=(t,e)=>{const n=new Array(t.length+e.length);for(let r=0;r<t.length;r++)n[r]=t[r];for(let r=0;r<e.length;r++)n[t.length+r]=e[r];return n},kV=(t,e)=>({classGroupId:t,validator:e}),F9=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),gp="-",yE=[],CV="arbitrary..",EV=t=>{const e=SV(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return DV(a);const u=a.split(gp),c=u[0]===""&&u.length>1?1:0;return K9(u,c,e)},getConflictingClassGroupIds:(a,u)=>{if(u){const c=r[a],f=n[a];return c?f?vV(f,c):c:f||yE}return n[a]||yE}}},K9=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const i=t[e],s=n.nextPart.get(i);if(s){const f=K9(t,e+1,s);if(f)return f}const a=n.validators;if(a===null)return;const u=e===0?t.join(gp):t.slice(e).join(gp),c=a.length;for(let f=0;f<c;f++){const h=a[f];if(h.validator(u))return h.classGroupId}},DV=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),r=e.slice(0,n);return r?CV+r:void 0})(),SV=t=>{const{theme:e,classGroups:n}=t;return wV(n,e)},wV=(t,e)=>{const n=F9();for(const r in t){const i=t[r];dx(i,n,r,e)}return n},dx=(t,e,n,r)=>{const i=t.length;for(let s=0;s<i;s++){const a=t[s];$V(a,e,n,r)}},$V=(t,e,n,r)=>{if(typeof t=="string"){TV(t,e,n);return}if(typeof t=="function"){AV(t,e,n,r);return}BV(t,e,n,r)},TV=(t,e,n)=>{const r=t===""?e:_9(e,t);r.classGroupId=n},AV=(t,e,n,r)=>{if(MV(t)){dx(t(r),e,n,r);return}e.validators===null&&(e.validators=[]),e.validators.push(kV(n,t))},BV=(t,e,n,r)=>{const i=Object.entries(t),s=i.length;for(let a=0;a<s;a++){const[u,c]=i[a];dx(c,_9(e,u),n,r)}},_9=(t,e)=>{let n=t;const r=e.split(gp),i=r.length;for(let s=0;s<i;s++){const a=r[s];let u=n.nextPart.get(a);u||(u=F9(),n.nextPart.set(a,u)),n=u}return n},MV=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,NV=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),r=Object.create(null);const i=(s,a)=>{n[s]=a,e++,e>t&&(e=0,r=n,n=Object.create(null))};return{get(s){let a=n[s];if(a!==void 0)return a;if((a=r[s])!==void 0)return i(s,a),a},set(s,a){s in n?n[s]=a:i(s,a)}}},v4="!",xE=":",RV=[],vE=(t,e,n,r,i)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),OV=t=>{const{prefix:e,experimentalParseClassName:n}=t;let r=i=>{const s=[];let a=0,u=0,c=0,f;const h=i.length;for(let k=0;k<h;k++){const E=i[k];if(a===0&&u===0){if(E===xE){s.push(i.slice(c,k)),c=k+1;continue}if(E==="/"){f=k;continue}}E==="["?a++:E==="]"?a--:E==="("?u++:E===")"&&u--}const m=s.length===0?i:i.slice(c);let g=m,b=!1;m.endsWith(v4)?(g=m.slice(0,-1),b=!0):m.startsWith(v4)&&(g=m.slice(1),b=!0);const x=f&&f>c?f-c:void 0;return vE(s,b,g,x)};if(e){const i=e+xE,s=r;r=a=>a.startsWith(i)?s(a.slice(i.length)):vE(RV,!1,a,void 0,!0)}if(n){const i=r;r=s=>n({className:s,parseClassName:i})}return r},PV=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,r)=>{e.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let s=0;s<n.length;s++){const a=n[s],u=a[0]==="[",c=e.has(a);u||c?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(a)):i.push(a)}return i.length>0&&(i.sort(),r.push(...i)),r}},zV=t=>({cache:NV(t.cacheSize),parseClassName:OV(t),sortModifiers:PV(t),postfixLookupClassGroupIds:LV(t),...EV(t)}),LV=t=>{const e=Object.create(null),n=t.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)e[n[r]]=!0;return e},IV=/\s+/,jV=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:s,postfixLookupClassGroupIds:a}=e,u=[],c=t.trim().split(IV);let f="";for(let h=c.length-1;h>=0;h-=1){const m=c[h],{isExternal:g,modifiers:b,hasImportantModifier:x,baseClassName:k,maybePostfixModifierPosition:E}=n(m);if(g){f=m+(f.length>0?" "+f:f);continue}let D=!!E,T;if(D){const M=k.substring(0,E);T=r(M);const O=T&&a[T]?r(k):void 0;O&&O!==T&&(T=O,D=!1)}else T=r(k);if(!T){if(!D){f=m+(f.length>0?" "+f:f);continue}if(T=r(k),!T){f=m+(f.length>0?" "+f:f);continue}D=!1}const $=b.length===0?"":b.length===1?b[0]:s(b).join(":"),A=x?$+v4:$,B=A+T;if(u.indexOf(B)>-1)continue;u.push(B);const R=i(T,D);for(let M=0;M<R.length;++M){const O=R[M];u.push(A+O)}f=m+(f.length>0?" "+f:f)}return f},FV=(...t)=>{let e=0,n,r,i="";for(;e<t.length;)(n=t[e++])&&(r=V9(n))&&(i&&(i+=" "),i+=r);return i},V9=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=V9(t[r]))&&(n&&(n+=" "),n+=e);return n},KV=(t,...e)=>{let n,r,i,s;const a=c=>{const f=e.reduce((h,m)=>m(h),t());return n=zV(f),r=n.cache.get,i=n.cache.set,s=u,u(c)},u=c=>{const f=r(c);if(f)return f;const h=jV(c,n);return i(c,h),h};return s=a,(...c)=>s(FV(...c))},_V=[],Ft=t=>{const e=n=>n[t]||_V;return e.isThemeGetter=!0,e},H9=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,U9=/^\((?:(\w[\w-]*):)?(.+)\)$/i,VV=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,HV=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,UV=/\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$/,qV=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,GV=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,WV=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ys=t=>VV.test(t),Pe=t=>!!t&&!Number.isNaN(Number(t)),Ir=t=>!!t&&Number.isInteger(Number(t)),Xb=t=>t.endsWith("%")&&Pe(t.slice(0,-1)),bi=t=>HV.test(t),q9=()=>!0,QV=t=>UV.test(t)&&!qV.test(t),fx=()=>!1,YV=t=>GV.test(t),XV=t=>WV.test(t),JV=t=>!me(t)&&!ge(t),ZV=t=>t.startsWith("@container")&&(t[10]==="/"&&t[11]!==void 0||t[11]==="s"&&t[16]!==void 0&&t.startsWith("-size/",10)||t[11]==="n"&&t[18]!==void 0&&t.startsWith("-normal/",10)),eH=t=>eo(t,Q9,fx),me=t=>H9.test(t),To=t=>eo(t,Y9,QV),kE=t=>eo(t,lH,Pe),tH=t=>eo(t,J9,q9),nH=t=>eo(t,X9,fx),CE=t=>eo(t,G9,fx),rH=t=>eo(t,W9,XV),dh=t=>eo(t,Z9,YV),ge=t=>U9.test(t),Ju=t=>pa(t,Y9),iH=t=>pa(t,X9),EE=t=>pa(t,G9),sH=t=>pa(t,Q9),oH=t=>pa(t,W9),fh=t=>pa(t,Z9,!0),aH=t=>pa(t,J9,!0),eo=(t,e,n)=>{const r=H9.exec(t);return r?r[1]?e(r[1]):n(r[2]):!1},pa=(t,e,n=!1)=>{const r=U9.exec(t);return r?r[1]?e(r[1]):n:!1},G9=t=>t==="position"||t==="percentage",W9=t=>t==="image"||t==="url",Q9=t=>t==="length"||t==="size"||t==="bg-size",Y9=t=>t==="length",lH=t=>t==="number",X9=t=>t==="family-name",J9=t=>t==="number"||t==="weight",Z9=t=>t==="shadow",uH=()=>{const t=Ft("color"),e=Ft("font"),n=Ft("text"),r=Ft("font-weight"),i=Ft("tracking"),s=Ft("leading"),a=Ft("breakpoint"),u=Ft("container"),c=Ft("spacing"),f=Ft("radius"),h=Ft("shadow"),m=Ft("inset-shadow"),g=Ft("text-shadow"),b=Ft("drop-shadow"),x=Ft("blur"),k=Ft("perspective"),E=Ft("aspect"),D=Ft("ease"),T=Ft("animate"),$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],B=()=>[...A(),ge,me],R=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],O=()=>[ge,me,c],j=()=>[ys,"full","auto",...O()],q=()=>[Ir,"none","subgrid",ge,me],X=()=>["auto",{span:["full",Ir,ge,me]},Ir,ge,me],G=()=>[Ir,"auto",ge,me],Z=()=>["auto","min","max","fr",ge,me],F=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],te=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",...O()],_=()=>[ys,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...O()],W=()=>[ys,"screen","full","dvw","lvw","svw","min","max","fit",...O()],ee=()=>[ys,"screen","full","lh","dvh","lvh","svh","min","max","fit",...O()],z=()=>[t,ge,me],L=()=>[...A(),EE,CE,{position:[ge,me]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ie=()=>["auto","cover","contain",sH,eH,{size:[ge,me]}],le=()=>[Xb,Ju,To],de=()=>["","none","full",f,ge,me],he=()=>["",Pe,Ju,To],Ce=()=>["solid","dashed","dotted","double"],Qe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],$e=()=>[Pe,Xb,EE,CE],En=()=>["","none",x,ge,me],ln=()=>["none",Pe,ge,me],mn=()=>["none",Pe,ge,me],br=()=>[Pe,ge,me],Ht=()=>[ys,"full",...O()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[bi],breakpoint:[bi],color:[q9],container:[bi],"drop-shadow":[bi],ease:["in","out","in-out"],font:[JV],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[bi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[bi],shadow:[bi],spacing:["px",Pe],text:[bi],"text-shadow":[bi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ys,me,ge,E]}],container:["container"],"container-type":[{"@container":["","normal","size",ge,me]}],"container-named":[ZV],columns:[{columns:[Pe,me,ge,u]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"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:B()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:j()}],"inset-x":[{"inset-x":j()}],"inset-y":[{"inset-y":j()}],start:[{"inset-s":j(),start:j()}],end:[{"inset-e":j(),end:j()}],"inset-bs":[{"inset-bs":j()}],"inset-be":[{"inset-be":j()}],top:[{top:j()}],right:[{right:j()}],bottom:[{bottom:j()}],left:[{left:j()}],visibility:["visible","invisible","collapse"],z:[{z:[Ir,"auto",ge,me]}],basis:[{basis:[ys,"full","auto",u,...O()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Pe,ys,"auto","initial","none",me]}],grow:[{grow:["",Pe,ge,me]}],shrink:[{shrink:["",Pe,ge,me]}],order:[{order:[Ir,"first","last","none",ge,me]}],"grid-cols":[{"grid-cols":q()}],"col-start-end":[{col:X()}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":q()}],"row-start-end":[{row:X()}],"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":Z()}],"auto-rows":[{"auto-rows":Z()}],gap:[{gap:O()}],"gap-x":[{"gap-x":O()}],"gap-y":[{"gap-y":O()}],"justify-content":[{justify:[...F(),"normal"]}],"justify-items":[{"justify-items":[...te(),"normal"]}],"justify-self":[{"justify-self":["auto",...te()]}],"align-content":[{content:["normal",...F()]}],"align-items":[{items:[...te(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...te(),{baseline:["","last"]}]}],"place-content":[{"place-content":F()}],"place-items":[{"place-items":[...te(),"baseline"]}],"place-self":[{"place-self":["auto",...te()]}],p:[{p:O()}],px:[{px:O()}],py:[{py:O()}],ps:[{ps:O()}],pe:[{pe:O()}],pbs:[{pbs:O()}],pbe:[{pbe:O()}],pt:[{pt:O()}],pr:[{pr:O()}],pb:[{pb:O()}],pl:[{pl:O()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mbs:[{mbs:P()}],mbe:[{mbe:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":O()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":O()}],"space-y-reverse":["space-y-reverse"],size:[{size:_()}],"inline-size":[{inline:["auto",...W()]}],"min-inline-size":[{"min-inline":["auto",...W()]}],"max-inline-size":[{"max-inline":["none",...W()]}],"block-size":[{block:["auto",...ee()]}],"min-block-size":[{"min-block":["auto",...ee()]}],"max-block-size":[{"max-block":["none",...ee()]}],w:[{w:[u,"screen",..._()]}],"min-w":[{"min-w":[u,"screen","none",..._()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[a]},..._()]}],h:[{h:["screen","lh",..._()]}],"min-h":[{"min-h":["screen","lh","none",..._()]}],"max-h":[{"max-h":["screen","lh",..._()]}],"font-size":[{text:["base",n,Ju,To]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,aH,tH]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Xb,me]}],"font-family":[{font:[iH,nH,e]}],"font-features":[{"font-features":[me]}],"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:[i,ge,me]}],"line-clamp":[{"line-clamp":[Pe,"none",ge,kE]}],leading:[{leading:[s,...O()]}],"list-image":[{"list-image":["none",ge,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ge,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[Pe,"from-font","auto",ge,To]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[Pe,"auto",ge,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"tab-size":[{tab:[Ir,ge,me]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge,me]}],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",ge,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:ie()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ir,ge,me],radial:["",ge,me],conic:[Ir,ge,me]},oH,rH]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],rounded:[{rounded:de()}],"rounded-s":[{"rounded-s":de()}],"rounded-e":[{"rounded-e":de()}],"rounded-t":[{"rounded-t":de()}],"rounded-r":[{"rounded-r":de()}],"rounded-b":[{"rounded-b":de()}],"rounded-l":[{"rounded-l":de()}],"rounded-ss":[{"rounded-ss":de()}],"rounded-se":[{"rounded-se":de()}],"rounded-ee":[{"rounded-ee":de()}],"rounded-es":[{"rounded-es":de()}],"rounded-tl":[{"rounded-tl":de()}],"rounded-tr":[{"rounded-tr":de()}],"rounded-br":[{"rounded-br":de()}],"rounded-bl":[{"rounded-bl":de()}],"border-w":[{border:he()}],"border-w-x":[{"border-x":he()}],"border-w-y":[{"border-y":he()}],"border-w-s":[{"border-s":he()}],"border-w-e":[{"border-e":he()}],"border-w-bs":[{"border-bs":he()}],"border-w-be":[{"border-be":he()}],"border-w-t":[{"border-t":he()}],"border-w-r":[{"border-r":he()}],"border-w-b":[{"border-b":he()}],"border-w-l":[{"border-l":he()}],"divide-x":[{"divide-x":he()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":he()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ce(),"hidden","none"]}],"divide-style":[{divide:[...Ce(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-bs":[{"border-bs":z()}],"border-color-be":[{"border-be":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...Ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Pe,ge,me]}],"outline-w":[{outline:["",Pe,Ju,To]}],"outline-color":[{outline:z()}],shadow:[{shadow:["","none",h,fh,dh]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",m,fh,dh]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:he()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[Pe,To]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":he()}],"inset-ring-color":[{"inset-ring":z()}],"text-shadow":[{"text-shadow":["none",g,fh,dh]}],"text-shadow-color":[{"text-shadow":z()}],opacity:[{opacity:[Pe,ge,me]}],"mix-blend":[{"mix-blend":[...Qe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Qe()}],"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":[Pe]}],"mask-image-linear-from-pos":[{"mask-linear-from":$e()}],"mask-image-linear-to-pos":[{"mask-linear-to":$e()}],"mask-image-linear-from-color":[{"mask-linear-from":z()}],"mask-image-linear-to-color":[{"mask-linear-to":z()}],"mask-image-t-from-pos":[{"mask-t-from":$e()}],"mask-image-t-to-pos":[{"mask-t-to":$e()}],"mask-image-t-from-color":[{"mask-t-from":z()}],"mask-image-t-to-color":[{"mask-t-to":z()}],"mask-image-r-from-pos":[{"mask-r-from":$e()}],"mask-image-r-to-pos":[{"mask-r-to":$e()}],"mask-image-r-from-color":[{"mask-r-from":z()}],"mask-image-r-to-color":[{"mask-r-to":z()}],"mask-image-b-from-pos":[{"mask-b-from":$e()}],"mask-image-b-to-pos":[{"mask-b-to":$e()}],"mask-image-b-from-color":[{"mask-b-from":z()}],"mask-image-b-to-color":[{"mask-b-to":z()}],"mask-image-l-from-pos":[{"mask-l-from":$e()}],"mask-image-l-to-pos":[{"mask-l-to":$e()}],"mask-image-l-from-color":[{"mask-l-from":z()}],"mask-image-l-to-color":[{"mask-l-to":z()}],"mask-image-x-from-pos":[{"mask-x-from":$e()}],"mask-image-x-to-pos":[{"mask-x-to":$e()}],"mask-image-x-from-color":[{"mask-x-from":z()}],"mask-image-x-to-color":[{"mask-x-to":z()}],"mask-image-y-from-pos":[{"mask-y-from":$e()}],"mask-image-y-to-pos":[{"mask-y-to":$e()}],"mask-image-y-from-color":[{"mask-y-from":z()}],"mask-image-y-to-color":[{"mask-y-to":z()}],"mask-image-radial":[{"mask-radial":[ge,me]}],"mask-image-radial-from-pos":[{"mask-radial-from":$e()}],"mask-image-radial-to-pos":[{"mask-radial-to":$e()}],"mask-image-radial-from-color":[{"mask-radial-from":z()}],"mask-image-radial-to-color":[{"mask-radial-to":z()}],"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":A()}],"mask-image-conic-pos":[{"mask-conic":[Pe]}],"mask-image-conic-from-pos":[{"mask-conic-from":$e()}],"mask-image-conic-to-pos":[{"mask-conic-to":$e()}],"mask-image-conic-from-color":[{"mask-conic-from":z()}],"mask-image-conic-to-color":[{"mask-conic-to":z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:ie()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ge,me]}],filter:[{filter:["","none",ge,me]}],blur:[{blur:En()}],brightness:[{brightness:[Pe,ge,me]}],contrast:[{contrast:[Pe,ge,me]}],"drop-shadow":[{"drop-shadow":["","none",b,fh,dh]}],"drop-shadow-color":[{"drop-shadow":z()}],grayscale:[{grayscale:["",Pe,ge,me]}],"hue-rotate":[{"hue-rotate":[Pe,ge,me]}],invert:[{invert:["",Pe,ge,me]}],saturate:[{saturate:[Pe,ge,me]}],sepia:[{sepia:["",Pe,ge,me]}],"backdrop-filter":[{"backdrop-filter":["","none",ge,me]}],"backdrop-blur":[{"backdrop-blur":En()}],"backdrop-brightness":[{"backdrop-brightness":[Pe,ge,me]}],"backdrop-contrast":[{"backdrop-contrast":[Pe,ge,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Pe,ge,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Pe,ge,me]}],"backdrop-invert":[{"backdrop-invert":["",Pe,ge,me]}],"backdrop-opacity":[{"backdrop-opacity":[Pe,ge,me]}],"backdrop-saturate":[{"backdrop-saturate":[Pe,ge,me]}],"backdrop-sepia":[{"backdrop-sepia":["",Pe,ge,me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":O()}],"border-spacing-x":[{"border-spacing-x":O()}],"border-spacing-y":[{"border-spacing-y":O()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ge,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Pe,"initial",ge,me]}],ease:[{ease:["linear","initial",D,ge,me]}],delay:[{delay:[Pe,ge,me]}],animate:[{animate:["none",T,ge,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,ge,me]}],"perspective-origin":[{"perspective-origin":B()}],rotate:[{rotate:ln()}],"rotate-x":[{"rotate-x":ln()}],"rotate-y":[{"rotate-y":ln()}],"rotate-z":[{"rotate-z":ln()}],scale:[{scale:mn()}],"scale-x":[{"scale-x":mn()}],"scale-y":[{"scale-y":mn()}],"scale-z":[{"scale-z":mn()}],"scale-3d":["scale-3d"],skew:[{skew:br()}],"skew-x":[{"skew-x":br()}],"skew-y":[{"skew-y":br()}],transform:[{transform:[ge,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:B()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ht()}],"translate-x":[{"translate-x":Ht()}],"translate-y":[{"translate-y":Ht()}],"translate-z":[{"translate-z":Ht()}],"translate-none":["translate-none"],zoom:[{zoom:[Ir,ge,me]}],accent:[{accent:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}],"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",ge,me]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":z()}],"scrollbar-track-color":[{"scrollbar-track":z()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mbs":[{"scroll-mbs":O()}],"scroll-mbe":[{"scroll-mbe":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pbs":[{"scroll-pbs":O()}],"scroll-pbe":[{"scroll-pbe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"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",ge,me]}],fill:[{fill:["none",...z()]}],"stroke-w":[{stroke:[Pe,Ju,To,kE]}],stroke:[{stroke:["none",...z()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-bs","border-w-be","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-bs","border-color-be","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-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},cH=KV(uH);function fe(...t){return cH($3(t))}const e7=ha("group/button inline-flex shrink-0 items-center justify-center rounded-4xl border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:bg-transparent dark:hover:bg-input/30",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 gap-1.5 px-3 has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5",xs:"h-6 gap-1 px-2.5 text-xs has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1 px-3 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",lg:"h-10 gap-1.5 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-9","icon-xs":"size-6 [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Re({className:t,variant:e="default",size:n="default",...r}){return C.jsx(M6,{"data-slot":"button","data-variant":e,"data-size":n,className:fe(e7({variant:e,size:n,className:t})),...r})}function dH({className:t,variant:e="default",size:n="default",...r}){return C.jsx(_3,{"data-slot":"button","data-variant":e,"data-size":n,className:fe(e7({variant:e,size:n,className:t})),...r})}function fH({error:t}){const e=Qs({strict:!1}),n=ji(),r=typeof e.ref=="string"?e.ref:null,i=t instanceof gl?t.message:"Couldn't load this board. Check your connection and try again.";return C.jsx("div",{className:"flex flex-1 items-center justify-center px-6",children:C.jsxs("div",{className:"w-full max-w-sm text-center",children:[C.jsx("h1",{className:"text-lg font-medium",children:r?"Nothing to show on this branch":"Couldn't load this board"}),C.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:i}),r?C.jsx(Re,{variant:"secondary",className:"mt-6",onPress:()=>{const{ref:s,...a}=e;n({to:"/",search:a})},children:"Go to the default branch"}):C.jsx(Re,{variant:"secondary",className:"mt-6",onPress:()=>location.reload(),children:"Try again"})]})})}const t7=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();const hH=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const pH=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,r)=>r?r.toUpperCase():n.toLowerCase());const DE=t=>{const e=pH(t);return e.charAt(0).toUpperCase()+e.slice(1)};var Jb={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"};const mH=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1},gH=S.createContext({}),bH=()=>S.useContext(gH),yH=S.forwardRef(({color:t,size:e,strokeWidth:n,absoluteStrokeWidth:r,className:i="",children:s,iconNode:a,...u},c)=>{const{size:f=24,strokeWidth:h=2,absoluteStrokeWidth:m=!1,color:g="currentColor",className:b=""}=bH()??{},x=r??m?Number(n??h)*24/Number(e??f):n??h;return S.createElement("svg",{ref:c,...Jb,width:e??f??Jb.width,height:e??f??Jb.height,stroke:t??g,strokeWidth:x,className:t7("lucide",b,i),...!s&&!mH(u)&&{"aria-hidden":"true"},...u},[...a.map(([k,E])=>S.createElement(k,E)),...Array.isArray(s)?s:[s]])});const rt=(t,e)=>{const n=S.forwardRef(({className:r,...i},s)=>S.createElement(yH,{ref:s,iconNode:e,className:t7(`lucide-${hH(DE(t))}`,`lucide-${t}`,r),...i}));return n.displayName=DE(t),n};const xH=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],vH=rt("arrow-down",xH);const kH=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],CH=rt("arrow-up-right",kH);const EH=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],DH=rt("arrow-up",EH);const SH=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]],wH=rt("ban",SH);const $H=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ma=rt("check",$H);const TH=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],n7=rt("chevron-down",TH);const AH=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],BH=rt("chevron-right",AH);const MH=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],NH=rt("columns-3",MH);const RH=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],OH=rt("ellipsis",RH);const PH=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],ea=rt("git-branch",PH);const zH=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],vd=rt("git-pull-request",zH);const LH=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],IH=rt("grip-vertical",LH);const jH=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],FH=rt("hash",jH);const KH=[["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"}]],_H=rt("history",KH);const VH=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],HH=rt("house",VH);const UH=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],qH=rt("inbox",UH);const GH=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],r7=rt("link",GH);const WH=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],QH=rt("list-filter",WH);const YH=[["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"}]],XH=rt("list",YH);const JH=[["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"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]],ZH=rt("message-square-plus",JH);const eU=[["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"}]],tU=rt("message-square",eU);const nU=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ul=rt("plus",nU);const rU=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],i7=rt("search",rU);const iU=[["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"}]],sU=rt("sliders-horizontal",iU);const oU=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],bp=rt("tag",oU);const aU=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],Yc=rt("target",aU);const lU=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],Rm=rt("user-round",lU);const uU=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Vi=rt("x",uU);function cU({className:t,...e}){return C.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:fe("min-w-0",t),...e})}function dU({className:t,...e}){return C.jsx(Yj,{"data-slot":"breadcrumb-list",className:fe("flex min-w-0 flex-nowrap items-center text-sm text-muted-foreground",t),...e})}function SE({className:t,children:e,separatorClassName:n,...r}){return C.jsx(Xj,{"data-slot":"breadcrumb-item",className:fe("inline-flex min-w-0 items-center",t),...r,children:Ks(e,(i,{isCurrent:s})=>C.jsxs(C.Fragment,{children:[i,!s&&C.jsx("span",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:fe("mx-2 shrink-0 [&>svg]:size-3.5",n),children:C.jsx(BH,{})})]}))})}function fU({className:t,...e}){return C.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:fe("truncate font-normal text-foreground",t),...e})}function yp({className:t,variant:e="outline",size:n="default",...r}){return C.jsx(Re,{slot:"close","data-slot":"dialog-close",variant:e,size:n,className:fe(t),...r})}function hU({className:t,children:e,...n}){return C.jsx(e9,{"data-slot":"dialog-overlay",className:fe("fixed inset-0 isolate z-50 bg-black/30 duration-100 data-entering:animate-in data-entering:fade-in-0 data-exiting:animate-out data-exiting:fade-out-0 supports-backdrop-filter:backdrop-blur-sm",t),...n,children:e})}function hx({className:t,children:e,showCloseButton:n=!0,isDismissable:r=!0,...i}){return C.jsx(hU,{isDismissable:r,...i,children:C.jsx(z_,{"data-slot":"dialog-content",className:fe("fixed top-1/2 left-1/2 z-50 grid max-h-[calc(100dvh-2rem)] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 overflow-y-auto overscroll-contain rounded-4xl bg-popover p-6 text-sm text-popover-foreground shadow-xl ring-1 ring-foreground/5 duration-100 outline-none data-entering:animate-in data-entering:fade-in-0 data-entering:zoom-in-95 data-exiting:animate-out data-exiting:fade-out-0 data-exiting:zoom-out-95 sm:max-w-md dark:ring-foreground/10",t),children:C.jsxs(_K,{"data-slot":"dialog",className:"[display:inherit] [gap:inherit] outline-none",children:[e,n&&C.jsxs(yp,{variant:"ghost",className:"absolute top-4 right-4 bg-secondary",size:"icon-sm",children:[C.jsx(Vi,{}),C.jsx("span",{className:"sr-only",children:"Close"})]})]})})})}function px({className:t,...e}){return C.jsx(iF,{slot:"title","data-slot":"dialog-title",className:fe("font-heading text-base leading-none font-medium",t),...e})}function ta({className:t,type:e,...n}){return C.jsx(L6,{type:e,"data-slot":"input",className:Ks(t,r=>fe("h-9 w-full min-w-0 rounded-3xl border border-transparent bg-input/50 px-3 py-1 text-base transition-[color,box-shadow,background-color] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",r)),...n})}function s7({className:t,...e}){return C.jsx(q_,{"data-slot":"textarea",className:Ks(t,n=>fe("flex field-sizing-content min-h-16 w-full resize-none rounded-2xl border border-transparent bg-input/50 px-3 py-3 text-base transition-[color,box-shadow,background-color] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",n)),...e})}function o7({className:t,...e}){return C.jsx(EF,{"data-slot":"input-group",className:fe("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-4xl border border-transparent bg-input/50 transition-[color,box-shadow,background-color] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-data-[align=block-end]:rounded-3xl has-data-[align=block-start]:rounded-3xl has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/30 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[textarea]:rounded-2xl has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",t),...e})}const pU=ha("flex h-auto cursor-text items-center justify-center gap-2 py-2 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-3xl **:data-[slot=kbd]:bg-muted-foreground/10 **:data-[slot=kbd]:px-1.5 [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-3 has-[>button]:-ml-1 has-[>kbd]:-ml-1","inline-end":"order-last pr-3 has-[>button]:-mr-1 has-[>kbd]:-mr-1","block-start":"order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-3.5 [.border-b]:pb-3.5","block-end":"order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-3.5 [.border-t]:pt-3.5"}},defaultVariants:{align:"inline-start"}});function k4({className:t,align:e="inline-start",...n}){return C.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":e,className:fe(pU({align:e}),t),onClick:r=>{r.target.closest("button")||r.currentTarget.parentElement?.querySelector("input")?.focus()},...n})}function mU({className:t,...e}){return C.jsx(ta,{"data-slot":"input-group-control",className:fe("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",t),...e})}function ql({className:t,dir:e,style:n,...r}){const{contains:i}=VK({sensitivity:"base"});return C.jsx("div",{"data-slot":"command",dir:e,className:fe("flex size-full flex-col overflow-hidden rounded-4xl bg-popover p-1 text-popover-foreground",t),style:n,children:C.jsx(xj,{...r,filter:r.filter||i,children:r.children})})}function kd({...t}){return C.jsx(nx,{"data-slot":"command-popover-trigger",...t})}function Cd({className:t,placement:e="bottom start",offset:n=4,crossOffset:r=0,...i}){return C.jsx(Mm,{"data-slot":"command-popover",placement:e,offset:n,crossOffset:r,className:fe("relative isolate z-50 w-(--trigger-width) min-w-64 origin-(--trigger-anchor-point) overflow-hidden rounded-3xl bg-popover text-popover-foreground shadow-lg ring-1 ring-foreground/5 outline-hidden duration-100 data-entering:animate-in data-entering:fade-in-0 data-entering:zoom-in-95 data-exiting:animate-out data-exiting:fade-out-0 data-exiting:zoom-out-95 data-[placement=bottom]:slide-in-from-top-2 data-[placement=left]:slide-in-from-right-2 data-[placement=right]:slide-in-from-left-2 data-[placement=top]:slide-in-from-bottom-2 dark:ring-foreground/10","*:data-[slot=command]:rounded-none *:data-[slot=command]:bg-transparent *:data-[slot=command]:p-0",t),...i})}function Gl({className:t,flush:e=!1,...n}){return C.jsx(V_,{autoFocus:!0,"aria-label":n.placeholder||"Search","data-slot":"command-input-wrapper",className:e?"border-b border-border/60":"p-1 pb-0",children:C.jsxs(o7,{className:e?"h-10 rounded-none bg-transparent":"h-9 bg-input/50",children:[C.jsx(L6,{...n,"data-slot":"command-input",className:fe("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50 [&::-webkit-search-cancel-button]:hidden",t)}),C.jsx(k4,{children:C.jsx(i7,{className:"size-4 shrink-0 opacity-50"})})]})})}function Wl({className:t,...e}){return C.jsx(rx,{...e,"data-slot":"command-list",className:fe("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",t)})}function na({className:t,children:e,items:n,heading:r,...i}){return C.jsxs(jK,{"data-slot":"command-group",className:fe("overflow-hidden p-1.5 text-foreground **:[[cmdk-group-heading]]:px-3 **:[[cmdk-group-heading]]:py-2 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",t),...i,children:[r&&C.jsx(TF,{"cmdk-group-heading":"",children:r}),C.jsx(wm,{items:n,children:e})]})}function gU({className:t,...e}){return C.jsx(MF,{"data-slot":"command-separator",className:fe("my-1.5 h-px bg-border/50",t),...e})}function Os({className:t,children:e,textValue:n,...r}){return C.jsx(ix,{...r,"data-slot":"command-item",className:fe("group/command-item relative flex cursor-default items-center gap-2 rounded-2xl px-3 py-2 text-sm font-medium outline-hidden select-none in-data-[slot=dialog-content]:rounded-3xl data-focused:bg-muted data-focused:text-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-focused:*:[svg]:text-foreground data-selected:*:[svg]:text-foreground",t),textValue:n||(typeof e=="string"?e:void 0),children:Ks(e,i=>C.jsxs(C.Fragment,{children:[i,C.jsx(ma,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-selected/command-item:opacity-100"})]}))})}const a7=S.createContext(null);function Qt(){const t=S.useContext(a7);if(!t)throw new Error("useTasksContext must be used inside the app shell");return t}function bU(){const{project:t,board:e,boards:n}=Qt(),r=Qs({strict:!1}),i=ji(),[s,a]=S.useState(!1),[u,c]=S.useState(!1);t?.readOnly===!0&&!u&&c(!0);const f=Ez(u).data;if(!u||!f||f.length===0||f.length<2&&!r.ref)return null;const h=f.find(b=>b.isDefault)?.name,m=r.ref??h??"default",g=b=>{a(!1),b!==m&&i({to:"/",search:{...e&&e!==n[0]?.id?{board:e}:{},...b===h?{}:{ref:b}}})};return C.jsxs(kd,{isOpen:s,onOpenChange:a,children:[C.jsxs(Re,{variant:"ghost",size:"sm","aria-label":"Preview a branch",className:`-ml-2 h-7 min-w-0 shrink rounded-md px-1.5 font-normal ${r.ref?"text-amber-600 dark:text-amber-500":"text-muted-foreground"}`,children:[C.jsx(ea,{"data-icon":"inline-start",className:"size-3.5"}),C.jsx("span",{className:"max-w-40 truncate",children:m})]}),C.jsx(Cd,{className:"w-64",children:C.jsxs(ql,{children:[C.jsx(Gl,{flush:!0,placeholder:"Preview a branch"}),C.jsx(Wl,{selectionMode:"single",selectedKeys:[m],onAction:b=>g(String(b)),children:C.jsx(na,{children:f.map(b=>C.jsx(Os,{id:b.name,textValue:b.name,children:C.jsx("span",{className:"truncate",children:b.name})},b.name))})})]})})]})}function l7(){const t=In();return e=>{const n=new URLSearchParams,r=dm();r&&n.set("board",r);const i=Ii();i&&n.set("ref",i);const s=n.size>0?`?${n.toString()}`:"",a=j9(t.basepath,`/task/${e.key}${s}`);return new URL(a,location.origin).href}}function C4(t){if(navigator.clipboard){navigator.clipboard.writeText(t).catch(()=>wE(t));return}wE(t)}function wE(t){const e=document.createElement("textarea");e.value=t,e.setAttribute("readonly",""),e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.select();try{document.execCommand("copy")}finally{e.remove()}}function yU(){const{project:t,boards:e,board:n,tasks:r}=Qt(),i=ww(),s=Qs({strict:!1}),a=i({to:"/task/$key"}),u=a?a.key:null,c=u!=null?r.find(g=>g.key===u):null,f=new URLSearchParams;n&&n!==e[0]?.id&&f.set("board",n),s.ref&&f.set("ref",s.ref);const h=f.size>0?`/?${f.toString()}`:"/",m=e.find(g=>g.id===n)?.prefix??t?.prefix;return C.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[C.jsx(dH,{href:h,variant:"ghost",size:"icon-sm","aria-label":"Board home",className:"text-muted-foreground",children:C.jsx(HH,{})}),C.jsx(bU,{}),C.jsx(cU,{children:C.jsxs(dU,{children:[C.jsx(SE,{children:C.jsx(vU,{})}),a&&C.jsx(SE,{children:C.jsx(fU,{children:c?.title??(m?`${m}-${u}`:`#${u}`)})})]})}),u!=null&&C.jsx(xU,{taskKey:u})]})}function xU({taskKey:t}){const e=l7(),[n,r]=S.useState(!1),i=S.useRef(null);return C.jsx(Re,{variant:"ghost",size:"icon-xs","aria-label":"Copy link to task",onPress:()=>{C4(e({key:t})),r(!0),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>r(!1),1500)},className:"ml-0.5 shrink-0 text-muted-foreground [&_svg]:size-3.5",children:n?C.jsx(ma,{className:"text-green-600 dark:text-green-500"}):C.jsx(r7,{})})}function vU(){const{project:t,boards:e,board:n,switchBoard:r,failed:i}=Qt(),[s,a]=S.useState(!1);if(i&&e.length===0)return null;const u=e.find(h=>h.id===n)?.name??t?.name??"…",c=new Map;for(const h of e)c.set(h.name,(c.get(h.name)??0)+1);const f=h=>(c.get(h.name)??0)>1?`${h.name} — ${h.id}`:h.name;return C.jsxs(kd,{isOpen:s,onOpenChange:a,children:[C.jsx(Re,{variant:"ghost",size:"sm","aria-label":"Switch board",className:"-mx-1.5 h-7 min-w-0 shrink rounded-md px-1.5 font-medium text-foreground",children:C.jsx("span",{className:"truncate",children:u})}),C.jsx(Cd,{className:"w-60",children:C.jsxs(ql,{children:[C.jsx(Gl,{flush:!0,placeholder:"Switch board"}),C.jsx(Wl,{selectionMode:"single",selectedKeys:n?[n]:[],onAction:h=>{a(!1),r(String(h))},children:C.jsx(na,{children:e.map(h=>C.jsx(Os,{id:h.id,textValue:f(h),children:f(h)},h.id))})})]})})]})}const kU={backlog:"text-muted-foreground/60",todo:"text-muted-foreground",in_progress:"text-foreground/80",done:"text-foreground/80",canceled:"text-muted-foreground/60"};function Mr({status:t,className:e}){const n={viewBox:"0 0 14 14",className:fe("size-3.5 shrink-0",kU[t],e),"aria-hidden":!0};switch(t){case"backlog":return C.jsx("svg",{...n,children:C.jsx("circle",{cx:"7",cy:"7",r:"5.5",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeDasharray:"2.5 2.2"})});case"todo":return C.jsx("svg",{...n,children:C.jsx("circle",{cx:"7",cy:"7",r:"5.5",fill:"none",stroke:"currentColor",strokeWidth:"1.6"})});case"in_progress":return C.jsxs("svg",{...n,children:[C.jsx("circle",{cx:"7",cy:"7",r:"5.5",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),C.jsx("path",{d:"M7 3.4 A3.6 3.6 0 0 1 7 10.6 Z",fill:"currentColor"})]});case"done":return C.jsxs("svg",{...n,children:[C.jsx("circle",{cx:"7",cy:"7",r:"6.2",fill:"currentColor"}),C.jsx("path",{d:"M4.4 7.2l1.8 1.8 3.4-3.9",fill:"none",stroke:"var(--background)",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})]});case"canceled":return C.jsxs("svg",{...n,children:[C.jsx("circle",{cx:"7",cy:"7",r:"6.2",fill:"currentColor"}),C.jsx("path",{d:"M4.8 4.8l4.4 4.4M9.2 4.8l-4.4 4.4",stroke:"var(--background)",strokeWidth:"1.5",strokeLinecap:"round"})]})}}function u7({className:t}){return C.jsxs("span",{title:"Blocked by another task","aria-label":"Blocked by another task",className:fe("inline-flex shrink-0 items-center gap-1 rounded-full bg-red-500/15 px-1.5 py-0.5 text-[11px] font-medium text-red-700 dark:text-red-400",t),children:[C.jsx(wH,{className:"size-3","aria-hidden":!0}),"Blocked"]})}function c7({className:t,count:e}){const n=e&&e>0?`${e} ask${e===1?"":"s"}`:"Human";return C.jsxs("span",{title:"Needs a human","aria-label":"Needs a human",className:fe("inline-flex shrink-0 items-center gap-1 rounded-full bg-amber-500/15 px-1.5 py-0.5 text-[11px] font-medium text-amber-700 dark:text-amber-400",t),children:[C.jsx(Rm,{className:"size-3","aria-hidden":!0}),n]})}function Fh({className:t,htmlFor:e,slot:n,...r}){const i=C.jsx(Jj,{"data-slot":"label",className:fe("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 peer-data-disabled:opacity-50",t),...r,htmlFor:e,slot:n});return e&&n===void 0?C.jsx(V3.Provider,{value:null,children:i}):i}function ga({children:t,...e}){return C.jsx(KK,{"data-slot":"popover-trigger",...e,children:t})}function ba({className:t,placement:e="bottom",offset:n=4,crossOffset:r=0,...i}){return C.jsx(Mm,{"data-slot":"popover-content",placement:e,offset:n,crossOffset:r,className:fe("z-50 flex w-72 origin-(--trigger-anchor-point) flex-col gap-4 rounded-3xl bg-popover p-4 text-sm text-popover-foreground shadow-lg ring-1 ring-foreground/5 outline-hidden duration-100 data-entering:animate-in data-entering:fade-in-0 data-entering:zoom-in-95 data-exiting:animate-out data-exiting:fade-out-0 data-exiting:zoom-out-95 data-[placement=bottom]:slide-in-from-top-2 data-[placement=left]:slide-in-from-right-2 data-[placement=right]:slide-in-from-left-2 data-[placement=top]:slide-in-from-bottom-2 dark:ring-foreground/10",t),...i})}const CU=ha("group/toggle inline-flex items-center justify-center gap-1 rounded-3xl text-sm font-medium whitespace-nowrap transition-colors outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/30 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted dark:aria-invalid:ring-destructive/40 data-selected:bg-muted [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-muted"},size:{default:"h-9 min-w-9 px-3 has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5",sm:"h-8 min-w-8 px-3 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",lg:"h-10 min-w-10 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3"}},defaultVariants:{variant:"default",size:"default"}}),d7=S.createContext({size:"default",variant:"default",spacing:2,orientation:"horizontal"});function EU({className:t,variant:e,size:n,spacing:r=2,orientation:i="horizontal",children:s,...a}){return C.jsx(J_,{"data-slot":"toggle-group","data-variant":e,"data-size":n,"data-spacing":r,orientation:i,style:{"--gap":`calc(var(--spacing) * ${r})`},className:fe("group/toggle-group flex w-fit flex-row items-center gap-(--gap) data-[spacing=0]:data-[variant=outline]:rounded-3xl data-vertical:flex-col data-vertical:items-stretch",t),...a,children:C.jsx(d7.Provider,{value:{variant:e,size:n,spacing:r,orientation:i},children:s})})}function $E({className:t,children:e,variant:n="default",size:r="default",...i}){const s=S.useContext(d7);return C.jsx(eV,{"data-slot":"toggle-group-item","data-variant":s.variant||n,"data-size":s.size||r,"data-spacing":s.spacing,className:fe("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-3 group-data-[spacing=0]/toggle-group:shadow-none focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-2.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-2.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-3xl group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-3xl group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-3xl group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-3xl data-[state=on]:bg-muted group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",CU({variant:s.variant||n,size:s.size||r}),t),...i,children:e})}function DU(){const{settings:t,setSettings:e}=Qt();return C.jsxs(ga,{children:[C.jsx(Re,{variant:"ghost",size:"icon-sm","aria-label":"Display options",children:C.jsx(sU,{})}),C.jsxs(ba,{placement:"bottom end",className:"w-64 gap-3 p-3",children:[C.jsxs(EU,{variant:"outline",spacing:0,selectionMode:"single",disallowEmptySelection:!0,selectedKeys:[t.view],onSelectionChange:n=>{const r=[...n][0];(r==="board"||r==="list")&&e({...t,view:r})},"aria-label":"View",className:"w-full",children:[C.jsxs($E,{id:"list",className:"flex-1",children:[C.jsx(XH,{"data-icon":"inline-start"}),"List"]}),C.jsxs($E,{id:"board",className:"flex-1",children:[C.jsx(NH,{"data-icon":"inline-start"}),"Board"]})]}),t.view==="board"&&C.jsxs("div",{className:"flex flex-col gap-1",children:[C.jsx(Fh,{className:"px-1 pb-1 text-xs text-muted-foreground",children:"Columns"}),Oi.map(n=>{const r=t.boardColumns.includes(n);return C.jsxs(Re,{variant:"ghost",size:"sm","aria-pressed":r,onPress:()=>e({...t,boardColumns:Oi.filter(i=>i===n?!r:t.boardColumns.includes(i))}),className:"w-full justify-start gap-2 font-normal",children:[C.jsx(Mr,{status:n}),Ai[n],C.jsx(ma,{"data-icon":"inline-end",className:r?"ml-auto":"ml-auto opacity-0"})]},n)})]})]})]})}const SU=ha("flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[>[data-variant=outline]]:*:data-[slot=input-group]:border-border has-[>[data-variant=outline]]:*:data-[slot=select-trigger]:border-border has-[>[data-variant=outline]]:[&>[data-slot=input-group]:has(:focus-visible)]:border-ring has-[>[data-variant=outline]]:[&>[data-slot=select-trigger]:focus-visible]:border-ring has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-4xl [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[>[data-variant=outline]]:[&>input]:border-border has-[>[data-variant=outline]]:[&>input:focus-visible]:border-ring",{variants:{orientation:{horizontal:"**:data-slot:rounded-r-none [&_[data-slot]~[data-slot]]:rounded-l-none [&_[data-slot]~[data-slot]]:border-l-0 [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-4xl!",vertical:"flex-col **:data-slot:rounded-b-none [&_[data-slot]~[data-slot]]:rounded-t-none [&_[data-slot]~[data-slot]]:border-t-0 [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-4xl!"}},defaultVariants:{orientation:"horizontal"}});function wU({className:t,orientation:e,...n}){return C.jsx("div",{role:"group","data-slot":"button-group","data-orientation":e,className:fe(SU({orientation:e}),t),...n})}function TE({className:t,render:e,...n}){if(e){const r={"data-slot":"button-group-text",className:fe("flex items-center gap-2 rounded-4xl border bg-muted px-2.5 text-sm font-medium [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",t),...n};return e(r)}return C.jsx("div",{"data-slot":"button-group-text",className:fe("flex items-center gap-2 rounded-4xl border bg-muted px-2.5 text-sm font-medium [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",t),...n})}const Zb="__none__",AE="__create__";function Gr({label:t,options:e,value:n,onChange:r,mode:i,placeholder:s,allowCreate:a=!0,renderValue:u,size:c="sm",variant:f="outline",chevron:h=!0,className:m}){const[g,b]=S.useState(!1),[x,k]=S.useState(""),E=[...new Set([...e,...n])].sort(),D=x.trim(),T=a&&D.length>0&&!E.some(R=>R.toLowerCase()===D.toLowerCase());function $(R){const M=String(R);if(M===AE){r(i==="single"?[D]:[...n,D]),k(""),i==="single"&&A();return}if(M===Zb){r([]),A();return}if(i==="single"){r([M]),A();return}r(n.includes(M)?n.filter(O=>O!==M):[...n,M])}function A(){b(!1),k("")}const B=u?.(n)??C.jsx("span",{className:"truncate",children:n.length>0?n.join(", "):s});return C.jsxs(kd,{isOpen:g,onOpenChange:R=>R?b(!0):A(),children:[C.jsxs(Re,{variant:f,size:c,"aria-label":t,className:fe("justify-between gap-1.5 font-normal",m),children:[B,h&&C.jsx(n7,{className:"text-muted-foreground"})]}),C.jsx(Cd,{className:"w-60",children:C.jsxs(ql,{inputValue:x,onInputChange:k,children:[C.jsx(Gl,{flush:!0,placeholder:`Search ${t.toLowerCase()}`}),C.jsxs(Wl,{selectionMode:i,selectedKeys:i==="single"?[n[0]??Zb]:n,onAction:$,disallowEmptySelection:i==="single",renderEmptyState:()=>T?null:C.jsx("p",{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nothing here yet"}),children:[C.jsxs(na,{children:[i==="single"?C.jsx(Os,{id:Zb,textValue:s,children:s}):null,E.map(R=>C.jsx(Os,{id:R,textValue:R,children:R},R))]}),T?C.jsx(gU,{}):null,T?C.jsx(na,{children:C.jsxs(Os,{id:AE,textValue:x,children:[C.jsx(Ul,{}),C.jsx("span",{className:"truncate",children:D})]})}):null]})]})})]})}const f7={statuses:[],tags:[],goal:null,needsHuman:!1};function $U(t,e){return t.filter(n=>!(e.statuses.length>0&&!e.statuses.includes(n.status)||e.tags.length>0&&!n.tags.some(r=>e.tags.includes(r))||e.goal!==null&&n.goal!==e.goal||e.needsHuman&&!n.needsHuman))}function TU(t,e){const n=e.trim().toLowerCase();return n?t.filter(r=>r.id.toLowerCase().includes(n)||r.title.toLowerCase().includes(n)||r.description.toLowerCase().includes(n)):t}function h7(t){return t.statuses.length>0||t.tags.length>0||t.goal!==null||t.needsHuman}function Om(t){return[...new Set(t.flatMap(e=>e.tags))].sort()}function Pm(t){return[...new Set(t.map(e=>e.goal).filter(e=>!!e))].sort()}function AU(){const{tasks:t,filters:e,setFilters:n}=Qt();return C.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-2 border-b px-4 py-2",children:[e.statuses.length>0&&C.jsx(hh,{icon:C.jsx(Mr,{status:e.statuses[0],className:"size-3.5"}),name:"Status",operator:e.statuses.length>1?"is any of":"is",onRemove:()=>n({...e,statuses:[]}),children:C.jsx(Gr,{label:"Status",mode:"multiple",allowCreate:!1,options:[...Oi],value:e.statuses,onChange:r=>n({...e,statuses:r}),placeholder:"Status",renderValue:r=>C.jsx("span",{className:"truncate",children:r.map(i=>Ai[i]).join(", ")}),size:"sm",className:"max-w-56 border-l-0 font-normal"})}),e.tags.length>0&&C.jsx(hh,{icon:C.jsx(bp,{className:"size-3.5"}),name:"Tag",operator:e.tags.length>1?"is any of":"is",onRemove:()=>n({...e,tags:[]}),children:C.jsx(Gr,{label:"Tags",mode:"multiple",allowCreate:!1,options:Om(t),value:e.tags,onChange:r=>n({...e,tags:r}),placeholder:"Tags",size:"sm",className:"max-w-56 border-l-0 font-normal"})}),e.goal!==null&&C.jsx(hh,{icon:C.jsx(Yc,{className:"size-3.5"}),name:"Goal",operator:"is",onRemove:()=>n({...e,goal:null}),children:C.jsx(Gr,{label:"Goal",mode:"single",allowCreate:!1,options:Pm(t),value:[e.goal],onChange:r=>n({...e,goal:r[0]??null}),placeholder:"Goal",size:"sm",className:"max-w-56 border-l-0 font-normal"})}),e.needsHuman&&C.jsx(hh,{icon:C.jsx(Rm,{className:"size-3.5"}),name:"Needs a human",onRemove:()=>n({...e,needsHuman:!1})}),C.jsx(Re,{size:"sm",variant:"ghost",onPress:()=>n(f7),children:"Clear"})]})}function hh({icon:t,name:e,operator:n,onRemove:r,children:i}){return C.jsxs(wU,{children:[C.jsxs(TE,{className:"h-8 gap-1.5 bg-transparent text-sm font-normal",children:[t,e]}),n&&C.jsx(TE,{className:"h-8 border-l-0 bg-transparent text-sm font-normal text-muted-foreground",children:n}),i,C.jsx(Re,{variant:"outline",size:"icon-sm","aria-label":`Remove ${e.toLowerCase()} filter`,onPress:r,className:"border-l-0 text-muted-foreground",children:C.jsx(Vi,{})})]})}function BU(){const{tasks:t,filters:e,setFilters:n}=Qt(),r=h7(e);return C.jsxs(ga,{children:[C.jsxs(Re,{variant:"ghost",size:"icon-sm","aria-label":"Filter",className:"relative",children:[C.jsx(QH,{}),r&&C.jsx("span",{className:"absolute top-1 right-1 size-1.5 rounded-full bg-primary"})]}),C.jsxs(ba,{placement:"bottom end",className:"w-64 gap-3 p-3",children:[C.jsxs("div",{className:"grid gap-1.5",children:[C.jsx(Fh,{className:"px-1 text-xs text-muted-foreground",children:"Status"}),C.jsx(Gr,{label:"Status",mode:"multiple",allowCreate:!1,options:[...Oi],value:e.statuses,onChange:i=>n({...e,statuses:i}),placeholder:"Any status",renderValue:i=>C.jsx("span",{className:"truncate",children:i.length===0?"Any status":i.map(s=>Ai[s]).join(", ")}),className:"w-full"})]}),C.jsxs("div",{className:"grid gap-1.5",children:[C.jsx(Fh,{className:"px-1 text-xs text-muted-foreground",children:"Tags"}),C.jsx(Gr,{label:"Tags",mode:"multiple",allowCreate:!1,options:Om(t),value:e.tags,onChange:i=>n({...e,tags:i}),placeholder:"Any tag",className:"w-full"})]}),C.jsxs("div",{className:"grid gap-1.5",children:[C.jsx(Fh,{className:"px-1 text-xs text-muted-foreground",children:"Goal"}),C.jsx(Gr,{label:"Goal",mode:"single",allowCreate:!1,options:Pm(t),value:e.goal?[e.goal]:[],onChange:i=>n({...e,goal:i[0]??null}),placeholder:"Any goal",className:"w-full"})]}),C.jsxs(Re,{size:"sm",variant:e.needsHuman?"secondary":"outline","aria-pressed":e.needsHuman,onPress:()=>n({...e,needsHuman:!e.needsHuman}),className:fe("justify-start font-normal",e.needsHuman&&"text-amber-700 dark:text-amber-400"),children:[C.jsx(Rm,{"data-icon":"inline-start"}),"Needs a human"]})]})]})}function tn(t){this.content=t}tn.prototype={constructor:tn,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),s=r.content.slice();return i==-1?s.push(n||t,e):(s[i+1]=e,n&&(s[i]=n)),new tn(s)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new tn(n)},addToStart:function(t,e){return new tn([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new tn(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),s=r.find(t);return i.splice(s==-1?i.length:s,0,e,n),new tn(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=tn.from(t),t.size?new tn(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=tn.from(t),t.size?new tn(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=tn.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};tn.from=function(t){if(t instanceof tn)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new tn(e)};function p7(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),s=e.child(r);if(i==s){n+=i.nodeSize;continue}if(!i.sameMarkup(s))return n;if(i.isText&&i.text!=s.text){let a=i.text,u=s.text,c=0;for(;a[c]==u[c];c++)n++;return c&&c<a.length&&c<u.length&&b7(a.charCodeAt(c-1))&&g7(a.charCodeAt(c))&&n--,n}if(i.content.size||s.content.size){let a=p7(i.content,s.content,n+1);if(a!=null)return a}n+=i.nodeSize}}function m7(t,e,n,r){for(let i=t.childCount,s=e.childCount;;){if(i==0||s==0)return i==s?null:{a:n,b:r};let a=t.child(--i),u=e.child(--s),c=a.nodeSize;if(a==u){n-=c,r-=c;continue}if(!a.sameMarkup(u))return{a:n,b:r};if(a.isText&&a.text!=u.text){let f=a.text,h=u.text,m=f.length,g=h.length;for(;m>0&&g>0&&f[m-1]==h[g-1];)m--,g--,n--,r--;return m&&g&&m<f.length&&b7(f.charCodeAt(m-1))&&g7(f.charCodeAt(m))&&(n++,r++),{a:n,b:r}}if(a.content.size||u.content.size){let f=m7(a.content,u.content,n-1,r-1);if(f)return f}n-=c,r-=c}}function g7(t){return t>=56320&&t<57344}function b7(t){return t>=55296&&t<56320}class ae{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,i=0,s){for(let a=0,u=0;u<n;a++){let c=this.content[a],f=u+c.nodeSize;if(f>e&&r(c,i+u,s||null,a)!==!1&&c.content.size){let h=u+1;c.nodesBetween(Math.max(0,e-h),Math.min(c.content.size,n-h),r,i+h)}u=f}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let s="",a=!0;return this.nodesBetween(e,n,(u,c)=>{let f=u.isText?u.text.slice(Math.max(e,c)-c,n-c):u.isLeaf?i?typeof i=="function"?i(u):i:u.type.spec.leafText?u.type.spec.leafText(u):"":"";u.isBlock&&(u.isLeaf&&f||u.isTextblock)&&r&&(a?a=!1:s+=r),s+=f},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),s=1);s<e.content.length;s++)i.push(e.content[s]);return new ae(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let s=0,a=0;a<n;s++){let u=this.content[s],c=a+u.nodeSize;c>e&&((a<e||c>n)&&(u.isText?u=u.cut(Math.max(0,e-a),Math.min(u.text.length,n-a)):u=u.cut(Math.max(0,e-a-1),Math.min(u.content.size,n-a-1))),r.push(u),i+=u.nodeSize),a=c}return new ae(r,i)}cutByIndex(e,n){return e==n?ae.empty:e==0&&n==this.content.length?this:new ae(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),s=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new ae(i,s)}addToStart(e){return new ae([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new ae(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return p7(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return m7(this,e,n,r)}findIndex(e){if(e==0)return ph(0,e);if(e==this.size)return ph(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=this.child(n),s=r+i.nodeSize;if(s>=e)return s==e?ph(n+1,s):ph(n,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return ae.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return ae.fromArray(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return ae.empty;let n,r=0;for(let i=0;i<e.length;i++){let s=e[i];r+=s.nodeSize,i&&s.isText&&e[i-1].sameMarkup(s)?(n||(n=e.slice(0,i)),n[n.length-1]=s.withText(n[n.length-1].text+s.text)):n&&n.push(s)}return new ae(n||e,r)}static from(e){if(!e)return ae.empty;if(e instanceof ae)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new ae([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}ae.empty=new ae([],0);const ey={index:0,offset:0};function ph(t,e){return ey.index=t,ey.offset=e,ey}function xp(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!xp(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!xp(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let st=class E4{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let s=e[i];if(this.eq(s))return e;if(this.type.excludes(s.type))n||(n=e.slice(0,i));else{if(s.type.excludes(this.type))return e;!r&&s.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(s)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&xp(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return E4.none;if(e instanceof E4)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};st.none=[];class Xc extends Error{}class pe{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=x7(this.content,e+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new pe(r,this.openStart,this.openEnd)}removeBetween(e,n){return new pe(y7(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return pe.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new pe(ae.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.lastChild)i++;return new pe(e,r,i)}}pe.empty=new pe(ae.empty,0,0);function y7(t,e,n){let{index:r,offset:i}=t.findIndex(e),s=t.maybeChild(r),{index:a,offset:u}=t.findIndex(n);if(i==e||s.isText){if(u!=n&&!t.child(a).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=a)throw new RangeError("Removing non-flat range");return t.replaceChild(r,s.copy(y7(s.content,e-i-1,n-i-1)))}function x7(t,e,n,r,i,s){let{index:a,offset:u}=t.findIndex(e),c=t.maybeChild(a);if(u==e||c.isText)return s&&r<=0&&i<=0&&!s.canReplace(a,a,n)?null:t.cut(0,e).append(n).append(t.cut(e));let f=x7(c.content,e-u-1,n,a==0?r-1:0,a==t.childCount-1?i-1:0,c);return f&&t.replaceChild(a,c.copy(f))}function MU(t,e,n){if(n.openStart>t.depth)throw new Xc("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Xc("Inconsistent open depths");return v7(t,e,n,0)}function v7(t,e,n,r){let i=t.index(r),s=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let a=v7(t,e,n,r+1);return s.copy(s.content.replaceChild(i,a))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let a=t.parent,u=a.content;return Wo(a,u.cut(0,t.parentOffset).append(n.content).append(u.cut(e.parentOffset)))}else{let{start:a,end:u}=NU(n,t);return Wo(s,C7(t,a,u,e,r))}else return Wo(s,vp(t,e,r))}function k7(t,e){if(!e.type.compatibleContent(t.type))throw new Xc("Cannot join "+e.type.name+" onto "+t.type.name)}function D4(t,e,n){let r=t.node(n);return k7(r,e.node(n)),r}function Go(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function Dc(t,e,n,r){let i=(e||t).node(n),s=0,a=e?e.index(n):i.childCount;t&&(s=t.index(n),t.depth>n?s++:t.textOffset&&(Go(t.nodeAfter,r),s++));for(let u=s;u<a;u++)Go(i.child(u),r);e&&e.depth==n&&e.textOffset&&Go(e.nodeBefore,r)}function Wo(t,e){if(!t.type.validContent(e))throw new Xc("Invalid content for node "+t.type.name);return t.copy(e)}function C7(t,e,n,r,i){let s=t.depth>i&&D4(t,e,i+1),a=r.depth>i&&D4(n,r,i+1),u=[];return Dc(null,t,i,u),s&&a&&e.index(i)==n.index(i)?(k7(s,a),Go(Wo(s,C7(t,e,n,r,i+1)),u)):(s&&Go(Wo(s,vp(t,e,i+1)),u),Dc(e,n,i,u),a&&Go(Wo(a,vp(n,r,i+1)),u)),Dc(r,null,i,u),new ae(u)}function vp(t,e,n){let r=[];if(Dc(null,t,n,r),t.depth>n){let i=D4(t,e,n+1);Go(Wo(i,vp(t,e,n+1)),r)}return Dc(e,null,n,r),new ae(r)}function NU(t,e){let n=e.depth-t.openStart,i=e.node(n).copy(t.content);for(let s=n-1;s>=0;s--)i=e.node(s).copy(ae.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}class Jc{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(n);return r?e.child(n).cut(r):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let s=0;s<e;s++)i+=r.child(s).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return st.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let u=r;r=i,i=u}let s=r.marks;for(var a=0;a<s.length;a++)s[a].type.spec.inclusive===!1&&(!i||!s[a].isInSet(i.marks))&&(s=s[a--].removeFromSet(s));return s}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var s=0;s<r.length;s++)r[s].type.spec.inclusive===!1&&(!i||!r[s].isInSet(i.marks))&&(r=r[s--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new kp(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,s=n;for(let a=e;;){let{index:u,offset:c}=a.content.findIndex(s),f=s-c;if(r.push(a,u,i+c),!f||(a=a.child(u),a.isText))break;s=f-1,i+=c+1}return new Jc(n,r,s)}static resolveCached(e,n){let r=BE.get(e);if(r)for(let s=0;s<r.elts.length;s++){let a=r.elts[s];if(a.pos==n)return a}else BE.set(e,r=new RU);let i=r.elts[r.i]=Jc.resolve(e,n);return r.i=(r.i+1)%OU,i}}class RU{constructor(){this.elts=[],this.i=0}}const OU=12,BE=new WeakMap;class kp{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const PU=Object.create(null);let Ps=class S4{constructor(e,n,r,i=st.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||ae.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,i=0){this.content.nodesBetween(e,n,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,i){return this.content.textBetween(e,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&xp(this.attrs,n||e.defaultAttrs||PU)&&st.sameSet(this.marks,r||st.none)}copy(e=null){return e==this.content?this:new S4(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new S4(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return pe.empty;let i=this.resolve(e),s=this.resolve(n),a=r?0:i.sharedDepth(n),u=i.start(a),f=i.node(a).content.cut(i.pos-u,s.pos-u);return new pe(f,i.depth-a,s.depth-a)}replace(e,n,r){return MU(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return Jc.resolveCached(this,e)}resolveNoCache(e){return Jc.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),E7(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=ae.empty,i=0,s=r.childCount){let a=this.contentMatchAt(e).matchFragment(r,i,s),u=a&&a.matchFragment(this.content,n);if(!u||!u.validEnd)return!1;for(let c=i;c<s;c++)if(!this.type.allowsMarks(r.child(c).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let s=this.contentMatchAt(e).matchType(r),a=s&&s.matchFragment(this.content,n);return a?a.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=st.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!st.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let i=ae.fromJSON(e,n.content),s=e.nodeType(n.type).create(n.attrs,i,r);return s.type.checkAttrs(s.attrs),s}};Ps.prototype.text=void 0;class Cp extends Ps{constructor(e,n,r,i){if(super(e,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):E7(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Cp(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Cp(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function E7(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class ra{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new zU(e,n);if(r.next==null)return ra.empty;let i=D7(r);r.next&&r.err("Unexpected trailing text");let s=VU(_U(i));return HU(s,r),s}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let i=this;for(let s=n;i&&s<r;s++)i=i.matchType(e.child(s).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let i=[this];function s(a,u){let c=a.matchFragment(e,r);if(c&&(!n||c.validEnd))return ae.from(u.map(f=>f.createAndFill()));for(let f=0;f<a.next.length;f++){let{type:h,next:m}=a.next[f];if(!(h.isText||h.hasRequiredAttrs())&&i.indexOf(m)==-1){i.push(m);let g=s(m,u.concat(h));if(g)return g}}return null}return s(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),s=i.match;if(s.matchType(e)){let a=[];for(let u=i;u.type;u=u.via)a.push(u.type);return a.reverse()}for(let a=0;a<s.next.length;a++){let{type:u,next:c}=s.next[a];!u.isLeaf&&!u.hasRequiredAttrs()&&!(u.name in n)&&(!i.type||c.validEnd)&&(r.push({match:u.contentMatch,type:u,via:i}),n[u.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),e.map((r,i)=>{let s=i+(r.validEnd?"*":" ")+" ";for(let a=0;a<r.next.length;a++)s+=(a?", ":"")+r.next[a].type.name+"->"+e.indexOf(r.next[a].next);return s}).join(`
|
|
22
|
+
`)}}ra.empty=new ra(!0);class zU{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function D7(t){let e=[];do e.push(LU(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function LU(t){let e=[];do e.push(IU(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function IU(t){let e=KU(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=jU(t,e);else break;return e}function ME(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function jU(t,e){let n=ME(t),r=n;return t.eat(",")&&(t.next!="}"?r=ME(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function FU(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let i=[];for(let s in n){let a=n[s];a.isInGroup(e)&&i.push(a)}return i.length==0&&t.err("No node type or group '"+e+"' found"),i}function KU(t){if(t.eat("(")){let e=D7(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=FU(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function _U(t){let e=[[]];return i(s(t,0),n()),e;function n(){return e.push([])-1}function r(a,u,c){let f={term:c,to:u};return e[a].push(f),f}function i(a,u){a.forEach(c=>c.to=u)}function s(a,u){if(a.type=="choice")return a.exprs.reduce((c,f)=>c.concat(s(f,u)),[]);if(a.type=="seq")for(let c=0;;c++){let f=s(a.exprs[c],u);if(c==a.exprs.length-1)return f;i(f,u=n())}else if(a.type=="star"){let c=n();return r(u,c),i(s(a.expr,c),c),[r(c)]}else if(a.type=="plus"){let c=n();return i(s(a.expr,u),c),i(s(a.expr,c),c),[r(c)]}else{if(a.type=="opt")return[r(u)].concat(s(a.expr,u));if(a.type=="range"){let c=u;for(let f=0;f<a.min;f++){let h=n();i(s(a.expr,c),h),c=h}if(a.max==-1)i(s(a.expr,c),c);else for(let f=a.min;f<a.max;f++){let h=n();r(c,h),i(s(a.expr,c),h),c=h}return[r(c)]}else{if(a.type=="name")return[r(u,void 0,a.value)];throw new Error("Unknown expr type")}}}}function S7(t,e){return e-t}function NE(t,e){let n=[];return r(e),n.sort(S7);function r(i){let s=t[i];if(s.length==1&&!s[0].term)return r(s[0].to);n.push(i);for(let a=0;a<s.length;a++){let{term:u,to:c}=s[a];!u&&n.indexOf(c)==-1&&r(c)}}}function VU(t){let e=Object.create(null);return n(NE(t,0));function n(r){let i=[];r.forEach(a=>{t[a].forEach(({term:u,to:c})=>{if(!u)return;let f;for(let h=0;h<i.length;h++)i[h][0]==u&&(f=i[h][1]);NE(t,c).forEach(h=>{f||i.push([u,f=[]]),f.indexOf(h)==-1&&f.push(h)})})});let s=e[r.join(",")]=new ra(r.indexOf(t.length-1)>-1);for(let a=0;a<i.length;a++){let u=i[a][1].sort(S7);s.next.push({type:i[a][0],next:e[u.join(",")]||n(u)})}return s}}function HU(t,e){for(let n=0,r=[t];n<r.length;n++){let i=r[n],s=!i.validEnd,a=[];for(let u=0;u<i.next.length;u++){let{type:c,next:f}=i.next[u];a.push(c.name),s&&!(c.isText||c.hasRequiredAttrs())&&(s=!1),r.indexOf(f)==-1&&r.push(f)}s&&e.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function w7(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function $7(t,e){let n=Object.create(null);for(let r in t){let i=e&&e[r];if(i===void 0){let s=t[r];if(s.hasDefault)i=s.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function T7(t,e,n,r){for(let i in e)if(!(i in t))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${r}`);for(let i in t)t[i].validate&&t[i].validate(e[i])}function A7(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new qU(t,r,e[r]);return n}let RE=class B7{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=A7(e,r.attrs),this.defaultAttrs=w7(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==ra.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:$7(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Ps(this,this.computeAttrs(e),ae.from(n),st.setFrom(r))}createChecked(e=null,n,r){return n=ae.from(n),this.checkContent(n),new Ps(this,this.computeAttrs(e),n,st.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=ae.from(n),n.size){let a=this.contentMatch.fillBefore(n);if(!a)return null;n=a.append(n)}let i=this.contentMatch.matchFragment(n),s=i&&i.fillBefore(ae.empty,!0);return s?new Ps(this,e,n.append(s),st.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){T7(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:st.none:e}static compile(e,n){let r=Object.create(null);e.forEach((s,a)=>r[s]=new B7(s,n,a));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let s in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function UU(t,e,n){let r=n.split("|");return i=>{let s=i===null?"null":typeof i;if(r.indexOf(s)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${s}`)}}class qU{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?UU(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class zm{constructor(e,n,r,i){this.name=e,this.rank=n,this.schema=r,this.spec=i,this.attrs=A7(e,i.attrs),this.excluded=null;let s=w7(this.attrs);this.instance=s?new st(this,s):null}create(e=null){return!e&&this.instance?this.instance:new st(this,$7(this.attrs,e))}static compile(e,n){let r=Object.create(null),i=0;return e.forEach((s,a)=>r[s]=new zm(s,i++,n,a)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){T7(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class M7{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let i in e)n[i]=e[i];n.nodes=tn.from(e.nodes),n.marks=tn.from(e.marks||{}),this.nodes=RE.compile(this.spec.nodes,this),this.marks=zm.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let s=this.nodes[i],a=s.spec.content||"",u=s.spec.marks;if(s.contentMatch=r[a]||(r[a]=ra.parse(a,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=u=="_"?null:u?OE(this,u.split(" ")):u==""||!s.inlineContent?[]:null}for(let i in this.marks){let s=this.marks[i],a=s.spec.excludes;s.excluded=a==null?[s]:a==""?[]:OE(this,a.split(" "))}this.nodeFromJSON=i=>Ps.fromJSON(this,i),this.markFromJSON=i=>st.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof RE){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,i)}text(e,n){let r=this.nodes.text;return new Cp(r,r.defaultAttrs,e,st.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function OE(t,e){let n=[];for(let r=0;r<e.length;r++){let i=e[r],s=t.marks[i],a=s;if(s)n.push(s);else for(let u in t.marks){let c=t.marks[u];(i=="_"||c.spec.group&&c.spec.group.split(" ").indexOf(i)>-1)&&n.push(a=c)}if(!a)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function GU(t){return t.tag!=null}function WU(t){return t.style!=null}class Mi{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if(GU(i))this.tags.push(i);else if(WU(i)){let s=/[^=]*/.exec(i.style)[0];r.indexOf(s)<0&&r.push(s),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let s=e.nodes[i.node];return s.contentMatch.matchType(s)})}parse(e,n={}){let r=new zE(this,n,!1);return r.addAll(e,st.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new zE(this,n,!0);return r.addAll(e,st.none,n.from,n.to),pe.maxOpen(r.finish())}matchTag(e,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let s=this.tags[i];if(XU(e,s.tag)&&(s.namespace===void 0||e.namespaceURI==s.namespace)&&(!s.context||n.matchesContext(s.context))){if(s.getAttrs){let a=s.getAttrs(e);if(a===!1)continue;s.attrs=a||void 0}return s}}}matchStyle(e,n,r,i){for(let s=i?this.styles.indexOf(i)+1:0;s<this.styles.length;s++){let a=this.styles[s],u=a.style;if(!(u.indexOf(e)!=0||a.context&&!r.matchesContext(a.context)||u.length>e.length&&(u.charCodeAt(e.length)!=61||u.slice(e.length+1)!=n))){if(a.getAttrs){let c=a.getAttrs(n);if(c===!1)continue;a.attrs=c||void 0}return a}}}static schemaRules(e){let n=[];function r(i){let s=i.priority==null?50:i.priority,a=0;for(;a<n.length;a++){let u=n[a];if((u.priority==null?50:u.priority)<s)break}n.splice(a,0,i)}for(let i in e.marks){let s=e.marks[i].spec.parseDOM;s&&s.forEach(a=>{r(a=LE(a)),a.mark||a.ignore||a.clearMark||(a.mark=i)})}for(let i in e.nodes){let s=e.nodes[i].spec.parseDOM;s&&s.forEach(a=>{r(a=LE(a)),a.node||a.ignore||a.mark||(a.node=i)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Mi(e,Mi.schemaRules(e)))}}const N7={address:!0,article:!0,aside:!0,blockquote:!0,body:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},QU={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},R7={ol:!0,ul:!0},Zc=1,w4=2,Sc=4;function PE(t,e,n){return e!=null?(e?Zc:0)|(e==="full"?w4:0):t&&t.whitespace=="pre"?Zc|w4:n&~Sc}class mh{constructor(e,n,r,i,s,a){this.type=e,this.attrs=n,this.marks=r,this.solid=i,this.options=a,this.content=[],this.activeMarks=st.none,this.match=s||(a&Sc?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(ae.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Zc)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-i[0].length))}}let n=ae.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(ae.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!N7.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class zE{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=n.topNode,s,a=PE(null,n.preserveWhitespace,0)|(r?Sc:0);i?s=new mh(i.type,i.attrs,st.none,!0,n.topMatch||i.type.contentMatch,a):r?s=new mh(null,null,st.none,!0,null,a):s=new mh(e.schema.topNodeType,null,st.none,!0,null,a),this.nodes=[s],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,i=this.top,s=i.options&w4?"full":this.localPreserveWS||(i.options&Zc)>0,{schema:a}=this.parser;if(s==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(s)if(s==="full")r=r.replace(/\r\n?/g,`
|
|
23
|
+
`);else if(a.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(a.linebreakReplacement.create())){let u=r.split(/\r?\n|\r/);for(let c=0;c<u.length;c++)c&&this.insertNode(a.linebreakReplacement.create(),n,!0),u[c]&&this.insertNode(a.text(u[c]),n,!/\S/.test(u[c]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let u=i.content[i.content.length-1],c=e.previousSibling;(!u||c&&c.nodeName=="BR"||u.isText&&/[ \t\r\n\u000c]$/.test(u.text))&&(r=r.slice(1))}r&&this.insertNode(a.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let i=this.localPreserveWS,s=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let a=e.nodeName.toLowerCase(),u;R7.hasOwnProperty(a)&&this.parser.normalizeLists&&YU(e);let c=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(u=this.parser.matchTag(e,this,r));e:if(c?c.ignore:QU.hasOwnProperty(a))this.findInside(e),this.ignoreFallback(e,n);else if(!c||c.skip||c.closeParent){c&&c.closeParent?this.open=Math.max(0,this.open-1):c&&c.skip.nodeType&&(e=c.skip);let f,h=this.needsBlock;if(N7.hasOwnProperty(a))s.content.length&&s.content[0].isInline&&this.open&&(this.open--,s=this.top),f=!0,s.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let m=c&&c.skip?n:this.readStyles(e,n);m&&this.addAll(e,m),f&&this.sync(s),this.needsBlock=h}else{let f=this.readStyles(e,n);f&&this.addElementByRule(e,c,f,c.consuming===!1?u:void 0)}this.localPreserveWS=i}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
24
|
+
`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let s=this.parser.matchedStyles[i],a=r.getPropertyValue(s);if(a)for(let u=void 0;;){let c=this.parser.matchStyle(s,a,this,u);if(!c)break;if(c.ignore)return null;if(c.clearMark?n=n.filter(f=>!c.clearMark(f)):n=n.concat(this.parser.schema.marks[c.mark].create(c.attrs)),c.consuming===!1)u=c;else break}}return n}addElementByRule(e,n,r,i){let s,a;if(n.node)if(a=this.parser.schema.nodes[n.node],a.isLeaf)this.insertNode(a.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let c=this.enter(a,n.attrs||null,r,n.preserveWhitespace);c&&(s=!0,r=c)}else{let c=this.parser.schema.marks[n.mark];r=r.concat(c.create(n.attrs))}let u=this.top;if(a&&a.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(c=>this.insertNode(c,r,!1));else{let c=e;typeof n.contentElement=="string"?c=e.querySelector(n.contentElement):typeof n.contentElement=="function"?c=n.contentElement(e):n.contentElement&&(c=n.contentElement),this.findAround(e,c,!0),this.addAll(c,r),this.findAround(e,c,!1)}s&&this.sync(u)&&this.open--}addAll(e,n,r,i){let s=r||0;for(let a=r?e.childNodes[r]:e.firstChild,u=i==null?null:e.childNodes[i];a!=u;a=a.nextSibling,++s)this.findAtPoint(e,s),this.addDOM(a,n);this.findAtPoint(e,s)}findPlace(e,n,r){let i,s;for(let a=this.open,u=0;a>=0;a--){let c=this.nodes[a],f=c.findWrapping(e);if(f&&(!i||i.length>f.length+u)&&(i=f,s=c,!f.length))break;if(c.solid){if(r)break;u+=2}}if(!i)return null;this.sync(s);for(let a=0;a<i.length;a++)n=this.enterInner(i[a],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let s=this.textblockFromContext();s&&(n=this.enterInner(s,null,n))}let i=this.findPlace(e,n,r);if(i){this.closeExtra();let s=this.top;s.match&&(s.match=s.match.matchType(e.type));let a=st.none;for(let u of i.concat(e.marks))(s.type?s.type.allowsMarkType(u.type):IE(u.type,e.type))&&(a=u.addToSet(a));return s.content.push(e.mark(a)),!0}return!1}enter(e,n,r,i){let s=this.findPlace(e.create(n),r,!1);return s&&(s=this.enterInner(e,n,r,!0,i)),s}enterInner(e,n,r,i=!1,s){this.closeExtra();let a=this.top;a.match=a.match&&a.match.matchType(e);let u=PE(e,s,a.options);a.options&Sc&&a.content.length==0&&(u|=Sc);let c=st.none;return r=r.filter(f=>(a.type?a.type.allowsMarkType(f.type):IE(f.type,e))?(c=f.addToSet(c),!1):!0),this.nodes.push(new mh(e,n,c,i,null,u)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=Zc)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),s=-(r?r.depth+1:0)+(i?0:1),a=(u,c)=>{for(;u>=0;u--){let f=n[u];if(f==""){if(u==n.length-1||u==0)continue;for(;c>=s;c--)if(a(u-1,c))return!0;return!1}else{let h=c>0||c==0&&i?this.nodes[c].type:r&&c>=s?r.node(c-s).type:null;if(!h||h.name!=f&&!h.isInGroup(f))return!1;c--}}return!0};return a(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function YU(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&R7.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function XU(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function LE(t){let e={};for(let n in t)e[n]=t[n];return e}function IE(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let s=[],a=u=>{s.push(u);for(let c=0;c<u.edgeCount;c++){let{type:f,next:h}=u.edge(c);if(f==e||s.indexOf(h)<0&&a(h))return!0}};if(a(i.contentMatch))return!0}}class ya{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=gh(n).createDocumentFragment());let i=r,s=[];return e.forEach(a=>{if(s.length||a.marks.length){let u=0,c=0;for(;u<s.length&&c<a.marks.length;){let f=a.marks[c];if(!this.marks[f.type.name]){c++;continue}if(!f.eq(s[u][0])||f.type.spec.spanning===!1)break;u++,c++}for(;u<s.length;)i=s.pop()[1];for(;c<a.marks.length;){let f=a.marks[c++],h=this.serializeMark(f,a.isInline,n);h&&(s.push([f,i]),i.appendChild(h.dom),i=h.contentDOM||h.dom)}}i.appendChild(this.serializeNodeInner(a,n))}),r}serializeNodeInner(e,n){if(e.isText)return gh(n).createTextNode(e.text);let{dom:r,contentDOM:i}=Kh(gh(n),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,i)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let i=e.marks.length-1;i>=0;i--){let s=this.serializeMark(e.marks[i],e.isInline,n);s&&((s.contentDOM||s.dom).appendChild(r),r=s.dom)}return r}serializeMark(e,n,r={}){let i=this.marks[e.type.name];return i&&Kh(gh(r),i(e,n),null,e.attrs)}static renderSpec(e,n,r=null,i){return typeof n=="string"?{dom:e.createTextNode(n)}:Kh(e,n,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new ya(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=jE(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return jE(e.marks)}}function jE(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function gh(t){return t.document||window.document}const FE=new WeakMap;function JU(t){let e=FE.get(t);return e===void 0&&FE.set(t,e=ZU(t)),e}function ZU(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let i=0;i<r.length;i++)n(r[i]);else for(let i in r)n(r[i])}return n(t),e}function Kh(t,e,n,r){if(e.nodeType==1)return{dom:e};if(e.dom&&e.dom.nodeType==1)return e;let i=e[0],s;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(s=JU(r))&&s.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let a=i.indexOf(" ");a>0&&(n=i.slice(0,a),i=i.slice(a+1));let u,c=n?t.createElementNS(n,i):t.createElement(i),f=e[1],h=1;if(f&&typeof f=="object"&&f.nodeType==null&&!Array.isArray(f)){h=2;for(let m in f)if(f[m]!=null){let g=m.indexOf(" ");g>0?c.setAttributeNS(m.slice(0,g),m.slice(g+1),f[m]):m=="style"&&c.style?c.style.cssText=f[m]:c.setAttribute(m,f[m])}}for(let m=h;m<e.length;m++){let g=e[m];if(g===0){if(m<e.length-1||m>h)throw new RangeError("Content hole must be the only child of its parent node");return{dom:c,contentDOM:c}}else if(typeof g=="string")c.appendChild(t.createTextNode(g));else{let{dom:b,contentDOM:x}=Kh(t,g,n,r);if(c.appendChild(b),x){if(u)throw new RangeError("Multiple content holes");u=x}}}return{dom:c,contentDOM:u}}const O7=65535,P7=Math.pow(2,16);function eq(t,e){return t+e*P7}function KE(t){return t&O7}function tq(t){return(t-(t&O7))/P7}const z7=1,L7=2,_h=4,I7=8;class $4{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&I7)>0}get deletedBefore(){return(this.delInfo&(z7|_h))>0}get deletedAfter(){return(this.delInfo&(L7|_h))>0}get deletedAcross(){return(this.delInfo&_h)>0}}class Wn{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Wn.empty)return Wn.empty}recover(e){let n=0,r=KE(e);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+tq(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let i=0,s=this.inverted?2:1,a=this.inverted?1:2;for(let u=0;u<this.ranges.length;u+=3){let c=this.ranges[u]-(this.inverted?i:0);if(c>e)break;let f=this.ranges[u+s],h=this.ranges[u+a],m=c+f;if(e<=m){let g=f?e==c?-1:e==m?1:n:n,b=c+i+(g<0?0:h);if(r)return b;let x=e==(n<0?c:m)?null:eq(u/3,e-c),k=e==c?L7:e==m?z7:_h;return(n<0?e!=c:e!=m)&&(k|=I7),new $4(b,k,x)}i+=h-f}return r?e+i:new $4(e+i,0,null)}touches(e,n){let r=0,i=KE(n),s=this.inverted?2:1,a=this.inverted?1:2;for(let u=0;u<this.ranges.length;u+=3){let c=this.ranges[u]-(this.inverted?r:0);if(c>e)break;let f=this.ranges[u+s],h=c+f;if(e<=h&&u==i*3)return!0;r+=this.ranges[u+a]-f}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,s=0;i<this.ranges.length;i+=3){let a=this.ranges[i],u=a-(this.inverted?s:0),c=a+(this.inverted?0:s),f=this.ranges[i+n],h=this.ranges[i+r];e(u,u+f,c,c+h),s+=h-f}}invert(){return new Wn(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Wn.empty:new Wn(e<0?[0,-e,0]:[0,0,e])}}Wn.empty=new Wn([]);class ed{constructor(e,n,r=0,i=e?e.length:0){this.mirror=n,this.from=r,this.to=i,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new ed(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let i=e.getMirror(n);this.appendMap(e._maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let i=e.getMirror(n);this.appendMap(e._maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let e=new ed;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let i=0;for(let s=this.from;s<this.to;s++){let a=this._maps[s],u=a.mapResult(e,n);if(u.recover!=null){let c=this.getMirror(s);if(c!=null&&c>s&&c<this.to){s=c,e=this._maps[c].recover(u.recover);continue}}i|=u.delInfo,e=u.pos}return r?e:new $4(e,i,null)}}const ty=Object.create(null);class pn{getMap(){return Wn.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=ty[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in ty)throw new RangeError("Duplicate use of step JSON ID "+e);return ty[e]=n,n.prototype.jsonID=e,n}}class zt{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new zt(e,null)}static fail(e){return new zt(null,e)}static fromReplace(e,n,r,i){try{return zt.ok(e.replace(n,r,i))}catch(s){if(s instanceof Xc)return zt.fail(s.message);throw s}}}function mx(t,e,n){let r=[];for(let i=0;i<t.childCount;i++){let s=t.child(i);s.content.size&&(s=s.copy(mx(s.content,e,s))),s.isInline&&(s=e(s,n,i)),r.push(s)}return ae.fromArray(r)}class Bs extends pn{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),s=new pe(mx(n.content,(a,u)=>!a.isAtom||!u.type.allowsMarkType(this.mark.type)?a:a.mark(this.mark.addToSet(a.marks)),i),n.openStart,n.openEnd);return zt.fromReplace(e,this.from,this.to,s)}invert(){return new $r(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Bs(n.pos,r.pos,this.mark)}merge(e){return e instanceof Bs&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Bs(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Bs(n.from,n.to,e.markFromJSON(n.mark))}}pn.jsonID("addMark",Bs);class $r extends pn{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new pe(mx(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),n.openStart,n.openEnd);return zt.fromReplace(e,this.from,this.to,r)}invert(){return new Bs(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new $r(n.pos,r.pos,this.mark)}merge(e){return e instanceof $r&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new $r(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new $r(n.from,n.to,e.markFromJSON(n.mark))}}pn.jsonID("removeMark",$r);class Ms extends pn{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return zt.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return zt.fromReplace(e,this.pos,this.pos+1,new pe(ae.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new Ms(this.pos,n.marks[i]);return new Ms(this.pos,this.mark)}}return new ia(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Ms(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Ms(n.pos,e.markFromJSON(n.mark))}}pn.jsonID("addNodeMark",Ms);class ia extends pn{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return zt.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return zt.fromReplace(e,this.pos,this.pos+1,new pe(ae.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new Ms(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new ia(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new ia(n.pos,e.markFromJSON(n.mark))}}pn.jsonID("removeNodeMark",ia);class Ot extends pn{constructor(e,n,r,i=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=i}apply(e){return this.structure&&T4(e,this.from,this.to)?zt.fail("Structure replace would overwrite content"):zt.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Wn([this.from,this.to-this.from,this.slice.size])}invert(e){return new Ot(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.to,-1),r=this.from==this.to&&Ot.MAP_BIAS<0?n:e.mapResult(this.from,1);return r.deletedAcross&&n.deletedAcross?null:new Ot(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof Ot)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?pe.empty:new pe(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Ot(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?pe.empty:new pe(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Ot(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Ot(n.from,n.to,pe.fromJSON(e,n.slice),!!n.structure)}}Ot.MAP_BIAS=1;pn.jsonID("replace",Ot);class Gt extends pn{constructor(e,n,r,i,s,a,u=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=s,this.insert=a,this.structure=u}apply(e){if(this.structure&&(T4(e,this.from,this.gapFrom)||T4(e,this.gapTo,this.to)))return zt.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return zt.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?zt.fromReplace(e,this.from,this.to,r):zt.fail("Content does not fit in gap")}getMap(){return new Wn([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new Gt(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),s=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||s>r.pos?null:new Gt(n.pos,r.pos,i,s,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Gt(n.from,n.to,n.gapFrom,n.gapTo,pe.fromJSON(e,n.slice),n.insert,!!n.structure)}}pn.jsonID("replaceAround",Gt);function T4(t,e,n){let r=t.resolve(e),i=n-e,s=r.depth;for(;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i--;if(i>0){let a=r.node(s).maybeChild(r.indexAfter(s));for(;i>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,i--}}return!1}function nq(t,e,n,r){let i=[],s=[],a,u;t.doc.nodesBetween(e,n,(c,f,h)=>{if(!c.isInline)return;let m=c.marks;if(!r.isInSet(m)&&h.type.allowsMarkType(r.type)){let g=Math.max(f,e),b=Math.min(f+c.nodeSize,n),x=r.addToSet(m);for(let k=0;k<m.length;k++)m[k].isInSet(x)||(a&&a.to==g&&a.mark.eq(m[k])?a.to=b:i.push(a=new $r(g,b,m[k])));u&&u.to==g?u.to=b:s.push(u=new Bs(g,b,r))}}),i.forEach(c=>t.step(c)),s.forEach(c=>t.step(c))}function rq(t,e,n,r){let i=[],s=0;t.doc.nodesBetween(e,n,(a,u)=>{if(!a.isInline)return;s++;let c=null;if(r instanceof zm){let f=a.marks,h;for(;h=r.isInSet(f);)(c||(c=[])).push(h),f=h.removeFromSet(f)}else r?r.isInSet(a.marks)&&(c=[r]):c=a.marks;if(c&&c.length){let f=Math.min(u+a.nodeSize,n);for(let h=0;h<c.length;h++){let m=c[h],g;for(let b=0;b<i.length;b++){let x=i[b];x.step==s-1&&m.eq(i[b].style)&&(g=x)}g?(g.to=f,g.step=s):i.push({style:m,from:Math.max(u,e),to:f,step:s})}}}),i.forEach(a=>t.step(new $r(a.from,a.to,a.style)))}function gx(t,e,n,r=n.contentMatch,i=!0){let s=t.doc.nodeAt(e),a=[],u=e+1;for(let c=0;c<s.childCount;c++){let f=s.child(c),h=u+f.nodeSize,m=r.matchType(f.type);if(!m)a.push(new Ot(u,h,pe.empty));else{r=m;for(let g=0;g<f.marks.length;g++)n.allowsMarkType(f.marks[g].type)||t.step(new $r(u,h,f.marks[g]));if(i&&f.isText&&n.whitespace!="pre"){let g,b=/\r?\n|\r/g,x;for(;g=b.exec(f.text);)x||(x=new pe(ae.from(n.schema.text(" ",n.allowedMarks(f.marks))),0,0)),a.push(new Ot(u+g.index,u+g.index+g[0].length,x))}}u=h}if(!r.validEnd){let c=r.fillBefore(ae.empty,!0);t.replace(u,u,new pe(c,0,0))}for(let c=a.length-1;c>=0;c--)t.step(a[c])}function iq(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function Ql(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,i=0,s=0;;--r){let a=t.$from.node(r),u=t.$from.index(r)+i,c=t.$to.indexAfter(r)-s;if(r<t.depth&&a.canReplace(u,c,n))return r;if(r==0||a.type.spec.isolating||!iq(a,u,c))break;u&&(i=1),c<a.childCount&&(s=1)}return null}function sq(t,e,n){let{$from:r,$to:i,depth:s}=e,a=r.before(s+1),u=i.after(s+1),c=a,f=u,h=ae.empty,m=0;for(let x=s,k=!1;x>n;x--)k||r.index(x)>0?(k=!0,h=ae.from(r.node(x).copy(h)),m++):c--;let g=ae.empty,b=0;for(let x=s,k=!1;x>n;x--)k||i.after(x+1)<i.end(x)?(k=!0,g=ae.from(i.node(x).copy(g)),b++):f++;t.step(new Gt(c,f,a,u,new pe(h.append(g),m,b),h.size-m,!0))}function bx(t,e,n=null,r=t){let i=oq(t,e),s=i&&aq(r,e);return s?i.map(_E).concat({type:e,attrs:n}).concat(s.map(_E)):null}function _E(t){return{type:t,attrs:null}}function oq(t,e){let{parent:n,startIndex:r,endIndex:i}=t,s=n.contentMatchAt(r).findWrapping(e);if(!s)return null;let a=s.length?s[0]:e;return n.canReplaceWith(r,i,a)?s:null}function aq(t,e){let{parent:n,startIndex:r,endIndex:i}=t,s=n.child(r),a=e.contentMatch.findWrapping(s.type);if(!a)return null;let c=(a.length?a[a.length-1]:e).contentMatch;for(let f=r;c&&f<i;f++)c=c.matchType(n.child(f).type);return!c||!c.validEnd?null:a}function lq(t,e,n){let r=ae.empty;for(let a=n.length-1;a>=0;a--){if(r.size){let u=n[a].type.contentMatch.matchFragment(r);if(!u||!u.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=ae.from(n[a].type.create(n[a].attrs,r))}let i=e.start,s=e.end;t.step(new Gt(i,s,i,s,new pe(r,0,0),n.length,!0))}function uq(t,e,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=t.steps.length;t.doc.nodesBetween(e,n,(a,u)=>{let c=typeof i=="function"?i(a):i;if(a.isTextblock&&!a.hasMarkup(r,c)&&cq(t.doc,t.mapping.slice(s).map(u),r)){let f=null;if(r.schema.linebreakReplacement){let b=r.whitespace=="pre",x=!!r.contentMatch.matchType(r.schema.linebreakReplacement);b&&!x?f=!1:!b&&x&&(f=!0)}f===!1&&F7(t,a,u,s),gx(t,t.mapping.slice(s).map(u,1),r,void 0,f===null);let h=t.mapping.slice(s),m=h.map(u,1),g=h.map(u+a.nodeSize,1);return t.step(new Gt(m,g,m+1,g-1,new pe(ae.from(r.create(c,null,a.marks)),0,0),1,!0)),f===!0&&j7(t,a,u,s),!1}})}function j7(t,e,n,r){e.forEach((i,s)=>{if(i.isText){let a,u=/\r?\n|\r/g;for(;a=u.exec(i.text);){let c=t.mapping.slice(r).map(n+1+s+a.index);t.replaceWith(c,c+1,e.type.schema.linebreakReplacement.create())}}})}function F7(t,e,n,r){e.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let a=t.mapping.slice(r).map(n+1+s);t.replaceWith(a,a+1,e.type.schema.text(`
|
|
25
|
+
`))}})}function cq(t,e,n){let r=t.resolve(e),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function dq(t,e,n,r,i){let s=t.doc.nodeAt(e);if(!s)throw new RangeError("No node at given position");n||(n=s.type);let a=n.create(r,null,i||s.marks);if(s.isLeaf)return t.replaceWith(e,e+s.nodeSize,a);if(!n.validContent(s.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new Gt(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new pe(ae.from(a),0,0),1,!0))}function Ni(t,e,n=1,r){let i=t.resolve(e),s=i.depth-n,a=r&&r[r.length-1]||i.parent;if(s<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!a.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let f=i.depth-1,h=n-2;f>s;f--,h--){let m=i.node(f),g=i.index(f);if(m.type.spec.isolating)return!1;let b=m.content.cutByIndex(g,m.childCount),x=r&&r[h+1];x&&(b=b.replaceChild(0,x.type.create(x.attrs)));let k=r&&r[h]||m;if(!m.canReplace(g+1,m.childCount)||!k.type.validContent(b))return!1}let u=i.indexAfter(s),c=r&&r[0];return i.node(s).canReplaceWith(u,u,c?c.type:i.node(s+1).type)}function fq(t,e,n=1,r){let i=t.doc.resolve(e),s=ae.empty,a=ae.empty;for(let u=i.depth,c=i.depth-n,f=n-1;u>c;u--,f--){s=ae.from(i.node(u).copy(s));let h=r&&r[f];a=ae.from(h?h.type.create(h.attrs,a):i.node(u).copy(a))}t.step(new Ot(e,e,new pe(s.append(a),n,n),!0))}function to(t,e){let n=t.resolve(e),r=n.index();return K7(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function hq(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let i=0;i<e.childCount;i++){let s=e.child(i),a=s.type==r?t.type.schema.nodes.text:s.type;if(n=n.matchType(a),!n||!t.type.allowsMarks(s.marks))return!1}return n.validEnd}function K7(t,e){return!!(t&&e&&!t.isLeaf&&hq(t,e))}function Lm(t,e,n=-1){let r=t.resolve(e);for(let i=r.depth;;i--){let s,a,u=r.index(i);if(i==r.depth?(s=r.nodeBefore,a=r.nodeAfter):n>0?(s=r.node(i+1),u++,a=r.node(i).maybeChild(u)):(s=r.node(i).maybeChild(u-1),a=r.node(i+1)),s&&!s.isTextblock&&K7(s,a)&&r.node(i).canReplace(u,u+1))return e;if(i==0)break;e=n<0?r.before(i):r.after(i)}}function pq(t,e,n){let r=null,{linebreakReplacement:i}=t.doc.type.schema,s=t.doc.resolve(e-n),a=s.node().type;if(i&&a.inlineContent){let h=a.whitespace=="pre",m=!!a.contentMatch.matchType(i);h&&!m?r=!1:!h&&m&&(r=!0)}let u=t.steps.length;if(r===!1){let h=t.doc.resolve(e+n);F7(t,h.node(),h.before(),u)}a.inlineContent&&gx(t,e+n-1,a,s.node().contentMatchAt(s.index()),r==null);let c=t.mapping.slice(u),f=c.map(e-n);if(t.step(new Ot(f,c.map(e+n,-1),pe.empty,!0)),r===!0){let h=t.doc.resolve(f);j7(t,h.node(),h.before(),t.steps.length)}return t}function mq(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let i=r.depth-1;i>=0;i--){let s=r.index(i);if(r.node(i).canReplaceWith(s,s,n))return r.before(i+1);if(s>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let s=r.indexAfter(i);if(r.node(i).canReplaceWith(s,s,n))return r.after(i+1);if(s<r.node(i).childCount)return null}return null}function _7(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let i=n.content;for(let s=0;s<n.openStart;s++)i=i.firstChild.content;for(let s=1;s<=(n.openStart==0&&n.size?2:1);s++)for(let a=r.depth;a>=0;a--){let u=a==r.depth?0:r.pos<=(r.start(a+1)+r.end(a+1))/2?-1:1,c=r.index(a)+(u>0?1:0),f=r.node(a),h=!1;if(s==1)h=f.canReplace(c,c,i);else{let m=f.contentMatchAt(c).findWrapping(i.firstChild.type);h=m&&f.canReplaceWith(c,c,m[0])}if(h)return u==0?r.pos:u<0?r.before(a+1):r.after(a+1)}return null}function Im(t,e,n=e,r=pe.empty){if(e==n&&!r.size)return null;let i=t.resolve(e),s=t.resolve(n);return V7(i,s,r)?new Ot(e,n,r):new gq(i,s,r).fit()}function V7(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class gq{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=ae.empty;for(let i=0;i<=e.depth;i++){let s=e.node(i);this.frontier.push({type:s.type,match:s.contentMatchAt(e.indexAfter(i))})}for(let i=e.depth;i>0;i--)this.placed=ae.from(e.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let f=this.findFittable();f?this.placeNodes(f):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(e<0?this.$to:r.doc.resolve(e));if(!i)return null;let s=this.placed,a=r.depth,u=i.depth;for(;a&&u&&s.childCount==1;)s=s.firstChild.content,a--,u--;let c=new pe(s,a,u);return e>-1?new Gt(r.pos,e,this.$to.pos,this.$to.end(),c,n):c.size||r.pos!=this.$to.pos?new Ot(r.pos,i.pos,c):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<e;r++){let s=n.firstChild;if(n.childCount>1&&(i=0),s.type.spec.isolating&&i<=r){e=r;break}n=s.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let i,s=null;r?(s=ny(this.unplaced.content,r-1).firstChild,i=s.content):i=this.unplaced.content;let a=i.firstChild;for(let u=this.depth;u>=0;u--){let{type:c,match:f}=this.frontier[u],h,m=null;if(n==1&&(a?f.matchType(a.type)||(m=f.fillBefore(ae.from(a),!1)):s&&c.compatibleContent(s.type)))return{sliceDepth:r,frontierDepth:u,parent:s,inject:m};if(n==2&&a&&(h=f.findWrapping(a.type)))return{sliceDepth:r,frontierDepth:u,parent:s,wrap:h};if(s&&f.matchType(s.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,i=ny(e,n);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new pe(e,n+1,Math.max(r,i.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,i=ny(e,n);if(i.childCount<=1&&n>0){let s=e.size-n<=n+i.size;this.unplaced=new pe(uc(e,n-1,1),n-1,s?n-1:r)}else this.unplaced=new pe(uc(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:i,wrap:s}){for(;this.depth>n;)this.closeFrontierNode();if(s)for(let k=0;k<s.length;k++)this.openFrontierNode(s[k]);let a=this.unplaced,u=r?r.content:a.content,c=a.openStart-e,f=0,h=[],{match:m,type:g}=this.frontier[n];if(i){for(let k=0;k<i.childCount;k++)h.push(i.child(k));m=m.matchFragment(i)}let b=u.size+e-(a.content.size-a.openEnd);for(;f<u.childCount;){let k=u.child(f),E=m.matchType(k.type);if(!E)break;f++,(f>1||c==0||k.content.size)&&(m=E,h.push(H7(k.mark(g.allowedMarks(k.marks)),f==1?c:0,f==u.childCount?b:-1)))}let x=f==u.childCount;x||(b=-1),this.placed=cc(this.placed,n,ae.from(h)),this.frontier[n].match=m,x&&b<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let k=0,E=u;k<b;k++){let D=E.lastChild;this.frontier.push({type:D.type,match:D.contentMatchAt(D.childCount)}),E=D.content}this.unplaced=x?e==0?pe.empty:new pe(uc(a.content,e-1,1),e-1,b<0?a.openEnd:e-1):new pe(uc(a.content,e,f),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!ry(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:i}=this.frontier[n],s=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),a=ry(e,n,i,r,s);if(a){for(let u=n-1;u>=0;u--){let{match:c,type:f}=this.frontier[u],h=ry(e,u,f,c,!0);if(!h||h.childCount)continue e}return{depth:n,fit:a,move:s?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=cc(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let i=e.node(r),s=i.type.contentMatch.fillBefore(i.content,!0,e.index(r));this.openFrontierNode(i.type,i.attrs,s)}return e}openFrontierNode(e,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=cc(this.placed,this.depth,ae.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(ae.empty,!0);n.childCount&&(this.placed=cc(this.placed,this.frontier.length,n))}}function uc(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(uc(t.firstChild.content,e-1,n)))}function cc(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(cc(t.lastChild.content,e-1,n)))}function ny(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function H7(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,H7(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(ae.empty,!0)))),t.copy(r)}function ry(t,e,n,r,i){let s=t.node(e),a=i?t.indexAfter(e):t.index(e);if(a==s.childCount&&!n.compatibleContent(s.type))return null;let u=r.fillBefore(s.content,!0,a);return u&&!bq(n,s.content,a)?u:null}function bq(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function yq(t){return t.spec.defining||t.spec.definingForContent}function xq(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let i=t.doc.resolve(e),s=t.doc.resolve(n);if(V7(i,s,r))return t.step(new Ot(e,n,r));let a=q7(i,s);a[a.length-1]==0&&a.pop();let u=-(i.depth+1);a.unshift(u);for(let g=i.depth,b=i.pos-1;g>0;g--,b--){let x=i.node(g).type.spec;if(x.defining||x.definingAsContext||x.isolating)break;a.indexOf(g)>-1?u=g:i.before(g)==b&&a.splice(1,0,-g)}let c=a.indexOf(u),f=[],h=r.openStart;for(let g=r.content,b=0;;b++){let x=g.firstChild;if(f.push(x),b==r.openStart)break;g=x.content}for(let g=h-1;g>=0;g--){let b=f[g],x=yq(b.type);if(x&&!b.sameMarkup(i.node(Math.abs(u)-1)))h=g;else if(x||!b.type.isTextblock)break}for(let g=r.openStart;g>=0;g--){let b=(g+h+1)%(r.openStart+1),x=f[b];if(x)for(let k=0;k<a.length;k++){let E=a[(k+c)%a.length],D=!0;E<0&&(D=!1,E=-E);let T=i.node(E-1),$=i.index(E-1);if(T.canReplaceWith($,$,x.type,x.marks))return t.replace(i.before(E),D?s.after(E):n,new pe(U7(r.content,0,r.openStart,b),b,r.openEnd))}}let m=t.steps.length;for(let g=a.length-1;g>=0&&(t.replace(e,n,r),!(t.steps.length>m));g--){let b=a[g];b<0||(e=i.before(b),n=s.after(b))}}function U7(t,e,n,r,i){if(e<n){let s=t.firstChild;t=t.replaceChild(0,s.copy(U7(s.content,e+1,n,r,s)))}if(e>r){let s=i.contentMatchAt(0),a=s.fillBefore(t).append(t);t=a.append(s.matchFragment(a).fillBefore(ae.empty,!0))}return t}function vq(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let i=mq(t.doc,e,r.type);i!=null&&(e=n=i)}t.replaceRange(e,n,new pe(ae.from(r),0,0))}function kq(t,e,n){let r=t.doc.resolve(e),i=t.doc.resolve(n);if(r.parent.isTextblock&&i.parent.isTextblock&&r.start()!=i.start()&&r.parentOffset==0&&i.parentOffset==0){let a=r.sharedDepth(n),u=!1;for(let c=r.depth;c>a;c--)r.node(c).type.spec.isolating&&(u=!0);for(let c=i.depth;c>a;c--)i.node(c).type.spec.isolating&&(u=!0);if(!u){for(let c=r.depth;c>0&&e==r.start(c);c--)e=r.before(c);for(let c=i.depth;c>0&&n==i.start(c);c--)n=i.before(c);r=t.doc.resolve(e),i=t.doc.resolve(n)}}let s=q7(r,i);for(let a=0;a<s.length;a++){let u=s[a],c=a==s.length-1;if(c&&u==0||r.node(u).type.contentMatch.validEnd)return t.delete(r.start(u),i.end(u));if(u>0&&(c||r.node(u-1).canReplace(r.index(u-1),i.indexAfter(u-1))))return t.delete(r.before(u),i.after(u))}for(let a=1;a<=r.depth&&a<=i.depth;a++)if(e-r.start(a)==r.depth-a&&n>r.end(a)&&i.end(a)-n!=i.depth-a&&r.start(a-1)==i.start(a-1)&&r.node(a-1).canReplace(r.index(a-1),i.index(a-1)))return t.delete(r.before(a),n);t.delete(e,n)}function q7(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let i=r;i>=0;i--){let s=t.start(i);if(s<t.pos-(t.depth-i)||e.end(i)>e.pos+(e.depth-i)||t.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(s==e.start(i)||i==t.depth&&i==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==s-1)&&n.push(i)}return n}class Dl extends pn{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return zt.fail("No node at attribute step's position");let r=Object.create(null);for(let s in n.attrs)r[s]=n.attrs[s];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return zt.fromReplace(e,this.pos,this.pos+1,new pe(ae.from(i),0,n.isLeaf?0:1))}getMap(){return Wn.empty}invert(e){return new Dl(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Dl(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Dl(n.pos,n.attr,n.value)}}pn.jsonID("attr",Dl);class td extends pn{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let i in e.attrs)n[i]=e.attrs[i];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return zt.ok(r)}getMap(){return Wn.empty}invert(e){return new td(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new td(n.attr,n.value)}}pn.jsonID("docAttr",td);let Nl=class extends Error{};Nl=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};Nl.prototype=Object.create(Error.prototype);Nl.prototype.constructor=Nl;Nl.prototype.name="TransformError";class G7{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new ed}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new Nl(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,n=-1e9;for(let r=0;r<this.mapping.maps.length;r++){let i=this.mapping.maps[r];r&&(e=i.map(e,1),n=i.map(n,-1)),i.forEach((s,a,u,c)=>{e=Math.min(e,u),n=Math.max(n,c)})}return e==1e9?null:{from:e,to:n}}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=pe.empty){let i=Im(this.doc,e,n,r);return i&&this.step(i),this}replaceWith(e,n,r){return this.replace(e,n,new pe(ae.from(r),0,0))}delete(e,n){return this.replace(e,n,pe.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return xq(this,e,n,r),this}replaceRangeWith(e,n,r){return vq(this,e,n,r),this}deleteRange(e,n){return kq(this,e,n),this}lift(e,n){return sq(this,e,n),this}join(e,n=1){return pq(this,e,n),this}wrap(e,n){return lq(this,e,n),this}setBlockType(e,n=e,r,i=null){return uq(this,e,n,r,i),this}setNodeMarkup(e,n,r=null,i){return dq(this,e,n,r,i),this}setNodeAttribute(e,n,r){return this.step(new Dl(e,n,r)),this}setDocAttribute(e,n){return this.step(new td(e,n)),this}addNodeMark(e,n){return this.step(new Ms(e,n)),this}removeNodeMark(e,n){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n instanceof st)n.isInSet(r.marks)&&this.step(new ia(e,n));else{let i=r.marks,s,a=[];for(;s=n.isInSet(i);)a.push(new ia(e,s)),i=s.removeFromSet(i);for(let u=a.length-1;u>=0;u--)this.step(a[u])}return this}split(e,n=1,r){return fq(this,e,n,r),this}addMark(e,n,r){return nq(this,e,n,r),this}removeMark(e,n,r){return rq(this,e,n,r),this}clearIncompatible(e,n,r){return gx(this,e,n,r),this}}const iy=Object.create(null);class Ne{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new Cq(e.min(n),e.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=pe.empty){let r=n.content.lastChild,i=null;for(let u=0;u<n.openEnd;u++)i=r,r=r.lastChild;let s=e.steps.length,a=this.ranges;for(let u=0;u<a.length;u++){let{$from:c,$to:f}=a[u],h=e.mapping.slice(s);e.replaceRange(h.map(c.pos),h.map(f.pos),u?pe.empty:n),u==0&&UE(e,s,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,i=this.ranges;for(let s=0;s<i.length;s++){let{$from:a,$to:u}=i[s],c=e.mapping.slice(r),f=c.map(a.pos),h=c.map(u.pos);s?e.deleteRange(f,h):(e.replaceRangeWith(f,h,n),UE(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let i=e.parent.inlineContent?new De(e):hl(e.node(0),e.parent,e.pos,e.index(),n,r);if(i)return i;for(let s=e.depth-1;s>=0;s--){let a=n<0?hl(e.node(0),e.node(s),e.before(s+1),e.index(s),n,r):hl(e.node(0),e.node(s),e.after(s+1),e.index(s)+1,n,r);if(a)return a}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new Yn(e.node(0))}static atStart(e){return hl(e,e,0,0,1)||new Yn(e)}static atEnd(e){return hl(e,e,e.content.size,e.childCount,-1)||new Yn(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=iy[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in iy)throw new RangeError("Duplicate use of selection JSON ID "+e);return iy[e]=n,n.prototype.jsonID=e,n}getBookmark(){return De.between(this.$anchor,this.$head).getBookmark()}}Ne.prototype.visible=!0;class Cq{constructor(e,n){this.$from=e,this.$to=n}}let VE=!1;function HE(t){!VE&&!t.parent.inlineContent&&(VE=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class De extends Ne{constructor(e,n=e){HE(e),HE(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return Ne.near(r);let i=e.resolve(n.map(this.anchor));return new De(i.parent.inlineContent?i:r,r)}replace(e,n=pe.empty){if(super.replace(e,n),n==pe.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof De&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new jm(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new De(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let i=e.resolve(n);return new this(i,r==n?i:e.resolve(r))}static between(e,n,r){let i=e.pos-n.pos;if((!r||i)&&(r=i>=0?1:-1),!n.parent.inlineContent){let s=Ne.findFrom(n,r,!0)||Ne.findFrom(n,-r,!0);if(s)n=s.$head;else return Ne.near(n,r)}return e.parent.inlineContent||(i==0?e=n:(e=(Ne.findFrom(e,-r,!0)||Ne.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=i<0&&(e=n))),new De(e,n)}}Ne.jsonID("text",De);class jm{constructor(e,n){this.anchor=e,this.head=n}map(e){return new jm(e.map(this.anchor),e.map(this.head))}resolve(e){return De.between(e.resolve(this.anchor),e.resolve(this.head))}}class ke extends Ne{constructor(e){let n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);super(e,r),this.node=n}map(e,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),s=e.resolve(i);return r?Ne.near(s):new ke(s)}content(){return new pe(ae.from(this.node),0,0)}eq(e){return e instanceof ke&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new yx(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new ke(e.resolve(n.anchor))}static create(e,n){return new ke(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}ke.prototype.visible=!1;Ne.jsonID("node",ke);class yx{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new jm(r,r):new yx(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&ke.isSelectable(r)?new ke(n):Ne.near(n)}}class Yn extends Ne{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=pe.empty){if(n==pe.empty){e.delete(0,e.doc.content.size);let r=Ne.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new Yn(e)}map(e){return new Yn(e)}eq(e){return e instanceof Yn}getBookmark(){return Eq}}Ne.jsonID("all",Yn);const Eq={map(){return this},resolve(t){return new Yn(t)}};function hl(t,e,n,r,i,s=!1){if(e.inlineContent)return De.create(t,n);for(let a=r-(i>0?0:1);i>0?a<e.childCount:a>=0;a+=i){let u=e.child(a);if(u.isAtom){if(!s&&ke.isSelectable(u))return ke.create(t,n-(i<0?u.nodeSize:0))}else{let c=hl(t,u,n+i,i<0?u.childCount:0,i,s);if(c)return c}n+=u.nodeSize*i}return null}function UE(t,e,n){let r=t.steps.length-1;if(r<e)return;let i=t.steps[r];if(!(i instanceof Ot||i instanceof Gt))return;let s=t.mapping.maps[r],a;s.forEach((u,c,f,h)=>{a==null&&(a=h)}),t.setSelection(Ne.near(t.doc.resolve(a),n))}const qE=1,bh=2,GE=4;class Dq extends G7{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|qE)&~bh,this.storedMarks=null,this}get selectionSet(){return(this.updated&qE)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=bh,this}ensureMarks(e){return st.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&bh)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~bh,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||st.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let i=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),!e)return this.deleteRange(n,r);let s=this.storedMarks;if(!s){let a=this.doc.resolve(n);s=r==n?a.marks():a.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,i.text(e,s)),!this.selection.empty&&this.selection.to==n+e.length&&this.setSelection(Ne.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=GE,this}get scrolledIntoView(){return(this.updated&GE)>0}}function WE(t,e){return!e||!t?t:t.bind(e)}class dc{constructor(e,n,r){this.name=e,this.init=WE(n.init,r),this.apply=WE(n.apply,r)}}const Sq=[new dc("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new dc("selection",{init(t,e){return t.selection||Ne.atStart(e.doc)},apply(t){return t.selection}}),new dc("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new dc("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class sy{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Sq.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new dc(r.key,r.spec.state,r))})}}class Lo{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let i=this.config.plugins[r];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],r=this.applyInner(e),i=null;for(;;){let s=!1;for(let a=0;a<this.config.plugins.length;a++){let u=this.config.plugins[a];if(u.spec.appendTransaction){let c=i?i[a].n:0,f=i?i[a].state:this,h=c<n.length&&u.spec.appendTransaction.call(u,c?n.slice(c):n,f,r);if(h&&r.filterTransaction(h,a)){if(h.setMeta("appendedTransaction",e),!i){i=[];for(let m=0;m<this.config.plugins.length;m++)i.push(m<a?{state:r,n:n.length}:{state:this,n:0})}n.push(h),r=r.applyInner(h),s=!0}i&&(i[a]={state:r,n:n.length})}}if(!s)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new Lo(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let s=r[i];n[s.name]=s.apply(e,this[s.name],this,n)}return n}get tr(){return new Dq(this)}static create(e){let n=new sy(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new Lo(n);for(let i=0;i<n.fields.length;i++)r[n.fields[i].name]=n.fields[i].init(e,r);return r}reconfigure(e){let n=new sy(this.schema,e.plugins),r=n.fields,i=new Lo(n);for(let s=0;s<r.length;s++){let a=r[s].name;i[a]=this.hasOwnProperty(a)?this[a]:r[s].init(e,i)}return i}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=e[r],s=i.spec.state;s&&s.toJSON&&(n[r]=s.toJSON.call(i,this[i.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new sy(e.schema,e.plugins),s=new Lo(i);return i.fields.forEach(a=>{if(a.name=="doc")s.doc=Ps.fromJSON(e.schema,n.doc);else if(a.name=="selection")s.selection=Ne.fromJSON(s.doc,n.selection);else if(a.name=="storedMarks")n.storedMarks&&(s.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let u in r){let c=r[u],f=c.spec.state;if(c.key==a.name&&f&&f.fromJSON&&Object.prototype.hasOwnProperty.call(n,u)){s[a.name]=f.fromJSON.call(c,e,n[u],s);return}}s[a.name]=a.init(e,s)}}),s}}function W7(t,e,n){for(let r in t){let i=t[r];i instanceof Function?i=i.bind(e):r=="handleDOMEvents"&&(i=W7(i,e,{})),n[r]=i}return n}class pt{constructor(e){this.spec=e,this.props={},e.props&&W7(e.props,this,this.props),this.key=e.key?e.key.key:Q7("plugin")}getState(e){return e[this.key]}}const oy=Object.create(null);function Q7(t){return t in oy?t+"$"+ ++oy[t]:(oy[t]=0,t+"$")}class Vt{constructor(e="key"){this.key=Q7(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Y7=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function X7(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const J7=(t,e,n)=>{let r=X7(t,n);if(!r)return!1;let i=xx(r);if(!i){let a=r.blockRange(),u=a&&Ql(a);return u==null?!1:(e&&e(t.tr.lift(a,u).scrollIntoView()),!0)}let s=i.nodeBefore;if(aM(t,i,e,-1))return!0;if(r.parent.content.size==0&&(Rl(s,"end")||ke.isSelectable(s)))for(let a=r.depth;;a--){let u=Im(t.doc,r.before(a),r.after(a),pe.empty);if(u&&u.slice.size<u.to-u.from){if(e){let c=t.tr.step(u);c.setSelection(Rl(s,"end")?Ne.findFrom(c.doc.resolve(c.mapping.map(i.pos,-1)),-1):ke.create(c.doc,i.pos-s.nodeSize)),e(c.scrollIntoView())}return!0}if(a==1||r.node(a-1).childCount>1)break}return s.isAtom&&i.depth==r.depth-1?(e&&e(t.tr.delete(i.pos-s.nodeSize,i.pos).scrollIntoView()),!0):!1},wq=(t,e,n)=>{let r=X7(t,n);if(!r)return!1;let i=xx(r);return i?Z7(t,i,e):!1},$q=(t,e,n)=>{let r=tM(t,n);if(!r)return!1;let i=vx(r);return i?Z7(t,i,e):!1};function Z7(t,e,n){let r=e.nodeBefore,i=r,s=e.pos-1;for(;!i.isTextblock;s--){if(i.type.spec.isolating)return!1;let h=i.lastChild;if(!h)return!1;i=h}let a=e.nodeAfter,u=a,c=e.pos+1;for(;!u.isTextblock;c++){if(u.type.spec.isolating)return!1;let h=u.firstChild;if(!h)return!1;u=h}let f=Im(t.doc,s,c,pe.empty);if(!f||f.from!=s||f instanceof Ot&&f.slice.size>=c-s)return!1;if(n){let h=t.tr.step(f);h.setSelection(De.create(h.doc,s)),n(h.scrollIntoView())}return!0}function Rl(t,e,n=!1){for(let r=t;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const eM=(t,e,n)=>{let{$head:r,empty:i}=t.selection,s=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;s=xx(r)}let a=s&&s.nodeBefore;return!a||!ke.isSelectable(a)?!1:(e&&e(t.tr.setSelection(ke.create(t.doc,s.pos-a.nodeSize)).scrollIntoView()),!0)};function xx(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function tM(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const nM=(t,e,n)=>{let r=tM(t,n);if(!r)return!1;let i=vx(r);if(!i)return!1;let s=i.nodeAfter;if(aM(t,i,e,1))return!0;if(r.parent.content.size==0&&(Rl(s,"start")||ke.isSelectable(s))){let a=Im(t.doc,r.before(),r.after(),pe.empty);if(a&&a.slice.size<a.to-a.from){if(e){let u=t.tr.step(a);u.setSelection(Rl(s,"start")?Ne.findFrom(u.doc.resolve(u.mapping.map(i.pos)),1):ke.create(u.doc,u.mapping.map(i.pos))),e(u.scrollIntoView())}return!0}}return s.isAtom&&i.depth==r.depth-1?(e&&e(t.tr.delete(i.pos,i.pos+s.nodeSize).scrollIntoView()),!0):!1},rM=(t,e,n)=>{let{$head:r,empty:i}=t.selection,s=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;s=vx(r)}let a=s&&s.nodeAfter;return!a||!ke.isSelectable(a)?!1:(e&&e(t.tr.setSelection(ke.create(t.doc,s.pos)).scrollIntoView()),!0)};function vx(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const Tq=(t,e)=>{let n=t.selection,r=n instanceof ke,i;if(r){if(n.node.isTextblock||!to(t.doc,n.from))return!1;i=n.from}else if(i=Lm(t.doc,n.from,-1),i==null)return!1;if(e){let s=t.tr.join(i);r&&s.setSelection(ke.create(s.doc,i-t.doc.resolve(i).nodeBefore.nodeSize)),e(s.scrollIntoView())}return!0},Aq=(t,e)=>{let n=t.selection,r;if(n instanceof ke){if(n.node.isTextblock||!to(t.doc,n.to))return!1;r=n.to}else if(r=Lm(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},Bq=(t,e)=>{let{$from:n,$to:r}=t.selection,i=n.blockRange(r),s=i&&Ql(i);return s==null?!1:(e&&e(t.tr.lift(i,s).scrollIntoView()),!0)},iM=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(`
|
|
26
|
+
`).scrollIntoView()),!0)};function kx(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const Mq=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),s=n.indexAfter(-1),a=kx(i.contentMatchAt(s));if(!a||!i.canReplaceWith(s,s,a))return!1;if(e){let u=n.after(),c=t.tr.replaceWith(u,u,a.createAndFill());c.setSelection(Ne.near(c.doc.resolve(u),1)),e(c.scrollIntoView())}return!0},sM=(t,e)=>{let n=t.selection,{$from:r,$to:i}=n;if(n instanceof Yn||r.parent.inlineContent||i.parent.inlineContent)return!1;let s=kx(i.parent.contentMatchAt(i.indexAfter()));if(!s||!s.isTextblock)return!1;if(e){let a=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,u=t.tr.insert(a,s.createAndFill());u.setSelection(De.create(u.doc,a+1)),e(u.scrollIntoView())}return!0},oM=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let s=n.before();if(Ni(t.doc,s))return e&&e(t.tr.split(s).scrollIntoView()),!0}let r=n.blockRange(),i=r&&Ql(r);return i==null?!1:(e&&e(t.tr.lift(r,i).scrollIntoView()),!0)};function Nq(t){return(e,n)=>{if(e.selection instanceof ke&&e.selection.node.isBlock){let{$from:b}=e.selection;return!b.parentOffset||!Ni(e.doc,b.pos)?!1:(n&&n(e.tr.split(b.pos).scrollIntoView()),!0)}if(!e.selection.$from.depth)return!1;let r=e.tr;!e.selection.empty&&(e.selection instanceof De||e.selection instanceof Yn)&&r.deleteSelection();let{$from:i}=r.selection,s=r.steps.length,a=[],u,c,f=!1,h=!1;for(let b=i.depth;;b--)if(i.node(b).isBlock){f=i.end(b)==i.pos+(i.depth-b),h=i.start(b)==i.pos-(i.depth-b),c=kx(i.node(b-1).contentMatchAt(i.indexAfter(b-1))),a.unshift(f&&c?{type:c}:null),u=b;break}else{if(b==1)return!1;a.unshift(null)}let m=i.pos,g=Ni(r.doc,m,a.length,a);if(g||(a[0]=c?{type:c}:null,g=Ni(r.doc,m,a.length,a)),!g)return!1;if(r.split(m,a.length,a),!f&&h&&i.node(u).type!=c){let b=r.mapping.slice(s),x=b.map(i.before(u)),k=r.doc.resolve(x);c&&i.node(u-1).canReplaceWith(k.index(),k.index()+1,c)&&r.setNodeMarkup(b.map(i.before(u)),c)}return n&&n(r.scrollIntoView()),!0}}const Rq=Nq(),Oq=(t,e)=>{let{$from:n,to:r}=t.selection,i,s=n.sharedDepth(r);return s==0?!1:(i=n.before(s),e&&e(t.tr.setSelection(ke.create(t.doc,i))),!0)};function Pq(t,e,n){let r=e.nodeBefore,i=e.nodeAfter,s=e.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&e.parent.canReplace(s-1,s)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(s,s+1)||!(i.isTextblock||to(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function aM(t,e,n,r){let i=e.nodeBefore,s=e.nodeAfter,a,u,c=i.type.spec.isolating||s.type.spec.isolating;if(!c&&Pq(t,e,n))return!0;let f=!c&&e.parent.canReplace(e.index(),e.index()+1);if(f&&(a=(u=i.contentMatchAt(i.childCount)).findWrapping(s.type))&&u.matchType(a[0]||s.type).validEnd){if(n){let b=e.pos+s.nodeSize,x=ae.empty;for(let D=a.length-1;D>=0;D--)x=ae.from(a[D].create(null,x));x=ae.from(i.copy(x));let k=t.tr.step(new Gt(e.pos-1,b,e.pos,b,new pe(x,1,0),a.length,!0)),E=k.doc.resolve(b+2*a.length);E.nodeAfter&&E.nodeAfter.type==i.type&&to(k.doc,E.pos)&&k.join(E.pos),n(k.scrollIntoView())}return!0}let h=s.type.spec.isolating||r>0&&c?null:Ne.findFrom(e,1),m=h&&h.$from.blockRange(h.$to),g=m&&Ql(m);if(g!=null&&g>=e.depth)return n&&n(t.tr.lift(m,g).scrollIntoView()),!0;if(f&&Rl(s,"start",!0)&&Rl(i,"end")){let b=i,x=[];for(;x.push(b),!b.isTextblock;)b=b.lastChild;let k=s,E=1;for(;!k.isTextblock;k=k.firstChild)E++;if(b.canReplace(b.childCount,b.childCount,k.content)){if(n){let D=ae.empty;for(let $=x.length-1;$>=0;$--)D=ae.from(x[$].copy(D));let T=t.tr.step(new Gt(e.pos-x.length,e.pos+s.nodeSize,e.pos+E,e.pos+s.nodeSize-E,new pe(D,x.length,0),0,!0));n(T.scrollIntoView())}return!0}}return!1}function lM(t){return function(e,n){let r=e.selection,i=t<0?r.$from:r.$to,s=i.depth;for(;i.node(s).isInline;){if(!s)return!1;s--}return i.node(s).isTextblock?(n&&n(e.tr.setSelection(De.create(e.doc,t<0?i.start(s):i.end(s)))),!0):!1}}const zq=lM(-1),Lq=lM(1);function Iq(t,e=null){return function(n,r){let{$from:i,$to:s}=n.selection,a=i.blockRange(s),u=a&&bx(a,t,e);return u?(r&&r(n.tr.wrap(a,u).scrollIntoView()),!0):!1}}function QE(t,e=null){return function(n,r){let i=!1;for(let s=0;s<n.selection.ranges.length&&!i;s++){let{$from:{pos:a},$to:{pos:u}}=n.selection.ranges[s];n.doc.nodesBetween(a,u,(c,f)=>{if(i)return!1;if(!(!c.isTextblock||c.hasMarkup(t,e)))if(c.type==t)i=!0;else{let h=n.doc.resolve(f),m=h.index();i=h.parent.canReplaceWith(m,m+1,t)}})}if(!i)return!1;if(r){let s=n.tr;for(let a=0;a<n.selection.ranges.length;a++){let{$from:{pos:u},$to:{pos:c}}=n.selection.ranges[a];s.setBlockType(u,c,t,e)}r(s.scrollIntoView())}return!0}}function Cx(...t){return function(e,n,r){for(let i=0;i<t.length;i++)if(t[i](e,n,r))return!0;return!1}}Cx(Y7,J7,eM);Cx(Y7,nM,rM);Cx(iM,sM,oM,Rq);typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function jq(t,e=null){return function(n,r){let{$from:i,$to:s}=n.selection,a=i.blockRange(s);if(!a)return!1;let u=r?n.tr:null;return Fq(u,a,t,e)?(r&&r(u.scrollIntoView()),!0):!1}}function Fq(t,e,n,r=null){let i=!1,s=e,a=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let c=a.resolve(e.start-2);s=new kp(c,c,e.depth),e.endIndex<e.parent.childCount&&(e=new kp(e.$from,a.resolve(e.$to.end(e.depth)),e.depth)),i=!0}let u=bx(s,n,r,e);return u?(t&&Kq(t,e,u,i,n),!0):!1}function Kq(t,e,n,r,i){let s=ae.empty;for(let h=n.length-1;h>=0;h--)s=ae.from(n[h].type.create(n[h].attrs,s));t.step(new Gt(e.start-(r?2:0),e.end,e.start,e.end,new pe(s,0,0),n.length,!0));let a=0;for(let h=0;h<n.length;h++)n[h].type==i&&(a=h+1);let u=n.length-a,c=e.start+n.length-(r?2:0),f=e.parent;for(let h=e.startIndex,m=e.endIndex,g=!0;h<m;h++,g=!1)!g&&Ni(t.doc,c,u)&&(t.split(c,u),c+=2*u),c+=f.child(h).nodeSize;return t}function _q(t){return function(e,n){let{$from:r,$to:i}=e.selection,s=r.blockRange(i,a=>a.childCount>0&&a.firstChild.type==t);return s?n?r.node(s.depth-1).type==t?Vq(e,n,t,s):Hq(e,n,s):!0:!1}}function Vq(t,e,n,r){let i=t.tr,s=r.end,a=r.$to.end(r.depth);s<a&&(i.step(new Gt(s-1,a,s,a,new pe(ae.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new kp(i.doc.resolve(r.$from.pos),i.doc.resolve(a),r.depth));const u=Ql(r);if(u==null)return!1;i.lift(r,u);let c=i.doc.resolve(i.mapping.map(s,-1)-1);return to(i.doc,c.pos)&&c.nodeBefore.type==c.nodeAfter.type&&i.join(c.pos),e(i.scrollIntoView()),!0}function Hq(t,e,n){let r=t.tr,i=n.parent;for(let b=n.end,x=n.endIndex-1,k=n.startIndex;x>k;x--)b-=i.child(x).nodeSize,r.delete(b-1,b+1);let s=r.doc.resolve(n.start),a=s.nodeAfter;if(r.mapping.map(n.end)!=n.start+s.nodeAfter.nodeSize)return!1;let u=n.startIndex==0,c=n.endIndex==i.childCount,f=s.node(-1),h=s.index(-1);if(!f.canReplace(h+(u?0:1),h+1,a.content.append(c?ae.empty:ae.from(i))))return!1;let m=s.pos,g=m+a.nodeSize;return r.step(new Gt(m-(u?1:0),g+(c?1:0),m+1,g-1,new pe((u?ae.empty:ae.from(i.copy(ae.empty))).append(c?ae.empty:ae.from(i.copy(ae.empty))),u?0:1,c?0:1),u?0:1)),e(r.scrollIntoView()),!0}function Uq(t){return function(e,n){let{$from:r,$to:i}=e.selection,s=r.blockRange(i,f=>f.childCount>0&&f.firstChild.type==t);if(!s)return!1;let a=s.startIndex;if(a==0)return!1;let u=s.parent,c=u.child(a-1);if(c.type!=t)return!1;if(n){let f=c.lastChild&&c.lastChild.type==u.type,h=ae.from(f?t.create():null),m=new pe(ae.from(t.create(null,ae.from(u.type.create(null,h)))),f?3:1,0),g=s.start,b=s.end;n(e.tr.step(new Gt(g-(f?3:1),b,g,b,m,1,!0)).scrollIntoView())}return!0}}const rn=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},Ol=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let A4=null;const Ei=function(t,e,n){let r=A4||(A4=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},qq=function(){A4=null},sa=function(t,e,n,r){return n&&(YE(t,e,n,r,-1)||YE(t,e,n,r,1))},Gq=/^(img|br|input|textarea|hr)$/i;function YE(t,e,n,r,i){for(var s;;){if(t==n&&e==r)return!0;if(e==(i<0?0:fr(t))){let a=t.parentNode;if(!a||a.nodeType!=1||Ed(t)||Gq.test(t.nodeName)||t.contentEditable=="false")return!1;e=rn(t)+(i<0?0:1),t=a}else if(t.nodeType==1){let a=t.childNodes[e+(i<0?-1:0)];if(a.nodeType==1&&a.contentEditable=="false")if(!((s=a.pmViewDesc)===null||s===void 0)&&s.ignoreForSelection)e+=i;else return!1;else t=a,e=i<0?fr(t):0}else return!1}}function fr(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Wq(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=fr(t)}else if(t.parentNode&&!Ed(t))e=rn(t),t=t.parentNode;else return null}}function Qq(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!Ed(t))e=rn(t)+1,t=t.parentNode;else return null}}function Yq(t,e,n){for(let r=e==0,i=e==fr(t);r||i;){if(t==n)return!0;let s=rn(t);if(t=t.parentNode,!t)return!1;r=r&&s==0,i=i&&s==fr(t)}}function Ed(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const Fm=function(t){return t.focusNode&&sa(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function Bo(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function Xq(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Jq(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(fr(r.offsetNode),r.offset)}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(fr(r.startContainer),r.startOffset)}}}const Qr=typeof navigator<"u"?navigator:null,XE=typeof document<"u"?document:null,no=Qr&&Qr.userAgent||"",B4=/Edge\/(\d+)/.exec(no),uM=/MSIE \d/.exec(no),M4=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(no),Ln=!!(uM||M4||B4),zs=uM?document.documentMode:M4?+M4[1]:B4?+B4[1]:0,hr=!Ln&&/gecko\/(\d+)/i.test(no);hr&&+(/Firefox\/(\d+)/.exec(no)||[0,0])[1];const N4=!Ln&&/Chrome\/(\d+)/.exec(no),on=!!N4,cM=N4?+N4[1]:0,hn=!Ln&&!!Qr&&/Apple Computer/.test(Qr.vendor),Pl=hn&&(/Mobile\/\w+/.test(no)||!!Qr&&Qr.maxTouchPoints>2),cr=Pl||(Qr?/Mac/.test(Qr.platform):!1),dM=Qr?/Win/.test(Qr.platform):!1,$i=/Android \d/.test(no),Dd=!!XE&&"webkitFontSmoothing"in XE.documentElement.style,Zq=Dd?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function eG(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function yi(t,e){return typeof t=="number"?t:t[e]}function tG(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function JE(t,e,n){if(!R4(e)&&e.left==0)return;let r=t.someProp("scrollThreshold")||0,i=t.someProp("scrollMargin")||5,s=t.dom.ownerDocument;for(let a=n||t.dom;a;){if(a.nodeType!=1){a=Ol(a);continue}let u=a,c=u==s.body,f=c?eG(s):tG(u),h=0,m=0;if(e.top<f.top+yi(r,"top")?m=-(f.top-e.top+yi(i,"top")):e.bottom>f.bottom-yi(r,"bottom")&&(m=e.bottom-e.top>f.bottom-f.top?e.top+yi(i,"top")-f.top:e.bottom-f.bottom+yi(i,"bottom")),e.left<f.left+yi(r,"left")?h=-(f.left-e.left+yi(i,"left")):e.right>f.right-yi(r,"right")&&(h=e.right-f.right+yi(i,"right")),h||m)if(c)s.defaultView.scrollBy(h,m);else{let b=u.scrollLeft,x=u.scrollTop;m&&(u.scrollTop+=m),h&&(u.scrollLeft+=h);let k=u.scrollLeft-b,E=u.scrollTop-x;e={left:e.left-k,top:e.top-E,right:e.right-k,bottom:e.bottom-E}}let g=c?"fixed":getComputedStyle(a).position;if(/^(fixed|sticky)$/.test(g))break;a=g=="absolute"?a.offsetParent:Ol(a)}}function nG(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,i;for(let s=(e.left+e.right)/2,a=n+1;a<Math.min(innerHeight,e.bottom);a+=5){let u=t.root.elementFromPoint(s,a);if(!u||u==t.dom||!t.dom.contains(u))continue;let c=u.getBoundingClientRect();if(c.top>=n-20){r=u,i=c.top;break}}return{refDOM:r,refTop:i,stack:fM(t.dom)}}function fM(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=Ol(r));return e}function rG({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;hM(n,r==0?0:r-e)}function hM(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:i,left:s}=t[n];r.scrollTop!=i+e&&(r.scrollTop=i+e),r.scrollLeft!=s&&(r.scrollLeft=s)}}let ul=null;function iG(t){if(t.setActive)return t.setActive();if(ul)return t.focus(ul);let e=fM(t);t.focus(ul==null?{get preventScroll(){return ul={preventScroll:!0},!0}}:void 0),ul||(ul=!1,hM(e,0))}function pM(t,e){let n,r=2e8,i,s=0,a=e.top,u=e.top,c,f;for(let h=t.firstChild,m=0;h;h=h.nextSibling,m++){let g;if(h.nodeType==1)g=h.getClientRects();else if(h.nodeType==3)g=Ei(h).getClientRects();else continue;for(let b=0;b<g.length;b++){let x=g[b];if(x.top<=a&&x.bottom>=u){a=Math.max(x.bottom,a),u=Math.min(x.top,u);let k=x.left>e.left?x.left-e.left:x.right<e.left?e.left-x.right:0;if(k<r){n=h,r=k,i=k&&n.nodeType==3?{left:x.right<e.left?x.right:x.left,top:e.top}:e,h.nodeType==1&&k&&(s=m+(e.left>=(x.left+x.right)/2?1:0));continue}}else x.top>e.top&&!c&&x.left<=e.left&&x.right>=e.left&&(c=h,f={left:Math.max(x.left,Math.min(x.right,e.left)),top:x.top});!n&&(e.left>=x.right&&e.top>=x.top||e.left>=x.left&&e.top>=x.bottom)&&(s=m+1)}}return!n&&c&&(n=c,i=f,r=0),n&&n.nodeType==3?sG(n,i):!n||r&&n.nodeType==1?{node:t,offset:s}:pM(n,i)}function sG(t,e){let n=t.nodeValue.length,r=document.createRange(),i;for(let s=0;s<n;s++){r.setEnd(t,s+1),r.setStart(t,s);let a=vs(r,1);if(a.top!=a.bottom&&Ex(e,a)){i={node:t,offset:s+(e.left>=(a.left+a.right)/2?1:0)};break}}return r.detach(),i||{node:t,offset:0}}function Ex(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function oG(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function aG(t,e,n){let{node:r,offset:i}=pM(e,n),s=-1;if(r.nodeType==1&&!r.firstChild){let a=r.getBoundingClientRect();s=a.left!=a.right&&n.left>(a.left+a.right)/2?1:-1}return t.docView.posFromDOM(r,i,s)}function lG(t,e,n,r){let i=-1;for(let s=e,a=!1;s!=t.dom;){let u=t.docView.nearestDesc(s,!0),c;if(!u)return null;if(u.dom.nodeType==1&&(u.node.isBlock&&u.parent||!u.contentDOM)&&((c=u.dom.getBoundingClientRect()).width||c.height)&&(u.node.isBlock&&u.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(u.dom.nodeName)&&(!a&&c.left>r.left||c.top>r.top?i=u.posBefore:(!a&&c.right<r.left||c.bottom<r.top)&&(i=u.posAfter),a=!0),!u.contentDOM&&i<0&&!u.node.isText))return(u.node.isBlock?r.top<(c.top+c.bottom)/2:r.left<(c.left+c.right)/2)?u.posBefore:u.posAfter;s=u.dom.parentNode}return i>-1?i:t.docView.posFromDOM(e,n,-1)}function mM(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),s=i;;){let a=t.childNodes[s];if(a.nodeType==1){let u=a.getClientRects();for(let c=0;c<u.length;c++){let f=u[c];if(Ex(e,f))return mM(a,e,f)}}if((s=(s+1)%r)==i)break}return t}function uG(t,e){let n=t.dom.ownerDocument,r,i=0,s=Jq(n,e.left,e.top);s&&({node:r,offset:i}=s);let a=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),u;if(!a||!t.dom.contains(a.nodeType!=1?a.parentNode:a)){let f=t.dom.getBoundingClientRect();if(!Ex(e,f)||(a=mM(t.dom,e,f),!a))return null}if(hn)for(let f=a;r&&f;f=Ol(f))f.draggable&&(r=void 0);if(a=oG(a,e),r){if(hr&&r.nodeType==1&&(i=Math.min(i,r.childNodes.length),i<r.childNodes.length)){let h=r.childNodes[i],m;h.nodeName=="IMG"&&(m=h.getBoundingClientRect()).right<=e.left&&m.bottom>e.top&&i++}let f;Dd&&i&&r.nodeType==1&&(f=r.childNodes[i-1]).nodeType==1&&f.contentEditable=="false"&&f.getBoundingClientRect().top>=e.top&&i--,r==t.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?u=t.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!="BR")&&(u=lG(t,r,i,e))}u==null&&(u=aG(t,a,e));let c=t.docView.nearestDesc(a,!0);return{pos:u,inside:c?c.posAtStart-c.border:-1}}function R4(t){return t.top<t.bottom||t.left<t.right}function vs(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(R4(r))return r}return Array.prototype.find.call(n,R4)||t.getBoundingClientRect()}const cG=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function gM(t,e,n){let{node:r,offset:i,atom:s}=t.docView.domFromPos(e,n<0?-1:1),a=Dd||hr;if(r.nodeType==3)if(a&&(cG.test(r.nodeValue)||(n<0?!i:i==r.nodeValue.length))){let c=vs(Ei(r,i,i),n);if(hr&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let f=vs(Ei(r,i-1,i-1),-1);if(f.top==c.top){let h=vs(Ei(r,i,i+1),-1);if(h.top!=c.top)return Zu(h,h.left<f.left)}}return c}else{let c=i,f=i,h=n<0?1:-1;return n<0&&!i?(f++,h=-1):n>=0&&i==r.nodeValue.length?(c--,h=1):n<0?c--:f++,Zu(vs(Ei(r,c,f),h),h<0)}if(!t.state.doc.resolve(e-(s||0)).parent.inlineContent){if(s==null&&i&&(n<0||i==fr(r))){let c=r.childNodes[i-1];if(c.nodeType==1)return ay(c.getBoundingClientRect(),!1)}if(s==null&&i<fr(r)){let c=r.childNodes[i];if(c.nodeType==1)return ay(c.getBoundingClientRect(),!0)}return ay(r.getBoundingClientRect(),n>=0)}if(s==null&&i&&(n<0||i==fr(r))){let c=r.childNodes[i-1],f=c.nodeType==3?Ei(c,fr(c)-(a?0:1)):c.nodeType==1&&(c.nodeName!="BR"||!c.nextSibling)?c:null;if(f)return Zu(vs(f,1),!1)}if(s==null&&i<fr(r)){let c=r.childNodes[i];for(;c.pmViewDesc&&c.pmViewDesc.ignoreForCoords;)c=c.nextSibling;let f=c?c.nodeType==3?Ei(c,0,a?0:1):c.nodeType==1?c:null:null;if(f)return Zu(vs(f,-1),!0)}return Zu(vs(r.nodeType==3?Ei(r):r,-n),n>=0)}function Zu(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function ay(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function bM(t,e,n){let r=t.state,i=t.root.activeElement;r!=e&&t.updateState(e),i!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),i!=t.dom&&i&&i.focus()}}function dG(t,e,n){let r=e.selection,i=n=="up"?r.$from:r.$to;return bM(t,e,()=>{let{node:s}=t.docView.domFromPos(i.pos,n=="up"?-1:1);for(;;){let u=t.docView.nearestDesc(s,!0);if(!u)break;if(u.node.isBlock){s=u.contentDOM||u.dom;break}s=u.dom.parentNode}let a=gM(t,i.pos,1);for(let u=s.firstChild;u;u=u.nextSibling){let c;if(u.nodeType==1)c=u.getClientRects();else if(u.nodeType==3)c=Ei(u,0,u.nodeValue.length).getClientRects();else continue;for(let f=0;f<c.length;f++){let h=c[f];if(h.bottom>h.top+1&&(n=="up"?a.top-h.top>(h.bottom-a.top)*2:h.bottom-a.bottom>(a.bottom-h.top)*2))return!1}}return!0})}const fG=/[\u0590-\u08ac]/;function hG(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,s=!i,a=i==r.parent.content.size,u=t.domSelection();return u?!fG.test(r.parent.textContent)||!u.modify?n=="left"||n=="backward"?s:a:bM(t,e,()=>{let{focusNode:c,focusOffset:f,anchorNode:h,anchorOffset:m}=t.domSelectionRange(),g=u.caretBidiLevel;u.modify("move",n,"character");let b=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:x,focusOffset:k}=t.domSelectionRange(),E=x&&!b.contains(x.nodeType==1?x:x.parentNode)||c==x&&f==k;try{u.collapse(h,m),c&&(c!=h||f!=m)&&u.extend&&u.extend(c,f)}catch{}return g!=null&&(u.caretBidiLevel=g),E}):r.pos==r.start()||r.pos==r.end()}let ZE=null,eD=null,tD=!1;function pG(t,e,n){return ZE==e&&eD==n?tD:(ZE=e,eD=n,tD=n=="up"||n=="down"?dG(t,e,n):hG(t,e,n))}const pr=0,nD=1,Io=2,Ar=3;class Sd{constructor(e,n,r,i){this.parent=e,this.children=n,this.dom=r,this.contentDOM=i,this.dirty=pr,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(e){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,r=this.posAtStart;;n++){let i=this.children[n];if(i==e)return r;r+=i.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,n,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let s,a;if(e==this.contentDOM)s=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;s=e.previousSibling}for(;s&&!((a=s.pmViewDesc)&&a.parent==this);)s=s.previousSibling;return s?this.posBeforeChild(a)+a.size:this.posAtStart}else{let s,a;if(e==this.contentDOM)s=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;s=e.nextSibling}for(;s&&!((a=s.pmViewDesc)&&a.parent==this);)s=s.nextSibling;return s?this.posBeforeChild(a):this.posAtEnd}let i;if(e==this.dom&&this.contentDOM)i=n>rn(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let s=e;;s=s.parentNode){if(s==this.dom){i=!1;break}if(s.previousSibling)break}if(i==null&&n==e.childNodes.length)for(let s=e;;s=s.parentNode){if(s==this.dom){i=!0;break}if(s.nextSibling)break}}return i??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,i=e;i;i=i.parentNode){let s=this.getDesc(i),a;if(s&&(!n||s.node))if(r&&(a=s.nodeDOM)&&!(a.nodeType==1?a.contains(e.nodeType==1?e:e.parentNode):a==e))r=!1;else return s}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let i=e;i;i=i.parentNode){let s=this.getDesc(i);if(s)return s.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let i=this.children[n],s=r+i.size;if(r==e&&s!=r){for(;!i.border&&i.children.length;)for(let a=0;a<i.children.length;a++){let u=i.children[a];if(u.size){i=u;break}}return i}if(e<s)return i.descAt(e-r-i.border);r=s}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,i=0;for(let s=0;r<this.children.length;r++){let a=this.children[r],u=s+a.size;if(u>e||a instanceof xM){i=e-s;break}s=u}if(i)return this.children[r].domFromPos(i-this.children[r].border,n);for(let s;r&&!(s=this.children[r-1]).size&&s instanceof yM&&s.side>=0;r--);if(n<=0){let s,a=!0;for(;s=r?this.children[r-1]:null,!(!s||s.dom.parentNode==this.contentDOM);r--,a=!1);return s&&n&&a&&!s.border&&!s.domAtom?s.domFromPos(s.size,n):{node:this.contentDOM,offset:s?rn(s.dom)+1:0}}else{let s,a=!0;for(;s=r<this.children.length?this.children[r]:null,!(!s||s.dom.parentNode==this.contentDOM);r++,a=!1);return s&&a&&!s.border&&!s.domAtom?s.domFromPos(0,n):{node:this.contentDOM,offset:s?rn(s.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,s=-1;for(let a=r,u=0;;u++){let c=this.children[u],f=a+c.size;if(i==-1&&e<=f){let h=a+c.border;if(e>=h&&n<=f-c.border&&c.node&&c.contentDOM&&this.contentDOM.contains(c.contentDOM))return c.parseRange(e,n,h);e=a;for(let m=u;m>0;m--){let g=this.children[m-1];if(g.size&&g.dom.parentNode==this.contentDOM&&!g.emptyChildAt(1)){i=rn(g.dom)+1;break}e-=g.size}i==-1&&(i=0)}if(i>-1&&(f>n||u==this.children.length-1)){n=f;for(let h=u+1;h<this.children.length;h++){let m=this.children[h];if(m.size&&m.dom.parentNode==this.contentDOM&&!m.emptyChildAt(-1)){s=rn(m.dom);break}n+=m.size}s==-1&&(s=this.contentDOM.childNodes.length);break}a=f}return{node:this.contentDOM,from:e,to:n,fromOffset:i,toOffset:s}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:r}=this.domFromPos(e,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}setSelection(e,n,r,i=!1){let s=Math.min(e,n),a=Math.max(e,n);for(let b=0,x=0;b<this.children.length;b++){let k=this.children[b],E=x+k.size;if(s>x&&a<E)return k.setSelection(e-x-k.border,n-x-k.border,r,i);x=E}let u=this.domFromPos(e,e?-1:1),c=n==e?u:this.domFromPos(n,n?-1:1),f=r.root.getSelection(),h=r.domSelectionRange(),m=!1;if((hr||hn)&&e==n){let{node:b,offset:x}=u;if(b.nodeType==3){if(m=!!(x&&b.nodeValue[x-1]==`
|
|
27
|
+
`),m&&x==b.nodeValue.length)for(let k=b,E;k;k=k.parentNode){if(E=k.nextSibling){E.nodeName=="BR"&&(u=c={node:E.parentNode,offset:rn(E)+1});break}let D=k.pmViewDesc;if(D&&D.node&&D.node.isBlock)break}}else{let k=b.childNodes[x-1];m=k&&(k.nodeName=="BR"||k.contentEditable=="false")}}if(hr&&h.focusNode&&h.focusNode!=c.node&&h.focusNode.nodeType==1){let b=h.focusNode.childNodes[h.focusOffset];b&&b.contentEditable=="false"&&(i=!0)}if(!(i||m&&hn)&&sa(u.node,u.offset,h.anchorNode,h.anchorOffset)&&sa(c.node,c.offset,h.focusNode,h.focusOffset))return;let g=!1;if((f.extend||e==n)&&!(m&&hr)){f.collapse(u.node,u.offset);try{e!=n&&f.extend(c.node,c.offset),g=!0}catch{}}if(!g){if(e>n){let x=u;u=c,c=x}let b=document.createRange();b.setEnd(c.node,c.offset),b.setStart(u.node,u.offset),f.removeAllRanges(),f.addRange(b)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,i=0;i<this.children.length;i++){let s=this.children[i],a=r+s.size;if(r==a?e<=a&&n>=r:e<a&&n>r){let u=r+s.border,c=a-s.border;if(e>=u&&n<=c){this.dirty=e==r||n==a?Io:nD,e==u&&n==c&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=Ar:s.markDirty(e-u,n-u);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?Io:Ar}r=a}this.dirty=Io}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?Io:nD;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class yM extends Sd{constructor(e,n,r,i){let s,a=n.type.toDOM;if(typeof a=="function"&&(a=a(r,()=>{if(!s)return i;if(s.parent)return s.parent.posBeforeChild(s)})),!n.type.spec.raw){if(a.nodeType!=1){let u=document.createElement("span");u.appendChild(a),a=u}a.contentEditable="false",a.classList.add("ProseMirror-widget")}super(e,[],a,null),this.widget=n,this.widget=n,s=this}matchesWidget(e){return this.dirty==pr&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class mG extends Sd{constructor(e,n,r,i){super(e,[],n,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class Ls extends Sd{constructor(e,n,r,i,s){super(e,[],r,i),this.mark=n,this.spec=s}static create(e,n,r,i){let s=i.nodeViews[n.type.name],a=s&&s(n,i,r);return(!a||!a.dom)&&(a=ya.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new Ls(e,n,a.dom,a.contentDOM||a.dom,a)}parseRule(){return this.dirty&Ar||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Ar&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=pr){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=pr}}slice(e,n,r){let i=Ls.create(this.parent,this.mark,!0,r),s=this.children,a=this.size;n<a&&(s=P4(s,n,a,r)),e>0&&(s=P4(s,0,e,r));for(let u=0;u<s.length;u++)s[u].parent=i;return i.children=s,i}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class Is extends Sd{constructor(e,n,r,i,s,a,u){super(e,[],s,a),this.node=n,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=u}static create(e,n,r,i,s,a){let u=s.nodeViews[n.type.name],c,f=u&&u(n,s,()=>{if(!c)return a;if(c.parent)return c.parent.posBeforeChild(c)},r,i),h=f&&f.dom,m=f&&f.contentDOM;if(n.isText){if(!h)h=document.createTextNode(n.text);else if(h.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else h||({dom:h,contentDOM:m}=ya.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!m&&!n.isText&&h.nodeName!="BR"&&(h.hasAttribute("contenteditable")||(h.contentEditable="false"),n.type.spec.draggable&&(h.draggable=!0));let g=h;return h=CM(h,r,n),f?c=new gG(e,n,r,i,h,m||null,g,f):n.isText?new Km(e,n,r,i,h,g):new Is(e,n,r,i,h,m||null,g)}parseRule(e){if(this.node.type.spec.reparseInView)return null;let n={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(n.preserveWhitespace="full"),!this.contentDOM)n.getContent=()=>this.node.content;else if(!this.contentLost)n.contentElement=this.contentDOM;else{for(let r=this.children.length-1;r>=0;r--){let i=this.children[r];if(this.dom.contains(i.dom.parentNode)){n.contentElement=i.dom.parentNode;break}}if(!n.contentElement){let r=e&&e.find(i=>i.nodeType==1&&e.indexOf(i.parentNode)<0&&this.dom.contains(i));r?n.contentElement=r:n.getContent=()=>ae.empty}}return n}matchesNode(e,n,r){return this.dirty==pr&&e.eq(this.node)&&Ep(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,i=n,s=e.composing?this.localCompositionInfo(e,n):null,a=s&&s.pos>-1?s:null,u=s&&s.pos<0,c=new yG(this,a&&a.node,e);kG(this.node,this.innerDeco,(f,h,m)=>{f.spec.marks?c.syncToMarks(f.spec.marks,r,e,h):f.type.side>=0&&!m&&c.syncToMarks(h==this.node.childCount?st.none:this.node.child(h).marks,r,e,h),c.placeWidget(f,e,i)},(f,h,m,g)=>{c.syncToMarks(f.marks,r,e,g);let b;c.findNodeMatch(f,h,m,g)||u&&e.state.selection.from>i&&e.state.selection.to<i+f.nodeSize&&(b=c.findIndexWithChild(s.node))>-1&&c.updateNodeAt(f,h,m,b,e)||c.updateNextNode(f,h,m,e,g,i)||c.addNode(f,h,m,e,i),i+=f.nodeSize}),c.syncToMarks([],r,e,0),this.node.isTextblock&&c.addTextblockHacks(),c.destroyRest(),(c.changed||this.dirty==Io)&&(a&&this.protectLocalComposition(e,a),vM(this.contentDOM,this.children,e),Pl&&CG(this.dom))}localCompositionInfo(e,n){let{from:r,to:i}=e.state.selection;if(!(e.state.selection instanceof De)||r<n||i>n+this.node.content.size)return null;let s=e.input.compositionNode;if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let a=s.nodeValue,u=EG(this.node.content,a,r-n,i-n);return u<0?null:{node:s,pos:u,text:a}}else return{node:s,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:i}){if(this.getDesc(n))return;let s=n;for(;s.parentNode!=this.contentDOM;s=s.parentNode){for(;s.previousSibling;)s.parentNode.removeChild(s.previousSibling);for(;s.nextSibling;)s.parentNode.removeChild(s.nextSibling);s.pmViewDesc&&(s.pmViewDesc=void 0)}let a=new mG(this,s,n,i);e.input.compositionNodes.push(a),this.children=P4(this.children,r,r+i.length,e,a)}update(e,n,r,i){return this.dirty==Ar||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,r,i),!0)}updateInner(e,n,r,i){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=pr}updateOuterDeco(e){if(Ep(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=kM(this.dom,this.nodeDOM,O4(this.outerDeco,this.node,n),O4(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function rD(t,e,n,r,i){CM(r,e,t);let s=new Is(void 0,t,e,n,r,r,r);return s.contentDOM&&s.updateChildren(i,0),s}class Km extends Is{constructor(e,n,r,i,s,a){super(e,n,r,i,s,null,a)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,i){return this.dirty==Ar||this.dirty!=pr&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=pr||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=e,this.dirty=pr,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let i=this.node.cut(e,n),s=document.createTextNode(i.text);return new Km(this.parent,i,this.outerDeco,this.innerDeco,s,s)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Ar)}get domAtom(){return!1}isText(e){return this.node.text==e}}class xM extends Sd{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==pr&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class gG extends Is{constructor(e,n,r,i,s,a,u,c){super(e,n,r,i,s,a,u),this.spec=c}update(e,n,r,i){if(this.dirty==Ar)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let s=this.spec.update(e,n,r);return s&&this.updateInner(e,n,r,i),s}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,i){this.spec.setSelection?this.spec.setSelection(e,n,r.root):super.setSelection(e,n,r,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function vM(t,e,n){let r=t.firstChild,i=!1;for(let s=0;s<e.length;s++){let a=e[s],u=a.dom;if(u.parentNode==t){for(;u!=r;)r=iD(r),i=!0;r=r.nextSibling}else i=!0,t.insertBefore(u,r);if(a instanceof Ls){let c=r?r.previousSibling:t.lastChild;vM(a.contentDOM,a.children,n),r=c?c.nextSibling:t.firstChild}}for(;r;)r=iD(r),i=!0;i&&n.trackWrites==t&&(n.trackWrites=null)}const wc=function(t){t&&(this.nodeName=t)};wc.prototype=Object.create(null);const jo=[new wc];function O4(t,e,n){if(t.length==0)return jo;let r=n?jo[0]:new wc,i=[r];for(let s=0;s<t.length;s++){let a=t[s].type.attrs;if(a){a.nodeName&&i.push(r=new wc(a.nodeName));for(let u in a){let c=a[u];c!=null&&(n&&i.length==1&&i.push(r=new wc(e.isInline?"span":"div")),u=="class"?r.class=(r.class?r.class+" ":"")+c:u=="style"?r.style=(r.style?r.style+";":"")+c:u!="nodeName"&&(r[u]=c))}}}return i}function kM(t,e,n,r){if(n==jo&&r==jo)return e;let i=e;for(let s=0;s<r.length;s++){let a=r[s],u=n[s];if(s){let c;u&&u.nodeName==a.nodeName&&i!=t&&(c=i.parentNode)&&c.nodeName.toLowerCase()==a.nodeName||(c=document.createElement(a.nodeName),c.pmIsDeco=!0,c.appendChild(i),u=jo[0]),i=c}bG(i,u||jo[0],a)}return i}function bG(t,e,n){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&t.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let s=0;s<r.length;s++)i.indexOf(r[s])==-1&&t.classList.remove(r[s]);for(let s=0;s<i.length;s++)r.indexOf(i[s])==-1&&t.classList.add(i[s]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,i;for(;i=r.exec(e.style);)t.style.removeProperty(i[1])}n.style&&(t.style.cssText+=n.style)}}function CM(t,e,n){return kM(t,t,jo,O4(e,n,t.nodeType!=1))}function Ep(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function iD(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class yG{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=xG(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let r=e;r<n;r++)this.top.children[r].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,r,i){let s=0,a=this.stack.length>>1,u=Math.min(a,e.length);for(;s<u&&(s==a-1?this.top:this.stack[s+1<<1]).matchesMark(e[s])&&e[s].type.spec.spanning!==!1;)s++;for(;s<a;)this.destroyRest(),this.top.dirty=pr,this.index=this.stack.pop(),this.top=this.stack.pop(),a--;for(;a<e.length;){this.stack.push(this.top,this.index+1);let c=-1,f=this.top.children.length;i<this.preMatch.index&&(f=Math.min(this.index+3,f));for(let h=this.index;h<f;h++){let m=this.top.children[h];if(m.matchesMark(e[a])&&!this.isLocked(m.dom)){c=h;break}}if(c<0&&this.index<this.top.children.length){let h=this.top.children[this.index];h instanceof Ls&&h.dirty!=Ar&&h.mark.type==e[a].type&&h.spec.update&&!this.isLocked(h.dom)&&h.spec.update(e[a])&&(h.mark=e[a],c=this.index,this.changed=!0)}if(c>-1)c>this.index&&(this.changed=!0,this.destroyBetween(this.index,c)),this.top=this.top.children[this.index];else{let h=Ls.create(this.top,e[a],n,r);this.top.children.splice(this.index,0,h),this.top=h,this.changed=!0}this.index=0,a++}}findNodeMatch(e,n,r,i){let s=-1,a;if(i>=this.preMatch.index&&(a=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&a.matchesNode(e,n,r))s=this.top.children.indexOf(a,this.index);else for(let u=this.index,c=Math.min(this.top.children.length,u+5);u<c;u++){let f=this.top.children[u];if(f.matchesNode(e,n,r)&&!this.preMatch.matched.has(f)){s=u;break}}return s<0?!1:(this.destroyBetween(this.index,s),this.index++,!0)}updateNodeAt(e,n,r,i,s){let a=this.top.children[i];return a.dirty==Ar&&a.dom==a.contentDOM&&(a.dirty=Io),a.update(e,n,r,s)?(this.destroyBetween(this.index,i),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==r)return i}return-1}e=n}}updateNextNode(e,n,r,i,s,a){for(let u=this.index;u<this.top.children.length;u++){let c=this.top.children[u];if(c instanceof Is){let f=this.preMatch.matched.get(c);if(f!=null&&f!=s)return!1;let h=c.dom,m,g=this.isLocked(h)&&!(e.isText&&c.node&&c.node.isText&&c.nodeDOM.nodeValue==e.text&&c.dirty!=Ar&&Ep(n,c.outerDeco));if(!g&&c.update(e,n,r,i))return this.destroyBetween(this.index,u),c.dom!=h&&(this.changed=!0),this.index++,!0;if(!g&&(m=this.recreateWrapper(c,e,n,r,i,a)))return this.destroyBetween(this.index,u),this.top.children[this.index]=m,m.contentDOM&&(m.dirty=Io,m.updateChildren(i,a+1),m.dirty=pr),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,i,s,a){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!Ep(r,e.outerDeco)||!i.eq(e.innerDeco))return null;let u=Is.create(this.top,n,r,i,s,a);if(u.contentDOM){u.children=e.children,e.children=[];for(let c of u.children)c.parent=u}return e.destroy(),u}addNode(e,n,r,i,s){let a=Is.create(this.top,e,n,r,i,s);a.contentDOM&&a.updateChildren(i,s+1),this.top.children.splice(this.index++,0,a),this.changed=!0}placeWidget(e,n,r){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(i&&i.matchesWidget(e)&&(e==i.widget||!i.widget.type.toDOM.parentNode))this.index++;else{let s=new yM(this.top,e,n,r);this.top.children.splice(this.index++,0,s),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof Ls;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof Km)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((hn||on)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let i=new xM(this.top,[],r,null);n!=this.top?n.children.push(i):n.children.splice(this.index++,0,i),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function xG(t,e){let n=e,r=n.children.length,i=t.childCount,s=new Map,a=[];e:for(;i>0;){let u;for(;;)if(r){let f=n.children[r-1];if(f instanceof Ls)n=f,r=f.children.length;else{u=f,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let c=u.node;if(c){if(c!=t.child(i-1))break;--i,s.set(u,i),a.push(u)}}return{index:i,matched:s,matches:a.reverse()}}function vG(t,e){return t.type.side-e.type.side}function kG(t,e,n,r){let i=e.locals(t),s=0;if(i.length==0){for(let f=0;f<t.childCount;f++){let h=t.child(f);r(h,i,e.forChild(s,h),f),s+=h.nodeSize}return}let a=0,u=[],c=null;for(let f=0;;){let h,m;for(;a<i.length&&i[a].to==s;){let E=i[a++];E.widget&&(h?(m||(m=[h])).push(E):h=E)}if(h)if(m){m.sort(vG);for(let E=0;E<m.length;E++)n(m[E],f,!!c)}else n(h,f,!!c);let g,b;if(c)b=-1,g=c,c=null;else if(f<t.childCount)b=f,g=t.child(f++);else break;for(let E=0;E<u.length;E++)u[E].to<=s&&u.splice(E--,1);for(;a<i.length&&i[a].from<=s&&i[a].to>s;)u.push(i[a++]);let x=s+g.nodeSize;if(g.isText){let E=x;a<i.length&&i[a].from<E&&(E=i[a].from);for(let D=0;D<u.length;D++)u[D].to<E&&(E=u[D].to);E<x&&(c=g.cut(E-s),g=g.cut(0,E-s),x=E,b=-1)}else for(;a<i.length&&i[a].to<x;)a++;let k=g.isInline&&!g.isLeaf?u.filter(E=>!E.inline):u.slice();r(g,k,e.forChild(s,g),b),s=x}}function CG(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function EG(t,e,n,r){for(let i=0,s=0;i<t.childCount&&s<=r;){let a=t.child(i++),u=s;if(s+=a.nodeSize,!a.isText)continue;let c=a.text;for(;i<t.childCount;){let f=t.child(i++);if(s+=f.nodeSize,!f.isText)break;c+=f.text}if(s>=n){if(s>=r&&c.slice(r-e.length-u,r-u)==e)return r-e.length;let f=u<r?c.lastIndexOf(e,r-u-1):-1;if(f>=0&&f+e.length+u>=n)return u+f;if(n==r&&c.length>=r+e.length-u&&c.slice(r-u,r-u+e.length)==e)return r}}return-1}function P4(t,e,n,r,i){let s=[];for(let a=0,u=0;a<t.length;a++){let c=t[a],f=u,h=u+=c.size;f>=n||h<=e?s.push(c):(f<e&&s.push(c.slice(0,e-f,r)),i&&(s.push(i),i=void 0),h>n&&s.push(c.slice(n-f,c.size,r)))}return s}function Dx(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let i=t.docView.nearestDesc(n.focusNode),s=i&&i.size==0,a=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(a<0)return null;let u=r.resolve(a),c,f;if(Fm(n)){for(c=a;i&&!i.node;)i=i.parent;let m=i.node;if(i&&m.isAtom&&ke.isSelectable(m)&&i.parent&&!(m.isInline&&Yq(n.focusNode,n.focusOffset,i.dom))){let g=i.posBefore;f=new ke(a==g?u:r.resolve(g))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let m=a,g=a;for(let b=0;b<n.rangeCount;b++){let x=n.getRangeAt(b);m=Math.min(m,t.docView.posFromDOM(x.startContainer,x.startOffset,1)),g=Math.max(g,t.docView.posFromDOM(x.endContainer,x.endOffset,-1))}if(m<0)return null;[c,a]=g==t.state.selection.anchor?[g,m]:[m,g],u=r.resolve(a)}else c=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(c<0)return null}let h=r.resolve(c);if(!f){let m=e=="pointer"||t.state.selection.head<u.pos&&!s?1:-1;f=Sx(t,h,u,m)}return f}function EM(t){return t.editable?t.hasFocus():SM(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function Ri(t,e=!1){let n=t.state.selection;if(DM(t,n),!EM(t))return;let r=t.input.mouseDown;if(!e&&on&&r){let i=t.domSelectionRange(),s=t.domObserver.currentSelection;if(i.anchorNode&&s.anchorNode&&sa(i.anchorNode,i.anchorOffset,s.anchorNode,s.anchorOffset)&&r.delaySelUpdate()){t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)SG(t);else{let{anchor:i,head:s}=n,a,u;sD&&!(n instanceof De)&&(n.$from.parent.inlineContent||(a=oD(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(u=oD(t,n.to))),t.docView.setSelection(i,s,t,e),sD&&(a&&aD(a),u&&aD(u)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&DG(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}const sD=hn||on&&cM<63;function oD(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),i=r<n.childNodes.length?n.childNodes[r]:null,s=r?n.childNodes[r-1]:null;if(hn&&i&&i.contentEditable=="false")return ly(i);if((!i||i.contentEditable=="false")&&(!s||s.contentEditable=="false")){if(i)return ly(i);if(s)return ly(s)}}function ly(t){return t.contentEditable="true",hn&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function aD(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function DG(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=i)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!EM(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function SG(t){let e=t.domSelection();if(!e)return;let n=t.cursorWrapper.dom,r=n.nodeName=="IMG";r?e.collapse(n.parentNode,rn(n)+1):e.collapse(n,0),!r&&!t.state.selection.visible&&Ln&&zs<=11&&(n.disabled=!0,n.disabled=!1)}function DM(t,e){if(e instanceof ke){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(lD(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else lD(t)}function lD(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function Sx(t,e,n,r){return t.someProp("createSelectionBetween",i=>i(t,e,n))||De.between(e,n,r)}function uD(t){return t.editable&&!t.hasFocus()?!1:SM(t)}function SM(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function wG(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return sa(e.node,e.offset,n.anchorNode,n.anchorOffset)}function z4(t,e){let{$anchor:n,$head:r}=t.selection,i=e>0?n.max(r):n.min(r),s=i.parent.inlineContent?i.depth?t.doc.resolve(e>0?i.after():i.before()):null:i;return s&&Ne.findFrom(s,e)}function Cs(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function cD(t,e,n){let r=t.state.selection;if(r instanceof De)if(n.indexOf("s")>-1){let{$head:i}=r,s=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let a=t.state.doc.resolve(i.pos+s.nodeSize*(e<0?-1:1));return Cs(t,new De(r.$anchor,a))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let i=z4(t.state,e);return i&&i instanceof ke?Cs(t,i):!1}else if(!(cr&&n.indexOf("m")>-1)){let i=r.$head,s=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter,a;if(!s||s.isText)return!1;let u=e<0?i.pos-s.nodeSize:i.pos;return s.isAtom||(a=t.docView.descAt(u))&&!a.contentDOM?ke.isSelectable(s)?Cs(t,new ke(e<0?t.state.doc.resolve(i.pos-s.nodeSize):i)):Dd?Cs(t,new De(t.state.doc.resolve(e<0?u:u+s.nodeSize))):!1:!1}}else return!1;else{if(r instanceof ke&&r.node.isInline)return Cs(t,new De(e>0?r.$to:r.$from));{let i=z4(t.state,e);return i?Cs(t,i):!1}}}function Dp(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function $c(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function cl(t,e){return e<0?$G(t):TG(t)}function $G(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let i,s,a=!1;for(hr&&n.nodeType==1&&r<Dp(n)&&$c(n.childNodes[r],-1)&&(a=!0);;)if(r>0){if(n.nodeType!=1)break;{let u=n.childNodes[r-1];if($c(u,-1))i=n,s=--r;else if(u.nodeType==3)n=u,r=n.nodeValue.length;else break}}else{if(wM(n))break;{let u=n.previousSibling;for(;u&&$c(u,-1);)i=n.parentNode,s=rn(u),u=u.previousSibling;if(u)n=u,r=Dp(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}a?L4(t,n,r):i&&L4(t,i,s)}function TG(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let i=Dp(n),s,a;for(;;)if(r<i){if(n.nodeType!=1)break;let u=n.childNodes[r];if($c(u,1))s=n,a=++r;else break}else{if(wM(n))break;{let u=n.nextSibling;for(;u&&$c(u,1);)s=u.parentNode,a=rn(u)+1,u=u.nextSibling;if(u)n=u,r=0,i=Dp(n);else{if(n=n.parentNode,n==t.dom)break;r=i=0}}}s&&L4(t,s,a)}function wM(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function AG(t,e){for(;t&&e==t.childNodes.length&&!Ed(t);)e=rn(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function BG(t,e){for(;t&&!e&&!Ed(t);)e=rn(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function L4(t,e,n){if(e.nodeType!=3){let s,a;(a=AG(e,n))?(e=a,n=0):(s=BG(e,n))&&(e=s,n=s.nodeValue.length)}let r=t.domSelection();if(!r)return;if(Fm(r)){let s=document.createRange();s.setEnd(e,n),s.setStart(e,n),r.removeAllRanges(),r.addRange(s)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:i}=t;setTimeout(()=>{t.state==i&&Ri(t)},50)}function dD(t,e){let n=t.state.doc.resolve(e);if(!(on||dM)&&n.parent.inlineContent){let i=t.coordsAtPos(e);if(e>n.start()){let s=t.coordsAtPos(e-1),a=(s.top+s.bottom)/2;if(a>i.top&&a<i.bottom&&Math.abs(s.left-i.left)>1)return s.left<i.left?"ltr":"rtl"}if(e<n.end()){let s=t.coordsAtPos(e+1),a=(s.top+s.bottom)/2;if(a>i.top&&a<i.bottom&&Math.abs(s.left-i.left)>1)return s.left>i.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function fD(t,e,n){let r=t.state.selection;if(r instanceof De&&!r.empty||n.indexOf("s")>-1||cr&&n.indexOf("m")>-1)return!1;let{$from:i,$to:s}=r;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let a=z4(t.state,e);if(a&&a instanceof ke)return Cs(t,a)}if(!i.parent.inlineContent){let a=e<0?i:s,u=r instanceof Yn?Ne.near(a,e):Ne.findFrom(a,e);return u?Cs(t,u):!1}return!1}function hD(t,e){if(!(t.state.selection instanceof De))return!0;let{$head:n,$anchor:r,empty:i}=t.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let s=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(s&&!s.isText){let a=t.state.tr;return e<0?a.delete(n.pos-s.nodeSize,n.pos):a.delete(n.pos,n.pos+s.nodeSize),t.dispatch(a),!0}return!1}function pD(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function MG(t){if(!hn||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;pD(t,r,"true"),setTimeout(()=>pD(t,r,"false"),20)}return!1}function NG(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function RG(t,e){let n=e.keyCode,r=NG(e);if(n==8||cr&&n==72&&r=="c")return hD(t,-1)||cl(t,-1);if(n==46&&!e.shiftKey||cr&&n==68&&r=="c")return hD(t,1)||cl(t,1);if(n==13||n==27)return!0;if(n==37||cr&&n==66&&r=="c"){let i=n==37?dD(t,t.state.selection.from)=="ltr"?-1:1:-1;return cD(t,i,r)||cl(t,i)}else if(n==39||cr&&n==70&&r=="c"){let i=n==39?dD(t,t.state.selection.from)=="ltr"?1:-1:1;return cD(t,i,r)||cl(t,i)}else{if(n==38||cr&&n==80&&r=="c")return fD(t,-1,r)||cl(t,-1);if(n==40||cr&&n==78&&r=="c")return MG(t)||fD(t,1,r)||cl(t,1);if(r==(cr?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function wx(t,e){t.someProp("transformCopied",b=>{e=b(e,t)});let n=[],{content:r,openStart:i,openEnd:s}=e;for(;i>1&&s>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,s--;let b=r.firstChild;n.push(b.type.name,b.attrs!=b.type.defaultAttrs?b.attrs:null),r=b.content}let a=t.someProp("clipboardSerializer")||ya.fromSchema(t.state.schema),u=NM(),c=u.createElement("div");c.appendChild(a.serializeFragment(r,{document:u}));let f=c.firstChild,h,m=0;for(;f&&f.nodeType==1&&(h=MM[f.nodeName.toLowerCase()]);){for(let b=h.length-1;b>=0;b--){let x=u.createElement(h[b]);for(;c.firstChild;)x.appendChild(c.firstChild);c.appendChild(x),m++}f=c.firstChild}f&&f.nodeType==1&&f.setAttribute("data-pm-slice",`${i} ${s}${m?` -${m}`:""} ${JSON.stringify(n)}`);let g=t.someProp("clipboardTextSerializer",b=>b(e,t))||e.content.textBetween(0,e.content.size,`
|
|
28
|
+
|
|
29
|
+
`);return{dom:c,text:g,slice:e}}function $M(t,e,n,r,i){let s=i.parent.type.spec.code,a,u;if(!n&&!e)return null;let c=!!e&&(r||s||!n);if(c){if(t.someProp("transformPastedText",g=>{e=g(e,s||r,t)}),s)return u=new pe(ae.from(t.state.schema.text(e.replace(/\r\n?/g,`
|
|
30
|
+
`))),0,0),t.someProp("transformPasted",g=>{u=g(u,t,!0)}),u;let m=t.someProp("clipboardTextParser",g=>g(e,i,r,t));if(m)u=m;else{let g=i.marks(),{schema:b}=t.state,x=ya.fromSchema(b);a=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(k=>{let E=a.appendChild(document.createElement("p"));k&&E.appendChild(x.serializeNode(b.text(k,g)))})}}else t.someProp("transformPastedHTML",m=>{n=m(n,t)}),a=LG(n),Dd&&IG(a);let f=a&&a.querySelector("[data-pm-slice]"),h=f&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(f.getAttribute("data-pm-slice")||"");if(h&&h[3])for(let m=+h[3];m>0;m--){let g=a.firstChild;for(;g&&g.nodeType!=1;)g=g.nextSibling;if(!g)break;a=g}if(u||(u=(t.someProp("clipboardParser")||t.someProp("domParser")||Mi.fromSchema(t.state.schema)).parseSlice(a,{preserveWhitespace:!!(c||h),context:i,ruleFromNode(g){return g.nodeName=="BR"&&!g.nextSibling&&g.parentNode&&!OG.test(g.parentNode.nodeName)?{ignore:!0}:null}})),h)u=jG(mD(u,+h[1],+h[2]),h[4]);else if(u=pe.maxOpen(PG(u.content,i),!0),u.openStart||u.openEnd){let m=0,g=0;for(let b=u.content.firstChild;m<u.openStart&&!b.type.spec.isolating;m++,b=b.firstChild);for(let b=u.content.lastChild;g<u.openEnd&&!b.type.spec.isolating;g++,b=b.lastChild);u=mD(u,m,g)}return t.someProp("transformPasted",m=>{u=m(u,t,c)}),u}const OG=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function PG(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let i=e.node(n).contentMatchAt(e.index(n)),s,a=[];if(t.forEach(u=>{if(!a)return;let c=i.findWrapping(u.type),f;if(!c)return a=null;if(f=a.length&&s.length&&AM(c,s,u,a[a.length-1],0))a[a.length-1]=f;else{a.length&&(a[a.length-1]=BM(a[a.length-1],s.length));let h=TM(u,c);a.push(h),i=i.matchType(h.type),s=c}}),a)return ae.from(a)}return t}function TM(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,ae.from(t));return t}function AM(t,e,n,r,i){if(i<t.length&&i<e.length&&t[i]==e[i]){let s=AM(t,e,n,r.lastChild,i+1);if(s)return r.copy(r.content.replaceChild(r.childCount-1,s));if(r.contentMatchAt(r.childCount).matchType(i==t.length-1?n.type:t[i+1]))return r.copy(r.content.append(ae.from(TM(n,t,i+1))))}}function BM(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,BM(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(ae.empty,!0);return t.copy(n.append(r))}function I4(t,e,n,r,i,s){let a=e<0?t.firstChild:t.lastChild,u=a.content;return t.childCount>1&&(s=0),i<r-1&&(u=I4(u,e,n,r,i+1,s)),i>=n&&(u=e<0?a.contentMatchAt(0).fillBefore(u,s<=i).append(u):u.append(a.contentMatchAt(a.childCount).fillBefore(ae.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,a.copy(u))}function mD(t,e,n){return e<t.openStart&&(t=new pe(I4(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new pe(I4(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const MM={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};function NM(){return document.implementation.createHTMLDocument("title")}let uy=null;function zG(t){let e=window.trustedTypes;return e?(uy||(uy=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),uy.createHTML(t)):t}function LG(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=NM(),r=n.body,i=/<([a-z][^>\s]+)/i.exec(t),s;if((s=i&&MM[i[1].toLowerCase()])&&(t=s.map(a=>"<"+a+">").join("")+t+s.map(a=>"</"+a+">").reverse().join("")),r.innerHTML=zG(t),s)for(let a=0;a<s.length;a++)r=r.querySelector(s[a])||r;for(let a=0;a<n.styleSheets.length;a++){let u=n.styleSheets[a];for(let c=0;c<u.rules.length;c++){let f=u.rules[c];if(f instanceof CSSStyleRule){let h=r.querySelectorAll(f.selectorText);for(let m=0;m<h.length;m++)h[m].style.cssText+=f.style.cssText}}}return r}function IG(t){let e=t.querySelectorAll(on?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}function jG(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return t}let{content:i,openStart:s,openEnd:a}=t;for(let u=r.length-2;u>=0;u-=2){let c=n.nodes[r[u]];if(!c||c.hasRequiredAttrs())break;i=ae.from(c.create(r[u+1],i)),s++,a++}return new pe(i,s,a)}const vn={},kn={},FG={touchstart:!0,touchmove:!0};class KG{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function _G(t){for(let e in vn){let n=vn[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{HG(t,r)&&!$x(t,r)&&(t.editable||!(r.type in kn))&&n(t,r)},FG[e]?{passive:!0}:void 0)}hn&&t.dom.addEventListener("input",()=>null),j4(t)}function Ti(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function VG(t){t.input.mouseDown&&t.input.mouseDown.done(),t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function j4(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>$x(t,r))})}function $x(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function HG(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function UG(t,e){!$x(t,e)&&vn[e.type]&&(t.editable||!(e.type in kn))&&vn[e.type](t,e)}kn.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!zM(t)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!($i&&on&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),Pl&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",i=>i(t,Bo(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||RG(t,n)?n.preventDefault():Ti(t,"key")};kn.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};kn.keypress=(t,e)=>{let n=e;if(zM(t)||!n.charCode||n.ctrlKey&&!n.altKey||cr&&n.metaKey)return;if(t.someProp("handleKeyPress",i=>i(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof De)||!r.$from.sameParent(r.$to)){let i=String.fromCharCode(n.charCode),s=()=>t.state.tr.insertText(i).scrollIntoView();!/[\r\n]/.test(i)&&!t.someProp("handleTextInput",a=>a(t,r.$from.pos,r.$to.pos,i,s))&&t.dispatch(s()),n.preventDefault()}};function wd(t){return{left:t.clientX,top:t.clientY}}function qG(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function Tx(t,e,n,r,i){if(r==-1)return!1;let s=t.state.doc.resolve(r);for(let a=s.depth+1;a>0;a--)if(t.someProp(e,u=>a>s.depth?u(t,n,s.nodeAfter,s.before(a),i,!0):u(t,n,s.node(a),s.before(a),i,!1)))return!0;return!1}function $d(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);r.setMeta("pointer",!0),t.dispatch(r)}function GG(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&ke.isSelectable(r)?($d(t,new ke(n)),!0):!1}function WG(t,e){if(e==-1)return!1;let n=t.state.selection,r,i;n instanceof ke&&(r=n.node);let s=t.state.doc.resolve(e);for(let a=s.depth+1;a>0;a--){let u=a>s.depth?s.nodeAfter:s.node(a);if(ke.isSelectable(u)){r&&n.$from.depth>0&&a>=n.$from.depth&&s.before(n.$from.depth+1)==n.$from.pos?i=s.before(n.$from.depth):i=s.before(a);break}}return i!=null?($d(t,ke.create(t.state.doc,i)),!0):!1}function QG(t,e,n,r,i){return Tx(t,"handleClickOn",e,n,r)||t.someProp("handleClick",s=>s(t,e,r))||(i?WG(t,n):GG(t,n))}function YG(t,e,n,r){return Tx(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",i=>i(t,e,r))}function XG(t,e,n,r){return Tx(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",i=>i(t,e,r))||JG(t,n,r)}function JG(t,e,n){if(n.button!=0)return!1;let r=RM(t,e,!0),i=t.state.doc;return r?($d(t,r),r instanceof De&&i.eq(t.state.doc)&&(t.input.mouseDown=new eW(t,r)),!0):!1}function RM(t,e,n){let r=t.state.doc;if(e==-1)return r.inlineContent?De.create(r,0,r.content.size):null;let i=r.resolve(e);for(let s=i.depth+1;s>0;s--){let a=s>i.depth?i.nodeAfter:i.node(s),u=i.before(s);if(a.inlineContent)return De.create(r,u+1,u+1+a.content.size);if(n&&ke.isSelectable(a))return ke.create(r,u)}return null}function Ax(t){return Sp(t)}const OM=cr?"metaKey":"ctrlKey";vn.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=Ax(t),i=Date.now(),s="singleClick";i-t.input.lastClick.time<500&&qG(n,t.input.lastClick)&&!n[OM]&&t.input.lastClick.button==n.button&&(t.input.lastClick.type=="singleClick"?s="doubleClick":t.input.lastClick.type=="doubleClick"&&(s="tripleClick")),t.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:s,button:n.button},t.input.mouseDown&&t.input.mouseDown.done();let a=t.posAtCoords(wd(n));a&&(s=="singleClick"?t.input.mouseDown=new ZG(t,a,n,!!r):(s=="doubleClick"?YG:XG)(t,a.pos,a.inside,n)?n.preventDefault():Ti(t,"pointer"))};class PM{constructor(e){this.view=e,this.mightDrag=null,e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this))}up(e){this.done()}move(e){e.buttons==0&&this.done()}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.view.input.mouseDown==this&&(this.view.input.mouseDown=null)}delaySelUpdate(){return!1}}class ZG extends PM{constructor(e,n,r,i){super(e),this.pos=n,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.startDoc=e.state.doc,this.selectNode=!!r[OM],this.allowDefault=r.shiftKey;let s,a;if(n.inside>-1)s=e.state.doc.nodeAt(n.inside),a=n.inside;else{let h=e.state.doc.resolve(n.pos);s=h.parent,a=h.depth?h.before():0}const u=i?null:r.target,c=u?e.docView.nearestDesc(u,!0):null;this.target=c&&c.nodeDOM.nodeType==1?c.nodeDOM:null;let{selection:f}=e.state;r.button==0&&(s.type.spec.draggable&&s.type.spec.selectable!==!1||f instanceof ke&&f.from<=a&&f.to>a)&&(this.mightDrag={node:s,pos:a,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&hr&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),Ti(e,"pointer")}done(){super.done(),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>{this.view.isDestroyed||Ri(this.view)})}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(wd(e))),this.updateAllowDefault(e),this.allowDefault||!n?Ti(this.view,"pointer"):QG(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||hn&&this.mightDrag&&!this.mightDrag.node.isAtom||on&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?($d(this.view,Ne.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):Ti(this.view,"pointer")}move(e){this.updateAllowDefault(e),Ti(this.view,"pointer"),super.move(e)}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}delaySelUpdate(){return this.allowDefault?(this.delayedSelectionSync=!0,!0):!1}}class eW extends PM{constructor(e,n){super(e),this.startSelection=n,this.startDoc=e.state.doc}move(e){if(e.buttons==0||this.view.isDestroyed||!this.view.state.doc.eq(this.startDoc)){this.done();return}e.preventDefault(),Ti(this.view,"pointer");let n=this.view.posAtCoords(wd(e)),r=n&&RM(this.view,n.inside,!1);if(!r)return;let{doc:i}=this.view.state,s=this.startSelection,[a,u]=r.from<s.from?[s.to,r.from]:[s.from,r.to];$d(this.view,De.create(i,a,u))}}vn.touchstart=t=>{t.input.lastTouch=Date.now(),Ax(t),Ti(t,"pointer")};vn.touchmove=t=>{t.input.lastTouch=Date.now(),Ti(t,"pointer")};vn.contextmenu=t=>Ax(t);function zM(t,e){return t.composing?!0:hn&&Math.abs(Date.now()-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const tW=$i?5e3:-1;kn.compositionstart=kn.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof De&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||on&&dM&&nW(t)))t.markCursor=t.state.storedMarks||n.marks(),Sp(t,!0),t.markCursor=null;else if(Sp(t,!e.selection.empty),hr&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let i=r.focusNode,s=r.focusOffset;i&&i.nodeType==1&&s!=0;){let a=s<0?i.lastChild:i.childNodes[s-1];if(!a)break;if(a.nodeType==3){let u=t.domSelection();u&&u.collapse(a,a.nodeValue.length);break}else i=a,s=-1}}t.input.composing=!0}LM(t,tW)};function nW(t){let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(!e||e.nodeType!=1||n>=e.childNodes.length)return!1;let r=e.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}kn.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=Date.now(),t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.badSafariComposition?t.domObserver.forceFlush():t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,LM(t,20))};function LM(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>Sp(t),e))}function IM(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=Date.now());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function rW(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=Wq(e.focusNode,e.focusOffset),r=Qq(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let i=r.pmViewDesc,s=t.domObserver.lastChangedTextNode;if(n==s||r==s)return s;if(!i||!i.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let a=n.pmViewDesc;if(!(!a||!a.isText(n.nodeValue)))return r}}return n||r}function Sp(t,e=!1){if(!($i&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),IM(t),e||t.docView&&t.docView.dirty){let n=Dx(t),r=t.state.selection;return n&&!n.eq(r)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function iW(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const nd=Ln&&zs<15||Pl&&Zq<604;vn.copy=kn.cut=(t,e)=>{let n=e,r=t.state.selection,i=n.type=="cut";if(r.empty)return;let s=nd?null:n.clipboardData,a=r.content(),{dom:u,text:c}=wx(t,a);s?(n.preventDefault(),s.clearData(),s.setData("text/html",u.innerHTML),s.setData("text/plain",c)):iW(t,u),i&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function sW(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function oW(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let i=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?rd(t,r.value,null,i,e):rd(t,r.textContent,r.innerHTML,i,e)},50)}function rd(t,e,n,r,i){let s=$M(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",c=>c(t,i,s||pe.empty)))return!0;if(!s)return!1;let a=sW(s),u=a?t.state.tr.replaceSelectionWith(a,r):t.state.tr.replaceSelection(s);return t.dispatch(u.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function jM(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}kn.paste=(t,e)=>{let n=e;if(t.composing&&!$i)return;let r=nd?null:n.clipboardData,i=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&rd(t,jM(r),r.getData("text/html"),i,n)?n.preventDefault():oW(t,n)};class FM{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const aW=cr?"altKey":"ctrlKey";function KM(t,e){let n;return t.someProp("dragCopies",r=>{n=n||r(e)}),n!=null?!n:!e[aW]}vn.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=t.state.selection,s=i.empty?null:t.posAtCoords(wd(n)),a;if(!(s&&s.pos>=i.from&&s.pos<=(i instanceof ke?i.to-1:i.to))){if(r&&r.mightDrag)a=ke.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let m=t.docView.nearestDesc(n.target,!0);m&&m.node.type.spec.draggable&&m!=t.docView&&(a=ke.create(t.state.doc,m.posBefore))}}let u=(a||t.state.selection).content(),{dom:c,text:f,slice:h}=wx(t,u);(!n.dataTransfer.files.length||!on||cM>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(nd?"Text":"text/html",c.innerHTML),n.dataTransfer.effectAllowed="copyMove",nd||n.dataTransfer.setData("text/plain",f),t.dragging=new FM(h,KM(t,n),a)};vn.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};kn.dragover=kn.dragenter=(t,e)=>e.preventDefault();kn.drop=(t,e)=>{try{lW(t,e,t.dragging)}finally{t.dragging=null}};function lW(t,e,n){if(!e.dataTransfer)return;let r=t.posAtCoords(wd(e));if(!r)return;let i=t.state.doc.resolve(r.pos),s=n&&n.slice;s?t.someProp("transformPasted",b=>{s=b(s,t,!1)}):s=$M(t,jM(e.dataTransfer),nd?null:e.dataTransfer.getData("text/html"),!1,i);let a=!!(n&&KM(t,e));if(t.someProp("handleDrop",b=>b(t,e,s||pe.empty,a))){e.preventDefault();return}if(!s)return;e.preventDefault();let u=s?_7(t.state.doc,i.pos,s):i.pos;u==null&&(u=i.pos);let c=t.state.tr;if(a){let{node:b}=n;b?b.replace(c):c.deleteSelection()}let f=c.mapping.map(u),h=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,m=c.doc;if(h?c.replaceRangeWith(f,f,s.content.firstChild):c.replaceRange(f,f,s),c.doc.eq(m))return;let g=c.doc.resolve(f);if(h&&ke.isSelectable(s.content.firstChild)&&g.nodeAfter&&g.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new ke(g));else{let b=c.mapping.map(u);c.mapping.maps[c.mapping.maps.length-1].forEach((x,k,E,D)=>b=D),c.setSelection(Sx(t,g,c.doc.resolve(b)))}t.focus(),t.dispatch(c.setMeta("uiEvent","drop"))}vn.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&Ri(t)},20))};vn.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};vn.beforeinput=(t,e)=>{if($i&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:r}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=r||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",s=>s(t,Bo(8,"Backspace")))))return;let{$cursor:i}=t.state.selection;i&&i.pos>0&&t.dispatch(t.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let t in kn)vn[t]=kn[t];function id(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class wp{constructor(e,n){this.toDOM=e,this.spec=n||Qo,this.side=this.spec.side||0}map(e,n,r,i){let{pos:s,deleted:a}=e.mapResult(n.from+i,this.side<0?-1:1);return a?null:new yn(s-r,s-r,this)}valid(){return!0}eq(e){return this==e||e instanceof wp&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&id(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class js{constructor(e,n){this.attrs=e,this.spec=n||Qo}map(e,n,r,i){let s=e.map(n.from+i,this.spec.inclusiveStart?-1:1)-r,a=e.map(n.to+i,this.spec.inclusiveEnd?1:-1)-r;return s>=a?null:new yn(s,a,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof js&&id(this.attrs,e.attrs)&&id(this.spec,e.spec)}static is(e){return e.type instanceof js}destroy(){}}class Bx{constructor(e,n){this.attrs=e,this.spec=n||Qo}map(e,n,r,i){let s=e.mapResult(n.from+i,1);if(s.deleted)return null;let a=e.mapResult(n.to+i,-1);return a.deleted||a.pos<=s.pos?null:new yn(s.pos-r,a.pos-r,this)}valid(e,n){let{index:r,offset:i}=e.content.findIndex(n.from),s;return i==n.from&&!(s=e.child(r)).isText&&i+s.nodeSize==n.to}eq(e){return this==e||e instanceof Bx&&id(this.attrs,e.attrs)&&id(this.spec,e.spec)}destroy(){}}class yn{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new yn(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,r){return this.type.map(e,this,n,r)}static widget(e,n,r){return new yn(e,e,new wp(n,r))}static inline(e,n,r,i){return new yn(e,n,new js(r,i))}static node(e,n,r,i){return new yn(e,n,new Bx(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof js}get widget(){return this.type instanceof wp}}const pl=[],Qo={};class lt{constructor(e,n){this.local=e.length?e:pl,this.children=n.length?n:pl}static create(e,n){return n.length?$p(n,e,0,Qo):cn}find(e,n,r){let i=[];return this.findInner(e??0,n??1e9,i,0,r),i}findInner(e,n,r,i,s){for(let a=0;a<this.local.length;a++){let u=this.local[a];u.from<=n&&u.to>=e&&(!s||s(u.spec))&&r.push(u.copy(u.from+i,u.to+i))}for(let a=0;a<this.children.length;a+=3)if(this.children[a]<n&&this.children[a+1]>e){let u=this.children[a]+1;this.children[a+2].findInner(e-u,n-u,r,i+u,s)}}map(e,n,r){return this==cn||e.maps.length==0?this:this.mapInner(e,n,0,0,r||Qo)}mapInner(e,n,r,i,s){let a;for(let u=0;u<this.local.length;u++){let c=this.local[u].map(e,r,i);c&&c.type.valid(n,c)?(a||(a=[])).push(c):s.onRemove&&s.onRemove(this.local[u].spec)}return this.children.length?uW(this.children,a||[],e,n,r,i,s):a?new lt(a.sort(Yo),pl):cn}add(e,n){return n.length?this==cn?lt.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let i,s=0;e.forEach((u,c)=>{let f=c+r,h;if(h=VM(n,u,f)){for(i||(i=this.children.slice());s<i.length&&i[s]<c;)s+=3;i[s]==c?i[s+2]=i[s+2].addInner(u,h,f+1):i.splice(s,0,c,c+u.nodeSize,$p(h,u,f+1,Qo)),s+=3}});let a=_M(s?HM(n):n,-r);for(let u=0;u<a.length;u++)a[u].type.valid(e,a[u])||a.splice(u--,1);return new lt(a.length?this.local.concat(a).sort(Yo):this.local,i||this.children)}remove(e){return e.length==0||this==cn?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,i=this.local;for(let s=0;s<r.length;s+=3){let a,u=r[s]+n,c=r[s+1]+n;for(let h=0,m;h<e.length;h++)(m=e[h])&&m.from>u&&m.to<c&&(e[h]=null,(a||(a=[])).push(m));if(!a)continue;r==this.children&&(r=this.children.slice());let f=r[s+2].removeInner(a,u+1);f!=cn?r[s+2]=f:(r.splice(s,3),s-=3)}if(i.length){for(let s=0,a;s<e.length;s++)if(a=e[s])for(let u=0;u<i.length;u++)i[u].eq(a,n)&&(i==this.local&&(i=this.local.slice()),i.splice(u--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new lt(i,r):cn}forChild(e,n){if(this==cn)return this;if(n.isLeaf)return lt.empty;let r,i;for(let u=0;u<this.children.length;u+=3)if(this.children[u]>=e){this.children[u]==e&&(r=this.children[u+2]);break}let s=e+1,a=s+n.content.size;for(let u=0;u<this.local.length;u++){let c=this.local[u];if(c.from<a&&c.to>s&&c.type instanceof js){let f=Math.max(s,c.from)-s,h=Math.min(a,c.to)-s;f<h&&(i||(i=[])).push(c.copy(f,h))}}if(i){let u=new lt(i.sort(Yo),pl);return r?new ws([u,r]):u}return r||cn}eq(e){if(this==e)return!0;if(!(e instanceof lt)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return Mx(this.localsInner(e))}localsInner(e){if(this==cn)return pl;if(e.inlineContent||!this.local.some(js.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof js||n.push(this.local[r]);return n}forEachSet(e){e(this)}}lt.empty=new lt([],[]);lt.removeOverlap=Mx;const cn=lt.empty;class ws{constructor(e){this.members=e}map(e,n){const r=this.members.map(i=>i.map(e,n,Qo));return ws.from(r)}forChild(e,n){if(n.isLeaf)return lt.empty;let r=[];for(let i=0;i<this.members.length;i++){let s=this.members[i].forChild(e,n);s!=cn&&(s instanceof ws?r=r.concat(s.members):r.push(s))}return ws.from(r)}eq(e){if(!(e instanceof ws)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,r=!0;for(let i=0;i<this.members.length;i++){let s=this.members[i].localsInner(e);if(s.length)if(!n)n=s;else{r&&(n=n.slice(),r=!1);for(let a=0;a<s.length;a++)n.push(s[a])}}return n?Mx(r?n:n.sort(Yo)):pl}static from(e){switch(e.length){case 0:return cn;case 1:return e[0];default:return new ws(e.every(n=>n instanceof lt)?e:e.reduce((n,r)=>n.concat(r instanceof lt?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function uW(t,e,n,r,i,s,a){let u=t.slice();for(let f=0,h=s;f<n.maps.length;f++){let m=0;n.maps[f].forEach((g,b,x,k)=>{let E=k-x-(b-g);for(let D=0;D<u.length;D+=3){let T=u[D+1];if(T<0||g>T+h-m)continue;let $=u[D]+h-m;b>=$?u[D+1]=g<=$?-2:-1:g>=h&&E&&(u[D]+=E,u[D+1]+=E)}m+=E}),h=n.maps[f].map(h,-1)}let c=!1;for(let f=0;f<u.length;f+=3)if(u[f+1]<0){if(u[f+1]==-2){c=!0,u[f+1]=-1;continue}let h=n.map(t[f]+s),m=h-i;if(m<0||m>=r.content.size){c=!0;continue}let g=n.map(t[f+1]+s,-1),b=g-i,{index:x,offset:k}=r.content.findIndex(m),E=r.maybeChild(x);if(E&&k==m&&k+E.nodeSize==b){let D=u[f+2].mapInner(n,E,h+1,t[f]+s+1,a);D!=cn?(u[f]=m,u[f+1]=b,u[f+2]=D):(u[f+1]=-2,c=!0)}else c=!0}if(c){let f=cW(u,t,e,n,i,s,a),h=$p(f,r,0,a);e=h.local;for(let m=0;m<u.length;m+=3)u[m+1]<0&&(u.splice(m,3),m-=3);for(let m=0,g=0;m<h.children.length;m+=3){let b=h.children[m];for(;g<u.length&&u[g]<b;)g+=3;u.splice(g,0,h.children[m],h.children[m+1],h.children[m+2])}}return new lt(e.sort(Yo),u)}function _M(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let i=t[r];n.push(new yn(i.from+e,i.to+e,i.type))}return n}function cW(t,e,n,r,i,s,a){function u(c,f){for(let h=0;h<c.local.length;h++){let m=c.local[h].map(r,i,f);m?n.push(m):a.onRemove&&a.onRemove(c.local[h].spec)}for(let h=0;h<c.children.length;h+=3)u(c.children[h+2],c.children[h]+f+1)}for(let c=0;c<t.length;c+=3)t[c+1]==-1&&u(t[c+2],e[c]+s+1);return n}function VM(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,i=null;for(let s=0,a;s<t.length;s++)(a=t[s])&&a.from>n&&a.to<r&&((i||(i=[])).push(a),t[s]=null);return i}function HM(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function $p(t,e,n,r){let i=[],s=!1;e.forEach((u,c)=>{let f=VM(t,u,c+n);if(f){s=!0;let h=$p(f,u,n+c+1,r);h!=cn&&i.push(c,c+u.nodeSize,h)}});let a=_M(s?HM(t):t,-n).sort(Yo);for(let u=0;u<a.length;u++)a[u].type.valid(e,a[u])||(r.onRemove&&r.onRemove(a[u].spec),a.splice(u--,1));return a.length||i.length?new lt(a,i):cn}function Yo(t,e){return t.from-e.from||t.to-e.to}function Mx(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let i=n+1;i<e.length;i++){let s=e[i];if(s.from==r.from){s.to!=r.to&&(e==t&&(e=t.slice()),e[i]=s.copy(s.from,r.to),gD(e,i+1,s.copy(r.to,s.to)));continue}else{s.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,s.from),gD(e,i,r.copy(s.from,r.to)));break}}}return e}function gD(t,e,n){for(;e<t.length&&Yo(n,t[e])>0;)e++;t.splice(e,0,n)}function cy(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=cn&&e.push(r)}),t.cursorWrapper&&e.push(lt.create(t.state.doc,[t.cursorWrapper.deco])),ws.from(e)}const dW={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},fW=Ln&&zs<=11;class hW{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class pW{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new hW,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;i<r.length;i++)this.queue.push(r[i]);Ln&&zs<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():hn&&e.composing&&r.some(i=>i.type=="childList"&&i.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),fW&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,dW)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(uD(this.view)){if(this.suppressingSelectionUpdates)return Ri(this.view);if(Ln&&zs<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&sa(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,r;for(let s=e.focusNode;s;s=Ol(s))n.add(s);for(let s=e.anchorNode;s;s=Ol(s))if(n.has(s)){r=s;break}let i=r&&this.view.docView.nearestDesc(r);if(i&&i.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&uD(e)&&!this.ignoreSelectionChange(r),s=-1,a=-1,u=!1,c=[];if(e.editable)for(let h=0;h<n.length;h++){let m=this.registerMutation(n[h],c);m&&(s=s<0?m.from:Math.min(m.from,s),a=a<0?m.to:Math.max(m.to,a),m.typeOver&&(u=!0))}if(c.some(h=>h.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46||on&&(e.composing||e.input.compositionEndedAt>Date.now()-50)&&n.some(h=>h.type=="childList"&&h.removedNodes.length))){for(let h of c)if(h.nodeName=="BR"&&h.parentNode){let m=h.nextSibling;for(;m&&m.nodeType==1;){if(m.contentEditable=="false"){h.parentNode.removeChild(h);break}m=m.firstChild}}}else if(hr&&c.length){let h=c.filter(m=>m.nodeName=="BR");if(h.length==2){let[m,g]=h;m.parentNode&&m.parentNode.parentNode==g.parentNode?g.remove():m.remove()}else{let{focusNode:m}=this.currentSelection;for(let g of h){let b=g.parentNode;b&&b.nodeName=="LI"&&(!m||bW(e,m)!=b)&&g.remove()}}}let f=null;s<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Fm(r)&&(f=Dx(e))&&f.eq(Ne.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Ri(e),this.currentSelection.set(r),e.scrollToSelection()):(s>-1||i)&&(s>-1&&(e.docView.markDirty(s,a),mW(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,yW(e,c)),this.handleDOMChange(s,a,u,c),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||Ri(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let h=0;h<e.addedNodes.length;h++){let m=e.addedNodes[h];n.push(m),m.nodeType==3&&(this.lastChangedTextNode=m)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let i=e.previousSibling,s=e.nextSibling;if(Ln&&zs<=11&&e.addedNodes.length)for(let h=0;h<e.addedNodes.length;h++){let{previousSibling:m,nextSibling:g}=e.addedNodes[h];(!m||Array.prototype.indexOf.call(e.addedNodes,m)<0)&&(i=m),(!g||Array.prototype.indexOf.call(e.addedNodes,g)<0)&&(s=g)}let a=i&&i.parentNode==e.target?rn(i)+1:0,u=r.localPosFromDOM(e.target,a,-1),c=s&&s.parentNode==e.target?rn(s):e.target.childNodes.length,f=r.localPosFromDOM(e.target,c,1);return{from:u,to:f}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let bD=new WeakMap,yD=!1;function mW(t){if(!bD.has(t)&&(bD.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=hr,yD)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),yD=!0}}function xD(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,s=e.endOffset,a=t.domAtPos(t.state.selection.anchor);return sa(a.node,a.offset,i,s)&&([n,r,i,s]=[i,s,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:s}}function gW(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return xD(t,i)}let n;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?xD(t,n):null}function bW(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let r=t.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function yW(t,e){var n;let{focusNode:r,focusOffset:i}=t.domSelectionRange();for(let s of e)if(((n=s.parentNode)===null||n===void 0?void 0:n.nodeName)=="TR"){let a=s.nextSibling;for(;a&&a.nodeName!="TD"&&a.nodeName!="TH";)a=a.nextSibling;if(a){let u=a;for(;;){let c=u.firstChild;if(!c||c.nodeType!=1||c.contentEditable=="false"||/^(BR|IMG)$/.test(c.nodeName))break;u=c}u.insertBefore(s,u.firstChild),r==s&&t.domSelection().collapse(s,i)}else s.parentNode.removeChild(s)}}function xW(t,e,n,r){let{node:i,fromOffset:s,toOffset:a,from:u,to:c}=t.docView.parseRange(e,n),f=t.domSelectionRange(),h,m=f.anchorNode;if(m&&t.dom.contains(m.nodeType==1?m:m.parentNode)&&(h=[{node:m,offset:f.anchorOffset}],Fm(f)||h.push({node:f.focusNode,offset:f.focusOffset})),on&&t.input.lastKeyCode===8)for(let D=a;D>s;D--){let T=i.childNodes[D-1],$=T.pmViewDesc;if(T.nodeName=="BR"&&!$){a=D;break}if(!$||$.size)break}let g=t.state.doc,b=t.someProp("domParser")||Mi.fromSchema(t.state.schema),x=g.resolve(u),k=null,E=b.parse(i,{topNode:x.parent,topMatch:x.parent.contentMatchAt(x.index()),topOpen:!0,from:s,to:a,preserveWhitespace:x.parent.type.whitespace=="pre"?"full":!0,findPositions:h,ruleFromNode:vW(r),context:x});if(h&&h[0].pos!=null){let D=h[0].pos,T=h[1]&&h[1].pos;T==null&&(T=D),k={anchor:D+u,head:T+u}}return{doc:E,sel:k,from:u,to:c}}const vW=t=>e=>{let n=e.pmViewDesc;if(n)return n.parseRule(t);if(e.nodeName=="BR"&&e.parentNode){if(hn&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let r=document.createElement("div");return r.appendChild(document.createElement("li")),{skip:r}}else if(e.parentNode.lastChild==e||hn&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null},kW=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function CW(t,e,n,r,i){let s=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let M=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,O=Dx(t,M);if(O&&!t.state.selection.eq(O)){if(on&&$i&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",q=>q(t,Bo(13,"Enter"))))return;let j=t.state.tr.setSelection(O);M=="pointer"?j.setMeta("pointer",!0):M=="key"&&j.scrollIntoView(),s&&j.setMeta("composition",s),t.dispatch(j)}return}let a=t.state.doc.resolve(e),u=a.sharedDepth(n);e=a.before(u+1),n=t.state.doc.resolve(n).after(u+1);let c=t.state.selection,f=xW(t,e,n,i),h=t.state.doc,m=h.slice(f.from,f.to),g,b;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(g=t.state.selection.to,b="end"):(g=t.state.selection.from,b="start"),t.input.lastKeyCode=null;let x=SW(m.content,f.doc.content,f.from,g,b);if(x&&t.input.domChangeCount++,(Pl&&t.input.lastIOSEnter>Date.now()-225||$i)&&i.some(M=>M.nodeType==1&&!kW.test(M.nodeName))&&(!x||x.endA>=x.endB)&&t.someProp("handleKeyDown",M=>M(t,Bo(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!x)if(r&&c instanceof De&&!c.empty&&c.$head.sameParent(c.$anchor)&&!t.composing&&!(f.sel&&f.sel.anchor!=f.sel.head))x={start:c.from,endA:c.to,endB:c.to};else{if(f.sel){let M=vD(t,t.state.doc,f.sel);if(M&&!M.eq(t.state.selection)){let O=t.state.tr.setSelection(M);s&&O.setMeta("composition",s),t.dispatch(O)}}return}t.state.selection.from<t.state.selection.to&&x.start==x.endB&&t.state.selection instanceof De&&(x.start>t.state.selection.from&&x.start<=t.state.selection.from+2&&t.state.selection.from>=f.from?x.start=t.state.selection.from:x.endA<t.state.selection.to&&x.endA>=t.state.selection.to-2&&t.state.selection.to<=f.to&&(x.endB+=t.state.selection.to-x.endA,x.endA=t.state.selection.to)),Ln&&zs<=11&&x.endB==x.start+1&&x.endA==x.start&&x.start>f.from&&f.doc.textBetween(x.start-f.from-1,x.start-f.from+1)==" "&&(x.start--,x.endA--,x.endB--);let k=f.doc.resolveNoCache(x.start-f.from),E=f.doc.resolveNoCache(x.endB-f.from),D=h.resolve(x.start),T=k.sameParent(E)&&k.parent.inlineContent&&D.end()>=x.endA;if((Pl&&t.input.lastIOSEnter>Date.now()-225&&(!T||i.some(M=>M.nodeName=="DIV"||M.nodeName=="P"))||!T&&k.pos<f.doc.content.size&&(!k.sameParent(E)||!k.parent.inlineContent)&&k.pos<E.pos&&!/\S/.test(f.doc.textBetween(k.pos,E.pos,"","")))&&t.someProp("handleKeyDown",M=>M(t,Bo(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>x.start&&DW(h,x.start,x.endA,k,E)&&t.someProp("handleKeyDown",M=>M(t,Bo(8,"Backspace")))){$i&&on&&t.domObserver.suppressSelectionUpdates();return}on&&x.endB==x.start&&(t.input.lastChromeDelete=Date.now()),$i&&!T&&k.start()!=E.start()&&E.parentOffset==0&&k.depth==E.depth&&f.sel&&f.sel.anchor==f.sel.head&&f.sel.head==x.endA&&(x.endB-=2,E=f.doc.resolveNoCache(x.endB-f.from),setTimeout(()=>{t.someProp("handleKeyDown",function(M){return M(t,Bo(13,"Enter"))})},20));let $=x.start,A=x.endA,B=M=>{let O=M||t.state.tr.replace($,A,f.doc.slice(x.start-f.from,x.endB-f.from));if(f.sel){let j=vD(t,O.doc,f.sel);j&&!(on&&t.composing&&j.empty&&(x.start!=x.endB||t.input.lastChromeDelete<Date.now()-100)&&(j.head==$||j.head==O.mapping.map(A)-1)||Ln&&j.empty&&j.head==$)&&O.setSelection(j)}return s&&O.setMeta("composition",s),O.scrollIntoView()},R;if(T)if(k.pos==E.pos){Ln&&zs<=11&&k.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>Ri(t),20));let M=B(t.state.tr.delete($,A)),O=h.resolve(x.start).marksAcross(h.resolve(x.endA));O&&M.ensureMarks(O),t.dispatch(M)}else if(x.endA==x.endB&&(R=EW(k.parent.content.cut(k.parentOffset,E.parentOffset),D.parent.content.cut(D.parentOffset,x.endA-D.start())))){let M=B(t.state.tr);R.type=="add"?M.addMark($,A,R.mark):M.removeMark($,A,R.mark),t.dispatch(M)}else if(k.parent.child(k.index()).isText&&k.index()==E.index()-(E.textOffset?0:1)){let M=k.parent.textBetween(k.parentOffset,E.parentOffset),O=()=>B(t.state.tr.insertText(M,$,A));t.someProp("handleTextInput",j=>j(t,$,A,M,O))||t.dispatch(O())}else t.dispatch(B());else t.dispatch(B())}function vD(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:Sx(t,e.resolve(n.anchor),e.resolve(n.head))}function EW(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,i=n,s=r,a,u,c;for(let h=0;h<r.length;h++)i=r[h].removeFromSet(i);for(let h=0;h<n.length;h++)s=n[h].removeFromSet(s);if(i.length==1&&s.length==0)u=i[0],a="add",c=h=>h.mark(u.addToSet(h.marks));else if(i.length==0&&s.length==1)u=s[0],a="remove",c=h=>h.mark(u.removeFromSet(h.marks));else return null;let f=[];for(let h=0;h<e.childCount;h++)f.push(c(e.child(h)));if(ae.from(f).eq(t))return{mark:u,type:a}}function DW(t,e,n,r,i){if(n-e<=i.pos-r.pos||dy(r,!0,!1)<i.pos)return!1;let s=t.resolve(e);if(!r.parent.isTextblock){let u=s.nodeAfter;return u!=null&&n==e+u.nodeSize}if(s.parentOffset<s.parent.content.size||!s.parent.isTextblock)return!1;let a=t.resolve(dy(s,!0,!0));return!a.parent.isTextblock||a.pos>n||dy(a,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(a.parent.content)}function dy(t,e,n){let r=t.depth,i=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,i++,e=!1;if(n){let s=t.node(r).maybeChild(t.indexAfter(r));for(;s&&!s.isLeaf;)s=s.firstChild,i++}return i}function SW(t,e,n,r,i){let s=t.findDiffStart(e,n),a=n+t.size,u=n+e.size;if(s==null)return null;let{a:c,b:f}=t.findDiffEnd(e,a,u);if(i=="end"){let h=Math.max(0,s-Math.min(c,f));r-=c+h-s}if(c<s&&a<u){let h=r<=s&&r>=c?s-r:0;s-=h,f=s+(f-c),c=s}else if(f<s){let h=r<=s&&r>=f?s-r:0;s-=h,c=s+(c-f),f=s}return{start:s,endA:c,endB:f}}class UM{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new KG,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(SD),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=ED(this),CD(this),this.nodeViews=DD(this),this.docView=rD(this.state.doc,kD(this),cy(this),this.dom,this),this.domObserver=new pW(this,(r,i,s,a)=>CW(this,r,i,s,a)),this.domObserver.start(),_G(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&j4(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(SD),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var r;let i=this.state,s=!1,a=!1;e.storedMarks&&this.composing&&(IM(this),a=!0),this.state=e;let u=i.plugins!=e.plugins||this._props.plugins!=n.plugins;if(u||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let b=DD(this);$W(b,this.nodeViews)&&(this.nodeViews=b,s=!0)}(u||n.handleDOMEvents!=this._props.handleDOMEvents)&&j4(this),this.editable=ED(this),CD(this);let c=cy(this),f=kD(this),h=i.plugins!=e.plugins&&!i.doc.eq(e.doc)?"reset":e.scrollToSelection>i.scrollToSelection?"to selection":"preserve",m=s||!this.docView.matchesNode(e.doc,f,c);(m||!e.selection.eq(i.selection))&&(a=!0);let g=h=="preserve"&&a&&this.dom.style.overflowAnchor==null&&nG(this);if(a){this.domObserver.stop();let b=m&&(Ln||on)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&wW(i.selection,e.selection);if(m){let k=on?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=rW(this)),(s||!this.docView.update(e.doc,f,c,this))&&(this.docView.updateOuterDeco(f),this.docView.destroy(),this.docView=rD(e.doc,f,c,this.dom,this)),k&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(b=!0)}let x=this.input.mouseDown;b||!(x&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&wG(this)&&x.delaySelUpdate())?Ri(this,b):(DM(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((r=this.dragging)===null||r===void 0)&&r.node&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),h=="reset"?this.dom.scrollTop=0:h=="to selection"?this.scrollToSelection():g&&rG(g)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof ke){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&JE(this,n.getBoundingClientRect(),e)}else JE(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,e)}}updateDraggedNode(e,n){let r=e.node,i=-1;if(r.from<this.state.doc.content.size&&this.state.doc.nodeAt(r.from)==r.node)i=r.from;else{let s=r.from+(this.state.doc.content.size-n.doc.content.size);(s>0&&s<this.state.doc.content.size&&this.state.doc.nodeAt(s))==r.node&&(i=s)}this.dragging=new FM(e.slice,e.move,i<0?void 0:ke.create(this.state.doc,i))}someProp(e,n){let r=this._props&&this._props[e],i;if(r!=null&&(i=n?n(r):r))return i;for(let a=0;a<this.directPlugins.length;a++){let u=this.directPlugins[a].props[e];if(u!=null&&(i=n?n(u):u))return i}let s=this.state.plugins;if(s)for(let a=0;a<s.length;a++){let u=s[a].props[e];if(u!=null&&(i=n?n(u):u))return i}}hasFocus(){if(Ln){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&iG(this.dom),Ri(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return uG(this,e)}coordsAtPos(e,n=1){return gM(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let i=this.docView.posFromDOM(e,n,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,n){return pG(this,n||this.state,e)}pasteHTML(e,n){return rd(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return rd(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return wx(this,e)}destroy(){this.docView&&(VG(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],cy(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,qq())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return UG(this,e)}domSelectionRange(){let e=this.domSelection();return e?hn&&this.root.nodeType===11&&Xq(this.dom.ownerDocument)==this.dom&&gW(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}UM.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};function kD(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[yn.node(0,t.state.doc.content.size,e)]}function CD(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:yn.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function ED(t){return!t.someProp("editable",e=>e(t.state)===!1)}function wW(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function DD(t){let e=Object.create(null);function n(r){for(let i in r)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=r[i])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function $W(t,e){let n=0,r=0;for(let i in t){if(t[i]!=e[i])return!0;n++}for(let i in e)r++;return n!=r}function SD(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Us={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Tp={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},TW=typeof navigator<"u"&&/Mac/.test(navigator.platform),AW=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var sn=0;sn<10;sn++)Us[48+sn]=Us[96+sn]=String(sn);for(var sn=1;sn<=24;sn++)Us[sn+111]="F"+sn;for(var sn=65;sn<=90;sn++)Us[sn]=String.fromCharCode(sn+32),Tp[sn]=String.fromCharCode(sn);for(var fy in Us)Tp.hasOwnProperty(fy)||(Tp[fy]=Us[fy]);function BW(t){var e=TW&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||AW&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Tp:Us)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const MW=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),NW=typeof navigator<"u"&&/Win/.test(navigator.platform);function RW(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,i,s,a;for(let u=0;u<e.length-1;u++){let c=e[u];if(/^(cmd|meta|m)$/i.test(c))a=!0;else if(/^a(lt)?$/i.test(c))r=!0;else if(/^(c|ctrl|control)$/i.test(c))i=!0;else if(/^s(hift)?$/i.test(c))s=!0;else if(/^mod$/i.test(c))MW?a=!0:i=!0;else throw new Error("Unrecognized modifier name: "+c)}return r&&(n="Alt-"+n),i&&(n="Ctrl-"+n),a&&(n="Meta-"+n),s&&(n="Shift-"+n),n}function OW(t){let e=Object.create(null);for(let n in t)e[RW(n)]=t[n];return e}function hy(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function PW(t){return new pt({props:{handleKeyDown:qM(t)}})}function qM(t){let e=OW(t);return function(n,r){let i=BW(r),s,a=e[hy(i,r)];if(a&&a(n.state,n.dispatch,n))return!0;if(i.length==1&&i!=" "){if(r.shiftKey){let u=e[hy(i,r,!1)];if(u&&u(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(NW&&r.ctrlKey&&r.altKey)&&(s=Us[r.keyCode])&&s!=i){let u=e[hy(s,r)];if(u&&u(n.state,n.dispatch,n))return!0}}return!1}}var zW=Object.defineProperty,Nx=(t,e)=>{for(var n in e)zW(t,n,{get:e[n],enumerable:!0})};function _m(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:i}=n,{storedMarks:s}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return s},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,s=n.storedMarks,n}}}var Vm=class{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:n}=this,{view:r}=e,{tr:i}=n,s=this.buildProps(i);return Object.fromEntries(Object.entries(t).map(([a,u])=>[a,(...f)=>{const h=u(...f)(s);return!i.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(i),h}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:n,editor:r,state:i}=this,{view:s}=r,a=[],u=!!t,c=t||i.tr,f=()=>(!u&&e&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(c),a.every(m=>m===!0)),h={...Object.fromEntries(Object.entries(n).map(([m,g])=>[m,(...x)=>{const k=this.buildProps(c,e),E=g(...x)(k);return a.push(E),h}])),run:f};return h}createCan(t){const{rawCommands:e,state:n}=this,r=!1,i=t||n.tr,s=this.buildProps(i,r);return{...Object.fromEntries(Object.entries(e).map(([u,c])=>[u,(...f)=>c(...f)({...s,dispatch:void 0})])),chain:()=>this.createChain(i,r)}}buildProps(t,e=!0){const{rawCommands:n,editor:r,state:i}=this,{view:s}=r,a={tr:t,editor:r,view:s,state:_m({state:i,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t,e),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(n).map(([u,c])=>[u,(...f)=>c(...f)(a)]))}};return a}},kr={};Nx(kr,{blur:()=>LW,clearContent:()=>IW,clearNodes:()=>jW,command:()=>FW,createParagraphNear:()=>KW,cut:()=>_W,deleteCurrentNode:()=>VW,deleteNode:()=>HW,deleteRange:()=>UW,deleteSelection:()=>WW,enter:()=>QW,exitCode:()=>YW,extendMarkRange:()=>XW,first:()=>JW,focus:()=>eQ,forEach:()=>tQ,insertContent:()=>nQ,insertContentAt:()=>iQ,insertDefaultBlock:()=>sQ,joinBackward:()=>lQ,joinDown:()=>aQ,joinForward:()=>uQ,joinItemBackward:()=>cQ,joinItemForward:()=>dQ,joinTextblockBackward:()=>fQ,joinTextblockForward:()=>hQ,joinUp:()=>oQ,keyboardShortcut:()=>mQ,lift:()=>gQ,liftEmptyBlock:()=>bQ,liftListItem:()=>yQ,newlineInCode:()=>xQ,resetAttributes:()=>vQ,scrollIntoView:()=>kQ,selectAll:()=>CQ,selectNodeBackward:()=>EQ,selectNodeForward:()=>DQ,selectParentNode:()=>SQ,selectTextblockEnd:()=>wQ,selectTextblockStart:()=>$Q,setContent:()=>TQ,setMark:()=>WQ,setMeta:()=>QQ,setNode:()=>YQ,setNodeSelection:()=>XQ,setTextDirection:()=>JQ,setTextSelection:()=>ZQ,sinkListItem:()=>eY,splitBlock:()=>tY,splitListItem:()=>nY,toggleList:()=>iY,toggleMark:()=>sY,toggleNode:()=>oY,toggleWrap:()=>aY,undoInputRule:()=>lY,unsetAllMarks:()=>uY,unsetMark:()=>cY,unsetTextDirection:()=>dY,updateAttributes:()=>fY,wrapIn:()=>hY,wrapInList:()=>pY});var LW=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var n;t.isDestroyed||(e.dom.blur(),(n=window?.getSelection())==null||n.removeAllRanges())}),!0),IW=(t=!0)=>({commands:e})=>e.setContent("",{emitUpdate:t}),jW=()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:i}=r;return n&&i.forEach(({$from:s,$to:a})=>{t.doc.nodesBetween(s.pos,a.pos,(u,c)=>{if(u.type.isText)return;const{doc:f,mapping:h}=e,m=f.resolve(h.map(c)),g=f.resolve(h.map(c+u.nodeSize)),b=m.blockRange(g);if(!b)return;const x=Ql(b);if(u.type.isTextblock){const{defaultType:k}=m.parent.contentMatchAt(m.index());e.setNodeMarkup(b.start,k)}(x||x===0)&&e.lift(b,x)})}),!0},FW=t=>e=>t(e),KW=()=>({state:t,dispatch:e})=>sM(t,e),_W=(t,e)=>({editor:n,tr:r})=>{const{state:i}=n,s=i.doc.slice(t.from,t.to);r.deleteRange(t.from,t.to);const a=r.mapping.map(e);return r.insert(a,s.content),r.setSelection(new De(r.doc.resolve(Math.max(a-1,0)))),!0},VW=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const i=t.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===r.type){if(e){const u=i.before(s),c=i.after(s);t.delete(u,c).scrollIntoView()}return!0}return!1};function Lt(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}var HW=t=>({tr:e,state:n,dispatch:r})=>{const i=Lt(t,n.schema),s=e.selection.$anchor;for(let a=s.depth;a>0;a-=1)if(s.node(a).type===i){if(r){const c=s.before(a),f=s.after(a);e.delete(c,f).scrollIntoView()}return!0}return!1},UW=t=>({tr:e,dispatch:n})=>{const{from:r,to:i}=t;return n&&e.delete(r,i),!0},qW=t=>t.content?/^text(\*|\+)/.test(t.content):!1,wD=(t,e,n)=>{if(!t.parent.isInline||n==="left"&&t.pos>t.start()||n==="right"&&t.pos<t.end())return t.pos;const r=e.nodes[t.parent.type.name].spec;return qW(r)?n==="left"?t.start()-1:t.end()+1:t.pos},GW=(t,e,n)=>{const r=wD(t,n,"left"),i=wD(e,n,"right");return{from:r,to:i}},WW=()=>({state:t,dispatch:e})=>{if(t.selection.empty)return!1;if(e){const n=t.tr,{ranges:r}=t.selection,i=n.steps.length;r.forEach(s=>{const a=n.mapping.slice(i),u=n.doc.resolve(a.map(s.$from.pos)),c=n.doc.resolve(a.map(s.$to.pos)),{from:f,to:h}=GW(u,c,t.schema);n.deleteRange(f,h)}),n.selection.empty||n.setSelection(De.near(n.doc.resolve(n.selection.from))),n.scrollIntoView(),e(n)}return!0},QW=()=>({commands:t})=>t.keyboardShortcut("Enter"),YW=()=>({state:t,dispatch:e})=>Mq(t,e);function Rx(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function Ap(t,e,n={strict:!0}){const r=Object.keys(e);return r.length?r.every(i=>n.strict?e[i]===t[i]:Rx(e[i])?e[i].test(t[i]):e[i]===t[i]):!0}function GM(t,e,n={}){return t.find(r=>r.type===e&&Ap(Object.fromEntries(Object.keys(n).map(i=>[i,r.attrs[i]])),n))}function $D(t,e,n={}){return!!GM(t,e,n)}function Ox(t,e,n){if(!t||!e)return;let r=t.parent.childAfter(t.parentOffset);if((!r.node||!r.node.marks.some(f=>f.type===e))&&(r=t.parent.childBefore(t.parentOffset)),!r.node||!r.node.marks.some(f=>f.type===e))return;if(!n){const f=r.node.marks.find(h=>h.type===e);f&&(n=f.attrs)}if(!GM([...r.node.marks],e,n))return;let s=r.index,a=t.start()+r.offset,u=s+1,c=a+r.node.nodeSize;for(;s>0&&$D([...t.parent.child(s-1).marks],e,n);)s-=1,a-=t.parent.child(s).nodeSize;for(;u<t.parent.childCount&&$D([...t.parent.child(u).marks],e,n);)c+=t.parent.child(u).nodeSize,u+=1;return{from:a,to:c}}function Hi(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}var XW=(t,e)=>({tr:n,state:r,dispatch:i})=>{const s=Hi(t,r.schema),{doc:a,selection:u}=n,{$from:c,from:f,to:h}=u;if(i){const m=Ox(c,s,e);if(m&&m.from<=f&&m.to>=h){const g=De.create(a,m.from,m.to);n.setSelection(g)}}return!0},JW=t=>e=>{const n=typeof t=="function"?t(e):t;for(let r=0;r<n.length;r+=1)if(n[r](e))return!0;return!1};function WM(t){return t instanceof De}function Fo(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function F4(t,e=null){if(!e)return null;const n=Ne.atStart(t),r=Ne.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return r;const i=n.from,s=r.to;return e==="all"?De.create(t,Fo(0,i,s),Fo(t.content.size,i,s)):De.create(t,Fo(e,i,s),Fo(e,i,s))}function TD(){return["Android"].includes(navigator.platform)||/android/i.test(navigator.userAgent)}function Bp(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function ZW(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}var eQ=(t=null,e={})=>({editor:n,view:r,tr:i,dispatch:s})=>{e={scrollIntoView:!0,...e};const a=()=>{(Bp()||TD())&&r.dom.focus(),ZW()&&!Bp()&&!TD()&&r.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),e?.scrollIntoView&&n.commands.scrollIntoView())})};try{if(r.hasFocus()&&t===null||t===!1)return!0}catch{return!1}if(s&&t===null&&!WM(n.state.selection))return a(),!0;const u=F4(i.doc,t)||n.state.selection,c=n.state.selection.eq(u);return s&&(c||i.setSelection(u),c&&i.storedMarks&&i.setStoredMarks(i.storedMarks),a()),!0},tQ=(t,e)=>n=>t.every((r,i)=>e(r,{...n,index:i})),nQ=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),QM=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const r=e[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?t.removeChild(r):r.nodeType===1&&QM(r)}return t};function fc(t){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");const e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return QM(n)}function zl(t,e,n){if(t instanceof Ps||t instanceof ae)return t;n={slice:!0,parseOptions:{},...n};const r=typeof t=="object"&&t!==null,i=typeof t=="string";if(r)try{if(Array.isArray(t)&&t.length>0)return ae.fromArray(t.map(u=>e.nodeFromJSON(u)));const a=e.nodeFromJSON(t);return n.errorOnInvalidContent&&a.check(),a}catch(s){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:s});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",s),zl("",e,n)}if(i){if(n.errorOnInvalidContent){let a=!1,u="";const c=new M7({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:f=>(a=!0,u=typeof f=="string"?f:f.outerHTML,null)}]}})});if(n.slice?Mi.fromSchema(c).parseSlice(fc(t),n.parseOptions):Mi.fromSchema(c).parse(fc(t),n.parseOptions),n.errorOnInvalidContent&&a)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${u}`)})}const s=Mi.fromSchema(e);return n.slice?s.parseSlice(fc(t),n.parseOptions).content:s.parse(fc(t),n.parseOptions)}return zl("",e,n)}function YM(t,e,n){const r=t.steps.length-1;if(r<e)return;const i=t.steps[r];if(!(i instanceof Ot||i instanceof Gt))return;const s=t.mapping.maps[r];let a=0;s.forEach((u,c,f,h)=>{a===0&&(a=h)}),t.setSelection(Ne.near(t.doc.resolve(a),n))}var rQ=t=>!("type"in t),iQ=(t,e,n)=>({tr:r,dispatch:i,editor:s})=>{var a;if(i){n={parseOptions:s.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let u;const c=E=>{s.emit("contentError",{editor:s,error:E,disableCollaboration:()=>{"collaboration"in s.storage&&typeof s.storage.collaboration=="object"&&s.storage.collaboration&&(s.storage.collaboration.isDisabled=!0)}})},f={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!s.options.enableContentCheck&&s.options.emitContentError)try{zl(e,s.schema,{parseOptions:f,errorOnInvalidContent:!0})}catch(E){c(E)}try{u=zl(e,s.schema,{parseOptions:f,errorOnInvalidContent:(a=n.errorOnInvalidContent)!=null?a:s.options.enableContentCheck})}catch(E){return c(E),!1}let{from:h,to:m}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},g=!0,b=!0;if((rQ(u)?u:[u]).forEach(E=>{E.check(),g=g?E.isText&&E.marks.length===0:!1,b=b?E.isBlock:!1}),h===m&&b){const{parent:E}=r.doc.resolve(h);E.isTextblock&&!E.type.spec.code&&!E.childCount&&(h-=1,m+=1)}let k;if(g){if(Array.isArray(e))k=e.map(E=>E.text||"").join("");else if(e instanceof ae){let E="";e.forEach(D=>{D.text&&(E+=D.text)}),k=E}else typeof e=="object"&&e&&e.text?k=e.text:k=e;r.insertText(k,h,m)}else{k=u;const E=r.doc.resolve(h),D=E.node(),T=E.parentOffset===0,$=D.isText||D.isTextblock,A=D.content.size>0;T&&$&&A&&b&&(h=Math.max(0,h-1)),r.replaceWith(h,m,k)}n.updateSelection&&YM(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:h,text:k}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:h,text:k})}return!0};function XM(t){for(let e=0;e<t.edgeCount;e+=1){const{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}var sQ=(t={})=>({tr:e,dispatch:n,editor:r})=>{const{pos:i,attrs:s,content:a,updateSelection:u=!0}=t;let c;typeof i=="number"?c=e.doc.resolve(i):i?c=i:c=e.selection.$from;const f=XM(c.parent.contentMatchAt(c.index()));if(!f)return!1;const h=Object.keys(f.spec.attrs||{}),m=s?Object.fromEntries(Object.entries(s).filter(([b])=>h.includes(b))):{};let g;if(a){const b=zl(a,r.schema);g=f.createAndFill(m,b)}else g=f.createAndFill(m);return g?(n&&(e.insert(c.pos,g),u&&YM(e,e.steps.length-1,-1)),!0):!1},oQ=()=>({state:t,dispatch:e})=>Tq(t,e),aQ=()=>({state:t,dispatch:e})=>Aq(t,e),lQ=()=>({state:t,dispatch:e})=>J7(t,e),uQ=()=>({state:t,dispatch:e})=>nM(t,e),cQ=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Lm(t.doc,t.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},dQ=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Lm(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},fQ=()=>({state:t,dispatch:e})=>wq(t,e),hQ=()=>({state:t,dispatch:e})=>$q(t,e);function JM(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function pQ(t){const e=t.split(/-(?!$)/);let n=e[e.length-1];n==="Space"&&(n=" ");let r,i,s,a;for(let u=0;u<e.length-1;u+=1){const c=e[u];if(/^(cmd|meta|m)$/i.test(c))a=!0;else if(/^a(lt)?$/i.test(c))r=!0;else if(/^(c|ctrl|control)$/i.test(c))i=!0;else if(/^s(hift)?$/i.test(c))s=!0;else if(/^mod$/i.test(c))Bp()||JM()?a=!0:i=!0;else throw new Error(`Unrecognized modifier name: ${c}`)}return r&&(n=`Alt-${n}`),i&&(n=`Ctrl-${n}`),a&&(n=`Meta-${n}`),s&&(n=`Shift-${n}`),n}var mQ=t=>({editor:e,view:n,tr:r,dispatch:i})=>{const s=pQ(t).split(/-(?!$)/),a=s.find(f=>!["Alt","Ctrl","Meta","Shift"].includes(f)),u=new KeyboardEvent("keydown",{key:a==="Space"?" ":a,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0}),c=e.captureTransaction(()=>{n.someProp("handleKeyDown",f=>f(n,u))});return c?.steps.forEach(f=>{const h=f.map(r.mapping);h&&i&&r.maybeStep(h)}),!0};function qs(t,e,n={}){const{from:r,to:i,empty:s}=t.selection,a=e?Lt(e,t.schema):null,u=[];t.doc.nodesBetween(r,i,(m,g)=>{if(m.isText)return;const b=Math.max(r,g),x=Math.min(i,g+m.nodeSize);u.push({node:m,from:b,to:x})});const c=i-r,f=u.filter(m=>a?a.name===m.node.type.name:!0).filter(m=>Ap(m.node.attrs,n,{strict:!1}));return s?!!f.length:f.reduce((m,g)=>m+g.to-g.from,0)>=c}var gQ=(t,e={})=>({state:n,dispatch:r})=>{const i=Lt(t,n.schema);return qs(n,i,e)?Bq(n,r):!1},bQ=()=>({state:t,dispatch:e})=>oM(t,e),yQ=t=>({state:e,dispatch:n})=>{const r=Lt(t,e.schema);return _q(r)(e,n)},xQ=()=>({state:t,dispatch:e})=>iM(t,e);function Hm(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function AD(t,e){const n=typeof e=="string"?[e]:e;return Object.keys(t).reduce((r,i)=>(n.includes(i)||(r[i]=t[i]),r),{})}var vQ=(t,e)=>({tr:n,state:r,dispatch:i})=>{let s=null,a=null;const u=Hm(typeof t=="string"?t:t.name,r.schema);if(!u)return!1;u==="node"&&(s=Lt(t,r.schema)),u==="mark"&&(a=Hi(t,r.schema));let c=!1;return n.selection.ranges.forEach(f=>{r.doc.nodesBetween(f.$from.pos,f.$to.pos,(h,m)=>{s&&s===h.type&&(c=!0,i&&n.setNodeMarkup(m,void 0,AD(h.attrs,e))),a&&h.marks.length&&h.marks.forEach(g=>{a===g.type&&(c=!0,i&&n.addMark(m,m+h.nodeSize,a.create(AD(g.attrs,e))))})})}),c},kQ=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),CQ=()=>({tr:t,dispatch:e})=>{if(e){const n=new Yn(t.doc);t.setSelection(n)}return!0},EQ=()=>({state:t,dispatch:e})=>eM(t,e),DQ=()=>({state:t,dispatch:e})=>rM(t,e),SQ=()=>({state:t,dispatch:e})=>Oq(t,e),wQ=()=>({state:t,dispatch:e})=>Lq(t,e),$Q=()=>({state:t,dispatch:e})=>zq(t,e);function K4(t,e,n={},r={}){return zl(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var TQ=(t,{errorOnInvalidContent:e,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:i,tr:s,dispatch:a,commands:u})=>{const{doc:c}=s;if(r.preserveWhitespace!=="full"){const f=K4(t,i.schema,r,{errorOnInvalidContent:e??i.options.enableContentCheck});return a&&s.replaceWith(0,c.content.size,f).setMeta("preventUpdate",!n),!0}return a&&s.setMeta("preventUpdate",!n),u.insertContentAt({from:0,to:c.content.size},t,{parseOptions:r,errorOnInvalidContent:e??i.options.enableContentCheck})};function ZM(t,e){const n=Hi(e,t.schema),{from:r,to:i,empty:s}=t.selection,a=[];s?(t.storedMarks&&a.push(...t.storedMarks),a.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,i,c=>{a.push(...c.marks)});const u=a.find(c=>c.type.name===n.name);return u?{...u.attrs}:{}}function e8(t,e){const n=new G7(t);return e.forEach(r=>{r.steps.forEach(i=>{n.step(i)})}),n}function AQ(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,(i,s)=>{n(i)&&r.push({node:i,pos:s})}),r}function BQ(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}function Um(t){return e=>BQ(e.$from,t)}function ye(t,e,n){return t.config[e]===void 0&&t.parent?ye(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?ye(t.parent,e,n):null}):t.config[e]}function qm(t){return t.map(e=>{const n={name:e.name,options:e.options,storage:e.storage},r=ye(e,"addExtensions",n);return r?[e,...qm(r())]:e}).flat(10)}function Px(t,e){const n=ya.fromSchema(e).serializeFragment(t),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(n),i.innerHTML}function t8(t){return typeof t=="function"}function We(t,e=void 0,...n){return t8(t)?e?t.bind(e)(...n):t(...n):t}function MQ(t={}){return Object.keys(t).length===0&&t.constructor===Object}function Ll(t){const e=t.filter(i=>i.type==="extension"),n=t.filter(i=>i.type==="node"),r=t.filter(i=>i.type==="mark");return{baseExtensions:e,nodeExtensions:n,markExtensions:r}}function n8(t){const e=[],{nodeExtensions:n,markExtensions:r}=Ll(t),i=[...n,...r],s={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},a=n.filter(f=>f.name!=="text").map(f=>f.name),u=r.map(f=>f.name),c=[...a,...u];return t.forEach(f=>{const h={name:f.name,options:f.options,storage:f.storage,extensions:i},m=ye(f,"addGlobalAttributes",h);if(!m)return;m().forEach(b=>{let x;Array.isArray(b.types)?x=b.types:b.types==="*"?x=c:b.types==="nodes"?x=a:b.types==="marks"?x=u:x=[],x.forEach(k=>{Object.entries(b.attributes).forEach(([E,D])=>{e.push({type:k,name:E,attribute:{...s,...D}})})})})}),i.forEach(f=>{const h={name:f.name,options:f.options,storage:f.storage},m=ye(f,"addAttributes",h);if(!m)return;const g=m();Object.entries(g).forEach(([b,x])=>{const k={...s,...x};typeof k?.default=="function"&&(k.default=k.default()),k?.isRequired&&k?.default===void 0&&delete k.default,e.push({type:f.name,name:b,attribute:k})})}),e}function NQ(t){const e=[];let n="",r=!1,i=!1,s=0;const a=t.length;for(let u=0;u<a;u+=1){const c=t[u];if(c==="'"&&!i){r=!r,n+=c;continue}if(c==='"'&&!r){i=!i,n+=c;continue}if(!r&&!i){if(c==="("){s+=1,n+=c;continue}if(c===")"&&s>0){s-=1,n+=c;continue}if(c===";"&&s===0){e.push(n),n="";continue}}n+=c}return n&&e.push(n),e}function BD(t){const e=[],n=NQ(t||""),r=n.length;for(let i=0;i<r;i+=1){const s=n[i],a=s.indexOf(":");if(a===-1)continue;const u=s.slice(0,a).trim(),c=s.slice(a+1).trim();u&&c&&e.push([u,c])}return e}function _t(...t){return t.filter(e=>!!e).reduce((e,n)=>{const r={...e};return Object.entries(n).forEach(([i,s])=>{if(!r[i]){r[i]=s;return}if(i==="class"){const u=s?String(s).split(" "):[],c=r[i]?r[i].split(" "):[],f=u.filter(h=>!c.includes(h));r[i]=[...c,...f].join(" ")}else if(i==="style"){const u=new Map([...BD(r[i]),...BD(s)]);r[i]=Array.from(u.entries()).map(([c,f])=>`${c}: ${f}`).join("; ")}else r[i]=s}),r},{})}function sd(t,e){return e.filter(n=>n.type===t.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(t.attrs)||{}:{[n.name]:t.attrs[n.name]}).reduce((n,r)=>_t(n,r),{})}function RQ(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function MD(t,e){return"style"in t?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(r===!1)return!1;const i=e.reduce((s,a)=>{const u=a.attribute.parseHTML?a.attribute.parseHTML(n):RQ(n.getAttribute(a.name));return u==null?s:{...s,[a.name]:u}},{});return{...r,...i}}}}function ND(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&MQ(n)?!1:n!=null))}function RD(t){var e,n;const r={};return!((e=t?.attribute)!=null&&e.isRequired)&&"default"in(t?.attribute||{})&&(r.default=t.attribute.default),((n=t?.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=t.attribute.validate),[t.name,r]}function r8(t,e){var n;const r=n8(t),{nodeExtensions:i,markExtensions:s}=Ll(t),a=(n=i.find(f=>ye(f,"topNode")))==null?void 0:n.name,u=Object.fromEntries(i.map(f=>{const h=r.filter(D=>D.type===f.name),m={name:f.name,options:f.options,storage:f.storage,editor:e},g=t.reduce((D,T)=>{const $=ye(T,"extendNodeSchema",m);return{...D,...$?$(f):{}}},{}),b=ND({...g,content:We(ye(f,"content",m)),marks:We(ye(f,"marks",m)),group:We(ye(f,"group",m)),inline:We(ye(f,"inline",m)),atom:We(ye(f,"atom",m)),selectable:We(ye(f,"selectable",m)),draggable:We(ye(f,"draggable",m)),code:We(ye(f,"code",m)),whitespace:We(ye(f,"whitespace",m)),linebreakReplacement:We(ye(f,"linebreakReplacement",m)),defining:We(ye(f,"defining",m)),isolating:We(ye(f,"isolating",m)),attrs:Object.fromEntries(h.map(RD))}),x=We(ye(f,"parseHTML",m));x&&(b.parseDOM=x.map(D=>MD(D,h)));const k=ye(f,"renderHTML",m);k&&(b.toDOM=D=>k({node:D,HTMLAttributes:sd(D,h)}));const E=ye(f,"renderText",m);return E&&(b.toText=E),[f.name,b]})),c=Object.fromEntries(s.map(f=>{const h=r.filter(E=>E.type===f.name),m={name:f.name,options:f.options,storage:f.storage,editor:e},g=t.reduce((E,D)=>{const T=ye(D,"extendMarkSchema",m);return{...E,...T?T(f):{}}},{}),b=ND({...g,inclusive:We(ye(f,"inclusive",m)),excludes:We(ye(f,"excludes",m)),group:We(ye(f,"group",m)),spanning:We(ye(f,"spanning",m)),code:We(ye(f,"code",m)),attrs:Object.fromEntries(h.map(RD))}),x=We(ye(f,"parseHTML",m));x&&(b.parseDOM=x.map(E=>MD(E,h)));const k=ye(f,"renderHTML",m);return k&&(b.toDOM=E=>k({mark:E,HTMLAttributes:sd(E,h)})),[f.name,b]}));return new M7({topNode:a,nodes:u,marks:c})}function OQ(t){const e=t.filter((n,r)=>t.indexOf(n)!==r);return Array.from(new Set(e))}function Sl(t){return t.sort((n,r)=>{const i=ye(n,"priority")||100,s=ye(r,"priority")||100;return i>s?-1:i<s?1:0})}function zx(t){const e=Sl(qm(t)),n=OQ(e.map(r=>r.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),e}function i8(t,e){const n=zx(t);return r8(n,e)}function PQ(t,e){const n=i8(e),r=fc(t);return Mi.fromSchema(n).parse(r).toJSON()}function s8(t,e,n){const{from:r,to:i}=e,{blockSeparator:s=`
|
|
31
|
+
|
|
32
|
+
`,textSerializers:a={}}=n||{};let u="";return t.nodesBetween(r,i,(c,f,h,m)=>{var g;c.isBlock&&f>r&&(u+=s);const b=a?.[c.type.name];if(b)return h&&(u+=b({node:c,pos:f,parent:h,index:m,range:e})),!1;c.isText&&(u+=(g=c?.text)==null?void 0:g.slice(Math.max(r,f)-f,i-f))}),u}function zQ(t,e){const n={from:0,to:t.content.size};return s8(t,n,e)}function o8(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}function LQ(t,e){const n=Lt(e,t.schema),{from:r,to:i}=t.selection,s=[];t.doc.nodesBetween(r,i,u=>{s.push(u)});const a=s.reverse().find(u=>u.type.name===n.name);return a?{...a.attrs}:{}}function a8(t,e){const n=Hm(typeof e=="string"?e:e.name,t.schema);return n==="node"?LQ(t,e):n==="mark"?ZM(t,e):{}}function IQ(t,e=JSON.stringify){const n={};return t.filter(r=>{const i=e(r);return Object.prototype.hasOwnProperty.call(n,i)?!1:n[i]=!0})}function jQ(t){const e=IQ(t);return e.length===1?e:e.filter((n,r)=>!e.filter((s,a)=>a!==r).some(s=>n.oldRange.from>=s.oldRange.from&&n.oldRange.to<=s.oldRange.to&&n.newRange.from>=s.newRange.from&&n.newRange.to<=s.newRange.to))}function Lx(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach((i,s)=>{const a=[];if(i.ranges.length)i.forEach((u,c)=>{a.push({from:u,to:c})});else{const{from:u,to:c}=n[s];if(u===void 0||c===void 0)return;a.push({from:u,to:c})}a.forEach(({from:u,to:c})=>{const f=e.slice(s).map(u,-1),h=e.slice(s).map(c),m=e.invert().map(f,-1),g=e.invert().map(h);r.push({oldRange:{from:m,to:g},newRange:{from:f,to:h}})})}),jQ(r)}function Ix(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach(i=>{const s=n.resolve(t),a=Ox(s,i.type);a&&r.push({mark:i,...a})}):n.nodesBetween(t,e,(i,s)=>{!i||i?.nodeSize===void 0||r.push(...i.marks.map(a=>({from:s,to:s+i.nodeSize,mark:a})))}),r}var FQ=(t,e,n,r=20)=>{const i=t.doc.resolve(n);let s=r,a=null;for(;s>0&&a===null;){const u=i.node(s);u?.type.name===e?a=u:s-=1}return[a,s]};function ec(t,e){return e.nodes[t]||e.marks[t]||null}function Vh(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const i=t.find(s=>s.type===e&&s.name===r);return i?i.attribute.keepOnSplit:!1}))}var KQ=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(i,s,a,u)=>{var c,f;const h=((f=(c=i.type.spec).toText)==null?void 0:f.call(c,{node:i,pos:s,parent:a,index:u}))||i.textContent||"%leaf%";n+=i.isAtom&&!i.isText?h:h.slice(0,Math.max(0,r-s))}),n};function _4(t,e,n={}){const{empty:r,ranges:i}=t.selection,s=e?Hi(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(m=>s?s.name===m.type.name:!0).find(m=>Ap(m.attrs,n,{strict:!1}));let a=0;const u=[];if(i.forEach(({$from:m,$to:g})=>{const b=m.pos,x=g.pos;t.doc.nodesBetween(b,x,(k,E)=>{if(s&&k.inlineContent&&!k.type.allowsMarkType(s))return!1;if(!k.isText&&!k.marks.length)return;const D=Math.max(b,E),T=Math.min(x,E+k.nodeSize),$=T-D;a+=$,u.push(...k.marks.map(A=>({mark:A,from:D,to:T})))})}),a===0)return!1;const c=u.filter(m=>s?s.name===m.mark.type.name:!0).filter(m=>Ap(m.mark.attrs,n,{strict:!1})).reduce((m,g)=>m+g.to-g.from,0),f=u.filter(m=>s?m.mark.type!==s&&m.mark.type.excludes(s):!0).reduce((m,g)=>m+g.to-g.from,0);return(c>0?c+f:c)>=a}function _Q(t,e,n={}){if(!e)return qs(t,null,n)||_4(t,null,n);const r=Hm(e,t.schema);return r==="node"?qs(t,e,n):r==="mark"?_4(t,e,n):!1}var VQ=(t,e)=>{const{$from:n,$to:r,$anchor:i}=t.selection;if(e){const s=Um(u=>u.type.name===e)(t.selection);if(!s)return!1;const a=t.doc.resolve(s.pos+1);return i.pos+1===a.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},HQ=t=>{const{$from:e,$to:n}=t.selection;return!(e.parentOffset>0||e.pos!==n.pos)};function OD(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function py(t,e){const{nodeExtensions:n}=Ll(e),r=n.find(a=>a.name===t);if(!r)return!1;const i={name:r.name,options:r.options,storage:r.storage},s=We(ye(r,"group",i));return typeof s!="string"?!1:s.split(" ").includes("list")}function Td(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(t.type.name==="hardBreak")return!0;if(t.isText)return!/\S/.test((r=t.text)!=null?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let i=!0;return t.content.forEach(s=>{i!==!1&&(Td(s,{ignoreWhitespace:n,checkChildren:e})||(i=!1))}),i}return!1}function l8(t){return t instanceof ke}var u8=class c8{constructor(e){this.position=e}static fromJSON(e){return new c8(e.position)}toJSON(){return{position:this.position}}};function UQ(t,e){const n=e.mapping.mapResult(t.position);return{position:new u8(n.pos),mapResult:n}}function qQ(t){return new u8(t)}function GQ(t,e,n){var r;const{selection:i}=e;let s=null;if(WM(i)&&(s=i.$cursor),s){const u=(r=t.storedMarks)!=null?r:s.marks();return s.parent.type.allowsMarkType(n)&&(!!n.isInSet(u)||!u.some(f=>f.type.excludes(n)))}const{ranges:a}=i;return a.some(({$from:u,$to:c})=>{let f=u.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(n):!1;return t.doc.nodesBetween(u.pos,c.pos,(h,m,g)=>{if(f)return!1;if(h.isInline){const b=!g||g.type.allowsMarkType(n),x=!!n.isInSet(h.marks)||!h.marks.some(k=>k.type.excludes(n));f=b&&x}return!f}),f})}var WQ=(t,e={})=>({tr:n,state:r,dispatch:i})=>{const{selection:s}=n,{empty:a,ranges:u}=s,c=Hi(t,r.schema);if(i)if(a){const f=ZM(r,c);n.addStoredMark(c.create({...f,...e}))}else u.forEach(f=>{const h=f.$from.pos,m=f.$to.pos;r.doc.nodesBetween(h,m,(g,b)=>{const x=Math.max(b,h),k=Math.min(b+g.nodeSize,m);g.marks.find(D=>D.type===c)?g.marks.forEach(D=>{c===D.type&&n.addMark(x,k,c.create({...D.attrs,...e}))}):n.addMark(x,k,c.create(e))})});return GQ(r,n,c)},QQ=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),YQ=(t,e={})=>({state:n,dispatch:r,chain:i})=>{const s=Lt(t,n.schema);let a;return n.selection.$anchor.sameParent(n.selection.$head)&&(a=n.selection.$anchor.parent.attrs),s.isTextblock?i().command(({commands:u})=>QE(s,{...a,...e})(n)?!0:u.clearNodes()).command(({state:u})=>QE(s,{...a,...e})(u,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},XQ=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,i=Fo(t,0,r.content.size),s=ke.create(r,i);e.setSelection(s)}return!0},JQ=(t,e)=>({tr:n,state:r,dispatch:i})=>{const{selection:s}=r;let a,u;return typeof e=="number"?(a=e,u=e):e&&"from"in e&&"to"in e?(a=e.from,u=e.to):(a=s.from,u=s.to),i&&n.doc.nodesBetween(a,u,(c,f)=>{c.isText||n.setNodeMarkup(f,void 0,{...c.attrs,dir:t})}),!0},ZQ=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,{from:i,to:s}=typeof t=="number"?{from:t,to:t}:t,a=De.atStart(r).from,u=De.atEnd(r).to,c=Fo(i,a,u),f=Fo(s,a,u),h=De.create(r,c,f);e.setSelection(h)}return!0},eY=t=>({state:e,dispatch:n})=>{const r=Lt(t,e.schema);return Uq(r)(e,n)};function PD(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter(i=>e?.includes(i.type.name));t.tr.ensureMarks(r)}}var tY=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:i})=>{const{selection:s,doc:a}=e,{$from:u,$to:c}=s,f=i.extensionManager.attributes,h=Vh(f,u.node().type.name,u.node().attrs);if(s instanceof ke&&s.node.isBlock)return!u.parentOffset||!Ni(a,u.pos)?!1:(r&&(t&&PD(n,i.extensionManager.splittableMarks),e.split(u.pos).scrollIntoView()),!0);if(!u.parent.isBlock)return!1;const m=c.parentOffset===c.parent.content.size,g=u.depth===0?void 0:XM(u.node(-1).contentMatchAt(u.indexAfter(-1)));let b=m&&g?[{type:g,attrs:h}]:void 0,x=Ni(e.doc,e.mapping.map(u.pos),1,b);if(!b&&!x&&Ni(e.doc,e.mapping.map(u.pos),1,g?[{type:g}]:void 0)&&(x=!0,b=g?[{type:g,attrs:h}]:void 0),r){if(x&&(s instanceof De&&e.deleteSelection(),e.split(e.mapping.map(u.pos),1,b),g&&!m&&!u.parentOffset&&u.parent.type!==g)){const k=e.mapping.map(u.before()),E=e.doc.resolve(k);u.node(-1).canReplaceWith(E.index(),E.index()+1,g)&&e.setNodeMarkup(e.mapping.map(u.before()),g)}t&&PD(n,i.extensionManager.splittableMarks),e.scrollIntoView()}return x},nY=(t,e={})=>({tr:n,state:r,dispatch:i,editor:s})=>{var a;const u=Lt(t,r.schema),{$from:c,$to:f}=r.selection,h=r.selection.node;if(h&&h.isBlock||c.depth<2||!c.sameParent(f))return!1;const m=c.node(-1);if(m.type!==u)return!1;const g=s.extensionManager.attributes;if(c.parent.content.size===0&&c.node(-1).childCount===c.indexAfter(-1)){if(c.depth===2||c.node(-3).type!==u||c.index(-2)!==c.node(-2).childCount-1)return!1;if(i){let D=ae.empty;const T=c.index(-1)?1:c.index(-2)?2:3;for(let O=c.depth-T;O>=c.depth-3;O-=1)D=ae.from(c.node(O).copy(D));const $=c.indexAfter(-1)<c.node(-2).childCount?1:c.indexAfter(-2)<c.node(-3).childCount?2:3,A={...Vh(g,c.node().type.name,c.node().attrs),...e},B=((a=u.contentMatch.defaultType)==null?void 0:a.createAndFill(A))||void 0;D=D.append(ae.from(u.createAndFill(null,B)||void 0));const R=c.before(c.depth-(T-1));n.replace(R,c.after(-$),new pe(D,4-T,0));let M=-1;n.doc.nodesBetween(R,n.doc.content.size,(O,j)=>{if(M>-1)return!1;O.isTextblock&&O.content.size===0&&(M=j+1)}),M>-1&&n.setSelection(De.near(n.doc.resolve(M))),n.scrollIntoView()}return!0}const b=f.pos===c.end()?m.contentMatchAt(0).defaultType:null,x={...Vh(g,m.type.name,m.attrs),...e},k={...Vh(g,c.node().type.name,c.node().attrs),...e};n.delete(c.pos,f.pos);const E=b?[{type:u,attrs:x},{type:b,attrs:k}]:[{type:u,attrs:x}];if(!Ni(n.doc,c.pos,2))return!1;if(i){const{selection:D,storedMarks:T}=r,{splittableMarks:$}=s.extensionManager,A=T||D.$to.parentOffset&&D.$from.marks();if(n.split(c.pos,2,E).scrollIntoView(),!A||!i)return!0;const B=A.filter(R=>$.includes(R.type.name));n.ensureMarks(B)}return!0};function zD(t){return!t||t==="1"?null:t}function d8(t,e){return zD(t)===zD(e)}var my=(t,e)=>{const n=Um(a=>a.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const i=t.doc.nodeAt(r);return!(n.node.type===i?.type&&to(t.doc,n.pos))||!d8(n.node.attrs.type,i?.attrs.type)||t.join(n.pos),!0},gy=(t,e)=>{const n=Um(a=>a.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const i=t.doc.nodeAt(r);return!(n.node.type===i?.type&&to(t.doc,r))||!d8(n.node.attrs.type,i?.attrs.type)||t.join(r),!0};function rY(t){const e=t.doc,n=e.firstChild;if(!n)return null;const r=e.resolve(1),i=e.resolve(n.nodeSize-1);return De.between(r,i)}var iY=(t,e,n,r={})=>({editor:i,tr:s,state:a,dispatch:u,chain:c,commands:f,can:h})=>{const{extensions:m,splittableMarks:g}=i.extensionManager,b=Lt(t,a.schema),x=Lt(e,a.schema),{selection:k,storedMarks:E}=a,{$from:D,$to:T}=k,$=D.blockRange(T),A=E||k.$to.parentOffset&&k.$from.marks();if(!$)return!1;const B=Um(Z=>py(Z.type.name,m))(k),R=k.from===0&&k.to===a.doc.content.size,M=a.doc.content.content,O=M.length===1?M[0]:null,j=R&&O&&py(O.type.name,m)?{node:O,pos:0}:null,q=B??j,X=!!B&&$.depth>=1&&$.depth-B.depth<=1,G=!!j;if((X||G)&&q){if(q.node.type===b)return R&&G?c().command(({tr:Z,dispatch:F})=>{const te=rY(Z);return te?(Z.setSelection(te),F&&F(Z),!0):!1}).liftListItem(x).run():f.liftListItem(x);if(py(q.node.type.name,m)&&b.validContent(q.node.content))return c().command(()=>(s.setNodeMarkup(q.pos,b),!0)).command(()=>my(s,b)).command(()=>gy(s,b)).run()}return!n||!A||!u?c().command(()=>h().wrapInList(b,r)?!0:f.clearNodes()).wrapInList(b,r).command(()=>my(s,b)).command(()=>gy(s,b)).run():c().command(()=>{const Z=h().wrapInList(b,r),F=A.filter(te=>g.includes(te.type.name));return s.ensureMarks(F),Z?!0:f.clearNodes()}).wrapInList(b,r).command(()=>my(s,b)).command(()=>gy(s,b)).run()},sY=(t,e={},n={})=>({state:r,commands:i})=>{const{extendEmptyMarkRange:s=!1}=n,a=Hi(t,r.schema);return _4(r,a,e)?i.unsetMark(a,{extendEmptyMarkRange:s}):i.setMark(a,e)},oY=(t,e,n={})=>({state:r,commands:i})=>{const s=Lt(t,r.schema),a=Lt(e,r.schema),u=qs(r,s,n);let c;return r.selection.$anchor.sameParent(r.selection.$head)&&(c=r.selection.$anchor.parent.attrs),u?i.setNode(a,c):i.setNode(s,{...c,...n})},aY=(t,e={})=>({state:n,commands:r})=>{const i=Lt(t,n.schema);return qs(n,i,e)?r.lift(i):r.wrapIn(i,e)},lY=()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const i=n[r];let s;if(i.spec.isInputRules&&(s=i.getState(t))){if(e){const a=t.tr,u=s.transform;for(let c=u.steps.length-1;c>=0;c-=1)a.step(u.steps[c].invert(u.docs[c]));if(s.text){const c=a.doc.resolve(s.from).marks();a.replaceWith(s.from,s.to,t.schema.text(s.text,c))}else a.delete(s.from,s.to)}return!0}}return!1},uY=(t={})=>({tr:e,dispatch:n,editor:r})=>{const{ignoreClearable:i=!1}=t,{selection:s}=e,{empty:a,ranges:u}=s;if(a)return!0;const{nonClearableMarks:c}=r.extensionManager;if(n){const f=Object.values(r.schema.marks).filter(h=>i||!c.includes(h.name));u.forEach(h=>{for(const m of f)e.removeMark(h.$from.pos,h.$to.pos,m)})}return!0},cY=(t,e={})=>({tr:n,state:r,dispatch:i})=>{var s;const{extendEmptyMarkRange:a=!1}=e,{selection:u}=n,c=Hi(t,r.schema),{$from:f,empty:h,ranges:m}=u;if(!i)return!0;if(h&&a){let{from:g,to:b}=u;const x=(s=f.marks().find(E=>E.type===c))==null?void 0:s.attrs,k=Ox(f,c,x);k&&(g=k.from,b=k.to),n.removeMark(g,b,c)}else m.forEach(g=>{n.removeMark(g.$from.pos,g.$to.pos,c)});return n.removeStoredMark(c),!0},dY=t=>({tr:e,state:n,dispatch:r})=>{const{selection:i}=n;let s,a;return typeof t=="number"?(s=t,a=t):t&&"from"in t&&"to"in t?(s=t.from,a=t.to):(s=i.from,a=i.to),r&&e.doc.nodesBetween(s,a,(u,c)=>{if(u.isText)return;const f={...u.attrs};delete f.dir,e.setNodeMarkup(c,void 0,f)}),!0},fY=(t,e={})=>({tr:n,state:r,dispatch:i})=>{let s=null,a=null;const u=Hm(typeof t=="string"?t:t.name,r.schema);if(!u)return!1;u==="node"&&(s=Lt(t,r.schema)),u==="mark"&&(a=Hi(t,r.schema));let c=!1;return n.selection.ranges.forEach(f=>{const h=f.$from.pos,m=f.$to.pos;let g,b,x,k;n.selection.empty?r.doc.nodesBetween(h,m,(E,D)=>{s&&s===E.type&&(c=!0,x=Math.max(D,h),k=Math.min(D+E.nodeSize,m),g=D,b=E)}):r.doc.nodesBetween(h,m,(E,D)=>{D<h&&s&&s===E.type&&(c=!0,x=Math.max(D,h),k=Math.min(D+E.nodeSize,m),g=D,b=E),D>=h&&D<=m&&(s&&s===E.type&&(c=!0,i&&n.setNodeMarkup(D,void 0,{...E.attrs,...e})),a&&E.marks.length&&E.marks.forEach(T=>{if(a===T.type&&(c=!0,i)){const $=Math.max(D,h),A=Math.min(D+E.nodeSize,m);n.addMark($,A,a.create({...T.attrs,...e}))}}))}),b&&(g!==void 0&&i&&n.setNodeMarkup(g,void 0,{...b.attrs,...e}),a&&b.marks.length&&b.marks.forEach(E=>{a===E.type&&i&&n.addMark(x,k,a.create({...E.attrs,...e}))}))}),c},hY=(t,e={})=>({state:n,dispatch:r})=>{const i=Lt(t,n.schema);return Iq(i,e)(n,r)},pY=(t,e={})=>({state:n,dispatch:r})=>{const i=Lt(t,n.schema);return jq(i,e)(n,r)},mY=class{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const n=this.callbacks[t];return n&&n.forEach(r=>r.apply(this,e)),this}off(t,e){const n=this.callbacks[t];return n&&(e?this.callbacks[t]=n.filter(r=>r!==e):delete this.callbacks[t]),this}once(t,e){const n=(...r)=>{this.off(t,n),e.apply(this,r)};return this.on(t,n)}removeAllListeners(){this.callbacks={}}};function Il(t,e){if(t===e)return!0;if(!t||!e)return!1;const n=Object.keys(t),r=Object.keys(e);return n.length!==r.length?!1:n.every(i=>Object.prototype.hasOwnProperty.call(e,i)&&Object.is(t[i],e[i]))}function gY(t,e){const{selection:n}=t,{$from:r}=n;if(n instanceof ke){const s=r.index();return r.parent.canReplaceWith(s,s+1,e)}let i=r.depth;for(;i>=0;){const s=r.index(i);if(r.node(i).contentMatchAt(s).matchType(e))return!0;i-=1}return!1}function bY(t,e,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const i=document.createElement("style");return e&&i.setAttribute("nonce",e),i.setAttribute("data-tiptap-style",""),i.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(i),i}function LD(t){return t.replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/&/g,"&")}function yY(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function xY(t){return typeof t=="number"}function vY(t){return Object.prototype.toString.call(t).slice(8,-1)}function yh(t){return vY(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}var kY={};Nx(kY,{createAtomBlockMarkdownSpec:()=>CY,createBlockMarkdownSpec:()=>EY,createInlineMarkdownSpec:()=>wY,parseAttributes:()=>jx,parseIndentedBlocks:()=>V4,renderNestedMarkdownContent:()=>Kx,serializeAttributes:()=>Fx});function jx(t){if(!t?.trim())return{};const e={},n=[],r=t.replace(/["']([^"']*)["']/g,f=>(n.push(f),`__QUOTED_${n.length-1}__`)),i=r.match(/(?:^|\s)\.([\w-]+)/g);if(i){const f=i.map(h=>h.trim().slice(1));e.class=f.join(" ")}const s=r.match(/(?:^|\s)#([\w-]+)/);s&&(e.id=s[1]);const a=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(r.matchAll(a)).forEach(([,f,h])=>{var m;const g=parseInt(((m=h.match(/__QUOTED_(\d+)__/))==null?void 0:m[1])||"0",10),b=n[g];b&&(e[f]=b.slice(1,-1))});const c=r.replace(/(?:^|\s)\.([\w-]+)/g,"").replace(/(?:^|\s)#([\w-]+)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return c&&c.split(/\s+/).filter(Boolean).forEach(h=>{h.match(/^[a-zA-Z][\w-]*$/)&&(e[h]=!0)}),e}function Fx(t){if(!t||Object.keys(t).length===0)return"";const e=[];return t.class&&String(t.class).split(/\s+/).filter(Boolean).forEach(r=>e.push(`.${r}`)),t.id&&e.push(`#${t.id}`),Object.entries(t).forEach(([n,r])=>{n==="class"||n==="id"||(r===!0?e.push(n):r!==!1&&r!=null&&e.push(`${n}="${String(r)}"`))}),e.join(" ")}function CY(t){const{nodeName:e,name:n,parseAttributes:r=jx,serializeAttributes:i=Fx,defaultAttributes:s={},requiredAttributes:a=[],allowedAttributes:u}=t,c=n||e,f=h=>{if(!u)return h;const m={};return u.forEach(g=>{g in h&&(m[g]=h[g])}),m};return{parseMarkdown:(h,m)=>{const g={...s,...h.attributes};return m.createNode(e,g,[])},markdownTokenizer:{name:e,level:"block",start(h){var m;const g=new RegExp(`^:::${c}(?:\\s|$)`,"m"),b=(m=h.match(g))==null?void 0:m.index;return b!==void 0?b:-1},tokenize(h,m,g){const b=new RegExp(`^:::${c}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),x=h.match(b);if(!x)return;const k=x[1]||"",E=r(k);if(!a.find(T=>!(T in E)))return{type:e,raw:x[0],attributes:E}}},renderMarkdown:h=>{const m=f(h.attrs||{}),g=i(m),b=g?` {${g}}`:"";return`:::${c}${b} :::`}}}function EY(t){const{nodeName:e,name:n,getContent:r,parseAttributes:i=jx,serializeAttributes:s=Fx,defaultAttributes:a={},content:u="block",allowedAttributes:c}=t,f=n||e,h=m=>{if(!c)return m;const g={};return c.forEach(b=>{b in m&&(g[b]=m[b])}),g};return{parseMarkdown:(m,g)=>{let b;if(r){const k=r(m);b=typeof k=="string"?[{type:"text",text:k}]:k}else u==="block"?b=g.parseChildren(m.tokens||[]):b=g.parseInline(m.tokens||[]);const x={...a,...m.attributes};return g.createNode(e,x,b)},markdownTokenizer:{name:e,level:"block",start(m){var g;const b=new RegExp(`^:::${f}`,"m"),x=(g=m.match(b))==null?void 0:g.index;return x!==void 0?x:-1},tokenize(m,g,b){var x;const k=new RegExp(`^:::${f}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),E=m.match(k);if(!E)return;const[D,T=""]=E,$=i(T);let A=1;const B=D.length;let R="";const M=/^:::([\w-]*)(\s.*)?/gm,O=m.slice(B);for(M.lastIndex=0;;){const j=M.exec(O);if(j===null)break;const q=j.index,X=j[1];if(!((x=j[2])!=null&&x.endsWith(":::"))){if(X)A+=1;else if(A-=1,A===0){const G=O.slice(0,q);R=G.trim();const Z=m.slice(0,B+q+j[0].length);let F=[];if(R)if(u==="block")for(F=b.blockTokens(G),F.forEach(te=>{te.text&&(!te.tokens||te.tokens.length===0)&&(te.tokens=b.inlineTokens(te.text))});F.length>0;){const te=F[F.length-1];if(te.type==="paragraph"&&(!te.text||te.text.trim()===""))F.pop();else break}else F=b.inlineTokens(R);return{type:e,raw:Z,attributes:$,content:R,tokens:F}}}}}},renderMarkdown:(m,g)=>{const b=h(m.attrs||{}),x=s(b),k=x?` {${x}}`:"",E=g.renderChildren(m.content||[],`
|
|
33
|
+
|
|
34
|
+
`);return`:::${f}${k}
|
|
35
|
+
|
|
36
|
+
${E}
|
|
37
|
+
|
|
38
|
+
:::`}}}function DY(t){if(!t.trim())return{};const e={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g;let r=n.exec(t);for(;r!==null;){const[,i,s,a]=r;e[i]=s||a,r=n.exec(t)}return e}function SY(t){return Object.entries(t).filter(([,e])=>e!=null).map(([e,n])=>`${e}="${n}"`).join(" ")}function wY(t){const{nodeName:e,name:n,getContent:r,parseAttributes:i=DY,serializeAttributes:s=SY,defaultAttributes:a={},selfClosing:u=!1,allowedAttributes:c}=t,f=n||e,h=g=>{if(!c)return g;const b={};return c.forEach(x=>{const k=typeof x=="string"?x:x.name,E=typeof x=="string"?void 0:x.skipIfDefault;if(k in g){const D=g[k];if(E!==void 0&&D===E)return;b[k]=D}}),b},m=f.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(g,b)=>{const x={...a,...g.attributes};if(u)return b.createNode(e,x);const k=r?r(g):g.content||"";return k?b.createNode(e,x,[b.createTextNode(k)]):b.createNode(e,x,[])},markdownTokenizer:{name:e,level:"inline",start(g){const b=u?new RegExp(`\\[${m}\\s*[^\\]]*\\]`):new RegExp(`\\[${m}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${m}\\]`),x=g.match(b),k=x?.index;return k!==void 0?k:-1},tokenize(g,b,x){const k=u?new RegExp(`^\\[${m}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${m}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${m}\\]`),E=g.match(k);if(!E)return;let D="",T="";if(u){const[,A]=E;T=A}else{const[,A,B]=E;T=A,D=B||""}const $=i(T.trim());return{type:e,raw:E[0],content:D.trim(),attributes:$}}},renderMarkdown:g=>{let b="";r?b=r(g):g.content&&g.content.length>0&&(b=g.content.filter(D=>D.type==="text").map(D=>D.text).join(""));const x=h(g.attrs||{}),k=s(x),E=k?` ${k}`:"";return u?`[${f}${E}]`:`[${f}${E}]${b}[/${f}]`}}}function V4(t,e,n){var r,i,s,a;const u=t.split(`
|
|
39
|
+
`),c=[];let f="",h=0;const m=e.baseIndentSize||2;for(;h<u.length;){const g=u[h],b=g.match(e.itemPattern);if(!b){if(c.length>0)break;if(g.trim()===""){h+=1,f=`${f}${g}
|
|
40
|
+
`;continue}else return}const x=e.extractItemData(b),{indentLevel:k,mainContent:E}=x;f=`${f}${g}
|
|
41
|
+
`;const D=[E];for(h+=1;h<u.length;){const B=u[h];if(B.trim()===""){const M=u.slice(h+1).findIndex(q=>q.trim()!=="");if(M===-1)break;if((((i=(r=u[h+1+M].match(/^(\s*)/))==null?void 0:r[1])==null?void 0:i.length)||0)>k){D.push(B),f=`${f}${B}
|
|
42
|
+
`,h+=1;continue}else break}if((((a=(s=B.match(/^(\s*)/))==null?void 0:s[1])==null?void 0:a.length)||0)>k)D.push(B),f=`${f}${B}
|
|
43
|
+
`,h+=1;else break}let T;const $=D.slice(1);if($.length>0){const B=$.map(R=>R.slice(k+m)).join(`
|
|
44
|
+
`);B.trim()&&(e.customNestedParser?T=e.customNestedParser(B):T=n.blockTokens(B))}const A=e.createToken(x,T);c.push(A)}if(c.length!==0)return{items:c,raw:f}}function Kx(t,e,n,r){if(!t||!Array.isArray(t.content))return"";const i=typeof n=="function"?n(r):n,[s,...a]=t.content,u=e.renderChildren([s]);let c=`${i}${u}`;return a&&a.length>0&&a.forEach((f,h)=>{var m,g;const b=(g=(m=e.renderChild)==null?void 0:m.call(e,f,h+1))!=null?g:e.renderChildren([f]);if(b!=null){const x=b.split(`
|
|
45
|
+
`).map(k=>k?e.indent(k):e.indent("")).join(`
|
|
46
|
+
`);c+=f.type==="paragraph"?`
|
|
47
|
+
|
|
48
|
+
${x}`:`
|
|
49
|
+
${x}`}}),c}function ID(t){return typeof t.type=="string"?t.type:t.type.name}function $Y(t,e){if(t.length!==e.length)return!1;const n=Array.from({length:e.length},()=>!1);return t.every(r=>{const i=ID(r),s=e.findIndex((a,u)=>!n[u]&&i===ID(a)&&Il(r.attrs,a.attrs));return s===-1?!1:(n[s]=!0,!0)})}function f8(t,e){const n={...t};return yh(t)&&yh(e)&&Object.keys(e).forEach(r=>{yh(e[r])&&yh(t[r])?n[r]=f8(t[r],e[r]):n[r]=e[r]}),n}function TY(t,e,n={}){const{state:r}=e,{doc:i,tr:s}=r,a=t;i.descendants((u,c)=>{const f=s.mapping.map(c),h=s.mapping.map(c)+u.nodeSize;let m=null;if(u.marks.forEach(b=>{if(b!==a)return!1;m=b}),!m)return;let g=!1;if(Object.keys(n).forEach(b=>{n[b]!==m.attrs[b]&&(g=!0)}),g){const b=t.type.create({...t.attrs,...n});s.removeMark(f,h,t.type),s.addMark(f,h,b)}}),s.docChanged&&e.view.dispatch(s)}var Ad=class{constructor(t){var e;this.find=t.find,this.handler=t.handler,this.undoable=(e=t.undoable)!=null?e:!0}},AY=(t,e)=>{if(Rx(e))return e.exec(t);const n=e(t);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=t,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function xh(t){var e;const{editor:n,from:r,to:i,text:s,rules:a,plugin:u}=t,{view:c}=n;if(c.composing)return!1;const f=c.state.doc.resolve(r);if(f.parent.type.spec.code||(e=f.nodeBefore||f.nodeAfter)!=null&&e.marks.find(g=>g.type.spec.code))return!1;let h=!1;const m=KQ(f)+s;return a.forEach(g=>{if(h)return;const b=AY(m,g.find);if(!b)return;const x=b[0].length-s.length;if(x>0){const R=f.parentOffset-x;if(R<0||f.parent.textBetween(R,f.parentOffset)!==b[0].slice(0,x))return}const k=c.state.tr,E=_m({state:c.state,transaction:k}),D={from:r-(b[0].length-s.length),to:i},{commands:T,chain:$,can:A}=new Vm({editor:n,state:E});g.handler({state:E,range:D,match:b,commands:T,chain:$,can:A})===null||!k.steps.length||(g.undoable&&k.setMeta(u,{transform:k,from:r,to:i,text:s}),c.dispatch(k),h=!0)}),h}function BY(t){const{editor:e,rules:n}=t,r=new pt({state:{init(){return null},apply(i,s,a){const u=i.getMeta(r);if(u)return u;const c=i.getMeta("applyInputRules");return c&&setTimeout(()=>{let{text:h}=c;typeof h=="string"?h=h:h=Px(ae.from(h),a.schema);const{from:m}=c,g=m+h.length;xh({editor:e,from:m,to:g,text:h,rules:n,plugin:r})}),i.selectionSet||i.docChanged?null:s}},props:{handleTextInput(i,s,a,u){return xh({editor:e,from:s,to:a,text:u,rules:n,plugin:r})},handleDOMEvents:{compositionend:i=>(setTimeout(()=>{const{$cursor:s}=i.state.selection;s&&xh({editor:e,from:s.pos,to:s.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(i,s){if(s.key!=="Enter")return!1;const{$cursor:a}=i.state.selection;return a?xh({editor:e,from:a.pos,to:a.pos,text:`
|
|
50
|
+
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}var _x=class{constructor(t={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...t},this.name=this.config.name}get options(){return{...We(ye(this,"addOptions",{name:this.name}))}}get storage(){return{...We(ye(this,"addStorage",{name:this.name,options:this.options}))}}configure(t={}){const e=this.extend({...this.config,addOptions:()=>f8(this.options,t)});return e.name=this.name,e.parent=this.parent,this.child=null,e}extend(t={}){const e=new this.constructor({...this.config,...t});return e.parent=this,this.child=e,e.name="name"in t?t.name:e.parent.name,e}},xa=class h8 extends _x{constructor(){super(...arguments),this.type="mark"}static create(e={}){const n=typeof e=="function"?e():e;return new h8(n)}static handleExit({editor:e,mark:n}){const{tr:r}=e.state,i=e.state.selection.$from;if(i.pos===i.end()){const a=i.marks();if(!!!a.find(f=>f?.type.name===n.name))return!1;const c=a.find(f=>f?.type.name===n.name);return c&&r.removeStoredMark(c),r.insertText(" ",i.pos),e.view.dispatch(r),!0}return!1}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}},p8=class{constructor(t){this.find=t.find,this.handler=t.handler}},MY=(t,e,n)=>{if(Rx(e))return[...t.matchAll(e)];const r=e(t,n);return r?r.map(i=>{const s=[i.text];return s.index=i.index,s.input=t,s.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),s.push(i.replaceWith)),s}):[]};function NY(t){const{editor:e,state:n,from:r,to:i,rule:s,pasteEvent:a,dropEvent:u}=t,{commands:c,chain:f,can:h}=new Vm({editor:e,state:n}),m=[];return n.doc.nodesBetween(r,i,(b,x)=>{var k,E,D,T,$;if((E=(k=b.type)==null?void 0:k.spec)!=null&&E.code||!(b.isText||b.isTextblock||b.isInline))return;const A=($=(T=(D=b.content)==null?void 0:D.size)!=null?T:b.nodeSize)!=null?$:0,B=Math.max(r,x),R=Math.min(i,x+A);if(B>=R)return;const M=b.isText?b.text||"":b.textBetween(B-x,R-x,void 0,"");MY(M,s.find,a).forEach(j=>{if(j.index===void 0)return;const q=B+j.index+1,X=q+j[0].length,G={from:n.tr.mapping.map(q),to:n.tr.mapping.map(X)},Z=s.handler({state:n,range:G,match:j,commands:c,chain:f,can:h,pasteEvent:a,dropEvent:u});m.push(Z)})}),m.every(b=>b!==null)}var vh=null,RY=t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)==null||e.setData("text/html",t),n};function OY(t){const{editor:e,rules:n}=t;let r=null,i=!1,s=!1,a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,u;try{u=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{u=null}const c=({state:h,from:m,to:g,rule:b,pasteEvt:x})=>{const k=h.tr,E=_m({state:h,transaction:k});if(!(!NY({editor:e,state:E,from:Math.max(m-1,0),to:g.b-1,rule:b,pasteEvent:x,dropEvent:u})||!k.steps.length)){try{u=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{u=null}return a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,k}};return n.map(h=>new pt({view(m){const g=x=>{var k;r=(k=m.dom.parentElement)!=null&&k.contains(x.target)?m.dom.parentElement:null,r&&(vh=e)},b=()=>{vh&&(vh=null)};return window.addEventListener("dragstart",g),window.addEventListener("dragend",b),{destroy(){window.removeEventListener("dragstart",g),window.removeEventListener("dragend",b)}}},props:{handleDOMEvents:{drop:(m,g)=>{if(s=r===m.dom.parentElement,u=g,!s){const b=vh;b?.isEditable&&setTimeout(()=>{const x=b.state.selection;x&&b.commands.deleteRange({from:x.from,to:x.to})},10)}return!1},paste:(m,g)=>{var b;const x=(b=g.clipboardData)==null?void 0:b.getData("text/html");return a=g,i=!!x?.includes("data-pm-slice"),!1}}},appendTransaction:(m,g,b)=>{const x=m[0],k=x.getMeta("uiEvent")==="paste"&&!i,E=x.getMeta("uiEvent")==="drop"&&!s,D=x.getMeta("applyPasteRules"),T=!!D;if(!k&&!E&&!T)return;if(T){let{text:B}=D;typeof B=="string"?B=B:B=Px(ae.from(B),b.schema);const{from:R}=D,M=R+B.length,O=RY(B);return c({rule:h,state:b,from:R,to:{b:M},pasteEvt:O})}const $=g.doc.content.findDiffStart(b.doc.content),A=g.doc.content.findDiffEnd(b.doc.content);if(!(!xY($)||!A||$===A.b))return c({rule:h,state:b,from:$,to:A,pasteEvt:a})}}))}var Gm=class{constructor(t,e){this.splittableMarks=[],this.nonClearableMarks=[],this.editor=e,this.baseExtensions=t,this.extensions=zx(t),this.schema=r8(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((t,e)=>{const n={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:ec(e.name,this.schema)},r=ye(e,"addCommands",n);return r?{...t,...r()}:t},{})}get plugins(){const{editor:t}=this;return Sl([...this.extensions].reverse()).flatMap(r=>{const i={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:t,type:ec(r.name,this.schema)},s=[],a=ye(r,"addKeyboardShortcuts",i);let u={};if(r.type==="mark"&&ye(r,"exitable",i)&&(u.ArrowRight=()=>xa.handleExit({editor:t,mark:r})),a){const g=Object.fromEntries(Object.entries(a()).map(([b,x])=>[b,()=>x({editor:t})]));u={...u,...g}}const c=PW(u);s.push(c);const f=ye(r,"addInputRules",i);if(OD(r,t.options.enableInputRules)&&f){const g=f();if(g&&g.length){const b=BY({editor:t,rules:g}),x=Array.isArray(b)?b:[b];s.push(...x)}}const h=ye(r,"addPasteRules",i);if(OD(r,t.options.enablePasteRules)&&h){const g=h();if(g&&g.length){const b=OY({editor:t,rules:g});s.push(...b)}}const m=ye(r,"addProseMirrorPlugins",i);if(m){const g=m();s.push(...g)}return s})}get attributes(){return n8(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=Ll(this.extensions);return Object.fromEntries(e.filter(n=>!!ye(n,"addNodeView")).map(n=>{const r=this.attributes.filter(c=>c.type===n.name),i={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:Lt(n.name,this.schema)},s=ye(n,"addNodeView",i);if(!s)return[];const a=s();if(!a)return[];const u=(c,f,h,m,g)=>{const b=sd(c,r);return a({node:c,view:f,getPos:h,decorations:m,innerDecorations:g,editor:t,extension:n,HTMLAttributes:b})};return[n.name,u]}))}dispatchTransaction(t){const{editor:e}=this;return Sl([...this.extensions].reverse()).reduceRight((r,i)=>{const s={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:e,type:ec(i.name,this.schema)},a=ye(i,"dispatchTransaction",s);return a?u=>{a.call(s,{transaction:u,next:r})}:r},t)}transformPastedHTML(t){const{editor:e}=this;return Sl([...this.extensions]).reduce((r,i)=>{const s={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:e,type:ec(i.name,this.schema)},a=ye(i,"transformPastedHTML",s);return a?(u,c)=>{const f=r(u,c);return a.call(s,f)}:r},t||(r=>r))}get markViews(){const{editor:t}=this,{markExtensions:e}=Ll(this.extensions);return Object.fromEntries(e.filter(n=>!!ye(n,"addMarkView")).map(n=>{const r=this.attributes.filter(u=>u.type===n.name),i={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:Hi(n.name,this.schema)},s=ye(n,"addMarkView",i);if(!s)return[];const a=(u,c,f)=>{const h=sd(u,r);return s()({mark:u,view:c,inline:f,editor:t,extension:n,HTMLAttributes:h,updateAttributes:m=>{TY(u,t,m)}})};return[n.name,a]}))}destroy(){this.extensions.forEach(t=>{let e=t;for(;e.parent;){const n=e.parent;n.child===e&&(n.child=null),e=n}}),this.extensions=[],this.baseExtensions=[],this.schema=null,this.editor=null}setupExtensions(){const t=this.extensions;this.editor.extensionStorage=Object.fromEntries(t.map(e=>[e.name,e.storage])),t.forEach(e=>{var n,r;const i={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:ec(e.name,this.schema)};e.type==="mark"&&(((n=We(ye(e,"keepOnSplit",i)))==null||n)&&this.splittableMarks.push(e.name),(r=We(ye(e,"clearable",i)))==null||r||this.nonClearableMarks.push(e.name));const s=ye(e,"onBeforeCreate",i),a=ye(e,"onCreate",i),u=ye(e,"onUpdate",i),c=ye(e,"onSelectionUpdate",i),f=ye(e,"onTransaction",i),h=ye(e,"onFocus",i),m=ye(e,"onBlur",i),g=ye(e,"onDestroy",i);s&&this.editor.on("beforeCreate",s),a&&this.editor.on("create",a),u&&this.editor.on("update",u),c&&this.editor.on("selectionUpdate",c),f&&this.editor.on("transaction",f),h&&this.editor.on("focus",h),m&&this.editor.on("blur",m),g&&this.editor.on("destroy",g)})}};Gm.resolve=zx;Gm.sort=Sl;Gm.flatten=qm;var PY={};Nx(PY,{ClipboardTextSerializer:()=>g8,Commands:()=>b8,Delete:()=>y8,Drop:()=>x8,Editable:()=>v8,FocusEvents:()=>C8,Keymap:()=>E8,Paste:()=>D8,Tabindex:()=>S8,TextDirection:()=>w8,focusEventsPluginKey:()=>k8});var mt=class m8 extends _x{constructor(){super(...arguments),this.type="extension"}static create(e={}){const n=typeof e=="function"?e():e;return new m8(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}},g8=mt.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new pt({key:new Vt("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:i}=e,s=o8(n),{blockSeparator:a}=this.options,u={...a!==void 0?{blockSeparator:a}:{},textSerializers:s};return[...i.ranges].sort((f,h)=>f.$from.pos-h.$from.pos).map(({$from:f,$to:h})=>s8(r,{from:f.pos,to:h.pos},u)).join(a??`
|
|
51
|
+
|
|
52
|
+
`)}}})]}}),b8=mt.create({name:"commands",addCommands(){return{...kr}}}),y8=mt.create({name:"delete",onUpdate({transaction:t,appendedTransactions:e}){var n,r,i;const s=()=>{var a,u,c,f;if((f=(c=(u=(a=this.editor.options.coreExtensionOptions)==null?void 0:a.delete)==null?void 0:u.filterTransaction)==null?void 0:c.call(u,t))!=null?f:t.getMeta("y-sync$"))return;const h=e8(t.before,[t,...e]);Lx(h).forEach(b=>{h.mapping.mapResult(b.oldRange.from).deletedAfter&&h.mapping.mapResult(b.oldRange.to).deletedBefore&&h.before.nodesBetween(b.oldRange.from,b.oldRange.to,(x,k)=>{const E=k+x.nodeSize-2,D=b.oldRange.from<=k&&E<=b.oldRange.to;this.editor.emit("delete",{type:"node",node:x,from:k,to:E,newFrom:h.mapping.map(k),newTo:h.mapping.map(E),deletedRange:b.oldRange,newRange:b.newRange,partial:!D,editor:this.editor,transaction:t,combinedTransform:h})})});const g=h.mapping;h.steps.forEach((b,x)=>{var k,E;if(b instanceof $r){const D=g.slice(x).map(b.from,-1),T=g.slice(x).map(b.to),$=g.invert().map(D,-1),A=g.invert().map(T),B=D>0?(k=h.doc.nodeAt(D-1))==null?void 0:k.marks.some(M=>M.eq(b.mark)):!1,R=(E=h.doc.nodeAt(T))==null?void 0:E.marks.some(M=>M.eq(b.mark));this.editor.emit("delete",{type:"mark",mark:b.mark,from:b.from,to:b.to,deletedRange:{from:$,to:A},newRange:{from:D,to:T},partial:!!(R||B),editor:this.editor,transaction:t,combinedTransform:h})}})};(i=(r=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:r.async)==null||i?setTimeout(s,0):s()}}),x8=mt.create({name:"drop",addProseMirrorPlugins(){return[new pt({key:new Vt("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),v8=mt.create({name:"editable",addProseMirrorPlugins(){return[new pt({key:new Vt("editable"),props:{editable:()=>this.editor.options.editable}})]}}),k8=new Vt("focusEvents"),C8=mt.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new pt({key:k8,props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),E8=mt.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:a})=>[()=>a.undoInputRule(),()=>a.command(({tr:u})=>{const{selection:c,doc:f}=u,{empty:h,$anchor:m}=c,{pos:g,parent:b}=m,x=m.parent.isTextblock&&g>0?u.doc.resolve(g-1):m,k=x.parent.type.spec.isolating,E=m.pos-m.parentOffset,D=k&&x.parent.childCount===1?E===m.pos:Ne.atStart(f).from===g;return!h||!b.type.isTextblock||b.textContent.length||!D||D&&m.parent.type.name==="paragraph"?!1:a.clearNodes()}),()=>a.deleteSelection(),()=>a.joinBackward(),()=>a.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:a})=>[()=>a.deleteSelection(),()=>a.deleteCurrentNode(),()=>a.joinForward(),()=>a.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:a})=>[()=>a.newlineInCode(),()=>a.createParagraphNear(),()=>a.liftEmptyBlock(),()=>a.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},i={...r},s={...r,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Bp()||JM()?s:i},addProseMirrorPlugins(){return[new pt({key:new Vt("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(k=>k.getMeta("composition")))return;const r=t.some(k=>k.docChanged)&&!e.doc.eq(n.doc),i=t.some(k=>k.getMeta("preventClearDocument"));if(!r||i)return;const{empty:s,from:a,to:u}=e.selection,c=Ne.atStart(e.doc).from,f=Ne.atEnd(e.doc).to;if(s||!(a===c&&u===f)||!Td(n.doc))return;const g=n.tr,b=_m({state:n,transaction:g}),{commands:x}=new Vm({editor:this.editor,state:b});if(x.clearNodes(),!!g.steps.length)return g}})]}}),D8=mt.create({name:"paste",addProseMirrorPlugins(){return[new pt({key:new Vt("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),S8=mt.create({name:"tabindex",addOptions(){return{value:void 0}},addProseMirrorPlugins(){return[new pt({key:new Vt("tabindex"),props:{attributes:()=>{var t;return!this.editor.isEditable&&this.options.value===void 0?{}:{tabindex:(t=this.options.value)!=null?t:"0"}}}})]}}),w8=mt.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];const{nodeExtensions:t}=Ll(this.extensions);return[{types:t.filter(e=>e.name!=="text").map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{const n=e.getAttribute("dir");return n&&(n==="ltr"||n==="rtl"||n==="auto")?n:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new pt({key:new Vt("textDirection"),props:{attributes:()=>{const t=this.options.direction;return t?{dir:t}:{}}}})]}}),zY=class hc{constructor(e,n,r=!1,i=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=n,this.currentNode=i}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!=null?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(e);return new hc(n,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new hc(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new hc(e,this.editor)}get children(){const e=[];return this.node.content.forEach((n,r)=>{const i=n.isBlock&&!n.isTextblock,s=n.isAtom&&!n.isText,a=n.isInline,u=this.pos+r+(s?0:1);if(u<0||u>this.resolvedPos.doc.nodeSize-2)return;const c=this.resolvedPos.doc.resolve(u);if(!i&&!a&&c.depth<=this.depth)return;const f=new hc(c,this.editor,i,i||a?n:null);i&&(f.actualDepth=this.depth+1),e.push(f)}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,n={}){let r=null,i=this.parent;for(;i&&!r;){if(i.node.type.name===e)if(Object.keys(n).length>0){const s=i.node.attrs,a=Object.keys(n);for(let u=0;u<a.length;u+=1){const c=a[u];if(s[c]!==n[c])break}}else r=i;i=i.parent}return r}querySelector(e,n={}){return this.querySelectorAll(e,n,!0)[0]||null}querySelectorAll(e,n={},r=!1){let i=[];if(!this.children||this.children.length===0)return i;const s=Object.keys(n);return this.children.forEach(a=>{r&&i.length>0||(a.node.type.name===e&&s.every(c=>n[c]===a.node.attrs[c])&&i.push(a),!(r&&i.length>0)&&(i=i.concat(a.querySelectorAll(e,n,r))))}),i}setAttribute(e){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(n)}},LY=`.ProseMirror {
|
|
53
|
+
position: relative;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.ProseMirror {
|
|
57
|
+
word-wrap: break-word;
|
|
58
|
+
white-space: pre-wrap;
|
|
59
|
+
white-space: break-spaces;
|
|
60
|
+
-webkit-font-variant-ligatures: none;
|
|
61
|
+
font-variant-ligatures: none;
|
|
62
|
+
font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.ProseMirror [contenteditable="false"] {
|
|
66
|
+
white-space: normal;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.ProseMirror [contenteditable="false"] [contenteditable="true"] {
|
|
70
|
+
white-space: pre-wrap;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.ProseMirror pre {
|
|
74
|
+
white-space: pre-wrap;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
img.ProseMirror-separator {
|
|
78
|
+
display: inline !important;
|
|
79
|
+
border: none !important;
|
|
80
|
+
margin: 0 !important;
|
|
81
|
+
width: 0 !important;
|
|
82
|
+
height: 0 !important;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.ProseMirror-gapcursor {
|
|
86
|
+
display: none;
|
|
87
|
+
pointer-events: none;
|
|
88
|
+
position: absolute;
|
|
89
|
+
margin: 0;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.ProseMirror-gapcursor:after {
|
|
93
|
+
content: "";
|
|
94
|
+
display: block;
|
|
95
|
+
position: absolute;
|
|
96
|
+
top: -2px;
|
|
97
|
+
width: 20px;
|
|
98
|
+
border-top: 1px solid black;
|
|
99
|
+
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@keyframes ProseMirror-cursor-blink {
|
|
103
|
+
to {
|
|
104
|
+
visibility: hidden;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.ProseMirror-hideselection *::selection {
|
|
109
|
+
background: transparent;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.ProseMirror-hideselection *::-moz-selection {
|
|
113
|
+
background: transparent;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.ProseMirror-hideselection * {
|
|
117
|
+
caret-color: transparent;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.ProseMirror-focused .ProseMirror-gapcursor {
|
|
121
|
+
display: block;
|
|
122
|
+
}`,IY=class extends mY{constructor(t={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.destroyed=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:n})=>{throw n},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:UQ,createMappablePosition:qQ},this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:n,slice:r,moved:i})=>this.options.onDrop(n,r,i)),this.on("paste",({event:n,slice:r})=>this.options.onPaste(n,r)),this.on("delete",this.options.onDelete);const e=this.createDoc();if(!this.editorState){const n=F4(e,this.options.autofocus);this.editorState=Lo.create({doc:e,schema:this.schema,selection:n||void 0})}this.options.element&&this.mount(this.options.element)}mount(t){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(t),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){const t=this.editorView.dom;t?.editor&&delete t.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(t){console.warn("Failed to remove CSS element:",t)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=bY(LY,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,e=!0){this.setOptions({editable:t}),e&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:t=>{this.editorState=t},dispatch:t=>{this.dispatchTransaction(t)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(t,e)=>{if(this.editorView)return this.editorView[e];if(e==="state")return this.editorState;if(e in t)return Reflect.get(t,e);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${e}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(t,e){const n=t8(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(t){if(this.isDestroyed)return;const e=this.state.plugins;let n=e;if([].concat(t).forEach(i=>{const s=typeof i=="string"?`${i}$`:i.key;n=n.filter(a=>!a.key.startsWith(s))}),e.length===n.length)return;const r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var t,e,n,r;const s=[...this.options.enableCoreExtensions?[v8,g8.configure({blockSeparator:(e=(t=this.options.coreExtensionOptions)==null?void 0:t.clipboardTextSerializer)==null?void 0:e.blockSeparator}),b8,C8,E8,S8.configure({value:(r=(n=this.options.coreExtensionOptions)==null?void 0:n.tabindex)==null?void 0:r.value}),x8,D8,y8,w8.configure({direction:this.options.textDirection})].filter(a=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[a.name]!==!1:!0):[],...this.options.extensions].filter(a=>["extension","node","mark"].includes(a?.type));this.extensionManager=new Gm(s,this)}createCommandManager(){this.commandManager=new Vm({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let t;try{t=K4(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(e){if(!(e instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(e.message))throw e;const n=K4(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1});return this.editorState=Lo.create({doc:n,schema:this.schema,selection:F4(n,this.options.autofocus)||void 0}),this.emit("contentError",{editor:this,error:e,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(r=>r.name!=="collaboration"),this.createExtensionManager()}}),this.editorState.doc}return t}createView(t){const{editorProps:e,enableExtensionDispatchTransaction:n}=this.options,r=e.dispatchTransaction||this.dispatchTransaction.bind(this),i=n?this.extensionManager.dispatchTransaction(r):r,s=e.transformPastedHTML,a=this.extensionManager.transformPastedHTML(s);this.editorView=new UM(t,{...e,attributes:{role:"textbox",...e?.attributes},dispatchTransaction:i,transformPastedHTML:a,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});const u=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(u),this.prependClass(),this.injectCSS();const c=this.view.dom;c.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(f=>{var h;return(h=this.capturedTransaction)==null?void 0:h.step(f)});return}const{state:e,transactions:n}=this.state.applyTransaction(t),r=!this.state.selection.eq(e.selection),i=n.includes(t),s=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:t,nextState:e}),!i)return;this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t,appendedTransactions:n.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:t});const a=n.findLast(f=>f.getMeta("focus")||f.getMeta("blur")),u=a?.getMeta("focus"),c=a?.getMeta("blur");u&&this.emit("focus",{editor:this,event:u.event,transaction:a}),c&&this.emit("blur",{editor:this,event:c.event,transaction:a}),!(t.getMeta("preventUpdate")||!n.some(f=>f.docChanged)||s.doc.eq(e.doc))&&this.emit("update",{editor:this,transaction:t,appendedTransactions:n.slice(1)})}getAttributes(t){return a8(this.state,t)}isActive(t,e){const n=typeof t=="string"?t:null,r=typeof t=="string"?e:t;return _Q(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Px(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:e=`
|
|
123
|
+
|
|
124
|
+
`,textSerializers:n={}}=t||{};return zQ(this.state.doc,{blockSeparator:e,textSerializers:{...o8(this.schema),...n}})}get isEmpty(){return Td(this.state.doc)}destroy(){this.destroyed||(this.destroyed=!0,this.emit("destroy"),this.unmount(),this.removeAllListeners(),this.extensionManager.destroy(),this.extensionManager=null,this.schema=null,this.commandManager=null,this.extensionStorage={})}get isDestroyed(){var t,e;return(e=(t=this.editorView)==null?void 0:t.isDestroyed)!=null?e:!0}$node(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelector(t,e))||null}$nodes(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(t,e))||null}$pos(t){const e=this.state.doc.resolve(t),n=t>0&&e.nodeAfter&&!e.nodeAfter.isText&&e.nodeAfter.isAtom?e.nodeAfter:null;return new zY(e,this,!1,n)}get $doc(){return this.$pos(0)}};function oa(t){return new Ad({find:t.find,handler:({state:e,range:n,match:r})=>{const i=We(t.getAttributes,void 0,r);if(i===!1||i===null)return null;const{tr:s}=e,a=r[r.length-1],u=r[0];if(a){const c=u.search(/\S/),f=n.from+u.indexOf(a),h=f+a.length;if(Ix(n.from,n.to,e.doc).filter(b=>b.mark.type.excluded.find(k=>k===t.type&&k!==b.mark.type)).filter(b=>b.to>f).length)return null;h<n.to&&s.delete(h,n.to),f>n.from&&s.delete(n.from+c,f);const g=n.from+c+a.length;s.addMark(n.from+c,g,t.type.create(i||{})),s.removeStoredMark(t.type)}},undoable:t.undoable})}function jY(t){return new Ad({find:t.find,handler:({state:e,range:n,match:r})=>{const i=We(t.getAttributes,void 0,r)||{},{tr:s}=e,a=n.from;let u=n.to;const c=t.type.create(i);if(r[1]){const f=r[0].lastIndexOf(r[1]);let h=a+f;h>u?h=u:u=h+r[1].length;const m=r[0][r[0].length-1];s.insertText(m,a+r[0].length-1),s.replaceWith(h,u,c)}else if(r[0]){const f=t.type.isInline?a:a-1;s.insert(f,t.type.create(i)).delete(s.mapping.map(a),s.mapping.map(u))}s.scrollIntoView()},undoable:t.undoable})}function H4(t){return new Ad({find:t.find,handler:({state:e,range:n,match:r})=>{const i=e.doc.resolve(n.from),s=We(t.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,s)},undoable:t.undoable})}function jl(t){return new Ad({find:t.find,handler:({state:e,range:n,match:r,chain:i})=>{const s=We(t.getAttributes,void 0,r)||{},a=e.tr.delete(n.from,n.to),c=a.doc.resolve(n.from).blockRange(),f=c&&bx(c,t.type,s);if(!f)return null;if(a.wrap(c,f),t.keepMarks&&t.editor){const{selection:m,storedMarks:g}=e,{splittableMarks:b}=t.editor.extensionManager,x=g||m.$to.parentOffset&&m.$from.marks();if(x){const k=x.filter(E=>b.includes(E.type.name));a.ensureMarks(k)}}if(t.keepAttributes){const m=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(m,s).run()}const h=a.doc.resolve(n.from-1).nodeBefore;h&&h.type===t.type&&to(a.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,h))&&a.join(n.from-1)},undoable:t.undoable})}var Xn=class $8 extends _x{constructor(){super(...arguments),this.type="node"}static create(e={}){const n=typeof e=="function"?e():e;return new $8(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}};function Gs(t){return new p8({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:i})=>{const s=We(t.getAttributes,void 0,r,i);if(s===!1||s===null)return null;const{tr:a}=e,u=r[r.length-1],c=r[0];let f=n.to;if(u){const h=c.search(/\S/),m=n.from+c.indexOf(u),g=m+u.length;if(Ix(n.from,n.to,e.doc).filter(k=>k.mark.type.excluded.find(D=>D===t.type&&D!==k.mark.type)).filter(k=>k.to>m).length)return null;g<n.to&&a.delete(g,n.to),m>n.from&&a.delete(n.from+h,m),f=n.from+h+u.length,a.addMark(n.from+h,f,t.type.create(s||{})),r.index!==void 0&&r.input!==void 0&&r.index+r[0].length>=r.input.length||a.removeStoredMark(t.type)}}})}var FY=Object.defineProperty,KY=(t,e)=>{for(var n in e)FY(t,n,{get:e[n],enumerable:!0})},_Y="listItem",jD="textStyle",FD=/^\s*([-+*])\s$/,T8=Xn.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",_t(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>t.type!=="list"||t.ordered?[]:{type:"bulletList",content:t.items?e.parseChildren(t.items):[]},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
|
|
125
|
+
`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(_Y,this.editor.getAttributes(jD)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=jl({find:FD,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=jl({find:FD,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(jD),editor:this.editor})),[t]}}),VY=(t,e,n)=>{const{selection:r}=t;if(!r.empty)return null;const{$from:i}=r;if(!i.parent.isTextblock||i.parentOffset!==i.parent.content.size)return null;let s=-1;for(let b=i.depth;b>0;b-=1)if(i.node(b).type.name===e){s=b;break}if(s<0)return null;const a=i.node(s),u=i.index(s);if(u+1>=a.childCount)return null;const c=a.child(u+1);if(!n.includes(c.type.name))return null;const f=t.schema.nodes[e];let h=!1;if(c.forEach(b=>{b.type===f&&b.childCount>1&&(h=!0)}),!h)return null;const m=t.doc.resolve(i.after()).nodeAfter;if(!m||!n.includes(m.type.name))return null;const g=[];return m.forEach(b=>{g.push(b)}),g.length===0?null:{listItemDepth:s,nestedList:m,nestedListPos:i.after(),insertPos:i.after(s),items:g}},HY=(t,e,n,r)=>{const i=VY(t,n,r);if(!i)return!1;const{selection:s}=t,{nestedList:a,nestedListPos:u,insertPos:c,items:f}=i,h=t.tr;h.delete(u,u+a.nodeSize);const m=h.mapping.map(c);return h.insert(m,ae.from(f)),h.setSelection(s.map(h.doc,h.mapping)),e&&e(h),!0},UY=(t,e,n)=>HY(t.state,t.view.dispatch,e,n),A8=(t,e)=>mt.create({name:`${t}BranchingDeleteKeymap`,priority:101,addKeyboardShortcuts(){const n=()=>UY(this.editor,t,e);return{Delete:n,"Mod-Delete":n}}}),B8=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],kh="abcdefghijklmnopqrstuvwxyz",qY="[a-zA-Z]{1,2}",M8=String.raw`\d+|[ivxlcdmIVXLCDM]+|${qY}`;function Wm(t){let e=t,n="";for(const[r,i]of B8)for(;e>=r;)n+=i,e-=r;return n}function Vx(t){return Wm(t).toUpperCase()}function N8(t){const e=t.toLowerCase();let n=0,r=0;for(;n<e.length;){let i=!1;for(const[s,a]of B8)if(e.startsWith(a,n)){r+=s,n+=a.length,i=!0;break}if(!i)return 0}return r}function GY(t){if(!/^[ivxlcdmIVXLCDM]+$/.test(t))return!1;const e=N8(t);return e<=0?!1:(t===t.toLowerCase()?Wm(e):Vx(e))===t}function WY(t){const e=t.toLowerCase();if(e.length===1)return e.charCodeAt(0)-97+1;if(e.length===2){const n=e.charCodeAt(0)-97,r=e.charCodeAt(1)-97;return(n+1)*26+r+1}return 0}function Mp(t){if(t<=26)return kh[t-1];const e=Math.floor((t-1)/26)-1,n=(t-1)%26;return e<0?kh[n]:kh[e]+kh[n]}function Qm(t){if(!(!t||/^\d+$/.test(t))){if(GY(t))return t===t.toLowerCase()?"i":"I";if(/^[a-z]{1,2}$/.test(t))return"a";if(/^[A-Z]{1,2}$/.test(t))return"A"}}function Hx(t){if(/^\d+$/.test(t))return parseInt(t,10);const e=Qm(t);if(e==="i"||e==="I")return N8(t);if(e==="a"||e==="A"){const r=WY(t);return r>0?r:1}const n=parseInt(t,10);return Number.isNaN(n)?1:n}function QY(t,e){if(t==="numeric")return String(e);switch(t){case"a":return Mp(e);case"A":return Mp(e).toUpperCase();case"i":return Wm(e);case"I":return Vx(e);default:return String(e)}}function YY(t){var e;if(t.length===0)return!1;const n=(e=Qm(t[0]))!=null?e:"numeric",r=Hx(t[0]);if(r<1)return!1;for(let i=0;i<t.length;i++){const s=QY(n,r+i);if(t[i]!==s)return!1}return!0}function XY(t){return{type:Qm(t),start:Hx(t)}}function JY(t){const{type:e,start:n}=XY(t),r={};return e&&(r.type=e),n!==1&&(r.start=n),r}function ZY(t,e,n=". "){const r=e+1;if(!t||t==="1")return`${r}${n}`;switch(t){case"a":return`${Mp(r)}${n}`;case"A":return`${Mp(r).toUpperCase()}${n}`;case"i":return`${Wm(r)}${n}`;case"I":return`${Vx(r)}${n}`;default:return`${r}${n}`}}function eX(t){var e,n;const r=(e=t.tokens)==null?void 0:e[0];return!!(t.text&&((n=t.tokens)==null?void 0:n.length)===1&&r?.type==="list"&&r.ordered&&r.raw===t.text)}function tX(t,e){return e.tokenizeInline?e.parseInline(e.tokenizeInline(t)):e.parseInline([{type:"text",raw:t,text:t}])}var R8=Xn.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",_t(this.options.HTMLAttributes,t),0]},markdownTokenName:"list_item",parseMarkdown:(t,e)=>{var n;if(t.type!=="list_item")return[];const r=(n=e.parseBlockChildren)!=null?n:e.parseChildren;let i=[];if(t.tokens&&t.tokens.length>0){if(eX(t))return{type:"listItem",content:[{type:"paragraph",content:tX(t.text||"",e)}]};if(t.tokens.some(a=>a.type==="paragraph"))i=r(t.tokens);else{const a=t.tokens[0];if(a&&a.type==="text"&&a.tokens&&a.tokens.length>0){if(i=[{type:"paragraph",content:e.parseInline(a.tokens)}],t.tokens.length>1){const c=t.tokens.slice(1),f=r(c);i.push(...f)}}else i=r(t.tokens)}}return i.length===0&&(i=[{type:"paragraph",content:[]}]),{type:"listItem",content:i}},renderMarkdown:(t,e,n)=>Kx(t,e,r=>{var i,s,a,u;if(r.parentType==="bulletList")return"- ";if(r.parentType==="orderedList"){const c=((s=(i=r.meta)==null?void 0:i.parentAttrs)==null?void 0:s.start)||1,f=(u=(a=r.meta)==null?void 0:a.parentAttrs)==null?void 0:u.type,h=c-1+(r.index||0);return ZY(f,h,". ")}return"- "},n),addExtensions(){return[A8(this.name,[this.options.bulletListTypeName,this.options.orderedListTypeName])]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),nX={};KY(nX,{findListItemPos:()=>Ym,getNextListDepth:()=>Ux,handleBackspace:()=>U4,handleDelete:()=>q4,hasListBefore:()=>O8,hasListItemAfter:()=>rX,hasListItemBefore:()=>iX,listItemHasSubList:()=>sX,nextListIsDeeper:()=>P8,nextListIsHigher:()=>z8});var Ym=(t,e)=>{const{$from:n}=e.selection,r=Lt(t,e.schema);let i=null,s=n.depth,a=n.pos,u=null;for(;s>0&&u===null;)i=n.node(s),i.type===r?u=s:(s-=1,a-=1);return u===null?null:{$pos:e.doc.resolve(a),depth:u}},Ux=(t,e)=>{const n=Ym(t,e);if(!n)return!1;const[,r]=FQ(e,t,n.$pos.pos+4);return r},O8=(t,e,n)=>{const{$anchor:r}=t.selection,i=Math.max(0,r.pos-2),s=t.doc.resolve(i).node();return!(!s||!n.includes(s.type.name))},U4=(t,e,n)=>{if(t.commands.undoInputRule())return!0;if(t.state.selection.from!==t.state.selection.to)return!1;if(!qs(t.state,e)&&O8(t.state,e,n)){const{$anchor:r}=t.state.selection,i=t.state.doc.resolve(r.before()-1),s=[];i.node().descendants((c,f)=>{c.type.name===e&&s.push({node:c,pos:f})});const a=s.at(-1);if(!a)return!1;const u=t.state.doc.resolve(i.start()+a.pos+1);return t.chain().cut({from:r.start()-1,to:r.end()+1},u.end()).joinForward().run()}return!qs(t.state,e)||!HQ(t.state)?!1:t.chain().liftListItem(e).run()},P8=(t,e)=>{const n=Ux(t,e),r=Ym(t,e);return!r||!n?!1:n>r.depth},z8=(t,e)=>{const n=Ux(t,e),r=Ym(t,e);return!r||!n?!1:n<r.depth},q4=(t,e)=>{if(!qs(t.state,e)||!VQ(t.state,e))return!1;const{selection:n}=t.state,{$from:r,$to:i}=n;return!n.empty&&r.sameParent(i)?!1:P8(e,t.state)?t.chain().focus(t.state.selection.from+4).lift(e).joinBackward().run():z8(e,t.state)?t.chain().joinForward().joinBackward().run():t.commands.joinItemForward()},rX=(t,e)=>{var n;const{$anchor:r}=e.selection,i=e.doc.resolve(r.pos-r.parentOffset-2);return!(i.index()===i.parent.childCount-1||((n=i.nodeAfter)==null?void 0:n.type.name)!==t)},iX=(t,e)=>{var n;const{$anchor:r}=e.selection,i=e.doc.resolve(r.pos-2);return!(i.index()===0||((n=i.nodeBefore)==null?void 0:n.type.name)!==t)},sX=(t,e,n)=>{if(!n)return!1;const r=Lt(t,e.schema);let i=!1;return n.descendants(s=>{s.type===r&&(i=!0)}),i},L8=mt.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&q4(t,n)&&(e=!0)}),e},"Mod-Delete":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&q4(t,n)&&(e=!0)}),e},Backspace:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&U4(t,n,r)&&(e=!0)}),e},"Mod-Backspace":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&U4(t,n,r)&&(e=!0)}),e}}}}),G4=new RegExp(`^(\\s*)(${M8})([.)])\\s+(.*)$`),oX=/^\s/,pc={heading:/^#{1,6}(?:\s|$)/,bulletItem:/^[-+*]\s+/,codeFence:/^(?:```|~~~)/,thematicBreak:/^(?:(?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})$/};function aX(t){return G4.test(t.trimStart())}function lX(t){const e=t.trimStart();return pc.bulletItem.test(e)||aX(e)||pc.heading.test(e)||pc.thematicBreak.test(e)&&!e.startsWith("-")||/^>\s?/.test(e)||pc.codeFence.test(e)}function uX(t){return Object.values(pc).some(e=>e.test(t))}function cX(t){const e=[],n=[];let r=!1;return t.forEach(i=>{if(r){n.push(i);return}if(i.trim()===""){r=!0,n.push(i);return}if(e.length>0&&lX(i)){r=!0,n.push(i);return}e.push(i)}),{paragraphLines:e,blockLines:n}}function dX(t){const e=[];let n=0,r=0;for(;n<t.length;){const i=t[n],s=i.match(G4);if(!s)break;const[,a,u,c,f]=s,h=a.length,m=parseInt(u,10),g=isNaN(m)?Qm(u):void 0,b=isNaN(m)?Hx(u):m,x=[f];let k=n+1;const E=[i];let D=!1;for(;k<t.length;){const T=t[k];if(T.match(G4))break;if(T.trim()==="")E.push(T),x.push(""),D=!0,k+=1;else if(T.match(oX)){const A=T.length-T.trimStart().length,B=h+u.length+1;E.push(T),x.push(T.slice(Math.min(A,B))),k+=1}else{if(D||uX(T))break;E.push(T),x.push(T),k+=1}}e.push({indent:h,number:b,type:g,content:x.join(`
|
|
126
|
+
`).trim(),contentLines:x,raw:E.join(`
|
|
127
|
+
`)}),r=k,n=k}return[e,r]}var fX=new RegExp(`^(${M8})([.)])\\s+(.+)$`);function hX(t){const e=t.split(`
|
|
128
|
+
`).filter(s=>s.trim().length>0);if(e.length===0)return null;const n=[];for(const s of e){const a=s.trim().match(fX);if(!a)return null;n.push({marker:a[1],content:a[3]})}const r=n.map(s=>s.marker);return YY(r)?{type:"orderedList",attrs:JY(n[0].marker),content:n.map(s=>({type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:s.content}]}]}))}:null}function I8(t,e,n){const r=[];let i=0;for(;i<t.length;){const s=t[i];if(s.indent===e){const{paragraphLines:a,blockLines:u}=cX(s.contentLines),c=a.join(`
|
|
129
|
+
`).trim(),f=[];c&&f.push({type:"paragraph",raw:c,tokens:n.inlineTokens(c)});const h=u.join(`
|
|
130
|
+
`).trim();if(h){const b=n.blockTokens(h);f.push(...b)}let m=i+1;const g=[];for(;m<t.length&&t[m].indent>e;)g.push(t[m]),m+=1;if(g.length>0){const b=Math.min(...g.map(k=>k.indent)),x=I8(g,b,n);f.push({type:"list",ordered:!0,start:g[0].number,typeMarker:g[0].type,items:x,raw:g.map(k=>k.raw).join(`
|
|
131
|
+
`)})}r.push({type:"list_item",raw:s.raw,tokens:f}),i=m}else i+=1}return r}function pX(t,e){return t.map(n=>{if(n.type!=="list_item")return e.parseChildren([n])[0];const r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(i=>{if(i.type==="paragraph"||i.type==="list"||i.type==="blockquote"||i.type==="code")r.push(...e.parseChildren([i]));else if(i.type==="text"&&i.tokens){const s=e.parseChildren([i]);r.push({type:"paragraph",content:s})}else{const s=e.parseChildren([i]);s.length>0&&r.push(...s)}}),{type:"listItem",content:r}})}var mX="listItem",KD="textStyle",_D=/^(\d+)\.\s$/;function VD(t){const e=t.match(/list-style-type\s*:\s*([^;]+)/i);if(!e)return null;switch(e[1].trim().toLowerCase()){case"upper-roman":return"I";case"lower-roman":return"i";case"upper-alpha":case"upper-latin":return"A";case"lower-alpha":case"lower-latin":return"a";default:return null}}var j8=Xn.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>{const e=t.getAttribute("type");if(e)return e;const n=t.getAttribute("style");if(n){const i=VD(n);if(i)return i}const r=t.querySelector("li");if(r){const i=r.getAttribute("style");if(i){const s=VD(i);if(s)return s}}return null}}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,type:n,...r}=t,i=_t(this.options.HTMLAttributes,r);return e!==1&&(i.start=e),n&&n!=="1"&&(i.type=n),["ol",i,0]},markdownTokenName:"list",parseMarkdown:(t,e)=>{if(t.type!=="list"||!t.ordered)return[];const n=t.start||1,r=t.typeMarker,i=t.items?pX(t.items,e):[],s={};return n!==1&&(s.start=n),r&&(s.type=r),Object.keys(s).length>0?{type:"orderedList",attrs:s,content:i}:{type:"orderedList",content:i}},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
|
|
132
|
+
`):"",markdownTokenizer:{name:"orderedList",level:"block",start:()=>-1,tokenize:(t,e,n)=>{var r,i;const s=t.split(`
|
|
133
|
+
`),[a,u]=dX(s);if(a.length===0)return;const c=I8(a,a[0].indent,n);if(c.length===0)return;const f=((r=a[0])==null?void 0:r.number)||1,h=(i=a[0])==null?void 0:i.type;return{type:"list",ordered:!0,start:f,typeMarker:h,items:c,raw:s.slice(0,u).join(`
|
|
134
|
+
`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(mX,this.editor.getAttributes(KD)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addProseMirrorPlugins(){return[new pt({props:{handlePaste:(t,e)=>{var n,r;const i=(n=e.clipboardData)==null?void 0:n.getData("text/html");if(i?.trim())return!1;const s=(r=e.clipboardData)==null?void 0:r.getData("text/plain");if(!s)return!1;const a=hX(s);if(!a)return!1;try{const u=t.state.schema.nodeFromJSON(a),c=t.state.tr.replaceSelectionWith(u);return t.dispatch(c),!0}catch{return!1}}}})]},addInputRules(){const t=(n,r)=>(!r.attrs.type||r.attrs.type==="1")&&r.childCount+r.attrs.start===+n[1];let e=jl({find:_D,type:this.type,getAttributes:n=>({start:+n[1]}),joinPredicate:t});return(this.options.keepMarks||this.options.keepAttributes)&&(e=jl({find:_D,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:n=>({start:+n[1],...this.editor.getAttributes(KD)}),joinPredicate:t,editor:this.editor})),[e]}}),gX=/^\s*(\[([( |x])?\])\s$/,F8=Xn.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",_t(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(t,e)=>{const n=[];if(t.tokens&&t.tokens.length>0?n.push(e.createNode("paragraph",{},e.parseInline(t.tokens))):t.text?n.push(e.createNode("paragraph",{},[e.createNode("text",{text:t.text})])):n.push(e.createNode("paragraph",{},[])),t.nestedTokens&&t.nestedTokens.length>0){const r=e.parseChildren(t.nestedTokens);n.push(...r)}return e.createNode("taskItem",{checked:t.checked||!1},n)},renderMarkdown:(t,e)=>{var n;const i=`- [${(n=t.attrs)!=null&&n.checked?"x":" "}] `;return Kx(t,e,i)},addExtensions(){return this.options.nested?[A8(this.name,[this.options.taskListTypeName])]:[]},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{const i=document.createElement("li"),s=document.createElement("label"),a=document.createElement("span"),u=document.createElement("input"),c=document.createElement("div"),f=m=>{var g,b;u.ariaLabel=((b=(g=this.options.a11y)==null?void 0:g.checkboxLabel)==null?void 0:b.call(g,m,u.checked))||`Task item checkbox for ${m.textContent||"empty task item"}`};f(t),s.contentEditable="false",u.type="checkbox",u.addEventListener("mousedown",m=>m.preventDefault()),u.addEventListener("change",m=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){u.checked=!u.checked;return}const{checked:g}=m.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:b})=>{const x=n();if(typeof x!="number")return!1;const k=b.doc.nodeAt(x);return b.setNodeMarkup(x,void 0,{...k?.attrs,checked:g}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,g)||(u.checked=!u.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([m,g])=>{i.setAttribute(m,g)}),i.dataset.checked=t.attrs.checked,u.checked=t.attrs.checked,s.append(u,a),i.append(s,c),Object.entries(e).forEach(([m,g])=>{i.setAttribute(m,g)});let h=new Set(Object.keys(e));return{dom:i,contentDOM:c,update:m=>{if(m.type!==this.type)return!1;i.dataset.checked=m.attrs.checked,u.checked=m.attrs.checked,f(m);const g=r.extensionManager.attributes,b=sd(m,g),x=new Set(Object.keys(b)),k=this.options.HTMLAttributes;return h.forEach(E=>{x.has(E)||(E in k?i.setAttribute(E,k[E]):i.removeAttribute(E))}),Object.entries(b).forEach(([E,D])=>{D==null?E in k?i.setAttribute(E,k[E]):i.removeAttribute(E):i.setAttribute(E,D)}),h=x,!0}}}},addInputRules(){return[jl({find:gX,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),K8=Xn.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",_t(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},parseMarkdown:(t,e)=>e.createNode("taskList",{},e.parseChildren(t.items||[])),renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
|
|
135
|
+
`):"",markdownTokenizer:{name:"taskList",level:"block",start(t){var e;const n=(e=t.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:e.index;return n!==void 0?n:-1},tokenize(t,e,n){const r=s=>{const a=V4(s,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:u=>({indentLevel:u[1].length,mainContent:u[4],checked:u[3].toLowerCase()==="x"}),createToken:(u,c)=>({type:"taskItem",raw:"",mainContent:u.mainContent,indentLevel:u.indentLevel,checked:u.checked,text:u.mainContent,tokens:n.inlineTokens(u.mainContent),nestedTokens:c}),customNestedParser:r},n);if(a){const u={type:"taskList",raw:a.raw,items:a.items},c=s.slice(a.raw.length);return c.trim()?[u,...n.blockTokens(c)]:[u]}return n.blockTokens(s)},i=V4(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:s=>({indentLevel:s[1].length,mainContent:s[4],checked:s[3].toLowerCase()==="x"}),createToken:(s,a)=>({type:"taskItem",raw:"",mainContent:s.mainContent,indentLevel:s.indentLevel,checked:s.checked,text:s.mainContent,tokens:n.inlineTokens(s.mainContent),nestedTokens:a}),customNestedParser:r},n);if(i)return{type:"taskList",raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});mt.create({name:"listKit",addExtensions(){const t=[];return this.options.bulletList!==!1&&t.push(T8.configure(this.options.bulletList)),this.options.listItem!==!1&&t.push(R8.configure(this.options.listItem)),this.options.listKeymap!==!1&&t.push(L8.configure(this.options.listKeymap)),this.options.orderedList!==!1&&t.push(j8.configure(this.options.orderedList)),this.options.taskItem!==!1&&t.push(F8.configure(this.options.taskItem)),this.options.taskList!==!1&&t.push(K8.configure(this.options.taskList)),t}});function bX(t={}){return new pt({view(e){return new yX(e,t)}})}class yX{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.lastDragEvent=null,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let s=a=>{this[i](a)};return e.dom.addEventListener(i,s),{name:i,handler:s}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){if(this.cursorPos!=null&&n.doc!=e.state.doc)if(this.lastDragEvent){let r=this.computeTarget(this.lastDragEvent);r==this.cursorPos?this.updateOverlay():this.setCursor(r)}else this.updateOverlay()}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r,i=this.editorView.dom,s=i.getBoundingClientRect(),a=s.width/i.offsetWidth,u=s.height/i.offsetHeight;if(n){let m=e.nodeBefore,g=e.nodeAfter;if(m||g){let b=this.editorView.nodeDOM(this.cursorPos-(m?m.nodeSize:0));if(b){let x=b.getBoundingClientRect(),k=m?x.bottom:x.top;m&&g&&(k=(k+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let E=this.width/2*u;r={left:x.left,right:x.right,top:k-E,bottom:k+E}}}}if(!r){let m=this.editorView.coordsAtPos(this.cursorPos),g=this.width/2*a;r={left:m.left-g,right:m.left+g,top:m.top,bottom:m.bottom}}let c=this.editorView.dom.offsetParent;this.element||(this.element=c.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let f,h;if(!c||c==document.body&&getComputedStyle(c).position=="static")f=-pageXOffset,h=-pageYOffset;else{let m=c.getBoundingClientRect(),g=m.width/c.offsetWidth,b=m.height/c.offsetHeight;f=m.left-c.scrollLeft*g,h=m.top-c.scrollTop*b}this.element.style.left=(r.left-f)/a+"px",this.element.style.top=(r.top-h)/u+"px",this.element.style.width=(r.right-r.left)/a+"px",this.element.style.height=(r.bottom-r.top)/u+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}computeTarget(e){let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),i=r&&r.type.spec.disableDropCursor,s=typeof i=="function"?i(this.editorView,n,e):i;if(!n||s)return null;let a=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let u=_7(this.editorView.state.doc,a,this.editorView.dragging.slice);u!=null&&(a=u)}return a}dragover(e){if(!this.editorView.editable)return;this.lastDragEvent=e;let n=this.computeTarget(e);n!=null&&(this.setCursor(n),this.scheduleRemoval(5e3))}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class Ct extends Ne{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return Ct.valid(r)?new Ct(r):Ne.near(r)}content(){return pe.empty}eq(e){return e instanceof Ct&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new Ct(e.resolve(n.pos))}getBookmark(){return new qx(this.anchor)}static valid(e){let n=e.parent;if(n.inlineContent||!xX(e)||!vX(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let i=n.contentMatchAt(e.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&Ct.valid(e))return e;let i=e.pos,s=null;for(let a=e.depth;;a--){let u=e.node(a);if(n>0?e.indexAfter(a)<u.childCount:e.index(a)>0){s=u.child(n>0?e.indexAfter(a):e.index(a)-1);break}else if(a==0)return null;i+=n;let c=e.doc.resolve(i);if(Ct.valid(c))return c}for(;;){let a=n>0?s.firstChild:s.lastChild;if(!a){if(s.isAtom&&!s.isText&&!ke.isSelectable(s)){e=e.doc.resolve(i+s.nodeSize*n),r=!1;continue e}break}s=a,i+=n;let u=e.doc.resolve(i);if(Ct.valid(u))return u}return null}}}Ct.prototype.visible=!1;Ct.findFrom=Ct.findGapCursorFrom;Ne.jsonID("gapcursor",Ct);class qx{constructor(e){this.pos=e}map(e){return new qx(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return Ct.valid(n)?new Ct(n):Ne.near(n)}}function _8(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor}function xX(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||_8(i.type))return!0;if(i.inlineContent)return!1}}return!0}function vX(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||_8(i.type))return!0;if(i.inlineContent)return!1}}return!0}function kX(){return new pt({props:{decorations:SX,createSelectionBetween(t,e,n){return e.pos==n.pos&&Ct.valid(n)?new Ct(n):null},handleClick:EX,handleKeyDown:CX,handleDOMEvents:{beforeinput:DX}}})}const CX=qM({ArrowLeft:Ch("horiz",-1),ArrowRight:Ch("horiz",1),ArrowUp:Ch("vert",-1),ArrowDown:Ch("vert",1)});function Ch(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,i,s){let a=r.selection,u=e>0?a.$to:a.$from,c=a.empty;if(a instanceof De){if(!s.endOfTextblock(n)||u.depth==0)return!1;c=!1,u=r.doc.resolve(e>0?u.after():u.before())}let f=Ct.findGapCursorFrom(u,e,c);return f?(i&&i(r.tr.setSelection(new Ct(f))),!0):!1}}function EX(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!Ct.valid(r))return!1;let i=t.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&ke.isSelectable(t.state.doc.nodeAt(i.inside))?!1:(t.dispatch(t.state.tr.setSelection(new Ct(r))),!0)}function DX(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof Ct))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let i=ae.empty;for(let a=r.length-1;a>=0;a--)i=ae.from(r[a].createAndFill(null,i));let s=t.state.tr.replace(n.pos,n.pos,new pe(i,0,0));return s.setSelection(De.near(s.doc.resolve(n.pos+1))),t.dispatch(s),!1}function SX(t){if(!(t.selection instanceof Ct))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",lt.create(t.doc,[yn.widget(t.selection.head,e,{key:"gapcursor"})])}var Np=200,Wt=function(){};Wt.prototype.append=function(e){return e.length?(e=Wt.from(e),!this.length&&e||e.length<Np&&this.leafAppend(e)||this.length<Np&&e.leafPrepend(this)||this.appendInner(e)):this};Wt.prototype.prepend=function(e){return e.length?Wt.from(e).append(this):this};Wt.prototype.appendInner=function(e){return new wX(this,e)};Wt.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?Wt.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};Wt.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};Wt.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};Wt.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(s,a){return i.push(e(s,a))},n,r),i};Wt.from=function(e){return e instanceof Wt?e:e&&e.length?new V8(e):Wt.empty};var V8=(function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,s){return i==0&&s==this.length?this:new e(this.values.slice(i,s))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,s,a,u){for(var c=s;c<a;c++)if(i(this.values[c],u+c)===!1)return!1},e.prototype.forEachInvertedInner=function(i,s,a,u){for(var c=s-1;c>=a;c--)if(i(this.values[c],u+c)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=Np)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=Np)return new e(i.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e})(Wt);Wt.empty=new V8([]);var wX=(function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,i,s,a){var u=this.left.length;if(i<u&&this.left.forEachInner(r,i,Math.min(s,u),a)===!1||s>u&&this.right.forEachInner(r,Math.max(i-u,0),Math.min(this.length,s)-u,a+u)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,s,a){var u=this.left.length;if(i>u&&this.right.forEachInvertedInner(r,i-u,Math.max(s,u)-u,a+u)===!1||s<u&&this.left.forEachInvertedInner(r,Math.min(i,u),s,a)===!1)return!1},e.prototype.sliceInner=function(r,i){if(r==0&&i==this.length)return this;var s=this.left.length;return i<=s?this.left.slice(r,i):r>=s?this.right.slice(r-s,i-s):this.left.slice(r,s).append(this.right.slice(0,i-s))},e.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new e(i,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e})(Wt);const $X=500;class wr{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,s;n&&(i=this.remapping(r,this.items.length),s=i.maps.length);let a=e.tr,u,c,f=[],h=[];return this.items.forEach((m,g)=>{if(!m.step){i||(i=this.remapping(r,g+1),s=i.maps.length),s--,h.push(m);return}if(i){h.push(new Fr(m.map));let b=m.step.map(i.slice(s)),x;b&&a.maybeStep(b).doc&&(x=a.mapping.maps[a.mapping.maps.length-1],f.push(new Fr(x,void 0,void 0,f.length+h.length))),s--,x&&i.appendMap(x,s)}else a.maybeStep(m.step);if(m.selection)return u=i?m.selection.map(i.slice(s)):m.selection,c=new wr(this.items.slice(0,r).append(h.reverse().concat(f)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:a,selection:u}}addTransform(e,n,r,i){let s=[],a=this.eventCount,u=this.items,c=!i&&u.length?u.get(u.length-1):null;for(let h=0;h<e.steps.length;h++){let m=e.steps[h].invert(e.docs[h]),g=new Fr(e.mapping.maps[h],m,n),b;(b=c&&c.merge(g))&&(g=b,h?s.pop():u=u.slice(0,u.length-1)),s.push(g),n&&(a++,n=void 0),i||(c=g)}let f=a-r.depth;return f>AX&&(u=TX(u,f),a-=f),new wr(u.append(s),a)}remapping(e,n){let r=new ed;return this.items.forEach((i,s)=>{let a=i.mirrorOffset!=null&&s-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,a)},e,n),r}addMaps(e){return this.eventCount==0?this:new wr(this.items.append(e.map(n=>new Fr(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),s=e.mapping,a=e.steps.length,u=this.eventCount;this.items.forEach(g=>{g.selection&&u--},i);let c=n;this.items.forEach(g=>{let b=s.getMirror(--c);if(b==null)return;a=Math.min(a,b);let x=s.maps[b];if(g.step){let k=e.steps[b].invert(e.docs[b]),E=g.selection&&g.selection.map(s.slice(c+1,b));E&&u++,r.push(new Fr(x,k,E))}else r.push(new Fr(x))},i);let f=[];for(let g=n;g<a;g++)f.push(new Fr(s.maps[g]));let h=this.items.slice(0,i).append(f).append(r),m=new wr(h,u);return m.emptyItemCount()>$X&&(m=m.compress(this.items.length-r.length)),m}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,i=[],s=0;return this.items.forEach((a,u)=>{if(u>=e)i.push(a),a.selection&&s++;else if(a.step){let c=a.step.map(n.slice(r)),f=c&&c.getMap();if(r--,f&&n.appendMap(f,r),c){let h=a.selection&&a.selection.map(n.slice(r));h&&s++;let m=new Fr(f.invert(),c,h),g,b=i.length-1;(g=i.length&&i[b].merge(m))?i[b]=g:i.push(m)}}else a.map&&r--},this.items.length,0),new wr(Wt.from(i.reverse()),s)}}wr.empty=new wr(Wt.empty,0);function TX(t,e){let n;return t.forEach((r,i)=>{if(r.selection&&e--==0)return n=i,!1}),t.slice(n)}class Fr{constructor(e,n,r,i){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new Fr(n.getMap().invert(),n,this.selection)}}}class Es{constructor(e,n,r,i,s){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=s}}const AX=20;function BX(t,e,n,r){let i=n.getMeta(Xo),s;if(i)return i.historyState;n.getMeta(RX)&&(t=new Es(t.done,t.undone,null,0,-1));let a=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(a&&a.getMeta(Xo))return a.getMeta(Xo).redo?new Es(t.done.addTransform(n,void 0,r,Hh(e)),t.undone,HD(n.mapping.maps),t.prevTime,t.prevComposition):new Es(t.done,t.undone.addTransform(n,void 0,r,Hh(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(a&&a.getMeta("addToHistory")===!1)){let u=n.getMeta("composition"),c=t.prevTime==0||!a&&t.prevComposition!=u&&(t.prevTime<(n.time||0)-r.newGroupDelay||!MX(n,t.prevRanges)),f=a?by(t.prevRanges,n.mapping):HD(n.mapping.maps);return new Es(t.done.addTransform(n,c?e.selection.getBookmark():void 0,r,Hh(e)),wr.empty,f,n.time,u??t.prevComposition)}else return(s=n.getMeta("rebased"))?new Es(t.done.rebased(n,s),t.undone.rebased(n,s),by(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new Es(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),by(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function MX(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,i)=>{for(let s=0;s<e.length;s+=2)r<=e[s+1]&&i>=e[s]&&(n=!0)}),n}function HD(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,i,s,a)=>e.push(s,a));return e}function by(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let i=e.map(t[r],1),s=e.map(t[r+1],-1);i<=s&&n.push(i,s)}return n}function NX(t,e,n){let r=Hh(e),i=Xo.get(e).spec.config,s=(n?t.undone:t.done).popEvent(e,r);if(!s)return null;let a=s.selection.resolve(s.transform.doc),u=(n?t.done:t.undone).addTransform(s.transform,e.selection.getBookmark(),i,r),c=new Es(n?u:s.remaining,n?s.remaining:u,null,0,-1);return s.transform.setSelection(a).setMeta(Xo,{redo:n,historyState:c})}let yy=!1,UD=null;function Hh(t){let e=t.plugins;if(UD!=e){yy=!1,UD=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){yy=!0;break}}return yy}const Xo=new Vt("history"),RX=new Vt("closeHistory");function OX(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new pt({key:Xo,state:{init(){return new Es(wr.empty,wr.empty,null,0,-1)},apply(e,n,r){return BX(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,i=r=="historyUndo"?U8:r=="historyRedo"?q8:null;return!i||!e.editable?!1:(n.preventDefault(),i(e.state,e.dispatch))}}}})}function H8(t,e){return(n,r)=>{let i=Xo.getState(n);if(!i||(t?i.undone:i.done).eventCount==0)return!1;if(r){let s=NX(i,n,t);s&&r(e?s.scrollIntoView():s)}return!0}}const U8=H8(!1,!0),q8=H8(!0,!0);mt.create({name:"characterCount",addOptions(){return{limit:null,autoTrim:!0,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=t=>{const e=t?.node||this.editor.state.doc;if((t?.mode||this.options.mode)==="textSize"){const r=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(r)}return e.nodeSize},this.storage.words=t=>{const e=t?.node||this.editor.state.doc,n=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let t=!1;return[new pt({key:new Vt("characterCount"),appendTransaction:(e,n,r)=>{if(t)return;const i=this.options.limit,s=this.options.autoTrim;if(i==null||i===0||s===!1){t=!0;return}const a=this.storage.characters({node:r.doc});if(a>i){const u=a-i,c=0,f=u;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);const h=r.tr.deleteRange(c,f);return t=!0,h}t=!0},filterTransaction:(e,n)=>{const r=this.options.limit;if(!e.docChanged||r===0||r===null||r===void 0)return!0;const i=this.storage.characters({node:n.doc}),s=this.storage.characters({node:e.doc});if(s<=r||i>r&&s>r&&s<=i)return!0;if(i>r&&s>r&&s>i||!e.getMeta("paste"))return!1;const u=e.selection.$head.pos,c=s-r,f=u-c,h=u;return e.deleteRange(f,h),!(this.storage.characters({node:e.doc})>r)}})]}});var PX=mt.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[bX(this.options)]}});mt.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new pt({key:new Vt("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:i}=e,s=[];if(!n||!r)return lt.create(t,[]);let a=0;this.options.mode==="deepest"&&t.descendants((c,f)=>{if(c.isText)return;if(!(i>=f&&i<=f+c.nodeSize-1))return!1;a+=1});let u=0;return t.descendants((c,f)=>{if(c.isText||!(i>=f&&i<=f+c.nodeSize-1))return!1;if(u+=1,this.options.mode==="deepest"&&a-u>0||this.options.mode==="shallowest"&&u>1)return this.options.mode==="deepest";s.push(yn.node(f,f+c.nodeSize,{class:this.options.className}))}),lt.create(t,s)}}})]}});var zX=mt.create({name:"gapCursor",addProseMirrorPlugins(){return[kX()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=We(ye(t,"allowGapCursor",n)))!=null?e:null}}}),G8="placeholder",qD=new Vt("tiptap__placeholder");function W8(t){const{editor:e,placeholder:n,dataAttribute:r,pos:i,node:s,isEmptyDoc:a,hasAnchor:u,classes:{emptyNode:c,emptyEditor:f}}=t,h=[c];return a&&h.push(f),yn.node(i,i+s.nodeSize,{class:h.join(" "),[r]:typeof n=="function"?n({editor:e,node:s,pos:i,hasAnchor:u}):n})}function Q8(t,e){return typeof t=="function"?t(e):t}function Y8({editor:t,options:e,dataAttribute:n,doc:r,selection:i,from:s,to:a}){const{anchor:u}=i,c=[],f=t.isEmpty;return r.nodesBetween(s,a,(h,m)=>{const g=u>=m&&u<=m+h.nodeSize,b=!h.isLeaf&&Td(h);return h.type.isTextblock&&(g||!e.showOnlyCurrent)&&b&&c.push(W8({editor:t,isEmptyDoc:f,dataAttribute:n,hasAnchor:g,placeholder:e.placeholder,classes:{emptyEditor:e.emptyEditorClass,emptyNode:Q8(e.emptyNodeClass,{editor:t,node:h,pos:m,hasAnchor:g})},node:h,pos:m})),e.includeChildren}),c}function X8({editor:t,options:e,dataAttribute:n,doc:r,selection:i}){if(!(t.isEditable||!e.showOnlyWhenEditable))return null;const{anchor:a}=i,u=[],c=t.isEmpty;if(e.showOnlyCurrent&&!e.includeChildren){const h=r.resolve(a),m=h.depth>0?h.node(1):h.nodeAfter,g=h.depth>0?h.before(1):a;if(m&&m.type.isTextblock&&Td(m)){const b=a>=g&&a<=g+m.nodeSize;u.push(W8({editor:t,isEmptyDoc:c,dataAttribute:n,hasAnchor:b,placeholder:e.placeholder,classes:{emptyEditor:e.emptyEditorClass,emptyNode:Q8(e.emptyNodeClass,{editor:t,node:m,pos:g,hasAnchor:b})},node:m,pos:g}))}}else u.push(...Y8({editor:t,options:e,dataAttribute:n,doc:r,selection:i,from:0,to:r.content.size}));return lt.create(r,u)}function Tc(t,e){var n;const r=t.resolve(e);if(r.depth===0){const a=(n=r.nodeAfter)!=null?n:r.nodeBefore;if(!a)return{from:e,to:e};const u=r.nodeAfter?e:e-a.nodeSize;return{from:u,to:u+a.nodeSize}}const i=r.before(1),s=r.node(1);return{from:i,to:i+s.nodeSize}}function Ac(t,e){return{from:Math.max(0,e.from-1),to:Math.min(t.content.size,e.to-1)}}function LX(t,e,n){const r=[];return t.forEach((i,s)=>{const a=s,u=a+i.nodeSize,c=a+1,f=u+1;c<n&&f>e&&r.push({from:a,to:u})}),r}function IX(t){if(t.length===0)return[];const e=[...t].sort((r,i)=>r.from-i.from),n=[{...e[0]}];for(let r=1;r<e.length;r+=1){const i=n[n.length-1],s=e[r];s.from<=i.to?i.to=Math.max(i.to,s.to):n.push({...s})}return n}function jX(t,e){const n=LX(t,e.from,e.to);return n.push(Ac(t,Tc(t,e.from))),e.to>e.from?n.push(Ac(t,Tc(t,Math.min(e.to,t.content.size+1)-1))):e.from<t.content.size+1&&n.push(Ac(t,Tc(t,Math.min(e.from+1,t.content.size)))),n}function FX(t,e,n){const r=[];if(t.docChanged){const i=Lx(t);for(const s of i)r.push(...jX(n.doc,s.newRange))}return t.selectionSet&&(r.push(Ac(n.doc,Tc(n.doc,t.mapping.map(e.selection.anchor)))),r.push(Ac(n.doc,Tc(n.doc,n.selection.anchor)))),IX(r)}function KX(t,e,n){const r=Math.max(0,Math.min(t,n.content.size)),i=Math.max(r,Math.min(e,n.content.size));return{from:r,to:i}}function _X({decorations:t,ranges:e,editor:n,options:r,dataAttribute:i,doc:s,selection:a}){let u=t;for(const c of e){const{from:f,to:h}=KX(c.from,c.to,s),m=u.find(f,h).filter(b=>b.from>=f&&b.to<=h);m.length&&(u=u.remove(m));const g=Y8({editor:n,options:r,dataAttribute:i,doc:s,selection:a,from:f,to:h});g.length&&(u=u.add(s,g))}return u}function VX({editor:t,options:e,dataAttribute:n}){return{init(r,i){const s=X8({editor:t,options:e,dataAttribute:n,doc:i.doc,selection:i.selection});return s??lt.empty},apply(r,i,s,a){if(!r.docChanged&&!r.selectionSet)return i;const u=i.map(r.mapping,r.doc),c=FX(r,s,a);return _X({decorations:u,ranges:c,editor:t,options:e,dataAttribute:n,doc:a.doc,selection:a.selection})}}}function HX(t){return t.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}function UX({editor:t,options:e}){const n=e.dataAttribute?`data-${HX(e.dataAttribute)}`:`data-${G8}`,r=e.showOnlyCurrent&&!e.includeChildren;return new pt({key:qD,...r?{}:{state:VX({editor:t,options:e,dataAttribute:n})},props:{decorations:r?({doc:i,selection:s})=>X8({editor:t,options:e,dataAttribute:n,doc:i,selection:s}):i=>{var s;return e.showOnlyWhenEditable&&!t.isEditable?lt.empty:(s=qD.getState(i))!=null?s:lt.empty}}})}var qX=mt.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:G8,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[UX({editor:this.editor,options:this.options})]}});function W4(t,e){return!t.selection.empty&&!l8(t.selection)&&e.isEditable}function GX(t,e){return W4(t,e)&&!e.isFocused&&!e.view.dragging}function WX(){var t;(t=window.getSelection())==null||t.removeAllRanges()}function QX(t){t.focus()}mt.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:t,options:e}=this;return[new pt({key:new Vt("selection"),props:{decorations(n){return GX(n,t)?lt.create(n.doc,[yn.inline(n.selection.from,n.selection.to,{class:e.className})]):null},handleDOMEvents:{blur(n){return W4(n.state,t)&&WX(),!1},focus(n){return W4(n.state,t)&&requestAnimationFrame(()=>{!t.isDestroyed&&n.hasFocus()&&QX(n)}),!1}}}})]}});var YX="skipTrailingNode";function GD({types:t,node:e}){return e&&Array.isArray(t)&&t.includes(e.type)||e?.type===t}var XX=mt.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var t;const e=new Vt(this.name),n=this.options.node||((t=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:t.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,i])=>i).filter(i=>(this.options.notAfter||[]).concat(n).includes(i.name));return[new pt({key:e,appendTransaction:(i,s,a)=>{const{doc:u,tr:c,schema:f}=a,h=e.getState(a),m=u.content.size,g=f.nodes[n];if(!i.some(b=>b.getMeta(YX))&&h)return c.insert(m,g.create())},state:{init:(i,s)=>{const a=s.tr.doc.lastChild;return!GD({node:a,types:r})},apply:(i,s)=>{if(!i.docChanged||i.getMeta("__uniqueIDTransaction"))return s;const a=i.doc.lastChild;return!GD({node:a,types:r})}}})]}}),JX=mt.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>U8(t,e),redo:()=>({state:t,dispatch:e})=>q8(t,e)}},addProseMirrorPlugins(){return[OX(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}});function Gx(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var va=Gx();function J8(t){va=t}var Mo={exec:()=>null};function He(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(i,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(xn.caret,"$1"),n=n.replace(i,a),r},getRegex:()=>new RegExp(n,e)};return r}var ZX=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),xn={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}>`)},eJ=/^(?:[ \t]*(?:\n|$))+/,tJ=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,nJ=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Bd=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,rJ=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Wx=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Z8=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,eN=He(Z8).replace(/bull/g,Wx).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),iJ=He(Z8).replace(/bull/g,Wx).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Qx=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,sJ=/^[^\n]+/,Yx=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,oJ=He(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Yx).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),aJ=He(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Wx).getRegex(),Xm="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Xx=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,lJ=He("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Xx).replace("tag",Xm).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),tN=He(Qx).replace("hr",Bd).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Xm).getRegex(),uJ=He(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",tN).getRegex(),Jx={blockquote:uJ,code:tJ,def:oJ,fences:nJ,heading:rJ,hr:Bd,html:lJ,lheading:eN,list:aJ,newline:eJ,paragraph:tN,table:Mo,text:sJ},WD=He("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Bd).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Xm).getRegex(),cJ={...Jx,lheading:iJ,table:WD,paragraph:He(Qx).replace("hr",Bd).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",WD).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Xm).getRegex()},dJ={...Jx,html:He(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Xx).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Mo,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:He(Qx).replace("hr",Bd).replace("heading",` *#{1,6} *[^
|
|
136
|
+
]`).replace("lheading",eN).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},fJ=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,hJ=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,nN=/^( {2,}|\\)\n(?!\s*$)/,pJ=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Yl=/[\p{P}\p{S}]/u,Jm=/[\s\p{P}\p{S}]/u,Zx=/[^\s\p{P}\p{S}]/u,mJ=He(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Jm).getRegex(),rN=/(?!~)[\p{P}\p{S}]/u,gJ=/(?!~)[\s\p{P}\p{S}]/u,bJ=/(?:[^\s\p{P}\p{S}]|~)/u,yJ=He(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",ZX?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),iN=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,xJ=He(iN,"u").replace(/punct/g,Yl).getRegex(),vJ=He(iN,"u").replace(/punct/g,rN).getRegex(),sN="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",kJ=He(sN,"gu").replace(/notPunctSpace/g,Zx).replace(/punctSpace/g,Jm).replace(/punct/g,Yl).getRegex(),CJ=He(sN,"gu").replace(/notPunctSpace/g,bJ).replace(/punctSpace/g,gJ).replace(/punct/g,rN).getRegex(),EJ=He("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Zx).replace(/punctSpace/g,Jm).replace(/punct/g,Yl).getRegex(),DJ=He(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Yl).getRegex(),SJ="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",wJ=He(SJ,"gu").replace(/notPunctSpace/g,Zx).replace(/punctSpace/g,Jm).replace(/punct/g,Yl).getRegex(),$J=He(/\\(punct)/,"gu").replace(/punct/g,Yl).getRegex(),TJ=He(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),AJ=He(Xx).replace("(?:-->|$)","-->").getRegex(),BJ=He("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",AJ).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Rp=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,MJ=He(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Rp).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),oN=He(/^!?\[(label)\]\[(ref)\]/).replace("label",Rp).replace("ref",Yx).getRegex(),aN=He(/^!?\[(ref)\](?:\[\])?/).replace("ref",Yx).getRegex(),NJ=He("reflink|nolink(?!\\()","g").replace("reflink",oN).replace("nolink",aN).getRegex(),QD=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,e1={_backpedal:Mo,anyPunctuation:$J,autolink:TJ,blockSkip:yJ,br:nN,code:hJ,del:Mo,delLDelim:Mo,delRDelim:Mo,emStrongLDelim:xJ,emStrongRDelimAst:kJ,emStrongRDelimUnd:EJ,escape:fJ,link:MJ,nolink:aN,punctuation:mJ,reflink:oN,reflinkSearch:NJ,tag:BJ,text:pJ,url:Mo},RJ={...e1,link:He(/^!?\[(label)\]\((.*?)\)/).replace("label",Rp).getRegex(),reflink:He(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Rp).getRegex()},Q4={...e1,emStrongRDelimAst:CJ,emStrongLDelim:vJ,delLDelim:DJ,delRDelim:wJ,url:He(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",QD).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:He(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",QD).getRegex()},OJ={...Q4,br:He(nN).replace("{2,}","*").getRegex(),text:He(Q4.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Eh={normal:Jx,gfm:cJ,pedantic:dJ},tc={normal:e1,gfm:Q4,breaks:OJ,pedantic:RJ},PJ={"&":"&","<":"<",">":">",'"':""","'":"'"},YD=t=>PJ[t];function jr(t,e){if(e){if(xn.escapeTest.test(t))return t.replace(xn.escapeReplace,YD)}else if(xn.escapeTestNoEncode.test(t))return t.replace(xn.escapeReplaceNoEncode,YD);return t}function XD(t){try{t=encodeURI(t).replace(xn.percentDecode,"%")}catch{return null}return t}function JD(t,e){let n=t.replace(xn.findPipe,(s,a,u)=>{let c=!1,f=a;for(;--f>=0&&u[f]==="\\";)c=!c;return c?"|":" |"}),r=n.split(xn.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(xn.slashPipe,"|");return r}function nc(t,e,n){let r=t.length;if(r===0)return"";let i=0;for(;i<r&&t.charAt(r-i-1)===e;)i++;return t.slice(0,r-i)}function zJ(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}function LJ(t,e=0){let n=e,r="";for(let i of t)if(i===" "){let s=4-n%4;r+=" ".repeat(s),n+=s}else r+=i,n++;return r}function ZD(t,e,n,r,i){let s=e.href,a=e.title||null,u=t[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let c={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:s,title:a,text:u,tokens:r.inlineTokens(u)};return r.state.inLink=!1,c}function IJ(t,e,n){let r=t.match(n.other.indentCodeCompensation);if(r===null)return e;let i=r[1];return e.split(`
|
|
137
|
+
`).map(s=>{let a=s.match(n.other.beginningSpace);if(a===null)return s;let[u]=a;return u.length>=i.length?s.slice(i.length):s}).join(`
|
|
138
|
+
`)}var Op=class{options;rules;lexer;constructor(t){this.options=t||va}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:nc(n,`
|
|
139
|
+
`)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],r=IJ(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){let r=nc(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:nc(e[0],`
|
|
140
|
+
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=nc(e[0],`
|
|
141
|
+
`).split(`
|
|
142
|
+
`),r="",i="",s=[];for(;n.length>0;){let a=!1,u=[],c;for(c=0;c<n.length;c++)if(this.rules.other.blockquoteStart.test(n[c]))u.push(n[c]),a=!0;else if(!a)u.push(n[c]);else break;n=n.slice(c);let f=u.join(`
|
|
143
|
+
`),h=f.replace(this.rules.other.blockquoteSetextReplace,`
|
|
144
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
|
|
145
|
+
${f}`:f,i=i?`${i}
|
|
146
|
+
${h}`:h;let m=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,s,!0),this.lexer.state.top=m,n.length===0)break;let g=s.at(-1);if(g?.type==="code")break;if(g?.type==="blockquote"){let b=g,x=b.raw+`
|
|
147
|
+
`+n.join(`
|
|
148
|
+
`),k=this.blockquote(x);s[s.length-1]=k,r=r.substring(0,r.length-b.raw.length)+k.raw,i=i.substring(0,i.length-b.text.length)+k.text;break}else if(g?.type==="list"){let b=g,x=b.raw+`
|
|
149
|
+
`+n.join(`
|
|
150
|
+
`),k=this.list(x);s[s.length-1]=k,r=r.substring(0,r.length-g.raw.length)+k.raw,i=i.substring(0,i.length-b.raw.length)+k.raw,n=x.substring(s.at(-1).raw.length).split(`
|
|
151
|
+
`);continue}}return{type:"blockquote",raw:r,tokens:s,text:i}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),r=n.length>1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let s=this.rules.other.listItemRegex(n),a=!1;for(;t;){let c=!1,f="",h="";if(!(e=s.exec(t))||this.rules.block.hr.test(t))break;f=e[0],t=t.substring(f.length);let m=LJ(e[2].split(`
|
|
152
|
+
`,1)[0],e[1].length),g=t.split(`
|
|
153
|
+
`,1)[0],b=!m.trim(),x=0;if(this.options.pedantic?(x=2,h=m.trimStart()):b?x=e[1].length+1:(x=m.search(this.rules.other.nonSpaceChar),x=x>4?1:x,h=m.slice(x),x+=e[1].length),b&&this.rules.other.blankLine.test(g)&&(f+=g+`
|
|
154
|
+
`,t=t.substring(g.length+1),c=!0),!c){let k=this.rules.other.nextBulletRegex(x),E=this.rules.other.hrRegex(x),D=this.rules.other.fencesBeginRegex(x),T=this.rules.other.headingBeginRegex(x),$=this.rules.other.htmlBeginRegex(x),A=this.rules.other.blockquoteBeginRegex(x);for(;t;){let B=t.split(`
|
|
155
|
+
`,1)[0],R;if(g=B,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),R=g):R=g.replace(this.rules.other.tabCharGlobal," "),D.test(g)||T.test(g)||$.test(g)||A.test(g)||k.test(g)||E.test(g))break;if(R.search(this.rules.other.nonSpaceChar)>=x||!g.trim())h+=`
|
|
156
|
+
`+R.slice(x);else{if(b||m.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||D.test(m)||T.test(m)||E.test(m))break;h+=`
|
|
157
|
+
`+g}b=!g.trim(),f+=B+`
|
|
158
|
+
`,t=t.substring(B.length+1),m=R.slice(x)}}i.loose||(a?i.loose=!0:this.rules.other.doubleBlankLine.test(f)&&(a=!0)),i.items.push({type:"list_item",raw:f,task:!!this.options.gfm&&this.rules.other.listIsTask.test(h),loose:!1,text:h,tokens:[]}),i.raw+=f}let u=i.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let c of i.items){if(this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]),c.task){if(c.text=c.text.replace(this.rules.other.listReplaceTask,""),c.tokens[0]?.type==="text"||c.tokens[0]?.type==="paragraph"){c.tokens[0].raw=c.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),c.tokens[0].text=c.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let h=this.lexer.inlineQueue.length-1;h>=0;h--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)){this.lexer.inlineQueue[h].src=this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask,"");break}}let f=this.rules.other.listTaskCheckbox.exec(c.raw);if(f){let h={type:"checkbox",raw:f[0]+" ",checked:f[0]!=="[ ]"};c.checked=h.checked,i.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=h.raw+c.tokens[0].raw,c.tokens[0].text=h.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(h)):c.tokens.unshift({type:"paragraph",raw:h.raw,text:h.raw,tokens:[h]}):c.tokens.unshift(h)}}if(!i.loose){let f=c.tokens.filter(m=>m.type==="space"),h=f.length>0&&f.some(m=>this.rules.other.anyLine.test(m.raw));i.loose=h}}if(i.loose)for(let c of i.items){c.loose=!0;for(let f of c.tokens)f.type==="text"&&(f.type="paragraph")}return i}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let n=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:e[0],href:r,title:i}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=JD(e[1]),r=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
159
|
+
`):[],s={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let a of r)this.rules.other.tableAlignRight.test(a)?s.align.push("right"):this.rules.other.tableAlignCenter.test(a)?s.align.push("center"):this.rules.other.tableAlignLeft.test(a)?s.align.push("left"):s.align.push(null);for(let a=0;a<n.length;a++)s.header.push({text:n[a],tokens:this.lexer.inline(n[a]),header:!0,align:s.align[a]});for(let a of i)s.rows.push(JD(a,s.header.length).map((u,c)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:s.align[c]})));return s}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e){let n=e[1].trim();return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let n=e[1].charAt(e[1].length-1)===`
|
|
160
|
+
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let s=nc(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{let s=zJ(e[2],"()");if(s===-2)return;if(s>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+s;e[2]=e[2].substring(0,s),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(r);s&&(r=s[1],i=s[3])}else i=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),ZD(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[r.toLowerCase()];if(!i){let s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return ZD(n,i,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let r=this.rules.inline.emStrongLDelim.exec(t);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,s,a,u=i,c=0,f=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,e=e.slice(-1*t.length+i);(r=f.exec(e))!==null;){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s)continue;if(a=[...s].length,r[3]||r[4]){u+=a;continue}else if((r[5]||r[6])&&i%3&&!((i+a)%3)){c+=a;continue}if(u-=a,u>0)continue;a=Math.min(a,a+u+c);let h=[...r[0]][0].length,m=t.slice(0,i+r.index+h+a);if(Math.min(i,a)%2){let b=m.slice(1,-1);return{type:"em",raw:m,text:b,tokens:this.lexer.inlineTokens(b)}}let g=m.slice(2,-2);return{type:"strong",raw:m,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&i&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t,e,n=""){let r=this.rules.inline.delLDelim.exec(t);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,s,a,u=i,c=this.rules.inline.delRDelim;for(c.lastIndex=0,e=e.slice(-1*t.length+i);(r=c.exec(e))!==null;){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s||(a=[...s].length,a!==i))continue;if(r[3]||r[4]){u+=a;continue}if(u-=a,u>0)continue;a=Math.min(a,a+u);let f=[...r[0]][0].length,h=t.slice(0,i+r.index+f+a),m=h.slice(i,-i);return{type:"del",raw:h,text:m,tokens:this.lexer.inlineTokens(m)}}}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let n,r;return e[2]==="@"?(n=e[1],r="mailto:"+n):(n=e[1],r=n),{type:"link",raw:e[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let n,r;if(e[2]==="@")n=e[0],r="mailto:"+n;else{let i;do i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(i!==e[0]);n=e[0],e[1]==="www."?r="http://"+e[0]:r=e[0]}return{type:"link",raw:e[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:n}}}},Er=class Y4{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||va,this.options.tokenizer=this.options.tokenizer||new Op,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:xn,block:Eh.normal,inline:tc.normal};this.options.pedantic?(n.block=Eh.pedantic,n.inline=tc.pedantic):this.options.gfm&&(n.block=Eh.gfm,this.options.breaks?n.inline=tc.breaks:n.inline=tc.gfm),this.tokenizer.rules=n}static get rules(){return{block:Eh,inline:tc}}static lex(e,n){return new Y4(n).lex(e)}static lexInline(e,n){return new Y4(n).inlineTokens(e)}lex(e){e=e.replace(xn.carriageReturn,`
|
|
161
|
+
`),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],r=!1){for(this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(xn.tabCharGlobal," ").replace(xn.spaceLine,""));e;){let i;if(this.options.extensions?.block?.some(a=>(i=a.call({lexer:this},e,n))?(e=e.substring(i.raw.length),n.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let a=n.at(-1);i.raw.length===1&&a!==void 0?a.raw+=`
|
|
162
|
+
`:n.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let a=n.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
163
|
+
`)?"":`
|
|
164
|
+
`)+i.raw,a.text+=`
|
|
165
|
+
`+i.text,this.inlineQueue.at(-1).src=a.text):n.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let a=n.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
166
|
+
`)?"":`
|
|
167
|
+
`)+i.raw,a.text+=`
|
|
168
|
+
`+i.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},n.push(i));continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),n.push(i);continue}let s=e;if(this.options.extensions?.startBlock){let a=1/0,u=e.slice(1),c;this.options.extensions.startBlock.forEach(f=>{c=f.call({lexer:this},u),typeof c=="number"&&c>=0&&(a=Math.min(a,c))}),a<1/0&&a>=0&&(s=e.substring(0,a+1))}if(this.state.top&&(i=this.tokenizer.paragraph(s))){let a=n.at(-1);r&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
|
|
169
|
+
`)?"":`
|
|
170
|
+
`)+i.raw,a.text+=`
|
|
171
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(i),r=s.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let a=n.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
172
|
+
`)?"":`
|
|
173
|
+
`)+i.raw,a.text+=`
|
|
174
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(i);continue}if(e){let a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){this.tokenizer.lexer=this;let r=e,i=null;if(this.tokens.links){let c=Object.keys(this.tokens.links);if(c.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!==null;)c.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(r))!==null;)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!==null;)s=i[2]?i[2].length:0,r=r.slice(0,i.index+s)+"["+"a".repeat(i[0].length-s-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let a=!1,u="";for(;e;){a||(u=""),a=!1;let c;if(this.options.extensions?.inline?.some(h=>(c=h.call({lexer:this},e,n))?(e=e.substring(c.raw.length),n.push(c),!0):!1))continue;if(c=this.tokenizer.escape(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.tag(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.link(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(c.raw.length);let h=n.at(-1);c.type==="text"&&h?.type==="text"?(h.raw+=c.raw,h.text+=c.text):n.push(c);continue}if(c=this.tokenizer.emStrong(e,r,u)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.codespan(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.br(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.del(e,r,u)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.autolink(e)){e=e.substring(c.raw.length),n.push(c);continue}if(!this.state.inLink&&(c=this.tokenizer.url(e))){e=e.substring(c.raw.length),n.push(c);continue}let f=e;if(this.options.extensions?.startInline){let h=1/0,m=e.slice(1),g;this.options.extensions.startInline.forEach(b=>{g=b.call({lexer:this},m),typeof g=="number"&&g>=0&&(h=Math.min(h,g))}),h<1/0&&h>=0&&(f=e.substring(0,h+1))}if(c=this.tokenizer.inlineText(f)){e=e.substring(c.raw.length),c.raw.slice(-1)!=="_"&&(u=c.raw.slice(-1)),a=!0;let h=n.at(-1);h?.type==="text"?(h.raw+=c.raw,h.text+=c.text):n.push(c);continue}if(e){let h="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return n}},Pp=class{options;parser;constructor(t){this.options=t||va}space(t){return""}code({text:t,lang:e,escaped:n}){let r=(e||"").match(xn.notSpaceStart)?.[0],i=t.replace(xn.endingNewline,"")+`
|
|
175
|
+
`;return r?'<pre><code class="language-'+jr(r)+'">'+(n?i:jr(i,!0))+`</code></pre>
|
|
176
|
+
`:"<pre><code>"+(n?i:jr(i,!0))+`</code></pre>
|
|
177
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
178
|
+
${this.parser.parse(t)}</blockquote>
|
|
179
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
|
|
180
|
+
`}hr(t){return`<hr>
|
|
181
|
+
`}list(t){let e=t.ordered,n=t.start,r="";for(let a=0;a<t.items.length;a++){let u=t.items[a];r+=this.listitem(u)}let i=e?"ol":"ul",s=e&&n!==1?' start="'+n+'"':"";return"<"+i+s+`>
|
|
182
|
+
`+r+"</"+i+`>
|
|
183
|
+
`}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
|
|
184
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
185
|
+
`}table(t){let e="",n="";for(let i=0;i<t.header.length;i++)n+=this.tablecell(t.header[i]);e+=this.tablerow({text:n});let r="";for(let i=0;i<t.rows.length;i++){let s=t.rows[i];n="";for(let a=0;a<s.length;a++)n+=this.tablecell(s[a]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
|
|
186
|
+
<thead>
|
|
187
|
+
`+e+`</thead>
|
|
188
|
+
`+r+`</table>
|
|
189
|
+
`}tablerow({text:t}){return`<tr>
|
|
190
|
+
${t}</tr>
|
|
191
|
+
`}tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
|
|
192
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${jr(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:n}){let r=this.parser.parseInline(n),i=XD(t);if(i===null)return r;t=i;let s='<a href="'+t+'"';return e&&(s+=' title="'+jr(e)+'"'),s+=">"+r+"</a>",s}image({href:t,title:e,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=XD(t);if(i===null)return jr(n);t=i;let s=`<img src="${t}" alt="${jr(n)}"`;return e&&(s+=` title="${jr(e)}"`),s+=">",s}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:jr(t.text)}},t1=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},Dr=class X4{options;renderer;textRenderer;constructor(e){this.options=e||va,this.options.renderer=this.options.renderer||new Pp,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new t1}static parse(e,n){return new X4(n).parse(e)}static parseInline(e,n){return new X4(n).parseInline(e)}parse(e){this.renderer.parser=this;let n="";for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let a=i,u=this.options.extensions.renderers[a.type].call({parser:this},a);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a.type)){n+=u||"";continue}}let s=i;switch(s.type){case"space":{n+=this.renderer.space(s);break}case"hr":{n+=this.renderer.hr(s);break}case"heading":{n+=this.renderer.heading(s);break}case"code":{n+=this.renderer.code(s);break}case"table":{n+=this.renderer.table(s);break}case"blockquote":{n+=this.renderer.blockquote(s);break}case"list":{n+=this.renderer.list(s);break}case"checkbox":{n+=this.renderer.checkbox(s);break}case"html":{n+=this.renderer.html(s);break}case"def":{n+=this.renderer.def(s);break}case"paragraph":{n+=this.renderer.paragraph(s);break}case"text":{n+=this.renderer.text(s);break}default:{let a='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}parseInline(e,n=this.renderer){this.renderer.parser=this;let r="";for(let i=0;i<e.length;i++){let s=e[i];if(this.options.extensions?.renderers?.[s.type]){let u=this.options.extensions.renderers[s.type].call({parser:this},s);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){r+=u||"";continue}}let a=s;switch(a.type){case"escape":{r+=n.text(a);break}case"html":{r+=n.html(a);break}case"link":{r+=n.link(a);break}case"image":{r+=n.image(a);break}case"checkbox":{r+=n.checkbox(a);break}case"strong":{r+=n.strong(a);break}case"em":{r+=n.em(a);break}case"codespan":{r+=n.codespan(a);break}case"br":{r+=n.br(a);break}case"del":{r+=n.del(a);break}case"text":{r+=n.text(a);break}default:{let u='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return r}},mc=class{options;block;constructor(t){this.options=t||va}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?Er.lex:Er.lexInline}provideParser(t=this.block){return t?Dr.parse:Dr.parseInline}},jJ=class{defaults=Gx();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Dr;Renderer=Pp;TextRenderer=t1;Lexer=Er;Tokenizer=Op;Hooks=mc;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(let r of t)switch(n=n.concat(e.call(this,r)),r.type){case"table":{let i=r;for(let s of i.header)n=n.concat(this.walkTokens(s.tokens,e));for(let s of i.rows)for(let a of s)n=n.concat(this.walkTokens(a.tokens,e));break}case"list":{let i=r;n=n.concat(this.walkTokens(i.items,e));break}default:{let i=r;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(s=>{let a=i[s].flat(1/0);n=n.concat(this.walkTokens(a,e))}):i.tokens&&(n=n.concat(this.walkTokens(i.tokens,e)))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let s=e.renderers[i.name];s?e.renderers[i.name]=function(...a){let u=i.renderer.apply(this,a);return u===!1&&(u=s.apply(this,a)),u}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=e[i.level];s?s.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),r.extensions=e),n.renderer){let i=this.defaults.renderer||new Pp(this.defaults);for(let s in n.renderer){if(!(s in i))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let a=s,u=n.renderer[a],c=i[a];i[a]=(...f)=>{let h=u.apply(i,f);return h===!1&&(h=c.apply(i,f)),h||""}}r.renderer=i}if(n.tokenizer){let i=this.defaults.tokenizer||new Op(this.defaults);for(let s in n.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let a=s,u=n.tokenizer[a],c=i[a];i[a]=(...f)=>{let h=u.apply(i,f);return h===!1&&(h=c.apply(i,f)),h}}r.tokenizer=i}if(n.hooks){let i=this.defaults.hooks||new mc;for(let s in n.hooks){if(!(s in i))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let a=s,u=n.hooks[a],c=i[a];mc.passThroughHooks.has(s)?i[a]=f=>{if(this.defaults.async&&mc.passThroughHooksRespectAsync.has(s))return(async()=>{let m=await u.call(i,f);return c.call(i,m)})();let h=u.call(i,f);return c.call(i,h)}:i[a]=(...f)=>{if(this.defaults.async)return(async()=>{let m=await u.apply(i,f);return m===!1&&(m=await c.apply(i,f)),m})();let h=u.apply(i,f);return h===!1&&(h=c.apply(i,f)),h}}r.hooks=i}if(n.walkTokens){let i=this.defaults.walkTokens,s=n.walkTokens;r.walkTokens=function(a){let u=[];return u.push(s.call(this,a)),i&&(u=u.concat(i.call(this,a))),u}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Er.lex(t,e??this.defaults)}parser(t,e){return Dr.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let r={...n},i={...this.defaults,...r},s=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=t),i.async)return(async()=>{let a=i.hooks?await i.hooks.preprocess(e):e,u=await(i.hooks?await i.hooks.provideLexer(t):t?Er.lex:Er.lexInline)(a,i),c=i.hooks?await i.hooks.processAllTokens(u):u;i.walkTokens&&await Promise.all(this.walkTokens(c,i.walkTokens));let f=await(i.hooks?await i.hooks.provideParser(t):t?Dr.parse:Dr.parseInline)(c,i);return i.hooks?await i.hooks.postprocess(f):f})().catch(s);try{i.hooks&&(e=i.hooks.preprocess(e));let a=(i.hooks?i.hooks.provideLexer(t):t?Er.lex:Er.lexInline)(e,i);i.hooks&&(a=i.hooks.processAllTokens(a)),i.walkTokens&&this.walkTokens(a,i.walkTokens);let u=(i.hooks?i.hooks.provideParser(t):t?Dr.parse:Dr.parseInline)(a,i);return i.hooks&&(u=i.hooks.postprocess(u)),u}catch(a){return s(a)}}}onError(t,e){return n=>{if(n.message+=`
|
|
193
|
+
Please report this to https://github.com/markedjs/marked.`,t){let r="<p>An error occurred:</p><pre>"+jr(n.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(n);throw n}}},aa=new jJ;function Je(t,e){return aa.parse(t,e)}Je.options=Je.setOptions=function(t){return aa.setOptions(t),Je.defaults=aa.defaults,J8(Je.defaults),Je};Je.getDefaults=Gx;Je.defaults=va;Je.use=function(...t){return aa.use(...t),Je.defaults=aa.defaults,J8(Je.defaults),Je};Je.walkTokens=function(t,e){return aa.walkTokens(t,e)};Je.parseInline=aa.parseInline;Je.Parser=Dr;Je.parser=Dr.parse;Je.Renderer=Pp;Je.TextRenderer=t1;Je.Lexer=Er;Je.lexer=Er.lex;Je.Tokenizer=Op;Je.Hooks=mc;Je.parse=Je;Je.options;Je.setOptions;Je.use;Je.walkTokens;Je.parseInline;Dr.parse;Er.lex;var FJ=/\n[^\S\n]*(?:\n[^\S\n]*)+$/;function KJ(t){return t.flatMap((e,n)=>{var r;if(e.type==="space"||((r=t[n+1])==null?void 0:r.type)==="space")return[e];const i=(e.raw||"").match(FJ);return i?[{...e,raw:(e.raw||"").slice(0,-i[0].length)},{type:"space",raw:i[0]}]:[e]})}function _J(t,e){const r=e.split(`
|
|
194
|
+
`).flatMap(i=>[i,""]).map(i=>`${t}${i}`).join(`
|
|
195
|
+
`);return r.slice(0,r.length-1)}function VJ(t,e){const n=[];return Array.from(t.entries()).forEach(([r,i])=>{if(!e){n.push(r);return}(e.marks||[]).find(a=>a.type===r&&Il(a.attrs,i.attrs))||n.push(r)}),n}function HJ(t,e){const n=[];return Array.from(e.entries()).forEach(([r,i])=>{const s=t.get(r);(!s||!Il(s.attrs,i.attrs))&&n.push({type:r,mark:i})}),n}function UJ(t,e,n,r){const i=!n,s=n&&(!n.marks||n.marks.length===0),a=n&&n.marks&&!r(e,new Map(n.marks.map(c=>[c.type,c]))),u=[];return(i||s||a)&&(n&&n.marks?Array.from(t.entries()).reverse().forEach(([c,f])=>{n.marks.find(m=>m.type===c&&Il(m.attrs,f.attrs))||u.push(c)}):(i||s)&&u.push(...Array.from(t.keys()).reverse())),u}function qJ(t,e){let n="";return Array.from(t.keys()).reverse().forEach(r=>{const i=t.get(r),s=e(r,i);s&&(n=s+n)}),t.clear(),n}function GJ(t,e,n){let r="";return Array.from(t.entries()).forEach(([i,s])=>{const a=n(i,s);a&&(r+=a),e.set(i,s)}),r}function xy(t){const n=(t.raw||t.text||"").match(/^(\s*)[-+*]\s+\[([ xX])\]\s+/);return n?{isTask:!0,checked:n[2].toLowerCase()==="x",indentLevel:n[1].length}:{isTask:!1,indentLevel:0}}function Dh(t,e){return typeof t!="string"?"json":e}var WJ=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","circle","clippath","defs","ellipse","foreignobject","g","image","line","lineargradient","mask","path","polygon","polyline","radialgradient","rect","stop","switch","symbol","textpath","tspan","use","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"]),QJ=/<\/?([a-zA-Z][\w-]*)/g;function YJ(t){const e=[];let n;for(;(n=QJ.exec(t))!==null;)e.push(n[1].toLowerCase());return e}function XJ(t){const e=t.toLowerCase();return e.includes("-")?!1:!WJ.has(e)}function JJ(t,e){return YJ(t).some(r=>XJ(r)?!e.has(r):!1)}var ZJ=class{constructor(t){this.activeParseLexer=null,this.extensionRanks=new Map,this.baseExtensions=[],this.extensions=[],this.codeTypes=new Set,this.schemaParseDomTagsCache=null,this.lastParseResult=null;var e,n,r,i,s;this.markedInstance=(e=t?.marked)!=null?e:Je,this.indentStyle=(r=(n=t?.indentation)==null?void 0:n.style)!=null?r:"space",this.indentSize=(s=(i=t?.indentation)==null?void 0:i.size)!=null?s:2,this.baseExtensions=t?.extensions||[],t?.markedOptions&&typeof this.markedInstance.setOptions=="function"&&this.markedInstance.setOptions(t.markedOptions),this.registry=new Map,this.nodeTypeRegistry=new Map,t?.extensions&&(this.baseExtensions=t.extensions,Sl(qm(t.extensions)).forEach(u=>this.registerExtension(u)))}get instance(){return this.markedInstance}get indentCharacter(){return this.indentStyle==="space"?" ":" "}get indentString(){return this.indentCharacter.repeat(this.indentSize)}hasMarked(){return!!this.markedInstance}registerExtension(t){var e,n;this.extensions.push(t);const r=We(ye(t,"code")),i=t.name;r&&this.codeTypes.add(i),this.extensionRanks.has(i)||this.extensionRanks.set(i,this.extensionRanks.size);const s=ye(t,"markdownTokenName")||i,a=ye(t,"parseMarkdown"),u=ye(t,"renderMarkdown"),c=ye(t,"markdownTokenizer"),f=(e=ye(t,"markdownOptions"))!=null?e:null,h=(n=f?.indentsContent)!=null?n:!1,m=f?.htmlReopen,g={tokenName:s,nodeName:i,parseMarkdown:a,renderMarkdown:u,isIndenting:h,htmlReopen:m,tokenizer:c};if(s&&a){const b=this.registry.get(s)||[];b.push(g),this.registry.set(s,b)}if(u){const b=this.nodeTypeRegistry.get(i)||[];b.push(g),this.nodeTypeRegistry.set(i,b)}c&&this.hasMarked()&&this.registerTokenizer(c)}createLexer(){return new this.markedInstance.Lexer(this.markedInstance.defaults)}createTokenizerHelpers(t){return{inlineTokens:e=>t.inlineTokens(e),blockTokens:e=>t.blockTokens(e)}}tokenizeInline(t){var e;return((e=this.activeParseLexer)!=null?e:this.createLexer()).inlineTokens(t)}registerTokenizer(t){if(!this.hasMarked())return;const{name:e,start:n,level:r="inline",tokenize:i}=t,s=this.createTokenizerHelpers.bind(this),a=this.createLexer.bind(this);let u;n?u=typeof n=="function"?n:f=>f.indexOf(n):u=f=>{const h=i(f,[],this.createTokenizerHelpers(this.createLexer()));return h&&h.raw?f.indexOf(h.raw):-1};const c={name:e,level:r,start:u,tokenizer(f,h){const m=this.lexer?s(this.lexer):s(a()),g=i(f,h,m);if(g&&g.type)return{...g,type:g.type||e,raw:g.raw||"",tokens:g.tokens||[]}},childTokens:[]};this.markedInstance.use({extensions:[c]})}getHandlersForToken(t){try{return this.registry.get(t)||[]}catch{return[]}}getHandlerForToken(t){const e=this.getHandlersForToken(t);if(e.length>0)return e[0];const n=this.getHandlersForNodeType(t);return n.length>0?n[0]:void 0}getHandlersForNodeType(t){try{return this.nodeTypeRegistry.get(t)||[]}catch{return[]}}serialize(t){if(!t)return"";const e=this.renderNodes(t,t);return this.isEmptyOutput(e)?"":e}isEmptyOutput(t){return!t||t.trim()===""?!0:t.replace(/ /g,"").replace(/\u00A0/g,"").trim()===""}parse(t){if(!this.hasMarked())throw new Error("No marked instance available for parsing");const e=this.activeParseLexer,n=this.createLexer();this.activeParseLexer=n;try{const r=n.lex(t);return{type:"doc",content:this.parseTokens(r,!0)}}finally{this.activeParseLexer=e}}parseTokens(t,e=!1){const n=e?KJ(t):t,r=n.reduce((a,u,c)=>(u.type!=="space"&&a.push(c),a),[]);let i=-1,s=0;return n.flatMap((a,u)=>{for(var c;s<r.length&&r[s]<u;)i=r[s],s+=1;if(e&&a.type==="space"){const h=(c=r[s])!=null?c:-1;return this.createImplicitEmptyParagraphsFromSpace(a,i,h)}const f=this.parseToken(a,e);return f===null?[]:Array.isArray(f)?f:[f]})}createImplicitEmptyParagraphsFromSpace(t,e,n){const r=this.countParagraphSeparators(t.raw||"");if(r===0)return[];const s=Math.max(r-(e===-1||n===-1?0:1),0);return Array.from({length:s},()=>({type:"paragraph",content:[]}))}countParagraphSeparators(t){return(t.replace(/\r\n/g,`
|
|
196
|
+
`).match(/\n\n/g)||[]).length}parseToken(t,e=!1){if(!t.type)return null;if(t.type==="list")return this.parseListToken(t);const n=this.getHandlersForToken(t.type),r=this.createParseHelpers();if(n.find(s=>{if(!s.parseMarkdown)return!1;const a=s.parseMarkdown(t,r),u=this.normalizeParseResult(a);return u&&(!Array.isArray(u)||u.length>0)?(this.lastParseResult=u,!0):!1})&&this.lastParseResult){const s=this.lastParseResult;return this.lastParseResult=null,s}return this.parseFallbackToken(t,e)}parseListToken(t){if(!t.items||t.items.length===0)return this.parseTokenWithHandlers(t);const e=t.items.some(u=>xy(u).isTask),n=t.items.some(u=>!xy(u).isTask);if(!e||!n||this.getHandlersForToken("taskList").length===0)return this.parseTokenWithHandlers(t);const r=[];let i=[],s=null;for(let u=0;u<t.items.length;u+=1){const c=t.items[u],{isTask:f,checked:h,indentLevel:m}=xy(c);let g=c;if(f){const k=(c.raw||c.text||"").split(`
|
|
197
|
+
`),E=k[0].match(/^\s*[-+*]\s+\[([ xX])\]\s+(.*)$/),D=E?E[2]:"";let T=[];if(k.length>1&&k.slice(1).join(`
|
|
198
|
+
`).trim()){const A=k.slice(1),B=A.filter(R=>R.trim());if(B.length>0){const R=Math.min(...B.map(j=>j.length-j.trimStart().length)),O=A.map(j=>j.trim()?j.slice(R):"").join(`
|
|
199
|
+
`).trim();O&&(T=this.markedInstance.lexer(`${O}
|
|
200
|
+
`))}}g={type:"taskItem",raw:"",mainContent:D,indentLevel:m,checked:h??!1,text:D,tokens:this.tokenizeInline(D),nestedTokens:T}}const b=f?"taskList":"list";s!==b?(i.length>0&&r.push({type:s,items:i}),i=[g],s=b):i.push(g)}i.length>0&&r.push({type:s,items:i});const a=[];for(let u=0;u<r.length;u+=1){const c=r[u],f={...t,type:c.type,items:c.items},h=this.parseToken(f);h&&(Array.isArray(h)?a.push(...h):a.push(h))}return a.length>0?a:null}parseTokenWithHandlers(t){if(!t.type)return null;const e=this.getHandlersForToken(t.type),n=this.createParseHelpers();if(e.find(i=>{if(!i.parseMarkdown)return!1;const s=i.parseMarkdown(t,n),a=this.normalizeParseResult(s);return a&&(!Array.isArray(a)||a.length>0)?(this.lastParseResult=a,!0):!1})&&this.lastParseResult){const i=this.lastParseResult;return this.lastParseResult=null,i}return this.parseFallbackToken(t)}createParseHelpers(){return{parseInline:t=>this.parseInlineTokens(t),tokenizeInline:t=>this.tokenizeInline(t),parseChildren:t=>this.parseTokens(t),parseBlockChildren:t=>this.parseTokens(t,!0),createTextNode:(t,e)=>({type:"text",text:t,marks:e||void 0}),createNode:(t,e,n)=>{const r={type:t,attrs:e||void 0,content:n||void 0};return(!e||Object.keys(e).length===0)&&delete r.attrs,r},applyMark:(t,e,n)=>({mark:t,content:e,attrs:n&&Object.keys(n).length>0?n:void 0})}}escapeRegex(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}parseInlineTokens(t){var e,n,r,i;const s=[];for(let a=0;a<t.length;a+=1){const u=t[a];if(u.type==="text")s.push({type:"text",text:LD(u.text||"")});else if(u.type==="escape")s.push({type:"text",text:u.text||""});else if(u.type==="html"){const c=((n=(e=u.raw)!=null?e:u.text)!=null?n:"").toString(),f=/^<\/[\s]*[\w-]+/i.test(c),h=c.match(/^<[\s]*([\w-]+)(\s|>|\/|$)/i);if(!f&&h&&!/\/>$/.test(c)){const g=h[1],b=this.escapeRegex(g),x=new RegExp(`^<\\/\\s*${b}\\b`,"i");let k=-1;const E=[c];for(let D=a+1;D<t.length;D+=1){const T=t[D],$=((i=(r=T.raw)!=null?r:T.text)!=null?i:"").toString();if(E.push($),T.type==="html"&&x.test($)){k=D;break}}if(k!==-1){const D=E.join(""),T={type:"html",raw:D,text:D,block:!1},$=this.parseHTMLToken(T);if($){const A=this.normalizeParseResult($);Array.isArray(A)?s.push(...A):A&&s.push(A)}a=k;continue}}const m=this.parseHTMLToken(u);if(m){const g=this.normalizeParseResult(m);Array.isArray(g)?s.push(...g):g&&s.push(g)}}else if(u.type){const c=this.getHandlerForToken(u.type);if(c&&c.parseMarkdown){const f=this.createParseHelpers(),h=c.parseMarkdown(u,f);if(this.isMarkResult(h)){const m=this.applyMarkToContent(h.mark,h.content,h.attrs);s.push(...m)}else{const m=this.normalizeParseResult(h);Array.isArray(m)?s.push(...m):m&&s.push(m)}}else u.tokens&&s.push(...this.parseInlineTokens(u.tokens))}}for(let a=s.length-1;a>0;a-=1){const u=s[a],c=s[a-1];if(u.type==="text"&&c.type==="text"){const f=u.marks||[],h=c.marks||[];$Y(f,h)&&(c.text=(c.text||"")+(u.text||""),s.splice(a,1))}}return s}applyMarkToContent(t,e,n){return e.map(r=>{if(r.type==="text"){const i=r.marks||[],s=n?{type:t,attrs:n}:{type:t};return{...r,marks:[...i,s]}}return{...r,content:r.content?this.applyMarkToContent(t,r.content,n):void 0}})}isMarkResult(t){return t&&typeof t=="object"&&"mark"in t}normalizeParseResult(t){return t?this.isMarkResult(t)?t.content:t:null}parseFallbackToken(t,e=!1){switch(t.type){case"paragraph":return{type:"paragraph",content:t.tokens?this.parseInlineTokens(t.tokens):[]};case"heading":return{type:"heading",attrs:{level:t.depth||1},content:t.tokens?this.parseInlineTokens(t.tokens):[]};case"text":return{type:"text",text:LD(t.text||"")};case"html":return this.parseHTMLToken(t);case"escape":return{type:"text",text:t.text||""};case"space":return null;default:return t.tokens?this.parseTokens(t.tokens,e):null}}parseHTMLToken(t){const e=t.text||t.raw||"";if(!e.trim())return null;if(this.isUnrecognizedHtml(e))return this.htmlAsLiteralText(e,!!t.block);if(typeof window>"u"||typeof window.DOMParser>"u")return this.htmlAsLiteralText(e,!!t.block);try{const n=PQ(e,this.baseExtensions);return n.type==="doc"&&n.content?t.block?n.content:n.content.length===1&&n.content[0].type==="paragraph"&&n.content[0].content?n.content[0].content:n.content:n}catch(n){throw new Error(`Failed to parse HTML in markdown: ${n}`)}}isUnrecognizedHtml(t){return JJ(t,this.getSchemaParseDomTags())}getSchemaParseDomTags(){if(this.schemaParseDomTagsCache)return this.schemaParseDomTagsCache;const t=new Set;try{const e=i8(this.baseExtensions),n=r=>{const i=r?.parseDOM;Array.isArray(i)&&i.forEach(s=>{if(typeof s?.tag=="string"){const a=s.tag.match(/^[a-zA-Z][\w-]*/);a&&t.add(a[0].toLowerCase())}})};Object.values(e.nodes).forEach(r=>n(r.spec)),Object.values(e.marks).forEach(r=>n(r.spec))}catch{}return this.schemaParseDomTagsCache=t,t}htmlAsLiteralText(t,e){const n=t.replace(/\s+$/,"");return n?e?{type:"paragraph",content:[{type:"text",text:n}]}:{type:"text",text:n}:null}encodeTextForMarkdown(t,e,n){return n?.type!=null&&this.codeTypes.has(n.type)||(e.marks||[]).some(i=>this.codeTypes.has(typeof i=="string"?i:i.type))?t:this.escapeMarkdownSyntax(yY(t))}escapeMarkdownSyntax(t){return t.replace(/([\\`*_[\]~])/g,"\\$1")}renderNodeToMarkdown(t,e,n=0,r=0,i={}){var s;if(t.type==="text")return this.encodeTextForMarkdown(t.text||"",t,e);if(!t.type)return"";const a=this.getHandlerForToken(t.type);if(!a)return"";const u=Array.isArray(e?.content)&&n>0?e.content[n-1]:void 0,c={renderChildren:(m,g)=>{const b=a.isIndenting?r+1:r;return!Array.isArray(m)&&m.content?this.renderNodes(m.content,t,g||"",n,b):this.renderNodes(m,t,g||"",n,b)},renderChild:(m,g)=>{const b=a.isIndenting?r+1:r;return this.renderNodeToMarkdown(m,t,g,b)},indent:m=>this.indentString+m,wrapInBlock:_J},f={index:n,level:r,parentType:e?.type,previousNode:u,meta:{parentAttrs:e?.attrs,...i}};return((s=a.renderMarkdown)==null?void 0:s.call(a,t,c,f))||""}renderNodes(t,e,n="",r=0,i=0){return Array.isArray(t)?this.renderNodesWithMarkBoundaries(t,e,n,i):t.type?this.renderNodeToMarkdown(t,e,r,i):""}renderNodesWithMarkBoundaries(t,e,n="",r=0){const i=[],s=new Map,a=new Set,u=new Map;return t.forEach((c,f)=>{const h=f<t.length-1?t[f+1]:null;if(c.type)if(c.type==="text"){let m=this.encodeTextForMarkdown(c.text||"",c,e);const g=new Map((c.marks||[]).map(B=>[B.type,B])),b=this.getMarksToOpenForSerialization(s,g,h),x=VJ(g,h),k=x.filter(B=>s.has(B)),E=k.length>0&&b.length>0;let D="";if(x.length>0&&!E){const B=m.match(/(\s+)$/);B&&(D=B[1],m=m.slice(0,-D.length))}E||x.slice().reverse().forEach(B=>{if(!s.has(B))return;const R=g.get(B),M=this.getMarkClosing(B,R,u.get(B));M&&(m+=M),s.has(B)&&(s.delete(B),u.delete(B))});let T="";if(b.length>0){const B=m.match(/^(\s+)/);B&&(T=B[1],m=m.slice(T.length))}b.forEach(({type:B,mark:R})=>{const M=a.has(B)?"html":"markdown",O=this.getMarkOpening(B,R,M);O&&(m=O+m),u.set(B,M),a.delete(B)}),E||b.slice().reverse().forEach(({type:B,mark:R})=>{s.set(B,R)}),m=T+m;let $;if(E){const B=new Set((h?.marks||[]).map(O=>O.type));b.forEach(({type:O})=>{B.has(O)&&this.getHtmlReopenTags(O)&&a.add(O)});const R=Array.from(s.keys()),M=k.slice().sort((O,j)=>R.indexOf(j)-R.indexOf(O));$=[...b.map(O=>O.type),...M]}else $=UJ(s,g,h,this.markSetsEqual.bind(this));let A="";if($.length>0){const B=m.match(/(\s+)$/);B&&(A=B[1],m=m.slice(0,-A.length))}$.forEach(B=>{var R;const M=(R=s.get(B))!=null?R:g.get(B),O=this.getMarkClosing(B,M,u.get(B));O&&(m+=O),s.delete(B),u.delete(B)}),m+=A,m+=D,i.push(m)}else{const m=new Set((c.marks||[]).map(D=>D.type)),g=new Map,b=new Map;s.forEach((D,T)=>{var $;m.has(T)&&(g.set(T,D),b.set(T,($=u.get(T))!=null?$:"markdown"))});const x=qJ(s,(D,T)=>this.getMarkClosing(D,T,u.get(D)));u.clear();const k=this.renderNodeToMarkdown(c,e,f,r),E=c.type==="hardBreak"?"":GJ(g,s,(D,T)=>{var $;const A=($=b.get(D))!=null?$:"markdown";return u.set(D,A),this.getMarkOpening(D,T,A)});i.push(x+k+E)}}),i.join(n)}getMarkOpening(t,e,n="markdown"){var r;if(n==="html")return((r=this.getHtmlReopenTags(t))==null?void 0:r.open)||"";const i=this.getHandlersForNodeType(t),s=i.length>0?i[0]:void 0;if(!s||!s.renderMarkdown)return"";const a="__TIPTAP_MARKDOWN_PLACEHOLDER__",u={type:t,attrs:e.attrs||{},content:[{type:"text",text:a}]};try{const c=s.renderMarkdown(u,{renderChildren:()=>a,renderChild:()=>a,indent:h=>h,wrapInBlock:(h,m)=>h+m},{index:0,level:0,parentType:"text",meta:{}}),f=c.indexOf(a);return f>=0?c.substring(0,f):""}catch(c){throw new Error(`Failed to get mark opening for ${t}: ${c}`)}}getMarkClosing(t,e,n="markdown"){var r;if(n==="html")return((r=this.getHtmlReopenTags(t))==null?void 0:r.close)||"";const i=this.getHandlersForNodeType(t),s=i.length>0?i[0]:void 0;if(!s||!s.renderMarkdown)return"";const a="__TIPTAP_MARKDOWN_PLACEHOLDER__",u={type:t,attrs:e.attrs||{},content:[{type:"text",text:a}]};try{const c=s.renderMarkdown(u,{renderChildren:()=>a,renderChild:()=>a,indent:m=>m,wrapInBlock:(m,g)=>m+g},{index:0,level:0,parentType:"text",meta:{}}),f=c.indexOf(a),h=f+a.length;return f>=0?c.substring(h):""}catch(c){throw new Error(`Failed to get mark closing for ${t}: ${c}`)}}getHtmlReopenTags(t){const e=this.getHandlersForNodeType(t),n=e.length>0?e[0]:void 0;return n?.htmlReopen}markSetsEqual(t,e){return t.size!==e.size?!1:Array.from(t.entries()).every(([n,r])=>{const i=e.get(n);return i&&Il(r.attrs,i.attrs)})}getMarksToOpenForSerialization(t,e,n){const r=HJ(t,e);if(r.length<=1)return r;const i=n?.marks||[],s=(f,h)=>i.some(m=>m.type===f&&Il(m.attrs,h)),a=(f,h)=>{var m,g;const b=(m=this.extensionRanks.get(f.type))!=null?m:Number.MAX_SAFE_INTEGER,x=(g=this.extensionRanks.get(h.type))!=null?g:Number.MAX_SAFE_INTEGER;return b!==x?x-b:f.type.localeCompare(h.type)},u=r.filter(f=>!s(f.type,f.mark.attrs)).sort(a),c=r.filter(f=>s(f.type,f.mark.attrs)).sort(a);return[...u,...c]}},eS=ZJ,eZ=mt.create({name:"markdown",addOptions(){return{indentation:{style:"space",size:2},marked:void 0,markedOptions:{}}},addCommands(){return{setContent:(t,e)=>{if(!e?.contentType||Dh(t,e?.contentType)!=="markdown"||!this.editor.markdown)return kr.setContent(t,e);const r=this.editor.markdown.parse(t);return kr.setContent(r,e)},insertContent:(t,e)=>{if(!e?.contentType||Dh(t,e?.contentType)!=="markdown"||!this.editor.markdown)return kr.insertContent(t,e);const r=this.editor.markdown.parse(t);return kr.insertContent(r,e)},insertContentAt:(t,e,n)=>{if(!n?.contentType||Dh(e,n?.contentType)!=="markdown"||!this.editor.markdown)return kr.insertContentAt(t,e,n);const i=this.editor.markdown.parse(e);return kr.insertContentAt(t,i,n)}}},addStorage(){return{manager:new eS({indentation:this.options.indentation,marked:this.options.marked,markedOptions:this.options.markedOptions,extensions:[]})}},onBeforeCreate(){var t;if(this.editor.markdown){console.error("[tiptap][markdown]: There is already a `markdown` property on the editor instance. This might lead to unexpected behavior.");return}if(this.storage.manager=new eS({indentation:this.options.indentation,marked:this.options.marked,markedOptions:this.options.markedOptions,extensions:this.editor.extensionManager.baseExtensions}),this.editor.markdown=this.storage.manager,this.editor.getMarkdown=()=>this.storage.manager.serialize(this.editor.getJSON()),!this.editor.options.contentType||Dh(this.editor.options.content,this.editor.options.contentType)!=="markdown")return;if(!this.editor.markdown)throw new Error('[tiptap][markdown]: The `contentType` option is set to "markdown", but the Markdown extension is not added to the editor. Please add the Markdown extension to use this feature.');if(this.editor.options.content===void 0||typeof this.editor.options.content!="string")throw new Error('[tiptap][markdown]: The `contentType` option is set to "markdown", but the initial content is not a string. Please provide the initial content as a markdown string.');const n=this.editor.markdown.parse(this.editor.options.content);(t=n.content)!=null&&t.length&&(this.editor.options.content=n)}});const{getOwnPropertyNames:tZ,getOwnPropertySymbols:nZ}=Object,{hasOwnProperty:rZ}=Object.prototype;function vy(t,e){return function(r,i,s){return t(r,i,s)&&e(r,i,s)}}function Sh(t){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return t(n,r,i);const{cache:s}=i,a=s.get(n),u=s.get(r);if(a&&u)return a===r&&u===n;s.set(n,r),s.set(r,n);const c=t(n,r,i);return s.delete(n),s.delete(r),c}}function iZ(t){return t?.[Symbol.toStringTag]}function tS(t){return tZ(t).concat(nZ(t))}const sZ=Object.hasOwn||((t,e)=>rZ.call(t,e));function ka(t,e){return t===e||!t&&!e&&t!==t&&e!==e}const oZ="__v",aZ="__o",lZ="_owner",{getOwnPropertyDescriptor:nS,keys:rS}=Object;function uZ(t,e){return t.byteLength===e.byteLength&&zp(new Uint8Array(t),new Uint8Array(e))}function cZ(t,e,n){let r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;return!0}function dZ(t,e){return t.byteLength===e.byteLength&&zp(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function fZ(t,e){return ka(t.getTime(),e.getTime())}function hZ(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function pZ(t,e){return t===e}function iS(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const i=new Array(r),s=t.entries();let a,u,c=0;for(;(a=s.next())&&!a.done;){const f=e.entries();let h=!1,m=0;for(;(u=f.next())&&!u.done;){if(i[m]){m++;continue}const g=a.value,b=u.value;if(n.equals(g[0],b[0],c,m,t,e,n)&&n.equals(g[1],b[1],g[0],b[0],t,e,n)){h=i[m]=!0;break}m++}if(!h)return!1;c++}return!0}const mZ=ka;function gZ(t,e,n){const r=rS(t);let i=r.length;if(rS(e).length!==i)return!1;for(;i-- >0;)if(!lN(t,e,n,r[i]))return!1;return!0}function rc(t,e,n){const r=tS(t);let i=r.length;if(tS(e).length!==i)return!1;let s,a,u;for(;i-- >0;)if(s=r[i],!lN(t,e,n,s)||(a=nS(t,s),u=nS(e,s),(a||u)&&(!a||!u||a.configurable!==u.configurable||a.enumerable!==u.enumerable||a.writable!==u.writable)))return!1;return!0}function bZ(t,e){return ka(t.valueOf(),e.valueOf())}function yZ(t,e){return t.source===e.source&&t.flags===e.flags}function sS(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const i=new Array(r),s=t.values();let a,u;for(;(a=s.next())&&!a.done;){const c=e.values();let f=!1,h=0;for(;(u=c.next())&&!u.done;){if(!i[h]&&n.equals(a.value,u.value,a.value,u.value,t,e,n)){f=i[h]=!0;break}h++}if(!f)return!1}return!0}function zp(t,e){let n=t.byteLength;if(e.byteLength!==n||t.byteOffset!==e.byteOffset)return!1;for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}function xZ(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function lN(t,e,n,r){return(r===lZ||r===aZ||r===oZ)&&(t.$$typeof||e.$$typeof)?!0:sZ(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}const vZ="[object ArrayBuffer]",kZ="[object Arguments]",CZ="[object Boolean]",EZ="[object DataView]",DZ="[object Date]",SZ="[object Error]",wZ="[object Map]",$Z="[object Number]",TZ="[object Object]",AZ="[object RegExp]",BZ="[object Set]",MZ="[object String]",NZ={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},RZ="[object URL]",OZ=Object.prototype.toString;function PZ({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:s,areMapsEqual:a,areNumbersEqual:u,areObjectsEqual:c,arePrimitiveWrappersEqual:f,areRegExpsEqual:h,areSetsEqual:m,areTypedArraysEqual:g,areUrlsEqual:b,unknownTagComparators:x}){return function(E,D,T){if(E===D)return!0;if(E==null||D==null)return!1;const $=typeof E;if($!==typeof D)return!1;if($!=="object")return $==="number"?u(E,D,T):$==="function"?s(E,D,T):!1;const A=E.constructor;if(A!==D.constructor)return!1;if(A===Object)return c(E,D,T);if(Array.isArray(E))return e(E,D,T);if(A===Date)return r(E,D,T);if(A===RegExp)return h(E,D,T);if(A===Map)return a(E,D,T);if(A===Set)return m(E,D,T);const B=OZ.call(E);if(B===DZ)return r(E,D,T);if(B===AZ)return h(E,D,T);if(B===wZ)return a(E,D,T);if(B===BZ)return m(E,D,T);if(B===TZ)return typeof E.then!="function"&&typeof D.then!="function"&&c(E,D,T);if(B===RZ)return b(E,D,T);if(B===SZ)return i(E,D,T);if(B===kZ)return c(E,D,T);if(NZ[B])return g(E,D,T);if(B===vZ)return t(E,D,T);if(B===EZ)return n(E,D,T);if(B===CZ||B===$Z||B===MZ)return f(E,D,T);if(x){let R=x[B];if(!R){const M=iZ(E);M&&(R=x[M])}if(R)return R(E,D,T)}return!1}}function zZ({circular:t,createCustomConfig:e,strict:n}){let r={areArrayBuffersEqual:uZ,areArraysEqual:n?rc:cZ,areDataViewsEqual:dZ,areDatesEqual:fZ,areErrorsEqual:hZ,areFunctionsEqual:pZ,areMapsEqual:n?vy(iS,rc):iS,areNumbersEqual:mZ,areObjectsEqual:n?rc:gZ,arePrimitiveWrappersEqual:bZ,areRegExpsEqual:yZ,areSetsEqual:n?vy(sS,rc):sS,areTypedArraysEqual:n?vy(zp,rc):zp,areUrlsEqual:xZ,unknownTagComparators:void 0};if(e&&(r=Object.assign({},r,e(r))),t){const i=Sh(r.areArraysEqual),s=Sh(r.areMapsEqual),a=Sh(r.areObjectsEqual),u=Sh(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:s,areObjectsEqual:a,areSetsEqual:u})}return r}function LZ(t){return function(e,n,r,i,s,a,u){return t(e,n,u)}}function IZ({circular:t,comparator:e,createState:n,equals:r,strict:i}){if(n)return function(u,c){const{cache:f=t?new WeakMap:void 0,meta:h}=n();return e(u,c,{cache:f,equals:r,meta:h,strict:i})};if(t)return function(u,c){return e(u,c,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const s={cache:void 0,equals:r,meta:void 0,strict:i};return function(u,c){return e(u,c,s)}}const jZ=ro();ro({strict:!0});ro({circular:!0});ro({circular:!0,strict:!0});ro({createInternalComparator:()=>ka});ro({strict:!0,createInternalComparator:()=>ka});ro({circular:!0,createInternalComparator:()=>ka});ro({circular:!0,createInternalComparator:()=>ka,strict:!0});function ro(t={}){const{circular:e=!1,createInternalComparator:n,createState:r,strict:i=!1}=t,s=zZ(t),a=PZ(s),u=n?n(a):LZ(a);return IZ({circular:e,comparator:a,createState:r,equals:u,strict:i})}var FZ=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n&&(n.current=e)})},KZ=({contentComponent:t})=>{const e=I3.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot);return C.jsx(C.Fragment,{children:Object.values(e)})};function _Z(){const t=new Set;let e={},n=!1;const r=()=>{n||!t.size||(n=!0,queueMicrotask(()=>{n=!1,t.forEach(i=>i())}))};return{subscribe(i){return t.add(i),()=>{t.delete(i)}},getSnapshot(){return e},getServerSnapshot(){return e},setRenderer(i,s){e={...e,[i]:F$.createPortal(s.reactElement,s.element,i)},r()},removeRenderer(i){const s={...e};delete s[i],e=s,r()}}}var VZ=class extends V.Component{constructor(t){super(t),this.editorContentRef=V.createRef()}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var t;const e=this.props.editor;if(e&&!e.isDestroyed&&((t=e.view.dom)!=null&&t.parentNode)){if(e.contentComponent)return;const n=this.editorContentRef.current;n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n}),e.contentComponent=_Z(),e.createNodeViews(),e.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){var t;const e=this.props.editor;if(e){e.isEditorContentInitialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),e.contentComponent=null;try{if(!((t=e.view.dom)!=null&&t.parentNode))return;const n=document.createElement("div");n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n})}catch{}}}render(){const{editor:t,innerRef:e,...n}=this.props;return C.jsxs(C.Fragment,{children:[C.jsx("div",{ref:FZ(e,this.editorContentRef),...n}),t?.contentComponent&&C.jsx(KZ,{contentComponent:t.contentComponent})]})}},HZ=S.forwardRef((t,e)=>{const n=V.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return V.createElement(VZ,{key:n,innerRef:e,...t})}),uN=V.memo(HZ),UZ=typeof window<"u"?S.useLayoutEffect:S.useEffect,qZ=class{constructor(t){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=t,this.lastSnapshot={editor:t,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}watch(t){if(this.editor=t,this.editor){let e;const n=i=>{i?.transaction!==void 0&&i.transaction===e||(e=i?.transaction,this.transactionNumber+=1,this.subscribers.forEach(s=>s()))},r=this.editor;return r.on("transaction",n),r.on("update",n),()=>{r.off("transaction",n),r.off("update",n)}}}};function GZ(t){var e;const[n]=S.useState(()=>new qZ(t.editor)),r=xw.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,t.selector,(e=t.equalityFn)!=null?e:jZ);return UZ(()=>n.watch(t.editor),[t.editor,n]),S.useDebugValue(r),r}var WZ=!1,cN=typeof window>"u",QZ=cN||!!(typeof window<"u"&&window.next),YZ=class dN{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){const e=this.options.current.immediatelyRender;let n=e??!0;return cN?(n&&WZ&&console.warn("SSR detected. `immediatelyRender` has been set to false to avoid hydration mismatches"),n=!1):QZ&&e===void 0&&(n=!1),n?this.createEditor():null}createEditor(){const e={...this.options.current,onBeforeCreate:(...r)=>{var i,s;return(s=(i=this.options.current).onBeforeCreate)==null?void 0:s.call(i,...r)},onBlur:(...r)=>{var i,s;return(s=(i=this.options.current).onBlur)==null?void 0:s.call(i,...r)},onCreate:(...r)=>{var i,s;return(s=(i=this.options.current).onCreate)==null?void 0:s.call(i,...r)},onDestroy:(...r)=>{var i,s;return(s=(i=this.options.current).onDestroy)==null?void 0:s.call(i,...r)},onFocus:(...r)=>{var i,s;return(s=(i=this.options.current).onFocus)==null?void 0:s.call(i,...r)},onSelectionUpdate:(...r)=>{var i,s;return(s=(i=this.options.current).onSelectionUpdate)==null?void 0:s.call(i,...r)},onTransaction:(...r)=>{var i,s;return(s=(i=this.options.current).onTransaction)==null?void 0:s.call(i,...r)},onUpdate:(...r)=>{var i,s;return(s=(i=this.options.current).onUpdate)==null?void 0:s.call(i,...r)},onContentError:(...r)=>{var i,s;return(s=(i=this.options.current).onContentError)==null?void 0:s.call(i,...r)},onDrop:(...r)=>{var i,s;return(s=(i=this.options.current).onDrop)==null?void 0:s.call(i,...r)},onPaste:(...r)=>{var i,s;return(s=(i=this.options.current).onPaste)==null?void 0:s.call(i,...r)},onDelete:(...r)=>{var i,s;return(s=(i=this.options.current).onDelete)==null?void 0:s.call(i,...r)},onMount:(...r)=>{var i,s;return(s=(i=this.options.current).onMount)==null?void 0:s.call(i,...r)},onUnmount:(...r)=>{var i,s;return(s=(i=this.options.current).onUnmount)==null?void 0:s.call(i,...r)}};return new IY(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,n){return Object.keys(e).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&e.extensions&&n.extensions?e.extensions.length!==n.extensions.length?!1:e.extensions.every((i,s)=>{var a;return i===((a=n.extensions)==null?void 0:a[s])}):e[r]===n[r])}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&e.length===0?dN.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(e),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((r,i)=>r===e[i]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){const e=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function XZ(t={},e=[]){const n=S.useRef(t);n.current=t;const[r]=S.useState(()=>new YZ(n)),i=I3.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return S.useDebugValue(i),S.useEffect(r.onRender(e)),GZ({editor:i,selector:({transactionNumber:s})=>t.shouldRerenderOnTransaction===!1||t.shouldRerenderOnTransaction===void 0?null:t.immediatelyRender&&s===0?0:s+1}),i}var fN=S.createContext({editor:null});fN.Consumer;var JZ=S.createContext({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),ZZ=()=>S.useContext(JZ);V.forwardRef((t,e)=>{const{onDragStart:n}=ZZ(),r=t.as||"div";return C.jsx(r,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})});V.createContext({markViewContentRef:()=>{}});var n1=S.createContext({get editor(){throw new Error("useTiptap must be used within a <Tiptap> provider")}});n1.displayName="TiptapContext";var eee=()=>S.useContext(n1);function hN({children:t,...e}){const n="editor"in e?e.editor:e.instance;if(!n)throw new Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");const r=S.useMemo(()=>({editor:n}),[n]),i=S.useMemo(()=>({editor:n}),[n]);return C.jsx(fN.Provider,{value:i,children:C.jsx(n1.Provider,{value:r,children:t})})}hN.displayName="Tiptap";function pN({...t}){const{editor:e}=eee();return C.jsx(uN,{editor:e,...t})}pN.displayName="Tiptap.Content";Object.assign(hN,{Content:pN});var Lp=(t,e)=>{if(t==="slot")return 0;if(t instanceof Function)return t(e);const{children:n,...r}=e??{};if(t==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[t,r,n]},tee=(t,e)=>{var n;const{state:r,view:i}=t,{selection:s}=r;if(!s.empty)return!1;const{$from:a}=s;if(a.parentOffset!==0)return!1;const u=a.depth-1;if(u<0)return!1;const c=a.node(u),f=a.index(u);if(f===0)return!1;if(c.type===e)return t.commands.lift(e.name);const h=c.child(f-1);if(h.type!==e||!((n=h.lastChild)!=null&&n.isTextblock))return!1;const m=a.before(),b=m-1-1,{tr:x}=r;return x.delete(m,a.after()).insert(b,a.parent.content),x.setSelection(De.create(x.doc,b)),i.dispatch(x.scrollIntoView()),!0},nee=/^\s*>\s$/,ree=Xn.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return Lp("blockquote",{..._t(this.options.HTMLAttributes,t),children:Lp("slot",{})})},parseMarkdown:(t,e)=>{var n;const r=(n=e.parseBlockChildren)!=null?n:e.parseChildren;return e.createNode("blockquote",void 0,r(t.tokens||[]))},renderMarkdown:(t,e)=>{if(!t.content)return"";const n=">",r=[];return t.content.forEach((i,s)=>{var a,u;const h=((u=(a=e.renderChild)==null?void 0:a.call(e,i,s))!=null?u:e.renderChildren([i])).split(`
|
|
201
|
+
`).map(m=>m.trim()===""?n:`${n} ${m}`);r.push(h.join(`
|
|
202
|
+
`))}),r.join(`
|
|
203
|
+
${n}
|
|
204
|
+
`)},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote(),Backspace:()=>tee(this.editor,this.type)}},addInputRules(){return[jl({find:nee,type:this.type})]}}),iee=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,see=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,oee=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,aee=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,lee=xa.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return Lp("strong",{..._t(this.options.HTMLAttributes,t),children:Lp("slot",{})})},markdownTokenName:"strong",parseMarkdown:(t,e)=>e.applyMark("bold",e.parseInline(t.tokens||[])),markdownOptions:{htmlReopen:{open:"<strong>",close:"</strong>"}},renderMarkdown:(t,e)=>`**${e.renderChildren(t)}**`,addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[oa({find:iee,type:this.type}),oa({find:oee,type:this.type})]},addPasteRules(){return[Gs({find:see,type:this.type}),Gs({find:aee,type:this.type})]}}),uee=t=>{const e=/`([^`]+)`(?!`)$/.exec(t);return!e||e.index>0&&t[e.index-1]==="`"?null:{index:e.index,text:e[0],replaceWith:e[1]}},cee=t=>{const e=/`([^`]+)`(?!`)/g,n=[];let r;for(;(r=e.exec(t))!==null;)r.index>0&&t[r.index-1]==="`"||n.push({index:r.index,text:r[0],replaceWith:r[1]});return n},dee=xa.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",_t(this.options.HTMLAttributes,t),0]},markdownTokenName:"codespan",parseMarkdown:(t,e)=>e.applyMark("code",[{type:"text",text:t.text||""}]),renderMarkdown:(t,e)=>t.content?`\`${e.renderChildren(t.content)}\``:"",addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[oa({find:uee,type:this.type})]},addPasteRules(){return[Gs({find:cee,type:this.type})]}}),ky=4,fee=/^```([a-z]+)?[\s\n]$/,hee=/^~~~([a-z]+)?[\s\n]$/,pee=Xn.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,exitOnArrowUp:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:ky,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options;if(!n)return null;const s=[...((e=t.firstElementChild)==null?void 0:e.classList)||[]].filter(a=>a.startsWith(n)).map(a=>a.replace(n,""))[0];return s||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",_t(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(t,e)=>{var n,r;return((n=t.raw)==null?void 0:n.startsWith("```"))===!1&&((r=t.raw)==null?void 0:r.startsWith("~~~"))===!1&&t.codeBlockStyle!=="indented"?[]:e.createNode("codeBlock",{language:t.lang||null},t.text?[e.createTextNode(t.text)]:[])},renderMarkdown:(t,e)=>{var n;let r="";const i=((n=t.attrs)==null?void 0:n.language)||"";return t.content?r=[`\`\`\`${i}`,e.renderChildren(t.content),"```"].join(`
|
|
205
|
+
`):r=`\`\`\`${i}
|
|
206
|
+
|
|
207
|
+
\`\`\``,r},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=e.pos===1;return!t||e.parent.type.name!==this.name?!1:n||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:ky,{state:r}=t,{selection:i}=r,{$from:s,empty:a}=i;if(s.parent.type!==this.type)return!1;const u=" ".repeat(n);return a?t.commands.insertContent(u):t.commands.command(({tr:c})=>{const{from:f,to:h}=i,b=r.doc.textBetween(f,h,`
|
|
208
|
+
`,`
|
|
209
|
+
`).split(`
|
|
210
|
+
`).map(x=>u+x).join(`
|
|
211
|
+
`);return c.replaceWith(f,h,r.schema.text(b)),!0})},"Shift-Tab":({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:ky,{state:r}=t,{selection:i}=r,{$from:s,empty:a}=i;return s.parent.type!==this.type?!1:a?t.commands.command(({tr:u})=>{var c;const{pos:f}=s,h=s.start(),m=s.end(),b=r.doc.textBetween(h,m,`
|
|
212
|
+
`,`
|
|
213
|
+
`).split(`
|
|
214
|
+
`);let x=0,k=0;const E=f-h;for(let R=0;R<b.length;R+=1){if(k+b[R].length>=E){x=R;break}k+=b[R].length+1}const T=((c=b[x].match(/^ */))==null?void 0:c[0])||"",$=Math.min(T.length,n);if($===0)return!0;let A=h;for(let R=0;R<x;R+=1)A+=b[R].length+1;return u.delete(A,A+$),f-A<=$&&u.setSelection(De.create(u.doc,A)),!0}):t.commands.command(({tr:u})=>{const{from:c,to:f}=i,g=r.doc.textBetween(c,f,`
|
|
215
|
+
`,`
|
|
216
|
+
`).split(`
|
|
217
|
+
`).map(b=>{var x;const k=((x=b.match(/^ */))==null?void 0:x[0])||"",E=Math.min(k.length,n);return b.slice(E)}).join(`
|
|
218
|
+
`);return u.replaceWith(c,f,r.schema.text(g)),!0})},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;const s=r.parentOffset===r.parent.nodeSize-2,a=r.parent.textContent.endsWith(`
|
|
219
|
+
|
|
220
|
+
`);return!s||!a?!1:t.chain().command(({tr:u})=>(u.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowUp:({editor:t})=>{if(!this.options.exitOnArrowUp)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type||r.parentOffset!==0)return!1;const s=r.before();return s>0?!1:t.commands.insertDefaultBlock({pos:s})},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:i,empty:s}=n;if(!s||i.parent.type!==this.type||!(i.parentOffset===i.parent.nodeSize-2))return!1;const u=i.after();return u===void 0?!1:r.nodeAt(u)?t.commands.command(({tr:f})=>(f.setSelection(Ne.near(r.resolve(u))),!0)):t.commands.exitCode()}}},addInputRules(){return[H4({find:fee,type:this.type,getAttributes:t=>({language:t[1]})}),H4({find:hee,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new pt({key:new Vt("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,s=i?.mode;if(!n||!s)return!1;const{tr:a,schema:u}=t.state,c=u.text(n.replace(/\r\n?/g,`
|
|
221
|
+
`));return a.replaceSelectionWith(this.type.create({language:s},c)),a.selection.$from.parent.type!==this.type&&a.setSelection(De.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.setMeta("paste",!0),t.dispatch(a),!0}}})]}}),mee=Xn.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
|
|
222
|
+
|
|
223
|
+
`):""}),gee=Xn.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",_t(this.options.HTMLAttributes,t)]},renderText(){return`
|
|
224
|
+
`},renderMarkdown:()=>`
|
|
225
|
+
`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:i,storedMarks:s}=n;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:a}=this.options,{splittableMarks:u}=r.extensionManager,c=s||i.$to.parentOffset&&i.$from.marks();return e().insertContent({type:this.name}).command(({tr:f,dispatch:h})=>{if(h&&c&&a){const m=c.filter(g=>u.includes(g.type.name));f.ensureMarks(m)}return!0}).scrollIntoView().run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),bee=Xn.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,_t(this.options.HTMLAttributes,e),0]},parseMarkdown:(t,e)=>e.createNode("heading",{level:t.depth||1},e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>{var n;const r=(n=t.attrs)!=null&&n.level?parseInt(t.attrs.level,10):1,i="#".repeat(r);return t.content?`${i} ${e.renderChildren(t.content)}`:""},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>H4({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}}),yee=Xn.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",_t(this.options.HTMLAttributes,t)]},markdownTokenName:"hr",parseMarkdown:(t,e)=>e.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!gY(e,e.schema.nodes[this.name]))return!1;const{selection:n}=e,{$to:r}=n,i=t();return l8(n)?i.insertContentAt(r.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({state:s,tr:a,dispatch:u})=>{if(u){const{$to:c}=a.selection,f=c.end();if(c.nodeAfter)c.nodeAfter.isTextblock?a.setSelection(De.create(a.doc,c.pos+1)):c.nodeAfter.isBlock?a.setSelection(ke.create(a.doc,c.pos)):a.setSelection(De.create(a.doc,c.pos));else{const h=s.schema.nodes[this.options.nextNodeType]||c.parent.type.contentMatch.defaultType,m=h?.create();m&&(a.insert(f,m),a.setSelection(De.create(a.doc,f+1)))}a.scrollIntoView()}return!0}).run()}}},addInputRules(){return[jY({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),xee=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,vee=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,kee=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,Cee=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,Eee=xa.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",_t(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(t,e)=>e.applyMark("italic",e.parseInline(t.tokens||[])),markdownOptions:{htmlReopen:{open:"<em>",close:"</em>"}},renderMarkdown:(t,e)=>`*${e.renderChildren(t)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[oa({find:xee,type:this.type}),oa({find:kee,type:this.type})]},addPasteRules(){return[Gs({find:vee,type:this.type}),Gs({find:Cee,type:this.type})]}});const Dee="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",See="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",J4="numeric",Z4="ascii",e3="alpha",Bc="asciinumeric",gc="alphanumeric",t3="domain",mN="emoji",wee="scheme",$ee="slashscheme",Cy="whitespace";function Tee(t,e){return t in e||(e[t]=[]),e[t]}function Ko(t,e,n){e[J4]&&(e[Bc]=!0,e[gc]=!0),e[Z4]&&(e[Bc]=!0,e[e3]=!0),e[Bc]&&(e[gc]=!0),e[e3]&&(e[gc]=!0),e[gc]&&(e[t3]=!0),e[mN]&&(e[t3]=!0);for(const r in e){const i=Tee(r,n);i.indexOf(t)<0&&i.push(t)}}function Aee(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function On(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}On.groups={};On.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let r=0;r<e.jr.length;r++){const i=e.jr[r][0],s=e.jr[r][1];if(s&&i.test(t))return s}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let i=0;i<t.length;i++)this.tt(t[i],e,n,r)},tr(t,e,n,r){r=r||On.groups;let i;return e&&e.j?i=e:(i=new On(e),n&&r&&Ko(e,n,r)),this.jr.push([t,i]),i},ts(t,e,n,r){let i=this;const s=t.length;if(!s)return i;for(let a=0;a<s-1;a++)i=i.tt(t[a]);return i.tt(t[s-1],e,n,r)},tt(t,e,n,r){r=r||On.groups;const i=this;if(e&&e.j)return i.j[t]=e,e;const s=e;let a,u=i.go(t);if(u?(a=new On,Object.assign(a.j,u.j),a.jr.push.apply(a.jr,u.jr),a.jd=u.jd,a.t=u.t):a=new On,s){if(r)if(a.t&&typeof a.t=="string"){const c=Object.assign(Aee(a.t,r),n);Ko(s,c,r)}else n&&Ko(s,n,r);a.t=s}return i.j[t]=a,a}};const Oe=(t,e,n,r,i)=>t.ta(e,n,r,i),vt=(t,e,n,r,i)=>t.tr(e,n,r,i),oS=(t,e,n,r,i)=>t.ts(e,n,r,i),ue=(t,e,n,r,i)=>t.tt(e,n,r,i),Ci="WORD",n3="UWORD",gN="ASCIINUMERICAL",bN="ALPHANUMERICAL",od="LOCALHOST",r3="TLD",i3="UTLD",Uh="SCHEME",ml="SLASH_SCHEME",r1="NUM",s3="WS",i1="NL",Mc="OPENBRACE",Nc="CLOSEBRACE",Ip="OPENBRACKET",jp="CLOSEBRACKET",Fp="OPENPAREN",Kp="CLOSEPAREN",_p="OPENANGLEBRACKET",Vp="CLOSEANGLEBRACKET",Hp="FULLWIDTHLEFTPAREN",Up="FULLWIDTHRIGHTPAREN",qp="LEFTCORNERBRACKET",Gp="RIGHTCORNERBRACKET",Wp="LEFTWHITECORNERBRACKET",Qp="RIGHTWHITECORNERBRACKET",Yp="FULLWIDTHLESSTHAN",Xp="FULLWIDTHGREATERTHAN",Jp="AMPERSAND",Zp="APOSTROPHE",em="ASTERISK",Ds="AT",tm="BACKSLASH",nm="BACKTICK",rm="CARET",_o="COLON",s1="COMMA",im="DOLLAR",Kr="DOT",sm="EQUALS",o1="EXCLAMATION",ur="HYPHEN",Rc="PERCENT",om="PIPE",am="PLUS",lm="POUND",Oc="QUERY",a1="QUOTE",yN="FULLWIDTHMIDDLEDOT",l1="SEMI",_r="SLASH",Pc="TILDE",um="UNDERSCORE",xN="EMOJI",cm="SYM";var vN=Object.freeze({__proto__:null,ALPHANUMERICAL:bN,AMPERSAND:Jp,APOSTROPHE:Zp,ASCIINUMERICAL:gN,ASTERISK:em,AT:Ds,BACKSLASH:tm,BACKTICK:nm,CARET:rm,CLOSEANGLEBRACKET:Vp,CLOSEBRACE:Nc,CLOSEBRACKET:jp,CLOSEPAREN:Kp,COLON:_o,COMMA:s1,DOLLAR:im,DOT:Kr,EMOJI:xN,EQUALS:sm,EXCLAMATION:o1,FULLWIDTHGREATERTHAN:Xp,FULLWIDTHLEFTPAREN:Hp,FULLWIDTHLESSTHAN:Yp,FULLWIDTHMIDDLEDOT:yN,FULLWIDTHRIGHTPAREN:Up,HYPHEN:ur,LEFTCORNERBRACKET:qp,LEFTWHITECORNERBRACKET:Wp,LOCALHOST:od,NL:i1,NUM:r1,OPENANGLEBRACKET:_p,OPENBRACE:Mc,OPENBRACKET:Ip,OPENPAREN:Fp,PERCENT:Rc,PIPE:om,PLUS:am,POUND:lm,QUERY:Oc,QUOTE:a1,RIGHTCORNERBRACKET:Gp,RIGHTWHITECORNERBRACKET:Qp,SCHEME:Uh,SEMI:l1,SLASH:_r,SLASH_SCHEME:ml,SYM:cm,TILDE:Pc,TLD:r3,UNDERSCORE:um,UTLD:i3,UWORD:n3,WORD:Ci,WS:s3});const xi=/[a-z]/,ic=new RegExp("\\p{L}","u"),Ey=new RegExp("\\p{Emoji}","u"),vi=/\d/,Dy=/\s/,aS="\r",Sy=`
|
|
226
|
+
`,Bee="️",Mee="",wy="";let wh=null,$h=null;function Nee(t=[]){const e={};On.groups=e;const n=new On;wh==null&&(wh=lS(Dee)),$h==null&&($h=lS(See)),ue(n,"'",Zp),ue(n,"{",Mc),ue(n,"}",Nc),ue(n,"[",Ip),ue(n,"]",jp),ue(n,"(",Fp),ue(n,")",Kp),ue(n,"<",_p),ue(n,">",Vp),ue(n,"(",Hp),ue(n,")",Up),ue(n,"「",qp),ue(n,"」",Gp),ue(n,"『",Wp),ue(n,"』",Qp),ue(n,"<",Yp),ue(n,">",Xp),ue(n,"&",Jp),ue(n,"*",em),ue(n,"@",Ds),ue(n,"`",nm),ue(n,"^",rm),ue(n,":",_o),ue(n,",",s1),ue(n,"$",im),ue(n,".",Kr),ue(n,"=",sm),ue(n,"!",o1),ue(n,"-",ur),ue(n,"%",Rc),ue(n,"|",om),ue(n,"+",am),ue(n,"#",lm),ue(n,"?",Oc),ue(n,'"',a1),ue(n,"/",_r),ue(n,";",l1),ue(n,"~",Pc),ue(n,"_",um),ue(n,"\\",tm),ue(n,"・",yN);const r=vt(n,vi,r1,{[J4]:!0});vt(r,vi,r);const i=vt(r,xi,gN,{[Bc]:!0}),s=vt(r,ic,bN,{[gc]:!0}),a=vt(n,xi,Ci,{[Z4]:!0});vt(a,vi,i),vt(a,xi,a),vt(i,vi,i),vt(i,xi,i);const u=vt(n,ic,n3,{[e3]:!0});vt(u,xi),vt(u,vi,s),vt(u,ic,u),vt(s,vi,s),vt(s,xi),vt(s,ic,s);const c=ue(n,Sy,i1,{[Cy]:!0}),f=ue(n,aS,s3,{[Cy]:!0}),h=vt(n,Dy,s3,{[Cy]:!0});ue(n,wy,h),ue(f,Sy,c),ue(f,wy,h),vt(f,Dy,h),ue(h,aS),ue(h,Sy),vt(h,Dy,h),ue(h,wy,h);const m=vt(n,Ey,xN,{[mN]:!0});ue(m,"#"),vt(m,Ey,m),ue(m,Bee,m);const g=ue(m,Mee);ue(g,"#"),vt(g,Ey,m);const b=[[xi,a],[vi,i]],x=[[xi,null],[ic,u],[vi,s]];for(let k=0;k<wh.length;k++)xs(n,wh[k],r3,Ci,b);for(let k=0;k<$h.length;k++)xs(n,$h[k],i3,n3,x);Ko(r3,{tld:!0,ascii:!0},e),Ko(i3,{utld:!0,alpha:!0},e),xs(n,"file",Uh,Ci,b),xs(n,"mailto",Uh,Ci,b),xs(n,"http",ml,Ci,b),xs(n,"https",ml,Ci,b),xs(n,"ftp",ml,Ci,b),xs(n,"ftps",ml,Ci,b),Ko(Uh,{scheme:!0,ascii:!0},e),Ko(ml,{slashscheme:!0,ascii:!0},e),t=t.sort((k,E)=>k[0]>E[0]?1:-1);for(let k=0;k<t.length;k++){const E=t[k][0],T=t[k][1]?{[wee]:!0}:{[$ee]:!0};E.indexOf("-")>=0?T[t3]=!0:xi.test(E)?vi.test(E)?T[Bc]=!0:T[Z4]=!0:T[J4]=!0,oS(n,E,E,T)}return oS(n,"localhost",od,{ascii:!0}),n.jd=new On(cm),{start:n,tokens:Object.assign({groups:e},vN)}}function kN(t,e){const n=Ree(e.replace(/[A-Z]/g,u=>u.toLowerCase())),r=n.length,i=[];let s=0,a=0;for(;a<r;){let u=t,c=null,f=0,h=null,m=-1,g=-1;for(;a<r&&(c=u.go(n[a]));)u=c,u.accepts()?(m=0,g=0,h=u):m>=0&&(m+=n[a].length,g++),f+=n[a].length,s+=n[a].length,a++;s-=m,a-=g,f-=m,i.push({t:h.t,v:e.slice(s-f,s),s:s-f,e:s})}return i}function Ree(t){const e=[],n=t.length;let r=0;for(;r<n;){let i=t.charCodeAt(r),s,a=i<55296||i>56319||r+1===n||(s=t.charCodeAt(r+1))<56320||s>57343?t[r]:t.slice(r,r+2);e.push(a),r+=a.length}return e}function xs(t,e,n,r,i){let s;const a=e.length;for(let u=0;u<a-1;u++){const c=e[u];t.j[c]?s=t.j[c]:(s=new On(r),s.jr=i.slice(),t.j[c]=s),t=s}return s=new On(n),s.jr=i.slice(),t.j[e[a-1]]=s,s}function lS(t){const e=[],n=[];let r=0,i="0123456789";for(;r<t.length;){let s=0;for(;i.indexOf(t[r+s])>=0;)s++;if(s>0){e.push(n.join(""));for(let a=parseInt(t.substring(r,r+s),10);a>0;a--)n.pop();r+=s}else n.push(t[r]),r++}return e}const ad={defaultProtocol:"http",events:null,format:uS,formatHref:uS,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function u1(t,e=null){let n=Object.assign({},ad);t&&(n=Object.assign(n,t instanceof u1?t.o:t));const r=n.ignoreTags,i=[];for(let s=0;s<r.length;s++)i.push(r[s].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=i}u1.prototype={o:ad,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const r=e!=null;let i=this.o[t];return i&&(typeof i=="object"?(i=n.t in i?i[n.t]:ad[t],typeof i=="function"&&r&&(i=i(e,n))):typeof i=="function"&&r&&(i=i(e,n.t,n)),i)},getObj(t,e,n){let r=this.o[t];return typeof r=="function"&&e!=null&&(r=r(e,n.t,n)),r},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function uS(t){return t}function CN(t,e){this.t="token",this.v=t,this.tk=e}CN.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=ad.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),i=t.get("tagName",n,e),s=this.toFormattedString(t),a={},u=t.get("className",n,e),c=t.get("target",n,e),f=t.get("rel",n,e),h=t.getObj("attributes",n,e),m=t.getObj("events",n,e);return a.href=r,u&&(a.class=u),c&&(a.target=c),f&&(a.rel=f),h&&Object.assign(a,h),{tagName:i,attributes:a,content:s,eventListeners:m}}};function Zm(t,e){class n extends CN{constructor(i,s){super(i,s),this.t=t}}for(const r in e)n.prototype[r]=e[r];return n.t=t,n}const Oee=Zm("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),cS=Zm("text"),Pee=Zm("nl"),Th=Zm("url",{isLink:!0,toHref(t=ad.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==od&&t[1].t===_o}}),lr=t=>new On(t);function zee({groups:t}){const e=t.domain.concat([Jp,em,Ds,tm,nm,rm,im,sm,ur,r1,Rc,om,am,lm,_r,cm,Pc,um]),n=[Zp,_o,s1,Kr,o1,Rc,Oc,a1,l1,_p,Vp,Mc,Nc,jp,Ip,Fp,Kp,Hp,Up,qp,Gp,Wp,Qp,Yp,Xp],r=[Jp,Zp,em,tm,nm,rm,im,sm,ur,Mc,Nc,Rc,om,am,lm,Oc,_r,cm,Pc,um],i=lr(),s=ue(i,Pc);Oe(s,r,s),Oe(s,t.domain,s);const a=lr(),u=lr(),c=lr();Oe(i,t.domain,a),Oe(i,t.scheme,u),Oe(i,t.slashscheme,c),Oe(a,r,s),Oe(a,t.domain,a);const f=ue(a,Ds);ue(s,Ds,f),ue(u,Ds,f),ue(c,Ds,f);const h=ue(s,Kr);Oe(h,r,s),Oe(h,t.domain,s);const m=lr();Oe(f,t.domain,m),Oe(m,t.domain,m);const g=ue(m,Kr);Oe(g,t.domain,m);const b=lr(Oee);Oe(g,t.tld,b),Oe(g,t.utld,b),ue(f,od,b);const x=ue(m,ur);ue(x,ur,x),Oe(x,t.domain,m),Oe(b,t.domain,m),ue(b,Kr,g),ue(b,ur,x);const k=ue(a,ur),E=ue(a,Kr);ue(k,ur,k),Oe(k,t.domain,a),Oe(E,r,s),Oe(E,t.domain,a);const D=lr(Th);Oe(E,t.tld,D),Oe(E,t.utld,D),Oe(D,t.domain,a),Oe(D,r,s),ue(D,Kr,E),ue(D,ur,k),ue(D,Ds,f);const T=ue(D,_o),$=lr(Th);Oe(T,t.numeric,$);const A=lr(Th),B=lr();Oe(A,e,A),Oe(A,n,B),Oe(B,e,A),Oe(B,n,B),ue(D,_r,A),ue($,_r,A);const R=ue(u,_o),M=ue(c,_o),O=ue(M,_r),j=ue(O,_r);Oe(u,t.domain,a),ue(u,Kr,E),ue(u,ur,k),Oe(c,t.domain,a),ue(c,Kr,E),ue(c,ur,k),Oe(R,t.domain,A),ue(R,_r,A),ue(R,Oc,A),Oe(j,t.domain,A),Oe(j,e,A),ue(j,_r,A);const q=[[Mc,Nc],[Ip,jp],[Fp,Kp],[_p,Vp],[Hp,Up],[qp,Gp],[Wp,Qp],[Yp,Xp]];for(let X=0;X<q.length;X++){const[G,Z]=q[X],F=ue(A,G);ue(B,G,F);const te=lr(Th);Oe(F,e,te);const P=lr();Oe(F,n,P),ue(F,Z,A),Oe(te,e,te),Oe(te,n,P),Oe(P,e,te),Oe(P,n,P),ue(te,Z,A),ue(P,Z,A)}return ue(i,od,D),ue(i,i1,Pee),{start:i,tokens:vN}}function Lee(t,e,n){let r=n.length,i=0,s=[],a=[];for(;i<r;){let u=t,c=null,f=null,h=0,m=null,g=-1;for(;i<r&&!(c=u.go(n[i].t));)a.push(n[i++]);for(;i<r&&(f=c||u.go(n[i].t));)c=null,u=f,u.accepts()?(g=0,m=u):g>=0&&g++,i++,h++;if(g<0)i-=h,i<r&&(a.push(n[i]),i++);else{a.length>0&&(s.push($y(cS,e,a)),a=[]),i-=g,h-=g;const b=m.t,x=n.slice(i-h,i);s.push($y(b,e,x))}}return a.length>0&&s.push($y(cS,e,a)),s}function $y(t,e,n){const r=n[0].s,i=n[n.length-1].e,s=e.slice(r,i);return new t(s,n)}const Iee=typeof console<"u"&&console&&console.warn||(()=>{}),jee="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",dt={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function Fee(){return On.groups={},dt.scanner=null,dt.parser=null,dt.tokenQueue=[],dt.pluginQueue=[],dt.customSchemes=[],dt.initialized=!1,dt}function dS(t,e=!1){if(dt.initialized&&Iee(`linkifyjs: already initialized - will not register custom scheme "${t}" ${jee}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
|
|
227
|
+
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
228
|
+
2. Cannot start or end with "-"
|
|
229
|
+
3. "-" cannot repeat`);dt.customSchemes.push([t,e])}function Kee(){dt.scanner=Nee(dt.customSchemes);for(let t=0;t<dt.tokenQueue.length;t++)dt.tokenQueue[t][1]({scanner:dt.scanner});dt.parser=zee(dt.scanner.tokens);for(let t=0;t<dt.pluginQueue.length;t++)dt.pluginQueue[t][1]({scanner:dt.scanner,parser:dt.parser});return dt.initialized=!0,dt}function c1(t){return dt.initialized||Kee(),Lee(dt.parser.start,t,kN(dt.scanner.start,t))}c1.scan=kN;function EN(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const r=new u1(n),i=c1(t),s=[];for(let a=0;a<i.length;a++){const u=i[a];u.isLink&&(!e||u.t===e)&&r.check(u)&&s.push(u.toFormattedObject(r))}return s}var d1="[\0- -\u2029 ]",_ee=new RegExp(d1),Vee=new RegExp(`${d1}$`),Hee=new RegExp(d1,"g");function Uee(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function qee(t){return new pt({key:new Vt("autolink"),appendTransaction:(e,n,r)=>{const i=e.some(f=>f.docChanged)&&!n.doc.eq(r.doc),s=e.some(f=>f.getMeta("preventAutolink"));if(!i||s)return;const{tr:a}=r,u=e8(n.doc,[...e]);if(Lx(u).forEach(({newRange:f})=>{const h=AQ(r.doc,f,b=>b.isTextblock);let m,g;if(h.length>1)m=h[0],g=r.doc.textBetween(m.pos,m.pos+m.node.nodeSize,void 0," ");else if(h.length){const b=r.doc.textBetween(f.from,f.to," "," ");if(!Vee.test(b))return;m=h[0],g=r.doc.textBetween(m.pos,f.to,void 0," ")}if(m&&g){const b=g.split(_ee).filter(Boolean);if(b.length<=0)return!1;const x=b[b.length-1],k=m.pos+g.lastIndexOf(x);if(!x)return!1;const E=c1(x).map(D=>D.toObject(t.defaultProtocol));if(!Uee(E))return!1;E.filter(D=>D.isLink).map(D=>({...D,from:k+D.start+1,to:k+D.end+1})).filter(D=>r.schema.marks.code?!r.doc.rangeHasMark(D.from,D.to,r.schema.marks.code):!0).filter(D=>t.validate(D.value)).filter(D=>t.shouldAutoLink(D.value)).forEach(D=>{Ix(D.from,D.to,r.doc).some(T=>T.mark.type===t.type)||a.addMark(D.from,D.to,t.type.create({href:D.href}))})}}),!!a.steps.length)return a}})}function Gee(t){return new pt({key:new Vt("handleClickLink"),props:{handleClick:(e,n,r)=>{var i,s;if(r.button!==0||!e.editable)return!1;let a=null;if(r.target instanceof HTMLAnchorElement)a=r.target;else{const c=r.target;if(!c)return!1;const f=t.editor.view.dom;a=c.closest("a"),a&&!f.contains(a)&&(a=null)}if(!a)return!1;let u=!1;if(t.enableClickSelection&&(u=t.editor.commands.extendMarkRange(t.type.name)),t.openOnClick){const c=a8(e.state,t.type.name),f=(i=a.href)!=null?i:c.href,h=(s=a.target)!=null?s:c.target;f&&(window.open(f,h),u=!0)}return u}}})}var Wee=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)$/,Qee=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)/g;function DN(t,e){let n=0;for(let r=e-1;r>=0&&t[r]==="\\";r-=1)n+=1;return n%2===1}function Yee(t,e){let n=0,r=0;for(;r<e;){if(t[r]!=="`"){r+=1;continue}if(n===0&&DN(t,r)){r+=1;continue}let i=0;for(;r<e&&t[r]==="`";)i+=1,r+=1;n===0?n=i:i===n&&(n=0)}return n>0}function SN(t,e,n){var r,i;const[,s,a]=e;return(e.index?t[e.index-1]:void 0)==="!"||DN(t,(r=e.index)!=null?r:0)||Yee(t,(i=e.index)!=null?i:0)?!1:!!s.trim()&&n(a)}function wN(t){var e,n;const[r,i,s,,a,u,c]=t,f=(e=a??u)!=null?e:c;return{index:(n=t.index)!=null?n:0,text:r,replaceWith:i,data:{href:s,title:f||null,markdown:!0}}}function Xee(t,e){return t.index<e.index+e.text.length&&e.index<t.index+t.text.length}function $N(t){var e,n,r;return{href:(e=t.data)==null?void 0:e.href,title:(r=(n=t.data)==null?void 0:n.title)!=null?r:null}}function Jee(t){const e=oa({find:n=>{const r=Wee.exec(n);return!r||!SN(n,r,t.isAllowedHref)?null:wN(r)},type:t.type,getAttributes:$N});return new Ad({find:e.find,handler:n=>{const r=e.handler(n);return r!==null&&n.state.tr.steps.length&&n.state.tr.setMeta("preventAutolink",!0),r}})}function Zee(t){const e=Gs({find:n=>{var r,i;const s=[];for(const u of n.matchAll(Qee))SN(n,u,t.isAllowedHref)&&s.push(wN(u));const a=((i=(r=t.findPlainUrls)==null?void 0:r.call(t,n))!=null?i:[]).filter(u=>!s.some(c=>Xee(c,u)));return[...s,...a]},type:t.type,getAttributes:$N});return new p8({find:e.find,handler:n=>{var r;const i=e.handler(n);return i!==null&&n.state.tr.steps.length&&((r=n.match.data)!=null&&r.markdown)&&n.state.tr.setMeta("preventAutolink",!0),i}})}function ete(t){return new pt({key:new Vt("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{shouldAutoLink:i}=t,{state:s}=e,{selection:a}=s,{empty:u}=a;if(u)return!1;let c="";r.content.forEach(h=>{c+=h.textContent});const f=EN(c,{defaultProtocol:t.defaultProtocol}).find(h=>h.isLink&&h.value===c);return!c||!f||i!==void 0&&!i(f.value)?!1:t.editor.commands.setMark(t.type,{href:f.href})}}})}function ki(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const i=typeof r=="string"?r:r.scheme;i&&n.push(i)}),!t||t.replace(Hee,"").match(new RegExp(`^(?:(?:${n.map(r=>r.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join("|")}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`,"i"))}var tte=xa.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){dS(t);return}dS(t.scheme,t.optionalSlashes)})},onDestroy(){Fee()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,markdownLinks:!1,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!ki(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>{const e=/^[a-z][a-z0-9+.-]*:\/\//i.test(t),n=/^[a-z][a-z0-9+.-]*:/i.test(t);if(e||n&&!t.includes("@"))return!0;const i=(t.includes("@")?t.split("@").pop():t).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(i)||!/\./.test(i))}}},addAttributes(){var t,e,n;return{href:{default:null,parseHTML(r){return r.getAttribute("href")}},target:{default:(t=this.options.HTMLAttributes.target)!=null?t:null},rel:{default:(e=this.options.HTMLAttributes.rel)!=null?e:null},class:{default:(n=this.options.HTMLAttributes.class)!=null?n:null},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!ki(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!ki(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",_t(this.options.HTMLAttributes,t),0]:["a",_t(this.options.HTMLAttributes,{...t,href:""}),0]},markdownTokenName:"link",parseMarkdown:(t,e)=>e.applyMark("link",e.parseInline(t.tokens||[]),{href:t.href,title:t.title||null}),renderMarkdown:(t,e)=>{var n,r,i,s;const a=(r=(n=t.attrs)==null?void 0:n.href)!=null?r:"",u=(s=(i=t.attrs)==null?void 0:i.title)!=null?s:"",c=e.renderChildren(t);return u?`[${c}](${a} "${u}")`:`[${c}](${a})`},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!ki(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e})=>{const{href:n}=t||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!ki(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addInputRules(){return this.options.markdownLinks?[Jee({type:this.type,isAllowedHref:t=>this.options.isAllowedUri(t,{defaultValidate:e=>!!ki(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})})]:[]},addPasteRules(){const t=e=>{const n=[];if(e){const{protocols:r,defaultProtocol:i}=this.options;EN(e).filter(a=>a.isLink&&this.options.isAllowedUri(a.value,{defaultValidate:u=>!!ki(u,r),protocols:r,defaultProtocol:i})).forEach(a=>{this.options.shouldAutoLink(a.value)&&n.push({text:a.value,data:{href:a.href},index:a.start})})}return n};return this.options.markdownLinks?[Zee({type:this.type,isAllowedHref:e=>this.options.isAllowedUri(e,{defaultValidate:n=>!!ki(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}),findPlainUrls:t})]:[Gs({find:t,type:this.type,getAttributes:e=>{var n;return{href:(n=e.data)==null?void 0:n.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(qee({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:i=>!!ki(i,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),t.push(Gee({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&t.push(ete({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),t}}),Ah=" ",Ty=" ",nte=Xn.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",_t(this.options.HTMLAttributes,t),0]},parseMarkdown:(t,e)=>{const n=t.tokens||[];if(n.length===1&&n[0].type==="image")return e.parseChildren([n[0]]);const r=e.parseInline(n);return n.length===1&&n[0].type==="text"&&(n[0].raw===Ah||n[0].text===Ah||n[0].raw===Ty||n[0].text===Ty)&&r.length===1&&r[0].type==="text"&&(r[0].text===Ah||r[0].text===Ty)?e.createNode("paragraph",void 0,[]):e.createNode("paragraph",void 0,r)},renderMarkdown:(t,e,n)=>{var r,i;if(!t)return"";const s=Array.isArray(t.content)?t.content:[];if(s.length===0){const a=Array.isArray((r=n?.previousNode)==null?void 0:r.content)?n.previousNode.content:[];return((i=n?.previousNode)==null?void 0:i.type)==="paragraph"&&a.length===0?Ah:""}return e.renderChildren(s)},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),rte=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,ite=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,ste=xa.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",_t(this.options.HTMLAttributes,t),0]},markdownTokenName:"del",parseMarkdown:(t,e)=>e.applyMark("strike",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`~~${e.renderChildren(t)}~~`,addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[oa({find:rte,type:this.type})]},addPasteRules(){return[Gs({find:ite,type:this.type})]}}),ote=Xn.create({name:"text",group:"inline",parseMarkdown:t=>({type:"text",text:t.text||""}),renderMarkdown:t=>t.text||""}),ate=xa.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",_t(this.options.HTMLAttributes,t),0]},parseMarkdown(t,e){return e.applyMark(this.name||"underline",e.parseInline(t.tokens||[]))},renderMarkdown(t,e){return`++${e.renderChildren(t)}++`},markdownTokenizer:{name:"underline",level:"inline",start(t){return t.indexOf("++")},tokenize(t,e,n){const i=/^(\+\+)([\s\S]+?)(\+\+)/.exec(t);if(!i)return;const s=i[2].trim();return{type:"underline",raw:i[0],text:s,tokens:n.inlineTokens(s)}}},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),lte=mt.create({name:"starterKit",addExtensions(){var t,e,n,r;const i=[];return this.options.bold!==!1&&i.push(lee.configure(this.options.bold)),this.options.blockquote!==!1&&i.push(ree.configure(this.options.blockquote)),this.options.bulletList!==!1&&i.push(T8.configure(this.options.bulletList)),this.options.code!==!1&&i.push(dee.configure(this.options.code)),this.options.codeBlock!==!1&&i.push(pee.configure(this.options.codeBlock)),this.options.document!==!1&&i.push(mee.configure(this.options.document)),this.options.dropcursor!==!1&&i.push(PX.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&i.push(zX.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&i.push(gee.configure(this.options.hardBreak)),this.options.heading!==!1&&i.push(bee.configure(this.options.heading)),this.options.undoRedo!==!1&&i.push(JX.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&i.push(yee.configure(this.options.horizontalRule)),this.options.italic!==!1&&i.push(Eee.configure(this.options.italic)),this.options.listItem!==!1&&i.push(R8.configure(this.options.listItem)),this.options.listKeymap!==!1&&i.push(L8.configure((t=this.options)==null?void 0:t.listKeymap)),this.options.link!==!1&&i.push(tte.configure((e=this.options)==null?void 0:e.link)),this.options.orderedList!==!1&&i.push(j8.configure(this.options.orderedList)),this.options.paragraph!==!1&&i.push(nte.configure(this.options.paragraph)),this.options.strike!==!1&&i.push(ste.configure(this.options.strike)),this.options.text!==!1&&i.push(ote.configure(this.options.text)),this.options.underline!==!1&&i.push(ate.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&i.push(XX.configure((r=this.options)==null?void 0:r.trailingNode)),i}}),ute=lte;function zc({defaultValue:t="",editable:e=!0,placeholder:n="",ariaLabel:r,autoFocus:i=!1,className:s,onBlur:a,onChange:u,onSubmit:c,ref:f}){const h=S.useRef({onBlur:a,onChange:u,onSubmit:c});h.current={onBlur:a,onChange:u,onSubmit:c};const m=S.useRef(""),[g]=S.useState(()=>[ute.configure({underline:!1,link:{openOnClick:!1}}),K8,F8.configure({nested:!0}),eZ,qX.configure({placeholder:n}),mt.create({name:"submitKeymap",addKeyboardShortcuts(){return{"Mod-Enter":()=>h.current.onSubmit?(h.current.onSubmit(),!0):!1}}})]),b=XZ({extensions:g,content:t,contentType:"markdown",editable:e,autofocus:i,editorProps:{attributes:{class:fe("typeset min-w-0 [--typeset-size:0.875rem]",s),...r?{"aria-label":r}:{}}},onCreate({editor:x}){m.current=x.getMarkdown()},onUpdate({editor:x}){h.current.onChange?.(x.getMarkdown())},onBlur({editor:x}){const k=x.getMarkdown();k!==m.current&&(m.current=k,h.current.onBlur?.(k))}});return S.useImperativeHandle(f,()=>({getMarkdown:()=>b?.getMarkdown()??"",clear:()=>{b?.commands.clearContent(!0),m.current=b?.getMarkdown()??""},focus:()=>b?.commands.focus()}),[b]),C.jsx(uN,{editor:b,"data-slot":"rich-text-editor"})}const ld="h-7 gap-1.5 self-start rounded-full pr-2.5 pl-1.5 font-normal";function TN({status:t,onChange:e,variant:n="ghost",className:r}){const[i,s]=S.useState(!1);return C.jsxs(kd,{isOpen:i,onOpenChange:s,children:[C.jsxs(Re,{variant:n,size:"sm","aria-label":"Status",className:fe(ld,r),children:[C.jsx(Mr,{status:t,className:"size-3.5"}),Ai[t]]}),C.jsx(Cd,{className:"w-56",children:C.jsxs(ql,{children:[C.jsx(Gl,{flush:!0,placeholder:"Change status"}),C.jsx(Wl,{selectionMode:"single",selectedKeys:[t],onAction:a=>{s(!1),e(a)},children:C.jsx(na,{children:Oi.map(a=>C.jsxs(Os,{id:a,textValue:Ai[a],children:[C.jsx(Mr,{status:a,className:"size-3.5"}),Ai[a]]},a))})})]})})]})}function cte({value:t,onChange:e,className:n}){const[r,i]=S.useState(""),s=()=>{const a=r.trim();a&&(e([...t,a]),i(""))};return C.jsxs(ga,{children:[C.jsxs(Re,{variant:"outline",size:"sm",className:fe(n,t.length>0&&"border-amber-500/40"),children:[C.jsx(Rm,{className:fe("size-3.5",t.length>0?"text-amber-500":"text-muted-foreground")}),C.jsx("span",{className:t.length>0?"text-amber-600 dark:text-amber-400":"text-muted-foreground",children:t.length>0?`${t.length} ask${t.length===1?"":"s"}`:"Asks"})]}),C.jsxs(ba,{className:"w-96 gap-2 p-3",children:[C.jsx("p",{className:"px-1 text-xs font-medium text-muted-foreground",children:"What does this ticket need a person for?"}),t.length>0&&C.jsx("div",{className:"flex flex-col gap-1",children:t.map((a,u)=>C.jsxs("div",{className:"group/ask flex items-start gap-2 rounded-xl px-1 py-0.5",children:[C.jsx("span",{className:"mt-1 size-3.5 shrink-0 rounded-full border-[1.5px] border-muted-foreground/50"}),C.jsx("span",{className:"min-w-0 flex-1 text-sm leading-snug",children:a}),C.jsx(Re,{variant:"ghost",size:"icon-xs","aria-label":"Remove ask",onPress:()=>e(t.filter((c,f)=>f!==u)),className:"text-muted-foreground opacity-0 group-hover/ask:opacity-100 focus-visible:opacity-100",children:C.jsx(Vi,{className:"size-3.5"})})]},u))}),C.jsxs("form",{className:"flex items-center gap-2",onSubmit:a=>{a.preventDefault(),s()},children:[C.jsx(ta,{autoFocus:!0,"aria-label":"Add an ask",placeholder:"e.g. Mint the API token and add it to secrets",value:r,onChange:a=>i(a.target.value),className:"h-8"}),C.jsxs(Re,{type:"submit",variant:"secondary",size:"sm",isDisabled:!r.trim(),children:[C.jsx(Ul,{className:"size-3.5"}),"Add"]})]})]})]})}const Bh=`${ld} self-auto`;function dte({open:t,onOpenChange:e,onCreated:n,allTasks:r}){const{project:i}=Qt(),[s,a]=S.useState(""),[u,c]=S.useState(""),f=S.useRef(null),[h,m]=S.useState("todo"),[g,b]=S.useState(null),[x,k]=S.useState([]),[E,D]=S.useState([]),[T,$]=S.useState(null),A=()=>{const B=s.trim();B&&($(null),oz({title:B,description:u.trim(),status:h,goal:g,tags:x,asks:E}).then(()=>{a(""),c(""),f.current?.clear(),m("todo"),b(null),k([]),D([]),e(!1),n()}).catch(R=>$(R.message)))};return C.jsxs(hx,{isOpen:t,onOpenChange:e,showCloseButton:!1,className:"gap-0 p-0 sm:max-w-2xl",children:[C.jsxs("div",{className:"flex items-center gap-1.5 px-4 pt-4 pb-2",children:[C.jsx("span",{className:"rounded-md bg-muted px-1.5 py-0.5 text-xs",children:i?.prefix??"…"}),C.jsx("span",{className:"text-muted-foreground",children:"›"}),C.jsx(px,{children:"New task"}),C.jsxs(yp,{variant:"ghost",size:"icon-sm",className:"ml-auto text-muted-foreground",children:[C.jsx(Vi,{}),C.jsx("span",{className:"sr-only",children:"Close"})]})]}),C.jsx("div",{className:"px-4",children:C.jsx(ta,{"aria-label":"Title",autoFocus:!0,value:s,onChange:B=>a(B.target.value),onKeyDown:B=>{B.key==="Enter"&&A()},placeholder:"Task title",className:"h-auto border-transparent bg-transparent px-0 py-1 text-lg font-medium shadow-none focus-visible:border-transparent focus-visible:ring-0 md:text-lg"})}),C.jsx("div",{className:"px-4 pt-1",children:C.jsx(zc,{ref:f,ariaLabel:"Description",defaultValue:u,onChange:c,onSubmit:A,placeholder:"Add description…",className:"min-h-24"})}),C.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 px-4 pt-3 pb-4",children:[C.jsx(TN,{status:h,onChange:m,variant:"outline",className:Bh}),C.jsx(Gr,{label:"Goal",mode:"single",allowCreate:!1,options:Pm(r),value:g?[g]:[],onChange:B=>b(B[0]??null),placeholder:"Goal",chevron:!1,className:Bh,renderValue:B=>C.jsxs(C.Fragment,{children:[C.jsx(Yc,{className:"size-3.5 text-muted-foreground"}),C.jsx("span",{className:fe("truncate",B.length===0&&"text-muted-foreground"),children:B[0]??"Goal"})]})}),C.jsx(Gr,{label:"Tags",mode:"multiple",options:Om(r),value:x,onChange:k,placeholder:"Tags",chevron:!1,className:Bh,renderValue:B=>C.jsxs(C.Fragment,{children:[C.jsx(bp,{className:"size-3.5 text-muted-foreground"}),C.jsx("span",{className:fe("truncate",B.length===0&&"text-muted-foreground"),children:B.length>0?B.join(", "):"Tags"})]})}),C.jsx(cte,{value:E,onChange:D,className:Bh})]}),T&&C.jsx("p",{className:"px-4 pb-3 text-sm whitespace-pre-wrap text-destructive",children:T}),C.jsx("div",{className:"flex justify-end border-t px-4 py-3",children:C.jsx(Re,{size:"sm",onPress:A,isDisabled:!s.trim(),children:"Create task"})})]})}function fte(){const{query:t,setQuery:e}=Qt();return C.jsxs(o7,{className:"h-8 w-36 transition-[width] focus-within:w-56 sm:w-44 sm:focus-within:w-64",children:[C.jsx(k4,{children:C.jsx(i7,{})}),C.jsx(mU,{value:t,onChange:n=>e(n.target.value),onKeyDown:n=>{n.key==="Escape"&&t!==""&&(n.stopPropagation(),e(""))},placeholder:"Search tasks…","aria-label":"Search tasks",className:"text-sm"}),t!==""&&C.jsx(k4,{align:"inline-end",children:C.jsx("button",{type:"button","aria-label":"Clear search",className:"flex cursor-pointer items-center text-muted-foreground hover:text-foreground",onClick:()=>e(""),children:C.jsx(Vi,{className:"size-3.5"})})})]})}function hte(t){const e=new Date(t),n={month:"short",day:"numeric"};return e.getFullYear()!==new Date().getFullYear()&&(n.year="numeric"),e.toLocaleDateString("en-US",n)}function pte(t,e=Date.now()){const n=Math.max(0,(e-Date.parse(t))/1e3);if(n<90)return"just now";const[r,i]=n<3600?[Math.floor(n/60),"minute"]:n<86400?[Math.floor(n/3600),"hour"]:[Math.floor(n/86400),"day"];return`${r} ${i}${r===1?"":"s"} ago`}function ud(t){const e=Math.max(0,(Date.now()-Date.parse(t))/1e3);return e<60?"now":e<3600?`${Math.floor(e/60)}m`:e<86400?`${Math.floor(e/3600)}h`:`${Math.floor(e/86400)}d`}const fS=2,mte="/snapshot.json";function gte(t){const e=t;if(!e||typeof e!="object"||!Array.isArray(e.boards)||!e.data||typeof e.data!="object")throw new Error("not a task snapshot");if(e.version!==fS)throw new Error(`snapshot is version ${String(e.version)}; this board reads ${fS}`);const n=e.meta;if(!n||typeof n.builtAt!="string")throw new Error("snapshot has no build time");return{version:e.version,meta:{commit:n.commit??null,builtAt:n.builtAt},boards:e.boards,data:e.data}}async function bte(t=mte){const e=await fetch(t);if(!e.ok)throw new Error(`no snapshot at ${t} (${e.status})`);return gte(await e.json())}function yte(t){return(e,n)=>new Promise(r=>r(xte(t,e,n?.method??"GET")))}function xte(t,e,n){if(n!=="GET")throw new gl(405,"this board is a snapshot — export again to change it","read-only");const r=new URL(e,"http://snapshot.invalid"),i=r.pathname;if(i==="/boards")return{boards:t.boards};const s=r.searchParams.get("board")??t.boards[0]?.id??".",a=t.data[s];if(!a)throw new gl(404,`no such board: ${s}`,null);if(i==="/project")return{...a.project,readOnly:!0,git:void 0};if(i==="/goals")return{goals:a.goals};if(i==="/tasks")return{tasks:a.tasks.map(c=>hS(a,c))};const u=/^\/tasks\/([^/]+)$/.exec(i);if(u){const c=decodeURIComponent(u[1]),f=a.tasks.find(h=>h.key===c);if(!f)throw new gl(404,`no such task: ${c}`,null);return{task:hS(a,f),comments:AN(a,c)}}throw new gl(404,`not in this snapshot: ${i}`,null)}function AN(t,e){return t.comments[e]??[]}function hS(t,e){return{...e,commentCount:AN(t,e.key).length}}let BN=null;function vte(t){tz(t?yte(t):null),iz(t?()=>()=>{}:null),BN=t?t.meta:null}function kte(){return BN}function Cte(t,e=Date.now()){const n=t.commit?`snapshot of ${t.commit.slice(0,7)}`:"snapshot",r=Date.parse(t.builtAt);return Number.isFinite(r)?`${n}, built ${pte(t.builtAt,e)}`:`${n}, built at an unknown time`}function Ete(){const t=kte(),[,e]=S.useState(0);return S.useEffect(()=>{if(!t)return;const n=setInterval(()=>e(r=>r+1),6e4);return()=>clearInterval(n)},[t]),t?C.jsxs("div",{className:"flex shrink-0 items-center gap-1.5 border-b bg-muted/40 px-4 py-1.5 text-xs text-muted-foreground",children:[C.jsx(_H,{className:"size-3.5 shrink-0"}),C.jsx("span",{className:"truncate",children:Cte(t)})]}):null}function wt({className:t}){return C.jsx("div",{className:fe("skeleton rounded-sm",t)})}const pS=["w-4/5","w-3/5","w-11/12","w-2/3"],mS=[3,2,3,1,2],gS=["w-64","w-96","w-52","w-80","w-72","w-60"];function Dte({index:t}){return C.jsxs("article",{className:"rounded-2xl bg-card p-3 shadow-xs ring-1 ring-foreground/5 dark:ring-foreground/10",children:[C.jsx(wt,{className:"h-3 w-12"}),C.jsxs("div",{className:"mt-2.5 space-y-1.5",children:[C.jsx(wt,{className:"h-3.5 w-full"}),C.jsx(wt,{className:fe("h-3.5",pS[t%pS.length])})]}),C.jsxs("div",{className:"mt-3 flex items-center gap-1.5",children:[C.jsx(wt,{className:"h-4 w-12 rounded-full"}),t%2===0&&C.jsx(wt,{className:"h-4 w-16 rounded-full"}),C.jsx(wt,{className:"ml-auto h-3 w-8"})]})]})}function Ste({visibleStatuses:t}){const e=Oi.filter(n=>t.includes(n));return C.jsx("div",{"aria-hidden":!0,className:"flex flex-1 gap-3 overflow-x-auto p-4",children:e.map((n,r)=>C.jsxs("section",{className:"flex w-72 shrink-0 flex-col rounded-3xl bg-muted/50",children:[C.jsxs("header",{className:"flex items-center gap-2 px-4 pt-3 pb-2",children:[C.jsx(Mr,{status:n}),C.jsx("h2",{className:"text-sm font-medium",children:Ai[n]})]}),C.jsx("div",{className:"flex min-h-16 flex-1 flex-col gap-2 overflow-hidden px-2 pb-2",children:Array.from({length:mS[r%mS.length]}).map((i,s)=>C.jsx(Dte,{index:r+s},s))})]},n))})}function wte(){return C.jsx("div",{"aria-hidden":!0,className:"flex min-h-0 flex-1 flex-col pt-2",children:C.jsx("div",{className:"flex-1 overflow-hidden px-2.5 pb-4",children:Array.from({length:12}).map((t,e)=>C.jsxs("div",{className:"flex h-5 items-center gap-2.5 px-6 py-2.5 box-content",children:[C.jsx(wt,{className:"h-3 w-16 shrink-0"}),C.jsx(wt,{className:"size-3.5 shrink-0 rounded-full"}),C.jsx(wt,{className:fe("h-3.5 max-w-full min-w-0 shrink",gS[e%gS.length])}),C.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-1.5 pl-3",children:[e%3!==1&&C.jsx(wt,{className:"h-4 w-14 rounded-full"}),e%4===0&&C.jsx(wt,{className:"h-4 w-10 rounded-full"}),C.jsx(wt,{className:"h-3 w-8"})]})]},e))})})}function MN(){return C.jsx("main",{"aria-hidden":!0,className:"min-w-0 flex-1 overflow-y-auto",children:C.jsxs("div",{className:"mx-auto flex w-full max-w-6xl items-start gap-20 px-8 pt-16 pb-10",children:[C.jsxs("div",{className:"flex min-w-0 max-w-3xl flex-1 flex-col gap-6",children:[C.jsx(wt,{className:"my-1 h-7 w-2/3"}),C.jsxs("div",{className:"flex flex-col gap-2.5",children:[C.jsx(wt,{className:"h-3.5 w-full"}),C.jsx(wt,{className:"h-3.5 w-11/12"}),C.jsx(wt,{className:"h-3.5 w-3/4"}),C.jsx(wt,{className:"h-3.5 w-1/2"})]})]}),C.jsxs("aside",{className:"flex w-64 shrink-0 flex-col gap-1.5 pt-2 max-lg:hidden",children:[C.jsx(wt,{className:"mb-1 h-3 w-16"}),C.jsx(wt,{className:"h-7 w-32 rounded-md"}),C.jsx(wt,{className:"h-7 w-24 rounded-md"}),C.jsx(wt,{className:"h-7 w-28 rounded-md"})]})]})})}function $te({view:t,visibleStatuses:e}){return t==="board"?C.jsx(Ste,{visibleStatuses:e}):C.jsx(wte,{})}const Tte={view:"board",boardColumns:["backlog","todo","in_progress","done"]};function bS(t,e,n){const r=()=>{try{const u=localStorage.getItem(t);return u==null?e:n(JSON.parse(u))??e}catch{return e}},[i,s]=S.useState(()=>({key:t,value:r()}));i.key!==t&&s({key:t,value:r()});const a=u=>{s({key:t,value:u});try{localStorage.setItem(t,JSON.stringify(u))}catch{}};return[i.value,a]}function NN(t){return typeof t=="string"&&Oi.includes(t)}function Ate(t){if(typeof t!="object"||t===null)return null;const{view:e,boardColumns:n}=t;return e!=="board"&&e!=="list"||!Array.isArray(n)?null:{view:e,boardColumns:n.filter(NN)}}function Bte(t){if(typeof t!="object"||t===null)return null;const{statuses:e,tags:n,goal:r,needsHuman:i}=t;return!Array.isArray(e)||!Array.isArray(n)||r!==null&&typeof r!="string"||typeof i!="boolean"?null:{statuses:e.filter(NN),tags:n.filter(s=>typeof s=="string"),goal:r,needsHuman:i}}function Mte({className:t,size:e="default",...n}){return C.jsxs("div",{className:fe("group/native-select relative w-fit has-[select:disabled]:opacity-50",t),"data-slot":"native-select-wrapper","data-size":e,children:[C.jsx("select",{"data-slot":"native-select","data-size":e,className:"h-9 w-full min-w-0 appearance-none rounded-3xl border border-transparent bg-input/50 py-1 pr-8 pl-3 text-sm transition-[color,box-shadow,background-color] outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-8 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",...n}),C.jsx(n7,{className:"pointer-events-none absolute top-1/2 right-2.5 size-4 -translate-y-1/2 text-muted-foreground select-none","aria-hidden":"true","data-slot":"native-select-icon"})]})}function eg(){const{project:t}=Qt();return t?.git??null}function f1(){const t=eg(),{board:e,boards:n}=Qt(),r=fm(t!==null);return S.useMemo(()=>{const i=e??n[0]?.id??".",s=new Set;for(const a of r.data?.dirty??[])a.board===i&&a.ticket!==null&&s.add(a.ticket);return s},[r.data,e,n])}function RN(){const t=eg(),{board:e,boards:n}=Qt(),r=fm(t!==null);return S.useMemo(()=>{const i=e??n[0]?.id??".";return new Map((r.data?.claims??[]).filter(s=>s.board===i).map(s=>[s.ticket,s]))},[r.data,e,n])}function o3(t,e){const n=new Set;for(const r of t.dirty){const i=e.get(r.board);r.ticket!==null&&i&&n.add(`${i}-${r.ticket}`)}return[...n]}function Nte(){const t=eg(),{boards:e}=Qt(),n=fd(),r=fm(t!==null).data??null,i=xz(t!==null).data??[],[s,a]=S.useState(!1),[u,c]=S.useState(!1),[f,h]=S.useState(null),m=r?.branch!=null&&r.branch!==r.defaultBranch,g=zy(r?.branch??null,t?.gh===!0&&m).data?.pr??null;if(!t||!r)return null;const b=()=>{n.invalidateQueries({queryKey:["git"]}),n.invalidateQueries({queryKey:["tasks"]}),n.invalidateQueries({queryKey:["task"]})},x=D=>{if(D===r.branch){a(!1);return}h(null),kz(D).then(()=>{a(!1),b()}).catch(T=>h(T.message))},k=r.dirty.length,E=new Map(e.map(D=>[D.id,D.prefix]));return C.jsxs(C.Fragment,{children:[C.jsxs(ga,{isOpen:s,onOpenChange:D=>{a(D),D||h(null)},children:[C.jsxs(Re,{variant:"ghost",size:"sm","aria-label":"Git status",className:"h-7 min-w-0 shrink rounded-md px-1.5 font-normal text-muted-foreground",children:[C.jsx(ea,{"data-icon":"inline-start",className:"size-3.5"}),C.jsx("span",{className:"max-w-40 truncate",children:r.branch??"detached"}),k>0&&C.jsx("span",{className:"flex h-4 min-w-4 items-center justify-center rounded-full bg-amber-500/15 px-1 text-[10px] font-semibold text-amber-700 tabular-nums dark:text-amber-400",children:k}),(r.ahead??0)>0&&C.jsxs("span",{className:"flex items-center text-[10px] tabular-nums",children:[C.jsx(DH,{className:"size-2.5"}),r.ahead]}),(r.behind??0)>0&&C.jsxs("span",{className:"flex items-center text-[10px] tabular-nums",children:[C.jsx(vH,{className:"size-2.5"}),r.behind]})]}),C.jsxs(ba,{placement:"bottom start",className:"w-80 gap-0 p-0",children:[C.jsxs("div",{className:"flex items-center gap-2 px-3 pt-3 pb-2",children:[C.jsx(ea,{className:"size-3.5 shrink-0 text-muted-foreground"}),C.jsx("p",{className:"min-w-0 truncate text-sm font-medium",children:r.branch??"detached HEAD"}),r.upstream?C.jsxs("p",{className:"ml-auto shrink-0 text-[11px] text-muted-foreground tabular-nums",children:[(r.ahead??0)>0&&`↑${r.ahead} `,(r.behind??0)>0&&`↓${r.behind} `,(r.ahead??0)===0&&(r.behind??0)===0&&"in sync"]}):C.jsx("p",{className:"ml-auto shrink-0 text-[11px] text-muted-foreground",children:"not pushed"})]}),C.jsxs("div",{className:"border-t px-3 py-2",children:[k===0?C.jsx("p",{className:"text-xs text-muted-foreground",children:"No uncommitted board edits"}):C.jsxs("div",{className:"flex flex-col gap-1.5",children:[C.jsxs("p",{className:"text-xs text-muted-foreground",children:[k," board file",k===1?"":"s"," changed",o3(r,E).length>0&&` — ${o3(r,E).join(", ")}`]}),C.jsx(Re,{size:"sm",className:"self-start",onPress:()=>{a(!1),c(!0)},children:"Commit board changes…"})]}),r.otherDirty>0&&C.jsxs("p",{className:"pt-1.5 text-[11px] text-muted-foreground/70",children:[r.otherDirty," other file",r.otherDirty===1?"":"s"," dirty in the tree — board commits never touch them"]})]}),m&&C.jsx("div",{className:"border-t px-3 py-2",children:g?C.jsxs("a",{href:g.url,target:"_blank",rel:"noreferrer",className:"flex items-center gap-1.5 text-sm hover:underline",children:[C.jsx(vd,{className:"size-3.5 shrink-0 text-muted-foreground"}),C.jsxs("span",{className:"min-w-0 truncate",children:["#",g.number," ",g.title]}),C.jsx(ON,{pr:g})]}):C.jsx(Rte,{cap:t,branch:r.branch,base:r.defaultBranch,onDone:b,onError:h})}),C.jsx("div",{className:"border-t",children:C.jsxs(ql,{children:[C.jsx(Gl,{flush:!0,placeholder:"Switch branch"}),C.jsx(Wl,{selectionMode:"single",selectedKeys:r.branch?[r.branch]:[],onAction:D=>x(String(D)),className:"max-h-48",children:C.jsx(na,{children:i.map(D=>C.jsxs(Os,{id:D.name,textValue:D.name,children:[C.jsx("span",{className:"truncate",children:D.name}),D.isDefault&&C.jsx("span",{className:"ml-auto text-[10px] text-muted-foreground",children:"default"})]},D.name))})})]})}),f&&C.jsx("p",{className:"border-t px-3 py-2 text-xs text-red-600 dark:text-red-400",children:f})]})]}),C.jsx(Ote,{open:u,onOpenChange:c,cap:t,status:r,prefixes:E,onDone:b})]})}function ON({pr:t}){const e=t.state==="open"?t.draft?"draft":"open":t.state;return C.jsx("span",{className:fe("shrink-0 rounded-full px-1.5 py-0.5 text-[10px] font-medium",t.state==="merged"&&"bg-purple-500/15 text-purple-700 dark:text-purple-400",t.state==="closed"&&"bg-red-500/15 text-red-700 dark:text-red-400",t.state==="open"&&!t.draft&&"bg-green-600/15 text-green-700 dark:text-green-500",t.state==="open"&&t.draft&&"bg-muted text-muted-foreground"),children:e})}function Rte({cap:t,branch:e,base:n,onDone:r,onError:i}){const[s,a]=S.useState(!1);if(!t.gh&&!t.repo)return null;const u=()=>{a(!0),US({branch:e,base:n}).then(c=>{window.open(c.url,"_blank","noopener"),r()}).catch(c=>i(c.message)).finally(()=>a(!1))};return C.jsxs(Re,{variant:"outline",size:"sm",isDisabled:s,onPress:u,children:[C.jsx(vd,{"data-icon":"inline-start",className:"size-3.5"}),t.gh?"Open a PR":"Open compare page"]})}function Ote({open:t,onOpenChange:e,cap:n,status:r,prefixes:i,onDone:s}){const a=r.branch===r.defaultBranch,u=o3(r,i),c=`chore(board): ${u.length>0?u.join(", "):"board edits"}`,f=`board/${new Date().toISOString().slice(0,10)}`,[h,m]=S.useState(null),[g,b]=S.useState(null),[x,k]=S.useState(null),[E,D]=S.useState(!0),[T,$]=S.useState(!1),[A,B]=S.useState(!1),[R,M]=S.useState(null),[O,j]=S.useState(t);t!==O&&(j(t),t&&(m(null),b(null),k(null),D(!0),$(!1),M(null)));const q=()=>{const X=(h??c).trim();if(!X||A)return;B(!0),M(null);const G=(g??f).trim();vz({message:X,...a?{newBranch:G,base:x??r.branch??void 0}:{}}).then(async()=>{if(a&&E){const Z=await US({branch:G,base:x??r.defaultBranch,title:X,draft:n.gh?T:void 0});window.open(Z.url,"_blank","noopener")}e(!1),s()}).catch(Z=>M(Z.message)).finally(()=>B(!1))};return C.jsxs(hx,{isOpen:t,onOpenChange:e,showCloseButton:!1,className:"gap-0 p-0 sm:max-w-lg",children:[C.jsxs("div",{className:"flex items-center gap-1.5 px-4 pt-4 pb-2",children:[C.jsx(ea,{className:"size-3.5 text-muted-foreground"}),C.jsx(px,{children:"Commit board changes"}),C.jsxs(yp,{variant:"ghost",size:"icon-sm",className:"ml-auto text-muted-foreground",children:[C.jsx(Vi,{}),C.jsx("span",{className:"sr-only",children:"Close"})]})]}),C.jsx("div",{className:"flex max-h-40 flex-col gap-0.5 overflow-y-auto px-4 py-1",children:r.dirty.map(X=>C.jsxs("p",{className:"flex items-center gap-1.5 text-xs",children:[C.jsx("span",{className:fe("w-4 shrink-0 text-center font-mono",X.status==="deleted"?"text-red-600 dark:text-red-400":"text-green-700 dark:text-green-500"),children:X.status==="deleted"?"−":X.status==="modified"?"±":"+"}),C.jsx("span",{className:"min-w-0 truncate text-muted-foreground",children:X.path})]},X.path))}),C.jsx("div",{className:"px-4 pt-2",children:C.jsx(ta,{"aria-label":"Commit message",autoFocus:!0,value:h??c,onChange:X=>m(X.target.value),onKeyDown:X=>{X.key==="Enter"&&q()}})}),a&&C.jsxs("div",{className:"flex flex-col gap-2 px-4 pt-3",children:[C.jsxs("p",{className:"text-xs text-muted-foreground",children:[r.branch," is the default branch — these edits go to a new board branch instead."]}),C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx(ta,{"aria-label":"New branch name",value:g??f,onChange:X=>b(X.target.value),className:"h-8 flex-1 font-mono text-xs"}),C.jsx("span",{className:"text-xs text-muted-foreground",children:"from"}),C.jsx(Mte,{"aria-label":"Base branch",value:x??r.branch??"",onChange:X=>k(X.target.value),className:"h-8 w-32 text-xs",children:C.jsx("option",{value:r.branch??"",children:r.branch})})]}),C.jsxs("div",{className:"flex items-center gap-4",children:[C.jsx(yS,{checked:E,onChange:D,children:n.gh?"Open a PR":"Open the compare page"}),n.gh&&E&&C.jsx(yS,{checked:T,onChange:$,children:"Draft"})]})]}),R&&C.jsx("p",{className:"px-4 pt-2 text-xs text-red-600 dark:text-red-400",children:R}),C.jsxs("div",{className:"flex items-center justify-end gap-2 border-t px-4 py-3 mt-4",children:[C.jsx(yp,{variant:"ghost",size:"sm",children:"Cancel"}),C.jsx(Re,{size:"sm",isDisabled:A,onPress:q,children:a&&E?"Commit and open PR":"Commit"})]})]})}function yS({checked:t,onChange:e,children:n}){return C.jsxs("button",{type:"button",onClick:()=>e(!t),className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[C.jsx("span",{className:fe("flex size-3.5 items-center justify-center rounded border",t&&"border-transparent bg-foreground text-background"),children:t&&C.jsx(ma,{className:"size-2.5",strokeWidth:3})}),n]})}function h1({className:t}){return C.jsx("span",{title:"Uncommitted edits","aria-label":"Uncommitted edits",className:fe("size-1.5 shrink-0 rounded-full bg-amber-500",t)})}function Pte({prompt:t,onCancel:e,onRelease:n}){const[r,i]=S.useState(""),[s,a]=S.useState(!1),[u,c]=S.useState(null),[f,h]=S.useState(t!==null);t!==null!==f&&(h(t!==null),t!==null&&(i(""),a(!1),c(null)));const m=()=>{s||(a(!0),c(null),n(r.trim()).catch(g=>c(g.message)).finally(()=>a(!1)))};return C.jsxs(hx,{isOpen:t!==null,onOpenChange:g=>{g||e()},showCloseButton:!1,className:"gap-0 p-0 sm:max-w-md",children:[C.jsxs("div",{className:"flex items-center gap-1.5 px-4 pt-4 pb-2",children:[C.jsx(ea,{className:"size-3.5 text-muted-foreground"}),C.jsxs(px,{children:["Release the claim on ",t?.taskId,"?"]})]}),C.jsxs("p",{className:"px-4 text-sm text-muted-foreground",children:[t?.taskId," is claimed — ",C.jsx("span",{className:"font-mono text-xs",children:t?.branch})," ","exists on origin. Moving it out of In Progress releases the claim: the branch is deleted on origin and locally",t&&t.commits>0?`, discarding ${t.commits} commit${t.commits===1?"":"s"} of work`:"",". Only then does the ticket move."]}),C.jsx("div",{className:"px-4 pt-3",children:C.jsx(s7,{"aria-label":"What was tried",placeholder:"Why release it? The note lands on the ticket for the next worker.",value:r,onChange:g=>i(g.target.value),className:"min-h-16 text-sm"})}),u&&C.jsx("p",{className:"px-4 pt-2 text-xs text-red-600 dark:text-red-400",children:u}),C.jsxs("div",{className:"flex items-center justify-end gap-2 border-t px-4 py-3 mt-4",children:[C.jsx(Re,{variant:"ghost",size:"sm",onPress:e,children:"Keep the claim"}),C.jsx(Re,{variant:"destructive",size:"sm",isDisabled:s,onPress:m,children:"Release and move"})]})]})}function zte(){const t=HS(),e=t.data??[],n=e.reduce((u,c)=>u+c.asks.length,0),[r,i]=S.useState(null),s=r===null?e:e.filter(u=>u.prefix===r),a=[...new Set(e.map(u=>u.prefix))];return C.jsxs(ga,{children:[C.jsxs(Re,{variant:"ghost",size:"icon-sm","aria-label":"Inbox",className:"relative",children:[C.jsx(qH,{}),n>0&&C.jsx("span",{className:"absolute -top-0.5 -right-0.5 flex h-4 min-w-4 items-center justify-center rounded-full bg-amber-500 px-1 text-[10px] font-semibold text-white tabular-nums",children:n})]}),C.jsxs(ba,{placement:"bottom end",className:"w-100 gap-1 p-2",children:[C.jsxs("div",{className:"flex items-center gap-2 px-3 pt-2 pb-1.5",children:[C.jsx("p",{className:"text-sm font-medium",children:"Inbox"}),C.jsx("p",{className:"text-xs text-muted-foreground",children:n===0?"nothing needs you":`${n} open ask${n===1?"":"s"}`}),a.length>1&&C.jsx("div",{className:"ml-auto flex items-center gap-1",children:[null,...a].map(u=>C.jsx("button",{onClick:()=>i(u),className:fe("rounded-full px-2 py-0.5 text-[11px] transition-colors",r===u?"bg-foreground text-background":"text-muted-foreground hover:bg-muted"),children:u??"All"},u??"all"))})]}),s.length===0?C.jsx("p",{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:t.isError?"This board's server doesn't serve an inbox.":"Inbox zero — no open asks on in-progress work."}):C.jsx("div",{className:"flex flex-col",children:s.map(u=>C.jsx(Lte,{entry:u},`${u.board}:${u.task.key}`))})]})]})}function Lte({entry:t}){const{boards:e}=Qt(),n=t.asks[0],r=t.asks.length===1?n.text:`${t.asks.length} asks · ${n.text}`,i=e[0]?.id===t.board?"":`?board=${encodeURIComponent(t.board)}`;return C.jsxs(_3,{href:`/task/${t.task.key}${i}`,className:"flex flex-col gap-0.5 rounded-2xl px-3 py-2 outline-none hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring",children:[C.jsxs("span",{className:"flex items-baseline gap-1.5",children:[C.jsx("span",{className:"size-1.5 shrink-0 self-center rounded-full bg-amber-500"}),C.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:t.task.id}),C.jsx("span",{className:"truncate text-sm font-medium",children:t.task.title}),t.claim&&C.jsxs("span",{title:`In progress via ${t.claim.branch}`,className:"flex shrink-0 items-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground",children:[C.jsx(ea,{className:"size-2.5","aria-hidden":!0}),"claimed"]}),C.jsx("span",{className:"ml-auto shrink-0 pl-2 text-[11px] text-muted-foreground/70 tabular-nums",children:ud(n.createdAt)})]}),C.jsx("span",{className:"truncate pl-3 text-xs text-muted-foreground",children:r})]})}function Ite(){const t=ji(),e=fd(),n=Qs({strict:!1}),i=ww()({to:"/"})!==!1,s=pz(),a=s.data,u=a??[],c=n.board??u[0]?.id??null,f=mz(c),h=f.data??null,m=gz(c),g=m.data??[],b=s.error??f.error??m.error,[x,k]=bS("task-ui:view",Tte,Ate),[E,D]=bS(`task-ui:filters:${c??""}`,f7,Bte),[T,$]=S.useState(!1),[A,B]=S.useState(""),[R,M]=S.useState(c);c!==R&&(M(c),B("")),S.useEffect(()=>sz(F=>{const te=dm()??void 0;(F===void 0||te===void 0||F===te)&&(e.invalidateQueries({queryKey:["tasks"]}),e.invalidateQueries({queryKey:["task"]})),e.invalidateQueries({queryKey:["inbox"]}),e.invalidateQueries({queryKey:["git"]})}),[e]),S.useEffect(()=>{!a||!n.board||a.some(F=>F.id===n.board)||t({to:"/",search:n.ref?{ref:n.ref}:{},replace:!0})},[a,n.board,n.ref,t]);const O=F=>{F!==c&&t({to:"/",search:{...F===u[0]?.id?{}:{board:F},...n.ref?{ref:n.ref}:{}}})},j=h?h.readOnly??!1:null,q=!b&&(j===null||m.isPending),[X,G]=S.useState(!1);j===!1&&!X&&G(!0);const Z=j===!1||j===null&&X;return C.jsxs(a7.Provider,{value:{project:h,tasks:g,boards:u,board:c,switchBoard:O,filters:E,setFilters:D,query:A,setQuery:B,settings:x,setSettings:k,readOnly:j??!0,failed:b!=null},children:[C.jsxs("div",{className:"flex h-dvh flex-col bg-background",children:[C.jsxs("header",{className:"flex h-14 shrink-0 items-center gap-4 border-b px-4",children:[C.jsx(yU,{}),C.jsx(Nte,{}),C.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-1.5",children:[i&&C.jsxs(C.Fragment,{children:[C.jsx(fte,{}),C.jsx(BU,{}),C.jsx(DU,{})]}),C.jsx(zte,{}),Z&&C.jsxs(Re,{size:"sm",className:"ml-1.5",isDisabled:q,onPress:()=>$(!0),children:[C.jsx(Ul,{"data-icon":"inline-start"}),"New task"]})]})]}),C.jsx(Ete,{}),i&&h7(E)&&C.jsx(AU,{}),b?C.jsx(fH,{error:b}):q?i?C.jsx($te,{view:x.view,visibleStatuses:x.boardColumns}):C.jsx(MN,{}):C.jsx(Dw,{})]}),C.jsx(dte,{open:T,onOpenChange:$,onCreated:()=>{e.invalidateQueries({queryKey:["tasks"]})},allTasks:g})]})}function jte({error:t}){return C.jsx("div",{className:"flex min-h-[60dvh] flex-1 items-center justify-center bg-background px-6",children:C.jsxs("div",{className:"w-full max-w-sm text-center",children:[C.jsx("h1",{className:"text-lg font-medium",children:"Something went wrong"}),C.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"The board hit an error it couldn’t recover from. Reloading usually clears it."}),C.jsx(Re,{variant:"secondary",className:"mt-6",onPress:()=>location.reload(),children:"Reload"}),t instanceof Error&&t.message&&C.jsx("p",{className:"mt-4 text-xs break-words text-muted-foreground/60",children:t.message})]})})}function Fte(){return C.jsx("div",{className:"flex min-h-[60dvh] flex-1 items-center justify-center bg-background px-6",children:C.jsxs("div",{className:"w-full max-w-sm text-center",children:[C.jsx("h1",{className:"text-lg font-medium",children:"Nothing here"}),C.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"This page doesn’t exist on this board."})]})})}const xS=ha("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-3xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function Fl({className:t,variant:e="default",render:n,...r}){if(n){const i={"data-slot":"badge","data-variant":e,className:fe(xS({variant:e}),t),...r};return n(i)}return C.jsx("span",{"data-slot":"badge","data-variant":e,className:fe(xS({variant:e}),t),...r})}function PN({className:t,...e}){return C.jsx("div",{"data-slot":"empty",className:fe("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-2xl border-dashed p-12 text-center text-balance",t),...e})}function zN({className:t,...e}){return C.jsx("div",{"data-slot":"empty-header",className:fe("flex max-w-sm flex-col items-center gap-2",t),...e})}function LN({className:t,...e}){return C.jsx("div",{"data-slot":"empty-title",className:fe("font-heading text-lg font-medium tracking-tight",t),...e})}function IN({className:t,...e}){return C.jsx("div",{"data-slot":"empty-description",className:fe("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",t),...e})}const Kte=vw("/goal/$slug");function _te(){const{slug:t}=Kte.useParams(),{tasks:e,board:n}=Qt(),r=bz(n),i=r.data?.find(c=>c.slug===t)??null,s=e.filter(c=>c.goal===t),a=new Map(Oi.map((c,f)=>[c,f]));s.sort((c,f)=>a.get(c.status)-a.get(f.status)||c.position-f.position);const u=s.filter(c=>c.status==="done"||c.status==="canceled").length;return!i&&s.length===0&&!r.isPending?C.jsx("main",{className:"flex flex-1 items-center justify-center",children:C.jsx(PN,{children:C.jsxs(zN,{children:[C.jsx(LN,{children:"No such goal"}),C.jsxs(IN,{children:["Nothing here is named “",t,"” — it may have been deleted, or never created."]})]})})}):C.jsx("main",{className:"min-w-0 flex-1 overflow-y-auto",children:C.jsxs("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-6 px-8 pt-16 pb-10",children:[C.jsxs("header",{className:"flex flex-col gap-2",children:[C.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[C.jsx(Yc,{className:"size-3.5"}),C.jsx("span",{children:"Goal"}),C.jsx("span",{children:"·"}),C.jsx("span",{children:t}),i?.archived&&C.jsx(Fl,{variant:"outline",children:"archived"})]}),C.jsx("h1",{className:"text-2xl leading-snug font-semibold break-words",children:i?.title??t}),s.length>0&&C.jsxs("div",{className:"flex items-center gap-3",children:[C.jsx("div",{className:"h-1.5 w-40 overflow-hidden rounded-full bg-muted",children:C.jsx("div",{className:"h-full rounded-full bg-primary transition-[width]",style:{width:`${u/s.length*100}%`}})}),C.jsxs("p",{className:"text-xs text-muted-foreground",children:[u," of ",s.length," done"]})]})]}),i?.description&&C.jsx(zc,{editable:!1,defaultValue:i.description},i.slug),C.jsx("section",{className:"flex flex-col",children:s.length===0?C.jsx("p",{className:"text-sm text-muted-foreground",children:"No tasks belong to this goal yet — assign one from its task page."}):s.map(c=>C.jsx(Vte,{task:c},c.key))})]})})}function Vte({task:t}){return C.jsxs(Al,{to:"/task/$key",params:{key:t.key},search:e=>e,className:"flex items-center gap-2.5 rounded-lg px-3 py-2.5 hover:bg-muted/60",children:[C.jsx("span",{className:"w-16 shrink-0 text-xs text-muted-foreground",children:t.id}),C.jsx(Mr,{status:t.status}),C.jsx("span",{className:"truncate text-sm font-medium",children:t.title}),C.jsx("span",{className:"ml-auto flex shrink-0 items-center gap-1.5 pl-3",children:t.tags.map(e=>C.jsx(Fl,{variant:"outline",children:e},e))})]})}function Hte({"data-slot":t="context-menu-content",placement:e="bottom start",offset:n=4,crossOffset:r=0,className:i,children:s,...a}){return C.jsx(Mm,{"data-slot":t,placement:e,offset:n,crossOffset:r,className:fe("z-50 w-(--trigger-width) min-w-48 origin-(--trigger-anchor-point) overflow-x-hidden overflow-y-auto rounded-3xl bg-popover p-1.5 text-popover-foreground shadow-lg ring-1 ring-foreground/5 duration-100 outline-none data-entering:animate-in data-entering:fade-in-0 data-entering:zoom-in-95 data-exiting:animate-out data-exiting:overflow-hidden data-exiting:fade-out-0 data-exiting:zoom-out-95 data-[placement=bottom]:slide-in-from-top-2 data-[placement=left]:slide-in-from-right-2 data-[placement=right]:slide-in-from-left-2 data-[placement=top]:slide-in-from-bottom-2 **:data-[slot$=-item]:data-focused:bg-foreground/10 dark:ring-foreground/10",i),children:C.jsx(rx,{className:"max-h-[inherit] overflow-x-hidden overflow-y-auto outline-hidden",...a,children:s})})}const Ute=500,qte=10;function jN({children:t,className:e,onOpenChange:n,...r}){const[i,s]=S.useState(null),a=S.useRef(null),u=S.useRef(null),c=S.useRef(!1),f=S.useCallback(()=>{u.current&&(clearTimeout(u.current.timer),u.current=null)},[]);S.useEffect(()=>f,[f]);const h=(m,g)=>{const b=i!==null;s({x:m,y:g}),b||n?.(!0)};return C.jsxs(nx,{"data-slot":"context-menu",...r,isOpen:!!i,onOpenChange:m=>{m||(s(null),n?.(!1))},children:[i&&Hl.createPortal(C.jsx("div",{"data-slot":"context-menu-anchor",ref:a,style:{position:"fixed",top:i.y,left:i.x}}),document.body),C.jsx("div",{"data-slot":"context-menu-trigger",className:fe("contents select-none [-webkit-touch-callout:none]",e),onContextMenu:m=>{m.preventDefault(),f(),h(m.clientX,m.clientY)},onPointerDown:m=>{if(c.current=!1,m.pointerType==="mouse")return;f();const g=m.target,{clientX:b,clientY:x,pointerId:k}=m;u.current={x:b,y:x,timer:setTimeout(()=>{u.current=null,c.current=!0,g.dispatchEvent(new PointerEvent("pointercancel",{pointerId:k,bubbles:!0})),h(b,x)},Ute)}},onPointerMove:m=>{const g=u.current;g&&Math.hypot(m.clientX-g.x,m.clientY-g.y)>qte&&f()},onPointerUp:f,onPointerCancel:f,onClickCapture:m=>{c.current&&(c.current=!1,m.preventDefault(),m.stopPropagation())},children:C.jsx(Wc.Consumer,{children:m=>C.jsx(Wc.Provider,{value:{...m,...i,triggerRef:a,style:void 0},children:t})})})]})}const Gte=ha("group/context-menu-item relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{selectionMode:{none:"gap-2.5 rounded-2xl px-3 py-2 text-sm font-medium focus:bg-accent focus:text-accent-foreground data-inset:pl-9.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive",single:"gap-2.5 rounded-2xl py-2 pr-8 pl-3 text-sm font-medium focus:bg-accent focus:text-accent-foreground data-inset:pl-9.5 [&_svg:not([class*='size-'])]:size-4",multiple:"gap-2.5 rounded-2xl py-2 pr-8 pl-3 text-sm font-medium focus:bg-accent focus:text-accent-foreground data-inset:pl-9.5 [&_svg:not([class*='size-'])]:size-4"}}});function vS({className:t,inset:e,variant:n="default",children:r,...i}){return C.jsx(ix,{"data-slot":"context-menu-item","data-inset":e,"data-variant":n,textValue:typeof r=="string"?r:i.textValue,className:Ks(t,(s,{selectionMode:a})=>fe(Gte({selectionMode:a}),s)),...i,children:Ks(r,(s,{isSelected:a,selectionMode:u})=>C.jsxs(C.Fragment,{children:[u!=="none"?C.jsx("span",{className:"pointer-events-none absolute right-2","data-slot":u==="single"?"context-menu-radio-item-indicator":"context-menu-checkbox-item-indicator",children:a?C.jsx(ma,{}):null}):null,s]}))})}function FN({task:t}){const e=l7();return C.jsxs(Hte,{"aria-label":`Actions for ${t.id}`,className:"w-44",children:[C.jsxs(vS,{onAction:()=>C4(e(t)),children:[C.jsx(r7,{}),"Copy link"]}),C.jsxs(vS,{onAction:()=>C4(t.id),children:[C.jsx(FH,{}),"Copy ID"]})]})}const Ay=1024;function KN(t,e){return t!==void 0&&e!==void 0?(t+e)/2:t!==void 0?t+Ay:e!==void 0?e-Ay:Ay}function Wte({tasks:t,visibleStatuses:e,onOpen:n,onMove:r,readOnly:i=!1}){const[s,a]=S.useState(null),u=S.useRef(null),c=Oi.filter(m=>e.includes(m)).map(m=>({status:m,tasks:t.filter(g=>g.status===m)}));function f(m,g){const b=Array.from(m.currentTarget.closest("[data-column]").querySelectorAll("[data-card]"));let x=b.length;for(let k=0;k<b.length;k++){const E=b[k].getBoundingClientRect();if(m.clientY<E.top+E.height/2){x=k;break}}return{status:g,index:x}}function h(m,g){m.preventDefault();const b=u.current??m.dataTransfer.getData("text/plain"),x=s?.status===g.status?s:f(m,g.status);if(a(null),u.current=null,!b)return;let k=x.index;const E=g.tasks.findIndex($=>$.key===b);E>=0&&k>E&&(k-=1);const D=g.tasks.filter($=>$.key!==b),T=KN(D[k-1]?.position,D[k]?.position);r(b,g.status,T)}return C.jsx("div",{className:"flex flex-1 gap-3 overflow-x-auto p-4",onDragEnd:()=>a(null),children:c.map(m=>C.jsxs("section",{"data-column":!0,className:fe("flex w-72 shrink-0 flex-col rounded-3xl bg-muted/50 transition-colors",s?.status===m.status&&"bg-muted"),onDragOver:i?void 0:g=>{g.preventDefault(),g.dataTransfer.dropEffect="move",a(f(g,m.status))},onDragLeave:g=>{g.currentTarget.contains(g.relatedTarget)||a(null)},onDrop:i?void 0:g=>h(g,m),children:[C.jsxs("header",{className:"flex items-center gap-2 px-4 pt-3 pb-2",children:[C.jsx(Mr,{status:m.status}),C.jsx("h2",{className:"text-sm font-medium",children:Ai[m.status]}),C.jsx("span",{className:"text-xs text-muted-foreground",children:m.tasks.length})]}),C.jsxs("div",{className:"flex min-h-16 flex-1 flex-col gap-2 overflow-y-auto px-2 pb-2",children:[m.tasks.map((g,b)=>C.jsxs("div",{children:[C.jsx(kS,{visible:s?.status===m.status&&s.index===b}),C.jsx(Qte,{task:g,onOpen:n,draggable:!i,onDragStart:x=>{u.current=g.key,x.dataTransfer.effectAllowed="move",x.dataTransfer.setData("text/plain",g.key)}})]},g.key)),C.jsx(kS,{visible:s?.status===m.status&&s.index===m.tasks.length}),m.tasks.length===0&&C.jsx("p",{className:"px-2 pt-1 text-xs text-muted-foreground/70",children:"No tasks"})]})]},m.status))})}function kS({visible:t}){return C.jsx("div",{className:fe("mx-1 h-0.5 rounded-full bg-primary/60 opacity-0 transition-opacity",t&&"opacity-100")})}function Qte({task:t,onOpen:e,draggable:n,onDragStart:r}){const{tasks:i}=Qt(),s=f1();return C.jsxs(jN,{children:[C.jsxs("article",{"data-card":!0,draggable:n,onDragStart:r,onClick:()=>e(t),className:fe("cursor-pointer rounded-2xl bg-card p-3 shadow-xs ring-1 ring-foreground/5 transition-shadow select-none hover:shadow-sm dark:ring-foreground/10",n&&"active:cursor-grabbing"),children:[C.jsxs("div",{className:"flex items-center justify-between gap-2",children:[C.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[t.id,s.has(t.key)&&C.jsx(h1,{})]}),C.jsxs("span",{className:"flex items-center gap-1",children:[jS(t,i)&&C.jsx(u7,{}),t.needsHuman&&C.jsx(c7,{count:IS(t).length})]})]}),C.jsx("p",{className:"mt-1 text-sm leading-snug font-medium",children:t.title}),(t.tags.length>0||t.goal||t.commentCount>0||t.prs.length>0)&&C.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-1.5",children:[t.tags.map(a=>C.jsx(Fl,{variant:"outline",children:a},a)),t.goal&&C.jsx(Fl,{variant:"secondary",className:"max-w-32 truncate",children:t.goal}),t.prs.length>0&&C.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground",children:[C.jsx(vd,{className:"size-3"}),t.prs.length]}),t.commentCount>0&&C.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground",children:[C.jsx(tU,{className:"size-3"}),t.commentCount]}),C.jsx("span",{className:"ml-auto text-[11px] text-muted-foreground/70",children:ud(t.updatedAt)})]})]}),C.jsx(FN,{task:t})]})}function Yte({className:t,...e}){return C.jsx(w_,{"data-slot":"grid-list",className:fe("flex w-full flex-col outline-none","data-empty:items-center data-empty:justify-center data-empty:py-10 data-empty:text-sm data-empty:text-muted-foreground","data-drop-target:bg-muted/40",t),...e})}function Xte({className:t,...e}){return C.jsx(T_,{"data-slot":"grid-list-item",className:fe("relative flex items-center gap-2 border-b px-3 py-2 text-sm outline-none transition-colors","data-hovered:bg-muted/50 data-selected:bg-muted","data-focus-visible:z-10 data-focus-visible:ring-2 data-focus-visible:ring-ring data-focus-visible:ring-inset","data-disabled:pointer-events-none data-disabled:opacity-50","data-dragging:opacity-50","data-drop-target:bg-primary/5","data-href:cursor-pointer",t),...e})}function Jte({className:t,...e}){return C.jsx(j6,{"data-slot":"grid-list-drop-indicator",className:fe("relative z-10 h-0 w-full outline-none data-drop-target:outline-1 data-drop-target:outline-primary",t),...e})}function Zte({tasks:t,taskHref:e,onReorder:n,readOnly:r=!1}){const{tasks:i}=Qt(),s=f1(),{dragAndDropHooks:a}=bV({getItems:u=>[...u].map(c=>({"text/plain":String(c)})),onReorder(u){const c=String([...u.keys][0]),f=t.filter(m=>m.key!==c);let h=f.findIndex(m=>m.key===u.target.key);h<0||(u.target.dropPosition==="after"&&(h+=1),n(c,KN(f[h-1]?.position,f[h]?.position)))},renderDropIndicator:u=>C.jsx(Jte,{target:u})});return C.jsx(Yte,{"aria-label":"Tasks",items:t,dragAndDropHooks:r?void 0:a,renderEmptyState:()=>r?"No tasks on this board yet.":"No tasks yet — press New task, or `task add` in a terminal.",className:"flex-1 overflow-y-auto px-2.5 pb-4",children:u=>C.jsx(Xte,{id:u.key,textValue:u.title,href:e(u),className:"group gap-2.5 rounded-lg border-0 px-6 py-2.5",children:C.jsxs(jN,{children:[!r&&C.jsx(M6,{slot:"drag","aria-label":`Reorder ${u.id}`,className:"absolute top-1/2 left-0.5 flex size-5 -translate-y-1/2 cursor-grab items-center justify-center rounded-sm text-muted-foreground/60 opacity-0 outline-none transition-opacity group-hover:opacity-100 focus-visible:opacity-100 focus-visible:ring-2 focus-visible:ring-ring",children:C.jsx(IH,{className:"size-3.5"})}),C.jsxs("span",{className:"flex w-16 shrink-0 items-center gap-1.5 text-xs text-muted-foreground",children:[u.id,s.has(u.key)&&C.jsx(h1,{})]}),C.jsx(Mr,{status:u.status}),C.jsx("span",{className:"truncate font-medium",children:u.title}),jS(u,i)&&C.jsx(u7,{}),u.needsHuman&&C.jsx(c7,{count:IS(u).length}),C.jsxs("span",{className:"ml-auto flex shrink-0 items-center gap-1.5 pl-3",children:[u.tags.map(c=>C.jsx(Fl,{variant:"outline",children:c},c)),u.goal&&C.jsx(Fl,{variant:"secondary",className:"max-w-32 truncate",children:u.goal}),u.prs.length>0&&C.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground",children:[C.jsx(vd,{className:"size-3"}),u.prs.length]}),C.jsx("span",{className:"w-12 text-right text-xs text-muted-foreground",children:hte(u.createdAt)})]}),C.jsx(FN,{task:u})]})})})}function ene(){const{tasks:t,board:e,filters:n,query:r,settings:i,readOnly:s}=Qt(),a=ji(),u=fd(),c=Qs({strict:!1}),f=TU($U(t,n),r),h=D=>{a({to:"/task/$key",params:{key:D.key},search:T=>T})},m=(D,T,$)=>{u.setQueryData(["tasks",e,Ii()],A=>A?.map(B=>B.key===D?{...B,status:T,position:$}:B)),_S(D,{status:T,position:$}).then(()=>u.invalidateQueries({queryKey:["tasks",e]}))},g=RN(),[b,x]=S.useState(null),k=(D,T,$)=>{const A=t.find(R=>R.key===D),B=g.get(D);if(B&&A?.status==="in_progress"&&T!=="in_progress"){x({key:D,taskId:A.id,branch:B.branch,commits:B.commits,status:T,position:$});return}m(D,T,$)},E=D=>{const T=new URLSearchParams;return c.board&&T.set("board",c.board),c.ref&&T.set("ref",c.ref),`/task/${D.key}${T.size>0?`?${T.toString()}`:""}`};return C.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[C.jsx(Pte,{prompt:b,onCancel:()=>x(null),onRelease:D=>Cz(b.key,D||void 0).then(()=>{m(b.key,b.status,b.position),x(null),u.invalidateQueries({queryKey:["git"]})})}),i.view==="board"?C.jsx(Wte,{tasks:f,visibleStatuses:i.boardColumns,onOpen:h,onMove:k,readOnly:s}):C.jsx("div",{className:"flex min-h-0 flex-1 flex-col pt-2",children:C.jsx(Zte,{tasks:f,taskHref:E,onReorder:(D,T)=>{const $=t.find(A=>A.key===D);$&&k(D,$.status,T)},readOnly:s})})]})}const tg="flex h-7 min-w-0 items-center gap-1.5 self-start rounded-full pr-2.5 pl-1.5 text-sm outline-none hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring";function tne(t){const e=dm();return`/task/${t}${e?`?board=${encodeURIComponent(e)}`:""}`}function CS({label:t,addLabel:e,value:n,onChange:r,tasks:i,self:s,readOnly:a}){if(a&&n.length===0)return null;const u=n.map(c=>i.find(f=>f.key===c)).filter(c=>c!==void 0);return C.jsxs("div",{className:"flex flex-col gap-1.5",children:[C.jsx("p",{className:"pb-1 text-xs font-medium text-muted-foreground",children:t}),u.map(c=>C.jsxs("div",{className:"group/relation relative flex min-w-0",children:[C.jsxs(_3,{href:tne(c.key),className:fe(tg,"flex-1"),children:[C.jsx(Mr,{status:c.status}),C.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:c.id}),C.jsx("span",{className:"truncate",children:c.title})]}),!a&&C.jsx(Re,{variant:"ghost",size:"icon-xs","aria-label":`Remove ${c.id}`,onPress:()=>r(n.filter(f=>f!==c.key)),className:"absolute top-1/2 right-0.5 -translate-y-1/2 text-muted-foreground opacity-0 group-hover/relation:opacity-100 focus-visible:opacity-100",children:C.jsx(Vi,{className:"size-3.5"})})]},c.key)),!a&&C.jsx(nne,{label:e,tasks:i.filter(c=>c.key!==s&&!n.includes(c.key)),onPick:c=>r([...n,c])})]})}function nne({label:t,tasks:e,onPick:n}){const[r,i]=S.useState(!1);return C.jsxs(kd,{isOpen:r,onOpenChange:i,children:[C.jsxs(Re,{variant:"ghost",size:"sm",className:fe(tg,"font-normal text-muted-foreground"),children:[C.jsx(Ul,{className:"size-3.5"}),t]}),C.jsx(Cd,{className:"w-72",children:C.jsxs(ql,{children:[C.jsx(Gl,{flush:!0,placeholder:"Search tasks"}),C.jsx(Wl,{onAction:s=>{i(!1),n(String(s))},renderEmptyState:()=>C.jsx("p",{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"No tasks to link"}),children:C.jsx(na,{children:e.map(s=>C.jsxs(Os,{id:s.key,textValue:`${s.id} ${s.title}`,children:[C.jsx(Mr,{status:s.status}),C.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:s.id}),C.jsx("span",{className:"truncate",children:s.title})]},s.key))})})]})})]})}function ES(t){const e=/github\.com\/[^/]+\/([^/]+)\/pull\/(\d+)/.exec(t);if(e)return`${e[1]}#${e[2]}`;try{return new URL(t).hostname}catch{return t}}function rne({value:t,onChange:e,readOnly:n,derived:r}){return n&&t.length===0?null:C.jsxs("div",{className:"flex flex-col gap-1.5",children:[C.jsx("p",{className:"pb-1 text-xs font-medium text-muted-foreground",children:"Pull requests"}),t.map(i=>C.jsxs("div",{className:"group/pr relative flex min-w-0",children:[C.jsxs("a",{href:i,target:"_blank",rel:"noreferrer",title:i,className:fe(tg,"flex-1"),children:[C.jsx(vd,{className:"size-3.5 shrink-0 text-muted-foreground"}),C.jsx("span",{className:"truncate",children:ES(i)}),r?.get(i)&&C.jsx(ON,{pr:r.get(i)})]}),!n&&C.jsx(Re,{variant:"ghost",size:"icon-xs","aria-label":`Detach ${ES(i)}`,onPress:()=>e(t.filter(s=>s!==i)),className:"absolute top-1/2 right-0.5 -translate-y-1/2 text-muted-foreground opacity-0 group-hover/pr:opacity-100 focus-visible:opacity-100",children:C.jsx(Vi,{className:"size-3.5"})})]},i)),!n&&C.jsx(ine,{onAdd:i=>e(t.includes(i)?t:[...t,i])})]})}function ine({onAdd:t}){const[e,n]=S.useState(!1),[r,i]=S.useState(""),s=()=>{const a=r.trim();/^https?:\/\//.test(a)&&(t(a),i(""),n(!1))};return C.jsxs(ga,{isOpen:e,onOpenChange:n,children:[C.jsxs(Re,{variant:"ghost",size:"sm",className:fe(tg,"font-normal text-muted-foreground"),children:[C.jsx(Ul,{className:"size-3.5"}),"Attach PR"]}),C.jsx(ba,{className:"w-80 p-3",children:C.jsxs("form",{className:"flex items-center gap-2",onSubmit:a=>{a.preventDefault(),s()},children:[C.jsx(ta,{autoFocus:!0,"aria-label":"Pull request URL",placeholder:"https://github.com/…/pull/123",value:r,onChange:a=>i(a.target.value),className:"h-8"}),C.jsx(Re,{type:"submit",variant:"secondary",size:"sm",isDisabled:!/^https?:\/\//.test(r.trim()),children:"Attach"})]})})]})}function sne({...t}){return C.jsx(nx,{"data-slot":"dropdown-menu-trigger",...t})}function one({"data-slot":t="dropdown-menu-content",placement:e="bottom start",offset:n=4,crossOffset:r=0,className:i,children:s,...a}){return C.jsx(Mm,{"data-slot":t,placement:e,offset:n,crossOffset:r,className:fe("z-50 w-(--trigger-width) min-w-48 origin-(--trigger-anchor-point) overflow-x-hidden overflow-y-auto rounded-3xl bg-popover p-1.5 text-popover-foreground shadow-lg ring-1 ring-foreground/5 duration-100 outline-none data-entering:animate-in data-entering:fade-in-0 data-entering:zoom-in-95 data-exiting:animate-out data-exiting:overflow-hidden data-exiting:fade-out-0 data-exiting:zoom-out-95 data-[placement=bottom]:slide-in-from-top-2 data-[placement=left]:slide-in-from-right-2 data-[placement=right]:slide-in-from-left-2 data-[placement=top]:slide-in-from-bottom-2 **:data-[slot$=-item]:data-focused:bg-foreground/10 dark:ring-foreground/10",i),children:C.jsx(rx,{className:"max-h-[inherit] overflow-x-hidden overflow-y-auto outline-hidden",...a,children:s})})}const ane=ha("group/dropdown-menu-item relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{selectionMode:{none:"gap-2.5 rounded-2xl px-3 py-2 text-sm font-medium focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-9.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",single:"gap-2.5 rounded-2xl py-2 pr-8 pl-3 text-sm font-medium focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-9.5 [&_svg:not([class*='size-'])]:size-4",multiple:"gap-2.5 rounded-2xl py-2 pr-8 pl-3 text-sm font-medium focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-9.5 [&_svg:not([class*='size-'])]:size-4"}}});function lne({className:t,inset:e,variant:n="default",children:r,...i}){return C.jsx(ix,{"data-slot":"dropdown-menu-item","data-inset":e,"data-variant":n,textValue:typeof r=="string"?r:i.textValue,className:Ks(t,(s,{selectionMode:a})=>fe(ane({selectionMode:a}),s)),...i,children:Ks(r,(s,{isSelected:a,selectionMode:u})=>C.jsxs(C.Fragment,{children:[u!=="none"?C.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":u==="single"?"dropdown-menu-radio-item-indicator":"dropdown-menu-checkbox-item-indicator",children:a?C.jsx(ma,{}):null}):null,s]}))})}function une({task:t,readOnly:e,claim:n,onChanged:r}){const i=n?.asks??[];if(e&&t.asks.length===0&&i.length===0)return null;const s=t.asks.filter(a=>!a.resolvedAt).length+i.filter(a=>!a.resolvedAt).length;return C.jsxs("div",{className:"flex flex-col gap-1.5",children:[C.jsxs("p",{className:"flex items-center gap-1.5 pb-1 text-xs font-medium text-muted-foreground",children:["Asks",s>0&&C.jsx("span",{className:"flex h-4 min-w-4 items-center justify-center rounded-full bg-amber-500/15 px-1 text-[10px] font-semibold text-amber-700 tabular-nums dark:text-amber-400",children:s})]}),t.asks.map(a=>C.jsx(DS,{task:t,ask:a,readOnly:e,onChanged:r},a.id)),i.map(a=>C.jsx(DS,{task:t,ask:a,readOnly:e,viaBranch:n.branch,onChanged:r},a.id)),!e&&C.jsx(cne,{taskKey:t.key,onChanged:r})]})}function DS({task:t,ask:e,readOnly:n,viaBranch:r,onChanged:i}){const s=()=>{fz(t.key,e.id,!e.resolvedAt).then(i)};return C.jsxs("div",{className:"group/ask relative flex items-start gap-2 py-0.5 pr-6 pl-1",children:[C.jsx("button",{"aria-label":e.resolvedAt?`Reopen: ${e.text}`:`Resolve: ${e.text}`,disabled:n,onClick:n?void 0:s,className:fe("mt-0.5 flex size-3.5 shrink-0 items-center justify-center rounded-full border-[1.5px] transition-colors",e.resolvedAt?"border-transparent bg-amber-500 text-white":"border-muted-foreground/50",!n&&!e.resolvedAt&&"hover:border-amber-500 hover:bg-amber-500/20"),children:e.resolvedAt&&C.jsx(ma,{className:"size-2.5",strokeWidth:3})}),r&&C.jsx(ea,{className:"mt-1 size-3 shrink-0 text-muted-foreground/70","aria-label":`On ${r}`}),C.jsx("span",{className:fe("min-w-0 flex-1 text-sm leading-snug",e.resolvedAt&&"text-muted-foreground/60 line-through"),title:(e.resolvedAt?`Resolved${e.resolvedBy?` by ${e.resolvedBy}`:""}`:`Asked${e.author?` by ${e.author}`:""}`)+(r?` — on ${r}; changes commit and push there`:""),children:e.text}),!e.resolvedAt&&C.jsx("span",{className:"shrink-0 pt-0.5 text-[11px] text-muted-foreground/60 tabular-nums",children:ud(e.createdAt)}),!n&&C.jsx(Re,{variant:"ghost",size:"icon-xs","aria-label":"Delete ask",onPress:()=>{hz(t.key,e.id).then(i)},className:"absolute top-0 right-0 text-muted-foreground opacity-0 group-hover/ask:opacity-100 focus-visible:opacity-100",children:C.jsx(Vi,{className:"size-3.5"})})]})}function cne({taskKey:t,onChanged:e}){const[n,r]=S.useState(!1),[i,s]=S.useState(""),a=()=>{const u=i.trim();u&&(dz(t,u).then(e),s(""),r(!1))};return C.jsxs(ga,{isOpen:n,onOpenChange:r,children:[C.jsxs(Re,{variant:"ghost",size:"sm",className:"flex h-7 min-w-0 items-center gap-1.5 self-start rounded-full pr-2.5 pl-1.5 text-sm font-normal text-muted-foreground",children:[C.jsx(Ul,{className:"size-3.5"}),"Add ask"]}),C.jsx(ba,{className:"w-80 p-3",children:C.jsxs("form",{className:"flex items-center gap-2",onSubmit:u=>{u.preventDefault(),a()},children:[C.jsx(ta,{autoFocus:!0,"aria-label":"What does a person need to do?",placeholder:"What does a person need to do?",value:i,onChange:u=>s(u.target.value),className:"h-8"}),C.jsx(Re,{type:"submit",variant:"secondary",size:"sm",isDisabled:!i.trim(),children:"Add"})]})})]})}const dne=vw("/task/$key");function fne(){const{key:t}=dne.useParams(),{tasks:e,project:n,board:r,readOnly:i}=Qt(),s=ji(),a=fd(),u=e.find(z=>z.key===t)??null,c=yz(r,t),f=c.data?.comments??[],m=HS().data?.find(z=>z.task.key===t&&z.board===r),g=m?.claim&&u?{branch:m.claim.branch,asks:m.asks.filter(z=>!u.asks.some(L=>L.id===z.id))}:null,b=eg(),x=f1(),k=RN().get(t)?.branch??g?.branch??null,E=fm(b!==null).data??null,D=E&&E.branch!==E.defaultBranch?E.branch:null,T=zy(k,b?.gh===!0).data?.pr??null,$=zy(D,b?.gh===!0&&D!==k).data?.pr??null,A=new Map([T,$].filter(z=>z!==null).map(z=>[z.url,z])),[B,R]=S.useState(""),M=S.useRef(null),[O,j]=S.useState(!0),[q,X]=S.useState(!1),[G,Z]=S.useState(null),[F,te]=S.useState(null),P=c.data?.task;if(P&&F!==t&&(te(t),R(P.title),X(!1),Z(null)),c.isError)return C.jsx(hne,{});if(!u)return C.jsx(MN,{});const _=()=>{a.invalidateQueries({queryKey:["tasks",r]}),a.invalidateQueries({queryKey:["task",r,t]}),a.invalidateQueries({queryKey:["inbox"]})},W=z=>{_S(u.key,z).then(()=>{Z(null),_()}).catch(L=>Z(L.message))},ee=()=>{const z=M.current?.getMarkdown().trim()??"";z&&(M.current?.clear(),j(!0),uz(u.key,z).then(_))};return C.jsx("main",{className:"min-w-0 flex-1 overflow-y-auto",children:C.jsxs("div",{className:"mx-auto flex w-full max-w-6xl items-start gap-20 px-8 pt-16 pb-10",children:[C.jsxs("div",{className:"flex min-w-0 max-w-3xl flex-1 flex-col gap-6",children:[i?C.jsx("h1",{className:"py-1 text-2xl leading-snug font-semibold break-words",children:u.title}):C.jsx(s7,{"aria-label":"Title",rows:1,value:B,onChange:z=>R(z.target.value.replace(/\s*\n\s*/g," ")),onKeyDown:z=>{z.key==="Enter"&&(z.preventDefault(),z.currentTarget.blur())},onBlur:()=>B.trim()&&B!==u.title&&W({title:B.trim()}),className:"min-h-0 rounded-2xl border-transparent bg-transparent px-0 py-1 text-2xl leading-snug font-semibold shadow-none focus-visible:border-transparent focus-visible:ring-0 md:text-2xl"}),(!i||u.description.trim())&&C.jsx(zc,{ariaLabel:"Description",placeholder:"Add a description…",defaultValue:u.description,editable:!i,onBlur:i?void 0:z=>W({description:z}),className:"min-h-32"},u.key),G&&C.jsx("p",{className:"text-sm whitespace-pre-wrap text-destructive",children:G}),C.jsxs("div",{className:"mt-4 flex flex-col gap-3",children:[f.length>0&&C.jsxs("p",{className:"text-xs font-medium text-muted-foreground",children:[f.length," comment",f.length===1?"":"s"]}),f.map(z=>C.jsxs("div",{className:"group/comment relative rounded-2xl bg-muted/60 p-4",children:[C.jsxs("p",{className:"text-xs text-muted-foreground",children:[z.author||"anonymous"," · ",ud(z.createdAt)," ago"]}),C.jsx(zc,{editable:!1,defaultValue:z.body,className:"mt-1.5"},z.id),!i&&z.author===n?.author&&C.jsxs(sne,{children:[C.jsx(Re,{variant:"ghost",size:"icon-xs","aria-label":"Comment actions",className:"absolute top-2.5 right-2.5 text-muted-foreground opacity-0 group-hover/comment:opacity-100 focus-visible:opacity-100 aria-expanded:opacity-100",children:C.jsx(OH,{})}),C.jsx(one,{placement:"bottom end",children:C.jsx(lne,{variant:"destructive",onAction:()=>{cz(u.key,z.id).then(_)},children:"Delete"})})]})]},z.id)),i?null:f.length===0&&!q?C.jsxs(Re,{variant:"ghost",size:"sm",onPress:()=>X(!0),className:"h-7 gap-1.5 self-start rounded-full px-2.5 font-normal text-muted-foreground",children:[C.jsx(ZH,{className:"size-3.5"}),"Add comment"]}):C.jsxs("div",{className:"flex flex-col gap-2",children:[C.jsx(zc,{ref:M,ariaLabel:"Add a comment",placeholder:"Leave a comment… (⌘↵ to post)",autoFocus:q,onChange:z=>j(!z.trim()),onSubmit:ee,className:"min-h-16 rounded-2xl border border-transparent bg-input/50 p-4 transition-[color,box-shadow,background-color] focus:border-ring focus:ring-3 focus:ring-ring/30"}),C.jsx(Re,{variant:"secondary",className:"self-end",onPress:ee,isDisabled:O,children:"Post"})]})]})]}),C.jsxs("aside",{className:"sticky top-6 flex w-64 shrink-0 flex-col gap-6 pt-2 max-lg:hidden",children:[C.jsxs("div",{className:"flex flex-col gap-1.5",children:[C.jsx("p",{className:"pb-1 text-xs font-medium text-muted-foreground",children:"Properties"}),i?C.jsxs(By,{children:[C.jsx(Mr,{status:u.status}),C.jsx("span",{children:Ai[u.status]})]}):C.jsx(TN,{status:u.status,onChange:z=>W({status:z})}),x.has(u.key)&&C.jsxs("p",{className:"flex items-center gap-1.5 pt-0.5 text-[11px] text-muted-foreground",children:[C.jsx(h1,{})," uncommitted edits — commit from the branch chip in the header"]})]}),C.jsx(une,{task:u,readOnly:i,claim:g,onChanged:_}),C.jsx(CS,{label:"Blocked by",addLabel:"Mark as blocked by…",value:u.blockedBy,onChange:z=>W({blockedBy:z}),tasks:e,self:u.key,readOnly:i}),C.jsx(CS,{label:"Blocks",addLabel:"Mark as blocking…",value:u.blocks,onChange:z=>W({blocks:z}),tasks:e,self:u.key,readOnly:i}),i&&u.goal&&C.jsxs("div",{className:"flex flex-col gap-1.5",children:[C.jsx("p",{className:"pb-1 text-xs font-medium text-muted-foreground",children:"Goal"}),C.jsx(Al,{to:"/goal/$slug",params:{slug:u.goal},search:z=>z,children:C.jsxs(By,{children:[C.jsx(Yc,{className:"size-3.5 text-muted-foreground"}),C.jsx("span",{className:"truncate",children:u.goal})]})})]}),i&&u.tags.length>0&&C.jsxs("div",{className:"flex flex-col gap-1.5",children:[C.jsx("p",{className:"pb-1 text-xs font-medium text-muted-foreground",children:"Tags"}),C.jsxs(By,{children:[C.jsx(bp,{className:"size-3.5 text-muted-foreground"}),C.jsx("span",{className:"truncate",children:u.tags.join(", ")})]})]}),!i&&C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:"flex flex-col gap-1.5",children:[C.jsx("p",{className:"pb-1 text-xs font-medium text-muted-foreground",children:"Goal"}),C.jsx(Gr,{label:"Goal",mode:"single",allowCreate:!1,options:Pm(e),value:u.goal?[u.goal]:[],onChange:z=>W({goal:z[0]??null}),placeholder:"Set goal",variant:"ghost",chevron:!1,className:ld,renderValue:z=>C.jsxs(C.Fragment,{children:[C.jsx(Yc,{className:"size-3.5 text-muted-foreground"}),C.jsx("span",{className:fe("truncate",z.length===0&&"text-muted-foreground"),children:z[0]??"Set goal"})]})}),u.goal&&C.jsxs(Al,{to:"/goal/$slug",params:{slug:u.goal},search:z=>z,className:"inline-flex items-center gap-1 px-2 text-xs text-muted-foreground hover:text-foreground",children:["View goal",C.jsx(CH,{className:"size-3"})]})]}),C.jsxs("div",{className:"flex flex-col gap-1.5",children:[C.jsx("p",{className:"pb-1 text-xs font-medium text-muted-foreground",children:"Tags"}),C.jsx(Gr,{label:"Tags",mode:"multiple",options:Om(e),value:u.tags,onChange:z=>W({tags:z}),placeholder:"Add tags",variant:"ghost",chevron:!1,className:ld,renderValue:z=>C.jsxs(C.Fragment,{children:[C.jsx(bp,{className:"size-3.5 text-muted-foreground"}),C.jsx("span",{className:fe("truncate",z.length===0&&"text-muted-foreground"),children:z.length>0?z.join(", "):"Add tags"})]})})]})]}),C.jsx(rne,{value:u.prs,onChange:z=>W({prs:z}),readOnly:i,derived:A}),C.jsxs("div",{className:"flex flex-col gap-1.5",children:[C.jsxs("p",{className:"text-[11px] text-muted-foreground/70",children:["created ",ud(u.createdAt)," ago"]}),!i&&C.jsx(Re,{variant:"ghost",size:"sm",className:"-ml-2.5 h-7 self-start rounded-full px-2.5 font-normal text-destructive hover:text-destructive",onPress:()=>{az(u.key).then(()=>{a.invalidateQueries({queryKey:["tasks",r]}),s({to:"/",search:z=>z})})},children:"Delete"})]})]})]})})}function By({children:t}){return C.jsx("div",{className:fe(ld,"flex h-7 items-center gap-1.5 px-2.5 text-sm"),children:t})}function hne(){const t=ji();return C.jsxs(PN,{className:"flex-1",children:[C.jsxs(zN,{children:[C.jsx(LN,{children:"Task not found"}),C.jsx(IN,{children:"It may have been deleted, or it lives on another board."})]}),C.jsx(Re,{variant:"outline",size:"sm",onPress:()=>{t({to:"/",search:e=>e})},children:"Back to the board"})]})}function pne(t){return{...t.board==null?{}:{board:String(t.board)},...t.ref==null?{}:{ref:String(t.ref)}}}const ng=rI({component:Ite,validateSearch:pne}),mne=w3({getParentRoute:()=>ng,path:"/",component:ene}),gne=w3({getParentRoute:()=>ng,path:"/task/$key",component:fne}),bne=w3({getParentRoute:()=>ng,path:"/goal/$slug",component:_te});function yne(t,e){return fI({routeTree:ng.addChildren([mne,gne,bne]),defaultPreload:"intent",defaultErrorComponent:jte,defaultNotFoundComponent:Fte,history:t,basepath:e})}const cd=(()=>{const t=document.querySelector("base")?.getAttribute("href");if(!t)return"/";const e=new URL(t,location.origin).pathname;return e.endsWith("/")?e:`${e}/`})();cd!=="/"&&ez(`${cd}api`);window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t=>{document.documentElement.classList.toggle("dark",t.matches)});const xne=mP.createRoot(document.getElementById("root")),vne=()=>xne.render(C.jsx(S.StrictMode,{children:C.jsx(xV,{router:yne(void 0,cd==="/"?void 0:cd)})}));(async()=>{if(!await nz())try{vte(await bte(`${cd}snapshot.json`))}catch{}vne()})();
|