@pramen/cms-editor 0.0.49 → 0.0.50

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.
@@ -0,0 +1,399 @@
1
+ var nY=Object.create;var{getPrototypeOf:rY,defineProperty:QC,getOwnPropertyNames:oY}=Object;var aY=Object.prototype.hasOwnProperty;function iY(e){return this[e]}var sY,lY,q=(e,t,n)=>{var a=e!=null&&typeof e==="object";if(a){var i=t?sY??=new WeakMap:lY??=new WeakMap,l=i.get(e);if(l)return l}n=e!=null?nY(rY(e)):{};let c=t||!e||!e.__esModule?QC(n,"default",{value:e,enumerable:!0}):n;if(e&&typeof e==="object"||typeof e==="function"){for(let u of oY(e))if(!aY.call(c,u))QC(c,u,{get:iY.bind(e,u),enumerable:!0})}if(a)i.set(e,c);return c};var zi=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var cY=(e)=>e;function uY(e,t){this[e]=cY.bind(null,t)}var lc=(e,t)=>{for(var n in t)QC(e,n,{get:t[n],enumerable:!0,configurable:!0,set:uY.bind(t,n)})};var N=(e,t)=>()=>(e&&(t=e(e=0)),t);class av{cache=new Map;_maxSize;constructor(e){if(e<0)throw Error(`[buzola] LoaderCache maxSize must be non-negative, got ${e}`);this._maxSize=e}get maxSize(){return this._maxSize}get size(){return this.cache.size}get(e){let t=this.cache.get(e);if(t!==void 0||this.cache.has(e))this.cache.delete(e),this.cache.set(e,t);return t}has(e){return this.cache.has(e)}set(e,t){this.cache.delete(e),this.cache.set(e,t);while(this.cache.size>this._maxSize){let n=this.cache.keys().next().value;this.cache.delete(n)}}delete(e){this.cache.delete(e)}clear(){this.cache.clear()}}function Yf(e,t){let n=t.pathname,a=n.split("/").filter(Boolean);return ZC(e.root,a,0,{},n)}function ZC(e,t,n,a,i){if(n===t.length){if(e.route)return L6(e.route.chain,a,i);return null}let l=t[n],c=e.staticChildren.get(l);if(c){let u=ZC(c,t,n+1,a,i);if(u)return u}if(e.dynamicChild){let u={...a,[e.dynamicChild.paramName]:decodeURIComponent(l)},f=ZC(e.dynamicChild.node,t,n+1,u,i);if(f)return f}if(e.catchAllChild){let u=t.slice(n).map((h)=>decodeURIComponent(h)).join("/"),f={...a,[e.catchAllChild.paramName]:u};return L6(e.catchAllChild.chain,f,i)}return null}function L6(e,t,n){return e.map((a)=>({node:a,params:t,pathname:n}))}function eE(e){let t=e.endsWith("+");return{name:t?e.slice(1,-1):e.slice(1),isCatchAll:t}}function Wm(e){let t=[];for(let n of e.split("/"))if(n.startsWith(":"))t.push(eE(n).name);return t}class iv{routes;adapter;viewTransitions;_basePath;persistentParamsFn;pageRegistry;subscribers=new Set;invalidationListeners=new Set;state;navigationId=0;stopFn;blockers=new Set;pendingScrollBehavior="after-transition";_loaderCache;constructor(e){this.routes=e.routes,this.adapter=e.adapter,this.viewTransitions=e.viewTransitions??!1,this._basePath=e.basePath?e.basePath.replace(/\/$/,""):"",this.persistentParamsFn=e.persistentParams,this.pageRegistry=e.pageRegistry??{},this._loaderCache=e.loaderCacheSize?new av(e.loaderCacheSize):void 0;let t=this.adapter.getCurrentURL(),n=this.createMatchUrl(t),a=Yf(this.routes,n)??[];if(a.length===0)console.warn(`[buzola] No route matched URL "${t.pathname}". Define a catch-all 404 route to handle unmatched URLs.`);this.state={location:t,matches:a,isPending:!1,navigationState:this.adapter.getState()}}get basePath(){return this._basePath}get loaderCache(){return this._loaderCache}getState(){return this.state}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}start(){let e=(n)=>{if(!n.canIntercept)return;let a=new URL(n.destination.url),i=this.createMatchUrl(a),l=Yf(this.routes,i);if(!l){console.warn(`[buzola] No route matched URL "${a.pathname}". The navigation was not intercepted.`);return}let c=++this.navigationId,u=n.viewTransition||this.viewTransitions,f=this.pendingScrollBehavior;this.pendingScrollBehavior="after-transition",n.intercept({scroll:f,handler:async()=>{for(let m of this.blockers){if(this.navigationId!==c)return;if(!await m())throw new tE}if(this.setState({...this.state,isPending:!0,pendingLocation:a}),this.navigationId!==c)return;let h=()=>{this.setState({location:a,matches:l,isPending:!1,pendingLocation:void 0,navigationState:this.adapter.getState()})};if(u&&typeof document<"u"&&"startViewTransition"in document)document.startViewTransition(h);else h()}})};this.adapter.addEventListener("navigate",e);let t=()=>{this.adapter.removeEventListener("navigate",e)};return this.stopFn=t,t}navigate(e,t){if(t?.resetScroll===!1)this.pendingScrollBehavior="manual";this.adapter.navigate(this._basePath+e,t)}navigateToPage(e,t,n){let a=this.buildPagePath(e,t);this.navigate(this.stripBasePath(a),n)}buildPagePath(e,t){let n=this.pageRegistry[e];if(!n)throw Error(`[buzola] Unknown page "${e}". Is it registered in the page registry?`);let a=this.resolveParams(n,t);return this.buildPath(n,a)}preload(e,t){let n=this.buildPagePath(e,t),a=new URL(n,"http://localhost"),i=this.createMatchUrl(a),l=Yf(this.routes,i);if(!l)return;for(let c of l)c.node.preload?.()}back(){this.adapter.back()}forward(){this.adapter.forward()}buildPath(e,t){let n=e.split("/"),a=[],i=[];for(let h of n)if(h.startsWith(":")){let{name:m,isCatchAll:b}=eE(h),y=t?.[m];if(y===void 0)i.push(m);else if(b)a.push(y);else a.push(encodeURIComponent(y))}else a.push(h);if(i.length>0){if(!t)throw Error(`[buzola] Missing params for path "${e}": ${i.join(", ")}`);throw Error(`[buzola] Missing param "${i[0]}" for path "${e}"`)}let l=new Set(Wm(e)),c=new URLSearchParams;if(t){for(let[h,m]of Object.entries(t))if(!l.has(h)&&m!==void 0)c.set(h,m)}let u=this._basePath+a.join("/"),f=c.toString();return f?`${u}?${f}`:u}stripBasePath(e){if(this._basePath&&e.startsWith(this._basePath))return e.slice(this._basePath.length)||"/";return e}resolveParams(e,t){let n=Wm(e),a=this.getCurrentParams(),i=this.persistentParamsFn?.()??{},l={};for(let c of n){let u=t?.[c]??a[c]??i[c];if(u!==void 0)l[c]=u}if(t){let c=new Set(n);for(let[u,f]of Object.entries(t))if(!c.has(u)&&f!==void 0)l[u]=f}return l}getCurrentParams(){let e={};for(let t of this.state.matches)Object.assign(e,t.params);return e}invalidateAll(){for(let e of this.invalidationListeners)e()}onInvalidate(e){return this.invalidationListeners.add(e),()=>{this.invalidationListeners.delete(e)}}addBlocker(e){return this.blockers.add(e),()=>{this.blockers.delete(e)}}dispose(){this.stopFn?.(),this.stopFn=void 0,this.subscribers.clear(),this.invalidationListeners.clear()}updateRoutes(e){this.routes=e;let t=Yf(this.routes,this.createMatchUrl(this.state.location))??[];this.setState({...this.state,matches:t})}createMatchUrl(e){if(!this._basePath)return e;let t=new URL(e);return t.pathname=this.stripBasePath(t.pathname),t}setState(e){this.state=e;for(let t of this.subscribers)t(this.state)}}var tE;var nE=N(()=>{tE=class tE extends Error{constructor(){super("Navigation aborted by blocker");this.name="NavigationAbortedError"}}});function I6(e){let{path:t,fullPath:n,component:a,searchSchema:i,preload:l,isLayout:c=!1,isIndex:u=!1}=e;return{id:`route:${n||"/"}${c?":layout":""}`,path:_6(t),fullPath:_6(n),component:a,searchSchema:i,preload:l,isLayout:c,isIndex:u}}function oE(e,t=""){let n=B6(e,t,[]),a=rE();for(let i of n)dY(a,i.pattern,i.chain);return{root:a}}function B6(e,t,n){let a=[];for(let i of e){let l=i.isPathlessGroup?"":i.path,c=i.children!=null&&i.children.length>0,u=i.isLayout??c,f=i.isIndex??(!u&&(i.path==="/"||i.path==="")),h;if(i.matchPath!=null)h=i.matchPath;else if(f)h=t||"/";else h=pY(t||"/",l);let m=I6({path:l,fullPath:h,component:i.component,searchSchema:i.searchSchema,preload:i.preload,isLayout:u,isIndex:f});if(u){let b=[...n,m];if(i.children){let y=i.isPathlessGroup?t:h;a.push(...B6(i.children,y,b))}}else a.push({pattern:h,chain:[...n,m]})}return a}function rE(){return{staticChildren:new Map}}function dY(e,t,n){let a=fY(t),i=e;for(let l=0;l<a.length;l++){let c=a[l];if(c.startsWith(":")&&(c.endsWith("+")||c.endsWith("*"))){let u=c.slice(1,-1);i.catchAllChild={paramName:u,chain:n};return}if(c.startsWith(":")){let u=c.slice(1);if(!i.dynamicChild)i.dynamicChild={paramName:u,node:rE()};i=i.dynamicChild.node}else{let u=i.staticChildren.get(c);if(!u)u=rE(),i.staticChildren.set(c,u);i=u}}i.route={chain:n}}function fY(e){return e.split("/").filter(Boolean)}function _6(e){if(e===""||e==="/")return"/";let t=e.startsWith("/")?e:`/${e}`;return t.endsWith("/")?t.slice(0,-1):t}function pY(e,t){if(t==="/")return e==="/"?"/":e;let n=e==="/"?"":e,a=t.startsWith("/")?t:`/${t}`;return n+a}function aE(){let e=window.navigation;if(!e)throw Error("Navigation API is not available. Buzola requires a browser that supports the Navigation API.");let t=new Set,n=!1,a=(i)=>{let l=n;n=!1;let c={destination:{url:i.destination.url},canIntercept:i.canIntercept,navigationType:i.navigationType,userInitiated:i.userInitiated,viewTransition:l,intercept(u){i.intercept({handler:u.handler,scroll:u.scroll})}};for(let u of t)u(c)};return{getCurrentURL(){return new URL(e.currentEntry.url)},navigate(i,l){if(l?.viewTransition)n=!0;e.navigate(i,{history:l?.replace?"replace":"push",state:l?.state})},back(){e.back()},forward(){e.forward()},addEventListener(i,l){let c=t.size===0;if(t.add(l),c)e.addEventListener("navigate",a)},removeEventListener(i,l){if(t.delete(l),t.size===0)e.removeEventListener("navigate",a)},getState(){return e.currentEntry?.getState?.()}}}function z6(e){return!("issues"in e["~standard"].validate(void 0))}function iE(e,t,n){let a=e["~standard"].validate(t);if("issues"in a)throw Error(`${n}${a.issues.map((i)=>i.message).join(", ")}`);return a.value}function H6(e){let t=e.startsWith("?"),n=t?e.slice(1):e,a=n.endsWith("[]"),i=a?n.slice(0,-2):n,l=mY[i];if(!l)throw Error(`[buzola] Unknown param type: ${i}`);let c;if(a)c=(u)=>{if(t&&(u===void 0||Array.isArray(u)&&u.length===0))return{value:void 0};if(!Array.isArray(u))return{issues:[{message:`expected ${i}[]`}]};let f=[];for(let h of u){let m=l(h);if("issues"in m)return m;f.push(m.value)}return{value:f}};else if(t)c=(u)=>u===void 0||u===""?{value:void 0}:l(u);else c=l;return{schema:{"~standard":{version:1,vendor:"buzola",validate:c}},optional:t,array:a}}var hY,mY;var sv=N(()=>{hY=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,mY={string:(e)=>typeof e==="string"?{value:e}:{issues:[{message:"expected string"}]},number:(e)=>{let t=Number(e);return Number.isNaN(t)?{issues:[{message:"expected number"}]}:{value:t}},uuid:(e)=>typeof e==="string"&&hY.test(e)?{value:e}:{issues:[{message:"expected UUID"}]}}});var ae=zi(function(gY,lv){(function(){function e(M,ee){Object.defineProperty(a.prototype,M,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",ee[0],ee[1])}})}function t(M){if(M===null||typeof M!=="object")return null;return M=Rt&&M[Rt]||M["@@iterator"],typeof M==="function"?M:null}function n(M,ee){M=(M=M.constructor)&&(M.displayName||M.name)||"ReactClass";var me=M+"."+ee;he[me]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",ee,M),he[me]=!0)}function a(M,ee,me){this.props=M,this.context=ee,this.refs=An,this.updater=me||cn}function i(){}function l(M,ee,me){this.props=M,this.context=ee,this.refs=An,this.updater=me||cn}function c(){}function u(M){return""+M}function f(M){try{u(M);var ee=!1}catch(_e){ee=!0}if(ee){ee=console;var me=ee.error,Ce=typeof Symbol==="function"&&Symbol.toStringTag&&M[Symbol.toStringTag]||M.constructor.name||"Object";return me.call(ee,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Ce),u(M)}}function h(M){if(M==null)return null;if(typeof M==="function")return M.$$typeof===Zr?null:M.displayName||M.name||null;if(typeof M==="string")return M;switch(M){case K:return"Fragment";case X:return"Profiler";case k:return"StrictMode";case Fe:return"Suspense";case Te:return"SuspenseList";case Oe:return"Activity"}if(typeof M==="object")switch(typeof M.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),M.$$typeof){case de:return"Portal";case $e:return M.displayName||"Context";case ve:return(M._context.displayName||"Context")+".Consumer";case Ae:var ee=M.render;return M=M.displayName,M||(M=ee.displayName||ee.name||"",M=M!==""?"ForwardRef("+M+")":"ForwardRef"),M;case Ze:return ee=M.displayName||null,ee!==null?ee:h(M.type)||"Memo";case pe:ee=M._payload,M=M._init;try{return h(M(ee))}catch(me){}}return null}function m(M){if(M===K)return"<>";if(typeof M==="object"&&M!==null&&M.$$typeof===pe)return"<...>";try{var ee=h(M);return ee?"<"+ee+">":"<...>"}catch(me){return"<...>"}}function b(){var M=it.A;return M===null?null:M.getOwner()}function y(){return Error("react-stack-top-frame")}function v(M){if(jd.call(M,"key")){var ee=Object.getOwnPropertyDescriptor(M,"key").get;if(ee&&ee.isReactWarning)return!1}return M.key!==void 0}function S(M,ee){function me(){Vb||(Vb=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",ee))}me.isReactWarning=!0,Object.defineProperty(M,"key",{get:me,configurable:!0})}function C(){var M=h(this.type);return Xc[M]||(Xc[M]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),M=this.props.ref,M!==void 0?M:null}function E(M,ee,me,Ce,_e,et){var tt=me.ref;return M={$$typeof:Z,type:M,key:ee,props:me,_owner:Ce},(tt!==void 0?tt:null)!==null?Object.defineProperty(M,"ref",{enumerable:!1,get:C}):Object.defineProperty(M,"ref",{enumerable:!1,value:null}),M._store={},Object.defineProperty(M._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(M,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(M,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:_e}),Object.defineProperty(M,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:et}),Object.freeze&&(Object.freeze(M.props),Object.freeze(M)),M}function R(M,ee){return ee=E(M.type,ee,M.props,M._owner,M._debugStack,M._debugTask),M._store&&(ee._store.validated=M._store.validated),ee}function D(M){U(M)?M._store&&(M._store.validated=1):typeof M==="object"&&M!==null&&M.$$typeof===pe&&(M._payload.status==="fulfilled"?U(M._payload.value)&&M._payload.value._store&&(M._payload.value._store.validated=1):M._store&&(M._store.validated=1))}function U(M){return typeof M==="object"&&M!==null&&M.$$typeof===Z}function z(M){var ee={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(me){return ee[me]})}function L(M,ee){return typeof M==="object"&&M!==null&&M.key!=null?(f(M.key),z(""+M.key)):ee.toString(36)}function Q(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status==="string"?M.then(c,c):(M.status="pending",M.then(function(ee){M.status==="pending"&&(M.status="fulfilled",M.value=ee)},function(ee){M.status==="pending"&&(M.status="rejected",M.reason=ee)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function V(M,ee,me,Ce,_e){var et=typeof M;if(et==="undefined"||et==="boolean")M=null;var tt=!1;if(M===null)tt=!0;else switch(et){case"bigint":case"string":case"number":tt=!0;break;case"object":switch(M.$$typeof){case Z:case de:tt=!0;break;case pe:return tt=M._init,V(tt(M._payload),ee,me,Ce,_e)}}if(tt){tt=M,_e=_e(tt);var Mt=Ce===""?"."+L(tt,0):Ce;return Ie(_e)?(me="",Mt!=null&&(me=Mt.replace(qd,"$&/")+"/"),V(_e,ee,me,"",function(wr){return wr})):_e!=null&&(U(_e)&&(_e.key!=null&&(tt&&tt.key===_e.key||f(_e.key)),me=R(_e,me+(_e.key==null||tt&&tt.key===_e.key?"":(""+_e.key).replace(qd,"$&/")+"/")+Mt),Ce!==""&&tt!=null&&U(tt)&&tt.key==null&&tt._store&&!tt._store.validated&&(me._store.validated=2),_e=me),ee.push(_e)),1}if(tt=0,Mt=Ce===""?".":Ce+":",Ie(M))for(var je=0;je<M.length;je++)Ce=M[je],et=Mt+L(Ce,je),tt+=V(Ce,ee,me,et,_e);else if(je=t(M),typeof je==="function")for(je===M.entries&&(Kd||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Kd=!0),M=je.call(M),je=0;!(Ce=M.next()).done;)Ce=Ce.value,et=Mt+L(Ce,je++),tt+=V(Ce,ee,me,et,_e);else if(et==="object"){if(typeof M.then==="function")return V(Q(M),ee,me,Ce,_e);throw ee=String(M),Error("Objects are not valid as a React child (found: "+(ee==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":ee)+"). If you meant to render a collection of children, use an array instead.")}return tt}function P(M,ee,me){if(M==null)return M;var Ce=[],_e=0;return V(M,Ce,"","",function(et){return ee.call(me,et,_e++)}),Ce}function re(M){if(M._status===-1){var ee=M._ioInfo;ee!=null&&(ee.start=ee.end=performance.now()),ee=M._result;var me=ee();if(me.then(function(_e){if(M._status===0||M._status===-1){M._status=1,M._result=_e;var et=M._ioInfo;et!=null&&(et.end=performance.now()),me.status===void 0&&(me.status="fulfilled",me.value=_e)}},function(_e){if(M._status===0||M._status===-1){M._status=2,M._result=_e;var et=M._ioInfo;et!=null&&(et.end=performance.now()),me.status===void 0&&(me.status="rejected",me.reason=_e)}}),ee=M._ioInfo,ee!=null){ee.value=me;var Ce=me.displayName;typeof Ce==="string"&&(ee.name=Ce)}M._status===-1&&(M._status=0,M._result=me)}if(M._status===1)return ee=M._result,ee===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
2
+
3
+ Your code should look like:
4
+ const MyComponent = lazy(() => import('./MyComponent'))
5
+
6
+ Did you accidentally put curly braces around the import?`,ee),"default"in ee||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
7
+
8
+ Your code should look like:
9
+ const MyComponent = lazy(() => import('./MyComponent'))`,ee),ee.default;throw M._result}function J(){var M=it.H;return M===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
10
+ 1. You might have mismatching versions of React and the renderer (such as React DOM)
11
+ 2. You might be breaking the Rules of Hooks
12
+ 3. You might have more than one copy of React in the same app
13
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),M}function ge(){it.asyncTransitions--}function le(M){if(Zc===null)try{var ee=("require"+Math.random()).slice(0,7);Zc=(lv&&lv[ee]).call(lv,"timers").setImmediate}catch(me){Zc=function(Ce){jb===!1&&(jb=!0,typeof MessageChannel>"u"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var _e=new MessageChannel;_e.port1.onmessage=Ce,_e.port2.postMessage(void 0)}}return Zc(M)}function se(M){return 1<M.length&&typeof AggregateError==="function"?AggregateError(M):M[0]}function I(M,ee){ee!==eu-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),eu=ee}function F(M,ee,me){var Ce=it.actQueue;if(Ce!==null)if(Ce.length!==0)try{Y(Ce),le(function(){return F(M,ee,me)});return}catch(_e){it.thrownErrors.push(_e)}else it.actQueue=null;0<it.thrownErrors.length?(Ce=se(it.thrownErrors),it.thrownErrors.length=0,me(Ce)):ee(M)}function Y(M){if(!nu){nu=!0;var ee=0;try{for(;ee<M.length;ee++){var me=M[ee];do{it.didUsePromise=!1;var Ce=me(!1);if(Ce!==null){if(it.didUsePromise){M[ee]=me,M.splice(0,ee);return}me=Ce}else break}while(1)}M.length=0}catch(_e){M.splice(0,ee+1),it.thrownErrors.push(_e)}finally{nu=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Z=Symbol.for("react.transitional.element"),de=Symbol.for("react.portal"),K=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),X=Symbol.for("react.profiler"),ve=Symbol.for("react.consumer"),$e=Symbol.for("react.context"),Ae=Symbol.for("react.forward_ref"),Fe=Symbol.for("react.suspense"),Te=Symbol.for("react.suspense_list"),Ze=Symbol.for("react.memo"),pe=Symbol.for("react.lazy"),Oe=Symbol.for("react.activity"),Rt=Symbol.iterator,he={},cn={isMounted:function(){return!1},enqueueForceUpdate:function(M){n(M,"forceUpdate")},enqueueReplaceState:function(M){n(M,"replaceState")},enqueueSetState:function(M){n(M,"setState")}},Dn=Object.assign,An={};Object.freeze(An),a.prototype.isReactComponent={},a.prototype.setState=function(M,ee){if(typeof M!=="object"&&typeof M!=="function"&&M!=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,M,ee,"setState")},a.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};var nn={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]};for(xl in nn)nn.hasOwnProperty(xl)&&e(xl,nn[xl]);i.prototype=a.prototype,nn=l.prototype=new i,nn.constructor=l,Dn(nn,a.prototype),nn.isPureReactComponent=!0;var Ie=Array.isArray,Zr=Symbol.for("react.client.reference"),it={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},jd=Object.prototype.hasOwnProperty,qt=console.createTask?console.createTask:function(){return null};nn={react_stack_bottom_frame:function(M){return M()}};var Vb,ui,Xc={},Qc=nn.react_stack_bottom_frame.bind(nn,y)(),y2=qt(m(y)),Kd=!1,qd=/\/+/g,vl=typeof reportError==="function"?reportError:function(M){if(typeof window==="object"&&typeof window.ErrorEvent==="function"){var ee=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M==="object"&&M!==null&&typeof M.message==="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(ee))return}else if(typeof process==="object"&&typeof process.emit==="function"){process.emit("uncaughtException",M);return}console.error(M)},jb=!1,Zc=null,eu=0,tu=!1,nu=!1,gh=typeof queueMicrotask==="function"?function(M){queueMicrotask(function(){return queueMicrotask(M)})}:le;nn=Object.freeze({__proto__:null,c:function(M){return J().useMemoCache(M)}});var xl={map:P,forEach:function(M,ee,me){P(M,function(){ee.apply(this,arguments)},me)},count:function(M){var ee=0;return P(M,function(){ee++}),ee},toArray:function(M){return P(M,function(ee){return ee})||[]},only:function(M){if(!U(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};gY.Activity=Oe,gY.Children=xl,gY.Component=a,gY.Fragment=K,gY.Profiler=X,gY.PureComponent=l,gY.StrictMode=k,gY.Suspense=Fe,gY.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=it,gY.__COMPILER_RUNTIME=nn,gY.act=function(M){var ee=it.actQueue,me=eu;eu++;var Ce=it.actQueue=ee!==null?ee:[],_e=!1;try{var et=M()}catch(je){it.thrownErrors.push(je)}if(0<it.thrownErrors.length)throw I(ee,me),M=se(it.thrownErrors),it.thrownErrors.length=0,M;if(et!==null&&typeof et==="object"&&typeof et.then==="function"){var tt=et;return gh(function(){_e||tu||(tu=!0,console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function(je,wr){_e=!0,tt.then(function(xo){if(I(ee,me),me===0){try{Y(Ce),le(function(){return F(xo,je,wr)})}catch(bh){it.thrownErrors.push(bh)}if(0<it.thrownErrors.length){var $l=se(it.thrownErrors);it.thrownErrors.length=0,wr($l)}}else je(xo)},function(xo){I(ee,me),0<it.thrownErrors.length?(xo=se(it.thrownErrors),it.thrownErrors.length=0,wr(xo)):wr(xo)})}}}var Mt=et;if(I(ee,me),me===0&&(Y(Ce),Ce.length!==0&&gh(function(){_e||tu||(tu=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),it.actQueue=null),0<it.thrownErrors.length)throw M=se(it.thrownErrors),it.thrownErrors.length=0,M;return{then:function(je,wr){_e=!0,me===0?(it.actQueue=Ce,le(function(){return F(Mt,je,wr)})):je(Mt)}}},gY.cache=function(M){return function(){return M.apply(null,arguments)}},gY.cacheSignal=function(){return null},gY.captureOwnerStack=function(){var M=it.getCurrentStack;return M===null?null:M()},gY.cloneElement=function(M,ee,me){if(M===null||M===void 0)throw Error("The argument must be a React element, but you passed "+M+".");var Ce=Dn({},M.props),_e=M.key,et=M._owner;if(ee!=null){var tt;e:{if(jd.call(ee,"ref")&&(tt=Object.getOwnPropertyDescriptor(ee,"ref").get)&&tt.isReactWarning){tt=!1;break e}tt=ee.ref!==void 0}tt&&(et=b()),v(ee)&&(f(ee.key),_e=""+ee.key);for(Mt in ee)!jd.call(ee,Mt)||Mt==="key"||Mt==="__self"||Mt==="__source"||Mt==="ref"&&ee.ref===void 0||(Ce[Mt]=ee[Mt])}var Mt=arguments.length-2;if(Mt===1)Ce.children=me;else if(1<Mt){tt=Array(Mt);for(var je=0;je<Mt;je++)tt[je]=arguments[je+2];Ce.children=tt}Ce=E(M.type,_e,Ce,et,M._debugStack,M._debugTask);for(_e=2;_e<arguments.length;_e++)D(arguments[_e]);return Ce},gY.createContext=function(M){return M={$$typeof:$e,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:ve,_context:M},M._currentRenderer=null,M._currentRenderer2=null,M},gY.createElement=function(M,ee,me){for(var Ce=2;Ce<arguments.length;Ce++)D(arguments[Ce]);Ce={};var _e=null;if(ee!=null)for(je in ui||!("__self"in ee)||"key"in ee||(ui=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),v(ee)&&(f(ee.key),_e=""+ee.key),ee)jd.call(ee,je)&&je!=="key"&&je!=="__self"&&je!=="__source"&&(Ce[je]=ee[je]);var et=arguments.length-2;if(et===1)Ce.children=me;else if(1<et){for(var tt=Array(et),Mt=0;Mt<et;Mt++)tt[Mt]=arguments[Mt+2];Object.freeze&&Object.freeze(tt),Ce.children=tt}if(M&&M.defaultProps)for(je in et=M.defaultProps,et)Ce[je]===void 0&&(Ce[je]=et[je]);_e&&S(Ce,typeof M==="function"?M.displayName||M.name||"Unknown":M);var je=1e4>it.recentlyCreatedOwnerStacks++;return E(M,_e,Ce,b(),je?Error("react-stack-top-frame"):Qc,je?qt(m(M)):y2)},gY.createRef=function(){var M={current:null};return Object.seal(M),M},gY.forwardRef=function(M){M!=null&&M.$$typeof===Ze?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof M!=="function"?console.error("forwardRef requires a render function but was given %s.",M===null?"null":typeof M):M.length!==0&&M.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",M.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),M!=null&&M.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var ee={$$typeof:Ae,render:M},me;return Object.defineProperty(ee,"displayName",{enumerable:!1,configurable:!0,get:function(){return me},set:function(Ce){me=Ce,M.name||M.displayName||(Object.defineProperty(M,"name",{value:Ce}),M.displayName=Ce)}}),ee},gY.isValidElement=U,gY.lazy=function(M){M={_status:-1,_result:M};var ee={$$typeof:pe,_payload:M,_init:re},me={name:"lazy",start:-1,end:-1,value:null,owner:null,debugStack:Error("react-stack-top-frame"),debugTask:console.createTask?console.createTask("lazy()"):null};return M._ioInfo=me,ee._debugInfo=[{awaited:me}],ee},gY.memo=function(M,ee){M==null&&console.error("memo: The first argument must be a component. Instead received: %s",M===null?"null":typeof M),ee={$$typeof:Ze,type:M,compare:ee===void 0?null:ee};var me;return Object.defineProperty(ee,"displayName",{enumerable:!1,configurable:!0,get:function(){return me},set:function(Ce){me=Ce,M.name||M.displayName||(Object.defineProperty(M,"name",{value:Ce}),M.displayName=Ce)}}),ee},gY.startTransition=function(M){var ee=it.T,me={};me._updatedFibers=new Set,it.T=me;try{var Ce=M(),_e=it.S;_e!==null&&_e(me,Ce),typeof Ce==="object"&&Ce!==null&&typeof Ce.then==="function"&&(it.asyncTransitions++,Ce.then(ge,ge),Ce.then(c,vl))}catch(et){vl(et)}finally{ee===null&&me._updatedFibers&&(M=me._updatedFibers.size,me._updatedFibers.clear(),10<M&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),ee!==null&&me.types!==null&&(ee.types!==null&&ee.types!==me.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),ee.types=me.types),it.T=ee}},gY.unstable_useCacheRefresh=function(){return J().useCacheRefresh()},gY.use=function(M){return J().use(M)},gY.useActionState=function(M,ee,me){return J().useActionState(M,ee,me)},gY.useCallback=function(M,ee){return J().useCallback(M,ee)},gY.useContext=function(M){var ee=J();return M.$$typeof===ve&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),ee.useContext(M)},gY.useDebugValue=function(M,ee){return J().useDebugValue(M,ee)},gY.useDeferredValue=function(M,ee){return J().useDeferredValue(M,ee)},gY.useEffect=function(M,ee){return M==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"),J().useEffect(M,ee)},gY.useEffectEvent=function(M){return J().useEffectEvent(M)},gY.useId=function(){return J().useId()},gY.useImperativeHandle=function(M,ee,me){return J().useImperativeHandle(M,ee,me)},gY.useInsertionEffect=function(M,ee){return M==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),J().useInsertionEffect(M,ee)},gY.useLayoutEffect=function(M,ee){return M==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),J().useLayoutEffect(M,ee)},gY.useMemo=function(M,ee){return J().useMemo(M,ee)},gY.useOptimistic=function(M,ee){return J().useOptimistic(M,ee)},gY.useReducer=function(M,ee,me){return J().useReducer(M,ee,me)},gY.useRef=function(M){return J().useRef(M)},gY.useState=function(M){return J().useState(M)},gY.useSyncExternalStore=function(M,ee,me){return J().useSyncExternalStore(M,ee,me)},gY.useTransition=function(){return J().useTransition()},gY.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var so=zi(function(bY){var Fu=q(ae());(function(){function e(k){if(k==null)return null;if(typeof k==="function")return k.$$typeof===J?null:k.displayName||k.name||null;if(typeof k==="string")return k;switch(k){case C:return"Fragment";case R:return"Profiler";case E:return"StrictMode";case L:return"Suspense";case Q:return"SuspenseList";case re:return"Activity"}if(typeof k==="object")switch(typeof k.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),k.$$typeof){case S:return"Portal";case U:return k.displayName||"Context";case D:return(k._context.displayName||"Context")+".Consumer";case z:var X=k.render;return k=k.displayName,k||(k=X.displayName||X.name||"",k=k!==""?"ForwardRef("+k+")":"ForwardRef"),k;case V:return X=k.displayName||null,X!==null?X:e(k.type)||"Memo";case P:X=k._payload,k=k._init;try{return e(k(X))}catch(ve){}}return null}function t(k){return""+k}function n(k){try{t(k);var X=!1}catch(Ae){X=!0}if(X){X=console;var ve=X.error,$e=typeof Symbol==="function"&&Symbol.toStringTag&&k[Symbol.toStringTag]||k.constructor.name||"Object";return ve.call(X,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",$e),t(k)}}function a(k){if(k===C)return"<>";if(typeof k==="object"&&k!==null&&k.$$typeof===P)return"<...>";try{var X=e(k);return X?"<"+X+">":"<...>"}catch(ve){return"<...>"}}function i(){var k=ge.A;return k===null?null:k.getOwner()}function l(){return Error("react-stack-top-frame")}function c(k){if(le.call(k,"key")){var X=Object.getOwnPropertyDescriptor(k,"key").get;if(X&&X.isReactWarning)return!1}return k.key!==void 0}function u(k,X){function ve(){F||(F=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",X))}ve.isReactWarning=!0,Object.defineProperty(k,"key",{get:ve,configurable:!0})}function f(){var k=e(this.type);return Y[k]||(Y[k]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),k=this.props.ref,k!==void 0?k:null}function h(k,X,ve,$e,Ae,Fe){var Te=ve.ref;return k={$$typeof:v,type:k,key:X,props:ve,_owner:$e},(Te!==void 0?Te:null)!==null?Object.defineProperty(k,"ref",{enumerable:!1,get:f}):Object.defineProperty(k,"ref",{enumerable:!1,value:null}),k._store={},Object.defineProperty(k._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(k,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(k,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Ae}),Object.defineProperty(k,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Fe}),Object.freeze&&(Object.freeze(k.props),Object.freeze(k)),k}function m(k,X,ve,$e,Ae,Fe){var Te=X.children;if(Te!==void 0)if($e)if(se(Te)){for($e=0;$e<Te.length;$e++)b(Te[$e]);Object.freeze&&Object.freeze(Te)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else b(Te);if(le.call(X,"key")){Te=e(k);var Ze=Object.keys(X).filter(function(Oe){return Oe!=="key"});$e=0<Ze.length?"{key: someKey, "+Ze.join(": ..., ")+": ...}":"{key: someKey}",K[Te+$e]||(Ze=0<Ze.length?"{"+Ze.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
14
+ let props = %s;
15
+ <%s {...props} />
16
+ React keys must be passed directly to JSX without using spread:
17
+ let props = %s;
18
+ <%s key={someKey} {...props} />`,$e,Te,Ze,Te),K[Te+$e]=!0)}if(Te=null,ve!==void 0&&(n(ve),Te=""+ve),c(X)&&(n(X.key),Te=""+X.key),"key"in X){ve={};for(var pe in X)pe!=="key"&&(ve[pe]=X[pe])}else ve=X;return Te&&u(ve,typeof k==="function"?k.displayName||k.name||"Unknown":k),h(k,Te,ve,i(),Ae,Fe)}function b(k){y(k)?k._store&&(k._store.validated=1):typeof k==="object"&&k!==null&&k.$$typeof===P&&(k._payload.status==="fulfilled"?y(k._payload.value)&&k._payload.value._store&&(k._payload.value._store.validated=1):k._store&&(k._store.validated=1))}function y(k){return typeof k==="object"&&k!==null&&k.$$typeof===v}var v=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),U=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),Q=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),re=Symbol.for("react.activity"),J=Symbol.for("react.client.reference"),ge=Fu.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le=Object.prototype.hasOwnProperty,se=Array.isArray,I=console.createTask?console.createTask:function(){return null};Fu={react_stack_bottom_frame:function(k){return k()}};var F,Y={},Z=Fu.react_stack_bottom_frame.bind(Fu,l)(),de=I(a(l)),K={};bY.Fragment=C,bY.jsx=function(k,X,ve){var $e=1e4>ge.recentlyCreatedOwnerStacks++;return m(k,X,ve,!1,$e?Error("react-stack-top-frame"):Z,$e?I(a(k)):de)},bY.jsxs=function(k,X,ve){var $e=1e4>ge.recentlyCreatedOwnerStacks++;return m(k,X,ve,!0,$e?Error("react-stack-top-frame"):Z,$e?I(a(k)):de)}})()});class sE{activeUrlHref=null;activeCacheKey=null;activePromise=null;activeResolvedData;hasResolved=!1;pendingBackgroundKey=null;id;constructor(){this.id=yY++}resolve(e){let{currentUrlHref:t,cacheKey:n,load:a,loaderCache:i,onBackgroundSettled:l}=e;if(this.handleUrlChange(t,i),this.activeCacheKey===n){if(this.pendingBackgroundKey===n)return{action:"render",data:this.activeResolvedData,isLoading:!0};if(this.hasResolved)return{action:"render",data:this.activeResolvedData,isLoading:!1};return{action:"suspend",promise:this.activePromise}}if(this.hasResolved){let u=a();return this.activeCacheKey=n,this.activePromise=u,this.pendingBackgroundKey=n,u.then((f)=>{if(this.activeCacheKey===n)l({ok:!0,result:f})},()=>{if(this.activeCacheKey===n)l({ok:!1})}),{action:"render",data:this.activeResolvedData,isLoading:!0}}let c=a();return this.activeCacheKey=n,this.activePromise=c,{action:"suspend",promise:c}}commitResult(e){this.activeResolvedData=e,this.hasResolved=!0}commitBackgroundResult(e){this.activeResolvedData=e,this.pendingBackgroundKey=null}commitBackgroundError(){this.hasResolved=!1,this.pendingBackgroundKey=null}dispose(e){if(e&&this.hasResolved&&this.activeResolvedData!==void 0&&this.activeUrlHref)this.saveToStaleCache(e,this.activeUrlHref,this.activeResolvedData);this.activeUrlHref=null,this.activeCacheKey=null,this.activePromise=null,this.activeResolvedData=void 0,this.hasResolved=!1,this.pendingBackgroundKey=null}handleUrlChange(e,t){if(this.activeUrlHref!==null&&this.activeUrlHref!==e){if(t&&this.hasResolved&&this.activeResolvedData!==void 0)this.saveToStaleCache(t,this.activeUrlHref,this.activeResolvedData);let n=t&&this.restoreFromStaleCache(t,e);if(n?.hit)this.activeResolvedData=n.value,this.hasResolved=!0;else this.hasResolved=!1,this.activeResolvedData=void 0;this.pendingBackgroundKey=null}else if(this.activeUrlHref===null&&t){let n=this.restoreFromStaleCache(t,e);if(n.hit)this.activeResolvedData=n.value,this.hasResolved=!0}this.activeUrlHref=e}staleCacheKey(e){return`${this.id}:${e}`}restoreFromStaleCache(e,t){let n=this.staleCacheKey(t);if(!e.has(n))return{hit:!1};let a=e.get(n);return e.delete(n),{hit:!0,value:a}}saveToStaleCache(e,t,n){e.set(this.staleCacheKey(t),n)}}var yY=0;var lE,cc,ua;var Jf=N(()=>{lE=q(ae(),1),cc=lE.createContext(null),ua=lE.createContext(null)});var cv,Uu;var uv=N(()=>{cv=q(ae(),1);Uu=class Uu extends cv.Component{state={error:null,prevResetKey:void 0};static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){if(t.error&&e.resetKey!==t.prevResetKey)return{error:null,prevResetKey:e.resetKey};if(e.resetKey!==t.prevResetKey)return{prevResetKey:e.resetKey};return null}componentDidCatch(e,t){console.error("Buzola route error:",e,t)}render(){if(this.state.error){if(typeof this.props.fallback==="function")return this.props.fallback(this.state.error);if(this.props.fallback)return this.props.fallback;return cv.default.createElement("div",{style:{color:"red"}},`Route error: ${this.state.error.message}`)}return this.props.children}}});function vY(e){return"~standard"in e}function xY(e){if(vY(e))return{schema:e,paramsMeta:e.__buzolaKeys??[]};let t=e,n=[],a={};for(let[l,c]of Object.entries(t))if(typeof c==="string"){let u=H6(c);a[l]=u.schema,n.push({name:l,optional:u.optional,array:u.array})}else a[l]=c,n.push({name:l,optional:z6(c),array:!1});return{schema:{"~standard":{version:1,vendor:"buzola",validate:(l)=>{let c=l??{},u={};for(let[f,h]of Object.entries(a)){let m=h["~standard"].validate(c[f]);if("issues"in m)return m;u[f]=m.value}return{value:u}}}},paramsMeta:n}}class Xf{pageId;params;__buzolaRedirect=!0;constructor(e,t){this.pageId=e,this.params=t}}function Ym(e){if(e.length===0)return;if(e.length===1)return e[0];return async(t)=>{let n=await Promise.all(e.map((i)=>i(t))),a=n.find((i)=>i instanceof Xf);if(a)return a;return Object.assign({},...n)}}function Jm(e,t,n,a,i,l){let c=new Set(t.filter((b)=>b.array).map((b)=>b.name)),u=n?new sE:void 0;function f(){let b=nr.use(ua);if(!b)throw Error("createPage component must be used within a <BuzolaProvider>");let y=nr.use(cc),v=nr.useMemo(()=>{let{state:L,matches:Q,params:V}=b,P=Q.find((ge)=>ge.node.component===f),re=new Set(P?Wm(P.node.fullPath):[]),J={};if(c.size>0)for(let ge of c){if(re.has(ge))continue;let le=[...L.location.searchParams.getAll(ge),...L.location.searchParams.getAll(`${ge}[]`)];if(le.length>0)J[ge]=le}L.location.searchParams.forEach((ge,le)=>{let se=le.endsWith("[]")?le.slice(0,-2):le;if(!re.has(se)&&!(se in J))J[se]=ge});for(let[ge,le]of Object.entries(V))if(c.has(ge))J[ge]=le.split(",");else J[ge]=le;if(e)return iE(e,J,"Page params validation failed: ");return J},[b]),[S,C]=nr.useState(0),[,E]=nr.useReducer((L)=>L+1,0),R=nr.useCallback(()=>C((L)=>L+1),[]);nr.useEffect(()=>{if(!y)return;return y.onInvalidate(()=>C((L)=>L+1))},[y]);let D,U=!1,z=!1;if(n&&u){let L=b.state.location.href,Q=`${L}:${S}`,V=u.resolve({currentUrlHref:L,cacheKey:Q,load:()=>n({params:v,redirect:F6}),loaderCache:y?.loaderCache,onBackgroundSettled:(P)=>{if(P.ok){if(P.result instanceof Xf){y?.navigateToPage(P.result.pageId,P.result.params,{replace:!0});return}u.commitBackgroundResult(P.result)}else u.commitBackgroundError();E()}});if(V.action==="render")D=V.data,U=V.isLoading;else{let P=nr.use(V.promise);if(P instanceof Xf)y?.navigateToPage(P.pageId,P.params,{replace:!0}),z=!0;else D=P,u.commitResult(D)}}if(nr.useEffect(()=>()=>u?.dispose(y?.loaderCache),[]),z)return null;return dv.jsx(i,{params:v,data:D,invalidate:R,isLoading:U})}function h(){let b=nr.use(ua),[y,v]=nr.useState(0),S=nr.useCallback(()=>v((R)=>R+1),[]),C=`${b?.state.location.href??""}:${y}`;return dv.jsx(Uu,{fallback:typeof l==="function"?(R)=>l({error:R,params:b?.params??{},retry:S}):l,resetKey:C,children:dv.jsx(f,{},y)})}return{__buzolaPage:!0,component:l?h:f,route:a,paramsSchema:e,paramsMeta:t,loader:n}}function $Y(e,t,n,a){return{route(i){return{render(l){return Jm(e,t,Ym(n),i,l,a)}}},render(i){return Jm(e,t,Ym(n),void 0,i,a)}}}function cE(e,t,n){return{loader(a){return cE(e,t,[...n,a])},catch(a){return $Y(e,t,n,a)},route(a){return{catch(i){return{render(l){return Jm(e,t,Ym(n),a,l,i)}}},render(i){return Jm(e,t,Ym(n),a,i)}}},render(a){return Jm(e,t,Ym(n),void 0,a)}}}function dr(){return{params(e){let{schema:t,paramsMeta:n}=xY(e);return cE(t,n,[])},...cE(void 0,[],[])}}var dv,nr,F6=(e,t)=>new Xf(e,t);var U6=N(()=>{sv();Jf();uv();dv=q(so(),1),nr=q(ae(),1)});function wY(){return lo.default.createElement("div",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem",maxWidth:"600px",margin:"0 auto"}},SY?[lo.default.createElement("h1",{key:"h"},"404 — Page Not Found"),lo.default.createElement("p",{key:"p1"},`No route matches "${typeof window<"u"?window.location.pathname:""}".`),lo.default.createElement("p",{key:"p2",style:{color:"#666",fontSize:"0.9rem"}},"To handle this, add a _404.tsx catch-all route or pass a notFound prop to <Outlet />.")]:[lo.default.createElement("h1",{key:"h"},"404"),lo.default.createElement("p",{key:"p"},"Page not found.")])}function Qf({fallback:e,errorFallback:t,notFound:n}){let a=lo.use(ua);if(!a)throw Error("<Outlet /> must be used within a <BuzolaProvider>");let{state:i,depth:l,matches:c}=a,u=l,f=c[u];while(f&&!f.node.component)u++,f=c[u];let h=lo.useMemo(()=>{if(!f)return null;let b={...a.params};for(let y=l;y<=u;y++)if(c[y])b={...b,...c[y].params};return{state:i,depth:u+1,matches:c,params:b}},[i,l,u,c,f,a.params]);if(!f){if(l===0&&c.length===0){if(n===null)return null;return n??lo.default.createElement(wY,null)}return null}let m=f.node.component;return Xm.jsx(Uu,{fallback:t,resetKey:f.node.id,children:Xm.jsx(lo.Suspense,{fallback:e??null,children:h&&Xm.jsx(ua,{value:h,children:Xm.jsx(m,{})})})})}var Xm,lo,SY;var uE=N(()=>{Jf();uv();Xm=q(so(),1),lo=q(ae(),1),SY=typeof process<"u"&&!0});function fv({routes:e,children:t,middleware:n,...a}){let i=Bo.useRef(a.router);if(!i.current)i.current=new iv({routes:e,adapter:aE(),persistentParams:a.persistentParams,pageRegistry:a.pageRegistry});let l=i.current,c=Bo.useCallback((y)=>l.subscribe(y),[l]),u=Bo.useCallback(()=>l.getState(),[l]),f=Bo.useSyncExternalStore(c,u,u);Bo.useLayoutEffect(()=>l.start(),[l]);let h=Bo.useMemo(()=>({state:f,depth:0,matches:f.matches,params:{}}),[f]),m=Bo.useMemo(()=>{let y={};for(let v of f.matches)y={...y,...v.params};return y},[f.matches]),b=t??Qm.jsx(Qf,{});return Qm.jsx(cc,{value:l,children:Qm.jsx(ua,{value:h,children:n?Qm.jsx(n,{params:m,matches:f.matches,children:b}):b})})}var Qm,Bo;var V6=N(()=>{nE();Jf();uE();Qm=q(so(),1),Bo=q(ae(),1)});function Zm(){let e=Hi.use(cc);if(!e)throw Error("useRouter must be used within a <BuzolaProvider>");return e}function CY(){let e=Hi.use(ua);if(!e)throw Error("Route hooks must be used within a <BuzolaProvider>");return e}function Rr(){let e=Zm();return Hi.useCallback((t,n)=>{e.navigateToPage(t,n?.params,n)},[e])}function pv(){let e=CY(),t=Zm(),{state:n,matches:a,params:i,depth:l}=e;return Hi.useMemo(()=>({params:i,matches:a,depth:l,isPending:n.isPending,pendingLocation:n.pendingLocation?t.stripBasePath(n.pendingLocation.pathname):void 0,pathname:t.stripBasePath(n.location.pathname)}),[i,a,l,n.isPending,n.pendingLocation,n.location.pathname,t])}var Hi;var dE=N(()=>{sv();Jf();Hi=q(ae(),1)});var EY,hv;var K6=N(()=>{dE();EY=q(so(),1),hv=q(ae(),1)});var q6=N(()=>{V6();uE();K6();uv();dE();Jf()});var da=N(()=>{nE();sv();U6();q6()});var G6=zi(function(OY){(function(){function e(){if(z=!1,P){var F=OY.unstable_now();ge=F;var Y=!0;try{e:{D=!1,U&&(U=!1,Q(re),re=-1),R=!0;var Z=E;try{t:{l(F);for(C=n(y);C!==null&&!(C.expirationTime>F&&u());){var de=C.callback;if(typeof de==="function"){C.callback=null,E=C.priorityLevel;var K=de(C.expirationTime<=F);if(F=OY.unstable_now(),typeof K==="function"){C.callback=K,l(F),Y=!0;break t}C===n(y)&&a(y),l(F)}else a(y);C=n(y)}if(C!==null)Y=!0;else{var k=n(v);k!==null&&f(c,k.startTime-F),Y=!1}}break e}finally{C=null,E=Z,R=!1}Y=void 0}}finally{Y?le():P=!1}}}function t(F,Y){var Z=F.length;F.push(Y);e:for(;0<Z;){var de=Z-1>>>1,K=F[de];if(0<i(K,Y))F[de]=Y,F[Z]=K,Z=de;else break e}}function n(F){return F.length===0?null:F[0]}function a(F){if(F.length===0)return null;var Y=F[0],Z=F.pop();if(Z!==Y){F[0]=Z;e:for(var de=0,K=F.length,k=K>>>1;de<k;){var X=2*(de+1)-1,ve=F[X],$e=X+1,Ae=F[$e];if(0>i(ve,Z))$e<K&&0>i(Ae,ve)?(F[de]=Ae,F[$e]=Z,de=$e):(F[de]=ve,F[X]=Z,de=X);else if($e<K&&0>i(Ae,Z))F[de]=Ae,F[$e]=Z,de=$e;else break e}}return Y}function i(F,Y){var Z=F.sortIndex-Y.sortIndex;return Z!==0?Z:F.id-Y.id}function l(F){for(var Y=n(v);Y!==null;){if(Y.callback===null)a(v);else if(Y.startTime<=F)a(v),Y.sortIndex=Y.expirationTime,t(y,Y);else break;Y=n(v)}}function c(F){if(U=!1,l(F),!D)if(n(y)!==null)D=!0,P||(P=!0,le());else{var Y=n(v);Y!==null&&f(c,Y.startTime-F)}}function u(){return z?!0:OY.unstable_now()-ge<J?!1:!0}function f(F,Y){re=L(function(){F(OY.unstable_now())},Y)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),OY.unstable_now=void 0,typeof performance==="object"&&typeof performance.now==="function"){var h=performance;OY.unstable_now=function(){return h.now()}}else{var m=Date,b=m.now();OY.unstable_now=function(){return m.now()-b}}var y=[],v=[],S=1,C=null,E=3,R=!1,D=!1,U=!1,z=!1,L=typeof setTimeout==="function"?setTimeout:null,Q=typeof clearTimeout==="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null,P=!1,re=-1,J=5,ge=-1;if(typeof V==="function")var le=function(){V(e)};else if(typeof MessageChannel<"u"){var se=new MessageChannel,I=se.port2;se.port1.onmessage=e,le=function(){I.postMessage(null)}}else le=function(){L(e,0)};OY.unstable_IdlePriority=5,OY.unstable_ImmediatePriority=1,OY.unstable_LowPriority=4,OY.unstable_NormalPriority=3,OY.unstable_Profiling=null,OY.unstable_UserBlockingPriority=2,OY.unstable_cancelCallback=function(F){F.callback=null},OY.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):J=0<F?Math.floor(1000/F):5},OY.unstable_getCurrentPriorityLevel=function(){return E},OY.unstable_next=function(F){switch(E){case 1:case 2:case 3:var Y=3;break;default:Y=E}var Z=E;E=Y;try{return F()}finally{E=Z}},OY.unstable_requestPaint=function(){z=!0},OY.unstable_runWithPriority=function(F,Y){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var Z=E;E=F;try{return Y()}finally{E=Z}},OY.unstable_scheduleCallback=function(F,Y,Z){var de=OY.unstable_now();switch(typeof Z==="object"&&Z!==null?(Z=Z.delay,Z=typeof Z==="number"&&0<Z?de+Z:de):Z=de,F){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5000}return K=Z+K,F={id:S++,callback:Y,priorityLevel:F,startTime:Z,expirationTime:K,sortIndex:-1},Z>de?(F.sortIndex=Z,t(v,F),n(y)===null&&F===n(v)&&(U?(Q(re),re=-1):U=!0,f(c,Z-de))):(F.sortIndex=K,t(y,F),D||R||(D=!0,P||(P=!0,le()))),F},OY.unstable_shouldYield=u,OY.unstable_wrapCallback=function(F){var Y=E;return function(){var Z=E;E=Y;try{return F.apply(this,arguments)}finally{E=Z}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var W6=zi(function(DY){var fE=q(ae());(function(){function e(){}function t(m){return""+m}function n(m,b,y){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{t(v);var S=!1}catch(C){S=!0}return S&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol==="function"&&Symbol.toStringTag&&v[Symbol.toStringTag]||v.constructor.name||"Object"),t(v)),{$$typeof:f,key:v==null?null:""+v,children:m,containerInfo:b,implementation:y}}function a(m,b){if(m==="font")return"";if(typeof b==="string")return b==="use-credentials"?b:""}function i(m){return m===null?"`null`":m===void 0?"`undefined`":m===""?"an empty string":'something with type "'+typeof m+'"'}function l(m){return m===null?"`null`":m===void 0?"`undefined`":m===""?"an empty string":typeof m==="string"?JSON.stringify(m):typeof m==="number"?"`"+m+"`":'something with type "'+typeof m+'"'}function c(){var m=h.H;return m===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
19
+ 1. You might have mismatching versions of React and the renderer (such as React DOM)
20
+ 2. You might be breaking the Rules of Hooks
21
+ 3. You might have more than one copy of React in the same app
22
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),m}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var u={d:{f:e,r:function(){throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},D:e,C:e,L:e,m:e,X:e,S:e,M:e},p:0,findDOMNode:null},f=Symbol.for("react.portal"),h=fE.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;typeof Map==="function"&&Map.prototype!=null&&typeof Map.prototype.forEach==="function"&&typeof Set==="function"&&Set.prototype!=null&&typeof Set.prototype.clear==="function"&&typeof Set.prototype.forEach==="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),DY.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,DY.createPortal=function(m,b){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!b||b.nodeType!==1&&b.nodeType!==9&&b.nodeType!==11)throw Error("Target container is not a DOM element.");return n(m,b,null,y)},DY.flushSync=function(m){var b=h.T,y=u.p;try{if(h.T=null,u.p=2,m)return m()}finally{h.T=b,u.p=y,u.d.f()&&console.error("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.")}},DY.preconnect=function(m,b){typeof m==="string"&&m?b!=null&&typeof b!=="object"?console.error("ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",l(b)):b!=null&&typeof b.crossOrigin!=="string"&&console.error("ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",i(b.crossOrigin)):console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",i(m)),typeof m==="string"&&(b?(b=b.crossOrigin,b=typeof b==="string"?b==="use-credentials"?b:"":void 0):b=null,u.d.C(m,b))},DY.prefetchDNS=function(m){if(typeof m!=="string"||!m)console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",i(m));else if(1<arguments.length){var b=arguments[1];typeof b==="object"&&b.hasOwnProperty("crossOrigin")?console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",l(b)):console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",l(b))}typeof m==="string"&&u.d.D(m)},DY.preinit=function(m,b){if(typeof m==="string"&&m?b==null||typeof b!=="object"?console.error("ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",l(b)):b.as!=="style"&&b.as!=="script"&&console.error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',l(b.as)):console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",i(m)),typeof m==="string"&&b&&typeof b.as==="string"){var y=b.as,v=a(y,b.crossOrigin),S=typeof b.integrity==="string"?b.integrity:void 0,C=typeof b.fetchPriority==="string"?b.fetchPriority:void 0;y==="style"?u.d.S(m,typeof b.precedence==="string"?b.precedence:void 0,{crossOrigin:v,integrity:S,fetchPriority:C}):y==="script"&&u.d.X(m,{crossOrigin:v,integrity:S,fetchPriority:C,nonce:typeof b.nonce==="string"?b.nonce:void 0})}},DY.preinitModule=function(m,b){var y="";if(typeof m==="string"&&m||(y+=" The `href` argument encountered was "+i(m)+"."),b!==void 0&&typeof b!=="object"?y+=" The `options` argument encountered was "+i(b)+".":b&&("as"in b)&&b.as!=="script"&&(y+=" The `as` option encountered was "+l(b.as)+"."),y)console.error("ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",y);else switch(y=b&&typeof b.as==="string"?b.as:"script",y){case"script":break;default:y=l(y),console.error('ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',y,m)}if(typeof m==="string")if(typeof b==="object"&&b!==null){if(b.as==null||b.as==="script")y=a(b.as,b.crossOrigin),u.d.M(m,{crossOrigin:y,integrity:typeof b.integrity==="string"?b.integrity:void 0,nonce:typeof b.nonce==="string"?b.nonce:void 0})}else b==null&&u.d.M(m)},DY.preload=function(m,b){var y="";if(typeof m==="string"&&m||(y+=" The `href` argument encountered was "+i(m)+"."),b==null||typeof b!=="object"?y+=" The `options` argument encountered was "+i(b)+".":typeof b.as==="string"&&b.as||(y+=" The `as` option encountered was "+i(b.as)+"."),y&&console.error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',y),typeof m==="string"&&typeof b==="object"&&b!==null&&typeof b.as==="string"){y=b.as;var v=a(y,b.crossOrigin);u.d.L(m,y,{crossOrigin:v,integrity:typeof b.integrity==="string"?b.integrity:void 0,nonce:typeof b.nonce==="string"?b.nonce:void 0,type:typeof b.type==="string"?b.type:void 0,fetchPriority:typeof b.fetchPriority==="string"?b.fetchPriority:void 0,referrerPolicy:typeof b.referrerPolicy==="string"?b.referrerPolicy:void 0,imageSrcSet:typeof b.imageSrcSet==="string"?b.imageSrcSet:void 0,imageSizes:typeof b.imageSizes==="string"?b.imageSizes:void 0,media:typeof b.media==="string"?b.media:void 0})}},DY.preloadModule=function(m,b){var y="";typeof m==="string"&&m||(y+=" The `href` argument encountered was "+i(m)+"."),b!==void 0&&typeof b!=="object"?y+=" The `options` argument encountered was "+i(b)+".":b&&("as"in b)&&typeof b.as!=="string"&&(y+=" The `as` option encountered was "+i(b.as)+"."),y&&console.error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',y),typeof m==="string"&&(b?(y=a(b.as,b.crossOrigin),u.d.m(m,{as:typeof b.as==="string"&&b.as!=="script"?b.as:void 0,crossOrigin:y,integrity:typeof b.integrity==="string"?b.integrity:void 0})):u.d.m(m))},DY.requestFormReset=function(m){u.d.r(m)},DY.unstable_batchedUpdates=function(m,b){return m(b)},DY.useFormState=function(m,b,y){return c().useFormState(m,b,y)},DY.useFormStatus=function(){return c().useHostTransitionStatus()},DY.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var jr=zi(function(jue,Y6){var PY=q(W6());Y6.exports=PY});var J6=zi(function(LY){var Nt=q(G6()),Zf=q(ae()),pE=q(jr());(function(){function e(r,o){for(r=r.memoizedState;r!==null&&0<o;)r=r.next,o--;return r}function t(r,o,s,d){if(s>=o.length)return d;var p=o[s],g=qn(r)?r.slice():pt({},r);return g[p]=t(r[p],o,s+1,d),g}function n(r,o,s){if(o.length!==s.length)console.warn("copyWithRename() expects paths of the same length");else{for(var d=0;d<s.length-1;d++)if(o[d]!==s[d]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return a(r,o,s,0)}}function a(r,o,s,d){var p=o[d],g=qn(r)?r.slice():pt({},r);return d+1===o.length?(g[s[d]]=g[p],qn(g)?g.splice(p,1):delete g[p]):g[p]=a(r[p],o,s,d+1),g}function i(r,o,s){var d=o[s],p=qn(r)?r.slice():pt({},r);if(s+1===o.length)return qn(p)?p.splice(d,1):delete p[d],p;return p[d]=i(r[d],o,s+1),p}function l(){return!1}function c(){return null}function u(){console.error("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks")}function f(){console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")}function h(){}function m(){}function b(r){var o=[];return r.forEach(function(s){o.push(s)}),o.sort().join(", ")}function y(r,o,s,d){return new KK(r,o,s,d)}function v(r,o){r.context===Fl&&(yw(r.current,2,o,r,null,null),af())}function S(r,o){if(ea!==null){var s=o.staleFamilies;o=o.updatedFamilies,Vh(),FA(r.current,o,s),af()}}function C(r){ea=r}function E(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function R(r){var o=r,s=r;if(r.alternate)for(;o.return;)o=o.return;else{r=o;do o=r,(o.flags&4098)!==0&&(s=o.return),r=o.return;while(r)}return o.tag===3?s:null}function D(r){if(r.tag===13){var o=r.memoizedState;if(o===null&&(r=r.alternate,r!==null&&(o=r.memoizedState)),o!==null)return o.dehydrated}return null}function U(r){if(r.tag===31){var o=r.memoizedState;if(o===null&&(r=r.alternate,r!==null&&(o=r.memoizedState)),o!==null)return o.dehydrated}return null}function z(r){if(R(r)!==r)throw Error("Unable to find node on an unmounted component.")}function L(r){var o=r.alternate;if(!o){if(o=R(r),o===null)throw Error("Unable to find node on an unmounted component.");return o!==r?null:r}for(var s=r,d=o;;){var p=s.return;if(p===null)break;var g=p.alternate;if(g===null){if(d=p.return,d!==null){s=d;continue}break}if(p.child===g.child){for(g=p.child;g;){if(g===s)return z(p),r;if(g===d)return z(p),o;g=g.sibling}throw Error("Unable to find node on an unmounted component.")}if(s.return!==d.return)s=p,d=g;else{for(var x=!1,w=p.child;w;){if(w===s){x=!0,s=p,d=g;break}if(w===d){x=!0,d=p,s=g;break}w=w.sibling}if(!x){for(w=g.child;w;){if(w===s){x=!0,s=g,d=p;break}if(w===d){x=!0,d=g,s=p;break}w=w.sibling}if(!x)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(s.alternate!==d)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(s.tag!==3)throw Error("Unable to find node on an unmounted component.");return s.stateNode.current===s?r:o}function Q(r){var o=r.tag;if(o===5||o===26||o===27||o===6)return r;for(r=r.child;r!==null;){if(o=Q(r),o!==null)return o;r=r.sibling}return null}function V(r){if(r===null||typeof r!=="object")return null;return r=WN&&r[WN]||r["@@iterator"],typeof r==="function"?r:null}function P(r){if(r==null)return null;if(typeof r==="function")return r.$$typeof===fG?null:r.displayName||r.name||null;if(typeof r==="string")return r;switch(r){case pf:return"Fragment";case Cw:return"Profiler";case Z0:return"StrictMode";case Tw:return"Suspense";case Rw:return"SuspenseList";case kw:return"Activity"}if(typeof r==="object")switch(typeof r.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),r.$$typeof){case ff:return"Portal";case ki:return r.displayName||"Context";case Ew:return(r._context.displayName||"Context")+".Consumer";case Zh:var o=r.render;return r=r.displayName,r||(r=o.displayName||o.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case ey:return o=r.displayName||null,o!==null?o:P(r.type)||"Memo";case Ao:o=r._payload,r=r._init;try{return P(r(o))}catch(s){}}return null}function re(r){return typeof r.tag==="number"?J(r):typeof r.name==="string"?r.name:null}function J(r){var o=r.type;switch(r.tag){case 31:return"Activity";case 24:return"Cache";case 9:return(o._context.displayName||"Context")+".Consumer";case 10:return o.displayName||"Context";case 18:return"DehydratedFragment";case 11:return r=o.render,r=r.displayName||r.name||"",o.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 26:case 27:case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return P(o);case 8:return o===Z0?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 14:case 15:if(typeof o==="function")return o.displayName||o.name||null;if(typeof o==="string")return o;break;case 29:if(o=r._debugInfo,o!=null){for(var s=o.length-1;0<=s;s--)if(typeof o[s].name==="string")return o[s].name}if(r.return!==null)return J(r.return)}return null}function ge(r){return{current:r}}function le(r,o){0>ys?console.error("Unexpected pop."):(o!==Mw[ys]&&console.error("Unexpected Fiber popped."),r.current=Aw[ys],Aw[ys]=null,Mw[ys]=null,ys--)}function se(r,o,s){ys++,Aw[ys]=r.current,Mw[ys]=s,r.current=o}function I(r){return r===null&&console.error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),r}function F(r,o){se(Ll,o,r),se(em,r,r),se(Pl,null,r);var s=o.nodeType;switch(s){case 9:case 11:s=s===9?"#document":"#fragment",o=(o=o.documentElement)?(o=o.namespaceURI)?yN(o):Os:Os;break;default:if(s=o.tagName,o=o.namespaceURI)o=yN(o),o=vN(o,s);else switch(s){case"svg":o=Gf;break;case"math":o=Qy;break;default:o=Os}}s=s.toLowerCase(),s=fA(null,s),s={context:o,ancestorInfo:s},le(Pl,r),se(Pl,s,r)}function Y(r){le(Pl,r),le(em,r),le(Ll,r)}function Z(){return I(Pl.current)}function de(r){r.memoizedState!==null&&se(ty,r,r);var o=I(Pl.current),s=r.type,d=vN(o.context,s);s=fA(o.ancestorInfo,s),d={context:d,ancestorInfo:s},o!==d&&(se(em,r,r),se(Pl,d,r))}function K(r){em.current===r&&(le(Pl,r),le(em,r)),ty.current===r&&(le(ty,r),Km._currentValue=Hu)}function k(){}function X(){if(tm===0){YN=console.log,JN=console.info,XN=console.warn,QN=console.error,ZN=console.group,e8=console.groupCollapsed,t8=console.groupEnd;var r={configurable:!0,enumerable:!0,value:k,writable:!0};Object.defineProperties(console,{info:r,log:r,warn:r,error:r,group:r,groupCollapsed:r,groupEnd:r})}tm++}function ve(){if(tm--,tm===0){var r={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:pt({},r,{value:YN}),info:pt({},r,{value:JN}),warn:pt({},r,{value:XN}),error:pt({},r,{value:QN}),group:pt({},r,{value:ZN}),groupCollapsed:pt({},r,{value:e8}),groupEnd:pt({},r,{value:t8})})}0>tm&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function $e(r){var o=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,r=r.stack,Error.prepareStackTrace=o,r.startsWith(`Error: react-stack-top-frame
23
+ `)&&(r=r.slice(29)),o=r.indexOf(`
24
+ `),o!==-1&&(r=r.slice(o+1)),o=r.indexOf("react_stack_bottom_frame"),o!==-1&&(o=r.lastIndexOf(`
25
+ `,o)),o!==-1)r=r.slice(0,o);else return"";return r}function Ae(r){if(Nw===void 0)try{throw Error()}catch(s){var o=s.stack.trim().match(/\n( *(at )?)/);Nw=o&&o[1]||"",n8=-1<s.stack.indexOf(`
26
+ at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
27
+ `+Nw+r+n8}function Fe(r,o){if(!r||Ow)return"";var s=Dw.get(r);if(s!==void 0)return s;Ow=!0,s=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var d=null;d=oe.H,oe.H=null,X();try{var p={DetermineComponentFrameRoot:function(){try{if(o){var B=function(){throw Error()};if(Object.defineProperty(B.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(B,[])}catch(xe){var te=xe}Reflect.construct(r,[],B)}else{try{B.call()}catch(xe){te=xe}r.call(B.prototype)}}else{try{throw Error()}catch(xe){te=xe}(B=r())&&typeof B.catch==="function"&&B.catch(function(){})}}catch(xe){if(xe&&te&&typeof xe.stack==="string")return[xe.stack,te.stack]}return[null,null]}};p.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var g=Object.getOwnPropertyDescriptor(p.DetermineComponentFrameRoot,"name");g&&g.configurable&&Object.defineProperty(p.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var x=p.DetermineComponentFrameRoot(),w=x[0],T=x[1];if(w&&T){var A=w.split(`
28
+ `),G=T.split(`
29
+ `);for(x=g=0;g<A.length&&!A[g].includes("DetermineComponentFrameRoot");)g++;for(;x<G.length&&!G[x].includes("DetermineComponentFrameRoot");)x++;if(g===A.length||x===G.length)for(g=A.length-1,x=G.length-1;1<=g&&0<=x&&A[g]!==G[x];)x--;for(;1<=g&&0<=x;g--,x--)if(A[g]!==G[x]){if(g!==1||x!==1)do if(g--,x--,0>x||A[g]!==G[x]){var W=`
30
+ `+A[g].replace(" at new "," at ");return r.displayName&&W.includes("<anonymous>")&&(W=W.replace("<anonymous>",r.displayName)),typeof r==="function"&&Dw.set(r,W),W}while(1<=g&&0<=x);break}}}finally{Ow=!1,oe.H=d,ve(),Error.prepareStackTrace=s}return A=(A=r?r.displayName||r.name:"")?Ae(A):"",typeof r==="function"&&Dw.set(r,A),A}function Te(r,o){switch(r.tag){case 26:case 27:case 5:return Ae(r.type);case 16:return Ae("Lazy");case 13:return r.child!==o&&o!==null?Ae("Suspense Fallback"):Ae("Suspense");case 19:return Ae("SuspenseList");case 0:case 15:return Fe(r.type,!1);case 11:return Fe(r.type.render,!1);case 1:return Fe(r.type,!0);case 31:return Ae("Activity");default:return""}}function Ze(r){try{var o="",s=null;do{o+=Te(r,s);var d=r._debugInfo;if(d)for(var p=d.length-1;0<=p;p--){var g=d[p];if(typeof g.name==="string"){var x=o;e:{var{name:w,env:T,debugLocation:A}=g;if(A!=null){var G=$e(A),W=G.lastIndexOf(`
31
+ `),B=W===-1?G:G.slice(W+1);if(B.indexOf(w)!==-1){var te=`
32
+ `+B;break e}}te=Ae(w+(T?" ["+T+"]":""))}o=x+te}}s=r,r=r.return}while(r);return o}catch(xe){return`
33
+ Error generating stack: `+xe.message+`
34
+ `+xe.stack}}function pe(r){return(r=r?r.displayName||r.name:"")?Ae(r):""}function Oe(){if(Mo===null)return null;var r=Mo._debugOwner;return r!=null?re(r):null}function Rt(){if(Mo===null)return"";var r=Mo;try{var o="";switch(r.tag===6&&(r=r.return),r.tag){case 26:case 27:case 5:o+=Ae(r.type);break;case 13:o+=Ae("Suspense");break;case 19:o+=Ae("SuspenseList");break;case 31:o+=Ae("Activity");break;case 30:case 0:case 15:case 1:r._debugOwner||o!==""||(o+=pe(r.type));break;case 11:r._debugOwner||o!==""||(o+=pe(r.type.render))}for(;r;)if(typeof r.tag==="number"){var s=r;r=s._debugOwner;var d=s._debugStack;if(r&&d){var p=$e(d);p!==""&&(o+=`
35
+ `+p)}}else if(r.debugStack!=null){var g=r.debugStack;(r=r.owner)&&g&&(o+=`
36
+ `+$e(g))}else break;var x=o}catch(w){x=`
37
+ Error generating stack: `+w.message+`
38
+ `+w.stack}return x}function he(r,o,s,d,p,g,x){var w=Mo;cn(r);try{return r!==null&&r._debugTask?r._debugTask.run(o.bind(null,s,d,p,g,x)):o(s,d,p,g,x)}finally{cn(w)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function cn(r){oe.getCurrentStack=r===null?null:Rt,Ai=!1,Mo=r}function Dn(r){return typeof Symbol==="function"&&Symbol.toStringTag&&r[Symbol.toStringTag]||r.constructor.name||"Object"}function An(r){try{return nn(r),!1}catch(o){return!0}}function nn(r){return""+r}function Ie(r,o){if(An(r))return console.error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",o,Dn(r)),nn(r)}function Zr(r,o){if(An(r))return console.error("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",o,Dn(r)),nn(r)}function it(r){if(An(r))return console.error("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.",Dn(r)),nn(r)}function jd(r){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var o=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(o.isDisabled)return!0;if(!o.supportsFiber)return console.error("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"),!0;try{mf=o.inject(r),Er=o}catch(s){console.error("React instrumentation encountered an error: %o.",s)}return o.checkDCE?!0:!1}function qt(r){if(typeof vG==="function"&&xG(r),Er&&typeof Er.setStrictMode==="function")try{Er.setStrictMode(mf,r)}catch(o){Mi||(Mi=!0,console.error("React instrumentation encountered an error: %o",o))}}function Vb(r){return r>>>=0,r===0?32:31-($G(r)/SG|0)|0}function ui(r){var o=r&42;if(o!==0)return o;switch(r&-r){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 r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return console.error("Should have found matching lanes. This is a bug in React."),r}}function Xc(r,o,s){var d=r.pendingLanes;if(d===0)return 0;var p=0,g=r.suspendedLanes,x=r.pingedLanes;r=r.warmLanes;var w=d&134217727;return w!==0?(d=w&~g,d!==0?p=ui(d):(x&=w,x!==0?p=ui(x):s||(s=w&~r,s!==0&&(p=ui(s))))):(w=d&~g,w!==0?p=ui(w):x!==0?p=ui(x):s||(s=d&~r,s!==0&&(p=ui(s)))),p===0?0:o!==0&&o!==p&&(o&g)===0&&(g=p&-p,s=o&-o,g>=s||g===32&&(s&4194048)!==0)?o:p}function Qc(r,o){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&o)===0}function y2(r,o){switch(r){case 1:case 2:case 4:case 8:case 64:return o+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 o+5000;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return console.error("Should have found matching lanes. This is a bug in React."),-1}}function Kd(){var r=oy;return oy<<=1,(oy&62914560)===0&&(oy=4194304),r}function qd(r){for(var o=[],s=0;31>s;s++)o.push(r);return o}function vl(r,o){r.pendingLanes|=o,o!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function jb(r,o,s,d,p,g){var x=r.pendingLanes;r.pendingLanes=s,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=s,r.entangledLanes&=s,r.errorRecoveryDisabledLanes&=s,r.shellSuspendCounter=0;var{entanglements:w,expirationTimes:T,hiddenUpdates:A}=r;for(s=x&~s;0<s;){var G=31-_r(s),W=1<<G;w[G]=0,T[G]=-1;var B=A[G];if(B!==null)for(A[G]=null,G=0;G<B.length;G++){var te=B[G];te!==null&&(te.lane&=-536870913)}s&=~W}d!==0&&Zc(r,d,0),g!==0&&p===0&&r.tag!==0&&(r.suspendedLanes|=g&~(x&~o))}function Zc(r,o,s){r.pendingLanes|=o,r.suspendedLanes&=~o;var d=31-_r(o);r.entangledLanes|=o,r.entanglements[d]=r.entanglements[d]|1073741824|s&261930}function eu(r,o){var s=r.entangledLanes|=o;for(r=r.entanglements;s;){var d=31-_r(s),p=1<<d;p&o|r[d]&o&&(r[d]|=o),s&=~p}}function tu(r,o){var s=o&-o;return s=(s&42)!==0?1:nu(s),(s&(r.suspendedLanes|o))!==0?0:s}function nu(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=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:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function gh(r,o,s){if(Ni)for(r=r.pendingUpdatersLaneMap;0<s;){var d=31-_r(s),p=1<<d;r[d].add(o),s&=~p}}function xl(r,o){if(Ni)for(var{pendingUpdatersLaneMap:s,memoizedUpdaters:d}=r;0<o;){var p=31-_r(o);r=1<<p,p=s[p],0<p.size&&(p.forEach(function(g){var x=g.alternate;x!==null&&d.has(x)||d.add(g)}),p.clear()),o&=~r}}function M(r){return r&=-r,No!==0&&No<r?Ba!==0&&Ba<r?(r&134217727)!==0?Oi:ay:Ba:No}function ee(){var r=It.p;if(r!==0)return r;return r=window.event,r===void 0?Oi:FN(r.type)}function me(r,o){var s=It.p;try{return It.p=r,o()}finally{It.p=s}}function Ce(r){delete r[cr],delete r[Ir],delete r[Bw],delete r[wG],delete r[CG]}function _e(r){var o=r[cr];if(o)return o;for(var s=r.parentNode;s;){if(o=s[Il]||s[cr]){if(s=o.alternate,o.child!==null||s!==null&&s.child!==null)for(r=RN(r);r!==null;){if(s=r[cr])return s;r=RN(r)}return o}r=s,s=r.parentNode}return null}function et(r){if(r=r[cr]||r[Il]){var o=r.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return r}return null}function tt(r){var o=r.tag;if(o===5||o===26||o===27||o===6)return r.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function Mt(r){var o=r[r8];return o||(o=r[r8]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function je(r){r[nm]=!0}function wr(r,o){xo(r,o),xo(r+"Capture",o)}function xo(r,o){yu[r]&&console.error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",r),yu[r]=o;var s=r.toLowerCase();zw[s]=r,r==="onDoubleClick"&&(zw.ondblclick=r);for(r=0;r<o.length;r++)o8.add(o[r])}function $l(r,o){EG[o.type]||o.onChange||o.onInput||o.readOnly||o.disabled||o.value==null||(r==="select"?console.error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`."):console.error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")),o.onChange||o.readOnly||o.disabled||o.checked==null||console.error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function bh(r){if(Ia.call(i8,r))return!0;if(Ia.call(a8,r))return!1;if(TG.test(r))return i8[r]=!0;return a8[r]=!0,console.error("Invalid attribute name: `%s`",r),!1}function Xk(r,o,s){if(bh(o)){if(!r.hasAttribute(o)){switch(typeof s){case"symbol":case"object":return s;case"function":return s;case"boolean":if(s===!1)return s}return s===void 0?void 0:null}if(r=r.getAttribute(o),r===""&&s===!0)return!0;return Ie(s,o),r===""+s?s:r}}function Kb(r,o,s){if(bh(o))if(s===null)r.removeAttribute(o);else{switch(typeof s){case"undefined":case"function":case"symbol":r.removeAttribute(o);return;case"boolean":var d=o.toLowerCase().slice(0,5);if(d!=="data-"&&d!=="aria-"){r.removeAttribute(o);return}}Ie(s,o),r.setAttribute(o,""+s)}}function qb(r,o,s){if(s===null)r.removeAttribute(o);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(o);return}Ie(s,o),r.setAttribute(o,""+s)}}function cs(r,o,s,d){if(d===null)r.removeAttribute(s);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(s);return}Ie(d,s),r.setAttributeNS(o,s,""+d)}}function Yo(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return it(r),r;default:return""}}function Qk(r){var o=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function SK(r,o,s){var d=Object.getOwnPropertyDescriptor(r.constructor.prototype,o);if(!r.hasOwnProperty(o)&&typeof d<"u"&&typeof d.get==="function"&&typeof d.set==="function"){var{get:p,set:g}=d;return Object.defineProperty(r,o,{configurable:!0,get:function(){return p.call(this)},set:function(x){it(x),s=""+x,g.call(this,x)}}),Object.defineProperty(r,o,{enumerable:d.enumerable}),{getValue:function(){return s},setValue:function(x){it(x),s=""+x},stopTracking:function(){r._valueTracker=null,delete r[o]}}}}function v2(r){if(!r._valueTracker){var o=Qk(r)?"checked":"value";r._valueTracker=SK(r,o,""+r[o])}}function Zk(r){if(!r)return!1;var o=r._valueTracker;if(!o)return!0;var s=o.getValue(),d="";return r&&(d=Qk(r)?r.checked?"true":"false":r.value),r=d,r!==s?(o.setValue(r),!0):!1}function Gb(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch(o){return r.body}}function Jo(r){return r.replace(RG,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function eA(r,o){o.checked===void 0||o.defaultChecked===void 0||l8||(console.error("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",Oe()||"A component",o.type),l8=!0),o.value===void 0||o.defaultValue===void 0||s8||(console.error("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",Oe()||"A component",o.type),s8=!0)}function x2(r,o,s,d,p,g,x,w){if(r.name="",x!=null&&typeof x!=="function"&&typeof x!=="symbol"&&typeof x!=="boolean"?(Ie(x,"type"),r.type=x):r.removeAttribute("type"),o!=null)if(x==="number"){if(o===0&&r.value===""||r.value!=o)r.value=""+Yo(o)}else r.value!==""+Yo(o)&&(r.value=""+Yo(o));else x!=="submit"&&x!=="reset"||r.removeAttribute("value");o!=null?$2(r,x,Yo(o)):s!=null?$2(r,x,Yo(s)):d!=null&&r.removeAttribute("value"),p==null&&g!=null&&(r.defaultChecked=!!g),p!=null&&(r.checked=p&&typeof p!=="function"&&typeof p!=="symbol"),w!=null&&typeof w!=="function"&&typeof w!=="symbol"&&typeof w!=="boolean"?(Ie(w,"name"),r.name=""+Yo(w)):r.removeAttribute("name")}function tA(r,o,s,d,p,g,x,w){if(g!=null&&typeof g!=="function"&&typeof g!=="symbol"&&typeof g!=="boolean"&&(Ie(g,"type"),r.type=g),o!=null||s!=null){if(!(g!=="submit"&&g!=="reset"||o!==void 0&&o!==null)){v2(r);return}s=s!=null?""+Yo(s):"",o=o!=null?""+Yo(o):s,w||o===r.value||(r.value=o),r.defaultValue=o}d=d!=null?d:p,d=typeof d!=="function"&&typeof d!=="symbol"&&!!d,r.checked=w?r.checked:!!d,r.defaultChecked=!!d,x!=null&&typeof x!=="function"&&typeof x!=="symbol"&&typeof x!=="boolean"&&(Ie(x,"name"),r.name=x),v2(r)}function $2(r,o,s){o==="number"&&Gb(r.ownerDocument)===r||r.defaultValue===""+s||(r.defaultValue=""+s)}function nA(r,o){o.value==null&&(typeof o.children==="object"&&o.children!==null?Zf.Children.forEach(o.children,function(s){s==null||typeof s==="string"||typeof s==="number"||typeof s==="bigint"||u8||(u8=!0,console.error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>."))}):o.dangerouslySetInnerHTML==null||d8||(d8=!0,console.error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),o.selected==null||c8||(console.error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),c8=!0)}function rA(){var r=Oe();return r?`
39
+
40
+ Check the render method of \``+r+"`.":""}function Gd(r,o,s,d){if(r=r.options,o){o={};for(var p=0;p<s.length;p++)o["$"+s[p]]=!0;for(s=0;s<r.length;s++)p=o.hasOwnProperty("$"+r[s].value),r[s].selected!==p&&(r[s].selected=p),p&&d&&(r[s].defaultSelected=!0)}else{s=""+Yo(s),o=null;for(p=0;p<r.length;p++){if(r[p].value===s){r[p].selected=!0,d&&(r[p].defaultSelected=!0);return}o!==null||r[p].disabled||(o=r[p])}o!==null&&(o.selected=!0)}}function oA(r,o){for(r=0;r<p8.length;r++){var s=p8[r];if(o[s]!=null){var d=qn(o[s]);o.multiple&&!d?console.error("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",s,rA()):!o.multiple&&d&&console.error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",s,rA())}}o.value===void 0||o.defaultValue===void 0||f8||(console.error("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://react.dev/link/controlled-components"),f8=!0)}function aA(r,o){o.value===void 0||o.defaultValue===void 0||h8||(console.error("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://react.dev/link/controlled-components",Oe()||"A component"),h8=!0),o.children!=null&&o.value==null&&console.error("Use the `defaultValue` or `value` props instead of setting children on <textarea>.")}function iA(r,o,s){if(o!=null&&(o=""+Yo(o),o!==r.value&&(r.value=o),s==null)){r.defaultValue!==o&&(r.defaultValue=o);return}r.defaultValue=s!=null?""+Yo(s):""}function sA(r,o,s,d){if(o==null){if(d!=null){if(s!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(qn(d)){if(1<d.length)throw Error("<textarea> can only have at most one child.");d=d[0]}s=d}s==null&&(s=""),o=s}s=Yo(o),r.defaultValue=s,d=r.textContent,d===s&&d!==""&&d!==null&&(r.value=d),v2(r)}function lA(r,o){return r.serverProps===void 0&&r.serverTail.length===0&&r.children.length===1&&3<r.distanceFromLeaf&&r.distanceFromLeaf>15-o?lA(r.children[0],o):r}function $o(r){return" "+" ".repeat(r)}function Wd(r){return"+ "+" ".repeat(r)}function ru(r){return"- "+" ".repeat(r)}function cA(r){switch(r.tag){case 26:case 27:case 5:return r.type;case 16:return"Lazy";case 31:return"Activity";case 13:return"Suspense";case 19:return"SuspenseList";case 0:case 15:return r=r.type,r.displayName||r.name||null;case 11:return r=r.type.render,r.displayName||r.name||null;case 1:return r=r.type,r.displayName||r.name||null;default:return null}}function yh(r,o){return m8.test(r)?(r=JSON.stringify(r),r.length>o-2?8>o?'{"..."}':"{"+r.slice(0,o-7)+'..."}':"{"+r+"}"):r.length>o?5>o?'{"..."}':r.slice(0,o-3)+"...":r}function Wb(r,o,s){var d=120-2*s;if(o===null)return Wd(s)+yh(r,d)+`
41
+ `;if(typeof o==="string"){for(var p=0;p<o.length&&p<r.length&&o.charCodeAt(p)===r.charCodeAt(p);p++);return p>d-8&&10<p&&(r="..."+r.slice(p-8),o="..."+o.slice(p-8)),Wd(s)+yh(r,d)+`
42
+ `+ru(s)+yh(o,d)+`
43
+ `}return $o(s)+yh(r,d)+`
44
+ `}function S2(r){return Object.prototype.toString.call(r).replace(/^\[object (.*)\]$/,function(o,s){return s})}function vh(r,o){switch(typeof r){case"string":return r=JSON.stringify(r),r.length>o?5>o?'"..."':r.slice(0,o-4)+'..."':r;case"object":if(r===null)return"null";if(qn(r))return"[...]";if(r.$$typeof===Ri)return(o=P(r.type))?"<"+o+">":"<...>";var s=S2(r);if(s==="Object"){s="",o-=2;for(var d in r)if(r.hasOwnProperty(d)){var p=JSON.stringify(d);if(p!=='"'+d+'"'&&(d=p),o-=d.length-2,p=vh(r[d],15>o?o:15),o-=p.length,0>o){s+=s===""?"...":", ...";break}s+=(s===""?"":",")+d+":"+p}return"{"+s+"}"}return s;case"function":return(o=r.displayName||r.name)?"function "+o:"function";default:return String(r)}}function Yd(r,o){return typeof r!=="string"||m8.test(r)?"{"+vh(r,o-2)+"}":r.length>o-2?5>o?'"..."':'"'+r.slice(0,o-5)+'..."':'"'+r+'"'}function w2(r,o,s){var d=120-s.length-r.length,p=[],g;for(g in o)if(o.hasOwnProperty(g)&&g!=="children"){var x=Yd(o[g],120-s.length-g.length-1);d-=g.length+x.length+2,p.push(g+"="+x)}return p.length===0?s+"<"+r+`>
45
+ `:0<d?s+"<"+r+" "+p.join(" ")+`>
46
+ `:s+"<"+r+`
47
+ `+s+" "+p.join(`
48
+ `+s+" ")+`
49
+ `+s+`>
50
+ `}function wK(r,o,s){var d="",p=pt({},o),g;for(g in r)if(r.hasOwnProperty(g)){delete p[g];var x=120-2*s-g.length-2,w=vh(r[g],x);o.hasOwnProperty(g)?(x=vh(o[g],x),d+=Wd(s)+g+": "+w+`
51
+ `,d+=ru(s)+g+": "+x+`
52
+ `):d+=Wd(s)+g+": "+w+`
53
+ `}for(var T in p)p.hasOwnProperty(T)&&(r=vh(p[T],120-2*s-T.length-2),d+=ru(s)+T+": "+r+`
54
+ `);return d}function CK(r,o,s,d){var p="",g=new Map;for(A in s)s.hasOwnProperty(A)&&g.set(A.toLowerCase(),A);if(g.size===1&&g.has("children"))p+=w2(r,o,$o(d));else{for(var x in o)if(o.hasOwnProperty(x)&&x!=="children"){var w=120-2*(d+1)-x.length-1,T=g.get(x.toLowerCase());if(T!==void 0){g.delete(x.toLowerCase());var A=o[x];T=s[T];var G=Yd(A,w);w=Yd(T,w),typeof A==="object"&&A!==null&&typeof T==="object"&&T!==null&&S2(A)==="Object"&&S2(T)==="Object"&&(2<Object.keys(A).length||2<Object.keys(T).length||-1<G.indexOf("...")||-1<w.indexOf("..."))?p+=$o(d+1)+x+`={{
55
+ `+wK(A,T,d+2)+$o(d+1)+`}}
56
+ `:(p+=Wd(d+1)+x+"="+G+`
57
+ `,p+=ru(d+1)+x+"="+w+`
58
+ `)}else p+=$o(d+1)+x+"="+Yd(o[x],w)+`
59
+ `}g.forEach(function(W){if(W!=="children"){var B=120-2*(d+1)-W.length-1;p+=ru(d+1)+W+"="+Yd(s[W],B)+`
60
+ `}}),p=p===""?$o(d)+"<"+r+`>
61
+ `:$o(d)+"<"+r+`
62
+ `+p+$o(d)+`>
63
+ `}if(r=s.children,o=o.children,typeof r==="string"||typeof r==="number"||typeof r==="bigint"){if(g="",typeof o==="string"||typeof o==="number"||typeof o==="bigint")g=""+o;p+=Wb(g,""+r,d+1)}else if(typeof o==="string"||typeof o==="number"||typeof o==="bigint")p=r==null?p+Wb(""+o,null,d+1):p+Wb(""+o,void 0,d+1);return p}function uA(r,o){var s=cA(r);if(s===null){s="";for(r=r.child;r;)s+=uA(r,o),r=r.sibling;return s}return $o(o)+"<"+s+`>
64
+ `}function C2(r,o){var s=lA(r,o);if(s!==r&&(r.children.length!==1||r.children[0]!==s))return $o(o)+`...
65
+ `+C2(s,o+1);s="";var d=r.fiber._debugInfo;if(d)for(var p=0;p<d.length;p++){var g=d[p].name;typeof g==="string"&&(s+=$o(o)+"<"+g+`>
66
+ `,o++)}if(d="",p=r.fiber.pendingProps,r.fiber.tag===6)d=Wb(p,r.serverProps,o),o++;else if(g=cA(r.fiber),g!==null)if(r.serverProps===void 0){d=o;var x=120-2*d-g.length-2,w="";for(A in p)if(p.hasOwnProperty(A)&&A!=="children"){var T=Yd(p[A],15);if(x-=A.length+T.length+2,0>x){w+=" ...";break}w+=" "+A+"="+T}d=$o(d)+"<"+g+w+`>
67
+ `,o++}else r.serverProps===null?(d=w2(g,p,Wd(o)),o++):typeof r.serverProps==="string"?console.error("Should not have matched a non HostText fiber to a Text node. This is a bug in React."):(d=CK(g,p,r.serverProps,o),o++);var A="";p=r.fiber.child;for(g=0;p&&g<r.children.length;)x=r.children[g],x.fiber===p?(A+=C2(x,o),g++):A+=uA(p,o),p=p.sibling;p&&0<r.children.length&&(A+=$o(o)+`...
68
+ `),p=r.serverTail,r.serverProps===null&&o--;for(r=0;r<p.length;r++)g=p[r],A=typeof g==="string"?A+(ru(o)+yh(g,120-2*o)+`
69
+ `):A+w2(g.type,g.props,ru(o));return s+d+A}function E2(r){try{return`
70
+
71
+ `+C2(r,0)}catch(o){return""}}function dA(r,o,s){for(var d=o,p=null,g=0;d;)d===r&&(g=0),p={fiber:d,children:p!==null?[p]:[],serverProps:d===o?s:d===r?null:void 0,serverTail:[],distanceFromLeaf:g},g++,d=d.return;return p!==null?E2(p).replaceAll(/^[+-]/gm,">"):""}function fA(r,o){var s=pt({},r||b8),d={tag:o};if(g8.indexOf(o)!==-1&&(s.aTagInScope=null,s.buttonTagInScope=null,s.nobrTagInScope=null),AG.indexOf(o)!==-1&&(s.pTagInButtonScope=null),kG.indexOf(o)!==-1&&o!=="address"&&o!=="div"&&o!=="p"&&(s.listItemTagAutoclosing=null,s.dlItemTagAutoclosing=null),s.current=d,o==="form"&&(s.formTag=d),o==="a"&&(s.aTagInScope=d),o==="button"&&(s.buttonTagInScope=d),o==="nobr"&&(s.nobrTagInScope=d),o==="p"&&(s.pTagInButtonScope=d),o==="li"&&(s.listItemTagAutoclosing=d),o==="dd"||o==="dt")s.dlItemTagAutoclosing=d;return o==="#document"||o==="html"?s.containerTagInScope=null:s.containerTagInScope||(s.containerTagInScope=d),r!==null||o!=="#document"&&o!=="html"&&o!=="body"?s.implicitRootScope===!0&&(s.implicitRootScope=!1):s.implicitRootScope=!0,s}function pA(r,o,s){switch(o){case"select":return r==="hr"||r==="option"||r==="optgroup"||r==="script"||r==="template"||r==="#text";case"optgroup":return r==="option"||r==="#text";case"option":return r==="#text";case"tr":return r==="th"||r==="td"||r==="style"||r==="script"||r==="template";case"tbody":case"thead":case"tfoot":return r==="tr"||r==="style"||r==="script"||r==="template";case"colgroup":return r==="col"||r==="template";case"table":return r==="caption"||r==="colgroup"||r==="tbody"||r==="tfoot"||r==="thead"||r==="style"||r==="script"||r==="template";case"head":return r==="base"||r==="basefont"||r==="bgsound"||r==="link"||r==="meta"||r==="title"||r==="noscript"||r==="noframes"||r==="style"||r==="script"||r==="template";case"html":if(s)break;return r==="head"||r==="body"||r==="frameset";case"frameset":return r==="frame";case"#document":if(!s)return r==="html"}switch(r){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return o!=="h1"&&o!=="h2"&&o!=="h3"&&o!=="h4"&&o!=="h5"&&o!=="h6";case"rp":case"rt":return MG.indexOf(o)===-1;case"caption":case"col":case"colgroup":case"frameset":case"frame":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return o==null;case"head":return s||o===null;case"html":return s&&o==="#document"||o===null;case"body":return s&&(o==="#document"||o==="html")||o===null}return!0}function EK(r,o){switch(r){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return o.pTagInButtonScope;case"form":return o.formTag||o.pTagInButtonScope;case"li":return o.listItemTagAutoclosing;case"dd":case"dt":return o.dlItemTagAutoclosing;case"button":return o.buttonTagInScope;case"a":return o.aTagInScope;case"nobr":return o.nobrTagInScope}return null}function hA(r,o){for(;r;){switch(r.tag){case 5:case 26:case 27:if(r.type===o)return r}r=r.return}return null}function T2(r,o){o=o||b8;var s=o.current;if(o=(s=pA(r,s&&s.tag,o.implicitRootScope)?null:s)?null:EK(r,o),o=s||o,!o)return!0;var d=o.tag;if(o=String(!!s)+"|"+r+"|"+d,iy[o])return!1;iy[o]=!0;var p=(o=Mo)?hA(o.return,d):null,g=o!==null&&p!==null?dA(p,o,null):"",x="<"+r+">";return s?(s="",d==="table"&&r==="tr"&&(s+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),console.error(`In HTML, %s cannot be a child of <%s>.%s
72
+ This will cause a hydration error.%s`,x,d,s,g)):console.error(`In HTML, %s cannot be a descendant of <%s>.
73
+ This will cause a hydration error.%s`,x,d,g),o&&(r=o.return,p===null||r===null||p===r&&r._debugOwner===o._debugOwner||he(p,function(){console.error(`<%s> cannot contain a nested %s.
74
+ See this log for the ancestor stack trace.`,d,x)})),!1}function Yb(r,o,s){if(s||pA("#text",o,!1))return!0;if(s="#text|"+o,iy[s])return!1;iy[s]=!0;var d=(s=Mo)?hA(s,o):null;return s=s!==null&&d!==null?dA(d,s,s.tag!==6?{children:null}:null):"",/\S/.test(r)?console.error(`In HTML, text nodes cannot be a child of <%s>.
75
+ This will cause a hydration error.%s`,o,s):console.error(`In HTML, whitespace text nodes cannot be a child of <%s>. Make sure you don't have any extra whitespace between tags on each line of your source code.
76
+ This will cause a hydration error.%s`,o,s),!1}function xh(r,o){if(o){var s=r.firstChild;if(s&&s===r.lastChild&&s.nodeType===3){s.nodeValue=o;return}}r.textContent=o}function TK(r){return r.replace(DG,function(o,s){return s.toUpperCase()})}function mA(r,o,s){var d=o.indexOf("--")===0;d||(-1<o.indexOf("-")?gf.hasOwnProperty(o)&&gf[o]||(gf[o]=!0,console.error("Unsupported style property %s. Did you mean %s?",o,TK(o.replace(OG,"ms-")))):NG.test(o)?gf.hasOwnProperty(o)&&gf[o]||(gf[o]=!0,console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?",o,o.charAt(0).toUpperCase()+o.slice(1))):!x8.test(s)||Fw.hasOwnProperty(s)&&Fw[s]||(Fw[s]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,o,s.replace(x8,""))),typeof s==="number"&&(isNaN(s)?$8||($8=!0,console.error("`NaN` is an invalid value for the `%s` css style property.",o)):isFinite(s)||S8||(S8=!0,console.error("`Infinity` is an invalid value for the `%s` css style property.",o)))),s==null||typeof s==="boolean"||s===""?d?r.setProperty(o,""):o==="float"?r.cssFloat="":r[o]="":d?r.setProperty(o,s):typeof s!=="number"||s===0||w8.has(o)?o==="float"?r.cssFloat=s:(Zr(s,o),r[o]=(""+s).trim()):r[o]=s+"px"}function gA(r,o,s){if(o!=null&&typeof o!=="object")throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");if(o&&Object.freeze(o),r=r.style,s!=null){if(o){var d={};if(s){for(var p in s)if(s.hasOwnProperty(p)&&!o.hasOwnProperty(p))for(var g=Hw[p]||[p],x=0;x<g.length;x++)d[g[x]]=p}for(var w in o)if(o.hasOwnProperty(w)&&(!s||s[w]!==o[w]))for(p=Hw[w]||[w],g=0;g<p.length;g++)d[p[g]]=w;w={};for(var T in o)for(p=Hw[T]||[T],g=0;g<p.length;g++)w[p[g]]=T;T={};for(var A in d)if(p=d[A],(g=w[A])&&p!==g&&(x=p+","+g,!T[x])){T[x]=!0,x=console;var G=o[p];x.error.call(x,"%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",G==null||typeof G==="boolean"||G===""?"Removing":"Updating",p,g)}}for(var W in s)!s.hasOwnProperty(W)||o!=null&&o.hasOwnProperty(W)||(W.indexOf("--")===0?r.setProperty(W,""):W==="float"?r.cssFloat="":r[W]="");for(var B in o)A=o[B],o.hasOwnProperty(B)&&s[B]!==A&&mA(r,B,A)}else for(d in o)o.hasOwnProperty(d)&&mA(r,d,o[d])}function $h(r){if(r.indexOf("-")===-1)return!1;switch(r){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}}function bA(r){return PG.get(r)||r}function RK(r,o){if(Ia.call(yf,o)&&yf[o])return!0;if(_G.test(o)){if(r="aria-"+o.slice(4).toLowerCase(),r=C8.hasOwnProperty(r)?r:null,r==null)return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",o),yf[o]=!0;if(o!==r)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",o,r),yf[o]=!0}if(LG.test(o)){if(r=o.toLowerCase(),r=C8.hasOwnProperty(r)?r:null,r==null)return yf[o]=!0,!1;o!==r&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",o,r),yf[o]=!0)}return!0}function kK(r,o){var s=[],d;for(d in o)RK(r,d)||s.push(d);o=s.map(function(p){return"`"+p+"`"}).join(", "),s.length===1?console.error("Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",o,r):1<s.length&&console.error("Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",o,r)}function AK(r,o,s,d){if(Ia.call(Br,o)&&Br[o])return!0;var p=o.toLowerCase();if(p==="onfocusin"||p==="onfocusout")return console.error("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),Br[o]=!0;if(typeof s==="function"&&(r==="form"&&o==="action"||r==="input"&&o==="formAction"||r==="button"&&o==="formAction"))return!0;if(d!=null){if(r=d.possibleRegistrationNames,d.registrationNameDependencies.hasOwnProperty(o))return!0;if(d=r.hasOwnProperty(p)?r[p]:null,d!=null)return console.error("Invalid event handler property `%s`. Did you mean `%s`?",o,d),Br[o]=!0;if(T8.test(o))return console.error("Unknown event handler property `%s`. It will be ignored.",o),Br[o]=!0}else if(T8.test(o))return IG.test(o)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",o),Br[o]=!0;if(BG.test(o)||zG.test(o))return!0;if(p==="innerhtml")return console.error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),Br[o]=!0;if(p==="aria")return console.error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),Br[o]=!0;if(p==="is"&&s!==null&&s!==void 0&&typeof s!=="string")return console.error("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof s),Br[o]=!0;if(typeof s==="number"&&isNaN(s))return console.error("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",o),Br[o]=!0;if(ly.hasOwnProperty(p)){if(p=ly[p],p!==o)return console.error("Invalid DOM property `%s`. Did you mean `%s`?",o,p),Br[o]=!0}else if(o!==p)return console.error("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",o,p),Br[o]=!0;switch(o){case"dangerouslySetInnerHTML":case"children":case"style":case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":return!0;case"innerText":case"textContent":return!0}switch(typeof s){case"boolean":switch(o){case"autoFocus":case"checked":case"multiple":case"muted":case"selected":case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":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":case"capture":case"download":case"inert":return!0;default:if(p=o.toLowerCase().slice(0,5),p==="data-"||p==="aria-")return!0;return s?console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',s,o,o,s,o):console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',s,o,o,s,o,o,o),Br[o]=!0}case"function":case"symbol":return Br[o]=!0,!1;case"string":if(s==="false"||s==="true"){switch(o){case"checked":case"selected":case"multiple":case"muted":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":case"inert":break;default:return!0}console.error("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",s,o,s==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',o,s),Br[o]=!0}}return!0}function MK(r,o,s){var d=[],p;for(p in o)AK(r,p,o[p],s)||d.push(p);o=d.map(function(g){return"`"+g+"`"}).join(", "),d.length===1?console.error("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior ",o,r):1<d.length&&console.error("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior ",o,r)}function Sh(r){return HG.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function us(){}function R2(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}function yA(r){var o=et(r);if(o&&(r=o.stateNode)){var s=r[Ir]||null;e:switch(r=o.stateNode,o.type){case"input":if(x2(r,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),o=s.name,s.type==="radio"&&o!=null){for(s=r;s.parentNode;)s=s.parentNode;Ie(o,"name"),s=s.querySelectorAll('input[name="'+Jo(""+o)+'"][type="radio"]');for(o=0;o<s.length;o++){var d=s[o];if(d!==r&&d.form===r.form){var p=d[Ir]||null;if(!p)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");x2(d,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(o=0;o<s.length;o++)d=s[o],d.form===r.form&&Zk(d)}break e;case"textarea":iA(r,s.value,s.defaultValue);break e;case"select":o=s.value,o!=null&&Gd(r,!!s.multiple,o,!1)}}}function vA(r,o,s){if(Uw)return r(o,s);Uw=!0;try{var d=r(o);return d}finally{if(Uw=!1,vf!==null||xf!==null){if(af(),vf&&(o=vf,r=xf,xf=vf=null,yA(o),r))for(o=0;o<r.length;o++)yA(r[o])}}}function wh(r,o){var s=r.stateNode;if(s===null)return null;var d=s[Ir]||null;if(d===null)return null;s=d[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(r=r.type,d=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!d;break e;default:r=!1}if(r)return null;if(s&&typeof s!=="function")throw Error("Expected `"+o+"` listener to be a function, instead got a value of `"+typeof s+"` type.");return s}function xA(){if(cy)return cy;var r,o=jw,s=o.length,d,p="value"in Bl?Bl.value:Bl.textContent,g=p.length;for(r=0;r<s&&o[r]===p[r];r++);var x=s-r;for(d=1;d<=x&&o[s-d]===p[g-d];d++);return cy=p.slice(r,1<d?1-d:void 0)}function Jb(r){var o=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&o===13&&(r=13)):r=o,r===10&&(r=13),32<=r||r===13?r:0}function Xb(){return!0}function $A(){return!1}function eo(r){function o(s,d,p,g,x){this._reactName=s,this._targetInst=p,this.type=d,this.nativeEvent=g,this.target=x,this.currentTarget=null;for(var w in r)r.hasOwnProperty(w)&&(s=r[w],this[w]=s?s(g):g[w]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?Xb:$A,this.isPropagationStopped=$A,this}return pt(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!=="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Xb)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!=="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Xb)},persist:function(){},isPersistent:Xb}),o}function NK(r){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(r):(r=ZG[r])?!!o[r]:!1}function k2(){return NK}function SA(r,o){switch(r){case"keyup":return dW.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==M8;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wA(r){return r=r.detail,typeof r==="object"&&"data"in r?r.data:null}function OK(r,o){switch(r){case"compositionend":return wA(o);case"keypress":if(o.which!==O8)return null;return P8=!0,D8;case"textInput":return r=o.data,r===D8&&P8?null:r;default:return null}}function DK(r,o){if($f)return r==="compositionend"||!Ww&&SA(r,o)?(r=xA(),cy=jw=Bl=null,$f=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return N8&&o.locale!=="ko"?null:o.data;default:return null}}function CA(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o==="input"?!!pW[r.type]:o==="textarea"?!0:!1}function PK(r){if(!Di)return!1;r="on"+r;var o=r in document;return o||(o=document.createElement("div"),o.setAttribute(r,"return;"),o=typeof o[r]==="function"),o}function EA(r,o,s,d){vf?xf?xf.push(d):xf=[d]:vf=d,o=V0(o,"onChange"),0<o.length&&(s=new uy("onChange","change",null,s,d),r.push({event:s,listeners:o}))}function LK(r){sN(r,0)}function Qb(r){var o=tt(r);if(Zk(o))return r}function TA(r,o){if(r==="change")return o}function RA(){lm&&(lm.detachEvent("onpropertychange",kA),cm=lm=null)}function kA(r){if(r.propertyName==="value"&&Qb(cm)){var o=[];EA(o,cm,r,R2(r)),vA(LK,o)}}function _K(r,o,s){r==="focusin"?(RA(),lm=o,cm=s,lm.attachEvent("onpropertychange",kA)):r==="focusout"&&RA()}function IK(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Qb(cm)}function BK(r,o){if(r==="click")return Qb(o)}function zK(r,o){if(r==="input"||r==="change")return Qb(o)}function HK(r,o){return r===o&&(r!==0||1/r===1/o)||r!==r&&o!==o}function Ch(r,o){if(zr(r,o))return!0;if(typeof r!=="object"||r===null||typeof o!=="object"||o===null)return!1;var s=Object.keys(r),d=Object.keys(o);if(s.length!==d.length)return!1;for(d=0;d<s.length;d++){var p=s[d];if(!Ia.call(o,p)||!zr(r[p],o[p]))return!1}return!0}function AA(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function MA(r,o){var s=AA(r);r=0;for(var d;s;){if(s.nodeType===3){if(d=r+s.textContent.length,r<=o&&d>=o)return{node:s,offset:o-r};r=d}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=AA(s)}}function NA(r,o){return r&&o?r===o?!0:r&&r.nodeType===3?!1:o&&o.nodeType===3?NA(r,o.parentNode):("contains"in r)?r.contains(o):r.compareDocumentPosition?!!(r.compareDocumentPosition(o)&16):!1:!1}function OA(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var o=Gb(r.document);o instanceof r.HTMLIFrameElement;){try{var s=typeof o.contentWindow.location.href==="string"}catch(d){s=!1}if(s)r=o.contentWindow;else break;o=Gb(r.document)}return o}function A2(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o&&(o==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||o==="textarea"||r.contentEditable==="true")}function DA(r,o,s){var d=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Jw||Sf==null||Sf!==Gb(d)||(d=Sf,("selectionStart"in d)&&A2(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),um&&Ch(um,d)||(um=d,d=V0(Yw,"onSelect"),0<d.length&&(o=new uy("onSelect","select",null,o,s),r.push({event:o,listeners:d}),o.target=Sf)))}function ou(r,o){var s={};return s[r.toLowerCase()]=o.toLowerCase(),s["Webkit"+r]="webkit"+o,s["Moz"+r]="moz"+o,s}function au(r){if(Xw[r])return Xw[r];if(!wf[r])return r;var o=wf[r],s;for(s in o)if(o.hasOwnProperty(s)&&s in _8)return Xw[r]=o[s];return r}function Pa(r,o){F8.set(r,o),wr(o,[r])}function FK(r){for(var o=fy,s=0;s<r.length;s++){var d=r[s];if(typeof d==="object"&&d!==null)if(qn(d)&&d.length===2&&typeof d[0]==="string"){if(o!==fy&&o!==nC)return eC;o=nC}else return eC;else{if(typeof d==="function"||typeof d==="string"&&50<d.length||o!==fy&&o!==tC)return eC;o=tC}}return o}function M2(r,o,s,d){for(var p in r)Ia.call(r,p)&&p[0]!=="_"&&di(p,r[p],o,s,d)}function di(r,o,s,d,p){switch(typeof o){case"object":if(o===null){o="null";break}else{if(o.$$typeof===Ri){var g=P(o.type)||"…",x=o.key;o=o.props;var w=Object.keys(o),T=w.length;if(x==null&&T===0){o="<"+g+" />";break}if(3>d||T===1&&w[0]==="children"&&x==null){o="<"+g+" … />";break}s.push([p+"  ".repeat(d)+r,"<"+g]),x!==null&&di("key",x,s,d+1,p),r=!1;for(var A in o)A==="children"?o.children!=null&&(!qn(o.children)||0<o.children.length)&&(r=!0):Ia.call(o,A)&&A[0]!=="_"&&di(A,o[A],s,d+1,p);s.push(["",r?">…</"+g+">":"/>"]);return}if(g=Object.prototype.toString.call(o),g=g.slice(8,g.length-1),g==="Array"){if(A=FK(o),A===tC||A===fy){o=JSON.stringify(o);break}else if(A===nC){s.push([p+"  ".repeat(d)+r,""]);for(r=0;r<o.length;r++)g=o[r],di(g[0],g[1],s,d+1,p);return}}if(g==="Promise"){if(o.status==="fulfilled"){if(g=s.length,di(r,o.value,s,d,p),s.length>g){s=s[g],s[1]="Promise<"+(s[1]||"Object")+">";return}}else if(o.status==="rejected"&&(g=s.length,di(r,o.reason,s,d,p),s.length>g)){s=s[g],s[1]="Rejected Promise<"+s[1]+">";return}s.push(["  ".repeat(d)+r,"Promise"]);return}g==="Object"&&(A=Object.getPrototypeOf(o))&&typeof A.constructor==="function"&&(g=A.constructor.name),s.push([p+"  ".repeat(d)+r,g==="Object"?3>d?"":"…":g]),3>d&&M2(o,s,d+1,p);return}case"function":o=o.name===""?"() => {}":o.name+"() {}";break;case"string":o=o===xW?"…":JSON.stringify(o);break;case"undefined":o="undefined";break;case"boolean":o=o?"true":"false";break;default:o=String(o)}s.push([p+"  ".repeat(d)+r,o])}function PA(r,o,s,d){var p=!0;for(x in r)x in o||(s.push([py+"  ".repeat(d)+x,"…"]),p=!1);for(var g in o)if(g in r){var x=r[g],w=o[g];if(x!==w){if(d===0&&g==="children")p="  ".repeat(d)+g,s.push([py+p,"…"],[hy+p,"…"]);else{if(!(3<=d)){if(typeof x==="object"&&typeof w==="object"&&x!==null&&w!==null&&x.$$typeof===w.$$typeof)if(w.$$typeof===Ri){if(x.type===w.type&&x.key===w.key){x=P(w.type)||"…",p="  ".repeat(d)+g,x="<"+x+" … />",s.push([py+p,x],[hy+p,x]),p=!1;continue}}else{var T=Object.prototype.toString.call(x),A=Object.prototype.toString.call(w);if(T===A&&(A==="[object Object]"||A==="[object Array]")){T=[j8+"  ".repeat(d)+g,A==="[object Array]"?"Array":""],s.push(T),A=s.length,PA(x,w,s,d+1)?A===s.length&&(T[1]="Referentially unequal but deeply equal objects. Consider memoization."):p=!1;continue}}else if(typeof x==="function"&&typeof w==="function"&&x.name===w.name&&x.length===w.length&&(T=Function.prototype.toString.call(x),A=Function.prototype.toString.call(w),T===A)){x=w.name===""?"() => {}":w.name+"() {}",s.push([j8+"  ".repeat(d)+g,x+" Referentially unequal function closure. Consider memoization."]);continue}}di(g,x,s,d,py),di(g,w,s,d,hy)}p=!1}}else s.push([hy+"  ".repeat(d)+g,"…"]),p=!1;return p}function So(r){gt=r&63?"Blocking":r&64?"Gesture":r&4194176?"Transition":r&62914560?"Suspense":r&2080374784?"Idle":"Other"}function fi(r,o,s,d){Jt&&(Hl.start=o,Hl.end=s,vs.color="warning",vs.tooltipText=d,vs.properties=null,(r=r._debugTask)?r.run(performance.measure.bind(performance,d,Hl)):performance.measure(d,Hl))}function Zb(r,o,s){fi(r,o,s,"Reconnect")}function e0(r,o,s,d,p){var g=J(r);if(g!==null&&Jt){var{alternate:x,actualDuration:w}=r;if(x===null||x.child!==r.child)for(var T=r.child;T!==null;T=T.sibling)w-=T.actualDuration;d=0.5>w?d?"tertiary-light":"primary-light":10>w?d?"tertiary":"primary":100>w?d?"tertiary-dark":"primary-dark":"error";var A=r.memoizedProps;w=r._debugTask,A!==null&&x!==null&&x.memoizedProps!==A?(T=[$W],A=PA(x.memoizedProps,A,T,0),1<T.length&&(A&&!zl&&(x.lanes&p)===0&&100<r.actualDuration?(zl=!0,T[0]=SW,vs.color="warning",vs.tooltipText=K8):(vs.color=d,vs.tooltipText=g),vs.properties=T,Hl.start=o,Hl.end=s,w!=null?w.run(performance.measure.bind(performance,"​"+g,Hl)):performance.measure("​"+g,Hl))):w!=null?w.run(console.timeStamp.bind(console,g,o,s,Qo,void 0,d)):console.timeStamp(g,o,s,Qo,void 0,d)}}function N2(r,o,s,d){if(Jt){var p=J(r);if(p!==null){for(var g=null,x=[],w=0;w<d.length;w++){var T=d[w];g==null&&T.source!==null&&(g=T.source._debugTask),T=T.value,x.push(["Error",typeof T==="object"&&T!==null&&typeof T.message==="string"?String(T.message):String(T)])}r.key!==null&&di("key",r.key,x,0,""),r.memoizedProps!==null&&M2(r.memoizedProps,x,0,""),g==null&&(g=r._debugTask),r={start:o,end:s,detail:{devtools:{color:"error",track:Qo,tooltipText:r.tag===13?"Hydration failed":"Error boundary caught an error",properties:x}}},g?g.run(performance.measure.bind(performance,"​"+p,r)):performance.measure("​"+p,r)}}}function pi(r,o,s,d,p){if(p!==null){if(Jt){var g=J(r);if(g!==null){d=[];for(var x=0;x<p.length;x++){var w=p[x].value;d.push(["Error",typeof w==="object"&&w!==null&&typeof w.message==="string"?String(w.message):String(w)])}r.key!==null&&di("key",r.key,d,0,""),r.memoizedProps!==null&&M2(r.memoizedProps,d,0,""),o={start:o,end:s,detail:{devtools:{color:"error",track:Qo,tooltipText:"A lifecycle or effect errored",properties:d}}},(r=r._debugTask)?r.run(performance.measure.bind(performance,"​"+g,o)):performance.measure("​"+g,o)}}}else g=J(r),g!==null&&Jt&&(p=1>d?"secondary-light":100>d?"secondary":500>d?"secondary-dark":"error",(r=r._debugTask)?r.run(console.timeStamp.bind(console,g,o,s,Qo,void 0,p)):console.timeStamp(g,o,s,Qo,void 0,p))}function UK(r,o,s,d){if(Jt&&!(o<=r)){var p=(s&738197653)===s?"tertiary-dark":"primary-dark";s=(s&536870912)===s?"Prepared":(s&201326741)===s?"Hydrated":"Render",d?d.run(console.timeStamp.bind(console,s,r,o,gt,ht,p)):console.timeStamp(s,r,o,gt,ht,p)}}function LA(r,o,s,d){!Jt||o<=r||(s=(s&738197653)===s?"tertiary-dark":"primary-dark",d?d.run(console.timeStamp.bind(console,"Prewarm",r,o,gt,ht,s)):console.timeStamp("Prewarm",r,o,gt,ht,s))}function _A(r,o,s,d){!Jt||o<=r||(s=(s&738197653)===s?"tertiary-dark":"primary-dark",d?d.run(console.timeStamp.bind(console,"Suspended",r,o,gt,ht,s)):console.timeStamp("Suspended",r,o,gt,ht,s))}function VK(r,o,s,d,p,g){if(Jt&&!(o<=r)){s=[];for(var x=0;x<d.length;x++){var w=d[x].value;s.push(["Recoverable Error",typeof w==="object"&&w!==null&&typeof w.message==="string"?String(w.message):String(w)])}r={start:r,end:o,detail:{devtools:{color:"primary-dark",track:gt,trackGroup:ht,tooltipText:p?"Hydration Failed":"Recovered after Error",properties:s}}},g?g.run(performance.measure.bind(performance,"Recovered",r)):performance.measure("Recovered",r)}}function O2(r,o,s,d){!Jt||o<=r||(d?d.run(console.timeStamp.bind(console,"Errored",r,o,gt,ht,"error")):console.timeStamp("Errored",r,o,gt,ht,"error"))}function jK(r,o,s,d){!Jt||o<=r||(d?d.run(console.timeStamp.bind(console,s,r,o,gt,ht,"secondary-light")):console.timeStamp(s,r,o,gt,ht,"secondary-light"))}function IA(r,o,s,d,p){if(Jt&&!(o<=r)){for(var g=[],x=0;x<s.length;x++){var w=s[x].value;g.push(["Error",typeof w==="object"&&w!==null&&typeof w.message==="string"?String(w.message):String(w)])}r={start:r,end:o,detail:{devtools:{color:"error",track:gt,trackGroup:ht,tooltipText:d?"Remaining Effects Errored":"Commit Errored",properties:g}}},p?p.run(performance.measure.bind(performance,"Errored",r)):performance.measure("Errored",r)}}function Eh(r,o,s){!Jt||o<=r||(s?s.run(console.timeStamp.bind(console,"Animating",r,o,gt,ht,"secondary-dark")):console.timeStamp("Animating",r,o,gt,ht,"secondary-dark"))}function t0(){for(var r=Cf,o=rC=Cf=0;o<r;){var s=Zo[o];Zo[o++]=null;var d=Zo[o];Zo[o++]=null;var p=Zo[o];Zo[o++]=null;var g=Zo[o];if(Zo[o++]=null,d!==null&&p!==null){var x=d.pending;x===null?p.next=p:(p.next=x.next,x.next=p),d.pending=p}g!==0&&BA(s,p,g)}}function n0(r,o,s,d){Zo[Cf++]=r,Zo[Cf++]=o,Zo[Cf++]=s,Zo[Cf++]=d,rC|=d,r.lanes|=d,r=r.alternate,r!==null&&(r.lanes|=d)}function D2(r,o,s,d){return n0(r,o,s,d),r0(r)}function Cr(r,o){return n0(r,null,null,o),r0(r)}function BA(r,o,s){r.lanes|=s;var d=r.alternate;d!==null&&(d.lanes|=s);for(var p=!1,g=r.return;g!==null;)g.childLanes|=s,d=g.alternate,d!==null&&(d.childLanes|=s),g.tag===22&&(r=g.stateNode,r===null||r._visibility&dm||(p=!0)),r=g,g=g.return;return r.tag===3?(g=r.stateNode,p&&o!==null&&(p=31-_r(s),r=g.hiddenUpdates,d=r[p],d===null?r[p]=[o]:d.push(o),o.lane=s|536870912),g):null}function r0(r){if(Bm>IW)throw Pu=Bm=0,zm=_C=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");Pu>BW&&(Pu=0,zm=null,console.error("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.")),r.alternate===null&&(r.flags&4098)!==0&&eN(r);for(var o=r,s=o.return;s!==null;)o.alternate===null&&(o.flags&4098)!==0&&eN(r),o=s,s=o.return;return o.tag===3?o.stateNode:null}function iu(r){if(ea===null)return r;var o=ea(r);return o===void 0?r:o.current}function P2(r){if(ea===null)return r;var o=ea(r);return o===void 0?r!==null&&r!==void 0&&typeof r.render==="function"&&(o=iu(r.render),r.render!==o)?(o={$$typeof:Zh,render:o},r.displayName!==void 0&&(o.displayName=r.displayName),o):r:o.current}function zA(r,o){if(ea===null)return!1;var s=r.elementType;o=o.type;var d=!1,p=typeof o==="object"&&o!==null?o.$$typeof:null;switch(r.tag){case 1:typeof o==="function"&&(d=!0);break;case 0:typeof o==="function"?d=!0:p===Ao&&(d=!0);break;case 11:p===Zh?d=!0:p===Ao&&(d=!0);break;case 14:case 15:p===ey?d=!0:p===Ao&&(d=!0);break;default:return!1}return d&&(r=ea(s),r!==void 0&&r===ea(o))?!0:!1}function HA(r){ea!==null&&typeof WeakSet==="function"&&(Ef===null&&(Ef=new WeakSet),Ef.add(r))}function FA(r,o,s){do{var d=r,p=d.alternate,g=d.child,x=d.sibling,w=d.tag;d=d.type;var T=null;switch(w){case 0:case 15:case 1:T=d;break;case 11:T=d.render}if(ea===null)throw Error("Expected resolveFamily to be set during hot reload.");var A=!1;if(d=!1,T!==null&&(T=ea(T),T!==void 0&&(s.has(T)?d=!0:o.has(T)&&(w===1?d=!0:A=!0))),Ef!==null&&(Ef.has(r)||p!==null&&Ef.has(p))&&(d=!0),d&&(r._debugNeedsRemount=!0),d||A)p=Cr(r,2),p!==null&&pn(p,r,2);if(g===null||d||FA(g,o,s),x===null)break;r=x}while(1)}function KK(r,o,s,d){this.tag=r,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null,this.actualDuration=-0,this.actualStartTime=-1.1,this.treeBaseDuration=this.selfBaseDuration=-0,this._debugTask=this._debugStack=this._debugOwner=this._debugInfo=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,q8||typeof Object.preventExtensions!=="function"||Object.preventExtensions(this)}function L2(r){return r=r.prototype,!(!r||!r.isReactComponent)}function ds(r,o){var s=r.alternate;switch(s===null?(s=y(r.tag,o,r.key,r.mode),s.elementType=r.elementType,s.type=r.type,s.stateNode=r.stateNode,s._debugOwner=r._debugOwner,s._debugStack=r._debugStack,s._debugTask=r._debugTask,s._debugHookTypes=r._debugHookTypes,s.alternate=r,r.alternate=s):(s.pendingProps=o,s.type=r.type,s.flags=0,s.subtreeFlags=0,s.deletions=null,s.actualDuration=-0,s.actualStartTime=-1.1),s.flags=r.flags&65011712,s.childLanes=r.childLanes,s.lanes=r.lanes,s.child=r.child,s.memoizedProps=r.memoizedProps,s.memoizedState=r.memoizedState,s.updateQueue=r.updateQueue,o=r.dependencies,s.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext,_debugThenableState:o._debugThenableState},s.sibling=r.sibling,s.index=r.index,s.ref=r.ref,s.refCleanup=r.refCleanup,s.selfBaseDuration=r.selfBaseDuration,s.treeBaseDuration=r.treeBaseDuration,s._debugInfo=r._debugInfo,s._debugNeedsRemount=r._debugNeedsRemount,s.tag){case 0:case 15:s.type=iu(r.type);break;case 1:s.type=iu(r.type);break;case 11:s.type=P2(r.type)}return s}function UA(r,o){r.flags&=65011714;var s=r.alternate;return s===null?(r.childLanes=0,r.lanes=o,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null,r.selfBaseDuration=0,r.treeBaseDuration=0):(r.childLanes=s.childLanes,r.lanes=s.lanes,r.child=s.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=s.memoizedProps,r.memoizedState=s.memoizedState,r.updateQueue=s.updateQueue,r.type=s.type,o=s.dependencies,r.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext,_debugThenableState:o._debugThenableState},r.selfBaseDuration=s.selfBaseDuration,r.treeBaseDuration=s.treeBaseDuration),r}function _2(r,o,s,d,p,g){var x=0,w=r;if(typeof r==="function")L2(r)&&(x=1),w=iu(w);else if(typeof r==="string")x=Z(),x=eG(r,s,x)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case kw:return o=y(31,s,o,p),o.elementType=kw,o.lanes=g,o;case pf:return su(s.children,p,g,o);case Z0:x=8,p|=Tr,p|=za;break;case Cw:return r=s,d=p,typeof r.id!=="string"&&console.error('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof r.id),o=y(12,r,o,d|st),o.elementType=Cw,o.lanes=g,o.stateNode={effectDuration:0,passiveEffectDuration:0},o;case Tw:return o=y(13,s,o,p),o.elementType=Tw,o.lanes=g,o;case Rw:return o=y(19,s,o,p),o.elementType=Rw,o.lanes=g,o;default:if(typeof r==="object"&&r!==null)switch(r.$$typeof){case ki:x=10;break e;case Ew:x=9;break e;case Zh:x=11,w=P2(w);break e;case ey:x=14;break e;case Ao:x=16,w=null;break e}if(w="",r===void 0||typeof r==="object"&&r!==null&&Object.keys(r).length===0)w+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";r===null?s="null":qn(r)?s="array":r!==void 0&&r.$$typeof===Ri?(s="<"+(P(r.type)||"Unknown")+" />",w=" Did you accidentally export a JSX literal instead of a component?"):s=typeof r,(x=d?re(d):null)&&(w+=`
77
+
78
+ Check the render method of \``+x+"`."),x=29,s=Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(s+"."+w)),w=null}return o=y(x,s,o,p),o.elementType=r,o.type=w,o.lanes=g,o._debugOwner=d,o}function o0(r,o,s){return o=_2(r.type,r.key,r.props,r._owner,o,s),o._debugOwner=r._owner,o._debugStack=r._debugStack,o._debugTask=r._debugTask,o}function su(r,o,s,d){return r=y(7,r,d,o),r.lanes=s,r}function I2(r,o,s){return r=y(6,r,null,o),r.lanes=s,r}function VA(r){var o=y(18,null,null,We);return o.stateNode=r,o}function B2(r,o,s){return o=y(4,r.children!==null?r.children:[],r.key,o),o.lanes=s,o.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},o}function wo(r,o){if(typeof r==="object"&&r!==null){var s=oC.get(r);if(s!==void 0)return s;return o={value:r,source:o,stack:Ze(o)},oC.set(r,o),o}return{value:r,source:o,stack:Ze(o)}}function fs(r,o){Sl(),Tf[Rf++]=fm,Tf[Rf++]=my,my=r,fm=o}function jA(r,o,s){Sl(),ta[na++]=$s,ta[na++]=Ss,ta[na++]=xu,xu=r;var d=$s;r=Ss;var p=32-_r(d)-1;d&=~(1<<p),s+=1;var g=32-_r(o)+p;if(30<g){var x=p-p%5;g=(d&(1<<x)-1).toString(32),d>>=x,p-=x,$s=1<<32-_r(o)+p|s<<p|d,Ss=g+r}else $s=1<<g|s<<p|d,Ss=r}function z2(r){Sl(),r.return!==null&&(fs(r,1),jA(r,1,0))}function H2(r){for(;r===my;)my=Tf[--Rf],Tf[Rf]=null,fm=Tf[--Rf],Tf[Rf]=null;for(;r===xu;)xu=ta[--na],ta[na]=null,Ss=ta[--na],ta[na]=null,$s=ta[--na],ta[na]=null}function KA(){return Sl(),xu!==null?{id:$s,overflow:Ss}:null}function qA(r,o){Sl(),ta[na++]=$s,ta[na++]=Ss,ta[na++]=xu,$s=o.id,Ss=o.overflow,xu=r}function Sl(){xt||console.error("Expected to be hydrating. This is a bug in React. Please file an issue.")}function lu(r,o){if(r.return===null){if(Oo===null)Oo={fiber:r,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:o};else{if(Oo.fiber!==r)throw Error("Saw multiple hydration diff roots in a pass. This is a bug in React.");Oo.distanceFromLeaf>o&&(Oo.distanceFromLeaf=o)}return Oo}var s=lu(r.return,o+1).children;if(0<s.length&&s[s.length-1].fiber===r)return s=s[s.length-1],s.distanceFromLeaf>o&&(s.distanceFromLeaf=o),s;return o={fiber:r,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:o},s.push(o),o}function GA(){xt&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug.")}function a0(r,o){Pi||(r=lu(r,0),r.serverProps=null,o!==null&&(o=EN(o),r.serverTail.push(o)))}function wl(r){var o=1<arguments.length&&arguments[1]!==void 0?arguments[1]:!1,s="",d=Oo;throw d!==null&&(Oo=null,s=E2(d)),Th(wo(Error("Hydration failed because the server rendered "+(o?"text":"HTML")+` didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:
79
+
80
+ - A server/client branch \`if (typeof window !== 'undefined')\`.
81
+ - Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
82
+ - Date formatting in a user's locale which doesn't match the server.
83
+ - External changing data without sending a snapshot of it along with the HTML.
84
+ - Invalid HTML tag nesting.
85
+
86
+ It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
87
+
88
+ https://react.dev/link/hydration-mismatch`+s),r)),aC}function WA(r){var{stateNode:o,type:s,memoizedProps:d}=r;switch(o[cr]=r,o[Ir]=d,iw(s,d),s){case"dialog":wt("cancel",o),wt("close",o);break;case"iframe":case"object":case"embed":wt("load",o);break;case"video":case"audio":for(s=0;s<Hm.length;s++)wt(Hm[s],o);break;case"source":wt("error",o);break;case"img":case"image":case"link":wt("error",o),wt("load",o);break;case"details":wt("toggle",o);break;case"input":$l("input",d),wt("invalid",o),eA(o,d),tA(o,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case"option":nA(o,d);break;case"select":$l("select",d),wt("invalid",o),oA(o,d);break;case"textarea":$l("textarea",d),wt("invalid",o),aA(o,d),sA(o,d.value,d.defaultValue,d.children)}s=d.children,typeof s!=="string"&&typeof s!=="number"&&typeof s!=="bigint"||o.textContent===""+s||d.suppressHydrationWarning===!0||dN(o.textContent,s)?(d.popover!=null&&(wt("beforetoggle",o),wt("toggle",o)),d.onScroll!=null&&wt("scroll",o),d.onScrollEnd!=null&&wt("scrollend",o),d.onClick!=null&&(o.onclick=us),o=!0):o=!1,o||wl(r,!0)}function YA(r){for(ur=r.return;ur;)switch(ur.tag){case 5:case 31:case 13:ra=!1;return;case 27:case 3:ra=!0;return;default:ur=ur.return}}function Jd(r){if(r!==ur)return!1;if(!xt)return YA(r),xt=!0,!1;var o=r.tag,s;if(s=o!==3&&o!==27){if(s=o===5)s=r.type,s=!(s!=="form"&&s!=="button")||dw(r.type,r.memoizedProps);s=!s}if(s&&Xt){for(s=Xt;s;){var d=lu(r,0),p=EN(s);d.serverTail.push(p),s=p.type==="Suspense"?mw(s):ko(s.nextSibling)}wl(r)}if(YA(r),o===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");Xt=mw(r)}else if(o===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");Xt=mw(r)}else o===27?(o=Xt,Dl(r.type)?(r=WC,WC=null,Xt=r):Xt=o):Xt=ur?ko(r.stateNode.nextSibling):null;return!0}function cu(){Xt=ur=null,Pi=xt=!1}function F2(){var r=Ul;return r!==null&&(Vr===null?Vr=r:Vr.push.apply(Vr,r),Ul=null),r}function Th(r){Ul===null?Ul=[r]:Ul.push(r)}function U2(){var r=Oo;if(r!==null){Oo=null;for(var o=E2(r);0<r.children.length;)r=r.children[0];he(r.fiber,function(){console.error(`A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:
89
+
90
+ - A server/client branch \`if (typeof window !== 'undefined')\`.
91
+ - Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
92
+ - Date formatting in a user's locale which doesn't match the server.
93
+ - External changing data without sending a snapshot of it along with the HTML.
94
+ - Invalid HTML tag nesting.
95
+
96
+ It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
97
+
98
+ %s%s`,"https://react.dev/link/hydration-mismatch",o)})}}function i0(){kf=gy=null,Af=!1}function Cl(r,o,s){se(iC,o._currentValue,r),o._currentValue=s,se(sC,o._currentRenderer,r),o._currentRenderer!==void 0&&o._currentRenderer!==null&&o._currentRenderer!==W8&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),o._currentRenderer=W8}function ps(r,o){r._currentValue=iC.current;var s=sC.current;le(sC,o),r._currentRenderer=s,le(iC,o)}function V2(r,o,s){for(;r!==null;){var d=r.alternate;if((r.childLanes&o)!==o?(r.childLanes|=o,d!==null&&(d.childLanes|=o)):d!==null&&(d.childLanes&o)!==o&&(d.childLanes|=o),r===s)break;r=r.return}r!==s&&console.error("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function j2(r,o,s,d){var p=r.child;p!==null&&(p.return=r);for(;p!==null;){var g=p.dependencies;if(g!==null){var x=p.child;g=g.firstContext;e:for(;g!==null;){var w=g;g=p;for(var T=0;T<o.length;T++)if(w.context===o[T]){g.lanes|=s,w=g.alternate,w!==null&&(w.lanes|=s),V2(g.return,s,r),d||(x=null);break e}g=w.next}}else if(p.tag===18){if(x=p.return,x===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");x.lanes|=s,g=x.alternate,g!==null&&(g.lanes|=s),V2(x,s,r),x=null}else x=p.child;if(x!==null)x.return=p;else for(x=p;x!==null;){if(x===r){x=null;break}if(p=x.sibling,p!==null){p.return=x.return,x=p;break}x=x.return}p=x}}function Xd(r,o,s,d){r=null;for(var p=o,g=!1;p!==null;){if(!g){if((p.flags&524288)!==0)g=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var x=p.alternate;if(x===null)throw Error("Should have a current fiber. This is a bug in React.");if(x=x.memoizedProps,x!==null){var w=p.type;zr(p.pendingProps.value,x.value)||(r!==null?r.push(w):r=[w])}}else if(p===ty.current){if(x=p.alternate,x===null)throw Error("Should have a current fiber. This is a bug in React.");x.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(r!==null?r.push(Km):r=[Km])}p=p.return}r!==null&&j2(o,r,s,d),o.flags|=262144}function s0(r){for(r=r.firstContext;r!==null;){if(!zr(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function uu(r){gy=r,kf=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function rn(r){return Af&&console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),JA(gy,r)}function l0(r,o){return gy===null&&uu(r),JA(r,o)}function JA(r,o){var s=o._currentValue;if(o={context:o,memoizedValue:s,next:null},kf===null){if(r===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");kf=o,r.dependencies={lanes:0,firstContext:o,_debugThenableState:null},r.flags|=524288}else kf=kf.next=o;return s}function K2(){return{controller:new EW,data:new Map,refCount:0}}function du(r){r.controller.signal.aborted&&console.warn("A cache instance was retained after it was already freed. This likely indicates a bug in React."),r.refCount++}function Rh(r){r.refCount--,0>r.refCount&&console.warn("A cache instance was released after it was already freed. This likely indicates a bug in React."),r.refCount===0&&TW(RW,function(){r.controller.abort()})}function hi(r,o,s){if((r&127)!==0)0>Li&&(Li=Ln(),hm=by(o),lC=o,s!=null&&(cC=J(s)),(kt&(Wn|Lo))!==tr&&(hn=!0,Kl=pm),r=Wh(),o=Gh(),r!==Mf||o!==mm?Mf=-1.1:o!==null&&(Kl=pm),Su=r,mm=o);else if((r&4194048)!==0&&0>oa&&(oa=Ln(),gm=by(o),Y8=o,s!=null&&(J8=J(s)),0>Es)){if(r=Wh(),o=Gh(),r!==Gl||o!==wu)Gl=-1.1;ql=r,wu=o}}function qK(r){if(0>Li){Li=Ln(),hm=r._debugTask!=null?r._debugTask:null,(kt&(Wn|Lo))!==tr&&(Kl=pm);var o=Wh(),s=Gh();o!==Mf||s!==mm?Mf=-1.1:s!==null&&(Kl=pm),Su=o,mm=s}if(0>oa&&(oa=Ln(),gm=r._debugTask!=null?r._debugTask:null,0>Es)){if(r=Wh(),o=Gh(),r!==Gl||o!==wu)Gl=-1.1;ql=r,wu=o}}function hs(){var r=$u;return $u=0,r}function c0(r){var o=$u;return $u=r,o}function kh(r){var o=$u;return $u+=r,o}function u0(){Ge=Ke=-1.1}function Co(){var r=Ke;return Ke=-1.1,r}function Eo(r){0<=r&&(Ke=r)}function mi(){var r=un;return un=-0,r}function gi(r){0<=r&&(un=r)}function bi(){var r=on;return on=null,r}function yi(){var r=hn;return hn=!1,r}function q2(r){Hr=Ln(),0>r.actualStartTime&&(r.actualStartTime=Hr)}function G2(r){if(0<=Hr){var o=Ln()-Hr;r.actualDuration+=o,r.selfBaseDuration=o,Hr=-1}}function XA(r){if(0<=Hr){var o=Ln()-Hr;r.actualDuration+=o,Hr=-1}}function vi(){if(0<=Hr){var r=Ln(),o=r-Hr;Hr=-1,$u+=o,un+=o,Ge=r}}function QA(r){on===null&&(on=[]),on.push(r),Cs===null&&(Cs=[]),Cs.push(r)}function xi(){Hr=Ln(),0>Ke&&(Ke=Hr)}function Ah(r){for(var o=r.child;o;)r.actualDuration+=o.actualDuration,o=o.sibling}function GK(r,o){if(ym===null){var s=ym=[];dC=0,Cu=nw(),Nf={status:"pending",value:void 0,then:function(d){s.push(d)}}}return dC++,o.then(ZA,ZA),o}function ZA(){if(--dC===0&&(-1<oa||(Es=-1.1),ym!==null)){Nf!==null&&(Nf.status="fulfilled");var r=ym;ym=null,Cu=0,Nf=null;for(var o=0;o<r.length;o++)(0,r[o])()}}function WK(r,o){var s=[],d={status:"pending",value:null,reason:null,then:function(p){s.push(p)}};return r.then(function(){d.status="fulfilled",d.value=o;for(var p=0;p<s.length;p++)(0,s[p])(o)},function(p){d.status="rejected",d.reason=p;for(p=0;p<s.length;p++)(0,s[p])(void 0)}),d}function W2(){var r=Eu.current;return r!==null?r:jt.pooledCache}function d0(r,o){o===null?se(Eu,Eu.current,r):se(Eu,o.pool,r)}function e5(){var r=W2();return r===null?null:{parent:Pn._currentValue,pool:r}}function t5(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function n5(r){return r=r.status,r==="fulfilled"||r==="rejected"}function r5(r,o,s){oe.actQueue!==null&&(oe.didUsePromise=!0);var d=r.thenables;if(s=d[s],s===void 0?d.push(o):s!==o&&(r.didWarnAboutUncachedPromise||(r.didWarnAboutUncachedPromise=!0,console.error("A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework.")),o.then(us,us),o=s),o._debugInfo===void 0){r=performance.now(),d=o.displayName;var p={name:typeof d==="string"?d:"Promise",start:r,end:r,value:o};o._debugInfo=[{awaited:p}],o.status!=="fulfilled"&&o.status!=="rejected"&&(r=function(){p.end=performance.now()},o.then(r,r))}switch(o.status){case"fulfilled":return o.value;case"rejected":throw r=o.reason,a5(r),r;default:if(typeof o.status==="string")o.then(us,us);else{if(r=jt,r!==null&&100<r.shellSuspendCounter)throw Error("An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.");r=o,r.status="pending",r.then(function(g){if(o.status==="pending"){var x=o;x.status="fulfilled",x.value=g}},function(g){if(o.status==="pending"){var x=o;x.status="rejected",x.reason=g}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw r=o.reason,a5(r),r}throw Ru=o,Em=!0,Of}}function El(r){try{return NW(r)}catch(o){if(o!==null&&typeof o==="object"&&typeof o.then==="function")throw Ru=o,Em=!0,Of;throw o}}function o5(){if(Ru===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var r=Ru;return Ru=null,Em=!1,r}function a5(r){if(r===Of||r===Ey)throw Error("Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.")}function ir(r){var o=lt;return r!=null&&(lt=o===null?r:o.concat(r)),o}function Y2(){var r=lt;if(r!=null){for(var o=r.length-1;0<=o;o--)if(r[o].name!=null){var s=r[o].debugTask;if(s!=null)return s}}return null}function f0(r,o,s){for(var d=Object.keys(r.props),p=0;p<d.length;p++){var g=d[p];if(g!=="children"&&g!=="key"){o===null&&(o=o0(r,s.mode,0),o._debugInfo=lt,o.return=s),he(o,function(x){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",x)},g);break}}}function p0(r){var o=Tm;return Tm+=1,Df===null&&(Df=t5()),r5(Df,r,o)}function Mh(r,o){o=o.props.ref,r.ref=o!==void 0?o:null}function i5(r,o){if(o.$$typeof===uG)throw Error(`A React Element from an older version of React was rendered. This is not supported. It can happen if:
99
+ - Multiple copies of the "react" package is used.
100
+ - A library pre-bundled an old copy of "react" or "react/jsx-runtime".
101
+ - A compiler tries to "inline" JSX instead of using the runtime.`);throw r=Object.prototype.toString.call(o),Error("Objects are not valid as a React child (found: "+(r==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.")}function h0(r,o){var s=Y2();s!==null?s.run(i5.bind(null,r,o)):i5(r,o)}function s5(r,o){var s=J(r)||"Component";gO[s]||(gO[s]=!0,o=o.displayName||o.name||"Component",r.tag===3?console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
102
+ root.render(%s)`,o,o,o):console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
103
+ <%s>{%s}</%s>`,o,o,s,o,s))}function m0(r,o){var s=Y2();s!==null?s.run(s5.bind(null,r,o)):s5(r,o)}function l5(r,o){var s=J(r)||"Component";bO[s]||(bO[s]=!0,o=String(o),r.tag===3?console.error(`Symbols are not valid as a React child.
104
+ root.render(%s)`,o):console.error(`Symbols are not valid as a React child.
105
+ <%s>%s</%s>`,s,o,s))}function g0(r,o){var s=Y2();s!==null?s.run(l5.bind(null,r,o)):l5(r,o)}function c5(r){function o(_,H){if(r){var j=_.deletions;j===null?(_.deletions=[H],_.flags|=16):j.push(H)}}function s(_,H){if(!r)return null;for(;H!==null;)o(_,H),H=H.sibling;return null}function d(_){for(var H=new Map;_!==null;)_.key!==null?H.set(_.key,_):H.set(_.index,_),_=_.sibling;return H}function p(_,H){return _=ds(_,H),_.index=0,_.sibling=null,_}function g(_,H,j){if(_.index=j,!r)return _.flags|=1048576,H;if(j=_.alternate,j!==null)return j=j.index,j<H?(_.flags|=67108866,H):j;return _.flags|=67108866,H}function x(_){return r&&_.alternate===null&&(_.flags|=67108866),_}function w(_,H,j,ie){if(H===null||H.tag!==6)return H=I2(j,_.mode,ie),H.return=_,H._debugOwner=_,H._debugTask=_._debugTask,H._debugInfo=lt,H;return H=p(H,j),H.return=_,H._debugInfo=lt,H}function T(_,H,j,ie){var Ee=j.type;if(Ee===pf)return H=G(_,H,j.props.children,ie,j.key),f0(j,H,_),H;if(H!==null&&(H.elementType===Ee||zA(H,j)||typeof Ee==="object"&&Ee!==null&&Ee.$$typeof===Ao&&El(Ee)===H.type))return H=p(H,j.props),Mh(H,j),H.return=_,H._debugOwner=j._owner,H._debugInfo=lt,H;return H=o0(j,_.mode,ie),Mh(H,j),H.return=_,H._debugInfo=lt,H}function A(_,H,j,ie){if(H===null||H.tag!==4||H.stateNode.containerInfo!==j.containerInfo||H.stateNode.implementation!==j.implementation)return H=B2(j,_.mode,ie),H.return=_,H._debugInfo=lt,H;return H=p(H,j.children||[]),H.return=_,H._debugInfo=lt,H}function G(_,H,j,ie,Ee){if(H===null||H.tag!==7)return H=su(j,_.mode,ie,Ee),H.return=_,H._debugOwner=_,H._debugTask=_._debugTask,H._debugInfo=lt,H;return H=p(H,j),H.return=_,H._debugInfo=lt,H}function W(_,H,j){if(typeof H==="string"&&H!==""||typeof H==="number"||typeof H==="bigint")return H=I2(""+H,_.mode,j),H.return=_,H._debugOwner=_,H._debugTask=_._debugTask,H._debugInfo=lt,H;if(typeof H==="object"&&H!==null){switch(H.$$typeof){case Ri:return j=o0(H,_.mode,j),Mh(j,H),j.return=_,_=ir(H._debugInfo),j._debugInfo=lt,lt=_,j;case ff:return H=B2(H,_.mode,j),H.return=_,H._debugInfo=lt,H;case Ao:var ie=ir(H._debugInfo);return H=El(H),_=W(_,H,j),lt=ie,_}if(qn(H)||V(H))return j=su(H,_.mode,j,null),j.return=_,j._debugOwner=_,j._debugTask=_._debugTask,_=ir(H._debugInfo),j._debugInfo=lt,lt=_,j;if(typeof H.then==="function")return ie=ir(H._debugInfo),_=W(_,p0(H),j),lt=ie,_;if(H.$$typeof===ki)return W(_,l0(_,H),j);h0(_,H)}return typeof H==="function"&&m0(_,H),typeof H==="symbol"&&g0(_,H),null}function B(_,H,j,ie){var Ee=H!==null?H.key:null;if(typeof j==="string"&&j!==""||typeof j==="number"||typeof j==="bigint")return Ee!==null?null:w(_,H,""+j,ie);if(typeof j==="object"&&j!==null){switch(j.$$typeof){case Ri:return j.key===Ee?(Ee=ir(j._debugInfo),_=T(_,H,j,ie),lt=Ee,_):null;case ff:return j.key===Ee?A(_,H,j,ie):null;case Ao:return Ee=ir(j._debugInfo),j=El(j),_=B(_,H,j,ie),lt=Ee,_}if(qn(j)||V(j)){if(Ee!==null)return null;return Ee=ir(j._debugInfo),_=G(_,H,j,ie,null),lt=Ee,_}if(typeof j.then==="function")return Ee=ir(j._debugInfo),_=B(_,H,p0(j),ie),lt=Ee,_;if(j.$$typeof===ki)return B(_,H,l0(_,j),ie);h0(_,j)}return typeof j==="function"&&m0(_,j),typeof j==="symbol"&&g0(_,j),null}function te(_,H,j,ie,Ee){if(typeof ie==="string"&&ie!==""||typeof ie==="number"||typeof ie==="bigint")return _=_.get(j)||null,w(H,_,""+ie,Ee);if(typeof ie==="object"&&ie!==null){switch(ie.$$typeof){case Ri:return j=_.get(ie.key===null?j:ie.key)||null,_=ir(ie._debugInfo),H=T(H,j,ie,Ee),lt=_,H;case ff:return _=_.get(ie.key===null?j:ie.key)||null,A(H,_,ie,Ee);case Ao:var Xe=ir(ie._debugInfo);return ie=El(ie),H=te(_,H,j,ie,Ee),lt=Xe,H}if(qn(ie)||V(ie))return j=_.get(j)||null,_=ir(ie._debugInfo),H=G(H,j,ie,Ee,null),lt=_,H;if(typeof ie.then==="function")return Xe=ir(ie._debugInfo),H=te(_,H,j,p0(ie),Ee),lt=Xe,H;if(ie.$$typeof===ki)return te(_,H,j,l0(H,ie),Ee);h0(H,ie)}return typeof ie==="function"&&m0(H,ie),typeof ie==="symbol"&&g0(H,ie),null}function xe(_,H,j,ie){if(typeof j!=="object"||j===null)return ie;switch(j.$$typeof){case Ri:case ff:m(_,H,j);var Ee=j.key;if(typeof Ee!=="string")break;if(ie===null){ie=new Set,ie.add(Ee);break}if(!ie.has(Ee)){ie.add(Ee);break}he(H,function(){console.error("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",Ee)});break;case Ao:j=El(j),xe(_,H,j,ie)}return ie}function ke(_,H,j,ie){for(var Ee=null,Xe=null,Ve=null,Be=H,ot=H=0,Qt=null;Be!==null&&ot<j.length;ot++){Be.index>ot?(Qt=Be,Be=null):Qt=Be.sibling;var Nn=B(_,Be,j[ot],ie);if(Nn===null){Be===null&&(Be=Qt);break}Ee=xe(_,Nn,j[ot],Ee),r&&Be&&Nn.alternate===null&&o(_,Be),H=g(Nn,H,ot),Ve===null?Xe=Nn:Ve.sibling=Nn,Ve=Nn,Be=Qt}if(ot===j.length)return s(_,Be),xt&&fs(_,ot),Xe;if(Be===null){for(;ot<j.length;ot++)Be=W(_,j[ot],ie),Be!==null&&(Ee=xe(_,Be,j[ot],Ee),H=g(Be,H,ot),Ve===null?Xe=Be:Ve.sibling=Be,Ve=Be);return xt&&fs(_,ot),Xe}for(Be=d(Be);ot<j.length;ot++)Qt=te(Be,_,ot,j[ot],ie),Qt!==null&&(Ee=xe(_,Qt,j[ot],Ee),r&&Qt.alternate!==null&&Be.delete(Qt.key===null?ot:Qt.key),H=g(Qt,H,ot),Ve===null?Xe=Qt:Ve.sibling=Qt,Ve=Qt);return r&&Be.forEach(function(Ps){return o(_,Ps)}),xt&&fs(_,ot),Xe}function Wt(_,H,j,ie){if(j==null)throw Error("An iterable object provided no iterator.");for(var Ee=null,Xe=null,Ve=H,Be=H=0,ot=null,Qt=null,Nn=j.next();Ve!==null&&!Nn.done;Be++,Nn=j.next()){Ve.index>Be?(ot=Ve,Ve=null):ot=Ve.sibling;var Ps=B(_,Ve,Nn.value,ie);if(Ps===null){Ve===null&&(Ve=ot);break}Qt=xe(_,Ps,Nn.value,Qt),r&&Ve&&Ps.alternate===null&&o(_,Ve),H=g(Ps,H,Be),Xe===null?Ee=Ps:Xe.sibling=Ps,Xe=Ps,Ve=ot}if(Nn.done)return s(_,Ve),xt&&fs(_,Be),Ee;if(Ve===null){for(;!Nn.done;Be++,Nn=j.next())Ve=W(_,Nn.value,ie),Ve!==null&&(Qt=xe(_,Ve,Nn.value,Qt),H=g(Ve,H,Be),Xe===null?Ee=Ve:Xe.sibling=Ve,Xe=Ve);return xt&&fs(_,Be),Ee}for(Ve=d(Ve);!Nn.done;Be++,Nn=j.next())ot=te(Ve,_,Be,Nn.value,ie),ot!==null&&(Qt=xe(_,ot,Nn.value,Qt),r&&ot.alternate!==null&&Ve.delete(ot.key===null?Be:ot.key),H=g(ot,H,Be),Xe===null?Ee=ot:Xe.sibling=ot,Xe=ot);return r&&Ve.forEach(function(tY){return o(_,tY)}),xt&&fs(_,Be),Ee}function Ct(_,H,j,ie){if(typeof j==="object"&&j!==null&&j.type===pf&&j.key===null&&(f0(j,null,_),j=j.props.children),typeof j==="object"&&j!==null){switch(j.$$typeof){case Ri:var Ee=ir(j._debugInfo);e:{for(var Xe=j.key;H!==null;){if(H.key===Xe){if(Xe=j.type,Xe===pf){if(H.tag===7){s(_,H.sibling),ie=p(H,j.props.children),ie.return=_,ie._debugOwner=j._owner,ie._debugInfo=lt,f0(j,ie,_),_=ie;break e}}else if(H.elementType===Xe||zA(H,j)||typeof Xe==="object"&&Xe!==null&&Xe.$$typeof===Ao&&El(Xe)===H.type){s(_,H.sibling),ie=p(H,j.props),Mh(ie,j),ie.return=_,ie._debugOwner=j._owner,ie._debugInfo=lt,_=ie;break e}s(_,H);break}else o(_,H);H=H.sibling}j.type===pf?(ie=su(j.props.children,_.mode,ie,j.key),ie.return=_,ie._debugOwner=_,ie._debugTask=_._debugTask,ie._debugInfo=lt,f0(j,ie,_),_=ie):(ie=o0(j,_.mode,ie),Mh(ie,j),ie.return=_,ie._debugInfo=lt,_=ie)}return _=x(_),lt=Ee,_;case ff:e:{Ee=j;for(j=Ee.key;H!==null;){if(H.key===j)if(H.tag===4&&H.stateNode.containerInfo===Ee.containerInfo&&H.stateNode.implementation===Ee.implementation){s(_,H.sibling),ie=p(H,Ee.children||[]),ie.return=_,_=ie;break e}else{s(_,H);break}else o(_,H);H=H.sibling}ie=B2(Ee,_.mode,ie),ie.return=_,_=ie}return x(_);case Ao:return Ee=ir(j._debugInfo),j=El(j),_=Ct(_,H,j,ie),lt=Ee,_}if(qn(j))return Ee=ir(j._debugInfo),_=ke(_,H,j,ie),lt=Ee,_;if(V(j)){if(Ee=ir(j._debugInfo),Xe=V(j),typeof Xe!=="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var Ve=Xe.call(j);if(Ve===j){if(_.tag!==0||Object.prototype.toString.call(_.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(Ve)!=="[object Generator]")hO||console.error("Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."),hO=!0}else j.entries!==Xe||mC||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),mC=!0);return _=Wt(_,H,Ve,ie),lt=Ee,_}if(typeof j.then==="function")return Ee=ir(j._debugInfo),_=Ct(_,H,p0(j),ie),lt=Ee,_;if(j.$$typeof===ki)return Ct(_,H,l0(_,j),ie);h0(_,j)}if(typeof j==="string"&&j!==""||typeof j==="number"||typeof j==="bigint")return Ee=""+j,H!==null&&H.tag===6?(s(_,H.sibling),ie=p(H,Ee),ie.return=_,_=ie):(s(_,H),ie=I2(Ee,_.mode,ie),ie.return=_,ie._debugOwner=_,ie._debugTask=_._debugTask,ie._debugInfo=lt,_=ie),x(_);return typeof j==="function"&&m0(_,j),typeof j==="symbol"&&g0(_,j),s(_,H)}return function(_,H,j,ie){var Ee=lt;lt=null;try{Tm=0;var Xe=Ct(_,H,j,ie);return Df=null,Xe}catch(Qt){if(Qt===Of||Qt===Ey)throw Qt;var Ve=y(29,Qt,null,_.mode);Ve.lanes=ie,Ve.return=_;var Be=Ve._debugInfo=lt;if(Ve._debugOwner=_._debugOwner,Ve._debugTask=_._debugTask,Be!=null){for(var ot=Be.length-1;0<=ot;ot--)if(typeof Be[ot].stack==="string"){Ve._debugOwner=Be[ot],Ve._debugTask=Be[ot].debugTask;break}}return Ve}finally{lt=Ee}}}function u5(r,o){var s=qn(r);return r=!s&&typeof V(r)==="function",s||r?(s=s?"array":"iterable",console.error("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",s,o,s),!1):!0}function J2(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function X2(r,o){r=r.updateQueue,o.updateQueue===r&&(o.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function Tl(r){return{lane:r,tag:vO,payload:null,callback:null,next:null}}function Rl(r,o,s){var d=r.updateQueue;if(d===null)return null;if(d=d.shared,bC===d&&!SO){var p=J(r);console.error(`An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.
106
+
107
+ Please update the following component: %s`,p),SO=!0}if((kt&Wn)!==tr)return p=d.pending,p===null?o.next=o:(o.next=p.next,p.next=o),d.pending=o,o=r0(r),BA(r,null,s),o;return n0(r,d,o,s),r0(r)}function Nh(r,o,s){if(o=o.updateQueue,o!==null&&(o=o.shared,(s&4194048)!==0)){var d=o.lanes;d&=r.pendingLanes,s|=d,o.lanes=s,eu(r,s)}}function b0(r,o){var{updateQueue:s,alternate:d}=r;if(d!==null&&(d=d.updateQueue,s===d)){var p=null,g=null;if(s=s.firstBaseUpdate,s!==null){do{var x={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};g===null?p=g=x:g=g.next=x,s=s.next}while(s!==null);g===null?p=g=o:g=g.next=o}else p=g=o;s={baseState:d.baseState,firstBaseUpdate:p,lastBaseUpdate:g,shared:d.shared,callbacks:d.callbacks},r.updateQueue=s;return}r=s.lastBaseUpdate,r===null?s.firstBaseUpdate=o:r.next=o,s.lastBaseUpdate=o}function Oh(){if(yC){var r=Nf;if(r!==null)throw r}}function Dh(r,o,s,d){yC=!1;var p=r.updateQueue;Wl=!1,bC=p.shared;var{firstBaseUpdate:g,lastBaseUpdate:x}=p,w=p.shared.pending;if(w!==null){p.shared.pending=null;var T=w,A=T.next;T.next=null,x===null?g=A:x.next=A,x=T;var G=r.alternate;G!==null&&(G=G.updateQueue,w=G.lastBaseUpdate,w!==x&&(w===null?G.firstBaseUpdate=A:w.next=A,G.lastBaseUpdate=T))}if(g!==null){var W=p.baseState;x=0,G=A=T=null,w=g;do{var B=w.lane&-536870913,te=B!==w.lane;if(te?(ct&B)===B:(d&B)===B){B!==0&&B===Cu&&(yC=!0),G!==null&&(G=G.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{B=r;var xe=w,ke=o,Wt=s;switch(xe.tag){case xO:if(xe=xe.payload,typeof xe==="function"){Af=!0;var Ct=xe.call(Wt,W,ke);if(B.mode&Tr){qt(!0);try{xe.call(Wt,W,ke)}finally{qt(!1)}}Af=!1,W=Ct;break e}W=xe;break e;case gC:B.flags=B.flags&-65537|128;case vO:if(Ct=xe.payload,typeof Ct==="function"){if(Af=!0,xe=Ct.call(Wt,W,ke),B.mode&Tr){qt(!0);try{Ct.call(Wt,W,ke)}finally{qt(!1)}}Af=!1}else xe=Ct;if(xe===null||xe===void 0)break e;W=pt({},W,xe);break e;case $O:Wl=!0}}B=w.callback,B!==null&&(r.flags|=64,te&&(r.flags|=8192),te=p.callbacks,te===null?p.callbacks=[B]:te.push(B))}else te={lane:B,tag:w.tag,payload:w.payload,callback:w.callback,next:null},G===null?(A=G=te,T=W):G=G.next=te,x|=B;if(w=w.next,w===null)if(w=p.shared.pending,w===null)break;else te=w,w=te.next,te.next=null,p.lastBaseUpdate=te,p.shared.pending=null}while(1);G===null&&(T=W),p.baseState=T,p.firstBaseUpdate=A,p.lastBaseUpdate=G,g===null&&(p.shared.lanes=0),Xl|=x,r.lanes=x,r.memoizedState=W}bC=null}function d5(r,o){if(typeof r!=="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+r);r.call(o)}function YK(r,o){var s=r.shared.hiddenCallbacks;if(s!==null)for(r.shared.hiddenCallbacks=null,r=0;r<s.length;r++)d5(s[r],o)}function f5(r,o){var s=r.callbacks;if(s!==null)for(r.callbacks=null,r=0;r<s.length;r++)d5(s[r],o)}function p5(r,o){var s=Bi;se(Ry,s,r),se(Pf,o,r),Bi=s|o.baseLanes}function Q2(r){se(Ry,Bi,r),se(Pf,Pf.current,r)}function Z2(r){Bi=Ry.current,le(Pf,r),le(Ry,r)}function kl(r){var o=r.alternate;se(Mn,Mn.current&Lf,r),se(Do,r,r),aa===null&&(o===null||Pf.current!==null?aa=r:o.memoizedState!==null&&(aa=r))}function eS(r){se(Mn,Mn.current,r),se(Do,r,r),aa===null&&(aa=r)}function h5(r){r.tag===22?(se(Mn,Mn.current,r),se(Do,r,r),aa===null&&(aa=r)):Al(r)}function Al(r){se(Mn,Mn.current,r),se(Do,Do.current,r)}function To(r){le(Do,r),aa===r&&(aa=null),le(Mn,r)}function y0(r){for(var o=r;o!==null;){if(o.tag===13){var s=o.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||pw(s)||hw(s)))return o}else if(o.tag===19&&(o.memoizedProps.revealOrder==="forwards"||o.memoizedProps.revealOrder==="backwards"||o.memoizedProps.revealOrder==="unstable_legacy-backwards"||o.memoizedProps.revealOrder==="together")){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}function ft(){var r=ne;sa===null?sa=[r]:sa.push(r)}function fe(){var r=ne;if(sa!==null&&(As++,sa[As]!==r)){var o=J(Je);if(!wO.has(o)&&(wO.add(o),sa!==null)){for(var s="",d=0;d<=As;d++){var p=sa[d],g=d===As?r:p;for(p=d+1+". "+p;30>p.length;)p+=" ";p+=g+`
108
+ `,s+=p}console.error(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks
109
+
110
+ Previous render Next render
111
+ ------------------------------------------------------
112
+ %s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
113
+ `,o,s)}}}function Qd(r){r===void 0||r===null||qn(r)||console.error("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",ne,typeof r)}function v0(){var r=J(Je);EO.has(r)||(EO.add(r),console.error("ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",r))}function vn(){throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
114
+ 1. You might have mismatching versions of React and the renderer (such as React DOM)
115
+ 2. You might be breaking the Rules of Hooks
116
+ 3. You might have more than one copy of React in the same app
117
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function tS(r,o){if(Am)return!1;if(o===null)return console.error("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",ne),!1;r.length!==o.length&&console.error(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
118
+
119
+ Previous: %s
120
+ Incoming: %s`,ne,"["+o.join(", ")+"]","["+r.join(", ")+"]");for(var s=0;s<o.length&&s<r.length;s++)if(!zr(r[s],o[s]))return!1;return!0}function nS(r,o,s,d,p,g){if(Rs=g,Je=o,sa=r!==null?r._debugHookTypes:null,As=-1,Am=r!==null&&r.type!==o.type,Object.prototype.toString.call(s)==="[object AsyncFunction]"||Object.prototype.toString.call(s)==="[object AsyncGeneratorFunction]")g=J(Je),vC.has(g)||(vC.add(g),console.error("%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",g===null?"An unknown Component":"<"+g+">"));o.memoizedState=null,o.updateQueue=null,o.lanes=0,oe.H=r!==null&&r.memoizedState!==null?$C:sa!==null?TO:xC,Au=g=(o.mode&Tr)!==We;var x=fC(s,d,p);if(Au=!1,If&&(x=rS(o,s,d,p)),g){qt(!0);try{x=rS(o,s,d,p)}finally{qt(!1)}}return m5(r,o),x}function m5(r,o){o._debugHookTypes=sa,o.dependencies===null?ks!==null&&(o.dependencies={lanes:0,firstContext:null,_debugThenableState:ks}):o.dependencies._debugThenableState=ks,oe.H=Mm;var s=Vt!==null&&Vt.next!==null;if(Rs=0,sa=ne=_n=Vt=Je=null,As=-1,r!==null&&(r.flags&65011712)!==(o.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),Ay=!1,km=0,ks=null,s)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");r===null||In||(r=r.dependencies,r!==null&&s0(r)&&(In=!0)),Em?(Em=!1,r=!0):r=!1,r&&(o=J(o)||"Unknown",CO.has(o)||vC.has(o)||(CO.add(o),console.error("`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary.")))}function rS(r,o,s,d){Je=r;var p=0;do{if(If&&(ks=null),km=0,If=!1,p>=DW)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(p+=1,Am=!1,_n=Vt=null,r.updateQueue!=null){var g=r.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}As=-1,oe.H=RO,g=fC(o,s,d)}while(If);return g}function JK(){var r=oe.H,o=r.useState()[0];return o=typeof o.then==="function"?Ph(o):o,r=r.useState()[0],(Vt!==null?Vt.memoizedState:null)!==r&&(Je.flags|=1024),o}function oS(){var r=My!==0;return My=0,r}function aS(r,o,s){o.updateQueue=r.updateQueue,o.flags=(o.mode&za)!==We?o.flags&-402655237:o.flags&-2053,r.lanes&=~s}function iS(r){if(Ay){for(r=r.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Ay=!1}Rs=0,sa=_n=Vt=Je=null,As=-1,ne=null,If=!1,km=My=0,ks=null}function Lr(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _n===null?Je.memoizedState=_n=r:_n=_n.next=r,_n}function zt(){if(Vt===null){var r=Je.alternate;r=r!==null?r.memoizedState:null}else r=Vt.next;var o=_n===null?Je.memoizedState:_n.next;if(o!==null)_n=o,Vt=r;else{if(r===null){if(Je.alternate===null)throw Error("Update hook called on initial render. This is likely a bug in React. Please file an issue.");throw Error("Rendered more hooks than during the previous render.")}Vt=r,r={memoizedState:Vt.memoizedState,baseState:Vt.baseState,baseQueue:Vt.baseQueue,queue:Vt.queue,next:null},_n===null?Je.memoizedState=_n=r:_n=_n.next=r}return _n}function x0(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ph(r){var o=km;return km+=1,ks===null&&(ks=t5()),r=r5(ks,r,o),o=Je,(_n===null?o.memoizedState:_n.next)===null&&(o=o.alternate,oe.H=o!==null&&o.memoizedState!==null?$C:xC),r}function Ml(r){if(r!==null&&typeof r==="object"){if(typeof r.then==="function")return Ph(r);if(r.$$typeof===ki)return rn(r)}throw Error("An unsupported type was passed to use(): "+String(r))}function fu(r){var o=null,s=Je.updateQueue;if(s!==null&&(o=s.memoCache),o==null){var d=Je.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(o={data:d.data.map(function(p){return p.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),s===null&&(s=x0(),Je.updateQueue=s),s.memoCache=o,s=o.data[o.index],s===void 0||Am)for(s=o.data[o.index]=Array(r),d=0;d<r;d++)s[d]=dG;else s.length!==r&&console.error("Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",s.length,r);return o.index++,s}function La(r,o){return typeof o==="function"?o(r):o}function sS(r,o,s){var d=Lr();if(s!==void 0){var p=s(o);if(Au){qt(!0);try{s(o)}finally{qt(!1)}}}else p=o;return d.memoizedState=d.baseState=p,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:p},d.queue=r,r=r.dispatch=tq.bind(null,Je,r),[d.memoizedState,r]}function Zd(r){var o=zt();return lS(o,Vt,r)}function lS(r,o,s){var d=r.queue;if(d===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");d.lastRenderedReducer=s;var p=r.baseQueue,g=d.pending;if(g!==null){if(p!==null){var x=p.next;p.next=g.next,g.next=x}o.baseQueue!==p&&console.error("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),o.baseQueue=p=g,d.pending=null}if(g=r.baseState,p===null)r.memoizedState=g;else{o=p.next;var w=x=null,T=null,A=o,G=!1;do{var W=A.lane&-536870913;if(W!==A.lane?(ct&W)===W:(Rs&W)===W){var B=A.revertLane;if(B===0)T!==null&&(T=T.next={lane:0,revertLane:0,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null}),W===Cu&&(G=!0);else if((Rs&B)===B){A=A.next,B===Cu&&(G=!0);continue}else W={lane:0,revertLane:A.revertLane,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},T===null?(w=T=W,x=g):T=T.next=W,Je.lanes|=B,Xl|=B;W=A.action,Au&&s(g,W),g=A.hasEagerState?A.eagerState:s(g,W)}else B={lane:W,revertLane:A.revertLane,gesture:A.gesture,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},T===null?(w=T=B,x=g):T=T.next=B,Je.lanes|=W,Xl|=W;A=A.next}while(A!==null&&A!==o);if(T===null?x=g:T.next=w,!zr(g,r.memoizedState)&&(In=!0,G&&(s=Nf,s!==null)))throw s;r.memoizedState=g,r.baseState=x,r.baseQueue=T,d.lastRenderedState=g}return p===null&&(d.lanes=0),[r.memoizedState,d.dispatch]}function Lh(r){var o=zt(),s=o.queue;if(s===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");s.lastRenderedReducer=r;var{dispatch:d,pending:p}=s,g=o.memoizedState;if(p!==null){s.pending=null;var x=p=p.next;do g=r(g,x.action),x=x.next;while(x!==p);zr(g,o.memoizedState)||(In=!0),o.memoizedState=g,o.baseQueue===null&&(o.baseState=g),s.lastRenderedState=g}return[g,d]}function cS(r,o,s){var d=Je,p=Lr();if(xt){if(s===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var g=s();_f||g===s()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),_f=!0)}else{if(g=o(),_f||(s=o(),zr(g,s)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),_f=!0)),jt===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");(ct&127)!==0||g5(d,o,g)}return p.memoizedState=g,s={value:g,getSnapshot:o},p.queue=s,C0(y5.bind(null,d,s,r),[r]),d.flags|=2048,tf(ia|Ur,{destroy:void 0},b5.bind(null,d,s,g,o),null),g}function $0(r,o,s){var d=Je,p=zt(),g=xt;if(g){if(s===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");s=s()}else if(s=o(),!_f){var x=o();zr(s,x)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),_f=!0)}if(x=!zr((Vt||p).memoizedState,s))p.memoizedState=s,In=!0;p=p.queue;var w=y5.bind(null,d,p,r);if(to(2048,Ur,w,[r]),p.getSnapshot!==o||x||_n!==null&&_n.memoizedState.tag&ia){if(d.flags|=2048,tf(ia|Ur,{destroy:void 0},b5.bind(null,d,p,s,o),null),jt===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");g||(Rs&127)!==0||g5(d,o,s)}return s}function g5(r,o,s){r.flags|=16384,r={getSnapshot:o,value:s},o=Je.updateQueue,o===null?(o=x0(),Je.updateQueue=o,o.stores=[r]):(s=o.stores,s===null?o.stores=[r]:s.push(r))}function b5(r,o,s,d){o.value=s,o.getSnapshot=d,v5(o)&&x5(r)}function y5(r,o,s){return s(function(){v5(o)&&(hi(2,"updateSyncExternalStore()",r),x5(r))})}function v5(r){var o=r.getSnapshot;r=r.value;try{var s=o();return!zr(r,s)}catch(d){return!0}}function x5(r){var o=Cr(r,2);o!==null&&pn(o,r,2)}function uS(r){var o=Lr();if(typeof r==="function"){var s=r;if(r=s(),Au){qt(!0);try{s()}finally{qt(!1)}}}return o.memoizedState=o.baseState=r,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:La,lastRenderedState:r},o}function dS(r){r=uS(r);var o=r.queue,s=z5.bind(null,Je,o);return o.dispatch=s,[r.memoizedState,s]}function fS(r){var o=Lr();o.memoizedState=o.baseState=r;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=s,o=TS.bind(null,Je,!0,s),s.dispatch=o,[r,o]}function $5(r,o){var s=zt();return S5(s,Vt,r,o)}function S5(r,o,s,d){return r.baseState=s,lS(r,Vt,typeof d==="function"?d:La)}function w5(r,o){var s=zt();if(Vt!==null)return S5(s,Vt,r,o);return s.baseState=r,[r,s.queue.dispatch]}function XK(r,o,s,d,p){if(M0(r))throw Error("Cannot update form state while rendering.");if(r=o.action,r!==null){var g={payload:p,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){g.listeners.push(x)}};oe.T!==null?s(!0):g.isTransition=!1,d(g),s=o.pending,s===null?(g.next=o.pending=g,C5(o,g)):(g.next=s.next,o.pending=s.next=g)}}function C5(r,o){var{action:s,payload:d}=o,p=r.state;if(o.isTransition){var g=oe.T,x={};x._updatedFibers=new Set,oe.T=x;try{var w=s(p,d),T=oe.S;T!==null&&T(x,w),E5(r,o,w)}catch(A){pS(r,o,A)}finally{g!==null&&x.types!==null&&(g.types!==null&&g.types!==x.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),g.types=x.types),oe.T=g,g===null&&x._updatedFibers&&(r=x._updatedFibers.size,x._updatedFibers.clear(),10<r&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}else try{x=s(p,d),E5(r,o,x)}catch(A){pS(r,o,A)}}function E5(r,o,s){s!==null&&typeof s==="object"&&typeof s.then==="function"?(oe.asyncTransitions++,s.then(A0,A0),s.then(function(d){T5(r,o,d)},function(d){return pS(r,o,d)}),o.isTransition||console.error("An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop.")):T5(r,o,s)}function T5(r,o,s){o.status="fulfilled",o.value=s,R5(o),r.state=s,o=r.pending,o!==null&&(s=o.next,s===o?r.pending=null:(s=s.next,o.next=s,C5(r,s)))}function pS(r,o,s){var d=r.pending;if(r.pending=null,d!==null){d=d.next;do o.status="rejected",o.reason=s,R5(o),o=o.next;while(o!==d)}r.action=null}function R5(r){r=r.listeners;for(var o=0;o<r.length;o++)(0,r[o])()}function k5(r,o){return o}function ef(r,o){if(xt){var s=jt.formState;if(s!==null){e:{var d=Je;if(xt){if(Xt){t:{var p=Xt;for(var g=ra;p.nodeType!==8;){if(!g){p=null;break t}if(p=ko(p.nextSibling),p===null){p=null;break t}}g=p.data,p=g===jC||g===f6?p:null}if(p){Xt=ko(p.nextSibling),d=p.data===jC;break e}}wl(d)}d=!1}d&&(o=s[0])}}return s=Lr(),s.memoizedState=s.baseState=o,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:k5,lastRenderedState:o},s.queue=d,s=z5.bind(null,Je,d),d.dispatch=s,d=uS(!1),g=TS.bind(null,Je,!1,d.queue),d=Lr(),p={state:o,dispatch:null,action:r,pending:null},d.queue=p,s=XK.bind(null,Je,p,g,s),p.dispatch=s,d.memoizedState=r,[o,s,!1]}function S0(r){var o=zt();return A5(o,Vt,r)}function A5(r,o,s){if(o=lS(r,o,k5)[0],r=Zd(La)[0],typeof o==="object"&&o!==null&&typeof o.then==="function")try{var d=Ph(o)}catch(x){if(x===Of)throw Ey;throw x}else d=o;o=zt();var p=o.queue,g=p.dispatch;return s!==o.memoizedState&&(Je.flags|=2048,tf(ia|Ur,{destroy:void 0},QK.bind(null,p,s),null)),[d,g,r]}function QK(r,o){r.action=o}function w0(r){var o=zt(),s=Vt;if(s!==null)return A5(o,s,r);zt(),o=o.memoizedState,s=zt();var d=s.queue.dispatch;return s.memoizedState=r,[o,d,!1]}function tf(r,o,s,d){return r={tag:r,create:s,deps:d,inst:o,next:null},o=Je.updateQueue,o===null&&(o=x0(),Je.updateQueue=o),s=o.lastEffect,s===null?o.lastEffect=r.next=r:(d=s.next,s.next=r,r.next=d,o.lastEffect=r),r}function hS(r){var o=Lr();return r={current:r},o.memoizedState=r}function pu(r,o,s,d){var p=Lr();Je.flags|=r,p.memoizedState=tf(ia|o,{destroy:void 0},s,d===void 0?null:d)}function to(r,o,s,d){var p=zt();d=d===void 0?null:d;var g=p.memoizedState.inst;Vt!==null&&d!==null&&tS(d,Vt.memoizedState.deps)?p.memoizedState=tf(o,g,s,d):(Je.flags|=r,p.memoizedState=tf(ia|o,g,s,d))}function C0(r,o){(Je.mode&za)!==We?pu(276826112,Ur,r,o):pu(8390656,Ur,r,o)}function ZK(r){Je.flags|=4;var o=Je.updateQueue;if(o===null)o=x0(),Je.updateQueue=o,o.events=[r];else{var s=o.events;s===null?o.events=[r]:s.push(r)}}function mS(r){var o=Lr(),s={impl:r};return o.memoizedState=s,function(){if((kt&Wn)!==tr)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return s.impl.apply(void 0,arguments)}}function E0(r){var o=zt().memoizedState;return ZK({ref:o,nextImpl:r}),function(){if((kt&Wn)!==tr)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return o.impl.apply(void 0,arguments)}}function gS(r,o){var s=4194308;return(Je.mode&za)!==We&&(s|=134217728),pu(s,Po,r,o)}function M5(r,o){if(typeof o==="function"){r=r();var s=o(r);return function(){typeof s==="function"?s():o(null)}}if(o!==null&&o!==void 0)return o.hasOwnProperty("current")||console.error("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(o).join(", ")+"}"),r=r(),o.current=r,function(){o.current=null}}function bS(r,o,s){typeof o!=="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",o!==null?typeof o:"null"),s=s!==null&&s!==void 0?s.concat([r]):null;var d=4194308;(Je.mode&za)!==We&&(d|=134217728),pu(d,Po,M5.bind(null,o,r),s)}function T0(r,o,s){typeof o!=="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",o!==null?typeof o:"null"),s=s!==null&&s!==void 0?s.concat([r]):null,to(4,Po,M5.bind(null,o,r),s)}function yS(r,o){return Lr().memoizedState=[r,o===void 0?null:o],r}function R0(r,o){var s=zt();o=o===void 0?null:o;var d=s.memoizedState;if(o!==null&&tS(o,d[1]))return d[0];return s.memoizedState=[r,o],r}function vS(r,o){var s=Lr();o=o===void 0?null:o;var d=r();if(Au){qt(!0);try{r()}finally{qt(!1)}}return s.memoizedState=[d,o],d}function k0(r,o){var s=zt();o=o===void 0?null:o;var d=s.memoizedState;if(o!==null&&tS(o,d[1]))return d[0];if(d=r(),Au){qt(!0);try{r()}finally{qt(!1)}}return s.memoizedState=[d,o],d}function xS(r,o){var s=Lr();return $S(s,r,o)}function N5(r,o){var s=zt();return D5(s,Vt.memoizedState,r,o)}function O5(r,o){var s=zt();return Vt===null?$S(s,r,o):D5(s,Vt.memoizedState,r,o)}function $S(r,o,s){if(s===void 0||(Rs&1073741824)!==0&&(ct&261930)===0)return r.memoizedState=o;return r.memoizedState=s,r=PM(),Je.lanes|=r,Xl|=r,s}function D5(r,o,s,d){if(zr(s,o))return s;if(Pf.current!==null)return r=$S(r,s,d),zr(r,o)||(In=!0),r;if((Rs&42)===0||(Rs&1073741824)!==0&&(ct&261930)===0)return In=!0,r.memoizedState=s;return r=PM(),Je.lanes|=r,Xl|=r,o}function A0(){oe.asyncTransitions--}function P5(r,o,s,d,p){var g=It.p;It.p=g!==0&&g<Ba?g:Ba;var x=oe.T,w={};w._updatedFibers=new Set,oe.T=w,TS(r,!1,o,s);try{var T=p(),A=oe.S;if(A!==null&&A(w,T),T!==null&&typeof T==="object"&&typeof T.then==="function"){oe.asyncTransitions++,T.then(A0,A0);var G=WK(T,d);_h(r,o,G,Ro(r))}else _h(r,o,d,Ro(r))}catch(W){_h(r,o,{then:function(){},status:"rejected",reason:W},Ro(r))}finally{It.p=g,x!==null&&w.types!==null&&(x.types!==null&&x.types!==w.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),x.types=w.types),oe.T=x,x===null&&w._updatedFibers&&(r=w._updatedFibers.size,w._updatedFibers.clear(),10<r&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}function SS(r,o,s,d){if(r.tag!==5)throw Error("Expected the form instance to be a HostComponent. This is a bug in React.");var p=L5(r).queue;qK(r),P5(r,p,o,Hu,s===null?h:function(){return _5(r),s(d)})}function L5(r){var o=r.memoizedState;if(o!==null)return o;o={memoizedState:Hu,baseState:Hu,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:La,lastRenderedState:Hu},next:null};var s={};return o.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:La,lastRenderedState:s},next:null},r.memoizedState=o,r=r.alternate,r!==null&&(r.memoizedState=o),o}function _5(r){oe.T===null&&console.error("requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.");var o=L5(r);o.next===null&&(o=r.alternate.memoizedState),_h(r,o.next.queue,{},Ro(r))}function wS(){var r=uS(!1);return r=P5.bind(null,Je,r.queue,!0,!1),Lr().memoizedState=r,[!1,r]}function I5(){var r=Zd(La)[0],o=zt().memoizedState;return[typeof r==="boolean"?r:Ph(r),o]}function B5(){var r=Lh(La)[0],o=zt().memoizedState;return[typeof r==="boolean"?r:Ph(r),o]}function hu(){return rn(Km)}function CS(){var r=Lr(),o=jt.identifierPrefix;if(xt){var s=Ss,d=$s;s=(d&~(1<<32-_r(d)-1)).toString(32)+s,o="_"+o+"R_"+s,s=My++,0<s&&(o+="H"+s.toString(32)),o+="_"}else s=OW++,o="_"+o+"r_"+s.toString(32)+"_";return r.memoizedState=o}function ES(){return Lr().memoizedState=eq.bind(null,Je)}function eq(r,o){for(var s=r.return;s!==null;){switch(s.tag){case 24:case 3:var d=Ro(s),p=Tl(d),g=Rl(s,p,d);g!==null&&(hi(d,"refresh()",r),pn(g,s,d),Nh(g,s,d)),r=K2(),o!==null&&o!==void 0&&g!==null&&console.error("The seed argument is not enabled outside experimental channels."),p.payload={cache:r};return}s=s.return}}function tq(r,o,s){var d=arguments;typeof d[3]==="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),d=Ro(r);var p={lane:d,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};M0(r)?H5(o,p):(p=D2(r,o,p,d),p!==null&&(hi(d,"dispatch()",r),pn(p,r,d),F5(p,o,d)))}function z5(r,o,s){var d=arguments;typeof d[3]==="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),d=Ro(r),_h(r,o,s,d)&&hi(d,"setState()",r)}function _h(r,o,s,d){var p={lane:d,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(M0(r))H5(o,p);else{var g=r.alternate;if(r.lanes===0&&(g===null||g.lanes===0)&&(g=o.lastRenderedReducer,g!==null)){var x=oe.H;oe.H=Fa;try{var w=o.lastRenderedState,T=g(w,s);if(p.hasEagerState=!0,p.eagerState=T,zr(T,w))return n0(r,o,p,0),jt===null&&t0(),!1}catch(A){}finally{oe.H=x}}if(s=D2(r,o,p,d),s!==null)return pn(s,r,d),F5(s,o,d),!0}return!1}function TS(r,o,s,d){if(oe.T===null&&Cu===0&&console.error("An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."),d={lane:2,revertLane:nw(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},M0(r)){if(o)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else o=D2(r,s,d,2),o!==null&&(hi(2,"setOptimistic()",r),pn(o,r,2))}function M0(r){var o=r.alternate;return r===Je||o!==null&&o===Je}function H5(r,o){If=Ay=!0;var s=r.pending;s===null?o.next=o:(o.next=s.next,s.next=o),r.pending=o}function F5(r,o,s){if((s&4194048)!==0){var d=o.lanes;d&=r.pendingLanes,s|=d,o.lanes=s,eu(r,s)}}function RS(r){if(r!==null&&typeof r!=="function"){var o=String(r);BO.has(o)||(BO.add(o),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",r))}}function kS(r,o,s,d){var p=r.memoizedState,g=s(d,p);if(r.mode&Tr){qt(!0);try{g=s(d,p)}finally{qt(!1)}}g===void 0&&(o=P(o)||"Component",PO.has(o)||(PO.add(o),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",o))),p=g===null||g===void 0?p:pt({},p,g),r.memoizedState=p,r.lanes===0&&(r.updateQueue.baseState=p)}function U5(r,o,s,d,p,g,x){var w=r.stateNode;if(typeof w.shouldComponentUpdate==="function"){if(s=w.shouldComponentUpdate(d,g,x),r.mode&Tr){qt(!0);try{s=w.shouldComponentUpdate(d,g,x)}finally{qt(!1)}}return s===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",P(o)||"Component"),s}return o.prototype&&o.prototype.isPureReactComponent?!Ch(s,d)||!Ch(p,g):!0}function V5(r,o,s,d){var p=o.state;typeof o.componentWillReceiveProps==="function"&&o.componentWillReceiveProps(s,d),typeof o.UNSAFE_componentWillReceiveProps==="function"&&o.UNSAFE_componentWillReceiveProps(s,d),o.state!==p&&(r=J(r)||"Component",AO.has(r)||(AO.add(r),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",r)),SC.enqueueReplaceState(o,o.state,null))}function mu(r,o){var s=o;if("ref"in o){s={};for(var d in o)d!=="ref"&&(s[d]=o[d])}if(r=r.defaultProps){s===o&&(s=pt({},s));for(var p in r)s[p]===void 0&&(s[p]=r[p])}return s}function j5(r){Zw(r),console.warn(`%s
121
+
122
+ %s
123
+ `,Bf?"An error occurred in the <"+Bf+"> component.":"An error occurred in one of your React components.",`Consider adding an error boundary to your tree to customize error handling behavior.
124
+ Visit https://react.dev/link/error-boundaries to learn more about error boundaries.`)}function K5(r){var o=Bf?"The above error occurred in the <"+Bf+"> component.":"The above error occurred in one of your React components.",s="React will try to recreate this component tree from scratch using the error boundary you provided, "+((wC||"Anonymous")+".");if(typeof r==="object"&&r!==null&&typeof r.environmentName==="string"){var d=r.environmentName;r=[`%o
125
+
126
+ %s
127
+
128
+ %s
129
+ `,r,o,s].slice(0),typeof r[0]==="string"?r.splice(0,1,x6+" "+r[0],$6,tv+d+tv,S6):r.splice(0,0,x6,$6,tv+d+tv,S6),r.unshift(console),d=ZW.apply(console.error,r),d()}else console.error(`%o
130
+
131
+ %s
132
+
133
+ %s
134
+ `,r,o,s)}function q5(r){Zw(r)}function N0(r,o){try{Bf=o.source?J(o.source):null,wC=null;var s=o.value;if(oe.actQueue!==null)oe.thrownErrors.push(s);else{var d=r.onUncaughtError;d(s,{componentStack:o.stack})}}catch(p){setTimeout(function(){throw p})}}function G5(r,o,s){try{Bf=s.source?J(s.source):null,wC=J(o);var d=r.onCaughtError;d(s.value,{componentStack:s.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function AS(r,o,s){return s=Tl(s),s.tag=gC,s.payload={element:null},s.callback=function(){he(o.source,N0,r,o)},s}function MS(r){return r=Tl(r),r.tag=gC,r}function NS(r,o,s,d){var p=s.type.getDerivedStateFromError;if(typeof p==="function"){var g=d.value;r.payload=function(){return p(g)},r.callback=function(){HA(s),he(d.source,G5,o,s,d)}}var x=s.stateNode;x!==null&&typeof x.componentDidCatch==="function"&&(r.callback=function(){HA(s),he(d.source,G5,o,s,d),typeof p!=="function"&&(Zl===null?Zl=new Set([this]):Zl.add(this)),kW(this,d),typeof p==="function"||(s.lanes&2)===0&&console.error("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",J(s)||"Unknown")})}function nq(r,o,s,d,p){if(s.flags|=32768,Ni&&jh(r,p),d!==null&&typeof d==="object"&&typeof d.then==="function"){if(o=s.alternate,o!==null&&Xd(o,s,p,!0),xt&&(Pi=!0),s=Do.current,s!==null){switch(s.tag){case 31:case 13:return aa===null?H0():s.alternate===null&&dn===Ns&&(dn=Dy),s.flags&=-257,s.flags|=65536,s.lanes=p,d===Ty?s.flags|=16384:(o=s.updateQueue,o===null?s.updateQueue=new Set([d]):o.add(d),QS(r,d,p)),!1;case 22:return s.flags|=65536,d===Ty?s.flags|=16384:(o=s.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([d])},s.updateQueue=o):(s=o.retryQueue,s===null?o.retryQueue=new Set([d]):s.add(d)),QS(r,d,p)),!1}throw Error("Unexpected Suspense handler tag ("+s.tag+"). This is a bug in React.")}return QS(r,d,p),H0(),!1}if(xt)return Pi=!0,o=Do.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=p,d!==aC&&Th(wo(Error("There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",{cause:d}),s))):(d!==aC&&Th(wo(Error("There was an error while hydrating but React was able to recover by instead client rendering the entire root.",{cause:d}),s)),r=r.current.alternate,r.flags|=65536,p&=-p,r.lanes|=p,d=wo(d,s),p=AS(r.stateNode,d,p),b0(r,p),dn!==Yl&&(dn=Mu)),!1;var g=wo(Error("There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",{cause:d}),s);if(_m===null?_m=[g]:_m.push(g),dn!==Yl&&(dn=Mu),o===null)return!0;d=wo(d,s),s=o;do{switch(s.tag){case 3:return s.flags|=65536,r=p&-p,s.lanes|=r,r=AS(s.stateNode,d,r),b0(s,r),!1;case 1:if(o=s.type,g=s.stateNode,(s.flags&128)===0&&(typeof o.getDerivedStateFromError==="function"||g!==null&&typeof g.componentDidCatch==="function"&&(Zl===null||!Zl.has(g))))return s.flags|=65536,p&=-p,s.lanes|=p,p=MS(p),NS(p,r,s,d),b0(s,p),!1}s=s.return}while(s!==null);return!1}function sr(r,o,s,d){o.child=r===null?yO(o,null,s,d):ku(o,r.child,s,d)}function W5(r,o,s,d,p){s=s.render;var g=o.ref;if("ref"in d){var x={};for(var w in d)w!=="ref"&&(x[w]=d[w])}else x=d;if(uu(o),d=nS(r,o,s,x,g,p),w=oS(),r!==null&&!In)return aS(r,o,p),ms(r,o,p);return xt&&w&&z2(o),o.flags|=1,sr(r,o,d,p),o.child}function Y5(r,o,s,d,p){if(r===null){var g=s.type;if(typeof g==="function"&&!L2(g)&&g.defaultProps===void 0&&s.compare===null)return s=iu(g),o.tag=15,o.type=s,DS(o,g),J5(r,o,s,d,p);return r=_2(s.type,null,d,o,o.mode,p),r.ref=o.ref,r.return=o,o.child=r}if(g=r.child,!zS(r,p)){var x=g.memoizedProps;if(s=s.compare,s=s!==null?s:Ch,s(x,d)&&r.ref===o.ref)return ms(r,o,p)}return o.flags|=1,r=ds(g,d),r.ref=o.ref,r.return=o,o.child=r}function J5(r,o,s,d,p){if(r!==null){var g=r.memoizedProps;if(Ch(g,d)&&r.ref===o.ref&&o.type===r.type)if(In=!1,o.pendingProps=d=g,zS(r,p))(r.flags&131072)!==0&&(In=!0);else return o.lanes=r.lanes,ms(r,o,p)}return OS(r,o,s,d,p)}function X5(r,o,s,d){var p=d.children,g=r!==null?r.memoizedState:null;if(r===null&&o.stateNode===null&&(o.stateNode={_visibility:dm,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((o.flags&128)!==0){if(g=g!==null?g.baseLanes|s:s,r!==null){d=o.child=r.child;for(p=0;d!==null;)p=p|d.lanes|d.childLanes,d=d.sibling;d=p&~g}else d=0,o.child=null;return Q5(r,o,g,s,d)}if((s&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},r!==null&&d0(o,g!==null?g.cachePool:null),g!==null?p5(o,g):Q2(o),h5(o);else return d=o.lanes=536870912,Q5(r,o,g!==null?g.baseLanes|s:s,s,d)}else g!==null?(d0(o,g.cachePool),p5(o,g),Al(o),o.memoizedState=null):(r!==null&&d0(o,null),Q2(o),Al(o));return sr(r,o,p,s),o.child}function Ih(r,o){return r!==null&&r.tag===22||o.stateNode!==null||(o.stateNode={_visibility:dm,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function Q5(r,o,s,d,p){var g=W2();return g=g===null?null:{parent:Pn._currentValue,pool:g},o.memoizedState={baseLanes:s,cachePool:g},r!==null&&d0(o,null),Q2(o),h5(o),r!==null&&Xd(r,o,d,!0),o.childLanes=p,null}function O0(r,o){var s=o.hidden;return s!==void 0&&console.error(`<Activity> doesn't accept a hidden prop. Use mode="hidden" instead.
135
+ - <Activity %s>
136
+ + <Activity %s>`,s===!0?"hidden":s===!1?"hidden={false}":"hidden={...}",s?'mode="hidden"':'mode="visible"'),o=P0({mode:o.mode,children:o.children},r.mode),o.ref=r.ref,r.child=o,o.return=r,o}function Z5(r,o,s){return ku(o,r.child,null,s),r=O0(o,o.pendingProps),r.flags|=2,To(o),o.memoizedState=null,r}function rq(r,o,s){var d=o.pendingProps,p=(o.flags&128)!==0;if(o.flags&=-129,r===null){if(xt){if(d.mode==="hidden")return r=O0(o,d),o.lanes=536870912,Ih(null,r);if(eS(o),(r=Xt)?(s=CN(r,ra),s=s!==null&&s.data===_u?s:null,s!==null&&(d={dehydrated:s,treeContext:KA(),retryLane:536870912,hydrationErrors:null},o.memoizedState=d,d=VA(s),d.return=o,o.child=d,ur=o,Xt=null)):s=null,s===null)throw a0(o,r),wl(o);return o.lanes=536870912,null}return O0(o,d)}var g=r.memoizedState;if(g!==null){var x=g.dehydrated;if(eS(o),p)if(o.flags&256)o.flags&=-257,o=Z5(r,o,s);else if(o.memoizedState!==null)o.child=r.child,o.flags|=128,o=null;else throw Error("Client rendering an Activity suspended it again. This is a bug in React.");else if(GA(),(s&536870912)!==0&&z0(o),In||Xd(r,o,s,!1),p=(s&r.childLanes)!==0,In||p){if(d=jt,d!==null&&(x=tu(d,s),x!==0&&x!==g.retryLane))throw g.retryLane=x,Cr(r,x),pn(d,r,x),CC;H0(),o=Z5(r,o,s)}else r=g.treeContext,Xt=ko(x.nextSibling),ur=o,xt=!0,Ul=null,Pi=!1,Oo=null,ra=!1,r!==null&&qA(o,r),o=O0(o,d),o.flags|=4096;return o}return g=r.child,d={mode:d.mode,children:d.children},(s&536870912)!==0&&(s&r.lanes)!==0&&z0(o),r=ds(g,d),r.ref=o.ref,o.child=r,r.return=o,r}function D0(r,o){var s=o.ref;if(s===null)r!==null&&r.ref!==null&&(o.flags|=4194816);else{if(typeof s!=="function"&&typeof s!=="object")throw Error("Expected ref to be a function, an object returned by React.createRef(), or undefined/null.");if(r===null||r.ref!==s)o.flags|=4194816}}function OS(r,o,s,d,p){if(s.prototype&&typeof s.prototype.render==="function"){var g=P(s)||"Unknown";zO[g]||(console.error("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",g,g),zO[g]=!0)}if(o.mode&Tr&&Ha.recordLegacyContextWarning(o,null),r===null&&(DS(o,o.type),s.contextTypes&&(g=P(s)||"Unknown",FO[g]||(FO[g]=!0,console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",g)))),uu(o),s=nS(r,o,s,d,void 0,p),d=oS(),r!==null&&!In)return aS(r,o,p),ms(r,o,p);return xt&&d&&z2(o),o.flags|=1,sr(r,o,s,p),o.child}function eM(r,o,s,d,p,g){if(uu(o),As=-1,Am=r!==null&&r.type!==o.type,o.updateQueue=null,s=rS(o,d,s,p),m5(r,o),d=oS(),r!==null&&!In)return aS(r,o,g),ms(r,o,g);return xt&&d&&z2(o),o.flags|=1,sr(r,o,s,g),o.child}function tM(r,o,s,d,p){switch(c(o)){case!1:var g=o.stateNode,x=new o.type(o.memoizedProps,g.context).state;g.updater.enqueueSetState(g,x,null);break;case!0:o.flags|=128,o.flags|=65536,g=Error("Simulated error coming from DevTools");var w=p&-p;if(o.lanes|=w,x=jt,x===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");w=MS(w),NS(w,x,o,wo(g,o)),b0(o,w)}if(uu(o),o.stateNode===null){if(x=Fl,g=s.contextType,"contextType"in s&&g!==null&&(g===void 0||g.$$typeof!==ki)&&!IO.has(s)&&(IO.add(s),w=g===void 0?" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof g!=="object"?" However, it is set to a "+typeof g+".":g.$$typeof===Ew?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(g).join(", ")+"}.",console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",P(s)||"Component",w)),typeof g==="object"&&g!==null&&(x=rn(g)),g=new s(d,x),o.mode&Tr){qt(!0);try{g=new s(d,x)}finally{qt(!1)}}if(x=o.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=SC,o.stateNode=g,g._reactInternals=o,g._reactInternalInstance=kO,typeof s.getDerivedStateFromProps==="function"&&x===null&&(x=P(s)||"Component",MO.has(x)||(MO.add(x),console.error("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",x,g.state===null?"null":"undefined",x))),typeof s.getDerivedStateFromProps==="function"||typeof g.getSnapshotBeforeUpdate==="function"){var T=w=x=null;if(typeof g.componentWillMount==="function"&&g.componentWillMount.__suppressDeprecationWarning!==!0?x="componentWillMount":typeof g.UNSAFE_componentWillMount==="function"&&(x="UNSAFE_componentWillMount"),typeof g.componentWillReceiveProps==="function"&&g.componentWillReceiveProps.__suppressDeprecationWarning!==!0?w="componentWillReceiveProps":typeof g.UNSAFE_componentWillReceiveProps==="function"&&(w="UNSAFE_componentWillReceiveProps"),typeof g.componentWillUpdate==="function"&&g.componentWillUpdate.__suppressDeprecationWarning!==!0?T="componentWillUpdate":typeof g.UNSAFE_componentWillUpdate==="function"&&(T="UNSAFE_componentWillUpdate"),x!==null||w!==null||T!==null){g=P(s)||"Component";var A=typeof s.getDerivedStateFromProps==="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";OO.has(g)||(OO.add(g),console.error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
137
+
138
+ %s uses %s but also contains the following legacy lifecycles:%s%s%s
139
+
140
+ The above lifecycles should be removed. Learn more about this warning here:
141
+ https://react.dev/link/unsafe-component-lifecycles`,g,A,x!==null?`
142
+ `+x:"",w!==null?`
143
+ `+w:"",T!==null?`
144
+ `+T:""))}}g=o.stateNode,x=P(s)||"Component",g.render||(s.prototype&&typeof s.prototype.render==="function"?console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?",x):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",x)),!g.getInitialState||g.getInitialState.isReactClassApproved||g.state||console.error("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",x),g.getDefaultProps&&!g.getDefaultProps.isReactClassApproved&&console.error("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",x),g.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",x),s.childContextTypes&&!_O.has(s)&&(_O.add(s),console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",x)),s.contextTypes&&!LO.has(s)&&(LO.add(s),console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)",x)),typeof g.componentShouldUpdate==="function"&&console.error("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",x),s.prototype&&s.prototype.isPureReactComponent&&typeof g.shouldComponentUpdate<"u"&&console.error("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",P(s)||"A pure component"),typeof g.componentDidUnmount==="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",x),typeof g.componentDidReceiveProps==="function"&&console.error("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",x),typeof g.componentWillRecieveProps==="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",x),typeof g.UNSAFE_componentWillRecieveProps==="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",x),w=g.props!==d,g.props!==void 0&&w&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",x),g.defaultProps&&console.error("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",x,x),typeof g.getSnapshotBeforeUpdate!=="function"||typeof g.componentDidUpdate==="function"||NO.has(s)||(NO.add(s),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",P(s))),typeof g.getDerivedStateFromProps==="function"&&console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",x),typeof g.getDerivedStateFromError==="function"&&console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",x),typeof s.getSnapshotBeforeUpdate==="function"&&console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",x),(w=g.state)&&(typeof w!=="object"||qn(w))&&console.error("%s.state: must be set to an object or null",x),typeof g.getChildContext==="function"&&typeof s.childContextTypes!=="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",x),g=o.stateNode,g.props=d,g.state=o.memoizedState,g.refs={},J2(o),x=s.contextType,g.context=typeof x==="object"&&x!==null?rn(x):Fl,g.state===d&&(x=P(s)||"Component",DO.has(x)||(DO.add(x),console.error("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",x))),o.mode&Tr&&Ha.recordLegacyContextWarning(o,g),Ha.recordUnsafeLifecycleWarnings(o,g),g.state=o.memoizedState,x=s.getDerivedStateFromProps,typeof x==="function"&&(kS(o,s,x,d),g.state=o.memoizedState),typeof s.getDerivedStateFromProps==="function"||typeof g.getSnapshotBeforeUpdate==="function"||typeof g.UNSAFE_componentWillMount!=="function"&&typeof g.componentWillMount!=="function"||(x=g.state,typeof g.componentWillMount==="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount==="function"&&g.UNSAFE_componentWillMount(),x!==g.state&&(console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",J(o)||"Component"),SC.enqueueReplaceState(g,g.state,null)),Dh(o,d,g,p),Oh(),g.state=o.memoizedState),typeof g.componentDidMount==="function"&&(o.flags|=4194308),(o.mode&za)!==We&&(o.flags|=134217728),g=!0}else if(r===null){g=o.stateNode;var G=o.memoizedProps;w=mu(s,G),g.props=w;var W=g.context;T=s.contextType,x=Fl,typeof T==="object"&&T!==null&&(x=rn(T)),A=s.getDerivedStateFromProps,T=typeof A==="function"||typeof g.getSnapshotBeforeUpdate==="function",G=o.pendingProps!==G,T||typeof g.UNSAFE_componentWillReceiveProps!=="function"&&typeof g.componentWillReceiveProps!=="function"||(G||W!==x)&&V5(o,g,d,x),Wl=!1;var B=o.memoizedState;g.state=B,Dh(o,d,g,p),Oh(),W=o.memoizedState,G||B!==W||Wl?(typeof A==="function"&&(kS(o,s,A,d),W=o.memoizedState),(w=Wl||U5(o,s,w,d,B,W,x))?(T||typeof g.UNSAFE_componentWillMount!=="function"&&typeof g.componentWillMount!=="function"||(typeof g.componentWillMount==="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount==="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount==="function"&&(o.flags|=4194308),(o.mode&za)!==We&&(o.flags|=134217728)):(typeof g.componentDidMount==="function"&&(o.flags|=4194308),(o.mode&za)!==We&&(o.flags|=134217728),o.memoizedProps=d,o.memoizedState=W),g.props=d,g.state=W,g.context=x,g=w):(typeof g.componentDidMount==="function"&&(o.flags|=4194308),(o.mode&za)!==We&&(o.flags|=134217728),g=!1)}else{g=o.stateNode,X2(r,o),x=o.memoizedProps,T=mu(s,x),g.props=T,A=o.pendingProps,B=g.context,W=s.contextType,w=Fl,typeof W==="object"&&W!==null&&(w=rn(W)),G=s.getDerivedStateFromProps,(W=typeof G==="function"||typeof g.getSnapshotBeforeUpdate==="function")||typeof g.UNSAFE_componentWillReceiveProps!=="function"&&typeof g.componentWillReceiveProps!=="function"||(x!==A||B!==w)&&V5(o,g,d,w),Wl=!1,B=o.memoizedState,g.state=B,Dh(o,d,g,p),Oh();var te=o.memoizedState;x!==A||B!==te||Wl||r!==null&&r.dependencies!==null&&s0(r.dependencies)?(typeof G==="function"&&(kS(o,s,G,d),te=o.memoizedState),(T=Wl||U5(o,s,T,d,B,te,w)||r!==null&&r.dependencies!==null&&s0(r.dependencies))?(W||typeof g.UNSAFE_componentWillUpdate!=="function"&&typeof g.componentWillUpdate!=="function"||(typeof g.componentWillUpdate==="function"&&g.componentWillUpdate(d,te,w),typeof g.UNSAFE_componentWillUpdate==="function"&&g.UNSAFE_componentWillUpdate(d,te,w)),typeof g.componentDidUpdate==="function"&&(o.flags|=4),typeof g.getSnapshotBeforeUpdate==="function"&&(o.flags|=1024)):(typeof g.componentDidUpdate!=="function"||x===r.memoizedProps&&B===r.memoizedState||(o.flags|=4),typeof g.getSnapshotBeforeUpdate!=="function"||x===r.memoizedProps&&B===r.memoizedState||(o.flags|=1024),o.memoizedProps=d,o.memoizedState=te),g.props=d,g.state=te,g.context=w,g=T):(typeof g.componentDidUpdate!=="function"||x===r.memoizedProps&&B===r.memoizedState||(o.flags|=4),typeof g.getSnapshotBeforeUpdate!=="function"||x===r.memoizedProps&&B===r.memoizedState||(o.flags|=1024),g=!1)}if(w=g,D0(r,o),x=(o.flags&128)!==0,w||x){if(w=o.stateNode,cn(o),x&&typeof s.getDerivedStateFromError!=="function")s=null,Hr=-1;else if(s=oO(w),o.mode&Tr){qt(!0);try{oO(w)}finally{qt(!1)}}o.flags|=1,r!==null&&x?(o.child=ku(o,r.child,null,p),o.child=ku(o,null,s,p)):sr(r,o,s,p),o.memoizedState=w.state,r=o.child}else r=ms(r,o,p);return p=o.stateNode,g&&p.props!==d&&(zf||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",J(o)||"a component"),zf=!0),r}function nM(r,o,s,d){return cu(),o.flags|=256,sr(r,o,s,d),o.child}function DS(r,o){o&&o.childContextTypes&&console.error(`childContextTypes cannot be defined on a function component.
145
+ %s.childContextTypes = ...`,o.displayName||o.name||"Component"),typeof o.getDerivedStateFromProps==="function"&&(r=P(o)||"Unknown",UO[r]||(console.error("%s: Function components do not support getDerivedStateFromProps.",r),UO[r]=!0)),typeof o.contextType==="object"&&o.contextType!==null&&(o=P(o)||"Unknown",HO[o]||(console.error("%s: Function components do not support contextType.",o),HO[o]=!0))}function PS(r){return{baseLanes:r,cachePool:e5()}}function LS(r,o,s){return r=r!==null?r.childLanes&~s:0,o&&(r|=io),r}function rM(r,o,s){var d,p=o.pendingProps;l(o)&&(o.flags|=128);var g=!1,x=(o.flags&128)!==0;if((d=x)||(d=r!==null&&r.memoizedState===null?!1:(Mn.current&Rm)!==0),d&&(g=!0,o.flags&=-129),d=(o.flags&32)!==0,o.flags&=-33,r===null){if(xt){if(g?kl(o):Al(o),(r=Xt)?(s=CN(r,ra),s=s!==null&&s.data!==_u?s:null,s!==null&&(d={dehydrated:s,treeContext:KA(),retryLane:536870912,hydrationErrors:null},o.memoizedState=d,d=VA(s),d.return=o,o.child=d,ur=o,Xt=null)):s=null,s===null)throw a0(o,r),wl(o);return hw(s)?o.lanes=32:o.lanes=536870912,null}var w=p.children;if(p=p.fallback,g){Al(o);var T=o.mode;return w=P0({mode:"hidden",children:w},T),p=su(p,T,s,null),w.return=o,p.return=o,w.sibling=p,o.child=w,p=o.child,p.memoizedState=PS(s),p.childLanes=LS(r,d,s),o.memoizedState=EC,Ih(null,p)}return kl(o),_S(o,w)}var A=r.memoizedState;if(A!==null){var G=A.dehydrated;if(G!==null){if(x)o.flags&256?(kl(o),o.flags&=-257,o=IS(r,o,s)):o.memoizedState!==null?(Al(o),o.child=r.child,o.flags|=128,o=null):(Al(o),w=p.fallback,T=o.mode,p=P0({mode:"visible",children:p.children},T),w=su(w,T,s,null),w.flags|=2,p.return=o,w.return=o,p.sibling=w,o.child=p,ku(o,r.child,null,s),p=o.child,p.memoizedState=PS(s),p.childLanes=LS(r,d,s),o.memoizedState=EC,o=Ih(null,p));else if(kl(o),GA(),(s&536870912)!==0&&z0(o),hw(G)){if(d=G.nextSibling&&G.nextSibling.dataset,d){w=d.dgst;var W=d.msg;T=d.stck;var B=d.cstck}g=W,d=w,p=T,G=B,w=g,T=G,w=w?Error(w):Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),w.stack=p||"",w.digest=d,d=T===void 0?null:T,p={value:w,source:null,stack:d},typeof d==="string"&&oC.set(w,p),Th(p),o=IS(r,o,s)}else if(In||Xd(r,o,s,!1),d=(s&r.childLanes)!==0,In||d){if(d=jt,d!==null&&(p=tu(d,s),p!==0&&p!==A.retryLane))throw A.retryLane=p,Cr(r,p),pn(d,r,p),CC;pw(G)||H0(),o=IS(r,o,s)}else pw(G)?(o.flags|=192,o.child=r.child,o=null):(r=A.treeContext,Xt=ko(G.nextSibling),ur=o,xt=!0,Ul=null,Pi=!1,Oo=null,ra=!1,r!==null&&qA(o,r),o=_S(o,p.children),o.flags|=4096);return o}}if(g)return Al(o),w=p.fallback,T=o.mode,B=r.child,G=B.sibling,p=ds(B,{mode:"hidden",children:p.children}),p.subtreeFlags=B.subtreeFlags&65011712,G!==null?w=ds(G,w):(w=su(w,T,s,null),w.flags|=2),w.return=o,p.return=o,p.sibling=w,o.child=p,Ih(null,p),p=o.child,w=r.child.memoizedState,w===null?w=PS(s):(T=w.cachePool,T!==null?(B=Pn._currentValue,T=T.parent!==B?{parent:B,pool:B}:T):T=e5(),w={baseLanes:w.baseLanes|s,cachePool:T}),p.memoizedState=w,p.childLanes=LS(r,d,s),o.memoizedState=EC,Ih(r.child,p);return A!==null&&(s&62914560)===s&&(s&r.lanes)!==0&&z0(o),kl(o),s=r.child,r=s.sibling,s=ds(s,{mode:"visible",children:p.children}),s.return=o,s.sibling=null,r!==null&&(d=o.deletions,d===null?(o.deletions=[r],o.flags|=16):d.push(r)),o.child=s,o.memoizedState=null,s}function _S(r,o){return o=P0({mode:"visible",children:o},r.mode),o.return=r,r.child=o}function P0(r,o){return r=y(22,r,null,o),r.lanes=0,r}function IS(r,o,s){return ku(o,r.child,null,s),r=_S(o,o.pendingProps.children),r.flags|=2,o.memoizedState=null,r}function oM(r,o,s){r.lanes|=o;var d=r.alternate;d!==null&&(d.lanes|=o),V2(r.return,o,s)}function BS(r,o,s,d,p,g){var x=r.memoizedState;x===null?r.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:d,tail:s,tailMode:p,treeForkCount:g}:(x.isBackwards=o,x.rendering=null,x.renderingStartTime=0,x.last=d,x.tail=s,x.tailMode=p,x.treeForkCount=g)}function aM(r,o,s){var d=o.pendingProps,p=d.revealOrder,g=d.tail,x=d.children,w=Mn.current;if((d=(w&Rm)!==0)?(w=w&Lf|Rm,o.flags|=128):w&=Lf,se(Mn,w,o),w=p==null?"null":p,p!=="forwards"&&p!=="unstable_legacy-backwards"&&p!=="together"&&p!=="independent"&&!VO[w])if(VO[w]=!0,p==null)console.error('The default for the <SuspenseList revealOrder="..."> prop is changing. To be future compatible you must explictly specify either "independent" (the current default), "together", "forwards" or "legacy_unstable-backwards".');else if(p==="backwards")console.error('The rendering order of <SuspenseList revealOrder="backwards"> is changing. To be future compatible you must specify revealOrder="legacy_unstable-backwards" instead.');else if(typeof p==="string")switch(p.toLowerCase()){case"together":case"forwards":case"backwards":case"independent":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',p,p.toLowerCase());break;case"forward":case"backward":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',p,p.toLowerCase());break;default:console.error('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',p)}else console.error('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',p);if(w=g==null?"null":g,!Oy[w])if(g==null){if(p==="forwards"||p==="backwards"||p==="unstable_legacy-backwards")Oy[w]=!0,console.error('The default for the <SuspenseList tail="..."> prop is changing. To be future compatible you must explictly specify either "visible" (the current default), "collapsed" or "hidden".')}else g!=="visible"&&g!=="collapsed"&&g!=="hidden"?(Oy[w]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "visible", "collapsed" or "hidden"?',g)):p!=="forwards"&&p!=="backwards"&&p!=="unstable_legacy-backwards"&&(Oy[w]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',g));e:if((p==="forwards"||p==="backwards"||p==="unstable_legacy-backwards")&&x!==void 0&&x!==null&&x!==!1)if(qn(x)){for(w=0;w<x.length;w++)if(!u5(x[w],w))break e}else if(w=V(x),typeof w==="function"){if(w=w.call(x))for(var T=w.next(),A=0;!T.done;T=w.next()){if(!u5(T.value,A))break e;A++}}else console.error('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',p);if(sr(r,o,x,s),xt?(Sl(),x=fm):x=0,!d&&r!==null&&(r.flags&128)!==0)e:for(r=o.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&oM(r,s,o);else if(r.tag===19)oM(r,s,o);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===o)break e;for(;r.sibling===null;){if(r.return===null||r.return===o)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(p){case"forwards":s=o.child;for(p=null;s!==null;)r=s.alternate,r!==null&&y0(r)===null&&(p=s),s=s.sibling;s=p,s===null?(p=o.child,o.child=null):(p=s.sibling,s.sibling=null),BS(o,!1,p,s,g,x);break;case"backwards":case"unstable_legacy-backwards":s=null,p=o.child;for(o.child=null;p!==null;){if(r=p.alternate,r!==null&&y0(r)===null){o.child=p;break}r=p.sibling,p.sibling=s,s=p,p=r}BS(o,!0,s,null,g,x);break;case"together":BS(o,!1,null,null,void 0,x);break;default:o.memoizedState=null}return o.child}function ms(r,o,s){if(r!==null&&(o.dependencies=r.dependencies),Hr=-1,Xl|=o.lanes,(s&o.childLanes)===0)if(r!==null){if(Xd(r,o,s,!1),(s&o.childLanes)===0)return null}else return null;if(r!==null&&o.child!==r.child)throw Error("Resuming work not yet implemented.");if(o.child!==null){r=o.child,s=ds(r,r.pendingProps),o.child=s;for(s.return=o;r.sibling!==null;)r=r.sibling,s=s.sibling=ds(r,r.pendingProps),s.return=o;s.sibling=null}return o.child}function zS(r,o){if((r.lanes&o)!==0)return!0;return r=r.dependencies,r!==null&&s0(r)?!0:!1}function oq(r,o,s){switch(o.tag){case 3:F(o,o.stateNode.containerInfo),Cl(o,Pn,r.memoizedState.cache),cu();break;case 27:case 5:de(o);break;case 4:F(o,o.stateNode.containerInfo);break;case 10:Cl(o,o.type,o.memoizedProps.value);break;case 12:(s&o.childLanes)!==0&&(o.flags|=4),o.flags|=2048;var d=o.stateNode;d.effectDuration=-0,d.passiveEffectDuration=-0;break;case 31:if(o.memoizedState!==null)return o.flags|=128,eS(o),null;break;case 13:if(d=o.memoizedState,d!==null){if(d.dehydrated!==null)return kl(o),o.flags|=128,null;if((s&o.child.childLanes)!==0)return rM(r,o,s);return kl(o),r=ms(r,o,s),r!==null?r.sibling:null}kl(o);break;case 19:var p=(r.flags&128)!==0;if(d=(s&o.childLanes)!==0,d||(Xd(r,o,s,!1),d=(s&o.childLanes)!==0),p){if(d)return aM(r,o,s);o.flags|=128}if(p=o.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),se(Mn,Mn.current,o),d)break;else return null;case 22:return o.lanes=0,X5(r,o,s,o.pendingProps);case 24:Cl(o,Pn,r.memoizedState.cache)}return ms(r,o,s)}function HS(r,o,s){if(o._debugNeedsRemount&&r!==null){s=_2(o.type,o.key,o.pendingProps,o._debugOwner||null,o.mode,o.lanes),s._debugStack=o._debugStack,s._debugTask=o._debugTask;var d=o.return;if(d===null)throw Error("Cannot swap the root fiber.");if(r.alternate=null,o.alternate=null,s.index=o.index,s.sibling=o.sibling,s.return=o.return,s.ref=o.ref,s._debugInfo=o._debugInfo,o===d.child)d.child=s;else{var p=d.child;if(p===null)throw Error("Expected parent to have a child.");for(;p.sibling!==o;)if(p=p.sibling,p===null)throw Error("Expected to find the previous sibling.");p.sibling=s}return o=d.deletions,o===null?(d.deletions=[r],d.flags|=16):o.push(r),s.flags|=2,s}if(r!==null)if(r.memoizedProps!==o.pendingProps||o.type!==r.type)In=!0;else{if(!zS(r,s)&&(o.flags&128)===0)return In=!1,oq(r,o,s);In=(r.flags&131072)!==0?!0:!1}else{if(In=!1,d=xt)Sl(),d=(o.flags&1048576)!==0;d&&(d=o.index,Sl(),jA(o,fm,d))}switch(o.lanes=0,o.tag){case 16:e:if(d=o.pendingProps,r=El(o.elementType),o.type=r,typeof r==="function")L2(r)?(d=mu(r,d),o.tag=1,o.type=r=iu(r),o=tM(null,o,r,d,s)):(o.tag=0,DS(o,r),o.type=r=iu(r),o=OS(null,o,r,d,s));else{if(r!==void 0&&r!==null){if(p=r.$$typeof,p===Zh){o.tag=11,o.type=r=P2(r),o=W5(null,o,r,d,s);break e}else if(p===ey){o.tag=14,o=Y5(null,o,r,d,s);break e}}throw o="",r!==null&&typeof r==="object"&&r.$$typeof===Ao&&(o=" Did you wrap a component in React.lazy() more than once?"),s=P(r)||r,Error("Element type is invalid. Received a promise that resolves to: "+s+". Lazy element type must resolve to a class or function."+o)}return o;case 0:return OS(r,o,o.type,o.pendingProps,s);case 1:return d=o.type,p=mu(d,o.pendingProps),tM(r,o,d,p,s);case 3:e:{if(F(o,o.stateNode.containerInfo),r===null)throw Error("Should have a current fiber. This is a bug in React.");d=o.pendingProps;var g=o.memoizedState;p=g.element,X2(r,o),Dh(o,d,null,s);var x=o.memoizedState;if(d=x.cache,Cl(o,Pn,d),d!==g.cache&&j2(o,[Pn],s,!0),Oh(),d=x.element,g.isDehydrated)if(g={element:d,isDehydrated:!1,cache:x.cache},o.updateQueue.baseState=g,o.memoizedState=g,o.flags&256){o=nM(r,o,d,s);break e}else if(d!==p){p=wo(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),o),Th(p),o=nM(r,o,d,s);break e}else{switch(r=o.stateNode.containerInfo,r.nodeType){case 9:r=r.body;break;default:r=r.nodeName==="HTML"?r.ownerDocument.body:r}Xt=ko(r.firstChild),ur=o,xt=!0,Ul=null,Pi=!1,Oo=null,ra=!0,s=yO(o,null,d,s);for(o.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(cu(),d===p){o=ms(r,o,s);break e}sr(r,o,d,s)}o=o.child}return o;case 26:return D0(r,o),r===null?(s=MN(o.type,null,o.pendingProps,null))?o.memoizedState=s:xt||(s=o.type,r=o.pendingProps,d=I(Ll.current),d=j0(d).createElement(s),d[cr]=o,d[Ir]=r,lr(d,s,r),je(d),o.stateNode=d):o.memoizedState=MN(o.type,r.memoizedProps,o.pendingProps,r.memoizedState),null;case 27:return de(o),r===null&&xt&&(d=I(Ll.current),p=Z(),d=o.stateNode=kN(o.type,o.pendingProps,d,p,!1),Pi||(p=gN(d,o.type,o.pendingProps,p),p!==null&&(lu(o,0).serverProps=p)),ur=o,ra=!0,p=Xt,Dl(o.type)?(WC=p,Xt=ko(d.firstChild)):Xt=p),sr(r,o,o.pendingProps.children,s),D0(r,o),r===null&&(o.flags|=4194304),o.child;case 5:return r===null&&xt&&(g=Z(),d=T2(o.type,g.ancestorInfo),p=Xt,(x=!p)||(x=qq(p,o.type,o.pendingProps,ra),x!==null?(o.stateNode=x,Pi||(g=gN(x,o.type,o.pendingProps,g),g!==null&&(lu(o,0).serverProps=g)),ur=o,Xt=ko(x.firstChild),ra=!1,g=!0):g=!1,x=!g),x&&(d&&a0(o,p),wl(o))),de(o),p=o.type,g=o.pendingProps,x=r!==null?r.memoizedProps:null,d=g.children,dw(p,g)?d=null:x!==null&&dw(p,x)&&(o.flags|=32),o.memoizedState!==null&&(p=nS(r,o,JK,null,null,s),Km._currentValue=p),D0(r,o),sr(r,o,d,s),o.child;case 6:return r===null&&xt&&(s=o.pendingProps,r=Z(),d=r.ancestorInfo.current,s=d!=null?Yb(s,d.tag,r.ancestorInfo.implicitRootScope):!0,r=Xt,(d=!r)||(d=Gq(r,o.pendingProps,ra),d!==null?(o.stateNode=d,ur=o,Xt=null,d=!0):d=!1,d=!d),d&&(s&&a0(o,r),wl(o))),null;case 13:return rM(r,o,s);case 4:return F(o,o.stateNode.containerInfo),d=o.pendingProps,r===null?o.child=ku(o,null,d,s):sr(r,o,d,s),o.child;case 11:return W5(r,o,o.type,o.pendingProps,s);case 7:return sr(r,o,o.pendingProps,s),o.child;case 8:return sr(r,o,o.pendingProps.children,s),o.child;case 12:return o.flags|=4,o.flags|=2048,d=o.stateNode,d.effectDuration=-0,d.passiveEffectDuration=-0,sr(r,o,o.pendingProps.children,s),o.child;case 10:return d=o.type,p=o.pendingProps,g=p.value,"value"in p||jO||(jO=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),Cl(o,d,g),sr(r,o,p.children,s),o.child;case 9:return p=o.type._context,d=o.pendingProps.children,typeof d!=="function"&&console.error("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),uu(o),p=rn(p),d=fC(d,p,void 0),o.flags|=1,sr(r,o,d,s),o.child;case 14:return Y5(r,o,o.type,o.pendingProps,s);case 15:return J5(r,o,o.type,o.pendingProps,s);case 19:return aM(r,o,s);case 31:return rq(r,o,s);case 22:return X5(r,o,s,o.pendingProps);case 24:return uu(o),d=rn(Pn),r===null?(p=W2(),p===null&&(p=jt,g=K2(),p.pooledCache=g,du(g),g!==null&&(p.pooledCacheLanes|=s),p=g),o.memoizedState={parent:d,cache:p},J2(o),Cl(o,Pn,p)):((r.lanes&s)!==0&&(X2(r,o),Dh(o,null,null,s),Oh()),p=r.memoizedState,g=o.memoizedState,p.parent!==d?(p={parent:d,cache:d},o.memoizedState=p,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=p),Cl(o,Pn,d)):(d=g.cache,Cl(o,Pn,d),d!==p.cache&&j2(o,[Pn],s,!0))),sr(r,o,o.pendingProps.children,s),o.child;case 29:throw o.pendingProps}throw Error("Unknown unit of work tag ("+o.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function gs(r){r.flags|=4}function FS(r,o,s,d,p){if(o=(r.mode&CW)!==We)o=!1;if(o){if(r.flags|=16777216,(p&335544128)===p)if(r.stateNode.complete)r.flags|=8192;else if(BM())r.flags|=8192;else throw Ru=Ty,hC}else r.flags&=-16777217}function iM(r,o){if(o.type!=="stylesheet"||(o.state.loading&la)!==zu)r.flags&=-16777217;else if(r.flags|=16777216,!LN(o))if(BM())r.flags|=8192;else throw Ru=Ty,hC}function L0(r,o){o!==null&&(r.flags|=4),r.flags&16384&&(o=r.tag!==22?Kd():536870912,r.lanes|=o,Du|=o)}function Bh(r,o){if(!xt)switch(r.tailMode){case"hidden":o=r.tail;for(var s=null;o!==null;)o.alternate!==null&&(s=o),o=o.sibling;s===null?r.tail=null:s.sibling=null;break;case"collapsed":s=r.tail;for(var d=null;s!==null;)s.alternate!==null&&(d=s),s=s.sibling;d===null?o||r.tail===null?r.tail=null:r.tail.sibling=null:d.sibling=null}}function Gt(r){var o=r.alternate!==null&&r.alternate.child===r.child,s=0,d=0;if(o)if((r.mode&st)!==We){for(var{selfBaseDuration:p,child:g}=r;g!==null;)s|=g.lanes|g.childLanes,d|=g.subtreeFlags&65011712,d|=g.flags&65011712,p+=g.treeBaseDuration,g=g.sibling;r.treeBaseDuration=p}else for(p=r.child;p!==null;)s|=p.lanes|p.childLanes,d|=p.subtreeFlags&65011712,d|=p.flags&65011712,p.return=r,p=p.sibling;else if((r.mode&st)!==We){p=r.actualDuration,g=r.selfBaseDuration;for(var x=r.child;x!==null;)s|=x.lanes|x.childLanes,d|=x.subtreeFlags,d|=x.flags,p+=x.actualDuration,g+=x.treeBaseDuration,x=x.sibling;r.actualDuration=p,r.treeBaseDuration=g}else for(p=r.child;p!==null;)s|=p.lanes|p.childLanes,d|=p.subtreeFlags,d|=p.flags,p.return=r,p=p.sibling;return r.subtreeFlags|=d,r.childLanes=s,o}function aq(r,o,s){var d=o.pendingProps;switch(H2(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Gt(o),null;case 1:return Gt(o),null;case 3:if(s=o.stateNode,d=null,r!==null&&(d=r.memoizedState.cache),o.memoizedState.cache!==d&&(o.flags|=2048),ps(Pn,o),Y(o),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),r===null||r.child===null)Jd(o)?(U2(),gs(o)):r===null||r.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,F2());return Gt(o),null;case 26:var{type:p,memoizedState:g}=o;return r===null?(gs(o),g!==null?(Gt(o),iM(o,g)):(Gt(o),FS(o,p,null,d,s))):g?g!==r.memoizedState?(gs(o),Gt(o),iM(o,g)):(Gt(o),o.flags&=-16777217):(r=r.memoizedProps,r!==d&&gs(o),Gt(o),FS(o,p,r,d,s)),null;case 27:if(K(o),s=I(Ll.current),p=o.type,r!==null&&o.stateNode!=null)r.memoizedProps!==d&&gs(o);else{if(!d){if(o.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return Gt(o),null}r=Z(),Jd(o)?WA(o,r):(r=kN(p,d,s,r,!0),o.stateNode=r,gs(o))}return Gt(o),null;case 5:if(K(o),p=o.type,r!==null&&o.stateNode!=null)r.memoizedProps!==d&&gs(o);else{if(!d){if(o.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return Gt(o),null}var x=Z();if(Jd(o))WA(o,x);else{switch(g=I(Ll.current),T2(p,x.ancestorInfo),x=x.context,g=j0(g),x){case Gf:g=g.createElementNS(bf,p);break;case Qy:g=g.createElementNS(sy,p);break;default:switch(p){case"svg":g=g.createElementNS(bf,p);break;case"math":g=g.createElementNS(sy,p);break;case"script":g=g.createElement("div"),g.innerHTML="<script></script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof d.is==="string"?g.createElement("select",{is:d.is}):g.createElement("select"),d.multiple?g.multiple=!0:d.size&&(g.size=d.size);break;default:g=typeof d.is==="string"?g.createElement(p,{is:d.is}):g.createElement(p),p.indexOf("-")===-1&&(p!==p.toLowerCase()&&console.error("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",p),Object.prototype.toString.call(g)!=="[object HTMLUnknownElement]"||Ia.call(h6,p)||(h6[p]=!0,console.error("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",p)))}}g[cr]=o,g[Ir]=d;e:for(x=o.child;x!==null;){if(x.tag===5||x.tag===6)g.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===o)break e;for(;x.sibling===null;){if(x.return===null||x.return===o)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}o.stateNode=g;e:switch(lr(g,p,d),p){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&gs(o)}}return Gt(o),FS(o,o.type,r===null?null:r.memoizedProps,o.pendingProps,s),null;case 6:if(r&&o.stateNode!=null)r.memoizedProps!==d&&gs(o);else{if(typeof d!=="string"&&o.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");if(r=I(Ll.current),s=Z(),Jd(o)){if(r=o.stateNode,s=o.memoizedProps,p=!Pi,d=null,g=ur,g!==null)switch(g.tag){case 3:p&&(p=TN(r,s,d),p!==null&&(lu(o,0).serverProps=p));break;case 27:case 5:d=g.memoizedProps,p&&(p=TN(r,s,d),p!==null&&(lu(o,0).serverProps=p))}r[cr]=o,r=r.nodeValue===s||d!==null&&d.suppressHydrationWarning===!0||dN(r.nodeValue,s)?!0:!1,r||wl(o,!0)}else p=s.ancestorInfo.current,p!=null&&Yb(d,p.tag,s.ancestorInfo.implicitRootScope),r=j0(r).createTextNode(d),r[cr]=o,o.stateNode=r}return Gt(o),null;case 31:if(s=o.memoizedState,r===null||r.memoizedState!==null){if(d=Jd(o),s!==null){if(r===null){if(!d)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(r=o.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error("Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue.");r[cr]=o,Gt(o),(o.mode&st)!==We&&s!==null&&(r=o.child,r!==null&&(o.treeBaseDuration-=r.treeBaseDuration))}else U2(),cu(),(o.flags&128)===0&&(s=o.memoizedState=null),o.flags|=4,Gt(o),(o.mode&st)!==We&&s!==null&&(r=o.child,r!==null&&(o.treeBaseDuration-=r.treeBaseDuration));r=!1}else s=F2(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=s),r=!0;if(!r){if(o.flags&256)return To(o),o;return To(o),null}if((o.flags&128)!==0)throw Error("Client rendering an Activity suspended it again. This is a bug in React.")}return Gt(o),null;case 13:if(d=o.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(p=d,g=Jd(o),p!==null&&p.dehydrated!==null){if(r===null){if(!g)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(g=o.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");g[cr]=o,Gt(o),(o.mode&st)!==We&&p!==null&&(p=o.child,p!==null&&(o.treeBaseDuration-=p.treeBaseDuration))}else U2(),cu(),(o.flags&128)===0&&(p=o.memoizedState=null),o.flags|=4,Gt(o),(o.mode&st)!==We&&p!==null&&(p=o.child,p!==null&&(o.treeBaseDuration-=p.treeBaseDuration));p=!1}else p=F2(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=p),p=!0;if(!p){if(o.flags&256)return To(o),o;return To(o),null}}if(To(o),(o.flags&128)!==0)return o.lanes=s,(o.mode&st)!==We&&Ah(o),o;return s=d!==null,r=r!==null&&r.memoizedState!==null,s&&(d=o.child,p=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(p=d.alternate.memoizedState.cachePool.pool),g=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(g=d.memoizedState.cachePool.pool),g!==p&&(d.flags|=2048)),s!==r&&s&&(o.child.flags|=8192),L0(o,o.updateQueue),Gt(o),(o.mode&st)!==We&&s&&(r=o.child,r!==null&&(o.treeBaseDuration-=r.treeBaseDuration)),null;case 4:return Y(o),r===null&&ow(o.stateNode.containerInfo),Gt(o),null;case 10:return ps(o.type,o),Gt(o),null;case 19:if(le(Mn,o),d=o.memoizedState,d===null)return Gt(o),null;if(p=(o.flags&128)!==0,g=d.rendering,g===null)if(p)Bh(d,!1);else{if(dn!==Ns||r!==null&&(r.flags&128)!==0)for(r=o.child;r!==null;){if(g=y0(r),g!==null){o.flags|=128,Bh(d,!1),r=g.updateQueue,o.updateQueue=r,L0(o,r),o.subtreeFlags=0,r=s;for(s=o.child;s!==null;)UA(s,r),s=s.sibling;return se(Mn,Mn.current&Lf|Rm,o),xt&&fs(o,d.treeForkCount),o.child}r=r.sibling}d.tail!==null&&Qn()>zy&&(o.flags|=128,p=!0,Bh(d,!1),o.lanes=4194304)}else{if(!p)if(r=y0(g),r!==null){if(o.flags|=128,p=!0,r=r.updateQueue,o.updateQueue=r,L0(o,r),Bh(d,!0),d.tail===null&&d.tailMode==="hidden"&&!g.alternate&&!xt)return Gt(o),null}else 2*Qn()-d.renderingStartTime>zy&&s!==536870912&&(o.flags|=128,p=!0,Bh(d,!1),o.lanes=4194304);d.isBackwards?(g.sibling=o.child,o.child=g):(r=d.last,r!==null?r.sibling=g:o.child=g,d.last=g)}if(d.tail!==null)return r=d.tail,d.rendering=r,d.tail=r.sibling,d.renderingStartTime=Qn(),r.sibling=null,s=Mn.current,s=p?s&Lf|Rm:s&Lf,se(Mn,s,o),xt&&fs(o,d.treeForkCount),r;return Gt(o),null;case 22:case 23:return To(o),Z2(o),d=o.memoizedState!==null,r!==null?r.memoizedState!==null!==d&&(o.flags|=8192):d&&(o.flags|=8192),d?(s&536870912)!==0&&(o.flags&128)===0&&(Gt(o),o.subtreeFlags&6&&(o.flags|=8192)):Gt(o),s=o.updateQueue,s!==null&&L0(o,s.retryQueue),s=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),d=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),d!==s&&(o.flags|=2048),r!==null&&le(Eu,o),null;case 24:return s=null,r!==null&&(s=r.memoizedState.cache),o.memoizedState.cache!==s&&(o.flags|=2048),ps(Pn,o),Gt(o),null;case 25:return null;case 30:return null}throw Error("Unknown unit of work tag ("+o.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function iq(r,o){switch(H2(o),o.tag){case 1:return r=o.flags,r&65536?(o.flags=r&-65537|128,(o.mode&st)!==We&&Ah(o),o):null;case 3:return ps(Pn,o),Y(o),r=o.flags,(r&65536)!==0&&(r&128)===0?(o.flags=r&-65537|128,o):null;case 26:case 27:case 5:return K(o),null;case 31:if(o.memoizedState!==null){if(To(o),o.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");cu()}return r=o.flags,r&65536?(o.flags=r&-65537|128,(o.mode&st)!==We&&Ah(o),o):null;case 13:if(To(o),r=o.memoizedState,r!==null&&r.dehydrated!==null){if(o.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");cu()}return r=o.flags,r&65536?(o.flags=r&-65537|128,(o.mode&st)!==We&&Ah(o),o):null;case 19:return le(Mn,o),null;case 4:return Y(o),null;case 10:return ps(o.type,o),null;case 22:case 23:return To(o),Z2(o),r!==null&&le(Eu,o),r=o.flags,r&65536?(o.flags=r&-65537|128,(o.mode&st)!==We&&Ah(o),o):null;case 24:return ps(Pn,o),null;case 25:return null;default:return null}}function sM(r,o){switch(H2(o),o.tag){case 3:ps(Pn,o),Y(o);break;case 26:case 27:case 5:K(o);break;case 4:Y(o);break;case 31:o.memoizedState!==null&&To(o);break;case 13:To(o);break;case 19:le(Mn,o);break;case 10:ps(o.type,o);break;case 22:case 23:To(o),Z2(o),r!==null&&le(Eu,o);break;case 24:ps(Pn,o)}}function $i(r){return(r.mode&st)!==We}function lM(r,o){$i(r)?(xi(),zh(o,r),vi()):zh(o,r)}function US(r,o,s){$i(r)?(xi(),nf(s,r,o),vi()):nf(s,r,o)}function zh(r,o){try{var s=o.updateQueue,d=s!==null?s.lastEffect:null;if(d!==null){var p=d.next;s=p;do{if((s.tag&r)===r&&(d=void 0,(r&Fr)!==ky&&(jf=!0),d=he(o,AW,s),(r&Fr)!==ky&&(jf=!1),d!==void 0&&typeof d!=="function")){var g=void 0;g=(s.tag&Po)!==0?"useLayoutEffect":(s.tag&Fr)!==0?"useInsertionEffect":"useEffect";var x=void 0;x=d===null?" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof d.then==="function"?`
146
+
147
+ It looks like you wrote `+g+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
148
+
149
+ `+g+`(() => {
150
+ async function fetchData() {
151
+ // You can await here
152
+ const response = await MyAPI.getData(someId);
153
+ // ...
154
+ }
155
+ fetchData();
156
+ }, [someId]); // Or [] if effect doesn't need props or state
157
+
158
+ Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching`:" You returned: "+d,he(o,function(w,T){console.error("%s must not return anything besides a function, which is used for clean-up.%s",w,T)},g,x)}s=s.next}while(s!==p)}}catch(w){_t(o,o.return,w)}}function nf(r,o,s){try{var d=o.updateQueue,p=d!==null?d.lastEffect:null;if(p!==null){var g=p.next;d=g;do{if((d.tag&r)===r){var x=d.inst,w=x.destroy;w!==void 0&&(x.destroy=void 0,(r&Fr)!==ky&&(jf=!0),p=o,he(p,MW,p,s,w),(r&Fr)!==ky&&(jf=!1))}d=d.next}while(d!==g)}}catch(T){_t(o,o.return,T)}}function cM(r,o){$i(r)?(xi(),zh(o,r),vi()):zh(o,r)}function VS(r,o,s){$i(r)?(xi(),nf(s,r,o),vi()):nf(s,r,o)}function uM(r){var o=r.updateQueue;if(o!==null){var s=r.stateNode;r.type.defaultProps||"ref"in r.memoizedProps||zf||(s.props!==r.memoizedProps&&console.error("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",J(r)||"instance"),s.state!==r.memoizedState&&console.error("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",J(r)||"instance"));try{he(r,f5,o,s)}catch(d){_t(r,r.return,d)}}}function sq(r,o,s){return r.getSnapshotBeforeUpdate(o,s)}function lq(r,o){var{memoizedProps:s,memoizedState:d}=o;o=r.stateNode,r.type.defaultProps||"ref"in r.memoizedProps||zf||(o.props!==r.memoizedProps&&console.error("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",J(r)||"instance"),o.state!==r.memoizedState&&console.error("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",J(r)||"instance"));try{var p=mu(r.type,s),g=he(r,sq,o,p,d);s=KO,g!==void 0||s.has(r.type)||(s.add(r.type),he(r,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",J(r))})),o.__reactInternalSnapshotBeforeUpdate=g}catch(x){_t(r,r.return,x)}}function dM(r,o,s){s.props=mu(r.type,r.memoizedProps),s.state=r.memoizedState,$i(r)?(xi(),he(r,uO,r,o,s),vi()):he(r,uO,r,o,s)}function cq(r){var o=r.ref;if(o!==null){switch(r.tag){case 26:case 27:case 5:var s=r.stateNode;break;case 30:s=r.stateNode;break;default:s=r.stateNode}if(typeof o==="function")if($i(r))try{xi(),r.refCleanup=o(s)}finally{vi()}else r.refCleanup=o(s);else typeof o==="string"?console.error("String refs are no longer supported."):o.hasOwnProperty("current")||console.error("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",J(r)),o.current=s}}function Hh(r,o){try{he(r,cq,r)}catch(s){_t(r,o,s)}}function Si(r,o){var{ref:s,refCleanup:d}=r;if(s!==null)if(typeof d==="function")try{if($i(r))try{xi(),he(r,d)}finally{vi(r)}else he(r,d)}catch(p){_t(r,o,p)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof s==="function")try{if($i(r))try{xi(),he(r,s,null)}finally{vi(r)}else he(r,s,null)}catch(p){_t(r,o,p)}else s.current=null}function fM(r,o,s,d){var p=r.memoizedProps,g=p.id,x=p.onCommit;p=p.onRender,o=o===null?"mount":"update",Sy&&(o="nested-update"),typeof p==="function"&&p(g,o,r.actualDuration,r.treeBaseDuration,r.actualStartTime,s),typeof x==="function"&&x(g,o,d,s)}function uq(r,o,s,d){var p=r.memoizedProps;r=p.id,p=p.onPostCommit,o=o===null?"mount":"update",Sy&&(o="nested-update"),typeof p==="function"&&p(r,o,d,s)}function pM(r){var{type:o,memoizedProps:s,stateNode:d}=r;try{he(r,Pq,d,o,s,r)}catch(p){_t(r,r.return,p)}}function jS(r,o,s){try{he(r,_q,r.stateNode,r.type,s,o,r)}catch(d){_t(r,r.return,d)}}function hM(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&Dl(r.type)||r.tag===4}function KS(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||hM(r.return))return null;r=r.return}r.sibling.return=r.return;for(r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&Dl(r.type))continue e;if(r.flags&2)continue e;if(r.child===null||r.tag===4)continue e;else r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function qS(r,o,s){var d=r.tag;if(d===5||d===6)r=r.stateNode,o?($N(s),(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(r,o)):($N(s),o=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,o.appendChild(r),s=s._reactRootContainer,s!==null&&s!==void 0||o.onclick!==null||(o.onclick=us));else if(d!==4&&(d===27&&Dl(r.type)&&(s=r.stateNode,o=null),r=r.child,r!==null))for(qS(r,o,s),r=r.sibling;r!==null;)qS(r,o,s),r=r.sibling}function _0(r,o,s){var d=r.tag;if(d===5||d===6)r=r.stateNode,o?s.insertBefore(r,o):s.appendChild(r);else if(d!==4&&(d===27&&Dl(r.type)&&(s=r.stateNode),r=r.child,r!==null))for(_0(r,o,s),r=r.sibling;r!==null;)_0(r,o,s),r=r.sibling}function dq(r){for(var o,s=r.return;s!==null;){if(hM(s)){o=s;break}s=s.return}if(o==null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");switch(o.tag){case 27:o=o.stateNode,s=KS(r),_0(r,s,o);break;case 5:s=o.stateNode,o.flags&32&&(xN(s),o.flags&=-33),o=KS(r),_0(r,o,s);break;case 3:case 4:o=o.stateNode.containerInfo,s=KS(r),qS(r,s,o);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function mM(r){var{stateNode:o,memoizedProps:s}=r;try{he(r,Qq,r.type,s,o,r)}catch(d){_t(r,r.return,d)}}function gM(r,o){return o.tag===31?(o=o.memoizedState,r.memoizedState!==null&&o===null):o.tag===13?(r=r.memoizedState,o=o.memoizedState,r!==null&&r.dehydrated!==null&&(o===null||o.dehydrated===null)):o.tag===3?r.memoizedState.isDehydrated&&(o.flags&256)===0:!1}function fq(r,o){if(r=r.containerInfo,KC=nv,r=OA(r),A2(r)){if("selectionStart"in r)var s={start:r.selectionStart,end:r.selectionEnd};else e:{s=(s=r.ownerDocument)&&s.defaultView||window;var d=s.getSelection&&s.getSelection();if(d&&d.rangeCount!==0){s=d.anchorNode;var{anchorOffset:p,focusNode:g}=d;d=d.focusOffset;try{s.nodeType,g.nodeType}catch(xe){s=null;break e}var x=0,w=-1,T=-1,A=0,G=0,W=r,B=null;t:for(;;){for(var te;;){if(W!==s||p!==0&&W.nodeType!==3||(w=x+p),W!==g||d!==0&&W.nodeType!==3||(T=x+d),W.nodeType===3&&(x+=W.nodeValue.length),(te=W.firstChild)===null)break;B=W,W=te}for(;;){if(W===r)break t;if(B===s&&++A===p&&(w=x),B===g&&++G===d&&(T=x),(te=W.nextSibling)!==null)break;W=B,B=W.parentNode}W=te}s=w===-1||T===-1?null:{start:w,end:T}}else s=null}s=s||{start:0,end:0}}else s=null;qC={focusedElem:r,selectionRange:s},nv=!1;for(er=o;er!==null;)if(o=er,r=o.child,(o.subtreeFlags&1028)!==0&&r!==null)r.return=o,er=r;else for(;er!==null;){switch(r=o=er,s=r.alternate,p=r.flags,r.tag){case 0:if((p&4)!==0&&(r=r.updateQueue,r=r!==null?r.events:null,r!==null))for(s=0;s<r.length;s++)p=r[s],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:(p&1024)!==0&&s!==null&&lq(r,s);break;case 3:if((p&1024)!==0){if(r=r.stateNode.containerInfo,s=r.nodeType,s===9)fw(r);else if(s===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":fw(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((p&1024)!==0)throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}if(r=o.sibling,r!==null){r.return=o.return,er=r;break}er=o.return}}function bM(r,o,s){var d=Co(),p=mi(),g=bi(),x=yi(),w=s.flags;switch(s.tag){case 0:case 11:case 15:wi(r,s),w&4&&lM(s,Po|ia);break;case 1:if(wi(r,s),w&4)if(r=s.stateNode,o===null)s.type.defaultProps||"ref"in s.memoizedProps||zf||(r.props!==s.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",J(s)||"instance"),r.state!==s.memoizedState&&console.error("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",J(s)||"instance")),$i(s)?(xi(),he(s,pC,s,r),vi()):he(s,pC,s,r);else{var T=mu(s.type,o.memoizedProps);o=o.memoizedState,s.type.defaultProps||"ref"in s.memoizedProps||zf||(r.props!==s.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",J(s)||"instance"),r.state!==s.memoizedState&&console.error("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",J(s)||"instance")),$i(s)?(xi(),he(s,sO,s,r,T,o,r.__reactInternalSnapshotBeforeUpdate),vi()):he(s,sO,s,r,T,o,r.__reactInternalSnapshotBeforeUpdate)}w&64&&uM(s),w&512&&Hh(s,s.return);break;case 3:if(o=hs(),wi(r,s),w&64&&(w=s.updateQueue,w!==null)){if(T=null,s.child!==null)switch(s.child.tag){case 27:case 5:T=s.child.stateNode;break;case 1:T=s.child.stateNode}try{he(s,f5,w,T)}catch(G){_t(s,s.return,G)}}r.effectDuration+=c0(o);break;case 27:o===null&&w&4&&mM(s);case 26:case 5:if(wi(r,s),o===null){if(w&4)pM(s);else if(w&64){r=s.type,o=s.memoizedProps,T=s.stateNode;try{he(s,Lq,T,r,o,s)}catch(G){_t(s,s.return,G)}}}w&512&&Hh(s,s.return);break;case 12:if(w&4){w=hs(),wi(r,s),r=s.stateNode,r.effectDuration+=kh(w);try{he(s,fM,s,o,Vl,r.effectDuration)}catch(G){_t(s,s.return,G)}}else wi(r,s);break;case 31:wi(r,s),w&4&&xM(r,s);break;case 13:wi(r,s),w&4&&$M(r,s),w&64&&(r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(w=$q.bind(null,s),Wq(r,w))));break;case 22:if(w=s.memoizedState!==null||Ms,!w){o=o!==null&&o.memoizedState!==null||Bn,T=Ms;var A=Bn;Ms=w,(Bn=o)&&!A?(Ci(r,s,(s.subtreeFlags&8772)!==0),(s.mode&st)!==We&&0<=Ke&&0<=Ge&&0.05<Ge-Ke&&Zb(s,Ke,Ge)):wi(r,s),Ms=T,Bn=A}break;case 30:break;default:wi(r,s)}(s.mode&st)!==We&&0<=Ke&&0<=Ge&&((hn||0.05<un)&&pi(s,Ke,Ge,un,on),s.alternate===null&&s.return!==null&&s.return.alternate!==null&&0.05<Ge-Ke&&(gM(s.return.alternate,s.return)||fi(s,Ke,Ge,"Mount"))),Eo(d),gi(p),on=g,hn=x}function yM(r){var o=r.alternate;o!==null&&(r.alternate=null,yM(o)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(o=r.stateNode,o!==null&&Ce(o)),r.stateNode=null,r._debugOwner=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function bs(r,o,s){for(s=s.child;s!==null;)vM(r,o,s),s=s.sibling}function vM(r,o,s){if(Er&&typeof Er.onCommitFiberUnmount==="function")try{Er.onCommitFiberUnmount(mf,s)}catch(A){Mi||(Mi=!0,console.error("React instrumentation encountered an error: %o",A))}var d=Co(),p=mi(),g=bi(),x=yi();switch(s.tag){case 26:Bn||Si(s,o),bs(r,o,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(r=s.stateNode,r.parentNode.removeChild(r));break;case 27:Bn||Si(s,o);var w=zn,T=oo;Dl(s.type)&&(zn=s.stateNode,oo=!1),bs(r,o,s),he(s,Yh,s.stateNode),zn=w,oo=T;break;case 5:Bn||Si(s,o);case 6:if(w=zn,T=oo,zn=null,bs(r,o,s),zn=w,oo=T,zn!==null)if(oo)try{he(s,zq,zn,s.stateNode)}catch(A){_t(s,o,A)}else try{he(s,Bq,zn,s.stateNode)}catch(A){_t(s,o,A)}break;case 18:zn!==null&&(oo?(r=zn,SN(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,s.stateNode),df(r)):SN(zn,s.stateNode));break;case 4:w=zn,T=oo,zn=s.stateNode.containerInfo,oo=!0,bs(r,o,s),zn=w,oo=T;break;case 0:case 11:case 14:case 15:nf(Fr,s,o),Bn||US(s,o,Po),bs(r,o,s);break;case 1:Bn||(Si(s,o),w=s.stateNode,typeof w.componentWillUnmount==="function"&&dM(s,o,w)),bs(r,o,s);break;case 21:bs(r,o,s);break;case 22:Bn=(w=Bn)||s.memoizedState!==null,bs(r,o,s),Bn=w;break;default:bs(r,o,s)}(s.mode&st)!==We&&0<=Ke&&0<=Ge&&(hn||0.05<un)&&pi(s,Ke,Ge,un,on),Eo(d),gi(p),on=g,hn=x}function xM(r,o){if(o.memoizedState===null&&(r=o.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{he(o,Jq,r)}catch(s){_t(o,o.return,s)}}}function $M(r,o){if(o.memoizedState===null&&(r=o.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{he(o,Xq,r)}catch(s){_t(o,o.return,s)}}function pq(r){switch(r.tag){case 31:case 13:case 19:var o=r.stateNode;return o===null&&(o=r.stateNode=new qO),o;case 22:return r=r.stateNode,o=r._retryCache,o===null&&(o=r._retryCache=new qO),o;default:throw Error("Unexpected Suspense handler tag ("+r.tag+"). This is a bug in React.")}}function I0(r,o){var s=pq(r);o.forEach(function(d){if(!s.has(d)){if(s.add(d),Ni)if(Hf!==null&&Ff!==null)jh(Ff,Hf);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");var p=Sq.bind(null,r,d);d.then(p,p)}})}function no(r,o){var s=o.deletions;if(s!==null)for(var d=0;d<s.length;d++){var p=r,g=o,x=s[d],w=Co(),T=g;e:for(;T!==null;){switch(T.tag){case 27:if(Dl(T.type)){zn=T.stateNode,oo=!1;break e}break;case 5:zn=T.stateNode,oo=!1;break e;case 3:case 4:zn=T.stateNode.containerInfo,oo=!0;break e}T=T.return}if(zn===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");vM(p,g,x),zn=null,oo=!1,(x.mode&st)!==We&&0<=Ke&&0<=Ge&&0.05<Ge-Ke&&fi(x,Ke,Ge,"Unmount"),Eo(w),p=x,g=p.alternate,g!==null&&(g.return=null),p.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)SM(o,r),o=o.sibling}function SM(r,o){var s=Co(),d=mi(),p=bi(),g=yi(),x=r.alternate,w=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:no(o,r),ro(r),w&4&&(nf(Fr|ia,r,r.return),zh(Fr|ia,r),US(r,r.return,Po|ia));break;case 1:if(no(o,r),ro(r),w&512&&(Bn||x===null||Si(x,x.return)),w&64&&Ms&&(w=r.updateQueue,w!==null&&(x=w.callbacks,x!==null))){var T=w.shared.hiddenCallbacks;w.shared.hiddenCallbacks=T===null?x:T.concat(x)}break;case 26:if(T=Ua,no(o,r),ro(r),w&512&&(Bn||x===null||Si(x,x.return)),w&4){var A=x!==null?x.memoizedState:null;if(w=r.memoizedState,x===null)if(w===null)if(r.stateNode===null){e:{w=r.type,x=r.memoizedProps,T=T.ownerDocument||T;t:switch(w){case"title":if(A=T.getElementsByTagName("title")[0],!A||A[nm]||A[cr]||A.namespaceURI===bf||A.hasAttribute("itemprop"))A=T.createElement(w),T.head.insertBefore(A,T.querySelector("head > title"));lr(A,w,x),A[cr]=r,je(A),w=A;break e;case"link":var G=DN("link","href",T).get(w+(x.href||""));if(G){for(var W=0;W<G.length;W++)if(A=G[W],A.getAttribute("href")===(x.href==null||x.href===""?null:x.href)&&A.getAttribute("rel")===(x.rel==null?null:x.rel)&&A.getAttribute("title")===(x.title==null?null:x.title)&&A.getAttribute("crossorigin")===(x.crossOrigin==null?null:x.crossOrigin)){G.splice(W,1);break t}}A=T.createElement(w),lr(A,w,x),T.head.appendChild(A);break;case"meta":if(G=DN("meta","content",T).get(w+(x.content||""))){for(W=0;W<G.length;W++)if(A=G[W],Ie(x.content,"content"),A.getAttribute("content")===(x.content==null?null:""+x.content)&&A.getAttribute("name")===(x.name==null?null:x.name)&&A.getAttribute("property")===(x.property==null?null:x.property)&&A.getAttribute("http-equiv")===(x.httpEquiv==null?null:x.httpEquiv)&&A.getAttribute("charset")===(x.charSet==null?null:x.charSet)){G.splice(W,1);break t}}A=T.createElement(w),lr(A,w,x),T.head.appendChild(A);break;default:throw Error('getNodesForType encountered a type it did not expect: "'+w+'". This is a bug in React.')}A[cr]=r,je(A),w=A}r.stateNode=w}else PN(T,r.type,r.stateNode);else r.stateNode=ON(T,w,r.memoizedProps);else A!==w?(A===null?x.stateNode!==null&&(x=x.stateNode,x.parentNode.removeChild(x)):A.count--,w===null?PN(T,r.type,r.stateNode):ON(T,w,r.memoizedProps)):w===null&&r.stateNode!==null&&jS(r,r.memoizedProps,x.memoizedProps)}break;case 27:no(o,r),ro(r),w&512&&(Bn||x===null||Si(x,x.return)),x!==null&&w&4&&jS(r,r.memoizedProps,x.memoizedProps);break;case 5:if(no(o,r),ro(r),w&512&&(Bn||x===null||Si(x,x.return)),r.flags&32){T=r.stateNode;try{he(r,xN,T)}catch(ke){_t(r,r.return,ke)}}w&4&&r.stateNode!=null&&(T=r.memoizedProps,jS(r,T,x!==null?x.memoizedProps:T)),w&1024&&(TC=!0,r.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."));break;case 6:if(no(o,r),ro(r),w&4){if(r.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");w=r.memoizedProps,x=x!==null?x.memoizedProps:w,T=r.stateNode;try{he(r,Iq,T,x,w)}catch(ke){_t(r,r.return,ke)}}break;case 3:if(T=hs(),Zy=null,A=Ua,Ua=K0(o.containerInfo),no(o,r),Ua=A,ro(r),w&4&&x!==null&&x.memoizedState.isDehydrated)try{he(r,Yq,o.containerInfo)}catch(ke){_t(r,r.return,ke)}TC&&(TC=!1,wM(r)),o.effectDuration+=c0(T);break;case 4:w=Ua,Ua=K0(r.stateNode.containerInfo),no(o,r),ro(r),Ua=w;break;case 12:w=hs(),no(o,r),ro(r),r.stateNode.effectDuration+=kh(w);break;case 31:no(o,r),ro(r),w&4&&(w=r.updateQueue,w!==null&&(r.updateQueue=null,I0(r,w)));break;case 13:no(o,r),ro(r),r.child.flags&8192&&r.memoizedState!==null!==(x!==null&&x.memoizedState!==null)&&(By=Qn()),w&4&&(w=r.updateQueue,w!==null&&(r.updateQueue=null,I0(r,w)));break;case 22:T=r.memoizedState!==null;var B=x!==null&&x.memoizedState!==null,te=Ms,xe=Bn;if(Ms=te||T,Bn=xe||B,no(o,r),Bn=xe,Ms=te,B&&!T&&!te&&!xe&&(r.mode&st)!==We&&0<=Ke&&0<=Ge&&0.05<Ge-Ke&&Zb(r,Ke,Ge),ro(r),w&8192)e:for(o=r.stateNode,o._visibility=T?o._visibility&~dm:o._visibility|dm,!T||x===null||B||Ms||Bn||(gu(r),(r.mode&st)!==We&&0<=Ke&&0<=Ge&&0.05<Ge-Ke&&fi(r,Ke,Ge,"Disconnect")),x=null,o=r;;){if(o.tag===5||o.tag===26){if(x===null){B=x=o;try{A=B.stateNode,T?he(B,Fq,A):he(B,jq,B.stateNode,B.memoizedProps)}catch(ke){_t(B,B.return,ke)}}}else if(o.tag===6){if(x===null){B=o;try{G=B.stateNode,T?he(B,Uq,G):he(B,Kq,G,B.memoizedProps)}catch(ke){_t(B,B.return,ke)}}}else if(o.tag===18){if(x===null){B=o;try{W=B.stateNode,T?he(B,Hq,W):he(B,Vq,B.stateNode)}catch(ke){_t(B,B.return,ke)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===r)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===r)break e;for(;o.sibling===null;){if(o.return===null||o.return===r)break e;x===o&&(x=null),o=o.return}x===o&&(x=null),o.sibling.return=o.return,o=o.sibling}w&4&&(w=r.updateQueue,w!==null&&(x=w.retryQueue,x!==null&&(w.retryQueue=null,I0(r,x))));break;case 19:no(o,r),ro(r),w&4&&(w=r.updateQueue,w!==null&&(r.updateQueue=null,I0(r,w)));break;case 30:break;case 21:break;default:no(o,r),ro(r)}(r.mode&st)!==We&&0<=Ke&&0<=Ge&&((hn||0.05<un)&&pi(r,Ke,Ge,un,on),r.alternate===null&&r.return!==null&&r.return.alternate!==null&&0.05<Ge-Ke&&(gM(r.return.alternate,r.return)||fi(r,Ke,Ge,"Mount"))),Eo(s),gi(d),on=p,hn=g}function ro(r){var o=r.flags;if(o&2){try{he(r,dq,r)}catch(s){_t(r,r.return,s)}r.flags&=-3}o&4096&&(r.flags&=-4097)}function wM(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var o=r;wM(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),r=r.sibling}}function wi(r,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)bM(r,o.alternate,o),o=o.sibling}function CM(r){var o=Co(),s=mi(),d=bi(),p=yi();switch(r.tag){case 0:case 11:case 14:case 15:US(r,r.return,Po),gu(r);break;case 1:Si(r,r.return);var g=r.stateNode;typeof g.componentWillUnmount==="function"&&dM(r,r.return,g),gu(r);break;case 27:he(r,Yh,r.stateNode);case 26:case 5:Si(r,r.return),gu(r);break;case 22:r.memoizedState===null&&gu(r);break;case 30:gu(r);break;default:gu(r)}(r.mode&st)!==We&&0<=Ke&&0<=Ge&&(hn||0.05<un)&&pi(r,Ke,Ge,un,on),Eo(o),gi(s),on=d,hn=p}function gu(r){for(r=r.child;r!==null;)CM(r),r=r.sibling}function EM(r,o,s,d){var p=Co(),g=mi(),x=bi(),w=yi(),T=s.flags;switch(s.tag){case 0:case 11:case 15:Ci(r,s,d),lM(s,Po);break;case 1:if(Ci(r,s,d),o=s.stateNode,typeof o.componentDidMount==="function"&&he(s,pC,s,o),o=s.updateQueue,o!==null){r=s.stateNode;try{he(s,YK,o,r)}catch(A){_t(s,s.return,A)}}d&&T&64&&uM(s),Hh(s,s.return);break;case 27:mM(s);case 26:case 5:Ci(r,s,d),d&&o===null&&T&4&&pM(s),Hh(s,s.return);break;case 12:if(d&&T&4){T=hs(),Ci(r,s,d),d=s.stateNode,d.effectDuration+=kh(T);try{he(s,fM,s,o,Vl,d.effectDuration)}catch(A){_t(s,s.return,A)}}else Ci(r,s,d);break;case 31:Ci(r,s,d),d&&T&4&&xM(r,s);break;case 13:Ci(r,s,d),d&&T&4&&$M(r,s);break;case 22:s.memoizedState===null&&Ci(r,s,d),Hh(s,s.return);break;case 30:break;default:Ci(r,s,d)}(s.mode&st)!==We&&0<=Ke&&0<=Ge&&(hn||0.05<un)&&pi(s,Ke,Ge,un,on),Eo(p),gi(g),on=x,hn=w}function Ci(r,o,s){s=s&&(o.subtreeFlags&8772)!==0;for(o=o.child;o!==null;)EM(r,o.alternate,o,s),o=o.sibling}function GS(r,o){var s=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),r=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(r=o.memoizedState.cachePool.pool),r!==s&&(r!=null&&du(r),s!=null&&Rh(s))}function WS(r,o){r=null,o.alternate!==null&&(r=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==r&&(du(o),r!=null&&Rh(r))}function _a(r,o,s,d,p){if(o.subtreeFlags&10256||o.actualDuration!==0&&(o.alternate===null||o.alternate.child!==o.child))for(o=o.child;o!==null;){var g=o.sibling;TM(r,o,s,d,g!==null?g.actualStartTime:p),o=g}}function TM(r,o,s,d,p){var g=Co(),x=mi(),w=bi(),T=yi(),A=zl,G=o.flags;switch(o.tag){case 0:case 11:case 15:(o.mode&st)!==We&&0<o.actualStartTime&&(o.flags&1)!==0&&e0(o,o.actualStartTime,p,Gn,s),_a(r,o,s,d,p),G&2048&&cM(o,Ur|ia);break;case 1:(o.mode&st)!==We&&0<o.actualStartTime&&((o.flags&128)!==0?N2(o,o.actualStartTime,p,[]):(o.flags&1)!==0&&e0(o,o.actualStartTime,p,Gn,s)),_a(r,o,s,d,p);break;case 3:var W=hs(),B=Gn;Gn=o.alternate!==null&&o.alternate.memoizedState.isDehydrated&&(o.flags&256)===0,_a(r,o,s,d,p),Gn=B,G&2048&&(s=null,o.alternate!==null&&(s=o.alternate.memoizedState.cache),d=o.memoizedState.cache,d!==s&&(du(d),s!=null&&Rh(s))),r.passiveEffectDuration+=c0(W);break;case 12:if(G&2048){G=hs(),_a(r,o,s,d,p),r=o.stateNode,r.passiveEffectDuration+=kh(G);try{he(o,uq,o,o.alternate,Vl,r.passiveEffectDuration)}catch(te){_t(o,o.return,te)}}else _a(r,o,s,d,p);break;case 31:G=Gn,W=o.alternate!==null?o.alternate.memoizedState:null,B=o.memoizedState,W!==null&&B===null?(B=o.deletions,B!==null&&0<B.length&&B[0].tag===18?(Gn=!1,W=W.hydrationErrors,W!==null&&N2(o,o.actualStartTime,p,W)):Gn=!0):Gn=!1,_a(r,o,s,d,p),Gn=G;break;case 13:G=Gn,W=o.alternate!==null?o.alternate.memoizedState:null,B=o.memoizedState,W===null||W.dehydrated===null||B!==null&&B.dehydrated!==null?Gn=!1:(B=o.deletions,B!==null&&0<B.length&&B[0].tag===18?(Gn=!1,W=W.hydrationErrors,W!==null&&N2(o,o.actualStartTime,p,W)):Gn=!0),_a(r,o,s,d,p),Gn=G;break;case 23:break;case 22:B=o.stateNode,W=o.alternate,o.memoizedState!==null?B._visibility&xs?_a(r,o,s,d,p):Fh(r,o,s,d,p):B._visibility&xs?_a(r,o,s,d,p):(B._visibility|=xs,rf(r,o,s,d,(o.subtreeFlags&10256)!==0||o.actualDuration!==0&&(o.alternate===null||o.alternate.child!==o.child),p),(o.mode&st)===We||Gn||(r=o.actualStartTime,0<=r&&0.05<p-r&&Zb(o,r,p),0<=Ke&&0<=Ge&&0.05<Ge-Ke&&Zb(o,Ke,Ge))),G&2048&&GS(W,o);break;case 24:_a(r,o,s,d,p),G&2048&&WS(o.alternate,o);break;default:_a(r,o,s,d,p)}if((o.mode&st)!==We){if(r=!Gn&&o.alternate===null&&o.return!==null&&o.return.alternate!==null)s=o.actualStartTime,0<=s&&0.05<p-s&&fi(o,s,p,"Mount");0<=Ke&&0<=Ge&&((hn||0.05<un)&&pi(o,Ke,Ge,un,on),r&&0.05<Ge-Ke&&fi(o,Ke,Ge,"Mount"))}Eo(g),gi(x),on=w,hn=T,zl=A}function rf(r,o,s,d,p,g){p=p&&((o.subtreeFlags&10256)!==0||o.actualDuration!==0&&(o.alternate===null||o.alternate.child!==o.child));for(o=o.child;o!==null;){var x=o.sibling;RM(r,o,s,d,p,x!==null?x.actualStartTime:g),o=x}}function RM(r,o,s,d,p,g){var x=Co(),w=mi(),T=bi(),A=yi(),G=zl;p&&(o.mode&st)!==We&&0<o.actualStartTime&&(o.flags&1)!==0&&e0(o,o.actualStartTime,g,Gn,s);var W=o.flags;switch(o.tag){case 0:case 11:case 15:rf(r,o,s,d,p,g),cM(o,Ur);break;case 23:break;case 22:var B=o.stateNode;o.memoizedState!==null?B._visibility&xs?rf(r,o,s,d,p,g):Fh(r,o,s,d,g):(B._visibility|=xs,rf(r,o,s,d,p,g)),p&&W&2048&&GS(o.alternate,o);break;case 24:rf(r,o,s,d,p,g),p&&W&2048&&WS(o.alternate,o);break;default:rf(r,o,s,d,p,g)}(o.mode&st)!==We&&0<=Ke&&0<=Ge&&(hn||0.05<un)&&pi(o,Ke,Ge,un,on),Eo(x),gi(w),on=T,hn=A,zl=G}function Fh(r,o,s,d,p){if(o.subtreeFlags&10256||o.actualDuration!==0&&(o.alternate===null||o.alternate.child!==o.child))for(var g=o.child;g!==null;){o=g.sibling;var x=r,w=s,T=d,A=o!==null?o.actualStartTime:p,G=zl;(g.mode&st)!==We&&0<g.actualStartTime&&(g.flags&1)!==0&&e0(g,g.actualStartTime,A,Gn,w);var W=g.flags;switch(g.tag){case 22:Fh(x,g,w,T,A),W&2048&&GS(g.alternate,g);break;case 24:Fh(x,g,w,T,A),W&2048&&WS(g.alternate,g);break;default:Fh(x,g,w,T,A)}zl=G,g=o}}function of(r,o,s){if(r.subtreeFlags&Nm)for(r=r.child;r!==null;)kM(r,o,s),r=r.sibling}function kM(r,o,s){switch(r.tag){case 26:of(r,o,s),r.flags&Nm&&r.memoizedState!==null&&tG(s,Ua,r.memoizedState,r.memoizedProps);break;case 5:of(r,o,s);break;case 3:case 4:var d=Ua;Ua=K0(r.stateNode.containerInfo),of(r,o,s),Ua=d;break;case 22:r.memoizedState===null&&(d=r.alternate,d!==null&&d.memoizedState!==null?(d=Nm,Nm=16777216,of(r,o,s),Nm=d):of(r,o,s));break;default:of(r,o,s)}}function AM(r){var o=r.alternate;if(o!==null&&(r=o.child,r!==null)){o.child=null;do o=r.sibling,r.sibling=null,r=o;while(r!==null)}}function Uh(r){var o=r.deletions;if((r.flags&16)!==0){if(o!==null)for(var s=0;s<o.length;s++){var d=o[s],p=Co();er=d,OM(d,r),(d.mode&st)!==We&&0<=Ke&&0<=Ge&&0.05<Ge-Ke&&fi(d,Ke,Ge,"Unmount"),Eo(p)}AM(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)MM(r),r=r.sibling}function MM(r){var o=Co(),s=mi(),d=bi(),p=yi();switch(r.tag){case 0:case 11:case 15:Uh(r),r.flags&2048&&VS(r,r.return,Ur|ia);break;case 3:var g=hs();Uh(r),r.stateNode.passiveEffectDuration+=c0(g);break;case 12:g=hs(),Uh(r),r.stateNode.passiveEffectDuration+=kh(g);break;case 22:g=r.stateNode,r.memoizedState!==null&&g._visibility&xs&&(r.return===null||r.return.tag!==13)?(g._visibility&=~xs,B0(r),(r.mode&st)!==We&&0<=Ke&&0<=Ge&&0.05<Ge-Ke&&fi(r,Ke,Ge,"Disconnect")):Uh(r);break;default:Uh(r)}(r.mode&st)!==We&&0<=Ke&&0<=Ge&&(hn||0.05<un)&&pi(r,Ke,Ge,un,on),Eo(o),gi(s),hn=p,on=d}function B0(r){var o=r.deletions;if((r.flags&16)!==0){if(o!==null)for(var s=0;s<o.length;s++){var d=o[s],p=Co();er=d,OM(d,r),(d.mode&st)!==We&&0<=Ke&&0<=Ge&&0.05<Ge-Ke&&fi(d,Ke,Ge,"Unmount"),Eo(p)}AM(r)}for(r=r.child;r!==null;)NM(r),r=r.sibling}function NM(r){var o=Co(),s=mi(),d=bi(),p=yi();switch(r.tag){case 0:case 11:case 15:VS(r,r.return,Ur),B0(r);break;case 22:var g=r.stateNode;g._visibility&xs&&(g._visibility&=~xs,B0(r));break;default:B0(r)}(r.mode&st)!==We&&0<=Ke&&0<=Ge&&(hn||0.05<un)&&pi(r,Ke,Ge,un,on),Eo(o),gi(s),hn=p,on=d}function OM(r,o){for(;er!==null;){var s=er,d=s,p=o,g=Co(),x=mi(),w=bi(),T=yi();switch(d.tag){case 0:case 11:case 15:VS(d,p,Ur);break;case 23:case 22:d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(p=d.memoizedState.cachePool.pool,p!=null&&du(p));break;case 24:Rh(d.memoizedState.cache)}if((d.mode&st)!==We&&0<=Ke&&0<=Ge&&(hn||0.05<un)&&pi(d,Ke,Ge,un,on),Eo(g),gi(x),hn=T,on=w,d=s.child,d!==null)d.return=s,er=d;else e:for(s=r;er!==null;){if(d=er,g=d.sibling,x=d.return,yM(d),d===s){er=null;break e}if(g!==null){g.return=x,er=g;break e}er=x}}}function hq(){LW.forEach(function(r){return r()})}function DM(){var r=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return r||oe.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),r}function Ro(r){if((kt&Wn)!==tr&&ct!==0)return ct&-ct;var o=oe.T;return o!==null?(o._updatedFibers||(o._updatedFibers=new Set),o._updatedFibers.add(r),nw()):ee()}function PM(){if(io===0)if((ct&536870912)===0||xt){var r=ry;ry<<=1,(ry&3932160)===0&&(ry=262144),io=r}else io=536870912;return r=Do.current,r!==null&&(r.flags|=32),io}function pn(r,o,s){if(jf&&console.error("useInsertionEffect must not schedule updates."),IC&&(Uy=!0),r===jt&&(Ht===Nu||Ht===Ou)||r.cancelPendingCommit!==null)sf(r,0),Nl(r,ct,io,!1);if(vl(r,s),(kt&Wn)!==tr&&r===jt){if(Ai)switch(o.tag){case 0:case 11:case 15:r=dt&&J(dt)||"Unknown",s6.has(r)||(s6.add(r),o=J(o)||"Unknown",console.error("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render",o,r,r));break;case 1:i6||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),i6=!0)}}else Ni&&gh(r,o,s),Cq(o),r===jt&&((kt&Wn)===tr&&(Ql|=s),dn===Yl&&Nl(r,ct,io,!1)),Ei(r)}function LM(r,o,s){if((kt&(Wn|Lo))!==tr)throw Error("Should not already be working.");if(ct!==0&&dt!==null){var d=dt,p=Qn();switch(Z8){case Pm:case Nu:var g=bm;Jt&&((d=d._debugTask)?d.run(console.timeStamp.bind(console,"Suspended",g,p,Qo,void 0,"primary-light")):console.timeStamp("Suspended",g,p,Qo,void 0,"primary-light"));break;case Ou:g=bm,Jt&&((d=d._debugTask)?d.run(console.timeStamp.bind(console,"Action",g,p,Qo,void 0,"primary-light")):console.timeStamp("Action",g,p,Qo,void 0,"primary-light"));break;default:Jt&&(d=p-bm,3>d||console.timeStamp("Blocked",bm,p,Qo,void 0,5>d?"primary-light":10>d?"primary":100>d?"primary-dark":"error"))}}g=(s=!s&&(o&127)===0&&(o&r.expiredLanes)===0||Qc(r,o))?gq(r,o):JS(r,o,!0);var x=s;do{if(g===Ns){Uf&&!s&&Nl(r,o,0,!1),o=Ht,bm=Ln(),Z8=o;break}else{if(d=Qn(),p=r.current.alternate,x&&!mq(p)){So(o),p=Zn,g=d,!Jt||g<=p||(xn?xn.run(console.timeStamp.bind(console,"Teared Render",p,g,gt,ht,"error")):console.timeStamp("Teared Render",p,g,gt,ht,"error")),bu(o,d),g=JS(r,o,!1),x=!1;continue}if(g===Mu){if(x=o,r.errorRecoveryDisabledLanes&x)var w=0;else w=r.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){So(o),O2(Zn,d,o,xn),bu(o,d),o=w;e:{d=r,g=x,x=_m;var T=d.current.memoizedState.isDehydrated;if(T&&(sf(d,w).flags|=256),w=JS(d,w,!1),w!==Mu){if(AC&&!T){d.errorRecoveryDisabledLanes|=g,Ql|=g,g=Yl;break e}d=Vr,Vr=x,d!==null&&(Vr===null?Vr=d:Vr.push.apply(Vr,d))}g=w}if(x=!1,g!==Mu)continue;else d=Qn()}}if(g===Dm){So(o),O2(Zn,d,o,xn),bu(o,d),sf(r,0),Nl(r,o,0,!0);break}e:{switch(s=r,g){case Ns:case Dm:throw Error("Root did not complete. This is a bug in React.");case Yl:if((o&4194048)!==o)break;case Py:So(o),LA(Zn,d,o,xn),bu(o,d),p=o,(p&127)!==0?vy=d:(p&4194048)!==0&&(xy=d),Nl(s,o,io,!Jl);break e;case Mu:Vr=null;break;case Dy:case GO:break;default:throw Error("Unknown root exit status.")}if(oe.actQueue!==null)XS(s,p,o,Vr,Im,Iy,io,Ql,Du,g,null,null,Zn,d);else{if((o&62914560)===o&&(x=By+JO-Qn(),10<x)){if(Nl(s,o,io,!Jl),Xc(s,0,!0)!==0)break e;Va=o,s.timeoutHandle=m6(_M.bind(null,s,p,Vr,Im,Iy,o,io,Ql,Du,Jl,g,"Throttled",Zn,d),x);break e}_M(s,p,Vr,Im,Iy,o,io,Ql,Du,Jl,g,null,Zn,d)}}}break}while(1);Ei(r)}function _M(r,o,s,d,p,g,x,w,T,A,G,W,B,te){r.timeoutHandle=Bu;var xe=o.subtreeFlags,ke=null;if(xe&8192||(xe&16785408)===16785408){if(ke={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:us},kM(o,g,ke),xe=(g&62914560)===g?By-Qn():(g&4194048)===g?YO-Qn():0,xe=nG(ke,xe),xe!==null){Va=g,r.cancelPendingCommit=xe(XS.bind(null,r,o,g,s,d,p,x,w,T,G,ke,ke.waitingForViewTransition?"Waiting for the previous Animation":0<ke.count?0<ke.imgCount?"Suspended on CSS and Images":"Suspended on CSS":ke.imgCount===1?"Suspended on an Image":0<ke.imgCount?"Suspended on Images":null,B,te)),Nl(r,g,x,!A);return}}XS(r,o,g,s,d,p,x,w,T,G,ke,W,B,te)}function mq(r){for(var o=r;;){var s=o.tag;if((s===0||s===11||s===15)&&o.flags&16384&&(s=o.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var d=0;d<s.length;d++){var p=s[d],g=p.getSnapshot;p=p.value;try{if(!zr(g(),p))return!1}catch(x){return!1}}if(s=o.child,o.subtreeFlags&16384&&s!==null)s.return=o,o=s;else{if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Nl(r,o,s,d){o&=~MC,o&=~Ql,r.suspendedLanes|=o,r.pingedLanes&=~o,d&&(r.warmLanes|=o),d=r.expirationTimes;for(var p=o;0<p;){var g=31-_r(p),x=1<<g;d[g]=-1,p&=~x}s!==0&&Zc(r,s,o)}function af(){return(kt&(Wn|Lo))===tr?(Kh(0,!1),!1):!0}function YS(){if(dt!==null){if(Ht===ao)var r=dt.return;else r=dt,i0(),iS(r),Df=null,Tm=0,r=dt;for(;r!==null;)sM(r.alternate,r),r=r.return;dt=null}}function bu(r,o){(r&127)!==0&&(jl=o),(r&4194048)!==0&&(_i=o),(r&62914560)!==0&&(X8=o),(r&2080374784)!==0&&(Q8=o)}function sf(r,o){Jt&&(console.timeStamp("Blocking Track",0.003,0.003,"Blocking",ht,"primary-light"),console.timeStamp("Transition Track",0.003,0.003,"Transition",ht,"primary-light"),console.timeStamp("Suspense Track",0.003,0.003,"Suspense",ht,"primary-light"),console.timeStamp("Idle Track",0.003,0.003,"Idle",ht,"primary-light"));var s=Zn;if(Zn=Ln(),ct!==0&&0<s){if(So(ct),dn===Dy||dn===Yl)LA(s,Zn,o,xn);else{var d=Zn,p=xn;if(Jt&&!(d<=s)){var g=(o&738197653)===o?"tertiary-dark":"primary-dark",x=(o&536870912)===o?"Prewarm":(o&201326741)===o?"Interrupted Hydration":"Interrupted Render";p?p.run(console.timeStamp.bind(console,x,s,d,gt,ht,g)):console.timeStamp(x,s,d,gt,ht,g)}}bu(ct,Zn)}if(s=xn,xn=null,(o&127)!==0){xn=hm,p=0<=Li&&Li<jl?jl:Li,d=0<=Su&&Su<jl?jl:Su,g=0<=d?d:0<=p?p:Zn,0<=vy?(So(2),_A(vy,g,o,s)):($y&127)!==0&&(So(2),Eh(jl,g,Ts)),s=p;var w=d,T=mm,A=0<Mf,G=Kl===pm,W=Kl===yy;if(p=Zn,d=hm,g=lC,x=cC,Jt){if(gt="Blocking",0<s?s>p&&(s=p):s=p,0<w?w>s&&(w=s):w=s,T!==null&&s>w){var B=A?"secondary-light":"warning";d?d.run(console.timeStamp.bind(console,A?"Consecutive":"Event: "+T,w,s,gt,ht,B)):console.timeStamp(A?"Consecutive":"Event: "+T,w,s,gt,ht,B)}p>s&&(w=G?"error":(o&738197653)===o?"tertiary-light":"primary-light",G=W?"Promise Resolved":G?"Cascading Update":5<p-s?"Update Blocked":"Update",W=[],x!=null&&W.push(["Component name",x]),g!=null&&W.push(["Method name",g]),s={start:s,end:p,detail:{devtools:{properties:W,track:gt,trackGroup:ht,color:w}}},d?d.run(performance.measure.bind(performance,G,s)):performance.measure(G,s))}Li=-1.1,Kl=0,cC=lC=null,vy=-1.1,Mf=Su,Su=-1.1,jl=Ln()}if((o&4194048)!==0&&(xn=gm,p=0<=Es&&Es<_i?_i:Es,s=0<=oa&&oa<_i?_i:oa,d=0<=ql&&ql<_i?_i:ql,g=0<=d?d:0<=s?s:Zn,0<=xy?(So(256),_A(xy,g,o,xn)):($y&4194048)!==0&&(So(256),Eh(_i,g,Ts)),W=d,w=wu,T=0<Gl,A=uC===yy,g=Zn,d=gm,x=Y8,G=J8,Jt&&(gt="Transition",0<s?s>g&&(s=g):s=g,0<p?p>s&&(p=s):p=s,0<W?W>p&&(W=p):W=p,p>W&&w!==null&&(B=T?"secondary-light":"warning",d?d.run(console.timeStamp.bind(console,T?"Consecutive":"Event: "+w,W,p,gt,ht,B)):console.timeStamp(T?"Consecutive":"Event: "+w,W,p,gt,ht,B)),s>p&&(d?d.run(console.timeStamp.bind(console,"Action",p,s,gt,ht,"primary-dark")):console.timeStamp("Action",p,s,gt,ht,"primary-dark")),g>s&&(p=A?"Promise Resolved":5<g-s?"Update Blocked":"Update",W=[],G!=null&&W.push(["Component name",G]),x!=null&&W.push(["Method name",x]),s={start:s,end:g,detail:{devtools:{properties:W,track:gt,trackGroup:ht,color:"primary-light"}}},d?d.run(performance.measure.bind(performance,p,s)):performance.measure(p,s))),oa=Es=-1.1,uC=0,xy=-1.1,Gl=ql,ql=-1.1,_i=Ln()),(o&62914560)!==0&&($y&62914560)!==0&&(So(4194304),Eh(X8,Zn,Ts)),(o&2080374784)!==0&&($y&2080374784)!==0&&(So(268435456),Eh(Q8,Zn,Ts)),s=r.timeoutHandle,s!==Bu&&(r.timeoutHandle=Bu,WW(s)),s=r.cancelPendingCommit,s!==null&&(r.cancelPendingCommit=null,s()),Va=0,YS(),jt=r,dt=s=ds(r.current,null),ct=o,Ht=ao,_o=null,Jl=!1,Uf=Qc(r,o),AC=!1,dn=Ns,Du=io=MC=Ql=Xl=0,Vr=_m=null,Iy=!1,(o&8)!==0&&(o|=o&32),d=r.entangledLanes,d!==0)for(r=r.entanglements,d&=o;0<d;)p=31-_r(d),g=1<<p,o|=r[p],d&=~g;return Bi=o,t0(),r=V8(),1000<r-U8&&(oe.recentlyCreatedOwnerStacks=0,U8=r),Ha.discardPendingWarnings(),s}function IM(r,o){Je=null,oe.H=Mm,oe.getCurrentStack=null,Ai=!1,Mo=null,o===Of||o===Ey?(o=o5(),Ht=Pm):o===hC?(o=o5(),Ht=WO):Ht=o===CC?kC:o!==null&&typeof o==="object"&&typeof o.then==="function"?Lm:Ly,_o=o;var s=dt;s===null?(dn=Dm,N0(r,wo(o,r.current))):s.mode&st&&G2(s)}function BM(){var r=Do.current;return r===null?!0:(ct&4194048)===ct?aa===null?!0:!1:(ct&62914560)===ct||(ct&536870912)!==0?r===aa:!1}function zM(){var r=oe.H;return oe.H=Mm,r===null?Mm:r}function HM(){var r=oe.A;return oe.A=PW,r}function z0(r){xn===null&&(xn=r._debugTask==null?null:r._debugTask)}function H0(){dn=Yl,Jl||(ct&4194048)!==ct&&Do.current!==null||(Uf=!0),(Xl&134217727)===0&&(Ql&134217727)===0||jt===null||Nl(jt,ct,io,!1)}function JS(r,o,s){var d=kt;kt|=Wn;var p=zM(),g=HM();if(jt!==r||ct!==o){if(Ni){var x=r.memoizedUpdaters;0<x.size&&(jh(r,ct),x.clear()),xl(r,o)}Im=null,sf(r,o)}o=!1,x=dn;e:do try{if(Ht!==ao&&dt!==null){var w=dt,T=_o;switch(Ht){case kC:YS(),x=Py;break e;case Pm:case Nu:case Ou:case Lm:Do.current===null&&(o=!0);var A=Ht;if(Ht=ao,_o=null,lf(r,w,T,A),s&&Uf){x=Ns;break e}break;default:A=Ht,Ht=ao,_o=null,lf(r,w,T,A)}}FM(),x=dn;break}catch(G){IM(r,G)}while(1);return o&&r.shellSuspendCounter++,i0(),kt=d,oe.H=p,oe.A=g,dt===null&&(jt=null,ct=0,t0()),x}function FM(){for(;dt!==null;)UM(dt)}function gq(r,o){var s=kt;kt|=Wn;var d=zM(),p=HM();if(jt!==r||ct!==o){if(Ni){var g=r.memoizedUpdaters;0<g.size&&(jh(r,ct),g.clear()),xl(r,o)}Im=null,zy=Qn()+XO,sf(r,o)}else Uf=Qc(r,o);e:do try{if(Ht!==ao&&dt!==null)t:switch(o=dt,g=_o,Ht){case Ly:Ht=ao,_o=null,lf(r,o,g,Ly);break;case Nu:case Ou:if(n5(g)){Ht=ao,_o=null,VM(o);break}o=function(){Ht!==Nu&&Ht!==Ou||jt!==r||(Ht=_y),Ei(r)},g.then(o,o);break e;case Pm:Ht=_y;break e;case WO:Ht=RC;break e;case _y:n5(g)?(Ht=ao,_o=null,VM(o)):(Ht=ao,_o=null,lf(r,o,g,_y));break;case RC:var x=null;switch(dt.tag){case 26:x=dt.memoizedState;case 5:case 27:var w=dt;if(x?LN(x):w.stateNode.complete){Ht=ao,_o=null;var T=w.sibling;if(T!==null)dt=T;else{var A=w.return;A!==null?(dt=A,F0(A)):dt=null}break t}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}Ht=ao,_o=null,lf(r,o,g,RC);break;case Lm:Ht=ao,_o=null,lf(r,o,g,Lm);break;case kC:YS(),dn=Py;break e;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}oe.actQueue!==null?FM():bq();break}catch(G){IM(r,G)}while(1);if(i0(),oe.H=d,oe.A=p,kt=s,dt!==null)return Ns;return jt=null,ct=0,t0(),dn}function bq(){for(;dt!==null&&!mG();)UM(dt)}function UM(r){var o=r.alternate;(r.mode&st)!==We?(q2(r),o=he(r,HS,o,r,Bi),G2(r)):o=he(r,HS,o,r,Bi),r.memoizedProps=r.pendingProps,o===null?F0(r):dt=o}function VM(r){var o=he(r,yq,r);r.memoizedProps=r.pendingProps,o===null?F0(r):dt=o}function yq(r){var o=r.alternate,s=(r.mode&st)!==We;switch(s&&q2(r),r.tag){case 15:case 0:o=eM(o,r,r.pendingProps,r.type,void 0,ct);break;case 11:o=eM(o,r,r.pendingProps,r.type.render,r.ref,ct);break;case 5:iS(r);default:sM(o,r),r=dt=UA(r,Bi),o=HS(o,r,Bi)}return s&&G2(r),o}function lf(r,o,s,d){i0(),iS(o),Df=null,Tm=0;var p=o.return;try{if(nq(r,p,o,s,ct)){dn=Dm,N0(r,wo(s,r.current)),dt=null;return}}catch(g){if(p!==null)throw dt=p,g;dn=Dm,N0(r,wo(s,r.current)),dt=null;return}if(o.flags&32768){if(xt||d===Ly)r=!0;else if(Uf||(ct&536870912)!==0)r=!1;else if(Jl=r=!0,d===Nu||d===Ou||d===Pm||d===Lm)d=Do.current,d!==null&&d.tag===13&&(d.flags|=16384);jM(o,r)}else F0(o)}function F0(r){var o=r;do{if((o.flags&32768)!==0){jM(o,Jl);return}var s=o.alternate;if(r=o.return,q2(o),s=he(o,aq,s,o,Bi),(o.mode&st)!==We&&XA(o),s!==null){dt=s;return}if(o=o.sibling,o!==null){dt=o;return}dt=o=r}while(o!==null);dn===Ns&&(dn=GO)}function jM(r,o){do{var s=iq(r.alternate,r);if(s!==null){s.flags&=32767,dt=s;return}if((r.mode&st)!==We){XA(r),s=r.actualDuration;for(var d=r.child;d!==null;)s+=d.actualDuration,d=d.sibling;r.actualDuration=s}if(s=r.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!o&&(r=r.sibling,r!==null)){dt=r;return}dt=r=s}while(r!==null);dn=Py,dt=null}function XS(r,o,s,d,p,g,x,w,T,A,G,W,B,te){r.cancelPendingCommit=null;do Vh();while(Hn!==ec);if(Ha.flushLegacyContextWarning(),Ha.flushPendingUnsafeLifecycleWarnings(),(kt&(Wn|Lo))!==tr)throw Error("Should not already be working.");if(So(s),A===Mu?O2(B,te,s,xn):d!==null?VK(B,te,s,d,o!==null&&o.alternate!==null&&o.alternate.memoizedState.isDehydrated&&(o.flags&256)!==0,xn):UK(B,te,s,xn),o!==null){if(s===0&&console.error("finishedLanes should not be empty during a commit. This is a bug in React."),o===r.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");if(g=o.lanes|o.childLanes,g|=rC,jb(r,s,g,x,w,T),r===jt&&(dt=jt=null,ct=0),Vf=o,tc=r,Va=s,DC=g,LC=p,r6=d,PC=te,o6=W,ja=Hy,a6=null,o.actualDuration!==0||(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,wq(hf,function(){return Vm=window.event,ja===Hy&&(ja=OC),YM(),null})):(r.callbackNode=null,r.callbackPriority=0),Cs=null,Vl=Ln(),W!==null&&jK(te,Vl,W,xn),d=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||d){d=oe.T,oe.T=null,p=It.p,It.p=No,x=kt,kt|=Lo;try{fq(r,o,s)}finally{kt=x,It.p=p,oe.T=d}}Hn=ZO,KM(),qM(),GM()}}function KM(){if(Hn===ZO){Hn=ec;var r=tc,o=Vf,s=Va,d=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||d){d=oe.T,oe.T=null;var p=It.p;It.p=No;var g=kt;kt|=Lo;try{Hf=s,Ff=r,u0(),SM(o,r),Ff=Hf=null,s=qC;var x=OA(r.containerInfo),w=s.focusedElem,T=s.selectionRange;if(x!==w&&w&&w.ownerDocument&&NA(w.ownerDocument.documentElement,w)){if(T!==null&&A2(w)){var{start:A,end:G}=T;if(G===void 0&&(G=A),"selectionStart"in w)w.selectionStart=A,w.selectionEnd=Math.min(G,w.value.length);else{var W=w.ownerDocument||document,B=W&&W.defaultView||window;if(B.getSelection){var te=B.getSelection(),xe=w.textContent.length,ke=Math.min(T.start,xe),Wt=T.end===void 0?ke:Math.min(T.end,xe);!te.extend&&ke>Wt&&(x=Wt,Wt=ke,ke=x);var Ct=MA(w,ke),_=MA(w,Wt);if(Ct&&_&&(te.rangeCount!==1||te.anchorNode!==Ct.node||te.anchorOffset!==Ct.offset||te.focusNode!==_.node||te.focusOffset!==_.offset)){var H=W.createRange();H.setStart(Ct.node,Ct.offset),te.removeAllRanges(),ke>Wt?(te.addRange(H),te.extend(_.node,_.offset)):(H.setEnd(_.node,_.offset),te.addRange(H))}}}}W=[];for(te=w;te=te.parentNode;)te.nodeType===1&&W.push({element:te,left:te.scrollLeft,top:te.scrollTop});typeof w.focus==="function"&&w.focus();for(w=0;w<W.length;w++){var j=W[w];j.element.scrollLeft=j.left,j.element.scrollTop=j.top}}nv=!!KC,qC=KC=null}finally{kt=g,It.p=p,oe.T=d}}r.current=o,Hn=e6}}function qM(){if(Hn===e6){Hn=ec;var r=a6;if(r!==null){Vl=Ln();var o=ws,s=Vl;!Jt||s<=o||(Ts?Ts.run(console.timeStamp.bind(console,r,o,s,gt,ht,"secondary-light")):console.timeStamp(r,o,s,gt,ht,"secondary-light"))}r=tc,o=Vf,s=Va;var d=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||d){d=oe.T,oe.T=null;var p=It.p;It.p=No;var g=kt;kt|=Lo;try{Hf=s,Ff=r,u0(),bM(r,o.alternate,o),Ff=Hf=null}finally{kt=g,It.p=p,oe.T=d}}r=PC,o=o6,ws=Ln(),r=o===null?r:Vl,o=ws,s=ja===NC,d=xn,Cs!==null?IA(r,o,Cs,!1,d):!Jt||o<=r||(d?d.run(console.timeStamp.bind(console,s?"Commit Interrupted View Transition":"Commit",r,o,gt,ht,s?"error":"secondary-dark")):console.timeStamp(s?"Commit Interrupted View Transition":"Commit",r,o,gt,ht,s?"error":"secondary-dark")),Hn=t6}}function GM(){if(Hn===n6||Hn===t6){if(Hn===n6){var r=ws;ws=Ln();var o=ws,s=ja===NC;!Jt||o<=r||(Ts?Ts.run(console.timeStamp.bind(console,s?"Interrupted View Transition":"Starting Animation",r,o,gt,ht,s?"error":"secondary-light")):console.timeStamp(s?"Interrupted View Transition":"Starting Animation",r,o,gt,ht,s?" error":"secondary-light")),ja!==NC&&(ja=QO)}Hn=ec,gG(),r=tc;var d=Vf;o=Va,s=r6;var p=d.actualDuration!==0||(d.subtreeFlags&10256)!==0||(d.flags&10256)!==0;p?Hn=Fy:(Hn=ec,Vf=tc=null,WM(r,r.pendingLanes),Pu=0,zm=null);var g=r.pendingLanes;if(g===0&&(Zl=null),p||ZM(r),g=M(o),d=d.stateNode,Er&&typeof Er.onCommitFiberRoot==="function")try{var x=(d.current.flags&128)===128;switch(g){case No:var w=Lw;break;case Ba:w=_w;break;case Oi:w=hf;break;case ay:w=Iw;break;default:w=hf}Er.onCommitFiberRoot(mf,d,w,x)}catch(W){Mi||(Mi=!0,console.error("React instrumentation encountered an error: %o",W))}if(Ni&&r.memoizedUpdaters.clear(),hq(),s!==null){x=oe.T,w=It.p,It.p=No,oe.T=null;try{var T=r.onRecoverableError;for(d=0;d<s.length;d++){var A=s[d],G=vq(A.stack);he(A.source,T,A.value,G)}}finally{oe.T=x,It.p=w}}(Va&3)!==0&&Vh(),Ei(r),g=r.pendingLanes,(o&261930)!==0&&(g&42)!==0?(wy=!0,r===_C?Bm++:(Bm=0,_C=r)):Bm=0,p||bu(o,ws),Kh(0,!1)}}function vq(r){return r={componentStack:r},Object.defineProperty(r,"digest",{get:function(){console.error('You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.')}}),r}function WM(r,o){(r.pooledCacheLanes&=o)===0&&(o=r.pooledCache,o!=null&&(r.pooledCache=null,Rh(o)))}function Vh(){return KM(),qM(),GM(),YM()}function YM(){if(Hn!==Fy)return!1;var r=tc,o=DC;DC=0;var s=M(Va),d=Oi===0||Oi>s?Oi:s;s=oe.T;var p=It.p;try{It.p=d,oe.T=null;var g=LC;LC=null,d=tc;var x=Va;if(Hn=ec,Vf=tc=null,Va=0,(kt&(Wn|Lo))!==tr)throw Error("Cannot flush passive effects while already rendering.");So(x),IC=!0,Uy=!1;var w=0;if(Cs=null,w=Qn(),ja===QO)Eh(ws,w,Ts);else{var T=ws,A=w,G=ja===OC;!Jt||A<=T||(xn?xn.run(console.timeStamp.bind(console,G?"Waiting for Paint":"Waiting",T,A,gt,ht,"secondary-light")):console.timeStamp(G?"Waiting for Paint":"Waiting",T,A,gt,ht,"secondary-light"))}T=kt,kt|=Lo;var W=d.current;u0(),MM(W);var B=d.current;W=PC,u0(),TM(d,B,x,g,W),ZM(d),kt=T;var te=Qn();if(B=w,W=xn,Cs!==null?IA(B,te,Cs,!0,W):!Jt||te<=B||(W?W.run(console.timeStamp.bind(console,"Remaining Effects",B,te,gt,ht,"secondary-dark")):console.timeStamp("Remaining Effects",B,te,gt,ht,"secondary-dark")),bu(x,te),Kh(0,!1),Uy?d===zm?Pu++:(Pu=0,zm=d):Pu=0,Uy=IC=!1,Er&&typeof Er.onPostCommitFiberRoot==="function")try{Er.onPostCommitFiberRoot(mf,d)}catch(ke){Mi||(Mi=!0,console.error("React instrumentation encountered an error: %o",ke))}var xe=d.current.stateNode;return xe.effectDuration=0,xe.passiveEffectDuration=0,!0}finally{It.p=p,oe.T=s,WM(r,o)}}function JM(r,o,s){o=wo(s,o),QA(o),o=AS(r.stateNode,o,2),r=Rl(r,o,2),r!==null&&(vl(r,2),Ei(r))}function _t(r,o,s){if(jf=!1,r.tag===3)JM(r,r,s);else{for(;o!==null;){if(o.tag===3){JM(o,r,s);return}if(o.tag===1){var d=o.stateNode;if(typeof o.type.getDerivedStateFromError==="function"||typeof d.componentDidCatch==="function"&&(Zl===null||!Zl.has(d))){r=wo(s,r),QA(r),s=MS(2),d=Rl(o,s,2),d!==null&&(NS(s,d,o,r),vl(d,2),Ei(d));return}}o=o.return}console.error(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
159
+
160
+ Error message:
161
+
162
+ %s`,s)}}function QS(r,o,s){var d=r.pingCache;if(d===null){d=r.pingCache=new _W;var p=new Set;d.set(o,p)}else p=d.get(o),p===void 0&&(p=new Set,d.set(o,p));p.has(s)||(AC=!0,p.add(s),d=xq.bind(null,r,o,s),Ni&&jh(r,s),o.then(d,d))}function xq(r,o,s){var d=r.pingCache;d!==null&&d.delete(o),r.pingedLanes|=r.suspendedLanes&s,r.warmLanes&=~s,(s&127)!==0?0>Li&&(jl=Li=Ln(),hm=by("Promise Resolved"),Kl=yy):(s&4194048)!==0&&0>oa&&(_i=oa=Ln(),gm=by("Promise Resolved"),uC=yy),DM()&&oe.actQueue===null&&console.error(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
163
+
164
+ When testing, code that resolves suspended data should be wrapped into act(...):
165
+
166
+ act(() => {
167
+ /* finish loading suspended data */
168
+ });
169
+ /* assert on the output */
170
+
171
+ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`),jt===r&&(ct&s)===s&&(dn===Yl||dn===Dy&&(ct&62914560)===ct&&Qn()-By<JO?(kt&Wn)===tr&&sf(r,0):MC|=s,Du===ct&&(Du=0)),Ei(r)}function XM(r,o){o===0&&(o=Kd()),r=Cr(r,o),r!==null&&(vl(r,o),Ei(r))}function $q(r){var o=r.memoizedState,s=0;o!==null&&(s=o.retryLane),XM(r,s)}function Sq(r,o){var s=0;switch(r.tag){case 31:case 13:var{stateNode:d,memoizedState:p}=r;p!==null&&(s=p.retryLane);break;case 19:d=r.stateNode;break;case 22:d=r.stateNode._retryCache;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}d!==null&&d.delete(o),XM(r,s)}function ZS(r,o,s){if((o.subtreeFlags&67117056)!==0)for(o=o.child;o!==null;){var d=r,p=o,g=p.type===Z0;g=s||g,p.tag!==22?p.flags&67108864?g&&he(p,QM,d,p):ZS(d,p,g):p.memoizedState===null&&(g&&p.flags&8192?he(p,QM,d,p):p.subtreeFlags&67108864&&he(p,ZS,d,p,g)),o=o.sibling}}function QM(r,o){qt(!0);try{CM(o),NM(o),EM(r,o.alternate,o,!1),RM(r,o,0,null,!1,0)}finally{qt(!1)}}function ZM(r){var o=!0;r.current.mode&(Tr|za)||(o=!1),ZS(r,r.current,o)}function eN(r){if((kt&Wn)===tr){var o=r.tag;if(o===3||o===1||o===0||o===11||o===14||o===15){if(o=J(r)||"ReactComponent",Vy!==null){if(Vy.has(o))return;Vy.add(o)}else Vy=new Set([o]);he(r,function(){console.error("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously tries to update the component. Move this work to useEffect instead.")})}}}function jh(r,o){Ni&&r.memoizedUpdaters.forEach(function(s){gh(r,s,o)})}function wq(r,o){var s=oe.actQueue;return s!==null?(s.push(o),zW):Pw(r,o)}function Cq(r){DM()&&oe.actQueue===null&&he(r,function(){console.error(`An update to %s inside a test was not wrapped in act(...).
172
+
173
+ When testing, code that causes React state updates should be wrapped into act(...):
174
+
175
+ act(() => {
176
+ /* fire events that update state */
177
+ });
178
+ /* assert on the output */
179
+
180
+ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`,J(r))})}function Ei(r){r!==Kf&&r.next===null&&(Kf===null?jy=Kf=r:Kf=Kf.next=r),Ky=!0,oe.actQueue!==null?zC||(zC=!0,oN()):BC||(BC=!0,oN())}function Kh(r,o){if(!HC&&Ky){HC=!0;do{var s=!1;for(var d=jy;d!==null;){if(!o)if(r!==0){var p=d.pendingLanes;if(p===0)var g=0;else{var{suspendedLanes:x,pingedLanes:w}=d;g=(1<<31-_r(42|r)+1)-1,g&=p&~(x&~w),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(s=!0,rN(d,g))}else g=ct,g=Xc(d,d===jt?g:0,d.cancelPendingCommit!==null||d.timeoutHandle!==Bu),(g&3)===0||Qc(d,g)||(s=!0,rN(d,g));d=d.next}}while(s);HC=!1}}function Eq(){Vm=window.event,ew()}function ew(){Ky=zC=BC=!1;var r=0;nc!==0&&Oq()&&(r=nc);for(var o=Qn(),s=null,d=jy;d!==null;){var p=d.next,g=tN(d,o);if(g===0)d.next=null,s===null?jy=p:s.next=p,p===null&&(Kf=s);else if(s=d,r!==0||(g&3)!==0)Ky=!0;d=p}Hn!==ec&&Hn!==Fy||Kh(r,!1),nc!==0&&(nc=0)}function tN(r,o){for(var{suspendedLanes:s,pingedLanes:d,expirationTimes:p}=r,g=r.pendingLanes&-62914561;0<g;){var x=31-_r(g),w=1<<x,T=p[x];if(T===-1){if((w&s)===0||(w&d)!==0)p[x]=y2(w,o)}else T<=o&&(r.expiredLanes|=w);g&=~w}if(o=jt,s=ct,s=Xc(r,r===o?s:0,r.cancelPendingCommit!==null||r.timeoutHandle!==Bu),d=r.callbackNode,s===0||r===o&&(Ht===Nu||Ht===Ou)||r.cancelPendingCommit!==null)return d!==null&&tw(d),r.callbackNode=null,r.callbackPriority=0;if((s&3)===0||Qc(r,s)){if(o=s&-s,o!==r.callbackPriority||oe.actQueue!==null&&d!==FC)tw(d);else return o;switch(M(s)){case No:case Ba:s=_w;break;case Oi:s=hf;break;case ay:s=Iw;break;default:s=hf}return d=nN.bind(null,r),oe.actQueue!==null?(oe.actQueue.push(d),s=FC):s=Pw(s,d),r.callbackPriority=o,r.callbackNode=s,o}return d!==null&&tw(d),r.callbackPriority=2,r.callbackNode=null,2}function nN(r,o){if(wy=Sy=!1,Vm=window.event,Hn!==ec&&Hn!==Fy)return r.callbackNode=null,r.callbackPriority=0,null;var s=r.callbackNode;if(ja===Hy&&(ja=OC),Vh()&&r.callbackNode!==s)return null;var d=ct;if(d=Xc(r,r===jt?d:0,r.cancelPendingCommit!==null||r.timeoutHandle!==Bu),d===0)return null;return LM(r,d,o),tN(r,Qn()),r.callbackNode!=null&&r.callbackNode===s?nN.bind(null,r):null}function rN(r,o){if(Vh())return null;Sy=wy,wy=!1,LM(r,o,!0)}function tw(r){r!==FC&&r!==null&&hG(r)}function oN(){oe.actQueue!==null&&oe.actQueue.push(function(){return ew(),null}),YW(function(){(kt&(Wn|Lo))!==tr?Pw(Lw,Eq):ew()})}function nw(){if(nc===0){var r=Cu;r===0&&(r=ny,ny<<=1,(ny&261888)===0&&(ny=256)),nc=r}return nc}function aN(r){if(r==null||typeof r==="symbol"||typeof r==="boolean")return null;if(typeof r==="function")return r;return Ie(r,"action"),Sh(""+r)}function iN(r,o){var s=o.ownerDocument.createElement("input");return s.name=o.name,s.value=o.value,r.id&&s.setAttribute("form",r.id),o.parentNode.insertBefore(s,o),r=new FormData(r),s.parentNode.removeChild(s),r}function Tq(r,o,s,d,p){if(o==="submit"&&s&&s.stateNode===p){var g=aN((p[Ir]||null).action),x=d.submitter;x&&(o=(o=x[Ir]||null)?aN(o.formAction):x.getAttribute("formAction"),o!==null&&(g=o,x=null));var w=new uy("action","action",null,d,p);r.push({event:w,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(nc!==0){var T=x?iN(p,x):new FormData(p),A={pending:!0,data:T,method:p.method,action:g};Object.freeze(A),SS(s,A,null,T)}}else typeof g==="function"&&(w.preventDefault(),T=x?iN(p,x):new FormData(p),A={pending:!0,data:T,method:p.method,action:g},Object.freeze(A),SS(s,A,g,T))},currentTarget:p}]})}}function U0(r,o,s){r.currentTarget=s;try{o(r)}catch(d){Zw(d)}r.currentTarget=null}function sN(r,o){o=(o&4)!==0;for(var s=0;s<r.length;s++){var d=r[s];e:{var p=void 0,g=d.event;if(d=d.listeners,o)for(var x=d.length-1;0<=x;x--){var w=d[x],T=w.instance,A=w.currentTarget;if(w=w.listener,T!==p&&g.isPropagationStopped())break e;T!==null?he(T,U0,g,w,A):U0(g,w,A),p=T}else for(x=0;x<d.length;x++){if(w=d[x],T=w.instance,A=w.currentTarget,w=w.listener,T!==p&&g.isPropagationStopped())break e;T!==null?he(T,U0,g,w,A):U0(g,w,A),p=T}}}}function wt(r,o){UC.has(r)||console.error('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',r);var s=o[Bw];s===void 0&&(s=o[Bw]=new Set);var d=r+"__bubble";s.has(d)||(lN(o,r,2,!1),s.add(d))}function rw(r,o,s){UC.has(r)&&!o&&console.error('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',r);var d=0;o&&(d|=4),lN(s,r,d,o)}function ow(r){if(!r[qy]){r[qy]=!0,o8.forEach(function(s){s!=="selectionchange"&&(UC.has(s)||rw(s,!1,r),rw(s,!0,r))});var o=r.nodeType===9?r:r.ownerDocument;o===null||o[qy]||(o[qy]=!0,rw("selectionchange",!1,o))}}function lN(r,o,s,d){switch(FN(o)){case No:var p=iG;break;case Ba:p=sG;break;default:p=xw}s=p.bind(null,o,s,r),p=void 0,!Vw||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(p=!0),d?p!==void 0?r.addEventListener(o,s,{capture:!0,passive:p}):r.addEventListener(o,s,!0):p!==void 0?r.addEventListener(o,s,{passive:p}):r.addEventListener(o,s,!1)}function aw(r,o,s,d,p){var g=d;if((o&1)===0&&(o&2)===0&&d!==null)e:for(;;){if(d===null)return;var x=d.tag;if(x===3||x===4){var w=d.stateNode.containerInfo;if(w===p)break;if(x===4)for(x=d.return;x!==null;){var T=x.tag;if((T===3||T===4)&&x.stateNode.containerInfo===p)return;x=x.return}for(;w!==null;){if(x=_e(w),x===null)return;if(T=x.tag,T===5||T===6||T===26||T===27){d=g=x;continue e}w=w.parentNode}}d=d.return}vA(function(){var A=g,G=R2(s),W=[];e:{var B=F8.get(r);if(B!==void 0){var te=uy,xe=r;switch(r){case"keypress":if(Jb(s)===0)break e;case"keydown":case"keyup":te=tW;break;case"focusin":xe="focus",te=Gw;break;case"focusout":xe="blur",te=Gw;break;case"beforeblur":case"afterblur":te=Gw;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":te=R8;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":te=VG;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":te=oW;break;case I8:case B8:case z8:te=qG;break;case H8:te=iW;break;case"scroll":case"scrollend":te=FG;break;case"wheel":te=lW;break;case"copy":case"cut":case"paste":te=WG;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":te=A8;break;case"toggle":case"beforetoggle":te=uW}var ke=(o&4)!==0,Wt=!ke&&(r==="scroll"||r==="scrollend"),Ct=ke?B!==null?B+"Capture":null:B;ke=[];for(var _=A,H;_!==null;){var j=_;if(H=j.stateNode,j=j.tag,j!==5&&j!==26&&j!==27||H===null||Ct===null||(j=wh(_,Ct),j!=null&&ke.push(qh(_,j,H))),Wt)break;_=_.return}0<ke.length&&(B=new te(B,xe,null,s,G),W.push({event:B,listeners:ke}))}}if((o&7)===0){e:{if(B=r==="mouseover"||r==="pointerover",te=r==="mouseout"||r==="pointerout",B&&s!==rm&&(xe=s.relatedTarget||s.fromElement)&&(_e(xe)||xe[Il]))break e;if(te||B){if(B=G.window===G?G:(B=G.ownerDocument)?B.defaultView||B.parentWindow:window,te){if(xe=s.relatedTarget||s.toElement,te=A,xe=xe?_e(xe):null,xe!==null&&(Wt=R(xe),ke=xe.tag,xe!==Wt||ke!==5&&ke!==27&&ke!==6))xe=null}else te=null,xe=A;if(te!==xe){if(ke=R8,j="onMouseLeave",Ct="onMouseEnter",_="mouse",r==="pointerout"||r==="pointerover")ke=A8,j="onPointerLeave",Ct="onPointerEnter",_="pointer";if(Wt=te==null?B:tt(te),H=xe==null?B:tt(xe),B=new ke(j,_+"leave",te,s,G),B.target=Wt,B.relatedTarget=H,j=null,_e(G)===A&&(ke=new ke(Ct,_+"enter",xe,s,G),ke.target=H,ke.relatedTarget=Wt,j=ke),Wt=j,te&&xe)t:{ke=Rq,Ct=te,_=xe,H=0;for(j=Ct;j;j=ke(j))H++;j=0;for(var ie=_;ie;ie=ke(ie))j++;for(;0<H-j;)Ct=ke(Ct),H--;for(;0<j-H;)_=ke(_),j--;for(;H--;){if(Ct===_||_!==null&&Ct===_.alternate){ke=Ct;break t}Ct=ke(Ct),_=ke(_)}ke=null}else ke=null;te!==null&&cN(W,B,te,ke,!1),xe!==null&&Wt!==null&&cN(W,Wt,xe,ke,!0)}}}e:{if(B=A?tt(A):window,te=B.nodeName&&B.nodeName.toLowerCase(),te==="select"||te==="input"&&B.type==="file")var Ee=TA;else if(CA(B))if(L8)Ee=zK;else{Ee=IK;var Xe=_K}else te=B.nodeName,!te||te.toLowerCase()!=="input"||B.type!=="checkbox"&&B.type!=="radio"?A&&$h(A.elementType)&&(Ee=TA):Ee=BK;if(Ee&&(Ee=Ee(r,A))){EA(W,Ee,s,G);break e}Xe&&Xe(r,B,A),r==="focusout"&&A&&B.type==="number"&&A.memoizedProps.value!=null&&$2(B,"number",B.value)}switch(Xe=A?tt(A):window,r){case"focusin":if(CA(Xe)||Xe.contentEditable==="true")Sf=Xe,Yw=A,um=null;break;case"focusout":um=Yw=Sf=null;break;case"mousedown":Jw=!0;break;case"contextmenu":case"mouseup":case"dragend":Jw=!1,DA(W,s,G);break;case"selectionchange":if(hW)break;case"keydown":case"keyup":DA(W,s,G)}var Ve;if(Ww)e:{switch(r){case"compositionstart":var Be="onCompositionStart";break e;case"compositionend":Be="onCompositionEnd";break e;case"compositionupdate":Be="onCompositionUpdate";break e}Be=void 0}else $f?SA(r,s)&&(Be="onCompositionEnd"):r==="keydown"&&s.keyCode===M8&&(Be="onCompositionStart");if(Be&&(N8&&s.locale!=="ko"&&($f||Be!=="onCompositionStart"?Be==="onCompositionEnd"&&$f&&(Ve=xA()):(Bl=G,jw=("value"in Bl)?Bl.value:Bl.textContent,$f=!0)),Xe=V0(A,Be),0<Xe.length&&(Be=new k8(Be,r,null,s,G),W.push({event:Be,listeners:Xe}),Ve?Be.data=Ve:(Ve=wA(s),Ve!==null&&(Be.data=Ve)))),Ve=fW?OK(r,s):DK(r,s))Be=V0(A,"onBeforeInput"),0<Be.length&&(Xe=new JG("onBeforeInput","beforeinput",null,s,G),W.push({event:Xe,listeners:Be}),Xe.data=Ve);Tq(W,r,A,s,G)}sN(W,o)})}function qh(r,o,s){return{instance:r,listener:o,currentTarget:s}}function V0(r,o){for(var s=o+"Capture",d=[];r!==null;){var p=r,g=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||g===null||(p=wh(r,s),p!=null&&d.unshift(qh(r,p,g)),p=wh(r,o),p!=null&&d.push(qh(r,p,g))),r.tag===3)return d;r=r.return}return[]}function Rq(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r?r:null}function cN(r,o,s,d,p){for(var g=o._reactName,x=[];s!==null&&s!==d;){var w=s,T=w.alternate,A=w.stateNode;if(w=w.tag,T!==null&&T===d)break;w!==5&&w!==26&&w!==27||A===null||(T=A,p?(A=wh(s,g),A!=null&&x.unshift(qh(s,A,T))):p||(A=wh(s,g),A!=null&&x.push(qh(s,A,T)))),s=s.return}x.length!==0&&r.push({event:o,listeners:x})}function iw(r,o){kK(r,o),r!=="input"&&r!=="textarea"&&r!=="select"||o==null||o.value!==null||E8||(E8=!0,r==="select"&&o.multiple?console.error("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",r):console.error("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",r));var s={registrationNameDependencies:yu,possibleRegistrationNames:zw};$h(r)||typeof o.is==="string"||MK(r,o,s),o.contentEditable&&!o.suppressContentEditableWarning&&o.children!=null&&console.error("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.")}function Xn(r,o,s,d){o!==s&&(s=Ol(s),Ol(o)!==s&&(d[r]=o))}function kq(r,o,s){o.forEach(function(d){s[fN(d)]=d==="style"?lw(r):r.getAttribute(d)})}function Ti(r,o){o===!1?console.error("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",r,r,r):console.error("Expected `%s` listener to be a function, instead got a value of `%s` type.",r,typeof o)}function uN(r,o){return r=r.namespaceURI===sy||r.namespaceURI===bf?r.ownerDocument.createElementNS(r.namespaceURI,r.tagName):r.ownerDocument.createElement(r.tagName),r.innerHTML=o,r.innerHTML}function Ol(r){return An(r)&&(console.error("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.",Dn(r)),nn(r)),(typeof r==="string"?r:""+r).replace(HW,`
181
+ `).replace(FW,"")}function dN(r,o){return o=Ol(o),Ol(r)===o?!0:!1}function Ut(r,o,s,d,p,g){switch(s){case"children":if(typeof d==="string")Yb(d,o,!1),o==="body"||o==="textarea"&&d===""||xh(r,d);else if(typeof d==="number"||typeof d==="bigint")Yb(""+d,o,!1),o!=="body"&&xh(r,""+d);break;case"className":qb(r,"class",d);break;case"tabIndex":qb(r,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":qb(r,s,d);break;case"style":gA(r,d,g);break;case"data":if(o!=="object"){qb(r,"data",d);break}case"src":case"href":if(d===""&&(o!=="a"||s!=="href")){s==="src"?console.error('An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',s,s):console.error('An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',s,s),r.removeAttribute(s);break}if(d==null||typeof d==="function"||typeof d==="symbol"||typeof d==="boolean"){r.removeAttribute(s);break}Ie(d,s),d=Sh(""+d),r.setAttribute(s,d);break;case"action":case"formAction":if(d!=null&&(o==="form"?s==="formAction"?console.error("You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>."):typeof d==="function"&&(p.encType==null&&p.method==null||Yy||(Yy=!0,console.error("Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden.")),p.target==null||Wy||(Wy=!0,console.error("Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window."))):o==="input"||o==="button"?s==="action"?console.error("You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>."):o!=="input"||p.type==="submit"||p.type==="image"||Gy?o!=="button"||p.type==null||p.type==="submit"||Gy?typeof d==="function"&&(p.name==null||u6||(u6=!0,console.error('Cannot specify a "name" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.')),p.formEncType==null&&p.formMethod==null||Yy||(Yy=!0,console.error("Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden.")),p.formTarget==null||Wy||(Wy=!0,console.error("Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window."))):(Gy=!0,console.error('A button can only specify a formAction along with type="submit" or no type.')):(Gy=!0,console.error('An input can only specify a formAction along with type="submit" or type="image".')):s==="action"?console.error("You can only pass the action prop to <form>."):console.error("You can only pass the formAction prop to <input> or <button>.")),typeof d==="function"){r.setAttribute(s,"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 g==="function"&&(s==="formAction"?(o!=="input"&&Ut(r,o,"name",p.name,p,null),Ut(r,o,"formEncType",p.formEncType,p,null),Ut(r,o,"formMethod",p.formMethod,p,null),Ut(r,o,"formTarget",p.formTarget,p,null)):(Ut(r,o,"encType",p.encType,p,null),Ut(r,o,"method",p.method,p,null),Ut(r,o,"target",p.target,p,null)));if(d==null||typeof d==="symbol"||typeof d==="boolean"){r.removeAttribute(s);break}Ie(d,s),d=Sh(""+d),r.setAttribute(s,d);break;case"onClick":d!=null&&(typeof d!=="function"&&Ti(s,d),r.onclick=us);break;case"onScroll":d!=null&&(typeof d!=="function"&&Ti(s,d),wt("scroll",r));break;case"onScrollEnd":d!=null&&(typeof d!=="function"&&Ti(s,d),wt("scrollend",r));break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!=="object"||!("__html"in d))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(s=d.__html,s!=null){if(p.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");r.innerHTML=s}}break;case"multiple":r.multiple=d&&typeof d!=="function"&&typeof d!=="symbol";break;case"muted":r.muted=d&&typeof d!=="function"&&typeof d!=="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d==="function"||typeof d==="boolean"||typeof d==="symbol"){r.removeAttribute("xlink:href");break}Ie(d,s),s=Sh(""+d),r.setAttributeNS(Lu,"xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!=="function"&&typeof d!=="symbol"?(Ie(d,s),r.setAttribute(s,""+d)):r.removeAttribute(s);break;case"inert":d!==""||Jy[s]||(Jy[s]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",s));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":d&&typeof d!=="function"&&typeof d!=="symbol"?r.setAttribute(s,""):r.removeAttribute(s);break;case"capture":case"download":d===!0?r.setAttribute(s,""):d!==!1&&d!=null&&typeof d!=="function"&&typeof d!=="symbol"?(Ie(d,s),r.setAttribute(s,d)):r.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!=="function"&&typeof d!=="symbol"&&!isNaN(d)&&1<=d?(Ie(d,s),r.setAttribute(s,d)):r.removeAttribute(s);break;case"rowSpan":case"start":d==null||typeof d==="function"||typeof d==="symbol"||isNaN(d)?r.removeAttribute(s):(Ie(d,s),r.setAttribute(s,d));break;case"popover":wt("beforetoggle",r),wt("toggle",r),Kb(r,"popover",d);break;case"xlinkActuate":cs(r,Lu,"xlink:actuate",d);break;case"xlinkArcrole":cs(r,Lu,"xlink:arcrole",d);break;case"xlinkRole":cs(r,Lu,"xlink:role",d);break;case"xlinkShow":cs(r,Lu,"xlink:show",d);break;case"xlinkTitle":cs(r,Lu,"xlink:title",d);break;case"xlinkType":cs(r,Lu,"xlink:type",d);break;case"xmlBase":cs(r,VC,"xml:base",d);break;case"xmlLang":cs(r,VC,"xml:lang",d);break;case"xmlSpace":cs(r,VC,"xml:space",d);break;case"is":g!=null&&console.error('Cannot update the "is" prop after it has been initialized.'),Kb(r,"is",d);break;case"innerText":case"textContent":break;case"popoverTarget":d6||d==null||typeof d!=="object"||(d6=!0,console.error("The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.",d));default:!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N"?(s=bA(s),Kb(r,s,d)):yu.hasOwnProperty(s)&&d!=null&&typeof d!=="function"&&Ti(s,d)}}function sw(r,o,s,d,p,g){switch(s){case"style":gA(r,d,g);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!=="object"||!("__html"in d))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(s=d.__html,s!=null){if(p.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");r.innerHTML=s}}break;case"children":typeof d==="string"?xh(r,d):(typeof d==="number"||typeof d==="bigint")&&xh(r,""+d);break;case"onScroll":d!=null&&(typeof d!=="function"&&Ti(s,d),wt("scroll",r));break;case"onScrollEnd":d!=null&&(typeof d!=="function"&&Ti(s,d),wt("scrollend",r));break;case"onClick":d!=null&&(typeof d!=="function"&&Ti(s,d),r.onclick=us);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(yu.hasOwnProperty(s))d!=null&&typeof d!=="function"&&Ti(s,d);else e:{if(s[0]==="o"&&s[1]==="n"&&(p=s.endsWith("Capture"),o=s.slice(2,p?s.length-7:void 0),g=r[Ir]||null,g=g!=null?g[s]:null,typeof g==="function"&&r.removeEventListener(o,g,p),typeof d==="function")){typeof g!=="function"&&g!==null&&(s in r?r[s]=null:r.hasAttribute(s)&&r.removeAttribute(s)),r.addEventListener(o,d,p);break e}s in r?r[s]=d:d===!0?r.setAttribute(s,""):Kb(r,s,d)}}}function lr(r,o,s){switch(iw(o,s),o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":wt("error",r),wt("load",r);var d=!1,p=!1,g;for(g in s)if(s.hasOwnProperty(g)){var x=s[g];if(x!=null)switch(g){case"src":d=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:Ut(r,o,g,x,s,null)}}p&&Ut(r,o,"srcSet",s.srcSet,s,null),d&&Ut(r,o,"src",s.src,s,null);return;case"input":$l("input",s),wt("invalid",r);var w=g=x=p=null,T=null,A=null;for(d in s)if(s.hasOwnProperty(d)){var G=s[d];if(G!=null)switch(d){case"name":p=G;break;case"type":x=G;break;case"checked":T=G;break;case"defaultChecked":A=G;break;case"value":g=G;break;case"defaultValue":w=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(o+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:Ut(r,o,d,G,s,null)}}eA(r,s),tA(r,g,w,T,A,x,p,!1);return;case"select":$l("select",s),wt("invalid",r),d=x=g=null;for(p in s)if(s.hasOwnProperty(p)&&(w=s[p],w!=null))switch(p){case"value":g=w;break;case"defaultValue":x=w;break;case"multiple":d=w;default:Ut(r,o,p,w,s,null)}oA(r,s),o=g,s=x,r.multiple=!!d,o!=null?Gd(r,!!d,o,!1):s!=null&&Gd(r,!!d,s,!0);return;case"textarea":$l("textarea",s),wt("invalid",r),g=p=d=null;for(x in s)if(s.hasOwnProperty(x)&&(w=s[x],w!=null))switch(x){case"value":d=w;break;case"defaultValue":p=w;break;case"children":g=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:Ut(r,o,x,w,s,null)}aA(r,s),sA(r,d,p,g);return;case"option":nA(r,s);for(T in s)if(s.hasOwnProperty(T)&&(d=s[T],d!=null))switch(T){case"selected":r.selected=d&&typeof d!=="function"&&typeof d!=="symbol";break;default:Ut(r,o,T,d,s,null)}return;case"dialog":wt("beforetoggle",r),wt("toggle",r),wt("cancel",r),wt("close",r);break;case"iframe":case"object":wt("load",r);break;case"video":case"audio":for(d=0;d<Hm.length;d++)wt(Hm[d],r);break;case"image":wt("error",r),wt("load",r);break;case"details":wt("toggle",r);break;case"embed":case"source":case"link":wt("error",r),wt("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(A in s)if(s.hasOwnProperty(A)&&(d=s[A],d!=null))switch(A){case"children":case"dangerouslySetInnerHTML":throw Error(o+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:Ut(r,o,A,d,s,null)}return;default:if($h(o)){for(G in s)s.hasOwnProperty(G)&&(d=s[G],d!==void 0&&sw(r,o,G,d,s,void 0));return}}for(w in s)s.hasOwnProperty(w)&&(d=s[w],d!=null&&Ut(r,o,w,d,s,null))}function Aq(r,o,s,d){switch(iw(o,d),o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,g=null,x=null,w=null,T=null,A=null,G=null;for(te in s){var W=s[te];if(s.hasOwnProperty(te)&&W!=null)switch(te){case"checked":break;case"value":break;case"defaultValue":T=W;default:d.hasOwnProperty(te)||Ut(r,o,te,null,d,W)}}for(var B in d){var te=d[B];if(W=s[B],d.hasOwnProperty(B)&&(te!=null||W!=null))switch(B){case"type":g=te;break;case"name":p=te;break;case"checked":A=te;break;case"defaultChecked":G=te;break;case"value":x=te;break;case"defaultValue":w=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(o+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:te!==W&&Ut(r,o,B,te,d,W)}}o=s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null,d=d.type==="checkbox"||d.type==="radio"?d.checked!=null:d.value!=null,o||!d||c6||(console.error("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),c6=!0),!o||d||l6||(console.error("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),l6=!0),x2(r,x,w,T,A,G,g,p);return;case"select":te=x=w=B=null;for(g in s)if(T=s[g],s.hasOwnProperty(g)&&T!=null)switch(g){case"value":break;case"multiple":te=T;default:d.hasOwnProperty(g)||Ut(r,o,g,null,d,T)}for(p in d)if(g=d[p],T=s[p],d.hasOwnProperty(p)&&(g!=null||T!=null))switch(p){case"value":B=g;break;case"defaultValue":w=g;break;case"multiple":x=g;default:g!==T&&Ut(r,o,p,g,d,T)}d=w,o=x,s=te,B!=null?Gd(r,!!o,B,!1):!!s!==!!o&&(d!=null?Gd(r,!!o,d,!0):Gd(r,!!o,o?[]:"",!1));return;case"textarea":te=B=null;for(w in s)if(p=s[w],s.hasOwnProperty(w)&&p!=null&&!d.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:Ut(r,o,w,null,d,p)}for(x in d)if(p=d[x],g=s[x],d.hasOwnProperty(x)&&(p!=null||g!=null))switch(x){case"value":B=p;break;case"defaultValue":te=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:p!==g&&Ut(r,o,x,p,d,g)}iA(r,B,te);return;case"option":for(var xe in s)if(B=s[xe],s.hasOwnProperty(xe)&&B!=null&&!d.hasOwnProperty(xe))switch(xe){case"selected":r.selected=!1;break;default:Ut(r,o,xe,null,d,B)}for(T in d)if(B=d[T],te=s[T],d.hasOwnProperty(T)&&B!==te&&(B!=null||te!=null))switch(T){case"selected":r.selected=B&&typeof B!=="function"&&typeof B!=="symbol";break;default:Ut(r,o,T,B,d,te)}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 ke in s)B=s[ke],s.hasOwnProperty(ke)&&B!=null&&!d.hasOwnProperty(ke)&&Ut(r,o,ke,null,d,B);for(A in d)if(B=d[A],te=s[A],d.hasOwnProperty(A)&&B!==te&&(B!=null||te!=null))switch(A){case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(o+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:Ut(r,o,A,B,d,te)}return;default:if($h(o)){for(var Wt in s)B=s[Wt],s.hasOwnProperty(Wt)&&B!==void 0&&!d.hasOwnProperty(Wt)&&sw(r,o,Wt,void 0,d,B);for(G in d)B=d[G],te=s[G],!d.hasOwnProperty(G)||B===te||B===void 0&&te===void 0||sw(r,o,G,B,d,te);return}}for(var Ct in s)B=s[Ct],s.hasOwnProperty(Ct)&&B!=null&&!d.hasOwnProperty(Ct)&&Ut(r,o,Ct,null,d,B);for(W in d)B=d[W],te=s[W],!d.hasOwnProperty(W)||B===te||B==null&&te==null||Ut(r,o,W,B,d,te)}function fN(r){switch(r){case"class":return"className";case"for":return"htmlFor";default:return r}}function lw(r){var o={};r=r.style;for(var s=0;s<r.length;s++){var d=r[s];o[d]=r.getPropertyValue(d)}return o}function pN(r,o,s){if(o!=null&&typeof o!=="object")console.error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");else{var d,p=d="",g;for(g in o)if(o.hasOwnProperty(g)){var x=o[g];x!=null&&typeof x!=="boolean"&&x!==""&&(g.indexOf("--")===0?(Zr(x,g),d+=p+g+":"+(""+x).trim()):typeof x!=="number"||x===0||w8.has(g)?(Zr(x,g),d+=p+g.replace(y8,"-$1").toLowerCase().replace(v8,"-ms-")+":"+(""+x).trim()):d+=p+g.replace(y8,"-$1").toLowerCase().replace(v8,"-ms-")+":"+x+"px",p=";")}d=d||null,o=r.getAttribute("style"),o!==d&&(d=Ol(d),Ol(o)!==d&&(s.style=lw(r)))}}function Xo(r,o,s,d,p,g){if(p.delete(s),r=r.getAttribute(s),r===null)switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":return}else if(d!=null)switch(typeof d){case"function":case"symbol":case"boolean":break;default:if(Ie(d,o),r===""+d)return}Xn(o,r,d,g)}function hN(r,o,s,d,p,g){if(p.delete(s),r=r.getAttribute(s),r===null){switch(typeof d){case"function":case"symbol":return}if(!d)return}else switch(typeof d){case"function":case"symbol":break;default:if(d)return}Xn(o,r,d,g)}function cw(r,o,s,d,p,g){if(p.delete(s),r=r.getAttribute(s),r===null)switch(typeof d){case"undefined":case"function":case"symbol":return}else if(d!=null)switch(typeof d){case"function":case"symbol":break;default:if(Ie(d,s),r===""+d)return}Xn(o,r,d,g)}function mN(r,o,s,d,p,g){if(p.delete(s),r=r.getAttribute(s),r===null)switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":return;default:if(isNaN(d))return}else if(d!=null)switch(typeof d){case"function":case"symbol":case"boolean":break;default:if(!isNaN(d)&&(Ie(d,o),r===""+d))return}Xn(o,r,d,g)}function uw(r,o,s,d,p,g){if(p.delete(s),r=r.getAttribute(s),r===null)switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":return}else if(d!=null)switch(typeof d){case"function":case"symbol":case"boolean":break;default:if(Ie(d,o),s=Sh(""+d),r===s)return}Xn(o,r,d,g)}function gN(r,o,s,d){for(var p={},g=new Set,x=r.attributes,w=0;w<x.length;w++)switch(x[w].name.toLowerCase()){case"value":break;case"checked":break;case"selected":break;default:g.add(x[w].name)}if($h(o)){for(var T in s)if(s.hasOwnProperty(T)){var A=s[T];if(A!=null){if(yu.hasOwnProperty(T))typeof A!=="function"&&Ti(T,A);else if(s.suppressHydrationWarning!==!0)switch(T){case"children":typeof A!=="string"&&typeof A!=="number"||Xn("children",r.textContent,A,p);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":x=r.innerHTML,A=A?A.__html:void 0,A!=null&&(A=uN(r,A),Xn(T,x,A,p));continue;case"style":g.delete(T),pN(r,A,p);continue;case"offsetParent":case"offsetTop":case"offsetLeft":case"offsetWidth":case"offsetHeight":case"isContentEditable":case"outerText":case"outerHTML":g.delete(T.toLowerCase()),console.error("Assignment to read-only property will result in a no-op: `%s`",T);continue;case"className":g.delete("class"),x=Xk(r,"class",A),Xn("className",x,A,p);continue;default:d.context===Os&&o!=="svg"&&o!=="math"?g.delete(T.toLowerCase()):g.delete(T),x=Xk(r,T,A),Xn(T,x,A,p)}}}}else for(A in s)if(s.hasOwnProperty(A)&&(T=s[A],T!=null)){if(yu.hasOwnProperty(A))typeof T!=="function"&&Ti(A,T);else if(s.suppressHydrationWarning!==!0)switch(A){case"children":typeof T!=="string"&&typeof T!=="number"||Xn("children",r.textContent,T,p);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"value":case"checked":case"selected":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":x=r.innerHTML,T=T?T.__html:void 0,T!=null&&(T=uN(r,T),x!==T&&(p[A]={__html:x}));continue;case"className":Xo(r,A,"class",T,g,p);continue;case"tabIndex":Xo(r,A,"tabindex",T,g,p);continue;case"style":g.delete(A),pN(r,T,p);continue;case"multiple":g.delete(A),Xn(A,r.multiple,T,p);continue;case"muted":g.delete(A),Xn(A,r.muted,T,p);continue;case"autoFocus":g.delete("autofocus"),Xn(A,r.autofocus,T,p);continue;case"data":if(o!=="object"){g.delete(A),x=r.getAttribute("data"),Xn(A,x,T,p);continue}case"src":case"href":if(!(T!==""||o==="a"&&A==="href"||o==="object"&&A==="data")){A==="src"?console.error('An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',A,A):console.error('An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',A,A);continue}uw(r,A,A,T,g,p);continue;case"action":case"formAction":if(x=r.getAttribute(A),typeof T==="function"){g.delete(A.toLowerCase()),A==="formAction"?(g.delete("name"),g.delete("formenctype"),g.delete("formmethod"),g.delete("formtarget")):(g.delete("enctype"),g.delete("method"),g.delete("target"));continue}else if(x===UW){g.delete(A.toLowerCase()),Xn(A,"function",T,p);continue}uw(r,A,A.toLowerCase(),T,g,p);continue;case"xlinkHref":uw(r,A,"xlink:href",T,g,p);continue;case"contentEditable":cw(r,A,"contenteditable",T,g,p);continue;case"spellCheck":cw(r,A,"spellcheck",T,g,p);continue;case"draggable":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":cw(r,A,A,T,g,p);continue;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":hN(r,A,A.toLowerCase(),T,g,p);continue;case"capture":case"download":e:{w=r;var G=x=A,W=p;if(g.delete(G),w=w.getAttribute(G),w===null)switch(typeof T){case"undefined":case"function":case"symbol":break e;default:if(T===!1)break e}else if(T!=null)switch(typeof T){case"function":case"symbol":break;case"boolean":if(T===!0&&w==="")break e;break;default:if(Ie(T,x),w===""+T)break e}Xn(x,w,T,W)}continue;case"cols":case"rows":case"size":case"span":e:{if(w=r,G=x=A,W=p,g.delete(G),w=w.getAttribute(G),w===null)switch(typeof T){case"undefined":case"function":case"symbol":case"boolean":break e;default:if(isNaN(T)||1>T)break e}else if(T!=null)switch(typeof T){case"function":case"symbol":case"boolean":break;default:if(!(isNaN(T)||1>T)&&(Ie(T,x),w===""+T))break e}Xn(x,w,T,W)}continue;case"rowSpan":mN(r,A,"rowspan",T,g,p);continue;case"start":mN(r,A,A,T,g,p);continue;case"xHeight":Xo(r,A,"x-height",T,g,p);continue;case"xlinkActuate":Xo(r,A,"xlink:actuate",T,g,p);continue;case"xlinkArcrole":Xo(r,A,"xlink:arcrole",T,g,p);continue;case"xlinkRole":Xo(r,A,"xlink:role",T,g,p);continue;case"xlinkShow":Xo(r,A,"xlink:show",T,g,p);continue;case"xlinkTitle":Xo(r,A,"xlink:title",T,g,p);continue;case"xlinkType":Xo(r,A,"xlink:type",T,g,p);continue;case"xmlBase":Xo(r,A,"xml:base",T,g,p);continue;case"xmlLang":Xo(r,A,"xml:lang",T,g,p);continue;case"xmlSpace":Xo(r,A,"xml:space",T,g,p);continue;case"inert":T!==""||Jy[A]||(Jy[A]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",A)),hN(r,A,A,T,g,p);continue;default:if(!(2<A.length)||A[0]!=="o"&&A[0]!=="O"||A[1]!=="n"&&A[1]!=="N"){w=bA(A),x=!1,d.context===Os&&o!=="svg"&&o!=="math"?g.delete(w.toLowerCase()):(G=A.toLowerCase(),G=ly.hasOwnProperty(G)?ly[G]||null:null,G!==null&&G!==A&&(x=!0,g.delete(G)),g.delete(w));e:if(G=r,W=w,w=T,bh(W))if(G.hasAttribute(W))G=G.getAttribute(W),Ie(w,W),w=G===""+w?w:G;else{switch(typeof w){case"function":case"symbol":break e;case"boolean":if(G=W.toLowerCase().slice(0,5),G!=="data-"&&G!=="aria-")break e}w=w===void 0?void 0:null}else w=void 0;x||Xn(A,w,T,p)}}}return 0<g.size&&s.suppressHydrationWarning!==!0&&kq(r,g,p),Object.keys(p).length===0?null:p}function Mq(r,o){switch(r.length){case 0:return"";case 1:return r[0];case 2:return r[0]+" "+o+" "+r[1];default:return r.slice(0,-1).join(", ")+", "+o+" "+r[r.length-1]}}function bN(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Nq(){if(typeof performance.getEntriesByType==="function"){for(var r=0,o=0,s=performance.getEntriesByType("resource"),d=0;d<s.length;d++){var p=s[d],g=p.transferSize,x=p.initiatorType,w=p.duration;if(g&&w&&bN(x)){x=0,w=p.responseEnd;for(d+=1;d<s.length;d++){var T=s[d],A=T.startTime;if(A>w)break;var{transferSize:G,initiatorType:W}=T;G&&bN(W)&&(T=T.responseEnd,x+=G*(T<w?1:(w-A)/(T-A)))}if(--d,o+=8*(g+x)/(p.duration/1000),r++,10<r)break}}if(0<r)return o/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r==="number")?r:5}function j0(r){return r.nodeType===9?r:r.ownerDocument}function yN(r){switch(r){case bf:return Gf;case sy:return Qy;default:return Os}}function vN(r,o){if(r===Os)switch(o){case"svg":return Gf;case"math":return Qy;default:return Os}return r===Gf&&o==="foreignObject"?Os:r}function dw(r,o){return r==="textarea"||r==="noscript"||typeof o.children==="string"||typeof o.children==="number"||typeof o.children==="bigint"||typeof o.dangerouslySetInnerHTML==="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}function Oq(){var r=window.event;if(r&&r.type==="popstate"){if(r===GC)return!1;return GC=r,!0}return GC=null,!1}function Gh(){var r=window.event;return r&&r!==Vm?r.type:null}function Wh(){var r=window.event;return r&&r!==Vm?r.timeStamp:-1.1}function Dq(r){setTimeout(function(){throw r})}function Pq(r,o,s){switch(o){case"button":case"input":case"select":case"textarea":s.autoFocus&&r.focus();break;case"img":s.src?r.src=s.src:s.srcSet&&(r.srcset=s.srcSet)}}function Lq(){}function _q(r,o,s,d){Aq(r,o,s,d),r[Ir]=d}function xN(r){xh(r,"")}function Iq(r,o,s){r.nodeValue=s}function $N(r){if(!r.__reactWarnedAboutChildrenConflict){var o=r[Ir]||null;if(o!==null){var s=et(r);s!==null&&(typeof o.children==="string"||typeof o.children==="number"?(r.__reactWarnedAboutChildrenConflict=!0,he(s,function(){console.error('Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "children" text content using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.')})):o.dangerouslySetInnerHTML!=null&&(r.__reactWarnedAboutChildrenConflict=!0,he(s,function(){console.error('Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "dangerouslySetInnerHTML" using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.')})))}}}function Dl(r){return r==="head"}function Bq(r,o){r.removeChild(o)}function zq(r,o){(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).removeChild(o)}function SN(r,o){var s=o,d=0;do{var p=s.nextSibling;if(r.removeChild(s),p&&p.nodeType===8)if(s=p.data,s===Um||s===Xy){if(d===0){r.removeChild(p),df(o);return}d--}else if(s===Fm||s===rc||s===Iu||s===qf||s===_u)d++;else if(s===jW)Yh(r.ownerDocument.documentElement);else if(s===qW){s=r.ownerDocument.head,Yh(s);for(var g=s.firstChild;g;){var{nextSibling:x,nodeName:w}=g;g[nm]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&g.rel.toLowerCase()==="stylesheet"||s.removeChild(g),g=x}}else s===KW&&Yh(r.ownerDocument.body);s=p}while(s);df(o)}function wN(r,o){var s=r;r=0;do{var d=s.nextSibling;if(s.nodeType===1?o?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(o?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),d&&d.nodeType===8)if(s=d.data,s===Um)if(r===0)break;else r--;else s!==Fm&&s!==rc&&s!==Iu&&s!==qf||r++;s=d}while(s)}function Hq(r){wN(r,!0)}function Fq(r){r=r.style,typeof r.setProperty==="function"?r.setProperty("display","none","important"):r.display="none"}function Uq(r){r.nodeValue=""}function Vq(r){wN(r,!1)}function jq(r,o){o=o[GW],o=o!==void 0&&o!==null&&o.hasOwnProperty("display")?o.display:null,r.style.display=o==null||typeof o==="boolean"?"":(""+o).trim()}function Kq(r,o){r.nodeValue=o}function fw(r){var o=r.firstChild;o&&o.nodeType===10&&(o=o.nextSibling);for(;o;){var s=o;switch(o=o.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":fw(s),Ce(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}r.removeChild(s)}}function qq(r,o,s,d){for(;r.nodeType===1;){var p=s;if(r.nodeName.toLowerCase()!==o.toLowerCase()){if(!d&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(!d)if(o==="input"&&r.type==="hidden"){Ie(p.name,"name");var g=p.name==null?null:""+p.name;if(p.type==="hidden"&&r.getAttribute("name")===g)return r}else return r;else if(!r[nm])switch(o){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(g=r.getAttribute("rel"),g==="stylesheet"&&r.hasAttribute("data-precedence"))break;else if(g!==p.rel||r.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||r.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||r.getAttribute("title")!==(p.title==null?null:p.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(g=r.getAttribute("src"),(g!==(p.src==null?null:p.src)||r.getAttribute("type")!==(p.type==null?null:p.type)||r.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&g&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}if(r=ko(r.nextSibling),r===null)break}return null}function Gq(r,o,s){if(o==="")return null;for(;r.nodeType!==3;){if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!s)return null;if(r=ko(r.nextSibling),r===null)return null}return r}function CN(r,o){for(;r.nodeType!==8;){if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!o)return null;if(r=ko(r.nextSibling),r===null)return null}return r}function pw(r){return r.data===rc||r.data===Iu}function hw(r){return r.data===qf||r.data===rc&&r.ownerDocument.readyState!==p6}function Wq(r,o){var s=r.ownerDocument;if(r.data===Iu)r._reactRetry=o;else if(r.data!==rc||s.readyState!==p6)o();else{var d=function(){o(),s.removeEventListener("DOMContentLoaded",d)};s.addEventListener("DOMContentLoaded",d),r._reactRetry=d}}function ko(r){for(;r!=null;r=r.nextSibling){var o=r.nodeType;if(o===1||o===3)break;if(o===8){if(o=r.data,o===Fm||o===qf||o===rc||o===Iu||o===_u||o===jC||o===f6)break;if(o===Um||o===Xy)return null}}return r}function EN(r){if(r.nodeType===1){for(var o=r.nodeName.toLowerCase(),s={},d=r.attributes,p=0;p<d.length;p++){var g=d[p];s[fN(g.name)]=g.name.toLowerCase()==="style"?lw(r):g.value}return{type:o,props:s}}return r.nodeType===8?r.data===_u?{type:"Activity",props:{}}:{type:"Suspense",props:{}}:r.nodeValue}function TN(r,o,s){return s===null||s[VW]!==!0?(r.nodeValue===o?r=null:(o=Ol(o),r=Ol(r.nodeValue)===o?null:r.nodeValue),r):null}function mw(r){r=r.nextSibling;for(var o=0;r;){if(r.nodeType===8){var s=r.data;if(s===Um||s===Xy){if(o===0)return ko(r.nextSibling);o--}else s!==Fm&&s!==qf&&s!==rc&&s!==Iu&&s!==_u||o++}r=r.nextSibling}return null}function RN(r){r=r.previousSibling;for(var o=0;r;){if(r.nodeType===8){var s=r.data;if(s===Fm||s===qf||s===rc||s===Iu||s===_u){if(o===0)return r;o--}else s!==Um&&s!==Xy||o++}r=r.previousSibling}return null}function Yq(r){df(r)}function Jq(r){df(r)}function Xq(r){df(r)}function kN(r,o,s,d,p){switch(p&&T2(r,d.ancestorInfo),o=j0(s),r){case"html":if(r=o.documentElement,!r)throw Error("React expected an <html> element (document.documentElement) to exist in the Document but one was not found. React never removes the documentElement for any Document it renders into so the cause is likely in some other script running on this page.");return r;case"head":if(r=o.head,!r)throw Error("React expected a <head> element (document.head) to exist in the Document but one was not found. React never removes the head for any Document it renders into so the cause is likely in some other script running on this page.");return r;case"body":if(r=o.body,!r)throw Error("React expected a <body> element (document.body) to exist in the Document but one was not found. React never removes the body for any Document it renders into so the cause is likely in some other script running on this page.");return r;default:throw Error("resolveSingletonInstance was called with an element type that is not supported. This is a bug in React.")}}function Qq(r,o,s,d){if(!s[Il]&&et(s)){var p=s.tagName.toLowerCase();console.error("You are mounting a new %s component when a previous one has not first unmounted. It is an error to render more than one %s component at a time and attributes and children of these components will likely fail in unpredictable ways. Please only render a single instance of <%s> and if you need to mount a new one, ensure any previous ones have unmounted first.",p,p,p)}switch(r){case"html":case"head":case"body":break;default:console.error("acquireSingletonInstance was called with an element type that is not supported. This is a bug in React.")}for(p=s.attributes;p.length;)s.removeAttributeNode(p[0]);lr(s,r,o),s[cr]=d,s[Ir]=o}function Yh(r){for(var o=r.attributes;o.length;)r.removeAttributeNode(o[0]);Ce(r)}function K0(r){return typeof r.getRootNode==="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}function AN(r,o,s){var d=Wf;if(d&&typeof o==="string"&&o){var p=Jo(o);p='link[rel="'+r+'"][href="'+p+'"]',typeof s==="string"&&(p+='[crossorigin="'+s+'"]'),v6.has(p)||(v6.add(p),r={rel:r,crossOrigin:s,href:o},d.querySelector(p)===null&&(o=d.createElement("link"),lr(o,"link",r),je(o),d.head.appendChild(o)))}}function MN(r,o,s,d){var p=(p=Ll.current)?K0(p):null;if(!p)throw Error('"resourceRoot" was expected to exist. This is a bug in React.');switch(r){case"meta":case"title":return null;case"style":return typeof s.precedence==="string"&&typeof s.href==="string"?(s=cf(s.href),o=Mt(p).hoistableStyles,d=o.get(s),d||(d={type:"style",instance:null,count:0,state:null},o.set(s,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href==="string"&&typeof s.precedence==="string"){r=cf(s.href);var g=Mt(p).hoistableStyles,x=g.get(r);if(!x&&(p=p.ownerDocument||p,x={type:"stylesheet",instance:null,count:0,state:{loading:zu,preload:null}},g.set(r,x),(g=p.querySelector(Jh(r)))&&!g._p&&(x.instance=g,x.state.loading=jm|la),!ca.has(r))){var w={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy};ca.set(r,w),g||Zq(p,r,w,x.state)}if(o&&d===null)throw s=`
182
+
183
+ - `+q0(o)+`
184
+ + `+q0(s),Error("Expected <link> not to update to be updated to a stylesheet with precedence. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+s);return x}if(o&&d!==null)throw s=`
185
+
186
+ - `+q0(o)+`
187
+ + `+q0(s),Error("Expected stylesheet with precedence to not be updated to a different kind of <link>. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+s);return null;case"script":return o=s.async,s=s.src,typeof s==="string"&&o&&typeof o!=="function"&&typeof o!=="symbol"?(s=uf(s),o=Mt(p).hoistableScripts,d=o.get(s),d||(d={type:"script",instance:null,count:0,state:null},o.set(s,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error('getResource encountered a type it did not expect: "'+r+'". this is a bug in React.')}}function q0(r){var o=0,s="<link";return typeof r.rel==="string"?(o++,s+=' rel="'+r.rel+'"'):Ia.call(r,"rel")&&(o++,s+=' rel="'+(r.rel===null?"null":"invalid type "+typeof r.rel)+'"'),typeof r.href==="string"?(o++,s+=' href="'+r.href+'"'):Ia.call(r,"href")&&(o++,s+=' href="'+(r.href===null?"null":"invalid type "+typeof r.href)+'"'),typeof r.precedence==="string"?(o++,s+=' precedence="'+r.precedence+'"'):Ia.call(r,"precedence")&&(o++,s+=" precedence={"+(r.precedence===null?"null":"invalid type "+typeof r.precedence)+"}"),Object.getOwnPropertyNames(r).length>o&&(s+=" ..."),s+" />"}function cf(r){return'href="'+Jo(r)+'"'}function Jh(r){return'link[rel="stylesheet"]['+r+"]"}function NN(r){return pt({},r,{"data-precedence":r.precedence,precedence:null})}function Zq(r,o,s,d){r.querySelector('link[rel="preload"][as="style"]['+o+"]")?d.loading=jm:(o=r.createElement("link"),d.preload=o,o.addEventListener("load",function(){return d.loading|=jm}),o.addEventListener("error",function(){return d.loading|=b6}),lr(o,"link",s),je(o),r.head.appendChild(o))}function uf(r){return'[src="'+Jo(r)+'"]'}function Xh(r){return"script[async]"+r}function ON(r,o,s){if(o.count++,o.instance===null)switch(o.type){case"style":var d=r.querySelector('style[data-href~="'+Jo(s.href)+'"]');if(d)return o.instance=d,je(d),d;var p=pt({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return d=(r.ownerDocument||r).createElement("style"),je(d),lr(d,"style",p),G0(d,s.precedence,r),o.instance=d;case"stylesheet":p=cf(s.href);var g=r.querySelector(Jh(p));if(g)return o.state.loading|=la,o.instance=g,je(g),g;d=NN(s),(p=ca.get(p))&&gw(d,p),g=(r.ownerDocument||r).createElement("link"),je(g);var x=g;return x._p=new Promise(function(w,T){x.onload=w,x.onerror=T}),lr(g,"link",d),o.state.loading|=la,G0(g,s.precedence,r),o.instance=g;case"script":if(g=uf(s.src),p=r.querySelector(Xh(g)))return o.instance=p,je(p),p;if(d=s,p=ca.get(g))d=pt({},s),bw(d,p);return r=r.ownerDocument||r,p=r.createElement("script"),je(p),lr(p,"link",d),r.head.appendChild(p),o.instance=p;case"void":return null;default:throw Error('acquireResource encountered a resource type it did not expect: "'+o.type+'". this is a bug in React.')}else o.type==="stylesheet"&&(o.state.loading&la)===zu&&(d=o.instance,o.state.loading|=la,G0(d,s.precedence,r));return o.instance}function G0(r,o,s){for(var d=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=d.length?d[d.length-1]:null,g=p,x=0;x<d.length;x++){var w=d[x];if(w.dataset.precedence===o)g=w;else if(g!==p)break}g?g.parentNode.insertBefore(r,g.nextSibling):(o=s.nodeType===9?s.head:s,o.insertBefore(r,o.firstChild))}function gw(r,o){r.crossOrigin==null&&(r.crossOrigin=o.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=o.referrerPolicy),r.title==null&&(r.title=o.title)}function bw(r,o){r.crossOrigin==null&&(r.crossOrigin=o.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=o.referrerPolicy),r.integrity==null&&(r.integrity=o.integrity)}function DN(r,o,s){if(Zy===null){var d=new Map,p=Zy=new Map;p.set(s,d)}else p=Zy,d=p.get(s),d||(d=new Map,p.set(s,d));if(d.has(r))return d;d.set(r,null),s=s.getElementsByTagName(r);for(p=0;p<s.length;p++){var g=s[p];if(!(g[nm]||g[cr]||r==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!==bf){var x=g.getAttribute(o)||"";x=r+x;var w=d.get(x);w?w.push(g):d.set(x,[g])}}return d}function PN(r,o,s){r=r.ownerDocument||r,r.head.insertBefore(s,o==="title"?r.querySelector("head > title"):null)}function eG(r,o,s){var d=!s.ancestorInfo.containerTagInScope;if(s.context===Gf||o.itemProp!=null)return!d||o.itemProp==null||r!=="meta"&&r!=="title"&&r!=="style"&&r!=="link"&&r!=="script"||console.error("Cannot render a <%s> outside the main document if it has an `itemProp` prop. `itemProp` suggests the tag belongs to an `itemScope` which can appear anywhere in the DOM. If you were intending for React to hoist this <%s> remove the `itemProp` prop. Otherwise, try moving this tag into the <head> or <body> of the Document.",r,r),!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof o.precedence!=="string"||typeof o.href!=="string"||o.href===""){d&&console.error('Cannot render a <style> outside the main document without knowing its precedence and a unique href key. React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that does not conflict with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags. Note that hoisting <style> tags is considered an advanced feature that most will not use directly. Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`.');break}return!0;case"link":if(typeof o.rel!=="string"||typeof o.href!=="string"||o.href===""||o.onLoad||o.onError){if(o.rel==="stylesheet"&&typeof o.precedence==="string"){r=o.href;var{onError:p,disabled:g}=o;s=[],o.onLoad&&s.push("`onLoad`"),p&&s.push("`onError`"),g!=null&&s.push("`disabled`"),p=Mq(s,"and"),p+=s.length===1?" prop":" props",g=s.length===1?"an "+p:"the "+p,s.length&&console.error('React encountered a <link rel="stylesheet" href="%s" ... /> with a `precedence` prop that also included %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.',r,g,p)}d&&(typeof o.rel!=="string"||typeof o.href!=="string"||o.href===""?console.error("Cannot render a <link> outside the main document without a `rel` and `href` prop. Try adding a `rel` and/or `href` prop to this <link> or moving the link into the <head> tag"):(o.onError||o.onLoad)&&console.error("Cannot render a <link> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."));break}switch(o.rel){case"stylesheet":return r=o.precedence,o=o.disabled,typeof r!=="string"&&d&&console.error('Cannot render a <link rel="stylesheet" /> outside the main document without knowing its precedence. Consider adding precedence="default" or moving it into the root <head> tag.'),typeof r==="string"&&o==null;default:return!0}case"script":if(r=o.async&&typeof o.async!=="function"&&typeof o.async!=="symbol",!r||o.onLoad||o.onError||!o.src||typeof o.src!=="string"){d&&(r?o.onLoad||o.onError?console.error("Cannot render a <script> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."):console.error("Cannot render a <script> outside the main document without `async={true}` and a non-empty `src` prop. Ensure there is a valid `src` and either make the script async or move it into the root <head> tag or somewhere in the <body>."):console.error('Cannot render a sync or defer <script> outside the main document without knowing its order. Try adding async="" or moving it into the root <head> tag.'));break}return!0;case"noscript":case"template":d&&console.error("Cannot render <%s> outside the main document. Try moving it into the root <head> tag.",r)}return!1}function LN(r){return r.type==="stylesheet"&&(r.state.loading&y6)===zu?!1:!0}function tG(r,o,s,d){if(s.type==="stylesheet"&&(typeof d.media!=="string"||matchMedia(d.media).matches!==!1)&&(s.state.loading&la)===zu){if(s.instance===null){var p=cf(d.href),g=o.querySelector(Jh(p));if(g){o=g._p,o!==null&&typeof o==="object"&&typeof o.then==="function"&&(r.count++,r=W0.bind(r),o.then(r,r)),s.state.loading|=la,s.instance=g,je(g);return}g=o.ownerDocument||o,d=NN(d),(p=ca.get(p))&&gw(d,p),g=g.createElement("link"),je(g);var x=g;x._p=new Promise(function(w,T){x.onload=w,x.onerror=T}),lr(g,"link",d),s.instance=g}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(s,o),(o=s.state.preload)&&(s.state.loading&y6)===zu&&(r.count++,s=W0.bind(r),o.addEventListener("load",s),o.addEventListener("error",s))}}function nG(r,o){return r.stylesheets&&r.count===0&&Y0(r,r.stylesheets),0<r.count||0<r.imgCount?function(s){var d=setTimeout(function(){if(r.stylesheets&&Y0(r,r.stylesheets),r.unsuspend){var g=r.unsuspend;r.unsuspend=null,g()}},JW+o);0<r.imgBytes&&YC===0&&(YC=125*Nq()*QW);var p=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Y0(r,r.stylesheets),r.unsuspend)){var g=r.unsuspend;r.unsuspend=null,g()}},(r.imgBytes>YC?50:XW)+o);return r.unsuspend=s,function(){r.unsuspend=null,clearTimeout(d),clearTimeout(p)}}:null}function W0(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Y0(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}function Y0(r,o){r.stylesheets=null,r.unsuspend!==null&&(r.count++,ev=new Map,o.forEach(rG,r),ev=null,W0.call(r))}function rG(r,o){if(!(o.state.loading&la)){var s=ev.get(r);if(s)var d=s.get(JC);else{s=new Map,ev.set(r,s);for(var p=r.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<p.length;g++){var x=p[g];if(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")s.set(x.dataset.precedence,x),d=x}d&&s.set(JC,d)}p=o.instance,x=p.getAttribute("data-precedence"),g=s.get(x)||d,g===d&&s.set(JC,p),s.set(x,p),this.count++,d=W0.bind(this),p.addEventListener("load",d),p.addEventListener("error",d),g?g.parentNode.insertBefore(p,g.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(p,r.firstChild)),o.state.loading|=la}}function oG(r,o,s,d,p,g,x,w,T){this.tag=1,this.containerInfo=r,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Bu,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=qd(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qd(0),this.hiddenUpdates=qd(null),this.identifierPrefix=d,this.onUncaughtError=p,this.onCaughtError=g,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=T,this.incompleteTransitions=new Map,this.passiveEffectDuration=this.effectDuration=-0,this.memoizedUpdaters=new Set,r=this.pendingUpdatersLaneMap=[];for(o=0;31>o;o++)r.push(new Set);this._debugRootType=s?"hydrateRoot()":"createRoot()"}function _N(r,o,s,d,p,g,x,w,T,A,G,W){return r=new oG(r,o,s,x,T,A,G,W,w),o=wW,g===!0&&(o|=Tr|za),o|=st,g=y(3,null,null,o),r.current=g,g.stateNode=r,o=K2(),du(o),r.pooledCache=o,du(o),g.memoizedState={element:d,isDehydrated:s,cache:o},J2(g),r}function IN(r){if(!r)return Fl;return r=Fl,r}function yw(r,o,s,d,p,g){if(Er&&typeof Er.onScheduleFiberRoot==="function")try{Er.onScheduleFiberRoot(mf,d,s)}catch(x){Mi||(Mi=!0,console.error("React instrumentation encountered an error: %o",x))}p=IN(p),d.context===null?d.context=p:d.pendingContext=p,Ai&&Mo!==null&&!w6&&(w6=!0,console.error(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
188
+
189
+ Check the render method of %s.`,J(Mo)||"Unknown")),d=Tl(o),d.payload={element:s},g=g===void 0?null:g,g!==null&&(typeof g!=="function"&&console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",g),d.callback=g),s=Rl(r,d,o),s!==null&&(hi(o,"root.render()",null),pn(s,r,o),Nh(s,r,o))}function BN(r,o){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var s=r.retryLane;r.retryLane=s!==0&&s<o?s:o}}function vw(r,o){BN(r,o),(r=r.alternate)&&BN(r,o)}function zN(r){if(r.tag===13||r.tag===31){var o=Cr(r,67108864);o!==null&&pn(o,r,67108864),vw(r,67108864)}}function HN(r){if(r.tag===13||r.tag===31){var o=Ro(r);o=nu(o);var s=Cr(r,o);s!==null&&pn(s,r,o),vw(r,o)}}function aG(){return Mo}function iG(r,o,s,d){var p=oe.T;oe.T=null;var g=It.p;try{It.p=No,xw(r,o,s,d)}finally{It.p=g,oe.T=p}}function sG(r,o,s,d){var p=oe.T;oe.T=null;var g=It.p;try{It.p=Ba,xw(r,o,s,d)}finally{It.p=g,oe.T=p}}function xw(r,o,s,d){if(nv){var p=$w(d);if(p===null)aw(r,o,d,rv,s),UN(r,d);else if(lG(p,r,o,s,d))d.stopPropagation();else if(UN(r,d),o&4&&-1<eY.indexOf(r)){for(;p!==null;){var g=et(p);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var x=ui(g.pendingLanes);if(x!==0){var w=g;w.pendingLanes|=2;for(w.entangledLanes|=2;x;){var T=1<<31-_r(x);w.entanglements[1]|=T,x&=~T}Ei(g),(kt&(Wn|Lo))===tr&&(zy=Qn()+XO,Kh(0,!1))}}break;case 31:case 13:w=Cr(g,2),w!==null&&pn(w,g,2),af(),vw(g,2)}if(g=$w(d),g===null&&aw(r,o,d,rv,s),g===p)break;p=g}p!==null&&d.stopPropagation()}else aw(r,o,d,null,s)}}function $w(r){return r=R2(r),Sw(r)}function Sw(r){if(rv=null,r=_e(r),r!==null){var o=R(r);if(o===null)r=null;else{var s=o.tag;if(s===13){if(r=D(o),r!==null)return r;r=null}else if(s===31){if(r=U(o),r!==null)return r;r=null}else if(s===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;r=null}else o!==r&&(r=null)}}return rv=r,null}function FN(r){switch(r){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 No;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 Ba;case"message":switch(bG()){case Lw:return No;case _w:return Ba;case hf:case yG:return Oi;case Iw:return ay;default:return Oi}default:return Oi}}function UN(r,o){switch(r){case"focusin":case"focusout":oc=null;break;case"dragenter":case"dragleave":ac=null;break;case"mouseover":case"mouseout":ic=null;break;case"pointerover":case"pointerout":qm.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Gm.delete(o.pointerId)}}function Qh(r,o,s,d,p,g){if(r===null||r.nativeEvent!==g)return r={blockedOn:o,domEventName:s,eventSystemFlags:d,nativeEvent:g,targetContainers:[p]},o!==null&&(o=et(o),o!==null&&zN(o)),r;return r.eventSystemFlags|=d,o=r.targetContainers,p!==null&&o.indexOf(p)===-1&&o.push(p),r}function lG(r,o,s,d,p){switch(o){case"focusin":return oc=Qh(oc,r,o,s,d,p),!0;case"dragenter":return ac=Qh(ac,r,o,s,d,p),!0;case"mouseover":return ic=Qh(ic,r,o,s,d,p),!0;case"pointerover":var g=p.pointerId;return qm.set(g,Qh(qm.get(g)||null,r,o,s,d,p)),!0;case"gotpointercapture":return g=p.pointerId,Gm.set(g,Qh(Gm.get(g)||null,r,o,s,d,p)),!0}return!1}function VN(r){var o=_e(r.target);if(o!==null){var s=R(o);if(s!==null){if(o=s.tag,o===13){if(o=D(s),o!==null){r.blockedOn=o,me(r.priority,function(){HN(s)});return}}else if(o===31){if(o=U(s),o!==null){r.blockedOn=o,me(r.priority,function(){HN(s)});return}}else if(o===3&&s.stateNode.current.memoizedState.isDehydrated){r.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}r.blockedOn=null}function J0(r){if(r.blockedOn!==null)return!1;for(var o=r.targetContainers;0<o.length;){var s=$w(r.nativeEvent);if(s===null){s=r.nativeEvent;var d=new s.constructor(s.type,s),p=d;rm!==null&&console.error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),rm=p,s.target.dispatchEvent(d),rm===null&&console.error("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."),rm=null}else return o=et(s),o!==null&&zN(o),r.blockedOn=s,!1;o.shift()}return!0}function jN(r,o,s){J0(r)&&s.delete(o)}function cG(){XC=!1,oc!==null&&J0(oc)&&(oc=null),ac!==null&&J0(ac)&&(ac=null),ic!==null&&J0(ic)&&(ic=null),qm.forEach(jN),Gm.forEach(jN)}function X0(r,o){r.blockedOn===o&&(r.blockedOn=null,XC||(XC=!0,Nt.unstable_scheduleCallback(Nt.unstable_NormalPriority,cG)))}function KN(r){ov!==r&&(ov=r,Nt.unstable_scheduleCallback(Nt.unstable_NormalPriority,function(){ov===r&&(ov=null);for(var o=0;o<r.length;o+=3){var s=r[o],d=r[o+1],p=r[o+2];if(typeof d!=="function")if(Sw(d||s)===null)continue;else break;var g=et(s);g!==null&&(r.splice(o,3),o-=3,s={pending:!0,data:p,method:s.method,action:d},Object.freeze(s),SS(g,s,d,p))}}))}function df(r){function o(T){return X0(T,r)}oc!==null&&X0(oc,r),ac!==null&&X0(ac,r),ic!==null&&X0(ic,r),qm.forEach(o),Gm.forEach(o);for(var s=0;s<sc.length;s++){var d=sc[s];d.blockedOn===r&&(d.blockedOn=null)}for(;0<sc.length&&(s=sc[0],s.blockedOn===null);)VN(s),s.blockedOn===null&&sc.shift();if(s=(r.ownerDocument||r).$$reactFormReplay,s!=null)for(d=0;d<s.length;d+=3){var p=s[d],g=s[d+1],x=p[Ir]||null;if(typeof g==="function")x||KN(s);else if(x){var w=null;if(g&&g.hasAttribute("formAction")){if(p=g,x=g[Ir]||null)w=x.formAction;else if(Sw(p)!==null)continue}else w=x.action;typeof w==="function"?s[d+1]=w:(s.splice(d,3),d-=3),KN(s)}}}function qN(){function r(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(x){return p=x})},focusReset:"manual",scroll:"manual"})}function o(){p!==null&&(p(),p=null),d||setTimeout(s,20)}function s(){if(!d&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation==="object"){var d=!1,p=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(s,100),function(){d=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),p!==null&&(p(),p=null)}}}function ww(r){this._internalRoot=r}function Q0(r){this._internalRoot=r}function GN(r){r[Il]&&(r._reactRootContainer?console.error("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):console.error("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var pt=Object.assign,uG=Symbol.for("react.element"),Ri=Symbol.for("react.transitional.element"),ff=Symbol.for("react.portal"),pf=Symbol.for("react.fragment"),Z0=Symbol.for("react.strict_mode"),Cw=Symbol.for("react.profiler"),Ew=Symbol.for("react.consumer"),ki=Symbol.for("react.context"),Zh=Symbol.for("react.forward_ref"),Tw=Symbol.for("react.suspense"),Rw=Symbol.for("react.suspense_list"),ey=Symbol.for("react.memo"),Ao=Symbol.for("react.lazy"),kw=Symbol.for("react.activity"),dG=Symbol.for("react.memo_cache_sentinel"),WN=Symbol.iterator,fG=Symbol.for("react.client.reference"),qn=Array.isArray,oe=Zf.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,It=pE.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,pG=Object.freeze({pending:!1,data:null,method:null,action:null}),Aw=[],Mw=[],ys=-1,Pl=ge(null),em=ge(null),Ll=ge(null),ty=ge(null),tm=0,YN,JN,XN,QN,ZN,e8,t8;k.__reactDisabledLog=!0;var Nw,n8,Ow=!1,Dw=new(typeof WeakMap==="function"?WeakMap:Map),Mo=null,Ai=!1,Ia=Object.prototype.hasOwnProperty,Pw=Nt.unstable_scheduleCallback,hG=Nt.unstable_cancelCallback,mG=Nt.unstable_shouldYield,gG=Nt.unstable_requestPaint,Qn=Nt.unstable_now,bG=Nt.unstable_getCurrentPriorityLevel,Lw=Nt.unstable_ImmediatePriority,_w=Nt.unstable_UserBlockingPriority,hf=Nt.unstable_NormalPriority,yG=Nt.unstable_LowPriority,Iw=Nt.unstable_IdlePriority,vG=Nt.log,xG=Nt.unstable_setDisableYieldValue,mf=null,Er=null,Mi=!1,Ni=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",_r=Math.clz32?Math.clz32:Vb,$G=Math.log,SG=Math.LN2,ny=256,ry=262144,oy=4194304,No=2,Ba=8,Oi=32,ay=268435456,_l=Math.random().toString(36).slice(2),cr="__reactFiber$"+_l,Ir="__reactProps$"+_l,Il="__reactContainer$"+_l,Bw="__reactEvents$"+_l,wG="__reactListeners$"+_l,CG="__reactHandles$"+_l,r8="__reactResources$"+_l,nm="__reactMarker$"+_l,o8=new Set,yu={},zw={},EG={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},TG=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]*$"),a8={},i8={},RG=/[\n"\\]/g,s8=!1,l8=!1,c8=!1,u8=!1,d8=!1,f8=!1,p8=["value","defaultValue"],h8=!1,m8=/["'&<>\n\t]|^\s|\s$/,kG="address applet area article aside base basefont bgsound blockquote body br button caption center col colgroup dd details dir div dl dt embed fieldset figcaption figure footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html iframe img input isindex li link listing main marquee menu menuitem meta nav noembed noframes noscript object ol p param plaintext pre script section select source style summary table tbody td template textarea tfoot th thead title tr track ul wbr xmp".split(" "),g8="applet caption html table td th marquee object template foreignObject desc title".split(" "),AG=g8.concat(["button"]),MG="dd dt li option optgroup p rp rt".split(" "),b8={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null,containerTagInScope:null,implicitRootScope:!1},iy={},Hw={animation:"animationDelay animationDirection animationDuration animationFillMode animationIterationCount animationName animationPlayState animationTimingFunction".split(" "),background:"backgroundAttachment backgroundClip backgroundColor backgroundImage backgroundOrigin backgroundPositionX backgroundPositionY backgroundRepeat backgroundSize".split(" "),backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:"borderBottomColor borderBottomStyle borderBottomWidth borderImageOutset borderImageRepeat borderImageSlice borderImageSource borderImageWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderTopColor borderTopStyle borderTopWidth".split(" "),borderBlockEnd:["borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth"],borderBlockStart:["borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth"],borderBottom:["borderBottomColor","borderBottomStyle","borderBottomWidth"],borderColor:["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"],borderImage:["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"],borderInlineEnd:["borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth"],borderInlineStart:["borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth"],borderLeft:["borderLeftColor","borderLeftStyle","borderLeftWidth"],borderRadius:["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"],borderRight:["borderRightColor","borderRightStyle","borderRightWidth"],borderStyle:["borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle"],borderTop:["borderTopColor","borderTopStyle","borderTopWidth"],borderWidth:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],columnRule:["columnRuleColor","columnRuleStyle","columnRuleWidth"],columns:["columnCount","columnWidth"],flex:["flexBasis","flexGrow","flexShrink"],flexFlow:["flexDirection","flexWrap"],font:"fontFamily fontFeatureSettings fontKerning fontLanguageOverride fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition fontWeight lineHeight".split(" "),fontVariant:"fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition".split(" "),gap:["columnGap","rowGap"],grid:"gridAutoColumns gridAutoFlow gridAutoRows gridTemplateAreas gridTemplateColumns gridTemplateRows".split(" "),gridArea:["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"],gridColumn:["gridColumnEnd","gridColumnStart"],gridColumnGap:["columnGap"],gridGap:["columnGap","rowGap"],gridRow:["gridRowEnd","gridRowStart"],gridRowGap:["rowGap"],gridTemplate:["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],listStyle:["listStyleImage","listStylePosition","listStyleType"],margin:["marginBottom","marginLeft","marginRight","marginTop"],marker:["markerEnd","markerMid","markerStart"],mask:"maskClip maskComposite maskImage maskMode maskOrigin maskPositionX maskPositionY maskRepeat maskSize".split(" "),maskPosition:["maskPositionX","maskPositionY"],outline:["outlineColor","outlineStyle","outlineWidth"],overflow:["overflowX","overflowY"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"],placeContent:["alignContent","justifyContent"],placeItems:["alignItems","justifyItems"],placeSelf:["alignSelf","justifySelf"],textDecoration:["textDecorationColor","textDecorationLine","textDecorationStyle"],textEmphasis:["textEmphasisColor","textEmphasisStyle"],transition:["transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"],wordWrap:["overflowWrap"]},y8=/([A-Z])/g,v8=/^ms-/,NG=/^(?:webkit|moz|o)[A-Z]/,OG=/^-ms-/,DG=/-(.)/g,x8=/;\s*$/,gf={},Fw={},$8=!1,S8=!1,w8=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(" ")),sy="http://www.w3.org/1998/Math/MathML",bf="http://www.w3.org/2000/svg",PG=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"]]),ly={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",fetchpriority:"fetchPriority",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",inert:"inert",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",popover:"popover",popovertarget:"popoverTarget",popovertargetaction:"popoverTargetAction",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",transformorigin:"transformOrigin","transform-origin":"transformOrigin",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},C8={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0,"aria-braillelabel":0,"aria-brailleroledescription":0,"aria-colindextext":0,"aria-rowindextext":0},yf={},LG=RegExp("^(aria)-[: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]*$"),_G=RegExp("^(aria)[A-Z][: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]*$"),E8=!1,Br={},T8=/^on./,IG=/^on[^A-Z]/,BG=RegExp("^(aria)-[: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]*$"),zG=RegExp("^(aria)[A-Z][: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]*$"),HG=/^[\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,rm=null,vf=null,xf=null,Uw=!1,Di=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Vw=!1;if(Di)try{var om={};Object.defineProperty(om,"passive",{get:function(){Vw=!0}}),window.addEventListener("test",om,om),window.removeEventListener("test",om,om)}catch(r){Vw=!1}var Bl=null,jw=null,cy=null,vu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},uy=eo(vu),am=pt({},vu,{view:0,detail:0}),FG=eo(am),Kw,qw,im,dy=pt({},am,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:k2,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){if("movementX"in r)return r.movementX;return r!==im&&(im&&r.type==="mousemove"?(Kw=r.screenX-im.screenX,qw=r.screenY-im.screenY):qw=Kw=0,im=r),Kw},movementY:function(r){return"movementY"in r?r.movementY:qw}}),R8=eo(dy),UG=pt({},dy,{dataTransfer:0}),VG=eo(UG),jG=pt({},am,{relatedTarget:0}),Gw=eo(jG),KG=pt({},vu,{animationName:0,elapsedTime:0,pseudoElement:0}),qG=eo(KG),GG=pt({},vu,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),WG=eo(GG),YG=pt({},vu,{data:0}),k8=eo(YG),JG=k8,XG={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},QG={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"},ZG={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},eW=pt({},am,{key:function(r){if(r.key){var o=XG[r.key]||r.key;if(o!=="Unidentified")return o}return r.type==="keypress"?(r=Jb(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?QG[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:k2,charCode:function(r){return r.type==="keypress"?Jb(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Jb(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),tW=eo(eW),nW=pt({},dy,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),A8=eo(nW),rW=pt({},am,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:k2}),oW=eo(rW),aW=pt({},vu,{propertyName:0,elapsedTime:0,pseudoElement:0}),iW=eo(aW),sW=pt({},dy,{deltaX:function(r){return"deltaX"in r?r.deltaX:("wheelDeltaX"in r)?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:("wheelDeltaY"in r)?-r.wheelDeltaY:("wheelDelta"in r)?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),lW=eo(sW),cW=pt({},vu,{newState:0,oldState:0}),uW=eo(cW),dW=[9,13,27,32],M8=229,Ww=Di&&"CompositionEvent"in window,sm=null;Di&&"documentMode"in document&&(sm=document.documentMode);var fW=Di&&"TextEvent"in window&&!sm,N8=Di&&(!Ww||sm&&8<sm&&11>=sm),O8=32,D8=String.fromCharCode(O8),P8=!1,$f=!1,pW={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},lm=null,cm=null,L8=!1;Di&&(L8=PK("input")&&(!document.documentMode||9<document.documentMode));var zr=typeof Object.is==="function"?Object.is:HK,hW=Di&&"documentMode"in document&&11>=document.documentMode,Sf=null,Yw=null,um=null,Jw=!1,wf={animationend:ou("Animation","AnimationEnd"),animationiteration:ou("Animation","AnimationIteration"),animationstart:ou("Animation","AnimationStart"),transitionrun:ou("Transition","TransitionRun"),transitionstart:ou("Transition","TransitionStart"),transitioncancel:ou("Transition","TransitionCancel"),transitionend:ou("Transition","TransitionEnd")},Xw={},_8={};Di&&(_8=document.createElement("div").style,("AnimationEvent"in window)||(delete wf.animationend.animation,delete wf.animationiteration.animation,delete wf.animationstart.animation),("TransitionEvent"in window)||delete wf.transitionend.transition);var I8=au("animationend"),B8=au("animationiteration"),z8=au("animationstart"),mW=au("transitionrun"),gW=au("transitionstart"),bW=au("transitioncancel"),H8=au("transitionend"),F8=new Map,Qw="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(" ");Qw.push("scrollEnd");var U8=0;if(typeof performance==="object"&&typeof performance.now==="function")var yW=performance,V8=function(){return yW.now()};else{var vW=Date;V8=function(){return vW.now()}}var Zw=typeof reportError==="function"?reportError:function(r){if(typeof window==="object"&&typeof window.ErrorEvent==="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r==="object"&&r!==null&&typeof r.message==="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(o))return}else if(typeof process==="object"&&typeof process.emit==="function"){process.emit("uncaughtException",r);return}console.error(r)},xW="This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects.",fy=0,eC=1,tC=2,nC=3,py="– ",hy="+ ",j8="  ",Jt=typeof console<"u"&&typeof console.timeStamp==="function"&&typeof performance<"u"&&typeof performance.measure==="function",Qo="Components ⚛",ht="Scheduler ⚛",gt="Blocking",zl=!1,vs={color:"primary",properties:null,tooltipText:"",track:Qo},Hl={start:-0,end:-0,detail:{devtools:vs}},$W=["Changed Props",""],K8="This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner.",SW=["Changed Props",K8],dm=1,xs=2,Zo=[],Cf=0,rC=0,Fl={};Object.freeze(Fl);var ea=null,Ef=null,We=0,wW=1,st=2,Tr=8,za=16,CW=32,q8=!1;try{var G8=Object.preventExtensions({})}catch(r){q8=!0}var oC=new WeakMap,Tf=[],Rf=0,my=null,fm=0,ta=[],na=0,xu=null,$s=1,Ss="",ur=null,Xt=null,xt=!1,Pi=!1,Oo=null,Ul=null,ra=!1,aC=Error("Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),iC=ge(null),sC=ge(null),W8={},gy=null,kf=null,Af=!1,EW=typeof AbortController<"u"?AbortController:function(){var r=[],o=this.signal={aborted:!1,addEventListener:function(s,d){r.push(d)}};this.abort=function(){o.aborted=!0,r.forEach(function(s){return s()})}},TW=Nt.unstable_scheduleCallback,RW=Nt.unstable_NormalPriority,Pn={$$typeof:ki,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},Ln=Nt.unstable_now,by=console.createTask?console.createTask:function(){return null},pm=1,yy=2,Zn=-0,Vl=-0,ws=-0,Cs=null,Hr=-1.1,$u=-0,un=-0,Ke=-1.1,Ge=-1.1,on=null,hn=!1,jl=-0,Li=-1.1,hm=null,Kl=0,lC=null,cC=null,Su=-1.1,mm=null,Mf=-1.1,vy=-1.1,_i=-0,Es=-1.1,oa=-1.1,uC=0,gm=null,Y8=null,J8=null,ql=-1.1,wu=null,Gl=-1.1,xy=-1.1,X8=-0,Q8=-0,$y=0,Ts=null,Z8=0,bm=-1.1,Sy=!1,wy=!1,ym=null,dC=0,Cu=0,Nf=null,eO=oe.S;oe.S=function(r,o){if(YO=Qn(),typeof o==="object"&&o!==null&&typeof o.then==="function"){if(0>Es&&0>oa){Es=Ln();var s=Wh(),d=Gh();if(s!==Gl||d!==wu)Gl=-1.1;ql=s,wu=d}GK(r,o)}eO!==null&&eO(r,o)};var Eu=ge(null),Ha={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},vm=[],xm=[],$m=[],Sm=[],wm=[],Cm=[],Tu=new Set;Ha.recordUnsafeLifecycleWarnings=function(r,o){Tu.has(r.type)||(typeof o.componentWillMount==="function"&&o.componentWillMount.__suppressDeprecationWarning!==!0&&vm.push(r),r.mode&Tr&&typeof o.UNSAFE_componentWillMount==="function"&&xm.push(r),typeof o.componentWillReceiveProps==="function"&&o.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&$m.push(r),r.mode&Tr&&typeof o.UNSAFE_componentWillReceiveProps==="function"&&Sm.push(r),typeof o.componentWillUpdate==="function"&&o.componentWillUpdate.__suppressDeprecationWarning!==!0&&wm.push(r),r.mode&Tr&&typeof o.UNSAFE_componentWillUpdate==="function"&&Cm.push(r))},Ha.flushPendingUnsafeLifecycleWarnings=function(){var r=new Set;0<vm.length&&(vm.forEach(function(w){r.add(J(w)||"Component"),Tu.add(w.type)}),vm=[]);var o=new Set;0<xm.length&&(xm.forEach(function(w){o.add(J(w)||"Component"),Tu.add(w.type)}),xm=[]);var s=new Set;0<$m.length&&($m.forEach(function(w){s.add(J(w)||"Component"),Tu.add(w.type)}),$m=[]);var d=new Set;0<Sm.length&&(Sm.forEach(function(w){d.add(J(w)||"Component"),Tu.add(w.type)}),Sm=[]);var p=new Set;0<wm.length&&(wm.forEach(function(w){p.add(J(w)||"Component"),Tu.add(w.type)}),wm=[]);var g=new Set;if(0<Cm.length&&(Cm.forEach(function(w){g.add(J(w)||"Component"),Tu.add(w.type)}),Cm=[]),0<o.size){var x=b(o);console.error(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
190
+
191
+ * Move code with side effects to componentDidMount, and set initial state in the constructor.
192
+
193
+ Please update the following components: %s`,x)}0<d.size&&(x=b(d),console.error(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
194
+
195
+ * Move data fetching code or side effects to componentDidUpdate.
196
+ * If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state
197
+
198
+ Please update the following components: %s`,x)),0<g.size&&(x=b(g),console.error(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
199
+
200
+ * Move data fetching code or side effects to componentDidUpdate.
201
+
202
+ Please update the following components: %s`,x)),0<r.size&&(x=b(r),console.warn(`componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
203
+
204
+ * Move code with side effects to componentDidMount, and set initial state in the constructor.
205
+ * Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
206
+
207
+ Please update the following components: %s`,x)),0<s.size&&(x=b(s),console.warn(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
208
+
209
+ * Move data fetching code or side effects to componentDidUpdate.
210
+ * If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state
211
+ * Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
212
+
213
+ Please update the following components: %s`,x)),0<p.size&&(x=b(p),console.warn(`componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
214
+
215
+ * Move data fetching code or side effects to componentDidUpdate.
216
+ * Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
217
+
218
+ Please update the following components: %s`,x))};var Cy=new Map,tO=new Set;Ha.recordLegacyContextWarning=function(r,o){var s=null;for(var d=r;d!==null;)d.mode&Tr&&(s=d),d=d.return;s===null?console.error("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue."):!tO.has(r.type)&&(d=Cy.get(s),r.type.contextTypes!=null||r.type.childContextTypes!=null||o!==null&&typeof o.getChildContext==="function")&&(d===void 0&&(d=[],Cy.set(s,d)),d.push(r))},Ha.flushLegacyContextWarning=function(){Cy.forEach(function(r){if(r.length!==0){var o=r[0],s=new Set;r.forEach(function(p){s.add(J(p)||"Component"),tO.add(p.type)});var d=b(s);he(o,function(){console.error(`Legacy context API has been detected within a strict-mode tree.
219
+
220
+ The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
221
+
222
+ Please update the following components: %s
223
+
224
+ Learn more about this warning here: https://react.dev/link/legacy-context`,d)})}})},Ha.discardPendingWarnings=function(){vm=[],xm=[],$m=[],Sm=[],wm=[],Cm=[],Cy=new Map};var nO={react_stack_bottom_frame:function(r,o,s){var d=Ai;Ai=!0;try{return r(o,s)}finally{Ai=d}}},fC=nO.react_stack_bottom_frame.bind(nO),rO={react_stack_bottom_frame:function(r){var o=Ai;Ai=!0;try{return r.render()}finally{Ai=o}}},oO=rO.react_stack_bottom_frame.bind(rO),aO={react_stack_bottom_frame:function(r,o){try{o.componentDidMount()}catch(s){_t(r,r.return,s)}}},pC=aO.react_stack_bottom_frame.bind(aO),iO={react_stack_bottom_frame:function(r,o,s,d,p){try{o.componentDidUpdate(s,d,p)}catch(g){_t(r,r.return,g)}}},sO=iO.react_stack_bottom_frame.bind(iO),lO={react_stack_bottom_frame:function(r,o){var s=o.stack;r.componentDidCatch(o.value,{componentStack:s!==null?s:""})}},kW=lO.react_stack_bottom_frame.bind(lO),cO={react_stack_bottom_frame:function(r,o,s){try{s.componentWillUnmount()}catch(d){_t(r,o,d)}}},uO=cO.react_stack_bottom_frame.bind(cO),dO={react_stack_bottom_frame:function(r){var o=r.create;return r=r.inst,o=o(),r.destroy=o}},AW=dO.react_stack_bottom_frame.bind(dO),fO={react_stack_bottom_frame:function(r,o,s){try{s()}catch(d){_t(r,o,d)}}},MW=fO.react_stack_bottom_frame.bind(fO),pO={react_stack_bottom_frame:function(r){var o=r._init;return o(r._payload)}},NW=pO.react_stack_bottom_frame.bind(pO),Of=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."),hC=Error("Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),Ey=Error("Suspense Exception: This is not a real error! It's an implementation detail of `useActionState` to interrupt the current render. You must either rethrow it immediately, or move the `useActionState` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary."),Ty={then:function(){console.error('Internal React error: A listener was unexpectedly attached to a "noop" thenable. This is a bug in React. Please file an issue.')}},Ru=null,Em=!1,Df=null,Tm=0,lt=null,mC,hO=mC=!1,mO={},gO={},bO={};m=function(r,o,s){if(s!==null&&typeof s==="object"&&s._store&&(!s._store.validated&&s.key==null||s._store.validated===2)){if(typeof s._store!=="object")throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");s._store.validated=1;var d=J(r),p=d||"null";if(!mO[p]){mO[p]=!0,s=s._owner,r=r._debugOwner;var g="";r&&typeof r.tag==="number"&&(p=J(r))&&(g=`
225
+
226
+ Check the render method of \``+p+"`."),g||d&&(g=`
227
+
228
+ Check the top-level render call using <`+d+">.");var x="";s!=null&&r!==s&&(d=null,typeof s.tag==="number"?d=J(s):typeof s.name==="string"&&(d=s.name),d&&(x=" It was passed a child from "+d+".")),he(o,function(){console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',g,x)})}}};var ku=c5(!0),yO=c5(!1),vO=0,xO=1,$O=2,gC=3,Wl=!1,SO=!1,bC=null,yC=!1,Pf=ge(null),Ry=ge(0),Do=ge(null),aa=null,Lf=1,Rm=2,Mn=ge(0),ky=0,ia=1,Fr=2,Po=4,Ur=8,_f,wO=new Set,CO=new Set,vC=new Set,EO=new Set,Rs=0,Je=null,Vt=null,_n=null,Ay=!1,If=!1,Au=!1,My=0,km=0,ks=null,OW=0,DW=25,ne=null,sa=null,As=-1,Am=!1,Mm={readContext:rn,use:Ml,useCallback:vn,useContext:vn,useEffect:vn,useImperativeHandle:vn,useLayoutEffect:vn,useInsertionEffect:vn,useMemo:vn,useReducer:vn,useRef:vn,useState:vn,useDebugValue:vn,useDeferredValue:vn,useTransition:vn,useSyncExternalStore:vn,useId:vn,useHostTransitionStatus:vn,useFormState:vn,useActionState:vn,useOptimistic:vn,useMemoCache:vn,useCacheRefresh:vn};Mm.useEffectEvent=vn;var xC=null,TO=null,$C=null,RO=null,Ii=null,Fa=null,Ny=null;xC={readContext:function(r){return rn(r)},use:Ml,useCallback:function(r,o){return ne="useCallback",ft(),Qd(o),yS(r,o)},useContext:function(r){return ne="useContext",ft(),rn(r)},useEffect:function(r,o){return ne="useEffect",ft(),Qd(o),C0(r,o)},useImperativeHandle:function(r,o,s){return ne="useImperativeHandle",ft(),Qd(s),bS(r,o,s)},useInsertionEffect:function(r,o){ne="useInsertionEffect",ft(),Qd(o),pu(4,Fr,r,o)},useLayoutEffect:function(r,o){return ne="useLayoutEffect",ft(),Qd(o),gS(r,o)},useMemo:function(r,o){ne="useMemo",ft(),Qd(o);var s=oe.H;oe.H=Ii;try{return vS(r,o)}finally{oe.H=s}},useReducer:function(r,o,s){ne="useReducer",ft();var d=oe.H;oe.H=Ii;try{return sS(r,o,s)}finally{oe.H=d}},useRef:function(r){return ne="useRef",ft(),hS(r)},useState:function(r){ne="useState",ft();var o=oe.H;oe.H=Ii;try{return dS(r)}finally{oe.H=o}},useDebugValue:function(){ne="useDebugValue",ft()},useDeferredValue:function(r,o){return ne="useDeferredValue",ft(),xS(r,o)},useTransition:function(){return ne="useTransition",ft(),wS()},useSyncExternalStore:function(r,o,s){return ne="useSyncExternalStore",ft(),cS(r,o,s)},useId:function(){return ne="useId",ft(),CS()},useFormState:function(r,o){return ne="useFormState",ft(),v0(),ef(r,o)},useActionState:function(r,o){return ne="useActionState",ft(),ef(r,o)},useOptimistic:function(r){return ne="useOptimistic",ft(),fS(r)},useHostTransitionStatus:hu,useMemoCache:fu,useCacheRefresh:function(){return ne="useCacheRefresh",ft(),ES()},useEffectEvent:function(r){return ne="useEffectEvent",ft(),mS(r)}},TO={readContext:function(r){return rn(r)},use:Ml,useCallback:function(r,o){return ne="useCallback",fe(),yS(r,o)},useContext:function(r){return ne="useContext",fe(),rn(r)},useEffect:function(r,o){return ne="useEffect",fe(),C0(r,o)},useImperativeHandle:function(r,o,s){return ne="useImperativeHandle",fe(),bS(r,o,s)},useInsertionEffect:function(r,o){ne="useInsertionEffect",fe(),pu(4,Fr,r,o)},useLayoutEffect:function(r,o){return ne="useLayoutEffect",fe(),gS(r,o)},useMemo:function(r,o){ne="useMemo",fe();var s=oe.H;oe.H=Ii;try{return vS(r,o)}finally{oe.H=s}},useReducer:function(r,o,s){ne="useReducer",fe();var d=oe.H;oe.H=Ii;try{return sS(r,o,s)}finally{oe.H=d}},useRef:function(r){return ne="useRef",fe(),hS(r)},useState:function(r){ne="useState",fe();var o=oe.H;oe.H=Ii;try{return dS(r)}finally{oe.H=o}},useDebugValue:function(){ne="useDebugValue",fe()},useDeferredValue:function(r,o){return ne="useDeferredValue",fe(),xS(r,o)},useTransition:function(){return ne="useTransition",fe(),wS()},useSyncExternalStore:function(r,o,s){return ne="useSyncExternalStore",fe(),cS(r,o,s)},useId:function(){return ne="useId",fe(),CS()},useActionState:function(r,o){return ne="useActionState",fe(),ef(r,o)},useFormState:function(r,o){return ne="useFormState",fe(),v0(),ef(r,o)},useOptimistic:function(r){return ne="useOptimistic",fe(),fS(r)},useHostTransitionStatus:hu,useMemoCache:fu,useCacheRefresh:function(){return ne="useCacheRefresh",fe(),ES()},useEffectEvent:function(r){return ne="useEffectEvent",fe(),mS(r)}},$C={readContext:function(r){return rn(r)},use:Ml,useCallback:function(r,o){return ne="useCallback",fe(),R0(r,o)},useContext:function(r){return ne="useContext",fe(),rn(r)},useEffect:function(r,o){ne="useEffect",fe(),to(2048,Ur,r,o)},useImperativeHandle:function(r,o,s){return ne="useImperativeHandle",fe(),T0(r,o,s)},useInsertionEffect:function(r,o){return ne="useInsertionEffect",fe(),to(4,Fr,r,o)},useLayoutEffect:function(r,o){return ne="useLayoutEffect",fe(),to(4,Po,r,o)},useMemo:function(r,o){ne="useMemo",fe();var s=oe.H;oe.H=Fa;try{return k0(r,o)}finally{oe.H=s}},useReducer:function(r,o,s){ne="useReducer",fe();var d=oe.H;oe.H=Fa;try{return Zd(r,o,s)}finally{oe.H=d}},useRef:function(){return ne="useRef",fe(),zt().memoizedState},useState:function(){ne="useState",fe();var r=oe.H;oe.H=Fa;try{return Zd(La)}finally{oe.H=r}},useDebugValue:function(){ne="useDebugValue",fe()},useDeferredValue:function(r,o){return ne="useDeferredValue",fe(),N5(r,o)},useTransition:function(){return ne="useTransition",fe(),I5()},useSyncExternalStore:function(r,o,s){return ne="useSyncExternalStore",fe(),$0(r,o,s)},useId:function(){return ne="useId",fe(),zt().memoizedState},useFormState:function(r){return ne="useFormState",fe(),v0(),S0(r)},useActionState:function(r){return ne="useActionState",fe(),S0(r)},useOptimistic:function(r,o){return ne="useOptimistic",fe(),$5(r,o)},useHostTransitionStatus:hu,useMemoCache:fu,useCacheRefresh:function(){return ne="useCacheRefresh",fe(),zt().memoizedState},useEffectEvent:function(r){return ne="useEffectEvent",fe(),E0(r)}},RO={readContext:function(r){return rn(r)},use:Ml,useCallback:function(r,o){return ne="useCallback",fe(),R0(r,o)},useContext:function(r){return ne="useContext",fe(),rn(r)},useEffect:function(r,o){ne="useEffect",fe(),to(2048,Ur,r,o)},useImperativeHandle:function(r,o,s){return ne="useImperativeHandle",fe(),T0(r,o,s)},useInsertionEffect:function(r,o){return ne="useInsertionEffect",fe(),to(4,Fr,r,o)},useLayoutEffect:function(r,o){return ne="useLayoutEffect",fe(),to(4,Po,r,o)},useMemo:function(r,o){ne="useMemo",fe();var s=oe.H;oe.H=Ny;try{return k0(r,o)}finally{oe.H=s}},useReducer:function(r,o,s){ne="useReducer",fe();var d=oe.H;oe.H=Ny;try{return Lh(r,o,s)}finally{oe.H=d}},useRef:function(){return ne="useRef",fe(),zt().memoizedState},useState:function(){ne="useState",fe();var r=oe.H;oe.H=Ny;try{return Lh(La)}finally{oe.H=r}},useDebugValue:function(){ne="useDebugValue",fe()},useDeferredValue:function(r,o){return ne="useDeferredValue",fe(),O5(r,o)},useTransition:function(){return ne="useTransition",fe(),B5()},useSyncExternalStore:function(r,o,s){return ne="useSyncExternalStore",fe(),$0(r,o,s)},useId:function(){return ne="useId",fe(),zt().memoizedState},useFormState:function(r){return ne="useFormState",fe(),v0(),w0(r)},useActionState:function(r){return ne="useActionState",fe(),w0(r)},useOptimistic:function(r,o){return ne="useOptimistic",fe(),w5(r,o)},useHostTransitionStatus:hu,useMemoCache:fu,useCacheRefresh:function(){return ne="useCacheRefresh",fe(),zt().memoizedState},useEffectEvent:function(r){return ne="useEffectEvent",fe(),E0(r)}},Ii={readContext:function(r){return f(),rn(r)},use:function(r){return u(),Ml(r)},useCallback:function(r,o){return ne="useCallback",u(),ft(),yS(r,o)},useContext:function(r){return ne="useContext",u(),ft(),rn(r)},useEffect:function(r,o){return ne="useEffect",u(),ft(),C0(r,o)},useImperativeHandle:function(r,o,s){return ne="useImperativeHandle",u(),ft(),bS(r,o,s)},useInsertionEffect:function(r,o){ne="useInsertionEffect",u(),ft(),pu(4,Fr,r,o)},useLayoutEffect:function(r,o){return ne="useLayoutEffect",u(),ft(),gS(r,o)},useMemo:function(r,o){ne="useMemo",u(),ft();var s=oe.H;oe.H=Ii;try{return vS(r,o)}finally{oe.H=s}},useReducer:function(r,o,s){ne="useReducer",u(),ft();var d=oe.H;oe.H=Ii;try{return sS(r,o,s)}finally{oe.H=d}},useRef:function(r){return ne="useRef",u(),ft(),hS(r)},useState:function(r){ne="useState",u(),ft();var o=oe.H;oe.H=Ii;try{return dS(r)}finally{oe.H=o}},useDebugValue:function(){ne="useDebugValue",u(),ft()},useDeferredValue:function(r,o){return ne="useDeferredValue",u(),ft(),xS(r,o)},useTransition:function(){return ne="useTransition",u(),ft(),wS()},useSyncExternalStore:function(r,o,s){return ne="useSyncExternalStore",u(),ft(),cS(r,o,s)},useId:function(){return ne="useId",u(),ft(),CS()},useFormState:function(r,o){return ne="useFormState",u(),ft(),ef(r,o)},useActionState:function(r,o){return ne="useActionState",u(),ft(),ef(r,o)},useOptimistic:function(r){return ne="useOptimistic",u(),ft(),fS(r)},useMemoCache:function(r){return u(),fu(r)},useHostTransitionStatus:hu,useCacheRefresh:function(){return ne="useCacheRefresh",ft(),ES()},useEffectEvent:function(r){return ne="useEffectEvent",u(),ft(),mS(r)}},Fa={readContext:function(r){return f(),rn(r)},use:function(r){return u(),Ml(r)},useCallback:function(r,o){return ne="useCallback",u(),fe(),R0(r,o)},useContext:function(r){return ne="useContext",u(),fe(),rn(r)},useEffect:function(r,o){ne="useEffect",u(),fe(),to(2048,Ur,r,o)},useImperativeHandle:function(r,o,s){return ne="useImperativeHandle",u(),fe(),T0(r,o,s)},useInsertionEffect:function(r,o){return ne="useInsertionEffect",u(),fe(),to(4,Fr,r,o)},useLayoutEffect:function(r,o){return ne="useLayoutEffect",u(),fe(),to(4,Po,r,o)},useMemo:function(r,o){ne="useMemo",u(),fe();var s=oe.H;oe.H=Fa;try{return k0(r,o)}finally{oe.H=s}},useReducer:function(r,o,s){ne="useReducer",u(),fe();var d=oe.H;oe.H=Fa;try{return Zd(r,o,s)}finally{oe.H=d}},useRef:function(){return ne="useRef",u(),fe(),zt().memoizedState},useState:function(){ne="useState",u(),fe();var r=oe.H;oe.H=Fa;try{return Zd(La)}finally{oe.H=r}},useDebugValue:function(){ne="useDebugValue",u(),fe()},useDeferredValue:function(r,o){return ne="useDeferredValue",u(),fe(),N5(r,o)},useTransition:function(){return ne="useTransition",u(),fe(),I5()},useSyncExternalStore:function(r,o,s){return ne="useSyncExternalStore",u(),fe(),$0(r,o,s)},useId:function(){return ne="useId",u(),fe(),zt().memoizedState},useFormState:function(r){return ne="useFormState",u(),fe(),S0(r)},useActionState:function(r){return ne="useActionState",u(),fe(),S0(r)},useOptimistic:function(r,o){return ne="useOptimistic",u(),fe(),$5(r,o)},useMemoCache:function(r){return u(),fu(r)},useHostTransitionStatus:hu,useCacheRefresh:function(){return ne="useCacheRefresh",fe(),zt().memoizedState},useEffectEvent:function(r){return ne="useEffectEvent",u(),fe(),E0(r)}},Ny={readContext:function(r){return f(),rn(r)},use:function(r){return u(),Ml(r)},useCallback:function(r,o){return ne="useCallback",u(),fe(),R0(r,o)},useContext:function(r){return ne="useContext",u(),fe(),rn(r)},useEffect:function(r,o){ne="useEffect",u(),fe(),to(2048,Ur,r,o)},useImperativeHandle:function(r,o,s){return ne="useImperativeHandle",u(),fe(),T0(r,o,s)},useInsertionEffect:function(r,o){return ne="useInsertionEffect",u(),fe(),to(4,Fr,r,o)},useLayoutEffect:function(r,o){return ne="useLayoutEffect",u(),fe(),to(4,Po,r,o)},useMemo:function(r,o){ne="useMemo",u(),fe();var s=oe.H;oe.H=Fa;try{return k0(r,o)}finally{oe.H=s}},useReducer:function(r,o,s){ne="useReducer",u(),fe();var d=oe.H;oe.H=Fa;try{return Lh(r,o,s)}finally{oe.H=d}},useRef:function(){return ne="useRef",u(),fe(),zt().memoizedState},useState:function(){ne="useState",u(),fe();var r=oe.H;oe.H=Fa;try{return Lh(La)}finally{oe.H=r}},useDebugValue:function(){ne="useDebugValue",u(),fe()},useDeferredValue:function(r,o){return ne="useDeferredValue",u(),fe(),O5(r,o)},useTransition:function(){return ne="useTransition",u(),fe(),B5()},useSyncExternalStore:function(r,o,s){return ne="useSyncExternalStore",u(),fe(),$0(r,o,s)},useId:function(){return ne="useId",u(),fe(),zt().memoizedState},useFormState:function(r){return ne="useFormState",u(),fe(),w0(r)},useActionState:function(r){return ne="useActionState",u(),fe(),w0(r)},useOptimistic:function(r,o){return ne="useOptimistic",u(),fe(),w5(r,o)},useMemoCache:function(r){return u(),fu(r)},useHostTransitionStatus:hu,useCacheRefresh:function(){return ne="useCacheRefresh",fe(),zt().memoizedState},useEffectEvent:function(r){return ne="useEffectEvent",u(),fe(),E0(r)}};var kO={},AO=new Set,MO=new Set,NO=new Set,OO=new Set,DO=new Set,PO=new Set,LO=new Set,_O=new Set,IO=new Set,BO=new Set;Object.freeze(kO);var SC={enqueueSetState:function(r,o,s){r=r._reactInternals;var d=Ro(r),p=Tl(d);p.payload=o,s!==void 0&&s!==null&&(RS(s),p.callback=s),o=Rl(r,p,d),o!==null&&(hi(d,"this.setState()",r),pn(o,r,d),Nh(o,r,d))},enqueueReplaceState:function(r,o,s){r=r._reactInternals;var d=Ro(r),p=Tl(d);p.tag=xO,p.payload=o,s!==void 0&&s!==null&&(RS(s),p.callback=s),o=Rl(r,p,d),o!==null&&(hi(d,"this.replaceState()",r),pn(o,r,d),Nh(o,r,d))},enqueueForceUpdate:function(r,o){r=r._reactInternals;var s=Ro(r),d=Tl(s);d.tag=$O,o!==void 0&&o!==null&&(RS(o),d.callback=o),o=Rl(r,d,s),o!==null&&(hi(s,"this.forceUpdate()",r),pn(o,r,s),Nh(o,r,s))}},Bf=null,wC=null,CC=Error("This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."),In=!1,zO={},HO={},FO={},UO={},zf=!1,VO={},Oy={},EC={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},jO=!1,KO=null;KO=new Set;var Ms=!1,Bn=!1,TC=!1,qO=typeof WeakSet==="function"?WeakSet:Set,er=null,Hf=null,Ff=null,zn=null,oo=!1,Ua=null,Gn=!1,Nm=8192,PW={getCacheForType:function(r){var o=rn(Pn),s=o.data.get(r);return s===void 0&&(s=r(),o.data.set(r,s)),s},cacheSignal:function(){return rn(Pn).controller.signal},getOwner:function(){return Mo}};if(typeof Symbol==="function"&&Symbol.for){var Om=Symbol.for;Om("selector.component"),Om("selector.has_pseudo_class"),Om("selector.role"),Om("selector.test_id"),Om("selector.text")}var LW=[],_W=typeof WeakMap==="function"?WeakMap:Map,tr=0,Wn=2,Lo=4,Ns=0,Dm=1,Mu=2,Dy=3,Yl=4,Py=6,GO=5,kt=tr,jt=null,dt=null,ct=0,ao=0,Ly=1,Nu=2,Pm=3,WO=4,RC=5,Lm=6,_y=7,kC=8,Ou=9,Ht=ao,_o=null,Jl=!1,Uf=!1,AC=!1,Bi=0,dn=Ns,Xl=0,Ql=0,MC=0,io=0,Du=0,_m=null,Vr=null,Iy=!1,By=0,YO=0,JO=300,zy=1/0,XO=500,Im=null,xn=null,Zl=null,Hy=0,NC=1,OC=2,QO=3,ec=0,ZO=1,e6=2,t6=3,n6=4,Fy=5,Hn=0,tc=null,Vf=null,Va=0,DC=0,PC=-0,LC=null,r6=null,o6=null,ja=Hy,a6=null,IW=50,Bm=0,_C=null,IC=!1,Uy=!1,BW=50,Pu=0,zm=null,jf=!1,Vy=null,i6=!1,s6=new Set,zW={},jy=null,Kf=null,BC=!1,zC=!1,Ky=!1,HC=!1,nc=0,FC={};(function(){for(var r=0;r<Qw.length;r++){var o=Qw[r],s=o.toLowerCase();o=o[0].toUpperCase()+o.slice(1),Pa(s,"on"+o)}Pa(I8,"onAnimationEnd"),Pa(B8,"onAnimationIteration"),Pa(z8,"onAnimationStart"),Pa("dblclick","onDoubleClick"),Pa("focusin","onFocus"),Pa("focusout","onBlur"),Pa(mW,"onTransitionRun"),Pa(gW,"onTransitionStart"),Pa(bW,"onTransitionCancel"),Pa(H8,"onTransitionEnd")})(),xo("onMouseEnter",["mouseout","mouseover"]),xo("onMouseLeave",["mouseout","mouseover"]),xo("onPointerEnter",["pointerout","pointerover"]),xo("onPointerLeave",["pointerout","pointerover"]),wr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),wr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),wr("onBeforeInput",["compositionend","keypress","textInput","paste"]),wr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),wr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),wr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Hm="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(" "),UC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Hm)),qy="_reactListening"+Math.random().toString(36).slice(2),l6=!1,c6=!1,Gy=!1,u6=!1,Wy=!1,Yy=!1,d6=!1,Jy={},HW=/\r\n?/g,FW=/\u0000|\uFFFD/g,Lu="http://www.w3.org/1999/xlink",VC="http://www.w3.org/XML/1998/namespace",UW="javascript:throw new Error('React form unexpectedly submitted.')",VW="suppressHydrationWarning",_u="&",Xy="/&",Fm="$",Um="/$",rc="$?",Iu="$~",qf="$!",jW="html",KW="body",qW="head",jC="F!",f6="F",p6="loading",GW="style",Os=0,Gf=1,Qy=2,KC=null,qC=null,h6={dialog:!0,webview:!0},GC=null,Vm=void 0,m6=typeof setTimeout==="function"?setTimeout:void 0,WW=typeof clearTimeout==="function"?clearTimeout:void 0,Bu=-1,g6=typeof Promise==="function"?Promise:void 0,YW=typeof queueMicrotask==="function"?queueMicrotask:typeof g6<"u"?function(r){return g6.resolve(null).then(r).catch(Dq)}:m6,WC=null,zu=0,jm=1,b6=2,y6=3,la=4,ca=new Map,v6=new Set,Ds=It.d;It.d={f:function(){var r=Ds.f(),o=af();return r||o},r:function(r){var o=et(r);o!==null&&o.tag===5&&o.type==="form"?_5(o):Ds.r(r)},D:function(r){Ds.D(r),AN("dns-prefetch",r,null)},C:function(r,o){Ds.C(r,o),AN("preconnect",r,o)},L:function(r,o,s){Ds.L(r,o,s);var d=Wf;if(d&&r&&o){var p='link[rel="preload"][as="'+Jo(o)+'"]';o==="image"?s&&s.imageSrcSet?(p+='[imagesrcset="'+Jo(s.imageSrcSet)+'"]',typeof s.imageSizes==="string"&&(p+='[imagesizes="'+Jo(s.imageSizes)+'"]')):p+='[href="'+Jo(r)+'"]':p+='[href="'+Jo(r)+'"]';var g=p;switch(o){case"style":g=cf(r);break;case"script":g=uf(r)}ca.has(g)||(r=pt({rel:"preload",href:o==="image"&&s&&s.imageSrcSet?void 0:r,as:o},s),ca.set(g,r),d.querySelector(p)!==null||o==="style"&&d.querySelector(Jh(g))||o==="script"&&d.querySelector(Xh(g))||(o=d.createElement("link"),lr(o,"link",r),je(o),d.head.appendChild(o)))}},m:function(r,o){Ds.m(r,o);var s=Wf;if(s&&r){var d=o&&typeof o.as==="string"?o.as:"script",p='link[rel="modulepreload"][as="'+Jo(d)+'"][href="'+Jo(r)+'"]',g=p;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=uf(r)}if(!ca.has(g)&&(r=pt({rel:"modulepreload",href:r},o),ca.set(g,r),s.querySelector(p)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Xh(g)))return}d=s.createElement("link"),lr(d,"link",r),je(d),s.head.appendChild(d)}}},X:function(r,o){Ds.X(r,o);var s=Wf;if(s&&r){var d=Mt(s).hoistableScripts,p=uf(r),g=d.get(p);g||(g=s.querySelector(Xh(p)),g||(r=pt({src:r,async:!0},o),(o=ca.get(p))&&bw(r,o),g=s.createElement("script"),je(g),lr(g,"link",r),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},d.set(p,g))}},S:function(r,o,s){Ds.S(r,o,s);var d=Wf;if(d&&r){var p=Mt(d).hoistableStyles,g=cf(r);o=o||"default";var x=p.get(g);if(!x){var w={loading:zu,preload:null};if(x=d.querySelector(Jh(g)))w.loading=jm|la;else{r=pt({rel:"stylesheet",href:r,"data-precedence":o},s),(s=ca.get(g))&&gw(r,s);var T=x=d.createElement("link");je(T),lr(T,"link",r),T._p=new Promise(function(A,G){T.onload=A,T.onerror=G}),T.addEventListener("load",function(){w.loading|=jm}),T.addEventListener("error",function(){w.loading|=b6}),w.loading|=la,G0(x,o,d)}x={type:"stylesheet",instance:x,count:1,state:w},p.set(g,x)}}},M:function(r,o){Ds.M(r,o);var s=Wf;if(s&&r){var d=Mt(s).hoistableScripts,p=uf(r),g=d.get(p);g||(g=s.querySelector(Xh(p)),g||(r=pt({src:r,async:!0,type:"module"},o),(o=ca.get(p))&&bw(r,o),g=s.createElement("script"),je(g),lr(g,"link",r),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},d.set(p,g))}}};var Wf=typeof document>"u"?null:document,Zy=null,JW=60000,XW=800,QW=500,YC=0,JC=null,ev=null,Hu=pG,Km={$$typeof:ki,Provider:null,Consumer:null,_currentValue:Hu,_currentValue2:Hu,_threadCount:0},x6="%c%s%c",$6="background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",S6="",tv=" ",ZW=Function.prototype.bind,w6=!1,C6=null,E6=null,T6=null,R6=null,k6=null,A6=null,M6=null,N6=null,O6=null,D6=null;C6=function(r,o,s,d){o=e(r,o),o!==null&&(s=t(o.memoizedState,s,0,d),o.memoizedState=s,o.baseState=s,r.memoizedProps=pt({},r.memoizedProps),s=Cr(r,2),s!==null&&pn(s,r,2))},E6=function(r,o,s){o=e(r,o),o!==null&&(s=i(o.memoizedState,s,0),o.memoizedState=s,o.baseState=s,r.memoizedProps=pt({},r.memoizedProps),s=Cr(r,2),s!==null&&pn(s,r,2))},T6=function(r,o,s,d){o=e(r,o),o!==null&&(s=n(o.memoizedState,s,d),o.memoizedState=s,o.baseState=s,r.memoizedProps=pt({},r.memoizedProps),s=Cr(r,2),s!==null&&pn(s,r,2))},R6=function(r,o,s){r.pendingProps=t(r.memoizedProps,o,0,s),r.alternate&&(r.alternate.pendingProps=r.pendingProps),o=Cr(r,2),o!==null&&pn(o,r,2)},k6=function(r,o){r.pendingProps=i(r.memoizedProps,o,0),r.alternate&&(r.alternate.pendingProps=r.pendingProps),o=Cr(r,2),o!==null&&pn(o,r,2)},A6=function(r,o,s){r.pendingProps=n(r.memoizedProps,o,s),r.alternate&&(r.alternate.pendingProps=r.pendingProps),o=Cr(r,2),o!==null&&pn(o,r,2)},M6=function(r){var o=Cr(r,2);o!==null&&pn(o,r,2)},N6=function(r){var o=Kd(),s=Cr(r,o);s!==null&&pn(s,r,o)},O6=function(r){c=r},D6=function(r){l=r};var nv=!0,rv=null,XC=!1,oc=null,ac=null,ic=null,qm=new Map,Gm=new Map,sc=[],eY="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(" "),ov=null;if(Q0.prototype.render=ww.prototype.render=function(r){var o=this._internalRoot;if(o===null)throw Error("Cannot update an unmounted root.");var s=arguments;typeof s[1]==="function"?console.error("does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):E(s[1])?console.error("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."):typeof s[1]<"u"&&console.error("You passed a second argument to root.render(...) but it only accepts one argument."),s=r;var d=o.current,p=Ro(d);yw(d,p,s,o,null,null)},Q0.prototype.unmount=ww.prototype.unmount=function(){var r=arguments;if(typeof r[0]==="function"&&console.error("does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."),r=this._internalRoot,r!==null){this._internalRoot=null;var o=r.containerInfo;(kt&(Wn|Lo))!==tr&&console.error("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."),yw(r.current,2,null,r,null,null),af(),o[Il]=null}},Q0.prototype.unstable_scheduleHydration=function(r){if(r){var o=ee();r={blockedOn:null,target:r,priority:o};for(var s=0;s<sc.length&&o!==0&&o<sc[s].priority;s++);sc.splice(s,0,r),s===0&&VN(r)}},function(){var r=Zf.version;if(r!=="19.2.7")throw Error(`Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:
229
+ - react: `+(r+`
230
+ - react-dom: 19.2.7
231
+ Learn more: https://react.dev/warnings/version-mismatch`))}(),typeof Map==="function"&&Map.prototype!=null&&typeof Map.prototype.forEach==="function"&&typeof Set==="function"&&Set.prototype!=null&&typeof Set.prototype.clear==="function"&&typeof Set.prototype.forEach==="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://react.dev/link/react-polyfills"),It.findDOMNode=function(r){var o=r._reactInternals;if(o===void 0){if(typeof r.render==="function")throw Error("Unable to find node on an unmounted component.");throw r=Object.keys(r).join(","),Error("Argument appears to not be a ReactComponent. Keys: "+r)}return r=L(o),r=r!==null?Q(r):null,r=r===null?null:r.stateNode,r},!function(){var r={bundleType:1,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:oe,reconcilerVersion:"19.2.7"};return r.overrideHookState=C6,r.overrideHookStateDeletePath=E6,r.overrideHookStateRenamePath=T6,r.overrideProps=R6,r.overridePropsDeletePath=k6,r.overridePropsRenamePath=A6,r.scheduleUpdate=M6,r.scheduleRetry=N6,r.setErrorHandler=O6,r.setSuspenseHandler=D6,r.scheduleRefresh=S,r.scheduleRoot=v,r.setRefreshHandler=C,r.getCurrentFiber=aG,jd(r)}()&&Di&&window.top===window.self&&(-1<navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Edge")===-1||-1<navigator.userAgent.indexOf("Firefox"))){var P6=window.location.protocol;/^(https?|file):$/.test(P6)&&console.info("%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools"+(P6==="file:"?`
232
+ You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:""),"font-weight:bold")}LY.createRoot=function(r,o){if(!E(r))throw Error("Target container is not a DOM element.");GN(r);var s=!1,d="",p=j5,g=K5,x=q5;return o!==null&&o!==void 0&&(o.hydrate?console.warn("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof o==="object"&&o!==null&&o.$$typeof===Ri&&console.error(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
233
+
234
+ let root = createRoot(domContainer);
235
+ root.render(<App />);`),o.unstable_strictMode===!0&&(s=!0),o.identifierPrefix!==void 0&&(d=o.identifierPrefix),o.onUncaughtError!==void 0&&(p=o.onUncaughtError),o.onCaughtError!==void 0&&(g=o.onCaughtError),o.onRecoverableError!==void 0&&(x=o.onRecoverableError)),o=_N(r,1,!1,null,null,s,d,null,p,g,x,qN),r[Il]=o.current,ow(r),new ww(o)},LY.hydrateRoot=function(r,o,s){if(!E(r))throw Error("Target container is not a DOM element.");GN(r),o===void 0&&console.error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var d=!1,p="",g=j5,x=K5,w=q5,T=null;return s!==null&&s!==void 0&&(s.unstable_strictMode===!0&&(d=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onUncaughtError!==void 0&&(g=s.onUncaughtError),s.onCaughtError!==void 0&&(x=s.onCaughtError),s.onRecoverableError!==void 0&&(w=s.onRecoverableError),s.formState!==void 0&&(T=s.formState)),o=_N(r,1,!0,o,s!=null?s:null,d,p,T,g,x,w,qN),o.context=IN(null),s=o.current,d=Ro(s),d=nu(d),p=Tl(d),p.callback=null,Rl(s,p,d),hi(d,"hydrateRoot()",null),s=d,o.current.lanes=s,vl(o,s),Ei(o),r[Il]=o.current,ow(r),new Q0(o)},LY.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var Q6=zi(function(Que,X6){var _Y=q(J6());X6.exports=_Y});function Z6(e,t){if(typeof e==="function")return e(t);else if(e!==null&&e!==void 0)e.current=t}function e7(...e){return(t)=>{let n=!1,a=e.map((i)=>{let l=Z6(i,t);if(!n&&typeof l=="function")n=!0;return l});if(n)return()=>{for(let i=0;i<a.length;i++){let l=a[i];if(typeof l=="function")l();else Z6(e[i],null)}}}}var IY;var t7=N(()=>{IY=q(ae(),1)});function zY(e){return typeof e==="object"&&e!==null&&"then"in e}function n7(e){return e!=null&&typeof e==="object"&&"$$typeof"in e&&e.$$typeof===BY&&"_payload"in e&&zY(e._payload)}function HY(e){let t=FY(e),n=Fn.forwardRef((a,i)=>{let{children:l,...c}=a;if(n7(l)&&typeof gv==="function")l=gv(l._payload);let u=Fn.Children.toArray(l),f=u.find(VY);if(f){let h=f.props.children,m=u.map((b)=>{if(b===f){if(Fn.Children.count(h)>1)return Fn.Children.only(null);return Fn.isValidElement(h)?h.props.children:null}else return b});return mv.jsx(t,{...c,ref:i,children:Fn.isValidElement(h)?Fn.cloneElement(h,void 0,m):null})}return mv.jsx(t,{...c,ref:i,children:l})});return n.displayName=`${e}.Slot`,n}function FY(e){let t=Fn.forwardRef((n,a)=>{let{children:i,...l}=n;if(n7(i)&&typeof gv==="function")i=gv(i._payload);if(Fn.isValidElement(i)){let c=KY(i),u=jY(l,i.props);if(i.type!==Fn.Fragment)u.ref=a?e7(a,c):c;return Fn.cloneElement(i,u)}return Fn.Children.count(i)>1?Fn.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}function VY(e){return Fn.isValidElement(e)&&typeof e.type==="function"&&"__radixId"in e.type&&e.type.__radixId===UY}function jY(e,t){let n={...t};for(let a in t){let i=e[a],l=t[a];if(/^on[A-Z]/.test(a)){if(i&&l)n[a]=(...u)=>{let f=l(...u);return i(...u),f};else if(i)n[a]=i}else if(a==="style")n[a]={...i,...l};else if(a==="className")n[a]=[i,l].filter(Boolean).join(" ")}return{...e,...n}}function KY(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}var Fn,mv,BY,gv,r7,UY;var o7=N(()=>{t7();Fn=q(ae(),1),mv=q(so(),1),BY=Symbol.for("react.lazy"),gv=Fn[" use ".trim().toString()];r7=HY("Slot");UY=Symbol("radix.slottable")});function a7(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=a7(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function zo(){for(var e,t,n=0,a="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=a7(e))&&(a&&(a+=" "),a+=t);return a}var i7;var Ls=N(()=>{i7=zo});var s7=(e)=>typeof e==="boolean"?`${e}`:e===0?"0":e,l7,c7=(e,t)=>(n)=>{var a;if((t===null||t===void 0?void 0:t.variants)==null)return l7(e,n===null||n===void 0?void 0:n.class,n===null||n===void 0?void 0:n.className);let{variants:i,defaultVariants:l}=t,c=Object.keys(i).map((h)=>{let m=n===null||n===void 0?void 0:n[h],b=l===null||l===void 0?void 0:l[h];if(m===null)return null;let y=s7(m)||s7(b);return i[h][y]}),u=n&&Object.entries(n).reduce((h,m)=>{let[b,y]=m;if(y===void 0)return h;return h[b]=y,h},{}),f=t===null||t===void 0?void 0:(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((h,m)=>{let{class:b,className:y,...v}=m;return Object.entries(v).every((S)=>{let[C,E]=S;return Array.isArray(E)?E.includes({...l,...u}[C]):{...l,...u}[C]===E})?[...h,b,y]:h},[]);return l7(e,c,f,n===null||n===void 0?void 0:n.class,n===null||n===void 0?void 0:n.className)};var u7=N(()=>{Ls();l7=zo});var qY=(e,t)=>{let n=Array(e.length+t.length);for(let a=0;a<e.length;a++)n[a]=e[a];for(let a=0;a<t.length;a++)n[e.length+a]=t[a];return n},GY=(e,t)=>({classGroupId:e,validator:t}),y7=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),d7,WY=(e)=>{let t=JY(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:(c)=>{if(c.startsWith("[")&&c.endsWith("]"))return YY(c);let u=c.split("-"),f=u[0]===""&&u.length>1?1:0;return v7(u,f,t)},getConflictingClassGroupIds:(c,u)=>{if(u){let f=a[c],h=n[c];if(f){if(h)return qY(h,f);return f}return h||d7}return n[c]||d7}}},v7=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let i=e[t],l=n.nextPart.get(i);if(l){let h=v7(e,t+1,l);if(h)return h}let c=n.validators;if(c===null)return;let u=t===0?e.join("-"):e.slice(t).join("-"),f=c.length;for(let h=0;h<f;h++){let m=c[h];if(m.validator(u))return m.classGroupId}return},YY=(e)=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(":"),a=t.slice(0,n);return a?"arbitrary.."+a:void 0})(),JY=(e)=>{let{theme:t,classGroups:n}=e;return XY(n,t)},XY=(e,t)=>{let n=y7();for(let a in e){let i=e[a];gE(i,n,a,t)}return n},gE=(e,t,n,a)=>{let i=e.length;for(let l=0;l<i;l++){let c=e[l];QY(c,t,n,a)}},QY=(e,t,n,a)=>{if(typeof e==="string"){ZY(e,t,n);return}if(typeof e==="function"){eJ(e,t,n,a);return}tJ(e,t,n,a)},ZY=(e,t,n)=>{let a=e===""?t:x7(t,e);a.classGroupId=n},eJ=(e,t,n,a)=>{if(nJ(e)){gE(e(a),t,n,a);return}if(t.validators===null)t.validators=[];t.validators.push(GY(n,e))},tJ=(e,t,n,a)=>{let i=Object.entries(e),l=i.length;for(let c=0;c<l;c++){let[u,f]=i[c];gE(f,x7(t,u),n,a)}},x7=(e,t)=>{let n=e,a=t.split("-"),i=a.length;for(let l=0;l<i;l++){let c=a[l],u=n.nextPart.get(c);if(!u)u=y7(),n.nextPart.set(c,u);n=u}return n},nJ=(e)=>("isThemeGetter"in e)&&e.isThemeGetter===!0,rJ=(e)=>{if(e<1)return{get:()=>{return},set:()=>{}};let t=0,n=Object.create(null),a=Object.create(null),i=(l,c)=>{if(n[l]=c,t++,t>e)t=0,a=n,n=Object.create(null)};return{get(l){let c=n[l];if(c!==void 0)return c;if((c=a[l])!==void 0)return i(l,c),c},set(l,c){if(l in n)n[l]=c;else i(l,c)}}},oJ,f7=(e,t,n,a,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:a,isExternal:i}),aJ=(e)=>{let{prefix:t,experimentalParseClassName:n}=e,a=(i)=>{let l=[],c=0,u=0,f=0,h,m=i.length;for(let C=0;C<m;C++){let E=i[C];if(c===0&&u===0){if(E===":"){l.push(i.slice(f,C)),f=C+1;continue}if(E==="/"){h=C;continue}}if(E==="[")c++;else if(E==="]")c--;else if(E==="(")u++;else if(E===")")u--}let b=l.length===0?i:i.slice(f),y=b,v=!1;if(b.endsWith("!"))y=b.slice(0,-1),v=!0;else if(b.startsWith("!"))y=b.slice(1),v=!0;let S=h&&h>f?h-f:void 0;return f7(l,v,y,S)};if(t){let i=t+":",l=a;a=(c)=>c.startsWith(i)?l(c.slice(i.length)):f7(oJ,!1,c,void 0,!0)}if(n){let i=a;a=(l)=>n({className:l,parseClassName:i})}return a},iJ=(e)=>{let t=new Map;return e.orderSensitiveModifiers.forEach((n,a)=>{t.set(n,1e6+a)}),(n)=>{let a=[],i=[];for(let l=0;l<n.length;l++){let c=n[l],u=c[0]==="[",f=t.has(c);if(u||f){if(i.length>0)i.sort(),a.push(...i),i=[];a.push(c)}else i.push(c)}if(i.length>0)i.sort(),a.push(...i);return a}},sJ=(e)=>({cache:rJ(e.cacheSize),parseClassName:aJ(e),sortModifiers:iJ(e),postfixLookupClassGroupIds:lJ(e),...WY(e)}),lJ=(e)=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let a=0;a<n.length;a++)t[n[a]]=!0;return t},cJ,uJ=(e,t)=>{let{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:i,sortModifiers:l,postfixLookupClassGroupIds:c}=t,u=[],f=e.trim().split(cJ),h="";for(let m=f.length-1;m>=0;m-=1){let b=f[m],{isExternal:y,modifiers:v,hasImportantModifier:S,baseClassName:C,maybePostfixModifierPosition:E}=n(b);if(y){h=b+(h.length>0?" "+h:h);continue}let R=!!E,D;if(R){let V=C.substring(0,E);D=a(V);let P=D&&c[D]?a(C):void 0;if(P&&P!==D)D=P,R=!1}else D=a(C);if(!D){if(!R){h=b+(h.length>0?" "+h:h);continue}if(D=a(C),!D){h=b+(h.length>0?" "+h:h);continue}R=!1}let U=v.length===0?"":v.length===1?v[0]:l(v).join(":"),z=S?U+"!":U,L=z+D;if(u.indexOf(L)>-1)continue;u.push(L);let Q=i(D,R);for(let V=0;V<Q.length;++V){let P=Q[V];u.push(z+P)}h=b+(h.length>0?" "+h:h)}return h},dJ=(...e)=>{let t=0,n,a,i="";while(t<e.length)if(n=e[t++]){if(a=$7(n))i&&(i+=" "),i+=a}return i},$7=(e)=>{if(typeof e==="string")return e;let t,n="";for(let a=0;a<e.length;a++)if(e[a]){if(t=$7(e[a]))n&&(n+=" "),n+=t}return n},p7=(e,...t)=>{let n,a,i,l,c=(f)=>{let h=t.reduce((m,b)=>b(m),e());return n=sJ(h),a=n.cache.get,i=n.cache.set,l=u,u(f)},u=(f)=>{let h=a(f);if(h)return h;let m=uJ(f,n);return i(f,m),m};return l=c,(...f)=>l(dJ(...f))},fJ,Yn=(e)=>{let t=(n)=>n[e]||fJ;return t.isThemeGetter=!0,t},S7,w7,pJ,hJ,mJ,gJ,bJ,yJ,uc=(e)=>pJ.test(e),bt=(e)=>!!e&&!Number.isNaN(Number(e)),Fi=(e)=>!!e&&Number.isInteger(Number(e)),hE=(e)=>e.endsWith("%")&&bt(e.slice(0,-1)),_s=(e)=>hJ.test(e),C7=()=>!0,vJ=(e)=>mJ.test(e)&&!gJ.test(e),bE=()=>!1,xJ=(e)=>bJ.test(e),$J=(e)=>yJ.test(e),SJ=(e)=>!Ne(e)&&!De(e),wJ=(e)=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),CJ=(e)=>dc(e,R7,bE),Ne=(e)=>S7.test(e),ju=(e)=>dc(e,k7,vJ),h7=(e)=>dc(e,OJ,bt),EJ=(e)=>dc(e,M7,C7),TJ=(e)=>dc(e,A7,bE),m7=(e)=>dc(e,E7,bE),RJ=(e)=>dc(e,T7,$J),bv=(e)=>dc(e,N7,xJ),De=(e)=>w7.test(e),eg=(e)=>Ku(e,k7),kJ=(e)=>Ku(e,A7),g7=(e)=>Ku(e,E7),AJ=(e)=>Ku(e,R7),MJ=(e)=>Ku(e,T7),yv=(e)=>Ku(e,N7,!0),NJ=(e)=>Ku(e,M7,!0),dc=(e,t,n)=>{let a=S7.exec(e);if(a){if(a[1])return t(a[1]);return n(a[2])}return!1},Ku=(e,t,n=!1)=>{let a=w7.exec(e);if(a){if(a[1])return t(a[1]);return n}return!1},E7=(e)=>e==="position"||e==="percentage",T7=(e)=>e==="image"||e==="url",R7=(e)=>e==="length"||e==="size"||e==="bg-size",k7=(e)=>e==="length",OJ=(e)=>e==="number",A7=(e)=>e==="family-name",M7=(e)=>e==="number"||e==="weight",N7=(e)=>e==="shadow",b7=()=>{let e=Yn("color"),t=Yn("font"),n=Yn("text"),a=Yn("font-weight"),i=Yn("tracking"),l=Yn("leading"),c=Yn("breakpoint"),u=Yn("container"),f=Yn("spacing"),h=Yn("radius"),m=Yn("shadow"),b=Yn("inset-shadow"),y=Yn("text-shadow"),v=Yn("drop-shadow"),S=Yn("blur"),C=Yn("perspective"),E=Yn("aspect"),R=Yn("ease"),D=Yn("animate"),U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],L=()=>[...z(),De,Ne],Q=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto","contain","none"],P=()=>[De,Ne,f],re=()=>[uc,"full","auto",...P()],J=()=>[Fi,"none","subgrid",De,Ne],ge=()=>["auto",{span:["full",Fi,De,Ne]},Fi,De,Ne],le=()=>[Fi,"auto",De,Ne],se=()=>["auto","min","max","fr",De,Ne],I=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],Y=()=>["auto",...P()],Z=()=>[uc,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],de=()=>[uc,"screen","full","dvw","lvw","svw","min","max","fit",...P()],K=()=>[uc,"screen","full","lh","dvh","lvh","svh","min","max","fit",...P()],k=()=>[e,De,Ne],X=()=>[...z(),g7,m7,{position:[De,Ne]}],ve=()=>["no-repeat",{repeat:["","x","y","space","round"]}],$e=()=>["auto","cover","contain",AJ,CJ,{size:[De,Ne]}],Ae=()=>[hE,eg,ju],Fe=()=>["","none","full",h,De,Ne],Te=()=>["",bt,eg,ju],Ze=()=>["solid","dashed","dotted","double"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Oe=()=>[bt,hE,g7,m7],Rt=()=>["","none",S,De,Ne],he=()=>["none",bt,De,Ne],cn=()=>["none",bt,De,Ne],Dn=()=>[bt,De,Ne],An=()=>[uc,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[_s],breakpoint:[_s],color:[C7],container:[_s],"drop-shadow":[_s],ease:["in","out","in-out"],font:[SJ],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[_s],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[_s],shadow:[_s],spacing:["px",bt],text:[_s],"text-shadow":[_s],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",uc,Ne,De,E]}],container:["container"],"container-type":[{"@container":["","normal","size",De,Ne]}],"container-named":[wJ],columns:[{columns:[bt,Ne,De,u]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"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:L()}],overflow:[{overflow:Q()}],"overflow-x":[{"overflow-x":Q()}],"overflow-y":[{"overflow-y":Q()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:re()}],"inset-x":[{"inset-x":re()}],"inset-y":[{"inset-y":re()}],start:[{"inset-s":re(),start:re()}],end:[{"inset-e":re(),end:re()}],"inset-bs":[{"inset-bs":re()}],"inset-be":[{"inset-be":re()}],top:[{top:re()}],right:[{right:re()}],bottom:[{bottom:re()}],left:[{left:re()}],visibility:["visible","invisible","collapse"],z:[{z:[Fi,"auto",De,Ne]}],basis:[{basis:[uc,"full","auto",u,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[bt,uc,"auto","initial","none",Ne]}],grow:[{grow:["",bt,De,Ne]}],shrink:[{shrink:["",bt,De,Ne]}],order:[{order:[Fi,"first","last","none",De,Ne]}],"grid-cols":[{"grid-cols":J()}],"col-start-end":[{col:ge()}],"col-start":[{"col-start":le()}],"col-end":[{"col-end":le()}],"grid-rows":[{"grid-rows":J()}],"row-start-end":[{row:ge()}],"row-start":[{"row-start":le()}],"row-end":[{"row-end":le()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":se()}],"auto-rows":[{"auto-rows":se()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...I(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",...I()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":I()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pbs:[{pbs:P()}],pbe:[{pbe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:Y()}],mx:[{mx:Y()}],my:[{my:Y()}],ms:[{ms:Y()}],me:[{me:Y()}],mbs:[{mbs:Y()}],mbe:[{mbe:Y()}],mt:[{mt:Y()}],mr:[{mr:Y()}],mb:[{mb:Y()}],ml:[{ml:Y()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],"inline-size":[{inline:["auto",...de()]}],"min-inline-size":[{"min-inline":["auto",...de()]}],"max-inline-size":[{"max-inline":["none",...de()]}],"block-size":[{block:["auto",...K()]}],"min-block-size":[{"min-block":["auto",...K()]}],"max-block-size":[{"max-block":["none",...K()]}],w:[{w:[u,"screen",...Z()]}],"min-w":[{"min-w":[u,"screen","none",...Z()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[c]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",n,eg,ju]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,NJ,EJ]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",hE,Ne]}],"font-family":[{font:[kJ,TJ,t]}],"font-features":[{"font-features":[Ne]}],"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,De,Ne]}],"line-clamp":[{"line-clamp":[bt,"none",De,h7]}],leading:[{leading:[l,...P()]}],"list-image":[{"list-image":["none",De,Ne]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",De,Ne]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ze(),"wavy"]}],"text-decoration-thickness":[{decoration:[bt,"from-font","auto",De,ju]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[bt,"auto",De,Ne]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"tab-size":[{tab:[Fi,De,Ne]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",De,Ne]}],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",De,Ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:X()}],"bg-repeat":[{bg:ve()}],"bg-size":[{bg:$e()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Fi,De,Ne],radial:["",De,Ne],conic:[Fi,De,Ne]},MJ,RJ]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:Ae()}],"gradient-via-pos":[{via:Ae()}],"gradient-to-pos":[{to:Ae()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:Fe()}],"rounded-s":[{"rounded-s":Fe()}],"rounded-e":[{"rounded-e":Fe()}],"rounded-t":[{"rounded-t":Fe()}],"rounded-r":[{"rounded-r":Fe()}],"rounded-b":[{"rounded-b":Fe()}],"rounded-l":[{"rounded-l":Fe()}],"rounded-ss":[{"rounded-ss":Fe()}],"rounded-se":[{"rounded-se":Fe()}],"rounded-ee":[{"rounded-ee":Fe()}],"rounded-es":[{"rounded-es":Fe()}],"rounded-tl":[{"rounded-tl":Fe()}],"rounded-tr":[{"rounded-tr":Fe()}],"rounded-br":[{"rounded-br":Fe()}],"rounded-bl":[{"rounded-bl":Fe()}],"border-w":[{border:Te()}],"border-w-x":[{"border-x":Te()}],"border-w-y":[{"border-y":Te()}],"border-w-s":[{"border-s":Te()}],"border-w-e":[{"border-e":Te()}],"border-w-bs":[{"border-bs":Te()}],"border-w-be":[{"border-be":Te()}],"border-w-t":[{"border-t":Te()}],"border-w-r":[{"border-r":Te()}],"border-w-b":[{"border-b":Te()}],"border-w-l":[{"border-l":Te()}],"divide-x":[{"divide-x":Te()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Te()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ze(),"hidden","none"]}],"divide-style":[{divide:[...Ze(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-bs":[{"border-bs":k()}],"border-color-be":[{"border-be":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...Ze(),"none","hidden"]}],"outline-offset":[{"outline-offset":[bt,De,Ne]}],"outline-w":[{outline:["",bt,eg,ju]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",m,yv,bv]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",b,yv,bv]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:Te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[bt,ju]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":Te()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",y,yv,bv]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[bt,De,Ne]}],"mix-blend":[{"mix-blend":[...pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":pe()}],"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":[bt]}],"mask-image-linear-from-pos":[{"mask-linear-from":Oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":Oe()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":Oe()}],"mask-image-t-to-pos":[{"mask-t-to":Oe()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":Oe()}],"mask-image-r-to-pos":[{"mask-r-to":Oe()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":Oe()}],"mask-image-b-to-pos":[{"mask-b-to":Oe()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":Oe()}],"mask-image-l-to-pos":[{"mask-l-to":Oe()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":Oe()}],"mask-image-x-to-pos":[{"mask-x-to":Oe()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":Oe()}],"mask-image-y-to-pos":[{"mask-y-to":Oe()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[De,Ne]}],"mask-image-radial-from-pos":[{"mask-radial-from":Oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":Oe()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"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":z()}],"mask-image-conic-pos":[{"mask-conic":[bt]}],"mask-image-conic-from-pos":[{"mask-conic-from":Oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":Oe()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:X()}],"mask-repeat":[{mask:ve()}],"mask-size":[{mask:$e()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",De,Ne]}],filter:[{filter:["","none",De,Ne]}],blur:[{blur:Rt()}],brightness:[{brightness:[bt,De,Ne]}],contrast:[{contrast:[bt,De,Ne]}],"drop-shadow":[{"drop-shadow":["","none",v,yv,bv]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",bt,De,Ne]}],"hue-rotate":[{"hue-rotate":[bt,De,Ne]}],invert:[{invert:["",bt,De,Ne]}],saturate:[{saturate:[bt,De,Ne]}],sepia:[{sepia:["",bt,De,Ne]}],"backdrop-filter":[{"backdrop-filter":["","none",De,Ne]}],"backdrop-blur":[{"backdrop-blur":Rt()}],"backdrop-brightness":[{"backdrop-brightness":[bt,De,Ne]}],"backdrop-contrast":[{"backdrop-contrast":[bt,De,Ne]}],"backdrop-grayscale":[{"backdrop-grayscale":["",bt,De,Ne]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[bt,De,Ne]}],"backdrop-invert":[{"backdrop-invert":["",bt,De,Ne]}],"backdrop-opacity":[{"backdrop-opacity":[bt,De,Ne]}],"backdrop-saturate":[{"backdrop-saturate":[bt,De,Ne]}],"backdrop-sepia":[{"backdrop-sepia":["",bt,De,Ne]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",De,Ne]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[bt,"initial",De,Ne]}],ease:[{ease:["linear","initial",R,De,Ne]}],delay:[{delay:[bt,De,Ne]}],animate:[{animate:["none",D,De,Ne]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,De,Ne]}],"perspective-origin":[{"perspective-origin":L()}],rotate:[{rotate:he()}],"rotate-x":[{"rotate-x":he()}],"rotate-y":[{"rotate-y":he()}],"rotate-z":[{"rotate-z":he()}],scale:[{scale:cn()}],"scale-x":[{"scale-x":cn()}],"scale-y":[{"scale-y":cn()}],"scale-z":[{"scale-z":cn()}],"scale-3d":["scale-3d"],skew:[{skew:Dn()}],"skew-x":[{"skew-x":Dn()}],"skew-y":[{"skew-y":Dn()}],transform:[{transform:[De,Ne,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:An()}],"translate-x":[{"translate-x":An()}],"translate-y":[{"translate-y":An()}],"translate-z":[{"translate-z":An()}],"translate-none":["translate-none"],zoom:[{zoom:[Fi,De,Ne]}],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"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",De,Ne]}],"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":k()}],"scrollbar-track-color":[{"scrollbar-track":k()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mbs":[{"scroll-mbs":P()}],"scroll-mbe":[{"scroll-mbe":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pbs":[{"scroll-pbs":P()}],"scroll-pbe":[{"scroll-pbe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",De,Ne]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[bt,eg,ju,h7]}],stroke:[{stroke:["none",...k()]}],"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"]}},DJ=(e,{cacheSize:t,prefix:n,experimentalParseClassName:a,extend:i={},override:l={}})=>(ep(e,"cacheSize",t),ep(e,"prefix",n),ep(e,"experimentalParseClassName",a),vv(e.theme,l.theme),vv(e.classGroups,l.classGroups),vv(e.conflictingClassGroups,l.conflictingClassGroups),vv(e.conflictingClassGroupModifiers,l.conflictingClassGroupModifiers),ep(e,"postfixLookupClassGroups",l.postfixLookupClassGroups),ep(e,"orderSensitiveModifiers",l.orderSensitiveModifiers),xv(e.theme,i.theme),xv(e.classGroups,i.classGroups),xv(e.conflictingClassGroups,i.conflictingClassGroups),xv(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),mE(e,i,"postfixLookupClassGroups"),mE(e,i,"orderSensitiveModifiers"),e),ep=(e,t,n)=>{if(n!==void 0)e[t]=n},vv=(e,t)=>{if(t)for(let n in t)ep(e,n,t[n])},xv=(e,t)=>{if(t)for(let n in t)mE(e,t,n)},mE=(e,t,n)=>{let a=t[n];if(a!==void 0)e[n]=e[n]?e[n].concat(a):a},O7=(e,...t)=>typeof e==="function"?p7(b7,e,...t):p7(()=>DJ(b7(),e),...t);var D7=N(()=>{d7=[],oJ=[],cJ=/\s+/,fJ=[],S7=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,w7=/^\((?:(\w[\w-]*):)?(.+)\)$/i,pJ=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,hJ=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,mJ=/\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$/,gJ=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,bJ=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,yJ=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/});var Is,PJ,LJ=(e)=>{if(typeof e==="boolean")return e?"":void 0;if(e===void 0||e===null)return;return String(e)},_J=(e)=>{let t=JSON.stringify(e),n=Is.useRef({signature:t,value:e});if(n.current.signature!==t)n.current={signature:t,value:e};return n.current.value},ze=(e,t)=>{let n=c7(t?.baseClass,{variants:t?.variants,defaultVariants:t?.defaultVariants,compoundVariants:t?.compoundVariants}),a=t?.passVariantProps?new Set(t.passVariantProps):void 0,i=Is.forwardRef((l,c)=>{let{children:u,...f}=l,h=f.className;delete f.className;let m={};for(let R in t?.variants)if(m[R]=f[R],R in f&&!a?.has(R))delete f[R];let b=_J(m),y={};if(t?.variantsAsDataAttrs&&t.variants)for(let R of t.variantsAsDataAttrs){let D=R.toString(),U=l[D]??t.defaultVariants?.[R];y[`data-${D}`]=LJ(U)}let v=f.style,S=Is.useMemo(()=>t?.style?{...t.style,...v}:v,[v]),C=Is.useMemo(()=>PJ(zo(n(b),h)),[b,h]),E=e;if(l.asChild&&typeof e==="string")E=r7,delete f.asChild;return Is.createElement(E,{ref:c,className:C,...t.defaultProps,...y,...f,style:S},u)});return i.displayName=t?.displayName??"uic",i};var $n=N(()=>{o7();u7();Ls();D7();Is=q(ae(),1),PJ=O7({extend:{classGroups:{"font-size":[{text:["micro","caption","label","compact","small","callout","body","subtitle","title","headline","display","display-large","panel-heading","heading1","heading2","heading3","heading4","heading5"]}]},theme:{spacing:["nav-x","control-tall"],radius:["panel"],blur:["modal-backdrop"],shadow:["modal-surface"]}}})});function Ka(...e){return(...t)=>{for(let n of e)if(typeof n==="function")n(...t)}}var tp=()=>{};var P7,nt;var fr=N(()=>{P7=q(ae(),1),nt=typeof document<"u"?P7.default.useLayoutEffect:()=>{}});function zJ(e=!1){let t=rr.useContext(L7),n=rr.useRef(null);if(n.current===null&&!e){let a=rr.default.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;if(a){let i=yE.get(a);if(i==null)yE.set(a,{id:t.current,state:a.memoizedState});else if(a.memoizedState!==i.state)t.current=i.id,yE.delete(a)}n.current=++t.current}return n.current}function HJ(e){let t=rr.useContext(L7);if(t===$v&&!BJ)console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=zJ(!!e),a=`react-aria${t.prefix}`;return e||`${a}-${n}`}function FJ(e){let t=rr.default.useId(),[n]=rr.useState(Kr()),a=n?"react-aria":`react-aria${$v.prefix}`;return e||`${a}-${t}`}function UJ(){return!1}function VJ(){return!0}function jJ(e){return()=>{}}function Kr(){if(typeof rr.default.useSyncExternalStore==="function")return rr.default.useSyncExternalStore(jJ,UJ,VJ);return rr.useContext(IJ)}var rr,$v,L7,IJ,BJ,yE,_7;var fc=N(()=>{rr=q(ae(),1),$v={prefix:String(Math.round(Math.random()*10000000000)),current:0},L7=rr.default.createContext($v),IJ=rr.default.createContext(!1),BJ=Boolean(typeof window<"u"&&window.document&&window.document.createElement),yE=new WeakMap;_7=typeof rr.default.useId==="function"?FJ:HJ});function I7(e){let[t,n]=pc.useState(e),a=pc.useRef(t),i=pc.useRef(null),l=pc.useRef(()=>{if(!i.current)return;let u=i.current.next();if(u.done){i.current=null;return}if(a.current===u.value)l.current();else n(u.value)});nt(()=>{if(a.current=t,i.current)l.current()});let c=pc.useCallback((u)=>{i.current=u(a.current),l.current()},[l]);return[t,c]}var pc;var B7=N(()=>{fr();pc=q(ae(),1)});function On(e){let[t,n]=Bs.useState(e),a=Bs.useRef(null),i=_7(t),l=Bs.useRef(null);if(tg)tg.register(l,i);if(KJ){let c=np.get(i);if(c&&!c.includes(a))c.push(a);else np.set(i,[a])}return nt(()=>{let c=i;return()=>{if(tg)tg.unregister(l);np.delete(c)}},[i]),Bs.useEffect(()=>{let c=a.current;if(c)n(c);return()=>{if(c)a.current=null}}),i}function z7(e,t){if(e===t)return e;let n=np.get(e);if(n)return n.forEach((i)=>i.current=t),t;let a=np.get(t);if(a)return a.forEach((i)=>i.current=e),e;return t}function fa(e=[]){let t=On(),[n,a]=I7(t),i=Bs.useCallback(()=>{a(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,a]);return nt(i,[t,i,...e]),n}var Bs,KJ,np,tg;var Ho=N(()=>{fr();fc();B7();Bs=q(ae(),1),KJ=Boolean(typeof window<"u"&&window.document&&window.document.createElement),np=new Map;if(typeof FinalizationRegistry<"u")tg=new FinalizationRegistry((e)=>{np.delete(e)})});function Ui(...e){if(e.length===1&&e[0])return e[0];return(t)=>{let n=!1,a=e.map((i)=>{let l=H7(i,t);return n||=typeof l=="function",l});if(n)return()=>{a.forEach((i,l)=>{if(typeof i==="function")i();else H7(e[l],null)})}}}function H7(e,t){if(typeof e==="function")return e(t);else if(e!=null)e.current=t}var vE=()=>{};function Le(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let a=e[n];for(let i in a){let l=t[i],c=a[i];if(typeof l==="function"&&typeof c==="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90)t[i]=Ka(l,c);else if((i==="className"||i==="UNSAFE_className")&&typeof l==="string"&&typeof c==="string")t[i]=i7(l,c);else if(i==="id"&&l&&c)t.id=z7(l,c);else if(i==="ref"&&l&&c)t.ref=Ui(l,c);else t[i]=c!==void 0?c:l}}return t}var pr=N(()=>{tp();Ho();vE();Ls()});var pa=N(()=>{pr()});var Sv=N(()=>{vE()});var F7=N(()=>{fr()});function co(e){let t=qu.useRef(null),n=qu.useRef(void 0),a=qu.useCallback((i)=>{if(typeof e==="function"){let l=e,c=l(i);return()=>{if(typeof c==="function")c();else l(null)}}else if(e)return e.current=i,()=>{e.current=null}},[e]);return qu.useMemo(()=>({get current(){return t.current},set current(i){if(t.current=i,n.current)n.current(),n.current=void 0;if(i!=null)n.current=a(i)}}),[a])}var qu;var U7=N(()=>{qu=q(ae(),1)});var rp=N(()=>{U7()});function qr({values:e,children:t}){for(let[n,a]of e)t=or.default.createElement(n.Provider,{value:a},t);return t}function Yt(e){let{className:t,style:n,children:a,defaultClassName:i,defaultChildren:l,defaultStyle:c,values:u,render:f}=e;return or.useMemo(()=>{let h,m,b;if(typeof t==="function")h=t({...u,defaultClassName:i});else h=t;if(typeof n==="function")m=n({...u,defaultStyle:c||{}});else m=n;if(typeof a==="function")b=a({...u,defaultChildren:l});else if(a==null)b=l;else b=a;return{className:h??i,style:m||c?{...c,...m}:void 0,children:b??l,"data-rac":"",render:f?(y)=>f(y,u):void 0}},[t,n,a,i,l,c,u,f])}function Gu(e,t){let n=or.useContext(e);if(t===null)return null;if(n&&typeof n==="object"&&"slots"in n&&n.slots){let a=t||Vi;if(!n.slots[a]){let i=new Intl.ListFormat().format(Object.keys(n.slots).map((c)=>`"${c}"`)),l=t?`Invalid slot "${t}".`:"A slot prop is required.";throw Error(`${l} Valid slot names are ${i}.`)}return n.slots[a]}return n}function an(e,t,n){let a=Gu(n,e.slot)||{},{ref:i,...l}=a,c=co(or.useMemo(()=>Ui(t,i),[t,i])),u=Le(l,e);if("style"in l&&l.style&&"style"in e&&e.style)if(typeof l.style==="function"||typeof e.style==="function")u.style=(f)=>{let h=typeof l.style==="function"?l.style(f):l.style,m={...f.defaultStyle,...h},b=typeof e.style==="function"?e.style({...f,defaultStyle:m}):e.style;return{...m,...b}};else u.style={...l.style,...e.style};return[u,c]}function wv(e=!0){let[t,n]=or.useState(e),a=or.useRef(!1),i=or.useCallback((l)=>{a.current=!0,n(!!l)},[]);return nt(()=>{if(!a.current)n(!1)},[]),[i,t]}function j7(e){let t=/^(data-.*)$/,n={};for(let a in e)if(!t.test(a))n[a]=e[a];return n}function qJ(e,t,n){let{render:a,...i}=t,l=or.useRef(null),c=or.useMemo(()=>Ui(n,l),[n,l]);nt(()=>{if(a){if(!l.current)console.warn("Ref was not connected to DOM element returned by custom `render` function. Did you forget to pass through or merge the `ref`?");else if(l.current.localName!==e)console.warn(`Unexpected DOM element returned by custom \`render\` function. Expected <${e}>, got <${l.current.localName}>. This may break the component behavior and accessibility.`)}},[e,a]);let u={...i,ref:c};if(a)return a(u,void 0);return or.default.createElement(e,u)}var or,Vi,V7,Ot;var Gr=N(()=>{pa();Sv();F7();rp();or=q(ae(),1),Vi=Symbol("default");V7={},Ot=new Proxy({},{get(e,t){if(typeof t!=="string")return;let n=V7[t];if(!n)n=or.forwardRef(qJ.bind(null,t)),V7[t]=n;return n}})});var K7="react-aria-clear-focus",q7="react-aria-focus";var G7=()=>{};function GJ(e){return e!==null&&typeof e==="object"&&"nodeType"in e&&typeof e.nodeType==="number"}function W7(e){return GJ(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}var rt=(e)=>e?.ownerDocument??document,mn=(e)=>{if(e&&"window"in e&&e.window===e)return e;return rt(e).defaultView||window};var hr=()=>{};function Fo(){return WJ}var WJ=!1;var Y7=()=>{};var Cv=N(()=>{Y7()});function yt(e,t){if(!Fo())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;while(n!==null){if(n===e)return!0;if(n.tagName==="SLOT"&&n.assignedSlot)n=n.assignedSlot.parentNode;else if(W7(n))n=n.host;else n=n.parentNode}return!1}function Re(e){if(Fo()&&e.target instanceof Element&&e.target.shadowRoot){if("composedPath"in e)return e.composedPath()[0]??null;else if("composedPath"in e.nativeEvent)return e.nativeEvent.composedPath()[0]??null}return e.target}function ng(e){if(!e)return!1;let t=e.getRootNode(),n=mn(e);if(!(t instanceof n.Document||t instanceof n.ShadowRoot))return!1;let a=t.activeElement;return a!=null&&e.contains(a)}var Et=(e=document)=>{if(!Fo())return e.activeElement;let t=e.activeElement;while(t&&"shadowRoot"in t&&t.shadowRoot?.activeElement)t=t.shadowRoot.activeElement;return t};var fn=N(()=>{hr();Cv()});function Ev(e){let t=JJ(rt(e));if(t!==e){if(t)YJ(t,e);if(e)xE(e,t)}}function YJ(e,t){e.dispatchEvent(new FocusEvent("blur",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:t}))}function xE(e,t){e.dispatchEvent(new FocusEvent("focus",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:t}))}function JJ(e){let t=Et(e),n=t?.getAttribute("aria-activedescendant");if(n)return e.getElementById(n)||t;return t}var $E=N(()=>{fn();hr()});function Wr(e){if(XJ())e.focus({preventScroll:!0});else{let t=QJ(e);e.focus(),ZJ(t)}}function XJ(){if(Tv==null){Tv=!1;try{document.createElement("div").focus({get preventScroll(){return Tv=!0,!0}})}catch{}}return Tv}function QJ(e){let t=e.parentNode,n=[],a=document.scrollingElement||document.documentElement;while(t instanceof HTMLElement&&t!==a){if(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft});t=t.parentNode}if(a instanceof HTMLElement)n.push({element:a,scrollTop:a.scrollTop,scrollLeft:a.scrollLeft});return n}function ZJ(e){for(let{element:t,scrollTop:n,scrollLeft:a}of e)t.scrollTop=n,t.scrollLeft=a}var Tv=null;var Wu=()=>{};function tX(e){let t=mn(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:a}=e.style,i=n!=="none"&&a!=="hidden"&&a!=="collapse";if(i){let{getComputedStyle:l}=e.ownerDocument.defaultView,{display:c,visibility:u}=l(e);i=c!=="none"&&u!=="hidden"&&u!=="collapse"}return i}function nX(e,t){return!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function Rv(e,t){if(eX)return e.checkVisibility({visibilityProperty:!0})&&!e.closest("[data-react-aria-prevent-focus]");return e.nodeName!=="#comment"&&tX(e)&&nX(e,t)&&(!e.parentElement||Rv(e.parentElement,e))}var eX;var J7=N(()=>{hr();eX=typeof Element<"u"&&"checkVisibility"in Element.prototype});function kv(e,t){return e.matches(rX)&&!X7(e)&&(t?.skipVisibilityCheck||Rv(e))}function Av(e){return e.matches(oX)&&Rv(e)&&!X7(e)}function X7(e){let t=e;while(t!=null){if(t instanceof t.ownerDocument.defaultView.HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}var SE,rX,oX;var Mv=N(()=>{J7();SE=["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"],rX=SE.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";SE.push('[tabindex]:not([tabindex="-1"]):not([disabled])');oX=SE.join(':not([hidden]):not([tabindex="-1"]),')});function og(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function Ov(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function Dv(e){let t=Nv.useRef({isFocused:!1,observer:null});return nt(()=>{let n=t.current;return()=>{if(n.observer)n.observer.disconnect(),n.observer=null}},[]),Nv.useCallback((n)=>{let a=Re(n);if(a instanceof HTMLButtonElement||a instanceof HTMLInputElement||a instanceof HTMLTextAreaElement||a instanceof HTMLSelectElement){t.current.isFocused=!0;let i=a,l=(c)=>{if(t.current.isFocused=!1,i.disabled){let u=og(c);e?.(u)}if(t.current.observer)t.current.observer.disconnect(),t.current.observer=null};i.addEventListener("focusout",l,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&i.disabled){t.current.observer?.disconnect();let c=i===Et()?null:Et();i.dispatchEvent(new FocusEvent("blur",{relatedTarget:c})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:c}))}}),t.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[e])}function Q7(e){while(e&&!kv(e,{skipVisibilityCheck:!0}))e=e.parentElement;let t=mn(e),n=t.document.activeElement;if(!n||n===e)return;rg=!0;let a=!1,i=(m)=>{if(Re(m)===n||a)m.stopImmediatePropagation()},l=(m)=>{if(Re(m)===n||a){if(m.stopImmediatePropagation(),!e&&!a)a=!0,Wr(n),f()}},c=(m)=>{if(Re(m)===e||a)m.stopImmediatePropagation()},u=(m)=>{if(Re(m)===e||a){if(m.stopImmediatePropagation(),!a)a=!0,Wr(n),f()}};t.addEventListener("blur",i,!0),t.addEventListener("focusout",l,!0),t.addEventListener("focusin",u,!0),t.addEventListener("focus",c,!0);let f=()=>{cancelAnimationFrame(h),t.removeEventListener("blur",i,!0),t.removeEventListener("focusout",l,!0),t.removeEventListener("focusin",u,!0),t.removeEventListener("focus",c,!0),rg=!1,a=!1},h=requestAnimationFrame(f);return f}var Nv,rg=!1;var ag=N(()=>{Wu();fn();hr();Mv();fr();Nv=q(ae(),1)});function Pv(e){if(typeof window>"u"||window.navigator==null)return!1;let t=window.navigator.userAgentData?.brands;return Array.isArray(t)&&t.some((n)=>e.test(n.brand))||e.test(window.navigator.userAgent)}function wE(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function zs(e){let t=null;return()=>{if(t==null)t=e();return t}}var qa,aX,CE,Ga,Z7,eD,EE,ig,tD;var ha=N(()=>{qa=zs(function(){return wE(/^Mac/i)}),aX=zs(function(){return wE(/^iPhone/i)}),CE=zs(function(){return wE(/^iPad/i)||qa()&&navigator.maxTouchPoints>1}),Ga=zs(function(){return aX()||CE()}),Z7=zs(function(){return qa()||Ga()}),eD=zs(function(){return Pv(/AppleWebKit/i)&&!EE()}),EE=zs(function(){return Pv(/Chrome/i)}),ig=zs(function(){return Pv(/Android/i)}),tD=zs(function(){return Pv(/Firefox/i)})});function Lv(e){if(e.pointerType===""&&e.isTrusted)return!0;if(ig()&&e.pointerType)return e.type==="click"&&e.buttons===1;return e.detail===0&&!e.pointerType}function nD(e){return!ig()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}var TE=N(()=>{ha()});function Yu(){return op.useContext(iX)}function sX(e,t){let n=e.getAttribute("target");return(!n||n==="_self")&&e.origin===location.origin&&!e.hasAttribute("download")&&!t.metaKey&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}function ma(e,t,n=!0){let{metaKey:a,ctrlKey:i,altKey:l,shiftKey:c}=t;if(tD()&&window.event?.type?.startsWith("key")&&e.target==="_blank")if(qa())a=!0;else i=!0;let u=eD()&&qa()&&!CE()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:a,ctrlKey:i,altKey:l,shiftKey:c}):new MouseEvent("click",{metaKey:a,ctrlKey:i,altKey:l,shiftKey:c,detail:1,bubbles:!0,cancelable:!0});ma.isOpening=n,Wr(e),e.dispatchEvent(u),ma.isOpening=!1}function lX(e,t){if(e instanceof HTMLAnchorElement)t(e);else if(e.hasAttribute("data-href")){let n=document.createElement("a");if(n.href=e.getAttribute("data-href"),e.hasAttribute("data-target"))n.target=e.getAttribute("data-target");if(e.hasAttribute("data-rel"))n.rel=e.getAttribute("data-rel");if(e.hasAttribute("data-download"))n.download=e.getAttribute("data-download");if(e.hasAttribute("data-ping"))n.ping=e.getAttribute("data-ping");if(e.hasAttribute("data-referrer-policy"))n.referrerPolicy=e.getAttribute("data-referrer-policy");e.appendChild(n),t(n),e.removeChild(n)}}function cX(e,t){lX(e,(n)=>ma(n,t))}function ap(e){let n=Yu().useHref(e?.href??""),a={};if(e){for(let i of["href","target","rel","download","ping","referrerPolicy"])if(i in e)a[i]=i==="href"?n:e[i]}return a}function rD(e,t,n,a){if(!t.isNative&&e.currentTarget instanceof HTMLAnchorElement&&e.currentTarget.href&&!e.isDefaultPrevented()&&sX(e.currentTarget,e)&&n)e.preventDefault(),t.open(e.currentTarget,e,n,a)}var op,iX;var hc=N(()=>{Wu();ha();op=q(ae(),1),iX=op.createContext({isNative:!0,open:cX,useHref:(e)=>e});ma.isOpening=!1});function Iv(e,t){for(let n of RE)n(e,t)}function dX(e){return!(e.metaKey||!qa()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function _v(e){if(Ju=!0,!ma.isOpening&&dX(e))Xu="keyboard",lg="keyboard",Iv("keyboard",e)}function ip(e){if(Xu="pointer",lg="pointerType"in e?e.pointerType:"mouse",e.type==="mousedown"||e.type==="pointerdown")Ju=!0,Iv("pointer",e)}function oD(e){if(!ma.isOpening&&Lv(e))Ju=!0,Xu="virtual",lg="virtual"}function aD(e){let t=mn(Re(e)),n=rt(Re(e));if(Re(e)===t||Re(e)===n||rg||!e.isTrusted)return;if(!Ju&&!kE)Xu="virtual",lg="virtual",Iv("virtual",e);Ju=!1,kE=!1}function iD(){if(rg)return;Ju=!1,kE=!0}function AE(e){if(typeof window>"u"||typeof document>"u")return;let t=mn(e),n=rt(e);if(sg.get(t))return;let a=t.HTMLElement.prototype.focus;if(t.HTMLElement.prototype.focus=function(){Ju=!0,a.apply(this,arguments)},n.addEventListener("keydown",_v,!0),n.addEventListener("keyup",_v,!0),n.addEventListener("click",oD,!0),t.addEventListener("focus",aD,!0),t.addEventListener("blur",iD,!1),typeof PointerEvent<"u")n.addEventListener("pointerdown",ip,!0),n.addEventListener("pointermove",ip,!0),n.addEventListener("pointerup",ip,!0);t.addEventListener("beforeunload",()=>{sD(e)},{once:!0}),sg.set(t,{focus:a})}function fX(e){let t=rt(e),n;if(t.readyState!=="loading")AE(e);else n=()=>{AE(e)},t.addEventListener("DOMContentLoaded",n);return()=>sD(e,n)}function ji(){return Xu!=="pointer"}function Qu(){return Xu}function cg(e){Xu=e,lg=e==="pointer"?"mouse":e,Iv(e,null)}function hX(e,t,n){let a=n?Re(n):void 0,i=rt(a),l=mn(a),c=typeof l<"u"?l.HTMLInputElement:HTMLInputElement,u=typeof l<"u"?l.HTMLTextAreaElement:HTMLTextAreaElement,f=typeof l<"u"?l.HTMLElement:HTMLElement,h=typeof l<"u"?l.KeyboardEvent:KeyboardEvent,m=Et(i);return e=e||m instanceof c&&!pX.has(m.type)||m instanceof u||m instanceof f&&m.isContentEditable,!(e&&t==="keyboard"&&n instanceof h&&!uX[n.key])}function lD(e,t,n){AE(),ME.useEffect(()=>{if(n?.enabled===!1)return;let a=(i,l)=>{if(!hX(!!n?.isTextInput,i,l))return;e(ji())};return RE.add(a),()=>{RE.delete(a)}},t)}var ME,Xu=null,lg="keyboard",RE,sg,Ju=!1,kE=!1,uX,sD=(e,t)=>{let n=mn(e),a=rt(e);if(t)a.removeEventListener("DOMContentLoaded",t);if(!sg.has(n))return;if(n.HTMLElement.prototype.focus=sg.get(n).focus,a.removeEventListener("keydown",_v,!0),a.removeEventListener("keyup",_v,!0),a.removeEventListener("click",oD,!0),n.removeEventListener("focus",aD,!0),n.removeEventListener("blur",iD,!1),typeof PointerEvent<"u")a.removeEventListener("pointerdown",ip,!0),a.removeEventListener("pointermove",ip,!0),a.removeEventListener("pointerup",ip,!0);sg.delete(n)},pX;var mc=N(()=>{fn();hr();ag();ha();TE();hc();ME=q(ae(),1),RE=new Set,sg=new Map,uX={Tab:!0,Escape:!0};if(typeof document<"u")fX();pX=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"])});function gc(e){if(qa())return e.metaKey;return e.ctrlKey}function Zu(e){return e instanceof HTMLInputElement&&!mX.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}var mX;var ug=N(()=>{ha();mX=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"])});function mr(e){let t=sp.useRef(null);return gX(()=>{t.current=e},[e]),sp.useCallback((...n)=>{let a=t.current;return a?.(...n)},[])}var sp,gX;var ed=N(()=>{fr();sp=q(ae(),1),gX=sp.default.useInsertionEffect??nt});function td(e,t,n,a){let i=mr(n),l=n==null;cD.useEffect(()=>{if(l||!e.current)return;let c=e.current;return c.addEventListener(t,i,a),()=>{c.removeEventListener(t,i,a)}},[e,t,a,l])}var cD;var NE=N(()=>{ed();cD=q(ae(),1)});function bc(e,t){let{id:n,"aria-label":a,"aria-labelledby":i}=e;if(n=On(n),i&&a)i=[...new Set([n,...i.trim().split(/\s+/)])].join(" ");else if(i)i=i.trim().split(/\s+/).join(" ");if(!a&&!i&&t)a=t;return{id:n,"aria-label":a,"aria-labelledby":i}}var dg=N(()=>{Ho()});function uD(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize(),a=typeof n.getTextInfo==="function"?n.getTextInfo():n.textInfo;if(a)return a.direction==="rtl";if(n.script)return bX.has(n.script)}let t=e.split("-")[0];return yX.has(t)}var bX,yX;var dD=N(()=>{bX=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),yX=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"])});function hD(){let e=typeof window<"u"&&window[pD]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:uD(e)?"rtl":"ltr"}}function fD(){OE=hD();for(let e of fg)e(OE)}function mD(){let e=Kr(),[t,n]=Bv.useState(OE);if(Bv.useEffect(()=>{if(fg.size===0)window.addEventListener("languagechange",fD);return fg.add(n),()=>{if(fg.delete(n),fg.size===0)window.removeEventListener("languagechange",fD)}},[]),e)return{locale:typeof window<"u"&&window[pD]||"en-US",direction:"ltr"};return t}var Bv,pD,OE,fg;var gD=N(()=>{dD();fc();Bv=q(ae(),1),pD=Symbol.for("react-aria.i18n.locale");OE=hD(),fg=new Set});function lp(){let e=mD();return zv.useContext(vX)||e}var zv,vX;var Hv=N(()=>{gD();zv=q(ae(),1),vX=zv.default.createContext(null)});class cp{constructor(e,t="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,n])=>n)),this.defaultLocale=t}getStringForLocale(e,t){let a=this.getStringsForLocale(t)[e];if(!a)throw Error(`Could not find intl message ${e} in ${t} locale`);return a}getStringsForLocale(e){let t=this.strings[e];if(!t)t=SX(e,this.strings,this.defaultLocale),this.strings[e]=t;return t}static getGlobalDictionaryForPackage(e){if(typeof window>"u")return null;let t=window[xX];if(Fv===void 0){let a=window[$X];if(!a)return null;Fv={};for(let i in a)Fv[i]=new cp({[t]:a[i]},t)}let n=Fv?.[e];if(!n)throw Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return n}}function SX(e,t,n="en-US"){if(t[e])return t[e];let a=wX(e);if(t[a])return t[a];for(let i in t)if(i.startsWith(a+"-"))return t[i];return t[n]}function wX(e){if(Intl.Locale)return new Intl.Locale(e).language;return e.split("-")[0]}var xX,$X,Fv=void 0;var bD=N(()=>{xX=Symbol.for("react-aria.i18n.locale"),$X=Symbol.for("react-aria.i18n.strings")});class Uv{constructor(e,t){this.locale=e,this.strings=t}format(e,t){let n=this.strings.getStringForLocale(e,this.locale);return typeof n==="function"?n(t,this):n}plural(e,t,n="cardinal"){let a=t["="+e];if(a)return typeof a==="function"?a():a;let i=this.locale+":"+n,l=yD.get(i);if(!l)l=new Intl.PluralRules(this.locale,{type:n}),yD.set(i,l);let c=l.select(e);return a=t[c]||t.other,typeof a==="function"?a():a}number(e){let t=vD.get(this.locale);if(!t)t=new Intl.NumberFormat(this.locale),vD.set(this.locale,t);return t.format(e)}select(e,t){let n=e[t]||e.other;return typeof n==="function"?n():n}}var yD,vD;var xD=N(()=>{yD=new Map,vD=new Map});var $D=N(()=>{bD();xD()});function CX(e){let t=SD.get(e);if(!t)t=new cp(e),SD.set(e,t);return t}function EX(e,t){return t&&cp.getGlobalDictionaryForPackage(t)||CX(e)}function CD(e,t){let{locale:n}=lp(),a=EX(e,t);return wD.useMemo(()=>new Uv(n,a),[n,a])}var wD,SD;var ED=N(()=>{Hv();$D();wD=q(ae(),1),SD=new WeakMap});function nd(e,t,n){let[a,i]=uo.useState(e||t),l=uo.useRef(a),c=uo.useRef(e!==void 0),u=e!==void 0;uo.useEffect(()=>{let b=c.current;if(b!==u)console.warn(`WARN: A component changed from ${b?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}.`);c.current=u},[u]);let f=u?e:a;TX(()=>{l.current=f});let[,h]=uo.useReducer(()=>({}),{}),m=uo.useCallback((b,...y)=>{let v=typeof b==="function"?b(l.current):b;if(!Object.is(l.current,v))l.current=v,i(v),h(),n?.(v,...y)},[n]);return[f,m]}var uo,TX;var Vv=N(()=>{uo=q(ae(),1),TX=typeof document<"u"?uo.default.useInsertionEffect??uo.default.useLayoutEffect:()=>{}});var jv,TD;var RD=N(()=>{jv=q(ae(),1),TD=jv.createContext(null)});function Wa(e){let t=(n,a)=>{if(rd.useContext(RX))return null;return e(n,a)};return t.displayName=e.displayName||e.name,rd.forwardRef(t)}var rd,RX;var kD=N(()=>{rd=q(ae(),1);if(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(e){return this.content.appendChild(e)}}),Object.defineProperty(HTMLTemplateElement.prototype,"removeChild",{configurable:!0,enumerable:!0,value:function(e){return this.content.removeChild(e)}}),Object.defineProperty(HTMLTemplateElement.prototype,"insertBefore",{configurable:!0,enumerable:!0,value:function(e,t){return this.content.insertBefore(e,t)}});RX=rd.createContext(!1)});var up=N(()=>{kD()});var Kv,qv,yc;var DE=N(()=>{Gr();up();Kv=q(ae(),1),qv=Kv.createContext({}),yc=Wa(function(t,n){[t,n]=an(t,n,qv);let{elementType:a="label",...i}=t,l=Ot[a];return Kv.default.createElement(l,{className:"react-aria-Label",...i,ref:n})})});function mt(e,t={}){let{labelable:n,isLink:a,global:i,events:l=i,propNames:c}=t,u={};for(let f in e)if(Object.prototype.hasOwnProperty.call(e,f)&&(kX.has(f)||n&&AX.has(f)||a&&MX.has(f)||i&&NX.has(f)||l&&(AD.has(f)||f.endsWith("Capture")&&AD.has(f.slice(0,-7)))||c?.has(f)||OX.test(f)))u[f]=e[f];return u}var kX,AX,MX,NX,AD,OX;var Hs=N(()=>{kX=new Set(["id"]),AX=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),MX=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),NX=new Set(["dir","lang","hidden","inert","translate"]),AD=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"]),OX=/^(data-.*)$/});function MD(e){let{id:t,label:n,"aria-labelledby":a,"aria-label":i,labelElementType:l="label"}=e;t=On(t);let c=On(),u={};if(n)a=a?`${c} ${a}`:c,u={id:c,htmlFor:l==="label"?t:void 0};else if(!a&&!i)console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let f=bc({id:t,"aria-label":i,"aria-labelledby":a});return{labelProps:u,fieldProps:f}}var ND=N(()=>{Ho();dg()});var Ya=N(()=>{Hs()});var Gv,OD;var DD=N(()=>{Gv=q(ae(),1),OD=Gv.createContext(null)});function Wv(e,t="assertive",n=7000){if(!dp)if(dp=new PD,!(typeof IS_REACT_ACT_ENVIRONMENT==="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u"))setTimeout(()=>{if(dp?.isAttached())dp?.announce(e,t,n)},100);else dp.announce(e,t,n);else dp.announce(e,t,n)}class PD{constructor(){if(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 t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){if(!this.node)return;document.body.removeChild(this.node),this.node=null}announce(e,t="assertive",n=7000){if(!this.node)return;let a=document.createElement("div");if(typeof e==="object")a.setAttribute("role","img"),a.setAttribute("aria-labelledby",e["aria-labelledby"]);else a.textContent=e;if(t==="assertive")this.assertiveLog?.appendChild(a);else this.politeLog?.appendChild(a);if(e!=="")setTimeout(()=>{a.remove()},n)}clear(e){if(!this.node)return;if((!e||e==="assertive")&&this.assertiveLog)this.assertiveLog.innerHTML="";if((!e||e==="polite")&&this.politeLog)this.politeLog.innerHTML=""}}var dp=null;var LD=()=>{};var _D=N(()=>{LD()});function ID(){if(typeof window>"u")return;function e(a){return"propertyName"in a}let t=(a)=>{let i=Re(a);if(!e(a)||!i)return;let l=vc.get(i);if(!l)l=new Set,vc.set(i,l),i.addEventListener("transitioncancel",n,{once:!0});l.add(a.propertyName)},n=(a)=>{let i=Re(a);if(!e(a)||!i)return;let l=vc.get(i);if(!l)return;if(l.delete(a.propertyName),l.size===0)i.removeEventListener("transitioncancel",n),vc.delete(i);if(vc.size===0){for(let c of PE)c();PE.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}function DX(){for(let[e]of vc)if("isConnected"in e&&!e.isConnected)vc.delete(e)}function Yv(e){requestAnimationFrame(()=>{if(DX(),vc.size===0)e();else PE.add(e)})}var vc,PE;var LE=N(()=>{fn();vc=new Map,PE=new Set;if(typeof document<"u")if(document.readyState!=="loading")ID();else document.addEventListener("DOMContentLoaded",ID)});function ga(e){if(!e.isConnected)return;let t=rt(e);if(Qu()==="virtual"){let n=Et(t);Yv(()=>{let a=Et(t);if((a===n||a===t.body)&&e.isConnected)Wr(e)})}else Wr(e)}var fp=N(()=>{Wu();fn();mc();hr();LE()});function od(e){let{isDisabled:t,onFocus:n,onBlur:a,onFocusChange:i}=e,l=_E.useCallback((f)=>{if(Re(f)===f.currentTarget){if(a)a(f);if(i)i(!1);return!0}},[a,i]),c=Dv(l),u=_E.useCallback((f)=>{let h=Re(f),m=rt(h),b=m?Et(m):Et();if(h===f.currentTarget&&h===b){if(n)n(f);if(i)i(!0);c(f)}},[i,n,c]);return{focusProps:{onFocus:!t&&(n||i||a)?u:void 0,onBlur:!t&&(a||i)?l:void 0}}}var _E;var Jv=N(()=>{fn();hr();ag();_E=q(ae(),1)});function IE(e){if(!e)return;let t=!0;return(n)=>{let a={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){if(t)console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.");else t=!0},continuePropagation(){t=!1},isPropagationStopped(){return t}};if(e(a),t)n.stopPropagation()}}var BD=()=>{};function ad(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:IE(e.onKeyDown),onKeyUp:IE(e.onKeyUp)}}}var Xv=N(()=>{BD()});function Qv(e,t){nt(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{if(e.ref)e.ref.current=null}})}var BE=N(()=>{fr()});function PX(e){let t=Fs.useContext(Zv)||{};Qv(t,e);let{ref:n,...a}=t;return a}function xc(e,t){let{focusProps:n}=od(e),{keyboardProps:a}=ad(e),i=Le(n,a),l=PX(t),c=e.isDisabled?{}:l,u=Fs.useRef(e.autoFocus);Fs.useEffect(()=>{if(u.current&&t.current)ga(t.current);u.current=!1},[t]);let f=e.excludeFromTabOrder?-1:0;if(e.isDisabled)f=void 0;return{focusableProps:Le({...i,tabIndex:f},c)}}var Fs,Zv;var pp=N(()=>{fp();pr();Jv();Xv();BE();Fs=q(ae(),1),Zv=Fs.default.createContext(null)});function zD(e){if(Ga()){if(hp==="default"){let t=rt(e);zE=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}hp="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";ex.set(e,e.style[t]),e.style[t]="none"}}function HE(e){if(Ga()){if(hp!=="disabled")return;hp="restoring",setTimeout(()=>{Yv(()=>{if(hp==="restoring"){let t=rt(e);if(t.documentElement.style.webkitUserSelect==="none")t.documentElement.style.webkitUserSelect=zE||"";zE="",hp="default"}})},300)}else if(e instanceof HTMLElement||e instanceof SVGElement){if(e&&ex.has(e)){let t=ex.get(e),n="userSelect"in e.style?"userSelect":"webkitUserSelect";if(e.style[n]==="none")e.style[n]=t;if(e.getAttribute("style")==="")e.removeAttribute("style");ex.delete(e)}}}var hp="default",zE="",ex;var HD=N(()=>{hr();ha();LE();ex=new WeakMap});function FD(e){return e?.defaultView?.__webpack_nonce__||globalThis.__webpack_nonce__||void 0}function tx(e){let t=e??(typeof document<"u"?document:void 0);if(!t)return FD(t);if(FE.has(t))return FE.get(t);let n=t.querySelector('meta[property="csp-nonce"]'),a=n&&n instanceof mn(n).HTMLMetaElement&&(n.nonce||n.content)||FD(t)||void 0;if(a!==void 0)FE.set(t,a);return a}var FE;var UE=N(()=>{hr();FE=new WeakMap});var UD,pg;var VE=N(()=>{UD=q(ae(),1),pg=UD.default.createContext({register:()=>{}});pg.displayName="PressResponderContext"});function Sc(){let e=$c.useRef(new Map),t=$c.useCallback((i,l,c,u)=>{let f=u?.once?(...h)=>{e.current.delete(c),c(...h)}:c;e.current.set(c,{type:l,eventTarget:i,fn:f,options:u}),i.addEventListener(l,f,u)},[]),n=$c.useCallback((i,l,c,u)=>{let f=e.current.get(c)?.fn||c;i.removeEventListener(l,f,u),e.current.delete(c)},[]),a=$c.useCallback(()=>{e.current.forEach((i,l)=>{n(i.eventTarget,i.type,l,i.options)})},[n]);return $c.useEffect(()=>a,[a]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:a}}var $c;var hg=N(()=>{$c=q(ae(),1)});function _X(e){let t=Un.useContext(pg);if(t){let{register:n,ref:a,...i}=t;e=Le(i,e),n()}return Qv(t,e.ref),e}class mg{#e;constructor(e,t,n,a){this.#e=!0;let l=(a?.target??n.currentTarget)?.getBoundingClientRect(),c,u=0,f,h=null;if(n.clientX!=null&&n.clientY!=null)f=n.clientX,h=n.clientY;if(l)if(f!=null&&h!=null)c=f-l.left,u=h-l.top;else c=l.width/2,u=l.height/2;this.type=e,this.pointerType=t,this.target=n.currentTarget,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.x=c,this.y=u,this.key=n.key}continuePropagation(){this.#e=!1}get shouldStopPropagation(){return this.#e}}function wc(e){let{onPress:t,onPressChange:n,onPressStart:a,onPressEnd:i,onPressUp:l,onClick:c,isDisabled:u,isPressed:f,preventFocusOnPress:h,shouldCancelOnPointerExit:m,allowTextSelectionOnPress:b,ref:y,...v}=_X(e),[S,C]=Un.useState(!1),E=Un.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:R,removeAllGlobalListeners:D}=Sc(),U=Un.useCallback((I,F)=>{let Y=E.current;if(u||Y.didFirePressStart)return!1;let Z=!0;if(Y.isTriggeringEvent=!0,a){let de=new mg("pressstart",F,I);a(de),Z=de.shouldStopPropagation}if(n)n(!0);return Y.isTriggeringEvent=!1,Y.didFirePressStart=!0,C(!0),Z},[u,a,n]),z=Un.useCallback((I,F,Y=!0)=>{let Z=E.current;if(!Z.didFirePressStart)return!1;Z.didFirePressStart=!1,Z.isTriggeringEvent=!0;let de=!0;if(i){let K=new mg("pressend",F,I);i(K),de=K.shouldStopPropagation}if(n)n(!1);if(C(!1),t&&Y&&!u){let K=new mg("press",F,I);t(K),de&&=K.shouldStopPropagation}return Z.isTriggeringEvent=!1,de},[u,i,n,t]),L=mr(z),Q=Un.useCallback((I,F)=>{let Y=E.current;if(u)return!1;if(l){Y.isTriggeringEvent=!0;let Z=new mg("pressup",F,I);return l(Z),Y.isTriggeringEvent=!1,Z.shouldStopPropagation}return!0},[u,l]),V=mr(Q),P=Un.useCallback((I)=>{let F=E.current;if(F.isPressed&&F.target){if(F.didFirePressStart&&F.pointerType!=null)z(id(F.target,I),F.pointerType,!1);if(F.isPressed=!1,F.isOverTarget=!1,F.activePointerId=null,F.pointerType=null,D(),!b)HE(F.target);for(let Y of F.disposables)Y();F.disposables=[]}},[b,D,z]),re=mr(P);Un.useEffect(()=>{if(u&&E.current.isPressed)re({currentTarget:E.current.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})},[u]);let J=Un.useCallback((I)=>{if(m)P(I)},[m,P]),ge=Un.useCallback((I)=>{if(u)return;c?.(I)},[u,c]),le=Un.useCallback((I,F)=>{if(u)return;if(c){let Y=new MouseEvent("click",I);Ov(Y,F),c(og(Y))}},[u,c]),se=Un.useMemo(()=>{let I=E.current,F={onKeyDown(Z){if(jE(Z.nativeEvent,Z.currentTarget)&&yt(Z.currentTarget,Re(Z))){if(qD(Re(Z),Z.key))Z.preventDefault();let de=!0;if(!I.isPressed&&!Z.repeat)I.target=Z.currentTarget,I.isPressed=!0,I.pointerType="keyboard",de=U(Z,"keyboard");let K=Z.currentTarget,k=(X)=>{if(jE(X,K)&&!X.repeat&&yt(K,Re(X))&&I.target)V(id(I.target,X),"keyboard")};if(R(rt(Z.currentTarget),"keyup",Ka(k,Y),!0),de)Z.stopPropagation();if(Z.metaKey&&qa())I.metaKeyEvents?.set(Z.key,Z.nativeEvent)}else if(Z.key==="Meta")I.metaKeyEvents=new Map},onClick(Z){if(Z&&!yt(Z.currentTarget,Re(Z)))return;if(Z&&Z.button===0&&!I.isTriggeringEvent&&!ma.isOpening){let de=!0;if(u)Z.preventDefault();if(!I.ignoreEmulatedMouseEvents&&!I.isPressed&&(I.pointerType==="virtual"||Lv(Z.nativeEvent))){let K=U(Z,"virtual"),k=V(Z,"virtual"),X=L(Z,"virtual");ge(Z),de=K&&k&&X}else if(I.isPressed&&I.pointerType!=="keyboard"){let K=I.pointerType||Z.nativeEvent.pointerType||"virtual",k=V(id(Z.currentTarget,Z),K),X=L(id(Z.currentTarget,Z),K,!0);de=k&&X,I.isOverTarget=!1,ge(Z),re(Z)}if(I.ignoreEmulatedMouseEvents=!1,de)Z.stopPropagation()}}},Y=(Z)=>{if(I.isPressed&&I.target&&jE(Z,I.target)){if(qD(Re(Z),Z.key))Z.preventDefault();let de=Re(Z),K=yt(I.target,de);if(L(id(I.target,Z),"keyboard",K),K)le(Z,I.target);if(D(),Z.key!=="Enter"&&KE(I.target)&&yt(I.target,de)&&!Z[VD])Z[VD]=!0,ma(I.target,Z,!1);I.isPressed=!1,I.metaKeyEvents?.delete(Z.key)}else if(Z.key==="Meta"&&I.metaKeyEvents?.size){let de=I.metaKeyEvents;I.metaKeyEvents=void 0;for(let K of de.values())I.target?.dispatchEvent(new KeyboardEvent("keyup",K))}};if(typeof PointerEvent<"u"){F.onPointerDown=(K)=>{if(K.button!==0||!yt(K.currentTarget,Re(K)))return;if(nD(K.nativeEvent)){I.pointerType="virtual";return}I.pointerType=K.pointerType;let k=!0;if(!I.isPressed){if(I.isPressed=!0,I.isOverTarget=!0,I.activePointerId=K.pointerId,I.target=K.currentTarget,!b)zD(I.target);k=U(K,I.pointerType);let X=Re(K);if("releasePointerCapture"in X)if("hasPointerCapture"in X){if(X.hasPointerCapture(K.pointerId))X.releasePointerCapture(K.pointerId)}else X.releasePointerCapture(K.pointerId);R(rt(K.currentTarget),"pointerup",Z,!1),R(rt(K.currentTarget),"pointercancel",de,!1)}if(k)K.stopPropagation()},F.onMouseDown=(K)=>{if(!yt(K.currentTarget,Re(K)))return;if(K.button===0){if(h){let k=Q7(K.target);if(k)I.disposables.push(k)}K.stopPropagation()}},F.onPointerUp=(K)=>{if(!yt(K.currentTarget,Re(K))||I.pointerType==="virtual")return;if(K.button===0&&!I.isPressed)V(K,I.pointerType||K.pointerType)},F.onPointerEnter=(K)=>{if(K.pointerId===I.activePointerId&&I.target&&!I.isOverTarget&&I.pointerType!=null)I.isOverTarget=!0,U(id(I.target,K),I.pointerType)},F.onPointerLeave=(K)=>{if(K.pointerId===I.activePointerId&&I.target&&I.isOverTarget&&I.pointerType!=null)I.isOverTarget=!1,L(id(I.target,K),I.pointerType,!1),J(K)};let Z=(K)=>{if(K.pointerId===I.activePointerId&&I.isPressed&&K.button===0&&I.target){if(yt(I.target,Re(K))&&I.pointerType!=null){let k=!1,X=setTimeout(()=>{if(I.isPressed&&I.target instanceof HTMLElement)if(k)re(K);else Wr(I.target),I.target.click()},80);R(K.currentTarget,"click",()=>k=!0,!0),I.disposables.push(()=>clearTimeout(X))}else re(K);I.isOverTarget=!1}},de=(K)=>{re(K)};F.onDragStart=(K)=>{if(!yt(K.currentTarget,Re(K)))return;re(K)}}return F},[R,u,h,D,b,J,U,ge,le]);return Un.useEffect(()=>{if(!y)return;let I=rt(y.current);if(!I||!I.head||I.getElementById(jD))return;let F=I.createElement("style");F.id=jD;let Y=tx(I);if(Y)F.nonce=Y;F.textContent=`
236
+ @layer {
237
+ [${KD}] {
238
+ touch-action: pan-x pan-y pinch-zoom;
239
+ }
240
+ }
241
+ `.trim(),I.head.prepend(F)},[y]),Un.useEffect(()=>{let I=E.current;return()=>{if(!b)HE(I.target??void 0);for(let F of I.disposables)F();I.disposables=[]}},[b]),{isPressed:f||S,pressProps:Le(v,se,{[KD]:!0})}}function KE(e){return e.tagName==="A"&&e.hasAttribute("href")}function jE(e,t){let{key:n,code:a}=e,i=t,l=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||a==="Space")&&!(i instanceof mn(i).HTMLInputElement&&!GD(i,n)||i instanceof mn(i).HTMLTextAreaElement||i.isContentEditable)&&!((l==="link"||!l&&KE(i))&&n!=="Enter")}function id(e,t){let{clientX:n,clientY:a}=t;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:a,key:t.key}}function IX(e){if(e instanceof HTMLInputElement)return!1;if(e instanceof HTMLButtonElement)return e.type!=="submit"&&e.type!=="reset";if(KE(e))return!1;return!0}function qD(e,t){if(e instanceof HTMLInputElement)return!GD(e,t);return IX(e)}function GD(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":BX.has(e.type)}var LX,Un,VD,jD="react-aria-pressable-style",KD="data-react-aria-pressable",BX;var gg=N(()=>{tp();ag();HD();Wu();fn();UE();hr();ha();TE();pr();hc();VE();ed();hg();BE();LX=q(jr(),1),Un=q(ae(),1);VD=Symbol("linkClicked");BX=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"])});function qE(e,t){let{elementType:n="button",isDisabled:a,onPress:i,onPressStart:l,onPressEnd:c,onPressUp:u,onPressChange:f,preventFocusOnPress:h,allowFocusWhenDisabled:m,onClick:b,href:y,target:v,rel:S,type:C="button"}=e,E;if(n==="button")E={type:C,disabled:a,form:e.form,formAction:e.formAction,formEncType:e.formEncType,formMethod:e.formMethod,formNoValidate:e.formNoValidate,formTarget:e.formTarget,name:e.name,value:e.value};else E={role:"button",href:n==="a"&&!a?y:void 0,target:n==="a"?v:void 0,type:n==="input"?C:void 0,disabled:n==="input"?a:void 0,"aria-disabled":!a||n==="input"?void 0:a,rel:n==="a"?S:void 0};let{pressProps:R,isPressed:D}=wc({onPressStart:l,onPressEnd:c,onPressChange:f,onPress:i,onPressUp:u,onClick:b,isDisabled:a,preventFocusOnPress:h,ref:t}),{focusableProps:U}=xc(e,t);if(m)U.tabIndex=a?-1:U.tabIndex;let z=Le(U,R,mt(e,{labelable:!0}));return{isPressed:D,buttonProps:Le(E,z,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"],"aria-disabled":e["aria-disabled"]})}}var WD=N(()=>{Hs();pr();pp();gg()});var YD=N(()=>{WD()});function mp(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:a,onFocusWithinChange:i}=e,l=bg.useRef({isFocusWithin:!1}),{addGlobalListener:c,removeAllGlobalListeners:u}=Sc(),f=bg.useCallback((b)=>{if(!yt(b.currentTarget,Re(b)))return;if(l.current.isFocusWithin&&!yt(b.currentTarget,b.relatedTarget)){if(l.current.isFocusWithin=!1,u(),n)n(b);if(i)i(!1)}},[n,i,l,u]),h=Dv(f),m=bg.useCallback((b)=>{if(!yt(b.currentTarget,Re(b)))return;let y=Re(b),v=rt(y),S=Et(v);if(!l.current.isFocusWithin&&S===y){if(a)a(b);if(i)i(!0);l.current.isFocusWithin=!0,h(b);let C=b.currentTarget;c(v,"focus",(E)=>{let R=Re(E);if(l.current.isFocusWithin&&!yt(C,R)){let D=new v.defaultView.FocusEvent("blur",{relatedTarget:R});Ov(D,C);let U=og(D);f(U)}},{capture:!0})}},[a,i,h,c,f]);if(t)return{focusWithinProps:{onFocus:void 0,onBlur:void 0}};return{focusWithinProps:{onFocus:m,onBlur:f}}}var bg;var nx=N(()=>{ag();fn();hr();hg();bg=q(ae(),1)});function Uo(e={}){let{autoFocus:t=!1,isTextInput:n,within:a}=e,i=Cc.useRef({isFocused:!1,isFocusVisible:t||ji()}),[l,c]=Cc.useState(!1),[u,f]=Cc.useState(()=>i.current.isFocused&&i.current.isFocusVisible),h=Cc.useCallback(()=>f(i.current.isFocused&&i.current.isFocusVisible),[]),m=Cc.useCallback((v)=>{i.current.isFocused=v,i.current.isFocusVisible=ji(),c(v),h()},[h]);lD((v)=>{i.current.isFocusVisible=v,h()},[n,l],{enabled:l,isTextInput:n});let{focusProps:b}=od({isDisabled:a,onFocusChange:m}),{focusWithinProps:y}=mp({isDisabled:!a,onFocusWithinChange:m});return{isFocused:l,isFocusVisible:u,focusProps:a?y:b}}var Cc;var JD=N(()=>{mc();Jv();nx();Cc=q(ae(),1)});var gp=N(()=>{JD()});function zX(){GE=!0,setTimeout(()=>{GE=!1},500)}function XD(e){if(e.pointerType==="touch")zX()}function HX(){let e=rt(null);if(typeof e>"u")return;if(rx===0){if(typeof PointerEvent<"u")e.addEventListener("pointerup",XD)}return rx++,()=>{if(rx--,rx>0)return;if(typeof PointerEvent<"u")e.removeEventListener("pointerup",XD)}}function gr(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:a,isDisabled:i}=e,[l,c]=Us.useState(!1),u=Us.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;Us.useEffect(HX,[]);let{addGlobalListener:f,removeAllGlobalListeners:h}=Sc(),{hoverProps:m,triggerHoverEnd:b}=Us.useMemo(()=>{let y=(C,E)=>{if(u.pointerType=E,i||E==="touch"||u.isHovered||!yt(C.currentTarget,Re(C)))return;u.isHovered=!0;let R=C.currentTarget;if(u.target=R,f(rt(Re(C)),"pointerover",(D)=>{if(u.isHovered&&u.target&&!yt(u.target,Re(D)))v(D,D.pointerType)},{capture:!0}),t)t({type:"hoverstart",target:R,pointerType:E});if(n)n(!0);c(!0)},v=(C,E)=>{let R=u.target;if(u.pointerType="",u.target=null,E==="touch"||!u.isHovered||!R)return;if(u.isHovered=!1,h(),a)a({type:"hoverend",target:R,pointerType:E});if(n)n(!1);c(!1)},S={};if(typeof PointerEvent<"u")S.onPointerEnter=(C)=>{if(GE&&C.pointerType==="mouse")return;y(C,C.pointerType)},S.onPointerLeave=(C)=>{if(!i&&yt(C.currentTarget,Re(C)))v(C,C.pointerType)};return{hoverProps:S,triggerHoverEnd:v}},[t,n,a,i,u,f,h]);return Us.useEffect(()=>{if(i)b({currentTarget:u.target},u.pointerType)},[i]),{hoverProps:m,isHovered:l}}var Us,GE=!1,rx=0;var ox=N(()=>{fn();hr();hg();Us=q(ae(),1)});var sd=N(()=>{ox()});var WE=N(()=>{Ho()});function UX(e,t){if(t){for(let n in e)if(n.startsWith("on")&&!FX.test(n))e[n]=void 0;e.href=void 0,e.target=void 0}return e}var Vs,ld,Ja,FX;var ax=N(()=>{Gr();DD();_D();YD();up();Ya();pa();gp();sd();WE();Vs=q(ae(),1),ld=Vs.createContext({}),Ja=Wa(function(t,n){[t,n]=an(t,n,ld);let a=t,{isPending:i}=a,{buttonProps:l,isPressed:c}=qE(t,n);l=UX(l,i);let{focusProps:u,isFocused:f,isFocusVisible:h}=Uo(t),{hoverProps:m,isHovered:b}=gr({...t,isDisabled:t.isDisabled||i}),y={isHovered:b,isPressed:(a.isPressed||c)&&!i,isFocused:f,isFocusVisible:h,isDisabled:t.isDisabled||!1,isPending:i??!1},v=Yt({...t,values:y,defaultClassName:"react-aria-Button"}),S=On(l.id),C=On(),E=l["aria-labelledby"];if(i){if(E)E=`${E} ${C}`;else if(l["aria-label"])E=`${S} ${C}`}let R=Vs.useRef(i);Vs.useEffect(()=>{let U={"aria-labelledby":E||S};if(!R.current&&f&&i)Wv(U,"assertive");else if(R.current&&f&&!i)Wv(U,"assertive");R.current=i},[i,f,E,S]);let D=mt(t,{global:!0});return delete D.onClick,Vs.default.createElement(Ot.button,{...Le(D,v,l,u,m),type:l.type==="submit"&&i?"button":l.type,id:S,ref:n,"aria-labelledby":E,slot:t.slot||void 0,"aria-disabled":i?"true":l["aria-disabled"],"data-disabled":t.isDisabled||void 0,"data-pressed":y.isPressed||void 0,"data-hovered":b||void 0,"data-focused":f||void 0,"data-pending":i||void 0,"data-focus-visible":h||void 0},Vs.default.createElement(OD.Provider,{value:{id:C}},v.children))}),FX=/Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/});var ix,QD;var ZD=N(()=>{ix=q(ae(),1),QD=ix.createContext({})});var bp,Ec,Ki;var yp=N(()=>{Gr();bp=q(ae(),1),Ec=bp.createContext({}),Ki=bp.forwardRef(function(t,n){[t,n]=an(t,n,Ec);let{elementType:a="span",...i}=t,l=Ot[a];return bp.default.createElement(l,{className:"react-aria-Text",...i,ref:n})})});function qi(e,t){if(!e)return!1;let n=window.getComputedStyle(e),a=document.scrollingElement||document.documentElement,i=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);if(e===a&&n.overflow!=="hidden")i=!0;if(i&&t)i=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth;return i}var yg=()=>{};function vg(e,t){let n=e;if(qi(n,t))n=n.parentElement;while(n&&!qi(n,t))n=n.parentElement;return n||document.scrollingElement||document.documentElement}var YE=N(()=>{yg()});function sx(e,t){let n=[],a=document.scrollingElement||document.documentElement;while(e){if(qi(e,t))n.push(e);if(e===a)break;e=e.parentElement}return n}var eP=N(()=>{yg()});function xg(e,t,n={}){let{block:a="nearest",inline:i="nearest"}=n;if(e===t)return;let{scrollTop:l,scrollLeft:c}=e,u=t.getBoundingClientRect(),f=e.getBoundingClientRect(),h=window.getComputedStyle(t),m=window.getComputedStyle(e),b=document.scrollingElement||document.documentElement,y=e===b,v=e===b?0:f.top,S=e===b?e.clientHeight:f.bottom,C=e===b?0:f.left,E=e===b?e.clientWidth:f.right,R=parseFloat(h.scrollMarginTop)||0,D=parseFloat(h.scrollMarginBottom)||0,U=parseFloat(h.scrollMarginLeft)||0,z=parseFloat(h.scrollMarginRight)||0,L=parseFloat(m.scrollPaddingTop)||0,Q=parseFloat(m.scrollPaddingBottom)||0,V=parseFloat(m.scrollPaddingLeft)||0,P=parseFloat(m.scrollPaddingRight)||0,re=parseFloat(m.borderTopWidth)||0,J=parseFloat(m.borderBottomWidth)||0,ge=parseFloat(m.borderLeftWidth)||0,le=parseFloat(m.borderRightWidth)||0,se=u.top-R,I=u.bottom+D,F=u.left-U,Y=u.right+z,Z=e===b?0:ge+le,de=e===b?0:re+J,K=e===b?0:e.offsetWidth-e.clientWidth-Z,k=e===b?0:e.offsetHeight-e.clientHeight-de,X=v+(y?0:re)+L,ve=S-(y?0:J)-Q-k,$e=C+(y?0:ge)+V,Ae=E-(y?0:le)-P;if(m.direction==="rtl"&&!Ga())$e+=K;else Ae-=K;let Fe=se<X||I>ve,Te=F<$e||Y>Ae;if(Fe&&a==="start")l+=se-X;else if(Fe&&a==="center")l+=(se+I)/2-(X+ve)/2;else if(Fe&&a==="end")l+=I-ve;else if(Fe&&a==="nearest"){let Ze=se-X,pe=I-ve;l+=Math.abs(Ze)<=Math.abs(pe)?Ze:pe}if(Te&&i==="start")c+=F-$e;else if(Te&&i==="center")c+=(F+Y)/2-($e+Ae)/2;else if(Te&&i==="end")c+=Y-Ae;else if(Te&&i==="nearest"){let Ze=F-$e,pe=Y-Ae;c+=Math.abs(Ze)<=Math.abs(pe)?Ze:pe}e.scrollTo({left:c,top:l})}function JE(e,t={}){let{containingElement:n}=t;if(e&&e.isConnected){let a=document.scrollingElement||document.documentElement;if(window.getComputedStyle(a).overflow!=="hidden"){let{left:l,top:c}=e.getBoundingClientRect();e?.scrollIntoView?.({block:"nearest"});let{left:u,top:f}=e.getBoundingClientRect();if(Math.abs(l-u)>1||Math.abs(c-f)>1)n?.scrollIntoView?.({block:"center",inline:"center"}),e.scrollIntoView?.({block:"nearest"})}else{let{left:l,top:c}=e.getBoundingClientRect(),u=sx(e,!0);for(let m of u)xg(m,e);let{left:f,top:h}=e.getBoundingClientRect();if(Math.abs(l-f)>1||Math.abs(c-h)>1){u=n?sx(n,!0):[];for(let m of u)xg(m,n,{block:"center",inline:"center"});for(let m of sx(e,!0))xg(m,e)}}}}var tP=N(()=>{eP();ha()});function rP(e){let[t,n]=nP.useState();return nt(()=>{if(!e)return;let a=XE.get(e);if(!a){let i=`react-aria-description-${VX++}`;n(i);let l=document.createElement("div");l.id=i,l.style.display="none",l.textContent=e,document.body.appendChild(l),a={refCount:0,element:l},XE.set(e,a)}else n(a.element.id);return a.refCount++,()=>{if(a&&--a.refCount===0)a.element.remove(),XE.delete(e)}},[e]),{"aria-describedby":e?t:void 0}}var nP,VX=0,XE;var oP=N(()=>{fr();nP=q(ae(),1),XE=new Map});function jX(e={}){let{style:t,isFocusable:n}=e,[a,i]=vp.useState(!1),{focusWithinProps:l}=mp({isDisabled:!n,onFocusWithinChange:(u)=>i(u)}),c=vp.useMemo(()=>{if(a)return t;else if(t)return{...aP,...t};else return aP},[a]);return{visuallyHiddenProps:{...l,style:c}}}function iP(e){let{children:t,elementType:n="div",isFocusable:a,style:i,...l}=e,{visuallyHiddenProps:c}=jX(e);return vp.default.createElement(n,Le(l,c),t)}var vp,aP;var sP=N(()=>{pr();nx();vp=q(ae(),1),aP={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"}});var Xa,$g,cd,KX;var QE=N(()=>{Gr();yp();Ya();Xa=q(ae(),1),$g=Xa.createContext(null),cd=Xa.forwardRef(function(t,n){if(!Xa.useContext($g)?.isInvalid)return null;return Xa.default.createElement(KX,{...t,ref:n})}),KX=Xa.forwardRef((e,t)=>{let n=Xa.useContext($g),{elementType:a,...i}=e,l=mt(i,{global:!0}),c=Yt({...i,defaultClassName:"react-aria-FieldError",defaultChildren:n.validationErrors.length===0?void 0:n.validationErrors.join(" "),values:n});if(c.children==null)return null;return Xa.default.createElement(Ki,{slot:"errorMessage",elementType:a,...l,...c,ref:t})})});function rT(e){if(e[eT]){let{realtimeValidation:t,displayValidation:n,updateValidation:a,resetValidation:i,commitValidation:l}=e[eT];return{realtimeValidation:t,displayValidation:n,updateValidation:a,resetValidation:i,commitValidation:l}}return qX(e)}function qX(e){let{isInvalid:t,validationState:n,name:a,value:i,builtinValidation:l,validate:c,validationBehavior:u="aria"}=e;if(n)t||=n==="invalid";let f=t!==void 0?{isInvalid:t,validationErrors:[],validationDetails:cP}:null,h=ar.useMemo(()=>{if(!c||i==null)return null;let J=GX(c,i);return lP(J)},[c,i]);if(l?.validationDetails.valid)l=void 0;let m=ar.useContext(uP),b=ar.useMemo(()=>{if(a)return Array.isArray(a)?a.flatMap((J)=>tT(m[J])):tT(m[a]);return[]},[m,a]),[y,v]=ar.useState(m),[S,C]=ar.useState(!1);if(m!==y)v(m),C(!1);let E=ar.useMemo(()=>lP(S?[]:b),[S,b]),R=ar.useRef(xp),[D,U]=ar.useState(xp),z=ar.useRef(xp),L=()=>{if(!Q)return;V(!1);let J=h||l||R.current;if(!ZE(J,z.current))z.current=J,U(J)},[Q,V]=ar.useState(!1);return ar.useEffect(L),{realtimeValidation:f||E||h||l||xp,displayValidation:u==="native"?f||E||D:f||E||h||l||D,updateValidation(J){if(u==="aria"&&!ZE(D,J))U(J);else R.current=J},resetValidation(){let J=xp;if(!ZE(J,z.current))z.current=J,U(J);if(u==="native")V(!1);C(!0)},commitValidation(){if(u==="native")V(!0);C(!0)}}}function tT(e){if(!e)return[];return Array.isArray(e)?e:[e]}function GX(e,t){if(typeof e==="function"){let n=e(t);if(n&&typeof n!=="boolean")return tT(n)}return[]}function lP(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:cP}:null}function ZE(e,t){if(e===t)return!0;return!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((n,a)=>n===t.validationErrors[a])&&Object.entries(e.validationDetails).every(([n,a])=>t.validationDetails[n]===a)}var ar,nT,cP,xp,uP,eT="__reactAriaFormValidationState";var dP=N(()=>{ar=q(ae(),1),nT={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},cP={...nT,customError:!0,valid:!1},xp={isInvalid:!1,validationDetails:nT,validationErrors:[]},uP=ar.createContext({})});var fP=N(()=>{dP()});var lx,pP;var hP=N(()=>{lx=q(ae(),1),pP=lx.createContext(null)});function mP(e){let{description:t,errorMessage:n,isInvalid:a,validationState:i}=e,{labelProps:l,fieldProps:c}=MD(e),u=fa([Boolean(t),Boolean(n),a,i]),f=fa([Boolean(t),Boolean(n),a,i]);return c=Le(c,{"aria-describedby":[u,f,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:l,fieldProps:c,descriptionProps:{id:u},errorMessageProps:{id:f}}}var gP=N(()=>{ND();pr();Ho()});function yP(e,t,n){let a=mr((i)=>{if(n&&!i.defaultPrevented)n(t)});bP.useEffect(()=>{let i=e?.current?.form;return i?.addEventListener("reset",a),()=>{i?.removeEventListener("reset",a)}},[e])}var bP;var vP=N(()=>{ed();bP=q(ae(),1)});function xP(e,t,n){let{validationBehavior:a,focus:i}=e;nt(()=>{if(a==="native"&&n?.current&&!n.current.disabled){let h=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";if(n.current.setCustomValidity(h),!n.current.hasAttribute("title"))n.current.title="";if(!t.realtimeValidation.isInvalid)t.updateValidation(YX(n.current))}});let l=cx.useRef(!1),c=mr(()=>{if(!l.current)t.resetValidation()}),u=mr((h)=>{if(!t.displayValidation.isInvalid)t.commitValidation();let m=n?.current?.form;if(!h.defaultPrevented&&n&&m&&JX(m)===n.current){if(i)i();else n.current?.focus();cg("keyboard")}h.preventDefault()}),f=mr(()=>{t.commitValidation()});cx.useEffect(()=>{let h=n?.current;if(!h)return;let m=h.form,b=m?.reset;if(m)m.reset=()=>{l.current=!window.event||window.event.type==="message"&&Re(window.event)instanceof MessagePort,b?.call(m),l.current=!1};return h.addEventListener("invalid",u),h.addEventListener("change",f),m?.addEventListener("reset",c),()=>{if(h.removeEventListener("invalid",u),h.removeEventListener("change",f),m?.removeEventListener("reset",c),m)m.reset=b}},[n,a])}function WX(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function YX(e){return{isInvalid:!e.validity.valid,validationDetails:WX(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function JX(e){for(let t=0;t<e.elements.length;t++){let n=e.elements[t];if(n.validity?.valid===!1)return n}return null}var cx;var $P=N(()=>{fn();mc();ed();fr();cx=q(ae(),1)});var ux,SP;var wP=N(()=>{ux=q(ae(),1),SP=ux.createContext({})});var dx,fx,XX=(e)=>{let{onHoverStart:t,onHoverChange:n,onHoverEnd:a,...i}=e;return i},ud;var oT=N(()=>{Gr();up();pa();gp();sd();dx=q(ae(),1),fx=dx.createContext({}),ud=Wa(function(t,n){[t,n]=an(t,n,fx);let{hoverProps:a,isHovered:i}=gr({...t,isDisabled:t.disabled}),{isFocused:l,isFocusVisible:c,focusProps:u}=Uo({isTextInput:!0,autoFocus:t.autoFocus}),f=!!t["aria-invalid"]&&t["aria-invalid"]!=="false",h=Yt({...t,values:{isHovered:i,isFocused:l,isFocusVisible:c,isDisabled:t.disabled||!1,isInvalid:f},defaultClassName:"react-aria-Input"});return dx.default.createElement(Ot.input,{...Le(XX(t),u,a),...h,ref:n,"data-focused":l||void 0,"data-disabled":t.disabled||void 0,"data-hovered":i||void 0,"data-focus-visible":c||void 0,"data-invalid":f||void 0})})});class Vo{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 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,t,n){let a=this.clone();return t.addDescendants(a,e),a}}function EP(e,t,n,a){if(n==null)return[null,null];let i=null,l=null,c=e.getItem(n);while(c!=null){let u=c.filter(e,t,a);if(u!=null){if(u.nextKey=null,l)u.prevKey=l.key,l.nextKey=u.key;if(i==null)i=u;t.addNode(u),l=u}c=c.nextKey!=null?e.getItem(c.nextKey):null}if(l&&l.type==="separator"){let u=l.prevKey;if(t.removeNode(l.key),u!=null)l=t.getItem(u),l.nextKey=null;else l=null}return[i?.key??null,l?.key??null]}var px,CP,hx,$p,mx,aT;var iT=N(()=>{px=class px extends Vo{filter(e,t,n){let[a,i]=EP(e,t,this.firstChildKey,n),l=this.clone();return l.firstChildKey=a,l.lastChildKey=i,l}};CP=class CP extends Vo{static{this.type="header"}};hx=class hx extends Vo{static{this.type="loader"}};$p=class $p extends px{static{this.type="item"}filter(e,t,n){if(n(this.textValue,this)){let a=this.clone();return t.addDescendants(a,e),a}return null}};mx=class mx extends px{static{this.type="section"}filter(e,t,n){let a=super.filter(e,t,n);if(a){if(a.lastChildKey!==null){let i=e.getItem(a.lastChildKey);if(i&&i.type!=="header")return a}}return null}};aT=class aT{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;while(e)yield e,e=e.nextKey!=null?this.keyMap.get(e.nextKey):void 0}getChildren(e){let t=this.keyMap;return{*[Symbol.iterator](){let n=t.get(e),a=n?.firstChildKey!=null?t.get(n.firstChildKey):null;while(a)yield a,a=a.nextKey!=null?t.get(a.nextKey):void 0}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(t.prevKey!=null){t=this.keyMap.get(t.prevKey);while(t&&t.type!=="item"&&t.lastChildKey!=null)t=this.keyMap.get(t.lastChildKey);return t?.key??null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if(t.type!=="item"&&t.firstChildKey!=null)return t.firstChildKey;while(t){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.keyMap.get(t.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey!=null?this.keyMap.get(this.lastKey):null;while(e?.lastChildKey!=null)e=this.keyMap.get(e.lastChildKey);return e?.key??null}getItem(e){return this.keyMap.get(e)??null}at(){throw Error("Not implemented")}clone(){let t=new this.constructor;return t.keyMap=new Map(this.keyMap),t.firstKey=this.firstKey,t.lastKey=this.lastKey,t.itemCount=this.itemCount,t}addNode(e){if(this.frozen)throw Error("Cannot add a node to a frozen collection");if(e.type==="item"&&this.keyMap.get(e.key)==null)this.itemCount++;this.keyMap.set(e.key,e)}addDescendants(e,t){this.addNode(e);let n=t.getChildren(e.key);for(let a of n)this.addDescendants(a,t)}removeNode(e){if(this.frozen)throw Error("Cannot remove a node to a frozen collection");let t=this.keyMap.get(e);if(t!=null&&t.type==="item")this.itemCount--;this.keyMap.delete(e)}commit(e,t,n=!1){if(this.frozen)throw Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=t,this.frozen=!n}filter(e){let t=new this.constructor,[n,a]=EP(this,t,this.firstKey,e);return t?.commit(n,a),t}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}}});function Sg(e){let{children:t,items:n,idScope:a,addIdAndValue:i,dependencies:l=[]}=e,c=Sp.useMemo(()=>typeof t==="function"?t.toString():void 0,[t]),u=Sp.useMemo(()=>new WeakMap,[...l,c]);return Sp.useMemo(()=>{if(n&&typeof t==="function"){let f=[];for(let h of n){let m=QX(h)?h:null,b=m?u.get(m):null;if(!b){b=t(h);let y=b.props.id??h?.key??h?.id;if(a!=null&&b.props.id==null&&y!=null)y=a+":"+y;let v=y??f.length;if(b=Sp.cloneElement(b,i?{key:v,id:y,value:h}:{key:v}),m)u.set(m,b)}f.push(b)}return f}else if(typeof t!=="function")return t},[t,n,u,a,i])}function QX(e){switch(typeof e){case"object":return e!=null;case"function":case"symbol":return!0;default:return!1}}var Sp;var sT=N(()=>{Sp=q(ae(),1)});var wp=zi(function(ZX){var jo=q(ae());(function(){function e(y,v){return y===v&&(y!==0||1/y===1/v)||y!==y&&v!==v}function t(y,v){h||jo.startTransition===void 0||(h=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var S=v();if(!m){var C=v();i(S,C)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),m=!0)}C=l({inst:{value:S,getSnapshot:v}});var E=C[0].inst,R=C[1];return u(function(){E.value=S,E.getSnapshot=v,n(E)&&R({inst:E})},[y,S,v]),c(function(){return n(E)&&R({inst:E}),y(function(){n(E)&&R({inst:E})})},[y]),f(S),S}function n(y){var v=y.getSnapshot;y=y.value;try{var S=v();return!i(y,S)}catch(C){return!0}}function a(y,v){return v()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=typeof Object.is==="function"?Object.is:e,l=jo.useState,c=jo.useEffect,u=jo.useLayoutEffect,f=jo.useDebugValue,h=!1,m=!1,b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?a:t;ZX.useSyncExternalStore=jo.useSyncExternalStore!==void 0?jo.useSyncExternalStore:b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});function eQ(e,t,n){let a=Kr(),i=At.useRef(a);i.current=a;let l=At.useCallback(()=>i.current?n():t(),[t,n]);return kP.useSyncExternalStore(e,l)}function tQ(e){return class extends Vo{static{this.type=e}}}function nQ(e,t,n,a,i,l){if(typeof e==="string")e=tQ(e);let c=At.useCallback((f)=>{f?.setProps(t,n,e,a,l)},[t,n,a,l,e]),u=At.useContext(cT);if(u){let f=u.ownerDocument.nodesByProps.get(t);if(!f)f=u.ownerDocument.createElement(e.type),f.setProps(t,n,e,a,l),u.appendChild(f),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(t,f);return i?At.default.createElement(cT.Provider,{value:f},i):null}return At.default.createElement(e.type,{ref:c},i)}function Gi(e,t){let n=({node:i})=>t(i.props,i.props.ref,i),a=At.forwardRef((i,l)=>{let c=At.useContext(Zv);if(!At.useContext(AP)){if(t.length>=3)throw Error(t.name+" cannot be rendered outside a collection.");return t(i,l)}return nQ(e,i,l,"children"in i?i.children:null,null,(f)=>At.default.createElement(Zv.Provider,{value:c},At.default.createElement(n,{node:f})))});return a.displayName=t.name,a}function rQ(e){return Sg({...e,addIdAndValue:!0})}function uT(e){let t=At.useContext(TP),n=(t?.dependencies||[]).concat(e.dependencies),a=e.idScope??t?.idScope,i=rQ({...e,idScope:a,dependencies:n});if(At.useContext(lT))i=At.default.createElement(oQ,null,i);return t=At.useMemo(()=>({dependencies:n,idScope:a}),[a,...n]),At.default.createElement(TP.Provider,{value:t},i)}function oQ({children:e}){let t=At.useContext(lT),n=At.useMemo(()=>At.default.createElement(lT.Provider,{value:null},At.default.createElement(AP.Provider,{value:!0},e)),[e]);return Kr()?At.default.createElement(cT.Provider,{value:t},n):RP.createPortal(n,t)}var RP,At,kP,AP,lT,Fme,cT,TP;var dT=N(()=>{iT();sT();pp();fc();RP=q(jr(),1),At=q(ae(),1),kP=q(wp(),1),AP=At.createContext(!1),lT=At.createContext(null);Fme=typeof At.default.useSyncExternalStore==="function"?At.default.useSyncExternalStore:eQ,cT=At.createContext(null);TP=At.createContext(null)});var wg=N(()=>{dT()});var NP=N(()=>{sT()});function OP(e,t,n){return Sg({items:t?e.getChildren(t.key):e,dependencies:[n],children(a){if(a.type==="content")return fo.default.createElement(fo.default.Fragment,null);let i=a.render(a);if(!n||a.type!=="item")return i;return fo.default.createElement(fo.default.Fragment,null,n({type:"item",key:a.key,dropPosition:"before"}),i,aQ(e,a,n))}})}function aQ(e,t,n){let a=t.key,i=e.getKeyAfter(a),l=i!=null?e.getItem(i):null;while(l!=null&&l.type!=="item")i=e.getKeyAfter(l.key),l=i!=null?e.getItem(i):null;let c=t.nextKey!=null?e.getItem(t.nextKey):null;while(c!=null&&c.type!=="item")c=c.nextKey!=null?e.getItem(c.nextKey):null;let u=[];if(c==null){let f=t;while(f?.type==="item"&&(!l||f.parentKey!==l.parentKey&&l.level<f.level)){let h=n({type:"item",key:f.key,dropPosition:"after"});if(fo.isValidElement(h))u.push(fo.cloneElement(h,{key:`${f.key}-after`}));f=f.parentKey!=null?e.getItem(f.parentKey):null}}return u}function hT(e){return fo.useMemo(()=>e!=null?new Set([e]):null,[e])}var fo,pT,Cg;var mT=N(()=>{NP();fo=q(ae(),1),pT={CollectionRoot({collection:e,renderDropIndicator:t}){return OP(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return OP(e,t,n)}};Cg=fo.createContext(pT)});var dd,DP;var PP=N(()=>{dd=q(ae(),1),DP=dd.createContext({})});var Eg=N(()=>{iT()});function LP(e){let t=js.useRef({});return js.default.createElement(sQ.Provider,{value:t},e.children)}var iQ,js,sQ;var _P=N(()=>{iQ=q(jr(),1),js=q(ae(),1),sQ=js.createContext(null)});var gx,Cp;var bx=N(()=>{gx=q(ae(),1),Cp=gx.createContext({isSelected:!1})});function gT(e){let t=mt(e,{labelable:!0}),n;if(e.orientation==="vertical")n="vertical";if(e.elementType!=="hr")return{separatorProps:{...t,role:"separator","aria-orientation":n}};return{separatorProps:t}}var IP=N(()=>{Hs()});var BP=N(()=>{IP()});var yx,zP,HP,bT;var FP=N(()=>{Gr();BP();Eg();wg();Ya();pa();yx=q(ae(),1),zP=yx.createContext({});HP=class HP extends Vo{static{this.type="separator"}filter(e,t){let n=t.getItem(this.prevKey);if(n&&n.type!=="separator"){let a=this.clone();return t.addDescendants(a,e),a}return null}};bT=Gi(HP,function(t,n){[t,n]=an(t,n,zP);let{elementType:a,orientation:i,style:l,className:c,slot:u,...f}=t,h=a||"hr";if(h==="hr"&&i==="vertical")h="div";let m=Ot[h],{separatorProps:b}=gT({...f,elementType:a,orientation:i}),y=mt(t,{global:!0});return yx.default.createElement(m,{render:t.render,...Le(y,b),style:l,className:c??"react-aria-Separator",ref:n,slot:u||void 0})})});function lQ(e){if(typeof e==="string")return e.replace(/\s*/g,"");return""+e}function UP(e,t){let n=yT.get(e);if(!n)throw Error("Unknown list");return`${n.id}-option-${lQ(t)}`}var yT;var VP=N(()=>{yT=new WeakMap});class jP{constructor(e,t,n,a){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=(l)=>{if(l.nodeType===Node.ELEMENT_NODE){let c=l.shadowRoot;if(c){let u=this._doc.createTreeWalker(c,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(u),NodeFilter.FILTER_ACCEPT}else if(typeof this.filter==="function")return this.filter(l);else if(this.filter?.acceptNode)return this.filter.acceptNode(l);else if(this.filter===null)return NodeFilter.FILTER_ACCEPT}return NodeFilter.FILTER_SKIP},this._doc=e,this.root=t,this.filter=a??null,this.whatToShow=n??NodeFilter.SHOW_ALL,this._currentNode=t,this._walkerStack.unshift(e.createTreeWalker(t,n,this._acceptNode));let i=t.shadowRoot;if(i){let l=this._doc.createTreeWalker(i,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(l)}}get currentNode(){return this._currentNode}set currentNode(e){if(!yt(this.root,e))throw Error("Cannot set currentNode to a node that is not contained by the root node.");let t=[],n=e,a=e;this._currentNode=e;while(n&&n!==this.root)if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let l=n,c=this._doc.createTreeWalker(l,this.whatToShow,{acceptNode:this._acceptNode});t.push(c),c.currentNode=a,this._currentSetFor.add(c),n=a=l.host}else n=n.parentNode;let i=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});t.push(i),i.currentNode=a,this._currentSetFor.add(i),this._walkerStack=t}get doc(){return this._doc}firstChild(){let e=this.currentNode,t=this.nextNode();if(!yt(e,t))return this.currentNode=e,null;if(t)this.currentNode=t;return t}lastChild(){let t=this._walkerStack[0].lastChild();if(t)this.currentNode=t;return t}nextNode(){let e=this._walkerStack[0].nextNode();if(e){if(e.shadowRoot){let n;if(typeof this.filter==="function")n=this.filter(e);else if(this.filter?.acceptNode)n=this.filter.acceptNode(e);if(n===NodeFilter.FILTER_ACCEPT)return this.currentNode=e,e;let a=this.nextNode();if(a)this.currentNode=a;return a}if(e)this.currentNode=e;return e}else if(this._walkerStack.length>1){this._walkerStack.shift();let t=this.nextNode();if(t)this.currentNode=t;return t}else return null}previousNode(){let 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 n=this.previousNode();if(n)this.currentNode=n;return n}else return null;return null}let t=e.previousNode();if(t){if(t.shadowRoot){let a;if(typeof this.filter==="function")a=this.filter(t);else if(this.filter?.acceptNode)a=this.filter.acceptNode(t);if(a===NodeFilter.FILTER_ACCEPT){if(t)this.currentNode=t;return t}let i=this.lastChild();if(i)this.currentNode=i;return i}if(t)this.currentNode=t;return t}else if(this._walkerStack.length>1){this._walkerStack.shift();let n=this.previousNode();if(n)this.currentNode=n;return n}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}}function vx(e,t,n,a){if(Fo())return new jP(e,t,n,a);return e.createTreeWalker(t,n,a)}var vT=N(()=>{fn();Cv()});function WP(e){let{children:t,contain:n,restoreFocus:a,autoFocus:i}=e,l=Sn.useRef(null),c=Sn.useRef(null),u=Sn.useRef([]),{parentNode:f}=Sn.useContext(KP)||{},h=Sn.useMemo(()=>new $x({scopeRef:u}),[u]);nt(()=>{let y=f||Vn.root;if(Vn.getTreeNode(y.scopeRef)&&Zt&&!xx(Zt,y.scopeRef)){let v=Vn.getTreeNode(Zt);if(v)y=v}y.addChild(h),Vn.addNode(h)},[h,f]),nt(()=>{let y=Vn.getTreeNode(u);if(y)y.contain=!!n},[n]),nt(()=>{let y=l.current?.nextSibling,v=[],S=(C)=>C.stopPropagation();while(y&&y!==c.current)v.push(y),y.addEventListener(xT,S),y=y.nextSibling;return u.current=v,()=>{for(let C of v)C.removeEventListener(xT,S)}},[t]),hQ(u,a,n),fQ(u,n),mQ(u,a,n),pQ(u,i),Sn.useEffect(()=>{let y=Et(rt(u.current?u.current[0]:void 0)),v=null;if(ya(y,u.current)){for(let S of Vn.traverse())if(S.scopeRef&&ya(y,S.scopeRef.current))v=S;if(v===Vn.getTreeNode(u))Zt=v.scopeRef}},[u]),nt(()=>()=>{let y=Vn.getTreeNode(u)?.parent?.scopeRef??null;if((u===Zt||xx(u,Zt))&&(!y||Vn.getTreeNode(y)))Zt=y;Vn.removeTreeNode(u)},[u]);let m=Sn.useMemo(()=>cQ(u),[]),b=Sn.useMemo(()=>({focusManager:m,parentNode:h}),[h,m]);return Sn.default.createElement(KP.Provider,{value:b},Sn.default.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:l}),t,Sn.default.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:c}))}function cQ(e){return{focusNext(t={}){let n=e.current,{from:a,tabbable:i,wrap:l,accept:c}=t,u=a||Et(rt(n[0]??void 0)),f=n[0].previousElementSibling,h=fd(n),m=ba(h,{tabbable:i,accept:c},n);m.currentNode=ya(u,n)?u:f;let b=m.nextNode();if(!b&&l)m.currentNode=f,b=m.nextNode();if(b)Ks(b,!0);return b},focusPrevious(t={}){let n=e.current,{from:a,tabbable:i,wrap:l,accept:c}=t,u=a||Et(rt(n[0]??void 0)),f=n[n.length-1].nextElementSibling,h=fd(n),m=ba(h,{tabbable:i,accept:c},n);m.currentNode=ya(u,n)?u:f;let b=m.previousNode();if(!b&&l)m.currentNode=f,b=m.previousNode();if(b)Ks(b,!0);return b},focusFirst(t={}){let n=e.current,{tabbable:a,accept:i}=t,l=fd(n),c=ba(l,{tabbable:a,accept:i},n);c.currentNode=n[0].previousElementSibling;let u=c.nextNode();if(u)Ks(u,!0);return u},focusLast(t={}){let n=e.current,{tabbable:a,accept:i}=t,l=fd(n),c=ba(l,{tabbable:a,accept:i},n);c.currentNode=n[n.length-1].nextElementSibling;let u=c.previousNode();if(u)Ks(u,!0);return u}}}function fd(e){return e[0].parentElement}function Tg(e){let t=Vn.getTreeNode(Zt);while(t&&t.scopeRef!==e){if(t.contain)return!1;t=t.parent}return!0}function uQ(e){if(!e.form)return Array.from(rt(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)).filter((a)=>!a.form);let t=e.form.elements.namedItem(e.name),n=mn(e);if(t instanceof n.RadioNodeList)return Array.from(t).filter((a)=>a instanceof n.HTMLInputElement);if(t instanceof n.HTMLInputElement)return[t];return[]}function dQ(e){if(e.checked)return!0;let t=uQ(e);return t.length>0&&!t.some((n)=>n.checked)}function fQ(e,t){let n=Sn.useRef(void 0),a=Sn.useRef(void 0);nt(()=>{let i=e.current;if(!t){if(a.current)cancelAnimationFrame(a.current),a.current=void 0;return}let l=rt(i?i[0]:void 0),c=(h)=>{if(h.key!=="Tab"||h.altKey||h.ctrlKey||h.metaKey||!Tg(e)||h.isComposing)return;let m=Et(l),b=e.current;if(!b||!ya(m,b))return;let y=fd(b),v=ba(y,{tabbable:!0},b);if(!m)return;v.currentNode=m;let S=h.shiftKey?v.previousNode():v.nextNode();if(!S)v.currentNode=h.shiftKey?b[b.length-1].nextElementSibling:b[0].previousElementSibling,S=h.shiftKey?v.previousNode():v.nextNode();if(h.preventDefault(),S){if(Ks(S,!0),S instanceof mn(S).HTMLInputElement)S.select()}},u=(h)=>{if((!Zt||xx(Zt,e))&&ya(Re(h),e.current))Zt=e,n.current=Re(h);else if(Tg(e)&&!Tc(Re(h),e)){if(n.current)n.current.focus();else if(Zt&&Zt.current)$T(Zt.current)}else if(Tg(e))n.current=Re(h)},f=(h)=>{if(a.current)cancelAnimationFrame(a.current);a.current=requestAnimationFrame(()=>{let m=Qu(),b=(m==="virtual"||m===null)&&ig()&&EE(),y=Et(l);if(!b&&y&&Tg(e)&&!Tc(y,e)){Zt=e;let v=Re(h);if(v&&v.isConnected)n.current=v,n.current?.focus();else if(Zt.current)$T(Zt.current)}})};return l.addEventListener("keydown",c,!1),l.addEventListener("focusin",u,!1),i?.forEach((h)=>h.addEventListener("focusin",u,!1)),i?.forEach((h)=>h.addEventListener("focusout",f,!1)),()=>{l.removeEventListener("keydown",c,!1),l.removeEventListener("focusin",u,!1),i?.forEach((h)=>h.removeEventListener("focusin",u,!1)),i?.forEach((h)=>h.removeEventListener("focusout",f,!1))}},[e,t]),nt(()=>()=>{if(a.current)cancelAnimationFrame(a.current)},[a])}function YP(e){return Tc(e)}function ya(e,t){if(!e)return!1;if(!t)return!1;return t.some((n)=>yt(n,e))}function Tc(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of Vn.traverse(Vn.getTreeNode(t)))if(n&&ya(e,n.current))return!0;return!1}function JP(e){return Tc(e,Zt)}function xx(e,t){let n=Vn.getTreeNode(t)?.parent;while(n){if(n.scopeRef===e)return!0;n=n.parent}return!1}function Ks(e,t=!1){if(e!=null&&!t)try{ga(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function XP(e,t=!0){let n=e[0].previousElementSibling,a=fd(e),i=ba(a,{tabbable:t},e);i.currentNode=n;let l=i.nextNode();if(t&&!l)a=fd(e),i=ba(a,{tabbable:!1},e),i.currentNode=n,l=i.nextNode();return l}function $T(e,t=!0){Ks(XP(e,t))}function pQ(e,t){let n=Sn.default.useRef(t);Sn.useEffect(()=>{if(n.current){Zt=e;let a=rt(e.current?e.current[0]:void 0);if(!ya(Et(a),Zt.current)&&e.current)$T(e.current)}n.current=!1},[e])}function hQ(e,t,n){nt(()=>{if(t||n)return;let a=e.current,i=rt(a?a[0]:void 0),l=(c)=>{let u=Re(c);if(ya(u,e.current))Zt=e;else if(!YP(u))Zt=null};return i.addEventListener("focusin",l,!1),a?.forEach((c)=>c.addEventListener("focusin",l,!1)),()=>{i.removeEventListener("focusin",l,!1),a?.forEach((c)=>c.removeEventListener("focusin",l,!1))}},[e,t,n])}function qP(e){let t=Vn.getTreeNode(Zt);while(t&&t.scopeRef!==e){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function mQ(e,t,n){let a=Sn.useRef(typeof document<"u"?Et(rt(e.current?e.current[0]:void 0)):null);nt(()=>{let i=e.current,l=rt(i?i[0]:void 0);if(!t||n)return;let c=()=>{if((!Zt||xx(Zt,e))&&ya(Et(l),e.current))Zt=e};return l.addEventListener("focusin",c,!1),i?.forEach((u)=>u.addEventListener("focusin",c,!1)),()=>{l.removeEventListener("focusin",c,!1),i?.forEach((u)=>u.removeEventListener("focusin",c,!1))}},[e,n]),nt(()=>{let i=rt(e.current?e.current[0]:void 0);if(!t)return;let l=(c)=>{if(c.key!=="Tab"||c.altKey||c.ctrlKey||c.metaKey||!Tg(e)||c.isComposing)return;let u=i.activeElement;if(!Tc(u,e)||!qP(e))return;let f=Vn.getTreeNode(e);if(!f)return;let h=f.nodeToRestore,m=ba(i.body,{tabbable:!0});m.currentNode=u;let b=c.shiftKey?m.previousNode():m.nextNode();if(!h||!h.isConnected||h===i.body)h=void 0,f.nodeToRestore=void 0;if((!b||!Tc(b,e))&&h){m.currentNode=h;do b=c.shiftKey?m.previousNode():m.nextNode();while(Tc(b,e));if(c.preventDefault(),c.stopPropagation(),b)Ks(b,!0);else if(!YP(h))u.blur();else Ks(h,!0)}};if(!n)i.addEventListener("keydown",l,!0);return()=>{if(!n)i.removeEventListener("keydown",l,!0)}},[e,t,n]),nt(()=>{let i=rt(e.current?e.current[0]:void 0);if(!t)return;let l=Vn.getTreeNode(e);if(!l)return;return l.nodeToRestore=a.current??void 0,()=>{let c=Vn.getTreeNode(e);if(!c)return;let u=c.nodeToRestore,f=Et(i);if(t&&u&&(f&&Tc(f,e)||f===i.body&&qP(e))){let h=Vn.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let m=h.getTreeNode(e);while(m){if(m.nodeToRestore&&m.nodeToRestore.isConnected){GP(m.nodeToRestore);return}m=m.parent}m=h.getTreeNode(e);while(m){if(m.scopeRef&&m.scopeRef.current&&Vn.getTreeNode(m.scopeRef)){let b=XP(m.scopeRef.current,!0);GP(b);return}m=m.parent}}})}}},[e,t])}function GP(e){if(e.dispatchEvent(new CustomEvent(xT,{bubbles:!0,cancelable:!0})))Ks(e)}function ba(e,t,n){let a=t?.tabbable?Av:kv,i=e?.nodeType===Node.ELEMENT_NODE?e:null,l=rt(i),c=vx(l,e||l,NodeFilter.SHOW_ELEMENT,{acceptNode(u){if(yt(t?.from,u))return NodeFilter.FILTER_REJECT;if(t?.tabbable&&u.tagName==="INPUT"&&u.getAttribute("type")==="radio"){if(!dQ(u))return NodeFilter.FILTER_REJECT;if(c.currentNode.tagName==="INPUT"&&c.currentNode.type==="radio"&&c.currentNode.name===u.name)return NodeFilter.FILTER_REJECT}if(a(u)&&(!n||ya(u,n))&&(!t?.accept||t.accept(u)))return NodeFilter.FILTER_ACCEPT;return NodeFilter.FILTER_SKIP}});if(t?.from)c.currentNode=t.from;return c}class ST{constructor(){this.fastMap=new Map,this.root=new $x({scopeRef:null}),this.fastMap.set(null,this.root)}get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,n){let a=this.fastMap.get(t??null);if(!a)return;let i=new $x({scopeRef:e});if(a.addChild(i),i.parent=a,this.fastMap.set(e,i),n)i.nodeToRestore=n}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let t=this.fastMap.get(e);if(!t)return;let n=t.parent;for(let i of this.traverse())if(i!==t&&t.nodeToRestore&&i.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&ya(i.nodeToRestore,t.scopeRef.current))i.nodeToRestore=t.nodeToRestore;let a=t.children;if(n){if(n.removeChild(t),a.size>0)a.forEach((i)=>n&&n.addChild(i))}this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null)yield e;if(e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){let e=new ST;for(let t of this.traverse())e.addTreeNode(t.scopeRef,t.parent?.scopeRef??null,t.nodeToRestore);return e}}class $x{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}}var Sn,KP,xT="react-aria-focus-scope-restore",Zt=null,Vn;var Rg=N(()=>{vT();fp();fn();mc();hr();ha();Mv();fr();Sn=q(ae(),1),KP=Sn.default.createContext(null);Vn=new ST});function kg(e){return Z7()?e.altKey:e.ctrlKey}function Sx(e,t){let n=`[data-key="${CSS.escape(String(t))}"]`,a=e.current?.dataset.collection;if(a)n=`[data-collection="${CSS.escape(a)}"]${n}`;return e.current?.querySelector(n)}function ZP(e){let t=On();return QP.set(e,t),t}function e9(e){return QP.get(e)}var QP;var wT=N(()=>{ha();Ho();QP=new WeakMap});function n9(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:a}=e,i=t9.useRef({search:"",timeout:void 0}).current,l=(c)=>{let u=bQ(c.key);if(!u||c.ctrlKey||c.metaKey||!yt(c.currentTarget,Re(c))||i.search.length===0&&u===" ")return;if(u===" "&&i.search.trim().length>0){if(c.preventDefault(),!("continuePropagation"in c))c.stopPropagation()}if(i.search+=u,t.getKeyForSearch!=null){let f=t.getKeyForSearch(i.search,n.focusedKey);if(f==null)f=t.getKeyForSearch(i.search);if(f!=null){if(n.setFocusedKey(f),a)a(f)}}clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=""},gQ)};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?l:void 0}}}function bQ(e){if(e.length===1||!/^[A-Z]/i.test(e))return e;return""}var t9,gQ=1000;var r9=N(()=>{fn();t9=q(ae(),1)});function ET(e,t){let n=CT.useRef(!0),a=CT.useRef(null);nt(()=>(n.current=!0,()=>{n.current=!1}),[]),nt(()=>{if(n.current)n.current=!1;else if(!a.current||t.some((i,l)=>!Object.is(i,a[l])))e();a.current=t},t)}var CT;var o9=N(()=>{fr();CT=q(ae(),1)});function i9(e){let{selectionManager:t,keyboardDelegate:n,ref:a,autoFocus:i=!1,shouldFocusWrap:l=!1,disallowEmptySelection:c=!1,disallowSelectAll:u=!1,escapeKeyBehavior:f="clearSelection",selectOnFocus:h=t.selectionBehavior==="replace",disallowTypeAhead:m=!1,shouldUseVirtualFocus:b,allowsTabNavigation:y=!1,scrollRef:v=a,linkBehavior:S="action"}=e,{direction:C}=lp(),E=Yu(),R=(I)=>{if(I.altKey&&I.key==="Tab")I.preventDefault();if(!a.current||!yt(a.current,Re(I)))return;let F=(Y,Z)=>{if(Y!=null){if(t.isLink(Y)&&S==="selection"&&h&&!kg(I)){a9.flushSync(()=>{t.setFocusedKey(Y,Z)});let de=Sx(a,Y),K=t.getItemProps(Y);if(de)E.open(de,I,K.href,K.routerOptions);return}if(t.setFocusedKey(Y,Z),t.isLink(Y)&&S==="override")return;if(I.shiftKey&&t.selectionMode==="multiple")t.extendSelection(Y);else if(h&&!kg(I))t.replaceSelection(Y)}};switch(I.key){case"ArrowDown":if(n.getKeyBelow){let Y=t.focusedKey!=null?n.getKeyBelow?.(t.focusedKey):n.getFirstKey?.();if(Y==null&&l)Y=n.getFirstKey?.(t.focusedKey);if(Y!=null)I.preventDefault(),F(Y)}break;case"ArrowUp":if(n.getKeyAbove){let Y=t.focusedKey!=null?n.getKeyAbove?.(t.focusedKey):n.getLastKey?.();if(Y==null&&l)Y=n.getLastKey?.(t.focusedKey);if(Y!=null)I.preventDefault(),F(Y)}break;case"ArrowLeft":if(n.getKeyLeftOf){let Y=t.focusedKey!=null?n.getKeyLeftOf?.(t.focusedKey):n.getFirstKey?.();if(Y==null&&l)Y=C==="rtl"?n.getFirstKey?.(t.focusedKey):n.getLastKey?.(t.focusedKey);if(Y!=null)I.preventDefault(),F(Y,C==="rtl"?"first":"last")}break;case"ArrowRight":if(n.getKeyRightOf){let Y=t.focusedKey!=null?n.getKeyRightOf?.(t.focusedKey):n.getFirstKey?.();if(Y==null&&l)Y=C==="rtl"?n.getLastKey?.(t.focusedKey):n.getFirstKey?.(t.focusedKey);if(Y!=null)I.preventDefault(),F(Y,C==="rtl"?"last":"first")}break;case"Home":if(n.getFirstKey){if(t.focusedKey===null&&I.shiftKey)return;I.preventDefault();let Y=n.getFirstKey(t.focusedKey,gc(I));if(t.setFocusedKey(Y),Y!=null){if(gc(I)&&I.shiftKey&&t.selectionMode==="multiple")t.extendSelection(Y);else if(h)t.replaceSelection(Y)}}break;case"End":if(n.getLastKey){if(t.focusedKey===null&&I.shiftKey)return;I.preventDefault();let Y=n.getLastKey(t.focusedKey,gc(I));if(t.setFocusedKey(Y),Y!=null){if(gc(I)&&I.shiftKey&&t.selectionMode==="multiple")t.extendSelection(Y);else if(h)t.replaceSelection(Y)}}break;case"PageDown":if(n.getKeyPageBelow&&t.focusedKey!=null){let Y=n.getKeyPageBelow(t.focusedKey);if(Y!=null)I.preventDefault(),F(Y)}break;case"PageUp":if(n.getKeyPageAbove&&t.focusedKey!=null){let Y=n.getKeyPageAbove(t.focusedKey);if(Y!=null)I.preventDefault(),F(Y)}break;case"a":if(gc(I)&&t.selectionMode==="multiple"&&u!==!0)I.preventDefault(),t.selectAll();break;case"Escape":if(f==="clearSelection"&&!c&&t.selectedKeys.size!==0)I.stopPropagation(),I.preventDefault(),t.clearSelection();break;case"Tab":if(!y){if(I.shiftKey)a.current.focus();else{let Y=ba(a.current,{tabbable:!0}),Z=void 0,de;do if(de=Y.lastChild(),de)Z=de;while(de);let K=Et();if(Z&&(!ng(Z)||K&&!Av(K)))Wr(Z)}break}}},D=Qa.useRef({top:0,left:0});td(v,"scroll",()=>{D.current={top:v.current?.scrollTop??0,left:v.current?.scrollLeft??0}});let U=(I)=>{if(t.isFocused){if(!yt(I.currentTarget,Re(I)))t.setFocused(!1);return}if(!yt(I.currentTarget,Re(I)))return;if(t.setFocused(!0),t.focusedKey==null){let F=(Z)=>{if(Z!=null){if(t.setFocusedKey(Z),h&&!t.isSelected(Z))t.replaceSelection(Z)}},Y=I.relatedTarget;if(Y&&I.currentTarget.compareDocumentPosition(Y)&Node.DOCUMENT_POSITION_FOLLOWING)F(t.lastSelectedKey??n.getLastKey?.());else F(t.firstSelectedKey??n.getFirstKey?.())}else if(v.current)v.current.scrollTop=D.current.top,v.current.scrollLeft=D.current.left;if(t.focusedKey!=null&&v.current){let F=Sx(a,t.focusedKey);if(F instanceof HTMLElement){if(!ng(F)&&!b)Wr(F);if(Qu()==="keyboard")JE(F,{containingElement:a.current})}}},z=(I)=>{if(!yt(I.currentTarget,I.relatedTarget))t.setFocused(!1)},L=Qa.useRef(!1);td(a,q7,!b?void 0:(I)=>{let{detail:F}=I;if(I.stopPropagation(),t.setFocused(!0),F?.focusStrategy==="first")L.current=!0}),ET(()=>{if(L.current){let I=n.getFirstKey?.()??null;if(I==null){let F=Et();if(Ev(a.current),xE(F,null),t.collection.size>0)L.current=!1}else t.setFocusedKey(I),L.current=!1}},[t.collection]),ET(()=>{if(t.collection.size>0)L.current=!1},[t.focusedKey]),td(a,K7,!b?void 0:(I)=>{if(I.stopPropagation(),t.setFocused(!1),I.detail?.clearFocusKey)t.setFocusedKey(null)});let Q=Qa.useRef(i),V=Qa.useRef(!1);Qa.useEffect(()=>{if(Q.current){let I=null;if(i==="first")I=n.getFirstKey?.()??null;if(i==="last")I=n.getLastKey?.()??null;let F=t.selectedKeys;if(F.size){for(let Y of F)if(t.canSelectItem(Y)){I=Y;break}}if(t.setFocused(!0),t.setFocusedKey(I),I==null&&!b&&a.current)ga(a.current);if(t.collection.size>0)Q.current=!1,V.current=!0}});let P=Qa.useRef(t.focusedKey),re=Qa.useRef(null);Qa.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==P.current||V.current)&&v.current&&a.current){let I=Qu(),F=Sx(a,t.focusedKey);if(!(F instanceof HTMLElement))return;if(I==="keyboard"||V.current){if(re.current)cancelAnimationFrame(re.current);re.current=requestAnimationFrame(()=>{if(v.current){if(xg(v.current,F),I!=="virtual")JE(F,{containingElement:a.current})}})}}if(!b&&t.isFocused&&t.focusedKey==null&&P.current!=null&&a.current)ga(a.current);P.current=t.focusedKey,V.current=!1}),Qa.useEffect(()=>()=>{if(re.current)cancelAnimationFrame(re.current)},[]),td(a,"react-aria-focus-scope-restore",(I)=>{I.preventDefault(),t.setFocused(!0)});let J={onKeyDown:R,onFocus:U,onBlur:z,onMouseDown(I){if(v.current===Re(I))I.preventDefault()}},{typeSelectProps:ge}=n9({keyboardDelegate:n,selectionManager:t});if(!m)J=Le(ge,J);let le=void 0;if(!b)le=t.focusedKey==null?0:-1;let se=ZP(t.collection);return{collectionProps:Le(J,{tabIndex:le,"data-collection":se})}}var a9,Qa;var s9=N(()=>{G7();$E();fp();Wu();fn();Rg();mc();wT();ug();Mv();pr();tP();NE();Hv();hc();r9();o9();a9=q(jr(),1),Qa=q(ae(),1)});function c9(e){let{isDisabled:t,onLongPressStart:n,onLongPressEnd:a,onLongPress:i,threshold:l=yQ,accessibilityDescription:c}=e,u=l9.useRef(void 0),{addGlobalListener:f,removeGlobalListener:h}=Sc(),{pressProps:m}=wc({isDisabled:t,onPressStart(y){if(y.continuePropagation(),y.pointerType==="mouse"||y.pointerType==="touch"){if(n)n({...y,type:"longpressstart"});if(u.current=setTimeout(()=>{if(y.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),rt(y.target).activeElement!==y.target)Wr(y.target);if(i)i({...y,type:"longpress"});u.current=void 0},l),y.pointerType==="touch"){let v=(C)=>{C.preventDefault()},S=mn(y.target);f(y.target,"contextmenu",v,{once:!0}),f(S,"pointerup",()=>{setTimeout(()=>{h(y.target,"contextmenu",v)},30)},{once:!0})}}},onPressEnd(y){if(u.current)clearTimeout(u.current);if(a&&(y.pointerType==="mouse"||y.pointerType==="touch"))a({...y,type:"longpressend"})}}),b=rP(i&&!t?c:void 0);return{longPressProps:Le(m,b)}}var l9,yQ=500;var u9=N(()=>{Wu();hr();pr();oP();hg();gg();l9=q(ae(),1)});function Ep(e){let{id:t,selectionManager:n,key:a,ref:i,shouldSelectOnPressUp:l,shouldUseVirtualFocus:c,focus:u,isDisabled:f,onAction:h,allowsDifferentPressOrigin:m,linkBehavior:b="action"}=e,y=Yu();t=On(t);let v=(k)=>{if(k.pointerType==="keyboard"&&kg(k))n.toggleSelection(a);else{if(n.selectionMode==="none")return;if(n.isLink(a)){if(b==="selection"&&i.current){let X=n.getItemProps(a);y.open(i.current,k,X.href,X.routerOptions),n.setSelectedKeys(n.selectedKeys);return}else if(b==="override"||b==="none")return}if(n.selectionMode==="single")if(n.isSelected(a)&&!n.disallowEmptySelection)n.toggleSelection(a);else n.replaceSelection(a);else if(k&&k.shiftKey)n.extendSelection(a);else if(n.selectionBehavior==="toggle"||k&&(gc(k)||k.pointerType==="touch"||k.pointerType==="virtual"))n.toggleSelection(a);else n.replaceSelection(a)}};pd.useEffect(()=>{if(a===n.focusedKey&&n.isFocused)if(!c){if(u)u();else if(Et()!==i.current&&i.current)ga(i.current)}else Ev(i.current)},[i,a,n.focusedKey,n.childFocusStrategy,n.isFocused,c]),f=f||n.isDisabled(a);let S={};if(!c&&!f)S={tabIndex:a===n.focusedKey?0:-1,onFocus(k){if(Re(k)===i.current)n.setFocusedKey(a)}};else if(f)S.onMouseDown=(k)=>{k.preventDefault()};pd.useEffect(()=>{if(f&&n.focusedKey===a)n.setFocusedKey(null)},[n,f,a]);let C=n.isLink(a)&&b==="override",E=h&&e.UNSTABLE_itemBehavior==="action",R=n.isLink(a)&&b!=="selection"&&b!=="none",D=!f&&n.canSelectItem(a)&&!C&&!E,U=(h||R)&&!f,z=U&&(n.selectionBehavior==="replace"?!D:!D||n.isEmpty),L=U&&D&&n.selectionBehavior==="replace",Q=z||L,V=pd.useRef(null),P=Q&&D,re=pd.useRef(!1),J=pd.useRef(!1),ge=n.getItemProps(a),le=(k)=>{if(h)h(),i.current?.dispatchEvent(new CustomEvent("react-aria-item-action",{bubbles:!0}));if(R&&i.current)y.open(i.current,k,ge.href,ge.routerOptions)},se={ref:i};if(l)if(se.onPressStart=(k)=>{if(V.current=k.pointerType,re.current=P,k.pointerType==="keyboard"&&(!Q||f9(k.key)))v(k)},!m)se.onPress=(k)=>{if(z||L&&k.pointerType!=="mouse"){if(k.pointerType==="keyboard"&&!d9(k.key))return;le(k)}else if(k.pointerType!=="keyboard"&&D)v(k)};else se.onPressUp=z?void 0:(k)=>{if(k.pointerType==="mouse"&&D)v(k)},se.onPress=z?le:(k)=>{if(k.pointerType!=="keyboard"&&k.pointerType!=="mouse"&&D)v(k)};else se.onPressStart=(k)=>{if(V.current=k.pointerType,re.current=P,J.current=z,D&&(k.pointerType==="mouse"&&!z||k.pointerType==="keyboard"&&(!U||f9(k.key))))v(k)},se.onPress=(k)=>{if(k.pointerType==="touch"||k.pointerType==="pen"||k.pointerType==="virtual"||k.pointerType==="keyboard"&&Q&&d9(k.key)||k.pointerType==="mouse"&&J.current){if(Q)le(k);else if(D)v(k)}};if(S["data-collection"]=e9(n.collection),S["data-key"]=a,se.preventFocusOnPress=c,c)se=Le(se,{onPressStart(k){if(k.pointerType!=="touch")n.setFocused(!0),n.setFocusedKey(a)},onPress(k){if(k.pointerType==="touch")n.setFocused(!0),n.setFocusedKey(a)}});if(ge){for(let k of["onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick"])if(ge[k])se[k]=Ka(se[k],ge[k])}let{pressProps:I,isPressed:F}=wc(se),Y=L?(k)=>{if(V.current==="mouse")k.stopPropagation(),k.preventDefault(),le(k)}:void 0,{longPressProps:Z}=c9({isDisabled:!P,onLongPress(k){if(k.pointerType==="touch")v(k),n.setSelectionBehavior("toggle")}}),de=(k)=>{if(V.current==="touch"&&re.current)k.preventDefault()},K=b!=="none"&&n.isLink(a)?(k)=>{if(!ma.isOpening)k.preventDefault()}:void 0;return{itemProps:Le(S,D||z||c&&!f?I:{},P?Z:{},{onDoubleClick:Y,onDragStartCapture:de,onClick:K,id:t},c?{onMouseDown:(k)=>k.preventDefault()}:void 0),isPressed:F,isSelected:n.isSelected(a),isFocused:n.isFocused&&n.focusedKey===a,isDisabled:f,allowsSelection:D,hasAction:Q}}function d9(e){return e==="Enter"}function f9(e){return e===" "}var pd;var wx=N(()=>{tp();fp();fn();wT();ug();pr();$E();hc();gg();Ho();u9();pd=q(ae(),1)});function p9(e,t){if(typeof t.getChildren==="function")return t.getChildren(e.key);return e.childNodes}var h9=()=>{};function Ag(e){let t=m9.get(e);if(t!=null)return t;let n=0,a=(i)=>{for(let l of i)if(l.type==="section")a(p9(l,e));else if(l.type==="item")n++};return a(e),m9.set(e,n),n}var m9;var g9=N(()=>{h9();m9=new WeakMap});var TT=N(()=>{g9()});function RT(e,t,n){let{key:a}=e,i=yT.get(t),l=e.isDisabled??t.selectionManager.isDisabled(a),c=e.isSelected??t.selectionManager.isSelected(a),u=e.shouldSelectOnPressUp??i?.shouldSelectOnPressUp,f=e.shouldFocusOnHover??i?.shouldFocusOnHover,h=e.shouldUseVirtualFocus??i?.shouldUseVirtualFocus,m=e.isVirtualized??i?.isVirtualized,b=fa(),y=fa(),v={role:"option","aria-disabled":l||void 0,"aria-selected":t.selectionManager.selectionMode!=="none"?c:void 0,"aria-label":e["aria-label"],"aria-labelledby":b,"aria-describedby":y},S=t.collection.getItem(a);if(m){let re=Number(S?.index);v["aria-posinset"]=Number.isNaN(re)?void 0:re+1,v["aria-setsize"]=Ag(t.collection)}let C=i?.onAction?()=>i?.onAction?.(a):void 0,E=UP(t,a),{itemProps:R,isPressed:D,isFocused:U,hasAction:z,allowsSelection:L}=Ep({selectionManager:t.selectionManager,key:a,ref:n,shouldSelectOnPressUp:u,allowsDifferentPressOrigin:u&&f,isVirtualized:m,shouldUseVirtualFocus:h,isDisabled:l,onAction:C||S?.props?.onAction?Ka(S?.props?.onAction,C):void 0,linkBehavior:i?.linkBehavior,UNSTABLE_itemBehavior:i?.UNSTABLE_itemBehavior,id:E}),{hoverProps:Q}=gr({isDisabled:l||!f,onHoverStart(){if(!ji())t.selectionManager.setFocused(!0),t.selectionManager.setFocusedKey(a)}}),V=mt(S?.props);delete V.id;let P=ap(S?.props);return{optionProps:{...v,...Le(V,R,Q,P),id:E},labelProps:{id:b},descriptionProps:{id:y},isFocused:U,isFocusVisible:U&&t.selectionManager.isFocused&&ji(),isSelected:c,isDisabled:l,isPressed:D,allowsSelection:L,hasAction:z}}var b9=N(()=>{tp();Hs();VP();mc();pr();wx();ox();hc();Ho();TT()});var y9=N(()=>{b9()});var v9=N(()=>{dT()});function Tp(e){let t=x9.version.split(".");if(parseInt(t[0],10)>=19)return e;return e?"true":void 0}var x9;var $9=N(()=>{x9=q(ae(),1)});var kT=N(()=>{$9()});function AT(e,t){let{collection:n,onLoadMore:a,scrollOffset:i=1}=e,l=S9.useRef(null),c=mr((u)=>{for(let f of u)if(f.isIntersecting&&a)a()});nt(()=>{if(t.current)l.current=new IntersectionObserver(c,{root:vg(t?.current),rootMargin:`0px ${100*i}% ${100*i}% ${100*i}%`}),l.current.observe(t.current);return()=>{if(l.current)l.current.disconnect()}},[n,t,i])}var S9;var w9=N(()=>{YE();ed();fr();S9=q(ae(),1)});var C9=N(()=>{w9()});var E9=N(()=>{Jv()});var T9=N(()=>{Xv()});var gn,MT,qs,vQ;var R9=N(()=>{Gr();PP();bx();yp();y9();wg();Ya();kT();Eg();C9();pa();E9();sd();T9();rp();gn=q(ae(),1),MT=gn.createContext(null),qs=Gi($p,function(t,n,a){let i=co(n),l=gn.useContext(MT),{dragAndDropHooks:c,dragState:u,dropState:f}=gn.useContext(DP),h=u&&!(u.isDisabled||u.selectionManager.isDisabled(a.key)),{optionProps:m,labelProps:b,descriptionProps:y,...v}=RT({key:a.key,"aria-label":t?.["aria-label"]},l,i),{hoverProps:S,isHovered:C}=gr({isDisabled:!v.allowsSelection&&!v.hasAction&&!h,onHoverStart:a.props.onHoverStart,onHoverChange:a.props.onHoverChange,onHoverEnd:a.props.onHoverEnd}),{keyboardProps:E}=ad(t),{focusProps:R}=od(t),D=null;if(u&&c)D=c.useDraggableItem({key:a.key,hasAction:v.hasAction},u);let U=null;if(f&&c)U=c.useDroppableItem({target:{type:"item",key:a.key,dropPosition:"on"}},f,i);let z=u&&u.isDragging(a.key),L=Yt({...t,id:void 0,children:t.children,defaultClassName:"react-aria-ListBoxItem",values:{...v,isHovered:C,selectionMode:l.selectionManager.selectionMode,selectionBehavior:l.selectionManager.selectionBehavior,allowsDragging:!!u,isDragging:z,isDropTarget:U?.isDropTarget}});gn.useEffect(()=>{if(!a.textValue)console.warn("A `textValue` prop is required for <ListBoxItem> elements with non-plain text children in order to support accessibility features such as type to select.")},[a.textValue]);let Q=t.href?Ot.a:Ot.div,V=mt(t,{global:!0});if(delete V.id,delete V.onClick,t.href&&m.tabIndex==null)m.tabIndex=-1;return gn.default.createElement(Q,{...Le(V,L,m,S,E,R,D?.dragProps,U?.dropProps),ref:i,"data-allows-dragging":!!u||void 0,"data-selected":v.isSelected||void 0,"data-disabled":v.isDisabled||void 0,"data-hovered":C||void 0,"data-focused":v.isFocused||void 0,"data-focus-visible":v.isFocusVisible||void 0,"data-pressed":v.isPressed||void 0,"data-dragging":z||void 0,"data-drop-target":U?.isDropTarget||void 0,"data-selection-mode":l.selectionManager.selectionMode==="none"?void 0:l.selectionManager.selectionMode},gn.default.createElement(qr,{values:[[Ec,{slots:{[Vi]:b,label:b,description:y}}],[Cp,{isSelected:v.isSelected}]]},L.children))}),vQ=Gi(hx,function(t,n,a){let i=gn.useContext(MT),{isLoading:l,onLoadMore:c,scrollOffset:u,...f}=t,h=gn.useRef(null),m=gn.useMemo(()=>({onLoadMore:c,collection:i?.collection,sentinelRef:h,scrollOffset:u}),[c,u,i?.collection]);AT(m,h);let b=Yt({...f,id:void 0,children:a.rendered,defaultClassName:"react-aria-ListBoxLoadingIndicator",values:void 0}),y={tabIndex:-1};return gn.default.createElement(gn.default.Fragment,null,gn.default.createElement("div",{style:{position:"relative",width:0,height:0},inert:Tp(!0)},gn.default.createElement("div",{"data-testid":"loadMoreSentinel",ref:h,style:{position:"absolute",height:1,width:1}})),l&&b.children&&gn.default.createElement(gn.default.Fragment,null,gn.default.createElement(Ot.div,{...Le(mt(t,{global:!0}),y),...b,role:"option",ref:n},b.children)))})});function k9(e){return e.dataset.liveAnnouncer==="true"||e.dataset.reactAriaTopLayer!==void 0}function A9(e,t){let n=mn(e?.[0]),a=t instanceof n.Element?{root:t}:t,i=a?.root??document.body,l=a?.shouldUseInert&&xQ,c=new Set(e),u=new Set,f=(E)=>l&&E instanceof n.HTMLElement?E.inert:E.getAttribute("aria-hidden")==="true",h=(E,R)=>{if(l&&E instanceof n.HTMLElement)E.inert=R;else if(R)E.setAttribute("aria-hidden","true");else if(E.removeAttribute("aria-hidden"),E instanceof n.HTMLElement)E.inert=!1},m=new Set;if(Fo())for(let E of e){let R=E;while(R&&R!==i){let D=R.getRootNode();if("shadowRoot"in D)m.add(D.shadowRoot);R=D.parentNode}}let b=(E)=>{for(let z of E.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))c.add(z);let R=(z)=>{if(u.has(z)||c.has(z)||z.parentElement&&u.has(z.parentElement)&&z.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let L of c)if(yt(z,L))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},D=vx(rt(E),E,NodeFilter.SHOW_ELEMENT,{acceptNode:R}),U=R(E);if(U===NodeFilter.FILTER_ACCEPT)y(E);if(U!==NodeFilter.FILTER_REJECT){let z=D.nextNode();while(z!=null)y(z),z=D.nextNode()}},y=(E)=>{let R=Mg.get(E)??0;if(f(E)&&R===0)return;if(R===0)h(E,!0);u.add(E),Mg.set(E,R+1)};if(va.length)va[va.length-1].disconnect();b(i);let v=new MutationObserver((E)=>{for(let R of E){if(R.type!=="childList")continue;if(R.target.isConnected&&![...c,...u].some((D)=>yt(D,R.target))){for(let D of R.addedNodes)if((D instanceof HTMLElement||D instanceof SVGElement)&&k9(D))c.add(D);else if(D instanceof Element)b(D)}if(Fo()){for(let D of m)if(!D.isConnected){v.disconnect();break}}}});v.observe(i,{childList:!0,subtree:!0});let S=new Set;if(Fo())for(let E of m){let R=new MutationObserver((D)=>{for(let U of D){if(U.type!=="childList")continue;if(U.target.isConnected&&![...c,...u].some((z)=>yt(z,U.target))){for(let z of U.addedNodes)if((z instanceof HTMLElement||z instanceof SVGElement)&&k9(z))c.add(z);else if(z instanceof Element)b(z)}if(Fo()){for(let z of m)if(!z.isConnected){v.disconnect();break}}}});R.observe(E,{childList:!0,subtree:!0}),S.add(R)}let C={visibleNodes:c,hiddenNodes:u,observe(){v.observe(i,{childList:!0,subtree:!0})},disconnect(){v.disconnect()}};return va.push(C),()=>{if(v.disconnect(),Fo())for(let E of S)E.disconnect();for(let E of u){let R=Mg.get(E);if(R==null)continue;if(R===1)h(E,!1),Mg.delete(E);else Mg.set(E,R-1)}if(C===va[va.length-1]){if(va.pop(),va.length)va[va.length-1].observe()}else va.splice(va.indexOf(C),1)}}var xQ,Mg,va;var M9=N(()=>{vT();hr();fn();Cv();xQ=typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype;Mg=new WeakMap,va=[]});function O9(e){let{ref:t,onInteractOutside:n,isDisabled:a,onInteractOutsideStart:i}=e,l=Cx.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),c=mr((f)=>{if(n&&N9(f,t)){if(i)i(f);l.current.isPointerDown=!0}}),u=mr((f)=>{if(n)n(f)});Cx.useEffect(()=>{let f=l.current;if(a)return;let h=t.current,m=rt(h);if(typeof PointerEvent<"u"){let b=(y)=>{if(f.isPointerDown&&N9(y,t))u(y);f.isPointerDown=!1};return m.addEventListener("pointerdown",c,!0),m.addEventListener("click",b,!0),()=>{m.removeEventListener("pointerdown",c,!0),m.removeEventListener("click",b,!0)}}},[t,a])}function N9(e,t){if(e.button>0)return!1;let n=Re(e);if(n){let a=n.ownerDocument;if(!a||!yt(a.documentElement,n))return!1;if(n.closest("[data-react-aria-top-layer]"))return!1}if(!t.current)return!1;return!e.composedPath().includes(t.current)}var Cx;var D9=N(()=>{fn();hr();ed();Cx=q(ae(),1)});function P9(e,t){let{onClose:n,shouldCloseOnBlur:a,isOpen:i,isDismissable:l=!1,isKeyboardDismissDisabled:c=!1,shouldCloseOnInteractOutside:u}=e,f=Ex.useRef(void 0);Ex.useEffect(()=>{if(i&&!Wi.includes(t))return Wi.push(t),()=>{let S=Wi.indexOf(t);if(S>=0)Wi.splice(S,1)}},[i,t]);let h=()=>{if(Wi[Wi.length-1]===t&&n)n()},m=(S)=>{let C=Wi[Wi.length-1];if(f.current=C,!u||u(Re(S))){if(C===t)S.stopPropagation()}},b=(S)=>{if(!u||u(Re(S))){if(Wi[Wi.length-1]===t)S.stopPropagation();if(f.current===t)h()}f.current=void 0},y=(S)=>{if(S.key==="Escape"&&!c&&!S.nativeEvent.isComposing)S.stopPropagation(),S.preventDefault(),h()};O9({ref:t,onInteractOutside:l&&i?b:void 0,onInteractOutsideStart:m});let{focusWithinProps:v}=mp({isDisabled:!a,onBlurWithin:(S)=>{if(!S.relatedTarget||JP(S.relatedTarget))return;if(!u||u(S.relatedTarget))n?.()}});return{overlayProps:{onKeyDown:y,...v},underlayProps:{}}}var Ex,Wi;var L9=N(()=>{fn();Rg();nx();D9();Ex=q(ae(),1),Wi=[]});function B9(e={}){let{isDisabled:t}=e;nt(()=>{if(t)return;if(Tx++,Tx===1)if(Ga())NT=SQ();else NT=$Q();return()=>{if(Tx--,Tx===0)NT()}},[t])}function $Q(){let e=window.innerWidth-document.documentElement.clientWidth;return Ka(e>0&&("scrollbarGutter"in document.documentElement.style?Rx(document.documentElement,"scrollbarGutter","stable"):Rx(document.documentElement,"paddingRight",`${e}px`)),Rx(document.documentElement,"overflow","hidden"))}function SQ(){let e=Rx(document.documentElement,"overflow","hidden"),t,n=!1,a=(m)=>{let b=Re(m);t=qi(b)?b:vg(b,!0),n=!1;let y=b.ownerDocument.defaultView.getSelection();if(y&&!y.isCollapsed&&y.containsNode(b,!0))n=!0;if(m.composedPath().some((v)=>v instanceof HTMLInputElement&&v.type==="range"))n=!0;if("selectionStart"in b&&"selectionEnd"in b&&b.selectionStart<b.selectionEnd&&b.ownerDocument.activeElement===b)n=!0},i=document.createElement("style"),l=tx();if(l)i.nonce=l;i.textContent=`
242
+ @layer {
243
+ * {
244
+ overscroll-behavior: contain;
245
+ }
246
+ }`.trim(),document.head.prepend(i);let c=(m)=>{if(m.touches.length===2||n)return;if(!t||t===document.documentElement||t===document.body){m.preventDefault();return}if(t.scrollHeight===t.clientHeight&&t.scrollWidth===t.clientWidth)m.preventDefault()},u=(m)=>{let b=Re(m),y=m.relatedTarget;if(y&&Zu(y))y.focus({preventScroll:!0}),_9(y,Zu(b));else if(!y)b.parentElement?.closest("[tabindex]")?.focus({preventScroll:!0})},f=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(m){let b=Et(),y=b!=null&&Zu(b);if(f.call(this,{...m,preventScroll:!0}),!m||!m.preventScroll)_9(this,y)};let h=Ka(OT(document,"touchstart",a,{passive:!1,capture:!0}),OT(document,"touchmove",c,{passive:!1,capture:!0}),OT(document,"blur",u,!0));return()=>{e(),h(),i.remove(),HTMLElement.prototype.focus=f}}function Rx(e,t,n){let a=e.style[t];return e.style[t]=n,()=>{e.style[t]=a}}function OT(e,t,n,a){return e.addEventListener(t,n,a),()=>{e.removeEventListener(t,n,a)}}function _9(e,t){if(t||!Ng)I9(e);else Ng.addEventListener("resize",()=>I9(e),{once:!0})}function I9(e){let t=document.scrollingElement||document.documentElement,n=e;while(n&&n!==t){let a=vg(n);if(a!==document.documentElement&&a!==document.body&&a!==n){let i=a.getBoundingClientRect(),l=n.getBoundingClientRect();if(l.top<i.top||l.bottom>i.top+n.clientHeight){let c=i.bottom;if(Ng)c=Math.min(c,Ng.offsetTop+Ng.height);let u=l.top-i.top-((c-i.top)/2-l.height/2);a.scrollTo({top:Math.max(0,Math.min(a.scrollHeight-a.clientHeight,a.scrollTop+u)),behavior:"smooth"})}}n=a.parentElement}}var Ng,Tx=0,NT;var z9=N(()=>{tp();fn();UE();YE();ha();yg();fr();ug();Ng=typeof document<"u"&&window.visualViewport});var DT;var H9=N(()=>{DT={};DT={dismiss:"تجاهل"}});var PT;var F9=N(()=>{PT={};PT={dismiss:"Отхвърляне"}});var LT;var U9=N(()=>{LT={};LT={dismiss:"Odstranit"}});var _T;var V9=N(()=>{_T={};_T={dismiss:"Luk"}});var IT;var j9=N(()=>{IT={};IT={dismiss:"Schließen"}});var BT;var K9=N(()=>{BT={};BT={dismiss:"Απόρριψη"}});var zT;var q9=N(()=>{zT={};zT={dismiss:"Dismiss"}});var HT;var G9=N(()=>{HT={};HT={dismiss:"Descartar"}});var FT;var W9=N(()=>{FT={};FT={dismiss:"Lõpeta"}});var UT;var Y9=N(()=>{UT={};UT={dismiss:"Hylkää"}});var VT;var J9=N(()=>{VT={};VT={dismiss:"Rejeter"}});var jT;var X9=N(()=>{jT={};jT={dismiss:"התעלם"}});var KT;var Q9=N(()=>{KT={};KT={dismiss:"Odbaci"}});var qT;var Z9=N(()=>{qT={};qT={dismiss:"Elutasítás"}});var GT;var eL=N(()=>{GT={};GT={dismiss:"Ignora"}});var WT;var tL=N(()=>{WT={};WT={dismiss:"閉じる"}});var YT;var nL=N(()=>{YT={};YT={dismiss:"무시"}});var JT;var rL=N(()=>{JT={};JT={dismiss:"Atmesti"}});var XT;var oL=N(()=>{XT={};XT={dismiss:"Nerādīt"}});var QT;var aL=N(()=>{QT={};QT={dismiss:"Lukk"}});var ZT;var iL=N(()=>{ZT={};ZT={dismiss:"Negeren"}});var e3;var sL=N(()=>{e3={};e3={dismiss:"Zignoruj"}});var t3;var lL=N(()=>{t3={};t3={dismiss:"Descartar"}});var n3;var cL=N(()=>{n3={};n3={dismiss:"Dispensar"}});var r3;var uL=N(()=>{r3={};r3={dismiss:"Revocare"}});var o3;var dL=N(()=>{o3={};o3={dismiss:"Пропустить"}});var a3;var fL=N(()=>{a3={};a3={dismiss:"Zrušiť"}});var i3;var pL=N(()=>{i3={};i3={dismiss:"Opusti"}});var s3;var hL=N(()=>{s3={};s3={dismiss:"Odbaci"}});var l3;var mL=N(()=>{l3={};l3={dismiss:"Avvisa"}});var c3;var gL=N(()=>{c3={};c3={dismiss:"Kapat"}});var u3;var bL=N(()=>{u3={};u3={dismiss:"Скасувати"}});var d3;var yL=N(()=>{d3={};d3={dismiss:"取消"}});var f3;var vL=N(()=>{f3={};f3={dismiss:"關閉"}});var p3;var xL=N(()=>{H9();F9();U9();V9();j9();K9();q9();G9();W9();Y9();J9();X9();Q9();Z9();eL();tL();nL();rL();oL();aL();iL();sL();lL();cL();uL();dL();fL();pL();hL();mL();gL();bL();yL();vL();p3={};p3={"ar-AE":DT,"bg-BG":PT,"cs-CZ":LT,"da-DK":_T,"de-DE":IT,"el-GR":BT,"en-US":zT,"es-ES":HT,"et-EE":FT,"fi-FI":UT,"fr-FR":VT,"he-IL":jT,"hr-HR":KT,"hu-HU":qT,"it-IT":GT,"ja-JP":WT,"ko-KR":YT,"lt-LT":JT,"lv-LV":XT,"nb-NO":QT,"nl-NL":ZT,"pl-PL":e3,"pt-BR":t3,"pt-PT":n3,"ro-RO":r3,"ru-RU":o3,"sk-SK":a3,"sl-SI":i3,"sr-SP":s3,"sv-SE":l3,"tr-TR":c3,"uk-UA":u3,"zh-CN":d3,"zh-TW":f3}});function wQ(e){return e&&e.__esModule?e.default:e}function m3(e){let{onDismiss:t,...n}=e,a=CD(wQ(p3),"@react-aria/overlays"),i=bc(n,a.format("dismiss")),l=()=>{if(t)t()};return h3.default.createElement(iP,null,h3.default.createElement("button",{...i,tabIndex:-1,onClick:l,style:{width:1,height:1}}))}var h3;var $L=N(()=>{xL();dg();ED();sP();h3=q(ae(),1)});function SL({children:e}){let t=hd.useMemo(()=>({register:()=>{}}),[]);return hd.default.createElement(pg.Provider,{value:t},e)}var hd;var wL=N(()=>{VE();hd=q(ae(),1)});function CL(){return Og.useContext(CQ)??{}}var Og,CQ;var EL=N(()=>{Og=q(ae(),1),CQ=Og.createContext({})});function g3(e){let t=Kr(),{portalContainer:n=t?null:document.body,isExiting:a}=e,[i,l]=Za.useState(!1),c=Za.useMemo(()=>({contain:i,setContain:l}),[i,l]),{getContainer:u}=CL();if(!e.portalContainer&&u)n=u();if(!n)return null;let f=e.children;if(!e.disableFocusManagement)f=Za.default.createElement(WP,{restoreFocus:!0,contain:(e.shouldContainFocus||i)&&!a},f);return f=Za.default.createElement(RL.Provider,{value:c},Za.default.createElement(SL,null,f)),TL.default.createPortal(f,n)}function kx(){let t=Za.useContext(RL)?.setContain;nt(()=>{t?.(!0)},[t])}var Za,TL,RL;var Ax=N(()=>{wL();Rg();fc();fr();EL();Za=q(ae(),1),TL=q(jr(),1),RL=Za.default.createContext(null)});var kL=N(()=>{$L();Ax()});function b3(e){let[t,n]=nd(e.isOpen,e.defaultOpen||!1,e.onOpenChange),a=Mx.useCallback(()=>{n(!0)},[n]),i=Mx.useCallback(()=>{n(!1)},[n]),l=Mx.useCallback(()=>{n(!t)},[n,t]);return{isOpen:t,setOpen:n,open:a,close:i,toggle:l}}var Mx;var AL=N(()=>{Vv();Mx=q(ae(),1)});var ML=N(()=>{AL()});function kp(e,t=!0){let[n,a]=Rp.useState(!0),i=n&&t;return nt(()=>{if(i&&e.current&&"getAnimations"in e.current){for(let l of e.current.getAnimations())if(l instanceof CSSTransition)l.cancel()}},[e,i]),OL(e,i,Rp.useCallback(()=>a(!1),[])),i}function Ap(e,t){let[n,a]=Rp.useState(t?"open":"closed");switch(n){case"open":if(!t)a("exiting");break;case"closed":case"exiting":if(t)a("open");break}let i=n==="exiting";return OL(e,i,Rp.useCallback(()=>{a((l)=>l==="exiting"?"closed":l)},[])),i}function OL(e,t,n){nt(()=>{if(t&&e.current){if(!("getAnimations"in e.current)){n();return}let a=e.current.getAnimations();if(a.length===0){n();return}let i=!1;return Promise.allSettled(a.map((l)=>l.finished)).then(()=>{if(!i)NL.flushSync(()=>{n()})}),()=>{i=!0}}},[e,t,n])}var NL,Rp;var DL=N(()=>{fr();NL=q(jr(),1),Rp=q(ae(),1)});var y3=N(()=>{DL()});var Nx,PL;var LL=N(()=>{Nx=q(ae(),1),PL=Nx.createContext({})});var _L;var IL=N(()=>{_L=new WeakMap});function x3(e,t,n){let{id:a,key:i,closeOnSelect:l,shouldCloseOnSelect:c,isVirtualized:u,"aria-haspopup":f,onPressStart:h,onPressUp:m,onPress:b,onPressChange:y,onPressEnd:v,onClick:S,onHoverStart:C,onHoverChange:E,onHoverEnd:R,onKeyDown:D,onKeyUp:U,onFocus:z,onFocusChange:L,onBlur:Q,selectionManager:V=t.selectionManager}=e,P=!!f,re=P&&e["aria-expanded"]==="true",J=e.isDisabled??V.isDisabled(i),ge=e.isSelected??V.isSelected(i),le=_L.get(t),se=t.collection.getItem(i),I=e.onClose||le.onClose,F=Yu(),Y=()=>{if(P)return;if(se?.props?.onAction)se.props.onAction();else if(e.onAction)e.onAction(i);if(le.onAction){let Ie=le.onAction;Ie(i)}},Z="menuitem";if(!P){if(V.selectionMode==="single")Z="menuitemradio";else if(V.selectionMode==="multiple")Z="menuitemcheckbox"}let de=fa(),K=fa(),k=fa(),X={id:a,"aria-disabled":J||void 0,role:Z,"aria-label":e["aria-label"],"aria-labelledby":de,"aria-describedby":[e["aria-describedby"],K,k].filter(Boolean).join(" ")||void 0,"aria-controls":e["aria-controls"],"aria-haspopup":f,"aria-expanded":e["aria-expanded"]};if(V.selectionMode!=="none"&&!P)X["aria-checked"]=ge;if(u){let Ie=Number(se?.index);X["aria-posinset"]=Number.isNaN(Ie)?void 0:Ie+1,X["aria-setsize"]=Ag(t.collection)}let ve=v3.useRef(!1),$e=(Ie)=>{y?.(Ie),ve.current=Ie},Ae=v3.useRef(null),Fe=(Ie)=>{if(Ie.pointerType!=="keyboard")Ae.current={pointerType:Ie.pointerType};if(Ie.pointerType==="mouse"){if(!ve.current)Ie.target.click()}m?.(Ie)},Te=(Ie)=>{S?.(Ie),Y(),rD(Ie,F,se.props.href,se?.props.routerOptions);let Zr=Ae.current?.pointerType==="keyboard"?Ae.current?.key==="Enter"||V.selectionMode==="none"||V.isLink(i):V.selectionMode!=="multiple"||V.isLink(i);if(Zr=c??l??Zr,I&&!P&&Zr)I();Ae.current=null},{itemProps:Ze,isFocused:pe}=Ep({id:a,selectionManager:V,key:i,ref:n,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:"none",shouldUseVirtualFocus:le.shouldUseVirtualFocus}),{pressProps:Oe,isPressed:Rt}=wc({onPressStart:h,onPress:b,onPressUp:Fe,onPressChange:$e,onPressEnd:v,isDisabled:J}),{hoverProps:he}=gr({isDisabled:J,onHoverStart(Ie){if(!ji()&&!(re&&f))V.setFocused(!0),V.setFocusedKey(i);C?.(Ie)},onHoverChange:E,onHoverEnd:R}),{keyboardProps:cn}=ad({onKeyDown:(Ie)=>{if(Ie.repeat){Ie.continuePropagation();return}switch(Ie.key){case" ":Ae.current={pointerType:"keyboard",key:" "},Re(Ie).click(),cg("keyboard");break;case"Enter":if(Ae.current={pointerType:"keyboard",key:"Enter"},Re(Ie).tagName!=="A")Re(Ie).click();cg("keyboard");break;default:if(!P)Ie.continuePropagation();D?.(Ie);break}},onKeyUp:U}),{focusableProps:Dn}=xc({onBlur:Q,onFocus:z,onFocusChange:L},n),An=mt(se?.props);delete An.id;let nn=ap(se?.props);return{menuItemProps:{...X,...Le(An,nn,P?{onFocus:Ze.onFocus,"data-collection":Ze["data-collection"],"data-key":Ze["data-key"]}:Ze,Oe,he,cn,Dn,le.shouldUseVirtualFocus||P?{onMouseDown:(Ie)=>Ie.preventDefault()}:void 0,J?void 0:{onClick:Te}),tabIndex:Ze.tabIndex!=null&&re&&!le.shouldUseVirtualFocus?-1:Ze.tabIndex},labelProps:{id:de},descriptionProps:{id:K},keyboardShortcutProps:{id:k},isFocused:pe,isFocusVisible:pe&&V.isFocused&&ji()&&!re,isSelected:ge,isPressed:Rt,isDisabled:J}}var v3;var BL=N(()=>{Hs();fn();hc();mc();IL();pr();pp();ox();Xv();gg();wx();Ho();TT();v3=q(ae(),1)});var zL=N(()=>{BL()});var po,FL,EQ,TQ,HL,md;var UL=N(()=>{Gr();mT();LL();bx();yp();zL();Eg();wg();Ya();pa();sd();rp();po=q(ae(),1),FL=po.createContext(null),EQ=po.createContext(null);TQ=class TQ extends Vo{static{this.type="submenutrigger"}filter(e,t,n){let a=e.getItem(this.firstChildKey);if(a&&n(a.textValue,this)){let i=this.clone();return t.addDescendants(i,e),i}return null}};HL=po.createContext(null),md=Gi($p,function(t,n,a){[t,n]=an(t,n,HL);let i=Gu(HL)?.id,l=po.useContext(FL),c=co(n),u=po.useContext(EQ),{isVirtualized:f}=po.useContext(Cg),{menuItemProps:h,labelProps:m,descriptionProps:b,keyboardShortcutProps:y,...v}=x3({...t,id:i,key:a.key,selectionManager:u,isVirtualized:f},l,c),{hoverProps:S,isHovered:C}=gr({isDisabled:v.isDisabled}),E=Yt({...t,id:void 0,children:a.rendered,defaultClassName:"react-aria-MenuItem",values:{...v,isHovered:C,isFocusVisible:v.isFocusVisible,selectionMode:u.selectionMode,selectionBehavior:u.selectionBehavior,hasSubmenu:!!t["aria-haspopup"],isOpen:t["aria-expanded"]==="true"}}),R=t.href?Ot.a:Ot.div,D=mt(t,{global:!0});return delete D.id,delete D.onClick,po.default.createElement(R,{...Le(D,E,h,S),ref:c,"data-disabled":v.isDisabled||void 0,"data-hovered":C||void 0,"data-focused":v.isFocused||void 0,"data-focus-visible":v.isFocusVisible||void 0,"data-pressed":v.isPressed||void 0,"data-selected":v.isSelected||void 0,"data-selection-mode":u.selectionMode==="none"?void 0:u.selectionMode,"data-has-submenu":!!t["aria-haspopup"]||void 0,"data-open":t["aria-expanded"]==="true"||void 0},po.default.createElement(qr,{values:[[Ec,{slots:{[Vi]:m,label:m,description:b}}],[PL,y],[Cp,{isSelected:v.isSelected}]]},E.children))})});function $3(e,t){let{role:n="dialog"}=e,a=fa();a=e["aria-label"]?void 0:a;let i=Mp.useRef(!1);Mp.useEffect(()=>{if(t.current&&!ng(t.current)){ga(t.current);let c=setTimeout(()=>{if(Et()===t.current||Et()===document.body){if(i.current=!0,t.current)t.current.blur(),ga(t.current);i.current=!1}},500);return()=>{clearTimeout(c)}}},[t]),kx();let l=Mp.useRef(!1);return Mp.useEffect(()=>{if(!l.current&&t.current){let c=t.current,u=c.hasAttribute("aria-label"),f=c.hasAttribute("aria-labelledby");if(!u&&!f)console.warn("A dialog must have a title for accessibility. Either provide an aria-label or aria-labelledby prop, or render a heading element inside the dialog."),l.current=!0}}),{dialogProps:{...mt(e,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||a,onBlur:(c)=>{if(i.current)c.stopPropagation()}},titleProps:{id:a}}}var Mp;var VL=N(()=>{Hs();fp();fn();Ax();Ho();Mp=q(ae(),1)});var jL=N(()=>{VL()});var ei,KL,Np,Ox;var S3=N(()=>{ax();Gr();ZD();jL();Ya();pa();ei=q(ae(),1),KL=ei.createContext(null),Np=ei.createContext(null),Ox=ei.forwardRef(function(t,n){let a=t["aria-labelledby"];[t,n]=an(t,n,KL);let{dialogProps:i,titleProps:l}=$3({...t,"aria-labelledby":a},n),c=ei.useContext(Np);if(!i["aria-label"]&&!i["aria-labelledby"])if(t["aria-labelledby"])i["aria-labelledby"]=t["aria-labelledby"];else console.warn('If a Dialog does not contain a <Heading slot="title">, it must have an aria-label or aria-labelledby attribute for accessibility.');let u=Yt({defaultClassName:"react-aria-Dialog",className:t.className,style:t.style,children:t.children,values:{close:c?.close||(()=>{})}}),f=mt(t,{global:!0});return ei.default.createElement(Ot.section,{...Le(f,u,i),render:t.render,ref:n,slot:t.slot||void 0},ei.default.createElement(qr,{values:[[QD,{slots:{[Vi]:{},title:{...l,level:2}}}],[ld,{slots:{[Vi]:{},close:{onPress:()=>c?.close()}}}]]},u.children))})});var qL=N(()=>{Vv()});function w3(e,t){let{inputElementType:n="input",isDisabled:a=!1,isRequired:i=!1,isReadOnly:l=!1,type:c="text",validationBehavior:u="aria"}=e,[f,h]=nd(e.value,e.defaultValue||"",e.onChange),{focusableProps:m}=xc(e,t),b=rT({...e,value:f}),{isInvalid:y,validationErrors:v,validationDetails:S}=b.displayValidation,{labelProps:C,fieldProps:E,descriptionProps:R,errorMessageProps:D}=mP({...e,isInvalid:y,errorMessage:e.errorMessage||v}),U=mt(e,{labelable:!0}),z={type:c,pattern:e.pattern},[L]=Dx.useState(f);return yP(t,e.defaultValue??L,h),xP(e,b,t),{labelProps:C,inputProps:Le(U,n==="input"?z:void 0,{disabled:a,readOnly:l,required:i&&u==="native","aria-required":i&&u==="aria"||void 0,"aria-invalid":y||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:f,onChange:(Q)=>h(Re(Q).value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,form:e.form,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(Dx.default.version,10)>=17?"enterKeyHint":"enterkeyhint"]:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...m,...E}),descriptionProps:R,errorMessageProps:D,isInvalid:y,validationErrors:v,validationDetails:S}}var Dx;var GL=N(()=>{Hs();fn();pr();gP();pp();vP();$P();qL();fP();Dx=q(ae(),1)});function C3(e,t,n){let{isDisabled:a}=e,i=On(),l=On(),c=Kr(),u=gd.useRef(null),f=gd.useCallback(()=>{u.current=requestAnimationFrame(()=>{if(n.current)n.current.setAttribute("hidden","until-found")}),WL.flushSync(()=>{t.toggle()})},[n,t]);td(n,"beforematch",f);let h=gd.useRef(null);return nt(()=>{if(u.current)cancelAnimationFrame(u.current);if(n.current&&!c){let m=n.current;if(h.current==null||typeof m.getAnimations!=="function")if(t.isExpanded)m.removeAttribute("hidden"),m.style.setProperty("--disclosure-panel-width","auto"),m.style.setProperty("--disclosure-panel-height","auto");else m.setAttribute("hidden","until-found"),m.style.setProperty("--disclosure-panel-width","0px"),m.style.setProperty("--disclosure-panel-height","0px");else if(t.isExpanded!==h.current)if(t.isExpanded)m.removeAttribute("hidden"),m.style.setProperty("--disclosure-panel-width",m.scrollWidth+"px"),m.style.setProperty("--disclosure-panel-height",m.scrollHeight+"px"),Promise.all(m.getAnimations().map((b)=>b.finished)).then(()=>{m.style.setProperty("--disclosure-panel-width","auto"),m.style.setProperty("--disclosure-panel-height","auto")}).catch(()=>{});else m.style.setProperty("--disclosure-panel-width",m.scrollWidth+"px"),m.style.setProperty("--disclosure-panel-height",m.scrollHeight+"px"),window.getComputedStyle(m).height,m.style.setProperty("--disclosure-panel-width","0px"),m.style.setProperty("--disclosure-panel-height","0px"),Promise.all(m.getAnimations().map((b)=>b.finished)).then(()=>m.setAttribute("hidden","until-found")).catch(()=>{});h.current=t.isExpanded}},[a,n,t.isExpanded,c]),gd.useEffect(()=>()=>{if(u.current)cancelAnimationFrame(u.current)},[]),{buttonProps:{id:i,"aria-expanded":t.isExpanded,"aria-controls":l,onPress:(m)=>{if(!a&&m.pointerType!=="keyboard")t.toggle()},isDisabled:a,onPressStart(m){if(m.pointerType==="keyboard"&&!a)t.toggle()}},panelProps:{id:l,role:"group","aria-labelledby":i,"aria-hidden":!t.isExpanded,hidden:c?!t.isExpanded:void 0}}}var WL,gd;var YL=N(()=>{NE();Ho();fc();fr();WL=q(jr(),1),gd=q(ae(),1)});var JL=N(()=>{YL()});function E3(e){let[t,n]=nd(e.isExpanded,e.defaultExpanded||!1,e.onExpandedChange),a=Px.useCallback(()=>{n(!0)},[n]),i=Px.useCallback(()=>{n(!1)},[n]),l=Px.useCallback(()=>{n(!t)},[n,t]);return{isExpanded:t,setExpanded:n,expand:a,collapse:i,toggle:l}}var Px;var XL=N(()=>{Vv();Px=q(ae(),1)});var QL=N(()=>{XL()});var br,ZL,e_,t_,n_,T3,R3;var r_=N(()=>{ax();Gr();JL();QL();Ya();pa();Sv();gp();WE();br=q(ae(),1),ZL=br.createContext(null),e_=br.createContext(null),t_=br.createContext(null),n_=br.createContext(null),T3=br.forwardRef(function(t,n){[t,n]=an(t,n,e_);let a=br.useContext(ZL),{id:i,...l}=t,c=On();i||=c;let u=a?a.expandedKeys.has(i):t.isExpanded,f=E3({...t,isExpanded:u,onExpandedChange(R){if(a)a.toggleKey(i);t.onExpandedChange?.(R)}}),h=br.default.useRef(null),m=t.isDisabled||a?.isDisabled||!1,{buttonProps:b,panelProps:y}=C3({...t,isExpanded:u,isDisabled:m},f,h),{isFocusVisible:v,focusProps:S}=Uo({within:!0}),C=Yt({...t,id:void 0,defaultClassName:"react-aria-Disclosure",values:{isExpanded:f.isExpanded,isDisabled:m,isFocusVisibleWithin:v,state:f}}),E=mt(l,{global:!0});return br.default.createElement(qr,{values:[[ld,{slots:{[Vi]:{},trigger:b}}],[n_,{panelProps:y,panelRef:h}],[t_,f]]},br.default.createElement(Ot.div,{...Le(E,C,S),ref:n,"data-expanded":f.isExpanded||void 0,"data-disabled":m||void 0,"data-focus-visible-within":v||void 0},C.children))}),R3=br.forwardRef(function(t,n){let{role:a="group"}=t,{panelProps:i,panelRef:l}=br.useContext(n_),{isFocusVisible:c,focusProps:u}=Uo({within:!0}),f=Yt({...t,defaultClassName:"react-aria-DisclosurePanel",values:{isFocusVisibleWithin:c}}),h=mt(t,{global:!0,labelable:!0});return br.default.createElement(Ot.div,{...Le(h,f,i,u),ref:Ui(n,l),role:a,"data-focus-visible-within":c||void 0},br.default.createElement(qr,{values:[[ld,null]]},t.children))})});function k3(e,t,n){let{overlayProps:a,underlayProps:i}=P9({...e,isOpen:t.isOpen,onClose:t.close},n);return B9({isDisabled:!t.isOpen}),kx(),o_.useEffect(()=>{if(t.isOpen&&n.current)return A9([n.current],{shouldUseInert:!0})},[t.isOpen,n]),{modalProps:Le(a),underlayProps:i}}var o_;var a_=N(()=>{M9();L9();pr();Ax();z9();o_=q(ae(),1)});var i_=N(()=>{a_()});var s_=N(()=>{yg()});var l_=N(()=>{fc()});function M3(){let e=Kr(),[t,n]=Lx.useState(()=>e?{width:0,height:0}:A3());return Lx.useEffect(()=>{let a=(u)=>{n((f)=>{if(u.width===f.width&&u.height===f.height)return f;return u})},i=()=>{if(ho&&ho.scale>1)return;a(A3())},l,c=(u)=>{if(ho&&ho.scale>1)return;if(Zu(Re(u)))l=requestAnimationFrame(()=>{let f=Et();if(!f||!Zu(f))a({width:document.documentElement.clientWidth,height:document.documentElement.clientHeight})})};if(a(A3()),Ga())window.addEventListener("blur",c,!0);if(!ho)window.addEventListener("resize",i);else ho.addEventListener("resize",i);return()=>{if(cancelAnimationFrame(l),Ga())window.removeEventListener("blur",c,!0);if(!ho)window.removeEventListener("resize",i);else ho.removeEventListener("resize",i)}},[]),t}function A3(){return{width:ho?Math.min(ho.width*ho.scale,document.documentElement.clientWidth):document.documentElement.clientWidth,height:ho?ho.height*ho.scale:document.documentElement.clientHeight}}var Lx,ho;var c_=N(()=>{fn();ha();fc();ug();Lx=q(ae(),1),ho=typeof document<"u"&&window.visualViewport});var u_=N(()=>{c_()});function RQ(e,t){[e,t]=an(e,t,f_);let n=sn.useContext(Np),a=b3(e),i=e.isOpen!=null||e.defaultOpen!=null||!n?a:n;if(i===n){if(e.onOpenChange||e.defaultOpen!==void 0||e.isOpen!==void 0)console.warn("This modals state is controlled by a trigger, place onOpenChange on the trigger instead.")}let l=co(t),c=sn.useRef(null),u=Ap(l,i.isOpen),f=Ap(c,i.isOpen),h=u||f||e.isExiting||!1,m=Kr();if(!i.isOpen&&!h||m)return null;return sn.default.createElement(kQ,{...e,state:i,isExiting:h,overlayRef:l,modalRef:c})}function kQ({UNSTABLE_portalContainer:e,...t}){let n=t.modalRef,{state:a}=t,{modalProps:i,underlayProps:l}=k3(t,a,n),c=kp(t.overlayRef)||t.isEntering||!1,u=Yt({...t,defaultClassName:"react-aria-ModalOverlay",values:{isEntering:c,isExiting:t.isExiting,state:a}}),f=M3(),h=void 0,m=void 0;if(typeof document<"u"){let y=qi(document.body)?document.body:document.scrollingElement||document.documentElement,v=y.getBoundingClientRect().width%1,S=y.getBoundingClientRect().height%1;h=y.scrollWidth-v,m=y.scrollHeight-S}let b={...u.style,"--visual-viewport-width":f.width+"px","--visual-viewport-height":f.height+"px","--page-width":h!==void 0?h+"px":void 0,"--page-height":m!==void 0?m+"px":void 0};return sn.default.createElement(g3,{isExiting:t.isExiting,portalContainer:e},sn.default.createElement(Ot.div,{...Le(mt(t,{global:!0}),l),...u,style:b,ref:t.overlayRef,"data-entering":c||void 0,"data-exiting":t.isExiting||void 0},sn.default.createElement(qr,{values:[[N3,{modalProps:i,modalRef:n,isExiting:t.isExiting,isDismissable:t.isDismissable}],[Np,a]]},u.children)))}function d_(e){let{modalProps:t,modalRef:n,isExiting:a,isDismissable:i}=sn.useContext(N3),l=sn.useContext(Np),c=sn.useMemo(()=>Ui(e.modalRef,n),[e.modalRef,n]),u=co(c),f=kp(u),h=Yt({...e,defaultClassName:"react-aria-Modal",values:{isEntering:f,isExiting:a,state:l}});return sn.default.createElement(Ot.div,{...Le(mt(e,{global:!0}),t),...h,ref:u,"data-entering":f||void 0,"data-exiting":a||void 0},i&&sn.default.createElement(m3,{onDismiss:l.close}),h.children)}var sn,f_,N3,Dg,Op;var p_=N(()=>{Gr();S3();i_();kL();Ya();s_();pa();Sv();ML();y3();l_();rp();u_();sn=q(ae(),1),f_=sn.createContext(null),N3=sn.createContext(null),Dg=sn.forwardRef(function(t,n){if(sn.useContext(N3)){if(t.onOpenChange||t.defaultOpen!==void 0||t.isOpen!==void 0){let C=new Set(["isDismissable","isKeyboardDismissDisabled","isOpen","defaultOpen","onOpenChange","isEntering","isExiting","UNSTABLE_portalContainer","shouldCloseOnInteractOutside"]),E=Object.keys(t).filter((R)=>C.has(R));console.warn(`This modal is already wrapped in a ModalOverlay, props [${E.join(", ")}] should be placed on the ModalOverlay instead.`)}return sn.default.createElement(d_,{...t,modalRef:n},t.children)}let{isDismissable:i,isKeyboardDismissDisabled:l,isOpen:c,defaultOpen:u,onOpenChange:f,children:h,isEntering:m,isExiting:b,UNSTABLE_portalContainer:y,shouldCloseOnInteractOutside:v,...S}=t;return sn.default.createElement(Op,{isDismissable:i,isKeyboardDismissDisabled:l,isOpen:c,defaultOpen:u,onOpenChange:f,isEntering:m,isExiting:b,UNSTABLE_portalContainer:y,shouldCloseOnInteractOutside:v},sn.default.createElement(d_,{...S,modalRef:n},h))});Op=sn.forwardRef(RQ)});function Dp(e,t,n){if(!e)return"";if(typeof t==="string")t=t.replace(/\s+/g,"");let a=O3.get(e);if(!a)console.error("There is no tab id, please check if you have rendered the tab panel before the tab list.");return`${a}-${n}-${t}`}var O3;var _x=N(()=>{O3=new WeakMap});function D3(e,t,n){let{key:a,isDisabled:i,shouldSelectOnPressUp:l}=e,{selectionManager:c,selectedKey:u}=t,f=a===u,h=i||t.isDisabled||t.selectionManager.isDisabled(a),m=t.collection.getItem(a),{itemProps:b,isPressed:y}=Ep({selectionManager:c,key:a,ref:n,isDisabled:h,shouldSelectOnPressUp:l??m?.props.href!=null,linkBehavior:"selection"}),v=Dp(t,a,"tab"),S=Dp(t,a,"tabpanel"),{tabIndex:C}=b,E=mt(m?.props,{labelable:!0});delete E.id;let R=ap(m?.props),{focusableProps:D}=xc({...m?.props,isDisabled:h},n);return{tabProps:Le(E,D,R,b,{id:v,"aria-selected":f,"aria-disabled":h||void 0,"aria-controls":f?S:void 0,tabIndex:h?void 0:C,role:"tab"}),isSelected:f,isDisabled:h,isPressed:y}}var h_=N(()=>{Hs();_x();pr();pp();hc();wx()});function g_(e,t){let n=t?.isDisabled,[a,i]=m_.useState(!1);return nt(()=>{if(e?.current&&!n){let l=()=>{if(e.current){let u=ba(e.current,{tabbable:!0});i(!!u.nextNode())}};l();let c=new MutationObserver(l);return c.observe(e.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{c.disconnect()}}}),n?!1:a}var m_;var b_=N(()=>{Rg();fr();m_=q(ae(),1)});function P3(e,t,n){let a=g_(n)?void 0:0,i=Dp(t,e.id??t?.selectedKey,"tabpanel"),l=bc({...e,id:i,"aria-labelledby":Dp(t,t?.selectedKey,"tab")});return{tabPanelProps:Le(l,{tabIndex:a,role:"tabpanel","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"]})}}var y_=N(()=>{_x();pr();b_();dg()});class L3{constructor(e,t,n,a=new Set){this.collection=e,this.flipDirection=t==="rtl"&&n==="horizontal",this.disabledKeys=a,this.tabDirection=n==="horizontal"}getKeyLeftOf(e){if(this.flipDirection)return this.getNextKey(e);return this.getPreviousKey(e)}getKeyRightOf(e){if(this.flipDirection)return this.getPreviousKey(e);return this.getNextKey(e)}isDisabled(e){return this.disabledKeys.has(e)||!!this.collection.getItem(e)?.props?.isDisabled}getFirstKey(){let e=this.collection.getFirstKey();if(e!=null&&this.isDisabled(e))e=this.getNextKey(e);return e}getLastKey(){let e=this.collection.getLastKey();if(e!=null&&this.isDisabled(e))e=this.getPreviousKey(e);return e}getKeyAbove(e){if(this.tabDirection)return null;return this.getPreviousKey(e)}getKeyBelow(e){if(this.tabDirection)return null;return this.getNextKey(e)}getNextKey(e){let t=e;do if(t=this.collection.getKeyAfter(t),t==null)t=this.collection.getFirstKey();while(t!=null&&this.isDisabled(t));return t}getPreviousKey(e){let t=e;do if(t=this.collection.getKeyBefore(t),t==null)t=this.collection.getLastKey();while(t!=null&&this.isDisabled(t));return t}}var v_=()=>{};function _3(e,t,n){let{orientation:a="horizontal",keyboardActivation:i="automatic"}=e,{collection:l,selectionManager:c,disabledKeys:u}=t,{direction:f}=lp(),h=x_.useMemo(()=>new L3(l,f,a,u),[l,u,a,f]),{collectionProps:m}=i9({ref:n,selectionManager:c,keyboardDelegate:h,selectOnFocus:i==="automatic",disallowEmptySelection:!0,scrollRef:n,linkBehavior:"selection"}),b=On();O3.set(t,b);let y=bc({...e,id:b});return{tabListProps:{...Le(m,y),role:"tablist","aria-orientation":a,tabIndex:void 0}}}var x_;var $_=N(()=>{pr();_x();v_();Ho();dg();Hv();s9();x_=q(ae(),1)});var S_=N(()=>{h_();y_();$_()});function AQ({props:e,forwardedRef:t}){let n=Ft.useContext(bd),{CollectionRoot:a}=Ft.useContext(Cg),{orientation:i="horizontal",keyboardActivation:l="automatic"}=Gu(I3),c=co(t),{tabListProps:u}=_3({...e,orientation:i,keyboardActivation:l},n,c),f=Yt({...e,children:null,defaultClassName:"react-aria-TabList",values:{orientation:i,state:n}}),h=mt(e,{global:!0});return delete h.id,Ft.default.createElement(Ot.div,{...Le(h,f,u),ref:c,"data-orientation":i||void 0},Ft.default.createElement(LP,null,Ft.default.createElement(a,{collection:n.collection,persistedKeys:hT(n.selectionManager.focusedKey)})))}function MQ(e){let t=Ft.useContext(bd),{id:n,tabPanelRef:a,isInitiallySelected:i,isExiting:l,...c}=e,{tabPanelProps:u}=P3(e,t,a),{focusProps:f,isFocused:h,isFocusVisible:m}=Uo(),b=t.selectedKey===e.id,y=kp(a)&&!i,v=Yt({...e,defaultClassName:"react-aria-TabPanel",values:{isFocused:h,isFocusVisible:m,isInert:Tp(!b),isEntering:y,isExiting:l,state:t}}),S=mt(c,{global:!0});delete S.id;let C=b?Le(S,u,f,v):Le(S,v);return Ft.default.createElement(Ot.div,{...C,ref:a,"data-focused":h||void 0,"data-focus-visible":m||void 0,inert:Tp(!b||e.inert),"data-inert":!b?"true":void 0,"data-entering":y||void 0,"data-exiting":l||void 0},Ft.default.createElement(qr,{values:[[I3,null],[bd,null]]},Ft.default.createElement(Cg.Provider,{value:pT},v.children)))}var Ft,I3,bd,B3,w_,z3,H3;var C_=N(()=>{Gr();mT();bx();_P();S_();v9();wg();Eg();up();Ya();kT();pa();y3();gp();sd();rp();Ft=q(ae(),1),I3=Ft.createContext(null),bd=Ft.createContext(null),B3=Ft.forwardRef(function(t,n){return Ft.useContext(bd)?Ft.default.createElement(AQ,{props:t,forwardedRef:n}):Ft.default.createElement(uT,t)});w_=class w_ extends Vo{static{this.type="item"}};z3=Gi(w_,(e,t,n)=>{let a=Ft.useContext(bd),i=co(t),{tabProps:l,isSelected:c,isDisabled:u,isPressed:f}=D3({key:n.key,...e},a,i),{focusProps:h,isFocused:m,isFocusVisible:b}=Uo(),{hoverProps:y,isHovered:v}=gr({isDisabled:u,onHoverStart:e.onHoverStart,onHoverEnd:e.onHoverEnd,onHoverChange:e.onHoverChange}),S=Yt({...e,id:void 0,children:n.rendered,defaultClassName:"react-aria-Tab",values:{isSelected:c,isDisabled:u,isFocused:m,isFocusVisible:b,isPressed:f,isHovered:v}}),C=n.props.href?Ot.a:Ot.div,E=mt(e,{global:!0});return delete E.id,delete E.onClick,Ft.default.createElement(C,{...Le(E,S,l,h,y),ref:i,"data-selected":c||void 0,"data-disabled":u||void 0,"data-focused":m||void 0,"data-focus-visible":b||void 0,"data-pressed":f||void 0,"data-hovered":v||void 0},Ft.default.createElement(Cp.Provider,{value:{isSelected:c}},S.children))}),H3=Wa(function(t,n){let a=Ft.useContext(bd),i=co(n),l=a.selectedKey===t.id,[c,u]=Ft.useState(a.selectedKey!=null?l:null);if(c==null&&a.selectedKey!=null)u(l);else if(!l&&c)u(!1);let f=Ap(i,l);if(!l&&!t.shouldForceMount&&!f)return null;return Ft.default.createElement(MQ,{...t,tabPanelRef:i,isInitiallySelected:c||!1,isExiting:f})})});var Pp,Ix,NQ=(e)=>{let{onHoverStart:t,onHoverChange:n,onHoverEnd:a,...i}=e;return i},F3;var U3=N(()=>{Gr();pa();gp();sd();Pp=q(ae(),1),Ix=Pp.createContext({}),F3=Pp.forwardRef(function(t,n){[t,n]=an(t,n,Ix);let{hoverProps:a,isHovered:i}=gr(t),{isFocused:l,isFocusVisible:c,focusProps:u}=Uo({isTextInput:!0,autoFocus:t.autoFocus}),f=!!t["aria-invalid"]&&t["aria-invalid"]!=="false",h=Yt({...t,values:{isHovered:i,isFocused:l,isFocusVisible:c,isDisabled:t.disabled||!1,isInvalid:f},defaultClassName:"react-aria-TextArea"});return Pp.default.createElement(Ot.textarea,{...Le(NQ(t),u,a),...h,ref:n,"data-focused":l||void 0,"data-disabled":t.disabled||void 0,"data-hovered":i||void 0,"data-focus-visible":c||void 0,"data-invalid":f||void 0})})});var E_=N(()=>{GL()});var ti,T_,Pg;var R_=N(()=>{Gr();QE();RD();hP();wP();oT();DE();U3();yp();E_();up();Ya();ti=q(ae(),1),T_=ti.createContext(null),Pg=Wa(function(t,n){[t,n]=an(t,n,T_);let{validationBehavior:a}=Gu(pP)||{},i=t.validationBehavior??a??"native",l=ti.useRef(null);[t,l]=an(t,l,TD);let[c,u]=wv(!t["aria-label"]&&!t["aria-labelledby"]),[f,h]=ti.useState("input"),{labelProps:m,inputProps:b,descriptionProps:y,errorMessageProps:v,...S}=w3({...j7(t),inputElementType:f,label:u,validationBehavior:i},l),C=ti.useCallback((D)=>{if(l.current=D,D)h(D instanceof HTMLTextAreaElement?"textarea":"input")},[l]),E=Yt({...t,values:{isDisabled:t.isDisabled||!1,isInvalid:S.isInvalid,isReadOnly:t.isReadOnly||!1,isRequired:t.isRequired||!1},defaultClassName:"react-aria-TextField"}),R=mt(t,{global:!0});return delete R.id,ti.default.createElement(Ot.div,{...R,...E,ref:n,slot:t.slot||void 0,"data-disabled":t.isDisabled||void 0,"data-invalid":S.isInvalid||void 0,"data-readonly":t.isReadOnly||void 0,"data-required":t.isRequired||void 0},ti.default.createElement(qr,{values:[[qv,{...m,ref:c}],[fx,{...b,ref:C}],[Ix,{...b,ref:C}],[SP,{role:"presentation",isInvalid:S.isInvalid,isDisabled:t.isDisabled||!1}],[Ec,{slots:{description:y,errorMessage:v}}],[$g,S]]},E.children))})});class Lg{constructor(e){this.queue=[],this.subscriptions=new Set,this.visibleToasts=[],this.maxVisibleToasts=e?.maxVisibleToasts??1/0,this.wrapUpdate=e?.wrapUpdate}runWithWrapUpdate(e,t){if(this.wrapUpdate)this.wrapUpdate(e,t);else e()}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}add(e,t={}){let n="_"+Math.random().toString(36).slice(2),a={...t,content:e,key:n,timer:t.timeout?new A_(()=>this.close(n),t.timeout):void 0};return this.queue.unshift(a),this.updateVisibleToasts("add"),n}close(e){let t=this.queue.findIndex((n)=>n.key===e);if(t>=0)this.queue[t].onClose?.(),this.queue.splice(t,1);this.updateVisibleToasts("remove")}updateVisibleToasts(e){this.visibleToasts=this.queue.slice(0,this.maxVisibleToasts),this.runWithWrapUpdate(()=>{for(let t of this.subscriptions)t()},e)}pauseAll(){for(let e of this.visibleToasts)if(e.timer)e.timer.pause()}resumeAll(){for(let e of this.visibleToasts)if(e.timer)e.timer.resume()}clear(){this.queue=[],this.updateVisibleToasts("clear")}}class A_{constructor(e,t){this.startTime=null,this.remaining=t,this.callback=e}reset(e){this.remaining=e,this.resume()}pause(){if(this.timerId==null)return;clearTimeout(this.timerId),this.timerId=null,this.remaining-=Date.now()-this.startTime}resume(){if(this.remaining<=0)return;this.startTime=Date.now(),this.timerId=setTimeout(()=>{this.timerId=null,this.remaining=0,this.callback()},this.remaining)}}var k_,OQ;var M_=N(()=>{k_=q(ae(),1),OQ=q(wp(),1)});var N_=N(()=>{M_()});var O_=()=>{};var Yr=N(()=>{ax();S3();r_();QE();oT();DE();R9();UL();p_();FP();C_();yp();U3();R_();O_();N_()});var we;var Yi=N(()=>{Yr();$n();we=ze(Ja,{displayName:"Button",baseClass:"inline-flex items-center justify-center gap-2 rounded-full text-compact leading-4 transition-all duration-200 ease-in-out outline-none data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring data-[focus-visible]:ring-offset-2 data-[disabled]:opacity-50 data-[disabled]:pointer-events-none data-[pending]:opacity-70 data-[pending]:cursor-progress",variants:{variant:{primary:"bg-brand-primary text-fg-inverted hover:bg-neutral-600 hover:shadow-[0_0_5px_0_rgba(0,0,0,0.5)] data-[pressed]:bg-brand-primary data-[pressed]:shadow-none",secondary:"bg-surface-card text-fg border border-border hover:bg-surface-muted hover:border-fg-subtle data-[pressed]:bg-surface-muted",ghost:"bg-transparent text-fg hover:bg-surface-muted data-[pressed]:bg-surface-muted",destructive:"bg-danger text-danger-fg hover:opacity-90 data-[pressed]:opacity-80"},size:{sm:"py-2 px-4",md:"py-3 px-6",lg:"py-4 px-8",prominent:"h-11 px-6 py-0 text-panel-heading font-medium"}},defaultVariants:{variant:"primary",size:"md"}})});var Tt=zi(function(LQ){var yd=q(ae());(function(){function e(k){if(k==null)return null;if(typeof k==="function")return k.$$typeof===J?null:k.displayName||k.name||null;if(typeof k==="string")return k;switch(k){case C:return"Fragment";case R:return"Profiler";case E:return"StrictMode";case L:return"Suspense";case Q:return"SuspenseList";case re:return"Activity"}if(typeof k==="object")switch(typeof k.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),k.$$typeof){case S:return"Portal";case U:return k.displayName||"Context";case D:return(k._context.displayName||"Context")+".Consumer";case z:var X=k.render;return k=k.displayName,k||(k=X.displayName||X.name||"",k=k!==""?"ForwardRef("+k+")":"ForwardRef"),k;case V:return X=k.displayName||null,X!==null?X:e(k.type)||"Memo";case P:X=k._payload,k=k._init;try{return e(k(X))}catch(ve){}}return null}function t(k){return""+k}function n(k){try{t(k);var X=!1}catch(Ae){X=!0}if(X){X=console;var ve=X.error,$e=typeof Symbol==="function"&&Symbol.toStringTag&&k[Symbol.toStringTag]||k.constructor.name||"Object";return ve.call(X,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",$e),t(k)}}function a(k){if(k===C)return"<>";if(typeof k==="object"&&k!==null&&k.$$typeof===P)return"<...>";try{var X=e(k);return X?"<"+X+">":"<...>"}catch(ve){return"<...>"}}function i(){var k=ge.A;return k===null?null:k.getOwner()}function l(){return Error("react-stack-top-frame")}function c(k){if(le.call(k,"key")){var X=Object.getOwnPropertyDescriptor(k,"key").get;if(X&&X.isReactWarning)return!1}return k.key!==void 0}function u(k,X){function ve(){F||(F=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",X))}ve.isReactWarning=!0,Object.defineProperty(k,"key",{get:ve,configurable:!0})}function f(){var k=e(this.type);return Y[k]||(Y[k]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),k=this.props.ref,k!==void 0?k:null}function h(k,X,ve,$e,Ae,Fe){var Te=ve.ref;return k={$$typeof:v,type:k,key:X,props:ve,_owner:$e},(Te!==void 0?Te:null)!==null?Object.defineProperty(k,"ref",{enumerable:!1,get:f}):Object.defineProperty(k,"ref",{enumerable:!1,value:null}),k._store={},Object.defineProperty(k._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(k,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(k,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Ae}),Object.defineProperty(k,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Fe}),Object.freeze&&(Object.freeze(k.props),Object.freeze(k)),k}function m(k,X,ve,$e,Ae,Fe){var Te=X.children;if(Te!==void 0)if($e)if(se(Te)){for($e=0;$e<Te.length;$e++)b(Te[$e]);Object.freeze&&Object.freeze(Te)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else b(Te);if(le.call(X,"key")){Te=e(k);var Ze=Object.keys(X).filter(function(Oe){return Oe!=="key"});$e=0<Ze.length?"{key: someKey, "+Ze.join(": ..., ")+": ...}":"{key: someKey}",K[Te+$e]||(Ze=0<Ze.length?"{"+Ze.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
247
+ let props = %s;
248
+ <%s {...props} />
249
+ React keys must be passed directly to JSX without using spread:
250
+ let props = %s;
251
+ <%s key={someKey} {...props} />`,$e,Te,Ze,Te),K[Te+$e]=!0)}if(Te=null,ve!==void 0&&(n(ve),Te=""+ve),c(X)&&(n(X.key),Te=""+X.key),"key"in X){ve={};for(var pe in X)pe!=="key"&&(ve[pe]=X[pe])}else ve=X;return Te&&u(ve,typeof k==="function"?k.displayName||k.name||"Unknown":k),h(k,Te,ve,i(),Ae,Fe)}function b(k){y(k)?k._store&&(k._store.validated=1):typeof k==="object"&&k!==null&&k.$$typeof===P&&(k._payload.status==="fulfilled"?y(k._payload.value)&&k._payload.value._store&&(k._payload.value._store.validated=1):k._store&&(k._store.validated=1))}function y(k){return typeof k==="object"&&k!==null&&k.$$typeof===v}var v=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),U=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),Q=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),re=Symbol.for("react.activity"),J=Symbol.for("react.client.reference"),ge=yd.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le=Object.prototype.hasOwnProperty,se=Array.isArray,I=console.createTask?console.createTask:function(){return null};yd={react_stack_bottom_frame:function(k){return k()}};var F,Y={},Z=yd.react_stack_bottom_frame.bind(yd,l)(),de=I(a(l)),K={};LQ.Fragment=C,LQ.jsxDEV=function(k,X,ve,$e){var Ae=1e4>ge.recentlyCreatedOwnerStacks++;return m(k,X,ve,$e,Ae?Error("react-stack-top-frame"):Z,Ae?I(a(k)):de)}})()});var Lp,_Q,wn=({label:e,description:t,errorMessage:n,placeholder:a,size:i,rootClassName:l,inputClassName:c,...u})=>Lp.jsxDEV(Pg,{...u,className:`flex w-full flex-col gap-3 ${l??""}`,children:[Lp.jsxDEV(yc,{className:"text-panel-heading font-medium text-fg",children:e},void 0,!1,void 0,this),Lp.jsxDEV(_Q,{className:c,placeholder:a,fieldSize:i},void 0,!1,void 0,this),t?Lp.jsxDEV(Ki,{slot:"description",className:"text-label text-fg-muted",children:t},void 0,!1,void 0,this):null,Lp.jsxDEV(cd,{className:"text-label text-danger",children:n},void 0,!1,void 0,this)]},void 0,!0,void 0,this);var zx=N(()=>{Yr();$n();Lp=q(Tt(),1),_Q=ze(ud,{displayName:"InputControl",baseClass:"w-full rounded-lg border border-border bg-surface px-4 text-small text-fg outline-none transition-colors duration-200 placeholder:text-fg-muted data-[hovered]:border-fg-subtle data-[focused]:border-brand-green data-[focused]:ring-2 data-[focused]:ring-ring data-[invalid]:border-danger data-[invalid]:ring-2 data-[invalid]:ring-danger data-[disabled]:bg-surface-muted data-[disabled]:opacity-60 data-[disabled]:pointer-events-none",variants:{fieldSize:{sm:"h-8",md:"h-10",lg:"h-12",tall:"h-control-tall"}},defaultVariants:{fieldSize:"md"}})});var _p,IQ,Hx=({label:e,description:t,errorMessage:n,placeholder:a,rows:i,...l})=>_p.jsxDEV(Pg,{...l,className:"flex w-full flex-col gap-2",children:[_p.jsxDEV(yc,{className:"text-small font-medium text-fg",children:e},void 0,!1,void 0,this),_p.jsxDEV(IQ,{placeholder:a,rows:i},void 0,!1,void 0,this),t?_p.jsxDEV(Ki,{slot:"description",className:"text-label text-fg-muted",children:t},void 0,!1,void 0,this):null,_p.jsxDEV(cd,{className:"text-label text-danger",children:n},void 0,!1,void 0,this)]},void 0,!0,void 0,this);var L_=N(()=>{Yr();$n();_p=q(Tt(),1),IQ=ze(F3,{displayName:"TextAreaControl",baseClass:"min-h-[120px] w-full resize-y rounded-lg border border-border bg-surface px-4 py-3 text-small text-fg outline-none transition-colors duration-200 placeholder:text-fg-muted data-[hovered]:border-fg-subtle data-[focused]:border-brand-green data-[focused]:ring-2 data-[focused]:ring-ring data-[invalid]:border-danger data-[invalid]:ring-danger data-[disabled]:bg-surface-muted data-[disabled]:opacity-60 data-[disabled]:pointer-events-none"})});function j3(e){let t=e.trim();return/^(https?:\/\/|mailto:|tel:|\/|#)/i.test(t)?t:null}var K3="Only http(s), mailto, tel, or relative (/, #) links are allowed.";var q3,BQ;var Gs=N(()=>{q3=q(ae(),1),BQ=q3.createContext(!1)});var __;var I_=N(()=>{Ls();Gs();__=q(ae(),1)});var Ws,zQ,VCe;var B_=N(()=>{Ls();Gs();Ws=q(ae(),1),zQ=q(jr(),1),VCe=Ws.createContext(null)});var z_=()=>{};var H_=()=>{};var F_=()=>{};var ZCe,HQ;var G3=N(()=>{Yr();$n();Gs();ZCe=ze(Ja,{displayName:"SelectTrigger",baseClass:"flex h-control-tall w-full items-center justify-between gap-2.5 rounded-lg border border-border bg-surface px-5 text-small text-fg outline-none transition-colors data-[hovered]:border-fg-subtle data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring group-data-[invalid]:border-danger group-data-[invalid]:ring-2 group-data-[invalid]:ring-danger data-[disabled]:bg-surface-muted data-[disabled]:opacity-60 data-[disabled]:pointer-events-none"}),HQ=ze(qs,{displayName:"SelectItem",baseClass:"flex cursor-pointer select-none items-center rounded-md px-3 py-2 text-small text-fg outline-none data-[hovered]:bg-surface-muted data-[focused]:bg-surface-muted data-[selected]:font-medium data-[disabled]:opacity-50 data-[disabled]:pointer-events-none"})});var oEe,aEe;var U_=N(()=>{Yr();$n();Gs();oEe=ze(ud,{displayName:"ComboBoxInput",baseClass:"h-12 w-full rounded-lg border border-border bg-surface pl-4 pr-11 text-small text-fg outline-none transition-colors placeholder:text-fg-muted data-[hovered]:border-fg-subtle data-[focused]:border-brand-green data-[focused]:ring-2 data-[focused]:ring-ring group-data-[invalid]:border-danger group-data-[invalid]:ring-2 group-data-[invalid]:ring-danger data-[disabled]:bg-surface-muted data-[disabled]:opacity-60"}),aEe=ze(qs,{displayName:"ComboBoxItem",baseClass:"flex cursor-pointer select-none items-center rounded-md px-3 py-2 text-small text-fg outline-none data-[hovered]:bg-surface-muted data-[focused]:bg-surface-muted data-[selected]:font-medium data-[disabled]:opacity-50 data-[disabled]:pointer-events-none"})});var W3,dEe;var V_=N(()=>{Yr();Ls();$n();Gs();W3=q(ae(),1),dEe=ze(qs,{displayName:"MultiSelectItem",baseClass:"group flex cursor-pointer select-none items-center gap-2 rounded-md px-3 py-2 text-small text-fg outline-none data-[hovered]:bg-surface-muted data-[focused]:bg-surface-muted data-[selected]:font-medium data-[disabled]:opacity-50 data-[disabled]:pointer-events-none"})});var j_=()=>{};var K_=()=>{};var q_=()=>{};var G_=()=>{};var KQ;var W_=N(()=>{Yi();Gs();KQ=q(ae(),1)});var Y3=()=>{};var Y_=N(()=>{Ls();Y3();Gs()});var Fx,Ux,Vx;var vd=N(()=>{Yr();$n();Fx=ze(Op,{displayName:"DialogOverlay",baseClass:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-modal-backdrop backdrop-blur-modal-backdrop data-[entering]:animate-modal-overlay-in data-[exiting]:animate-modal-overlay-out"}),Ux=ze(Dg,{displayName:"DialogModal",baseClass:"rounded-lg bg-surface p-5 outline-none shadow-modal-surface data-[entering]:animate-modal-surface-in data-[exiting]:animate-modal-surface-out"}),Vx=Ox});var OEe,DEe,PEe;var J_=N(()=>{Yr();$n();OEe=ze(Op,{displayName:"SidePanel.Overlay",baseClass:"fixed inset-0 z-50 flex justify-end bg-modal-backdrop backdrop-blur-modal-backdrop data-[entering]:animate-modal-overlay-in data-[exiting]:animate-modal-overlay-out motion-reduce:data-[entering]:animate-none motion-reduce:data-[exiting]:animate-none"}),DEe=ze(Dg,{displayName:"SidePanel.Surface",baseClass:"ml-auto flex h-dvh w-full flex-col overflow-hidden bg-surface outline-none shadow-modal-surface sm:rounded-l-lg data-[entering]:animate-side-panel-in data-[exiting]:animate-side-panel-out motion-reduce:data-[entering]:animate-none motion-reduce:data-[exiting]:animate-none",variants:{size:{sm:"sm:max-w-sm",md:"sm:max-w-md",lg:"sm:max-w-lg"}},defaultVariants:{size:"md"}}),PEe=ze(Ja,{displayName:"SidePanel.Close",baseClass:"inline-flex h-11 w-11 shrink-0 items-center justify-center rounded-full text-fg-subtle outline-none transition-colors hover:bg-surface-muted hover:text-fg data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring data-[focus-visible]:ring-offset-2"})});var BEe,zEe;var X_=N(()=>{Yr();$n();BEe=ze(md,{displayName:"DropdownMenuItem",baseClass:"flex cursor-pointer select-none items-center gap-2.5 rounded-md px-4 py-3 text-small text-fg outline-none data-[focused]:bg-surface-card data-[hovered]:bg-surface-card data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",variants:{destructive:{true:"text-danger data-[focused]:text-danger data-[hovered]:text-danger"}}}),zEe=ze(bT,{displayName:"DropdownMenuSeparator",baseClass:"my-2 h-px border-0 bg-border"})});var jx,VEe;var Q_=N(()=>{Yr();$n();jx=q(ae(),1),VEe=ze(md,{displayName:"ContextMenuItem",baseClass:"flex min-h-[34px] cursor-pointer select-none items-center gap-2.5 rounded-[10px] px-3 py-1.5 text-compact text-white outline-none data-[focused]:bg-[#2f2f2f] data-[focused]:font-medium data-[hovered]:bg-[#2f2f2f] data-[hovered]:font-medium data-[disabled]:cursor-not-allowed data-[disabled]:opacity-45",variants:{destructive:{true:"text-[#ffb5b5] data-[focused]:text-[#ffb5b5]"}}})});var J3=()=>{};var JEe;var Z_=N(()=>{Yr();JEe=new Lg({maxVisibleToasts:5})});var eTe,tTe;var eI=N(()=>{Yr();$n();eTe=ze(T3,{displayName:"Disclosure"}),tTe=ze(R3,{displayName:"DisclosurePanel"})});var tI=()=>{};var iTe,sTe,lTe;var nI=N(()=>{Yr();$n();iTe=ze(B3,{displayName:"TabList",baseClass:"flex gap-2 border-b border-border"}),sTe=ze(z3,{displayName:"Tab",baseClass:"cursor-pointer select-none border-b-2 border-transparent px-4 py-3 text-small font-medium text-fg-muted outline-none transition-colors data-[hovered]:text-fg data-[selected]:border-brand-primary data-[selected]:text-fg data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring data-[disabled]:opacity-50 data-[disabled]:pointer-events-none"}),lTe=ze(H3,{displayName:"TabPanel",baseClass:"py-4 text-small text-fg outline-none data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring"})});var rI=N(()=>{Yi()});var oI=()=>{};var WQ,hTe,Kx,qx;var X3=N(()=>{$n();WQ=ze("h2",{displayName:"DisplayHeading",baseClass:"text-display-large font-medium text-fg"}),hTe=ze("h3",{displayName:"PanelHeading",baseClass:"text-panel-heading font-medium text-fg"}),Kx=ze("span",{displayName:"Text",baseClass:"text-fg",variants:{size:{micro:"text-micro",caption:"text-caption",label:"text-label",compact:"text-compact",small:"text-small",callout:"text-callout",body:"text-body",subtitle:"text-subtitle",title:"text-title",headline:"text-headline",display:"text-display"},weight:{regular:"font-normal",medium:"font-medium",semibold:"font-medium",bold:"font-medium"},tone:{default:"text-fg",muted:"text-fg-muted",subtle:"text-fg-subtle",inverted:"text-fg-inverted"}},defaultVariants:{size:"body",weight:"regular",tone:"default"}}),qx=ze("h2",{displayName:"Heading",baseClass:"font-medium tracking-tight text-fg",variants:{level:{"1":"text-heading1","2":"text-heading2","3":"text-heading3","4":"text-heading4","5":"text-heading5"}},defaultVariants:{level:"2"}})});var aI=N(()=>{J3()});var iI;var sI=N(()=>{$n();iI=ze("div",{displayName:"Card",baseClass:"relative rounded-lg bg-surface-card",variants:{variant:{plain:"",outlined:"border border-border",elevated:"shadow-md"},padding:{none:"p-0",sm:"p-4",md:"p-6",lg:"p-8"}},defaultVariants:{variant:"plain",padding:"md"}})});var wTe;var lI=N(()=>{$n();wTe=ze("section",{displayName:"Section",baseClass:"w-full",variants:{padding:{none:"py-0",sm:"py-4",md:"py-6 sm:py-8",lg:"py-8 sm:py-12",xl:"py-12 sm:py-16"}},defaultVariants:{padding:"md"}})});var TTe;var cI=N(()=>{$n();TTe=ze("div",{displayName:"PageContainer",baseClass:"w-full",variants:{size:{sm:"max-w-screen-sm mx-auto",md:"max-w-screen-md mx-auto",lg:"max-w-screen-lg mx-auto",xl:"max-w-screen-xl ml-0 mr-0 min-[1200px]:max-w-full","2xl":"max-w-screen-2xl mx-auto min-[1600px]:max-w-full min-[1600px]:mx-0",full:"max-w-full"}}})});var uI,ATe,MTe,NTe;var dI=N(()=>{$n();uI=q(ae(),1),ATe=ze("div",{displayName:"AppShell",baseClass:"grid h-screen w-full overflow-hidden bg-surface grid-rows-[100%] grid-cols-[1fr] md:grid-cols-[auto_1fr]"}),MTe=ze("aside",{displayName:"AppShell.Sidebar",baseClass:"h-full w-64 shrink-0 overflow-y-auto border-r border-border bg-surface"}),NTe=ze("main",{displayName:"AppShell.Main",baseClass:"min-w-0 flex-1 bg-surface px-6 pb-6 pt-6"})});var fI,YQ,JQ,XQ,QQ=(e)=>fI.jsxDEV(XQ,{...e},void 0,!1,void 0,this),ZQ,eZ,LTe,_Te,Bg;var pI=N(()=>{Yr();$n();fI=q(Tt(),1),YQ=ze("header",{displayName:"Topbar",baseClass:"flex h-14 w-full items-center gap-5 border-b border-border"}),JQ=ze("div",{displayName:"Topbar.Brand",baseClass:"flex min-w-0 items-center gap-3 text-compact leading-4 font-medium tracking-tight text-fg"}),XQ=ze("nav",{displayName:"Topbar.Nav",baseClass:"ml-auto flex min-w-0 items-center gap-2 overflow-x-auto"}),ZQ=ze("div",{displayName:"Topbar.Actions",baseClass:"ml-auto flex items-center gap-4"}),eZ=ze("a",{displayName:"Topbar.NavLink",baseClass:"inline-flex items-center rounded-sm px-[13px] py-[6px] text-compact leading-4 whitespace-nowrap text-fg no-underline transition-colors hover:bg-surface-muted hover:text-fg outline-none focus-visible:ring-2 focus-visible:ring-ring data-[active]:bg-surface-muted data-[active]:text-fg",variants:{active:{true:"",false:""}},variantsAsDataAttrs:["active"]}),LTe=ze(qs,{displayName:"WorkspaceSwitcher.Item",baseClass:"flex cursor-pointer select-none items-center rounded-sm px-3 py-2 text-small text-fg outline-none data-[focused]:bg-surface-muted data-[selected]:font-medium"}),_Te=ze(md,{displayName:"UserMenu.Item",baseClass:"flex cursor-pointer select-none items-center rounded-sm px-3 py-2 text-small text-fg outline-none data-[focused]:bg-surface-muted data-[disabled]:opacity-50 data-[disabled]:pointer-events-none"}),Bg=Object.assign(YQ,{Brand:JQ,Nav:QQ,NavLink:eZ,Actions:ZQ})});var tZ,zTe;var hI=N(()=>{$n();tZ=q(ae(),1),zTe=ze("header",{displayName:"PersistentPageShell.Header",baseClass:"flex w-full flex-col gap-6 bg-surface",variants:{sticky:{true:"sticky top-0 z-[1]",false:""}},defaultVariants:{sticky:!1}})});var mI=()=>{};var Gx;var gI=N(()=>{Yi();X3();Gx=q(ae(),1)});var Q3;var Z3=N(()=>{Q3=q(ae(),1)});var bI=()=>{};var yI=N(()=>{Z3()});var Ip,vI,xI=(e)=>Ip.jsxDEV("svg",{...vI,...e,children:[Ip.jsxDEV("circle",{cx:"12",cy:"12",r:"4"},void 0,!1,void 0,this),Ip.jsxDEV("path",{d:"M12 2v2M12 20v2M2 12h2M20 12h2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M19.1 4.9l-1.4 1.4M6.3 17.7l-1.4 1.4"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$I=(e)=>Ip.jsxDEV("svg",{...vI,...e,children:Ip.jsxDEV("path",{d:"M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z"},void 0,!1,void 0,this)},void 0,!1,void 0,this);var Wx=N(()=>{Ip=q(Tt(),1),vI={width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0}});var SI=()=>{};var eR;var tR=N(()=>{Wx();eR=q(ae(),1)});var nZ;var wI=N(()=>{tR();nZ=q(ae(),1)});var CI;var EI=N(()=>{Wx();CI=q(ae(),1)});var TI=()=>{};var RI;var kI=N(()=>{Yi();vd();RI=q(ae(),1)});var AI;var MI=N(()=>{Yi();vd();AI=q(ae(),1)});var rZ;var NI=N(()=>{Yi();vd();rZ=q(ae(),1)});var OI;var DI=N(()=>{Yi();vd();zx();OI=q(ae(),1)});var oZ;var PI=N(()=>{Yi();vd();zx();G3();oZ=q(ae(),1)});var A3e,M3e;var LI=N(()=>{$n();A3e=ze("div",{displayName:"DeliveryStatusModule",baseClass:"grid gap-3 rounded-md bg-surface-inverted p-4 text-fg-inverted"}),M3e=ze("span",{displayName:"DeliveryStatusPill",baseClass:"inline-flex min-h-5 items-center rounded-full border border-white/30 px-3"})});var Ji=N(()=>{$n();Yi();zx();L_();I_();B_();Gs();z_();H_();F_();G3();U_();V_();j_();K_();q_();G_();W_();Y3();Y_();vd();J_();X_();Q_();J3();Z_();eI();tI();nI();rI();oI();X3();aI();sI();lI();cI();dI();pI();hI();mI();gI();Z3();bI();yI();Wx();SI();wI();tR();EI();TI();kI();MI();NI();DI();PI();LI()});function Jx(e){try{let t=String(e).split(".")[1];if(!t)return!1;let n=JSON.parse(atob(t.replace(/-/g,"+").replace(/_/g,"/")));return typeof n.exp==="number"&&Date.now()>=n.exp*1000}catch{return!1}}function _I(){try{let e=localStorage.getItem(nR);if(e)return JSON.parse(e)}catch{}return{baseUrl:"http://localhost:8787",token:"",tenant:"main"}}function II(e){localStorage.setItem(nR,JSON.stringify(e))}function BI(){try{localStorage.removeItem(nR)}catch{}}class rR{cfg;onExpired;constructor(e,t){this.cfg=e;this.onExpired=t}setConfig(e){this.cfg=e}base(){return this.cfg.baseUrl.replace(/\/+$/,"")}async call(e,t){if(this.onExpired&&this.cfg.token&&Jx(this.cfg.token))return this.onExpired(),new Promise(()=>{});let n=new Headers({"content-type":"application/json","x-pramen-tenant":this.cfg.tenant||"main"});if(this.cfg.token)n.set("authorization",`Bearer ${this.cfg.token}`);let a=await fetch(`${this.base()}/rpc/${e}`,{method:"POST",headers:n,body:JSON.stringify(t??{})}),i;try{i=await a.json()}catch{throw new Bp(`non-JSON response (HTTP ${a.status})`,"bad_response",a.status)}if(i.ok!==!0){let l=i.error??`request failed (HTTP ${a.status})`,c=a.status===403?" — check your token has an editor/reviewer role":"";throw new Bp(l+c,i.code??"error",a.status)}return i.result}async put(e,t,n){let a=e.startsWith("http")?e:`${this.base()}${e}`,i=await fetch(a,{method:"PUT",headers:{"content-type":n},body:t});if(!i.ok)throw new Bp(`upload failed (HTTP ${i.status})`,"upload_failed",i.status)}resolve(e){return e.startsWith("http")?e:`${this.base()}${e}`}listBlockTypes=()=>this.call("listBlockTypes");listContentTypes=()=>this.call("listContentTypes");getContentType=(e)=>this.call("getContentType",{id:e});listPages=()=>this.call("listPages");getPagePreview=(e,t)=>this.call("getPage",{slug:e,locale:t,preview:!0});listPageAudit=(e)=>this.call("listPageAudit",{pageId:e});listMedia=(e=50,t=0)=>this.call("listMedia",{limit:e,offset:t});getMedia=(e)=>this.call("getMedia",{id:e});updateMedia=(e,t)=>this.call("updateMedia",{id:e,alt:t});deleteMedia=(e)=>this.call("deleteMedia",{id:e});listTrash=(e=50)=>this.call("listTrash",{limit:e});restoreMedia=(e)=>this.call("restoreMedia",{id:e});purgeMedia=(e)=>this.call("purgeMedia",{id:e});async uploadMedia(e){let t=e.type||"application/octet-stream",n=await this.call("signMediaUpload",{contentType:t,filename:e.name});return await this.put(n.url,await e.arrayBuffer(),t),this.call("createMedia",{ref:n.ref,alt:e.name})}}var Bp,nR="pramen.cmsEditor";var oR=N(()=>{Bp=class Bp extends Error{code;status;constructor(e,t,n){super(e);this.code=t;this.status=n;this.name="ApiError"}}});function aR(){BI(),location.replace(zg)}function kr(){let e=jn.use(zI);if(!e)throw Error("useApp must be used within <AppProvider>");return e}function HI({children:e}){let[t,n]=jn.useState(_I()),[a,i]=jn.useState(null),[l,c]=jn.useState([]),[u,f]=jn.useState(""),h=Boolean(t.baseUrl&&t.token)&&!Jx(t.token),m=jn.useMemo(()=>new rR(t,zg?aR:void 0),[t]),b=jn.useRef(null),y=jn.useCallback((C)=>{b.current=C},[]),v=jn.useCallback(()=>b.current?.()??!0,[]);if(jn.useEffect(()=>{if(!zg)return;let C=()=>{if(!t.token||Jx(t.token))aR()};C();let E=()=>{if(!document.hidden)C()},R=window.setInterval(C,30000);return window.addEventListener("visibilitychange",E),window.addEventListener("focus",C),()=>{window.clearInterval(R),window.removeEventListener("visibilitychange",E),window.removeEventListener("focus",C)}},[t.token]),jn.useEffect(()=>{if(!h)return;m.call("me").then(i).catch(()=>i({})),m.call("listCollections").then(c).catch(()=>c([]))},[m,h]),!h)return zg?null:mo.jsxDEV(aZ,{cfg:t,onSave:(C)=>{II(C),n(C)}},void 0,!1,void 0,this);let S={api:m,cfg:t,me:a,isAdmin:(a?.roles??[]).includes("admin"),collections:l,error:u,setError:f,confirmNavigation:v,setNavGuard:y,reconfigure:()=>{if(zg){aR();return}i(null),f(""),n({...t,token:""})}};return mo.jsxDEV(zI,{value:S,children:e},void 0,!1,void 0,this)}function aZ({cfg:e,onSave:t}){let[n,a]=jn.useState(e);return mo.jsxDEV("div",{className:"mx-auto mt-[14vh] w-full max-w-[520px] px-6",children:mo.jsxDEV("div",{className:"rounded-panel border border-border bg-surface-card px-10 py-8 shadow-[0_24px_60px_rgba(30,20,10,0.08)]",children:[mo.jsxDEV("h1",{className:"mb-4 text-display text-fg",children:["pramen ",mo.jsxDEV("span",{className:"text-fg-subtle",children:"· cms editor"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),mo.jsxDEV("p",{className:"mb-6 text-sm text-fg-muted",children:["Point at your Worker and paste an editor/reviewer JWT. CORS must allow this origin (",mo.jsxDEV("code",{children:"CORS_ORIGINS"},void 0,!1,void 0,this),")."]},void 0,!0,void 0,this),mo.jsxDEV("div",{className:"flex flex-col gap-4",children:[mo.jsxDEV(wn,{label:"Worker base URL",value:n.baseUrl,onChange:(i)=>a({...n,baseUrl:i}),placeholder:"https://your-worker.workers.dev"},void 0,!1,void 0,this),mo.jsxDEV(wn,{label:"Tenant",value:n.tenant,onChange:(i)=>a({...n,tenant:i}),placeholder:"main"},void 0,!1,void 0,this),mo.jsxDEV(wn,{label:"Bearer token (editor or reviewer)",value:n.token,onChange:(i)=>a({...n,token:i}),placeholder:"eyJ…"},void 0,!1,void 0,this),mo.jsxDEV(we,{className:"mt-2 w-full",onPress:()=>t(n),isDisabled:!n.baseUrl||!n.token,children:"Connect"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var jn,mo,zg,zI;var Xi=N(()=>{Ji();oR();jn=q(ae(),1),mo=q(Tt(),1),zg=typeof window<"u"&&!new URLSearchParams(window.location.search).has("setup")?window.PRAMEN_CMS_EDITOR?.signInUrl:void 0;zI=jn.createContext(null)});function Ar(e){this.content=e}var sR;var UI=N(()=>{Ar.prototype={constructor:Ar,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var a=n&&n!=e?this.remove(n):this,i=a.find(e),l=a.content.slice();if(i==-1)l.push(n||e,t);else if(l[i+1]=t,n)l[i]=n;return new Ar(l)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new Ar(n)},addToStart:function(e,t){return new Ar([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new Ar(n)},addBefore:function(e,t,n){var a=this.remove(t),i=a.content.slice(),l=a.find(e);return i.splice(l==-1?i.length:l,0,t,n),new Ar(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){if(e=Ar.from(e),!e.size)return this;return new Ar(e.content.concat(this.subtract(e).content))},append:function(e){if(e=Ar.from(e),!e.size)return this;return new Ar(this.subtract(e).content.concat(e.content))},subtract:function(e){var t=this;e=Ar.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}};Ar.from=function(e){if(e instanceof Ar)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Ar(t)};sR=Ar});function QI(e,t,n){for(let a=0;;a++){if(a==e.childCount||a==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(a),l=t.child(a);if(i==l){n+=i.nodeSize;continue}if(!i.sameMarkup(l))return n;if(i.isText&&i.text!=l.text){let c=i.text,u=l.text,f=0;for(;c[f]==u[f];f++)n++;if(f&&f<c.length&&f<u.length&&tB(c.charCodeAt(f-1))&&eB(c.charCodeAt(f)))n--;return n}if(i.content.size||l.content.size){let c=QI(i.content,l.content,n+1);if(c!=null)return c}n+=i.nodeSize}}function ZI(e,t,n,a){for(let i=e.childCount,l=t.childCount;;){if(i==0||l==0)return i==l?null:{a:n,b:a};let c=e.child(--i),u=t.child(--l),f=c.nodeSize;if(c==u){n-=f,a-=f;continue}if(!c.sameMarkup(u))return{a:n,b:a};if(c.isText&&c.text!=u.text){let h=c.text,m=u.text,b=h.length,y=m.length;while(b>0&&y>0&&h[b-1]==m[y-1])b--,y--,n--,a--;if(b&&y&&b<h.length&&tB(h.charCodeAt(b-1))&&eB(h.charCodeAt(b)))n++,a++;return{a:n,b:a}}if(c.content.size||u.content.size){let h=ZI(c.content,u.content,n-1,a-1);if(h)return h}n-=f,a-=f}}function eB(e){return e>=56320&&e<57344}function tB(e){return e>=55296&&e<56320}class ce{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let n=0;n<e.length;n++)this.size+=e[n].nodeSize}nodesBetween(e,t,n,a=0,i){for(let l=0,c=0;c<t;l++){let u=this.content[l],f=c+u.nodeSize;if(f>e&&n(u,a+c,i||null,l)!==!1&&u.content.size){let h=c+1;u.nodesBetween(Math.max(0,e-h),Math.min(u.content.size,t-h),n,a+h)}c=f}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,a){let i="",l=!0;return this.nodesBetween(e,t,(c,u)=>{let f=c.isText?c.text.slice(Math.max(e,u)-u,t-u):!c.isLeaf?"":a?typeof a==="function"?a(c):a:c.type.spec.leafText?c.type.spec.leafText(c):"";if(c.isBlock&&(c.isLeaf&&f||c.isTextblock)&&n)if(l)l=!1;else i+=n;i+=f},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,a=this.content.slice(),i=0;if(t.isText&&t.sameMarkup(n))a[a.length-1]=t.withText(t.text+n.text),i=1;for(;i<e.content.length;i++)a.push(e.content[i]);return new ce(a,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let n=[],a=0;if(t>e)for(let i=0,l=0;l<t;i++){let c=this.content[i],u=l+c.nodeSize;if(u>e){if(l<e||u>t)if(c.isText)c=c.cut(Math.max(0,e-l),Math.min(c.text.length,t-l));else c=c.cut(Math.max(0,e-l-1),Math.min(c.content.size,t-l-1));n.push(c),a+=c.nodeSize}l=u}return new ce(n,a)}cutByIndex(e,t){if(e==t)return ce.empty;if(e==0&&t==this.content.length)return this;return new ce(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let a=this.content.slice(),i=this.size+t.nodeSize-n.nodeSize;return a[e]=t,new ce(a,i)}addToStart(e){return new ce([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new ce(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))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 t=this.content[e];if(!t)throw RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let a=this.content[t];e(a,n,t),n+=a.nodeSize}}findDiffStart(e,t=0){return QI(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return ZI(this,e,t,n)}findIndex(e){if(e==0)return Qx(0,e);if(e==this.size)return Qx(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let a=this.child(t),i=n+a.nodeSize;if(i>=e){if(i==e)return Qx(t+1,i);return Qx(t,n)}n=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map((e)=>e.toJSON()):null}static fromJSON(e,t){if(!t)return ce.empty;if(!Array.isArray(t))throw RangeError("Invalid input for Fragment.fromJSON");return ce.fromArray(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return ce.empty;let t,n=0;for(let a=0;a<e.length;a++){let i=e[a];if(n+=i.nodeSize,a&&i.isText&&e[a-1].sameMarkup(i)){if(!t)t=e.slice(0,a);t[t.length-1]=i.withText(t[t.length-1].text+i.text)}else if(t)t.push(i)}return new ce(t||e,n)}static from(e){if(!e)return ce.empty;if(e instanceof ce)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new ce([e],e.nodeSize);throw RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}function Qx(e,t){return lR.index=e,lR.offset=t,lR}function t1(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let a=0;a<e.length;a++)if(!t1(e[a],t[a]))return!1}else{for(let a in e)if(!(a in t)||!t1(e[a],t[a]))return!1;for(let a in t)if(!(a in e))return!1}return!0}class Pt{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let a=0;a<e.length;a++){let i=e[a];if(this.eq(i))return e;if(this.type.excludes(i.type)){if(!t)t=e.slice(0,a)}else if(i.type.excludes(this.type))return e;else{if(!n&&i.type.rank>this.type.rank){if(!t)t=e.slice(0,a);t.push(this),n=!0}if(t)t.push(i)}}if(!t)t=e.slice();if(!n)t.push(this);return t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&t1(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);let a=n.create(t.attrs);return n.checkAttrs(a.attrs),a}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Pt.none;if(e instanceof Pt)return[e];let t=e.slice();return t.sort((n,a)=>n.type.rank-a.type.rank),t}}class Se{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=rB(this.content,e+this.openStart,t,this.openStart+1,this.openEnd+1);return n&&new Se(n,this.openStart,this.openEnd)}removeBetween(e,t){return new Se(nB(this.content,e+this.openStart,t+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()};if(this.openStart>0)e.openStart=this.openStart;if(this.openEnd>0)e.openEnd=this.openEnd;return e}static fromJSON(e,t){if(!t)return Se.empty;let n=t.openStart||0,a=t.openEnd||0;if(typeof n!="number"||typeof a!="number")throw RangeError("Invalid input for Slice.fromJSON");return new Se(ce.fromJSON(e,t.content),n,a)}static maxOpen(e,t=!0){let n=0,a=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)n++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)a++;return new Se(e,n,a)}}function nB(e,t,n){let{index:a,offset:i}=e.findIndex(t),l=e.maybeChild(a),{index:c,offset:u}=e.findIndex(n);if(i==t||l.isText){if(u!=n&&!e.child(c).isText)throw RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(a!=c)throw RangeError("Removing non-flat range");return e.replaceChild(a,l.copy(nB(l.content,t-i-1,n-i-1)))}function rB(e,t,n,a,i,l){let{index:c,offset:u}=e.findIndex(t),f=e.maybeChild(c);if(u==t||f.isText){if(l&&a<=0&&i<=0&&!l.canReplace(c,c,n))return null;return e.cut(0,t).append(n).append(e.cut(t))}let h=rB(f.content,t-u-1,n,c==0?a-1:0,c==e.childCount-1?i-1:0,f);return h&&e.replaceChild(c,f.copy(h))}function iZ(e,t,n){if(n.openStart>e.depth)throw new Sd("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Sd("Inconsistent open depths");return oB(e,t,n,0)}function oB(e,t,n,a){let i=e.index(a),l=e.node(a);if(i==t.index(a)&&a<e.depth-n.openStart){let c=oB(e,t,n,a+1);return l.copy(l.content.replaceChild(i,c))}else if(!n.content.size)return $d(l,n1(e,t,a));else if(!n.openStart&&!n.openEnd&&e.depth==a&&t.depth==a){let c=e.parent,u=c.content;return $d(c,u.cut(0,e.parentOffset).append(n.content).append(u.cut(t.parentOffset)))}else{let{start:c,end:u}=sZ(n,e);return $d(l,iB(e,c,u,t,a))}}function aB(e,t){if(!t.type.compatibleContent(e.type))throw new Sd("Cannot join "+t.type.name+" onto "+e.type.name)}function cR(e,t,n){let a=e.node(n);return aB(a,t.node(n)),a}function xd(e,t){let n=t.length-1;if(n>=0&&e.isText&&e.sameMarkup(t[n]))t[n]=e.withText(t[n].text+e.text);else t.push(e)}function Fg(e,t,n,a){let i=(t||e).node(n),l=0,c=t?t.index(n):i.childCount;if(e){if(l=e.index(n),e.depth>n)l++;else if(e.textOffset)xd(e.nodeAfter,a),l++}for(let u=l;u<c;u++)xd(i.child(u),a);if(t&&t.depth==n&&t.textOffset)xd(t.nodeBefore,a)}function $d(e,t){if(!e.type.validContent(t))throw new Sd("Invalid content for node "+e.type.name);return e.copy(t)}function iB(e,t,n,a,i){let l=e.depth>i&&cR(e,t,i+1),c=a.depth>i&&cR(n,a,i+1),u=[];if(Fg(null,e,i,u),l&&c&&t.index(i)==n.index(i))aB(l,c),xd($d(l,iB(e,t,n,a,i+1)),u);else{if(l)xd($d(l,n1(e,t,i+1)),u);if(Fg(t,n,i,u),c)xd($d(c,n1(n,a,i+1)),u)}return Fg(a,null,i,u),new ce(u)}function n1(e,t,n){let a=[];if(Fg(null,e,n,a),e.depth>n){let i=cR(e,t,n+1);xd($d(i,n1(e,t,n+1)),a)}return Fg(t,null,n,a),new ce(a)}function sZ(e,t){let n=t.depth-e.openStart,i=t.node(n).copy(e.content);for(let l=n-1;l>=0;l--)i=t.node(l).copy(ce.from(i));return{start:i.resolveNoCache(e.openStart+n),end:i.resolveNoCache(i.content.size-e.openEnd-n)}}class Vg{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){if(e==null)return this.depth;if(e<0)return this.depth+e;return 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 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 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,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],a=e.child(t);return n?e.child(t).cut(n):a}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];if(t)return this.parent.child(e).cut(0,t);return e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[t*3],a=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)a+=n.child(i).nodeSize;return a}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return Pt.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),a=e.maybeChild(t);if(!n){let c=n;n=a,a=c}let i=n.marks;for(var l=0;l<i.length;l++)if(i[l].type.spec.inclusive===!1&&(!a||!i[l].isInSet(a.marks)))i=i[l--].removeFromSet(i);return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,a=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)if(n[i].type.spec.inclusive===!1&&(!a||!n[i].isInSet(a.marks)))n=n[i--].removeFromSet(n);return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new zp(this,e,n);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 t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw RangeError("Position "+t+" out of range");let n=[],a=0,i=t;for(let l=e;;){let{index:c,offset:u}=l.content.findIndex(i),f=i-u;if(n.push(l,c,a+u),!f)break;if(l=l.child(c),l.isText)break;i=f-1,a+=u+1}return new Vg(t,n,i)}static resolveCached(e,t){let n=VI.get(e);if(n)for(let i=0;i<n.elts.length;i++){let l=n.elts[i];if(l.pos==t)return l}else VI.set(e,n=new sB);let a=n.elts[n.i]=Vg.resolve(e,t);return n.i=(n.i+1)%lZ,a}}class sB{constructor(){this.elts=[],this.i=0}}class zp{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}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)}}class Mr{constructor(e,t,n,a=Pt.none){this.type=e,this.attrs=t,this.marks=a,this.content=n||ce.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,t,n,a=0){this.content.nodesBetween(e,t,n,a,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,t,n,a){return this.content.textBetween(e,t,n,a)}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,t,n){return this.type==e&&t1(this.attrs,t||e.defaultAttrs||cZ)&&Pt.sameSet(this.marks,n||Pt.none)}copy(e=null){if(e==this.content)return this;return new Mr(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Mr(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){if(e==0&&t==this.content.size)return this;return this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return Se.empty;let a=this.resolve(e),i=this.resolve(t),l=n?0:a.sharedDepth(t),c=a.start(l),f=a.node(l).content.cut(a.pos-c,i.pos-c);return new Se(f,a.depth-l,i.depth-l)}replace(e,t,n){return iZ(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:a}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(a==e||t.isText)return t;e-=a+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let a=this.content.child(t-1);return{node:a,index:t-1,offset:n-a.nodeSize}}resolve(e){return Vg.resolveCached(this,e)}resolveNoCache(e){return Vg.resolve(this,e)}rangeHasMark(e,t,n){let a=!1;if(t>e)this.nodesBetween(e,t,(i)=>{if(n.isInSet(i.marks))a=!0;return!a});return a}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;if(this.content.size)e+="("+this.content.toStringInner()+")";return lB(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=ce.empty,a=0,i=n.childCount){let l=this.contentMatchAt(e).matchFragment(n,a,i),c=l&&l.matchFragment(this.content,t);if(!c||!c.validEnd)return!1;for(let u=a;u<i;u++)if(!this.type.allowsMarks(n.child(u).marks))return!1;return!0}canReplaceWith(e,t,n,a){if(a&&!this.type.allowsMarks(a))return!1;let i=this.contentMatchAt(e).matchType(n),l=i&&i.matchFragment(this.content,t);return l?l.validEnd:!1}canAppend(e){if(e.content.size)return this.canReplace(this.childCount,this.childCount,e.content);else return this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=Pt.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!Pt.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map((t)=>t.type.name)}`);this.content.forEach((t)=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}if(this.content.size)e.content=this.content.toJSON();if(this.marks.length)e.marks=this.marks.map((t)=>t.toJSON());return e}static fromJSON(e,t){if(!t)throw RangeError("Invalid input for Node.fromJSON");let n=void 0;if(t.marks){if(!Array.isArray(t.marks))throw RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw RangeError("Invalid text node in JSON");return e.text(t.text,n)}let a=ce.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,a,n);return i.type.checkAttrs(i.attrs),i}}function lB(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class wd{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new cB(e,t);if(n.next==null)return wd.empty;let a=uB(n);if(n.next)n.err("Unexpected trailing text");let i=gZ(mZ(a));return bZ(i,n),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let a=this;for(let i=t;a&&i<n;i++)a=a.matchType(e.child(i).type);return a}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:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let a=[this];function i(l,c){let u=l.matchFragment(e,n);if(u&&(!t||u.validEnd))return ce.from(c.map((f)=>f.createAndFill()));for(let f=0;f<l.next.length;f++){let{type:h,next:m}=l.next[f];if(!(h.isText||h.hasRequiredAttrs())&&a.indexOf(m)==-1){a.push(m);let b=i(m,c.concat(h));if(b)return b}}return null}return i(this,[])}findWrapping(e){for(let n=0;n<this.wrapCache.length;n+=2)if(this.wrapCache[n]==e)return this.wrapCache[n+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];while(n.length){let a=n.shift(),i=a.match;if(i.matchType(e)){let l=[];for(let c=a;c.type;c=c.via)l.push(c.type);return l.reverse()}for(let l=0;l<i.next.length;l++){let{type:c,next:u}=i.next[l];if(!c.isLeaf&&!c.hasRequiredAttrs()&&!(c.name in t)&&(!a.type||u.validEnd))n.push({match:c.contentMatch,type:c,via:a}),t[c.name]=!0}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let a=0;a<n.next.length;a++)if(e.indexOf(n.next[a].next)==-1)t(n.next[a].next)}return t(this),e.map((n,a)=>{let i=a+(n.validEnd?"*":" ")+" ";for(let l=0;l<n.next.length;l++)i+=(l?", ":"")+n.next[l].type.name+"->"+e.indexOf(n.next[l].next);return i}).join(`
252
+ `)}}class cB{constructor(e,t){if(this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]=="")this.tokens.pop();if(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 SyntaxError(e+" (in content expression '"+this.string+"')")}}function uB(e){let t=[];do t.push(uZ(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function uZ(e){let t=[];do t.push(dZ(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function dZ(e){let t=hZ(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=fZ(e,t);else break;return t}function jI(e){if(/\D/.test(e.next))e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function fZ(e,t){let n=jI(e),a=n;if(e.eat(","))if(e.next!="}")a=jI(e);else a=-1;if(!e.eat("}"))e.err("Unclosed braced range");return{type:"range",min:n,max:a,expr:t}}function pZ(e,t){let n=e.nodeTypes,a=n[t];if(a)return[a];let i=[];for(let l in n){let c=n[l];if(c.isInGroup(t))i.push(c)}if(i.length==0)e.err("No node type or group '"+t+"' found");return i}function hZ(e){if(e.eat("(")){let t=uB(e);if(!e.eat(")"))e.err("Missing closing paren");return t}else if(!/\W/.test(e.next)){let t=pZ(e,e.next).map((n)=>{if(e.inline==null)e.inline=n.isInline;else if(e.inline!=n.isInline)e.err("Mixing inline and block content");return{type:"name",value:n}});return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}else e.err("Unexpected token '"+e.next+"'")}function mZ(e){let t=[[]];return i(l(e,0),n()),t;function n(){return t.push([])-1}function a(c,u,f){let h={term:f,to:u};return t[c].push(h),h}function i(c,u){c.forEach((f)=>f.to=u)}function l(c,u){if(c.type=="choice")return c.exprs.reduce((f,h)=>f.concat(l(h,u)),[]);else if(c.type=="seq")for(let f=0;;f++){let h=l(c.exprs[f],u);if(f==c.exprs.length-1)return h;i(h,u=n())}else if(c.type=="star"){let f=n();return a(u,f),i(l(c.expr,f),f),[a(f)]}else if(c.type=="plus"){let f=n();return i(l(c.expr,u),f),i(l(c.expr,f),f),[a(f)]}else if(c.type=="opt")return[a(u)].concat(l(c.expr,u));else if(c.type=="range"){let f=u;for(let h=0;h<c.min;h++){let m=n();i(l(c.expr,f),m),f=m}if(c.max==-1)i(l(c.expr,f),f);else for(let h=c.min;h<c.max;h++){let m=n();a(f,m),i(l(c.expr,f),m),f=m}return[a(f)]}else if(c.type=="name")return[a(u,void 0,c.value)];else throw Error("Unknown expr type")}}function dB(e,t){return t-e}function KI(e,t){let n=[];return a(t),n.sort(dB);function a(i){let l=e[i];if(l.length==1&&!l[0].term)return a(l[0].to);n.push(i);for(let c=0;c<l.length;c++){let{term:u,to:f}=l[c];if(!u&&n.indexOf(f)==-1)a(f)}}}function gZ(e){let t=Object.create(null);return n(KI(e,0));function n(a){let i=[];a.forEach((c)=>{e[c].forEach(({term:u,to:f})=>{if(!u)return;let h;for(let m=0;m<i.length;m++)if(i[m][0]==u)h=i[m][1];KI(e,f).forEach((m)=>{if(!h)i.push([u,h=[]]);if(h.indexOf(m)==-1)h.push(m)})})});let l=t[a.join(",")]=new wd(a.indexOf(e.length-1)>-1);for(let c=0;c<i.length;c++){let u=i[c][1].sort(dB);l.next.push({type:i[c][0],next:t[u.join(",")]||n(u)})}return l}}function bZ(e,t){for(let n=0,a=[e];n<a.length;n++){let i=a[n],l=!i.validEnd,c=[];for(let u=0;u<i.next.length;u++){let{type:f,next:h}=i.next[u];if(c.push(f.name),l&&!(f.isText||f.hasRequiredAttrs()))l=!1;if(a.indexOf(h)==-1)a.push(h)}if(l)t.err("Only non-generatable nodes ("+c.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function fB(e){let t=Object.create(null);for(let n in e){let a=e[n];if(!a.hasDefault)return null;t[n]=a.default}return t}function pB(e,t){let n=Object.create(null);for(let a in e){let i=t&&t[a];if(i===void 0){let l=e[a];if(l.hasDefault)i=l.default;else throw RangeError("No value supplied for attribute "+a)}n[a]=i}return n}function hB(e,t,n,a){for(let i in t)if(!(i in e))throw RangeError(`Unsupported attribute ${i} for ${n} of type ${a}`);for(let i in e)if(e[i].validate)e[i].validate(t[i])}function mB(e,t){let n=Object.create(null);if(t)for(let a in t)n[a]=new gB(e,a,t[a]);return n}class o1{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=mB(e,n.attrs),this.defaultAttrs=fB(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==wd.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){if(!e&&this.defaultAttrs)return this.defaultAttrs;else return pB(this.attrs,e)}create(e=null,t,n){if(this.isText)throw Error("NodeType.create can't construct text nodes");return new Mr(this,this.computeAttrs(e),ce.from(t),Pt.setFrom(n))}createChecked(e=null,t,n){return t=ce.from(t),this.checkContent(t),new Mr(this,this.computeAttrs(e),t,Pt.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),t=ce.from(t),t.size){let l=this.contentMatch.fillBefore(t);if(!l)return null;t=l.append(t)}let a=this.contentMatch.matchFragment(t),i=a&&a.fillBefore(ce.empty,!0);if(!i)return null;return new Mr(this,e,t.append(i),Pt.setFrom(n))}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){hB(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 t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type)){if(!t)t=e.slice(0,n)}else if(t)t.push(e[n]);return!t?e:t.length?t:Pt.none}static compile(e,t){let n=Object.create(null);e.forEach((i,l)=>n[i]=new o1(i,t,l));let a=t.spec.topNode||"doc";if(!n[a])throw RangeError("Schema is missing its top node type ('"+a+"')");if(!n.text)throw RangeError("Every schema needs a 'text' type");for(let i in n.text.attrs)throw RangeError("The text node type should not have attributes");return n}}function yZ(e,t,n){let a=n.split("|");return(i)=>{let l=i===null?"null":typeof i;if(a.indexOf(l)<0)throw RangeError(`Expected value of type ${a} for attribute ${t} on type ${e}, got ${l}`)}}class gB{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate=typeof n.validate=="string"?yZ(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class Kg{constructor(e,t,n,a){this.name=e,this.rank=t,this.schema=n,this.spec=a,this.attrs=mB(e,a.attrs),this.excluded=null;let i=fB(this.attrs);this.instance=i?new Pt(this,i):null}create(e=null){if(!e&&this.instance)return this.instance;return new Pt(this,pB(this.attrs,e))}static compile(e,t){let n=Object.create(null),a=0;return e.forEach((i,l)=>n[i]=new Kg(i,a++,t,l)),n}removeFromSet(e){for(var t=0;t<e.length;t++)if(e[t].type==this)e=e.slice(0,t).concat(e.slice(t+1)),t--;return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){hB(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class qg{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let a in e)t[a]=e[a];t.nodes=sR.from(e.nodes),t.marks=sR.from(e.marks||{}),this.nodes=o1.compile(this.spec.nodes,this),this.marks=Kg.compile(this.spec.marks,this);let n=Object.create(null);for(let a in this.nodes){if(a in this.marks)throw RangeError(a+" can not be both a node and a mark");let i=this.nodes[a],l=i.spec.content||"",c=i.spec.marks;if(i.contentMatch=n[l]||(n[l]=wd.parse(l,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=c=="_"?null:c?qI(this,c.split(" ")):c==""||!i.inlineContent?[]:null}for(let a in this.marks){let i=this.marks[a],l=i.spec.excludes;i.excluded=l==null?[i]:l==""?[]:qI(this,l.split(" "))}this.nodeFromJSON=(a)=>Mr.fromJSON(this,a),this.markFromJSON=(a)=>Pt.fromJSON(this,a),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,a){if(typeof e=="string")e=this.nodeType(e);else if(!(e instanceof o1))throw RangeError("Invalid node type: "+e);else if(e.schema!=this)throw RangeError("Node type from different schema used ("+e.name+")");return e.createChecked(t,n,a)}text(e,t){let n=this.nodes.text;return new r1(n,n.defaultAttrs,e,Pt.setFrom(t))}mark(e,t){if(typeof e=="string")e=this.marks[e];return e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError("Unknown node type: "+e);return t}}function qI(e,t){let n=[];for(let a=0;a<t.length;a++){let i=t[a],l=e.marks[i],c=l;if(l)n.push(l);else for(let u in e.marks){let f=e.marks[u];if(i=="_"||f.spec.group&&f.spec.group.split(" ").indexOf(i)>-1)n.push(c=f)}if(!c)throw SyntaxError("Unknown mark type: '"+t[a]+"'")}return n}function vZ(e){return e.tag!=null}function xZ(e){return e.style!=null}class Ko{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach((a)=>{if(vZ(a))this.tags.push(a);else if(xZ(a)){let i=/[^=]*/.exec(a.style)[0];if(n.indexOf(i)<0)n.push(i);this.styles.push(a)}}),this.normalizeLists=!this.tags.some((a)=>{if(!/^(ul|ol)\b/.test(a.tag)||!a.node)return!1;let i=e.nodes[a.node];return i.contentMatch.matchType(i)})}parse(e,t={}){let n=new dR(this,t,!1);return n.addAll(e,Pt.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new dR(this,t,!0);return n.addAll(e,Pt.none,t.from,t.to),Se.maxOpen(n.finish())}matchTag(e,t,n){for(let a=n?this.tags.indexOf(n)+1:0;a<this.tags.length;a++){let i=this.tags[a];if(wZ(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||t.matchesContext(i.context))){if(i.getAttrs){let l=i.getAttrs(e);if(l===!1)continue;i.attrs=l||void 0}return i}}}matchStyle(e,t,n,a){for(let i=a?this.styles.indexOf(a)+1:0;i<this.styles.length;i++){let l=this.styles[i],c=l.style;if(c.indexOf(e)!=0||l.context&&!n.matchesContext(l.context)||c.length>e.length&&(c.charCodeAt(e.length)!=61||c.slice(e.length+1)!=t))continue;if(l.getAttrs){let u=l.getAttrs(t);if(u===!1)continue;l.attrs=u||void 0}return l}}static schemaRules(e){let t=[];function n(a){let i=a.priority==null?50:a.priority,l=0;for(;l<t.length;l++){let c=t[l];if((c.priority==null?50:c.priority)<i)break}t.splice(l,0,a)}for(let a in e.marks){let i=e.marks[a].spec.parseDOM;if(i)i.forEach((l)=>{if(n(l=WI(l)),!(l.mark||l.ignore||l.clearMark))l.mark=a})}for(let a in e.nodes){let i=e.nodes[a].spec.parseDOM;if(i)i.forEach((l)=>{if(n(l=WI(l)),!(l.node||l.ignore||l.mark))l.node=a})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Ko(e,Ko.schemaRules(e)))}}function GI(e,t,n){if(t!=null)return(t?jg:0)|(t==="full"?uR:0);return e&&e.whitespace=="pre"?jg|uR:n&~Ug}class Hg{constructor(e,t,n,a,i,l){this.type=e,this.attrs=t,this.marks=n,this.solid=a,this.options=l,this.content=[],this.activeMarks=Pt.none,this.match=i||(l&Ug?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(ce.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let n=this.type.contentMatch,a;if(a=n.findWrapping(e.type))return this.match=n,a;else return null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&jg)){let n=this.content[this.content.length-1],a;if(n&&n.isText&&(a=/[ \t\r\n\u000c]+$/.exec(n.text))){let i=n;if(n.text.length==a[0].length)this.content.pop();else this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-a[0].length))}}let t=ce.from(this.content);if(!e&&this.match)t=t.append(this.match.fillBefore(ce.empty,!0));return this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){if(this.type)return this.type.inlineContent;if(this.content.length)return this.content[0].isInline;return e.parentNode&&!bB.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class dR{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let a=t.topNode,i,l=GI(null,t.preserveWhitespace,0)|(n?Ug:0);if(a)i=new Hg(a.type,a.attrs,Pt.none,!0,t.topMatch||a.type.contentMatch,l);else if(n)i=new Hg(null,null,Pt.none,!0,null,l);else i=new Hg(e.schema.topNodeType,null,Pt.none,!0,null,l);this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){if(e.nodeType==3)this.addTextNode(e,t);else if(e.nodeType==1)this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,a=this.top,i=a.options&uR?"full":this.localPreserveWS||(a.options&jg)>0,{schema:l}=this.parser;if(i==="full"||a.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(!i){if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let c=a.content[a.content.length-1],u=e.previousSibling;if(!c||u&&u.nodeName=="BR"||c.isText&&/[ \t\r\n\u000c]$/.test(c.text))n=n.slice(1)}}else if(i==="full")n=n.replace(/\r\n?/g,`
253
+ `);else if(l.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(l.linebreakReplacement.create())){let c=n.split(/\r?\n|\r/);for(let u=0;u<c.length;u++){if(u)this.insertNode(l.linebreakReplacement.create(),t,!0);if(c[u])this.insertNode(l.text(c[u]),t,!/\S/.test(c[u]))}n=""}else n=n.replace(/\r?\n|\r/g," ");if(n)this.insertNode(l.text(n),t,!/\S/.test(n));this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let a=this.localPreserveWS,i=this.top;if(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))this.localPreserveWS=!0;let l=e.nodeName.toLowerCase(),c;if(yB.hasOwnProperty(l)&&this.parser.normalizeLists)SZ(e);let u=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(c=this.parser.matchTag(e,this,n));e:if(u?u.ignore:$Z.hasOwnProperty(l))this.findInside(e),this.ignoreFallback(e,t);else if(!u||u.skip||u.closeParent){if(u&&u.closeParent)this.open=Math.max(0,this.open-1);else if(u&&u.skip.nodeType)e=u.skip;let f,h=this.needsBlock;if(bB.hasOwnProperty(l)){if(i.content.length&&i.content[0].isInline&&this.open)this.open--,i=this.top;if(f=!0,!i.type)this.needsBlock=!0}else if(!e.firstChild){this.leafFallback(e,t);break e}let m=u&&u.skip?t:this.readStyles(e,t);if(m)this.addAll(e,m);if(f)this.sync(i);this.needsBlock=h}else{let f=this.readStyles(e,t);if(f)this.addElementByRule(e,u,f,u.consuming===!1?c:void 0)}this.localPreserveWS=a}leafFallback(e,t){if(e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent)this.addTextNode(e.ownerDocument.createTextNode(`
254
+ `),t)}ignoreFallback(e,t){if(e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent))this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let n=e.style;if(n&&n.length)for(let a=0;a<this.parser.matchedStyles.length;a++){let i=this.parser.matchedStyles[a],l=n.getPropertyValue(i);if(l)for(let c=void 0;;){let u=this.parser.matchStyle(i,l,this,c);if(!u)break;if(u.ignore)return null;if(u.clearMark)t=t.filter((f)=>!u.clearMark(f));else t=t.concat(this.parser.schema.marks[u.mark].create(u.attrs));if(u.consuming===!1)c=u;else break}}return t}addElementByRule(e,t,n,a){let i,l;if(t.node){if(l=this.parser.schema.nodes[t.node],!l.isLeaf){let u=this.enter(l,t.attrs||null,n,t.preserveWhitespace);if(u)i=!0,n=u}else if(!this.insertNode(l.create(t.attrs),n,e.nodeName=="BR"))this.leafFallback(e,n)}else{let u=this.parser.schema.marks[t.mark];n=n.concat(u.create(t.attrs))}let c=this.top;if(l&&l.isLeaf)this.findInside(e);else if(a)this.addElement(e,n,a);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach((u)=>this.insertNode(u,n,!1));else{let u=e;if(typeof t.contentElement=="string")u=e.querySelector(t.contentElement);else if(typeof t.contentElement=="function")u=t.contentElement(e);else if(t.contentElement)u=t.contentElement;this.findAround(e,u,!0),this.addAll(u,n),this.findAround(e,u,!1)}if(i&&this.sync(c))this.open--}addAll(e,t,n,a){let i=n||0;for(let l=n?e.childNodes[n]:e.firstChild,c=a==null?null:e.childNodes[a];l!=c;l=l.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(l,t);this.findAtPoint(e,i)}findPlace(e,t,n){let a,i;for(let l=this.open,c=0;l>=0;l--){let u=this.nodes[l],f=u.findWrapping(e);if(f&&(!a||a.length>f.length+c)){if(a=f,i=u,!f.length)break}if(u.solid){if(n)break;c+=2}}if(!a)return null;this.sync(i);for(let l=0;l<a.length;l++)t=this.enterInner(a[l],null,t,!1);return t}insertNode(e,t,n){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();if(i)t=this.enterInner(i,null,t)}let a=this.findPlace(e,t,n);if(a){this.closeExtra();let i=this.top;if(i.match)i.match=i.match.matchType(e.type);let l=Pt.none;for(let c of a.concat(e.marks))if(i.type?i.type.allowsMarkType(c.type):YI(c.type,e.type))l=c.addToSet(l);return i.content.push(e.mark(l)),!0}return!1}enter(e,t,n,a){let i=this.findPlace(e.create(t),n,!1);if(i)i=this.enterInner(e,t,n,!0,a);return i}enterInner(e,t,n,a=!1,i){this.closeExtra();let l=this.top;l.match=l.match&&l.match.matchType(e);let c=GI(e,i,l.options);if(l.options&Ug&&l.content.length==0)c|=Ug;let u=Pt.none;return n=n.filter((f)=>{if(l.type?l.type.allowsMarkType(f.type):YI(f.type,e))return u=f.addToSet(u),!1;return!0}),this.nodes.push(new Hg(e,t,u,a,null,c)),this.open++,n}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].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 t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;else if(this.localPreserveWS)this.nodes[t].options|=jg;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let a=n.length-1;a>=0;a--)e+=n[a].nodeSize;if(t)e++}return e}findAtPoint(e,t){if(this.find){for(let n=0;n<this.find.length;n++)if(this.find[n].node==e&&this.find[n].offset==t)this.find[n].pos=this.currentPos}}findInside(e){if(this.find){for(let t=0;t<this.find.length;t++)if(this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node))this.find[t].pos=this.currentPos}}findAround(e,t,n){if(e!=t&&this.find){for(let a=0;a<this.find.length;a++)if(this.find[a].pos==null&&e.nodeType==1&&e.contains(this.find[a].node)){if(t.compareDocumentPosition(this.find[a].node)&(n?2:4))this.find[a].pos=this.currentPos}}}findInText(e){if(this.find){for(let t=0;t<this.find.length;t++)if(this.find[t].node==e)this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset)}}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,a=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+(a?0:1),l=(c,u)=>{for(;c>=0;c--){let f=t[c];if(f==""){if(c==t.length-1||c==0)continue;for(;u>=i;u--)if(l(c-1,u))return!0;return!1}else{let h=u>0||u==0&&a?this.nodes[u].type:n&&u>=i?n.node(u-i).type:null;if(!h||h.name!=f&&!h.isInGroup(f))return!1;u--}}return!0};return l(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let t in this.parser.schema.nodes){let n=this.parser.schema.nodes[t];if(n.isTextblock&&n.defaultAttrs)return n}}}function SZ(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let a=t.nodeType==1?t.nodeName.toLowerCase():null;if(a&&yB.hasOwnProperty(a)&&n)n.appendChild(t),t=n;else if(a=="li")n=t;else if(a)n=null}}function wZ(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function WI(e){let t={};for(let n in e)t[n]=e[n];return t}function YI(e,t){let n=t.schema.nodes;for(let a in n){let i=n[a];if(!i.allowsMarkType(e))continue;let l=[],c=(u)=>{l.push(u);for(let f=0;f<u.edgeCount;f++){let{type:h,next:m}=u.edge(f);if(h==t)return!0;if(l.indexOf(m)<0&&c(m))return!0}};if(c(i.contentMatch))return!0}}class Qi{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){if(!n)n=Zx(t).createDocumentFragment();let a=n,i=[];return e.forEach((l)=>{if(i.length||l.marks.length){let c=0,u=0;while(c<i.length&&u<l.marks.length){let f=l.marks[u];if(!this.marks[f.type.name]){u++;continue}if(!f.eq(i[c][0])||f.type.spec.spanning===!1)break;c++,u++}while(c<i.length)a=i.pop()[1];while(u<l.marks.length){let f=l.marks[u++],h=this.serializeMark(f,l.isInline,t);if(h)i.push([f,a]),a.appendChild(h.dom),a=h.contentDOM||h.dom}}a.appendChild(this.serializeNodeInner(l,t))}),n}serializeNodeInner(e,t){if(e.isText)return Zx(t).createTextNode(e.text);let{dom:n,contentDOM:a}=e1(Zx(t),this.nodes[e.type.name](e),null,e.attrs);if(a){if(e.isLeaf)throw RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,a)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let a=e.marks.length-1;a>=0;a--){let i=this.serializeMark(e.marks[a],e.isInline,t);if(i)(i.contentDOM||i.dom).appendChild(n),n=i.dom}return n}serializeMark(e,t,n={}){let a=this.marks[e.type.name];return a&&e1(Zx(n),a(e,t),null,e.attrs)}static renderSpec(e,t,n=null,a){if(typeof t=="string")return{dom:e.createTextNode(t)};return e1(e,t,n,a)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Qi(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=JI(e.nodes);if(!t.text)t.text=(n)=>n.text;return t}static marksFromSchema(e){return JI(e.marks)}}function JI(e){let t={};for(let n in e){let a=e[n].spec.toDOM;if(a)t[n]=a}return t}function Zx(e){return e.document||window.document}function CZ(e){let t=XI.get(e);if(t===void 0)XI.set(e,t=EZ(e));return t}function EZ(e){let t=null;function n(a){if(a&&typeof a=="object")if(Array.isArray(a))if(typeof a[0]=="string"){if(!t)t=[];t.push(a)}else for(let i=0;i<a.length;i++)n(a[i]);else for(let i in a)n(a[i])}return n(e),t}function e1(e,t,n,a){if(t.nodeType==1)return{dom:t};if(t.dom&&t.dom.nodeType==1)return t;let i=t[0],l;if(typeof i!="string")throw RangeError("Invalid array passed to renderSpec");if(a&&(l=CZ(a))&&l.indexOf(t)>-1)throw RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let c=i.indexOf(" ");if(c>0)n=i.slice(0,c),i=i.slice(c+1);let u,f=n?e.createElementNS(n,i):e.createElement(i),h=t[1],m=1;if(h&&typeof h=="object"&&h.nodeType==null&&!Array.isArray(h)){m=2;for(let b in h)if(h[b]!=null){let y=b.indexOf(" ");if(y>0)f.setAttributeNS(b.slice(0,y),b.slice(y+1),h[b]);else if(b=="style"&&f.style)f.style.cssText=h[b];else f.setAttribute(b,h[b])}}for(let b=m;b<t.length;b++){let y=t[b];if(y===0){if(b<t.length-1||b>m)throw RangeError("Content hole must be the only child of its parent node");return{dom:f,contentDOM:f}}else if(typeof y=="string")f.appendChild(e.createTextNode(y));else{let{dom:v,contentDOM:S}=e1(e,y,n,a);if(f.appendChild(v),S){if(u)throw RangeError("Multiple content holes");u=S}}}return{dom:f,contentDOM:u}}var lR,Sd,lZ=12,VI,cZ,r1,bB,$Z,yB,jg=1,uR=2,Ug=4,XI;var Ys=N(()=>{UI();ce.empty=new ce([],0);lR={index:0,offset:0};Pt.none=[];Sd=class Sd extends Error{};Se.empty=new Se(ce.empty,0,0);VI=new WeakMap;cZ=Object.create(null);Mr.prototype.text=void 0;r1=class r1 extends Mr{constructor(e,t,n,a){super(e,t,null,a);if(!n)throw RangeError("Empty text nodes are not allowed");this.text=n}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);return lB(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new r1(this.type,this.attrs,this.text,e)}withText(e){if(e==this.text)return this;return new r1(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){if(e==0&&t==this.text.length)return this;return this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};wd.empty=new wd(!0);bB={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},$Z={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},yB={ol:!0,ul:!0};XI=new WeakMap});function TZ(e,t){return e+t*SB}function vB(e){return e&$B}function RZ(e){return(e-(e&$B))/SB}class i1{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(this.delInfo&EB)>0}get deletedBefore(){return(this.delInfo&(wB|a1))>0}get deletedAfter(){return(this.delInfo&(CB|a1))>0}get deletedAcross(){return(this.delInfo&a1)>0}}class qo{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&qo.empty)return qo.empty}recover(e){let t=0,n=vB(e);if(!this.inverted)for(let a=0;a<n;a++)t+=this.ranges[a*3+2]-this.ranges[a*3+1];return this.ranges[n*3]+t+RZ(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let a=0,i=this.inverted?2:1,l=this.inverted?1:2;for(let c=0;c<this.ranges.length;c+=3){let u=this.ranges[c]-(this.inverted?a:0);if(u>e)break;let f=this.ranges[c+i],h=this.ranges[c+l],m=u+f;if(e<=m){let b=!f?t:e==u?-1:e==m?1:t,y=u+a+(b<0?0:h);if(n)return y;let v=e==(t<0?u:m)?null:TZ(c/3,e-u),S=e==u?CB:e==m?wB:a1;if(t<0?e!=u:e!=m)S|=EB;return new i1(y,S,v)}a+=h-f}return n?e+a:new i1(e+a,0,null)}touches(e,t){let n=0,a=vB(t),i=this.inverted?2:1,l=this.inverted?1:2;for(let c=0;c<this.ranges.length;c+=3){let u=this.ranges[c]-(this.inverted?n:0);if(u>e)break;let f=this.ranges[c+i],h=u+f;if(e<=h&&c==a*3)return!0;n+=this.ranges[c+l]-f}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let a=0,i=0;a<this.ranges.length;a+=3){let l=this.ranges[a],c=l-(this.inverted?i:0),u=l+(this.inverted?0:i),f=this.ranges[a+t],h=this.ranges[a+n];e(c,c+f,u,u+h),i+=h-f}}invert(){return new qo(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?qo.empty:new qo(e<0?[0,-e,0]:[0,0,e])}}class Fp{constructor(e,t,n=0,a=e?e.length:0){this.mirror=t,this.from=n,this.to=a,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new Fp(this._maps,this.mirror,e,t)}appendMap(e,t){if(!this.ownData)this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0;if(this.to=this._maps.push(e),t!=null)this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,n=this._maps.length;t<e._maps.length;t++){let a=e.getMirror(t);this.appendMap(e._maps[t],a!=null&&a<t?n+a:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){if(!this.mirror)this.mirror=[];this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this._maps.length+e._maps.length;t>=0;t--){let a=e.getMirror(t);this.appendMap(e._maps[t].invert(),a!=null&&a>t?n-a-1:void 0)}}invert(){let e=new Fp;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let a=0;for(let i=this.from;i<this.to;i++){let l=this._maps[i],c=l.mapResult(e,t);if(c.recover!=null){let u=this.getMirror(i);if(u!=null&&u>i&&u<this.to){i=u,e=this._maps[u].recover(c.recover);continue}}a|=c.delInfo,e=c.pos}return n?e:new i1(e,a,null)}}class yr{getMap(){return qo.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError("Invalid input for Step.fromJSON");let n=fR[t.stepType];if(!n)throw RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in fR)throw RangeError("Duplicate use of step JSON ID "+e);return fR[e]=t,t.prototype.jsonID=e,t}}class Kn{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new Kn(e,null)}static fail(e){return new Kn(null,e)}static fromReplace(e,t,n,a){try{return Kn.ok(e.replace(t,n,a))}catch(i){if(i instanceof Sd)return Kn.fail(i.message);throw i}}}function gR(e,t,n){let a=[];for(let i=0;i<e.childCount;i++){let l=e.child(i);if(l.content.size)l=l.copy(gR(l.content,t,l));if(l.isInline)l=t(l,n,i);a.push(l)}return ce.fromArray(a)}function mR(e,t,n){let a=e.resolve(t),i=n-t,l=a.depth;while(i>0&&l>0&&a.indexAfter(l)==a.node(l).childCount)l--,i--;if(i>0){let c=a.node(l).maybeChild(a.indexAfter(l));while(i>0){if(!c||c.isLeaf)return!0;c=c.firstChild,i--}}return!1}function kZ(e,t,n,a){let i=[],l=[],c,u;e.doc.nodesBetween(t,n,(f,h,m)=>{if(!f.isInline)return;let b=f.marks;if(!a.isInSet(b)&&m.type.allowsMarkType(a.type)){let y=Math.max(h,t),v=Math.min(h+f.nodeSize,n),S=a.addToSet(b);for(let C=0;C<b.length;C++)if(!b[C].isInSet(S))if(c&&c.to==y&&c.mark.eq(b[C]))c.to=v;else i.push(c=new xa(y,v,b[C]));if(u&&u.to==y)u.to=v;else l.push(u=new Rc(y,v,a))}}),i.forEach((f)=>e.step(f)),l.forEach((f)=>e.step(f))}function AZ(e,t,n,a){let i=[],l=0;e.doc.nodesBetween(t,n,(c,u)=>{if(!c.isInline)return;l++;let f=null;if(a instanceof Kg){let h=c.marks,m;while(m=a.isInSet(h))(f||(f=[])).push(m),h=m.removeFromSet(h)}else if(a){if(a.isInSet(c.marks))f=[a]}else f=c.marks;if(f&&f.length){let h=Math.min(u+c.nodeSize,n);for(let m=0;m<f.length;m++){let b=f[m],y;for(let v=0;v<i.length;v++){let S=i[v];if(S.step==l-1&&b.eq(i[v].style))y=S}if(y)y.to=h,y.step=l;else i.push({style:b,from:Math.max(u,t),to:h,step:l})}}}),i.forEach((c)=>e.step(new xa(c.from,c.to,c.style)))}function bR(e,t,n,a=n.contentMatch,i=!0){let l=e.doc.nodeAt(t),c=[],u=t+1;for(let f=0;f<l.childCount;f++){let h=l.child(f),m=u+h.nodeSize,b=a.matchType(h.type);if(!b)c.push(new bn(u,m,Se.empty));else{a=b;for(let y=0;y<h.marks.length;y++)if(!n.allowsMarkType(h.marks[y].type))e.step(new xa(u,m,h.marks[y]));if(i&&h.isText&&n.whitespace!="pre"){let y,v=/\r?\n|\r/g,S;while(y=v.exec(h.text)){if(!S)S=new Se(ce.from(n.schema.text(" ",n.allowedMarks(h.marks))),0,0);c.push(new bn(u+y.index,u+y.index+y[0].length,S))}}}u=m}if(!a.validEnd){let f=a.fillBefore(ce.empty,!0);e.replace(u,u,new Se(f,0,0))}for(let f=c.length-1;f>=0;f--)e.step(c[f])}function MZ(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Js(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let a=e.depth,i=0,l=0;;--a){let c=e.$from.node(a),u=e.$from.index(a)+i,f=e.$to.indexAfter(a)-l;if(a<e.depth&&c.canReplace(u,f,n))return a;if(a==0||c.type.spec.isolating||!MZ(c,u,f))break;if(u)i=1;if(f<c.childCount)l=1}return null}function NZ(e,t,n){let{$from:a,$to:i,depth:l}=t,c=a.before(l+1),u=i.after(l+1),f=c,h=u,m=ce.empty,b=0;for(let S=l,C=!1;S>n;S--)if(C||a.index(S)>0)C=!0,m=ce.from(a.node(S).copy(m)),b++;else f--;let y=ce.empty,v=0;for(let S=l,C=!1;S>n;S--)if(C||i.after(S+1)<i.end(S))C=!0,y=ce.from(i.node(S).copy(y)),v++;else h++;e.step(new En(f,h,c,u,new Se(m.append(y),b,v),m.size-b,!0))}function Vp(e,t,n=null,a=e){let i=OZ(e,t),l=i&&DZ(a,t);if(!l)return null;return i.map(xB).concat({type:t,attrs:n}).concat(l.map(xB))}function xB(e){return{type:e,attrs:null}}function OZ(e,t){let{parent:n,startIndex:a,endIndex:i}=e,l=n.contentMatchAt(a).findWrapping(t);if(!l)return null;let c=l.length?l[0]:t;return n.canReplaceWith(a,i,c)?l:null}function DZ(e,t){let{parent:n,startIndex:a,endIndex:i}=e,l=n.child(a),c=t.contentMatch.findWrapping(l.type);if(!c)return null;let f=(c.length?c[c.length-1]:t).contentMatch;for(let h=a;f&&h<i;h++)f=f.matchType(n.child(h).type);if(!f||!f.validEnd)return null;return c}function PZ(e,t,n){let a=ce.empty;for(let c=n.length-1;c>=0;c--){if(a.size){let u=n[c].type.contentMatch.matchFragment(a);if(!u||!u.validEnd)throw RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}a=ce.from(n[c].type.create(n[c].attrs,a))}let{start:i,end:l}=t;e.step(new En(i,l,i,l,new Se(a,0,0),n.length,!0))}function LZ(e,t,n,a,i){if(!a.isTextblock)throw RangeError("Type given to setBlockType should be a textblock");let l=e.steps.length;e.doc.nodesBetween(t,n,(c,u)=>{let f=typeof i=="function"?i(c):i;if(c.isTextblock&&!c.hasMarkup(a,f)&&_Z(e.doc,e.mapping.slice(l).map(u),a)){let h=null;if(a.schema.linebreakReplacement){let v=a.whitespace=="pre",S=!!a.contentMatch.matchType(a.schema.linebreakReplacement);if(v&&!S)h=!1;else if(!v&&S)h=!0}if(h===!1)RB(e,c,u,l);bR(e,e.mapping.slice(l).map(u,1),a,void 0,h===null);let m=e.mapping.slice(l),b=m.map(u,1),y=m.map(u+c.nodeSize,1);if(e.step(new En(b,y,b+1,y-1,new Se(ce.from(a.create(f,null,c.marks)),0,0),1,!0)),h===!0)TB(e,c,u,l);return!1}})}function TB(e,t,n,a){t.forEach((i,l)=>{if(i.isText){let c,u=/\r?\n|\r/g;while(c=u.exec(i.text)){let f=e.mapping.slice(a).map(n+1+l+c.index);e.replaceWith(f,f+1,t.type.schema.linebreakReplacement.create())}}})}function RB(e,t,n,a){t.forEach((i,l)=>{if(i.type==i.type.schema.linebreakReplacement){let c=e.mapping.slice(a).map(n+1+l);e.replaceWith(c,c+1,t.type.schema.text(`
255
+ `))}})}function _Z(e,t,n){let a=e.resolve(t),i=a.index();return a.parent.canReplaceWith(i,i+1,n)}function IZ(e,t,n,a,i){let l=e.doc.nodeAt(t);if(!l)throw RangeError("No node at given position");if(!n)n=l.type;let c=n.create(a,null,i||l.marks);if(l.isLeaf)return e.replaceWith(t,t+l.nodeSize,c);if(!n.validContent(l.content))throw RangeError("Invalid content for node type "+n.name);e.step(new En(t,t+l.nodeSize,t+1,t+l.nodeSize-1,new Se(ce.from(c),0,0),1,!0))}function Go(e,t,n=1,a){let i=e.resolve(t),l=i.depth-n,c=a&&a[a.length-1]||i.parent;if(l<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!c.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let h=i.depth-1,m=n-2;h>l;h--,m--){let b=i.node(h),y=i.index(h);if(b.type.spec.isolating)return!1;let v=b.content.cutByIndex(y,b.childCount),S=a&&a[m+1];if(S)v=v.replaceChild(0,S.type.create(S.attrs));let C=a&&a[m]||b;if(!b.canReplace(y+1,b.childCount)||!C.type.validContent(v))return!1}let u=i.indexAfter(l),f=a&&a[0];return i.node(l).canReplaceWith(u,u,f?f.type:i.node(l+1).type)}function BZ(e,t,n=1,a){let i=e.doc.resolve(t),l=ce.empty,c=ce.empty;for(let u=i.depth,f=i.depth-n,h=n-1;u>f;u--,h--){l=ce.from(i.node(u).copy(l));let m=a&&a[h];c=ce.from(m?m.type.create(m.attrs,c):i.node(u).copy(c))}e.step(new bn(t,t,new Se(l.append(c),n,n),!0))}function $a(e,t){let n=e.resolve(t),a=n.index();return kB(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(a,a+1)}function zZ(e,t){if(!t.content.size)e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:a}=e.type.schema;for(let i=0;i<t.childCount;i++){let l=t.child(i),c=l.type==a?e.type.schema.nodes.text:l.type;if(n=n.matchType(c),!n)return!1;if(!e.type.allowsMarks(l.marks))return!1}return n.validEnd}function kB(e,t){return!!(e&&t&&!e.isLeaf&&zZ(e,t))}function Ed(e,t,n=-1){let a=e.resolve(t);for(let i=a.depth;;i--){let l,c,u=a.index(i);if(i==a.depth)l=a.nodeBefore,c=a.nodeAfter;else if(n>0)l=a.node(i+1),u++,c=a.node(i).maybeChild(u);else l=a.node(i).maybeChild(u-1),c=a.node(i+1);if(l&&!l.isTextblock&&kB(l,c)&&a.node(i).canReplace(u,u+1))return t;if(i==0)break;t=n<0?a.before(i):a.after(i)}}function HZ(e,t,n){let a=null,{linebreakReplacement:i}=e.doc.type.schema,l=e.doc.resolve(t-n),c=l.node().type;if(i&&c.inlineContent){let m=c.whitespace=="pre",b=!!c.contentMatch.matchType(i);if(m&&!b)a=!1;else if(!m&&b)a=!0}let u=e.steps.length;if(a===!1){let m=e.doc.resolve(t+n);RB(e,m.node(),m.before(),u)}if(c.inlineContent)bR(e,t+n-1,c,l.node().contentMatchAt(l.index()),a==null);let f=e.mapping.slice(u),h=f.map(t-n);if(e.step(new bn(h,f.map(t+n,-1),Se.empty,!0)),a===!0){let m=e.doc.resolve(h);TB(e,m.node(),m.before(),e.steps.length)}return e}function FZ(e,t,n){let a=e.resolve(t);if(a.parent.canReplaceWith(a.index(),a.index(),n))return t;if(a.parentOffset==0)for(let i=a.depth-1;i>=0;i--){let l=a.index(i);if(a.node(i).canReplaceWith(l,l,n))return a.before(i+1);if(l>0)return null}if(a.parentOffset==a.parent.content.size)for(let i=a.depth-1;i>=0;i--){let l=a.indexAfter(i);if(a.node(i).canReplaceWith(l,l,n))return a.after(i+1);if(l<a.node(i).childCount)return null}return null}function s1(e,t,n){let a=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let l=0;l<n.openStart;l++)i=i.firstChild.content;for(let l=1;l<=(n.openStart==0&&n.size?2:1);l++)for(let c=a.depth;c>=0;c--){let u=c==a.depth?0:a.pos<=(a.start(c+1)+a.end(c+1))/2?-1:1,f=a.index(c)+(u>0?1:0),h=a.node(c),m=!1;if(l==1)m=h.canReplace(f,f,i);else{let b=h.contentMatchAt(f).findWrapping(i.firstChild.type);m=b&&h.canReplaceWith(f,f,b[0])}if(m)return u==0?a.pos:u<0?a.before(c+1):a.after(c+1)}return null}function Jg(e,t,n=t,a=Se.empty){if(t==n&&!a.size)return null;let i=e.resolve(t),l=e.resolve(n);if(AB(i,l,a))return new bn(t,n,a);return new MB(i,l,a).fit()}function AB(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class MB{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=ce.empty;for(let a=0;a<=e.depth;a++){let i=e.node(a);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(a))})}for(let a=e.depth;a>0;a--)this.placed=ce.from(e.node(a).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){while(this.unplaced.size){let f=this.findFittable();if(f)this.placeNodes(f);else this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,a=this.close(e<0?this.$to:n.doc.resolve(e));if(!a)return null;let i=this.placed,l=n.depth,c=a.depth;while(l&&c&&i.childCount==1)i=i.firstChild.content,l--,c--;let u=new Se(i,l,c);if(e>-1)return new En(n.pos,e,this.$to.pos,this.$to.end(),u,t);if(u.size||n.pos!=this.$to.pos)return new bn(n.pos,a.pos,u);return null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,a=this.unplaced.openEnd;n<e;n++){let i=t.firstChild;if(t.childCount>1)a=0;if(i.type.spec.isolating&&a<=n){e=n;break}t=i.content}for(let t=1;t<=2;t++)for(let n=t==1?e:this.unplaced.openStart;n>=0;n--){let a,i=null;if(n)i=pR(this.unplaced.content,n-1).firstChild,a=i.content;else a=this.unplaced.content;let l=a.firstChild;for(let c=this.depth;c>=0;c--){let{type:u,match:f}=this.frontier[c],h,m=null;if(t==1&&(l?f.matchType(l.type)||(m=f.fillBefore(ce.from(l),!1)):i&&u.compatibleContent(i.type)))return{sliceDepth:n,frontierDepth:c,parent:i,inject:m};else if(t==2&&l&&(h=f.findWrapping(l.type)))return{sliceDepth:n,frontierDepth:c,parent:i,wrap:h};if(i&&f.matchType(i.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,a=pR(e,t);if(!a.childCount||a.firstChild.isLeaf)return!1;return this.unplaced=new Se(e,t+1,Math.max(n,a.size+t>=e.size-n?t+1:0)),!0}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,a=pR(e,t);if(a.childCount<=1&&t>0){let i=e.size-t<=t+a.size;this.unplaced=new Se(Gg(e,t-1,1),t-1,i?t-1:n)}else this.unplaced=new Se(Gg(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:a,wrap:i}){while(this.depth>t)this.closeFrontierNode();if(i)for(let S=0;S<i.length;S++)this.openFrontierNode(i[S]);let l=this.unplaced,c=n?n.content:l.content,u=l.openStart-e,f=0,h=[],{match:m,type:b}=this.frontier[t];if(a){for(let S=0;S<a.childCount;S++)h.push(a.child(S));m=m.matchFragment(a)}let y=c.size+e-(l.content.size-l.openEnd);while(f<c.childCount){let S=c.child(f),C=m.matchType(S.type);if(!C)break;if(f++,f>1||u==0||S.content.size)m=C,h.push(NB(S.mark(b.allowedMarks(S.marks)),f==1?u:0,f==c.childCount?y:-1))}let v=f==c.childCount;if(!v)y=-1;if(this.placed=Wg(this.placed,t,ce.from(h)),this.frontier[t].match=m,v&&y<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1)this.closeFrontierNode();for(let S=0,C=c;S<y;S++){let E=C.lastChild;this.frontier.push({type:E.type,match:E.contentMatchAt(E.childCount)}),C=E.content}this.unplaced=!v?new Se(Gg(l.content,e,f),l.openStart,l.openEnd):e==0?Se.empty:new Se(Gg(l.content,e-1,1),e-1,y<0?l.openEnd:e-1)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!hR(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:n}=this.$to,a=this.$to.after(n);while(n>1&&a==this.$to.end(--n))++a;return a}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:a}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),l=hR(e,t,a,n,i);if(!l)continue;for(let c=t-1;c>=0;c--){let{match:u,type:f}=this.frontier[c],h=hR(e,c,f,u,!0);if(!h||h.childCount)continue e}return{depth:t,fit:l,move:i?e.doc.resolve(e.after(t+1)):e}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;while(this.depth>t.depth)this.closeFrontierNode();if(t.fit.childCount)this.placed=Wg(this.placed,t.depth,t.fit);e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let a=e.node(n),i=a.type.contentMatch.fillBefore(a.content,!0,e.index(n));this.openFrontierNode(a.type,a.attrs,i)}return e}openFrontierNode(e,t=null,n){let a=this.frontier[this.depth];a.match=a.match.matchType(e),this.placed=Wg(this.placed,this.depth,ce.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(ce.empty,!0);if(t.childCount)this.placed=Wg(this.placed,this.frontier.length,t)}}function Gg(e,t,n){if(t==0)return e.cutByIndex(n,e.childCount);return e.replaceChild(0,e.firstChild.copy(Gg(e.firstChild.content,t-1,n)))}function Wg(e,t,n){if(t==0)return e.append(n);return e.replaceChild(e.childCount-1,e.lastChild.copy(Wg(e.lastChild.content,t-1,n)))}function pR(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function NB(e,t,n){if(t<=0)return e;let a=e.content;if(t>1)a=a.replaceChild(0,NB(a.firstChild,t-1,a.childCount==1?n-1:0));if(t>0){if(a=e.type.contentMatch.fillBefore(a).append(a),n<=0)a=a.append(e.type.contentMatch.matchFragment(a).fillBefore(ce.empty,!0))}return e.copy(a)}function hR(e,t,n,a,i){let l=e.node(t),c=i?e.indexAfter(t):e.index(t);if(c==l.childCount&&!n.compatibleContent(l.type))return null;let u=a.fillBefore(l.content,!0,c);return u&&!UZ(n,l.content,c)?u:null}function UZ(e,t,n){for(let a=n;a<t.childCount;a++)if(!e.allowsMarks(t.child(a).marks))return!0;return!1}function VZ(e){return e.spec.defining||e.spec.definingForContent}function jZ(e,t,n,a){if(!a.size)return e.deleteRange(t,n);let i=e.doc.resolve(t),l=e.doc.resolve(n);if(AB(i,l,a))return e.step(new bn(t,n,a));let c=DB(i,l);if(c[c.length-1]==0)c.pop();let u=-(i.depth+1);c.unshift(u);for(let y=i.depth,v=i.pos-1;y>0;y--,v--){let S=i.node(y).type.spec;if(S.defining||S.definingAsContext||S.isolating)break;if(c.indexOf(y)>-1)u=y;else if(i.before(y)==v)c.splice(1,0,-y)}let f=c.indexOf(u),h=[],m=a.openStart;for(let y=a.content,v=0;;v++){let S=y.firstChild;if(h.push(S),v==a.openStart)break;y=S.content}for(let y=m-1;y>=0;y--){let v=h[y],S=VZ(v.type);if(S&&!v.sameMarkup(i.node(Math.abs(u)-1)))m=y;else if(S||!v.type.isTextblock)break}for(let y=a.openStart;y>=0;y--){let v=(y+m+1)%(a.openStart+1),S=h[v];if(!S)continue;for(let C=0;C<c.length;C++){let E=c[(C+f)%c.length],R=!0;if(E<0)R=!1,E=-E;let D=i.node(E-1),U=i.index(E-1);if(D.canReplaceWith(U,U,S.type,S.marks))return e.replace(i.before(E),R?l.after(E):n,new Se(OB(a.content,0,a.openStart,v),v,a.openEnd))}}let b=e.steps.length;for(let y=c.length-1;y>=0;y--){if(e.replace(t,n,a),e.steps.length>b)break;let v=c[y];if(v<0)continue;t=i.before(v),n=l.after(v)}}function OB(e,t,n,a,i){if(t<n){let l=e.firstChild;e=e.replaceChild(0,l.copy(OB(l.content,t+1,n,a,l)))}if(t>a){let l=i.contentMatchAt(0),c=l.fillBefore(e).append(e);e=c.append(l.matchFragment(c).fillBefore(ce.empty,!0))}return e}function KZ(e,t,n,a){if(!a.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let i=FZ(e.doc,t,a.type);if(i!=null)t=n=i}e.replaceRange(t,n,new Se(ce.from(a),0,0))}function qZ(e,t,n){let a=e.doc.resolve(t),i=e.doc.resolve(n);if(a.parent.isTextblock&&i.parent.isTextblock&&a.start()!=i.start()&&a.parentOffset==0&&i.parentOffset==0){let c=a.sharedDepth(n),u=!1;for(let f=a.depth;f>c;f--)if(a.node(f).type.spec.isolating)u=!0;for(let f=i.depth;f>c;f--)if(i.node(f).type.spec.isolating)u=!0;if(!u){for(let f=a.depth;f>0&&t==a.start(f);f--)t=a.before(f);for(let f=i.depth;f>0&&n==i.start(f);f--)n=i.before(f);a=e.doc.resolve(t),i=e.doc.resolve(n)}}let l=DB(a,i);for(let c=0;c<l.length;c++){let u=l[c],f=c==l.length-1;if(f&&u==0||a.node(u).type.contentMatch.validEnd)return e.delete(a.start(u),i.end(u));if(u>0&&(f||a.node(u-1).canReplace(a.index(u-1),i.indexAfter(u-1))))return e.delete(a.before(u),i.after(u))}for(let c=1;c<=a.depth&&c<=i.depth;c++)if(t-a.start(c)==a.depth-c&&n>a.end(c)&&i.end(c)-n!=i.depth-c&&a.start(c-1)==i.start(c-1)&&a.node(c-1).canReplace(a.index(c-1),i.index(c-1)))return e.delete(a.before(c),n);e.delete(t,n)}function DB(e,t){let n=[],a=Math.min(e.depth,t.depth);for(let i=a;i>=0;i--){let l=e.start(i);if(l<e.pos-(e.depth-i)||t.end(i)>t.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;if(l==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==l-1)n.push(i)}return n}class Xg{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Fp}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new Up(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);if(!t.failed)this.addStep(e,t.doc);return t}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,t=-1e9;for(let n=0;n<this.mapping.maps.length;n++){let a=this.mapping.maps[n];if(n)e=a.map(e,1),t=a.map(t,-1);a.forEach((i,l,c,u)=>{e=Math.min(e,c),t=Math.max(t,u)})}return e==1e9?null:{from:e,to:t}}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=Se.empty){let a=Jg(this.doc,e,t,n);if(a)this.step(a);return this}replaceWith(e,t,n){return this.replace(e,t,new Se(ce.from(n),0,0))}delete(e,t){return this.replace(e,t,Se.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return jZ(this,e,t,n),this}replaceRangeWith(e,t,n){return KZ(this,e,t,n),this}deleteRange(e,t){return qZ(this,e,t),this}lift(e,t){return NZ(this,e,t),this}join(e,t=1){return HZ(this,e,t),this}wrap(e,t){return PZ(this,e,t),this}setBlockType(e,t=e,n,a=null){return LZ(this,e,t,n,a),this}setNodeMarkup(e,t,n=null,a){return IZ(this,e,t,n,a),this}setNodeAttribute(e,t,n){return this.step(new Hp(e,t,n)),this}setDocAttribute(e,t){return this.step(new Yg(e,t)),this}addNodeMark(e,t){return this.step(new kc(e,t)),this}removeNodeMark(e,t){let n=this.doc.nodeAt(e);if(!n)throw RangeError("No node at position "+e);if(t instanceof Pt){if(t.isInSet(n.marks))this.step(new Cd(e,t))}else{let a=n.marks,i,l=[];while(i=t.isInSet(a))l.push(new Cd(e,i)),a=i.removeFromSet(a);for(let c=l.length-1;c>=0;c--)this.step(l[c])}return this}split(e,t=1,n){return BZ(this,e,t,n),this}addMark(e,t,n){return kZ(this,e,t,n),this}removeMark(e,t,n){return AZ(this,e,t,n),this}clearIncompatible(e,t,n){return bR(this,e,t,n),this}}var $B=65535,SB,wB=1,CB=2,a1=4,EB=8,fR,Rc,xa,kc,Cd,bn,En,Hp,Yg,Up;var Ac=N(()=>{Ys();SB=Math.pow(2,16);qo.empty=new qo([]);fR=Object.create(null);Rc=class Rc extends yr{constructor(e,t,n){super();this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),a=n.node(n.sharedDepth(this.to)),i=new Se(gR(t.content,(l,c)=>{if(!l.isAtom||!c.type.allowsMarkType(this.mark.type))return l;return l.mark(this.mark.addToSet(l.marks))},a),t.openStart,t.openEnd);return Kn.fromReplace(e,this.from,this.to,i)}invert(){return new xa(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);if(t.deleted&&n.deleted||t.pos>=n.pos)return null;return new Rc(t.pos,n.pos,this.mark)}merge(e){if(e instanceof Rc&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new Rc(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark);return null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw RangeError("Invalid input for AddMarkStep.fromJSON");return new Rc(t.from,t.to,e.markFromJSON(t.mark))}};yr.jsonID("addMark",Rc);xa=class xa extends yr{constructor(e,t,n){super();this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new Se(gR(t.content,(a)=>a.mark(this.mark.removeFromSet(a.marks)),e),t.openStart,t.openEnd);return Kn.fromReplace(e,this.from,this.to,n)}invert(){return new Rc(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);if(t.deleted&&n.deleted||t.pos>=n.pos)return null;return new xa(t.pos,n.pos,this.mark)}merge(e){if(e instanceof xa&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new xa(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark);return null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw RangeError("Invalid input for RemoveMarkStep.fromJSON");return new xa(t.from,t.to,e.markFromJSON(t.mark))}};yr.jsonID("removeMark",xa);kc=class kc extends yr{constructor(e,t){super();this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Kn.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return Kn.fromReplace(e,this.pos,this.pos+1,new Se(ce.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let n=this.mark.addToSet(t.marks);if(n.length==t.marks.length){for(let a=0;a<t.marks.length;a++)if(!t.marks[a].isInSet(n))return new kc(this.pos,t.marks[a]);return new kc(this.pos,this.mark)}}return new Cd(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new kc(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new kc(t.pos,e.markFromJSON(t.mark))}};yr.jsonID("addNodeMark",kc);Cd=class Cd extends yr{constructor(e,t){super();this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Kn.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return Kn.fromReplace(e,this.pos,this.pos+1,new Se(ce.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(!t||!this.mark.isInSet(t.marks))return this;return new kc(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Cd(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Cd(t.pos,e.markFromJSON(t.mark))}};yr.jsonID("removeNodeMark",Cd);bn=class bn extends yr{constructor(e,t,n,a=!1){super();this.from=e,this.to=t,this.slice=n,this.structure=a}apply(e){if(this.structure&&mR(e,this.from,this.to))return Kn.fail("Structure replace would overwrite content");return Kn.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new qo([this.from,this.to-this.from,this.slice.size])}invert(e){return new bn(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.to,-1),n=this.from==this.to&&bn.MAP_BIAS<0?t:e.mapResult(this.from,1);if(n.deletedAcross&&t.deletedAcross)return null;return new bn(n.pos,Math.max(n.pos,t.pos),this.slice,this.structure)}merge(e){if(!(e instanceof bn)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?Se.empty:new Se(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new bn(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?Se.empty:new Se(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new bn(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};if(this.slice.size)e.slice=this.slice.toJSON();if(this.structure)e.structure=!0;return e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw RangeError("Invalid input for ReplaceStep.fromJSON");return new bn(t.from,t.to,Se.fromJSON(e,t.slice),!!t.structure)}};bn.MAP_BIAS=1;yr.jsonID("replace",bn);En=class En extends yr{constructor(e,t,n,a,i,l,c=!1){super();this.from=e,this.to=t,this.gapFrom=n,this.gapTo=a,this.slice=i,this.insert=l,this.structure=c}apply(e){if(this.structure&&(mR(e,this.from,this.gapFrom)||mR(e,this.gapTo,this.to)))return Kn.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return Kn.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);if(!n)return Kn.fail("Content does not fit in gap");return Kn.fromReplace(e,this.from,this.to,n)}getMap(){return new qo([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new En(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),a=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?n.pos:e.map(this.gapTo,1);if(t.deletedAcross&&n.deletedAcross||a<t.pos||i>n.pos)return null;return new En(t.pos,n.pos,a,i,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};if(this.slice.size)e.slice=this.slice.toJSON();if(this.structure)e.structure=!0;return e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new En(t.from,t.to,t.gapFrom,t.gapTo,Se.fromJSON(e,t.slice),t.insert,!!t.structure)}};yr.jsonID("replaceAround",En);Hp=class Hp extends yr{constructor(e,t,n){super();this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return Kn.fail("No node at attribute step's position");let n=Object.create(null);for(let i in t.attrs)n[i]=t.attrs[i];n[this.attr]=this.value;let a=t.type.create(n,null,t.marks);return Kn.fromReplace(e,this.pos,this.pos+1,new Se(ce.from(a),0,t.isLeaf?0:1))}getMap(){return qo.empty}invert(e){return new Hp(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Hp(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw RangeError("Invalid input for AttrStep.fromJSON");return new Hp(t.pos,t.attr,t.value)}};yr.jsonID("attr",Hp);Yg=class Yg extends yr{constructor(e,t){super();this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let a in e.attrs)t[a]=e.attrs[a];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return Kn.ok(n)}getMap(){return qo.empty}invert(e){return new Yg(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw RangeError("Invalid input for DocAttrStep.fromJSON");return new Yg(t.attr,t.value)}};yr.jsonID("docAttr",Yg);Up=class extends Error{};Up=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};Up.prototype=Object.create(Error.prototype);Up.prototype.constructor=Up;Up.prototype.name="TransformError"});var ni=N(()=>{Ac()});class Ue{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new Qg(e.min(t),e.max(t))]}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 t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=Se.empty){let n=t.content.lastChild,a=null;for(let c=0;c<t.openEnd;c++)a=n,n=n.lastChild;let i=e.steps.length,l=this.ranges;for(let c=0;c<l.length;c++){let{$from:u,$to:f}=l[c],h=e.mapping.slice(i);if(e.replaceRange(h.map(u.pos),h.map(f.pos),c?Se.empty:t),c==0)_B(e,i,(n?n.isInline:a&&a.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,a=this.ranges;for(let i=0;i<a.length;i++){let{$from:l,$to:c}=a[i],u=e.mapping.slice(n),f=u.map(l.pos),h=u.map(c.pos);if(i)e.deleteRange(f,h);else e.replaceRangeWith(f,h,t),_B(e,n,t.isInline?-1:1)}}static findFrom(e,t,n=!1){let a=e.parent.inlineContent?new Me(e):jp(e.node(0),e.parent,e.pos,e.index(),t,n);if(a)return a;for(let i=e.depth-1;i>=0;i--){let l=t<0?jp(e.node(0),e.node(i),e.before(i+1),e.index(i),t,n):jp(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,t,n);if(l)return l}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new vr(e.node(0))}static atStart(e){return jp(e,e,0,0,1)||new vr(e)}static atEnd(e){return jp(e,e,e.content.size,e.childCount,-1)||new vr(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError("Invalid input for Selection.fromJSON");let n=yR[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in yR)throw RangeError("Duplicate use of selection JSON ID "+e);return yR[e]=t,t.prototype.jsonID=e,t}getBookmark(){return Me.between(this.$anchor,this.$head).getBookmark()}}class Qg{constructor(e,t){this.$from=e,this.$to=t}}function LB(e){if(!PB&&!e.parent.inlineContent)PB=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")")}class u1{constructor(e,t){this.anchor=e,this.head=t}map(e){return new u1(e.map(this.anchor),e.map(this.head))}resolve(e){return Me.between(e.resolve(this.anchor),e.resolve(this.head))}}class xR{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new u1(n,n):new xR(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;if(n&&Pe.isSelectable(n))return new Pe(t);return Ue.near(t)}}function jp(e,t,n,a,i,l=!1){if(t.inlineContent)return Me.create(e,n);for(let c=a-(i>0?0:1);i>0?c<t.childCount:c>=0;c+=i){let u=t.child(c);if(!u.isAtom){let f=jp(e,u,n+i,i<0?u.childCount:0,i,l);if(f)return f}else if(!l&&Pe.isSelectable(u))return Pe.create(e,n-(i<0?u.nodeSize:0));n+=u.nodeSize*i}return null}function _B(e,t,n){let a=e.steps.length-1;if(a<t)return;let i=e.steps[a];if(!(i instanceof bn||i instanceof En))return;let l=e.mapping.maps[a],c;l.forEach((u,f,h,m)=>{if(c==null)c=m}),e.setSelection(Ue.near(e.doc.resolve(c),n))}function zB(e,t){return!t||!e?e:e.bind(t)}class Kp{constructor(e,t,n){this.name=e,this.init=zB(t.init,n),this.apply=zB(t.apply,n)}}class c1{constructor(e,t){if(this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=WZ.slice(),t)t.forEach((n)=>{if(this.pluginsByKey[n.key])throw RangeError("Adding different instances of a keyed plugin ("+n.key+")");if(this.plugins.push(n),this.pluginsByKey[n.key]=n,n.spec.state)this.fields.push(new Kp(n.key,n.spec.state,n))})}}class Mc{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,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let a=this.config.plugins[n];if(a.spec.filterTransaction&&!a.spec.filterTransaction.call(a,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),a=null;for(;;){let i=!1;for(let l=0;l<this.config.plugins.length;l++){let c=this.config.plugins[l];if(c.spec.appendTransaction){let u=a?a[l].n:0,f=a?a[l].state:this,h=u<t.length&&c.spec.appendTransaction.call(c,u?t.slice(u):t,f,n);if(h&&n.filterTransaction(h,l)){if(h.setMeta("appendedTransaction",e),!a){a=[];for(let m=0;m<this.config.plugins.length;m++)a.push(m<l?{state:n,n:t.length}:{state:this,n:0})}t.push(h),n=n.applyInner(h),i=!0}if(a)a[l]={state:n,n:t.length}}}if(!i)return{state:n,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw RangeError("Applying a mismatched transaction");let t=new Mc(this.config),n=this.config.fields;for(let a=0;a<n.length;a++){let i=n[a];t[i.name]=i.apply(e,this[i.name],this,t)}return t}get tr(){return new HB(this)}static create(e){let t=new c1(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new Mc(t);for(let a=0;a<t.fields.length;a++)n[t.fields[a].name]=t.fields[a].init(e,n);return n}reconfigure(e){let t=new c1(this.schema,e.plugins),n=t.fields,a=new Mc(t);for(let i=0;i<n.length;i++){let l=n[i].name;a[l]=this.hasOwnProperty(l)?this[l]:n[i].init(e,a)}return a}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks)t.storedMarks=this.storedMarks.map((n)=>n.toJSON());if(e&&typeof e=="object")for(let n in e){if(n=="doc"||n=="selection")throw RangeError("The JSON fields `doc` and `selection` are reserved");let a=e[n],i=a.spec.state;if(i&&i.toJSON)t[n]=i.toJSON.call(a,this[a.key])}return t}static fromJSON(e,t,n){if(!t)throw RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw RangeError("Required config field 'schema' missing");let a=new c1(e.schema,e.plugins),i=new Mc(a);return a.fields.forEach((l)=>{if(l.name=="doc")i.doc=Mr.fromJSON(e.schema,t.doc);else if(l.name=="selection")i.selection=Ue.fromJSON(i.doc,t.selection);else if(l.name=="storedMarks"){if(t.storedMarks)i.storedMarks=t.storedMarks.map(e.schema.markFromJSON)}else{if(n)for(let c in n){let u=n[c],f=u.spec.state;if(u.key==l.name&&f&&f.fromJSON&&Object.prototype.hasOwnProperty.call(t,c)){i[l.name]=f.fromJSON.call(u,e,t[c],i);return}}i[l.name]=l.init(e,i)}}),i}}function FB(e,t,n){for(let a in e){let i=e[a];if(i instanceof Function)i=i.bind(t);else if(a=="handleDOMEvents")i=FB(i,t,{});n[a]=i}return n}class qe{constructor(e){if(this.spec=e,this.props={},e.props)FB(e.props,this,this.props);this.key=e.key?e.key.key:UB("plugin")}getState(e){return e[this.key]}}function UB(e){if(e in vR)return e+"$"+ ++vR[e];return vR[e]=0,e+"$"}class Qe{constructor(e="key"){this.key=UB(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}var yR,PB=!1,Me,Pe,vr,GZ,IB=1,l1=2,BB=4,HB,WZ,vR;var Xs=N(()=>{Ys();Ac();yR=Object.create(null);Ue.prototype.visible=!0;Me=class Me extends Ue{constructor(e,t=e){LB(e),LB(t);super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return Ue.near(n);let a=e.resolve(t.map(this.anchor));return new Me(a.parent.inlineContent?a:n,n)}replace(e,t=Se.empty){if(super.replace(e,t),t==Se.empty){let n=this.$from.marksAcross(this.$to);if(n)e.ensureMarks(n)}}eq(e){return e instanceof Me&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new u1(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw RangeError("Invalid input for TextSelection.fromJSON");return new Me(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let a=e.resolve(t);return new this(a,n==t?a:e.resolve(n))}static between(e,t,n){let a=e.pos-t.pos;if(!n||a)n=a>=0?1:-1;if(!t.parent.inlineContent){let i=Ue.findFrom(t,n,!0)||Ue.findFrom(t,-n,!0);if(i)t=i.$head;else return Ue.near(t,n)}if(!e.parent.inlineContent){if(a==0)e=t;else if(e=(Ue.findFrom(e,-n,!0)||Ue.findFrom(e,n,!0)).$anchor,e.pos<t.pos!=a<0)e=t}return new Me(e,t)}};Ue.jsonID("text",Me);Pe=class Pe extends Ue{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n);this.node=t}map(e,t){let{deleted:n,pos:a}=t.mapResult(this.anchor),i=e.resolve(a);if(n)return Ue.near(i);return new Pe(i)}content(){return new Se(ce.from(this.node),0,0)}eq(e){return e instanceof Pe&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new xR(this.anchor)}static fromJSON(e,t){if(typeof t.anchor!="number")throw RangeError("Invalid input for NodeSelection.fromJSON");return new Pe(e.resolve(t.anchor))}static create(e,t){return new Pe(e.resolve(t))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}};Pe.prototype.visible=!1;Ue.jsonID("node",Pe);vr=class vr extends Ue{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=Se.empty){if(t==Se.empty){e.delete(0,e.doc.content.size);let n=Ue.atStart(e.doc);if(!n.eq(e.selection))e.setSelection(n)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new vr(e)}map(e){return new vr(e)}eq(e){return e instanceof vr}getBookmark(){return GZ}};Ue.jsonID("all",vr);GZ={map(){return this},resolve(e){return new vr(e)}};HB=class HB extends Xg{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(){if(this.curSelectionFor<this.steps.length)this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length;return this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|IB)&~l1,this.storedMarks=null,this}get selectionSet(){return(this.updated&IB)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=l1,this}ensureMarks(e){if(!Pt.sameSet(this.storedMarks||this.selection.$from.marks(),e))this.setStoredMarks(e);return 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&l1)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~l1,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;if(t)e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||Pt.none));return n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let a=this.doc.type.schema;if(t==null){if(!e)return this.deleteSelection();return this.replaceSelectionWith(a.text(e),!0)}else{if(n==null)n=t;if(!e)return this.deleteRange(t,n);let i=this.storedMarks;if(!i){let l=this.doc.resolve(t);i=n==t?l.marks():l.marksAcross(this.doc.resolve(n))}if(this.replaceRangeWith(t,n,a.text(e,i)),!this.selection.empty&&this.selection.to==t+e.length)this.setSelection(Ue.near(this.selection.$to));return this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,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|=BB,this}get scrolledIntoView(){return(this.updated&BB)>0}};WZ=[new Kp("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new Kp("selection",{init(e,t){return e.selection||Ue.atStart(t.doc)},apply(e){return e.selection}}),new Kp("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,a){return a.selection.$cursor?e.storedMarks:null}}),new Kp("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];vR=Object.create(null)});function KB(e,t){let{$cursor:n}=e.selection;if(!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0))return null;return n}function WB(e,t,n){let a=t.nodeBefore,i=a,l=t.pos-1;for(;!i.isTextblock;l--){if(i.type.spec.isolating)return!1;let m=i.lastChild;if(!m)return!1;i=m}let c=t.nodeAfter,u=c,f=t.pos+1;for(;!u.isTextblock;f++){if(u.type.spec.isolating)return!1;let m=u.firstChild;if(!m)return!1;u=m}let h=Jg(e.doc,l,f,Se.empty);if(!h||h.from!=l||h instanceof bn&&h.slice.size>=f-l)return!1;if(n){let m=e.tr.step(h);m.setSelection(Me.create(m.doc,l)),n(m.scrollIntoView())}return!0}function qp(e,t,n=!1){for(let a=e;a;a=t=="start"?a.firstChild:a.lastChild){if(a.isTextblock)return!0;if(n&&a.childCount!=1)return!1}return!1}function CR(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function YB(e,t){let{$cursor:n}=e.selection;if(!n||(t?!t.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size))return null;return n}function RR(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}function AR(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function YZ(e){return(t,n)=>{let{$from:a,$to:i}=t.selection;if(t.selection instanceof Pe&&t.selection.node.isBlock){if(!a.parentOffset||!Go(t.doc,a.pos))return!1;if(n)n(t.tr.split(a.pos).scrollIntoView());return!0}if(!a.depth)return!1;let l=[],c,u,f=!1,h=!1;for(let v=a.depth;;v--)if(a.node(v).isBlock){f=a.end(v)==a.pos+(a.depth-v),h=a.start(v)==a.pos-(a.depth-v),u=AR(a.node(v-1).contentMatchAt(a.indexAfter(v-1)));let C=e&&e(i.parent,f,a);l.unshift(C||(f&&u?{type:u}:null)),c=v;break}else{if(v==1)return!1;l.unshift(null)}let m=t.tr;if(t.selection instanceof Me||t.selection instanceof vr)m.deleteSelection();let b=m.mapping.map(a.pos),y=Go(m.doc,b,l.length,l);if(!y)l[0]=u?{type:u}:null,y=Go(m.doc,b,l.length,l);if(!y)return!1;if(m.split(b,l.length,l),!f&&h&&a.node(c).type!=u){let v=m.mapping.map(a.before(c)),S=m.doc.resolve(v);if(u&&a.node(c-1).canReplaceWith(S.index(),S.index()+1,u))m.setNodeMarkup(m.mapping.map(a.before(c)),u)}if(n)n(m.scrollIntoView());return!0}}function QZ(e,t,n){let{nodeBefore:a,nodeAfter:i}=t,l=t.index();if(!a||!i||!a.type.compatibleContent(i.type))return!1;if(!a.content.size&&t.parent.canReplace(l-1,l)){if(n)n(e.tr.delete(t.pos-a.nodeSize,t.pos).scrollIntoView());return!0}if(!t.parent.canReplace(l,l+1)||!(i.isTextblock||$a(e.doc,t.pos)))return!1;if(n)n(e.tr.join(t.pos).scrollIntoView());return!0}function ez(e,t,n,a){let{nodeBefore:i,nodeAfter:l}=t,c,u,f=i.type.spec.isolating||l.type.spec.isolating;if(!f&&QZ(e,t,n))return!0;let h=!f&&t.parent.canReplace(t.index(),t.index()+1);if(h&&(c=(u=i.contentMatchAt(i.childCount)).findWrapping(l.type))&&u.matchType(c[0]||l.type).validEnd){if(n){let v=t.pos+l.nodeSize,S=ce.empty;for(let R=c.length-1;R>=0;R--)S=ce.from(c[R].create(null,S));S=ce.from(i.copy(S));let C=e.tr.step(new En(t.pos-1,v,t.pos,v,new Se(S,1,0),c.length,!0)),E=C.doc.resolve(v+2*c.length);if(E.nodeAfter&&E.nodeAfter.type==i.type&&$a(C.doc,E.pos))C.join(E.pos);n(C.scrollIntoView())}return!0}let m=l.type.spec.isolating||a>0&&f?null:Ue.findFrom(t,1),b=m&&m.$from.blockRange(m.$to),y=b&&Js(b);if(y!=null&&y>=t.depth){if(n)n(e.tr.lift(b,y).scrollIntoView());return!0}if(h&&qp(l,"start",!0)&&qp(i,"end")){let v=i,S=[];for(;;){if(S.push(v),v.isTextblock)break;v=v.lastChild}let C=l,E=1;for(;!C.isTextblock;C=C.firstChild)E++;if(v.canReplace(v.childCount,v.childCount,C.content)){if(n){let R=ce.empty;for(let U=S.length-1;U>=0;U--)R=ce.from(S[U].copy(R));let D=e.tr.step(new En(t.pos-S.length,t.pos+l.nodeSize,t.pos+E,t.pos+l.nodeSize-E,new Se(R,S.length,0),0,!0));n(D.scrollIntoView())}return!0}}return!1}function tz(e){return function(t,n){let a=t.selection,i=e<0?a.$from:a.$to,l=i.depth;while(i.node(l).isInline){if(!l)return!1;l--}if(!i.node(l).isTextblock)return!1;if(n)n(t.tr.setSelection(Me.create(t.doc,e<0?i.start(l):i.end(l))));return!0}}function nz(e,t=null){return function(n,a){let{$from:i,$to:l}=n.selection,c=i.blockRange(l),u=c&&Vp(c,e,t);if(!u)return!1;if(a)a(n.tr.wrap(c,u).scrollIntoView());return!0}}function LR(e,t=null){return function(n,a){let i=!1;for(let l=0;l<n.selection.ranges.length&&!i;l++){let{$from:{pos:c},$to:{pos:u}}=n.selection.ranges[l];n.doc.nodesBetween(c,u,(f,h)=>{if(i)return!1;if(!f.isTextblock||f.hasMarkup(e,t))return;if(f.type==e)i=!0;else{let m=n.doc.resolve(h),b=m.index();i=m.parent.canReplaceWith(b,b+1,e)}})}if(!i)return!1;if(a){let l=n.tr;for(let c=0;c<n.selection.ranges.length;c++){let{$from:{pos:u},$to:{pos:f}}=n.selection.ranges[c];l.setBlockType(u,f,e,t)}a(l.scrollIntoView())}return!0}}function _R(...e){return function(t,n,a){for(let i=0;i<e.length;i++)if(e[i](t,n,a))return!0;return!1}}var jB=(e,t)=>{if(e.selection.empty)return!1;if(t)t(e.tr.deleteSelection().scrollIntoView());return!0},SR=(e,t,n)=>{let a=KB(e,n);if(!a)return!1;let i=CR(a);if(!i){let c=a.blockRange(),u=c&&Js(c);if(u==null)return!1;if(t)t(e.tr.lift(c,u).scrollIntoView());return!0}let l=i.nodeBefore;if(ez(e,i,t,-1))return!0;if(a.parent.content.size==0&&(qp(l,"end")||Pe.isSelectable(l)))for(let c=a.depth;;c--){let u=Jg(e.doc,a.before(c),a.after(c),Se.empty);if(u&&u.slice.size<u.to-u.from){if(t){let f=e.tr.step(u);f.setSelection(qp(l,"end")?Ue.findFrom(f.doc.resolve(f.mapping.map(i.pos,-1)),-1):Pe.create(f.doc,i.pos-l.nodeSize)),t(f.scrollIntoView())}return!0}if(c==1||a.node(c-1).childCount>1)break}if(l.isAtom&&i.depth==a.depth-1){if(t)t(e.tr.delete(i.pos-l.nodeSize,i.pos).scrollIntoView());return!0}return!1},qB=(e,t,n)=>{let a=KB(e,n);if(!a)return!1;let i=CR(a);return i?WB(e,i,t):!1},GB=(e,t,n)=>{let a=YB(e,n);if(!a)return!1;let i=RR(a);return i?WB(e,i,t):!1},wR=(e,t,n)=>{let{$head:a,empty:i}=e.selection,l=a;if(!i)return!1;if(a.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):a.parentOffset>0)return!1;l=CR(a)}let c=l&&l.nodeBefore;if(!c||!Pe.isSelectable(c))return!1;if(t)t(e.tr.setSelection(Pe.create(e.doc,l.pos-c.nodeSize)).scrollIntoView());return!0},ER=(e,t,n)=>{let a=YB(e,n);if(!a)return!1;let i=RR(a);if(!i)return!1;let l=i.nodeAfter;if(ez(e,i,t,1))return!0;if(a.parent.content.size==0&&(qp(l,"start")||Pe.isSelectable(l))){let c=Jg(e.doc,a.before(),a.after(),Se.empty);if(c&&c.slice.size<c.to-c.from){if(t){let u=e.tr.step(c);u.setSelection(qp(l,"start")?Ue.findFrom(u.doc.resolve(u.mapping.map(i.pos)),1):Pe.create(u.doc,u.mapping.map(i.pos))),t(u.scrollIntoView())}return!0}}if(l.isAtom&&i.depth==a.depth-1){if(t)t(e.tr.delete(i.pos,i.pos+l.nodeSize).scrollIntoView());return!0}return!1},TR=(e,t,n)=>{let{$head:a,empty:i}=e.selection,l=a;if(!i)return!1;if(a.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):a.parentOffset<a.parent.content.size)return!1;l=RR(a)}let c=l&&l.nodeAfter;if(!c||!Pe.isSelectable(c))return!1;if(t)t(e.tr.setSelection(Pe.create(e.doc,l.pos)).scrollIntoView());return!0},JB=(e,t)=>{let n=e.selection,a=n instanceof Pe,i;if(a){if(n.node.isTextblock||!$a(e.doc,n.from))return!1;i=n.from}else if(i=Ed(e.doc,n.from,-1),i==null)return!1;if(t){let l=e.tr.join(i);if(a)l.setSelection(Pe.create(l.doc,i-e.doc.resolve(i).nodeBefore.nodeSize));t(l.scrollIntoView())}return!0},XB=(e,t)=>{let n=e.selection,a;if(n instanceof Pe){if(n.node.isTextblock||!$a(e.doc,n.to))return!1;a=n.to}else if(a=Ed(e.doc,n.to,1),a==null)return!1;if(t)t(e.tr.join(a).scrollIntoView());return!0},QB=(e,t)=>{let{$from:n,$to:a}=e.selection,i=n.blockRange(a),l=i&&Js(i);if(l==null)return!1;if(t)t(e.tr.lift(i,l).scrollIntoView());return!0},kR=(e,t)=>{let{$head:n,$anchor:a}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(a))return!1;if(t)t(e.tr.insertText(`
256
+ `).scrollIntoView());return!0},MR=(e,t)=>{let{$head:n,$anchor:a}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(a))return!1;let i=n.node(-1),l=n.indexAfter(-1),c=AR(i.contentMatchAt(l));if(!c||!i.canReplaceWith(l,l,c))return!1;if(t){let u=n.after(),f=e.tr.replaceWith(u,u,c.createAndFill());f.setSelection(Ue.near(f.doc.resolve(u),1)),t(f.scrollIntoView())}return!0},NR=(e,t)=>{let n=e.selection,{$from:a,$to:i}=n;if(n instanceof vr||a.parent.inlineContent||i.parent.inlineContent)return!1;let l=AR(i.parent.contentMatchAt(i.indexAfter()));if(!l||!l.isTextblock)return!1;if(t){let c=(!a.parentOffset&&i.index()<i.parent.childCount?a:i).pos,u=e.tr.insert(c,l.createAndFill());u.setSelection(Me.create(u.doc,c+1)),t(u.scrollIntoView())}return!0},OR=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let l=n.before();if(Go(e.doc,l)){if(t)t(e.tr.split(l).scrollIntoView());return!0}}let a=n.blockRange(),i=a&&Js(a);if(i==null)return!1;if(t)t(e.tr.lift(a,i).scrollIntoView());return!0},JZ,ZB=(e,t)=>{let{$from:n,to:a}=e.selection,i,l=n.sharedDepth(a);if(l==0)return!1;if(i=n.before(l),t)t(e.tr.setSelection(Pe.create(e.doc,i)));return!0},XZ=(e,t)=>{if(t)t(e.tr.setSelection(new vr(e.doc)));return!0},DR,PR,$R,VB,Nc,ZZ,o4e;var rz=N(()=>{Ac();Ys();Xs();JZ=YZ();DR=tz(-1),PR=tz(1);$R=_R(jB,SR,wR),VB=_R(jB,ER,TR),Nc={Enter:_R(kR,NR,OR,JZ),"Mod-Enter":MR,Backspace:$R,"Mod-Backspace":$R,"Shift-Backspace":$R,Delete:VB,"Mod-Delete":VB,"Mod-a":XZ},ZZ={"Ctrl-h":Nc.Backspace,"Alt-Backspace":Nc["Mod-Backspace"],"Ctrl-d":Nc.Delete,"Ctrl-Alt-Backspace":Nc["Mod-Delete"],"Alt-Delete":Nc["Mod-Delete"],"Alt-d":Nc["Mod-Delete"],"Ctrl-a":DR,"Ctrl-e":PR};for(let e in Nc)ZZ[e]=Nc[e];o4e=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1});var Nr=N(()=>{rz()});var at=N(()=>{Xs()});var Sa=N(()=>{Ys()});function oz(e,t=null){return function(n,a){let{$from:i,$to:l}=n.selection,c=i.blockRange(l);if(!c)return!1;let u=a?n.tr:null;if(!eee(u,c,e,t))return!1;if(a)a(u.scrollIntoView());return!0}}function eee(e,t,n,a=null){let i=!1,l=t,c=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let f=c.resolve(t.start-2);if(l=new zp(f,f,t.depth),t.endIndex<t.parent.childCount)t=new zp(t.$from,c.resolve(t.$to.end(t.depth)),t.depth);i=!0}let u=Vp(l,n,a,t);if(!u)return!1;if(e)tee(e,t,u,i,n);return!0}function tee(e,t,n,a,i){let l=ce.empty;for(let m=n.length-1;m>=0;m--)l=ce.from(n[m].type.create(n[m].attrs,l));e.step(new En(t.start-(a?2:0),t.end,t.start,t.end,new Se(l,0,0),n.length,!0));let c=0;for(let m=0;m<n.length;m++)if(n[m].type==i)c=m+1;let u=n.length-c,f=t.start+n.length-(a?2:0),h=t.parent;for(let{startIndex:m,endIndex:b}=t,y=!0;m<b;m++,y=!1){if(!y&&Go(e.doc,f,u))e.split(f,u),f+=2*u;f+=h.child(m).nodeSize}return e}function az(e){return function(t,n){let{$from:a,$to:i}=t.selection,l=a.blockRange(i,(c)=>c.childCount>0&&c.firstChild.type==e);if(!l)return!1;if(!n)return!0;if(a.node(l.depth-1).type==e)return nee(t,n,e,l);else return ree(t,n,l)}}function nee(e,t,n,a){let i=e.tr,l=a.end,c=a.$to.end(a.depth);if(l<c)i.step(new En(l-1,c,l,c,new Se(ce.from(n.create(null,a.parent.copy())),1,0),1,!0)),a=new zp(i.doc.resolve(a.$from.pos),i.doc.resolve(c),a.depth);let u=Js(a);if(u==null)return!1;i.lift(a,u);let f=i.doc.resolve(i.mapping.map(l,-1)-1);if($a(i.doc,f.pos)&&f.nodeBefore.type==f.nodeAfter.type)i.join(f.pos);return t(i.scrollIntoView()),!0}function ree(e,t,n){let a=e.tr,i=n.parent;for(let v=n.end,S=n.endIndex-1,C=n.startIndex;S>C;S--)v-=i.child(S).nodeSize,a.delete(v-1,v+1);let l=a.doc.resolve(n.start),c=l.nodeAfter;if(a.mapping.map(n.end)!=n.start+l.nodeAfter.nodeSize)return!1;let u=n.startIndex==0,f=n.endIndex==i.childCount,h=l.node(-1),m=l.index(-1);if(!h.canReplace(m+(u?0:1),m+1,c.content.append(f?ce.empty:ce.from(i))))return!1;let b=l.pos,y=b+c.nodeSize;return a.step(new En(b-(u?1:0),y+(f?1:0),b+1,y-1,new Se((u?ce.empty:ce.from(i.copy(ce.empty))).append(f?ce.empty:ce.from(i.copy(ce.empty))),u?0:1,f?0:1),u?0:1)),t(a.scrollIntoView()),!0}function iz(e){return function(t,n){let{$from:a,$to:i}=t.selection,l=a.blockRange(i,(h)=>h.childCount>0&&h.firstChild.type==e);if(!l)return!1;let c=l.startIndex;if(c==0)return!1;let u=l.parent,f=u.child(c-1);if(f.type!=e)return!1;if(n){let h=f.lastChild&&f.lastChild.type==u.type,m=ce.from(h?e.create():null),b=new Se(ce.from(e.create(null,ce.from(u.type.create(null,m)))),h?3:1,0),y=l.start,v=l.end;n(t.tr.step(new En(y-(h?3:1),v,y,v,b,1,!0)).scrollIntoView())}return!0}}var sz=N(()=>{Ac();Ys()});var d1=N(()=>{sz()});function lz(e,t,n,a,i){var l;for(;;){if(e==n&&t==a)return!0;if(t==(i<0?0:Ca(e))){let c=e.parentNode;if(!c||c.nodeType!=1||ab(e)||aee.test(e.nodeName)||e.contentEditable=="false")return!1;t=xr(e)+(i<0?0:1),e=c}else if(e.nodeType==1){let c=e.childNodes[t+(i<0?-1:0)];if(c.nodeType==1&&c.contentEditable=="false")if((l=c.pmViewDesc)===null||l===void 0?void 0:l.ignoreForSelection)t+=i;else return!1;else e=c,t=i<0?Ca(e):0}else return!1}}function Ca(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function iee(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=Ca(e)}else if(e.parentNode&&!ab(e))t=xr(e),e=e.parentNode;else return null}}function see(e,t){for(;;){if(e.nodeType==3&&t<e.nodeValue.length)return e;if(e.nodeType==1&&t<e.childNodes.length){if(e.contentEditable=="false")return null;e=e.childNodes[t],t=0}else if(e.parentNode&&!ab(e))t=xr(e)+1,e=e.parentNode;else return null}}function lee(e,t,n){for(let a=t==0,i=t==Ca(e);a||i;){if(e==n)return!0;let l=xr(e);if(e=e.parentNode,!e)return!1;a=a&&l==0,i=i&&l==Ca(e)}}function ab(e){let t;for(let n=e;n;n=n.parentNode)if(t=n.pmViewDesc)break;return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}function Td(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function cee(e){let t=e.activeElement;while(t&&t.shadowRoot)t=t.shadowRoot.activeElement;return t}function uee(e,t,n){if(e.caretPositionFromPoint)try{let a=e.caretPositionFromPoint(t,n);if(a)return{node:a.offsetNode,offset:Math.min(Ca(a.offsetNode),a.offset)}}catch(a){}if(e.caretRangeFromPoint){let a=e.caretRangeFromPoint(t,n);if(a)return{node:a.startContainer,offset:Math.min(Ca(a.startContainer),a.startOffset)}}}function fee(e){let t=e.defaultView&&e.defaultView.visualViewport;if(t)return{left:0,right:t.width,top:0,bottom:t.height};return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Qs(e,t){return typeof e=="number"?e:e[t]}function pee(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,a=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*a}}function uz(e,t,n){if(!qR(t)&&t.left==0)return;let a=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,l=e.dom.ownerDocument;for(let c=n||e.dom;;){if(!c)break;if(c.nodeType!=1){c=Jp(c);continue}let u=c,f=u==l.body,h=f?fee(l):pee(u),m=0,b=0;if(t.top<h.top+Qs(a,"top"))b=-(h.top-t.top+Qs(i,"top"));else if(t.bottom>h.bottom-Qs(a,"bottom"))b=t.bottom-t.top>h.bottom-h.top?t.top+Qs(i,"top")-h.top:t.bottom-h.bottom+Qs(i,"bottom");if(t.left<h.left+Qs(a,"left"))m=-(h.left-t.left+Qs(i,"left"));else if(t.right>h.right-Qs(a,"right"))m=t.right-h.right+Qs(i,"right");if(m||b)if(f)l.defaultView.scrollBy(m,b);else{let{scrollLeft:v,scrollTop:S}=u;if(b)u.scrollTop+=b;if(m)u.scrollLeft+=m;let C=u.scrollLeft-v,E=u.scrollTop-S;t={left:t.left-C,top:t.top-E,right:t.right-C,bottom:t.bottom-E}}let y=f?"fixed":getComputedStyle(c).position;if(/^(fixed|sticky)$/.test(y))break;c=y=="absolute"?c.offsetParent:Jp(c)}}function hee(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),a,i;for(let l=(t.left+t.right)/2,c=n+1;c<Math.min(innerHeight,t.bottom);c+=5){let u=e.root.elementFromPoint(l,c);if(!u||u==e.dom||!e.dom.contains(u))continue;let f=u.getBoundingClientRect();if(f.top>=n-20){a=u,i=f.top;break}}return{refDOM:a,refTop:i,stack:Fz(e.dom)}}function Fz(e){let t=[],n=e.ownerDocument;for(let a=e;a;a=Jp(a))if(t.push({dom:a,top:a.scrollTop,left:a.scrollLeft}),e==n)break;return t}function mee({refDOM:e,refTop:t,stack:n}){let a=e?e.getBoundingClientRect().top:0;Uz(n,a==0?0:a-t)}function Uz(e,t){for(let n=0;n<e.length;n++){let{dom:a,top:i,left:l}=e[n];if(a.scrollTop!=i+t)a.scrollTop=i+t;if(a.scrollLeft!=l)a.scrollLeft=l}}function gee(e){if(e.setActive)return e.setActive();if(Gp)return e.focus(Gp);let t=Fz(e);if(e.focus(Gp==null?{get preventScroll(){return Gp={preventScroll:!0},!0}}:void 0),!Gp)Gp=!1,Uz(t,0)}function Vz(e,t){let n,a=200000000,i,l=0,c=t.top,u=t.top,f,h;for(let m=e.firstChild,b=0;m;m=m.nextSibling,b++){let y;if(m.nodeType==1)y=m.getClientRects();else if(m.nodeType==3)y=Zs(m).getClientRects();else continue;for(let v=0;v<y.length;v++){let S=y[v];if(S.top<=c&&S.bottom>=u){c=Math.max(S.bottom,c),u=Math.min(S.top,u);let C=S.left>t.left?S.left-t.left:S.right<t.left?t.left-S.right:0;if(C<a){if(n=m,a=C,i=C&&n.nodeType==3?{left:S.right<t.left?S.right:S.left,top:t.top}:t,m.nodeType==1&&C)l=b+(t.left>=(S.left+S.right)/2?1:0);continue}}else if(S.top>t.top&&!f&&S.left<=t.left&&S.right>=t.left)f=m,h={left:Math.max(S.left,Math.min(S.right,t.left)),top:S.top};if(!n&&(t.left>=S.right&&t.top>=S.top||t.left>=S.left&&t.top>=S.bottom))l=b+1}}if(!n&&f)n=f,i=h,a=0;if(n&&n.nodeType==3)return bee(n,i);if(!n||a&&n.nodeType==1)return{node:e,offset:l};return Vz(n,i)}function bee(e,t){let n=e.nodeValue.length,a=document.createRange(),i;for(let l=0;l<n;l++){a.setEnd(e,l+1),a.setStart(e,l);let c=Oc(a,1);if(c.top==c.bottom)continue;if(ZR(t,c)){i={node:e,offset:l+(t.left>=(c.left+c.right)/2?1:0)};break}}return a.detach(),i||{node:e,offset:0}}function ZR(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function yee(e,t){let n=e.parentNode;if(n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left)return n;return e}function vee(e,t,n){let{node:a,offset:i}=Vz(t,n),l=-1;if(a.nodeType==1&&!a.firstChild){let c=a.getBoundingClientRect();l=c.left!=c.right&&n.left>(c.left+c.right)/2?1:-1}return e.docView.posFromDOM(a,i,l)}function xee(e,t,n,a){let i=-1;for(let l=t,c=!1;;){if(l==e.dom)break;let u=e.docView.nearestDesc(l,!0),f;if(!u)return null;if(u.dom.nodeType==1&&(u.node.isBlock&&u.parent||!u.contentDOM)&&((f=u.dom.getBoundingClientRect()).width||f.height)){if(u.node.isBlock&&u.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(u.dom.nodeName)){if(!c&&f.left>a.left||f.top>a.top)i=u.posBefore;else if(!c&&f.right<a.left||f.bottom<a.top)i=u.posAfter;c=!0}if(!u.contentDOM&&i<0&&!u.node.isText)return(u.node.isBlock?a.top<(f.top+f.bottom)/2:a.left<(f.left+f.right)/2)?u.posBefore:u.posAfter}l=u.dom.parentNode}return i>-1?i:e.docView.posFromDOM(t,n,-1)}function jz(e,t,n){let a=e.childNodes.length;if(a&&n.top<n.bottom)for(let i=Math.max(0,Math.min(a-1,Math.floor(a*(t.top-n.top)/(n.bottom-n.top))-2)),l=i;;){let c=e.childNodes[l];if(c.nodeType==1){let u=c.getClientRects();for(let f=0;f<u.length;f++){let h=u[f];if(ZR(t,h))return jz(c,t,h)}}if((l=(l+1)%a)==i)break}return e}function $ee(e,t){let n=e.dom.ownerDocument,a,i=0,l=uee(n,t.left,t.top);if(l)({node:a,offset:i}=l);let c=(e.root.elementFromPoint?e.root:n).elementFromPoint(t.left,t.top),u;if(!c||!e.dom.contains(c.nodeType!=1?c.parentNode:c)){let h=e.dom.getBoundingClientRect();if(!ZR(t,h))return null;if(c=jz(e.dom,t,h),!c)return null}if(Dr){for(let h=c;a&&h;h=Jp(h))if(h.draggable)a=void 0}if(c=yee(c,t),a){if(Ea&&a.nodeType==1){if(i=Math.min(i,a.childNodes.length),i<a.childNodes.length){let m=a.childNodes[i],b;if(m.nodeName=="IMG"&&(b=m.getBoundingClientRect()).right<=t.left&&b.bottom>t.top)i++}}let h;if(ib&&i&&a.nodeType==1&&(h=a.childNodes[i-1]).nodeType==1&&h.contentEditable=="false"&&h.getBoundingClientRect().top>=t.top)i--;if(a==e.dom&&i==a.childNodes.length-1&&a.lastChild.nodeType==1&&t.top>a.lastChild.getBoundingClientRect().bottom)u=e.state.doc.content.size;else if(i==0||a.nodeType!=1||a.childNodes[i-1].nodeName!="BR")u=xee(e,a,i,t)}if(u==null)u=vee(e,c,t);let f=e.docView.nearestDesc(c,!0);return{pos:u,inside:f?f.posAtStart-f.border:-1}}function qR(e){return e.top<e.bottom||e.left<e.right}function Oc(e,t){let n=e.getClientRects();if(n.length){let a=n[t<0?0:n.length-1];if(qR(a))return a}return Array.prototype.find.call(n,qR)||e.getBoundingClientRect()}function Kz(e,t,n){let{node:a,offset:i,atom:l}=e.docView.domFromPos(t,n<0?-1:1),c=ib||Ea;if(a.nodeType==3)if(c&&(See.test(a.nodeValue)||(n<0?!i:i==a.nodeValue.length))){let f=Oc(Zs(a,i,i),n);if(Ea&&i&&/\s/.test(a.nodeValue[i-1])&&i<a.nodeValue.length){let h=Oc(Zs(a,i-1,i-1),-1);if(h.top==f.top){let m=Oc(Zs(a,i,i+1),-1);if(m.top!=f.top)return Zg(m,m.left<h.left)}}return f}else{let f=i,h=i,m=n<0?1:-1;if(n<0&&!i)h++,m=-1;else if(n>=0&&i==a.nodeValue.length)f--,m=1;else if(n<0)f--;else h++;return Zg(Oc(Zs(a,f,h),m),m<0)}if(!e.state.doc.resolve(t-(l||0)).parent.inlineContent){if(l==null&&i&&(n<0||i==Ca(a))){let f=a.childNodes[i-1];if(f.nodeType==1)return IR(f.getBoundingClientRect(),!1)}if(l==null&&i<Ca(a)){let f=a.childNodes[i];if(f.nodeType==1)return IR(f.getBoundingClientRect(),!0)}return IR(a.getBoundingClientRect(),n>=0)}if(l==null&&i&&(n<0||i==Ca(a))){let f=a.childNodes[i-1],h=f.nodeType==3?Zs(f,Ca(f)-(c?0:1)):f.nodeType==1&&(f.nodeName!="BR"||!f.nextSibling)?f:null;if(h)return Zg(Oc(h,1),!1)}if(l==null&&i<Ca(a)){let f=a.childNodes[i];while(f.pmViewDesc&&f.pmViewDesc.ignoreForCoords)f=f.nextSibling;let h=!f?null:f.nodeType==3?Zs(f,0,c?0:1):f.nodeType==1?f:null;if(h)return Zg(Oc(h,-1),!0)}return Zg(Oc(a.nodeType==3?Zs(a):a,-n),n>=0)}function Zg(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function IR(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function qz(e,t,n){let a=e.state,i=e.root.activeElement;if(a!=t)e.updateState(t);if(i!=e.dom)e.focus();try{return n()}finally{if(a!=t)e.updateState(a);if(i!=e.dom&&i)i.focus()}}function wee(e,t,n){let a=t.selection,i=n=="up"?a.$from:a.$to;return qz(e,t,()=>{let{node:l}=e.docView.domFromPos(i.pos,n=="up"?-1:1);for(;;){let u=e.docView.nearestDesc(l,!0);if(!u)break;if(u.node.isBlock){l=u.contentDOM||u.dom;break}l=u.dom.parentNode}let c=Kz(e,i.pos,1);for(let u=l.firstChild;u;u=u.nextSibling){let f;if(u.nodeType==1)f=u.getClientRects();else if(u.nodeType==3)f=Zs(u,0,u.nodeValue.length).getClientRects();else continue;for(let h=0;h<f.length;h++){let m=f[h];if(m.bottom>m.top+1&&(n=="up"?c.top-m.top>(m.bottom-c.top)*2:m.bottom-c.bottom>(c.bottom-m.top)*2))return!1}}return!0})}function Eee(e,t,n){let{$head:a}=t.selection;if(!a.parent.isTextblock)return!1;let i=a.parentOffset,l=!i,c=i==a.parent.content.size,u=e.domSelection();if(!u)return a.pos==a.start()||a.pos==a.end();if(!Cee.test(a.parent.textContent)||!u.modify)return n=="left"||n=="backward"?l:c;return qz(e,t,()=>{let{focusNode:f,focusOffset:h,anchorNode:m,anchorOffset:b}=e.domSelectionRange(),y=u.caretBidiLevel;u.modify("move",n,"character");let v=a.depth?e.docView.domAfterPos(a.before()):e.dom,{focusNode:S,focusOffset:C}=e.domSelectionRange(),E=S&&!v.contains(S.nodeType==1?S:S.parentNode)||f==S&&h==C;try{if(u.collapse(m,b),f&&(f!=m||h!=b)&&u.extend)u.extend(f,h)}catch(R){}if(y!=null)u.caretBidiLevel=y;return E})}function Tee(e,t,n){if(dz==t&&fz==n)return pz;return dz=t,fz=n,pz=n=="up"||n=="down"?wee(e,t,n):Eee(e,t,n)}class Qp{constructor(e,t,n,a){this.parent=e,this.children=t,this.dom=n,this.contentDOM=a,this.dirty=Ta,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(e){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){if(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 t=0,n=this.posAtStart;;t++){let a=this.children[t];if(a==e)return n;n+=a.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,t,n){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(n<0){let i,l;if(e==this.contentDOM)i=e.childNodes[t-1];else{while(e.parentNode!=this.contentDOM)e=e.parentNode;i=e.previousSibling}while(i&&!((l=i.pmViewDesc)&&l.parent==this))i=i.previousSibling;return i?this.posBeforeChild(l)+l.size:this.posAtStart}else{let i,l;if(e==this.contentDOM)i=e.childNodes[t];else{while(e.parentNode!=this.contentDOM)e=e.parentNode;i=e.nextSibling}while(i&&!((l=i.pmViewDesc)&&l.parent==this))i=i.nextSibling;return i?this.posBeforeChild(l):this.posAtEnd}let a;if(e==this.dom&&this.contentDOM)a=t>xr(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))a=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(t==0)for(let i=e;;i=i.parentNode){if(i==this.dom){a=!1;break}if(i.previousSibling)break}if(a==null&&t==e.childNodes.length)for(let i=e;;i=i.parentNode){if(i==this.dom){a=!0;break}if(i.nextSibling)break}}return(a==null?n>0:a)?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,a=e;a;a=a.parentNode){let i=this.getDesc(a),l;if(i&&(!t||i.node))if(n&&(l=i.nodeDOM)&&!(l.nodeType==1?l.contains(e.nodeType==1?e:e.parentNode):l==e))n=!1;else return i}}getDesc(e){let t=e.pmViewDesc;for(let n=t;n;n=n.parent)if(n==this)return t}posFromDOM(e,t,n){for(let a=e;a;a=a.parentNode){let i=this.getDesc(a);if(i)return i.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let a=this.children[t],i=n+a.size;if(n==e&&i!=n){while(!a.border&&a.children.length)for(let l=0;l<a.children.length;l++){let c=a.children[l];if(c.size){a=c;break}}return a}if(e<i)return a.descAt(e-n-a.border);n=i}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n=0,a=0;for(let i=0;n<this.children.length;n++){let l=this.children[n],c=i+l.size;if(c>e||l instanceof t4){a=e-i;break}i=c}if(a)return this.children[n].domFromPos(a-this.children[n].border,t);for(let i;n&&!(i=this.children[n-1]).size&&i instanceof e4&&i.side>=0;n--);if(t<=0){let i,l=!0;for(;;n--,l=!1)if(i=n?this.children[n-1]:null,!i||i.dom.parentNode==this.contentDOM)break;if(i&&t&&l&&!i.border&&!i.domAtom)return i.domFromPos(i.size,t);return{node:this.contentDOM,offset:i?xr(i.dom)+1:0}}else{let i,l=!0;for(;;n++,l=!1)if(i=n<this.children.length?this.children[n]:null,!i||i.dom.parentNode==this.contentDOM)break;if(i&&l&&!i.border&&!i.domAtom)return i.domFromPos(0,t);return{node:this.contentDOM,offset:i?xr(i.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,n=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let a=-1,i=-1;for(let l=n,c=0;;c++){let u=this.children[c],f=l+u.size;if(a==-1&&e<=f){let h=l+u.border;if(e>=h&&t<=f-u.border&&u.node&&u.contentDOM&&this.contentDOM.contains(u.contentDOM))return u.parseRange(e,t,h);e=l;for(let m=c;m>0;m--){let b=this.children[m-1];if(b.size&&b.dom.parentNode==this.contentDOM&&!b.emptyChildAt(1)){a=xr(b.dom)+1;break}e-=b.size}if(a==-1)a=0}if(a>-1&&(f>t||c==this.children.length-1)){t=f;for(let h=c+1;h<this.children.length;h++){let m=this.children[h];if(m.size&&m.dom.parentNode==this.contentDOM&&!m.emptyChildAt(-1)){i=xr(m.dom);break}t+=m.size}if(i==-1)i=this.contentDOM.childNodes.length;break}l=f}return{node:this.contentDOM,from:e,to:t,fromOffset:a,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return t.size==0||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(t.nodeType!=1||n==t.childNodes.length)throw RangeError("No node after pos "+e);return t.childNodes[n]}setSelection(e,t,n,a=!1){let i=Math.min(e,t),l=Math.max(e,t);for(let y=0,v=0;y<this.children.length;y++){let S=this.children[y],C=v+S.size;if(i>v&&l<C)return S.setSelection(e-v-S.border,t-v-S.border,n,a);v=C}let c=this.domFromPos(e,e?-1:1),u=t==e?c:this.domFromPos(t,t?-1:1),f=n.root.getSelection(),h=n.domSelectionRange(),m=!1;if((Ea||Dr)&&e==t){let{node:y,offset:v}=c;if(y.nodeType==3){if(m=!!(v&&y.nodeValue[v-1]==`
257
+ `),m&&v==y.nodeValue.length)for(let S=y,C;S;S=S.parentNode){if(C=S.nextSibling){if(C.nodeName=="BR")c=u={node:C.parentNode,offset:xr(C)+1};break}let E=S.pmViewDesc;if(E&&E.node&&E.node.isBlock)break}}else{let S=y.childNodes[v-1];m=S&&(S.nodeName=="BR"||S.contentEditable=="false")}}if(Ea&&h.focusNode&&h.focusNode!=u.node&&h.focusNode.nodeType==1){let y=h.focusNode.childNodes[h.focusOffset];if(y&&y.contentEditable=="false")a=!0}if(!(a||m&&Dr)&&Nd(c.node,c.offset,h.anchorNode,h.anchorOffset)&&Nd(u.node,u.offset,h.focusNode,h.focusOffset))return;let b=!1;if((f.extend||e==t)&&!(m&&Ea)){f.collapse(c.node,c.offset);try{if(e!=t)f.extend(u.node,u.offset);b=!0}catch(y){}}if(!b){if(e>t){let v=c;c=u,u=v}let y=document.createRange();y.setEnd(u.node,u.offset),y.setStart(c.node,c.offset),f.removeAllRanges(),f.addRange(y)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,a=0;a<this.children.length;a++){let i=this.children[a],l=n+i.size;if(n==l?e<=l&&t>=n:e<l&&t>n){let c=n+i.border,u=l-i.border;if(e>=c&&t<=u){if(this.dirty=e==n||t==l?Rd:hz,e==c&&t==u&&(i.contentLost||i.dom.parentNode!=this.contentDOM))i.dirty=ri;else i.markDirty(e-c,t-c);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?Rd:ri}n=l}this.dirty=Rd}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=e==1?Rd:hz;if(t.dirty<n)t.dirty=n}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}function mz(e,t,n,a,i){Xz(a,t,e);let l=new Ic(void 0,e,t,n,a,a,a);if(l.contentDOM)l.updateChildren(i,0);return l}function Yz(e,t,n){let a=e.firstChild,i=!1;for(let l=0;l<t.length;l++){let c=t[l],u=c.dom;if(u.parentNode==e){while(u!=a)a=gz(a),i=!0;a=a.nextSibling}else i=!0,e.insertBefore(u,a);if(c instanceof _c){let f=a?a.previousSibling:e.lastChild;Yz(c.contentDOM,c.children,n),a=f?f.nextSibling:e.firstChild}}while(a)a=gz(a),i=!0;if(i&&n.trackWrites==e)n.trackWrites=null}function GR(e,t,n){if(e.length==0)return kd;let a=n?kd[0]:new eb,i=[a];for(let l=0;l<e.length;l++){let c=e[l].type.attrs;if(!c)continue;if(c.nodeName)i.push(a=new eb(c.nodeName));for(let u in c){let f=c[u];if(f==null)continue;if(n&&i.length==1)i.push(a=new eb(t.isInline?"span":"div"));if(u=="class")a.class=(a.class?a.class+" ":"")+f;else if(u=="style")a.style=(a.style?a.style+";":"")+f;else if(u!="nodeName")a[u]=f}}return i}function Jz(e,t,n,a){if(n==kd&&a==kd)return t;let i=t;for(let l=0;l<a.length;l++){let c=a[l],u=n[l];if(l){let f;if(u&&u.nodeName==c.nodeName&&i!=e&&(f=i.parentNode)&&f.nodeName.toLowerCase()==c.nodeName)i=f;else f=document.createElement(c.nodeName),f.pmIsDeco=!0,f.appendChild(i),u=kd[0],i=f}Ree(i,u||kd[0],c)}return i}function Ree(e,t,n){for(let a in t)if(a!="class"&&a!="style"&&a!="nodeName"&&!(a in n))e.removeAttribute(a);for(let a in n)if(a!="class"&&a!="style"&&a!="nodeName"&&n[a]!=t[a])e.setAttribute(a,n[a]);if(t.class!=n.class){let a=t.class?t.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let l=0;l<a.length;l++)if(i.indexOf(a[l])==-1)e.classList.remove(a[l]);for(let l=0;l<i.length;l++)if(a.indexOf(i[l])==-1)e.classList.add(i[l]);if(e.classList.length==0)e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let a=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,i;while(i=a.exec(t.style))e.style.removeProperty(i[1])}if(n.style)e.style.cssText+=n.style}}function Xz(e,t,n){return Jz(e,e,kd,GR(t,n,e.nodeType!=1))}function f1(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function gz(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class Qz{constructor(e,t,n){this.lock=t,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=kee(e.node.content,e)}destroyBetween(e,t){if(e==t)return;for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n,a){let i=0,l=this.stack.length>>1,c=Math.min(l,e.length);while(i<c&&(i==l-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1)i++;while(i<l)this.destroyRest(),this.top.dirty=Ta,this.index=this.stack.pop(),this.top=this.stack.pop(),l--;while(l<e.length){this.stack.push(this.top,this.index+1);let u=-1,f=this.top.children.length;if(a<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[l])&&!this.isLocked(m.dom)){u=h;break}}if(u<0&&this.index<this.top.children.length){let h=this.top.children[this.index];if(h instanceof _c&&h.dirty!=ri&&h.mark.type==e[l].type&&h.spec.update&&!this.isLocked(h.dom)&&h.spec.update(e[l]))h.mark=e[l],u=this.index,this.changed=!0}if(u>-1){if(u>this.index)this.changed=!0,this.destroyBetween(this.index,u);this.top=this.top.children[this.index]}else{let h=_c.create(this.top,e[l],t,n);this.top.children.splice(this.index,0,h),this.top=h,this.changed=!0}this.index=0,l++}}findNodeMatch(e,t,n,a){let i=-1,l;if(a>=this.preMatch.index&&(l=this.preMatch.matches[a-this.preMatch.index]).parent==this.top&&l.matchesNode(e,t,n))i=this.top.children.indexOf(l,this.index);else for(let c=this.index,u=Math.min(this.top.children.length,c+5);c<u;c++){let f=this.top.children[c];if(f.matchesNode(e,t,n)&&!this.preMatch.matched.has(f)){i=c;break}}if(i<0)return!1;return this.destroyBetween(this.index,i),this.index++,!0}updateNodeAt(e,t,n,a,i){let l=this.top.children[a];if(l.dirty==ri&&l.dom==l.contentDOM)l.dirty=Rd;if(!l.update(e,t,n,i))return!1;return this.destroyBetween(this.index,a),this.index++,!0}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let n=e.pmViewDesc;if(n){for(let a=this.index;a<this.top.children.length;a++)if(this.top.children[a]==n)return a}return-1}e=t}}updateNextNode(e,t,n,a,i,l){for(let c=this.index;c<this.top.children.length;c++){let u=this.top.children[c];if(u instanceof Ic){let f=this.preMatch.matched.get(u);if(f!=null&&f!=i)return!1;let h=u.dom,m,b=this.isLocked(h)&&!(e.isText&&u.node&&u.node.isText&&u.nodeDOM.nodeValue==e.text&&u.dirty!=ri&&f1(t,u.outerDeco));if(!b&&u.update(e,t,n,a)){if(this.destroyBetween(this.index,c),u.dom!=h)this.changed=!0;return this.index++,!0}else if(!b&&(m=this.recreateWrapper(u,e,t,n,a,l))){if(this.destroyBetween(this.index,c),this.top.children[this.index]=m,m.contentDOM)m.dirty=Rd,m.updateChildren(a,l+1),m.dirty=Ta;return this.changed=!0,this.index++,!0}break}}return!1}recreateWrapper(e,t,n,a,i,l){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content)||!f1(n,e.outerDeco)||!a.eq(e.innerDeco))return null;let c=Ic.create(this.top,t,n,a,i,l);if(c.contentDOM){c.children=e.children,e.children=[];for(let u of c.children)u.parent=c}return e.destroy(),c}addNode(e,t,n,a,i){let l=Ic.create(this.top,e,t,n,a,i);if(l.contentDOM)l.updateChildren(a,i+1);this.top.children.splice(this.index++,0,l),this.changed=!0}placeWidget(e,t,n){let a=this.index<this.top.children.length?this.top.children[this.index]:null;if(a&&a.matchesWidget(e)&&(e==a.widget||!a.widget.type.toDOM.parentNode))this.index++;else{let i=new e4(this.top,e,t,n);this.top.children.splice(this.index++,0,i),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;while(e instanceof _c)t=e,e=t.children[t.children.length-1];if(!e||!(e instanceof y1)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text)){if((Dr||$r)&&e&&e.dom.contentEditable=="false")this.addHackNode("IMG",t);this.addHackNode("BR",this.top)}}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);if(e=="IMG")n.className="ProseMirror-separator",n.alt="";if(e=="BR")n.className="ProseMirror-trailingBreak";let a=new t4(this.top,[],n,null);if(t!=this.top)t.children.push(a);else t.children.splice(this.index++,0,a);this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function kee(e,t){let n=t,a=n.children.length,i=e.childCount,l=new Map,c=[];e:while(i>0){let u;for(;;)if(a){let h=n.children[a-1];if(h instanceof _c)n=h,a=h.children.length;else{u=h,a--;break}}else if(n==t)break e;else a=n.parent.children.indexOf(n),n=n.parent;let f=u.node;if(!f)continue;if(f!=e.child(i-1))break;--i,l.set(u,i),c.push(u)}return{index:i,matched:l,matches:c.reverse()}}function Aee(e,t){return e.type.side-t.type.side}function Mee(e,t,n,a){let i=t.locals(e),l=0;if(i.length==0){for(let h=0;h<e.childCount;h++){let m=e.child(h);a(m,i,t.forChild(l,m),h),l+=m.nodeSize}return}let c=0,u=[],f=null;for(let h=0;;){let m,b;while(c<i.length&&i[c].to==l){let E=i[c++];if(E.widget)if(!m)m=E;else(b||(b=[m])).push(E)}if(m)if(b){b.sort(Aee);for(let E=0;E<b.length;E++)n(b[E],h,!!f)}else n(m,h,!!f);let y,v;if(f)v=-1,y=f,f=null;else if(h<e.childCount)v=h,y=e.child(h++);else break;for(let E=0;E<u.length;E++)if(u[E].to<=l)u.splice(E--,1);while(c<i.length&&i[c].from<=l&&i[c].to>l)u.push(i[c++]);let S=l+y.nodeSize;if(y.isText){let E=S;if(c<i.length&&i[c].from<E)E=i[c].from;for(let R=0;R<u.length;R++)if(u[R].to<E)E=u[R].to;if(E<S)f=y.cut(E-l),y=y.cut(0,E-l),S=E,v=-1}else while(c<i.length&&i[c].to<S)c++;let C=y.isInline&&!y.isLeaf?u.filter((E)=>!E.inline):u.slice();a(y,C,t.forChild(l,y),v),l=S}}function Nee(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function Oee(e,t,n,a){for(let i=0,l=0;i<e.childCount&&l<=a;){let c=e.child(i++),u=l;if(l+=c.nodeSize,!c.isText)continue;let f=c.text;while(i<e.childCount){let h=e.child(i++);if(l+=h.nodeSize,!h.isText)break;f+=h.text}if(l>=n){if(l>=a&&f.slice(a-t.length-u,a-u)==t)return a-t.length;let h=u<a?f.lastIndexOf(t,a-u-1):-1;if(h>=0&&h+t.length+u>=n)return u+h;if(n==a&&f.length>=a+t.length-u&&f.slice(a-u,a-u+t.length)==t)return a}}return-1}function WR(e,t,n,a,i){let l=[];for(let c=0,u=0;c<e.length;c++){let f=e[c],h=u,m=u+=f.size;if(h>=n||m<=t)l.push(f);else{if(h<t)l.push(f.slice(0,t-h,a));if(i)l.push(i),i=void 0;if(m>n)l.push(f.slice(n-h,f.size,a))}}return l}function n4(e,t=null){let n=e.domSelectionRange(),a=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),l=i&&i.size==0,c=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(c<0)return null;let u=a.resolve(c),f,h;if(b1(n)){f=c;while(i&&!i.node)i=i.parent;let b=i.node;if(i&&b.isAtom&&Pe.isSelectable(b)&&i.parent&&!(b.isInline&&lee(n.focusNode,n.focusOffset,i.dom))){let y=i.posBefore;h=new Pe(c==y?u:a.resolve(y))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let b=c,y=c;for(let v=0;v<n.rangeCount;v++){let S=n.getRangeAt(v);b=Math.min(b,e.docView.posFromDOM(S.startContainer,S.startOffset,1)),y=Math.max(y,e.docView.posFromDOM(S.endContainer,S.endOffset,-1))}if(b<0)return null;[f,c]=y==e.state.selection.anchor?[y,b]:[b,y],u=a.resolve(c)}else f=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(f<0)return null}let m=a.resolve(f);if(!h){let b=t=="pointer"||e.state.selection.head<u.pos&&!l?1:-1;h=r4(e,m,u,b)}return h}function Zz(e){return e.editable?e.hasFocus():tH(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function nl(e,t=!1){let n=e.state.selection;if(eH(e,n),!Zz(e))return;let a=e.input.mouseDown;if(!t&&$r&&a){let i=e.domSelectionRange(),l=e.domObserver.currentSelection;if(i.anchorNode&&l.anchorNode&&Nd(i.anchorNode,i.anchorOffset,l.anchorNode,l.anchorOffset)&&a.delaySelUpdate()){e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)Pee(e);else{let{anchor:i,head:l}=n,c,u;if(bz&&!(n instanceof Me)){if(!n.$from.parent.inlineContent)c=yz(e,n.from);if(!n.empty&&!n.$from.parent.inlineContent)u=yz(e,n.to)}if(e.docView.setSelection(i,l,e,t),bz){if(c)vz(c);if(u)vz(u)}if(n.visible)e.dom.classList.remove("ProseMirror-hideselection");else if(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document)Dee(e)}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}function yz(e,t){let{node:n,offset:a}=e.docView.domFromPos(t,0),i=a<n.childNodes.length?n.childNodes[a]:null,l=a?n.childNodes[a-1]:null;if(Dr&&i&&i.contentEditable=="false")return BR(i);if((!i||i.contentEditable=="false")&&(!l||l.contentEditable=="false")){if(i)return BR(i);else if(l)return BR(l)}}function BR(e){if(e.contentEditable="true",Dr&&e.draggable)e.draggable=!1,e.wasDraggable=!0;return e}function vz(e){if(e.contentEditable="false",e.wasDraggable)e.draggable=!0,e.wasDraggable=null}function Dee(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),a=n.anchorNode,i=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{if(n.anchorNode!=a||n.anchorOffset!=i)t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{if(!Zz(e)||e.state.selection.visible)e.dom.classList.remove("ProseMirror-hideselection")},20)})}function Pee(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,a=n.nodeName=="IMG";if(a)t.collapse(n.parentNode,xr(n)+1);else t.collapse(n,0);if(!a&&!e.state.selection.visible&&go&&Lc<=11)n.disabled=!0,n.disabled=!1}function eH(e,t){if(t instanceof Pe){let n=e.docView.descAt(t.from);if(n!=e.lastSelectedViewDesc){if(xz(e),n)n.selectNode();e.lastSelectedViewDesc=n}}else xz(e)}function xz(e){if(e.lastSelectedViewDesc){if(e.lastSelectedViewDesc.parent)e.lastSelectedViewDesc.deselectNode();e.lastSelectedViewDesc=void 0}}function r4(e,t,n,a){return e.someProp("createSelectionBetween",(i)=>i(e,t,n))||Me.between(t,n,a)}function $z(e){if(e.editable&&!e.hasFocus())return!1;return tH(e)}function tH(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch(n){return!1}}function Lee(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Nd(t.node,t.offset,n.anchorNode,n.anchorOffset)}function YR(e,t){let{$anchor:n,$head:a}=e.selection,i=t>0?n.max(a):n.min(a),l=!i.parent.inlineContent?i:i.depth?e.doc.resolve(t>0?i.after():i.before()):null;return l&&Ue.findFrom(l,t)}function Dc(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Sz(e,t,n){let a=e.state.selection;if(a instanceof Me){if(n.indexOf("s")>-1){let{$head:i}=a,l=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!l||l.isText||!l.isLeaf)return!1;let c=e.state.doc.resolve(i.pos+l.nodeSize*(t<0?-1:1));return Dc(e,new Me(a.$anchor,c))}else if(!a.empty)return!1;else if(e.endOfTextblock(t>0?"forward":"backward")){let i=YR(e.state,t);if(i&&i instanceof Pe)return Dc(e,i);return!1}else if(!(wa&&n.indexOf("m")>-1)){let i=a.$head,l=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter,c;if(!l||l.isText)return!1;let u=t<0?i.pos-l.nodeSize:i.pos;if(!(l.isAtom||(c=e.docView.descAt(u))&&!c.contentDOM))return!1;if(Pe.isSelectable(l))return Dc(e,new Pe(t<0?e.state.doc.resolve(i.pos-l.nodeSize):i));else if(ib)return Dc(e,new Me(e.state.doc.resolve(t<0?u:u+l.nodeSize)));else return!1}}else if(a instanceof Pe&&a.node.isInline)return Dc(e,new Me(t>0?a.$to:a.$from));else{let i=YR(e.state,t);if(i)return Dc(e,i);return!1}}function p1(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function tb(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function Wp(e,t){return t<0?_ee(e):Iee(e)}function _ee(e){let t=e.domSelectionRange(),n=t.focusNode,a=t.focusOffset;if(!n)return;let i,l,c=!1;if(Ea&&n.nodeType==1&&a<p1(n)&&tb(n.childNodes[a],-1))c=!0;for(;;)if(a>0)if(n.nodeType!=1)break;else{let u=n.childNodes[a-1];if(tb(u,-1))i=n,l=--a;else if(u.nodeType==3)n=u,a=n.nodeValue.length;else break}else if(nH(n))break;else{let u=n.previousSibling;while(u&&tb(u,-1))i=n.parentNode,l=xr(u),u=u.previousSibling;if(!u){if(n=n.parentNode,n==e.dom)break;a=0}else n=u,a=p1(n)}if(c)JR(e,n,a);else if(i)JR(e,i,l)}function Iee(e){let t=e.domSelectionRange(),n=t.focusNode,a=t.focusOffset;if(!n)return;let i=p1(n),l,c;for(;;)if(a<i){if(n.nodeType!=1)break;let u=n.childNodes[a];if(tb(u,1))l=n,c=++a;else break}else if(nH(n))break;else{let u=n.nextSibling;while(u&&tb(u,1))l=u.parentNode,c=xr(u)+1,u=u.nextSibling;if(!u){if(n=n.parentNode,n==e.dom)break;a=i=0}else n=u,a=0,i=p1(n)}if(l)JR(e,l,c)}function nH(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Bee(e,t){while(e&&t==e.childNodes.length&&!ab(e))t=xr(e)+1,e=e.parentNode;while(e&&t<e.childNodes.length){let n=e.childNodes[t];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=0}}function zee(e,t){while(e&&!t&&!ab(e))t=xr(e),e=e.parentNode;while(e&&t){let n=e.childNodes[t-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=e.childNodes.length}}function JR(e,t,n){if(t.nodeType!=3){let l,c;if(c=Bee(t,n))t=c,n=0;else if(l=zee(t,n))t=l,n=l.nodeValue.length}let a=e.domSelection();if(!a)return;if(b1(a)){let l=document.createRange();l.setEnd(t,n),l.setStart(t,n),a.removeAllRanges(),a.addRange(l)}else if(a.extend)a.extend(t,n);e.domObserver.setCurSelection();let{state:i}=e;setTimeout(()=>{if(e.state==i)nl(e)},50)}function wz(e,t){let n=e.state.doc.resolve(t);if(!($r||Hz)&&n.parent.inlineContent){let i=e.coordsAtPos(t);if(t>n.start()){let l=e.coordsAtPos(t-1),c=(l.top+l.bottom)/2;if(c>i.top&&c<i.bottom&&Math.abs(l.left-i.left)>1)return l.left<i.left?"ltr":"rtl"}if(t<n.end()){let l=e.coordsAtPos(t+1),c=(l.top+l.bottom)/2;if(c>i.top&&c<i.bottom&&Math.abs(l.left-i.left)>1)return l.left>i.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function Cz(e,t,n){let a=e.state.selection;if(a instanceof Me&&!a.empty||n.indexOf("s")>-1)return!1;if(wa&&n.indexOf("m")>-1)return!1;let{$from:i,$to:l}=a;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let c=YR(e.state,t);if(c&&c instanceof Pe)return Dc(e,c)}if(!i.parent.inlineContent){let c=t<0?i:l,u=a instanceof vr?Ue.near(c,t):Ue.findFrom(c,t);return u?Dc(e,u):!1}return!1}function Ez(e,t){if(!(e.state.selection instanceof Me))return!0;let{$head:n,$anchor:a,empty:i}=e.state.selection;if(!n.sameParent(a))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let l=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(l&&!l.isText){let c=e.state.tr;if(t<0)c.delete(n.pos-l.nodeSize,n.pos);else c.delete(n.pos,n.pos+l.nodeSize);return e.dispatch(c),!0}return!1}function Tz(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Hee(e){if(!Dr||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let a=t.firstChild;Tz(e,a,"true"),setTimeout(()=>Tz(e,a,"false"),20)}return!1}function Fee(e){let t="";if(e.ctrlKey)t+="c";if(e.metaKey)t+="m";if(e.altKey)t+="a";if(e.shiftKey)t+="s";return t}function Uee(e,t){let n=t.keyCode,a=Fee(t);if(n==8||wa&&n==72&&a=="c")return Ez(e,-1)||Wp(e,-1);else if(n==46&&!t.shiftKey||wa&&n==68&&a=="c")return Ez(e,1)||Wp(e,1);else if(n==13||n==27)return!0;else if(n==37||wa&&n==66&&a=="c"){let i=n==37?wz(e,e.state.selection.from)=="ltr"?-1:1:-1;return Sz(e,i,a)||Wp(e,i)}else if(n==39||wa&&n==70&&a=="c"){let i=n==39?wz(e,e.state.selection.from)=="ltr"?1:-1:1;return Sz(e,i,a)||Wp(e,i)}else if(n==38||wa&&n==80&&a=="c")return Cz(e,-1,a)||Wp(e,-1);else if(n==40||wa&&n==78&&a=="c")return Hee(e)||Cz(e,1,a)||Wp(e,1);else if(a==(wa?"m":"c")&&(n==66||n==73||n==89||n==90))return!0;return!1}function o4(e,t){e.someProp("transformCopied",(v)=>{t=v(t,e)});let n=[],{content:a,openStart:i,openEnd:l}=t;while(i>1&&l>1&&a.childCount==1&&a.firstChild.childCount==1){i--,l--;let v=a.firstChild;n.push(v.type.name,v.attrs!=v.type.defaultAttrs?v.attrs:null),a=v.content}let c=e.someProp("clipboardSerializer")||Qi.fromSchema(e.state.schema),u=lH(),f=u.createElement("div");f.appendChild(c.serializeFragment(a,{document:u}));let h=f.firstChild,m,b=0;while(h&&h.nodeType==1&&(m=sH[h.nodeName.toLowerCase()])){for(let v=m.length-1;v>=0;v--){let S=u.createElement(m[v]);while(f.firstChild)S.appendChild(f.firstChild);f.appendChild(S),b++}h=f.firstChild}if(h&&h.nodeType==1)h.setAttribute("data-pm-slice",`${i} ${l}${b?` -${b}`:""} ${JSON.stringify(n)}`);let y=e.someProp("clipboardTextSerializer",(v)=>v(t,e))||t.content.textBetween(0,t.content.size,`
258
+
259
+ `);return{dom:f,text:y,slice:t}}function rH(e,t,n,a,i){let l=i.parent.type.spec.code,c,u;if(!n&&!t)return null;let f=!!t&&(a||l||!n);if(f){if(e.someProp("transformPastedText",(y)=>{t=y(t,l||a,e)}),l)return u=new Se(ce.from(e.state.schema.text(t.replace(/\r\n?/g,`
260
+ `))),0,0),e.someProp("transformPasted",(y)=>{u=y(u,e,!0)}),u;let b=e.someProp("clipboardTextParser",(y)=>y(t,i,a,e));if(b)u=b;else{let y=i.marks(),{schema:v}=e.state,S=Qi.fromSchema(v);c=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((C)=>{let E=c.appendChild(document.createElement("p"));if(C)E.appendChild(S.serializeNode(v.text(C,y)))})}}else if(e.someProp("transformPastedHTML",(b)=>{n=b(n,e)}),c=qee(n),ib)Gee(c);let h=c&&c.querySelector("[data-pm-slice]"),m=h&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(h.getAttribute("data-pm-slice")||"");if(m&&m[3])for(let b=+m[3];b>0;b--){let y=c.firstChild;while(y&&y.nodeType!=1)y=y.nextSibling;if(!y)break;c=y}if(!u)u=(e.someProp("clipboardParser")||e.someProp("domParser")||Ko.fromSchema(e.state.schema)).parseSlice(c,{preserveWhitespace:!!(f||m),context:i,ruleFromNode(y){if(y.nodeName=="BR"&&!y.nextSibling&&y.parentNode&&!Vee.test(y.parentNode.nodeName))return{ignore:!0};return null}});if(m)u=Wee(Rz(u,+m[1],+m[2]),m[4]);else if(u=Se.maxOpen(jee(u.content,i),!0),u.openStart||u.openEnd){let b=0,y=0;for(let v=u.content.firstChild;b<u.openStart&&!v.type.spec.isolating;b++,v=v.firstChild);for(let v=u.content.lastChild;y<u.openEnd&&!v.type.spec.isolating;y++,v=v.lastChild);u=Rz(u,b,y)}return e.someProp("transformPasted",(b)=>{u=b(u,e,f)}),u}function jee(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let i=t.node(n).contentMatchAt(t.index(n)),l,c=[];if(e.forEach((u)=>{if(!c)return;let f=i.findWrapping(u.type),h;if(!f)return c=null;if(h=c.length&&l.length&&aH(f,l,u,c[c.length-1],0))c[c.length-1]=h;else{if(c.length)c[c.length-1]=iH(c[c.length-1],l.length);let m=oH(u,f);c.push(m),i=i.matchType(m.type),l=f}}),c)return ce.from(c)}return e}function oH(e,t,n=0){for(let a=t.length-1;a>=n;a--)e=t[a].create(null,ce.from(e));return e}function aH(e,t,n,a,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let l=aH(e,t,n,a.lastChild,i+1);if(l)return a.copy(a.content.replaceChild(a.childCount-1,l));if(a.contentMatchAt(a.childCount).matchType(i==e.length-1?n.type:e[i+1]))return a.copy(a.content.append(ce.from(oH(n,e,i+1))))}}function iH(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,iH(e.lastChild,t-1)),a=e.contentMatchAt(e.childCount).fillBefore(ce.empty,!0);return e.copy(n.append(a))}function XR(e,t,n,a,i,l){let c=t<0?e.firstChild:e.lastChild,u=c.content;if(e.childCount>1)l=0;if(i<a-1)u=XR(u,t,n,a,i+1,l);if(i>=n)u=t<0?c.contentMatchAt(0).fillBefore(u,l<=i).append(u):u.append(c.contentMatchAt(c.childCount).fillBefore(ce.empty,!0));return e.replaceChild(t<0?0:e.childCount-1,c.copy(u))}function Rz(e,t,n){if(t<e.openStart)e=new Se(XR(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd);if(n<e.openEnd)e=new Se(XR(e.content,1,n,e.openEnd,0,0),e.openStart,n);return e}function lH(){return document.implementation.createHTMLDocument("title")}function Kee(e){let t=window.trustedTypes;if(!t)return e;if(!zR)zR=t.defaultPolicy||t.createPolicy("ProseMirrorClipboard",{createHTML:(n)=>n});return zR.createHTML(e)}function qee(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);if(t)e=e.slice(t[0].length);let n=lH(),a=n.body,i=/<([a-z][^>\s]+)/i.exec(e),l;if(l=i&&sH[i[1].toLowerCase()])e=l.map((c)=>"<"+c+">").join("")+e+l.map((c)=>"</"+c+">").reverse().join("");if(a.innerHTML=Kee(e),l)for(let c=0;c<l.length;c++)a=a.querySelector(l[c])||a;for(let c=0;c<n.styleSheets.length;c++){let u=n.styleSheets[c];for(let f=0;f<u.rules.length;f++){let h=u.rules[f];if(h instanceof CSSStyleRule){let m=a.querySelectorAll(h.selectorText);for(let b=0;b<m.length;b++)m[b].style.cssText+=h.style.cssText}}}return a}function Gee(e){let t=e.querySelectorAll($r?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let a=t[n];if(a.childNodes.length==1&&a.textContent==" "&&a.parentNode)a.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),a)}}function Wee(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,a;try{a=JSON.parse(t)}catch(u){return e}let{content:i,openStart:l,openEnd:c}=e;for(let u=a.length-2;u>=0;u-=2){let f=n.nodes[a[u]];if(!f||f.hasRequiredAttrs())break;i=ce.from(f.create(a[u+1],i)),l++,c++}return new Se(i,l,c)}class cH{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=-200000000,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function Jee(e){for(let t in Jr){let n=Jr[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=(a)=>{if(Qee(e,a)&&!a4(e,a)&&(e.editable||!(a.type in Xr)))n(e,a)},Yee[t]?{passive:!0}:void 0)}if(Dr)e.dom.addEventListener("input",()=>null);QR(e)}function tl(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function Xee(e){if(e.input.mouseDown)e.input.mouseDown.done();e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function QR(e){e.someProp("handleDOMEvents",(t)=>{for(let n in t)if(!e.input.eventHandlers[n])e.dom.addEventListener(n,e.input.eventHandlers[n]=(a)=>a4(e,a))})}function a4(e,t){return e.someProp("handleDOMEvents",(n)=>{let a=n[t.type];return a?a(e,t)||t.defaultPrevented:!1})}function Qee(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function Zee(e,t){if(!a4(e,t)&&Jr[t.type]&&(e.editable||!(t.type in Xr)))Jr[t.type](e,t)}function sb(e){return{left:e.clientX,top:e.clientY}}function ete(e,t){let n=t.x-e.clientX,a=t.y-e.clientY;return n*n+a*a<100}function i4(e,t,n,a,i){if(a==-1)return!1;let l=e.state.doc.resolve(a);for(let c=l.depth+1;c>0;c--)if(e.someProp(t,(u)=>c>l.depth?u(e,n,l.nodeAfter,l.before(c),i,!0):u(e,n,l.node(c),l.before(c),i,!1)))return!0;return!1}function lb(e,t,n){if(!e.focused)e.focus();if(e.state.selection.eq(t))return;let a=e.state.tr.setSelection(t);if(n=="pointer")a.setMeta("pointer",!0);e.dispatch(a)}function tte(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),a=n.nodeAfter;if(a&&a.isAtom&&Pe.isSelectable(a))return lb(e,new Pe(n),"pointer"),!0;return!1}function nte(e,t){if(t==-1)return!1;let n=e.state.selection,a,i;if(n instanceof Pe)a=n.node;let l=e.state.doc.resolve(t);for(let c=l.depth+1;c>0;c--){let u=c>l.depth?l.nodeAfter:l.node(c);if(Pe.isSelectable(u)){if(a&&n.$from.depth>0&&c>=n.$from.depth&&l.before(n.$from.depth+1)==n.$from.pos)i=l.before(n.$from.depth);else i=l.before(c);break}}if(i!=null)return lb(e,Pe.create(e.state.doc,i),"pointer"),!0;else return!1}function rte(e,t,n,a,i){return i4(e,"handleClickOn",t,n,a)||e.someProp("handleClick",(l)=>l(e,t,a))||(i?nte(e,n):tte(e,n))}function ote(e,t,n,a){return i4(e,"handleDoubleClickOn",t,n,a)||e.someProp("handleDoubleClick",(i)=>i(e,t,a))}function ate(e,t,n,a){return i4(e,"handleTripleClickOn",t,n,a)||e.someProp("handleTripleClick",(i)=>i(e,t,a))||ite(e,n,a)}function ite(e,t,n){if(n.button!=0)return!1;let a=uH(e,t,!0),i=e.state.doc;if(!a)return!1;if(lb(e,a,"pointer"),a instanceof Me&&i.eq(e.state.doc))e.input.mouseDown=new pH(e,a);return!0}function uH(e,t,n){let a=e.state.doc;if(t==-1)return a.inlineContent?Me.create(a,0,a.content.size):null;let i=a.resolve(t);for(let l=i.depth+1;l>0;l--){let c=l>i.depth?i.nodeAfter:i.node(l),u=i.before(l);if(c.inlineContent)return Me.create(a,u+1,u+1+c.content.size);else if(n&&Pe.isSelectable(c))return Pe.create(a,u)}return null}function s4(e){return h1(e)}class l4{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){if(e.buttons==0)this.done()}done(){if(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}}function hH(e,t){if(e.composing)return!0;if(Dr&&Math.abs(Date.now()-e.input.compositionEndedAt)<500)return e.input.compositionEndedAt=-200000000,!0;return!1}function lte(e){let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(!t||t.nodeType!=1||n>=t.childNodes.length)return!1;let a=t.childNodes[n];return a.nodeType==1&&a.contentEditable=="false"}function mH(e,t){if(clearTimeout(e.input.composingTimeout),t>-1)e.input.composingTimeout=setTimeout(()=>h1(e),t)}function gH(e){if(e.composing)e.input.composing=!1,e.input.compositionEndedAt=Date.now();while(e.input.compositionNodes.length>0)e.input.compositionNodes.pop().markParentsDirty()}function cte(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=iee(t.focusNode,t.focusOffset),a=see(t.focusNode,t.focusOffset);if(n&&a&&n!=a){let i=a.pmViewDesc,l=e.domObserver.lastChangedTextNode;if(n==l||a==l)return l;if(!i||!i.isText(a.nodeValue))return a;else if(e.input.compositionNode==a){let c=n.pmViewDesc;if(!(!c||!c.isText(n.nodeValue)))return a}}return n||a}function h1(e,t=!1){if(el&&e.domObserver.flushingSoon>=0)return;if(e.domObserver.forceFlush(),gH(e),t||e.docView&&e.docView.dirty){let n=n4(e),a=e.state.selection;if(n&&!n.eq(a))e.dispatch(e.state.tr.setSelection(n));else if((e.markCursor||t)&&!a.$from.node(a.$from.sharedDepth(a.to)).inlineContent)e.dispatch(e.state.tr.deleteSelection());else e.updateState(e.state);return!0}return!1}function ute(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let a=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),a.removeAllRanges(),a.addRange(i),setTimeout(()=>{if(n.parentNode)n.parentNode.removeChild(n);e.focus()},50)}function dte(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function fte(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,a=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));if(!n)a.contentEditable="true";a.style.cssText="position: fixed; left: -10000px; top: 10px",a.focus();let i=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{if(e.focus(),a.parentNode)a.parentNode.removeChild(a);if(n)rb(e,a.value,null,i,t);else rb(e,a.textContent,a.innerHTML,i,t)},50)}function rb(e,t,n,a,i){let l=rH(e,t,n,a,e.state.selection.$from);if(e.someProp("handlePaste",(f)=>f(e,i,l||Se.empty)))return!0;if(!l)return!1;let c=dte(l),u=c?e.state.tr.replaceSelectionWith(c,a):e.state.tr.replaceSelection(l);return e.dispatch(u.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function bH(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}class c4{constructor(e,t,n){this.slice=e,this.move=t,this.node=n}}function yH(e,t){let n;return e.someProp("dragCopies",(a)=>{n=n||a(t)}),n!=null?!n:!t[pte]}function hte(e,t,n){if(!t.dataTransfer)return;let a=e.posAtCoords(sb(t));if(!a)return;let i=e.state.doc.resolve(a.pos),l=n&&n.slice;if(l)e.someProp("transformPasted",(v)=>{l=v(l,e,!1)});else l=rH(e,bH(t.dataTransfer),nb?null:t.dataTransfer.getData("text/html"),!1,i);let c=!!(n&&yH(e,t));if(e.someProp("handleDrop",(v)=>v(e,t,l||Se.empty,c))){t.preventDefault();return}if(!l)return;t.preventDefault();let u=l?s1(e.state.doc,i.pos,l):i.pos;if(u==null)u=i.pos;let f=e.state.tr;if(c){let{node:v}=n;if(v)v.replace(f);else f.deleteSelection()}let h=f.mapping.map(u),m=l.openStart==0&&l.openEnd==0&&l.content.childCount==1,b=f.doc;if(m)f.replaceRangeWith(h,h,l.content.firstChild);else f.replaceRange(h,h,l);if(f.doc.eq(b))return;let y=f.doc.resolve(h);if(m&&Pe.isSelectable(l.content.firstChild)&&y.nodeAfter&&y.nodeAfter.sameMarkup(l.content.firstChild))f.setSelection(new Pe(y));else{let v=f.mapping.map(u);f.mapping.maps[f.mapping.maps.length-1].forEach((S,C,E,R)=>v=R),f.setSelection(r4(e,y,f.doc.resolve(v)))}e.focus(),e.dispatch(f.setMeta("uiEvent","drop"))}function ob(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class m1{constructor(e,t){this.toDOM=e,this.spec=t||Ad,this.side=this.spec.side||0}map(e,t,n,a){let{pos:i,deleted:l}=e.mapResult(t.from+a,this.side<0?-1:1);return l?null:new Jn(i-n,i-n,this)}valid(){return!0}eq(e){return this==e||e instanceof m1&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&ob(this.spec,e.spec))}destroy(e){if(this.spec.destroy)this.spec.destroy(e)}}class Bc{constructor(e,t){this.attrs=e,this.spec=t||Ad}map(e,t,n,a){let i=e.map(t.from+a,this.spec.inclusiveStart?-1:1)-n,l=e.map(t.to+a,this.spec.inclusiveEnd?1:-1)-n;return i>=l?null:new Jn(i,l,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof Bc&&ob(this.attrs,e.attrs)&&ob(this.spec,e.spec)}static is(e){return e.type instanceof Bc}destroy(){}}class u4{constructor(e,t){this.attrs=e,this.spec=t||Ad}map(e,t,n,a){let i=e.mapResult(t.from+a,1);if(i.deleted)return null;let l=e.mapResult(t.to+a,-1);if(l.deleted||l.pos<=i.pos)return null;return new Jn(i.pos-n,l.pos-n,this)}valid(e,t){let{index:n,offset:a}=e.content.findIndex(t.from),i;return a==t.from&&!(i=e.child(n)).isText&&a+i.nodeSize==t.to}eq(e){return this==e||e instanceof u4&&ob(this.attrs,e.attrs)&&ob(this.spec,e.spec)}destroy(){}}class Jn{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(e,t){return new Jn(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(e,t,n){return new Jn(e,e,new m1(t,n))}static inline(e,t,n,a){return new Jn(e,t,new Bc(n,a))}static node(e,t,n,a){return new Jn(e,t,new u4(n,a))}get spec(){return this.type.spec}get inline(){return this.type instanceof Bc}get widget(){return this.type instanceof m1}}class Lt{constructor(e,t){this.local=e.length?e:Yp,this.children=t.length?t:Yp}static create(e,t){return t.length?g1(t,e,0,Ad):Or}find(e,t,n){let a=[];return this.findInner(e==null?0:e,t==null?1e9:t,a,0,n),a}findInner(e,t,n,a,i){for(let l=0;l<this.local.length;l++){let c=this.local[l];if(c.from<=t&&c.to>=e&&(!i||i(c.spec)))n.push(c.copy(c.from+a,c.to+a))}for(let l=0;l<this.children.length;l+=3)if(this.children[l]<t&&this.children[l+1]>e){let c=this.children[l]+1;this.children[l+2].findInner(e-c,t-c,n,a+c,i)}}map(e,t,n){if(this==Or||e.maps.length==0)return this;return this.mapInner(e,t,0,0,n||Ad)}mapInner(e,t,n,a,i){let l;for(let c=0;c<this.local.length;c++){let u=this.local[c].map(e,n,a);if(u&&u.type.valid(t,u))(l||(l=[])).push(u);else if(i.onRemove)i.onRemove(this.local[c].spec)}if(this.children.length)return mte(this.children,l||[],e,t,n,a,i);else return l?new Lt(l.sort(Md),Yp):Or}add(e,t){if(!t.length)return this;if(this==Or)return Lt.create(e,t);return this.addInner(e,t,0)}addInner(e,t,n){let a,i=0;e.forEach((c,u)=>{let f=u+n,h;if(!(h=xH(t,c,f)))return;if(!a)a=this.children.slice();while(i<a.length&&a[i]<u)i+=3;if(a[i]==u)a[i+2]=a[i+2].addInner(c,h,f+1);else a.splice(i,0,u,u+c.nodeSize,g1(h,c,f+1,Ad));i+=3});let l=vH(i?$H(t):t,-n);for(let c=0;c<l.length;c++)if(!l[c].type.valid(e,l[c]))l.splice(c--,1);return new Lt(l.length?this.local.concat(l).sort(Md):this.local,a||this.children)}remove(e){if(e.length==0||this==Or)return this;return this.removeInner(e,0)}removeInner(e,t){let n=this.children,a=this.local;for(let i=0;i<n.length;i+=3){let l,c=n[i]+t,u=n[i+1]+t;for(let h=0,m;h<e.length;h++)if(m=e[h]){if(m.from>c&&m.to<u)e[h]=null,(l||(l=[])).push(m)}if(!l)continue;if(n==this.children)n=this.children.slice();let f=n[i+2].removeInner(l,c+1);if(f!=Or)n[i+2]=f;else n.splice(i,3),i-=3}if(a.length){for(let i=0,l;i<e.length;i++)if(l=e[i]){for(let c=0;c<a.length;c++)if(a[c].eq(l,t)){if(a==this.local)a=this.local.slice();a.splice(c--,1)}}}if(n==this.children&&a==this.local)return this;return a.length||n.length?new Lt(a,n):Or}forChild(e,t){if(this==Or)return this;if(t.isLeaf)return Lt.empty;let n,a;for(let c=0;c<this.children.length;c+=3)if(this.children[c]>=e){if(this.children[c]==e)n=this.children[c+2];break}let i=e+1,l=i+t.content.size;for(let c=0;c<this.local.length;c++){let u=this.local[c];if(u.from<l&&u.to>i&&u.type instanceof Bc){let f=Math.max(i,u.from)-i,h=Math.min(l,u.to)-i;if(f<h)(a||(a=[])).push(u.copy(f,h))}}if(a){let c=new Lt(a.sort(Md),Yp);return n?new Pc([c,n]):c}return n||Or}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 t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return d4(this.localsInner(e))}localsInner(e){if(this==Or)return Yp;if(e.inlineContent||!this.local.some(Bc.is))return this.local;let t=[];for(let n=0;n<this.local.length;n++)if(!(this.local[n].type instanceof Bc))t.push(this.local[n]);return t}forEachSet(e){e(this)}}class Pc{constructor(e){this.members=e}map(e,t){let n=this.members.map((a)=>a.map(e,t,Ad));return Pc.from(n)}forChild(e,t){if(t.isLeaf)return Lt.empty;let n=[];for(let a=0;a<this.members.length;a++){let i=this.members[a].forChild(e,t);if(i==Or)continue;if(i instanceof Pc)n=n.concat(i.members);else n.push(i)}return Pc.from(n)}eq(e){if(!(e instanceof Pc)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,n=!0;for(let a=0;a<this.members.length;a++){let i=this.members[a].localsInner(e);if(!i.length)continue;if(!t)t=i;else{if(n)t=t.slice(),n=!1;for(let l=0;l<i.length;l++)t.push(i[l])}}return t?d4(n?t:t.sort(Md)):Yp}static from(e){switch(e.length){case 0:return Or;case 1:return e[0];default:return new Pc(e.every((t)=>t instanceof Lt)?e:e.reduce((t,n)=>t.concat(n instanceof Lt?n:n.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}}function mte(e,t,n,a,i,l,c){let u=e.slice();for(let h=0,m=l;h<n.maps.length;h++){let b=0;n.maps[h].forEach((y,v,S,C)=>{let E=C-S-(v-y);for(let R=0;R<u.length;R+=3){let D=u[R+1];if(D<0||y>D+m-b)continue;let U=u[R]+m-b;if(v>=U)u[R+1]=y<=U?-2:-1;else if(y>=m&&E)u[R]+=E,u[R+1]+=E}b+=E}),m=n.maps[h].map(m,-1)}let f=!1;for(let h=0;h<u.length;h+=3)if(u[h+1]<0){if(u[h+1]==-2){f=!0,u[h+1]=-1;continue}let m=n.map(e[h]+l),b=m-i;if(b<0||b>=a.content.size){f=!0;continue}let y=n.map(e[h+1]+l,-1),v=y-i,{index:S,offset:C}=a.content.findIndex(b),E=a.maybeChild(S);if(E&&C==b&&C+E.nodeSize==v){let R=u[h+2].mapInner(n,E,m+1,e[h]+l+1,c);if(R!=Or)u[h]=b,u[h+1]=v,u[h+2]=R;else u[h+1]=-2,f=!0}else f=!0}if(f){let h=gte(u,e,t,n,i,l,c),m=g1(h,a,0,c);t=m.local;for(let b=0;b<u.length;b+=3)if(u[b+1]<0)u.splice(b,3),b-=3;for(let b=0,y=0;b<m.children.length;b+=3){let v=m.children[b];while(y<u.length&&u[y]<v)y+=3;u.splice(y,0,m.children[b],m.children[b+1],m.children[b+2])}}return new Lt(t.sort(Md),u)}function vH(e,t){if(!t||!e.length)return e;let n=[];for(let a=0;a<e.length;a++){let i=e[a];n.push(new Jn(i.from+t,i.to+t,i.type))}return n}function gte(e,t,n,a,i,l,c){function u(f,h){for(let m=0;m<f.local.length;m++){let b=f.local[m].map(a,i,h);if(b)n.push(b);else if(c.onRemove)c.onRemove(f.local[m].spec)}for(let m=0;m<f.children.length;m+=3)u(f.children[m+2],f.children[m]+h+1)}for(let f=0;f<e.length;f+=3)if(e[f+1]==-1)u(e[f+2],t[f]+l+1);return n}function xH(e,t,n){if(t.isLeaf)return null;let a=n+t.nodeSize,i=null;for(let l=0,c;l<e.length;l++)if((c=e[l])&&c.from>n&&c.to<a)(i||(i=[])).push(c),e[l]=null;return i}function $H(e){let t=[];for(let n=0;n<e.length;n++)if(e[n]!=null)t.push(e[n]);return t}function g1(e,t,n,a){let i=[],l=!1;t.forEach((u,f)=>{let h=xH(e,u,f+n);if(h){l=!0;let m=g1(h,u,n+f+1,a);if(m!=Or)i.push(f,f+u.nodeSize,m)}});let c=vH(l?$H(e):e,-n).sort(Md);for(let u=0;u<c.length;u++)if(!c[u].type.valid(t,c[u])){if(a.onRemove)a.onRemove(c[u].spec);c.splice(u--,1)}return c.length||i.length?new Lt(c,i):Or}function Md(e,t){return e.from-t.from||e.to-t.to}function d4(e){let t=e;for(let n=0;n<t.length-1;n++){let a=t[n];if(a.from!=a.to)for(let i=n+1;i<t.length;i++){let l=t[i];if(l.from==a.from){if(l.to!=a.to){if(t==e)t=e.slice();t[i]=l.copy(l.from,a.to),kz(t,i+1,l.copy(a.to,l.to))}continue}else{if(l.from<a.to){if(t==e)t=e.slice();t[n]=a.copy(a.from,l.from),kz(t,i,a.copy(l.from,a.to))}break}}}return t}function kz(e,t,n){while(t<e.length&&Md(n,e[t])>0)t++;e.splice(t,0,n)}function HR(e){let t=[];if(e.someProp("decorations",(n)=>{let a=n(e.state);if(a&&a!=Or)t.push(a)}),e.cursorWrapper)t.push(Lt.create(e.state.doc,[e.cursorWrapper.deco]));return Pc.from(t)}class SH{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 wH{constructor(e,t){if(this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new SH,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver((n)=>{for(let a=0;a<n.length;a++)this.queue.push(n[a]);if(go&&Lc<=11&&n.some((a)=>a.type=="childList"&&a.removedNodes.length||a.type=="characterData"&&a.oldValue.length>a.target.nodeValue.length))this.flushSoon();else if(Dr&&e.composing&&n.some((a)=>a.type=="childList"&&a.target.nodeName=="TR"))e.input.badSafariComposition=!0,this.flushSoon();else this.flush()}),yte)this.onCharData=(n)=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()};this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){if(this.flushingSoon<0)this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20)}forceFlush(){if(this.flushingSoon>-1)window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush()}start(){if(this.observer)this.observer.takeRecords(),this.observer.observe(this.view.dom,bte);if(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 t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}if(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(!$z(this.view))return;if(this.suppressingSelectionUpdates)return nl(this.view);if(go&&Lc<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Nd(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 t=new Set,n;for(let i=e.focusNode;i;i=Jp(i))t.add(i);for(let i=e.anchorNode;i;i=Jp(i))if(t.has(i)){n=i;break}let a=n&&this.view.docView.nearestDesc(n);if(a&&a.ignoreMutation({type:"selection",target:n.nodeType==3?n.parentNode:n}))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 t=this.pendingRecords();if(t.length)this.queue=[];let n=e.domSelectionRange(),a=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&$z(e)&&!this.ignoreSelectionChange(n),i=-1,l=-1,c=!1,u=[];if(e.editable)for(let h=0;h<t.length;h++){let m=this.registerMutation(t[h],u);if(m){if(i=i<0?m.from:Math.min(m.from,i),l=l<0?m.to:Math.max(m.to,l),m.typeOver)c=!0}}if(u.some((h)=>h.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46||$r&&(e.composing||e.input.compositionEndedAt>Date.now()-50)&&t.some((h)=>h.type=="childList"&&h.removedNodes.length))){for(let h of u)if(h.nodeName=="BR"&&h.parentNode){let m=h.nextSibling;while(m&&m.nodeType==1){if(m.contentEditable=="false"){h.parentNode.removeChild(h);break}m=m.firstChild}}}else if(Ea&&u.length){let h=u.filter((m)=>m.nodeName=="BR");if(h.length==2){let[m,b]=h;if(m.parentNode&&m.parentNode.parentNode==b.parentNode)b.remove();else m.remove()}else{let{focusNode:m}=this.currentSelection;for(let b of h){let y=b.parentNode;if(y&&y.nodeName=="LI"&&(!m||$te(e,m)!=y))b.remove()}}}let f=null;if(i<0&&a&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&b1(n)&&(f=n4(e))&&f.eq(Ue.near(e.state.doc.resolve(0),1)))e.input.lastFocus=0,nl(e),this.currentSelection.set(n),e.scrollToSelection();else if(i>-1||a){if(i>-1)e.docView.markDirty(i,l),vte(e);if(e.input.badSafariComposition)e.input.badSafariComposition=!1,Ste(e,u);if(this.handleDOMChange(i,l,c,u),e.docView&&e.docView.dirty)e.updateState(e.state);else if(!this.currentSelection.eq(n))nl(e);this.currentSelection.set(n)}}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(n==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if(e.type=="childList"){for(let h=0;h<e.addedNodes.length;h++){let m=e.addedNodes[h];if(t.push(m),m.nodeType==3)this.lastChangedTextNode=m}if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let{previousSibling:a,nextSibling:i}=e;if(go&&Lc<=11&&e.addedNodes.length)for(let h=0;h<e.addedNodes.length;h++){let{previousSibling:m,nextSibling:b}=e.addedNodes[h];if(!m||Array.prototype.indexOf.call(e.addedNodes,m)<0)a=m;if(!b||Array.prototype.indexOf.call(e.addedNodes,b)<0)i=b}let l=a&&a.parentNode==e.target?xr(a)+1:0,c=n.localPosFromDOM(e.target,l,-1),u=i&&i.parentNode==e.target?xr(i):e.target.childNodes.length,f=n.localPosFromDOM(e.target,u,1);return{from:c,to:f}}else if(e.type=="attributes")return{from:n.posAtStart-n.border,to:n.posAtEnd+n.border};else return this.lastChangedTextNode=e.target,{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}}function vte(e){if(Az.has(e))return;if(Az.set(e,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1){if(e.requiresGeckoHackNode=Ea,Mz)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."),Mz=!0}}function Nz(e,t){let{startContainer:n,startOffset:a,endContainer:i,endOffset:l}=t,c=e.domAtPos(e.state.selection.anchor);if(Nd(c.node,c.offset,i,l))[n,a,i,l]=[i,l,n,a];return{anchorNode:n,anchorOffset:a,focusNode:i,focusOffset:l}}function xte(e,t){if(t.getComposedRanges){let i=t.getComposedRanges(e.root)[0];if(i)return Nz(e,i)}let n;function a(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return e.dom.addEventListener("beforeinput",a,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",a,!0),n?Nz(e,n):null}function $te(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let a=e.docView.nearestDesc(n,!0);if(a&&a.node.isBlock)return n}return null}function Ste(e,t){var n;let{focusNode:a,focusOffset:i}=e.domSelectionRange();for(let l of t)if(((n=l.parentNode)===null||n===void 0?void 0:n.nodeName)=="TR"){let c=l.nextSibling;while(c&&(c.nodeName!="TD"&&c.nodeName!="TH"))c=c.nextSibling;if(c){let u=c;for(;;){let f=u.firstChild;if(!f||f.nodeType!=1||f.contentEditable=="false"||/^(BR|IMG)$/.test(f.nodeName))break;u=f}if(u.insertBefore(l,u.firstChild),a==l)e.domSelection().collapse(l,i)}else l.parentNode.removeChild(l)}}function wte(e,t,n,a){let{node:i,fromOffset:l,toOffset:c,from:u,to:f}=e.docView.parseRange(t,n),h=e.domSelectionRange(),m,b=h.anchorNode;if(b&&e.dom.contains(b.nodeType==1?b:b.parentNode)){if(m=[{node:b,offset:h.anchorOffset}],!b1(h))m.push({node:h.focusNode,offset:h.focusOffset})}if($r&&e.input.lastKeyCode===8)for(let R=c;R>l;R--){let D=i.childNodes[R-1],U=D.pmViewDesc;if(D.nodeName=="BR"&&!U){c=R;break}if(!U||U.size)break}let y=e.state.doc,v=e.someProp("domParser")||Ko.fromSchema(e.state.schema),S=y.resolve(u),C=null,E=v.parse(i,{topNode:S.parent,topMatch:S.parent.contentMatchAt(S.index()),topOpen:!0,from:l,to:c,preserveWhitespace:S.parent.type.whitespace=="pre"?"full":!0,findPositions:m,ruleFromNode:Cte(a),context:S});if(m&&m[0].pos!=null){let R=m[0].pos,D=m[1]&&m[1].pos;if(D==null)D=R;C={anchor:R+u,head:D+u}}return{doc:E,sel:C,from:u,to:f}}function Tte(e,t,n,a,i){let l=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let V=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,P=n4(e,V);if(P&&!e.state.selection.eq(P)){if($r&&el&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",(J)=>J(e,Td(13,"Enter"))))return;let re=e.state.tr.setSelection(P);if(V=="pointer")re.setMeta("pointer",!0);else if(V=="key")re.scrollIntoView();if(l)re.setMeta("composition",l);e.dispatch(re)}return}let c=e.state.doc.resolve(t),u=c.sharedDepth(n);t=c.before(u+1),n=e.state.doc.resolve(n).after(u+1);let f=e.state.selection,h=wte(e,t,n,i),m=e.state.doc,b=m.slice(h.from,h.to),y,v;if(e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime)y=e.state.selection.to,v="end";else y=e.state.selection.from,v="start";e.input.lastKeyCode=null;let S=Ate(b.content,h.doc.content,h.from,y,v);if(S)e.input.domChangeCount++;if((Xp&&e.input.lastIOSEnter>Date.now()-225||el)&&i.some((V)=>V.nodeType==1&&!Ete.test(V.nodeName))&&(!S||S.endA>=S.endB)&&e.someProp("handleKeyDown",(V)=>V(e,Td(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!S)if(a&&f instanceof Me&&!f.empty&&f.$head.sameParent(f.$anchor)&&!e.composing&&!(h.sel&&h.sel.anchor!=h.sel.head))S={start:f.from,endA:f.to,endB:f.to};else{if(h.sel){let V=Oz(e,e.state.doc,h.sel);if(V&&!V.eq(e.state.selection)){let P=e.state.tr.setSelection(V);if(l)P.setMeta("composition",l);e.dispatch(P)}}return}if(e.state.selection.from<e.state.selection.to&&S.start==S.endB&&e.state.selection instanceof Me){if(S.start>e.state.selection.from&&S.start<=e.state.selection.from+2&&e.state.selection.from>=h.from)S.start=e.state.selection.from;else if(S.endA<e.state.selection.to&&S.endA>=e.state.selection.to-2&&e.state.selection.to<=h.to)S.endB+=e.state.selection.to-S.endA,S.endA=e.state.selection.to}if(go&&Lc<=11&&S.endB==S.start+1&&S.endA==S.start&&S.start>h.from&&h.doc.textBetween(S.start-h.from-1,S.start-h.from+1)=="  ")S.start--,S.endA--,S.endB--;let C=h.doc.resolveNoCache(S.start-h.from),E=h.doc.resolveNoCache(S.endB-h.from),R=m.resolve(S.start),D=C.sameParent(E)&&C.parent.inlineContent&&R.end()>=S.endA;if((Xp&&e.input.lastIOSEnter>Date.now()-225&&(!D||i.some((V)=>V.nodeName=="DIV"||V.nodeName=="P"))||!D&&C.pos<h.doc.content.size&&(!C.sameParent(E)||!C.parent.inlineContent)&&C.pos<E.pos&&!/\S/.test(h.doc.textBetween(C.pos,E.pos,"","")))&&e.someProp("handleKeyDown",(V)=>V(e,Td(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>S.start&&kte(m,S.start,S.endA,C,E)&&e.someProp("handleKeyDown",(V)=>V(e,Td(8,"Backspace")))){if(el&&$r)e.domObserver.suppressSelectionUpdates();return}if($r&&S.endB==S.start)e.input.lastChromeDelete=Date.now();if(el&&!D&&C.start()!=E.start()&&E.parentOffset==0&&C.depth==E.depth&&h.sel&&h.sel.anchor==h.sel.head&&h.sel.head==S.endA)S.endB-=2,E=h.doc.resolveNoCache(S.endB-h.from),setTimeout(()=>{e.someProp("handleKeyDown",function(V){return V(e,Td(13,"Enter"))})},20);let{start:U,endA:z}=S,L=(V)=>{let P=V||e.state.tr.replace(U,z,h.doc.slice(S.start-h.from,S.endB-h.from));if(h.sel){let re=Oz(e,P.doc,h.sel);if(re&&!($r&&e.composing&&re.empty&&(S.start!=S.endB||e.input.lastChromeDelete<Date.now()-100)&&(re.head==U||re.head==P.mapping.map(z)-1)||go&&re.empty&&re.head==U))P.setSelection(re)}if(l)P.setMeta("composition",l);return P.scrollIntoView()},Q;if(D)if(C.pos==E.pos){if(go&&Lc<=11&&C.parentOffset==0)e.domObserver.suppressSelectionUpdates(),setTimeout(()=>nl(e),20);let V=L(e.state.tr.delete(U,z)),P=m.resolve(S.start).marksAcross(m.resolve(S.endA));if(P)V.ensureMarks(P);e.dispatch(V)}else if(S.endA==S.endB&&(Q=Rte(C.parent.content.cut(C.parentOffset,E.parentOffset),R.parent.content.cut(R.parentOffset,S.endA-R.start())))){let V=L(e.state.tr);if(Q.type=="add")V.addMark(U,z,Q.mark);else V.removeMark(U,z,Q.mark);e.dispatch(V)}else if(C.parent.child(C.index()).isText&&C.index()==E.index()-(E.textOffset?0:1)){let V=C.parent.textBetween(C.parentOffset,E.parentOffset),P=()=>L(e.state.tr.insertText(V,U,z));if(!e.someProp("handleTextInput",(re)=>re(e,U,z,V,P)))e.dispatch(P())}else e.dispatch(L());else e.dispatch(L())}function Oz(e,t,n){if(Math.max(n.anchor,n.head)>t.content.size)return null;return r4(e,t.resolve(n.anchor),t.resolve(n.head))}function Rte(e,t){let n=e.firstChild.marks,a=t.firstChild.marks,i=n,l=a,c,u,f;for(let m=0;m<a.length;m++)i=a[m].removeFromSet(i);for(let m=0;m<n.length;m++)l=n[m].removeFromSet(l);if(i.length==1&&l.length==0)u=i[0],c="add",f=(m)=>m.mark(u.addToSet(m.marks));else if(i.length==0&&l.length==1)u=l[0],c="remove",f=(m)=>m.mark(u.removeFromSet(m.marks));else return null;let h=[];for(let m=0;m<t.childCount;m++)h.push(f(t.child(m)));if(ce.from(h).eq(e))return{mark:u,type:c}}function kte(e,t,n,a,i){if(n-t<=i.pos-a.pos||FR(a,!0,!1)<i.pos)return!1;let l=e.resolve(t);if(!a.parent.isTextblock){let u=l.nodeAfter;return u!=null&&n==t+u.nodeSize}if(l.parentOffset<l.parent.content.size||!l.parent.isTextblock)return!1;let c=e.resolve(FR(l,!0,!0));if(!c.parent.isTextblock||c.pos>n||FR(c,!0,!1)<n)return!1;return a.parent.content.cut(a.parentOffset).eq(c.parent.content)}function FR(e,t,n){let a=e.depth,i=t?e.end():e.pos;while(a>0&&(t||e.indexAfter(a)==e.node(a).childCount))a--,i++,t=!1;if(n){let l=e.node(a).maybeChild(e.indexAfter(a));while(l&&!l.isLeaf)l=l.firstChild,i++}return i}function Ate(e,t,n,a,i){let l=e.findDiffStart(t,n),c=n+e.size,u=n+t.size;if(l==null)return null;let{a:f,b:h}=e.findDiffEnd(t,c,u);if(i=="end"){let m=Math.max(0,l-Math.min(f,h));a-=f+m-l}if(f<l&&c<u){let m=a<=l&&a>=f?l-a:0;l-=m,h=l+(h-f),f=l}else if(h<l){let m=a<=l&&a>=h?l-a:0;l-=m,f=l+(f-h),h=l}return{start:l,endA:f,endB:h}}class v1{constructor(e,t){if(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 cH,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(Iz),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e){if(e.appendChild)e.appendChild(this.dom);else if(typeof e=="function")e(this.dom);else if(e.mount)this.mounted=!0}this.editable=Lz(this),Pz(this),this.nodeViews=_z(this),this.docView=mz(this.state.doc,Dz(this),HR(this),this.dom,this),this.domObserver=new wH(this,(n,a,i,l)=>Tte(this,n,a,i,l)),this.domObserver.start(),Jee(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 t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){if(e.handleDOMEvents!=this._props.handleDOMEvents)QR(this);let t=this._props;if(this._props=e,e.plugins)e.plugins.forEach(Iz),this.directPlugins=e.plugins;this.updateStateInner(e.state,t)}setProps(e){let t={};for(let n in this._props)t[n]=this._props[n];t.state=this.state;for(let n in e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var n;let a=this.state,i=!1,l=!1;if(e.storedMarks&&this.composing)gH(this),l=!0;this.state=e;let c=a.plugins!=e.plugins||this._props.plugins!=t.plugins;if(c||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let y=_z(this);if(Nte(y,this.nodeViews))this.nodeViews=y,i=!0}if(c||t.handleDOMEvents!=this._props.handleDOMEvents)QR(this);this.editable=Lz(this),Pz(this);let u=HR(this),f=Dz(this),h=a.plugins!=e.plugins&&!a.doc.eq(e.doc)?"reset":e.scrollToSelection>a.scrollToSelection?"to selection":"preserve",m=i||!this.docView.matchesNode(e.doc,f,u);if(m||!e.selection.eq(a.selection))l=!0;let b=h=="preserve"&&l&&this.dom.style.overflowAnchor==null&&hee(this);if(l){this.domObserver.stop();let y=m&&(go||$r)&&!this.composing&&!a.selection.empty&&!e.selection.empty&&Mte(a.selection,e.selection);if(m){let S=$r?this.trackWrites=this.domSelectionRange().focusNode:null;if(this.composing)this.input.compositionNode=cte(this);if(i||!this.docView.update(e.doc,f,u,this))this.docView.updateOuterDeco(f),this.docView.destroy(),this.docView=mz(e.doc,f,u,this.dom,this);if(S&&(!this.trackWrites||!this.dom.contains(this.trackWrites)))y=!0}let v=this.input.mouseDown;if(y||!(v&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&Lee(this)&&v.delaySelUpdate()))nl(this,y);else eH(this,e.selection),this.domObserver.setCurSelection();this.domObserver.start()}if(this.updatePluginViews(a),((n=this.dragging)===null||n===void 0?void 0:n.node)&&!a.doc.eq(e.doc))this.updateDraggedNode(this.dragging,a);if(h=="reset")this.dom.scrollTop=0;else if(h=="to selection")this.scrollToSelection();else if(b)mee(b)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode));else if(this.someProp("handleScrollToSelection",(t)=>t(this)));else if(this.state.selection instanceof Pe){let t=this.docView.domAfterPos(this.state.selection.from);if(t.nodeType==1)uz(this,t.getBoundingClientRect(),e)}else uz(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;while(e=this.pluginViews.pop())if(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 t=0;t<this.directPlugins.length;t++){let n=this.directPlugins[t];if(n.spec.view)this.pluginViews.push(n.spec.view(this))}for(let t=0;t<this.state.plugins.length;t++){let n=this.state.plugins[t];if(n.spec.view)this.pluginViews.push(n.spec.view(this))}}else for(let t=0;t<this.pluginViews.length;t++){let n=this.pluginViews[t];if(n.update)n.update(this,e)}}updateDraggedNode(e,t){let n=e.node,a=-1;if(n.from<this.state.doc.content.size&&this.state.doc.nodeAt(n.from)==n.node)a=n.from;else{let i=n.from+(this.state.doc.content.size-t.doc.content.size);if((i>0&&i<this.state.doc.content.size&&this.state.doc.nodeAt(i))==n.node)a=i}this.dragging=new c4(e.slice,e.move,a<0?void 0:Pe.create(this.state.doc,a))}someProp(e,t){let n=this._props&&this._props[e],a;if(n!=null&&(a=t?t(n):n))return a;for(let l=0;l<this.directPlugins.length;l++){let c=this.directPlugins[l].props[e];if(c!=null&&(a=t?t(c):c))return a}let i=this.state.plugins;if(i)for(let l=0;l<i.length;l++){let c=i[l].props[e];if(c!=null&&(a=t?t(c):c))return a}}hasFocus(){if(go){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;while(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(){if(this.domObserver.stop(),this.editable)gee(this.dom);nl(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let t=this.dom.parentNode;t;t=t.parentNode)if(t.nodeType==9||t.nodeType==11&&t.host){if(!t.getSelection)Object.getPrototypeOf(t).getSelection=()=>t.ownerDocument.getSelection();return this._root=t}}return e||document}updateRoot(){this._root=null}posAtCoords(e){return $ee(this,e)}coordsAtPos(e,t=1){return Kz(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let a=this.docView.posFromDOM(e,t,n);if(a==null)throw RangeError("DOM position not inside the editor");return a}endOfTextblock(e,t){return Tee(this,t||this.state,e)}pasteHTML(e,t){return rb(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return rb(this,e,null,!0,t||new ClipboardEvent("paste"))}serializeForClipboard(e){return o4(this,e)}destroy(){if(!this.docView)return;if(Xee(this),this.destroyPluginViews(),this.mounted)this.docView.update(this.state.doc,[],HR(this),this),this.dom.textContent="";else if(this.dom.parentNode)this.dom.parentNode.removeChild(this.dom);this.docView.destroy(),this.docView=null,oee()}get isDestroyed(){return this.docView==null}dispatchEvent(e){return Zee(this,e)}domSelectionRange(){let e=this.domSelection();if(!e)return{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0};return Dr&&this.root.nodeType===11&&cee(this.dom.ownerDocument)==this.dom&&xte(this,e)||e}domSelection(){return this.root.getSelection()}}function Dz(e){let t=Object.create(null);if(t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",(n)=>{if(typeof n=="function")n=n(e.state);if(n){for(let a in n)if(a=="class")t.class+=" "+n[a];else if(a=="style")t.style=(t.style?t.style+";":"")+n[a];else if(!t[a]&&a!="contenteditable"&&a!="nodeName")t[a]=String(n[a])}}),!t.translate)t.translate="no";return[Jn.node(0,e.state.doc.content.size,t)]}function Pz(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Jn.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function Lz(e){return!e.someProp("editable",(t)=>t(e.state)===!1)}function Mte(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function _z(e){let t=Object.create(null);function n(a){for(let i in a)if(!Object.prototype.hasOwnProperty.call(t,i))t[i]=a[i]}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function Nte(e,t){let n=0,a=0;for(let i in e){if(e[i]!=t[i])return!0;n++}for(let i in t)a++;return n!=a}function Iz(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw RangeError("Plugins passed directly to the view must not have a state component")}var xr=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},Jp=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t},UR=null,Zs=function(e,t,n){let a=UR||(UR=document.createRange());return a.setEnd(e,n==null?e.nodeValue.length:n),a.setStart(e,t||0),a},oee=function(){UR=null},Nd=function(e,t,n,a){return n&&(lz(e,t,n,a,-1)||lz(e,t,n,a,1))},aee,b1=function(e){return e.focusNode&&Nd(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)},Zi,cz,zc,VR,Bz,jR,go,Lc,Ea,KR,$r,zz,Dr,Xp,wa,Hz,el,ib,dee,Gp=null,See,Cee,dz=null,fz=null,pz=!1,Ta=0,hz=1,Rd=2,ri=3,e4,Gz,_c,Ic,y1,t4,Wz,eb=function(e){if(e)this.nodeName=e},kd,bz,Vee,sH,zR=null,Jr,Xr,Yee,dH,fH,pH,ste,nb,pte,Yp,Ad,Or,bte,yte,Az,Mz=!1,Cte=(e)=>(t)=>{let n=t.pmViewDesc;if(n)return n.parseRule(e);else if(t.nodeName=="BR"&&t.parentNode){if(Dr&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let a=document.createElement("div");return a.appendChild(document.createElement("li")),{skip:a}}else if(t.parentNode.lastChild==t||Dr&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null},Ete;var f4=N(()=>{Xs();Ys();Ac();aee=/^(img|br|input|textarea|hr)$/i;Zi=typeof navigator<"u"?navigator:null,cz=typeof document<"u"?document:null,zc=Zi&&Zi.userAgent||"",VR=/Edge\/(\d+)/.exec(zc),Bz=/MSIE \d/.exec(zc),jR=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(zc),go=!!(Bz||jR||VR),Lc=Bz?document.documentMode:jR?+jR[1]:VR?+VR[1]:0,Ea=!go&&/gecko\/(\d+)/i.test(zc);Ea&&+(/Firefox\/(\d+)/.exec(zc)||[0,0])[1];KR=!go&&/Chrome\/(\d+)/.exec(zc),$r=!!KR,zz=KR?+KR[1]:0,Dr=!go&&!!Zi&&/Apple Computer/.test(Zi.vendor),Xp=Dr&&(/Mobile\/\w+/.test(zc)||!!Zi&&Zi.maxTouchPoints>2),wa=Xp||(Zi?/Mac/.test(Zi.platform):!1),Hz=Zi?/Win/.test(Zi.platform):!1,el=/Android \d/.test(zc),ib=!!cz&&"webkitFontSmoothing"in cz.documentElement.style,dee=ib?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;See=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;Cee=/[\u0590-\u08ac]/;e4=class e4 extends Qp{constructor(e,t,n,a){let i,l=t.type.toDOM;if(typeof l=="function")l=l(n,()=>{if(!i)return a;if(i.parent)return i.parent.posBeforeChild(i)});if(!t.type.spec.raw){if(l.nodeType!=1){let c=document.createElement("span");c.appendChild(l),l=c}l.contentEditable="false",l.classList.add("ProseMirror-widget")}super(e,[],l,null);this.widget=t,this.widget=t,i=this}matchesWidget(e){return this.dirty==Ta&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(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}};Gz=class Gz extends Qp{constructor(e,t,n,a){super(e,[],t,null);this.textDOM=n,this.text=a}get size(){return this.text.length}localPosFromDOM(e,t){if(e!=this.textDOM)return this.posAtStart+(t?this.size:0);return this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}};_c=class _c extends Qp{constructor(e,t,n,a,i){super(e,[],n,a);this.mark=t,this.spec=i}static create(e,t,n,a){let i=a.nodeViews[t.type.name],l=i&&i(t,a,n);if(!l||!l.dom)l=Qi.renderSpec(document,t.type.spec.toDOM(t,n),null,t.attrs);return new _c(e,t,l.dom,l.contentDOM||l.dom,l)}parseRule(){if(this.dirty&ri||this.mark.type.spec.reparseInView)return null;return{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=ri&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=Ta){let n=this.parent;while(!n.node)n=n.parent;if(n.dirty<this.dirty)n.dirty=this.dirty;this.dirty=Ta}}slice(e,t,n){let a=_c.create(this.parent,this.mark,!0,n),i=this.children,l=this.size;if(t<l)i=WR(i,t,l,n);if(e>0)i=WR(i,0,e,n);for(let c=0;c<i.length;c++)i[c].parent=a;return a.children=i,a}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){if(this.spec.destroy)this.spec.destroy();super.destroy()}};Ic=class Ic extends Qp{constructor(e,t,n,a,i,l,c){super(e,[],i,l);this.node=t,this.outerDeco=n,this.innerDeco=a,this.nodeDOM=c}static create(e,t,n,a,i,l){let c=i.nodeViews[t.type.name],u,f=c&&c(t,i,()=>{if(!u)return l;if(u.parent)return u.parent.posBeforeChild(u)},n,a),h=f&&f.dom,m=f&&f.contentDOM;if(t.isText){if(!h)h=document.createTextNode(t.text);else if(h.nodeType!=3)throw RangeError("Text must be rendered as a DOM text node")}else if(!h)({dom:h,contentDOM:m}=Qi.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs));if(!m&&!t.isText&&h.nodeName!="BR"){if(!h.hasAttribute("contenteditable"))h.contentEditable="false";if(t.type.spec.draggable)h.draggable=!0}let b=h;if(h=Xz(h,n,t),f)return u=new Wz(e,t,n,a,h,m||null,b,f);else if(t.isText)return new y1(e,t,n,a,h,b);else return new Ic(e,t,n,a,h,m||null,b)}parseRule(e){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre")t.preserveWhitespace="full";if(!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let a=this.children[n];if(this.dom.contains(a.dom.parentNode)){t.contentElement=a.dom.parentNode;break}}if(!t.contentElement){let n=e&&e.find((a)=>a.nodeType==1&&e.indexOf(a.parentNode)<0&&this.dom.contains(a));if(n)t.contentElement=n;else t.getContent=()=>ce.empty}}return t}matchesNode(e,t,n){return this.dirty==Ta&&e.eq(this.node)&&f1(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let n=this.node.inlineContent,a=t,i=e.composing?this.localCompositionInfo(e,t):null,l=i&&i.pos>-1?i:null,c=i&&i.pos<0,u=new Qz(this,l&&l.node,e);if(Mee(this.node,this.innerDeco,(f,h,m)=>{if(f.spec.marks)u.syncToMarks(f.spec.marks,n,e,h);else if(f.type.side>=0&&!m)u.syncToMarks(h==this.node.childCount?Pt.none:this.node.child(h).marks,n,e,h);u.placeWidget(f,e,a)},(f,h,m,b)=>{u.syncToMarks(f.marks,n,e,b);let y;if(u.findNodeMatch(f,h,m,b));else if(c&&e.state.selection.from>a&&e.state.selection.to<a+f.nodeSize&&(y=u.findIndexWithChild(i.node))>-1&&u.updateNodeAt(f,h,m,y,e));else if(u.updateNextNode(f,h,m,e,b,a));else u.addNode(f,h,m,e,a);a+=f.nodeSize}),u.syncToMarks([],n,e,0),this.node.isTextblock)u.addTextblockHacks();if(u.destroyRest(),u.changed||this.dirty==Rd){if(l)this.protectLocalComposition(e,l);if(Yz(this.contentDOM,this.children,e),Xp)Nee(this.dom)}}localCompositionInfo(e,t){let{from:n,to:a}=e.state.selection;if(!(e.state.selection instanceof Me)||n<t||a>t+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let l=i.nodeValue,c=Oee(this.node.content,l,n-t,a-t);return c<0?null:{node:i,pos:c,text:l}}else return{node:i,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:n,text:a}){if(this.getDesc(t))return;let i=t;for(;;i=i.parentNode){if(i.parentNode==this.contentDOM)break;while(i.previousSibling)i.parentNode.removeChild(i.previousSibling);while(i.nextSibling)i.parentNode.removeChild(i.nextSibling);if(i.pmViewDesc)i.pmViewDesc=void 0}let l=new Gz(this,i,t,a);e.input.compositionNodes.push(l),this.children=WR(this.children,n,n+a.length,e,l)}update(e,t,n,a){if(this.dirty==ri||!e.sameMarkup(this.node))return!1;return this.updateInner(e,t,n,a),!0}updateInner(e,t,n,a){if(this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM)this.updateChildren(a,this.posAtStart);this.dirty=Ta}updateOuterDeco(e){if(f1(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,n=this.dom;if(this.dom=Jz(this.dom,this.nodeDOM,GR(this.outerDeco,this.node,t),GR(e,this.node,t)),this.dom!=n)n.pmViewDesc=void 0,this.dom.pmViewDesc=this;this.outerDeco=e}selectNode(){if(this.nodeDOM.nodeType==1){if(this.nodeDOM.classList.add("ProseMirror-selectednode"),this.contentDOM||!this.node.type.spec.draggable)this.nodeDOM.draggable=!0}}deselectNode(){if(this.nodeDOM.nodeType==1){if(this.nodeDOM.classList.remove("ProseMirror-selectednode"),this.contentDOM||!this.node.type.spec.draggable)this.nodeDOM.removeAttribute("draggable")}}get domAtom(){return this.node.isAtom}};y1=class y1 extends Ic{constructor(e,t,n,a,i,l){super(e,t,n,a,i,null,l)}parseRule(){let e=this.nodeDOM.parentNode;while(e&&e!=this.dom&&!e.pmIsDeco)e=e.parentNode;return{skip:e||!0}}update(e,t,n,a){if(this.dirty==ri||this.dirty!=Ta&&!this.inParent()||!e.sameMarkup(this.node))return!1;if(this.updateOuterDeco(t),(this.dirty!=Ta||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue){if(this.nodeDOM.nodeValue=e.text,a.trackWrites==this.nodeDOM)a.trackWrites=null}return this.node=e,this.dirty=Ta,!0}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){if(e==this.nodeDOM)return this.posAtStart+Math.min(t,this.node.text.length);return super.localPosFromDOM(e,t,n)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,t,n){let a=this.node.cut(e,t),i=document.createTextNode(a.text);return new y1(this.parent,a,this.outerDeco,this.innerDeco,i,i)}markDirty(e,t){if(super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length))this.dirty=ri}get domAtom(){return!1}isText(e){return this.node.text==e}};t4=class t4 extends Qp{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==Ta&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}};Wz=class Wz extends Ic{constructor(e,t,n,a,i,l,c,u){super(e,t,n,a,i,l,c);this.spec=u}update(e,t,n,a){if(this.dirty==ri)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,t,n);if(i)this.updateInner(e,t,n,a);return i}else if(!this.contentDOM&&!e.isLeaf)return!1;else return super.update(e,t,n,a)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,a){this.spec.setSelection?this.spec.setSelection(e,t,n.root):super.setSelection(e,t,n,a)}destroy(){if(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)}};eb.prototype=Object.create(null);kd=[new eb];bz=Dr||$r&&zz<63;Vee=/^(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;sH={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};Jr={},Xr={},Yee={touchstart:!0,touchmove:!0};Xr.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,hH(e))return;if(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),el&&$r&&n.keyCode==13)return;if(n.keyCode!=229)e.domObserver.forceFlush();if(Xp&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let a=Date.now();e.input.lastIOSEnter=a,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{if(e.input.lastIOSEnter==a)e.someProp("handleKeyDown",(i)=>i(e,Td(13,"Enter"))),e.input.lastIOSEnter=0},200)}else if(e.someProp("handleKeyDown",(a)=>a(e,n))||Uee(e,n))n.preventDefault();else tl(e,"key")};Xr.keyup=(e,t)=>{if(t.keyCode==16)e.input.shiftKey=!1};Xr.keypress=(e,t)=>{let n=t;if(hH(e)||!n.charCode||n.ctrlKey&&!n.altKey||wa&&n.metaKey)return;if(e.someProp("handleKeyPress",(i)=>i(e,n))){n.preventDefault();return}let a=e.state.selection;if(!(a instanceof Me)||!a.$from.sameParent(a.$to)){let i=String.fromCharCode(n.charCode),l=()=>e.state.tr.insertText(i).scrollIntoView();if(!/[\r\n]/.test(i)&&!e.someProp("handleTextInput",(c)=>c(e,a.$from.pos,a.$to.pos,i,l)))e.dispatch(l());n.preventDefault()}};dH=wa?"metaKey":"ctrlKey";Jr.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let a=s4(e),i=Date.now(),l="singleClick";if(i-e.input.lastClick.time<500&&ete(n,e.input.lastClick)&&!n[dH]&&e.input.lastClick.button==n.button){if(e.input.lastClick.type=="singleClick")l="doubleClick";else if(e.input.lastClick.type=="doubleClick")l="tripleClick"}if(e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:l,button:n.button},e.input.mouseDown)e.input.mouseDown.done();let c=e.posAtCoords(sb(n));if(!c)return;if(l=="singleClick")e.input.mouseDown=new fH(e,c,n,!!a);else if((l=="doubleClick"?ote:ate)(e,c.pos,c.inside,n))n.preventDefault();else tl(e,"pointer")};fH=class fH extends l4{constructor(e,t,n,a){super(e);this.pos=t,this.event=n,this.flushed=a,this.delayedSelectionSync=!1,this.startDoc=e.state.doc,this.selectNode=!!n[dH],this.allowDefault=n.shiftKey;let i,l;if(t.inside>-1)i=e.state.doc.nodeAt(t.inside),l=t.inside;else{let h=e.state.doc.resolve(t.pos);i=h.parent,l=h.depth?h.before():0}let c=a?null:n.target,u=c?e.docView.nearestDesc(c,!0):null;this.target=u&&u.nodeDOM.nodeType==1?u.nodeDOM:null;let{selection:f}=e.state;if(n.button==0&&(i.type.spec.draggable&&i.type.spec.selectable!==!1||f instanceof Pe&&f.from<=l&&f.to>l))this.mightDrag={node:i,pos:l,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Ea&&!this.target.hasAttribute("contentEditable"))};if(this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)){if(this.view.domObserver.stop(),this.mightDrag.addAttr)this.target.draggable=!0;if(this.mightDrag.setUneditable)setTimeout(()=>{if(this.view.input.mouseDown==this)this.target.setAttribute("contentEditable","false")},20);this.view.domObserver.start()}tl(e,"pointer")}done(){if(super.done(),this.mightDrag&&this.target){if(this.view.domObserver.stop(),this.mightDrag.addAttr)this.target.removeAttribute("draggable");if(this.mightDrag.setUneditable)this.target.removeAttribute("contentEditable");this.view.domObserver.start()}if(this.delayedSelectionSync)setTimeout(()=>{if(!this.view.isDestroyed)nl(this.view)})}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;if(this.view.state.doc!=this.startDoc)t=this.view.posAtCoords(sb(e));if(this.updateAllowDefault(e),this.allowDefault||!t)tl(this.view,"pointer");else if(rte(this.view,t.pos,t.inside,e,this.selectNode))e.preventDefault();else if(e.button==0&&(this.flushed||Dr&&this.mightDrag&&!this.mightDrag.node.isAtom||$r&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2))lb(this.view,Ue.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault();else tl(this.view,"pointer")}move(e){this.updateAllowDefault(e),tl(this.view,"pointer"),super.move(e)}updateAllowDefault(e){if(!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4))this.allowDefault=!0}delaySelUpdate(){if(!this.allowDefault)return!1;return this.delayedSelectionSync=!0,!0}};pH=class pH extends l4{constructor(e,t){super(e);this.startSelection=t,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(),tl(this.view,"pointer");let t=this.view.posAtCoords(sb(e)),n=t&&uH(this.view,t.inside,!1);if(!n)return;let{doc:a}=this.view.state,i=this.startSelection,[l,c]=n.from<i.from?[i.to,n.from]:[i.from,n.to];lb(this.view,Me.create(a,l,c),"pointer")}};Jr.touchstart=(e)=>{e.input.lastTouch=Date.now(),s4(e),tl(e,"pointer")};Jr.touchmove=(e)=>{e.input.lastTouch=Date.now(),tl(e,"pointer")};Jr.contextmenu=(e)=>s4(e);ste=el?5000:-1;Xr.compositionstart=Xr.compositionupdate=(e)=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof Me&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((a)=>a.type.spec.inclusive===!1)||$r&&Hz&&lte(e)))e.markCursor=e.state.storedMarks||n.marks(),h1(e,!0),e.markCursor=null;else if(h1(e,!t.selection.empty),Ea&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let a=e.domSelectionRange();for(let{focusNode:i,focusOffset:l}=a;i&&i.nodeType==1&&l!=0;){let c=l<0?i.lastChild:i.childNodes[l-1];if(!c)break;if(c.nodeType==3){let u=e.domSelection();if(u)u.collapse(c,c.nodeValue.length);break}else i=c,l=-1}}e.input.composing=!0}mH(e,ste)};Xr.compositionend=(e,t)=>{if(e.composing){if(e.input.composing=!1,e.input.compositionEndedAt=Date.now(),e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.badSafariComposition)e.domObserver.forceFlush();else if(e.input.compositionPendingChanges)Promise.resolve().then(()=>e.domObserver.flush());e.input.compositionID++,mH(e,20)}};nb=go&&Lc<15||Xp&&dee<604;Jr.copy=Xr.cut=(e,t)=>{let n=t,a=e.state.selection,i=n.type=="cut";if(a.empty)return;let l=nb?null:n.clipboardData,c=a.content(),{dom:u,text:f}=o4(e,c);if(l)n.preventDefault(),l.clearData(),l.setData("text/html",u.innerHTML),l.setData("text/plain",f);else ute(e,u);if(i)e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};Xr.paste=(e,t)=>{let n=t;if(e.composing&&!el)return;let a=nb?null:n.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;if(a&&rb(e,bH(a),a.getData("text/html"),i,n))n.preventDefault();else fte(e,n)};pte=wa?"altKey":"ctrlKey";Jr.dragstart=(e,t)=>{let n=t,a=e.input.mouseDown;if(a)a.done();if(!n.dataTransfer)return;let i=e.state.selection,l=i.empty?null:e.posAtCoords(sb(n)),c;if(l&&l.pos>=i.from&&l.pos<=(i instanceof Pe?i.to-1:i.to));else if(a&&a.mightDrag)c=Pe.create(e.state.doc,a.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let b=e.docView.nearestDesc(n.target,!0);if(b&&b.node.type.spec.draggable&&b!=e.docView)c=Pe.create(e.state.doc,b.posBefore)}let u=(c||e.state.selection).content(),{dom:f,text:h,slice:m}=o4(e,u);if(!n.dataTransfer.files.length||!$r||zz>120)n.dataTransfer.clearData();if(n.dataTransfer.setData(nb?"Text":"text/html",f.innerHTML),n.dataTransfer.effectAllowed="copyMove",!nb)n.dataTransfer.setData("text/plain",h);e.dragging=new c4(m,yH(e,n),c)};Jr.dragend=(e)=>{let t=e.dragging;window.setTimeout(()=>{if(e.dragging==t)e.dragging=null},50)};Xr.dragover=Xr.dragenter=(e,t)=>t.preventDefault();Xr.drop=(e,t)=>{try{hte(e,t,e.dragging)}finally{e.dragging=null}};Jr.focus=(e)=>{if(e.input.lastFocus=Date.now(),!e.focused)e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{if(e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange()))nl(e)},20)};Jr.blur=(e,t)=>{let n=t;if(e.focused){if(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget))e.domObserver.currentSelection.clear();e.focused=!1}};Jr.beforeinput=(e,t)=>{if(el&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:a}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=a)return;if(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",(l)=>l(e,Td(8,"Backspace"))))return;let{$cursor:i}=e.state.selection;if(i&&i.pos>0)e.dispatch(e.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let e in Xr)Jr[e]=Xr[e];Yp=[],Ad={};Lt.empty=new Lt([],[]);Lt.removeOverlap=d4;Or=Lt.empty;bte={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},yte=go&&Lc<=11;Az=new WeakMap;Ete=/^(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;v1.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;if(t)t.call(this,e);else this.updateState(this.state.apply(e))}});var Hc=N(()=>{f4()});function CH(e){var t=Ote&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||Dte&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?x1:rl)[e.keyCode]||e.key||"Unidentified";if(n=="Esc")n="Escape";if(n=="Del")n="Delete";if(n=="Left")n="ArrowLeft";if(n=="Up")n="ArrowUp";if(n=="Right")n="ArrowRight";if(n=="Down")n="ArrowDown";return n}var rl,x1,Ote,Dte,yn,yn,yn,cb;var EH=N(()=>{rl={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:"'"},x1={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Ote=typeof navigator<"u"&&/Mac/.test(navigator.platform),Dte=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(yn=0;yn<10;yn++)rl[48+yn]=rl[96+yn]=String(yn);for(yn=1;yn<=24;yn++)rl[yn+111]="F"+yn;for(yn=65;yn<=90;yn++)rl[yn]=String.fromCharCode(yn+32),x1[yn]=String.fromCharCode(yn);for(cb in rl)if(!x1.hasOwnProperty(cb))x1[cb]=rl[cb]});function _te(e){let t=e.split(/-(?!$)/),n=t[t.length-1];if(n=="Space")n=" ";let a,i,l,c;for(let u=0;u<t.length-1;u++){let f=t[u];if(/^(cmd|meta|m)$/i.test(f))c=!0;else if(/^a(lt)?$/i.test(f))a=!0;else if(/^(c|ctrl|control)$/i.test(f))i=!0;else if(/^s(hift)?$/i.test(f))l=!0;else if(/^mod$/i.test(f))if(Pte)c=!0;else i=!0;else throw Error("Unrecognized modifier name: "+f)}if(a)n="Alt-"+n;if(i)n="Ctrl-"+n;if(c)n="Meta-"+n;if(l)n="Shift-"+n;return n}function Ite(e){let t=Object.create(null);for(let n in e)t[_te(n)]=e[n];return t}function p4(e,t,n=!0){if(t.altKey)e="Alt-"+e;if(t.ctrlKey)e="Ctrl-"+e;if(t.metaKey)e="Meta-"+e;if(n&&t.shiftKey)e="Shift-"+e;return e}function TH(e){return new qe({props:{handleKeyDown:ub(e)}})}function ub(e){let t=Ite(e);return function(n,a){let i=CH(a),l,c=t[p4(i,a)];if(c&&c(n.state,n.dispatch,n))return!0;if(i.length==1&&i!=" "){if(a.shiftKey){let u=t[p4(i,a,!1)];if(u&&u(n.state,n.dispatch,n))return!0}if((a.altKey||a.metaKey||a.ctrlKey)&&!(Lte&&a.ctrlKey&&a.altKey)&&(l=rl[a.keyCode])&&l!=i){let u=t[p4(l,a)];if(u&&u(n.state,n.dispatch,n))return!0}}return!1}}var Pte,Lte;var $1=N(()=>{EH();Xs();Pte=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),Lte=typeof navigator<"u"&&/Win/.test(navigator.platform)});var RH=N(()=>{$1()});function k1(e){let{state:t,transaction:n}=e,{selection:a}=n,{doc:i}=n,{storedMarks:l}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return l},get selection(){return a},get doc(){return i},get tr(){return a=n.selection,i=n.doc,l=n.storedMarks,n}}}function Tn(e,t){if(typeof e==="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function $4(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function T1(e,t,n={strict:!0}){let a=Object.keys(t);if(!a.length)return!0;return a.every((i)=>{if(n.strict)return t[i]===e[i];if($4(t[i]))return t[i].test(e[i]);return t[i]===e[i]})}function HH(e,t,n={}){return e.find((a)=>a.type===t&&T1(Object.fromEntries(Object.keys(n).map((i)=>[i,a.attrs[i]])),n))}function AH(e,t,n={}){return!!HH(e,t,n)}function S4(e,t,n){if(!e||!t)return;let a=e.parent.childAfter(e.parentOffset);if(!a.node||!a.node.marks.some((h)=>h.type===t))a=e.parent.childBefore(e.parentOffset);if(!a.node||!a.node.marks.some((h)=>h.type===t))return;if(!n){let h=a.node.marks.find((m)=>m.type===t);if(h)n=h.attrs}if(!HH([...a.node.marks],t,n))return;let l=a.index,c=e.start()+a.offset,u=l+1,f=c+a.node.nodeSize;while(l>0&&AH([...e.parent.child(l-1).marks],t,n))l-=1,c-=e.parent.child(l).nodeSize;while(u<e.parent.childCount&&AH([...e.parent.child(u).marks],t,n))f+=e.parent.child(u).nodeSize,u+=1;return{from:c,to:f}}function al(e,t){if(typeof e==="string"){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}function M1(e){return e instanceof Me}function ol(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function b4(e,t=null){if(!t)return null;let n=Ue.atStart(e),a=Ue.atEnd(e);if(t==="start"||t===!0)return n;if(t==="end")return a;let i=n.from,l=a.to;if(t==="all")return Me.create(e,ol(0,i,l),ol(e.content.size,i,l));return Me.create(e,ol(t,i,l),ol(t,i,l))}function MH(){return["Android"].includes(navigator.platform)||/android/i.test(navigator.userAgent)}function R1(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function tne(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}function fb(e){if(typeof window>"u")throw Error("[tiptap error]: there is no window object available, so this function cannot be used");let t=`<body>${e}</body>`,n=new window.DOMParser().parseFromString(t,"text/html").body;return FH(n)}function Zp(e,t,n){if(e instanceof Mr||e instanceof ce)return e;n={slice:!0,parseOptions:{},...n};let a=typeof e==="object"&&e!==null,i=typeof e==="string";if(a)try{if(Array.isArray(e)&&e.length>0)return ce.fromArray(e.map((u)=>t.nodeFromJSON(u)));let c=t.nodeFromJSON(e);if(n.errorOnInvalidContent)c.check();return c}catch(l){if(n.errorOnInvalidContent)throw Error("[tiptap error]: Invalid JSON content",{cause:l});return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",l),Zp("",t,n)}if(i){if(n.errorOnInvalidContent){let c=!1,u="",f=new qg({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:(h)=>(c=!0,u=typeof h==="string"?h:h.outerHTML,null)}]}})});if(n.slice)Ko.fromSchema(f).parseSlice(fb(e),n.parseOptions);else Ko.fromSchema(f).parse(fb(e),n.parseOptions);if(n.errorOnInvalidContent&&c)throw Error("[tiptap error]: Invalid HTML content",{cause:Error(`Invalid element found: ${u}`)})}let l=Ko.fromSchema(t);if(n.slice)return l.parseSlice(fb(e),n.parseOptions).content;return l.parse(fb(e),n.parseOptions)}return Zp("",t,n)}function UH(e,t,n){let a=e.steps.length-1;if(a<t)return;let i=e.steps[a];if(!(i instanceof bn||i instanceof En))return;let l=e.mapping.maps[a],c=0;l.forEach((u,f,h,m)=>{if(c===0)c=m}),e.setSelection(Ue.near(e.doc.resolve(c),n))}function VH(e){for(let t=0;t<e.edgeCount;t+=1){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function jH(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function gne(e){let t=e.split(/-(?!$)/),n=t[t.length-1];if(n==="Space")n=" ";let a,i,l,c;for(let u=0;u<t.length-1;u+=1){let f=t[u];if(/^(cmd|meta|m)$/i.test(f))c=!0;else if(/^a(lt)?$/i.test(f))a=!0;else if(/^(c|ctrl|control)$/i.test(f))i=!0;else if(/^s(hift)?$/i.test(f))l=!0;else if(/^mod$/i.test(f))if(R1()||jH())c=!0;else i=!0;else throw Error(`Unrecognized modifier name: ${f}`)}if(a)n=`Alt-${n}`;if(i)n=`Ctrl-${n}`;if(c)n=`Meta-${n}`;if(l)n=`Shift-${n}`;return n}function es(e,t,n={}){let{from:a,to:i,empty:l}=e.selection,c=t?Tn(t,e.schema):null,u=[];e.doc.nodesBetween(a,i,(b,y)=>{if(b.isText)return;let v=Math.max(a,y),S=Math.min(i,y+b.nodeSize);u.push({node:b,from:v,to:S})});let f=i-a,h=u.filter((b)=>{if(!c)return!0;return c.name===b.node.type.name}).filter((b)=>T1(b.node.attrs,n,{strict:!1}));if(l)return!!h.length;return h.reduce((b,y)=>b+y.to-y.from,0)>=f}function N1(e,t){if(t.nodes[e])return"node";if(t.marks[e])return"mark";return null}function NH(e,t){let n=typeof t==="string"?[t]:t;return Object.keys(e).reduce((a,i)=>{if(!n.includes(i))a[i]=e[i];return a},{})}function y4(e,t,n={},a={}){return Zp(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:a.errorOnInvalidContent})}function KH(e,t){let n=al(t,e.schema),{from:a,to:i,empty:l}=e.selection,c=[];if(l){if(e.storedMarks)c.push(...e.storedMarks);c.push(...e.selection.$head.marks())}else e.doc.nodesBetween(a,i,(f)=>{c.push(...f.marks)});let u=c.find((f)=>f.type.name===n.name);if(!u)return{};return{...u.attrs}}function w4(e,t){let n=new Xg(e);return t.forEach((a)=>{a.steps.forEach((i)=>{n.step(i)})}),n}function qH(e,t,n){let a=[];return e.nodesBetween(t.from,t.to,(i,l)=>{if(n(i))a.push({node:i,pos:l})}),a}function Nne(e,t){for(let n=e.depth;n>0;n-=1){let a=e.node(n);if(t(a))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:a}}}function O1(e){return(t)=>Nne(t.$from,e)}function He(e,t,n){if(e.config[t]===void 0&&e.parent)return He(e.parent,t,n);if(typeof e.config[t]==="function")return e.config[t].bind({...n,parent:e.parent?He(e.parent,t,n):null});return e.config[t]}function C4(e){return e.map((t)=>{let n={name:t.name,options:t.options,storage:t.storage},a=He(t,"addExtensions",n);if(a)return[t,...C4(a())];return t}).flat(10)}function D1(e,t){let n=Qi.fromSchema(t).serializeFragment(e),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(n),i.innerHTML}function GH(e){return typeof e==="function"}function Bt(e,t=void 0,...n){if(GH(e)){if(t)return e.bind(t)(...n);return e(...n)}return e}function One(e={}){return Object.keys(e).length===0&&e.constructor===Object}function eh(e){let t=e.filter((i)=>i.type==="extension"),n=e.filter((i)=>i.type==="node"),a=e.filter((i)=>i.type==="mark");return{baseExtensions:t,nodeExtensions:n,markExtensions:a}}function WH(e){let t=[],{nodeExtensions:n,markExtensions:a}=eh(e),i=[...n,...a],l={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},c=n.filter((h)=>h.name!=="text").map((h)=>h.name),u=a.map((h)=>h.name),f=[...c,...u];return e.forEach((h)=>{let m={name:h.name,options:h.options,storage:h.storage,extensions:i},b=He(h,"addGlobalAttributes",m);if(!b)return;b().forEach((v)=>{let S;if(Array.isArray(v.types))S=v.types;else if(v.types==="*")S=f;else if(v.types==="nodes")S=c;else if(v.types==="marks")S=u;else S=[];S.forEach((C)=>{Object.entries(v.attributes).forEach(([E,R])=>{t.push({type:C,name:E,attribute:{...l,...R}})})})})}),i.forEach((h)=>{let m={name:h.name,options:h.options,storage:h.storage},b=He(h,"addAttributes",m);if(!b)return;let y=b();Object.entries(y).forEach(([v,S])=>{let C={...l,...S};if(typeof(C==null?void 0:C.default)==="function")C.default=C.default();if((C==null?void 0:C.isRequired)&&(C==null?void 0:C.default)===void 0)delete C.default;t.push({type:h.name,name:v,attribute:C})})}),t}function Dne(e){let t=[],n="",a=!1,i=!1,l=0,c=e.length;for(let u=0;u<c;u+=1){let f=e[u];if(f==="'"&&!i){a=!a,n+=f;continue}if(f==='"'&&!a){i=!i,n+=f;continue}if(!a&&!i){if(f==="("){l+=1,n+=f;continue}if(f===")"&&l>0){l-=1,n+=f;continue}if(f===";"&&l===0){t.push(n),n="";continue}}n+=f}if(n)t.push(n);return t}function OH(e){let t=[],n=Dne(e||""),a=n.length;for(let i=0;i<a;i+=1){let l=n[i],c=l.indexOf(":");if(c===-1)continue;let u=l.slice(0,c).trim(),f=l.slice(c+1).trim();if(u&&f)t.push([u,f])}return t}function $t(...e){return e.filter((t)=>!!t).reduce((t,n)=>{let a={...t};return Object.entries(n).forEach(([i,l])=>{if(!a[i]){a[i]=l;return}if(i==="class"){let u=l?String(l).split(" "):[],f=a[i]?a[i].split(" "):[],h=u.filter((m)=>!f.includes(m));a[i]=[...f,...h].join(" ")}else if(i==="style"){let u=new Map([...OH(a[i]),...OH(l)]);a[i]=Array.from(u.entries()).map(([f,h])=>`${f}: ${h}`).join("; ")}else a[i]=l}),a},{})}function th(e,t){return t.filter((n)=>n.type===e.type.name).filter((n)=>n.attribute.rendered).map((n)=>{if(!n.attribute.renderHTML)return{[n.name]:e.attrs[n.name]};return n.attribute.renderHTML(e.attrs)||{}}).reduce((n,a)=>$t(n,a),{})}function Pne(e){if(typeof e!=="string")return e;if(e.match(/^[+-]?(?:\d*\.)?\d+$/))return Number(e);if(e==="true")return!0;if(e==="false")return!1;return e}function DH(e,t){if("style"in e)return e;return{...e,getAttrs:(n)=>{let a=e.getAttrs?e.getAttrs(n):e.attrs;if(a===!1)return!1;let i=t.reduce((l,c)=>{let u=c.attribute.parseHTML?c.attribute.parseHTML(n):Pne(n.getAttribute(c.name));if(u===null||u===void 0)return l;return{...l,[c.name]:u}},{});return{...a,...i}}}}function PH(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>{if(t==="attrs"&&One(n))return!1;return n!==null&&n!==void 0}))}function LH(e){var t,n;let a={};if(!((t=e==null?void 0:e.attribute)==null?void 0:t.isRequired)&&"default"in((e==null?void 0:e.attribute)||{}))a.default=e.attribute.default;if(((n=e==null?void 0:e.attribute)==null?void 0:n.validate)!==void 0)a.validate=e.attribute.validate;return[e.name,a]}function YH(e,t){var n;let a=WH(e),{nodeExtensions:i,markExtensions:l}=eh(e),c=(n=i.find((h)=>He(h,"topNode")))==null?void 0:n.name,u=Object.fromEntries(i.map((h)=>{let m=a.filter((R)=>R.type===h.name),b={name:h.name,options:h.options,storage:h.storage,editor:t},y=e.reduce((R,D)=>{let U=He(D,"extendNodeSchema",b);return{...R,...U?U(h):{}}},{}),v=PH({...y,content:Bt(He(h,"content",b)),marks:Bt(He(h,"marks",b)),group:Bt(He(h,"group",b)),inline:Bt(He(h,"inline",b)),atom:Bt(He(h,"atom",b)),selectable:Bt(He(h,"selectable",b)),draggable:Bt(He(h,"draggable",b)),code:Bt(He(h,"code",b)),whitespace:Bt(He(h,"whitespace",b)),linebreakReplacement:Bt(He(h,"linebreakReplacement",b)),defining:Bt(He(h,"defining",b)),isolating:Bt(He(h,"isolating",b)),attrs:Object.fromEntries(m.map(LH))}),S=Bt(He(h,"parseHTML",b));if(S)v.parseDOM=S.map((R)=>DH(R,m));let C=He(h,"renderHTML",b);if(C)v.toDOM=(R)=>C({node:R,HTMLAttributes:th(R,m)});let E=He(h,"renderText",b);if(E)v.toText=E;return[h.name,v]})),f=Object.fromEntries(l.map((h)=>{let m=a.filter((E)=>E.type===h.name),b={name:h.name,options:h.options,storage:h.storage,editor:t},y=e.reduce((E,R)=>{let D=He(R,"extendMarkSchema",b);return{...E,...D?D(h):{}}},{}),v=PH({...y,inclusive:Bt(He(h,"inclusive",b)),excludes:Bt(He(h,"excludes",b)),group:Bt(He(h,"group",b)),spanning:Bt(He(h,"spanning",b)),code:Bt(He(h,"code",b)),attrs:Object.fromEntries(m.map(LH))}),S=Bt(He(h,"parseHTML",b));if(S)v.parseDOM=S.map((E)=>DH(E,m));let C=He(h,"renderHTML",b);if(C)v.toDOM=(E)=>C({mark:E,HTMLAttributes:th(E,m)});return[h.name,v]}));return new qg({topNode:c,nodes:u,marks:f})}function Lne(e){let t=e.filter((n,a)=>e.indexOf(n)!==a);return Array.from(new Set(t))}function pb(e){return e.sort((n,a)=>{let i=He(n,"priority")||100,l=He(a,"priority")||100;if(i>l)return-1;if(i<l)return 1;return 0})}function E4(e){let t=pb(C4(e)),n=Lne(t.map((a)=>a.name));if(n.length)console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map((a)=>`'${a}'`).join(", ")}]. This can lead to issues.`);return t}function JH(e,t){let n=E4(e);return YH(n,t)}function XH(e,t){let n=JH(t),a=Mr.fromJSON(n,e);return D1(a.content,n)}function QH(e,t){let n=JH(t),a=fb(e);return Ko.fromSchema(n).parse(a).toJSON()}function ZH(e,t,n){let{from:a,to:i}=t,{blockSeparator:l=`
261
+
262
+ `,textSerializers:c={}}=n||{},u="";return e.nodesBetween(a,i,(f,h,m,b)=>{var y;if(f.isBlock&&h>a)u+=l;let v=c==null?void 0:c[f.type.name];if(v){if(m)u+=v({node:f,pos:h,parent:m,index:b,range:t});return!1}if(f.isText)u+=(y=f==null?void 0:f.text)==null?void 0:y.slice(Math.max(a,h)-h,i-h)}),u}function T4(e,t){let n={from:0,to:e.content.size};return ZH(e,n,t)}function P1(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}function _ne(e,t){let n=Tn(t,e.schema),{from:a,to:i}=e.selection,l=[];e.doc.nodesBetween(a,i,(u)=>{l.push(u)});let c=l.reverse().find((u)=>u.type.name===n.name);if(!c)return{};return{...c.attrs}}function R4(e,t){let n=N1(typeof t==="string"?t:t.name,e.schema);if(n==="node")return _ne(e,t);if(n==="mark")return KH(e,t);return{}}function Ine(e,t=JSON.stringify){let n={};return e.filter((a)=>{let i=t(a);return Object.prototype.hasOwnProperty.call(n,i)?!1:n[i]=!0})}function Bne(e){let t=Ine(e);return t.length===1?t:t.filter((n,a)=>!t.filter((l,c)=>c!==a).some((l)=>n.oldRange.from>=l.oldRange.from&&n.oldRange.to<=l.oldRange.to&&n.newRange.from>=l.newRange.from&&n.newRange.to<=l.newRange.to))}function hb(e){let{mapping:t,steps:n}=e,a=[];return t.maps.forEach((i,l)=>{let c=[];if(!i.ranges.length){let{from:u,to:f}=n[l];if(u===void 0||f===void 0)return;c.push({from:u,to:f})}else i.forEach((u,f)=>{c.push({from:u,to:f})});c.forEach(({from:u,to:f})=>{let h=t.slice(l).map(u,-1),m=t.slice(l).map(f),b=t.invert().map(h,-1),y=t.invert().map(m);a.push({oldRange:{from:b,to:y},newRange:{from:h,to:m}})})}),Bne(a)}function L1(e,t,n){let a=[];if(e===t)n.resolve(e).marks().forEach((i)=>{let l=n.resolve(e),c=S4(l,i.type);if(!c)return;a.push({mark:i,...c})});else n.nodesBetween(e,t,(i,l)=>{if(!i||(i==null?void 0:i.nodeSize)===void 0)return;a.push(...i.marks.map((c)=>({from:l,to:l+i.nodeSize,mark:c})))});return a}function db(e,t){return t.nodes[e]||t.marks[e]||null}function E1(e,t,n){return Object.fromEntries(Object.entries(n).filter(([a])=>{let i=e.find((l)=>l.type===t&&l.name===a);if(!i)return!1;return i.attribute.keepOnSplit}))}function v4(e,t,n={}){let{empty:a,ranges:i}=e.selection,l=t?al(t,e.schema):null;if(a)return!!(e.storedMarks||e.selection.$from.marks()).filter((b)=>{if(!l)return!0;return l.name===b.type.name}).find((b)=>T1(b.attrs,n,{strict:!1}));let c=0,u=[];if(i.forEach(({$from:b,$to:y})=>{let v=b.pos,S=y.pos;e.doc.nodesBetween(v,S,(C,E)=>{if(l&&C.inlineContent&&!C.type.allowsMarkType(l))return!1;if(!C.isText&&!C.marks.length)return;let R=Math.max(v,E),D=Math.min(S,E+C.nodeSize),U=D-R;c+=U,u.push(...C.marks.map((z)=>({mark:z,from:R,to:D})))})}),c===0)return!1;let f=u.filter((b)=>{if(!l)return!0;return l.name===b.mark.type.name}).filter((b)=>T1(b.mark.attrs,n,{strict:!1})).reduce((b,y)=>b+y.to-y.from,0),h=u.filter((b)=>{if(!l)return!0;return b.mark.type!==l&&b.mark.type.excludes(l)}).reduce((b,y)=>b+y.to-y.from,0);return(f>0?f+h:f)>=c}function Hne(e,t,n={}){if(!t)return es(e,null,n)||v4(e,null,n);let a=N1(t,e.schema);if(a==="node")return es(e,t,n);if(a==="mark")return v4(e,t,n);return!1}function _H(e,t){if(Array.isArray(t))return t.some((n)=>(typeof n==="string"?n:n.name)===e.name);return t}function h4(e,t){let{nodeExtensions:n}=eh(t),a=n.find((c)=>c.name===e);if(!a)return!1;let i={name:a.name,options:a.options,storage:a.storage},l=Bt(He(a,"group",i));if(typeof l!=="string")return!1;return l.split(" ").includes("list")}function nh(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){var a;if(n){if(e.type.name==="hardBreak")return!0;if(e.isText)return!/\S/.test((a=e.text)!=null?a:"")}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let i=!0;return e.content.forEach((l)=>{if(i===!1)return;if(!nh(l,{ignoreWhitespace:n,checkChildren:t}))i=!1}),i}return!1}function _1(e){return e instanceof Pe}function Fne(e,t){let n=t.mapping.mapResult(e.position);return{position:new rF(n.pos),mapResult:n}}function Une(e){return new rF(e)}function I1(e,t,n){let i=e.state.doc.content.size,l=ol(t,0,i),c=ol(n,0,i),u=e.coordsAtPos(l),f=e.coordsAtPos(c,-1),h=Math.min(u.top,f.top),m=Math.max(u.bottom,f.bottom),b=Math.min(u.left,f.left),y=Math.max(u.right,f.right),v=y-b,S=m-h,R={top:h,bottom:m,left:b,right:y,width:v,height:S,x:b,y:h};return{...R,toJSON:()=>R}}function Vne(e,t,n){var a;let{selection:i}=t,l=null;if(M1(i))l=i.$cursor;if(l){let u=(a=e.storedMarks)!=null?a:l.marks();return l.parent.type.allowsMarkType(n)&&(!!n.isInSet(u)||!u.some((h)=>h.type.excludes(n)))}let{ranges:c}=i;return c.some(({$from:u,$to:f})=>{let h=u.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(u.pos,f.pos,(m,b,y)=>{if(h)return!1;if(m.isInline){let v=!y||y.type.allowsMarkType(n),S=!!n.isInSet(m.marks)||!m.marks.some((C)=>C.type.excludes(n));h=v&&S}return!h}),h})}function IH(e,t){let n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){let a=n.filter((i)=>t==null?void 0:t.includes(i.type.name));e.tr.ensureMarks(a)}}function BH(e){return!e||e==="1"?null:e}function oF(e,t){return BH(e)===BH(t)}function Zne(e){let t=e.doc,n=t.firstChild;if(!n)return null;let a=t.resolve(1),i=t.resolve(n.nodeSize-1);return Me.between(a,i)}function aF(e,t){let{selection:n}=e,{$from:a}=n;if(n instanceof Pe){let l=a.index();return a.parent.canReplaceWith(l,l+1,t)}let i=a.depth;while(i>=0){let l=a.index(i);if(a.node(i).contentMatchAt(l).matchType(t))return!0;i-=1}return!1}function fre(e,t,n){let a=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(a!==null)return a;let i=document.createElement("style");if(t)i.setAttribute("nonce",t);return i.setAttribute(`data-tiptap-style${n?`-${n}`:""}`,""),i.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(i),i}function iF(e,t){let n=e.getAttribute("style");if(!n)return null;let a=n.split(";").map((l)=>l.trim()).filter(Boolean),i=t.toLowerCase();for(let l=a.length-1;l>=0;l-=1){let c=a[l],u=c.indexOf(":");if(u===-1)continue;if(c.slice(0,u).trim().toLowerCase()===i)return c.slice(u+1).trim()}return null}function pre(e){return typeof e==="number"}function hre(e){return Object.prototype.toString.call(e).slice(8,-1)}function S1(e){if(hre(e)!=="Object")return!1;return e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function k4(e){if(!(e==null?void 0:e.trim()))return{};let t={},n=[],a=e.replace(/["']([^"']*)["']/g,(h)=>(n.push(h),`__QUOTED_${n.length-1}__`)),i=a.match(/(?:^|\s)\.([\w-]+)/g);if(i){let h=i.map((m)=>m.trim().slice(1));t.class=h.join(" ")}let l=a.match(/(?:^|\s)#([\w-]+)/);if(l)t.id=l[1];let c=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(a.matchAll(c)).forEach(([,h,m])=>{var b;let y=parseInt(((b=m.match(/__QUOTED_(\d+)__/))==null?void 0:b[1])||"0",10),v=n[y];if(v)t[h]=v.slice(1,-1)});let f=a.replace(/(?:^|\s)\.([\w-]+)/g,"").replace(/(?:^|\s)#([\w-]+)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();if(f)f.split(/\s+/).filter(Boolean).forEach((m)=>{if(m.match(/^[a-zA-Z][\w-]*$/))t[m]=!0});return t}function A4(e){if(!e||Object.keys(e).length===0)return"";let t=[];if(e.class)String(e.class).split(/\s+/).filter(Boolean).forEach((a)=>t.push(`.${a}`));if(e.id)t.push(`#${e.id}`);return Object.entries(e).forEach(([n,a])=>{if(n==="class"||n==="id")return;if(a===!0)t.push(n);else if(a!==!1&&a!=null)t.push(`${n}="${String(a)}"`)}),t.join(" ")}function gre(e){let{nodeName:t,name:n,parseAttributes:a=k4,serializeAttributes:i=A4,defaultAttributes:l={},requiredAttributes:c=[],allowedAttributes:u}=e,f=n||t,h=(m)=>{if(!u)return m;let b={};return u.forEach((y)=>{if(y in m)b[y]=m[y]}),b};return{parseMarkdown:(m,b)=>{let y={...l,...m.attributes};return b.createNode(t,y,[])},markdownTokenizer:{name:t,level:"block",start(m){var b;let y=new RegExp(`^:::${f}(?:\\s|$)`,"m"),v=(b=m.match(y))==null?void 0:b.index;return v!==void 0?v:-1},tokenize(m,b,y){let v=new RegExp(`^:::${f}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),S=m.match(v);if(!S)return;let C=S[1]||"",E=a(C);if(c.find((D)=>!(D in E)))return;return{type:t,raw:S[0],attributes:E}}},renderMarkdown:(m)=>{let b=h(m.attrs||{}),y=i(b),v=y?` {${y}}`:"";return`:::${f}${v} :::`}}}function bre(e){let{nodeName:t,name:n,getContent:a,parseAttributes:i=k4,serializeAttributes:l=A4,defaultAttributes:c={},content:u="block",allowedAttributes:f}=e,h=n||t,m=(b)=>{if(!f)return b;let y={};return f.forEach((v)=>{if(v in b)y[v]=b[v]}),y};return{parseMarkdown:(b,y)=>{let v;if(a){let C=a(b);v=typeof C==="string"?[{type:"text",text:C}]:C}else if(u==="block")v=y.parseChildren(b.tokens||[]);else v=y.parseInline(b.tokens||[]);let S={...c,...b.attributes};return y.createNode(t,S,v)},markdownTokenizer:{name:t,level:"block",start(b){var y;let v=new RegExp(`^:::${h}`,"m"),S=(y=b.match(v))==null?void 0:y.index;return S!==void 0?S:-1},tokenize(b,y,v){var S;let C=new RegExp(`^:::${h}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),E=b.match(C);if(!E)return;let[R,D=""]=E,U=i(D),z=1,L=R.length,Q="",V=/^:::([\w-]*)(\s.*)?/gm,P=b.slice(L);V.lastIndex=0;for(;;){let re=V.exec(P);if(re===null)break;let J=re.index,ge=re[1];if((S=re[2])==null?void 0:S.endsWith(":::"))continue;if(ge)z+=1;else if(z-=1,z===0){let le=P.slice(0,J);Q=le.trim();let se=b.slice(0,L+J+re[0].length),I=[];if(Q)if(u==="block"){I=v.blockTokens(le),I.forEach((F)=>{if(F.text&&(!F.tokens||F.tokens.length===0))F.tokens=v.inlineTokens(F.text)});while(I.length>0){let F=I[I.length-1];if(F.type==="paragraph"&&(!F.text||F.text.trim()===""))I.pop();else break}}else I=v.inlineTokens(Q);return{type:t,raw:se,attributes:U,content:Q,tokens:I}}}return}},renderMarkdown:(b,y)=>{let v=m(b.attrs||{}),S=l(v),C=S?` {${S}}`:"",E=y.renderChildren(b.content||[],`
263
+
264
+ `);return`:::${h}${C}
265
+
266
+ ${E}
267
+
268
+ :::`}}}function yre(e){if(!e.trim())return{};let t={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g,a=n.exec(e);while(a!==null){let[,i,l,c]=a;t[i]=l||c,a=n.exec(e)}return t}function vre(e){return Object.entries(e).filter(([,t])=>t!==void 0&&t!==null).map(([t,n])=>`${t}="${n}"`).join(" ")}function xre(e){let{nodeName:t,name:n,getContent:a,parseAttributes:i=yre,serializeAttributes:l=vre,defaultAttributes:c={},selfClosing:u=!1,allowedAttributes:f}=e,h=n||t,m=(y)=>{if(!f)return y;let v={};return f.forEach((S)=>{let C=typeof S==="string"?S:S.name,E=typeof S==="string"?void 0:S.skipIfDefault;if(C in y){let R=y[C];if(E!==void 0&&R===E)return;v[C]=R}}),v},b=h.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(y,v)=>{let S={...c,...y.attributes};if(u)return v.createNode(t,S);let C=a?a(y):y.content||"";if(C)return v.createNode(t,S,[v.createTextNode(C)]);return v.createNode(t,S,[])},markdownTokenizer:{name:t,level:"inline",start(y){let v=u?new RegExp(`\\[${b}\\s*[^\\]]*\\]`):new RegExp(`\\[${b}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${b}\\]`),S=y.match(v),C=S==null?void 0:S.index;return C!==void 0?C:-1},tokenize(y,v,S){let C=u?new RegExp(`^\\[${b}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${b}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${b}\\]`),E=y.match(C);if(!E)return;let R="",D="";if(u){let[,z]=E;D=z}else{let[,z,L]=E;D=z,R=L||""}let U=i(D.trim());return{type:t,raw:E[0],content:R.trim(),attributes:U}}},renderMarkdown:(y)=>{let v="";if(a)v=a(y);else if(y.content&&y.content.length>0)v=y.content.filter((R)=>R.type==="text").map((R)=>R.text).join("");let S=m(y.attrs||{}),C=l(S),E=C?` ${C}`:"";if(u)return`[${h}${E}]`;return`[${h}${E}]${v}[/${h}]`}}}function B1(e,t,n){var a,i,l,c;let u=e.split(`
269
+ `),f=[],h="",m=0,b=t.baseIndentSize||2;while(m<u.length){let y=u[m],v=y.match(t.itemPattern);if(!v)if(f.length>0)break;else if(y.trim()===""){m+=1,h=`${h}${y}
270
+ `;continue}else return;let S=t.extractItemData(v),{indentLevel:C,mainContent:E}=S;h=`${h}${y}
271
+ `;let R=[E];m+=1;while(m<u.length){let L=u[m];if(L.trim()===""){let V=u.slice(m+1).findIndex((J)=>J.trim()!=="");if(V===-1)break;if((((i=(a=u[m+1+V].match(/^(\s*)/))==null?void 0:a[1])==null?void 0:i.length)||0)>C){R.push(L),h=`${h}${L}
272
+ `,m+=1;continue}else break}if((((c=(l=L.match(/^(\s*)/))==null?void 0:l[1])==null?void 0:c.length)||0)>C)R.push(L),h=`${h}${L}
273
+ `,m+=1;else break}let D,U=R.slice(1);if(U.length>0){let L=U.map((Q)=>Q.slice(C+b)).join(`
274
+ `);if(L.trim())if(t.customNestedParser)D=t.customNestedParser(L);else D=n.blockTokens(L)}let z=t.createToken(S,D);f.push(z)}if(f.length===0)return;return{items:f,raw:h}}function mb(e,t,n,a){if(!e||!Array.isArray(e.content))return"";let i=typeof n==="function"?n(a):n,[l,...c]=e.content,u=t.renderChildren([l]),f=`${i}${u}`;if(c&&c.length>0)c.forEach((h,m)=>{var b,y;let v=(y=(b=t.renderChild)==null?void 0:b.call(t,h,m+1))!=null?y:t.renderChildren([h]);if(v!==void 0&&v!==null){let S=v.split(`
275
+ `).map((C)=>C?t.indent(C):t.indent("")).join(`
276
+ `);f+=h.type==="paragraph"?`
277
+
278
+ ${S}`:`
279
+ ${S}`}});return f}function sF(e,t){let n={...e};if(S1(e)&&S1(t))Object.keys(t).forEach((a)=>{if(S1(t[a])&&S1(e[a]))n[a]=sF(e[a],t[a]);else n[a]=t[a]});return n}function $re(e,t,n={}){let{state:a}=t,{doc:i,tr:l}=a,c=e;if(i.descendants((u,f)=>{let h=l.mapping.map(f),m=l.mapping.map(f)+u.nodeSize,b=null;if(u.marks.forEach((v)=>{if(v!==c)return!1;b=v}),!b)return;let y=!1;if(Object.keys(n).forEach((v)=>{if(n[v]!==b.attrs[v])y=!0}),y){let v=e.type.create({...e.attrs,...n});l.removeMark(h,m,e.type),l.addMark(h,m,v)}}),l.docChanged)t.view.dispatch(l)}function w1(e){var t;let{editor:n,from:a,to:i,text:l,rules:c,plugin:u}=e,{view:f}=n;if(f.composing)return!1;let h=f.state.doc.resolve(a);if(h.parent.type.spec.code||!!((t=h.nodeBefore||h.nodeAfter)==null?void 0:t.marks.find((y)=>y.type.spec.code)))return!1;let m=!1,b=zne(h)+l;return c.forEach((y)=>{if(m)return;let v=Sre(b,y.find);if(!v)return;let S=v[0].length-l.length;if(S>0){let Q=h.parentOffset-S;if(Q<0||h.parent.textBetween(Q,h.parentOffset)!==v[0].slice(0,S))return}let C=f.state.tr,E=k1({state:f.state,transaction:C}),R={from:a-(v[0].length-l.length),to:i},{commands:D,chain:U,can:z}=new A1({editor:n,state:E});if(y.handler({state:E,range:R,match:v,commands:D,chain:U,can:z})===null||!C.steps.length)return;if(y.undoable)C.setMeta(u,{transform:C,from:a,to:i,text:l});f.dispatch(C),m=!0}),m}function wre(e){let{editor:t,rules:n}=e,a=new qe({state:{init(){return null},apply(i,l,c){let u=i.getMeta(a);if(u)return u;let f=i.getMeta("applyInputRules");if(!!f)setTimeout(()=>{let{text:m}=f;if(typeof m==="string")m=m;else m=D1(ce.from(m),c.schema);let{from:b}=f,y=b+m.length;w1({editor:t,from:b,to:y,text:m,rules:n,plugin:a})});return i.selectionSet||i.docChanged?null:l}},props:{handleTextInput(i,l,c,u){return w1({editor:t,from:l,to:c,text:u,rules:n,plugin:a})},handleDOMEvents:{compositionend:(i)=>(setTimeout(()=>{let{$cursor:l}=i.state.selection;if(l)w1({editor:t,from:l.pos,to:l.pos,text:"",rules:n,plugin:a})}),!1)},handleKeyDown(i,l){if(l.key!=="Enter")return!1;let{$cursor:c}=i.state.selection;if(c)return w1({editor:t,from:c.pos,to:c.pos,text:`
280
+ `,rules:n,plugin:a});return!1}},isInputRules:!0});return a}function Ere(e){let{editor:t,state:n,from:a,to:i,rule:l,pasteEvent:c,dropEvent:u}=e,{commands:f,chain:h,can:m}=new A1({editor:t,state:n}),b=[];return n.doc.nodesBetween(a,i,(v,S)=>{var C,E,R,D,U;if(((E=(C=v.type)==null?void 0:C.spec)==null?void 0:E.code)||!(v.isText||v.isTextblock||v.isInline))return;let z=(U=(D=(R=v.content)==null?void 0:R.size)!=null?D:v.nodeSize)!=null?U:0,L=Math.max(a,S),Q=Math.min(i,S+z);if(L>=Q)return;let V=v.isText?v.text||"":v.textBetween(L-S,Q-S,void 0,"");Cre(V,l.find,c).forEach((re)=>{if(re.index===void 0)return;let J=L+re.index+1,ge=J+re[0].length,le={from:n.tr.mapping.map(J),to:n.tr.mapping.map(ge)},se=l.handler({state:n,range:le,match:re,commands:f,chain:h,can:m,pasteEvent:c,dropEvent:u});b.push(se)})}),b.every((v)=>v!==null)}function Rre(e){let{editor:t,rules:n}=e,a=null,i=!1,l=!1,c=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,u;try{u=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{u=null}let f=({state:m,from:b,to:y,rule:v,pasteEvt:S})=>{let C=m.tr,E=k1({state:m,transaction:C});if(!Ere({editor:t,state:E,from:Math.max(b-1,0),to:y.b-1,rule:v,pasteEvent:S,dropEvent:u})||!C.steps.length)return;try{u=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{u=null}return c=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,C};return n.map((m)=>new qe({view(b){let y=(S)=>{var C;if(a=((C=b.dom.parentElement)==null?void 0:C.contains(S.target))?b.dom.parentElement:null,a)C1=t},v=()=>{if(C1)C1=null};return window.addEventListener("dragstart",y),window.addEventListener("dragend",v),{destroy(){window.removeEventListener("dragstart",y),window.removeEventListener("dragend",v)}}},props:{handleDOMEvents:{drop:(b,y)=>{if(l=a===b.dom.parentElement,u=y,!l){let v=C1;if(v==null?void 0:v.isEditable)setTimeout(()=>{let S=v.state.selection;if(S)v.commands.deleteRange({from:S.from,to:S.to})},10)}return!1},paste:(b,y)=>{var v;let S=(v=y.clipboardData)==null?void 0:v.getData("text/html");return c=y,i=!!(S==null?void 0:S.includes("data-pm-slice")),!1}}},appendTransaction:(b,y,v)=>{let S=b[0],C=S.getMeta("uiEvent")==="paste"&&!i,E=S.getMeta("uiEvent")==="drop"&&!l,R=S.getMeta("applyPasteRules"),D=!!R;if(!C&&!E&&!D)return;if(D){let{text:L}=R;if(typeof L==="string")L=L;else L=D1(ce.from(L),v.schema);let{from:Q}=R,V=Q+L.length,P=Tre(L);return f({rule:m,state:v,from:Q,to:{b:V},pasteEvt:P})}let U=y.doc.content.findDiffStart(v.doc.content),z=y.doc.content.findDiffEnd(v.doc.content);if(!pre(U)||!z||U===z.b)return;return f({rule:m,state:v,from:U,to:z,pasteEvt:c})}}))}function bo(e){return new rh({find:e.find,handler:({state:t,range:n,match:a})=>{let i=Bt(e.getAttributes,void 0,a);if(i===!1||i===null)return null;let{tr:l}=t,c=a[a.length-1],u=a[0];if(c){let f=u.search(/\S/),h=n.from+u.indexOf(c),m=h+c.length;if(L1(n.from,n.to,t.doc).filter((v)=>v.mark.type.excluded.find((C)=>C===e.type&&C!==v.mark.type)).filter((v)=>v.to>h).length)return null;if(m<n.to)l.delete(m,n.to);if(h>n.from)l.delete(n.from+f,h);let y=n.from+f+c.length;l.addMark(n.from+f,y,e.type.create(i||{})),l.removeStoredMark(e.type)}},undoable:e.undoable})}function xF(e){return new rh({find:e.find,handler:({state:t,range:n,match:a})=>{let i=Bt(e.getAttributes,void 0,a)||{},{tr:l}=t,c=n.from,u=n.to,f=e.type.create(i);if(a[1]){let h=a[0].lastIndexOf(a[1]),m=c+h;if(m>u)m=u;else u=m+a[1].length;let b=a[0][a[0].length-1];l.insertText(b,c+a[0].length-1),l.replaceWith(m,u,f)}else if(a[0]){let h=e.type.isInline?c:c-1;l.insert(h,e.type.create(i)).delete(l.mapping.map(c),l.mapping.map(u))}l.scrollIntoView()},undoable:e.undoable})}function gb(e){return new rh({find:e.find,handler:({state:t,range:n,match:a})=>{let i=t.doc.resolve(n.from),l=Bt(e.getAttributes,void 0,a)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,l)},undoable:e.undoable})}function ts(e){return new rh({find:e.find,handler:({state:t,range:n,match:a,chain:i})=>{let l=Bt(e.getAttributes,void 0,a)||{},c=t.tr.delete(n.from,n.to),f=c.doc.resolve(n.from).blockRange(),h=f&&Vp(f,e.type,l);if(!h)return null;if(c.wrap(f,h),e.keepMarks&&e.editor){let{selection:b,storedMarks:y}=t,{splittableMarks:v}=e.editor.extensionManager,S=y||b.$to.parentOffset&&b.$from.marks();if(S){let C=S.filter((E)=>v.includes(E.type.name));c.ensureMarks(C)}}if(e.keepAttributes){let b=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(b,l).run()}let m=c.doc.resolve(n.from-1).nodeBefore;if(m&&m.type===e.type&&$a(c.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(a,m)))c.join(n.from-1)},undoable:e.undoable})}function Pr(e){return new N4({find:e.find,handler:({state:t,range:n,match:a,pasteEvent:i})=>{let l=Bt(e.getAttributes,void 0,a,i);if(l===!1||l===null)return null;let{tr:c}=t,u=a[a.length-1],f=a[0],h=n.to;if(u){let m=f.search(/\S/),b=n.from+f.indexOf(u),y=b+u.length;if(L1(n.from,n.to,t.doc).filter((C)=>C.mark.type.excluded.find((R)=>R===e.type&&R!==C.mark.type)).filter((C)=>C.to>b).length)return null;if(y<n.to)c.delete(y,n.to);if(b>n.from)c.delete(n.from+m,b);if(h=n.from+m+u.length,c.addMark(n.from+m,h,e.type.create(l||{})),!(a.index!==void 0&&a.input!==void 0&&a.index+a[0].length>=a.input.length))c.removeStoredMark(e.type)}}})}var Bte,x4=(e,t)=>{for(var n in t)Bte(e,n,{get:t[n],enumerable:!0})},A1=class{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:e,editor:t,state:n}=this,{view:a}=t,{tr:i}=n,l=this.buildProps(i);return Object.fromEntries(Object.entries(e).map(([c,u])=>[c,(...h)=>{let m=u(...h)(l);if(!i.getMeta("preventDispatch")&&!this.hasCustomState)a.dispatch(i);return m}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){let{rawCommands:n,editor:a,state:i}=this,{view:l}=a,c=[],u=!!e,f=e||i.tr,h=()=>{if(!u&&t&&!f.getMeta("preventDispatch")&&!this.hasCustomState)l.dispatch(f);return c.every((b)=>b===!0)},m={...Object.fromEntries(Object.entries(n).map(([b,y])=>[b,(...S)=>{let C=this.buildProps(f,t),E=y(...S)(C);return c.push(E),m}])),run:h};return m}createCan(e){let{rawCommands:t,state:n}=this,a=!1,i=e||n.tr,l=this.buildProps(i,!1);return{...Object.fromEntries(Object.entries(t).map(([u,f])=>[u,(...h)=>f(...h)({...l,dispatch:void 0})])),chain:()=>this.createChain(i,!1)}}buildProps(e,t=!0){let{rawCommands:n,editor:a,state:i}=this,{view:l}=a,c={tr:e,editor:a,view:l,state:k1({state:i,transaction:e}),dispatch:t?()=>{return}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([u,f])=>[u,(...h)=>f(...h)(c)]))}};return c}},zH,zte=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;if(!e.isDestroyed)t.dom.blur(),(n=window==null?void 0:window.getSelection())==null||n.removeAllRanges()}),!0),Hte=(e=!0)=>({commands:t})=>t.setContent("",{emitUpdate:e}),Fte=()=>({state:e,tr:t,dispatch:n})=>{let{selection:a}=t,{ranges:i}=a;if(!n)return!0;return i.forEach(({$from:l,$to:c})=>{e.doc.nodesBetween(l.pos,c.pos,(u,f)=>{if(u.type.isText)return;let{doc:h,mapping:m}=t,b=h.resolve(m.map(f)),y=h.resolve(m.map(f+u.nodeSize)),v=b.blockRange(y);if(!v)return;let S=Js(v);if(u.type.isTextblock){let{defaultType:C}=b.parent.contentMatchAt(b.index());t.setNodeMarkup(v.start,C)}if(S||S===0)t.lift(v,S)})}),!0},Ute=(e)=>(t)=>e(t),Vte=()=>({state:e,dispatch:t})=>NR(e,t),jte=(e,t)=>({editor:n,tr:a})=>{let{state:i}=n,l=i.doc.slice(e.from,e.to);a.deleteRange(e.from,e.to);let c=a.mapping.map(t);return a.insert(c,l.content),a.setSelection(new Me(a.doc.resolve(Math.max(c-1,0)))),!0},Kte=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,a=n.$anchor.node();if(a.content.size>0)return!1;let i=e.selection.$anchor;for(let l=i.depth;l>0;l-=1)if(i.node(l).type===a.type){if(t){let u=i.before(l),f=i.after(l);e.delete(u,f).scrollIntoView()}return!0}return!1},qte=(e)=>({tr:t,state:n,dispatch:a})=>{let i=Tn(e,n.schema),l=t.selection.$anchor;for(let c=l.depth;c>0;c-=1)if(l.node(c).type===i){if(a){let f=l.before(c),h=l.after(c);t.delete(f,h).scrollIntoView()}return!0}return!1},Gte=(e)=>({tr:t,dispatch:n})=>{let{from:a,to:i}=e;if(n)t.delete(a,i);return!0},Wte=(e)=>{if(!e.content)return!1;return/^text(\*|\+)/.test(e.content)},kH=(e,t,n)=>{if(!e.parent.isInline)return e.pos;if(n==="left"&&e.pos>e.start()||n==="right"&&e.pos<e.end())return e.pos;let a=t.nodes[e.parent.type.name].spec;if(!Wte(a))return e.pos;return n==="left"?e.start()-1:e.end()+1},Yte=(e,t,n)=>{let a=kH(e,n,"left"),i=kH(t,n,"right");return{from:a,to:i}},Jte=()=>({state:e,dispatch:t})=>{if(e.selection.empty)return!1;if(t){let n=e.tr,{ranges:a}=e.selection,i=n.steps.length;if(a.forEach((l)=>{let c=n.mapping.slice(i),u=n.doc.resolve(c.map(l.$from.pos)),f=n.doc.resolve(c.map(l.$to.pos)),{from:h,to:m}=Yte(u,f,e.schema);n.deleteRange(h,m)}),!n.selection.empty)n.setSelection(Me.near(n.doc.resolve(n.selection.from)));n.scrollIntoView(),t(n)}return!0},Xte=()=>({commands:e})=>e.keyboardShortcut("Enter"),Qte=()=>({state:e,dispatch:t})=>MR(e,t),Zte=(e,t)=>({tr:n,state:a,dispatch:i})=>{let l=al(e,a.schema),{doc:c,selection:u}=n,{$from:f,from:h,to:m}=u;if(i){let b=S4(f,l,t);if(b&&b.from<=h&&b.to>=m){let y=Me.create(c,b.from,b.to);n.setSelection(y)}}return!0},ene=(e)=>(t)=>{let n=typeof e==="function"?e(t):e;for(let a=0;a<n.length;a+=1)if(n[a](t))return!0;return!1},nne=(e=null,t={})=>({editor:n,view:a,tr:i,dispatch:l})=>{t={scrollIntoView:!0,...t};let c=()=>{if(R1()||MH())a.dom.focus();if(tne()&&!R1()&&!MH())a.dom.focus({preventScroll:!0});requestAnimationFrame(()=>{if(!n.isDestroyed){if(a.focus(),t==null?void 0:t.scrollIntoView)n.commands.scrollIntoView()}})};try{if(a.hasFocus()&&e===null||e===!1)return!0}catch{return!1}if(l&&e===null&&!M1(n.state.selection))return c(),!0;let u=b4(i.doc,e)||n.state.selection,f=n.state.selection.eq(u);if(l){if(!f)i.setSelection(u);if(f&&i.storedMarks)i.setStoredMarks(i.storedMarks);c()}return!0},rne=(e,t)=>(n)=>e.every((a,i)=>t(a,{...n,index:i})),one=(e,t)=>({tr:n,commands:a})=>a.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),FH=(e)=>{let t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){let a=t[n];if(a.nodeType===3&&a.nodeValue&&/^(\n\s\s|\n)$/.test(a.nodeValue))e.removeChild(a);else if(a.nodeType===1)FH(a)}return e},ane=(e)=>!("type"in e),ine=(e,t,n)=>({tr:a,dispatch:i,editor:l})=>{var c;if(i){n={parseOptions:l.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let u,f=(E)=>{l.emit("contentError",{editor:l,error:E,disableCollaboration:()=>{if("collaboration"in l.storage&&typeof l.storage.collaboration==="object"&&l.storage.collaboration)l.storage.collaboration.isDisabled=!0}})},h={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!l.options.enableContentCheck&&l.options.emitContentError)try{Zp(t,l.schema,{parseOptions:h,errorOnInvalidContent:!0})}catch(E){f(E)}try{u=Zp(t,l.schema,{parseOptions:h,errorOnInvalidContent:(c=n.errorOnInvalidContent)!=null?c:l.options.enableContentCheck})}catch(E){return f(E),!1}let{from:m,to:b}=typeof e==="number"?{from:e,to:e}:{from:e.from,to:e.to},y=!0,v=!0;if((ane(u)?u:[u]).forEach((E)=>{E.check(),y=y?E.isText&&E.marks.length===0:!1,v=v?E.isBlock:!1}),m===b&&v){let{parent:E}=a.doc.resolve(m);if(E.isTextblock&&!E.type.spec.code&&!E.childCount)m-=1,b+=1}let C;if(y){if(Array.isArray(t))C=t.map((E)=>E.text||"").join("");else if(t instanceof ce){let E="";t.forEach((R)=>{if(R.text)E+=R.text}),C=E}else if(typeof t==="object"&&!!t&&!!t.text)C=t.text;else C=t;a.insertText(C,m,b)}else{C=u;let E=a.doc.resolve(m),R=E.node(),D=E.parentOffset===0,U=R.isText||R.isTextblock,z=R.content.size>0;if(D&&U&&z&&v)m=Math.max(0,m-1);a.replaceWith(m,b,C)}if(n.updateSelection)UH(a,a.steps.length-1,-1);if(n.applyInputRules)a.setMeta("applyInputRules",{from:m,text:C});if(n.applyPasteRules)a.setMeta("applyPasteRules",{from:m,text:C})}return!0},sne=(e={})=>({tr:t,dispatch:n,editor:a})=>{let{pos:i,attrs:l,content:c,updateSelection:u=!0}=e,f;if(typeof i==="number")f=t.doc.resolve(i);else if(i)f=i;else f=t.selection.$from;let h=VH(f.parent.contentMatchAt(f.index()));if(!h)return!1;let m=Object.keys(h.spec.attrs||{}),b=l?Object.fromEntries(Object.entries(l).filter(([v])=>m.includes(v))):{},y;if(c){let v=Zp(c,a.schema);y=h.createAndFill(b,v)}else y=h.createAndFill(b);if(!y)return!1;if(n){if(t.insert(f.pos,y),u)UH(t,t.steps.length-1,-1)}return!0},lne=()=>({state:e,dispatch:t})=>JB(e,t),cne=()=>({state:e,dispatch:t})=>XB(e,t),une=()=>({state:e,dispatch:t})=>SR(e,t),dne=()=>({state:e,dispatch:t})=>ER(e,t),fne=()=>({state:e,dispatch:t,tr:n})=>{try{let a=Ed(e.doc,e.selection.$from.pos,-1);if(a===null||a===void 0)return!1;if(n.join(a,2),t)t(n);return!0}catch{return!1}},pne=()=>({state:e,dispatch:t,tr:n})=>{try{let a=Ed(e.doc,e.selection.$from.pos,1);if(a===null||a===void 0)return!1;if(n.join(a,2),t)t(n);return!0}catch{return!1}},hne=()=>({state:e,dispatch:t})=>qB(e,t),mne=()=>({state:e,dispatch:t})=>GB(e,t),bne=(e)=>({editor:t,view:n,tr:a,dispatch:i})=>{let l=gne(e).split(/-(?!$)/),c=l.find((h)=>!["Alt","Ctrl","Meta","Shift"].includes(h)),u=new KeyboardEvent("keydown",{key:c==="Space"?" ":c,altKey:l.includes("Alt"),ctrlKey:l.includes("Ctrl"),metaKey:l.includes("Meta"),shiftKey:l.includes("Shift"),bubbles:!0,cancelable:!0}),f=t.captureTransaction(()=>{n.someProp("handleKeyDown",(h)=>h(n,u))});return f==null||f.steps.forEach((h)=>{let m=h.map(a.mapping);if(m&&i)a.maybeStep(m)}),!0},yne=(e,t={})=>({state:n,dispatch:a})=>{let i=Tn(e,n.schema);if(!es(n,i,t))return!1;return QB(n,a)},vne=()=>({state:e,dispatch:t})=>OR(e,t),xne=(e)=>({state:t,dispatch:n})=>{let a=Tn(e,t.schema);return az(a)(t,n)},$ne=()=>({state:e,dispatch:t})=>kR(e,t),Sne=(e,t)=>({tr:n,state:a,dispatch:i})=>{let l=null,c=null,u=N1(typeof e==="string"?e:e.name,a.schema);if(!u)return!1;if(u==="node")l=Tn(e,a.schema);if(u==="mark")c=al(e,a.schema);let f=!1;return n.selection.ranges.forEach((h)=>{a.doc.nodesBetween(h.$from.pos,h.$to.pos,(m,b)=>{if(l&&l===m.type){if(f=!0,i)n.setNodeMarkup(b,void 0,NH(m.attrs,t))}if(c&&m.marks.length)m.marks.forEach((y)=>{if(c===y.type){if(f=!0,i)n.addMark(b,b+m.nodeSize,c.create(NH(y.attrs,t)))}})})}),f},wne=()=>({tr:e,dispatch:t})=>{if(t)e.scrollIntoView();return!0},Cne=()=>({tr:e,dispatch:t})=>{if(t){let n=new vr(e.doc);e.setSelection(n)}return!0},Ene=()=>({state:e,dispatch:t})=>wR(e,t),Tne=()=>({state:e,dispatch:t})=>TR(e,t),Rne=()=>({state:e,dispatch:t})=>ZB(e,t),kne=()=>({state:e,dispatch:t})=>PR(e,t),Ane=()=>({state:e,dispatch:t})=>DR(e,t),Mne=(e,{errorOnInvalidContent:t,emitUpdate:n=!0,parseOptions:a={}}={})=>({editor:i,tr:l,dispatch:c,commands:u})=>{let{doc:f}=l;if(a.preserveWhitespace!=="full"){let h=y4(e,i.schema,a,{errorOnInvalidContent:t!=null?t:i.options.enableContentCheck});if(c)l.replaceWith(0,f.content.size,h).setMeta("preventUpdate",!n);return!0}if(c)l.setMeta("preventUpdate",!n);return u.insertContentAt({from:0,to:f.content.size},e,{parseOptions:a,errorOnInvalidContent:t!=null?t:i.options.enableContentCheck})},eF=(e,t,n,a=20)=>{let i=e.doc.resolve(n),l=a,c=null;while(l>0&&c===null){let u=i.node(l);if((u==null?void 0:u.type.name)===t)c=u;else l-=1}return[c,l]},zne=(e,t=500)=>{let n="",a=e.parentOffset;return e.parent.nodesBetween(Math.max(0,a-t),a,(i,l,c,u)=>{var f,h;let m=((h=(f=i.type.spec).toText)==null?void 0:h.call(f,{node:i,pos:l,parent:c,index:u}))||i.textContent||"%leaf%";n+=i.isAtom&&!i.isText?m:m.slice(0,Math.max(0,a-l))}),n},tF=(e,t)=>{let{$from:n,$to:a,$anchor:i}=e.selection;if(t){let l=O1((u)=>u.type.name===t)(e.selection);if(!l)return!1;let c=e.doc.resolve(l.pos+1);if(i.pos+1===c.end())return!0;return!1}if(a.parentOffset<a.parent.nodeSize-2||n.pos!==a.pos)return!1;return!0},nF=(e)=>{let{$from:t,$to:n}=e.selection;if(t.parentOffset>0||t.pos!==n.pos)return!1;return!0},rF=class e{constructor(t){this.position=t}static fromJSON(t){return new e(t.position)}toJSON(){return{position:this.position}}},jne=(e,t={})=>({tr:n,state:a,dispatch:i})=>{let{selection:l}=n,{empty:c,ranges:u}=l,f=al(e,a.schema);if(i)if(c){let h=KH(a,f);n.addStoredMark(f.create({...h,...t}))}else u.forEach((h)=>{let m=h.$from.pos,b=h.$to.pos;a.doc.nodesBetween(m,b,(y,v)=>{let S=Math.max(v,m),C=Math.min(v+y.nodeSize,b);if(y.marks.find((R)=>R.type===f))y.marks.forEach((R)=>{if(f===R.type)n.addMark(S,C,f.create({...R.attrs,...t}))});else n.addMark(S,C,f.create(t))})});return Vne(a,n,f)},Kne=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),qne=(e,t={})=>({state:n,dispatch:a,chain:i})=>{let l=Tn(e,n.schema),c;if(n.selection.$anchor.sameParent(n.selection.$head))c=n.selection.$anchor.parent.attrs;if(!l.isTextblock)return console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1;return i().command(({commands:u})=>{if(LR(l,{...c,...t})(n))return!0;return u.clearNodes()}).command(({state:u})=>LR(l,{...c,...t})(u,a)).run()},Gne=(e)=>({tr:t,dispatch:n})=>{if(n){let{doc:a}=t,i=ol(e,0,a.content.size),l=Pe.create(a,i);t.setSelection(l)}return!0},Wne=(e,t)=>({tr:n,state:a,dispatch:i})=>{let{selection:l}=a,c,u;if(typeof t==="number")c=t,u=t;else if(t&&"from"in t&&"to"in t)c=t.from,u=t.to;else c=l.from,u=l.to;if(i)n.doc.nodesBetween(c,u,(f,h)=>{if(f.isText)return;n.setNodeMarkup(h,void 0,{...f.attrs,dir:e})});return!0},Yne=(e)=>({tr:t,dispatch:n})=>{if(n){let{doc:a}=t,{from:i,to:l}=typeof e==="number"?{from:e,to:e}:e,c=Me.atStart(a).from,u=Me.atEnd(a).to,f=ol(i,c,u),h=ol(l,c,u),m=Me.create(a,f,h);t.setSelection(m)}return!0},Jne=(e)=>({state:t,dispatch:n})=>{let a=Tn(e,t.schema);return iz(a)(t,n)},Xne=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:a,editor:i})=>{let{selection:l,doc:c}=t,{$from:u,$to:f}=l,h=i.extensionManager.attributes,m=E1(h,u.node().type.name,u.node().attrs);if(l instanceof Pe&&l.node.isBlock){if(!u.parentOffset||!Go(c,u.pos))return!1;if(a){if(e)IH(n,i.extensionManager.splittableMarks);t.split(u.pos).scrollIntoView()}return!0}if(!u.parent.isBlock)return!1;let b=f.parentOffset===f.parent.content.size,y=u.depth===0?void 0:VH(u.node(-1).contentMatchAt(u.indexAfter(-1))),v=b&&y?[{type:y,attrs:m}]:void 0,S=Go(t.doc,t.mapping.map(u.pos),1,v);if(!v&&!S&&Go(t.doc,t.mapping.map(u.pos),1,y?[{type:y}]:void 0))S=!0,v=y?[{type:y,attrs:m}]:void 0;if(a){if(S){if(l instanceof Me)t.deleteSelection();if(t.split(t.mapping.map(u.pos),1,v),y&&!b&&!u.parentOffset&&u.parent.type!==y){let C=t.mapping.map(u.before()),E=t.doc.resolve(C);if(u.node(-1).canReplaceWith(E.index(),E.index()+1,y))t.setNodeMarkup(t.mapping.map(u.before()),y)}}if(e)IH(n,i.extensionManager.splittableMarks);t.scrollIntoView()}return S},Qne=(e,t={})=>({tr:n,state:a,dispatch:i,editor:l})=>{var c;let u=Tn(e,a.schema),{$from:f,$to:h}=a.selection,m=a.selection.node;if(m&&m.isBlock||f.depth<2||!f.sameParent(h))return!1;let b=f.node(-1);if(b.type!==u)return!1;let y=l.extensionManager.attributes;if(f.parent.content.size===0&&f.node(-1).childCount===f.indexAfter(-1)){if(f.depth===2||f.node(-3).type!==u||f.index(-2)!==f.node(-2).childCount-1)return!1;if(i){let R=ce.empty,D=f.index(-1)?1:f.index(-2)?2:3;for(let P=f.depth-D;P>=f.depth-3;P-=1)R=ce.from(f.node(P).copy(R));let U=f.indexAfter(-1)<f.node(-2).childCount?1:f.indexAfter(-2)<f.node(-3).childCount?2:3,z={...E1(y,f.node().type.name,f.node().attrs),...t},L=((c=u.contentMatch.defaultType)==null?void 0:c.createAndFill(z))||void 0;R=R.append(ce.from(u.createAndFill(null,L)||void 0));let Q=f.before(f.depth-(D-1));n.replace(Q,f.after(-U),new Se(R,4-D,0));let V=-1;if(n.doc.nodesBetween(Q,n.doc.content.size,(P,re)=>{if(V>-1)return!1;if(P.isTextblock&&P.content.size===0)V=re+1}),V>-1)n.setSelection(Me.near(n.doc.resolve(V)));n.scrollIntoView()}return!0}let v=h.pos===f.end()?b.contentMatchAt(0).defaultType:null,S={...E1(y,b.type.name,b.attrs),...t},C={...E1(y,f.node().type.name,f.node().attrs),...t};n.delete(f.pos,h.pos);let E=v?[{type:u,attrs:S},{type:v,attrs:C}]:[{type:u,attrs:S}];if(!Go(n.doc,f.pos,2))return!1;if(i){let{selection:R,storedMarks:D}=a,{splittableMarks:U}=l.extensionManager,z=D||R.$to.parentOffset&&R.$from.marks();if(n.split(f.pos,2,E).scrollIntoView(),!z||!i)return!0;let L=z.filter((Q)=>U.includes(Q.type.name));n.ensureMarks(L)}return!0},m4=(e,t)=>{let n=O1((c)=>c.type===t)(e.selection);if(!n)return!0;let a=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(a===void 0)return!0;let i=e.doc.nodeAt(a);if(!(n.node.type===(i==null?void 0:i.type)&&$a(e.doc,n.pos)))return!0;if(!oF(n.node.attrs.type,i==null?void 0:i.attrs.type))return!0;return e.join(n.pos),!0},g4=(e,t)=>{let n=O1((c)=>c.type===t)(e.selection);if(!n)return!0;let a=e.doc.resolve(n.start).after(n.depth);if(a===void 0)return!0;let i=e.doc.nodeAt(a);if(!(n.node.type===(i==null?void 0:i.type)&&$a(e.doc,a)))return!0;if(!oF(n.node.attrs.type,i==null?void 0:i.attrs.type))return!0;return e.join(a),!0},ere=(e,t,n,a={})=>({editor:i,tr:l,state:c,dispatch:u,chain:f,commands:h,can:m})=>{let{extensions:b,splittableMarks:y}=i.extensionManager,v=Tn(e,c.schema),S=Tn(t,c.schema),{selection:C,storedMarks:E}=c,{$from:R,$to:D}=C,U=R.blockRange(D),z=E||C.$to.parentOffset&&C.$from.marks();if(!U)return!1;let L=O1((se)=>h4(se.type.name,b))(C),Q=C.from===0&&C.to===c.doc.content.size,V=c.doc.content.content,P=V.length===1?V[0]:null,re=Q&&P&&h4(P.type.name,b)?{node:P,pos:0,depth:0}:null,J=L!=null?L:re,ge=!!L&&U.depth>=1&&U.depth-L.depth<=1,le=!!re;if((ge||le)&&J){if(J.node.type===v){if(Q&&le)return f().command(({tr:se,dispatch:I})=>{let F=Zne(se);if(!F)return!1;if(se.setSelection(F),I)I(se);return!0}).liftListItem(S).run();return h.liftListItem(S)}if(h4(J.node.type.name,b)&&v.validContent(J.node.content))return f().command(()=>(l.setNodeMarkup(J.pos,v),!0)).command(()=>m4(l,v)).command(()=>g4(l,v)).run()}if(!n||!z||!u)return f().command(()=>{if(m().wrapInList(v,a))return!0;return h.clearNodes()}).wrapInList(v,a).command(()=>m4(l,v)).command(()=>g4(l,v)).run();return f().command(()=>{let se=m().wrapInList(v,a),I=z.filter((F)=>y.includes(F.type.name));if(l.ensureMarks(I),se)return!0;return h.clearNodes()}).wrapInList(v,a).command(()=>m4(l,v)).command(()=>g4(l,v)).run()},tre=(e,t={},n={})=>({state:a,commands:i})=>{let{extendEmptyMarkRange:l=!1}=n,c=al(e,a.schema);if(v4(a,c,t))return i.unsetMark(c,{extendEmptyMarkRange:l});return i.setMark(c,t)},nre=(e,t,n={})=>({state:a,commands:i})=>{let l=Tn(e,a.schema),c=Tn(t,a.schema),u=es(a,l,n),f;if(a.selection.$anchor.sameParent(a.selection.$head))f=a.selection.$anchor.parent.attrs;if(u)return i.setNode(c,f);return i.setNode(l,{...f,...n})},rre=(e,t={})=>({state:n,commands:a})=>{let i=Tn(e,n.schema);if(es(n,i,t))return a.lift(i);return a.wrapIn(i,t)},ore=()=>({state:e,dispatch:t})=>{let n=e.plugins;for(let a=0;a<n.length;a+=1){let i=n[a],l;if(i.spec.isInputRules&&(l=i.getState(e))){if(t){let c=e.tr,u=l.transform;for(let f=u.steps.length-1;f>=0;f-=1)c.step(u.steps[f].invert(u.docs[f]));if(l.text){let f=c.doc.resolve(l.from).marks();c.replaceWith(l.from,l.to,e.schema.text(l.text,f))}else c.delete(l.from,l.to)}return!0}}return!1},are=(e={})=>({tr:t,dispatch:n,editor:a})=>{let{ignoreClearable:i=!1}=e,{selection:l}=t,{empty:c,ranges:u}=l;if(c)return!0;let{nonClearableMarks:f}=a.extensionManager;if(n){let h=Object.values(a.schema.marks).filter((m)=>i||!f.includes(m.name));u.forEach((m)=>{for(let b of h)t.removeMark(m.$from.pos,m.$to.pos,b)})}return!0},ire=(e,t={})=>({tr:n,state:a,dispatch:i})=>{var l;let{extendEmptyMarkRange:c=!1}=t,{selection:u}=n,f=al(e,a.schema),{$from:h,empty:m,ranges:b}=u;if(!i)return!0;if(m&&c){let{from:y,to:v}=u,S=(l=h.marks().find((E)=>E.type===f))==null?void 0:l.attrs,C=S4(h,f,S);if(C)y=C.from,v=C.to;n.removeMark(y,v,f)}else b.forEach((y)=>{n.removeMark(y.$from.pos,y.$to.pos,f)});return n.removeStoredMark(f),!0},sre=(e)=>({tr:t,state:n,dispatch:a})=>{let{selection:i}=n,l,c;if(typeof e==="number")l=e,c=e;else if(e&&"from"in e&&"to"in e)l=e.from,c=e.to;else l=i.from,c=i.to;if(a)t.doc.nodesBetween(l,c,(u,f)=>{if(u.isText)return;let h={...u.attrs};delete h.dir,t.setNodeMarkup(f,void 0,h)});return!0},lre=(e,t={})=>({tr:n,state:a,dispatch:i})=>{let l=null,c=null,u=N1(typeof e==="string"?e:e.name,a.schema);if(!u)return!1;if(u==="node")l=Tn(e,a.schema);if(u==="mark")c=al(e,a.schema);let f=!1;return n.selection.ranges.forEach((h)=>{let m=h.$from.pos,b=h.$to.pos,y,v,S,C;if(n.selection.empty)a.doc.nodesBetween(m,b,(E,R)=>{if(l&&l===E.type)f=!0,S=Math.max(R,m),C=Math.min(R+E.nodeSize,b),y=R,v=E});else a.doc.nodesBetween(m,b,(E,R)=>{if(R<m&&l&&l===E.type)f=!0,S=Math.max(R,m),C=Math.min(R+E.nodeSize,b),y=R,v=E;if(R>=m&&R<=b){if(l&&l===E.type){if(f=!0,i)n.setNodeMarkup(R,void 0,{...E.attrs,...t})}if(c&&E.marks.length)E.marks.forEach((D)=>{if(c===D.type){if(f=!0,i){let U=Math.max(R,m),z=Math.min(R+E.nodeSize,b);n.addMark(U,z,c.create({...D.attrs,...t}))}}})}});if(v){if(y!==void 0&&i)n.setNodeMarkup(y,void 0,{...v.attrs,...t});if(c&&v.marks.length)v.marks.forEach((E)=>{if(c===E.type&&i)n.addMark(S,C,c.create({...E.attrs,...t}))})}}),f},cre=(e,t={})=>({state:n,dispatch:a})=>{let i=Tn(e,n.schema);return nz(i,t)(n,a)},ure=(e,t={})=>({state:n,dispatch:a})=>{let i=Tn(e,n.schema);return oz(i,t)(n,a)},dre=class{constructor(){this.callbacks={}}on(e,t){if(!this.callbacks[e])this.callbacks[e]=[];return this.callbacks[e].push(t),this}emit(e,...t){let n=this.callbacks[e];if(n)n.forEach((a)=>a.apply(this,t));return this}off(e,t){let n=this.callbacks[e];if(n)if(t)this.callbacks[e]=n.filter((a)=>a!==t);else delete this.callbacks[e];return this}once(e,t){let n=(...a)=>{this.off(e,n),t.apply(this,a)};return this.on(e,n)}removeAllListeners(){this.callbacks={}}},mre,rh=class{constructor(e){var t;this.find=e.find,this.handler=e.handler,this.undoable=(t=e.undoable)!=null?t:!0}},Sre=(e,t)=>{if($4(t))return t.exec(e);let n=t(e);if(!n)return null;let a=[n.text];if(a.index=n.index,a.input=e,a.data=n.data,n.replaceWith){if(!n.text.includes(n.replaceWith))console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".');a.push(n.replaceWith)}return a},M4=class{constructor(e={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...e},this.name=this.config.name}get options(){return{...Bt(He(this,"addOptions",{name:this.name}))}}get storage(){return{...Bt(He(this,"addStorage",{name:this.name,options:this.options}))}}configure(e={}){let t=this.extend({...this.config,addOptions:()=>sF(this.options,e)});return t.name=this.name,t.parent=this.parent,this.child=null,t}extend(e={}){let t=new this.constructor({...this.config,...e});return t.parent=this,this.child=t,t.name="name"in e?e.name:t.parent.name,t}},Qr,N4=class{constructor(e){this.find=e.find,this.handler=e.handler}},Cre=(e,t,n)=>{if($4(t))return[...e.matchAll(t)];let a=t(e,n);if(!a)return[];return a.map((i)=>{let l=[i.text];if(l.index=i.index,l.input=e,l.data=i.data,i.replaceWith){if(!i.text.includes(i.replaceWith))console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".');l.push(i.replaceWith)}return l})},C1=null,Tre=(e)=>{var t;let n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=n.clipboardData)==null||t.setData("text/html",e),n},z1=class{constructor(e,t){this.splittableMarks=[],this.nonClearableMarks=[],this.editor=t,this.baseExtensions=e,this.extensions=E4(e),this.schema=YH(this.extensions,t),this.setupExtensions()}get commands(){return this.extensions.reduce((e,t)=>{let n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:db(t.name,this.schema)},a=He(t,"addCommands",n);if(!a)return e;return{...e,...a()}},{})}get plugins(){let{editor:e}=this;return pb([...this.extensions].reverse()).flatMap((a)=>{let i={name:a.name,options:a.options,storage:this.editor.extensionStorage[a.name],editor:e,type:db(a.name,this.schema)},l=[],c=He(a,"addKeyboardShortcuts",i),u={};if(a.type==="mark"&&He(a,"exitable",i))u.ArrowRight=()=>Qr.handleExit({editor:e,mark:a});if(c){let y=Object.fromEntries(Object.entries(c()).map(([v,S])=>[v,()=>S({editor:e})]));u={...u,...y}}let f=TH(u);l.push(f);let h=He(a,"addInputRules",i);if(_H(a,e.options.enableInputRules)&&h){let y=h();if(y&&y.length){let v=wre({editor:e,rules:y}),S=Array.isArray(v)?v:[v];l.push(...S)}}let m=He(a,"addPasteRules",i);if(_H(a,e.options.enablePasteRules)&&m){let y=m();if(y&&y.length){let v=Rre({editor:e,rules:y});l.push(...v)}}let b=He(a,"addProseMirrorPlugins",i);if(b){let y=b();l.push(...y)}return l})}get attributes(){return WH(this.extensions)}get nodeViews(){let{editor:e}=this,{nodeExtensions:t}=eh(this.extensions);return Object.fromEntries(t.filter((n)=>!!He(n,"addNodeView")).map((n)=>{let a=this.attributes.filter((f)=>f.type===n.name),i={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:Tn(n.name,this.schema)},l=He(n,"addNodeView",i);if(!l)return[];let c=l();if(!c)return[];let u=(f,h,m,b,y)=>{let v=th(f,a);return c({node:f,view:h,getPos:m,decorations:b,innerDecorations:y,editor:e,extension:n,HTMLAttributes:v})};return[n.name,u]}))}dispatchTransaction(e){let{editor:t}=this;return pb([...this.extensions].reverse()).reduceRight((a,i)=>{let l={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:t,type:db(i.name,this.schema)},c=He(i,"dispatchTransaction",l);if(!c)return a;return(u)=>{c.call(l,{transaction:u,next:a})}},e)}transformPastedHTML(e){let{editor:t}=this;return pb([...this.extensions]).reduce((a,i)=>{let l={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:t,type:db(i.name,this.schema)},c=He(i,"transformPastedHTML",l);if(!c)return a;return(u,f)=>{let h=a(u,f);return c.call(l,h)}},e||((a)=>a))}get markViews(){let{editor:e}=this,{markExtensions:t}=eh(this.extensions);return Object.fromEntries(t.filter((n)=>!!He(n,"addMarkView")).map((n)=>{let a=this.attributes.filter((u)=>u.type===n.name),i={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:al(n.name,this.schema)},l=He(n,"addMarkView",i);if(!l)return[];let c=(u,f,h)=>{let m=th(u,a);return l()({mark:u,view:f,inline:h,editor:e,extension:n,HTMLAttributes:m,updateAttributes:(b)=>{$re(u,e,b)}})};return[n.name,c]}))}destroy(){this.extensions.forEach((e)=>{let t=e;while(t.parent){let n=t.parent;if(n.child===t)n.child=null;t=n}}),this.extensions=[],this.baseExtensions=[],this.schema=null,this.editor=null}setupExtensions(){let e=this.extensions;this.editor.extensionStorage=Object.fromEntries(e.map((t)=>[t.name,t.storage])),e.forEach((t)=>{var n,a;let i={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:db(t.name,this.schema)};if(t.type==="mark"){if((n=Bt(He(t,"keepOnSplit",i)))!=null?n:!0)this.splittableMarks.push(t.name);if(!((a=Bt(He(t,"clearable",i)))!=null?a:!0))this.nonClearableMarks.push(t.name)}let l=He(t,"onBeforeCreate",i),c=He(t,"onCreate",i),u=He(t,"onUpdate",i),f=He(t,"onSelectionUpdate",i),h=He(t,"onTransaction",i),m=He(t,"onFocus",i),b=He(t,"onBlur",i),y=He(t,"onDestroy",i);if(l)this.editor.on("beforeCreate",l);if(c)this.editor.on("create",c);if(u)this.editor.on("update",u);if(f)this.editor.on("selectionUpdate",f);if(h)this.editor.on("transaction",h);if(m)this.editor.on("focus",m);if(b)this.editor.on("blur",b);if(y)this.editor.on("destroy",y)})}},kre,St,lF,cF,uF,dF,fF,pF,hF,mF,gF,bF,yF,Are=class e{constructor(t,n,a=!1,i=null){this.currentNode=null,this.actualDepth=null,this.isBlock=a,this.resolvedPos=t,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 t;return(t=this.actualDepth)!=null?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let n=this.from,a=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,a=this.to-1}this.editor.commands.insertContentAt({from:n,to:a},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){if(this.isBlock)return this.pos;return this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){if(this.isBlock)return this.pos+this.size;return this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;let t=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(t);return new e(n,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));if(t.depth!==this.depth)t=this.resolvedPos.doc.resolve(this.from-3);return new e(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));if(t.depth!==this.depth)t=this.resolvedPos.doc.resolve(this.to+3);return new e(t,this.editor)}get children(){let t=[];return this.node.content.forEach((n,a)=>{let i=n.isBlock&&!n.isTextblock,l=n.isAtom&&!n.isText,c=n.isInline,u=this.pos+a+(l?0:1);if(u<0||u>this.resolvedPos.doc.nodeSize-2)return;let f=this.resolvedPos.doc.resolve(u);if(!i&&!c&&f.depth<=this.depth)return;let h=new e(f,this.editor,i,i||c?n:null);if(i)h.actualDepth=this.depth+1;t.push(h)}),t}get firstChild(){return this.children[0]||null}get lastChild(){let t=this.children;return t[t.length-1]||null}closest(t,n={}){let a=null,i=this.parent;while(i&&!a){if(i.node.type.name===t)if(Object.keys(n).length>0){let l=i.node.attrs,c=Object.keys(n);for(let u=0;u<c.length;u+=1){let f=c[u];if(l[f]!==n[f])break}}else a=i;i=i.parent}return a}querySelector(t,n={}){return this.querySelectorAll(t,n,!0)[0]||null}querySelectorAll(t,n={},a=!1){let i=[];if(!this.children||this.children.length===0)return i;let l=Object.keys(n);return this.children.forEach((c)=>{if(a&&i.length>0)return;if(c.node.type.name===t){if(l.every((f)=>n[f]===c.node.attrs[f]))i.push(c)}if(a&&i.length>0)return;i=i.concat(c.querySelectorAll(t,n,a))}),i}setAttribute(t){let{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...t}),this.editor.view.dispatch(n)}},Mre=`.ProseMirror {
281
+ position: relative;
282
+ }
283
+
284
+ .ProseMirror {
285
+ word-wrap: break-word;
286
+ white-space: pre-wrap;
287
+ white-space: break-spaces;
288
+ -webkit-font-variant-ligatures: none;
289
+ font-variant-ligatures: none;
290
+ font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
291
+ }
292
+
293
+ .ProseMirror [contenteditable="false"] {
294
+ white-space: normal;
295
+ }
296
+
297
+ .ProseMirror [contenteditable="false"] [contenteditable="true"] {
298
+ white-space: pre-wrap;
299
+ }
300
+
301
+ .ProseMirror pre {
302
+ white-space: pre-wrap;
303
+ }
304
+
305
+ img.ProseMirror-separator {
306
+ display: inline !important;
307
+ border: none !important;
308
+ margin: 0 !important;
309
+ width: 0 !important;
310
+ height: 0 !important;
311
+ }
312
+
313
+ .ProseMirror-gapcursor {
314
+ display: none;
315
+ pointer-events: none;
316
+ position: absolute;
317
+ margin: 0;
318
+ }
319
+
320
+ .ProseMirror-gapcursor:after {
321
+ content: "";
322
+ display: block;
323
+ position: absolute;
324
+ top: -2px;
325
+ width: 20px;
326
+ border-top: 1px solid black;
327
+ animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
328
+ }
329
+
330
+ @keyframes ProseMirror-cursor-blink {
331
+ to {
332
+ visibility: hidden;
333
+ }
334
+ }
335
+
336
+ .ProseMirror-hideselection *::selection {
337
+ background: transparent;
338
+ }
339
+
340
+ .ProseMirror-hideselection *::-moz-selection {
341
+ background: transparent;
342
+ }
343
+
344
+ .ProseMirror-hideselection * {
345
+ caret-color: transparent;
346
+ }
347
+
348
+ .ProseMirror-focused .ProseMirror-gapcursor {
349
+ display: block;
350
+ }`,vF,en;var Ye=N(()=>{ni();Nr();at();at();Nr();at();at();at();Sa();Sa();at();ni();Nr();ni();ni();Nr();Nr();Nr();Nr();d1();Nr();at();Nr();Nr();Nr();Nr();Nr();ni();Sa();Sa();Sa();Sa();Sa();at();Nr();at();at();d1();at();ni();Sa();at();ni();at();ni();Nr();d1();at();Hc();RH();at();Sa();at();Sa();at();at();ni();at();at();at();at();at();at();at();ni();at();Bte=Object.defineProperty;zH={};x4(zH,{blur:()=>zte,clearContent:()=>Hte,clearNodes:()=>Fte,command:()=>Ute,createParagraphNear:()=>Vte,cut:()=>jte,deleteCurrentNode:()=>Kte,deleteNode:()=>qte,deleteRange:()=>Gte,deleteSelection:()=>Jte,enter:()=>Xte,exitCode:()=>Qte,extendMarkRange:()=>Zte,first:()=>ene,focus:()=>nne,forEach:()=>rne,insertContent:()=>one,insertContentAt:()=>ine,insertDefaultBlock:()=>sne,joinBackward:()=>une,joinDown:()=>cne,joinForward:()=>dne,joinItemBackward:()=>fne,joinItemForward:()=>pne,joinTextblockBackward:()=>hne,joinTextblockForward:()=>mne,joinUp:()=>lne,keyboardShortcut:()=>bne,lift:()=>yne,liftEmptyBlock:()=>vne,liftListItem:()=>xne,newlineInCode:()=>$ne,resetAttributes:()=>Sne,scrollIntoView:()=>wne,selectAll:()=>Cne,selectNodeBackward:()=>Ene,selectNodeForward:()=>Tne,selectParentNode:()=>Rne,selectTextblockEnd:()=>kne,selectTextblockStart:()=>Ane,setContent:()=>Mne,setMark:()=>jne,setMeta:()=>Kne,setNode:()=>qne,setNodeSelection:()=>Gne,setTextDirection:()=>Wne,setTextSelection:()=>Yne,sinkListItem:()=>Jne,splitBlock:()=>Xne,splitListItem:()=>Qne,toggleList:()=>ere,toggleMark:()=>tre,toggleNode:()=>nre,toggleWrap:()=>rre,undoInputRule:()=>ore,unsetAllMarks:()=>are,unsetMark:()=>ire,unsetTextDirection:()=>sre,updateAttributes:()=>lre,wrapIn:()=>cre,wrapInList:()=>ure});mre={};x4(mre,{createAtomBlockMarkdownSpec:()=>gre,createBlockMarkdownSpec:()=>bre,createInlineMarkdownSpec:()=>xre,parseAttributes:()=>k4,parseIndentedBlocks:()=>B1,renderNestedMarkdownContent:()=>mb,serializeAttributes:()=>A4});Qr=class e extends M4{constructor(){super(...arguments);this.type="mark"}static create(t={}){let n=typeof t==="function"?t():t;return new e(n)}static handleExit({editor:t,mark:n}){let{tr:a}=t.state,i=t.state.selection.$from;if(i.pos===i.end()){let c=i.marks();if(!c.find((h)=>(h==null?void 0:h.type.name)===n.name))return!1;let f=c.find((h)=>(h==null?void 0:h.type.name)===n.name);if(f)a.removeStoredMark(f);return a.insertText(" ",i.pos),t.view.dispatch(a),!0}return!1}configure(t){return super.configure(t)}extend(t){let n=typeof t==="function"?t():t;return super.extend(n)}};z1.resolve=E4;z1.sort=pb;z1.flatten=C4;kre={};x4(kre,{ClipboardTextSerializer:()=>lF,Commands:()=>cF,Delete:()=>uF,Drop:()=>dF,Editable:()=>fF,FocusEvents:()=>hF,Keymap:()=>mF,Paste:()=>gF,Tabindex:()=>bF,TextDirection:()=>yF,focusEventsPluginKey:()=>pF});St=class e extends M4{constructor(){super(...arguments);this.type="extension"}static create(t={}){let n=typeof t==="function"?t():t;return new e(n)}configure(t){return super.configure(t)}extend(t){let n=typeof t==="function"?t():t;return super.extend(n)}},lF=St.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new qe({key:new Qe("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{let{editor:e}=this,{state:t,schema:n}=e,{doc:a,selection:i}=t,l=P1(n),{blockSeparator:c}=this.options,u={...c!==void 0?{blockSeparator:c}:{},textSerializers:l};return[...i.ranges].sort((h,m)=>h.$from.pos-m.$from.pos).map(({$from:h,$to:m})=>ZH(a,{from:h.pos,to:m.pos},u)).join(c!=null?c:`
351
+
352
+ `)}}})]}}),cF=St.create({name:"commands",addCommands(){return{...zH}}}),uF=St.create({name:"delete",onUpdate({transaction:e,appendedTransactions:t}){var n,a,i;let l=()=>{var c,u,f,h;if((h=(f=(u=(c=this.editor.options.coreExtensionOptions)==null?void 0:c.delete)==null?void 0:u.filterTransaction)==null?void 0:f.call(u,e))!=null?h:e.getMeta("y-sync$"))return;let m=w4(e.before,[e,...t]);hb(m).forEach((v)=>{if(m.mapping.mapResult(v.oldRange.from).deletedAfter&&m.mapping.mapResult(v.oldRange.to).deletedBefore)m.before.nodesBetween(v.oldRange.from,v.oldRange.to,(S,C)=>{let E=C+S.nodeSize-2,R=v.oldRange.from<=C&&E<=v.oldRange.to;this.editor.emit("delete",{type:"node",node:S,from:C,to:E,newFrom:m.mapping.map(C),newTo:m.mapping.map(E),deletedRange:v.oldRange,newRange:v.newRange,partial:!R,editor:this.editor,transaction:e,combinedTransform:m})})});let y=m.mapping;m.steps.forEach((v,S)=>{var C,E;if(v instanceof xa){let R=y.slice(S).map(v.from,-1),D=y.slice(S).map(v.to),U=y.invert().map(R,-1),z=y.invert().map(D),L=R>0?(C=m.doc.nodeAt(R-1))==null?void 0:C.marks.some((V)=>V.eq(v.mark)):!1,Q=(E=m.doc.nodeAt(D))==null?void 0:E.marks.some((V)=>V.eq(v.mark));this.editor.emit("delete",{type:"mark",mark:v.mark,from:v.from,to:v.to,deletedRange:{from:U,to:z},newRange:{from:R,to:D},partial:Boolean(Q||L),editor:this.editor,transaction:e,combinedTransform:m})}})};if((i=(a=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:a.async)!=null?i:!0)setTimeout(l,0);else l()}}),dF=St.create({name:"drop",addProseMirrorPlugins(){return[new qe({key:new Qe("tiptapDrop"),props:{handleDrop:(e,t,n,a)=>{this.editor.emit("drop",{editor:this.editor,event:t,slice:n,moved:a})}}})]}}),fF=St.create({name:"editable",addProseMirrorPlugins(){return[new qe({key:new Qe("editable"),props:{editable:()=>this.editor.options.editable}})]}}),pF=new Qe("focusEvents"),hF=St.create({name:"focusEvents",addProseMirrorPlugins(){let{editor:e}=this;return[new qe({key:pF,props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;let a=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(a),!1},blur:(t,n)=>{e.isFocused=!1;let a=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(a),!1}}}})]}}),mF=St.create({name:"keymap",addKeyboardShortcuts(){let e=()=>this.editor.commands.first(({commands:c})=>[()=>c.undoInputRule(),()=>c.command(({tr:u})=>{let{selection:f,doc:h}=u,{empty:m,$anchor:b}=f,{pos:y,parent:v}=b,S=b.parent.isTextblock&&y>0?u.doc.resolve(y-1):b,C=S.parent.type.spec.isolating,E=b.pos-b.parentOffset,R=C&&S.parent.childCount===1?E===b.pos:Ue.atStart(h).from===y;if(!m||!v.type.isTextblock||v.textContent.length||!R||R&&b.parent.type.name==="paragraph")return!1;return c.clearNodes()}),()=>c.deleteSelection(),()=>c.joinBackward(),()=>c.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:c})=>[()=>c.deleteSelection(),()=>c.deleteCurrentNode(),()=>c.joinForward(),()=>c.selectNodeForward()]),a={Enter:()=>this.editor.commands.first(({commands:c})=>[()=>c.newlineInCode(),()=>c.createParagraphNear(),()=>c.liftEmptyBlock(),()=>c.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},i={...a},l={...a,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};if(R1()||jH())return l;return i},addProseMirrorPlugins(){return[new qe({key:new Qe("clearDocument"),appendTransaction:(e,t,n)=>{if(e.some((C)=>C.getMeta("composition")))return;let a=e.some((C)=>C.docChanged)&&!t.doc.eq(n.doc),i=e.some((C)=>C.getMeta("preventClearDocument"));if(!a||i)return;let{empty:l,from:c,to:u}=t.selection,f=Ue.atStart(t.doc).from,h=Ue.atEnd(t.doc).to;if(l||!(c===f&&u===h))return;if(!nh(n.doc))return;let y=n.tr,v=k1({state:n,transaction:y}),{commands:S}=new A1({editor:this.editor,state:v});if(S.clearNodes(),!y.steps.length)return;return y}})]}}),gF=St.create({name:"paste",addProseMirrorPlugins(){return[new qe({key:new Qe("tiptapPaste"),props:{handlePaste:(e,t,n)=>{this.editor.emit("paste",{editor:this.editor,event:t,slice:n})}}})]}}),bF=St.create({name:"tabindex",addOptions(){return{value:void 0}},addProseMirrorPlugins(){return[new qe({key:new Qe("tabindex"),props:{attributes:()=>{var e;if(!this.editor.isEditable&&this.options.value===void 0)return{};return{tabindex:(e=this.options.value)!=null?e:"0"}}}})]}}),yF=St.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];let{nodeExtensions:e}=eh(this.extensions);return[{types:e.filter((t)=>t.name!=="text").map((t)=>t.name),attributes:{dir:{default:this.options.direction,parseHTML:(t)=>{let n=t.getAttribute("dir");if(n&&(n==="ltr"||n==="rtl"||n==="auto"))return n;return this.options.direction},renderHTML:(t)=>{if(!t.dir)return{};return{dir:t.dir}}}}}]},addProseMirrorPlugins(){return[new qe({key:new Qe("textDirection"),props:{attributes:()=>{let e=this.options.direction;if(!e)return{};return{dir:e}}}})]}}),vF=class extends dre{constructor(e={}){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:Fne,createMappablePosition:Une},this.setOptions(e),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:a,moved:i})=>this.options.onDrop(n,a,i)),this.on("paste",({event:n,slice:a})=>this.options.onPaste(n,a)),this.on("delete",this.options.onDelete);let t=this.createDoc();if(!this.editorState){let n=b4(t,this.options.autofocus);this.editorState=Mc.create({doc:t,schema:this.schema,selection:n||void 0})}if(this.options.element)this.mount(this.options.element)}mount(e){if(typeof document>"u")throw Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");if(this.createView(e),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css))document.head.appendChild(this.css);window.setTimeout(()=>{if(this.isDestroyed)return;if(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){let e=this.editorView.dom;if(e==null?void 0:e.editor)delete e.editor;this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{if(typeof this.css.remove==="function")this.css.remove();else if(this.css.parentNode)this.css.parentNode.removeChild(this.css)}catch(e){console.warn("Failed to remove CSS element:",e)}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(){if(this.options.injectCSS&&typeof document<"u")this.css=fre(Mre,this.options.injectNonce)}setOptions(e={}){if(this.options={...this.options,...e},!this.editorView||!this.state||this.isDestroyed)return;if(this.options.editorProps)this.view.setProps(this.options.editorProps);this.view.updateState(this.state)}setEditable(e,t=!0){if(this.setOptions({editable:e}),t)this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){if(this.editorView)return this.editorView;return new Proxy({state:this.editorState,updateState:(e)=>{this.editorState=e},dispatch:(e)=>{this.dispatchTransaction(e)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(e,t)=>{if(this.editorView)return this.editorView[t];if(t==="state")return this.editorState;if(t in e)return Reflect.get(e,t);throw Error(`[tiptap error]: The editor view is not available. Cannot access view['${t}']. The editor may not be mounted yet.`)}})}get state(){if(this.editorView)this.editorState=this.view.state;return this.editorState}registerPlugin(e,t){let n=GH(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],a=this.state.reconfigure({plugins:n});return this.view.updateState(a),a}unregisterPlugin(e){if(this.isDestroyed)return;let t=this.state.plugins,n=t;if([].concat(e).forEach((i)=>{let l=typeof i==="string"?`${i}$`:i.key;n=n.filter((c)=>!c.key.startsWith(l))}),t.length===n.length)return;let a=this.state.reconfigure({plugins:n});return this.view.updateState(a),a}createExtensionManager(){var e,t,n,a;let l=[...this.options.enableCoreExtensions?[fF,lF.configure({blockSeparator:(t=(e=this.options.coreExtensionOptions)==null?void 0:e.clipboardTextSerializer)==null?void 0:t.blockSeparator}),cF,hF,mF,bF.configure({value:(a=(n=this.options.coreExtensionOptions)==null?void 0:n.tabindex)==null?void 0:a.value}),dF,gF,uF,yF.configure({direction:this.options.textDirection})].filter((c)=>{if(typeof this.options.enableCoreExtensions==="object")return this.options.enableCoreExtensions[c.name]!==!1;return!0}):[],...this.options.extensions].filter((c)=>["extension","node","mark"].includes(c==null?void 0:c.type));this.extensionManager=new z1(l,this)}createCommandManager(){this.commandManager=new A1({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=y4(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(t){if(!(t instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(t.message))throw t;let n=y4(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1});return this.editorState=Mc.create({doc:n,schema:this.schema,selection:b4(n,this.options.autofocus)||void 0}),this.emit("contentError",{editor:this,error:t,disableCollaboration:()=>{if("collaboration"in this.storage&&typeof this.storage.collaboration==="object"&&this.storage.collaboration)this.storage.collaboration.isDisabled=!0;this.options.extensions=this.options.extensions.filter((a)=>a.name!=="collaboration"),this.createExtensionManager()}}),this.editorState.doc}return e}createView(e){let{editorProps:t,enableExtensionDispatchTransaction:n}=this.options,a=t.dispatchTransaction||this.dispatchTransaction.bind(this),i=n?this.extensionManager.dispatchTransaction(a):a,l=t.transformPastedHTML,c=this.extensionManager.transformPastedHTML(l);this.editorView=new v1(e,{...t,attributes:{role:"textbox",...t==null?void 0:t.attributes},dispatchTransaction:i,transformPastedHTML:c,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});let u=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(u),this.prependClass(),this.injectCSS();let f=this.view.dom;f.editor=this}createNodeViews(){if(this.view.isDestroyed)return;this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;let t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach((h)=>{var m;return(m=this.capturedTransaction)==null?void 0:m.step(h)});return}let{state:t,transactions:n}=this.state.applyTransaction(e),a=!this.state.selection.eq(t.selection),i=n.includes(e),l=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:e,nextState:t}),!i)return;if(this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e,appendedTransactions:n.slice(1)}),a)this.emit("selectionUpdate",{editor:this,transaction:e});let c=n.findLast((h)=>h.getMeta("focus")||h.getMeta("blur")),u=c==null?void 0:c.getMeta("focus"),f=c==null?void 0:c.getMeta("blur");if(u)this.emit("focus",{editor:this,event:u.event,transaction:c});if(f)this.emit("blur",{editor:this,event:f.event,transaction:c});if(e.getMeta("preventUpdate")||!n.some((h)=>h.docChanged)||l.doc.eq(t.doc))return;this.emit("update",{editor:this,transaction:e,appendedTransactions:n.slice(1)})}getAttributes(e){return R4(this.state,e)}isActive(e,t){let n=typeof e==="string"?e:null,a=typeof e==="string"?t:e;return Hne(this.state,n,a)}getJSON(){return this.state.doc.toJSON()}getHTML(){return D1(this.state.doc.content,this.schema)}getText(e){let{blockSeparator:t=`
353
+
354
+ `,textSerializers:n={}}=e||{};return T4(this.state.doc,{blockSeparator:t,textSerializers:{...P1(this.schema),...n}})}get isEmpty(){return nh(this.state.doc)}destroy(){if(this.destroyed)return;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 e,t;return(t=(e=this.editorView)==null?void 0:e.isDestroyed)!=null?t:!0}$node(e,t){var n;return((n=this.$doc)==null?void 0:n.querySelector(e,t))||null}$nodes(e,t){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(e,t))||null}$pos(e){let t=this.state.doc.resolve(e),n=e>0&&t.nodeAfter&&!t.nodeAfter.isText&&t.nodeAfter.isAtom?t.nodeAfter:null;return new Are(t,this,!1,n)}get $doc(){return this.$pos(0)}};en=class e extends M4{constructor(){super(...arguments);this.type="node"}static create(t={}){let n=typeof t==="function"?t():t;return new e(n)}configure(t){return super.configure(t)}extend(t){let n=typeof t==="function"?t():t;return super.extend(n)}}});function O4(e,t){return function(a,i,l){return e(a,i,l)&&t(a,i,l)}}function H1(e){return function(n,a,i){if(!n||!a||typeof n!=="object"||typeof a!=="object")return e(n,a,i);let{cache:l}=i,c=l.get(n),u=l.get(a);if(c&&u)return c===a&&u===n;l.set(n,a),l.set(a,n);let f=e(n,a,i);return l.delete(n),l.delete(a),f}}function Pre(e){return e!=null?e[Symbol.toStringTag]:void 0}function $F(e){return Nre(e).concat(Ore(e))}function Od(e,t){return e===t||!e&&!t&&e!==e&&t!==t}function zre(e,t){return e.byteLength===t.byteLength&&F1(new Uint8Array(e),new Uint8Array(t))}function Hre(e,t,n){let a=e.length;if(t.length!==a)return!1;while(a-- >0)if(!n.equals(e[a],t[a],a,a,e,t,n))return!1;return!0}function Fre(e,t){return e.byteLength===t.byteLength&&F1(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function Ure(e,t){return Od(e.getTime(),t.getTime())}function Vre(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function jre(e,t){return e===t}function CF(e,t,n){let a=e.size;if(a!==t.size)return!1;if(!a)return!0;let i=Array(a),l=e.entries(),c,u,f=0;while(c=l.next()){if(c.done)break;let h=t.entries(),m=!1,b=0;while(u=h.next()){if(u.done)break;if(i[b]){b++;continue}let y=c.value,v=u.value;if(n.equals(y[0],v[0],f,b,e,t,n)&&n.equals(y[1],v[1],y[0],v[0],e,t,n)){m=i[b]=!0;break}b++}if(!m)return!1;f++}return!0}function qre(e,t,n){let a=wF(e),i=a.length;if(wF(t).length!==i)return!1;while(i-- >0)if(!TF(e,t,n,a[i]))return!1;return!0}function bb(e,t,n){let a=$F(e),i=a.length;if($F(t).length!==i)return!1;let l,c,u;while(i-- >0){if(l=a[i],!TF(e,t,n,l))return!1;if(c=SF(e,l),u=SF(t,l),(c||u)&&(!c||!u||c.configurable!==u.configurable||c.enumerable!==u.enumerable||c.writable!==u.writable))return!1}return!0}function Gre(e,t){return Od(e.valueOf(),t.valueOf())}function Wre(e,t){return e.source===t.source&&e.flags===t.flags}function EF(e,t,n){let a=e.size;if(a!==t.size)return!1;if(!a)return!0;let i=Array(a),l=e.values(),c,u;while(c=l.next()){if(c.done)break;let f=t.values(),h=!1,m=0;while(u=f.next()){if(u.done)break;if(!i[m]&&n.equals(c.value,u.value,c.value,u.value,e,t,n)){h=i[m]=!0;break}m++}if(!h)return!1}return!0}function F1(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;while(n-- >0)if(e[n]!==t[n])return!1;return!0}function Yre(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function TF(e,t,n,a){if((a===Bre||a===Ire||a===_re)&&(e.$$typeof||t.$$typeof))return!0;return Lre(t,a)&&n.equals(e[a],t[a],a,a,e,t,n)}function doe({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:a,areErrorsEqual:i,areFunctionsEqual:l,areMapsEqual:c,areNumbersEqual:u,areObjectsEqual:f,arePrimitiveWrappersEqual:h,areRegExpsEqual:m,areSetsEqual:b,areTypedArraysEqual:y,areUrlsEqual:v,unknownTagComparators:S}){return function(E,R,D){if(E===R)return!0;if(E==null||R==null)return!1;let U=typeof E;if(U!==typeof R)return!1;if(U!=="object"){if(U==="number")return u(E,R,D);if(U==="function")return l(E,R,D);return!1}let z=E.constructor;if(z!==R.constructor)return!1;if(z===Object)return f(E,R,D);if(Array.isArray(E))return t(E,R,D);if(z===Date)return a(E,R,D);if(z===RegExp)return m(E,R,D);if(z===Map)return c(E,R,D);if(z===Set)return b(E,R,D);let L=uoe.call(E);if(L===eoe)return a(E,R,D);if(L===aoe)return m(E,R,D);if(L===noe)return c(E,R,D);if(L===ioe)return b(E,R,D);if(L===ooe)return typeof E.then!=="function"&&typeof R.then!=="function"&&f(E,R,D);if(L===coe)return v(E,R,D);if(L===toe)return i(E,R,D);if(L===Xre)return f(E,R,D);if(loe[L])return y(E,R,D);if(L===Jre)return e(E,R,D);if(L===Zre)return n(E,R,D);if(L===Qre||L===roe||L===soe)return h(E,R,D);if(S){let Q=S[L];if(!Q){let V=Pre(E);if(V)Q=S[V]}if(Q)return Q(E,R,D)}return!1}}function foe({circular:e,createCustomConfig:t,strict:n}){let a={areArrayBuffersEqual:zre,areArraysEqual:n?bb:Hre,areDataViewsEqual:Fre,areDatesEqual:Ure,areErrorsEqual:Vre,areFunctionsEqual:jre,areMapsEqual:n?O4(CF,bb):CF,areNumbersEqual:Kre,areObjectsEqual:n?bb:qre,arePrimitiveWrappersEqual:Gre,areRegExpsEqual:Wre,areSetsEqual:n?O4(EF,bb):EF,areTypedArraysEqual:n?O4(F1,bb):F1,areUrlsEqual:Yre,unknownTagComparators:void 0};if(t)a=Object.assign({},a,t(a));if(e){let i=H1(a.areArraysEqual),l=H1(a.areMapsEqual),c=H1(a.areObjectsEqual),u=H1(a.areSetsEqual);a=Object.assign({},a,{areArraysEqual:i,areMapsEqual:l,areObjectsEqual:c,areSetsEqual:u})}return a}function poe(e){return function(t,n,a,i,l,c,u){return e(t,n,u)}}function hoe({circular:e,comparator:t,createState:n,equals:a,strict:i}){if(n)return function(u,f){let{cache:h=e?new WeakMap:void 0,meta:m}=n();return t(u,f,{cache:h,equals:a,meta:m,strict:i})};if(e)return function(u,f){return t(u,f,{cache:new WeakMap,equals:a,meta:void 0,strict:i})};let l={cache:void 0,equals:a,meta:void 0,strict:i};return function(u,f){return t(u,f,l)}}function Fc(e={}){let{circular:t=!1,createInternalComparator:n,createState:a,strict:i=!1}=e,l=foe(e),c=doe(l),u=n?n(c):poe(c);return hoe({circular:t,comparator:c,createState:a,equals:u,strict:i})}var Nre,Ore,Dre,Lre,_re="__v",Ire="__o",Bre="_owner",SF,wF,Kre,Jre="[object ArrayBuffer]",Xre="[object Arguments]",Qre="[object Boolean]",Zre="[object DataView]",eoe="[object Date]",toe="[object Error]",noe="[object Map]",roe="[object Number]",ooe="[object Object]",aoe="[object RegExp]",ioe="[object Set]",soe="[object String]",loe,coe="[object URL]",uoe,RF,Yke,Jke,Xke,Qke,Zke,eAe,tAe;var kF=N(()=>{({getOwnPropertyNames:Nre,getOwnPropertySymbols:Ore}=Object),{hasOwnProperty:Dre}=Object.prototype;Lre=Object.hasOwn||((e,t)=>Dre.call(e,t));({getOwnPropertyDescriptor:SF,keys:wF}=Object);Kre=Od;loe={"[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},uoe=Object.prototype.toString;RF=Fc(),Yke=Fc({strict:!0}),Jke=Fc({circular:!0}),Xke=Fc({circular:!0,strict:!0}),Qke=Fc({createInternalComparator:()=>Od}),Zke=Fc({strict:!0,createInternalComparator:()=>Od}),eAe=Fc({circular:!0,createInternalComparator:()=>Od}),tAe=Fc({circular:!0,createInternalComparator:()=>Od,strict:!0})});var AF=zi(function(moe){var il=q(ae());(function(){function e(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=wp(),n=typeof Object.is==="function"?Object.is:e,a=t.useSyncExternalStore,i=il.useRef,l=il.useEffect,c=il.useMemo,u=il.useDebugValue;moe.useSyncExternalStoreWithSelector=function(f,h,m,b,y){var v=i(null);if(v.current===null){var S={hasValue:!1,value:null};v.current=S}else S=v.current;v=c(function(){function E(L){if(!R){if(R=!0,D=L,L=b(L),y!==void 0&&S.hasValue){var Q=S.value;if(y(Q,L))return U=Q}return U=L}if(Q=U,n(D,L))return Q;var V=b(L);if(y!==void 0&&y(Q,V))return D=L,Q;return D=L,U=V}var R=!1,D,U,z=m===void 0?null:m;return[function(){return E(h())},z===null?void 0:function(){return E(z())}]},[h,m,b,y]);var C=a(f,v[0],v[1]);return l(function(){S.hasValue=!0,S.value=C},[C]),u(C),C},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});function yoe(){let e=new Set,t={},n=!1,a=()=>{if(n||!e.size)return;n=!0,queueMicrotask(()=>{n=!1,e.forEach((i)=>i())})};return{subscribe(i){return e.add(i),()=>{e.delete(i)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(i,l){t={...t,[i]:NF.default.createPortal(l.reactElement,l.element,i)},a()},removeRenderer(i){let l={...t};delete l[i],t=l,a()}}}function P4(e){var t;let[n]=jc.useState(()=>new Soe(e.editor)),a=PF.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,(t=e.equalityFn)!=null?t:RF);return $oe(()=>n.watch(e.editor),[e.editor,n]),jc.useDebugValue(a),a}function _F(e={},t=[]){let n=Vc.useRef(e);n.current=e;let[a]=Vc.useState(()=>new Coe(n)),i=DF.useSyncExternalStore(a.subscribe,a.getEditor,a.getServerSnapshot);return Vc.useDebugValue(i),Vc.useEffect(a.onRender(t)),P4({editor:i,selector:({transactionNumber:l})=>{if(e.shouldRerenderOnTransaction===!1||e.shouldRerenderOnTransaction===void 0)return null;if(e.immediatelyRender&&l===0)return 0;return l+1}}),i}function FF({children:e,...t}){let n="editor"in t?t.editor:t.instance;if(!n)throw Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");let a=Dd.useMemo(()=>({editor:n}),[n]),i=Dd.useMemo(()=>({editor:n}),[n]);return U1.jsx(L4.Provider,{value:i,children:U1.jsx(I4.Provider,{value:a,children:e})})}function UF({...e}){let{editor:t}=Doe();return U1.jsx(D4,{editor:t,...e})}var yb,Uc,NF,OF,sl,Vc,DF,jc,PF,IF,vb,Roe,BF,zF,HF,koe,Aoe,Moe,Noe,_4,Ooe,Dd,U1,goe=(...e)=>(t)=>{e.forEach((n)=>{if(typeof n==="function")n(t);else if(n)n.current=t})},boe=({contentComponent:e})=>{let t=OF.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getServerSnapshot);return sl.jsx(sl.Fragment,{children:Object.values(t)})},voe,xoe,D4,$oe,Soe=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,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(){if(this.transactionNumber===this.lastTransactionNumber)return this.lastSnapshot;return this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){let t,n=(i)=>{if((i==null?void 0:i.transaction)!==void 0&&i.transaction===t)return;t=i==null?void 0:i.transaction,this.transactionNumber+=1,this.subscribers.forEach((l)=>l())},a=this.editor;return a.on("transaction",n),a.on("update",n),()=>{a.off("transaction",n),a.off("update",n)}}return}},MF=!0,LF,woe,Coe=class e{constructor(t){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=t,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(t){this.editor=t,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach((n)=>n())}getInitialEditor(){let t=this.options.current.immediatelyRender,n=t!=null?t:!0;if(LF){if(n&&MF)console.warn("SSR detected. `immediatelyRender` has been set to false to avoid hydration mismatches");n=!1}else if(woe&&t===void 0){if(n=!1,MF)console.warn("Next.js detected. `immediatelyRender` defaults to false to avoid hydration mismatches. Pass `immediatelyRender: true` explicitly if you are rendering the editor only on the client.")}return n?this.createEditor():null}createEditor(){let t={...this.options.current,onBeforeCreate:(...a)=>{var i,l;return(l=(i=this.options.current).onBeforeCreate)==null?void 0:l.call(i,...a)},onBlur:(...a)=>{var i,l;return(l=(i=this.options.current).onBlur)==null?void 0:l.call(i,...a)},onCreate:(...a)=>{var i,l;return(l=(i=this.options.current).onCreate)==null?void 0:l.call(i,...a)},onDestroy:(...a)=>{var i,l;return(l=(i=this.options.current).onDestroy)==null?void 0:l.call(i,...a)},onFocus:(...a)=>{var i,l;return(l=(i=this.options.current).onFocus)==null?void 0:l.call(i,...a)},onSelectionUpdate:(...a)=>{var i,l;return(l=(i=this.options.current).onSelectionUpdate)==null?void 0:l.call(i,...a)},onTransaction:(...a)=>{var i,l;return(l=(i=this.options.current).onTransaction)==null?void 0:l.call(i,...a)},onUpdate:(...a)=>{var i,l;return(l=(i=this.options.current).onUpdate)==null?void 0:l.call(i,...a)},onContentError:(...a)=>{var i,l;return(l=(i=this.options.current).onContentError)==null?void 0:l.call(i,...a)},onDrop:(...a)=>{var i,l;return(l=(i=this.options.current).onDrop)==null?void 0:l.call(i,...a)},onPaste:(...a)=>{var i,l;return(l=(i=this.options.current).onPaste)==null?void 0:l.call(i,...a)},onDelete:(...a)=>{var i,l;return(l=(i=this.options.current).onDelete)==null?void 0:l.call(i,...a)},onMount:(...a)=>{var i,l;return(l=(i=this.options.current).onMount)==null?void 0:l.call(i,...a)},onUnmount:(...a)=>{var i,l;return(l=(i=this.options.current).onUnmount)==null?void 0:l.call(i,...a)}};return new vF(t)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(t){return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)}}static compareOptions(t,n){return Object.keys(t).every((a)=>{if(["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(a))return!0;if(a==="extensions"&&t.extensions&&n.extensions){if(t.extensions.length!==n.extensions.length)return!1;return t.extensions.every((i,l)=>{var c;if(i!==((c=n.extensions)==null?void 0:c[l]))return!1;return!0})}if(t[a]!==n[a])return!1;return!0})}onRender(t){return()=>{if(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0){if(!e.compareOptions(this.options.current,this.editor.options))this.editor.setOptions({...this.options.current,editable:this.editor.isEditable})}else this.refreshEditorInstance(t);return()=>{this.isComponentMounted=!1,this.scheduleDestroy()}}}refreshEditorInstance(t){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=t;return}if(this.previousDeps.length===t.length&&this.previousDeps.every((a,i)=>a===t[i]))return}if(this.editor&&!this.editor.isDestroyed)this.editor.destroy();this.setEditor(this.createEditor()),this.previousDeps=t}scheduleDestroy(){let t=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===t){if(n)n.setOptions(this.options.current);return}if(n&&!n.isDestroyed){if(n.destroy(),this.instanceId===t)this.setEditor(null)}},1)}},L4,lAe,V1=()=>yb.useContext(L4),Eoe,Toe=()=>vb.useContext(Eoe),cAe,uAe,I4,Doe=()=>Dd.useContext(I4),dAe;var j1=N(()=>{Ye();kF();yb=q(ae(),1),Uc=q(ae(),1),NF=q(jr(),1),OF=q(wp(),1),sl=q(so(),1),Vc=q(ae(),1),DF=q(wp(),1),jc=q(ae(),1),PF=q(AF(),1),IF=q(so(),1),vb=q(ae(),1),Roe=q(so(),1),BF=q(ae(),1),zF=q(so(),1),HF=q(ae(),1),koe=q(ae(),1),Aoe=q(jr(),1),Moe=q(so(),1),Noe=q(so(),1),_4=q(ae(),1),Ooe=q(so(),1),Dd=q(ae(),1),U1=q(so(),1);Ye();voe=class extends Uc.default.Component{constructor(e){super(e);this.editorContentRef=Uc.default.createRef()}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var e;let t=this.props.editor;if(t&&!t.isDestroyed&&((e=t.view.dom)==null?void 0:e.parentNode)){if(t.contentComponent)return;let n=this.editorContentRef.current;n.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:n}),t.contentComponent=yoe(),t.createNodeViews(),t.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){var e;let t=this.props.editor;if(!t)return;if(t.isEditorContentInitialized=!1,!t.isDestroyed)t.view.setProps({nodeViews:{}});t.contentComponent=null;try{if(!((e=t.view.dom)==null?void 0:e.parentNode))return;let n=document.createElement("div");n.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:n})}catch{}}render(){let{editor:e,innerRef:t,...n}=this.props;return sl.jsxs(sl.Fragment,{children:[sl.jsx("div",{ref:goe(t,this.editorContentRef),...n}),(e==null?void 0:e.contentComponent)&&sl.jsx(boe,{contentComponent:e.contentComponent})]})}},xoe=Uc.forwardRef((e,t)=>{let n=Uc.default.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return Uc.default.createElement(voe,{key:n,innerRef:t,...e})}),D4=Uc.default.memo(xoe),$oe=typeof window<"u"?jc.useLayoutEffect:jc.useEffect;LF=typeof window>"u",woe=LF||Boolean(typeof window<"u"&&window.next);L4=yb.createContext({editor:null}),lAe=L4.Consumer,Eoe=vb.createContext({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),cAe=BF.default.forwardRef((e,t)=>{let{onDragStart:n}=Toe(),a=e.as||"div";return zF.jsx(a,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})}),uAe=HF.default.createContext({markViewContentRef:()=>{}}),I4=Dd.createContext({get editor(){throw Error("useTiptap must be used within a <Tiptap> provider")}});I4.displayName="TiptapContext";FF.displayName="Tiptap";UF.displayName="Tiptap.Content";dAe=Object.assign(FF,{Content:UF})});function H4(e,t,n){return Wo(e,Ra(t,n))}function rs(e,t){return typeof e==="function"?e(t):e}function ka(e){return e.split("-")[0]}function Aa(e){return e.split("-")[1]}function F4(e){return e==="x"?"y":"x"}function K1(e){return e==="y"?"height":"width"}function oi(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function q1(e){return F4(oi(e))}function U4(e,t,n){if(n===void 0)n=!1;let a=Aa(e),i=q1(e),l=K1(i),c=i==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";if(t.reference[l]>t.floating[l])c=$b(c);return[c,$b(c)]}function qF(e){let t=$b(e);return[xb(e),t,xb(t)]}function xb(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function Ioe(e,t,n){switch(e){case"top":case"bottom":if(n)return t?KF:jF;return t?jF:KF;case"left":case"right":return t?Loe:_oe;default:return[]}}function GF(e,t,n,a){let i=Aa(e),l=Ioe(ka(e),n==="start",a);if(i){if(l=l.map((c)=>c+"-"+i),t)l=l.concat(l.map(xb))}return l}function $b(e){let t=ka(e);return Poe[t]+e.slice(t.length)}function Boe(e){var t,n,a,i;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(a=e.bottom)!=null?a:0,left:(i=e.left)!=null?i:0}}function G1(e){return typeof e!=="number"?Boe(e):{top:e,right:e,bottom:e,left:e}}function ai(e){let{x:t,y:n,width:a,height:i}=e;return{width:a,height:i,top:n,left:t,right:t+a,bottom:n+i,x:t,y:n}}var B4,VF,z4,Ra,Wo,Sb,ns=(e)=>({x:e,y:e}),Poe,jF,KF,Loe,_oe;var W1=N(()=>{B4=["top","right","bottom","left"],VF=["start","end"],z4=B4.reduce((e,t)=>e.concat(t,t+"-"+VF[0],t+"-"+VF[1]),[]),Ra=Math.min,Wo=Math.max,Sb=Math.round,Poe={left:"right",right:"left",bottom:"top",top:"bottom"};jF=["left","right"],KF=["right","left"],Loe=["top","bottom"],_oe=["bottom","top"]});function WF(e,t,n){let{reference:a,floating:i}=e,l=oi(t),c=q1(t),u=K1(c),f=ka(t),h=l==="y",m=a.x+a.width/2-i.width/2,b=a.y+a.height/2-i.height/2,y=a[u]/2-i[u]/2,v;switch(f){case"top":v={x:m,y:a.y-i.height};break;case"bottom":v={x:m,y:a.y+a.height};break;case"right":v={x:a.x+a.width,y:b};break;case"left":v={x:a.x-i.width,y:b};break;default:v={x:a.x,y:a.y}}let S=Aa(t);if(S)v[c]+=y*(S==="end"?1:-1)*(n&&h?-1:1);return v}async function XF(e,t){var n;if(t===void 0)t={};let{x:a,y:i,platform:l,rects:c,elements:u,strategy:f}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:b="floating",altBoundary:y=!1,padding:v=0}=rs(t,e),S=G1(v),E=u[y?b==="floating"?"reference":"floating":b],R=ai(await l.getClippingRect({element:((n=await(l.isElement==null?void 0:l.isElement(E)))!=null?n:!0)?E:E.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(u.floating)),boundary:h,rootBoundary:m,strategy:f})),D=b==="floating"?{x:a,y:i,width:c.floating.width,height:c.floating.height}:c.reference,U=await(l.getOffsetParent==null?void 0:l.getOffsetParent(u.floating)),z=await(l.isElement==null?void 0:l.isElement(U))&&await(l.getScale==null?void 0:l.getScale(U))||{x:1,y:1},L=ai(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:D,offsetParent:U,strategy:f}):D);return{top:(R.top-L.top+S.top)/z.y,bottom:(L.bottom-R.bottom+S.bottom)/z.y,left:(R.left-L.left+S.left)/z.x,right:(L.right-R.right+S.right)/z.x}}function Hoe(e,t,n){return(e?[...n.filter((i)=>Aa(i)===e),...n.filter((i)=>Aa(i)!==e)]:n.filter((i)=>ka(i)===i)).filter((i)=>{if(e)return Aa(i)===e||(t?xb(i)!==i:!1);return!0})}function YF(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function JF(e){return B4.some((t)=>e[t]>=0)}function rU(e){let t=Ra(...e.map((l)=>l.left)),n=Ra(...e.map((l)=>l.top)),a=Wo(...e.map((l)=>l.right)),i=Wo(...e.map((l)=>l.bottom));return{x:t,y:n,width:a-t,height:i-n}}function Foe(e){let t=e.slice().sort((i,l)=>i.y-l.y),n=[],a=null;for(let i=0;i<t.length;i++){let l=t[i];if(!a||l.y-a.y>a.height/2)n.push([l]);else n[n.length-1].push(l);a=l}return n.map((i)=>ai(rU(i)))}async function Voe(e,t){let{placement:n,platform:a,elements:i}=e,l=await(a.isRTL==null?void 0:a.isRTL(i.floating)),c=ka(n),u=Aa(n),f=oi(n)==="y",h=Uoe.has(c)?-1:1,m=l&&f?-1:1,b=rs(t,e),{mainAxis:y,crossAxis:v,alignmentAxis:S}=typeof b==="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};if(u&&typeof S==="number")v=u==="end"?S*-1:S;return f?{x:v*m,y:y*h}:{x:y*h,y:v*m}}var zoe=50,QF=async(e,t,n)=>{let{placement:a="bottom",strategy:i="absolute",middleware:l=[],platform:c}=n,u=c.detectOverflow?c:{...c,detectOverflow:XF},f=await(c.isRTL==null?void 0:c.isRTL(t)),h=await c.getElementRects({reference:e,floating:t,strategy:i}),{x:m,y:b}=WF(h,a,f),y=a,v=0,S={};for(let C=0;C<l.length;C++){let E=l[C];if(!E)continue;let{name:R,fn:D}=E,{x:U,y:z,data:L,reset:Q}=await D({x:m,y:b,initialPlacement:a,placement:y,strategy:i,middlewareData:S,rects:h,platform:u,elements:{reference:e,floating:t}});if(m=U!=null?U:m,b=z!=null?z:b,S[R]={...S[R],...L},Q&&v<zoe){if(v++,typeof Q==="object"){if(Q.placement)y=Q.placement;if(Q.rects)h=Q.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:i}):Q.rects;({x:m,y:b}=WF(h,y,f))}C=-1}}return{x:m,y:b,placement:y,strategy:i,middlewareData:S}},ZF=(e)=>({name:"arrow",options:e,async fn(t){let{x:n,y:a,placement:i,rects:l,platform:c,elements:u,middlewareData:f}=t,{element:h,padding:m=0}=rs(e,t)||{};if(h==null)return{};let b=G1(m),y={x:n,y:a},v=q1(i),S=K1(v),C=await c.getDimensions(h),E=v==="y",R=E?"top":"left",D=E?"bottom":"right",U=E?"clientHeight":"clientWidth",z=l.reference[S]+l.reference[v]-y[v]-l.floating[S],L=y[v]-l.reference[v],Q=await(c.getOffsetParent==null?void 0:c.getOffsetParent(h)),V=Q?Q[U]:0;if(!V||!await(c.isElement==null?void 0:c.isElement(Q)))V=u.floating[U]||l.floating[S];let P=z/2-L/2,re=V/2-C[S]/2-1,J=Ra(b[R],re),ge=Ra(b[D],re),le=V-C[S]-ge,se=V/2-C[S]/2+P,I=H4(J,se,le),F=!f.arrow&&Aa(i)!=null&&se!==I&&l.reference[S]/2-(se<J?J:ge)-C[S]/2<0,Y=F?se<J?se-J:se-le:0;return{[v]:y[v]+Y,data:{[v]:I,centerOffset:se-I-Y,...F&&{alignmentOffset:Y}},reset:F}}}),eU=function(e){if(e===void 0)e={};return{name:"autoPlacement",options:e,async fn(t){var n,a,i;let{rects:l,middlewareData:c,placement:u,platform:f,elements:h}=t,{crossAxis:m=!1,alignment:b,allowedPlacements:y=z4,autoAlignment:v=!0,...S}=rs(e,t),C=b!==void 0||y===z4?Hoe(b||null,v,y):y,E=((n=c.autoPlacement)==null?void 0:n.index)||0,R=C[E];if(R==null)return{};if(u!==R)return{reset:{placement:C[0]}};let D=await f.detectOverflow(t,S),U=U4(R,l,await(f.isRTL==null?void 0:f.isRTL(h.floating))),z=[D[ka(R)],D[U[0]],D[U[1]]],L=[...((a=c.autoPlacement)==null?void 0:a.overflows)||[],{placement:R,overflows:z}],Q=C[E+1];if(Q)return{data:{index:E+1,overflows:L},reset:{placement:Q}};let V=L.map((J)=>{let ge=Aa(J.placement);return[J.placement,ge&&m?J.overflows.slice(0,2).reduce((le,se)=>le+se,0):J.overflows[0],J.overflows]}).sort((J,ge)=>J[1]-ge[1]),re=((i=V.filter((J)=>J[2].slice(0,Aa(J[0])?2:3).every((ge)=>ge<=0))[0])==null?void 0:i[0])||V[0][0];if(re!==u)return{data:{index:E+1,overflows:L},reset:{placement:re}};return{}}}},tU=function(e){if(e===void 0)e={};return{name:"flip",options:e,async fn(t){var n,a;let{placement:i,middlewareData:l,rects:c,initialPlacement:u,platform:f,elements:h}=t,{mainAxis:m=!0,crossAxis:b=!0,fallbackPlacements:y,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:C=!0,...E}=rs(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};let R=ka(i),D=oi(u),U=ka(u)===u,z=await(f.isRTL==null?void 0:f.isRTL(h.floating)),L=y||(U||!C?[$b(u)]:qF(u)),Q=S!=="none";if(!y&&Q)L.push(...GF(u,C,S,z));let V=[u,...L],P=await f.detectOverflow(t,E),re=[],J=((a=l.flip)==null?void 0:a.overflows)||[];if(m)re.push(P[R]);if(b){let I=U4(i,c,z);re.push(P[I[0]],P[I[1]])}if(J=[...J,{placement:i,overflows:re}],!re.every((I)=>I<=0)){var ge,le;let I=(((ge=l.flip)==null?void 0:ge.index)||0)+1,F=V[I];if(F){if(!(b==="alignment"?D!==oi(F):!1)||J.every((de)=>oi(de.placement)===D?de.overflows[0]>0:!0))return{data:{index:I,overflows:J},reset:{placement:F}}}let Y=(le=J.filter((Z)=>Z.overflows[0]<=0).sort((Z,de)=>Z.overflows[1]-de.overflows[1])[0])==null?void 0:le.placement;if(!Y)switch(v){case"bestFit":{var se;let Z=(se=J.filter((de)=>{if(Q){let K=oi(de.placement);return K===D||K==="y"}return!0}).map((de)=>[de.placement,de.overflows.filter((K)=>K>0).reduce((K,k)=>K+k,0)]).sort((de,K)=>de[1]-K[1])[0])==null?void 0:se[0];if(Z)Y=Z;break}case"initialPlacement":Y=u;break}if(i!==Y)return{reset:{placement:Y}}}return{}}}},nU=function(e){if(e===void 0)e={};return{name:"hide",options:e,async fn(t){let{rects:n,platform:a}=t,{strategy:i="referenceHidden",...l}=rs(e,t);switch(i){case"referenceHidden":{let c=await a.detectOverflow(t,{...l,elementContext:"reference"}),u=YF(c,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:JF(u)}}}case"escaped":{let c=await a.detectOverflow(t,{...l,altBoundary:!0}),u=YF(c,n.floating);return{data:{escapedOffsets:u,escaped:JF(u)}}}default:return{}}}}},oU=function(e){if(e===void 0)e={};return{name:"inline",options:e,async fn(t){let{placement:n,elements:a,rects:i,platform:l,strategy:c}=t,{padding:u=2,x:f,y:h}=rs(e,t),m=Array.from(await(l.getClientRects==null?void 0:l.getClientRects(a.reference))||[]);if(!m.length)return{};let b=Foe(m),y=ai(rU(m)),v=G1(u);function S(){if(b.length===2&&(b[0].left>b[1].right||b[1].left>b[0].right)&&f!=null&&h!=null)return b.find((E)=>f>E.left-v.left&&f<E.right+v.right&&h>E.top-v.top&&h<E.bottom+v.bottom)||y;if(b.length>=2){if(oi(n)==="y"){let Q=b[0],V=b[b.length-1],P=ka(n)==="top",re=Q.top,J=V.bottom,ge=P?Q.left:V.left,le=P?Q.right:V.right;return ai({x:ge,y:re,width:le-ge,height:J-re})}let E=ka(n)==="left",R=Wo(...b.map((Q)=>Q.right)),D=Ra(...b.map((Q)=>Q.left)),U=b.filter((Q)=>E?Q.left===D:Q.right===R),z=U[0].top,L=U[U.length-1].bottom;return ai({x:D,y:z,width:R-D,height:L-z})}return y}let C=await l.getElementRects({reference:{getBoundingClientRect:S},floating:a.floating,strategy:c});if(i.reference.x!==C.reference.x||i.reference.y!==C.reference.y||i.reference.width!==C.reference.width||i.reference.height!==C.reference.height)return{reset:{rects:C}};return{}}}},Uoe,aU=function(e){if(e===void 0)e=0;return{name:"offset",options:e,async fn(t){var n,a;let{x:i,y:l,placement:c,middlewareData:u}=t,f=await Voe(t,e);if(c===((n=u.offset)==null?void 0:n.placement)&&(a=u.arrow)!=null&&a.alignmentOffset)return{};return{x:i+f.x,y:l+f.y,data:{...f,placement:c}}}}},iU=function(e){if(e===void 0)e={};return{name:"shift",options:e,async fn(t){let{x:n,y:a,placement:i,platform:l}=t,{mainAxis:c=!0,crossAxis:u=!1,limiter:f={fn:(D)=>{let{x:U,y:z}=D;return{x:U,y:z}}},...h}=rs(e,t),m={x:n,y:a},b=await l.detectOverflow(t,h),y=oi(i),v=F4(y),S=m[v],C=m[y],E=(D,U)=>H4(U+b[D==="y"?"top":"left"],U,U-b[D==="y"?"bottom":"right"]);if(c)S=E(v,S);if(u)C=E(y,C);let R=f.fn({...t,[v]:S,[y]:C});return{...R,data:{x:R.x-n,y:R.y-a,enabled:{[v]:c,[y]:u}}}}}},sU=function(e){if(e===void 0)e={};return{name:"size",options:e,async fn(t){let{placement:n,rects:a,platform:i,elements:l}=t,{apply:c=()=>{},...u}=rs(e,t),f=await i.detectOverflow(t,u),h=ka(n),m=Aa(n),b=oi(n)==="y",{width:y,height:v}=a.floating,S,C;if(h==="top"||h==="bottom")S=h,C=m===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right";else C=h,S=m==="end"?"top":"bottom";let E=v-f.top-f.bottom,R=y-f.left-f.right,D=Ra(v-f[S],E),U=Ra(y-f[C],R),z=t.middlewareData.shift,L=!z,Q=D,V=U;if(z!=null&&z.enabled.x)V=R;if(z!=null&&z.enabled.y)Q=E;if(L&&!m)if(b)V=y-2*Wo(f.left,f.right);else Q=v-2*Wo(f.top,f.bottom);await c({...t,availableWidth:V,availableHeight:Q});let P=await i.getDimensions(l.floating);if(y!==P.width||v!==P.height)return{reset:{rects:!0}};return{}}}};var lU=N(()=>{W1();W1();Uoe=new Set(["left","top"])});function J1(){return typeof window<"u"}function Ld(e){if(uU(e))return(e.nodeName||"").toLowerCase();return"#document"}function yo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ll(e){var t;return(t=(uU(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function uU(e){if(!J1())return!1;return e instanceof Node||e instanceof yo(e).Node}function ii(e){if(!J1())return!1;return e instanceof Element||e instanceof yo(e).Element}function cl(e){if(!J1())return!1;return e instanceof HTMLElement||e instanceof yo(e).HTMLElement}function cU(e){if(!J1()||typeof ShadowRoot>"u")return!1;return e instanceof ShadowRoot||e instanceof yo(e).ShadowRoot}function wb(e){let{overflow:t,overflowX:n,overflowY:a,display:i}=si(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&i!=="inline"&&i!=="contents"}function dU(e){return/^(table|td|th)$/.test(Ld(e))}function Cb(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}function X1(e){let t=ii(e)?si(e):e;return Pd(t.transform)||Pd(t.translate)||Pd(t.scale)||Pd(t.rotate)||Pd(t.perspective)||!Q1()&&(Pd(t.backdropFilter)||Pd(t.filter))||joe.test(t.willChange||"")||Koe.test(t.contain||"")}function fU(e){let t=Kc(e);while(cl(t)&&!oh(t)){if(X1(t))return t;else if(Cb(t))return null;t=Kc(t)}return null}function Q1(){if(V4==null)V4=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none");return V4}function oh(e){return/^(html|body|#document)$/.test(Ld(e))}function si(e){return yo(e).getComputedStyle(e)}function Eb(e){if(ii(e))return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop};return{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Kc(e){if(Ld(e)==="html")return e;let t=e.assignedSlot||e.parentNode||cU(e)&&e.host||ll(e);return cU(t)?t.host:t}function pU(e){let t=Kc(e);if(oh(t))return(e.ownerDocument||e).body;if(cl(t)&&wb(t))return t;return pU(t)}function Y1(e,t,n){var a;if(t===void 0)t=[];if(n===void 0)n=!0;let i=pU(e),l=i===((a=e.ownerDocument)==null?void 0:a.body),c=yo(i);if(l){let u=Z1(c);return t.concat(c,c.visualViewport||[],wb(i)?i:[],u&&n?Y1(u):[])}else return t.concat(i,Y1(i,[],n))}function Z1(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var joe,Koe,Pd=(e)=>!!e&&e!=="none",V4;var hU=N(()=>{joe=/transform|translate|scale|rotate|perspective|filter/,Koe=/paint|layout|strict|content/});function bU(e){let t=si(e),n=parseFloat(t.width)||0,a=parseFloat(t.height)||0,i=cl(e),l=i?e.offsetWidth:n,c=i?e.offsetHeight:a,u=Sb(n)!==l||Sb(a)!==c;if(u)n=l,a=c;return{width:n,height:a,$:u}}function yU(e){return!ii(e)?e.contextElement:e}function ah(e){let t=yU(e);if(!cl(t))return ns(1);let n=t.getBoundingClientRect(),{width:a,height:i,$:l}=bU(t),c=(l?Sb(n.width):n.width)/a,u=(l?Sb(n.height):n.height)/i;if(!c||!Number.isFinite(c))c=1;if(!u||!Number.isFinite(u))u=1;return{x:c,y:u}}function vU(e){let t=yo(e);if(!Q1()||!t.visualViewport)return qoe;return{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Goe(e,t,n){if(t===void 0)t=!1;return!!n&&t&&n===yo(e)}function Tb(e,t,n,a){if(t===void 0)t=!1;if(n===void 0)n=!1;let i=e.getBoundingClientRect(),l=yU(e),c=ns(1);if(t)if(a){if(ii(a))c=ah(a)}else c=ah(e);let u=Goe(l,n,a)?vU(l):ns(0),f=(i.left+u.x)/c.x,h=(i.top+u.y)/c.y,m=i.width/c.x,b=i.height/c.y;if(l&&a){let y=yo(l),v=ii(a)?yo(a):a,S=y,C=Z1(S);while(C&&v!==S){let E=ah(C),R=C.getBoundingClientRect(),D=si(C),U=R.left+(C.clientLeft+parseFloat(D.paddingLeft))*E.x,z=R.top+(C.clientTop+parseFloat(D.paddingTop))*E.y;f*=E.x,h*=E.y,m*=E.x,b*=E.y,f+=U,h+=z,S=yo(C),C=Z1(S)}}return ai({width:m,height:b,x:f,y:h})}function e$(e,t){let n=Eb(e).scrollLeft;if(!t)return Tb(ll(e)).left+n;return t.left+n}function xU(e,t){let n=e.getBoundingClientRect(),a=n.left+t.scrollLeft-e$(e,n),i=n.top+t.scrollTop;return{x:a,y:i}}function Woe(e){let{elements:t,rect:n,offsetParent:a,strategy:i}=e,l=i==="fixed",c=ll(a),u=t?Cb(t.floating):!1;if(a===c||u&&l)return n;let f={scrollLeft:0,scrollTop:0},h=ns(1),m=ns(0),b=cl(a);if(b||!l){if(Ld(a)!=="body"||wb(c))f=Eb(a);if(b){let v=Tb(a);h=ah(a),m.x=v.x+a.clientLeft,m.y=v.y+a.clientTop}}let y=c&&!b&&!l?xU(c,f):ns(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-f.scrollLeft*h.x+m.x+y.x,y:n.y*h.y-f.scrollTop*h.y+m.y+y.y}}function Yoe(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Joe(e){let t=Eb(e),n=e.ownerDocument.body,a=Wo(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Wo(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),l=-t.scrollLeft+e$(e),c=-t.scrollTop;if(si(n).direction==="rtl")l+=Wo(e.clientWidth,n.clientWidth)-a;return{width:a,height:i,x:l,y:c}}function Qoe(e,t,n){if(n===void 0)n="viewport";let a=n==="layoutViewport",i=yo(e),l=ll(e),c=i.visualViewport,u=l.clientWidth,f=l.clientHeight,h=0,m=0;if(c){let y=!Q1()||t==="fixed";if(a){if(!y)h=-c.offsetLeft,m=-c.offsetTop}else if(u=c.width,f=c.height,y)h=c.offsetLeft,m=c.offsetTop}if(e$(l)<=0){let y=l.ownerDocument,v=y.body,S=getComputedStyle(v),C=y.compatMode==="CSS1Compat"?parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0:0,E=Math.abs(l.clientWidth-v.clientWidth-C),R=getComputedStyle(l).scrollbarGutter==="stable both-edges"?E/2:E;if(R<=Xoe)u-=R}return{width:u,height:f,x:h,y:m}}function Zoe(e,t){let n=Tb(e,!0,t==="fixed"),a=n.top+e.clientTop,i=n.left+e.clientLeft,l=ah(e),c=e.clientWidth*l.x,u=e.clientHeight*l.y,f=i*l.x,h=a*l.y;return{width:c,height:u,x:f,y:h}}function mU(e,t,n){let a;if(t==="viewport"||t==="layoutViewport")a=Qoe(e,n,t);else if(t==="document")a=Joe(ll(e));else if(ii(t))a=Zoe(t,n);else{let i=vU(e);a={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return ai(a)}function eae(e,t){let n=t.get(e);if(n)return n;let a=Y1(e,[],!1).filter((u)=>ii(u)&&Ld(u)!=="body"),i=null,l=si(e).position==="fixed",c=l?Kc(e):e;while(ii(c)&&!oh(c)){let u=si(c),f=X1(c),h=i?i.position:l?"fixed":"";if(!f&&(h==="fixed"||h==="absolute"&&u.position==="static"))a=a.filter((b)=>b!==c);else i=u;c=Kc(c)}return t.set(e,a),a}function tae(e){let{element:t,boundary:n,rootBoundary:a,strategy:i}=e,c=[...n==="clippingAncestors"?Cb(t)?[]:eae(t,this._c):[].concat(n),a],u=mU(t,c[0],i),f=u.top,h=u.right,m=u.bottom,b=u.left;for(let y=1;y<c.length;y++){let v=mU(t,c[y],i);f=Wo(v.top,f),h=Ra(v.right,h),m=Ra(v.bottom,m),b=Wo(v.left,b)}return{width:h-b,height:m-f,x:b,y:f}}function nae(e){let{width:t,height:n}=bU(e);return{width:t,height:n}}function rae(e,t,n){let a=cl(t),i=ll(t),l=n==="fixed",c=Tb(e,!0,l,t),u={scrollLeft:0,scrollTop:0},f=ns(0);if(a||!l){if(Ld(t)!=="body"||wb(i))u=Eb(t);if(a){let y=Tb(t,!0,l,t);f.x=y.x+t.clientLeft,f.y=y.y+t.clientTop}}if(!a&&i)f.x=e$(i);let h=i&&!a&&!l?xU(i,u):ns(0),m=c.left+u.scrollLeft-f.x-h.x,b=c.top+u.scrollTop-f.y-h.y;return{x:m,y:b,width:c.width,height:c.height}}function j4(e){return si(e).position==="static"}function gU(e,t){if(!cl(e)||si(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;if(ll(e)===n)n=n.ownerDocument.body;return n}function $U(e,t){let n=yo(e);if(Cb(e))return n;if(!cl(e)){let i=Kc(e);while(i&&!oh(i)){if(ii(i)&&!j4(i))return i;i=Kc(i)}return n}let a=gU(e,t);while(a&&dU(a)&&j4(a))a=gU(a,t);if(a&&oh(a)&&j4(a)&&!X1(a))return n;return a||fU(e)||n}function aae(e){return si(e).direction==="rtl"}var qoe,Xoe=25,oae=async function(e){let t=this.getOffsetParent||$U,n=this.getDimensions,a=await n(e.floating);return{reference:rae(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}},iae,t$,n$,r$,o$,a$,i$,s$,l$,c$=(e,t,n)=>{let a=new Map,i=n!=null?n:{},l={...iae,...i.platform,_c:a};return QF(e,t,{...i,platform:l})};var K4=N(()=>{lU();W1();hU();qoe=ns(0);iae={convertOffsetParentRelativeRectToViewportRelativeRect:Woe,getDocumentElement:ll,getClippingRect:tae,getOffsetParent:$U,getElementRects:oae,getClientRects:Yoe,getDimensions:nae,getScale:ah,isElement:ii,isRTL:aae},t$=aU,n$=eU,r$=iU,o$=tU,a$=sU,i$=nU,s$=ZF,l$=oU});function sae(e){if(e.type.spec.tableRole!="table")throw RangeError("Not a table node: "+e.type.name);let t=lae(e),n=e.childCount,a=[],i=0,l=null,c=[];for(let h=0,m=t*n;h<m;h++)a[h]=0;for(let h=0,m=0;h<n;h++){let b=e.child(h);m++;for(let S=0;;S++){while(i<a.length&&a[i]!=0)i++;if(S==b.childCount)break;let C=b.child(S),{colspan:E,rowspan:R,colwidth:D}=C.attrs;for(let U=0;U<R;U++){if(U+h>=n){(l||(l=[])).push({type:"overlong_rowspan",pos:m,n:R-U});break}let z=i+U*t;for(let L=0;L<E;L++){if(a[z+L]==0)a[z+L]=m;else(l||(l=[])).push({type:"collision",row:h,pos:m,n:E-L});let Q=D&&D[L];if(Q){let V=(z+L)%t*2,P=c[V];if(P==null||P!=Q&&c[V+1]==1)c[V]=Q,c[V+1]=1;else if(P==Q)c[V+1]++}}}i+=E,m+=C.nodeSize}let y=(h+1)*t,v=0;while(i<y)if(a[i++]==0)v++;if(v)(l||(l=[])).push({type:"missing",row:h,n:v});m++}if(t===0||n===0)(l||(l=[])).push({type:"zero_sized"});let u=new ul(t,n,a,l),f=!1;for(let h=0;!f&&h<c.length;h+=2)if(c[h]!=null&&c[h+1]<n)f=!0;if(f)cae(u,c,e);return u}function lae(e){let t=-1,n=!1;for(let a=0;a<e.childCount;a++){let i=e.child(a),l=0;if(n)for(let c=0;c<a;c++){let u=e.child(c);for(let f=0;f<u.childCount;f++){let h=u.child(f);if(c+h.attrs.rowspan>a)l+=h.attrs.colspan}}for(let c=0;c<i.childCount;c++){let u=i.child(c);if(l+=u.attrs.colspan,u.attrs.rowspan>1)n=!0}if(t==-1)t=l;else if(t!=l)t=Math.max(t,l)}return t}function cae(e,t,n){if(!e.problems)e.problems=[];let a={};for(let i=0;i<e.map.length;i++){let l=e.map[i];if(a[l])continue;a[l]=!0;let c=n.nodeAt(l);if(!c)throw RangeError(`No cell with offset ${l} found`);let u=null,f=c.attrs;for(let h=0;h<f.colspan;h++){let m=t[(i+h)%e.width*2];if(m!=null&&(!f.colwidth||f.colwidth[h]!=m))(u||(u=uae(f)))[h]=m}if(u)e.problems.unshift({type:"colwidth mismatch",pos:l,colwidth:u})}}function uae(e){if(e.colwidth)return e.colwidth.slice();let t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function W4(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(let n in e.nodes){let a=e.nodes[n],i=a.spec.tableRole;if(i)t[i]=a}}return t}function dae(e){for(let t=e.depth-1;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return e.node(0).resolve(e.before(t+1));return null}function EU(e){let t=e.selection.$head;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="row")return!0;return!1}function fae(e){let t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;else if("node"in t&&t.node&&t.node.type.spec.tableRole=="cell")return t.$anchor;let n=dae(t.$head)||pae(t.$head);if(n)return n;throw RangeError(`No cell found around position ${t.head}`)}function pae(e){for(let{nodeAfter:t,pos:n}=e;t;t=t.firstChild,n++){let a=t.type.spec.tableRole;if(a=="cell"||a=="header_cell")return e.doc.resolve(n)}for(let{nodeBefore:t,pos:n}=e;t;t=t.lastChild,n--){let a=t.type.spec.tableRole;if(a=="cell"||a=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function SU(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function TU(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function RU(e,t,n){let a=e.node(-1),i=ul.get(a),l=e.start(-1),c=i.nextCell(e.pos-l,t,n);return c==null?null:e.node(0).resolve(l+c)}function wU(e,t,n=1){let a={...e,colspan:e.colspan-n};if(a.colwidth){if(a.colwidth=a.colwidth.slice(),a.colwidth.splice(t,n),!a.colwidth.some((i)=>i>0))a.colwidth=null}return a}function kU(e){let t=e.selection,n=fae(e),a=n.node(-1),i=n.start(-1),l=ul.get(a);return{...t instanceof li?l.rectBetween(t.$anchorCell.pos-i,t.$headCell.pos-i):l.findCell(n.pos-i),tableStart:i,map:l,table:a}}function mae(e){return function(t,n){if(!EU(t))return!1;if(n){let a=W4(t.schema),i=kU(t),l=t.tr,c=i.map.cellsInRect(e=="column"?{left:i.left,top:0,right:i.right,bottom:i.map.height}:e=="row"?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),u=c.map((f)=>i.table.nodeAt(f));for(let f=0;f<c.length;f++)if(u[f].type==a.header_cell)l.setNodeMarkup(i.tableStart+c[f],a.cell,u[f].attrs);if(l.steps.length===0)for(let f=0;f<c.length;f++)l.setNodeMarkup(i.tableStart+c[f],a.header_cell,u[f].attrs);n(l)}return!0}}function CU(e,t,n){let a=t.map.cellsInRect({left:0,top:0,right:e=="row"?t.map.width:1,bottom:e=="column"?t.map.height:1});for(let i=0;i<a.length;i++){let l=t.table.nodeAt(a[i]);if(l&&l.type!==n.header_cell)return!1}return!0}function Y4(e,t){if(t=t||{useDeprecatedLogic:!1},t.useDeprecatedLogic)return mae(e);return function(n,a){if(!EU(n))return!1;if(a){let i=W4(n.schema),l=kU(n),c=n.tr,u=CU("row",l,i),f=CU("column",l,i),h=(e==="column"?u:e==="row"?f:!1)?1:0,m=e=="column"?{left:0,top:h,right:1,bottom:l.map.height}:e=="row"?{left:h,top:0,right:l.map.width,bottom:1}:l,b=e=="column"?f?i.cell:i.header_cell:e=="row"?u?i.cell:i.header_cell:i.cell;l.map.cellsInRect(m).forEach((y)=>{let v=y+l.tableStart,S=c.doc.nodeAt(v);if(S)c.setNodeMarkup(v,b,S.attrs)}),a(c)}return!0}}function u$(e,t){let n=e.selection;if(!(n instanceof li))return!1;if(t){let a=e.tr,i=W4(e.schema).cell.createAndFill().content;if(n.forEachCell((l,c)=>{if(!l.content.eq(i))a.replace(a.mapping.map(c+1),a.mapping.map(c+l.nodeSize-1),new Se(i,0,0))}),a.docChanged)t(a)}return!0}function p$(e,t,n){if(n.eq(e.selection))return!1;if(t)t(e.tr.setSelection(n).scrollIntoView());return!0}function d$(e,t){return(n,a,i)=>{if(!i)return!1;let l=n.selection;if(l instanceof li)return p$(n,a,Ue.near(l.$headCell,t));if(e!="horiz"&&!l.empty)return!1;let c=AU(i,e,t);if(c==null)return!1;if(e=="horiz")return p$(n,a,Ue.near(n.doc.resolve(l.head+t),t));else{let u=n.doc.resolve(c),f=RU(u,e,t),h;if(f)h=Ue.near(f,1);else if(t<0)h=Ue.near(n.doc.resolve(u.before(-1)),-1);else h=Ue.near(n.doc.resolve(u.after(-1)),1);return p$(n,a,h)}}}function f$(e,t){return(n,a,i)=>{if(!i)return!1;let l=n.selection,c;if(l instanceof li)c=l;else{let f=AU(i,e,t);if(f==null)return!1;c=new li(n.doc.resolve(f))}let u=RU(c.$headCell,e,t);if(!u)return!1;return p$(n,a,new li(c.$anchorCell,u))}}function AU(e,t,n){if(!(e.state.selection instanceof Me))return null;let{$head:a}=e.state.selection;for(let i=a.depth-1;i>=0;i--){let l=a.node(i);if((n<0?a.index(i):a.indexAfter(i))!=(n<0?0:l.childCount))return null;if(l.type.spec.tableRole=="cell"||l.type.spec.tableRole=="header_cell"){let c=a.before(i),u=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(u)?c:null}}return null}var q4,G4,ul=class{constructor(e,t,n,a){this.width=e,this.height=t,this.map=n,this.problems=a}findCell(e){for(let t=0;t<this.map.length;t++){let n=this.map[t];if(n!=e)continue;let a=t%this.width,i=t/this.width|0,l=a+1,c=i+1;for(let u=1;l<this.width&&this.map[t+u]==n;u++)l++;for(let u=1;c<this.height&&this.map[t+this.width*u]==n;u++)c++;return{left:a,top:i,right:l,bottom:c}}throw RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){let{left:a,right:i,top:l,bottom:c}=this.findCell(e);if(t=="horiz"){if(n<0?a==0:i==this.width)return null;return this.map[l*this.width+(n<0?a-1:i)]}else{if(n<0?l==0:c==this.height)return null;return this.map[a+this.width*(n<0?l-1:c)]}}rectBetween(e,t){let{left:n,right:a,top:i,bottom:l}=this.findCell(e),{left:c,right:u,top:f,bottom:h}=this.findCell(t);return{left:Math.min(n,c),top:Math.min(i,f),right:Math.max(a,u),bottom:Math.max(l,h)}}cellsInRect(e){let t=[],n={};for(let a=e.top;a<e.bottom;a++)for(let i=e.left;i<e.right;i++){let l=a*this.width+i,c=this.map[l];if(n[c])continue;if(n[c]=!0,i==e.left&&i&&this.map[l-1]==c||a==e.top&&a&&this.map[l-this.width]==c)continue;t.push(c)}return t}positionAt(e,t,n){for(let a=0,i=0;;a++){let l=i+n.child(a).nodeSize;if(a==e){let c=t+e*this.width,u=(e+1)*this.width;while(c<u&&this.map[c]<i)c++;return c==u?l-1:this.map[c]}i=l}}static get(e){return q4(e)||G4(e,sae(e))}},MAe,li,hae=class e{constructor(t,n){this.anchor=t,this.head=n}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(t){let n=t.resolve(this.anchor),a=t.resolve(this.head);if(n.parent.type.spec.tableRole=="row"&&a.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&a.index()<a.parent.childCount&&TU(n,a))return new li(n,a);else return Ue.near(a,1)}},NAe,OAe,DAe,PAe,LAe,_Ae;var MU=N(()=>{Xs();Ys();$1();if(typeof WeakMap<"u"){let e=new WeakMap;q4=(t)=>e.get(t),G4=(t,n)=>(e.set(t,n),n)}else{let e=[],t=10,n=0;q4=(a)=>{for(let i=0;i<e.length;i+=2)if(e[i]==a)return e[i+1]},G4=(a,i)=>{if(n==10)n=0;return e[n++]=a,e[n++]=i}}MAe=new Qe("selectingCells");li=class e extends Ue{constructor(t,n=t){let a=t.node(-1),i=ul.get(a),l=t.start(-1),c=i.rectBetween(t.pos-l,n.pos-l),u=t.node(0),f=i.cellsInRect(c).filter((m)=>m!=n.pos-l);f.unshift(n.pos-l);let h=f.map((m)=>{let b=a.nodeAt(m);if(!b)throw RangeError(`No cell with offset ${m} found`);let y=l+m+1;return new Qg(u.resolve(y),u.resolve(y+b.content.size))});super(h[0].$from,h[0].$to,h);this.$anchorCell=t,this.$headCell=n}map(t,n){let a=t.resolve(n.map(this.$anchorCell.pos)),i=t.resolve(n.map(this.$headCell.pos));if(SU(a)&&SU(i)&&TU(a,i)){let l=this.$anchorCell.node(-1)!=a.node(-1);if(l&&this.isRowSelection())return e.rowSelection(a,i);else if(l&&this.isColSelection())return e.colSelection(a,i);else return new e(a,i)}return Me.between(a,i)}content(){let t=this.$anchorCell.node(-1),n=ul.get(t),a=this.$anchorCell.start(-1),i=n.rectBetween(this.$anchorCell.pos-a,this.$headCell.pos-a),l={},c=[];for(let f=i.top;f<i.bottom;f++){let h=[];for(let m=f*n.width+i.left,b=i.left;b<i.right;b++,m++){let y=n.map[m];if(l[y])continue;l[y]=!0;let v=n.findCell(y),S=t.nodeAt(y);if(!S)throw RangeError(`No cell with offset ${y} found`);let C=i.left-v.left,E=v.right-i.right;if(C>0||E>0){let R=S.attrs;if(C>0)R=wU(R,0,C);if(E>0)R=wU(R,R.colspan-E,E);if(v.left<i.left){if(S=S.type.createAndFill(R),!S)throw RangeError(`Could not create cell with attrs ${JSON.stringify(R)}`)}else S=S.type.create(R,S.content)}if(v.top<i.top||v.bottom>i.bottom){let R={...S.attrs,rowspan:Math.min(v.bottom,i.bottom)-Math.max(v.top,i.top)};if(v.top<i.top)S=S.type.createAndFill(R);else S=S.type.create(R,S.content)}h.push(S)}c.push(t.child(f).copy(ce.from(h)))}let u=this.isColSelection()&&this.isRowSelection()?t:c;return new Se(ce.from(u),1,1)}replace(t,n=Se.empty){let a=t.steps.length,i=this.ranges;for(let c=0;c<i.length;c++){let{$from:u,$to:f}=i[c],h=t.mapping.slice(a);t.replace(h.map(u.pos),h.map(f.pos),c?Se.empty:n)}let l=Ue.findFrom(t.doc.resolve(t.mapping.slice(a).map(this.to)),-1);if(l)t.setSelection(l)}replaceWith(t,n){this.replace(t,new Se(ce.from(n),0,0))}forEachCell(t){let n=this.$anchorCell.node(-1),a=ul.get(n),i=this.$anchorCell.start(-1),l=a.cellsInRect(a.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i));for(let c=0;c<l.length;c++)t(n.nodeAt(l[c]),i+l[c])}isColSelection(){let t=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(t,n)>0)return!1;let a=t+this.$anchorCell.nodeAfter.attrs.rowspan,i=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(a,i)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){let a=t.node(-1),i=ul.get(a),l=t.start(-1),c=i.findCell(t.pos-l),u=i.findCell(n.pos-l),f=t.node(0);if(c.top<=u.top){if(c.top>0)t=f.resolve(l+i.map[c.left]);if(u.bottom<i.height)n=f.resolve(l+i.map[i.width*(i.height-1)+u.right-1])}else{if(u.top>0)n=f.resolve(l+i.map[u.left]);if(c.bottom<i.height)t=f.resolve(l+i.map[i.width*(i.height-1)+c.right-1])}return new e(t,n)}isRowSelection(){let t=this.$anchorCell.node(-1),n=ul.get(t),a=this.$anchorCell.start(-1),i=n.colCount(this.$anchorCell.pos-a),l=n.colCount(this.$headCell.pos-a);if(Math.min(i,l)>0)return!1;let c=i+this.$anchorCell.nodeAfter.attrs.colspan,u=l+this.$headCell.nodeAfter.attrs.colspan;return Math.max(c,u)==n.width}eq(t){return t instanceof e&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){let a=t.node(-1),i=ul.get(a),l=t.start(-1),c=i.findCell(t.pos-l),u=i.findCell(n.pos-l),f=t.node(0);if(c.left<=u.left){if(c.left>0)t=f.resolve(l+i.map[c.top*i.width]);if(u.right<i.width)n=f.resolve(l+i.map[i.width*(u.top+1)-1])}else{if(u.left>0)n=f.resolve(l+i.map[u.top*i.width]);if(c.right<i.width)t=f.resolve(l+i.map[i.width*(c.top+1)-1])}return new e(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,a=n){return new e(t.resolve(n),t.resolve(a))}getBookmark(){return new hae(this.$anchorCell.pos,this.$headCell.pos)}};li.prototype.visible=!1;Ue.jsonID("cell",li);NAe=new Qe("fix-tables");OAe=Y4("row",{useDeprecatedLogic:!0}),DAe=Y4("column",{useDeprecatedLogic:!0}),PAe=Y4("cell",{useDeprecatedLogic:!0});LAe=ub({ArrowLeft:d$("horiz",-1),ArrowRight:d$("horiz",1),ArrowUp:d$("vert",-1),ArrowDown:d$("vert",1),"Shift-ArrowLeft":f$("horiz",-1),"Shift-ArrowRight":f$("horiz",1),"Shift-ArrowUp":f$("vert",-1),"Shift-ArrowDown":f$("vert",1),Backspace:u$,"Mod-Backspace":u$,Delete:u$,"Mod-Delete":u$});_Ae=new Qe("tableColumnResizing")});var NU=N(()=>{MU()});function gae(e,t){let n=Math.min(e.top,t.top),a=Math.max(e.bottom,t.bottom),i=Math.min(e.left,t.left),c=Math.max(e.right,t.right)-i,u=a-n;return new DOMRect(i,n,c,u)}var bae=class{constructor({editor:e,element:t,view:n,pluginKey:a="bubbleMenu",updateDelay:i=250,resizeDelay:l=60,shouldShow:c,appendTo:u,getReferencedVirtualElement:f,options:h}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:b,state:y,from:v,to:S})=>{let{doc:C,selection:E}=y,{empty:R}=E,D=!C.textBetween(v,S).length&&M1(y.selection),U=this.element.contains(document.activeElement);if(!(b.hasFocus()||U)||R||D||!this.editor.isEditable)return!1;return!0},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{if(this.resizeDebounceTimer)clearTimeout(this.resizeDebounceTimer);this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:b})=>{var y;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}if((b==null?void 0:b.relatedTarget)&&((y=this.element.parentNode)==null?void 0:y.contains(b.relatedTarget)))return;if((b==null?void 0:b.relatedTarget)===this.editor.view.dom)return;this.hide()},this.handleDebouncedUpdate=(b,y)=>{let v=!(y==null?void 0:y.selection.eq(b.state.selection)),S=!(y==null?void 0:y.doc.eq(b.state.doc));if(!v&&!S)return;if(this.updateDebounceTimer)clearTimeout(this.updateDebounceTimer);this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(b,v,S,y)},this.updateDelay)},this.updateHandler=(b,y,v,S)=>{let{composing:C}=b;if(C||!y&&!v)return;if(!this.getShouldShow(S)){this.hide();return}this.show(),this.updatePosition()},this.transactionHandler=({transaction:b})=>{let y=b.getMeta(this.pluginKey);if(y==="updatePosition")this.updatePosition();else if(y&&typeof y==="object"&&y.type==="updateOptions")this.updateOptions(y.options);else if(y==="hide")this.hide();else if(y==="show")this.updatePosition(),this.show()};var m;if(this.editor=e,this.element=t,this.view=n,this.pluginKey=a,this.updateDelay=i,this.resizeDelay=l,this.appendTo=u,this.scrollTarget=(m=h==null?void 0:h.scrollTarget)!=null?m:window,this.getReferencedVirtualElement=f,this.floatingUIOptions={...this.floatingUIOptions,...h},this.element.tabIndex=0,c)this.shouldShow=c;if(this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(n,n.state),this.getShouldShow())this.show(),this.updatePosition()}get middlewares(){let e=[];if(this.floatingUIOptions.flip)e.push(o$(typeof this.floatingUIOptions.flip!=="boolean"?this.floatingUIOptions.flip:void 0));if(this.floatingUIOptions.shift)e.push(r$(typeof this.floatingUIOptions.shift!=="boolean"?this.floatingUIOptions.shift:void 0));if(this.floatingUIOptions.offset)e.push(t$(typeof this.floatingUIOptions.offset!=="boolean"?this.floatingUIOptions.offset:void 0));if(this.floatingUIOptions.arrow)e.push(s$(this.floatingUIOptions.arrow));if(this.floatingUIOptions.size)e.push(a$(typeof this.floatingUIOptions.size!=="boolean"?this.floatingUIOptions.size:void 0));if(this.floatingUIOptions.autoPlacement)e.push(n$(typeof this.floatingUIOptions.autoPlacement!=="boolean"?this.floatingUIOptions.autoPlacement:void 0));if(this.floatingUIOptions.hide)e.push(i$(typeof this.floatingUIOptions.hide!=="boolean"?this.floatingUIOptions.hide:void 0));if(this.floatingUIOptions.inline)e.push(l$(typeof this.floatingUIOptions.inline!=="boolean"?this.floatingUIOptions.inline:void 0));return e}get virtualElement(){var e,t,n;let{selection:a}=this.editor.state,i=(e=this.getReferencedVirtualElement)==null?void 0:e.call(this);if(i)return i;if(!((n=(t=this.view)==null?void 0:t.dom)==null?void 0:n.parentNode))return;let l=I1(this.view,a.from,a.to),c={getBoundingClientRect:()=>l,getClientRects:()=>[l]};if(a instanceof Pe){let u=this.view.nodeDOM(a.from),f=u.dataset.nodeViewWrapper?u:u.querySelector("[data-node-view-wrapper]");if(f)u=f;if(u)c={getBoundingClientRect:()=>u.getBoundingClientRect(),getClientRects:()=>[u.getBoundingClientRect()]}}if(a instanceof li){let{$anchorCell:u,$headCell:f}=a,h=u?u.pos:f.pos,m=f?f.pos:u.pos,b=this.view.nodeDOM(h),y=this.view.nodeDOM(m);if(!b||!y)return;let v=b===y?b.getBoundingClientRect():gae(b.getBoundingClientRect(),y.getBoundingClientRect());c={getBoundingClientRect:()=>v,getClientRects:()=>[v]}}return c}updatePosition(){if(!this.isVisible)return;let e=this.virtualElement;if(!e)return;c$(e,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:t,y:n,strategy:a,middlewareData:i})=>{var l,c;if(!this.isVisible||this.editor.isDestroyed||!this.element.isConnected)return;if(((l=i.hide)==null?void 0:l.referenceHidden)||((c=i.hide)==null?void 0:c.escaped)){this.element.style.visibility="hidden";return}if(this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=a,this.element.style.left=`${t}px`,this.element.style.top=`${n}px`,this.isVisible&&this.floatingUIOptions.onUpdate)this.floatingUIOptions.onUpdate()})}update(e,t){let{state:n}=e,a=n.selection.from!==n.selection.to;if(this.updateDelay>0&&a){this.handleDebouncedUpdate(e,t);return}let i=!(t==null?void 0:t.selection.eq(e.state.selection)),l=!(t==null?void 0:t.doc.eq(e.state.doc));this.updateHandler(e,i,l,t)}getShouldShow(e){var t;let{state:n}=this.view,{selection:a}=n,{ranges:i}=a,l=Math.min(...i.map((f)=>f.$from.pos)),c=Math.max(...i.map((f)=>f.$to.pos));return((t=this.shouldShow)==null?void 0:t.call(this,{editor:this.editor,element:this.element,view:this.view,state:n,oldState:e,from:l,to:c}))||!1}show(){var e;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";let t=typeof this.appendTo==="function"?this.appendTo():this.appendTo;if((e=t!=null?t:this.view.dom.parentElement)==null||e.appendChild(this.element),this.floatingUIOptions.onShow)this.floatingUIOptions.onShow();this.isVisible=!0}hide(){if(!this.isVisible)return;if(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide)this.floatingUIOptions.onHide();this.isVisible=!1}updateOptions(e){var t;if(e.updateDelay!==void 0)this.updateDelay=e.updateDelay;if(e.resizeDelay!==void 0)this.resizeDelay=e.resizeDelay;if(e.appendTo!==void 0)this.appendTo=e.appendTo;if(e.getReferencedVirtualElement!==void 0)this.getReferencedVirtualElement=e.getReferencedVirtualElement;if(e.shouldShow!==void 0){if(e.shouldShow)this.shouldShow=e.shouldShow}if(e.options!==void 0){let n=(t=e.options.scrollTarget)!=null?t:window;if(n!==this.scrollTarget)this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=n,this.scrollTarget.addEventListener("scroll",this.resizeHandler);this.floatingUIOptions={...this.floatingUIOptions,...e.options}}}destroy(){if(this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy)this.floatingUIOptions.onDestroy()}},J4=(e)=>new qe({key:typeof e.pluginKey==="string"?new Qe(e.pluginKey):e.pluginKey,view:(t)=>new bae({view:t,...e})}),qAe;var OU=N(()=>{Ye();K4();Ye();at();NU();qAe=St.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){if(!this.options.element)return[];return[J4({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]}})});var yae=class{constructor({editor:e,element:t,view:n,pluginKey:a="floatingMenu",updateDelay:i=250,resizeDelay:l=60,options:c,appendTo:u,shouldShow:f}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.shouldShow=({view:m,state:b})=>{let{selection:y}=b,{$anchor:v,empty:S}=y,C=v.depth===1,E=v.parent.isTextblock&&!v.parent.type.spec.code&&!v.parent.textContent&&v.parent.childCount===0&&!this.getTextContent(v.parent);if(!m.hasFocus()||!S||!C||!E||!this.editor.isEditable)return!1;return!0},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(m,b,y,v)=>{let{composing:S}=m;if(S||!b&&!y)return;if(!this.getShouldShow(v)){this.hide();return}this.updatePosition(),this.show()},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:m})=>{var b;if(this.preventHide){this.preventHide=!1;return}if((m==null?void 0:m.relatedTarget)&&((b=this.element.parentNode)==null?void 0:b.contains(m.relatedTarget)))return;if((m==null?void 0:m.relatedTarget)===this.editor.view.dom)return;this.hide()},this.transactionHandler=({transaction:m})=>{let b=m.getMeta(this.pluginKey);if(b==="updatePosition")this.updatePosition();else if(b&&typeof b==="object"&&b.type==="updateOptions")this.updateOptions(b.options);else if(b==="hide")this.hide();else if(b==="show")this.updatePosition(),this.show()},this.resizeHandler=()=>{if(this.resizeDebounceTimer)clearTimeout(this.resizeDebounceTimer);this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)};var h;if(this.editor=e,this.element=t,this.view=n,this.pluginKey=a,this.updateDelay=i,this.resizeDelay=l,this.appendTo=u,this.scrollTarget=(h=c==null?void 0:c.scrollTarget)!=null?h:window,this.floatingUIOptions={...this.floatingUIOptions,...c},this.element.tabIndex=0,f)this.shouldShow=f;if(this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(n,n.state),this.getShouldShow())this.show(),this.updatePosition()}getTextContent(e){return T4(e,{textSerializers:P1(this.editor.schema)})}get middlewares(){let e=[];if(this.floatingUIOptions.flip)e.push(o$(typeof this.floatingUIOptions.flip!=="boolean"?this.floatingUIOptions.flip:void 0));if(this.floatingUIOptions.shift)e.push(r$(typeof this.floatingUIOptions.shift!=="boolean"?this.floatingUIOptions.shift:void 0));if(this.floatingUIOptions.offset)e.push(t$(typeof this.floatingUIOptions.offset!=="boolean"?this.floatingUIOptions.offset:void 0));if(this.floatingUIOptions.arrow)e.push(s$(this.floatingUIOptions.arrow));if(this.floatingUIOptions.size)e.push(a$(typeof this.floatingUIOptions.size!=="boolean"?this.floatingUIOptions.size:void 0));if(this.floatingUIOptions.autoPlacement)e.push(n$(typeof this.floatingUIOptions.autoPlacement!=="boolean"?this.floatingUIOptions.autoPlacement:void 0));if(this.floatingUIOptions.hide)e.push(i$(typeof this.floatingUIOptions.hide!=="boolean"?this.floatingUIOptions.hide:void 0));if(this.floatingUIOptions.inline)e.push(l$(typeof this.floatingUIOptions.inline!=="boolean"?this.floatingUIOptions.inline:void 0));return e}getShouldShow(e){var t;let{state:n}=this.view,{selection:a}=n,{ranges:i}=a,l=Math.min(...i.map((f)=>f.$from.pos)),c=Math.max(...i.map((f)=>f.$to.pos));return(t=this.shouldShow)==null?void 0:t.call(this,{editor:this.editor,view:this.view,state:n,oldState:e,from:l,to:c})}updateOptions(e){var t;if(e.updateDelay!==void 0)this.updateDelay=e.updateDelay;if(e.resizeDelay!==void 0)this.resizeDelay=e.resizeDelay;if(e.appendTo!==void 0)this.appendTo=e.appendTo;if(e.shouldShow!==void 0){if(e.shouldShow)this.shouldShow=e.shouldShow}if(e.options!==void 0){let n=(t=e.options.scrollTarget)!=null?t:window;if(n!==this.scrollTarget)this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=n,this.scrollTarget.addEventListener("scroll",this.resizeHandler);this.floatingUIOptions={...this.floatingUIOptions,...e.options}}}updatePosition(){var e,t;if(!((t=(e=this.view)==null?void 0:e.dom)==null?void 0:t.parentNode))return;let{selection:n}=this.editor.state,a=I1(this.view,n.from,n.to);c$({getBoundingClientRect:()=>a,getClientRects:()=>[a]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:l,y:c,strategy:u,middlewareData:f})=>{var h,m;if(((h=f.hide)==null?void 0:h.referenceHidden)||((m=f.hide)==null?void 0:m.escaped)){this.element.style.visibility="hidden";return}if(this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=u,this.element.style.left=`${l}px`,this.element.style.top=`${c}px`,this.isVisible&&this.floatingUIOptions.onUpdate)this.floatingUIOptions.onUpdate()})}update(e,t){let n=!(t==null?void 0:t.selection.eq(e.state.selection)),a=!(t==null?void 0:t.doc.eq(e.state.doc));this.updateHandler(e,n,a,t)}show(){var e;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";let t=typeof this.appendTo==="function"?this.appendTo():this.appendTo;if((e=t!=null?t:this.view.dom.parentElement)==null||e.appendChild(this.element),this.floatingUIOptions.onShow)this.floatingUIOptions.onShow();this.isVisible=!0}hide(){if(!this.isVisible)return;if(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide)this.floatingUIOptions.onHide();this.isVisible=!1}destroy(){if(this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy)this.floatingUIOptions.onDestroy()}},X4=(e)=>new qe({key:typeof e.pluginKey==="string"?new Qe(e.pluginKey):e.pluginKey,view:(t)=>new yae({view:t,...e})}),ZAe;var DU=N(()=>{Ye();K4();Ye();at();ZAe=St.create({name:"floatingMenu",addOptions(){return{element:null,options:{},pluginKey:"floatingMenu",updateDelay:void 0,resizeDelay:void 0,appendTo:void 0,shouldShow:null}},addCommands(){return{updateFloatingMenuPosition:()=>({tr:e,dispatch:t})=>{if(t)e.setMeta(this.options.pluginKey,"updatePosition");return!0}}},addProseMirrorPlugins(){if(!this.options.element)return[];return[X4({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,resizeDelay:this.options.resizeDelay,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]}})});function _U(e,t){return e!=null?e:new Qe(t)}function Z4(e,t){return/^on[A-Z]/.test(e)&&typeof t==="function"}function Eae(e){if(e.startsWith("aria-")||e.startsWith("data-"))return e;return e}function Tae(e){return e.startsWith("aria-")||e.startsWith("data-")||wae.has(e)}function BU(e){if(e.startsWith("--"))return e;return e.replace(/[A-Z]/g,(t)=>`-${t.toLowerCase()}`)}function Rae(e){var t;let n=e.endsWith("Capture"),i=(n?e.slice(0,-7):e).slice(2);return{eventName:(t=Cae[i])!=null?t:i.toLowerCase(),options:n?{capture:!0}:void 0}}function kae(e,t){let n=t.defaultPrevented,a=!1,i=Object.create(t);return Object.defineProperties(i,{nativeEvent:{value:t},currentTarget:{value:e},target:{value:t.target},persist:{value:()=>{return}},isDefaultPrevented:{value:()=>n},isPropagationStopped:{value:()=>a},preventDefault:{value:()=>{n=!0,t.preventDefault()}},stopPropagation:{value:()=>{a=!0,t.stopPropagation()}}}),i}function Q4(e){return Sae.has(e)}function PU(e,t,n){if(t==="tabIndex"){e.tabIndex=Number(n);return}e[t]=n}function Aae(e,t){if(t==="tabIndex"){e.removeAttribute("tabindex");return}let n=e[t];if(typeof n==="boolean"){e[t]=!1;return}if(typeof n==="number"){e[t]=0;return}e[t]=""}function Mae(e,t){if(typeof t!=="number"||t===0||e.startsWith("--")||xae.has(e))return String(t);return`${t}px`}function Nae(e,t){if(IU.has(t))return;e.style.removeProperty(BU(t))}function Oae(e,t,n){if(IU.has(t))return;e.style.setProperty(BU(t),Mae(t,n))}function Dae(e,t,n){new Set([...Object.keys(t),...Object.keys(n)]).forEach((i)=>{if($ae.has(i)||!Tae(i)||Z4(i,t[i])||Z4(i,n[i]))return;let l=t[i],c=n[i];if(l===c)return;let u=Eae(i);if(c==null||c===!1){if(Q4(i))Aae(e,i);e.removeAttribute(u);return}if(c===!0){if(Q4(i))PU(e,i,!0);e.setAttribute(u,"");return}if(Q4(i)){PU(e,i,c);return}e.setAttribute(u,String(c))})}function Pae(e,t,n){if(t===n)return;if(n){e.className=n;return}e.removeAttribute("class")}function Lae(e,t,n){let a=t!=null?t:{},i=n!=null?n:{};new Set([...Object.keys(a),...Object.keys(i)]).forEach((c)=>{let u=a[c],f=i[c];if(u===f)return;if(f==null){Nae(e,c);return}Oae(e,c,f)})}function _ae(e,t,n){t.forEach(({eventName:i,listener:l,options:c})=>{e.removeEventListener(i,l,c)});let a=[];return Object.entries(n).forEach(([i,l])=>{if(!Z4(i,l))return;let{eventName:c,options:u}=Rae(i),f=(h)=>{l(kae(e,h))};e.addEventListener(c,f,u),a.push({eventName:c,listener:f,options:u})}),a}function zU(e,t){let n=_d.useRef({}),a=_d.useRef([]);vae(()=>{let i=n.current;return Pae(e,i.className,t.className),Lae(e,i.style,t.style),Dae(e,i,t),a.current=_ae(e,a.current,t),n.current=t,()=>{a.current.forEach(({eventName:l,listener:c,options:u})=>{e.removeEventListener(l,c,u)}),a.current=[]}},[e,t])}var Ma,LU,_d,Na,FU,vae,IU,xae,$ae,Sae,wae,Cae,HU,s5e;var UU=N(()=>{OU();j1();at();DU();j1();Ma=q(ae(),1),LU=q(jr(),1),_d=q(ae(),1),Na=q(ae(),1),FU=q(jr(),1);vae=typeof window<"u"?_d.useLayoutEffect:_d.useEffect,IU=new Set(["left","opacity","position","top","visibility","width"]),xae=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","columns","fillOpacity","flex","flexGrow","flexShrink","fontWeight","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineClamp","lineHeight","opacity","order","orphans","scale","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","zIndex","zoom"]),$ae=new Set(["children","className","style"]),Sae=new Set(["tabIndex"]),wae=new Set(["accessKey","autoCapitalize","contentEditable","contextMenu","dir","draggable","enterKeyHint","hidden","id","lang","nonce","role","slot","spellCheck","tabIndex","title","translate"]),Cae={Blur:"focusout",DoubleClick:"dblclick",Focus:"focusin",MouseEnter:"mouseenter",MouseLeave:"mouseleave"};HU=Ma.default.forwardRef(({pluginKey:e,editor:t,updateDelay:n,resizeDelay:a,appendTo:i,shouldShow:l=null,getReferencedVirtualElement:c,options:u,children:f,...h},m)=>{let b=Ma.useRef(document.createElement("div")),y=Ma.useRef(_U(e,"bubbleMenu")).current;if(zU(b.current,h),typeof m==="function")m(b.current);else if(m)m.current=b.current;let{editor:v}=V1(),S=t||v,C={updateDelay:n,resizeDelay:a,appendTo:i,pluginKey:y,shouldShow:l,getReferencedVirtualElement:c,options:u},E=Ma.useRef(C);E.current=C;let[R,D]=Ma.useState(!1),U=Ma.useRef(!0);return Ma.useEffect(()=>{if(S==null?void 0:S.isDestroyed)return;if(!S){console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");return}let z=b.current;z.style.visibility="hidden",z.style.position="absolute";let L=J4({...E.current,editor:S,element:z});S.registerPlugin(L);let Q=E.current.pluginKey;return U.current=!0,D(!0),()=>{D(!1),S.unregisterPlugin(Q),window.requestAnimationFrame(()=>{if(z.parentNode)z.parentNode.removeChild(z)})}},[S]),Ma.useEffect(()=>{if(!R||!S||S.isDestroyed)return;if(U.current){U.current=!1;return}S.view.dispatch(S.state.tr.setMeta(y,{type:"updateOptions",options:E.current}))},[R,S,n,a,l,u,i,c,y]),LU.createPortal(f,b.current)}),s5e=Na.default.forwardRef(({pluginKey:e,editor:t,updateDelay:n,resizeDelay:a,appendTo:i,shouldShow:l=null,options:c,children:u,...f},h)=>{let m=Na.useRef(document.createElement("div")),b=Na.useRef(_U(e,"floatingMenu")).current;if(zU(m.current,f),typeof h==="function")h(m.current);else if(h)h.current=m.current;let{editor:y}=V1(),v=t||y,S={updateDelay:n,resizeDelay:a,appendTo:i,pluginKey:b,shouldShow:l,options:c},C=Na.useRef(S);C.current=S;let[E,R]=Na.useState(!1),D=Na.useRef(!0);return Na.useEffect(()=>{if(v==null?void 0:v.isDestroyed)return;if(!v){console.warn("FloatingMenu component is not rendered inside of an editor component or does not have editor prop.");return}let U=m.current;U.style.visibility="hidden",U.style.position="absolute";let z=X4({...C.current,editor:v,element:U});v.registerPlugin(z);let L=C.current.pluginKey;return D.current=!0,R(!0),()=>{R(!1),v.unregisterPlugin(L),window.requestAnimationFrame(()=>{if(U.parentNode)U.parentNode.removeChild(U)})}},[v]),Na.useEffect(()=>{if(!E||!v||v.isDestroyed)return;if(D.current){D.current=!1;return}v.view.dispatch(v.state.tr.setMeta(b,{type:"updateOptions",options:C.current}))},[E,v,n,a,l,c,i,b]),FU.createPortal(u,m.current)})});var ih=(e,t)=>{if(e==="slot")return 0;if(e instanceof Function)return e(t);let{children:n,...a}=t!=null?t:{};if(e==="svg")throw Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[e,a,n]};var VU=()=>{};var ek=N(()=>{VU()});var Iae=(e,t)=>{var n;let{state:a,view:i}=e,{selection:l}=a;if(!l.empty)return!1;let{$from:c}=l;if(c.parentOffset!==0)return!1;let u=c.depth-1;if(u<0)return!1;let f=c.node(u),h=c.index(u);if(h===0)return!1;if(f.type===t)return e.commands.lift(t.name);let m=f.child(h-1);if(m.type!==t||!((n=m.lastChild)==null?void 0:n.isTextblock))return!1;let b=c.before(),v=b-1-1,{tr:S}=a;return S.delete(b,c.after()).insert(v,c.parent.content),S.setSelection(Me.create(S.doc,v)),i.dispatch(S.scrollIntoView()),!0},Bae,jU;var KU=N(()=>{Ye();at();ek();Bae=/^\s*>\s$/,jU=en.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return ih("blockquote",{...$t(this.options.HTMLAttributes,e),children:ih("slot",{})})},parseMarkdown:(e,t)=>{var n;let a=(n=t.parseBlockChildren)!=null?n:t.parseChildren;return t.createNode("blockquote",void 0,a(e.tokens||[]))},renderMarkdown:(e,t)=>{if(!e.content)return"";let n=">",a=[];return e.content.forEach((i,l)=>{var c,u;let m=((u=(c=t.renderChild)==null?void 0:c.call(t,i,l))!=null?u:t.renderChildren([i])).split(`
355
+ `).map((b)=>{if(b.trim()==="")return n;return`${n} ${b}`});a.push(m.join(`
356
+ `))}),a.join(`
357
+ ${n}
358
+ `)},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote(),Backspace:()=>Iae(this.editor,this.type)}},addInputRules(){return[ts({find:Bae,type:this.type})]}})});var zae,Hae,Fae,Uae,qU;var GU=N(()=>{Ye();ek();zae=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,Hae=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,Fae=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,Uae=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,qU=Qr.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:(e)=>e.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:(e)=>e.type.name===this.name},{style:"font-weight",getAttrs:(e)=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return ih("strong",{...$t(this.options.HTMLAttributes,e),children:ih("slot",{})})},markdownTokenName:"strong",parseMarkdown:(e,t)=>t.applyMark("bold",t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:"<strong>",close:"</strong>"}},renderMarkdown:(e,t)=>`**${t.renderChildren(e)}**`,addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[bo({find:zae,type:this.type}),bo({find:Fae,type:this.type})]},addPasteRules(){return[Pr({find:Hae,type:this.type}),Pr({find:Uae,type:this.type})]}})});var Vae=(e)=>{let t=/`([^`]+)`(?!`)$/.exec(e);if(!t)return null;if(t.index>0&&e[t.index-1]==="`")return null;return{index:t.index,text:t[0],replaceWith:t[1]}},jae=(e)=>{let t=/`([^`]+)`(?!`)/g,n=[],a;while((a=t.exec(e))!==null){if(a.index>0&&e[a.index-1]==="`")continue;n.push({index:a.index,text:a[0],replaceWith:a[1]})}return n},WU;var YU=N(()=>{Ye();WU=Qr.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",$t(this.options.HTMLAttributes,e),0]},markdownTokenName:"codespan",parseMarkdown:(e,t)=>t.applyMark("code",[{type:"text",text:e.text||""}]),renderMarkdown:(e,t)=>{if(!e.content)return"";return`\`${t.renderChildren(e.content)}\``},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[bo({find:Vae,type:this.type})]},addPasteRules(){return[Pr({find:jae,type:this.type})]}})});var tk=4,Kae,qae,JU;var XU=N(()=>{Ye();at();Kae=/^```([a-z]+)?[\s\n]$/,qae=/^~~~([a-z]+)?[\s\n]$/,JU=en.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,exitOnArrowUp:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:tk,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:(e)=>{var t;let{languageClassPrefix:n}=this.options;if(!n)return null;let l=[...((t=e.firstElementChild)==null?void 0:t.classList)||[]].filter((c)=>c.startsWith(n)).map((c)=>c.replace(n,""))[0];if(!l)return null;return l},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:t}){return["pre",$t(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(e,t)=>{var n,a;if(((n=e.raw)==null?void 0:n.startsWith("```"))===!1&&((a=e.raw)==null?void 0:a.startsWith("~~~"))===!1&&e.codeBlockStyle!=="indented")return[];return t.createNode("codeBlock",{language:e.lang||null},e.text?[t.createTextNode(e.text)]:[])},renderMarkdown:(e,t)=>{var n;let a="",i=((n=e.attrs)==null?void 0:n.language)||"";if(!e.content)a=`\`\`\`${i}
359
+
360
+ \`\`\``;else a=[`\`\`\`${i}`,t.renderChildren(e.content),"```"].join(`
361
+ `);return a},addCommands(){return{setCodeBlock:(e)=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:(e)=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;if(!e||t.parent.type.name!==this.name)return!1;if(n||!t.parent.textContent.length)return this.editor.commands.clearNodes();return!1},Tab:({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=(t=this.options.tabSize)!=null?t:tk,{state:a}=e,{selection:i}=a,{$from:l,empty:c}=i;if(l.parent.type!==this.type)return!1;let u=" ".repeat(n);if(c)return e.commands.insertContent(u);return e.commands.command(({tr:f})=>{let{from:h,to:m}=i,v=a.doc.textBetween(h,m,`
362
+ `,`
363
+ `).split(`
364
+ `).map((S)=>u+S).join(`
365
+ `);return f.replaceWith(h,m,a.schema.text(v)),!0})},"Shift-Tab":({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=(t=this.options.tabSize)!=null?t:tk,{state:a}=e,{selection:i}=a,{$from:l,empty:c}=i;if(l.parent.type!==this.type)return!1;if(c)return e.commands.command(({tr:u})=>{var f;let{pos:h}=l,m=l.start(),b=l.end(),v=a.doc.textBetween(m,b,`
366
+ `,`
367
+ `).split(`
368
+ `),S=0,C=0,E=h-m;for(let Q=0;Q<v.length;Q+=1){if(C+v[Q].length>=E){S=Q;break}C+=v[Q].length+1}let D=((f=v[S].match(/^ */))==null?void 0:f[0])||"",U=Math.min(D.length,n);if(U===0)return!0;let z=m;for(let Q=0;Q<S;Q+=1)z+=v[Q].length+1;if(u.delete(z,z+U),h-z<=U)u.setSelection(Me.create(u.doc,z));return!0});return e.commands.command(({tr:u})=>{let{from:f,to:h}=i,y=a.doc.textBetween(f,h,`
369
+ `,`
370
+ `).split(`
371
+ `).map((v)=>{var S;let C=((S=v.match(/^ */))==null?void 0:S[0])||"",E=Math.min(C.length,n);return v.slice(E)}).join(`
372
+ `);return u.replaceWith(f,h,a.schema.text(y)),!0})},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:t}=e,{selection:n}=t,{$from:a,empty:i}=n;if(!i||a.parent.type!==this.type)return!1;let l=a.parentOffset===a.parent.nodeSize-2,c=a.parent.textContent.endsWith(`
373
+
374
+ `);if(!l||!c)return!1;return e.chain().command(({tr:u})=>(u.delete(a.pos-2,a.pos),!0)).exitCode().run()},ArrowUp:({editor:e})=>{if(!this.options.exitOnArrowUp)return!1;let{state:t}=e,{selection:n}=t,{$from:a,empty:i}=n;if(!i||a.parent.type!==this.type)return!1;if(a.parentOffset!==0)return!1;let l=a.before();if(l>0)return!1;return e.commands.insertDefaultBlock({pos:l})},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:n,doc:a}=t,{$from:i,empty:l}=n;if(!l||i.parent.type!==this.type)return!1;if(i.parentOffset!==i.parent.nodeSize-2)return!1;let u=i.after();if(u===void 0)return!1;if(a.nodeAt(u))return e.commands.command(({tr:h})=>(h.setSelection(Ue.near(a.resolve(u))),!0));return e.commands.exitCode()}}},addInputRules(){return[gb({find:Kae,type:this.type,getAttributes:(e)=>({language:e[1]})}),gb({find:qae,type:this.type,getAttributes:(e)=>({language:e[1]})})]},addProseMirrorPlugins(){return[new qe({key:new Qe("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData)return!1;if(this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData("text/plain"),a=t.clipboardData.getData("vscode-editor-data"),i=a?JSON.parse(a):void 0,l=i==null?void 0:i.mode;if(!n||!l)return!1;let{tr:c,schema:u}=e.state,f=u.text(n.replace(/\r\n?/g,`
375
+ `));if(c.replaceSelectionWith(this.type.create({language:l},f)),c.selection.$from.parent.type!==this.type)c.setSelection(Me.near(c.doc.resolve(Math.max(0,c.selection.from-2))));return c.setMeta("paste",!0),e.dispatch(c),!0}}})]}})});var QU;var ZU=N(()=>{Ye();QU=en.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(e,t)=>{if(!e.content)return"";return t.renderChildren(e.content,`
376
+
377
+ `)}})});var eV;var tV=N(()=>{Ye();eV=en.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",$t(this.options.HTMLAttributes,e)]},renderText(){return`
378
+ `},renderMarkdown:()=>`
379
+ `,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:a})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:i,storedMarks:l}=n;if(i.$from.parent.type.spec.isolating)return!1;let{keepMarks:c}=this.options,{splittableMarks:u}=a.extensionManager,f=l||i.$to.parentOffset&&i.$from.marks();return t().insertContent({type:this.name}).command(({tr:h,dispatch:m})=>{if(m&&f&&c){let b=f.filter((y)=>u.includes(y.type.name));h.ensureMarks(b)}return!0}).scrollIntoView().run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}})});var nV;var rV=N(()=>{Ye();nV=en.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map((e)=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,$t(this.options.HTMLAttributes,t),0]},parseMarkdown:(e,t)=>t.createNode("heading",{level:e.depth||1},t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>{var n;let a=((n=e.attrs)==null?void 0:n.level)?parseInt(e.attrs.level,10):1,i="#".repeat(a);if(!e.content)return"";return`${i} ${t.renderChildren(e.content)}`},addCommands(){return{setHeading:(e)=>({commands:t})=>{if(!this.options.levels.includes(e.level))return!1;return t.setNode(this.name,e)},toggleHeading:(e)=>({commands:t})=>{if(!this.options.levels.includes(e.level))return!1;return t.toggleNode(this.name,"paragraph",e)}}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map((e)=>gb({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}})});var oV;var aV=N(()=>{Ye();at();oV=en.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",$t(this.options.HTMLAttributes,e)]},markdownTokenName:"hr",parseMarkdown:(e,t)=>t.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!aF(t,t.schema.nodes[this.name]))return!1;let{selection:n}=t,{$to:a}=n,i=e();if(_1(n))i.insertContentAt(a.pos,{type:this.name});else i.insertContent({type:this.name});return i.command(({state:l,tr:c,dispatch:u})=>{if(u){let{$to:f}=c.selection,h=f.end();if(f.nodeAfter)if(f.nodeAfter.isTextblock)c.setSelection(Me.create(c.doc,f.pos+1));else if(f.nodeAfter.isBlock)c.setSelection(Pe.create(c.doc,f.pos));else c.setSelection(Me.create(c.doc,f.pos));else{let m=l.schema.nodes[this.options.nextNodeType]||f.parent.type.contentMatch.defaultType,b=m==null?void 0:m.create();if(b)c.insert(h,b),c.setSelection(Me.create(c.doc,h+1))}c.scrollIntoView()}return!0}).run()}}},addInputRules(){return[xF({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}})});var Gae,Wae,Yae,Jae,iV;var sV=N(()=>{Ye();Gae=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,Wae=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,Yae=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,Jae=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,iV=Qr.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:(e)=>e.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:(e)=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",$t(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(e,t)=>t.applyMark("italic",t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:"<em>",close:"</em>"}},renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[bo({find:Gae,type:this.type}),bo({find:Yae,type:this.type})]},addPasteRules(){return[Pr({find:Wae,type:this.type}),Pr({find:Jae,type:this.type})]}})});function Xae(e,t){if(!(e in t))t[e]=[];return t[e]}function Id(e,t,n){if(t.numeric)t.asciinumeric=!0,t.alphanumeric=!0;if(t.ascii)t.asciinumeric=!0,t.alpha=!0;if(t.asciinumeric)t.alphanumeric=!0;if(t.alpha)t.alphanumeric=!0;if(t.alphanumeric)t.domain=!0;if(t.emoji)t.domain=!0;for(let a in t){let i=Xae(a,n);if(i.indexOf(e)<0)i.push(e)}}function Qae(e,t){let n={};for(let a in t)if(t[a].indexOf(e)>=0)n[a]=!0;return n}function vo(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}function tie(e=[]){let t={};vo.groups=t;let n=new vo;if(h$==null)h$=uV("aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2");if(m$==null)m$=uV("ελ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");be(n,"'",D$),be(n,"{",kb),be(n,"}",Ab),be(n,"[",y$),be(n,"]",v$),be(n,"(",x$),be(n,")",$$),be(n,"<",S$),be(n,">",w$),be(n,"(",C$),be(n,")",E$),be(n,"「",T$),be(n,"」",R$),be(n,"『",k$),be(n,"』",A$),be(n,"<",M$),be(n,">",N$),be(n,"&",O$),be(n,"*",P$),be(n,"@",Gc),be(n,"`",_$),be(n,"^",I$),be(n,":",Bd),be(n,",",pk),be(n,"$",B$),be(n,".",as),be(n,"=",z$),be(n,"!",hk),be(n,"-",Da),be(n,"%",Mb),be(n,"|",H$),be(n,"+",F$),be(n,"#",U$),be(n,"?",Nb),be(n,'"',mk),be(n,"/",is),be(n,";",gk),be(n,"~",Ob),be(n,"_",V$),be(n,"\\",L$),be(n,"・",mV);let a=Rn(n,fl,dk,{["numeric"]:!0});Rn(a,fl,a);let i=Rn(a,dl,pV,{["asciinumeric"]:!0}),l=Rn(a,Rb,hV,{["alphanumeric"]:!0}),c=Rn(n,dl,pl,{["ascii"]:!0});Rn(c,fl,i),Rn(c,dl,c),Rn(i,fl,i),Rn(i,dl,i);let u=Rn(n,Rb,sk,{["alpha"]:!0});Rn(u,dl),Rn(u,fl,l),Rn(u,Rb,u),Rn(l,fl,l),Rn(l,dl),Rn(l,Rb,l);let f=be(n,ok,fk,{["whitespace"]:!0}),h=be(n,cV,uk,{["whitespace"]:!0}),m=Rn(n,rk,uk,{["whitespace"]:!0});be(n,ak,m),be(h,ok,f),be(h,ak,m),Rn(h,rk,m),be(m,cV),be(m,ok),Rn(m,rk,m),be(m,ak,m);let b=Rn(n,nk,gV,{["emoji"]:!0});be(b,"#"),Rn(b,nk,b),be(b,Zae,b);let y=be(b,eie);be(y,"#"),Rn(y,nk,b);let v=[[dl,c],[fl,i]],S=[[dl,null],[Rb,u],[fl,l]];for(let C=0;C<h$.length;C++)qc(n,h$[C],lk,pl,v);for(let C=0;C<m$.length;C++)qc(n,m$[C],ck,sk,S);Id(lk,{tld:!0,ascii:!0},t),Id(ck,{utld:!0,alpha:!0},t),qc(n,"file",b$,pl,v),qc(n,"mailto",b$,pl,v),qc(n,"http",sh,pl,v),qc(n,"https",sh,pl,v),qc(n,"ftp",sh,pl,v),qc(n,"ftps",sh,pl,v),Id(b$,{scheme:!0,ascii:!0},t),Id(sh,{slashscheme:!0,ascii:!0},t),e=e.sort((C,E)=>C[0]>E[0]?1:-1);for(let C=0;C<e.length;C++){let E=e[C][0],D=e[C][1]?{["scheme"]:!0}:{["slashscheme"]:!0};if(E.indexOf("-")>=0)D.domain=!0;else if(!dl.test(E))D.numeric=!0;else if(fl.test(E))D.asciinumeric=!0;else D.ascii=!0;lV(n,E,E,D)}return lV(n,"localhost",Db,{ascii:!0}),n.jd=new vo(j$),{start:n,tokens:Object.assign({groups:t},bV)}}function yV(e,t){let n=nie(t.replace(/[A-Z]/g,(u)=>u.toLowerCase())),a=n.length,i=[],l=0,c=0;while(c<a){let u=e,f=null,h=0,m=null,b=-1,y=-1;while(c<a&&(f=u.go(n[c]))){if(u=f,u.accepts())b=0,y=0,m=u;else if(b>=0)b+=n[c].length,y++;h+=n[c].length,l+=n[c].length,c++}l-=b,c-=y,h-=b,i.push({t:m.t,v:t.slice(l-h,l),s:l-h,e:l})}return i}function nie(e){let t=[],n=e.length,a=0;while(a<n){let i=e.charCodeAt(a),l,c=i<55296||i>56319||a+1===n||(l=e.charCodeAt(a+1))<56320||l>57343?e[a]:e.slice(a,a+2);t.push(c),a+=c.length}return t}function qc(e,t,n,a,i){let l,c=t.length;for(let u=0;u<c-1;u++){let f=t[u];if(e.j[f])l=e.j[f];else l=new vo(a),l.jr=i.slice(),e.j[f]=l;e=l}return l=new vo(n),l.jr=i.slice(),e.j[t[c-1]]=l,l}function uV(e){let t=[],n=[],a=0,i="0123456789";while(a<e.length){let l=0;while(i.indexOf(e[a+l])>=0)l++;if(l>0){t.push(n.join(""));for(let c=parseInt(e.substring(a,a+l),10);c>0;c--)n.pop();a+=l}else n.push(e[a]),a++}return t}function bk(e,t=null){let n=Object.assign({},Pb);if(e)n=Object.assign(n,e instanceof bk?e.o:e);let a=n.ignoreTags,i=[];for(let l=0;l<a.length;l++)i.push(a[l].toUpperCase());if(this.o=n,t)this.defaultRender=t;this.ignoreTags=i}function dV(e){return e}function vV(e,t){this.t="token",this.v=e,this.tk=t}function K$(e,t){class n extends vV{constructor(a,i){super(a,i);this.t=e}}for(let a in t)n.prototype[a]=t[a];return n.t=e,n}function aie({groups:e}){let t=e.domain.concat([O$,P$,Gc,L$,_$,I$,B$,z$,Da,dk,Mb,H$,F$,U$,is,j$,Ob,V$]),n=[D$,Bd,pk,as,hk,Mb,Nb,mk,gk,S$,w$,kb,Ab,v$,y$,x$,$$,C$,E$,T$,R$,k$,A$,M$,N$],a=[O$,D$,P$,L$,_$,I$,B$,z$,Da,kb,Ab,Mb,H$,F$,U$,Nb,is,j$,Ob,V$],i=Oa(),l=be(i,Ob);vt(l,a,l),vt(l,e.domain,l);let c=Oa(),u=Oa(),f=Oa();vt(i,e.domain,c),vt(i,e.scheme,u),vt(i,e.slashscheme,f),vt(c,a,l),vt(c,e.domain,c);let h=be(c,Gc);be(l,Gc,h),be(u,Gc,h),be(f,Gc,h);let m=be(l,as);vt(m,a,l),vt(m,e.domain,l);let b=Oa();vt(h,e.domain,b),vt(b,e.domain,b);let y=be(b,as);vt(y,e.domain,b);let v=Oa(rie);vt(y,e.tld,v),vt(y,e.utld,v),be(h,Db,v);let S=be(b,Da);be(S,Da,S),vt(S,e.domain,b),vt(v,e.domain,b),be(v,as,y),be(v,Da,S);let C=be(c,Da),E=be(c,as);be(C,Da,C),vt(C,e.domain,c),vt(E,a,l),vt(E,e.domain,c);let R=Oa(g$);vt(E,e.tld,R),vt(E,e.utld,R),vt(R,e.domain,c),vt(R,a,l),be(R,as,E),be(R,Da,C),be(R,Gc,h);let D=be(R,Bd),U=Oa(g$);vt(D,e.numeric,U);let z=Oa(g$),L=Oa();vt(z,t,z),vt(z,n,L),vt(L,t,z),vt(L,n,L),be(R,is,z),be(U,is,z);let Q=be(u,Bd),V=be(f,Bd),P=be(V,is),re=be(P,is);vt(u,e.domain,c),be(u,as,E),be(u,Da,C),vt(f,e.domain,c),be(f,as,E),be(f,Da,C),vt(Q,e.domain,z),be(Q,is,z),be(Q,Nb,z),vt(re,e.domain,z),vt(re,t,z),be(re,is,z);let J=[[kb,Ab],[y$,v$],[x$,$$],[S$,w$],[C$,E$],[T$,R$],[k$,A$],[M$,N$]];for(let ge=0;ge<J.length;ge++){let[le,se]=J[ge],I=be(z,le);be(L,le,I);let F=Oa(g$);vt(I,t,F);let Y=Oa();vt(I,n,Y),be(I,se,z),vt(F,t,F),vt(F,n,Y),vt(Y,t,F),vt(Y,n,Y),be(F,se,z),be(Y,se,z)}return be(i,Db,R),be(i,fk,oie),{start:i,tokens:bV}}function iie(e,t,n){let a=n.length,i=0,l=[],c=[];while(i<a){let u=e,f=null,h=null,m=0,b=null,y=-1;while(i<a&&!(f=u.go(n[i].t)))c.push(n[i++]);while(i<a&&(h=f||u.go(n[i].t))){if(f=null,u=h,u.accepts())y=0,b=u;else if(y>=0)y++;i++,m++}if(y<0){if(i-=m,i<a)c.push(n[i]),i++}else{if(c.length>0)l.push(ik(fV,t,c)),c=[];i-=y,m-=y;let v=b.t,S=n.slice(i-m,i);l.push(ik(v,t,S))}}if(c.length>0)l.push(ik(fV,t,c));return l}function ik(e,t,n){let a=n[0].s,i=n[n.length-1].e,l=t.slice(a,i);return new e(l,n)}function xV(){return vo.groups={},ln.scanner=null,ln.parser=null,ln.tokenQueue=[],ln.pluginQueue=[],ln.customSchemes=[],ln.initialized=!1,ln}function yk(e,t=!1){if(ln.initialized)sie(`linkifyjs: already initialized - will not register custom scheme "${e}" ${lie}`);if(!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw Error(`linkifyjs: incorrect scheme format.
380
+ 1. Must only contain digits, lowercase ASCII letters or "-"
381
+ 2. Cannot start or end with "-"
382
+ 3. "-" cannot repeat`);ln.customSchemes.push([e,t])}function cie(){ln.scanner=tie(ln.customSchemes);for(let e=0;e<ln.tokenQueue.length;e++)ln.tokenQueue[e][1]({scanner:ln.scanner});ln.parser=aie(ln.scanner.tokens);for(let e=0;e<ln.pluginQueue.length;e++)ln.pluginQueue[e][1]({scanner:ln.scanner,parser:ln.parser});return ln.initialized=!0,ln}function q$(e){if(!ln.initialized)cie();return iie(ln.parser.start,e,yV(ln.scanner.start,e))}function G$(e,t=null,n=null){if(t&&typeof t==="object"){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}let a=new bk(n),i=q$(e),l=[];for(let c=0;c<i.length;c++){let u=i[c];if(u.isLink&&(!t||u.t===t)&&a.check(u))l.push(u.toFormattedObject(a))}return l}var vt=(e,t,n,a,i)=>e.ta(t,n,a,i),Rn=(e,t,n,a,i)=>e.tr(t,n,a,i),lV=(e,t,n,a,i)=>e.ts(t,n,a,i),be=(e,t,n,a,i)=>e.tt(t,n,a,i),pl="WORD",sk="UWORD",pV="ASCIINUMERICAL",hV="ALPHANUMERICAL",Db="LOCALHOST",lk="TLD",ck="UTLD",b$="SCHEME",sh="SLASH_SCHEME",dk="NUM",uk="WS",fk="NL",kb="OPENBRACE",Ab="CLOSEBRACE",y$="OPENBRACKET",v$="CLOSEBRACKET",x$="OPENPAREN",$$="CLOSEPAREN",S$="OPENANGLEBRACKET",w$="CLOSEANGLEBRACKET",C$="FULLWIDTHLEFTPAREN",E$="FULLWIDTHRIGHTPAREN",T$="LEFTCORNERBRACKET",R$="RIGHTCORNERBRACKET",k$="LEFTWHITECORNERBRACKET",A$="RIGHTWHITECORNERBRACKET",M$="FULLWIDTHLESSTHAN",N$="FULLWIDTHGREATERTHAN",O$="AMPERSAND",D$="APOSTROPHE",P$="ASTERISK",Gc="AT",L$="BACKSLASH",_$="BACKTICK",I$="CARET",Bd="COLON",pk="COMMA",B$="DOLLAR",as="DOT",z$="EQUALS",hk="EXCLAMATION",Da="HYPHEN",Mb="PERCENT",H$="PIPE",F$="PLUS",U$="POUND",Nb="QUERY",mk="QUOTE",mV="FULLWIDTHMIDDLEDOT",gk="SEMI",is="SLASH",Ob="TILDE",V$="UNDERSCORE",gV="EMOJI",j$="SYM",bV,dl,Rb,nk,fl,rk,cV="\r",ok=`
383
+ `,Zae="️",eie="‍",ak="",h$=null,m$=null,Pb,rie,fV,oie,g$,Oa=(e)=>new vo(e),sie,lie="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",ln;var W$=N(()=>{vo.groups={};vo.prototype={accepts(){return!!this.t},go(e){let t=this,n=t.j[e];if(n)return n;for(let a=0;a<t.jr.length;a++){let i=t.jr[a][0],l=t.jr[a][1];if(l&&i.test(e))return l}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,n,a){for(let i=0;i<e.length;i++)this.tt(e[i],t,n,a)},tr(e,t,n,a){a=a||vo.groups;let i;if(t&&t.j)i=t;else if(i=new vo(t),n&&a)Id(t,n,a);return this.jr.push([e,i]),i},ts(e,t,n,a){let i=this,l=e.length;if(!l)return i;for(let c=0;c<l-1;c++)i=i.tt(e[c]);return i.tt(e[l-1],t,n,a)},tt(e,t,n,a){a=a||vo.groups;let i=this;if(t&&t.j)return i.j[e]=t,t;let l=t,c,u=i.go(e);if(u)c=new vo,Object.assign(c.j,u.j),c.jr.push.apply(c.jr,u.jr),c.jd=u.jd,c.t=u.t;else c=new vo;if(l){if(a){if(c.t&&typeof c.t==="string"){let f=Object.assign(Qae(c.t,a),n);Id(l,f,a)}else if(n)Id(l,n,a)}c.t=l}return i.j[e]=c,c}};bV=Object.freeze({__proto__:null,ALPHANUMERICAL:hV,AMPERSAND:O$,APOSTROPHE:D$,ASCIINUMERICAL:pV,ASTERISK:P$,AT:Gc,BACKSLASH:L$,BACKTICK:_$,CARET:I$,CLOSEANGLEBRACKET:w$,CLOSEBRACE:Ab,CLOSEBRACKET:v$,CLOSEPAREN:$$,COLON:Bd,COMMA:pk,DOLLAR:B$,DOT:as,EMOJI:gV,EQUALS:z$,EXCLAMATION:hk,FULLWIDTHGREATERTHAN:N$,FULLWIDTHLEFTPAREN:C$,FULLWIDTHLESSTHAN:M$,FULLWIDTHMIDDLEDOT:mV,FULLWIDTHRIGHTPAREN:E$,HYPHEN:Da,LEFTCORNERBRACKET:T$,LEFTWHITECORNERBRACKET:k$,LOCALHOST:Db,NL:fk,NUM:dk,OPENANGLEBRACKET:S$,OPENBRACE:kb,OPENBRACKET:y$,OPENPAREN:x$,PERCENT:Mb,PIPE:H$,PLUS:F$,POUND:U$,QUERY:Nb,QUOTE:mk,RIGHTCORNERBRACKET:R$,RIGHTWHITECORNERBRACKET:A$,SCHEME:b$,SEMI:gk,SLASH:is,SLASH_SCHEME:sh,SYM:j$,TILDE:Ob,TLD:lk,UNDERSCORE:V$,UTLD:ck,UWORD:sk,WORD:pl,WS:uk}),dl=/[a-z]/,Rb=/\p{L}/u,nk=/\p{Emoji}/u,fl=/\d/,rk=/\s/;Pb={defaultProtocol:"http",events:null,format:dV,formatHref:dV,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};bk.prototype={o:Pb,ignoreTags:[],defaultRender(e){return e},check(e){return this.get("validate",e.toString(),e)},get(e,t,n){let a=t!=null,i=this.o[e];if(!i)return i;if(typeof i==="object"){if(i=n.t in i?i[n.t]:Pb[e],typeof i==="function"&&a)i=i(t,n)}else if(typeof i==="function"&&a)i=i(t,n.t,n);return i},getObj(e,t,n){let a=this.o[e];if(typeof a==="function"&&t!=null)a=a(t,n.t,n);return a},render(e){let t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}};vV.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){let t=this.toString(),n=e.get("truncate",t,this),a=e.get("format",t,this);return n&&a.length>n?a.substring(0,n)+"…":a},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=Pb.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){let t=this,n=this.toHref(e.get("defaultProtocol")),a=e.get("formatHref",n,this),i=e.get("tagName",n,t),l=this.toFormattedString(e),c={},u=e.get("className",n,t),f=e.get("target",n,t),h=e.get("rel",n,t),m=e.getObj("attributes",n,t),b=e.getObj("events",n,t);if(c.href=a,u)c.class=u;if(f)c.target=f;if(h)c.rel=h;if(m)Object.assign(c,m);return{tagName:i,attributes:c,content:l,eventListeners:b}}};rie=K$("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),fV=K$("text"),oie=K$("nl"),g$=K$("url",{isLink:!0,toHref(e=Pb.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==Db&&e[1].t===Bd}});sie=typeof console<"u"&&console&&console.warn||(()=>{}),ln={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};q$.scan=yV});function pie(e){if(e.length===1)return e[0].isLink;if(e.length===3&&e[1].isLink)return["()","[]"].includes(e[0].value+e[2].value);return!1}function hie(e){return new qe({key:new Qe("autolink"),appendTransaction:(t,n,a)=>{let i=t.some((h)=>h.docChanged)&&!n.doc.eq(a.doc),l=t.some((h)=>h.getMeta("preventAutolink"));if(!i||l)return;let{tr:c}=a,u=w4(n.doc,[...t]);if(hb(u).forEach(({newRange:h})=>{let m=qH(a.doc,h,(v)=>v.isTextblock),b,y;if(m.length>1)b=m[0],y=a.doc.textBetween(b.pos,b.pos+b.node.nodeSize,void 0," ");else if(m.length){let v=a.doc.textBetween(h.from,h.to," "," ");if(!die.test(v))return;b=m[0],y=a.doc.textBetween(b.pos,h.to,void 0," ")}if(b&&y){let v=y.split(uie).filter(Boolean);if(v.length<=0)return!1;let S=v[v.length-1],C=b.pos+y.lastIndexOf(S);if(!S)return!1;let E=q$(S).map((R)=>R.toObject(e.defaultProtocol));if(!pie(E))return!1;E.filter((R)=>R.isLink).map((R)=>({...R,from:C+R.start+1,to:C+R.end+1})).filter((R)=>{if(!a.schema.marks.code)return!0;return!a.doc.rangeHasMark(R.from,R.to,a.schema.marks.code)}).filter((R)=>e.validate(R.value)).filter((R)=>e.shouldAutoLink(R.value)).forEach((R)=>{if(L1(R.from,R.to,a.doc).some((D)=>D.mark.type===e.type))return;c.addMark(R.from,R.to,e.type.create({href:R.href}))})}}),!c.steps.length)return;return c}})}function mie(e){return new qe({key:new Qe("handleClickLink"),props:{handleClick:(t,n,a)=>{var i,l;if(a.button!==0)return!1;if(!t.editable)return!1;let c=null;if(a.target instanceof HTMLAnchorElement)c=a.target;else{let f=a.target;if(!f)return!1;let h=e.editor.view.dom;if(c=f.closest("a"),c&&!h.contains(c))c=null}if(!c)return!1;let u=!1;if(e.enableClickSelection)u=e.editor.commands.extendMarkRange(e.type.name);if(e.openOnClick){let f=R4(t.state,e.type.name),h=(i=c.href)!=null?i:f.href,m=(l=c.target)!=null?l:f.target;if(h)window.open(h,m),u=!0}return u}}})}function $V(e,t){let n=0;for(let a=t-1;a>=0&&e[a]==="\\";a-=1)n+=1;return n%2===1}function yie(e,t){let n=0,a=0;while(a<t){if(e[a]!=="`"){a+=1;continue}if(n===0&&$V(e,a)){a+=1;continue}let i=0;while(a<t&&e[a]==="`")i+=1,a+=1;if(n===0)n=i;else if(i===n)n=0}return n>0}function SV(e,t,n){var a,i;let[,l,c]=t;if((t.index?e[t.index-1]:void 0)==="!"||$V(e,(a=t.index)!=null?a:0))return!1;if(yie(e,(i=t.index)!=null?i:0))return!1;return!!l.trim()&&n(c)}function wV(e){var t,n;let[a,i,l,,c,u,f]=e,h=(t=c!=null?c:u)!=null?t:f;return{index:(n=e.index)!=null?n:0,text:a,replaceWith:i,data:{href:l,title:h||null,markdown:!0}}}function vie(e,t){return e.index<t.index+t.text.length&&t.index<e.index+e.text.length}function CV(e){var t,n,a;return{href:(t=e.data)==null?void 0:t.href,title:(a=(n=e.data)==null?void 0:n.title)!=null?a:null}}function xie(e){let t=bo({find:(n)=>{let a=gie.exec(n);if(!a||!SV(n,a,e.isAllowedHref))return null;return wV(a)},type:e.type,getAttributes:CV});return new rh({find:t.find,handler:(n)=>{let a=t.handler(n);if(a!==null&&n.state.tr.steps.length)n.state.tr.setMeta("preventAutolink",!0);return a}})}function $ie(e){let t=Pr({find:(n)=>{var a,i;let l=[];for(let u of n.matchAll(bie))if(SV(n,u,e.isAllowedHref))l.push(wV(u));let c=((i=(a=e.findPlainUrls)==null?void 0:a.call(e,n))!=null?i:[]).filter((u)=>!l.some((f)=>vie(f,u)));return[...l,...c]},type:e.type,getAttributes:CV});return new N4({find:t.find,handler:(n)=>{var a;let i=t.handler(n);if(i!==null&&n.state.tr.steps.length&&((a=n.match.data)==null?void 0:a.markdown))n.state.tr.setMeta("preventAutolink",!0);return i}})}function Sie(e){return new qe({key:new Qe("handlePasteLink"),props:{handlePaste:(t,n,a)=>{let{shouldAutoLink:i}=e,{state:l}=t,{selection:c}=l,{empty:u}=c;if(u)return!1;let f="";a.content.forEach((m)=>{f+=m.textContent});let h=G$(f,{defaultProtocol:e.defaultProtocol}).find((m)=>m.isLink&&m.value===f);if(!f||!h||i!==void 0&&!i(h.value))return!1;return e.editor.commands.setMark(e.type,{href:h.href})}}})}function hl(e,t){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];if(t)t.forEach((a)=>{let i=typeof a==="string"?a:a.scheme;if(i)n.push(i)});return!e||e.replace(fie,"").match(new RegExp(`^(?:(?:${n.map((a)=>a.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join("|")}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`,"i"))}var vk="[\x00-   ᠎ -\u2029  ]",uie,die,fie,gie,bie,EV;var TV=N(()=>{Ye();W$();Ye();at();W$();Ye();at();Ye();at();W$();uie=new RegExp(vk),die=new RegExp(`${vk}$`),fie=new RegExp(vk,"g");gie=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)$/,bie=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)/g;EV=Qr.create({name:"link",priority:1000,keepOnSplit:!1,exitable:!0,onCreate(){if(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((e)=>{if(typeof e==="string"){yk(e);return}yk(e.scheme,e.optionalSlashes)})},onDestroy(){xV()},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:(e,t)=>!!hl(e,t.protocols),validate:(e)=>!!e,shouldAutoLink:(e)=>{let t=/^[a-z][a-z0-9+.-]*:\/\//i.test(e),n=/^[a-z][a-z0-9+.-]*:/i.test(e);if(t||n&&!e.includes("@"))return!0;let i=(e.includes("@")?e.split("@").pop():e).split(/[/?#:]/)[0];if(/^\d{1,3}(\.\d{1,3}){3}$/.test(i))return!1;if(!/\./.test(i))return!1;return!0}}},addAttributes(){var e,t,n;return{href:{default:null,parseHTML(a){return a.getAttribute("href")}},target:{default:(e=this.options.HTMLAttributes.target)!=null?e:null},rel:{default:(t=this.options.HTMLAttributes.rel)!=null?t:null},class:{default:(n=this.options.HTMLAttributes.class)!=null?n:null},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:(e)=>{let t=e.getAttribute("href");if(!t||!this.options.isAllowedUri(t,{defaultValidate:(n)=>!!hl(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))return!1;return null}}]},renderHTML({HTMLAttributes:e}){if(!this.options.isAllowedUri(e.href,{defaultValidate:(t)=>!!hl(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))return["a",$t(this.options.HTMLAttributes,{...e,href:""}),0];return["a",$t(this.options.HTMLAttributes,e),0]},markdownTokenName:"link",parseMarkdown:(e,t)=>t.applyMark("link",t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{var n,a,i,l;let c=(a=(n=e.attrs)==null?void 0:n.href)!=null?a:"",u=(l=(i=e.attrs)==null?void 0:i.title)!=null?l:"",f=t.renderChildren(e);return u?`[${f}](${c} "${u}")`:`[${f}](${c})`},addCommands(){return{setLink:(e)=>({chain:t})=>{let{href:n}=e;if(!this.options.isAllowedUri(n,{defaultValidate:(a)=>!!hl(a,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))return!1;return t().setMark(this.name,e).setMeta("preventAutolink",!0).run()},toggleLink:(e)=>({chain:t})=>{let{href:n}=e||{};if(n&&!this.options.isAllowedUri(n,{defaultValidate:(a)=>!!hl(a,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))return!1;return t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addInputRules(){if(!this.options.markdownLinks)return[];return[xie({type:this.type,isAllowedHref:(e)=>this.options.isAllowedUri(e,{defaultValidate:(t)=>!!hl(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})})]},addPasteRules(){let e=(t)=>{let n=[];if(t){let{protocols:a,defaultProtocol:i}=this.options;G$(t).filter((c)=>c.isLink&&this.options.isAllowedUri(c.value,{defaultValidate:(u)=>!!hl(u,a),protocols:a,defaultProtocol:i})).forEach((c)=>{if(!this.options.shouldAutoLink(c.value))return;n.push({text:c.value,data:{href:c.href},index:c.start})})}return n};if(this.options.markdownLinks)return[$ie({type:this.type,isAllowedHref:(t)=>this.options.isAllowedUri(t,{defaultValidate:(n)=>!!hl(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}),findPlainUrls:e})];return[Pr({find:e,type:this.type,getAttributes:(t)=>{var n;return{href:(n=t.data)==null?void 0:n.href}}})]},addProseMirrorPlugins(){let e=[],{protocols:t,defaultProtocol:n}=this.options;if(this.options.autolink)e.push(hie({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:(a)=>this.options.isAllowedUri(a,{defaultValidate:(i)=>!!hl(i,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink}));if(e.push(mie({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste)e.push(Sie({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink}));return e}})});function X$(e){let t=e,n="";for(let[a,i]of DV)while(t>=a)n+=i,t-=a;return n}function Ck(e){return X$(e).toUpperCase()}function LV(e){let t=e.toLowerCase(),n=0,a=0;while(n<t.length){let i=!1;for(let[l,c]of DV)if(t.startsWith(c,n)){a+=l,n+=c.length,i=!0;break}if(!i)return 0}return a}function Mie(e){if(!/^[ivxlcdmIVXLCDM]+$/.test(e))return!1;let t=LV(e);if(t<=0)return!1;return(e===e.toLowerCase()?X$(t):Ck(t))===e}function Nie(e){let t=e.toLowerCase();if(t.length===1)return t.charCodeAt(0)-97+1;if(t.length===2){let n=t.charCodeAt(0)-97,a=t.charCodeAt(1)-97;return(n+1)*26+a+1}return 0}function J$(e){if(e<=26)return Y$[e-1];let t=Math.floor((e-1)/26)-1,n=(e-1)%26;if(t<0)return Y$[n];return Y$[t]+Y$[n]}function Q$(e){if(!e||/^\d+$/.test(e))return;if(Mie(e))return e===e.toLowerCase()?"i":"I";if(/^[a-z]{1,2}$/.test(e))return"a";if(/^[A-Z]{1,2}$/.test(e))return"A";return}function Ek(e){if(/^\d+$/.test(e))return parseInt(e,10);let t=Q$(e);if(t==="i"||t==="I")return LV(e);if(t==="a"||t==="A"){let a=Nie(e);return a>0?a:1}let n=parseInt(e,10);return Number.isNaN(n)?1:n}function Oie(e,t){if(e==="numeric")return String(t);switch(e){case"a":return J$(t);case"A":return J$(t).toUpperCase();case"i":return X$(t);case"I":return Ck(t);default:return String(t)}}function Die(e){var t;if(e.length===0)return!1;let n=(t=Q$(e[0]))!=null?t:"numeric",a=Ek(e[0]);if(a<1)return!1;for(let i=0;i<e.length;i++){let l=Oie(n,a+i);if(e[i]!==l)return!1}return!0}function Pie(e){return{type:Q$(e),start:Ek(e)}}function Lie(e){let{type:t,start:n}=Pie(e),a={};if(t)a.type=t;if(n!==1)a.start=n;return a}function _ie(e,t,n=". "){let a=t+1;if(!e||e==="1")return`${a}${n}`;switch(e){case"a":return`${J$(a)}${n}`;case"A":return`${J$(a).toUpperCase()}${n}`;case"i":return`${X$(a)}${n}`;case"I":return`${Ck(a)}${n}`;default:return`${a}${n}`}}function Iie(e){var t,n;let a=(t=e.tokens)==null?void 0:t[0];return Boolean(e.text&&((n=e.tokens)==null?void 0:n.length)===1&&(a==null?void 0:a.type)==="list"&&a.ordered&&a.raw===e.text)}function Bie(e,t){if(t.tokenizeInline)return t.parseInline(t.tokenizeInline(e));return t.parseInline([{type:"text",raw:e,text:e}])}function jie(e){return Sk.test(e.trimStart())}function Kie(e){let t=e.trimStart();return Lb.bulletItem.test(t)||jie(t)||Lb.heading.test(t)||Lb.thematicBreak.test(t)&&!t.startsWith("-")||/^>\s?/.test(t)||Lb.codeFence.test(t)}function qie(e){return Object.values(Lb).some((t)=>t.test(e))}function Gie(e){let t=[],n=[],a=!1;return e.forEach((i)=>{if(a){n.push(i);return}if(i.trim()===""){a=!0,n.push(i);return}if(t.length>0&&Kie(i)){a=!0,n.push(i);return}t.push(i)}),{paragraphLines:t,blockLines:n}}function Wie(e){let t=[],n=0,a=0;while(n<e.length){let i=e[n],l=i.match(Sk);if(!l)break;let[,c,u,f,h]=l,m=c.length,b=parseInt(u,10),y=isNaN(b)?Q$(u):void 0,v=isNaN(b)?Ek(u):b,S=[h],C=n+1,E=[i],R=!1;while(C<e.length){let D=e[C];if(D.match(Sk))break;if(D.trim()==="")E.push(D),S.push(""),R=!0,C+=1;else if(D.match(Vie)){let z=D.length-D.trimStart().length,L=m+u.length+1;E.push(D),S.push(D.slice(Math.min(z,L))),C+=1}else{if(R||qie(D))break;E.push(D),S.push(D),C+=1}}t.push({indent:m,number:v,type:y,content:S.join(`
384
+ `).trim(),contentLines:S,raw:E.join(`
385
+ `)}),a=C,n=C}return[t,a]}function Jie(e){let t=e.split(`
386
+ `).filter((l)=>l.trim().length>0);if(t.length===0)return null;let n=[];for(let l of t){let c=l.trim().match(Yie);if(!c)return null;n.push({marker:c[1],content:c[3]})}let a=n.map((l)=>l.marker);if(!Die(a))return null;return{type:"orderedList",attrs:Lie(n[0].marker),content:n.map((l)=>({type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:l.content}]}]}))}}function zV(e,t,n){let a=[],i=0;while(i<e.length){let l=e[i];if(l.indent===t){let{paragraphLines:c,blockLines:u}=Gie(l.contentLines),f=c.join(`
387
+ `).trim(),h=[];if(f)h.push({type:"paragraph",raw:f,tokens:n.inlineTokens(f)});let m=u.join(`
388
+ `).trim();if(m){let v=n.blockTokens(m);h.push(...v)}let b=i+1,y=[];while(b<e.length&&e[b].indent>t)y.push(e[b]),b+=1;if(y.length>0){let v=Math.min(...y.map((C)=>C.indent)),S=zV(y,v,n);h.push({type:"list",ordered:!0,start:y[0].number,typeMarker:y[0].type,items:S,raw:y.map((C)=>C.raw).join(`
389
+ `)})}a.push({type:"list_item",raw:l.raw,tokens:h}),i=b}else i+=1}return a}function Xie(e,t){return e.map((n)=>{if(n.type!=="list_item")return t.parseChildren([n])[0];let a=[];if(n.tokens&&n.tokens.length>0)n.tokens.forEach((i)=>{if(i.type==="paragraph"||i.type==="list"||i.type==="blockquote"||i.type==="code")a.push(...t.parseChildren([i]));else if(i.type==="text"&&i.tokens){let l=t.parseChildren([i]);a.push({type:"paragraph",content:l})}else{let l=t.parseChildren([i]);if(l.length>0)a.push(...l)}});return{type:"listItem",content:a}})}function NV(e){let t=e.match(/list-style-type\s*:\s*([^;]+)/i);if(!t)return null;switch(t[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 wie,Cie=(e,t)=>{for(var n in t)wie(e,n,{get:t[n],enumerable:!0})},Eie="listItem",RV="textStyle",kV,wk,Tie=(e,t,n)=>{let{selection:a}=e;if(!a.empty)return null;let{$from:i}=a;if(!i.parent.isTextblock)return null;if(i.parentOffset!==i.parent.content.size)return null;let l=-1;for(let v=i.depth;v>0;v-=1)if(i.node(v).type.name===t){l=v;break}if(l<0)return null;let c=i.node(l),u=i.index(l);if(u+1>=c.childCount)return null;let f=c.child(u+1);if(!n.includes(f.type.name))return null;let h=e.schema.nodes[t],m=!1;if(f.forEach((v)=>{if(v.type===h&&v.childCount>1)m=!0}),!m)return null;let b=e.doc.resolve(i.after()).nodeAfter;if(!b||!n.includes(b.type.name))return null;let y=[];if(b.forEach((v)=>{y.push(v)}),y.length===0)return null;return{listItemDepth:l,nestedList:b,nestedListPos:i.after(),insertPos:i.after(l),items:y}},Rie=(e,t,n,a)=>{let i=Tie(e,n,a);if(!i)return!1;let{selection:l}=e,{nestedList:c,nestedListPos:u,insertPos:f,items:h}=i,m=e.tr;m.delete(u,u+c.nodeSize);let b=m.mapping.map(f);if(m.insert(b,ce.from(h)),m.setSelection(l.map(m.doc,m.mapping)),t)t(m);return!0},kie=(e,t,n)=>Rie(e.state,e.view.dispatch,t,n),OV=(e,t)=>St.create({name:`${e}BranchingDeleteKeymap`,priority:101,addKeyboardShortcuts(){let n=()=>kie(this.editor,e,t);return{Delete:n,"Mod-Delete":n}}}),DV,Y$="abcdefghijklmnopqrstuvwxyz",Aie="[a-zA-Z]{1,2}",PV,Tk,zie,Z$=(e,t)=>{let{$from:n}=t.selection,a=Tn(e,t.schema),i=null,l=n.depth,c=n.pos,u=null;while(l>0&&u===null)if(i=n.node(l),i.type===a)u=l;else l-=1,c-=1;if(u===null)return null;return{$pos:t.doc.resolve(c),depth:u}},Rk=(e,t)=>{let n=Z$(e,t);if(!n)return!1;let[,a]=eF(t,e,n.$pos.pos+4);return a},_V=(e,t,n)=>{let{$anchor:a}=e.selection,i=Math.max(0,a.pos-2),l=e.doc.resolve(i).node();if(!l||!n.includes(l.type.name))return!1;return!0},xk=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!es(e.state,t)&&_V(e.state,t,n)){let{$anchor:a}=e.state.selection,i=e.state.doc.resolve(a.before()-1),l=[];i.node().descendants((f,h)=>{if(f.type.name===t)l.push({node:f,pos:h})});let c=l.at(-1);if(!c)return!1;let u=e.state.doc.resolve(i.start()+c.pos+1);return e.chain().cut({from:a.start()-1,to:a.end()+1},u.end()).joinForward().run()}if(!es(e.state,t))return!1;if(!nF(e.state))return!1;return e.chain().liftListItem(t).run()},IV=(e,t)=>{let n=Rk(e,t),a=Z$(e,t);if(!a||!n)return!1;if(n>a.depth)return!0;return!1},BV=(e,t)=>{let n=Rk(e,t),a=Z$(e,t);if(!a||!n)return!1;if(n<a.depth)return!0;return!1},$k=(e,t)=>{if(!es(e.state,t))return!1;if(!tF(e.state,t))return!1;let{selection:n}=e.state,{$from:a,$to:i}=n;if(!n.empty&&a.sameParent(i))return!1;if(IV(t,e.state))return e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run();if(BV(t,e.state))return e.chain().joinForward().joinBackward().run();return e.commands.joinItemForward()},Hie=(e,t)=>{var n;let{$anchor:a}=t.selection,i=t.doc.resolve(a.pos-a.parentOffset-2);if(i.index()===i.parent.childCount-1)return!1;if(((n=i.nodeAfter)==null?void 0:n.type.name)!==e)return!1;return!0},Fie=(e,t)=>{var n;let{$anchor:a}=t.selection,i=t.doc.resolve(a.pos-2);if(i.index()===0)return!1;if(((n=i.nodeBefore)==null?void 0:n.type.name)!==e)return!1;return!0},Uie=(e,t,n)=>{if(!n)return!1;let a=Tn(e,t.schema),i=!1;return n.descendants((l)=>{if(l.type===a)i=!0}),i},kk,Sk,Vie,Lb,Yie,Qie="listItem",AV="textStyle",MV,Ak,Zie,e2,t2,lMe;var lh=N(()=>{Ye();Ye();Ye();Sa();Ye();Ye();Ye();Ye();Ye();Ye();Ye();at();Ye();Ye();Ye();wie=Object.defineProperty,kV=/^\s*([-+*])\s$/,wk=en.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:e}){return["ul",$t(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>{if(e.type!=="list"||e.ordered)return[];return{type:"bulletList",content:e.items?t.parseChildren(e.items):[]}},renderMarkdown:(e,t)=>{if(!e.content)return"";return t.renderChildren(e.content,`
390
+ `)},markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>{if(this.options.keepAttributes)return t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Eie,this.editor.getAttributes(RV)).run();return e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=ts({find:kV,type:this.type});if(this.options.keepMarks||this.options.keepAttributes)e=ts({find:kV,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(RV),editor:this.editor});return[e]}}),DV=[[1000,"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"]],PV=String.raw`\d+|[ivxlcdmIVXLCDM]+|${Aie}`;Tk=en.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",$t(this.options.HTMLAttributes,e),0]},markdownTokenName:"list_item",parseMarkdown:(e,t)=>{var n;if(e.type!=="list_item")return[];let a=(n=t.parseBlockChildren)!=null?n:t.parseChildren,i=[];if(e.tokens&&e.tokens.length>0){if(Iie(e))return{type:"listItem",content:[{type:"paragraph",content:Bie(e.text||"",t)}]};if(e.tokens.some((c)=>c.type==="paragraph"))i=a(e.tokens);else{let c=e.tokens[0];if(c&&c.type==="text"&&c.tokens&&c.tokens.length>0){if(i=[{type:"paragraph",content:t.parseInline(c.tokens)}],e.tokens.length>1){let f=e.tokens.slice(1),h=a(f);i.push(...h)}}else i=a(e.tokens)}}if(i.length===0)i=[{type:"paragraph",content:[]}];return{type:"listItem",content:i}},renderMarkdown:(e,t,n)=>mb(e,t,(a)=>{var i,l,c,u;if(a.parentType==="bulletList")return"- ";if(a.parentType==="orderedList"){let f=((l=(i=a.meta)==null?void 0:i.parentAttrs)==null?void 0:l.start)||1,h=(u=(c=a.meta)==null?void 0:c.parentAttrs)==null?void 0:u.type,m=f-1+(a.index||0);return _ie(h,m,". ")}return"- "},n),addExtensions(){return[OV(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)}}}),zie={};Cie(zie,{findListItemPos:()=>Z$,getNextListDepth:()=>Rk,handleBackspace:()=>xk,handleDelete:()=>$k,hasListBefore:()=>_V,hasListItemAfter:()=>Hie,hasListItemBefore:()=>Fie,listItemHasSubList:()=>Uie,nextListIsDeeper:()=>IV,nextListIsHigher:()=>BV});kk=St.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{if(e.state.schema.nodes[n]===void 0)return;if($k(e,n))t=!0}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{if(e.state.schema.nodes[n]===void 0)return;if($k(e,n))t=!0}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:a})=>{if(e.state.schema.nodes[n]===void 0)return;if(xk(e,n,a))t=!0}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:a})=>{if(e.state.schema.nodes[n]===void 0)return;if(xk(e,n,a))t=!0}),t}}}}),Sk=new RegExp(`^(\\s*)(${PV})([.)])\\s+(.*)$`),Vie=/^\s/,Lb={heading:/^#{1,6}(?:\s|$)/,bulletItem:/^[-+*]\s+/,codeFence:/^(?:```|~~~)/,thematicBreak:/^(?:(?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})$/};Yie=new RegExp(`^(${PV})([.)])\\s+(.+)$`);MV=/^(\d+)\.\s$/;Ak=en.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:(e)=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:null,parseHTML:(e)=>{let t=e.getAttribute("type");if(t)return t;let n=e.getAttribute("style");if(n){let i=NV(n);if(i)return i}let a=e.querySelector("li");if(a){let i=a.getAttribute("style");if(i){let l=NV(i);if(l)return l}}return null}}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){let{start:t,type:n,...a}=e,i=$t(this.options.HTMLAttributes,a);if(t!==1)i.start=t;if(n&&n!=="1")i.type=n;return["ol",i,0]},markdownTokenName:"list",parseMarkdown:(e,t)=>{if(e.type!=="list"||!e.ordered)return[];let n=e.start||1,a=e.typeMarker,i=e.items?Xie(e.items,t):[],l={};if(n!==1)l.start=n;if(a)l.type=a;if(Object.keys(l).length>0)return{type:"orderedList",attrs:l,content:i};return{type:"orderedList",content:i}},renderMarkdown:(e,t)=>{if(!e.content)return"";return t.renderChildren(e.content,`
391
+ `)},markdownTokenizer:{name:"orderedList",level:"block",start:()=>-1,tokenize:(e,t,n)=>{var a,i;let l=e.split(`
392
+ `),[c,u]=Wie(l);if(c.length===0)return;let f=zV(c,c[0].indent,n);if(f.length===0)return;let h=((a=c[0])==null?void 0:a.number)||1,m=(i=c[0])==null?void 0:i.type;return{type:"list",ordered:!0,start:h,typeMarker:m,items:f,raw:l.slice(0,u).join(`
393
+ `)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>{if(this.options.keepAttributes)return t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Qie,this.editor.getAttributes(AV)).run();return e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addProseMirrorPlugins(){return[new qe({props:{handlePaste:(e,t)=>{var n,a;let i=(n=t.clipboardData)==null?void 0:n.getData("text/html");if(i==null?void 0:i.trim())return!1;let l=(a=t.clipboardData)==null?void 0:a.getData("text/plain");if(!l)return!1;let c=Jie(l);if(!c)return!1;try{let u=e.state.schema.nodeFromJSON(c),f=e.state.tr.replaceSelectionWith(u);return e.dispatch(f),!0}catch{return!1}}}})]},addInputRules(){let e=(n,a)=>(!a.attrs.type||a.attrs.type==="1")&&a.childCount+a.attrs.start===+n[1],t=ts({find:MV,type:this.type,getAttributes:(n)=>({start:+n[1]}),joinPredicate:e});if(this.options.keepMarks||this.options.keepAttributes)t=ts({find:MV,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:(n)=>({start:+n[1],...this.editor.getAttributes(AV)}),joinPredicate:e,editor:this.editor});return[t]}}),Zie=/^\s*(\[([( |x])?\])\s$/,e2=en.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:(e)=>{let t=e.getAttribute("data-checked");return t===""||t==="true"},renderHTML:(e)=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return["li",$t(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0)n.push(t.createNode("paragraph",{},t.parseInline(e.tokens)));else if(e.text)n.push(t.createNode("paragraph",{},[t.createNode("text",{text:e.text})]));else n.push(t.createNode("paragraph",{},[]));if(e.nestedTokens&&e.nestedTokens.length>0){let a=t.parseChildren(e.nestedTokens);n.push(...a)}return t.createNode("taskItem",{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>{var n;let i=`- [${((n=e.attrs)==null?void 0:n.checked)?"x":" "}] `;return mb(e,t,i)},addExtensions(){if(!this.options.nested)return[];return[OV(this.name,[this.options.taskListTypeName])]},addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};if(!this.options.nested)return e;return{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:a})=>{let i=document.createElement("li"),l=document.createElement("label"),c=document.createElement("span"),u=document.createElement("input"),f=document.createElement("div"),h=(b)=>{var y,v;u.ariaLabel=((v=(y=this.options.a11y)==null?void 0:y.checkboxLabel)==null?void 0:v.call(y,b,u.checked))||`Task item checkbox for ${b.textContent||"empty task item"}`};h(e),l.contentEditable="false",u.type="checkbox",u.addEventListener("mousedown",(b)=>b.preventDefault()),u.addEventListener("change",(b)=>{if(!a.isEditable&&!this.options.onReadOnlyChecked){u.checked=!u.checked;return}let{checked:y}=b.target;if(a.isEditable&&typeof n==="function")a.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:v})=>{let S=n();if(typeof S!=="number")return!1;let C=v.doc.nodeAt(S);return v.setNodeMarkup(S,void 0,{...C==null?void 0:C.attrs,checked:y}),!0}).run();if(!a.isEditable&&this.options.onReadOnlyChecked){if(!this.options.onReadOnlyChecked(e,y))u.checked=!u.checked}}),Object.entries(this.options.HTMLAttributes).forEach(([b,y])=>{i.setAttribute(b,y)}),i.dataset.checked=e.attrs.checked,u.checked=e.attrs.checked,l.append(u,c),i.append(l,f),Object.entries(t).forEach(([b,y])=>{i.setAttribute(b,y)});let m=new Set(Object.keys(t));return{dom:i,contentDOM:f,update:(b)=>{if(b.type!==this.type)return!1;i.dataset.checked=b.attrs.checked,u.checked=b.attrs.checked,h(b);let y=a.extensionManager.attributes,v=th(b,y),S=new Set(Object.keys(v)),C=this.options.HTMLAttributes;return m.forEach((E)=>{if(!S.has(E))if(E in C)i.setAttribute(E,C[E]);else i.removeAttribute(E)}),Object.entries(v).forEach(([E,R])=>{if(R===null||R===void 0)if(E in C)i.setAttribute(E,C[E]);else i.removeAttribute(E);else i.setAttribute(E,R)}),m=S,!0}}}},addInputRules(){return[ts({find:Zie,type:this.type,getAttributes:(e)=>({checked:e[e.length-1]==="x"})})]}}),t2=en.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:e}){return["ul",$t(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode("taskList",{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>{if(!e.content)return"";return t.renderChildren(e.content,`
394
+ `)},markdownTokenizer:{name:"taskList",level:"block",start(e){var t;let n=(t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:t.index;return n!==void 0?n:-1},tokenize(e,t,n){let a=(l)=>{let c=B1(l,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:(u)=>({indentLevel:u[1].length,mainContent:u[4],checked:u[3].toLowerCase()==="x"}),createToken:(u,f)=>({type:"taskItem",raw:"",mainContent:u.mainContent,indentLevel:u.indentLevel,checked:u.checked,text:u.mainContent,tokens:n.inlineTokens(u.mainContent),nestedTokens:f}),customNestedParser:a},n);if(c){let u={type:"taskList",raw:c.raw,items:c.items},f=l.slice(c.raw.length);if(f.trim())return[u,...n.blockTokens(f)];return[u]}return n.blockTokens(l)},i=B1(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:(l)=>({indentLevel:l[1].length,mainContent:l[4],checked:l[3].toLowerCase()==="x"}),createToken:(l,c)=>({type:"taskItem",raw:"",mainContent:l.mainContent,indentLevel:l.indentLevel,checked:l.checked,text:l.mainContent,tokens:n.inlineTokens(l.mainContent),nestedTokens:c}),customNestedParser:a},n);if(!i)return;return{type:"taskList",raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),lMe=St.create({name:"listKit",addExtensions(){let e=[];if(this.options.bulletList!==!1)e.push(wk.configure(this.options.bulletList));if(this.options.listItem!==!1)e.push(Tk.configure(this.options.listItem));if(this.options.listKeymap!==!1)e.push(kk.configure(this.options.listKeymap));if(this.options.orderedList!==!1)e.push(Ak.configure(this.options.orderedList));if(this.options.taskItem!==!1)e.push(e2.configure(this.options.taskItem));if(this.options.taskList!==!1)e.push(t2.configure(this.options.taskList));return e}})});var n2="&nbsp;",Mk=" ",HV;var FV=N(()=>{Ye();HV=en.create({name:"paragraph",priority:1000,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",$t(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];if(n.length===1&&n[0].type==="image")return t.parseChildren([n[0]]);let a=t.parseInline(n);if(n.length===1&&n[0].type==="text"&&(n[0].raw===n2||n[0].text===n2||n[0].raw===Mk||n[0].text===Mk)&&a.length===1&&a[0].type==="text"&&(a[0].text===n2||a[0].text===Mk))return t.createNode("paragraph",void 0,[]);return t.createNode("paragraph",void 0,a)},renderMarkdown:(e,t,n)=>{var a,i;if(!e)return"";let l=Array.isArray(e.content)?e.content:[];if(l.length===0){let c=Array.isArray((a=n==null?void 0:n.previousNode)==null?void 0:a.content)?n.previousNode.content:[];return((i=n==null?void 0:n.previousNode)==null?void 0:i.type)==="paragraph"&&c.length===0?n2:""}return t.renderChildren(l)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}})});var ese,tse,UV;var VV=N(()=>{Ye();ese=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,tse=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,UV=Qr.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:(e)=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",$t(this.options.HTMLAttributes,e),0]},markdownTokenName:"del",parseMarkdown:(e,t)=>t.applyMark("strike",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[bo({find:ese,type:this.type})]},addPasteRules(){return[Pr({find:tse,type:this.type})]}})});var jV;var KV=N(()=>{Ye();jV=en.create({name:"text",group:"inline",parseMarkdown:(e)=>({type:"text",text:e.text||""}),renderMarkdown:(e)=>e.text||""})});var qV;var GV=N(()=>{Ye();qV=Qr.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:(e)=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",$t(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||"underline",t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`++${t.renderChildren(e)}++`},markdownTokenizer:{name:"underline",level:"inline",start(e){return e.indexOf("++")},tokenize(e,t,n){let i=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!i)return;let l=i[2].trim();return{type:"underline",raw:i[0],text:l,tokens:n.inlineTokens(l)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}})});function WV(e={}){return new qe({view(t){return new YV(t,e)}})}class YV{constructor(e,t){var n;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.lastDragEvent=null,this.width=(n=t.width)!==null&&n!==void 0?n:1,this.color=t.color===!1?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map((a)=>{let i=(l)=>{this[a](l)};return e.dom.addEventListener(a,i),{name:a,handler:i}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){if(this.cursorPos!=null&&t.doc!=e.state.doc)if(this.lastDragEvent){let n=this.computeTarget(this.lastDragEvent);if(n==this.cursorPos)this.updateOverlay();else this.setCursor(n)}else this.updateOverlay()}setCursor(e){if(e==this.cursorPos)return;if(this.cursorPos=e,e==null)this.element.parentNode.removeChild(this.element),this.element=null;else this.updateOverlay()}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,n,a=this.editorView.dom,i=a.getBoundingClientRect(),l=i.width/a.offsetWidth,c=i.height/a.offsetHeight;if(t){let{nodeBefore:m,nodeAfter:b}=e;if(m||b){let y=this.editorView.nodeDOM(this.cursorPos-(m?m.nodeSize:0));if(y){let v=y.getBoundingClientRect(),S=m?v.bottom:v.top;if(m&&b)S=(S+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2;let C=this.width/2*c;n={left:v.left,right:v.right,top:S-C,bottom:S+C}}}}if(!n){let m=this.editorView.coordsAtPos(this.cursorPos),b=this.width/2*l;n={left:m.left-b,right:m.left+b,top:m.top,bottom:m.bottom}}let u=this.editorView.dom.offsetParent;if(!this.element){if(this.element=u.appendChild(document.createElement("div")),this.class)this.element.className=this.class;if(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",t),this.element.classList.toggle("prosemirror-dropcursor-inline",!t);let f,h;if(!u||u==document.body&&getComputedStyle(u).position=="static")f=-pageXOffset,h=-pageYOffset;else{let m=u.getBoundingClientRect(),b=m.width/u.offsetWidth,y=m.height/u.offsetHeight;f=m.left-u.scrollLeft*b,h=m.top-u.scrollTop*y}this.element.style.left=(n.left-f)/l+"px",this.element.style.top=(n.top-h)/c+"px",this.element.style.width=(n.right-n.left)/l+"px",this.element.style.height=(n.bottom-n.top)/c+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}computeTarget(e){let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),a=n&&n.type.spec.disableDropCursor,i=typeof a=="function"?a(this.editorView,t,e):a;if(!t||i)return null;let l=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let c=s1(this.editorView.state.doc,l,this.editorView.dragging.slice);if(c!=null)l=c}return l}dragover(e){if(!this.editorView.editable)return;this.lastDragEvent=e;let t=this.computeTarget(e);if(t!=null)this.setCursor(t),this.scheduleRemoval(5000)}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){if(!this.editorView.dom.contains(e.relatedTarget))this.setCursor(null)}}var JV=N(()=>{Xs();Ac()});var XV=N(()=>{JV()});class Nk{constructor(e){this.pos=e}map(e){return new Nk(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return kn.valid(t)?new kn(t):Ue.near(t)}}function QV(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function nse(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),a=e.node(t);if(n==0){if(a.type.spec.isolating)return!0;continue}for(let i=a.child(n-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||QV(i.type))return!0;if(i.inlineContent)return!1}}return!0}function rse(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),a=e.node(t);if(n==a.childCount){if(a.type.spec.isolating)return!0;continue}for(let i=a.child(n);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||QV(i.type))return!0;if(i.inlineContent)return!1}}return!0}function ZV(){return new qe({props:{decorations:sse,createSelectionBetween(e,t,n){return t.pos==n.pos&&kn.valid(n)?new kn(n):null},handleClick:ase,handleKeyDown:ose,handleDOMEvents:{beforeinput:ise}}})}function r2(e,t){let n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(a,i,l){let c=a.selection,u=t>0?c.$to:c.$from,f=c.empty;if(c instanceof Me){if(!l.endOfTextblock(n)||u.depth==0)return!1;f=!1,u=a.doc.resolve(t>0?u.after():u.before())}let h=kn.findGapCursorFrom(u,t,f);if(!h)return!1;if(i)i(a.tr.setSelection(new kn(h)));return!0}}function ase(e,t,n){if(!e||!e.editable)return!1;let a=e.state.doc.resolve(t);if(!kn.valid(a))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});if(i&&i.inside>-1&&Pe.isSelectable(e.state.doc.nodeAt(i.inside)))return!1;return e.dispatch(e.state.tr.setSelection(new kn(a))),!0}function ise(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof kn))return!1;let{$from:n}=e.state.selection,a=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!a)return!1;let i=ce.empty;for(let c=a.length-1;c>=0;c--)i=ce.from(a[c].createAndFill(null,i));let l=e.state.tr.replace(n.pos,n.pos,new Se(i,0,0));return l.setSelection(Me.near(l.doc.resolve(n.pos+1))),e.dispatch(l),!1}function sse(e){if(!(e.selection instanceof kn))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",Lt.create(e.doc,[Jn.widget(e.selection.head,t,{key:"gapcursor"})])}var kn,ose;var ej=N(()=>{$1();Xs();Ys();f4();kn=class kn extends Ue{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return kn.valid(n)?new kn(n):Ue.near(n)}content(){return Se.empty}eq(e){return e instanceof kn&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if(typeof t.pos!="number")throw RangeError("Invalid input for GapCursor.fromJSON");return new kn(e.resolve(t.pos))}getBookmark(){return new Nk(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!nse(e)||!rse(e))return!1;let n=t.type.spec.allowGapCursor;if(n!=null)return n;let a=t.contentMatchAt(e.index()).defaultType;return a&&a.isTextblock}static findGapCursorFrom(e,t,n=!1){e:for(;;){if(!n&&kn.valid(e))return e;let a=e.pos,i=null;for(let l=e.depth;;l--){let c=e.node(l);if(t>0?e.indexAfter(l)<c.childCount:e.index(l)>0){i=c.child(t>0?e.indexAfter(l):e.index(l)-1);break}else if(l==0)return null;a+=t;let u=e.doc.resolve(a);if(kn.valid(u))return u}for(;;){let l=t>0?i.firstChild:i.lastChild;if(!l){if(i.isAtom&&!i.isText&&!Pe.isSelectable(i)){e=e.doc.resolve(a+i.nodeSize*t),n=!1;continue e}break}i=l,a+=t;let c=e.doc.resolve(a);if(kn.valid(c))return c}return null}}};kn.prototype.visible=!1;kn.findFrom=kn.findGapCursorFrom;Ue.jsonID("gapcursor",kn);ose=ub({ArrowLeft:r2("horiz",-1),ArrowRight:r2("horiz",1),ArrowUp:r2("vert",-1),ArrowDown:r2("vert",1)})});var tj=N(()=>{ej()});var o2=200,Sr=function(){},nj,lse,Ok;var rj=N(()=>{Sr.prototype.append=function(t){if(!t.length)return this;return t=Sr.from(t),!this.length&&t||t.length<o2&&this.leafAppend(t)||this.length<o2&&t.leafPrepend(this)||this.appendInner(t)};Sr.prototype.prepend=function(t){if(!t.length)return this;return Sr.from(t).append(this)};Sr.prototype.appendInner=function(t){return new lse(this,t)};Sr.prototype.slice=function(t,n){if(t===void 0)t=0;if(n===void 0)n=this.length;if(t>=n)return Sr.empty;return this.sliceInner(Math.max(0,t),Math.min(this.length,n))};Sr.prototype.get=function(t){if(t<0||t>=this.length)return;return this.getInner(t)};Sr.prototype.forEach=function(t,n,a){if(n===void 0)n=0;if(a===void 0)a=this.length;if(n<=a)this.forEachInner(t,n,a,0);else this.forEachInvertedInner(t,n,a,0)};Sr.prototype.map=function(t,n,a){if(n===void 0)n=0;if(a===void 0)a=this.length;var i=[];return this.forEach(function(l,c){return i.push(t(l,c))},n,a),i};Sr.from=function(t){if(t instanceof Sr)return t;return t&&t.length?new nj(t):Sr.empty};nj=function(e){function t(a){e.call(this),this.values=a}if(e)t.__proto__=e;t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(i,l){if(i==0&&l==this.length)return this;return new t(this.values.slice(i,l))},t.prototype.getInner=function(i){return this.values[i]},t.prototype.forEachInner=function(i,l,c,u){for(var f=l;f<c;f++)if(i(this.values[f],u+f)===!1)return!1},t.prototype.forEachInvertedInner=function(i,l,c,u){for(var f=l-1;f>=c;f--)if(i(this.values[f],u+f)===!1)return!1},t.prototype.leafAppend=function(i){if(this.length+i.length<=o2)return new t(this.values.concat(i.flatten()))},t.prototype.leafPrepend=function(i){if(this.length+i.length<=o2)return new t(i.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(Sr);Sr.empty=new nj([]);lse=function(e){function t(n,a){e.call(this),this.left=n,this.right=a,this.length=n.length+a.length,this.depth=Math.max(n.depth,a.depth)+1}if(e)t.__proto__=e;return t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(a){return a<this.left.length?this.left.get(a):this.right.get(a-this.left.length)},t.prototype.forEachInner=function(a,i,l,c){var u=this.left.length;if(i<u&&this.left.forEachInner(a,i,Math.min(l,u),c)===!1)return!1;if(l>u&&this.right.forEachInner(a,Math.max(i-u,0),Math.min(this.length,l)-u,c+u)===!1)return!1},t.prototype.forEachInvertedInner=function(a,i,l,c){var u=this.left.length;if(i>u&&this.right.forEachInvertedInner(a,i-u,Math.max(l,u)-u,c+u)===!1)return!1;if(l<u&&this.left.forEachInvertedInner(a,Math.min(i,u),l,c)===!1)return!1},t.prototype.sliceInner=function(a,i){if(a==0&&i==this.length)return this;var l=this.left.length;if(i<=l)return this.left.slice(a,i);if(a>=l)return this.right.slice(a-l,i-l);return this.left.slice(a,l).append(this.right.slice(0,i-l))},t.prototype.leafAppend=function(a){var i=this.right.leafAppend(a);if(i)return new t(this.left,i)},t.prototype.leafPrepend=function(a){var i=this.left.leafPrepend(a);if(i)return new t(i,this.right)},t.prototype.appendInner=function(a){if(this.left.depth>=Math.max(this.right.depth,a.depth)+1)return new t(this.left,new t(this.right,a));return new t(this,a)},t}(Sr),Ok=Sr});class ci{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(this.eventCount==0)return null;let n=this.items.length;for(;;n--)if(this.items.get(n-1).selection){--n;break}let a,i;if(t)a=this.remapping(n,this.items.length),i=a.maps.length;let l=e.tr,c,u,f=[],h=[];return this.items.forEach((m,b)=>{if(!m.step){if(!a)a=this.remapping(n,b+1),i=a.maps.length;i--,h.push(m);return}if(a){h.push(new ss(m.map));let y=m.step.map(a.slice(i)),v;if(y&&l.maybeStep(y).doc)v=l.mapping.maps[l.mapping.maps.length-1],f.push(new ss(v,void 0,void 0,f.length+h.length));if(i--,v)a.appendMap(v,i)}else l.maybeStep(m.step);if(m.selection)return c=a?m.selection.map(a.slice(i)):m.selection,u=new ci(this.items.slice(0,n).append(h.reverse().concat(f)),this.eventCount-1),!1},this.items.length,0),{remaining:u,transform:l,selection:c}}addTransform(e,t,n,a){let i=[],l=this.eventCount,c=this.items,u=!a&&c.length?c.get(c.length-1):null;for(let h=0;h<e.steps.length;h++){let m=e.steps[h].invert(e.docs[h]),b=new ss(e.mapping.maps[h],m,t),y;if(y=u&&u.merge(b))if(b=y,h)i.pop();else c=c.slice(0,c.length-1);if(i.push(b),t)l++,t=void 0;if(!a)u=b}let f=l-n.depth;if(f>dse)c=use(c,f),l-=f;return new ci(c.append(i),l)}remapping(e,t){let n=new Fp;return this.items.forEach((a,i)=>{let l=a.mirrorOffset!=null&&i-a.mirrorOffset>=e?n.maps.length-a.mirrorOffset:void 0;n.appendMap(a.map,l)},e,t),n}addMaps(e){if(this.eventCount==0)return this;return new ci(this.items.append(e.map((t)=>new ss(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],a=Math.max(0,this.items.length-t),i=e.mapping,l=e.steps.length,c=this.eventCount;this.items.forEach((b)=>{if(b.selection)c--},a);let u=t;this.items.forEach((b)=>{let y=i.getMirror(--u);if(y==null)return;l=Math.min(l,y);let v=i.maps[y];if(b.step){let S=e.steps[y].invert(e.docs[y]),C=b.selection&&b.selection.map(i.slice(u+1,y));if(C)c++;n.push(new ss(v,S,C))}else n.push(new ss(v))},a);let f=[];for(let b=t;b<l;b++)f.push(new ss(i.maps[b]));let h=this.items.slice(0,a).append(f).append(n),m=new ci(h,c);if(m.emptyItemCount()>cse)m=m.compress(this.items.length-n.length);return m}emptyItemCount(){let e=0;return this.items.forEach((t)=>{if(!t.step)e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,a=[],i=0;return this.items.forEach((l,c)=>{if(c>=e){if(a.push(l),l.selection)i++}else if(l.step){let u=l.step.map(t.slice(n)),f=u&&u.getMap();if(n--,f)t.appendMap(f,n);if(u){let h=l.selection&&l.selection.map(t.slice(n));if(h)i++;let m=new ss(f.invert(),u,h),b,y=a.length-1;if(b=a.length&&a[y].merge(m))a[y]=b;else a.push(m)}}else if(l.map)n--},this.items.length,0),new ci(Ok.from(a.reverse()),i)}}function use(e,t){let n;return e.forEach((a,i)=>{if(a.selection&&t--==0)return n=i,!1}),e.slice(n)}class ss{constructor(e,t,n,a){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=a}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new ss(t.getMap().invert(),t,this.selection)}}}class ml{constructor(e,t,n,a,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=a,this.prevComposition=i}}function fse(e,t,n,a){let i=n.getMeta(zd),l;if(i)return i.historyState;if(n.getMeta(mse))e=new ml(e.done,e.undone,null,0,-1);let c=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;else if(c&&c.getMeta(zd))if(c.getMeta(zd).redo)return new ml(e.done.addTransform(n,void 0,a,a2(t)),e.undone,oj(n.mapping.maps),e.prevTime,e.prevComposition);else return new ml(e.done,e.undone.addTransform(n,void 0,a,a2(t)),null,e.prevTime,e.prevComposition);else if(n.getMeta("addToHistory")!==!1&&!(c&&c.getMeta("addToHistory")===!1)){let u=n.getMeta("composition"),f=e.prevTime==0||!c&&e.prevComposition!=u&&(e.prevTime<(n.time||0)-a.newGroupDelay||!pse(n,e.prevRanges)),h=c?Dk(e.prevRanges,n.mapping):oj(n.mapping.maps);return new ml(e.done.addTransform(n,f?t.selection.getBookmark():void 0,a,a2(t)),ci.empty,h,n.time,u==null?e.prevComposition:u)}else if(l=n.getMeta("rebased"))return new ml(e.done.rebased(n,l),e.undone.rebased(n,l),Dk(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);else return new ml(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),Dk(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function pse(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((a,i)=>{for(let l=0;l<t.length;l+=2)if(a<=t[l+1]&&i>=t[l])n=!0}),n}function oj(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((a,i,l,c)=>t.push(l,c));return t}function Dk(e,t){if(!e)return null;let n=[];for(let a=0;a<e.length;a+=2){let i=t.map(e[a],1),l=t.map(e[a+1],-1);if(i<=l)n.push(i,l)}return n}function hse(e,t,n){let a=a2(t),i=zd.get(t).spec.config,l=(n?e.undone:e.done).popEvent(t,a);if(!l)return null;let c=l.selection.resolve(l.transform.doc),u=(n?e.done:e.undone).addTransform(l.transform,t.selection.getBookmark(),i,a),f=new ml(n?u:l.remaining,n?l.remaining:u,null,0,-1);return l.transform.setSelection(c).setMeta(zd,{redo:n,historyState:f})}function a2(e){let t=e.plugins;if(aj!=t){Pk=!1,aj=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){Pk=!0;break}}return Pk}function ij(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new qe({key:zd,state:{init(){return new ml(ci.empty,ci.empty,null,0,-1)},apply(t,n,a){return fse(n,a,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(t,n){let a=n.inputType,i=a=="historyUndo"?Lk:a=="historyRedo"?_k:null;if(!i||!t.editable)return!1;return n.preventDefault(),i(t.state,t.dispatch)}}}})}function i2(e,t){return(n,a)=>{let i=zd.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(a){let l=hse(i,n,e);if(l)a(t?l.scrollIntoView():l)}return!0}}var cse=500,dse=20,Pk=!1,aj=null,zd,mse,Lk,_k,PMe,LMe;var sj=N(()=>{rj();Ac();Xs();ci.empty=new ci(Ok.empty,0);zd=new Qe("history"),mse=new Qe("closeHistory");Lk=i2(!1,!0),_k=i2(!0,!0),PMe=i2(!1,!1),LMe=i2(!0,!1)});var lj=N(()=>{sj()});function hj(e){let{editor:t,placeholder:n,dataAttribute:a,pos:i,node:l,isEmptyDoc:c,hasAnchor:u,classes:{emptyNode:f,emptyEditor:h}}=e,m=[f];if(c)m.push(h);return Jn.node(i,i+l.nodeSize,{class:m.join(" "),[a]:typeof n==="function"?n({editor:t,node:l,pos:i,hasAnchor:u}):n})}function mj(e,t){return typeof e==="function"?e(t):e}function gj({editor:e,options:t,dataAttribute:n,doc:a,selection:i,from:l,to:c}){let{anchor:u}=i,f=[],h=e.isEmpty;return a.nodesBetween(l,c,(m,b)=>{let y=u>=b&&u<=b+m.nodeSize,v=!m.isLeaf&&nh(m);if(!m.type.isTextblock)return t.includeChildren;if((y||!t.showOnlyCurrent)&&v)f.push(hj({editor:e,isEmptyDoc:h,dataAttribute:n,hasAnchor:y,placeholder:t.placeholder,classes:{emptyEditor:t.emptyEditorClass,emptyNode:mj(t.emptyNodeClass,{editor:e,node:m,pos:b,hasAnchor:y})},node:m,pos:b}));return t.includeChildren}),f}function bj({editor:e,options:t,dataAttribute:n,doc:a,selection:i}){if(!(e.isEditable||!t.showOnlyWhenEditable))return null;let{anchor:c}=i,u=[],f=e.isEmpty;if(t.showOnlyCurrent&&!t.includeChildren){let m=a.resolve(c),b=m.depth>0?m.node(1):m.nodeAfter,y=m.depth>0?m.before(1):c;if(b&&b.type.isTextblock&&nh(b)){let v=c>=y&&c<=y+b.nodeSize;u.push(hj({editor:e,isEmptyDoc:f,dataAttribute:n,hasAnchor:v,placeholder:t.placeholder,classes:{emptyEditor:t.emptyEditorClass,emptyNode:mj(t.emptyNodeClass,{editor:e,node:b,pos:y,hasAnchor:v})},node:b,pos:y}))}}else u.push(...gj({editor:e,options:t,dataAttribute:n,doc:a,selection:i,from:0,to:a.content.size}));return Lt.create(a,u)}function _b(e,t){var n;let a=e.resolve(t);if(a.depth===0){let c=(n=a.nodeAfter)!=null?n:a.nodeBefore;if(!c)return{from:t,to:t};let u=a.nodeAfter?t:t-c.nodeSize;return{from:u,to:u+c.nodeSize}}let i=a.before(1),l=a.node(1);return{from:i,to:i+l.nodeSize}}function Ib(e,t){return{from:Math.max(0,t.from-1),to:Math.min(e.content.size,t.to-1)}}function gse(e,t,n){let a=[];return e.forEach((i,l)=>{let c=l,u=c+i.nodeSize,f=c+1,h=u+1;if(f<n&&h>t)a.push({from:c,to:u})}),a}function bse(e){if(e.length===0)return[];let t=[...e].sort((a,i)=>a.from-i.from),n=[{...t[0]}];for(let a=1;a<t.length;a+=1){let i=n[n.length-1],l=t[a];if(l.from<=i.to)i.to=Math.max(i.to,l.to);else n.push({...l})}return n}function yse(e,t){let n=gse(e,t.from,t.to);if(n.push(Ib(e,_b(e,t.from))),t.to>t.from)n.push(Ib(e,_b(e,Math.min(t.to,e.content.size+1)-1)));else if(t.from<e.content.size+1)n.push(Ib(e,_b(e,Math.min(t.from+1,e.content.size))));return n}function vse(e,t,n){let a=[];if(e.docChanged){let i=hb(e);for(let l of i)a.push(...yse(n.doc,l.newRange))}if(e.selectionSet)a.push(Ib(n.doc,_b(n.doc,e.mapping.map(t.selection.anchor)))),a.push(Ib(n.doc,_b(n.doc,n.selection.anchor)));return bse(a)}function xse(e,t,n){let a=Math.max(0,Math.min(e,n.content.size)),i=Math.max(a,Math.min(t,n.content.size));return{from:a,to:i}}function $se({decorations:e,ranges:t,editor:n,options:a,dataAttribute:i,doc:l,selection:c}){let u=e;for(let f of t){let{from:h,to:m}=xse(f.from,f.to,l),b=u.find(h,m).filter((v)=>v.from>=h&&v.to<=m);if(b.length)u=u.remove(b);let y=gj({editor:n,options:a,dataAttribute:i,doc:l,selection:c,from:h,to:m});if(y.length)u=u.add(l,y)}return u}function Sse({editor:e,options:t,dataAttribute:n}){return{init(a,i){let l=bj({editor:e,options:t,dataAttribute:n,doc:i.doc,selection:i.selection});return l!=null?l:Lt.empty},apply(a,i,l,c){if(!a.docChanged&&!a.selectionSet)return i;let u=i.map(a.mapping,a.doc),f=vse(a,l,c);return $se({decorations:u,ranges:f,editor:e,options:t,dataAttribute:n,doc:c.doc,selection:c.selection})}}}function wse(e){return e.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}function Cse({editor:e,options:t}){let n=t.dataAttribute?`data-${wse(t.dataAttribute)}`:`data-${pj}`,a=t.showOnlyCurrent&&!t.includeChildren;return new qe({key:cj,...a?{}:{state:Sse({editor:e,options:t,dataAttribute:n})},props:{decorations:a?({doc:i,selection:l})=>bj({editor:e,options:t,dataAttribute:n,doc:i,selection:l}):(i)=>{var l;if(t.showOnlyWhenEditable&&!e.isEditable)return Lt.empty;return(l=cj.getState(i))!=null?l:Lt.empty}}})}function Ik(e,t){return!e.selection.empty&&!_1(e.selection)&&t.isEditable}function Ese(e,t){return Ik(e,t)&&!t.isFocused&&!t.view.dragging}function Tse(){var e;(e=window.getSelection())==null||e.removeAllRanges()}function Rse(e){e.focus()}function uj({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||(t==null?void 0:t.type)===e}var FMe,dj,GMe,fj,pj="placeholder",cj,Bk,lNe,kse="skipTrailingNode",yj,vj;var s2=N(()=>{Ye();at();Ye();XV();Ye();at();Hc();Ye();tj();at();Ye();at();Hc();Ye();Hc();Hc();Ye();Hc();Ye();at();Hc();Ye();at();Ye();lj();FMe=St.create({name:"characterCount",addOptions(){return{limit:null,autoTrim:!0,mode:"textSize",textCounter:(e)=>e.length,wordCounter:(e)=>e.split(" ").filter((t)=>t!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=(e)=>{let t=(e==null?void 0:e.node)||this.editor.state.doc;if(((e==null?void 0:e.mode)||this.options.mode)==="textSize"){let a=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(a)}return t.nodeSize},this.storage.words=(e)=>{let t=(e==null?void 0:e.node)||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new qe({key:new Qe("characterCount"),appendTransaction:(t,n,a)=>{if(e)return;let i=this.options.limit,l=this.options.autoTrim;if(i===null||i===void 0||i===0||l===!1){e=!0;return}let c=this.storage.characters({node:a.doc});if(c>i){let u=c-i,f=0,h=u;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);let m=a.tr.deleteRange(0,h);return e=!0,m}e=!0},filterTransaction:(t,n)=>{let a=this.options.limit;if(!t.docChanged||a===0||a===null||a===void 0)return!0;let i=this.storage.characters({node:n.doc}),l=this.storage.characters({node:t.doc});if(l<=a)return!0;if(i>a&&l>a&&l<=i)return!0;if(i>a&&l>a&&l>i)return!1;if(!t.getMeta("paste"))return!1;let u=t.selection.$head.pos,f=l-a,h=u-f,m=u;if(t.deleteRange(h,m),this.storage.characters({node:t.doc})>a)return!1;return!0}})]}}),dj=St.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[WV(this.options)]}}),GMe=St.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new qe({key:new Qe("focus"),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:a}=this.editor,{anchor:i}=t,l=[];if(!n||!a)return Lt.create(e,[]);let c=0;if(this.options.mode==="deepest")e.descendants((f,h)=>{if(f.isText)return;if(!(i>=h&&i<=h+f.nodeSize-1))return!1;c+=1});let u=0;return e.descendants((f,h)=>{if(f.isText)return!1;if(!(i>=h&&i<=h+f.nodeSize-1))return!1;if(u+=1,this.options.mode==="deepest"&&c-u>0||this.options.mode==="shallowest"&&u>1)return this.options.mode==="deepest";l.push(Jn.node(h,h+f.nodeSize,{class:this.options.className}))}),Lt.create(e,l)}}})]}}),fj=St.create({name:"gapCursor",addProseMirrorPlugins(){return[ZV()]},extendNodeSchema(e){var t;let n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=Bt(He(e,"allowGapCursor",n)))!=null?t:null}}}),cj=new Qe("tiptap__placeholder");Bk=St.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:pj,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[Cse({editor:this.editor,options:this.options})]}});lNe=St.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new qe({key:new Qe("selection"),props:{decorations(n){if(!Ese(n,e))return null;return Lt.create(n.doc,[Jn.inline(n.selection.from,n.selection.to,{class:t.className})])},handleDOMEvents:{blur(n){if(!Ik(n.state,e))return!1;return Tse(),!1},focus(n){if(!Ik(n.state,e))return!1;return requestAnimationFrame(()=>{if(!e.isDestroyed&&n.hasFocus())Rse(n)}),!1}}}})]}});yj=St.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var e;let t=new Qe(this.name),n=this.options.node||((e=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:e.name)||"paragraph",a=Object.entries(this.editor.schema.nodes).map(([,i])=>i).filter((i)=>(this.options.notAfter||[]).concat(n).includes(i.name));return[new qe({key:t,appendTransaction:(i,l,c)=>{let{doc:u,tr:f,schema:h}=c,m=t.getState(c),b=u.content.size,y=h.nodes[n];if(i.some((v)=>v.getMeta(kse)))return;if(!m)return;return f.insert(b,y.create())},state:{init:(i,l)=>{let c=l.tr.doc.lastChild;return!uj({node:c,types:a})},apply:(i,l)=>{if(!i.docChanged)return l;if(i.getMeta("__uniqueIDTransaction"))return l;let c=i.doc.lastChild;return!uj({node:c,types:a})}}})]}}),vj=St.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>Lk(e,t),redo:()=>({state:e,dispatch:t})=>_k(e,t)}},addProseMirrorPlugins(){return[ij(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()}}})});var Ase,l2;var zk=N(()=>{Ye();KU();GU();YU();XU();ZU();tV();rV();aV();sV();TV();lh();FV();VV();KV();GV();s2();Ase=St.create({name:"starterKit",addExtensions(){var e,t,n,a;let i=[];if(this.options.bold!==!1)i.push(qU.configure(this.options.bold));if(this.options.blockquote!==!1)i.push(jU.configure(this.options.blockquote));if(this.options.bulletList!==!1)i.push(wk.configure(this.options.bulletList));if(this.options.code!==!1)i.push(WU.configure(this.options.code));if(this.options.codeBlock!==!1)i.push(JU.configure(this.options.codeBlock));if(this.options.document!==!1)i.push(QU.configure(this.options.document));if(this.options.dropcursor!==!1)i.push(dj.configure(this.options.dropcursor));if(this.options.gapcursor!==!1)i.push(fj.configure(this.options.gapcursor));if(this.options.hardBreak!==!1)i.push(eV.configure(this.options.hardBreak));if(this.options.heading!==!1)i.push(nV.configure(this.options.heading));if(this.options.undoRedo!==!1)i.push(vj.configure(this.options.undoRedo));if(this.options.horizontalRule!==!1)i.push(oV.configure(this.options.horizontalRule));if(this.options.italic!==!1)i.push(iV.configure(this.options.italic));if(this.options.listItem!==!1)i.push(Tk.configure(this.options.listItem));if(this.options.listKeymap!==!1)i.push(kk.configure((e=this.options)==null?void 0:e.listKeymap));if(this.options.link!==!1)i.push(EV.configure((t=this.options)==null?void 0:t.link));if(this.options.orderedList!==!1)i.push(Ak.configure(this.options.orderedList));if(this.options.paragraph!==!1)i.push(HV.configure(this.options.paragraph));if(this.options.strike!==!1)i.push(UV.configure(this.options.strike));if(this.options.text!==!1)i.push(jV.configure(this.options.text));if(this.options.underline!==!1)i.push(qV.configure((n=this.options)==null?void 0:n.underline));if(this.options.trailingNode!==!1)i.push(yj.configure((a=this.options)==null?void 0:a.trailingNode));return i}}),l2=Ase});var xj;var $j=N(()=>{s2();s2();xj=Bk});var Mse,Nse,Ose,c2;var Hk=N(()=>{Ye();Mse=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,Nse=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,Ose=Qr.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){if(!this.options.multicolor)return{};return{color:{default:null,parseHTML:(e)=>e.getAttribute("data-color")||iF(e,"background-color")||e.style.backgroundColor,renderHTML:(e)=>{if(!e.color)return{};return{"data-color":e.color,style:`background-color: ${e.color}; color: inherit`}}}}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:e}){return["mark",$t(this.options.HTMLAttributes,e),0]},renderMarkdown:(e,t)=>`==${t.renderChildren(e)}==`,parseMarkdown:(e,t)=>t.applyMark("highlight",t.parseInline(e.tokens||[])),markdownTokenizer:{name:"highlight",level:"inline",start:(e)=>e.indexOf("=="),tokenize(e,t,n){let i=/^(==)([^=]+)(==)/.exec(e);if(i){let l=i[2].trim(),c=n.inlineTokens(l);return{type:"highlight",raw:i[0],text:l,tokens:c}}}},addCommands(){return{setHighlight:(e)=>({commands:t})=>t.setMark(this.name,e),toggleHighlight:(e)=>({commands:t})=>t.toggleMark(this.name,e),unsetHighlight:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[bo({find:Mse,type:this.type})]},addPasteRules(){return[Pr({find:Nse,type:this.type})]}}),c2=Ose});var u2;var Fk=N(()=>{lh();lh();u2=t2});var d2;var Uk=N(()=>{lh();lh();d2=e2});function Vk(e){let t=e.trim().toLowerCase();if(!t)return[...Sj];return Sj.filter((n)=>n.title.toLowerCase().includes(t)||n.keywords.some((a)=>a.includes(t)))}function Dse(e,t){if(t<0||t>e.doc.content.size)return!1;let n=e.doc.resolve(t);if(n.parent.type.spec.code)return!1;if(n.parentOffset===0)return!0;return/^\s*$/.test(n.parent.textBetween(n.parentOffset-1,n.parentOffset))}function jk({value:e,onChange:t,placeholder:n="Write, or press '/' for blocks…",label:a,editable:i=!0,minHeight:l=200,className:c,...u}){let f=Dt.useRef(t);f.current=t;let h=Dt.useRef(e),m=Dt.useRef(n);m.current=n;let b=Dt.useRef(null),[y,v]=Dt.useState(null),S=Dt.useCallback((pe)=>{b.current=pe,v(pe)},[]),[C,E]=Dt.useState(!1),R=Dt.useRef(!1);R.current=C;let[D,U]=Dt.useState(""),[z,L]=Dt.useState(null),Q=Dt.useRef(null),V=Dt.useRef(null),[P,re]=Dt.useState(null),[J,ge]=Dt.useState(!1);Dt.useEffect(()=>ge(!0),[]);let le=Dt.useId(),se=`${le}-label`,I=`${le}-slash`,F=(pe)=>`${I}-option-${pe}`,Y=Dt.useRef(()=>{}),Z=u["aria-label"],de=Dt.useMemo(()=>Vk(y?.query??""),[y?.query]),K=y?Math.min(y.index,Math.max(de.length-1,0)):0,k=y!==null&&de.length>0,X=_F({editable:i,immediatelyRender:!1,extensions:[l2.configure({heading:{levels:[1,2,3]},link:{openOnClick:!1,autolink:!0}}),c2,u2,d2.configure({nested:!0}),xj.configure({placeholder:()=>m.current})],content:e||"",editorProps:{attributes:{class:zo("prose prose-sm max-w-none px-4 py-3 text-fg outline-none","prose-headings:text-fg prose-p:text-fg prose-strong:text-fg prose-a:text-accent-strong","prose-code:text-fg prose-blockquote:text-fg-muted prose-li:text-fg"),style:`min-height:${typeof l==="number"?`${l}px`:l}`,role:"textbox","aria-multiline":"true",...a?{"aria-labelledby":se}:{},...Z?{"aria-label":Z}:{},"aria-expanded":k?"true":"false",...k?{"aria-controls":I,"aria-activedescendant":F(K)}:{}},handleTextInput(pe,Oe,Rt,he){if(he!=="/"||b.current)return!1;if(!Dse(pe.state,Oe))return!1;return S({from:Oe,query:"",index:0}),!1},handleKeyDown(pe,Oe){let Rt=b.current;if(!Rt)return!1;if(Oe.key==="Escape")return S(null),!0;let he=Vk(Rt.query);if(he.length===0)return S(null),!1;if(Oe.key==="ArrowDown")return S({...Rt,index:(Rt.index+1)%he.length}),!0;if(Oe.key==="ArrowUp")return S({...Rt,index:(Rt.index-1+he.length)%he.length}),!0;if(Oe.key==="Enter"||Oe.key==="Tab")return Y.current(he[Math.min(Rt.index,he.length-1)]),!0;return!1}},onUpdate({editor:pe}){let Oe=pe.getHTML();h.current=Oe,f.current(Oe);let Rt=b.current;if(!Rt)return;let he=pe.state.selection.from;if(he<Rt.from)return S(null);let cn=pe.state.doc.textBetween(Rt.from,he,`
395
+ `,`
396
+ `);if(!cn.startsWith("/"))return S(null);let Dn=cn.slice(1);if(/\s/.test(Dn)||Vk(Dn).length===0)return S(null);S({...Rt,query:Dn,index:0})},onSelectionUpdate({editor:pe}){let Oe=b.current;if(!Oe)return;let Rt=pe.state.selection.from;if(Rt<Oe.from||Rt>Oe.from+Oe.query.length+1)S(null)},onBlur(){S(null)}});Dt.useEffect(()=>{if(!X)return;if(e!==h.current&&e!==X.getHTML())X.commands.setContent(e||"",{emitUpdate:!1}),h.current=e},[e,X]),Dt.useEffect(()=>{if(X)X.setEditable(i)},[i,X]);let ve=Dt.useCallback((pe)=>{let Oe=b.current;if(!X||!Oe||!pe)return;let Rt=X.state.doc.content.size,he=Math.min(Math.max(Oe.from,0),Rt),cn=Math.min(Math.max(X.state.selection.from,he),Rt);X.chain().focus().deleteRange({from:he,to:cn}).run(),pe.run(X),S(null)},[X,S]);Y.current=ve;let $e=Dt.useCallback(()=>{let pe=b.current,Oe=V.current;if(!X||!pe||!Oe)return;let Rt=X.state.doc.content.size;if(pe.from>Rt)return S(null);let he=X.view.coordsAtPos(pe.from),cn=Oe.getBoundingClientRect(),Dn=6,An=8,nn=he.bottom+Dn;if(nn+cn.height>window.innerHeight-An)nn=Math.max(An,he.top-Dn-cn.height);let Ie=Math.max(An,Math.min(he.left,window.innerWidth-cn.width-An));re((Zr)=>Zr&&Zr.left===Ie&&Zr.top===nn?Zr:{left:Ie,top:nn})},[X,S]);Dt.useLayoutEffect(()=>{if(y)$e();else re(null)},[y,$e]),Dt.useEffect(()=>{if(!y)return;let pe=()=>$e();return window.addEventListener("scroll",pe,!0),window.addEventListener("resize",pe),()=>{window.removeEventListener("scroll",pe,!0),window.removeEventListener("resize",pe)}},[y,$e]);let Ae=P4({editor:X,selector:({editor:pe})=>pe?{bold:pe.isActive("bold"),italic:pe.isActive("italic"),strike:pe.isActive("strike"),highlight:pe.isActive("highlight"),code:pe.isActive("code"),link:pe.isActive("link"),hasSelection:!pe.state.selection.empty}:null}),Fe=Dt.useCallback(()=>{E(!1),L(null),R.current=!1},[]);Dt.useEffect(()=>{if(C&&Ae&&!Ae.hasSelection&&!Ae.link)Fe()},[C,Ae,Fe]),Dt.useEffect(()=>{if(C)Q.current?.focus()},[C]);let Te=()=>{if(!X)return;U(X.getAttributes("link").href??""),L(null),R.current=!0,E(!0)},Ze=()=>{if(!X)return;if(D.trim()===""){X.chain().focus().extendMarkRange("link").unsetLink().run(),Fe();return}let pe=j3(D);if(!pe)return L(K3);X.chain().focus().extendMarkRange("link").setLink({href:pe}).run(),Fe()};return Kt.jsxDEV("div",{className:zo("flex w-full flex-col gap-2",c),children:[a?Kt.jsxDEV("span",{id:se,className:"text-small font-medium text-fg",children:a},void 0,!1,void 0,this):null,Kt.jsxDEV("div",{className:"relative rounded-lg border border-border bg-surface focus-within:border-brand-green",children:[X?Kt.jsxDEV(HU,{editor:X,shouldShow:({editor:pe,view:Oe,state:Rt,element:he})=>{let cn=he.contains(document.activeElement);if(!pe.isEditable||!(Oe.hasFocus()||cn))return!1;return R.current||!Rt.selection.empty},className:"flex flex-col gap-1 rounded-lg border border-border bg-surface-card p-1 shadow-md",children:C?Kt.jsxDEV(Kt.Fragment,{children:[Kt.jsxDEV("div",{className:"flex items-center gap-1",children:[Kt.jsxDEV("input",{ref:Q,type:"text",value:D,"aria-label":"Link URL","aria-invalid":z?!0:void 0,placeholder:"https://, mailto:, /path",className:"h-8 w-56 rounded-md border border-border bg-surface px-2 text-small text-fg outline-none placeholder:text-fg-subtle focus:border-brand-green",onChange:(pe)=>{U(pe.target.value),L(null)},onKeyDown:(pe)=>{if(pe.key==="Enter")pe.preventDefault(),Ze();if(pe.key==="Escape")pe.preventDefault(),Fe(),X.chain().focus().run()}},void 0,!1,void 0,this),Kt.jsxDEV("button",{type:"button",className:f2,onMouseDown:(pe)=>pe.preventDefault(),onClick:Ze,title:"Apply link",children:"Apply"},void 0,!1,void 0,this),Kt.jsxDEV("button",{type:"button",className:f2,onMouseDown:(pe)=>pe.preventDefault(),onClick:()=>{Fe(),X.chain().focus().run()},title:"Cancel",children:"Cancel"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z?Kt.jsxDEV("span",{className:"px-1 pb-0.5 text-caption text-danger",children:z},void 0,!1,void 0,this):null]},void 0,!0,void 0,this):Kt.jsxDEV("div",{className:"flex items-center gap-0.5",children:[Pse.map((pe)=>Kt.jsxDEV("button",{type:"button",className:f2,"data-active":Ae?.[pe.key]??!1,"aria-pressed":Ae?.[pe.key]??!1,onMouseDown:(Oe)=>Oe.preventDefault(),onClick:()=>pe.run(X),title:pe.title,children:pe.label},pe.key,!1,void 0,this)),Kt.jsxDEV("button",{type:"button",className:f2,"data-active":Ae?.link??!1,"aria-pressed":Ae?.link??!1,onMouseDown:(pe)=>pe.preventDefault(),onClick:Te,title:"Link",children:Kt.jsxDEV(Lse,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this):null,Kt.jsxDEV(D4,{editor:X},void 0,!1,void 0,this),J&&k&&y?wj.createPortal(Kt.jsxDEV("div",{ref:V,id:I,role:"listbox","aria-label":"Insert block",className:"fixed z-50 max-h-72 w-64 overflow-auto rounded-lg border border-border bg-surface-card p-1 shadow-md",style:{left:P?.left??0,top:P?.top??0,visibility:P?"visible":"hidden"},children:de.map((pe,Oe)=>Kt.jsxDEV("div",{id:F(Oe),role:"option","aria-selected":Oe===K,className:zo("flex w-full cursor-pointer flex-col items-start rounded-md px-3 py-1.5 text-left",Oe===K?"bg-surface-muted":"hover:bg-surface-muted"),onMouseDown:(Rt)=>Rt.preventDefault(),onClick:()=>ve(pe),children:[Kt.jsxDEV("span",{className:"text-small text-fg",children:pe.title},void 0,!1,void 0,this),Kt.jsxDEV("span",{className:"text-caption text-fg-subtle",children:pe.hint},void 0,!1,void 0,this)]},pe.title,!0,void 0,this))},void 0,!1,void 0,this),document.body):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var Dt,wj,Kt,Sj,f2="inline-flex h-8 min-w-8 items-center justify-center rounded-md px-2 text-small text-fg-muted transition-colors hover:bg-surface-muted hover:text-fg data-[active=true]:bg-surface-muted data-[active=true]:text-fg",Pse,Lse=()=>Kt.jsxDEV("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[Kt.jsxDEV("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"},void 0,!1,void 0,this),Kt.jsxDEV("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"},void 0,!1,void 0,this)]},void 0,!0,void 0,this);var Cj=N(()=>{j1();UU();zk();$j();Hk();Fk();Uk();Ls();Dt=q(ae(),1),wj=q(jr(),1),Kt=q(Tt(),1),Sj=[{title:"Text",hint:"Plain paragraph",keywords:["text","paragraph","body","p"],run:(e)=>e.chain().focus().setParagraph().run()},{title:"Heading 1",hint:"Big section heading",keywords:["h1","heading","title"],run:(e)=>e.chain().focus().toggleHeading({level:1}).run()},{title:"Heading 2",hint:"Medium heading",keywords:["h2","subheading"],run:(e)=>e.chain().focus().toggleHeading({level:2}).run()},{title:"Heading 3",hint:"Small heading",keywords:["h3"],run:(e)=>e.chain().focus().toggleHeading({level:3}).run()},{title:"Bulleted list",hint:"Unordered list",keywords:["bullet","unordered","ul","list"],run:(e)=>e.chain().focus().toggleBulletList().run()},{title:"Numbered list",hint:"Ordered list",keywords:["numbered","ordered","ol","list"],run:(e)=>e.chain().focus().toggleOrderedList().run()},{title:"To-do list",hint:"Checklist",keywords:["todo","task","checkbox","check"],run:(e)=>e.chain().focus().toggleTaskList().run()},{title:"Quote",hint:"Block quote",keywords:["quote","blockquote","citation"],run:(e)=>e.chain().focus().toggleBlockquote().run()},{title:"Code",hint:"Code block",keywords:["code","snippet","pre"],run:(e)=>e.chain().focus().toggleCodeBlock().run()},{title:"Divider",hint:"Horizontal rule",keywords:["divider","rule","hr","separator"],run:(e)=>e.chain().focus().setHorizontalRule().run()}];Pse=[{key:"bold",title:"Bold",label:Kt.jsxDEV("b",{children:"B"},void 0,!1,void 0,this),run:(e)=>e.chain().focus().toggleBold().run()},{key:"italic",title:"Italic",label:Kt.jsxDEV("i",{children:"i"},void 0,!1,void 0,this),run:(e)=>e.chain().focus().toggleItalic().run()},{key:"strike",title:"Strikethrough",label:Kt.jsxDEV("s",{children:"S"},void 0,!1,void 0,this),run:(e)=>e.chain().focus().toggleStrike().run()},{key:"highlight",title:"Highlight",label:"H",run:(e)=>e.chain().focus().toggleHighlight().run()},{key:"code",title:"Inline code",label:"</>",run:(e)=>e.chain().focus().toggleCode().run()}]});var Ej=N(()=>{Cj()});function ch(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)&&e.type==="doc"}function Bb(e){let t=[],n=(a)=>{for(let i of a){if(i.type==="text")t.push(i.text??"");else if(i.type==="hardBreak")t.push(`
397
+ `);if(i.content)n(i.content);if(_se.has(i.type))t.push(`
398
+ `)}};return n(e?.content??[]),t.join("").replace(/\n{2,}/g,`
399
+ `).trim()}var _se;var Kk=N(()=>{_se=new Set(["paragraph","heading","listItem","taskItem","blockquote","codeBlock","horizontalRule"])});function Hd({label:e,children:t}){return ye.jsxDEV("label",{className:"flex w-full flex-col gap-2",children:[e===void 0?null:ye.jsxDEV("span",{className:"text-sm font-medium text-fg",children:e},void 0,!1,void 0,this),t]},void 0,!0,void 0,this)}function p2(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return"";let n=(a)=>String(a).padStart(2,"0");return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`}function h2(e){let t=new Date(e);return Number.isNaN(t.getTime())?null:t.toISOString()}function Fd(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function Ise(e){let[t,n]=tn.useState(0);tn.useEffect(()=>{if(e===null)return;let a=e-Date.now();if(a<=0)return;let i=setTimeout(()=>n((l)=>l+1),Math.min(a+1000,2147483647));return()=>clearTimeout(i)},[e,t])}function Bse({value:e,onChange:t}){let[n,a]=tn.useState(!1),[i,l]=tn.useState(""),c=Boolean(e),u=c?new Date(e).getTime():Number.NaN,f=Number.isFinite(u)&&u>Date.now();Ise(f?u:null);let h=!c?{text:"Not published",tone:"text-fg-muted"}:f?{text:`Scheduled for ${Fd(e)}`,tone:"text-accent-strong"}:{text:`Published ${Fd(e)}`,tone:"text-fg"},m=()=>{l(p2(e)),a((b)=>!b)};return ye.jsxDEV("div",{className:"flex flex-col gap-2",children:[ye.jsxDEV("span",{className:`text-sm ${h.tone}`,children:h.text},void 0,!1,void 0,this),ye.jsxDEV("div",{className:"flex flex-wrap items-center gap-2",children:[!c||f?ye.jsxDEV(we,{size:"sm",onPress:()=>{a(!1),t(new Date().toISOString())},children:"Publish now"},void 0,!1,void 0,this):null,ye.jsxDEV(we,{variant:"secondary",size:"sm",onPress:m,children:f?"Change schedule":c?"Change time":"Schedule…"},void 0,!1,void 0,this),c?ye.jsxDEV(we,{variant:"ghost",size:"sm",className:"text-danger",onPress:()=>{a(!1),t(null)},children:"Unpublish"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),n?ye.jsxDEV("input",{className:ls,type:"datetime-local",value:i,autoFocus:!0,onChange:(b)=>{l(b.target.value);let y=b.target.value?h2(b.target.value):null;if(y)t(y)}},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}function dh({schema:e,value:t,onChange:n,api:a}){let i=(l,c)=>n({...t,[l]:c});return ye.jsxDEV("div",{className:"flex flex-col gap-4",children:e.map((l)=>ye.jsxDEV(kj,{def:l,value:t[l.name],onChange:(c)=>i(l.name,c),api:a,siblings:t},l.name,!1,void 0,this))},void 0,!1,void 0,this)}function kj({def:e,value:t,onChange:n,api:a,hideLabelAs:i,siblings:l}){let c=i!==void 0?void 0:ye.jsxDEV(ye.Fragment,{children:[e.label??e.name," ",e.required?ye.jsxDEV("span",{className:"text-danger",children:"*"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),u=(f)=>typeof f==="string"?f:f==null?"":JSON.stringify(f);switch(e.type){case"text":case"url":{let f=e.type==="url"?"https://…":"";return i!==void 0?ye.jsxDEV("input",{className:ls,type:"text","aria-label":i,placeholder:f,value:t??"",onChange:(h)=>n(h.target.value)},void 0,!1,void 0,this):ye.jsxDEV(wn,{label:c,value:t??"",onChange:n,placeholder:f},void 0,!1,void 0,this)}case"textarea":return i!==void 0?ye.jsxDEV("textarea",{className:`${ls} h-auto min-h-20 py-2.5`,"aria-label":i,value:u(t),onChange:(f)=>n(f.target.value)},void 0,!1,void 0,this):ye.jsxDEV(Hx,{label:c,value:u(t),onChange:n},void 0,!1,void 0,this);case"richtext":return ye.jsxDEV(Hd,{label:c,children:ye.jsxDEV(zse,{value:t,onChange:n},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"number":return ye.jsxDEV(Hd,{label:c,children:ye.jsxDEV("input",{className:ls,type:"number","aria-label":i,value:t==null?"":String(t),onChange:(f)=>n(f.target.value===""?null:Number(f.target.value))},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"date":case"datetime":return ye.jsxDEV(Hd,{label:c,children:ye.jsxDEV("input",{className:ls,type:e.type==="date"?"date":"datetime-local","aria-label":i,value:t??"",onChange:(f)=>n(f.target.value||null)},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"slug":return ye.jsxDEV(Fse,{def:e,label:c,value:typeof t==="string"?t:"",source:typeof l?.[e.from??""]==="string"?l[e.from??""]:"",onChange:n},void 0,!1,void 0,this);case"publish":return ye.jsxDEV("div",{className:"flex w-full flex-col gap-2",children:[ye.jsxDEV("span",{className:"text-sm font-medium text-fg",children:c},void 0,!1,void 0,this),ye.jsxDEV(Bse,{value:typeof t==="string"?t:"",onChange:n},void 0,!1,void 0,this)]},void 0,!0,void 0,this);case"boolean":return ye.jsxDEV("label",{className:"flex items-center gap-2",children:[ye.jsxDEV("input",{type:"checkbox",checked:Boolean(t),onChange:(f)=>n(f.target.checked)},void 0,!1,void 0,this),ye.jsxDEV("span",{className:"text-sm text-fg",children:e.label??e.name},void 0,!1,void 0,this)]},void 0,!0,void 0,this);case"select":return ye.jsxDEV(Hd,{label:c,children:ye.jsxDEV(Use,{def:e,value:t,onChange:n,api:a,ariaLabel:i},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"media":return ye.jsxDEV(Hd,{label:c,children:ye.jsxDEV(Vse,{value:t,onChange:n,api:a},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"group":return ye.jsxDEV(Hd,{label:c,children:ye.jsxDEV("div",{className:"rounded-lg border border-border bg-surface-muted p-3.5",children:ye.jsxDEV(dh,{schema:e.fields??[],value:t??{},onChange:n,api:a},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"repeater":return ye.jsxDEV(Hse,{def:e,value:t??[],onChange:n,api:a,label:c},void 0,!1,void 0,this);default:return null}}function Tj(e){try{return QH(e,Aj)}catch(t){return console.error("pramen/cms-editor: could not parse editor HTML",t),{type:"doc",content:[]}}}function Rj(e){if(typeof e==="string")return e;if(!ch(e))return"";try{return XH(e,Aj)}catch(t){return console.error("pramen/cms-editor: rich-text document uses nodes this editor cannot render",t),""}}function zse({value:e,onChange:t}){let[n,a]=tn.useState(()=>Rj(e)),i=tn.useRef(null),l=tn.useRef(!1);return tn.useEffect(()=>{if(l.current||typeof e!=="string"||e==="")return;l.current=!0;let u=Tj(e);i.current=u,t(u)},[e,t]),tn.useEffect(()=>{if(e!==null&&e===i.current)return;a(Rj(e))},[e]),ye.jsxDEV(jk,{value:n,onChange:(u)=>{a(u);let f=Tj(u);i.current=f,t(f)},minHeight:180,placeholder:"Write, or press '/' for blocks…"},void 0,!1,void 0,this)}function Hse({def:e,value:t,onChange:n,api:a,label:i}){let l=Array.isArray(t)?t:[],c=e.fields??[],u=c.length===1&&!["repeater","group","richtext","media"].includes(c[0].type),[f,h]=tn.useState(null),m=(V,P)=>n(l.map((re,J)=>J===V?P:re)),b=()=>n([...l,{}]),y=(V)=>n(l.filter((P,re)=>re!==V)),v=(V,P)=>{if(V===P||P<0||P>=l.length)return;let re=l.slice(),[J]=re.splice(V,1);re.splice(P,0,J),n(re)},S=(V,P)=>v(V,V+P),C=e.max!=null&&l.length>=e.max,E=e.min!=null&&l.length<=e.min,R=(V)=>{let P=["text","textarea","richtext","select","url"];for(let re of c){if(!P.includes(re.type))continue;let J=V[re.name],le=(ch(J)?Bb(J):typeof J==="string"?J.replace(/<[^>]+>/g," "):"").replace(/\s+/g," ").trim();if(le)return le.slice(0,80)}return""},D=(V)=>({onDragOver:(P)=>{if(!f)return;P.preventDefault(),h((re)=>re&&re.over!==V?{...re,over:V}:re)},onDrop:(P)=>{if(!f)return;P.preventDefault(),v(f.from,V),h(null)}}),U=(V)=>ye.jsxDEV("span",{draggable:!0,onDragStart:(P)=>{P.dataTransfer.effectAllowed="move",P.dataTransfer.setData("text/plain",""),h({from:V,over:V})},onDragEnd:()=>h(null),className:"cursor-grab select-none px-1 text-fg-subtle transition-colors hover:text-fg active:cursor-grabbing",title:"Drag to reorder","aria-hidden":!0,children:"⠿"},void 0,!1,void 0,this),z=(V)=>`${f&&f.over===V&&f.from!==V?"ring-2 ring-brand-green":""} ${f&&f.from===V?"opacity-40":""}`,L="opacity-0 transition-opacity group-hover/row:opacity-100 group-focus-within/row:opacity-100 [@media(hover:none)]:opacity-100",Q=(V)=>ye.jsxDEV("div",{className:"flex shrink-0 items-center",children:[ye.jsxDEV("button",{type:"button",className:"px-1.5 text-fg-subtle hover:text-fg disabled:opacity-30",title:"Move up",disabled:V===0,onClick:()=>S(V,-1),children:"↑"},void 0,!1,void 0,this),ye.jsxDEV("button",{type:"button",className:"px-1.5 text-fg-subtle hover:text-fg disabled:opacity-30",title:"Move down",disabled:V===l.length-1,onClick:()=>S(V,1),children:"↓"},void 0,!1,void 0,this),ye.jsxDEV("button",{type:"button",className:"px-1.5 text-fg-subtle hover:text-danger disabled:opacity-30",title:"Remove",disabled:E,onClick:()=>y(V),children:"✕"},void 0,!1,void 0,this)]},void 0,!0,void 0,this);return ye.jsxDEV("div",{className:"flex flex-col gap-2",children:[ye.jsxDEV("span",{className:"text-sm font-medium text-fg",children:i},void 0,!1,void 0,this),l.length===0?ye.jsxDEV("span",{className:"text-sm text-fg-muted",children:"None yet."},void 0,!1,void 0,this):null,ye.jsxDEV("div",{className:`flex flex-col ${u?"gap-1":"gap-2"}`,children:l.map((V,P)=>u?ye.jsxDEV("div",{className:`group/row flex items-center gap-1 rounded-lg px-1 py-0.5 transition-colors ${z(P)}`,...D(P),children:[U(P),ye.jsxDEV("div",{className:"min-w-0 flex-1",children:ye.jsxDEV(kj,{def:c[0],hideLabelAs:`${e.label??e.name} ${P+1}`,value:V[c[0].name],onChange:(re)=>m(P,{...V,[c[0].name]:re}),api:a},void 0,!1,void 0,this)},void 0,!1,void 0,this),ye.jsxDEV("div",{className:"opacity-0 transition-opacity group-hover/row:opacity-100 group-focus-within/row:opacity-100 [@media(hover:none)]:opacity-100",children:Q(P)},void 0,!1,void 0,this)]},P,!0,void 0,this):ye.jsxDEV("div",{className:`rounded-lg border border-border bg-surface-muted transition-colors ${z(P)}`,...D(P),children:[ye.jsxDEV("div",{className:"flex items-center gap-1 border-b border-border px-2 py-1.5",children:[U(P),ye.jsxDEV("span",{className:"text-caption text-fg-subtle",children:P+1},void 0,!1,void 0,this),ye.jsxDEV("span",{className:"min-w-0 flex-1 truncate text-sm text-fg-muted",children:R(V)},void 0,!1,void 0,this),Q(P)]},void 0,!0,void 0,this),ye.jsxDEV("div",{className:"p-3.5",children:ye.jsxDEV(dh,{schema:c,value:V,onChange:(re)=>m(P,re),api:a},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},P,!0,void 0,this))},void 0,!1,void 0,this),ye.jsxDEV(we,{variant:"secondary",size:"sm",className:"self-start",onPress:b,isDisabled:C,children:["+ Add ",e.label??e.name]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function uh(e){return Mj(e).replace(/-+$/,"")}function Mj(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9-]+/g,"-").replace(/-{2,}/g,"-").replace(/^-+/,"").slice(0,80)}function Fse({def:e,label:t,value:n,source:a,onChange:i}){let l=tn.useRef(null),c=tn.useRef(!1),u=tn.useRef(null);tn.useEffect(()=>{if(!e.from)return;let m=u.current;if(u.current=a,m===null||m===a||!a)return;if(c.current)return;if(n!==""&&n!==l.current)return;let b=uh(a);if(b===n)return;l.current=b,i(b)},[a,n,e.from,i]);let f=a?uh(a):"",h=Boolean(f)&&f!==n;return ye.jsxDEV(Hd,{label:t,children:[ye.jsxDEV("input",{className:ls,value:n,onChange:(m)=>{c.current=!0,l.current=null,i(Mj(m.target.value))},onBlur:()=>{let m=uh(n);if(m!==n)i(m)},placeholder:f},void 0,!1,void 0,this),h?ye.jsxDEV("button",{type:"button",className:"self-start text-caption text-fg-subtle underline hover:text-fg",onClick:()=>{l.current=f,c.current=!1,i(f)},children:["Generate from ",e.from,": ",f]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)}function Use({def:e,value:t,onChange:n,api:a,ariaLabel:i}){let[l,c]=tn.useState(null),u=e.optionsFrom;tn.useEffect(()=>{if(!u)return;let m=!0;return a.call(u).then((b)=>{if(m)c(Array.isArray(b)?b:[])}).catch(()=>{if(m)c([])}),()=>{m=!1}},[u,a]);let f=Boolean(u)&&l===null,h=u?l??[]:(e.options??[]).map((m)=>({value:m,label:m}));return ye.jsxDEV("select",{className:ls,"aria-label":i,value:t??"",onChange:(m)=>n(m.target.value||null),children:[ye.jsxDEV("option",{value:"",children:f?"Načítám…":"—"},void 0,!1,void 0,this),h.map((m)=>ye.jsxDEV("option",{value:m.value,children:m.label},m.value,!1,void 0,this))]},void 0,!0,void 0,this)}function Vse({value:e,onChange:t,api:n}){let[a,i]=tn.useState(!1),[l,c]=tn.useState(null);return tn.useEffect(()=>{if(e)n.call("getMedia",{id:e}).then(c).catch(()=>c(null));else c(null)},[e,n]),ye.jsxDEV("div",{children:[ye.jsxDEV("div",{className:"flex items-center gap-3 rounded-[14px] border border-transparent bg-surface-card px-[18px] py-3.5",children:[l?ye.jsxDEV("img",{className:"h-10 w-10 rounded object-cover",src:n.resolve(`/media/${l.file.key}`),alt:""},void 0,!1,void 0,this):ye.jsxDEV("span",{className:"text-fg-subtle",children:"no media"},void 0,!1,void 0,this),ye.jsxDEV("span",{className:"flex-1 truncate text-fg-subtle",children:l?.file.filename??e??""},void 0,!1,void 0,this),ye.jsxDEV(we,{variant:"secondary",size:"sm",onPress:()=>i(!0),children:"pick"},void 0,!1,void 0,this),e?ye.jsxDEV(we,{variant:"ghost",size:"sm",className:"text-danger",onPress:()=>t(null),children:"clear"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),a?ye.jsxDEV(jse,{api:n,onClose:()=>i(!1),onPick:(u)=>{t(u),i(!1)}},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}function jse({api:e,onClose:t,onPick:n}){let[a,i]=tn.useState([]),[l,c]=tn.useState(!1),[u,f]=tn.useState(""),h=()=>e.listMedia().then(i).catch((b)=>f(String(b.message??b)));tn.useEffect(()=>{h()},[]);let m=async(b)=>{c(!0),f("");try{let y=await e.uploadMedia(b);n(y.id)}catch(y){f(String(y.message??y))}finally{c(!1)}};return ye.jsxDEV(Fx,{isOpen:!0,isDismissable:!0,onOpenChange:(b)=>!b&&t(),children:ye.jsxDEV(Ux,{className:"w-full max-w-[680px] px-9 py-8",children:ye.jsxDEV(Vx,{className:"max-h-[86vh] overflow-auto outline-none",children:[ye.jsxDEV(qx,{level:"1",className:"mb-5 font-normal",children:["Choose ",ye.jsxDEV("span",{className:"text-fg-subtle",children:"a file"},void 0,!1,void 0,this)," from the library"]},void 0,!0,void 0,this),u?ye.jsxDEV("div",{className:"my-2 rounded-lg border border-danger bg-surface-card px-3.5 py-2.5 text-small text-danger",children:u},void 0,!1,void 0,this):null,ye.jsxDEV("label",{className:"mb-4 flex w-full flex-col gap-2",children:[ye.jsxDEV(Kx,{size:"small",weight:"medium",children:"Upload a new file"},void 0,!1,void 0,this),ye.jsxDEV("input",{type:"file",className:"text-small text-fg-muted",disabled:l,onChange:(b)=>b.target.files?.[0]&&m(b.target.files[0])},void 0,!1,void 0,this)]},void 0,!0,void 0,this),ye.jsxDEV("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(180px,1fr))] gap-2.5",children:a.map((b)=>ye.jsxDEV("div",{className:"cursor-pointer overflow-hidden rounded-lg border border-border bg-surface-card",onClick:()=>n(b.id),children:[(b.file.contentType??"").startsWith("image/")?ye.jsxDEV("img",{className:"block h-[130px] w-full object-cover",src:e.resolve(`/media/${b.file.key}`),alt:""},void 0,!1,void 0,this):ye.jsxDEV("div",{className:"h-[130px] bg-surface-muted"},void 0,!1,void 0,this),ye.jsxDEV("div",{className:"truncate px-2 py-1.5 text-caption text-fg-muted",children:b.file.filename??b.id},void 0,!1,void 0,this)]},b.id,!0,void 0,this))},void 0,!1,void 0,this),ye.jsxDEV("div",{className:"mt-3 text-right",children:ye.jsxDEV(we,{variant:"ghost",onPress:t,children:"close"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)}var tn,ye,ls="h-10 w-full rounded-lg border border-border bg-surface-card px-4 text-sm text-fg outline-none transition-colors placeholder:text-fg-muted focus:border-brand-green",Aj;var Nj=N(()=>{Ji();Ej();Ye();Hk();Uk();Fk();zk();Kk();tn=q(ae(),1),ye=q(Tt(),1);Aj=[l2.configure({heading:{levels:[1,2,3]},link:{openOnClick:!1,autolink:!0}}),c2,u2,d2.configure({nested:!0})]});function Hb({lead:e,em:t,children:n}){return O.jsxDEV("div",{className:"mx-auto grid max-w-[1200px] grid-cols-[1fr_auto] items-center gap-6 px-7 pb-6 pt-8 max-[820px]:grid-cols-1",children:[O.jsxDEV("h1",{className:"m-0 text-[56px] font-normal leading-[1.05] tracking-[-0.01em] max-[820px]:text-[40px]",children:[O.jsxDEV("span",{className:"block text-fg-subtle",children:e},void 0,!1,void 0,this),O.jsxDEV("span",{className:"block text-fg",children:t},void 0,!1,void 0,this)]},void 0,!0,void 0,this),n]},void 0,!0,void 0,this)}function m2({text:e,em:t,children:n}){return O.jsxDEV("div",{className:"flex min-w-[360px] items-center gap-4 rounded-full bg-brand-green py-3 pl-7 pr-3 max-[820px]:min-w-0",children:[O.jsxDEV("span",{className:"text-callout text-fg-on-brand",children:[e," ",O.jsxDEV("span",{className:"font-semibold",children:t},void 0,!1,void 0,this)]},void 0,!0,void 0,this),n]},void 0,!0,void 0,this)}function gl({children:e}){return O.jsxDEV("div",{className:"mb-2 mt-[18px] text-sm text-fg-subtle first:mt-0",children:e},void 0,!1,void 0,this)}function bl({status:e,children:t}){return O.jsxDEV("span",{className:`inline-block whitespace-nowrap rounded-full border px-2.5 py-0.5 text-caption font-medium ${e==="published"||e==="active"?"bg-brand-green text-fg-on-brand border-transparent":e==="in_review"||e==="review"?"bg-accent-yellow text-fg-on-brand border-transparent":e==="rejected"||e==="archived"||e==="inactive"?"border-danger text-danger bg-surface-card":"border-border text-fg-muted bg-surface-card"}`,children:t},void 0,!1,void 0,this)}function Gk({onClose:e,wide:t,children:n}){return O.jsxDEV(Fx,{isOpen:!0,isDismissable:!0,onOpenChange:(a)=>!a&&e(),children:O.jsxDEV(Ux,{className:`w-full px-9 py-8 ${t?"max-w-[680px]":"max-w-[520px]"}`,children:O.jsxDEV(Vx,{className:"max-h-[86vh] overflow-auto outline-none",children:n},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function Wk({children:e}){return O.jsxDEV(qx,{level:"1",className:"mb-5 font-normal",children:e},void 0,!1,void 0,this)}function g2({children:e,className:t}){return O.jsxDEV("div",{className:`grid grid-cols-[auto_1fr] gap-x-3.5 gap-y-2 text-[13px] text-fg-muted [&>span:nth-child(odd)]:text-fg-subtle ${t??""}`,children:e},void 0,!1,void 0,this)}function _j({children:e}){return O.jsxDEV("div",{className:"overflow-auto rounded-lg border border-border bg-surface-card p-6",children:e},void 0,!1,void 0,this)}function ph({ok:e,children:t}){return O.jsxDEV("div",{className:`my-2 rounded-lg border px-3.5 py-2.5 text-small ${e?"border-brand-green bg-brand-green/20 text-fg":"border-danger bg-surface-card text-danger"}`,children:t},void 0,!1,void 0,this)}function Ij({api:e,pages:t,blockTypes:n,onOpen:a,onCreated:i,onError:l}){let[c,u]=ue.useState(!1);return O.jsxDEV(O.Fragment,{children:[O.jsxDEV(Hb,{lead:"Pages",em:t.length===0?"None yet":t.length===1?"1 page total":`${t.length} pages total`,children:O.jsxDEV(m2,{text:"Let's",em:"create something",children:O.jsxDEV(we,{className:"shrink-0",onPress:()=>u(!0),children:"+ New page"},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),O.jsxDEV("div",{className:fh,children:O.jsxDEV("div",{className:"flex flex-col gap-2",children:[t.map((f)=>O.jsxDEV("div",{className:`${Wc} cursor-pointer hover:bg-surface-muted`,onClick:()=>a(f),children:[O.jsxDEV("span",{className:"flex-1 truncate font-medium",children:f.title},void 0,!1,void 0,this),O.jsxDEV("span",{className:"text-fg-subtle",children:["/",f.slug]},void 0,!0,void 0,this),O.jsxDEV("span",{className:"text-fg-subtle",children:f.locale},void 0,!1,void 0,this),O.jsxDEV(bl,{status:f.status,children:f.status},void 0,!1,void 0,this)]},f.id,!0,void 0,this)),t.length===0?O.jsxDEV("p",{className:"text-fg-subtle",children:["No pages yet. ",n.length===0?"Define block types + a content type first (via the API/admin).":"Create one."]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)},void 0,!1,void 0,this),c?O.jsxDEV(Kse,{api:e,onClose:()=>u(!1),onCreated:()=>{u(!1),i()},onError:l},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}function Kse({api:e,onClose:t,onCreated:n,onError:a}){let[i,l]=ue.useState([]),[c,u]=ue.useState(""),[f,h]=ue.useState(""),[m,b]=ue.useState("");ue.useEffect(()=>{e.listContentTypes().then((v)=>{if(l(v),v[0])u(v[0].id)}).catch((v)=>a(ut(v)))},[e,a]);let y=async()=>{try{await e.call("createPage",{typeId:c,title:f,slug:m||uh(f)}),n()}catch(v){a(ut(v))}};return O.jsxDEV(Gk,{onClose:t,children:[O.jsxDEV(Wk,{children:["Create a ",O.jsxDEV(zb,{children:"new page"},void 0,!1,void 0,this)," and define the essentials",O.jsxDEV(zb,{children:"."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O.jsxDEV("div",{className:"flex flex-col gap-4",children:[O.jsxDEV("div",{className:"flex w-full flex-col gap-2",children:[O.jsxDEV("span",{className:"text-sm font-medium text-fg",children:"Content type"},void 0,!1,void 0,this),O.jsxDEV("div",{className:"flex flex-wrap gap-2",children:i.map((v)=>O.jsxDEV("button",{type:"button",onClick:()=>u(v.id),className:`rounded-lg border px-4 py-2.5 text-sm font-medium transition-colors ${c===v.id?"border-brand-green bg-surface-muted text-fg":"border-border bg-surface-card text-fg-muted hover:border-fg-subtle hover:text-fg"}`,children:v.name},v.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O.jsxDEV(wn,{label:"Title",value:f,onChange:h},void 0,!1,void 0,this),O.jsxDEV(wn,{label:"Slug",value:m,onChange:b,placeholder:uh(f)},void 0,!1,void 0,this),O.jsxDEV("div",{className:"mt-2 flex justify-end gap-2",children:[O.jsxDEV(we,{variant:"ghost",onPress:t,children:"cancel"},void 0,!1,void 0,this),O.jsxDEV(we,{onPress:y,isDisabled:!c||!f,children:"Create"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Oj(e){if(e==null)return"";if(typeof e==="boolean")return e?"yes":"no";if(Array.isArray(e))return e.length===1?"1 item":`${e.length} items`;if(ch(e)){let t=Bb(e).replace(/\s+/g," ").trim();return t.length>80?t.slice(0,80)+"…":t}if(typeof e==="object")return"—";return String(e)}function Bj({api:e,def:t,onOpen:n,onNew:a,onError:i}){let[l,c]=ue.useState([]),[u,f]=ue.useState(0),[h,m]=ue.useState(!1),[b,y]=ue.useState(!0),v=ue.useCallback((C)=>(y(!0),e.call("collectionList",{collection:t.slug,limit:Dj,offset:C}).then((E)=>{c((R)=>C===0?E:[...R,...E]),m(E.length===Dj),f(C+E.length)}).catch((E)=>i(ut(E))).finally(()=>y(!1))),[e,t.slug,i]);ue.useEffect(()=>{c([]),f(0),m(!1),v(0)},[v]);let S=(C)=>t.fields.find((E)=>E.name===C)?.label??C;return O.jsxDEV(O.Fragment,{children:[O.jsxDEV(Hb,{lead:t.pluralLabel,em:l.length===0?"None yet":l.length===1?`1 ${t.label.toLowerCase()}`:`${l.length}${h?"+":""} ${t.pluralLabel.toLowerCase()}`,children:O.jsxDEV(m2,{text:"Let's",em:`add a ${t.label.toLowerCase()}`,children:O.jsxDEV(we,{className:"shrink-0",onPress:a,children:["+ New ",t.label.toLowerCase()]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),O.jsxDEV("div",{className:fh,children:[O.jsxDEV("div",{className:"flex flex-col gap-2",children:[l.map((C)=>{let E=String(C[t.idField]??""),[R,...D]=t.list;return O.jsxDEV("div",{className:`${Wc} cursor-pointer hover:bg-surface-muted`,onClick:()=>n(E),children:[O.jsxDEV("span",{className:"flex-1 truncate font-medium",children:Oj(C[R??t.titleField])||O.jsxDEV(zb,{children:"untitled"},void 0,!1,void 0,this)},void 0,!1,void 0,this),D.map((U)=>O.jsxDEV("span",{className:"truncate text-fg-subtle",title:S(U),children:Oj(C[U])},U,!1,void 0,this))]},E,!0,void 0,this)}),!b&&l.length===0?O.jsxDEV("p",{className:"text-fg-subtle",children:["No ",t.pluralLabel.toLowerCase()," yet. Create one."]},void 0,!0,void 0,this):null,b?O.jsxDEV("p",{className:"text-fg-subtle",children:"Loading…"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),h&&!b?O.jsxDEV("div",{className:"mt-3.5 text-center",children:O.jsxDEV(we,{variant:"secondary",size:"sm",onPress:()=>void v(u),children:"Load more"},void 0,!1,void 0,this)},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function qse({api:e,def:t,id:n,values:a,onChanged:i,onError:l}){let c=t.supports??[],[u,f]=ue.useState(!1),[h,m]=ue.useState(!1),[b,y]=ue.useState(""),[v,S]=ue.useState(""),[C,E]=ue.useState(null),[R,D]=ue.useState(null),U=typeof a.status==="string"?a.status:"draft",z=U==="published",L=(F)=>typeof a[F]==="string"&&a[F]!==""?a[F]:null,Q=L("scheduledAt"),V=L("unpublishAt"),P=L("publishedAt");if(c.length===0)return null;let re=async(F,Y={})=>{f(!0);try{let Z=await e.call(F,{collection:t.slug,id:n,...Y});if(Z&&typeof Z==="object"&&t.idField in Z)i(Z);else{let de=await e.call("collectionGet",{collection:t.slug,id:n});if(de)i(de)}return!0}catch(Z){return l(ut(Z)),!1}finally{f(!1)}},J=async()=>{let F=b?h2(b):null;if(!F)return l("Pick a publication date and time first.");let Y=v?h2(v):null;if(v&&!Y)return l("That takedown date is not a valid date and time.");if(await re("collectionSchedule",{publishAt:Date.parse(F),unpublishAt:Y?Date.parse(Y):null}))m(!1)},ge=()=>{y(p2(Q??P??new Date().toISOString())),S(V?p2(V):""),m((F)=>!F)},le=async()=>{f(!0);try{let F=await e.call("signCollectionPreview",{collection:t.slug,id:n}),Y=e.resolve(F.url);E(Y),await navigator.clipboard?.writeText(Y).catch(()=>{})}catch(F){l(ut(F))}finally{f(!1)}},se=async()=>{if(R)return D(null);try{D(await e.call("collectionListRevisions",{collection:t.slug,id:n}))}catch(F){l(ut(F))}},I=async(F)=>{if(!confirm("Restore this version? The current content is snapshotted first, so this is itself undoable."))return;if(await re("collectionRestoreRevision",{revisionId:F}))D(null)};return O.jsxDEV("div",{className:"flex flex-col gap-3 rounded-[14px] border border-border bg-surface-card px-[18px] py-4",children:[O.jsxDEV("div",{className:"flex flex-wrap items-center gap-2",children:[O.jsxDEV("span",{className:"text-fg-subtle",children:"Status"},void 0,!1,void 0,this),O.jsxDEV(bl,{status:U,children:U},void 0,!1,void 0,this),P&&z?O.jsxDEV("span",{className:"text-fg-subtle",children:["since ",Fd(P)]},void 0,!0,void 0,this):null,Q?O.jsxDEV("span",{className:"text-accent-strong",children:["publishes ",Fd(Q)]},void 0,!0,void 0,this):null,V?O.jsxDEV("span",{className:"text-danger",children:["comes down ",Fd(V)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this),O.jsxDEV("div",{className:"flex flex-wrap items-center gap-2",children:[c.includes("drafts")&&!z?O.jsxDEV(we,{size:"sm",isDisabled:u,onPress:()=>void re("collectionPublish"),children:"Publish now"},void 0,!1,void 0,this):null,c.includes("drafts")&&z?O.jsxDEV(we,{variant:"secondary",size:"sm",isDisabled:u,onPress:()=>void re("collectionUnpublish"),children:"Unpublish"},void 0,!1,void 0,this):null,c.includes("scheduling")?O.jsxDEV(we,{variant:"secondary",size:"sm",isDisabled:u,onPress:ge,children:Q?"Change schedule":"Schedule…"},void 0,!1,void 0,this):null,c.includes("preview")?O.jsxDEV(we,{variant:"ghost",size:"sm",isDisabled:u,onPress:()=>void le(),children:"Preview link"},void 0,!1,void 0,this):null,c.includes("revisions")?O.jsxDEV(we,{variant:"ghost",size:"sm",isDisabled:u,onPress:()=>void se(),children:R?"Hide history":"History"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),h?O.jsxDEV("div",{className:"flex flex-col gap-2 border-t border-border pt-3",children:[O.jsxDEV("label",{className:"flex flex-col gap-1 text-sm",children:[O.jsxDEV("span",{className:"font-medium text-fg",children:"Publish at"},void 0,!1,void 0,this),O.jsxDEV("input",{className:ls,type:"datetime-local",value:b,onChange:(F)=>y(F.target.value)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O.jsxDEV("label",{className:"flex flex-col gap-1 text-sm",children:[O.jsxDEV("span",{className:"font-medium text-fg",children:"Take down at (optional)"},void 0,!1,void 0,this),O.jsxDEV("input",{className:ls,type:"datetime-local",value:v,onChange:(F)=>S(F.target.value)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O.jsxDEV("p",{className:"text-fg-subtle",children:"Scheduling does not take a live row down — it publishes at the first instant. A takedown must be after the publication time. Leave it empty to cancel one."},void 0,!1,void 0,this),O.jsxDEV("div",{className:"flex gap-2",children:[O.jsxDEV(we,{size:"sm",isDisabled:u,onPress:()=>void J(),children:"Save schedule"},void 0,!1,void 0,this),O.jsxDEV(we,{variant:"ghost",size:"sm",onPress:()=>m(!1),children:"Cancel"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):null,C?O.jsxDEV("div",{className:"border-t border-border pt-3 text-sm",children:[O.jsxDEV("span",{className:"text-fg-subtle",children:"Preview link (copied): "},void 0,!1,void 0,this),O.jsxDEV("a",{className:"break-all underline",href:C,target:"_blank",rel:"noreferrer",children:C},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,R?O.jsxDEV("div",{className:"flex flex-col gap-2 border-t border-border pt-3",children:[R.map((F)=>O.jsxDEV("div",{className:`${Wc} text-xs`,children:[O.jsxDEV("span",{className:"rounded-full bg-surface-muted px-2 py-0.5 font-mono text-xs text-fg-muted",children:["#",F.revision]},void 0,!0,void 0,this),O.jsxDEV("span",{className:"flex-1 truncate text-fg-subtle",children:[F.note??"edit"," · ",F.actor??"system"," · ",Fd(F.createdAt)]},void 0,!0,void 0,this),O.jsxDEV(we,{variant:"ghost",size:"sm",isDisabled:u,onPress:()=>void I(F.id),children:"Restore"},void 0,!1,void 0,this)]},F.id,!0,void 0,this)),R.length===0?O.jsxDEV("p",{className:"text-fg-subtle",children:"No history yet."},void 0,!1,void 0,this):null]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)}function zj({api:e,def:t,id:n,onSaved:a,onDeleted:i,onBack:l,onError:c}){let u=n===null,[f,h]=ue.useState({}),[m,b]=ue.useState(!u),[y,v]=ue.useState(!1),[S,C]=ue.useState(!1),[E,R]=ue.useState(!1);ue.useEffect(()=>{if(u){h({});return}let z=!0;return b(!0),v(!1),e.call("collectionGet",{collection:t.slug,id:n}).then((L)=>{if(!z)return;if(L)h(L);else v(!0)}).catch((L)=>c(ut(L))).finally(()=>{if(z)b(!1)}),()=>{z=!1}},[e,t.slug,n,u,c]);let D=async()=>{C(!0);try{if(u)await e.call("collectionCreate",{collection:t.slug,values:f}),a();else{let z=await e.call("collectionUpdate",{collection:t.slug,id:n,values:f});if(z)h(z);R(!0),setTimeout(()=>R(!1),1200)}}catch(z){c(ut(z))}finally{C(!1)}},U=async()=>{if(u||!confirm(`Delete this ${t.label.toLowerCase()}? This cannot be undone.`))return;C(!0);try{await e.call("collectionDelete",{collection:t.slug,id:n}),i()}catch(z){c(ut(z))}finally{C(!1)}};return O.jsxDEV("div",{className:fh,children:[O.jsxDEV("div",{className:"mb-4 mt-2 flex items-center gap-3",children:[O.jsxDEV(we,{variant:"ghost",size:"sm",onPress:l,children:["← ",t.pluralLabel]},void 0,!0,void 0,this),O.jsxDEV("h1",{className:"text-[22px] font-normal text-fg",children:u?`New ${t.label.toLowerCase()}`:`Edit ${t.label.toLowerCase()}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),y?O.jsxDEV("p",{className:"text-fg-subtle",children:"Not found."},void 0,!1,void 0,this):m?O.jsxDEV("p",{className:"text-fg-subtle",children:"Loading…"},void 0,!1,void 0,this):O.jsxDEV("div",{className:"flex max-w-[720px] flex-col gap-4",children:[E?O.jsxDEV(ph,{ok:!0,children:"saved"},void 0,!1,void 0,this):null,!u&&n?O.jsxDEV(qse,{api:e,def:t,id:n,values:f,onChanged:h,onError:c},void 0,!1,void 0,this):null,O.jsxDEV(dh,{schema:t.fields,value:f,onChange:h,api:e},void 0,!1,void 0,this),O.jsxDEV("div",{className:"mt-2 flex items-center gap-2",children:[O.jsxDEV(we,{onPress:D,isDisabled:S,children:S?"Saving…":u?"Create":"Save"},void 0,!1,void 0,this),!u?O.jsxDEV(we,{variant:"ghost",className:"text-danger",onPress:U,isDisabled:S,children:"Delete"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Hj({api:e,page:t,blockTypes:n,tab:a,onTab:i,onBack:l,onChange:c,registerGuard:u}){let[f,h]=ue.useState(null),[m,b]=ue.useState(null),[y,v]=ue.useState(""),S=ue.useRef(new Set),[C,E]=ue.useState(0),R=ue.useCallback((K,k)=>{let X=S.current;if(k?X.has(K):!X.has(K))return;if(k)X.add(K);else X.delete(K);E(X.size)},[]),D=ue.useCallback(()=>S.current.size===0||window.confirm(`You have ${S.current.size} unsaved change${S.current.size===1?"":"s"}. Leave without saving?`),[]);ue.useEffect(()=>(u(D),()=>u(null)),[u,D]);let U=ue.useMemo(()=>new Map(n.map((K)=>[K.slug,K])),[n]),z=ue.useCallback(async()=>{try{let[K,k]=await Promise.all([e.getContentType(t.typeId),e.getPagePreview(t.slug,t.locale)]);h(K??null),b(k)}catch(K){v(ut(K))}},[e,t.typeId,t.slug,t.locale]);ue.useEffect(()=>{z()},[z]),ue.useEffect(()=>{if(C===0)return;let K=(k)=>{k.preventDefault(),k.returnValue=""};return window.addEventListener("beforeunload",K),()=>window.removeEventListener("beforeunload",K)},[C]);let L=f?.regions??[],Q=f?.fieldsSchema??[],V=(K,k)=>b((X)=>X?{...X,regions:{...X.regions,[K]:k(X.regions[K]??[])}}:X),P=async(K,k,X)=>{let ve=`tmp:${crypto.randomUUID()}`,$e=(m?.regions[K]??[]).map((Fe)=>Fe.id),Ae=X!=null&&X>=0&&X<$e.length?X:$e.length;V(K,(Fe)=>{let Te=[...Fe];return Te.splice(Ae,0,{id:ve,block_id:ve,block_type:k,title:null,fields:{},is_shared:!1,pending:!0}),Te});try{let{block:Fe,placement:Te}=await e.call("addBlock",{pageId:t.id,blockTypeSlug:k,region:K,fields:{}}),Ze={id:String(Te.id),block_id:String(Fe.id),block_type:k,title:Fe.title??null,fields:Fe.fields??{},is_shared:Boolean(Te.isShared)};if(V(K,(pe)=>pe.map((Oe)=>Oe.id===ve?Ze:Oe)),Ae<$e.length){let pe=[...$e];pe.splice(Ae,0,Ze.id),await J(K,pe)}}catch(Fe){V(K,(Te)=>Te.filter((Ze)=>Ze.id!==ve)),v(ut(Fe))}},re=async(K)=>{try{await e.call("removeBlock",{pageBlockId:K.id}),await z()}catch(k){v(ut(k))}},J=async(K,k)=>{try{await e.call("reorderRegion",{pageId:t.id,region:K,order:k}),await z()}catch(X){v(ut(X))}},ge=ue.useCallback((K,k)=>{b((X)=>{if(!X)return X;let ve={};for(let[$e,Ae]of Object.entries(X.regions))ve[$e]=Ae.map((Fe)=>Fe.id===K?{...Fe,fields:k}:Fe);return{...X,regions:ve}})},[]),[le,se]=ue.useState(null),I=(K,k)=>se({region:K,from:k,over:k}),F=(K,k)=>se((X)=>X&&X.region===K&&X.over!==k?{...X,over:k}:X),Y=()=>se(null),Z=(K)=>{if(se(null),!le||le.region!==K||le.from===le.over)return;let k=(m?.regions[K]??[]).map((ve)=>ve.id),[X]=k.splice(le.from,1);k.splice(le.over,0,X),J(K,k)},de=C>0?O.jsxDEV("span",{className:"text-[11px] text-accent-strong",children:["● ",C," unsaved change",C===1?"":"s"]},void 0,!0,void 0,this):null;return O.jsxDEV("div",{className:`grid min-h-[calc(100vh-68px)] gap-5 px-7 pb-7 pt-2 max-[820px]:grid-cols-1 ${L.length?"grid-cols-[260px_1fr_400px]":"grid-cols-[1fr_400px]"}`,children:[L.length===0?null:O.jsxDEV("div",{className:"overflow-auto rounded-panel bg-surface-muted p-[18px]",children:[O.jsxDEV(we,{variant:"ghost",size:"sm",onPress:()=>{if(D())l()},children:"← all pages"},void 0,!1,void 0,this),de?O.jsxDEV("p",{className:"mt-2",children:de},void 0,!1,void 0,this):null,O.jsxDEV(gl,{children:"Regions"},void 0,!1,void 0,this),L.map((K)=>O.jsxDEV("div",{className:`${Wc} mb-2`,children:[O.jsxDEV("span",{className:"flex-1 truncate font-medium",children:K.label??K.name},void 0,!1,void 0,this),O.jsxDEV("span",{className:"text-fg-subtle",children:(m?.regions[K.name]??[]).length},void 0,!1,void 0,this)]},K.name,!0,void 0,this)),O.jsxDEV(gl,{children:"Status"},void 0,!1,void 0,this),O.jsxDEV("div",{className:Wc,children:[O.jsxDEV("span",{className:"flex-1 truncate font-medium",children:t.title},void 0,!1,void 0,this),O.jsxDEV(bl,{status:t.status,children:t.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),O.jsxDEV("div",{className:"overflow-auto py-1.5 pl-8 pr-2",children:[y?O.jsxDEV(ph,{children:y},void 0,!1,void 0,this):null,L.length===0?O.jsxDEV("div",{className:"mb-2 flex items-center gap-2",children:[O.jsxDEV(we,{variant:"ghost",size:"sm",onPress:()=>{if(D())l()},children:"← all pages"},void 0,!1,void 0,this),O.jsxDEV(bl,{status:t.status,children:t.status},void 0,!1,void 0,this),de]},void 0,!0,void 0,this):null,Q.length?O.jsxDEV(Yse,{api:e,page:t,schema:Q,initialFields:m?.page.fields??{},onDirtyChange:R,onError:v},void 0,!1,void 0,this):null,L.map((K)=>{let k=m?.regions[K.name]??[],X=K.allowedTypes&&K.allowedTypes.length?K.allowedTypes:n.map((ve)=>ve.slug);return O.jsxDEV("div",{className:"mb-10",children:[O.jsxDEV("div",{className:"mb-1 text-caption font-medium uppercase tracking-wide text-fg-subtle",children:K.label??K.name},void 0,!1,void 0,this),k.map((ve,$e)=>O.jsxDEV("div",{children:[O.jsxDEV(Pj,{compact:!0,allowed:X,btBySlug:U,onAdd:(Ae)=>P(K.name,Ae,$e)},void 0,!1,void 0,this),O.jsxDEV(Gse,{api:e,block:ve,blockType:U.get(ve.block_type),isFirst:$e===0,isLast:$e===k.length-1,onMove:(Ae)=>ule(k,K.name,$e,Ae,J),onRemove:()=>re(ve),onPatch:ge,onDirtyChange:R,onError:v,dragging:le?.region===K.name&&le.from===$e,isOver:!!le&&le.region===K.name&&le.over===$e&&le.from!==$e,onDragStartBlock:()=>I(K.name,$e),onDragOverBlock:()=>F(K.name,$e),onDropBlock:()=>Z(K.name),onDragEndBlock:Y},void 0,!1,void 0,this)]},ve.id,!0,void 0,this)),O.jsxDEV("div",{className:"mt-1",children:O.jsxDEV(Pj,{allowed:X,btBySlug:U,onAdd:(ve)=>P(K.name,ve)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},K.name,!0,void 0,this)}),L.length===0&&Q.length===0?O.jsxDEV("p",{className:"text-fg-subtle",children:"This page's content type defines no fields or regions."},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),O.jsxDEV("div",{className:"overflow-auto rounded-panel border border-border bg-surface-card p-5",children:[O.jsxDEV("div",{className:"mb-3 flex gap-1",children:qk.map((K)=>O.jsxDEV(we,{variant:"ghost",size:"sm",className:a===K?"bg-surface-muted text-fg":"text-fg-muted",onPress:()=>i(K),children:K},K,!1,void 0,this))},void 0,!1,void 0,this),a==="settings"?O.jsxDEV(Wse,{api:e,page:t,onSaved:c,onError:v},void 0,!1,void 0,this):null,a==="seo"?O.jsxDEV(Jse,{api:e,page:t,onError:v},void 0,!1,void 0,this):null,a==="workflow"?O.jsxDEV(Xse,{api:e,page:t,onChanged:(K)=>{c(K)},onError:v},void 0,!1,void 0,this):null,a==="i18n"?O.jsxDEV(Qse,{api:e,page:t,onError:v},void 0,!1,void 0,this):null,a==="audit"?O.jsxDEV(Zse,{api:e,pageId:t.id,onError:v},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Gse({api:e,block:t,blockType:n,isFirst:a,isLast:i,onMove:l,onRemove:c,onPatch:u,onDirtyChange:f,onError:h,dragging:m,isOver:b,onDragStartBlock:y,onDragOverBlock:v,onDropBlock:S,onDragEndBlock:C}){let[E,R]=ue.useState(null),[D,U]=ue.useState(!1),[z,L]=ue.useState("idle"),Q=ue.useRef(""),V=ue.useRef(null),P=t.block_id,re=t.id;ue.useEffect(()=>{if(t.pending){R({}),Q.current="{}";return}let Y=!0;return e.call("getBlock",{blockId:P}).then((Z)=>{if(!Y)return;let de=Z?.fields??{};R(de),Q.current=JSON.stringify(de)}).catch((Z)=>h(ut(Z))),()=>{Y=!1}},[e,P,h,t.pending]);let J=E!=null&&JSON.stringify(E)!==Q.current,ge=ue.useCallback(async()=>{if(t.pending||E==null)return;let Y=JSON.stringify(E);if(Y===Q.current)return;L("saving");try{await e.call("updateBlock",{blockId:P,fields:E}),Q.current=Y,u(re,E),L("saved"),setTimeout(()=>L((Z)=>Z==="saved"?"idle":Z),1500)}catch(Z){h(ut(Z)),L("idle")}},[e,P,re,E,u,h,t.pending]),le=ue.useRef(ge);le.current=ge,ue.useEffect(()=>{if(E==null||t.pending)return;if(JSON.stringify(E)===Q.current)return;let Y=setTimeout(()=>void le.current(),800);return()=>clearTimeout(Y)},[E,t.pending]);let se=(Y)=>R(Y);ue.useEffect(()=>{f(re,J)},[J,re,f]),ue.useEffect(()=>()=>{f(re,!1)},[re,f]);let I=n?.fieldsSchema??[],F=n?.name??t.block_type;return O.jsxDEV("div",{ref:V,className:`group relative rounded-lg px-2 py-1 transition-colors ${b?"ring-2 ring-brand-green":""} ${m?"opacity-40":""} ${t.pending?"pointer-events-none opacity-60":""}`,onDragOver:(Y)=>{Y.preventDefault(),v()},onDrop:(Y)=>{Y.preventDefault(),S()},children:[O.jsxDEV("span",{draggable:!0,onDragStart:(Y)=>{if(V.current)Y.dataTransfer.setDragImage(V.current,12,12);Y.dataTransfer.effectAllowed="move",Y.dataTransfer.setData("text/plain",""),y()},onDragEnd:C,className:"absolute -left-6 top-1.5 cursor-grab select-none px-1 text-fg-subtle opacity-0 transition-opacity hover:text-fg group-hover:opacity-100 active:cursor-grabbing",title:"Drag to reorder",children:"⠿"},void 0,!1,void 0,this),O.jsxDEV("div",{className:"flex items-center gap-2 opacity-60 transition-opacity group-hover:opacity-100",children:[O.jsxDEV("button",{type:"button",className:"w-4 shrink-0 text-fg-subtle hover:text-fg",title:D?"Expand":"Collapse",onClick:()=>U((Y)=>!Y),children:D?"▸":"▾"},void 0,!1,void 0,this),O.jsxDEV("span",{className:"text-caption font-medium uppercase tracking-wide text-fg-subtle",children:F},void 0,!1,void 0,this),t.is_shared?O.jsxDEV("span",{className:"text-caption text-accent-strong",children:"shared"},void 0,!1,void 0,this):null,O.jsxDEV("span",{className:`text-caption ${J&&z!=="saving"?"text-accent-strong":"text-fg-subtle"}`,children:z==="saving"?"saving…":z==="saved"?"saved ✓":J?"● unsaved":""},void 0,!1,void 0,this),O.jsxDEV("span",{className:"flex-1"},void 0,!1,void 0,this),O.jsxDEV(we,{variant:"ghost",size:"sm",isDisabled:a,onPress:()=>l(-1),children:"↑"},void 0,!1,void 0,this),O.jsxDEV(we,{variant:"ghost",size:"sm",isDisabled:i,onPress:()=>l(1),children:"↓"},void 0,!1,void 0,this),O.jsxDEV(we,{variant:"ghost",size:"sm",className:"text-danger",onPress:c,children:"✕"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),D?O.jsxDEV("div",{className:"cursor-pointer truncate pb-1 pl-6 text-small text-fg-subtle",onClick:()=>U(!1),children:E==null?"…":cle(E)||O.jsxDEV("span",{className:"italic",children:"empty"},void 0,!1,void 0,this)},void 0,!1,void 0,this):O.jsxDEV("div",{className:"pb-1 pl-6",children:E==null?O.jsxDEV("p",{className:"text-small text-fg-subtle",children:"loading…"},void 0,!1,void 0,this):I.length===0?O.jsxDEV("p",{className:"text-small text-fg-subtle",children:"This block has no editable fields."},void 0,!1,void 0,this):O.jsxDEV(O.Fragment,{children:[O.jsxDEV(dh,{schema:I,value:E,onChange:se,api:e},void 0,!1,void 0,this),J||z==="saving"?O.jsxDEV("div",{className:"mt-2 flex items-center gap-2",children:[O.jsxDEV(we,{variant:"secondary",size:"sm",onPress:()=>void ge(),isDisabled:!J||z==="saving"||t.pending,children:z==="saving"?"Saving…":"Save now"},void 0,!1,void 0,this),O.jsxDEV("span",{className:"text-caption text-fg-subtle",children:z==="saving"?"":"Autosaving…"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Pj({allowed:e,btBySlug:t,onAdd:n,compact:a}){let[i,l]=ue.useState(!1),[c,u]=ue.useState(""),[f,h]=ue.useState(0),m=ue.useRef(null),b=ue.useMemo(()=>{let S=e.map((E)=>({slug:E,name:t.get(E)?.name??E})),C=c.trim().toLowerCase();return C?S.filter((E)=>E.name.toLowerCase().includes(C)||E.slug.toLowerCase().includes(C)):S},[e,t,c]);ue.useEffect(()=>{if(i)m.current?.focus()},[i]),ue.useEffect(()=>{h(0)},[c]);let y=()=>{l(!1),u("")},v=(S)=>{if(S)n(S);y()};if(!i){if(a)return O.jsxDEV("button",{type:"button",onClick:()=>l(!0),"aria-label":"Insert block here",className:"group/ins flex h-3 w-full items-center justify-center opacity-0 transition-opacity hover:opacity-100",children:O.jsxDEV("span",{className:"flex h-full w-full items-center",children:[O.jsxDEV("span",{className:"h-px flex-1 bg-brand-green/40"},void 0,!1,void 0,this),O.jsxDEV("span",{className:"mx-1 rounded bg-brand-green/15 px-1 text-caption leading-none text-brand-green",children:"+"},void 0,!1,void 0,this),O.jsxDEV("span",{className:"h-px flex-1 bg-brand-green/40"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);return O.jsxDEV("button",{type:"button",onClick:()=>l(!0),className:"flex w-full items-center gap-2 rounded-lg px-1 py-1.5 text-left text-small text-fg-subtle opacity-70 transition-colors hover:bg-surface-muted hover:text-fg-muted hover:opacity-100",children:[O.jsxDEV("span",{className:"text-base leading-none",children:"+"},void 0,!1,void 0,this),O.jsxDEV("span",{children:"Add block"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}return O.jsxDEV("div",{className:"rounded-lg border border-border bg-surface-card p-1 shadow-md",children:[O.jsxDEV("input",{ref:m,value:c,placeholder:"Filter blocks…",spellCheck:!1,className:"mb-1 w-full rounded-md bg-surface px-2.5 py-1.5 text-small text-fg outline-none placeholder:text-fg-subtle",onChange:(S)=>u(S.target.value),onBlur:()=>setTimeout(y,120),onKeyDown:(S)=>{if(S.key==="Escape")y();else if(S.key==="ArrowDown")S.preventDefault(),h((C)=>(C+1)%Math.max(b.length,1));else if(S.key==="ArrowUp")S.preventDefault(),h((C)=>(C-1+Math.max(b.length,1))%Math.max(b.length,1));else if(S.key==="Enter")S.preventDefault(),v(b[f]?.slug)}},void 0,!1,void 0,this),O.jsxDEV("div",{className:"max-h-64 overflow-auto",children:b.length===0?O.jsxDEV("div",{className:"px-2.5 py-2 text-small text-fg-subtle",children:"No matching block types"},void 0,!1,void 0,this):b.map((S,C)=>O.jsxDEV("button",{type:"button",onMouseEnter:()=>h(C),onMouseDown:(E)=>E.preventDefault(),onClick:()=>v(S.slug),className:`flex w-full items-center rounded-md px-2.5 py-1.5 text-left text-small ${C===f?"bg-surface-muted text-fg":"text-fg-muted hover:bg-surface-muted"}`,children:S.name},S.slug,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Wse({api:e,page:t,onSaved:n,onError:a}){let[i,l]=ue.useState(t.title),[c,u]=ue.useState(t.slug),[f,h]=ue.useState(t.locale),[m,b]=ue.useState(!1),[y,v]=ue.useState(!1);return ue.useEffect(()=>{l(t.title),u(t.slug),h(t.locale)},[t.id,t.title,t.slug,t.locale]),O.jsxDEV("div",{className:"flex flex-col gap-4",children:[O.jsxDEV(gl,{children:"Page"},void 0,!1,void 0,this),m?O.jsxDEV(ph,{ok:!0,children:"saved"},void 0,!1,void 0,this):null,O.jsxDEV(wn,{label:"Title",value:i,onChange:l},void 0,!1,void 0,this),O.jsxDEV(wn,{label:"Slug",value:c,onChange:u},void 0,!1,void 0,this),O.jsxDEV(wn,{label:"Locale",value:f,onChange:h},void 0,!1,void 0,this),O.jsxDEV(we,{onPress:async()=>{v(!0);try{let C=await e.call("updatePage",{pageId:t.id,title:i,slug:c,locale:f});if(C?.page)n(C.page);b(!0),setTimeout(()=>b(!1),1500)}catch(C){a(ut(C))}finally{v(!1)}},isDisabled:y||!i.trim()||!c.trim(),children:y?"Saving…":"Save"},void 0,!1,void 0,this),O.jsxDEV(g2,{children:[O.jsxDEV("span",{children:"Status"},void 0,!1,void 0,this),O.jsxDEV("span",{children:t.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Yse({api:e,page:t,schema:n,initialFields:a,onDirtyChange:i,onError:l}){let[c,u]=ue.useState(a),[f,h]=ue.useState(!1),[m,b]=ue.useState(!1),y=ue.useRef(JSON.stringify(a)),v=JSON.stringify(c)!==y.current,S=ue.useRef(t.id);return ue.useEffect(()=>{if(S.current===t.id)return;S.current=t.id,u(a),y.current=JSON.stringify(a)},[t.id,a]),ue.useEffect(()=>{i("page",v)},[v,i]),ue.useEffect(()=>()=>{i("page",!1)},[i]),O.jsxDEV("div",{className:"mb-10",children:[O.jsxDEV("div",{className:"mb-1 flex items-center gap-2",children:[O.jsxDEV("span",{className:"text-caption font-medium uppercase tracking-wide text-fg-subtle",children:"Content"},void 0,!1,void 0,this),v?O.jsxDEV("span",{className:"text-[11px] text-accent-strong",children:"● unsaved"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),f?O.jsxDEV(ph,{ok:!0,children:"saved"},void 0,!1,void 0,this):null,O.jsxDEV(dh,{schema:n,value:c,onChange:u,api:e},void 0,!1,void 0,this),O.jsxDEV("div",{className:"mt-3",children:O.jsxDEV(we,{onPress:async()=>{let E=JSON.stringify(c);b(!0);try{await e.call("updatePage",{pageId:t.id,fields:c}),y.current=E,h(!0),setTimeout(()=>h(!1),1500)}catch(R){l(ut(R))}finally{b(!1)}},isDisabled:m,children:m?"Saving…":"Save"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Jse({api:e,page:t,onError:n}){let[a,i]=ue.useState({metaTitle:t.metaTitle??"",metaDescription:t.metaDescription??"",canonicalUrl:t.canonicalUrl??"",robots:t.robots??"",ogTitle:t.ogTitle??"",ogDescription:t.ogDescription??""}),[l,c]=ue.useState(!1),u=async()=>{try{await e.call("updatePageSeo",{pageId:t.id,...a}),c(!0),setTimeout(()=>c(!1),1500)}catch(h){n(ut(h))}},f=(h,m,b=!1)=>b?O.jsxDEV(Hx,{label:m,value:a[h],onChange:(y)=>i({...a,[h]:y})},void 0,!1,void 0,this):O.jsxDEV(wn,{label:m,value:a[h],onChange:(y)=>i({...a,[h]:y})},void 0,!1,void 0,this);return O.jsxDEV("div",{className:"flex flex-col gap-4",children:[O.jsxDEV(gl,{children:"SEO"},void 0,!1,void 0,this),l?O.jsxDEV(ph,{ok:!0,children:"saved"},void 0,!1,void 0,this):null,f("metaTitle","Meta title"),f("metaDescription","Meta description",!0),f("canonicalUrl","Canonical URL"),f("robots","Robots (e.g. noindex)"),f("ogTitle","OG title"),f("ogDescription","OG description",!0),O.jsxDEV(we,{className:"w-full",onPress:u,children:"Save SEO"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Xse({api:e,page:t,onChanged:n,onError:a}){let i=async(u,f)=>{try{let h=await e.call(u,{pageId:t.id,...f});if(h?.page)n(h.page)}catch(h){a(ut(h))}},l=String(t.status),c=l==="review"?[{label:"Approve (publish)",action:"approve"},{label:"Reject",action:"reject",variant:"secondary"},{label:"Publish directly",action:"publishPage",variant:"secondary"}]:l==="published"?[{label:"Unpublish",action:"unpublishPage",variant:"secondary"}]:[{label:"Publish",action:"publishPage"},{label:"Submit for review",action:"submitForReview",variant:"secondary"}];return O.jsxDEV("div",{children:[O.jsxDEV(gl,{children:"Workflow"},void 0,!1,void 0,this),O.jsxDEV("div",{className:"mb-3 flex items-center gap-2 text-[13px] text-fg-muted",children:[O.jsxDEV("span",{className:"text-fg-subtle",children:"Status"},void 0,!1,void 0,this),O.jsxDEV(bl,{status:t.status,children:t.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O.jsxDEV("div",{className:"flex flex-col gap-2",children:c.map((u)=>O.jsxDEV(we,{variant:u.variant,onPress:()=>i(u.action),children:u.label},u.action,!1,void 0,this))},void 0,!1,void 0,this),O.jsxDEV("p",{className:"mt-2.5 text-fg-subtle",children:"Publish needs a reviewer/admin role; submit-for-review is editor-gated."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Qse({api:e,page:t,onError:n}){let[a,i]=ue.useState([]),[l,c]=ue.useState(""),u=ue.useCallback(()=>e.call("listTranslations",{pageId:t.id}).then(i).catch((h)=>n(ut(h))),[e,t.id,n]);ue.useEffect(()=>{u()},[u]);let f=async()=>{try{await e.call("createTranslation",{pageId:t.id,locale:l}),c(""),u()}catch(h){n(ut(h))}};return O.jsxDEV("div",{children:[O.jsxDEV(gl,{children:"Translations"},void 0,!1,void 0,this),O.jsxDEV("div",{className:"flex flex-col gap-2",children:a.map((h)=>O.jsxDEV("div",{className:Wc,children:[O.jsxDEV("span",{className:"flex-1 truncate font-medium",children:h.locale},void 0,!1,void 0,this),O.jsxDEV("span",{className:"text-fg-subtle",children:["/",h.slug]},void 0,!0,void 0,this),O.jsxDEV(bl,{status:h.status,children:h.status},void 0,!1,void 0,this)]},h.id,!0,void 0,this))},void 0,!1,void 0,this),O.jsxDEV("div",{className:"mt-2 flex items-end gap-1.5",children:[O.jsxDEV(wn,{label:"",value:l,onChange:c,placeholder:"locale (e.g. cs)"},void 0,!1,void 0,this),O.jsxDEV(we,{variant:"secondary",onPress:f,isDisabled:!l,children:"add"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Zse({api:e,pageId:t,onError:n}){let[a,i]=ue.useState([]);return ue.useEffect(()=>{e.listPageAudit(t).then(i).catch((l)=>n(ut(l)))},[e,t,n]),O.jsxDEV("div",{children:[O.jsxDEV(gl,{children:"Audit trail"},void 0,!1,void 0,this),O.jsxDEV("div",{className:"flex flex-col gap-2",children:[a.map((l)=>O.jsxDEV("div",{className:`${Wc} text-xs`,children:[O.jsxDEV("span",{className:"rounded-full bg-surface-muted px-2 py-0.5 font-mono text-xs text-fg-muted",children:l.action},void 0,!1,void 0,this),O.jsxDEV("span",{className:"flex-1 truncate text-fg-subtle",children:[l.fromStatus," → ",l.toStatus]},void 0,!0,void 0,this),O.jsxDEV("span",{className:"text-fg-subtle",children:l.actor??"system"},void 0,!1,void 0,this)]},l.id,!0,void 0,this)),a.length===0?O.jsxDEV("p",{className:"text-fg-subtle",children:"No history yet."},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Fj({api:e,onError:t}){let[n,a]=ue.useState([]),[i,l]=ue.useState(0),[c,u]=ue.useState(!1),[f,h]=ue.useState(null),[m,b]=ue.useState(!1),[y,v]=ue.useState([]),[S,C]=ue.useState(!1),E=ue.useCallback((L)=>{e.listMedia(Lj,L).then((Q)=>{a((V)=>L===0?Q:[...V,...Q]),u(Q.length===Lj),l(L+Q.length)}).catch((Q)=>t(ut(Q)))},[e,t]),R=ue.useCallback(()=>{e.listTrash().then((L)=>v(L.media??[])).catch((L)=>t(ut(L)))},[e,t]);ue.useEffect(()=>{E(0)},[E]),ue.useEffect(()=>{R()},[R]);let D=async(L)=>{try{await e.restoreMedia(L),R(),E(0)}catch(Q){t(ut(Q))}},U=async(L)=>{if(!confirm("Delete this file permanently? The file itself is removed and cannot be recovered."))return;try{await e.purgeMedia(L),R()}catch(Q){t(ut(Q))}},z=async(L)=>{if(!L?.length)return;b(!0),t("");try{for(let Q of Array.from(L))await e.uploadMedia(Q);E(0)}catch(Q){t(ut(Q))}finally{b(!1)}};return O.jsxDEV(O.Fragment,{children:[O.jsxDEV(Hb,{lead:"Media",em:n.length===0?"None yet":n.length===1?"1 file":`${n.length}${c?"+":""} files`,children:O.jsxDEV(m2,{text:"Let's",em:"upload something",children:O.jsxDEV("label",{className:`inline-flex shrink-0 cursor-pointer items-center rounded-full bg-surface-inverted px-6 py-3 text-compact text-fg-inverted ${m?"pointer-events-none opacity-50":""}`,children:[m?"Uploading…":"+ Upload",O.jsxDEV("input",{type:"file",multiple:!0,hidden:!0,disabled:m,onChange:(L)=>{z(L.target.files),L.target.value=""}},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),O.jsxDEV("div",{className:fh,children:[n.length===0?O.jsxDEV("p",{className:"text-fg-subtle",children:"No media yet. Upload images to use them in blocks and SEO."},void 0,!1,void 0,this):O.jsxDEV("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(180px,1fr))] gap-2.5",children:n.map((L)=>O.jsxDEV("div",{className:`cursor-pointer overflow-hidden rounded-lg border bg-surface-card ${f?.id===L.id?"border-fg":"border-border"}`,onClick:()=>h(L),children:[jj(L)?O.jsxDEV("img",{className:"block h-[130px] w-full object-cover",src:e.resolve(`/media/${L.file.key}`),alt:L.alt??""},void 0,!1,void 0,this):O.jsxDEV("div",{className:"flex h-[130px] items-center justify-center bg-surface-muted font-mono text-xs text-fg-subtle",children:Kj(L)},void 0,!1,void 0,this),O.jsxDEV("div",{className:"truncate px-2 py-1.5 text-[11px] text-fg-muted",children:L.file.filename??L.id},void 0,!1,void 0,this)]},L.id,!0,void 0,this))},void 0,!1,void 0,this),c?O.jsxDEV("div",{className:"mt-3.5 text-center",children:O.jsxDEV(we,{variant:"secondary",size:"sm",onPress:()=>E(i),children:"Load more"},void 0,!1,void 0,this)},void 0,!1,void 0,this):null,y.length>0?O.jsxDEV("div",{className:"mt-6 border-t border-border pt-4",children:[O.jsxDEV("button",{type:"button",className:"text-small text-fg-muted underline",onClick:()=>C((L)=>!L),children:[S?"Hide":"Show"," trash (",y.length,")"]},void 0,!0,void 0,this),S?O.jsxDEV(O.Fragment,{children:[O.jsxDEV("p",{className:"mt-2 text-small text-fg-subtle",children:"Trashed files are hidden from the library but the file itself still exists — a page published while it was in use keeps showing it. Delete permanently to remove the file."},void 0,!1,void 0,this),O.jsxDEV("div",{className:"mt-2.5 flex flex-col gap-1.5",children:y.map((L)=>O.jsxDEV("div",{className:"flex items-center gap-2.5 rounded-lg border border-border bg-surface-muted px-3 py-2",children:[O.jsxDEV("span",{className:"flex-1 truncate text-small text-fg-muted",children:L.file?.filename??L.id},void 0,!1,void 0,this),O.jsxDEV(we,{variant:"secondary",size:"sm",onPress:()=>D(L.id),children:"Restore"},void 0,!1,void 0,this),O.jsxDEV(we,{variant:"secondary",size:"sm",onPress:()=>U(L.id),children:"Delete permanently"},void 0,!1,void 0,this)]},L.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this):null,f?O.jsxDEV(ele,{api:e,media:f,onClose:()=>h(null),onSaved:(L)=>{h(L),a((Q)=>Q.map((V)=>V.id===L.id?L:V))},onDeleted:(L)=>{h(null),a((Q)=>Q.filter((V)=>V.id!==L)),R()},onError:t},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function ele({api:e,media:t,onClose:n,onSaved:a,onDeleted:i,onError:l}){let[c,u]=ue.useState(t.alt??""),[f,h]=ue.useState(!1);ue.useEffect(()=>u(t.alt??""),[t]);let m=e.resolve(`/media/${t.file.key}`),b=async()=>{h(!0);try{a(await e.updateMedia(t.id,c||null))}catch(v){l(ut(v))}finally{h(!1)}},y=async()=>{if(!confirm("Move this file to the trash? It disappears from the library, but a page published while it was in use keeps showing it — delete it permanently from the trash to remove the file itself."))return;h(!0);try{await e.deleteMedia(t.id),i(t.id)}catch(v){l(ut(v))}finally{h(!1)}};return O.jsxDEV(Gk,{onClose:n,wide:!0,children:[O.jsxDEV(Wk,{children:[O.jsxDEV(zb,{children:"Media"},void 0,!1,void 0,this)," ",t.file.filename??""]},void 0,!0,void 0,this),jj(t)?O.jsxDEV("img",{className:"mx-auto mb-3.5 block max-h-[340px] max-w-full rounded-lg bg-surface-muted object-contain",src:m,alt:t.alt??""},void 0,!1,void 0,this):O.jsxDEV("div",{className:"mb-3.5 flex h-[200px] items-center justify-center rounded-lg bg-surface-muted font-mono text-fg-subtle",children:Kj(t)},void 0,!1,void 0,this),O.jsxDEV("div",{className:"mb-4",children:O.jsxDEV(wn,{label:"Alt text (for accessibility & SEO)",value:c,onChange:u,placeholder:"Describe the image…"},void 0,!1,void 0,this)},void 0,!1,void 0,this),O.jsxDEV(g2,{children:[O.jsxDEV("span",{children:"Type"},void 0,!1,void 0,this),O.jsxDEV("span",{children:t.file.contentType??"—"},void 0,!1,void 0,this),O.jsxDEV("span",{children:"Size"},void 0,!1,void 0,this),O.jsxDEV("span",{children:ile(t.file.size)},void 0,!1,void 0,this),O.jsxDEV("span",{children:"Uploaded"},void 0,!1,void 0,this),O.jsxDEV("span",{children:t.file.uploadedAt?new Date(t.file.uploadedAt).toLocaleString():t.createdAt??"—"},void 0,!1,void 0,this),O.jsxDEV("span",{children:"URL"},void 0,!1,void 0,this),O.jsxDEV("span",{className:"break-all",children:O.jsxDEV("a",{className:"underline underline-offset-2",href:m,target:"_blank",rel:"noreferrer",children:["/media/",t.file.key]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O.jsxDEV("div",{className:"mt-3.5 flex items-center gap-2",children:[O.jsxDEV(we,{onPress:b,isDisabled:f||c===(t.alt??""),children:"Save"},void 0,!1,void 0,this),O.jsxDEV(we,{variant:"secondary",size:"sm",onPress:()=>navigator.clipboard?.writeText(m),children:"Copy URL"},void 0,!1,void 0,this),O.jsxDEV("span",{className:"flex-1"},void 0,!1,void 0,this),O.jsxDEV(we,{variant:"ghost",className:"text-danger",onPress:y,isDisabled:f,children:"Delete"},void 0,!1,void 0,this),O.jsxDEV(we,{variant:"ghost",onPress:n,children:"Close"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function tle(e){let t=e.roles;if(Array.isArray(t))return t.filter((n)=>typeof n==="string");if(typeof t==="string")try{let n=JSON.parse(t);return Array.isArray(n)?n:[]}catch{return[]}return[]}function Uj({api:e,me:t,onError:n}){let[a,i]=ue.useState([]),[l,c]=ue.useState(!1),[u,f]=ue.useState(""),h=ue.useCallback(()=>{e.call("listUsers",{limit:200}).then(i).catch((v)=>n(ut(v)))},[e,n]);ue.useEffect(()=>{h()},[h]);let m=async(v,S)=>{f(v.username);try{await e.call("setUserRoles",{username:v.username,roles:S}),h()}catch(C){n(ut(C))}finally{f("")}},b=async(v,S)=>{f(v.username);try{await e.call("setUserActive",{username:v.username,active:S}),h()}catch(C){n(ut(C))}finally{f("")}},y=async(v)=>{if(!confirm(`Delete user ${v.username}? This cannot be undone.`))return;f(v.username);try{await e.call("deleteUser",{username:v.username}),h()}catch(S){n(ut(S))}finally{f("")}};return O.jsxDEV(O.Fragment,{children:[O.jsxDEV(Hb,{lead:"Users",em:a.length===0?"None yet":a.length===1?"1 account":`${a.length} accounts`,children:O.jsxDEV(m2,{text:"Let's",em:"invite someone",children:O.jsxDEV(we,{className:"shrink-0",onPress:()=>c(!0),children:"+ Invite"},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),O.jsxDEV("div",{className:fh,children:O.jsxDEV("div",{className:"flex flex-col gap-2",children:[a.map((v)=>{let S=tle(v),C=t?.userId===v.username,E=v.active===void 0||v.active===null?!0:Boolean(Number(v.active));return O.jsxDEV("div",{className:`${Wc} flex-wrap items-start`,children:[O.jsxDEV("div",{className:"flex min-w-[200px] flex-1 flex-col gap-0.5",children:[O.jsxDEV("span",{className:"font-semibold",children:[v.username,C?O.jsxDEV("span",{className:"ml-1.5 font-normal text-fg-subtle",children:"(you)"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),v.email&&v.email!==v.username?O.jsxDEV("span",{className:"text-xs text-fg-subtle",children:v.email},void 0,!1,void 0,this):null,v.createdAt?O.jsxDEV("span",{className:"text-[11px] text-fg-subtle",children:["joined ",new Date(Number(v.createdAt)).toLocaleDateString()]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this),O.jsxDEV(nle,{value:S,disabled:u===v.username,onSave:(R)=>m(v,R)},void 0,!1,void 0,this),O.jsxDEV(bl,{status:E?"active":"inactive",children:E?"active":"inactive"},void 0,!1,void 0,this),O.jsxDEV(we,{variant:"ghost",size:"sm",isDisabled:u===v.username||C,onPress:()=>b(v,!E),children:E?"Deactivate":"Activate"},void 0,!1,void 0,this),O.jsxDEV(we,{variant:"ghost",size:"sm",className:"text-danger",isDisabled:u===v.username||C,onPress:()=>y(v),children:"Delete"},void 0,!1,void 0,this)]},v.username,!0,void 0,this)}),a.length===0?O.jsxDEV("p",{className:"text-fg-subtle",children:"No users yet. Invite someone to get started."},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)},void 0,!1,void 0,this),l?O.jsxDEV(rle,{api:e,onClose:()=>c(!1),onInvited:()=>{c(!1),h()},onError:n},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}function nle({value:e,disabled:t,onSave:n}){let[a,i]=ue.useState(e.join(", ")),[l,c]=ue.useState(!1);ue.useEffect(()=>{i(e.join(", "))},[e]);let u=()=>{c(!1);let f=a.split(",").map((h)=>h.trim()).filter(Boolean);if(f.length===0){i(e.join(", "));return}if(f.length===e.length&&f.every((h,m)=>h===e[m]))return;n(f)};if(l)return O.jsxDEV("input",{autoFocus:!0,className:"h-10 w-[220px] rounded-lg border border-border bg-surface-card px-4 text-sm text-fg outline-none focus:border-brand-green",value:a,disabled:t,onChange:(f)=>i(f.target.value),onBlur:u,onKeyDown:(f)=>{if(f.key==="Enter")u();if(f.key==="Escape")i(e.join(", ")),c(!1)}},void 0,!1,void 0,this);return O.jsxDEV("span",{className:"flex cursor-pointer flex-wrap gap-1",onClick:()=>c(!0),title:"Click to edit",children:e.length===0?O.jsxDEV(bl,{children:"no roles"},void 0,!1,void 0,this):e.map((f)=>O.jsxDEV(bl,{status:f==="admin"?"published":void 0,children:f},f,!1,void 0,this))},void 0,!1,void 0,this)}function rle({api:e,onClose:t,onInvited:n,onError:a}){let[i,l]=ue.useState(""),[c,u]=ue.useState("editor"),[f,h]=ue.useState(!1);return O.jsxDEV(Gk,{onClose:t,children:[O.jsxDEV(Wk,{children:["Invite an ",O.jsxDEV(zb,{children:"editor"},void 0,!1,void 0,this)," or teammate"]},void 0,!0,void 0,this),O.jsxDEV("p",{className:"-mt-2 mb-4 text-fg-subtle",children:"They'll get a one-time magic link that logs them in and creates their account."},void 0,!1,void 0,this),O.jsxDEV("div",{className:"flex flex-col gap-4",children:[O.jsxDEV(wn,{label:"Email",type:"email",autoFocus:!0,value:i,onChange:l,placeholder:"them@example.com"},void 0,!1,void 0,this),O.jsxDEV(wn,{label:"Roles (comma-separated — e.g. editor, reviewer, admin)",value:c,onChange:u,placeholder:"editor"},void 0,!1,void 0,this),O.jsxDEV("div",{className:"mt-2 flex justify-end gap-2",children:[O.jsxDEV(we,{variant:"ghost",onPress:t,children:"Cancel"},void 0,!1,void 0,this),O.jsxDEV(we,{onPress:async()=>{h(!0);try{let b=c.split(",").map((y)=>y.trim()).filter(Boolean);await e.call("inviteUser",{email:i,roles:b}),n()}catch(b){a(ut(b))}finally{h(!1)}},isDisabled:f||!i,children:f?"Sending…":"Send invite"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Vj({api:e,cfg:t,me:n,onSignOut:a,onError:i}){return O.jsxDEV(O.Fragment,{children:[O.jsxDEV(Hb,{lead:"Settings",em:n?.userId??"your account"},void 0,!1,void 0,this),O.jsxDEV("div",{className:`${fh} grid grid-cols-2 gap-5 max-[820px]:grid-cols-1`,children:[O.jsxDEV(ole,{api:e,me:n,onError:i,onSignOut:a},void 0,!1,void 0,this),O.jsxDEV(ale,{cfg:t,me:n},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function ole({api:e,me:t,onError:n,onSignOut:a}){let[i,l]=ue.useState(""),[c,u]=ue.useState(""),[f,h]=ue.useState(""),[m,b]=ue.useState(""),[y,v]=ue.useState(!1),S=(R)=>{b(R),setTimeout(()=>b(""),1800)},C=async()=>{v(!0);try{await e.call("changeEmail",{email:i}),l(""),S("Contact email updated")}catch(R){n(ut(R))}finally{v(!1)}},E=async()=>{v(!0);try{await e.call("changePassword",{currentPassword:c,newPassword:f}),u(""),h(""),S("Password updated")}catch(R){n(ut(R))}finally{v(!1)}};return O.jsxDEV(_j,{children:[O.jsxDEV(gl,{children:"My account"},void 0,!1,void 0,this),m?O.jsxDEV(ph,{ok:!0,children:m},void 0,!1,void 0,this):null,O.jsxDEV(g2,{className:"mb-4",children:[O.jsxDEV("span",{children:"Username"},void 0,!1,void 0,this),O.jsxDEV("span",{children:t?.userId??"—"},void 0,!1,void 0,this),O.jsxDEV("span",{children:"Roles"},void 0,!1,void 0,this),O.jsxDEV("span",{children:(t?.roles??[]).join(", ")||"—"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O.jsxDEV("div",{className:"flex flex-col gap-4",children:[O.jsxDEV(wn,{label:"Change contact email",type:"email",value:i,onChange:l,placeholder:"you@example.com"},void 0,!1,void 0,this),O.jsxDEV(we,{className:"w-full",onPress:C,isDisabled:y||!i,children:"Save email"},void 0,!1,void 0,this),O.jsxDEV(wn,{label:"Current password",type:"password",value:c,onChange:u,autoComplete:"current-password"},void 0,!1,void 0,this),O.jsxDEV(wn,{label:"New password (at least 8 characters)",type:"password",value:f,onChange:h,autoComplete:"new-password"},void 0,!1,void 0,this),O.jsxDEV(we,{className:"w-full",onPress:E,isDisabled:y||f.length<8||c.length===0,children:"Change password"},void 0,!1,void 0,this),O.jsxDEV(we,{variant:"ghost",className:"mt-2 w-full text-danger",onPress:a,children:"Sign out"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function ale({cfg:e,me:t}){return O.jsxDEV(_j,{children:[O.jsxDEV(gl,{children:"About"},void 0,!1,void 0,this),O.jsxDEV(g2,{children:[O.jsxDEV("span",{children:"Tenant"},void 0,!1,void 0,this),O.jsxDEV("span",{children:e.tenant||"main"},void 0,!1,void 0,this),O.jsxDEV("span",{children:"API"},void 0,!1,void 0,this),O.jsxDEV("span",{className:"break-all",children:e.baseUrl},void 0,!1,void 0,this),O.jsxDEV("span",{children:"Signed in as"},void 0,!1,void 0,this),O.jsxDEV("span",{children:t?.userId??"—"},void 0,!1,void 0,this),O.jsxDEV("span",{children:"Editor"},void 0,!1,void 0,this),O.jsxDEV("span",{children:"pramen · cms-editor"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function jj(e){return(e.file.contentType??"").startsWith("image/")}function Kj(e){let t=(e.file.contentType??"").split("/")[1];return(e.file.filename?.split(".").pop()??t??"file").slice(0,5).toUpperCase()}function ile(e){if(!e||e<=0)return"—";let t=["B","KB","MB","GB"],n=0,a=e;while(a>=1024&&n<t.length-1)a/=1024,n++;return`${a<10&&n>0?a.toFixed(1):Math.round(a)} ${t[n]}`}function ut(e){if(e instanceof Bp)return e.message;return e instanceof Error?e.message:String(e)}function sle(e){return e.replace(/<[^>]*>/g," ").replace(/&nbsp;/g," ").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/\s+/g," ").trim()}function lle(e){if(typeof e==="string")return sle(e);if(ch(e))return Bb(e).replace(/\s+/g," ").trim();return""}function cle(e){let t="";for(let n of Object.values(e))if(t=lle(n),t)break;if(!t)return"";return t.length>90?t.slice(0,90)+"…":t}function ule(e,t,n,a,i){let l=n+a;if(l<0||l>=e.length)return;let c=e.map((u)=>u.id);[c[n],c[l]]=[c[l],c[n]],i(t,c)}var ue,O,qk,Wc="flex items-center gap-3 rounded-[14px] border border-transparent bg-surface-card px-[18px] py-3.5",fh="mx-auto max-w-[1200px] px-7 pb-8 pt-2",zb=({children:e})=>O.jsxDEV("span",{className:"text-fg-subtle",children:e},void 0,!1,void 0,this),Dj=50,Lj=60;var Yc=N(()=>{Ji();oR();Nj();Kk();ue=q(ae(),1),O=q(Tt(),1),qk=["settings","seo","workflow","i18n","audit"]});var qj={};lc(qj,{default:()=>dle});var Fb,dle;var Gj=N(()=>{da();Ji();Xi();Yc();Fb=q(Tt(),1),dle=dr().params({slug:"string",id:"string"}).route("/collections/:slug/:id").render(function({params:t}){let{api:n,collections:a,setError:i}=kr(),l=Rr(),c=a.find((f)=>f.slug===t.slug),u=()=>l("collection",{params:{slug:t.slug}});if(!c)return Fb.jsxDEV("div",{className:"mx-auto flex max-w-[1200px] items-center gap-2 px-7 pt-8",children:[Fb.jsxDEV("p",{className:"text-fg-subtle",children:a.length===0?"Loading…":`Unknown collection: ${t.slug}`},void 0,!1,void 0,this),a.length>0?Fb.jsxDEV(we,{variant:"ghost",size:"sm",onPress:()=>l("home"),children:"← Pages"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this);return Fb.jsxDEV(zj,{api:n,def:c,id:t.id==="new"?null:t.id,onSaved:u,onDeleted:u,onBack:u,onError:i},void 0,!1,void 0,this)})});var Wj={};lc(Wj,{default:()=>fle});var Ub,fle;var Yj=N(()=>{da();Ji();Xi();Yc();Ub=q(Tt(),1),fle=dr().params({slug:"string"}).route("/collections/:slug").render(function({params:t}){let{api:n,collections:a,setError:i}=kr(),l=Rr(),c=a.find((u)=>u.slug===t.slug);if(!c)return Ub.jsxDEV("div",{className:"mx-auto flex max-w-[1200px] items-center gap-2 px-7 pt-8",children:[Ub.jsxDEV("p",{className:"text-fg-subtle",children:a.length===0?"Loading…":`Unknown collection: ${t.slug}`},void 0,!1,void 0,this),a.length>0?Ub.jsxDEV(we,{variant:"ghost",size:"sm",onPress:()=>l("home"),children:"← Pages"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this);return Ub.jsxDEV(Bj,{api:n,def:c,onOpen:(u)=>l("collection-item",{params:{slug:c.slug,id:u}}),onNew:()=>l("collection-item",{params:{slug:c.slug,id:"new"}}),onError:i},void 0,!1,void 0,this)})});var Jj={};lc(Jj,{default:()=>ple});var hh,Xj,ple;var Qj=N(()=>{da();Xi();Yc();hh=q(ae(),1),Xj=q(Tt(),1),ple=dr().route("/").render(function(){let{api:t,setError:n,collections:a}=kr(),i=Rr(),[l,c]=hh.useState([]),[u,f]=hh.useState([]),h=typeof window<"u"&&window.PRAMEN_CMS_EDITOR?.hidePages===!0,m=a[0]?.slug;hh.useEffect(()=>{if(h&&m)i("collection",{params:{slug:m},replace:!0})},[h,m,i]);let b=()=>t.listPages().then(c).catch((y)=>n(ut(y)));if(hh.useEffect(()=>{if(h)return;b(),t.listBlockTypes().then(f).catch((y)=>n(ut(y)))},[t,h]),h&&m)return null;return Xj.jsxDEV(Ij,{api:t,pages:l,blockTypes:u,onOpen:(y)=>i("page",{params:{pageId:y.id}}),onCreated:b,onError:n},void 0,!1,void 0,this)})});var Zj={};lc(Zj,{default:()=>hle});var eK,hle;var tK=N(()=>{da();Xi();Yc();eK=q(Tt(),1),hle=dr().route("/media").render(function(){let{api:t,setError:n}=kr();return eK.jsxDEV(Fj,{api:t,onError:n},void 0,!1,void 0,this)})});var nK={};lc(nK,{default:()=>mle});var mh,Ud,mle;var rK=N(()=>{da();Ji();Xi();Yc();mh=q(ae(),1),Ud=q(Tt(),1),mle=dr().params({pageId:"string",tab:"?string"}).route("/pages/:pageId").render(function({params:t}){let{api:n,setError:a,setNavGuard:i}=kr(),l=Rr(),[c,u]=mh.useState(null),[f,h]=mh.useState([]),[m,b]=mh.useState(!1);mh.useEffect(()=>{let S=!0;return b(!1),n.listPages().then((C)=>{if(!S)return;let E=C.find((R)=>R.id===t.pageId)??null;u(E),b(!E)}).catch((C)=>a(ut(C))),n.listBlockTypes().then((C)=>S&&h(C)).catch((C)=>a(ut(C))),()=>{S=!1}},[n,t.pageId,a]);let y=qk.includes(t.tab)?t.tab:"settings",v=(S)=>l("page",{params:{pageId:t.pageId,tab:S},replace:!0});if(m)return Ud.jsxDEV("div",{className:"mx-auto flex max-w-[1200px] items-center gap-2 px-7 pt-8",children:[Ud.jsxDEV("p",{className:"text-fg-subtle",children:"Page not found."},void 0,!1,void 0,this),Ud.jsxDEV(we,{variant:"ghost",size:"sm",onPress:()=>l("home"),children:"← all pages"},void 0,!1,void 0,this)]},void 0,!0,void 0,this);if(!c)return Ud.jsxDEV("div",{className:"mx-auto max-w-[1200px] px-7 pt-8",children:Ud.jsxDEV("p",{className:"text-fg-subtle",children:"Loading…"},void 0,!1,void 0,this)},void 0,!1,void 0,this);return Ud.jsxDEV(Hj,{api:n,page:c,blockTypes:f,tab:y,onTab:v,onBack:()=>l("home"),onChange:u,registerGuard:i},void 0,!1,void 0,this)})});var oK={};lc(oK,{default:()=>gle});var aK,gle;var iK=N(()=>{da();Xi();Yc();aK=q(Tt(),1),gle=dr().route("/settings").render(function(){let{api:t,cfg:n,me:a,setError:i,reconfigure:l}=kr();return aK.jsxDEV(Vj,{api:t,cfg:n,me:a,onSignOut:l,onError:i},void 0,!1,void 0,this)})});var sK={};lc(sK,{default:()=>ble});var Vd,ble;var lK=N(()=>{da();Ji();Xi();Yc();Vd=q(Tt(),1),ble=dr().route("/users").render(function(){let{api:t,me:n,isAdmin:a,setError:i}=kr(),l=Rr();if(n===null)return Vd.jsxDEV("div",{className:"mx-auto max-w-[1200px] px-7 pt-8",children:Vd.jsxDEV("p",{className:"text-fg-subtle",children:"Loading…"},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(!a)return Vd.jsxDEV("div",{className:"mx-auto flex max-w-[1200px] items-center gap-2 px-7 pt-8",children:[Vd.jsxDEV("p",{className:"text-fg-subtle",children:"Admins only."},void 0,!1,void 0,this),Vd.jsxDEV(we,{variant:"ghost",size:"sm",onPress:()=>l("home"),children:"← back to pages"},void 0,!1,void 0,this)]},void 0,!0,void 0,this);return Vd.jsxDEV(Uj,{api:t,me:n,onError:i},void 0,!1,void 0,this)})});var cK={};lc(cK,{default:()=>yle});var Jc,yle;var uK=N(()=>{da();Ji();Jc=q(Tt(),1),yle=dr().render(function(){let t=Rr();return Jc.jsxDEV("div",{className:"mx-auto max-w-[1200px] px-7 pt-8",children:[Jc.jsxDEV("h1",{className:"m-0 text-[56px] font-normal leading-[1.05] tracking-[-0.01em] max-[820px]:text-[40px]",children:[Jc.jsxDEV("span",{className:"block text-fg-subtle",children:"Not found"},void 0,!1,void 0,this),Jc.jsxDEV("span",{className:"block text-fg",children:"Nothing lives here"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Jc.jsxDEV("div",{className:"mt-4 flex items-center gap-2",children:[Jc.jsxDEV("p",{className:"text-fg-subtle",children:"That page doesn't exist."},void 0,!1,void 0,this),Jc.jsxDEV(we,{variant:"ghost",size:"sm",onPress:()=>t("home"),children:"← back to pages"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)})});da();var xK=q(ae(),1),$K=q(Q6(),1);da();var yl=q(ae(),1);da();Ji();Xi();var Xx=q(ae(),1),Cn=q(Tt(),1),FI="pramen.cms.theme";function iR(){let{isAdmin:e,collections:t,error:n,reconfigure:a,confirmNavigation:i}=kr(),l=Rr(),{pathname:c}=pv(),u=(C)=>()=>{if(i())C()},[f,h]=Xx.useState(()=>typeof localStorage<"u"?localStorage.getItem(FI)??"light":"light");Xx.useEffect(()=>{document.documentElement.dataset.theme=f==="dark"?"dark":"light",localStorage.setItem(FI,f)},[f]);let m=c.startsWith("/collections/")?c.split("/")[2]:void 0,b=m?`col:${m}`:c.startsWith("/pages")||c==="/"?"pages":c.startsWith("/media")?"media":c.startsWith("/users")?"users":c.startsWith("/settings")?"settings":"",y=(C)=>b===C?"bg-surface-muted text-fg":"text-fg-muted",v=typeof window<"u"?window.PRAMEN_CMS_EDITOR?.extraNav??[]:[],S=typeof window<"u"?window.PRAMEN_CMS_EDITOR?.hidePages===!0:!1;return Cn.jsxDEV("div",{className:"min-h-screen bg-surface text-fg",children:[Cn.jsxDEV(Bg,{className:"sticky top-0 z-10 bg-surface px-7",children:[Cn.jsxDEV(Bg.Brand,{children:Cn.jsxDEV("button",{type:"button",onClick:u(()=>l("home")),"aria-label":"pramen cms — home",className:"flex items-baseline gap-1 rounded-md px-1 py-0.5 transition-colors hover:bg-surface-muted",children:[Cn.jsxDEV("span",{className:"text-callout font-bold tracking-[0.01em] text-fg",children:"pramen"},void 0,!1,void 0,this),Cn.jsxDEV("span",{className:"text-fg-subtle",children:"· cms"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),Cn.jsxDEV(Bg.Nav,{"aria-label":"Primary",children:[S?null:Cn.jsxDEV(we,{variant:"ghost",size:"sm",className:y("pages"),onPress:u(()=>l("home")),children:"Pages"},void 0,!1,void 0,this),t.map((C)=>Cn.jsxDEV(we,{variant:"ghost",size:"sm",className:y(`col:${C.slug}`),onPress:u(()=>l("collection",{params:{slug:C.slug}})),children:[C.icon?`${C.icon} `:"",C.pluralLabel]},C.slug,!0,void 0,this)),Cn.jsxDEV(we,{variant:"ghost",size:"sm",className:y("media"),onPress:u(()=>l("media")),children:"Media"},void 0,!1,void 0,this),e?Cn.jsxDEV(we,{variant:"ghost",size:"sm",className:y("users"),onPress:u(()=>l("users")),children:"Users"},void 0,!1,void 0,this):null,Cn.jsxDEV(we,{variant:"ghost",size:"sm",className:y("settings"),onPress:u(()=>l("settings")),children:"Settings"},void 0,!1,void 0,this),v.map((C)=>Cn.jsxDEV("a",{href:C.href,target:"_blank",rel:"noopener noreferrer",className:"rounded-md px-2.5 py-1.5 text-small text-fg-muted transition-colors hover:bg-surface-muted hover:text-fg",children:C.label},C.href,!1,void 0,this))]},void 0,!0,void 0,this),Cn.jsxDEV(Bg.Actions,{children:[Cn.jsxDEV(we,{variant:"ghost",size:"sm","aria-label":f==="dark"?"Switch to light theme":"Switch to dark theme",onPress:()=>h(f==="dark"?"light":"dark"),children:f==="dark"?Cn.jsxDEV(xI,{className:"h-4 w-4"},void 0,!1,void 0,this):Cn.jsxDEV($I,{className:"h-4 w-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this),Cn.jsxDEV(we,{variant:"ghost",size:"sm",onPress:u(a),children:"sign out"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),n?Cn.jsxDEV(iI,{variant:"outlined",padding:"none",className:"mx-7 mt-2 border-danger px-4 py-2.5",children:Cn.jsxDEV(Kx,{size:"small",className:"text-danger",children:n},void 0,!1,void 0,this)},void 0,!1,void 0,this):null,Cn.jsxDEV(Qf,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var dK=()=>Promise.resolve().then(() => (Gj(),qj)).then((e)=>({default:e.default.component})),fK=()=>Promise.resolve().then(() => (Yj(),Wj)).then((e)=>({default:e.default.component})),pK=()=>Promise.resolve().then(() => (Qj(),Jj)).then((e)=>({default:e.default.component})),hK=()=>Promise.resolve().then(() => (tK(),Zj)).then((e)=>({default:e.default.component})),mK=()=>Promise.resolve().then(() => (rK(),nK)).then((e)=>({default:e.default.component})),gK=()=>Promise.resolve().then(() => (iK(),oK)).then((e)=>({default:e.default.component})),bK=()=>Promise.resolve().then(() => (lK(),sK)).then((e)=>({default:e.default.component})),yK=()=>Promise.resolve().then(() => (uK(),cK)).then((e)=>({default:e.default.component})),Yk={"collection-item":"/collections/:slug/:id",collection:"/collections/:slug",home:"/",media:"/media",page:"/pages/:pageId",settings:"/settings",users:"/users"},vle=[{path:"/",component:iR,isLayout:!0,children:[{path:"/collection-item",matchPath:"/collections/:slug/:id",component:yl.lazy(dK),preload:dK},{path:"/collection",matchPath:"/collections/:slug",component:yl.lazy(fK),preload:fK},{path:"/home",matchPath:"/",component:yl.lazy(pK),preload:pK},{path:"/media",component:yl.lazy(hK),preload:hK},{path:"/page",matchPath:"/pages/:pageId",component:yl.lazy(mK),preload:mK},{path:"/settings",component:yl.lazy(gK),preload:gK},{path:"/users",component:yl.lazy(bK),preload:bK},{path:"/:__notFound+",component:yl.lazy(yK),preload:yK}]}],Jk=oE(vle);Xi();var b2=q(Tt(),1),vK=document.getElementById("app");if(vK)$K.createRoot(vK).render(b2.jsxDEV(xK.StrictMode,{children:b2.jsxDEV(HI,{children:b2.jsxDEV(fv,{routes:Jk,pageRegistry:Yk},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this));