@rizom/brain 0.2.0-alpha.373 → 0.2.0-alpha.374

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.
Files changed (39) hide show
  1. package/dist/brain.js +36 -36
  2. package/dist/chunks/{app-vc3nv5y9.js → app-fwngp2bj.js} +2 -2
  3. package/dist/chunks/{index-tyn6rvwj.js → index-748qhn3e.js} +2 -2
  4. package/dist/chunks/{index-sbrkcb6b.js → index-9wsnezey.js} +2 -2
  5. package/dist/chunks/{index-rwamfjnc.js → index-z9x2nc51.js} +3 -3
  6. package/dist/chunks/{index-rwamfjnc.js.map → index-z9x2nc51.js.map} +1 -1
  7. package/dist/index.js +1 -1
  8. package/dist/model.js +37 -37
  9. package/dist/model.js.map +1 -1
  10. package/dist/ui/app.js.map +1 -1
  11. package/dist/ui/studio-app.css +30 -5
  12. package/dist/ui/studio-app.js +87 -87
  13. package/dist/ui/studio-app.js.map +5 -5
  14. package/dist/ui/studio-asset-manifest.json +18 -18
  15. package/dist/ui/studio-chunks/{account-view-ccwc00f3.js → account-view-bxy1013k.js} +2 -2
  16. package/dist/ui/studio-chunks/{account-view-ccwc00f3.js.map → account-view-bxy1013k.js.map} +1 -1
  17. package/dist/ui/studio-chunks/{highlighted-body-OFNGDK62-4nvg61ct.js → highlighted-body-OFNGDK62-0zjmhz68.js} +2 -2
  18. package/dist/ui/studio-chunks/{highlighted-body-OFNGDK62-4nvg61ct.js.map → highlighted-body-OFNGDK62-0zjmhz68.js.map} +1 -1
  19. package/dist/ui/studio-chunks/{main-ae3gk7qq.js → main-h805x05e.js} +3 -3
  20. package/dist/ui/studio-chunks/{main-ae3gk7qq.js.map → main-h805x05e.js.map} +2 -2
  21. package/dist/ui/studio-chunks/{main-m0kdgfnh.js → main-q0etykh1.js} +5 -5
  22. package/dist/ui/studio-chunks/{main-m0kdgfnh.js.map → main-q0etykh1.js.map} +1 -1
  23. package/dist/ui/studio-chunks/{main-b5ybzc6w.js → main-qbrh95ht.js} +5 -5
  24. package/dist/ui/studio-chunks/{main-b5ybzc6w.js.map → main-qbrh95ht.js.map} +6 -4
  25. package/dist/ui/studio-chunks/{main-ddbzvt9n.js → main-vvm543hj.js} +2 -2
  26. package/dist/ui/studio-chunks/{main-ddbzvt9n.js.map → main-vvm543hj.js.map} +1 -1
  27. package/dist/ui/studio-chunks/{main-fnp26a36.js → main-vxqr9gvf.js} +2 -2
  28. package/dist/ui/studio-chunks/{main-fnp26a36.js.map → main-vxqr9gvf.js.map} +1 -1
  29. package/dist/ui/studio-chunks/mermaid-GHXKKRXX-5mp73mfe.js +3 -0
  30. package/dist/ui/studio-chunks/{mermaid-GHXKKRXX-fvw2rwpe.js.map → mermaid-GHXKKRXX-5mp73mfe.js.map} +1 -1
  31. package/dist/ui/studio-chunks/studio-chat-workspace-8j4ce99n.js +5 -0
  32. package/dist/ui/studio-chunks/studio-chat-workspace-8j4ce99n.js.map +19 -0
  33. package/package.json +1 -1
  34. package/dist/ui/studio-chunks/mermaid-GHXKKRXX-fvw2rwpe.js +0 -3
  35. package/dist/ui/studio-chunks/studio-chat-workspace-01yyssn0.js +0 -5
  36. package/dist/ui/studio-chunks/studio-chat-workspace-01yyssn0.js.map +0 -19
  37. /package/dist/chunks/{app-vc3nv5y9.js.map → app-fwngp2bj.js.map} +0 -0
  38. /package/dist/chunks/{index-tyn6rvwj.js.map → index-748qhn3e.js.map} +0 -0
  39. /package/dist/chunks/{index-sbrkcb6b.js.map → index-9wsnezey.js.map} +0 -0
@@ -1,60 +1,60 @@
1
- import{c as ZD,d as KD,e as eO,f as tO}from"./studio-chunks/main-ddbzvt9n.js";import{$ as yh,A as MO,Aa as VO,B as Lo,Ba as IO,C as DO,Ca as WO,D as D1,Da as Hm,E as OO,F as wn,G as v1,H as Qn,I as is,J as dm,K as lr,L as Xn,M as km,N as nh,O as pm,P as cM,Q as fM,R as ih,S as HE,T as NE,U as Q,V as hD,W as n1,X as GM,Y as eD,Z as Em,_ as Rm,aa as nO,ba as g1,ca as Lm,da as Ei,ea as RO,fa as LO,g as $O,ga as BO,h as kO,ha as gl,i as YO,ia as zO,j as aa,ja as HO,k as Nm,ka as O1,l as CO,la as NO,m as XO,ma as _O,n as AO,na as R1,o as _m,oa as L1,p as Gt,pa as vh,q as _t,qa as ar,r as C1,ra as gh,s as A1,sa as y1,t as T1,ta as iO,u as E1,ua as UO,v as TO,va as oO,wa as S1,x as EO,xa as lO,y as ra,ya as sO,z as M1,za as qO}from"./studio-chunks/main-b5ybzc6w.js";import"./studio-chunks/main-m0kdgfnh.js";import{$a as Gi,Ka as ce,La as ss,Ma as Ce,Na as Dn,Pa as JD,Qa as Ge,Ra as Hp,Sa as Np,Va as YD,Za as XD,_a as QD,ab as h2,bb as BD,cb as zD,db as HD,eb as d2,fb as h1,gb as d1,hb as p1,ib as m1,lb as Fa,mb as zp,nb as wo,ob as Di,pb as SO,qb as Qu,rb as wO,sb as rr,tb as QO,ub as GO,vb as $u,wb as GD,xb as b1,yb as Bm,zb as aO}from"./studio-chunks/main-ae3gk7qq.js";import{Ab as ct,Bb as yb,Db as xO,Eb as Ws,Gb as Rz}from"./studio-chunks/main-fnp26a36.js";var l2=yb(function(Oz){(function(){function t(){if(ae=!1,je){var W=Oz.unstable_now();st=W;var he=!0;try{e:{q=!1,J&&(J=!1,nt(Tt),Tt=-1),N=!0;var de=L;try{t:{c(W);for(R=l(w);R!==null&&!(R.expirationTime>W&&d());){var it=R.callback;if(typeof it==="function"){R.callback=null,L=R.priorityLevel;var $e=it(R.expirationTime<=W);if(W=Oz.unstable_now(),typeof $e==="function"){R.callback=$e,c(W),he=!0;break t}R===l(w)&&s(w),c(W)}else s(w);R=l(w)}if(R!==null)he=!0;else{var Oi=l(k);Oi!==null&&m(h,Oi.startTime-W),he=!1}}break e}finally{R=null,L=de,N=!1}he=void 0}}finally{he?Ne():je=!1}}}function i(W,he){var de=W.length;W.push(he);e:for(;0<de;){var it=de-1>>>1,$e=W[it];if(0<r($e,he))W[it]=he,W[de]=$e,de=it;else break e}}function l(W){return W.length===0?null:W[0]}function s(W){if(W.length===0)return null;var he=W[0],de=W.pop();if(de!==he){W[0]=de;e:for(var it=0,$e=W.length,Oi=$e>>>1;it<Oi;){var Bo=2*(it+1)-1,to=W[Bo],Rn=Bo+1,Rt=W[Rn];if(0>r(to,de))Rn<$e&&0>r(Rt,to)?(W[it]=Rt,W[Rn]=de,it=Rn):(W[it]=to,W[Bo]=de,it=Bo);else if(Rn<$e&&0>r(Rt,de))W[it]=Rt,W[Rn]=de,it=Rn;else break e}}return he}function r(W,he){var de=W.sortIndex-he.sortIndex;return de!==0?de:W.id-he.id}function c(W){for(var he=l(k);he!==null;){if(he.callback===null)s(k);else if(he.startTime<=W)s(k),he.sortIndex=he.expirationTime,i(w,he);else break;he=l(k)}}function h(W){if(J=!1,c(W),!q)if(l(w)!==null)q=!0,je||(je=!0,Ne());else{var he=l(k);he!==null&&m(h,he.startTime-W)}}function d(){return ae?!0:Oz.unstable_now()-st<P?!1:!0}function m(W,he){Tt=ye(function(){W(Oz.unstable_now())},he)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),Oz.unstable_now=void 0,typeof performance==="object"&&typeof performance.now==="function"){var y=performance;Oz.unstable_now=function(){return y.now()}}else{var b=Date,S=b.now();Oz.unstable_now=function(){return b.now()-S}}var w=[],k=[],E=1,R=null,L=3,N=!1,q=!1,J=!1,ae=!1,ye=typeof setTimeout==="function"?setTimeout:null,nt=typeof clearTimeout==="function"?clearTimeout:null,$t=typeof setImmediate<"u"?setImmediate:null,je=!1,Tt=-1,P=5,st=-1;if(typeof $t==="function")var Ne=function(){$t(t)};else if(typeof MessageChannel<"u"){var Be=new MessageChannel,Wn=Be.port2;Be.port1.onmessage=t,Ne=function(){Wn.postMessage(null)}}else Ne=function(){ye(t,0)};Oz.unstable_IdlePriority=5,Oz.unstable_ImmediatePriority=1,Oz.unstable_LowPriority=4,Oz.unstable_NormalPriority=3,Oz.unstable_Profiling=null,Oz.unstable_UserBlockingPriority=2,Oz.unstable_cancelCallback=function(W){W.callback=null},Oz.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<W?Math.floor(1000/W):5},Oz.unstable_getCurrentPriorityLevel=function(){return L},Oz.unstable_next=function(W){switch(L){case 1:case 2:case 3:var he=3;break;default:he=L}var de=L;L=he;try{return W()}finally{L=de}},Oz.unstable_requestPaint=function(){ae=!0},Oz.unstable_runWithPriority=function(W,he){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var de=L;L=W;try{return he()}finally{L=de}},Oz.unstable_scheduleCallback=function(W,he,de){var it=Oz.unstable_now();switch(typeof de==="object"&&de!==null?(de=de.delay,de=typeof de==="number"&&0<de?it+de:it):de=it,W){case 1:var $e=-1;break;case 2:$e=250;break;case 5:$e=1073741823;break;case 4:$e=1e4;break;default:$e=5000}return $e=de+$e,W={id:E++,callback:he,priorityLevel:W,startTime:de,expirationTime:$e,sortIndex:-1},de>it?(W.sortIndex=de,i(k,W),l(w)===null&&W===l(k)&&(J?(nt(Tt),Tt=-1):J=!0,m(h,de-it))):(W.sortIndex=$e,i(w,W),q||N||(q=!0,je||(je=!0,Ne()))),W},Oz.unstable_shouldYield=d,Oz.unstable_wrapCallback=function(W){var he=L;return function(){var de=L;L=he;try{return W.apply(this,arguments)}finally{L=de}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var s2=yb(function(Lz){var Pe=ct(l2()),yu=ct(Ws()),bb=ct(Rz());(function(){function t(e,n){for(e=e.memoizedState;e!==null&&0<n;)e=e.next,n--;return e}function i(e,n,o,a){if(o>=n.length)return a;var u=n[o],f=ln(e)?e.slice():Me({},e);return f[u]=i(e[u],n,o+1,a),f}function l(e,n,o){if(n.length!==o.length)console.warn("copyWithRename() expects paths of the same length");else{for(var a=0;a<o.length-1;a++)if(n[a]!==o[a]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return s(e,n,o,0)}}function s(e,n,o,a){var u=n[a],f=ln(e)?e.slice():Me({},e);return a+1===n.length?(f[o[a]]=f[u],ln(f)?f.splice(u,1):delete f[u]):f[u]=s(e[u],n,o,a+1),f}function r(e,n,o){var a=n[o],u=ln(e)?e.slice():Me({},e);if(o+1===n.length)return ln(u)?u.splice(a,1):delete u[a],u;return u[a]=r(e[a],n,o+1),u}function c(){return!1}function h(){return null}function d(){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 m(){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 y(){}function b(){}function S(e){var n=[];return e.forEach(function(o){n.push(o)}),n.sort().join(", ")}function w(e,n,o,a){return new vR(e,n,o,a)}function k(e,n){e.context===Ms&&(_0(e.current,2,n,e,null,null),Mr())}function E(e,n){if(Ui!==null){var o=n.staleFamilies;n=n.updatedFamilies,Tc(),fS(e.current,n,o),Mr()}}function R(e){Ui=e}function L(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function N(e){var n=e,o=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(o=n.return),e=n.return;while(e)}return n.tag===3?o:null}function q(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function J(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function ae(e){if(N(e)!==e)throw Error("Unable to find node on an unmounted component.")}function ye(e){var n=e.alternate;if(!n){if(n=N(e),n===null)throw Error("Unable to find node on an unmounted component.");return n!==e?null:e}for(var o=e,a=n;;){var u=o.return;if(u===null)break;var f=u.alternate;if(f===null){if(a=u.return,a!==null){o=a;continue}break}if(u.child===f.child){for(f=u.child;f;){if(f===o)return ae(u),e;if(f===a)return ae(u),n;f=f.sibling}throw Error("Unable to find node on an unmounted component.")}if(o.return!==a.return)o=u,a=f;else{for(var p=!1,g=u.child;g;){if(g===o){p=!0,o=u,a=f;break}if(g===a){p=!0,a=u,o=f;break}g=g.sibling}if(!p){for(g=f.child;g;){if(g===o){p=!0,o=f,a=u;break}if(g===a){p=!0,a=f,o=u;break}g=g.sibling}if(!p)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(o.alternate!==a)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(o.tag!==3)throw Error("Unable to find node on an unmounted component.");return o.stateNode.current===o?e:n}function nt(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=nt(e),n!==null)return n;e=e.sibling}return null}function $t(e){if(e===null||typeof e!=="object")return null;return e=bk&&e[bk]||e["@@iterator"],typeof e==="function"?e:null}function je(e){if(e==null)return null;if(typeof e==="function")return e.$$typeof===VL?null:e.displayName||e.name||null;if(typeof e==="string")return e;switch(e){case Hr:return"Fragment";case $0:return"Profiler";case Md:return"StrictMode";case Y0:return"Suspense";case X0:return"SuspenseList";case Q0:return"Activity"}if(typeof e==="object")switch(typeof e.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case zr:return"Portal";case tl:return e.displayName||"Context";case P0:return(e._context.displayName||"Context")+".Consumer";case Nc:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Dd:return n=e.displayName||null,n!==null?n:je(e.type)||"Memo";case yi:n=e._payload,e=e._init;try{return je(e(n))}catch(o){}}return null}function Tt(e){return typeof e.tag==="number"?P(e):typeof e.name==="string"?e.name:null}function P(e){var n=e.type;switch(e.tag){case 31:return"Activity";case 24:return"Cache";case 9:return(n._context.displayName||"Context")+".Consumer";case 10:return n.displayName||"Context";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 26:case 27:case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return je(n);case 8:return n===Md?"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 n==="function")return n.displayName||n.name||null;if(typeof n==="string")return n;break;case 29:if(n=e._debugInfo,n!=null){for(var o=n.length-1;0<=o;o--)if(typeof n[o].name==="string")return n[o].name}if(e.return!==null)return P(e.return)}return null}function st(e){return{current:e}}function Ne(e,n){0>Ll?console.error("Unexpected pop."):(n!==W0[Ll]&&console.error("Unexpected Fiber popped."),e.current=G0[Ll],G0[Ll]=null,W0[Ll]=null,Ll--)}function Be(e,n,o){Ll++,G0[Ll]=e.current,W0[Ll]=o,e.current=n}function Wn(e){return e===null&&console.error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),e}function W(e,n){Be(xs,n,e),Be(_c,e,e),Be(ws,null,e);var o=n.nodeType;switch(o){case 9:case 11:o=o===9?"#document":"#fragment",n=(n=n.documentElement)?(n=n.namespaceURI)?jx(n):Xl:Xl;break;default:if(o=n.tagName,n=n.namespaceURI)n=jx(n),n=$x(n,o);else switch(o){case"svg":n=mu;break;case"math":n=Ep;break;default:n=Xl}}o=o.toLowerCase(),o=N1(null,o),o={context:n,ancestorInfo:o},Ne(ws,e),Be(ws,o,e)}function he(e){Ne(ws,e),Ne(_c,e),Ne(xs,e)}function de(){return Wn(ws.current)}function it(e){e.memoizedState!==null&&Be(Od,e,e);var n=Wn(ws.current),o=e.type,a=$x(n.context,o);o=N1(n.ancestorInfo,o),a={context:a,ancestorInfo:o},n!==a&&(Be(_c,e,e),Be(ws,a,e))}function $e(e){_c.current===e&&(Ne(ws,e),Ne(_c,e)),Od.current===e&&(Ne(Od,e),Df._currentValue=Ga)}function Oi(){}function Bo(){if(Uc===0){vk=console.log,Sk=console.info,wk=console.warn,xk=console.error,kk=console.group,Ck=console.groupCollapsed,Ak=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Oi,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Uc++}function to(){if(Uc--,Uc===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Me({},e,{value:vk}),info:Me({},e,{value:Sk}),warn:Me({},e,{value:wk}),error:Me({},e,{value:xk}),group:Me({},e,{value:kk}),groupCollapsed:Me({},e,{value:Ck}),groupEnd:Me({},e,{value:Ak})})}0>Uc&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function Rn(e){var n=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,e=e.stack,Error.prepareStackTrace=n,e.startsWith(`Error: react-stack-top-frame
1
+ import{c as KD,d as eO,e as tO,f as nO}from"./studio-chunks/main-vvm543hj.js";import{$ as vh,A as DO,Aa as jO,B as Ro,Ba as IO,C as OO,Ca as FO,D as D1,Da as Hm,E as RO,Ea as FD,F as Sn,G as v1,H as Xn,I as os,J as pm,K as cr,L as Yn,M as Cm,N as oh,O as mm,P as cM,Q as fM,R as lh,S as HE,T as NE,U as Q,V as hD,W as n1,X as GM,Y as eD,Z as Mm,_ as Rm,aa as iO,ba as g1,ca as Lm,da as Ai,ea as LO,fa as BO,g as PO,ga as zO,h as CO,ha as ml,i as XO,ia as HO,j as ha,ja as NO,k as Nm,ka as O1,l as AO,la as _O,m as QO,ma as UO,n as TO,na as R1,o as _m,oa as L1,p as Qt,pa as wh,q as _t,qa as dr,r as C1,ra as bh,s as A1,sa as y1,t as T1,ta as oO,u as E1,ua as qO,v as EO,va as lO,wa as S1,x as MO,xa as sO,y as da,ya as aO,z as M1,za as VO}from"./studio-chunks/main-qbrh95ht.js";import"./studio-chunks/main-q0etykh1.js";import{$a as QD,Ab as rO,La as ce,Ma as as,Na as Re,Oa as Mn,Qa as ZD,Ra as Ge,Sa as _p,Ta as Zs,Wa as YD,_a as XD,ab as Qi,bb as h2,cb as BD,db as zD,eb as HD,fb as d2,gb as h1,hb as d1,ib as p1,jb as m1,mb as tr,nb as Np,ob as So,pb as Ei,qb as wO,rb as hr,sb as xO,tb as pr,ub as GO,vb as WO,wb as Xu,xb as GD,yb as b1,zb as Bm}from"./studio-chunks/main-h805x05e.js";import{Bb as ct,Cb as yb,Eb as kO,Fb as Js,Hb as Lz}from"./studio-chunks/main-vxqr9gvf.js";var l2=yb(function(Rz){(function(){function t(){if(ae=!1,Ie){var W=Rz.unstable_now();st=W;var he=!0;try{e:{q=!1,J&&(J=!1,nt(Tt),Tt=-1),N=!0;var de=L;try{t:{c(W);for(R=l(w);R!==null&&!(R.expirationTime>W&&d());){var it=R.callback;if(typeof it==="function"){R.callback=null,L=R.priorityLevel;var $e=it(R.expirationTime<=W);if(W=Rz.unstable_now(),typeof $e==="function"){R.callback=$e,c(W),he=!0;break t}R===l(w)&&s(w),c(W)}else s(w);R=l(w)}if(R!==null)he=!0;else{var Mi=l(k);Mi!==null&&m(h,Mi.startTime-W),he=!1}}break e}finally{R=null,L=de,N=!1}he=void 0}}finally{he?Ne():Ie=!1}}}function i(W,he){var de=W.length;W.push(he);e:for(;0<de;){var it=de-1>>>1,$e=W[it];if(0<r($e,he))W[it]=he,W[de]=$e,de=it;else break e}}function l(W){return W.length===0?null:W[0]}function s(W){if(W.length===0)return null;var he=W[0],de=W.pop();if(de!==he){W[0]=de;e:for(var it=0,$e=W.length,Mi=$e>>>1;it<Mi;){var Lo=2*(it+1)-1,eo=W[Lo],On=Lo+1,Rt=W[On];if(0>r(eo,de))On<$e&&0>r(Rt,eo)?(W[it]=Rt,W[On]=de,it=On):(W[it]=eo,W[Lo]=de,it=Lo);else if(On<$e&&0>r(Rt,de))W[it]=Rt,W[On]=de,it=On;else break e}}return he}function r(W,he){var de=W.sortIndex-he.sortIndex;return de!==0?de:W.id-he.id}function c(W){for(var he=l(k);he!==null;){if(he.callback===null)s(k);else if(he.startTime<=W)s(k),he.sortIndex=he.expirationTime,i(w,he);else break;he=l(k)}}function h(W){if(J=!1,c(W),!q)if(l(w)!==null)q=!0,Ie||(Ie=!0,Ne());else{var he=l(k);he!==null&&m(h,he.startTime-W)}}function d(){return ae?!0:Rz.unstable_now()-st<P?!1:!0}function m(W,he){Tt=ye(function(){W(Rz.unstable_now())},he)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),Rz.unstable_now=void 0,typeof performance==="object"&&typeof performance.now==="function"){var y=performance;Rz.unstable_now=function(){return y.now()}}else{var b=Date,S=b.now();Rz.unstable_now=function(){return b.now()-S}}var w=[],k=[],E=1,R=null,L=3,N=!1,q=!1,J=!1,ae=!1,ye=typeof setTimeout==="function"?setTimeout:null,nt=typeof clearTimeout==="function"?clearTimeout:null,It=typeof setImmediate<"u"?setImmediate:null,Ie=!1,Tt=-1,P=5,st=-1;if(typeof It==="function")var Ne=function(){It(t)};else if(typeof MessageChannel<"u"){var Be=new MessageChannel,Gn=Be.port2;Be.port1.onmessage=t,Ne=function(){Gn.postMessage(null)}}else Ne=function(){ye(t,0)};Rz.unstable_IdlePriority=5,Rz.unstable_ImmediatePriority=1,Rz.unstable_LowPriority=4,Rz.unstable_NormalPriority=3,Rz.unstable_Profiling=null,Rz.unstable_UserBlockingPriority=2,Rz.unstable_cancelCallback=function(W){W.callback=null},Rz.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<W?Math.floor(1000/W):5},Rz.unstable_getCurrentPriorityLevel=function(){return L},Rz.unstable_next=function(W){switch(L){case 1:case 2:case 3:var he=3;break;default:he=L}var de=L;L=he;try{return W()}finally{L=de}},Rz.unstable_requestPaint=function(){ae=!0},Rz.unstable_runWithPriority=function(W,he){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var de=L;L=W;try{return he()}finally{L=de}},Rz.unstable_scheduleCallback=function(W,he,de){var it=Rz.unstable_now();switch(typeof de==="object"&&de!==null?(de=de.delay,de=typeof de==="number"&&0<de?it+de:it):de=it,W){case 1:var $e=-1;break;case 2:$e=250;break;case 5:$e=1073741823;break;case 4:$e=1e4;break;default:$e=5000}return $e=de+$e,W={id:E++,callback:he,priorityLevel:W,startTime:de,expirationTime:$e,sortIndex:-1},de>it?(W.sortIndex=de,i(k,W),l(w)===null&&W===l(k)&&(J?(nt(Tt),Tt=-1):J=!0,m(h,de-it))):(W.sortIndex=$e,i(w,W),q||N||(q=!0,Ie||(Ie=!0,Ne()))),W},Rz.unstable_shouldYield=d,Rz.unstable_wrapCallback=function(W){var he=L;return function(){var de=L;L=he;try{return W.apply(this,arguments)}finally{L=de}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var s2=yb(function(Bz){var Pe=ct(l2()),Su=ct(Js()),bb=ct(Lz());(function(){function t(e,n){for(e=e.memoizedState;e!==null&&0<n;)e=e.next,n--;return e}function i(e,n,o,a){if(o>=n.length)return a;var u=n[o],f=on(e)?e.slice():Ee({},e);return f[u]=i(e[u],n,o+1,a),f}function l(e,n,o){if(n.length!==o.length)console.warn("copyWithRename() expects paths of the same length");else{for(var a=0;a<o.length-1;a++)if(n[a]!==o[a]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return s(e,n,o,0)}}function s(e,n,o,a){var u=n[a],f=on(e)?e.slice():Ee({},e);return a+1===n.length?(f[o[a]]=f[u],on(f)?f.splice(u,1):delete f[u]):f[u]=s(e[u],n,o,a+1),f}function r(e,n,o){var a=n[o],u=on(e)?e.slice():Ee({},e);if(o+1===n.length)return on(u)?u.splice(a,1):delete u[a],u;return u[a]=r(e[a],n,o+1),u}function c(){return!1}function h(){return null}function d(){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 m(){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 y(){}function b(){}function S(e){var n=[];return e.forEach(function(o){n.push(o)}),n.sort().join(", ")}function w(e,n,o,a){return new SR(e,n,o,a)}function k(e,n){e.context===Os&&(_0(e.current,2,n,e,null,null),Rr())}function E(e,n){if(_i!==null){var o=n.staleFamilies;n=n.updatedFamilies,Mc(),fS(e.current,n,o),Rr()}}function R(e){_i=e}function L(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function N(e){var n=e,o=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(o=n.return),e=n.return;while(e)}return n.tag===3?o:null}function q(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function J(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function ae(e){if(N(e)!==e)throw Error("Unable to find node on an unmounted component.")}function ye(e){var n=e.alternate;if(!n){if(n=N(e),n===null)throw Error("Unable to find node on an unmounted component.");return n!==e?null:e}for(var o=e,a=n;;){var u=o.return;if(u===null)break;var f=u.alternate;if(f===null){if(a=u.return,a!==null){o=a;continue}break}if(u.child===f.child){for(f=u.child;f;){if(f===o)return ae(u),e;if(f===a)return ae(u),n;f=f.sibling}throw Error("Unable to find node on an unmounted component.")}if(o.return!==a.return)o=u,a=f;else{for(var p=!1,g=u.child;g;){if(g===o){p=!0,o=u,a=f;break}if(g===a){p=!0,a=u,o=f;break}g=g.sibling}if(!p){for(g=f.child;g;){if(g===o){p=!0,o=f,a=u;break}if(g===a){p=!0,a=f,o=u;break}g=g.sibling}if(!p)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(o.alternate!==a)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(o.tag!==3)throw Error("Unable to find node on an unmounted component.");return o.stateNode.current===o?e:n}function nt(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=nt(e),n!==null)return n;e=e.sibling}return null}function It(e){if(e===null||typeof e!=="object")return null;return e=bk&&e[bk]||e["@@iterator"],typeof e==="function"?e:null}function Ie(e){if(e==null)return null;if(typeof e==="function")return e.$$typeof===jL?null:e.displayName||e.name||null;if(typeof e==="string")return e;switch(e){case Ur:return"Fragment";case $0:return"Profiler";case Od:return"StrictMode";case Y0:return"Suspense";case X0:return"SuspenseList";case Q0:return"Activity"}if(typeof e==="object")switch(typeof e.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case _r:return"Portal";case tl:return e.displayName||"Context";case P0:return(e._context.displayName||"Context")+".Consumer";case Uc:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Rd:return n=e.displayName||null,n!==null?n:Ie(e.type)||"Memo";case mi:n=e._payload,e=e._init;try{return Ie(e(n))}catch(o){}}return null}function Tt(e){return typeof e.tag==="number"?P(e):typeof e.name==="string"?e.name:null}function P(e){var n=e.type;switch(e.tag){case 31:return"Activity";case 24:return"Cache";case 9:return(n._context.displayName||"Context")+".Consumer";case 10:return n.displayName||"Context";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 26:case 27:case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ie(n);case 8:return n===Od?"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 n==="function")return n.displayName||n.name||null;if(typeof n==="string")return n;break;case 29:if(n=e._debugInfo,n!=null){for(var o=n.length-1;0<=o;o--)if(typeof n[o].name==="string")return n[o].name}if(e.return!==null)return P(e.return)}return null}function st(e){return{current:e}}function Ne(e,n){0>Bl?console.error("Unexpected pop."):(n!==W0[Bl]&&console.error("Unexpected Fiber popped."),e.current=G0[Bl],G0[Bl]=null,W0[Bl]=null,Bl--)}function Be(e,n,o){Bl++,G0[Bl]=e.current,W0[Bl]=o,e.current=n}function Gn(e){return e===null&&console.error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),e}function W(e,n){Be(Cs,n,e),Be(qc,e,e),Be(ks,null,e);var o=n.nodeType;switch(o){case 9:case 11:o=o===9?"#document":"#fragment",n=(n=n.documentElement)?(n=n.namespaceURI)?Ix(n):Ql:Ql;break;default:if(o=n.tagName,n=n.namespaceURI)n=Ix(n),n=$x(n,o);else switch(o){case"svg":n=bu;break;case"math":n=Dp;break;default:n=Ql}}o=o.toLowerCase(),o=N1(null,o),o={context:n,ancestorInfo:o},Ne(ks,e),Be(ks,o,e)}function he(e){Ne(ks,e),Ne(qc,e),Ne(Cs,e)}function de(){return Gn(ks.current)}function it(e){e.memoizedState!==null&&Be(Ld,e,e);var n=Gn(ks.current),o=e.type,a=$x(n.context,o);o=N1(n.ancestorInfo,o),a={context:a,ancestorInfo:o},n!==a&&(Be(qc,e,e),Be(ks,a,e))}function $e(e){qc.current===e&&(Ne(ks,e),Ne(qc,e)),Ld.current===e&&(Ne(Ld,e),Rf._currentValue=Ka)}function Mi(){}function Lo(){if(Vc===0){vk=console.log,Sk=console.info,wk=console.warn,xk=console.error,kk=console.group,Ck=console.groupCollapsed,Ak=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Mi,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Vc++}function eo(){if(Vc--,Vc===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Ee({},e,{value:vk}),info:Ee({},e,{value:Sk}),warn:Ee({},e,{value:wk}),error:Ee({},e,{value:xk}),group:Ee({},e,{value:kk}),groupCollapsed:Ee({},e,{value:Ck}),groupEnd:Ee({},e,{value:Ak})})}0>Vc&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function On(e){var n=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,e=e.stack,Error.prepareStackTrace=n,e.startsWith(`Error: react-stack-top-frame
2
2
  `)&&(e=e.slice(29)),n=e.indexOf(`
3
3
  `),n!==-1&&(e=e.slice(n+1)),n=e.indexOf("react_stack_bottom_frame"),n!==-1&&(n=e.lastIndexOf(`
4
4
  `,n)),n!==-1)e=e.slice(0,n);else return"";return e}function Rt(e){if(F0===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);F0=n&&n[1]||"",Tk=-1<o.stack.indexOf(`
5
5
  at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
6
- `+F0+e+Tk}function zo(e,n){if(!e||J0)return"";var o=Z0.get(e);if(o!==void 0)return o;J0=!0,o=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var a=null;a=H.H,H.H=null,Bo();try{var u={DetermineComponentFrameRoot:function(){try{if(n){var A=function(){throw Error()};if(Object.defineProperty(A.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(A,[])}catch(X){var B=X}Reflect.construct(e,[],A)}else{try{A.call()}catch(X){B=X}e.call(A.prototype)}}else{try{throw Error()}catch(X){B=X}(A=e())&&typeof A.catch==="function"&&A.catch(function(){})}}catch(X){if(X&&B&&typeof X.stack==="string")return[X.stack,B.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=u.DetermineComponentFrameRoot(),g=p[0],v=p[1];if(g&&v){var x=g.split(`
6
+ `+F0+e+Tk}function Bo(e,n){if(!e||J0)return"";var o=Z0.get(e);if(o!==void 0)return o;J0=!0,o=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var a=null;a=H.H,H.H=null,Lo();try{var u={DetermineComponentFrameRoot:function(){try{if(n){var A=function(){throw Error()};if(Object.defineProperty(A.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(A,[])}catch(X){var B=X}Reflect.construct(e,[],A)}else{try{A.call()}catch(X){B=X}e.call(A.prototype)}}else{try{throw Error()}catch(X){B=X}(A=e())&&typeof A.catch==="function"&&A.catch(function(){})}}catch(X){if(X&&B&&typeof X.stack==="string")return[X.stack,B.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=u.DetermineComponentFrameRoot(),g=p[0],v=p[1];if(g&&v){var x=g.split(`
7
7
  `),D=v.split(`
8
8
  `);for(p=f=0;f<x.length&&!x[f].includes("DetermineComponentFrameRoot");)f++;for(;p<D.length&&!D[p].includes("DetermineComponentFrameRoot");)p++;if(f===x.length||p===D.length)for(f=x.length-1,p=D.length-1;1<=f&&0<=p&&x[f]!==D[p];)p--;for(;1<=f&&0<=p;f--,p--)if(x[f]!==D[p]){if(f!==1||p!==1)do if(f--,p--,0>p||x[f]!==D[p]){var O=`
9
- `+x[f].replace(" at new "," at ");return e.displayName&&O.includes("<anonymous>")&&(O=O.replace("<anonymous>",e.displayName)),typeof e==="function"&&Z0.set(e,O),O}while(1<=f&&0<=p);break}}}finally{J0=!1,H.H=a,to(),Error.prepareStackTrace=o}return x=(x=e?e.displayName||e.name:"")?Rt(x):"",typeof e==="function"&&Z0.set(e,x),x}function nn(e,n){switch(e.tag){case 26:case 27:case 5:return Rt(e.type);case 16:return Rt("Lazy");case 13:return e.child!==n&&n!==null?Rt("Suspense Fallback"):Rt("Suspense");case 19:return Rt("SuspenseList");case 0:case 15:return zo(e.type,!1);case 11:return zo(e.type.render,!1);case 1:return zo(e.type,!0);case 31:return Rt("Activity");default:return""}}function ua(e){try{var n="",o=null;do{n+=nn(e,o);var a=e._debugInfo;if(a)for(var u=a.length-1;0<=u;u--){var f=a[u];if(typeof f.name==="string"){var p=n;e:{var{name:g,env:v,debugLocation:x}=f;if(x!=null){var D=Rn(x),O=D.lastIndexOf(`
9
+ `+x[f].replace(" at new "," at ");return e.displayName&&O.includes("<anonymous>")&&(O=O.replace("<anonymous>",e.displayName)),typeof e==="function"&&Z0.set(e,O),O}while(1<=f&&0<=p);break}}}finally{J0=!1,H.H=a,eo(),Error.prepareStackTrace=o}return x=(x=e?e.displayName||e.name:"")?Rt(x):"",typeof e==="function"&&Z0.set(e,x),x}function tn(e,n){switch(e.tag){case 26:case 27:case 5:return Rt(e.type);case 16:return Rt("Lazy");case 13:return e.child!==n&&n!==null?Rt("Suspense Fallback"):Rt("Suspense");case 19:return Rt("SuspenseList");case 0:case 15:return Bo(e.type,!1);case 11:return Bo(e.type.render,!1);case 1:return Bo(e.type,!0);case 31:return Rt("Activity");default:return""}}function pa(e){try{var n="",o=null;do{n+=tn(e,o);var a=e._debugInfo;if(a)for(var u=a.length-1;0<=u;u--){var f=a[u];if(typeof f.name==="string"){var p=n;e:{var{name:g,env:v,debugLocation:x}=f;if(x!=null){var D=On(x),O=D.lastIndexOf(`
10
10
  `),A=O===-1?D:D.slice(O+1);if(A.indexOf(g)!==-1){var B=`
11
11
  `+A;break e}}B=Rt(g+(v?" ["+v+"]":""))}n=p+B}}o=e,e=e.return}while(e);return n}catch(X){return`
12
12
  Error generating stack: `+X.message+`
13
- `+X.stack}}function ot(e){return(e=e?e.displayName||e.name:"")?Rt(e):""}function Lt(){if(bi===null)return null;var e=bi._debugOwner;return e!=null?Tt(e):null}function _e(){if(bi===null)return"";var e=bi;try{var n="";switch(e.tag===6&&(e=e.return),e.tag){case 26:case 27:case 5:n+=Rt(e.type);break;case 13:n+=Rt("Suspense");break;case 19:n+=Rt("SuspenseList");break;case 31:n+=Rt("Activity");break;case 30:case 0:case 15:case 1:e._debugOwner||n!==""||(n+=ot(e.type));break;case 11:e._debugOwner||n!==""||(n+=ot(e.type.render))}for(;e;)if(typeof e.tag==="number"){var o=e;e=o._debugOwner;var a=o._debugStack;if(e&&a){var u=Rn(a);u!==""&&(n+=`
13
+ `+X.stack}}function ot(e){return(e=e?e.displayName||e.name:"")?Rt(e):""}function Lt(){if(gi===null)return null;var e=gi._debugOwner;return e!=null?Tt(e):null}function _e(){if(gi===null)return"";var e=gi;try{var n="";switch(e.tag===6&&(e=e.return),e.tag){case 26:case 27:case 5:n+=Rt(e.type);break;case 13:n+=Rt("Suspense");break;case 19:n+=Rt("SuspenseList");break;case 31:n+=Rt("Activity");break;case 30:case 0:case 15:case 1:e._debugOwner||n!==""||(n+=ot(e.type));break;case 11:e._debugOwner||n!==""||(n+=ot(e.type.render))}for(;e;)if(typeof e.tag==="number"){var o=e;e=o._debugOwner;var a=o._debugStack;if(e&&a){var u=On(a);u!==""&&(n+=`
14
14
  `+u)}}else if(e.debugStack!=null){var f=e.debugStack;(e=e.owner)&&f&&(n+=`
15
- `+Rn(f))}else break;var p=n}catch(g){p=`
15
+ `+On(f))}else break;var p=n}catch(g){p=`
16
16
  Error generating stack: `+g.message+`
17
- `+g.stack}return p}function Y(e,n,o,a,u,f,p){var g=bi;ri(e);try{return e!==null&&e._debugTask?e._debugTask.run(n.bind(null,o,a,u,f,p)):n(o,a,u,f,p)}finally{ri(g)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function ri(e){H.getCurrentStack=e===null?null:_e,nl=!1,bi=e}function lt(e){return typeof Symbol==="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}function Ut(e){try{return Et(e),!1}catch(n){return!0}}function Et(e){return""+e}function be(e,n){if(Ut(e))return console.error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",n,lt(e)),Et(e)}function Ke(e,n){if(Ut(e))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.",n,lt(e)),Et(e)}function Ho(e){if(Ut(e))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.",lt(e)),Et(e)}function ca(e){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var n=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(n.isDisabled)return!0;if(!n.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{_r=n.inject(e),Tn=n}catch(o){console.error("React instrumentation encountered an error: %o.",o)}return n.checkDCE?!0:!1}function Fe(e){if(typeof QL==="function"&&GL(e),Tn&&typeof Tn.setStrictMode==="function")try{Tn.setStrictMode(_r,e)}catch(n){il||(il=!0,console.error("React instrumentation encountered an error: %o",n))}}function Ri(e){return e>>>=0,e===0?32:31-(WL(e)/FL|0)|0}function Li(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&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."),e}}function no(e,n,o){var a=e.pendingLanes;if(a===0)return 0;var u=0,f=e.suspendedLanes,p=e.pingedLanes;e=e.warmLanes;var g=a&134217727;return g!==0?(a=g&~f,a!==0?u=Li(a):(p&=g,p!==0?u=Li(p):o||(o=g&~e,o!==0&&(u=Li(o))))):(g=a&~f,g!==0?u=Li(g):p!==0?u=Li(p):o||(o=a&~e,o!==0&&(u=Li(o)))),u===0?0:n!==0&&n!==u&&(n&f)===0&&(f=u&-u,o=n&-n,f>=o||f===32&&(o&4194048)!==0)?n:u}function io(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function yl(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 oo(){var e=Bd;return Bd<<=1,(Bd&62914560)===0&&(Bd=4194304),e}function bl(e){for(var n=[],o=0;31>o;o++)n.push(e);return n}function No(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function as(e,n,o,a,u,f){var p=e.pendingLanes;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=o,e.entangledLanes&=o,e.errorRecoveryDisabledLanes&=o,e.shellSuspendCounter=0;var{entanglements:g,expirationTimes:v,hiddenUpdates:x}=e;for(o=p&~o;0<o;){var D=31-Hn(o),O=1<<D;g[D]=0,v[D]=-1;var A=x[D];if(A!==null)for(x[D]=null,D=0;D<A.length;D++){var B=A[D];B!==null&&(B.lane&=-536870913)}o&=~O}a!==0&&cr(e,a,0),f!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=f&~(p&~n))}function cr(e,n,o){e.pendingLanes|=n,e.suspendedLanes&=~n;var a=31-Hn(n);e.entangledLanes|=n,e.entanglements[a]=e.entanglements[a]|1073741824|o&261930}function fr(e,n){var o=e.entangledLanes|=n;for(e=e.entanglements;o;){var a=31-Hn(o),u=1<<a;u&n|e[a]&n&&(e[a]|=n),o&=~u}}function Ju(e,n){var o=n&-n;return o=(o&42)!==0?1:Bi(o),(o&(e.suspendedLanes|n))!==0?0:o}function Bi(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ln(e,n,o){if(ol)for(e=e.pendingUpdatersLaneMap;0<o;){var a=31-Hn(o),u=1<<a;e[a].add(n),o&=~u}}function hr(e,n){if(ol)for(var{pendingUpdatersLaneMap:o,memoizedUpdaters:a}=e;0<n;){var u=31-Hn(n);e=1<<u,u=o[u],0<u.size&&(u.forEach(function(f){var p=f.alternate;p!==null&&a.has(p)||a.add(f)}),u.clear()),n&=~e}}function ui(e){return e&=-e,vi!==0&&vi<e?po!==0&&po<e?(e&134217727)!==0?ll:zd:po:vi}function ie(){var e=Ze.p;if(e!==0)return e;return e=window.event,e===void 0?ll:fk(e.type)}function qt(e,n){var o=Ze.p;try{return Ze.p=e,n()}finally{Ze.p=o}}function dr(e){delete e[vn],delete e[Nn],delete e[iy],delete e[JL],delete e[ZL]}function _o(e){var n=e[vn];if(n)return n;for(var o=e.parentNode;o;){if(n=o[Cs]||o[vn]){if(o=n.alternate,n.child!==null||o!==null&&o.child!==null)for(e=Jx(e);e!==null;){if(o=e[vn])return o;e=Jx(e)}return n}e=o,o=e.parentNode}return null}function Bn(e){if(e=e[vn]||e[Cs]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function vl(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function lo(e){var n=e[Ek];return n||(n=e[Ek]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Mt(e){e[qc]=!0}function so(e,n){Sl(e,n),Sl(e+"Capture",n)}function Sl(e,n){Ta[e]&&console.error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",e),Ta[e]=n;var o=e.toLowerCase();oy[o]=e,e==="onDoubleClick"&&(oy.ondblclick=e);for(e=0;e<n.length;e++)Mk.add(n[e])}function wl(e,n){KL[n.type]||n.onChange||n.onInput||n.readOnly||n.disabled||n.value==null||(e==="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`.")),n.onChange||n.readOnly||n.disabled||n.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 Zu(e){if(ho.call(Ok,e))return!0;if(ho.call(Dk,e))return!1;if(eB.test(e))return Ok[e]=!0;return Dk[e]=!0,console.error("Invalid attribute name: `%s`",e),!1}function pr(e,n,o){if(Zu(n)){if(!e.hasAttribute(n)){switch(typeof o){case"symbol":case"object":return o;case"function":return o;case"boolean":if(o===!1)return o}return o===void 0?void 0:null}if(e=e.getAttribute(n),e===""&&o===!0)return!0;return be(o,n),e===""+o?o:e}}function mr(e,n,o){if(Zu(n))if(o===null)e.removeAttribute(n);else{switch(typeof o){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var a=n.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(n);return}}be(o,n),e.setAttribute(n,""+o)}}function rs(e,n,o){if(o===null)e.removeAttribute(n);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}be(o,n),e.setAttribute(n,""+o)}}function ao(e,n,o,a){if(a===null)e.removeAttribute(o);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(o);return}be(a,o),e.setAttributeNS(n,o,""+a)}}function Fn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return Ho(e),e;default:return""}}function Sh(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Vm(e,n,o){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof a<"u"&&typeof a.get==="function"&&typeof a.set==="function"){var{get:u,set:f}=a;return Object.defineProperty(e,n,{configurable:!0,get:function(){return u.call(this)},set:function(p){Ho(p),o=""+p,f.call(this,p)}}),Object.defineProperty(e,n,{enumerable:a.enumerable}),{getValue:function(){return o},setValue:function(p){Ho(p),o=""+p},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Ku(e){if(!e._valueTracker){var n=Sh(e)?"checked":"value";e._valueTracker=Vm(e,n,""+e[n])}}function wh(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var o=n.getValue(),a="";return e&&(a=Sh(e)?e.checked?"true":"false":e.value),e=a,e!==o?(n.setValue(e),!0):!1}function gr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch(n){return e.body}}function Jn(e){return e.replace(tB,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function xh(e,n){n.checked===void 0||n.defaultChecked===void 0||Lk||(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",Lt()||"A component",n.type),Lk=!0),n.value===void 0||n.defaultValue===void 0||Rk||(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",Lt()||"A component",n.type),Rk=!0)}function zi(e,n,o,a,u,f,p,g){if(e.name="",p!=null&&typeof p!=="function"&&typeof p!=="symbol"&&typeof p!=="boolean"?(be(p,"type"),e.type=p):e.removeAttribute("type"),n!=null)if(p==="number"){if(n===0&&e.value===""||e.value!=n)e.value=""+Fn(n)}else e.value!==""+Fn(n)&&(e.value=""+Fn(n));else p!=="submit"&&p!=="reset"||e.removeAttribute("value");n!=null?U(e,p,Fn(n)):o!=null?U(e,p,Fn(o)):a!=null&&e.removeAttribute("value"),u==null&&f!=null&&(e.defaultChecked=!!f),u!=null&&(e.checked=u&&typeof u!=="function"&&typeof u!=="symbol"),g!=null&&typeof g!=="function"&&typeof g!=="symbol"&&typeof g!=="boolean"?(be(g,"name"),e.name=""+Fn(g)):e.removeAttribute("name")}function ec(e,n,o,a,u,f,p,g){if(f!=null&&typeof f!=="function"&&typeof f!=="symbol"&&typeof f!=="boolean"&&(be(f,"type"),e.type=f),n!=null||o!=null){if(!(f!=="submit"&&f!=="reset"||n!==void 0&&n!==null)){Ku(e);return}o=o!=null?""+Fn(o):"",n=n!=null?""+Fn(n):o,g||n===e.value||(e.value=n),e.defaultValue=n}a=a!=null?a:u,a=typeof a!=="function"&&typeof a!=="symbol"&&!!a,e.checked=g?e.checked:!!a,e.defaultChecked=!!a,p!=null&&typeof p!=="function"&&typeof p!=="symbol"&&typeof p!=="boolean"&&(be(p,"name"),e.name=p),Ku(e)}function U(e,n,o){n==="number"&&gr(e.ownerDocument)===e||e.defaultValue===""+o||(e.defaultValue=""+o)}function le(e,n){n.value==null&&(typeof n.children==="object"&&n.children!==null?yu.Children.forEach(n.children,function(o){o==null||typeof o==="string"||typeof o==="number"||typeof o==="bigint"||zk||(zk=!0,console.error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>."))}):n.dangerouslySetInnerHTML==null||Hk||(Hk=!0,console.error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),n.selected==null||Bk||(console.error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),Bk=!0)}function Oe(){var e=Lt();return e?`
17
+ `+g.stack}return p}function Y(e,n,o,a,u,f,p){var g=gi;ai(e);try{return e!==null&&e._debugTask?e._debugTask.run(n.bind(null,o,a,u,f,p)):n(o,a,u,f,p)}finally{ai(g)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function ai(e){H.getCurrentStack=e===null?null:_e,nl=!1,gi=e}function lt(e){return typeof Symbol==="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}function Ut(e){try{return Et(e),!1}catch(n){return!0}}function Et(e){return""+e}function be(e,n){if(Ut(e))return console.error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",n,lt(e)),Et(e)}function Ke(e,n){if(Ut(e))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.",n,lt(e)),Et(e)}function zo(e){if(Ut(e))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.",lt(e)),Et(e)}function ma(e){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var n=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(n.isDisabled)return!0;if(!n.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{Vr=n.inject(e),An=n}catch(o){console.error("React instrumentation encountered an error: %o.",o)}return n.checkDCE?!0:!1}function Fe(e){if(typeof GL==="function"&&WL(e),An&&typeof An.setStrictMode==="function")try{An.setStrictMode(Vr,e)}catch(n){il||(il=!0,console.error("React instrumentation encountered an error: %o",n))}}function Di(e){return e>>>=0,e===0?32:31-(FL(e)/JL|0)|0}function Oi(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&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."),e}}function to(e,n,o){var a=e.pendingLanes;if(a===0)return 0;var u=0,f=e.suspendedLanes,p=e.pingedLanes;e=e.warmLanes;var g=a&134217727;return g!==0?(a=g&~f,a!==0?u=Oi(a):(p&=g,p!==0?u=Oi(p):o||(o=g&~e,o!==0&&(u=Oi(o))))):(g=a&~f,g!==0?u=Oi(g):p!==0?u=Oi(p):o||(o=a&~e,o!==0&&(u=Oi(o)))),u===0?0:n!==0&&n!==u&&(n&f)===0&&(f=u&-u,o=n&-n,f>=o||f===32&&(o&4194048)!==0)?n:u}function no(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function gl(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 io(){var e=Hd;return Hd<<=1,(Hd&62914560)===0&&(Hd=4194304),e}function yl(e){for(var n=[],o=0;31>o;o++)n.push(e);return n}function Ho(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function rs(e,n,o,a,u,f){var p=e.pendingLanes;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=o,e.entangledLanes&=o,e.errorRecoveryDisabledLanes&=o,e.shellSuspendCounter=0;var{entanglements:g,expirationTimes:v,hiddenUpdates:x}=e;for(o=p&~o;0<o;){var D=31-zn(o),O=1<<D;g[D]=0,v[D]=-1;var A=x[D];if(A!==null)for(x[D]=null,D=0;D<A.length;D++){var B=A[D];B!==null&&(B.lane&=-536870913)}o&=~O}a!==0&&us(e,a,0),f!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=f&~(p&~n))}function us(e,n,o){e.pendingLanes|=n,e.suspendedLanes&=~n;var a=31-zn(n);e.entangledLanes|=n,e.entanglements[a]=e.entanglements[a]|1073741824|o&261930}function gr(e,n){var o=e.entangledLanes|=n;for(e=e.entanglements;o;){var a=31-zn(o),u=1<<a;u&n|e[a]&n&&(e[a]|=n),o&=~u}}function Ku(e,n){var o=n&-n;return o=(o&42)!==0?1:Ri(o),(o&(e.suspendedLanes|n))!==0?0:o}function Ri(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Li(e,n,o){if(ol)for(e=e.pendingUpdatersLaneMap;0<o;){var a=31-zn(o),u=1<<a;e[a].add(n),o&=~u}}function bl(e,n){if(ol)for(var{pendingUpdatersLaneMap:o,memoizedUpdaters:a}=e;0<n;){var u=31-zn(n);e=1<<u,u=o[u],0<u.size&&(u.forEach(function(f){var p=f.alternate;p!==null&&a.has(p)||a.add(f)}),u.clear()),n&=~e}}function No(e){return e&=-e,yi!==0&&yi<e?ho!==0&&ho<e?(e&134217727)!==0?ll:Nd:ho:yi}function vl(){var e=Ze.p;if(e!==0)return e;return e=window.event,e===void 0?ll:fk(e.type)}function ee(e,n){var o=Ze.p;try{return Ze.p=e,n()}finally{Ze.p=o}}function Rn(e){delete e[bn],delete e[Hn],delete e[iy],delete e[ZL],delete e[KL]}function _o(e){var n=e[bn];if(n)return n;for(var o=e.parentNode;o;){if(n=o[Ts]||o[bn]){if(o=n.alternate,n.child!==null||o!==null&&o.child!==null)for(e=Jx(e);e!==null;){if(o=e[bn])return o;e=Jx(e)}return n}e=o,o=e.parentNode}return null}function Ln(e){if(e=e[bn]||e[Ts]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function Sl(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function oo(e){var n=e[Ek];return n||(n=e[Ek]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Mt(e){e[jc]=!0}function lo(e,n){wl(e,n),wl(e+"Capture",n)}function wl(e,n){Ra[e]&&console.error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",e),Ra[e]=n;var o=e.toLowerCase();oy[o]=e,e==="onDoubleClick"&&(oy.ondblclick=e);for(e=0;e<n.length;e++)Mk.add(n[e])}function xl(e,n){eB[n.type]||n.onChange||n.onInput||n.readOnly||n.disabled||n.value==null||(e==="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`.")),n.onChange||n.readOnly||n.disabled||n.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 ec(e){if(fo.call(Ok,e))return!0;if(fo.call(Dk,e))return!1;if(tB.test(e))return Ok[e]=!0;return Dk[e]=!0,console.error("Invalid attribute name: `%s`",e),!1}function yr(e,n,o){if(ec(n)){if(!e.hasAttribute(n)){switch(typeof o){case"symbol":case"object":return o;case"function":return o;case"boolean":if(o===!1)return o}return o===void 0?void 0:null}if(e=e.getAttribute(n),e===""&&o===!0)return!0;return be(o,n),e===""+o?o:e}}function br(e,n,o){if(ec(n))if(o===null)e.removeAttribute(n);else{switch(typeof o){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var a=n.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(n);return}}be(o,n),e.setAttribute(n,""+o)}}function cs(e,n,o){if(o===null)e.removeAttribute(n);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}be(o,n),e.setAttribute(n,""+o)}}function so(e,n,o,a){if(a===null)e.removeAttribute(o);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(o);return}be(a,o),e.setAttributeNS(n,o,""+a)}}function Wn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return zo(e),e;default:return""}}function xh(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Vm(e,n,o){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof a<"u"&&typeof a.get==="function"&&typeof a.set==="function"){var{get:u,set:f}=a;return Object.defineProperty(e,n,{configurable:!0,get:function(){return u.call(this)},set:function(p){zo(p),o=""+p,f.call(this,p)}}),Object.defineProperty(e,n,{enumerable:a.enumerable}),{getValue:function(){return o},setValue:function(p){zo(p),o=""+p},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function tc(e){if(!e._valueTracker){var n=xh(e)?"checked":"value";e._valueTracker=Vm(e,n,""+e[n])}}function kh(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var o=n.getValue(),a="";return e&&(a=xh(e)?e.checked?"true":"false":e.value),e=a,e!==o?(n.setValue(e),!0):!1}function vr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch(n){return e.body}}function Fn(e){return e.replace(nB,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Ch(e,n){n.checked===void 0||n.defaultChecked===void 0||Lk||(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",Lt()||"A component",n.type),Lk=!0),n.value===void 0||n.defaultValue===void 0||Rk||(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",Lt()||"A component",n.type),Rk=!0)}function Bi(e,n,o,a,u,f,p,g){if(e.name="",p!=null&&typeof p!=="function"&&typeof p!=="symbol"&&typeof p!=="boolean"?(be(p,"type"),e.type=p):e.removeAttribute("type"),n!=null)if(p==="number"){if(n===0&&e.value===""||e.value!=n)e.value=""+Wn(n)}else e.value!==""+Wn(n)&&(e.value=""+Wn(n));else p!=="submit"&&p!=="reset"||e.removeAttribute("value");n!=null?U(e,p,Wn(n)):o!=null?U(e,p,Wn(o)):a!=null&&e.removeAttribute("value"),u==null&&f!=null&&(e.defaultChecked=!!f),u!=null&&(e.checked=u&&typeof u!=="function"&&typeof u!=="symbol"),g!=null&&typeof g!=="function"&&typeof g!=="symbol"&&typeof g!=="boolean"?(be(g,"name"),e.name=""+Wn(g)):e.removeAttribute("name")}function nc(e,n,o,a,u,f,p,g){if(f!=null&&typeof f!=="function"&&typeof f!=="symbol"&&typeof f!=="boolean"&&(be(f,"type"),e.type=f),n!=null||o!=null){if(!(f!=="submit"&&f!=="reset"||n!==void 0&&n!==null)){tc(e);return}o=o!=null?""+Wn(o):"",n=n!=null?""+Wn(n):o,g||n===e.value||(e.value=n),e.defaultValue=n}a=a!=null?a:u,a=typeof a!=="function"&&typeof a!=="symbol"&&!!a,e.checked=g?e.checked:!!a,e.defaultChecked=!!a,p!=null&&typeof p!=="function"&&typeof p!=="symbol"&&typeof p!=="boolean"&&(be(p,"name"),e.name=p),tc(e)}function U(e,n,o){n==="number"&&vr(e.ownerDocument)===e||e.defaultValue===""+o||(e.defaultValue=""+o)}function le(e,n){n.value==null&&(typeof n.children==="object"&&n.children!==null?Su.Children.forEach(n.children,function(o){o==null||typeof o==="string"||typeof o==="number"||typeof o==="bigint"||zk||(zk=!0,console.error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>."))}):n.dangerouslySetInnerHTML==null||Hk||(Hk=!0,console.error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),n.selected==null||Bk||(console.error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),Bk=!0)}function De(){var e=Lt();return e?`
18
18
 
19
- Check the render method of \``+e+"`.":""}function ve(e,n,o,a){if(e=e.options,n){n={};for(var u=0;u<o.length;u++)n["$"+o[u]]=!0;for(o=0;o<e.length;o++)u=n.hasOwnProperty("$"+e[o].value),e[o].selected!==u&&(e[o].selected=u),u&&a&&(e[o].defaultSelected=!0)}else{o=""+Fn(o),n=null;for(u=0;u<e.length;u++){if(e[u].value===o){e[u].selected=!0,a&&(e[u].defaultSelected=!0);return}n!==null||e[u].disabled||(n=e[u])}n!==null&&(n.selected=!0)}}function Te(e,n){for(e=0;e<_k.length;e++){var o=_k[e];if(n[o]!=null){var a=ln(n[o]);n.multiple&&!a?console.error("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",o,Oe()):!n.multiple&&a&&console.error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",o,Oe())}}n.value===void 0||n.defaultValue===void 0||Nk||(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"),Nk=!0)}function Ue(e,n){n.value===void 0||n.defaultValue===void 0||Uk||(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",Lt()||"A component"),Uk=!0),n.children!=null&&n.value==null&&console.error("Use the `defaultValue` or `value` props instead of setting children on <textarea>.")}function xl(e,n,o){if(n!=null&&(n=""+Fn(n),n!==e.value&&(e.value=n),o==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=o!=null?""+Fn(o):""}function kl(e,n,o,a){if(n==null){if(a!=null){if(o!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(ln(a)){if(1<a.length)throw Error("<textarea> can only have at most one child.");a=a[0]}o=a}o==null&&(o=""),n=o}o=Fn(n),e.defaultValue=o,a=e.textContent,a===o&&a!==""&&a!==null&&(e.value=a),Ku(e)}function ro(e,n){return e.serverProps===void 0&&e.serverTail.length===0&&e.children.length===1&&3<e.distanceFromLeaf&&e.distanceFromLeaf>15-n?ro(e.children[0],n):e}function on(e){return" "+" ".repeat(e)}function yr(e){return"+ "+" ".repeat(e)}function fa(e){return"- "+" ".repeat(e)}function B1(e){switch(e.tag){case 26:case 27:case 5:return e.type;case 16:return"Lazy";case 31:return"Activity";case 13:return"Suspense";case 19:return"SuspenseList";case 0:case 15:return e=e.type,e.displayName||e.name||null;case 11:return e=e.type.render,e.displayName||e.name||null;case 1:return e=e.type,e.displayName||e.name||null;default:return null}}function tc(e,n){return qk.test(e)?(e=JSON.stringify(e),e.length>n-2?8>n?'{"..."}':"{"+e.slice(0,n-7)+'..."}':"{"+e+"}"):e.length>n?5>n?'{"..."}':e.slice(0,n-3)+"...":e}function kh(e,n,o){var a=120-2*o;if(n===null)return yr(o)+tc(e,a)+`
20
- `;if(typeof n==="string"){for(var u=0;u<n.length&&u<e.length&&n.charCodeAt(u)===e.charCodeAt(u);u++);return u>a-8&&10<u&&(e="..."+e.slice(u-8),n="..."+n.slice(u-8)),yr(o)+tc(e,a)+`
21
- `+fa(o)+tc(n,a)+`
22
- `}return on(o)+tc(e,a)+`
23
- `}function Im(e){return Object.prototype.toString.call(e).replace(/^\[object (.*)\]$/,function(n,o){return o})}function nc(e,n){switch(typeof e){case"string":return e=JSON.stringify(e),e.length>n?5>n?'"..."':e.slice(0,n-4)+'..."':e;case"object":if(e===null)return"null";if(ln(e))return"[...]";if(e.$$typeof===el)return(n=je(e.type))?"<"+n+">":"<...>";var o=Im(e);if(o==="Object"){o="",n-=2;for(var a in e)if(e.hasOwnProperty(a)){var u=JSON.stringify(a);if(u!=='"'+a+'"'&&(a=u),n-=a.length-2,u=nc(e[a],15>n?n:15),n-=u.length,0>n){o+=o===""?"...":", ...";break}o+=(o===""?"":",")+a+":"+u}return"{"+o+"}"}return o;case"function":return(n=e.displayName||e.name)?"function "+n:"function";default:return String(e)}}function br(e,n){return typeof e!=="string"||qk.test(e)?"{"+nc(e,n-2)+"}":e.length>n-2?5>n?'"..."':'"'+e.slice(0,n-5)+'..."':'"'+e+'"'}function jm(e,n,o){var a=120-o.length-e.length,u=[],f;for(f in n)if(n.hasOwnProperty(f)&&f!=="children"){var p=br(n[f],120-o.length-f.length-1);a-=f.length+p.length+2,u.push(f+"="+p)}return u.length===0?o+"<"+e+`>
19
+ Check the render method of \``+e+"`.":""}function ve(e,n,o,a){if(e=e.options,n){n={};for(var u=0;u<o.length;u++)n["$"+o[u]]=!0;for(o=0;o<e.length;o++)u=n.hasOwnProperty("$"+e[o].value),e[o].selected!==u&&(e[o].selected=u),u&&a&&(e[o].defaultSelected=!0)}else{o=""+Wn(o),n=null;for(u=0;u<e.length;u++){if(e[u].value===o){e[u].selected=!0,a&&(e[u].defaultSelected=!0);return}n!==null||e[u].disabled||(n=e[u])}n!==null&&(n.selected=!0)}}function Ae(e,n){for(e=0;e<_k.length;e++){var o=_k[e];if(n[o]!=null){var a=on(n[o]);n.multiple&&!a?console.error("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",o,De()):!n.multiple&&a&&console.error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",o,De())}}n.value===void 0||n.defaultValue===void 0||Nk||(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"),Nk=!0)}function Ue(e,n){n.value===void 0||n.defaultValue===void 0||Uk||(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",Lt()||"A component"),Uk=!0),n.children!=null&&n.value==null&&console.error("Use the `defaultValue` or `value` props instead of setting children on <textarea>.")}function kl(e,n,o){if(n!=null&&(n=""+Wn(n),n!==e.value&&(e.value=n),o==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=o!=null?""+Wn(o):""}function Cl(e,n,o,a){if(n==null){if(a!=null){if(o!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(on(a)){if(1<a.length)throw Error("<textarea> can only have at most one child.");a=a[0]}o=a}o==null&&(o=""),n=o}o=Wn(n),e.defaultValue=o,a=e.textContent,a===o&&a!==""&&a!==null&&(e.value=a),tc(e)}function ao(e,n){return e.serverProps===void 0&&e.serverTail.length===0&&e.children.length===1&&3<e.distanceFromLeaf&&e.distanceFromLeaf>15-n?ao(e.children[0],n):e}function nn(e){return" "+" ".repeat(e)}function Sr(e){return"+ "+" ".repeat(e)}function ga(e){return"- "+" ".repeat(e)}function B1(e){switch(e.tag){case 26:case 27:case 5:return e.type;case 16:return"Lazy";case 31:return"Activity";case 13:return"Suspense";case 19:return"SuspenseList";case 0:case 15:return e=e.type,e.displayName||e.name||null;case 11:return e=e.type.render,e.displayName||e.name||null;case 1:return e=e.type,e.displayName||e.name||null;default:return null}}function ic(e,n){return qk.test(e)?(e=JSON.stringify(e),e.length>n-2?8>n?'{"..."}':"{"+e.slice(0,n-7)+'..."}':"{"+e+"}"):e.length>n?5>n?'{"..."}':e.slice(0,n-3)+"...":e}function Ah(e,n,o){var a=120-2*o;if(n===null)return Sr(o)+ic(e,a)+`
20
+ `;if(typeof n==="string"){for(var u=0;u<n.length&&u<e.length&&n.charCodeAt(u)===e.charCodeAt(u);u++);return u>a-8&&10<u&&(e="..."+e.slice(u-8),n="..."+n.slice(u-8)),Sr(o)+ic(e,a)+`
21
+ `+ga(o)+ic(n,a)+`
22
+ `}return nn(o)+ic(e,a)+`
23
+ `}function jm(e){return Object.prototype.toString.call(e).replace(/^\[object (.*)\]$/,function(n,o){return o})}function oc(e,n){switch(typeof e){case"string":return e=JSON.stringify(e),e.length>n?5>n?'"..."':e.slice(0,n-4)+'..."':e;case"object":if(e===null)return"null";if(on(e))return"[...]";if(e.$$typeof===el)return(n=Ie(e.type))?"<"+n+">":"<...>";var o=jm(e);if(o==="Object"){o="",n-=2;for(var a in e)if(e.hasOwnProperty(a)){var u=JSON.stringify(a);if(u!=='"'+a+'"'&&(a=u),n-=a.length-2,u=oc(e[a],15>n?n:15),n-=u.length,0>n){o+=o===""?"...":", ...";break}o+=(o===""?"":",")+a+":"+u}return"{"+o+"}"}return o;case"function":return(n=e.displayName||e.name)?"function "+n:"function";default:return String(e)}}function wr(e,n){return typeof e!=="string"||qk.test(e)?"{"+oc(e,n-2)+"}":e.length>n-2?5>n?'"..."':'"'+e.slice(0,n-5)+'..."':'"'+e+'"'}function Im(e,n,o){var a=120-o.length-e.length,u=[],f;for(f in n)if(n.hasOwnProperty(f)&&f!=="children"){var p=wr(n[f],120-o.length-f.length-1);a-=f.length+p.length+2,u.push(f+"="+p)}return u.length===0?o+"<"+e+`>
24
24
  `:0<a?o+"<"+e+" "+u.join(" ")+`>
25
25
  `:o+"<"+e+`
26
26
  `+o+" "+u.join(`
27
27
  `+o+" ")+`
28
28
  `+o+`>
29
- `}function JO(e,n,o){var a="",u=Me({},n),f;for(f in e)if(e.hasOwnProperty(f)){delete u[f];var p=120-2*o-f.length-2,g=nc(e[f],p);n.hasOwnProperty(f)?(p=nc(n[f],p),a+=yr(o)+f+": "+g+`
30
- `,a+=fa(o)+f+": "+p+`
31
- `):a+=yr(o)+f+": "+g+`
32
- `}for(var v in u)u.hasOwnProperty(v)&&(e=nc(u[v],120-2*o-v.length-2),a+=fa(o)+v+": "+e+`
33
- `);return a}function ZO(e,n,o,a){var u="",f=new Map;for(x in o)o.hasOwnProperty(x)&&f.set(x.toLowerCase(),x);if(f.size===1&&f.has("children"))u+=jm(e,n,on(a));else{for(var p in n)if(n.hasOwnProperty(p)&&p!=="children"){var g=120-2*(a+1)-p.length-1,v=f.get(p.toLowerCase());if(v!==void 0){f.delete(p.toLowerCase());var x=n[p];v=o[v];var D=br(x,g);g=br(v,g),typeof x==="object"&&x!==null&&typeof v==="object"&&v!==null&&Im(x)==="Object"&&Im(v)==="Object"&&(2<Object.keys(x).length||2<Object.keys(v).length||-1<D.indexOf("...")||-1<g.indexOf("..."))?u+=on(a+1)+p+`={{
34
- `+JO(x,v,a+2)+on(a+1)+`}}
35
- `:(u+=yr(a+1)+p+"="+D+`
36
- `,u+=fa(a+1)+p+"="+g+`
37
- `)}else u+=on(a+1)+p+"="+br(n[p],g)+`
38
- `}f.forEach(function(O){if(O!=="children"){var A=120-2*(a+1)-O.length-1;u+=fa(a+1)+O+"="+br(o[O],A)+`
39
- `}}),u=u===""?on(a)+"<"+e+`>
40
- `:on(a)+"<"+e+`
41
- `+u+on(a)+`>
42
- `}if(e=o.children,n=n.children,typeof e==="string"||typeof e==="number"||typeof e==="bigint"){if(f="",typeof n==="string"||typeof n==="number"||typeof n==="bigint")f=""+n;u+=kh(f,""+e,a+1)}else if(typeof n==="string"||typeof n==="number"||typeof n==="bigint")u=e==null?u+kh(""+n,null,a+1):u+kh(""+n,void 0,a+1);return u}function z1(e,n){var o=B1(e);if(o===null){o="";for(e=e.child;e;)o+=z1(e,n),e=e.sibling;return o}return on(n)+"<"+o+`>
43
- `}function $m(e,n){var o=ro(e,n);if(o!==e&&(e.children.length!==1||e.children[0]!==o))return on(n)+`...
44
- `+$m(o,n+1);o="";var a=e.fiber._debugInfo;if(a)for(var u=0;u<a.length;u++){var f=a[u].name;typeof f==="string"&&(o+=on(n)+"<"+f+`>
45
- `,n++)}if(a="",u=e.fiber.pendingProps,e.fiber.tag===6)a=kh(u,e.serverProps,n),n++;else if(f=B1(e.fiber),f!==null)if(e.serverProps===void 0){a=n;var p=120-2*a-f.length-2,g="";for(x in u)if(u.hasOwnProperty(x)&&x!=="children"){var v=br(u[x],15);if(p-=x.length+v.length+2,0>p){g+=" ...";break}g+=" "+x+"="+v}a=on(a)+"<"+f+g+`>
46
- `,n++}else e.serverProps===null?(a=jm(f,u,yr(n)),n++):typeof e.serverProps==="string"?console.error("Should not have matched a non HostText fiber to a Text node. This is a bug in React."):(a=ZO(f,u,e.serverProps,n),n++);var x="";u=e.fiber.child;for(f=0;u&&f<e.children.length;)p=e.children[f],p.fiber===u?(x+=$m(p,n),f++):x+=z1(u,n),u=u.sibling;u&&0<e.children.length&&(x+=on(n)+`...
47
- `),u=e.serverTail,e.serverProps===null&&n--;for(e=0;e<u.length;e++)f=u[e],x=typeof f==="string"?x+(fa(n)+tc(f,120-2*n)+`
48
- `):x+jm(f.type,f.props,fa(n));return o+a+x}function Pm(e){try{return`
49
-
50
- `+$m(e,0)}catch(n){return""}}function H1(e,n,o){for(var a=n,u=null,f=0;a;)a===e&&(f=0),u={fiber:a,children:u!==null?[u]:[],serverProps:a===n?o:a===e?null:void 0,serverTail:[],distanceFromLeaf:f},f++,a=a.return;return u!==null?Pm(u).replaceAll(/^[+-]/gm,">"):""}function N1(e,n){var o=Me({},e||Ik),a={tag:n};if(Vk.indexOf(n)!==-1&&(o.aTagInScope=null,o.buttonTagInScope=null,o.nobrTagInScope=null),iB.indexOf(n)!==-1&&(o.pTagInButtonScope=null),nB.indexOf(n)!==-1&&n!=="address"&&n!=="div"&&n!=="p"&&(o.listItemTagAutoclosing=null,o.dlItemTagAutoclosing=null),o.current=a,n==="form"&&(o.formTag=a),n==="a"&&(o.aTagInScope=a),n==="button"&&(o.buttonTagInScope=a),n==="nobr"&&(o.nobrTagInScope=a),n==="p"&&(o.pTagInButtonScope=a),n==="li"&&(o.listItemTagAutoclosing=a),n==="dd"||n==="dt")o.dlItemTagAutoclosing=a;return n==="#document"||n==="html"?o.containerTagInScope=null:o.containerTagInScope||(o.containerTagInScope=a),e!==null||n!=="#document"&&n!=="html"&&n!=="body"?o.implicitRootScope===!0&&(o.implicitRootScope=!1):o.implicitRootScope=!0,o}function _1(e,n,o){switch(n){case"select":return e==="hr"||e==="option"||e==="optgroup"||e==="script"||e==="template"||e==="#text";case"optgroup":return e==="option"||e==="#text";case"option":return e==="#text";case"tr":return e==="th"||e==="td"||e==="style"||e==="script"||e==="template";case"tbody":case"thead":case"tfoot":return e==="tr"||e==="style"||e==="script"||e==="template";case"colgroup":return e==="col"||e==="template";case"table":return e==="caption"||e==="colgroup"||e==="tbody"||e==="tfoot"||e==="thead"||e==="style"||e==="script"||e==="template";case"head":return e==="base"||e==="basefont"||e==="bgsound"||e==="link"||e==="meta"||e==="title"||e==="noscript"||e==="noframes"||e==="style"||e==="script"||e==="template";case"html":if(o)break;return e==="head"||e==="body"||e==="frameset";case"frameset":return e==="frame";case"#document":if(!o)return e==="html"}switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return n!=="h1"&&n!=="h2"&&n!=="h3"&&n!=="h4"&&n!=="h5"&&n!=="h6";case"rp":case"rt":return oB.indexOf(n)===-1;case"caption":case"col":case"colgroup":case"frameset":case"frame":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return n==null;case"head":return o||n===null;case"html":return o&&n==="#document"||n===null;case"body":return o&&(n==="#document"||n==="html")||n===null}return!0}function KO(e,n){switch(e){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 n.pTagInButtonScope;case"form":return n.formTag||n.pTagInButtonScope;case"li":return n.listItemTagAutoclosing;case"dd":case"dt":return n.dlItemTagAutoclosing;case"button":return n.buttonTagInScope;case"a":return n.aTagInScope;case"nobr":return n.nobrTagInScope}return null}function U1(e,n){for(;e;){switch(e.tag){case 5:case 26:case 27:if(e.type===n)return e}e=e.return}return null}function Ym(e,n){n=n||Ik;var o=n.current;if(n=(o=_1(e,o&&o.tag,n.implicitRootScope)?null:o)?null:KO(e,n),n=o||n,!n)return!0;var a=n.tag;if(n=String(!!o)+"|"+e+"|"+a,Hd[n])return!1;Hd[n]=!0;var u=(n=bi)?U1(n.return,a):null,f=n!==null&&u!==null?H1(u,n,null):"",p="<"+e+">";return o?(o="",a==="table"&&e==="tr"&&(o+=" 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
29
+ `}function ZO(e,n,o){var a="",u=Ee({},n),f;for(f in e)if(e.hasOwnProperty(f)){delete u[f];var p=120-2*o-f.length-2,g=oc(e[f],p);n.hasOwnProperty(f)?(p=oc(n[f],p),a+=Sr(o)+f+": "+g+`
30
+ `,a+=ga(o)+f+": "+p+`
31
+ `):a+=Sr(o)+f+": "+g+`
32
+ `}for(var v in u)u.hasOwnProperty(v)&&(e=oc(u[v],120-2*o-v.length-2),a+=ga(o)+v+": "+e+`
33
+ `);return a}function KO(e,n,o,a){var u="",f=new Map;for(x in o)o.hasOwnProperty(x)&&f.set(x.toLowerCase(),x);if(f.size===1&&f.has("children"))u+=Im(e,n,nn(a));else{for(var p in n)if(n.hasOwnProperty(p)&&p!=="children"){var g=120-2*(a+1)-p.length-1,v=f.get(p.toLowerCase());if(v!==void 0){f.delete(p.toLowerCase());var x=n[p];v=o[v];var D=wr(x,g);g=wr(v,g),typeof x==="object"&&x!==null&&typeof v==="object"&&v!==null&&jm(x)==="Object"&&jm(v)==="Object"&&(2<Object.keys(x).length||2<Object.keys(v).length||-1<D.indexOf("...")||-1<g.indexOf("..."))?u+=nn(a+1)+p+`={{
34
+ `+ZO(x,v,a+2)+nn(a+1)+`}}
35
+ `:(u+=Sr(a+1)+p+"="+D+`
36
+ `,u+=ga(a+1)+p+"="+g+`
37
+ `)}else u+=nn(a+1)+p+"="+wr(n[p],g)+`
38
+ `}f.forEach(function(O){if(O!=="children"){var A=120-2*(a+1)-O.length-1;u+=ga(a+1)+O+"="+wr(o[O],A)+`
39
+ `}}),u=u===""?nn(a)+"<"+e+`>
40
+ `:nn(a)+"<"+e+`
41
+ `+u+nn(a)+`>
42
+ `}if(e=o.children,n=n.children,typeof e==="string"||typeof e==="number"||typeof e==="bigint"){if(f="",typeof n==="string"||typeof n==="number"||typeof n==="bigint")f=""+n;u+=Ah(f,""+e,a+1)}else if(typeof n==="string"||typeof n==="number"||typeof n==="bigint")u=e==null?u+Ah(""+n,null,a+1):u+Ah(""+n,void 0,a+1);return u}function z1(e,n){var o=B1(e);if(o===null){o="";for(e=e.child;e;)o+=z1(e,n),e=e.sibling;return o}return nn(n)+"<"+o+`>
43
+ `}function $m(e,n){var o=ao(e,n);if(o!==e&&(e.children.length!==1||e.children[0]!==o))return nn(n)+`...
44
+ `+$m(o,n+1);o="";var a=e.fiber._debugInfo;if(a)for(var u=0;u<a.length;u++){var f=a[u].name;typeof f==="string"&&(o+=nn(n)+"<"+f+`>
45
+ `,n++)}if(a="",u=e.fiber.pendingProps,e.fiber.tag===6)a=Ah(u,e.serverProps,n),n++;else if(f=B1(e.fiber),f!==null)if(e.serverProps===void 0){a=n;var p=120-2*a-f.length-2,g="";for(x in u)if(u.hasOwnProperty(x)&&x!=="children"){var v=wr(u[x],15);if(p-=x.length+v.length+2,0>p){g+=" ...";break}g+=" "+x+"="+v}a=nn(a)+"<"+f+g+`>
46
+ `,n++}else e.serverProps===null?(a=Im(f,u,Sr(n)),n++):typeof e.serverProps==="string"?console.error("Should not have matched a non HostText fiber to a Text node. This is a bug in React."):(a=KO(f,u,e.serverProps,n),n++);var x="";u=e.fiber.child;for(f=0;u&&f<e.children.length;)p=e.children[f],p.fiber===u?(x+=$m(p,n),f++):x+=z1(u,n),u=u.sibling;u&&0<e.children.length&&(x+=nn(n)+`...
47
+ `),u=e.serverTail,e.serverProps===null&&n--;for(e=0;e<u.length;e++)f=u[e],x=typeof f==="string"?x+(ga(n)+ic(f,120-2*n)+`
48
+ `):x+Im(f.type,f.props,ga(n));return o+a+x}function Pm(e){try{return`
49
+
50
+ `+$m(e,0)}catch(n){return""}}function H1(e,n,o){for(var a=n,u=null,f=0;a;)a===e&&(f=0),u={fiber:a,children:u!==null?[u]:[],serverProps:a===n?o:a===e?null:void 0,serverTail:[],distanceFromLeaf:f},f++,a=a.return;return u!==null?Pm(u).replaceAll(/^[+-]/gm,">"):""}function N1(e,n){var o=Ee({},e||jk),a={tag:n};if(Vk.indexOf(n)!==-1&&(o.aTagInScope=null,o.buttonTagInScope=null,o.nobrTagInScope=null),oB.indexOf(n)!==-1&&(o.pTagInButtonScope=null),iB.indexOf(n)!==-1&&n!=="address"&&n!=="div"&&n!=="p"&&(o.listItemTagAutoclosing=null,o.dlItemTagAutoclosing=null),o.current=a,n==="form"&&(o.formTag=a),n==="a"&&(o.aTagInScope=a),n==="button"&&(o.buttonTagInScope=a),n==="nobr"&&(o.nobrTagInScope=a),n==="p"&&(o.pTagInButtonScope=a),n==="li"&&(o.listItemTagAutoclosing=a),n==="dd"||n==="dt")o.dlItemTagAutoclosing=a;return n==="#document"||n==="html"?o.containerTagInScope=null:o.containerTagInScope||(o.containerTagInScope=a),e!==null||n!=="#document"&&n!=="html"&&n!=="body"?o.implicitRootScope===!0&&(o.implicitRootScope=!1):o.implicitRootScope=!0,o}function _1(e,n,o){switch(n){case"select":return e==="hr"||e==="option"||e==="optgroup"||e==="script"||e==="template"||e==="#text";case"optgroup":return e==="option"||e==="#text";case"option":return e==="#text";case"tr":return e==="th"||e==="td"||e==="style"||e==="script"||e==="template";case"tbody":case"thead":case"tfoot":return e==="tr"||e==="style"||e==="script"||e==="template";case"colgroup":return e==="col"||e==="template";case"table":return e==="caption"||e==="colgroup"||e==="tbody"||e==="tfoot"||e==="thead"||e==="style"||e==="script"||e==="template";case"head":return e==="base"||e==="basefont"||e==="bgsound"||e==="link"||e==="meta"||e==="title"||e==="noscript"||e==="noframes"||e==="style"||e==="script"||e==="template";case"html":if(o)break;return e==="head"||e==="body"||e==="frameset";case"frameset":return e==="frame";case"#document":if(!o)return e==="html"}switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return n!=="h1"&&n!=="h2"&&n!=="h3"&&n!=="h4"&&n!=="h5"&&n!=="h6";case"rp":case"rt":return lB.indexOf(n)===-1;case"caption":case"col":case"colgroup":case"frameset":case"frame":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return n==null;case"head":return o||n===null;case"html":return o&&n==="#document"||n===null;case"body":return o&&(n==="#document"||n==="html")||n===null}return!0}function eR(e,n){switch(e){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 n.pTagInButtonScope;case"form":return n.formTag||n.pTagInButtonScope;case"li":return n.listItemTagAutoclosing;case"dd":case"dt":return n.dlItemTagAutoclosing;case"button":return n.buttonTagInScope;case"a":return n.aTagInScope;case"nobr":return n.nobrTagInScope}return null}function U1(e,n){for(;e;){switch(e.tag){case 5:case 26:case 27:if(e.type===n)return e}e=e.return}return null}function Ym(e,n){n=n||jk;var o=n.current;if(n=(o=_1(e,o&&o.tag,n.implicitRootScope)?null:o)?null:eR(e,n),n=o||n,!n)return!0;var a=n.tag;if(n=String(!!o)+"|"+e+"|"+a,_d[n])return!1;_d[n]=!0;var u=(n=gi)?U1(n.return,a):null,f=n!==null&&u!==null?H1(u,n,null):"",p="<"+e+">";return o?(o="",a==="table"&&e==="tr"&&(o+=" 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
51
51
  This will cause a hydration error.%s`,p,a,o,f)):console.error(`In HTML, %s cannot be a descendant of <%s>.
52
52
  This will cause a hydration error.%s`,p,a,f),n&&(e=n.return,u===null||e===null||u===e&&e._debugOwner===n._debugOwner||Y(u,function(){console.error(`<%s> cannot contain a nested %s.
53
- See this log for the ancestor stack trace.`,a,p)})),!1}function Ch(e,n,o){if(o||_1("#text",n,!1))return!0;if(o="#text|"+n,Hd[o])return!1;Hd[o]=!0;var a=(o=bi)?U1(o,n):null;return o=o!==null&&a!==null?H1(a,o,o.tag!==6?{children:null}:null):"",/\S/.test(e)?console.error(`In HTML, text nodes cannot be a child of <%s>.
53
+ See this log for the ancestor stack trace.`,a,p)})),!1}function Th(e,n,o){if(o||_1("#text",n,!1))return!0;if(o="#text|"+n,_d[o])return!1;_d[o]=!0;var a=(o=gi)?U1(o,n):null;return o=o!==null&&a!==null?H1(a,o,o.tag!==6?{children:null}:null):"",/\S/.test(e)?console.error(`In HTML, text nodes cannot be a child of <%s>.
54
54
  This will cause a hydration error.%s`,n,o):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.
55
- This will cause a hydration error.%s`,n,o),!1}function ic(e,n){if(n){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=n;return}}e.textContent=n}function eR(e){return e.replace(aB,function(n,o){return o.toUpperCase()})}function q1(e,n,o){var a=n.indexOf("--")===0;a||(-1<n.indexOf("-")?Ur.hasOwnProperty(n)&&Ur[n]||(Ur[n]=!0,console.error("Unsupported style property %s. Did you mean %s?",n,eR(n.replace(sB,"ms-")))):lB.test(n)?Ur.hasOwnProperty(n)&&Ur[n]||(Ur[n]=!0,console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?",n,n.charAt(0).toUpperCase()+n.slice(1))):!Pk.test(o)||sy.hasOwnProperty(o)&&sy[o]||(sy[o]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,n,o.replace(Pk,""))),typeof o==="number"&&(isNaN(o)?Yk||(Yk=!0,console.error("`NaN` is an invalid value for the `%s` css style property.",n)):isFinite(o)||Xk||(Xk=!0,console.error("`Infinity` is an invalid value for the `%s` css style property.",n)))),o==null||typeof o==="boolean"||o===""?a?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":a?e.setProperty(n,o):typeof o!=="number"||o===0||Qk.has(n)?n==="float"?e.cssFloat=o:(Ke(o,n),e[n]=(""+o).trim()):e[n]=o+"px"}function V1(e,n,o){if(n!=null&&typeof n!=="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(n&&Object.freeze(n),e=e.style,o!=null){if(n){var a={};if(o){for(var u in o)if(o.hasOwnProperty(u)&&!n.hasOwnProperty(u))for(var f=ly[u]||[u],p=0;p<f.length;p++)a[f[p]]=u}for(var g in n)if(n.hasOwnProperty(g)&&(!o||o[g]!==n[g]))for(u=ly[g]||[g],f=0;f<u.length;f++)a[u[f]]=g;g={};for(var v in n)for(u=ly[v]||[v],f=0;f<u.length;f++)g[u[f]]=v;v={};for(var x in a)if(u=a[x],(f=g[x])&&u!==f&&(p=u+","+f,!v[p])){v[p]=!0,p=console;var D=n[u];p.error.call(p,"%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.",D==null||typeof D==="boolean"||D===""?"Removing":"Updating",u,f)}}for(var O in o)!o.hasOwnProperty(O)||n!=null&&n.hasOwnProperty(O)||(O.indexOf("--")===0?e.setProperty(O,""):O==="float"?e.cssFloat="":e[O]="");for(var A in n)x=n[A],n.hasOwnProperty(A)&&o[A]!==x&&q1(e,A,x)}else for(a in n)n.hasOwnProperty(a)&&q1(e,a,n[a])}function oc(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function I1(e){return rB.get(e)||e}function tR(e,n){if(ho.call(Vr,n)&&Vr[n])return!0;if(cB.test(n)){if(e="aria-"+n.slice(4).toLowerCase(),e=Gk.hasOwnProperty(e)?e:null,e==null)return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",n),Vr[n]=!0;if(n!==e)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",n,e),Vr[n]=!0}if(uB.test(n)){if(e=n.toLowerCase(),e=Gk.hasOwnProperty(e)?e:null,e==null)return Vr[n]=!0,!1;n!==e&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",n,e),Vr[n]=!0)}return!0}function nR(e,n){var o=[],a;for(a in n)tR(e,a)||o.push(a);n=o.map(function(u){return"`"+u+"`"}).join(", "),o.length===1?console.error("Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",n,e):1<o.length&&console.error("Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",n,e)}function iR(e,n,o,a){if(ho.call(_n,n)&&_n[n])return!0;var u=n.toLowerCase();if(u==="onfocusin"||u==="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."),_n[n]=!0;if(typeof o==="function"&&(e==="form"&&n==="action"||e==="input"&&n==="formAction"||e==="button"&&n==="formAction"))return!0;if(a!=null){if(e=a.possibleRegistrationNames,a.registrationNameDependencies.hasOwnProperty(n))return!0;if(a=e.hasOwnProperty(u)?e[u]:null,a!=null)return console.error("Invalid event handler property `%s`. Did you mean `%s`?",n,a),_n[n]=!0;if(Fk.test(n))return console.error("Unknown event handler property `%s`. It will be ignored.",n),_n[n]=!0}else if(Fk.test(n))return fB.test(n)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",n),_n[n]=!0;if(hB.test(n)||dB.test(n))return!0;if(u==="innerhtml")return console.error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),_n[n]=!0;if(u==="aria")return console.error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),_n[n]=!0;if(u==="is"&&o!==null&&o!==void 0&&typeof o!=="string")return console.error("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof o),_n[n]=!0;if(typeof o==="number"&&isNaN(o))return console.error("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",n),_n[n]=!0;if(_d.hasOwnProperty(u)){if(u=_d[u],u!==n)return console.error("Invalid DOM property `%s`. Did you mean `%s`?",n,u),_n[n]=!0}else if(n!==u)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.",n,u),_n[n]=!0;switch(n){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 o){case"boolean":switch(n){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(u=n.toLowerCase().slice(0,5),u==="data-"||u==="aria-")return!0;return 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()}.',o,n,n,o,n):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.',o,n,n,o,n,n,n),_n[n]=!0}case"function":case"symbol":return _n[n]=!0,!1;case"string":if(o==="false"||o==="true"){switch(n){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}?",o,n,o==="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".',n,o),_n[n]=!0}}return!0}function oR(e,n,o){var a=[],u;for(u in n)iR(e,u,n[u],o)||a.push(u);n=a.map(function(f){return"`"+f+"`"}).join(", "),a.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 ",n,e):1<a.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 ",n,e)}function lc(e){return pB.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Cl(){}function Xm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}function j1(e){var n=Bn(e);if(n&&(e=n.stateNode)){var o=e[Nn]||null;e:switch(e=n.stateNode,n.type){case"input":if(zi(e,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),n=o.name,o.type==="radio"&&n!=null){for(o=e;o.parentNode;)o=o.parentNode;be(n,"name"),o=o.querySelectorAll('input[name="'+Jn(""+n)+'"][type="radio"]');for(n=0;n<o.length;n++){var a=o[n];if(a!==e&&a.form===e.form){var u=a[Nn]||null;if(!u)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");zi(a,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(n=0;n<o.length;n++)a=o[n],a.form===e.form&&wh(a)}break e;case"textarea":xl(e,o.value,o.defaultValue);break e;case"select":n=o.value,n!=null&&ve(e,!!o.multiple,n,!1)}}}function $1(e,n,o){if(ay)return e(n,o);ay=!0;try{var a=e(n);return a}finally{if(ay=!1,Ir!==null||jr!==null){if(Mr(),Ir&&(n=Ir,e=jr,jr=Ir=null,j1(n),e))for(n=0;n<e.length;n++)j1(e[n])}}}function sc(e,n){var o=e.stateNode;if(o===null)return null;var a=o[Nn]||null;if(a===null)return null;o=a[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(o&&typeof o!=="function")throw Error("Expected `"+n+"` listener to be a function, instead got a value of `"+typeof o+"` type.");return o}function P1(){if(Ud)return Ud;var e,n=uy,o=n.length,a,u="value"in As?As.value:As.textContent,f=u.length;for(e=0;e<o&&n[e]===u[e];e++);var p=o-e;for(a=1;a<=p&&n[o-a]===u[f-a];a++);return Ud=u.slice(e,1<a?1-a:void 0)}function Ah(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function Th(){return!0}function Y1(){return!1}function Zn(e){function n(o,a,u,f,p){this._reactName=o,this._targetInst=u,this.type=a,this.nativeEvent=f,this.target=p,this.currentTarget=null;for(var g in e)e.hasOwnProperty(g)&&(o=e[g],this[g]=o?o(f):f[g]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Th:Y1,this.isPropagationStopped=Y1,this}return Me(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!=="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=Th)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!=="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Th)},persist:function(){},isPersistent:Th}),n}function lR(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=EB[e])?!!n[e]:!1}function Qm(){return lR}function X1(e,n){switch(e){case"keyup":return qB.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==eC;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Q1(e){return e=e.detail,typeof e==="object"&&"data"in e?e.data:null}function sR(e,n){switch(e){case"compositionend":return Q1(n);case"keypress":if(n.which!==nC)return null;return oC=!0,iC;case"textInput":return e=n.data,e===iC&&oC?null:e;default:return null}}function aR(e,n){if($r)return e==="compositionend"||!dy&&X1(e,n)?(e=P1(),Ud=uy=As=null,$r=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return tC&&n.locale!=="ko"?null:n.data;default:return null}}function G1(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!IB[e.type]:n==="textarea"?!0:!1}function rR(e){if(!sl)return!1;e="on"+e;var n=e in document;return n||(n=document.createElement("div"),n.setAttribute(e,"return;"),n=typeof n[e]==="function"),n}function W1(e,n,o,a){Ir?jr?jr.push(a):jr=[a]:Ir=a,n=bd(n,"onChange"),0<n.length&&(o=new qd("onChange","change",null,o,a),e.push({event:o,listeners:n}))}function uR(e){Rx(e,0)}function Eh(e){var n=vl(e);if(wh(n))return e}function F1(e,n){if(e==="change")return n}function J1(){Yc&&(Yc.detachEvent("onpropertychange",Z1),Xc=Yc=null)}function Z1(e){if(e.propertyName==="value"&&Eh(Xc)){var n=[];W1(n,Xc,e,Xm(e)),$1(uR,n)}}function cR(e,n,o){e==="focusin"?(J1(),Yc=n,Xc=o,Yc.attachEvent("onpropertychange",Z1)):e==="focusout"&&J1()}function fR(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Eh(Xc)}function hR(e,n){if(e==="click")return Eh(n)}function dR(e,n){if(e==="input"||e==="change")return Eh(n)}function pR(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}function ac(e,n){if(Un(e,n))return!0;if(typeof e!=="object"||e===null||typeof n!=="object"||n===null)return!1;var o=Object.keys(e),a=Object.keys(n);if(o.length!==a.length)return!1;for(a=0;a<o.length;a++){var u=o[a];if(!ho.call(n,u)||!Un(e[u],n[u]))return!1}return!0}function K1(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function eS(e,n){var o=K1(e);e=0;for(var a;o;){if(o.nodeType===3){if(a=e+o.textContent.length,e<=n&&a>=n)return{node:o,offset:n-e};e=a}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=K1(o)}}function tS(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?tS(e,n.parentNode):("contains"in e)?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function nS(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=gr(e.document);n instanceof e.HTMLIFrameElement;){try{var o=typeof n.contentWindow.location.href==="string"}catch(a){o=!1}if(o)e=n.contentWindow;else break;n=gr(e.document)}return n}function Gm(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function iS(e,n,o){var a=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;my||Pr==null||Pr!==gr(a)||(a=Pr,("selectionStart"in a)&&Gm(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Qc&&ac(Qc,a)||(Qc=a,a=bd(py,"onSelect"),0<a.length&&(n=new qd("onSelect","select",null,n,o),e.push({event:n,listeners:a}),n.target=Pr)))}function ha(e,n){var o={};return o[e.toLowerCase()]=n.toLowerCase(),o["Webkit"+e]="webkit"+n,o["Moz"+e]="moz"+n,o}function da(e){if(gy[e])return gy[e];if(!Yr[e])return e;var n=Yr[e],o;for(o in n)if(n.hasOwnProperty(o)&&o in sC)return gy[e]=n[o];return e}function uo(e,n){fC.set(e,n),so(n,[e])}function mR(e){for(var n=Id,o=0;o<e.length;o++){var a=e[o];if(typeof a==="object"&&a!==null)if(ln(a)&&a.length===2&&typeof a[0]==="string"){if(n!==Id&&n!==wy)return vy;n=wy}else return vy;else{if(typeof a==="function"||typeof a==="string"&&50<a.length||n!==Id&&n!==Sy)return vy;n=Sy}}return n}function Wm(e,n,o,a){for(var u in e)ho.call(e,u)&&u[0]!=="_"&&Uo(u,e[u],n,o,a)}function Uo(e,n,o,a,u){switch(typeof n){case"object":if(n===null){n="null";break}else{if(n.$$typeof===el){var f=je(n.type)||"…",p=n.key;n=n.props;var g=Object.keys(n),v=g.length;if(p==null&&v===0){n="<"+f+" />";break}if(3>a||v===1&&g[0]==="children"&&p==null){n="<"+f+" … />";break}o.push([u+"  ".repeat(a)+e,"<"+f]),p!==null&&Uo("key",p,o,a+1,u),e=!1;for(var x in n)x==="children"?n.children!=null&&(!ln(n.children)||0<n.children.length)&&(e=!0):ho.call(n,x)&&x[0]!=="_"&&Uo(x,n[x],o,a+1,u);o.push(["",e?">…</"+f+">":"/>"]);return}if(f=Object.prototype.toString.call(n),f=f.slice(8,f.length-1),f==="Array"){if(x=mR(n),x===Sy||x===Id){n=JSON.stringify(n);break}else if(x===wy){o.push([u+"  ".repeat(a)+e,""]);for(e=0;e<n.length;e++)f=n[e],Uo(f[0],f[1],o,a+1,u);return}}if(f==="Promise"){if(n.status==="fulfilled"){if(f=o.length,Uo(e,n.value,o,a,u),o.length>f){o=o[f],o[1]="Promise<"+(o[1]||"Object")+">";return}}else if(n.status==="rejected"&&(f=o.length,Uo(e,n.reason,o,a,u),o.length>f)){o=o[f],o[1]="Rejected Promise<"+o[1]+">";return}o.push(["  ".repeat(a)+e,"Promise"]);return}f==="Object"&&(x=Object.getPrototypeOf(n))&&typeof x.constructor==="function"&&(f=x.constructor.name),o.push([u+"  ".repeat(a)+e,f==="Object"?3>a?"":"…":f]),3>a&&Wm(n,o,a+1,u);return}case"function":n=n.name===""?"() => {}":n.name+"() {}";break;case"string":n=n===GB?"…":JSON.stringify(n);break;case"undefined":n="undefined";break;case"boolean":n=n?"true":"false";break;default:n=String(n)}o.push([u+"  ".repeat(a)+e,n])}function oS(e,n,o,a){var u=!0;for(p in e)p in n||(o.push([jd+"  ".repeat(a)+p,"…"]),u=!1);for(var f in n)if(f in e){var p=e[f],g=n[f];if(p!==g){if(a===0&&f==="children")u="  ".repeat(a)+f,o.push([jd+u,"…"],[$d+u,"…"]);else{if(!(3<=a)){if(typeof p==="object"&&typeof g==="object"&&p!==null&&g!==null&&p.$$typeof===g.$$typeof)if(g.$$typeof===el){if(p.type===g.type&&p.key===g.key){p=je(g.type)||"…",u="  ".repeat(a)+f,p="<"+p+" … />",o.push([jd+u,p],[$d+u,p]),u=!1;continue}}else{var v=Object.prototype.toString.call(p),x=Object.prototype.toString.call(g);if(v===x&&(x==="[object Object]"||x==="[object Array]")){v=[pC+"  ".repeat(a)+f,x==="[object Array]"?"Array":""],o.push(v),x=o.length,oS(p,g,o,a+1)?x===o.length&&(v[1]="Referentially unequal but deeply equal objects. Consider memoization."):u=!1;continue}}else if(typeof p==="function"&&typeof g==="function"&&p.name===g.name&&p.length===g.length&&(v=Function.prototype.toString.call(p),x=Function.prototype.toString.call(g),v===x)){p=g.name===""?"() => {}":g.name+"() {}",o.push([pC+"  ".repeat(a)+f,p+" Referentially unequal function closure. Consider memoization."]);continue}}Uo(f,p,o,a,jd),Uo(f,g,o,a,$d)}u=!1}}else o.push([$d+"  ".repeat(a)+f,"…"]),u=!1;return u}function ci(e){Re=e&63?"Blocking":e&64?"Gesture":e&4194176?"Transition":e&62914560?"Suspense":e&2080374784?"Idle":"Other"}function qo(e,n,o,a){mt&&(Es.start=n,Es.end=o,Bl.color="warning",Bl.tooltipText=a,Bl.properties=null,(e=e._debugTask)?e.run(performance.measure.bind(performance,a,Es)):performance.measure(a,Es))}function Mh(e,n,o){qo(e,n,o,"Reconnect")}function Dh(e,n,o,a,u){var f=P(e);if(f!==null&&mt){var{alternate:p,actualDuration:g}=e;if(p===null||p.child!==e.child)for(var v=e.child;v!==null;v=v.sibling)g-=v.actualDuration;a=0.5>g?a?"tertiary-light":"primary-light":10>g?a?"tertiary":"primary":100>g?a?"tertiary-dark":"primary-dark":"error";var x=e.memoizedProps;g=e._debugTask,x!==null&&p!==null&&p.memoizedProps!==x?(v=[WB],x=oS(p.memoizedProps,x,v,0),1<v.length&&(x&&!Ts&&(p.lanes&u)===0&&100<e.actualDuration?(Ts=!0,v[0]=FB,Bl.color="warning",Bl.tooltipText=mC):(Bl.color=a,Bl.tooltipText=f),Bl.properties=v,Es.start=n,Es.end=o,g!=null?g.run(performance.measure.bind(performance,"​"+f,Es)):performance.measure("​"+f,Es))):g!=null?g.run(console.timeStamp.bind(console,f,n,o,Ni,void 0,a)):console.timeStamp(f,n,o,Ni,void 0,a)}}function Fm(e,n,o,a){if(mt){var u=P(e);if(u!==null){for(var f=null,p=[],g=0;g<a.length;g++){var v=a[g];f==null&&v.source!==null&&(f=v.source._debugTask),v=v.value,p.push(["Error",typeof v==="object"&&v!==null&&typeof v.message==="string"?String(v.message):String(v)])}e.key!==null&&Uo("key",e.key,p,0,""),e.memoizedProps!==null&&Wm(e.memoizedProps,p,0,""),f==null&&(f=e._debugTask),e={start:n,end:o,detail:{devtools:{color:"error",track:Ni,tooltipText:e.tag===13?"Hydration failed":"Error boundary caught an error",properties:p}}},f?f.run(performance.measure.bind(performance,"​"+u,e)):performance.measure("​"+u,e)}}}function Vo(e,n,o,a,u){if(u!==null){if(mt){var f=P(e);if(f!==null){a=[];for(var p=0;p<u.length;p++){var g=u[p].value;a.push(["Error",typeof g==="object"&&g!==null&&typeof g.message==="string"?String(g.message):String(g)])}e.key!==null&&Uo("key",e.key,a,0,""),e.memoizedProps!==null&&Wm(e.memoizedProps,a,0,""),n={start:n,end:o,detail:{devtools:{color:"error",track:Ni,tooltipText:"A lifecycle or effect errored",properties:a}}},(e=e._debugTask)?e.run(performance.measure.bind(performance,"​"+f,n)):performance.measure("​"+f,n)}}}else f=P(e),f!==null&&mt&&(u=1>a?"secondary-light":100>a?"secondary":500>a?"secondary-dark":"error",(e=e._debugTask)?e.run(console.timeStamp.bind(console,f,n,o,Ni,void 0,u)):console.timeStamp(f,n,o,Ni,void 0,u))}function gR(e,n,o,a){if(mt&&!(n<=e)){var u=(o&738197653)===o?"tertiary-dark":"primary-dark";o=(o&536870912)===o?"Prepared":(o&201326741)===o?"Hydrated":"Render",a?a.run(console.timeStamp.bind(console,o,e,n,Re,De,u)):console.timeStamp(o,e,n,Re,De,u)}}function lS(e,n,o,a){!mt||n<=e||(o=(o&738197653)===o?"tertiary-dark":"primary-dark",a?a.run(console.timeStamp.bind(console,"Prewarm",e,n,Re,De,o)):console.timeStamp("Prewarm",e,n,Re,De,o))}function sS(e,n,o,a){!mt||n<=e||(o=(o&738197653)===o?"tertiary-dark":"primary-dark",a?a.run(console.timeStamp.bind(console,"Suspended",e,n,Re,De,o)):console.timeStamp("Suspended",e,n,Re,De,o))}function yR(e,n,o,a,u,f){if(mt&&!(n<=e)){o=[];for(var p=0;p<a.length;p++){var g=a[p].value;o.push(["Recoverable Error",typeof g==="object"&&g!==null&&typeof g.message==="string"?String(g.message):String(g)])}e={start:e,end:n,detail:{devtools:{color:"primary-dark",track:Re,trackGroup:De,tooltipText:u?"Hydration Failed":"Recovered after Error",properties:o}}},f?f.run(performance.measure.bind(performance,"Recovered",e)):performance.measure("Recovered",e)}}function Jm(e,n,o,a){!mt||n<=e||(a?a.run(console.timeStamp.bind(console,"Errored",e,n,Re,De,"error")):console.timeStamp("Errored",e,n,Re,De,"error"))}function bR(e,n,o,a){!mt||n<=e||(a?a.run(console.timeStamp.bind(console,o,e,n,Re,De,"secondary-light")):console.timeStamp(o,e,n,Re,De,"secondary-light"))}function aS(e,n,o,a,u){if(mt&&!(n<=e)){for(var f=[],p=0;p<o.length;p++){var g=o[p].value;f.push(["Error",typeof g==="object"&&g!==null&&typeof g.message==="string"?String(g.message):String(g)])}e={start:e,end:n,detail:{devtools:{color:"error",track:Re,trackGroup:De,tooltipText:a?"Remaining Effects Errored":"Commit Errored",properties:f}}},u?u.run(performance.measure.bind(performance,"Errored",e)):performance.measure("Errored",e)}}function rc(e,n,o){!mt||n<=e||(o?o.run(console.timeStamp.bind(console,"Animating",e,n,Re,De,"secondary-dark")):console.timeStamp("Animating",e,n,Re,De,"secondary-dark"))}function Oh(){for(var e=Xr,n=xy=Xr=0;n<e;){var o=_i[n];_i[n++]=null;var a=_i[n];_i[n++]=null;var u=_i[n];_i[n++]=null;var f=_i[n];if(_i[n++]=null,a!==null&&u!==null){var p=a.pending;p===null?u.next=u:(u.next=p.next,p.next=u),a.pending=u}f!==0&&rS(o,u,f)}}function Rh(e,n,o,a){_i[Xr++]=e,_i[Xr++]=n,_i[Xr++]=o,_i[Xr++]=a,xy|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Zm(e,n,o,a){return Rh(e,n,o,a),Lh(e)}function An(e,n){return Rh(e,null,null,n),Lh(e)}function rS(e,n,o){e.lanes|=o;var a=e.alternate;a!==null&&(a.lanes|=o);for(var u=!1,f=e.return;f!==null;)f.childLanes|=o,a=f.alternate,a!==null&&(a.childLanes|=o),f.tag===22&&(e=f.stateNode,e===null||e._visibility&Gc||(u=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,u&&n!==null&&(u=31-Hn(o),e=f.hiddenUpdates,a=e[u],a===null?e[u]=[n]:a.push(n),n.lane=o|536870912),f):null}function Lh(e){if(xf>fz)throw ja=xf=0,kf=tb=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.");ja>hz&&(ja=0,kf=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.")),e.alternate===null&&(e.flags&4098)!==0&&Cx(e);for(var n=e,o=n.return;o!==null;)n.alternate===null&&(n.flags&4098)!==0&&Cx(e),n=o,o=n.return;return n.tag===3?n.stateNode:null}function pa(e){if(Ui===null)return e;var n=Ui(e);return n===void 0?e:n.current}function Km(e){if(Ui===null)return e;var n=Ui(e);return n===void 0?e!==null&&e!==void 0&&typeof e.render==="function"&&(n=pa(e.render),e.render!==n)?(n={$$typeof:Nc,render:n},e.displayName!==void 0&&(n.displayName=e.displayName),n):e:n.current}function uS(e,n){if(Ui===null)return!1;var o=e.elementType;n=n.type;var a=!1,u=typeof n==="object"&&n!==null?n.$$typeof:null;switch(e.tag){case 1:typeof n==="function"&&(a=!0);break;case 0:typeof n==="function"?a=!0:u===yi&&(a=!0);break;case 11:u===Nc?a=!0:u===yi&&(a=!0);break;case 14:case 15:u===Dd?a=!0:u===yi&&(a=!0);break;default:return!1}return a&&(e=Ui(o),e!==void 0&&e===Ui(n))?!0:!1}function cS(e){Ui!==null&&typeof WeakSet==="function"&&(Qr===null&&(Qr=new WeakSet),Qr.add(e))}function fS(e,n,o){do{var a=e,u=a.alternate,f=a.child,p=a.sibling,g=a.tag;a=a.type;var v=null;switch(g){case 0:case 15:case 1:v=a;break;case 11:v=a.render}if(Ui===null)throw Error("Expected resolveFamily to be set during hot reload.");var x=!1;if(a=!1,v!==null&&(v=Ui(v),v!==void 0&&(o.has(v)?a=!0:n.has(v)&&(g===1?a=!0:x=!0))),Qr!==null&&(Qr.has(e)||u!==null&&Qr.has(u))&&(a=!0),a&&(e._debugNeedsRemount=!0),a||x)u=An(e,2),u!==null&&Bt(u,e,2);if(f===null||a||fS(f,n,o),p===null)break;e=p}while(1)}function vR(e,n,o,a){this.tag=e,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,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,gC||typeof Object.preventExtensions!=="function"||Object.preventExtensions(this)}function eg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Al(e,n){var o=e.alternate;switch(o===null?(o=w(e.tag,n,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o._debugOwner=e._debugOwner,o._debugStack=e._debugStack,o._debugTask=e._debugTask,o._debugHookTypes=e._debugHookTypes,o.alternate=e,e.alternate=o):(o.pendingProps=n,o.type=e.type,o.flags=0,o.subtreeFlags=0,o.deletions=null,o.actualDuration=-0,o.actualStartTime=-1.1),o.flags=e.flags&65011712,o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,n=e.dependencies,o.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext,_debugThenableState:n._debugThenableState},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o.refCleanup=e.refCleanup,o.selfBaseDuration=e.selfBaseDuration,o.treeBaseDuration=e.treeBaseDuration,o._debugInfo=e._debugInfo,o._debugNeedsRemount=e._debugNeedsRemount,o.tag){case 0:case 15:o.type=pa(e.type);break;case 1:o.type=pa(e.type);break;case 11:o.type=Km(e.type)}return o}function hS(e,n){e.flags&=65011714;var o=e.alternate;return o===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null,e.selfBaseDuration=0,e.treeBaseDuration=0):(e.childLanes=o.childLanes,e.lanes=o.lanes,e.child=o.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=o.memoizedProps,e.memoizedState=o.memoizedState,e.updateQueue=o.updateQueue,e.type=o.type,n=o.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext,_debugThenableState:n._debugThenableState},e.selfBaseDuration=o.selfBaseDuration,e.treeBaseDuration=o.treeBaseDuration),e}function tg(e,n,o,a,u,f){var p=0,g=e;if(typeof e==="function")eg(e)&&(p=1),g=pa(g);else if(typeof e==="string")p=de(),p=ML(e,o,p)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Q0:return n=w(31,o,n,u),n.elementType=Q0,n.lanes=f,n;case Hr:return ma(o.children,u,f,n);case Md:p=8,u|=En,u|=mo;break;case $0:return e=o,a=u,typeof e.id!=="string"&&console.error('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof e.id),n=w(12,e,n,a|we),n.elementType=$0,n.lanes=f,n.stateNode={effectDuration:0,passiveEffectDuration:0},n;case Y0:return n=w(13,o,n,u),n.elementType=Y0,n.lanes=f,n;case X0:return n=w(19,o,n,u),n.elementType=X0,n.lanes=f,n;default:if(typeof e==="object"&&e!==null)switch(e.$$typeof){case tl:p=10;break e;case P0:p=9;break e;case Nc:p=11,g=Km(g);break e;case Dd:p=14;break e;case yi:p=16,g=null;break e}if(g="",e===void 0||typeof e==="object"&&e!==null&&Object.keys(e).length===0)g+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";e===null?o="null":ln(e)?o="array":e!==void 0&&e.$$typeof===el?(o="<"+(je(e.type)||"Unknown")+" />",g=" Did you accidentally export a JSX literal instead of a component?"):o=typeof e,(p=a?Tt(a):null)&&(g+=`
55
+ This will cause a hydration error.%s`,n,o),!1}function lc(e,n){if(n){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=n;return}}e.textContent=n}function tR(e){return e.replace(rB,function(n,o){return o.toUpperCase()})}function q1(e,n,o){var a=n.indexOf("--")===0;a||(-1<n.indexOf("-")?jr.hasOwnProperty(n)&&jr[n]||(jr[n]=!0,console.error("Unsupported style property %s. Did you mean %s?",n,tR(n.replace(aB,"ms-")))):sB.test(n)?jr.hasOwnProperty(n)&&jr[n]||(jr[n]=!0,console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?",n,n.charAt(0).toUpperCase()+n.slice(1))):!Pk.test(o)||sy.hasOwnProperty(o)&&sy[o]||(sy[o]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,n,o.replace(Pk,""))),typeof o==="number"&&(isNaN(o)?Yk||(Yk=!0,console.error("`NaN` is an invalid value for the `%s` css style property.",n)):isFinite(o)||Xk||(Xk=!0,console.error("`Infinity` is an invalid value for the `%s` css style property.",n)))),o==null||typeof o==="boolean"||o===""?a?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":a?e.setProperty(n,o):typeof o!=="number"||o===0||Qk.has(n)?n==="float"?e.cssFloat=o:(Ke(o,n),e[n]=(""+o).trim()):e[n]=o+"px"}function V1(e,n,o){if(n!=null&&typeof n!=="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(n&&Object.freeze(n),e=e.style,o!=null){if(n){var a={};if(o){for(var u in o)if(o.hasOwnProperty(u)&&!n.hasOwnProperty(u))for(var f=ly[u]||[u],p=0;p<f.length;p++)a[f[p]]=u}for(var g in n)if(n.hasOwnProperty(g)&&(!o||o[g]!==n[g]))for(u=ly[g]||[g],f=0;f<u.length;f++)a[u[f]]=g;g={};for(var v in n)for(u=ly[v]||[v],f=0;f<u.length;f++)g[u[f]]=v;v={};for(var x in a)if(u=a[x],(f=g[x])&&u!==f&&(p=u+","+f,!v[p])){v[p]=!0,p=console;var D=n[u];p.error.call(p,"%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.",D==null||typeof D==="boolean"||D===""?"Removing":"Updating",u,f)}}for(var O in o)!o.hasOwnProperty(O)||n!=null&&n.hasOwnProperty(O)||(O.indexOf("--")===0?e.setProperty(O,""):O==="float"?e.cssFloat="":e[O]="");for(var A in n)x=n[A],n.hasOwnProperty(A)&&o[A]!==x&&q1(e,A,x)}else for(a in n)n.hasOwnProperty(a)&&q1(e,a,n[a])}function sc(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function j1(e){return uB.get(e)||e}function nR(e,n){if(fo.call($r,n)&&$r[n])return!0;if(fB.test(n)){if(e="aria-"+n.slice(4).toLowerCase(),e=Gk.hasOwnProperty(e)?e:null,e==null)return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",n),$r[n]=!0;if(n!==e)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",n,e),$r[n]=!0}if(cB.test(n)){if(e=n.toLowerCase(),e=Gk.hasOwnProperty(e)?e:null,e==null)return $r[n]=!0,!1;n!==e&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",n,e),$r[n]=!0)}return!0}function iR(e,n){var o=[],a;for(a in n)nR(e,a)||o.push(a);n=o.map(function(u){return"`"+u+"`"}).join(", "),o.length===1?console.error("Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",n,e):1<o.length&&console.error("Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",n,e)}function oR(e,n,o,a){if(fo.call(Nn,n)&&Nn[n])return!0;var u=n.toLowerCase();if(u==="onfocusin"||u==="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."),Nn[n]=!0;if(typeof o==="function"&&(e==="form"&&n==="action"||e==="input"&&n==="formAction"||e==="button"&&n==="formAction"))return!0;if(a!=null){if(e=a.possibleRegistrationNames,a.registrationNameDependencies.hasOwnProperty(n))return!0;if(a=e.hasOwnProperty(u)?e[u]:null,a!=null)return console.error("Invalid event handler property `%s`. Did you mean `%s`?",n,a),Nn[n]=!0;if(Fk.test(n))return console.error("Unknown event handler property `%s`. It will be ignored.",n),Nn[n]=!0}else if(Fk.test(n))return hB.test(n)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",n),Nn[n]=!0;if(dB.test(n)||pB.test(n))return!0;if(u==="innerhtml")return console.error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),Nn[n]=!0;if(u==="aria")return console.error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),Nn[n]=!0;if(u==="is"&&o!==null&&o!==void 0&&typeof o!=="string")return console.error("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof o),Nn[n]=!0;if(typeof o==="number"&&isNaN(o))return console.error("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",n),Nn[n]=!0;if(qd.hasOwnProperty(u)){if(u=qd[u],u!==n)return console.error("Invalid DOM property `%s`. Did you mean `%s`?",n,u),Nn[n]=!0}else if(n!==u)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.",n,u),Nn[n]=!0;switch(n){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 o){case"boolean":switch(n){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(u=n.toLowerCase().slice(0,5),u==="data-"||u==="aria-")return!0;return 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()}.',o,n,n,o,n):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.',o,n,n,o,n,n,n),Nn[n]=!0}case"function":case"symbol":return Nn[n]=!0,!1;case"string":if(o==="false"||o==="true"){switch(n){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}?",o,n,o==="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".',n,o),Nn[n]=!0}}return!0}function lR(e,n,o){var a=[],u;for(u in n)oR(e,u,n[u],o)||a.push(u);n=a.map(function(f){return"`"+f+"`"}).join(", "),a.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 ",n,e):1<a.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 ",n,e)}function ac(e){return mB.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Al(){}function Xm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}function I1(e){var n=Ln(e);if(n&&(e=n.stateNode)){var o=e[Hn]||null;e:switch(e=n.stateNode,n.type){case"input":if(Bi(e,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),n=o.name,o.type==="radio"&&n!=null){for(o=e;o.parentNode;)o=o.parentNode;be(n,"name"),o=o.querySelectorAll('input[name="'+Fn(""+n)+'"][type="radio"]');for(n=0;n<o.length;n++){var a=o[n];if(a!==e&&a.form===e.form){var u=a[Hn]||null;if(!u)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");Bi(a,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(n=0;n<o.length;n++)a=o[n],a.form===e.form&&kh(a)}break e;case"textarea":kl(e,o.value,o.defaultValue);break e;case"select":n=o.value,n!=null&&ve(e,!!o.multiple,n,!1)}}}function $1(e,n,o){if(ay)return e(n,o);ay=!0;try{var a=e(n);return a}finally{if(ay=!1,Pr!==null||Yr!==null){if(Rr(),Pr&&(n=Pr,e=Yr,Yr=Pr=null,I1(n),e))for(n=0;n<e.length;n++)I1(e[n])}}}function rc(e,n){var o=e.stateNode;if(o===null)return null;var a=o[Hn]||null;if(a===null)return null;o=a[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(o&&typeof o!=="function")throw Error("Expected `"+n+"` listener to be a function, instead got a value of `"+typeof o+"` type.");return o}function P1(){if(Vd)return Vd;var e,n=uy,o=n.length,a,u="value"in Es?Es.value:Es.textContent,f=u.length;for(e=0;e<o&&n[e]===u[e];e++);var p=o-e;for(a=1;a<=p&&n[o-a]===u[f-a];a++);return Vd=u.slice(e,1<a?1-a:void 0)}function Eh(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function Mh(){return!0}function Y1(){return!1}function Jn(e){function n(o,a,u,f,p){this._reactName=o,this._targetInst=u,this.type=a,this.nativeEvent=f,this.target=p,this.currentTarget=null;for(var g in e)e.hasOwnProperty(g)&&(o=e[g],this[g]=o?o(f):f[g]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Mh:Y1,this.isPropagationStopped=Y1,this}return Ee(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!=="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=Mh)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!=="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Mh)},persist:function(){},isPersistent:Mh}),n}function sR(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=MB[e])?!!n[e]:!1}function Qm(){return sR}function X1(e,n){switch(e){case"keyup":return VB.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==eC;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Q1(e){return e=e.detail,typeof e==="object"&&"data"in e?e.data:null}function aR(e,n){switch(e){case"compositionend":return Q1(n);case"keypress":if(n.which!==nC)return null;return oC=!0,iC;case"textInput":return e=n.data,e===iC&&oC?null:e;default:return null}}function rR(e,n){if(Xr)return e==="compositionend"||!dy&&X1(e,n)?(e=P1(),Vd=uy=Es=null,Xr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return tC&&n.locale!=="ko"?null:n.data;default:return null}}function G1(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!IB[e.type]:n==="textarea"?!0:!1}function uR(e){if(!sl)return!1;e="on"+e;var n=e in document;return n||(n=document.createElement("div"),n.setAttribute(e,"return;"),n=typeof n[e]==="function"),n}function W1(e,n,o,a){Pr?Yr?Yr.push(a):Yr=[a]:Pr=a,n=Sd(n,"onChange"),0<n.length&&(o=new jd("onChange","change",null,o,a),e.push({event:o,listeners:n}))}function cR(e){Rx(e,0)}function Dh(e){var n=Sl(e);if(kh(n))return e}function F1(e,n){if(e==="change")return n}function J1(){Qc&&(Qc.detachEvent("onpropertychange",Z1),Gc=Qc=null)}function Z1(e){if(e.propertyName==="value"&&Dh(Gc)){var n=[];W1(n,Gc,e,Xm(e)),$1(cR,n)}}function fR(e,n,o){e==="focusin"?(J1(),Qc=n,Gc=o,Qc.attachEvent("onpropertychange",Z1)):e==="focusout"&&J1()}function hR(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Dh(Gc)}function dR(e,n){if(e==="click")return Dh(n)}function pR(e,n){if(e==="input"||e==="change")return Dh(n)}function mR(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}function uc(e,n){if(_n(e,n))return!0;if(typeof e!=="object"||e===null||typeof n!=="object"||n===null)return!1;var o=Object.keys(e),a=Object.keys(n);if(o.length!==a.length)return!1;for(a=0;a<o.length;a++){var u=o[a];if(!fo.call(n,u)||!_n(e[u],n[u]))return!1}return!0}function K1(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function eS(e,n){var o=K1(e);e=0;for(var a;o;){if(o.nodeType===3){if(a=e+o.textContent.length,e<=n&&a>=n)return{node:o,offset:n-e};e=a}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=K1(o)}}function tS(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?tS(e,n.parentNode):("contains"in e)?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function nS(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=vr(e.document);n instanceof e.HTMLIFrameElement;){try{var o=typeof n.contentWindow.location.href==="string"}catch(a){o=!1}if(o)e=n.contentWindow;else break;n=vr(e.document)}return n}function Gm(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function iS(e,n,o){var a=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;my||Qr==null||Qr!==vr(a)||(a=Qr,("selectionStart"in a)&&Gm(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Wc&&uc(Wc,a)||(Wc=a,a=Sd(py,"onSelect"),0<a.length&&(n=new jd("onSelect","select",null,n,o),e.push({event:n,listeners:a}),n.target=Qr)))}function ya(e,n){var o={};return o[e.toLowerCase()]=n.toLowerCase(),o["Webkit"+e]="webkit"+n,o["Moz"+e]="moz"+n,o}function ba(e){if(gy[e])return gy[e];if(!Gr[e])return e;var n=Gr[e],o;for(o in n)if(n.hasOwnProperty(o)&&o in sC)return gy[e]=n[o];return e}function ro(e,n){fC.set(e,n),lo(n,[e])}function gR(e){for(var n=$d,o=0;o<e.length;o++){var a=e[o];if(typeof a==="object"&&a!==null)if(on(a)&&a.length===2&&typeof a[0]==="string"){if(n!==$d&&n!==wy)return vy;n=wy}else return vy;else{if(typeof a==="function"||typeof a==="string"&&50<a.length||n!==$d&&n!==Sy)return vy;n=Sy}}return n}function Wm(e,n,o,a){for(var u in e)fo.call(e,u)&&u[0]!=="_"&&Uo(u,e[u],n,o,a)}function Uo(e,n,o,a,u){switch(typeof n){case"object":if(n===null){n="null";break}else{if(n.$$typeof===el){var f=Ie(n.type)||"…",p=n.key;n=n.props;var g=Object.keys(n),v=g.length;if(p==null&&v===0){n="<"+f+" />";break}if(3>a||v===1&&g[0]==="children"&&p==null){n="<"+f+" … />";break}o.push([u+"  ".repeat(a)+e,"<"+f]),p!==null&&Uo("key",p,o,a+1,u),e=!1;for(var x in n)x==="children"?n.children!=null&&(!on(n.children)||0<n.children.length)&&(e=!0):fo.call(n,x)&&x[0]!=="_"&&Uo(x,n[x],o,a+1,u);o.push(["",e?">…</"+f+">":"/>"]);return}if(f=Object.prototype.toString.call(n),f=f.slice(8,f.length-1),f==="Array"){if(x=gR(n),x===Sy||x===$d){n=JSON.stringify(n);break}else if(x===wy){o.push([u+"  ".repeat(a)+e,""]);for(e=0;e<n.length;e++)f=n[e],Uo(f[0],f[1],o,a+1,u);return}}if(f==="Promise"){if(n.status==="fulfilled"){if(f=o.length,Uo(e,n.value,o,a,u),o.length>f){o=o[f],o[1]="Promise<"+(o[1]||"Object")+">";return}}else if(n.status==="rejected"&&(f=o.length,Uo(e,n.reason,o,a,u),o.length>f)){o=o[f],o[1]="Rejected Promise<"+o[1]+">";return}o.push(["  ".repeat(a)+e,"Promise"]);return}f==="Object"&&(x=Object.getPrototypeOf(n))&&typeof x.constructor==="function"&&(f=x.constructor.name),o.push([u+"  ".repeat(a)+e,f==="Object"?3>a?"":"…":f]),3>a&&Wm(n,o,a+1,u);return}case"function":n=n.name===""?"() => {}":n.name+"() {}";break;case"string":n=n===WB?"…":JSON.stringify(n);break;case"undefined":n="undefined";break;case"boolean":n=n?"true":"false";break;default:n=String(n)}o.push([u+"  ".repeat(a)+e,n])}function oS(e,n,o,a){var u=!0;for(p in e)p in n||(o.push([Pd+"  ".repeat(a)+p,"…"]),u=!1);for(var f in n)if(f in e){var p=e[f],g=n[f];if(p!==g){if(a===0&&f==="children")u="  ".repeat(a)+f,o.push([Pd+u,"…"],[Yd+u,"…"]);else{if(!(3<=a)){if(typeof p==="object"&&typeof g==="object"&&p!==null&&g!==null&&p.$$typeof===g.$$typeof)if(g.$$typeof===el){if(p.type===g.type&&p.key===g.key){p=Ie(g.type)||"…",u="  ".repeat(a)+f,p="<"+p+" … />",o.push([Pd+u,p],[Yd+u,p]),u=!1;continue}}else{var v=Object.prototype.toString.call(p),x=Object.prototype.toString.call(g);if(v===x&&(x==="[object Object]"||x==="[object Array]")){v=[pC+"  ".repeat(a)+f,x==="[object Array]"?"Array":""],o.push(v),x=o.length,oS(p,g,o,a+1)?x===o.length&&(v[1]="Referentially unequal but deeply equal objects. Consider memoization."):u=!1;continue}}else if(typeof p==="function"&&typeof g==="function"&&p.name===g.name&&p.length===g.length&&(v=Function.prototype.toString.call(p),x=Function.prototype.toString.call(g),v===x)){p=g.name===""?"() => {}":g.name+"() {}",o.push([pC+"  ".repeat(a)+f,p+" Referentially unequal function closure. Consider memoization."]);continue}}Uo(f,p,o,a,Pd),Uo(f,g,o,a,Yd)}u=!1}}else o.push([Yd+"  ".repeat(a)+f,"…"]),u=!1;return u}function ri(e){Oe=e&63?"Blocking":e&64?"Gesture":e&4194176?"Transition":e&62914560?"Suspense":e&2080374784?"Idle":"Other"}function qo(e,n,o,a){gt&&(Ds.start=n,Ds.end=o,zl.color="warning",zl.tooltipText=a,zl.properties=null,(e=e._debugTask)?e.run(performance.measure.bind(performance,a,Ds)):performance.measure(a,Ds))}function Oh(e,n,o){qo(e,n,o,"Reconnect")}function Rh(e,n,o,a,u){var f=P(e);if(f!==null&&gt){var{alternate:p,actualDuration:g}=e;if(p===null||p.child!==e.child)for(var v=e.child;v!==null;v=v.sibling)g-=v.actualDuration;a=0.5>g?a?"tertiary-light":"primary-light":10>g?a?"tertiary":"primary":100>g?a?"tertiary-dark":"primary-dark":"error";var x=e.memoizedProps;g=e._debugTask,x!==null&&p!==null&&p.memoizedProps!==x?(v=[FB],x=oS(p.memoizedProps,x,v,0),1<v.length&&(x&&!Ms&&(p.lanes&u)===0&&100<e.actualDuration?(Ms=!0,v[0]=JB,zl.color="warning",zl.tooltipText=mC):(zl.color=a,zl.tooltipText=f),zl.properties=v,Ds.start=n,Ds.end=o,g!=null?g.run(performance.measure.bind(performance,"​"+f,Ds)):performance.measure("​"+f,Ds))):g!=null?g.run(console.timeStamp.bind(console,f,n,o,Hi,void 0,a)):console.timeStamp(f,n,o,Hi,void 0,a)}}function Fm(e,n,o,a){if(gt){var u=P(e);if(u!==null){for(var f=null,p=[],g=0;g<a.length;g++){var v=a[g];f==null&&v.source!==null&&(f=v.source._debugTask),v=v.value,p.push(["Error",typeof v==="object"&&v!==null&&typeof v.message==="string"?String(v.message):String(v)])}e.key!==null&&Uo("key",e.key,p,0,""),e.memoizedProps!==null&&Wm(e.memoizedProps,p,0,""),f==null&&(f=e._debugTask),e={start:n,end:o,detail:{devtools:{color:"error",track:Hi,tooltipText:e.tag===13?"Hydration failed":"Error boundary caught an error",properties:p}}},f?f.run(performance.measure.bind(performance,"​"+u,e)):performance.measure("​"+u,e)}}}function Vo(e,n,o,a,u){if(u!==null){if(gt){var f=P(e);if(f!==null){a=[];for(var p=0;p<u.length;p++){var g=u[p].value;a.push(["Error",typeof g==="object"&&g!==null&&typeof g.message==="string"?String(g.message):String(g)])}e.key!==null&&Uo("key",e.key,a,0,""),e.memoizedProps!==null&&Wm(e.memoizedProps,a,0,""),n={start:n,end:o,detail:{devtools:{color:"error",track:Hi,tooltipText:"A lifecycle or effect errored",properties:a}}},(e=e._debugTask)?e.run(performance.measure.bind(performance,"​"+f,n)):performance.measure("​"+f,n)}}}else f=P(e),f!==null&&gt&&(u=1>a?"secondary-light":100>a?"secondary":500>a?"secondary-dark":"error",(e=e._debugTask)?e.run(console.timeStamp.bind(console,f,n,o,Hi,void 0,u)):console.timeStamp(f,n,o,Hi,void 0,u))}function yR(e,n,o,a){if(gt&&!(n<=e)){var u=(o&738197653)===o?"tertiary-dark":"primary-dark";o=(o&536870912)===o?"Prepared":(o&201326741)===o?"Hydrated":"Render",a?a.run(console.timeStamp.bind(console,o,e,n,Oe,Me,u)):console.timeStamp(o,e,n,Oe,Me,u)}}function lS(e,n,o,a){!gt||n<=e||(o=(o&738197653)===o?"tertiary-dark":"primary-dark",a?a.run(console.timeStamp.bind(console,"Prewarm",e,n,Oe,Me,o)):console.timeStamp("Prewarm",e,n,Oe,Me,o))}function sS(e,n,o,a){!gt||n<=e||(o=(o&738197653)===o?"tertiary-dark":"primary-dark",a?a.run(console.timeStamp.bind(console,"Suspended",e,n,Oe,Me,o)):console.timeStamp("Suspended",e,n,Oe,Me,o))}function bR(e,n,o,a,u,f){if(gt&&!(n<=e)){o=[];for(var p=0;p<a.length;p++){var g=a[p].value;o.push(["Recoverable Error",typeof g==="object"&&g!==null&&typeof g.message==="string"?String(g.message):String(g)])}e={start:e,end:n,detail:{devtools:{color:"primary-dark",track:Oe,trackGroup:Me,tooltipText:u?"Hydration Failed":"Recovered after Error",properties:o}}},f?f.run(performance.measure.bind(performance,"Recovered",e)):performance.measure("Recovered",e)}}function Jm(e,n,o,a){!gt||n<=e||(a?a.run(console.timeStamp.bind(console,"Errored",e,n,Oe,Me,"error")):console.timeStamp("Errored",e,n,Oe,Me,"error"))}function vR(e,n,o,a){!gt||n<=e||(a?a.run(console.timeStamp.bind(console,o,e,n,Oe,Me,"secondary-light")):console.timeStamp(o,e,n,Oe,Me,"secondary-light"))}function aS(e,n,o,a,u){if(gt&&!(n<=e)){for(var f=[],p=0;p<o.length;p++){var g=o[p].value;f.push(["Error",typeof g==="object"&&g!==null&&typeof g.message==="string"?String(g.message):String(g)])}e={start:e,end:n,detail:{devtools:{color:"error",track:Oe,trackGroup:Me,tooltipText:a?"Remaining Effects Errored":"Commit Errored",properties:f}}},u?u.run(performance.measure.bind(performance,"Errored",e)):performance.measure("Errored",e)}}function cc(e,n,o){!gt||n<=e||(o?o.run(console.timeStamp.bind(console,"Animating",e,n,Oe,Me,"secondary-dark")):console.timeStamp("Animating",e,n,Oe,Me,"secondary-dark"))}function Lh(){for(var e=Wr,n=xy=Wr=0;n<e;){var o=Ni[n];Ni[n++]=null;var a=Ni[n];Ni[n++]=null;var u=Ni[n];Ni[n++]=null;var f=Ni[n];if(Ni[n++]=null,a!==null&&u!==null){var p=a.pending;p===null?u.next=u:(u.next=p.next,p.next=u),a.pending=u}f!==0&&rS(o,u,f)}}function Bh(e,n,o,a){Ni[Wr++]=e,Ni[Wr++]=n,Ni[Wr++]=o,Ni[Wr++]=a,xy|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Zm(e,n,o,a){return Bh(e,n,o,a),zh(e)}function Cn(e,n){return Bh(e,null,null,n),zh(e)}function rS(e,n,o){e.lanes|=o;var a=e.alternate;a!==null&&(a.lanes|=o);for(var u=!1,f=e.return;f!==null;)f.childLanes|=o,a=f.alternate,a!==null&&(a.childLanes|=o),f.tag===22&&(e=f.stateNode,e===null||e._visibility&Fc||(u=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,u&&n!==null&&(u=31-zn(o),e=f.hiddenUpdates,a=e[u],a===null?e[u]=[n]:a.push(n),n.lane=o|536870912),f):null}function zh(e){if(Cf>hz)throw Qa=Cf=0,Af=tb=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.");Qa>dz&&(Qa=0,Af=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.")),e.alternate===null&&(e.flags&4098)!==0&&Cx(e);for(var n=e,o=n.return;o!==null;)n.alternate===null&&(n.flags&4098)!==0&&Cx(e),n=o,o=n.return;return n.tag===3?n.stateNode:null}function va(e){if(_i===null)return e;var n=_i(e);return n===void 0?e:n.current}function Km(e){if(_i===null)return e;var n=_i(e);return n===void 0?e!==null&&e!==void 0&&typeof e.render==="function"&&(n=va(e.render),e.render!==n)?(n={$$typeof:Uc,render:n},e.displayName!==void 0&&(n.displayName=e.displayName),n):e:n.current}function uS(e,n){if(_i===null)return!1;var o=e.elementType;n=n.type;var a=!1,u=typeof n==="object"&&n!==null?n.$$typeof:null;switch(e.tag){case 1:typeof n==="function"&&(a=!0);break;case 0:typeof n==="function"?a=!0:u===mi&&(a=!0);break;case 11:u===Uc?a=!0:u===mi&&(a=!0);break;case 14:case 15:u===Rd?a=!0:u===mi&&(a=!0);break;default:return!1}return a&&(e=_i(o),e!==void 0&&e===_i(n))?!0:!1}function cS(e){_i!==null&&typeof WeakSet==="function"&&(Fr===null&&(Fr=new WeakSet),Fr.add(e))}function fS(e,n,o){do{var a=e,u=a.alternate,f=a.child,p=a.sibling,g=a.tag;a=a.type;var v=null;switch(g){case 0:case 15:case 1:v=a;break;case 11:v=a.render}if(_i===null)throw Error("Expected resolveFamily to be set during hot reload.");var x=!1;if(a=!1,v!==null&&(v=_i(v),v!==void 0&&(o.has(v)?a=!0:n.has(v)&&(g===1?a=!0:x=!0))),Fr!==null&&(Fr.has(e)||u!==null&&Fr.has(u))&&(a=!0),a&&(e._debugNeedsRemount=!0),a||x)u=Cn(e,2),u!==null&&Bt(u,e,2);if(f===null||a||fS(f,n,o),p===null)break;e=p}while(1)}function SR(e,n,o,a){this.tag=e,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,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,gC||typeof Object.preventExtensions!=="function"||Object.preventExtensions(this)}function eg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Tl(e,n){var o=e.alternate;switch(o===null?(o=w(e.tag,n,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o._debugOwner=e._debugOwner,o._debugStack=e._debugStack,o._debugTask=e._debugTask,o._debugHookTypes=e._debugHookTypes,o.alternate=e,e.alternate=o):(o.pendingProps=n,o.type=e.type,o.flags=0,o.subtreeFlags=0,o.deletions=null,o.actualDuration=-0,o.actualStartTime=-1.1),o.flags=e.flags&65011712,o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,n=e.dependencies,o.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext,_debugThenableState:n._debugThenableState},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o.refCleanup=e.refCleanup,o.selfBaseDuration=e.selfBaseDuration,o.treeBaseDuration=e.treeBaseDuration,o._debugInfo=e._debugInfo,o._debugNeedsRemount=e._debugNeedsRemount,o.tag){case 0:case 15:o.type=va(e.type);break;case 1:o.type=va(e.type);break;case 11:o.type=Km(e.type)}return o}function hS(e,n){e.flags&=65011714;var o=e.alternate;return o===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null,e.selfBaseDuration=0,e.treeBaseDuration=0):(e.childLanes=o.childLanes,e.lanes=o.lanes,e.child=o.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=o.memoizedProps,e.memoizedState=o.memoizedState,e.updateQueue=o.updateQueue,e.type=o.type,n=o.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext,_debugThenableState:n._debugThenableState},e.selfBaseDuration=o.selfBaseDuration,e.treeBaseDuration=o.treeBaseDuration),e}function tg(e,n,o,a,u,f){var p=0,g=e;if(typeof e==="function")eg(e)&&(p=1),g=va(g);else if(typeof e==="string")p=de(),p=DL(e,o,p)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Q0:return n=w(31,o,n,u),n.elementType=Q0,n.lanes=f,n;case Ur:return Sa(o.children,u,f,n);case Od:p=8,u|=Tn,u|=po;break;case $0:return e=o,a=u,typeof e.id!=="string"&&console.error('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof e.id),n=w(12,e,n,a|we),n.elementType=$0,n.lanes=f,n.stateNode={effectDuration:0,passiveEffectDuration:0},n;case Y0:return n=w(13,o,n,u),n.elementType=Y0,n.lanes=f,n;case X0:return n=w(19,o,n,u),n.elementType=X0,n.lanes=f,n;default:if(typeof e==="object"&&e!==null)switch(e.$$typeof){case tl:p=10;break e;case P0:p=9;break e;case Uc:p=11,g=Km(g);break e;case Rd:p=14;break e;case mi:p=16,g=null;break e}if(g="",e===void 0||typeof e==="object"&&e!==null&&Object.keys(e).length===0)g+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";e===null?o="null":on(e)?o="array":e!==void 0&&e.$$typeof===el?(o="<"+(Ie(e.type)||"Unknown")+" />",g=" Did you accidentally export a JSX literal instead of a component?"):o=typeof e,(p=a?Tt(a):null)&&(g+=`
56
56
 
57
- Check the render method of \``+p+"`."),p=29,o=Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(o+"."+g)),g=null}return n=w(p,o,n,u),n.elementType=e,n.type=g,n.lanes=f,n._debugOwner=a,n}function Bh(e,n,o){return n=tg(e.type,e.key,e.props,e._owner,n,o),n._debugOwner=e._owner,n._debugStack=e._debugStack,n._debugTask=e._debugTask,n}function ma(e,n,o,a){return e=w(7,e,a,n),e.lanes=o,e}function ng(e,n,o){return e=w(6,e,null,n),e.lanes=o,e}function dS(e){var n=w(18,null,null,pe);return n.stateNode=e,n}function ig(e,n,o){return n=w(4,e.children!==null?e.children:[],e.key,n),n.lanes=o,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function fi(e,n){if(typeof e==="object"&&e!==null){var o=ky.get(e);if(o!==void 0)return o;return n={value:e,source:n,stack:ua(n)},ky.set(e,n),n}return{value:e,source:n,stack:ua(n)}}function Tl(e,n){us(),Gr[Wr++]=Wc,Gr[Wr++]=Pd,Pd=e,Wc=n}function pS(e,n,o){us(),qi[Vi++]=Hl,qi[Vi++]=Nl,qi[Vi++]=Ma,Ma=e;var a=Hl;e=Nl;var u=32-Hn(a)-1;a&=~(1<<u),o+=1;var f=32-Hn(n)+u;if(30<f){var p=u-u%5;f=(a&(1<<p)-1).toString(32),a>>=p,u-=p,Hl=1<<32-Hn(n)+u|o<<u|a,Nl=f+e}else Hl=1<<f|o<<u|a,Nl=e}function og(e){us(),e.return!==null&&(Tl(e,1),pS(e,1,0))}function lg(e){for(;e===Pd;)Pd=Gr[--Wr],Gr[Wr]=null,Wc=Gr[--Wr],Gr[Wr]=null;for(;e===Ma;)Ma=qi[--Vi],qi[Vi]=null,Nl=qi[--Vi],qi[Vi]=null,Hl=qi[--Vi],qi[Vi]=null}function mS(){return us(),Ma!==null?{id:Hl,overflow:Nl}:null}function gS(e,n){us(),qi[Vi++]=Hl,qi[Vi++]=Nl,qi[Vi++]=Ma,Hl=n.id,Nl=n.overflow,Ma=e}function us(){Le||console.error("Expected to be hydrating. This is a bug in React. Please file an issue.")}function ga(e,n){if(e.return===null){if(Si===null)Si={fiber:e,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:n};else{if(Si.fiber!==e)throw Error("Saw multiple hydration diff roots in a pass. This is a bug in React.");Si.distanceFromLeaf>n&&(Si.distanceFromLeaf=n)}return Si}var o=ga(e.return,n+1).children;if(0<o.length&&o[o.length-1].fiber===e)return o=o[o.length-1],o.distanceFromLeaf>n&&(o.distanceFromLeaf=n),o;return n={fiber:e,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:n},o.push(n),n}function yS(){Le&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug.")}function zh(e,n){al||(e=ga(e,0),e.serverProps=null,n!==null&&(n=Wx(n),e.serverTail.push(n)))}function cs(e){var n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:!1,o="",a=Si;throw a!==null&&(Si=null,o=Pm(a)),uc(fi(Error("Hydration failed because the server rendered "+(n?"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:
57
+ Check the render method of \``+p+"`."),p=29,o=Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(o+"."+g)),g=null}return n=w(p,o,n,u),n.elementType=e,n.type=g,n.lanes=f,n._debugOwner=a,n}function Hh(e,n,o){return n=tg(e.type,e.key,e.props,e._owner,n,o),n._debugOwner=e._owner,n._debugStack=e._debugStack,n._debugTask=e._debugTask,n}function Sa(e,n,o,a){return e=w(7,e,a,n),e.lanes=o,e}function ng(e,n,o){return e=w(6,e,null,n),e.lanes=o,e}function dS(e){var n=w(18,null,null,pe);return n.stateNode=e,n}function ig(e,n,o){return n=w(4,e.children!==null?e.children:[],e.key,n),n.lanes=o,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function ui(e,n){if(typeof e==="object"&&e!==null){var o=ky.get(e);if(o!==void 0)return o;return n={value:e,source:n,stack:pa(n)},ky.set(e,n),n}return{value:e,source:n,stack:pa(n)}}function El(e,n){fs(),Jr[Zr++]=Jc,Jr[Zr++]=Xd,Xd=e,Jc=n}function pS(e,n,o){fs(),Ui[qi++]=Nl,Ui[qi++]=_l,Ui[qi++]=Ba,Ba=e;var a=Nl;e=_l;var u=32-zn(a)-1;a&=~(1<<u),o+=1;var f=32-zn(n)+u;if(30<f){var p=u-u%5;f=(a&(1<<p)-1).toString(32),a>>=p,u-=p,Nl=1<<32-zn(n)+u|o<<u|a,_l=f+e}else Nl=1<<f|o<<u|a,_l=e}function og(e){fs(),e.return!==null&&(El(e,1),pS(e,1,0))}function lg(e){for(;e===Xd;)Xd=Jr[--Zr],Jr[Zr]=null,Jc=Jr[--Zr],Jr[Zr]=null;for(;e===Ba;)Ba=Ui[--qi],Ui[qi]=null,_l=Ui[--qi],Ui[qi]=null,Nl=Ui[--qi],Ui[qi]=null}function mS(){return fs(),Ba!==null?{id:Nl,overflow:_l}:null}function gS(e,n){fs(),Ui[qi++]=Nl,Ui[qi++]=_l,Ui[qi++]=Ba,Nl=n.id,_l=n.overflow,Ba=e}function fs(){Le||console.error("Expected to be hydrating. This is a bug in React. Please file an issue.")}function wa(e,n){if(e.return===null){if(bi===null)bi={fiber:e,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:n};else{if(bi.fiber!==e)throw Error("Saw multiple hydration diff roots in a pass. This is a bug in React.");bi.distanceFromLeaf>n&&(bi.distanceFromLeaf=n)}return bi}var o=wa(e.return,n+1).children;if(0<o.length&&o[o.length-1].fiber===e)return o=o[o.length-1],o.distanceFromLeaf>n&&(o.distanceFromLeaf=n),o;return n={fiber:e,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:n},o.push(n),n}function yS(){Le&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug.")}function Nh(e,n){al||(e=wa(e,0),e.serverProps=null,n!==null&&(n=Wx(n),e.serverTail.push(n)))}function hs(e){var n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:!1,o="",a=bi;throw a!==null&&(bi=null,o=Pm(a)),fc(ui(Error("Hydration failed because the server rendered "+(n?"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:
58
58
 
59
59
  - A server/client branch \`if (typeof window !== 'undefined')\`.
60
60
  - Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
@@ -64,7 +64,7 @@ Check the render method of \``+p+"`."),p=29,o=Error("Element type is invalid: ex
64
64
 
65
65
  It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
66
66
 
67
- https://react.dev/link/hydration-mismatch`+o),e)),Cy}function bS(e){var{stateNode:n,type:o,memoizedProps:a}=e;switch(n[vn]=e,n[Nn]=a,A0(o,a),o){case"dialog":ze("cancel",n),ze("close",n);break;case"iframe":case"object":case"embed":ze("load",n);break;case"video":case"audio":for(o=0;o<Cf.length;o++)ze(Cf[o],n);break;case"source":ze("error",n);break;case"img":case"image":case"link":ze("error",n),ze("load",n);break;case"details":ze("toggle",n);break;case"input":wl("input",a),ze("invalid",n),xh(n,a),ec(n,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"option":le(n,a);break;case"select":wl("select",a),ze("invalid",n),Te(n,a);break;case"textarea":wl("textarea",a),ze("invalid",n),Ue(n,a),kl(n,a.value,a.defaultValue,a.children)}o=a.children,typeof o!=="string"&&typeof o!=="number"&&typeof o!=="bigint"||n.textContent===""+o||a.suppressHydrationWarning===!0||Hx(n.textContent,o)?(a.popover!=null&&(ze("beforetoggle",n),ze("toggle",n)),a.onScroll!=null&&ze("scroll",n),a.onScrollEnd!=null&&ze("scrollend",n),a.onClick!=null&&(n.onclick=Cl),n=!0):n=!1,n||cs(e,!0)}function vS(e){for(Sn=e.return;Sn;)switch(Sn.tag){case 5:case 31:case 13:Ii=!1;return;case 27:case 3:Ii=!0;return;default:Sn=Sn.return}}function vr(e){if(e!==Sn)return!1;if(!Le)return vS(e),Le=!0,!1;var n=e.tag,o;if(o=n!==3&&n!==27){if(o=n===5)o=e.type,o=!(o!=="form"&&o!=="button")||O0(e.type,e.memoizedProps);o=!o}if(o&&gt){for(o=gt;o;){var a=ga(e,0),u=Wx(o);a.serverTail.push(u),o=u.type==="Suspense"?z0(o):gi(o.nextSibling)}cs(e)}if(vS(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");gt=z0(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");gt=z0(e)}else n===27?(n=gt,Ss(e.type)?(e=db,db=null,gt=e):gt=n):gt=Sn?gi(e.stateNode.nextSibling):null;return!0}function ya(){gt=Sn=null,al=Le=!1}function sg(){var e=Ds;return e!==null&&(jn===null?jn=e:jn.push.apply(jn,e),Ds=null),e}function uc(e){Ds===null?Ds=[e]:Ds.push(e)}function ag(){var e=Si;if(e!==null){Si=null;for(var n=Pm(e);0<e.children.length;)e=e.children[0];Y(e.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:
67
+ https://react.dev/link/hydration-mismatch`+o),e)),Cy}function bS(e){var{stateNode:n,type:o,memoizedProps:a}=e;switch(n[bn]=e,n[Hn]=a,A0(o,a),o){case"dialog":ze("cancel",n),ze("close",n);break;case"iframe":case"object":case"embed":ze("load",n);break;case"video":case"audio":for(o=0;o<Tf.length;o++)ze(Tf[o],n);break;case"source":ze("error",n);break;case"img":case"image":case"link":ze("error",n),ze("load",n);break;case"details":ze("toggle",n);break;case"input":xl("input",a),ze("invalid",n),Ch(n,a),nc(n,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"option":le(n,a);break;case"select":xl("select",a),ze("invalid",n),Ae(n,a);break;case"textarea":xl("textarea",a),ze("invalid",n),Ue(n,a),Cl(n,a.value,a.defaultValue,a.children)}o=a.children,typeof o!=="string"&&typeof o!=="number"&&typeof o!=="bigint"||n.textContent===""+o||a.suppressHydrationWarning===!0||Hx(n.textContent,o)?(a.popover!=null&&(ze("beforetoggle",n),ze("toggle",n)),a.onScroll!=null&&ze("scroll",n),a.onScrollEnd!=null&&ze("scrollend",n),a.onClick!=null&&(n.onclick=Al),n=!0):n=!1,n||hs(e,!0)}function vS(e){for(vn=e.return;vn;)switch(vn.tag){case 5:case 31:case 13:Vi=!1;return;case 27:case 3:Vi=!0;return;default:vn=vn.return}}function xr(e){if(e!==vn)return!1;if(!Le)return vS(e),Le=!0,!1;var n=e.tag,o;if(o=n!==3&&n!==27){if(o=n===5)o=e.type,o=!(o!=="form"&&o!=="button")||O0(e.type,e.memoizedProps);o=!o}if(o&&yt){for(o=yt;o;){var a=wa(e,0),u=Wx(o);a.serverTail.push(u),o=u.type==="Suspense"?z0(o):pi(o.nextSibling)}hs(e)}if(vS(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");yt=z0(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");yt=z0(e)}else n===27?(n=yt,xs(e.type)?(e=db,db=null,yt=e):yt=n):yt=vn?pi(e.stateNode.nextSibling):null;return!0}function xa(){yt=vn=null,al=Le=!1}function sg(){var e=Rs;return e!==null&&(jn===null?jn=e:jn.push.apply(jn,e),Rs=null),e}function fc(e){Rs===null?Rs=[e]:Rs.push(e)}function ag(){var e=bi;if(e!==null){bi=null;for(var n=Pm(e);0<e.children.length;)e=e.children[0];Y(e.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:
68
68
 
69
69
  - A server/client branch \`if (typeof window !== 'undefined')\`.
70
70
  - Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
@@ -74,45 +74,45 @@ https://react.dev/link/hydration-mismatch`+o),e)),Cy}function bS(e){var{stateNod
74
74
 
75
75
  It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
76
76
 
77
- %s%s`,"https://react.dev/link/hydration-mismatch",n)})}}function Hh(){Fr=Yd=null,Jr=!1}function fs(e,n,o){Be(Ay,n._currentValue,e),n._currentValue=o,Be(Ty,n._currentRenderer,e),n._currentRenderer!==void 0&&n._currentRenderer!==null&&n._currentRenderer!==bC&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),n._currentRenderer=bC}function El(e,n){e._currentValue=Ay.current;var o=Ty.current;Ne(Ty,n),e._currentRenderer=o,Ne(Ay,n)}function rg(e,n,o){for(;e!==null;){var a=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,a!==null&&(a.childLanes|=n)):a!==null&&(a.childLanes&n)!==n&&(a.childLanes|=n),e===o)break;e=e.return}e!==o&&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 ug(e,n,o,a){var u=e.child;u!==null&&(u.return=e);for(;u!==null;){var f=u.dependencies;if(f!==null){var p=u.child;f=f.firstContext;e:for(;f!==null;){var g=f;f=u;for(var v=0;v<n.length;v++)if(g.context===n[v]){f.lanes|=o,g=f.alternate,g!==null&&(g.lanes|=o),rg(f.return,o,e),a||(p=null);break e}f=g.next}}else if(u.tag===18){if(p=u.return,p===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");p.lanes|=o,f=p.alternate,f!==null&&(f.lanes|=o),rg(p,o,e),p=null}else p=u.child;if(p!==null)p.return=u;else for(p=u;p!==null;){if(p===e){p=null;break}if(u=p.sibling,u!==null){u.return=p.return,p=u;break}p=p.return}u=p}}function Sr(e,n,o,a){e=null;for(var u=n,f=!1;u!==null;){if(!f){if((u.flags&524288)!==0)f=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var p=u.alternate;if(p===null)throw Error("Should have a current fiber. This is a bug in React.");if(p=p.memoizedProps,p!==null){var g=u.type;Un(u.pendingProps.value,p.value)||(e!==null?e.push(g):e=[g])}}else if(u===Od.current){if(p=u.alternate,p===null)throw Error("Should have a current fiber. This is a bug in React.");p.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(Df):e=[Df])}u=u.return}e!==null&&ug(n,e,o,a),n.flags|=262144}function Nh(e){for(e=e.firstContext;e!==null;){if(!Un(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ba(e){Yd=e,Fr=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function wt(e){return Jr&&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()."),SS(Yd,e)}function _h(e,n){return Yd===null&&ba(e),SS(e,n)}function SS(e,n){var o=n._currentValue;if(n={context:n,memoizedValue:o,next:null},Fr===null){if(e===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().");Fr=n,e.dependencies={lanes:0,firstContext:n,_debugThenableState:null},e.flags|=524288}else Fr=Fr.next=n;return o}function cg(){return{controller:new KB,data:new Map,refCount:0}}function va(e){e.controller.signal.aborted&&console.warn("A cache instance was retained after it was already freed. This likely indicates a bug in React."),e.refCount++}function cc(e){e.refCount--,0>e.refCount&&console.warn("A cache instance was released after it was already freed. This likely indicates a bug in React."),e.refCount===0&&ez(tz,function(){e.controller.abort()})}function Io(e,n,o){if((e&127)!==0)0>rl&&(rl=Ft(),Jc=Xd(n),Ey=n,o!=null&&(My=P(o)),(Ie&(an|ki))!==pn&&(zt=!0,Ls=Fc),e=Rc(),n=Oc(),e!==Zr||n!==Zc?Zr=-1.1:n!==null&&(Ls=Fc),Oa=e,Zc=n);else if((e&4194048)!==0&&0>ji&&(ji=Ft(),Kc=Xd(n),vC=n,o!=null&&(SC=P(o)),0>ql)){if(e=Rc(),n=Oc(),e!==zs||n!==Ra)zs=-1.1;Bs=e,Ra=n}}function SR(e){if(0>rl){rl=Ft(),Jc=e._debugTask!=null?e._debugTask:null,(Ie&(an|ki))!==pn&&(Ls=Fc);var n=Rc(),o=Oc();n!==Zr||o!==Zc?Zr=-1.1:o!==null&&(Ls=Fc),Oa=n,Zc=o}if(0>ji&&(ji=Ft(),Kc=e._debugTask!=null?e._debugTask:null,0>ql)){if(e=Rc(),n=Oc(),e!==zs||n!==Ra)zs=-1.1;Bs=e,Ra=n}}function Ml(){var e=Da;return Da=0,e}function Uh(e){var n=Da;return Da=e,n}function fc(e){var n=Da;return Da+=e,n}function qh(){ue=se=-1.1}function hi(){var e=se;return se=-1.1,e}function di(e){0<=e&&(se=e)}function jo(){var e=Dt;return Dt=-0,e}function $o(e){0<=e&&(Dt=e)}function Po(){var e=xt;return xt=null,e}function Yo(){var e=zt;return zt=!1,e}function fg(e){qn=Ft(),0>e.actualStartTime&&(e.actualStartTime=qn)}function hg(e){if(0<=qn){var n=Ft()-qn;e.actualDuration+=n,e.selfBaseDuration=n,qn=-1}}function wS(e){if(0<=qn){var n=Ft()-qn;e.actualDuration+=n,qn=-1}}function Xo(){if(0<=qn){var e=Ft(),n=e-qn;qn=-1,Da+=n,Dt+=n,ue=e}}function xS(e){xt===null&&(xt=[]),xt.push(e),Ul===null&&(Ul=[]),Ul.push(e)}function Qo(){qn=Ft(),0>se&&(se=qn)}function hc(e){for(var n=e.child;n;)e.actualDuration+=n.actualDuration,n=n.sibling}function wR(e,n){if(tf===null){var o=tf=[];Oy=0,La=w0(),Kr={status:"pending",value:void 0,then:function(a){o.push(a)}}}return Oy++,n.then(kS,kS),n}function kS(){if(--Oy===0&&(-1<ji||(ql=-1.1),tf!==null)){Kr!==null&&(Kr.status="fulfilled");var e=tf;tf=null,La=0,Kr=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function xR(e,n){var o=[],a={status:"pending",value:null,reason:null,then:function(u){o.push(u)}};return e.then(function(){a.status="fulfilled",a.value=n;for(var u=0;u<o.length;u++)(0,o[u])(n)},function(u){a.status="rejected",a.reason=u;for(u=0;u<o.length;u++)(0,o[u])(void 0)}),a}function dg(){var e=Ba.current;return e!==null?e:ut.pooledCache}function Vh(e,n){n===null?Be(Ba,Ba.current,e):Be(Ba,n.pool,e)}function CS(){var e=dg();return e===null?null:{parent:Wt._currentValue,pool:e}}function AS(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function TS(e){return e=e.status,e==="fulfilled"||e==="rejected"}function ES(e,n,o){H.actQueue!==null&&(H.didUsePromise=!0);var a=e.thenables;if(o=a[o],o===void 0?a.push(n):o!==n&&(e.didWarnAboutUncachedPromise||(e.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.")),n.then(Cl,Cl),n=o),n._debugInfo===void 0){e=performance.now(),a=n.displayName;var u={name:typeof a==="string"?a:"Promise",start:e,end:e,value:n};n._debugInfo=[{awaited:u}],n.status!=="fulfilled"&&n.status!=="rejected"&&(e=function(){u.end=performance.now()},n.then(e,e))}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,DS(e),e;default:if(typeof n.status==="string")n.then(Cl,Cl);else{if(e=ut,e!==null&&100<e.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.");e=n,e.status="pending",e.then(function(f){if(n.status==="pending"){var p=n;p.status="fulfilled",p.value=f}},function(f){if(n.status==="pending"){var p=n;p.status="rejected",p.reason=f}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,DS(e),e}throw Ha=n,uf=!0,eu}}function hs(e){try{return lz(e)}catch(n){if(n!==null&&typeof n==="object"&&typeof n.then==="function")throw Ha=n,uf=!0,eu;throw n}}function MS(){if(Ha===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var e=Ha;return Ha=null,uf=!1,e}function DS(e){if(e===eu||e===ep)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 gn(e){var n=xe;return e!=null&&(xe=n===null?e:n.concat(e)),n}function pg(){var e=xe;if(e!=null){for(var n=e.length-1;0<=n;n--)if(e[n].name!=null){var o=e[n].debugTask;if(o!=null)return o}}return null}function Ih(e,n,o){for(var a=Object.keys(e.props),u=0;u<a.length;u++){var f=a[u];if(f!=="children"&&f!=="key"){n===null&&(n=Bh(e,o.mode,0),n._debugInfo=xe,n.return=o),Y(n,function(p){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",p)},f);break}}}function jh(e){var n=cf;return cf+=1,tu===null&&(tu=AS()),ES(tu,e,n)}function dc(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function OS(e,n){if(n.$$typeof===UL)throw Error(`A React Element from an older version of React was rendered. This is not supported. It can happen if:
77
+ %s%s`,"https://react.dev/link/hydration-mismatch",n)})}}function _h(){Kr=Qd=null,eu=!1}function ds(e,n,o){Be(Ay,n._currentValue,e),n._currentValue=o,Be(Ty,n._currentRenderer,e),n._currentRenderer!==void 0&&n._currentRenderer!==null&&n._currentRenderer!==bC&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),n._currentRenderer=bC}function Ml(e,n){e._currentValue=Ay.current;var o=Ty.current;Ne(Ty,n),e._currentRenderer=o,Ne(Ay,n)}function rg(e,n,o){for(;e!==null;){var a=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,a!==null&&(a.childLanes|=n)):a!==null&&(a.childLanes&n)!==n&&(a.childLanes|=n),e===o)break;e=e.return}e!==o&&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 ug(e,n,o,a){var u=e.child;u!==null&&(u.return=e);for(;u!==null;){var f=u.dependencies;if(f!==null){var p=u.child;f=f.firstContext;e:for(;f!==null;){var g=f;f=u;for(var v=0;v<n.length;v++)if(g.context===n[v]){f.lanes|=o,g=f.alternate,g!==null&&(g.lanes|=o),rg(f.return,o,e),a||(p=null);break e}f=g.next}}else if(u.tag===18){if(p=u.return,p===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");p.lanes|=o,f=p.alternate,f!==null&&(f.lanes|=o),rg(p,o,e),p=null}else p=u.child;if(p!==null)p.return=u;else for(p=u;p!==null;){if(p===e){p=null;break}if(u=p.sibling,u!==null){u.return=p.return,p=u;break}p=p.return}u=p}}function kr(e,n,o,a){e=null;for(var u=n,f=!1;u!==null;){if(!f){if((u.flags&524288)!==0)f=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var p=u.alternate;if(p===null)throw Error("Should have a current fiber. This is a bug in React.");if(p=p.memoizedProps,p!==null){var g=u.type;_n(u.pendingProps.value,p.value)||(e!==null?e.push(g):e=[g])}}else if(u===Ld.current){if(p=u.alternate,p===null)throw Error("Should have a current fiber. This is a bug in React.");p.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(Rf):e=[Rf])}u=u.return}e!==null&&ug(n,e,o,a),n.flags|=262144}function Uh(e){for(e=e.firstContext;e!==null;){if(!_n(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ka(e){Qd=e,Kr=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function wt(e){return eu&&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()."),SS(Qd,e)}function qh(e,n){return Qd===null&&ka(e),SS(e,n)}function SS(e,n){var o=n._currentValue;if(n={context:n,memoizedValue:o,next:null},Kr===null){if(e===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().");Kr=n,e.dependencies={lanes:0,firstContext:n,_debugThenableState:null},e.flags|=524288}else Kr=Kr.next=n;return o}function cg(){return{controller:new ez,data:new Map,refCount:0}}function Ca(e){e.controller.signal.aborted&&console.warn("A cache instance was retained after it was already freed. This likely indicates a bug in React."),e.refCount++}function hc(e){e.refCount--,0>e.refCount&&console.warn("A cache instance was released after it was already freed. This likely indicates a bug in React."),e.refCount===0&&tz(nz,function(){e.controller.abort()})}function jo(e,n,o){if((e&127)!==0)0>rl&&(rl=Wt(),Kc=Gd(n),Ey=n,o!=null&&(My=P(o)),(je&(sn|wi))!==dn&&(zt=!0,zs=Zc),e=Bc(),n=Lc(),e!==tu||n!==ef?tu=-1.1:n!==null&&(zs=Zc),Ha=e,ef=n);else if((e&4194048)!==0&&0>ji&&(ji=Wt(),tf=Gd(n),vC=n,o!=null&&(SC=P(o)),0>Vl)){if(e=Bc(),n=Lc(),e!==Ns||n!==Na)Ns=-1.1;Hs=e,Na=n}}function wR(e){if(0>rl){rl=Wt(),Kc=e._debugTask!=null?e._debugTask:null,(je&(sn|wi))!==dn&&(zs=Zc);var n=Bc(),o=Lc();n!==tu||o!==ef?tu=-1.1:o!==null&&(zs=Zc),Ha=n,ef=o}if(0>ji&&(ji=Wt(),tf=e._debugTask!=null?e._debugTask:null,0>Vl)){if(e=Bc(),n=Lc(),e!==Ns||n!==Na)Ns=-1.1;Hs=e,Na=n}}function Dl(){var e=za;return za=0,e}function Vh(e){var n=za;return za=e,n}function dc(e){var n=za;return za+=e,n}function jh(){ue=se=-1.1}function ci(){var e=se;return se=-1.1,e}function fi(e){0<=e&&(se=e)}function Io(){var e=Dt;return Dt=-0,e}function $o(e){0<=e&&(Dt=e)}function Po(){var e=xt;return xt=null,e}function Yo(){var e=zt;return zt=!1,e}function fg(e){Un=Wt(),0>e.actualStartTime&&(e.actualStartTime=Un)}function hg(e){if(0<=Un){var n=Wt()-Un;e.actualDuration+=n,e.selfBaseDuration=n,Un=-1}}function wS(e){if(0<=Un){var n=Wt()-Un;e.actualDuration+=n,Un=-1}}function Xo(){if(0<=Un){var e=Wt(),n=e-Un;Un=-1,za+=n,Dt+=n,ue=e}}function xS(e){xt===null&&(xt=[]),xt.push(e),ql===null&&(ql=[]),ql.push(e)}function Qo(){Un=Wt(),0>se&&(se=Un)}function pc(e){for(var n=e.child;n;)e.actualDuration+=n.actualDuration,n=n.sibling}function xR(e,n){if(of===null){var o=of=[];Oy=0,_a=w0(),nu={status:"pending",value:void 0,then:function(a){o.push(a)}}}return Oy++,n.then(kS,kS),n}function kS(){if(--Oy===0&&(-1<ji||(Vl=-1.1),of!==null)){nu!==null&&(nu.status="fulfilled");var e=of;of=null,_a=0,nu=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function kR(e,n){var o=[],a={status:"pending",value:null,reason:null,then:function(u){o.push(u)}};return e.then(function(){a.status="fulfilled",a.value=n;for(var u=0;u<o.length;u++)(0,o[u])(n)},function(u){a.status="rejected",a.reason=u;for(u=0;u<o.length;u++)(0,o[u])(void 0)}),a}function dg(){var e=Ua.current;return e!==null?e:ut.pooledCache}function Ih(e,n){n===null?Be(Ua,Ua.current,e):Be(Ua,n.pool,e)}function CS(){var e=dg();return e===null?null:{parent:Gt._currentValue,pool:e}}function AS(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function TS(e){return e=e.status,e==="fulfilled"||e==="rejected"}function ES(e,n,o){H.actQueue!==null&&(H.didUsePromise=!0);var a=e.thenables;if(o=a[o],o===void 0?a.push(n):o!==n&&(e.didWarnAboutUncachedPromise||(e.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.")),n.then(Al,Al),n=o),n._debugInfo===void 0){e=performance.now(),a=n.displayName;var u={name:typeof a==="string"?a:"Promise",start:e,end:e,value:n};n._debugInfo=[{awaited:u}],n.status!=="fulfilled"&&n.status!=="rejected"&&(e=function(){u.end=performance.now()},n.then(e,e))}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,DS(e),e;default:if(typeof n.status==="string")n.then(Al,Al);else{if(e=ut,e!==null&&100<e.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.");e=n,e.status="pending",e.then(function(f){if(n.status==="pending"){var p=n;p.status="fulfilled",p.value=f}},function(f){if(n.status==="pending"){var p=n;p.status="rejected",p.reason=f}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,DS(e),e}throw Va=n,ff=!0,iu}}function ps(e){try{return sz(e)}catch(n){if(n!==null&&typeof n==="object"&&typeof n.then==="function")throw Va=n,ff=!0,iu;throw n}}function MS(){if(Va===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var e=Va;return Va=null,ff=!1,e}function DS(e){if(e===iu||e===np)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 mn(e){var n=xe;return e!=null&&(xe=n===null?e:n.concat(e)),n}function pg(){var e=xe;if(e!=null){for(var n=e.length-1;0<=n;n--)if(e[n].name!=null){var o=e[n].debugTask;if(o!=null)return o}}return null}function $h(e,n,o){for(var a=Object.keys(e.props),u=0;u<a.length;u++){var f=a[u];if(f!=="children"&&f!=="key"){n===null&&(n=Hh(e,o.mode,0),n._debugInfo=xe,n.return=o),Y(n,function(p){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",p)},f);break}}}function Ph(e){var n=hf;return hf+=1,ou===null&&(ou=AS()),ES(ou,e,n)}function mc(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function OS(e,n){if(n.$$typeof===qL)throw Error(`A React Element from an older version of React was rendered. This is not supported. It can happen if:
78
78
  - Multiple copies of the "react" package is used.
79
79
  - A library pre-bundled an old copy of "react" or "react/jsx-runtime".
80
- - A compiler tries to "inline" JSX instead of using the runtime.`);throw e=Object.prototype.toString.call(n),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.")}function $h(e,n){var o=pg();o!==null?o.run(OS.bind(null,e,n)):OS(e,n)}function RS(e,n){var o=P(e)||"Component";VC[o]||(VC[o]=!0,n=n.displayName||n.name||"Component",e.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.
80
+ - A compiler tries to "inline" JSX instead of using the runtime.`);throw e=Object.prototype.toString.call(n),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.")}function Yh(e,n){var o=pg();o!==null?o.run(OS.bind(null,e,n)):OS(e,n)}function RS(e,n){var o=P(e)||"Component";VC[o]||(VC[o]=!0,n=n.displayName||n.name||"Component",e.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.
81
81
  root.render(%s)`,n,n,n):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.
82
- <%s>{%s}</%s>`,n,n,o,n,o))}function Ph(e,n){var o=pg();o!==null?o.run(RS.bind(null,e,n)):RS(e,n)}function LS(e,n){var o=P(e)||"Component";IC[o]||(IC[o]=!0,n=String(n),e.tag===3?console.error(`Symbols are not valid as a React child.
82
+ <%s>{%s}</%s>`,n,n,o,n,o))}function Xh(e,n){var o=pg();o!==null?o.run(RS.bind(null,e,n)):RS(e,n)}function LS(e,n){var o=P(e)||"Component";jC[o]||(jC[o]=!0,n=String(n),e.tag===3?console.error(`Symbols are not valid as a React child.
83
83
  root.render(%s)`,n):console.error(`Symbols are not valid as a React child.
84
- <%s>%s</%s>`,o,n,o))}function Yh(e,n){var o=pg();o!==null?o.run(LS.bind(null,e,n)):LS(e,n)}function BS(e){function n(C,T){if(e){var M=C.deletions;M===null?(C.deletions=[T],C.flags|=16):M.push(T)}}function o(C,T){if(!e)return null;for(;T!==null;)n(C,T),T=T.sibling;return null}function a(C){for(var T=new Map;C!==null;)C.key!==null?T.set(C.key,C):T.set(C.index,C),C=C.sibling;return T}function u(C,T){return C=Al(C,T),C.index=0,C.sibling=null,C}function f(C,T,M){if(C.index=M,!e)return C.flags|=1048576,T;if(M=C.alternate,M!==null)return M=M.index,M<T?(C.flags|=67108866,T):M;return C.flags|=67108866,T}function p(C){return e&&C.alternate===null&&(C.flags|=67108866),C}function g(C,T,M,_){if(T===null||T.tag!==6)return T=ng(M,C.mode,_),T.return=C,T._debugOwner=C,T._debugTask=C._debugTask,T._debugInfo=xe,T;return T=u(T,M),T.return=C,T._debugInfo=xe,T}function v(C,T,M,_){var F=M.type;if(F===Hr)return T=D(C,T,M.props.children,_,M.key),Ih(M,T,C),T;if(T!==null&&(T.elementType===F||uS(T,M)||typeof F==="object"&&F!==null&&F.$$typeof===yi&&hs(F)===T.type))return T=u(T,M.props),dc(T,M),T.return=C,T._debugOwner=M._owner,T._debugInfo=xe,T;return T=Bh(M,C.mode,_),dc(T,M),T.return=C,T._debugInfo=xe,T}function x(C,T,M,_){if(T===null||T.tag!==4||T.stateNode.containerInfo!==M.containerInfo||T.stateNode.implementation!==M.implementation)return T=ig(M,C.mode,_),T.return=C,T._debugInfo=xe,T;return T=u(T,M.children||[]),T.return=C,T._debugInfo=xe,T}function D(C,T,M,_,F){if(T===null||T.tag!==7)return T=ma(M,C.mode,_,F),T.return=C,T._debugOwner=C,T._debugTask=C._debugTask,T._debugInfo=xe,T;return T=u(T,M),T.return=C,T._debugInfo=xe,T}function O(C,T,M){if(typeof T==="string"&&T!==""||typeof T==="number"||typeof T==="bigint")return T=ng(""+T,C.mode,M),T.return=C,T._debugOwner=C,T._debugTask=C._debugTask,T._debugInfo=xe,T;if(typeof T==="object"&&T!==null){switch(T.$$typeof){case el:return M=Bh(T,C.mode,M),dc(M,T),M.return=C,C=gn(T._debugInfo),M._debugInfo=xe,xe=C,M;case zr:return T=ig(T,C.mode,M),T.return=C,T._debugInfo=xe,T;case yi:var _=gn(T._debugInfo);return T=hs(T),C=O(C,T,M),xe=_,C}if(ln(T)||$t(T))return M=ma(T,C.mode,M,null),M.return=C,M._debugOwner=C,M._debugTask=C._debugTask,C=gn(T._debugInfo),M._debugInfo=xe,xe=C,M;if(typeof T.then==="function")return _=gn(T._debugInfo),C=O(C,jh(T),M),xe=_,C;if(T.$$typeof===tl)return O(C,_h(C,T),M);$h(C,T)}return typeof T==="function"&&Ph(C,T),typeof T==="symbol"&&Yh(C,T),null}function A(C,T,M,_){var F=T!==null?T.key:null;if(typeof M==="string"&&M!==""||typeof M==="number"||typeof M==="bigint")return F!==null?null:g(C,T,""+M,_);if(typeof M==="object"&&M!==null){switch(M.$$typeof){case el:return M.key===F?(F=gn(M._debugInfo),C=v(C,T,M,_),xe=F,C):null;case zr:return M.key===F?x(C,T,M,_):null;case yi:return F=gn(M._debugInfo),M=hs(M),C=A(C,T,M,_),xe=F,C}if(ln(M)||$t(M)){if(F!==null)return null;return F=gn(M._debugInfo),C=D(C,T,M,_,null),xe=F,C}if(typeof M.then==="function")return F=gn(M._debugInfo),C=A(C,T,jh(M),_),xe=F,C;if(M.$$typeof===tl)return A(C,T,_h(C,M),_);$h(C,M)}return typeof M==="function"&&Ph(C,M),typeof M==="symbol"&&Yh(C,M),null}function B(C,T,M,_,F){if(typeof _==="string"&&_!==""||typeof _==="number"||typeof _==="bigint")return C=C.get(M)||null,g(T,C,""+_,F);if(typeof _==="object"&&_!==null){switch(_.$$typeof){case el:return M=C.get(_.key===null?M:_.key)||null,C=gn(_._debugInfo),T=v(T,M,_,F),xe=C,T;case zr:return C=C.get(_.key===null?M:_.key)||null,x(T,C,_,F);case yi:var ge=gn(_._debugInfo);return _=hs(_),T=B(C,T,M,_,F),xe=ge,T}if(ln(_)||$t(_))return M=C.get(M)||null,C=gn(_._debugInfo),T=D(T,M,_,F,null),xe=C,T;if(typeof _.then==="function")return ge=gn(_._debugInfo),T=B(C,T,M,jh(_),F),xe=ge,T;if(_.$$typeof===tl)return B(C,T,M,_h(T,_),F);$h(T,_)}return typeof _==="function"&&Ph(T,_),typeof _==="symbol"&&Yh(T,_),null}function X(C,T,M,_){if(typeof M!=="object"||M===null)return _;switch(M.$$typeof){case el:case zr:b(C,T,M);var F=M.key;if(typeof F!=="string")break;if(_===null){_=new Set,_.add(F);break}if(!_.has(F)){_.add(F);break}Y(T,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.",F)});break;case yi:M=hs(M),X(C,T,M,_)}return _}function Z(C,T,M,_){for(var F=null,ge=null,oe=null,ee=T,Se=T=0,yt=null;ee!==null&&Se<M.length;Se++){ee.index>Se?(yt=ee,ee=null):yt=ee.sibling;var Yt=A(C,ee,M[Se],_);if(Yt===null){ee===null&&(ee=yt);break}F=X(C,Yt,M[Se],F),e&&ee&&Yt.alternate===null&&n(C,ee),T=f(Yt,T,Se),oe===null?ge=Yt:oe.sibling=Yt,oe=Yt,ee=yt}if(Se===M.length)return o(C,ee),Le&&Tl(C,Se),ge;if(ee===null){for(;Se<M.length;Se++)ee=O(C,M[Se],_),ee!==null&&(F=X(C,ee,M[Se],F),T=f(ee,T,Se),oe===null?ge=ee:oe.sibling=ee,oe=ee);return Le&&Tl(C,Se),ge}for(ee=a(ee);Se<M.length;Se++)yt=B(ee,C,Se,M[Se],_),yt!==null&&(F=X(C,yt,M[Se],F),e&&yt.alternate!==null&&ee.delete(yt.key===null?Se:yt.key),T=f(yt,T,Se),oe===null?ge=yt:oe.sibling=yt,oe=yt);return e&&ee.forEach(function(Gl){return n(C,Gl)}),Le&&Tl(C,Se),ge}function ht(C,T,M,_){if(M==null)throw Error("An iterable object provided no iterator.");for(var F=null,ge=null,oe=T,ee=T=0,Se=null,yt=null,Yt=M.next();oe!==null&&!Yt.done;ee++,Yt=M.next()){oe.index>ee?(Se=oe,oe=null):Se=oe.sibling;var Gl=A(C,oe,Yt.value,_);if(Gl===null){oe===null&&(oe=Se);break}yt=X(C,Gl,Yt.value,yt),e&&oe&&Gl.alternate===null&&n(C,oe),T=f(Gl,T,ee),ge===null?F=Gl:ge.sibling=Gl,ge=Gl,oe=Se}if(Yt.done)return o(C,oe),Le&&Tl(C,ee),F;if(oe===null){for(;!Yt.done;ee++,Yt=M.next())oe=O(C,Yt.value,_),oe!==null&&(yt=X(C,oe,Yt.value,yt),T=f(oe,T,ee),ge===null?F=oe:ge.sibling=oe,ge=oe);return Le&&Tl(C,ee),F}for(oe=a(oe);!Yt.done;ee++,Yt=M.next())Se=B(oe,C,ee,Yt.value,_),Se!==null&&(yt=X(C,Se,Yt.value,yt),e&&Se.alternate!==null&&oe.delete(Se.key===null?ee:Se.key),T=f(Se,T,ee),ge===null?F=Se:ge.sibling=Se,ge=Se);return e&&oe.forEach(function(Dz){return n(C,Dz)}),Le&&Tl(C,ee),F}function He(C,T,M,_){if(typeof M==="object"&&M!==null&&M.type===Hr&&M.key===null&&(Ih(M,null,C),M=M.props.children),typeof M==="object"&&M!==null){switch(M.$$typeof){case el:var F=gn(M._debugInfo);e:{for(var ge=M.key;T!==null;){if(T.key===ge){if(ge=M.type,ge===Hr){if(T.tag===7){o(C,T.sibling),_=u(T,M.props.children),_.return=C,_._debugOwner=M._owner,_._debugInfo=xe,Ih(M,_,C),C=_;break e}}else if(T.elementType===ge||uS(T,M)||typeof ge==="object"&&ge!==null&&ge.$$typeof===yi&&hs(ge)===T.type){o(C,T.sibling),_=u(T,M.props),dc(_,M),_.return=C,_._debugOwner=M._owner,_._debugInfo=xe,C=_;break e}o(C,T);break}else n(C,T);T=T.sibling}M.type===Hr?(_=ma(M.props.children,C.mode,_,M.key),_.return=C,_._debugOwner=C,_._debugTask=C._debugTask,_._debugInfo=xe,Ih(M,_,C),C=_):(_=Bh(M,C.mode,_),dc(_,M),_.return=C,_._debugInfo=xe,C=_)}return C=p(C),xe=F,C;case zr:e:{F=M;for(M=F.key;T!==null;){if(T.key===M)if(T.tag===4&&T.stateNode.containerInfo===F.containerInfo&&T.stateNode.implementation===F.implementation){o(C,T.sibling),_=u(T,F.children||[]),_.return=C,C=_;break e}else{o(C,T);break}else n(C,T);T=T.sibling}_=ig(F,C.mode,_),_.return=C,C=_}return p(C);case yi:return F=gn(M._debugInfo),M=hs(M),C=He(C,T,M,_),xe=F,C}if(ln(M))return F=gn(M._debugInfo),C=Z(C,T,M,_),xe=F,C;if($t(M)){if(F=gn(M._debugInfo),ge=$t(M),typeof ge!=="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var oe=ge.call(M);if(oe===M){if(C.tag!==0||Object.prototype.toString.call(C.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(oe)!=="[object Generator]")UC||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."),UC=!0}else M.entries!==ge||zy||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),zy=!0);return C=ht(C,T,oe,_),xe=F,C}if(typeof M.then==="function")return F=gn(M._debugInfo),C=He(C,T,jh(M),_),xe=F,C;if(M.$$typeof===tl)return He(C,T,_h(C,M),_);$h(C,M)}if(typeof M==="string"&&M!==""||typeof M==="number"||typeof M==="bigint")return F=""+M,T!==null&&T.tag===6?(o(C,T.sibling),_=u(T,F),_.return=C,C=_):(o(C,T),_=ng(F,C.mode,_),_.return=C,_._debugOwner=C,_._debugTask=C._debugTask,_._debugInfo=xe,C=_),p(C);return typeof M==="function"&&Ph(C,M),typeof M==="symbol"&&Yh(C,M),o(C,T)}return function(C,T,M,_){var F=xe;xe=null;try{cf=0;var ge=He(C,T,M,_);return tu=null,ge}catch(yt){if(yt===eu||yt===ep)throw yt;var oe=w(29,yt,null,C.mode);oe.lanes=_,oe.return=C;var ee=oe._debugInfo=xe;if(oe._debugOwner=C._debugOwner,oe._debugTask=C._debugTask,ee!=null){for(var Se=ee.length-1;0<=Se;Se--)if(typeof ee[Se].stack==="string"){oe._debugOwner=ee[Se],oe._debugTask=ee[Se].debugTask;break}}return oe}finally{xe=F}}}function zS(e,n){var o=ln(e);return e=!o&&typeof $t(e)==="function",o||e?(o=o?"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>",o,n,o),!1):!0}function mg(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function gg(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ds(e){return{lane:e,tag:$C,payload:null,callback:null,next:null}}function ps(e,n,o){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,Ny===a&&!XC){var u=P(e);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.
84
+ <%s>%s</%s>`,o,n,o))}function Qh(e,n){var o=pg();o!==null?o.run(LS.bind(null,e,n)):LS(e,n)}function BS(e){function n(C,T){if(e){var M=C.deletions;M===null?(C.deletions=[T],C.flags|=16):M.push(T)}}function o(C,T){if(!e)return null;for(;T!==null;)n(C,T),T=T.sibling;return null}function a(C){for(var T=new Map;C!==null;)C.key!==null?T.set(C.key,C):T.set(C.index,C),C=C.sibling;return T}function u(C,T){return C=Tl(C,T),C.index=0,C.sibling=null,C}function f(C,T,M){if(C.index=M,!e)return C.flags|=1048576,T;if(M=C.alternate,M!==null)return M=M.index,M<T?(C.flags|=67108866,T):M;return C.flags|=67108866,T}function p(C){return e&&C.alternate===null&&(C.flags|=67108866),C}function g(C,T,M,_){if(T===null||T.tag!==6)return T=ng(M,C.mode,_),T.return=C,T._debugOwner=C,T._debugTask=C._debugTask,T._debugInfo=xe,T;return T=u(T,M),T.return=C,T._debugInfo=xe,T}function v(C,T,M,_){var F=M.type;if(F===Ur)return T=D(C,T,M.props.children,_,M.key),$h(M,T,C),T;if(T!==null&&(T.elementType===F||uS(T,M)||typeof F==="object"&&F!==null&&F.$$typeof===mi&&ps(F)===T.type))return T=u(T,M.props),mc(T,M),T.return=C,T._debugOwner=M._owner,T._debugInfo=xe,T;return T=Hh(M,C.mode,_),mc(T,M),T.return=C,T._debugInfo=xe,T}function x(C,T,M,_){if(T===null||T.tag!==4||T.stateNode.containerInfo!==M.containerInfo||T.stateNode.implementation!==M.implementation)return T=ig(M,C.mode,_),T.return=C,T._debugInfo=xe,T;return T=u(T,M.children||[]),T.return=C,T._debugInfo=xe,T}function D(C,T,M,_,F){if(T===null||T.tag!==7)return T=Sa(M,C.mode,_,F),T.return=C,T._debugOwner=C,T._debugTask=C._debugTask,T._debugInfo=xe,T;return T=u(T,M),T.return=C,T._debugInfo=xe,T}function O(C,T,M){if(typeof T==="string"&&T!==""||typeof T==="number"||typeof T==="bigint")return T=ng(""+T,C.mode,M),T.return=C,T._debugOwner=C,T._debugTask=C._debugTask,T._debugInfo=xe,T;if(typeof T==="object"&&T!==null){switch(T.$$typeof){case el:return M=Hh(T,C.mode,M),mc(M,T),M.return=C,C=mn(T._debugInfo),M._debugInfo=xe,xe=C,M;case _r:return T=ig(T,C.mode,M),T.return=C,T._debugInfo=xe,T;case mi:var _=mn(T._debugInfo);return T=ps(T),C=O(C,T,M),xe=_,C}if(on(T)||It(T))return M=Sa(T,C.mode,M,null),M.return=C,M._debugOwner=C,M._debugTask=C._debugTask,C=mn(T._debugInfo),M._debugInfo=xe,xe=C,M;if(typeof T.then==="function")return _=mn(T._debugInfo),C=O(C,Ph(T),M),xe=_,C;if(T.$$typeof===tl)return O(C,qh(C,T),M);Yh(C,T)}return typeof T==="function"&&Xh(C,T),typeof T==="symbol"&&Qh(C,T),null}function A(C,T,M,_){var F=T!==null?T.key:null;if(typeof M==="string"&&M!==""||typeof M==="number"||typeof M==="bigint")return F!==null?null:g(C,T,""+M,_);if(typeof M==="object"&&M!==null){switch(M.$$typeof){case el:return M.key===F?(F=mn(M._debugInfo),C=v(C,T,M,_),xe=F,C):null;case _r:return M.key===F?x(C,T,M,_):null;case mi:return F=mn(M._debugInfo),M=ps(M),C=A(C,T,M,_),xe=F,C}if(on(M)||It(M)){if(F!==null)return null;return F=mn(M._debugInfo),C=D(C,T,M,_,null),xe=F,C}if(typeof M.then==="function")return F=mn(M._debugInfo),C=A(C,T,Ph(M),_),xe=F,C;if(M.$$typeof===tl)return A(C,T,qh(C,M),_);Yh(C,M)}return typeof M==="function"&&Xh(C,M),typeof M==="symbol"&&Qh(C,M),null}function B(C,T,M,_,F){if(typeof _==="string"&&_!==""||typeof _==="number"||typeof _==="bigint")return C=C.get(M)||null,g(T,C,""+_,F);if(typeof _==="object"&&_!==null){switch(_.$$typeof){case el:return M=C.get(_.key===null?M:_.key)||null,C=mn(_._debugInfo),T=v(T,M,_,F),xe=C,T;case _r:return C=C.get(_.key===null?M:_.key)||null,x(T,C,_,F);case mi:var ge=mn(_._debugInfo);return _=ps(_),T=B(C,T,M,_,F),xe=ge,T}if(on(_)||It(_))return M=C.get(M)||null,C=mn(_._debugInfo),T=D(T,M,_,F,null),xe=C,T;if(typeof _.then==="function")return ge=mn(_._debugInfo),T=B(C,T,M,Ph(_),F),xe=ge,T;if(_.$$typeof===tl)return B(C,T,M,qh(T,_),F);Yh(T,_)}return typeof _==="function"&&Xh(T,_),typeof _==="symbol"&&Qh(T,_),null}function X(C,T,M,_){if(typeof M!=="object"||M===null)return _;switch(M.$$typeof){case el:case _r:b(C,T,M);var F=M.key;if(typeof F!=="string")break;if(_===null){_=new Set,_.add(F);break}if(!_.has(F)){_.add(F);break}Y(T,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.",F)});break;case mi:M=ps(M),X(C,T,M,_)}return _}function Z(C,T,M,_){for(var F=null,ge=null,oe=null,te=T,Se=T=0,bt=null;te!==null&&Se<M.length;Se++){te.index>Se?(bt=te,te=null):bt=te.sibling;var Pt=A(C,te,M[Se],_);if(Pt===null){te===null&&(te=bt);break}F=X(C,Pt,M[Se],F),e&&te&&Pt.alternate===null&&n(C,te),T=f(Pt,T,Se),oe===null?ge=Pt:oe.sibling=Pt,oe=Pt,te=bt}if(Se===M.length)return o(C,te),Le&&El(C,Se),ge;if(te===null){for(;Se<M.length;Se++)te=O(C,M[Se],_),te!==null&&(F=X(C,te,M[Se],F),T=f(te,T,Se),oe===null?ge=te:oe.sibling=te,oe=te);return Le&&El(C,Se),ge}for(te=a(te);Se<M.length;Se++)bt=B(te,C,Se,M[Se],_),bt!==null&&(F=X(C,bt,M[Se],F),e&&bt.alternate!==null&&te.delete(bt.key===null?Se:bt.key),T=f(bt,T,Se),oe===null?ge=bt:oe.sibling=bt,oe=bt);return e&&te.forEach(function(Wl){return n(C,Wl)}),Le&&El(C,Se),ge}function dt(C,T,M,_){if(M==null)throw Error("An iterable object provided no iterator.");for(var F=null,ge=null,oe=T,te=T=0,Se=null,bt=null,Pt=M.next();oe!==null&&!Pt.done;te++,Pt=M.next()){oe.index>te?(Se=oe,oe=null):Se=oe.sibling;var Wl=A(C,oe,Pt.value,_);if(Wl===null){oe===null&&(oe=Se);break}bt=X(C,Wl,Pt.value,bt),e&&oe&&Wl.alternate===null&&n(C,oe),T=f(Wl,T,te),ge===null?F=Wl:ge.sibling=Wl,ge=Wl,oe=Se}if(Pt.done)return o(C,oe),Le&&El(C,te),F;if(oe===null){for(;!Pt.done;te++,Pt=M.next())oe=O(C,Pt.value,_),oe!==null&&(bt=X(C,oe,Pt.value,bt),T=f(oe,T,te),ge===null?F=oe:ge.sibling=oe,ge=oe);return Le&&El(C,te),F}for(oe=a(oe);!Pt.done;te++,Pt=M.next())Se=B(oe,C,te,Pt.value,_),Se!==null&&(bt=X(C,Se,Pt.value,bt),e&&Se.alternate!==null&&oe.delete(Se.key===null?te:Se.key),T=f(Se,T,te),ge===null?F=Se:ge.sibling=Se,ge=Se);return e&&oe.forEach(function(Oz){return n(C,Oz)}),Le&&El(C,te),F}function He(C,T,M,_){if(typeof M==="object"&&M!==null&&M.type===Ur&&M.key===null&&($h(M,null,C),M=M.props.children),typeof M==="object"&&M!==null){switch(M.$$typeof){case el:var F=mn(M._debugInfo);e:{for(var ge=M.key;T!==null;){if(T.key===ge){if(ge=M.type,ge===Ur){if(T.tag===7){o(C,T.sibling),_=u(T,M.props.children),_.return=C,_._debugOwner=M._owner,_._debugInfo=xe,$h(M,_,C),C=_;break e}}else if(T.elementType===ge||uS(T,M)||typeof ge==="object"&&ge!==null&&ge.$$typeof===mi&&ps(ge)===T.type){o(C,T.sibling),_=u(T,M.props),mc(_,M),_.return=C,_._debugOwner=M._owner,_._debugInfo=xe,C=_;break e}o(C,T);break}else n(C,T);T=T.sibling}M.type===Ur?(_=Sa(M.props.children,C.mode,_,M.key),_.return=C,_._debugOwner=C,_._debugTask=C._debugTask,_._debugInfo=xe,$h(M,_,C),C=_):(_=Hh(M,C.mode,_),mc(_,M),_.return=C,_._debugInfo=xe,C=_)}return C=p(C),xe=F,C;case _r:e:{F=M;for(M=F.key;T!==null;){if(T.key===M)if(T.tag===4&&T.stateNode.containerInfo===F.containerInfo&&T.stateNode.implementation===F.implementation){o(C,T.sibling),_=u(T,F.children||[]),_.return=C,C=_;break e}else{o(C,T);break}else n(C,T);T=T.sibling}_=ig(F,C.mode,_),_.return=C,C=_}return p(C);case mi:return F=mn(M._debugInfo),M=ps(M),C=He(C,T,M,_),xe=F,C}if(on(M))return F=mn(M._debugInfo),C=Z(C,T,M,_),xe=F,C;if(It(M)){if(F=mn(M._debugInfo),ge=It(M),typeof ge!=="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var oe=ge.call(M);if(oe===M){if(C.tag!==0||Object.prototype.toString.call(C.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(oe)!=="[object Generator]")UC||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."),UC=!0}else M.entries!==ge||zy||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),zy=!0);return C=dt(C,T,oe,_),xe=F,C}if(typeof M.then==="function")return F=mn(M._debugInfo),C=He(C,T,Ph(M),_),xe=F,C;if(M.$$typeof===tl)return He(C,T,qh(C,M),_);Yh(C,M)}if(typeof M==="string"&&M!==""||typeof M==="number"||typeof M==="bigint")return F=""+M,T!==null&&T.tag===6?(o(C,T.sibling),_=u(T,F),_.return=C,C=_):(o(C,T),_=ng(F,C.mode,_),_.return=C,_._debugOwner=C,_._debugTask=C._debugTask,_._debugInfo=xe,C=_),p(C);return typeof M==="function"&&Xh(C,M),typeof M==="symbol"&&Qh(C,M),o(C,T)}return function(C,T,M,_){var F=xe;xe=null;try{hf=0;var ge=He(C,T,M,_);return ou=null,ge}catch(bt){if(bt===iu||bt===np)throw bt;var oe=w(29,bt,null,C.mode);oe.lanes=_,oe.return=C;var te=oe._debugInfo=xe;if(oe._debugOwner=C._debugOwner,oe._debugTask=C._debugTask,te!=null){for(var Se=te.length-1;0<=Se;Se--)if(typeof te[Se].stack==="string"){oe._debugOwner=te[Se],oe._debugTask=te[Se].debugTask;break}}return oe}finally{xe=F}}}function zS(e,n){var o=on(e);return e=!o&&typeof It(e)==="function",o||e?(o=o?"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>",o,n,o),!1):!0}function mg(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function gg(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ms(e){return{lane:e,tag:$C,payload:null,callback:null,next:null}}function gs(e,n,o){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,Ny===a&&!XC){var u=P(e);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.
85
85
 
86
- Please update the following component: %s`,u),XC=!0}if((Ie&an)!==pn)return u=a.pending,u===null?n.next=n:(n.next=u.next,u.next=n),a.pending=n,n=Lh(e),rS(e,null,o),n;return Rh(e,a,n,o),Lh(e)}function pc(e,n,o){if(n=n.updateQueue,n!==null&&(n=n.shared,(o&4194048)!==0)){var a=n.lanes;a&=e.pendingLanes,o|=a,n.lanes=o,fr(e,o)}}function Xh(e,n){var{updateQueue:o,alternate:a}=e;if(a!==null&&(a=a.updateQueue,o===a)){var u=null,f=null;if(o=o.firstBaseUpdate,o!==null){do{var p={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};f===null?u=f=p:f=f.next=p,o=o.next}while(o!==null);f===null?u=f=n:f=f.next=n}else u=f=n;o={baseState:a.baseState,firstBaseUpdate:u,lastBaseUpdate:f,shared:a.shared,callbacks:a.callbacks},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=n:e.next=n,o.lastBaseUpdate=n}function mc(){if(_y){var e=Kr;if(e!==null)throw e}}function gc(e,n,o,a){_y=!1;var u=e.updateQueue;Hs=!1,Ny=u.shared;var{firstBaseUpdate:f,lastBaseUpdate:p}=u,g=u.shared.pending;if(g!==null){u.shared.pending=null;var v=g,x=v.next;v.next=null,p===null?f=x:p.next=x,p=v;var D=e.alternate;D!==null&&(D=D.updateQueue,g=D.lastBaseUpdate,g!==p&&(g===null?D.firstBaseUpdate=x:g.next=x,D.lastBaseUpdate=v))}if(f!==null){var O=u.baseState;p=0,D=x=v=null,g=f;do{var A=g.lane&-536870913,B=A!==g.lane;if(B?(ke&A)===A:(a&A)===A){A!==0&&A===La&&(_y=!0),D!==null&&(D=D.next={lane:0,tag:g.tag,payload:g.payload,callback:null,next:null});e:{A=e;var X=g,Z=n,ht=o;switch(X.tag){case PC:if(X=X.payload,typeof X==="function"){Jr=!0;var He=X.call(ht,O,Z);if(A.mode&En){Fe(!0);try{X.call(ht,O,Z)}finally{Fe(!1)}}Jr=!1,O=He;break e}O=X;break e;case Hy:A.flags=A.flags&-65537|128;case $C:if(He=X.payload,typeof He==="function"){if(Jr=!0,X=He.call(ht,O,Z),A.mode&En){Fe(!0);try{He.call(ht,O,Z)}finally{Fe(!1)}}Jr=!1}else X=He;if(X===null||X===void 0)break e;O=Me({},O,X);break e;case YC:Hs=!0}}A=g.callback,A!==null&&(e.flags|=64,B&&(e.flags|=8192),B=u.callbacks,B===null?u.callbacks=[A]:B.push(A))}else B={lane:A,tag:g.tag,payload:g.payload,callback:g.callback,next:null},D===null?(x=D=B,v=O):D=D.next=B,p|=A;if(g=g.next,g===null)if(g=u.shared.pending,g===null)break;else B=g,g=B.next,B.next=null,u.lastBaseUpdate=B,u.shared.pending=null}while(1);D===null&&(v=O),u.baseState=v,u.firstBaseUpdate=x,u.lastBaseUpdate=D,f===null&&(u.shared.lanes=0),Us|=p,e.lanes=p,e.memoizedState=O}Ny=null}function HS(e,n){if(typeof e!=="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+e);e.call(n)}function kR(e,n){var o=e.shared.hiddenCallbacks;if(o!==null)for(e.shared.hiddenCallbacks=null,e=0;e<o.length;e++)HS(o[e],n)}function NS(e,n){var o=e.callbacks;if(o!==null)for(e.callbacks=null,e=0;e<o.length;e++)HS(o[e],n)}function _S(e,n){var o=fl;Be(np,o,e),Be(nu,n,e),fl=o|n.baseLanes}function yg(e){Be(np,fl,e),Be(nu,nu.current,e)}function bg(e){fl=np.current,Ne(nu,e),Ne(np,e)}function ms(e){var n=e.alternate;Be(Pt,Pt.current&iu,e),Be(wi,e,e),$i===null&&(n===null||nu.current!==null?$i=e:n.memoizedState!==null&&($i=e))}function vg(e){Be(Pt,Pt.current,e),Be(wi,e,e),$i===null&&($i=e)}function US(e){e.tag===22?(Be(Pt,Pt.current,e),Be(wi,e,e),$i===null&&($i=e)):gs(e)}function gs(e){Be(Pt,Pt.current,e),Be(wi,wi.current,e)}function pi(e){Ne(wi,e),$i===e&&($i=null),Ne(Pt,e)}function Qh(e){for(var n=e;n!==null;){if(n.tag===13){var o=n.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||L0(o)||B0(o)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}function Ee(){var e=z;Yi===null?Yi=[e]:Yi.push(e)}function V(){var e=z;if(Yi!==null&&($l++,Yi[$l]!==e)){var n=P(me);if(!QC.has(n)&&(QC.add(n),Yi!==null)){for(var o="",a=0;a<=$l;a++){var u=Yi[a],f=a===$l?e:u;for(u=a+1+". "+u;30>u.length;)u+=" ";u+=f+`
86
+ Please update the following component: %s`,u),XC=!0}if((je&sn)!==dn)return u=a.pending,u===null?n.next=n:(n.next=u.next,u.next=n),a.pending=n,n=zh(e),rS(e,null,o),n;return Bh(e,a,n,o),zh(e)}function gc(e,n,o){if(n=n.updateQueue,n!==null&&(n=n.shared,(o&4194048)!==0)){var a=n.lanes;a&=e.pendingLanes,o|=a,n.lanes=o,gr(e,o)}}function Gh(e,n){var{updateQueue:o,alternate:a}=e;if(a!==null&&(a=a.updateQueue,o===a)){var u=null,f=null;if(o=o.firstBaseUpdate,o!==null){do{var p={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};f===null?u=f=p:f=f.next=p,o=o.next}while(o!==null);f===null?u=f=n:f=f.next=n}else u=f=n;o={baseState:a.baseState,firstBaseUpdate:u,lastBaseUpdate:f,shared:a.shared,callbacks:a.callbacks},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=n:e.next=n,o.lastBaseUpdate=n}function yc(){if(_y){var e=nu;if(e!==null)throw e}}function bc(e,n,o,a){_y=!1;var u=e.updateQueue;_s=!1,Ny=u.shared;var{firstBaseUpdate:f,lastBaseUpdate:p}=u,g=u.shared.pending;if(g!==null){u.shared.pending=null;var v=g,x=v.next;v.next=null,p===null?f=x:p.next=x,p=v;var D=e.alternate;D!==null&&(D=D.updateQueue,g=D.lastBaseUpdate,g!==p&&(g===null?D.firstBaseUpdate=x:g.next=x,D.lastBaseUpdate=v))}if(f!==null){var O=u.baseState;p=0,D=x=v=null,g=f;do{var A=g.lane&-536870913,B=A!==g.lane;if(B?(ke&A)===A:(a&A)===A){A!==0&&A===_a&&(_y=!0),D!==null&&(D=D.next={lane:0,tag:g.tag,payload:g.payload,callback:null,next:null});e:{A=e;var X=g,Z=n,dt=o;switch(X.tag){case PC:if(X=X.payload,typeof X==="function"){eu=!0;var He=X.call(dt,O,Z);if(A.mode&Tn){Fe(!0);try{X.call(dt,O,Z)}finally{Fe(!1)}}eu=!1,O=He;break e}O=X;break e;case Hy:A.flags=A.flags&-65537|128;case $C:if(He=X.payload,typeof He==="function"){if(eu=!0,X=He.call(dt,O,Z),A.mode&Tn){Fe(!0);try{He.call(dt,O,Z)}finally{Fe(!1)}}eu=!1}else X=He;if(X===null||X===void 0)break e;O=Ee({},O,X);break e;case YC:_s=!0}}A=g.callback,A!==null&&(e.flags|=64,B&&(e.flags|=8192),B=u.callbacks,B===null?u.callbacks=[A]:B.push(A))}else B={lane:A,tag:g.tag,payload:g.payload,callback:g.callback,next:null},D===null?(x=D=B,v=O):D=D.next=B,p|=A;if(g=g.next,g===null)if(g=u.shared.pending,g===null)break;else B=g,g=B.next,B.next=null,u.lastBaseUpdate=B,u.shared.pending=null}while(1);D===null&&(v=O),u.baseState=v,u.firstBaseUpdate=x,u.lastBaseUpdate=D,f===null&&(u.shared.lanes=0),Vs|=p,e.lanes=p,e.memoizedState=O}Ny=null}function HS(e,n){if(typeof e!=="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+e);e.call(n)}function CR(e,n){var o=e.shared.hiddenCallbacks;if(o!==null)for(e.shared.hiddenCallbacks=null,e=0;e<o.length;e++)HS(o[e],n)}function NS(e,n){var o=e.callbacks;if(o!==null)for(e.callbacks=null,e=0;e<o.length;e++)HS(o[e],n)}function _S(e,n){var o=fl;Be(op,o,e),Be(lu,n,e),fl=o|n.baseLanes}function yg(e){Be(op,fl,e),Be(lu,lu.current,e)}function bg(e){fl=op.current,Ne(lu,e),Ne(op,e)}function ys(e){var n=e.alternate;Be($t,$t.current&su,e),Be(vi,e,e),Ii===null&&(n===null||lu.current!==null?Ii=e:n.memoizedState!==null&&(Ii=e))}function vg(e){Be($t,$t.current,e),Be(vi,e,e),Ii===null&&(Ii=e)}function US(e){e.tag===22?(Be($t,$t.current,e),Be(vi,e,e),Ii===null&&(Ii=e)):bs(e)}function bs(e){Be($t,$t.current,e),Be(vi,vi.current,e)}function hi(e){Ne(vi,e),Ii===e&&(Ii=null),Ne($t,e)}function Wh(e){for(var n=e;n!==null;){if(n.tag===13){var o=n.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||L0(o)||B0(o)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}function Te(){var e=z;Pi===null?Pi=[e]:Pi.push(e)}function V(){var e=z;if(Pi!==null&&(Pl++,Pi[Pl]!==e)){var n=P(me);if(!QC.has(n)&&(QC.add(n),Pi!==null)){for(var o="",a=0;a<=Pl;a++){var u=Pi[a],f=a===Pl?e:u;for(u=a+1+". "+u;30>u.length;)u+=" ";u+=f+`
87
87
  `,o+=u}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
88
88
 
89
89
  Previous render Next render
90
90
  ------------------------------------------------------
91
91
  %s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
92
- `,n,o)}}}function wr(e){e===void 0||e===null||ln(e)||console.error("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",z,typeof e)}function Gh(){var e=P(me);WC.has(e)||(WC.add(e),console.error("ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",e))}function Vt(){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:
92
+ `,n,o)}}}function Cr(e){e===void 0||e===null||on(e)||console.error("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",z,typeof e)}function Fh(){var e=P(me);WC.has(e)||(WC.add(e),console.error("ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",e))}function qt(){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:
93
93
  1. You might have mismatching versions of React and the renderer (such as React DOM)
94
94
  2. You might be breaking the Rules of Hooks
95
95
  3. You might have more than one copy of React in the same app
96
- See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function Sg(e,n){if(df)return!1;if(n===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.",z),!1;e.length!==n.length&&console.error(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
96
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function Sg(e,n){if(mf)return!1;if(n===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.",z),!1;e.length!==n.length&&console.error(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
97
97
 
98
98
  Previous: %s
99
- Incoming: %s`,z,"["+n.join(", ")+"]","["+e.join(", ")+"]");for(var o=0;o<n.length&&o<e.length;o++)if(!Un(e[o],n[o]))return!1;return!0}function wg(e,n,o,a,u,f){if(Il=f,me=n,Yi=e!==null?e._debugHookTypes:null,$l=-1,df=e!==null&&e.type!==n.type,Object.prototype.toString.call(o)==="[object AsyncFunction]"||Object.prototype.toString.call(o)==="[object AsyncGeneratorFunction]")f=P(me),Uy.has(f)||(Uy.add(f),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.",f===null?"An unknown Component":"<"+f+">"));n.memoizedState=null,n.updateQueue=null,n.lanes=0,H.H=e!==null&&e.memoizedState!==null?Vy:Yi!==null?FC:qy,_a=f=(n.mode&En)!==pe;var p=Ry(o,a,u);if(_a=!1,lu&&(p=xg(n,o,a,u)),f){Fe(!0);try{p=xg(n,o,a,u)}finally{Fe(!1)}}return qS(e,n),p}function qS(e,n){n._debugHookTypes=Yi,n.dependencies===null?jl!==null&&(n.dependencies={lanes:0,firstContext:null,_debugThenableState:jl}):n.dependencies._debugThenableState=jl,H.H=pf;var o=rt!==null&&rt.next!==null;if(Il=0,Yi=z=Jt=rt=me=null,$l=-1,e!==null&&(e.flags&65011712)!==(n.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),op=!1,hf=0,jl=null,o)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");e===null||Zt||(e=e.dependencies,e!==null&&Nh(e)&&(Zt=!0)),uf?(uf=!1,e=!0):e=!1,e&&(n=P(n)||"Unknown",GC.has(n)||Uy.has(n)||(GC.add(n),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 xg(e,n,o,a){me=e;var u=0;do{if(lu&&(jl=null),hf=0,lu=!1,u>=az)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(u+=1,df=!1,Jt=rt=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}$l=-1,H.H=JC,f=Ry(n,o,a)}while(lu);return f}function CR(){var e=H.H,n=e.useState()[0];return n=typeof n.then==="function"?yc(n):n,e=e.useState()[0],(rt!==null?rt.memoizedState:null)!==e&&(me.flags|=1024),n}function kg(){var e=lp!==0;return lp=0,e}function Cg(e,n,o){n.updateQueue=e.updateQueue,n.flags=(n.mode&mo)!==pe?n.flags&-402655237:n.flags&-2053,e.lanes&=~o}function Ag(e){if(op){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}op=!1}Il=0,Yi=Jt=rt=me=null,$l=-1,z=null,lu=!1,hf=lp=0,jl=null}function zn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Jt===null?me.memoizedState=Jt=e:Jt=Jt.next=e,Jt}function et(){if(rt===null){var e=me.alternate;e=e!==null?e.memoizedState:null}else e=rt.next;var n=Jt===null?me.memoizedState:Jt.next;if(n!==null)Jt=n,rt=e;else{if(e===null){if(me.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.")}rt=e,e={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},Jt===null?me.memoizedState=Jt=e:Jt=Jt.next=e}return Jt}function Wh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yc(e){var n=hf;return hf+=1,jl===null&&(jl=AS()),e=ES(jl,e,n),n=me,(Jt===null?n.memoizedState:Jt.next)===null&&(n=n.alternate,H.H=n!==null&&n.memoizedState!==null?Vy:qy),e}function ys(e){if(e!==null&&typeof e==="object"){if(typeof e.then==="function")return yc(e);if(e.$$typeof===tl)return wt(e)}throw Error("An unsupported type was passed to use(): "+String(e))}function Sa(e){var n=null,o=me.updateQueue;if(o!==null&&(n=o.memoCache),n==null){var a=me.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(n={data:a.data.map(function(u){return u.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),o===null&&(o=Wh(),me.updateQueue=o),o.memoCache=n,o=n.data[n.index],o===void 0||df)for(o=n.data[n.index]=Array(e),a=0;a<e;a++)o[a]=qL;else o.length!==e&&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.",o.length,e);return n.index++,o}function co(e,n){return typeof n==="function"?n(e):n}function Tg(e,n,o){var a=zn();if(o!==void 0){var u=o(n);if(_a){Fe(!0);try{o(n)}finally{Fe(!1)}}}else u=n;return a.memoizedState=a.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},a.queue=e,e=e.dispatch=DR.bind(null,me,e),[a.memoizedState,e]}function xr(e){var n=et();return Eg(n,rt,e)}function Eg(e,n,o){var a=e.queue;if(a===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");a.lastRenderedReducer=o;var u=e.baseQueue,f=a.pending;if(f!==null){if(u!==null){var p=u.next;u.next=f.next,f.next=p}n.baseQueue!==u&&console.error("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),n.baseQueue=u=f,a.pending=null}if(f=e.baseState,u===null)e.memoizedState=f;else{n=u.next;var g=p=null,v=null,x=n,D=!1;do{var O=x.lane&-536870913;if(O!==x.lane?(ke&O)===O:(Il&O)===O){var A=x.revertLane;if(A===0)v!==null&&(v=v.next={lane:0,revertLane:0,gesture:null,action:x.action,hasEagerState:x.hasEagerState,eagerState:x.eagerState,next:null}),O===La&&(D=!0);else if((Il&A)===A){x=x.next,A===La&&(D=!0);continue}else O={lane:0,revertLane:x.revertLane,gesture:null,action:x.action,hasEagerState:x.hasEagerState,eagerState:x.eagerState,next:null},v===null?(g=v=O,p=f):v=v.next=O,me.lanes|=A,Us|=A;O=x.action,_a&&o(f,O),f=x.hasEagerState?x.eagerState:o(f,O)}else A={lane:O,revertLane:x.revertLane,gesture:x.gesture,action:x.action,hasEagerState:x.hasEagerState,eagerState:x.eagerState,next:null},v===null?(g=v=A,p=f):v=v.next=A,me.lanes|=O,Us|=O;x=x.next}while(x!==null&&x!==n);if(v===null?p=f:v.next=g,!Un(f,e.memoizedState)&&(Zt=!0,D&&(o=Kr,o!==null)))throw o;e.memoizedState=f,e.baseState=p,e.baseQueue=v,a.lastRenderedState=f}return u===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function bc(e){var n=et(),o=n.queue;if(o===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");o.lastRenderedReducer=e;var{dispatch:a,pending:u}=o,f=n.memoizedState;if(u!==null){o.pending=null;var p=u=u.next;do f=e(f,p.action),p=p.next;while(p!==u);Un(f,n.memoizedState)||(Zt=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),o.lastRenderedState=f}return[f,a]}function Mg(e,n,o){var a=me,u=zn();if(Le){if(o===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var f=o();ou||f===o()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),ou=!0)}else{if(f=n(),ou||(o=n(),Un(f,o)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),ou=!0)),ut===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");(ke&127)!==0||VS(a,n,f)}return u.memoizedState=f,o={value:f,getSnapshot:n},u.queue=o,Kh(jS.bind(null,a,o,e),[e]),a.flags|=2048,Cr(Pi|In,{destroy:void 0},IS.bind(null,a,o,f,n),null),f}function Fh(e,n,o){var a=me,u=et(),f=Le;if(f){if(o===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");o=o()}else if(o=n(),!ou){var p=n();Un(o,p)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),ou=!0)}if(p=!Un((rt||u).memoizedState,o))u.memoizedState=o,Zt=!0;u=u.queue;var g=jS.bind(null,a,u,e);if(Kn(2048,In,g,[e]),u.getSnapshot!==n||p||Jt!==null&&Jt.memoizedState.tag&Pi){if(a.flags|=2048,Cr(Pi|In,{destroy:void 0},IS.bind(null,a,u,o,n),null),ut===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");f||(Il&127)!==0||VS(a,n,o)}return o}function VS(e,n,o){e.flags|=16384,e={getSnapshot:n,value:o},n=me.updateQueue,n===null?(n=Wh(),me.updateQueue=n,n.stores=[e]):(o=n.stores,o===null?n.stores=[e]:o.push(e))}function IS(e,n,o,a){n.value=o,n.getSnapshot=a,$S(n)&&PS(e)}function jS(e,n,o){return o(function(){$S(n)&&(Io(2,"updateSyncExternalStore()",e),PS(e))})}function $S(e){var n=e.getSnapshot;e=e.value;try{var o=n();return!Un(e,o)}catch(a){return!0}}function PS(e){var n=An(e,2);n!==null&&Bt(n,e,2)}function Dg(e){var n=zn();if(typeof e==="function"){var o=e;if(e=o(),_a){Fe(!0);try{o()}finally{Fe(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:co,lastRenderedState:e},n}function Og(e){e=Dg(e);var n=e.queue,o=uw.bind(null,me,n);return n.dispatch=o,[e.memoizedState,o]}function Rg(e){var n=zn();n.memoizedState=n.baseState=e;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=o,n=Yg.bind(null,me,!0,o),o.dispatch=n,[e,n]}function YS(e,n){var o=et();return XS(o,rt,e,n)}function XS(e,n,o,a){return e.baseState=o,Eg(e,rt,typeof a==="function"?a:co)}function QS(e,n){var o=et();if(rt!==null)return XS(o,rt,e,n);return o.baseState=e,[e,o.queue.dispatch]}function AR(e,n,o,a,u){if(ld(e))throw Error("Cannot update form state while rendering.");if(e=n.action,e!==null){var f={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(p){f.listeners.push(p)}};H.T!==null?o(!0):f.isTransition=!1,a(f),o=n.pending,o===null?(f.next=n.pending=f,GS(n,f)):(f.next=o.next,n.pending=o.next=f)}}function GS(e,n){var{action:o,payload:a}=n,u=e.state;if(n.isTransition){var f=H.T,p={};p._updatedFibers=new Set,H.T=p;try{var g=o(u,a),v=H.S;v!==null&&v(p,g),WS(e,n,g)}catch(x){Lg(e,n,x)}finally{f!==null&&p.types!==null&&(f.types!==null&&f.types!==p.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."),f.types=p.types),H.T=f,f===null&&p._updatedFibers&&(e=p._updatedFibers.size,p._updatedFibers.clear(),10<e&&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{p=o(u,a),WS(e,n,p)}catch(x){Lg(e,n,x)}}function WS(e,n,o){o!==null&&typeof o==="object"&&typeof o.then==="function"?(H.asyncTransitions++,o.then(od,od),o.then(function(a){FS(e,n,a)},function(a){return Lg(e,n,a)}),n.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.")):FS(e,n,o)}function FS(e,n,o){n.status="fulfilled",n.value=o,JS(n),e.state=o,n=e.pending,n!==null&&(o=n.next,o===n?e.pending=null:(o=o.next,n.next=o,GS(e,o)))}function Lg(e,n,o){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do n.status="rejected",n.reason=o,JS(n),n=n.next;while(n!==a)}e.action=null}function JS(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function ZS(e,n){return n}function kr(e,n){if(Le){var o=ut.formState;if(o!==null){e:{var a=me;if(Le){if(gt){t:{var u=gt;for(var f=Ii;u.nodeType!==8;){if(!f){u=null;break t}if(u=gi(u.nextSibling),u===null){u=null;break t}}f=u.data,u=f===ub||f===NA?u:null}if(u){gt=gi(u.nextSibling),a=u.data===ub;break e}}cs(a)}a=!1}a&&(n=o[0])}}return o=zn(),o.memoizedState=o.baseState=n,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ZS,lastRenderedState:n},o.queue=a,o=uw.bind(null,me,a),a.dispatch=o,a=Dg(!1),f=Yg.bind(null,me,!1,a.queue),a=zn(),u={state:n,dispatch:null,action:e,pending:null},a.queue=u,o=AR.bind(null,me,u,f,o),u.dispatch=o,a.memoizedState=e,[n,o,!1]}function Jh(e){var n=et();return KS(n,rt,e)}function KS(e,n,o){if(n=Eg(e,n,ZS)[0],e=xr(co)[0],typeof n==="object"&&n!==null&&typeof n.then==="function")try{var a=yc(n)}catch(p){if(p===eu)throw ep;throw p}else a=n;n=et();var u=n.queue,f=u.dispatch;return o!==n.memoizedState&&(me.flags|=2048,Cr(Pi|In,{destroy:void 0},TR.bind(null,u,o),null)),[a,f,e]}function TR(e,n){e.action=n}function Zh(e){var n=et(),o=rt;if(o!==null)return KS(n,o,e);et(),n=n.memoizedState,o=et();var a=o.queue.dispatch;return o.memoizedState=e,[n,a,!1]}function Cr(e,n,o,a){return e={tag:e,create:o,deps:a,inst:n,next:null},n=me.updateQueue,n===null&&(n=Wh(),me.updateQueue=n),o=n.lastEffect,o===null?n.lastEffect=e.next=e:(a=o.next,o.next=e,e.next=a,n.lastEffect=e),e}function Bg(e){var n=zn();return e={current:e},n.memoizedState=e}function wa(e,n,o,a){var u=zn();me.flags|=e,u.memoizedState=Cr(Pi|n,{destroy:void 0},o,a===void 0?null:a)}function Kn(e,n,o,a){var u=et();a=a===void 0?null:a;var f=u.memoizedState.inst;rt!==null&&a!==null&&Sg(a,rt.memoizedState.deps)?u.memoizedState=Cr(n,f,o,a):(me.flags|=e,u.memoizedState=Cr(Pi|n,f,o,a))}function Kh(e,n){(me.mode&mo)!==pe?wa(276826112,In,e,n):wa(8390656,In,e,n)}function ER(e){me.flags|=4;var n=me.updateQueue;if(n===null)n=Wh(),me.updateQueue=n,n.events=[e];else{var o=n.events;o===null?n.events=[e]:o.push(e)}}function zg(e){var n=zn(),o={impl:e};return n.memoizedState=o,function(){if((Ie&an)!==pn)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return o.impl.apply(void 0,arguments)}}function ed(e){var n=et().memoizedState;return ER({ref:n,nextImpl:e}),function(){if((Ie&an)!==pn)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return n.impl.apply(void 0,arguments)}}function Hg(e,n){var o=4194308;return(me.mode&mo)!==pe&&(o|=134217728),wa(o,xi,e,n)}function ew(e,n){if(typeof n==="function"){e=e();var o=n(e);return function(){typeof o==="function"?o():n(null)}}if(n!==null&&n!==void 0)return n.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(n).join(", ")+"}"),e=e(),n.current=e,function(){n.current=null}}function Ng(e,n,o){typeof n!=="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",n!==null?typeof n:"null"),o=o!==null&&o!==void 0?o.concat([e]):null;var a=4194308;(me.mode&mo)!==pe&&(a|=134217728),wa(a,xi,ew.bind(null,n,e),o)}function td(e,n,o){typeof n!=="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",n!==null?typeof n:"null"),o=o!==null&&o!==void 0?o.concat([e]):null,Kn(4,xi,ew.bind(null,n,e),o)}function _g(e,n){return zn().memoizedState=[e,n===void 0?null:n],e}function nd(e,n){var o=et();n=n===void 0?null:n;var a=o.memoizedState;if(n!==null&&Sg(n,a[1]))return a[0];return o.memoizedState=[e,n],e}function Ug(e,n){var o=zn();n=n===void 0?null:n;var a=e();if(_a){Fe(!0);try{e()}finally{Fe(!1)}}return o.memoizedState=[a,n],a}function id(e,n){var o=et();n=n===void 0?null:n;var a=o.memoizedState;if(n!==null&&Sg(n,a[1]))return a[0];if(a=e(),_a){Fe(!0);try{e()}finally{Fe(!1)}}return o.memoizedState=[a,n],a}function qg(e,n){var o=zn();return Vg(o,e,n)}function tw(e,n){var o=et();return iw(o,rt.memoizedState,e,n)}function nw(e,n){var o=et();return rt===null?Vg(o,e,n):iw(o,rt.memoizedState,e,n)}function Vg(e,n,o){if(o===void 0||(Il&1073741824)!==0&&(ke&261930)===0)return e.memoizedState=n;return e.memoizedState=o,e=ox(),me.lanes|=e,Us|=e,o}function iw(e,n,o,a){if(Un(o,n))return o;if(nu.current!==null)return e=Vg(e,o,a),Un(e,n)||(Zt=!0),e;if((Il&42)===0||(Il&1073741824)!==0&&(ke&261930)===0)return Zt=!0,e.memoizedState=o;return e=ox(),me.lanes|=e,Us|=e,n}function od(){H.asyncTransitions--}function ow(e,n,o,a,u){var f=Ze.p;Ze.p=f!==0&&f<po?f:po;var p=H.T,g={};g._updatedFibers=new Set,H.T=g,Yg(e,!1,n,o);try{var v=u(),x=H.S;if(x!==null&&x(g,v),v!==null&&typeof v==="object"&&typeof v.then==="function"){H.asyncTransitions++,v.then(od,od);var D=xR(v,a);vc(e,n,D,mi(e))}else vc(e,n,a,mi(e))}catch(O){vc(e,n,{then:function(){},status:"rejected",reason:O},mi(e))}finally{Ze.p=f,p!==null&&g.types!==null&&(p.types!==null&&p.types!==g.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."),p.types=g.types),H.T=p,p===null&&g._updatedFibers&&(e=g._updatedFibers.size,g._updatedFibers.clear(),10<e&&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 Ig(e,n,o,a){if(e.tag!==5)throw Error("Expected the form instance to be a HostComponent. This is a bug in React.");var u=lw(e).queue;SR(e),ow(e,u,n,Ga,o===null?y:function(){return sw(e),o(a)})}function lw(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:Ga,baseState:Ga,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:co,lastRenderedState:Ga},next:null};var o={};return n.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:co,lastRenderedState:o},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function sw(e){H.T===null&&console.error("requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.");var n=lw(e);n.next===null&&(n=e.alternate.memoizedState),vc(e,n.next.queue,{},mi(e))}function jg(){var e=Dg(!1);return e=ow.bind(null,me,e.queue,!0,!1),zn().memoizedState=e,[!1,e]}function aw(){var e=xr(co)[0],n=et().memoizedState;return[typeof e==="boolean"?e:yc(e),n]}function rw(){var e=bc(co)[0],n=et().memoizedState;return[typeof e==="boolean"?e:yc(e),n]}function xa(){return wt(Df)}function $g(){var e=zn(),n=ut.identifierPrefix;if(Le){var o=Nl,a=Hl;o=(a&~(1<<32-Hn(a)-1)).toString(32)+o,n="_"+n+"R_"+o,o=lp++,0<o&&(n+="H"+o.toString(32)),n+="_"}else o=sz++,n="_"+n+"r_"+o.toString(32)+"_";return e.memoizedState=n}function Pg(){return zn().memoizedState=MR.bind(null,me)}function MR(e,n){for(var o=e.return;o!==null;){switch(o.tag){case 24:case 3:var a=mi(o),u=ds(a),f=ps(o,u,a);f!==null&&(Io(a,"refresh()",e),Bt(f,o,a),pc(f,o,a)),e=cg(),n!==null&&n!==void 0&&f!==null&&console.error("The seed argument is not enabled outside experimental channels."),u.payload={cache:e};return}o=o.return}}function DR(e,n,o){var a=arguments;typeof a[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()."),a=mi(e);var u={lane:a,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};ld(e)?cw(n,u):(u=Zm(e,n,u,a),u!==null&&(Io(a,"dispatch()",e),Bt(u,e,a),fw(u,n,a)))}function uw(e,n,o){var a=arguments;typeof a[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()."),a=mi(e),vc(e,n,o,a)&&Io(a,"setState()",e)}function vc(e,n,o,a){var u={lane:a,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(ld(e))cw(n,u);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=n.lastRenderedReducer,f!==null)){var p=H.H;H.H=yo;try{var g=n.lastRenderedState,v=f(g,o);if(u.hasEagerState=!0,u.eagerState=v,Un(v,g))return Rh(e,n,u,0),ut===null&&Oh(),!1}catch(x){}finally{H.H=p}}if(o=Zm(e,n,u,a),o!==null)return Bt(o,e,a),fw(o,n,a),!0}return!1}function Yg(e,n,o,a){if(H.T===null&&La===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."),a={lane:2,revertLane:w0(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ld(e)){if(n)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else n=Zm(e,o,a,2),n!==null&&(Io(2,"setOptimistic()",e),Bt(n,e,2))}function ld(e){var n=e.alternate;return e===me||n!==null&&n===me}function cw(e,n){lu=op=!0;var o=e.pending;o===null?n.next=n:(n.next=o.next,o.next=n),e.pending=n}function fw(e,n,o){if((o&4194048)!==0){var a=n.lanes;a&=e.pendingLanes,o|=a,n.lanes=o,fr(e,o)}}function Xg(e){if(e!==null&&typeof e!=="function"){var n=String(e);rA.has(n)||(rA.add(n),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",e))}}function Qg(e,n,o,a){var u=e.memoizedState,f=o(a,u);if(e.mode&En){Fe(!0);try{f=o(a,u)}finally{Fe(!1)}}f===void 0&&(n=je(n)||"Component",oA.has(n)||(oA.add(n),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",n))),u=f===null||f===void 0?u:Me({},u,f),e.memoizedState=u,e.lanes===0&&(e.updateQueue.baseState=u)}function hw(e,n,o,a,u,f,p){var g=e.stateNode;if(typeof g.shouldComponentUpdate==="function"){if(o=g.shouldComponentUpdate(a,f,p),e.mode&En){Fe(!0);try{o=g.shouldComponentUpdate(a,f,p)}finally{Fe(!1)}}return o===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",je(n)||"Component"),o}return n.prototype&&n.prototype.isPureReactComponent?!ac(o,a)||!ac(u,f):!0}function dw(e,n,o,a){var u=n.state;typeof n.componentWillReceiveProps==="function"&&n.componentWillReceiveProps(o,a),typeof n.UNSAFE_componentWillReceiveProps==="function"&&n.UNSAFE_componentWillReceiveProps(o,a),n.state!==u&&(e=P(e)||"Component",KC.has(e)||(KC.add(e),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",e)),Iy.enqueueReplaceState(n,n.state,null))}function ka(e,n){var o=n;if("ref"in n){o={};for(var a in n)a!=="ref"&&(o[a]=n[a])}if(e=e.defaultProps){o===n&&(o=Me({},o));for(var u in e)o[u]===void 0&&(o[u]=e[u])}return o}function pw(e){by(e),console.warn(`%s
99
+ Incoming: %s`,z,"["+n.join(", ")+"]","["+e.join(", ")+"]");for(var o=0;o<n.length&&o<e.length;o++)if(!_n(e[o],n[o]))return!1;return!0}function wg(e,n,o,a,u,f){if(Il=f,me=n,Pi=e!==null?e._debugHookTypes:null,Pl=-1,mf=e!==null&&e.type!==n.type,Object.prototype.toString.call(o)==="[object AsyncFunction]"||Object.prototype.toString.call(o)==="[object AsyncGeneratorFunction]")f=P(me),Uy.has(f)||(Uy.add(f),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.",f===null?"An unknown Component":"<"+f+">"));n.memoizedState=null,n.updateQueue=null,n.lanes=0,H.H=e!==null&&e.memoizedState!==null?Vy:Pi!==null?FC:qy,Ia=f=(n.mode&Tn)!==pe;var p=Ry(o,a,u);if(Ia=!1,ru&&(p=xg(n,o,a,u)),f){Fe(!0);try{p=xg(n,o,a,u)}finally{Fe(!1)}}return qS(e,n),p}function qS(e,n){n._debugHookTypes=Pi,n.dependencies===null?$l!==null&&(n.dependencies={lanes:0,firstContext:null,_debugThenableState:$l}):n.dependencies._debugThenableState=$l,H.H=gf;var o=rt!==null&&rt.next!==null;if(Il=0,Pi=z=Ft=rt=me=null,Pl=-1,e!==null&&(e.flags&65011712)!==(n.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),sp=!1,pf=0,$l=null,o)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");e===null||Jt||(e=e.dependencies,e!==null&&Uh(e)&&(Jt=!0)),ff?(ff=!1,e=!0):e=!1,e&&(n=P(n)||"Unknown",GC.has(n)||Uy.has(n)||(GC.add(n),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 xg(e,n,o,a){me=e;var u=0;do{if(ru&&($l=null),pf=0,ru=!1,u>=rz)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(u+=1,mf=!1,Ft=rt=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}Pl=-1,H.H=JC,f=Ry(n,o,a)}while(ru);return f}function AR(){var e=H.H,n=e.useState()[0];return n=typeof n.then==="function"?vc(n):n,e=e.useState()[0],(rt!==null?rt.memoizedState:null)!==e&&(me.flags|=1024),n}function kg(){var e=ap!==0;return ap=0,e}function Cg(e,n,o){n.updateQueue=e.updateQueue,n.flags=(n.mode&po)!==pe?n.flags&-402655237:n.flags&-2053,e.lanes&=~o}function Ag(e){if(sp){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}sp=!1}Il=0,Pi=Ft=rt=me=null,Pl=-1,z=null,ru=!1,pf=ap=0,$l=null}function Bn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ft===null?me.memoizedState=Ft=e:Ft=Ft.next=e,Ft}function et(){if(rt===null){var e=me.alternate;e=e!==null?e.memoizedState:null}else e=rt.next;var n=Ft===null?me.memoizedState:Ft.next;if(n!==null)Ft=n,rt=e;else{if(e===null){if(me.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.")}rt=e,e={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},Ft===null?me.memoizedState=Ft=e:Ft=Ft.next=e}return Ft}function Jh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function vc(e){var n=pf;return pf+=1,$l===null&&($l=AS()),e=ES($l,e,n),n=me,(Ft===null?n.memoizedState:Ft.next)===null&&(n=n.alternate,H.H=n!==null&&n.memoizedState!==null?Vy:qy),e}function vs(e){if(e!==null&&typeof e==="object"){if(typeof e.then==="function")return vc(e);if(e.$$typeof===tl)return wt(e)}throw Error("An unsupported type was passed to use(): "+String(e))}function Aa(e){var n=null,o=me.updateQueue;if(o!==null&&(n=o.memoCache),n==null){var a=me.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(n={data:a.data.map(function(u){return u.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),o===null&&(o=Jh(),me.updateQueue=o),o.memoCache=n,o=n.data[n.index],o===void 0||mf)for(o=n.data[n.index]=Array(e),a=0;a<e;a++)o[a]=VL;else o.length!==e&&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.",o.length,e);return n.index++,o}function uo(e,n){return typeof n==="function"?n(e):n}function Tg(e,n,o){var a=Bn();if(o!==void 0){var u=o(n);if(Ia){Fe(!0);try{o(n)}finally{Fe(!1)}}}else u=n;return a.memoizedState=a.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},a.queue=e,e=e.dispatch=OR.bind(null,me,e),[a.memoizedState,e]}function Ar(e){var n=et();return Eg(n,rt,e)}function Eg(e,n,o){var a=e.queue;if(a===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");a.lastRenderedReducer=o;var u=e.baseQueue,f=a.pending;if(f!==null){if(u!==null){var p=u.next;u.next=f.next,f.next=p}n.baseQueue!==u&&console.error("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),n.baseQueue=u=f,a.pending=null}if(f=e.baseState,u===null)e.memoizedState=f;else{n=u.next;var g=p=null,v=null,x=n,D=!1;do{var O=x.lane&-536870913;if(O!==x.lane?(ke&O)===O:(Il&O)===O){var A=x.revertLane;if(A===0)v!==null&&(v=v.next={lane:0,revertLane:0,gesture:null,action:x.action,hasEagerState:x.hasEagerState,eagerState:x.eagerState,next:null}),O===_a&&(D=!0);else if((Il&A)===A){x=x.next,A===_a&&(D=!0);continue}else O={lane:0,revertLane:x.revertLane,gesture:null,action:x.action,hasEagerState:x.hasEagerState,eagerState:x.eagerState,next:null},v===null?(g=v=O,p=f):v=v.next=O,me.lanes|=A,Vs|=A;O=x.action,Ia&&o(f,O),f=x.hasEagerState?x.eagerState:o(f,O)}else A={lane:O,revertLane:x.revertLane,gesture:x.gesture,action:x.action,hasEagerState:x.hasEagerState,eagerState:x.eagerState,next:null},v===null?(g=v=A,p=f):v=v.next=A,me.lanes|=O,Vs|=O;x=x.next}while(x!==null&&x!==n);if(v===null?p=f:v.next=g,!_n(f,e.memoizedState)&&(Jt=!0,D&&(o=nu,o!==null)))throw o;e.memoizedState=f,e.baseState=p,e.baseQueue=v,a.lastRenderedState=f}return u===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Sc(e){var n=et(),o=n.queue;if(o===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");o.lastRenderedReducer=e;var{dispatch:a,pending:u}=o,f=n.memoizedState;if(u!==null){o.pending=null;var p=u=u.next;do f=e(f,p.action),p=p.next;while(p!==u);_n(f,n.memoizedState)||(Jt=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),o.lastRenderedState=f}return[f,a]}function Mg(e,n,o){var a=me,u=Bn();if(Le){if(o===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var f=o();au||f===o()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),au=!0)}else{if(f=n(),au||(o=n(),_n(f,o)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),au=!0)),ut===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");(ke&127)!==0||VS(a,n,f)}return u.memoizedState=f,o={value:f,getSnapshot:n},u.queue=o,td(IS.bind(null,a,o,e),[e]),a.flags|=2048,Er($i|Vn,{destroy:void 0},jS.bind(null,a,o,f,n),null),f}function Zh(e,n,o){var a=me,u=et(),f=Le;if(f){if(o===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");o=o()}else if(o=n(),!au){var p=n();_n(o,p)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),au=!0)}if(p=!_n((rt||u).memoizedState,o))u.memoizedState=o,Jt=!0;u=u.queue;var g=IS.bind(null,a,u,e);if(Zn(2048,Vn,g,[e]),u.getSnapshot!==n||p||Ft!==null&&Ft.memoizedState.tag&$i){if(a.flags|=2048,Er($i|Vn,{destroy:void 0},jS.bind(null,a,u,o,n),null),ut===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");f||(Il&127)!==0||VS(a,n,o)}return o}function VS(e,n,o){e.flags|=16384,e={getSnapshot:n,value:o},n=me.updateQueue,n===null?(n=Jh(),me.updateQueue=n,n.stores=[e]):(o=n.stores,o===null?n.stores=[e]:o.push(e))}function jS(e,n,o,a){n.value=o,n.getSnapshot=a,$S(n)&&PS(e)}function IS(e,n,o){return o(function(){$S(n)&&(jo(2,"updateSyncExternalStore()",e),PS(e))})}function $S(e){var n=e.getSnapshot;e=e.value;try{var o=n();return!_n(e,o)}catch(a){return!0}}function PS(e){var n=Cn(e,2);n!==null&&Bt(n,e,2)}function Dg(e){var n=Bn();if(typeof e==="function"){var o=e;if(e=o(),Ia){Fe(!0);try{o()}finally{Fe(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:uo,lastRenderedState:e},n}function Og(e){e=Dg(e);var n=e.queue,o=uw.bind(null,me,n);return n.dispatch=o,[e.memoizedState,o]}function Rg(e){var n=Bn();n.memoizedState=n.baseState=e;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=o,n=Yg.bind(null,me,!0,o),o.dispatch=n,[e,n]}function YS(e,n){var o=et();return XS(o,rt,e,n)}function XS(e,n,o,a){return e.baseState=o,Eg(e,rt,typeof a==="function"?a:uo)}function QS(e,n){var o=et();if(rt!==null)return XS(o,rt,e,n);return o.baseState=e,[e,o.queue.dispatch]}function TR(e,n,o,a,u){if(ad(e))throw Error("Cannot update form state while rendering.");if(e=n.action,e!==null){var f={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(p){f.listeners.push(p)}};H.T!==null?o(!0):f.isTransition=!1,a(f),o=n.pending,o===null?(f.next=n.pending=f,GS(n,f)):(f.next=o.next,n.pending=o.next=f)}}function GS(e,n){var{action:o,payload:a}=n,u=e.state;if(n.isTransition){var f=H.T,p={};p._updatedFibers=new Set,H.T=p;try{var g=o(u,a),v=H.S;v!==null&&v(p,g),WS(e,n,g)}catch(x){Lg(e,n,x)}finally{f!==null&&p.types!==null&&(f.types!==null&&f.types!==p.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."),f.types=p.types),H.T=f,f===null&&p._updatedFibers&&(e=p._updatedFibers.size,p._updatedFibers.clear(),10<e&&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{p=o(u,a),WS(e,n,p)}catch(x){Lg(e,n,x)}}function WS(e,n,o){o!==null&&typeof o==="object"&&typeof o.then==="function"?(H.asyncTransitions++,o.then(sd,sd),o.then(function(a){FS(e,n,a)},function(a){return Lg(e,n,a)}),n.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.")):FS(e,n,o)}function FS(e,n,o){n.status="fulfilled",n.value=o,JS(n),e.state=o,n=e.pending,n!==null&&(o=n.next,o===n?e.pending=null:(o=o.next,n.next=o,GS(e,o)))}function Lg(e,n,o){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do n.status="rejected",n.reason=o,JS(n),n=n.next;while(n!==a)}e.action=null}function JS(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function ZS(e,n){return n}function Tr(e,n){if(Le){var o=ut.formState;if(o!==null){e:{var a=me;if(Le){if(yt){t:{var u=yt;for(var f=Vi;u.nodeType!==8;){if(!f){u=null;break t}if(u=pi(u.nextSibling),u===null){u=null;break t}}f=u.data,u=f===ub||f===NA?u:null}if(u){yt=pi(u.nextSibling),a=u.data===ub;break e}}hs(a)}a=!1}a&&(n=o[0])}}return o=Bn(),o.memoizedState=o.baseState=n,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ZS,lastRenderedState:n},o.queue=a,o=uw.bind(null,me,a),a.dispatch=o,a=Dg(!1),f=Yg.bind(null,me,!1,a.queue),a=Bn(),u={state:n,dispatch:null,action:e,pending:null},a.queue=u,o=TR.bind(null,me,u,f,o),u.dispatch=o,a.memoizedState=e,[n,o,!1]}function Kh(e){var n=et();return KS(n,rt,e)}function KS(e,n,o){if(n=Eg(e,n,ZS)[0],e=Ar(uo)[0],typeof n==="object"&&n!==null&&typeof n.then==="function")try{var a=vc(n)}catch(p){if(p===iu)throw np;throw p}else a=n;n=et();var u=n.queue,f=u.dispatch;return o!==n.memoizedState&&(me.flags|=2048,Er($i|Vn,{destroy:void 0},ER.bind(null,u,o),null)),[a,f,e]}function ER(e,n){e.action=n}function ed(e){var n=et(),o=rt;if(o!==null)return KS(n,o,e);et(),n=n.memoizedState,o=et();var a=o.queue.dispatch;return o.memoizedState=e,[n,a,!1]}function Er(e,n,o,a){return e={tag:e,create:o,deps:a,inst:n,next:null},n=me.updateQueue,n===null&&(n=Jh(),me.updateQueue=n),o=n.lastEffect,o===null?n.lastEffect=e.next=e:(a=o.next,o.next=e,e.next=a,n.lastEffect=e),e}function Bg(e){var n=Bn();return e={current:e},n.memoizedState=e}function Ta(e,n,o,a){var u=Bn();me.flags|=e,u.memoizedState=Er($i|n,{destroy:void 0},o,a===void 0?null:a)}function Zn(e,n,o,a){var u=et();a=a===void 0?null:a;var f=u.memoizedState.inst;rt!==null&&a!==null&&Sg(a,rt.memoizedState.deps)?u.memoizedState=Er(n,f,o,a):(me.flags|=e,u.memoizedState=Er($i|n,f,o,a))}function td(e,n){(me.mode&po)!==pe?Ta(276826112,Vn,e,n):Ta(8390656,Vn,e,n)}function MR(e){me.flags|=4;var n=me.updateQueue;if(n===null)n=Jh(),me.updateQueue=n,n.events=[e];else{var o=n.events;o===null?n.events=[e]:o.push(e)}}function zg(e){var n=Bn(),o={impl:e};return n.memoizedState=o,function(){if((je&sn)!==dn)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return o.impl.apply(void 0,arguments)}}function nd(e){var n=et().memoizedState;return MR({ref:n,nextImpl:e}),function(){if((je&sn)!==dn)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return n.impl.apply(void 0,arguments)}}function Hg(e,n){var o=4194308;return(me.mode&po)!==pe&&(o|=134217728),Ta(o,Si,e,n)}function ew(e,n){if(typeof n==="function"){e=e();var o=n(e);return function(){typeof o==="function"?o():n(null)}}if(n!==null&&n!==void 0)return n.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(n).join(", ")+"}"),e=e(),n.current=e,function(){n.current=null}}function Ng(e,n,o){typeof n!=="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",n!==null?typeof n:"null"),o=o!==null&&o!==void 0?o.concat([e]):null;var a=4194308;(me.mode&po)!==pe&&(a|=134217728),Ta(a,Si,ew.bind(null,n,e),o)}function id(e,n,o){typeof n!=="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",n!==null?typeof n:"null"),o=o!==null&&o!==void 0?o.concat([e]):null,Zn(4,Si,ew.bind(null,n,e),o)}function _g(e,n){return Bn().memoizedState=[e,n===void 0?null:n],e}function od(e,n){var o=et();n=n===void 0?null:n;var a=o.memoizedState;if(n!==null&&Sg(n,a[1]))return a[0];return o.memoizedState=[e,n],e}function Ug(e,n){var o=Bn();n=n===void 0?null:n;var a=e();if(Ia){Fe(!0);try{e()}finally{Fe(!1)}}return o.memoizedState=[a,n],a}function ld(e,n){var o=et();n=n===void 0?null:n;var a=o.memoizedState;if(n!==null&&Sg(n,a[1]))return a[0];if(a=e(),Ia){Fe(!0);try{e()}finally{Fe(!1)}}return o.memoizedState=[a,n],a}function qg(e,n){var o=Bn();return Vg(o,e,n)}function tw(e,n){var o=et();return iw(o,rt.memoizedState,e,n)}function nw(e,n){var o=et();return rt===null?Vg(o,e,n):iw(o,rt.memoizedState,e,n)}function Vg(e,n,o){if(o===void 0||(Il&1073741824)!==0&&(ke&261930)===0)return e.memoizedState=n;return e.memoizedState=o,e=ox(),me.lanes|=e,Vs|=e,o}function iw(e,n,o,a){if(_n(o,n))return o;if(lu.current!==null)return e=Vg(e,o,a),_n(e,n)||(Jt=!0),e;if((Il&42)===0||(Il&1073741824)!==0&&(ke&261930)===0)return Jt=!0,e.memoizedState=o;return e=ox(),me.lanes|=e,Vs|=e,n}function sd(){H.asyncTransitions--}function ow(e,n,o,a,u){var f=Ze.p;Ze.p=f!==0&&f<ho?f:ho;var p=H.T,g={};g._updatedFibers=new Set,H.T=g,Yg(e,!1,n,o);try{var v=u(),x=H.S;if(x!==null&&x(g,v),v!==null&&typeof v==="object"&&typeof v.then==="function"){H.asyncTransitions++,v.then(sd,sd);var D=kR(v,a);wc(e,n,D,di(e))}else wc(e,n,a,di(e))}catch(O){wc(e,n,{then:function(){},status:"rejected",reason:O},di(e))}finally{Ze.p=f,p!==null&&g.types!==null&&(p.types!==null&&p.types!==g.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."),p.types=g.types),H.T=p,p===null&&g._updatedFibers&&(e=g._updatedFibers.size,g._updatedFibers.clear(),10<e&&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 jg(e,n,o,a){if(e.tag!==5)throw Error("Expected the form instance to be a HostComponent. This is a bug in React.");var u=lw(e).queue;wR(e),ow(e,u,n,Ka,o===null?y:function(){return sw(e),o(a)})}function lw(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:Ka,baseState:Ka,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:uo,lastRenderedState:Ka},next:null};var o={};return n.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:uo,lastRenderedState:o},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function sw(e){H.T===null&&console.error("requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.");var n=lw(e);n.next===null&&(n=e.alternate.memoizedState),wc(e,n.next.queue,{},di(e))}function Ig(){var e=Dg(!1);return e=ow.bind(null,me,e.queue,!0,!1),Bn().memoizedState=e,[!1,e]}function aw(){var e=Ar(uo)[0],n=et().memoizedState;return[typeof e==="boolean"?e:vc(e),n]}function rw(){var e=Sc(uo)[0],n=et().memoizedState;return[typeof e==="boolean"?e:vc(e),n]}function Ea(){return wt(Rf)}function $g(){var e=Bn(),n=ut.identifierPrefix;if(Le){var o=_l,a=Nl;o=(a&~(1<<32-zn(a)-1)).toString(32)+o,n="_"+n+"R_"+o,o=ap++,0<o&&(n+="H"+o.toString(32)),n+="_"}else o=az++,n="_"+n+"r_"+o.toString(32)+"_";return e.memoizedState=n}function Pg(){return Bn().memoizedState=DR.bind(null,me)}function DR(e,n){for(var o=e.return;o!==null;){switch(o.tag){case 24:case 3:var a=di(o),u=ms(a),f=gs(o,u,a);f!==null&&(jo(a,"refresh()",e),Bt(f,o,a),gc(f,o,a)),e=cg(),n!==null&&n!==void 0&&f!==null&&console.error("The seed argument is not enabled outside experimental channels."),u.payload={cache:e};return}o=o.return}}function OR(e,n,o){var a=arguments;typeof a[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()."),a=di(e);var u={lane:a,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};ad(e)?cw(n,u):(u=Zm(e,n,u,a),u!==null&&(jo(a,"dispatch()",e),Bt(u,e,a),fw(u,n,a)))}function uw(e,n,o){var a=arguments;typeof a[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()."),a=di(e),wc(e,n,o,a)&&jo(a,"setState()",e)}function wc(e,n,o,a){var u={lane:a,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(ad(e))cw(n,u);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=n.lastRenderedReducer,f!==null)){var p=H.H;H.H=go;try{var g=n.lastRenderedState,v=f(g,o);if(u.hasEagerState=!0,u.eagerState=v,_n(v,g))return Bh(e,n,u,0),ut===null&&Lh(),!1}catch(x){}finally{H.H=p}}if(o=Zm(e,n,u,a),o!==null)return Bt(o,e,a),fw(o,n,a),!0}return!1}function Yg(e,n,o,a){if(H.T===null&&_a===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."),a={lane:2,revertLane:w0(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ad(e)){if(n)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else n=Zm(e,o,a,2),n!==null&&(jo(2,"setOptimistic()",e),Bt(n,e,2))}function ad(e){var n=e.alternate;return e===me||n!==null&&n===me}function cw(e,n){ru=sp=!0;var o=e.pending;o===null?n.next=n:(n.next=o.next,o.next=n),e.pending=n}function fw(e,n,o){if((o&4194048)!==0){var a=n.lanes;a&=e.pendingLanes,o|=a,n.lanes=o,gr(e,o)}}function Xg(e){if(e!==null&&typeof e!=="function"){var n=String(e);rA.has(n)||(rA.add(n),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",e))}}function Qg(e,n,o,a){var u=e.memoizedState,f=o(a,u);if(e.mode&Tn){Fe(!0);try{f=o(a,u)}finally{Fe(!1)}}f===void 0&&(n=Ie(n)||"Component",oA.has(n)||(oA.add(n),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",n))),u=f===null||f===void 0?u:Ee({},u,f),e.memoizedState=u,e.lanes===0&&(e.updateQueue.baseState=u)}function hw(e,n,o,a,u,f,p){var g=e.stateNode;if(typeof g.shouldComponentUpdate==="function"){if(o=g.shouldComponentUpdate(a,f,p),e.mode&Tn){Fe(!0);try{o=g.shouldComponentUpdate(a,f,p)}finally{Fe(!1)}}return o===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",Ie(n)||"Component"),o}return n.prototype&&n.prototype.isPureReactComponent?!uc(o,a)||!uc(u,f):!0}function dw(e,n,o,a){var u=n.state;typeof n.componentWillReceiveProps==="function"&&n.componentWillReceiveProps(o,a),typeof n.UNSAFE_componentWillReceiveProps==="function"&&n.UNSAFE_componentWillReceiveProps(o,a),n.state!==u&&(e=P(e)||"Component",KC.has(e)||(KC.add(e),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",e)),jy.enqueueReplaceState(n,n.state,null))}function Ma(e,n){var o=n;if("ref"in n){o={};for(var a in n)a!=="ref"&&(o[a]=n[a])}if(e=e.defaultProps){o===n&&(o=Ee({},o));for(var u in e)o[u]===void 0&&(o[u]=e[u])}return o}function pw(e){by(e),console.warn(`%s
100
100
 
101
101
  %s
102
- `,su?"An error occurred in the <"+su+"> component.":"An error occurred in one of your React components.",`Consider adding an error boundary to your tree to customize error handling behavior.
103
- Visit https://react.dev/link/error-boundaries to learn more about error boundaries.`)}function mw(e){var n=su?"The above error occurred in the <"+su+"> component.":"The above error occurred in one of your React components.",o="React will try to recreate this component tree from scratch using the error boundary you provided, "+((jy||"Anonymous")+".");if(typeof e==="object"&&e!==null&&typeof e.environmentName==="string"){var a=e.environmentName;e=[`%o
102
+ `,uu?"An error occurred in the <"+uu+"> component.":"An error occurred in one of your React components.",`Consider adding an error boundary to your tree to customize error handling behavior.
103
+ Visit https://react.dev/link/error-boundaries to learn more about error boundaries.`)}function mw(e){var n=uu?"The above error occurred in the <"+uu+"> component.":"The above error occurred in one of your React components.",o="React will try to recreate this component tree from scratch using the error boundary you provided, "+((Iy||"Anonymous")+".");if(typeof e==="object"&&e!==null&&typeof e.environmentName==="string"){var a=e.environmentName;e=[`%o
104
104
 
105
105
  %s
106
106
 
107
107
  %s
108
- `,e,n,o].slice(0),typeof e[0]==="string"?e.splice(0,1,PA+" "+e[0],YA,Op+a+Op,XA):e.splice(0,0,PA,YA,Op+a+Op,XA),e.unshift(console),a=Ez.apply(console.error,e),a()}else console.error(`%o
108
+ `,e,n,o].slice(0),typeof e[0]==="string"?e.splice(0,1,PA+" "+e[0],YA,Lp+a+Lp,XA):e.splice(0,0,PA,YA,Lp+a+Lp,XA),e.unshift(console),a=Mz.apply(console.error,e),a()}else console.error(`%o
109
109
 
110
110
  %s
111
111
 
112
112
  %s
113
- `,e,n,o)}function gw(e){by(e)}function sd(e,n){try{su=n.source?P(n.source):null,jy=null;var o=n.value;if(H.actQueue!==null)H.thrownErrors.push(o);else{var a=e.onUncaughtError;a(o,{componentStack:n.stack})}}catch(u){setTimeout(function(){throw u})}}function yw(e,n,o){try{su=o.source?P(o.source):null,jy=P(n);var a=e.onCaughtError;a(o.value,{componentStack:o.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function Gg(e,n,o){return o=ds(o),o.tag=Hy,o.payload={element:null},o.callback=function(){Y(n.source,sd,e,n)},o}function Wg(e){return e=ds(e),e.tag=Hy,e}function Fg(e,n,o,a){var u=o.type.getDerivedStateFromError;if(typeof u==="function"){var f=a.value;e.payload=function(){return u(f)},e.callback=function(){cS(o),Y(a.source,yw,n,o,a)}}var p=o.stateNode;p!==null&&typeof p.componentDidCatch==="function"&&(e.callback=function(){cS(o),Y(a.source,yw,n,o,a),typeof u!=="function"&&(Vs===null?Vs=new Set([this]):Vs.add(this)),nz(this,a),typeof u==="function"||(o.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.",P(o)||"Unknown")})}function OR(e,n,o,a,u){if(o.flags|=32768,ol&&Ec(e,u),a!==null&&typeof a==="object"&&typeof a.then==="function"){if(n=o.alternate,n!==null&&Sr(n,o,u,!0),Le&&(al=!0),o=wi.current,o!==null){switch(o.tag){case 31:case 13:return $i===null?md():o.alternate===null&&Ot===Yl&&(Ot=rp),o.flags&=-257,o.flags|=65536,o.lanes=u,a===tp?o.flags|=16384:(n=o.updateQueue,n===null?o.updateQueue=new Set([a]):n.add(a),y0(e,a,u)),!1;case 22:return o.flags|=65536,a===tp?o.flags|=16384:(n=o.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([a])},o.updateQueue=n):(o=n.retryQueue,o===null?n.retryQueue=new Set([a]):o.add(a)),y0(e,a,u)),!1}throw Error("Unexpected Suspense handler tag ("+o.tag+"). This is a bug in React.")}return y0(e,a,u),md(),!1}if(Le)return al=!0,n=wi.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=u,a!==Cy&&uc(fi(Error("There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",{cause:a}),o))):(a!==Cy&&uc(fi(Error("There was an error while hydrating but React was able to recover by instead client rendering the entire root.",{cause:a}),o)),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,a=fi(a,o),u=Gg(e.stateNode,a,u),Xh(e,u),Ot!==Ns&&(Ot=Ua)),!1;var f=fi(Error("There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",{cause:a}),o);if(Sf===null?Sf=[f]:Sf.push(f),Ot!==Ns&&(Ot=Ua),n===null)return!0;a=fi(a,o),o=n;do{switch(o.tag){case 3:return o.flags|=65536,e=u&-u,o.lanes|=e,e=Gg(o.stateNode,a,e),Xh(o,e),!1;case 1:if(n=o.type,f=o.stateNode,(o.flags&128)===0&&(typeof n.getDerivedStateFromError==="function"||f!==null&&typeof f.componentDidCatch==="function"&&(Vs===null||!Vs.has(f))))return o.flags|=65536,u&=-u,o.lanes|=u,u=Wg(u),Fg(u,e,o,a),Xh(o,u),!1}o=o.return}while(o!==null);return!1}function yn(e,n,o,a){n.child=e===null?jC(n,null,o,a):Na(n,e.child,o,a)}function bw(e,n,o,a,u){o=o.render;var f=n.ref;if("ref"in a){var p={};for(var g in a)g!=="ref"&&(p[g]=a[g])}else p=a;if(ba(n),a=wg(e,n,o,p,f,u),g=kg(),e!==null&&!Zt)return Cg(e,n,u),Dl(e,n,u);return Le&&g&&og(n),n.flags|=1,yn(e,n,a,u),n.child}function vw(e,n,o,a,u){if(e===null){var f=o.type;if(typeof f==="function"&&!eg(f)&&f.defaultProps===void 0&&o.compare===null)return o=pa(f),n.tag=15,n.type=o,Zg(n,f),Sw(e,n,o,a,u);return e=tg(o.type,null,a,n,n.mode,u),e.ref=n.ref,e.return=n,n.child=e}if(f=e.child,!o0(e,u)){var p=f.memoizedProps;if(o=o.compare,o=o!==null?o:ac,o(p,a)&&e.ref===n.ref)return Dl(e,n,u)}return n.flags|=1,e=Al(f,a),e.ref=n.ref,e.return=n,n.child=e}function Sw(e,n,o,a,u){if(e!==null){var f=e.memoizedProps;if(ac(f,a)&&e.ref===n.ref&&n.type===e.type)if(Zt=!1,n.pendingProps=a=f,o0(e,u))(e.flags&131072)!==0&&(Zt=!0);else return n.lanes=e.lanes,Dl(e,n,u)}return Jg(e,n,o,a,u)}function ww(e,n,o,a){var u=a.children,f=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:Gc,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((n.flags&128)!==0){if(f=f!==null?f.baseLanes|o:o,e!==null){a=n.child=e.child;for(u=0;a!==null;)u=u|a.lanes|a.childLanes,a=a.sibling;a=u&~f}else a=0,n.child=null;return xw(e,n,f,o,a)}if((o&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&Vh(n,f!==null?f.cachePool:null),f!==null?_S(n,f):yg(n),US(n);else return a=n.lanes=536870912,xw(e,n,f!==null?f.baseLanes|o:o,o,a)}else f!==null?(Vh(n,f.cachePool),_S(n,f),gs(n),n.memoizedState=null):(e!==null&&Vh(n,null),yg(n),gs(n));return yn(e,n,u,o),n.child}function Sc(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:Gc,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function xw(e,n,o,a,u){var f=dg();return f=f===null?null:{parent:Wt._currentValue,pool:f},n.memoizedState={baseLanes:o,cachePool:f},e!==null&&Vh(n,null),yg(n),US(n),e!==null&&Sr(e,n,a,!0),n.childLanes=u,null}function ad(e,n){var o=n.hidden;return o!==void 0&&console.error(`<Activity> doesn't accept a hidden prop. Use mode="hidden" instead.
113
+ `,e,n,o)}function gw(e){by(e)}function rd(e,n){try{uu=n.source?P(n.source):null,Iy=null;var o=n.value;if(H.actQueue!==null)H.thrownErrors.push(o);else{var a=e.onUncaughtError;a(o,{componentStack:n.stack})}}catch(u){setTimeout(function(){throw u})}}function yw(e,n,o){try{uu=o.source?P(o.source):null,Iy=P(n);var a=e.onCaughtError;a(o.value,{componentStack:o.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function Gg(e,n,o){return o=ms(o),o.tag=Hy,o.payload={element:null},o.callback=function(){Y(n.source,rd,e,n)},o}function Wg(e){return e=ms(e),e.tag=Hy,e}function Fg(e,n,o,a){var u=o.type.getDerivedStateFromError;if(typeof u==="function"){var f=a.value;e.payload=function(){return u(f)},e.callback=function(){cS(o),Y(a.source,yw,n,o,a)}}var p=o.stateNode;p!==null&&typeof p.componentDidCatch==="function"&&(e.callback=function(){cS(o),Y(a.source,yw,n,o,a),typeof u!=="function"&&(Is===null?Is=new Set([this]):Is.add(this)),iz(this,a),typeof u==="function"||(o.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.",P(o)||"Unknown")})}function RR(e,n,o,a,u){if(o.flags|=32768,ol&&Dc(e,u),a!==null&&typeof a==="object"&&typeof a.then==="function"){if(n=o.alternate,n!==null&&kr(n,o,u,!0),Le&&(al=!0),o=vi.current,o!==null){switch(o.tag){case 31:case 13:return Ii===null?yd():o.alternate===null&&Ot===Xl&&(Ot=cp),o.flags&=-257,o.flags|=65536,o.lanes=u,a===ip?o.flags|=16384:(n=o.updateQueue,n===null?o.updateQueue=new Set([a]):n.add(a),y0(e,a,u)),!1;case 22:return o.flags|=65536,a===ip?o.flags|=16384:(n=o.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([a])},o.updateQueue=n):(o=n.retryQueue,o===null?n.retryQueue=new Set([a]):o.add(a)),y0(e,a,u)),!1}throw Error("Unexpected Suspense handler tag ("+o.tag+"). This is a bug in React.")}return y0(e,a,u),yd(),!1}if(Le)return al=!0,n=vi.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=u,a!==Cy&&fc(ui(Error("There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",{cause:a}),o))):(a!==Cy&&fc(ui(Error("There was an error while hydrating but React was able to recover by instead client rendering the entire root.",{cause:a}),o)),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,a=ui(a,o),u=Gg(e.stateNode,a,u),Gh(e,u),Ot!==Us&&(Ot=$a)),!1;var f=ui(Error("There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",{cause:a}),o);if(xf===null?xf=[f]:xf.push(f),Ot!==Us&&(Ot=$a),n===null)return!0;a=ui(a,o),o=n;do{switch(o.tag){case 3:return o.flags|=65536,e=u&-u,o.lanes|=e,e=Gg(o.stateNode,a,e),Gh(o,e),!1;case 1:if(n=o.type,f=o.stateNode,(o.flags&128)===0&&(typeof n.getDerivedStateFromError==="function"||f!==null&&typeof f.componentDidCatch==="function"&&(Is===null||!Is.has(f))))return o.flags|=65536,u&=-u,o.lanes|=u,u=Wg(u),Fg(u,e,o,a),Gh(o,u),!1}o=o.return}while(o!==null);return!1}function gn(e,n,o,a){n.child=e===null?IC(n,null,o,a):ja(n,e.child,o,a)}function bw(e,n,o,a,u){o=o.render;var f=n.ref;if("ref"in a){var p={};for(var g in a)g!=="ref"&&(p[g]=a[g])}else p=a;if(ka(n),a=wg(e,n,o,p,f,u),g=kg(),e!==null&&!Jt)return Cg(e,n,u),Ol(e,n,u);return Le&&g&&og(n),n.flags|=1,gn(e,n,a,u),n.child}function vw(e,n,o,a,u){if(e===null){var f=o.type;if(typeof f==="function"&&!eg(f)&&f.defaultProps===void 0&&o.compare===null)return o=va(f),n.tag=15,n.type=o,Zg(n,f),Sw(e,n,o,a,u);return e=tg(o.type,null,a,n,n.mode,u),e.ref=n.ref,e.return=n,n.child=e}if(f=e.child,!o0(e,u)){var p=f.memoizedProps;if(o=o.compare,o=o!==null?o:uc,o(p,a)&&e.ref===n.ref)return Ol(e,n,u)}return n.flags|=1,e=Tl(f,a),e.ref=n.ref,e.return=n,n.child=e}function Sw(e,n,o,a,u){if(e!==null){var f=e.memoizedProps;if(uc(f,a)&&e.ref===n.ref&&n.type===e.type)if(Jt=!1,n.pendingProps=a=f,o0(e,u))(e.flags&131072)!==0&&(Jt=!0);else return n.lanes=e.lanes,Ol(e,n,u)}return Jg(e,n,o,a,u)}function ww(e,n,o,a){var u=a.children,f=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:Fc,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((n.flags&128)!==0){if(f=f!==null?f.baseLanes|o:o,e!==null){a=n.child=e.child;for(u=0;a!==null;)u=u|a.lanes|a.childLanes,a=a.sibling;a=u&~f}else a=0,n.child=null;return xw(e,n,f,o,a)}if((o&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ih(n,f!==null?f.cachePool:null),f!==null?_S(n,f):yg(n),US(n);else return a=n.lanes=536870912,xw(e,n,f!==null?f.baseLanes|o:o,o,a)}else f!==null?(Ih(n,f.cachePool),_S(n,f),bs(n),n.memoizedState=null):(e!==null&&Ih(n,null),yg(n),bs(n));return gn(e,n,u,o),n.child}function xc(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:Fc,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function xw(e,n,o,a,u){var f=dg();return f=f===null?null:{parent:Gt._currentValue,pool:f},n.memoizedState={baseLanes:o,cachePool:f},e!==null&&Ih(n,null),yg(n),US(n),e!==null&&kr(e,n,a,!0),n.childLanes=u,null}function ud(e,n){var o=n.hidden;return o!==void 0&&console.error(`<Activity> doesn't accept a hidden prop. Use mode="hidden" instead.
114
114
  - <Activity %s>
115
- + <Activity %s>`,o===!0?"hidden":o===!1?"hidden={false}":"hidden={...}",o?'mode="hidden"':'mode="visible"'),n=ud({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function kw(e,n,o){return Na(n,e.child,null,o),e=ad(n,n.pendingProps),e.flags|=2,pi(n),n.memoizedState=null,e}function RR(e,n,o){var a=n.pendingProps,u=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(Le){if(a.mode==="hidden")return e=ad(n,a),n.lanes=536870912,Sc(null,e);if(vg(n),(e=gt)?(o=Gx(e,Ii),o=o!==null&&o.data===Pa?o:null,o!==null&&(a={dehydrated:o,treeContext:mS(),retryLane:536870912,hydrationErrors:null},n.memoizedState=a,a=dS(o),a.return=n,n.child=a,Sn=n,gt=null)):o=null,o===null)throw zh(n,e),cs(n);return n.lanes=536870912,null}return ad(n,a)}var f=e.memoizedState;if(f!==null){var p=f.dehydrated;if(vg(n),u)if(n.flags&256)n.flags&=-257,n=kw(e,n,o);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error("Client rendering an Activity suspended it again. This is a bug in React.");else if(yS(),(o&536870912)!==0&&pd(n),Zt||Sr(e,n,o,!1),u=(o&e.childLanes)!==0,Zt||u){if(a=ut,a!==null&&(p=Ju(a,o),p!==0&&p!==f.retryLane))throw f.retryLane=p,An(e,p),Bt(a,e,p),$y;md(),n=kw(e,n,o)}else e=f.treeContext,gt=gi(p.nextSibling),Sn=n,Le=!0,Ds=null,al=!1,Si=null,Ii=!1,e!==null&&gS(n,e),n=ad(n,a),n.flags|=4096;return n}return f=e.child,a={mode:a.mode,children:a.children},(o&536870912)!==0&&(o&e.lanes)!==0&&pd(n),e=Al(f,a),e.ref=n.ref,n.child=e,e.return=n,e}function rd(e,n){var o=n.ref;if(o===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof o!=="function"&&typeof o!=="object")throw Error("Expected ref to be a function, an object returned by React.createRef(), or undefined/null.");if(e===null||e.ref!==o)n.flags|=4194816}}function Jg(e,n,o,a,u){if(o.prototype&&typeof o.prototype.render==="function"){var f=je(o)||"Unknown";uA[f]||(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.",f,f),uA[f]=!0)}if(n.mode&En&&go.recordLegacyContextWarning(n,null),e===null&&(Zg(n,n.type),o.contextTypes&&(f=je(o)||"Unknown",fA[f]||(fA[f]=!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)",f)))),ba(n),o=wg(e,n,o,a,void 0,u),a=kg(),e!==null&&!Zt)return Cg(e,n,u),Dl(e,n,u);return Le&&a&&og(n),n.flags|=1,yn(e,n,o,u),n.child}function Cw(e,n,o,a,u,f){if(ba(n),$l=-1,df=e!==null&&e.type!==n.type,n.updateQueue=null,o=xg(n,a,o,u),qS(e,n),a=kg(),e!==null&&!Zt)return Cg(e,n,f),Dl(e,n,f);return Le&&a&&og(n),n.flags|=1,yn(e,n,o,f),n.child}function Aw(e,n,o,a,u){switch(h(n)){case!1:var f=n.stateNode,p=new n.type(n.memoizedProps,f.context).state;f.updater.enqueueSetState(f,p,null);break;case!0:n.flags|=128,n.flags|=65536,f=Error("Simulated error coming from DevTools");var g=u&-u;if(n.lanes|=g,p=ut,p===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");g=Wg(g),Fg(g,p,n,fi(f,n)),Xh(n,g)}if(ba(n),n.stateNode===null){if(p=Ms,f=o.contextType,"contextType"in o&&f!==null&&(f===void 0||f.$$typeof!==tl)&&!aA.has(o)&&(aA.add(o),g=f===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 f!=="object"?" However, it is set to a "+typeof f+".":f.$$typeof===P0?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(f).join(", ")+"}.",console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",je(o)||"Component",g)),typeof f==="object"&&f!==null&&(p=wt(f)),f=new o(a,p),n.mode&En){Fe(!0);try{f=new o(a,p)}finally{Fe(!1)}}if(p=n.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Iy,n.stateNode=f,f._reactInternals=n,f._reactInternalInstance=ZC,typeof o.getDerivedStateFromProps==="function"&&p===null&&(p=je(o)||"Component",eA.has(p)||(eA.add(p),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.",p,f.state===null?"null":"undefined",p))),typeof o.getDerivedStateFromProps==="function"||typeof f.getSnapshotBeforeUpdate==="function"){var v=g=p=null;if(typeof f.componentWillMount==="function"&&f.componentWillMount.__suppressDeprecationWarning!==!0?p="componentWillMount":typeof f.UNSAFE_componentWillMount==="function"&&(p="UNSAFE_componentWillMount"),typeof f.componentWillReceiveProps==="function"&&f.componentWillReceiveProps.__suppressDeprecationWarning!==!0?g="componentWillReceiveProps":typeof f.UNSAFE_componentWillReceiveProps==="function"&&(g="UNSAFE_componentWillReceiveProps"),typeof f.componentWillUpdate==="function"&&f.componentWillUpdate.__suppressDeprecationWarning!==!0?v="componentWillUpdate":typeof f.UNSAFE_componentWillUpdate==="function"&&(v="UNSAFE_componentWillUpdate"),p!==null||g!==null||v!==null){f=je(o)||"Component";var x=typeof o.getDerivedStateFromProps==="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";nA.has(f)||(nA.add(f),console.error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
115
+ + <Activity %s>`,o===!0?"hidden":o===!1?"hidden={false}":"hidden={...}",o?'mode="hidden"':'mode="visible"'),n=fd({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function kw(e,n,o){return ja(n,e.child,null,o),e=ud(n,n.pendingProps),e.flags|=2,hi(n),n.memoizedState=null,e}function LR(e,n,o){var a=n.pendingProps,u=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(Le){if(a.mode==="hidden")return e=ud(n,a),n.lanes=536870912,xc(null,e);if(vg(n),(e=yt)?(o=Gx(e,Vi),o=o!==null&&o.data===Wa?o:null,o!==null&&(a={dehydrated:o,treeContext:mS(),retryLane:536870912,hydrationErrors:null},n.memoizedState=a,a=dS(o),a.return=n,n.child=a,vn=n,yt=null)):o=null,o===null)throw Nh(n,e),hs(n);return n.lanes=536870912,null}return ud(n,a)}var f=e.memoizedState;if(f!==null){var p=f.dehydrated;if(vg(n),u)if(n.flags&256)n.flags&=-257,n=kw(e,n,o);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error("Client rendering an Activity suspended it again. This is a bug in React.");else if(yS(),(o&536870912)!==0&&gd(n),Jt||kr(e,n,o,!1),u=(o&e.childLanes)!==0,Jt||u){if(a=ut,a!==null&&(p=Ku(a,o),p!==0&&p!==f.retryLane))throw f.retryLane=p,Cn(e,p),Bt(a,e,p),$y;yd(),n=kw(e,n,o)}else e=f.treeContext,yt=pi(p.nextSibling),vn=n,Le=!0,Rs=null,al=!1,bi=null,Vi=!1,e!==null&&gS(n,e),n=ud(n,a),n.flags|=4096;return n}return f=e.child,a={mode:a.mode,children:a.children},(o&536870912)!==0&&(o&e.lanes)!==0&&gd(n),e=Tl(f,a),e.ref=n.ref,n.child=e,e.return=n,e}function cd(e,n){var o=n.ref;if(o===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof o!=="function"&&typeof o!=="object")throw Error("Expected ref to be a function, an object returned by React.createRef(), or undefined/null.");if(e===null||e.ref!==o)n.flags|=4194816}}function Jg(e,n,o,a,u){if(o.prototype&&typeof o.prototype.render==="function"){var f=Ie(o)||"Unknown";uA[f]||(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.",f,f),uA[f]=!0)}if(n.mode&Tn&&mo.recordLegacyContextWarning(n,null),e===null&&(Zg(n,n.type),o.contextTypes&&(f=Ie(o)||"Unknown",fA[f]||(fA[f]=!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)",f)))),ka(n),o=wg(e,n,o,a,void 0,u),a=kg(),e!==null&&!Jt)return Cg(e,n,u),Ol(e,n,u);return Le&&a&&og(n),n.flags|=1,gn(e,n,o,u),n.child}function Cw(e,n,o,a,u,f){if(ka(n),Pl=-1,mf=e!==null&&e.type!==n.type,n.updateQueue=null,o=xg(n,a,o,u),qS(e,n),a=kg(),e!==null&&!Jt)return Cg(e,n,f),Ol(e,n,f);return Le&&a&&og(n),n.flags|=1,gn(e,n,o,f),n.child}function Aw(e,n,o,a,u){switch(h(n)){case!1:var f=n.stateNode,p=new n.type(n.memoizedProps,f.context).state;f.updater.enqueueSetState(f,p,null);break;case!0:n.flags|=128,n.flags|=65536,f=Error("Simulated error coming from DevTools");var g=u&-u;if(n.lanes|=g,p=ut,p===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");g=Wg(g),Fg(g,p,n,ui(f,n)),Gh(n,g)}if(ka(n),n.stateNode===null){if(p=Os,f=o.contextType,"contextType"in o&&f!==null&&(f===void 0||f.$$typeof!==tl)&&!aA.has(o)&&(aA.add(o),g=f===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 f!=="object"?" However, it is set to a "+typeof f+".":f.$$typeof===P0?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(f).join(", ")+"}.",console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",Ie(o)||"Component",g)),typeof f==="object"&&f!==null&&(p=wt(f)),f=new o(a,p),n.mode&Tn){Fe(!0);try{f=new o(a,p)}finally{Fe(!1)}}if(p=n.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=jy,n.stateNode=f,f._reactInternals=n,f._reactInternalInstance=ZC,typeof o.getDerivedStateFromProps==="function"&&p===null&&(p=Ie(o)||"Component",eA.has(p)||(eA.add(p),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.",p,f.state===null?"null":"undefined",p))),typeof o.getDerivedStateFromProps==="function"||typeof f.getSnapshotBeforeUpdate==="function"){var v=g=p=null;if(typeof f.componentWillMount==="function"&&f.componentWillMount.__suppressDeprecationWarning!==!0?p="componentWillMount":typeof f.UNSAFE_componentWillMount==="function"&&(p="UNSAFE_componentWillMount"),typeof f.componentWillReceiveProps==="function"&&f.componentWillReceiveProps.__suppressDeprecationWarning!==!0?g="componentWillReceiveProps":typeof f.UNSAFE_componentWillReceiveProps==="function"&&(g="UNSAFE_componentWillReceiveProps"),typeof f.componentWillUpdate==="function"&&f.componentWillUpdate.__suppressDeprecationWarning!==!0?v="componentWillUpdate":typeof f.UNSAFE_componentWillUpdate==="function"&&(v="UNSAFE_componentWillUpdate"),p!==null||g!==null||v!==null){f=Ie(o)||"Component";var x=typeof o.getDerivedStateFromProps==="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";nA.has(f)||(nA.add(f),console.error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
116
116
 
117
117
  %s uses %s but also contains the following legacy lifecycles:%s%s%s
118
118
 
@@ -120,8 +120,8 @@ The above lifecycles should be removed. Learn more about this warning here:
120
120
  https://react.dev/link/unsafe-component-lifecycles`,f,x,p!==null?`
121
121
  `+p:"",g!==null?`
122
122
  `+g:"",v!==null?`
123
- `+v:""))}}f=n.stateNode,p=je(o)||"Component",f.render||(o.prototype&&typeof o.prototype.render==="function"?console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?",p):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",p)),!f.getInitialState||f.getInitialState.isReactClassApproved||f.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?",p),f.getDefaultProps&&!f.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.",p),f.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",p),o.childContextTypes&&!sA.has(o)&&(sA.add(o),console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",p)),o.contextTypes&&!lA.has(o)&&(lA.add(o),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)",p)),typeof f.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.",p),o.prototype&&o.prototype.isPureReactComponent&&typeof f.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.",je(o)||"A pure component"),typeof f.componentDidUnmount==="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",p),typeof f.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().",p),typeof f.componentWillRecieveProps==="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",p),typeof f.UNSAFE_componentWillRecieveProps==="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",p),g=f.props!==a,f.props!==void 0&&g&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",p),f.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.",p,p),typeof f.getSnapshotBeforeUpdate!=="function"||typeof f.componentDidUpdate==="function"||tA.has(o)||(tA.add(o),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",je(o))),typeof f.getDerivedStateFromProps==="function"&&console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",p),typeof f.getDerivedStateFromError==="function"&&console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",p),typeof o.getSnapshotBeforeUpdate==="function"&&console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",p),(g=f.state)&&(typeof g!=="object"||ln(g))&&console.error("%s.state: must be set to an object or null",p),typeof f.getChildContext==="function"&&typeof o.childContextTypes!=="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",p),f=n.stateNode,f.props=a,f.state=n.memoizedState,f.refs={},mg(n),p=o.contextType,f.context=typeof p==="object"&&p!==null?wt(p):Ms,f.state===a&&(p=je(o)||"Component",iA.has(p)||(iA.add(p),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.",p))),n.mode&En&&go.recordLegacyContextWarning(n,f),go.recordUnsafeLifecycleWarnings(n,f),f.state=n.memoizedState,p=o.getDerivedStateFromProps,typeof p==="function"&&(Qg(n,o,p,a),f.state=n.memoizedState),typeof o.getDerivedStateFromProps==="function"||typeof f.getSnapshotBeforeUpdate==="function"||typeof f.UNSAFE_componentWillMount!=="function"&&typeof f.componentWillMount!=="function"||(p=f.state,typeof f.componentWillMount==="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount==="function"&&f.UNSAFE_componentWillMount(),p!==f.state&&(console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",P(n)||"Component"),Iy.enqueueReplaceState(f,f.state,null)),gc(n,a,f,u),mc(),f.state=n.memoizedState),typeof f.componentDidMount==="function"&&(n.flags|=4194308),(n.mode&mo)!==pe&&(n.flags|=134217728),f=!0}else if(e===null){f=n.stateNode;var D=n.memoizedProps;g=ka(o,D),f.props=g;var O=f.context;v=o.contextType,p=Ms,typeof v==="object"&&v!==null&&(p=wt(v)),x=o.getDerivedStateFromProps,v=typeof x==="function"||typeof f.getSnapshotBeforeUpdate==="function",D=n.pendingProps!==D,v||typeof f.UNSAFE_componentWillReceiveProps!=="function"&&typeof f.componentWillReceiveProps!=="function"||(D||O!==p)&&dw(n,f,a,p),Hs=!1;var A=n.memoizedState;f.state=A,gc(n,a,f,u),mc(),O=n.memoizedState,D||A!==O||Hs?(typeof x==="function"&&(Qg(n,o,x,a),O=n.memoizedState),(g=Hs||hw(n,o,g,a,A,O,p))?(v||typeof f.UNSAFE_componentWillMount!=="function"&&typeof f.componentWillMount!=="function"||(typeof f.componentWillMount==="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount==="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount==="function"&&(n.flags|=4194308),(n.mode&mo)!==pe&&(n.flags|=134217728)):(typeof f.componentDidMount==="function"&&(n.flags|=4194308),(n.mode&mo)!==pe&&(n.flags|=134217728),n.memoizedProps=a,n.memoizedState=O),f.props=a,f.state=O,f.context=p,f=g):(typeof f.componentDidMount==="function"&&(n.flags|=4194308),(n.mode&mo)!==pe&&(n.flags|=134217728),f=!1)}else{f=n.stateNode,gg(e,n),p=n.memoizedProps,v=ka(o,p),f.props=v,x=n.pendingProps,A=f.context,O=o.contextType,g=Ms,typeof O==="object"&&O!==null&&(g=wt(O)),D=o.getDerivedStateFromProps,(O=typeof D==="function"||typeof f.getSnapshotBeforeUpdate==="function")||typeof f.UNSAFE_componentWillReceiveProps!=="function"&&typeof f.componentWillReceiveProps!=="function"||(p!==x||A!==g)&&dw(n,f,a,g),Hs=!1,A=n.memoizedState,f.state=A,gc(n,a,f,u),mc();var B=n.memoizedState;p!==x||A!==B||Hs||e!==null&&e.dependencies!==null&&Nh(e.dependencies)?(typeof D==="function"&&(Qg(n,o,D,a),B=n.memoizedState),(v=Hs||hw(n,o,v,a,A,B,g)||e!==null&&e.dependencies!==null&&Nh(e.dependencies))?(O||typeof f.UNSAFE_componentWillUpdate!=="function"&&typeof f.componentWillUpdate!=="function"||(typeof f.componentWillUpdate==="function"&&f.componentWillUpdate(a,B,g),typeof f.UNSAFE_componentWillUpdate==="function"&&f.UNSAFE_componentWillUpdate(a,B,g)),typeof f.componentDidUpdate==="function"&&(n.flags|=4),typeof f.getSnapshotBeforeUpdate==="function"&&(n.flags|=1024)):(typeof f.componentDidUpdate!=="function"||p===e.memoizedProps&&A===e.memoizedState||(n.flags|=4),typeof f.getSnapshotBeforeUpdate!=="function"||p===e.memoizedProps&&A===e.memoizedState||(n.flags|=1024),n.memoizedProps=a,n.memoizedState=B),f.props=a,f.state=B,f.context=g,f=v):(typeof f.componentDidUpdate!=="function"||p===e.memoizedProps&&A===e.memoizedState||(n.flags|=4),typeof f.getSnapshotBeforeUpdate!=="function"||p===e.memoizedProps&&A===e.memoizedState||(n.flags|=1024),f=!1)}if(g=f,rd(e,n),p=(n.flags&128)!==0,g||p){if(g=n.stateNode,ri(n),p&&typeof o.getDerivedStateFromError!=="function")o=null,qn=-1;else if(o=MC(g),n.mode&En){Fe(!0);try{MC(g)}finally{Fe(!1)}}n.flags|=1,e!==null&&p?(n.child=Na(n,e.child,null,u),n.child=Na(n,null,o,u)):yn(e,n,o,u),n.memoizedState=g.state,e=n.child}else e=Dl(e,n,u);return u=n.stateNode,f&&u.props!==a&&(au||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",P(n)||"a component"),au=!0),e}function Tw(e,n,o,a){return ya(),n.flags|=256,yn(e,n,o,a),n.child}function Zg(e,n){n&&n.childContextTypes&&console.error(`childContextTypes cannot be defined on a function component.
124
- %s.childContextTypes = ...`,n.displayName||n.name||"Component"),typeof n.getDerivedStateFromProps==="function"&&(e=je(n)||"Unknown",hA[e]||(console.error("%s: Function components do not support getDerivedStateFromProps.",e),hA[e]=!0)),typeof n.contextType==="object"&&n.contextType!==null&&(n=je(n)||"Unknown",cA[n]||(console.error("%s: Function components do not support contextType.",n),cA[n]=!0))}function Kg(e){return{baseLanes:e,cachePool:CS()}}function e0(e,n,o){return e=e!==null?e.childLanes&~o:0,n&&(e|=oi),e}function Ew(e,n,o){var a,u=n.pendingProps;c(n)&&(n.flags|=128);var f=!1,p=(n.flags&128)!==0;if((a=p)||(a=e!==null&&e.memoizedState===null?!1:(Pt.current&ff)!==0),a&&(f=!0,n.flags&=-129),a=(n.flags&32)!==0,n.flags&=-33,e===null){if(Le){if(f?ms(n):gs(n),(e=gt)?(o=Gx(e,Ii),o=o!==null&&o.data!==Pa?o:null,o!==null&&(a={dehydrated:o,treeContext:mS(),retryLane:536870912,hydrationErrors:null},n.memoizedState=a,a=dS(o),a.return=n,n.child=a,Sn=n,gt=null)):o=null,o===null)throw zh(n,e),cs(n);return B0(o)?n.lanes=32:n.lanes=536870912,null}var g=u.children;if(u=u.fallback,f){gs(n);var v=n.mode;return g=ud({mode:"hidden",children:g},v),u=ma(u,v,o,null),g.return=n,u.return=n,g.sibling=u,n.child=g,u=n.child,u.memoizedState=Kg(o),u.childLanes=e0(e,a,o),n.memoizedState=Py,Sc(null,u)}return ms(n),t0(n,g)}var x=e.memoizedState;if(x!==null){var D=x.dehydrated;if(D!==null){if(p)n.flags&256?(ms(n),n.flags&=-257,n=n0(e,n,o)):n.memoizedState!==null?(gs(n),n.child=e.child,n.flags|=128,n=null):(gs(n),g=u.fallback,v=n.mode,u=ud({mode:"visible",children:u.children},v),g=ma(g,v,o,null),g.flags|=2,u.return=n,g.return=n,u.sibling=g,n.child=u,Na(n,e.child,null,o),u=n.child,u.memoizedState=Kg(o),u.childLanes=e0(e,a,o),n.memoizedState=Py,n=Sc(null,u));else if(ms(n),yS(),(o&536870912)!==0&&pd(n),B0(D)){if(a=D.nextSibling&&D.nextSibling.dataset,a){g=a.dgst;var O=a.msg;v=a.stck;var A=a.cstck}f=O,a=g,u=v,D=A,g=f,v=D,g=g?Error(g):Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),g.stack=u||"",g.digest=a,a=v===void 0?null:v,u={value:g,source:null,stack:a},typeof a==="string"&&ky.set(g,u),uc(u),n=n0(e,n,o)}else if(Zt||Sr(e,n,o,!1),a=(o&e.childLanes)!==0,Zt||a){if(a=ut,a!==null&&(u=Ju(a,o),u!==0&&u!==x.retryLane))throw x.retryLane=u,An(e,u),Bt(a,e,u),$y;L0(D)||md(),n=n0(e,n,o)}else L0(D)?(n.flags|=192,n.child=e.child,n=null):(e=x.treeContext,gt=gi(D.nextSibling),Sn=n,Le=!0,Ds=null,al=!1,Si=null,Ii=!1,e!==null&&gS(n,e),n=t0(n,u.children),n.flags|=4096);return n}}if(f)return gs(n),g=u.fallback,v=n.mode,A=e.child,D=A.sibling,u=Al(A,{mode:"hidden",children:u.children}),u.subtreeFlags=A.subtreeFlags&65011712,D!==null?g=Al(D,g):(g=ma(g,v,o,null),g.flags|=2),g.return=n,u.return=n,u.sibling=g,n.child=u,Sc(null,u),u=n.child,g=e.child.memoizedState,g===null?g=Kg(o):(v=g.cachePool,v!==null?(A=Wt._currentValue,v=v.parent!==A?{parent:A,pool:A}:v):v=CS(),g={baseLanes:g.baseLanes|o,cachePool:v}),u.memoizedState=g,u.childLanes=e0(e,a,o),n.memoizedState=Py,Sc(e.child,u);return x!==null&&(o&62914560)===o&&(o&e.lanes)!==0&&pd(n),ms(n),o=e.child,e=o.sibling,o=Al(o,{mode:"visible",children:u.children}),o.return=n,o.sibling=null,e!==null&&(a=n.deletions,a===null?(n.deletions=[e],n.flags|=16):a.push(e)),n.child=o,n.memoizedState=null,o}function t0(e,n){return n=ud({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function ud(e,n){return e=w(22,e,null,n),e.lanes=0,e}function n0(e,n,o){return Na(n,e.child,null,o),e=t0(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Mw(e,n,o){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n),rg(e.return,n,o)}function i0(e,n,o,a,u,f){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:a,tail:o,tailMode:u,treeForkCount:f}:(p.isBackwards=n,p.rendering=null,p.renderingStartTime=0,p.last=a,p.tail=o,p.tailMode=u,p.treeForkCount=f)}function Dw(e,n,o){var a=n.pendingProps,u=a.revealOrder,f=a.tail,p=a.children,g=Pt.current;if((a=(g&ff)!==0)?(g=g&iu|ff,n.flags|=128):g&=iu,Be(Pt,g,n),g=u==null?"null":u,u!=="forwards"&&u!=="unstable_legacy-backwards"&&u!=="together"&&u!=="independent"&&!dA[g])if(dA[g]=!0,u==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(u==="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 u==="string")switch(u.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.',u,u.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.',u,u.toLowerCase());break;default:console.error('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',u)}else console.error('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',u);if(g=f==null?"null":f,!ap[g])if(f==null){if(u==="forwards"||u==="backwards"||u==="unstable_legacy-backwards")ap[g]=!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 f!=="visible"&&f!=="collapsed"&&f!=="hidden"?(ap[g]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "visible", "collapsed" or "hidden"?',f)):u!=="forwards"&&u!=="backwards"&&u!=="unstable_legacy-backwards"&&(ap[g]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',f));e:if((u==="forwards"||u==="backwards"||u==="unstable_legacy-backwards")&&p!==void 0&&p!==null&&p!==!1)if(ln(p)){for(g=0;g<p.length;g++)if(!zS(p[g],g))break e}else if(g=$t(p),typeof g==="function"){if(g=g.call(p))for(var v=g.next(),x=0;!v.done;v=g.next()){if(!zS(v.value,x))break e;x++}}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?',u);if(yn(e,n,p,o),Le?(us(),p=Wc):p=0,!a&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Mw(e,o,n);else if(e.tag===19)Mw(e,o,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(u){case"forwards":o=n.child;for(u=null;o!==null;)e=o.alternate,e!==null&&Qh(e)===null&&(u=o),o=o.sibling;o=u,o===null?(u=n.child,n.child=null):(u=o.sibling,o.sibling=null),i0(n,!1,u,o,f,p);break;case"backwards":case"unstable_legacy-backwards":o=null,u=n.child;for(n.child=null;u!==null;){if(e=u.alternate,e!==null&&Qh(e)===null){n.child=u;break}e=u.sibling,u.sibling=o,o=u,u=e}i0(n,!0,o,null,f,p);break;case"together":i0(n,!1,null,null,void 0,p);break;default:n.memoizedState=null}return n.child}function Dl(e,n,o){if(e!==null&&(n.dependencies=e.dependencies),qn=-1,Us|=n.lanes,(o&n.childLanes)===0)if(e!==null){if(Sr(e,n,o,!1),(o&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error("Resuming work not yet implemented.");if(n.child!==null){e=n.child,o=Al(e,e.pendingProps),n.child=o;for(o.return=n;e.sibling!==null;)e=e.sibling,o=o.sibling=Al(e,e.pendingProps),o.return=n;o.sibling=null}return n.child}function o0(e,n){if((e.lanes&n)!==0)return!0;return e=e.dependencies,e!==null&&Nh(e)?!0:!1}function LR(e,n,o){switch(n.tag){case 3:W(n,n.stateNode.containerInfo),fs(n,Wt,e.memoizedState.cache),ya();break;case 27:case 5:it(n);break;case 4:W(n,n.stateNode.containerInfo);break;case 10:fs(n,n.type,n.memoizedProps.value);break;case 12:(o&n.childLanes)!==0&&(n.flags|=4),n.flags|=2048;var a=n.stateNode;a.effectDuration=-0,a.passiveEffectDuration=-0;break;case 31:if(n.memoizedState!==null)return n.flags|=128,vg(n),null;break;case 13:if(a=n.memoizedState,a!==null){if(a.dehydrated!==null)return ms(n),n.flags|=128,null;if((o&n.child.childLanes)!==0)return Ew(e,n,o);return ms(n),e=Dl(e,n,o),e!==null?e.sibling:null}ms(n);break;case 19:var u=(e.flags&128)!==0;if(a=(o&n.childLanes)!==0,a||(Sr(e,n,o,!1),a=(o&n.childLanes)!==0),u){if(a)return Dw(e,n,o);n.flags|=128}if(u=n.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),Be(Pt,Pt.current,n),a)break;else return null;case 22:return n.lanes=0,ww(e,n,o,n.pendingProps);case 24:fs(n,Wt,e.memoizedState.cache)}return Dl(e,n,o)}function l0(e,n,o){if(n._debugNeedsRemount&&e!==null){o=tg(n.type,n.key,n.pendingProps,n._debugOwner||null,n.mode,n.lanes),o._debugStack=n._debugStack,o._debugTask=n._debugTask;var a=n.return;if(a===null)throw Error("Cannot swap the root fiber.");if(e.alternate=null,n.alternate=null,o.index=n.index,o.sibling=n.sibling,o.return=n.return,o.ref=n.ref,o._debugInfo=n._debugInfo,n===a.child)a.child=o;else{var u=a.child;if(u===null)throw Error("Expected parent to have a child.");for(;u.sibling!==n;)if(u=u.sibling,u===null)throw Error("Expected to find the previous sibling.");u.sibling=o}return n=a.deletions,n===null?(a.deletions=[e],a.flags|=16):n.push(e),o.flags|=2,o}if(e!==null)if(e.memoizedProps!==n.pendingProps||n.type!==e.type)Zt=!0;else{if(!o0(e,o)&&(n.flags&128)===0)return Zt=!1,LR(e,n,o);Zt=(e.flags&131072)!==0?!0:!1}else{if(Zt=!1,a=Le)us(),a=(n.flags&1048576)!==0;a&&(a=n.index,us(),pS(n,Wc,a))}switch(n.lanes=0,n.tag){case 16:e:if(a=n.pendingProps,e=hs(n.elementType),n.type=e,typeof e==="function")eg(e)?(a=ka(e,a),n.tag=1,n.type=e=pa(e),n=Aw(null,n,e,a,o)):(n.tag=0,Zg(n,e),n.type=e=pa(e),n=Jg(null,n,e,a,o));else{if(e!==void 0&&e!==null){if(u=e.$$typeof,u===Nc){n.tag=11,n.type=e=Km(e),n=bw(null,n,e,a,o);break e}else if(u===Dd){n.tag=14,n=vw(null,n,e,a,o);break e}}throw n="",e!==null&&typeof e==="object"&&e.$$typeof===yi&&(n=" Did you wrap a component in React.lazy() more than once?"),o=je(e)||e,Error("Element type is invalid. Received a promise that resolves to: "+o+". Lazy element type must resolve to a class or function."+n)}return n;case 0:return Jg(e,n,n.type,n.pendingProps,o);case 1:return a=n.type,u=ka(a,n.pendingProps),Aw(e,n,a,u,o);case 3:e:{if(W(n,n.stateNode.containerInfo),e===null)throw Error("Should have a current fiber. This is a bug in React.");a=n.pendingProps;var f=n.memoizedState;u=f.element,gg(e,n),gc(n,a,null,o);var p=n.memoizedState;if(a=p.cache,fs(n,Wt,a),a!==f.cache&&ug(n,[Wt],o,!0),mc(),a=p.element,f.isDehydrated)if(f={element:a,isDehydrated:!1,cache:p.cache},n.updateQueue.baseState=f,n.memoizedState=f,n.flags&256){n=Tw(e,n,a,o);break e}else if(a!==u){u=fi(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),n),uc(u),n=Tw(e,n,a,o);break e}else{switch(e=n.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}gt=gi(e.firstChild),Sn=n,Le=!0,Ds=null,al=!1,Si=null,Ii=!0,o=jC(n,null,a,o);for(n.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling}else{if(ya(),a===u){n=Dl(e,n,o);break e}yn(e,n,a,o)}n=n.child}return n;case 26:return rd(e,n),e===null?(o=ek(n.type,null,n.pendingProps,null))?n.memoizedState=o:Le||(o=n.type,e=n.pendingProps,a=Wn(xs.current),a=vd(a).createElement(o),a[vn]=n,a[Nn]=e,bn(a,o,e),Mt(a),n.stateNode=a):n.memoizedState=ek(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return it(n),e===null&&Le&&(a=Wn(xs.current),u=de(),a=n.stateNode=Zx(n.type,n.pendingProps,a,u,!1),al||(u=Vx(a,n.type,n.pendingProps,u),u!==null&&(ga(n,0).serverProps=u)),Sn=n,Ii=!0,u=gt,Ss(n.type)?(db=u,gt=gi(a.firstChild)):gt=u),yn(e,n,n.pendingProps.children,o),rd(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Le&&(f=de(),a=Ym(n.type,f.ancestorInfo),u=gt,(p=!u)||(p=SL(u,n.type,n.pendingProps,Ii),p!==null?(n.stateNode=p,al||(f=Vx(p,n.type,n.pendingProps,f),f!==null&&(ga(n,0).serverProps=f)),Sn=n,gt=gi(p.firstChild),Ii=!1,f=!0):f=!1,p=!f),p&&(a&&zh(n,u),cs(n))),it(n),u=n.type,f=n.pendingProps,p=e!==null?e.memoizedProps:null,a=f.children,O0(u,f)?a=null:p!==null&&O0(u,p)&&(n.flags|=32),n.memoizedState!==null&&(u=wg(e,n,CR,null,null,o),Df._currentValue=u),rd(e,n),yn(e,n,a,o),n.child;case 6:return e===null&&Le&&(o=n.pendingProps,e=de(),a=e.ancestorInfo.current,o=a!=null?Ch(o,a.tag,e.ancestorInfo.implicitRootScope):!0,e=gt,(a=!e)||(a=wL(e,n.pendingProps,Ii),a!==null?(n.stateNode=a,Sn=n,gt=null,a=!0):a=!1,a=!a),a&&(o&&zh(n,e),cs(n))),null;case 13:return Ew(e,n,o);case 4:return W(n,n.stateNode.containerInfo),a=n.pendingProps,e===null?n.child=Na(n,null,a,o):yn(e,n,a,o),n.child;case 11:return bw(e,n,n.type,n.pendingProps,o);case 7:return yn(e,n,n.pendingProps,o),n.child;case 8:return yn(e,n,n.pendingProps.children,o),n.child;case 12:return n.flags|=4,n.flags|=2048,a=n.stateNode,a.effectDuration=-0,a.passiveEffectDuration=-0,yn(e,n,n.pendingProps.children,o),n.child;case 10:return a=n.type,u=n.pendingProps,f=u.value,"value"in u||pA||(pA=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),fs(n,a,f),yn(e,n,u.children,o),n.child;case 9:return u=n.type._context,a=n.pendingProps.children,typeof a!=="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."),ba(n),u=wt(u),a=Ry(a,u,void 0),n.flags|=1,yn(e,n,a,o),n.child;case 14:return vw(e,n,n.type,n.pendingProps,o);case 15:return Sw(e,n,n.type,n.pendingProps,o);case 19:return Dw(e,n,o);case 31:return RR(e,n,o);case 22:return ww(e,n,o,n.pendingProps);case 24:return ba(n),a=wt(Wt),e===null?(u=dg(),u===null&&(u=ut,f=cg(),u.pooledCache=f,va(f),f!==null&&(u.pooledCacheLanes|=o),u=f),n.memoizedState={parent:a,cache:u},mg(n),fs(n,Wt,u)):((e.lanes&o)!==0&&(gg(e,n),gc(n,null,null,o),mc()),u=e.memoizedState,f=n.memoizedState,u.parent!==a?(u={parent:a,cache:a},n.memoizedState=u,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=u),fs(n,Wt,a)):(a=f.cache,fs(n,Wt,a),a!==u.cache&&ug(n,[Wt],o,!0))),yn(e,n,n.pendingProps.children,o),n.child;case 29:throw n.pendingProps}throw Error("Unknown unit of work tag ("+n.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function Ol(e){e.flags|=4}function s0(e,n,o,a,u){if(n=(e.mode&ZB)!==pe)n=!1;if(n){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(rx())e.flags|=8192;else throw Ha=tp,By}else e.flags&=-16777217}function Ow(e,n){if(n.type!=="stylesheet"||(n.state.loading&Xi)!==Qa)e.flags&=-16777217;else if(e.flags|=16777216,!lk(n))if(rx())e.flags|=8192;else throw Ha=tp,By}function cd(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?oo():536870912,e.lanes|=n,Ia|=n)}function wc(e,n){if(!Le)switch(e.tailMode){case"hidden":n=e.tail;for(var o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?e.tail=null:o.sibling=null;break;case"collapsed":o=e.tail;for(var a=null;o!==null;)o.alternate!==null&&(a=o),o=o.sibling;a===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function ft(e){var n=e.alternate!==null&&e.alternate.child===e.child,o=0,a=0;if(n)if((e.mode&we)!==pe){for(var{selfBaseDuration:u,child:f}=e;f!==null;)o|=f.lanes|f.childLanes,a|=f.subtreeFlags&65011712,a|=f.flags&65011712,u+=f.treeBaseDuration,f=f.sibling;e.treeBaseDuration=u}else for(u=e.child;u!==null;)o|=u.lanes|u.childLanes,a|=u.subtreeFlags&65011712,a|=u.flags&65011712,u.return=e,u=u.sibling;else if((e.mode&we)!==pe){u=e.actualDuration,f=e.selfBaseDuration;for(var p=e.child;p!==null;)o|=p.lanes|p.childLanes,a|=p.subtreeFlags,a|=p.flags,u+=p.actualDuration,f+=p.treeBaseDuration,p=p.sibling;e.actualDuration=u,e.treeBaseDuration=f}else for(u=e.child;u!==null;)o|=u.lanes|u.childLanes,a|=u.subtreeFlags,a|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=a,e.childLanes=o,n}function BR(e,n,o){var a=n.pendingProps;switch(lg(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ft(n),null;case 1:return ft(n),null;case 3:if(o=n.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),El(Wt,n),he(n),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),e===null||e.child===null)vr(n)?(ag(),Ol(n)):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,sg());return ft(n),null;case 26:var{type:u,memoizedState:f}=n;return e===null?(Ol(n),f!==null?(ft(n),Ow(n,f)):(ft(n),s0(n,u,null,a,o))):f?f!==e.memoizedState?(Ol(n),ft(n),Ow(n,f)):(ft(n),n.flags&=-16777217):(e=e.memoizedProps,e!==a&&Ol(n),ft(n),s0(n,u,e,a,o)),null;case 27:if($e(n),o=Wn(xs.current),u=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==a&&Ol(n);else{if(!a){if(n.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 ft(n),null}e=de(),vr(n)?bS(n,e):(e=Zx(u,a,o,e,!0),n.stateNode=e,Ol(n))}return ft(n),null;case 5:if($e(n),u=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==a&&Ol(n);else{if(!a){if(n.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 ft(n),null}var p=de();if(vr(n))bS(n,p);else{switch(f=Wn(xs.current),Ym(u,p.ancestorInfo),p=p.context,f=vd(f),p){case mu:f=f.createElementNS(qr,u);break;case Ep:f=f.createElementNS(Nd,u);break;default:switch(u){case"svg":f=f.createElementNS(qr,u);break;case"math":f=f.createElementNS(Nd,u);break;case"script":f=f.createElement("div"),f.innerHTML="<script></script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof a.is==="string"?f.createElement("select",{is:a.is}):f.createElement("select"),a.multiple?f.multiple=!0:a.size&&(f.size=a.size);break;default:f=typeof a.is==="string"?f.createElement(u,{is:a.is}):f.createElement(u),u.indexOf("-")===-1&&(u!==u.toLowerCase()&&console.error("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",u),Object.prototype.toString.call(f)!=="[object HTMLUnknownElement]"||ho.call(UA,u)||(UA[u]=!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.",u)))}}f[vn]=n,f[Nn]=a;e:for(p=n.child;p!==null;){if(p.tag===5||p.tag===6)f.appendChild(p.stateNode);else if(p.tag!==4&&p.tag!==27&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===n)break e;for(;p.sibling===null;){if(p.return===null||p.return===n)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}n.stateNode=f;e:switch(bn(f,u,a),u){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Ol(n)}}return ft(n),s0(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,o),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==a&&Ol(n);else{if(typeof a!=="string"&&n.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(e=Wn(xs.current),o=de(),vr(n)){if(e=n.stateNode,o=n.memoizedProps,u=!al,a=null,f=Sn,f!==null)switch(f.tag){case 3:u&&(u=Fx(e,o,a),u!==null&&(ga(n,0).serverProps=u));break;case 27:case 5:a=f.memoizedProps,u&&(u=Fx(e,o,a),u!==null&&(ga(n,0).serverProps=u))}e[vn]=n,e=e.nodeValue===o||a!==null&&a.suppressHydrationWarning===!0||Hx(e.nodeValue,o)?!0:!1,e||cs(n,!0)}else u=o.ancestorInfo.current,u!=null&&Ch(a,u.tag,o.ancestorInfo.implicitRootScope),e=vd(e).createTextNode(a),e[vn]=n,n.stateNode=e}return ft(n),null;case 31:if(o=n.memoizedState,e===null||e.memoizedState!==null){if(a=vr(n),o!==null){if(e===null){if(!a)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue.");e[vn]=n,ft(n),(n.mode&we)!==pe&&o!==null&&(e=n.child,e!==null&&(n.treeBaseDuration-=e.treeBaseDuration))}else ag(),ya(),(n.flags&128)===0&&(o=n.memoizedState=null),n.flags|=4,ft(n),(n.mode&we)!==pe&&o!==null&&(e=n.child,e!==null&&(n.treeBaseDuration-=e.treeBaseDuration));e=!1}else o=sg(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),e=!0;if(!e){if(n.flags&256)return pi(n),n;return pi(n),null}if((n.flags&128)!==0)throw Error("Client rendering an Activity suspended it again. This is a bug in React.")}return ft(n),null;case 13:if(a=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=a,f=vr(n),u!==null&&u.dehydrated!==null){if(e===null){if(!f)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");f[vn]=n,ft(n),(n.mode&we)!==pe&&u!==null&&(u=n.child,u!==null&&(n.treeBaseDuration-=u.treeBaseDuration))}else ag(),ya(),(n.flags&128)===0&&(u=n.memoizedState=null),n.flags|=4,ft(n),(n.mode&we)!==pe&&u!==null&&(u=n.child,u!==null&&(n.treeBaseDuration-=u.treeBaseDuration));u=!1}else u=sg(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u){if(n.flags&256)return pi(n),n;return pi(n),null}}if(pi(n),(n.flags&128)!==0)return n.lanes=o,(n.mode&we)!==pe&&hc(n),n;return o=a!==null,e=e!==null&&e.memoizedState!==null,o&&(a=n.child,u=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(u=a.alternate.memoizedState.cachePool.pool),f=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(f=a.memoizedState.cachePool.pool),f!==u&&(a.flags|=2048)),o!==e&&o&&(n.child.flags|=8192),cd(n,n.updateQueue),ft(n),(n.mode&we)!==pe&&o&&(e=n.child,e!==null&&(n.treeBaseDuration-=e.treeBaseDuration)),null;case 4:return he(n),e===null&&k0(n.stateNode.containerInfo),ft(n),null;case 10:return El(n.type,n),ft(n),null;case 19:if(Ne(Pt,n),a=n.memoizedState,a===null)return ft(n),null;if(u=(n.flags&128)!==0,f=a.rendering,f===null)if(u)wc(a,!1);else{if(Ot!==Yl||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(f=Qh(e),f!==null){n.flags|=128,wc(a,!1),e=f.updateQueue,n.updateQueue=e,cd(n,e),n.subtreeFlags=0,e=o;for(o=n.child;o!==null;)hS(o,e),o=o.sibling;return Be(Pt,Pt.current&iu|ff,n),Le&&Tl(n,a.treeForkCount),n.child}e=e.sibling}a.tail!==null&&fn()>pp&&(n.flags|=128,u=!0,wc(a,!1),n.lanes=4194304)}else{if(!u)if(e=Qh(f),e!==null){if(n.flags|=128,u=!0,e=e.updateQueue,n.updateQueue=e,cd(n,e),wc(a,!0),a.tail===null&&a.tailMode==="hidden"&&!f.alternate&&!Le)return ft(n),null}else 2*fn()-a.renderingStartTime>pp&&o!==536870912&&(n.flags|=128,u=!0,wc(a,!1),n.lanes=4194304);a.isBackwards?(f.sibling=n.child,n.child=f):(e=a.last,e!==null?e.sibling=f:n.child=f,a.last=f)}if(a.tail!==null)return e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=fn(),e.sibling=null,o=Pt.current,o=u?o&iu|ff:o&iu,Be(Pt,o,n),Le&&Tl(n,a.treeForkCount),e;return ft(n),null;case 22:case 23:return pi(n),bg(n),a=n.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(n.flags|=8192):a&&(n.flags|=8192),a?(o&536870912)!==0&&(n.flags&128)===0&&(ft(n),n.subtreeFlags&6&&(n.flags|=8192)):ft(n),o=n.updateQueue,o!==null&&cd(n,o.retryQueue),o=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(o=e.memoizedState.cachePool.pool),a=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(a=n.memoizedState.cachePool.pool),a!==o&&(n.flags|=2048),e!==null&&Ne(Ba,n),null;case 24:return o=null,e!==null&&(o=e.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),El(Wt,n),ft(n),null;case 25:return null;case 30:return null}throw Error("Unknown unit of work tag ("+n.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function zR(e,n){switch(lg(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,(n.mode&we)!==pe&&hc(n),n):null;case 3:return El(Wt,n),he(n),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return $e(n),null;case 31:if(n.memoizedState!==null){if(pi(n),n.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");ya()}return e=n.flags,e&65536?(n.flags=e&-65537|128,(n.mode&we)!==pe&&hc(n),n):null;case 13:if(pi(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");ya()}return e=n.flags,e&65536?(n.flags=e&-65537|128,(n.mode&we)!==pe&&hc(n),n):null;case 19:return Ne(Pt,n),null;case 4:return he(n),null;case 10:return El(n.type,n),null;case 22:case 23:return pi(n),bg(n),e!==null&&Ne(Ba,n),e=n.flags,e&65536?(n.flags=e&-65537|128,(n.mode&we)!==pe&&hc(n),n):null;case 24:return El(Wt,n),null;case 25:return null;default:return null}}function Rw(e,n){switch(lg(n),n.tag){case 3:El(Wt,n),he(n);break;case 26:case 27:case 5:$e(n);break;case 4:he(n);break;case 31:n.memoizedState!==null&&pi(n);break;case 13:pi(n);break;case 19:Ne(Pt,n);break;case 10:El(n.type,n);break;case 22:case 23:pi(n),bg(n),e!==null&&Ne(Ba,n);break;case 24:El(Wt,n)}}function Go(e){return(e.mode&we)!==pe}function Lw(e,n){Go(e)?(Qo(),xc(n,e),Xo()):xc(n,e)}function a0(e,n,o){Go(e)?(Qo(),Ar(o,e,n),Xo()):Ar(o,e,n)}function xc(e,n){try{var o=n.updateQueue,a=o!==null?o.lastEffect:null;if(a!==null){var u=a.next;o=u;do{if((o.tag&e)===e&&(a=void 0,(e&Vn)!==ip&&(hu=!0),a=Y(n,iz,o),(e&Vn)!==ip&&(hu=!1),a!==void 0&&typeof a!=="function")){var f=void 0;f=(o.tag&xi)!==0?"useLayoutEffect":(o.tag&Vn)!==0?"useInsertionEffect":"useEffect";var p=void 0;p=a===null?" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof a.then==="function"?`
123
+ `+v:""))}}f=n.stateNode,p=Ie(o)||"Component",f.render||(o.prototype&&typeof o.prototype.render==="function"?console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?",p):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",p)),!f.getInitialState||f.getInitialState.isReactClassApproved||f.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?",p),f.getDefaultProps&&!f.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.",p),f.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",p),o.childContextTypes&&!sA.has(o)&&(sA.add(o),console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",p)),o.contextTypes&&!lA.has(o)&&(lA.add(o),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)",p)),typeof f.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.",p),o.prototype&&o.prototype.isPureReactComponent&&typeof f.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.",Ie(o)||"A pure component"),typeof f.componentDidUnmount==="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",p),typeof f.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().",p),typeof f.componentWillRecieveProps==="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",p),typeof f.UNSAFE_componentWillRecieveProps==="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",p),g=f.props!==a,f.props!==void 0&&g&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",p),f.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.",p,p),typeof f.getSnapshotBeforeUpdate!=="function"||typeof f.componentDidUpdate==="function"||tA.has(o)||(tA.add(o),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",Ie(o))),typeof f.getDerivedStateFromProps==="function"&&console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",p),typeof f.getDerivedStateFromError==="function"&&console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",p),typeof o.getSnapshotBeforeUpdate==="function"&&console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",p),(g=f.state)&&(typeof g!=="object"||on(g))&&console.error("%s.state: must be set to an object or null",p),typeof f.getChildContext==="function"&&typeof o.childContextTypes!=="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",p),f=n.stateNode,f.props=a,f.state=n.memoizedState,f.refs={},mg(n),p=o.contextType,f.context=typeof p==="object"&&p!==null?wt(p):Os,f.state===a&&(p=Ie(o)||"Component",iA.has(p)||(iA.add(p),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.",p))),n.mode&Tn&&mo.recordLegacyContextWarning(n,f),mo.recordUnsafeLifecycleWarnings(n,f),f.state=n.memoizedState,p=o.getDerivedStateFromProps,typeof p==="function"&&(Qg(n,o,p,a),f.state=n.memoizedState),typeof o.getDerivedStateFromProps==="function"||typeof f.getSnapshotBeforeUpdate==="function"||typeof f.UNSAFE_componentWillMount!=="function"&&typeof f.componentWillMount!=="function"||(p=f.state,typeof f.componentWillMount==="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount==="function"&&f.UNSAFE_componentWillMount(),p!==f.state&&(console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",P(n)||"Component"),jy.enqueueReplaceState(f,f.state,null)),bc(n,a,f,u),yc(),f.state=n.memoizedState),typeof f.componentDidMount==="function"&&(n.flags|=4194308),(n.mode&po)!==pe&&(n.flags|=134217728),f=!0}else if(e===null){f=n.stateNode;var D=n.memoizedProps;g=Ma(o,D),f.props=g;var O=f.context;v=o.contextType,p=Os,typeof v==="object"&&v!==null&&(p=wt(v)),x=o.getDerivedStateFromProps,v=typeof x==="function"||typeof f.getSnapshotBeforeUpdate==="function",D=n.pendingProps!==D,v||typeof f.UNSAFE_componentWillReceiveProps!=="function"&&typeof f.componentWillReceiveProps!=="function"||(D||O!==p)&&dw(n,f,a,p),_s=!1;var A=n.memoizedState;f.state=A,bc(n,a,f,u),yc(),O=n.memoizedState,D||A!==O||_s?(typeof x==="function"&&(Qg(n,o,x,a),O=n.memoizedState),(g=_s||hw(n,o,g,a,A,O,p))?(v||typeof f.UNSAFE_componentWillMount!=="function"&&typeof f.componentWillMount!=="function"||(typeof f.componentWillMount==="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount==="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount==="function"&&(n.flags|=4194308),(n.mode&po)!==pe&&(n.flags|=134217728)):(typeof f.componentDidMount==="function"&&(n.flags|=4194308),(n.mode&po)!==pe&&(n.flags|=134217728),n.memoizedProps=a,n.memoizedState=O),f.props=a,f.state=O,f.context=p,f=g):(typeof f.componentDidMount==="function"&&(n.flags|=4194308),(n.mode&po)!==pe&&(n.flags|=134217728),f=!1)}else{f=n.stateNode,gg(e,n),p=n.memoizedProps,v=Ma(o,p),f.props=v,x=n.pendingProps,A=f.context,O=o.contextType,g=Os,typeof O==="object"&&O!==null&&(g=wt(O)),D=o.getDerivedStateFromProps,(O=typeof D==="function"||typeof f.getSnapshotBeforeUpdate==="function")||typeof f.UNSAFE_componentWillReceiveProps!=="function"&&typeof f.componentWillReceiveProps!=="function"||(p!==x||A!==g)&&dw(n,f,a,g),_s=!1,A=n.memoizedState,f.state=A,bc(n,a,f,u),yc();var B=n.memoizedState;p!==x||A!==B||_s||e!==null&&e.dependencies!==null&&Uh(e.dependencies)?(typeof D==="function"&&(Qg(n,o,D,a),B=n.memoizedState),(v=_s||hw(n,o,v,a,A,B,g)||e!==null&&e.dependencies!==null&&Uh(e.dependencies))?(O||typeof f.UNSAFE_componentWillUpdate!=="function"&&typeof f.componentWillUpdate!=="function"||(typeof f.componentWillUpdate==="function"&&f.componentWillUpdate(a,B,g),typeof f.UNSAFE_componentWillUpdate==="function"&&f.UNSAFE_componentWillUpdate(a,B,g)),typeof f.componentDidUpdate==="function"&&(n.flags|=4),typeof f.getSnapshotBeforeUpdate==="function"&&(n.flags|=1024)):(typeof f.componentDidUpdate!=="function"||p===e.memoizedProps&&A===e.memoizedState||(n.flags|=4),typeof f.getSnapshotBeforeUpdate!=="function"||p===e.memoizedProps&&A===e.memoizedState||(n.flags|=1024),n.memoizedProps=a,n.memoizedState=B),f.props=a,f.state=B,f.context=g,f=v):(typeof f.componentDidUpdate!=="function"||p===e.memoizedProps&&A===e.memoizedState||(n.flags|=4),typeof f.getSnapshotBeforeUpdate!=="function"||p===e.memoizedProps&&A===e.memoizedState||(n.flags|=1024),f=!1)}if(g=f,cd(e,n),p=(n.flags&128)!==0,g||p){if(g=n.stateNode,ai(n),p&&typeof o.getDerivedStateFromError!=="function")o=null,Un=-1;else if(o=MC(g),n.mode&Tn){Fe(!0);try{MC(g)}finally{Fe(!1)}}n.flags|=1,e!==null&&p?(n.child=ja(n,e.child,null,u),n.child=ja(n,null,o,u)):gn(e,n,o,u),n.memoizedState=g.state,e=n.child}else e=Ol(e,n,u);return u=n.stateNode,f&&u.props!==a&&(cu||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",P(n)||"a component"),cu=!0),e}function Tw(e,n,o,a){return xa(),n.flags|=256,gn(e,n,o,a),n.child}function Zg(e,n){n&&n.childContextTypes&&console.error(`childContextTypes cannot be defined on a function component.
124
+ %s.childContextTypes = ...`,n.displayName||n.name||"Component"),typeof n.getDerivedStateFromProps==="function"&&(e=Ie(n)||"Unknown",hA[e]||(console.error("%s: Function components do not support getDerivedStateFromProps.",e),hA[e]=!0)),typeof n.contextType==="object"&&n.contextType!==null&&(n=Ie(n)||"Unknown",cA[n]||(console.error("%s: Function components do not support contextType.",n),cA[n]=!0))}function Kg(e){return{baseLanes:e,cachePool:CS()}}function e0(e,n,o){return e=e!==null?e.childLanes&~o:0,n&&(e|=ii),e}function Ew(e,n,o){var a,u=n.pendingProps;c(n)&&(n.flags|=128);var f=!1,p=(n.flags&128)!==0;if((a=p)||(a=e!==null&&e.memoizedState===null?!1:($t.current&df)!==0),a&&(f=!0,n.flags&=-129),a=(n.flags&32)!==0,n.flags&=-33,e===null){if(Le){if(f?ys(n):bs(n),(e=yt)?(o=Gx(e,Vi),o=o!==null&&o.data!==Wa?o:null,o!==null&&(a={dehydrated:o,treeContext:mS(),retryLane:536870912,hydrationErrors:null},n.memoizedState=a,a=dS(o),a.return=n,n.child=a,vn=n,yt=null)):o=null,o===null)throw Nh(n,e),hs(n);return B0(o)?n.lanes=32:n.lanes=536870912,null}var g=u.children;if(u=u.fallback,f){bs(n);var v=n.mode;return g=fd({mode:"hidden",children:g},v),u=Sa(u,v,o,null),g.return=n,u.return=n,g.sibling=u,n.child=g,u=n.child,u.memoizedState=Kg(o),u.childLanes=e0(e,a,o),n.memoizedState=Py,xc(null,u)}return ys(n),t0(n,g)}var x=e.memoizedState;if(x!==null){var D=x.dehydrated;if(D!==null){if(p)n.flags&256?(ys(n),n.flags&=-257,n=n0(e,n,o)):n.memoizedState!==null?(bs(n),n.child=e.child,n.flags|=128,n=null):(bs(n),g=u.fallback,v=n.mode,u=fd({mode:"visible",children:u.children},v),g=Sa(g,v,o,null),g.flags|=2,u.return=n,g.return=n,u.sibling=g,n.child=u,ja(n,e.child,null,o),u=n.child,u.memoizedState=Kg(o),u.childLanes=e0(e,a,o),n.memoizedState=Py,n=xc(null,u));else if(ys(n),yS(),(o&536870912)!==0&&gd(n),B0(D)){if(a=D.nextSibling&&D.nextSibling.dataset,a){g=a.dgst;var O=a.msg;v=a.stck;var A=a.cstck}f=O,a=g,u=v,D=A,g=f,v=D,g=g?Error(g):Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),g.stack=u||"",g.digest=a,a=v===void 0?null:v,u={value:g,source:null,stack:a},typeof a==="string"&&ky.set(g,u),fc(u),n=n0(e,n,o)}else if(Jt||kr(e,n,o,!1),a=(o&e.childLanes)!==0,Jt||a){if(a=ut,a!==null&&(u=Ku(a,o),u!==0&&u!==x.retryLane))throw x.retryLane=u,Cn(e,u),Bt(a,e,u),$y;L0(D)||yd(),n=n0(e,n,o)}else L0(D)?(n.flags|=192,n.child=e.child,n=null):(e=x.treeContext,yt=pi(D.nextSibling),vn=n,Le=!0,Rs=null,al=!1,bi=null,Vi=!1,e!==null&&gS(n,e),n=t0(n,u.children),n.flags|=4096);return n}}if(f)return bs(n),g=u.fallback,v=n.mode,A=e.child,D=A.sibling,u=Tl(A,{mode:"hidden",children:u.children}),u.subtreeFlags=A.subtreeFlags&65011712,D!==null?g=Tl(D,g):(g=Sa(g,v,o,null),g.flags|=2),g.return=n,u.return=n,u.sibling=g,n.child=u,xc(null,u),u=n.child,g=e.child.memoizedState,g===null?g=Kg(o):(v=g.cachePool,v!==null?(A=Gt._currentValue,v=v.parent!==A?{parent:A,pool:A}:v):v=CS(),g={baseLanes:g.baseLanes|o,cachePool:v}),u.memoizedState=g,u.childLanes=e0(e,a,o),n.memoizedState=Py,xc(e.child,u);return x!==null&&(o&62914560)===o&&(o&e.lanes)!==0&&gd(n),ys(n),o=e.child,e=o.sibling,o=Tl(o,{mode:"visible",children:u.children}),o.return=n,o.sibling=null,e!==null&&(a=n.deletions,a===null?(n.deletions=[e],n.flags|=16):a.push(e)),n.child=o,n.memoizedState=null,o}function t0(e,n){return n=fd({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function fd(e,n){return e=w(22,e,null,n),e.lanes=0,e}function n0(e,n,o){return ja(n,e.child,null,o),e=t0(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Mw(e,n,o){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n),rg(e.return,n,o)}function i0(e,n,o,a,u,f){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:a,tail:o,tailMode:u,treeForkCount:f}:(p.isBackwards=n,p.rendering=null,p.renderingStartTime=0,p.last=a,p.tail=o,p.tailMode=u,p.treeForkCount=f)}function Dw(e,n,o){var a=n.pendingProps,u=a.revealOrder,f=a.tail,p=a.children,g=$t.current;if((a=(g&df)!==0)?(g=g&su|df,n.flags|=128):g&=su,Be($t,g,n),g=u==null?"null":u,u!=="forwards"&&u!=="unstable_legacy-backwards"&&u!=="together"&&u!=="independent"&&!dA[g])if(dA[g]=!0,u==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(u==="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 u==="string")switch(u.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.',u,u.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.',u,u.toLowerCase());break;default:console.error('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',u)}else console.error('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',u);if(g=f==null?"null":f,!up[g])if(f==null){if(u==="forwards"||u==="backwards"||u==="unstable_legacy-backwards")up[g]=!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 f!=="visible"&&f!=="collapsed"&&f!=="hidden"?(up[g]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "visible", "collapsed" or "hidden"?',f)):u!=="forwards"&&u!=="backwards"&&u!=="unstable_legacy-backwards"&&(up[g]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',f));e:if((u==="forwards"||u==="backwards"||u==="unstable_legacy-backwards")&&p!==void 0&&p!==null&&p!==!1)if(on(p)){for(g=0;g<p.length;g++)if(!zS(p[g],g))break e}else if(g=It(p),typeof g==="function"){if(g=g.call(p))for(var v=g.next(),x=0;!v.done;v=g.next()){if(!zS(v.value,x))break e;x++}}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?',u);if(gn(e,n,p,o),Le?(fs(),p=Jc):p=0,!a&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Mw(e,o,n);else if(e.tag===19)Mw(e,o,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(u){case"forwards":o=n.child;for(u=null;o!==null;)e=o.alternate,e!==null&&Wh(e)===null&&(u=o),o=o.sibling;o=u,o===null?(u=n.child,n.child=null):(u=o.sibling,o.sibling=null),i0(n,!1,u,o,f,p);break;case"backwards":case"unstable_legacy-backwards":o=null,u=n.child;for(n.child=null;u!==null;){if(e=u.alternate,e!==null&&Wh(e)===null){n.child=u;break}e=u.sibling,u.sibling=o,o=u,u=e}i0(n,!0,o,null,f,p);break;case"together":i0(n,!1,null,null,void 0,p);break;default:n.memoizedState=null}return n.child}function Ol(e,n,o){if(e!==null&&(n.dependencies=e.dependencies),Un=-1,Vs|=n.lanes,(o&n.childLanes)===0)if(e!==null){if(kr(e,n,o,!1),(o&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error("Resuming work not yet implemented.");if(n.child!==null){e=n.child,o=Tl(e,e.pendingProps),n.child=o;for(o.return=n;e.sibling!==null;)e=e.sibling,o=o.sibling=Tl(e,e.pendingProps),o.return=n;o.sibling=null}return n.child}function o0(e,n){if((e.lanes&n)!==0)return!0;return e=e.dependencies,e!==null&&Uh(e)?!0:!1}function BR(e,n,o){switch(n.tag){case 3:W(n,n.stateNode.containerInfo),ds(n,Gt,e.memoizedState.cache),xa();break;case 27:case 5:it(n);break;case 4:W(n,n.stateNode.containerInfo);break;case 10:ds(n,n.type,n.memoizedProps.value);break;case 12:(o&n.childLanes)!==0&&(n.flags|=4),n.flags|=2048;var a=n.stateNode;a.effectDuration=-0,a.passiveEffectDuration=-0;break;case 31:if(n.memoizedState!==null)return n.flags|=128,vg(n),null;break;case 13:if(a=n.memoizedState,a!==null){if(a.dehydrated!==null)return ys(n),n.flags|=128,null;if((o&n.child.childLanes)!==0)return Ew(e,n,o);return ys(n),e=Ol(e,n,o),e!==null?e.sibling:null}ys(n);break;case 19:var u=(e.flags&128)!==0;if(a=(o&n.childLanes)!==0,a||(kr(e,n,o,!1),a=(o&n.childLanes)!==0),u){if(a)return Dw(e,n,o);n.flags|=128}if(u=n.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),Be($t,$t.current,n),a)break;else return null;case 22:return n.lanes=0,ww(e,n,o,n.pendingProps);case 24:ds(n,Gt,e.memoizedState.cache)}return Ol(e,n,o)}function l0(e,n,o){if(n._debugNeedsRemount&&e!==null){o=tg(n.type,n.key,n.pendingProps,n._debugOwner||null,n.mode,n.lanes),o._debugStack=n._debugStack,o._debugTask=n._debugTask;var a=n.return;if(a===null)throw Error("Cannot swap the root fiber.");if(e.alternate=null,n.alternate=null,o.index=n.index,o.sibling=n.sibling,o.return=n.return,o.ref=n.ref,o._debugInfo=n._debugInfo,n===a.child)a.child=o;else{var u=a.child;if(u===null)throw Error("Expected parent to have a child.");for(;u.sibling!==n;)if(u=u.sibling,u===null)throw Error("Expected to find the previous sibling.");u.sibling=o}return n=a.deletions,n===null?(a.deletions=[e],a.flags|=16):n.push(e),o.flags|=2,o}if(e!==null)if(e.memoizedProps!==n.pendingProps||n.type!==e.type)Jt=!0;else{if(!o0(e,o)&&(n.flags&128)===0)return Jt=!1,BR(e,n,o);Jt=(e.flags&131072)!==0?!0:!1}else{if(Jt=!1,a=Le)fs(),a=(n.flags&1048576)!==0;a&&(a=n.index,fs(),pS(n,Jc,a))}switch(n.lanes=0,n.tag){case 16:e:if(a=n.pendingProps,e=ps(n.elementType),n.type=e,typeof e==="function")eg(e)?(a=Ma(e,a),n.tag=1,n.type=e=va(e),n=Aw(null,n,e,a,o)):(n.tag=0,Zg(n,e),n.type=e=va(e),n=Jg(null,n,e,a,o));else{if(e!==void 0&&e!==null){if(u=e.$$typeof,u===Uc){n.tag=11,n.type=e=Km(e),n=bw(null,n,e,a,o);break e}else if(u===Rd){n.tag=14,n=vw(null,n,e,a,o);break e}}throw n="",e!==null&&typeof e==="object"&&e.$$typeof===mi&&(n=" Did you wrap a component in React.lazy() more than once?"),o=Ie(e)||e,Error("Element type is invalid. Received a promise that resolves to: "+o+". Lazy element type must resolve to a class or function."+n)}return n;case 0:return Jg(e,n,n.type,n.pendingProps,o);case 1:return a=n.type,u=Ma(a,n.pendingProps),Aw(e,n,a,u,o);case 3:e:{if(W(n,n.stateNode.containerInfo),e===null)throw Error("Should have a current fiber. This is a bug in React.");a=n.pendingProps;var f=n.memoizedState;u=f.element,gg(e,n),bc(n,a,null,o);var p=n.memoizedState;if(a=p.cache,ds(n,Gt,a),a!==f.cache&&ug(n,[Gt],o,!0),yc(),a=p.element,f.isDehydrated)if(f={element:a,isDehydrated:!1,cache:p.cache},n.updateQueue.baseState=f,n.memoizedState=f,n.flags&256){n=Tw(e,n,a,o);break e}else if(a!==u){u=ui(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),n),fc(u),n=Tw(e,n,a,o);break e}else{switch(e=n.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}yt=pi(e.firstChild),vn=n,Le=!0,Rs=null,al=!1,bi=null,Vi=!0,o=IC(n,null,a,o);for(n.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling}else{if(xa(),a===u){n=Ol(e,n,o);break e}gn(e,n,a,o)}n=n.child}return n;case 26:return cd(e,n),e===null?(o=ek(n.type,null,n.pendingProps,null))?n.memoizedState=o:Le||(o=n.type,e=n.pendingProps,a=Gn(Cs.current),a=wd(a).createElement(o),a[bn]=n,a[Hn]=e,yn(a,o,e),Mt(a),n.stateNode=a):n.memoizedState=ek(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return it(n),e===null&&Le&&(a=Gn(Cs.current),u=de(),a=n.stateNode=Zx(n.type,n.pendingProps,a,u,!1),al||(u=Vx(a,n.type,n.pendingProps,u),u!==null&&(wa(n,0).serverProps=u)),vn=n,Vi=!0,u=yt,xs(n.type)?(db=u,yt=pi(a.firstChild)):yt=u),gn(e,n,n.pendingProps.children,o),cd(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Le&&(f=de(),a=Ym(n.type,f.ancestorInfo),u=yt,(p=!u)||(p=wL(u,n.type,n.pendingProps,Vi),p!==null?(n.stateNode=p,al||(f=Vx(p,n.type,n.pendingProps,f),f!==null&&(wa(n,0).serverProps=f)),vn=n,yt=pi(p.firstChild),Vi=!1,f=!0):f=!1,p=!f),p&&(a&&Nh(n,u),hs(n))),it(n),u=n.type,f=n.pendingProps,p=e!==null?e.memoizedProps:null,a=f.children,O0(u,f)?a=null:p!==null&&O0(u,p)&&(n.flags|=32),n.memoizedState!==null&&(u=wg(e,n,AR,null,null,o),Rf._currentValue=u),cd(e,n),gn(e,n,a,o),n.child;case 6:return e===null&&Le&&(o=n.pendingProps,e=de(),a=e.ancestorInfo.current,o=a!=null?Th(o,a.tag,e.ancestorInfo.implicitRootScope):!0,e=yt,(a=!e)||(a=xL(e,n.pendingProps,Vi),a!==null?(n.stateNode=a,vn=n,yt=null,a=!0):a=!1,a=!a),a&&(o&&Nh(n,e),hs(n))),null;case 13:return Ew(e,n,o);case 4:return W(n,n.stateNode.containerInfo),a=n.pendingProps,e===null?n.child=ja(n,null,a,o):gn(e,n,a,o),n.child;case 11:return bw(e,n,n.type,n.pendingProps,o);case 7:return gn(e,n,n.pendingProps,o),n.child;case 8:return gn(e,n,n.pendingProps.children,o),n.child;case 12:return n.flags|=4,n.flags|=2048,a=n.stateNode,a.effectDuration=-0,a.passiveEffectDuration=-0,gn(e,n,n.pendingProps.children,o),n.child;case 10:return a=n.type,u=n.pendingProps,f=u.value,"value"in u||pA||(pA=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),ds(n,a,f),gn(e,n,u.children,o),n.child;case 9:return u=n.type._context,a=n.pendingProps.children,typeof a!=="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."),ka(n),u=wt(u),a=Ry(a,u,void 0),n.flags|=1,gn(e,n,a,o),n.child;case 14:return vw(e,n,n.type,n.pendingProps,o);case 15:return Sw(e,n,n.type,n.pendingProps,o);case 19:return Dw(e,n,o);case 31:return LR(e,n,o);case 22:return ww(e,n,o,n.pendingProps);case 24:return ka(n),a=wt(Gt),e===null?(u=dg(),u===null&&(u=ut,f=cg(),u.pooledCache=f,Ca(f),f!==null&&(u.pooledCacheLanes|=o),u=f),n.memoizedState={parent:a,cache:u},mg(n),ds(n,Gt,u)):((e.lanes&o)!==0&&(gg(e,n),bc(n,null,null,o),yc()),u=e.memoizedState,f=n.memoizedState,u.parent!==a?(u={parent:a,cache:a},n.memoizedState=u,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=u),ds(n,Gt,a)):(a=f.cache,ds(n,Gt,a),a!==u.cache&&ug(n,[Gt],o,!0))),gn(e,n,n.pendingProps.children,o),n.child;case 29:throw n.pendingProps}throw Error("Unknown unit of work tag ("+n.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function Rl(e){e.flags|=4}function s0(e,n,o,a,u){if(n=(e.mode&KB)!==pe)n=!1;if(n){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(rx())e.flags|=8192;else throw Va=ip,By}else e.flags&=-16777217}function Ow(e,n){if(n.type!=="stylesheet"||(n.state.loading&Yi)!==Za)e.flags&=-16777217;else if(e.flags|=16777216,!lk(n))if(rx())e.flags|=8192;else throw Va=ip,By}function hd(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?io():536870912,e.lanes|=n,Xa|=n)}function kc(e,n){if(!Le)switch(e.tailMode){case"hidden":n=e.tail;for(var o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?e.tail=null:o.sibling=null;break;case"collapsed":o=e.tail;for(var a=null;o!==null;)o.alternate!==null&&(a=o),o=o.sibling;a===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function ht(e){var n=e.alternate!==null&&e.alternate.child===e.child,o=0,a=0;if(n)if((e.mode&we)!==pe){for(var{selfBaseDuration:u,child:f}=e;f!==null;)o|=f.lanes|f.childLanes,a|=f.subtreeFlags&65011712,a|=f.flags&65011712,u+=f.treeBaseDuration,f=f.sibling;e.treeBaseDuration=u}else for(u=e.child;u!==null;)o|=u.lanes|u.childLanes,a|=u.subtreeFlags&65011712,a|=u.flags&65011712,u.return=e,u=u.sibling;else if((e.mode&we)!==pe){u=e.actualDuration,f=e.selfBaseDuration;for(var p=e.child;p!==null;)o|=p.lanes|p.childLanes,a|=p.subtreeFlags,a|=p.flags,u+=p.actualDuration,f+=p.treeBaseDuration,p=p.sibling;e.actualDuration=u,e.treeBaseDuration=f}else for(u=e.child;u!==null;)o|=u.lanes|u.childLanes,a|=u.subtreeFlags,a|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=a,e.childLanes=o,n}function zR(e,n,o){var a=n.pendingProps;switch(lg(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ht(n),null;case 1:return ht(n),null;case 3:if(o=n.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),Ml(Gt,n),he(n),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),e===null||e.child===null)xr(n)?(ag(),Rl(n)):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,sg());return ht(n),null;case 26:var{type:u,memoizedState:f}=n;return e===null?(Rl(n),f!==null?(ht(n),Ow(n,f)):(ht(n),s0(n,u,null,a,o))):f?f!==e.memoizedState?(Rl(n),ht(n),Ow(n,f)):(ht(n),n.flags&=-16777217):(e=e.memoizedProps,e!==a&&Rl(n),ht(n),s0(n,u,e,a,o)),null;case 27:if($e(n),o=Gn(Cs.current),u=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==a&&Rl(n);else{if(!a){if(n.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 ht(n),null}e=de(),xr(n)?bS(n,e):(e=Zx(u,a,o,e,!0),n.stateNode=e,Rl(n))}return ht(n),null;case 5:if($e(n),u=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==a&&Rl(n);else{if(!a){if(n.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 ht(n),null}var p=de();if(xr(n))bS(n,p);else{switch(f=Gn(Cs.current),Ym(u,p.ancestorInfo),p=p.context,f=wd(f),p){case bu:f=f.createElementNS(Ir,u);break;case Dp:f=f.createElementNS(Ud,u);break;default:switch(u){case"svg":f=f.createElementNS(Ir,u);break;case"math":f=f.createElementNS(Ud,u);break;case"script":f=f.createElement("div"),f.innerHTML="<script></script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof a.is==="string"?f.createElement("select",{is:a.is}):f.createElement("select"),a.multiple?f.multiple=!0:a.size&&(f.size=a.size);break;default:f=typeof a.is==="string"?f.createElement(u,{is:a.is}):f.createElement(u),u.indexOf("-")===-1&&(u!==u.toLowerCase()&&console.error("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",u),Object.prototype.toString.call(f)!=="[object HTMLUnknownElement]"||fo.call(UA,u)||(UA[u]=!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.",u)))}}f[bn]=n,f[Hn]=a;e:for(p=n.child;p!==null;){if(p.tag===5||p.tag===6)f.appendChild(p.stateNode);else if(p.tag!==4&&p.tag!==27&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===n)break e;for(;p.sibling===null;){if(p.return===null||p.return===n)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}n.stateNode=f;e:switch(yn(f,u,a),u){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Rl(n)}}return ht(n),s0(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,o),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==a&&Rl(n);else{if(typeof a!=="string"&&n.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(e=Gn(Cs.current),o=de(),xr(n)){if(e=n.stateNode,o=n.memoizedProps,u=!al,a=null,f=vn,f!==null)switch(f.tag){case 3:u&&(u=Fx(e,o,a),u!==null&&(wa(n,0).serverProps=u));break;case 27:case 5:a=f.memoizedProps,u&&(u=Fx(e,o,a),u!==null&&(wa(n,0).serverProps=u))}e[bn]=n,e=e.nodeValue===o||a!==null&&a.suppressHydrationWarning===!0||Hx(e.nodeValue,o)?!0:!1,e||hs(n,!0)}else u=o.ancestorInfo.current,u!=null&&Th(a,u.tag,o.ancestorInfo.implicitRootScope),e=wd(e).createTextNode(a),e[bn]=n,n.stateNode=e}return ht(n),null;case 31:if(o=n.memoizedState,e===null||e.memoizedState!==null){if(a=xr(n),o!==null){if(e===null){if(!a)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue.");e[bn]=n,ht(n),(n.mode&we)!==pe&&o!==null&&(e=n.child,e!==null&&(n.treeBaseDuration-=e.treeBaseDuration))}else ag(),xa(),(n.flags&128)===0&&(o=n.memoizedState=null),n.flags|=4,ht(n),(n.mode&we)!==pe&&o!==null&&(e=n.child,e!==null&&(n.treeBaseDuration-=e.treeBaseDuration));e=!1}else o=sg(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),e=!0;if(!e){if(n.flags&256)return hi(n),n;return hi(n),null}if((n.flags&128)!==0)throw Error("Client rendering an Activity suspended it again. This is a bug in React.")}return ht(n),null;case 13:if(a=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=a,f=xr(n),u!==null&&u.dehydrated!==null){if(e===null){if(!f)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");f[bn]=n,ht(n),(n.mode&we)!==pe&&u!==null&&(u=n.child,u!==null&&(n.treeBaseDuration-=u.treeBaseDuration))}else ag(),xa(),(n.flags&128)===0&&(u=n.memoizedState=null),n.flags|=4,ht(n),(n.mode&we)!==pe&&u!==null&&(u=n.child,u!==null&&(n.treeBaseDuration-=u.treeBaseDuration));u=!1}else u=sg(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u){if(n.flags&256)return hi(n),n;return hi(n),null}}if(hi(n),(n.flags&128)!==0)return n.lanes=o,(n.mode&we)!==pe&&pc(n),n;return o=a!==null,e=e!==null&&e.memoizedState!==null,o&&(a=n.child,u=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(u=a.alternate.memoizedState.cachePool.pool),f=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(f=a.memoizedState.cachePool.pool),f!==u&&(a.flags|=2048)),o!==e&&o&&(n.child.flags|=8192),hd(n,n.updateQueue),ht(n),(n.mode&we)!==pe&&o&&(e=n.child,e!==null&&(n.treeBaseDuration-=e.treeBaseDuration)),null;case 4:return he(n),e===null&&k0(n.stateNode.containerInfo),ht(n),null;case 10:return Ml(n.type,n),ht(n),null;case 19:if(Ne($t,n),a=n.memoizedState,a===null)return ht(n),null;if(u=(n.flags&128)!==0,f=a.rendering,f===null)if(u)kc(a,!1);else{if(Ot!==Xl||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(f=Wh(e),f!==null){n.flags|=128,kc(a,!1),e=f.updateQueue,n.updateQueue=e,hd(n,e),n.subtreeFlags=0,e=o;for(o=n.child;o!==null;)hS(o,e),o=o.sibling;return Be($t,$t.current&su|df,n),Le&&El(n,a.treeForkCount),n.child}e=e.sibling}a.tail!==null&&cn()>gp&&(n.flags|=128,u=!0,kc(a,!1),n.lanes=4194304)}else{if(!u)if(e=Wh(f),e!==null){if(n.flags|=128,u=!0,e=e.updateQueue,n.updateQueue=e,hd(n,e),kc(a,!0),a.tail===null&&a.tailMode==="hidden"&&!f.alternate&&!Le)return ht(n),null}else 2*cn()-a.renderingStartTime>gp&&o!==536870912&&(n.flags|=128,u=!0,kc(a,!1),n.lanes=4194304);a.isBackwards?(f.sibling=n.child,n.child=f):(e=a.last,e!==null?e.sibling=f:n.child=f,a.last=f)}if(a.tail!==null)return e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=cn(),e.sibling=null,o=$t.current,o=u?o&su|df:o&su,Be($t,o,n),Le&&El(n,a.treeForkCount),e;return ht(n),null;case 22:case 23:return hi(n),bg(n),a=n.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(n.flags|=8192):a&&(n.flags|=8192),a?(o&536870912)!==0&&(n.flags&128)===0&&(ht(n),n.subtreeFlags&6&&(n.flags|=8192)):ht(n),o=n.updateQueue,o!==null&&hd(n,o.retryQueue),o=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(o=e.memoizedState.cachePool.pool),a=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(a=n.memoizedState.cachePool.pool),a!==o&&(n.flags|=2048),e!==null&&Ne(Ua,n),null;case 24:return o=null,e!==null&&(o=e.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),Ml(Gt,n),ht(n),null;case 25:return null;case 30:return null}throw Error("Unknown unit of work tag ("+n.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function HR(e,n){switch(lg(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,(n.mode&we)!==pe&&pc(n),n):null;case 3:return Ml(Gt,n),he(n),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return $e(n),null;case 31:if(n.memoizedState!==null){if(hi(n),n.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");xa()}return e=n.flags,e&65536?(n.flags=e&-65537|128,(n.mode&we)!==pe&&pc(n),n):null;case 13:if(hi(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");xa()}return e=n.flags,e&65536?(n.flags=e&-65537|128,(n.mode&we)!==pe&&pc(n),n):null;case 19:return Ne($t,n),null;case 4:return he(n),null;case 10:return Ml(n.type,n),null;case 22:case 23:return hi(n),bg(n),e!==null&&Ne(Ua,n),e=n.flags,e&65536?(n.flags=e&-65537|128,(n.mode&we)!==pe&&pc(n),n):null;case 24:return Ml(Gt,n),null;case 25:return null;default:return null}}function Rw(e,n){switch(lg(n),n.tag){case 3:Ml(Gt,n),he(n);break;case 26:case 27:case 5:$e(n);break;case 4:he(n);break;case 31:n.memoizedState!==null&&hi(n);break;case 13:hi(n);break;case 19:Ne($t,n);break;case 10:Ml(n.type,n);break;case 22:case 23:hi(n),bg(n),e!==null&&Ne(Ua,n);break;case 24:Ml(Gt,n)}}function Go(e){return(e.mode&we)!==pe}function Lw(e,n){Go(e)?(Qo(),Cc(n,e),Xo()):Cc(n,e)}function a0(e,n,o){Go(e)?(Qo(),Mr(o,e,n),Xo()):Mr(o,e,n)}function Cc(e,n){try{var o=n.updateQueue,a=o!==null?o.lastEffect:null;if(a!==null){var u=a.next;o=u;do{if((o.tag&e)===e&&(a=void 0,(e&qn)!==lp&&(mu=!0),a=Y(n,oz,o),(e&qn)!==lp&&(mu=!1),a!==void 0&&typeof a!=="function")){var f=void 0;f=(o.tag&Si)!==0?"useLayoutEffect":(o.tag&qn)!==0?"useInsertionEffect":"useEffect";var p=void 0;p=a===null?" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof a.then==="function"?`
125
125
 
126
126
  It looks like you wrote `+f+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
127
127
 
@@ -134,11 +134,11 @@ It looks like you wrote `+f+`(async () => ...) or returned a Promise. Instead, w
134
134
  fetchData();
135
135
  }, [someId]); // Or [] if effect doesn't need props or state
136
136
 
137
- Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching`:" You returned: "+a,Y(n,function(g,v){console.error("%s must not return anything besides a function, which is used for clean-up.%s",g,v)},f,p)}o=o.next}while(o!==u)}}catch(g){Je(n,n.return,g)}}function Ar(e,n,o){try{var a=n.updateQueue,u=a!==null?a.lastEffect:null;if(u!==null){var f=u.next;a=f;do{if((a.tag&e)===e){var p=a.inst,g=p.destroy;g!==void 0&&(p.destroy=void 0,(e&Vn)!==ip&&(hu=!0),u=n,Y(u,oz,u,o,g),(e&Vn)!==ip&&(hu=!1))}a=a.next}while(a!==f)}}catch(v){Je(n,n.return,v)}}function Bw(e,n){Go(e)?(Qo(),xc(n,e),Xo()):xc(n,e)}function r0(e,n,o){Go(e)?(Qo(),Ar(o,e,n),Xo()):Ar(o,e,n)}function zw(e){var n=e.updateQueue;if(n!==null){var o=e.stateNode;e.type.defaultProps||"ref"in e.memoizedProps||au||(o.props!==e.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.",P(e)||"instance"),o.state!==e.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.",P(e)||"instance"));try{Y(e,NS,n,o)}catch(a){Je(e,e.return,a)}}}function HR(e,n,o){return e.getSnapshotBeforeUpdate(n,o)}function NR(e,n){var{memoizedProps:o,memoizedState:a}=n;n=e.stateNode,e.type.defaultProps||"ref"in e.memoizedProps||au||(n.props!==e.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.",P(e)||"instance"),n.state!==e.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.",P(e)||"instance"));try{var u=ka(e.type,o),f=Y(e,HR,n,u,a);o=mA,f!==void 0||o.has(e.type)||(o.add(e.type),Y(e,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",P(e))})),n.__reactInternalSnapshotBeforeUpdate=f}catch(p){Je(e,e.return,p)}}function Hw(e,n,o){o.props=ka(e.type,e.memoizedProps),o.state=e.memoizedState,Go(e)?(Qo(),Y(e,zC,e,n,o),Xo()):Y(e,zC,e,n,o)}function _R(e){var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}if(typeof n==="function")if(Go(e))try{Qo(),e.refCleanup=n(o)}finally{Xo()}else e.refCleanup=n(o);else typeof n==="string"?console.error("String refs are no longer supported."):n.hasOwnProperty("current")||console.error("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",P(e)),n.current=o}}function kc(e,n){try{Y(e,_R,e)}catch(o){Je(e,n,o)}}function Wo(e,n){var{ref:o,refCleanup:a}=e;if(o!==null)if(typeof a==="function")try{if(Go(e))try{Qo(),Y(e,a)}finally{Xo(e)}else Y(e,a)}catch(u){Je(e,n,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof o==="function")try{if(Go(e))try{Qo(),Y(e,o,null)}finally{Xo(e)}else Y(e,o,null)}catch(u){Je(e,n,u)}else o.current=null}function Nw(e,n,o,a){var u=e.memoizedProps,f=u.id,p=u.onCommit;u=u.onRender,n=n===null?"mount":"update",Jd&&(n="nested-update"),typeof u==="function"&&u(f,n,e.actualDuration,e.treeBaseDuration,e.actualStartTime,o),typeof p==="function"&&p(f,n,a,o)}function UR(e,n,o,a){var u=e.memoizedProps;e=u.id,u=u.onPostCommit,n=n===null?"mount":"update",Jd&&(n="nested-update"),typeof u==="function"&&u(e,n,a,o)}function _w(e){var{type:n,memoizedProps:o,stateNode:a}=e;try{Y(e,rL,a,n,o,e)}catch(u){Je(e,e.return,u)}}function u0(e,n,o){try{Y(e,cL,e.stateNode,e.type,o,n,e)}catch(a){Je(e,e.return,a)}}function Uw(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ss(e.type)||e.tag===4}function c0(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Uw(e.return))return null;e=e.return}e.sibling.return=e.return;for(e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ss(e.type))continue e;if(e.flags&2)continue e;if(e.child===null||e.tag===4)continue e;else e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function f0(e,n,o){var a=e.tag;if(a===5||a===6)e=e.stateNode,n?(Yx(o),(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(e,n)):(Yx(o),n=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,n.appendChild(e),o=o._reactRootContainer,o!==null&&o!==void 0||n.onclick!==null||(n.onclick=Cl));else if(a!==4&&(a===27&&Ss(e.type)&&(o=e.stateNode,n=null),e=e.child,e!==null))for(f0(e,n,o),e=e.sibling;e!==null;)f0(e,n,o),e=e.sibling}function fd(e,n,o){var a=e.tag;if(a===5||a===6)e=e.stateNode,n?o.insertBefore(e,n):o.appendChild(e);else if(a!==4&&(a===27&&Ss(e.type)&&(o=e.stateNode),e=e.child,e!==null))for(fd(e,n,o),e=e.sibling;e!==null;)fd(e,n,o),e=e.sibling}function qR(e){for(var n,o=e.return;o!==null;){if(Uw(o)){n=o;break}o=o.return}if(n==null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");switch(n.tag){case 27:n=n.stateNode,o=c0(e),fd(e,o,n);break;case 5:o=n.stateNode,n.flags&32&&(Px(o),n.flags&=-33),n=c0(e),fd(e,n,o);break;case 3:case 4:n=n.stateNode.containerInfo,o=c0(e),f0(e,o,n);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function qw(e){var{stateNode:n,memoizedProps:o}=e;try{Y(e,TL,e.type,o,n,e)}catch(a){Je(e,e.return,a)}}function Vw(e,n){return n.tag===31?(n=n.memoizedState,e.memoizedState!==null&&n===null):n.tag===13?(e=e.memoizedState,n=n.memoizedState,e!==null&&e.dehydrated!==null&&(n===null||n.dehydrated===null)):n.tag===3?e.memoizedState.isDehydrated&&(n.flags&256)===0:!1}function VR(e,n){if(e=e.containerInfo,cb=Rp,e=nS(e),Gm(e)){if("selectionStart"in e)var o={start:e.selectionStart,end:e.selectionEnd};else e:{o=(o=e.ownerDocument)&&o.defaultView||window;var a=o.getSelection&&o.getSelection();if(a&&a.rangeCount!==0){o=a.anchorNode;var{anchorOffset:u,focusNode:f}=a;a=a.focusOffset;try{o.nodeType,f.nodeType}catch(X){o=null;break e}var p=0,g=-1,v=-1,x=0,D=0,O=e,A=null;t:for(;;){for(var B;;){if(O!==o||u!==0&&O.nodeType!==3||(g=p+u),O!==f||a!==0&&O.nodeType!==3||(v=p+a),O.nodeType===3&&(p+=O.nodeValue.length),(B=O.firstChild)===null)break;A=O,O=B}for(;;){if(O===e)break t;if(A===o&&++x===u&&(g=p),A===f&&++D===a&&(v=p),(B=O.nextSibling)!==null)break;O=A,A=O.parentNode}O=B}o=g===-1||v===-1?null:{start:g,end:v}}else o=null}o=o||{start:0,end:0}}else o=null;fb={focusedElem:e,selectionRange:o},Rp=!1;for(dn=n;dn!==null;)if(n=dn,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,dn=e;else for(;dn!==null;){switch(e=n=dn,o=e.alternate,u=e.flags,e.tag){case 0:if((u&4)!==0&&(e=e.updateQueue,e=e!==null?e.events:null,e!==null))for(o=0;o<e.length;o++)u=e[o],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:(u&1024)!==0&&o!==null&&NR(e,o);break;case 3:if((u&1024)!==0){if(e=e.stateNode.containerInfo,o=e.nodeType,o===9)R0(e);else if(o===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":R0(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((u&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(e=n.sibling,e!==null){e.return=n.return,dn=e;break}dn=n.return}}function Iw(e,n,o){var a=hi(),u=jo(),f=Po(),p=Yo(),g=o.flags;switch(o.tag){case 0:case 11:case 15:Fo(e,o),g&4&&Lw(o,xi|Pi);break;case 1:if(Fo(e,o),g&4)if(e=o.stateNode,n===null)o.type.defaultProps||"ref"in o.memoizedProps||au||(e.props!==o.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.",P(o)||"instance"),e.state!==o.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.",P(o)||"instance")),Go(o)?(Qo(),Y(o,Ly,o,e),Xo()):Y(o,Ly,o,e);else{var v=ka(o.type,n.memoizedProps);n=n.memoizedState,o.type.defaultProps||"ref"in o.memoizedProps||au||(e.props!==o.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.",P(o)||"instance"),e.state!==o.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.",P(o)||"instance")),Go(o)?(Qo(),Y(o,RC,o,e,v,n,e.__reactInternalSnapshotBeforeUpdate),Xo()):Y(o,RC,o,e,v,n,e.__reactInternalSnapshotBeforeUpdate)}g&64&&zw(o),g&512&&kc(o,o.return);break;case 3:if(n=Ml(),Fo(e,o),g&64&&(g=o.updateQueue,g!==null)){if(v=null,o.child!==null)switch(o.child.tag){case 27:case 5:v=o.child.stateNode;break;case 1:v=o.child.stateNode}try{Y(o,NS,g,v)}catch(D){Je(o,o.return,D)}}e.effectDuration+=Uh(n);break;case 27:n===null&&g&4&&qw(o);case 26:case 5:if(Fo(e,o),n===null){if(g&4)_w(o);else if(g&64){e=o.type,n=o.memoizedProps,v=o.stateNode;try{Y(o,uL,v,e,n,o)}catch(D){Je(o,o.return,D)}}}g&512&&kc(o,o.return);break;case 12:if(g&4){g=Ml(),Fo(e,o),e=o.stateNode,e.effectDuration+=fc(g);try{Y(o,Nw,o,n,Os,e.effectDuration)}catch(D){Je(o,o.return,D)}}else Fo(e,o);break;case 31:Fo(e,o),g&4&&Pw(e,o);break;case 13:Fo(e,o),g&4&&Yw(e,o),g&64&&(e=o.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(g=WR.bind(null,o),xL(e,g))));break;case 22:if(g=o.memoizedState!==null||Pl,!g){n=n!==null&&n.memoizedState!==null||Kt,v=Pl;var x=Kt;Pl=g,(Kt=n)&&!x?(Jo(e,o,(o.subtreeFlags&8772)!==0),(o.mode&we)!==pe&&0<=se&&0<=ue&&0.05<ue-se&&Mh(o,se,ue)):Fo(e,o),Pl=v,Kt=x}break;case 30:break;default:Fo(e,o)}(o.mode&we)!==pe&&0<=se&&0<=ue&&((zt||0.05<Dt)&&Vo(o,se,ue,Dt,xt),o.alternate===null&&o.return!==null&&o.return.alternate!==null&&0.05<ue-se&&(Vw(o.return.alternate,o.return)||qo(o,se,ue,"Mount"))),di(a),$o(u),xt=f,zt=p}function jw(e){var n=e.alternate;n!==null&&(e.alternate=null,jw(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&dr(n)),e.stateNode=null,e._debugOwner=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Rl(e,n,o){for(o=o.child;o!==null;)$w(e,n,o),o=o.sibling}function $w(e,n,o){if(Tn&&typeof Tn.onCommitFiberUnmount==="function")try{Tn.onCommitFiberUnmount(_r,o)}catch(x){il||(il=!0,console.error("React instrumentation encountered an error: %o",x))}var a=hi(),u=jo(),f=Po(),p=Yo();switch(o.tag){case 26:Kt||Wo(o,n),Rl(e,n,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(e=o.stateNode,e.parentNode.removeChild(e));break;case 27:Kt||Wo(o,n);var g=en,v=ni;Ss(o.type)&&(en=o.stateNode,ni=!1),Rl(e,n,o),Y(o,Lc,o.stateNode),en=g,ni=v;break;case 5:Kt||Wo(o,n);case 6:if(g=en,v=ni,en=null,Rl(e,n,o),en=g,ni=v,en!==null)if(ni)try{Y(o,dL,en,o.stateNode)}catch(x){Je(o,n,x)}else try{Y(o,hL,en,o.stateNode)}catch(x){Je(o,n,x)}break;case 18:en!==null&&(ni?(e=en,Xx(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,o.stateNode),Br(e)):Xx(en,o.stateNode));break;case 4:g=en,v=ni,en=o.stateNode.containerInfo,ni=!0,Rl(e,n,o),en=g,ni=v;break;case 0:case 11:case 14:case 15:Ar(Vn,o,n),Kt||a0(o,n,xi),Rl(e,n,o);break;case 1:Kt||(Wo(o,n),g=o.stateNode,typeof g.componentWillUnmount==="function"&&Hw(o,n,g)),Rl(e,n,o);break;case 21:Rl(e,n,o);break;case 22:Kt=(g=Kt)||o.memoizedState!==null,Rl(e,n,o),Kt=g;break;default:Rl(e,n,o)}(o.mode&we)!==pe&&0<=se&&0<=ue&&(zt||0.05<Dt)&&Vo(o,se,ue,Dt,xt),di(a),$o(u),xt=f,zt=p}function Pw(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Y(n,CL,e)}catch(o){Je(n,n.return,o)}}}function Yw(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Y(n,AL,e)}catch(o){Je(n,n.return,o)}}function IR(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new gA),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new gA),n;default:throw Error("Unexpected Suspense handler tag ("+e.tag+"). This is a bug in React.")}}function hd(e,n){var o=IR(e);n.forEach(function(a){if(!o.has(a)){if(o.add(a),ol)if(ru!==null&&uu!==null)Ec(uu,ru);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");var u=FR.bind(null,e,a);a.then(u,u)}})}function ei(e,n){var o=n.deletions;if(o!==null)for(var a=0;a<o.length;a++){var u=e,f=n,p=o[a],g=hi(),v=f;e:for(;v!==null;){switch(v.tag){case 27:if(Ss(v.type)){en=v.stateNode,ni=!1;break e}break;case 5:en=v.stateNode,ni=!1;break e;case 3:case 4:en=v.stateNode.containerInfo,ni=!0;break e}v=v.return}if(en===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");$w(u,f,p),en=null,ni=!1,(p.mode&we)!==pe&&0<=se&&0<=ue&&0.05<ue-se&&qo(p,se,ue,"Unmount"),di(g),u=p,f=u.alternate,f!==null&&(f.return=null),u.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)Xw(n,e),n=n.sibling}function Xw(e,n){var o=hi(),a=jo(),u=Po(),f=Yo(),p=e.alternate,g=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ei(n,e),ti(e),g&4&&(Ar(Vn|Pi,e,e.return),xc(Vn|Pi,e),a0(e,e.return,xi|Pi));break;case 1:if(ei(n,e),ti(e),g&512&&(Kt||p===null||Wo(p,p.return)),g&64&&Pl&&(g=e.updateQueue,g!==null&&(p=g.callbacks,p!==null))){var v=g.shared.hiddenCallbacks;g.shared.hiddenCallbacks=v===null?p:v.concat(p)}break;case 26:if(v=bo,ei(n,e),ti(e),g&512&&(Kt||p===null||Wo(p,p.return)),g&4){var x=p!==null?p.memoizedState:null;if(g=e.memoizedState,p===null)if(g===null)if(e.stateNode===null){e:{g=e.type,p=e.memoizedProps,v=v.ownerDocument||v;t:switch(g){case"title":if(x=v.getElementsByTagName("title")[0],!x||x[qc]||x[vn]||x.namespaceURI===qr||x.hasAttribute("itemprop"))x=v.createElement(g),v.head.insertBefore(x,v.querySelector("head > title"));bn(x,g,p),x[vn]=e,Mt(x),g=x;break e;case"link":var D=ik("link","href",v).get(g+(p.href||""));if(D){for(var O=0;O<D.length;O++)if(x=D[O],x.getAttribute("href")===(p.href==null||p.href===""?null:p.href)&&x.getAttribute("rel")===(p.rel==null?null:p.rel)&&x.getAttribute("title")===(p.title==null?null:p.title)&&x.getAttribute("crossorigin")===(p.crossOrigin==null?null:p.crossOrigin)){D.splice(O,1);break t}}x=v.createElement(g),bn(x,g,p),v.head.appendChild(x);break;case"meta":if(D=ik("meta","content",v).get(g+(p.content||""))){for(O=0;O<D.length;O++)if(x=D[O],be(p.content,"content"),x.getAttribute("content")===(p.content==null?null:""+p.content)&&x.getAttribute("name")===(p.name==null?null:p.name)&&x.getAttribute("property")===(p.property==null?null:p.property)&&x.getAttribute("http-equiv")===(p.httpEquiv==null?null:p.httpEquiv)&&x.getAttribute("charset")===(p.charSet==null?null:p.charSet)){D.splice(O,1);break t}}x=v.createElement(g),bn(x,g,p),v.head.appendChild(x);break;default:throw Error('getNodesForType encountered a type it did not expect: "'+g+'". This is a bug in React.')}x[vn]=e,Mt(x),g=x}e.stateNode=g}else ok(v,e.type,e.stateNode);else e.stateNode=nk(v,g,e.memoizedProps);else x!==g?(x===null?p.stateNode!==null&&(p=p.stateNode,p.parentNode.removeChild(p)):x.count--,g===null?ok(v,e.type,e.stateNode):nk(v,g,e.memoizedProps)):g===null&&e.stateNode!==null&&u0(e,e.memoizedProps,p.memoizedProps)}break;case 27:ei(n,e),ti(e),g&512&&(Kt||p===null||Wo(p,p.return)),p!==null&&g&4&&u0(e,e.memoizedProps,p.memoizedProps);break;case 5:if(ei(n,e),ti(e),g&512&&(Kt||p===null||Wo(p,p.return)),e.flags&32){v=e.stateNode;try{Y(e,Px,v)}catch(Z){Je(e,e.return,Z)}}g&4&&e.stateNode!=null&&(v=e.memoizedProps,u0(e,v,p!==null?p.memoizedProps:v)),g&1024&&(Yy=!0,e.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."));break;case 6:if(ei(n,e),ti(e),g&4){if(e.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.");g=e.memoizedProps,p=p!==null?p.memoizedProps:g,v=e.stateNode;try{Y(e,fL,v,p,g)}catch(Z){Je(e,e.return,Z)}}break;case 3:if(v=Ml(),Mp=null,x=bo,bo=Sd(n.containerInfo),ei(n,e),bo=x,ti(e),g&4&&p!==null&&p.memoizedState.isDehydrated)try{Y(e,kL,n.containerInfo)}catch(Z){Je(e,e.return,Z)}Yy&&(Yy=!1,Qw(e)),n.effectDuration+=Uh(v);break;case 4:g=bo,bo=Sd(e.stateNode.containerInfo),ei(n,e),ti(e),bo=g;break;case 12:g=Ml(),ei(n,e),ti(e),e.stateNode.effectDuration+=fc(g);break;case 31:ei(n,e),ti(e),g&4&&(g=e.updateQueue,g!==null&&(e.updateQueue=null,hd(e,g)));break;case 13:ei(n,e),ti(e),e.child.flags&8192&&e.memoizedState!==null!==(p!==null&&p.memoizedState!==null)&&(dp=fn()),g&4&&(g=e.updateQueue,g!==null&&(e.updateQueue=null,hd(e,g)));break;case 22:v=e.memoizedState!==null;var A=p!==null&&p.memoizedState!==null,B=Pl,X=Kt;if(Pl=B||v,Kt=X||A,ei(n,e),Kt=X,Pl=B,A&&!v&&!B&&!X&&(e.mode&we)!==pe&&0<=se&&0<=ue&&0.05<ue-se&&Mh(e,se,ue),ti(e),g&8192)e:for(n=e.stateNode,n._visibility=v?n._visibility&~Gc:n._visibility|Gc,!v||p===null||A||Pl||Kt||(Ca(e),(e.mode&we)!==pe&&0<=se&&0<=ue&&0.05<ue-se&&qo(e,se,ue,"Disconnect")),p=null,n=e;;){if(n.tag===5||n.tag===26){if(p===null){A=p=n;try{x=A.stateNode,v?Y(A,mL,x):Y(A,bL,A.stateNode,A.memoizedProps)}catch(Z){Je(A,A.return,Z)}}}else if(n.tag===6){if(p===null){A=n;try{D=A.stateNode,v?Y(A,gL,D):Y(A,vL,D,A.memoizedProps)}catch(Z){Je(A,A.return,Z)}}}else if(n.tag===18){if(p===null){A=n;try{O=A.stateNode,v?Y(A,pL,O):Y(A,yL,A.stateNode)}catch(Z){Je(A,A.return,Z)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;p===n&&(p=null),n=n.return}p===n&&(p=null),n.sibling.return=n.return,n=n.sibling}g&4&&(g=e.updateQueue,g!==null&&(p=g.retryQueue,p!==null&&(g.retryQueue=null,hd(e,p))));break;case 19:ei(n,e),ti(e),g&4&&(g=e.updateQueue,g!==null&&(e.updateQueue=null,hd(e,g)));break;case 30:break;case 21:break;default:ei(n,e),ti(e)}(e.mode&we)!==pe&&0<=se&&0<=ue&&((zt||0.05<Dt)&&Vo(e,se,ue,Dt,xt),e.alternate===null&&e.return!==null&&e.return.alternate!==null&&0.05<ue-se&&(Vw(e.return.alternate,e.return)||qo(e,se,ue,"Mount"))),di(o),$o(a),xt=u,zt=f}function ti(e){var n=e.flags;if(n&2){try{Y(e,qR,e)}catch(o){Je(e,e.return,o)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Qw(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;Qw(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function Fo(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)Iw(e,n.alternate,n),n=n.sibling}function Gw(e){var n=hi(),o=jo(),a=Po(),u=Yo();switch(e.tag){case 0:case 11:case 14:case 15:a0(e,e.return,xi),Ca(e);break;case 1:Wo(e,e.return);var f=e.stateNode;typeof f.componentWillUnmount==="function"&&Hw(e,e.return,f),Ca(e);break;case 27:Y(e,Lc,e.stateNode);case 26:case 5:Wo(e,e.return),Ca(e);break;case 22:e.memoizedState===null&&Ca(e);break;case 30:Ca(e);break;default:Ca(e)}(e.mode&we)!==pe&&0<=se&&0<=ue&&(zt||0.05<Dt)&&Vo(e,se,ue,Dt,xt),di(n),$o(o),xt=a,zt=u}function Ca(e){for(e=e.child;e!==null;)Gw(e),e=e.sibling}function Ww(e,n,o,a){var u=hi(),f=jo(),p=Po(),g=Yo(),v=o.flags;switch(o.tag){case 0:case 11:case 15:Jo(e,o,a),Lw(o,xi);break;case 1:if(Jo(e,o,a),n=o.stateNode,typeof n.componentDidMount==="function"&&Y(o,Ly,o,n),n=o.updateQueue,n!==null){e=o.stateNode;try{Y(o,kR,n,e)}catch(x){Je(o,o.return,x)}}a&&v&64&&zw(o),kc(o,o.return);break;case 27:qw(o);case 26:case 5:Jo(e,o,a),a&&n===null&&v&4&&_w(o),kc(o,o.return);break;case 12:if(a&&v&4){v=Ml(),Jo(e,o,a),a=o.stateNode,a.effectDuration+=fc(v);try{Y(o,Nw,o,n,Os,a.effectDuration)}catch(x){Je(o,o.return,x)}}else Jo(e,o,a);break;case 31:Jo(e,o,a),a&&v&4&&Pw(e,o);break;case 13:Jo(e,o,a),a&&v&4&&Yw(e,o);break;case 22:o.memoizedState===null&&Jo(e,o,a),kc(o,o.return);break;case 30:break;default:Jo(e,o,a)}(o.mode&we)!==pe&&0<=se&&0<=ue&&(zt||0.05<Dt)&&Vo(o,se,ue,Dt,xt),di(u),$o(f),xt=p,zt=g}function Jo(e,n,o){o=o&&(n.subtreeFlags&8772)!==0;for(n=n.child;n!==null;)Ww(e,n.alternate,n,o),n=n.sibling}function h0(e,n){var o=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(o=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==o&&(e!=null&&va(e),o!=null&&cc(o))}function d0(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(va(n),e!=null&&cc(e))}function fo(e,n,o,a,u){if(n.subtreeFlags&10256||n.actualDuration!==0&&(n.alternate===null||n.alternate.child!==n.child))for(n=n.child;n!==null;){var f=n.sibling;Fw(e,n,o,a,f!==null?f.actualStartTime:u),n=f}}function Fw(e,n,o,a,u){var f=hi(),p=jo(),g=Po(),v=Yo(),x=Ts,D=n.flags;switch(n.tag){case 0:case 11:case 15:(n.mode&we)!==pe&&0<n.actualStartTime&&(n.flags&1)!==0&&Dh(n,n.actualStartTime,u,sn,o),fo(e,n,o,a,u),D&2048&&Bw(n,In|Pi);break;case 1:(n.mode&we)!==pe&&0<n.actualStartTime&&((n.flags&128)!==0?Fm(n,n.actualStartTime,u,[]):(n.flags&1)!==0&&Dh(n,n.actualStartTime,u,sn,o)),fo(e,n,o,a,u);break;case 3:var O=Ml(),A=sn;sn=n.alternate!==null&&n.alternate.memoizedState.isDehydrated&&(n.flags&256)===0,fo(e,n,o,a,u),sn=A,D&2048&&(o=null,n.alternate!==null&&(o=n.alternate.memoizedState.cache),a=n.memoizedState.cache,a!==o&&(va(a),o!=null&&cc(o))),e.passiveEffectDuration+=Uh(O);break;case 12:if(D&2048){D=Ml(),fo(e,n,o,a,u),e=n.stateNode,e.passiveEffectDuration+=fc(D);try{Y(n,UR,n,n.alternate,Os,e.passiveEffectDuration)}catch(B){Je(n,n.return,B)}}else fo(e,n,o,a,u);break;case 31:D=sn,O=n.alternate!==null?n.alternate.memoizedState:null,A=n.memoizedState,O!==null&&A===null?(A=n.deletions,A!==null&&0<A.length&&A[0].tag===18?(sn=!1,O=O.hydrationErrors,O!==null&&Fm(n,n.actualStartTime,u,O)):sn=!0):sn=!1,fo(e,n,o,a,u),sn=D;break;case 13:D=sn,O=n.alternate!==null?n.alternate.memoizedState:null,A=n.memoizedState,O===null||O.dehydrated===null||A!==null&&A.dehydrated!==null?sn=!1:(A=n.deletions,A!==null&&0<A.length&&A[0].tag===18?(sn=!1,O=O.hydrationErrors,O!==null&&Fm(n,n.actualStartTime,u,O)):sn=!0),fo(e,n,o,a,u),sn=D;break;case 23:break;case 22:A=n.stateNode,O=n.alternate,n.memoizedState!==null?A._visibility&zl?fo(e,n,o,a,u):Cc(e,n,o,a,u):A._visibility&zl?fo(e,n,o,a,u):(A._visibility|=zl,Tr(e,n,o,a,(n.subtreeFlags&10256)!==0||n.actualDuration!==0&&(n.alternate===null||n.alternate.child!==n.child),u),(n.mode&we)===pe||sn||(e=n.actualStartTime,0<=e&&0.05<u-e&&Mh(n,e,u),0<=se&&0<=ue&&0.05<ue-se&&Mh(n,se,ue))),D&2048&&h0(O,n);break;case 24:fo(e,n,o,a,u),D&2048&&d0(n.alternate,n);break;default:fo(e,n,o,a,u)}if((n.mode&we)!==pe){if(e=!sn&&n.alternate===null&&n.return!==null&&n.return.alternate!==null)o=n.actualStartTime,0<=o&&0.05<u-o&&qo(n,o,u,"Mount");0<=se&&0<=ue&&((zt||0.05<Dt)&&Vo(n,se,ue,Dt,xt),e&&0.05<ue-se&&qo(n,se,ue,"Mount"))}di(f),$o(p),xt=g,zt=v,Ts=x}function Tr(e,n,o,a,u,f){u=u&&((n.subtreeFlags&10256)!==0||n.actualDuration!==0&&(n.alternate===null||n.alternate.child!==n.child));for(n=n.child;n!==null;){var p=n.sibling;Jw(e,n,o,a,u,p!==null?p.actualStartTime:f),n=p}}function Jw(e,n,o,a,u,f){var p=hi(),g=jo(),v=Po(),x=Yo(),D=Ts;u&&(n.mode&we)!==pe&&0<n.actualStartTime&&(n.flags&1)!==0&&Dh(n,n.actualStartTime,f,sn,o);var O=n.flags;switch(n.tag){case 0:case 11:case 15:Tr(e,n,o,a,u,f),Bw(n,In);break;case 23:break;case 22:var A=n.stateNode;n.memoizedState!==null?A._visibility&zl?Tr(e,n,o,a,u,f):Cc(e,n,o,a,f):(A._visibility|=zl,Tr(e,n,o,a,u,f)),u&&O&2048&&h0(n.alternate,n);break;case 24:Tr(e,n,o,a,u,f),u&&O&2048&&d0(n.alternate,n);break;default:Tr(e,n,o,a,u,f)}(n.mode&we)!==pe&&0<=se&&0<=ue&&(zt||0.05<Dt)&&Vo(n,se,ue,Dt,xt),di(p),$o(g),xt=v,zt=x,Ts=D}function Cc(e,n,o,a,u){if(n.subtreeFlags&10256||n.actualDuration!==0&&(n.alternate===null||n.alternate.child!==n.child))for(var f=n.child;f!==null;){n=f.sibling;var p=e,g=o,v=a,x=n!==null?n.actualStartTime:u,D=Ts;(f.mode&we)!==pe&&0<f.actualStartTime&&(f.flags&1)!==0&&Dh(f,f.actualStartTime,x,sn,g);var O=f.flags;switch(f.tag){case 22:Cc(p,f,g,v,x),O&2048&&h0(f.alternate,f);break;case 24:Cc(p,f,g,v,x),O&2048&&d0(f.alternate,f);break;default:Cc(p,f,g,v,x)}Ts=D,f=n}}function Er(e,n,o){if(e.subtreeFlags&mf)for(e=e.child;e!==null;)Zw(e,n,o),e=e.sibling}function Zw(e,n,o){switch(e.tag){case 26:Er(e,n,o),e.flags&mf&&e.memoizedState!==null&&DL(o,bo,e.memoizedState,e.memoizedProps);break;case 5:Er(e,n,o);break;case 3:case 4:var a=bo;bo=Sd(e.stateNode.containerInfo),Er(e,n,o),bo=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=mf,mf=16777216,Er(e,n,o),mf=a):Er(e,n,o));break;default:Er(e,n,o)}}function Kw(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function Ac(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var o=0;o<n.length;o++){var a=n[o],u=hi();dn=a,nx(a,e),(a.mode&we)!==pe&&0<=se&&0<=ue&&0.05<ue-se&&qo(a,se,ue,"Unmount"),di(u)}Kw(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ex(e),e=e.sibling}function ex(e){var n=hi(),o=jo(),a=Po(),u=Yo();switch(e.tag){case 0:case 11:case 15:Ac(e),e.flags&2048&&r0(e,e.return,In|Pi);break;case 3:var f=Ml();Ac(e),e.stateNode.passiveEffectDuration+=Uh(f);break;case 12:f=Ml(),Ac(e),e.stateNode.passiveEffectDuration+=fc(f);break;case 22:f=e.stateNode,e.memoizedState!==null&&f._visibility&zl&&(e.return===null||e.return.tag!==13)?(f._visibility&=~zl,dd(e),(e.mode&we)!==pe&&0<=se&&0<=ue&&0.05<ue-se&&qo(e,se,ue,"Disconnect")):Ac(e);break;default:Ac(e)}(e.mode&we)!==pe&&0<=se&&0<=ue&&(zt||0.05<Dt)&&Vo(e,se,ue,Dt,xt),di(n),$o(o),zt=u,xt=a}function dd(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var o=0;o<n.length;o++){var a=n[o],u=hi();dn=a,nx(a,e),(a.mode&we)!==pe&&0<=se&&0<=ue&&0.05<ue-se&&qo(a,se,ue,"Unmount"),di(u)}Kw(e)}for(e=e.child;e!==null;)tx(e),e=e.sibling}function tx(e){var n=hi(),o=jo(),a=Po(),u=Yo();switch(e.tag){case 0:case 11:case 15:r0(e,e.return,In),dd(e);break;case 22:var f=e.stateNode;f._visibility&zl&&(f._visibility&=~zl,dd(e));break;default:dd(e)}(e.mode&we)!==pe&&0<=se&&0<=ue&&(zt||0.05<Dt)&&Vo(e,se,ue,Dt,xt),di(n),$o(o),zt=u,xt=a}function nx(e,n){for(;dn!==null;){var o=dn,a=o,u=n,f=hi(),p=jo(),g=Po(),v=Yo();switch(a.tag){case 0:case 11:case 15:r0(a,u,In);break;case 23:case 22:a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool,u!=null&&va(u));break;case 24:cc(a.memoizedState.cache)}if((a.mode&we)!==pe&&0<=se&&0<=ue&&(zt||0.05<Dt)&&Vo(a,se,ue,Dt,xt),di(f),$o(p),zt=v,xt=g,a=o.child,a!==null)a.return=o,dn=a;else e:for(o=e;dn!==null;){if(a=dn,f=a.sibling,p=a.return,jw(a),a===o){dn=null;break e}if(f!==null){f.return=p,dn=f;break e}dn=p}}}function jR(){uz.forEach(function(e){return e()})}function ix(){var e=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return e||H.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),e}function mi(e){if((Ie&an)!==pn&&ke!==0)return ke&-ke;var n=H.T;return n!==null?(n._updatedFibers||(n._updatedFibers=new Set),n._updatedFibers.add(e),w0()):ie()}function ox(){if(oi===0)if((ke&536870912)===0||Le){var e=Ld;Ld<<=1,(Ld&3932160)===0&&(Ld=262144),oi=e}else oi=536870912;return e=wi.current,e!==null&&(e.flags|=32),oi}function Bt(e,n,o){if(hu&&console.error("useInsertionEffect must not schedule updates."),nb&&(yp=!0),e===ut&&(tt===qa||tt===Va)||e.cancelPendingCommit!==null)Dr(e,0),bs(e,ke,oi,!1);if(No(e,o),(Ie&an)!==pn&&e===ut){if(nl)switch(n.tag){case 0:case 11:case 15:e=Ae&&P(Ae)||"Unknown",RA.has(e)||(RA.add(e),n=P(n)||"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",n,e,e));break;case 1:OA||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),OA=!0)}}else ol&&Ln(e,n,o),ZR(n),e===ut&&((Ie&an)===pn&&(qs|=o),Ot===Ns&&bs(e,ke,oi,!1)),Zo(e)}function lx(e,n,o){if((Ie&(an|ki))!==pn)throw Error("Should not already be working.");if(ke!==0&&Ae!==null){var a=Ae,u=fn();switch(kC){case bf:case qa:var f=ef;mt&&((a=a._debugTask)?a.run(console.timeStamp.bind(console,"Suspended",f,u,Ni,void 0,"primary-light")):console.timeStamp("Suspended",f,u,Ni,void 0,"primary-light"));break;case Va:f=ef,mt&&((a=a._debugTask)?a.run(console.timeStamp.bind(console,"Action",f,u,Ni,void 0,"primary-light")):console.timeStamp("Action",f,u,Ni,void 0,"primary-light"));break;default:mt&&(a=u-ef,3>a||console.timeStamp("Blocked",ef,u,Ni,void 0,5>a?"primary-light":10>a?"primary":100>a?"primary-dark":"error"))}}f=(o=!o&&(n&127)===0&&(n&e.expiredLanes)===0||io(e,n))?PR(e,n):m0(e,n,!0);var p=o;do{if(f===Yl){cu&&!o&&bs(e,n,0,!1),n=tt,ef=Ft(),kC=n;break}else{if(a=fn(),u=e.current.alternate,p&&!$R(u)){ci(n),u=hn,f=a,!mt||f<=u||(It?It.run(console.timeStamp.bind(console,"Teared Render",u,f,Re,De,"error")):console.timeStamp("Teared Render",u,f,Re,De,"error")),Aa(n,a),f=m0(e,n,!1),p=!1;continue}if(f===Ua){if(p=n,e.errorRecoveryDisabledLanes&p)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){ci(n),Jm(hn,a,n,It),Aa(n,a),n=g;e:{a=e,f=p,p=Sf;var v=a.current.memoizedState.isDehydrated;if(v&&(Dr(a,g).flags|=256),g=m0(a,g,!1),g!==Ua){if(Gy&&!v){a.errorRecoveryDisabledLanes|=f,qs|=f,f=Ns;break e}a=jn,jn=p,a!==null&&(jn===null?jn=a:jn.push.apply(jn,a))}f=g}if(p=!1,f!==Ua)continue;else a=fn()}}if(f===yf){ci(n),Jm(hn,a,n,It),Aa(n,a),Dr(e,0),bs(e,n,0,!0);break}e:{switch(o=e,f){case Yl:case yf:throw Error("Root did not complete. This is a bug in React.");case Ns:if((n&4194048)!==n)break;case up:ci(n),lS(hn,a,n,It),Aa(n,a),u=n,(u&127)!==0?Gd=a:(u&4194048)!==0&&(Wd=a),bs(o,n,oi,!_s);break e;case Ua:jn=null;break;case rp:case yA:break;default:throw Error("Unknown root exit status.")}if(H.actQueue!==null)g0(o,u,n,jn,wf,hp,oi,qs,Ia,f,null,null,hn,a);else{if((n&62914560)===n&&(p=dp+SA-fn(),10<p)){if(bs(o,n,oi,!_s),no(o,0,!0)!==0)break e;vo=n,o.timeoutHandle=qA(sx.bind(null,o,u,jn,wf,hp,n,oi,qs,Ia,_s,f,"Throttled",hn,a),p);break e}sx(o,u,jn,wf,hp,n,oi,qs,Ia,_s,f,null,hn,a)}}}break}while(1);Zo(e)}function sx(e,n,o,a,u,f,p,g,v,x,D,O,A,B){e.timeoutHandle=Xa;var X=n.subtreeFlags,Z=null;if(X&8192||(X&16785408)===16785408){if(Z={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Cl},Zw(n,f,Z),X=(f&62914560)===f?dp-fn():(f&4194048)===f?vA-fn():0,X=OL(Z,X),X!==null){vo=f,e.cancelPendingCommit=X(g0.bind(null,e,n,f,o,a,u,p,g,v,D,Z,Z.waitingForViewTransition?"Waiting for the previous Animation":0<Z.count?0<Z.imgCount?"Suspended on CSS and Images":"Suspended on CSS":Z.imgCount===1?"Suspended on an Image":0<Z.imgCount?"Suspended on Images":null,A,B)),bs(e,f,p,!x);return}}g0(e,n,f,o,a,u,p,g,v,D,Z,O,A,B)}function $R(e){for(var n=e;;){var o=n.tag;if((o===0||o===11||o===15)&&n.flags&16384&&(o=n.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var a=0;a<o.length;a++){var u=o[a],f=u.getSnapshot;u=u.value;try{if(!Un(f(),u))return!1}catch(p){return!1}}if(o=n.child,n.subtreeFlags&16384&&o!==null)o.return=n,n=o;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function bs(e,n,o,a){n&=~Wy,n&=~qs,e.suspendedLanes|=n,e.pingedLanes&=~n,a&&(e.warmLanes|=n),a=e.expirationTimes;for(var u=n;0<u;){var f=31-Hn(u),p=1<<f;a[f]=-1,u&=~p}o!==0&&cr(e,o,n)}function Mr(){return(Ie&(an|ki))===pn?(Mc(0,!1),!1):!0}function p0(){if(Ae!==null){if(tt===ii)var e=Ae.return;else e=Ae,Hh(),Ag(e),tu=null,cf=0,e=Ae;for(;e!==null;)Rw(e.alternate,e),e=e.return;Ae=null}}function Aa(e,n){(e&127)!==0&&(Rs=n),(e&4194048)!==0&&(ul=n),(e&62914560)!==0&&(wC=n),(e&2080374784)!==0&&(xC=n)}function Dr(e,n){mt&&(console.timeStamp("Blocking Track",0.003,0.003,"Blocking",De,"primary-light"),console.timeStamp("Transition Track",0.003,0.003,"Transition",De,"primary-light"),console.timeStamp("Suspense Track",0.003,0.003,"Suspense",De,"primary-light"),console.timeStamp("Idle Track",0.003,0.003,"Idle",De,"primary-light"));var o=hn;if(hn=Ft(),ke!==0&&0<o){if(ci(ke),Ot===rp||Ot===Ns)lS(o,hn,n,It);else{var a=hn,u=It;if(mt&&!(a<=o)){var f=(n&738197653)===n?"tertiary-dark":"primary-dark",p=(n&536870912)===n?"Prewarm":(n&201326741)===n?"Interrupted Hydration":"Interrupted Render";u?u.run(console.timeStamp.bind(console,p,o,a,Re,De,f)):console.timeStamp(p,o,a,Re,De,f)}}Aa(ke,hn)}if(o=It,It=null,(n&127)!==0){It=Jc,u=0<=rl&&rl<Rs?Rs:rl,a=0<=Oa&&Oa<Rs?Rs:Oa,f=0<=a?a:0<=u?u:hn,0<=Gd?(ci(2),sS(Gd,f,n,o)):(Fd&127)!==0&&(ci(2),rc(Rs,f,Vl)),o=u;var g=a,v=Zc,x=0<Zr,D=Ls===Fc,O=Ls===Qd;if(u=hn,a=Jc,f=Ey,p=My,mt){if(Re="Blocking",0<o?o>u&&(o=u):o=u,0<g?g>o&&(g=o):g=o,v!==null&&o>g){var A=x?"secondary-light":"warning";a?a.run(console.timeStamp.bind(console,x?"Consecutive":"Event: "+v,g,o,Re,De,A)):console.timeStamp(x?"Consecutive":"Event: "+v,g,o,Re,De,A)}u>o&&(g=D?"error":(n&738197653)===n?"tertiary-light":"primary-light",D=O?"Promise Resolved":D?"Cascading Update":5<u-o?"Update Blocked":"Update",O=[],p!=null&&O.push(["Component name",p]),f!=null&&O.push(["Method name",f]),o={start:o,end:u,detail:{devtools:{properties:O,track:Re,trackGroup:De,color:g}}},a?a.run(performance.measure.bind(performance,D,o)):performance.measure(D,o))}rl=-1.1,Ls=0,My=Ey=null,Gd=-1.1,Zr=Oa,Oa=-1.1,Rs=Ft()}if((n&4194048)!==0&&(It=Kc,u=0<=ql&&ql<ul?ul:ql,o=0<=ji&&ji<ul?ul:ji,a=0<=Bs&&Bs<ul?ul:Bs,f=0<=a?a:0<=o?o:hn,0<=Wd?(ci(256),sS(Wd,f,n,It)):(Fd&4194048)!==0&&(ci(256),rc(ul,f,Vl)),O=a,g=Ra,v=0<zs,x=Dy===Qd,f=hn,a=Kc,p=vC,D=SC,mt&&(Re="Transition",0<o?o>f&&(o=f):o=f,0<u?u>o&&(u=o):u=o,0<O?O>u&&(O=u):O=u,u>O&&g!==null&&(A=v?"secondary-light":"warning",a?a.run(console.timeStamp.bind(console,v?"Consecutive":"Event: "+g,O,u,Re,De,A)):console.timeStamp(v?"Consecutive":"Event: "+g,O,u,Re,De,A)),o>u&&(a?a.run(console.timeStamp.bind(console,"Action",u,o,Re,De,"primary-dark")):console.timeStamp("Action",u,o,Re,De,"primary-dark")),f>o&&(u=x?"Promise Resolved":5<f-o?"Update Blocked":"Update",O=[],D!=null&&O.push(["Component name",D]),p!=null&&O.push(["Method name",p]),o={start:o,end:f,detail:{devtools:{properties:O,track:Re,trackGroup:De,color:"primary-light"}}},a?a.run(performance.measure.bind(performance,u,o)):performance.measure(u,o))),ji=ql=-1.1,Dy=0,Wd=-1.1,zs=Bs,Bs=-1.1,ul=Ft()),(n&62914560)!==0&&(Fd&62914560)!==0&&(ci(4194304),rc(wC,hn,Vl)),(n&2080374784)!==0&&(Fd&2080374784)!==0&&(ci(268435456),rc(xC,hn,Vl)),o=e.timeoutHandle,o!==Xa&&(e.timeoutHandle=Xa,xz(o)),o=e.cancelPendingCommit,o!==null&&(e.cancelPendingCommit=null,o()),vo=0,p0(),ut=e,Ae=o=Al(e.current,null),ke=n,tt=ii,Ci=null,_s=!1,cu=io(e,n),Gy=!1,Ot=Yl,Ia=oi=Wy=qs=Us=0,jn=Sf=null,hp=!1,(n&8)!==0&&(n|=n&32),a=e.entangledLanes,a!==0)for(e=e.entanglements,a&=n;0<a;)u=31-Hn(a),f=1<<u,n|=e[u],a&=~f;return fl=n,Oh(),e=dC(),1000<e-hC&&(H.recentlyCreatedOwnerStacks=0,hC=e),go.discardPendingWarnings(),o}function ax(e,n){me=null,H.H=pf,H.getCurrentStack=null,nl=!1,bi=null,n===eu||n===ep?(n=MS(),tt=bf):n===By?(n=MS(),tt=bA):tt=n===$y?Qy:n!==null&&typeof n==="object"&&typeof n.then==="function"?vf:cp,Ci=n;var o=Ae;o===null?(Ot=yf,sd(e,fi(n,e.current))):o.mode&we&&hg(o)}function rx(){var e=wi.current;return e===null?!0:(ke&4194048)===ke?$i===null?!0:!1:(ke&62914560)===ke||(ke&536870912)!==0?e===$i:!1}function ux(){var e=H.H;return H.H=pf,e===null?pf:e}function cx(){var e=H.A;return H.A=rz,e}function pd(e){It===null&&(It=e._debugTask==null?null:e._debugTask)}function md(){Ot=Ns,_s||(ke&4194048)!==ke&&wi.current!==null||(cu=!0),(Us&134217727)===0&&(qs&134217727)===0||ut===null||bs(ut,ke,oi,!1)}function m0(e,n,o){var a=Ie;Ie|=an;var u=ux(),f=cx();if(ut!==e||ke!==n){if(ol){var p=e.memoizedUpdaters;0<p.size&&(Ec(e,ke),p.clear()),hr(e,n)}wf=null,Dr(e,n)}n=!1,p=Ot;e:do try{if(tt!==ii&&Ae!==null){var g=Ae,v=Ci;switch(tt){case Qy:p0(),p=up;break e;case bf:case qa:case Va:case vf:wi.current===null&&(n=!0);var x=tt;if(tt=ii,Ci=null,Or(e,g,v,x),o&&cu){p=Yl;break e}break;default:x=tt,tt=ii,Ci=null,Or(e,g,v,x)}}fx(),p=Ot;break}catch(D){ax(e,D)}while(1);return n&&e.shellSuspendCounter++,Hh(),Ie=a,H.H=u,H.A=f,Ae===null&&(ut=null,ke=0,Oh()),p}function fx(){for(;Ae!==null;)hx(Ae)}function PR(e,n){var o=Ie;Ie|=an;var a=ux(),u=cx();if(ut!==e||ke!==n){if(ol){var f=e.memoizedUpdaters;0<f.size&&(Ec(e,ke),f.clear()),hr(e,n)}wf=null,pp=fn()+wA,Dr(e,n)}else cu=io(e,n);e:do try{if(tt!==ii&&Ae!==null)t:switch(n=Ae,f=Ci,tt){case cp:tt=ii,Ci=null,Or(e,n,f,cp);break;case qa:case Va:if(TS(f)){tt=ii,Ci=null,dx(n);break}n=function(){tt!==qa&&tt!==Va||ut!==e||(tt=fp),Zo(e)},f.then(n,n);break e;case bf:tt=fp;break e;case bA:tt=Xy;break e;case fp:TS(f)?(tt=ii,Ci=null,dx(n)):(tt=ii,Ci=null,Or(e,n,f,fp));break;case Xy:var p=null;switch(Ae.tag){case 26:p=Ae.memoizedState;case 5:case 27:var g=Ae;if(p?lk(p):g.stateNode.complete){tt=ii,Ci=null;var v=g.sibling;if(v!==null)Ae=v;else{var x=g.return;x!==null?(Ae=x,gd(x)):Ae=null}break t}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}tt=ii,Ci=null,Or(e,n,f,Xy);break;case vf:tt=ii,Ci=null,Or(e,n,f,vf);break;case Qy:p0(),Ot=up;break e;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}H.actQueue!==null?fx():YR();break}catch(D){ax(e,D)}while(1);if(Hh(),H.H=a,H.A=u,Ie=o,Ae!==null)return Yl;return ut=null,ke=0,Oh(),Ot}function YR(){for(;Ae!==null&&!$L();)hx(Ae)}function hx(e){var n=e.alternate;(e.mode&we)!==pe?(fg(e),n=Y(e,l0,n,e,fl),hg(e)):n=Y(e,l0,n,e,fl),e.memoizedProps=e.pendingProps,n===null?gd(e):Ae=n}function dx(e){var n=Y(e,XR,e);e.memoizedProps=e.pendingProps,n===null?gd(e):Ae=n}function XR(e){var n=e.alternate,o=(e.mode&we)!==pe;switch(o&&fg(e),e.tag){case 15:case 0:n=Cw(n,e,e.pendingProps,e.type,void 0,ke);break;case 11:n=Cw(n,e,e.pendingProps,e.type.render,e.ref,ke);break;case 5:Ag(e);default:Rw(n,e),e=Ae=hS(e,fl),n=l0(n,e,fl)}return o&&hg(e),n}function Or(e,n,o,a){Hh(),Ag(n),tu=null,cf=0;var u=n.return;try{if(OR(e,u,n,o,ke)){Ot=yf,sd(e,fi(o,e.current)),Ae=null;return}}catch(f){if(u!==null)throw Ae=u,f;Ot=yf,sd(e,fi(o,e.current)),Ae=null;return}if(n.flags&32768){if(Le||a===cp)e=!0;else if(cu||(ke&536870912)!==0)e=!1;else if(_s=e=!0,a===qa||a===Va||a===bf||a===vf)a=wi.current,a!==null&&a.tag===13&&(a.flags|=16384);px(n,e)}else gd(n)}function gd(e){var n=e;do{if((n.flags&32768)!==0){px(n,_s);return}var o=n.alternate;if(e=n.return,fg(n),o=Y(n,BR,o,n,fl),(n.mode&we)!==pe&&wS(n),o!==null){Ae=o;return}if(n=n.sibling,n!==null){Ae=n;return}Ae=n=e}while(n!==null);Ot===Yl&&(Ot=yA)}function px(e,n){do{var o=zR(e.alternate,e);if(o!==null){o.flags&=32767,Ae=o;return}if((e.mode&we)!==pe){wS(e),o=e.actualDuration;for(var a=e.child;a!==null;)o+=a.actualDuration,a=a.sibling;e.actualDuration=o}if(o=e.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!n&&(e=e.sibling,e!==null)){Ae=e;return}Ae=e=o}while(e!==null);Ot=up,Ae=null}function g0(e,n,o,a,u,f,p,g,v,x,D,O,A,B){e.cancelPendingCommit=null;do Tc();while(tn!==Is);if(go.flushLegacyContextWarning(),go.flushPendingUnsafeLifecycleWarnings(),(Ie&(an|ki))!==pn)throw Error("Should not already be working.");if(ci(o),x===Ua?Jm(A,B,o,It):a!==null?yR(A,B,o,a,n!==null&&n.alternate!==null&&n.alternate.memoizedState.isDehydrated&&(n.flags&256)!==0,It):gR(A,B,o,It),n!==null){if(o===0&&console.error("finishedLanes should not be empty during a commit. This is a bug in React."),n===e.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(f=n.lanes|n.childLanes,f|=xy,as(e,o,f,p,g,v),e===ut&&(Ae=ut=null,ke=0),fu=n,js=e,vo=o,Zy=f,eb=u,EA=a,Ky=B,MA=O,So=mp,DA=null,n.actualDuration!==0||(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,JR(Nr,function(){return Ef=window.event,So===mp&&(So=Jy),vx(),null})):(e.callbackNode=null,e.callbackPriority=0),Ul=null,Os=Ft(),O!==null&&bR(B,Os,O,It),a=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||a){a=H.T,H.T=null,u=Ze.p,Ze.p=vi,p=Ie,Ie|=ki;try{VR(e,n,o)}finally{Ie=p,Ze.p=u,H.T=a}}tn=kA,mx(),gx(),yx()}}function mx(){if(tn===kA){tn=Is;var e=js,n=fu,o=vo,a=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||a){a=H.T,H.T=null;var u=Ze.p;Ze.p=vi;var f=Ie;Ie|=ki;try{ru=o,uu=e,qh(),Xw(n,e),uu=ru=null,o=fb;var p=nS(e.containerInfo),g=o.focusedElem,v=o.selectionRange;if(p!==g&&g&&g.ownerDocument&&tS(g.ownerDocument.documentElement,g)){if(v!==null&&Gm(g)){var{start:x,end:D}=v;if(D===void 0&&(D=x),"selectionStart"in g)g.selectionStart=x,g.selectionEnd=Math.min(D,g.value.length);else{var O=g.ownerDocument||document,A=O&&O.defaultView||window;if(A.getSelection){var B=A.getSelection(),X=g.textContent.length,Z=Math.min(v.start,X),ht=v.end===void 0?Z:Math.min(v.end,X);!B.extend&&Z>ht&&(p=ht,ht=Z,Z=p);var He=eS(g,Z),C=eS(g,ht);if(He&&C&&(B.rangeCount!==1||B.anchorNode!==He.node||B.anchorOffset!==He.offset||B.focusNode!==C.node||B.focusOffset!==C.offset)){var T=O.createRange();T.setStart(He.node,He.offset),B.removeAllRanges(),Z>ht?(B.addRange(T),B.extend(C.node,C.offset)):(T.setEnd(C.node,C.offset),B.addRange(T))}}}}O=[];for(B=g;B=B.parentNode;)B.nodeType===1&&O.push({element:B,left:B.scrollLeft,top:B.scrollTop});typeof g.focus==="function"&&g.focus();for(g=0;g<O.length;g++){var M=O[g];M.element.scrollLeft=M.left,M.element.scrollTop=M.top}}Rp=!!cb,fb=cb=null}finally{Ie=f,Ze.p=u,H.T=a}}e.current=n,tn=CA}}function gx(){if(tn===CA){tn=Is;var e=DA;if(e!==null){Os=Ft();var n=_l,o=Os;!mt||o<=n||(Vl?Vl.run(console.timeStamp.bind(console,e,n,o,Re,De,"secondary-light")):console.timeStamp(e,n,o,Re,De,"secondary-light"))}e=js,n=fu,o=vo;var a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=H.T,H.T=null;var u=Ze.p;Ze.p=vi;var f=Ie;Ie|=ki;try{ru=o,uu=e,qh(),Iw(e,n.alternate,n),uu=ru=null}finally{Ie=f,Ze.p=u,H.T=a}}e=Ky,n=MA,_l=Ft(),e=n===null?e:Os,n=_l,o=So===Fy,a=It,Ul!==null?aS(e,n,Ul,!1,a):!mt||n<=e||(a?a.run(console.timeStamp.bind(console,o?"Commit Interrupted View Transition":"Commit",e,n,Re,De,o?"error":"secondary-dark")):console.timeStamp(o?"Commit Interrupted View Transition":"Commit",e,n,Re,De,o?"error":"secondary-dark")),tn=AA}}function yx(){if(tn===TA||tn===AA){if(tn===TA){var e=_l;_l=Ft();var n=_l,o=So===Fy;!mt||n<=e||(Vl?Vl.run(console.timeStamp.bind(console,o?"Interrupted View Transition":"Starting Animation",e,n,Re,De,o?"error":"secondary-light")):console.timeStamp(o?"Interrupted View Transition":"Starting Animation",e,n,Re,De,o?" error":"secondary-light")),So!==Fy&&(So=xA)}tn=Is,PL(),e=js;var a=fu;n=vo,o=EA;var u=a.actualDuration!==0||(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0;u?tn=gp:(tn=Is,fu=js=null,bx(e,e.pendingLanes),ja=0,kf=null);var f=e.pendingLanes;if(f===0&&(Vs=null),u||kx(e),f=ui(n),a=a.stateNode,Tn&&typeof Tn.onCommitFiberRoot==="function")try{var p=(a.current.flags&128)===128;switch(f){case vi:var g=ey;break;case po:g=ty;break;case ll:g=Nr;break;case zd:g=ny;break;default:g=Nr}Tn.onCommitFiberRoot(_r,a,g,p)}catch(O){il||(il=!0,console.error("React instrumentation encountered an error: %o",O))}if(ol&&e.memoizedUpdaters.clear(),jR(),o!==null){p=H.T,g=Ze.p,Ze.p=vi,H.T=null;try{var v=e.onRecoverableError;for(a=0;a<o.length;a++){var x=o[a],D=QR(x.stack);Y(x.source,v,x.value,D)}}finally{H.T=p,Ze.p=g}}(vo&3)!==0&&Tc(),Zo(e),f=e.pendingLanes,(n&261930)!==0&&(f&42)!==0?(Zd=!0,e===tb?xf++:(xf=0,tb=e)):xf=0,u||Aa(n,_l),Mc(0,!1)}}function QR(e){return e={componentStack:e},Object.defineProperty(e,"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.')}}),e}function bx(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,cc(n)))}function Tc(){return mx(),gx(),yx(),vx()}function vx(){if(tn!==gp)return!1;var e=js,n=Zy;Zy=0;var o=ui(vo),a=ll===0||ll>o?ll:o;o=H.T;var u=Ze.p;try{Ze.p=a,H.T=null;var f=eb;eb=null,a=js;var p=vo;if(tn=Is,fu=js=null,vo=0,(Ie&(an|ki))!==pn)throw Error("Cannot flush passive effects while already rendering.");ci(p),nb=!0,yp=!1;var g=0;if(Ul=null,g=fn(),So===xA)rc(_l,g,Vl);else{var v=_l,x=g,D=So===Jy;!mt||x<=v||(It?It.run(console.timeStamp.bind(console,D?"Waiting for Paint":"Waiting",v,x,Re,De,"secondary-light")):console.timeStamp(D?"Waiting for Paint":"Waiting",v,x,Re,De,"secondary-light"))}v=Ie,Ie|=ki;var O=a.current;qh(),ex(O);var A=a.current;O=Ky,qh(),Fw(a,A,p,f,O),kx(a),Ie=v;var B=fn();if(A=g,O=It,Ul!==null?aS(A,B,Ul,!0,O):!mt||B<=A||(O?O.run(console.timeStamp.bind(console,"Remaining Effects",A,B,Re,De,"secondary-dark")):console.timeStamp("Remaining Effects",A,B,Re,De,"secondary-dark")),Aa(p,B),Mc(0,!1),yp?a===kf?ja++:(ja=0,kf=a):ja=0,yp=nb=!1,Tn&&typeof Tn.onPostCommitFiberRoot==="function")try{Tn.onPostCommitFiberRoot(_r,a)}catch(Z){il||(il=!0,console.error("React instrumentation encountered an error: %o",Z))}var X=a.current.stateNode;return X.effectDuration=0,X.passiveEffectDuration=0,!0}finally{Ze.p=u,H.T=o,bx(e,n)}}function Sx(e,n,o){n=fi(o,n),xS(n),n=Gg(e.stateNode,n,2),e=ps(e,n,2),e!==null&&(No(e,2),Zo(e))}function Je(e,n,o){if(hu=!1,e.tag===3)Sx(e,e,o);else{for(;n!==null;){if(n.tag===3){Sx(n,e,o);return}if(n.tag===1){var a=n.stateNode;if(typeof n.type.getDerivedStateFromError==="function"||typeof a.componentDidCatch==="function"&&(Vs===null||!Vs.has(a))){e=fi(o,e),xS(e),o=Wg(2),a=ps(n,o,2),a!==null&&(Fg(o,a,n,e),No(a,2),Zo(a));return}}n=n.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.
137
+ Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching`:" You returned: "+a,Y(n,function(g,v){console.error("%s must not return anything besides a function, which is used for clean-up.%s",g,v)},f,p)}o=o.next}while(o!==u)}}catch(g){Je(n,n.return,g)}}function Mr(e,n,o){try{var a=n.updateQueue,u=a!==null?a.lastEffect:null;if(u!==null){var f=u.next;a=f;do{if((a.tag&e)===e){var p=a.inst,g=p.destroy;g!==void 0&&(p.destroy=void 0,(e&qn)!==lp&&(mu=!0),u=n,Y(u,lz,u,o,g),(e&qn)!==lp&&(mu=!1))}a=a.next}while(a!==f)}}catch(v){Je(n,n.return,v)}}function Bw(e,n){Go(e)?(Qo(),Cc(n,e),Xo()):Cc(n,e)}function r0(e,n,o){Go(e)?(Qo(),Mr(o,e,n),Xo()):Mr(o,e,n)}function zw(e){var n=e.updateQueue;if(n!==null){var o=e.stateNode;e.type.defaultProps||"ref"in e.memoizedProps||cu||(o.props!==e.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.",P(e)||"instance"),o.state!==e.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.",P(e)||"instance"));try{Y(e,NS,n,o)}catch(a){Je(e,e.return,a)}}}function NR(e,n,o){return e.getSnapshotBeforeUpdate(n,o)}function _R(e,n){var{memoizedProps:o,memoizedState:a}=n;n=e.stateNode,e.type.defaultProps||"ref"in e.memoizedProps||cu||(n.props!==e.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.",P(e)||"instance"),n.state!==e.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.",P(e)||"instance"));try{var u=Ma(e.type,o),f=Y(e,NR,n,u,a);o=mA,f!==void 0||o.has(e.type)||(o.add(e.type),Y(e,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",P(e))})),n.__reactInternalSnapshotBeforeUpdate=f}catch(p){Je(e,e.return,p)}}function Hw(e,n,o){o.props=Ma(e.type,e.memoizedProps),o.state=e.memoizedState,Go(e)?(Qo(),Y(e,zC,e,n,o),Xo()):Y(e,zC,e,n,o)}function UR(e){var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}if(typeof n==="function")if(Go(e))try{Qo(),e.refCleanup=n(o)}finally{Xo()}else e.refCleanup=n(o);else typeof n==="string"?console.error("String refs are no longer supported."):n.hasOwnProperty("current")||console.error("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",P(e)),n.current=o}}function Ac(e,n){try{Y(e,UR,e)}catch(o){Je(e,n,o)}}function Wo(e,n){var{ref:o,refCleanup:a}=e;if(o!==null)if(typeof a==="function")try{if(Go(e))try{Qo(),Y(e,a)}finally{Xo(e)}else Y(e,a)}catch(u){Je(e,n,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof o==="function")try{if(Go(e))try{Qo(),Y(e,o,null)}finally{Xo(e)}else Y(e,o,null)}catch(u){Je(e,n,u)}else o.current=null}function Nw(e,n,o,a){var u=e.memoizedProps,f=u.id,p=u.onCommit;u=u.onRender,n=n===null?"mount":"update",Kd&&(n="nested-update"),typeof u==="function"&&u(f,n,e.actualDuration,e.treeBaseDuration,e.actualStartTime,o),typeof p==="function"&&p(f,n,a,o)}function qR(e,n,o,a){var u=e.memoizedProps;e=u.id,u=u.onPostCommit,n=n===null?"mount":"update",Kd&&(n="nested-update"),typeof u==="function"&&u(e,n,a,o)}function _w(e){var{type:n,memoizedProps:o,stateNode:a}=e;try{Y(e,uL,a,n,o,e)}catch(u){Je(e,e.return,u)}}function u0(e,n,o){try{Y(e,fL,e.stateNode,e.type,o,n,e)}catch(a){Je(e,e.return,a)}}function Uw(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&xs(e.type)||e.tag===4}function c0(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Uw(e.return))return null;e=e.return}e.sibling.return=e.return;for(e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&xs(e.type))continue e;if(e.flags&2)continue e;if(e.child===null||e.tag===4)continue e;else e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function f0(e,n,o){var a=e.tag;if(a===5||a===6)e=e.stateNode,n?(Yx(o),(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(e,n)):(Yx(o),n=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,n.appendChild(e),o=o._reactRootContainer,o!==null&&o!==void 0||n.onclick!==null||(n.onclick=Al));else if(a!==4&&(a===27&&xs(e.type)&&(o=e.stateNode,n=null),e=e.child,e!==null))for(f0(e,n,o),e=e.sibling;e!==null;)f0(e,n,o),e=e.sibling}function dd(e,n,o){var a=e.tag;if(a===5||a===6)e=e.stateNode,n?o.insertBefore(e,n):o.appendChild(e);else if(a!==4&&(a===27&&xs(e.type)&&(o=e.stateNode),e=e.child,e!==null))for(dd(e,n,o),e=e.sibling;e!==null;)dd(e,n,o),e=e.sibling}function VR(e){for(var n,o=e.return;o!==null;){if(Uw(o)){n=o;break}o=o.return}if(n==null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");switch(n.tag){case 27:n=n.stateNode,o=c0(e),dd(e,o,n);break;case 5:o=n.stateNode,n.flags&32&&(Px(o),n.flags&=-33),n=c0(e),dd(e,n,o);break;case 3:case 4:n=n.stateNode.containerInfo,o=c0(e),f0(e,o,n);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function qw(e){var{stateNode:n,memoizedProps:o}=e;try{Y(e,EL,e.type,o,n,e)}catch(a){Je(e,e.return,a)}}function Vw(e,n){return n.tag===31?(n=n.memoizedState,e.memoizedState!==null&&n===null):n.tag===13?(e=e.memoizedState,n=n.memoizedState,e!==null&&e.dehydrated!==null&&(n===null||n.dehydrated===null)):n.tag===3?e.memoizedState.isDehydrated&&(n.flags&256)===0:!1}function jR(e,n){if(e=e.containerInfo,cb=Bp,e=nS(e),Gm(e)){if("selectionStart"in e)var o={start:e.selectionStart,end:e.selectionEnd};else e:{o=(o=e.ownerDocument)&&o.defaultView||window;var a=o.getSelection&&o.getSelection();if(a&&a.rangeCount!==0){o=a.anchorNode;var{anchorOffset:u,focusNode:f}=a;a=a.focusOffset;try{o.nodeType,f.nodeType}catch(X){o=null;break e}var p=0,g=-1,v=-1,x=0,D=0,O=e,A=null;t:for(;;){for(var B;;){if(O!==o||u!==0&&O.nodeType!==3||(g=p+u),O!==f||a!==0&&O.nodeType!==3||(v=p+a),O.nodeType===3&&(p+=O.nodeValue.length),(B=O.firstChild)===null)break;A=O,O=B}for(;;){if(O===e)break t;if(A===o&&++x===u&&(g=p),A===f&&++D===a&&(v=p),(B=O.nextSibling)!==null)break;O=A,A=O.parentNode}O=B}o=g===-1||v===-1?null:{start:g,end:v}}else o=null}o=o||{start:0,end:0}}else o=null;fb={focusedElem:e,selectionRange:o},Bp=!1;for(hn=n;hn!==null;)if(n=hn,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,hn=e;else for(;hn!==null;){switch(e=n=hn,o=e.alternate,u=e.flags,e.tag){case 0:if((u&4)!==0&&(e=e.updateQueue,e=e!==null?e.events:null,e!==null))for(o=0;o<e.length;o++)u=e[o],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:(u&1024)!==0&&o!==null&&_R(e,o);break;case 3:if((u&1024)!==0){if(e=e.stateNode.containerInfo,o=e.nodeType,o===9)R0(e);else if(o===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":R0(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((u&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(e=n.sibling,e!==null){e.return=n.return,hn=e;break}hn=n.return}}function jw(e,n,o){var a=ci(),u=Io(),f=Po(),p=Yo(),g=o.flags;switch(o.tag){case 0:case 11:case 15:Fo(e,o),g&4&&Lw(o,Si|$i);break;case 1:if(Fo(e,o),g&4)if(e=o.stateNode,n===null)o.type.defaultProps||"ref"in o.memoizedProps||cu||(e.props!==o.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.",P(o)||"instance"),e.state!==o.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.",P(o)||"instance")),Go(o)?(Qo(),Y(o,Ly,o,e),Xo()):Y(o,Ly,o,e);else{var v=Ma(o.type,n.memoizedProps);n=n.memoizedState,o.type.defaultProps||"ref"in o.memoizedProps||cu||(e.props!==o.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.",P(o)||"instance"),e.state!==o.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.",P(o)||"instance")),Go(o)?(Qo(),Y(o,RC,o,e,v,n,e.__reactInternalSnapshotBeforeUpdate),Xo()):Y(o,RC,o,e,v,n,e.__reactInternalSnapshotBeforeUpdate)}g&64&&zw(o),g&512&&Ac(o,o.return);break;case 3:if(n=Dl(),Fo(e,o),g&64&&(g=o.updateQueue,g!==null)){if(v=null,o.child!==null)switch(o.child.tag){case 27:case 5:v=o.child.stateNode;break;case 1:v=o.child.stateNode}try{Y(o,NS,g,v)}catch(D){Je(o,o.return,D)}}e.effectDuration+=Vh(n);break;case 27:n===null&&g&4&&qw(o);case 26:case 5:if(Fo(e,o),n===null){if(g&4)_w(o);else if(g&64){e=o.type,n=o.memoizedProps,v=o.stateNode;try{Y(o,cL,v,e,n,o)}catch(D){Je(o,o.return,D)}}}g&512&&Ac(o,o.return);break;case 12:if(g&4){g=Dl(),Fo(e,o),e=o.stateNode,e.effectDuration+=dc(g);try{Y(o,Nw,o,n,Ls,e.effectDuration)}catch(D){Je(o,o.return,D)}}else Fo(e,o);break;case 31:Fo(e,o),g&4&&Pw(e,o);break;case 13:Fo(e,o),g&4&&Yw(e,o),g&64&&(e=o.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(g=FR.bind(null,o),kL(e,g))));break;case 22:if(g=o.memoizedState!==null||Yl,!g){n=n!==null&&n.memoizedState!==null||Zt,v=Yl;var x=Zt;Yl=g,(Zt=n)&&!x?(Jo(e,o,(o.subtreeFlags&8772)!==0),(o.mode&we)!==pe&&0<=se&&0<=ue&&0.05<ue-se&&Oh(o,se,ue)):Fo(e,o),Yl=v,Zt=x}break;case 30:break;default:Fo(e,o)}(o.mode&we)!==pe&&0<=se&&0<=ue&&((zt||0.05<Dt)&&Vo(o,se,ue,Dt,xt),o.alternate===null&&o.return!==null&&o.return.alternate!==null&&0.05<ue-se&&(Vw(o.return.alternate,o.return)||qo(o,se,ue,"Mount"))),fi(a),$o(u),xt=f,zt=p}function Iw(e){var n=e.alternate;n!==null&&(e.alternate=null,Iw(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Rn(n)),e.stateNode=null,e._debugOwner=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ll(e,n,o){for(o=o.child;o!==null;)$w(e,n,o),o=o.sibling}function $w(e,n,o){if(An&&typeof An.onCommitFiberUnmount==="function")try{An.onCommitFiberUnmount(Vr,o)}catch(x){il||(il=!0,console.error("React instrumentation encountered an error: %o",x))}var a=ci(),u=Io(),f=Po(),p=Yo();switch(o.tag){case 26:Zt||Wo(o,n),Ll(e,n,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(e=o.stateNode,e.parentNode.removeChild(e));break;case 27:Zt||Wo(o,n);var g=Kt,v=ti;xs(o.type)&&(Kt=o.stateNode,ti=!1),Ll(e,n,o),Y(o,zc,o.stateNode),Kt=g,ti=v;break;case 5:Zt||Wo(o,n);case 6:if(g=Kt,v=ti,Kt=null,Ll(e,n,o),Kt=g,ti=v,Kt!==null)if(ti)try{Y(o,pL,Kt,o.stateNode)}catch(x){Je(o,n,x)}else try{Y(o,dL,Kt,o.stateNode)}catch(x){Je(o,n,x)}break;case 18:Kt!==null&&(ti?(e=Kt,Xx(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,o.stateNode),Nr(e)):Xx(Kt,o.stateNode));break;case 4:g=Kt,v=ti,Kt=o.stateNode.containerInfo,ti=!0,Ll(e,n,o),Kt=g,ti=v;break;case 0:case 11:case 14:case 15:Mr(qn,o,n),Zt||a0(o,n,Si),Ll(e,n,o);break;case 1:Zt||(Wo(o,n),g=o.stateNode,typeof g.componentWillUnmount==="function"&&Hw(o,n,g)),Ll(e,n,o);break;case 21:Ll(e,n,o);break;case 22:Zt=(g=Zt)||o.memoizedState!==null,Ll(e,n,o),Zt=g;break;default:Ll(e,n,o)}(o.mode&we)!==pe&&0<=se&&0<=ue&&(zt||0.05<Dt)&&Vo(o,se,ue,Dt,xt),fi(a),$o(u),xt=f,zt=p}function Pw(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Y(n,AL,e)}catch(o){Je(n,n.return,o)}}}function Yw(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Y(n,TL,e)}catch(o){Je(n,n.return,o)}}function IR(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new gA),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new gA),n;default:throw Error("Unexpected Suspense handler tag ("+e.tag+"). This is a bug in React.")}}function pd(e,n){var o=IR(e);n.forEach(function(a){if(!o.has(a)){if(o.add(a),ol)if(fu!==null&&hu!==null)Dc(hu,fu);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");var u=JR.bind(null,e,a);a.then(u,u)}})}function Kn(e,n){var o=n.deletions;if(o!==null)for(var a=0;a<o.length;a++){var u=e,f=n,p=o[a],g=ci(),v=f;e:for(;v!==null;){switch(v.tag){case 27:if(xs(v.type)){Kt=v.stateNode,ti=!1;break e}break;case 5:Kt=v.stateNode,ti=!1;break e;case 3:case 4:Kt=v.stateNode.containerInfo,ti=!0;break e}v=v.return}if(Kt===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");$w(u,f,p),Kt=null,ti=!1,(p.mode&we)!==pe&&0<=se&&0<=ue&&0.05<ue-se&&qo(p,se,ue,"Unmount"),fi(g),u=p,f=u.alternate,f!==null&&(f.return=null),u.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)Xw(n,e),n=n.sibling}function Xw(e,n){var o=ci(),a=Io(),u=Po(),f=Yo(),p=e.alternate,g=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Kn(n,e),ei(e),g&4&&(Mr(qn|$i,e,e.return),Cc(qn|$i,e),a0(e,e.return,Si|$i));break;case 1:if(Kn(n,e),ei(e),g&512&&(Zt||p===null||Wo(p,p.return)),g&64&&Yl&&(g=e.updateQueue,g!==null&&(p=g.callbacks,p!==null))){var v=g.shared.hiddenCallbacks;g.shared.hiddenCallbacks=v===null?p:v.concat(p)}break;case 26:if(v=yo,Kn(n,e),ei(e),g&512&&(Zt||p===null||Wo(p,p.return)),g&4){var x=p!==null?p.memoizedState:null;if(g=e.memoizedState,p===null)if(g===null)if(e.stateNode===null){e:{g=e.type,p=e.memoizedProps,v=v.ownerDocument||v;t:switch(g){case"title":if(x=v.getElementsByTagName("title")[0],!x||x[jc]||x[bn]||x.namespaceURI===Ir||x.hasAttribute("itemprop"))x=v.createElement(g),v.head.insertBefore(x,v.querySelector("head > title"));yn(x,g,p),x[bn]=e,Mt(x),g=x;break e;case"link":var D=ik("link","href",v).get(g+(p.href||""));if(D){for(var O=0;O<D.length;O++)if(x=D[O],x.getAttribute("href")===(p.href==null||p.href===""?null:p.href)&&x.getAttribute("rel")===(p.rel==null?null:p.rel)&&x.getAttribute("title")===(p.title==null?null:p.title)&&x.getAttribute("crossorigin")===(p.crossOrigin==null?null:p.crossOrigin)){D.splice(O,1);break t}}x=v.createElement(g),yn(x,g,p),v.head.appendChild(x);break;case"meta":if(D=ik("meta","content",v).get(g+(p.content||""))){for(O=0;O<D.length;O++)if(x=D[O],be(p.content,"content"),x.getAttribute("content")===(p.content==null?null:""+p.content)&&x.getAttribute("name")===(p.name==null?null:p.name)&&x.getAttribute("property")===(p.property==null?null:p.property)&&x.getAttribute("http-equiv")===(p.httpEquiv==null?null:p.httpEquiv)&&x.getAttribute("charset")===(p.charSet==null?null:p.charSet)){D.splice(O,1);break t}}x=v.createElement(g),yn(x,g,p),v.head.appendChild(x);break;default:throw Error('getNodesForType encountered a type it did not expect: "'+g+'". This is a bug in React.')}x[bn]=e,Mt(x),g=x}e.stateNode=g}else ok(v,e.type,e.stateNode);else e.stateNode=nk(v,g,e.memoizedProps);else x!==g?(x===null?p.stateNode!==null&&(p=p.stateNode,p.parentNode.removeChild(p)):x.count--,g===null?ok(v,e.type,e.stateNode):nk(v,g,e.memoizedProps)):g===null&&e.stateNode!==null&&u0(e,e.memoizedProps,p.memoizedProps)}break;case 27:Kn(n,e),ei(e),g&512&&(Zt||p===null||Wo(p,p.return)),p!==null&&g&4&&u0(e,e.memoizedProps,p.memoizedProps);break;case 5:if(Kn(n,e),ei(e),g&512&&(Zt||p===null||Wo(p,p.return)),e.flags&32){v=e.stateNode;try{Y(e,Px,v)}catch(Z){Je(e,e.return,Z)}}g&4&&e.stateNode!=null&&(v=e.memoizedProps,u0(e,v,p!==null?p.memoizedProps:v)),g&1024&&(Yy=!0,e.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."));break;case 6:if(Kn(n,e),ei(e),g&4){if(e.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.");g=e.memoizedProps,p=p!==null?p.memoizedProps:g,v=e.stateNode;try{Y(e,hL,v,p,g)}catch(Z){Je(e,e.return,Z)}}break;case 3:if(v=Dl(),Op=null,x=yo,yo=xd(n.containerInfo),Kn(n,e),yo=x,ei(e),g&4&&p!==null&&p.memoizedState.isDehydrated)try{Y(e,CL,n.containerInfo)}catch(Z){Je(e,e.return,Z)}Yy&&(Yy=!1,Qw(e)),n.effectDuration+=Vh(v);break;case 4:g=yo,yo=xd(e.stateNode.containerInfo),Kn(n,e),ei(e),yo=g;break;case 12:g=Dl(),Kn(n,e),ei(e),e.stateNode.effectDuration+=dc(g);break;case 31:Kn(n,e),ei(e),g&4&&(g=e.updateQueue,g!==null&&(e.updateQueue=null,pd(e,g)));break;case 13:Kn(n,e),ei(e),e.child.flags&8192&&e.memoizedState!==null!==(p!==null&&p.memoizedState!==null)&&(mp=cn()),g&4&&(g=e.updateQueue,g!==null&&(e.updateQueue=null,pd(e,g)));break;case 22:v=e.memoizedState!==null;var A=p!==null&&p.memoizedState!==null,B=Yl,X=Zt;if(Yl=B||v,Zt=X||A,Kn(n,e),Zt=X,Yl=B,A&&!v&&!B&&!X&&(e.mode&we)!==pe&&0<=se&&0<=ue&&0.05<ue-se&&Oh(e,se,ue),ei(e),g&8192)e:for(n=e.stateNode,n._visibility=v?n._visibility&~Fc:n._visibility|Fc,!v||p===null||A||Yl||Zt||(Da(e),(e.mode&we)!==pe&&0<=se&&0<=ue&&0.05<ue-se&&qo(e,se,ue,"Disconnect")),p=null,n=e;;){if(n.tag===5||n.tag===26){if(p===null){A=p=n;try{x=A.stateNode,v?Y(A,gL,x):Y(A,vL,A.stateNode,A.memoizedProps)}catch(Z){Je(A,A.return,Z)}}}else if(n.tag===6){if(p===null){A=n;try{D=A.stateNode,v?Y(A,yL,D):Y(A,SL,D,A.memoizedProps)}catch(Z){Je(A,A.return,Z)}}}else if(n.tag===18){if(p===null){A=n;try{O=A.stateNode,v?Y(A,mL,O):Y(A,bL,A.stateNode)}catch(Z){Je(A,A.return,Z)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;p===n&&(p=null),n=n.return}p===n&&(p=null),n.sibling.return=n.return,n=n.sibling}g&4&&(g=e.updateQueue,g!==null&&(p=g.retryQueue,p!==null&&(g.retryQueue=null,pd(e,p))));break;case 19:Kn(n,e),ei(e),g&4&&(g=e.updateQueue,g!==null&&(e.updateQueue=null,pd(e,g)));break;case 30:break;case 21:break;default:Kn(n,e),ei(e)}(e.mode&we)!==pe&&0<=se&&0<=ue&&((zt||0.05<Dt)&&Vo(e,se,ue,Dt,xt),e.alternate===null&&e.return!==null&&e.return.alternate!==null&&0.05<ue-se&&(Vw(e.return.alternate,e.return)||qo(e,se,ue,"Mount"))),fi(o),$o(a),xt=u,zt=f}function ei(e){var n=e.flags;if(n&2){try{Y(e,VR,e)}catch(o){Je(e,e.return,o)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Qw(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;Qw(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function Fo(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)jw(e,n.alternate,n),n=n.sibling}function Gw(e){var n=ci(),o=Io(),a=Po(),u=Yo();switch(e.tag){case 0:case 11:case 14:case 15:a0(e,e.return,Si),Da(e);break;case 1:Wo(e,e.return);var f=e.stateNode;typeof f.componentWillUnmount==="function"&&Hw(e,e.return,f),Da(e);break;case 27:Y(e,zc,e.stateNode);case 26:case 5:Wo(e,e.return),Da(e);break;case 22:e.memoizedState===null&&Da(e);break;case 30:Da(e);break;default:Da(e)}(e.mode&we)!==pe&&0<=se&&0<=ue&&(zt||0.05<Dt)&&Vo(e,se,ue,Dt,xt),fi(n),$o(o),xt=a,zt=u}function Da(e){for(e=e.child;e!==null;)Gw(e),e=e.sibling}function Ww(e,n,o,a){var u=ci(),f=Io(),p=Po(),g=Yo(),v=o.flags;switch(o.tag){case 0:case 11:case 15:Jo(e,o,a),Lw(o,Si);break;case 1:if(Jo(e,o,a),n=o.stateNode,typeof n.componentDidMount==="function"&&Y(o,Ly,o,n),n=o.updateQueue,n!==null){e=o.stateNode;try{Y(o,CR,n,e)}catch(x){Je(o,o.return,x)}}a&&v&64&&zw(o),Ac(o,o.return);break;case 27:qw(o);case 26:case 5:Jo(e,o,a),a&&n===null&&v&4&&_w(o),Ac(o,o.return);break;case 12:if(a&&v&4){v=Dl(),Jo(e,o,a),a=o.stateNode,a.effectDuration+=dc(v);try{Y(o,Nw,o,n,Ls,a.effectDuration)}catch(x){Je(o,o.return,x)}}else Jo(e,o,a);break;case 31:Jo(e,o,a),a&&v&4&&Pw(e,o);break;case 13:Jo(e,o,a),a&&v&4&&Yw(e,o);break;case 22:o.memoizedState===null&&Jo(e,o,a),Ac(o,o.return);break;case 30:break;default:Jo(e,o,a)}(o.mode&we)!==pe&&0<=se&&0<=ue&&(zt||0.05<Dt)&&Vo(o,se,ue,Dt,xt),fi(u),$o(f),xt=p,zt=g}function Jo(e,n,o){o=o&&(n.subtreeFlags&8772)!==0;for(n=n.child;n!==null;)Ww(e,n.alternate,n,o),n=n.sibling}function h0(e,n){var o=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(o=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==o&&(e!=null&&Ca(e),o!=null&&hc(o))}function d0(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(Ca(n),e!=null&&hc(e))}function co(e,n,o,a,u){if(n.subtreeFlags&10256||n.actualDuration!==0&&(n.alternate===null||n.alternate.child!==n.child))for(n=n.child;n!==null;){var f=n.sibling;Fw(e,n,o,a,f!==null?f.actualStartTime:u),n=f}}function Fw(e,n,o,a,u){var f=ci(),p=Io(),g=Po(),v=Yo(),x=Ms,D=n.flags;switch(n.tag){case 0:case 11:case 15:(n.mode&we)!==pe&&0<n.actualStartTime&&(n.flags&1)!==0&&Rh(n,n.actualStartTime,u,ln,o),co(e,n,o,a,u),D&2048&&Bw(n,Vn|$i);break;case 1:(n.mode&we)!==pe&&0<n.actualStartTime&&((n.flags&128)!==0?Fm(n,n.actualStartTime,u,[]):(n.flags&1)!==0&&Rh(n,n.actualStartTime,u,ln,o)),co(e,n,o,a,u);break;case 3:var O=Dl(),A=ln;ln=n.alternate!==null&&n.alternate.memoizedState.isDehydrated&&(n.flags&256)===0,co(e,n,o,a,u),ln=A,D&2048&&(o=null,n.alternate!==null&&(o=n.alternate.memoizedState.cache),a=n.memoizedState.cache,a!==o&&(Ca(a),o!=null&&hc(o))),e.passiveEffectDuration+=Vh(O);break;case 12:if(D&2048){D=Dl(),co(e,n,o,a,u),e=n.stateNode,e.passiveEffectDuration+=dc(D);try{Y(n,qR,n,n.alternate,Ls,e.passiveEffectDuration)}catch(B){Je(n,n.return,B)}}else co(e,n,o,a,u);break;case 31:D=ln,O=n.alternate!==null?n.alternate.memoizedState:null,A=n.memoizedState,O!==null&&A===null?(A=n.deletions,A!==null&&0<A.length&&A[0].tag===18?(ln=!1,O=O.hydrationErrors,O!==null&&Fm(n,n.actualStartTime,u,O)):ln=!0):ln=!1,co(e,n,o,a,u),ln=D;break;case 13:D=ln,O=n.alternate!==null?n.alternate.memoizedState:null,A=n.memoizedState,O===null||O.dehydrated===null||A!==null&&A.dehydrated!==null?ln=!1:(A=n.deletions,A!==null&&0<A.length&&A[0].tag===18?(ln=!1,O=O.hydrationErrors,O!==null&&Fm(n,n.actualStartTime,u,O)):ln=!0),co(e,n,o,a,u),ln=D;break;case 23:break;case 22:A=n.stateNode,O=n.alternate,n.memoizedState!==null?A._visibility&Hl?co(e,n,o,a,u):Tc(e,n,o,a,u):A._visibility&Hl?co(e,n,o,a,u):(A._visibility|=Hl,Dr(e,n,o,a,(n.subtreeFlags&10256)!==0||n.actualDuration!==0&&(n.alternate===null||n.alternate.child!==n.child),u),(n.mode&we)===pe||ln||(e=n.actualStartTime,0<=e&&0.05<u-e&&Oh(n,e,u),0<=se&&0<=ue&&0.05<ue-se&&Oh(n,se,ue))),D&2048&&h0(O,n);break;case 24:co(e,n,o,a,u),D&2048&&d0(n.alternate,n);break;default:co(e,n,o,a,u)}if((n.mode&we)!==pe){if(e=!ln&&n.alternate===null&&n.return!==null&&n.return.alternate!==null)o=n.actualStartTime,0<=o&&0.05<u-o&&qo(n,o,u,"Mount");0<=se&&0<=ue&&((zt||0.05<Dt)&&Vo(n,se,ue,Dt,xt),e&&0.05<ue-se&&qo(n,se,ue,"Mount"))}fi(f),$o(p),xt=g,zt=v,Ms=x}function Dr(e,n,o,a,u,f){u=u&&((n.subtreeFlags&10256)!==0||n.actualDuration!==0&&(n.alternate===null||n.alternate.child!==n.child));for(n=n.child;n!==null;){var p=n.sibling;Jw(e,n,o,a,u,p!==null?p.actualStartTime:f),n=p}}function Jw(e,n,o,a,u,f){var p=ci(),g=Io(),v=Po(),x=Yo(),D=Ms;u&&(n.mode&we)!==pe&&0<n.actualStartTime&&(n.flags&1)!==0&&Rh(n,n.actualStartTime,f,ln,o);var O=n.flags;switch(n.tag){case 0:case 11:case 15:Dr(e,n,o,a,u,f),Bw(n,Vn);break;case 23:break;case 22:var A=n.stateNode;n.memoizedState!==null?A._visibility&Hl?Dr(e,n,o,a,u,f):Tc(e,n,o,a,f):(A._visibility|=Hl,Dr(e,n,o,a,u,f)),u&&O&2048&&h0(n.alternate,n);break;case 24:Dr(e,n,o,a,u,f),u&&O&2048&&d0(n.alternate,n);break;default:Dr(e,n,o,a,u,f)}(n.mode&we)!==pe&&0<=se&&0<=ue&&(zt||0.05<Dt)&&Vo(n,se,ue,Dt,xt),fi(p),$o(g),xt=v,zt=x,Ms=D}function Tc(e,n,o,a,u){if(n.subtreeFlags&10256||n.actualDuration!==0&&(n.alternate===null||n.alternate.child!==n.child))for(var f=n.child;f!==null;){n=f.sibling;var p=e,g=o,v=a,x=n!==null?n.actualStartTime:u,D=Ms;(f.mode&we)!==pe&&0<f.actualStartTime&&(f.flags&1)!==0&&Rh(f,f.actualStartTime,x,ln,g);var O=f.flags;switch(f.tag){case 22:Tc(p,f,g,v,x),O&2048&&h0(f.alternate,f);break;case 24:Tc(p,f,g,v,x),O&2048&&d0(f.alternate,f);break;default:Tc(p,f,g,v,x)}Ms=D,f=n}}function Or(e,n,o){if(e.subtreeFlags&yf)for(e=e.child;e!==null;)Zw(e,n,o),e=e.sibling}function Zw(e,n,o){switch(e.tag){case 26:Or(e,n,o),e.flags&yf&&e.memoizedState!==null&&OL(o,yo,e.memoizedState,e.memoizedProps);break;case 5:Or(e,n,o);break;case 3:case 4:var a=yo;yo=xd(e.stateNode.containerInfo),Or(e,n,o),yo=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=yf,yf=16777216,Or(e,n,o),yf=a):Or(e,n,o));break;default:Or(e,n,o)}}function Kw(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function Ec(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var o=0;o<n.length;o++){var a=n[o],u=ci();hn=a,nx(a,e),(a.mode&we)!==pe&&0<=se&&0<=ue&&0.05<ue-se&&qo(a,se,ue,"Unmount"),fi(u)}Kw(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ex(e),e=e.sibling}function ex(e){var n=ci(),o=Io(),a=Po(),u=Yo();switch(e.tag){case 0:case 11:case 15:Ec(e),e.flags&2048&&r0(e,e.return,Vn|$i);break;case 3:var f=Dl();Ec(e),e.stateNode.passiveEffectDuration+=Vh(f);break;case 12:f=Dl(),Ec(e),e.stateNode.passiveEffectDuration+=dc(f);break;case 22:f=e.stateNode,e.memoizedState!==null&&f._visibility&Hl&&(e.return===null||e.return.tag!==13)?(f._visibility&=~Hl,md(e),(e.mode&we)!==pe&&0<=se&&0<=ue&&0.05<ue-se&&qo(e,se,ue,"Disconnect")):Ec(e);break;default:Ec(e)}(e.mode&we)!==pe&&0<=se&&0<=ue&&(zt||0.05<Dt)&&Vo(e,se,ue,Dt,xt),fi(n),$o(o),zt=u,xt=a}function md(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var o=0;o<n.length;o++){var a=n[o],u=ci();hn=a,nx(a,e),(a.mode&we)!==pe&&0<=se&&0<=ue&&0.05<ue-se&&qo(a,se,ue,"Unmount"),fi(u)}Kw(e)}for(e=e.child;e!==null;)tx(e),e=e.sibling}function tx(e){var n=ci(),o=Io(),a=Po(),u=Yo();switch(e.tag){case 0:case 11:case 15:r0(e,e.return,Vn),md(e);break;case 22:var f=e.stateNode;f._visibility&Hl&&(f._visibility&=~Hl,md(e));break;default:md(e)}(e.mode&we)!==pe&&0<=se&&0<=ue&&(zt||0.05<Dt)&&Vo(e,se,ue,Dt,xt),fi(n),$o(o),zt=u,xt=a}function nx(e,n){for(;hn!==null;){var o=hn,a=o,u=n,f=ci(),p=Io(),g=Po(),v=Yo();switch(a.tag){case 0:case 11:case 15:r0(a,u,Vn);break;case 23:case 22:a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool,u!=null&&Ca(u));break;case 24:hc(a.memoizedState.cache)}if((a.mode&we)!==pe&&0<=se&&0<=ue&&(zt||0.05<Dt)&&Vo(a,se,ue,Dt,xt),fi(f),$o(p),zt=v,xt=g,a=o.child,a!==null)a.return=o,hn=a;else e:for(o=e;hn!==null;){if(a=hn,f=a.sibling,p=a.return,Iw(a),a===o){hn=null;break e}if(f!==null){f.return=p,hn=f;break e}hn=p}}}function $R(){cz.forEach(function(e){return e()})}function ix(){var e=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return e||H.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),e}function di(e){if((je&sn)!==dn&&ke!==0)return ke&-ke;var n=H.T;return n!==null?(n._updatedFibers||(n._updatedFibers=new Set),n._updatedFibers.add(e),w0()):vl()}function ox(){if(ii===0)if((ke&536870912)===0||Le){var e=zd;zd<<=1,(zd&3932160)===0&&(zd=262144),ii=e}else ii=536870912;return e=vi.current,e!==null&&(e.flags|=32),ii}function Bt(e,n,o){if(mu&&console.error("useInsertionEffect must not schedule updates."),nb&&(vp=!0),e===ut&&(tt===Pa||tt===Ya)||e.cancelPendingCommit!==null)Lr(e,0),Ss(e,ke,ii,!1);if(Ho(e,o),(je&sn)!==dn&&e===ut){if(nl)switch(n.tag){case 0:case 11:case 15:e=Ce&&P(Ce)||"Unknown",RA.has(e)||(RA.add(e),n=P(n)||"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",n,e,e));break;case 1:OA||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),OA=!0)}}else ol&&Li(e,n,o),KR(n),e===ut&&((je&sn)===dn&&(js|=o),Ot===Us&&Ss(e,ke,ii,!1)),Zo(e)}function lx(e,n,o){if((je&(sn|wi))!==dn)throw Error("Should not already be working.");if(ke!==0&&Ce!==null){var a=Ce,u=cn();switch(kC){case Sf:case Pa:var f=nf;gt&&((a=a._debugTask)?a.run(console.timeStamp.bind(console,"Suspended",f,u,Hi,void 0,"primary-light")):console.timeStamp("Suspended",f,u,Hi,void 0,"primary-light"));break;case Ya:f=nf,gt&&((a=a._debugTask)?a.run(console.timeStamp.bind(console,"Action",f,u,Hi,void 0,"primary-light")):console.timeStamp("Action",f,u,Hi,void 0,"primary-light"));break;default:gt&&(a=u-nf,3>a||console.timeStamp("Blocked",nf,u,Hi,void 0,5>a?"primary-light":10>a?"primary":100>a?"primary-dark":"error"))}}f=(o=!o&&(n&127)===0&&(n&e.expiredLanes)===0||no(e,n))?YR(e,n):m0(e,n,!0);var p=o;do{if(f===Xl){du&&!o&&Ss(e,n,0,!1),n=tt,nf=Wt(),kC=n;break}else{if(a=cn(),u=e.current.alternate,p&&!PR(u)){ri(n),u=fn,f=a,!gt||f<=u||(Vt?Vt.run(console.timeStamp.bind(console,"Teared Render",u,f,Oe,Me,"error")):console.timeStamp("Teared Render",u,f,Oe,Me,"error")),Oa(n,a),f=m0(e,n,!1),p=!1;continue}if(f===$a){if(p=n,e.errorRecoveryDisabledLanes&p)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){ri(n),Jm(fn,a,n,Vt),Oa(n,a),n=g;e:{a=e,f=p,p=xf;var v=a.current.memoizedState.isDehydrated;if(v&&(Lr(a,g).flags|=256),g=m0(a,g,!1),g!==$a){if(Gy&&!v){a.errorRecoveryDisabledLanes|=f,js|=f,f=Us;break e}a=jn,jn=p,a!==null&&(jn===null?jn=a:jn.push.apply(jn,a))}f=g}if(p=!1,f!==$a)continue;else a=cn()}}if(f===vf){ri(n),Jm(fn,a,n,Vt),Oa(n,a),Lr(e,0),Ss(e,n,0,!0);break}e:{switch(o=e,f){case Xl:case vf:throw Error("Root did not complete. This is a bug in React.");case Us:if((n&4194048)!==n)break;case fp:ri(n),lS(fn,a,n,Vt),Oa(n,a),u=n,(u&127)!==0?Fd=a:(u&4194048)!==0&&(Jd=a),Ss(o,n,ii,!qs);break e;case $a:jn=null;break;case cp:case yA:break;default:throw Error("Unknown root exit status.")}if(H.actQueue!==null)g0(o,u,n,jn,kf,pp,ii,js,Xa,f,null,null,fn,a);else{if((n&62914560)===n&&(p=mp+SA-cn(),10<p)){if(Ss(o,n,ii,!qs),to(o,0,!0)!==0)break e;bo=n,o.timeoutHandle=qA(sx.bind(null,o,u,jn,kf,pp,n,ii,js,Xa,qs,f,"Throttled",fn,a),p);break e}sx(o,u,jn,kf,pp,n,ii,js,Xa,qs,f,null,fn,a)}}}break}while(1);Zo(e)}function sx(e,n,o,a,u,f,p,g,v,x,D,O,A,B){e.timeoutHandle=Ja;var X=n.subtreeFlags,Z=null;if(X&8192||(X&16785408)===16785408){if(Z={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Al},Zw(n,f,Z),X=(f&62914560)===f?mp-cn():(f&4194048)===f?vA-cn():0,X=RL(Z,X),X!==null){bo=f,e.cancelPendingCommit=X(g0.bind(null,e,n,f,o,a,u,p,g,v,D,Z,Z.waitingForViewTransition?"Waiting for the previous Animation":0<Z.count?0<Z.imgCount?"Suspended on CSS and Images":"Suspended on CSS":Z.imgCount===1?"Suspended on an Image":0<Z.imgCount?"Suspended on Images":null,A,B)),Ss(e,f,p,!x);return}}g0(e,n,f,o,a,u,p,g,v,D,Z,O,A,B)}function PR(e){for(var n=e;;){var o=n.tag;if((o===0||o===11||o===15)&&n.flags&16384&&(o=n.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var a=0;a<o.length;a++){var u=o[a],f=u.getSnapshot;u=u.value;try{if(!_n(f(),u))return!1}catch(p){return!1}}if(o=n.child,n.subtreeFlags&16384&&o!==null)o.return=n,n=o;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Ss(e,n,o,a){n&=~Wy,n&=~js,e.suspendedLanes|=n,e.pingedLanes&=~n,a&&(e.warmLanes|=n),a=e.expirationTimes;for(var u=n;0<u;){var f=31-zn(u),p=1<<f;a[f]=-1,u&=~p}o!==0&&us(e,o,n)}function Rr(){return(je&(sn|wi))===dn?(Oc(0,!1),!1):!0}function p0(){if(Ce!==null){if(tt===ni)var e=Ce.return;else e=Ce,_h(),Ag(e),ou=null,hf=0,e=Ce;for(;e!==null;)Rw(e.alternate,e),e=e.return;Ce=null}}function Oa(e,n){(e&127)!==0&&(Bs=n),(e&4194048)!==0&&(ul=n),(e&62914560)!==0&&(wC=n),(e&2080374784)!==0&&(xC=n)}function Lr(e,n){gt&&(console.timeStamp("Blocking Track",0.003,0.003,"Blocking",Me,"primary-light"),console.timeStamp("Transition Track",0.003,0.003,"Transition",Me,"primary-light"),console.timeStamp("Suspense Track",0.003,0.003,"Suspense",Me,"primary-light"),console.timeStamp("Idle Track",0.003,0.003,"Idle",Me,"primary-light"));var o=fn;if(fn=Wt(),ke!==0&&0<o){if(ri(ke),Ot===cp||Ot===Us)lS(o,fn,n,Vt);else{var a=fn,u=Vt;if(gt&&!(a<=o)){var f=(n&738197653)===n?"tertiary-dark":"primary-dark",p=(n&536870912)===n?"Prewarm":(n&201326741)===n?"Interrupted Hydration":"Interrupted Render";u?u.run(console.timeStamp.bind(console,p,o,a,Oe,Me,f)):console.timeStamp(p,o,a,Oe,Me,f)}}Oa(ke,fn)}if(o=Vt,Vt=null,(n&127)!==0){Vt=Kc,u=0<=rl&&rl<Bs?Bs:rl,a=0<=Ha&&Ha<Bs?Bs:Ha,f=0<=a?a:0<=u?u:fn,0<=Fd?(ri(2),sS(Fd,f,n,o)):(Zd&127)!==0&&(ri(2),cc(Bs,f,jl)),o=u;var g=a,v=ef,x=0<tu,D=zs===Zc,O=zs===Wd;if(u=fn,a=Kc,f=Ey,p=My,gt){if(Oe="Blocking",0<o?o>u&&(o=u):o=u,0<g?g>o&&(g=o):g=o,v!==null&&o>g){var A=x?"secondary-light":"warning";a?a.run(console.timeStamp.bind(console,x?"Consecutive":"Event: "+v,g,o,Oe,Me,A)):console.timeStamp(x?"Consecutive":"Event: "+v,g,o,Oe,Me,A)}u>o&&(g=D?"error":(n&738197653)===n?"tertiary-light":"primary-light",D=O?"Promise Resolved":D?"Cascading Update":5<u-o?"Update Blocked":"Update",O=[],p!=null&&O.push(["Component name",p]),f!=null&&O.push(["Method name",f]),o={start:o,end:u,detail:{devtools:{properties:O,track:Oe,trackGroup:Me,color:g}}},a?a.run(performance.measure.bind(performance,D,o)):performance.measure(D,o))}rl=-1.1,zs=0,My=Ey=null,Fd=-1.1,tu=Ha,Ha=-1.1,Bs=Wt()}if((n&4194048)!==0&&(Vt=tf,u=0<=Vl&&Vl<ul?ul:Vl,o=0<=ji&&ji<ul?ul:ji,a=0<=Hs&&Hs<ul?ul:Hs,f=0<=a?a:0<=o?o:fn,0<=Jd?(ri(256),sS(Jd,f,n,Vt)):(Zd&4194048)!==0&&(ri(256),cc(ul,f,jl)),O=a,g=Na,v=0<Ns,x=Dy===Wd,f=fn,a=tf,p=vC,D=SC,gt&&(Oe="Transition",0<o?o>f&&(o=f):o=f,0<u?u>o&&(u=o):u=o,0<O?O>u&&(O=u):O=u,u>O&&g!==null&&(A=v?"secondary-light":"warning",a?a.run(console.timeStamp.bind(console,v?"Consecutive":"Event: "+g,O,u,Oe,Me,A)):console.timeStamp(v?"Consecutive":"Event: "+g,O,u,Oe,Me,A)),o>u&&(a?a.run(console.timeStamp.bind(console,"Action",u,o,Oe,Me,"primary-dark")):console.timeStamp("Action",u,o,Oe,Me,"primary-dark")),f>o&&(u=x?"Promise Resolved":5<f-o?"Update Blocked":"Update",O=[],D!=null&&O.push(["Component name",D]),p!=null&&O.push(["Method name",p]),o={start:o,end:f,detail:{devtools:{properties:O,track:Oe,trackGroup:Me,color:"primary-light"}}},a?a.run(performance.measure.bind(performance,u,o)):performance.measure(u,o))),ji=Vl=-1.1,Dy=0,Jd=-1.1,Ns=Hs,Hs=-1.1,ul=Wt()),(n&62914560)!==0&&(Zd&62914560)!==0&&(ri(4194304),cc(wC,fn,jl)),(n&2080374784)!==0&&(Zd&2080374784)!==0&&(ri(268435456),cc(xC,fn,jl)),o=e.timeoutHandle,o!==Ja&&(e.timeoutHandle=Ja,kz(o)),o=e.cancelPendingCommit,o!==null&&(e.cancelPendingCommit=null,o()),bo=0,p0(),ut=e,Ce=o=Tl(e.current,null),ke=n,tt=ni,xi=null,qs=!1,du=no(e,n),Gy=!1,Ot=Xl,Xa=ii=Wy=js=Vs=0,jn=xf=null,pp=!1,(n&8)!==0&&(n|=n&32),a=e.entangledLanes,a!==0)for(e=e.entanglements,a&=n;0<a;)u=31-zn(a),f=1<<u,n|=e[u],a&=~f;return fl=n,Lh(),e=dC(),1000<e-hC&&(H.recentlyCreatedOwnerStacks=0,hC=e),mo.discardPendingWarnings(),o}function ax(e,n){me=null,H.H=gf,H.getCurrentStack=null,nl=!1,gi=null,n===iu||n===np?(n=MS(),tt=Sf):n===By?(n=MS(),tt=bA):tt=n===$y?Qy:n!==null&&typeof n==="object"&&typeof n.then==="function"?wf:hp,xi=n;var o=Ce;o===null?(Ot=vf,rd(e,ui(n,e.current))):o.mode&we&&hg(o)}function rx(){var e=vi.current;return e===null?!0:(ke&4194048)===ke?Ii===null?!0:!1:(ke&62914560)===ke||(ke&536870912)!==0?e===Ii:!1}function ux(){var e=H.H;return H.H=gf,e===null?gf:e}function cx(){var e=H.A;return H.A=uz,e}function gd(e){Vt===null&&(Vt=e._debugTask==null?null:e._debugTask)}function yd(){Ot=Us,qs||(ke&4194048)!==ke&&vi.current!==null||(du=!0),(Vs&134217727)===0&&(js&134217727)===0||ut===null||Ss(ut,ke,ii,!1)}function m0(e,n,o){var a=je;je|=sn;var u=ux(),f=cx();if(ut!==e||ke!==n){if(ol){var p=e.memoizedUpdaters;0<p.size&&(Dc(e,ke),p.clear()),bl(e,n)}kf=null,Lr(e,n)}n=!1,p=Ot;e:do try{if(tt!==ni&&Ce!==null){var g=Ce,v=xi;switch(tt){case Qy:p0(),p=fp;break e;case Sf:case Pa:case Ya:case wf:vi.current===null&&(n=!0);var x=tt;if(tt=ni,xi=null,Br(e,g,v,x),o&&du){p=Xl;break e}break;default:x=tt,tt=ni,xi=null,Br(e,g,v,x)}}fx(),p=Ot;break}catch(D){ax(e,D)}while(1);return n&&e.shellSuspendCounter++,_h(),je=a,H.H=u,H.A=f,Ce===null&&(ut=null,ke=0,Lh()),p}function fx(){for(;Ce!==null;)hx(Ce)}function YR(e,n){var o=je;je|=sn;var a=ux(),u=cx();if(ut!==e||ke!==n){if(ol){var f=e.memoizedUpdaters;0<f.size&&(Dc(e,ke),f.clear()),bl(e,n)}kf=null,gp=cn()+wA,Lr(e,n)}else du=no(e,n);e:do try{if(tt!==ni&&Ce!==null)t:switch(n=Ce,f=xi,tt){case hp:tt=ni,xi=null,Br(e,n,f,hp);break;case Pa:case Ya:if(TS(f)){tt=ni,xi=null,dx(n);break}n=function(){tt!==Pa&&tt!==Ya||ut!==e||(tt=dp),Zo(e)},f.then(n,n);break e;case Sf:tt=dp;break e;case bA:tt=Xy;break e;case dp:TS(f)?(tt=ni,xi=null,dx(n)):(tt=ni,xi=null,Br(e,n,f,dp));break;case Xy:var p=null;switch(Ce.tag){case 26:p=Ce.memoizedState;case 5:case 27:var g=Ce;if(p?lk(p):g.stateNode.complete){tt=ni,xi=null;var v=g.sibling;if(v!==null)Ce=v;else{var x=g.return;x!==null?(Ce=x,bd(x)):Ce=null}break t}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}tt=ni,xi=null,Br(e,n,f,Xy);break;case wf:tt=ni,xi=null,Br(e,n,f,wf);break;case Qy:p0(),Ot=fp;break e;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}H.actQueue!==null?fx():XR();break}catch(D){ax(e,D)}while(1);if(_h(),H.H=a,H.A=u,je=o,Ce!==null)return Xl;return ut=null,ke=0,Lh(),Ot}function XR(){for(;Ce!==null&&!PL();)hx(Ce)}function hx(e){var n=e.alternate;(e.mode&we)!==pe?(fg(e),n=Y(e,l0,n,e,fl),hg(e)):n=Y(e,l0,n,e,fl),e.memoizedProps=e.pendingProps,n===null?bd(e):Ce=n}function dx(e){var n=Y(e,QR,e);e.memoizedProps=e.pendingProps,n===null?bd(e):Ce=n}function QR(e){var n=e.alternate,o=(e.mode&we)!==pe;switch(o&&fg(e),e.tag){case 15:case 0:n=Cw(n,e,e.pendingProps,e.type,void 0,ke);break;case 11:n=Cw(n,e,e.pendingProps,e.type.render,e.ref,ke);break;case 5:Ag(e);default:Rw(n,e),e=Ce=hS(e,fl),n=l0(n,e,fl)}return o&&hg(e),n}function Br(e,n,o,a){_h(),Ag(n),ou=null,hf=0;var u=n.return;try{if(RR(e,u,n,o,ke)){Ot=vf,rd(e,ui(o,e.current)),Ce=null;return}}catch(f){if(u!==null)throw Ce=u,f;Ot=vf,rd(e,ui(o,e.current)),Ce=null;return}if(n.flags&32768){if(Le||a===hp)e=!0;else if(du||(ke&536870912)!==0)e=!1;else if(qs=e=!0,a===Pa||a===Ya||a===Sf||a===wf)a=vi.current,a!==null&&a.tag===13&&(a.flags|=16384);px(n,e)}else bd(n)}function bd(e){var n=e;do{if((n.flags&32768)!==0){px(n,qs);return}var o=n.alternate;if(e=n.return,fg(n),o=Y(n,zR,o,n,fl),(n.mode&we)!==pe&&wS(n),o!==null){Ce=o;return}if(n=n.sibling,n!==null){Ce=n;return}Ce=n=e}while(n!==null);Ot===Xl&&(Ot=yA)}function px(e,n){do{var o=HR(e.alternate,e);if(o!==null){o.flags&=32767,Ce=o;return}if((e.mode&we)!==pe){wS(e),o=e.actualDuration;for(var a=e.child;a!==null;)o+=a.actualDuration,a=a.sibling;e.actualDuration=o}if(o=e.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!n&&(e=e.sibling,e!==null)){Ce=e;return}Ce=e=o}while(e!==null);Ot=fp,Ce=null}function g0(e,n,o,a,u,f,p,g,v,x,D,O,A,B){e.cancelPendingCommit=null;do Mc();while(en!==$s);if(mo.flushLegacyContextWarning(),mo.flushPendingUnsafeLifecycleWarnings(),(je&(sn|wi))!==dn)throw Error("Should not already be working.");if(ri(o),x===$a?Jm(A,B,o,Vt):a!==null?bR(A,B,o,a,n!==null&&n.alternate!==null&&n.alternate.memoizedState.isDehydrated&&(n.flags&256)!==0,Vt):yR(A,B,o,Vt),n!==null){if(o===0&&console.error("finishedLanes should not be empty during a commit. This is a bug in React."),n===e.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(f=n.lanes|n.childLanes,f|=xy,rs(e,o,f,p,g,v),e===ut&&(Ce=ut=null,ke=0),pu=n,Ps=e,bo=o,Zy=f,eb=u,EA=a,Ky=B,MA=O,vo=yp,DA=null,n.actualDuration!==0||(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,ZR(qr,function(){return Df=window.event,vo===yp&&(vo=Jy),vx(),null})):(e.callbackNode=null,e.callbackPriority=0),ql=null,Ls=Wt(),O!==null&&vR(B,Ls,O,Vt),a=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||a){a=H.T,H.T=null,u=Ze.p,Ze.p=yi,p=je,je|=wi;try{jR(e,n,o)}finally{je=p,Ze.p=u,H.T=a}}en=kA,mx(),gx(),yx()}}function mx(){if(en===kA){en=$s;var e=Ps,n=pu,o=bo,a=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||a){a=H.T,H.T=null;var u=Ze.p;Ze.p=yi;var f=je;je|=wi;try{fu=o,hu=e,jh(),Xw(n,e),hu=fu=null,o=fb;var p=nS(e.containerInfo),g=o.focusedElem,v=o.selectionRange;if(p!==g&&g&&g.ownerDocument&&tS(g.ownerDocument.documentElement,g)){if(v!==null&&Gm(g)){var{start:x,end:D}=v;if(D===void 0&&(D=x),"selectionStart"in g)g.selectionStart=x,g.selectionEnd=Math.min(D,g.value.length);else{var O=g.ownerDocument||document,A=O&&O.defaultView||window;if(A.getSelection){var B=A.getSelection(),X=g.textContent.length,Z=Math.min(v.start,X),dt=v.end===void 0?Z:Math.min(v.end,X);!B.extend&&Z>dt&&(p=dt,dt=Z,Z=p);var He=eS(g,Z),C=eS(g,dt);if(He&&C&&(B.rangeCount!==1||B.anchorNode!==He.node||B.anchorOffset!==He.offset||B.focusNode!==C.node||B.focusOffset!==C.offset)){var T=O.createRange();T.setStart(He.node,He.offset),B.removeAllRanges(),Z>dt?(B.addRange(T),B.extend(C.node,C.offset)):(T.setEnd(C.node,C.offset),B.addRange(T))}}}}O=[];for(B=g;B=B.parentNode;)B.nodeType===1&&O.push({element:B,left:B.scrollLeft,top:B.scrollTop});typeof g.focus==="function"&&g.focus();for(g=0;g<O.length;g++){var M=O[g];M.element.scrollLeft=M.left,M.element.scrollTop=M.top}}Bp=!!cb,fb=cb=null}finally{je=f,Ze.p=u,H.T=a}}e.current=n,en=CA}}function gx(){if(en===CA){en=$s;var e=DA;if(e!==null){Ls=Wt();var n=Ul,o=Ls;!gt||o<=n||(jl?jl.run(console.timeStamp.bind(console,e,n,o,Oe,Me,"secondary-light")):console.timeStamp(e,n,o,Oe,Me,"secondary-light"))}e=Ps,n=pu,o=bo;var a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=H.T,H.T=null;var u=Ze.p;Ze.p=yi;var f=je;je|=wi;try{fu=o,hu=e,jh(),jw(e,n.alternate,n),hu=fu=null}finally{je=f,Ze.p=u,H.T=a}}e=Ky,n=MA,Ul=Wt(),e=n===null?e:Ls,n=Ul,o=vo===Fy,a=Vt,ql!==null?aS(e,n,ql,!1,a):!gt||n<=e||(a?a.run(console.timeStamp.bind(console,o?"Commit Interrupted View Transition":"Commit",e,n,Oe,Me,o?"error":"secondary-dark")):console.timeStamp(o?"Commit Interrupted View Transition":"Commit",e,n,Oe,Me,o?"error":"secondary-dark")),en=AA}}function yx(){if(en===TA||en===AA){if(en===TA){var e=Ul;Ul=Wt();var n=Ul,o=vo===Fy;!gt||n<=e||(jl?jl.run(console.timeStamp.bind(console,o?"Interrupted View Transition":"Starting Animation",e,n,Oe,Me,o?"error":"secondary-light")):console.timeStamp(o?"Interrupted View Transition":"Starting Animation",e,n,Oe,Me,o?" error":"secondary-light")),vo!==Fy&&(vo=xA)}en=$s,YL(),e=Ps;var a=pu;n=bo,o=EA;var u=a.actualDuration!==0||(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0;u?en=bp:(en=$s,pu=Ps=null,bx(e,e.pendingLanes),Qa=0,Af=null);var f=e.pendingLanes;if(f===0&&(Is=null),u||kx(e),f=No(n),a=a.stateNode,An&&typeof An.onCommitFiberRoot==="function")try{var p=(a.current.flags&128)===128;switch(f){case yi:var g=ey;break;case ho:g=ty;break;case ll:g=qr;break;case Nd:g=ny;break;default:g=qr}An.onCommitFiberRoot(Vr,a,g,p)}catch(O){il||(il=!0,console.error("React instrumentation encountered an error: %o",O))}if(ol&&e.memoizedUpdaters.clear(),$R(),o!==null){p=H.T,g=Ze.p,Ze.p=yi,H.T=null;try{var v=e.onRecoverableError;for(a=0;a<o.length;a++){var x=o[a],D=GR(x.stack);Y(x.source,v,x.value,D)}}finally{H.T=p,Ze.p=g}}(bo&3)!==0&&Mc(),Zo(e),f=e.pendingLanes,(n&261930)!==0&&(f&42)!==0?(ep=!0,e===tb?Cf++:(Cf=0,tb=e)):Cf=0,u||Oa(n,Ul),Oc(0,!1)}}function GR(e){return e={componentStack:e},Object.defineProperty(e,"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.')}}),e}function bx(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,hc(n)))}function Mc(){return mx(),gx(),yx(),vx()}function vx(){if(en!==bp)return!1;var e=Ps,n=Zy;Zy=0;var o=No(bo),a=ll===0||ll>o?ll:o;o=H.T;var u=Ze.p;try{Ze.p=a,H.T=null;var f=eb;eb=null,a=Ps;var p=bo;if(en=$s,pu=Ps=null,bo=0,(je&(sn|wi))!==dn)throw Error("Cannot flush passive effects while already rendering.");ri(p),nb=!0,vp=!1;var g=0;if(ql=null,g=cn(),vo===xA)cc(Ul,g,jl);else{var v=Ul,x=g,D=vo===Jy;!gt||x<=v||(Vt?Vt.run(console.timeStamp.bind(console,D?"Waiting for Paint":"Waiting",v,x,Oe,Me,"secondary-light")):console.timeStamp(D?"Waiting for Paint":"Waiting",v,x,Oe,Me,"secondary-light"))}v=je,je|=wi;var O=a.current;jh(),ex(O);var A=a.current;O=Ky,jh(),Fw(a,A,p,f,O),kx(a),je=v;var B=cn();if(A=g,O=Vt,ql!==null?aS(A,B,ql,!0,O):!gt||B<=A||(O?O.run(console.timeStamp.bind(console,"Remaining Effects",A,B,Oe,Me,"secondary-dark")):console.timeStamp("Remaining Effects",A,B,Oe,Me,"secondary-dark")),Oa(p,B),Oc(0,!1),vp?a===Af?Qa++:(Qa=0,Af=a):Qa=0,vp=nb=!1,An&&typeof An.onPostCommitFiberRoot==="function")try{An.onPostCommitFiberRoot(Vr,a)}catch(Z){il||(il=!0,console.error("React instrumentation encountered an error: %o",Z))}var X=a.current.stateNode;return X.effectDuration=0,X.passiveEffectDuration=0,!0}finally{Ze.p=u,H.T=o,bx(e,n)}}function Sx(e,n,o){n=ui(o,n),xS(n),n=Gg(e.stateNode,n,2),e=gs(e,n,2),e!==null&&(Ho(e,2),Zo(e))}function Je(e,n,o){if(mu=!1,e.tag===3)Sx(e,e,o);else{for(;n!==null;){if(n.tag===3){Sx(n,e,o);return}if(n.tag===1){var a=n.stateNode;if(typeof n.type.getDerivedStateFromError==="function"||typeof a.componentDidCatch==="function"&&(Is===null||!Is.has(a))){e=ui(o,e),xS(e),o=Wg(2),a=gs(n,o,2),a!==null&&(Fg(o,a,n,e),Ho(a,2),Zo(a));return}}n=n.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.
138
138
 
139
139
  Error message:
140
140
 
141
- %s`,o)}}function y0(e,n,o){var a=e.pingCache;if(a===null){a=e.pingCache=new cz;var u=new Set;a.set(n,u)}else u=a.get(n),u===void 0&&(u=new Set,a.set(n,u));u.has(o)||(Gy=!0,u.add(o),a=GR.bind(null,e,n,o),ol&&Ec(e,o),n.then(a,a))}function GR(e,n,o){var a=e.pingCache;a!==null&&a.delete(n),e.pingedLanes|=e.suspendedLanes&o,e.warmLanes&=~o,(o&127)!==0?0>rl&&(Rs=rl=Ft(),Jc=Xd("Promise Resolved"),Ls=Qd):(o&4194048)!==0&&0>ji&&(ul=ji=Ft(),Kc=Xd("Promise Resolved"),Dy=Qd),ix()&&H.actQueue===null&&console.error(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
141
+ %s`,o)}}function y0(e,n,o){var a=e.pingCache;if(a===null){a=e.pingCache=new fz;var u=new Set;a.set(n,u)}else u=a.get(n),u===void 0&&(u=new Set,a.set(n,u));u.has(o)||(Gy=!0,u.add(o),a=WR.bind(null,e,n,o),ol&&Dc(e,o),n.then(a,a))}function WR(e,n,o){var a=e.pingCache;a!==null&&a.delete(n),e.pingedLanes|=e.suspendedLanes&o,e.warmLanes&=~o,(o&127)!==0?0>rl&&(Bs=rl=Wt(),Kc=Gd("Promise Resolved"),zs=Wd):(o&4194048)!==0&&0>ji&&(ul=ji=Wt(),tf=Gd("Promise Resolved"),Dy=Wd),ix()&&H.actQueue===null&&console.error(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
142
142
 
143
143
  When testing, code that resolves suspended data should be wrapped into act(...):
144
144
 
@@ -147,7 +147,7 @@ act(() => {
147
147
  });
148
148
  /* assert on the output */
149
149
 
150
- 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`),ut===e&&(ke&o)===o&&(Ot===Ns||Ot===rp&&(ke&62914560)===ke&&fn()-dp<SA?(Ie&an)===pn&&Dr(e,0):Wy|=o,Ia===ke&&(Ia=0)),Zo(e)}function wx(e,n){n===0&&(n=oo()),e=An(e,n),e!==null&&(No(e,n),Zo(e))}function WR(e){var n=e.memoizedState,o=0;n!==null&&(o=n.retryLane),wx(e,o)}function FR(e,n){var o=0;switch(e.tag){case 31:case 13:var{stateNode:a,memoizedState:u}=e;u!==null&&(o=u.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}a!==null&&a.delete(n),wx(e,o)}function b0(e,n,o){if((n.subtreeFlags&67117056)!==0)for(n=n.child;n!==null;){var a=e,u=n,f=u.type===Md;f=o||f,u.tag!==22?u.flags&67108864?f&&Y(u,xx,a,u):b0(a,u,f):u.memoizedState===null&&(f&&u.flags&8192?Y(u,xx,a,u):u.subtreeFlags&67108864&&Y(u,b0,a,u,f)),n=n.sibling}}function xx(e,n){Fe(!0);try{Gw(n),tx(n),Ww(e,n.alternate,n,!1),Jw(e,n,0,null,!1,0)}finally{Fe(!1)}}function kx(e){var n=!0;e.current.mode&(En|mo)||(n=!1),b0(e,e.current,n)}function Cx(e){if((Ie&an)===pn){var n=e.tag;if(n===3||n===1||n===0||n===11||n===14||n===15){if(n=P(e)||"ReactComponent",bp!==null){if(bp.has(n))return;bp.add(n)}else bp=new Set([n]);Y(e,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 Ec(e,n){ol&&e.memoizedUpdaters.forEach(function(o){Ln(e,o,n)})}function JR(e,n){var o=H.actQueue;return o!==null?(o.push(n),dz):K0(e,n)}function ZR(e){ix()&&H.actQueue===null&&Y(e,function(){console.error(`An update to %s inside a test was not wrapped in act(...).
150
+ 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`),ut===e&&(ke&o)===o&&(Ot===Us||Ot===cp&&(ke&62914560)===ke&&cn()-mp<SA?(je&sn)===dn&&Lr(e,0):Wy|=o,Xa===ke&&(Xa=0)),Zo(e)}function wx(e,n){n===0&&(n=io()),e=Cn(e,n),e!==null&&(Ho(e,n),Zo(e))}function FR(e){var n=e.memoizedState,o=0;n!==null&&(o=n.retryLane),wx(e,o)}function JR(e,n){var o=0;switch(e.tag){case 31:case 13:var{stateNode:a,memoizedState:u}=e;u!==null&&(o=u.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}a!==null&&a.delete(n),wx(e,o)}function b0(e,n,o){if((n.subtreeFlags&67117056)!==0)for(n=n.child;n!==null;){var a=e,u=n,f=u.type===Od;f=o||f,u.tag!==22?u.flags&67108864?f&&Y(u,xx,a,u):b0(a,u,f):u.memoizedState===null&&(f&&u.flags&8192?Y(u,xx,a,u):u.subtreeFlags&67108864&&Y(u,b0,a,u,f)),n=n.sibling}}function xx(e,n){Fe(!0);try{Gw(n),tx(n),Ww(e,n.alternate,n,!1),Jw(e,n,0,null,!1,0)}finally{Fe(!1)}}function kx(e){var n=!0;e.current.mode&(Tn|po)||(n=!1),b0(e,e.current,n)}function Cx(e){if((je&sn)===dn){var n=e.tag;if(n===3||n===1||n===0||n===11||n===14||n===15){if(n=P(e)||"ReactComponent",Sp!==null){if(Sp.has(n))return;Sp.add(n)}else Sp=new Set([n]);Y(e,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 Dc(e,n){ol&&e.memoizedUpdaters.forEach(function(o){Li(e,o,n)})}function ZR(e,n){var o=H.actQueue;return o!==null?(o.push(n),pz):K0(e,n)}function KR(e){ix()&&H.actQueue===null&&Y(e,function(){console.error(`An update to %s inside a test was not wrapped in act(...).
151
151
 
152
152
  When testing, code that causes React state updates should be wrapped into act(...):
153
153
 
@@ -156,16 +156,16 @@ act(() => {
156
156
  });
157
157
  /* assert on the output */
158
158
 
159
- 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`,P(e))})}function Zo(e){e!==du&&e.next===null&&(du===null?vp=du=e:du=du.next=e),Sp=!0,H.actQueue!==null?ob||(ob=!0,Mx()):ib||(ib=!0,Mx())}function Mc(e,n){if(!lb&&Sp){lb=!0;do{var o=!1;for(var a=vp;a!==null;){if(!n)if(e!==0){var u=a.pendingLanes;if(u===0)var f=0;else{var{suspendedLanes:p,pingedLanes:g}=a;f=(1<<31-Hn(42|e)+1)-1,f&=u&~(p&~g),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(o=!0,Ex(a,f))}else f=ke,f=no(a,a===ut?f:0,a.cancelPendingCommit!==null||a.timeoutHandle!==Xa),(f&3)===0||io(a,f)||(o=!0,Ex(a,f));a=a.next}}while(o);lb=!1}}function KR(){Ef=window.event,v0()}function v0(){Sp=ob=ib=!1;var e=0;$s!==0&&sL()&&(e=$s);for(var n=fn(),o=null,a=vp;a!==null;){var u=a.next,f=Ax(a,n);if(f===0)a.next=null,o===null?vp=u:o.next=u,u===null&&(du=o);else if(o=a,e!==0||(f&3)!==0)Sp=!0;a=u}tn!==Is&&tn!==gp||Mc(e,!1),$s!==0&&($s=0)}function Ax(e,n){for(var{suspendedLanes:o,pingedLanes:a,expirationTimes:u}=e,f=e.pendingLanes&-62914561;0<f;){var p=31-Hn(f),g=1<<p,v=u[p];if(v===-1){if((g&o)===0||(g&a)!==0)u[p]=yl(g,n)}else v<=n&&(e.expiredLanes|=g);f&=~g}if(n=ut,o=ke,o=no(e,e===n?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==Xa),a=e.callbackNode,o===0||e===n&&(tt===qa||tt===Va)||e.cancelPendingCommit!==null)return a!==null&&S0(a),e.callbackNode=null,e.callbackPriority=0;if((o&3)===0||io(e,o)){if(n=o&-o,n!==e.callbackPriority||H.actQueue!==null&&a!==sb)S0(a);else return n;switch(ui(o)){case vi:case po:o=ty;break;case ll:o=Nr;break;case zd:o=ny;break;default:o=Nr}return a=Tx.bind(null,e),H.actQueue!==null?(H.actQueue.push(a),o=sb):o=K0(o,a),e.callbackPriority=n,e.callbackNode=o,n}return a!==null&&S0(a),e.callbackPriority=2,e.callbackNode=null,2}function Tx(e,n){if(Zd=Jd=!1,Ef=window.event,tn!==Is&&tn!==gp)return e.callbackNode=null,e.callbackPriority=0,null;var o=e.callbackNode;if(So===mp&&(So=Jy),Tc()&&e.callbackNode!==o)return null;var a=ke;if(a=no(e,e===ut?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==Xa),a===0)return null;return lx(e,a,n),Ax(e,fn()),e.callbackNode!=null&&e.callbackNode===o?Tx.bind(null,e):null}function Ex(e,n){if(Tc())return null;Jd=Zd,Zd=!1,lx(e,n,!0)}function S0(e){e!==sb&&e!==null&&jL(e)}function Mx(){H.actQueue!==null&&H.actQueue.push(function(){return v0(),null}),kz(function(){(Ie&(an|ki))!==pn?K0(ey,KR):v0()})}function w0(){if($s===0){var e=La;e===0&&(e=Rd,Rd<<=1,(Rd&261888)===0&&(Rd=256)),$s=e}return $s}function Dx(e){if(e==null||typeof e==="symbol"||typeof e==="boolean")return null;if(typeof e==="function")return e;return be(e,"action"),lc(""+e)}function Ox(e,n){var o=n.ownerDocument.createElement("input");return o.name=n.name,o.value=n.value,e.id&&o.setAttribute("form",e.id),n.parentNode.insertBefore(o,n),e=new FormData(e),o.parentNode.removeChild(o),e}function eL(e,n,o,a,u){if(n==="submit"&&o&&o.stateNode===u){var f=Dx((u[Nn]||null).action),p=a.submitter;p&&(n=(n=p[Nn]||null)?Dx(n.formAction):p.getAttribute("formAction"),n!==null&&(f=n,p=null));var g=new qd("action","action",null,a,u);e.push({event:g,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if($s!==0){var v=p?Ox(u,p):new FormData(u),x={pending:!0,data:v,method:u.method,action:f};Object.freeze(x),Ig(o,x,null,v)}}else typeof f==="function"&&(g.preventDefault(),v=p?Ox(u,p):new FormData(u),x={pending:!0,data:v,method:u.method,action:f},Object.freeze(x),Ig(o,x,f,v))},currentTarget:u}]})}}function yd(e,n,o){e.currentTarget=o;try{n(e)}catch(a){by(a)}e.currentTarget=null}function Rx(e,n){n=(n&4)!==0;for(var o=0;o<e.length;o++){var a=e[o];e:{var u=void 0,f=a.event;if(a=a.listeners,n)for(var p=a.length-1;0<=p;p--){var g=a[p],v=g.instance,x=g.currentTarget;if(g=g.listener,v!==u&&f.isPropagationStopped())break e;v!==null?Y(v,yd,f,g,x):yd(f,g,x),u=v}else for(p=0;p<a.length;p++){if(g=a[p],v=g.instance,x=g.currentTarget,g=g.listener,v!==u&&f.isPropagationStopped())break e;v!==null?Y(v,yd,f,g,x):yd(f,g,x),u=v}}}}function ze(e,n){ab.has(e)||console.error('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',e);var o=n[iy];o===void 0&&(o=n[iy]=new Set);var a=e+"__bubble";o.has(a)||(Lx(n,e,2,!1),o.add(a))}function x0(e,n,o){ab.has(e)&&!n&&console.error('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',e);var a=0;n&&(a|=4),Lx(o,e,a,n)}function k0(e){if(!e[wp]){e[wp]=!0,Mk.forEach(function(o){o!=="selectionchange"&&(ab.has(o)||x0(o,!1,e),x0(o,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[wp]||(n[wp]=!0,x0("selectionchange",!1,n))}}function Lx(e,n,o,a){switch(fk(n)){case vi:var u=zL;break;case po:u=HL;break;default:u=q0}o=u.bind(null,n,o,e),u=void 0,!ry||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(u=!0),a?u!==void 0?e.addEventListener(n,o,{capture:!0,passive:u}):e.addEventListener(n,o,!0):u!==void 0?e.addEventListener(n,o,{passive:u}):e.addEventListener(n,o,!1)}function C0(e,n,o,a,u){var f=a;if((n&1)===0&&(n&2)===0&&a!==null)e:for(;;){if(a===null)return;var p=a.tag;if(p===3||p===4){var g=a.stateNode.containerInfo;if(g===u)break;if(p===4)for(p=a.return;p!==null;){var v=p.tag;if((v===3||v===4)&&p.stateNode.containerInfo===u)return;p=p.return}for(;g!==null;){if(p=_o(g),p===null)return;if(v=p.tag,v===5||v===6||v===26||v===27){a=f=p;continue e}g=g.parentNode}}a=a.return}$1(function(){var x=f,D=Xm(o),O=[];e:{var A=fC.get(e);if(A!==void 0){var B=qd,X=e;switch(e){case"keypress":if(Ah(o)===0)break e;case"keydown":case"keyup":B=DB;break;case"focusin":X="focus",B=hy;break;case"focusout":X="blur",B=hy;break;case"beforeblur":case"afterblur":B=hy;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":B=Jk;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":B=yB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":B=LB;break;case aC:case rC:case uC:B=SB;break;case cC:B=zB;break;case"scroll":case"scrollend":B=mB;break;case"wheel":B=NB;break;case"copy":case"cut":case"paste":B=xB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":B=Kk;break;case"toggle":case"beforetoggle":B=UB}var Z=(n&4)!==0,ht=!Z&&(e==="scroll"||e==="scrollend"),He=Z?A!==null?A+"Capture":null:A;Z=[];for(var C=x,T;C!==null;){var M=C;if(T=M.stateNode,M=M.tag,M!==5&&M!==26&&M!==27||T===null||He===null||(M=sc(C,He),M!=null&&Z.push(Dc(C,M,T))),ht)break;C=C.return}0<Z.length&&(A=new B(A,X,null,o,D),O.push({event:A,listeners:Z}))}}if((n&7)===0){e:{if(A=e==="mouseover"||e==="pointerover",B=e==="mouseout"||e==="pointerout",A&&o!==Vc&&(X=o.relatedTarget||o.fromElement)&&(_o(X)||X[Cs]))break e;if(B||A){if(A=D.window===D?D:(A=D.ownerDocument)?A.defaultView||A.parentWindow:window,B){if(X=o.relatedTarget||o.toElement,B=x,X=X?_o(X):null,X!==null&&(ht=N(X),Z=X.tag,X!==ht||Z!==5&&Z!==27&&Z!==6))X=null}else B=null,X=x;if(B!==X){if(Z=Jk,M="onMouseLeave",He="onMouseEnter",C="mouse",e==="pointerout"||e==="pointerover")Z=Kk,M="onPointerLeave",He="onPointerEnter",C="pointer";if(ht=B==null?A:vl(B),T=X==null?A:vl(X),A=new Z(M,C+"leave",B,o,D),A.target=ht,A.relatedTarget=T,M=null,_o(D)===x&&(Z=new Z(He,C+"enter",X,o,D),Z.target=T,Z.relatedTarget=ht,M=Z),ht=M,B&&X)t:{Z=tL,He=B,C=X,T=0;for(M=He;M;M=Z(M))T++;M=0;for(var _=C;_;_=Z(_))M++;for(;0<T-M;)He=Z(He),T--;for(;0<M-T;)C=Z(C),M--;for(;T--;){if(He===C||C!==null&&He===C.alternate){Z=He;break t}He=Z(He),C=Z(C)}Z=null}else Z=null;B!==null&&Bx(O,A,B,Z,!1),X!==null&&ht!==null&&Bx(O,ht,X,Z,!0)}}}e:{if(A=x?vl(x):window,B=A.nodeName&&A.nodeName.toLowerCase(),B==="select"||B==="input"&&A.type==="file")var F=F1;else if(G1(A))if(lC)F=dR;else{F=fR;var ge=cR}else B=A.nodeName,!B||B.toLowerCase()!=="input"||A.type!=="checkbox"&&A.type!=="radio"?x&&oc(x.elementType)&&(F=F1):F=hR;if(F&&(F=F(e,x))){W1(O,F,o,D);break e}ge&&ge(e,A,x),e==="focusout"&&x&&A.type==="number"&&x.memoizedProps.value!=null&&U(A,"number",A.value)}switch(ge=x?vl(x):window,e){case"focusin":if(G1(ge)||ge.contentEditable==="true")Pr=ge,py=x,Qc=null;break;case"focusout":Qc=py=Pr=null;break;case"mousedown":my=!0;break;case"contextmenu":case"mouseup":case"dragend":my=!1,iS(O,o,D);break;case"selectionchange":if(jB)break;case"keydown":case"keyup":iS(O,o,D)}var oe;if(dy)e:{switch(e){case"compositionstart":var ee="onCompositionStart";break e;case"compositionend":ee="onCompositionEnd";break e;case"compositionupdate":ee="onCompositionUpdate";break e}ee=void 0}else $r?X1(e,o)&&(ee="onCompositionEnd"):e==="keydown"&&o.keyCode===eC&&(ee="onCompositionStart");if(ee&&(tC&&o.locale!=="ko"&&($r||ee!=="onCompositionStart"?ee==="onCompositionEnd"&&$r&&(oe=P1()):(As=D,uy=("value"in As)?As.value:As.textContent,$r=!0)),ge=bd(x,ee),0<ge.length&&(ee=new Zk(ee,e,null,o,D),O.push({event:ee,listeners:ge}),oe?ee.data=oe:(oe=Q1(o),oe!==null&&(ee.data=oe)))),oe=VB?sR(e,o):aR(e,o))ee=bd(x,"onBeforeInput"),0<ee.length&&(ge=new CB("onBeforeInput","beforeinput",null,o,D),O.push({event:ge,listeners:ee}),ge.data=oe);eL(O,e,x,o,D)}Rx(O,n)})}function Dc(e,n,o){return{instance:e,listener:n,currentTarget:o}}function bd(e,n){for(var o=n+"Capture",a=[];e!==null;){var u=e,f=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||f===null||(u=sc(e,o),u!=null&&a.unshift(Dc(e,u,f)),u=sc(e,n),u!=null&&a.push(Dc(e,u,f))),e.tag===3)return a;e=e.return}return[]}function tL(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e?e:null}function Bx(e,n,o,a,u){for(var f=n._reactName,p=[];o!==null&&o!==a;){var g=o,v=g.alternate,x=g.stateNode;if(g=g.tag,v!==null&&v===a)break;g!==5&&g!==26&&g!==27||x===null||(v=x,u?(x=sc(o,f),x!=null&&p.unshift(Dc(o,x,v))):u||(x=sc(o,f),x!=null&&p.push(Dc(o,x,v)))),o=o.return}p.length!==0&&e.push({event:n,listeners:p})}function A0(e,n){nR(e,n),e!=="input"&&e!=="textarea"&&e!=="select"||n==null||n.value!==null||Wk||(Wk=!0,e==="select"&&n.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.",e):console.error("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",e));var o={registrationNameDependencies:Ta,possibleRegistrationNames:oy};oc(e)||typeof n.is==="string"||oR(e,n,o),n.contentEditable&&!n.suppressContentEditableWarning&&n.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 cn(e,n,o,a){n!==o&&(o=vs(o),vs(n)!==o&&(a[e]=n))}function nL(e,n,o){n.forEach(function(a){o[Nx(a)]=a==="style"?E0(e):e.getAttribute(a)})}function Ko(e,n){n===!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.",e,e,e):console.error("Expected `%s` listener to be a function, instead got a value of `%s` type.",e,typeof n)}function zx(e,n){return e=e.namespaceURI===Nd||e.namespaceURI===qr?e.ownerDocument.createElementNS(e.namespaceURI,e.tagName):e.ownerDocument.createElement(e.tagName),e.innerHTML=n,e.innerHTML}function vs(e){return Ut(e)&&(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.",lt(e)),Et(e)),(typeof e==="string"?e:""+e).replace(pz,`
160
- `).replace(mz,"")}function Hx(e,n){return n=vs(n),vs(e)===n?!0:!1}function at(e,n,o,a,u,f){switch(o){case"children":if(typeof a==="string")Ch(a,n,!1),n==="body"||n==="textarea"&&a===""||ic(e,a);else if(typeof a==="number"||typeof a==="bigint")Ch(""+a,n,!1),n!=="body"&&ic(e,""+a);break;case"className":rs(e,"class",a);break;case"tabIndex":rs(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":rs(e,o,a);break;case"style":V1(e,a,f);break;case"data":if(n!=="object"){rs(e,"data",a);break}case"src":case"href":if(a===""&&(n!=="a"||o!=="href")){o==="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.',o,o):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.',o,o),e.removeAttribute(o);break}if(a==null||typeof a==="function"||typeof a==="symbol"||typeof a==="boolean"){e.removeAttribute(o);break}be(a,o),a=lc(""+a),e.setAttribute(o,a);break;case"action":case"formAction":if(a!=null&&(n==="form"?o==="formAction"?console.error("You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>."):typeof a==="function"&&(u.encType==null&&u.method==null||Cp||(Cp=!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.")),u.target==null||kp||(kp=!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."))):n==="input"||n==="button"?o==="action"?console.error("You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>."):n!=="input"||u.type==="submit"||u.type==="image"||xp?n!=="button"||u.type==null||u.type==="submit"||xp?typeof a==="function"&&(u.name==null||zA||(zA=!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.')),u.formEncType==null&&u.formMethod==null||Cp||(Cp=!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.")),u.formTarget==null||kp||(kp=!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."))):(xp=!0,console.error('A button can only specify a formAction along with type="submit" or no type.')):(xp=!0,console.error('An input can only specify a formAction along with type="submit" or type="image".')):o==="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 a==="function"){e.setAttribute(o,"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 f==="function"&&(o==="formAction"?(n!=="input"&&at(e,n,"name",u.name,u,null),at(e,n,"formEncType",u.formEncType,u,null),at(e,n,"formMethod",u.formMethod,u,null),at(e,n,"formTarget",u.formTarget,u,null)):(at(e,n,"encType",u.encType,u,null),at(e,n,"method",u.method,u,null),at(e,n,"target",u.target,u,null)));if(a==null||typeof a==="symbol"||typeof a==="boolean"){e.removeAttribute(o);break}be(a,o),a=lc(""+a),e.setAttribute(o,a);break;case"onClick":a!=null&&(typeof a!=="function"&&Ko(o,a),e.onclick=Cl);break;case"onScroll":a!=null&&(typeof a!=="function"&&Ko(o,a),ze("scroll",e));break;case"onScrollEnd":a!=null&&(typeof a!=="function"&&Ko(o,a),ze("scrollend",e));break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!=="object"||!("__html"in a))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(o=a.__html,o!=null){if(u.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");e.innerHTML=o}}break;case"multiple":e.multiple=a&&typeof a!=="function"&&typeof a!=="symbol";break;case"muted":e.muted=a&&typeof a!=="function"&&typeof a!=="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a==="function"||typeof a==="boolean"||typeof a==="symbol"){e.removeAttribute("xlink:href");break}be(a,o),o=lc(""+a),e.setAttributeNS($a,"xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!=="function"&&typeof a!=="symbol"?(be(a,o),e.setAttribute(o,""+a)):e.removeAttribute(o);break;case"inert":a!==""||Ap[o]||(Ap[o]=!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.",o));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":a&&typeof a!=="function"&&typeof a!=="symbol"?e.setAttribute(o,""):e.removeAttribute(o);break;case"capture":case"download":a===!0?e.setAttribute(o,""):a!==!1&&a!=null&&typeof a!=="function"&&typeof a!=="symbol"?(be(a,o),e.setAttribute(o,a)):e.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!=="function"&&typeof a!=="symbol"&&!isNaN(a)&&1<=a?(be(a,o),e.setAttribute(o,a)):e.removeAttribute(o);break;case"rowSpan":case"start":a==null||typeof a==="function"||typeof a==="symbol"||isNaN(a)?e.removeAttribute(o):(be(a,o),e.setAttribute(o,a));break;case"popover":ze("beforetoggle",e),ze("toggle",e),mr(e,"popover",a);break;case"xlinkActuate":ao(e,$a,"xlink:actuate",a);break;case"xlinkArcrole":ao(e,$a,"xlink:arcrole",a);break;case"xlinkRole":ao(e,$a,"xlink:role",a);break;case"xlinkShow":ao(e,$a,"xlink:show",a);break;case"xlinkTitle":ao(e,$a,"xlink:title",a);break;case"xlinkType":ao(e,$a,"xlink:type",a);break;case"xmlBase":ao(e,rb,"xml:base",a);break;case"xmlLang":ao(e,rb,"xml:lang",a);break;case"xmlSpace":ao(e,rb,"xml:space",a);break;case"is":f!=null&&console.error('Cannot update the "is" prop after it has been initialized.'),mr(e,"is",a);break;case"innerText":case"textContent":break;case"popoverTarget":HA||a==null||typeof a!=="object"||(HA=!0,console.error("The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.",a));default:!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N"?(o=I1(o),mr(e,o,a)):Ta.hasOwnProperty(o)&&a!=null&&typeof a!=="function"&&Ko(o,a)}}function T0(e,n,o,a,u,f){switch(o){case"style":V1(e,a,f);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!=="object"||!("__html"in a))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(o=a.__html,o!=null){if(u.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");e.innerHTML=o}}break;case"children":typeof a==="string"?ic(e,a):(typeof a==="number"||typeof a==="bigint")&&ic(e,""+a);break;case"onScroll":a!=null&&(typeof a!=="function"&&Ko(o,a),ze("scroll",e));break;case"onScrollEnd":a!=null&&(typeof a!=="function"&&Ko(o,a),ze("scrollend",e));break;case"onClick":a!=null&&(typeof a!=="function"&&Ko(o,a),e.onclick=Cl);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(Ta.hasOwnProperty(o))a!=null&&typeof a!=="function"&&Ko(o,a);else e:{if(o[0]==="o"&&o[1]==="n"&&(u=o.endsWith("Capture"),n=o.slice(2,u?o.length-7:void 0),f=e[Nn]||null,f=f!=null?f[o]:null,typeof f==="function"&&e.removeEventListener(n,f,u),typeof a==="function")){typeof f!=="function"&&f!==null&&(o in e?e[o]=null:e.hasAttribute(o)&&e.removeAttribute(o)),e.addEventListener(n,a,u);break e}o in e?e[o]=a:a===!0?e.setAttribute(o,""):mr(e,o,a)}}}function bn(e,n,o){switch(A0(n,o),n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ze("error",e),ze("load",e);var a=!1,u=!1,f;for(f in o)if(o.hasOwnProperty(f)){var p=o[f];if(p!=null)switch(f){case"src":a=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:at(e,n,f,p,o,null)}}u&&at(e,n,"srcSet",o.srcSet,o,null),a&&at(e,n,"src",o.src,o,null);return;case"input":wl("input",o),ze("invalid",e);var g=f=p=u=null,v=null,x=null;for(a in o)if(o.hasOwnProperty(a)){var D=o[a];if(D!=null)switch(a){case"name":u=D;break;case"type":p=D;break;case"checked":v=D;break;case"defaultChecked":x=D;break;case"value":f=D;break;case"defaultValue":g=D;break;case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:at(e,n,a,D,o,null)}}xh(e,o),ec(e,f,g,v,x,p,u,!1);return;case"select":wl("select",o),ze("invalid",e),a=p=f=null;for(u in o)if(o.hasOwnProperty(u)&&(g=o[u],g!=null))switch(u){case"value":f=g;break;case"defaultValue":p=g;break;case"multiple":a=g;default:at(e,n,u,g,o,null)}Te(e,o),n=f,o=p,e.multiple=!!a,n!=null?ve(e,!!a,n,!1):o!=null&&ve(e,!!a,o,!0);return;case"textarea":wl("textarea",o),ze("invalid",e),f=u=a=null;for(p in o)if(o.hasOwnProperty(p)&&(g=o[p],g!=null))switch(p){case"value":a=g;break;case"defaultValue":u=g;break;case"children":f=g;break;case"dangerouslySetInnerHTML":if(g!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:at(e,n,p,g,o,null)}Ue(e,o),kl(e,a,u,f);return;case"option":le(e,o);for(v in o)if(o.hasOwnProperty(v)&&(a=o[v],a!=null))switch(v){case"selected":e.selected=a&&typeof a!=="function"&&typeof a!=="symbol";break;default:at(e,n,v,a,o,null)}return;case"dialog":ze("beforetoggle",e),ze("toggle",e),ze("cancel",e),ze("close",e);break;case"iframe":case"object":ze("load",e);break;case"video":case"audio":for(a=0;a<Cf.length;a++)ze(Cf[a],e);break;case"image":ze("error",e),ze("load",e);break;case"details":ze("toggle",e);break;case"embed":case"source":case"link":ze("error",e),ze("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(x in o)if(o.hasOwnProperty(x)&&(a=o[x],a!=null))switch(x){case"children":case"dangerouslySetInnerHTML":throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:at(e,n,x,a,o,null)}return;default:if(oc(n)){for(D in o)o.hasOwnProperty(D)&&(a=o[D],a!==void 0&&T0(e,n,D,a,o,void 0));return}}for(g in o)o.hasOwnProperty(g)&&(a=o[g],a!=null&&at(e,n,g,a,o,null))}function iL(e,n,o,a){switch(A0(n,a),n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,f=null,p=null,g=null,v=null,x=null,D=null;for(B in o){var O=o[B];if(o.hasOwnProperty(B)&&O!=null)switch(B){case"checked":break;case"value":break;case"defaultValue":v=O;default:a.hasOwnProperty(B)||at(e,n,B,null,a,O)}}for(var A in a){var B=a[A];if(O=o[A],a.hasOwnProperty(A)&&(B!=null||O!=null))switch(A){case"type":f=B;break;case"name":u=B;break;case"checked":x=B;break;case"defaultChecked":D=B;break;case"value":p=B;break;case"defaultValue":g=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:B!==O&&at(e,n,A,B,a,O)}}n=o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null,a=a.type==="checkbox"||a.type==="radio"?a.checked!=null:a.value!=null,n||!a||BA||(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"),BA=!0),!n||a||LA||(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"),LA=!0),zi(e,p,g,v,x,D,f,u);return;case"select":B=p=g=A=null;for(f in o)if(v=o[f],o.hasOwnProperty(f)&&v!=null)switch(f){case"value":break;case"multiple":B=v;default:a.hasOwnProperty(f)||at(e,n,f,null,a,v)}for(u in a)if(f=a[u],v=o[u],a.hasOwnProperty(u)&&(f!=null||v!=null))switch(u){case"value":A=f;break;case"defaultValue":g=f;break;case"multiple":p=f;default:f!==v&&at(e,n,u,f,a,v)}a=g,n=p,o=B,A!=null?ve(e,!!n,A,!1):!!o!==!!n&&(a!=null?ve(e,!!n,a,!0):ve(e,!!n,n?[]:"",!1));return;case"textarea":B=A=null;for(g in o)if(u=o[g],o.hasOwnProperty(g)&&u!=null&&!a.hasOwnProperty(g))switch(g){case"value":break;case"children":break;default:at(e,n,g,null,a,u)}for(p in a)if(u=a[p],f=o[p],a.hasOwnProperty(p)&&(u!=null||f!=null))switch(p){case"value":A=u;break;case"defaultValue":B=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:u!==f&&at(e,n,p,u,a,f)}xl(e,A,B);return;case"option":for(var X in o)if(A=o[X],o.hasOwnProperty(X)&&A!=null&&!a.hasOwnProperty(X))switch(X){case"selected":e.selected=!1;break;default:at(e,n,X,null,a,A)}for(v in a)if(A=a[v],B=o[v],a.hasOwnProperty(v)&&A!==B&&(A!=null||B!=null))switch(v){case"selected":e.selected=A&&typeof A!=="function"&&typeof A!=="symbol";break;default:at(e,n,v,A,a,B)}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 Z in o)A=o[Z],o.hasOwnProperty(Z)&&A!=null&&!a.hasOwnProperty(Z)&&at(e,n,Z,null,a,A);for(x in a)if(A=a[x],B=o[x],a.hasOwnProperty(x)&&A!==B&&(A!=null||B!=null))switch(x){case"children":case"dangerouslySetInnerHTML":if(A!=null)throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:at(e,n,x,A,a,B)}return;default:if(oc(n)){for(var ht in o)A=o[ht],o.hasOwnProperty(ht)&&A!==void 0&&!a.hasOwnProperty(ht)&&T0(e,n,ht,void 0,a,A);for(D in a)A=a[D],B=o[D],!a.hasOwnProperty(D)||A===B||A===void 0&&B===void 0||T0(e,n,D,A,a,B);return}}for(var He in o)A=o[He],o.hasOwnProperty(He)&&A!=null&&!a.hasOwnProperty(He)&&at(e,n,He,null,a,A);for(O in a)A=a[O],B=o[O],!a.hasOwnProperty(O)||A===B||A==null&&B==null||at(e,n,O,A,a,B)}function Nx(e){switch(e){case"class":return"className";case"for":return"htmlFor";default:return e}}function E0(e){var n={};e=e.style;for(var o=0;o<e.length;o++){var a=e[o];n[a]=e.getPropertyValue(a)}return n}function _x(e,n,o){if(n!=null&&typeof n!=="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 a,u=a="",f;for(f in n)if(n.hasOwnProperty(f)){var p=n[f];p!=null&&typeof p!=="boolean"&&p!==""&&(f.indexOf("--")===0?(Ke(p,f),a+=u+f+":"+(""+p).trim()):typeof p!=="number"||p===0||Qk.has(f)?(Ke(p,f),a+=u+f.replace(jk,"-$1").toLowerCase().replace($k,"-ms-")+":"+(""+p).trim()):a+=u+f.replace(jk,"-$1").toLowerCase().replace($k,"-ms-")+":"+p+"px",u=";")}a=a||null,n=e.getAttribute("style"),n!==a&&(a=vs(a),vs(n)!==a&&(o.style=E0(e)))}}function Hi(e,n,o,a,u,f){if(u.delete(o),e=e.getAttribute(o),e===null)switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":return}else if(a!=null)switch(typeof a){case"function":case"symbol":case"boolean":break;default:if(be(a,n),e===""+a)return}cn(n,e,a,f)}function Ux(e,n,o,a,u,f){if(u.delete(o),e=e.getAttribute(o),e===null){switch(typeof a){case"function":case"symbol":return}if(!a)return}else switch(typeof a){case"function":case"symbol":break;default:if(a)return}cn(n,e,a,f)}function M0(e,n,o,a,u,f){if(u.delete(o),e=e.getAttribute(o),e===null)switch(typeof a){case"undefined":case"function":case"symbol":return}else if(a!=null)switch(typeof a){case"function":case"symbol":break;default:if(be(a,o),e===""+a)return}cn(n,e,a,f)}function qx(e,n,o,a,u,f){if(u.delete(o),e=e.getAttribute(o),e===null)switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":return;default:if(isNaN(a))return}else if(a!=null)switch(typeof a){case"function":case"symbol":case"boolean":break;default:if(!isNaN(a)&&(be(a,n),e===""+a))return}cn(n,e,a,f)}function D0(e,n,o,a,u,f){if(u.delete(o),e=e.getAttribute(o),e===null)switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":return}else if(a!=null)switch(typeof a){case"function":case"symbol":case"boolean":break;default:if(be(a,n),o=lc(""+a),e===o)return}cn(n,e,a,f)}function Vx(e,n,o,a){for(var u={},f=new Set,p=e.attributes,g=0;g<p.length;g++)switch(p[g].name.toLowerCase()){case"value":break;case"checked":break;case"selected":break;default:f.add(p[g].name)}if(oc(n)){for(var v in o)if(o.hasOwnProperty(v)){var x=o[v];if(x!=null){if(Ta.hasOwnProperty(v))typeof x!=="function"&&Ko(v,x);else if(o.suppressHydrationWarning!==!0)switch(v){case"children":typeof x!=="string"&&typeof x!=="number"||cn("children",e.textContent,x,u);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":p=e.innerHTML,x=x?x.__html:void 0,x!=null&&(x=zx(e,x),cn(v,p,x,u));continue;case"style":f.delete(v),_x(e,x,u);continue;case"offsetParent":case"offsetTop":case"offsetLeft":case"offsetWidth":case"offsetHeight":case"isContentEditable":case"outerText":case"outerHTML":f.delete(v.toLowerCase()),console.error("Assignment to read-only property will result in a no-op: `%s`",v);continue;case"className":f.delete("class"),p=pr(e,"class",x),cn("className",p,x,u);continue;default:a.context===Xl&&n!=="svg"&&n!=="math"?f.delete(v.toLowerCase()):f.delete(v),p=pr(e,v,x),cn(v,p,x,u)}}}}else for(x in o)if(o.hasOwnProperty(x)&&(v=o[x],v!=null)){if(Ta.hasOwnProperty(x))typeof v!=="function"&&Ko(x,v);else if(o.suppressHydrationWarning!==!0)switch(x){case"children":typeof v!=="string"&&typeof v!=="number"||cn("children",e.textContent,v,u);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"value":case"checked":case"selected":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":p=e.innerHTML,v=v?v.__html:void 0,v!=null&&(v=zx(e,v),p!==v&&(u[x]={__html:p}));continue;case"className":Hi(e,x,"class",v,f,u);continue;case"tabIndex":Hi(e,x,"tabindex",v,f,u);continue;case"style":f.delete(x),_x(e,v,u);continue;case"multiple":f.delete(x),cn(x,e.multiple,v,u);continue;case"muted":f.delete(x),cn(x,e.muted,v,u);continue;case"autoFocus":f.delete("autofocus"),cn(x,e.autofocus,v,u);continue;case"data":if(n!=="object"){f.delete(x),p=e.getAttribute("data"),cn(x,p,v,u);continue}case"src":case"href":if(!(v!==""||n==="a"&&x==="href"||n==="object"&&x==="data")){x==="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.',x,x):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.',x,x);continue}D0(e,x,x,v,f,u);continue;case"action":case"formAction":if(p=e.getAttribute(x),typeof v==="function"){f.delete(x.toLowerCase()),x==="formAction"?(f.delete("name"),f.delete("formenctype"),f.delete("formmethod"),f.delete("formtarget")):(f.delete("enctype"),f.delete("method"),f.delete("target"));continue}else if(p===gz){f.delete(x.toLowerCase()),cn(x,"function",v,u);continue}D0(e,x,x.toLowerCase(),v,f,u);continue;case"xlinkHref":D0(e,x,"xlink:href",v,f,u);continue;case"contentEditable":M0(e,x,"contenteditable",v,f,u);continue;case"spellCheck":M0(e,x,"spellcheck",v,f,u);continue;case"draggable":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":M0(e,x,x,v,f,u);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":Ux(e,x,x.toLowerCase(),v,f,u);continue;case"capture":case"download":e:{g=e;var D=p=x,O=u;if(f.delete(D),g=g.getAttribute(D),g===null)switch(typeof v){case"undefined":case"function":case"symbol":break e;default:if(v===!1)break e}else if(v!=null)switch(typeof v){case"function":case"symbol":break;case"boolean":if(v===!0&&g==="")break e;break;default:if(be(v,p),g===""+v)break e}cn(p,g,v,O)}continue;case"cols":case"rows":case"size":case"span":e:{if(g=e,D=p=x,O=u,f.delete(D),g=g.getAttribute(D),g===null)switch(typeof v){case"undefined":case"function":case"symbol":case"boolean":break e;default:if(isNaN(v)||1>v)break e}else if(v!=null)switch(typeof v){case"function":case"symbol":case"boolean":break;default:if(!(isNaN(v)||1>v)&&(be(v,p),g===""+v))break e}cn(p,g,v,O)}continue;case"rowSpan":qx(e,x,"rowspan",v,f,u);continue;case"start":qx(e,x,x,v,f,u);continue;case"xHeight":Hi(e,x,"x-height",v,f,u);continue;case"xlinkActuate":Hi(e,x,"xlink:actuate",v,f,u);continue;case"xlinkArcrole":Hi(e,x,"xlink:arcrole",v,f,u);continue;case"xlinkRole":Hi(e,x,"xlink:role",v,f,u);continue;case"xlinkShow":Hi(e,x,"xlink:show",v,f,u);continue;case"xlinkTitle":Hi(e,x,"xlink:title",v,f,u);continue;case"xlinkType":Hi(e,x,"xlink:type",v,f,u);continue;case"xmlBase":Hi(e,x,"xml:base",v,f,u);continue;case"xmlLang":Hi(e,x,"xml:lang",v,f,u);continue;case"xmlSpace":Hi(e,x,"xml:space",v,f,u);continue;case"inert":v!==""||Ap[x]||(Ap[x]=!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.",x)),Ux(e,x,x,v,f,u);continue;default:if(!(2<x.length)||x[0]!=="o"&&x[0]!=="O"||x[1]!=="n"&&x[1]!=="N"){g=I1(x),p=!1,a.context===Xl&&n!=="svg"&&n!=="math"?f.delete(g.toLowerCase()):(D=x.toLowerCase(),D=_d.hasOwnProperty(D)?_d[D]||null:null,D!==null&&D!==x&&(p=!0,f.delete(D)),f.delete(g));e:if(D=e,O=g,g=v,Zu(O))if(D.hasAttribute(O))D=D.getAttribute(O),be(g,O),g=D===""+g?g:D;else{switch(typeof g){case"function":case"symbol":break e;case"boolean":if(D=O.toLowerCase().slice(0,5),D!=="data-"&&D!=="aria-")break e}g=g===void 0?void 0:null}else g=void 0;p||cn(x,g,v,u)}}}return 0<f.size&&o.suppressHydrationWarning!==!0&&nL(e,f,u),Object.keys(u).length===0?null:u}function oL(e,n){switch(e.length){case 0:return"";case 1:return e[0];case 2:return e[0]+" "+n+" "+e[1];default:return e.slice(0,-1).join(", ")+", "+n+" "+e[e.length-1]}}function Ix(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function lL(){if(typeof performance.getEntriesByType==="function"){for(var e=0,n=0,o=performance.getEntriesByType("resource"),a=0;a<o.length;a++){var u=o[a],f=u.transferSize,p=u.initiatorType,g=u.duration;if(f&&g&&Ix(p)){p=0,g=u.responseEnd;for(a+=1;a<o.length;a++){var v=o[a],x=v.startTime;if(x>g)break;var{transferSize:D,initiatorType:O}=v;D&&Ix(O)&&(v=v.responseEnd,p+=D*(v<g?1:(g-x)/(v-x)))}if(--a,n+=8*(f+p)/(u.duration/1000),e++,10<e)break}}if(0<e)return n/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==="number")?e:5}function vd(e){return e.nodeType===9?e:e.ownerDocument}function jx(e){switch(e){case qr:return mu;case Nd:return Ep;default:return Xl}}function $x(e,n){if(e===Xl)switch(n){case"svg":return mu;case"math":return Ep;default:return Xl}return e===mu&&n==="foreignObject"?Xl:e}function O0(e,n){return e==="textarea"||e==="noscript"||typeof n.children==="string"||typeof n.children==="number"||typeof n.children==="bigint"||typeof n.dangerouslySetInnerHTML==="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}function sL(){var e=window.event;if(e&&e.type==="popstate"){if(e===hb)return!1;return hb=e,!0}return hb=null,!1}function Oc(){var e=window.event;return e&&e!==Ef?e.type:null}function Rc(){var e=window.event;return e&&e!==Ef?e.timeStamp:-1.1}function aL(e){setTimeout(function(){throw e})}function rL(e,n,o){switch(n){case"button":case"input":case"select":case"textarea":o.autoFocus&&e.focus();break;case"img":o.src?e.src=o.src:o.srcSet&&(e.srcset=o.srcSet)}}function uL(){}function cL(e,n,o,a){iL(e,n,o,a),e[Nn]=a}function Px(e){ic(e,"")}function fL(e,n,o){e.nodeValue=o}function Yx(e){if(!e.__reactWarnedAboutChildrenConflict){var n=e[Nn]||null;if(n!==null){var o=Bn(e);o!==null&&(typeof n.children==="string"||typeof n.children==="number"?(e.__reactWarnedAboutChildrenConflict=!0,Y(o,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.')})):n.dangerouslySetInnerHTML!=null&&(e.__reactWarnedAboutChildrenConflict=!0,Y(o,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 Ss(e){return e==="head"}function hL(e,n){e.removeChild(n)}function dL(e,n){(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e).removeChild(n)}function Xx(e,n){var o=n,a=0;do{var u=o.nextSibling;if(e.removeChild(o),u&&u.nodeType===8)if(o=u.data,o===Tf||o===Tp){if(a===0){e.removeChild(u),Br(n);return}a--}else if(o===Af||o===Ps||o===Ya||o===pu||o===Pa)a++;else if(o===bz)Lc(e.ownerDocument.documentElement);else if(o===Sz){o=e.ownerDocument.head,Lc(o);for(var f=o.firstChild;f;){var{nextSibling:p,nodeName:g}=f;f[qc]||g==="SCRIPT"||g==="STYLE"||g==="LINK"&&f.rel.toLowerCase()==="stylesheet"||o.removeChild(f),f=p}}else o===vz&&Lc(e.ownerDocument.body);o=u}while(o);Br(n)}function Qx(e,n){var o=e;e=0;do{var a=o.nextSibling;if(o.nodeType===1?n?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(n?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),a&&a.nodeType===8)if(o=a.data,o===Tf)if(e===0)break;else e--;else o!==Af&&o!==Ps&&o!==Ya&&o!==pu||e++;o=a}while(o)}function pL(e){Qx(e,!0)}function mL(e){e=e.style,typeof e.setProperty==="function"?e.setProperty("display","none","important"):e.display="none"}function gL(e){e.nodeValue=""}function yL(e){Qx(e,!1)}function bL(e,n){n=n[wz],n=n!==void 0&&n!==null&&n.hasOwnProperty("display")?n.display:null,e.style.display=n==null||typeof n==="boolean"?"":(""+n).trim()}function vL(e,n){e.nodeValue=n}function R0(e){var n=e.firstChild;n&&n.nodeType===10&&(n=n.nextSibling);for(;n;){var o=n;switch(n=n.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":R0(o),dr(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}e.removeChild(o)}}function SL(e,n,o,a){for(;e.nodeType===1;){var u=o;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(!a)if(n==="input"&&e.type==="hidden"){be(u.name,"name");var f=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;else if(!e[qc])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;else if(f!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}if(e=gi(e.nextSibling),e===null)break}return null}function wL(e,n,o){if(n==="")return null;for(;e.nodeType!==3;){if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!o)return null;if(e=gi(e.nextSibling),e===null)return null}return e}function Gx(e,n){for(;e.nodeType!==8;){if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n)return null;if(e=gi(e.nextSibling),e===null)return null}return e}function L0(e){return e.data===Ps||e.data===Ya}function B0(e){return e.data===pu||e.data===Ps&&e.ownerDocument.readyState!==_A}function xL(e,n){var o=e.ownerDocument;if(e.data===Ya)e._reactRetry=n;else if(e.data!==Ps||o.readyState!==_A)n();else{var a=function(){n(),o.removeEventListener("DOMContentLoaded",a)};o.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function gi(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n===Af||n===pu||n===Ps||n===Ya||n===Pa||n===ub||n===NA)break;if(n===Tf||n===Tp)return null}}return e}function Wx(e){if(e.nodeType===1){for(var n=e.nodeName.toLowerCase(),o={},a=e.attributes,u=0;u<a.length;u++){var f=a[u];o[Nx(f.name)]=f.name.toLowerCase()==="style"?E0(e):f.value}return{type:n,props:o}}return e.nodeType===8?e.data===Pa?{type:"Activity",props:{}}:{type:"Suspense",props:{}}:e.nodeValue}function Fx(e,n,o){return o===null||o[yz]!==!0?(e.nodeValue===n?e=null:(n=vs(n),e=vs(e.nodeValue)===n?null:e.nodeValue),e):null}function z0(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var o=e.data;if(o===Tf||o===Tp){if(n===0)return gi(e.nextSibling);n--}else o!==Af&&o!==pu&&o!==Ps&&o!==Ya&&o!==Pa||n++}e=e.nextSibling}return null}function Jx(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var o=e.data;if(o===Af||o===pu||o===Ps||o===Ya||o===Pa){if(n===0)return e;n--}else o!==Tf&&o!==Tp||n++}e=e.previousSibling}return null}function kL(e){Br(e)}function CL(e){Br(e)}function AL(e){Br(e)}function Zx(e,n,o,a,u){switch(u&&Ym(e,a.ancestorInfo),n=vd(o),e){case"html":if(e=n.documentElement,!e)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 e;case"head":if(e=n.head,!e)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 e;case"body":if(e=n.body,!e)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 e;default:throw Error("resolveSingletonInstance was called with an element type that is not supported. This is a bug in React.")}}function TL(e,n,o,a){if(!o[Cs]&&Bn(o)){var u=o.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.",u,u,u)}switch(e){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(u=o.attributes;u.length;)o.removeAttributeNode(u[0]);bn(o,e,n),o[vn]=a,o[Nn]=n}function Lc(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);dr(e)}function Sd(e){return typeof e.getRootNode==="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}function Kx(e,n,o){var a=gu;if(a&&typeof n==="string"&&n){var u=Jn(n);u='link[rel="'+e+'"][href="'+u+'"]',typeof o==="string"&&(u+='[crossorigin="'+o+'"]'),$A.has(u)||($A.add(u),e={rel:e,crossOrigin:o,href:n},a.querySelector(u)===null&&(n=a.createElement("link"),bn(n,"link",e),Mt(n),a.head.appendChild(n)))}}function ek(e,n,o,a){var u=(u=xs.current)?Sd(u):null;if(!u)throw Error('"resourceRoot" was expected to exist. This is a bug in React.');switch(e){case"meta":case"title":return null;case"style":return typeof o.precedence==="string"&&typeof o.href==="string"?(o=Rr(o.href),n=lo(u).hoistableStyles,a=n.get(o),a||(a={type:"style",instance:null,count:0,state:null},n.set(o,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href==="string"&&typeof o.precedence==="string"){e=Rr(o.href);var f=lo(u).hoistableStyles,p=f.get(e);if(!p&&(u=u.ownerDocument||u,p={type:"stylesheet",instance:null,count:0,state:{loading:Qa,preload:null}},f.set(e,p),(f=u.querySelector(Bc(e)))&&!f._p&&(p.instance=f,p.state.loading=Mf|Xi),!Qi.has(e))){var g={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy};Qi.set(e,g),f||EL(u,e,g,p.state)}if(n&&a===null)throw o=`
159
+ 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`,P(e))})}function Zo(e){e!==gu&&e.next===null&&(gu===null?wp=gu=e:gu=gu.next=e),xp=!0,H.actQueue!==null?ob||(ob=!0,Mx()):ib||(ib=!0,Mx())}function Oc(e,n){if(!lb&&xp){lb=!0;do{var o=!1;for(var a=wp;a!==null;){if(!n)if(e!==0){var u=a.pendingLanes;if(u===0)var f=0;else{var{suspendedLanes:p,pingedLanes:g}=a;f=(1<<31-zn(42|e)+1)-1,f&=u&~(p&~g),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(o=!0,Ex(a,f))}else f=ke,f=to(a,a===ut?f:0,a.cancelPendingCommit!==null||a.timeoutHandle!==Ja),(f&3)===0||no(a,f)||(o=!0,Ex(a,f));a=a.next}}while(o);lb=!1}}function eL(){Df=window.event,v0()}function v0(){xp=ob=ib=!1;var e=0;Ys!==0&&aL()&&(e=Ys);for(var n=cn(),o=null,a=wp;a!==null;){var u=a.next,f=Ax(a,n);if(f===0)a.next=null,o===null?wp=u:o.next=u,u===null&&(gu=o);else if(o=a,e!==0||(f&3)!==0)xp=!0;a=u}en!==$s&&en!==bp||Oc(e,!1),Ys!==0&&(Ys=0)}function Ax(e,n){for(var{suspendedLanes:o,pingedLanes:a,expirationTimes:u}=e,f=e.pendingLanes&-62914561;0<f;){var p=31-zn(f),g=1<<p,v=u[p];if(v===-1){if((g&o)===0||(g&a)!==0)u[p]=gl(g,n)}else v<=n&&(e.expiredLanes|=g);f&=~g}if(n=ut,o=ke,o=to(e,e===n?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==Ja),a=e.callbackNode,o===0||e===n&&(tt===Pa||tt===Ya)||e.cancelPendingCommit!==null)return a!==null&&S0(a),e.callbackNode=null,e.callbackPriority=0;if((o&3)===0||no(e,o)){if(n=o&-o,n!==e.callbackPriority||H.actQueue!==null&&a!==sb)S0(a);else return n;switch(No(o)){case yi:case ho:o=ty;break;case ll:o=qr;break;case Nd:o=ny;break;default:o=qr}return a=Tx.bind(null,e),H.actQueue!==null?(H.actQueue.push(a),o=sb):o=K0(o,a),e.callbackPriority=n,e.callbackNode=o,n}return a!==null&&S0(a),e.callbackPriority=2,e.callbackNode=null,2}function Tx(e,n){if(ep=Kd=!1,Df=window.event,en!==$s&&en!==bp)return e.callbackNode=null,e.callbackPriority=0,null;var o=e.callbackNode;if(vo===yp&&(vo=Jy),Mc()&&e.callbackNode!==o)return null;var a=ke;if(a=to(e,e===ut?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==Ja),a===0)return null;return lx(e,a,n),Ax(e,cn()),e.callbackNode!=null&&e.callbackNode===o?Tx.bind(null,e):null}function Ex(e,n){if(Mc())return null;Kd=ep,ep=!1,lx(e,n,!0)}function S0(e){e!==sb&&e!==null&&$L(e)}function Mx(){H.actQueue!==null&&H.actQueue.push(function(){return v0(),null}),Cz(function(){(je&(sn|wi))!==dn?K0(ey,eL):v0()})}function w0(){if(Ys===0){var e=_a;e===0&&(e=Bd,Bd<<=1,(Bd&261888)===0&&(Bd=256)),Ys=e}return Ys}function Dx(e){if(e==null||typeof e==="symbol"||typeof e==="boolean")return null;if(typeof e==="function")return e;return be(e,"action"),ac(""+e)}function Ox(e,n){var o=n.ownerDocument.createElement("input");return o.name=n.name,o.value=n.value,e.id&&o.setAttribute("form",e.id),n.parentNode.insertBefore(o,n),e=new FormData(e),o.parentNode.removeChild(o),e}function tL(e,n,o,a,u){if(n==="submit"&&o&&o.stateNode===u){var f=Dx((u[Hn]||null).action),p=a.submitter;p&&(n=(n=p[Hn]||null)?Dx(n.formAction):p.getAttribute("formAction"),n!==null&&(f=n,p=null));var g=new jd("action","action",null,a,u);e.push({event:g,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Ys!==0){var v=p?Ox(u,p):new FormData(u),x={pending:!0,data:v,method:u.method,action:f};Object.freeze(x),jg(o,x,null,v)}}else typeof f==="function"&&(g.preventDefault(),v=p?Ox(u,p):new FormData(u),x={pending:!0,data:v,method:u.method,action:f},Object.freeze(x),jg(o,x,f,v))},currentTarget:u}]})}}function vd(e,n,o){e.currentTarget=o;try{n(e)}catch(a){by(a)}e.currentTarget=null}function Rx(e,n){n=(n&4)!==0;for(var o=0;o<e.length;o++){var a=e[o];e:{var u=void 0,f=a.event;if(a=a.listeners,n)for(var p=a.length-1;0<=p;p--){var g=a[p],v=g.instance,x=g.currentTarget;if(g=g.listener,v!==u&&f.isPropagationStopped())break e;v!==null?Y(v,vd,f,g,x):vd(f,g,x),u=v}else for(p=0;p<a.length;p++){if(g=a[p],v=g.instance,x=g.currentTarget,g=g.listener,v!==u&&f.isPropagationStopped())break e;v!==null?Y(v,vd,f,g,x):vd(f,g,x),u=v}}}}function ze(e,n){ab.has(e)||console.error('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',e);var o=n[iy];o===void 0&&(o=n[iy]=new Set);var a=e+"__bubble";o.has(a)||(Lx(n,e,2,!1),o.add(a))}function x0(e,n,o){ab.has(e)&&!n&&console.error('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',e);var a=0;n&&(a|=4),Lx(o,e,a,n)}function k0(e){if(!e[kp]){e[kp]=!0,Mk.forEach(function(o){o!=="selectionchange"&&(ab.has(o)||x0(o,!1,e),x0(o,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[kp]||(n[kp]=!0,x0("selectionchange",!1,n))}}function Lx(e,n,o,a){switch(fk(n)){case yi:var u=HL;break;case ho:u=NL;break;default:u=q0}o=u.bind(null,n,o,e),u=void 0,!ry||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(u=!0),a?u!==void 0?e.addEventListener(n,o,{capture:!0,passive:u}):e.addEventListener(n,o,!0):u!==void 0?e.addEventListener(n,o,{passive:u}):e.addEventListener(n,o,!1)}function C0(e,n,o,a,u){var f=a;if((n&1)===0&&(n&2)===0&&a!==null)e:for(;;){if(a===null)return;var p=a.tag;if(p===3||p===4){var g=a.stateNode.containerInfo;if(g===u)break;if(p===4)for(p=a.return;p!==null;){var v=p.tag;if((v===3||v===4)&&p.stateNode.containerInfo===u)return;p=p.return}for(;g!==null;){if(p=_o(g),p===null)return;if(v=p.tag,v===5||v===6||v===26||v===27){a=f=p;continue e}g=g.parentNode}}a=a.return}$1(function(){var x=f,D=Xm(o),O=[];e:{var A=fC.get(e);if(A!==void 0){var B=jd,X=e;switch(e){case"keypress":if(Eh(o)===0)break e;case"keydown":case"keyup":B=OB;break;case"focusin":X="focus",B=hy;break;case"focusout":X="blur",B=hy;break;case"beforeblur":case"afterblur":B=hy;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":B=Jk;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":B=bB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":B=BB;break;case aC:case rC:case uC:B=wB;break;case cC:B=HB;break;case"scroll":case"scrollend":B=gB;break;case"wheel":B=_B;break;case"copy":case"cut":case"paste":B=kB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":B=Kk;break;case"toggle":case"beforetoggle":B=qB}var Z=(n&4)!==0,dt=!Z&&(e==="scroll"||e==="scrollend"),He=Z?A!==null?A+"Capture":null:A;Z=[];for(var C=x,T;C!==null;){var M=C;if(T=M.stateNode,M=M.tag,M!==5&&M!==26&&M!==27||T===null||He===null||(M=rc(C,He),M!=null&&Z.push(Rc(C,M,T))),dt)break;C=C.return}0<Z.length&&(A=new B(A,X,null,o,D),O.push({event:A,listeners:Z}))}}if((n&7)===0){e:{if(A=e==="mouseover"||e==="pointerover",B=e==="mouseout"||e==="pointerout",A&&o!==Ic&&(X=o.relatedTarget||o.fromElement)&&(_o(X)||X[Ts]))break e;if(B||A){if(A=D.window===D?D:(A=D.ownerDocument)?A.defaultView||A.parentWindow:window,B){if(X=o.relatedTarget||o.toElement,B=x,X=X?_o(X):null,X!==null&&(dt=N(X),Z=X.tag,X!==dt||Z!==5&&Z!==27&&Z!==6))X=null}else B=null,X=x;if(B!==X){if(Z=Jk,M="onMouseLeave",He="onMouseEnter",C="mouse",e==="pointerout"||e==="pointerover")Z=Kk,M="onPointerLeave",He="onPointerEnter",C="pointer";if(dt=B==null?A:Sl(B),T=X==null?A:Sl(X),A=new Z(M,C+"leave",B,o,D),A.target=dt,A.relatedTarget=T,M=null,_o(D)===x&&(Z=new Z(He,C+"enter",X,o,D),Z.target=T,Z.relatedTarget=dt,M=Z),dt=M,B&&X)t:{Z=nL,He=B,C=X,T=0;for(M=He;M;M=Z(M))T++;M=0;for(var _=C;_;_=Z(_))M++;for(;0<T-M;)He=Z(He),T--;for(;0<M-T;)C=Z(C),M--;for(;T--;){if(He===C||C!==null&&He===C.alternate){Z=He;break t}He=Z(He),C=Z(C)}Z=null}else Z=null;B!==null&&Bx(O,A,B,Z,!1),X!==null&&dt!==null&&Bx(O,dt,X,Z,!0)}}}e:{if(A=x?Sl(x):window,B=A.nodeName&&A.nodeName.toLowerCase(),B==="select"||B==="input"&&A.type==="file")var F=F1;else if(G1(A))if(lC)F=pR;else{F=hR;var ge=fR}else B=A.nodeName,!B||B.toLowerCase()!=="input"||A.type!=="checkbox"&&A.type!=="radio"?x&&sc(x.elementType)&&(F=F1):F=dR;if(F&&(F=F(e,x))){W1(O,F,o,D);break e}ge&&ge(e,A,x),e==="focusout"&&x&&A.type==="number"&&x.memoizedProps.value!=null&&U(A,"number",A.value)}switch(ge=x?Sl(x):window,e){case"focusin":if(G1(ge)||ge.contentEditable==="true")Qr=ge,py=x,Wc=null;break;case"focusout":Wc=py=Qr=null;break;case"mousedown":my=!0;break;case"contextmenu":case"mouseup":case"dragend":my=!1,iS(O,o,D);break;case"selectionchange":if($B)break;case"keydown":case"keyup":iS(O,o,D)}var oe;if(dy)e:{switch(e){case"compositionstart":var te="onCompositionStart";break e;case"compositionend":te="onCompositionEnd";break e;case"compositionupdate":te="onCompositionUpdate";break e}te=void 0}else Xr?X1(e,o)&&(te="onCompositionEnd"):e==="keydown"&&o.keyCode===eC&&(te="onCompositionStart");if(te&&(tC&&o.locale!=="ko"&&(Xr||te!=="onCompositionStart"?te==="onCompositionEnd"&&Xr&&(oe=P1()):(Es=D,uy=("value"in Es)?Es.value:Es.textContent,Xr=!0)),ge=Sd(x,te),0<ge.length&&(te=new Zk(te,e,null,o,D),O.push({event:te,listeners:ge}),oe?te.data=oe:(oe=Q1(o),oe!==null&&(te.data=oe)))),oe=jB?aR(e,o):rR(e,o))te=Sd(x,"onBeforeInput"),0<te.length&&(ge=new AB("onBeforeInput","beforeinput",null,o,D),O.push({event:ge,listeners:te}),ge.data=oe);tL(O,e,x,o,D)}Rx(O,n)})}function Rc(e,n,o){return{instance:e,listener:n,currentTarget:o}}function Sd(e,n){for(var o=n+"Capture",a=[];e!==null;){var u=e,f=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||f===null||(u=rc(e,o),u!=null&&a.unshift(Rc(e,u,f)),u=rc(e,n),u!=null&&a.push(Rc(e,u,f))),e.tag===3)return a;e=e.return}return[]}function nL(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e?e:null}function Bx(e,n,o,a,u){for(var f=n._reactName,p=[];o!==null&&o!==a;){var g=o,v=g.alternate,x=g.stateNode;if(g=g.tag,v!==null&&v===a)break;g!==5&&g!==26&&g!==27||x===null||(v=x,u?(x=rc(o,f),x!=null&&p.unshift(Rc(o,x,v))):u||(x=rc(o,f),x!=null&&p.push(Rc(o,x,v)))),o=o.return}p.length!==0&&e.push({event:n,listeners:p})}function A0(e,n){iR(e,n),e!=="input"&&e!=="textarea"&&e!=="select"||n==null||n.value!==null||Wk||(Wk=!0,e==="select"&&n.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.",e):console.error("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",e));var o={registrationNameDependencies:Ra,possibleRegistrationNames:oy};sc(e)||typeof n.is==="string"||lR(e,n,o),n.contentEditable&&!n.suppressContentEditableWarning&&n.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 un(e,n,o,a){n!==o&&(o=ws(o),ws(n)!==o&&(a[e]=n))}function iL(e,n,o){n.forEach(function(a){o[Nx(a)]=a==="style"?E0(e):e.getAttribute(a)})}function Ko(e,n){n===!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.",e,e,e):console.error("Expected `%s` listener to be a function, instead got a value of `%s` type.",e,typeof n)}function zx(e,n){return e=e.namespaceURI===Ud||e.namespaceURI===Ir?e.ownerDocument.createElementNS(e.namespaceURI,e.tagName):e.ownerDocument.createElement(e.tagName),e.innerHTML=n,e.innerHTML}function ws(e){return Ut(e)&&(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.",lt(e)),Et(e)),(typeof e==="string"?e:""+e).replace(mz,`
160
+ `).replace(gz,"")}function Hx(e,n){return n=ws(n),ws(e)===n?!0:!1}function at(e,n,o,a,u,f){switch(o){case"children":if(typeof a==="string")Th(a,n,!1),n==="body"||n==="textarea"&&a===""||lc(e,a);else if(typeof a==="number"||typeof a==="bigint")Th(""+a,n,!1),n!=="body"&&lc(e,""+a);break;case"className":cs(e,"class",a);break;case"tabIndex":cs(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":cs(e,o,a);break;case"style":V1(e,a,f);break;case"data":if(n!=="object"){cs(e,"data",a);break}case"src":case"href":if(a===""&&(n!=="a"||o!=="href")){o==="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.',o,o):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.',o,o),e.removeAttribute(o);break}if(a==null||typeof a==="function"||typeof a==="symbol"||typeof a==="boolean"){e.removeAttribute(o);break}be(a,o),a=ac(""+a),e.setAttribute(o,a);break;case"action":case"formAction":if(a!=null&&(n==="form"?o==="formAction"?console.error("You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>."):typeof a==="function"&&(u.encType==null&&u.method==null||Tp||(Tp=!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.")),u.target==null||Ap||(Ap=!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."))):n==="input"||n==="button"?o==="action"?console.error("You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>."):n!=="input"||u.type==="submit"||u.type==="image"||Cp?n!=="button"||u.type==null||u.type==="submit"||Cp?typeof a==="function"&&(u.name==null||zA||(zA=!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.')),u.formEncType==null&&u.formMethod==null||Tp||(Tp=!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.")),u.formTarget==null||Ap||(Ap=!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."))):(Cp=!0,console.error('A button can only specify a formAction along with type="submit" or no type.')):(Cp=!0,console.error('An input can only specify a formAction along with type="submit" or type="image".')):o==="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 a==="function"){e.setAttribute(o,"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 f==="function"&&(o==="formAction"?(n!=="input"&&at(e,n,"name",u.name,u,null),at(e,n,"formEncType",u.formEncType,u,null),at(e,n,"formMethod",u.formMethod,u,null),at(e,n,"formTarget",u.formTarget,u,null)):(at(e,n,"encType",u.encType,u,null),at(e,n,"method",u.method,u,null),at(e,n,"target",u.target,u,null)));if(a==null||typeof a==="symbol"||typeof a==="boolean"){e.removeAttribute(o);break}be(a,o),a=ac(""+a),e.setAttribute(o,a);break;case"onClick":a!=null&&(typeof a!=="function"&&Ko(o,a),e.onclick=Al);break;case"onScroll":a!=null&&(typeof a!=="function"&&Ko(o,a),ze("scroll",e));break;case"onScrollEnd":a!=null&&(typeof a!=="function"&&Ko(o,a),ze("scrollend",e));break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!=="object"||!("__html"in a))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(o=a.__html,o!=null){if(u.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");e.innerHTML=o}}break;case"multiple":e.multiple=a&&typeof a!=="function"&&typeof a!=="symbol";break;case"muted":e.muted=a&&typeof a!=="function"&&typeof a!=="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a==="function"||typeof a==="boolean"||typeof a==="symbol"){e.removeAttribute("xlink:href");break}be(a,o),o=ac(""+a),e.setAttributeNS(Ga,"xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!=="function"&&typeof a!=="symbol"?(be(a,o),e.setAttribute(o,""+a)):e.removeAttribute(o);break;case"inert":a!==""||Ep[o]||(Ep[o]=!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.",o));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":a&&typeof a!=="function"&&typeof a!=="symbol"?e.setAttribute(o,""):e.removeAttribute(o);break;case"capture":case"download":a===!0?e.setAttribute(o,""):a!==!1&&a!=null&&typeof a!=="function"&&typeof a!=="symbol"?(be(a,o),e.setAttribute(o,a)):e.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!=="function"&&typeof a!=="symbol"&&!isNaN(a)&&1<=a?(be(a,o),e.setAttribute(o,a)):e.removeAttribute(o);break;case"rowSpan":case"start":a==null||typeof a==="function"||typeof a==="symbol"||isNaN(a)?e.removeAttribute(o):(be(a,o),e.setAttribute(o,a));break;case"popover":ze("beforetoggle",e),ze("toggle",e),br(e,"popover",a);break;case"xlinkActuate":so(e,Ga,"xlink:actuate",a);break;case"xlinkArcrole":so(e,Ga,"xlink:arcrole",a);break;case"xlinkRole":so(e,Ga,"xlink:role",a);break;case"xlinkShow":so(e,Ga,"xlink:show",a);break;case"xlinkTitle":so(e,Ga,"xlink:title",a);break;case"xlinkType":so(e,Ga,"xlink:type",a);break;case"xmlBase":so(e,rb,"xml:base",a);break;case"xmlLang":so(e,rb,"xml:lang",a);break;case"xmlSpace":so(e,rb,"xml:space",a);break;case"is":f!=null&&console.error('Cannot update the "is" prop after it has been initialized.'),br(e,"is",a);break;case"innerText":case"textContent":break;case"popoverTarget":HA||a==null||typeof a!=="object"||(HA=!0,console.error("The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.",a));default:!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N"?(o=j1(o),br(e,o,a)):Ra.hasOwnProperty(o)&&a!=null&&typeof a!=="function"&&Ko(o,a)}}function T0(e,n,o,a,u,f){switch(o){case"style":V1(e,a,f);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!=="object"||!("__html"in a))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(o=a.__html,o!=null){if(u.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");e.innerHTML=o}}break;case"children":typeof a==="string"?lc(e,a):(typeof a==="number"||typeof a==="bigint")&&lc(e,""+a);break;case"onScroll":a!=null&&(typeof a!=="function"&&Ko(o,a),ze("scroll",e));break;case"onScrollEnd":a!=null&&(typeof a!=="function"&&Ko(o,a),ze("scrollend",e));break;case"onClick":a!=null&&(typeof a!=="function"&&Ko(o,a),e.onclick=Al);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(Ra.hasOwnProperty(o))a!=null&&typeof a!=="function"&&Ko(o,a);else e:{if(o[0]==="o"&&o[1]==="n"&&(u=o.endsWith("Capture"),n=o.slice(2,u?o.length-7:void 0),f=e[Hn]||null,f=f!=null?f[o]:null,typeof f==="function"&&e.removeEventListener(n,f,u),typeof a==="function")){typeof f!=="function"&&f!==null&&(o in e?e[o]=null:e.hasAttribute(o)&&e.removeAttribute(o)),e.addEventListener(n,a,u);break e}o in e?e[o]=a:a===!0?e.setAttribute(o,""):br(e,o,a)}}}function yn(e,n,o){switch(A0(n,o),n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ze("error",e),ze("load",e);var a=!1,u=!1,f;for(f in o)if(o.hasOwnProperty(f)){var p=o[f];if(p!=null)switch(f){case"src":a=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:at(e,n,f,p,o,null)}}u&&at(e,n,"srcSet",o.srcSet,o,null),a&&at(e,n,"src",o.src,o,null);return;case"input":xl("input",o),ze("invalid",e);var g=f=p=u=null,v=null,x=null;for(a in o)if(o.hasOwnProperty(a)){var D=o[a];if(D!=null)switch(a){case"name":u=D;break;case"type":p=D;break;case"checked":v=D;break;case"defaultChecked":x=D;break;case"value":f=D;break;case"defaultValue":g=D;break;case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:at(e,n,a,D,o,null)}}Ch(e,o),nc(e,f,g,v,x,p,u,!1);return;case"select":xl("select",o),ze("invalid",e),a=p=f=null;for(u in o)if(o.hasOwnProperty(u)&&(g=o[u],g!=null))switch(u){case"value":f=g;break;case"defaultValue":p=g;break;case"multiple":a=g;default:at(e,n,u,g,o,null)}Ae(e,o),n=f,o=p,e.multiple=!!a,n!=null?ve(e,!!a,n,!1):o!=null&&ve(e,!!a,o,!0);return;case"textarea":xl("textarea",o),ze("invalid",e),f=u=a=null;for(p in o)if(o.hasOwnProperty(p)&&(g=o[p],g!=null))switch(p){case"value":a=g;break;case"defaultValue":u=g;break;case"children":f=g;break;case"dangerouslySetInnerHTML":if(g!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:at(e,n,p,g,o,null)}Ue(e,o),Cl(e,a,u,f);return;case"option":le(e,o);for(v in o)if(o.hasOwnProperty(v)&&(a=o[v],a!=null))switch(v){case"selected":e.selected=a&&typeof a!=="function"&&typeof a!=="symbol";break;default:at(e,n,v,a,o,null)}return;case"dialog":ze("beforetoggle",e),ze("toggle",e),ze("cancel",e),ze("close",e);break;case"iframe":case"object":ze("load",e);break;case"video":case"audio":for(a=0;a<Tf.length;a++)ze(Tf[a],e);break;case"image":ze("error",e),ze("load",e);break;case"details":ze("toggle",e);break;case"embed":case"source":case"link":ze("error",e),ze("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(x in o)if(o.hasOwnProperty(x)&&(a=o[x],a!=null))switch(x){case"children":case"dangerouslySetInnerHTML":throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:at(e,n,x,a,o,null)}return;default:if(sc(n)){for(D in o)o.hasOwnProperty(D)&&(a=o[D],a!==void 0&&T0(e,n,D,a,o,void 0));return}}for(g in o)o.hasOwnProperty(g)&&(a=o[g],a!=null&&at(e,n,g,a,o,null))}function oL(e,n,o,a){switch(A0(n,a),n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,f=null,p=null,g=null,v=null,x=null,D=null;for(B in o){var O=o[B];if(o.hasOwnProperty(B)&&O!=null)switch(B){case"checked":break;case"value":break;case"defaultValue":v=O;default:a.hasOwnProperty(B)||at(e,n,B,null,a,O)}}for(var A in a){var B=a[A];if(O=o[A],a.hasOwnProperty(A)&&(B!=null||O!=null))switch(A){case"type":f=B;break;case"name":u=B;break;case"checked":x=B;break;case"defaultChecked":D=B;break;case"value":p=B;break;case"defaultValue":g=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:B!==O&&at(e,n,A,B,a,O)}}n=o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null,a=a.type==="checkbox"||a.type==="radio"?a.checked!=null:a.value!=null,n||!a||BA||(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"),BA=!0),!n||a||LA||(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"),LA=!0),Bi(e,p,g,v,x,D,f,u);return;case"select":B=p=g=A=null;for(f in o)if(v=o[f],o.hasOwnProperty(f)&&v!=null)switch(f){case"value":break;case"multiple":B=v;default:a.hasOwnProperty(f)||at(e,n,f,null,a,v)}for(u in a)if(f=a[u],v=o[u],a.hasOwnProperty(u)&&(f!=null||v!=null))switch(u){case"value":A=f;break;case"defaultValue":g=f;break;case"multiple":p=f;default:f!==v&&at(e,n,u,f,a,v)}a=g,n=p,o=B,A!=null?ve(e,!!n,A,!1):!!o!==!!n&&(a!=null?ve(e,!!n,a,!0):ve(e,!!n,n?[]:"",!1));return;case"textarea":B=A=null;for(g in o)if(u=o[g],o.hasOwnProperty(g)&&u!=null&&!a.hasOwnProperty(g))switch(g){case"value":break;case"children":break;default:at(e,n,g,null,a,u)}for(p in a)if(u=a[p],f=o[p],a.hasOwnProperty(p)&&(u!=null||f!=null))switch(p){case"value":A=u;break;case"defaultValue":B=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:u!==f&&at(e,n,p,u,a,f)}kl(e,A,B);return;case"option":for(var X in o)if(A=o[X],o.hasOwnProperty(X)&&A!=null&&!a.hasOwnProperty(X))switch(X){case"selected":e.selected=!1;break;default:at(e,n,X,null,a,A)}for(v in a)if(A=a[v],B=o[v],a.hasOwnProperty(v)&&A!==B&&(A!=null||B!=null))switch(v){case"selected":e.selected=A&&typeof A!=="function"&&typeof A!=="symbol";break;default:at(e,n,v,A,a,B)}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 Z in o)A=o[Z],o.hasOwnProperty(Z)&&A!=null&&!a.hasOwnProperty(Z)&&at(e,n,Z,null,a,A);for(x in a)if(A=a[x],B=o[x],a.hasOwnProperty(x)&&A!==B&&(A!=null||B!=null))switch(x){case"children":case"dangerouslySetInnerHTML":if(A!=null)throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:at(e,n,x,A,a,B)}return;default:if(sc(n)){for(var dt in o)A=o[dt],o.hasOwnProperty(dt)&&A!==void 0&&!a.hasOwnProperty(dt)&&T0(e,n,dt,void 0,a,A);for(D in a)A=a[D],B=o[D],!a.hasOwnProperty(D)||A===B||A===void 0&&B===void 0||T0(e,n,D,A,a,B);return}}for(var He in o)A=o[He],o.hasOwnProperty(He)&&A!=null&&!a.hasOwnProperty(He)&&at(e,n,He,null,a,A);for(O in a)A=a[O],B=o[O],!a.hasOwnProperty(O)||A===B||A==null&&B==null||at(e,n,O,A,a,B)}function Nx(e){switch(e){case"class":return"className";case"for":return"htmlFor";default:return e}}function E0(e){var n={};e=e.style;for(var o=0;o<e.length;o++){var a=e[o];n[a]=e.getPropertyValue(a)}return n}function _x(e,n,o){if(n!=null&&typeof n!=="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 a,u=a="",f;for(f in n)if(n.hasOwnProperty(f)){var p=n[f];p!=null&&typeof p!=="boolean"&&p!==""&&(f.indexOf("--")===0?(Ke(p,f),a+=u+f+":"+(""+p).trim()):typeof p!=="number"||p===0||Qk.has(f)?(Ke(p,f),a+=u+f.replace(Ik,"-$1").toLowerCase().replace($k,"-ms-")+":"+(""+p).trim()):a+=u+f.replace(Ik,"-$1").toLowerCase().replace($k,"-ms-")+":"+p+"px",u=";")}a=a||null,n=e.getAttribute("style"),n!==a&&(a=ws(a),ws(n)!==a&&(o.style=E0(e)))}}function zi(e,n,o,a,u,f){if(u.delete(o),e=e.getAttribute(o),e===null)switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":return}else if(a!=null)switch(typeof a){case"function":case"symbol":case"boolean":break;default:if(be(a,n),e===""+a)return}un(n,e,a,f)}function Ux(e,n,o,a,u,f){if(u.delete(o),e=e.getAttribute(o),e===null){switch(typeof a){case"function":case"symbol":return}if(!a)return}else switch(typeof a){case"function":case"symbol":break;default:if(a)return}un(n,e,a,f)}function M0(e,n,o,a,u,f){if(u.delete(o),e=e.getAttribute(o),e===null)switch(typeof a){case"undefined":case"function":case"symbol":return}else if(a!=null)switch(typeof a){case"function":case"symbol":break;default:if(be(a,o),e===""+a)return}un(n,e,a,f)}function qx(e,n,o,a,u,f){if(u.delete(o),e=e.getAttribute(o),e===null)switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":return;default:if(isNaN(a))return}else if(a!=null)switch(typeof a){case"function":case"symbol":case"boolean":break;default:if(!isNaN(a)&&(be(a,n),e===""+a))return}un(n,e,a,f)}function D0(e,n,o,a,u,f){if(u.delete(o),e=e.getAttribute(o),e===null)switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":return}else if(a!=null)switch(typeof a){case"function":case"symbol":case"boolean":break;default:if(be(a,n),o=ac(""+a),e===o)return}un(n,e,a,f)}function Vx(e,n,o,a){for(var u={},f=new Set,p=e.attributes,g=0;g<p.length;g++)switch(p[g].name.toLowerCase()){case"value":break;case"checked":break;case"selected":break;default:f.add(p[g].name)}if(sc(n)){for(var v in o)if(o.hasOwnProperty(v)){var x=o[v];if(x!=null){if(Ra.hasOwnProperty(v))typeof x!=="function"&&Ko(v,x);else if(o.suppressHydrationWarning!==!0)switch(v){case"children":typeof x!=="string"&&typeof x!=="number"||un("children",e.textContent,x,u);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":p=e.innerHTML,x=x?x.__html:void 0,x!=null&&(x=zx(e,x),un(v,p,x,u));continue;case"style":f.delete(v),_x(e,x,u);continue;case"offsetParent":case"offsetTop":case"offsetLeft":case"offsetWidth":case"offsetHeight":case"isContentEditable":case"outerText":case"outerHTML":f.delete(v.toLowerCase()),console.error("Assignment to read-only property will result in a no-op: `%s`",v);continue;case"className":f.delete("class"),p=yr(e,"class",x),un("className",p,x,u);continue;default:a.context===Ql&&n!=="svg"&&n!=="math"?f.delete(v.toLowerCase()):f.delete(v),p=yr(e,v,x),un(v,p,x,u)}}}}else for(x in o)if(o.hasOwnProperty(x)&&(v=o[x],v!=null)){if(Ra.hasOwnProperty(x))typeof v!=="function"&&Ko(x,v);else if(o.suppressHydrationWarning!==!0)switch(x){case"children":typeof v!=="string"&&typeof v!=="number"||un("children",e.textContent,v,u);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"value":case"checked":case"selected":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":p=e.innerHTML,v=v?v.__html:void 0,v!=null&&(v=zx(e,v),p!==v&&(u[x]={__html:p}));continue;case"className":zi(e,x,"class",v,f,u);continue;case"tabIndex":zi(e,x,"tabindex",v,f,u);continue;case"style":f.delete(x),_x(e,v,u);continue;case"multiple":f.delete(x),un(x,e.multiple,v,u);continue;case"muted":f.delete(x),un(x,e.muted,v,u);continue;case"autoFocus":f.delete("autofocus"),un(x,e.autofocus,v,u);continue;case"data":if(n!=="object"){f.delete(x),p=e.getAttribute("data"),un(x,p,v,u);continue}case"src":case"href":if(!(v!==""||n==="a"&&x==="href"||n==="object"&&x==="data")){x==="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.',x,x):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.',x,x);continue}D0(e,x,x,v,f,u);continue;case"action":case"formAction":if(p=e.getAttribute(x),typeof v==="function"){f.delete(x.toLowerCase()),x==="formAction"?(f.delete("name"),f.delete("formenctype"),f.delete("formmethod"),f.delete("formtarget")):(f.delete("enctype"),f.delete("method"),f.delete("target"));continue}else if(p===yz){f.delete(x.toLowerCase()),un(x,"function",v,u);continue}D0(e,x,x.toLowerCase(),v,f,u);continue;case"xlinkHref":D0(e,x,"xlink:href",v,f,u);continue;case"contentEditable":M0(e,x,"contenteditable",v,f,u);continue;case"spellCheck":M0(e,x,"spellcheck",v,f,u);continue;case"draggable":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":M0(e,x,x,v,f,u);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":Ux(e,x,x.toLowerCase(),v,f,u);continue;case"capture":case"download":e:{g=e;var D=p=x,O=u;if(f.delete(D),g=g.getAttribute(D),g===null)switch(typeof v){case"undefined":case"function":case"symbol":break e;default:if(v===!1)break e}else if(v!=null)switch(typeof v){case"function":case"symbol":break;case"boolean":if(v===!0&&g==="")break e;break;default:if(be(v,p),g===""+v)break e}un(p,g,v,O)}continue;case"cols":case"rows":case"size":case"span":e:{if(g=e,D=p=x,O=u,f.delete(D),g=g.getAttribute(D),g===null)switch(typeof v){case"undefined":case"function":case"symbol":case"boolean":break e;default:if(isNaN(v)||1>v)break e}else if(v!=null)switch(typeof v){case"function":case"symbol":case"boolean":break;default:if(!(isNaN(v)||1>v)&&(be(v,p),g===""+v))break e}un(p,g,v,O)}continue;case"rowSpan":qx(e,x,"rowspan",v,f,u);continue;case"start":qx(e,x,x,v,f,u);continue;case"xHeight":zi(e,x,"x-height",v,f,u);continue;case"xlinkActuate":zi(e,x,"xlink:actuate",v,f,u);continue;case"xlinkArcrole":zi(e,x,"xlink:arcrole",v,f,u);continue;case"xlinkRole":zi(e,x,"xlink:role",v,f,u);continue;case"xlinkShow":zi(e,x,"xlink:show",v,f,u);continue;case"xlinkTitle":zi(e,x,"xlink:title",v,f,u);continue;case"xlinkType":zi(e,x,"xlink:type",v,f,u);continue;case"xmlBase":zi(e,x,"xml:base",v,f,u);continue;case"xmlLang":zi(e,x,"xml:lang",v,f,u);continue;case"xmlSpace":zi(e,x,"xml:space",v,f,u);continue;case"inert":v!==""||Ep[x]||(Ep[x]=!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.",x)),Ux(e,x,x,v,f,u);continue;default:if(!(2<x.length)||x[0]!=="o"&&x[0]!=="O"||x[1]!=="n"&&x[1]!=="N"){g=j1(x),p=!1,a.context===Ql&&n!=="svg"&&n!=="math"?f.delete(g.toLowerCase()):(D=x.toLowerCase(),D=qd.hasOwnProperty(D)?qd[D]||null:null,D!==null&&D!==x&&(p=!0,f.delete(D)),f.delete(g));e:if(D=e,O=g,g=v,ec(O))if(D.hasAttribute(O))D=D.getAttribute(O),be(g,O),g=D===""+g?g:D;else{switch(typeof g){case"function":case"symbol":break e;case"boolean":if(D=O.toLowerCase().slice(0,5),D!=="data-"&&D!=="aria-")break e}g=g===void 0?void 0:null}else g=void 0;p||un(x,g,v,u)}}}return 0<f.size&&o.suppressHydrationWarning!==!0&&iL(e,f,u),Object.keys(u).length===0?null:u}function lL(e,n){switch(e.length){case 0:return"";case 1:return e[0];case 2:return e[0]+" "+n+" "+e[1];default:return e.slice(0,-1).join(", ")+", "+n+" "+e[e.length-1]}}function jx(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function sL(){if(typeof performance.getEntriesByType==="function"){for(var e=0,n=0,o=performance.getEntriesByType("resource"),a=0;a<o.length;a++){var u=o[a],f=u.transferSize,p=u.initiatorType,g=u.duration;if(f&&g&&jx(p)){p=0,g=u.responseEnd;for(a+=1;a<o.length;a++){var v=o[a],x=v.startTime;if(x>g)break;var{transferSize:D,initiatorType:O}=v;D&&jx(O)&&(v=v.responseEnd,p+=D*(v<g?1:(g-x)/(v-x)))}if(--a,n+=8*(f+p)/(u.duration/1000),e++,10<e)break}}if(0<e)return n/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==="number")?e:5}function wd(e){return e.nodeType===9?e:e.ownerDocument}function Ix(e){switch(e){case Ir:return bu;case Ud:return Dp;default:return Ql}}function $x(e,n){if(e===Ql)switch(n){case"svg":return bu;case"math":return Dp;default:return Ql}return e===bu&&n==="foreignObject"?Ql:e}function O0(e,n){return e==="textarea"||e==="noscript"||typeof n.children==="string"||typeof n.children==="number"||typeof n.children==="bigint"||typeof n.dangerouslySetInnerHTML==="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}function aL(){var e=window.event;if(e&&e.type==="popstate"){if(e===hb)return!1;return hb=e,!0}return hb=null,!1}function Lc(){var e=window.event;return e&&e!==Df?e.type:null}function Bc(){var e=window.event;return e&&e!==Df?e.timeStamp:-1.1}function rL(e){setTimeout(function(){throw e})}function uL(e,n,o){switch(n){case"button":case"input":case"select":case"textarea":o.autoFocus&&e.focus();break;case"img":o.src?e.src=o.src:o.srcSet&&(e.srcset=o.srcSet)}}function cL(){}function fL(e,n,o,a){oL(e,n,o,a),e[Hn]=a}function Px(e){lc(e,"")}function hL(e,n,o){e.nodeValue=o}function Yx(e){if(!e.__reactWarnedAboutChildrenConflict){var n=e[Hn]||null;if(n!==null){var o=Ln(e);o!==null&&(typeof n.children==="string"||typeof n.children==="number"?(e.__reactWarnedAboutChildrenConflict=!0,Y(o,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.')})):n.dangerouslySetInnerHTML!=null&&(e.__reactWarnedAboutChildrenConflict=!0,Y(o,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 xs(e){return e==="head"}function dL(e,n){e.removeChild(n)}function pL(e,n){(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e).removeChild(n)}function Xx(e,n){var o=n,a=0;do{var u=o.nextSibling;if(e.removeChild(o),u&&u.nodeType===8)if(o=u.data,o===Mf||o===Mp){if(a===0){e.removeChild(u),Nr(n);return}a--}else if(o===Ef||o===Xs||o===Fa||o===yu||o===Wa)a++;else if(o===vz)zc(e.ownerDocument.documentElement);else if(o===wz){o=e.ownerDocument.head,zc(o);for(var f=o.firstChild;f;){var{nextSibling:p,nodeName:g}=f;f[jc]||g==="SCRIPT"||g==="STYLE"||g==="LINK"&&f.rel.toLowerCase()==="stylesheet"||o.removeChild(f),f=p}}else o===Sz&&zc(e.ownerDocument.body);o=u}while(o);Nr(n)}function Qx(e,n){var o=e;e=0;do{var a=o.nextSibling;if(o.nodeType===1?n?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(n?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),a&&a.nodeType===8)if(o=a.data,o===Mf)if(e===0)break;else e--;else o!==Ef&&o!==Xs&&o!==Fa&&o!==yu||e++;o=a}while(o)}function mL(e){Qx(e,!0)}function gL(e){e=e.style,typeof e.setProperty==="function"?e.setProperty("display","none","important"):e.display="none"}function yL(e){e.nodeValue=""}function bL(e){Qx(e,!1)}function vL(e,n){n=n[xz],n=n!==void 0&&n!==null&&n.hasOwnProperty("display")?n.display:null,e.style.display=n==null||typeof n==="boolean"?"":(""+n).trim()}function SL(e,n){e.nodeValue=n}function R0(e){var n=e.firstChild;n&&n.nodeType===10&&(n=n.nextSibling);for(;n;){var o=n;switch(n=n.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":R0(o),Rn(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}e.removeChild(o)}}function wL(e,n,o,a){for(;e.nodeType===1;){var u=o;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(!a)if(n==="input"&&e.type==="hidden"){be(u.name,"name");var f=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;else if(!e[jc])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;else if(f!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}if(e=pi(e.nextSibling),e===null)break}return null}function xL(e,n,o){if(n==="")return null;for(;e.nodeType!==3;){if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!o)return null;if(e=pi(e.nextSibling),e===null)return null}return e}function Gx(e,n){for(;e.nodeType!==8;){if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n)return null;if(e=pi(e.nextSibling),e===null)return null}return e}function L0(e){return e.data===Xs||e.data===Fa}function B0(e){return e.data===yu||e.data===Xs&&e.ownerDocument.readyState!==_A}function kL(e,n){var o=e.ownerDocument;if(e.data===Fa)e._reactRetry=n;else if(e.data!==Xs||o.readyState!==_A)n();else{var a=function(){n(),o.removeEventListener("DOMContentLoaded",a)};o.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function pi(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n===Ef||n===yu||n===Xs||n===Fa||n===Wa||n===ub||n===NA)break;if(n===Mf||n===Mp)return null}}return e}function Wx(e){if(e.nodeType===1){for(var n=e.nodeName.toLowerCase(),o={},a=e.attributes,u=0;u<a.length;u++){var f=a[u];o[Nx(f.name)]=f.name.toLowerCase()==="style"?E0(e):f.value}return{type:n,props:o}}return e.nodeType===8?e.data===Wa?{type:"Activity",props:{}}:{type:"Suspense",props:{}}:e.nodeValue}function Fx(e,n,o){return o===null||o[bz]!==!0?(e.nodeValue===n?e=null:(n=ws(n),e=ws(e.nodeValue)===n?null:e.nodeValue),e):null}function z0(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var o=e.data;if(o===Mf||o===Mp){if(n===0)return pi(e.nextSibling);n--}else o!==Ef&&o!==yu&&o!==Xs&&o!==Fa&&o!==Wa||n++}e=e.nextSibling}return null}function Jx(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var o=e.data;if(o===Ef||o===yu||o===Xs||o===Fa||o===Wa){if(n===0)return e;n--}else o!==Mf&&o!==Mp||n++}e=e.previousSibling}return null}function CL(e){Nr(e)}function AL(e){Nr(e)}function TL(e){Nr(e)}function Zx(e,n,o,a,u){switch(u&&Ym(e,a.ancestorInfo),n=wd(o),e){case"html":if(e=n.documentElement,!e)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 e;case"head":if(e=n.head,!e)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 e;case"body":if(e=n.body,!e)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 e;default:throw Error("resolveSingletonInstance was called with an element type that is not supported. This is a bug in React.")}}function EL(e,n,o,a){if(!o[Ts]&&Ln(o)){var u=o.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.",u,u,u)}switch(e){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(u=o.attributes;u.length;)o.removeAttributeNode(u[0]);yn(o,e,n),o[bn]=a,o[Hn]=n}function zc(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Rn(e)}function xd(e){return typeof e.getRootNode==="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}function Kx(e,n,o){var a=vu;if(a&&typeof n==="string"&&n){var u=Fn(n);u='link[rel="'+e+'"][href="'+u+'"]',typeof o==="string"&&(u+='[crossorigin="'+o+'"]'),$A.has(u)||($A.add(u),e={rel:e,crossOrigin:o,href:n},a.querySelector(u)===null&&(n=a.createElement("link"),yn(n,"link",e),Mt(n),a.head.appendChild(n)))}}function ek(e,n,o,a){var u=(u=Cs.current)?xd(u):null;if(!u)throw Error('"resourceRoot" was expected to exist. This is a bug in React.');switch(e){case"meta":case"title":return null;case"style":return typeof o.precedence==="string"&&typeof o.href==="string"?(o=zr(o.href),n=oo(u).hoistableStyles,a=n.get(o),a||(a={type:"style",instance:null,count:0,state:null},n.set(o,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href==="string"&&typeof o.precedence==="string"){e=zr(o.href);var f=oo(u).hoistableStyles,p=f.get(e);if(!p&&(u=u.ownerDocument||u,p={type:"stylesheet",instance:null,count:0,state:{loading:Za,preload:null}},f.set(e,p),(f=u.querySelector(Hc(e)))&&!f._p&&(p.instance=f,p.state.loading=Of|Yi),!Xi.has(e))){var g={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy};Xi.set(e,g),f||ML(u,e,g,p.state)}if(n&&a===null)throw o=`
161
161
 
162
- - `+wd(n)+`
163
- + `+wd(o),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."+o);return p}if(n&&a!==null)throw o=`
162
+ - `+kd(n)+`
163
+ + `+kd(o),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."+o);return p}if(n&&a!==null)throw o=`
164
164
 
165
- - `+wd(n)+`
166
- + `+wd(o),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."+o);return null;case"script":return n=o.async,o=o.src,typeof o==="string"&&n&&typeof n!=="function"&&typeof n!=="symbol"?(o=Lr(o),n=lo(u).hoistableScripts,a=n.get(o),a||(a={type:"script",instance:null,count:0,state:null},n.set(o,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error('getResource encountered a type it did not expect: "'+e+'". this is a bug in React.')}}function wd(e){var n=0,o="<link";return typeof e.rel==="string"?(n++,o+=' rel="'+e.rel+'"'):ho.call(e,"rel")&&(n++,o+=' rel="'+(e.rel===null?"null":"invalid type "+typeof e.rel)+'"'),typeof e.href==="string"?(n++,o+=' href="'+e.href+'"'):ho.call(e,"href")&&(n++,o+=' href="'+(e.href===null?"null":"invalid type "+typeof e.href)+'"'),typeof e.precedence==="string"?(n++,o+=' precedence="'+e.precedence+'"'):ho.call(e,"precedence")&&(n++,o+=" precedence={"+(e.precedence===null?"null":"invalid type "+typeof e.precedence)+"}"),Object.getOwnPropertyNames(e).length>n&&(o+=" ..."),o+" />"}function Rr(e){return'href="'+Jn(e)+'"'}function Bc(e){return'link[rel="stylesheet"]['+e+"]"}function tk(e){return Me({},e,{"data-precedence":e.precedence,precedence:null})}function EL(e,n,o,a){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?a.loading=Mf:(n=e.createElement("link"),a.preload=n,n.addEventListener("load",function(){return a.loading|=Mf}),n.addEventListener("error",function(){return a.loading|=IA}),bn(n,"link",o),Mt(n),e.head.appendChild(n))}function Lr(e){return'[src="'+Jn(e)+'"]'}function zc(e){return"script[async]"+e}function nk(e,n,o){if(n.count++,n.instance===null)switch(n.type){case"style":var a=e.querySelector('style[data-href~="'+Jn(o.href)+'"]');if(a)return n.instance=a,Mt(a),a;var u=Me({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Mt(a),bn(a,"style",u),xd(a,o.precedence,e),n.instance=a;case"stylesheet":u=Rr(o.href);var f=e.querySelector(Bc(u));if(f)return n.state.loading|=Xi,n.instance=f,Mt(f),f;a=tk(o),(u=Qi.get(u))&&H0(a,u),f=(e.ownerDocument||e).createElement("link"),Mt(f);var p=f;return p._p=new Promise(function(g,v){p.onload=g,p.onerror=v}),bn(f,"link",a),n.state.loading|=Xi,xd(f,o.precedence,e),n.instance=f;case"script":if(f=Lr(o.src),u=e.querySelector(zc(f)))return n.instance=u,Mt(u),u;if(a=o,u=Qi.get(f))a=Me({},o),N0(a,u);return e=e.ownerDocument||e,u=e.createElement("script"),Mt(u),bn(u,"link",a),e.head.appendChild(u),n.instance=u;case"void":return null;default:throw Error('acquireResource encountered a resource type it did not expect: "'+n.type+'". this is a bug in React.')}else n.type==="stylesheet"&&(n.state.loading&Xi)===Qa&&(a=n.instance,n.state.loading|=Xi,xd(a,o.precedence,e));return n.instance}function xd(e,n,o){for(var a=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=a.length?a[a.length-1]:null,f=u,p=0;p<a.length;p++){var g=a[p];if(g.dataset.precedence===n)f=g;else if(f!==u)break}f?f.parentNode.insertBefore(e,f.nextSibling):(n=o.nodeType===9?o.head:o,n.insertBefore(e,n.firstChild))}function H0(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function N0(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}function ik(e,n,o){if(Mp===null){var a=new Map,u=Mp=new Map;u.set(o,a)}else u=Mp,a=u.get(o),a||(a=new Map,u.set(o,a));if(a.has(e))return a;a.set(e,null),o=o.getElementsByTagName(e);for(u=0;u<o.length;u++){var f=o[u];if(!(f[qc]||f[vn]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!==qr){var p=f.getAttribute(n)||"";p=e+p;var g=a.get(p);g?g.push(f):a.set(p,[f])}}return a}function ok(e,n,o){e=e.ownerDocument||e,e.head.insertBefore(o,n==="title"?e.querySelector("head > title"):null)}function ML(e,n,o){var a=!o.ancestorInfo.containerTagInScope;if(o.context===mu||n.itemProp!=null)return!a||n.itemProp==null||e!=="meta"&&e!=="title"&&e!=="style"&&e!=="link"&&e!=="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.",e,e),!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!=="string"||typeof n.href!=="string"||n.href===""){a&&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 n.rel!=="string"||typeof n.href!=="string"||n.href===""||n.onLoad||n.onError){if(n.rel==="stylesheet"&&typeof n.precedence==="string"){e=n.href;var{onError:u,disabled:f}=n;o=[],n.onLoad&&o.push("`onLoad`"),u&&o.push("`onError`"),f!=null&&o.push("`disabled`"),u=oL(o,"and"),u+=o.length===1?" prop":" props",f=o.length===1?"an "+u:"the "+u,o.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.',e,f,u)}a&&(typeof n.rel!=="string"||typeof n.href!=="string"||n.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"):(n.onError||n.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(n.rel){case"stylesheet":return e=n.precedence,n=n.disabled,typeof e!=="string"&&a&&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 e==="string"&&n==null;default:return!0}case"script":if(e=n.async&&typeof n.async!=="function"&&typeof n.async!=="symbol",!e||n.onLoad||n.onError||!n.src||typeof n.src!=="string"){a&&(e?n.onLoad||n.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":a&&console.error("Cannot render <%s> outside the main document. Try moving it into the root <head> tag.",e)}return!1}function lk(e){return e.type==="stylesheet"&&(e.state.loading&jA)===Qa?!1:!0}function DL(e,n,o,a){if(o.type==="stylesheet"&&(typeof a.media!=="string"||matchMedia(a.media).matches!==!1)&&(o.state.loading&Xi)===Qa){if(o.instance===null){var u=Rr(a.href),f=n.querySelector(Bc(u));if(f){n=f._p,n!==null&&typeof n==="object"&&typeof n.then==="function"&&(e.count++,e=kd.bind(e),n.then(e,e)),o.state.loading|=Xi,o.instance=f,Mt(f);return}f=n.ownerDocument||n,a=tk(a),(u=Qi.get(u))&&H0(a,u),f=f.createElement("link"),Mt(f);var p=f;p._p=new Promise(function(g,v){p.onload=g,p.onerror=v}),bn(f,"link",a),o.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(o,n),(n=o.state.preload)&&(o.state.loading&jA)===Qa&&(e.count++,o=kd.bind(e),n.addEventListener("load",o),n.addEventListener("error",o))}}function OL(e,n){return e.stylesheets&&e.count===0&&Cd(e,e.stylesheets),0<e.count||0<e.imgCount?function(o){var a=setTimeout(function(){if(e.stylesheets&&Cd(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},Cz+n);0<e.imgBytes&&pb===0&&(pb=125*lL()*Tz);var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Cd(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>pb?50:Az)+n);return e.unsuspend=o,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(u)}}:null}function kd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Cd(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}function Cd(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Dp=new Map,n.forEach(RL,e),Dp=null,kd.call(e))}function RL(e,n){if(!(n.state.loading&Xi)){var o=Dp.get(e);if(o)var a=o.get(mb);else{o=new Map,Dp.set(e,o);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<u.length;f++){var p=u[f];if(p.nodeName==="LINK"||p.getAttribute("media")!=="not all")o.set(p.dataset.precedence,p),a=p}a&&o.set(mb,a)}u=n.instance,p=u.getAttribute("data-precedence"),f=o.get(p)||a,f===a&&o.set(mb,u),o.set(p,u),this.count++,a=kd.bind(this),u.addEventListener("load",a),u.addEventListener("error",a),f?f.parentNode.insertBefore(u,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),n.state.loading|=Xi}}function LL(e,n,o,a,u,f,p,g,v){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Xa,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=bl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bl(0),this.hiddenUpdates=bl(null),this.identifierPrefix=a,this.onUncaughtError=u,this.onCaughtError=f,this.onRecoverableError=p,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=v,this.incompleteTransitions=new Map,this.passiveEffectDuration=this.effectDuration=-0,this.memoizedUpdaters=new Set,e=this.pendingUpdatersLaneMap=[];for(n=0;31>n;n++)e.push(new Set);this._debugRootType=o?"hydrateRoot()":"createRoot()"}function sk(e,n,o,a,u,f,p,g,v,x,D,O){return e=new LL(e,n,o,p,v,x,D,O,g),n=JB,f===!0&&(n|=En|mo),n|=we,f=w(3,null,null,n),e.current=f,f.stateNode=e,n=cg(),va(n),e.pooledCache=n,va(n),f.memoizedState={element:a,isDehydrated:o,cache:n},mg(f),e}function ak(e){if(!e)return Ms;return e=Ms,e}function _0(e,n,o,a,u,f){if(Tn&&typeof Tn.onScheduleFiberRoot==="function")try{Tn.onScheduleFiberRoot(_r,a,o)}catch(p){il||(il=!0,console.error("React instrumentation encountered an error: %o",p))}u=ak(u),a.context===null?a.context=u:a.pendingContext=u,nl&&bi!==null&&!QA&&(QA=!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.
165
+ - `+kd(n)+`
166
+ + `+kd(o),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."+o);return null;case"script":return n=o.async,o=o.src,typeof o==="string"&&n&&typeof n!=="function"&&typeof n!=="symbol"?(o=Hr(o),n=oo(u).hoistableScripts,a=n.get(o),a||(a={type:"script",instance:null,count:0,state:null},n.set(o,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error('getResource encountered a type it did not expect: "'+e+'". this is a bug in React.')}}function kd(e){var n=0,o="<link";return typeof e.rel==="string"?(n++,o+=' rel="'+e.rel+'"'):fo.call(e,"rel")&&(n++,o+=' rel="'+(e.rel===null?"null":"invalid type "+typeof e.rel)+'"'),typeof e.href==="string"?(n++,o+=' href="'+e.href+'"'):fo.call(e,"href")&&(n++,o+=' href="'+(e.href===null?"null":"invalid type "+typeof e.href)+'"'),typeof e.precedence==="string"?(n++,o+=' precedence="'+e.precedence+'"'):fo.call(e,"precedence")&&(n++,o+=" precedence={"+(e.precedence===null?"null":"invalid type "+typeof e.precedence)+"}"),Object.getOwnPropertyNames(e).length>n&&(o+=" ..."),o+" />"}function zr(e){return'href="'+Fn(e)+'"'}function Hc(e){return'link[rel="stylesheet"]['+e+"]"}function tk(e){return Ee({},e,{"data-precedence":e.precedence,precedence:null})}function ML(e,n,o,a){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?a.loading=Of:(n=e.createElement("link"),a.preload=n,n.addEventListener("load",function(){return a.loading|=Of}),n.addEventListener("error",function(){return a.loading|=jA}),yn(n,"link",o),Mt(n),e.head.appendChild(n))}function Hr(e){return'[src="'+Fn(e)+'"]'}function Nc(e){return"script[async]"+e}function nk(e,n,o){if(n.count++,n.instance===null)switch(n.type){case"style":var a=e.querySelector('style[data-href~="'+Fn(o.href)+'"]');if(a)return n.instance=a,Mt(a),a;var u=Ee({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Mt(a),yn(a,"style",u),Cd(a,o.precedence,e),n.instance=a;case"stylesheet":u=zr(o.href);var f=e.querySelector(Hc(u));if(f)return n.state.loading|=Yi,n.instance=f,Mt(f),f;a=tk(o),(u=Xi.get(u))&&H0(a,u),f=(e.ownerDocument||e).createElement("link"),Mt(f);var p=f;return p._p=new Promise(function(g,v){p.onload=g,p.onerror=v}),yn(f,"link",a),n.state.loading|=Yi,Cd(f,o.precedence,e),n.instance=f;case"script":if(f=Hr(o.src),u=e.querySelector(Nc(f)))return n.instance=u,Mt(u),u;if(a=o,u=Xi.get(f))a=Ee({},o),N0(a,u);return e=e.ownerDocument||e,u=e.createElement("script"),Mt(u),yn(u,"link",a),e.head.appendChild(u),n.instance=u;case"void":return null;default:throw Error('acquireResource encountered a resource type it did not expect: "'+n.type+'". this is a bug in React.')}else n.type==="stylesheet"&&(n.state.loading&Yi)===Za&&(a=n.instance,n.state.loading|=Yi,Cd(a,o.precedence,e));return n.instance}function Cd(e,n,o){for(var a=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=a.length?a[a.length-1]:null,f=u,p=0;p<a.length;p++){var g=a[p];if(g.dataset.precedence===n)f=g;else if(f!==u)break}f?f.parentNode.insertBefore(e,f.nextSibling):(n=o.nodeType===9?o.head:o,n.insertBefore(e,n.firstChild))}function H0(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function N0(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}function ik(e,n,o){if(Op===null){var a=new Map,u=Op=new Map;u.set(o,a)}else u=Op,a=u.get(o),a||(a=new Map,u.set(o,a));if(a.has(e))return a;a.set(e,null),o=o.getElementsByTagName(e);for(u=0;u<o.length;u++){var f=o[u];if(!(f[jc]||f[bn]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!==Ir){var p=f.getAttribute(n)||"";p=e+p;var g=a.get(p);g?g.push(f):a.set(p,[f])}}return a}function ok(e,n,o){e=e.ownerDocument||e,e.head.insertBefore(o,n==="title"?e.querySelector("head > title"):null)}function DL(e,n,o){var a=!o.ancestorInfo.containerTagInScope;if(o.context===bu||n.itemProp!=null)return!a||n.itemProp==null||e!=="meta"&&e!=="title"&&e!=="style"&&e!=="link"&&e!=="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.",e,e),!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!=="string"||typeof n.href!=="string"||n.href===""){a&&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 n.rel!=="string"||typeof n.href!=="string"||n.href===""||n.onLoad||n.onError){if(n.rel==="stylesheet"&&typeof n.precedence==="string"){e=n.href;var{onError:u,disabled:f}=n;o=[],n.onLoad&&o.push("`onLoad`"),u&&o.push("`onError`"),f!=null&&o.push("`disabled`"),u=lL(o,"and"),u+=o.length===1?" prop":" props",f=o.length===1?"an "+u:"the "+u,o.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.',e,f,u)}a&&(typeof n.rel!=="string"||typeof n.href!=="string"||n.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"):(n.onError||n.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(n.rel){case"stylesheet":return e=n.precedence,n=n.disabled,typeof e!=="string"&&a&&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 e==="string"&&n==null;default:return!0}case"script":if(e=n.async&&typeof n.async!=="function"&&typeof n.async!=="symbol",!e||n.onLoad||n.onError||!n.src||typeof n.src!=="string"){a&&(e?n.onLoad||n.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":a&&console.error("Cannot render <%s> outside the main document. Try moving it into the root <head> tag.",e)}return!1}function lk(e){return e.type==="stylesheet"&&(e.state.loading&IA)===Za?!1:!0}function OL(e,n,o,a){if(o.type==="stylesheet"&&(typeof a.media!=="string"||matchMedia(a.media).matches!==!1)&&(o.state.loading&Yi)===Za){if(o.instance===null){var u=zr(a.href),f=n.querySelector(Hc(u));if(f){n=f._p,n!==null&&typeof n==="object"&&typeof n.then==="function"&&(e.count++,e=Ad.bind(e),n.then(e,e)),o.state.loading|=Yi,o.instance=f,Mt(f);return}f=n.ownerDocument||n,a=tk(a),(u=Xi.get(u))&&H0(a,u),f=f.createElement("link"),Mt(f);var p=f;p._p=new Promise(function(g,v){p.onload=g,p.onerror=v}),yn(f,"link",a),o.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(o,n),(n=o.state.preload)&&(o.state.loading&IA)===Za&&(e.count++,o=Ad.bind(e),n.addEventListener("load",o),n.addEventListener("error",o))}}function RL(e,n){return e.stylesheets&&e.count===0&&Td(e,e.stylesheets),0<e.count||0<e.imgCount?function(o){var a=setTimeout(function(){if(e.stylesheets&&Td(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},Az+n);0<e.imgBytes&&pb===0&&(pb=125*sL()*Ez);var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Td(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>pb?50:Tz)+n);return e.unsuspend=o,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(u)}}:null}function Ad(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Td(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}function Td(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Rp=new Map,n.forEach(LL,e),Rp=null,Ad.call(e))}function LL(e,n){if(!(n.state.loading&Yi)){var o=Rp.get(e);if(o)var a=o.get(mb);else{o=new Map,Rp.set(e,o);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<u.length;f++){var p=u[f];if(p.nodeName==="LINK"||p.getAttribute("media")!=="not all")o.set(p.dataset.precedence,p),a=p}a&&o.set(mb,a)}u=n.instance,p=u.getAttribute("data-precedence"),f=o.get(p)||a,f===a&&o.set(mb,u),o.set(p,u),this.count++,a=Ad.bind(this),u.addEventListener("load",a),u.addEventListener("error",a),f?f.parentNode.insertBefore(u,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),n.state.loading|=Yi}}function BL(e,n,o,a,u,f,p,g,v){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Ja,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=yl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=yl(0),this.hiddenUpdates=yl(null),this.identifierPrefix=a,this.onUncaughtError=u,this.onCaughtError=f,this.onRecoverableError=p,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=v,this.incompleteTransitions=new Map,this.passiveEffectDuration=this.effectDuration=-0,this.memoizedUpdaters=new Set,e=this.pendingUpdatersLaneMap=[];for(n=0;31>n;n++)e.push(new Set);this._debugRootType=o?"hydrateRoot()":"createRoot()"}function sk(e,n,o,a,u,f,p,g,v,x,D,O){return e=new BL(e,n,o,p,v,x,D,O,g),n=ZB,f===!0&&(n|=Tn|po),n|=we,f=w(3,null,null,n),e.current=f,f.stateNode=e,n=cg(),Ca(n),e.pooledCache=n,Ca(n),f.memoizedState={element:a,isDehydrated:o,cache:n},mg(f),e}function ak(e){if(!e)return Os;return e=Os,e}function _0(e,n,o,a,u,f){if(An&&typeof An.onScheduleFiberRoot==="function")try{An.onScheduleFiberRoot(Vr,a,o)}catch(p){il||(il=!0,console.error("React instrumentation encountered an error: %o",p))}u=ak(u),a.context===null?a.context=u:a.pendingContext=u,nl&&gi!==null&&!QA&&(QA=!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.
167
167
 
168
- Check the render method of %s.`,P(bi)||"Unknown")),a=ds(n),a.payload={element:o},f=f===void 0?null:f,f!==null&&(typeof f!=="function"&&console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",f),a.callback=f),o=ps(e,a,n),o!==null&&(Io(n,"root.render()",null),Bt(o,e,n),pc(o,e,n))}function rk(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var o=e.retryLane;e.retryLane=o!==0&&o<n?o:n}}function U0(e,n){rk(e,n),(e=e.alternate)&&rk(e,n)}function uk(e){if(e.tag===13||e.tag===31){var n=An(e,67108864);n!==null&&Bt(n,e,67108864),U0(e,67108864)}}function ck(e){if(e.tag===13||e.tag===31){var n=mi(e);n=Bi(n);var o=An(e,n);o!==null&&Bt(o,e,n),U0(e,n)}}function BL(){return bi}function zL(e,n,o,a){var u=H.T;H.T=null;var f=Ze.p;try{Ze.p=vi,q0(e,n,o,a)}finally{Ze.p=f,H.T=u}}function HL(e,n,o,a){var u=H.T;H.T=null;var f=Ze.p;try{Ze.p=po,q0(e,n,o,a)}finally{Ze.p=f,H.T=u}}function q0(e,n,o,a){if(Rp){var u=V0(a);if(u===null)C0(e,n,a,Lp,o),hk(e,a);else if(NL(u,e,n,o,a))a.stopPropagation();else if(hk(e,a),n&4&&-1<Mz.indexOf(e)){for(;u!==null;){var f=Bn(u);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var p=Li(f.pendingLanes);if(p!==0){var g=f;g.pendingLanes|=2;for(g.entangledLanes|=2;p;){var v=1<<31-Hn(p);g.entanglements[1]|=v,p&=~v}Zo(f),(Ie&(an|ki))===pn&&(pp=fn()+wA,Mc(0,!1))}}break;case 31:case 13:g=An(f,2),g!==null&&Bt(g,f,2),Mr(),U0(f,2)}if(f=V0(a),f===null&&C0(e,n,a,Lp,o),f===u)break;u=f}u!==null&&a.stopPropagation()}else C0(e,n,a,null,o)}}function V0(e){return e=Xm(e),I0(e)}function I0(e){if(Lp=null,e=_o(e),e!==null){var n=N(e);if(n===null)e=null;else{var o=n.tag;if(o===13){if(e=q(n),e!==null)return e;e=null}else if(o===31){if(e=J(n),e!==null)return e;e=null}else if(o===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return Lp=e,null}function fk(e){switch(e){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 vi;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 po;case"message":switch(YL()){case ey:return vi;case ty:return po;case Nr:case XL:return ll;case ny:return zd;default:return ll}default:return ll}}function hk(e,n){switch(e){case"focusin":case"focusout":Ys=null;break;case"dragenter":case"dragleave":Xs=null;break;case"mouseover":case"mouseout":Qs=null;break;case"pointerover":case"pointerout":Of.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rf.delete(n.pointerId)}}function Hc(e,n,o,a,u,f){if(e===null||e.nativeEvent!==f)return e={blockedOn:n,domEventName:o,eventSystemFlags:a,nativeEvent:f,targetContainers:[u]},n!==null&&(n=Bn(n),n!==null&&uk(n)),e;return e.eventSystemFlags|=a,n=e.targetContainers,u!==null&&n.indexOf(u)===-1&&n.push(u),e}function NL(e,n,o,a,u){switch(n){case"focusin":return Ys=Hc(Ys,e,n,o,a,u),!0;case"dragenter":return Xs=Hc(Xs,e,n,o,a,u),!0;case"mouseover":return Qs=Hc(Qs,e,n,o,a,u),!0;case"pointerover":var f=u.pointerId;return Of.set(f,Hc(Of.get(f)||null,e,n,o,a,u)),!0;case"gotpointercapture":return f=u.pointerId,Rf.set(f,Hc(Rf.get(f)||null,e,n,o,a,u)),!0}return!1}function dk(e){var n=_o(e.target);if(n!==null){var o=N(n);if(o!==null){if(n=o.tag,n===13){if(n=q(o),n!==null){e.blockedOn=n,qt(e.priority,function(){ck(o)});return}}else if(n===31){if(n=J(o),n!==null){e.blockedOn=n,qt(e.priority,function(){ck(o)});return}}else if(n===3&&o.stateNode.current.memoizedState.isDehydrated){e.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ad(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var o=V0(e.nativeEvent);if(o===null){o=e.nativeEvent;var a=new o.constructor(o.type,o),u=a;Vc!==null&&console.error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),Vc=u,o.target.dispatchEvent(a),Vc===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."),Vc=null}else return n=Bn(o),n!==null&&uk(n),e.blockedOn=o,!1;n.shift()}return!0}function pk(e,n,o){Ad(e)&&o.delete(n)}function _L(){gb=!1,Ys!==null&&Ad(Ys)&&(Ys=null),Xs!==null&&Ad(Xs)&&(Xs=null),Qs!==null&&Ad(Qs)&&(Qs=null),Of.forEach(pk),Rf.forEach(pk)}function Td(e,n){e.blockedOn===n&&(e.blockedOn=null,gb||(gb=!0,Pe.unstable_scheduleCallback(Pe.unstable_NormalPriority,_L)))}function mk(e){Bp!==e&&(Bp=e,Pe.unstable_scheduleCallback(Pe.unstable_NormalPriority,function(){Bp===e&&(Bp=null);for(var n=0;n<e.length;n+=3){var o=e[n],a=e[n+1],u=e[n+2];if(typeof a!=="function")if(I0(a||o)===null)continue;else break;var f=Bn(o);f!==null&&(e.splice(n,3),n-=3,o={pending:!0,data:u,method:o.method,action:a},Object.freeze(o),Ig(f,o,a,u))}}))}function Br(e){function n(v){return Td(v,e)}Ys!==null&&Td(Ys,e),Xs!==null&&Td(Xs,e),Qs!==null&&Td(Qs,e),Of.forEach(n),Rf.forEach(n);for(var o=0;o<Gs.length;o++){var a=Gs[o];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Gs.length&&(o=Gs[0],o.blockedOn===null);)dk(o),o.blockedOn===null&&Gs.shift();if(o=(e.ownerDocument||e).$$reactFormReplay,o!=null)for(a=0;a<o.length;a+=3){var u=o[a],f=o[a+1],p=u[Nn]||null;if(typeof f==="function")p||mk(o);else if(p){var g=null;if(f&&f.hasAttribute("formAction")){if(u=f,p=f[Nn]||null)g=p.formAction;else if(I0(u)!==null)continue}else g=p.action;typeof g==="function"?o[a+1]=g:(o.splice(a,3),a-=3),mk(o)}}}function gk(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(p){return u=p})},focusReset:"manual",scroll:"manual"})}function n(){u!==null&&(u(),u=null),a||setTimeout(o,20)}function o(){if(!a&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation==="object"){var a=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(o,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),u!==null&&(u(),u=null)}}}function j0(e){this._internalRoot=e}function Ed(e){this._internalRoot=e}function yk(e){e[Cs]&&(e._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 Me=Object.assign,UL=Symbol.for("react.element"),el=Symbol.for("react.transitional.element"),zr=Symbol.for("react.portal"),Hr=Symbol.for("react.fragment"),Md=Symbol.for("react.strict_mode"),$0=Symbol.for("react.profiler"),P0=Symbol.for("react.consumer"),tl=Symbol.for("react.context"),Nc=Symbol.for("react.forward_ref"),Y0=Symbol.for("react.suspense"),X0=Symbol.for("react.suspense_list"),Dd=Symbol.for("react.memo"),yi=Symbol.for("react.lazy"),Q0=Symbol.for("react.activity"),qL=Symbol.for("react.memo_cache_sentinel"),bk=Symbol.iterator,VL=Symbol.for("react.client.reference"),ln=Array.isArray,H=yu.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ze=bb.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,IL=Object.freeze({pending:!1,data:null,method:null,action:null}),G0=[],W0=[],Ll=-1,ws=st(null),_c=st(null),xs=st(null),Od=st(null),Uc=0,vk,Sk,wk,xk,kk,Ck,Ak;Oi.__reactDisabledLog=!0;var F0,Tk,J0=!1,Z0=new(typeof WeakMap==="function"?WeakMap:Map),bi=null,nl=!1,ho=Object.prototype.hasOwnProperty,K0=Pe.unstable_scheduleCallback,jL=Pe.unstable_cancelCallback,$L=Pe.unstable_shouldYield,PL=Pe.unstable_requestPaint,fn=Pe.unstable_now,YL=Pe.unstable_getCurrentPriorityLevel,ey=Pe.unstable_ImmediatePriority,ty=Pe.unstable_UserBlockingPriority,Nr=Pe.unstable_NormalPriority,XL=Pe.unstable_LowPriority,ny=Pe.unstable_IdlePriority,QL=Pe.log,GL=Pe.unstable_setDisableYieldValue,_r=null,Tn=null,il=!1,ol=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",Hn=Math.clz32?Math.clz32:Ri,WL=Math.log,FL=Math.LN2,Rd=256,Ld=262144,Bd=4194304,vi=2,po=8,ll=32,zd=268435456,ks=Math.random().toString(36).slice(2),vn="__reactFiber$"+ks,Nn="__reactProps$"+ks,Cs="__reactContainer$"+ks,iy="__reactEvents$"+ks,JL="__reactListeners$"+ks,ZL="__reactHandles$"+ks,Ek="__reactResources$"+ks,qc="__reactMarker$"+ks,Mk=new Set,Ta={},oy={},KL={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},eB=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]*$"),Dk={},Ok={},tB=/[\n"\\]/g,Rk=!1,Lk=!1,Bk=!1,zk=!1,Hk=!1,Nk=!1,_k=["value","defaultValue"],Uk=!1,qk=/["'&<>\n\t]|^\s|\s$/,nB="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(" "),Vk="applet caption html table td th marquee object template foreignObject desc title".split(" "),iB=Vk.concat(["button"]),oB="dd dt li option optgroup p rp rt".split(" "),Ik={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null,containerTagInScope:null,implicitRootScope:!1},Hd={},ly={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"]},jk=/([A-Z])/g,$k=/^ms-/,lB=/^(?:webkit|moz|o)[A-Z]/,sB=/^-ms-/,aB=/-(.)/g,Pk=/;\s*$/,Ur={},sy={},Yk=!1,Xk=!1,Qk=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(" ")),Nd="http://www.w3.org/1998/Math/MathML",qr="http://www.w3.org/2000/svg",rB=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"]]),_d={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"},Gk={"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},Vr={},uB=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]*$"),cB=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]*$"),Wk=!1,_n={},Fk=/^on./,fB=/^on[^A-Z]/,hB=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]*$"),dB=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]*$"),pB=/^[\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,Vc=null,Ir=null,jr=null,ay=!1,sl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ry=!1;if(sl)try{var Ic={};Object.defineProperty(Ic,"passive",{get:function(){ry=!0}}),window.addEventListener("test",Ic,Ic),window.removeEventListener("test",Ic,Ic)}catch(e){ry=!1}var As=null,uy=null,Ud=null,Ea={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qd=Zn(Ea),jc=Me({},Ea,{view:0,detail:0}),mB=Zn(jc),cy,fy,$c,Vd=Me({},jc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Qm,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){if("movementX"in e)return e.movementX;return e!==$c&&($c&&e.type==="mousemove"?(cy=e.screenX-$c.screenX,fy=e.screenY-$c.screenY):fy=cy=0,$c=e),cy},movementY:function(e){return"movementY"in e?e.movementY:fy}}),Jk=Zn(Vd),gB=Me({},Vd,{dataTransfer:0}),yB=Zn(gB),bB=Me({},jc,{relatedTarget:0}),hy=Zn(bB),vB=Me({},Ea,{animationName:0,elapsedTime:0,pseudoElement:0}),SB=Zn(vB),wB=Me({},Ea,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xB=Zn(wB),kB=Me({},Ea,{data:0}),Zk=Zn(kB),CB=Zk,AB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},TB={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"},EB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},MB=Me({},jc,{key:function(e){if(e.key){var n=AB[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Ah(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?TB[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Qm,charCode:function(e){return e.type==="keypress"?Ah(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ah(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),DB=Zn(MB),OB=Me({},Vd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Kk=Zn(OB),RB=Me({},jc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Qm}),LB=Zn(RB),BB=Me({},Ea,{propertyName:0,elapsedTime:0,pseudoElement:0}),zB=Zn(BB),HB=Me({},Vd,{deltaX:function(e){return"deltaX"in e?e.deltaX:("wheelDeltaX"in e)?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:("wheelDeltaY"in e)?-e.wheelDeltaY:("wheelDelta"in e)?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),NB=Zn(HB),_B=Me({},Ea,{newState:0,oldState:0}),UB=Zn(_B),qB=[9,13,27,32],eC=229,dy=sl&&"CompositionEvent"in window,Pc=null;sl&&"documentMode"in document&&(Pc=document.documentMode);var VB=sl&&"TextEvent"in window&&!Pc,tC=sl&&(!dy||Pc&&8<Pc&&11>=Pc),nC=32,iC=String.fromCharCode(nC),oC=!1,$r=!1,IB={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},Yc=null,Xc=null,lC=!1;sl&&(lC=rR("input")&&(!document.documentMode||9<document.documentMode));var Un=typeof Object.is==="function"?Object.is:pR,jB=sl&&"documentMode"in document&&11>=document.documentMode,Pr=null,py=null,Qc=null,my=!1,Yr={animationend:ha("Animation","AnimationEnd"),animationiteration:ha("Animation","AnimationIteration"),animationstart:ha("Animation","AnimationStart"),transitionrun:ha("Transition","TransitionRun"),transitionstart:ha("Transition","TransitionStart"),transitioncancel:ha("Transition","TransitionCancel"),transitionend:ha("Transition","TransitionEnd")},gy={},sC={};sl&&(sC=document.createElement("div").style,("AnimationEvent"in window)||(delete Yr.animationend.animation,delete Yr.animationiteration.animation,delete Yr.animationstart.animation),("TransitionEvent"in window)||delete Yr.transitionend.transition);var aC=da("animationend"),rC=da("animationiteration"),uC=da("animationstart"),$B=da("transitionrun"),PB=da("transitionstart"),YB=da("transitioncancel"),cC=da("transitionend"),fC=new Map,yy="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(" ");yy.push("scrollEnd");var hC=0;if(typeof performance==="object"&&typeof performance.now==="function")var XB=performance,dC=function(){return XB.now()};else{var QB=Date;dC=function(){return QB.now()}}var by=typeof reportError==="function"?reportError:function(e){if(typeof window==="object"&&typeof window.ErrorEvent==="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e==="object"&&e!==null&&typeof e.message==="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if(typeof process==="object"&&typeof process.emit==="function"){process.emit("uncaughtException",e);return}console.error(e)},GB="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.",Id=0,vy=1,Sy=2,wy=3,jd="– ",$d="+ ",pC="  ",mt=typeof console<"u"&&typeof console.timeStamp==="function"&&typeof performance<"u"&&typeof performance.measure==="function",Ni="Components ⚛",De="Scheduler ⚛",Re="Blocking",Ts=!1,Bl={color:"primary",properties:null,tooltipText:"",track:Ni},Es={start:-0,end:-0,detail:{devtools:Bl}},WB=["Changed Props",""],mC="This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner.",FB=["Changed Props",mC],Gc=1,zl=2,_i=[],Xr=0,xy=0,Ms={};Object.freeze(Ms);var Ui=null,Qr=null,pe=0,JB=1,we=2,En=8,mo=16,ZB=32,gC=!1;try{var yC=Object.preventExtensions({})}catch(e){gC=!0}var ky=new WeakMap,Gr=[],Wr=0,Pd=null,Wc=0,qi=[],Vi=0,Ma=null,Hl=1,Nl="",Sn=null,gt=null,Le=!1,al=!1,Si=null,Ds=null,Ii=!1,Cy=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."),Ay=st(null),Ty=st(null),bC={},Yd=null,Fr=null,Jr=!1,KB=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(o,a){e.push(a)}};this.abort=function(){n.aborted=!0,e.forEach(function(o){return o()})}},ez=Pe.unstable_scheduleCallback,tz=Pe.unstable_NormalPriority,Wt={$$typeof:tl,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},Ft=Pe.unstable_now,Xd=console.createTask?console.createTask:function(){return null},Fc=1,Qd=2,hn=-0,Os=-0,_l=-0,Ul=null,qn=-1.1,Da=-0,Dt=-0,se=-1.1,ue=-1.1,xt=null,zt=!1,Rs=-0,rl=-1.1,Jc=null,Ls=0,Ey=null,My=null,Oa=-1.1,Zc=null,Zr=-1.1,Gd=-1.1,ul=-0,ql=-1.1,ji=-1.1,Dy=0,Kc=null,vC=null,SC=null,Bs=-1.1,Ra=null,zs=-1.1,Wd=-1.1,wC=-0,xC=-0,Fd=0,Vl=null,kC=0,ef=-1.1,Jd=!1,Zd=!1,tf=null,Oy=0,La=0,Kr=null,CC=H.S;H.S=function(e,n){if(vA=fn(),typeof n==="object"&&n!==null&&typeof n.then==="function"){if(0>ql&&0>ji){ql=Ft();var o=Rc(),a=Oc();if(o!==zs||a!==Ra)zs=-1.1;Bs=o,Ra=a}wR(e,n)}CC!==null&&CC(e,n)};var Ba=st(null),go={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},nf=[],of=[],lf=[],sf=[],af=[],rf=[],za=new Set;go.recordUnsafeLifecycleWarnings=function(e,n){za.has(e.type)||(typeof n.componentWillMount==="function"&&n.componentWillMount.__suppressDeprecationWarning!==!0&&nf.push(e),e.mode&En&&typeof n.UNSAFE_componentWillMount==="function"&&of.push(e),typeof n.componentWillReceiveProps==="function"&&n.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&lf.push(e),e.mode&En&&typeof n.UNSAFE_componentWillReceiveProps==="function"&&sf.push(e),typeof n.componentWillUpdate==="function"&&n.componentWillUpdate.__suppressDeprecationWarning!==!0&&af.push(e),e.mode&En&&typeof n.UNSAFE_componentWillUpdate==="function"&&rf.push(e))},go.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;0<nf.length&&(nf.forEach(function(g){e.add(P(g)||"Component"),za.add(g.type)}),nf=[]);var n=new Set;0<of.length&&(of.forEach(function(g){n.add(P(g)||"Component"),za.add(g.type)}),of=[]);var o=new Set;0<lf.length&&(lf.forEach(function(g){o.add(P(g)||"Component"),za.add(g.type)}),lf=[]);var a=new Set;0<sf.length&&(sf.forEach(function(g){a.add(P(g)||"Component"),za.add(g.type)}),sf=[]);var u=new Set;0<af.length&&(af.forEach(function(g){u.add(P(g)||"Component"),za.add(g.type)}),af=[]);var f=new Set;if(0<rf.length&&(rf.forEach(function(g){f.add(P(g)||"Component"),za.add(g.type)}),rf=[]),0<n.size){var p=S(n);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.
168
+ Check the render method of %s.`,P(gi)||"Unknown")),a=ms(n),a.payload={element:o},f=f===void 0?null:f,f!==null&&(typeof f!=="function"&&console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",f),a.callback=f),o=gs(e,a,n),o!==null&&(jo(n,"root.render()",null),Bt(o,e,n),gc(o,e,n))}function rk(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var o=e.retryLane;e.retryLane=o!==0&&o<n?o:n}}function U0(e,n){rk(e,n),(e=e.alternate)&&rk(e,n)}function uk(e){if(e.tag===13||e.tag===31){var n=Cn(e,67108864);n!==null&&Bt(n,e,67108864),U0(e,67108864)}}function ck(e){if(e.tag===13||e.tag===31){var n=di(e);n=Ri(n);var o=Cn(e,n);o!==null&&Bt(o,e,n),U0(e,n)}}function zL(){return gi}function HL(e,n,o,a){var u=H.T;H.T=null;var f=Ze.p;try{Ze.p=yi,q0(e,n,o,a)}finally{Ze.p=f,H.T=u}}function NL(e,n,o,a){var u=H.T;H.T=null;var f=Ze.p;try{Ze.p=ho,q0(e,n,o,a)}finally{Ze.p=f,H.T=u}}function q0(e,n,o,a){if(Bp){var u=V0(a);if(u===null)C0(e,n,a,zp,o),hk(e,a);else if(_L(u,e,n,o,a))a.stopPropagation();else if(hk(e,a),n&4&&-1<Dz.indexOf(e)){for(;u!==null;){var f=Ln(u);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var p=Oi(f.pendingLanes);if(p!==0){var g=f;g.pendingLanes|=2;for(g.entangledLanes|=2;p;){var v=1<<31-zn(p);g.entanglements[1]|=v,p&=~v}Zo(f),(je&(sn|wi))===dn&&(gp=cn()+wA,Oc(0,!1))}}break;case 31:case 13:g=Cn(f,2),g!==null&&Bt(g,f,2),Rr(),U0(f,2)}if(f=V0(a),f===null&&C0(e,n,a,zp,o),f===u)break;u=f}u!==null&&a.stopPropagation()}else C0(e,n,a,null,o)}}function V0(e){return e=Xm(e),j0(e)}function j0(e){if(zp=null,e=_o(e),e!==null){var n=N(e);if(n===null)e=null;else{var o=n.tag;if(o===13){if(e=q(n),e!==null)return e;e=null}else if(o===31){if(e=J(n),e!==null)return e;e=null}else if(o===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return zp=e,null}function fk(e){switch(e){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 yi;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 ho;case"message":switch(XL()){case ey:return yi;case ty:return ho;case qr:case QL:return ll;case ny:return Nd;default:return ll}default:return ll}}function hk(e,n){switch(e){case"focusin":case"focusout":Qs=null;break;case"dragenter":case"dragleave":Gs=null;break;case"mouseover":case"mouseout":Ws=null;break;case"pointerover":case"pointerout":Lf.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bf.delete(n.pointerId)}}function _c(e,n,o,a,u,f){if(e===null||e.nativeEvent!==f)return e={blockedOn:n,domEventName:o,eventSystemFlags:a,nativeEvent:f,targetContainers:[u]},n!==null&&(n=Ln(n),n!==null&&uk(n)),e;return e.eventSystemFlags|=a,n=e.targetContainers,u!==null&&n.indexOf(u)===-1&&n.push(u),e}function _L(e,n,o,a,u){switch(n){case"focusin":return Qs=_c(Qs,e,n,o,a,u),!0;case"dragenter":return Gs=_c(Gs,e,n,o,a,u),!0;case"mouseover":return Ws=_c(Ws,e,n,o,a,u),!0;case"pointerover":var f=u.pointerId;return Lf.set(f,_c(Lf.get(f)||null,e,n,o,a,u)),!0;case"gotpointercapture":return f=u.pointerId,Bf.set(f,_c(Bf.get(f)||null,e,n,o,a,u)),!0}return!1}function dk(e){var n=_o(e.target);if(n!==null){var o=N(n);if(o!==null){if(n=o.tag,n===13){if(n=q(o),n!==null){e.blockedOn=n,ee(e.priority,function(){ck(o)});return}}else if(n===31){if(n=J(o),n!==null){e.blockedOn=n,ee(e.priority,function(){ck(o)});return}}else if(n===3&&o.stateNode.current.memoizedState.isDehydrated){e.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ed(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var o=V0(e.nativeEvent);if(o===null){o=e.nativeEvent;var a=new o.constructor(o.type,o),u=a;Ic!==null&&console.error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),Ic=u,o.target.dispatchEvent(a),Ic===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."),Ic=null}else return n=Ln(o),n!==null&&uk(n),e.blockedOn=o,!1;n.shift()}return!0}function pk(e,n,o){Ed(e)&&o.delete(n)}function UL(){gb=!1,Qs!==null&&Ed(Qs)&&(Qs=null),Gs!==null&&Ed(Gs)&&(Gs=null),Ws!==null&&Ed(Ws)&&(Ws=null),Lf.forEach(pk),Bf.forEach(pk)}function Md(e,n){e.blockedOn===n&&(e.blockedOn=null,gb||(gb=!0,Pe.unstable_scheduleCallback(Pe.unstable_NormalPriority,UL)))}function mk(e){Hp!==e&&(Hp=e,Pe.unstable_scheduleCallback(Pe.unstable_NormalPriority,function(){Hp===e&&(Hp=null);for(var n=0;n<e.length;n+=3){var o=e[n],a=e[n+1],u=e[n+2];if(typeof a!=="function")if(j0(a||o)===null)continue;else break;var f=Ln(o);f!==null&&(e.splice(n,3),n-=3,o={pending:!0,data:u,method:o.method,action:a},Object.freeze(o),jg(f,o,a,u))}}))}function Nr(e){function n(v){return Md(v,e)}Qs!==null&&Md(Qs,e),Gs!==null&&Md(Gs,e),Ws!==null&&Md(Ws,e),Lf.forEach(n),Bf.forEach(n);for(var o=0;o<Fs.length;o++){var a=Fs[o];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Fs.length&&(o=Fs[0],o.blockedOn===null);)dk(o),o.blockedOn===null&&Fs.shift();if(o=(e.ownerDocument||e).$$reactFormReplay,o!=null)for(a=0;a<o.length;a+=3){var u=o[a],f=o[a+1],p=u[Hn]||null;if(typeof f==="function")p||mk(o);else if(p){var g=null;if(f&&f.hasAttribute("formAction")){if(u=f,p=f[Hn]||null)g=p.formAction;else if(j0(u)!==null)continue}else g=p.action;typeof g==="function"?o[a+1]=g:(o.splice(a,3),a-=3),mk(o)}}}function gk(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(p){return u=p})},focusReset:"manual",scroll:"manual"})}function n(){u!==null&&(u(),u=null),a||setTimeout(o,20)}function o(){if(!a&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation==="object"){var a=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(o,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),u!==null&&(u(),u=null)}}}function I0(e){this._internalRoot=e}function Dd(e){this._internalRoot=e}function yk(e){e[Ts]&&(e._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 Ee=Object.assign,qL=Symbol.for("react.element"),el=Symbol.for("react.transitional.element"),_r=Symbol.for("react.portal"),Ur=Symbol.for("react.fragment"),Od=Symbol.for("react.strict_mode"),$0=Symbol.for("react.profiler"),P0=Symbol.for("react.consumer"),tl=Symbol.for("react.context"),Uc=Symbol.for("react.forward_ref"),Y0=Symbol.for("react.suspense"),X0=Symbol.for("react.suspense_list"),Rd=Symbol.for("react.memo"),mi=Symbol.for("react.lazy"),Q0=Symbol.for("react.activity"),VL=Symbol.for("react.memo_cache_sentinel"),bk=Symbol.iterator,jL=Symbol.for("react.client.reference"),on=Array.isArray,H=Su.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ze=bb.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,IL=Object.freeze({pending:!1,data:null,method:null,action:null}),G0=[],W0=[],Bl=-1,ks=st(null),qc=st(null),Cs=st(null),Ld=st(null),Vc=0,vk,Sk,wk,xk,kk,Ck,Ak;Mi.__reactDisabledLog=!0;var F0,Tk,J0=!1,Z0=new(typeof WeakMap==="function"?WeakMap:Map),gi=null,nl=!1,fo=Object.prototype.hasOwnProperty,K0=Pe.unstable_scheduleCallback,$L=Pe.unstable_cancelCallback,PL=Pe.unstable_shouldYield,YL=Pe.unstable_requestPaint,cn=Pe.unstable_now,XL=Pe.unstable_getCurrentPriorityLevel,ey=Pe.unstable_ImmediatePriority,ty=Pe.unstable_UserBlockingPriority,qr=Pe.unstable_NormalPriority,QL=Pe.unstable_LowPriority,ny=Pe.unstable_IdlePriority,GL=Pe.log,WL=Pe.unstable_setDisableYieldValue,Vr=null,An=null,il=!1,ol=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",zn=Math.clz32?Math.clz32:Di,FL=Math.log,JL=Math.LN2,Bd=256,zd=262144,Hd=4194304,yi=2,ho=8,ll=32,Nd=268435456,As=Math.random().toString(36).slice(2),bn="__reactFiber$"+As,Hn="__reactProps$"+As,Ts="__reactContainer$"+As,iy="__reactEvents$"+As,ZL="__reactListeners$"+As,KL="__reactHandles$"+As,Ek="__reactResources$"+As,jc="__reactMarker$"+As,Mk=new Set,Ra={},oy={},eB={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},tB=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]*$"),Dk={},Ok={},nB=/[\n"\\]/g,Rk=!1,Lk=!1,Bk=!1,zk=!1,Hk=!1,Nk=!1,_k=["value","defaultValue"],Uk=!1,qk=/["'&<>\n\t]|^\s|\s$/,iB="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(" "),Vk="applet caption html table td th marquee object template foreignObject desc title".split(" "),oB=Vk.concat(["button"]),lB="dd dt li option optgroup p rp rt".split(" "),jk={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null,containerTagInScope:null,implicitRootScope:!1},_d={},ly={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"]},Ik=/([A-Z])/g,$k=/^ms-/,sB=/^(?:webkit|moz|o)[A-Z]/,aB=/^-ms-/,rB=/-(.)/g,Pk=/;\s*$/,jr={},sy={},Yk=!1,Xk=!1,Qk=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(" ")),Ud="http://www.w3.org/1998/Math/MathML",Ir="http://www.w3.org/2000/svg",uB=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"]]),qd={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"},Gk={"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},$r={},cB=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]*$"),fB=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]*$"),Wk=!1,Nn={},Fk=/^on./,hB=/^on[^A-Z]/,dB=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]*$"),pB=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]*$"),mB=/^[\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,Ic=null,Pr=null,Yr=null,ay=!1,sl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ry=!1;if(sl)try{var $c={};Object.defineProperty($c,"passive",{get:function(){ry=!0}}),window.addEventListener("test",$c,$c),window.removeEventListener("test",$c,$c)}catch(e){ry=!1}var Es=null,uy=null,Vd=null,La={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},jd=Jn(La),Pc=Ee({},La,{view:0,detail:0}),gB=Jn(Pc),cy,fy,Yc,Id=Ee({},Pc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Qm,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){if("movementX"in e)return e.movementX;return e!==Yc&&(Yc&&e.type==="mousemove"?(cy=e.screenX-Yc.screenX,fy=e.screenY-Yc.screenY):fy=cy=0,Yc=e),cy},movementY:function(e){return"movementY"in e?e.movementY:fy}}),Jk=Jn(Id),yB=Ee({},Id,{dataTransfer:0}),bB=Jn(yB),vB=Ee({},Pc,{relatedTarget:0}),hy=Jn(vB),SB=Ee({},La,{animationName:0,elapsedTime:0,pseudoElement:0}),wB=Jn(SB),xB=Ee({},La,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),kB=Jn(xB),CB=Ee({},La,{data:0}),Zk=Jn(CB),AB=Zk,TB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},EB={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"},MB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},DB=Ee({},Pc,{key:function(e){if(e.key){var n=TB[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Eh(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?EB[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Qm,charCode:function(e){return e.type==="keypress"?Eh(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Eh(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),OB=Jn(DB),RB=Ee({},Id,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Kk=Jn(RB),LB=Ee({},Pc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Qm}),BB=Jn(LB),zB=Ee({},La,{propertyName:0,elapsedTime:0,pseudoElement:0}),HB=Jn(zB),NB=Ee({},Id,{deltaX:function(e){return"deltaX"in e?e.deltaX:("wheelDeltaX"in e)?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:("wheelDeltaY"in e)?-e.wheelDeltaY:("wheelDelta"in e)?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),_B=Jn(NB),UB=Ee({},La,{newState:0,oldState:0}),qB=Jn(UB),VB=[9,13,27,32],eC=229,dy=sl&&"CompositionEvent"in window,Xc=null;sl&&"documentMode"in document&&(Xc=document.documentMode);var jB=sl&&"TextEvent"in window&&!Xc,tC=sl&&(!dy||Xc&&8<Xc&&11>=Xc),nC=32,iC=String.fromCharCode(nC),oC=!1,Xr=!1,IB={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},Qc=null,Gc=null,lC=!1;sl&&(lC=uR("input")&&(!document.documentMode||9<document.documentMode));var _n=typeof Object.is==="function"?Object.is:mR,$B=sl&&"documentMode"in document&&11>=document.documentMode,Qr=null,py=null,Wc=null,my=!1,Gr={animationend:ya("Animation","AnimationEnd"),animationiteration:ya("Animation","AnimationIteration"),animationstart:ya("Animation","AnimationStart"),transitionrun:ya("Transition","TransitionRun"),transitionstart:ya("Transition","TransitionStart"),transitioncancel:ya("Transition","TransitionCancel"),transitionend:ya("Transition","TransitionEnd")},gy={},sC={};sl&&(sC=document.createElement("div").style,("AnimationEvent"in window)||(delete Gr.animationend.animation,delete Gr.animationiteration.animation,delete Gr.animationstart.animation),("TransitionEvent"in window)||delete Gr.transitionend.transition);var aC=ba("animationend"),rC=ba("animationiteration"),uC=ba("animationstart"),PB=ba("transitionrun"),YB=ba("transitionstart"),XB=ba("transitioncancel"),cC=ba("transitionend"),fC=new Map,yy="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(" ");yy.push("scrollEnd");var hC=0;if(typeof performance==="object"&&typeof performance.now==="function")var QB=performance,dC=function(){return QB.now()};else{var GB=Date;dC=function(){return GB.now()}}var by=typeof reportError==="function"?reportError:function(e){if(typeof window==="object"&&typeof window.ErrorEvent==="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e==="object"&&e!==null&&typeof e.message==="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if(typeof process==="object"&&typeof process.emit==="function"){process.emit("uncaughtException",e);return}console.error(e)},WB="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.",$d=0,vy=1,Sy=2,wy=3,Pd="– ",Yd="+ ",pC="  ",gt=typeof console<"u"&&typeof console.timeStamp==="function"&&typeof performance<"u"&&typeof performance.measure==="function",Hi="Components ⚛",Me="Scheduler ⚛",Oe="Blocking",Ms=!1,zl={color:"primary",properties:null,tooltipText:"",track:Hi},Ds={start:-0,end:-0,detail:{devtools:zl}},FB=["Changed Props",""],mC="This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner.",JB=["Changed Props",mC],Fc=1,Hl=2,Ni=[],Wr=0,xy=0,Os={};Object.freeze(Os);var _i=null,Fr=null,pe=0,ZB=1,we=2,Tn=8,po=16,KB=32,gC=!1;try{var yC=Object.preventExtensions({})}catch(e){gC=!0}var ky=new WeakMap,Jr=[],Zr=0,Xd=null,Jc=0,Ui=[],qi=0,Ba=null,Nl=1,_l="",vn=null,yt=null,Le=!1,al=!1,bi=null,Rs=null,Vi=!1,Cy=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."),Ay=st(null),Ty=st(null),bC={},Qd=null,Kr=null,eu=!1,ez=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(o,a){e.push(a)}};this.abort=function(){n.aborted=!0,e.forEach(function(o){return o()})}},tz=Pe.unstable_scheduleCallback,nz=Pe.unstable_NormalPriority,Gt={$$typeof:tl,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},Wt=Pe.unstable_now,Gd=console.createTask?console.createTask:function(){return null},Zc=1,Wd=2,fn=-0,Ls=-0,Ul=-0,ql=null,Un=-1.1,za=-0,Dt=-0,se=-1.1,ue=-1.1,xt=null,zt=!1,Bs=-0,rl=-1.1,Kc=null,zs=0,Ey=null,My=null,Ha=-1.1,ef=null,tu=-1.1,Fd=-1.1,ul=-0,Vl=-1.1,ji=-1.1,Dy=0,tf=null,vC=null,SC=null,Hs=-1.1,Na=null,Ns=-1.1,Jd=-1.1,wC=-0,xC=-0,Zd=0,jl=null,kC=0,nf=-1.1,Kd=!1,ep=!1,of=null,Oy=0,_a=0,nu=null,CC=H.S;H.S=function(e,n){if(vA=cn(),typeof n==="object"&&n!==null&&typeof n.then==="function"){if(0>Vl&&0>ji){Vl=Wt();var o=Bc(),a=Lc();if(o!==Ns||a!==Na)Ns=-1.1;Hs=o,Na=a}xR(e,n)}CC!==null&&CC(e,n)};var Ua=st(null),mo={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},lf=[],sf=[],af=[],rf=[],uf=[],cf=[],qa=new Set;mo.recordUnsafeLifecycleWarnings=function(e,n){qa.has(e.type)||(typeof n.componentWillMount==="function"&&n.componentWillMount.__suppressDeprecationWarning!==!0&&lf.push(e),e.mode&Tn&&typeof n.UNSAFE_componentWillMount==="function"&&sf.push(e),typeof n.componentWillReceiveProps==="function"&&n.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&af.push(e),e.mode&Tn&&typeof n.UNSAFE_componentWillReceiveProps==="function"&&rf.push(e),typeof n.componentWillUpdate==="function"&&n.componentWillUpdate.__suppressDeprecationWarning!==!0&&uf.push(e),e.mode&Tn&&typeof n.UNSAFE_componentWillUpdate==="function"&&cf.push(e))},mo.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;0<lf.length&&(lf.forEach(function(g){e.add(P(g)||"Component"),qa.add(g.type)}),lf=[]);var n=new Set;0<sf.length&&(sf.forEach(function(g){n.add(P(g)||"Component"),qa.add(g.type)}),sf=[]);var o=new Set;0<af.length&&(af.forEach(function(g){o.add(P(g)||"Component"),qa.add(g.type)}),af=[]);var a=new Set;0<rf.length&&(rf.forEach(function(g){a.add(P(g)||"Component"),qa.add(g.type)}),rf=[]);var u=new Set;0<uf.length&&(uf.forEach(function(g){u.add(P(g)||"Component"),qa.add(g.type)}),uf=[]);var f=new Set;if(0<cf.length&&(cf.forEach(function(g){f.add(P(g)||"Component"),qa.add(g.type)}),cf=[]),0<n.size){var p=S(n);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.
169
169
 
170
170
  * Move code with side effects to componentDidMount, and set initial state in the constructor.
171
171
 
@@ -194,54 +194,54 @@ Please update the following components: %s`,p)),0<u.size&&(p=S(u),console.warn(`
194
194
  * Move data fetching code or side effects to componentDidUpdate.
195
195
  * 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.
196
196
 
197
- Please update the following components: %s`,p))};var Kd=new Map,AC=new Set;go.recordLegacyContextWarning=function(e,n){var o=null;for(var a=e;a!==null;)a.mode&En&&(o=a),a=a.return;o===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."):!AC.has(e.type)&&(a=Kd.get(o),e.type.contextTypes!=null||e.type.childContextTypes!=null||n!==null&&typeof n.getChildContext==="function")&&(a===void 0&&(a=[],Kd.set(o,a)),a.push(e))},go.flushLegacyContextWarning=function(){Kd.forEach(function(e){if(e.length!==0){var n=e[0],o=new Set;e.forEach(function(u){o.add(P(u)||"Component"),AC.add(u.type)});var a=S(o);Y(n,function(){console.error(`Legacy context API has been detected within a strict-mode tree.
197
+ Please update the following components: %s`,p))};var tp=new Map,AC=new Set;mo.recordLegacyContextWarning=function(e,n){var o=null;for(var a=e;a!==null;)a.mode&Tn&&(o=a),a=a.return;o===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."):!AC.has(e.type)&&(a=tp.get(o),e.type.contextTypes!=null||e.type.childContextTypes!=null||n!==null&&typeof n.getChildContext==="function")&&(a===void 0&&(a=[],tp.set(o,a)),a.push(e))},mo.flushLegacyContextWarning=function(){tp.forEach(function(e){if(e.length!==0){var n=e[0],o=new Set;e.forEach(function(u){o.add(P(u)||"Component"),AC.add(u.type)});var a=S(o);Y(n,function(){console.error(`Legacy context API has been detected within a strict-mode tree.
198
198
 
199
199
  The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
200
200
 
201
201
  Please update the following components: %s
202
202
 
203
- Learn more about this warning here: https://react.dev/link/legacy-context`,a)})}})},go.discardPendingWarnings=function(){nf=[],of=[],lf=[],sf=[],af=[],rf=[],Kd=new Map};var TC={react_stack_bottom_frame:function(e,n,o){var a=nl;nl=!0;try{return e(n,o)}finally{nl=a}}},Ry=TC.react_stack_bottom_frame.bind(TC),EC={react_stack_bottom_frame:function(e){var n=nl;nl=!0;try{return e.render()}finally{nl=n}}},MC=EC.react_stack_bottom_frame.bind(EC),DC={react_stack_bottom_frame:function(e,n){try{n.componentDidMount()}catch(o){Je(e,e.return,o)}}},Ly=DC.react_stack_bottom_frame.bind(DC),OC={react_stack_bottom_frame:function(e,n,o,a,u){try{n.componentDidUpdate(o,a,u)}catch(f){Je(e,e.return,f)}}},RC=OC.react_stack_bottom_frame.bind(OC),LC={react_stack_bottom_frame:function(e,n){var o=n.stack;e.componentDidCatch(n.value,{componentStack:o!==null?o:""})}},nz=LC.react_stack_bottom_frame.bind(LC),BC={react_stack_bottom_frame:function(e,n,o){try{o.componentWillUnmount()}catch(a){Je(e,n,a)}}},zC=BC.react_stack_bottom_frame.bind(BC),HC={react_stack_bottom_frame:function(e){var n=e.create;return e=e.inst,n=n(),e.destroy=n}},iz=HC.react_stack_bottom_frame.bind(HC),NC={react_stack_bottom_frame:function(e,n,o){try{o()}catch(a){Je(e,n,a)}}},oz=NC.react_stack_bottom_frame.bind(NC),_C={react_stack_bottom_frame:function(e){var n=e._init;return n(e._payload)}},lz=_C.react_stack_bottom_frame.bind(_C),eu=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`."),By=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."),ep=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."),tp={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.')}},Ha=null,uf=!1,tu=null,cf=0,xe=null,zy,UC=zy=!1,qC={},VC={},IC={};b=function(e,n,o){if(o!==null&&typeof o==="object"&&o._store&&(!o._store.validated&&o.key==null||o._store.validated===2)){if(typeof o._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.");o._store.validated=1;var a=P(e),u=a||"null";if(!qC[u]){qC[u]=!0,o=o._owner,e=e._debugOwner;var f="";e&&typeof e.tag==="number"&&(u=P(e))&&(f=`
203
+ Learn more about this warning here: https://react.dev/link/legacy-context`,a)})}})},mo.discardPendingWarnings=function(){lf=[],sf=[],af=[],rf=[],uf=[],cf=[],tp=new Map};var TC={react_stack_bottom_frame:function(e,n,o){var a=nl;nl=!0;try{return e(n,o)}finally{nl=a}}},Ry=TC.react_stack_bottom_frame.bind(TC),EC={react_stack_bottom_frame:function(e){var n=nl;nl=!0;try{return e.render()}finally{nl=n}}},MC=EC.react_stack_bottom_frame.bind(EC),DC={react_stack_bottom_frame:function(e,n){try{n.componentDidMount()}catch(o){Je(e,e.return,o)}}},Ly=DC.react_stack_bottom_frame.bind(DC),OC={react_stack_bottom_frame:function(e,n,o,a,u){try{n.componentDidUpdate(o,a,u)}catch(f){Je(e,e.return,f)}}},RC=OC.react_stack_bottom_frame.bind(OC),LC={react_stack_bottom_frame:function(e,n){var o=n.stack;e.componentDidCatch(n.value,{componentStack:o!==null?o:""})}},iz=LC.react_stack_bottom_frame.bind(LC),BC={react_stack_bottom_frame:function(e,n,o){try{o.componentWillUnmount()}catch(a){Je(e,n,a)}}},zC=BC.react_stack_bottom_frame.bind(BC),HC={react_stack_bottom_frame:function(e){var n=e.create;return e=e.inst,n=n(),e.destroy=n}},oz=HC.react_stack_bottom_frame.bind(HC),NC={react_stack_bottom_frame:function(e,n,o){try{o()}catch(a){Je(e,n,a)}}},lz=NC.react_stack_bottom_frame.bind(NC),_C={react_stack_bottom_frame:function(e){var n=e._init;return n(e._payload)}},sz=_C.react_stack_bottom_frame.bind(_C),iu=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`."),By=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."),np=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."),ip={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.')}},Va=null,ff=!1,ou=null,hf=0,xe=null,zy,UC=zy=!1,qC={},VC={},jC={};b=function(e,n,o){if(o!==null&&typeof o==="object"&&o._store&&(!o._store.validated&&o.key==null||o._store.validated===2)){if(typeof o._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.");o._store.validated=1;var a=P(e),u=a||"null";if(!qC[u]){qC[u]=!0,o=o._owner,e=e._debugOwner;var f="";e&&typeof e.tag==="number"&&(u=P(e))&&(f=`
204
204
 
205
205
  Check the render method of \``+u+"`."),f||a&&(f=`
206
206
 
207
- Check the top-level render call using <`+a+">.");var p="";o!=null&&e!==o&&(a=null,typeof o.tag==="number"?a=P(o):typeof o.name==="string"&&(a=o.name),a&&(p=" It was passed a child from "+a+".")),Y(n,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.',f,p)})}}};var Na=BS(!0),jC=BS(!1),$C=0,PC=1,YC=2,Hy=3,Hs=!1,XC=!1,Ny=null,_y=!1,nu=st(null),np=st(0),wi=st(null),$i=null,iu=1,ff=2,Pt=st(0),ip=0,Pi=1,Vn=2,xi=4,In=8,ou,QC=new Set,GC=new Set,Uy=new Set,WC=new Set,Il=0,me=null,rt=null,Jt=null,op=!1,lu=!1,_a=!1,lp=0,hf=0,jl=null,sz=0,az=25,z=null,Yi=null,$l=-1,df=!1,pf={readContext:wt,use:ys,useCallback:Vt,useContext:Vt,useEffect:Vt,useImperativeHandle:Vt,useLayoutEffect:Vt,useInsertionEffect:Vt,useMemo:Vt,useReducer:Vt,useRef:Vt,useState:Vt,useDebugValue:Vt,useDeferredValue:Vt,useTransition:Vt,useSyncExternalStore:Vt,useId:Vt,useHostTransitionStatus:Vt,useFormState:Vt,useActionState:Vt,useOptimistic:Vt,useMemoCache:Vt,useCacheRefresh:Vt};pf.useEffectEvent=Vt;var qy=null,FC=null,Vy=null,JC=null,cl=null,yo=null,sp=null;qy={readContext:function(e){return wt(e)},use:ys,useCallback:function(e,n){return z="useCallback",Ee(),wr(n),_g(e,n)},useContext:function(e){return z="useContext",Ee(),wt(e)},useEffect:function(e,n){return z="useEffect",Ee(),wr(n),Kh(e,n)},useImperativeHandle:function(e,n,o){return z="useImperativeHandle",Ee(),wr(o),Ng(e,n,o)},useInsertionEffect:function(e,n){z="useInsertionEffect",Ee(),wr(n),wa(4,Vn,e,n)},useLayoutEffect:function(e,n){return z="useLayoutEffect",Ee(),wr(n),Hg(e,n)},useMemo:function(e,n){z="useMemo",Ee(),wr(n);var o=H.H;H.H=cl;try{return Ug(e,n)}finally{H.H=o}},useReducer:function(e,n,o){z="useReducer",Ee();var a=H.H;H.H=cl;try{return Tg(e,n,o)}finally{H.H=a}},useRef:function(e){return z="useRef",Ee(),Bg(e)},useState:function(e){z="useState",Ee();var n=H.H;H.H=cl;try{return Og(e)}finally{H.H=n}},useDebugValue:function(){z="useDebugValue",Ee()},useDeferredValue:function(e,n){return z="useDeferredValue",Ee(),qg(e,n)},useTransition:function(){return z="useTransition",Ee(),jg()},useSyncExternalStore:function(e,n,o){return z="useSyncExternalStore",Ee(),Mg(e,n,o)},useId:function(){return z="useId",Ee(),$g()},useFormState:function(e,n){return z="useFormState",Ee(),Gh(),kr(e,n)},useActionState:function(e,n){return z="useActionState",Ee(),kr(e,n)},useOptimistic:function(e){return z="useOptimistic",Ee(),Rg(e)},useHostTransitionStatus:xa,useMemoCache:Sa,useCacheRefresh:function(){return z="useCacheRefresh",Ee(),Pg()},useEffectEvent:function(e){return z="useEffectEvent",Ee(),zg(e)}},FC={readContext:function(e){return wt(e)},use:ys,useCallback:function(e,n){return z="useCallback",V(),_g(e,n)},useContext:function(e){return z="useContext",V(),wt(e)},useEffect:function(e,n){return z="useEffect",V(),Kh(e,n)},useImperativeHandle:function(e,n,o){return z="useImperativeHandle",V(),Ng(e,n,o)},useInsertionEffect:function(e,n){z="useInsertionEffect",V(),wa(4,Vn,e,n)},useLayoutEffect:function(e,n){return z="useLayoutEffect",V(),Hg(e,n)},useMemo:function(e,n){z="useMemo",V();var o=H.H;H.H=cl;try{return Ug(e,n)}finally{H.H=o}},useReducer:function(e,n,o){z="useReducer",V();var a=H.H;H.H=cl;try{return Tg(e,n,o)}finally{H.H=a}},useRef:function(e){return z="useRef",V(),Bg(e)},useState:function(e){z="useState",V();var n=H.H;H.H=cl;try{return Og(e)}finally{H.H=n}},useDebugValue:function(){z="useDebugValue",V()},useDeferredValue:function(e,n){return z="useDeferredValue",V(),qg(e,n)},useTransition:function(){return z="useTransition",V(),jg()},useSyncExternalStore:function(e,n,o){return z="useSyncExternalStore",V(),Mg(e,n,o)},useId:function(){return z="useId",V(),$g()},useActionState:function(e,n){return z="useActionState",V(),kr(e,n)},useFormState:function(e,n){return z="useFormState",V(),Gh(),kr(e,n)},useOptimistic:function(e){return z="useOptimistic",V(),Rg(e)},useHostTransitionStatus:xa,useMemoCache:Sa,useCacheRefresh:function(){return z="useCacheRefresh",V(),Pg()},useEffectEvent:function(e){return z="useEffectEvent",V(),zg(e)}},Vy={readContext:function(e){return wt(e)},use:ys,useCallback:function(e,n){return z="useCallback",V(),nd(e,n)},useContext:function(e){return z="useContext",V(),wt(e)},useEffect:function(e,n){z="useEffect",V(),Kn(2048,In,e,n)},useImperativeHandle:function(e,n,o){return z="useImperativeHandle",V(),td(e,n,o)},useInsertionEffect:function(e,n){return z="useInsertionEffect",V(),Kn(4,Vn,e,n)},useLayoutEffect:function(e,n){return z="useLayoutEffect",V(),Kn(4,xi,e,n)},useMemo:function(e,n){z="useMemo",V();var o=H.H;H.H=yo;try{return id(e,n)}finally{H.H=o}},useReducer:function(e,n,o){z="useReducer",V();var a=H.H;H.H=yo;try{return xr(e,n,o)}finally{H.H=a}},useRef:function(){return z="useRef",V(),et().memoizedState},useState:function(){z="useState",V();var e=H.H;H.H=yo;try{return xr(co)}finally{H.H=e}},useDebugValue:function(){z="useDebugValue",V()},useDeferredValue:function(e,n){return z="useDeferredValue",V(),tw(e,n)},useTransition:function(){return z="useTransition",V(),aw()},useSyncExternalStore:function(e,n,o){return z="useSyncExternalStore",V(),Fh(e,n,o)},useId:function(){return z="useId",V(),et().memoizedState},useFormState:function(e){return z="useFormState",V(),Gh(),Jh(e)},useActionState:function(e){return z="useActionState",V(),Jh(e)},useOptimistic:function(e,n){return z="useOptimistic",V(),YS(e,n)},useHostTransitionStatus:xa,useMemoCache:Sa,useCacheRefresh:function(){return z="useCacheRefresh",V(),et().memoizedState},useEffectEvent:function(e){return z="useEffectEvent",V(),ed(e)}},JC={readContext:function(e){return wt(e)},use:ys,useCallback:function(e,n){return z="useCallback",V(),nd(e,n)},useContext:function(e){return z="useContext",V(),wt(e)},useEffect:function(e,n){z="useEffect",V(),Kn(2048,In,e,n)},useImperativeHandle:function(e,n,o){return z="useImperativeHandle",V(),td(e,n,o)},useInsertionEffect:function(e,n){return z="useInsertionEffect",V(),Kn(4,Vn,e,n)},useLayoutEffect:function(e,n){return z="useLayoutEffect",V(),Kn(4,xi,e,n)},useMemo:function(e,n){z="useMemo",V();var o=H.H;H.H=sp;try{return id(e,n)}finally{H.H=o}},useReducer:function(e,n,o){z="useReducer",V();var a=H.H;H.H=sp;try{return bc(e,n,o)}finally{H.H=a}},useRef:function(){return z="useRef",V(),et().memoizedState},useState:function(){z="useState",V();var e=H.H;H.H=sp;try{return bc(co)}finally{H.H=e}},useDebugValue:function(){z="useDebugValue",V()},useDeferredValue:function(e,n){return z="useDeferredValue",V(),nw(e,n)},useTransition:function(){return z="useTransition",V(),rw()},useSyncExternalStore:function(e,n,o){return z="useSyncExternalStore",V(),Fh(e,n,o)},useId:function(){return z="useId",V(),et().memoizedState},useFormState:function(e){return z="useFormState",V(),Gh(),Zh(e)},useActionState:function(e){return z="useActionState",V(),Zh(e)},useOptimistic:function(e,n){return z="useOptimistic",V(),QS(e,n)},useHostTransitionStatus:xa,useMemoCache:Sa,useCacheRefresh:function(){return z="useCacheRefresh",V(),et().memoizedState},useEffectEvent:function(e){return z="useEffectEvent",V(),ed(e)}},cl={readContext:function(e){return m(),wt(e)},use:function(e){return d(),ys(e)},useCallback:function(e,n){return z="useCallback",d(),Ee(),_g(e,n)},useContext:function(e){return z="useContext",d(),Ee(),wt(e)},useEffect:function(e,n){return z="useEffect",d(),Ee(),Kh(e,n)},useImperativeHandle:function(e,n,o){return z="useImperativeHandle",d(),Ee(),Ng(e,n,o)},useInsertionEffect:function(e,n){z="useInsertionEffect",d(),Ee(),wa(4,Vn,e,n)},useLayoutEffect:function(e,n){return z="useLayoutEffect",d(),Ee(),Hg(e,n)},useMemo:function(e,n){z="useMemo",d(),Ee();var o=H.H;H.H=cl;try{return Ug(e,n)}finally{H.H=o}},useReducer:function(e,n,o){z="useReducer",d(),Ee();var a=H.H;H.H=cl;try{return Tg(e,n,o)}finally{H.H=a}},useRef:function(e){return z="useRef",d(),Ee(),Bg(e)},useState:function(e){z="useState",d(),Ee();var n=H.H;H.H=cl;try{return Og(e)}finally{H.H=n}},useDebugValue:function(){z="useDebugValue",d(),Ee()},useDeferredValue:function(e,n){return z="useDeferredValue",d(),Ee(),qg(e,n)},useTransition:function(){return z="useTransition",d(),Ee(),jg()},useSyncExternalStore:function(e,n,o){return z="useSyncExternalStore",d(),Ee(),Mg(e,n,o)},useId:function(){return z="useId",d(),Ee(),$g()},useFormState:function(e,n){return z="useFormState",d(),Ee(),kr(e,n)},useActionState:function(e,n){return z="useActionState",d(),Ee(),kr(e,n)},useOptimistic:function(e){return z="useOptimistic",d(),Ee(),Rg(e)},useMemoCache:function(e){return d(),Sa(e)},useHostTransitionStatus:xa,useCacheRefresh:function(){return z="useCacheRefresh",Ee(),Pg()},useEffectEvent:function(e){return z="useEffectEvent",d(),Ee(),zg(e)}},yo={readContext:function(e){return m(),wt(e)},use:function(e){return d(),ys(e)},useCallback:function(e,n){return z="useCallback",d(),V(),nd(e,n)},useContext:function(e){return z="useContext",d(),V(),wt(e)},useEffect:function(e,n){z="useEffect",d(),V(),Kn(2048,In,e,n)},useImperativeHandle:function(e,n,o){return z="useImperativeHandle",d(),V(),td(e,n,o)},useInsertionEffect:function(e,n){return z="useInsertionEffect",d(),V(),Kn(4,Vn,e,n)},useLayoutEffect:function(e,n){return z="useLayoutEffect",d(),V(),Kn(4,xi,e,n)},useMemo:function(e,n){z="useMemo",d(),V();var o=H.H;H.H=yo;try{return id(e,n)}finally{H.H=o}},useReducer:function(e,n,o){z="useReducer",d(),V();var a=H.H;H.H=yo;try{return xr(e,n,o)}finally{H.H=a}},useRef:function(){return z="useRef",d(),V(),et().memoizedState},useState:function(){z="useState",d(),V();var e=H.H;H.H=yo;try{return xr(co)}finally{H.H=e}},useDebugValue:function(){z="useDebugValue",d(),V()},useDeferredValue:function(e,n){return z="useDeferredValue",d(),V(),tw(e,n)},useTransition:function(){return z="useTransition",d(),V(),aw()},useSyncExternalStore:function(e,n,o){return z="useSyncExternalStore",d(),V(),Fh(e,n,o)},useId:function(){return z="useId",d(),V(),et().memoizedState},useFormState:function(e){return z="useFormState",d(),V(),Jh(e)},useActionState:function(e){return z="useActionState",d(),V(),Jh(e)},useOptimistic:function(e,n){return z="useOptimistic",d(),V(),YS(e,n)},useMemoCache:function(e){return d(),Sa(e)},useHostTransitionStatus:xa,useCacheRefresh:function(){return z="useCacheRefresh",V(),et().memoizedState},useEffectEvent:function(e){return z="useEffectEvent",d(),V(),ed(e)}},sp={readContext:function(e){return m(),wt(e)},use:function(e){return d(),ys(e)},useCallback:function(e,n){return z="useCallback",d(),V(),nd(e,n)},useContext:function(e){return z="useContext",d(),V(),wt(e)},useEffect:function(e,n){z="useEffect",d(),V(),Kn(2048,In,e,n)},useImperativeHandle:function(e,n,o){return z="useImperativeHandle",d(),V(),td(e,n,o)},useInsertionEffect:function(e,n){return z="useInsertionEffect",d(),V(),Kn(4,Vn,e,n)},useLayoutEffect:function(e,n){return z="useLayoutEffect",d(),V(),Kn(4,xi,e,n)},useMemo:function(e,n){z="useMemo",d(),V();var o=H.H;H.H=yo;try{return id(e,n)}finally{H.H=o}},useReducer:function(e,n,o){z="useReducer",d(),V();var a=H.H;H.H=yo;try{return bc(e,n,o)}finally{H.H=a}},useRef:function(){return z="useRef",d(),V(),et().memoizedState},useState:function(){z="useState",d(),V();var e=H.H;H.H=yo;try{return bc(co)}finally{H.H=e}},useDebugValue:function(){z="useDebugValue",d(),V()},useDeferredValue:function(e,n){return z="useDeferredValue",d(),V(),nw(e,n)},useTransition:function(){return z="useTransition",d(),V(),rw()},useSyncExternalStore:function(e,n,o){return z="useSyncExternalStore",d(),V(),Fh(e,n,o)},useId:function(){return z="useId",d(),V(),et().memoizedState},useFormState:function(e){return z="useFormState",d(),V(),Zh(e)},useActionState:function(e){return z="useActionState",d(),V(),Zh(e)},useOptimistic:function(e,n){return z="useOptimistic",d(),V(),QS(e,n)},useMemoCache:function(e){return d(),Sa(e)},useHostTransitionStatus:xa,useCacheRefresh:function(){return z="useCacheRefresh",V(),et().memoizedState},useEffectEvent:function(e){return z="useEffectEvent",d(),V(),ed(e)}};var ZC={},KC=new Set,eA=new Set,tA=new Set,nA=new Set,iA=new Set,oA=new Set,lA=new Set,sA=new Set,aA=new Set,rA=new Set;Object.freeze(ZC);var Iy={enqueueSetState:function(e,n,o){e=e._reactInternals;var a=mi(e),u=ds(a);u.payload=n,o!==void 0&&o!==null&&(Xg(o),u.callback=o),n=ps(e,u,a),n!==null&&(Io(a,"this.setState()",e),Bt(n,e,a),pc(n,e,a))},enqueueReplaceState:function(e,n,o){e=e._reactInternals;var a=mi(e),u=ds(a);u.tag=PC,u.payload=n,o!==void 0&&o!==null&&(Xg(o),u.callback=o),n=ps(e,u,a),n!==null&&(Io(a,"this.replaceState()",e),Bt(n,e,a),pc(n,e,a))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var o=mi(e),a=ds(o);a.tag=YC,n!==void 0&&n!==null&&(Xg(n),a.callback=n),n=ps(e,a,o),n!==null&&(Io(o,"this.forceUpdate()",e),Bt(n,e,o),pc(n,e,o))}},su=null,jy=null,$y=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."),Zt=!1,uA={},cA={},fA={},hA={},au=!1,dA={},ap={},Py={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},pA=!1,mA=null;mA=new Set;var Pl=!1,Kt=!1,Yy=!1,gA=typeof WeakSet==="function"?WeakSet:Set,dn=null,ru=null,uu=null,en=null,ni=!1,bo=null,sn=!1,mf=8192,rz={getCacheForType:function(e){var n=wt(Wt),o=n.data.get(e);return o===void 0&&(o=e(),n.data.set(e,o)),o},cacheSignal:function(){return wt(Wt).controller.signal},getOwner:function(){return bi}};if(typeof Symbol==="function"&&Symbol.for){var gf=Symbol.for;gf("selector.component"),gf("selector.has_pseudo_class"),gf("selector.role"),gf("selector.test_id"),gf("selector.text")}var uz=[],cz=typeof WeakMap==="function"?WeakMap:Map,pn=0,an=2,ki=4,Yl=0,yf=1,Ua=2,rp=3,Ns=4,up=6,yA=5,Ie=pn,ut=null,Ae=null,ke=0,ii=0,cp=1,qa=2,bf=3,bA=4,Xy=5,vf=6,fp=7,Qy=8,Va=9,tt=ii,Ci=null,_s=!1,cu=!1,Gy=!1,fl=0,Ot=Yl,Us=0,qs=0,Wy=0,oi=0,Ia=0,Sf=null,jn=null,hp=!1,dp=0,vA=0,SA=300,pp=1/0,wA=500,wf=null,It=null,Vs=null,mp=0,Fy=1,Jy=2,xA=3,Is=0,kA=1,CA=2,AA=3,TA=4,gp=5,tn=0,js=null,fu=null,vo=0,Zy=0,Ky=-0,eb=null,EA=null,MA=null,So=mp,DA=null,fz=50,xf=0,tb=null,nb=!1,yp=!1,hz=50,ja=0,kf=null,hu=!1,bp=null,OA=!1,RA=new Set,dz={},vp=null,du=null,ib=!1,ob=!1,Sp=!1,lb=!1,$s=0,sb={};(function(){for(var e=0;e<yy.length;e++){var n=yy[e],o=n.toLowerCase();n=n[0].toUpperCase()+n.slice(1),uo(o,"on"+n)}uo(aC,"onAnimationEnd"),uo(rC,"onAnimationIteration"),uo(uC,"onAnimationStart"),uo("dblclick","onDoubleClick"),uo("focusin","onFocus"),uo("focusout","onBlur"),uo($B,"onTransitionRun"),uo(PB,"onTransitionStart"),uo(YB,"onTransitionCancel"),uo(cC,"onTransitionEnd")})(),Sl("onMouseEnter",["mouseout","mouseover"]),Sl("onMouseLeave",["mouseout","mouseover"]),Sl("onPointerEnter",["pointerout","pointerover"]),Sl("onPointerLeave",["pointerout","pointerover"]),so("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),so("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),so("onBeforeInput",["compositionend","keypress","textInput","paste"]),so("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),so("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),so("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Cf="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(" "),ab=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Cf)),wp="_reactListening"+Math.random().toString(36).slice(2),LA=!1,BA=!1,xp=!1,zA=!1,kp=!1,Cp=!1,HA=!1,Ap={},pz=/\r\n?/g,mz=/\u0000|\uFFFD/g,$a="http://www.w3.org/1999/xlink",rb="http://www.w3.org/XML/1998/namespace",gz="javascript:throw new Error('React form unexpectedly submitted.')",yz="suppressHydrationWarning",Pa="&",Tp="/&",Af="$",Tf="/$",Ps="$?",Ya="$~",pu="$!",bz="html",vz="body",Sz="head",ub="F!",NA="F",_A="loading",wz="style",Xl=0,mu=1,Ep=2,cb=null,fb=null,UA={dialog:!0,webview:!0},hb=null,Ef=void 0,qA=typeof setTimeout==="function"?setTimeout:void 0,xz=typeof clearTimeout==="function"?clearTimeout:void 0,Xa=-1,VA=typeof Promise==="function"?Promise:void 0,kz=typeof queueMicrotask==="function"?queueMicrotask:typeof VA<"u"?function(e){return VA.resolve(null).then(e).catch(aL)}:qA,db=null,Qa=0,Mf=1,IA=2,jA=3,Xi=4,Qi=new Map,$A=new Set,Ql=Ze.d;Ze.d={f:function(){var e=Ql.f(),n=Mr();return e||n},r:function(e){var n=Bn(e);n!==null&&n.tag===5&&n.type==="form"?sw(n):Ql.r(e)},D:function(e){Ql.D(e),Kx("dns-prefetch",e,null)},C:function(e,n){Ql.C(e,n),Kx("preconnect",e,n)},L:function(e,n,o){Ql.L(e,n,o);var a=gu;if(a&&e&&n){var u='link[rel="preload"][as="'+Jn(n)+'"]';n==="image"?o&&o.imageSrcSet?(u+='[imagesrcset="'+Jn(o.imageSrcSet)+'"]',typeof o.imageSizes==="string"&&(u+='[imagesizes="'+Jn(o.imageSizes)+'"]')):u+='[href="'+Jn(e)+'"]':u+='[href="'+Jn(e)+'"]';var f=u;switch(n){case"style":f=Rr(e);break;case"script":f=Lr(e)}Qi.has(f)||(e=Me({rel:"preload",href:n==="image"&&o&&o.imageSrcSet?void 0:e,as:n},o),Qi.set(f,e),a.querySelector(u)!==null||n==="style"&&a.querySelector(Bc(f))||n==="script"&&a.querySelector(zc(f))||(n=a.createElement("link"),bn(n,"link",e),Mt(n),a.head.appendChild(n)))}},m:function(e,n){Ql.m(e,n);var o=gu;if(o&&e){var a=n&&typeof n.as==="string"?n.as:"script",u='link[rel="modulepreload"][as="'+Jn(a)+'"][href="'+Jn(e)+'"]',f=u;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Lr(e)}if(!Qi.has(f)&&(e=Me({rel:"modulepreload",href:e},n),Qi.set(f,e),o.querySelector(u)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(zc(f)))return}a=o.createElement("link"),bn(a,"link",e),Mt(a),o.head.appendChild(a)}}},X:function(e,n){Ql.X(e,n);var o=gu;if(o&&e){var a=lo(o).hoistableScripts,u=Lr(e),f=a.get(u);f||(f=o.querySelector(zc(u)),f||(e=Me({src:e,async:!0},n),(n=Qi.get(u))&&N0(e,n),f=o.createElement("script"),Mt(f),bn(f,"link",e),o.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},a.set(u,f))}},S:function(e,n,o){Ql.S(e,n,o);var a=gu;if(a&&e){var u=lo(a).hoistableStyles,f=Rr(e);n=n||"default";var p=u.get(f);if(!p){var g={loading:Qa,preload:null};if(p=a.querySelector(Bc(f)))g.loading=Mf|Xi;else{e=Me({rel:"stylesheet",href:e,"data-precedence":n},o),(o=Qi.get(f))&&H0(e,o);var v=p=a.createElement("link");Mt(v),bn(v,"link",e),v._p=new Promise(function(x,D){v.onload=x,v.onerror=D}),v.addEventListener("load",function(){g.loading|=Mf}),v.addEventListener("error",function(){g.loading|=IA}),g.loading|=Xi,xd(p,n,a)}p={type:"stylesheet",instance:p,count:1,state:g},u.set(f,p)}}},M:function(e,n){Ql.M(e,n);var o=gu;if(o&&e){var a=lo(o).hoistableScripts,u=Lr(e),f=a.get(u);f||(f=o.querySelector(zc(u)),f||(e=Me({src:e,async:!0,type:"module"},n),(n=Qi.get(u))&&N0(e,n),f=o.createElement("script"),Mt(f),bn(f,"link",e),o.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},a.set(u,f))}}};var gu=typeof document>"u"?null:document,Mp=null,Cz=60000,Az=800,Tz=500,pb=0,mb=null,Dp=null,Ga=IL,Df={$$typeof:tl,Provider:null,Consumer:null,_currentValue:Ga,_currentValue2:Ga,_threadCount:0},PA="%c%s%c",YA="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",XA="",Op=" ",Ez=Function.prototype.bind,QA=!1,GA=null,WA=null,FA=null,JA=null,ZA=null,KA=null,e2=null,t2=null,n2=null,i2=null;GA=function(e,n,o,a){n=t(e,n),n!==null&&(o=i(n.memoizedState,o,0,a),n.memoizedState=o,n.baseState=o,e.memoizedProps=Me({},e.memoizedProps),o=An(e,2),o!==null&&Bt(o,e,2))},WA=function(e,n,o){n=t(e,n),n!==null&&(o=r(n.memoizedState,o,0),n.memoizedState=o,n.baseState=o,e.memoizedProps=Me({},e.memoizedProps),o=An(e,2),o!==null&&Bt(o,e,2))},FA=function(e,n,o,a){n=t(e,n),n!==null&&(o=l(n.memoizedState,o,a),n.memoizedState=o,n.baseState=o,e.memoizedProps=Me({},e.memoizedProps),o=An(e,2),o!==null&&Bt(o,e,2))},JA=function(e,n,o){e.pendingProps=i(e.memoizedProps,n,0,o),e.alternate&&(e.alternate.pendingProps=e.pendingProps),n=An(e,2),n!==null&&Bt(n,e,2)},ZA=function(e,n){e.pendingProps=r(e.memoizedProps,n,0),e.alternate&&(e.alternate.pendingProps=e.pendingProps),n=An(e,2),n!==null&&Bt(n,e,2)},KA=function(e,n,o){e.pendingProps=l(e.memoizedProps,n,o),e.alternate&&(e.alternate.pendingProps=e.pendingProps),n=An(e,2),n!==null&&Bt(n,e,2)},e2=function(e){var n=An(e,2);n!==null&&Bt(n,e,2)},t2=function(e){var n=oo(),o=An(e,n);o!==null&&Bt(o,e,n)},n2=function(e){h=e},i2=function(e){c=e};var Rp=!0,Lp=null,gb=!1,Ys=null,Xs=null,Qs=null,Of=new Map,Rf=new Map,Gs=[],Mz="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(" "),Bp=null;if(Ed.prototype.render=j0.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error("Cannot update an unmounted root.");var o=arguments;typeof o[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()."):L(o[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 o[1]<"u"&&console.error("You passed a second argument to root.render(...) but it only accepts one argument."),o=e;var a=n.current,u=mi(a);_0(a,u,o,n,null,null)},Ed.prototype.unmount=j0.prototype.unmount=function(){var e=arguments;if(typeof e[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()."),e=this._internalRoot,e!==null){this._internalRoot=null;var n=e.containerInfo;(Ie&(an|ki))!==pn&&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."),_0(e.current,2,null,e,null,null),Mr(),n[Cs]=null}},Ed.prototype.unstable_scheduleHydration=function(e){if(e){var n=ie();e={blockedOn:null,target:e,priority:n};for(var o=0;o<Gs.length&&n!==0&&n<Gs[o].priority;o++);Gs.splice(o,0,e),o===0&&dk(e)}},function(){var e=yu.version;if(e!=="19.2.7")throw Error(`Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:
207
+ Check the top-level render call using <`+a+">.");var p="";o!=null&&e!==o&&(a=null,typeof o.tag==="number"?a=P(o):typeof o.name==="string"&&(a=o.name),a&&(p=" It was passed a child from "+a+".")),Y(n,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.',f,p)})}}};var ja=BS(!0),IC=BS(!1),$C=0,PC=1,YC=2,Hy=3,_s=!1,XC=!1,Ny=null,_y=!1,lu=st(null),op=st(0),vi=st(null),Ii=null,su=1,df=2,$t=st(0),lp=0,$i=1,qn=2,Si=4,Vn=8,au,QC=new Set,GC=new Set,Uy=new Set,WC=new Set,Il=0,me=null,rt=null,Ft=null,sp=!1,ru=!1,Ia=!1,ap=0,pf=0,$l=null,az=0,rz=25,z=null,Pi=null,Pl=-1,mf=!1,gf={readContext:wt,use:vs,useCallback:qt,useContext:qt,useEffect:qt,useImperativeHandle:qt,useLayoutEffect:qt,useInsertionEffect:qt,useMemo:qt,useReducer:qt,useRef:qt,useState:qt,useDebugValue:qt,useDeferredValue:qt,useTransition:qt,useSyncExternalStore:qt,useId:qt,useHostTransitionStatus:qt,useFormState:qt,useActionState:qt,useOptimistic:qt,useMemoCache:qt,useCacheRefresh:qt};gf.useEffectEvent=qt;var qy=null,FC=null,Vy=null,JC=null,cl=null,go=null,rp=null;qy={readContext:function(e){return wt(e)},use:vs,useCallback:function(e,n){return z="useCallback",Te(),Cr(n),_g(e,n)},useContext:function(e){return z="useContext",Te(),wt(e)},useEffect:function(e,n){return z="useEffect",Te(),Cr(n),td(e,n)},useImperativeHandle:function(e,n,o){return z="useImperativeHandle",Te(),Cr(o),Ng(e,n,o)},useInsertionEffect:function(e,n){z="useInsertionEffect",Te(),Cr(n),Ta(4,qn,e,n)},useLayoutEffect:function(e,n){return z="useLayoutEffect",Te(),Cr(n),Hg(e,n)},useMemo:function(e,n){z="useMemo",Te(),Cr(n);var o=H.H;H.H=cl;try{return Ug(e,n)}finally{H.H=o}},useReducer:function(e,n,o){z="useReducer",Te();var a=H.H;H.H=cl;try{return Tg(e,n,o)}finally{H.H=a}},useRef:function(e){return z="useRef",Te(),Bg(e)},useState:function(e){z="useState",Te();var n=H.H;H.H=cl;try{return Og(e)}finally{H.H=n}},useDebugValue:function(){z="useDebugValue",Te()},useDeferredValue:function(e,n){return z="useDeferredValue",Te(),qg(e,n)},useTransition:function(){return z="useTransition",Te(),Ig()},useSyncExternalStore:function(e,n,o){return z="useSyncExternalStore",Te(),Mg(e,n,o)},useId:function(){return z="useId",Te(),$g()},useFormState:function(e,n){return z="useFormState",Te(),Fh(),Tr(e,n)},useActionState:function(e,n){return z="useActionState",Te(),Tr(e,n)},useOptimistic:function(e){return z="useOptimistic",Te(),Rg(e)},useHostTransitionStatus:Ea,useMemoCache:Aa,useCacheRefresh:function(){return z="useCacheRefresh",Te(),Pg()},useEffectEvent:function(e){return z="useEffectEvent",Te(),zg(e)}},FC={readContext:function(e){return wt(e)},use:vs,useCallback:function(e,n){return z="useCallback",V(),_g(e,n)},useContext:function(e){return z="useContext",V(),wt(e)},useEffect:function(e,n){return z="useEffect",V(),td(e,n)},useImperativeHandle:function(e,n,o){return z="useImperativeHandle",V(),Ng(e,n,o)},useInsertionEffect:function(e,n){z="useInsertionEffect",V(),Ta(4,qn,e,n)},useLayoutEffect:function(e,n){return z="useLayoutEffect",V(),Hg(e,n)},useMemo:function(e,n){z="useMemo",V();var o=H.H;H.H=cl;try{return Ug(e,n)}finally{H.H=o}},useReducer:function(e,n,o){z="useReducer",V();var a=H.H;H.H=cl;try{return Tg(e,n,o)}finally{H.H=a}},useRef:function(e){return z="useRef",V(),Bg(e)},useState:function(e){z="useState",V();var n=H.H;H.H=cl;try{return Og(e)}finally{H.H=n}},useDebugValue:function(){z="useDebugValue",V()},useDeferredValue:function(e,n){return z="useDeferredValue",V(),qg(e,n)},useTransition:function(){return z="useTransition",V(),Ig()},useSyncExternalStore:function(e,n,o){return z="useSyncExternalStore",V(),Mg(e,n,o)},useId:function(){return z="useId",V(),$g()},useActionState:function(e,n){return z="useActionState",V(),Tr(e,n)},useFormState:function(e,n){return z="useFormState",V(),Fh(),Tr(e,n)},useOptimistic:function(e){return z="useOptimistic",V(),Rg(e)},useHostTransitionStatus:Ea,useMemoCache:Aa,useCacheRefresh:function(){return z="useCacheRefresh",V(),Pg()},useEffectEvent:function(e){return z="useEffectEvent",V(),zg(e)}},Vy={readContext:function(e){return wt(e)},use:vs,useCallback:function(e,n){return z="useCallback",V(),od(e,n)},useContext:function(e){return z="useContext",V(),wt(e)},useEffect:function(e,n){z="useEffect",V(),Zn(2048,Vn,e,n)},useImperativeHandle:function(e,n,o){return z="useImperativeHandle",V(),id(e,n,o)},useInsertionEffect:function(e,n){return z="useInsertionEffect",V(),Zn(4,qn,e,n)},useLayoutEffect:function(e,n){return z="useLayoutEffect",V(),Zn(4,Si,e,n)},useMemo:function(e,n){z="useMemo",V();var o=H.H;H.H=go;try{return ld(e,n)}finally{H.H=o}},useReducer:function(e,n,o){z="useReducer",V();var a=H.H;H.H=go;try{return Ar(e,n,o)}finally{H.H=a}},useRef:function(){return z="useRef",V(),et().memoizedState},useState:function(){z="useState",V();var e=H.H;H.H=go;try{return Ar(uo)}finally{H.H=e}},useDebugValue:function(){z="useDebugValue",V()},useDeferredValue:function(e,n){return z="useDeferredValue",V(),tw(e,n)},useTransition:function(){return z="useTransition",V(),aw()},useSyncExternalStore:function(e,n,o){return z="useSyncExternalStore",V(),Zh(e,n,o)},useId:function(){return z="useId",V(),et().memoizedState},useFormState:function(e){return z="useFormState",V(),Fh(),Kh(e)},useActionState:function(e){return z="useActionState",V(),Kh(e)},useOptimistic:function(e,n){return z="useOptimistic",V(),YS(e,n)},useHostTransitionStatus:Ea,useMemoCache:Aa,useCacheRefresh:function(){return z="useCacheRefresh",V(),et().memoizedState},useEffectEvent:function(e){return z="useEffectEvent",V(),nd(e)}},JC={readContext:function(e){return wt(e)},use:vs,useCallback:function(e,n){return z="useCallback",V(),od(e,n)},useContext:function(e){return z="useContext",V(),wt(e)},useEffect:function(e,n){z="useEffect",V(),Zn(2048,Vn,e,n)},useImperativeHandle:function(e,n,o){return z="useImperativeHandle",V(),id(e,n,o)},useInsertionEffect:function(e,n){return z="useInsertionEffect",V(),Zn(4,qn,e,n)},useLayoutEffect:function(e,n){return z="useLayoutEffect",V(),Zn(4,Si,e,n)},useMemo:function(e,n){z="useMemo",V();var o=H.H;H.H=rp;try{return ld(e,n)}finally{H.H=o}},useReducer:function(e,n,o){z="useReducer",V();var a=H.H;H.H=rp;try{return Sc(e,n,o)}finally{H.H=a}},useRef:function(){return z="useRef",V(),et().memoizedState},useState:function(){z="useState",V();var e=H.H;H.H=rp;try{return Sc(uo)}finally{H.H=e}},useDebugValue:function(){z="useDebugValue",V()},useDeferredValue:function(e,n){return z="useDeferredValue",V(),nw(e,n)},useTransition:function(){return z="useTransition",V(),rw()},useSyncExternalStore:function(e,n,o){return z="useSyncExternalStore",V(),Zh(e,n,o)},useId:function(){return z="useId",V(),et().memoizedState},useFormState:function(e){return z="useFormState",V(),Fh(),ed(e)},useActionState:function(e){return z="useActionState",V(),ed(e)},useOptimistic:function(e,n){return z="useOptimistic",V(),QS(e,n)},useHostTransitionStatus:Ea,useMemoCache:Aa,useCacheRefresh:function(){return z="useCacheRefresh",V(),et().memoizedState},useEffectEvent:function(e){return z="useEffectEvent",V(),nd(e)}},cl={readContext:function(e){return m(),wt(e)},use:function(e){return d(),vs(e)},useCallback:function(e,n){return z="useCallback",d(),Te(),_g(e,n)},useContext:function(e){return z="useContext",d(),Te(),wt(e)},useEffect:function(e,n){return z="useEffect",d(),Te(),td(e,n)},useImperativeHandle:function(e,n,o){return z="useImperativeHandle",d(),Te(),Ng(e,n,o)},useInsertionEffect:function(e,n){z="useInsertionEffect",d(),Te(),Ta(4,qn,e,n)},useLayoutEffect:function(e,n){return z="useLayoutEffect",d(),Te(),Hg(e,n)},useMemo:function(e,n){z="useMemo",d(),Te();var o=H.H;H.H=cl;try{return Ug(e,n)}finally{H.H=o}},useReducer:function(e,n,o){z="useReducer",d(),Te();var a=H.H;H.H=cl;try{return Tg(e,n,o)}finally{H.H=a}},useRef:function(e){return z="useRef",d(),Te(),Bg(e)},useState:function(e){z="useState",d(),Te();var n=H.H;H.H=cl;try{return Og(e)}finally{H.H=n}},useDebugValue:function(){z="useDebugValue",d(),Te()},useDeferredValue:function(e,n){return z="useDeferredValue",d(),Te(),qg(e,n)},useTransition:function(){return z="useTransition",d(),Te(),Ig()},useSyncExternalStore:function(e,n,o){return z="useSyncExternalStore",d(),Te(),Mg(e,n,o)},useId:function(){return z="useId",d(),Te(),$g()},useFormState:function(e,n){return z="useFormState",d(),Te(),Tr(e,n)},useActionState:function(e,n){return z="useActionState",d(),Te(),Tr(e,n)},useOptimistic:function(e){return z="useOptimistic",d(),Te(),Rg(e)},useMemoCache:function(e){return d(),Aa(e)},useHostTransitionStatus:Ea,useCacheRefresh:function(){return z="useCacheRefresh",Te(),Pg()},useEffectEvent:function(e){return z="useEffectEvent",d(),Te(),zg(e)}},go={readContext:function(e){return m(),wt(e)},use:function(e){return d(),vs(e)},useCallback:function(e,n){return z="useCallback",d(),V(),od(e,n)},useContext:function(e){return z="useContext",d(),V(),wt(e)},useEffect:function(e,n){z="useEffect",d(),V(),Zn(2048,Vn,e,n)},useImperativeHandle:function(e,n,o){return z="useImperativeHandle",d(),V(),id(e,n,o)},useInsertionEffect:function(e,n){return z="useInsertionEffect",d(),V(),Zn(4,qn,e,n)},useLayoutEffect:function(e,n){return z="useLayoutEffect",d(),V(),Zn(4,Si,e,n)},useMemo:function(e,n){z="useMemo",d(),V();var o=H.H;H.H=go;try{return ld(e,n)}finally{H.H=o}},useReducer:function(e,n,o){z="useReducer",d(),V();var a=H.H;H.H=go;try{return Ar(e,n,o)}finally{H.H=a}},useRef:function(){return z="useRef",d(),V(),et().memoizedState},useState:function(){z="useState",d(),V();var e=H.H;H.H=go;try{return Ar(uo)}finally{H.H=e}},useDebugValue:function(){z="useDebugValue",d(),V()},useDeferredValue:function(e,n){return z="useDeferredValue",d(),V(),tw(e,n)},useTransition:function(){return z="useTransition",d(),V(),aw()},useSyncExternalStore:function(e,n,o){return z="useSyncExternalStore",d(),V(),Zh(e,n,o)},useId:function(){return z="useId",d(),V(),et().memoizedState},useFormState:function(e){return z="useFormState",d(),V(),Kh(e)},useActionState:function(e){return z="useActionState",d(),V(),Kh(e)},useOptimistic:function(e,n){return z="useOptimistic",d(),V(),YS(e,n)},useMemoCache:function(e){return d(),Aa(e)},useHostTransitionStatus:Ea,useCacheRefresh:function(){return z="useCacheRefresh",V(),et().memoizedState},useEffectEvent:function(e){return z="useEffectEvent",d(),V(),nd(e)}},rp={readContext:function(e){return m(),wt(e)},use:function(e){return d(),vs(e)},useCallback:function(e,n){return z="useCallback",d(),V(),od(e,n)},useContext:function(e){return z="useContext",d(),V(),wt(e)},useEffect:function(e,n){z="useEffect",d(),V(),Zn(2048,Vn,e,n)},useImperativeHandle:function(e,n,o){return z="useImperativeHandle",d(),V(),id(e,n,o)},useInsertionEffect:function(e,n){return z="useInsertionEffect",d(),V(),Zn(4,qn,e,n)},useLayoutEffect:function(e,n){return z="useLayoutEffect",d(),V(),Zn(4,Si,e,n)},useMemo:function(e,n){z="useMemo",d(),V();var o=H.H;H.H=go;try{return ld(e,n)}finally{H.H=o}},useReducer:function(e,n,o){z="useReducer",d(),V();var a=H.H;H.H=go;try{return Sc(e,n,o)}finally{H.H=a}},useRef:function(){return z="useRef",d(),V(),et().memoizedState},useState:function(){z="useState",d(),V();var e=H.H;H.H=go;try{return Sc(uo)}finally{H.H=e}},useDebugValue:function(){z="useDebugValue",d(),V()},useDeferredValue:function(e,n){return z="useDeferredValue",d(),V(),nw(e,n)},useTransition:function(){return z="useTransition",d(),V(),rw()},useSyncExternalStore:function(e,n,o){return z="useSyncExternalStore",d(),V(),Zh(e,n,o)},useId:function(){return z="useId",d(),V(),et().memoizedState},useFormState:function(e){return z="useFormState",d(),V(),ed(e)},useActionState:function(e){return z="useActionState",d(),V(),ed(e)},useOptimistic:function(e,n){return z="useOptimistic",d(),V(),QS(e,n)},useMemoCache:function(e){return d(),Aa(e)},useHostTransitionStatus:Ea,useCacheRefresh:function(){return z="useCacheRefresh",V(),et().memoizedState},useEffectEvent:function(e){return z="useEffectEvent",d(),V(),nd(e)}};var ZC={},KC=new Set,eA=new Set,tA=new Set,nA=new Set,iA=new Set,oA=new Set,lA=new Set,sA=new Set,aA=new Set,rA=new Set;Object.freeze(ZC);var jy={enqueueSetState:function(e,n,o){e=e._reactInternals;var a=di(e),u=ms(a);u.payload=n,o!==void 0&&o!==null&&(Xg(o),u.callback=o),n=gs(e,u,a),n!==null&&(jo(a,"this.setState()",e),Bt(n,e,a),gc(n,e,a))},enqueueReplaceState:function(e,n,o){e=e._reactInternals;var a=di(e),u=ms(a);u.tag=PC,u.payload=n,o!==void 0&&o!==null&&(Xg(o),u.callback=o),n=gs(e,u,a),n!==null&&(jo(a,"this.replaceState()",e),Bt(n,e,a),gc(n,e,a))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var o=di(e),a=ms(o);a.tag=YC,n!==void 0&&n!==null&&(Xg(n),a.callback=n),n=gs(e,a,o),n!==null&&(jo(o,"this.forceUpdate()",e),Bt(n,e,o),gc(n,e,o))}},uu=null,Iy=null,$y=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."),Jt=!1,uA={},cA={},fA={},hA={},cu=!1,dA={},up={},Py={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},pA=!1,mA=null;mA=new Set;var Yl=!1,Zt=!1,Yy=!1,gA=typeof WeakSet==="function"?WeakSet:Set,hn=null,fu=null,hu=null,Kt=null,ti=!1,yo=null,ln=!1,yf=8192,uz={getCacheForType:function(e){var n=wt(Gt),o=n.data.get(e);return o===void 0&&(o=e(),n.data.set(e,o)),o},cacheSignal:function(){return wt(Gt).controller.signal},getOwner:function(){return gi}};if(typeof Symbol==="function"&&Symbol.for){var bf=Symbol.for;bf("selector.component"),bf("selector.has_pseudo_class"),bf("selector.role"),bf("selector.test_id"),bf("selector.text")}var cz=[],fz=typeof WeakMap==="function"?WeakMap:Map,dn=0,sn=2,wi=4,Xl=0,vf=1,$a=2,cp=3,Us=4,fp=6,yA=5,je=dn,ut=null,Ce=null,ke=0,ni=0,hp=1,Pa=2,Sf=3,bA=4,Xy=5,wf=6,dp=7,Qy=8,Ya=9,tt=ni,xi=null,qs=!1,du=!1,Gy=!1,fl=0,Ot=Xl,Vs=0,js=0,Wy=0,ii=0,Xa=0,xf=null,jn=null,pp=!1,mp=0,vA=0,SA=300,gp=1/0,wA=500,kf=null,Vt=null,Is=null,yp=0,Fy=1,Jy=2,xA=3,$s=0,kA=1,CA=2,AA=3,TA=4,bp=5,en=0,Ps=null,pu=null,bo=0,Zy=0,Ky=-0,eb=null,EA=null,MA=null,vo=yp,DA=null,hz=50,Cf=0,tb=null,nb=!1,vp=!1,dz=50,Qa=0,Af=null,mu=!1,Sp=null,OA=!1,RA=new Set,pz={},wp=null,gu=null,ib=!1,ob=!1,xp=!1,lb=!1,Ys=0,sb={};(function(){for(var e=0;e<yy.length;e++){var n=yy[e],o=n.toLowerCase();n=n[0].toUpperCase()+n.slice(1),ro(o,"on"+n)}ro(aC,"onAnimationEnd"),ro(rC,"onAnimationIteration"),ro(uC,"onAnimationStart"),ro("dblclick","onDoubleClick"),ro("focusin","onFocus"),ro("focusout","onBlur"),ro(PB,"onTransitionRun"),ro(YB,"onTransitionStart"),ro(XB,"onTransitionCancel"),ro(cC,"onTransitionEnd")})(),wl("onMouseEnter",["mouseout","mouseover"]),wl("onMouseLeave",["mouseout","mouseover"]),wl("onPointerEnter",["pointerout","pointerover"]),wl("onPointerLeave",["pointerout","pointerover"]),lo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),lo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),lo("onBeforeInput",["compositionend","keypress","textInput","paste"]),lo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),lo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),lo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Tf="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(" "),ab=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Tf)),kp="_reactListening"+Math.random().toString(36).slice(2),LA=!1,BA=!1,Cp=!1,zA=!1,Ap=!1,Tp=!1,HA=!1,Ep={},mz=/\r\n?/g,gz=/\u0000|\uFFFD/g,Ga="http://www.w3.org/1999/xlink",rb="http://www.w3.org/XML/1998/namespace",yz="javascript:throw new Error('React form unexpectedly submitted.')",bz="suppressHydrationWarning",Wa="&",Mp="/&",Ef="$",Mf="/$",Xs="$?",Fa="$~",yu="$!",vz="html",Sz="body",wz="head",ub="F!",NA="F",_A="loading",xz="style",Ql=0,bu=1,Dp=2,cb=null,fb=null,UA={dialog:!0,webview:!0},hb=null,Df=void 0,qA=typeof setTimeout==="function"?setTimeout:void 0,kz=typeof clearTimeout==="function"?clearTimeout:void 0,Ja=-1,VA=typeof Promise==="function"?Promise:void 0,Cz=typeof queueMicrotask==="function"?queueMicrotask:typeof VA<"u"?function(e){return VA.resolve(null).then(e).catch(rL)}:qA,db=null,Za=0,Of=1,jA=2,IA=3,Yi=4,Xi=new Map,$A=new Set,Gl=Ze.d;Ze.d={f:function(){var e=Gl.f(),n=Rr();return e||n},r:function(e){var n=Ln(e);n!==null&&n.tag===5&&n.type==="form"?sw(n):Gl.r(e)},D:function(e){Gl.D(e),Kx("dns-prefetch",e,null)},C:function(e,n){Gl.C(e,n),Kx("preconnect",e,n)},L:function(e,n,o){Gl.L(e,n,o);var a=vu;if(a&&e&&n){var u='link[rel="preload"][as="'+Fn(n)+'"]';n==="image"?o&&o.imageSrcSet?(u+='[imagesrcset="'+Fn(o.imageSrcSet)+'"]',typeof o.imageSizes==="string"&&(u+='[imagesizes="'+Fn(o.imageSizes)+'"]')):u+='[href="'+Fn(e)+'"]':u+='[href="'+Fn(e)+'"]';var f=u;switch(n){case"style":f=zr(e);break;case"script":f=Hr(e)}Xi.has(f)||(e=Ee({rel:"preload",href:n==="image"&&o&&o.imageSrcSet?void 0:e,as:n},o),Xi.set(f,e),a.querySelector(u)!==null||n==="style"&&a.querySelector(Hc(f))||n==="script"&&a.querySelector(Nc(f))||(n=a.createElement("link"),yn(n,"link",e),Mt(n),a.head.appendChild(n)))}},m:function(e,n){Gl.m(e,n);var o=vu;if(o&&e){var a=n&&typeof n.as==="string"?n.as:"script",u='link[rel="modulepreload"][as="'+Fn(a)+'"][href="'+Fn(e)+'"]',f=u;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Hr(e)}if(!Xi.has(f)&&(e=Ee({rel:"modulepreload",href:e},n),Xi.set(f,e),o.querySelector(u)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(Nc(f)))return}a=o.createElement("link"),yn(a,"link",e),Mt(a),o.head.appendChild(a)}}},X:function(e,n){Gl.X(e,n);var o=vu;if(o&&e){var a=oo(o).hoistableScripts,u=Hr(e),f=a.get(u);f||(f=o.querySelector(Nc(u)),f||(e=Ee({src:e,async:!0},n),(n=Xi.get(u))&&N0(e,n),f=o.createElement("script"),Mt(f),yn(f,"link",e),o.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},a.set(u,f))}},S:function(e,n,o){Gl.S(e,n,o);var a=vu;if(a&&e){var u=oo(a).hoistableStyles,f=zr(e);n=n||"default";var p=u.get(f);if(!p){var g={loading:Za,preload:null};if(p=a.querySelector(Hc(f)))g.loading=Of|Yi;else{e=Ee({rel:"stylesheet",href:e,"data-precedence":n},o),(o=Xi.get(f))&&H0(e,o);var v=p=a.createElement("link");Mt(v),yn(v,"link",e),v._p=new Promise(function(x,D){v.onload=x,v.onerror=D}),v.addEventListener("load",function(){g.loading|=Of}),v.addEventListener("error",function(){g.loading|=jA}),g.loading|=Yi,Cd(p,n,a)}p={type:"stylesheet",instance:p,count:1,state:g},u.set(f,p)}}},M:function(e,n){Gl.M(e,n);var o=vu;if(o&&e){var a=oo(o).hoistableScripts,u=Hr(e),f=a.get(u);f||(f=o.querySelector(Nc(u)),f||(e=Ee({src:e,async:!0,type:"module"},n),(n=Xi.get(u))&&N0(e,n),f=o.createElement("script"),Mt(f),yn(f,"link",e),o.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},a.set(u,f))}}};var vu=typeof document>"u"?null:document,Op=null,Az=60000,Tz=800,Ez=500,pb=0,mb=null,Rp=null,Ka=IL,Rf={$$typeof:tl,Provider:null,Consumer:null,_currentValue:Ka,_currentValue2:Ka,_threadCount:0},PA="%c%s%c",YA="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",XA="",Lp=" ",Mz=Function.prototype.bind,QA=!1,GA=null,WA=null,FA=null,JA=null,ZA=null,KA=null,e2=null,t2=null,n2=null,i2=null;GA=function(e,n,o,a){n=t(e,n),n!==null&&(o=i(n.memoizedState,o,0,a),n.memoizedState=o,n.baseState=o,e.memoizedProps=Ee({},e.memoizedProps),o=Cn(e,2),o!==null&&Bt(o,e,2))},WA=function(e,n,o){n=t(e,n),n!==null&&(o=r(n.memoizedState,o,0),n.memoizedState=o,n.baseState=o,e.memoizedProps=Ee({},e.memoizedProps),o=Cn(e,2),o!==null&&Bt(o,e,2))},FA=function(e,n,o,a){n=t(e,n),n!==null&&(o=l(n.memoizedState,o,a),n.memoizedState=o,n.baseState=o,e.memoizedProps=Ee({},e.memoizedProps),o=Cn(e,2),o!==null&&Bt(o,e,2))},JA=function(e,n,o){e.pendingProps=i(e.memoizedProps,n,0,o),e.alternate&&(e.alternate.pendingProps=e.pendingProps),n=Cn(e,2),n!==null&&Bt(n,e,2)},ZA=function(e,n){e.pendingProps=r(e.memoizedProps,n,0),e.alternate&&(e.alternate.pendingProps=e.pendingProps),n=Cn(e,2),n!==null&&Bt(n,e,2)},KA=function(e,n,o){e.pendingProps=l(e.memoizedProps,n,o),e.alternate&&(e.alternate.pendingProps=e.pendingProps),n=Cn(e,2),n!==null&&Bt(n,e,2)},e2=function(e){var n=Cn(e,2);n!==null&&Bt(n,e,2)},t2=function(e){var n=io(),o=Cn(e,n);o!==null&&Bt(o,e,n)},n2=function(e){h=e},i2=function(e){c=e};var Bp=!0,zp=null,gb=!1,Qs=null,Gs=null,Ws=null,Lf=new Map,Bf=new Map,Fs=[],Dz="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(" "),Hp=null;if(Dd.prototype.render=I0.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error("Cannot update an unmounted root.");var o=arguments;typeof o[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()."):L(o[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 o[1]<"u"&&console.error("You passed a second argument to root.render(...) but it only accepts one argument."),o=e;var a=n.current,u=di(a);_0(a,u,o,n,null,null)},Dd.prototype.unmount=I0.prototype.unmount=function(){var e=arguments;if(typeof e[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()."),e=this._internalRoot,e!==null){this._internalRoot=null;var n=e.containerInfo;(je&(sn|wi))!==dn&&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."),_0(e.current,2,null,e,null,null),Rr(),n[Ts]=null}},Dd.prototype.unstable_scheduleHydration=function(e){if(e){var n=vl();e={blockedOn:null,target:e,priority:n};for(var o=0;o<Fs.length&&n!==0&&n<Fs[o].priority;o++);Fs.splice(o,0,e),o===0&&dk(e)}},function(){var e=Su.version;if(e!=="19.2.7")throw Error(`Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:
208
208
  - react: `+(e+`
209
209
  - react-dom: 19.2.7
210
- 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"),Ze.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0){if(typeof e.render==="function")throw Error("Unable to find node on an unmounted component.");throw e=Object.keys(e).join(","),Error("Argument appears to not be a ReactComponent. Keys: "+e)}return e=ye(n),e=e!==null?nt(e):null,e=e===null?null:e.stateNode,e},!function(){var e={bundleType:1,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.7"};return e.overrideHookState=GA,e.overrideHookStateDeletePath=WA,e.overrideHookStateRenamePath=FA,e.overrideProps=JA,e.overridePropsDeletePath=ZA,e.overridePropsRenamePath=KA,e.scheduleUpdate=e2,e.scheduleRetry=t2,e.setErrorHandler=n2,e.setSuspenseHandler=i2,e.scheduleRefresh=E,e.scheduleRoot=k,e.setRefreshHandler=R,e.getCurrentFiber=BL,ca(e)}()&&sl&&window.top===window.self&&(-1<navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Edge")===-1||-1<navigator.userAgent.indexOf("Firefox"))){var o2=window.location.protocol;/^(https?|file):$/.test(o2)&&console.info("%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools"+(o2==="file:"?`
211
- You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:""),"font-weight:bold")}Lz.createRoot=function(e,n){if(!L(e))throw Error("Target container is not a DOM element.");yk(e);var o=!1,a="",u=pw,f=mw,p=gw;return n!==null&&n!==void 0&&(n.hydrate?console.warn("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof n==="object"&&n!==null&&n.$$typeof===el&&console.error(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
210
+ 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"),Ze.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0){if(typeof e.render==="function")throw Error("Unable to find node on an unmounted component.");throw e=Object.keys(e).join(","),Error("Argument appears to not be a ReactComponent. Keys: "+e)}return e=ye(n),e=e!==null?nt(e):null,e=e===null?null:e.stateNode,e},!function(){var e={bundleType:1,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.7"};return e.overrideHookState=GA,e.overrideHookStateDeletePath=WA,e.overrideHookStateRenamePath=FA,e.overrideProps=JA,e.overridePropsDeletePath=ZA,e.overridePropsRenamePath=KA,e.scheduleUpdate=e2,e.scheduleRetry=t2,e.setErrorHandler=n2,e.setSuspenseHandler=i2,e.scheduleRefresh=E,e.scheduleRoot=k,e.setRefreshHandler=R,e.getCurrentFiber=zL,ma(e)}()&&sl&&window.top===window.self&&(-1<navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Edge")===-1||-1<navigator.userAgent.indexOf("Firefox"))){var o2=window.location.protocol;/^(https?|file):$/.test(o2)&&console.info("%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools"+(o2==="file:"?`
211
+ You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:""),"font-weight:bold")}Bz.createRoot=function(e,n){if(!L(e))throw Error("Target container is not a DOM element.");yk(e);var o=!1,a="",u=pw,f=mw,p=gw;return n!==null&&n!==void 0&&(n.hydrate?console.warn("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof n==="object"&&n!==null&&n.$$typeof===el&&console.error(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
212
212
 
213
213
  let root = createRoot(domContainer);
214
- root.render(<App />);`),n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(u=n.onUncaughtError),n.onCaughtError!==void 0&&(f=n.onCaughtError),n.onRecoverableError!==void 0&&(p=n.onRecoverableError)),n=sk(e,1,!1,null,null,o,a,null,u,f,p,gk),e[Cs]=n.current,k0(e),new j0(n)},Lz.hydrateRoot=function(e,n,o){if(!L(e))throw Error("Target container is not a DOM element.");yk(e),n===void 0&&console.error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var a=!1,u="",f=pw,p=mw,g=gw,v=null;return o!==null&&o!==void 0&&(o.unstable_strictMode===!0&&(a=!0),o.identifierPrefix!==void 0&&(u=o.identifierPrefix),o.onUncaughtError!==void 0&&(f=o.onUncaughtError),o.onCaughtError!==void 0&&(p=o.onCaughtError),o.onRecoverableError!==void 0&&(g=o.onRecoverableError),o.formState!==void 0&&(v=o.formState)),n=sk(e,1,!0,n,o!=null?o:null,a,u,v,f,p,g,gk),n.context=ak(null),o=n.current,a=mi(o),a=Bi(a),u=ds(a),u.callback=null,ps(o,u,a),Io(a,"hydrateRoot()",null),o=a,n.current.lanes=o,No(n,o),Zo(n),e[Cs]=n.current,k0(e),new Ed(n)},Lz.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var r2=yb(function(_N,a2){var Bz=ct(s2());a2.exports=Bz});var FO=ct(r2(),1);var zz=Object.getPrototypeOf;function u2(t){if(t===null||typeof t!=="object"||Array.isArray(t))return!1;let i=zz(t);return i===Object.prototype||i===null}var ne=ct(Ws(),1);var c2=(t)=>Fa.string().trim().min(1).max(t).refine((i)=>!/[\p{Cc}\p{Cf}]/u.test(i)),Hz=(t)=>Fa.string().trim().min(1).max(t).refine((i)=>Array.from(i).every((l)=>l===`
215
- `||l==="\t"||!/[\p{Cc}\p{Cf}]/u.test(l))),Nz=Fa.strictObject({version:Fa.literal(2),entityType:Fa.literal("note"),title:c2(160),body:Hz(1000).optional(),backlink:c2(500).regex(/^entity:\/\/[^/]+\/.+$/)}),vb=Fa.looseObject({studioCreatePrefill:Nz});function f2(t,i,l){return vb.parse({studioCreatePrefill:{version:2,entityType:"note",title:t,...l?{body:l}:{},backlink:i}})}var _z={surface:{kzqmXN:"xh8yej3",kB7OPa:"x9f619",k7Eaqz:"xeuugli",kAzted:"x2lwn1j",kGO01o:"x1sgudl8",kORKVm:"x1odjw0f",kh9fTk:"x1c54s19",kKq9zD:"xiqhxos",k4sGnE:"x11u2ate",kzrhLs:"x14214pg","--operator-section-spacing":"xn0jjtu","--operator-section-transform":"x6lesxo",$$css:!0}};function Sb(t){return`${t} ${ce(_z.surface,zp.inset,wo.operatorRoles).className??""}`}var wb=ct(Ws(),1);function Uz(t){return wb.createElement(h2,{...t,children:wb.createElement("div",ce(wn.readable),t.children)})}var xb={engine:"app",density:"comfortable",Button:Ge,Input:Hp,Select:Np,ConfirmDialog:Gi,Disclosure:Uz,Tabs:d2};var kt={root:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kUk6DE:"x98rzlu",kAzted:"x2lwn1j",$$css:!0},toolbar:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kOIVth:"x1jnr06f x1h74ku2",kwnvtZ:"xozqiw3 x5kkq21",kmVPX3:"xnohdxd",kWkggS:"xjbqb8w",kAzted:"x2lwn1j",kTWfjk:"x1c4ya5t",kRugJJ:"xiuf7f6",$$css:!0},modes:{k1xSpc:"xkaaz9w",$$css:!0},metadata:{koQZXg:"x8x9d4c x703316",kMv6JI:"xa9opjo",kGuDYH:"x1j6dyjg x155ir8z",kMwMTN:"x1ar3pfp",kb6lSQ:"x12oo3zp",$$css:!0},assist:{k1xSpc:"x78zum5 x1bkxw62 x10acg2q xbrvn9l",kGNEyG:"x6s0dn4",kOIVth:"x883omv",kmVPX3:"x13j9azq",kWkggS:"xg47p5g",kAzted:"x2lwn1j",k1JLwA:"xlpkf44",kLyoy9:"x1otypdl",kRugJJ:"x1xccwpl",$$css:!0},input:{kUk6DE:"x98rzlu",k7Eaqz:"xfb3i0g",kXkAfU:"x1w9335",kr4CYY:"xf2x79s",$$css:!0},select:{ks0D6T:"x1racy4e",kCrP1I:"x1yagzmq",koRygp:"x1dbdljh",k76vLx:"xeyi6kz",$$css:!0},run:{kmVPX3:"xbnpv00",khDVqt:"xuxw1ft",$$css:!0},presets:{k1xSpc:"x3nfvp2",kOIVth:"x1jnr06f",kCrP1I:"x1yagzmq",kjH4Xa:"xal9krd",$$css:!0},preset:{khDVqt:"x1tndu2m",$$css:!0},assistMeta:{kMv6JI:"xa9opjo",kGuDYH:"x1j6dyjg",kMwMTN:"x1ar3pfp",khDVqt:"xuxw1ft",kHdLCk:"xkaaz9w",$$css:!0},suggestion:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kOIVth:"x1v2ro7d",kmVPX3:"xnohdxd",kWkggS:"x153t6mt",kdLj2q:"x1o3peri",kf00j:"xzbubq",kRugJJ:"xlko52b",$$css:!0},answer:{kWkggS:"x9kxhyz",$$css:!0},copy:{kskxy:"x1aoj0v",kVQacm:"xysyzu8",kGuDYH:"x4z9k3i",kMwMTN:"xqvuw85",kHjlTd:"xj0a0fe",koRygp:"x1dbdljh",kKwN1N:"x1h9t1nj",$$css:!0},answerTitle:{k1xSpc:"x1lliihq",k1K539:"xzueoph",kMv6JI:"xa9opjo",kGuDYH:"x1k6wstc",kb6lSQ:"x1vyo3qp",kMwMTN:"x1es3s4s",$$css:!0},spacer:{kUk6DE:"x98rzlu",$$css:!0},status:{kmVPX3:"x1vrqldd",$$css:!0},panes:{k1xSpc:"xrvj5dj",kUk6DE:"x98rzlu",kAzted:"x2lwn1j",kVQacm:"xb3r6kr",kya2p2:"x1qt74i8",$$css:!0},split:{kumcoG:"x1o61qjw x1xh6270 xreyasp",k9llMU:"xnfwqkv x5ktkrg",kORKVm:"x10wlt62",$$css:!0},source:{kMwMTN:"xqvuw85",kWkggS:"xjbqb8w",kAzted:"x2lwn1j",k7Eaqz:"xeuugli",kSWEuD:"x32b0ac",k26BEO:"xe636ye",kWqL5O:"xgfja2r x1hwe9mw x18p9hjd x1y4yzp4",kfdmCh:"x1q0q8m5",kL6WhQ:"xpqg30t",kt9PQ7:"x1qhh985 x1byj73k x3l60dh",kTWfjk:"x1qm741w",kya2p2:"x1qt74i8",$$css:!0},preview:{k7Eaqz:"xeuugli",kI3sdo:"x16dl9wz",kInvED:"x2ssjo2",kAzted:"x2lwn1j",kmVPX3:"x1539ny5",kORKVm:"x1odjw0f",kHjlTd:"xj0a0fe",kZeWKH:"xish69e",k6w4Gs:"xgwpcrc",k5wCbM:"x1597r2g",kubnTK:"xj8g7ue",kOLLwu:"xf8ucz8",k3VDzK:"x5hh3dx",kRoeRy:"xkp4qii",kh9fTk:"x1pll5v8",kfGByI:"xdjr4gx",kKq9zD:"xscgqpg",kHdLCk:"x1806iup",$$css:!0}};var Cb=[],y2=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((i)=>i?parseInt(i,36):1);for(let i=0,l=0;i<t.length;i++)(i%2?y2:Cb).push(l=l+t[i])})();function qz(t){if(t<768)return!1;for(let i=0,l=Cb.length;;){let s=i+l>>1;if(t<Cb[s])l=s;else if(t>=y2[s])i=s+1;else return!0;if(i==l)return!1}}function p2(t){return t>=127462&&t<=127487}var m2=8205;function b2(t,i,l=!0,s=!0){return(l?v2:Vz)(t,i,s)}function v2(t,i,l){if(i==t.length)return i;if(i&&S2(t.charCodeAt(i))&&w2(t.charCodeAt(i-1)))i--;let s=kb(t,i);i+=g2(s);while(i<t.length){let r=kb(t,i);if(s==m2||r==m2||l&&qz(r))i+=g2(r),s=r;else if(p2(r)){let c=0,h=i-2;while(h>=0&&p2(kb(t,h)))c++,h-=2;if(c%2==0)break;else i+=2}else break}return i}function Vz(t,i,l){while(i>1){let s=v2(t,i-2,l);if(s<i)return s;i--}return 0}function kb(t,i){let l=t.charCodeAt(i);if(!w2(l)||i+1==t.length)return l;let s=t.charCodeAt(i+1);if(!S2(s))return l;return(l-55296<<10)+(s-56320)+65536}function S2(t){return t>=56320&&t<57344}function w2(t){return t>=55296&&t<56320}function g2(t){return t<65536?1:2}class Ye{lineAt(t){if(t<0||t>this.length)throw RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,i,l){[t,i]=wu(this,t,i);let s=[];if(this.decompose(0,t,s,2),l.length)l.decompose(0,l.length,s,3);return this.decompose(i,this.length,s,1),hl.from(s,this.length-(i-t)+l.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,i=this.length){[t,i]=wu(this,t,i);let l=[];return this.decompose(t,i,l,0),hl.from(l,i-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let i=this.scanIdentical(t,1),l=this.length-this.scanIdentical(t,-1),s=new vu(this),r=new vu(t);for(let c=i,h=i;;){if(s.next(c),r.next(c),c=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(h+=s.value.length,s.done||h>=l)return!0}}iter(t=1){return new vu(this,t)}iterRange(t,i=this.length){return new Hb(this,t,i)}iterLines(t,i){let l;if(t==null)l=this.iter();else{if(i==null)i=this.lines+1;let s=this.line(t).from;l=this.iterRange(s,Math.max(s,i==this.lines+1?this.length:i<=1?0:this.line(i-1).to))}return new Nb(l)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(t.length==0)throw RangeError("A document must have at least one line");if(t.length==1&&!t[0])return Ye.empty;return t.length<=32?new Xt(t):hl.from(Xt.split(t,[]))}}class Xt extends Ye{constructor(t,i=Iz(t)){super();this.text=t,this.length=i}get lines(){return this.text.length}get children(){return null}lineInner(t,i,l,s){for(let r=0;;r++){let c=this.text[r],h=s+c.length;if((i?l:h)>=t)return new E2(s,h,l,c);s=h+1,l++}}decompose(t,i,l,s){let r=t<=0&&i>=this.length?this:new Xt(x2(this.text,t,i),Math.min(i,this.length)-Math.max(0,t));if(s&1){let c=l.pop(),h=Vp(r.text,c.text.slice(),0,r.length);if(h.length<=32)l.push(new Xt(h,c.length+r.length));else{let d=h.length>>1;l.push(new Xt(h.slice(0,d)),new Xt(h.slice(d)))}}else l.push(r)}replace(t,i,l){if(!(l instanceof Xt))return super.replace(t,i,l);[t,i]=wu(this,t,i);let s=Vp(this.text,Vp(l.text,x2(this.text,0,t)),i),r=this.length+l.length-(i-t);if(s.length<=32)return new Xt(s,r);return hl.from(Xt.split(s,[]),r)}sliceString(t,i=this.length,l=`
216
- `){[t,i]=wu(this,t,i);let s="";for(let r=0,c=0;r<=i&&c<this.text.length;c++){let h=this.text[c],d=r+h.length;if(r>t&&c)s+=l;if(t<d&&i>r)s+=h.slice(Math.max(0,t-r),i-r);r=d+1}return s}flatten(t){for(let i of this.text)t.push(i)}scanIdentical(){return 0}static split(t,i){let l=[],s=-1;for(let r of t)if(l.push(r),s+=r.length+1,l.length==32)i.push(new Xt(l,s)),l=[],s=-1;if(s>-1)i.push(new Xt(l,s));return i}}class hl extends Ye{constructor(t,i){super();this.children=t,this.length=i,this.lines=0;for(let l of t)this.lines+=l.lines}lineInner(t,i,l,s){for(let r=0;;r++){let c=this.children[r],h=s+c.length,d=l+c.lines-1;if((i?d:h)>=t)return c.lineInner(t,i,l,s);s=h+1,l=d+1}}decompose(t,i,l,s){for(let r=0,c=0;c<=i&&r<this.children.length;r++){let h=this.children[r],d=c+h.length;if(t<=d&&i>=c){let m=s&((c<=t?1:0)|(d>=i?2:0));if(c>=t&&d<=i&&!m)l.push(h);else h.decompose(t-c,i-c,l,m)}c=d+1}}replace(t,i,l){if([t,i]=wu(this,t,i),l.lines<this.lines)for(let s=0,r=0;s<this.children.length;s++){let c=this.children[s],h=r+c.length;if(t>=r&&i<=h){let d=c.replace(t-r,i-r,l),m=this.lines-c.lines+d.lines;if(d.lines<m>>4&&d.lines>m>>6){let y=this.children.slice();return y[s]=d,new hl(y,this.length-(i-t)+l.length)}return super.replace(r,h,d)}r=h+1}return super.replace(t,i,l)}sliceString(t,i=this.length,l=`
217
- `){[t,i]=wu(this,t,i);let s="";for(let r=0,c=0;r<this.children.length&&c<=i;r++){let h=this.children[r],d=c+h.length;if(c>t&&r)s+=l;if(t<d&&i>c)s+=h.sliceString(t-c,i-c,l);c=d+1}return s}flatten(t){for(let i of this.children)i.flatten(t)}scanIdentical(t,i){if(!(t instanceof hl))return 0;let l=0,[s,r,c,h]=i>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;s+=i,r+=i){if(s==c||r==h)return l;let d=this.children[s],m=t.children[r];if(d!=m)return l+d.scanIdentical(m,i);l+=d.length+1}}static from(t,i=t.reduce((l,s)=>l+s.length+1,-1)){let l=0;for(let w of t)l+=w.lines;if(l<32){let w=[];for(let k of t)k.flatten(w);return new Xt(w,i)}let s=Math.max(32,l>>5),r=s<<1,c=s>>1,h=[],d=0,m=-1,y=[];function b(w){let k;if(w.lines>r&&w instanceof hl)for(let E of w.children)b(E);else if(w.lines>c&&(d>c||!d))S(),h.push(w);else if(w instanceof Xt&&d&&(k=y[y.length-1])instanceof Xt&&w.lines+k.lines<=32)d+=w.lines,m+=w.length+1,y[y.length-1]=new Xt(k.text.concat(w.text),k.length+1+w.length);else{if(d+w.lines>s)S();d+=w.lines,m+=w.length+1,y.push(w)}}function S(){if(d==0)return;h.push(y.length==1?y[0]:hl.from(y,m)),m=-1,d=y.length=0}for(let w of t)b(w);return S(),h.length==1?h[0]:new hl(h,i)}}Ye.empty=new Xt([""],0);function Iz(t){let i=-1;for(let l of t)i+=l.length+1;return i}function Vp(t,i,l=0,s=1e9){for(let r=0,c=0,h=!0;c<t.length&&r<=s;c++){let d=t[c],m=r+d.length;if(m>=l){if(m>s)d=d.slice(0,s-r);if(r<l)d=d.slice(l-r);if(h)i[i.length-1]+=d,h=!1;else i.push(d)}r=m+1}return i}function x2(t,i,l){return Vp(t,[""],i,l)}class vu{constructor(t,i=1){this.dir=i,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[t],this.offsets=[i>0?1:(t instanceof Xt?t.text.length:t.children.length)<<1]}nextInner(t,i){this.done=this.lineBreak=!1;for(;;){let l=this.nodes.length-1,s=this.nodes[l],r=this.offsets[l],c=r>>1,h=s instanceof Xt?s.text.length:s.children.length;if(c==(i>0?h:0)){if(l==0)return this.done=!0,this.value="",this;if(i>0)this.offsets[l-1]++;this.nodes.pop(),this.offsets.pop()}else if((r&1)==(i>0?0:1)){if(this.offsets[l]+=i,t==0)return this.lineBreak=!0,this.value=`
218
- `,this;t--}else if(s instanceof Xt){let d=s.text[c+(i<0?-1:0)];if(this.offsets[l]+=i,d.length>Math.max(0,t))return this.value=t==0?d:i>0?d.slice(t):d.slice(0,d.length-t),this;t-=d.length}else{let d=s.children[c+(i<0?-1:0)];if(t>d.length)t-=d.length,this.offsets[l]+=i;else{if(i<0)this.offsets[l]--;this.nodes.push(d),this.offsets.push(i>0?1:(d instanceof Xt?d.text.length:d.children.length)<<1)}}}}next(t=0){if(t<0)this.nextInner(-t,-this.dir),t=this.value.length;return this.nextInner(t,this.dir)}}class Hb{constructor(t,i,l){this.value="",this.done=!1,this.cursor=new vu(t,i>l?-1:1),this.pos=i>l?t.length:0,this.from=Math.min(i,l),this.to=Math.max(i,l)}nextInner(t,i){if(i<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,i<0?this.pos-this.to:this.from-this.pos);let l=i<0?this.pos-this.from:this.to-this.pos;if(t>l)t=l;l-=t;let{value:s}=this.cursor.next(t);return this.pos+=(s.length+t)*i,this.value=s.length<=l?s:i<0?s.slice(s.length-l):s.slice(0,l),this.done=!this.value,this}next(t=0){if(t<0)t=Math.max(t,this.from-this.pos);else if(t>0)t=Math.min(t,this.to-this.pos);return this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class Nb{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:i,lineBreak:l,value:s}=this.inner.next(t);if(i&&this.afterBreak)this.value="",this.afterBreak=!1;else if(i)this.done=!0,this.value="";else if(l)if(this.afterBreak)this.value="";else this.afterBreak=!0,this.next();else this.value=s,this.afterBreak=!1;return this}get lineBreak(){return!1}}if(typeof Symbol<"u")Ye.prototype[Symbol.iterator]=function(){return this.iter()},vu.prototype[Symbol.iterator]=Hb.prototype[Symbol.iterator]=Nb.prototype[Symbol.iterator]=function(){return this};class E2{constructor(t,i,l,s){this.from=t,this.to=i,this.number=l,this.text=s}get length(){return this.to-this.from}}function wu(t,i,l){return i=Math.max(0,Math.min(t.length,i)),[i,Math.max(i,Math.min(t.length,l))]}function Wi(t,i,l=!0,s=!0){return b2(t,i,l,s)}function jz(t){return t>=56320&&t<57344}function $z(t){return t>=55296&&t<56320}function _b(t,i){let l=t.charCodeAt(i);if(!$z(l)||i+1==t.length)return l;let s=t.charCodeAt(i+1);if(!jz(s))return l;return(l-55296<<10)+(s-56320)+65536}function Ub(t){return t<65536?1:2}var Tb=/\r\n?|\n/,xn=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(xn||(xn={}));class Wl{constructor(t){this.sections=t}get length(){let t=0;for(let i=0;i<this.sections.length;i+=2)t+=this.sections[i];return t}get newLength(){let t=0;for(let i=0;i<this.sections.length;i+=2){let l=this.sections[i+1];t+=l<0?this.sections[i]:l}return t}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(t){for(let i=0,l=0,s=0;i<this.sections.length;){let r=this.sections[i++],c=this.sections[i++];if(c<0)t(l,s,r),s+=r;else s+=c;l+=r}}iterChangedRanges(t,i=!1){Eb(this,t,i)}get invertedDesc(){let t=[];for(let i=0;i<this.sections.length;){let l=this.sections[i++],s=this.sections[i++];if(s<0)t.push(l,s);else t.push(s,l)}return new Wl(t)}composeDesc(t){return this.empty?t:t.empty?this:M2(this,t)}mapDesc(t,i=!1){return t.empty?this:Mb(this,t,i)}mapPos(t,i=-1,l=xn.Simple){let s=0,r=0;for(let c=0;c<this.sections.length;){let h=this.sections[c++],d=this.sections[c++],m=s+h;if(d<0){if(m>t)return r+(t-s);r+=h}else{if(l!=xn.Simple&&m>=t&&(l==xn.TrackDel&&s<t&&m>t||l==xn.TrackBefore&&s<t||l==xn.TrackAfter&&m>t))return null;if(m>t||m==t&&i<0&&!h)return t==s||i<0?r:r+d;r+=d}s=m}if(t>s)throw RangeError(`Position ${t} is out of range for changeset of length ${s}`);return r}touchesRange(t,i=t){for(let l=0,s=0;l<this.sections.length&&s<=i;){let r=this.sections[l++],c=this.sections[l++],h=s+r;if(c>=0&&s<=i&&h>=t)return s<t&&h>i?"cover":!0;s=h}return!1}toString(){let t="";for(let i=0;i<this.sections.length;){let l=this.sections[i++],s=this.sections[i++];t+=(t?" ":"")+l+(s>=0?":"+s:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some((i)=>typeof i!="number"))throw RangeError("Invalid JSON representation of ChangeDesc");return new Wl(t)}static create(t){return new Wl(t)}}class rn extends Wl{constructor(t,i){super(t);this.inserted=i}apply(t){if(this.length!=t.length)throw RangeError("Applying change set to a document with the wrong length");return Eb(this,(i,l,s,r,c)=>t=t.replace(s,s+(l-i),c),!1),t}mapDesc(t,i=!1){return Mb(this,t,i,!0)}invert(t){let i=this.sections.slice(),l=[];for(let s=0,r=0;s<i.length;s+=2){let c=i[s],h=i[s+1];if(h>=0){i[s]=h,i[s+1]=c;let d=s>>1;while(l.length<d)l.push(Ye.empty);l.push(c?t.slice(r,r+c):Ye.empty)}r+=c}return new rn(i,l)}compose(t){return this.empty?t:t.empty?this:M2(this,t,!0)}map(t,i=!1){return t.empty?this:Mb(this,t,i,!0)}iterChanges(t,i=!1){Eb(this,t,i)}get desc(){return Wl.create(this.sections)}filter(t){let i=[],l=[],s=[],r=new xu(this);e:for(let c=0,h=0;;){let d=c==t.length?1e9:t[c++];while(h<d||h==d&&r.len==0){if(r.done)break e;let y=Math.min(r.len,d-h);Mn(s,y,-1);let b=r.ins==-1?-1:r.off==0?r.ins:0;if(Mn(i,y,b),b>0)Js(l,i,r.text);r.forward(y),h+=y}let m=t[c++];while(h<m){if(r.done)break e;let y=Math.min(r.len,m-h);Mn(i,y,-1),Mn(s,y,r.ins==-1?-1:r.off==0?r.ins:0),r.forward(y),h+=y}}return{changes:new rn(i,l),filtered:Wl.create(s)}}toJSON(){let t=[];for(let i=0;i<this.sections.length;i+=2){let l=this.sections[i],s=this.sections[i+1];if(s<0)t.push(l);else if(s==0)t.push([l]);else t.push([l].concat(this.inserted[i>>1].toJSON()))}return t}static of(t,i,l){let s=[],r=[],c=0,h=null;function d(y=!1){if(!y&&!s.length)return;if(c<i)Mn(s,i-c,-1);let b=new rn(s,r);h=h?h.compose(b.map(h)):b,s=[],r=[],c=0}function m(y){if(Array.isArray(y))for(let b of y)m(b);else if(y instanceof rn){if(y.length!=i)throw RangeError(`Mismatched change set length (got ${y.length}, expected ${i})`);d(),h=h?h.compose(y.map(h)):y}else{let{from:b,to:S=b,insert:w}=y;if(b>S||b<0||S>i)throw RangeError(`Invalid change range ${b} to ${S} (in doc of length ${i})`);let k=!w?Ye.empty:typeof w=="string"?Ye.of(w.split(l||Tb)):w,E=k.length;if(b==S&&E==0)return;if(b<c)d();if(b>c)Mn(s,b-c,-1);Mn(s,S-b,E),Js(r,s,k),c=S}}return m(t),d(!h),h}static empty(t){return new rn(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw RangeError("Invalid JSON representation of ChangeSet");let i=[],l=[];for(let s=0;s<t.length;s++){let r=t[s];if(typeof r=="number")i.push(r,-1);else if(!Array.isArray(r)||typeof r[0]!="number"||r.some((c,h)=>h&&typeof c!="string"))throw RangeError("Invalid JSON representation of ChangeSet");else if(r.length==1)i.push(r[0],0);else{while(l.length<s)l.push(Ye.empty);l[s]=Ye.of(r.slice(1)),i.push(r[0],l[s].length)}}return new rn(i,l)}static createSet(t,i){return new rn(t,i)}}function Mn(t,i,l,s=!1){if(i==0&&l<=0)return;let r=t.length-2;if(r>=0&&l<=0&&l==t[r+1])t[r]+=i;else if(r>=0&&i==0&&t[r]==0)t[r+1]+=l;else if(s)t[r]+=i,t[r+1]+=l;else t.push(i,l)}function Js(t,i,l){if(l.length==0)return;let s=i.length-2>>1;if(s<t.length)t[t.length-1]=t[t.length-1].append(l);else{while(t.length<s)t.push(Ye.empty);t.push(l)}}function Eb(t,i,l){let s=t.inserted;for(let r=0,c=0,h=0;h<t.sections.length;){let d=t.sections[h++],m=t.sections[h++];if(m<0)r+=d,c+=d;else{let y=r,b=c,S=Ye.empty;for(;;){if(y+=d,b+=m,m&&s)S=S.append(s[h-2>>1]);if(l||h==t.sections.length||t.sections[h+1]<0)break;d=t.sections[h++],m=t.sections[h++]}i(r,y,c,b,S),r=y,c=b}}}function Mb(t,i,l,s=!1){let r=[],c=s?[]:null,h=new xu(t),d=new xu(i);for(let m=-1;;)if(h.done&&d.len||d.done&&h.len)throw Error("Mismatched change set lengths");else if(h.ins==-1&&d.ins==-1){let y=Math.min(h.len,d.len);Mn(r,y,-1),h.forward(y),d.forward(y)}else if(d.ins>=0&&(h.ins<0||m==h.i||h.off==0&&(d.len<h.len||d.len==h.len&&!l))){let y=d.len;Mn(r,d.ins,-1);while(y){let b=Math.min(h.len,y);if(h.ins>=0&&m<h.i&&h.len<=b){if(Mn(r,0,h.ins),c)Js(c,r,h.text);m=h.i}h.forward(b),y-=b}d.next()}else if(h.ins>=0){let y=0,b=h.len;while(b)if(d.ins==-1){let S=Math.min(b,d.len);y+=S,b-=S,d.forward(S)}else if(d.ins==0&&d.len<b)b-=d.len,d.next();else break;if(Mn(r,y,m<h.i?h.ins:0),c&&m<h.i)Js(c,r,h.text);m=h.i,h.forward(h.len-b)}else if(h.done&&d.done)return c?rn.createSet(r,c):Wl.create(r);else throw Error("Mismatched change set lengths")}function M2(t,i,l=!1){let s=[],r=l?[]:null,c=new xu(t),h=new xu(i);for(let d=!1;;)if(c.done&&h.done)return r?rn.createSet(s,r):Wl.create(s);else if(c.ins==0)Mn(s,c.len,0,d),c.next();else if(h.len==0&&!h.done){if(Mn(s,0,h.ins,d),r)Js(r,s,h.text);h.next()}else if(c.done||h.done)throw Error("Mismatched change set lengths");else{let m=Math.min(c.len2,h.len),y=s.length;if(c.ins==-1){let b=h.ins==-1?-1:h.off?0:h.ins;if(Mn(s,m,b,d),r&&b)Js(r,s,h.text)}else if(h.ins==-1){if(Mn(s,c.off?0:c.len,m,d),r)Js(r,s,c.textBit(m))}else if(Mn(s,c.off?0:c.len,h.off?0:h.ins,d),r&&!h.off)Js(r,s,h.text);d=(c.ins>m||h.ins>=0&&h.len>m)&&(d||s.length>y),c.forward2(m),h.forward(m)}}class xu{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;if(this.i<t.length)this.len=t[this.i++],this.ins=t[this.i++];else this.len=0,this.ins=-2;this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length?Ye.empty:t[i]}textBit(t){let{inserted:i}=this.set,l=this.i-2>>1;return l>=i.length&&!t?Ye.empty:i[l].slice(this.off,t==null?void 0:this.off+t)}forward(t){if(t==this.len)this.next();else this.len-=t,this.off+=t}forward2(t){if(this.ins==-1)this.forward(t);else if(t==this.ins)this.next();else this.ins-=t,this.off+=t}}class Fs{constructor(t,i,l,s){this.from=t,this.to=i,this.flags=l,this.goalColumn=s}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get undirectional(){return(this.flags&64)>0}get bidiLevel(){let t=this.flags&7;return t==7?null:t}map(t,i=-1){let l,s;if(this.empty)l=s=t.mapPos(this.from,i);else l=t.mapPos(this.from,1),s=t.mapPos(this.to,-1);return l==this.from&&s==this.to?this:new Fs(l,s,this.flags,this.goalColumn)}extend(t,i=t,l=0){if(t<=this.anchor&&i>=this.anchor)return G.range(t,i,void 0,void 0,l);let s=Math.abs(t-this.anchor)>Math.abs(i-this.anchor)?t:i;return G.range(this.anchor,s,void 0,void 0,l)}eq(t,i=!1){return this.anchor==t.anchor&&this.head==t.head&&this.goalColumn==t.goalColumn&&(!i||!this.empty||this.assoc==t.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||typeof t.anchor!="number"||typeof t.head!="number")throw RangeError("Invalid JSON representation for SelectionRange");return G.range(t.anchor,t.head)}static create(t,i,l,s){return new Fs(t,i,l,s)}}class G{constructor(t,i){this.ranges=t,this.mainIndex=i}map(t,i=-1){if(t.empty)return this;return G.create(this.ranges.map((l)=>l.map(t,i)),this.mainIndex)}eq(t,i=!1){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let l=0;l<this.ranges.length;l++)if(!this.ranges[l].eq(t.ranges[l],i))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new G([this.main],0)}addRange(t,i=!0){return G.create([t].concat(this.ranges),i?0:this.mainIndex+1)}replaceRange(t,i=this.mainIndex){let l=this.ranges.slice();return l[i]=t,G.create(l,this.mainIndex)}toJSON(){return{ranges:this.ranges.map((t)=>t.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!="number"||t.main>=t.ranges.length)throw RangeError("Invalid JSON representation for EditorSelection");return new G(t.ranges.map((i)=>Fs.fromJSON(i)),t.main)}static single(t,i=t){return new G([G.range(t,i)],0)}static create(t,i=0){if(t.length==0)throw RangeError("A selection needs at least one range");for(let l=0,s=0;s<t.length;s++){let r=t[s];if(r.empty?r.from<=l:r.from<l)return G.normalized(t.slice(),i);l=r.to}return new G(t,i)}static cursor(t,i=0,l,s){return Fs.create(t,t,(i==0?0:i<0?8:16)|(l==null?7:Math.min(6,l)),s)}static range(t,i,l,s,r){let c=s==null?7:Math.min(6,s);if(!r&&t!=i)r=i<t?1:-1;if(r)c|=r<0?8:16;return i<t?Fs.create(i,t,c|32,l):Fs.create(t,i,c,l)}static undirectionalRange(t,i){return Fs.create(t,i,64,void 0)}static normalized(t,i=0){let l=t[i];t.sort((s,r)=>s.from-r.from),i=t.indexOf(l);for(let s=1;s<t.length;s++){let r=t[s],c=t[s-1];if(r.empty?r.from<=c.to:r.from<c.to){let h=c.from,d=Math.max(r.to,c.to);if(s<=i)i--;t.splice(--s,2,r.anchor>r.head?G.range(d,h):G.range(h,d))}}return new G(t,i)}}function D2(t,i){for(let l of t.ranges)if(l.to>i)throw RangeError("Selection points outside of document")}var qb=0;class fe{constructor(t,i,l,s,r){this.combine=t,this.compareInput=i,this.compare=l,this.isStatic=s,this.id=qb++,this.default=t([]),this.extensions=typeof r=="function"?r(this):r}get reader(){return this}static define(t={}){return new fe(t.combine||((i)=>i),t.compareInput||((i,l)=>i===l),t.compare||(!t.combine?Vb:(i,l)=>i===l),!!t.static,t.enables)}of(t){return new zf([],this,0,t)}compute(t,i){if(this.isStatic)throw Error("Can't compute a static facet");return new zf(t,this,1,i)}computeN(t,i){if(this.isStatic)throw Error("Can't compute a static facet");return new zf(t,this,2,i)}from(t,i){if(!i)i=(l)=>l;return this.compute([t],(l)=>i(l.field(t)))}}function Vb(t,i){return t==i||t.length==i.length&&t.every((l,s)=>l===i[s])}class zf{constructor(t,i,l,s){this.dependencies=t,this.facet=i,this.type=l,this.value=s,this.id=qb++}dynamicSlot(t){var i;let l=this.value,s=this.facet.compareInput,r=this.id,c=t[r]>>1,h=this.type==2,d=!1,m=!1,y=[];for(let b of this.dependencies)if(b=="doc")d=!0;else if(b=="selection")m=!0;else if((((i=t[b.id])!==null&&i!==void 0?i:1)&1)==0)y.push(t[b.id]);return{create(b){return b.values[c]=l(b),1},update(b,S){if(d&&S.docChanged||m&&(S.docChanged||S.selection)||Db(b,y)){let w=l(b);if(h?!k2(w,b.values[c],s):!s(w,b.values[c]))return b.values[c]=w,1}return 0},reconfigure:(b,S)=>{let w,k=S.config.address[r];if(k!=null){let E=$p(S,k);if(this.dependencies.every((R)=>R instanceof fe?S.facet(R)===b.facet(R):R instanceof Co?S.field(R,!1)==b.field(R,!1):!0)||(h?k2(w=l(b),E,s):s(w=l(b),E)))return b.values[c]=E,0}else w=l(b);return b.values[c]=w,1}}}get extension(){return this}}function k2(t,i,l){if(t.length!=i.length)return!1;for(let s=0;s<t.length;s++)if(!l(t[s],i[s]))return!1;return!0}function Db(t,i){let l=!1;for(let s of i)if(Hf(t,s)&1)l=!0;return l}function Pz(t,i,l){let s=l.map((m)=>t[m.id]),r=l.map((m)=>m.type),c=s.filter((m)=>!(m&1)),h=t[i.id]>>1;function d(m){let y=[];for(let b=0;b<s.length;b++){let S=$p(m,s[b]);if(r[b]==2)for(let w of S)y.push(w);else y.push(S)}return i.combine(y)}return{create(m){for(let y of s)Hf(m,y);return m.values[h]=d(m),1},update(m,y){if(!Db(m,c))return 0;let b=d(m);if(i.compare(b,m.values[h]))return 0;return m.values[h]=b,1},reconfigure(m,y){let b=Db(m,s),S=y.config.facets[i.id],w=y.facet(i);if(S&&!b&&Vb(l,S))return m.values[h]=w,0;let k=d(m);if(i.compare(k,w))return m.values[h]=w,0;return m.values[h]=k,1}}}var _p=fe.define({static:!0});class Co{constructor(t,i,l,s,r){this.id=t,this.createF=i,this.updateF=l,this.compareF=s,this.spec=r,this.provides=void 0}static define(t){let i=new Co(qb++,t.create,t.update,t.compare||((l,s)=>l===s),t);if(t.provide)i.provides=t.provide(i);return i}create(t){let i=t.facet(_p).find((l)=>l.field==this);return((i===null||i===void 0?void 0:i.create)||this.createF)(t)}slot(t){let i=t[this.id]>>1;return{create:(l)=>(l.values[i]=this.create(l),1),update:(l,s)=>{let r=l.values[i],c=this.updateF(r,s);if(this.compareF(r,c))return 0;return l.values[i]=c,1},reconfigure:(l,s)=>{let r=l.facet(_p),c=s.facet(_p),h;if((h=r.find((d)=>d.field==this))&&h!=c.find((d)=>d.field==this))return l.values[i]=h.create(l),1;if(s.config.address[this.id]!=null)return l.values[i]=s.field(this),0;return l.values[i]=this.create(l),1}}}init(t){return[this,_p.of({field:this,create:t})]}get extension(){return this}}var Ja={lowest:4,low:3,default:2,high:1,highest:0};function Bf(t){return(i)=>new Ib(i,t)}var Fl={highest:Bf(Ja.highest),high:Bf(Ja.high),default:Bf(Ja.default),low:Bf(Ja.low),lowest:Bf(Ja.lowest)};class Ib{constructor(t,i){this.inner=t,this.prec=i}get extension(){return this}}class ku{of(t){return new Ip(this,t)}reconfigure(t){return ku.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class Ip{constructor(t,i){this.compartment=t,this.inner=i}get extension(){return this}}class jp{constructor(t,i,l,s,r,c){this.base=t,this.compartments=i,this.dynamicSlots=l,this.address=s,this.staticValues=r,this.facets=c,this.statusTemplate=[];while(this.statusTemplate.length<l.length)this.statusTemplate.push(0)}staticFacet(t){let i=this.address[t.id];return i==null?t.default:this.staticValues[i>>1]}static resolve(t,i,l){let s=[],r=Object.create(null),c=new Map;for(let S of Yz(t,i,c))if(S instanceof Co)s.push(S);else(r[S.facet.id]||(r[S.facet.id]=[])).push(S);let h=Object.create(null),d=[],m=[];for(let S of s)h[S.id]=m.length<<1,m.push((w)=>S.slot(w));let y=l===null||l===void 0?void 0:l.config.facets;for(let S in r){let w=r[S],k=w[0].facet,E=y&&y[S]||[];if(w.every((R)=>R.type==0))if(h[k.id]=d.length<<1|1,Vb(E,w))d.push(l.facet(k));else{let R=k.combine(w.map((L)=>L.value));d.push(l&&k.compare(R,l.facet(k))?l.facet(k):R)}else{for(let R of w)if(R.type==0)h[R.id]=d.length<<1|1,d.push(R.value);else h[R.id]=m.length<<1,m.push((L)=>R.dynamicSlot(L));h[k.id]=m.length<<1,m.push((R)=>Pz(R,k,w))}}let b=m.map((S)=>S(h));return new jp(t,c,b,h,d,r)}}function Yz(t,i,l){let s=[[],[],[],[],[]],r=new Map;function c(h,d){let m=r.get(h);if(m!=null){if(m<=d)return;let y=s[m].indexOf(h);if(y>-1)s[m].splice(y,1);if(h instanceof Ip)l.delete(h.compartment)}if(r.set(h,d),Array.isArray(h))for(let y of h)c(y,d);else if(h instanceof Ip){if(l.has(h.compartment))throw RangeError("Duplicate use of compartment in extensions");let y=i.get(h.compartment)||h.inner;l.set(h.compartment,y),c(y,d)}else if(h instanceof Ib)c(h.inner,h.prec);else if(h instanceof Co){if(s[d].push(h),h.provides)c(h.provides,d)}else if(h instanceof zf){if(s[d].push(h),h.facet.extensions)c(h.facet.extensions,Ja.default)}else{let y=h.extension;if(!y)throw Error(`Unrecognized extension value in extension set (${h}).`);if(y==h)throw Error(`Unrecognized extension value in extension set (${h}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);c(y,d)}}return c(t,Ja.default),s.reduce((h,d)=>h.concat(d))}function Hf(t,i){if(i&1)return 2;let l=i>>1,s=t.status[l];if(s==4)throw Error("Cyclic dependency between fields and/or facets");if(s&2)return s;t.status[l]=4;let r=t.computeSlot(t,t.config.dynamicSlots[l]);return t.status[l]=2|r}function $p(t,i){return i&1?t.config.staticValues[i>>1]:t.values[i>>1]}var O2=fe.define(),Ob=fe.define({combine:(t)=>t.some((i)=>i),static:!0}),R2=fe.define({combine:(t)=>t.length?t[0]:void 0,static:!0}),L2=fe.define(),B2=fe.define(),z2=fe.define(),H2=fe.define({combine:(t)=>t.length?t[0]:!1});class Fi{constructor(t,i){this.type=t,this.value=i}static define(){return new N2}}class N2{of(t){return new Fi(this,t)}}class _2{constructor(t){this.map=t}of(t){return new Ct(this,t)}}class Ct{constructor(t,i){this.type=t,this.value=i}map(t){let i=this.type.map(this.value,t);return i===void 0?void 0:i==this.value?this:new Ct(this.type,i)}is(t){return this.type==t}static define(t={}){return new _2(t.map||((i)=>i))}static mapEffects(t,i){if(!t.length)return t;let l=[];for(let s of t){let r=s.map(i);if(r)l.push(r)}return l}}Ct.reconfigure=Ct.define();Ct.appendConfig=Ct.define();class un{constructor(t,i,l,s,r,c){if(this.startState=t,this.changes=i,this.selection=l,this.effects=s,this.annotations=r,this.scrollIntoView=c,this._doc=null,this._state=null,l)D2(l,i.newLength);if(!r.some((h)=>h.type==un.time))this.annotations=r.concat(un.time.of(Date.now()))}static create(t,i,l,s,r,c){return new un(t,i,l,s,r,c)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){if(!this._state)this.startState.applyTransaction(this);return this._state}annotation(t){for(let i of this.annotations)if(i.type==t)return i.value;return}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let i=this.annotation(un.userEvent);return!!(i&&(i==t||i.length>t.length&&i.slice(0,t.length)==t&&i[t.length]=="."))}}un.time=Fi.define();un.userEvent=Fi.define();un.addToHistory=Fi.define();un.remote=Fi.define();function Xz(t,i){let l=[];for(let s=0,r=0;;){let c,h;if(s<t.length&&(r==i.length||i[r]>=t[s]))c=t[s++],h=t[s++];else if(r<i.length)c=i[r++],h=i[r++];else return l;if(!l.length||l[l.length-1]<c)l.push(c,h);else if(l[l.length-1]<h)l[l.length-1]=h}}function U2(t,i,l){var s;let r,c,h;if(l)r=i.changes,c=rn.empty(i.changes.length),h=t.changes.compose(i.changes);else r=i.changes.map(t.changes),c=t.changes.mapDesc(i.changes,!0),h=t.changes.compose(r);return{changes:h,selection:i.selection?i.selection.map(c):(s=t.selection)===null||s===void 0?void 0:s.map(r),effects:Ct.mapEffects(t.effects,r).concat(Ct.mapEffects(i.effects,c)),annotations:t.annotations.length?t.annotations.concat(i.annotations):i.annotations,scrollIntoView:t.scrollIntoView||i.scrollIntoView}}function Rb(t,i,l){let s=i.selection,r=Su(i.annotations);if(i.userEvent)r=r.concat(un.userEvent.of(i.userEvent));return{changes:i.changes instanceof rn?i.changes:rn.of(i.changes||[],l,t.facet(R2)),selection:s&&(s instanceof G?s:G.single(s.anchor,s.head)),effects:Su(i.effects),annotations:r,scrollIntoView:!!i.scrollIntoView}}function q2(t,i,l){let s=Rb(t,i.length?i[0]:{},t.doc.length);if(i.length&&i[0].filter===!1)l=!1;for(let c=1;c<i.length;c++){if(i[c].filter===!1)l=!1;let h=!!i[c].sequential;s=U2(s,Rb(t,i[c],h?s.changes.newLength:t.doc.length),h)}let r=un.create(t,s.changes,s.selection,s.effects,s.annotations,s.scrollIntoView);return Gz(l?Qz(r):r)}function Qz(t){let i=t.startState,l=!0;for(let r of i.facet(L2)){let c=r(t);if(c===!1){l=!1;break}if(Array.isArray(c))l=l===!0?c:Xz(l,c)}if(l!==!0){let r,c;if(l===!1)c=t.changes.invertedDesc,r=rn.empty(i.doc.length);else{let h=t.changes.filter(l);r=h.changes,c=h.filtered.mapDesc(h.changes).invertedDesc}t=un.create(i,r,t.selection&&t.selection.map(c),Ct.mapEffects(t.effects,c),t.annotations,t.scrollIntoView)}let s=i.facet(B2);for(let r=s.length-1;r>=0;r--){let c=s[r](t);if(c instanceof un)t=c;else if(Array.isArray(c)&&c.length==1&&c[0]instanceof un)t=c[0];else t=q2(i,Su(c),!1)}return t}function Gz(t){let i=t.startState,l=i.facet(z2),s=t;for(let r=l.length-1;r>=0;r--){let c=l[r](t);if(c&&Object.keys(c).length)s=U2(s,Rb(i,c,t.changes.newLength),!0)}return s==t?t:un.create(i,t.changes,t.selection,s.effects,s.annotations,s.scrollIntoView)}var Wz=[];function Su(t){return t==null?Wz:Array.isArray(t)?t:[t]}var xo=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(xo||(xo={})),Fz=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Lb;try{Lb=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(t){}function Jz(t){if(Lb)return Lb.test(t);for(let i=0;i<t.length;i++){let l=t[i];if(/\w/.test(l)||l>"€"&&(l.toUpperCase()!=l.toLowerCase()||Fz.test(l)))return!0}return!1}function Zz(t){return(i)=>{if(!/\S/.test(i))return xo.Space;if(Jz(i))return xo.Word;for(let l=0;l<t.length;l++)if(i.indexOf(t[l])>-1)return xo.Word;return xo.Other}}class qe{constructor(t,i,l,s,r,c){if(this.config=t,this.doc=i,this.selection=l,this.values=s,this.status=t.statusTemplate.slice(),this.computeSlot=r,c)c._state=this;for(let h=0;h<this.config.dynamicSlots.length;h++)Hf(this,h<<1);this.computeSlot=null}field(t,i=!0){let l=this.config.address[t.id];if(l==null){if(i)throw RangeError("Field is not present in this state");return}return Hf(this,l),$p(this,l)}update(...t){return q2(this,t,!0)}applyTransaction(t){let i=this.config,{base:l,compartments:s}=i;for(let h of t.effects)if(h.is(ku.reconfigure)){if(i)s=new Map,i.compartments.forEach((d,m)=>s.set(m,d)),i=null;s.set(h.value.compartment,h.value.extension)}else if(h.is(Ct.reconfigure))i=null,l=h.value;else if(h.is(Ct.appendConfig))i=null,l=Su(l).concat(h.value);let r;if(!i)i=jp.resolve(l,s,this),r=new qe(i,this.doc,this.selection,i.dynamicSlots.map(()=>null),(d,m)=>m.reconfigure(d,this),null).values;else r=t.startState.values.slice();let c=t.startState.facet(Ob)?t.newSelection:t.newSelection.asSingle();new qe(i,t.newDoc,c,r,(h,d)=>d.update(h,t),t)}replaceSelection(t){if(typeof t=="string")t=this.toText(t);return this.changeByRange((i)=>({changes:{from:i.from,to:i.to,insert:t},range:G.cursor(i.from+t.length)}))}changeByRange(t){let i=this.selection,l=t(i.ranges[0]),s=this.changes(l.changes),r=[l.range],c=Su(l.effects);for(let h=1;h<i.ranges.length;h++){let d=t(i.ranges[h]),m=this.changes(d.changes),y=m.map(s);for(let S=0;S<h;S++)r[S]=r[S].map(y);let b=s.mapDesc(m,!0);r.push(d.range.map(b)),s=s.compose(y),c=Ct.mapEffects(c,y).concat(Ct.mapEffects(Su(d.effects),b))}return{changes:s,selection:G.create(r,i.mainIndex),effects:c}}changes(t=[]){if(t instanceof rn)return t;return rn.of(t,this.doc.length,this.facet(qe.lineSeparator))}toText(t){return Ye.of(t.split(this.facet(qe.lineSeparator)||Tb))}sliceDoc(t=0,i=this.doc.length){return this.doc.sliceString(t,i,this.lineBreak)}facet(t){let i=this.config.address[t.id];if(i==null)return t.default;return Hf(this,i),$p(this,i)}toJSON(t){let i={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(t)for(let l in t){let s=t[l];if(s instanceof Co&&this.config.address[s.id]!=null)i[l]=s.spec.toJSON(this.field(t[l]),this)}return i}static fromJSON(t,i={},l){if(!t||typeof t.doc!="string")throw RangeError("Invalid JSON representation for EditorState");let s=[];if(l){for(let r in l)if(Object.prototype.hasOwnProperty.call(t,r)){let c=l[r],h=t[r];s.push(c.init((d)=>c.spec.fromJSON(h,d)))}}return qe.create({doc:t.doc,selection:G.fromJSON(t.selection),extensions:i.extensions?s.concat([i.extensions]):s})}static create(t={}){let i=jp.resolve(t.extensions||[],new Map),l=t.doc instanceof Ye?t.doc:Ye.of((t.doc||"").split(i.staticFacet(qe.lineSeparator)||Tb)),s=!t.selection?G.single(0):t.selection instanceof G?t.selection:G.single(t.selection.anchor,t.selection.head);if(D2(s,l.length),!i.staticFacet(Ob))s=s.asSingle();return new qe(i,l,s,i.dynamicSlots.map(()=>null),(r,c)=>c.create(r),null)}get tabSize(){return this.facet(qe.tabSize)}get lineBreak(){return this.facet(qe.lineSeparator)||`
219
- `}get readOnly(){return this.facet(H2)}phrase(t,...i){for(let l of this.facet(qe.phrases))if(Object.prototype.hasOwnProperty.call(l,t)){t=l[t];break}if(i.length)t=t.replace(/\$(\$|\d*)/g,(l,s)=>{if(s=="$")return"$";let r=+(s||1);return!r||r>i.length?l:i[r-1]});return t}languageDataAt(t,i,l=-1){let s=[];for(let r of this.facet(O2))for(let c of r(this,i,l))if(Object.prototype.hasOwnProperty.call(c,t))s.push(c[t]);return s}charCategorizer(t){let i=this.languageDataAt("wordChars",t);return Zz(i.length?i[0]:"")}wordAt(t){let{text:i,from:l,length:s}=this.doc.lineAt(t),r=this.charCategorizer(t),c=t-l,h=t-l;while(c>0){let d=Wi(i,c,!1);if(r(i.slice(d,c))!=xo.Word)break;c=d}while(h<s){let d=Wi(i,h);if(r(i.slice(h,d))!=xo.Word)break;h=d}return c==h?null:G.range(c+l,h+l)}}qe.allowMultipleSelections=Ob;qe.tabSize=fe.define({combine:(t)=>t.length?t[0]:4});qe.lineSeparator=R2;qe.readOnly=H2;qe.phrases=fe.define({compare(t,i){let l=Object.keys(t),s=Object.keys(i);return l.length==s.length&&l.every((r)=>t[r]==i[r])}});qe.languageData=O2;qe.changeFilter=L2;qe.transactionFilter=B2;qe.transactionExtender=z2;ku.reconfigure=Ct.define();class ko{eq(t){return this==t}range(t,i=t){return Nf.create(t,i,this)}}ko.prototype.startSide=ko.prototype.endSide=0;ko.prototype.point=!1;ko.prototype.mapMode=xn.TrackDel;function jb(t,i){return t==i||t.constructor==i.constructor&&t.eq(i)}class Nf{constructor(t,i,l){this.from=t,this.to=i,this.value=l}static create(t,i,l){return new Nf(t,i,l)}}function Bb(t,i){return t.from-i.from||t.value.startSide-i.value.startSide}class $b{constructor(t,i,l,s){this.from=t,this.to=i,this.value=l,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(t,i,l,s=0){let r=l?this.to:this.from;for(let c=s,h=r.length;;){if(c==h)return c;let d=c+h>>1,m=r[d]-t||(l?this.value[d].endSide:this.value[d].startSide)-i;if(d==c)return m>=0?c:h;if(m>=0)h=d;else c=d+1}}between(t,i,l,s){for(let r=this.findIndex(i,-1e9,!0),c=this.findIndex(l,1e9,!1,r);r<c;r++)if(s(this.from[r]+t,this.to[r]+t,this.value[r])===!1)return!1}map(t,i){let l=[],s=[],r=[],c=-1,h=-1;for(let d=0;d<this.value.length;d++){let m=this.value[d],y=this.from[d]+t,b=this.to[d]+t,S,w;if(y==b){let k=i.mapPos(y,m.startSide,m.mapMode);if(k==null)continue;if(S=w=k,m.startSide!=m.endSide){if(w=i.mapPos(y,m.endSide),w<S)continue}}else if(S=i.mapPos(y,m.startSide),w=i.mapPos(b,m.endSide),S>w||S==w&&m.startSide>0&&m.endSide<=0)continue;if((w-S||m.endSide-m.startSide)<0)continue;if(c<0)c=S;if(m.point)h=Math.max(h,w-S);l.push(m),s.push(S-c),r.push(w-c)}return{mapped:l.length?new $b(s,r,l,h):null,pos:c}}}class We{constructor(t,i,l,s){this.chunkPos=t,this.chunk=i,this.nextLayer=l,this.maxPoint=s}static create(t,i,l,s){return new We(t,i,l,s)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let i of this.chunk)t+=i.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:i=[],sort:l=!1,filterFrom:s=0,filterTo:r=this.length}=t,c=t.filter;if(i.length==0&&!c)return this;if(l)i=i.slice().sort(Bb);if(this.isEmpty)return i.length?We.of(i):this;let h=new Pb(this,null,-1).goto(0),d=0,m=[],y=new Za;while(h.value||d<i.length)if(d<i.length&&(h.from-i[d].from||h.startSide-i[d].value.startSide)>=0){let b=i[d++];if(!y.addInner(b.from,b.to,b.value))m.push(b)}else if(h.rangeIndex==1&&h.chunkIndex<this.chunk.length&&(d==i.length||this.chunkEnd(h.chunkIndex)<i[d].from)&&(!c||s>this.chunkEnd(h.chunkIndex)||r<this.chunkPos[h.chunkIndex])&&y.addChunk(this.chunkPos[h.chunkIndex],this.chunk[h.chunkIndex]))h.nextChunk();else{if(!c||s>h.to||r<h.from||c(h.from,h.to,h.value)){if(!y.addInner(h.from,h.to,h.value))m.push(Nf.create(h.from,h.to,h.value))}h.next()}return y.finishInner(this.nextLayer.isEmpty&&!m.length?We.empty:this.nextLayer.update({add:m,filter:c,filterFrom:s,filterTo:r}))}map(t){if(t.empty||this.isEmpty)return this;let i=[],l=[],s=-1;for(let c=0;c<this.chunk.length;c++){let h=this.chunkPos[c],d=this.chunk[c],m=t.touchesRange(h,h+d.length);if(m===!1)s=Math.max(s,d.maxPoint),i.push(d),l.push(t.mapPos(h));else if(m===!0){let{mapped:y,pos:b}=d.map(h,t);if(y)s=Math.max(s,y.maxPoint),i.push(y),l.push(b)}}let r=this.nextLayer.map(t);return i.length==0?r:new We(l,i,r||We.empty,s)}between(t,i,l){if(this.isEmpty)return;for(let s=0;s<this.chunk.length;s++){let r=this.chunkPos[s],c=this.chunk[s];if(i>=r&&t<=r+c.length&&c.between(r,t-r,i-r,l)===!1)return}this.nextLayer.between(t,i,l)}iter(t=0){return _f.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,i=0){return _f.from(t).goto(i)}static compare(t,i,l,s,r=-1){let c=t.filter((b)=>b.maxPoint>0||!b.isEmpty&&b.maxPoint>=r),h=i.filter((b)=>b.maxPoint>0||!b.isEmpty&&b.maxPoint>=r),d=C2(c,h,l),m=new bu(c,d,r),y=new bu(h,d,r);if(l.iterGaps((b,S,w)=>A2(m,b,y,S,w,s)),l.empty&&l.length==0)A2(m,0,y,0,0,s)}static eq(t,i,l=0,s){if(s==null)s=999999999;let r=t.filter((y)=>!y.isEmpty&&i.indexOf(y)<0),c=i.filter((y)=>!y.isEmpty&&t.indexOf(y)<0);if(r.length!=c.length)return!1;if(!r.length)return!0;let h=C2(r,c),d=new bu(r,h,0).goto(l),m=new bu(c,h,0).goto(l);for(;;){if(d.to!=m.to||!zb(d.active,m.active)||d.point&&(!m.point||!jb(d.point,m.point)))return!1;if(d.to>s)return!0;d.next(),m.next()}}static spans(t,i,l,s,r=-1){let c=new bu(t,null,r).goto(i),h=i,d=c.openStart;for(;;){let m=Math.min(c.to,l);if(c.point){let y=c.activeForPoint(c.to),b=c.pointFrom<i?y.length+1:c.point.startSide<0?y.length:Math.min(y.length,d);s.point(h,m,c.point,y,b,c.pointRank),d=Math.min(c.openEnd(m),y.length)}else if(m>h)s.span(h,m,c.active,d),d=c.openEnd(m);if(c.to>l)return d+(c.point&&c.to>l?1:0);h=c.to,c.next()}}static of(t,i=!1){let l=new Za;for(let s of t instanceof Nf?[t]:i?Kz(t):t)l.add(s.from,s.to,s.value);return l.finish()}static join(t){if(!t.length)return We.empty;let i=t[t.length-1];for(let l=t.length-2;l>=0;l--)for(let s=t[l];s!=We.empty;s=s.nextLayer)i=new We(s.chunkPos,s.chunk,i,Math.max(s.maxPoint,i.maxPoint));return i}}We.empty=new We([],[],null,-1);function Kz(t){if(t.length>1)for(let i=t[0],l=1;l<t.length;l++){let s=t[l];if(Bb(i,s)>0)return t.slice().sort(Bb);i=s}return t}We.empty.nextLayer=We.empty;class Za{finishChunk(t){if(this.chunks.push(new $b(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t)this.from=[],this.to=[],this.value=[]}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(t,i,l){if(!this.addInner(t,i,l))(this.nextLayer||(this.nextLayer=new Za)).add(t,i,l)}addInner(t,i,l){let s=t-this.lastTo||l.startSide-this.last.endSide;if(s<=0&&(t-this.lastFrom||l.startSide-this.last.startSide)<0)throw Error("Ranges must be added sorted by `from` position and `startSide`");if(s<0)return!1;if(this.from.length==250)this.finishChunk(!0);if(this.chunkStart<0)this.chunkStart=t;if(this.from.push(t-this.chunkStart),this.to.push(i-this.chunkStart),this.last=l,this.lastFrom=t,this.lastTo=i,this.value.push(l),l.point)this.maxPoint=Math.max(this.maxPoint,i-t);return!0}addChunk(t,i){if((t-this.lastTo||i.value[0].startSide-this.last.endSide)<0)return!1;if(this.from.length)this.finishChunk(!0);this.setMaxPoint=Math.max(this.setMaxPoint,i.maxPoint),this.chunks.push(i),this.chunkPos.push(t);let l=i.value.length-1;return this.last=i.value[l],this.lastFrom=i.from[l]+t,this.lastTo=i.to[l]+t,!0}finish(){return this.finishInner(We.empty)}finishInner(t){if(this.from.length)this.finishChunk(!1);if(this.chunks.length==0)return t;let i=We.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,i}}function C2(t,i,l){let s=new Map;for(let c of t)for(let h=0;h<c.chunk.length;h++)if(c.chunk[h].maxPoint<=0)s.set(c.chunk[h],c.chunkPos[h]);let r=new Set;for(let c of i)for(let h=0;h<c.chunk.length;h++){let d=s.get(c.chunk[h]);if(d!=null&&(l?l.mapPos(d):d)==c.chunkPos[h]&&!(l===null||l===void 0?void 0:l.touchesRange(d,d+c.chunk[h].length)))r.add(c.chunk[h])}return r}class Pb{constructor(t,i,l,s=0){this.layer=t,this.skip=i,this.minPoint=l,this.rank=s}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(t,i=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(t,i,!1),this}gotoInner(t,i,l){while(this.chunkIndex<this.layer.chunk.length){let s=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(s)||this.layer.chunkEnd(this.chunkIndex)<t||s.maxPoint<this.minPoint))break;this.chunkIndex++,l=!1}if(this.chunkIndex<this.layer.chunk.length){let s=this.layer.chunk[this.chunkIndex].findIndex(t-this.layer.chunkPos[this.chunkIndex],i,!0);if(!l||this.rangeIndex<s)this.setRangeIndex(s)}this.next()}forward(t,i){if((this.to-t||this.endSide-i)<0)this.gotoInner(t,i,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let t=this.layer.chunkPos[this.chunkIndex],i=this.layer.chunk[this.chunkIndex],l=t+i.from[this.rangeIndex];if(this.from=l,this.to=t+i.to[this.rangeIndex],this.value=i.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)while(this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]))this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=t}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(t){return this.from-t.from||this.startSide-t.startSide||this.rank-t.rank||this.to-t.to||this.endSide-t.endSide}}class _f{constructor(t){this.heap=t}static from(t,i=null,l=-1){let s=[];for(let r=0;r<t.length;r++)for(let c=t[r];!c.isEmpty;c=c.nextLayer)if(c.maxPoint>=l)s.push(new Pb(c,i,l,r));return s.length==1?s[0]:new _f(s)}get startSide(){return this.value?this.value.startSide:0}goto(t,i=-1e9){for(let l of this.heap)l.goto(t,i);for(let l=this.heap.length>>1;l>=0;l--)Ab(this.heap,l);return this.next(),this}forward(t,i){for(let l of this.heap)l.forward(t,i);for(let l=this.heap.length>>1;l>=0;l--)Ab(this.heap,l);if((this.to-t||this.value.endSide-i)<0)this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];if(this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value)t.next();Ab(this.heap,0)}}}function Ab(t,i){for(let l=t[i];;){let s=(i<<1)+1;if(s>=t.length)break;let r=t[s];if(s+1<t.length&&r.compare(t[s+1])>=0)r=t[s+1],s++;if(l.compare(r)<0)break;t[s]=l,t[i]=r,i=s}}class bu{constructor(t,i,l){this.minPoint=l,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=_f.from(t,i,l)}goto(t,i=-1e9){return this.cursor.goto(t,i),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=i,this.openStart=-1,this.next(),this}forward(t,i){while(this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-i)<0)this.removeActive(this.minActive);this.cursor.forward(t,i)}removeActive(t){Up(this.active,t),Up(this.activeTo,t),Up(this.activeRank,t),this.minActive=T2(this.active,this.activeTo)}addActive(t){let i=0,{value:l,to:s,rank:r}=this.cursor;while(i<this.activeRank.length&&(r-this.activeRank[i]||s-this.activeTo[i])>0)i++;if(qp(this.active,i,l),qp(this.activeTo,i,s),qp(this.activeRank,i,r),t)qp(t,i,this.cursor.from);this.minActive=T2(this.active,this.activeTo)}next(){let t=this.to,i=this.point;this.point=null;let l=this.openStart<0?[]:null;for(;;){let s=this.minActive;if(s>-1&&(this.activeTo[s]-this.cursor.from||this.active[s].endSide-this.cursor.startSide)<0){if(this.activeTo[s]>t){this.to=this.activeTo[s],this.endSide=this.active[s].endSide;break}if(this.removeActive(s),l)Up(l,s)}else if(!this.cursor.value){this.to=this.endSide=1e9;break}else if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let r=this.cursor.value;if(!r.point)this.addActive(l),this.cursor.next();else if(i&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=r,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=r.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}}if(l){this.openStart=0;for(let s=l.length-1;s>=0&&l[s]<t;s--)this.openStart++}}activeForPoint(t){if(!this.active.length)return this.active;let i=[];for(let l=this.active.length-1;l>=0;l--){if(this.activeRank[l]<this.pointRank)break;if(this.activeTo[l]>t||this.activeTo[l]==t&&this.active[l].endSide>=this.point.endSide)i.push(this.active[l])}return i.reverse()}openEnd(t){let i=0;for(let l=this.activeTo.length-1;l>=0&&this.activeTo[l]>t;l--)i++;return i}}function A2(t,i,l,s,r,c){t.goto(i),l.goto(s);let h=s+r,d=s,m=s-i,y=!!c.boundChange;for(let b=!1;;){let S=t.to+m-l.to,w=S||t.endSide-l.endSide,k=w<0?t.to+m:l.to,E=Math.min(k,h);if(t.point||l.point){if(!(t.point&&l.point&&jb(t.point,l.point)&&zb(t.activeForPoint(t.to),l.activeForPoint(l.to))))c.comparePoint(d,E,t.point,l.point);b=!1}else{if(b)c.boundChange(d);if(E>d&&!zb(t.active,l.active))c.compareRange(d,E,t.active,l.active);if(y&&E<h&&(S||t.openEnd(k)!=l.openEnd(k)))b=!0}if(k>h)break;if(d=k,w<=0)t.next();if(w>=0)l.next()}}function zb(t,i){if(t.length!=i.length)return!1;for(let l=0;l<t.length;l++)if(t[l]!=i[l]&&!jb(t[l],i[l]))return!1;return!0}function Up(t,i){for(let l=i,s=t.length-1;l<s;l++)t[l]=t[l+1];t.pop()}function qp(t,i,l){for(let s=t.length-1;s>=i;s--)t[s+1]=t[s];t[i]=l}function T2(t,i){let l=-1,s=1e9;for(let r=0;r<i.length;r++)if((i[r]-s||t[r].endSide-t[l].endSide)<0)l=r,s=i[r];return l}function Zs(t,i,l=t.length){let s=0;for(let r=0;r<l&&r<t.length;)if(t.charCodeAt(r)==9)s+=i-s%i,r++;else s++,r=Wi(t,r);return s}function V2(t,i,l,s){for(let r=0,c=0;;){if(c>=i)return r;if(r==t.length)break;c+=t.charCodeAt(r)==9?l-c%l:1,r=Wi(t,r)}return s===!0?-1:t.length}var I2=typeof Symbol>"u"?"__"+"ͼ":Symbol.for("ͼ"),Yb=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),j2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Ao{constructor(t,i){this.rules=[];let{finish:l}=i||{};function s(c){return/^@/.test(c)?[c]:c.split(/,\s*/)}function r(c,h,d,m){let y=[],b=/^@(\w+)\b/.exec(c[0]),S=b&&b[1]=="keyframes";if(b&&h==null)return d.push(c[0]+";");for(let w in h){let k=h[w];if(/&/.test(w))r(w.split(/,\s*/).map((E)=>c.map((R)=>E.replace(/&/,R))).reduce((E,R)=>E.concat(R)),k,d);else if(k&&typeof k=="object"){if(!b)throw RangeError("The value of a property ("+w+") should be a primitive value.");r(s(w),k,y,S)}else if(k!=null)y.push(w.replace(/_.*/,"").replace(/[A-Z]/g,(E)=>"-"+E.toLowerCase())+": "+k+";")}if(y.length||S)d.push((l&&!b&&!m?c.map(l):c).join(", ")+" {"+y.join(" ")+"}")}for(let c in t)r(s(c),t[c],this.rules)}getRules(){return this.rules.join(`
220
- `)}static newName(){let t=j2[I2]||1;return j2[I2]=t+1,"ͼ"+t.toString(36)}static mount(t,i,l){let s=t[Yb],r=l&&l.nonce;if(!s)s=new P2(t,r);else if(r)s.setNonce(r);s.mount(Array.isArray(i)?i:[i],t)}}var $2=new Map;class P2{constructor(t,i){let l=t.ownerDocument||t,s=l.defaultView;if(!t.head&&t.adoptedStyleSheets&&s.CSSStyleSheet){let r=$2.get(l);if(r)return t[Yb]=r;this.sheet=new s.CSSStyleSheet,$2.set(l,this)}else if(this.styleTag=l.createElement("style"),i)this.styleTag.setAttribute("nonce",i);this.modules=[],t[Yb]=this}mount(t,i){let l=this.sheet,s=0,r=0;for(let c=0;c<t.length;c++){let h=t[c],d=this.modules.indexOf(h);if(d<r&&d>-1)this.modules.splice(d,1),r--,d=-1;if(d==-1){if(this.modules.splice(r++,0,h),l)for(let m=0;m<h.rules.length;m++)l.insertRule(h.rules[m],s++)}else{while(r<d)s+=this.modules[r++].rules.length;s+=h.rules.length,r++}}if(l){if(i.adoptedStyleSheets.indexOf(this.sheet)<0)i.adoptedStyleSheets=[this.sheet,...i.adoptedStyleSheets]}else{let c="";for(let d=0;d<this.modules.length;d++)c+=this.modules[d].getRules()+`
221
- `;this.styleTag.textContent=c;let h=i.head||i;if(this.styleTag.parentNode!=h)h.insertBefore(this.styleTag,h.firstChild)}}setNonce(t){if(this.styleTag&&this.styleTag.getAttribute("nonce")!=t)this.styleTag.setAttribute("nonce",t)}}var Jl={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:"'"},Cu={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},e3=typeof navigator<"u"&&/Mac/.test(navigator.platform),t3=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(Ht=0;Ht<10;Ht++)Jl[48+Ht]=Jl[96+Ht]=String(Ht);var Ht;for(Ht=1;Ht<=24;Ht++)Jl[Ht+111]="F"+Ht;var Ht;for(Ht=65;Ht<=90;Ht++)Jl[Ht]=String.fromCharCode(Ht+32),Cu[Ht]=String.fromCharCode(Ht);var Ht;for(Uf in Jl)if(!Cu.hasOwnProperty(Uf))Cu[Uf]=Jl[Uf];var Uf;function Y2(t){var i=e3&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||t3&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",l=!i&&t.key||(t.shiftKey?Cu:Jl)[t.keyCode]||t.key||"Unidentified";if(l=="Esc")l="Escape";if(l=="Del")l="Delete";if(l=="Left")l="ArrowLeft";if(l=="Up")l="ArrowUp";if(l=="Right")l="ArrowRight";if(l=="Down")l="ArrowDown";return l}var $n=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},Jb=typeof document<"u"?document:{documentElement:{style:{}}},Zb=/Edge\/(\d+)/.exec($n.userAgent),ST=/MSIE \d/.test($n.userAgent),Kb=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec($n.userAgent),cm=!!(ST||Kb||Zb),X2=!cm&&/gecko\/(\d+)/i.test($n.userAgent),Xb=!cm&&/Chrome\/(\d+)/.exec($n.userAgent),Q2="webkitFontSmoothing"in Jb.documentElement.style,ev=!cm&&/Apple Computer/.test($n.vendor),G2=ev&&(/Mobile\/\w+/.test($n.userAgent)||$n.maxTouchPoints>2),K={mac:G2||/Mac/.test($n.platform),windows:/Win/.test($n.platform),linux:/Linux|X11/.test($n.platform),ie:cm,ie_version:ST?Jb.documentMode||6:Kb?+Kb[1]:Zb?+Zb[1]:0,gecko:X2,gecko_version:X2?+(/Firefox\/(\d+)/.exec($n.userAgent)||[0,0])[1]:0,chrome:!!Xb,chrome_version:Xb?+Xb[1]:0,ios:G2,android:/Android\b/.test($n.userAgent),webkit:Q2,webkit_version:Q2?+(/\bAppleWebKit\/(\d+)/.exec($n.userAgent)||[0,0])[1]:0,safari:ev,safari_version:ev?+(/\bVersion\/(\d+(\.\d+)?)/.exec($n.userAgent)||[0,0])[1]:0,tabSize:Jb.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function gv(t,i){for(let l in t)if(l=="class"&&i.class)i.class+=" "+t.class;else if(l=="style"&&i.style)i.style+=";"+t.style;else i[l]=t[l];return i}var nm=Object.create(null);function yv(t,i,l){if(t==i)return!0;if(!t)t=nm;if(!i)i=nm;let s=Object.keys(t),r=Object.keys(i);if(s.length-(l&&s.indexOf(l)>-1?1:0)!=r.length-(l&&r.indexOf(l)>-1?1:0))return!1;for(let c of s)if(c!=l&&(r.indexOf(c)==-1||t[c]!==i[c]))return!1;return!0}function n3(t,i){for(let l=t.attributes.length-1;l>=0;l--){let s=t.attributes[l].name;if(i[s]==null)t.removeAttribute(s)}for(let l in i){let s=i[l];if(l=="style")t.style.cssText=s;else if(t.getAttribute(l)!=s)t.setAttribute(l,s)}}function W2(t,i,l){let s=!1;if(i){for(let r in i)if(!(l&&(r in l)))if(s=!0,r=="style")t.style.cssText="";else t.removeAttribute(r)}if(l){for(let r in l)if(!(i&&i[r]==l[r]))if(s=!0,r=="style")t.style.cssText=l[r];else t.setAttribute(r,l[r])}return s}function i3(t){let i=Object.create(null);for(let l=0;l<t.attributes.length;l++){let s=t.attributes[l];i[s.name]=s.value}return i}class na{eq(t){return!1}updateDOM(t,i,l){return!1}compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(t){return!0}coordsAt(t,i,l){return null}get isHidden(){return!1}get editable(){return!1}destroy(t){}}var Ki=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(Ki||(Ki={}));class vt extends ko{constructor(t,i,l,s){super();this.startSide=t,this.endSide=i,this.widget=l,this.spec=s}get heightRelevant(){return!1}static mark(t){return new Wf(t)}static widget(t){let i=Math.max(-1e4,Math.min(1e4,t.side||0)),l=!!t.block;return i+=l&&!t.inlineOrder?i>0?300000000:-400000000:i>0?1e8:-1e8,new tr(t,i,i,l,t.widget||null,!1)}static replace(t){let i=!!t.block,l,s;if(t.isBlockGap)l=-500000000,s=400000000;else{let{start:r,end:c}=wT(t,i);l=(r?i?-300000000:-1:500000000)-1,s=(c?i?200000000:1:-600000000)+1}return new tr(t,l,s,i,t.widget||null,!0)}static line(t){return new Ff(t)}static set(t,i=!1){return We.of(t,i)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}vt.none=We.empty;class Wf extends vt{constructor(t){let{start:i,end:l}=wT(t);super(i?-1:500000000,l?1:-600000000,null,t);this.tagName=t.tagName||"span",this.attrs=t.class&&t.attributes?gv(t.attributes,{class:t.class}):t.class?{class:t.class}:t.attributes||nm}eq(t){return this==t||t instanceof Wf&&this.tagName==t.tagName&&yv(this.attrs,t.attrs)}range(t,i=t){if(t>=i)throw RangeError("Mark decorations may not be empty");return super.range(t,i)}}Wf.prototype.point=!1;class Ff extends vt{constructor(t){super(-200000000,-200000000,null,t)}eq(t){return t instanceof Ff&&this.spec.class==t.spec.class&&yv(this.spec.attributes,t.spec.attributes)}range(t,i=t){if(i!=t)throw RangeError("Line decoration ranges must be zero-length");return super.range(t,i)}}Ff.prototype.mapMode=xn.TrackBefore;Ff.prototype.point=!0;class tr extends vt{constructor(t,i,l,s,r,c){super(i,l,r,t);this.block=s,this.isReplace=c,this.mapMode=!s?xn.TrackDel:i<=0?xn.TrackBefore:xn.TrackAfter}get type(){return this.startSide!=this.endSide?Ki.WidgetRange:this.startSide<=0?Ki.WidgetBefore:Ki.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof tr&&o3(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(t,i=t){if(this.isReplace&&(t>i||t==i&&this.startSide>0&&this.endSide<=0))throw RangeError("Invalid range for replacement decoration");if(!this.isReplace&&i!=t)throw RangeError("Widget decorations can only have zero-length ranges");return super.range(t,i)}}tr.prototype.point=!0;function wT(t,i=!1){let{inclusiveStart:l,inclusiveEnd:s}=t;if(l==null)l=t.inclusive;if(s==null)s=t.inclusive;return{start:l!==null&&l!==void 0?l:i,end:s!==null&&s!==void 0?s:i}}function o3(t,i){return t==i||!!(t&&i&&t.compare(i))}function Eu(t,i,l,s=0){let r=l.length-1;if(r>=0&&l[r]+s>=t)l[r]=Math.max(l[r],i);else l.push(t,i)}class Yf extends ko{constructor(t,i,l){super();this.tagName=t,this.attributes=i,this.rank=l}eq(t){return t==this||t instanceof Yf&&this.tagName==t.tagName&&yv(this.attributes,t.attributes)}static create(t){return new Yf(t.tagName,t.attributes||nm,t.rank==null?50:Math.max(0,Math.min(t.rank,100)))}static set(t,i=!1){return We.of(t,i)}}Yf.prototype.startSide=Yf.prototype.endSide=-1;function Xf(t){let i;if(t.nodeType==11)i=t.getSelection?t:t.ownerDocument;else i=t;return i.getSelection()}function tv(t,i){return i?t==i||t.contains(i.nodeType!=1?i.parentNode:i):!1}function jf(t,i){if(!i.anchorNode)return!1;try{return tv(t,i.anchorNode)}catch(l){return!1}}function Jp(t){if(t.nodeType==3)return Qf(t,0,t.nodeValue.length).getClientRects();else if(t.nodeType==1)return t.getClientRects();else return[]}function $f(t,i,l,s){return l?F2(t,i,l,s,-1)||F2(t,i,l,s,1):!1}function ea(t){for(var i=0;;i++)if(t=t.previousSibling,!t)return i}function im(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function F2(t,i,l,s,r){for(;;){if(t==l&&i==s)return!0;if(i==(r<0?0:es(t))){if(t.nodeName=="DIV")return!1;let c=t.parentNode;if(!c||c.nodeType!=1)return!1;i=ea(t)+(r<0?0:1),t=c}else if(t.nodeType==1){if(t=t.childNodes[i+(r<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;i=r<0?es(t):0}else return!1}}function es(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function om(t,i){let{left:l,right:s}=t;if(l==s)return t;let r=i?l:s;return{left:r,right:r,top:t.top,bottom:t.bottom}}function l3(t){let i=t.visualViewport;if(i)return{left:0,right:i.width,top:0,bottom:i.height};return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function xT(t,i){let l=i.width/t.offsetWidth,s=i.height/t.offsetHeight;if(l>0.995&&l<1.005||!isFinite(l)||Math.abs(i.width-t.offsetWidth)<1)l=1;if(s>0.995&&s<1.005||!isFinite(s)||Math.abs(i.height-t.offsetHeight)<1)s=1;return{scaleX:l,scaleY:s}}function s3(t,i,l,s,r,c,h,d){let m=t.ownerDocument,y=m.defaultView||window;for(let b=t,S=!1;b&&!S;)if(b.nodeType==1){let w,k=b==m.body,E=1,R=1;if(k)w=l3(y);else{if(/^(fixed|sticky)$/.test(getComputedStyle(b).position))S=!0;if(b.scrollHeight<=b.clientHeight&&b.scrollWidth<=b.clientWidth){b=b.assignedSlot||b.parentNode;continue}let q=b.getBoundingClientRect();({scaleX:E,scaleY:R}=xT(b,q)),w={left:q.left,right:q.left+b.clientWidth*E,top:q.top,bottom:q.top+b.clientHeight*R}}let L=0,N=0;if(r=="nearest"){if(i.top<w.top+h){if(N=i.top-(w.top+h),l>0&&i.bottom>w.bottom+N)N=i.bottom-w.bottom+h}else if(i.bottom>w.bottom-h){if(N=i.bottom-w.bottom+h,l<0&&i.top-N<w.top)N=i.top-(w.top+h)}}else{let q=i.bottom-i.top,J=w.bottom-w.top;N=(r=="center"&&q<=J?i.top+q/2-J/2:r=="start"||r=="center"&&l<0?i.top-h:i.bottom-J+h)-w.top}if(s=="nearest"){if(i.left<w.left+c){if(L=i.left-(w.left+c),l>0&&i.right>w.right+L)L=i.right-w.right+c}else if(i.right>w.right-c){if(L=i.right-w.right+c,l<0&&i.left<w.left+L)L=i.left-(w.left+c)}}else L=(s=="center"?i.left+(i.right-i.left)/2-(w.right-w.left)/2:s=="start"==d?i.left-c:i.right-(w.right-w.left)+c)-w.left;if(L||N)if(k)y.scrollBy(L,N);else{let q=0,J=0;if(N){let ae=b.scrollTop;b.scrollTop+=N/R,J=(b.scrollTop-ae)*R}if(L){let ae=b.scrollLeft;b.scrollLeft+=L/E,q=(b.scrollLeft-ae)*E}if(i={left:i.left-q,top:i.top-J,right:i.right-q,bottom:i.bottom-J},q&&Math.abs(q-L)<1)s="nearest";if(J&&Math.abs(J-N)<1)r="nearest"}if(k)break;if(i.top<w.top||i.bottom>w.bottom||i.left<w.left||i.right>w.right)i={left:Math.max(i.left,w.left),right:Math.min(i.right,w.right),top:Math.max(i.top,w.top),bottom:Math.min(i.bottom,w.bottom)};b=b.assignedSlot||b.parentNode}else if(b.nodeType==11)b=b.host;else break}function kT(t,i=!0){let l=t.ownerDocument,s=null,r=null;for(let c=t.parentNode;c;)if(c==l.body||(!i||s)&&r)break;else if(c.nodeType==1){if(!r&&c.scrollHeight>c.clientHeight)r=c;if(i&&!s&&c.scrollWidth>c.clientWidth)s=c;c=c.assignedSlot||c.parentNode}else if(c.nodeType==11)c=c.host;else break;return{x:s,y:r}}class CT{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(t){return this.anchorNode==t.anchorNode&&this.anchorOffset==t.anchorOffset&&this.focusNode==t.focusNode&&this.focusOffset==t.focusOffset}setRange(t){let{anchorNode:i,focusNode:l}=t;this.set(i,Math.min(t.anchorOffset,i?es(i):0),l,Math.min(t.focusOffset,l?es(l):0))}set(t,i,l,s){this.anchorNode=t,this.anchorOffset=i,this.focusNode=l,this.focusOffset=s}}var Ka=null;if(K.safari&&K.safari_version>=26)Ka=!1;function AT(t){if(t.setActive)return t.setActive();if(Ka)return t.focus(Ka);let i=[];for(let l=t;l;l=l.parentNode)if(i.push(l,l.scrollTop,l.scrollLeft),l==l.ownerDocument)break;if(t.focus(Ka==null?{get preventScroll(){return Ka={preventScroll:!0},!0}}:void 0),!Ka){Ka=!1;for(let l=0;l<i.length;){let s=i[l++],r=i[l++],c=i[l++];if(s.scrollTop!=r)s.scrollTop=r;if(s.scrollLeft!=c)s.scrollLeft=c}}}var J2;function Qf(t,i,l=i){let s=J2||(J2=document.createRange());return s.setEnd(t,l),s.setStart(t,i),s}function Mu(t,i,l,s){let r={key:i,code:i,keyCode:l,which:l,cancelable:!0};if(s)({altKey:r.altKey,ctrlKey:r.ctrlKey,shiftKey:r.shiftKey,metaKey:r.metaKey}=s);let c=new KeyboardEvent("keydown",r);c.synthetic=!0,t.dispatchEvent(c);let h=new KeyboardEvent("keyup",r);return h.synthetic=!0,t.dispatchEvent(h),c.defaultPrevented||h.defaultPrevented}function a3(t){while(t){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function r3(t,i){let{focusNode:l,focusOffset:s}=i;if(!l||i.anchorNode!=l||i.anchorOffset!=s)return!1;s=Math.min(s,es(l));for(;;)if(s){if(l.nodeType!=1)return!1;let r=l.childNodes[s-1];if(r.contentEditable=="false")s--;else l=r,s=es(l)}else if(l==t)return!0;else s=ea(l),l=l.parentNode}function TT(t){if(t instanceof Window)return t.pageYOffset>Math.max(0,t.document.documentElement.scrollHeight-t.innerHeight-4);return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function ET(t,i){for(let l=t,s=i;;)if(l.nodeType==3&&s>0)return{node:l,offset:s};else if(l.nodeType==1&&s>0){if(l.contentEditable=="false")return null;l=l.childNodes[s-1],s=es(l)}else if(l.parentNode&&!im(l))s=ea(l),l=l.parentNode;else return null}function MT(t,i){for(let l=t,s=i;;)if(l.nodeType==3&&s<l.nodeValue.length)return{node:l,offset:s};else if(l.nodeType==1&&s<l.childNodes.length){if(l.contentEditable=="false")return null;l=l.childNodes[s],s=0}else if(l.parentNode&&!im(l))s=ea(l)+1,l=l.parentNode;else return null}class Mo{constructor(t,i,l=!0){this.node=t,this.offset=i,this.precise=l}static before(t,i){return new Mo(t.parentNode,ea(t),i)}static after(t,i){return new Mo(t.parentNode,ea(t)+1,i)}}var Qt=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(Qt||(Qt={})),nr=Qt.LTR,bv=Qt.RTL;function DT(t){let i=[];for(let l=0;l<t.length;l++)i.push(1<<+t[l]);return i}var u3=DT("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),c3=DT("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),nv=Object.create(null),dl=[];for(let t of["()","[]","{}"]){let i=t.charCodeAt(0),l=t.charCodeAt(1);nv[i]=l,nv[l]=-i}function OT(t){return t<=247?u3[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?c3[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}var f3=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Do{get dir(){return this.level%2?bv:nr}constructor(t,i,l){this.from=t,this.to=i,this.level=l}side(t,i){return this.dir==i==t?this.to:this.from}forward(t,i){return t==(this.dir==i)}static find(t,i,l,s){let r=-1;for(let c=0;c<t.length;c++){let h=t[c];if(h.from<=i&&h.to>=i){if(h.level==l)return c;if(r<0||(s!=0?s<0?h.from<i:h.to>i:t[r].level>h.level))r=c}}if(r<0)throw RangeError("Index out of range");return r}}function RT(t,i){if(t.length!=i.length)return!1;for(let l=0;l<t.length;l++){let s=t[l],r=i[l];if(s.from!=r.from||s.to!=r.to||s.direction!=r.direction||!RT(s.inner,r.inner))return!1}return!0}var dt=[];function h3(t,i,l,s,r){for(let c=0;c<=s.length;c++){let h=c?s[c-1].to:i,d=c<s.length?s[c].from:l,m=c?256:r;for(let y=h,b=m,S=m;y<d;y++){let w=OT(t.charCodeAt(y));if(w==512)w=b;else if(w==8&&S==4)w=16;if(dt[y]=w==4?2:w,w&7)S=w;b=w}for(let y=h,b=m,S=m;y<d;y++){let w=dt[y];if(w==128)if(y<d-1&&b==dt[y+1]&&b&24)w=dt[y]=b;else dt[y]=256;else if(w==64){let k=y+1;while(k<d&&dt[k]==64)k++;let E=y&&b==8||k<l&&dt[k]==8?S==1?1:8:256;for(let R=y;R<k;R++)dt[R]=E;y=k-1}else if(w==8&&S==1)dt[y]=1;if(b=w,w&7)S=w}}}function d3(t,i,l,s,r){let c=r==1?2:1;for(let h=0,d=0,m=0;h<=s.length;h++){let y=h?s[h-1].to:i,b=h<s.length?s[h].from:l;for(let S=y,w,k,E;S<b;S++)if(k=nv[w=t.charCodeAt(S)])if(k<0){for(let R=d-3;R>=0;R-=3)if(dl[R+1]==-k){let L=dl[R+2],N=L&2?r:!(L&4)?0:L&1?c:r;if(N)dt[S]=dt[dl[R]]=N;d=R;break}}else if(dl.length==189)break;else dl[d++]=S,dl[d++]=w,dl[d++]=m;else if((E=dt[S])==2||E==1){let R=E==r;m=R?0:1;for(let L=d-3;L>=0;L-=3){let N=dl[L+2];if(N&2)break;if(R)dl[L+2]|=2;else{if(N&4)break;dl[L+2]|=4}}}}}function p3(t,i,l,s){for(let r=0,c=s;r<=l.length;r++){let h=r?l[r-1].to:t,d=r<l.length?l[r].from:i;for(let m=h;m<d;){let y=dt[m];if(y==256){let b=m+1;for(;;)if(b==d){if(r==l.length)break;b=l[r++].to,d=r<l.length?l[r].from:i}else if(dt[b]==256)b++;else break;let S=c==1,w=(b<i?dt[b]:s)==1,k=S==w?S?1:2:s;for(let E=b,R=r,L=R?l[R-1].to:t;E>m;){if(E==L)E=l[--R].from,L=R?l[R-1].to:t;dt[--E]=k}m=b}else c=y,m++}}}function iv(t,i,l,s,r,c,h){let d=s%2?2:1;if(s%2==r%2)for(let m=i,y=0;m<l;){let b=!0,S=!1;if(y==c.length||m<c[y].from){let R=dt[m];if(R!=d)b=!1,S=R==16}let w=!b&&d==1?[]:null,k=b?s:s+1,E=m;e:for(;;)if(y<c.length&&E==c[y].from){if(S)break e;let R=c[y];if(!b)for(let L=R.to,N=y+1;;){if(L==l)break e;if(N<c.length&&c[N].from==L)L=c[N++].to;else if(dt[L]==d)break e;else break}if(y++,w)w.push(R);else{if(R.from>m)h.push(new Do(m,R.from,k));let L=R.direction==nr!=!(k%2);ov(t,L?s+1:s,r,R.inner,R.from,R.to,h),m=R.to}E=R.to}else if(E==l||(b?dt[E]!=d:dt[E]==d))break;else E++;if(w)iv(t,m,E,s+1,r,w,h);else if(m<E)h.push(new Do(m,E,k));m=E}else for(let m=l,y=c.length;m>i;){let b=!0,S=!1;if(!y||m>c[y-1].to){let R=dt[m-1];if(R!=d)b=!1,S=R==16}let w=!b&&d==1?[]:null,k=b?s:s+1,E=m;e:for(;;)if(y&&E==c[y-1].to){if(S)break e;let R=c[--y];if(!b)for(let L=R.from,N=y;;){if(L==i)break e;if(N&&c[N-1].to==L)L=c[--N].from;else if(dt[L-1]==d)break e;else break}if(w)w.push(R);else{if(R.to<m)h.push(new Do(R.to,m,k));let L=R.direction==nr!=!(k%2);ov(t,L?s+1:s,r,R.inner,R.from,R.to,h),m=R.from}E=R.from}else if(E==i||(b?dt[E-1]!=d:dt[E-1]==d))break;else E--;if(w)iv(t,E,m,s+1,r,w,h);else if(E<m)h.push(new Do(E,m,k));m=E}}function ov(t,i,l,s,r,c,h){let d=i%2?2:1;h3(t,r,c,s,d),d3(t,r,c,s,d),p3(r,c,s,d),iv(t,r,c,i,l,s,h)}function m3(t,i,l){if(!t)return[new Do(0,0,i==bv?1:0)];if(i==nr&&!l.length&&!f3.test(t))return LT(t.length);if(l.length)while(t.length>dt.length)dt[dt.length]=256;let s=[],r=i==nr?0:1;return ov(t,r,r,l,0,t.length,s),s}function LT(t){return[new Do(0,t,0)]}var BT="";function g3(t,i,l,s,r){var c;let h=s.head-t.from,d=Do.find(i,h,(c=s.bidiLevel)!==null&&c!==void 0?c:-1,s.assoc),m=i[d],y=m.side(r,l);if(h==y){let w=d+=r?1:-1;if(w<0||w>=i.length)return null;m=i[d=w],h=m.side(!r,l),y=m.side(r,l)}let b=Wi(t.text,h,m.forward(r,l));if(b<m.from||b>m.to)b=y;BT=t.text.slice(Math.min(h,b),Math.max(h,b));let S=d==(r?i.length-1:0)?null:i[d+(r?1:-1)];if(S&&b==y&&S.level+(r?0:1)<m.level)return G.cursor(S.side(!r,l)+t.from,S.forward(r,l)?1:-1,S.level);return G.cursor(b+t.from,m.forward(r,l)?-1:1,m.level)}function y3(t,i,l){for(let s=i;s<l;s++){let r=OT(t.charCodeAt(s));if(r==1)return nr;if(r==2||r==4)return bv}return nr}var zT=fe.define(),HT=fe.define(),NT=fe.define(),_T=fe.define(),lv=fe.define(),UT=fe.define(),qT=fe.define(),vv=fe.define(),Sv=fe.define(),VT=fe.define({combine:(t)=>t.some((i)=>i)}),b3=fe.define({combine:(t)=>t.some((i)=>i)}),IT=fe.define();class Du{constructor(t,i,l,s,r,c=!1){this.range=t,this.y=i,this.x=l,this.yMargin=s,this.xMargin=r,this.isSnapshot=c}map(t){return t.empty?this:new Du(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new Du(G.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}var Pp=Ct.define({map:(t,i)=>t.map(i)}),jT=Ct.define();function Ji(t,i,l){let s=t.facet(_T);if(s.length)s[0](i);else if(window.onerror&&window.onerror(String(i),l,void 0,void 0,i));else if(l)console.error(l+":",i);else console.error(i)}var Zl=fe.define({combine:(t)=>t.length?t[0]:!0}),v3=0,Tu=fe.define({combine(t){return t.filter((i,l)=>{for(let s=0;s<l;s++)if(t[s].plugin==i.plugin)return!1;return!0})}});class ts{constructor(t,i,l,s,r){this.id=t,this.create=i,this.domEventHandlers=l,this.domEventObservers=s,this.baseExtensions=r(this),this.extension=this.baseExtensions.concat(Tu.of({plugin:this,arg:void 0}))}of(t){return this.baseExtensions.concat(Tu.of({plugin:this,arg:t}))}static define(t,i){let{eventHandlers:l,eventObservers:s,provide:r,decorations:c}=i||{};return new ts(v3++,t,l,s,(h)=>{let d=[];if(c)d.push(fm.of((m)=>{let y=m.plugin(h);return y?c(y):vt.none}));if(r)d.push(r(h));return d})}static fromClass(t,i){return ts.define((l,s)=>new t(l,s),i)}}class Zp{constructor(t){this.spec=t,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(t){if(!this.value){if(this.spec)try{this.value=this.spec.plugin.create(t,this.spec.arg)}catch(i){Ji(t.state,i,"CodeMirror plugin crashed"),this.deactivate()}}else if(this.mustUpdate){let i=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(i)}catch(l){if(Ji(i.state,l,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(s){}this.deactivate()}}return this}destroy(t){var i;if((i=this.value)===null||i===void 0?void 0:i.destroy)try{this.value.destroy()}catch(l){Ji(t.state,l,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}var $T=fe.define(),wv=fe.define(),fm=fe.define(),PT=fe.define(),xv=fe.define(),Jf=fe.define(),YT=fe.define();function Z2(t,i){let l=t.state.facet(YT);if(!l.length)return l;let s=l.map((c)=>c instanceof Function?c(t):c),r=[];return We.spans(s,i.from,i.to,{point(){},span(c,h,d,m){let y=c-i.from,b=h-i.from,S=r;for(let w=d.length-1;w>=0;w--,m--){let k=d[w].spec.bidiIsolate,E;if(k==null)k=y3(i.text,y,b);if(m>0&&S.length&&(E=S[S.length-1]).to==y&&E.direction==k)E.to=b,S=E.inner;else{let R={from:y,to:b,direction:k,inner:[]};S.push(R),S=R.inner}}}}),r}var XT=fe.define();function QT(t){let i=0,l=0,s=0,r=0;for(let c of t.state.facet(XT)){let h=c(t);if(h){if(h.left!=null)i=Math.max(i,h.left);if(h.right!=null)l=Math.max(l,h.right);if(h.top!=null)s=Math.max(s,h.top);if(h.bottom!=null)r=Math.max(r,h.bottom)}}return{left:i,right:l,top:s,bottom:r}}var qf=fe.define();class Zi{constructor(t,i,l,s){this.fromA=t,this.toA=i,this.fromB=l,this.toB=s}join(t){return new Zi(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(t){let i=t.length,l=this;for(;i>0;i--){let s=t[i-1];if(s.fromA>l.toA)continue;if(s.toA<l.fromA)break;l=l.join(s),t.splice(i-1,1)}return t.splice(i,0,l),t}static extendWithRanges(t,i){if(i.length==0)return t;let l=[];for(let s=0,r=0,c=0;;){let h=s<t.length?t[s].fromB:1e9,d=r<i.length?i[r]:1e9,m=Math.min(h,d);if(m==1e9)break;let y=m+c,b=m,S=y;for(;;)if(r<i.length&&i[r]<=b){let w=i[r+1];r+=2,b=Math.max(b,w);for(let k=s;k<t.length&&t[k].fromB<=b;k++)c=t[k].toA-t[k].toB;S=Math.max(S,w+c)}else if(s<t.length&&t[s].fromB<=b){let w=t[s++];b=Math.max(b,w.toB),S=Math.max(S,w.toA),c=w.toA-w.toB}else break;l.push(new Zi(y,S,m,b))}return l}}class lm{constructor(t,i,l){this.view=t,this.state=i,this.transactions=l,this.flags=0,this.startState=t.state,this.changes=rn.empty(this.startState.doc.length);for(let r of l)this.changes=this.changes.compose(r.changes);let s=[];this.changes.iterChangedRanges((r,c,h,d)=>s.push(new Zi(r,c,h,d))),this.changedRanges=s}static create(t,i,l){return new lm(t,i,l)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some((t)=>t.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}var S3=[];class Nt{constructor(t,i,l=0){this.dom=t,this.length=i,this.flags=l,this.parent=null,t.cmTile=this}get breakAfter(){return this.flags&1}get children(){return S3}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(t){if(this.flags|=2,this.flags&4){this.flags&=-5;let i=this.domAttrs;if(i)n3(this.dom,i)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(t){this.dom=t,t.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(t,i=this.posAtStart){let l=i;for(let s of this.children){if(s==t)return l;l+=s.length+s.breakAfter}throw RangeError("Invalid child in posBefore")}posAfter(t){return this.posBefore(t)+t.length}covers(t){return!0}coordsIn(t,i,l){return null}domPosFor(t,i){let l=ea(this.dom),s=this.length?t>0:i>0;return new Mo(this.parent.dom,l+(s?1:0),t==0||t==this.length)}markDirty(t){if(this.flags&=-3,t)this.flags|=4;if(this.parent&&this.parent.flags&2)this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let t=this;t;t=t.parent)if(t instanceof Kf)return t;return null}static get(t){return t.cmTile}}class Zf extends Nt{constructor(t){super(t,0);this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(t){this.children.push(t),t.parent=this}sync(t){if(this.flags&2)return;super.sync(t);let i=this.dom,l=null,s,r=(t===null||t===void 0?void 0:t.node)==i?t:null,c=0;for(let h of this.children){if(h.sync(t),c+=h.length+h.breakAfter,s=l?l.nextSibling:i.firstChild,r&&s!=h.dom)r.written=!0;if(h.dom.parentNode==i)while(s&&s!=h.dom)s=K2(s);else i.insertBefore(h.dom,s);l=h.dom}if(s=l?l.nextSibling:i.firstChild,r&&s)r.written=!0;while(s)s=K2(s);this.length=c}}function K2(t){let i=t.nextSibling;return t.parentNode.removeChild(t),i}class Kf extends Zf{constructor(t,i){super(i);this.view=t}owns(t){for(;t;t=t.parent)if(t==this)return!0;return!1}isBlock(){return!0}nearest(t){for(;;){if(!t)return null;let i=Nt.get(t);if(i&&this.owns(i))return i;t=t.parentNode}}blockTiles(t){for(let i=[],l=this,s=0,r=0;;)if(s==l.children.length){if(!i.length)return;if(l=l.parent,l.breakAfter)r++;s=i.pop()}else{let c=l.children[s++];if(c instanceof Kl)i.push(s),l=c,s=0;else{let h=r+c.length,d=t(c,r);if(d!==void 0)return d;r=h+c.breakAfter}}}resolveBlock(t,i){let l,s=-1,r,c=-1;if(this.blockTiles((h,d)=>{let m=d+h.length;if(t>=d&&t<=m){if(h.isWidget()&&i>=-1&&i<=1){if(h.flags&32)return!0;if(h.flags&16)l=void 0}if((d<t||t==m&&(i<-1?h.length:h.covers(1)))&&(!l||!h.isWidget()&&l.isWidget()))l=h,s=t-d;if((m>t||t==d&&(i>1?h.length:h.covers(-1)))&&(!r||!h.isWidget()&&r.isWidget()))r=h,c=t-d}}),!l&&!r)throw Error("No tile at position "+t);return l&&i<0||!r?{tile:l,offset:s}:{tile:r,offset:c}}}class Kl extends Zf{constructor(t,i){super(t);this.wrapper=i}isBlock(){return!0}covers(t){if(!this.children.length)return!1;return t<0?this.children[0].covers(-1):this.lastChild.covers(1)}get domAttrs(){return this.wrapper.attributes}static of(t,i){let l=new Kl(i||document.createElement(t.tagName),t);if(!i)l.flags|=4;return l}}class Ou extends Zf{constructor(t,i){super(t);this.attrs=i}isLine(){return!0}static start(t,i,l){let s=new Ou(i||document.createElement("div"),t);if(!i||!l)s.flags|=4;return s}get domAttrs(){return this.attrs}resolveInline(t,i,l){let s=null,r=-1,c=null,h=-1;function d(y,b){for(let S=0,w=0;S<y.children.length&&w<=b;S++){let k=y.children[S],E=w+k.length;if(E>=b){if(k.isComposite())d(k,b-w);else if((!c||c.isHidden&&(i>0&&!(c.flags&32)||l&&x3(c,k)))&&(E>b||k.flags&32))c=k,h=b-w;else if(w<b||k.flags&16&&!k.isHidden)s=k,r=b-w}w=E}}d(this,t);let m=(i<0?s:c)||s||c;return m?{tile:m,offset:m==s?r:h}:null}coordsIn(t,i,l){let s=this.resolveInline(t,i,!0);if(!s)return w3(this);return s.tile.coordsIn(Math.max(0,s.offset),i,l)}domIn(t,i){let l=this.resolveInline(t,i);if(l){let{tile:s,offset:r}=l;if(this.dom.contains(s.dom)){if(s.isText())return new Mo(s.dom,Math.min(s.dom.nodeValue.length,r));return s.domPosFor(r,s.flags&16?1:s.flags&32?-1:i)}let c=l.tile.parent,h=!1;for(let d of c.children){if(h)return new Mo(d.dom,0);if(d==l.tile)h=!0}}return new Mo(this.dom,0)}}function w3(t){let i=t.dom.lastChild;if(!i)return t.dom.getBoundingClientRect();let l=Jp(i);return l[l.length-1]||null}function x3(t,i){let l=t.coordsIn(0,1),s=i.coordsIn(0,1);return l&&s&&s.top<l.bottom}class li extends Zf{constructor(t,i){super(t);this.mark=i}get domAttrs(){return this.mark.attrs}static of(t,i){let l=new li(i||document.createElement(t.tagName),t);if(!i)l.flags|=4;return l}}class er extends Nt{constructor(t,i){super(t,i.length);this.text=i}sync(t){if(this.flags&2)return;if(super.sync(t),this.dom.nodeValue!=this.text){if(t&&t.node==this.dom)t.written=!0;this.dom.nodeValue=this.text}}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(t,i,l){let s=this.dom.nodeValue.length;if(t>s)t=s;let r=t,c=t,h=0;if(t==0&&i<0||t==s&&i>=0){if(!(K.chrome||K.gecko)){if(t)r--,h=1;else if(c<s)c++,h=-1}}else if(i<0)r--;else if(c<s)c++;let d=Qf(this.dom,r,c).getClientRects();if(!d.length)return null;let m=d[(h?h<0:i>=0)?0:d.length-1];if(K.safari&&!h&&m.width==0)m=Array.prototype.find.call(d,(y)=>y.width)||m;return l==null?m:om(m,(h?h>0:i<0)==l)}static of(t,i){let l=new er(i||document.createTextNode(t),t);if(!i)l.flags|=2;return l}}class ir extends Nt{constructor(t,i,l,s){super(t,i,s);this.widget=l}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(t){if(this.flags&48)return!1;return(this.flags&(t<0?64:128))>0}coordsIn(t,i){return this.coordsInWidget(t,i,!1)}coordsInWidget(t,i,l){let s=this.widget.coordsAt(this.dom,t,i);if(s)return s;if(l)return om(this.dom.getBoundingClientRect(),this.length?t==0:i<=0);else{let r=this.dom.getClientRects(),c=null;if(!r.length)return null;let h=this.flags&16?!0:this.flags&32?!1:t>0;for(let d=h?r.length-1:0;;d+=h?-1:1)if(c=r[d],t>0?d==0:d==r.length-1||c.top<c.bottom)break;return om(c,!h)}}get overrideDOMText(){if(!this.length)return Ye.empty;let{root:t}=this;if(!t)return Ye.empty;let i=this.posAtStart;return t.view.state.doc.slice(i,i+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(t,i,l,s,r){if(!r){if(r=t.toDOM(i),!t.editable)r.contentEditable="false"}return new ir(r,l,t,s)}}class Gf extends Nt{constructor(t){let i=document.createElement("img");i.className="cm-widgetBuffer",i.setAttribute("aria-hidden","true");super(i,0,t)}get isHidden(){return!0}get overrideDOMText(){return Ye.empty}coordsIn(t,i,l){let s=this.dom.getBoundingClientRect();return l==null?s:om(s,i>0==l)}}class GT{constructor(t){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=t}advance(t,i,l){let{tile:s,index:r,beforeBreak:c,parents:h}=this;while(t||i>0)if(!s.isComposite())if(r==s.length)c=!!s.breakAfter,{tile:s,index:r}=h.pop(),r++;else if(!t)break;else{let d=Math.min(t,s.length-r);if(l)l.skip(s,r,r+d);t-=d,r+=d}else if(c){if(!t)break;if(l)l.break();t--,c=!1}else if(r==s.children.length){if(!t&&!h.length)break;if(l)l.leave(s);c=!!s.breakAfter,{tile:s,index:r}=h.pop(),r++}else{let d=s.children[r],m=d.breakAfter;if((i>0?d.length<=t:d.length<t)&&(!l||l.skip(d,0,d.length)!==!1||!d.isComposite))c=!!m,r++,t-=d.length;else if(h.push({tile:s,index:r}),s=d,r=0,l&&d.isComposite())l.enter(d)}return this.tile=s,this.index=r,this.beforeBreak=c,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}}class WT{constructor(t,i,l,s){this.from=t,this.to=i,this.wrapper=l,this.rank=s}}class FT{constructor(t,i,l){this.cache=t,this.root=i,this.blockWrappers=l,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(t,i,l,s){var r;this.flushBuffer();let c=this.ensureMarks(i,l),h=c.lastChild;if(h&&h.isText()&&!(h.flags&8)&&h.length+t.length<512){this.cache.reused.set(h,2);let d=c.children[c.children.length-1]=new er(h.dom,h.text+t);d.parent=c}else c.append(s||er.of(t,(r=this.cache.find(er))===null||r===void 0?void 0:r.dom));this.pos+=t.length,this.afterWidget=null}addComposition(t,i){let l=this.curLine;if(l.dom!=i.line.dom)l.setDOM(this.cache.reused.has(i.line)?Qb(i.line.dom):i.line.dom),this.cache.reused.set(i.line,2);let s=l;for(let h=i.marks.length-1;h>=0;h--){let d=i.marks[h],m=s.lastChild;if(m instanceof li&&m.mark.eq(d.mark)){if(m.dom!=d.dom)m.setDOM(Qb(d.dom));s=m}else{if(this.cache.reused.get(d)){let b=Nt.get(d.dom);if(b)b.setDOM(Qb(d.dom))}let y=li.of(d.mark,d.dom);s.append(y),s=y}this.cache.reused.set(d,2)}let r=Nt.get(t.text);if(r)this.cache.reused.set(r,2);let c=new er(t.text,t.text.nodeValue);c.flags|=8,this.pos=t.range.toB,s.append(c)}addInlineWidget(t,i,l){let s=this.afterWidget&&t.flags&48&&(this.afterWidget.flags&48)==(t.flags&48);if(!s)this.flushBuffer();let r=this.ensureMarks(i,l);if(!s&&!(t.flags&16))r.append(this.getBuffer(1));r.append(t),this.pos+=t.length,this.afterWidget=t}addMark(t,i,l){this.flushBuffer(),this.ensureMarks(i,l).append(t),this.pos+=t.length,this.afterWidget=null}addBlockWidget(t){this.getBlockPos().append(t),this.pos+=t.length,this.lastBlock=t,this.endLine()}continueWidget(t){let i=this.afterWidget||this.lastBlock;i.length+=t,this.pos+=t}addLineStart(t,i){var l;if(!t)t=eE;let s=Ou.start(t,i||((l=this.cache.find(Ou))===null||l===void 0?void 0:l.dom),!!i);this.getBlockPos().append(this.lastBlock=this.curLine=s)}addLine(t){this.getBlockPos().append(t),this.pos+=t.length,this.lastBlock=t,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(t){if(!this.blockPosCovered())this.addLineStart(t)}ensureLine(t){if(!this.curLine)this.addLineStart(t)}ensureMarks(t,i){var l;let s=this.curLine;for(let r=t.length-1;r>=0;r--){let c=t[r],h;if(i>0&&(h=s.lastChild)&&h instanceof li&&h.mark.eq(c))s=h,i--;else{let d=li.of(c,(l=this.cache.find(li,(m)=>m.mark.eq(c)))===null||l===void 0?void 0:l.dom);s.append(d),s=d,i=0}}return s}endLine(){if(this.curLine){this.flushBuffer();let t=this.curLine.lastChild;if(!t||!eT(this.curLine,!1)||t.dom.nodeName!="BR"&&t.isWidget()&&!(K.ios&&eT(this.curLine,!0)))this.curLine.append(this.cache.findWidget(Gb,0,32)||new ir(Gb.toDOM(),0,Gb,32));this.curLine=this.afterWidget=null}}updateBlockWrappers(){if(this.wrapperPos>this.pos+1e4)this.blockWrappers.goto(this.pos),this.wrappers.length=0;for(let t=this.wrappers.length-1;t>=0;t--)if(this.wrappers[t].to<this.pos)this.wrappers.splice(t,1);for(let t=this.blockWrappers;t.value&&t.from<=this.pos;t.next())if(t.to>=this.pos){let i=t.rank*102+t.value.rank,l=new WT(t.from,t.to,t.value,i),s=this.wrappers.length;while(s>0&&(this.wrappers[s-1].rank-l.rank||this.wrappers[s-1].to-l.to)<0)s--;this.wrappers.splice(s,0,l)}this.wrapperPos=this.pos}getBlockPos(){var t;this.updateBlockWrappers();let i=this.root;for(let l of this.wrappers){let s=i.lastChild;if(l.from<this.pos&&s instanceof Kl&&s.wrapper.eq(l.wrapper))i=s;else{let r=Kl.of(l.wrapper,(t=this.cache.find(Kl,(c)=>c.wrapper.eq(l.wrapper)))===null||t===void 0?void 0:t.dom);i.append(r),i=r}}return i}blockPosCovered(){let t=this.lastBlock;return t!=null&&!t.breakAfter&&(!t.isWidget()||(t.flags&160)>0)}getBuffer(t){let i=2|(t<0?16:32),l=this.cache.find(Gf,void 0,1);if(l)l.flags=i;return l||new Gf(i)}flushBuffer(){if(this.afterWidget&&!(this.afterWidget.flags&32))this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null}}class JT{constructor(t){this.skipCount=0,this.text="",this.textOff=0,this.cursor=t.iter()}skip(t){if(this.textOff+t<=this.text.length)this.textOff+=t;else this.skipCount+=t-(this.text.length-this.textOff),this.text="",this.textOff=0}next(t){if(this.textOff==this.text.length){let{value:s,lineBreak:r,done:c}=this.cursor.next(this.skipCount);if(this.skipCount=0,c)throw Error("Ran out of text content when drawing inline views");this.text=s;let h=this.textOff=Math.min(t,s.length);return r?null:s.slice(0,h)}let i=Math.min(this.text.length,this.textOff+t),l=this.text.slice(this.textOff,i);return this.textOff=i,l}}var sm=[ir,Ou,er,li,Gf,Kl,Kf];for(let t=0;t<sm.length;t++)sm[t].bucket=t;class ZT{constructor(t){this.view=t,this.buckets=sm.map(()=>[]),this.index=sm.map(()=>0),this.reused=new Map}add(t){let i=t.constructor.bucket,l=this.buckets[i];if(l.length<6)l.push(t);else l[this.index[i]=(this.index[i]+1)%6]=t}find(t,i,l=2){let s=t.bucket,r=this.buckets[s],c=this.index[s];for(let h=0;h<r.length;h++){let d=(h+c)%r.length,m=r[d];if((!i||i(m))&&!this.reused.has(m)){if(r.splice(d,1),d<c)this.index[s]--;return this.reused.set(m,l),m}}return null}findWidget(t,i,l){let s=this.buckets[0];if(s.length)for(let r=0,c=0;;r++){if(r==s.length){if(c)return null;c=1,r=0}let h=s[r];if(!this.reused.has(h)&&(c==0?h.widget.compare(t):h.widget.constructor==t.constructor&&t.updateDOM(h.dom,this.view,h.widget))){if(s.splice(r,1),r<this.index[0])this.index[0]--;if(h.widget==t&&h.length==i&&(h.flags&497)==l)return this.reused.set(h,1),h;else return this.reused.set(h,2),new ir(h.dom,i,t,h.flags&-498|l)}}}reuse(t){return this.reused.set(t,1),t}maybeReuse(t,i=2){if(this.reused.has(t))return;return this.reused.set(t,i),t.dom}clear(){for(let t=0;t<this.buckets.length;t++)this.buckets[t].length=this.index[t]=0}}class KT{constructor(t,i,l,s,r){this.view=t,this.decorations=s,this.disallowBlockEffectsFor=r,this.openWidget=!1,this.openMarks=0,this.cache=new ZT(t),this.text=new JT(t.state.doc),this.builder=new FT(this.cache,new Kf(t,t.contentDOM),We.iter(l)),this.cache.reused.set(i,2),this.old=new GT(i),this.reuseWalker={skip:(c,h,d)=>{if(this.cache.add(c),c.isComposite())return!1},enter:(c)=>this.cache.add(c),leave:()=>{},break:()=>{}}}run(t,i){let l=i&&this.getCompositionContext(i.text);for(let s=0,r=0,c=0;;){let h=c<t.length?t[c++]:null,d=h?h.fromA:this.old.root.length;if(d>s){let m=d-s;this.preserve(m,!c,!h),s=d,r+=m}if(!h)break;if(i&&h.fromA<=i.range.fromA&&h.toA>=i.range.toA)this.forward(h.fromA,i.range.fromA,i.range.fromA<i.range.toA?1:-1),this.emit(r,i.range.fromB),this.builder.flushBuffer(),this.cache.clear(),this.builder.addComposition(i,l),this.text.skip(i.range.toB-i.range.fromB),this.forward(i.range.fromA,h.toA),this.emit(i.range.toB,h.toB);else this.forward(h.fromA,h.toA),this.emit(r,h.toB);r=h.toB,s=h.toA}if(this.builder.curLine)this.builder.endLine();return this.builder.root}preserve(t,i,l){let s=A3(this.old),r=this.openMarks;this.old.advance(t,l?1:-1,{skip:(c,h,d)=>{if(c.isWidget())if(this.openWidget)this.builder.continueWidget(d-h);else{let m=d>0||h<c.length?ir.of(c.widget,this.view,d-h,c.flags&496,this.cache.maybeReuse(c)):this.cache.reuse(c);if(m.flags&256)m.flags&=-2,this.builder.addBlockWidget(m);else this.builder.ensureLine(null),this.builder.addInlineWidget(m,s,r),r=s.length}else if(c.isText()){if(this.builder.ensureLine(null),!h&&d==c.length&&!this.cache.reused.has(c))this.builder.addText(c.text,s,r,this.cache.reuse(c));else this.cache.add(c),this.builder.addText(c.text.slice(h,d),s,r);r=s.length}else if(c.isLine())c.flags&=-2,this.cache.reused.set(c,1),this.builder.addLine(c);else if(c instanceof Gf)this.cache.add(c);else if(c instanceof li)this.builder.ensureLine(null),this.builder.addMark(c,s,r),this.cache.reused.set(c,1),r=s.length;else return!1;this.openWidget=!1},enter:(c)=>{if(c.isLine())this.builder.addLineStart(c.attrs,this.cache.maybeReuse(c));else if(this.cache.add(c),c instanceof li)s.unshift(c.mark);this.openWidget=!1},leave:(c)=>{if(c.isLine()){if(s.length)s.length=r=0}else if(c instanceof li)s.shift(),r=Math.min(r,s.length)},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(t)}emit(t,i){let l=null,s=this.builder,r=-1,c=We.spans(this.decorations,t,i,{point:(h,d,m,y,b,S)=>{if(m instanceof tr){if(this.disallowBlockEffectsFor[S]){if(m.block)throw RangeError("Block decorations may not be specified via plugins");if(d>this.view.state.doc.lineAt(h).to)throw RangeError("Decorations that replace line breaks may not be specified via plugins")}if(r=y.length,b>y.length)s.continueWidget(d-h);else{let w=m.widget||(m.block?or.block:or.inline),k=k3(m),E=this.cache.findWidget(w,d-h,k)||ir.of(w,this.view,d-h,k);if(m.block){if(m.startSide>0)s.addLineStartIfNotCovered(l);s.addBlockWidget(E)}else s.ensureLine(l),s.addInlineWidget(E,y,b)}l=null}else l=C3(l,m);if(d>h)this.text.skip(d-h)},span:(h,d,m,y)=>{for(let b=h;b<d;){let S=this.text.next(Math.min(512,d-b));if(S==null)s.addLineStartIfNotCovered(l),s.addBreak(),b++;else s.ensureLine(l),s.addText(S,m,b==h?y:m.length),b+=S.length;l=null}r=m.length}});if(r>-1)this.openWidget=c>r;if(!this.openWidget)s.addLineStartIfNotCovered(l);this.openMarks=c}forward(t,i,l=1){if(i-t<=10)this.old.advance(i-t,l,this.reuseWalker);else this.old.advance(5,-1,this.reuseWalker),this.old.advance(i-t-10,-1),this.old.advance(5,l,this.reuseWalker)}getCompositionContext(t){let i=[],l=null;for(let s=t.parentNode;;s=s.parentNode){let r=Nt.get(s);if(s==this.view.contentDOM)break;if(r instanceof li)i.push(r);else if(r===null||r===void 0?void 0:r.isLine())l=r;else if(r instanceof Kl);else if(s.nodeName=="DIV"&&!l&&s!=this.view.contentDOM)l=new Ou(s,eE);else if(!l)i.push(li.of(new Wf({tagName:s.nodeName.toLowerCase(),attributes:i3(s)}),s))}return{line:l,marks:i}}}function eT(t,i){let l=(s)=>{for(let r of s.children)if((i?r.isText():r.length)||l(r))return!0;return!1};return l(t)}function k3(t){let i=t.isReplace?(t.startSide<0?64:0)|(t.endSide>0?128:0):t.startSide>0?32:16;if(t.block)i|=256;return i}var eE={class:"cm-line"};function C3(t,i){let l=i.spec.attributes,s=i.spec.class;if(!l&&!s)return t;if(!t)t={class:"cm-line"};if(l)gv(l,t);if(s)t.class+=" "+s;return t}function A3(t){let i=[];for(let l=t.parents.length;l>1;l--){let s=l==t.parents.length?t.tile:t.parents[l].tile;if(s instanceof li)i.push(s.mark)}return i}function Qb(t){let i=Nt.get(t);if(i)i.setDOM(t.cloneNode());return t}class or extends na{constructor(t){super();this.tag=t}eq(t){return t.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(t){return t.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}or.inline=new or("span");or.block=new or("div");var Gb=new class extends na{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class sv{constructor(t){this.view=t,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=vt.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new Kf(t,t.contentDOM),this.updateInner([new Zi(0,0,0,t.state.doc.length)],null)}update(t){var i;let l=t.changedRanges;if(this.minWidth>0&&l.length)if(!l.every(({fromA:y,toA:b})=>b<this.minWidthFrom||y>this.minWidthTo))this.minWidth=this.minWidthFrom=this.minWidthTo=0;else this.minWidthFrom=t.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=t.changes.mapPos(this.minWidthTo,1);this.updateEditContextFormatting(t);let s=-1;if(this.view.inputState.composing>=0&&!this.view.observer.editContext){if((i=this.domChanged)===null||i===void 0?void 0:i.newSel)s=this.domChanged.newSel.head;else if(!B3(t.changes,this.hasComposition)&&!t.selectionSet)s=t.state.selection.main.head}let r=s>-1?E3(this.view,t.changes,s):null;if(this.domChanged=null,this.hasComposition){let{from:y,to:b}=this.hasComposition;l=new Zi(y,b,t.changes.mapPos(y,-1),t.changes.mapPos(b,1)).addToSet(l.slice())}if(this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(K.ie||K.chrome)&&!r&&t&&t.state.doc.lines!=t.startState.doc.lines)this.forceSelection=!0;let c=this.decorations,h=this.blockWrappers;this.updateDeco();let d=O3(c,this.decorations,t.changes);if(d.length)l=Zi.extendWithRanges(l,d);let m=R3(h,this.blockWrappers,t.changes);if(m.length)l=Zi.extendWithRanges(l,m);if(r&&!l.some((y)=>y.fromA<=r.range.fromA&&y.toA>=r.range.toA))l=r.range.addToSet(l.slice());if(this.tile.flags&2&&l.length==0)return!1;else{if(this.updateInner(l,r),t.transactions.length)this.lastUpdate=Date.now();return!0}}updateInner(t,i){this.view.viewState.mustMeasureContent=!0;let{observer:l}=this.view;l.ignore(()=>{if(i||t.length){let c=this.tile,h=new KT(this.view,c,this.blockWrappers,this.decorations,this.dynamicDecorationMap);if(i&&Nt.get(i.text))h.cache.reused.set(Nt.get(i.text),2);this.tile=h.run(t,i),av(c,h.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let r=K.chrome||K.ios?{node:l.selectionRange.focusNode,written:!1}:void 0;if(this.tile.sync(r),r&&(r.written||l.selectionRange.focusNode!=r.node||!this.tile.dom.contains(r.node)))this.forceSelection=!0;this.tile.dom.style.height=""});let s=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length){for(let r of this.tile.children)if(r.isWidget()&&r.widget instanceof Kp)s.push(r.dom)}l.updateGaps(s)}updateEditContextFormatting(t){this.editContextFormatting=this.editContextFormatting.map(t.changes);for(let i of t.transactions)for(let l of i.effects)if(l.is(jT))this.editContextFormatting=l.value}updateSelection(t=!1,i=!1){if(t||!this.view.observer.selectionRange.focusNode)this.view.observer.readSelectionRange();let{dom:l}=this.tile,s=this.view.root.activeElement,r=s==l,c=!r&&!(this.view.state.facet(Zl)||l.tabIndex>-1)&&jf(l,this.view.observer.selectionRange)&&!(s&&l.contains(s));if(!(r||i||c))return;let h=this.forceSelection;this.forceSelection=!1;let d=this.view.state.selection.main,m,y;if(d.empty)y=m=this.inlineDOMNearPos(d.anchor,d.assoc||1);else y=this.inlineDOMNearPos(d.head,d.head==d.from?1:-1),m=this.inlineDOMNearPos(d.anchor,d.anchor==d.from?1:-1);if(K.gecko&&d.empty&&!this.hasComposition&&T3(m)){let S=document.createTextNode("");this.view.observer.ignore(()=>m.node.insertBefore(S,m.node.childNodes[m.offset]||null)),m=y=new Mo(S,0),h=!0}let b=this.view.observer.selectionRange;if(h||!b.focusNode||(!$f(m.node,m.offset,b.anchorNode,b.anchorOffset)||!$f(y.node,y.offset,b.focusNode,b.focusOffset))&&!this.suppressWidgetCursorChange(b,d))this.view.observer.ignore(()=>{if(K.android&&K.chrome&&l.contains(b.focusNode)&&L3(b.focusNode,l))l.blur(),l.focus({preventScroll:!0});let S=Xf(this.view.root);if(!S);else if(d.empty){if(K.gecko){let w=M3(m.node,m.offset);if(w&&w!=3){let k=(w==1?ET:MT)(m.node,m.offset);if(k)m=new Mo(k.node,k.offset)}}if(S.collapse(m.node,m.offset),d.bidiLevel!=null&&S.caretBidiLevel!==void 0)S.caretBidiLevel=d.bidiLevel}else if(S.extend){S.collapse(m.node,m.offset);try{S.extend(y.node,y.offset)}catch(w){}}else{let w=document.createRange();if(d.anchor>d.head)[m,y]=[y,m];w.setEnd(y.node,y.offset),w.setStart(m.node,m.offset),S.removeAllRanges(),S.addRange(w)}if(c&&this.view.root.activeElement==l){if(l.blur(),s)s.focus()}}),this.view.observer.setSelectionRange(m,y);this.impreciseAnchor=m.precise?null:new Mo(b.anchorNode,b.anchorOffset),this.impreciseHead=y.precise?null:new Mo(b.focusNode,b.focusOffset)}suppressWidgetCursorChange(t,i){return this.hasComposition&&i.empty&&$f(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)&&this.posFromDOM(t.focusNode,t.focusOffset)==i.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:t}=this,i=t.state.selection.main,l=Xf(t.root),{anchorNode:s,anchorOffset:r}=t.observer.selectionRange;if(!l||!i.empty||!i.assoc||!l.modify)return;let c=this.lineAt(i.head,i.assoc);if(!c)return;let h=c.posAtStart;if(i.head==h||i.head==h+c.length)return;let d=this.coordsAt(i.head,-1),m=this.coordsAt(i.head,1);if(!d||!m||d.bottom>m.top)return;let y=this.domAtPos(i.head+i.assoc,i.assoc);l.collapse(y.node,y.offset),l.modify("move",i.assoc<0?"forward":"backward","lineboundary"),t.observer.readSelectionRange();let b=t.observer.selectionRange;if(t.docView.posFromDOM(b.anchorNode,b.anchorOffset)!=i.from)l.collapse(s,r)}posFromDOM(t,i){let l=this.tile.nearest(t);if(!l)return this.tile.dom.compareDocumentPosition(t)&2?0:this.view.state.doc.length;let s=l.posAtStart;if(l.isComposite()){let r;if(t==l.dom)r=l.dom.childNodes[i];else{let c=es(t)==0?0:i==0?-1:1;for(;;){let h=t.parentNode;if(h==l.dom)break;if(c==0&&h.firstChild!=h.lastChild)if(t==h.firstChild)c=-1;else c=1;t=h}if(c<0)r=t;else r=t.nextSibling}if(r==l.dom.firstChild)return s;while(r&&!Nt.get(r))r=r.nextSibling;if(!r)return s+l.length;for(let c=0,h=s;;c++){let d=l.children[c];if(d.dom==r)return h;h+=d.length+d.breakAfter}}else if(l.isText())return t==l.dom?s+i:s+(i?l.length:0);else return s}domAtPos(t,i){let{tile:l,offset:s}=this.tile.resolveBlock(t,i);if(l.isWidget())return l.domPosFor(s,i);return l.domIn(s,i)}inlineDOMNearPos(t,i){let l,s=-1,r=!1,c,h=-1,d=!1;if(this.tile.blockTiles((m,y)=>{if(m.isWidget()){if(m.flags&32&&y>=t)return!0;if(m.flags&16)r=!0}else{let b=y+m.length;if(y<=t)l=m,s=t-y,r=b<t;if(b>=t&&!c)c=m,h=t-y,d=y>t;if(y>t&&c)return!0}}),!l&&!c)return this.domAtPos(t,i);if(r&&c)l=null;else if(d&&l)c=null;return l&&i<0||!c?l.domIn(s,i):c.domIn(h,i)}coordsAt(t,i,l){let{tile:s,offset:r}=this.tile.resolveBlock(t,i);if(s.isWidget()){if(s.widget instanceof Kp)return null;return s.coordsInWidget(r,i,!0)}return s.coordsIn(r,i,l)}lineAt(t,i){let{tile:l}=this.tile.resolveBlock(t,i);return l.isLine()?l:null}coordsForChar(t){let{tile:i,offset:l}=this.tile.resolveBlock(t,1);if(!i.isLine())return null;function s(r,c){if(r.isComposite())for(let h of r.children){if(h.length>=c){let d=s(h,c);if(d)return d}if(c-=h.length,c<0)break}else if(r.isText()&&c<r.length){let h=Wi(r.text,c);if(h==c)return null;let d=Qf(r.dom,c,h).getClientRects();for(let m=0;m<d.length;m++){let y=d[m];if(m==d.length-1||y.top<y.bottom&&y.left<y.right)return y}}return null}return s(i,l)}measureVisibleLineHeights(t){let i=[],{from:l,to:s}=t,r=this.view.contentDOM.clientWidth,c=r>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,h=-1,d=this.view.textDirection==Qt.LTR,m=0,y=(b,S,w)=>{for(let k=0;k<b.children.length;k++){if(S>s)break;let E=b.children[k],R=S+E.length,L=E.dom.getBoundingClientRect(),{height:N}=L;if(w&&!k)m+=L.top-w.top;if(E instanceof Kl){if(R>l)y(E,S,L)}else if(S>=l){if(m>0)i.push(-m);if(i.push(N+m),m=0,c){let q=E.dom.lastChild,J=q?Jp(q):[];if(J.length){let ae=J[J.length-1],ye=d?ae.right-L.left:L.right-ae.left;if(ye>h)h=ye,this.minWidth=r,this.minWidthFrom=S,this.minWidthTo=R}}}if(w&&k==b.children.length-1)m+=w.bottom-L.bottom;S=R+E.breakAfter}};return y(this.tile,0,null),i}textDirectionAt(t){let{tile:i}=this.tile.resolveBlock(t,1);return getComputedStyle(i.dom).direction=="rtl"?Qt.RTL:Qt.LTR}measureTextSize(){let t=this.tile.blockTiles((c)=>{if(c.isLine()&&c.children.length&&c.length<=20){let h=0,d;for(let m of c.children){if(!m.isText()||/[^ -~]/.test(m.text))return;let y=Jp(m.dom);if(y.length!=1)return;h+=y[0].width,d=y[0].height}if(h)return{lineHeight:c.dom.getBoundingClientRect().height,charWidth:h/c.length,textHeight:d}}});if(t)return t;let i=document.createElement("div"),l,s,r;return i.className="cm-line",i.style.width="99999px",i.style.position="absolute",i.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(i);let c=Jp(i.firstChild)[0];l=i.getBoundingClientRect().height,s=c&&c.width?c.width/27:7,r=c&&c.height?c.height:l,i.remove()}),{lineHeight:l,charWidth:s,textHeight:r}}computeBlockGapDeco(){let t=[],i=this.view.viewState;for(let l=0,s=0;;s++){let r=s==i.viewports.length?null:i.viewports[s],c=r?r.from-1:this.view.state.doc.length;if(c>l){let h=(i.lineBlockAt(c).bottom-i.lineBlockAt(l).top)/this.view.scaleY;t.push(vt.replace({widget:new Kp(h),block:!0,inclusive:!0,isBlockGap:!0}).range(l,c))}if(!r)break;l=r.to+1}return vt.set(t)}updateDeco(){let t=1,i=this.view.state.facet(fm).map((r)=>(this.dynamicDecorationMap[t++]=typeof r=="function")?r(this.view):r),l=!1,s=this.view.state.facet(xv).map((r,c)=>{let h=typeof r=="function";if(h)l=!0;return h?r(this.view):r});if(s.length)this.dynamicDecorationMap[t++]=l,i.push(We.join(s));this.decorations=[this.editContextFormatting,...i,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];while(t<this.decorations.length)this.dynamicDecorationMap[t++]=!1;this.blockWrappers=this.view.state.facet(PT).map((r)=>typeof r=="function"?r(this.view):r)}scrollIntoView(t){if(t.isSnapshot){let m=this.view.viewState.lineBlockAt(t.range.head);this.view.scrollDOM.scrollTop=m.top-t.yMargin,this.view.scrollDOM.scrollLeft=t.xMargin;return}for(let m of this.view.state.facet(IT))try{if(m(this.view,t.range,t))return!0}catch(y){Ji(this.view.state,y,"scroll handler")}let{range:i}=t,l=this.coordsAt(i.head,i.assoc||(i.head>i.anchor?-1:1)),s;if(!l)return;if(!i.empty&&(s=this.coordsAt(i.anchor,i.anchor>i.head?-1:1)))l={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top),right:Math.max(l.right,s.right),bottom:Math.max(l.bottom,s.bottom)};let r=QT(this.view),c={left:l.left-r.left,top:l.top-r.top,right:l.right+r.right,bottom:l.bottom+r.bottom},{offsetWidth:h,offsetHeight:d}=this.view.scrollDOM;if(s3(this.view.scrollDOM,c,i.head<i.anchor?-1:1,t.x,t.y,Math.max(Math.min(t.xMargin,h),-h),Math.max(Math.min(t.yMargin,d),-d),this.view.textDirection==Qt.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(l.top>window.pageYOffset+window.visualViewport.offsetTop+window.visualViewport.height||l.bottom<window.pageYOffset+window.visualViewport.offsetTop)){let m=this.view.docView.lineAt(i.head,1);if(m)m.dom.scrollIntoView({block:"nearest"})}}lineHasWidget(t){let i=(l)=>l.isWidget()||l.children.some(i);return i(this.tile.resolveBlock(t,1).tile)}destroy(){av(this.tile)}}function av(t,i){let l=i===null||i===void 0?void 0:i.get(t);if(l!=1){if(l==null)t.destroy();for(let s of t.children)av(s,i)}}function T3(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}function tE(t,i){let l=t.observer.selectionRange;if(!l.focusNode)return null;let s=ET(l.focusNode,l.focusOffset),r=MT(l.focusNode,l.focusOffset),c=s||r;if(r&&s&&r.node!=s.node){let d=Nt.get(r.node);if(!d||d.isText()&&d.text!=r.node.nodeValue)c=r;else if(t.docView.lastCompositionAfterCursor){let m=Nt.get(s.node);if(!(!m||m.isText()&&m.text!=s.node.nodeValue))c=r}}if(t.docView.lastCompositionAfterCursor=c!=s,!c)return null;let h=i-c.offset;return{from:h,to:h+c.node.nodeValue.length,node:c.node}}function E3(t,i,l){let s=tE(t,l);if(!s)return null;let{node:r,from:c,to:h}=s,d=r.nodeValue;if(/[\n\r]/.test(d))return null;if(t.state.doc.sliceString(s.from,s.to)!=d)return null;let m=i.invertedDesc;return{range:new Zi(m.mapPos(c),m.mapPos(h),c,h),text:r}}function M3(t,i){if(t.nodeType!=1)return 0;return(i&&t.childNodes[i-1].contentEditable=="false"?1:0)|(i<t.childNodes.length&&t.childNodes[i].contentEditable=="false"?2:0)}var D3=class{constructor(){this.changes=[]}compareRange(i,l){Eu(i,l,this.changes)}comparePoint(i,l){Eu(i,l,this.changes)}boundChange(i){Eu(i,i,this.changes)}};function O3(t,i,l){let s=new D3;return We.compare(t,i,l,s),s.changes}class nE{constructor(){this.changes=[]}compareRange(t,i){Eu(t,i,this.changes)}comparePoint(){}boundChange(t){Eu(t,t,this.changes)}}function R3(t,i,l){let s=new nE;return We.compare(t,i,l,s),s.changes}function L3(t,i){for(let l=t;l&&l!=i;l=l.assignedSlot||l.parentNode)if(l.nodeType==1&&l.contentEditable=="false")return!0;return!1}function B3(t,i){let l=!1;if(i)t.iterChangedRanges((s,r)=>{if(s<i.to&&r>i.from)l=!0});return l}class Kp extends na{constructor(t){super();this.height=t}toDOM(){let t=document.createElement("div");return t.className="cm-gap",this.updateDOM(t),t}eq(t){return t.height==this.height}updateDOM(t){return t.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function z3(t,i,l=1){let s=t.charCategorizer(i),r=t.doc.lineAt(i),c=i-r.from;if(r.length==0)return G.cursor(i);if(c==0)l=1;else if(c==r.length)l=-1;let h=c,d=c;if(l<0)h=Wi(r.text,c,!1);else d=Wi(r.text,c);let m=s(r.text.slice(h,d));while(h>0){let y=Wi(r.text,h,!1);if(s(r.text.slice(y,h))!=m)break;h=y}while(d<r.length){let y=Wi(r.text,d);if(s(r.text.slice(d,y))!=m)break;d=y}return G.undirectionalRange(h+r.from,d+r.from)}function H3(t,i,l,s,r){let c=Math.round((s-i.left)*t.defaultCharacterWidth);if(t.lineWrapping&&l.height>t.defaultLineHeight*1.5){let d=t.viewState.heightOracle.textHeight,m=Math.floor((r-l.top-(t.defaultLineHeight-d)*0.5)/d);c+=m*t.viewState.heightOracle.lineLength}let h=t.state.sliceDoc(l.from,l.to);return l.from+V2(h,c,t.state.tabSize)}function N3(t,i,l){let s=t.lineBlockAt(i);if(Array.isArray(s.type)){let r;for(let c of s.type){if(c.from>i)break;if(c.to<i)continue;if(c.from<i&&c.to>i)return c;if(!r||c.type==Ki.Text&&(r.type!=c.type||(l<0?c.from<i:c.to>i)))r=c}return r||s}return s}function _3(t,i,l,s){let r=N3(t,i.head,i.assoc||-1),c=!s||r.type!=Ki.Text||!(t.lineWrapping||r.widgetLineBreaks)?null:t.coordsAtPos(i.assoc<0&&i.head>r.from?i.head-1:i.head);if(c){let h=t.dom.getBoundingClientRect(),d=t.textDirectionAt(r.from),m=t.posAtCoords({x:l==(d==Qt.LTR)?h.right-1:h.left+1,y:(c.top+c.bottom)/2});if(m!=null)return G.cursor(m,l?-1:1)}return G.cursor(l?r.to:r.from,l?-1:1)}function tT(t,i,l,s){let r=t.state.doc.lineAt(i.head),c=t.bidiSpans(r),h=t.textDirectionAt(r.from);for(let d=i,m=null;;){let y=g3(r,c,h,d,l),b=BT;if(!y){if(r.number==(l?t.state.doc.lines:1))return d;b=`
222
- `,r=t.state.doc.line(r.number+(l?1:-1)),c=t.bidiSpans(r),y=t.visualLineSide(r,!l)}if(!m){if(!s)return y;m=s(b)}else if(!m(b))return d;d=y}}function U3(t,i,l){let s=t.state.charCategorizer(i),r=s(l);return(c)=>{let h=s(c);if(r==xo.Space)r=h;return r==h}}function q3(t,i,l,s){let r=i.head,c=l?1:-1;if(r==(l?t.state.doc.length:0))return G.cursor(r,i.assoc);let h=i.goalColumn,d,m=t.contentDOM.getBoundingClientRect(),y=t.coordsAtPos(r,i.assoc||((i.empty?l:i.head==i.from)?1:-1)),b=t.documentTop;if(y){if(h==null)h=y.left-m.left;d=c<0?y.top:y.bottom}else{let E=t.viewState.lineBlockAt(r);if(h==null)h=Math.min(m.right-m.left,t.defaultCharacterWidth*(r-E.from));d=(c<0?E.top:E.bottom)+b}let S=m.left+h,w=t.viewState.heightOracle.textHeight>>1,k=s!==null&&s!==void 0?s:w;for(let E=0;;E+=w){let R=d+(k+E)*c,L=rv(t,{x:S,y:R},!1,c);if(l?R>m.bottom:R<m.top)return G.cursor(L.pos,L.assoc);let N=t.coordsAtPos(L.pos,L.assoc),q=N?(N.top+N.bottom)/2:0;if(!N||(l?q>d:q<d))return G.cursor(L.pos,L.assoc,void 0,h)}}function Pf(t,i,l){for(;;){let s=0;for(let r of t)r.between(i-1,i+1,(c,h,d)=>{if(i>c&&i<h){let m=s||l||(i-c<h-i?-1:1);i=m<0?c:h,s=m}});if(!s)return i}}function iE(t,i){let l=null;for(let s=0;s<i.ranges.length;s++){let r=i.ranges[s],c=null;if(r.empty){let h=Pf(t,r.from,0);if(h!=r.from)c=G.cursor(h,-1)}else{let h=Pf(t,r.from,-1),d=Pf(t,r.to,1);if(h!=r.from||d!=r.to)if(r.undirectional)c=G.undirectionalRange(r.from,r.to);else c=G.range(r.from==r.anchor?h:d,r.from==r.head?h:d)}if(c){if(!l)l=i.ranges.slice();l[s]=c}}return l?G.create(l,i.mainIndex):i}function Wb(t,i,l){let s=Pf(t.state.facet(Jf).map((r)=>r(t)),l.from,i.head>l.from?-1:1);return s==l.from?l:G.cursor(s,s<l.from?1:-1)}class To{constructor(t,i){this.pos=t,this.assoc=i}}function rv(t,i,l,s){let r=t.contentDOM.getBoundingClientRect(),c=r.top+t.viewState.paddingTop,{x:h,y:d}=i,m=d-c,y;for(;;){if(m<0)return new To(0,1);if(m>t.viewState.docHeight)return new To(t.state.doc.length,-1);if(y=t.elementAtHeight(m),s==null)break;if(y.type==Ki.Text){if(s<0?y.to<t.viewport.from:y.from>t.viewport.to)break;let w=t.docView.coordsAt(s<0?y.from:y.to,s>0?-1:1);if(w&&(s<0?w.top<=m+c:w.bottom>=m+c))break}let S=t.viewState.heightOracle.textHeight/2;m=s>0?y.bottom+S:y.top-S}if(t.viewport.from>=y.to||t.viewport.to<=y.from){if(l)return null;if(y.type==Ki.Text){let S=H3(t,r,y,h,d);return new To(S,S==y.from?1:-1)}}if(y.type!=Ki.Text)return m<(y.top+y.bottom)/2?new To(y.from,1):new To(y.to,-1);let b=t.docView.lineAt(y.from,2);if(!b||b.length!=y.length)b=t.docView.lineAt(y.from,-2);return new oE(t,h,d,t.textDirectionAt(y.from)).scanTile(b,y.from)}class oE{constructor(t,i,l,s){this.view=t,this.x=i,this.y=l,this.baseDir=s,this.line=null,this.spans=null}bidiSpansAt(t){if(!this.line||this.line.from>t||this.line.to<t)this.line=this.view.state.doc.lineAt(t),this.spans=this.view.bidiSpans(this.line);return this}baseDirAt(t,i){let{line:l,spans:s}=this.bidiSpansAt(t);return s[Do.find(s,t-l.from,-1,i)].level==this.baseDir}dirAt(t,i){let{line:l,spans:s}=this.bidiSpansAt(t);return s[Do.find(s,t-l.from,-1,i)].dir}bidiIn(t,i){let{spans:l,line:s}=this.bidiSpansAt(t);return l.length>1||l.length&&(l[0].level!=this.baseDir||l[0].to+s.from<i)}scan(t,i,l=!1){let s=0,r=t.length-1,c=new Set,h=this.bidiIn(t[0],t[r]),d,m,y=-1,b=1e9,S;e:while(s<r){let k=r-s,E=s+r>>1;t:if(c.has(E)){let L=s+Math.floor(Math.random()*k);for(let N=0;N<k;N++){if(!c.has(L)){E=L;break t}if(L++,L==r)L=s}break e}c.add(E);let R=i(E);if(R)for(let L=0;L<R.length;L++){let N=R[L],q=0;if(N.width==0&&R.length>1)continue;if(N.bottom<this.y){if(!d||d.bottom<N.bottom)d=N;q=1}else if(N.top>this.y){if(!m||m.top>N.top)m=N;q=-1}else{let J=N.left>this.x?this.x-N.left:N.right<this.x?this.x-N.right:0,ae=Math.abs(J);if(ae<b)y=E,b=ae,S=N;if(J)q=J<0==(this.baseDir==Qt.LTR)?-1:1}if(q==-1&&(!h||this.baseDirAt(t[E],1)))r=E;else if(q==1&&(!h||this.baseDirAt(t[E+1],-1)))s=E+1}}if(!S){if(!m&&!d)return{i:t[0],after:!1};let k=d&&(!m||this.y-d.bottom<m.top-this.y)?d:m;return this.y=(k.top+k.bottom)/2,this.scan(t,i,!0)}if(b&&!l){let{top:k,bottom:E}=S;if(d&&d.bottom>(k+k+E)/3)return this.y=d.bottom-1,this.scan(t,i,!0);if(m&&m.top<(k+E+E)/3)return this.y=m.top+1,this.scan(t,i,!0)}let w=(h?this.dirAt(t[y],1):this.baseDir)==Qt.LTR;return{i:y,after:this.x>(S.left+S.right)/2==w}}scanText(t,i){let l=[];for(let r=0;r<t.length;r=Wi(t.text,r))l.push(i+r);l.push(i+t.length);let s=this.scan(l,(r)=>{let c=l[r]-i,h=l[r+1]-i;return Qf(t.dom,c,h).getClientRects()});return s.after?new To(l[s.i+1],-1):new To(l[s.i],1)}scanTile(t,i){if(!t.length)return new To(i,1);if(t.children.length==1){let h=t.children[0];if(h.isText())return this.scanText(h,i);else if(h.isComposite())return this.scanTile(h,i)}let l=[i];for(let h=0,d=i;h<t.children.length;h++)l.push(d+=t.children[h].length);let s=this.scan(l,(h)=>{let d=t.children[h];if(d.flags&48)return null;return(d.dom.nodeType==1?d.dom:Qf(d.dom,0,d.length)).getClientRects()}),r=t.children[s.i],c=l[s.i];if(r.isText())return this.scanText(r,c);if(r.isComposite())return this.scanTile(r,c);return s.after?new To(l[s.i+1],-1):new To(c,1)}}var Au="￿";class lE{constructor(t,i){this.points=t,this.view=i,this.text="",this.lineSeparator=i.state.facet(qe.lineSeparator)}append(t){this.text+=t}lineBreak(){this.text+=Au}readRange(t,i){if(!t)return this;let l=t.parentNode;for(let s=t;;){this.findPointBefore(l,s);let r=this.text.length;this.readNode(s);let c=Nt.get(s),h=s.nextSibling;if(h==i){if((c===null||c===void 0?void 0:c.breakAfter)&&!h&&l!=this.view.contentDOM)this.lineBreak();break}let d=Nt.get(h);if((c&&d?c.breakAfter:(c?c.breakAfter:im(s))||im(h)&&(s.nodeName!="BR"||(c===null||c===void 0?void 0:c.isWidget()))&&this.text.length>r)&&!I3(h,i))this.lineBreak();s=h}return this.findPointBefore(l,i),this}readTextNode(t){let i=t.nodeValue;for(let l of this.points)if(l.node==t)l.pos=this.text.length+Math.min(l.offset,i.length);for(let l=0,s=this.lineSeparator?null:/\r\n?|\n/g;;){let r=-1,c=1,h;if(this.lineSeparator)r=i.indexOf(this.lineSeparator,l),c=this.lineSeparator.length;else if(h=s.exec(i))r=h.index,c=h[0].length;if(this.append(i.slice(l,r<0?i.length:r)),r<0)break;if(this.lineBreak(),c>1){for(let d of this.points)if(d.node==t&&d.pos>this.text.length)d.pos-=c-1}l=r+c}}readNode(t){let i=Nt.get(t),l=i&&i.overrideDOMText;if(l!=null){this.findPointInside(t,l.length);for(let s=l.iter();!s.next().done;)if(s.lineBreak)this.lineBreak();else this.append(s.value)}else if(t.nodeType==3)this.readTextNode(t);else if(t.nodeName=="BR"){if(t.nextSibling)this.lineBreak()}else if(t.nodeType==1)this.readRange(t.firstChild,null)}findPointBefore(t,i){for(let l of this.points)if(l.node==t&&t.childNodes[l.offset]==i)l.pos=this.text.length}findPointInside(t,i){for(let l of this.points)if(t.nodeType==3?l.node==t:t.contains(l.node))l.pos=this.text.length+(V3(t,l.node,l.offset)?i:0)}}function V3(t,i,l){for(;;){if(!i||l<es(i))return!1;if(i==t)return!0;l=ea(i)+1,i=i.parentNode}}function I3(t,i){let l;for(;;t=t.nextSibling){if(t==i||!t)break;let s=Nt.get(t);if(!(s===null||s===void 0?void 0:s.isWidget()))return!1;if(s)(l||(l=[])).push(s)}if(l)for(let s of l){let r=s.overrideDOMText;if(r===null||r===void 0?void 0:r.length)return!1}return!0}class uv{constructor(t,i){this.node=t,this.offset=i,this.pos=-1}}class sE{constructor(t,i,l,s){this.typeOver=s,this.bounds=null,this.text="",this.domChanged=i>-1;let{impreciseHead:r,impreciseAnchor:c}=t.docView,h=t.state.selection;if(t.state.readOnly&&i>-1)this.newSel=null;else if(i>-1&&(this.bounds=aE(t.docView.tile,i,l,0))){let d=r||c?[]:$3(t),m=new lE(d,t);m.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=m.text,this.newSel=P3(d,this.bounds.from)}else{let d=t.observer.selectionRange,m=r&&r.node==d.focusNode&&r.offset==d.focusOffset||!tv(t.contentDOM,d.focusNode)?h.main.head:t.docView.posFromDOM(d.focusNode,d.focusOffset),y=c&&c.node==d.anchorNode&&c.offset==d.anchorOffset||!tv(t.contentDOM,d.anchorNode)?h.main.anchor:t.docView.posFromDOM(d.anchorNode,d.anchorOffset),b=t.viewport;if((K.ios||K.chrome)&&m!=y&&Math.min(m,y)<=h.main.from&&Math.max(m,y)>=h.main.to&&(b.from>0||b.to<t.state.doc.length)){let S=Math.min(m,y),w=Math.max(m,y),k=b.from-S,E=b.to-w;if((k==0||k==1||S==0)&&(E==0||E==-1||w==t.state.doc.length))m=0,y=t.state.doc.length}if(t.inputState.composing>-1&&h.ranges.length>1)this.newSel=h.replaceRange(G.range(y,m));else if(t.lineWrapping&&y==m&&!(h.main.empty&&h.main.head==m)&&t.inputState.lastTouchTime>Date.now()-100){let S=t.coordsAtPos(m,-1),w=0;if(S)w=t.inputState.lastTouchY<=S.bottom?-1:1;this.newSel=G.create([G.cursor(m,w)])}else this.newSel=G.single(y,m)}}}function aE(t,i,l,s){if(t.isComposite()){let r=-1,c=-1,h=-1,d=-1;for(let m=0,y=s,b=s;m<t.children.length;m++){let S=t.children[m],w=y+S.length;if(y<i&&w>l)return aE(S,i,l,y);if(w>=i&&r==-1)r=m,c=y;if(y>l&&S.dom.parentNode==t.dom){h=m,d=b;break}b=w,y=w+S.breakAfter}return{from:c,to:d<0?s+t.length:d,startDOM:(r?t.children[r-1].dom.nextSibling:null)||t.dom.firstChild,endDOM:h<t.children.length&&h>=0?t.children[h].dom:null}}else if(t.isText())return{from:s,to:s+t.length,startDOM:t.dom,endDOM:t.dom.nextSibling};else return null}function rE(t,i){let l,{newSel:s}=i,{state:r}=t,c=r.selection.main,h=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(i.bounds){let{from:d,to:m}=i.bounds,y=c.from,b=null;if(h===8||K.android&&i.text.length<m-d)y=c.to,b="end";let S=r.doc.sliceString(d,m,Au),w,k;if(!c.empty&&c.from>=d&&c.to<=m&&(i.typeOver||S!=i.text)&&S.slice(0,c.from-d)==i.text.slice(0,c.from-d)&&S.slice(c.to-d)==i.text.slice(w=i.text.length-(S.length-(c.to-d))))l={from:c.from,to:c.to,insert:Ye.of(i.text.slice(c.from-d,w).split(Au))};else if(k=uE(S,i.text,y-d,b)){if(K.chrome&&h==13&&k.toB==k.from+2&&i.text.slice(k.from,k.toB)==Au+Au)k.toB--;l={from:d+k.from,to:d+k.toA,insert:Ye.of(i.text.slice(k.from,k.toB).split(Au))}}}else if(s&&(!t.hasFocus&&r.facet(Zl)||am(s,c)))s=null;if(!l&&!s)return!1;if((K.mac||K.android)&&l&&l.from==l.to&&l.from==c.head-1&&/^\. ?$/.test(l.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"){if(s&&l.insert.length==2)s=G.single(s.main.anchor-1,s.main.head-1);l={from:l.from,to:l.to,insert:Ye.of([l.insert.toString().replace("."," ")])}}else if(r.doc.lineAt(c.from).to<c.to&&t.docView.lineHasWidget(c.to)&&t.inputState.insertingTextAt>Date.now()-50)l={from:c.from,to:c.to,insert:r.toText(t.inputState.insertingText)};else if(K.chrome&&l&&l.from==l.to&&l.from==c.head&&l.insert.toString()==`
223
- `&&t.lineWrapping){if(s)s=G.single(s.main.anchor-1,s.main.head-1);l={from:c.from,to:c.to,insert:Ye.of([" "])}}if(l)return kv(t,l,s,h);else if(s&&!am(s,c)){let d=!1,m="select";if(t.inputState.lastSelectionTime>Date.now()-50){if(t.inputState.lastSelectionOrigin=="select")d=!0;if(m=t.inputState.lastSelectionOrigin,m=="select.pointer")s=iE(r.facet(Jf).map((y)=>y(t)),s)}return t.dispatch({selection:s,scrollIntoView:d,userEvent:m}),!0}else return!1}function kv(t,i,l,s=-1){if(K.ios&&t.inputState.flushIOSKey(i))return!0;let r=t.state.selection.main;if(K.android&&(i.to==r.to&&(i.from==r.from||i.from==r.from-1&&t.state.sliceDoc(i.from,r.from)==" ")&&i.insert.length==1&&i.insert.lines==2&&Mu(t.contentDOM,"Enter",13)||(i.from==r.from-1&&i.to==r.to&&i.insert.length==0||s==8&&i.insert.length<i.to-i.from&&i.to>r.head)&&Mu(t.contentDOM,"Backspace",8)||i.from==r.from&&i.to==r.to+1&&i.insert.length==0&&Mu(t.contentDOM,"Delete",46)))return!0;let c=i.insert.toString();if(t.inputState.composing>=0)t.inputState.composing++;let h,d=()=>h||(h=j3(t,i,l));if(!t.state.facet(UT).some((m)=>m(t,i.from,i.to,c,d)))t.dispatch(d());return!0}function j3(t,i,l){let s,r=t.state,c=r.selection.main,h=-1;if(i.from==i.to&&i.from<c.from||i.from>c.to){let m=i.from<c.from?-1:1,y=m<0?c.from:c.to,b=Pf(r.facet(Jf).map((S)=>S(t)),y,m);if(i.from==b)h=b}if(h>-1)s={changes:i,selection:G.cursor(i.from+i.insert.length,-1)};else if(i.from>=c.from&&i.to<=c.to&&i.to-i.from>=(c.to-c.from)/3&&(!l||l.main.empty&&l.main.from==i.from+i.insert.length)&&t.inputState.composing<0){let m=c.from<i.from?r.sliceDoc(c.from,i.from):"",y=c.to>i.to?r.sliceDoc(i.to,c.to):"";s=r.replaceSelection(t.state.toText(m+i.insert.sliceString(0,void 0,t.state.lineBreak)+y))}else{let m=r.changes(i),y=l&&l.main.to<=m.newLength?l.main:void 0;if(r.selection.ranges.length>1&&(t.inputState.composing>=0||t.inputState.compositionPendingChange)&&i.to<=c.to+10&&i.to>=c.to-10){let b=t.state.sliceDoc(i.from,i.to),S,w=l&&tE(t,l.main.head);if(w){let E=i.insert.length-(i.to-i.from);S={from:w.from,to:w.to-E}}else S=t.state.doc.lineAt(c.head);let k=c.to-i.to;s=r.changeByRange((E)=>{if(E.from==c.from&&E.to==c.to)return{changes:m,range:y||E.map(m)};let R=E.to-k,L=R-b.length;if(t.state.sliceDoc(L,R)!=b||R>=S.from&&L<=S.to)return{range:E};let N=r.changes({from:L,to:R,insert:i.insert}),q=E.to-c.to;return{changes:N,range:!y?E.map(N):G.range(Math.max(0,y.anchor+q),Math.max(0,y.head+q))}})}else s={changes:m,selection:y&&r.selection.replaceRange(y)}}let d="input.type";if(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50){if(t.inputState.compositionPendingChange=!1,d+=".compose",t.inputState.compositionFirstChange)d+=".start",t.inputState.compositionFirstChange=!1}return r.update(s,{userEvent:d,scrollIntoView:!0})}function uE(t,i,l,s){let r=Math.min(t.length,i.length),c=0;while(c<r&&t.charCodeAt(c)==i.charCodeAt(c))c++;if(c==r&&t.length==i.length)return null;let h=t.length,d=i.length;while(h>0&&d>0&&t.charCodeAt(h-1)==i.charCodeAt(d-1))h--,d--;if(s=="end"){let m=Math.max(0,c-Math.min(h,d));l-=h+m-c}if(h<c&&t.length<i.length){let m=l<=c&&l>=h?c-l:0;c-=m,d=c+(d-h),h=c}else if(d<c){let m=l<=c&&l>=d?c-l:0;c-=m,h=c+(h-d),d=c}return{from:c,toA:h,toB:d}}function $3(t){let i=[];if(t.root.activeElement!=t.contentDOM)return i;let{anchorNode:l,anchorOffset:s,focusNode:r,focusOffset:c}=t.observer.selectionRange;if(l){if(i.push(new uv(l,s)),r!=l||c!=s)i.push(new uv(r,c))}return i}function P3(t,i){if(t.length==0)return null;let l=t[0].pos,s=t.length==2?t[1].pos:l;return l>-1&&s>-1?G.single(l+i,s+i):null}function am(t,i){return i.head==t.main.head&&i.anchor==t.main.anchor}class cE{setSelectionOrigin(t){this.lastSelectionOrigin=t,this.lastSelectionTime=Date.now()}constructor(t){if(this.view=t,this.lastKeyCode=0,this.lastKeyTime=0,this.touchActive=!1,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.lastIOSMomentumScroll=0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=t.hasFocus,K.safari)t.contentDOM.addEventListener("input",()=>null);if(K.gecko)l4(t.contentDOM.ownerDocument)}handleEvent(t){if(!Z3(this.view,t)||this.ignoreDuringComposition(t))return;if(t.type=="keydown"&&this.keydown(t))return;if(this.view.updateState!=0)Promise.resolve().then(()=>this.runHandlers(t.type,t));else this.runHandlers(t.type,t)}runHandlers(t,i){let l=this.handlers[t];if(l){for(let s of l.observers)s(this.view,i);for(let s of l.handlers){if(i.defaultPrevented)break;if(s(this.view,i)){i.preventDefault();break}}}}ensureHandlers(t){let i=X3(t),l=this.handlers,s=this.view.contentDOM;for(let r in i)if(r!="scroll"){let c=!i[r].handlers.length,h=l[r];if(h&&c!=!h.handlers.length)s.removeEventListener(r,this.handleEvent),h=null;if(!h)s.addEventListener(r,this.handleEvent,{passive:c})}for(let r in l)if(r!="scroll"&&!i[r])s.removeEventListener(r,this.handleEvent);this.handlers=i}keydown(t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),t.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&t.keyCode!=27&&hE.indexOf(t.keyCode)<0)this.tabFocusMode=-1;if(K.android&&K.chrome&&!t.synthetic&&(t.keyCode==13||t.keyCode==8))return this.view.observer.delayAndroidKey(t.key,t.keyCode),!0;if(K.ios&&!t.synthetic&&!t.altKey&&!t.metaKey&&(fE.some((i)=>i.keyCode==t.keyCode)&&!t.ctrlKey||Q3.indexOf(t.key)>-1&&t.ctrlKey)){let i={ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey,shiftKey:t.shiftKey};if(i.shiftKey&&K.ios&&!/^(off|none)$/.test(this.view.contentDOM.autocapitalize)&&Y3(this.view.win))i.shiftKey=!1;return this.pendingIOSKey={key:t.key,keyCode:t.keyCode,mods:i},setTimeout(()=>this.flushIOSKey(),250),!0}if(t.keyCode!=229)this.view.observer.forceFlush();return!1}flushIOSKey(t){let i=this.pendingIOSKey;if(!i)return!1;if(i.key=="Enter"&&t&&t.from<t.to&&/^\S+$/.test(t.insert.toString()))return!1;return this.pendingIOSKey=void 0,Mu(this.view.contentDOM,i.key,i.keyCode,i.mods)}ignoreDuringComposition(t){if(!/^key/.test(t.type)||t.synthetic)return!1;if(this.composing>0)return!0;if(K.safari&&!K.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)return this.compositionPendingKey=!1,!0;return!1}startMouseSelection(t){if(this.mouseSelection)this.mouseSelection.destroy();this.mouseSelection=t}update(t){if(this.view.observer.update(t),this.mouseSelection)this.mouseSelection.update(t);if(this.draggedContent&&t.docChanged)this.draggedContent=this.draggedContent.map(t.changes);if(t.transactions.length)this.lastKeyCode=this.lastSelectionTime=0}destroy(){if(this.mouseSelection)this.mouseSelection.destroy()}}function Y3(t){if(!t.visualViewport)return!1;return t.visualViewport.height*t.visualViewport.scale/t.document.documentElement.clientHeight<0.85}function nT(t,i){return(l,s)=>{try{return i.call(t,s,l)}catch(r){Ji(l.state,r)}}}function X3(t){let i=Object.create(null);function l(s){return i[s]||(i[s]={observers:[],handlers:[]})}for(let s of t){let r=s.spec,c=r&&r.plugin.domEventHandlers,h=r&&r.plugin.domEventObservers;if(c)for(let d in c){let m=c[d];if(m)l(d).handlers.push(nT(s.value,m))}if(h)for(let d in h){let m=h[d];if(m)l(d).observers.push(nT(s.value,m))}}for(let s in Oo)l(s).handlers.push(Oo[s]);for(let s in Yn)l(s).observers.push(Yn[s]);return i}var fE=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Q3="dthko",hE=[16,17,18,20,91,92,224,225],Yp=6;function Xp(t){return Math.max(0,t)*0.7+8}function G3(t,i){return Math.max(Math.abs(t.clientX-i.clientX),Math.abs(t.clientY-i.clientY))}class dE{constructor(t,i,l,s){this.view=t,this.startEvent=i,this.style=l,this.mustSelect=s,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=i,this.scrollParents=kT(t.contentDOM),this.atoms=t.state.facet(Jf).map((c)=>c(t));let r=t.contentDOM.ownerDocument;r.addEventListener("mousemove",this.move=this.move.bind(this)),r.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=i.shiftKey,this.multiple=t.state.facet(qe.allowMultipleSelections)&&W3(t,i),this.dragging=J3(t,i)&&gE(i)==1?null:!1}start(t){if(this.dragging===!1)this.select(t)}move(t){if(t.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&G3(this.startEvent,t)<10)return;this.select(this.lastEvent=t);let i=0,l=0,s=0,r=0,c=this.view.win.innerWidth,h=this.view.win.innerHeight;if(this.scrollParents.x)({left:s,right:c}=this.scrollParents.x.getBoundingClientRect());if(this.scrollParents.y)({top:r,bottom:h}=this.scrollParents.y.getBoundingClientRect());let d=QT(this.view);if(t.clientX-d.left<=s+Yp)i=-Xp(s-t.clientX);else if(t.clientX+d.right>=c-Yp)i=Xp(t.clientX-c);if(t.clientY-d.top<=r+Yp)l=-Xp(r-t.clientY);else if(t.clientY+d.bottom>=h-Yp)l=Xp(t.clientY-h);this.setScrollSpeed(i,l)}up(t){if(this.dragging==null)this.select(this.lastEvent);if(!this.dragging)t.preventDefault();this.destroy()}destroy(){this.setScrollSpeed(0,0);let t=this.view.contentDOM.ownerDocument;t.removeEventListener("mousemove",this.move),t.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(t,i){if(this.scrollSpeed={x:t,y:i},t||i){if(this.scrolling<0)this.scrolling=setInterval(()=>this.scroll(),50)}else if(this.scrolling>-1)clearInterval(this.scrolling),this.scrolling=-1}scroll(){let{x:t,y:i}=this.scrollSpeed;if(t&&this.scrollParents.x)this.scrollParents.x.scrollLeft+=t,t=0;if(i&&this.scrollParents.y)this.scrollParents.y.scrollTop+=i,i=0;if(t||i)this.view.win.scrollBy(t,i);if(this.dragging===!1)this.select(this.lastEvent)}select(t){let{view:i}=this,l=iE(this.atoms,this.style.get(t,this.extend,this.multiple));if(this.mustSelect||!l.eq(i.state.selection,this.dragging===!1))this.view.dispatch({selection:l,userEvent:"select.pointer"});this.mustSelect=!1}update(t){if(t.transactions.some((i)=>i.isUserEvent("input.type")))this.destroy();else if(this.style.update(t))setTimeout(()=>this.select(this.lastEvent),20)}}function W3(t,i){let l=t.state.facet(zT);return l.length?l[0](i):K.mac?i.metaKey:i.ctrlKey}function F3(t,i){let l=t.state.facet(HT);return l.length?l[0](i):K.mac?!i.altKey:!i.ctrlKey}function J3(t,i){let{main:l}=t.state.selection;if(l.empty)return!1;let s=Xf(t.root);if(!s||s.rangeCount==0)return!0;let r=s.getRangeAt(0).getClientRects();for(let c=0;c<r.length;c++){let h=r[c];if(h.left<=i.clientX&&h.right>=i.clientX&&h.top<=i.clientY&&h.bottom>=i.clientY)return!0}return!1}function Z3(t,i){if(!i.bubbles)return!0;if(i.defaultPrevented)return!1;for(let l=i.target,s;l!=t.contentDOM;l=l.parentNode)if(!l||l.nodeType==11||(s=Nt.get(l))&&s.isWidget()&&!s.isHidden&&s.widget.ignoreEvent(i))return!1;return!0}var Oo=Object.create(null),Yn=Object.create(null),pE=K.ie&&K.ie_version<15||K.ios&&K.webkit_version<604;function K3(t){let i=t.dom.parentNode;if(!i)return;let l=i.appendChild(document.createElement("textarea"));l.style.cssText="position: fixed; left: -10000px; top: 10px",l.focus(),setTimeout(()=>{t.focus(),l.remove(),mE(t,l.value)},50)}function hm(t,i,l){for(let s of t.facet(i))l=s(l,t);return l}function mE(t,i){i=hm(t.state,vv,i);let{state:l}=t,s,r=1,c=l.toText(i),h=c.lines==l.selection.ranges.length;if(cv!=null&&l.selection.ranges.every((m)=>m.empty)&&cv==c.toString()){let m=-1;s=l.changeByRange((y)=>{let b=l.doc.lineAt(y.from);if(b.from==m)return{range:y};m=b.from;let S=l.toText((h?c.line(r++).text:i)+l.lineBreak);return{changes:{from:b.from,insert:S},range:G.cursor(y.from+S.length)}})}else if(h)s=l.changeByRange((m)=>{let y=c.line(r++);return{changes:{from:m.from,to:m.to,insert:y.text},range:G.cursor(m.from+y.length)}});else s=l.replaceSelection(c);t.dispatch(s,{userEvent:"input.paste",scrollIntoView:!0})}Yn.scroll=(t)=>{let i=t.inputState;if(i.lastScrollTop=t.scrollDOM.scrollTop,i.lastScrollLeft=t.scrollDOM.scrollLeft,K.ios&&!i.touchActive)i.lastIOSMomentumScroll=Date.now()};Yn.wheel=Yn.mousewheel=(t)=>{t.inputState.lastWheelEvent=Date.now()};Oo.keydown=(t,i)=>{if(t.inputState.setSelectionOrigin("select"),i.keyCode==27&&t.inputState.tabFocusMode!=0)t.inputState.tabFocusMode=Date.now()+2000;return!1};Yn.touchstart=(t,i)=>{let l=t.inputState,s=i.targetTouches[0];if(l.touchActive=!0,l.lastTouchTime=Date.now(),s)l.lastTouchX=s.clientX,l.lastTouchY=s.clientY;l.setSelectionOrigin("select.pointer")};Yn.touchmove=(t)=>{t.inputState.setSelectionOrigin("select.pointer")};Yn.touchend=(t,i)=>{t.inputState.touchActive=!1};Oo.mousedown=(t,i)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2000)return!1;let l=null;for(let s of t.state.facet(NT))if(l=s(t,i),l)break;if(!l&&i.button==0)l=t4(t,i);if(l){let s=!t.hasFocus;if(t.inputState.startMouseSelection(new dE(t,i,l,s)),s)t.observer.ignore(()=>{AT(t.contentDOM);let c=t.root.activeElement;if(c&&!c.contains(t.contentDOM))c.blur()});let r=t.inputState.mouseSelection;if(r)return r.start(i),r.dragging===!1}else t.inputState.setSelectionOrigin("select.pointer");return!1};function iT(t,i,l,s){if(s==1)return G.cursor(i,l);else if(s==2)return z3(t.state,i,l);else{let r=t.docView.lineAt(i,l),c=t.state.doc.lineAt(r?r.posAtEnd:i),h=r?r.posAtStart:c.from,d=r?r.posAtEnd:c.to;if(d<t.state.doc.length&&d==c.to)d++;return G.undirectionalRange(h,d)}}var e4=K.ie&&K.ie_version<=11,oT=null,lT=0,sT=0;function gE(t){if(!e4)return t.detail;let i=oT,l=sT;return oT=t,sT=Date.now(),lT=!i||l>Date.now()-400&&Math.abs(i.clientX-t.clientX)<2&&Math.abs(i.clientY-t.clientY)<2?(lT+1)%3:1}function t4(t,i){let l=t.posAndSideAtCoords({x:i.clientX,y:i.clientY},!1),s=gE(i),r=t.state.selection;return{update(c){if(c.docChanged)l.pos=c.changes.mapPos(l.pos),r=r.map(c.changes)},get(c,h,d){let m=t.posAndSideAtCoords({x:c.clientX,y:c.clientY},!1),y,b=iT(t,m.pos,m.assoc,s);if(l.pos!=m.pos&&!h){let S=iT(t,l.pos,l.assoc,s),w=Math.min(S.from,b.from),k=Math.max(S.to,b.to);b=w<b.from?G.range(w,k,b.assoc):G.range(k,w,b.assoc)}if(h)return r.replaceRange(r.main.extend(b.from,b.to,b.assoc));else if(d&&s==1&&r.ranges.length>1&&(y=n4(r,m.pos)))return y;else if(d)return r.addRange(b);else return G.create([b])}}}function n4(t,i){for(let l=0;l<t.ranges.length;l++){let{from:s,to:r}=t.ranges[l];if(s<=i&&r>=i)return G.create(t.ranges.slice(0,l).concat(t.ranges.slice(l+1)),t.mainIndex==l?0:t.mainIndex-(t.mainIndex>l?1:0))}return null}Oo.dragstart=(t,i)=>{let{selection:{main:l}}=t.state;if(i.target.draggable){let r=t.docView.tile.nearest(i.target);if(r&&r.isWidget()){let c=r.posAtStart,h=c+r.length;if(c>=l.to||h<=l.from)l=G.undirectionalRange(c,h)}}let{inputState:s}=t;if(s.mouseSelection)s.mouseSelection.dragging=!0;if(s.draggedContent=l,i.dataTransfer)i.dataTransfer.setData("Text",hm(t.state,Sv,t.state.sliceDoc(l.from,l.to))),i.dataTransfer.effectAllowed="copyMove";return!1};Oo.dragend=(t)=>(t.inputState.draggedContent=null,!1);function aT(t,i,l,s){if(l=hm(t.state,vv,l),!l)return;let r=t.posAtCoords({x:i.clientX,y:i.clientY},!1),{draggedContent:c}=t.inputState,h=s&&c&&F3(t,i)?{from:c.from,to:c.to}:null,d={from:r,insert:l},m=t.state.changes(h?[h,d]:d);t.focus(),t.dispatch({changes:m,selection:{anchor:m.mapPos(r,-1),head:m.mapPos(r,1)},userEvent:h?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Oo.drop=(t,i)=>{if(!i.dataTransfer)return!1;if(t.state.readOnly)return!0;let l=i.dataTransfer.files;if(l&&l.length){let s=Array(l.length),r=0,c=()=>{if(++r==l.length)aT(t,i,s.filter((h)=>h!=null).join(t.state.lineBreak),!1)};for(let h=0;h<l.length;h++){let d=new FileReader;d.onerror=c,d.onload=()=>{if(!/[\x00-\x08\x0e-\x1f]{2}/.test(d.result))s[h]=d.result;c()},d.readAsText(l[h])}return!0}else{let s=i.dataTransfer.getData("Text");if(s)return aT(t,i,s,!0),!0}return!1};Oo.paste=(t,i)=>{if(t.state.readOnly)return!0;t.observer.flush();let l=pE?null:i.clipboardData;if(l)return mE(t,l.getData("text/plain")||l.getData("text/uri-list")),!0;else return K3(t),!1};function i4(t,i){let l=t.dom.parentNode;if(!l)return;let s=l.appendChild(document.createElement("textarea"));s.style.cssText="position: fixed; left: -10000px; top: 10px",s.value=i,s.focus(),s.selectionEnd=i.length,s.selectionStart=0,setTimeout(()=>{s.remove(),t.focus()},50)}function o4(t){let i=[],l=[],s=!1;for(let r of t.selection.ranges)if(!r.empty)i.push(t.sliceDoc(r.from,r.to)),l.push(r);if(!i.length){let r=-1;for(let{from:c}of t.selection.ranges){let h=t.doc.lineAt(c);if(h.number>r)i.push(h.text),l.push({from:h.from,to:Math.min(t.doc.length,h.to+1)});r=h.number}s=!0}return{text:hm(t,Sv,i.join(t.lineBreak)),ranges:l,linewise:s}}var cv=null;Oo.copy=Oo.cut=(t,i)=>{if(!jf(t.contentDOM,t.observer.selectionRange))return!1;let{text:l,ranges:s,linewise:r}=o4(t.state);if(!l&&!r)return!1;if(cv=r?l:null,i.type=="cut"&&!t.state.readOnly)t.dispatch({changes:s,scrollIntoView:!0,userEvent:"delete.cut"});let c=pE?null:i.clipboardData;if(c)return c.clearData(),c.setData("text/plain",l),!0;else return i4(t,l),!1};var yE=Fi.define();function bE(t,i){let l=[];for(let s of t.facet(qT)){let r=s(t,i);if(r)l.push(r)}return l.length?t.update({effects:l,annotations:yE.of(!0)}):null}function vE(t){setTimeout(()=>{let i=t.hasFocus;if(i!=t.inputState.notifiedFocused){let l=bE(t.state,i);if(l)t.dispatch(l);else t.update([])}},10)}Yn.focus=(t)=>{if(t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft))t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft;vE(t)};Yn.blur=(t)=>{t.observer.clearSelectionRange(),vE(t)};Yn.compositionstart=Yn.compositionupdate=(t)=>{if(t.observer.editContext)return;if(t.inputState.compositionFirstChange==null)t.inputState.compositionFirstChange=!0;if(t.inputState.composing<0)t.inputState.composing=0};Yn.compositionend=(t)=>{if(t.observer.editContext)return;if(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,K.chrome&&K.android)t.observer.flushSoon();else if(t.inputState.compositionPendingChange)Promise.resolve().then(()=>t.observer.flush());else setTimeout(()=>{if(t.inputState.composing<0&&t.docView.hasComposition)t.update([])},50)};Yn.contextmenu=(t)=>{t.inputState.lastContextMenu=Date.now()};Oo.beforeinput=(t,i)=>{var l,s;if(i.inputType=="insertText"||i.inputType=="insertCompositionText")t.inputState.insertingText=i.data,t.inputState.insertingTextAt=Date.now();if(i.inputType=="insertReplacementText"&&t.observer.editContext){let c=(l=i.dataTransfer)===null||l===void 0?void 0:l.getData("text/plain"),h=i.getTargetRanges();if(c&&h.length){let d=h[0],m=t.posAtDOM(d.startContainer,d.startOffset),y=t.posAtDOM(d.endContainer,d.endOffset);return kv(t,{from:m,to:y,insert:t.state.toText(c)},null),!0}}let r;if(K.chrome&&K.android&&(r=fE.find((c)=>c.inputType==i.inputType))){if(t.observer.delayAndroidKey(r.key,r.keyCode),r.key=="Backspace"||r.key=="Delete"){let c=((s=window.visualViewport)===null||s===void 0?void 0:s.height)||0;setTimeout(()=>{var h;if((((h=window.visualViewport)===null||h===void 0?void 0:h.height)||0)>c+10&&t.hasFocus)t.contentDOM.blur(),t.focus()},100)}}if(K.ios&&i.inputType=="deleteContentForward")t.observer.flushSoon();if(K.safari&&i.inputType=="insertText"&&t.inputState.composing>=0)setTimeout(()=>Yn.compositionend(t,i),20);return!1};var rT=new Set;function l4(t){if(!rT.has(t))rT.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{})}var uT=["pre-wrap","normal","pre-line","break-spaces"],Ru=!1;function cT(){Ru=!1}class SE{constructor(t){this.lineWrapping=t,this.doc=Ye.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(t,i){let l=this.doc.lineAt(i).number-this.doc.lineAt(t).number+1;if(this.lineWrapping)l+=Math.max(0,Math.ceil((i-t-l*this.lineLength*0.5)/this.lineLength));return this.lineHeight*l}heightForLine(t){if(!this.lineWrapping)return this.lineHeight;return(1+Math.max(0,Math.ceil((t-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight}setDoc(t){return this.doc=t,this}mustRefreshForWrapping(t){return uT.indexOf(t)>-1!=this.lineWrapping}mustRefreshForHeights(t){let i=!1;for(let l=0;l<t.length;l++){let s=t[l];if(s<0)l++;else if(!this.heightSamples[Math.floor(s*10)])i=!0,this.heightSamples[Math.floor(s*10)]=!0}return i}refresh(t,i,l,s,r,c){let h=uT.indexOf(t)>-1,d=Math.abs(i-this.lineHeight)>0.3||this.lineWrapping!=h;if(this.lineWrapping=h,this.lineHeight=i,this.charWidth=l,this.textHeight=s,this.lineLength=r,d){this.heightSamples={};for(let m=0;m<c.length;m++){let y=c[m];if(y<0)m++;else this.heightSamples[Math.floor(y*10)]=!0}}return d}}class wE{constructor(t,i){this.from=t,this.heights=i,this.index=0}get more(){return this.index<this.heights.length}}class Eo{constructor(t,i,l,s,r){this.from=t,this.length=i,this.top=l,this.height=s,this._content=r}get type(){return typeof this._content=="number"?Ki.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof tr?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(t){let i=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(t._content)?t._content:[t]);return new Eo(this.from,this.length+t.length,this.top,this.height+t.height,i)}}var bt=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(bt||(bt={})),em=0.001;class Pn{constructor(t,i,l=2){this.length=t,this.height=i,this.flags=l}get outdated(){return(this.flags&2)>0}set outdated(t){this.flags=(t?2:0)|this.flags&-3}setHeight(t){if(this.height!=t){if(Math.abs(this.height-t)>em)Ru=!0;this.height=t}}replace(t,i,l){return Pn.of(l)}decomposeLeft(t,i){i.push(this)}decomposeRight(t,i){i.push(this)}applyChanges(t,i,l,s){let r=this,c=l.doc;for(let h=s.length-1;h>=0;h--){let{fromA:d,toA:m,fromB:y,toB:b}=s[h],S=r.lineAt(d,bt.ByPosNoHeight,l.setDoc(i),0,0),w=S.to>=m?S:r.lineAt(m,bt.ByPosNoHeight,l,0,0);b+=w.to-m,m=w.to;while(h>0&&S.from<=s[h-1].toA)if(d=s[h-1].fromA,y=s[h-1].fromB,h--,d<S.from)S=r.lineAt(d,bt.ByPosNoHeight,l,0,0);y+=S.from-d,d=S.from;let k=Av.build(l.setDoc(c),t,y,b);r=rm(r,r.replace(d,m,k))}return r.updateHeight(l,0)}static empty(){return new Ai(0,0,0)}static of(t){if(t.length==1)return t[0];let i=0,l=t.length,s=0,r=0;for(;;)if(i==l)if(s>r*2){let h=t[i-1];if(h.break)t.splice(--i,1,h.left,null,h.right);else t.splice(--i,1,h.left,h.right);l+=1+h.break,s-=h.size}else if(r>s*2){let h=t[l];if(h.break)t.splice(l,1,h.left,null,h.right);else t.splice(l,1,h.left,h.right);l+=2+h.break,r-=h.size}else break;else if(s<r){let h=t[i++];if(h)s+=h.size}else{let h=t[--l];if(h)r+=h.size}let c=0;if(t[i-1]==null)c=1,i--;else if(t[i]==null)c=1,l++;return new xE(Pn.of(t.slice(0,i)),c,Pn.of(t.slice(l)))}}function rm(t,i){if(t==i)return t;if(t.constructor!=i.constructor)Ru=!0;return i}Pn.prototype.size=1;var s4=vt.replace({});class Cv extends Pn{constructor(t,i,l){super(t,i);this.deco=l,this.spaceAbove=0}mainBlock(t,i){return new Eo(i,this.length,t+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(t,i,l,s){return this.spaceAbove&&t<l+this.spaceAbove?new Eo(s,0,l,this.spaceAbove,s4):this.mainBlock(l,s)}lineAt(t,i,l,s,r){let c=this.mainBlock(s,r);return this.spaceAbove?this.blockAt(0,l,s,r).join(c):c}forEachLine(t,i,l,s,r,c){if(t<=r+this.length&&i>=r)c(this.lineAt(0,bt.ByPos,l,s,r))}setMeasuredHeight(t){let i=t.heights[t.index++];if(i<0)this.spaceAbove=-i,i=t.heights[t.index++];else this.spaceAbove=0;this.setHeight(i)}updateHeight(t,i=0,l=!1,s){if(s&&s.from<=i&&s.more)this.setMeasuredHeight(s);return this.outdated=!1,this}toString(){return`block(${this.length})`}}class Ai extends Cv{constructor(t,i,l){super(t,i,null);this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=l}mainBlock(t,i){return new Eo(i,this.length,t+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(t,i,l){let s=l[0];if(l.length==1&&(s instanceof Ai||s instanceof kn&&s.flags&4)&&Math.abs(this.length-s.length)<10){if(s instanceof kn)s=new Ai(s.length,this.height,this.spaceAbove);else s.height=this.height;if(!this.outdated)s.outdated=!1;return s}else return Pn.of(l)}updateHeight(t,i=0,l=!1,s){if(s&&s.from<=i&&s.more)this.setMeasuredHeight(s);else if(l||this.outdated)this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,t.heightForLine(this.length-this.collapsed))+this.breaks*t.lineHeight);return this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class kn extends Pn{constructor(t){super(t,0)}heightMetrics(t,i){let l=t.doc.lineAt(i).number,s=t.doc.lineAt(i+this.length).number,r=s-l+1,c,h=0;if(t.lineWrapping){let d=Math.min(this.height,t.lineHeight*r);if(c=d/r,this.length>r+1)h=(this.height-d)/(this.length-r-1)}else c=this.height/r;return{firstLine:l,lastLine:s,perLine:c,perChar:h}}blockAt(t,i,l,s){let{firstLine:r,lastLine:c,perLine:h,perChar:d}=this.heightMetrics(i,s);if(i.lineWrapping){let m=s+(t<i.lineHeight?0:Math.round(Math.max(0,Math.min(1,(t-l)/this.height))*this.length)),y=i.doc.lineAt(m),b=h+y.length*d,S=Math.max(l,t-b/2);return new Eo(y.from,y.length,S,b,0)}else{let m=Math.max(0,Math.min(c-r,Math.floor((t-l)/h))),{from:y,length:b}=i.doc.line(r+m);return new Eo(y,b,l+h*m,h,0)}}lineAt(t,i,l,s,r){if(i==bt.ByHeight)return this.blockAt(t,l,s,r);if(i==bt.ByPosNoHeight){let{from:w,to:k}=l.doc.lineAt(t);return new Eo(w,k-w,0,0,0)}let{firstLine:c,perLine:h,perChar:d}=this.heightMetrics(l,r),m=l.doc.lineAt(t),y=h+m.length*d,b=m.number-c,S=s+h*b+d*(m.from-r-b);return new Eo(m.from,m.length,Math.max(s,Math.min(S,s+this.height-y)),y,0)}forEachLine(t,i,l,s,r,c){t=Math.max(t,r),i=Math.min(i,r+this.length);let{firstLine:h,perLine:d,perChar:m}=this.heightMetrics(l,r);for(let y=t,b=s;y<=i;){let S=l.doc.lineAt(y);if(y==t){let k=S.number-h;b+=d*k+m*(t-r-k)}let w=d+m*S.length;c(new Eo(S.from,S.length,b,w,0)),b+=w,y=S.to+1}}replace(t,i,l){let s=this.length-i;if(s>0){let r=l[l.length-1];if(r instanceof kn)l[l.length-1]=new kn(r.length+s);else l.push(null,new kn(s-1))}if(t>0){let r=l[0];if(r instanceof kn)l[0]=new kn(t+r.length);else l.unshift(new kn(t-1),null)}return Pn.of(l)}decomposeLeft(t,i){i.push(new kn(t-1),null)}decomposeRight(t,i){i.push(null,new kn(this.length-t-1))}updateHeight(t,i=0,l=!1,s){let r=i+this.length;if(s&&s.from<=i+this.length&&s.more){let c=[],h=Math.max(i,s.from),d=-1;if(s.from>i)c.push(new kn(s.from-i-1).updateHeight(t,i));while(h<=r&&s.more){let y=t.doc.lineAt(h).length;if(c.length)c.push(null);let b=s.heights[s.index++],S=0;if(b<0)S=-b,b=s.heights[s.index++];if(d==-1)d=b;else if(Math.abs(b-d)>=em)d=-2;let w=new Ai(y,b,S);w.outdated=!1,c.push(w),h+=y+1}if(h<=r)c.push(null,new kn(r-h).updateHeight(t,h));let m=Pn.of(c);if(d<0||Math.abs(m.height-this.height)>=em||Math.abs(d-this.heightMetrics(t,i).perLine)>=em)Ru=!0;return rm(this,m)}else if(l||this.outdated)this.setHeight(t.heightForGap(i,i+this.length)),this.outdated=!1;return this}toString(){return`gap(${this.length})`}}class xE extends Pn{constructor(t,i,l){super(t.length+i+l.length,t.height+l.height,i|(t.outdated||l.outdated?2:0));this.left=t,this.right=l,this.size=t.size+l.size}get break(){return this.flags&1}blockAt(t,i,l,s){let r=l+this.left.height;return t<r?this.left.blockAt(t,i,l,s):this.right.blockAt(t,i,r,s+this.left.length+this.break)}lineAt(t,i,l,s,r){let c=s+this.left.height,h=r+this.left.length+this.break,d=i==bt.ByHeight?t<c:t<h,m=d?this.left.lineAt(t,i,l,s,r):this.right.lineAt(t,i,l,c,h);if(this.break||(d?m.to<h:m.from>h))return m;let y=i==bt.ByPosNoHeight?bt.ByPosNoHeight:bt.ByPos;if(d)return m.join(this.right.lineAt(h,y,l,c,h));else return this.left.lineAt(h,y,l,s,r).join(m)}forEachLine(t,i,l,s,r,c){let h=s+this.left.height,d=r+this.left.length+this.break;if(this.break){if(t<d)this.left.forEachLine(t,i,l,s,r,c);if(i>=d)this.right.forEachLine(t,i,l,h,d,c)}else{let m=this.lineAt(d,bt.ByPos,l,s,r);if(t<m.from)this.left.forEachLine(t,m.from-1,l,s,r,c);if(m.to>=t&&m.from<=i)c(m);if(i>m.to)this.right.forEachLine(m.to+1,i,l,h,d,c)}}replace(t,i,l){let s=this.left.length+this.break;if(i<s)return this.balanced(this.left.replace(t,i,l),this.right);if(t>this.left.length)return this.balanced(this.left,this.right.replace(t-s,i-s,l));let r=[];if(t>0)this.decomposeLeft(t,r);let c=r.length;for(let h of l)r.push(h);if(t>0)fT(r,c-1);if(i<this.length){let h=r.length;this.decomposeRight(i,r),fT(r,h)}return Pn.of(r)}decomposeLeft(t,i){let l=this.left.length;if(t<=l)return this.left.decomposeLeft(t,i);if(i.push(this.left),this.break){if(l++,t>=l)i.push(null)}if(t>l)this.right.decomposeLeft(t-l,i)}decomposeRight(t,i){let l=this.left.length,s=l+this.break;if(t>=s)return this.right.decomposeRight(t-s,i);if(t<l)this.left.decomposeRight(t,i);if(this.break&&t<s)i.push(null);i.push(this.right)}balanced(t,i){if(t.size>2*i.size||i.size>2*t.size)return Pn.of(this.break?[t,null,i]:[t,i]);return this.left=rm(this.left,t),this.right=rm(this.right,i),this.setHeight(t.height+i.height),this.outdated=t.outdated||i.outdated,this.size=t.size+i.size,this.length=t.length+this.break+i.length,this}updateHeight(t,i=0,l=!1,s){let{left:r,right:c}=this,h=i+r.length+this.break,d=null;if(s&&s.from<=i+r.length&&s.more)d=r=r.updateHeight(t,i,l,s);else r.updateHeight(t,i,l);if(s&&s.from<=h+c.length&&s.more)d=c=c.updateHeight(t,h,l,s);else c.updateHeight(t,h,l);if(d)return this.balanced(r,c);return this.height=this.left.height+this.right.height,this.outdated=!1,this}toString(){return this.left+(this.break?" ":"-")+this.right}}function fT(t,i){let l,s;if(t[i]==null&&(l=t[i-1])instanceof kn&&(s=t[i+1])instanceof kn)t.splice(i-1,3,new kn(l.length+1+s.length))}var a4=5;class Av{constructor(t,i){this.pos=t,this.oracle=i,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(t,i){if(this.lineStart>-1){let l=Math.min(i,this.lineEnd),s=this.nodes[this.nodes.length-1];if(s instanceof Ai)s.length+=l-this.pos;else if(l>this.pos||!this.isCovered)this.nodes.push(new Ai(l-this.pos,-1,0));if(this.writtenTo=l,i>l)this.nodes.push(null),this.writtenTo++,this.lineStart=-1}this.pos=i}point(t,i,l){if(t<i||l.heightRelevant){let s=l.widget?l.widget.estimatedHeight:0,r=l.widget?l.widget.lineBreaks:0;if(s<0)s=this.oracle.lineHeight;let c=i-t;if(l.block)this.addBlock(new Cv(c,s,l));else if(c||r||s>=a4)this.addLineDeco(s,r,c)}else if(i>t)this.span(t,i);if(this.lineEnd>-1&&this.lineEnd<this.pos)this.lineEnd=this.oracle.doc.lineAt(this.pos).to}enterLine(){if(this.lineStart>-1)return;let{from:t,to:i}=this.oracle.doc.lineAt(this.pos);if(this.lineStart=t,this.lineEnd=i,this.writtenTo<t){if(this.writtenTo<t-1||this.nodes[this.nodes.length-1]==null)this.nodes.push(this.blankContent(this.writtenTo,t-1));this.nodes.push(null)}if(this.pos>t)this.nodes.push(new Ai(this.pos-t,-1,0));this.writtenTo=this.pos}blankContent(t,i){let l=new kn(i-t);if(this.oracle.doc.lineAt(t).to==i)l.flags|=4;return l}ensureLine(){this.enterLine();let t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof Ai)return t;let i=new Ai(0,-1,0);return this.nodes.push(i),i}addBlock(t){this.enterLine();let i=t.deco;if(i&&i.startSide>0&&!this.isCovered)this.ensureLine();if(this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,i&&i.endSide>0)this.covering=t}addLineDeco(t,i,l){let s=this.ensureLine();s.length+=l,s.collapsed+=l,s.widgetHeight=Math.max(s.widgetHeight,t),s.breaks+=i,this.writtenTo=this.pos=this.pos+l}finish(t){let i=this.nodes.length==0?null:this.nodes[this.nodes.length-1];if(this.lineStart>-1&&!(i instanceof Ai)&&!this.isCovered)this.nodes.push(new Ai(0,-1,0));else if(this.writtenTo<this.pos||i==null)this.nodes.push(this.blankContent(this.writtenTo,this.pos));let l=t;for(let s of this.nodes){if(s instanceof Ai)s.updateHeight(this.oracle,l);l+=s?s.length:1}return this.nodes}static build(t,i,l,s){let r=new Av(l,t);return We.spans(i,l,s,r,0),r.finish(l)}}function r4(t,i,l){let s=new kE;return We.compare(t,i,l,s,0),s.changes}class kE{constructor(){this.changes=[]}compareRange(){}comparePoint(t,i,l,s){if(t<i||l&&l.heightRelevant||s&&s.heightRelevant)Eu(t,i,this.changes,5)}}function u4(t,i){let l=t.getBoundingClientRect(),s=t.ownerDocument,r=s.defaultView||window,c=Math.max(0,l.left),h=Math.min(r.innerWidth,l.right),d=Math.max(0,l.top),m=Math.min(r.innerHeight,l.bottom);for(let y=t.parentNode;y&&y!=s.body;)if(y.nodeType==1){let b=y,S=window.getComputedStyle(b);if((b.scrollHeight>b.clientHeight||b.scrollWidth>b.clientWidth)&&S.overflow!="visible"){let w=b.getBoundingClientRect();c=Math.max(c,w.left),h=Math.min(h,w.right),d=Math.max(d,w.top),m=Math.min(y==t.parentNode?r.innerHeight:m,w.bottom)}y=S.position=="absolute"||S.position=="fixed"?b.offsetParent:b.parentNode}else if(y.nodeType==11)y=y.host;else break;return{left:c-l.left,right:Math.max(c,h)-l.left,top:d-(l.top+i),bottom:Math.max(d,m)-(l.top+i)}}function c4(t){let i=t.getBoundingClientRect(),l=t.ownerDocument.defaultView||window;return i.left<l.innerWidth&&i.right>0&&i.top<l.innerHeight&&i.bottom>0}function f4(t,i){let l=t.getBoundingClientRect();return{left:0,right:l.right-l.left,top:i,bottom:l.bottom-(l.top+i)}}class tm{constructor(t,i,l,s){this.from=t,this.to=i,this.size=l,this.displaySize=s}static same(t,i){if(t.length!=i.length)return!1;for(let l=0;l<t.length;l++){let s=t[l],r=i[l];if(s.from!=r.from||s.to!=r.to||s.size!=r.size)return!1}return!0}draw(t,i){return vt.replace({widget:new CE(this.displaySize*(i?t.scaleY:t.scaleX),i)}).range(this.from,this.to)}}class CE extends na{constructor(t,i){super();this.size=t,this.vertical=i}eq(t){return t.size==this.size&&t.vertical==this.vertical}toDOM(){let t=document.createElement("div");if(this.vertical)t.style.height=this.size+"px";else t.style.width=this.size+"px",t.style.height="2px",t.style.display="inline-block";return t}get estimatedHeight(){return this.vertical?this.size:-1}}class fv{constructor(t,i){this.view=t,this.state=i,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=hT,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Qt.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let l=i.facet(wv).some((s)=>typeof s!="function"&&s.class=="cm-lineWrapping");this.heightOracle=new SE(l),this.stateDeco=dT(i),this.heightMap=Pn.empty().applyChanges(this.stateDeco,Ye.empty,this.heightOracle.setDoc(i.doc),[new Zi(0,0,0,i.doc.length)]);for(let s=0;s<2;s++)if(this.viewport=this.getViewport(0,null),!this.updateForViewport())break;this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=vt.set(this.lineGaps.map((s)=>s.draw(this,!1))),this.scrollParent=t.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let t=[this.viewport],{main:i}=this.state.selection;for(let l=0;l<=1;l++){let s=l?i.head:i.anchor;if(!t.some(({from:r,to:c})=>s>=r&&s<=c)){let{from:r,to:c}=this.lineBlockAt(s);t.push(new Vf(r,c))}}return this.viewports=t.sort((l,s)=>l.from-s.from),this.updateScaler()}updateScaler(){let t=this.scaler;return this.scaler=this.heightMap.height<=7000000?hT:new Tv(this.heightOracle,this.heightMap,this.viewports),t.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,(t)=>{this.viewportLines.push(If(t,this.scaler))})}update(t,i=null){this.state=t.state;let l=this.stateDeco;this.stateDeco=dT(this.state);let s=t.changedRanges,r=Zi.extendWithRanges(s,r4(l,this.stateDeco,t?t.changes:rn.empty(this.state.doc.length))),c=this.heightMap.height,h=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);if(cT(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,t.startState.doc,this.heightOracle.setDoc(this.state.doc),r),this.heightMap.height!=c||Ru)t.flags|=2;if(h)this.scrollAnchorPos=t.changes.mapPos(h.from,-1),this.scrollAnchorHeight=h.top;else this.scrollAnchorPos=-1,this.scrollAnchorHeight=c;let d=r.length?this.mapViewport(this.viewport,t.changes):this.viewport;if(i&&(i.range.head<d.from||i.range.head>d.to)||!this.viewportIsAppropriate(d))d=this.getViewport(0,i);let m=d.from!=this.viewport.from||d.to!=this.viewport.to;if(this.viewport=d,t.flags|=this.updateForViewport(),m||!t.changes.empty||t.flags&2)this.updateViewportLines();if(this.lineGaps.length||this.viewport.to-this.viewport.from>4000)this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,t.changes)));if(t.flags|=this.computeVisibleRanges(t.changes),i)this.scrollTarget=i;if(!this.mustEnforceCursorAssoc&&(t.selectionSet||t.focusChanged)&&t.view.lineWrapping&&t.state.selection.main.empty&&t.state.selection.main.assoc&&!t.state.facet(b3))this.mustEnforceCursorAssoc=!0}measure(){let{view:t}=this,i=t.contentDOM,l=window.getComputedStyle(i),s=this.heightOracle,r=l.whiteSpace;this.defaultTextDirection=l.direction=="rtl"?Qt.RTL:Qt.LTR;let c=this.heightOracle.mustRefreshForWrapping(r)||this.mustMeasureContent==="refresh",h=i.getBoundingClientRect(),d=c||this.mustMeasureContent||this.contentDOMHeight!=h.height;this.contentDOMHeight=h.height,this.mustMeasureContent=!1;let m=0,y=0;if(h.width&&h.height){let{scaleX:ae,scaleY:ye}=xT(i,h);if(ae>0.005&&Math.abs(this.scaleX-ae)>0.005||ye>0.005&&Math.abs(this.scaleY-ye)>0.005)this.scaleX=ae,this.scaleY=ye,m|=16,c=d=!0}let b=(parseInt(l.paddingTop)||0)*this.scaleY,S=(parseInt(l.paddingBottom)||0)*this.scaleY;if(this.paddingTop!=b||this.paddingBottom!=S)this.paddingTop=b,this.paddingBottom=S,m|=18;if(this.editorWidth!=t.scrollDOM.clientWidth){if(s.lineWrapping)d=!0;this.editorWidth=t.scrollDOM.clientWidth,m|=16}let w=kT(this.view.contentDOM,!1).y;if(w!=this.scrollParent)this.scrollParent=w,this.scrollAnchorHeight=-1,this.scrollOffset=0;let k=this.getScrollOffset();if(this.scrollOffset!=k)this.scrollAnchorHeight=-1,this.scrollOffset=k;this.scrolledToBottom=TT(this.scrollParent||t.win);let E=(this.printing?f4:u4)(i,this.paddingTop),R=E.top-this.pixelViewport.top,L=E.bottom-this.pixelViewport.bottom;this.pixelViewport=E;let N=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(N!=this.inView){if(this.inView=N,N)d=!0}if(!this.inView&&!this.scrollTarget&&!c4(t.dom))return 0;let q=h.width;if(this.contentDOMWidth!=q||this.editorHeight!=t.scrollDOM.clientHeight)this.contentDOMWidth=h.width,this.editorHeight=t.scrollDOM.clientHeight,m|=16;if(d){let ae=t.docView.measureVisibleLineHeights(this.viewport);if(s.mustRefreshForHeights(ae))c=!0;if(c||s.lineWrapping&&Math.abs(q-this.contentDOMWidth)>s.charWidth){let{lineHeight:ye,charWidth:nt,textHeight:$t}=t.docView.measureTextSize();if(c=ye>0&&s.refresh(r,ye,nt,$t,Math.max(5,q/nt),ae),c)t.docView.minWidth=0,m|=16}if(R>0&&L>0)y=Math.max(R,L);else if(R<0&&L<0)y=Math.min(R,L);cT();for(let ye of this.viewports){let nt=ye.from==this.viewport.from?ae:t.docView.measureVisibleLineHeights(ye);this.heightMap=(c?Pn.empty().applyChanges(this.stateDeco,Ye.empty,this.heightOracle,[new Zi(0,0,0,t.state.doc.length)]):this.heightMap).updateHeight(s,0,c,new wE(ye.from,nt))}if(Ru)m|=2}let J=!this.viewportIsAppropriate(this.viewport,y)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);if(J){if(m&2)m|=this.updateScaler();this.viewport=this.getViewport(y,this.scrollTarget),m|=this.updateForViewport()}if(m&2||J)this.updateViewportLines();if(this.lineGaps.length||this.viewport.to-this.viewport.from>4000)this.updateLineGaps(this.ensureLineGaps(c?[]:this.lineGaps,t));if(m|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc)this.mustEnforceCursorAssoc=!1,t.docView.enforceCursorAssoc();return m}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(t,i){let l=0.5-Math.max(-0.5,Math.min(0.5,t/1000/2)),s=this.heightMap,r=this.heightOracle,{visibleTop:c,visibleBottom:h}=this,d=new Vf(s.lineAt(c-l*1000,bt.ByHeight,r,0,0).from,s.lineAt(h+(1-l)*1000,bt.ByHeight,r,0,0).to);if(i){let{head:m}=i.range;if(m<d.from||m>d.to){let y=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),b=s.lineAt(m,bt.ByPos,r,0,0),S;if(i.y=="center")S=(b.top+b.bottom)/2-y/2;else if(i.y=="start"||i.y=="nearest"&&m<d.from)S=b.top;else S=b.bottom-y;d=new Vf(s.lineAt(S-500,bt.ByHeight,r,0,0).from,s.lineAt(S+y+500,bt.ByHeight,r,0,0).to)}}return d}mapViewport(t,i){let l=i.mapPos(t.from,-1),s=i.mapPos(t.to,1);return new Vf(this.heightMap.lineAt(l,bt.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(s,bt.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:t,to:i},l=0){if(!this.inView)return!0;let{top:s}=this.heightMap.lineAt(t,bt.ByPos,this.heightOracle,0,0),{bottom:r}=this.heightMap.lineAt(i,bt.ByPos,this.heightOracle,0,0),{visibleTop:c,visibleBottom:h}=this;return(t==0||s<=c-Math.max(10,Math.min(-l,250)))&&(i==this.state.doc.length||r>=h+Math.max(10,Math.min(l,250)))&&(s>c-2000&&r<h+2000)}mapLineGaps(t,i){if(!t.length||i.empty)return t;let l=[];for(let s of t)if(!i.touchesRange(s.from,s.to))l.push(new tm(i.mapPos(s.from),i.mapPos(s.to),s.size,s.displaySize));return l}ensureLineGaps(t,i){let l=this.heightOracle.lineWrapping,s=l?1e4:2000,r=s>>1,c=s<<1;if(this.defaultTextDirection!=Qt.LTR&&!l)return[];let h=[],d=(y,b,S,w)=>{if(b-y<r)return;let k=this.state.selection.main,E=[k.from];if(!k.empty)E.push(k.to);for(let L of E)if(L>y&&L<b){d(y,L-10,S,w),d(L+10,b,S,w);return}let R=d4(t,(L)=>L.from>=S.from&&L.to<=S.to&&Math.abs(L.from-y)<r&&Math.abs(L.to-b)<r&&!E.some((N)=>L.from<N&&L.to>N));if(!R){if(b<S.to&&i&&l&&i.visibleRanges.some((q)=>q.from<=b&&q.to>=b)){let q=i.moveToLineBoundary(G.cursor(b),!1,!0).head;if(q>y)b=q}let L=this.gapSize(S,y,b,w),N=l||L<2000000?L:2000000;R=new tm(y,b,L,N)}h.push(R)},m=(y)=>{if(y.length<c||y.type!=Ki.Text)return;let b=h4(y.from,y.to,this.stateDeco);if(b.total<c)return;let S=this.scrollTarget?this.scrollTarget.range.head:null,w,k;if(l){let E=s/this.heightOracle.lineLength*this.heightOracle.lineHeight,R,L;if(S!=null){let N=Gp(b,S),q=((this.visibleBottom-this.visibleTop)/2+E)/y.height;R=N-q,L=N+q}else R=(this.visibleTop-y.top-E)/y.height,L=(this.visibleBottom-y.top+E)/y.height;w=Qp(b,R),k=Qp(b,L)}else{let E=b.total*this.heightOracle.charWidth,R=s*this.heightOracle.charWidth,L=0;if(E>2000000){for(let ye of t)if(ye.from>=y.from&&ye.from<y.to&&ye.size!=ye.displaySize&&ye.from*this.heightOracle.charWidth+L<this.pixelViewport.left)L=ye.size-ye.displaySize}let N=this.pixelViewport.left+L,q=this.pixelViewport.right+L,J,ae;if(S!=null){let ye=Gp(b,S),nt=((q-N)/2+R)/E;J=ye-nt,ae=ye+nt}else J=(N-R)/E,ae=(q+R)/E;w=Qp(b,J),k=Qp(b,ae)}if(w>y.from)d(y.from,w,y,b);if(k<y.to)d(k,y.to,y,b)};for(let y of this.viewportLines)if(Array.isArray(y.type))y.type.forEach(m);else m(y);return h}gapSize(t,i,l,s){let r=Gp(s,l)-Gp(s,i);if(this.heightOracle.lineWrapping)return t.height*r;else return s.total*this.heightOracle.charWidth*r}updateLineGaps(t){if(!tm.same(t,this.lineGaps))this.lineGaps=t,this.lineGapDeco=vt.set(t.map((i)=>i.draw(this,this.heightOracle.lineWrapping)))}computeVisibleRanges(t){let i=this.stateDeco;if(this.lineGaps.length)i=i.concat(this.lineGapDeco);let l=[];We.spans(i,this.viewport.from,this.viewport.to,{span(r,c){l.push({from:r,to:c})},point(){}},20);let s=0;if(l.length!=this.visibleRanges.length)s=12;else for(let r=0;r<l.length&&!(s&8);r++){let c=this.visibleRanges[r],h=l[r];if(c.from!=h.from||c.to!=h.to){if(s|=4,!(t&&t.mapPos(c.from,-1)==h.from&&t.mapPos(c.to,1)==h.to))s|=8}}return this.visibleRanges=l,s}lineBlockAt(t){return t>=this.viewport.from&&t<=this.viewport.to&&this.viewportLines.find((i)=>i.from<=t&&i.to>=t)||If(this.heightMap.lineAt(t,bt.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(t){return t>=this.viewportLines[0].top&&t<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find((i)=>i.top<=t&&i.bottom>=t)||If(this.heightMap.lineAt(this.scaler.fromDOM(t),bt.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return(this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top)*this.scaleY}scrollAnchorAt(t){let i=this.lineBlockAtHeight(t+8);return i.from>=this.viewport.from||this.viewportLines[0].top-t>200?i:this.viewportLines[0]}elementAtHeight(t){return If(this.heightMap.blockAt(this.scaler.fromDOM(t),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Vf{constructor(t,i){this.from=t,this.to=i}}function h4(t,i,l){let s=[],r=t,c=0;if(We.spans(l,t,i,{span(){},point(h,d){if(h>r)s.push({from:r,to:h}),c+=h-r;r=d}},20),r<i)s.push({from:r,to:i}),c+=i-r;return{total:c,ranges:s}}function Qp({total:t,ranges:i},l){if(l<=0)return i[0].from;if(l>=1)return i[i.length-1].to;let s=Math.floor(t*l);for(let r=0;;r++){let{from:c,to:h}=i[r],d=h-c;if(s<=d)return c+s;s-=d}}function Gp(t,i){let l=0;for(let{from:s,to:r}of t.ranges){if(i<=r){l+=i-s;break}l+=r-s}return l/t.total}function d4(t,i){for(let l of t)if(i(l))return l;return}var hT={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};function dT(t){let i=t.facet(fm).filter((s)=>typeof s!="function"),l=t.facet(xv).filter((s)=>typeof s!="function");if(l.length)i.push(We.join(l));return i}class Tv{constructor(t,i,l){let s=0,r=0,c=0;this.viewports=l.map(({from:h,to:d})=>{let m=i.lineAt(h,bt.ByPos,t,0,0).top,y=i.lineAt(d,bt.ByPos,t,0,0).bottom;return s+=y-m,{from:h,to:d,top:m,bottom:y,domTop:0,domBottom:0}}),this.scale=(7000000-s)/(i.height-s);for(let h of this.viewports)h.domTop=c+(h.top-r)*this.scale,c=h.domBottom=h.domTop+(h.bottom-h.top),r=h.bottom}toDOM(t){for(let i=0,l=0,s=0;;i++){let r=i<this.viewports.length?this.viewports[i]:null;if(!r||t<r.top)return s+(t-l)*this.scale;if(t<=r.bottom)return r.domTop+(t-r.top);l=r.bottom,s=r.domBottom}}fromDOM(t){for(let i=0,l=0,s=0;;i++){let r=i<this.viewports.length?this.viewports[i]:null;if(!r||t<r.domTop)return l+(t-s)/this.scale;if(t<=r.domBottom)return r.top+(t-r.domTop);l=r.bottom,s=r.domBottom}}eq(t){if(!(t instanceof Tv))return!1;return this.scale==t.scale&&this.viewports.length==t.viewports.length&&this.viewports.every((i,l)=>i.from==t.viewports[l].from&&i.to==t.viewports[l].to)}}function If(t,i){if(i.scale==1)return t;let l=i.toDOM(t.top),s=i.toDOM(t.bottom);return new Eo(t.from,t.length,l,s-l,Array.isArray(t._content)?t._content.map((r)=>If(r,i)):t._content)}var Wp=fe.define({combine:(t)=>t.join(" ")}),hv=fe.define({combine:(t)=>t.indexOf(!0)>-1}),dv=Ao.newName(),AE=Ao.newName(),TE=Ao.newName(),EE={"&light":"."+AE,"&dark":"."+TE};function pv(t,i,l){return new Ao(i,{finish(s){return/&/.test(s)?s.replace(/&\w*/,(r)=>{if(r=="&")return t;if(!l||!l[r])throw RangeError(`Unsupported selector: ${r}`);return l[r]}):t+" "+s}})}var p4=pv("."+dv,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{userSelect:"none",position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-selectionHandle":{backgroundColor:"currentColor",width:"1.5px"},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:'""',backgroundColor:"inherit",borderRadius:"50%",width:"8px",height:"8px",position:"absolute",left:"-3.25px"},".cm-selectionHandle-start::before":{top:"-8px"},".cm-selectionHandle-end::before":{bottom:"-8px"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},EE),m4={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Fb=K.ie&&K.ie_version<=11;class ME{constructor(t){if(this.view=t,this.active=!1,this.editContext=null,this.selectionRange=new CT,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=t.contentDOM,this.observer=new MutationObserver((i)=>{for(let l of i)this.queue.push(l);if((K.ie&&K.ie_version<=11||K.ios&&t.composing)&&i.some((l)=>l.type=="childList"&&l.removedNodes.length||l.type=="characterData"&&l.oldValue.length>l.target.nodeValue.length))this.flushSoon();else this.flush()}),window.EditContext&&K.android&&t.constructor.EDIT_CONTEXT!==!1&&!(K.chrome&&K.chrome_version<126)){if(this.editContext=new DE(t),t.state.facet(Zl))t.contentDOM.editContext=this.editContext.editContext}if(Fb)this.onCharData=(i)=>{this.queue.push({target:i.target,type:"characterData",oldValue:i.prevValue}),this.flushSoon()};if(this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia)this.printQuery=window.matchMedia("print");if(typeof ResizeObserver=="function")this.resizeScroll=new ResizeObserver(()=>{var i;if(((i=this.view.docView)===null||i===void 0?void 0:i.lastUpdate)<Date.now()-75)this.onResize()}),this.resizeScroll.observe(t.scrollDOM);if(this.addWindowListeners(this.win=t.win),this.start(),typeof IntersectionObserver=="function")this.intersection=new IntersectionObserver((i)=>{if(this.parentCheck<0)this.parentCheck=setTimeout(this.listenForScroll.bind(this),1000);if(i.length>0&&i[i.length-1].intersectionRatio>0!=this.intersecting){if(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView)this.onScrollChanged(document.createEvent("Event"))}},{threshold:[0,0.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((i)=>{if(i.length>0&&i[i.length-1].intersectionRatio>0)this.onScrollChanged(document.createEvent("Event"))},{});this.listenForScroll(),this.readSelectionRange()}onScrollChanged(t){if(this.view.inputState.runHandlers("scroll",t),this.intersecting)this.view.measure()}onScroll(t){if(this.intersecting)this.flush(!1);if(this.editContext)this.view.requestMeasure(this.editContext.measureReq);this.onScrollChanged(t)}onResize(){if(this.resizeTimeout<0)this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50)}onPrint(t){if((t.type=="change"||!t.type)&&!t.matches)return;this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(t){if(this.gapIntersection&&(t.length!=this.gaps.length||this.gaps.some((i,l)=>i!=t[l]))){this.gapIntersection.disconnect();for(let i of t)this.gapIntersection.observe(i);this.gaps=t}}onSelectionChange(t){let i=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:l}=this,s=this.selectionRange;if(l.state.facet(Zl)?l.root.activeElement!=this.dom:!jf(this.dom,s))return;let r=s.anchorNode&&l.docView.tile.nearest(s.anchorNode);if(r&&r.isWidget()&&r.widget.ignoreEvent(t)){if(!i)this.selectionChanged=!1;return}if((K.ie&&K.ie_version<=11||K.android&&K.chrome)&&!l.state.selection.main.empty&&s.focusNode&&$f(s.focusNode,s.focusOffset,s.anchorNode,s.anchorOffset))this.flushSoon();else this.flush(!1)}readSelectionRange(){let{view:t}=this,i=Xf(t.root);if(!i)return!1;let l=K.safari&&t.root.nodeType==11&&t.root.activeElement==this.dom&&g4(this.view,i)||i;if(!l||this.selectionRange.eq(l))return!1;let s=jf(this.dom,l);if(s&&!this.selectionChanged&&t.inputState.lastFocusTime>Date.now()-200&&t.inputState.lastTouchTime<Date.now()-300&&r3(this.dom,l))return this.view.inputState.lastFocusTime=0,t.docView.updateSelection(),!1;if(this.selectionRange.setRange(l),s)this.selectionChanged=!0;return!0}setSelectionRange(t,i){this.selectionRange.set(t.node,t.offset,i.node,i.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let t=0,i=null;for(let l=this.dom;l;)if(l.nodeType==1){if(!i&&t<this.scrollTargets.length&&this.scrollTargets[t]==l)t++;else if(!i)i=this.scrollTargets.slice(0,t);if(i)i.push(l);l=l.assignedSlot||l.parentNode}else if(l.nodeType==11)l=l.host;else break;if(t<this.scrollTargets.length&&!i)i=this.scrollTargets.slice(0,t);if(i){for(let l of this.scrollTargets)l.removeEventListener("scroll",this.onScroll);for(let l of this.scrollTargets=i)l.addEventListener("scroll",this.onScroll)}}ignore(t){if(!this.active)return t();try{return this.stop(),t()}finally{this.start(),this.clear()}}start(){if(this.active)return;if(this.observer.observe(this.dom,m4),Fb)this.dom.addEventListener("DOMCharacterDataModified",this.onCharData);this.active=!0}stop(){if(!this.active)return;if(this.active=!1,this.observer.disconnect(),Fb)this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData)}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(t,i){var l;if(!this.delayedAndroidKey){let s=()=>{let r=this.delayedAndroidKey;if(r){if(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=r.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&r.force)Mu(this.dom,r.key,r.keyCode)}};this.flushingAndroidKey=this.view.win.requestAnimationFrame(s)}if(!this.delayedAndroidKey||t=="Enter")this.delayedAndroidKey={key:t,keyCode:i,force:this.lastChange<Date.now()-50||!!((l=this.delayedAndroidKey)===null||l===void 0?void 0:l.force)}}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){if(this.delayedFlush<0)this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()})}forceFlush(){if(this.delayedFlush>=0)this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1;this.flush()}pendingRecords(){for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}processRecords(){let t=this.pendingRecords();if(t.length)this.queue=[];let i=-1,l=-1,s=!1;for(let r of t){let c=this.readMutation(r);if(!c)continue;if(c.typeOver)s=!0;if(i==-1)({from:i,to:l}=c);else i=Math.min(c.from,i),l=Math.max(c.to,l)}return{from:i,to:l,typeOver:s}}readChange(){let{from:t,to:i,typeOver:l}=this.processRecords(),s=this.selectionChanged&&jf(this.dom,this.selectionRange);if(t<0&&!s)return null;if(t>-1)this.lastChange=Date.now();this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let r=new sE(this.view,t,i,l);return this.view.docView.domChanged={newSel:r.newSel?r.newSel.main:null},r}flush(t=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;if(t)this.readSelectionRange();let i=this.readChange();if(!i)return this.view.requestMeasure(),!1;let l=this.view.state,s=rE(this.view,i);if(this.view.state==l&&(i.domChanged||i.newSel&&!am(this.view.state.selection,i.newSel.main)))this.view.update([]);return s}readMutation(t){let i=this.view.docView.tile.nearest(t.target);if(!i||i.isWidget())return null;if(i.markDirty(t.type=="attributes"),t.type=="childList"){let l=pT(i,t.previousSibling||t.target.previousSibling,-1),s=pT(i,t.nextSibling||t.target.nextSibling,1);return{from:l?i.posAfter(l):i.posAtStart,to:s?i.posBefore(s):i.posAtEnd,typeOver:!1}}else if(t.type=="characterData")return{from:i.posAtStart,to:i.posAtEnd,typeOver:t.target.nodeValue==t.oldValue};else return null}setWindow(t){if(t!=this.win)this.removeWindowListeners(this.win),this.win=t,this.addWindowListeners(this.win)}addWindowListeners(t){if(t.addEventListener("resize",this.onResize),this.printQuery)if(this.printQuery.addEventListener)this.printQuery.addEventListener("change",this.onPrint);else this.printQuery.addListener(this.onPrint);else t.addEventListener("beforeprint",this.onPrint);t.addEventListener("scroll",this.onScroll),t.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(t){if(t.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onResize),this.printQuery)if(this.printQuery.removeEventListener)this.printQuery.removeEventListener("change",this.onPrint);else this.printQuery.removeListener(this.onPrint);else t.removeEventListener("beforeprint",this.onPrint);t.document.removeEventListener("selectionchange",this.onSelectionChange)}update(t){if(this.editContext){if(this.editContext.update(t),t.startState.facet(Zl)!=t.state.facet(Zl))t.view.contentDOM.editContext=t.state.facet(Zl)?this.editContext.editContext:null}}destroy(){var t,i,l;this.stop(),(t=this.intersection)===null||t===void 0||t.disconnect(),(i=this.gapIntersection)===null||i===void 0||i.disconnect(),(l=this.resizeScroll)===null||l===void 0||l.disconnect();for(let s of this.scrollTargets)s.removeEventListener("scroll",this.onScroll);if(this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext)this.view.contentDOM.editContext=null,this.editContext.destroy()}}function pT(t,i,l){while(i){let s=Nt.get(i);if(s&&s.parent==t)return s;let r=i.parentNode;i=r!=t.dom?r:l>0?i.nextSibling:i.previousSibling}return null}function mT(t,i){let{startContainer:l,startOffset:s,endContainer:r,endOffset:c}=i,h=t.docView.domAtPos(t.state.selection.main.anchor,1);if($f(h.node,h.offset,r,c))[l,s,r,c]=[r,c,l,s];return{anchorNode:l,anchorOffset:s,focusNode:r,focusOffset:c}}function g4(t,i){if(i.getComposedRanges){let r=i.getComposedRanges(t.root)[0];if(r)return mT(t,r)}let l=null;function s(r){r.preventDefault(),r.stopImmediatePropagation(),l=r.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",s,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",s,!0),l?mT(t,l):null}class DE{constructor(t){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(t.state);let i=this.editContext=new window.EditContext({text:t.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,t.state.selection.main.anchor))),selectionEnd:this.toContextPos(t.state.selection.main.head)});this.handlers.textupdate=(l)=>{let s=t.state.selection.main,{anchor:r,head:c}=s,h=this.toEditorPos(l.updateRangeStart),d=this.toEditorPos(l.updateRangeEnd);if(t.inputState.composing>=0&&!this.composing)this.composing={contextBase:l.updateRangeStart,editorBase:h,drifted:!1};let m=d-h>l.text.length;if(h==this.from&&r<this.from)h=r;else if(d==this.to&&r>this.to)d=r;let y=uE(t.state.sliceDoc(h,d),l.text,(m?s.from:s.to)-h,m?"end":null);if(!y){let S=G.single(this.toEditorPos(l.selectionStart),this.toEditorPos(l.selectionEnd));if(!am(S,s))t.dispatch({selection:S,userEvent:"select"});return}let b={from:y.from+h,to:y.toA+h,insert:Ye.of(l.text.slice(y.from,y.toB).split(`
224
- `))};if((K.mac||K.android)&&b.from==c-1&&/^\. ?$/.test(l.text)&&t.contentDOM.getAttribute("autocorrect")=="off")b={from:h,to:d,insert:Ye.of([l.text.replace("."," ")])};if(this.pendingContextChange=b,!t.state.readOnly){let S=this.to-this.from+(b.to-b.from+b.insert.length);kv(t,b,G.single(this.toEditorPos(l.selectionStart,S),this.toEditorPos(l.selectionEnd,S)))}if(this.pendingContextChange)this.revertPending(t.state),this.setSelection(t.state);if(b.from<b.to&&!b.insert.length&&t.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(i.text.slice(Math.max(0,l.updateRangeStart-1),Math.min(i.text.length,l.updateRangeStart+1))))this.handlers.compositionend(l)},this.handlers.characterboundsupdate=(l)=>{let s=[],r=null;for(let c=this.toEditorPos(l.rangeStart),h=this.toEditorPos(l.rangeEnd);c<h;c++){let d=t.coordsForChar(c);r=d&&new DOMRect(d.left,d.top,d.right-d.left,d.bottom-d.top)||r||new DOMRect,s.push(r)}i.updateCharacterBounds(l.rangeStart,s)},this.handlers.textformatupdate=(l)=>{let s=[];for(let r of l.getTextFormats()){let{underlineStyle:c,underlineThickness:h}=r;if(!/none/i.test(c)&&!/none/i.test(h)){let d=this.toEditorPos(r.rangeStart),m=this.toEditorPos(r.rangeEnd);if(d<m){let y=`text-decoration: underline ${/^[a-z]/.test(c)?c+" ":c=="Dashed"?"dashed ":c=="Squiggle"?"wavy ":""}${/thin/i.test(h)?1:2}px`;s.push(vt.mark({attributes:{style:y}}).range(d,m))}}}t.dispatch({effects:jT.of(vt.set(s))})},this.handlers.compositionstart=()=>{if(t.inputState.composing<0)t.inputState.composing=0,t.inputState.compositionFirstChange=!0},this.handlers.compositionend=()=>{if(t.inputState.composing=-1,t.inputState.compositionFirstChange=null,this.composing){let{drifted:l}=this.composing;if(this.composing=null,l)this.reset(t.state)}};for(let l in this.handlers)i.addEventListener(l,this.handlers[l]);this.measureReq={read:(l)=>{let s=Xf(l.root);if(s&&s.rangeCount)this.editContext.updateSelectionBounds(s.getRangeAt(0).getBoundingClientRect())}}}applyEdits(t){let i=0,l=!1,s=this.pendingContextChange;if(t.changes.iterChanges((r,c,h,d,m)=>{if(l)return;let y=m.length-(c-r);if(s&&c>=s.to)if(s.from==r&&s.to==c&&s.insert.eq(m)){s=this.pendingContextChange=null,i+=y,this.to+=y;return}else s=null,this.revertPending(t.state);if(r+=i,c+=i,c<=this.from)this.from+=y,this.to+=y;else if(r<this.to){if(r<this.from||c>this.to||this.to-this.from+m.length>30000){l=!0;return}this.editContext.updateText(this.toContextPos(r),this.toContextPos(c),m.toString()),this.to+=y}i+=y}),s&&!l)this.revertPending(t.state);return!l}update(t){let i=this.pendingContextChange,l=t.startState.selection.main;if(this.composing&&(this.composing.drifted||!t.changes.touchesRange(l.from,l.to)&&t.transactions.some((s)=>!s.isUserEvent("input.type")&&s.changes.touchesRange(this.from,this.to))))this.composing.drifted=!0,this.composing.editorBase=t.changes.mapPos(this.composing.editorBase);else if(!this.applyEdits(t)||!this.rangeIsValid(t.state))this.pendingContextChange=null,this.reset(t.state);else if(t.docChanged||t.selectionSet||i)this.setSelection(t.state);if(t.geometryChanged||t.docChanged||t.selectionSet)t.view.requestMeasure(this.measureReq)}resetRange(t){let{head:i}=t.selection.main;this.from=Math.max(0,i-1e4),this.to=Math.min(t.doc.length,i+1e4)}reset(t){this.resetRange(t),this.editContext.updateText(0,this.editContext.text.length,t.doc.sliceString(this.from,this.to)),this.setSelection(t)}revertPending(t){let i=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(i.from),this.toContextPos(i.from+i.insert.length),t.doc.sliceString(i.from,i.to))}setSelection(t){let{main:i}=t.selection,l=this.toContextPos(Math.max(this.from,Math.min(this.to,i.anchor))),s=this.toContextPos(i.head);if(this.editContext.selectionStart!=l||this.editContext.selectionEnd!=s)this.editContext.updateSelection(l,s)}rangeIsValid(t){let{head:i}=t.selection.main;return!(this.from>0&&i-this.from<500||this.to<t.doc.length&&this.to-i<500||this.to-this.from>30000)}toEditorPos(t,i=this.to-this.from){t=Math.min(t,i);let l=this.composing;return l&&l.drifted?l.editorBase+(t-l.contextBase):t+this.from}toContextPos(t){let i=this.composing;return i&&i.drifted?i.contextBase+(t-i.editorBase):t-this.from}destroy(){for(let t in this.handlers)this.editContext.removeEventListener(t,this.handlers[t])}}class re{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(t={}){var i;if(this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),t.parent)t.parent.appendChild(this.dom);let{dispatch:l}=t;if(this.dispatchTransactions=t.dispatchTransactions||l&&((s)=>s.forEach((r)=>l(r,this)))||((s)=>this.update(s)),this.dispatch=this.dispatch.bind(this),this._root=t.root||a3(t.parent)||document,this.viewState=new fv(this,t.state||qe.create(t)),t.scrollTo&&t.scrollTo.is(Pp))this.viewState.scrollTarget=t.scrollTo.value.clip(this.viewState.state);this.plugins=this.state.facet(Tu).map((s)=>new Zp(s));for(let s of this.plugins)s.update(this);if(this.observer=new ME(this),this.inputState=new cE(this),this.inputState.ensureHandlers(this.plugins),this.docView=new sv(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),(i=document.fonts)===null||i===void 0?void 0:i.ready)document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...t){let i=t.length==1&&t[0]instanceof un?t:t.length==1&&Array.isArray(t[0])?t[0]:[this.state.update(...t)];this.dispatchTransactions(i,this)}update(t){if(this.updateState!=0)throw Error("Calls to EditorView.update are not allowed while an update is in progress");let i=!1,l=!1,s,r=this.state;for(let S of t){if(S.startState!=r)throw RangeError("Trying to update state with a transaction that doesn't start from the previous state.");r=S.state}if(this.destroyed){this.viewState.state=r;return}let c=this.hasFocus,h=0,d=null;if(t.some((S)=>S.annotation(yE)))this.inputState.notifiedFocused=c,h=1;else if(c!=this.inputState.notifiedFocused){if(this.inputState.notifiedFocused=c,d=bE(r,c),!d)h=1}let m=this.observer.delayedAndroidKey,y=null;if(m){if(this.observer.clearDelayedAndroidKey(),y=this.observer.readChange(),y&&!this.state.doc.eq(r.doc)||!this.state.selection.eq(r.selection))y=null}else this.observer.clear();if(r.facet(qe.phrases)!=this.state.facet(qe.phrases))return this.setState(r);s=lm.create(this,r,t),s.flags|=h;let b=this.viewState.scrollTarget;try{this.updateState=2;for(let S of t){if(b)b=b.map(S.changes);if(S.scrollIntoView){let{main:w}=S.state.selection,{x:k,y:E}=this.state.facet(re.cursorScrollMargin);b=new Du(w.empty?w:G.cursor(w.head,w.head>w.anchor?-1:1),"nearest","nearest",E,k)}for(let w of S.effects)if(w.is(Pp))b=w.value.clip(this.state)}if(this.viewState.update(s,b),this.bidiCache=um.update(this.bidiCache,s.changes),!s.empty)this.updatePlugins(s),this.inputState.update(s);if(i=this.docView.update(s),this.state.facet(qf)!=this.styleModules)this.mountStyles();l=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(i,t.some((S)=>S.isUserEvent("select.pointer")))}finally{this.updateState=0}if(s.startState.facet(Wp)!=s.state.facet(Wp))this.viewState.mustMeasureContent=!0;if(i||l||b||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)this.requestMeasure();if(i)this.docViewUpdate();if(!s.empty)for(let S of this.state.facet(lv))try{S(s)}catch(w){Ji(this.state,w,"update listener")}if(d||y)Promise.resolve().then(()=>{if(d&&this.state==d.startState)this.dispatch(d);if(y){if(!rE(this,y)&&m.force)Mu(this.contentDOM,m.key,m.keyCode)}})}setState(t){if(this.updateState!=0)throw Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=t;return}this.updateState=2;let i=this.hasFocus;try{for(let l of this.plugins)l.destroy(this);this.viewState=new fv(this,t),this.plugins=t.facet(Tu).map((l)=>new Zp(l)),this.pluginMap.clear();for(let l of this.plugins)l.update(this);this.docView.destroy(),this.docView=new sv(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}if(i)this.focus();this.requestMeasure()}updatePlugins(t){let i=t.startState.facet(Tu),l=t.state.facet(Tu);if(i!=l){let s=[];for(let r of l){let c=i.indexOf(r);if(c<0)s.push(new Zp(r));else{let h=this.plugins[c];h.mustUpdate=t,s.push(h)}}for(let r of this.plugins)if(r.mustUpdate!=t)r.destroy(this);this.plugins=s,this.pluginMap.clear()}else for(let s of this.plugins)s.mustUpdate=t;for(let s=0;s<this.plugins.length;s++)this.plugins[s].update(this);if(i!=l)this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let t of this.plugins){let i=t.value;if(i&&i.docViewUpdate)try{i.docViewUpdate(this)}catch(l){Ji(this.state,l,"doc view update listener")}}}measure(t=!0){if(this.destroyed)return;if(this.measureScheduled>-1)this.win.cancelAnimationFrame(this.measureScheduled);if(this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}if(this.measureScheduled=0,t)this.observer.forceFlush();let i=null,l=this.viewState.scrollParent,s=this.viewState.getScrollOffset(),{scrollAnchorPos:r,scrollAnchorHeight:c}=this.viewState;if(Math.abs(s-this.viewState.scrollOffset)>1)c=-1;this.viewState.scrollAnchorHeight=-1;try{for(let h=0;;h++){if(c<0)if(TT(l||this.win))r=-1,c=this.viewState.heightMap.height;else{let w=this.viewState.scrollAnchorAt(s);r=w.from,c=w.top}this.updateState=1;let d=this.viewState.measure();if(!d&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(h>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let m=[];if(!(d&4))[this.measureRequests,m]=[m,this.measureRequests];let y=m.map((w)=>{try{return w.read(this)}catch(k){return Ji(this.state,k),gT}}),b=lm.create(this,this.state,[]),S=!1;if(b.flags|=d,!i)i=b;else i.flags|=d;if(this.updateState=2,!b.empty){if(this.updatePlugins(b),this.inputState.update(b),this.updateAttrs(),S=this.docView.update(b),S)this.docViewUpdate()}for(let w=0;w<m.length;w++)if(y[w]!=gT)try{let k=m[w];if(k.write)k.write(y[w],this)}catch(k){Ji(this.state,k)}if(S)this.docView.updateSelection(!0);if(!b.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,c=-1;continue}else{let k=((r<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(r).top)-c)/this.scaleY;if((k>1||k<-1)&&!(K.ios&&this.inputState.lastIOSMomentumScroll>Date.now()-100)&&(l==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){if(s=s+k,l)l.scrollTop+=k;else this.win.scrollBy(0,k);c=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(i&&!i.empty)for(let h of this.state.facet(lv))h(i)}get themeClasses(){return dv+" "+(this.state.facet(hv)?TE:AE)+" "+this.state.facet(Wp)}updateAttrs(){let t=yT(this,$T,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),i={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:!this.state.facet(Zl)?"false":"true",class:"cm-content",style:`${K.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};if(this.state.readOnly)i["aria-readonly"]="true";yT(this,wv,i);let l=this.observer.ignore(()=>{let s=W2(this.contentDOM,this.contentAttrs,i),r=W2(this.dom,this.editorAttrs,t);return s||r});return this.editorAttrs=t,this.contentAttrs=i,l}showAnnouncements(t){let i=!0;for(let l of t)for(let s of l.effects)if(s.is(re.announce)){if(i)this.announceDOM.textContent="";i=!1;let r=this.announceDOM.appendChild(document.createElement("div"));r.textContent=s.value}}mountStyles(){this.styleModules=this.state.facet(qf);let t=this.state.facet(re.cspNonce);Ao.mount(this.root,this.styleModules.concat(p4).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(this.updateState==2)throw Error("Reading the editor layout isn't allowed during an update");if(this.updateState==0&&this.measureScheduled>-1)this.measure(!1)}requestMeasure(t){if(this.measureScheduled<0)this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure());if(t){if(this.measureRequests.indexOf(t)>-1)return;if(t.key!=null){for(let i=0;i<this.measureRequests.length;i++)if(this.measureRequests[i].key===t.key){this.measureRequests[i]=t;return}}this.measureRequests.push(t)}}plugin(t){let i=this.pluginMap.get(t);if(i===void 0||i&&i.plugin!=t)this.pluginMap.set(t,i=this.plugins.find((l)=>l.plugin==t)||null);return i&&i.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(t){return this.readMeasured(),this.viewState.elementAtHeight(t)}lineBlockAtHeight(t){return this.readMeasured(),this.viewState.lineBlockAtHeight(t)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(t){return this.viewState.lineBlockAt(t)}get contentHeight(){return this.viewState.contentHeight}moveByChar(t,i,l){return Wb(this,t,tT(this,t,i,l))}moveByGroup(t,i){return Wb(this,t,tT(this,t,i,(l)=>U3(this,t.head,l)))}visualLineSide(t,i){let l=this.bidiSpans(t),s=this.textDirectionAt(t.from),r=l[i?l.length-1:0];return G.cursor(r.side(i,s)+t.from,r.forward(!i,s)?1:-1)}moveToLineBoundary(t,i,l=!0){return _3(this,t,i,l)}moveVertically(t,i,l){return Wb(this,t,q3(this,t,i,l))}domAtPos(t,i=1){return this.docView.domAtPos(t,i)}posAtDOM(t,i=0){return this.docView.posFromDOM(t,i)}posAtCoords(t,i=!0){this.readMeasured();let l=rv(this,t,i);return l&&l.pos}posAndSideAtCoords(t,i=!0){return this.readMeasured(),rv(this,t,i)}coordsAtPos(t,i=1){this.readMeasured();let l=this.state.doc.lineAt(t),s=this.bidiSpans(l),r=s[Do.find(s,t-l.from,-1,i)];return this.docView.coordsAt(t,i,r.dir==Qt.RTL)}coordsForChar(t){return this.readMeasured(),this.docView.coordsForChar(t)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(t){if(!this.state.facet(VT)||t<this.viewport.from||t>this.viewport.to)return this.textDirection;return this.readMeasured(),this.docView.textDirectionAt(t)}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(t){if(t.length>y4)return LT(t.length);let i=this.textDirectionAt(t.from),l;for(let r of this.bidiCache)if(r.from==t.from&&r.dir==i&&(r.fresh||RT(r.isolates,l=Z2(this,t))))return r.order;if(!l)l=Z2(this,t);let s=m3(t.text,i,l);return this.bidiCache.push(new um(t.from,t.to,i,l,!0,s)),s}get hasFocus(){var t;return(this.dom.ownerDocument.hasFocus()||K.safari&&((t=this.inputState)===null||t===void 0?void 0:t.lastContextMenu)>Date.now()-30000)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{AT(this.contentDOM),this.docView.updateSelection()})}setRoot(t){if(this._root!=t)this._root=t,this.observer.setWindow((t.nodeType==9?t:t.ownerDocument).defaultView||window),this.mountStyles()}destroy(){if(this.root.activeElement==this.contentDOM)this.contentDOM.blur();for(let t of this.plugins)t.destroy(this);if(this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1)this.win.cancelAnimationFrame(this.measureScheduled);this.destroyed=!0}static scrollIntoView(t,i={}){var l,s,r,c;return Pp.of(new Du(typeof t=="number"?G.cursor(t):t,(l=i.y)!==null&&l!==void 0?l:"nearest",(s=i.x)!==null&&s!==void 0?s:"nearest",(r=i.yMargin)!==null&&r!==void 0?r:5,(c=i.xMargin)!==null&&c!==void 0?c:5))}scrollSnapshot(){let{scrollTop:t,scrollLeft:i}=this.scrollDOM,l=this.viewState.scrollAnchorAt(t);return Pp.of(new Du(G.cursor(l.from),"start","start",l.top-t,i,!0))}setTabFocusMode(t){if(t==null)this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1;else if(typeof t=="boolean")this.inputState.tabFocusMode=t?0:-1;else if(this.inputState.tabFocusMode!=0)this.inputState.tabFocusMode=Date.now()+t}static domEventHandlers(t){return ts.define(()=>({}),{eventHandlers:t})}static domEventObservers(t){return ts.define(()=>({}),{eventObservers:t})}static theme(t,i){let l=Ao.newName(),s=[Wp.of(l),qf.of(pv(`.${l}`,t))];if(i&&i.dark)s.push(hv.of(!0));return s}static baseTheme(t){return Fl.lowest(qf.of(pv("."+dv,t,EE)))}static findFromDOM(t){var i;let l=t.querySelector(".cm-content"),s=l&&Nt.get(l)||Nt.get(t);return((i=s===null||s===void 0?void 0:s.root)===null||i===void 0?void 0:i.view)||null}}re.styleModule=qf;re.inputHandler=UT;re.clipboardInputFilter=vv;re.clipboardOutputFilter=Sv;re.scrollHandler=IT;re.focusChangeEffect=qT;re.perLineTextDirection=VT;re.exceptionSink=_T;re.updateListener=lv;re.editable=Zl;re.mouseSelectionStyle=NT;re.dragMovesSelection=HT;re.clickAddsSelectionRange=zT;re.decorations=fm;re.blockWrappers=PT;re.outerDecorations=xv;re.atomicRanges=Jf;re.bidiIsolatedRanges=YT;re.cursorScrollMargin=fe.define({combine:(t)=>{let i=5,l=5;for(let s of t)if(typeof s=="number")i=l=s;else({x:i,y:l}=s);return{x:i,y:l}}});re.scrollMargins=XT;re.darkTheme=hv;re.cspNonce=fe.define({combine:(t)=>t.length?t[0]:""});re.contentAttributes=wv;re.editorAttributes=$T;re.lineWrapping=re.contentAttributes.of({class:"cm-lineWrapping"});re.announce=Ct.define();var y4=4096,gT={};class um{constructor(t,i,l,s,r,c){this.from=t,this.to=i,this.dir=l,this.isolates=s,this.fresh=r,this.order=c}static update(t,i){if(i.empty&&!t.some((r)=>r.fresh))return t;let l=[],s=t.length?t[t.length-1].dir:Qt.LTR;for(let r=Math.max(0,t.length-10);r<t.length;r++){let c=t[r];if(c.dir==s&&!i.touchesRange(c.from,c.to))l.push(new um(i.mapPos(c.from,1),i.mapPos(c.to,-1),c.dir,c.isolates,!1,c.order))}return l}}function yT(t,i,l){for(let s=t.state.facet(i),r=s.length-1;r>=0;r--){let c=s[r],h=typeof c=="function"?c(t):c;if(h)gv(h,l)}return l}var b4=K.mac?"mac":K.windows?"win":K.linux?"linux":"key";function v4(t,i){let l=t.split(/-(?!$)/),s=l[l.length-1];if(s=="Space")s=" ";let r,c,h,d;for(let m=0;m<l.length-1;++m){let y=l[m];if(/^(cmd|meta|m)$/i.test(y))d=!0;else if(/^a(lt)?$/i.test(y))r=!0;else if(/^(c|ctrl|control)$/i.test(y))c=!0;else if(/^s(hift)?$/i.test(y))h=!0;else if(/^mod$/i.test(y))if(i=="mac")d=!0;else c=!0;else throw Error("Unrecognized modifier name: "+y)}if(r)s="Alt-"+s;if(c)s="Ctrl-"+s;if(d)s="Meta-"+s;if(h)s="Shift-"+s;return s}function Fp(t,i,l){if(i.altKey)t="Alt-"+t;if(i.ctrlKey)t="Ctrl-"+t;if(i.metaKey)t="Meta-"+t;if(l!==!1&&i.shiftKey)t="Shift-"+t;return t}var S4=Fl.default(re.domEventHandlers({keydown(t,i){return C4(w4(i.state),t,i,"editor")}})),eh=fe.define({enables:S4}),bT=new WeakMap;function w4(t){let i=t.facet(eh),l=bT.get(i);if(!l)bT.set(i,l=k4(i.reduce((s,r)=>s.concat(r),[])));return l}var Ks=null,x4=4000;function k4(t,i=b4){let l=Object.create(null),s=Object.create(null),r=(h,d)=>{let m=s[h];if(m==null)s[h]=d;else if(m!=d)throw Error("Key binding "+h+" is used both as a regular binding and as a multi-stroke prefix")},c=(h,d,m,y,b)=>{var S,w;let k=l[h]||(l[h]=Object.create(null)),E=d.split(/ (?!$)/).map((N)=>v4(N,i));for(let N=1;N<E.length;N++){let q=E.slice(0,N).join(" ");if(r(q,!0),!k[q])k[q]={preventDefault:!0,stopPropagation:!1,run:[(J)=>{let ae=Ks={view:J,prefix:q,scope:h};return setTimeout(()=>{if(Ks==ae)Ks=null},x4),!0}]}}let R=E.join(" ");r(R,!1);let L=k[R]||(k[R]={preventDefault:!1,stopPropagation:!1,run:((w=(S=k._any)===null||S===void 0?void 0:S.run)===null||w===void 0?void 0:w.slice())||[]});if(m)L.run.push(m);if(y)L.preventDefault=!0;if(b)L.stopPropagation=!0};for(let h of t){let d=h.scope?h.scope.split(" "):["editor"];if(h.any)for(let y of d){let b=l[y]||(l[y]=Object.create(null));if(!b._any)b._any={preventDefault:!1,stopPropagation:!1,run:[]};let{any:S}=h;for(let w in b)b[w].run.push((k)=>S(k,mv))}let m=h[i]||h.key;if(!m)continue;for(let y of d)if(c(y,m,h.run,h.preventDefault,h.stopPropagation),h.shift)c(y,"Shift-"+m,h.shift,h.preventDefault,h.stopPropagation)}return l}var mv=null;function C4(t,i,l,s){mv=i;let r=Y2(i),c=_b(r,0),h=Ub(c)==r.length&&r!=" ",d="",m=!1,y=!1,b=!1;if(Ks&&Ks.view==l&&Ks.scope==s){if(d=Ks.prefix+" ",hE.indexOf(i.keyCode)<0)y=!0,Ks=null}let S=new Set,w=(L)=>{if(L){for(let N of L.run)if(!S.has(N)){if(S.add(N),N(l)){if(L.stopPropagation)b=!0;return!0}}if(L.preventDefault){if(L.stopPropagation)b=!0;y=!0}}return!1},k=t[s],E,R;if(k){if(w(k[d+Fp(r,i,!h)]))m=!0;else if(h&&(i.altKey||i.metaKey||i.ctrlKey)&&!(K.windows&&i.ctrlKey&&i.altKey)&&!(K.mac&&i.altKey&&!(i.ctrlKey||i.metaKey))&&(E=Jl[i.keyCode])&&E!=r){if(w(k[d+Fp(E,i,!0)]))m=!0;else if(i.shiftKey&&(R=Cu[i.keyCode])!=r&&R!=E&&w(k[d+Fp(R,i,!1)]))m=!0}else if(h&&i.shiftKey&&w(k[d+Fp(r,i,!0)]))m=!0;if(!m&&w(k._any))m=!0}if(y)m=!0;if(m&&b)i.stopPropagation();return mv=null,m}var l6=/x/.unicode!=null?"gu":"g";class ta extends ko{compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}eq(t){return!1}destroy(t){}}ta.prototype.elementClass="";ta.prototype.toDOM=void 0;ta.prototype.mapMode=xn.TrackBefore;ta.prototype.startSide=ta.prototype.endSide=-1;ta.prototype.point=!0;var Ev,ia=new Qn;function oh(t){return fe.define({combine:t?(i)=>i.concat(t):void 0})}var mm=new Qn;class si{constructor(t,i,l=[],s=""){if(this.data=t,this.name=s,!qe.prototype.hasOwnProperty("tree"))Object.defineProperty(qe.prototype,"tree",{get(){return jt(this)}});this.parser=i,this.extension=[zu.of(this),qe.languageData.of((r,c,h)=>{let d=OE(r,c,h),m=d.type.prop(ia);if(!m)return[];let y=r.facet(m),b=d.type.prop(mm);if(b){let S=d.resolve(c-d.from,h);for(let w of b)if(w.test(S,r)){let k=r.facet(w.facet);return w.type=="replace"?k:k.concat(y)}}return y})].concat(l)}isActiveAt(t,i,l=-1){return OE(t,i,l).type.prop(ia)==this.data}findRegions(t){let i=t.facet(zu);if((i===null||i===void 0?void 0:i.data)==this.data)return[{from:0,to:t.doc.length}];if(!i||!i.allowsNesting)return[];let l=[],s=(r,c)=>{if(r.prop(ia)==this.data){l.push({from:c,to:c+r.length});return}let h=r.prop(Qn.mounted);if(h){if(h.tree.prop(ia)==this.data){if(h.overlay)for(let d of h.overlay)l.push({from:d.from+c,to:d.to+c});else l.push({from:c,to:c+r.length});return}else if(h.overlay){let d=l.length;if(s(h.tree,h.overlay[0].from+c),l.length>d)return}}for(let d=0;d<r.children.length;d++){let m=r.children[d];if(m instanceof Xn)s(m,r.positions[d]+c)}};return s(jt(t),0),l}get allowsNesting(){return!0}}si.setState=Ct.define();function OE(t,i,l){let s=t.facet(zu),r=jt(t).topNode;if(!s||s.allowsNesting){for(let c=r;c;c=c.enter(i,l,lr.ExcludeBuffers|lr.EnterBracketed))if(c.type.isTop)r=c}return r}class ns extends si{constructor(t,i,l){super(t,i,[],l);this.parser=i}static define(t){let i=oh(t.languageData);return new ns(i,t.parser.configure({props:[ia.add((l)=>l.isTop?i:void 0)]}),t.name)}configure(t,i){return new ns(this.data,this.parser.configure(t),i||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function jt(t){let i=t.field(si.state,!1);return i?i.tree:Xn.empty}class _E{constructor(t){this.doc=t,this.cursorPos=0,this.string="",this.cursor=t.iter()}get length(){return this.doc.length}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,i){let l=this.cursorPos-this.string.length;if(t<l||i>=this.cursorPos)return this.doc.sliceString(t,i);else return this.string.slice(t-l,i-l)}}var th=null;class Lu{constructor(t,i,l=[],s,r,c,h,d){this.parser=t,this.state=i,this.fragments=l,this.tree=s,this.treeLen=r,this.viewport=c,this.skipped=h,this.scheduleOn=d,this.parse=null,this.tempSkipped=[]}static create(t,i,l){return new Lu(t,i,[],Xn.empty,0,l,[],null)}startParse(){return this.parser.startParse(new _E(this.state.doc),this.fragments)}work(t,i){if(i!=null&&i>=this.state.doc.length)i=void 0;if(this.tree!=Xn.empty&&this.isDone(i!==null&&i!==void 0?i:this.state.doc.length))return this.takeTree(),!0;return this.withContext(()=>{var l;if(typeof t=="number"){let s=Date.now()+t;t=()=>Date.now()>s}if(!this.parse)this.parse=this.startParse();if(i!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>i)&&i<this.state.doc.length)this.parse.stopAt(i);for(;;){let s=this.parse.advance();if(s)if(this.fragments=this.withoutTempSkipped(nh.addTree(s,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(l=this.parse.stoppedAt)!==null&&l!==void 0?l:this.state.doc.length,this.tree=s,this.parse=null,this.treeLen<(i!==null&&i!==void 0?i:this.state.doc.length))this.parse=this.startParse();else return!0;if(t())return!1}})}takeTree(){let t,i;if(this.parse&&(t=this.parse.parsedPos)>=this.treeLen){if(this.parse.stoppedAt==null||this.parse.stoppedAt>t)this.parse.stopAt(t);this.withContext(()=>{while(!(i=this.parse.advance()));}),this.treeLen=t,this.tree=i,this.fragments=this.withoutTempSkipped(nh.addTree(this.tree,this.fragments,!0)),this.parse=null}}withContext(t){let i=th;th=this;try{return t()}finally{th=i}}withoutTempSkipped(t){for(let i;i=this.tempSkipped.pop();)t=RE(t,i.from,i.to);return t}changes(t,i){let{fragments:l,tree:s,treeLen:r,viewport:c,skipped:h}=this;if(this.takeTree(),!t.empty){let d=[];if(t.iterChangedRanges((m,y,b,S)=>d.push({fromA:m,toA:y,fromB:b,toB:S})),l=nh.applyChanges(l,d),s=Xn.empty,r=0,c={from:t.mapPos(c.from,-1),to:t.mapPos(c.to,1)},this.skipped.length){h=[];for(let m of this.skipped){let y=t.mapPos(m.from,1),b=t.mapPos(m.to,-1);if(y<b)h.push({from:y,to:b})}}}return new Lu(this.parser,i,l,s,r,c,h,this.scheduleOn)}updateViewport(t){if(this.viewport.from==t.from&&this.viewport.to==t.to)return!1;this.viewport=t;let i=this.skipped.length;for(let l=0;l<this.skipped.length;l++){let{from:s,to:r}=this.skipped[l];if(s<t.to&&r>t.from)this.fragments=RE(this.fragments,s,r),this.skipped.splice(l--,1)}if(this.skipped.length>=i)return!1;return this.reset(),!0}reset(){if(this.parse)this.takeTree(),this.parse=null}skipUntilInView(t,i){this.skipped.push({from:t,to:i})}static getSkippingParser(t){return new class extends pm{createParse(i,l,s){let r=s[0].from,c=s[s.length-1].to;return{parsedPos:r,advance(){let d=th;if(d){for(let m of s)d.tempSkipped.push(m);if(t)d.scheduleOn=d.scheduleOn?Promise.all([d.scheduleOn,t]):t}return this.parsedPos=c,new Xn(is.none,[],[],c-r)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let i=this.fragments;return this.treeLen>=t&&i.length&&i[0].from==0&&i[0].to>=t}static get(){return th}}function RE(t,i,l){return nh.applyChanges(t,[{fromA:i,toA:l,fromB:i,toB:l}])}class Bu{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let i=this.context.changes(t.changes,t.state),l=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),i.viewport.to);if(!i.work(20,l))i.takeTree();return new Bu(i)}static init(t){let i=Math.min(3000,t.doc.length),l=Lu.create(t.facet(zu).parser,t,{from:0,to:i});if(!l.work(20,i))l.takeTree();return new Bu(l)}}si.state=Co.define({create:Bu.init,update(t,i){for(let l of i.effects)if(l.is(si.setState))return l.value;if(i.startState.facet(zu)!=i.state.facet(zu))return Bu.init(i.state);return t.apply(i)}});var UE=(t)=>{let i=setTimeout(()=>t(),500);return()=>clearTimeout(i)};if(typeof requestIdleCallback<"u")UE=(t)=>{let i=-1,l=setTimeout(()=>{i=requestIdleCallback(t,{timeout:400})},100);return()=>i<0?clearTimeout(l):cancelIdleCallback(i)};var Mv=typeof navigator<"u"&&((Ev=navigator.scheduling)===null||Ev===void 0?void 0:Ev.isInputPending)?()=>navigator.scheduling.isInputPending():null,A4=ts.fromClass(class{constructor(i){this.view=i,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(i){let l=this.view.state.field(si.state).context;if(l.updateViewport(i.view.viewport)||this.view.viewport.to>l.treeLen)this.scheduleWork();if(i.docChanged||i.selectionSet){if(this.view.hasFocus)this.chunkBudget+=50;this.scheduleWork()}this.checkAsyncSchedule(l)}scheduleWork(){if(this.working)return;let{state:i}=this.view,l=i.field(si.state);if(l.tree!=l.context.tree||!l.context.isDone(i.doc.length))this.working=UE(this.work)}work(i){this.working=null;let l=Date.now();if(this.chunkEnd<l&&(this.chunkEnd<0||this.view.hasFocus))this.chunkEnd=l+30000,this.chunkBudget=3000;if(this.chunkBudget<=0)return;let{state:s,viewport:{to:r}}=this.view,c=s.field(si.state);if(c.tree==c.context.tree&&c.context.isDone(r+1e5))return;let h=Date.now()+Math.min(this.chunkBudget,100,i&&!Mv?Math.max(25,i.timeRemaining()-5):1e9),d=c.context.treeLen<r&&s.doc.length>r+1000,m=c.context.work(()=>Mv&&Mv()||Date.now()>h,r+(d?0:1e5));if(this.chunkBudget-=Date.now()-l,m||this.chunkBudget<=0)c.context.takeTree(),this.view.dispatch({effects:si.setState.of(new Bu(c.context))});if(this.chunkBudget>0&&!(m&&!d))this.scheduleWork();this.checkAsyncSchedule(c.context)}checkAsyncSchedule(i){if(i.scheduleOn)this.workScheduled++,i.scheduleOn.then(()=>this.scheduleWork()).catch((l)=>Ji(this.view.state,l)).then(()=>this.workScheduled--),i.scheduleOn=null}destroy(){if(this.working)this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),zu=fe.define({combine(t){return t.length?t[0]:null},enables:(t)=>[si.state,A4,re.contentAttributes.compute([t],(i)=>{let l=i.facet(t);return l&&l.name?{"data-language":l.name}:{}})]});class pl{constructor(t,i=[]){this.language=t,this.support=i,this.extension=[t,i]}}class lh{constructor(t,i,l,s,r,c=void 0){this.name=t,this.alias=i,this.extensions=l,this.filename=s,this.loadFunc=r,this.support=c,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then((t)=>this.support=t,(t)=>{throw this.loading=null,t}))}static of(t){let{load:i,support:l}=t;if(!i){if(!l)throw RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");i=()=>Promise.resolve(l)}return new lh(t.name,(t.alias||[]).concat(t.name).map((s)=>s.toLowerCase()),t.extensions||[],t.filename,i,l)}static matchFilename(t,i){for(let s of t)if(s.filename&&s.filename.test(i))return s;let l=/\.([^.]+)$/.exec(i);if(l){for(let s of t)if(s.extensions.indexOf(l[1])>-1)return s}return null}static matchLanguageName(t,i,l=!0){i=i.toLowerCase();for(let s of t)if(s.alias.some((r)=>r==i))return s;if(l)for(let s of t)for(let r of s.alias){let c=i.indexOf(r);if(c>-1&&(r.length>2||!/\w/.test(i[c-1])&&!/\w/.test(i[c+r.length])))return s}return null}}var gm=fe.define({combine:(t)=>{if(!t.length)return" ";let i=t[0];if(!i||/\S/.test(i)||Array.from(i).some((l)=>l!=i[0]))throw Error("Invalid indent unit: "+JSON.stringify(t[0]));return i}});var oa=new Qn;function T4(t){let i=t.node,l=i.childAfter(i.from),s=i.lastChild;if(!l)return null;let r=t.options.simulateBreak,c=t.state.doc.lineAt(l.from),h=r==null||r<=c.from?c.to:Math.min(c.to,r);for(let d=l.to;;){let m=i.childAfter(d);if(!m||m==s)return null;if(!m.type.isSkipped){if(m.from>=h)return null;let y=/^ */.exec(c.text.slice(l.to-c.from))[0].length;return{from:l.from,to:l.to+y}}d=m.to}}function qE({closing:t,align:i=!0,units:l=1}){return(s)=>E4(s,i,l,t)}function E4(t,i,l,s,r){let c=t.textAfter,h=c.match(/^\s*/)[0].length,d=s&&c.slice(h,h+s.length)==s||r==t.pos+h,m=i?T4(t):null;if(m)return d?t.column(m.from):t.column(m.to);return t.baseIndent+(d?0:t.unit*l)}var VE=(t)=>t.baseIndent;function Hu({except:t,units:i=1}={}){return(l)=>{let s=t&&t.test(l.textAfter);return l.baseIndent+(s?0:i*l.unit)}}var IE=fe.define(),os=new Qn;function ym(t){let{firstChild:i,lastChild:l}=t;return i&&i.to<l.from?{from:i.to,to:l.type.isError?t.to:l.from}:null}class Nu{constructor(t,i){this.specs=t;let l;function s(h){let d=Ao.newName();return(l||(l=Object.create(null)))["."+d]=h,d}let r=typeof i.all=="string"?i.all:i.all?s(i.all):void 0,c=i.scope;this.scope=c instanceof si?(h)=>h.prop(ia)==c.data:c?(h)=>h==c:void 0,this.style=HE(t.map((h)=>({tag:h.tag,class:h.class||s(Object.assign({},h,{tag:null}))})),{all:r}).style,this.module=l?new Ao(l):null,this.themeType=i.themeType}static define(t,i){return new Nu(t,i||{})}}var Rv=fe.define(),jE=fe.define({combine(t){return t.length?[t[0]]:null}});function Dv(t){let i=t.facet(Rv);return i.length?i:t.facet(jE)}function $E(t,i){let l=[M4],s;if(t instanceof Nu){if(t.module)l.push(re.styleModule.of(t.module));s=t.themeType}if(i===null||i===void 0?void 0:i.fallback)l.push(jE.of(t));else if(s)l.push(Rv.computeN([re.darkTheme],(r)=>r.facet(re.darkTheme)==(s=="dark")?[t]:[]));else l.push(Rv.of(t));return l}class PE{constructor(t){this.markCache=Object.create(null),this.tree=jt(t.state),this.decorations=this.buildDeco(t,Dv(t.state)),this.decoratedTo=t.viewport.to}update(t){let i=jt(t.state),l=Dv(t.state),s=l!=Dv(t.startState),{viewport:r}=t.view,c=t.changes.mapPos(this.decoratedTo,1);if(i.length<r.to&&!s&&i.type==this.tree.type&&c>=r.to)this.decorations=this.decorations.map(t.changes),this.decoratedTo=c;else if(i!=this.tree||t.viewportChanged||s)this.tree=i,this.decorations=this.buildDeco(t.view,l),this.decoratedTo=r.to}buildDeco(t,i){if(!i||!this.tree.length)return vt.none;let l=new Za;for(let{from:s,to:r}of t.visibleRanges)NE(this.tree,i,(c,h,d)=>{l.add(c,h,this.markCache[d]||(this.markCache[d]=vt.mark({class:d})))},s,r);return l.finish()}}var M4=Fl.high(ts.fromClass(PE,{decorations:(t)=>t.decorations})),p6=Nu.define([{tag:Q.meta,color:"#404740"},{tag:Q.link,textDecoration:"underline"},{tag:Q.heading,textDecoration:"underline",fontWeight:"bold"},{tag:Q.emphasis,fontStyle:"italic"},{tag:Q.strong,fontWeight:"bold"},{tag:Q.strikethrough,textDecoration:"line-through"},{tag:Q.keyword,color:"#708"},{tag:[Q.atom,Q.bool,Q.url,Q.contentSeparator,Q.labelName],color:"#219"},{tag:[Q.literal,Q.inserted],color:"#164"},{tag:[Q.string,Q.deleted],color:"#a11"},{tag:[Q.regexp,Q.escape,Q.special(Q.string)],color:"#e40"},{tag:Q.definition(Q.variableName),color:"#00f"},{tag:Q.local(Q.variableName),color:"#30a"},{tag:[Q.typeName,Q.namespace],color:"#085"},{tag:Q.className,color:"#167"},{tag:[Q.special(Q.variableName),Q.macroName],color:"#256"},{tag:Q.definition(Q.propertyName),color:"#00c"},{tag:Q.comment,color:"#940"},{tag:Q.invalid,color:"#f00"}]);var YE=new Qn;var D4=Object.create(null),LE=[is.none];var BE=[],zE=Object.create(null),O4=Object.create(null);for(let[t,i]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])O4[t]=R4(D4,i);function Ov(t,i){if(BE.indexOf(t)>-1)return;BE.push(t),console.warn(i)}function R4(t,i){let l=[];for(let d of i.split(" ")){let m=[];for(let y of d.split(".")){let b=t[y]||Q[y];if(!b)Ov(y,`Unknown highlighting tag ${y}`);else if(typeof b=="function")if(!m.length)Ov(y,`Modifier ${y} used at start of tag`);else m=m.map(b);else if(m.length)Ov(y,`Tag ${y} used as modifier`);else m=Array.isArray(b)?b:[b]}for(let y of m)l.push(y)}if(!l.length)return 0;let s=i.replace(/ /g,"_"),r=s+" "+l.map((d)=>d.id),c=zE[r];if(c)return c.id;let h=zE[r]=is.define({id:LE.length,name:s,props:[ih({[s]:l})]});return LE.push(h),h.id}var m6={rtl:vt.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"rtl"},bidiIsolate:Qt.RTL}),ltr:vt.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"ltr"},bidiIsolate:Qt.LTR}),auto:vt.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"auto"},bidiIsolate:null})};class Lv{constructor(t,i,l,s){this.state=t,this.pos=i,this.explicit=l,this.view=s,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(t){let i=jt(this.state).resolveInner(this.pos,-1);while(i&&t.indexOf(i.name)<0)i=i.parent;return i?{from:i.from,to:this.pos,text:this.state.sliceDoc(i.from,this.pos),type:i.type}:null}matchBefore(t){let i=this.state.doc.lineAt(this.pos),l=Math.max(i.from,this.pos-250),s=i.text.slice(l-i.from,this.pos-i.from),r=s.search(B4(t,!1));return r<0?null:{from:l+r,to:this.pos,text:s.slice(r)}}get aborted(){return this.abortListeners==null}addEventListener(t,i,l){if(t=="abort"&&this.abortListeners){if(this.abortListeners.push(i),l&&l.onDocChange)this.abortOnDocChange=!0}}}function XE(t){let i=Object.keys(t).join(""),l=/\w/.test(i);if(l)i=i.replace(/\w/g,"");return`[${l?"\\w":""}${i.replace(/[^\w\s]/g,"\\$&")}]`}function L4(t){let i=Object.create(null),l=Object.create(null);for(let{label:r}of t){i[r[0]]=!0;for(let c=1;c<r.length;c++)l[r[c]]=!0}let s=XE(i)+XE(l)+"*$";return[new RegExp("^"+s),new RegExp(s)]}function GE(t){let i=t.map((r)=>typeof r=="string"?{label:r}:r),[l,s]=i.every((r)=>/^\w+$/.test(r.label))?[/\w*$/,/\w+$/]:L4(i);return(r)=>{let c=r.matchBefore(s);return c||r.explicit?{from:c?c.from:r.pos,options:i,validFor:l}:null}}function WE(t,i){return(l)=>{for(let s=jt(l.state).resolveInner(l.pos,-1);s;s=s.parent){if(t.indexOf(s.name)>-1)return null;if(s.type.isTop)break}return i(l)}}function B4(t,i){var l;let{source:s}=t,r=i&&s[0]!="^",c=s[s.length-1]!="$";if(!r&&!c)return t;return new RegExp(`${r?"^":""}(?:${s})${c?"$":""}`,(l=t.flags)!==null&&l!==void 0?l:t.ignoreCase?"i":"")}var z4=Fi.define();var C6=typeof navigator=="object"&&/Win/.test(navigator.platform);var H4=re.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:0.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:0.5,display:"block",textAlign:"center",cursor:"pointer"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'\uD835\uDC65'"}},".cm-completionIcon-constant":{"&:after":{content:"'\uD835\uDC36'"}},".cm-completionIcon-type":{"&:after":{content:"'\uD835\uDC61'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\uD83D\uDD11︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class FE{constructor(t,i,l,s){this.field=t,this.line=i,this.from=l,this.to=s}}class Bv{constructor(t,i,l){this.field=t,this.from=i,this.to=l}map(t){let i=t.mapPos(this.from,-1,xn.TrackDel),l=t.mapPos(this.to,1,xn.TrackDel);return i==null||l==null?null:new Bv(this.field,i,l)}}class zv{constructor(t,i){this.lines=t,this.fieldPositions=i}instantiate(t,i){let l=[],s=[i],r=t.doc.lineAt(i),c=/^\s*/.exec(r.text)[0];for(let d of this.lines){if(l.length){let m=c,y=/^\t*/.exec(d)[0].length;for(let b=0;b<y;b++)m+=t.facet(gm);s.push(i+m.length-y),d=m+d.slice(y)}l.push(d),i+=d.length+1}let h=this.fieldPositions.map((d)=>new Bv(d.field,s[d.line]+d.from,s[d.line]+d.to));return{text:l,ranges:h}}static parse(t){let i=[],l=[],s=[],r;for(let c of t.split(/\r\n?|\n/)){while(r=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(c)){let h=r[1]?+r[1]:null,d=r[2]||r[3]||"",m=-1;if(h===0)h=1e9;let y=d.replace(/\\[{}]/g,(b)=>b[1]);for(let b=0;b<i.length;b++)if(h!=null?i[b].seq==h:y?i[b].name==y:!1)m=b;if(m<0){let b=0;while(b<i.length&&(h==null||i[b].seq!=null&&i[b].seq<h))b++;i.splice(b,0,{seq:h,name:y}),m=b;for(let S of s)if(S.field>=m)S.field++}for(let b of s)if(b.line==l.length&&b.from>r.index){let S=r[2]?3+(r[1]||"").length:2;b.from-=S,b.to-=S}s.push(new FE(m,l.length,r.index,r.index+y.length)),c=c.slice(0,r.index)+d+c.slice(r.index+r[0].length)}c=c.replace(/\\([{}])/g,(h,d,m)=>{for(let y of s)if(y.line==l.length&&y.from>m)y.from--,y.to--;return d}),l.push(c)}return new zv(l,s)}}var N4=vt.widget({widget:new class extends na{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),_4=vt.mark({class:"cm-snippetField"});class _u{constructor(t,i){this.ranges=t,this.active=i,this.deco=vt.set(t.map((l)=>(l.from==l.to?N4:_4).range(l.from,l.to)),!0)}map(t){let i=[];for(let l of this.ranges){let s=l.map(t);if(!s)return null;i.push(s)}return new _u(i,this.active)}selectionInsideField(t){return t.ranges.every((i)=>this.ranges.some((l)=>l.field==this.active&&l.from<=i.from&&l.to>=i.to))}}var ah=Ct.define({map(t,i){return t&&t.map(i)}}),U4=Ct.define(),sh=Co.define({create(){return null},update(t,i){for(let l of i.effects){if(l.is(ah))return l.value;if(l.is(U4)&&t)return new _u(t.ranges,l.value)}if(t&&i.docChanged)t=t.map(i.changes);if(t&&i.selection&&!t.selectionInsideField(i.selection))t=null;return t},provide:(t)=>re.decorations.from(t,(i)=>i?i.deco:vt.none)});function Hv(t,i){return G.create(t.filter((l)=>l.field==i).map((l)=>G.range(l.from,l.to)))}function q4(t){let i=zv.parse(t);return(l,s,r,c)=>{let{text:h,ranges:d}=i.instantiate(l.state,r),{main:m}=l.state.selection,y={changes:{from:r,to:c==m.from?m.to:c,insert:Ye.of(h)},scrollIntoView:!0,annotations:s?[z4.of(s),un.userEvent.of("input.complete")]:void 0};if(d.length)y.selection=Hv(d,0);if(d.some((b)=>b.field>0)){let b=new _u(d,0),S=y.effects=[ah.of(b)];if(l.state.field(sh,!1)===void 0)S.push(Ct.appendConfig.of([sh,P4,Y4,H4]))}l.dispatch(l.state.update(y))}}function JE(t){return({state:i,dispatch:l})=>{let s=i.field(sh,!1);if(!s||t<0&&s.active==0)return!1;let r=s.active+t,c=t>0&&!s.ranges.some((h)=>h.field==r+t);return l(i.update({selection:Hv(s.ranges,r),effects:ah.of(c?null:new _u(s.ranges,r)),scrollIntoView:!0})),!0}}var V4=({state:t,dispatch:i})=>{if(!t.field(sh,!1))return!1;return i(t.update({effects:ah.of(null)})),!0},I4=JE(1),j4=JE(-1);var $4=[{key:"Tab",run:I4,shift:j4},{key:"Escape",run:V4}],QE=fe.define({combine(t){return t.length?t[0]:$4}}),P4=Fl.highest(eh.compute([QE],(t)=>t.facet(QE)));function Gn(t,i){return{...i,apply:q4(t)}}var Y4=re.domEventHandlers({mousedown(t,i){let l=i.state.field(sh,!1),s;if(!l||(s=i.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let r=l.ranges.find((c)=>c.from<=s&&c.to>=s);if(!r||r.field==l.active)return!1;return i.dispatch({selection:Hv(l.ranges,r.field),effects:ah.of(l.ranges.some((c)=>c.field>r.field)?new _u(l.ranges,r.field):null),scrollIntoView:!0}),!0}});var ZE=new class extends ko{};ZE.startSide=1;ZE.endSide=-1;var A6=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent);class Sm{static create(t,i,l,s,r){let c=s+(s<<8)+t+(i<<4)|0;return new Sm(t,i,l,c,r,[],[])}constructor(t,i,l,s,r,c,h){this.type=t,this.value=i,this.from=l,this.hash=s,this.end=r,this.children=c,this.positions=h,this.hashProp=[[Qn.contextHash,s]]}addChild(t,i){if(t.prop(Qn.contextHash)!=this.hash)t=new Xn(t.type,t.children,t.positions,t.length,this.hashProp);this.children.push(t),this.positions.push(i)}toTree(t,i=this.end){let l=this.children.length-1;if(l>=0)i=Math.max(i,this.positions[l]+this.children[l].length+this.from);return new Xn(t.types[this.type],this.children,this.positions,i-this.from).balance({makeTree:(s,r,c)=>new Xn(is.none,s,r,c,this.hashProp)})}}var j;(function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.Autolink=33]="Autolink",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel",t[t.URL=44]="URL"})(j||(j={}));class hM{constructor(t,i){this.start=t,this.content=i,this.marks=[],this.parsers=[]}}class dM{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){if(this.basePos>this.pos)this.forwardInner()}forwardInner(){let t=this.skipSpace(this.basePos);this.indent=this.countIndent(t,this.pos,this.indent),this.pos=t,this.next=t==this.text.length?-1:this.text.charCodeAt(t)}skipSpace(t){return uh(this.text,t)}reset(t){this.text=t,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;while(this.markers.length)this.markers.pop()}moveBase(t){this.basePos=t,this.baseIndent=this.countIndent(t,this.pos,this.indent)}moveBaseColumn(t){this.baseIndent=t,this.basePos=this.findColumn(t)}addMarker(t){this.markers.push(t)}countIndent(t,i=0,l=0){for(let s=i;s<t;s++)l+=this.text.charCodeAt(s)==9?4-l%4:1;return l}findColumn(t){let i=0;for(let l=0;i<this.text.length&&l<t;i++)l+=this.text.charCodeAt(i)==9?4-l%4:1;return i}scrub(){if(!this.baseIndent)return this.text;let t="";for(let i=0;i<this.basePos;i++)t+=" ";return t+this.text.slice(this.basePos)}}function KE(t,i,l){if(l.pos==l.text.length||t!=i.block&&l.indent>=i.stack[l.depth+1].value+l.baseIndent)return!0;if(l.indent>=l.baseIndent+4)return!1;let s=(t.type==j.OrderedList?Yv:Pv)(l,i,!1);return s>0&&(t.type!=j.BulletList||$v(l,i,!1)<0)&&l.text.charCodeAt(l.pos+s-1)==t.value}var pM={[j.Blockquote](t,i,l){if(l.next!=62)return!1;return l.markers.push(Xe(j.QuoteMark,i.lineStart+l.pos,i.lineStart+l.pos+1)),l.moveBase(l.pos+(eo(l.text.charCodeAt(l.pos+1))?2:1)),t.end=i.lineStart+l.text.length,!0},[j.ListItem](t,i,l){if(l.indent<l.baseIndent+t.value&&l.next>-1)return!1;return l.moveBaseColumn(l.baseIndent+t.value),!0},[j.OrderedList]:KE,[j.BulletList]:KE,[j.Document](){return!0}};function eo(t){return t==32||t==9||t==10||t==13}function uh(t,i=0){while(i<t.length&&eo(t.charCodeAt(i)))i++;return i}function eM(t,i,l){while(i>l&&eo(t.charCodeAt(i-1)))i--;return i}function mM(t){if(t.next!=96&&t.next!=126)return-1;let i=t.pos+1;while(i<t.text.length&&t.text.charCodeAt(i)==t.next)i++;if(i<t.pos+3)return-1;if(t.next==96){for(let l=i;l<t.text.length;l++)if(t.text.charCodeAt(l)==96)return-1}return i}function gM(t){return t.next!=62?-1:t.text.charCodeAt(t.pos+1)==32?2:1}function $v(t,i,l){if(t.next!=42&&t.next!=45&&t.next!=95)return-1;let s=1;for(let r=t.pos+1;r<t.text.length;r++){let c=t.text.charCodeAt(r);if(c==t.next)s++;else if(!eo(c))return-1}if(l&&t.next==45&&vM(t)>-1&&t.depth==i.stack.length&&i.parser.leafBlockParsers.indexOf(AM.SetextHeading)>-1)return-1;return s<3?-1:1}function yM(t,i){for(let l=t.stack.length-1;l>=0;l--)if(t.stack[l].type==i)return!0;return!1}function Pv(t,i,l){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||eo(t.text.charCodeAt(t.pos+1)))&&(!l||yM(i,j.BulletList)||t.skipSpace(t.pos+2)<t.text.length)?1:-1}function Yv(t,i,l){let{pos:s,next:r}=t;for(;;){if(r>=48&&r<=57)s++;else break;if(s==t.text.length)return-1;r=t.text.charCodeAt(s)}if(s==t.pos||s>t.pos+9||r!=46&&r!=41||s<t.text.length-1&&!eo(t.text.charCodeAt(s+1))||l&&!yM(i,j.OrderedList)&&(t.skipSpace(s+1)==t.text.length||s>t.pos+1||t.next!=49))return-1;return s+1-t.pos}function bM(t){if(t.next!=35)return-1;let i=t.pos+1;while(i<t.text.length&&t.text.charCodeAt(i)==35)i++;if(i<t.text.length&&t.text.charCodeAt(i)!=32)return-1;let l=i-t.pos;return l>6?-1:l}function vM(t){if(t.next!=45&&t.next!=61||t.indent>=t.baseIndent+4)return-1;let i=t.pos+1;while(i<t.text.length&&t.text.charCodeAt(i)==t.next)i++;let l=i;while(i<t.text.length&&eo(t.text.charCodeAt(i)))i++;return i==t.text.length?l:-1}var Uv=/^[ \t]*$/,SM=/-->/,wM=/\?>/,qv=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,SM],[/^\s*<\?/,wM],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,Uv],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,Uv]];function xM(t,i,l){if(t.next!=60)return-1;let s=t.text.slice(t.pos);for(let r=0,c=qv.length-(l?1:0);r<c;r++)if(qv[r][0].test(s))return r;return-1}function tM(t,i){let l=t.countIndent(i,t.pos,t.indent),s=t.countIndent(t.skipSpace(i),i,l);return s>=l+5?l+1:s}function la(t,i,l){let s=t.length-1;if(s>=0&&t[s].to==i&&t[s].type==j.CodeText)t[s].to=l;else t.push(Xe(j.CodeText,i,l))}var bm={LinkReference:void 0,IndentedCode(t,i){let l=i.baseIndent+4;if(i.indent<l)return!1;let s=i.findColumn(l),r=t.lineStart+s,c=t.lineStart+i.text.length,h=[],d=[];la(h,r,c);while(t.nextLine()&&i.depth>=t.stack.length)if(i.pos==i.text.length){la(d,t.lineStart-1,t.lineStart);for(let m of i.markers)d.push(m)}else if(i.indent<l)break;else{if(d.length){for(let y of d)if(y.type==j.CodeText)la(h,y.from,y.to);else h.push(y);d=[]}la(h,t.lineStart-1,t.lineStart);for(let y of i.markers)h.push(y);c=t.lineStart+i.text.length;let m=t.lineStart+i.findColumn(i.baseIndent+4);if(m<c)la(h,m,c)}if(d.length){if(d=d.filter((m)=>m.type!=j.CodeText),d.length)i.markers=d.concat(i.markers)}return t.addNode(t.buffer.writeElements(h,-r).finish(j.CodeBlock,c-r),r),!0},FencedCode(t,i){let l=mM(i);if(l<0)return!1;let s=t.lineStart+i.pos,r=i.next,c=l-i.pos,h=i.skipSpace(l),d=eM(i.text,i.text.length,h),m=[Xe(j.CodeMark,s,s+c)];if(h<d)m.push(Xe(j.CodeInfo,t.lineStart+h,t.lineStart+d));for(let y=!0,b=!0,S=!1;t.nextLine()&&i.depth>=t.stack.length;y=!1){let w=i.pos;if(i.indent-i.baseIndent<4)while(w<i.text.length&&i.text.charCodeAt(w)==r)w++;if(w-i.pos>=c&&i.skipSpace(w)==i.text.length){for(let k of i.markers)m.push(k);if(b&&S)la(m,t.lineStart-1,t.lineStart);m.push(Xe(j.CodeMark,t.lineStart+i.pos,t.lineStart+w)),t.nextLine();break}else{if(S=!0,!y)la(m,t.lineStart-1,t.lineStart),b=!1;for(let R of i.markers)m.push(R);let k=t.lineStart+i.basePos,E=t.lineStart+i.text.length;if(k<E)la(m,k,E),b=!1}}return t.addNode(t.buffer.writeElements(m,-s).finish(j.FencedCode,t.prevLineEnd()-s),s),!0},Blockquote(t,i){let l=gM(i);if(l<0)return!1;return t.startContext(j.Blockquote,i.pos),t.addNode(j.QuoteMark,t.lineStart+i.pos,t.lineStart+i.pos+1),i.moveBase(i.pos+l),null},HorizontalRule(t,i){if($v(i,t,!1)<0)return!1;let l=t.lineStart+i.pos;return t.nextLine(),t.addNode(j.HorizontalRule,l),!0},BulletList(t,i){let l=Pv(i,t,!1);if(l<0)return!1;if(t.block.type!=j.BulletList)t.startContext(j.BulletList,i.basePos,i.next);let s=tM(i,i.pos+1);return t.startContext(j.ListItem,i.basePos,s-i.baseIndent),t.addNode(j.ListMark,t.lineStart+i.pos,t.lineStart+i.pos+l),i.moveBaseColumn(s),null},OrderedList(t,i){let l=Yv(i,t,!1);if(l<0)return!1;if(t.block.type!=j.OrderedList)t.startContext(j.OrderedList,i.basePos,i.text.charCodeAt(i.pos+l-1));let s=tM(i,i.pos+l);return t.startContext(j.ListItem,i.basePos,s-i.baseIndent),t.addNode(j.ListMark,t.lineStart+i.pos,t.lineStart+i.pos+l),i.moveBaseColumn(s),null},ATXHeading(t,i){let l=bM(i);if(l<0)return!1;let s=i.pos,r=t.lineStart+s,c=eM(i.text,i.text.length,s),h=c;while(h>s&&i.text.charCodeAt(h-1)==i.next)h--;if(h==c||h==s||!eo(i.text.charCodeAt(h-1)))h=i.text.length;let d=t.buffer.write(j.HeaderMark,0,l).writeElements(t.parser.parseInline(i.text.slice(s+l+1,h),r+l+1),-r);if(h<i.text.length)d.write(j.HeaderMark,h-s,c-s);let m=d.finish(j.ATXHeading1-1+l,i.text.length-s);return t.nextLine(),t.addNode(m,r),!0},HTMLBlock(t,i){let l=xM(i,t,!1);if(l<0)return!1;let s=t.lineStart+i.pos,r=qv[l][1],c=[],h=r!=Uv;while(!r.test(i.text)&&t.nextLine()){if(i.depth<t.stack.length){h=!1;break}for(let y of i.markers)c.push(y)}if(h)t.nextLine();let d=r==SM?j.CommentBlock:r==wM?j.ProcessingInstructionBlock:j.HTMLBlock,m=t.prevLineEnd();return t.addNode(t.buffer.writeElements(c,-s).finish(d,m-s),s),!0},SetextHeading:void 0};class kM{constructor(t){this.stage=0,this.elts=[],this.pos=0,this.start=t.start,this.advance(t.content)}nextLine(t,i,l){if(this.stage==-1)return!1;let s=l.content+`
225
- `+i.scrub(),r=this.advance(s);if(r>-1&&r<s.length)return this.complete(t,l,r);return!1}finish(t,i){if((this.stage==2||this.stage==3)&&uh(i.content,this.pos)==i.content.length)return this.complete(t,i,i.content.length);return!1}complete(t,i,l){return t.addLeafElement(i,Xe(j.LinkReference,this.start,this.start+l,this.elts)),!0}nextStage(t){if(t)return this.pos=t.to-this.start,this.elts.push(t),this.stage++,!0;if(t===!1)this.stage=-1;return!1}advance(t){for(;;)if(this.stage==-1)return-1;else if(this.stage==0){if(!this.nextStage(BM(t,this.pos,this.start,!0)))return-1;if(t.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(Xe(j.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(RM(t,uh(t,this.pos),this.start)))return-1}else if(this.stage==2){let i=uh(t,this.pos),l=0;if(i>this.pos){let s=LM(t,i,this.start);if(s){let r=Nv(t,s.to-this.start);if(r>0)this.nextStage(s),l=r}}if(!l)l=Nv(t,this.pos);return l>0&&l<t.length?l:-1}else return Nv(t,this.pos)}}function Nv(t,i){for(;i<t.length;i++){let l=t.charCodeAt(i);if(l==10)break;if(!eo(l))return-1}return i}class CM{nextLine(t,i,l){let s=i.depth<t.stack.length?-1:vM(i),r=i.next;if(s<0)return!1;let c=Xe(j.HeaderMark,t.lineStart+i.pos,t.lineStart+s);return t.nextLine(),t.addLeafElement(l,Xe(r==61?j.SetextHeading1:j.SetextHeading2,l.start,t.prevLineEnd(),[...t.parser.parseInline(l.content,l.start),c])),!0}finish(){return!1}}var AM={LinkReference(t,i){return i.content.charCodeAt(0)==91?new kM(i):null},SetextHeading(){return new CM}},X4=[(t,i)=>bM(i)>=0,(t,i)=>mM(i)>=0,(t,i)=>gM(i)>=0,(t,i)=>Pv(i,t,!0)>=0,(t,i)=>Yv(i,t,!0)>=0,(t,i)=>$v(i,t,!0)>=0,(t,i)=>xM(i,t,!0)>=0],Q4={text:"",end:0};class TM{constructor(t,i,l,s){this.parser=t,this.input=i,this.ranges=s,this.line=new dM,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=s[s.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=s[0].from,this.block=Sm.create(j.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=l.length?new zM(l,i):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:t}=this;for(;;){for(let l=0;;){let s=t.depth<this.stack.length?this.stack[this.stack.length-1]:null;while(l<t.markers.length&&(!s||t.markers[l].from<s.end)){let r=t.markers[l++];this.addNode(r.type,r.from,r.to)}if(!s)break;this.finishContext()}if(t.pos<t.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(t.basePos))return null;e:for(;;){for(let l of this.parser.blockParsers)if(l){let s=l(this,t);if(s!=!1){if(s==!0)return null;t.forward();continue e}}break}let i=new hM(this.lineStart+t.pos,t.text.slice(t.pos));for(let l of this.parser.leafBlockParsers)if(l){let s=l(this,i);if(s)i.parsers.push(s)}e:while(this.nextLine()){if(t.pos==t.text.length)break;if(t.indent<t.baseIndent+4){for(let l of this.parser.endLeafBlock)if(l(this,t,i))break e}for(let l of i.parsers)if(l.nextLine(this,t,i))return null;i.content+=`
226
- `+t.scrub();for(let l of t.markers)i.marks.push(l)}return this.finishLeaf(i),null}stopAt(t){if(this.stoppedAt!=null&&this.stoppedAt<t)throw RangeError("Can't move stoppedAt forward");this.stoppedAt=t}reuseFragment(t){if(!this.fragments.moveTo(this.absoluteLineStart+t,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let i=this.fragments.takeNodes(this);if(!i)return!1;if(this.absoluteLineStart+=i,this.lineStart=HM(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to)this.lineStart++,this.absoluteLineStart++,this.readLine();else this.atEnd=!0,this.readLine();return!0}get depth(){return this.stack.length}parentType(t=this.depth-1){return this.parser.nodeSet.types[this.stack[t].type]}nextLine(){if(this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to)return this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1;else return this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){while(this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(t){let i=Q4;if(i.end=t,t>=this.to)i.text="";else if(i.text=this.lineChunkAt(t),i.end+=i.text.length,this.ranges.length>1){let l=this.absoluteLineStart,s=this.rangeI;while(this.ranges[s].to<i.end){s++;let r=this.ranges[s].from,c=this.lineChunkAt(r);i.end=r+c.length,i.text=i.text.slice(0,this.ranges[s-1].to-l)+c,l=i.end-i.text.length}}return i}readLine(){let{line:t}=this,{text:i,end:l}=this.scanLine(this.absoluteLineStart);this.absoluteLineEnd=l,t.reset(i);for(;t.depth<this.stack.length;t.depth++){let s=this.stack[t.depth],r=this.parser.skipContextMarkup[s.type];if(!r)throw Error("Unhandled block context "+j[s.type]);let c=this.line.markers.length;if(!r(s,this,t)){if(this.line.markers.length>c)s.end=this.line.markers[this.line.markers.length-1].to;t.forward();break}t.forward()}}lineChunkAt(t){let i=this.input.chunk(t),l;if(!this.input.lineChunks){let s=i.indexOf(`
214
+ root.render(<App />);`),n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(u=n.onUncaughtError),n.onCaughtError!==void 0&&(f=n.onCaughtError),n.onRecoverableError!==void 0&&(p=n.onRecoverableError)),n=sk(e,1,!1,null,null,o,a,null,u,f,p,gk),e[Ts]=n.current,k0(e),new I0(n)},Bz.hydrateRoot=function(e,n,o){if(!L(e))throw Error("Target container is not a DOM element.");yk(e),n===void 0&&console.error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var a=!1,u="",f=pw,p=mw,g=gw,v=null;return o!==null&&o!==void 0&&(o.unstable_strictMode===!0&&(a=!0),o.identifierPrefix!==void 0&&(u=o.identifierPrefix),o.onUncaughtError!==void 0&&(f=o.onUncaughtError),o.onCaughtError!==void 0&&(p=o.onCaughtError),o.onRecoverableError!==void 0&&(g=o.onRecoverableError),o.formState!==void 0&&(v=o.formState)),n=sk(e,1,!0,n,o!=null?o:null,a,u,v,f,p,g,gk),n.context=ak(null),o=n.current,a=di(o),a=Ri(a),u=ms(a),u.callback=null,gs(o,u,a),jo(a,"hydrateRoot()",null),o=a,n.current.lanes=o,Ho(n,o),Zo(n),e[Ts]=n.current,k0(e),new Dd(n)},Bz.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var r2=yb(function(qN,a2){var zz=ct(s2());a2.exports=zz});var JO=ct(r2(),1);var Hz=Object.getPrototypeOf;function u2(t){if(t===null||typeof t!=="object"||Array.isArray(t))return!1;let i=Hz(t);return i===Object.prototype||i===null}var ie=ct(Js(),1);var c2=(t)=>tr.string().trim().min(1).max(t).refine((i)=>!/[\p{Cc}\p{Cf}]/u.test(i)),Nz=(t)=>tr.string().trim().min(1).max(t).refine((i)=>Array.from(i).every((l)=>l===`
215
+ `||l==="\t"||!/[\p{Cc}\p{Cf}]/u.test(l))),_z=tr.strictObject({version:tr.literal(2),entityType:tr.literal("note"),title:c2(160),body:Nz(1000).optional(),backlink:c2(500).regex(/^entity:\/\/[^/]+\/.+$/)}),vb=tr.looseObject({studioCreatePrefill:_z});function f2(t,i,l){return vb.parse({studioCreatePrefill:{version:2,entityType:"note",title:t,...l?{body:l}:{},backlink:i}})}var Uz={surface:{kzqmXN:"xh8yej3",kB7OPa:"x9f619",k7Eaqz:"xeuugli",kAzted:"x2lwn1j",kGO01o:"x1sgudl8",kORKVm:"x1odjw0f",kh9fTk:"x1c54s19",kKq9zD:"xiqhxos",k4sGnE:"x11u2ate",kzrhLs:"x14214pg","--operator-section-spacing":"xn0jjtu","--operator-section-transform":"x6lesxo",$$css:!0}};function Sb(t){return`${t} ${ce(Uz.surface,Np.inset,So.operatorRoles).className??""}`}var wb=ct(Js(),1);function qz(t){return wb.createElement(h2,{...t,children:wb.createElement("div",ce(Sn.readable),t.children)})}var xb={engine:"app",density:"comfortable",Button:Ge,Input:_p,Select:Zs,ConfirmDialog:Qi,Disclosure:qz,Tabs:d2};var kt={root:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kUk6DE:"x98rzlu",kAzted:"x2lwn1j",$$css:!0},toolbar:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kOIVth:"x1jnr06f x1h74ku2",kwnvtZ:"xozqiw3 x5kkq21",kmVPX3:"xnohdxd",kWkggS:"xjbqb8w",kAzted:"x2lwn1j",kTWfjk:"x1c4ya5t",kRugJJ:"xiuf7f6",$$css:!0},modes:{k1xSpc:"xkaaz9w",$$css:!0},metadata:{koQZXg:"x8x9d4c x703316",kMv6JI:"xa9opjo",kGuDYH:"x1j6dyjg x155ir8z",kMwMTN:"x1ar3pfp",kb6lSQ:"x12oo3zp",$$css:!0},assist:{k1xSpc:"x78zum5 x1bkxw62 x10acg2q xbrvn9l",kGNEyG:"x6s0dn4",kOIVth:"x883omv",kmVPX3:"x13j9azq",kWkggS:"xg47p5g",kAzted:"x2lwn1j",k1JLwA:"xlpkf44",kLyoy9:"x1otypdl",kRugJJ:"x1xccwpl",$$css:!0},input:{kUk6DE:"x98rzlu",k7Eaqz:"xfb3i0g",kXkAfU:"x1w9335",kr4CYY:"xf2x79s",$$css:!0},select:{ks0D6T:"x1racy4e",kCrP1I:"x1yagzmq",koRygp:"x1dbdljh",k76vLx:"xeyi6kz",$$css:!0},run:{kmVPX3:"xbnpv00",khDVqt:"xuxw1ft",$$css:!0},presets:{k1xSpc:"x3nfvp2",kOIVth:"x1jnr06f",kCrP1I:"x1yagzmq",kjH4Xa:"xal9krd",$$css:!0},preset:{khDVqt:"x1tndu2m",$$css:!0},assistMeta:{kMv6JI:"xa9opjo",kGuDYH:"x1j6dyjg",kMwMTN:"x1ar3pfp",khDVqt:"xuxw1ft",kHdLCk:"xkaaz9w",$$css:!0},suggestion:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kOIVth:"x1v2ro7d",kmVPX3:"xnohdxd",kWkggS:"x153t6mt",kdLj2q:"x1o3peri",kf00j:"xzbubq",kRugJJ:"xlko52b",$$css:!0},answer:{kWkggS:"x9kxhyz",$$css:!0},copy:{kskxy:"x1aoj0v",kVQacm:"xysyzu8",kGuDYH:"x4z9k3i",kMwMTN:"xqvuw85",kHjlTd:"xj0a0fe",koRygp:"x1dbdljh",kKwN1N:"x1h9t1nj",$$css:!0},answerTitle:{k1xSpc:"x1lliihq",k1K539:"xzueoph",kMv6JI:"xa9opjo",kGuDYH:"x1k6wstc",kb6lSQ:"x1vyo3qp",kMwMTN:"x1es3s4s",$$css:!0},spacer:{kUk6DE:"x98rzlu",$$css:!0},status:{kmVPX3:"x1vrqldd",$$css:!0},panes:{k1xSpc:"xrvj5dj",kUk6DE:"x98rzlu",kAzted:"x2lwn1j",kVQacm:"xb3r6kr",kya2p2:"x1qt74i8",$$css:!0},split:{kumcoG:"x1o61qjw x1xh6270 xreyasp",k9llMU:"xnfwqkv x5ktkrg",kORKVm:"x10wlt62",$$css:!0},source:{kMwMTN:"xqvuw85",kWkggS:"xjbqb8w",kAzted:"x2lwn1j",k7Eaqz:"xeuugli",kSWEuD:"x32b0ac",k26BEO:"xe636ye",kWqL5O:"xgfja2r x1hwe9mw x18p9hjd x1y4yzp4",kfdmCh:"x1q0q8m5",kL6WhQ:"xpqg30t",kt9PQ7:"x1qhh985 x1byj73k x3l60dh",kTWfjk:"x1qm741w",kya2p2:"x1qt74i8",$$css:!0},preview:{k7Eaqz:"xeuugli",kI3sdo:"x16dl9wz",kInvED:"x2ssjo2",kAzted:"x2lwn1j",kmVPX3:"x1539ny5",kORKVm:"x1odjw0f",kHjlTd:"xj0a0fe",kZeWKH:"xish69e",k6w4Gs:"xgwpcrc",k5wCbM:"x1597r2g",kubnTK:"xj8g7ue",kOLLwu:"xf8ucz8",k3VDzK:"x5hh3dx",kRoeRy:"xkp4qii",kh9fTk:"x1pll5v8",kfGByI:"xdjr4gx",kKq9zD:"xscgqpg",kHdLCk:"x1806iup",$$css:!0}};var Cb=[],y2=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((i)=>i?parseInt(i,36):1);for(let i=0,l=0;i<t.length;i++)(i%2?y2:Cb).push(l=l+t[i])})();function Vz(t){if(t<768)return!1;for(let i=0,l=Cb.length;;){let s=i+l>>1;if(t<Cb[s])l=s;else if(t>=y2[s])i=s+1;else return!0;if(i==l)return!1}}function p2(t){return t>=127462&&t<=127487}var m2=8205;function b2(t,i,l=!0,s=!0){return(l?v2:jz)(t,i,s)}function v2(t,i,l){if(i==t.length)return i;if(i&&S2(t.charCodeAt(i))&&w2(t.charCodeAt(i-1)))i--;let s=kb(t,i);i+=g2(s);while(i<t.length){let r=kb(t,i);if(s==m2||r==m2||l&&Vz(r))i+=g2(r),s=r;else if(p2(r)){let c=0,h=i-2;while(h>=0&&p2(kb(t,h)))c++,h-=2;if(c%2==0)break;else i+=2}else break}return i}function jz(t,i,l){while(i>1){let s=v2(t,i-2,l);if(s<i)return s;i--}return 0}function kb(t,i){let l=t.charCodeAt(i);if(!w2(l)||i+1==t.length)return l;let s=t.charCodeAt(i+1);if(!S2(s))return l;return(l-55296<<10)+(s-56320)+65536}function S2(t){return t>=56320&&t<57344}function w2(t){return t>=55296&&t<56320}function g2(t){return t<65536?1:2}class Ye{lineAt(t){if(t<0||t>this.length)throw RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,i,l){[t,i]=Cu(this,t,i);let s=[];if(this.decompose(0,t,s,2),l.length)l.decompose(0,l.length,s,3);return this.decompose(i,this.length,s,1),hl.from(s,this.length-(i-t)+l.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,i=this.length){[t,i]=Cu(this,t,i);let l=[];return this.decompose(t,i,l,0),hl.from(l,i-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let i=this.scanIdentical(t,1),l=this.length-this.scanIdentical(t,-1),s=new xu(this),r=new xu(t);for(let c=i,h=i;;){if(s.next(c),r.next(c),c=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(h+=s.value.length,s.done||h>=l)return!0}}iter(t=1){return new xu(this,t)}iterRange(t,i=this.length){return new Hb(this,t,i)}iterLines(t,i){let l;if(t==null)l=this.iter();else{if(i==null)i=this.lines+1;let s=this.line(t).from;l=this.iterRange(s,Math.max(s,i==this.lines+1?this.length:i<=1?0:this.line(i-1).to))}return new Nb(l)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(t.length==0)throw RangeError("A document must have at least one line");if(t.length==1&&!t[0])return Ye.empty;return t.length<=32?new Yt(t):hl.from(Yt.split(t,[]))}}class Yt extends Ye{constructor(t,i=Iz(t)){super();this.text=t,this.length=i}get lines(){return this.text.length}get children(){return null}lineInner(t,i,l,s){for(let r=0;;r++){let c=this.text[r],h=s+c.length;if((i?l:h)>=t)return new E2(s,h,l,c);s=h+1,l++}}decompose(t,i,l,s){let r=t<=0&&i>=this.length?this:new Yt(x2(this.text,t,i),Math.min(i,this.length)-Math.max(0,t));if(s&1){let c=l.pop(),h=jp(r.text,c.text.slice(),0,r.length);if(h.length<=32)l.push(new Yt(h,c.length+r.length));else{let d=h.length>>1;l.push(new Yt(h.slice(0,d)),new Yt(h.slice(d)))}}else l.push(r)}replace(t,i,l){if(!(l instanceof Yt))return super.replace(t,i,l);[t,i]=Cu(this,t,i);let s=jp(this.text,jp(l.text,x2(this.text,0,t)),i),r=this.length+l.length-(i-t);if(s.length<=32)return new Yt(s,r);return hl.from(Yt.split(s,[]),r)}sliceString(t,i=this.length,l=`
216
+ `){[t,i]=Cu(this,t,i);let s="";for(let r=0,c=0;r<=i&&c<this.text.length;c++){let h=this.text[c],d=r+h.length;if(r>t&&c)s+=l;if(t<d&&i>r)s+=h.slice(Math.max(0,t-r),i-r);r=d+1}return s}flatten(t){for(let i of this.text)t.push(i)}scanIdentical(){return 0}static split(t,i){let l=[],s=-1;for(let r of t)if(l.push(r),s+=r.length+1,l.length==32)i.push(new Yt(l,s)),l=[],s=-1;if(s>-1)i.push(new Yt(l,s));return i}}class hl extends Ye{constructor(t,i){super();this.children=t,this.length=i,this.lines=0;for(let l of t)this.lines+=l.lines}lineInner(t,i,l,s){for(let r=0;;r++){let c=this.children[r],h=s+c.length,d=l+c.lines-1;if((i?d:h)>=t)return c.lineInner(t,i,l,s);s=h+1,l=d+1}}decompose(t,i,l,s){for(let r=0,c=0;c<=i&&r<this.children.length;r++){let h=this.children[r],d=c+h.length;if(t<=d&&i>=c){let m=s&((c<=t?1:0)|(d>=i?2:0));if(c>=t&&d<=i&&!m)l.push(h);else h.decompose(t-c,i-c,l,m)}c=d+1}}replace(t,i,l){if([t,i]=Cu(this,t,i),l.lines<this.lines)for(let s=0,r=0;s<this.children.length;s++){let c=this.children[s],h=r+c.length;if(t>=r&&i<=h){let d=c.replace(t-r,i-r,l),m=this.lines-c.lines+d.lines;if(d.lines<m>>4&&d.lines>m>>6){let y=this.children.slice();return y[s]=d,new hl(y,this.length-(i-t)+l.length)}return super.replace(r,h,d)}r=h+1}return super.replace(t,i,l)}sliceString(t,i=this.length,l=`
217
+ `){[t,i]=Cu(this,t,i);let s="";for(let r=0,c=0;r<this.children.length&&c<=i;r++){let h=this.children[r],d=c+h.length;if(c>t&&r)s+=l;if(t<d&&i>c)s+=h.sliceString(t-c,i-c,l);c=d+1}return s}flatten(t){for(let i of this.children)i.flatten(t)}scanIdentical(t,i){if(!(t instanceof hl))return 0;let l=0,[s,r,c,h]=i>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;s+=i,r+=i){if(s==c||r==h)return l;let d=this.children[s],m=t.children[r];if(d!=m)return l+d.scanIdentical(m,i);l+=d.length+1}}static from(t,i=t.reduce((l,s)=>l+s.length+1,-1)){let l=0;for(let w of t)l+=w.lines;if(l<32){let w=[];for(let k of t)k.flatten(w);return new Yt(w,i)}let s=Math.max(32,l>>5),r=s<<1,c=s>>1,h=[],d=0,m=-1,y=[];function b(w){let k;if(w.lines>r&&w instanceof hl)for(let E of w.children)b(E);else if(w.lines>c&&(d>c||!d))S(),h.push(w);else if(w instanceof Yt&&d&&(k=y[y.length-1])instanceof Yt&&w.lines+k.lines<=32)d+=w.lines,m+=w.length+1,y[y.length-1]=new Yt(k.text.concat(w.text),k.length+1+w.length);else{if(d+w.lines>s)S();d+=w.lines,m+=w.length+1,y.push(w)}}function S(){if(d==0)return;h.push(y.length==1?y[0]:hl.from(y,m)),m=-1,d=y.length=0}for(let w of t)b(w);return S(),h.length==1?h[0]:new hl(h,i)}}Ye.empty=new Yt([""],0);function Iz(t){let i=-1;for(let l of t)i+=l.length+1;return i}function jp(t,i,l=0,s=1e9){for(let r=0,c=0,h=!0;c<t.length&&r<=s;c++){let d=t[c],m=r+d.length;if(m>=l){if(m>s)d=d.slice(0,s-r);if(r<l)d=d.slice(l-r);if(h)i[i.length-1]+=d,h=!1;else i.push(d)}r=m+1}return i}function x2(t,i,l){return jp(t,[""],i,l)}class xu{constructor(t,i=1){this.dir=i,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[t],this.offsets=[i>0?1:(t instanceof Yt?t.text.length:t.children.length)<<1]}nextInner(t,i){this.done=this.lineBreak=!1;for(;;){let l=this.nodes.length-1,s=this.nodes[l],r=this.offsets[l],c=r>>1,h=s instanceof Yt?s.text.length:s.children.length;if(c==(i>0?h:0)){if(l==0)return this.done=!0,this.value="",this;if(i>0)this.offsets[l-1]++;this.nodes.pop(),this.offsets.pop()}else if((r&1)==(i>0?0:1)){if(this.offsets[l]+=i,t==0)return this.lineBreak=!0,this.value=`
218
+ `,this;t--}else if(s instanceof Yt){let d=s.text[c+(i<0?-1:0)];if(this.offsets[l]+=i,d.length>Math.max(0,t))return this.value=t==0?d:i>0?d.slice(t):d.slice(0,d.length-t),this;t-=d.length}else{let d=s.children[c+(i<0?-1:0)];if(t>d.length)t-=d.length,this.offsets[l]+=i;else{if(i<0)this.offsets[l]--;this.nodes.push(d),this.offsets.push(i>0?1:(d instanceof Yt?d.text.length:d.children.length)<<1)}}}}next(t=0){if(t<0)this.nextInner(-t,-this.dir),t=this.value.length;return this.nextInner(t,this.dir)}}class Hb{constructor(t,i,l){this.value="",this.done=!1,this.cursor=new xu(t,i>l?-1:1),this.pos=i>l?t.length:0,this.from=Math.min(i,l),this.to=Math.max(i,l)}nextInner(t,i){if(i<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,i<0?this.pos-this.to:this.from-this.pos);let l=i<0?this.pos-this.from:this.to-this.pos;if(t>l)t=l;l-=t;let{value:s}=this.cursor.next(t);return this.pos+=(s.length+t)*i,this.value=s.length<=l?s:i<0?s.slice(s.length-l):s.slice(0,l),this.done=!this.value,this}next(t=0){if(t<0)t=Math.max(t,this.from-this.pos);else if(t>0)t=Math.min(t,this.to-this.pos);return this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class Nb{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:i,lineBreak:l,value:s}=this.inner.next(t);if(i&&this.afterBreak)this.value="",this.afterBreak=!1;else if(i)this.done=!0,this.value="";else if(l)if(this.afterBreak)this.value="";else this.afterBreak=!0,this.next();else this.value=s,this.afterBreak=!1;return this}get lineBreak(){return!1}}if(typeof Symbol<"u")Ye.prototype[Symbol.iterator]=function(){return this.iter()},xu.prototype[Symbol.iterator]=Hb.prototype[Symbol.iterator]=Nb.prototype[Symbol.iterator]=function(){return this};class E2{constructor(t,i,l,s){this.from=t,this.to=i,this.number=l,this.text=s}get length(){return this.to-this.from}}function Cu(t,i,l){return i=Math.max(0,Math.min(t.length,i)),[i,Math.max(i,Math.min(t.length,l))]}function Gi(t,i,l=!0,s=!0){return b2(t,i,l,s)}function $z(t){return t>=56320&&t<57344}function Pz(t){return t>=55296&&t<56320}function _b(t,i){let l=t.charCodeAt(i);if(!Pz(l)||i+1==t.length)return l;let s=t.charCodeAt(i+1);if(!$z(s))return l;return(l-55296<<10)+(s-56320)+65536}function Ub(t){return t<65536?1:2}var Tb=/\r\n?|\n/,wn=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(wn||(wn={}));class Fl{constructor(t){this.sections=t}get length(){let t=0;for(let i=0;i<this.sections.length;i+=2)t+=this.sections[i];return t}get newLength(){let t=0;for(let i=0;i<this.sections.length;i+=2){let l=this.sections[i+1];t+=l<0?this.sections[i]:l}return t}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(t){for(let i=0,l=0,s=0;i<this.sections.length;){let r=this.sections[i++],c=this.sections[i++];if(c<0)t(l,s,r),s+=r;else s+=c;l+=r}}iterChangedRanges(t,i=!1){Eb(this,t,i)}get invertedDesc(){let t=[];for(let i=0;i<this.sections.length;){let l=this.sections[i++],s=this.sections[i++];if(s<0)t.push(l,s);else t.push(s,l)}return new Fl(t)}composeDesc(t){return this.empty?t:t.empty?this:M2(this,t)}mapDesc(t,i=!1){return t.empty?this:Mb(this,t,i)}mapPos(t,i=-1,l=wn.Simple){let s=0,r=0;for(let c=0;c<this.sections.length;){let h=this.sections[c++],d=this.sections[c++],m=s+h;if(d<0){if(m>t)return r+(t-s);r+=h}else{if(l!=wn.Simple&&m>=t&&(l==wn.TrackDel&&s<t&&m>t||l==wn.TrackBefore&&s<t||l==wn.TrackAfter&&m>t))return null;if(m>t||m==t&&i<0&&!h)return t==s||i<0?r:r+d;r+=d}s=m}if(t>s)throw RangeError(`Position ${t} is out of range for changeset of length ${s}`);return r}touchesRange(t,i=t){for(let l=0,s=0;l<this.sections.length&&s<=i;){let r=this.sections[l++],c=this.sections[l++],h=s+r;if(c>=0&&s<=i&&h>=t)return s<t&&h>i?"cover":!0;s=h}return!1}toString(){let t="";for(let i=0;i<this.sections.length;){let l=this.sections[i++],s=this.sections[i++];t+=(t?" ":"")+l+(s>=0?":"+s:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some((i)=>typeof i!="number"))throw RangeError("Invalid JSON representation of ChangeDesc");return new Fl(t)}static create(t){return new Fl(t)}}class an extends Fl{constructor(t,i){super(t);this.inserted=i}apply(t){if(this.length!=t.length)throw RangeError("Applying change set to a document with the wrong length");return Eb(this,(i,l,s,r,c)=>t=t.replace(s,s+(l-i),c),!1),t}mapDesc(t,i=!1){return Mb(this,t,i,!0)}invert(t){let i=this.sections.slice(),l=[];for(let s=0,r=0;s<i.length;s+=2){let c=i[s],h=i[s+1];if(h>=0){i[s]=h,i[s+1]=c;let d=s>>1;while(l.length<d)l.push(Ye.empty);l.push(c?t.slice(r,r+c):Ye.empty)}r+=c}return new an(i,l)}compose(t){return this.empty?t:t.empty?this:M2(this,t,!0)}map(t,i=!1){return t.empty?this:Mb(this,t,i,!0)}iterChanges(t,i=!1){Eb(this,t,i)}get desc(){return Fl.create(this.sections)}filter(t){let i=[],l=[],s=[],r=new Au(this);e:for(let c=0,h=0;;){let d=c==t.length?1e9:t[c++];while(h<d||h==d&&r.len==0){if(r.done)break e;let y=Math.min(r.len,d-h);En(s,y,-1);let b=r.ins==-1?-1:r.off==0?r.ins:0;if(En(i,y,b),b>0)ea(l,i,r.text);r.forward(y),h+=y}let m=t[c++];while(h<m){if(r.done)break e;let y=Math.min(r.len,m-h);En(i,y,-1),En(s,y,r.ins==-1?-1:r.off==0?r.ins:0),r.forward(y),h+=y}}return{changes:new an(i,l),filtered:Fl.create(s)}}toJSON(){let t=[];for(let i=0;i<this.sections.length;i+=2){let l=this.sections[i],s=this.sections[i+1];if(s<0)t.push(l);else if(s==0)t.push([l]);else t.push([l].concat(this.inserted[i>>1].toJSON()))}return t}static of(t,i,l){let s=[],r=[],c=0,h=null;function d(y=!1){if(!y&&!s.length)return;if(c<i)En(s,i-c,-1);let b=new an(s,r);h=h?h.compose(b.map(h)):b,s=[],r=[],c=0}function m(y){if(Array.isArray(y))for(let b of y)m(b);else if(y instanceof an){if(y.length!=i)throw RangeError(`Mismatched change set length (got ${y.length}, expected ${i})`);d(),h=h?h.compose(y.map(h)):y}else{let{from:b,to:S=b,insert:w}=y;if(b>S||b<0||S>i)throw RangeError(`Invalid change range ${b} to ${S} (in doc of length ${i})`);let k=!w?Ye.empty:typeof w=="string"?Ye.of(w.split(l||Tb)):w,E=k.length;if(b==S&&E==0)return;if(b<c)d();if(b>c)En(s,b-c,-1);En(s,S-b,E),ea(r,s,k),c=S}}return m(t),d(!h),h}static empty(t){return new an(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw RangeError("Invalid JSON representation of ChangeSet");let i=[],l=[];for(let s=0;s<t.length;s++){let r=t[s];if(typeof r=="number")i.push(r,-1);else if(!Array.isArray(r)||typeof r[0]!="number"||r.some((c,h)=>h&&typeof c!="string"))throw RangeError("Invalid JSON representation of ChangeSet");else if(r.length==1)i.push(r[0],0);else{while(l.length<s)l.push(Ye.empty);l[s]=Ye.of(r.slice(1)),i.push(r[0],l[s].length)}}return new an(i,l)}static createSet(t,i){return new an(t,i)}}function En(t,i,l,s=!1){if(i==0&&l<=0)return;let r=t.length-2;if(r>=0&&l<=0&&l==t[r+1])t[r]+=i;else if(r>=0&&i==0&&t[r]==0)t[r+1]+=l;else if(s)t[r]+=i,t[r+1]+=l;else t.push(i,l)}function ea(t,i,l){if(l.length==0)return;let s=i.length-2>>1;if(s<t.length)t[t.length-1]=t[t.length-1].append(l);else{while(t.length<s)t.push(Ye.empty);t.push(l)}}function Eb(t,i,l){let s=t.inserted;for(let r=0,c=0,h=0;h<t.sections.length;){let d=t.sections[h++],m=t.sections[h++];if(m<0)r+=d,c+=d;else{let y=r,b=c,S=Ye.empty;for(;;){if(y+=d,b+=m,m&&s)S=S.append(s[h-2>>1]);if(l||h==t.sections.length||t.sections[h+1]<0)break;d=t.sections[h++],m=t.sections[h++]}i(r,y,c,b,S),r=y,c=b}}}function Mb(t,i,l,s=!1){let r=[],c=s?[]:null,h=new Au(t),d=new Au(i);for(let m=-1;;)if(h.done&&d.len||d.done&&h.len)throw Error("Mismatched change set lengths");else if(h.ins==-1&&d.ins==-1){let y=Math.min(h.len,d.len);En(r,y,-1),h.forward(y),d.forward(y)}else if(d.ins>=0&&(h.ins<0||m==h.i||h.off==0&&(d.len<h.len||d.len==h.len&&!l))){let y=d.len;En(r,d.ins,-1);while(y){let b=Math.min(h.len,y);if(h.ins>=0&&m<h.i&&h.len<=b){if(En(r,0,h.ins),c)ea(c,r,h.text);m=h.i}h.forward(b),y-=b}d.next()}else if(h.ins>=0){let y=0,b=h.len;while(b)if(d.ins==-1){let S=Math.min(b,d.len);y+=S,b-=S,d.forward(S)}else if(d.ins==0&&d.len<b)b-=d.len,d.next();else break;if(En(r,y,m<h.i?h.ins:0),c&&m<h.i)ea(c,r,h.text);m=h.i,h.forward(h.len-b)}else if(h.done&&d.done)return c?an.createSet(r,c):Fl.create(r);else throw Error("Mismatched change set lengths")}function M2(t,i,l=!1){let s=[],r=l?[]:null,c=new Au(t),h=new Au(i);for(let d=!1;;)if(c.done&&h.done)return r?an.createSet(s,r):Fl.create(s);else if(c.ins==0)En(s,c.len,0,d),c.next();else if(h.len==0&&!h.done){if(En(s,0,h.ins,d),r)ea(r,s,h.text);h.next()}else if(c.done||h.done)throw Error("Mismatched change set lengths");else{let m=Math.min(c.len2,h.len),y=s.length;if(c.ins==-1){let b=h.ins==-1?-1:h.off?0:h.ins;if(En(s,m,b,d),r&&b)ea(r,s,h.text)}else if(h.ins==-1){if(En(s,c.off?0:c.len,m,d),r)ea(r,s,c.textBit(m))}else if(En(s,c.off?0:c.len,h.off?0:h.ins,d),r&&!h.off)ea(r,s,h.text);d=(c.ins>m||h.ins>=0&&h.len>m)&&(d||s.length>y),c.forward2(m),h.forward(m)}}class Au{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;if(this.i<t.length)this.len=t[this.i++],this.ins=t[this.i++];else this.len=0,this.ins=-2;this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length?Ye.empty:t[i]}textBit(t){let{inserted:i}=this.set,l=this.i-2>>1;return l>=i.length&&!t?Ye.empty:i[l].slice(this.off,t==null?void 0:this.off+t)}forward(t){if(t==this.len)this.next();else this.len-=t,this.off+=t}forward2(t){if(this.ins==-1)this.forward(t);else if(t==this.ins)this.next();else this.ins-=t,this.off+=t}}class Ks{constructor(t,i,l,s){this.from=t,this.to=i,this.flags=l,this.goalColumn=s}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get undirectional(){return(this.flags&64)>0}get bidiLevel(){let t=this.flags&7;return t==7?null:t}map(t,i=-1){let l,s;if(this.empty)l=s=t.mapPos(this.from,i);else l=t.mapPos(this.from,1),s=t.mapPos(this.to,-1);return l==this.from&&s==this.to?this:new Ks(l,s,this.flags,this.goalColumn)}extend(t,i=t,l=0){if(t<=this.anchor&&i>=this.anchor)return G.range(t,i,void 0,void 0,l);let s=Math.abs(t-this.anchor)>Math.abs(i-this.anchor)?t:i;return G.range(this.anchor,s,void 0,void 0,l)}eq(t,i=!1){return this.anchor==t.anchor&&this.head==t.head&&this.goalColumn==t.goalColumn&&(!i||!this.empty||this.assoc==t.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||typeof t.anchor!="number"||typeof t.head!="number")throw RangeError("Invalid JSON representation for SelectionRange");return G.range(t.anchor,t.head)}static create(t,i,l,s){return new Ks(t,i,l,s)}}class G{constructor(t,i){this.ranges=t,this.mainIndex=i}map(t,i=-1){if(t.empty)return this;return G.create(this.ranges.map((l)=>l.map(t,i)),this.mainIndex)}eq(t,i=!1){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let l=0;l<this.ranges.length;l++)if(!this.ranges[l].eq(t.ranges[l],i))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new G([this.main],0)}addRange(t,i=!0){return G.create([t].concat(this.ranges),i?0:this.mainIndex+1)}replaceRange(t,i=this.mainIndex){let l=this.ranges.slice();return l[i]=t,G.create(l,this.mainIndex)}toJSON(){return{ranges:this.ranges.map((t)=>t.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!="number"||t.main>=t.ranges.length)throw RangeError("Invalid JSON representation for EditorSelection");return new G(t.ranges.map((i)=>Ks.fromJSON(i)),t.main)}static single(t,i=t){return new G([G.range(t,i)],0)}static create(t,i=0){if(t.length==0)throw RangeError("A selection needs at least one range");for(let l=0,s=0;s<t.length;s++){let r=t[s];if(r.empty?r.from<=l:r.from<l)return G.normalized(t.slice(),i);l=r.to}return new G(t,i)}static cursor(t,i=0,l,s){return Ks.create(t,t,(i==0?0:i<0?8:16)|(l==null?7:Math.min(6,l)),s)}static range(t,i,l,s,r){let c=s==null?7:Math.min(6,s);if(!r&&t!=i)r=i<t?1:-1;if(r)c|=r<0?8:16;return i<t?Ks.create(i,t,c|32,l):Ks.create(t,i,c,l)}static undirectionalRange(t,i){return Ks.create(t,i,64,void 0)}static normalized(t,i=0){let l=t[i];t.sort((s,r)=>s.from-r.from),i=t.indexOf(l);for(let s=1;s<t.length;s++){let r=t[s],c=t[s-1];if(r.empty?r.from<=c.to:r.from<c.to){let h=c.from,d=Math.max(r.to,c.to);if(s<=i)i--;t.splice(--s,2,r.anchor>r.head?G.range(d,h):G.range(h,d))}}return new G(t,i)}}function D2(t,i){for(let l of t.ranges)if(l.to>i)throw RangeError("Selection points outside of document")}var qb=0;class fe{constructor(t,i,l,s,r){this.combine=t,this.compareInput=i,this.compare=l,this.isStatic=s,this.id=qb++,this.default=t([]),this.extensions=typeof r=="function"?r(this):r}get reader(){return this}static define(t={}){return new fe(t.combine||((i)=>i),t.compareInput||((i,l)=>i===l),t.compare||(!t.combine?Vb:(i,l)=>i===l),!!t.static,t.enables)}of(t){return new Nf([],this,0,t)}compute(t,i){if(this.isStatic)throw Error("Can't compute a static facet");return new Nf(t,this,1,i)}computeN(t,i){if(this.isStatic)throw Error("Can't compute a static facet");return new Nf(t,this,2,i)}from(t,i){if(!i)i=(l)=>l;return this.compute([t],(l)=>i(l.field(t)))}}function Vb(t,i){return t==i||t.length==i.length&&t.every((l,s)=>l===i[s])}class Nf{constructor(t,i,l,s){this.dependencies=t,this.facet=i,this.type=l,this.value=s,this.id=qb++}dynamicSlot(t){var i;let l=this.value,s=this.facet.compareInput,r=this.id,c=t[r]>>1,h=this.type==2,d=!1,m=!1,y=[];for(let b of this.dependencies)if(b=="doc")d=!0;else if(b=="selection")m=!0;else if((((i=t[b.id])!==null&&i!==void 0?i:1)&1)==0)y.push(t[b.id]);return{create(b){return b.values[c]=l(b),1},update(b,S){if(d&&S.docChanged||m&&(S.docChanged||S.selection)||Db(b,y)){let w=l(b);if(h?!k2(w,b.values[c],s):!s(w,b.values[c]))return b.values[c]=w,1}return 0},reconfigure:(b,S)=>{let w,k=S.config.address[r];if(k!=null){let E=Pp(S,k);if(this.dependencies.every((R)=>R instanceof fe?S.facet(R)===b.facet(R):R instanceof ko?S.field(R,!1)==b.field(R,!1):!0)||(h?k2(w=l(b),E,s):s(w=l(b),E)))return b.values[c]=E,0}else w=l(b);return b.values[c]=w,1}}}get extension(){return this}}function k2(t,i,l){if(t.length!=i.length)return!1;for(let s=0;s<t.length;s++)if(!l(t[s],i[s]))return!1;return!0}function Db(t,i){let l=!1;for(let s of i)if(_f(t,s)&1)l=!0;return l}function Yz(t,i,l){let s=l.map((m)=>t[m.id]),r=l.map((m)=>m.type),c=s.filter((m)=>!(m&1)),h=t[i.id]>>1;function d(m){let y=[];for(let b=0;b<s.length;b++){let S=Pp(m,s[b]);if(r[b]==2)for(let w of S)y.push(w);else y.push(S)}return i.combine(y)}return{create(m){for(let y of s)_f(m,y);return m.values[h]=d(m),1},update(m,y){if(!Db(m,c))return 0;let b=d(m);if(i.compare(b,m.values[h]))return 0;return m.values[h]=b,1},reconfigure(m,y){let b=Db(m,s),S=y.config.facets[i.id],w=y.facet(i);if(S&&!b&&Vb(l,S))return m.values[h]=w,0;let k=d(m);if(i.compare(k,w))return m.values[h]=w,0;return m.values[h]=k,1}}}var Up=fe.define({static:!0});class ko{constructor(t,i,l,s,r){this.id=t,this.createF=i,this.updateF=l,this.compareF=s,this.spec=r,this.provides=void 0}static define(t){let i=new ko(qb++,t.create,t.update,t.compare||((l,s)=>l===s),t);if(t.provide)i.provides=t.provide(i);return i}create(t){let i=t.facet(Up).find((l)=>l.field==this);return((i===null||i===void 0?void 0:i.create)||this.createF)(t)}slot(t){let i=t[this.id]>>1;return{create:(l)=>(l.values[i]=this.create(l),1),update:(l,s)=>{let r=l.values[i],c=this.updateF(r,s);if(this.compareF(r,c))return 0;return l.values[i]=c,1},reconfigure:(l,s)=>{let r=l.facet(Up),c=s.facet(Up),h;if((h=r.find((d)=>d.field==this))&&h!=c.find((d)=>d.field==this))return l.values[i]=h.create(l),1;if(s.config.address[this.id]!=null)return l.values[i]=s.field(this),0;return l.values[i]=this.create(l),1}}}init(t){return[this,Up.of({field:this,create:t})]}get extension(){return this}}var nr={lowest:4,low:3,default:2,high:1,highest:0};function Hf(t){return(i)=>new jb(i,t)}var Jl={highest:Hf(nr.highest),high:Hf(nr.high),default:Hf(nr.default),low:Hf(nr.low),lowest:Hf(nr.lowest)};class jb{constructor(t,i){this.inner=t,this.prec=i}get extension(){return this}}class Tu{of(t){return new Ip(this,t)}reconfigure(t){return Tu.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class Ip{constructor(t,i){this.compartment=t,this.inner=i}get extension(){return this}}class $p{constructor(t,i,l,s,r,c){this.base=t,this.compartments=i,this.dynamicSlots=l,this.address=s,this.staticValues=r,this.facets=c,this.statusTemplate=[];while(this.statusTemplate.length<l.length)this.statusTemplate.push(0)}staticFacet(t){let i=this.address[t.id];return i==null?t.default:this.staticValues[i>>1]}static resolve(t,i,l){let s=[],r=Object.create(null),c=new Map;for(let S of Xz(t,i,c))if(S instanceof ko)s.push(S);else(r[S.facet.id]||(r[S.facet.id]=[])).push(S);let h=Object.create(null),d=[],m=[];for(let S of s)h[S.id]=m.length<<1,m.push((w)=>S.slot(w));let y=l===null||l===void 0?void 0:l.config.facets;for(let S in r){let w=r[S],k=w[0].facet,E=y&&y[S]||[];if(w.every((R)=>R.type==0))if(h[k.id]=d.length<<1|1,Vb(E,w))d.push(l.facet(k));else{let R=k.combine(w.map((L)=>L.value));d.push(l&&k.compare(R,l.facet(k))?l.facet(k):R)}else{for(let R of w)if(R.type==0)h[R.id]=d.length<<1|1,d.push(R.value);else h[R.id]=m.length<<1,m.push((L)=>R.dynamicSlot(L));h[k.id]=m.length<<1,m.push((R)=>Yz(R,k,w))}}let b=m.map((S)=>S(h));return new $p(t,c,b,h,d,r)}}function Xz(t,i,l){let s=[[],[],[],[],[]],r=new Map;function c(h,d){let m=r.get(h);if(m!=null){if(m<=d)return;let y=s[m].indexOf(h);if(y>-1)s[m].splice(y,1);if(h instanceof Ip)l.delete(h.compartment)}if(r.set(h,d),Array.isArray(h))for(let y of h)c(y,d);else if(h instanceof Ip){if(l.has(h.compartment))throw RangeError("Duplicate use of compartment in extensions");let y=i.get(h.compartment)||h.inner;l.set(h.compartment,y),c(y,d)}else if(h instanceof jb)c(h.inner,h.prec);else if(h instanceof ko){if(s[d].push(h),h.provides)c(h.provides,d)}else if(h instanceof Nf){if(s[d].push(h),h.facet.extensions)c(h.facet.extensions,nr.default)}else{let y=h.extension;if(!y)throw Error(`Unrecognized extension value in extension set (${h}).`);if(y==h)throw Error(`Unrecognized extension value in extension set (${h}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);c(y,d)}}return c(t,nr.default),s.reduce((h,d)=>h.concat(d))}function _f(t,i){if(i&1)return 2;let l=i>>1,s=t.status[l];if(s==4)throw Error("Cyclic dependency between fields and/or facets");if(s&2)return s;t.status[l]=4;let r=t.computeSlot(t,t.config.dynamicSlots[l]);return t.status[l]=2|r}function Pp(t,i){return i&1?t.config.staticValues[i>>1]:t.values[i>>1]}var O2=fe.define(),Ob=fe.define({combine:(t)=>t.some((i)=>i),static:!0}),R2=fe.define({combine:(t)=>t.length?t[0]:void 0,static:!0}),L2=fe.define(),B2=fe.define(),z2=fe.define(),H2=fe.define({combine:(t)=>t.length?t[0]:!1});class Wi{constructor(t,i){this.type=t,this.value=i}static define(){return new N2}}class N2{of(t){return new Wi(this,t)}}class _2{constructor(t){this.map=t}of(t){return new Ct(this,t)}}class Ct{constructor(t,i){this.type=t,this.value=i}map(t){let i=this.type.map(this.value,t);return i===void 0?void 0:i==this.value?this:new Ct(this.type,i)}is(t){return this.type==t}static define(t={}){return new _2(t.map||((i)=>i))}static mapEffects(t,i){if(!t.length)return t;let l=[];for(let s of t){let r=s.map(i);if(r)l.push(r)}return l}}Ct.reconfigure=Ct.define();Ct.appendConfig=Ct.define();class rn{constructor(t,i,l,s,r,c){if(this.startState=t,this.changes=i,this.selection=l,this.effects=s,this.annotations=r,this.scrollIntoView=c,this._doc=null,this._state=null,l)D2(l,i.newLength);if(!r.some((h)=>h.type==rn.time))this.annotations=r.concat(rn.time.of(Date.now()))}static create(t,i,l,s,r,c){return new rn(t,i,l,s,r,c)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){if(!this._state)this.startState.applyTransaction(this);return this._state}annotation(t){for(let i of this.annotations)if(i.type==t)return i.value;return}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let i=this.annotation(rn.userEvent);return!!(i&&(i==t||i.length>t.length&&i.slice(0,t.length)==t&&i[t.length]=="."))}}rn.time=Wi.define();rn.userEvent=Wi.define();rn.addToHistory=Wi.define();rn.remote=Wi.define();function Qz(t,i){let l=[];for(let s=0,r=0;;){let c,h;if(s<t.length&&(r==i.length||i[r]>=t[s]))c=t[s++],h=t[s++];else if(r<i.length)c=i[r++],h=i[r++];else return l;if(!l.length||l[l.length-1]<c)l.push(c,h);else if(l[l.length-1]<h)l[l.length-1]=h}}function U2(t,i,l){var s;let r,c,h;if(l)r=i.changes,c=an.empty(i.changes.length),h=t.changes.compose(i.changes);else r=i.changes.map(t.changes),c=t.changes.mapDesc(i.changes,!0),h=t.changes.compose(r);return{changes:h,selection:i.selection?i.selection.map(c):(s=t.selection)===null||s===void 0?void 0:s.map(r),effects:Ct.mapEffects(t.effects,r).concat(Ct.mapEffects(i.effects,c)),annotations:t.annotations.length?t.annotations.concat(i.annotations):i.annotations,scrollIntoView:t.scrollIntoView||i.scrollIntoView}}function Rb(t,i,l){let s=i.selection,r=ku(i.annotations);if(i.userEvent)r=r.concat(rn.userEvent.of(i.userEvent));return{changes:i.changes instanceof an?i.changes:an.of(i.changes||[],l,t.facet(R2)),selection:s&&(s instanceof G?s:G.single(s.anchor,s.head)),effects:ku(i.effects),annotations:r,scrollIntoView:!!i.scrollIntoView}}function q2(t,i,l){let s=Rb(t,i.length?i[0]:{},t.doc.length);if(i.length&&i[0].filter===!1)l=!1;for(let c=1;c<i.length;c++){if(i[c].filter===!1)l=!1;let h=!!i[c].sequential;s=U2(s,Rb(t,i[c],h?s.changes.newLength:t.doc.length),h)}let r=rn.create(t,s.changes,s.selection,s.effects,s.annotations,s.scrollIntoView);return Wz(l?Gz(r):r)}function Gz(t){let i=t.startState,l=!0;for(let r of i.facet(L2)){let c=r(t);if(c===!1){l=!1;break}if(Array.isArray(c))l=l===!0?c:Qz(l,c)}if(l!==!0){let r,c;if(l===!1)c=t.changes.invertedDesc,r=an.empty(i.doc.length);else{let h=t.changes.filter(l);r=h.changes,c=h.filtered.mapDesc(h.changes).invertedDesc}t=rn.create(i,r,t.selection&&t.selection.map(c),Ct.mapEffects(t.effects,c),t.annotations,t.scrollIntoView)}let s=i.facet(B2);for(let r=s.length-1;r>=0;r--){let c=s[r](t);if(c instanceof rn)t=c;else if(Array.isArray(c)&&c.length==1&&c[0]instanceof rn)t=c[0];else t=q2(i,ku(c),!1)}return t}function Wz(t){let i=t.startState,l=i.facet(z2),s=t;for(let r=l.length-1;r>=0;r--){let c=l[r](t);if(c&&Object.keys(c).length)s=U2(s,Rb(i,c,t.changes.newLength),!0)}return s==t?t:rn.create(i,t.changes,t.selection,s.effects,s.annotations,s.scrollIntoView)}var Fz=[];function ku(t){return t==null?Fz:Array.isArray(t)?t:[t]}var wo=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(wo||(wo={})),Jz=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Lb;try{Lb=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(t){}function Zz(t){if(Lb)return Lb.test(t);for(let i=0;i<t.length;i++){let l=t[i];if(/\w/.test(l)||l>"€"&&(l.toUpperCase()!=l.toLowerCase()||Jz.test(l)))return!0}return!1}function Kz(t){return(i)=>{if(!/\S/.test(i))return wo.Space;if(Zz(i))return wo.Word;for(let l=0;l<t.length;l++)if(i.indexOf(t[l])>-1)return wo.Word;return wo.Other}}class qe{constructor(t,i,l,s,r,c){if(this.config=t,this.doc=i,this.selection=l,this.values=s,this.status=t.statusTemplate.slice(),this.computeSlot=r,c)c._state=this;for(let h=0;h<this.config.dynamicSlots.length;h++)_f(this,h<<1);this.computeSlot=null}field(t,i=!0){let l=this.config.address[t.id];if(l==null){if(i)throw RangeError("Field is not present in this state");return}return _f(this,l),Pp(this,l)}update(...t){return q2(this,t,!0)}applyTransaction(t){let i=this.config,{base:l,compartments:s}=i;for(let h of t.effects)if(h.is(Tu.reconfigure)){if(i)s=new Map,i.compartments.forEach((d,m)=>s.set(m,d)),i=null;s.set(h.value.compartment,h.value.extension)}else if(h.is(Ct.reconfigure))i=null,l=h.value;else if(h.is(Ct.appendConfig))i=null,l=ku(l).concat(h.value);let r;if(!i)i=$p.resolve(l,s,this),r=new qe(i,this.doc,this.selection,i.dynamicSlots.map(()=>null),(d,m)=>m.reconfigure(d,this),null).values;else r=t.startState.values.slice();let c=t.startState.facet(Ob)?t.newSelection:t.newSelection.asSingle();new qe(i,t.newDoc,c,r,(h,d)=>d.update(h,t),t)}replaceSelection(t){if(typeof t=="string")t=this.toText(t);return this.changeByRange((i)=>({changes:{from:i.from,to:i.to,insert:t},range:G.cursor(i.from+t.length)}))}changeByRange(t){let i=this.selection,l=t(i.ranges[0]),s=this.changes(l.changes),r=[l.range],c=ku(l.effects);for(let h=1;h<i.ranges.length;h++){let d=t(i.ranges[h]),m=this.changes(d.changes),y=m.map(s);for(let S=0;S<h;S++)r[S]=r[S].map(y);let b=s.mapDesc(m,!0);r.push(d.range.map(b)),s=s.compose(y),c=Ct.mapEffects(c,y).concat(Ct.mapEffects(ku(d.effects),b))}return{changes:s,selection:G.create(r,i.mainIndex),effects:c}}changes(t=[]){if(t instanceof an)return t;return an.of(t,this.doc.length,this.facet(qe.lineSeparator))}toText(t){return Ye.of(t.split(this.facet(qe.lineSeparator)||Tb))}sliceDoc(t=0,i=this.doc.length){return this.doc.sliceString(t,i,this.lineBreak)}facet(t){let i=this.config.address[t.id];if(i==null)return t.default;return _f(this,i),Pp(this,i)}toJSON(t){let i={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(t)for(let l in t){let s=t[l];if(s instanceof ko&&this.config.address[s.id]!=null)i[l]=s.spec.toJSON(this.field(t[l]),this)}return i}static fromJSON(t,i={},l){if(!t||typeof t.doc!="string")throw RangeError("Invalid JSON representation for EditorState");let s=[];if(l){for(let r in l)if(Object.prototype.hasOwnProperty.call(t,r)){let c=l[r],h=t[r];s.push(c.init((d)=>c.spec.fromJSON(h,d)))}}return qe.create({doc:t.doc,selection:G.fromJSON(t.selection),extensions:i.extensions?s.concat([i.extensions]):s})}static create(t={}){let i=$p.resolve(t.extensions||[],new Map),l=t.doc instanceof Ye?t.doc:Ye.of((t.doc||"").split(i.staticFacet(qe.lineSeparator)||Tb)),s=!t.selection?G.single(0):t.selection instanceof G?t.selection:G.single(t.selection.anchor,t.selection.head);if(D2(s,l.length),!i.staticFacet(Ob))s=s.asSingle();return new qe(i,l,s,i.dynamicSlots.map(()=>null),(r,c)=>c.create(r),null)}get tabSize(){return this.facet(qe.tabSize)}get lineBreak(){return this.facet(qe.lineSeparator)||`
219
+ `}get readOnly(){return this.facet(H2)}phrase(t,...i){for(let l of this.facet(qe.phrases))if(Object.prototype.hasOwnProperty.call(l,t)){t=l[t];break}if(i.length)t=t.replace(/\$(\$|\d*)/g,(l,s)=>{if(s=="$")return"$";let r=+(s||1);return!r||r>i.length?l:i[r-1]});return t}languageDataAt(t,i,l=-1){let s=[];for(let r of this.facet(O2))for(let c of r(this,i,l))if(Object.prototype.hasOwnProperty.call(c,t))s.push(c[t]);return s}charCategorizer(t){let i=this.languageDataAt("wordChars",t);return Kz(i.length?i[0]:"")}wordAt(t){let{text:i,from:l,length:s}=this.doc.lineAt(t),r=this.charCategorizer(t),c=t-l,h=t-l;while(c>0){let d=Gi(i,c,!1);if(r(i.slice(d,c))!=wo.Word)break;c=d}while(h<s){let d=Gi(i,h);if(r(i.slice(h,d))!=wo.Word)break;h=d}return c==h?null:G.range(c+l,h+l)}}qe.allowMultipleSelections=Ob;qe.tabSize=fe.define({combine:(t)=>t.length?t[0]:4});qe.lineSeparator=R2;qe.readOnly=H2;qe.phrases=fe.define({compare(t,i){let l=Object.keys(t),s=Object.keys(i);return l.length==s.length&&l.every((r)=>t[r]==i[r])}});qe.languageData=O2;qe.changeFilter=L2;qe.transactionFilter=B2;qe.transactionExtender=z2;Tu.reconfigure=Ct.define();class xo{eq(t){return this==t}range(t,i=t){return Uf.create(t,i,this)}}xo.prototype.startSide=xo.prototype.endSide=0;xo.prototype.point=!1;xo.prototype.mapMode=wn.TrackDel;function Ib(t,i){return t==i||t.constructor==i.constructor&&t.eq(i)}class Uf{constructor(t,i,l){this.from=t,this.to=i,this.value=l}static create(t,i,l){return new Uf(t,i,l)}}function Bb(t,i){return t.from-i.from||t.value.startSide-i.value.startSide}class $b{constructor(t,i,l,s){this.from=t,this.to=i,this.value=l,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(t,i,l,s=0){let r=l?this.to:this.from;for(let c=s,h=r.length;;){if(c==h)return c;let d=c+h>>1,m=r[d]-t||(l?this.value[d].endSide:this.value[d].startSide)-i;if(d==c)return m>=0?c:h;if(m>=0)h=d;else c=d+1}}between(t,i,l,s){for(let r=this.findIndex(i,-1e9,!0),c=this.findIndex(l,1e9,!1,r);r<c;r++)if(s(this.from[r]+t,this.to[r]+t,this.value[r])===!1)return!1}map(t,i){let l=[],s=[],r=[],c=-1,h=-1;for(let d=0;d<this.value.length;d++){let m=this.value[d],y=this.from[d]+t,b=this.to[d]+t,S,w;if(y==b){let k=i.mapPos(y,m.startSide,m.mapMode);if(k==null)continue;if(S=w=k,m.startSide!=m.endSide){if(w=i.mapPos(y,m.endSide),w<S)continue}}else if(S=i.mapPos(y,m.startSide),w=i.mapPos(b,m.endSide),S>w||S==w&&m.startSide>0&&m.endSide<=0)continue;if((w-S||m.endSide-m.startSide)<0)continue;if(c<0)c=S;if(m.point)h=Math.max(h,w-S);l.push(m),s.push(S-c),r.push(w-c)}return{mapped:l.length?new $b(s,r,l,h):null,pos:c}}}class We{constructor(t,i,l,s){this.chunkPos=t,this.chunk=i,this.nextLayer=l,this.maxPoint=s}static create(t,i,l,s){return new We(t,i,l,s)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let i of this.chunk)t+=i.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:i=[],sort:l=!1,filterFrom:s=0,filterTo:r=this.length}=t,c=t.filter;if(i.length==0&&!c)return this;if(l)i=i.slice().sort(Bb);if(this.isEmpty)return i.length?We.of(i):this;let h=new Pb(this,null,-1).goto(0),d=0,m=[],y=new ir;while(h.value||d<i.length)if(d<i.length&&(h.from-i[d].from||h.startSide-i[d].value.startSide)>=0){let b=i[d++];if(!y.addInner(b.from,b.to,b.value))m.push(b)}else if(h.rangeIndex==1&&h.chunkIndex<this.chunk.length&&(d==i.length||this.chunkEnd(h.chunkIndex)<i[d].from)&&(!c||s>this.chunkEnd(h.chunkIndex)||r<this.chunkPos[h.chunkIndex])&&y.addChunk(this.chunkPos[h.chunkIndex],this.chunk[h.chunkIndex]))h.nextChunk();else{if(!c||s>h.to||r<h.from||c(h.from,h.to,h.value)){if(!y.addInner(h.from,h.to,h.value))m.push(Uf.create(h.from,h.to,h.value))}h.next()}return y.finishInner(this.nextLayer.isEmpty&&!m.length?We.empty:this.nextLayer.update({add:m,filter:c,filterFrom:s,filterTo:r}))}map(t){if(t.empty||this.isEmpty)return this;let i=[],l=[],s=-1;for(let c=0;c<this.chunk.length;c++){let h=this.chunkPos[c],d=this.chunk[c],m=t.touchesRange(h,h+d.length);if(m===!1)s=Math.max(s,d.maxPoint),i.push(d),l.push(t.mapPos(h));else if(m===!0){let{mapped:y,pos:b}=d.map(h,t);if(y)s=Math.max(s,y.maxPoint),i.push(y),l.push(b)}}let r=this.nextLayer.map(t);return i.length==0?r:new We(l,i,r||We.empty,s)}between(t,i,l){if(this.isEmpty)return;for(let s=0;s<this.chunk.length;s++){let r=this.chunkPos[s],c=this.chunk[s];if(i>=r&&t<=r+c.length&&c.between(r,t-r,i-r,l)===!1)return}this.nextLayer.between(t,i,l)}iter(t=0){return qf.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,i=0){return qf.from(t).goto(i)}static compare(t,i,l,s,r=-1){let c=t.filter((b)=>b.maxPoint>0||!b.isEmpty&&b.maxPoint>=r),h=i.filter((b)=>b.maxPoint>0||!b.isEmpty&&b.maxPoint>=r),d=C2(c,h,l),m=new wu(c,d,r),y=new wu(h,d,r);if(l.iterGaps((b,S,w)=>A2(m,b,y,S,w,s)),l.empty&&l.length==0)A2(m,0,y,0,0,s)}static eq(t,i,l=0,s){if(s==null)s=999999999;let r=t.filter((y)=>!y.isEmpty&&i.indexOf(y)<0),c=i.filter((y)=>!y.isEmpty&&t.indexOf(y)<0);if(r.length!=c.length)return!1;if(!r.length)return!0;let h=C2(r,c),d=new wu(r,h,0).goto(l),m=new wu(c,h,0).goto(l);for(;;){if(d.to!=m.to||!zb(d.active,m.active)||d.point&&(!m.point||!Ib(d.point,m.point)))return!1;if(d.to>s)return!0;d.next(),m.next()}}static spans(t,i,l,s,r=-1){let c=new wu(t,null,r).goto(i),h=i,d=c.openStart;for(;;){let m=Math.min(c.to,l);if(c.point){let y=c.activeForPoint(c.to),b=c.pointFrom<i?y.length+1:c.point.startSide<0?y.length:Math.min(y.length,d);s.point(h,m,c.point,y,b,c.pointRank),d=Math.min(c.openEnd(m),y.length)}else if(m>h)s.span(h,m,c.active,d),d=c.openEnd(m);if(c.to>l)return d+(c.point&&c.to>l?1:0);h=c.to,c.next()}}static of(t,i=!1){let l=new ir;for(let s of t instanceof Uf?[t]:i?e3(t):t)l.add(s.from,s.to,s.value);return l.finish()}static join(t){if(!t.length)return We.empty;let i=t[t.length-1];for(let l=t.length-2;l>=0;l--)for(let s=t[l];s!=We.empty;s=s.nextLayer)i=new We(s.chunkPos,s.chunk,i,Math.max(s.maxPoint,i.maxPoint));return i}}We.empty=new We([],[],null,-1);function e3(t){if(t.length>1)for(let i=t[0],l=1;l<t.length;l++){let s=t[l];if(Bb(i,s)>0)return t.slice().sort(Bb);i=s}return t}We.empty.nextLayer=We.empty;class ir{finishChunk(t){if(this.chunks.push(new $b(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t)this.from=[],this.to=[],this.value=[]}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(t,i,l){if(!this.addInner(t,i,l))(this.nextLayer||(this.nextLayer=new ir)).add(t,i,l)}addInner(t,i,l){let s=t-this.lastTo||l.startSide-this.last.endSide;if(s<=0&&(t-this.lastFrom||l.startSide-this.last.startSide)<0)throw Error("Ranges must be added sorted by `from` position and `startSide`");if(s<0)return!1;if(this.from.length==250)this.finishChunk(!0);if(this.chunkStart<0)this.chunkStart=t;if(this.from.push(t-this.chunkStart),this.to.push(i-this.chunkStart),this.last=l,this.lastFrom=t,this.lastTo=i,this.value.push(l),l.point)this.maxPoint=Math.max(this.maxPoint,i-t);return!0}addChunk(t,i){if((t-this.lastTo||i.value[0].startSide-this.last.endSide)<0)return!1;if(this.from.length)this.finishChunk(!0);this.setMaxPoint=Math.max(this.setMaxPoint,i.maxPoint),this.chunks.push(i),this.chunkPos.push(t);let l=i.value.length-1;return this.last=i.value[l],this.lastFrom=i.from[l]+t,this.lastTo=i.to[l]+t,!0}finish(){return this.finishInner(We.empty)}finishInner(t){if(this.from.length)this.finishChunk(!1);if(this.chunks.length==0)return t;let i=We.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,i}}function C2(t,i,l){let s=new Map;for(let c of t)for(let h=0;h<c.chunk.length;h++)if(c.chunk[h].maxPoint<=0)s.set(c.chunk[h],c.chunkPos[h]);let r=new Set;for(let c of i)for(let h=0;h<c.chunk.length;h++){let d=s.get(c.chunk[h]);if(d!=null&&(l?l.mapPos(d):d)==c.chunkPos[h]&&!(l===null||l===void 0?void 0:l.touchesRange(d,d+c.chunk[h].length)))r.add(c.chunk[h])}return r}class Pb{constructor(t,i,l,s=0){this.layer=t,this.skip=i,this.minPoint=l,this.rank=s}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(t,i=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(t,i,!1),this}gotoInner(t,i,l){while(this.chunkIndex<this.layer.chunk.length){let s=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(s)||this.layer.chunkEnd(this.chunkIndex)<t||s.maxPoint<this.minPoint))break;this.chunkIndex++,l=!1}if(this.chunkIndex<this.layer.chunk.length){let s=this.layer.chunk[this.chunkIndex].findIndex(t-this.layer.chunkPos[this.chunkIndex],i,!0);if(!l||this.rangeIndex<s)this.setRangeIndex(s)}this.next()}forward(t,i){if((this.to-t||this.endSide-i)<0)this.gotoInner(t,i,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let t=this.layer.chunkPos[this.chunkIndex],i=this.layer.chunk[this.chunkIndex],l=t+i.from[this.rangeIndex];if(this.from=l,this.to=t+i.to[this.rangeIndex],this.value=i.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)while(this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]))this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=t}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(t){return this.from-t.from||this.startSide-t.startSide||this.rank-t.rank||this.to-t.to||this.endSide-t.endSide}}class qf{constructor(t){this.heap=t}static from(t,i=null,l=-1){let s=[];for(let r=0;r<t.length;r++)for(let c=t[r];!c.isEmpty;c=c.nextLayer)if(c.maxPoint>=l)s.push(new Pb(c,i,l,r));return s.length==1?s[0]:new qf(s)}get startSide(){return this.value?this.value.startSide:0}goto(t,i=-1e9){for(let l of this.heap)l.goto(t,i);for(let l=this.heap.length>>1;l>=0;l--)Ab(this.heap,l);return this.next(),this}forward(t,i){for(let l of this.heap)l.forward(t,i);for(let l=this.heap.length>>1;l>=0;l--)Ab(this.heap,l);if((this.to-t||this.value.endSide-i)<0)this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];if(this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value)t.next();Ab(this.heap,0)}}}function Ab(t,i){for(let l=t[i];;){let s=(i<<1)+1;if(s>=t.length)break;let r=t[s];if(s+1<t.length&&r.compare(t[s+1])>=0)r=t[s+1],s++;if(l.compare(r)<0)break;t[s]=l,t[i]=r,i=s}}class wu{constructor(t,i,l){this.minPoint=l,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=qf.from(t,i,l)}goto(t,i=-1e9){return this.cursor.goto(t,i),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=i,this.openStart=-1,this.next(),this}forward(t,i){while(this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-i)<0)this.removeActive(this.minActive);this.cursor.forward(t,i)}removeActive(t){qp(this.active,t),qp(this.activeTo,t),qp(this.activeRank,t),this.minActive=T2(this.active,this.activeTo)}addActive(t){let i=0,{value:l,to:s,rank:r}=this.cursor;while(i<this.activeRank.length&&(r-this.activeRank[i]||s-this.activeTo[i])>0)i++;if(Vp(this.active,i,l),Vp(this.activeTo,i,s),Vp(this.activeRank,i,r),t)Vp(t,i,this.cursor.from);this.minActive=T2(this.active,this.activeTo)}next(){let t=this.to,i=this.point;this.point=null;let l=this.openStart<0?[]:null;for(;;){let s=this.minActive;if(s>-1&&(this.activeTo[s]-this.cursor.from||this.active[s].endSide-this.cursor.startSide)<0){if(this.activeTo[s]>t){this.to=this.activeTo[s],this.endSide=this.active[s].endSide;break}if(this.removeActive(s),l)qp(l,s)}else if(!this.cursor.value){this.to=this.endSide=1e9;break}else if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let r=this.cursor.value;if(!r.point)this.addActive(l),this.cursor.next();else if(i&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=r,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=r.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}}if(l){this.openStart=0;for(let s=l.length-1;s>=0&&l[s]<t;s--)this.openStart++}}activeForPoint(t){if(!this.active.length)return this.active;let i=[];for(let l=this.active.length-1;l>=0;l--){if(this.activeRank[l]<this.pointRank)break;if(this.activeTo[l]>t||this.activeTo[l]==t&&this.active[l].endSide>=this.point.endSide)i.push(this.active[l])}return i.reverse()}openEnd(t){let i=0;for(let l=this.activeTo.length-1;l>=0&&this.activeTo[l]>t;l--)i++;return i}}function A2(t,i,l,s,r,c){t.goto(i),l.goto(s);let h=s+r,d=s,m=s-i,y=!!c.boundChange;for(let b=!1;;){let S=t.to+m-l.to,w=S||t.endSide-l.endSide,k=w<0?t.to+m:l.to,E=Math.min(k,h);if(t.point||l.point){if(!(t.point&&l.point&&Ib(t.point,l.point)&&zb(t.activeForPoint(t.to),l.activeForPoint(l.to))))c.comparePoint(d,E,t.point,l.point);b=!1}else{if(b)c.boundChange(d);if(E>d&&!zb(t.active,l.active))c.compareRange(d,E,t.active,l.active);if(y&&E<h&&(S||t.openEnd(k)!=l.openEnd(k)))b=!0}if(k>h)break;if(d=k,w<=0)t.next();if(w>=0)l.next()}}function zb(t,i){if(t.length!=i.length)return!1;for(let l=0;l<t.length;l++)if(t[l]!=i[l]&&!Ib(t[l],i[l]))return!1;return!0}function qp(t,i){for(let l=i,s=t.length-1;l<s;l++)t[l]=t[l+1];t.pop()}function Vp(t,i,l){for(let s=t.length-1;s>=i;s--)t[s+1]=t[s];t[i]=l}function T2(t,i){let l=-1,s=1e9;for(let r=0;r<i.length;r++)if((i[r]-s||t[r].endSide-t[l].endSide)<0)l=r,s=i[r];return l}function ta(t,i,l=t.length){let s=0;for(let r=0;r<l&&r<t.length;)if(t.charCodeAt(r)==9)s+=i-s%i,r++;else s++,r=Gi(t,r);return s}function V2(t,i,l,s){for(let r=0,c=0;;){if(c>=i)return r;if(r==t.length)break;c+=t.charCodeAt(r)==9?l-c%l:1,r=Gi(t,r)}return s===!0?-1:t.length}var j2=typeof Symbol>"u"?"__"+"ͼ":Symbol.for("ͼ"),Yb=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),I2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Co{constructor(t,i){this.rules=[];let{finish:l}=i||{};function s(c){return/^@/.test(c)?[c]:c.split(/,\s*/)}function r(c,h,d,m){let y=[],b=/^@(\w+)\b/.exec(c[0]),S=b&&b[1]=="keyframes";if(b&&h==null)return d.push(c[0]+";");for(let w in h){let k=h[w];if(/&/.test(w))r(w.split(/,\s*/).map((E)=>c.map((R)=>E.replace(/&/,R))).reduce((E,R)=>E.concat(R)),k,d);else if(k&&typeof k=="object"){if(!b)throw RangeError("The value of a property ("+w+") should be a primitive value.");r(s(w),k,y,S)}else if(k!=null)y.push(w.replace(/_.*/,"").replace(/[A-Z]/g,(E)=>"-"+E.toLowerCase())+": "+k+";")}if(y.length||S)d.push((l&&!b&&!m?c.map(l):c).join(", ")+" {"+y.join(" ")+"}")}for(let c in t)r(s(c),t[c],this.rules)}getRules(){return this.rules.join(`
220
+ `)}static newName(){let t=I2[j2]||1;return I2[j2]=t+1,"ͼ"+t.toString(36)}static mount(t,i,l){let s=t[Yb],r=l&&l.nonce;if(!s)s=new P2(t,r);else if(r)s.setNonce(r);s.mount(Array.isArray(i)?i:[i],t)}}var $2=new Map;class P2{constructor(t,i){let l=t.ownerDocument||t,s=l.defaultView;if(!t.head&&t.adoptedStyleSheets&&s.CSSStyleSheet){let r=$2.get(l);if(r)return t[Yb]=r;this.sheet=new s.CSSStyleSheet,$2.set(l,this)}else if(this.styleTag=l.createElement("style"),i)this.styleTag.setAttribute("nonce",i);this.modules=[],t[Yb]=this}mount(t,i){let l=this.sheet,s=0,r=0;for(let c=0;c<t.length;c++){let h=t[c],d=this.modules.indexOf(h);if(d<r&&d>-1)this.modules.splice(d,1),r--,d=-1;if(d==-1){if(this.modules.splice(r++,0,h),l)for(let m=0;m<h.rules.length;m++)l.insertRule(h.rules[m],s++)}else{while(r<d)s+=this.modules[r++].rules.length;s+=h.rules.length,r++}}if(l){if(i.adoptedStyleSheets.indexOf(this.sheet)<0)i.adoptedStyleSheets=[this.sheet,...i.adoptedStyleSheets]}else{let c="";for(let d=0;d<this.modules.length;d++)c+=this.modules[d].getRules()+`
221
+ `;this.styleTag.textContent=c;let h=i.head||i;if(this.styleTag.parentNode!=h)h.insertBefore(this.styleTag,h.firstChild)}}setNonce(t){if(this.styleTag&&this.styleTag.getAttribute("nonce")!=t)this.styleTag.setAttribute("nonce",t)}}var Zl={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:"'"},Eu={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},t3=typeof navigator<"u"&&/Mac/.test(navigator.platform),n3=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(Ht=0;Ht<10;Ht++)Zl[48+Ht]=Zl[96+Ht]=String(Ht);var Ht;for(Ht=1;Ht<=24;Ht++)Zl[Ht+111]="F"+Ht;var Ht;for(Ht=65;Ht<=90;Ht++)Zl[Ht]=String.fromCharCode(Ht+32),Eu[Ht]=String.fromCharCode(Ht);var Ht;for(Vf in Zl)if(!Eu.hasOwnProperty(Vf))Eu[Vf]=Zl[Vf];var Vf;function Y2(t){var i=t3&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||n3&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",l=!i&&t.key||(t.shiftKey?Eu:Zl)[t.keyCode]||t.key||"Unidentified";if(l=="Esc")l="Escape";if(l=="Del")l="Delete";if(l=="Left")l="ArrowLeft";if(l=="Up")l="ArrowUp";if(l=="Right")l="ArrowRight";if(l=="Down")l="ArrowDown";return l}var In=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},Jb=typeof document<"u"?document:{documentElement:{style:{}}},Zb=/Edge\/(\d+)/.exec(In.userAgent),ST=/MSIE \d/.test(In.userAgent),Kb=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(In.userAgent),fm=!!(ST||Kb||Zb),X2=!fm&&/gecko\/(\d+)/i.test(In.userAgent),Xb=!fm&&/Chrome\/(\d+)/.exec(In.userAgent),Q2="webkitFontSmoothing"in Jb.documentElement.style,ev=!fm&&/Apple Computer/.test(In.vendor),G2=ev&&(/Mobile\/\w+/.test(In.userAgent)||In.maxTouchPoints>2),K={mac:G2||/Mac/.test(In.platform),windows:/Win/.test(In.platform),linux:/Linux|X11/.test(In.platform),ie:fm,ie_version:ST?Jb.documentMode||6:Kb?+Kb[1]:Zb?+Zb[1]:0,gecko:X2,gecko_version:X2?+(/Firefox\/(\d+)/.exec(In.userAgent)||[0,0])[1]:0,chrome:!!Xb,chrome_version:Xb?+Xb[1]:0,ios:G2,android:/Android\b/.test(In.userAgent),webkit:Q2,webkit_version:Q2?+(/\bAppleWebKit\/(\d+)/.exec(In.userAgent)||[0,0])[1]:0,safari:ev,safari_version:ev?+(/\bVersion\/(\d+(\.\d+)?)/.exec(In.userAgent)||[0,0])[1]:0,tabSize:Jb.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function gv(t,i){for(let l in t)if(l=="class"&&i.class)i.class+=" "+t.class;else if(l=="style"&&i.style)i.style+=";"+t.style;else i[l]=t[l];return i}var im=Object.create(null);function yv(t,i,l){if(t==i)return!0;if(!t)t=im;if(!i)i=im;let s=Object.keys(t),r=Object.keys(i);if(s.length-(l&&s.indexOf(l)>-1?1:0)!=r.length-(l&&r.indexOf(l)>-1?1:0))return!1;for(let c of s)if(c!=l&&(r.indexOf(c)==-1||t[c]!==i[c]))return!1;return!0}function i3(t,i){for(let l=t.attributes.length-1;l>=0;l--){let s=t.attributes[l].name;if(i[s]==null)t.removeAttribute(s)}for(let l in i){let s=i[l];if(l=="style")t.style.cssText=s;else if(t.getAttribute(l)!=s)t.setAttribute(l,s)}}function W2(t,i,l){let s=!1;if(i){for(let r in i)if(!(l&&(r in l)))if(s=!0,r=="style")t.style.cssText="";else t.removeAttribute(r)}if(l){for(let r in l)if(!(i&&i[r]==l[r]))if(s=!0,r=="style")t.style.cssText=l[r];else t.setAttribute(r,l[r])}return s}function o3(t){let i=Object.create(null);for(let l=0;l<t.attributes.length;l++){let s=t.attributes[l];i[s.name]=s.value}return i}class la{eq(t){return!1}updateDOM(t,i,l){return!1}compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(t){return!0}coordsAt(t,i,l){return null}get isHidden(){return!1}get editable(){return!1}destroy(t){}}var Zi=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(Zi||(Zi={}));class St extends xo{constructor(t,i,l,s){super();this.startSide=t,this.endSide=i,this.widget=l,this.spec=s}get heightRelevant(){return!1}static mark(t){return new Jf(t)}static widget(t){let i=Math.max(-1e4,Math.min(1e4,t.side||0)),l=!!t.block;return i+=l&&!t.inlineOrder?i>0?300000000:-400000000:i>0?1e8:-1e8,new sr(t,i,i,l,t.widget||null,!1)}static replace(t){let i=!!t.block,l,s;if(t.isBlockGap)l=-500000000,s=400000000;else{let{start:r,end:c}=wT(t,i);l=(r?i?-300000000:-1:500000000)-1,s=(c?i?200000000:1:-600000000)+1}return new sr(t,l,s,i,t.widget||null,!0)}static line(t){return new Zf(t)}static set(t,i=!1){return We.of(t,i)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}St.none=We.empty;class Jf extends St{constructor(t){let{start:i,end:l}=wT(t);super(i?-1:500000000,l?1:-600000000,null,t);this.tagName=t.tagName||"span",this.attrs=t.class&&t.attributes?gv(t.attributes,{class:t.class}):t.class?{class:t.class}:t.attributes||im}eq(t){return this==t||t instanceof Jf&&this.tagName==t.tagName&&yv(this.attrs,t.attrs)}range(t,i=t){if(t>=i)throw RangeError("Mark decorations may not be empty");return super.range(t,i)}}Jf.prototype.point=!1;class Zf extends St{constructor(t){super(-200000000,-200000000,null,t)}eq(t){return t instanceof Zf&&this.spec.class==t.spec.class&&yv(this.spec.attributes,t.spec.attributes)}range(t,i=t){if(i!=t)throw RangeError("Line decoration ranges must be zero-length");return super.range(t,i)}}Zf.prototype.mapMode=wn.TrackBefore;Zf.prototype.point=!0;class sr extends St{constructor(t,i,l,s,r,c){super(i,l,r,t);this.block=s,this.isReplace=c,this.mapMode=!s?wn.TrackDel:i<=0?wn.TrackBefore:wn.TrackAfter}get type(){return this.startSide!=this.endSide?Zi.WidgetRange:this.startSide<=0?Zi.WidgetBefore:Zi.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof sr&&l3(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(t,i=t){if(this.isReplace&&(t>i||t==i&&this.startSide>0&&this.endSide<=0))throw RangeError("Invalid range for replacement decoration");if(!this.isReplace&&i!=t)throw RangeError("Widget decorations can only have zero-length ranges");return super.range(t,i)}}sr.prototype.point=!0;function wT(t,i=!1){let{inclusiveStart:l,inclusiveEnd:s}=t;if(l==null)l=t.inclusive;if(s==null)s=t.inclusive;return{start:l!==null&&l!==void 0?l:i,end:s!==null&&s!==void 0?s:i}}function l3(t,i){return t==i||!!(t&&i&&t.compare(i))}function Ou(t,i,l,s=0){let r=l.length-1;if(r>=0&&l[r]+s>=t)l[r]=Math.max(l[r],i);else l.push(t,i)}class Qf extends xo{constructor(t,i,l){super();this.tagName=t,this.attributes=i,this.rank=l}eq(t){return t==this||t instanceof Qf&&this.tagName==t.tagName&&yv(this.attributes,t.attributes)}static create(t){return new Qf(t.tagName,t.attributes||im,t.rank==null?50:Math.max(0,Math.min(t.rank,100)))}static set(t,i=!1){return We.of(t,i)}}Qf.prototype.startSide=Qf.prototype.endSide=-1;function Gf(t){let i;if(t.nodeType==11)i=t.getSelection?t:t.ownerDocument;else i=t;return i.getSelection()}function tv(t,i){return i?t==i||t.contains(i.nodeType!=1?i.parentNode:i):!1}function Pf(t,i){if(!i.anchorNode)return!1;try{return tv(t,i.anchorNode)}catch(l){return!1}}function Zp(t){if(t.nodeType==3)return Wf(t,0,t.nodeValue.length).getClientRects();else if(t.nodeType==1)return t.getClientRects();else return[]}function Yf(t,i,l,s){return l?F2(t,i,l,s,-1)||F2(t,i,l,s,1):!1}function ia(t){for(var i=0;;i++)if(t=t.previousSibling,!t)return i}function om(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function F2(t,i,l,s,r){for(;;){if(t==l&&i==s)return!0;if(i==(r<0?0:ts(t))){if(t.nodeName=="DIV")return!1;let c=t.parentNode;if(!c||c.nodeType!=1)return!1;i=ia(t)+(r<0?0:1),t=c}else if(t.nodeType==1){if(t=t.childNodes[i+(r<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;i=r<0?ts(t):0}else return!1}}function ts(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function lm(t,i){let{left:l,right:s}=t;if(l==s)return t;let r=i?l:s;return{left:r,right:r,top:t.top,bottom:t.bottom}}function s3(t){let i=t.visualViewport;if(i)return{left:0,right:i.width,top:0,bottom:i.height};return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function xT(t,i){let l=i.width/t.offsetWidth,s=i.height/t.offsetHeight;if(l>0.995&&l<1.005||!isFinite(l)||Math.abs(i.width-t.offsetWidth)<1)l=1;if(s>0.995&&s<1.005||!isFinite(s)||Math.abs(i.height-t.offsetHeight)<1)s=1;return{scaleX:l,scaleY:s}}function a3(t,i,l,s,r,c,h,d){let m=t.ownerDocument,y=m.defaultView||window;for(let b=t,S=!1;b&&!S;)if(b.nodeType==1){let w,k=b==m.body,E=1,R=1;if(k)w=s3(y);else{if(/^(fixed|sticky)$/.test(getComputedStyle(b).position))S=!0;if(b.scrollHeight<=b.clientHeight&&b.scrollWidth<=b.clientWidth){b=b.assignedSlot||b.parentNode;continue}let q=b.getBoundingClientRect();({scaleX:E,scaleY:R}=xT(b,q)),w={left:q.left,right:q.left+b.clientWidth*E,top:q.top,bottom:q.top+b.clientHeight*R}}let L=0,N=0;if(r=="nearest"){if(i.top<w.top+h){if(N=i.top-(w.top+h),l>0&&i.bottom>w.bottom+N)N=i.bottom-w.bottom+h}else if(i.bottom>w.bottom-h){if(N=i.bottom-w.bottom+h,l<0&&i.top-N<w.top)N=i.top-(w.top+h)}}else{let q=i.bottom-i.top,J=w.bottom-w.top;N=(r=="center"&&q<=J?i.top+q/2-J/2:r=="start"||r=="center"&&l<0?i.top-h:i.bottom-J+h)-w.top}if(s=="nearest"){if(i.left<w.left+c){if(L=i.left-(w.left+c),l>0&&i.right>w.right+L)L=i.right-w.right+c}else if(i.right>w.right-c){if(L=i.right-w.right+c,l<0&&i.left<w.left+L)L=i.left-(w.left+c)}}else L=(s=="center"?i.left+(i.right-i.left)/2-(w.right-w.left)/2:s=="start"==d?i.left-c:i.right-(w.right-w.left)+c)-w.left;if(L||N)if(k)y.scrollBy(L,N);else{let q=0,J=0;if(N){let ae=b.scrollTop;b.scrollTop+=N/R,J=(b.scrollTop-ae)*R}if(L){let ae=b.scrollLeft;b.scrollLeft+=L/E,q=(b.scrollLeft-ae)*E}if(i={left:i.left-q,top:i.top-J,right:i.right-q,bottom:i.bottom-J},q&&Math.abs(q-L)<1)s="nearest";if(J&&Math.abs(J-N)<1)r="nearest"}if(k)break;if(i.top<w.top||i.bottom>w.bottom||i.left<w.left||i.right>w.right)i={left:Math.max(i.left,w.left),right:Math.min(i.right,w.right),top:Math.max(i.top,w.top),bottom:Math.min(i.bottom,w.bottom)};b=b.assignedSlot||b.parentNode}else if(b.nodeType==11)b=b.host;else break}function kT(t,i=!0){let l=t.ownerDocument,s=null,r=null;for(let c=t.parentNode;c;)if(c==l.body||(!i||s)&&r)break;else if(c.nodeType==1){if(!r&&c.scrollHeight>c.clientHeight)r=c;if(i&&!s&&c.scrollWidth>c.clientWidth)s=c;c=c.assignedSlot||c.parentNode}else if(c.nodeType==11)c=c.host;else break;return{x:s,y:r}}class CT{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(t){return this.anchorNode==t.anchorNode&&this.anchorOffset==t.anchorOffset&&this.focusNode==t.focusNode&&this.focusOffset==t.focusOffset}setRange(t){let{anchorNode:i,focusNode:l}=t;this.set(i,Math.min(t.anchorOffset,i?ts(i):0),l,Math.min(t.focusOffset,l?ts(l):0))}set(t,i,l,s){this.anchorNode=t,this.anchorOffset=i,this.focusNode=l,this.focusOffset=s}}var or=null;if(K.safari&&K.safari_version>=26)or=!1;function AT(t){if(t.setActive)return t.setActive();if(or)return t.focus(or);let i=[];for(let l=t;l;l=l.parentNode)if(i.push(l,l.scrollTop,l.scrollLeft),l==l.ownerDocument)break;if(t.focus(or==null?{get preventScroll(){return or={preventScroll:!0},!0}}:void 0),!or){or=!1;for(let l=0;l<i.length;){let s=i[l++],r=i[l++],c=i[l++];if(s.scrollTop!=r)s.scrollTop=r;if(s.scrollLeft!=c)s.scrollLeft=c}}}var J2;function Wf(t,i,l=i){let s=J2||(J2=document.createRange());return s.setEnd(t,l),s.setStart(t,i),s}function Ru(t,i,l,s){let r={key:i,code:i,keyCode:l,which:l,cancelable:!0};if(s)({altKey:r.altKey,ctrlKey:r.ctrlKey,shiftKey:r.shiftKey,metaKey:r.metaKey}=s);let c=new KeyboardEvent("keydown",r);c.synthetic=!0,t.dispatchEvent(c);let h=new KeyboardEvent("keyup",r);return h.synthetic=!0,t.dispatchEvent(h),c.defaultPrevented||h.defaultPrevented}function r3(t){while(t){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function u3(t,i){let{focusNode:l,focusOffset:s}=i;if(!l||i.anchorNode!=l||i.anchorOffset!=s)return!1;s=Math.min(s,ts(l));for(;;)if(s){if(l.nodeType!=1)return!1;let r=l.childNodes[s-1];if(r.contentEditable=="false")s--;else l=r,s=ts(l)}else if(l==t)return!0;else s=ia(l),l=l.parentNode}function TT(t){if(t instanceof Window)return t.pageYOffset>Math.max(0,t.document.documentElement.scrollHeight-t.innerHeight-4);return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function ET(t,i){for(let l=t,s=i;;)if(l.nodeType==3&&s>0)return{node:l,offset:s};else if(l.nodeType==1&&s>0){if(l.contentEditable=="false")return null;l=l.childNodes[s-1],s=ts(l)}else if(l.parentNode&&!om(l))s=ia(l),l=l.parentNode;else return null}function MT(t,i){for(let l=t,s=i;;)if(l.nodeType==3&&s<l.nodeValue.length)return{node:l,offset:s};else if(l.nodeType==1&&s<l.childNodes.length){if(l.contentEditable=="false")return null;l=l.childNodes[s],s=0}else if(l.parentNode&&!om(l))s=ia(l)+1,l=l.parentNode;else return null}class Eo{constructor(t,i,l=!0){this.node=t,this.offset=i,this.precise=l}static before(t,i){return new Eo(t.parentNode,ia(t),i)}static after(t,i){return new Eo(t.parentNode,ia(t)+1,i)}}var Xt=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(Xt||(Xt={})),ar=Xt.LTR,bv=Xt.RTL;function DT(t){let i=[];for(let l=0;l<t.length;l++)i.push(1<<+t[l]);return i}var c3=DT("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),f3=DT("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),nv=Object.create(null),dl=[];for(let t of["()","[]","{}"]){let i=t.charCodeAt(0),l=t.charCodeAt(1);nv[i]=l,nv[l]=-i}function OT(t){return t<=247?c3[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?f3[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}var h3=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Mo{get dir(){return this.level%2?bv:ar}constructor(t,i,l){this.from=t,this.to=i,this.level=l}side(t,i){return this.dir==i==t?this.to:this.from}forward(t,i){return t==(this.dir==i)}static find(t,i,l,s){let r=-1;for(let c=0;c<t.length;c++){let h=t[c];if(h.from<=i&&h.to>=i){if(h.level==l)return c;if(r<0||(s!=0?s<0?h.from<i:h.to>i:t[r].level>h.level))r=c}}if(r<0)throw RangeError("Index out of range");return r}}function RT(t,i){if(t.length!=i.length)return!1;for(let l=0;l<t.length;l++){let s=t[l],r=i[l];if(s.from!=r.from||s.to!=r.to||s.direction!=r.direction||!RT(s.inner,r.inner))return!1}return!0}var pt=[];function d3(t,i,l,s,r){for(let c=0;c<=s.length;c++){let h=c?s[c-1].to:i,d=c<s.length?s[c].from:l,m=c?256:r;for(let y=h,b=m,S=m;y<d;y++){let w=OT(t.charCodeAt(y));if(w==512)w=b;else if(w==8&&S==4)w=16;if(pt[y]=w==4?2:w,w&7)S=w;b=w}for(let y=h,b=m,S=m;y<d;y++){let w=pt[y];if(w==128)if(y<d-1&&b==pt[y+1]&&b&24)w=pt[y]=b;else pt[y]=256;else if(w==64){let k=y+1;while(k<d&&pt[k]==64)k++;let E=y&&b==8||k<l&&pt[k]==8?S==1?1:8:256;for(let R=y;R<k;R++)pt[R]=E;y=k-1}else if(w==8&&S==1)pt[y]=1;if(b=w,w&7)S=w}}}function p3(t,i,l,s,r){let c=r==1?2:1;for(let h=0,d=0,m=0;h<=s.length;h++){let y=h?s[h-1].to:i,b=h<s.length?s[h].from:l;for(let S=y,w,k,E;S<b;S++)if(k=nv[w=t.charCodeAt(S)])if(k<0){for(let R=d-3;R>=0;R-=3)if(dl[R+1]==-k){let L=dl[R+2],N=L&2?r:!(L&4)?0:L&1?c:r;if(N)pt[S]=pt[dl[R]]=N;d=R;break}}else if(dl.length==189)break;else dl[d++]=S,dl[d++]=w,dl[d++]=m;else if((E=pt[S])==2||E==1){let R=E==r;m=R?0:1;for(let L=d-3;L>=0;L-=3){let N=dl[L+2];if(N&2)break;if(R)dl[L+2]|=2;else{if(N&4)break;dl[L+2]|=4}}}}}function m3(t,i,l,s){for(let r=0,c=s;r<=l.length;r++){let h=r?l[r-1].to:t,d=r<l.length?l[r].from:i;for(let m=h;m<d;){let y=pt[m];if(y==256){let b=m+1;for(;;)if(b==d){if(r==l.length)break;b=l[r++].to,d=r<l.length?l[r].from:i}else if(pt[b]==256)b++;else break;let S=c==1,w=(b<i?pt[b]:s)==1,k=S==w?S?1:2:s;for(let E=b,R=r,L=R?l[R-1].to:t;E>m;){if(E==L)E=l[--R].from,L=R?l[R-1].to:t;pt[--E]=k}m=b}else c=y,m++}}}function iv(t,i,l,s,r,c,h){let d=s%2?2:1;if(s%2==r%2)for(let m=i,y=0;m<l;){let b=!0,S=!1;if(y==c.length||m<c[y].from){let R=pt[m];if(R!=d)b=!1,S=R==16}let w=!b&&d==1?[]:null,k=b?s:s+1,E=m;e:for(;;)if(y<c.length&&E==c[y].from){if(S)break e;let R=c[y];if(!b)for(let L=R.to,N=y+1;;){if(L==l)break e;if(N<c.length&&c[N].from==L)L=c[N++].to;else if(pt[L]==d)break e;else break}if(y++,w)w.push(R);else{if(R.from>m)h.push(new Mo(m,R.from,k));let L=R.direction==ar!=!(k%2);ov(t,L?s+1:s,r,R.inner,R.from,R.to,h),m=R.to}E=R.to}else if(E==l||(b?pt[E]!=d:pt[E]==d))break;else E++;if(w)iv(t,m,E,s+1,r,w,h);else if(m<E)h.push(new Mo(m,E,k));m=E}else for(let m=l,y=c.length;m>i;){let b=!0,S=!1;if(!y||m>c[y-1].to){let R=pt[m-1];if(R!=d)b=!1,S=R==16}let w=!b&&d==1?[]:null,k=b?s:s+1,E=m;e:for(;;)if(y&&E==c[y-1].to){if(S)break e;let R=c[--y];if(!b)for(let L=R.from,N=y;;){if(L==i)break e;if(N&&c[N-1].to==L)L=c[--N].from;else if(pt[L-1]==d)break e;else break}if(w)w.push(R);else{if(R.to<m)h.push(new Mo(R.to,m,k));let L=R.direction==ar!=!(k%2);ov(t,L?s+1:s,r,R.inner,R.from,R.to,h),m=R.from}E=R.from}else if(E==i||(b?pt[E-1]!=d:pt[E-1]==d))break;else E--;if(w)iv(t,E,m,s+1,r,w,h);else if(E<m)h.push(new Mo(E,m,k));m=E}}function ov(t,i,l,s,r,c,h){let d=i%2?2:1;d3(t,r,c,s,d),p3(t,r,c,s,d),m3(r,c,s,d),iv(t,r,c,i,l,s,h)}function g3(t,i,l){if(!t)return[new Mo(0,0,i==bv?1:0)];if(i==ar&&!l.length&&!h3.test(t))return LT(t.length);if(l.length)while(t.length>pt.length)pt[pt.length]=256;let s=[],r=i==ar?0:1;return ov(t,r,r,l,0,t.length,s),s}function LT(t){return[new Mo(0,t,0)]}var BT="";function y3(t,i,l,s,r){var c;let h=s.head-t.from,d=Mo.find(i,h,(c=s.bidiLevel)!==null&&c!==void 0?c:-1,s.assoc),m=i[d],y=m.side(r,l);if(h==y){let w=d+=r?1:-1;if(w<0||w>=i.length)return null;m=i[d=w],h=m.side(!r,l),y=m.side(r,l)}let b=Gi(t.text,h,m.forward(r,l));if(b<m.from||b>m.to)b=y;BT=t.text.slice(Math.min(h,b),Math.max(h,b));let S=d==(r?i.length-1:0)?null:i[d+(r?1:-1)];if(S&&b==y&&S.level+(r?0:1)<m.level)return G.cursor(S.side(!r,l)+t.from,S.forward(r,l)?1:-1,S.level);return G.cursor(b+t.from,m.forward(r,l)?-1:1,m.level)}function b3(t,i,l){for(let s=i;s<l;s++){let r=OT(t.charCodeAt(s));if(r==1)return ar;if(r==2||r==4)return bv}return ar}var zT=fe.define(),HT=fe.define(),NT=fe.define(),_T=fe.define(),lv=fe.define(),UT=fe.define(),qT=fe.define(),vv=fe.define(),Sv=fe.define(),VT=fe.define({combine:(t)=>t.some((i)=>i)}),v3=fe.define({combine:(t)=>t.some((i)=>i)}),jT=fe.define();class Lu{constructor(t,i,l,s,r,c=!1){this.range=t,this.y=i,this.x=l,this.yMargin=s,this.xMargin=r,this.isSnapshot=c}map(t){return t.empty?this:new Lu(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new Lu(G.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}var Yp=Ct.define({map:(t,i)=>t.map(i)}),IT=Ct.define();function Fi(t,i,l){let s=t.facet(_T);if(s.length)s[0](i);else if(window.onerror&&window.onerror(String(i),l,void 0,void 0,i));else if(l)console.error(l+":",i);else console.error(i)}var Kl=fe.define({combine:(t)=>t.length?t[0]:!0}),S3=0,Du=fe.define({combine(t){return t.filter((i,l)=>{for(let s=0;s<l;s++)if(t[s].plugin==i.plugin)return!1;return!0})}});class ns{constructor(t,i,l,s,r){this.id=t,this.create=i,this.domEventHandlers=l,this.domEventObservers=s,this.baseExtensions=r(this),this.extension=this.baseExtensions.concat(Du.of({plugin:this,arg:void 0}))}of(t){return this.baseExtensions.concat(Du.of({plugin:this,arg:t}))}static define(t,i){let{eventHandlers:l,eventObservers:s,provide:r,decorations:c}=i||{};return new ns(S3++,t,l,s,(h)=>{let d=[];if(c)d.push(hm.of((m)=>{let y=m.plugin(h);return y?c(y):St.none}));if(r)d.push(r(h));return d})}static fromClass(t,i){return ns.define((l,s)=>new t(l,s),i)}}class Kp{constructor(t){this.spec=t,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(t){if(!this.value){if(this.spec)try{this.value=this.spec.plugin.create(t,this.spec.arg)}catch(i){Fi(t.state,i,"CodeMirror plugin crashed"),this.deactivate()}}else if(this.mustUpdate){let i=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(i)}catch(l){if(Fi(i.state,l,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(s){}this.deactivate()}}return this}destroy(t){var i;if((i=this.value)===null||i===void 0?void 0:i.destroy)try{this.value.destroy()}catch(l){Fi(t.state,l,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}var $T=fe.define(),wv=fe.define(),hm=fe.define(),PT=fe.define(),xv=fe.define(),Kf=fe.define(),YT=fe.define();function Z2(t,i){let l=t.state.facet(YT);if(!l.length)return l;let s=l.map((c)=>c instanceof Function?c(t):c),r=[];return We.spans(s,i.from,i.to,{point(){},span(c,h,d,m){let y=c-i.from,b=h-i.from,S=r;for(let w=d.length-1;w>=0;w--,m--){let k=d[w].spec.bidiIsolate,E;if(k==null)k=b3(i.text,y,b);if(m>0&&S.length&&(E=S[S.length-1]).to==y&&E.direction==k)E.to=b,S=E.inner;else{let R={from:y,to:b,direction:k,inner:[]};S.push(R),S=R.inner}}}}),r}var XT=fe.define();function QT(t){let i=0,l=0,s=0,r=0;for(let c of t.state.facet(XT)){let h=c(t);if(h){if(h.left!=null)i=Math.max(i,h.left);if(h.right!=null)l=Math.max(l,h.right);if(h.top!=null)s=Math.max(s,h.top);if(h.bottom!=null)r=Math.max(r,h.bottom)}}return{left:i,right:l,top:s,bottom:r}}var jf=fe.define();class Ji{constructor(t,i,l,s){this.fromA=t,this.toA=i,this.fromB=l,this.toB=s}join(t){return new Ji(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(t){let i=t.length,l=this;for(;i>0;i--){let s=t[i-1];if(s.fromA>l.toA)continue;if(s.toA<l.fromA)break;l=l.join(s),t.splice(i-1,1)}return t.splice(i,0,l),t}static extendWithRanges(t,i){if(i.length==0)return t;let l=[];for(let s=0,r=0,c=0;;){let h=s<t.length?t[s].fromB:1e9,d=r<i.length?i[r]:1e9,m=Math.min(h,d);if(m==1e9)break;let y=m+c,b=m,S=y;for(;;)if(r<i.length&&i[r]<=b){let w=i[r+1];r+=2,b=Math.max(b,w);for(let k=s;k<t.length&&t[k].fromB<=b;k++)c=t[k].toA-t[k].toB;S=Math.max(S,w+c)}else if(s<t.length&&t[s].fromB<=b){let w=t[s++];b=Math.max(b,w.toB),S=Math.max(S,w.toA),c=w.toA-w.toB}else break;l.push(new Ji(y,S,m,b))}return l}}class sm{constructor(t,i,l){this.view=t,this.state=i,this.transactions=l,this.flags=0,this.startState=t.state,this.changes=an.empty(this.startState.doc.length);for(let r of l)this.changes=this.changes.compose(r.changes);let s=[];this.changes.iterChangedRanges((r,c,h,d)=>s.push(new Ji(r,c,h,d))),this.changedRanges=s}static create(t,i,l){return new sm(t,i,l)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some((t)=>t.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}var w3=[];class Nt{constructor(t,i,l=0){this.dom=t,this.length=i,this.flags=l,this.parent=null,t.cmTile=this}get breakAfter(){return this.flags&1}get children(){return w3}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(t){if(this.flags|=2,this.flags&4){this.flags&=-5;let i=this.domAttrs;if(i)i3(this.dom,i)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(t){this.dom=t,t.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(t,i=this.posAtStart){let l=i;for(let s of this.children){if(s==t)return l;l+=s.length+s.breakAfter}throw RangeError("Invalid child in posBefore")}posAfter(t){return this.posBefore(t)+t.length}covers(t){return!0}coordsIn(t,i,l){return null}domPosFor(t,i){let l=ia(this.dom),s=this.length?t>0:i>0;return new Eo(this.parent.dom,l+(s?1:0),t==0||t==this.length)}markDirty(t){if(this.flags&=-3,t)this.flags|=4;if(this.parent&&this.parent.flags&2)this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let t=this;t;t=t.parent)if(t instanceof th)return t;return null}static get(t){return t.cmTile}}class eh extends Nt{constructor(t){super(t,0);this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(t){this.children.push(t),t.parent=this}sync(t){if(this.flags&2)return;super.sync(t);let i=this.dom,l=null,s,r=(t===null||t===void 0?void 0:t.node)==i?t:null,c=0;for(let h of this.children){if(h.sync(t),c+=h.length+h.breakAfter,s=l?l.nextSibling:i.firstChild,r&&s!=h.dom)r.written=!0;if(h.dom.parentNode==i)while(s&&s!=h.dom)s=K2(s);else i.insertBefore(h.dom,s);l=h.dom}if(s=l?l.nextSibling:i.firstChild,r&&s)r.written=!0;while(s)s=K2(s);this.length=c}}function K2(t){let i=t.nextSibling;return t.parentNode.removeChild(t),i}class th extends eh{constructor(t,i){super(i);this.view=t}owns(t){for(;t;t=t.parent)if(t==this)return!0;return!1}isBlock(){return!0}nearest(t){for(;;){if(!t)return null;let i=Nt.get(t);if(i&&this.owns(i))return i;t=t.parentNode}}blockTiles(t){for(let i=[],l=this,s=0,r=0;;)if(s==l.children.length){if(!i.length)return;if(l=l.parent,l.breakAfter)r++;s=i.pop()}else{let c=l.children[s++];if(c instanceof es)i.push(s),l=c,s=0;else{let h=r+c.length,d=t(c,r);if(d!==void 0)return d;r=h+c.breakAfter}}}resolveBlock(t,i){let l,s=-1,r,c=-1;if(this.blockTiles((h,d)=>{let m=d+h.length;if(t>=d&&t<=m){if(h.isWidget()&&i>=-1&&i<=1){if(h.flags&32)return!0;if(h.flags&16)l=void 0}if((d<t||t==m&&(i<-1?h.length:h.covers(1)))&&(!l||!h.isWidget()&&l.isWidget()))l=h,s=t-d;if((m>t||t==d&&(i>1?h.length:h.covers(-1)))&&(!r||!h.isWidget()&&r.isWidget()))r=h,c=t-d}}),!l&&!r)throw Error("No tile at position "+t);return l&&i<0||!r?{tile:l,offset:s}:{tile:r,offset:c}}}class es extends eh{constructor(t,i){super(t);this.wrapper=i}isBlock(){return!0}covers(t){if(!this.children.length)return!1;return t<0?this.children[0].covers(-1):this.lastChild.covers(1)}get domAttrs(){return this.wrapper.attributes}static of(t,i){let l=new es(i||document.createElement(t.tagName),t);if(!i)l.flags|=4;return l}}class Bu extends eh{constructor(t,i){super(t);this.attrs=i}isLine(){return!0}static start(t,i,l){let s=new Bu(i||document.createElement("div"),t);if(!i||!l)s.flags|=4;return s}get domAttrs(){return this.attrs}resolveInline(t,i,l){let s=null,r=-1,c=null,h=-1;function d(y,b){for(let S=0,w=0;S<y.children.length&&w<=b;S++){let k=y.children[S],E=w+k.length;if(E>=b){if(k.isComposite())d(k,b-w);else if((!c||c.isHidden&&(i>0&&!(c.flags&32)||l&&k3(c,k)))&&(E>b||k.flags&32))c=k,h=b-w;else if(w<b||k.flags&16&&!k.isHidden)s=k,r=b-w}w=E}}d(this,t);let m=(i<0?s:c)||s||c;return m?{tile:m,offset:m==s?r:h}:null}coordsIn(t,i,l){let s=this.resolveInline(t,i,!0);if(!s)return x3(this);return s.tile.coordsIn(Math.max(0,s.offset),i,l)}domIn(t,i){let l=this.resolveInline(t,i);if(l){let{tile:s,offset:r}=l;if(this.dom.contains(s.dom)){if(s.isText())return new Eo(s.dom,Math.min(s.dom.nodeValue.length,r));return s.domPosFor(r,s.flags&16?1:s.flags&32?-1:i)}let c=l.tile.parent,h=!1;for(let d of c.children){if(h)return new Eo(d.dom,0);if(d==l.tile)h=!0}}return new Eo(this.dom,0)}}function x3(t){let i=t.dom.lastChild;if(!i)return t.dom.getBoundingClientRect();let l=Zp(i);return l[l.length-1]||null}function k3(t,i){let l=t.coordsIn(0,1),s=i.coordsIn(0,1);return l&&s&&s.top<l.bottom}class oi extends eh{constructor(t,i){super(t);this.mark=i}get domAttrs(){return this.mark.attrs}static of(t,i){let l=new oi(i||document.createElement(t.tagName),t);if(!i)l.flags|=4;return l}}class lr extends Nt{constructor(t,i){super(t,i.length);this.text=i}sync(t){if(this.flags&2)return;if(super.sync(t),this.dom.nodeValue!=this.text){if(t&&t.node==this.dom)t.written=!0;this.dom.nodeValue=this.text}}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(t,i,l){let s=this.dom.nodeValue.length;if(t>s)t=s;let r=t,c=t,h=0;if(t==0&&i<0||t==s&&i>=0){if(!(K.chrome||K.gecko)){if(t)r--,h=1;else if(c<s)c++,h=-1}}else if(i<0)r--;else if(c<s)c++;let d=Wf(this.dom,r,c).getClientRects();if(!d.length)return null;let m=d[(h?h<0:i>=0)?0:d.length-1];if(K.safari&&!h&&m.width==0)m=Array.prototype.find.call(d,(y)=>y.width)||m;return l==null?m:lm(m,(h?h>0:i<0)==l)}static of(t,i){let l=new lr(i||document.createTextNode(t),t);if(!i)l.flags|=2;return l}}class rr extends Nt{constructor(t,i,l,s){super(t,i,s);this.widget=l}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(t){if(this.flags&48)return!1;return(this.flags&(t<0?64:128))>0}coordsIn(t,i){return this.coordsInWidget(t,i,!1)}coordsInWidget(t,i,l){let s=this.widget.coordsAt(this.dom,t,i);if(s)return s;if(l)return lm(this.dom.getBoundingClientRect(),this.length?t==0:i<=0);else{let r=this.dom.getClientRects(),c=null;if(!r.length)return null;let h=this.flags&16?!0:this.flags&32?!1:t>0;for(let d=h?r.length-1:0;;d+=h?-1:1)if(c=r[d],t>0?d==0:d==r.length-1||c.top<c.bottom)break;return lm(c,!h)}}get overrideDOMText(){if(!this.length)return Ye.empty;let{root:t}=this;if(!t)return Ye.empty;let i=this.posAtStart;return t.view.state.doc.slice(i,i+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(t,i,l,s,r){if(!r){if(r=t.toDOM(i),!t.editable)r.contentEditable="false"}return new rr(r,l,t,s)}}class Ff extends Nt{constructor(t){let i=document.createElement("img");i.className="cm-widgetBuffer",i.setAttribute("aria-hidden","true");super(i,0,t)}get isHidden(){return!0}get overrideDOMText(){return Ye.empty}coordsIn(t,i,l){let s=this.dom.getBoundingClientRect();return l==null?s:lm(s,i>0==l)}}class GT{constructor(t){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=t}advance(t,i,l){let{tile:s,index:r,beforeBreak:c,parents:h}=this;while(t||i>0)if(!s.isComposite())if(r==s.length)c=!!s.breakAfter,{tile:s,index:r}=h.pop(),r++;else if(!t)break;else{let d=Math.min(t,s.length-r);if(l)l.skip(s,r,r+d);t-=d,r+=d}else if(c){if(!t)break;if(l)l.break();t--,c=!1}else if(r==s.children.length){if(!t&&!h.length)break;if(l)l.leave(s);c=!!s.breakAfter,{tile:s,index:r}=h.pop(),r++}else{let d=s.children[r],m=d.breakAfter;if((i>0?d.length<=t:d.length<t)&&(!l||l.skip(d,0,d.length)!==!1||!d.isComposite))c=!!m,r++,t-=d.length;else if(h.push({tile:s,index:r}),s=d,r=0,l&&d.isComposite())l.enter(d)}return this.tile=s,this.index=r,this.beforeBreak=c,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}}class WT{constructor(t,i,l,s){this.from=t,this.to=i,this.wrapper=l,this.rank=s}}class FT{constructor(t,i,l){this.cache=t,this.root=i,this.blockWrappers=l,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(t,i,l,s){var r;this.flushBuffer();let c=this.ensureMarks(i,l),h=c.lastChild;if(h&&h.isText()&&!(h.flags&8)&&h.length+t.length<512){this.cache.reused.set(h,2);let d=c.children[c.children.length-1]=new lr(h.dom,h.text+t);d.parent=c}else c.append(s||lr.of(t,(r=this.cache.find(lr))===null||r===void 0?void 0:r.dom));this.pos+=t.length,this.afterWidget=null}addComposition(t,i){let l=this.curLine;if(l.dom!=i.line.dom)l.setDOM(this.cache.reused.has(i.line)?Qb(i.line.dom):i.line.dom),this.cache.reused.set(i.line,2);let s=l;for(let h=i.marks.length-1;h>=0;h--){let d=i.marks[h],m=s.lastChild;if(m instanceof oi&&m.mark.eq(d.mark)){if(m.dom!=d.dom)m.setDOM(Qb(d.dom));s=m}else{if(this.cache.reused.get(d)){let b=Nt.get(d.dom);if(b)b.setDOM(Qb(d.dom))}let y=oi.of(d.mark,d.dom);s.append(y),s=y}this.cache.reused.set(d,2)}let r=Nt.get(t.text);if(r)this.cache.reused.set(r,2);let c=new lr(t.text,t.text.nodeValue);c.flags|=8,this.pos=t.range.toB,s.append(c)}addInlineWidget(t,i,l){let s=this.afterWidget&&t.flags&48&&(this.afterWidget.flags&48)==(t.flags&48);if(!s)this.flushBuffer();let r=this.ensureMarks(i,l);if(!s&&!(t.flags&16))r.append(this.getBuffer(1));r.append(t),this.pos+=t.length,this.afterWidget=t}addMark(t,i,l){this.flushBuffer(),this.ensureMarks(i,l).append(t),this.pos+=t.length,this.afterWidget=null}addBlockWidget(t){this.getBlockPos().append(t),this.pos+=t.length,this.lastBlock=t,this.endLine()}continueWidget(t){let i=this.afterWidget||this.lastBlock;i.length+=t,this.pos+=t}addLineStart(t,i){var l;if(!t)t=eE;let s=Bu.start(t,i||((l=this.cache.find(Bu))===null||l===void 0?void 0:l.dom),!!i);this.getBlockPos().append(this.lastBlock=this.curLine=s)}addLine(t){this.getBlockPos().append(t),this.pos+=t.length,this.lastBlock=t,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(t){if(!this.blockPosCovered())this.addLineStart(t)}ensureLine(t){if(!this.curLine)this.addLineStart(t)}ensureMarks(t,i){var l;let s=this.curLine;for(let r=t.length-1;r>=0;r--){let c=t[r],h;if(i>0&&(h=s.lastChild)&&h instanceof oi&&h.mark.eq(c))s=h,i--;else{let d=oi.of(c,(l=this.cache.find(oi,(m)=>m.mark.eq(c)))===null||l===void 0?void 0:l.dom);s.append(d),s=d,i=0}}return s}endLine(){if(this.curLine){this.flushBuffer();let t=this.curLine.lastChild;if(!t||!eT(this.curLine,!1)||t.dom.nodeName!="BR"&&t.isWidget()&&!(K.ios&&eT(this.curLine,!0)))this.curLine.append(this.cache.findWidget(Gb,0,32)||new rr(Gb.toDOM(),0,Gb,32));this.curLine=this.afterWidget=null}}updateBlockWrappers(){if(this.wrapperPos>this.pos+1e4)this.blockWrappers.goto(this.pos),this.wrappers.length=0;for(let t=this.wrappers.length-1;t>=0;t--)if(this.wrappers[t].to<this.pos)this.wrappers.splice(t,1);for(let t=this.blockWrappers;t.value&&t.from<=this.pos;t.next())if(t.to>=this.pos){let i=t.rank*102+t.value.rank,l=new WT(t.from,t.to,t.value,i),s=this.wrappers.length;while(s>0&&(this.wrappers[s-1].rank-l.rank||this.wrappers[s-1].to-l.to)<0)s--;this.wrappers.splice(s,0,l)}this.wrapperPos=this.pos}getBlockPos(){var t;this.updateBlockWrappers();let i=this.root;for(let l of this.wrappers){let s=i.lastChild;if(l.from<this.pos&&s instanceof es&&s.wrapper.eq(l.wrapper))i=s;else{let r=es.of(l.wrapper,(t=this.cache.find(es,(c)=>c.wrapper.eq(l.wrapper)))===null||t===void 0?void 0:t.dom);i.append(r),i=r}}return i}blockPosCovered(){let t=this.lastBlock;return t!=null&&!t.breakAfter&&(!t.isWidget()||(t.flags&160)>0)}getBuffer(t){let i=2|(t<0?16:32),l=this.cache.find(Ff,void 0,1);if(l)l.flags=i;return l||new Ff(i)}flushBuffer(){if(this.afterWidget&&!(this.afterWidget.flags&32))this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null}}class JT{constructor(t){this.skipCount=0,this.text="",this.textOff=0,this.cursor=t.iter()}skip(t){if(this.textOff+t<=this.text.length)this.textOff+=t;else this.skipCount+=t-(this.text.length-this.textOff),this.text="",this.textOff=0}next(t){if(this.textOff==this.text.length){let{value:s,lineBreak:r,done:c}=this.cursor.next(this.skipCount);if(this.skipCount=0,c)throw Error("Ran out of text content when drawing inline views");this.text=s;let h=this.textOff=Math.min(t,s.length);return r?null:s.slice(0,h)}let i=Math.min(this.text.length,this.textOff+t),l=this.text.slice(this.textOff,i);return this.textOff=i,l}}var am=[rr,Bu,lr,oi,Ff,es,th];for(let t=0;t<am.length;t++)am[t].bucket=t;class ZT{constructor(t){this.view=t,this.buckets=am.map(()=>[]),this.index=am.map(()=>0),this.reused=new Map}add(t){let i=t.constructor.bucket,l=this.buckets[i];if(l.length<6)l.push(t);else l[this.index[i]=(this.index[i]+1)%6]=t}find(t,i,l=2){let s=t.bucket,r=this.buckets[s],c=this.index[s];for(let h=0;h<r.length;h++){let d=(h+c)%r.length,m=r[d];if((!i||i(m))&&!this.reused.has(m)){if(r.splice(d,1),d<c)this.index[s]--;return this.reused.set(m,l),m}}return null}findWidget(t,i,l){let s=this.buckets[0];if(s.length)for(let r=0,c=0;;r++){if(r==s.length){if(c)return null;c=1,r=0}let h=s[r];if(!this.reused.has(h)&&(c==0?h.widget.compare(t):h.widget.constructor==t.constructor&&t.updateDOM(h.dom,this.view,h.widget))){if(s.splice(r,1),r<this.index[0])this.index[0]--;if(h.widget==t&&h.length==i&&(h.flags&497)==l)return this.reused.set(h,1),h;else return this.reused.set(h,2),new rr(h.dom,i,t,h.flags&-498|l)}}}reuse(t){return this.reused.set(t,1),t}maybeReuse(t,i=2){if(this.reused.has(t))return;return this.reused.set(t,i),t.dom}clear(){for(let t=0;t<this.buckets.length;t++)this.buckets[t].length=this.index[t]=0}}class KT{constructor(t,i,l,s,r){this.view=t,this.decorations=s,this.disallowBlockEffectsFor=r,this.openWidget=!1,this.openMarks=0,this.cache=new ZT(t),this.text=new JT(t.state.doc),this.builder=new FT(this.cache,new th(t,t.contentDOM),We.iter(l)),this.cache.reused.set(i,2),this.old=new GT(i),this.reuseWalker={skip:(c,h,d)=>{if(this.cache.add(c),c.isComposite())return!1},enter:(c)=>this.cache.add(c),leave:()=>{},break:()=>{}}}run(t,i){let l=i&&this.getCompositionContext(i.text);for(let s=0,r=0,c=0;;){let h=c<t.length?t[c++]:null,d=h?h.fromA:this.old.root.length;if(d>s){let m=d-s;this.preserve(m,!c,!h),s=d,r+=m}if(!h)break;if(i&&h.fromA<=i.range.fromA&&h.toA>=i.range.toA)this.forward(h.fromA,i.range.fromA,i.range.fromA<i.range.toA?1:-1),this.emit(r,i.range.fromB),this.builder.flushBuffer(),this.cache.clear(),this.builder.addComposition(i,l),this.text.skip(i.range.toB-i.range.fromB),this.forward(i.range.fromA,h.toA),this.emit(i.range.toB,h.toB);else this.forward(h.fromA,h.toA),this.emit(r,h.toB);r=h.toB,s=h.toA}if(this.builder.curLine)this.builder.endLine();return this.builder.root}preserve(t,i,l){let s=T3(this.old),r=this.openMarks;this.old.advance(t,l?1:-1,{skip:(c,h,d)=>{if(c.isWidget())if(this.openWidget)this.builder.continueWidget(d-h);else{let m=d>0||h<c.length?rr.of(c.widget,this.view,d-h,c.flags&496,this.cache.maybeReuse(c)):this.cache.reuse(c);if(m.flags&256)m.flags&=-2,this.builder.addBlockWidget(m);else this.builder.ensureLine(null),this.builder.addInlineWidget(m,s,r),r=s.length}else if(c.isText()){if(this.builder.ensureLine(null),!h&&d==c.length&&!this.cache.reused.has(c))this.builder.addText(c.text,s,r,this.cache.reuse(c));else this.cache.add(c),this.builder.addText(c.text.slice(h,d),s,r);r=s.length}else if(c.isLine())c.flags&=-2,this.cache.reused.set(c,1),this.builder.addLine(c);else if(c instanceof Ff)this.cache.add(c);else if(c instanceof oi)this.builder.ensureLine(null),this.builder.addMark(c,s,r),this.cache.reused.set(c,1),r=s.length;else return!1;this.openWidget=!1},enter:(c)=>{if(c.isLine())this.builder.addLineStart(c.attrs,this.cache.maybeReuse(c));else if(this.cache.add(c),c instanceof oi)s.unshift(c.mark);this.openWidget=!1},leave:(c)=>{if(c.isLine()){if(s.length)s.length=r=0}else if(c instanceof oi)s.shift(),r=Math.min(r,s.length)},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(t)}emit(t,i){let l=null,s=this.builder,r=-1,c=We.spans(this.decorations,t,i,{point:(h,d,m,y,b,S)=>{if(m instanceof sr){if(this.disallowBlockEffectsFor[S]){if(m.block)throw RangeError("Block decorations may not be specified via plugins");if(d>this.view.state.doc.lineAt(h).to)throw RangeError("Decorations that replace line breaks may not be specified via plugins")}if(r=y.length,b>y.length)s.continueWidget(d-h);else{let w=m.widget||(m.block?ur.block:ur.inline),k=C3(m),E=this.cache.findWidget(w,d-h,k)||rr.of(w,this.view,d-h,k);if(m.block){if(m.startSide>0)s.addLineStartIfNotCovered(l);s.addBlockWidget(E)}else s.ensureLine(l),s.addInlineWidget(E,y,b)}l=null}else l=A3(l,m);if(d>h)this.text.skip(d-h)},span:(h,d,m,y)=>{for(let b=h;b<d;){let S=this.text.next(Math.min(512,d-b));if(S==null)s.addLineStartIfNotCovered(l),s.addBreak(),b++;else s.ensureLine(l),s.addText(S,m,b==h?y:m.length),b+=S.length;l=null}r=m.length}});if(r>-1)this.openWidget=c>r;if(!this.openWidget)s.addLineStartIfNotCovered(l);this.openMarks=c}forward(t,i,l=1){if(i-t<=10)this.old.advance(i-t,l,this.reuseWalker);else this.old.advance(5,-1,this.reuseWalker),this.old.advance(i-t-10,-1),this.old.advance(5,l,this.reuseWalker)}getCompositionContext(t){let i=[],l=null;for(let s=t.parentNode;;s=s.parentNode){let r=Nt.get(s);if(s==this.view.contentDOM)break;if(r instanceof oi)i.push(r);else if(r===null||r===void 0?void 0:r.isLine())l=r;else if(r instanceof es);else if(s.nodeName=="DIV"&&!l&&s!=this.view.contentDOM)l=new Bu(s,eE);else if(!l)i.push(oi.of(new Jf({tagName:s.nodeName.toLowerCase(),attributes:o3(s)}),s))}return{line:l,marks:i}}}function eT(t,i){let l=(s)=>{for(let r of s.children)if((i?r.isText():r.length)||l(r))return!0;return!1};return l(t)}function C3(t){let i=t.isReplace?(t.startSide<0?64:0)|(t.endSide>0?128:0):t.startSide>0?32:16;if(t.block)i|=256;return i}var eE={class:"cm-line"};function A3(t,i){let l=i.spec.attributes,s=i.spec.class;if(!l&&!s)return t;if(!t)t={class:"cm-line"};if(l)gv(l,t);if(s)t.class+=" "+s;return t}function T3(t){let i=[];for(let l=t.parents.length;l>1;l--){let s=l==t.parents.length?t.tile:t.parents[l].tile;if(s instanceof oi)i.push(s.mark)}return i}function Qb(t){let i=Nt.get(t);if(i)i.setDOM(t.cloneNode());return t}class ur extends la{constructor(t){super();this.tag=t}eq(t){return t.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(t){return t.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}ur.inline=new ur("span");ur.block=new ur("div");var Gb=new class extends la{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class sv{constructor(t){this.view=t,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=St.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new th(t,t.contentDOM),this.updateInner([new Ji(0,0,0,t.state.doc.length)],null)}update(t){var i;let l=t.changedRanges;if(this.minWidth>0&&l.length)if(!l.every(({fromA:y,toA:b})=>b<this.minWidthFrom||y>this.minWidthTo))this.minWidth=this.minWidthFrom=this.minWidthTo=0;else this.minWidthFrom=t.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=t.changes.mapPos(this.minWidthTo,1);this.updateEditContextFormatting(t);let s=-1;if(this.view.inputState.composing>=0&&!this.view.observer.editContext){if((i=this.domChanged)===null||i===void 0?void 0:i.newSel)s=this.domChanged.newSel.head;else if(!z3(t.changes,this.hasComposition)&&!t.selectionSet)s=t.state.selection.main.head}let r=s>-1?M3(this.view,t.changes,s):null;if(this.domChanged=null,this.hasComposition){let{from:y,to:b}=this.hasComposition;l=new Ji(y,b,t.changes.mapPos(y,-1),t.changes.mapPos(b,1)).addToSet(l.slice())}if(this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(K.ie||K.chrome)&&!r&&t&&t.state.doc.lines!=t.startState.doc.lines)this.forceSelection=!0;let c=this.decorations,h=this.blockWrappers;this.updateDeco();let d=R3(c,this.decorations,t.changes);if(d.length)l=Ji.extendWithRanges(l,d);let m=L3(h,this.blockWrappers,t.changes);if(m.length)l=Ji.extendWithRanges(l,m);if(r&&!l.some((y)=>y.fromA<=r.range.fromA&&y.toA>=r.range.toA))l=r.range.addToSet(l.slice());if(this.tile.flags&2&&l.length==0)return!1;else{if(this.updateInner(l,r),t.transactions.length)this.lastUpdate=Date.now();return!0}}updateInner(t,i){this.view.viewState.mustMeasureContent=!0;let{observer:l}=this.view;l.ignore(()=>{if(i||t.length){let c=this.tile,h=new KT(this.view,c,this.blockWrappers,this.decorations,this.dynamicDecorationMap);if(i&&Nt.get(i.text))h.cache.reused.set(Nt.get(i.text),2);this.tile=h.run(t,i),av(c,h.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let r=K.chrome||K.ios?{node:l.selectionRange.focusNode,written:!1}:void 0;if(this.tile.sync(r),r&&(r.written||l.selectionRange.focusNode!=r.node||!this.tile.dom.contains(r.node)))this.forceSelection=!0;this.tile.dom.style.height=""});let s=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length){for(let r of this.tile.children)if(r.isWidget()&&r.widget instanceof em)s.push(r.dom)}l.updateGaps(s)}updateEditContextFormatting(t){this.editContextFormatting=this.editContextFormatting.map(t.changes);for(let i of t.transactions)for(let l of i.effects)if(l.is(IT))this.editContextFormatting=l.value}updateSelection(t=!1,i=!1){if(t||!this.view.observer.selectionRange.focusNode)this.view.observer.readSelectionRange();let{dom:l}=this.tile,s=this.view.root.activeElement,r=s==l,c=!r&&!(this.view.state.facet(Kl)||l.tabIndex>-1)&&Pf(l,this.view.observer.selectionRange)&&!(s&&l.contains(s));if(!(r||i||c))return;let h=this.forceSelection;this.forceSelection=!1;let d=this.view.state.selection.main,m,y;if(d.empty)y=m=this.inlineDOMNearPos(d.anchor,d.assoc||1);else y=this.inlineDOMNearPos(d.head,d.head==d.from?1:-1),m=this.inlineDOMNearPos(d.anchor,d.anchor==d.from?1:-1);if(K.gecko&&d.empty&&!this.hasComposition&&E3(m)){let S=document.createTextNode("");this.view.observer.ignore(()=>m.node.insertBefore(S,m.node.childNodes[m.offset]||null)),m=y=new Eo(S,0),h=!0}let b=this.view.observer.selectionRange;if(h||!b.focusNode||(!Yf(m.node,m.offset,b.anchorNode,b.anchorOffset)||!Yf(y.node,y.offset,b.focusNode,b.focusOffset))&&!this.suppressWidgetCursorChange(b,d))this.view.observer.ignore(()=>{if(K.android&&K.chrome&&l.contains(b.focusNode)&&B3(b.focusNode,l))l.blur(),l.focus({preventScroll:!0});let S=Gf(this.view.root);if(!S);else if(d.empty){if(K.gecko){let w=D3(m.node,m.offset);if(w&&w!=3){let k=(w==1?ET:MT)(m.node,m.offset);if(k)m=new Eo(k.node,k.offset)}}if(S.collapse(m.node,m.offset),d.bidiLevel!=null&&S.caretBidiLevel!==void 0)S.caretBidiLevel=d.bidiLevel}else if(S.extend){S.collapse(m.node,m.offset);try{S.extend(y.node,y.offset)}catch(w){}}else{let w=document.createRange();if(d.anchor>d.head)[m,y]=[y,m];w.setEnd(y.node,y.offset),w.setStart(m.node,m.offset),S.removeAllRanges(),S.addRange(w)}if(c&&this.view.root.activeElement==l){if(l.blur(),s)s.focus()}}),this.view.observer.setSelectionRange(m,y);this.impreciseAnchor=m.precise?null:new Eo(b.anchorNode,b.anchorOffset),this.impreciseHead=y.precise?null:new Eo(b.focusNode,b.focusOffset)}suppressWidgetCursorChange(t,i){return this.hasComposition&&i.empty&&Yf(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)&&this.posFromDOM(t.focusNode,t.focusOffset)==i.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:t}=this,i=t.state.selection.main,l=Gf(t.root),{anchorNode:s,anchorOffset:r}=t.observer.selectionRange;if(!l||!i.empty||!i.assoc||!l.modify)return;let c=this.lineAt(i.head,i.assoc);if(!c)return;let h=c.posAtStart;if(i.head==h||i.head==h+c.length)return;let d=this.coordsAt(i.head,-1),m=this.coordsAt(i.head,1);if(!d||!m||d.bottom>m.top)return;let y=this.domAtPos(i.head+i.assoc,i.assoc);l.collapse(y.node,y.offset),l.modify("move",i.assoc<0?"forward":"backward","lineboundary"),t.observer.readSelectionRange();let b=t.observer.selectionRange;if(t.docView.posFromDOM(b.anchorNode,b.anchorOffset)!=i.from)l.collapse(s,r)}posFromDOM(t,i){let l=this.tile.nearest(t);if(!l)return this.tile.dom.compareDocumentPosition(t)&2?0:this.view.state.doc.length;let s=l.posAtStart;if(l.isComposite()){let r;if(t==l.dom)r=l.dom.childNodes[i];else{let c=ts(t)==0?0:i==0?-1:1;for(;;){let h=t.parentNode;if(h==l.dom)break;if(c==0&&h.firstChild!=h.lastChild)if(t==h.firstChild)c=-1;else c=1;t=h}if(c<0)r=t;else r=t.nextSibling}if(r==l.dom.firstChild)return s;while(r&&!Nt.get(r))r=r.nextSibling;if(!r)return s+l.length;for(let c=0,h=s;;c++){let d=l.children[c];if(d.dom==r)return h;h+=d.length+d.breakAfter}}else if(l.isText())return t==l.dom?s+i:s+(i?l.length:0);else return s}domAtPos(t,i){let{tile:l,offset:s}=this.tile.resolveBlock(t,i);if(l.isWidget())return l.domPosFor(s,i);return l.domIn(s,i)}inlineDOMNearPos(t,i){let l,s=-1,r=!1,c,h=-1,d=!1;if(this.tile.blockTiles((m,y)=>{if(m.isWidget()){if(m.flags&32&&y>=t)return!0;if(m.flags&16)r=!0}else{let b=y+m.length;if(y<=t)l=m,s=t-y,r=b<t;if(b>=t&&!c)c=m,h=t-y,d=y>t;if(y>t&&c)return!0}}),!l&&!c)return this.domAtPos(t,i);if(r&&c)l=null;else if(d&&l)c=null;return l&&i<0||!c?l.domIn(s,i):c.domIn(h,i)}coordsAt(t,i,l){let{tile:s,offset:r}=this.tile.resolveBlock(t,i);if(s.isWidget()){if(s.widget instanceof em)return null;return s.coordsInWidget(r,i,!0)}return s.coordsIn(r,i,l)}lineAt(t,i){let{tile:l}=this.tile.resolveBlock(t,i);return l.isLine()?l:null}coordsForChar(t){let{tile:i,offset:l}=this.tile.resolveBlock(t,1);if(!i.isLine())return null;function s(r,c){if(r.isComposite())for(let h of r.children){if(h.length>=c){let d=s(h,c);if(d)return d}if(c-=h.length,c<0)break}else if(r.isText()&&c<r.length){let h=Gi(r.text,c);if(h==c)return null;let d=Wf(r.dom,c,h).getClientRects();for(let m=0;m<d.length;m++){let y=d[m];if(m==d.length-1||y.top<y.bottom&&y.left<y.right)return y}}return null}return s(i,l)}measureVisibleLineHeights(t){let i=[],{from:l,to:s}=t,r=this.view.contentDOM.clientWidth,c=r>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,h=-1,d=this.view.textDirection==Xt.LTR,m=0,y=(b,S,w)=>{for(let k=0;k<b.children.length;k++){if(S>s)break;let E=b.children[k],R=S+E.length,L=E.dom.getBoundingClientRect(),{height:N}=L;if(w&&!k)m+=L.top-w.top;if(E instanceof es){if(R>l)y(E,S,L)}else if(S>=l){if(m>0)i.push(-m);if(i.push(N+m),m=0,c){let q=E.dom.lastChild,J=q?Zp(q):[];if(J.length){let ae=J[J.length-1],ye=d?ae.right-L.left:L.right-ae.left;if(ye>h)h=ye,this.minWidth=r,this.minWidthFrom=S,this.minWidthTo=R}}}if(w&&k==b.children.length-1)m+=w.bottom-L.bottom;S=R+E.breakAfter}};return y(this.tile,0,null),i}textDirectionAt(t){let{tile:i}=this.tile.resolveBlock(t,1);return getComputedStyle(i.dom).direction=="rtl"?Xt.RTL:Xt.LTR}measureTextSize(){let t=this.tile.blockTiles((c)=>{if(c.isLine()&&c.children.length&&c.length<=20){let h=0,d;for(let m of c.children){if(!m.isText()||/[^ -~]/.test(m.text))return;let y=Zp(m.dom);if(y.length!=1)return;h+=y[0].width,d=y[0].height}if(h)return{lineHeight:c.dom.getBoundingClientRect().height,charWidth:h/c.length,textHeight:d}}});if(t)return t;let i=document.createElement("div"),l,s,r;return i.className="cm-line",i.style.width="99999px",i.style.position="absolute",i.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(i);let c=Zp(i.firstChild)[0];l=i.getBoundingClientRect().height,s=c&&c.width?c.width/27:7,r=c&&c.height?c.height:l,i.remove()}),{lineHeight:l,charWidth:s,textHeight:r}}computeBlockGapDeco(){let t=[],i=this.view.viewState;for(let l=0,s=0;;s++){let r=s==i.viewports.length?null:i.viewports[s],c=r?r.from-1:this.view.state.doc.length;if(c>l){let h=(i.lineBlockAt(c).bottom-i.lineBlockAt(l).top)/this.view.scaleY;t.push(St.replace({widget:new em(h),block:!0,inclusive:!0,isBlockGap:!0}).range(l,c))}if(!r)break;l=r.to+1}return St.set(t)}updateDeco(){let t=1,i=this.view.state.facet(hm).map((r)=>(this.dynamicDecorationMap[t++]=typeof r=="function")?r(this.view):r),l=!1,s=this.view.state.facet(xv).map((r,c)=>{let h=typeof r=="function";if(h)l=!0;return h?r(this.view):r});if(s.length)this.dynamicDecorationMap[t++]=l,i.push(We.join(s));this.decorations=[this.editContextFormatting,...i,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];while(t<this.decorations.length)this.dynamicDecorationMap[t++]=!1;this.blockWrappers=this.view.state.facet(PT).map((r)=>typeof r=="function"?r(this.view):r)}scrollIntoView(t){if(t.isSnapshot){let m=this.view.viewState.lineBlockAt(t.range.head);this.view.scrollDOM.scrollTop=m.top-t.yMargin,this.view.scrollDOM.scrollLeft=t.xMargin;return}for(let m of this.view.state.facet(jT))try{if(m(this.view,t.range,t))return!0}catch(y){Fi(this.view.state,y,"scroll handler")}let{range:i}=t,l=this.coordsAt(i.head,i.assoc||(i.head>i.anchor?-1:1)),s;if(!l)return;if(!i.empty&&(s=this.coordsAt(i.anchor,i.anchor>i.head?-1:1)))l={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top),right:Math.max(l.right,s.right),bottom:Math.max(l.bottom,s.bottom)};let r=QT(this.view),c={left:l.left-r.left,top:l.top-r.top,right:l.right+r.right,bottom:l.bottom+r.bottom},{offsetWidth:h,offsetHeight:d}=this.view.scrollDOM;if(a3(this.view.scrollDOM,c,i.head<i.anchor?-1:1,t.x,t.y,Math.max(Math.min(t.xMargin,h),-h),Math.max(Math.min(t.yMargin,d),-d),this.view.textDirection==Xt.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(l.top>window.pageYOffset+window.visualViewport.offsetTop+window.visualViewport.height||l.bottom<window.pageYOffset+window.visualViewport.offsetTop)){let m=this.view.docView.lineAt(i.head,1);if(m)m.dom.scrollIntoView({block:"nearest"})}}lineHasWidget(t){let i=(l)=>l.isWidget()||l.children.some(i);return i(this.tile.resolveBlock(t,1).tile)}destroy(){av(this.tile)}}function av(t,i){let l=i===null||i===void 0?void 0:i.get(t);if(l!=1){if(l==null)t.destroy();for(let s of t.children)av(s,i)}}function E3(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}function tE(t,i){let l=t.observer.selectionRange;if(!l.focusNode)return null;let s=ET(l.focusNode,l.focusOffset),r=MT(l.focusNode,l.focusOffset),c=s||r;if(r&&s&&r.node!=s.node){let d=Nt.get(r.node);if(!d||d.isText()&&d.text!=r.node.nodeValue)c=r;else if(t.docView.lastCompositionAfterCursor){let m=Nt.get(s.node);if(!(!m||m.isText()&&m.text!=s.node.nodeValue))c=r}}if(t.docView.lastCompositionAfterCursor=c!=s,!c)return null;let h=i-c.offset;return{from:h,to:h+c.node.nodeValue.length,node:c.node}}function M3(t,i,l){let s=tE(t,l);if(!s)return null;let{node:r,from:c,to:h}=s,d=r.nodeValue;if(/[\n\r]/.test(d))return null;if(t.state.doc.sliceString(s.from,s.to)!=d)return null;let m=i.invertedDesc;return{range:new Ji(m.mapPos(c),m.mapPos(h),c,h),text:r}}function D3(t,i){if(t.nodeType!=1)return 0;return(i&&t.childNodes[i-1].contentEditable=="false"?1:0)|(i<t.childNodes.length&&t.childNodes[i].contentEditable=="false"?2:0)}var O3=class{constructor(){this.changes=[]}compareRange(i,l){Ou(i,l,this.changes)}comparePoint(i,l){Ou(i,l,this.changes)}boundChange(i){Ou(i,i,this.changes)}};function R3(t,i,l){let s=new O3;return We.compare(t,i,l,s),s.changes}class nE{constructor(){this.changes=[]}compareRange(t,i){Ou(t,i,this.changes)}comparePoint(){}boundChange(t){Ou(t,t,this.changes)}}function L3(t,i,l){let s=new nE;return We.compare(t,i,l,s),s.changes}function B3(t,i){for(let l=t;l&&l!=i;l=l.assignedSlot||l.parentNode)if(l.nodeType==1&&l.contentEditable=="false")return!0;return!1}function z3(t,i){let l=!1;if(i)t.iterChangedRanges((s,r)=>{if(s<i.to&&r>i.from)l=!0});return l}class em extends la{constructor(t){super();this.height=t}toDOM(){let t=document.createElement("div");return t.className="cm-gap",this.updateDOM(t),t}eq(t){return t.height==this.height}updateDOM(t){return t.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function H3(t,i,l=1){let s=t.charCategorizer(i),r=t.doc.lineAt(i),c=i-r.from;if(r.length==0)return G.cursor(i);if(c==0)l=1;else if(c==r.length)l=-1;let h=c,d=c;if(l<0)h=Gi(r.text,c,!1);else d=Gi(r.text,c);let m=s(r.text.slice(h,d));while(h>0){let y=Gi(r.text,h,!1);if(s(r.text.slice(y,h))!=m)break;h=y}while(d<r.length){let y=Gi(r.text,d);if(s(r.text.slice(d,y))!=m)break;d=y}return G.undirectionalRange(h+r.from,d+r.from)}function N3(t,i,l,s,r){let c=Math.round((s-i.left)*t.defaultCharacterWidth);if(t.lineWrapping&&l.height>t.defaultLineHeight*1.5){let d=t.viewState.heightOracle.textHeight,m=Math.floor((r-l.top-(t.defaultLineHeight-d)*0.5)/d);c+=m*t.viewState.heightOracle.lineLength}let h=t.state.sliceDoc(l.from,l.to);return l.from+V2(h,c,t.state.tabSize)}function _3(t,i,l){let s=t.lineBlockAt(i);if(Array.isArray(s.type)){let r;for(let c of s.type){if(c.from>i)break;if(c.to<i)continue;if(c.from<i&&c.to>i)return c;if(!r||c.type==Zi.Text&&(r.type!=c.type||(l<0?c.from<i:c.to>i)))r=c}return r||s}return s}function U3(t,i,l,s){let r=_3(t,i.head,i.assoc||-1),c=!s||r.type!=Zi.Text||!(t.lineWrapping||r.widgetLineBreaks)?null:t.coordsAtPos(i.assoc<0&&i.head>r.from?i.head-1:i.head);if(c){let h=t.dom.getBoundingClientRect(),d=t.textDirectionAt(r.from),m=t.posAtCoords({x:l==(d==Xt.LTR)?h.right-1:h.left+1,y:(c.top+c.bottom)/2});if(m!=null)return G.cursor(m,l?-1:1)}return G.cursor(l?r.to:r.from,l?-1:1)}function tT(t,i,l,s){let r=t.state.doc.lineAt(i.head),c=t.bidiSpans(r),h=t.textDirectionAt(r.from);for(let d=i,m=null;;){let y=y3(r,c,h,d,l),b=BT;if(!y){if(r.number==(l?t.state.doc.lines:1))return d;b=`
222
+ `,r=t.state.doc.line(r.number+(l?1:-1)),c=t.bidiSpans(r),y=t.visualLineSide(r,!l)}if(!m){if(!s)return y;m=s(b)}else if(!m(b))return d;d=y}}function q3(t,i,l){let s=t.state.charCategorizer(i),r=s(l);return(c)=>{let h=s(c);if(r==wo.Space)r=h;return r==h}}function V3(t,i,l,s){let r=i.head,c=l?1:-1;if(r==(l?t.state.doc.length:0))return G.cursor(r,i.assoc);let h=i.goalColumn,d,m=t.contentDOM.getBoundingClientRect(),y=t.coordsAtPos(r,i.assoc||((i.empty?l:i.head==i.from)?1:-1)),b=t.documentTop;if(y){if(h==null)h=y.left-m.left;d=c<0?y.top:y.bottom}else{let E=t.viewState.lineBlockAt(r);if(h==null)h=Math.min(m.right-m.left,t.defaultCharacterWidth*(r-E.from));d=(c<0?E.top:E.bottom)+b}let S=m.left+h,w=t.viewState.heightOracle.textHeight>>1,k=s!==null&&s!==void 0?s:w;for(let E=0;;E+=w){let R=d+(k+E)*c,L=rv(t,{x:S,y:R},!1,c);if(l?R>m.bottom:R<m.top)return G.cursor(L.pos,L.assoc);let N=t.coordsAtPos(L.pos,L.assoc),q=N?(N.top+N.bottom)/2:0;if(!N||(l?q>d:q<d))return G.cursor(L.pos,L.assoc,void 0,h)}}function Xf(t,i,l){for(;;){let s=0;for(let r of t)r.between(i-1,i+1,(c,h,d)=>{if(i>c&&i<h){let m=s||l||(i-c<h-i?-1:1);i=m<0?c:h,s=m}});if(!s)return i}}function iE(t,i){let l=null;for(let s=0;s<i.ranges.length;s++){let r=i.ranges[s],c=null;if(r.empty){let h=Xf(t,r.from,0);if(h!=r.from)c=G.cursor(h,-1)}else{let h=Xf(t,r.from,-1),d=Xf(t,r.to,1);if(h!=r.from||d!=r.to)if(r.undirectional)c=G.undirectionalRange(r.from,r.to);else c=G.range(r.from==r.anchor?h:d,r.from==r.head?h:d)}if(c){if(!l)l=i.ranges.slice();l[s]=c}}return l?G.create(l,i.mainIndex):i}function Wb(t,i,l){let s=Xf(t.state.facet(Kf).map((r)=>r(t)),l.from,i.head>l.from?-1:1);return s==l.from?l:G.cursor(s,s<l.from?1:-1)}class Ao{constructor(t,i){this.pos=t,this.assoc=i}}function rv(t,i,l,s){let r=t.contentDOM.getBoundingClientRect(),c=r.top+t.viewState.paddingTop,{x:h,y:d}=i,m=d-c,y;for(;;){if(m<0)return new Ao(0,1);if(m>t.viewState.docHeight)return new Ao(t.state.doc.length,-1);if(y=t.elementAtHeight(m),s==null)break;if(y.type==Zi.Text){if(s<0?y.to<t.viewport.from:y.from>t.viewport.to)break;let w=t.docView.coordsAt(s<0?y.from:y.to,s>0?-1:1);if(w&&(s<0?w.top<=m+c:w.bottom>=m+c))break}let S=t.viewState.heightOracle.textHeight/2;m=s>0?y.bottom+S:y.top-S}if(t.viewport.from>=y.to||t.viewport.to<=y.from){if(l)return null;if(y.type==Zi.Text){let S=N3(t,r,y,h,d);return new Ao(S,S==y.from?1:-1)}}if(y.type!=Zi.Text)return m<(y.top+y.bottom)/2?new Ao(y.from,1):new Ao(y.to,-1);let b=t.docView.lineAt(y.from,2);if(!b||b.length!=y.length)b=t.docView.lineAt(y.from,-2);return new oE(t,h,d,t.textDirectionAt(y.from)).scanTile(b,y.from)}class oE{constructor(t,i,l,s){this.view=t,this.x=i,this.y=l,this.baseDir=s,this.line=null,this.spans=null}bidiSpansAt(t){if(!this.line||this.line.from>t||this.line.to<t)this.line=this.view.state.doc.lineAt(t),this.spans=this.view.bidiSpans(this.line);return this}baseDirAt(t,i){let{line:l,spans:s}=this.bidiSpansAt(t);return s[Mo.find(s,t-l.from,-1,i)].level==this.baseDir}dirAt(t,i){let{line:l,spans:s}=this.bidiSpansAt(t);return s[Mo.find(s,t-l.from,-1,i)].dir}bidiIn(t,i){let{spans:l,line:s}=this.bidiSpansAt(t);return l.length>1||l.length&&(l[0].level!=this.baseDir||l[0].to+s.from<i)}scan(t,i,l=!1){let s=0,r=t.length-1,c=new Set,h=this.bidiIn(t[0],t[r]),d,m,y=-1,b=1e9,S;e:while(s<r){let k=r-s,E=s+r>>1;t:if(c.has(E)){let L=s+Math.floor(Math.random()*k);for(let N=0;N<k;N++){if(!c.has(L)){E=L;break t}if(L++,L==r)L=s}break e}c.add(E);let R=i(E);if(R)for(let L=0;L<R.length;L++){let N=R[L],q=0;if(N.width==0&&R.length>1)continue;if(N.bottom<this.y){if(!d||d.bottom<N.bottom)d=N;q=1}else if(N.top>this.y){if(!m||m.top>N.top)m=N;q=-1}else{let J=N.left>this.x?this.x-N.left:N.right<this.x?this.x-N.right:0,ae=Math.abs(J);if(ae<b)y=E,b=ae,S=N;if(J)q=J<0==(this.baseDir==Xt.LTR)?-1:1}if(q==-1&&(!h||this.baseDirAt(t[E],1)))r=E;else if(q==1&&(!h||this.baseDirAt(t[E+1],-1)))s=E+1}}if(!S){if(!m&&!d)return{i:t[0],after:!1};let k=d&&(!m||this.y-d.bottom<m.top-this.y)?d:m;return this.y=(k.top+k.bottom)/2,this.scan(t,i,!0)}if(b&&!l){let{top:k,bottom:E}=S;if(d&&d.bottom>(k+k+E)/3)return this.y=d.bottom-1,this.scan(t,i,!0);if(m&&m.top<(k+E+E)/3)return this.y=m.top+1,this.scan(t,i,!0)}let w=(h?this.dirAt(t[y],1):this.baseDir)==Xt.LTR;return{i:y,after:this.x>(S.left+S.right)/2==w}}scanText(t,i){let l=[];for(let r=0;r<t.length;r=Gi(t.text,r))l.push(i+r);l.push(i+t.length);let s=this.scan(l,(r)=>{let c=l[r]-i,h=l[r+1]-i;return Wf(t.dom,c,h).getClientRects()});return s.after?new Ao(l[s.i+1],-1):new Ao(l[s.i],1)}scanTile(t,i){if(!t.length)return new Ao(i,1);if(t.children.length==1){let h=t.children[0];if(h.isText())return this.scanText(h,i);else if(h.isComposite())return this.scanTile(h,i)}let l=[i];for(let h=0,d=i;h<t.children.length;h++)l.push(d+=t.children[h].length);let s=this.scan(l,(h)=>{let d=t.children[h];if(d.flags&48)return null;return(d.dom.nodeType==1?d.dom:Wf(d.dom,0,d.length)).getClientRects()}),r=t.children[s.i],c=l[s.i];if(r.isText())return this.scanText(r,c);if(r.isComposite())return this.scanTile(r,c);return s.after?new Ao(l[s.i+1],-1):new Ao(c,1)}}var Mu="￿";class lE{constructor(t,i){this.points=t,this.view=i,this.text="",this.lineSeparator=i.state.facet(qe.lineSeparator)}append(t){this.text+=t}lineBreak(){this.text+=Mu}readRange(t,i){if(!t)return this;let l=t.parentNode;for(let s=t;;){this.findPointBefore(l,s);let r=this.text.length;this.readNode(s);let c=Nt.get(s),h=s.nextSibling;if(h==i){if((c===null||c===void 0?void 0:c.breakAfter)&&!h&&l!=this.view.contentDOM)this.lineBreak();break}let d=Nt.get(h);if((c&&d?c.breakAfter:(c?c.breakAfter:om(s))||om(h)&&(s.nodeName!="BR"||(c===null||c===void 0?void 0:c.isWidget()))&&this.text.length>r)&&!I3(h,i))this.lineBreak();s=h}return this.findPointBefore(l,i),this}readTextNode(t){let i=t.nodeValue;for(let l of this.points)if(l.node==t)l.pos=this.text.length+Math.min(l.offset,i.length);for(let l=0,s=this.lineSeparator?null:/\r\n?|\n/g;;){let r=-1,c=1,h;if(this.lineSeparator)r=i.indexOf(this.lineSeparator,l),c=this.lineSeparator.length;else if(h=s.exec(i))r=h.index,c=h[0].length;if(this.append(i.slice(l,r<0?i.length:r)),r<0)break;if(this.lineBreak(),c>1){for(let d of this.points)if(d.node==t&&d.pos>this.text.length)d.pos-=c-1}l=r+c}}readNode(t){let i=Nt.get(t),l=i&&i.overrideDOMText;if(l!=null){this.findPointInside(t,l.length);for(let s=l.iter();!s.next().done;)if(s.lineBreak)this.lineBreak();else this.append(s.value)}else if(t.nodeType==3)this.readTextNode(t);else if(t.nodeName=="BR"){if(t.nextSibling)this.lineBreak()}else if(t.nodeType==1)this.readRange(t.firstChild,null)}findPointBefore(t,i){for(let l of this.points)if(l.node==t&&t.childNodes[l.offset]==i)l.pos=this.text.length}findPointInside(t,i){for(let l of this.points)if(t.nodeType==3?l.node==t:t.contains(l.node))l.pos=this.text.length+(j3(t,l.node,l.offset)?i:0)}}function j3(t,i,l){for(;;){if(!i||l<ts(i))return!1;if(i==t)return!0;l=ia(i)+1,i=i.parentNode}}function I3(t,i){let l;for(;;t=t.nextSibling){if(t==i||!t)break;let s=Nt.get(t);if(!(s===null||s===void 0?void 0:s.isWidget()))return!1;if(s)(l||(l=[])).push(s)}if(l)for(let s of l){let r=s.overrideDOMText;if(r===null||r===void 0?void 0:r.length)return!1}return!0}class uv{constructor(t,i){this.node=t,this.offset=i,this.pos=-1}}class sE{constructor(t,i,l,s){this.typeOver=s,this.bounds=null,this.text="",this.domChanged=i>-1;let{impreciseHead:r,impreciseAnchor:c}=t.docView,h=t.state.selection;if(t.state.readOnly&&i>-1)this.newSel=null;else if(i>-1&&(this.bounds=aE(t.docView.tile,i,l,0))){let d=r||c?[]:P3(t),m=new lE(d,t);m.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=m.text,this.newSel=Y3(d,this.bounds.from)}else{let d=t.observer.selectionRange,m=r&&r.node==d.focusNode&&r.offset==d.focusOffset||!tv(t.contentDOM,d.focusNode)?h.main.head:t.docView.posFromDOM(d.focusNode,d.focusOffset),y=c&&c.node==d.anchorNode&&c.offset==d.anchorOffset||!tv(t.contentDOM,d.anchorNode)?h.main.anchor:t.docView.posFromDOM(d.anchorNode,d.anchorOffset),b=t.viewport;if((K.ios||K.chrome)&&m!=y&&Math.min(m,y)<=h.main.from&&Math.max(m,y)>=h.main.to&&(b.from>0||b.to<t.state.doc.length)){let S=Math.min(m,y),w=Math.max(m,y),k=b.from-S,E=b.to-w;if((k==0||k==1||S==0)&&(E==0||E==-1||w==t.state.doc.length))m=0,y=t.state.doc.length}if(t.inputState.composing>-1&&h.ranges.length>1)this.newSel=h.replaceRange(G.range(y,m));else if(t.lineWrapping&&y==m&&!(h.main.empty&&h.main.head==m)&&t.inputState.lastTouchTime>Date.now()-100){let S=t.coordsAtPos(m,-1),w=0;if(S)w=t.inputState.lastTouchY<=S.bottom?-1:1;this.newSel=G.create([G.cursor(m,w)])}else this.newSel=G.single(y,m)}}}function aE(t,i,l,s){if(t.isComposite()){let r=-1,c=-1,h=-1,d=-1;for(let m=0,y=s,b=s;m<t.children.length;m++){let S=t.children[m],w=y+S.length;if(y<i&&w>l)return aE(S,i,l,y);if(w>=i&&r==-1)r=m,c=y;if(y>l&&S.dom.parentNode==t.dom){h=m,d=b;break}b=w,y=w+S.breakAfter}return{from:c,to:d<0?s+t.length:d,startDOM:(r?t.children[r-1].dom.nextSibling:null)||t.dom.firstChild,endDOM:h<t.children.length&&h>=0?t.children[h].dom:null}}else if(t.isText())return{from:s,to:s+t.length,startDOM:t.dom,endDOM:t.dom.nextSibling};else return null}function rE(t,i){let l,{newSel:s}=i,{state:r}=t,c=r.selection.main,h=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(i.bounds){let{from:d,to:m}=i.bounds,y=c.from,b=null;if(h===8||K.android&&i.text.length<m-d)y=c.to,b="end";let S=r.doc.sliceString(d,m,Mu),w,k;if(!c.empty&&c.from>=d&&c.to<=m&&(i.typeOver||S!=i.text)&&S.slice(0,c.from-d)==i.text.slice(0,c.from-d)&&S.slice(c.to-d)==i.text.slice(w=i.text.length-(S.length-(c.to-d))))l={from:c.from,to:c.to,insert:Ye.of(i.text.slice(c.from-d,w).split(Mu))};else if(k=uE(S,i.text,y-d,b)){if(K.chrome&&h==13&&k.toB==k.from+2&&i.text.slice(k.from,k.toB)==Mu+Mu)k.toB--;l={from:d+k.from,to:d+k.toA,insert:Ye.of(i.text.slice(k.from,k.toB).split(Mu))}}}else if(s&&(!t.hasFocus&&r.facet(Kl)||rm(s,c)))s=null;if(!l&&!s)return!1;if((K.mac||K.android)&&l&&l.from==l.to&&l.from==c.head-1&&/^\. ?$/.test(l.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"){if(s&&l.insert.length==2)s=G.single(s.main.anchor-1,s.main.head-1);l={from:l.from,to:l.to,insert:Ye.of([l.insert.toString().replace("."," ")])}}else if(r.doc.lineAt(c.from).to<c.to&&t.docView.lineHasWidget(c.to)&&t.inputState.insertingTextAt>Date.now()-50)l={from:c.from,to:c.to,insert:r.toText(t.inputState.insertingText)};else if(K.chrome&&l&&l.from==l.to&&l.from==c.head&&l.insert.toString()==`
223
+ `&&t.lineWrapping){if(s)s=G.single(s.main.anchor-1,s.main.head-1);l={from:c.from,to:c.to,insert:Ye.of([" "])}}if(l)return kv(t,l,s,h);else if(s&&!rm(s,c)){let d=!1,m="select";if(t.inputState.lastSelectionTime>Date.now()-50){if(t.inputState.lastSelectionOrigin=="select")d=!0;if(m=t.inputState.lastSelectionOrigin,m=="select.pointer")s=iE(r.facet(Kf).map((y)=>y(t)),s)}return t.dispatch({selection:s,scrollIntoView:d,userEvent:m}),!0}else return!1}function kv(t,i,l,s=-1){if(K.ios&&t.inputState.flushIOSKey(i))return!0;let r=t.state.selection.main;if(K.android&&(i.to==r.to&&(i.from==r.from||i.from==r.from-1&&t.state.sliceDoc(i.from,r.from)==" ")&&i.insert.length==1&&i.insert.lines==2&&Ru(t.contentDOM,"Enter",13)||(i.from==r.from-1&&i.to==r.to&&i.insert.length==0||s==8&&i.insert.length<i.to-i.from&&i.to>r.head)&&Ru(t.contentDOM,"Backspace",8)||i.from==r.from&&i.to==r.to+1&&i.insert.length==0&&Ru(t.contentDOM,"Delete",46)))return!0;let c=i.insert.toString();if(t.inputState.composing>=0)t.inputState.composing++;let h,d=()=>h||(h=$3(t,i,l));if(!t.state.facet(UT).some((m)=>m(t,i.from,i.to,c,d)))t.dispatch(d());return!0}function $3(t,i,l){let s,r=t.state,c=r.selection.main,h=-1;if(i.from==i.to&&i.from<c.from||i.from>c.to){let m=i.from<c.from?-1:1,y=m<0?c.from:c.to,b=Xf(r.facet(Kf).map((S)=>S(t)),y,m);if(i.from==b)h=b}if(h>-1)s={changes:i,selection:G.cursor(i.from+i.insert.length,-1)};else if(i.from>=c.from&&i.to<=c.to&&i.to-i.from>=(c.to-c.from)/3&&(!l||l.main.empty&&l.main.from==i.from+i.insert.length)&&t.inputState.composing<0){let m=c.from<i.from?r.sliceDoc(c.from,i.from):"",y=c.to>i.to?r.sliceDoc(i.to,c.to):"";s=r.replaceSelection(t.state.toText(m+i.insert.sliceString(0,void 0,t.state.lineBreak)+y))}else{let m=r.changes(i),y=l&&l.main.to<=m.newLength?l.main:void 0;if(r.selection.ranges.length>1&&(t.inputState.composing>=0||t.inputState.compositionPendingChange)&&i.to<=c.to+10&&i.to>=c.to-10){let b=t.state.sliceDoc(i.from,i.to),S,w=l&&tE(t,l.main.head);if(w){let E=i.insert.length-(i.to-i.from);S={from:w.from,to:w.to-E}}else S=t.state.doc.lineAt(c.head);let k=c.to-i.to;s=r.changeByRange((E)=>{if(E.from==c.from&&E.to==c.to)return{changes:m,range:y||E.map(m)};let R=E.to-k,L=R-b.length;if(t.state.sliceDoc(L,R)!=b||R>=S.from&&L<=S.to)return{range:E};let N=r.changes({from:L,to:R,insert:i.insert}),q=E.to-c.to;return{changes:N,range:!y?E.map(N):G.range(Math.max(0,y.anchor+q),Math.max(0,y.head+q))}})}else s={changes:m,selection:y&&r.selection.replaceRange(y)}}let d="input.type";if(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50){if(t.inputState.compositionPendingChange=!1,d+=".compose",t.inputState.compositionFirstChange)d+=".start",t.inputState.compositionFirstChange=!1}return r.update(s,{userEvent:d,scrollIntoView:!0})}function uE(t,i,l,s){let r=Math.min(t.length,i.length),c=0;while(c<r&&t.charCodeAt(c)==i.charCodeAt(c))c++;if(c==r&&t.length==i.length)return null;let h=t.length,d=i.length;while(h>0&&d>0&&t.charCodeAt(h-1)==i.charCodeAt(d-1))h--,d--;if(s=="end"){let m=Math.max(0,c-Math.min(h,d));l-=h+m-c}if(h<c&&t.length<i.length){let m=l<=c&&l>=h?c-l:0;c-=m,d=c+(d-h),h=c}else if(d<c){let m=l<=c&&l>=d?c-l:0;c-=m,h=c+(h-d),d=c}return{from:c,toA:h,toB:d}}function P3(t){let i=[];if(t.root.activeElement!=t.contentDOM)return i;let{anchorNode:l,anchorOffset:s,focusNode:r,focusOffset:c}=t.observer.selectionRange;if(l){if(i.push(new uv(l,s)),r!=l||c!=s)i.push(new uv(r,c))}return i}function Y3(t,i){if(t.length==0)return null;let l=t[0].pos,s=t.length==2?t[1].pos:l;return l>-1&&s>-1?G.single(l+i,s+i):null}function rm(t,i){return i.head==t.main.head&&i.anchor==t.main.anchor}class cE{setSelectionOrigin(t){this.lastSelectionOrigin=t,this.lastSelectionTime=Date.now()}constructor(t){if(this.view=t,this.lastKeyCode=0,this.lastKeyTime=0,this.touchActive=!1,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.lastIOSMomentumScroll=0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=t.hasFocus,K.safari)t.contentDOM.addEventListener("input",()=>null);if(K.gecko)s4(t.contentDOM.ownerDocument)}handleEvent(t){if(!K3(this.view,t)||this.ignoreDuringComposition(t))return;if(t.type=="keydown"&&this.keydown(t))return;if(this.view.updateState!=0)Promise.resolve().then(()=>this.runHandlers(t.type,t));else this.runHandlers(t.type,t)}runHandlers(t,i){let l=this.handlers[t];if(l){for(let s of l.observers)s(this.view,i);for(let s of l.handlers){if(i.defaultPrevented)break;if(s(this.view,i)){i.preventDefault();break}}}}ensureHandlers(t){let i=Q3(t),l=this.handlers,s=this.view.contentDOM;for(let r in i)if(r!="scroll"){let c=!i[r].handlers.length,h=l[r];if(h&&c!=!h.handlers.length)s.removeEventListener(r,this.handleEvent),h=null;if(!h)s.addEventListener(r,this.handleEvent,{passive:c})}for(let r in l)if(r!="scroll"&&!i[r])s.removeEventListener(r,this.handleEvent);this.handlers=i}keydown(t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),t.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&t.keyCode!=27&&hE.indexOf(t.keyCode)<0)this.tabFocusMode=-1;if(K.android&&K.chrome&&!t.synthetic&&(t.keyCode==13||t.keyCode==8))return this.view.observer.delayAndroidKey(t.key,t.keyCode),!0;if(K.ios&&!t.synthetic&&!t.altKey&&!t.metaKey&&(fE.some((i)=>i.keyCode==t.keyCode)&&!t.ctrlKey||G3.indexOf(t.key)>-1&&t.ctrlKey)){let i={ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey,shiftKey:t.shiftKey};if(i.shiftKey&&K.ios&&!/^(off|none)$/.test(this.view.contentDOM.autocapitalize)&&X3(this.view.win))i.shiftKey=!1;return this.pendingIOSKey={key:t.key,keyCode:t.keyCode,mods:i},setTimeout(()=>this.flushIOSKey(),250),!0}if(t.keyCode!=229)this.view.observer.forceFlush();return!1}flushIOSKey(t){let i=this.pendingIOSKey;if(!i)return!1;if(i.key=="Enter"&&t&&t.from<t.to&&/^\S+$/.test(t.insert.toString()))return!1;return this.pendingIOSKey=void 0,Ru(this.view.contentDOM,i.key,i.keyCode,i.mods)}ignoreDuringComposition(t){if(!/^key/.test(t.type)||t.synthetic)return!1;if(this.composing>0)return!0;if(K.safari&&!K.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)return this.compositionPendingKey=!1,!0;return!1}startMouseSelection(t){if(this.mouseSelection)this.mouseSelection.destroy();this.mouseSelection=t}update(t){if(this.view.observer.update(t),this.mouseSelection)this.mouseSelection.update(t);if(this.draggedContent&&t.docChanged)this.draggedContent=this.draggedContent.map(t.changes);if(t.transactions.length)this.lastKeyCode=this.lastSelectionTime=0}destroy(){if(this.mouseSelection)this.mouseSelection.destroy()}}function X3(t){if(!t.visualViewport)return!1;return t.visualViewport.height*t.visualViewport.scale/t.document.documentElement.clientHeight<0.85}function nT(t,i){return(l,s)=>{try{return i.call(t,s,l)}catch(r){Fi(l.state,r)}}}function Q3(t){let i=Object.create(null);function l(s){return i[s]||(i[s]={observers:[],handlers:[]})}for(let s of t){let r=s.spec,c=r&&r.plugin.domEventHandlers,h=r&&r.plugin.domEventObservers;if(c)for(let d in c){let m=c[d];if(m)l(d).handlers.push(nT(s.value,m))}if(h)for(let d in h){let m=h[d];if(m)l(d).observers.push(nT(s.value,m))}}for(let s in Do)l(s).handlers.push(Do[s]);for(let s in Pn)l(s).observers.push(Pn[s]);return i}var fE=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],G3="dthko",hE=[16,17,18,20,91,92,224,225],Xp=6;function Qp(t){return Math.max(0,t)*0.7+8}function W3(t,i){return Math.max(Math.abs(t.clientX-i.clientX),Math.abs(t.clientY-i.clientY))}class dE{constructor(t,i,l,s){this.view=t,this.startEvent=i,this.style=l,this.mustSelect=s,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=i,this.scrollParents=kT(t.contentDOM),this.atoms=t.state.facet(Kf).map((c)=>c(t));let r=t.contentDOM.ownerDocument;r.addEventListener("mousemove",this.move=this.move.bind(this)),r.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=i.shiftKey,this.multiple=t.state.facet(qe.allowMultipleSelections)&&F3(t,i),this.dragging=Z3(t,i)&&gE(i)==1?null:!1}start(t){if(this.dragging===!1)this.select(t)}move(t){if(t.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&W3(this.startEvent,t)<10)return;this.select(this.lastEvent=t);let i=0,l=0,s=0,r=0,c=this.view.win.innerWidth,h=this.view.win.innerHeight;if(this.scrollParents.x)({left:s,right:c}=this.scrollParents.x.getBoundingClientRect());if(this.scrollParents.y)({top:r,bottom:h}=this.scrollParents.y.getBoundingClientRect());let d=QT(this.view);if(t.clientX-d.left<=s+Xp)i=-Qp(s-t.clientX);else if(t.clientX+d.right>=c-Xp)i=Qp(t.clientX-c);if(t.clientY-d.top<=r+Xp)l=-Qp(r-t.clientY);else if(t.clientY+d.bottom>=h-Xp)l=Qp(t.clientY-h);this.setScrollSpeed(i,l)}up(t){if(this.dragging==null)this.select(this.lastEvent);if(!this.dragging)t.preventDefault();this.destroy()}destroy(){this.setScrollSpeed(0,0);let t=this.view.contentDOM.ownerDocument;t.removeEventListener("mousemove",this.move),t.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(t,i){if(this.scrollSpeed={x:t,y:i},t||i){if(this.scrolling<0)this.scrolling=setInterval(()=>this.scroll(),50)}else if(this.scrolling>-1)clearInterval(this.scrolling),this.scrolling=-1}scroll(){let{x:t,y:i}=this.scrollSpeed;if(t&&this.scrollParents.x)this.scrollParents.x.scrollLeft+=t,t=0;if(i&&this.scrollParents.y)this.scrollParents.y.scrollTop+=i,i=0;if(t||i)this.view.win.scrollBy(t,i);if(this.dragging===!1)this.select(this.lastEvent)}select(t){let{view:i}=this,l=iE(this.atoms,this.style.get(t,this.extend,this.multiple));if(this.mustSelect||!l.eq(i.state.selection,this.dragging===!1))this.view.dispatch({selection:l,userEvent:"select.pointer"});this.mustSelect=!1}update(t){if(t.transactions.some((i)=>i.isUserEvent("input.type")))this.destroy();else if(this.style.update(t))setTimeout(()=>this.select(this.lastEvent),20)}}function F3(t,i){let l=t.state.facet(zT);return l.length?l[0](i):K.mac?i.metaKey:i.ctrlKey}function J3(t,i){let l=t.state.facet(HT);return l.length?l[0](i):K.mac?!i.altKey:!i.ctrlKey}function Z3(t,i){let{main:l}=t.state.selection;if(l.empty)return!1;let s=Gf(t.root);if(!s||s.rangeCount==0)return!0;let r=s.getRangeAt(0).getClientRects();for(let c=0;c<r.length;c++){let h=r[c];if(h.left<=i.clientX&&h.right>=i.clientX&&h.top<=i.clientY&&h.bottom>=i.clientY)return!0}return!1}function K3(t,i){if(!i.bubbles)return!0;if(i.defaultPrevented)return!1;for(let l=i.target,s;l!=t.contentDOM;l=l.parentNode)if(!l||l.nodeType==11||(s=Nt.get(l))&&s.isWidget()&&!s.isHidden&&s.widget.ignoreEvent(i))return!1;return!0}var Do=Object.create(null),Pn=Object.create(null),pE=K.ie&&K.ie_version<15||K.ios&&K.webkit_version<604;function e4(t){let i=t.dom.parentNode;if(!i)return;let l=i.appendChild(document.createElement("textarea"));l.style.cssText="position: fixed; left: -10000px; top: 10px",l.focus(),setTimeout(()=>{t.focus(),l.remove(),mE(t,l.value)},50)}function dm(t,i,l){for(let s of t.facet(i))l=s(l,t);return l}function mE(t,i){i=dm(t.state,vv,i);let{state:l}=t,s,r=1,c=l.toText(i),h=c.lines==l.selection.ranges.length;if(cv!=null&&l.selection.ranges.every((m)=>m.empty)&&cv==c.toString()){let m=-1;s=l.changeByRange((y)=>{let b=l.doc.lineAt(y.from);if(b.from==m)return{range:y};m=b.from;let S=l.toText((h?c.line(r++).text:i)+l.lineBreak);return{changes:{from:b.from,insert:S},range:G.cursor(y.from+S.length)}})}else if(h)s=l.changeByRange((m)=>{let y=c.line(r++);return{changes:{from:m.from,to:m.to,insert:y.text},range:G.cursor(m.from+y.length)}});else s=l.replaceSelection(c);t.dispatch(s,{userEvent:"input.paste",scrollIntoView:!0})}Pn.scroll=(t)=>{let i=t.inputState;if(i.lastScrollTop=t.scrollDOM.scrollTop,i.lastScrollLeft=t.scrollDOM.scrollLeft,K.ios&&!i.touchActive)i.lastIOSMomentumScroll=Date.now()};Pn.wheel=Pn.mousewheel=(t)=>{t.inputState.lastWheelEvent=Date.now()};Do.keydown=(t,i)=>{if(t.inputState.setSelectionOrigin("select"),i.keyCode==27&&t.inputState.tabFocusMode!=0)t.inputState.tabFocusMode=Date.now()+2000;return!1};Pn.touchstart=(t,i)=>{let l=t.inputState,s=i.targetTouches[0];if(l.touchActive=!0,l.lastTouchTime=Date.now(),s)l.lastTouchX=s.clientX,l.lastTouchY=s.clientY;l.setSelectionOrigin("select.pointer")};Pn.touchmove=(t)=>{t.inputState.setSelectionOrigin("select.pointer")};Pn.touchend=(t,i)=>{t.inputState.touchActive=!1};Do.mousedown=(t,i)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2000)return!1;let l=null;for(let s of t.state.facet(NT))if(l=s(t,i),l)break;if(!l&&i.button==0)l=n4(t,i);if(l){let s=!t.hasFocus;if(t.inputState.startMouseSelection(new dE(t,i,l,s)),s)t.observer.ignore(()=>{AT(t.contentDOM);let c=t.root.activeElement;if(c&&!c.contains(t.contentDOM))c.blur()});let r=t.inputState.mouseSelection;if(r)return r.start(i),r.dragging===!1}else t.inputState.setSelectionOrigin("select.pointer");return!1};function iT(t,i,l,s){if(s==1)return G.cursor(i,l);else if(s==2)return H3(t.state,i,l);else{let r=t.docView.lineAt(i,l),c=t.state.doc.lineAt(r?r.posAtEnd:i),h=r?r.posAtStart:c.from,d=r?r.posAtEnd:c.to;if(d<t.state.doc.length&&d==c.to)d++;return G.undirectionalRange(h,d)}}var t4=K.ie&&K.ie_version<=11,oT=null,lT=0,sT=0;function gE(t){if(!t4)return t.detail;let i=oT,l=sT;return oT=t,sT=Date.now(),lT=!i||l>Date.now()-400&&Math.abs(i.clientX-t.clientX)<2&&Math.abs(i.clientY-t.clientY)<2?(lT+1)%3:1}function n4(t,i){let l=t.posAndSideAtCoords({x:i.clientX,y:i.clientY},!1),s=gE(i),r=t.state.selection;return{update(c){if(c.docChanged)l.pos=c.changes.mapPos(l.pos),r=r.map(c.changes)},get(c,h,d){let m=t.posAndSideAtCoords({x:c.clientX,y:c.clientY},!1),y,b=iT(t,m.pos,m.assoc,s);if(l.pos!=m.pos&&!h){let S=iT(t,l.pos,l.assoc,s),w=Math.min(S.from,b.from),k=Math.max(S.to,b.to);b=w<b.from?G.range(w,k,b.assoc):G.range(k,w,b.assoc)}if(h)return r.replaceRange(r.main.extend(b.from,b.to,b.assoc));else if(d&&s==1&&r.ranges.length>1&&(y=i4(r,m.pos)))return y;else if(d)return r.addRange(b);else return G.create([b])}}}function i4(t,i){for(let l=0;l<t.ranges.length;l++){let{from:s,to:r}=t.ranges[l];if(s<=i&&r>=i)return G.create(t.ranges.slice(0,l).concat(t.ranges.slice(l+1)),t.mainIndex==l?0:t.mainIndex-(t.mainIndex>l?1:0))}return null}Do.dragstart=(t,i)=>{let{selection:{main:l}}=t.state;if(i.target.draggable){let r=t.docView.tile.nearest(i.target);if(r&&r.isWidget()){let c=r.posAtStart,h=c+r.length;if(c>=l.to||h<=l.from)l=G.undirectionalRange(c,h)}}let{inputState:s}=t;if(s.mouseSelection)s.mouseSelection.dragging=!0;if(s.draggedContent=l,i.dataTransfer)i.dataTransfer.setData("Text",dm(t.state,Sv,t.state.sliceDoc(l.from,l.to))),i.dataTransfer.effectAllowed="copyMove";return!1};Do.dragend=(t)=>(t.inputState.draggedContent=null,!1);function aT(t,i,l,s){if(l=dm(t.state,vv,l),!l)return;let r=t.posAtCoords({x:i.clientX,y:i.clientY},!1),{draggedContent:c}=t.inputState,h=s&&c&&J3(t,i)?{from:c.from,to:c.to}:null,d={from:r,insert:l},m=t.state.changes(h?[h,d]:d);t.focus(),t.dispatch({changes:m,selection:{anchor:m.mapPos(r,-1),head:m.mapPos(r,1)},userEvent:h?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Do.drop=(t,i)=>{if(!i.dataTransfer)return!1;if(t.state.readOnly)return!0;let l=i.dataTransfer.files;if(l&&l.length){let s=Array(l.length),r=0,c=()=>{if(++r==l.length)aT(t,i,s.filter((h)=>h!=null).join(t.state.lineBreak),!1)};for(let h=0;h<l.length;h++){let d=new FileReader;d.onerror=c,d.onload=()=>{if(!/[\x00-\x08\x0e-\x1f]{2}/.test(d.result))s[h]=d.result;c()},d.readAsText(l[h])}return!0}else{let s=i.dataTransfer.getData("Text");if(s)return aT(t,i,s,!0),!0}return!1};Do.paste=(t,i)=>{if(t.state.readOnly)return!0;t.observer.flush();let l=pE?null:i.clipboardData;if(l)return mE(t,l.getData("text/plain")||l.getData("text/uri-list")),!0;else return e4(t),!1};function o4(t,i){let l=t.dom.parentNode;if(!l)return;let s=l.appendChild(document.createElement("textarea"));s.style.cssText="position: fixed; left: -10000px; top: 10px",s.value=i,s.focus(),s.selectionEnd=i.length,s.selectionStart=0,setTimeout(()=>{s.remove(),t.focus()},50)}function l4(t){let i=[],l=[],s=!1;for(let r of t.selection.ranges)if(!r.empty)i.push(t.sliceDoc(r.from,r.to)),l.push(r);if(!i.length){let r=-1;for(let{from:c}of t.selection.ranges){let h=t.doc.lineAt(c);if(h.number>r)i.push(h.text),l.push({from:h.from,to:Math.min(t.doc.length,h.to+1)});r=h.number}s=!0}return{text:dm(t,Sv,i.join(t.lineBreak)),ranges:l,linewise:s}}var cv=null;Do.copy=Do.cut=(t,i)=>{if(!Pf(t.contentDOM,t.observer.selectionRange))return!1;let{text:l,ranges:s,linewise:r}=l4(t.state);if(!l&&!r)return!1;if(cv=r?l:null,i.type=="cut"&&!t.state.readOnly)t.dispatch({changes:s,scrollIntoView:!0,userEvent:"delete.cut"});let c=pE?null:i.clipboardData;if(c)return c.clearData(),c.setData("text/plain",l),!0;else return o4(t,l),!1};var yE=Wi.define();function bE(t,i){let l=[];for(let s of t.facet(qT)){let r=s(t,i);if(r)l.push(r)}return l.length?t.update({effects:l,annotations:yE.of(!0)}):null}function vE(t){setTimeout(()=>{let i=t.hasFocus;if(i!=t.inputState.notifiedFocused){let l=bE(t.state,i);if(l)t.dispatch(l);else t.update([])}},10)}Pn.focus=(t)=>{if(t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft))t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft;vE(t)};Pn.blur=(t)=>{t.observer.clearSelectionRange(),vE(t)};Pn.compositionstart=Pn.compositionupdate=(t)=>{if(t.observer.editContext)return;if(t.inputState.compositionFirstChange==null)t.inputState.compositionFirstChange=!0;if(t.inputState.composing<0)t.inputState.composing=0};Pn.compositionend=(t)=>{if(t.observer.editContext)return;if(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,K.chrome&&K.android)t.observer.flushSoon();else if(t.inputState.compositionPendingChange)Promise.resolve().then(()=>t.observer.flush());else setTimeout(()=>{if(t.inputState.composing<0&&t.docView.hasComposition)t.update([])},50)};Pn.contextmenu=(t)=>{t.inputState.lastContextMenu=Date.now()};Do.beforeinput=(t,i)=>{var l,s;if(i.inputType=="insertText"||i.inputType=="insertCompositionText")t.inputState.insertingText=i.data,t.inputState.insertingTextAt=Date.now();if(i.inputType=="insertReplacementText"&&t.observer.editContext){let c=(l=i.dataTransfer)===null||l===void 0?void 0:l.getData("text/plain"),h=i.getTargetRanges();if(c&&h.length){let d=h[0],m=t.posAtDOM(d.startContainer,d.startOffset),y=t.posAtDOM(d.endContainer,d.endOffset);return kv(t,{from:m,to:y,insert:t.state.toText(c)},null),!0}}let r;if(K.chrome&&K.android&&(r=fE.find((c)=>c.inputType==i.inputType))){if(t.observer.delayAndroidKey(r.key,r.keyCode),r.key=="Backspace"||r.key=="Delete"){let c=((s=window.visualViewport)===null||s===void 0?void 0:s.height)||0;setTimeout(()=>{var h;if((((h=window.visualViewport)===null||h===void 0?void 0:h.height)||0)>c+10&&t.hasFocus)t.contentDOM.blur(),t.focus()},100)}}if(K.ios&&i.inputType=="deleteContentForward")t.observer.flushSoon();if(K.safari&&i.inputType=="insertText"&&t.inputState.composing>=0)setTimeout(()=>Pn.compositionend(t,i),20);return!1};var rT=new Set;function s4(t){if(!rT.has(t))rT.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{})}var uT=["pre-wrap","normal","pre-line","break-spaces"],zu=!1;function cT(){zu=!1}class SE{constructor(t){this.lineWrapping=t,this.doc=Ye.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(t,i){let l=this.doc.lineAt(i).number-this.doc.lineAt(t).number+1;if(this.lineWrapping)l+=Math.max(0,Math.ceil((i-t-l*this.lineLength*0.5)/this.lineLength));return this.lineHeight*l}heightForLine(t){if(!this.lineWrapping)return this.lineHeight;return(1+Math.max(0,Math.ceil((t-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight}setDoc(t){return this.doc=t,this}mustRefreshForWrapping(t){return uT.indexOf(t)>-1!=this.lineWrapping}mustRefreshForHeights(t){let i=!1;for(let l=0;l<t.length;l++){let s=t[l];if(s<0)l++;else if(!this.heightSamples[Math.floor(s*10)])i=!0,this.heightSamples[Math.floor(s*10)]=!0}return i}refresh(t,i,l,s,r,c){let h=uT.indexOf(t)>-1,d=Math.abs(i-this.lineHeight)>0.3||this.lineWrapping!=h;if(this.lineWrapping=h,this.lineHeight=i,this.charWidth=l,this.textHeight=s,this.lineLength=r,d){this.heightSamples={};for(let m=0;m<c.length;m++){let y=c[m];if(y<0)m++;else this.heightSamples[Math.floor(y*10)]=!0}}return d}}class wE{constructor(t,i){this.from=t,this.heights=i,this.index=0}get more(){return this.index<this.heights.length}}class To{constructor(t,i,l,s,r){this.from=t,this.length=i,this.top=l,this.height=s,this._content=r}get type(){return typeof this._content=="number"?Zi.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof sr?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(t){let i=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(t._content)?t._content:[t]);return new To(this.from,this.length+t.length,this.top,this.height+t.height,i)}}var vt=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(vt||(vt={})),tm=0.001;class $n{constructor(t,i,l=2){this.length=t,this.height=i,this.flags=l}get outdated(){return(this.flags&2)>0}set outdated(t){this.flags=(t?2:0)|this.flags&-3}setHeight(t){if(this.height!=t){if(Math.abs(this.height-t)>tm)zu=!0;this.height=t}}replace(t,i,l){return $n.of(l)}decomposeLeft(t,i){i.push(this)}decomposeRight(t,i){i.push(this)}applyChanges(t,i,l,s){let r=this,c=l.doc;for(let h=s.length-1;h>=0;h--){let{fromA:d,toA:m,fromB:y,toB:b}=s[h],S=r.lineAt(d,vt.ByPosNoHeight,l.setDoc(i),0,0),w=S.to>=m?S:r.lineAt(m,vt.ByPosNoHeight,l,0,0);b+=w.to-m,m=w.to;while(h>0&&S.from<=s[h-1].toA)if(d=s[h-1].fromA,y=s[h-1].fromB,h--,d<S.from)S=r.lineAt(d,vt.ByPosNoHeight,l,0,0);y+=S.from-d,d=S.from;let k=Av.build(l.setDoc(c),t,y,b);r=um(r,r.replace(d,m,k))}return r.updateHeight(l,0)}static empty(){return new ki(0,0,0)}static of(t){if(t.length==1)return t[0];let i=0,l=t.length,s=0,r=0;for(;;)if(i==l)if(s>r*2){let h=t[i-1];if(h.break)t.splice(--i,1,h.left,null,h.right);else t.splice(--i,1,h.left,h.right);l+=1+h.break,s-=h.size}else if(r>s*2){let h=t[l];if(h.break)t.splice(l,1,h.left,null,h.right);else t.splice(l,1,h.left,h.right);l+=2+h.break,r-=h.size}else break;else if(s<r){let h=t[i++];if(h)s+=h.size}else{let h=t[--l];if(h)r+=h.size}let c=0;if(t[i-1]==null)c=1,i--;else if(t[i]==null)c=1,l++;return new xE($n.of(t.slice(0,i)),c,$n.of(t.slice(l)))}}function um(t,i){if(t==i)return t;if(t.constructor!=i.constructor)zu=!0;return i}$n.prototype.size=1;var a4=St.replace({});class Cv extends $n{constructor(t,i,l){super(t,i);this.deco=l,this.spaceAbove=0}mainBlock(t,i){return new To(i,this.length,t+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(t,i,l,s){return this.spaceAbove&&t<l+this.spaceAbove?new To(s,0,l,this.spaceAbove,a4):this.mainBlock(l,s)}lineAt(t,i,l,s,r){let c=this.mainBlock(s,r);return this.spaceAbove?this.blockAt(0,l,s,r).join(c):c}forEachLine(t,i,l,s,r,c){if(t<=r+this.length&&i>=r)c(this.lineAt(0,vt.ByPos,l,s,r))}setMeasuredHeight(t){let i=t.heights[t.index++];if(i<0)this.spaceAbove=-i,i=t.heights[t.index++];else this.spaceAbove=0;this.setHeight(i)}updateHeight(t,i=0,l=!1,s){if(s&&s.from<=i&&s.more)this.setMeasuredHeight(s);return this.outdated=!1,this}toString(){return`block(${this.length})`}}class ki extends Cv{constructor(t,i,l){super(t,i,null);this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=l}mainBlock(t,i){return new To(i,this.length,t+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(t,i,l){let s=l[0];if(l.length==1&&(s instanceof ki||s instanceof xn&&s.flags&4)&&Math.abs(this.length-s.length)<10){if(s instanceof xn)s=new ki(s.length,this.height,this.spaceAbove);else s.height=this.height;if(!this.outdated)s.outdated=!1;return s}else return $n.of(l)}updateHeight(t,i=0,l=!1,s){if(s&&s.from<=i&&s.more)this.setMeasuredHeight(s);else if(l||this.outdated)this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,t.heightForLine(this.length-this.collapsed))+this.breaks*t.lineHeight);return this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class xn extends $n{constructor(t){super(t,0)}heightMetrics(t,i){let l=t.doc.lineAt(i).number,s=t.doc.lineAt(i+this.length).number,r=s-l+1,c,h=0;if(t.lineWrapping){let d=Math.min(this.height,t.lineHeight*r);if(c=d/r,this.length>r+1)h=(this.height-d)/(this.length-r-1)}else c=this.height/r;return{firstLine:l,lastLine:s,perLine:c,perChar:h}}blockAt(t,i,l,s){let{firstLine:r,lastLine:c,perLine:h,perChar:d}=this.heightMetrics(i,s);if(i.lineWrapping){let m=s+(t<i.lineHeight?0:Math.round(Math.max(0,Math.min(1,(t-l)/this.height))*this.length)),y=i.doc.lineAt(m),b=h+y.length*d,S=Math.max(l,t-b/2);return new To(y.from,y.length,S,b,0)}else{let m=Math.max(0,Math.min(c-r,Math.floor((t-l)/h))),{from:y,length:b}=i.doc.line(r+m);return new To(y,b,l+h*m,h,0)}}lineAt(t,i,l,s,r){if(i==vt.ByHeight)return this.blockAt(t,l,s,r);if(i==vt.ByPosNoHeight){let{from:w,to:k}=l.doc.lineAt(t);return new To(w,k-w,0,0,0)}let{firstLine:c,perLine:h,perChar:d}=this.heightMetrics(l,r),m=l.doc.lineAt(t),y=h+m.length*d,b=m.number-c,S=s+h*b+d*(m.from-r-b);return new To(m.from,m.length,Math.max(s,Math.min(S,s+this.height-y)),y,0)}forEachLine(t,i,l,s,r,c){t=Math.max(t,r),i=Math.min(i,r+this.length);let{firstLine:h,perLine:d,perChar:m}=this.heightMetrics(l,r);for(let y=t,b=s;y<=i;){let S=l.doc.lineAt(y);if(y==t){let k=S.number-h;b+=d*k+m*(t-r-k)}let w=d+m*S.length;c(new To(S.from,S.length,b,w,0)),b+=w,y=S.to+1}}replace(t,i,l){let s=this.length-i;if(s>0){let r=l[l.length-1];if(r instanceof xn)l[l.length-1]=new xn(r.length+s);else l.push(null,new xn(s-1))}if(t>0){let r=l[0];if(r instanceof xn)l[0]=new xn(t+r.length);else l.unshift(new xn(t-1),null)}return $n.of(l)}decomposeLeft(t,i){i.push(new xn(t-1),null)}decomposeRight(t,i){i.push(null,new xn(this.length-t-1))}updateHeight(t,i=0,l=!1,s){let r=i+this.length;if(s&&s.from<=i+this.length&&s.more){let c=[],h=Math.max(i,s.from),d=-1;if(s.from>i)c.push(new xn(s.from-i-1).updateHeight(t,i));while(h<=r&&s.more){let y=t.doc.lineAt(h).length;if(c.length)c.push(null);let b=s.heights[s.index++],S=0;if(b<0)S=-b,b=s.heights[s.index++];if(d==-1)d=b;else if(Math.abs(b-d)>=tm)d=-2;let w=new ki(y,b,S);w.outdated=!1,c.push(w),h+=y+1}if(h<=r)c.push(null,new xn(r-h).updateHeight(t,h));let m=$n.of(c);if(d<0||Math.abs(m.height-this.height)>=tm||Math.abs(d-this.heightMetrics(t,i).perLine)>=tm)zu=!0;return um(this,m)}else if(l||this.outdated)this.setHeight(t.heightForGap(i,i+this.length)),this.outdated=!1;return this}toString(){return`gap(${this.length})`}}class xE extends $n{constructor(t,i,l){super(t.length+i+l.length,t.height+l.height,i|(t.outdated||l.outdated?2:0));this.left=t,this.right=l,this.size=t.size+l.size}get break(){return this.flags&1}blockAt(t,i,l,s){let r=l+this.left.height;return t<r?this.left.blockAt(t,i,l,s):this.right.blockAt(t,i,r,s+this.left.length+this.break)}lineAt(t,i,l,s,r){let c=s+this.left.height,h=r+this.left.length+this.break,d=i==vt.ByHeight?t<c:t<h,m=d?this.left.lineAt(t,i,l,s,r):this.right.lineAt(t,i,l,c,h);if(this.break||(d?m.to<h:m.from>h))return m;let y=i==vt.ByPosNoHeight?vt.ByPosNoHeight:vt.ByPos;if(d)return m.join(this.right.lineAt(h,y,l,c,h));else return this.left.lineAt(h,y,l,s,r).join(m)}forEachLine(t,i,l,s,r,c){let h=s+this.left.height,d=r+this.left.length+this.break;if(this.break){if(t<d)this.left.forEachLine(t,i,l,s,r,c);if(i>=d)this.right.forEachLine(t,i,l,h,d,c)}else{let m=this.lineAt(d,vt.ByPos,l,s,r);if(t<m.from)this.left.forEachLine(t,m.from-1,l,s,r,c);if(m.to>=t&&m.from<=i)c(m);if(i>m.to)this.right.forEachLine(m.to+1,i,l,h,d,c)}}replace(t,i,l){let s=this.left.length+this.break;if(i<s)return this.balanced(this.left.replace(t,i,l),this.right);if(t>this.left.length)return this.balanced(this.left,this.right.replace(t-s,i-s,l));let r=[];if(t>0)this.decomposeLeft(t,r);let c=r.length;for(let h of l)r.push(h);if(t>0)fT(r,c-1);if(i<this.length){let h=r.length;this.decomposeRight(i,r),fT(r,h)}return $n.of(r)}decomposeLeft(t,i){let l=this.left.length;if(t<=l)return this.left.decomposeLeft(t,i);if(i.push(this.left),this.break){if(l++,t>=l)i.push(null)}if(t>l)this.right.decomposeLeft(t-l,i)}decomposeRight(t,i){let l=this.left.length,s=l+this.break;if(t>=s)return this.right.decomposeRight(t-s,i);if(t<l)this.left.decomposeRight(t,i);if(this.break&&t<s)i.push(null);i.push(this.right)}balanced(t,i){if(t.size>2*i.size||i.size>2*t.size)return $n.of(this.break?[t,null,i]:[t,i]);return this.left=um(this.left,t),this.right=um(this.right,i),this.setHeight(t.height+i.height),this.outdated=t.outdated||i.outdated,this.size=t.size+i.size,this.length=t.length+this.break+i.length,this}updateHeight(t,i=0,l=!1,s){let{left:r,right:c}=this,h=i+r.length+this.break,d=null;if(s&&s.from<=i+r.length&&s.more)d=r=r.updateHeight(t,i,l,s);else r.updateHeight(t,i,l);if(s&&s.from<=h+c.length&&s.more)d=c=c.updateHeight(t,h,l,s);else c.updateHeight(t,h,l);if(d)return this.balanced(r,c);return this.height=this.left.height+this.right.height,this.outdated=!1,this}toString(){return this.left+(this.break?" ":"-")+this.right}}function fT(t,i){let l,s;if(t[i]==null&&(l=t[i-1])instanceof xn&&(s=t[i+1])instanceof xn)t.splice(i-1,3,new xn(l.length+1+s.length))}var r4=5;class Av{constructor(t,i){this.pos=t,this.oracle=i,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(t,i){if(this.lineStart>-1){let l=Math.min(i,this.lineEnd),s=this.nodes[this.nodes.length-1];if(s instanceof ki)s.length+=l-this.pos;else if(l>this.pos||!this.isCovered)this.nodes.push(new ki(l-this.pos,-1,0));if(this.writtenTo=l,i>l)this.nodes.push(null),this.writtenTo++,this.lineStart=-1}this.pos=i}point(t,i,l){if(t<i||l.heightRelevant){let s=l.widget?l.widget.estimatedHeight:0,r=l.widget?l.widget.lineBreaks:0;if(s<0)s=this.oracle.lineHeight;let c=i-t;if(l.block)this.addBlock(new Cv(c,s,l));else if(c||r||s>=r4)this.addLineDeco(s,r,c)}else if(i>t)this.span(t,i);if(this.lineEnd>-1&&this.lineEnd<this.pos)this.lineEnd=this.oracle.doc.lineAt(this.pos).to}enterLine(){if(this.lineStart>-1)return;let{from:t,to:i}=this.oracle.doc.lineAt(this.pos);if(this.lineStart=t,this.lineEnd=i,this.writtenTo<t){if(this.writtenTo<t-1||this.nodes[this.nodes.length-1]==null)this.nodes.push(this.blankContent(this.writtenTo,t-1));this.nodes.push(null)}if(this.pos>t)this.nodes.push(new ki(this.pos-t,-1,0));this.writtenTo=this.pos}blankContent(t,i){let l=new xn(i-t);if(this.oracle.doc.lineAt(t).to==i)l.flags|=4;return l}ensureLine(){this.enterLine();let t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof ki)return t;let i=new ki(0,-1,0);return this.nodes.push(i),i}addBlock(t){this.enterLine();let i=t.deco;if(i&&i.startSide>0&&!this.isCovered)this.ensureLine();if(this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,i&&i.endSide>0)this.covering=t}addLineDeco(t,i,l){let s=this.ensureLine();s.length+=l,s.collapsed+=l,s.widgetHeight=Math.max(s.widgetHeight,t),s.breaks+=i,this.writtenTo=this.pos=this.pos+l}finish(t){let i=this.nodes.length==0?null:this.nodes[this.nodes.length-1];if(this.lineStart>-1&&!(i instanceof ki)&&!this.isCovered)this.nodes.push(new ki(0,-1,0));else if(this.writtenTo<this.pos||i==null)this.nodes.push(this.blankContent(this.writtenTo,this.pos));let l=t;for(let s of this.nodes){if(s instanceof ki)s.updateHeight(this.oracle,l);l+=s?s.length:1}return this.nodes}static build(t,i,l,s){let r=new Av(l,t);return We.spans(i,l,s,r,0),r.finish(l)}}function u4(t,i,l){let s=new kE;return We.compare(t,i,l,s,0),s.changes}class kE{constructor(){this.changes=[]}compareRange(){}comparePoint(t,i,l,s){if(t<i||l&&l.heightRelevant||s&&s.heightRelevant)Ou(t,i,this.changes,5)}}function c4(t,i){let l=t.getBoundingClientRect(),s=t.ownerDocument,r=s.defaultView||window,c=Math.max(0,l.left),h=Math.min(r.innerWidth,l.right),d=Math.max(0,l.top),m=Math.min(r.innerHeight,l.bottom);for(let y=t.parentNode;y&&y!=s.body;)if(y.nodeType==1){let b=y,S=window.getComputedStyle(b);if((b.scrollHeight>b.clientHeight||b.scrollWidth>b.clientWidth)&&S.overflow!="visible"){let w=b.getBoundingClientRect();c=Math.max(c,w.left),h=Math.min(h,w.right),d=Math.max(d,w.top),m=Math.min(y==t.parentNode?r.innerHeight:m,w.bottom)}y=S.position=="absolute"||S.position=="fixed"?b.offsetParent:b.parentNode}else if(y.nodeType==11)y=y.host;else break;return{left:c-l.left,right:Math.max(c,h)-l.left,top:d-(l.top+i),bottom:Math.max(d,m)-(l.top+i)}}function f4(t){let i=t.getBoundingClientRect(),l=t.ownerDocument.defaultView||window;return i.left<l.innerWidth&&i.right>0&&i.top<l.innerHeight&&i.bottom>0}function h4(t,i){let l=t.getBoundingClientRect();return{left:0,right:l.right-l.left,top:i,bottom:l.bottom-(l.top+i)}}class nm{constructor(t,i,l,s){this.from=t,this.to=i,this.size=l,this.displaySize=s}static same(t,i){if(t.length!=i.length)return!1;for(let l=0;l<t.length;l++){let s=t[l],r=i[l];if(s.from!=r.from||s.to!=r.to||s.size!=r.size)return!1}return!0}draw(t,i){return St.replace({widget:new CE(this.displaySize*(i?t.scaleY:t.scaleX),i)}).range(this.from,this.to)}}class CE extends la{constructor(t,i){super();this.size=t,this.vertical=i}eq(t){return t.size==this.size&&t.vertical==this.vertical}toDOM(){let t=document.createElement("div");if(this.vertical)t.style.height=this.size+"px";else t.style.width=this.size+"px",t.style.height="2px",t.style.display="inline-block";return t}get estimatedHeight(){return this.vertical?this.size:-1}}class fv{constructor(t,i){this.view=t,this.state=i,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=hT,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Xt.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let l=i.facet(wv).some((s)=>typeof s!="function"&&s.class=="cm-lineWrapping");this.heightOracle=new SE(l),this.stateDeco=dT(i),this.heightMap=$n.empty().applyChanges(this.stateDeco,Ye.empty,this.heightOracle.setDoc(i.doc),[new Ji(0,0,0,i.doc.length)]);for(let s=0;s<2;s++)if(this.viewport=this.getViewport(0,null),!this.updateForViewport())break;this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=St.set(this.lineGaps.map((s)=>s.draw(this,!1))),this.scrollParent=t.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let t=[this.viewport],{main:i}=this.state.selection;for(let l=0;l<=1;l++){let s=l?i.head:i.anchor;if(!t.some(({from:r,to:c})=>s>=r&&s<=c)){let{from:r,to:c}=this.lineBlockAt(s);t.push(new If(r,c))}}return this.viewports=t.sort((l,s)=>l.from-s.from),this.updateScaler()}updateScaler(){let t=this.scaler;return this.scaler=this.heightMap.height<=7000000?hT:new Tv(this.heightOracle,this.heightMap,this.viewports),t.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,(t)=>{this.viewportLines.push($f(t,this.scaler))})}update(t,i=null){this.state=t.state;let l=this.stateDeco;this.stateDeco=dT(this.state);let s=t.changedRanges,r=Ji.extendWithRanges(s,u4(l,this.stateDeco,t?t.changes:an.empty(this.state.doc.length))),c=this.heightMap.height,h=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);if(cT(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,t.startState.doc,this.heightOracle.setDoc(this.state.doc),r),this.heightMap.height!=c||zu)t.flags|=2;if(h)this.scrollAnchorPos=t.changes.mapPos(h.from,-1),this.scrollAnchorHeight=h.top;else this.scrollAnchorPos=-1,this.scrollAnchorHeight=c;let d=r.length?this.mapViewport(this.viewport,t.changes):this.viewport;if(i&&(i.range.head<d.from||i.range.head>d.to)||!this.viewportIsAppropriate(d))d=this.getViewport(0,i);let m=d.from!=this.viewport.from||d.to!=this.viewport.to;if(this.viewport=d,t.flags|=this.updateForViewport(),m||!t.changes.empty||t.flags&2)this.updateViewportLines();if(this.lineGaps.length||this.viewport.to-this.viewport.from>4000)this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,t.changes)));if(t.flags|=this.computeVisibleRanges(t.changes),i)this.scrollTarget=i;if(!this.mustEnforceCursorAssoc&&(t.selectionSet||t.focusChanged)&&t.view.lineWrapping&&t.state.selection.main.empty&&t.state.selection.main.assoc&&!t.state.facet(v3))this.mustEnforceCursorAssoc=!0}measure(){let{view:t}=this,i=t.contentDOM,l=window.getComputedStyle(i),s=this.heightOracle,r=l.whiteSpace;this.defaultTextDirection=l.direction=="rtl"?Xt.RTL:Xt.LTR;let c=this.heightOracle.mustRefreshForWrapping(r)||this.mustMeasureContent==="refresh",h=i.getBoundingClientRect(),d=c||this.mustMeasureContent||this.contentDOMHeight!=h.height;this.contentDOMHeight=h.height,this.mustMeasureContent=!1;let m=0,y=0;if(h.width&&h.height){let{scaleX:ae,scaleY:ye}=xT(i,h);if(ae>0.005&&Math.abs(this.scaleX-ae)>0.005||ye>0.005&&Math.abs(this.scaleY-ye)>0.005)this.scaleX=ae,this.scaleY=ye,m|=16,c=d=!0}let b=(parseInt(l.paddingTop)||0)*this.scaleY,S=(parseInt(l.paddingBottom)||0)*this.scaleY;if(this.paddingTop!=b||this.paddingBottom!=S)this.paddingTop=b,this.paddingBottom=S,m|=18;if(this.editorWidth!=t.scrollDOM.clientWidth){if(s.lineWrapping)d=!0;this.editorWidth=t.scrollDOM.clientWidth,m|=16}let w=kT(this.view.contentDOM,!1).y;if(w!=this.scrollParent)this.scrollParent=w,this.scrollAnchorHeight=-1,this.scrollOffset=0;let k=this.getScrollOffset();if(this.scrollOffset!=k)this.scrollAnchorHeight=-1,this.scrollOffset=k;this.scrolledToBottom=TT(this.scrollParent||t.win);let E=(this.printing?h4:c4)(i,this.paddingTop),R=E.top-this.pixelViewport.top,L=E.bottom-this.pixelViewport.bottom;this.pixelViewport=E;let N=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(N!=this.inView){if(this.inView=N,N)d=!0}if(!this.inView&&!this.scrollTarget&&!f4(t.dom))return 0;let q=h.width;if(this.contentDOMWidth!=q||this.editorHeight!=t.scrollDOM.clientHeight)this.contentDOMWidth=h.width,this.editorHeight=t.scrollDOM.clientHeight,m|=16;if(d){let ae=t.docView.measureVisibleLineHeights(this.viewport);if(s.mustRefreshForHeights(ae))c=!0;if(c||s.lineWrapping&&Math.abs(q-this.contentDOMWidth)>s.charWidth){let{lineHeight:ye,charWidth:nt,textHeight:It}=t.docView.measureTextSize();if(c=ye>0&&s.refresh(r,ye,nt,It,Math.max(5,q/nt),ae),c)t.docView.minWidth=0,m|=16}if(R>0&&L>0)y=Math.max(R,L);else if(R<0&&L<0)y=Math.min(R,L);cT();for(let ye of this.viewports){let nt=ye.from==this.viewport.from?ae:t.docView.measureVisibleLineHeights(ye);this.heightMap=(c?$n.empty().applyChanges(this.stateDeco,Ye.empty,this.heightOracle,[new Ji(0,0,0,t.state.doc.length)]):this.heightMap).updateHeight(s,0,c,new wE(ye.from,nt))}if(zu)m|=2}let J=!this.viewportIsAppropriate(this.viewport,y)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);if(J){if(m&2)m|=this.updateScaler();this.viewport=this.getViewport(y,this.scrollTarget),m|=this.updateForViewport()}if(m&2||J)this.updateViewportLines();if(this.lineGaps.length||this.viewport.to-this.viewport.from>4000)this.updateLineGaps(this.ensureLineGaps(c?[]:this.lineGaps,t));if(m|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc)this.mustEnforceCursorAssoc=!1,t.docView.enforceCursorAssoc();return m}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(t,i){let l=0.5-Math.max(-0.5,Math.min(0.5,t/1000/2)),s=this.heightMap,r=this.heightOracle,{visibleTop:c,visibleBottom:h}=this,d=new If(s.lineAt(c-l*1000,vt.ByHeight,r,0,0).from,s.lineAt(h+(1-l)*1000,vt.ByHeight,r,0,0).to);if(i){let{head:m}=i.range;if(m<d.from||m>d.to){let y=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),b=s.lineAt(m,vt.ByPos,r,0,0),S;if(i.y=="center")S=(b.top+b.bottom)/2-y/2;else if(i.y=="start"||i.y=="nearest"&&m<d.from)S=b.top;else S=b.bottom-y;d=new If(s.lineAt(S-500,vt.ByHeight,r,0,0).from,s.lineAt(S+y+500,vt.ByHeight,r,0,0).to)}}return d}mapViewport(t,i){let l=i.mapPos(t.from,-1),s=i.mapPos(t.to,1);return new If(this.heightMap.lineAt(l,vt.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(s,vt.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:t,to:i},l=0){if(!this.inView)return!0;let{top:s}=this.heightMap.lineAt(t,vt.ByPos,this.heightOracle,0,0),{bottom:r}=this.heightMap.lineAt(i,vt.ByPos,this.heightOracle,0,0),{visibleTop:c,visibleBottom:h}=this;return(t==0||s<=c-Math.max(10,Math.min(-l,250)))&&(i==this.state.doc.length||r>=h+Math.max(10,Math.min(l,250)))&&(s>c-2000&&r<h+2000)}mapLineGaps(t,i){if(!t.length||i.empty)return t;let l=[];for(let s of t)if(!i.touchesRange(s.from,s.to))l.push(new nm(i.mapPos(s.from),i.mapPos(s.to),s.size,s.displaySize));return l}ensureLineGaps(t,i){let l=this.heightOracle.lineWrapping,s=l?1e4:2000,r=s>>1,c=s<<1;if(this.defaultTextDirection!=Xt.LTR&&!l)return[];let h=[],d=(y,b,S,w)=>{if(b-y<r)return;let k=this.state.selection.main,E=[k.from];if(!k.empty)E.push(k.to);for(let L of E)if(L>y&&L<b){d(y,L-10,S,w),d(L+10,b,S,w);return}let R=p4(t,(L)=>L.from>=S.from&&L.to<=S.to&&Math.abs(L.from-y)<r&&Math.abs(L.to-b)<r&&!E.some((N)=>L.from<N&&L.to>N));if(!R){if(b<S.to&&i&&l&&i.visibleRanges.some((q)=>q.from<=b&&q.to>=b)){let q=i.moveToLineBoundary(G.cursor(b),!1,!0).head;if(q>y)b=q}let L=this.gapSize(S,y,b,w),N=l||L<2000000?L:2000000;R=new nm(y,b,L,N)}h.push(R)},m=(y)=>{if(y.length<c||y.type!=Zi.Text)return;let b=d4(y.from,y.to,this.stateDeco);if(b.total<c)return;let S=this.scrollTarget?this.scrollTarget.range.head:null,w,k;if(l){let E=s/this.heightOracle.lineLength*this.heightOracle.lineHeight,R,L;if(S!=null){let N=Wp(b,S),q=((this.visibleBottom-this.visibleTop)/2+E)/y.height;R=N-q,L=N+q}else R=(this.visibleTop-y.top-E)/y.height,L=(this.visibleBottom-y.top+E)/y.height;w=Gp(b,R),k=Gp(b,L)}else{let E=b.total*this.heightOracle.charWidth,R=s*this.heightOracle.charWidth,L=0;if(E>2000000){for(let ye of t)if(ye.from>=y.from&&ye.from<y.to&&ye.size!=ye.displaySize&&ye.from*this.heightOracle.charWidth+L<this.pixelViewport.left)L=ye.size-ye.displaySize}let N=this.pixelViewport.left+L,q=this.pixelViewport.right+L,J,ae;if(S!=null){let ye=Wp(b,S),nt=((q-N)/2+R)/E;J=ye-nt,ae=ye+nt}else J=(N-R)/E,ae=(q+R)/E;w=Gp(b,J),k=Gp(b,ae)}if(w>y.from)d(y.from,w,y,b);if(k<y.to)d(k,y.to,y,b)};for(let y of this.viewportLines)if(Array.isArray(y.type))y.type.forEach(m);else m(y);return h}gapSize(t,i,l,s){let r=Wp(s,l)-Wp(s,i);if(this.heightOracle.lineWrapping)return t.height*r;else return s.total*this.heightOracle.charWidth*r}updateLineGaps(t){if(!nm.same(t,this.lineGaps))this.lineGaps=t,this.lineGapDeco=St.set(t.map((i)=>i.draw(this,this.heightOracle.lineWrapping)))}computeVisibleRanges(t){let i=this.stateDeco;if(this.lineGaps.length)i=i.concat(this.lineGapDeco);let l=[];We.spans(i,this.viewport.from,this.viewport.to,{span(r,c){l.push({from:r,to:c})},point(){}},20);let s=0;if(l.length!=this.visibleRanges.length)s=12;else for(let r=0;r<l.length&&!(s&8);r++){let c=this.visibleRanges[r],h=l[r];if(c.from!=h.from||c.to!=h.to){if(s|=4,!(t&&t.mapPos(c.from,-1)==h.from&&t.mapPos(c.to,1)==h.to))s|=8}}return this.visibleRanges=l,s}lineBlockAt(t){return t>=this.viewport.from&&t<=this.viewport.to&&this.viewportLines.find((i)=>i.from<=t&&i.to>=t)||$f(this.heightMap.lineAt(t,vt.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(t){return t>=this.viewportLines[0].top&&t<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find((i)=>i.top<=t&&i.bottom>=t)||$f(this.heightMap.lineAt(this.scaler.fromDOM(t),vt.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return(this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top)*this.scaleY}scrollAnchorAt(t){let i=this.lineBlockAtHeight(t+8);return i.from>=this.viewport.from||this.viewportLines[0].top-t>200?i:this.viewportLines[0]}elementAtHeight(t){return $f(this.heightMap.blockAt(this.scaler.fromDOM(t),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class If{constructor(t,i){this.from=t,this.to=i}}function d4(t,i,l){let s=[],r=t,c=0;if(We.spans(l,t,i,{span(){},point(h,d){if(h>r)s.push({from:r,to:h}),c+=h-r;r=d}},20),r<i)s.push({from:r,to:i}),c+=i-r;return{total:c,ranges:s}}function Gp({total:t,ranges:i},l){if(l<=0)return i[0].from;if(l>=1)return i[i.length-1].to;let s=Math.floor(t*l);for(let r=0;;r++){let{from:c,to:h}=i[r],d=h-c;if(s<=d)return c+s;s-=d}}function Wp(t,i){let l=0;for(let{from:s,to:r}of t.ranges){if(i<=r){l+=i-s;break}l+=r-s}return l/t.total}function p4(t,i){for(let l of t)if(i(l))return l;return}var hT={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};function dT(t){let i=t.facet(hm).filter((s)=>typeof s!="function"),l=t.facet(xv).filter((s)=>typeof s!="function");if(l.length)i.push(We.join(l));return i}class Tv{constructor(t,i,l){let s=0,r=0,c=0;this.viewports=l.map(({from:h,to:d})=>{let m=i.lineAt(h,vt.ByPos,t,0,0).top,y=i.lineAt(d,vt.ByPos,t,0,0).bottom;return s+=y-m,{from:h,to:d,top:m,bottom:y,domTop:0,domBottom:0}}),this.scale=(7000000-s)/(i.height-s);for(let h of this.viewports)h.domTop=c+(h.top-r)*this.scale,c=h.domBottom=h.domTop+(h.bottom-h.top),r=h.bottom}toDOM(t){for(let i=0,l=0,s=0;;i++){let r=i<this.viewports.length?this.viewports[i]:null;if(!r||t<r.top)return s+(t-l)*this.scale;if(t<=r.bottom)return r.domTop+(t-r.top);l=r.bottom,s=r.domBottom}}fromDOM(t){for(let i=0,l=0,s=0;;i++){let r=i<this.viewports.length?this.viewports[i]:null;if(!r||t<r.domTop)return l+(t-s)/this.scale;if(t<=r.domBottom)return r.top+(t-r.domTop);l=r.bottom,s=r.domBottom}}eq(t){if(!(t instanceof Tv))return!1;return this.scale==t.scale&&this.viewports.length==t.viewports.length&&this.viewports.every((i,l)=>i.from==t.viewports[l].from&&i.to==t.viewports[l].to)}}function $f(t,i){if(i.scale==1)return t;let l=i.toDOM(t.top),s=i.toDOM(t.bottom);return new To(t.from,t.length,l,s-l,Array.isArray(t._content)?t._content.map((r)=>$f(r,i)):t._content)}var Fp=fe.define({combine:(t)=>t.join(" ")}),hv=fe.define({combine:(t)=>t.indexOf(!0)>-1}),dv=Co.newName(),AE=Co.newName(),TE=Co.newName(),EE={"&light":"."+AE,"&dark":"."+TE};function pv(t,i,l){return new Co(i,{finish(s){return/&/.test(s)?s.replace(/&\w*/,(r)=>{if(r=="&")return t;if(!l||!l[r])throw RangeError(`Unsupported selector: ${r}`);return l[r]}):t+" "+s}})}var m4=pv("."+dv,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{userSelect:"none",position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-selectionHandle":{backgroundColor:"currentColor",width:"1.5px"},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:'""',backgroundColor:"inherit",borderRadius:"50%",width:"8px",height:"8px",position:"absolute",left:"-3.25px"},".cm-selectionHandle-start::before":{top:"-8px"},".cm-selectionHandle-end::before":{bottom:"-8px"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},EE),g4={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Fb=K.ie&&K.ie_version<=11;class ME{constructor(t){if(this.view=t,this.active=!1,this.editContext=null,this.selectionRange=new CT,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=t.contentDOM,this.observer=new MutationObserver((i)=>{for(let l of i)this.queue.push(l);if((K.ie&&K.ie_version<=11||K.ios&&t.composing)&&i.some((l)=>l.type=="childList"&&l.removedNodes.length||l.type=="characterData"&&l.oldValue.length>l.target.nodeValue.length))this.flushSoon();else this.flush()}),window.EditContext&&K.android&&t.constructor.EDIT_CONTEXT!==!1&&!(K.chrome&&K.chrome_version<126)){if(this.editContext=new DE(t),t.state.facet(Kl))t.contentDOM.editContext=this.editContext.editContext}if(Fb)this.onCharData=(i)=>{this.queue.push({target:i.target,type:"characterData",oldValue:i.prevValue}),this.flushSoon()};if(this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia)this.printQuery=window.matchMedia("print");if(typeof ResizeObserver=="function")this.resizeScroll=new ResizeObserver(()=>{var i;if(((i=this.view.docView)===null||i===void 0?void 0:i.lastUpdate)<Date.now()-75)this.onResize()}),this.resizeScroll.observe(t.scrollDOM);if(this.addWindowListeners(this.win=t.win),this.start(),typeof IntersectionObserver=="function")this.intersection=new IntersectionObserver((i)=>{if(this.parentCheck<0)this.parentCheck=setTimeout(this.listenForScroll.bind(this),1000);if(i.length>0&&i[i.length-1].intersectionRatio>0!=this.intersecting){if(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView)this.onScrollChanged(document.createEvent("Event"))}},{threshold:[0,0.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((i)=>{if(i.length>0&&i[i.length-1].intersectionRatio>0)this.onScrollChanged(document.createEvent("Event"))},{});this.listenForScroll(),this.readSelectionRange()}onScrollChanged(t){if(this.view.inputState.runHandlers("scroll",t),this.intersecting)this.view.measure()}onScroll(t){if(this.intersecting)this.flush(!1);if(this.editContext)this.view.requestMeasure(this.editContext.measureReq);this.onScrollChanged(t)}onResize(){if(this.resizeTimeout<0)this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50)}onPrint(t){if((t.type=="change"||!t.type)&&!t.matches)return;this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(t){if(this.gapIntersection&&(t.length!=this.gaps.length||this.gaps.some((i,l)=>i!=t[l]))){this.gapIntersection.disconnect();for(let i of t)this.gapIntersection.observe(i);this.gaps=t}}onSelectionChange(t){let i=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:l}=this,s=this.selectionRange;if(l.state.facet(Kl)?l.root.activeElement!=this.dom:!Pf(this.dom,s))return;let r=s.anchorNode&&l.docView.tile.nearest(s.anchorNode);if(r&&r.isWidget()&&r.widget.ignoreEvent(t)){if(!i)this.selectionChanged=!1;return}if((K.ie&&K.ie_version<=11||K.android&&K.chrome)&&!l.state.selection.main.empty&&s.focusNode&&Yf(s.focusNode,s.focusOffset,s.anchorNode,s.anchorOffset))this.flushSoon();else this.flush(!1)}readSelectionRange(){let{view:t}=this,i=Gf(t.root);if(!i)return!1;let l=K.safari&&t.root.nodeType==11&&t.root.activeElement==this.dom&&y4(this.view,i)||i;if(!l||this.selectionRange.eq(l))return!1;let s=Pf(this.dom,l);if(s&&!this.selectionChanged&&t.inputState.lastFocusTime>Date.now()-200&&t.inputState.lastTouchTime<Date.now()-300&&u3(this.dom,l))return this.view.inputState.lastFocusTime=0,t.docView.updateSelection(),!1;if(this.selectionRange.setRange(l),s)this.selectionChanged=!0;return!0}setSelectionRange(t,i){this.selectionRange.set(t.node,t.offset,i.node,i.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let t=0,i=null;for(let l=this.dom;l;)if(l.nodeType==1){if(!i&&t<this.scrollTargets.length&&this.scrollTargets[t]==l)t++;else if(!i)i=this.scrollTargets.slice(0,t);if(i)i.push(l);l=l.assignedSlot||l.parentNode}else if(l.nodeType==11)l=l.host;else break;if(t<this.scrollTargets.length&&!i)i=this.scrollTargets.slice(0,t);if(i){for(let l of this.scrollTargets)l.removeEventListener("scroll",this.onScroll);for(let l of this.scrollTargets=i)l.addEventListener("scroll",this.onScroll)}}ignore(t){if(!this.active)return t();try{return this.stop(),t()}finally{this.start(),this.clear()}}start(){if(this.active)return;if(this.observer.observe(this.dom,g4),Fb)this.dom.addEventListener("DOMCharacterDataModified",this.onCharData);this.active=!0}stop(){if(!this.active)return;if(this.active=!1,this.observer.disconnect(),Fb)this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData)}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(t,i){var l;if(!this.delayedAndroidKey){let s=()=>{let r=this.delayedAndroidKey;if(r){if(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=r.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&r.force)Ru(this.dom,r.key,r.keyCode)}};this.flushingAndroidKey=this.view.win.requestAnimationFrame(s)}if(!this.delayedAndroidKey||t=="Enter")this.delayedAndroidKey={key:t,keyCode:i,force:this.lastChange<Date.now()-50||!!((l=this.delayedAndroidKey)===null||l===void 0?void 0:l.force)}}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){if(this.delayedFlush<0)this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()})}forceFlush(){if(this.delayedFlush>=0)this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1;this.flush()}pendingRecords(){for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}processRecords(){let t=this.pendingRecords();if(t.length)this.queue=[];let i=-1,l=-1,s=!1;for(let r of t){let c=this.readMutation(r);if(!c)continue;if(c.typeOver)s=!0;if(i==-1)({from:i,to:l}=c);else i=Math.min(c.from,i),l=Math.max(c.to,l)}return{from:i,to:l,typeOver:s}}readChange(){let{from:t,to:i,typeOver:l}=this.processRecords(),s=this.selectionChanged&&Pf(this.dom,this.selectionRange);if(t<0&&!s)return null;if(t>-1)this.lastChange=Date.now();this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let r=new sE(this.view,t,i,l);return this.view.docView.domChanged={newSel:r.newSel?r.newSel.main:null},r}flush(t=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;if(t)this.readSelectionRange();let i=this.readChange();if(!i)return this.view.requestMeasure(),!1;let l=this.view.state,s=rE(this.view,i);if(this.view.state==l&&(i.domChanged||i.newSel&&!rm(this.view.state.selection,i.newSel.main)))this.view.update([]);return s}readMutation(t){let i=this.view.docView.tile.nearest(t.target);if(!i||i.isWidget())return null;if(i.markDirty(t.type=="attributes"),t.type=="childList"){let l=pT(i,t.previousSibling||t.target.previousSibling,-1),s=pT(i,t.nextSibling||t.target.nextSibling,1);return{from:l?i.posAfter(l):i.posAtStart,to:s?i.posBefore(s):i.posAtEnd,typeOver:!1}}else if(t.type=="characterData")return{from:i.posAtStart,to:i.posAtEnd,typeOver:t.target.nodeValue==t.oldValue};else return null}setWindow(t){if(t!=this.win)this.removeWindowListeners(this.win),this.win=t,this.addWindowListeners(this.win)}addWindowListeners(t){if(t.addEventListener("resize",this.onResize),this.printQuery)if(this.printQuery.addEventListener)this.printQuery.addEventListener("change",this.onPrint);else this.printQuery.addListener(this.onPrint);else t.addEventListener("beforeprint",this.onPrint);t.addEventListener("scroll",this.onScroll),t.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(t){if(t.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onResize),this.printQuery)if(this.printQuery.removeEventListener)this.printQuery.removeEventListener("change",this.onPrint);else this.printQuery.removeListener(this.onPrint);else t.removeEventListener("beforeprint",this.onPrint);t.document.removeEventListener("selectionchange",this.onSelectionChange)}update(t){if(this.editContext){if(this.editContext.update(t),t.startState.facet(Kl)!=t.state.facet(Kl))t.view.contentDOM.editContext=t.state.facet(Kl)?this.editContext.editContext:null}}destroy(){var t,i,l;this.stop(),(t=this.intersection)===null||t===void 0||t.disconnect(),(i=this.gapIntersection)===null||i===void 0||i.disconnect(),(l=this.resizeScroll)===null||l===void 0||l.disconnect();for(let s of this.scrollTargets)s.removeEventListener("scroll",this.onScroll);if(this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext)this.view.contentDOM.editContext=null,this.editContext.destroy()}}function pT(t,i,l){while(i){let s=Nt.get(i);if(s&&s.parent==t)return s;let r=i.parentNode;i=r!=t.dom?r:l>0?i.nextSibling:i.previousSibling}return null}function mT(t,i){let{startContainer:l,startOffset:s,endContainer:r,endOffset:c}=i,h=t.docView.domAtPos(t.state.selection.main.anchor,1);if(Yf(h.node,h.offset,r,c))[l,s,r,c]=[r,c,l,s];return{anchorNode:l,anchorOffset:s,focusNode:r,focusOffset:c}}function y4(t,i){if(i.getComposedRanges){let r=i.getComposedRanges(t.root)[0];if(r)return mT(t,r)}let l=null;function s(r){r.preventDefault(),r.stopImmediatePropagation(),l=r.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",s,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",s,!0),l?mT(t,l):null}class DE{constructor(t){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(t.state);let i=this.editContext=new window.EditContext({text:t.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,t.state.selection.main.anchor))),selectionEnd:this.toContextPos(t.state.selection.main.head)});this.handlers.textupdate=(l)=>{let s=t.state.selection.main,{anchor:r,head:c}=s,h=this.toEditorPos(l.updateRangeStart),d=this.toEditorPos(l.updateRangeEnd);if(t.inputState.composing>=0&&!this.composing)this.composing={contextBase:l.updateRangeStart,editorBase:h,drifted:!1};let m=d-h>l.text.length;if(h==this.from&&r<this.from)h=r;else if(d==this.to&&r>this.to)d=r;let y=uE(t.state.sliceDoc(h,d),l.text,(m?s.from:s.to)-h,m?"end":null);if(!y){let S=G.single(this.toEditorPos(l.selectionStart),this.toEditorPos(l.selectionEnd));if(!rm(S,s))t.dispatch({selection:S,userEvent:"select"});return}let b={from:y.from+h,to:y.toA+h,insert:Ye.of(l.text.slice(y.from,y.toB).split(`
224
+ `))};if((K.mac||K.android)&&b.from==c-1&&/^\. ?$/.test(l.text)&&t.contentDOM.getAttribute("autocorrect")=="off")b={from:h,to:d,insert:Ye.of([l.text.replace("."," ")])};if(this.pendingContextChange=b,!t.state.readOnly){let S=this.to-this.from+(b.to-b.from+b.insert.length);kv(t,b,G.single(this.toEditorPos(l.selectionStart,S),this.toEditorPos(l.selectionEnd,S)))}if(this.pendingContextChange)this.revertPending(t.state),this.setSelection(t.state);if(b.from<b.to&&!b.insert.length&&t.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(i.text.slice(Math.max(0,l.updateRangeStart-1),Math.min(i.text.length,l.updateRangeStart+1))))this.handlers.compositionend(l)},this.handlers.characterboundsupdate=(l)=>{let s=[],r=null;for(let c=this.toEditorPos(l.rangeStart),h=this.toEditorPos(l.rangeEnd);c<h;c++){let d=t.coordsForChar(c);r=d&&new DOMRect(d.left,d.top,d.right-d.left,d.bottom-d.top)||r||new DOMRect,s.push(r)}i.updateCharacterBounds(l.rangeStart,s)},this.handlers.textformatupdate=(l)=>{let s=[];for(let r of l.getTextFormats()){let{underlineStyle:c,underlineThickness:h}=r;if(!/none/i.test(c)&&!/none/i.test(h)){let d=this.toEditorPos(r.rangeStart),m=this.toEditorPos(r.rangeEnd);if(d<m){let y=`text-decoration: underline ${/^[a-z]/.test(c)?c+" ":c=="Dashed"?"dashed ":c=="Squiggle"?"wavy ":""}${/thin/i.test(h)?1:2}px`;s.push(St.mark({attributes:{style:y}}).range(d,m))}}}t.dispatch({effects:IT.of(St.set(s))})},this.handlers.compositionstart=()=>{if(t.inputState.composing<0)t.inputState.composing=0,t.inputState.compositionFirstChange=!0},this.handlers.compositionend=()=>{if(t.inputState.composing=-1,t.inputState.compositionFirstChange=null,this.composing){let{drifted:l}=this.composing;if(this.composing=null,l)this.reset(t.state)}};for(let l in this.handlers)i.addEventListener(l,this.handlers[l]);this.measureReq={read:(l)=>{let s=Gf(l.root);if(s&&s.rangeCount)this.editContext.updateSelectionBounds(s.getRangeAt(0).getBoundingClientRect())}}}applyEdits(t){let i=0,l=!1,s=this.pendingContextChange;if(t.changes.iterChanges((r,c,h,d,m)=>{if(l)return;let y=m.length-(c-r);if(s&&c>=s.to)if(s.from==r&&s.to==c&&s.insert.eq(m)){s=this.pendingContextChange=null,i+=y,this.to+=y;return}else s=null,this.revertPending(t.state);if(r+=i,c+=i,c<=this.from)this.from+=y,this.to+=y;else if(r<this.to){if(r<this.from||c>this.to||this.to-this.from+m.length>30000){l=!0;return}this.editContext.updateText(this.toContextPos(r),this.toContextPos(c),m.toString()),this.to+=y}i+=y}),s&&!l)this.revertPending(t.state);return!l}update(t){let i=this.pendingContextChange,l=t.startState.selection.main;if(this.composing&&(this.composing.drifted||!t.changes.touchesRange(l.from,l.to)&&t.transactions.some((s)=>!s.isUserEvent("input.type")&&s.changes.touchesRange(this.from,this.to))))this.composing.drifted=!0,this.composing.editorBase=t.changes.mapPos(this.composing.editorBase);else if(!this.applyEdits(t)||!this.rangeIsValid(t.state))this.pendingContextChange=null,this.reset(t.state);else if(t.docChanged||t.selectionSet||i)this.setSelection(t.state);if(t.geometryChanged||t.docChanged||t.selectionSet)t.view.requestMeasure(this.measureReq)}resetRange(t){let{head:i}=t.selection.main;this.from=Math.max(0,i-1e4),this.to=Math.min(t.doc.length,i+1e4)}reset(t){this.resetRange(t),this.editContext.updateText(0,this.editContext.text.length,t.doc.sliceString(this.from,this.to)),this.setSelection(t)}revertPending(t){let i=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(i.from),this.toContextPos(i.from+i.insert.length),t.doc.sliceString(i.from,i.to))}setSelection(t){let{main:i}=t.selection,l=this.toContextPos(Math.max(this.from,Math.min(this.to,i.anchor))),s=this.toContextPos(i.head);if(this.editContext.selectionStart!=l||this.editContext.selectionEnd!=s)this.editContext.updateSelection(l,s)}rangeIsValid(t){let{head:i}=t.selection.main;return!(this.from>0&&i-this.from<500||this.to<t.doc.length&&this.to-i<500||this.to-this.from>30000)}toEditorPos(t,i=this.to-this.from){t=Math.min(t,i);let l=this.composing;return l&&l.drifted?l.editorBase+(t-l.contextBase):t+this.from}toContextPos(t){let i=this.composing;return i&&i.drifted?i.contextBase+(t-i.editorBase):t-this.from}destroy(){for(let t in this.handlers)this.editContext.removeEventListener(t,this.handlers[t])}}class re{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(t={}){var i;if(this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),t.parent)t.parent.appendChild(this.dom);let{dispatch:l}=t;if(this.dispatchTransactions=t.dispatchTransactions||l&&((s)=>s.forEach((r)=>l(r,this)))||((s)=>this.update(s)),this.dispatch=this.dispatch.bind(this),this._root=t.root||r3(t.parent)||document,this.viewState=new fv(this,t.state||qe.create(t)),t.scrollTo&&t.scrollTo.is(Yp))this.viewState.scrollTarget=t.scrollTo.value.clip(this.viewState.state);this.plugins=this.state.facet(Du).map((s)=>new Kp(s));for(let s of this.plugins)s.update(this);if(this.observer=new ME(this),this.inputState=new cE(this),this.inputState.ensureHandlers(this.plugins),this.docView=new sv(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),(i=document.fonts)===null||i===void 0?void 0:i.ready)document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...t){let i=t.length==1&&t[0]instanceof rn?t:t.length==1&&Array.isArray(t[0])?t[0]:[this.state.update(...t)];this.dispatchTransactions(i,this)}update(t){if(this.updateState!=0)throw Error("Calls to EditorView.update are not allowed while an update is in progress");let i=!1,l=!1,s,r=this.state;for(let S of t){if(S.startState!=r)throw RangeError("Trying to update state with a transaction that doesn't start from the previous state.");r=S.state}if(this.destroyed){this.viewState.state=r;return}let c=this.hasFocus,h=0,d=null;if(t.some((S)=>S.annotation(yE)))this.inputState.notifiedFocused=c,h=1;else if(c!=this.inputState.notifiedFocused){if(this.inputState.notifiedFocused=c,d=bE(r,c),!d)h=1}let m=this.observer.delayedAndroidKey,y=null;if(m){if(this.observer.clearDelayedAndroidKey(),y=this.observer.readChange(),y&&!this.state.doc.eq(r.doc)||!this.state.selection.eq(r.selection))y=null}else this.observer.clear();if(r.facet(qe.phrases)!=this.state.facet(qe.phrases))return this.setState(r);s=sm.create(this,r,t),s.flags|=h;let b=this.viewState.scrollTarget;try{this.updateState=2;for(let S of t){if(b)b=b.map(S.changes);if(S.scrollIntoView){let{main:w}=S.state.selection,{x:k,y:E}=this.state.facet(re.cursorScrollMargin);b=new Lu(w.empty?w:G.cursor(w.head,w.head>w.anchor?-1:1),"nearest","nearest",E,k)}for(let w of S.effects)if(w.is(Yp))b=w.value.clip(this.state)}if(this.viewState.update(s,b),this.bidiCache=cm.update(this.bidiCache,s.changes),!s.empty)this.updatePlugins(s),this.inputState.update(s);if(i=this.docView.update(s),this.state.facet(jf)!=this.styleModules)this.mountStyles();l=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(i,t.some((S)=>S.isUserEvent("select.pointer")))}finally{this.updateState=0}if(s.startState.facet(Fp)!=s.state.facet(Fp))this.viewState.mustMeasureContent=!0;if(i||l||b||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)this.requestMeasure();if(i)this.docViewUpdate();if(!s.empty)for(let S of this.state.facet(lv))try{S(s)}catch(w){Fi(this.state,w,"update listener")}if(d||y)Promise.resolve().then(()=>{if(d&&this.state==d.startState)this.dispatch(d);if(y){if(!rE(this,y)&&m.force)Ru(this.contentDOM,m.key,m.keyCode)}})}setState(t){if(this.updateState!=0)throw Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=t;return}this.updateState=2;let i=this.hasFocus;try{for(let l of this.plugins)l.destroy(this);this.viewState=new fv(this,t),this.plugins=t.facet(Du).map((l)=>new Kp(l)),this.pluginMap.clear();for(let l of this.plugins)l.update(this);this.docView.destroy(),this.docView=new sv(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}if(i)this.focus();this.requestMeasure()}updatePlugins(t){let i=t.startState.facet(Du),l=t.state.facet(Du);if(i!=l){let s=[];for(let r of l){let c=i.indexOf(r);if(c<0)s.push(new Kp(r));else{let h=this.plugins[c];h.mustUpdate=t,s.push(h)}}for(let r of this.plugins)if(r.mustUpdate!=t)r.destroy(this);this.plugins=s,this.pluginMap.clear()}else for(let s of this.plugins)s.mustUpdate=t;for(let s=0;s<this.plugins.length;s++)this.plugins[s].update(this);if(i!=l)this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let t of this.plugins){let i=t.value;if(i&&i.docViewUpdate)try{i.docViewUpdate(this)}catch(l){Fi(this.state,l,"doc view update listener")}}}measure(t=!0){if(this.destroyed)return;if(this.measureScheduled>-1)this.win.cancelAnimationFrame(this.measureScheduled);if(this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}if(this.measureScheduled=0,t)this.observer.forceFlush();let i=null,l=this.viewState.scrollParent,s=this.viewState.getScrollOffset(),{scrollAnchorPos:r,scrollAnchorHeight:c}=this.viewState;if(Math.abs(s-this.viewState.scrollOffset)>1)c=-1;this.viewState.scrollAnchorHeight=-1;try{for(let h=0;;h++){if(c<0)if(TT(l||this.win))r=-1,c=this.viewState.heightMap.height;else{let w=this.viewState.scrollAnchorAt(s);r=w.from,c=w.top}this.updateState=1;let d=this.viewState.measure();if(!d&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(h>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let m=[];if(!(d&4))[this.measureRequests,m]=[m,this.measureRequests];let y=m.map((w)=>{try{return w.read(this)}catch(k){return Fi(this.state,k),gT}}),b=sm.create(this,this.state,[]),S=!1;if(b.flags|=d,!i)i=b;else i.flags|=d;if(this.updateState=2,!b.empty){if(this.updatePlugins(b),this.inputState.update(b),this.updateAttrs(),S=this.docView.update(b),S)this.docViewUpdate()}for(let w=0;w<m.length;w++)if(y[w]!=gT)try{let k=m[w];if(k.write)k.write(y[w],this)}catch(k){Fi(this.state,k)}if(S)this.docView.updateSelection(!0);if(!b.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,c=-1;continue}else{let k=((r<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(r).top)-c)/this.scaleY;if((k>1||k<-1)&&!(K.ios&&this.inputState.lastIOSMomentumScroll>Date.now()-100)&&(l==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){if(s=s+k,l)l.scrollTop+=k;else this.win.scrollBy(0,k);c=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(i&&!i.empty)for(let h of this.state.facet(lv))h(i)}get themeClasses(){return dv+" "+(this.state.facet(hv)?TE:AE)+" "+this.state.facet(Fp)}updateAttrs(){let t=yT(this,$T,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),i={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:!this.state.facet(Kl)?"false":"true",class:"cm-content",style:`${K.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};if(this.state.readOnly)i["aria-readonly"]="true";yT(this,wv,i);let l=this.observer.ignore(()=>{let s=W2(this.contentDOM,this.contentAttrs,i),r=W2(this.dom,this.editorAttrs,t);return s||r});return this.editorAttrs=t,this.contentAttrs=i,l}showAnnouncements(t){let i=!0;for(let l of t)for(let s of l.effects)if(s.is(re.announce)){if(i)this.announceDOM.textContent="";i=!1;let r=this.announceDOM.appendChild(document.createElement("div"));r.textContent=s.value}}mountStyles(){this.styleModules=this.state.facet(jf);let t=this.state.facet(re.cspNonce);Co.mount(this.root,this.styleModules.concat(m4).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(this.updateState==2)throw Error("Reading the editor layout isn't allowed during an update");if(this.updateState==0&&this.measureScheduled>-1)this.measure(!1)}requestMeasure(t){if(this.measureScheduled<0)this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure());if(t){if(this.measureRequests.indexOf(t)>-1)return;if(t.key!=null){for(let i=0;i<this.measureRequests.length;i++)if(this.measureRequests[i].key===t.key){this.measureRequests[i]=t;return}}this.measureRequests.push(t)}}plugin(t){let i=this.pluginMap.get(t);if(i===void 0||i&&i.plugin!=t)this.pluginMap.set(t,i=this.plugins.find((l)=>l.plugin==t)||null);return i&&i.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(t){return this.readMeasured(),this.viewState.elementAtHeight(t)}lineBlockAtHeight(t){return this.readMeasured(),this.viewState.lineBlockAtHeight(t)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(t){return this.viewState.lineBlockAt(t)}get contentHeight(){return this.viewState.contentHeight}moveByChar(t,i,l){return Wb(this,t,tT(this,t,i,l))}moveByGroup(t,i){return Wb(this,t,tT(this,t,i,(l)=>q3(this,t.head,l)))}visualLineSide(t,i){let l=this.bidiSpans(t),s=this.textDirectionAt(t.from),r=l[i?l.length-1:0];return G.cursor(r.side(i,s)+t.from,r.forward(!i,s)?1:-1)}moveToLineBoundary(t,i,l=!0){return U3(this,t,i,l)}moveVertically(t,i,l){return Wb(this,t,V3(this,t,i,l))}domAtPos(t,i=1){return this.docView.domAtPos(t,i)}posAtDOM(t,i=0){return this.docView.posFromDOM(t,i)}posAtCoords(t,i=!0){this.readMeasured();let l=rv(this,t,i);return l&&l.pos}posAndSideAtCoords(t,i=!0){return this.readMeasured(),rv(this,t,i)}coordsAtPos(t,i=1){this.readMeasured();let l=this.state.doc.lineAt(t),s=this.bidiSpans(l),r=s[Mo.find(s,t-l.from,-1,i)];return this.docView.coordsAt(t,i,r.dir==Xt.RTL)}coordsForChar(t){return this.readMeasured(),this.docView.coordsForChar(t)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(t){if(!this.state.facet(VT)||t<this.viewport.from||t>this.viewport.to)return this.textDirection;return this.readMeasured(),this.docView.textDirectionAt(t)}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(t){if(t.length>b4)return LT(t.length);let i=this.textDirectionAt(t.from),l;for(let r of this.bidiCache)if(r.from==t.from&&r.dir==i&&(r.fresh||RT(r.isolates,l=Z2(this,t))))return r.order;if(!l)l=Z2(this,t);let s=g3(t.text,i,l);return this.bidiCache.push(new cm(t.from,t.to,i,l,!0,s)),s}get hasFocus(){var t;return(this.dom.ownerDocument.hasFocus()||K.safari&&((t=this.inputState)===null||t===void 0?void 0:t.lastContextMenu)>Date.now()-30000)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{AT(this.contentDOM),this.docView.updateSelection()})}setRoot(t){if(this._root!=t)this._root=t,this.observer.setWindow((t.nodeType==9?t:t.ownerDocument).defaultView||window),this.mountStyles()}destroy(){if(this.root.activeElement==this.contentDOM)this.contentDOM.blur();for(let t of this.plugins)t.destroy(this);if(this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1)this.win.cancelAnimationFrame(this.measureScheduled);this.destroyed=!0}static scrollIntoView(t,i={}){var l,s,r,c;return Yp.of(new Lu(typeof t=="number"?G.cursor(t):t,(l=i.y)!==null&&l!==void 0?l:"nearest",(s=i.x)!==null&&s!==void 0?s:"nearest",(r=i.yMargin)!==null&&r!==void 0?r:5,(c=i.xMargin)!==null&&c!==void 0?c:5))}scrollSnapshot(){let{scrollTop:t,scrollLeft:i}=this.scrollDOM,l=this.viewState.scrollAnchorAt(t);return Yp.of(new Lu(G.cursor(l.from),"start","start",l.top-t,i,!0))}setTabFocusMode(t){if(t==null)this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1;else if(typeof t=="boolean")this.inputState.tabFocusMode=t?0:-1;else if(this.inputState.tabFocusMode!=0)this.inputState.tabFocusMode=Date.now()+t}static domEventHandlers(t){return ns.define(()=>({}),{eventHandlers:t})}static domEventObservers(t){return ns.define(()=>({}),{eventObservers:t})}static theme(t,i){let l=Co.newName(),s=[Fp.of(l),jf.of(pv(`.${l}`,t))];if(i&&i.dark)s.push(hv.of(!0));return s}static baseTheme(t){return Jl.lowest(jf.of(pv("."+dv,t,EE)))}static findFromDOM(t){var i;let l=t.querySelector(".cm-content"),s=l&&Nt.get(l)||Nt.get(t);return((i=s===null||s===void 0?void 0:s.root)===null||i===void 0?void 0:i.view)||null}}re.styleModule=jf;re.inputHandler=UT;re.clipboardInputFilter=vv;re.clipboardOutputFilter=Sv;re.scrollHandler=jT;re.focusChangeEffect=qT;re.perLineTextDirection=VT;re.exceptionSink=_T;re.updateListener=lv;re.editable=Kl;re.mouseSelectionStyle=NT;re.dragMovesSelection=HT;re.clickAddsSelectionRange=zT;re.decorations=hm;re.blockWrappers=PT;re.outerDecorations=xv;re.atomicRanges=Kf;re.bidiIsolatedRanges=YT;re.cursorScrollMargin=fe.define({combine:(t)=>{let i=5,l=5;for(let s of t)if(typeof s=="number")i=l=s;else({x:i,y:l}=s);return{x:i,y:l}}});re.scrollMargins=XT;re.darkTheme=hv;re.cspNonce=fe.define({combine:(t)=>t.length?t[0]:""});re.contentAttributes=wv;re.editorAttributes=$T;re.lineWrapping=re.contentAttributes.of({class:"cm-lineWrapping"});re.announce=Ct.define();var b4=4096,gT={};class cm{constructor(t,i,l,s,r,c){this.from=t,this.to=i,this.dir=l,this.isolates=s,this.fresh=r,this.order=c}static update(t,i){if(i.empty&&!t.some((r)=>r.fresh))return t;let l=[],s=t.length?t[t.length-1].dir:Xt.LTR;for(let r=Math.max(0,t.length-10);r<t.length;r++){let c=t[r];if(c.dir==s&&!i.touchesRange(c.from,c.to))l.push(new cm(i.mapPos(c.from,1),i.mapPos(c.to,-1),c.dir,c.isolates,!1,c.order))}return l}}function yT(t,i,l){for(let s=t.state.facet(i),r=s.length-1;r>=0;r--){let c=s[r],h=typeof c=="function"?c(t):c;if(h)gv(h,l)}return l}var v4=K.mac?"mac":K.windows?"win":K.linux?"linux":"key";function S4(t,i){let l=t.split(/-(?!$)/),s=l[l.length-1];if(s=="Space")s=" ";let r,c,h,d;for(let m=0;m<l.length-1;++m){let y=l[m];if(/^(cmd|meta|m)$/i.test(y))d=!0;else if(/^a(lt)?$/i.test(y))r=!0;else if(/^(c|ctrl|control)$/i.test(y))c=!0;else if(/^s(hift)?$/i.test(y))h=!0;else if(/^mod$/i.test(y))if(i=="mac")d=!0;else c=!0;else throw Error("Unrecognized modifier name: "+y)}if(r)s="Alt-"+s;if(c)s="Ctrl-"+s;if(d)s="Meta-"+s;if(h)s="Shift-"+s;return s}function Jp(t,i,l){if(i.altKey)t="Alt-"+t;if(i.ctrlKey)t="Ctrl-"+t;if(i.metaKey)t="Meta-"+t;if(l!==!1&&i.shiftKey)t="Shift-"+t;return t}var w4=Jl.default(re.domEventHandlers({keydown(t,i){return A4(x4(i.state),t,i,"editor")}})),nh=fe.define({enables:w4}),bT=new WeakMap;function x4(t){let i=t.facet(nh),l=bT.get(i);if(!l)bT.set(i,l=C4(i.reduce((s,r)=>s.concat(r),[])));return l}var na=null,k4=4000;function C4(t,i=v4){let l=Object.create(null),s=Object.create(null),r=(h,d)=>{let m=s[h];if(m==null)s[h]=d;else if(m!=d)throw Error("Key binding "+h+" is used both as a regular binding and as a multi-stroke prefix")},c=(h,d,m,y,b)=>{var S,w;let k=l[h]||(l[h]=Object.create(null)),E=d.split(/ (?!$)/).map((N)=>S4(N,i));for(let N=1;N<E.length;N++){let q=E.slice(0,N).join(" ");if(r(q,!0),!k[q])k[q]={preventDefault:!0,stopPropagation:!1,run:[(J)=>{let ae=na={view:J,prefix:q,scope:h};return setTimeout(()=>{if(na==ae)na=null},k4),!0}]}}let R=E.join(" ");r(R,!1);let L=k[R]||(k[R]={preventDefault:!1,stopPropagation:!1,run:((w=(S=k._any)===null||S===void 0?void 0:S.run)===null||w===void 0?void 0:w.slice())||[]});if(m)L.run.push(m);if(y)L.preventDefault=!0;if(b)L.stopPropagation=!0};for(let h of t){let d=h.scope?h.scope.split(" "):["editor"];if(h.any)for(let y of d){let b=l[y]||(l[y]=Object.create(null));if(!b._any)b._any={preventDefault:!1,stopPropagation:!1,run:[]};let{any:S}=h;for(let w in b)b[w].run.push((k)=>S(k,mv))}let m=h[i]||h.key;if(!m)continue;for(let y of d)if(c(y,m,h.run,h.preventDefault,h.stopPropagation),h.shift)c(y,"Shift-"+m,h.shift,h.preventDefault,h.stopPropagation)}return l}var mv=null;function A4(t,i,l,s){mv=i;let r=Y2(i),c=_b(r,0),h=Ub(c)==r.length&&r!=" ",d="",m=!1,y=!1,b=!1;if(na&&na.view==l&&na.scope==s){if(d=na.prefix+" ",hE.indexOf(i.keyCode)<0)y=!0,na=null}let S=new Set,w=(L)=>{if(L){for(let N of L.run)if(!S.has(N)){if(S.add(N),N(l)){if(L.stopPropagation)b=!0;return!0}}if(L.preventDefault){if(L.stopPropagation)b=!0;y=!0}}return!1},k=t[s],E,R;if(k){if(w(k[d+Jp(r,i,!h)]))m=!0;else if(h&&(i.altKey||i.metaKey||i.ctrlKey)&&!(K.windows&&i.ctrlKey&&i.altKey)&&!(K.mac&&i.altKey&&!(i.ctrlKey||i.metaKey))&&(E=Zl[i.keyCode])&&E!=r){if(w(k[d+Jp(E,i,!0)]))m=!0;else if(i.shiftKey&&(R=Eu[i.keyCode])!=r&&R!=E&&w(k[d+Jp(R,i,!1)]))m=!0}else if(h&&i.shiftKey&&w(k[d+Jp(r,i,!0)]))m=!0;if(!m&&w(k._any))m=!0}if(y)m=!0;if(m&&b)i.stopPropagation();return mv=null,m}var a6=/x/.unicode!=null?"gu":"g";class oa extends xo{compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}eq(t){return!1}destroy(t){}}oa.prototype.elementClass="";oa.prototype.toDOM=void 0;oa.prototype.mapMode=wn.TrackBefore;oa.prototype.startSide=oa.prototype.endSide=-1;oa.prototype.point=!0;var Ev,sa=new Xn;function sh(t){return fe.define({combine:t?(i)=>i.concat(t):void 0})}var gm=new Xn;class li{constructor(t,i,l=[],s=""){if(this.data=t,this.name=s,!qe.prototype.hasOwnProperty("tree"))Object.defineProperty(qe.prototype,"tree",{get(){return jt(this)}});this.parser=i,this.extension=[_u.of(this),qe.languageData.of((r,c,h)=>{let d=OE(r,c,h),m=d.type.prop(sa);if(!m)return[];let y=r.facet(m),b=d.type.prop(gm);if(b){let S=d.resolve(c-d.from,h);for(let w of b)if(w.test(S,r)){let k=r.facet(w.facet);return w.type=="replace"?k:k.concat(y)}}return y})].concat(l)}isActiveAt(t,i,l=-1){return OE(t,i,l).type.prop(sa)==this.data}findRegions(t){let i=t.facet(_u);if((i===null||i===void 0?void 0:i.data)==this.data)return[{from:0,to:t.doc.length}];if(!i||!i.allowsNesting)return[];let l=[],s=(r,c)=>{if(r.prop(sa)==this.data){l.push({from:c,to:c+r.length});return}let h=r.prop(Xn.mounted);if(h){if(h.tree.prop(sa)==this.data){if(h.overlay)for(let d of h.overlay)l.push({from:d.from+c,to:d.to+c});else l.push({from:c,to:c+r.length});return}else if(h.overlay){let d=l.length;if(s(h.tree,h.overlay[0].from+c),l.length>d)return}}for(let d=0;d<r.children.length;d++){let m=r.children[d];if(m instanceof Yn)s(m,r.positions[d]+c)}};return s(jt(t),0),l}get allowsNesting(){return!0}}li.setState=Ct.define();function OE(t,i,l){let s=t.facet(_u),r=jt(t).topNode;if(!s||s.allowsNesting){for(let c=r;c;c=c.enter(i,l,cr.ExcludeBuffers|cr.EnterBracketed))if(c.type.isTop)r=c}return r}class is extends li{constructor(t,i,l){super(t,i,[],l);this.parser=i}static define(t){let i=sh(t.languageData);return new is(i,t.parser.configure({props:[sa.add((l)=>l.isTop?i:void 0)]}),t.name)}configure(t,i){return new is(this.data,this.parser.configure(t),i||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function jt(t){let i=t.field(li.state,!1);return i?i.tree:Yn.empty}class _E{constructor(t){this.doc=t,this.cursorPos=0,this.string="",this.cursor=t.iter()}get length(){return this.doc.length}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,i){let l=this.cursorPos-this.string.length;if(t<l||i>=this.cursorPos)return this.doc.sliceString(t,i);else return this.string.slice(t-l,i-l)}}var ih=null;class Hu{constructor(t,i,l=[],s,r,c,h,d){this.parser=t,this.state=i,this.fragments=l,this.tree=s,this.treeLen=r,this.viewport=c,this.skipped=h,this.scheduleOn=d,this.parse=null,this.tempSkipped=[]}static create(t,i,l){return new Hu(t,i,[],Yn.empty,0,l,[],null)}startParse(){return this.parser.startParse(new _E(this.state.doc),this.fragments)}work(t,i){if(i!=null&&i>=this.state.doc.length)i=void 0;if(this.tree!=Yn.empty&&this.isDone(i!==null&&i!==void 0?i:this.state.doc.length))return this.takeTree(),!0;return this.withContext(()=>{var l;if(typeof t=="number"){let s=Date.now()+t;t=()=>Date.now()>s}if(!this.parse)this.parse=this.startParse();if(i!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>i)&&i<this.state.doc.length)this.parse.stopAt(i);for(;;){let s=this.parse.advance();if(s)if(this.fragments=this.withoutTempSkipped(oh.addTree(s,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(l=this.parse.stoppedAt)!==null&&l!==void 0?l:this.state.doc.length,this.tree=s,this.parse=null,this.treeLen<(i!==null&&i!==void 0?i:this.state.doc.length))this.parse=this.startParse();else return!0;if(t())return!1}})}takeTree(){let t,i;if(this.parse&&(t=this.parse.parsedPos)>=this.treeLen){if(this.parse.stoppedAt==null||this.parse.stoppedAt>t)this.parse.stopAt(t);this.withContext(()=>{while(!(i=this.parse.advance()));}),this.treeLen=t,this.tree=i,this.fragments=this.withoutTempSkipped(oh.addTree(this.tree,this.fragments,!0)),this.parse=null}}withContext(t){let i=ih;ih=this;try{return t()}finally{ih=i}}withoutTempSkipped(t){for(let i;i=this.tempSkipped.pop();)t=RE(t,i.from,i.to);return t}changes(t,i){let{fragments:l,tree:s,treeLen:r,viewport:c,skipped:h}=this;if(this.takeTree(),!t.empty){let d=[];if(t.iterChangedRanges((m,y,b,S)=>d.push({fromA:m,toA:y,fromB:b,toB:S})),l=oh.applyChanges(l,d),s=Yn.empty,r=0,c={from:t.mapPos(c.from,-1),to:t.mapPos(c.to,1)},this.skipped.length){h=[];for(let m of this.skipped){let y=t.mapPos(m.from,1),b=t.mapPos(m.to,-1);if(y<b)h.push({from:y,to:b})}}}return new Hu(this.parser,i,l,s,r,c,h,this.scheduleOn)}updateViewport(t){if(this.viewport.from==t.from&&this.viewport.to==t.to)return!1;this.viewport=t;let i=this.skipped.length;for(let l=0;l<this.skipped.length;l++){let{from:s,to:r}=this.skipped[l];if(s<t.to&&r>t.from)this.fragments=RE(this.fragments,s,r),this.skipped.splice(l--,1)}if(this.skipped.length>=i)return!1;return this.reset(),!0}reset(){if(this.parse)this.takeTree(),this.parse=null}skipUntilInView(t,i){this.skipped.push({from:t,to:i})}static getSkippingParser(t){return new class extends mm{createParse(i,l,s){let r=s[0].from,c=s[s.length-1].to;return{parsedPos:r,advance(){let d=ih;if(d){for(let m of s)d.tempSkipped.push(m);if(t)d.scheduleOn=d.scheduleOn?Promise.all([d.scheduleOn,t]):t}return this.parsedPos=c,new Yn(os.none,[],[],c-r)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let i=this.fragments;return this.treeLen>=t&&i.length&&i[0].from==0&&i[0].to>=t}static get(){return ih}}function RE(t,i,l){return oh.applyChanges(t,[{fromA:i,toA:l,fromB:i,toB:l}])}class Nu{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let i=this.context.changes(t.changes,t.state),l=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),i.viewport.to);if(!i.work(20,l))i.takeTree();return new Nu(i)}static init(t){let i=Math.min(3000,t.doc.length),l=Hu.create(t.facet(_u).parser,t,{from:0,to:i});if(!l.work(20,i))l.takeTree();return new Nu(l)}}li.state=ko.define({create:Nu.init,update(t,i){for(let l of i.effects)if(l.is(li.setState))return l.value;if(i.startState.facet(_u)!=i.state.facet(_u))return Nu.init(i.state);return t.apply(i)}});var UE=(t)=>{let i=setTimeout(()=>t(),500);return()=>clearTimeout(i)};if(typeof requestIdleCallback<"u")UE=(t)=>{let i=-1,l=setTimeout(()=>{i=requestIdleCallback(t,{timeout:400})},100);return()=>i<0?clearTimeout(l):cancelIdleCallback(i)};var Mv=typeof navigator<"u"&&((Ev=navigator.scheduling)===null||Ev===void 0?void 0:Ev.isInputPending)?()=>navigator.scheduling.isInputPending():null,T4=ns.fromClass(class{constructor(i){this.view=i,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(i){let l=this.view.state.field(li.state).context;if(l.updateViewport(i.view.viewport)||this.view.viewport.to>l.treeLen)this.scheduleWork();if(i.docChanged||i.selectionSet){if(this.view.hasFocus)this.chunkBudget+=50;this.scheduleWork()}this.checkAsyncSchedule(l)}scheduleWork(){if(this.working)return;let{state:i}=this.view,l=i.field(li.state);if(l.tree!=l.context.tree||!l.context.isDone(i.doc.length))this.working=UE(this.work)}work(i){this.working=null;let l=Date.now();if(this.chunkEnd<l&&(this.chunkEnd<0||this.view.hasFocus))this.chunkEnd=l+30000,this.chunkBudget=3000;if(this.chunkBudget<=0)return;let{state:s,viewport:{to:r}}=this.view,c=s.field(li.state);if(c.tree==c.context.tree&&c.context.isDone(r+1e5))return;let h=Date.now()+Math.min(this.chunkBudget,100,i&&!Mv?Math.max(25,i.timeRemaining()-5):1e9),d=c.context.treeLen<r&&s.doc.length>r+1000,m=c.context.work(()=>Mv&&Mv()||Date.now()>h,r+(d?0:1e5));if(this.chunkBudget-=Date.now()-l,m||this.chunkBudget<=0)c.context.takeTree(),this.view.dispatch({effects:li.setState.of(new Nu(c.context))});if(this.chunkBudget>0&&!(m&&!d))this.scheduleWork();this.checkAsyncSchedule(c.context)}checkAsyncSchedule(i){if(i.scheduleOn)this.workScheduled++,i.scheduleOn.then(()=>this.scheduleWork()).catch((l)=>Fi(this.view.state,l)).then(()=>this.workScheduled--),i.scheduleOn=null}destroy(){if(this.working)this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),_u=fe.define({combine(t){return t.length?t[0]:null},enables:(t)=>[li.state,T4,re.contentAttributes.compute([t],(i)=>{let l=i.facet(t);return l&&l.name?{"data-language":l.name}:{}})]});class pl{constructor(t,i=[]){this.language=t,this.support=i,this.extension=[t,i]}}class ah{constructor(t,i,l,s,r,c=void 0){this.name=t,this.alias=i,this.extensions=l,this.filename=s,this.loadFunc=r,this.support=c,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then((t)=>this.support=t,(t)=>{throw this.loading=null,t}))}static of(t){let{load:i,support:l}=t;if(!i){if(!l)throw RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");i=()=>Promise.resolve(l)}return new ah(t.name,(t.alias||[]).concat(t.name).map((s)=>s.toLowerCase()),t.extensions||[],t.filename,i,l)}static matchFilename(t,i){for(let s of t)if(s.filename&&s.filename.test(i))return s;let l=/\.([^.]+)$/.exec(i);if(l){for(let s of t)if(s.extensions.indexOf(l[1])>-1)return s}return null}static matchLanguageName(t,i,l=!0){i=i.toLowerCase();for(let s of t)if(s.alias.some((r)=>r==i))return s;if(l)for(let s of t)for(let r of s.alias){let c=i.indexOf(r);if(c>-1&&(r.length>2||!/\w/.test(i[c-1])&&!/\w/.test(i[c+r.length])))return s}return null}}var ym=fe.define({combine:(t)=>{if(!t.length)return" ";let i=t[0];if(!i||/\S/.test(i)||Array.from(i).some((l)=>l!=i[0]))throw Error("Invalid indent unit: "+JSON.stringify(t[0]));return i}});var aa=new Xn;function E4(t){let i=t.node,l=i.childAfter(i.from),s=i.lastChild;if(!l)return null;let r=t.options.simulateBreak,c=t.state.doc.lineAt(l.from),h=r==null||r<=c.from?c.to:Math.min(c.to,r);for(let d=l.to;;){let m=i.childAfter(d);if(!m||m==s)return null;if(!m.type.isSkipped){if(m.from>=h)return null;let y=/^ */.exec(c.text.slice(l.to-c.from))[0].length;return{from:l.from,to:l.to+y}}d=m.to}}function qE({closing:t,align:i=!0,units:l=1}){return(s)=>M4(s,i,l,t)}function M4(t,i,l,s,r){let c=t.textAfter,h=c.match(/^\s*/)[0].length,d=s&&c.slice(h,h+s.length)==s||r==t.pos+h,m=i?E4(t):null;if(m)return d?t.column(m.from):t.column(m.to);return t.baseIndent+(d?0:t.unit*l)}var VE=(t)=>t.baseIndent;function Uu({except:t,units:i=1}={}){return(l)=>{let s=t&&t.test(l.textAfter);return l.baseIndent+(s?0:i*l.unit)}}var jE=fe.define(),ls=new Xn;function bm(t){let{firstChild:i,lastChild:l}=t;return i&&i.to<l.from?{from:i.to,to:l.type.isError?t.to:l.from}:null}class qu{constructor(t,i){this.specs=t;let l;function s(h){let d=Co.newName();return(l||(l=Object.create(null)))["."+d]=h,d}let r=typeof i.all=="string"?i.all:i.all?s(i.all):void 0,c=i.scope;this.scope=c instanceof li?(h)=>h.prop(sa)==c.data:c?(h)=>h==c:void 0,this.style=HE(t.map((h)=>({tag:h.tag,class:h.class||s(Object.assign({},h,{tag:null}))})),{all:r}).style,this.module=l?new Co(l):null,this.themeType=i.themeType}static define(t,i){return new qu(t,i||{})}}var Rv=fe.define(),IE=fe.define({combine(t){return t.length?[t[0]]:null}});function Dv(t){let i=t.facet(Rv);return i.length?i:t.facet(IE)}function $E(t,i){let l=[D4],s;if(t instanceof qu){if(t.module)l.push(re.styleModule.of(t.module));s=t.themeType}if(i===null||i===void 0?void 0:i.fallback)l.push(IE.of(t));else if(s)l.push(Rv.computeN([re.darkTheme],(r)=>r.facet(re.darkTheme)==(s=="dark")?[t]:[]));else l.push(Rv.of(t));return l}class PE{constructor(t){this.markCache=Object.create(null),this.tree=jt(t.state),this.decorations=this.buildDeco(t,Dv(t.state)),this.decoratedTo=t.viewport.to}update(t){let i=jt(t.state),l=Dv(t.state),s=l!=Dv(t.startState),{viewport:r}=t.view,c=t.changes.mapPos(this.decoratedTo,1);if(i.length<r.to&&!s&&i.type==this.tree.type&&c>=r.to)this.decorations=this.decorations.map(t.changes),this.decoratedTo=c;else if(i!=this.tree||t.viewportChanged||s)this.tree=i,this.decorations=this.buildDeco(t.view,l),this.decoratedTo=r.to}buildDeco(t,i){if(!i||!this.tree.length)return St.none;let l=new ir;for(let{from:s,to:r}of t.visibleRanges)NE(this.tree,i,(c,h,d)=>{l.add(c,h,this.markCache[d]||(this.markCache[d]=St.mark({class:d})))},s,r);return l.finish()}}var D4=Jl.high(ns.fromClass(PE,{decorations:(t)=>t.decorations})),g6=qu.define([{tag:Q.meta,color:"#404740"},{tag:Q.link,textDecoration:"underline"},{tag:Q.heading,textDecoration:"underline",fontWeight:"bold"},{tag:Q.emphasis,fontStyle:"italic"},{tag:Q.strong,fontWeight:"bold"},{tag:Q.strikethrough,textDecoration:"line-through"},{tag:Q.keyword,color:"#708"},{tag:[Q.atom,Q.bool,Q.url,Q.contentSeparator,Q.labelName],color:"#219"},{tag:[Q.literal,Q.inserted],color:"#164"},{tag:[Q.string,Q.deleted],color:"#a11"},{tag:[Q.regexp,Q.escape,Q.special(Q.string)],color:"#e40"},{tag:Q.definition(Q.variableName),color:"#00f"},{tag:Q.local(Q.variableName),color:"#30a"},{tag:[Q.typeName,Q.namespace],color:"#085"},{tag:Q.className,color:"#167"},{tag:[Q.special(Q.variableName),Q.macroName],color:"#256"},{tag:Q.definition(Q.propertyName),color:"#00c"},{tag:Q.comment,color:"#940"},{tag:Q.invalid,color:"#f00"}]);var YE=new Xn;var O4=Object.create(null),LE=[os.none];var BE=[],zE=Object.create(null),R4=Object.create(null);for(let[t,i]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])R4[t]=L4(O4,i);function Ov(t,i){if(BE.indexOf(t)>-1)return;BE.push(t),console.warn(i)}function L4(t,i){let l=[];for(let d of i.split(" ")){let m=[];for(let y of d.split(".")){let b=t[y]||Q[y];if(!b)Ov(y,`Unknown highlighting tag ${y}`);else if(typeof b=="function")if(!m.length)Ov(y,`Modifier ${y} used at start of tag`);else m=m.map(b);else if(m.length)Ov(y,`Tag ${y} used as modifier`);else m=Array.isArray(b)?b:[b]}for(let y of m)l.push(y)}if(!l.length)return 0;let s=i.replace(/ /g,"_"),r=s+" "+l.map((d)=>d.id),c=zE[r];if(c)return c.id;let h=zE[r]=os.define({id:LE.length,name:s,props:[lh({[s]:l})]});return LE.push(h),h.id}var y6={rtl:St.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"rtl"},bidiIsolate:Xt.RTL}),ltr:St.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"ltr"},bidiIsolate:Xt.LTR}),auto:St.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"auto"},bidiIsolate:null})};class Lv{constructor(t,i,l,s){this.state=t,this.pos=i,this.explicit=l,this.view=s,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(t){let i=jt(this.state).resolveInner(this.pos,-1);while(i&&t.indexOf(i.name)<0)i=i.parent;return i?{from:i.from,to:this.pos,text:this.state.sliceDoc(i.from,this.pos),type:i.type}:null}matchBefore(t){let i=this.state.doc.lineAt(this.pos),l=Math.max(i.from,this.pos-250),s=i.text.slice(l-i.from,this.pos-i.from),r=s.search(z4(t,!1));return r<0?null:{from:l+r,to:this.pos,text:s.slice(r)}}get aborted(){return this.abortListeners==null}addEventListener(t,i,l){if(t=="abort"&&this.abortListeners){if(this.abortListeners.push(i),l&&l.onDocChange)this.abortOnDocChange=!0}}}function XE(t){let i=Object.keys(t).join(""),l=/\w/.test(i);if(l)i=i.replace(/\w/g,"");return`[${l?"\\w":""}${i.replace(/[^\w\s]/g,"\\$&")}]`}function B4(t){let i=Object.create(null),l=Object.create(null);for(let{label:r}of t){i[r[0]]=!0;for(let c=1;c<r.length;c++)l[r[c]]=!0}let s=XE(i)+XE(l)+"*$";return[new RegExp("^"+s),new RegExp(s)]}function GE(t){let i=t.map((r)=>typeof r=="string"?{label:r}:r),[l,s]=i.every((r)=>/^\w+$/.test(r.label))?[/\w*$/,/\w+$/]:B4(i);return(r)=>{let c=r.matchBefore(s);return c||r.explicit?{from:c?c.from:r.pos,options:i,validFor:l}:null}}function WE(t,i){return(l)=>{for(let s=jt(l.state).resolveInner(l.pos,-1);s;s=s.parent){if(t.indexOf(s.name)>-1)return null;if(s.type.isTop)break}return i(l)}}function z4(t,i){var l;let{source:s}=t,r=i&&s[0]!="^",c=s[s.length-1]!="$";if(!r&&!c)return t;return new RegExp(`${r?"^":""}(?:${s})${c?"$":""}`,(l=t.flags)!==null&&l!==void 0?l:t.ignoreCase?"i":"")}var H4=Wi.define();var T6=typeof navigator=="object"&&/Win/.test(navigator.platform);var N4=re.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:0.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:0.5,display:"block",textAlign:"center",cursor:"pointer"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'\uD835\uDC65'"}},".cm-completionIcon-constant":{"&:after":{content:"'\uD835\uDC36'"}},".cm-completionIcon-type":{"&:after":{content:"'\uD835\uDC61'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\uD83D\uDD11︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class FE{constructor(t,i,l,s){this.field=t,this.line=i,this.from=l,this.to=s}}class Bv{constructor(t,i,l){this.field=t,this.from=i,this.to=l}map(t){let i=t.mapPos(this.from,-1,wn.TrackDel),l=t.mapPos(this.to,1,wn.TrackDel);return i==null||l==null?null:new Bv(this.field,i,l)}}class zv{constructor(t,i){this.lines=t,this.fieldPositions=i}instantiate(t,i){let l=[],s=[i],r=t.doc.lineAt(i),c=/^\s*/.exec(r.text)[0];for(let d of this.lines){if(l.length){let m=c,y=/^\t*/.exec(d)[0].length;for(let b=0;b<y;b++)m+=t.facet(ym);s.push(i+m.length-y),d=m+d.slice(y)}l.push(d),i+=d.length+1}let h=this.fieldPositions.map((d)=>new Bv(d.field,s[d.line]+d.from,s[d.line]+d.to));return{text:l,ranges:h}}static parse(t){let i=[],l=[],s=[],r;for(let c of t.split(/\r\n?|\n/)){while(r=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(c)){let h=r[1]?+r[1]:null,d=r[2]||r[3]||"",m=-1;if(h===0)h=1e9;let y=d.replace(/\\[{}]/g,(b)=>b[1]);for(let b=0;b<i.length;b++)if(h!=null?i[b].seq==h:y?i[b].name==y:!1)m=b;if(m<0){let b=0;while(b<i.length&&(h==null||i[b].seq!=null&&i[b].seq<h))b++;i.splice(b,0,{seq:h,name:y}),m=b;for(let S of s)if(S.field>=m)S.field++}for(let b of s)if(b.line==l.length&&b.from>r.index){let S=r[2]?3+(r[1]||"").length:2;b.from-=S,b.to-=S}s.push(new FE(m,l.length,r.index,r.index+y.length)),c=c.slice(0,r.index)+d+c.slice(r.index+r[0].length)}c=c.replace(/\\([{}])/g,(h,d,m)=>{for(let y of s)if(y.line==l.length&&y.from>m)y.from--,y.to--;return d}),l.push(c)}return new zv(l,s)}}var _4=St.widget({widget:new class extends la{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),U4=St.mark({class:"cm-snippetField"});class Vu{constructor(t,i){this.ranges=t,this.active=i,this.deco=St.set(t.map((l)=>(l.from==l.to?_4:U4).range(l.from,l.to)),!0)}map(t){let i=[];for(let l of this.ranges){let s=l.map(t);if(!s)return null;i.push(s)}return new Vu(i,this.active)}selectionInsideField(t){return t.ranges.every((i)=>this.ranges.some((l)=>l.field==this.active&&l.from<=i.from&&l.to>=i.to))}}var uh=Ct.define({map(t,i){return t&&t.map(i)}}),q4=Ct.define(),rh=ko.define({create(){return null},update(t,i){for(let l of i.effects){if(l.is(uh))return l.value;if(l.is(q4)&&t)return new Vu(t.ranges,l.value)}if(t&&i.docChanged)t=t.map(i.changes);if(t&&i.selection&&!t.selectionInsideField(i.selection))t=null;return t},provide:(t)=>re.decorations.from(t,(i)=>i?i.deco:St.none)});function Hv(t,i){return G.create(t.filter((l)=>l.field==i).map((l)=>G.range(l.from,l.to)))}function V4(t){let i=zv.parse(t);return(l,s,r,c)=>{let{text:h,ranges:d}=i.instantiate(l.state,r),{main:m}=l.state.selection,y={changes:{from:r,to:c==m.from?m.to:c,insert:Ye.of(h)},scrollIntoView:!0,annotations:s?[H4.of(s),rn.userEvent.of("input.complete")]:void 0};if(d.length)y.selection=Hv(d,0);if(d.some((b)=>b.field>0)){let b=new Vu(d,0),S=y.effects=[uh.of(b)];if(l.state.field(rh,!1)===void 0)S.push(Ct.appendConfig.of([rh,Y4,X4,N4]))}l.dispatch(l.state.update(y))}}function JE(t){return({state:i,dispatch:l})=>{let s=i.field(rh,!1);if(!s||t<0&&s.active==0)return!1;let r=s.active+t,c=t>0&&!s.ranges.some((h)=>h.field==r+t);return l(i.update({selection:Hv(s.ranges,r),effects:uh.of(c?null:new Vu(s.ranges,r)),scrollIntoView:!0})),!0}}var j4=({state:t,dispatch:i})=>{if(!t.field(rh,!1))return!1;return i(t.update({effects:uh.of(null)})),!0},I4=JE(1),$4=JE(-1);var P4=[{key:"Tab",run:I4,shift:$4},{key:"Escape",run:j4}],QE=fe.define({combine(t){return t.length?t[0]:P4}}),Y4=Jl.highest(nh.compute([QE],(t)=>t.facet(QE)));function Qn(t,i){return{...i,apply:V4(t)}}var X4=re.domEventHandlers({mousedown(t,i){let l=i.state.field(rh,!1),s;if(!l||(s=i.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let r=l.ranges.find((c)=>c.from<=s&&c.to>=s);if(!r||r.field==l.active)return!1;return i.dispatch({selection:Hv(l.ranges,r.field),effects:uh.of(l.ranges.some((c)=>c.field>r.field)?new Vu(l.ranges,r.field):null),scrollIntoView:!0}),!0}});var ZE=new class extends xo{};ZE.startSide=1;ZE.endSide=-1;var E6=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent);class wm{static create(t,i,l,s,r){let c=s+(s<<8)+t+(i<<4)|0;return new wm(t,i,l,c,r,[],[])}constructor(t,i,l,s,r,c,h){this.type=t,this.value=i,this.from=l,this.hash=s,this.end=r,this.children=c,this.positions=h,this.hashProp=[[Xn.contextHash,s]]}addChild(t,i){if(t.prop(Xn.contextHash)!=this.hash)t=new Yn(t.type,t.children,t.positions,t.length,this.hashProp);this.children.push(t),this.positions.push(i)}toTree(t,i=this.end){let l=this.children.length-1;if(l>=0)i=Math.max(i,this.positions[l]+this.children[l].length+this.from);return new Yn(t.types[this.type],this.children,this.positions,i-this.from).balance({makeTree:(s,r,c)=>new Yn(os.none,s,r,c,this.hashProp)})}}var I;(function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.Autolink=33]="Autolink",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel",t[t.URL=44]="URL"})(I||(I={}));class hM{constructor(t,i){this.start=t,this.content=i,this.marks=[],this.parsers=[]}}class dM{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){if(this.basePos>this.pos)this.forwardInner()}forwardInner(){let t=this.skipSpace(this.basePos);this.indent=this.countIndent(t,this.pos,this.indent),this.pos=t,this.next=t==this.text.length?-1:this.text.charCodeAt(t)}skipSpace(t){return fh(this.text,t)}reset(t){this.text=t,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;while(this.markers.length)this.markers.pop()}moveBase(t){this.basePos=t,this.baseIndent=this.countIndent(t,this.pos,this.indent)}moveBaseColumn(t){this.baseIndent=t,this.basePos=this.findColumn(t)}addMarker(t){this.markers.push(t)}countIndent(t,i=0,l=0){for(let s=i;s<t;s++)l+=this.text.charCodeAt(s)==9?4-l%4:1;return l}findColumn(t){let i=0;for(let l=0;i<this.text.length&&l<t;i++)l+=this.text.charCodeAt(i)==9?4-l%4:1;return i}scrub(){if(!this.baseIndent)return this.text;let t="";for(let i=0;i<this.basePos;i++)t+=" ";return t+this.text.slice(this.basePos)}}function KE(t,i,l){if(l.pos==l.text.length||t!=i.block&&l.indent>=i.stack[l.depth+1].value+l.baseIndent)return!0;if(l.indent>=l.baseIndent+4)return!1;let s=(t.type==I.OrderedList?Yv:Pv)(l,i,!1);return s>0&&(t.type!=I.BulletList||$v(l,i,!1)<0)&&l.text.charCodeAt(l.pos+s-1)==t.value}var pM={[I.Blockquote](t,i,l){if(l.next!=62)return!1;return l.markers.push(Xe(I.QuoteMark,i.lineStart+l.pos,i.lineStart+l.pos+1)),l.moveBase(l.pos+(Ki(l.text.charCodeAt(l.pos+1))?2:1)),t.end=i.lineStart+l.text.length,!0},[I.ListItem](t,i,l){if(l.indent<l.baseIndent+t.value&&l.next>-1)return!1;return l.moveBaseColumn(l.baseIndent+t.value),!0},[I.OrderedList]:KE,[I.BulletList]:KE,[I.Document](){return!0}};function Ki(t){return t==32||t==9||t==10||t==13}function fh(t,i=0){while(i<t.length&&Ki(t.charCodeAt(i)))i++;return i}function eM(t,i,l){while(i>l&&Ki(t.charCodeAt(i-1)))i--;return i}function mM(t){if(t.next!=96&&t.next!=126)return-1;let i=t.pos+1;while(i<t.text.length&&t.text.charCodeAt(i)==t.next)i++;if(i<t.pos+3)return-1;if(t.next==96){for(let l=i;l<t.text.length;l++)if(t.text.charCodeAt(l)==96)return-1}return i}function gM(t){return t.next!=62?-1:t.text.charCodeAt(t.pos+1)==32?2:1}function $v(t,i,l){if(t.next!=42&&t.next!=45&&t.next!=95)return-1;let s=1;for(let r=t.pos+1;r<t.text.length;r++){let c=t.text.charCodeAt(r);if(c==t.next)s++;else if(!Ki(c))return-1}if(l&&t.next==45&&vM(t)>-1&&t.depth==i.stack.length&&i.parser.leafBlockParsers.indexOf(AM.SetextHeading)>-1)return-1;return s<3?-1:1}function yM(t,i){for(let l=t.stack.length-1;l>=0;l--)if(t.stack[l].type==i)return!0;return!1}function Pv(t,i,l){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||Ki(t.text.charCodeAt(t.pos+1)))&&(!l||yM(i,I.BulletList)||t.skipSpace(t.pos+2)<t.text.length)?1:-1}function Yv(t,i,l){let{pos:s,next:r}=t;for(;;){if(r>=48&&r<=57)s++;else break;if(s==t.text.length)return-1;r=t.text.charCodeAt(s)}if(s==t.pos||s>t.pos+9||r!=46&&r!=41||s<t.text.length-1&&!Ki(t.text.charCodeAt(s+1))||l&&!yM(i,I.OrderedList)&&(t.skipSpace(s+1)==t.text.length||s>t.pos+1||t.next!=49))return-1;return s+1-t.pos}function bM(t){if(t.next!=35)return-1;let i=t.pos+1;while(i<t.text.length&&t.text.charCodeAt(i)==35)i++;if(i<t.text.length&&t.text.charCodeAt(i)!=32)return-1;let l=i-t.pos;return l>6?-1:l}function vM(t){if(t.next!=45&&t.next!=61||t.indent>=t.baseIndent+4)return-1;let i=t.pos+1;while(i<t.text.length&&t.text.charCodeAt(i)==t.next)i++;let l=i;while(i<t.text.length&&Ki(t.text.charCodeAt(i)))i++;return i==t.text.length?l:-1}var Uv=/^[ \t]*$/,SM=/-->/,wM=/\?>/,qv=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,SM],[/^\s*<\?/,wM],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,Uv],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,Uv]];function xM(t,i,l){if(t.next!=60)return-1;let s=t.text.slice(t.pos);for(let r=0,c=qv.length-(l?1:0);r<c;r++)if(qv[r][0].test(s))return r;return-1}function tM(t,i){let l=t.countIndent(i,t.pos,t.indent),s=t.countIndent(t.skipSpace(i),i,l);return s>=l+5?l+1:s}function ra(t,i,l){let s=t.length-1;if(s>=0&&t[s].to==i&&t[s].type==I.CodeText)t[s].to=l;else t.push(Xe(I.CodeText,i,l))}var vm={LinkReference:void 0,IndentedCode(t,i){let l=i.baseIndent+4;if(i.indent<l)return!1;let s=i.findColumn(l),r=t.lineStart+s,c=t.lineStart+i.text.length,h=[],d=[];ra(h,r,c);while(t.nextLine()&&i.depth>=t.stack.length)if(i.pos==i.text.length){ra(d,t.lineStart-1,t.lineStart);for(let m of i.markers)d.push(m)}else if(i.indent<l)break;else{if(d.length){for(let y of d)if(y.type==I.CodeText)ra(h,y.from,y.to);else h.push(y);d=[]}ra(h,t.lineStart-1,t.lineStart);for(let y of i.markers)h.push(y);c=t.lineStart+i.text.length;let m=t.lineStart+i.findColumn(i.baseIndent+4);if(m<c)ra(h,m,c)}if(d.length){if(d=d.filter((m)=>m.type!=I.CodeText),d.length)i.markers=d.concat(i.markers)}return t.addNode(t.buffer.writeElements(h,-r).finish(I.CodeBlock,c-r),r),!0},FencedCode(t,i){let l=mM(i);if(l<0)return!1;let s=t.lineStart+i.pos,r=i.next,c=l-i.pos,h=i.skipSpace(l),d=eM(i.text,i.text.length,h),m=[Xe(I.CodeMark,s,s+c)];if(h<d)m.push(Xe(I.CodeInfo,t.lineStart+h,t.lineStart+d));for(let y=!0,b=!0,S=!1;t.nextLine()&&i.depth>=t.stack.length;y=!1){let w=i.pos;if(i.indent-i.baseIndent<4)while(w<i.text.length&&i.text.charCodeAt(w)==r)w++;if(w-i.pos>=c&&i.skipSpace(w)==i.text.length){for(let k of i.markers)m.push(k);if(b&&S)ra(m,t.lineStart-1,t.lineStart);m.push(Xe(I.CodeMark,t.lineStart+i.pos,t.lineStart+w)),t.nextLine();break}else{if(S=!0,!y)ra(m,t.lineStart-1,t.lineStart),b=!1;for(let R of i.markers)m.push(R);let k=t.lineStart+i.basePos,E=t.lineStart+i.text.length;if(k<E)ra(m,k,E),b=!1}}return t.addNode(t.buffer.writeElements(m,-s).finish(I.FencedCode,t.prevLineEnd()-s),s),!0},Blockquote(t,i){let l=gM(i);if(l<0)return!1;return t.startContext(I.Blockquote,i.pos),t.addNode(I.QuoteMark,t.lineStart+i.pos,t.lineStart+i.pos+1),i.moveBase(i.pos+l),null},HorizontalRule(t,i){if($v(i,t,!1)<0)return!1;let l=t.lineStart+i.pos;return t.nextLine(),t.addNode(I.HorizontalRule,l),!0},BulletList(t,i){let l=Pv(i,t,!1);if(l<0)return!1;if(t.block.type!=I.BulletList)t.startContext(I.BulletList,i.basePos,i.next);let s=tM(i,i.pos+1);return t.startContext(I.ListItem,i.basePos,s-i.baseIndent),t.addNode(I.ListMark,t.lineStart+i.pos,t.lineStart+i.pos+l),i.moveBaseColumn(s),null},OrderedList(t,i){let l=Yv(i,t,!1);if(l<0)return!1;if(t.block.type!=I.OrderedList)t.startContext(I.OrderedList,i.basePos,i.text.charCodeAt(i.pos+l-1));let s=tM(i,i.pos+l);return t.startContext(I.ListItem,i.basePos,s-i.baseIndent),t.addNode(I.ListMark,t.lineStart+i.pos,t.lineStart+i.pos+l),i.moveBaseColumn(s),null},ATXHeading(t,i){let l=bM(i);if(l<0)return!1;let s=i.pos,r=t.lineStart+s,c=eM(i.text,i.text.length,s),h=c;while(h>s&&i.text.charCodeAt(h-1)==i.next)h--;if(h==c||h==s||!Ki(i.text.charCodeAt(h-1)))h=i.text.length;let d=t.buffer.write(I.HeaderMark,0,l).writeElements(t.parser.parseInline(i.text.slice(s+l+1,h),r+l+1),-r);if(h<i.text.length)d.write(I.HeaderMark,h-s,c-s);let m=d.finish(I.ATXHeading1-1+l,i.text.length-s);return t.nextLine(),t.addNode(m,r),!0},HTMLBlock(t,i){let l=xM(i,t,!1);if(l<0)return!1;let s=t.lineStart+i.pos,r=qv[l][1],c=[],h=r!=Uv;while(!r.test(i.text)&&t.nextLine()){if(i.depth<t.stack.length){h=!1;break}for(let y of i.markers)c.push(y)}if(h)t.nextLine();let d=r==SM?I.CommentBlock:r==wM?I.ProcessingInstructionBlock:I.HTMLBlock,m=t.prevLineEnd();return t.addNode(t.buffer.writeElements(c,-s).finish(d,m-s),s),!0},SetextHeading:void 0};class kM{constructor(t){this.stage=0,this.elts=[],this.pos=0,this.start=t.start,this.advance(t.content)}nextLine(t,i,l){if(this.stage==-1)return!1;let s=l.content+`
225
+ `+i.scrub(),r=this.advance(s);if(r>-1&&r<s.length)return this.complete(t,l,r);return!1}finish(t,i){if((this.stage==2||this.stage==3)&&fh(i.content,this.pos)==i.content.length)return this.complete(t,i,i.content.length);return!1}complete(t,i,l){return t.addLeafElement(i,Xe(I.LinkReference,this.start,this.start+l,this.elts)),!0}nextStage(t){if(t)return this.pos=t.to-this.start,this.elts.push(t),this.stage++,!0;if(t===!1)this.stage=-1;return!1}advance(t){for(;;)if(this.stage==-1)return-1;else if(this.stage==0){if(!this.nextStage(BM(t,this.pos,this.start,!0)))return-1;if(t.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(Xe(I.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(RM(t,fh(t,this.pos),this.start)))return-1}else if(this.stage==2){let i=fh(t,this.pos),l=0;if(i>this.pos){let s=LM(t,i,this.start);if(s){let r=Nv(t,s.to-this.start);if(r>0)this.nextStage(s),l=r}}if(!l)l=Nv(t,this.pos);return l>0&&l<t.length?l:-1}else return Nv(t,this.pos)}}function Nv(t,i){for(;i<t.length;i++){let l=t.charCodeAt(i);if(l==10)break;if(!Ki(l))return-1}return i}class CM{nextLine(t,i,l){let s=i.depth<t.stack.length?-1:vM(i),r=i.next;if(s<0)return!1;let c=Xe(I.HeaderMark,t.lineStart+i.pos,t.lineStart+s);return t.nextLine(),t.addLeafElement(l,Xe(r==61?I.SetextHeading1:I.SetextHeading2,l.start,t.prevLineEnd(),[...t.parser.parseInline(l.content,l.start),c])),!0}finish(){return!1}}var AM={LinkReference(t,i){return i.content.charCodeAt(0)==91?new kM(i):null},SetextHeading(){return new CM}},Q4=[(t,i)=>bM(i)>=0,(t,i)=>mM(i)>=0,(t,i)=>gM(i)>=0,(t,i)=>Pv(i,t,!0)>=0,(t,i)=>Yv(i,t,!0)>=0,(t,i)=>$v(i,t,!0)>=0,(t,i)=>xM(i,t,!0)>=0],G4={text:"",end:0};class TM{constructor(t,i,l,s){this.parser=t,this.input=i,this.ranges=s,this.line=new dM,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=s[s.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=s[0].from,this.block=wm.create(I.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=l.length?new zM(l,i):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:t}=this;for(;;){for(let l=0;;){let s=t.depth<this.stack.length?this.stack[this.stack.length-1]:null;while(l<t.markers.length&&(!s||t.markers[l].from<s.end)){let r=t.markers[l++];this.addNode(r.type,r.from,r.to)}if(!s)break;this.finishContext()}if(t.pos<t.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(t.basePos))return null;e:for(;;){for(let l of this.parser.blockParsers)if(l){let s=l(this,t);if(s!=!1){if(s==!0)return null;t.forward();continue e}}break}let i=new hM(this.lineStart+t.pos,t.text.slice(t.pos));for(let l of this.parser.leafBlockParsers)if(l){let s=l(this,i);if(s)i.parsers.push(s)}e:while(this.nextLine()){if(t.pos==t.text.length)break;if(t.indent<t.baseIndent+4){for(let l of this.parser.endLeafBlock)if(l(this,t,i))break e}for(let l of i.parsers)if(l.nextLine(this,t,i))return null;i.content+=`
226
+ `+t.scrub();for(let l of t.markers)i.marks.push(l)}return this.finishLeaf(i),null}stopAt(t){if(this.stoppedAt!=null&&this.stoppedAt<t)throw RangeError("Can't move stoppedAt forward");this.stoppedAt=t}reuseFragment(t){if(!this.fragments.moveTo(this.absoluteLineStart+t,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let i=this.fragments.takeNodes(this);if(!i)return!1;if(this.absoluteLineStart+=i,this.lineStart=HM(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to)this.lineStart++,this.absoluteLineStart++,this.readLine();else this.atEnd=!0,this.readLine();return!0}get depth(){return this.stack.length}parentType(t=this.depth-1){return this.parser.nodeSet.types[this.stack[t].type]}nextLine(){if(this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to)return this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1;else return this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){while(this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(t){let i=G4;if(i.end=t,t>=this.to)i.text="";else if(i.text=this.lineChunkAt(t),i.end+=i.text.length,this.ranges.length>1){let l=this.absoluteLineStart,s=this.rangeI;while(this.ranges[s].to<i.end){s++;let r=this.ranges[s].from,c=this.lineChunkAt(r);i.end=r+c.length,i.text=i.text.slice(0,this.ranges[s-1].to-l)+c,l=i.end-i.text.length}}return i}readLine(){let{line:t}=this,{text:i,end:l}=this.scanLine(this.absoluteLineStart);this.absoluteLineEnd=l,t.reset(i);for(;t.depth<this.stack.length;t.depth++){let s=this.stack[t.depth],r=this.parser.skipContextMarkup[s.type];if(!r)throw Error("Unhandled block context "+I[s.type]);let c=this.line.markers.length;if(!r(s,this,t)){if(this.line.markers.length>c)s.end=this.line.markers[this.line.markers.length-1].to;t.forward();break}t.forward()}}lineChunkAt(t){let i=this.input.chunk(t),l;if(!this.input.lineChunks){let s=i.indexOf(`
227
227
  `);l=s<0?i:i.slice(0,s)}else l=i==`
228
- `?"":i;return t+l.length>this.to?l.slice(0,this.to-t):l}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(t,i,l=0){this.block=Sm.create(t,l,this.lineStart+i,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(t,i,l=0){this.startContext(this.parser.getNodeType(t),i,l)}addNode(t,i,l){if(typeof t=="number")t=new Xn(this.parser.nodeSet.types[t],Uu,Uu,(l!==null&&l!==void 0?l:this.prevLineEnd())-i);this.block.addChild(t,i-this.block.from)}addElement(t){this.block.addChild(t.toTree(this.parser.nodeSet),t.from-this.block.from)}addLeafElement(t,i){this.addNode(this.buffer.writeElements(Iv(i.children,t.marks),-i.from).finish(i.type,i.to-i.from),i.from)}finishContext(){let t=this.stack.pop(),i=this.stack[this.stack.length-1];i.addChild(t.toTree(this.parser.nodeSet),t.from-i.from),this.block=i}finish(){while(this.stack.length>1)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(t){return this.ranges.length>1?EM(this.ranges,0,t.topNode,this.ranges[0].from,this.reusePlaceholders):t}finishLeaf(t){for(let l of t.parsers)if(l.finish(this,t))return;let i=Iv(this.parser.parseInline(t.content,t.start),t.marks);this.addNode(this.buffer.writeElements(i,-t.start).finish(j.Paragraph,t.content.length),t.start)}elt(t,i,l,s){if(typeof t=="string")return Xe(this.parser.getNodeType(t),i,l,s);return new Qv(t,i)}get buffer(){return new Xv(this.parser.nodeSet)}}function EM(t,i,l,s,r){let c=t[i].to,h=[],d=[],m=l.from+s;function y(b,S){while(S?b>=c:b>c){let w=t[i+1].from-c;s+=w,b+=w,i++,c=t[i].to}}for(let b=l.firstChild;b;b=b.nextSibling){y(b.from+s,!0);let S=b.from+s,w,k=r.get(b.tree);if(k)w=k;else if(b.to+s>c)w=EM(t,i,b,s,r),y(b.to+s,!1);else w=b.toTree();h.push(w),d.push(S-m)}return y(l.to+s,!1),new Xn(l.type,h,d,l.to+s-m,l.tree?l.tree.propValues:void 0)}class hh extends pm{constructor(t,i,l,s,r,c,h,d,m){super();this.nodeSet=t,this.blockParsers=i,this.leafBlockParsers=l,this.blockNames=s,this.endLeafBlock=r,this.skipContextMarkup=c,this.inlineParsers=h,this.inlineNames=d,this.wrappers=m,this.nodeTypes=Object.create(null);for(let y of t.types)this.nodeTypes[y.name]=y.id}createParse(t,i,l){let s=new TM(this,t,i,l);for(let r of this.wrappers)s=r(s,t,i,l);return s}configure(t){let i=Vv(t);if(!i)return this;let{nodeSet:l,skipContextMarkup:s}=this,r=this.blockParsers.slice(),c=this.leafBlockParsers.slice(),h=this.blockNames.slice(),d=this.inlineParsers.slice(),m=this.inlineNames.slice(),y=this.endLeafBlock.slice(),b=this.wrappers;if(rh(i.defineNodes)){s=Object.assign({},s);let S=l.types.slice(),w;for(let k of i.defineNodes){let{name:E,block:R,composite:L,style:N}=typeof k=="string"?{name:k}:k;if(S.some((ae)=>ae.name==E))continue;if(L)s[S.length]=(ae,ye,nt)=>L(ye,nt,ae.value);let q=S.length,J=L?["Block","BlockContext"]:!R?void 0:q>=j.ATXHeading1&&q<=j.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"];if(S.push(is.define({id:q,name:E,props:J&&[[Qn.group,J]]})),N){if(!w)w={};if(Array.isArray(N)||N instanceof fM)w[E]=N;else Object.assign(w,N)}}if(l=new dm(S),w)l=l.extend(ih(w))}if(rh(i.props))l=l.extend(...i.props);if(rh(i.remove))for(let S of i.remove){let w=this.blockNames.indexOf(S),k=this.inlineNames.indexOf(S);if(w>-1)r[w]=c[w]=void 0;if(k>-1)d[k]=void 0}if(rh(i.parseBlock))for(let S of i.parseBlock){let w=h.indexOf(S.name);if(w>-1)r[w]=S.parse,c[w]=S.leaf;else{let k=S.before?vm(h,S.before):S.after?vm(h,S.after)+1:h.length-1;r.splice(k,0,S.parse),c.splice(k,0,S.leaf),h.splice(k,0,S.name)}if(S.endLeaf)y.push(S.endLeaf)}if(rh(i.parseInline))for(let S of i.parseInline){let w=m.indexOf(S.name);if(w>-1)d[w]=S.parse;else{let k=S.before?vm(m,S.before):S.after?vm(m,S.after)+1:m.length-1;d.splice(k,0,S.parse),m.splice(k,0,S.name)}}if(i.wrap)b=b.concat(i.wrap);return new hh(l,r,c,h,y,s,d,m,b)}getNodeType(t){let i=this.nodeTypes[t];if(i==null)throw RangeError(`Unknown node type '${t}'`);return i}parseInline(t,i){let l=new xm(this,t,i);e:for(let s=i;s<l.end;){let r=l.char(s);for(let c of this.inlineParsers)if(c){let h=c(l,r,s);if(h>=0){s=h;continue e}}s++}return l.resolveMarkers(0)}}function rh(t){return t!=null&&t.length>0}function Vv(t){if(!Array.isArray(t))return t;if(t.length==0)return null;let i=Vv(t[0]);if(t.length==1)return i;let l=Vv(t.slice(1));if(!l||!i)return i||l;let s=(h,d)=>(h||Uu).concat(d||Uu),r=i.wrap,c=l.wrap;return{props:s(i.props,l.props),defineNodes:s(i.defineNodes,l.defineNodes),parseBlock:s(i.parseBlock,l.parseBlock),parseInline:s(i.parseInline,l.parseInline),remove:s(i.remove,l.remove),wrap:!r?c:!c?r:(h,d,m,y)=>r(c(h,d,m,y),d,m,y)}}function vm(t,i){let l=t.indexOf(i);if(l<0)throw RangeError(`Position specified relative to unknown parser ${i}`);return l}var MM=[is.none];for(let t=1,i;i=j[t];t++)MM[t]=is.define({id:t,name:i,props:t>=j.Escape?[]:[[Qn.group,t in pM?["Block","BlockContext"]:["Block","LeafBlock"]]],top:i=="Document"});var Uu=[];class Xv{constructor(t){this.nodeSet=t,this.content=[],this.nodes=[]}write(t,i,l,s=0){return this.content.push(t,i,l,4+s*4),this}writeElements(t,i=0){for(let l of t)l.writeTo(this,i);return this}finish(t,i){return Xn.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:t,length:i})}}class qu{constructor(t,i,l,s=Uu){this.type=t,this.from=i,this.to=l,this.children=s}writeTo(t,i){let l=t.content.length;t.writeElements(this.children,i),t.content.push(this.type,this.from+i,this.to+i,t.content.length+4-l)}toTree(t){return new Xv(t).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}}class Qv{constructor(t,i){this.tree=t,this.from=i}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return Uu}writeTo(t,i){t.nodes.push(this.tree),t.content.push(t.nodes.length-1,this.from+i,this.to+i,-1)}toTree(){return this.tree}}function Xe(t,i,l,s){return new qu(t,i,l,s)}var DM={resolve:"Emphasis",mark:"EmphasisMark"},OM={resolve:"Emphasis",mark:"EmphasisMark"},sr={},wm={};class ai{constructor(t,i,l,s){this.type=t,this.from=i,this.to=l,this.side=s}}var nM="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",fh=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{fh=new RegExp("[\\p{S}|\\p{P}]","u")}catch(t){}var _v={Escape(t,i,l){if(i!=92||l==t.end-1)return-1;let s=t.char(l+1);for(let r=0;r<nM.length;r++)if(nM.charCodeAt(r)==s)return t.append(Xe(j.Escape,l,l+2));return-1},Entity(t,i,l){if(i!=38)return-1;let s=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(t.slice(l+1,l+31));return s?t.append(Xe(j.Entity,l,l+1+s[0].length)):-1},InlineCode(t,i,l){if(i!=96||l&&t.char(l-1)==96)return-1;let s=l+1;while(s<t.end&&t.char(s)==96)s++;let r=s-l,c=0;for(;s<t.end;s++)if(t.char(s)==96){if(c++,c==r&&t.char(s+1)!=96)return t.append(Xe(j.InlineCode,l,s+1,[Xe(j.CodeMark,l,l+r),Xe(j.CodeMark,s+1-r,s+1)]))}else c=0;return-1},HTMLTag(t,i,l){if(i!=60||l==t.end-1)return-1;let s=t.slice(l+1,t.end),r=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(s);if(r)return t.append(Xe(j.Autolink,l,l+1+r[0].length,[Xe(j.LinkMark,l,l+1),Xe(j.URL,l+1,l+r[0].length),Xe(j.LinkMark,l+r[0].length,l+1+r[0].length)]));let c=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(s);if(c)return t.append(Xe(j.Comment,l,l+1+c[0].length));let h=/^\?[^]*?\?>/.exec(s);if(h)return t.append(Xe(j.ProcessingInstruction,l,l+1+h[0].length));let d=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(s);if(!d)return-1;return t.append(Xe(j.HTMLTag,l,l+1+d[0].length))},Emphasis(t,i,l){if(i!=95&&i!=42)return-1;let s=l+1;while(t.char(s)==i)s++;let r=t.slice(l-1,l),c=t.slice(s,s+1),h=fh.test(r),d=fh.test(c),m=/\s|^$/.test(r),y=/\s|^$/.test(c),b=!y&&(!d||m||h),S=!m&&(!h||y||d),w=b&&(i==42||!S||h),k=S&&(i==42||!b||d);return t.append(new ai(i==95?DM:OM,l,s,(w?1:0)|(k?2:0)))},HardBreak(t,i,l){if(i==92&&t.char(l+1)==10)return t.append(Xe(j.HardBreak,l,l+2));if(i==32){let s=l+1;while(t.char(s)==32)s++;if(t.char(s)==10&&s>=l+2)return t.append(Xe(j.HardBreak,l,s+1))}return-1},Link(t,i,l){return i==91?t.append(new ai(sr,l,l+1,1)):-1},Image(t,i,l){return i==33&&t.char(l+1)==91?t.append(new ai(wm,l,l+2,1)):-1},LinkEnd(t,i,l){if(i!=93)return-1;for(let s=t.parts.length-1;s>=0;s--){let r=t.parts[s];if(r instanceof ai&&(r.type==sr||r.type==wm)){if(!r.side||t.skipSpace(r.to)==l&&!/[(\[]/.test(t.slice(l+1,l+2)))return t.parts[s]=null,-1;let c=t.takeContent(s),h=t.parts[s]=G4(t,c,r.type==sr?j.Link:j.Image,r.from,l+1);if(r.type==sr)for(let d=0;d<s;d++){let m=t.parts[d];if(m instanceof ai&&m.type==sr)m.side=0}return h.to}}return-1}};function G4(t,i,l,s,r){let{text:c}=t,h=t.char(r),d=r;if(i.unshift(Xe(j.LinkMark,s,s+(l==j.Image?2:1))),i.push(Xe(j.LinkMark,r-1,r)),h==40){let m=t.skipSpace(r+1),y=RM(c,m-t.offset,t.offset),b;if(y){if(m=t.skipSpace(y.to),m!=y.to){if(b=LM(c,m-t.offset,t.offset),b)m=t.skipSpace(b.to)}}if(t.char(m)==41){if(i.push(Xe(j.LinkMark,r,r+1)),d=m+1,y)i.push(y);if(b)i.push(b);i.push(Xe(j.LinkMark,m,d))}}else if(h==91){let m=BM(c,r-t.offset,t.offset,!1);if(m)i.push(m),d=m.to}return Xe(l,s,d,i)}function RM(t,i,l){if(t.charCodeAt(i)==60){for(let r=i+1;r<t.length;r++){let c=t.charCodeAt(r);if(c==62)return Xe(j.URL,i+l,r+1+l);if(c==60||c==10)return!1}return null}else{let r=0,c=i;for(let h=!1;c<t.length;c++){let d=t.charCodeAt(c);if(eo(d))break;else if(h)h=!1;else if(d==40)r++;else if(d==41){if(!r)break;r--}else if(d==92)h=!0}return c>i?Xe(j.URL,i+l,c+l):c==t.length?null:!1}}function LM(t,i,l){let s=t.charCodeAt(i);if(s!=39&&s!=34&&s!=40)return!1;let r=s==40?41:s;for(let c=i+1,h=!1;c<t.length;c++){let d=t.charCodeAt(c);if(h)h=!1;else if(d==r)return Xe(j.LinkTitle,i+l,c+1+l);else if(d==92)h=!0}return null}function BM(t,i,l,s){for(let r=!1,c=i+1,h=Math.min(t.length,c+999);c<h;c++){let d=t.charCodeAt(c);if(r)r=!1;else if(d==93)return s?!1:Xe(j.LinkLabel,i+l,c+1+l);else{if(s&&!eo(d))s=!1;if(d==91)return!1;else if(d==92)r=!0}}return null}class xm{constructor(t,i,l){this.parser=t,this.text=i,this.offset=l,this.parts=[]}char(t){return t>=this.end?-1:this.text.charCodeAt(t-this.offset)}get end(){return this.offset+this.text.length}slice(t,i){return this.text.slice(t-this.offset,i-this.offset)}append(t){return this.parts.push(t),t.to}addDelimiter(t,i,l,s,r){return this.append(new ai(t,i,l,(s?1:0)|(r?2:0)))}get hasOpenLink(){for(let t=this.parts.length-1;t>=0;t--){let i=this.parts[t];if(i instanceof ai&&(i.type==sr||i.type==wm))return!0}return!1}addElement(t){return this.append(t)}resolveMarkers(t){for(let l=t;l<this.parts.length;l++){let s=this.parts[l];if(!(s instanceof ai&&s.type.resolve&&s.side&2))continue;let r=s.type==DM||s.type==OM,c=s.to-s.from,h,d=l-1;for(;d>=t;d--){let E=this.parts[d];if(E instanceof ai&&E.side&1&&E.type==s.type&&!(r&&(s.side&1||E.side&2)&&(E.to-E.from+c)%3==0&&((E.to-E.from)%3||c%3))){h=E;break}}if(!h)continue;let m=s.type.resolve,y=[],b=h.from,S=s.to;if(r){let E=Math.min(2,h.to-h.from,c);b=h.to-E,S=s.from+E,m=E==1?"Emphasis":"StrongEmphasis"}if(h.type.mark)y.push(this.elt(h.type.mark,b,h.to));for(let E=d+1;E<l;E++){if(this.parts[E]instanceof qu)y.push(this.parts[E]);this.parts[E]=null}if(s.type.mark)y.push(this.elt(s.type.mark,s.from,S));let w=this.elt(m,b,S,y);if(this.parts[d]=r&&h.from!=b?new ai(h.type,h.from,b,h.side):null,this.parts[l]=r&&s.to!=S?new ai(s.type,S,s.to,s.side):null)this.parts.splice(l,0,w);else this.parts[l]=w}let i=[];for(let l=t;l<this.parts.length;l++){let s=this.parts[l];if(s instanceof qu)i.push(s)}return i}findOpeningDelimiter(t){for(let i=this.parts.length-1;i>=0;i--){let l=this.parts[i];if(l instanceof ai&&l.type==t&&l.side&1)return i}return null}takeContent(t){let i=this.resolveMarkers(t);return this.parts.length=t,i}getDelimiterAt(t){let i=this.parts[t];return i instanceof ai?i:null}skipSpace(t){return uh(this.text,t-this.offset)+this.offset}elt(t,i,l,s){if(typeof t=="string")return Xe(this.parser.getNodeType(t),i,l,s);return new Qv(t,i)}}xm.linkStart=sr;xm.imageStart=wm;function Iv(t,i){if(!i.length)return t;if(!t.length)return i;let l=t.slice(),s=0;for(let r of i){while(s<l.length&&l[s].to<r.to)s++;if(s<l.length&&l[s].from<r.from){let c=l[s];if(c instanceof qu)l[s]=new qu(c.type,c.from,c.to,Iv(c.children,[r]))}else l.splice(s++,0,r)}return l}var W4=[j.CodeBlock,j.ListItem,j.OrderedList,j.BulletList];class zM{constructor(t,i){if(this.fragments=t,this.input=i,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,t.length)this.fragment=t[this.i++]}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(t,i){while(this.fragment&&this.fragment.to<=t)this.nextFragment();if(!this.fragment||this.fragment.from>(t?t-1:0))return!1;if(this.fragmentEnd<0){let r=this.fragment.to;while(r>0&&this.input.read(r-1,r)!=`
229
- `)r--;this.fragmentEnd=r?r-1:0}let l=this.cursor;if(!l)l=this.cursor=this.fragment.tree.cursor(),l.firstChild();let s=t+this.fragment.offset;while(l.to<=s)if(!l.parent())return!1;for(;;){if(l.from>=s)return this.fragment.from<=i;if(!l.childAfter(s))return!1}}matches(t){let i=this.cursor.tree;return i&&i.prop(Qn.contextHash)==t}takeNodes(t){let i=this.cursor,l=this.fragment.offset,s=this.fragmentEnd-(this.fragment.openEnd?1:0),r=t.absoluteLineStart,c=r,h=t.block.children.length,d=c,m=h;for(;;){if(i.to-l>s){if(i.type.isAnonymous&&i.firstChild())continue;break}let y=HM(i.from-l,t.ranges);if(i.to-l<=t.ranges[t.rangeI].to)t.addNode(i.tree,y);else{let b=new Xn(t.parser.nodeSet.types[j.Paragraph],[],[],0,t.block.hashProp);t.reusePlaceholders.set(b,i.tree),t.addNode(b,y)}if(i.type.is("Block")){if(W4.indexOf(i.type.id)<0)c=i.to-l,h=t.block.children.length;else c=d,h=m;d=i.to-l,m=t.block.children.length}if(!i.nextSibling())break}while(t.block.children.length>h)t.block.children.pop(),t.block.positions.pop();return c-r}}function HM(t,i){let l=t;for(let s=1;s<i.length;s++){let r=i[s-1].to,c=i[s].from;if(r<t)l-=c-r}return l}var F4=ih({"Blockquote/...":Q.quote,HorizontalRule:Q.contentSeparator,"ATXHeading1/... SetextHeading1/...":Q.heading1,"ATXHeading2/... SetextHeading2/...":Q.heading2,"ATXHeading3/...":Q.heading3,"ATXHeading4/...":Q.heading4,"ATXHeading5/...":Q.heading5,"ATXHeading6/...":Q.heading6,"Comment CommentBlock":Q.comment,Escape:Q.escape,Entity:Q.character,"Emphasis/...":Q.emphasis,"StrongEmphasis/...":Q.strong,"Link/... Image/...":Q.link,"OrderedList/... BulletList/...":Q.list,"BlockQuote/...":Q.quote,"InlineCode CodeText":Q.monospace,"URL Autolink":Q.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":Q.processingInstruction,"CodeInfo LinkLabel":Q.labelName,LinkTitle:Q.string,Paragraph:Q.content}),NM=new hh(new dm(MM).extend(F4),Object.keys(bm).map((t)=>bm[t]),Object.keys(bm).map((t)=>AM[t]),Object.keys(bm),X4,pM,Object.keys(_v).map((t)=>_v[t]),Object.keys(_v),[]);function J4(t,i,l){let s=[];for(let r=t.firstChild,c=i;;r=r.nextSibling){let h=r?r.from:l;if(h>c)s.push({from:c,to:h});if(!r)break;c=r.to}return s}function _M(t){let{codeParser:i,htmlParser:l}=t;return{wrap:cM((r,c)=>{let h=r.type.id;if(i&&(h==j.CodeBlock||h==j.FencedCode)){let d="";if(h==j.FencedCode){let y=r.node.getChild(j.CodeInfo);if(y)d=c.read(y.from,y.to)}let m=i(d);if(m)return{parser:m,overlay:(y)=>y.type.id==j.CodeText,bracketed:h==j.FencedCode}}else if(l&&(h==j.HTMLBlock||h==j.HTMLTag||h==j.CommentBlock))return{parser:l,overlay:J4(r.node,r.from,r.to)};return null})}}var Z4={resolve:"Strikethrough",mark:"StrikethroughMark"},K4={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":Q.strikethrough}},{name:"StrikethroughMark",style:Q.processingInstruction}],parseInline:[{name:"Strikethrough",parse(t,i,l){if(i!=126||t.char(l+1)!=126||t.char(l+2)==126)return-1;let s=t.slice(l-1,l),r=t.slice(l+2,l+3),c=/\s|^$/.test(s),h=/\s|^$/.test(r),d=fh.test(s),m=fh.test(r);return t.addDelimiter(Z4,l,l+2,!h&&(!m||c||d),!c&&(!d||h||m))},after:"Emphasis"}]};function ch(t,i,l=0,s,r=0){let c=0,h=!0,d=-1,m=-1,y=!1,b=()=>{s.push(t.elt("TableCell",r+d,r+m,t.parser.parseInline(i.slice(d,m),r+d)))};for(let S=l;S<i.length;S++){let w=i.charCodeAt(S);if(w==124&&!y){if(!h||d>-1)c++;if(h=!1,s){if(d>-1)b();s.push(t.elt("TableDelimiter",S+r,S+r+1))}d=m=-1}else if(y||w!=32&&w!=9){if(d<0)d=S;m=S+1}y=!y&&w==92}if(d>-1){if(c++,s)b()}return c}function iM(t,i){for(let l=i;l<t.length;l++){let s=t.charCodeAt(l);if(s==124)return!0;if(s==92)l++}return!1}var UM=/^[>\s]*\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class jv{constructor(){this.rows=null}nextLine(t,i,l){if(this.rows==null){this.rows=!1;let s;if((i.next==45||i.next==58||i.next==124)&&UM.test(s=i.text.slice(i.pos))){let r=[];if(ch(t,l.content,0,r,l.start)==ch(t,s,0))this.rows=[t.elt("TableHeader",l.start,l.start+l.content.length,r),t.elt("TableDelimiter",t.lineStart+i.pos,t.lineStart+i.text.length)]}}else if(this.rows){let s=[];ch(t,i.text,i.pos,s,t.lineStart),this.rows.push(t.elt("TableRow",t.lineStart+i.pos,t.lineStart+i.text.length,s))}return!1}finish(t,i){if(!this.rows)return!1;return t.addLeafElement(i,t.elt("Table",i.start,i.start+i.content.length,this.rows)),!0}}var eH={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":Q.heading}},"TableRow",{name:"TableCell",style:Q.content},{name:"TableDelimiter",style:Q.processingInstruction}],parseBlock:[{name:"Table",leaf(t,i){return iM(i.content,0)?new jv:null},endLeaf(t,i,l){if(l.parsers.some((r)=>r instanceof jv)||!iM(i.text,i.basePos))return!1;let s=t.peekLine();return UM.test(s)&&ch(t,i.text,i.basePos)==ch(t,s,i.basePos)},before:"SetextHeading"}]};class qM{nextLine(){return!1}finish(t,i){return t.addLeafElement(i,t.elt("Task",i.start,i.start+i.content.length,[t.elt("TaskMarker",i.start,i.start+3),...t.parser.parseInline(i.content.slice(3),i.start+3)])),!0}}var tH={defineNodes:[{name:"Task",block:!0,style:Q.list},{name:"TaskMarker",style:Q.atom}],parseBlock:[{name:"TaskList",leaf(t,i){return/^\[[ xX]\][ \t]/.test(i.content)&&t.parentType().name=="ListItem"?new qM:null},after:"SetextHeading"}]},oM=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,lM=/[\w-]+(\.[\w-]+)+(:\d+)?(\/[^\s<]*)?/gy,nH=/[\w-]+\.[\w-]+($|[/:])/,sM=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,aM=/\/[a-zA-Z\d@.]+/gy;function rM(t,i,l,s){let r=0;for(let c=i;c<l;c++)if(t[c]==s)r++;return r}function iH(t,i){lM.lastIndex=i;let l=lM.exec(t);if(!l||nH.exec(l[0])[0].indexOf("_")>-1)return-1;let s=i+l[0].length;for(;;){let r=t[s-1],c;if(/[?!.,:*_~]/.test(r)||r==")"&&rM(t,i,s,")")>rM(t,i,s,"("))s--;else if(r==";"&&(c=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(t.slice(i,s))))s=i+c.index;else break}return s}function uM(t,i){sM.lastIndex=i;let l=sM.exec(t);if(!l)return-1;let s=l[0][l[0].length-1];return s=="_"||s=="-"?-1:i+l[0].length-(s=="."?1:0)}var oH={parseInline:[{name:"Autolink",parse(t,i,l){let s=l-t.offset;if(s&&/\w/.test(t.text[s-1]))return-1;oM.lastIndex=s;let r=oM.exec(t.text),c=-1;if(!r)return-1;if(r[1]||r[2]){if(c=iH(t.text,s+r[0].length),c>-1&&t.hasOpenLink){let h=/([^\[\]]|\[[^\]]*\])*/.exec(t.text.slice(s,c));c=s+h[0].length}}else if(r[3])c=uM(t.text,s);else if(c=uM(t.text,s+r[0].length),c>-1&&r[0]=="xmpp:"){if(aM.lastIndex=c,r=aM.exec(t.text),r)c=r.index+r[0].length}if(c<0)return-1;return t.addElement(t.elt("URL",l,c+t.offset)),c+t.offset}}]},VM=[eH,tH,K4,oH];function IM(t,i,l){return(s,r,c)=>{if(r!=t||s.char(c+1)==t)return-1;let h=[s.elt(l,c,c+1)];for(let d=c+1;d<s.end;d++){let m=s.char(d);if(m==t)return s.addElement(s.elt(i,c,d+1,h.concat(s.elt(l,d,d+1))));if(m==92)h.push(s.elt("Escape",d,d+++2));if(eo(m))break}return-1}}var jM={defineNodes:[{name:"Superscript",style:Q.special(Q.content)},{name:"SuperscriptMark",style:Q.processingInstruction}],parseInline:[{name:"Superscript",parse:IM(94,"Superscript","SuperscriptMark")}]},$M={defineNodes:[{name:"Subscript",style:Q.special(Q.content)},{name:"SubscriptMark",style:Q.processingInstruction}],parseInline:[{name:"Subscript",parse:IM(126,"Subscript","SubscriptMark")}]},PM={defineNodes:[{name:"Emoji",style:Q.character}],parseInline:[{name:"Emoji",parse(t,i,l){let s;if(i!=58||!(s=/^[a-zA-Z_0-9]+:/.exec(t.slice(l+1,t.end))))return-1;return t.addElement(t.elt("Emoji",l,l+1+s[0].length))}}]};var Gv=null;function Wv(){if(!Gv&&typeof document=="object"&&document.body){let{style:t}=document.body,i=[],l=new Set;for(let s in t)if(s!="cssText"&&s!="cssFloat"){if(typeof t[s]=="string"){if(/[A-Z]/.test(s))s=s.replace(/[A-Z]/g,(r)=>"-"+r.toLowerCase());if(!l.has(s))i.push(s),l.add(s)}}Gv=i.sort().map((s)=>({type:"property",label:s,apply:s+": "}))}return Gv||[]}var YM=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map((t)=>({type:"class",label:t})),XM=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map((t)=>({type:"keyword",label:t})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map((t)=>({type:"constant",label:t}))),lH=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map((t)=>({type:"type",label:t})),sH=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map((t)=>({type:"keyword",label:t})),ls=/^(\w[\w-]*|-\w[\w-]*|)$/,aH=/^-(-[\w-]*)?$/;function rH(t,i){var l;if(t.name=="("||t.type.isError)t=t.parent||t;if(t.name!="ArgList")return!1;let s=(l=t.parent)===null||l===void 0?void 0:l.firstChild;if((s===null||s===void 0?void 0:s.name)!="Callee")return!1;return i.sliceString(s.from,s.to)=="var"}var QM=new km,uH=["Declaration"];function cH(t){for(let i=t;;){if(i.type.isTop)return i;if(!(i=i.parent))return t}}function WM(t,i,l){if(i.to-i.from>4096){let s=QM.get(i);if(s)return s;let r=[],c=new Set,h=i.cursor(lr.IncludeAnonymous);if(h.firstChild())do for(let d of WM(t,h.node,l))if(!c.has(d.label))c.add(d.label),r.push(d);while(h.nextSibling());return QM.set(i,r),r}else{let s=[],r=new Set;return i.cursor().iterate((c)=>{var h;if(l(c)&&c.matchContext(uH)&&((h=c.node.nextSibling)===null||h===void 0?void 0:h.name)==":"){let d=t.sliceString(c.from,c.to);if(!r.has(d))r.add(d),s.push({label:d,type:"variable"})}}),s}}var fH=(t)=>(i)=>{let{state:l,pos:s}=i,r=jt(l).resolveInner(s,-1),c=r.type.isError&&r.from==r.to-1&&l.doc.sliceString(r.from,r.to)=="-";if(r.name=="PropertyName"||(c||r.name=="TagName")&&/^(Block|Styles)$/.test(r.resolve(r.to).name))return{from:r.from,options:Wv(),validFor:ls};if(r.name=="ValueName")return{from:r.from,options:XM,validFor:ls};if(r.name=="PseudoClassName")return{from:r.from,options:YM,validFor:ls};if(t(r)||(i.explicit||c)&&rH(r,l.doc))return{from:t(r)||c?r.from:s,options:WM(l.doc,cH(r),t),validFor:aH};if(r.name=="TagName"){for(let{parent:m}=r;m;m=m.parent)if(m.name=="Block")return{from:r.from,options:Wv(),validFor:ls};return{from:r.from,options:lH,validFor:ls}}if(r.name=="AtKeyword")return{from:r.from,options:sH,validFor:ls};if(!i.explicit)return null;let h=r.resolve(s),d=h.childBefore(s);if(d&&d.name==":"&&h.name=="PseudoClassSelector")return{from:s,options:YM,validFor:ls};if(d&&d.name==":"&&h.name=="Declaration"||h.name=="ArgList")return{from:s,options:XM,validFor:ls};if(h.name=="Block"||h.name=="Styles")return{from:s,options:Wv(),validFor:ls};return null},hH=fH((t)=>t.name=="VariableName"),dh=ns.define({name:"css",parser:GM.configure({props:[oa.add({Declaration:Hu()}),os.add({"Block KeyframeList":ym})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function FM(){return new pl(dh,dh.data.of({autocomplete:hH}))}var tD=[Gn("function ${name}(${params}) {\n\t${}\n}",{label:"function",detail:"definition",type:"keyword"}),Gn("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n\t${}\n}",{label:"for",detail:"loop",type:"keyword"}),Gn("for (let ${name} of ${collection}) {\n\t${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Gn("do {\n\t${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Gn("while (${}) {\n\t${}\n}",{label:"while",detail:"loop",type:"keyword"}),Gn(`try {
228
+ `?"":i;return t+l.length>this.to?l.slice(0,this.to-t):l}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(t,i,l=0){this.block=wm.create(t,l,this.lineStart+i,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(t,i,l=0){this.startContext(this.parser.getNodeType(t),i,l)}addNode(t,i,l){if(typeof t=="number")t=new Yn(this.parser.nodeSet.types[t],ju,ju,(l!==null&&l!==void 0?l:this.prevLineEnd())-i);this.block.addChild(t,i-this.block.from)}addElement(t){this.block.addChild(t.toTree(this.parser.nodeSet),t.from-this.block.from)}addLeafElement(t,i){this.addNode(this.buffer.writeElements(jv(i.children,t.marks),-i.from).finish(i.type,i.to-i.from),i.from)}finishContext(){let t=this.stack.pop(),i=this.stack[this.stack.length-1];i.addChild(t.toTree(this.parser.nodeSet),t.from-i.from),this.block=i}finish(){while(this.stack.length>1)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(t){return this.ranges.length>1?EM(this.ranges,0,t.topNode,this.ranges[0].from,this.reusePlaceholders):t}finishLeaf(t){for(let l of t.parsers)if(l.finish(this,t))return;let i=jv(this.parser.parseInline(t.content,t.start),t.marks);this.addNode(this.buffer.writeElements(i,-t.start).finish(I.Paragraph,t.content.length),t.start)}elt(t,i,l,s){if(typeof t=="string")return Xe(this.parser.getNodeType(t),i,l,s);return new Qv(t,i)}get buffer(){return new Xv(this.parser.nodeSet)}}function EM(t,i,l,s,r){let c=t[i].to,h=[],d=[],m=l.from+s;function y(b,S){while(S?b>=c:b>c){let w=t[i+1].from-c;s+=w,b+=w,i++,c=t[i].to}}for(let b=l.firstChild;b;b=b.nextSibling){y(b.from+s,!0);let S=b.from+s,w,k=r.get(b.tree);if(k)w=k;else if(b.to+s>c)w=EM(t,i,b,s,r),y(b.to+s,!1);else w=b.toTree();h.push(w),d.push(S-m)}return y(l.to+s,!1),new Yn(l.type,h,d,l.to+s-m,l.tree?l.tree.propValues:void 0)}class ph extends mm{constructor(t,i,l,s,r,c,h,d,m){super();this.nodeSet=t,this.blockParsers=i,this.leafBlockParsers=l,this.blockNames=s,this.endLeafBlock=r,this.skipContextMarkup=c,this.inlineParsers=h,this.inlineNames=d,this.wrappers=m,this.nodeTypes=Object.create(null);for(let y of t.types)this.nodeTypes[y.name]=y.id}createParse(t,i,l){let s=new TM(this,t,i,l);for(let r of this.wrappers)s=r(s,t,i,l);return s}configure(t){let i=Vv(t);if(!i)return this;let{nodeSet:l,skipContextMarkup:s}=this,r=this.blockParsers.slice(),c=this.leafBlockParsers.slice(),h=this.blockNames.slice(),d=this.inlineParsers.slice(),m=this.inlineNames.slice(),y=this.endLeafBlock.slice(),b=this.wrappers;if(ch(i.defineNodes)){s=Object.assign({},s);let S=l.types.slice(),w;for(let k of i.defineNodes){let{name:E,block:R,composite:L,style:N}=typeof k=="string"?{name:k}:k;if(S.some((ae)=>ae.name==E))continue;if(L)s[S.length]=(ae,ye,nt)=>L(ye,nt,ae.value);let q=S.length,J=L?["Block","BlockContext"]:!R?void 0:q>=I.ATXHeading1&&q<=I.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"];if(S.push(os.define({id:q,name:E,props:J&&[[Xn.group,J]]})),N){if(!w)w={};if(Array.isArray(N)||N instanceof fM)w[E]=N;else Object.assign(w,N)}}if(l=new pm(S),w)l=l.extend(lh(w))}if(ch(i.props))l=l.extend(...i.props);if(ch(i.remove))for(let S of i.remove){let w=this.blockNames.indexOf(S),k=this.inlineNames.indexOf(S);if(w>-1)r[w]=c[w]=void 0;if(k>-1)d[k]=void 0}if(ch(i.parseBlock))for(let S of i.parseBlock){let w=h.indexOf(S.name);if(w>-1)r[w]=S.parse,c[w]=S.leaf;else{let k=S.before?Sm(h,S.before):S.after?Sm(h,S.after)+1:h.length-1;r.splice(k,0,S.parse),c.splice(k,0,S.leaf),h.splice(k,0,S.name)}if(S.endLeaf)y.push(S.endLeaf)}if(ch(i.parseInline))for(let S of i.parseInline){let w=m.indexOf(S.name);if(w>-1)d[w]=S.parse;else{let k=S.before?Sm(m,S.before):S.after?Sm(m,S.after)+1:m.length-1;d.splice(k,0,S.parse),m.splice(k,0,S.name)}}if(i.wrap)b=b.concat(i.wrap);return new ph(l,r,c,h,y,s,d,m,b)}getNodeType(t){let i=this.nodeTypes[t];if(i==null)throw RangeError(`Unknown node type '${t}'`);return i}parseInline(t,i){let l=new km(this,t,i);e:for(let s=i;s<l.end;){let r=l.char(s);for(let c of this.inlineParsers)if(c){let h=c(l,r,s);if(h>=0){s=h;continue e}}s++}return l.resolveMarkers(0)}}function ch(t){return t!=null&&t.length>0}function Vv(t){if(!Array.isArray(t))return t;if(t.length==0)return null;let i=Vv(t[0]);if(t.length==1)return i;let l=Vv(t.slice(1));if(!l||!i)return i||l;let s=(h,d)=>(h||ju).concat(d||ju),r=i.wrap,c=l.wrap;return{props:s(i.props,l.props),defineNodes:s(i.defineNodes,l.defineNodes),parseBlock:s(i.parseBlock,l.parseBlock),parseInline:s(i.parseInline,l.parseInline),remove:s(i.remove,l.remove),wrap:!r?c:!c?r:(h,d,m,y)=>r(c(h,d,m,y),d,m,y)}}function Sm(t,i){let l=t.indexOf(i);if(l<0)throw RangeError(`Position specified relative to unknown parser ${i}`);return l}var MM=[os.none];for(let t=1,i;i=I[t];t++)MM[t]=os.define({id:t,name:i,props:t>=I.Escape?[]:[[Xn.group,t in pM?["Block","BlockContext"]:["Block","LeafBlock"]]],top:i=="Document"});var ju=[];class Xv{constructor(t){this.nodeSet=t,this.content=[],this.nodes=[]}write(t,i,l,s=0){return this.content.push(t,i,l,4+s*4),this}writeElements(t,i=0){for(let l of t)l.writeTo(this,i);return this}finish(t,i){return Yn.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:t,length:i})}}class Iu{constructor(t,i,l,s=ju){this.type=t,this.from=i,this.to=l,this.children=s}writeTo(t,i){let l=t.content.length;t.writeElements(this.children,i),t.content.push(this.type,this.from+i,this.to+i,t.content.length+4-l)}toTree(t){return new Xv(t).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}}class Qv{constructor(t,i){this.tree=t,this.from=i}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return ju}writeTo(t,i){t.nodes.push(this.tree),t.content.push(t.nodes.length-1,this.from+i,this.to+i,-1)}toTree(){return this.tree}}function Xe(t,i,l,s){return new Iu(t,i,l,s)}var DM={resolve:"Emphasis",mark:"EmphasisMark"},OM={resolve:"Emphasis",mark:"EmphasisMark"},fr={},xm={};class si{constructor(t,i,l,s){this.type=t,this.from=i,this.to=l,this.side=s}}var nM="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",dh=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{dh=new RegExp("[\\p{S}|\\p{P}]","u")}catch(t){}var _v={Escape(t,i,l){if(i!=92||l==t.end-1)return-1;let s=t.char(l+1);for(let r=0;r<nM.length;r++)if(nM.charCodeAt(r)==s)return t.append(Xe(I.Escape,l,l+2));return-1},Entity(t,i,l){if(i!=38)return-1;let s=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(t.slice(l+1,l+31));return s?t.append(Xe(I.Entity,l,l+1+s[0].length)):-1},InlineCode(t,i,l){if(i!=96||l&&t.char(l-1)==96)return-1;let s=l+1;while(s<t.end&&t.char(s)==96)s++;let r=s-l,c=0;for(;s<t.end;s++)if(t.char(s)==96){if(c++,c==r&&t.char(s+1)!=96)return t.append(Xe(I.InlineCode,l,s+1,[Xe(I.CodeMark,l,l+r),Xe(I.CodeMark,s+1-r,s+1)]))}else c=0;return-1},HTMLTag(t,i,l){if(i!=60||l==t.end-1)return-1;let s=t.slice(l+1,t.end),r=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(s);if(r)return t.append(Xe(I.Autolink,l,l+1+r[0].length,[Xe(I.LinkMark,l,l+1),Xe(I.URL,l+1,l+r[0].length),Xe(I.LinkMark,l+r[0].length,l+1+r[0].length)]));let c=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(s);if(c)return t.append(Xe(I.Comment,l,l+1+c[0].length));let h=/^\?[^]*?\?>/.exec(s);if(h)return t.append(Xe(I.ProcessingInstruction,l,l+1+h[0].length));let d=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(s);if(!d)return-1;return t.append(Xe(I.HTMLTag,l,l+1+d[0].length))},Emphasis(t,i,l){if(i!=95&&i!=42)return-1;let s=l+1;while(t.char(s)==i)s++;let r=t.slice(l-1,l),c=t.slice(s,s+1),h=dh.test(r),d=dh.test(c),m=/\s|^$/.test(r),y=/\s|^$/.test(c),b=!y&&(!d||m||h),S=!m&&(!h||y||d),w=b&&(i==42||!S||h),k=S&&(i==42||!b||d);return t.append(new si(i==95?DM:OM,l,s,(w?1:0)|(k?2:0)))},HardBreak(t,i,l){if(i==92&&t.char(l+1)==10)return t.append(Xe(I.HardBreak,l,l+2));if(i==32){let s=l+1;while(t.char(s)==32)s++;if(t.char(s)==10&&s>=l+2)return t.append(Xe(I.HardBreak,l,s+1))}return-1},Link(t,i,l){return i==91?t.append(new si(fr,l,l+1,1)):-1},Image(t,i,l){return i==33&&t.char(l+1)==91?t.append(new si(xm,l,l+2,1)):-1},LinkEnd(t,i,l){if(i!=93)return-1;for(let s=t.parts.length-1;s>=0;s--){let r=t.parts[s];if(r instanceof si&&(r.type==fr||r.type==xm)){if(!r.side||t.skipSpace(r.to)==l&&!/[(\[]/.test(t.slice(l+1,l+2)))return t.parts[s]=null,-1;let c=t.takeContent(s),h=t.parts[s]=W4(t,c,r.type==fr?I.Link:I.Image,r.from,l+1);if(r.type==fr)for(let d=0;d<s;d++){let m=t.parts[d];if(m instanceof si&&m.type==fr)m.side=0}return h.to}}return-1}};function W4(t,i,l,s,r){let{text:c}=t,h=t.char(r),d=r;if(i.unshift(Xe(I.LinkMark,s,s+(l==I.Image?2:1))),i.push(Xe(I.LinkMark,r-1,r)),h==40){let m=t.skipSpace(r+1),y=RM(c,m-t.offset,t.offset),b;if(y){if(m=t.skipSpace(y.to),m!=y.to){if(b=LM(c,m-t.offset,t.offset),b)m=t.skipSpace(b.to)}}if(t.char(m)==41){if(i.push(Xe(I.LinkMark,r,r+1)),d=m+1,y)i.push(y);if(b)i.push(b);i.push(Xe(I.LinkMark,m,d))}}else if(h==91){let m=BM(c,r-t.offset,t.offset,!1);if(m)i.push(m),d=m.to}return Xe(l,s,d,i)}function RM(t,i,l){if(t.charCodeAt(i)==60){for(let r=i+1;r<t.length;r++){let c=t.charCodeAt(r);if(c==62)return Xe(I.URL,i+l,r+1+l);if(c==60||c==10)return!1}return null}else{let r=0,c=i;for(let h=!1;c<t.length;c++){let d=t.charCodeAt(c);if(Ki(d))break;else if(h)h=!1;else if(d==40)r++;else if(d==41){if(!r)break;r--}else if(d==92)h=!0}return c>i?Xe(I.URL,i+l,c+l):c==t.length?null:!1}}function LM(t,i,l){let s=t.charCodeAt(i);if(s!=39&&s!=34&&s!=40)return!1;let r=s==40?41:s;for(let c=i+1,h=!1;c<t.length;c++){let d=t.charCodeAt(c);if(h)h=!1;else if(d==r)return Xe(I.LinkTitle,i+l,c+1+l);else if(d==92)h=!0}return null}function BM(t,i,l,s){for(let r=!1,c=i+1,h=Math.min(t.length,c+999);c<h;c++){let d=t.charCodeAt(c);if(r)r=!1;else if(d==93)return s?!1:Xe(I.LinkLabel,i+l,c+1+l);else{if(s&&!Ki(d))s=!1;if(d==91)return!1;else if(d==92)r=!0}}return null}class km{constructor(t,i,l){this.parser=t,this.text=i,this.offset=l,this.parts=[]}char(t){return t>=this.end?-1:this.text.charCodeAt(t-this.offset)}get end(){return this.offset+this.text.length}slice(t,i){return this.text.slice(t-this.offset,i-this.offset)}append(t){return this.parts.push(t),t.to}addDelimiter(t,i,l,s,r){return this.append(new si(t,i,l,(s?1:0)|(r?2:0)))}get hasOpenLink(){for(let t=this.parts.length-1;t>=0;t--){let i=this.parts[t];if(i instanceof si&&(i.type==fr||i.type==xm))return!0}return!1}addElement(t){return this.append(t)}resolveMarkers(t){for(let l=t;l<this.parts.length;l++){let s=this.parts[l];if(!(s instanceof si&&s.type.resolve&&s.side&2))continue;let r=s.type==DM||s.type==OM,c=s.to-s.from,h,d=l-1;for(;d>=t;d--){let E=this.parts[d];if(E instanceof si&&E.side&1&&E.type==s.type&&!(r&&(s.side&1||E.side&2)&&(E.to-E.from+c)%3==0&&((E.to-E.from)%3||c%3))){h=E;break}}if(!h)continue;let m=s.type.resolve,y=[],b=h.from,S=s.to;if(r){let E=Math.min(2,h.to-h.from,c);b=h.to-E,S=s.from+E,m=E==1?"Emphasis":"StrongEmphasis"}if(h.type.mark)y.push(this.elt(h.type.mark,b,h.to));for(let E=d+1;E<l;E++){if(this.parts[E]instanceof Iu)y.push(this.parts[E]);this.parts[E]=null}if(s.type.mark)y.push(this.elt(s.type.mark,s.from,S));let w=this.elt(m,b,S,y);if(this.parts[d]=r&&h.from!=b?new si(h.type,h.from,b,h.side):null,this.parts[l]=r&&s.to!=S?new si(s.type,S,s.to,s.side):null)this.parts.splice(l,0,w);else this.parts[l]=w}let i=[];for(let l=t;l<this.parts.length;l++){let s=this.parts[l];if(s instanceof Iu)i.push(s)}return i}findOpeningDelimiter(t){for(let i=this.parts.length-1;i>=0;i--){let l=this.parts[i];if(l instanceof si&&l.type==t&&l.side&1)return i}return null}takeContent(t){let i=this.resolveMarkers(t);return this.parts.length=t,i}getDelimiterAt(t){let i=this.parts[t];return i instanceof si?i:null}skipSpace(t){return fh(this.text,t-this.offset)+this.offset}elt(t,i,l,s){if(typeof t=="string")return Xe(this.parser.getNodeType(t),i,l,s);return new Qv(t,i)}}km.linkStart=fr;km.imageStart=xm;function jv(t,i){if(!i.length)return t;if(!t.length)return i;let l=t.slice(),s=0;for(let r of i){while(s<l.length&&l[s].to<r.to)s++;if(s<l.length&&l[s].from<r.from){let c=l[s];if(c instanceof Iu)l[s]=new Iu(c.type,c.from,c.to,jv(c.children,[r]))}else l.splice(s++,0,r)}return l}var F4=[I.CodeBlock,I.ListItem,I.OrderedList,I.BulletList];class zM{constructor(t,i){if(this.fragments=t,this.input=i,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,t.length)this.fragment=t[this.i++]}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(t,i){while(this.fragment&&this.fragment.to<=t)this.nextFragment();if(!this.fragment||this.fragment.from>(t?t-1:0))return!1;if(this.fragmentEnd<0){let r=this.fragment.to;while(r>0&&this.input.read(r-1,r)!=`
229
+ `)r--;this.fragmentEnd=r?r-1:0}let l=this.cursor;if(!l)l=this.cursor=this.fragment.tree.cursor(),l.firstChild();let s=t+this.fragment.offset;while(l.to<=s)if(!l.parent())return!1;for(;;){if(l.from>=s)return this.fragment.from<=i;if(!l.childAfter(s))return!1}}matches(t){let i=this.cursor.tree;return i&&i.prop(Xn.contextHash)==t}takeNodes(t){let i=this.cursor,l=this.fragment.offset,s=this.fragmentEnd-(this.fragment.openEnd?1:0),r=t.absoluteLineStart,c=r,h=t.block.children.length,d=c,m=h;for(;;){if(i.to-l>s){if(i.type.isAnonymous&&i.firstChild())continue;break}let y=HM(i.from-l,t.ranges);if(i.to-l<=t.ranges[t.rangeI].to)t.addNode(i.tree,y);else{let b=new Yn(t.parser.nodeSet.types[I.Paragraph],[],[],0,t.block.hashProp);t.reusePlaceholders.set(b,i.tree),t.addNode(b,y)}if(i.type.is("Block")){if(F4.indexOf(i.type.id)<0)c=i.to-l,h=t.block.children.length;else c=d,h=m;d=i.to-l,m=t.block.children.length}if(!i.nextSibling())break}while(t.block.children.length>h)t.block.children.pop(),t.block.positions.pop();return c-r}}function HM(t,i){let l=t;for(let s=1;s<i.length;s++){let r=i[s-1].to,c=i[s].from;if(r<t)l-=c-r}return l}var J4=lh({"Blockquote/...":Q.quote,HorizontalRule:Q.contentSeparator,"ATXHeading1/... SetextHeading1/...":Q.heading1,"ATXHeading2/... SetextHeading2/...":Q.heading2,"ATXHeading3/...":Q.heading3,"ATXHeading4/...":Q.heading4,"ATXHeading5/...":Q.heading5,"ATXHeading6/...":Q.heading6,"Comment CommentBlock":Q.comment,Escape:Q.escape,Entity:Q.character,"Emphasis/...":Q.emphasis,"StrongEmphasis/...":Q.strong,"Link/... Image/...":Q.link,"OrderedList/... BulletList/...":Q.list,"BlockQuote/...":Q.quote,"InlineCode CodeText":Q.monospace,"URL Autolink":Q.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":Q.processingInstruction,"CodeInfo LinkLabel":Q.labelName,LinkTitle:Q.string,Paragraph:Q.content}),NM=new ph(new pm(MM).extend(J4),Object.keys(vm).map((t)=>vm[t]),Object.keys(vm).map((t)=>AM[t]),Object.keys(vm),Q4,pM,Object.keys(_v).map((t)=>_v[t]),Object.keys(_v),[]);function Z4(t,i,l){let s=[];for(let r=t.firstChild,c=i;;r=r.nextSibling){let h=r?r.from:l;if(h>c)s.push({from:c,to:h});if(!r)break;c=r.to}return s}function _M(t){let{codeParser:i,htmlParser:l}=t;return{wrap:cM((r,c)=>{let h=r.type.id;if(i&&(h==I.CodeBlock||h==I.FencedCode)){let d="";if(h==I.FencedCode){let y=r.node.getChild(I.CodeInfo);if(y)d=c.read(y.from,y.to)}let m=i(d);if(m)return{parser:m,overlay:(y)=>y.type.id==I.CodeText,bracketed:h==I.FencedCode}}else if(l&&(h==I.HTMLBlock||h==I.HTMLTag||h==I.CommentBlock))return{parser:l,overlay:Z4(r.node,r.from,r.to)};return null})}}var K4={resolve:"Strikethrough",mark:"StrikethroughMark"},eH={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":Q.strikethrough}},{name:"StrikethroughMark",style:Q.processingInstruction}],parseInline:[{name:"Strikethrough",parse(t,i,l){if(i!=126||t.char(l+1)!=126||t.char(l+2)==126)return-1;let s=t.slice(l-1,l),r=t.slice(l+2,l+3),c=/\s|^$/.test(s),h=/\s|^$/.test(r),d=dh.test(s),m=dh.test(r);return t.addDelimiter(K4,l,l+2,!h&&(!m||c||d),!c&&(!d||h||m))},after:"Emphasis"}]};function hh(t,i,l=0,s,r=0){let c=0,h=!0,d=-1,m=-1,y=!1,b=()=>{s.push(t.elt("TableCell",r+d,r+m,t.parser.parseInline(i.slice(d,m),r+d)))};for(let S=l;S<i.length;S++){let w=i.charCodeAt(S);if(w==124&&!y){if(!h||d>-1)c++;if(h=!1,s){if(d>-1)b();s.push(t.elt("TableDelimiter",S+r,S+r+1))}d=m=-1}else if(y||w!=32&&w!=9){if(d<0)d=S;m=S+1}y=!y&&w==92}if(d>-1){if(c++,s)b()}return c}function iM(t,i){for(let l=i;l<t.length;l++){let s=t.charCodeAt(l);if(s==124)return!0;if(s==92)l++}return!1}var UM=/^[>\s]*\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class Iv{constructor(){this.rows=null}nextLine(t,i,l){if(this.rows==null){this.rows=!1;let s;if((i.next==45||i.next==58||i.next==124)&&UM.test(s=i.text.slice(i.pos))){let r=[];if(hh(t,l.content,0,r,l.start)==hh(t,s,0))this.rows=[t.elt("TableHeader",l.start,l.start+l.content.length,r),t.elt("TableDelimiter",t.lineStart+i.pos,t.lineStart+i.text.length)]}}else if(this.rows){let s=[];hh(t,i.text,i.pos,s,t.lineStart),this.rows.push(t.elt("TableRow",t.lineStart+i.pos,t.lineStart+i.text.length,s))}return!1}finish(t,i){if(!this.rows)return!1;return t.addLeafElement(i,t.elt("Table",i.start,i.start+i.content.length,this.rows)),!0}}var tH={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":Q.heading}},"TableRow",{name:"TableCell",style:Q.content},{name:"TableDelimiter",style:Q.processingInstruction}],parseBlock:[{name:"Table",leaf(t,i){return iM(i.content,0)?new Iv:null},endLeaf(t,i,l){if(l.parsers.some((r)=>r instanceof Iv)||!iM(i.text,i.basePos))return!1;let s=t.peekLine();return UM.test(s)&&hh(t,i.text,i.basePos)==hh(t,s,i.basePos)},before:"SetextHeading"}]};class qM{nextLine(){return!1}finish(t,i){return t.addLeafElement(i,t.elt("Task",i.start,i.start+i.content.length,[t.elt("TaskMarker",i.start,i.start+3),...t.parser.parseInline(i.content.slice(3),i.start+3)])),!0}}var nH={defineNodes:[{name:"Task",block:!0,style:Q.list},{name:"TaskMarker",style:Q.atom}],parseBlock:[{name:"TaskList",leaf(t,i){return/^\[[ xX]\][ \t]/.test(i.content)&&t.parentType().name=="ListItem"?new qM:null},after:"SetextHeading"}]},oM=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,lM=/[\w-]+(\.[\w-]+)+(:\d+)?(\/[^\s<]*)?/gy,iH=/[\w-]+\.[\w-]+($|[/:])/,sM=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,aM=/\/[a-zA-Z\d@.]+/gy;function rM(t,i,l,s){let r=0;for(let c=i;c<l;c++)if(t[c]==s)r++;return r}function oH(t,i){lM.lastIndex=i;let l=lM.exec(t);if(!l||iH.exec(l[0])[0].indexOf("_")>-1)return-1;let s=i+l[0].length;for(;;){let r=t[s-1],c;if(/[?!.,:*_~]/.test(r)||r==")"&&rM(t,i,s,")")>rM(t,i,s,"("))s--;else if(r==";"&&(c=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(t.slice(i,s))))s=i+c.index;else break}return s}function uM(t,i){sM.lastIndex=i;let l=sM.exec(t);if(!l)return-1;let s=l[0][l[0].length-1];return s=="_"||s=="-"?-1:i+l[0].length-(s=="."?1:0)}var lH={parseInline:[{name:"Autolink",parse(t,i,l){let s=l-t.offset;if(s&&/\w/.test(t.text[s-1]))return-1;oM.lastIndex=s;let r=oM.exec(t.text),c=-1;if(!r)return-1;if(r[1]||r[2]){if(c=oH(t.text,s+r[0].length),c>-1&&t.hasOpenLink){let h=/([^\[\]]|\[[^\]]*\])*/.exec(t.text.slice(s,c));c=s+h[0].length}}else if(r[3])c=uM(t.text,s);else if(c=uM(t.text,s+r[0].length),c>-1&&r[0]=="xmpp:"){if(aM.lastIndex=c,r=aM.exec(t.text),r)c=r.index+r[0].length}if(c<0)return-1;return t.addElement(t.elt("URL",l,c+t.offset)),c+t.offset}}]},VM=[tH,nH,eH,lH];function jM(t,i,l){return(s,r,c)=>{if(r!=t||s.char(c+1)==t)return-1;let h=[s.elt(l,c,c+1)];for(let d=c+1;d<s.end;d++){let m=s.char(d);if(m==t)return s.addElement(s.elt(i,c,d+1,h.concat(s.elt(l,d,d+1))));if(m==92)h.push(s.elt("Escape",d,d+++2));if(Ki(m))break}return-1}}var IM={defineNodes:[{name:"Superscript",style:Q.special(Q.content)},{name:"SuperscriptMark",style:Q.processingInstruction}],parseInline:[{name:"Superscript",parse:jM(94,"Superscript","SuperscriptMark")}]},$M={defineNodes:[{name:"Subscript",style:Q.special(Q.content)},{name:"SubscriptMark",style:Q.processingInstruction}],parseInline:[{name:"Subscript",parse:jM(126,"Subscript","SubscriptMark")}]},PM={defineNodes:[{name:"Emoji",style:Q.character}],parseInline:[{name:"Emoji",parse(t,i,l){let s;if(i!=58||!(s=/^[a-zA-Z_0-9]+:/.exec(t.slice(l+1,t.end))))return-1;return t.addElement(t.elt("Emoji",l,l+1+s[0].length))}}]};var Gv=null;function Wv(){if(!Gv&&typeof document=="object"&&document.body){let{style:t}=document.body,i=[],l=new Set;for(let s in t)if(s!="cssText"&&s!="cssFloat"){if(typeof t[s]=="string"){if(/[A-Z]/.test(s))s=s.replace(/[A-Z]/g,(r)=>"-"+r.toLowerCase());if(!l.has(s))i.push(s),l.add(s)}}Gv=i.sort().map((s)=>({type:"property",label:s,apply:s+": "}))}return Gv||[]}var YM=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map((t)=>({type:"class",label:t})),XM=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map((t)=>({type:"keyword",label:t})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map((t)=>({type:"constant",label:t}))),sH=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map((t)=>({type:"type",label:t})),aH=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map((t)=>({type:"keyword",label:t})),ss=/^(\w[\w-]*|-\w[\w-]*|)$/,rH=/^-(-[\w-]*)?$/;function uH(t,i){var l;if(t.name=="("||t.type.isError)t=t.parent||t;if(t.name!="ArgList")return!1;let s=(l=t.parent)===null||l===void 0?void 0:l.firstChild;if((s===null||s===void 0?void 0:s.name)!="Callee")return!1;return i.sliceString(s.from,s.to)=="var"}var QM=new Cm,cH=["Declaration"];function fH(t){for(let i=t;;){if(i.type.isTop)return i;if(!(i=i.parent))return t}}function WM(t,i,l){if(i.to-i.from>4096){let s=QM.get(i);if(s)return s;let r=[],c=new Set,h=i.cursor(cr.IncludeAnonymous);if(h.firstChild())do for(let d of WM(t,h.node,l))if(!c.has(d.label))c.add(d.label),r.push(d);while(h.nextSibling());return QM.set(i,r),r}else{let s=[],r=new Set;return i.cursor().iterate((c)=>{var h;if(l(c)&&c.matchContext(cH)&&((h=c.node.nextSibling)===null||h===void 0?void 0:h.name)==":"){let d=t.sliceString(c.from,c.to);if(!r.has(d))r.add(d),s.push({label:d,type:"variable"})}}),s}}var hH=(t)=>(i)=>{let{state:l,pos:s}=i,r=jt(l).resolveInner(s,-1),c=r.type.isError&&r.from==r.to-1&&l.doc.sliceString(r.from,r.to)=="-";if(r.name=="PropertyName"||(c||r.name=="TagName")&&/^(Block|Styles)$/.test(r.resolve(r.to).name))return{from:r.from,options:Wv(),validFor:ss};if(r.name=="ValueName")return{from:r.from,options:XM,validFor:ss};if(r.name=="PseudoClassName")return{from:r.from,options:YM,validFor:ss};if(t(r)||(i.explicit||c)&&uH(r,l.doc))return{from:t(r)||c?r.from:s,options:WM(l.doc,fH(r),t),validFor:rH};if(r.name=="TagName"){for(let{parent:m}=r;m;m=m.parent)if(m.name=="Block")return{from:r.from,options:Wv(),validFor:ss};return{from:r.from,options:sH,validFor:ss}}if(r.name=="AtKeyword")return{from:r.from,options:aH,validFor:ss};if(!i.explicit)return null;let h=r.resolve(s),d=h.childBefore(s);if(d&&d.name==":"&&h.name=="PseudoClassSelector")return{from:s,options:YM,validFor:ss};if(d&&d.name==":"&&h.name=="Declaration"||h.name=="ArgList")return{from:s,options:XM,validFor:ss};if(h.name=="Block"||h.name=="Styles")return{from:s,options:Wv(),validFor:ss};return null},dH=hH((t)=>t.name=="VariableName"),mh=is.define({name:"css",parser:GM.configure({props:[aa.add({Declaration:Uu()}),ls.add({"Block KeyframeList":bm})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function FM(){return new pl(mh,mh.data.of({autocomplete:dH}))}var tD=[Qn("function ${name}(${params}) {\n\t${}\n}",{label:"function",detail:"definition",type:"keyword"}),Qn("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n\t${}\n}",{label:"for",detail:"loop",type:"keyword"}),Qn("for (let ${name} of ${collection}) {\n\t${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Qn("do {\n\t${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Qn("while (${}) {\n\t${}\n}",{label:"while",detail:"loop",type:"keyword"}),Qn(`try {
230
230
  \${}
231
231
  } catch (\${error}) {
232
232
  \${}
233
- }`,{label:"try",detail:"/ catch block",type:"keyword"}),Gn("if (${}) {\n\t${}\n}",{label:"if",detail:"block",type:"keyword"}),Gn(`if (\${}) {
233
+ }`,{label:"try",detail:"/ catch block",type:"keyword"}),Qn("if (${}) {\n\t${}\n}",{label:"if",detail:"block",type:"keyword"}),Qn(`if (\${}) {
234
234
  \${}
235
235
  } else {
236
236
  \${}
237
- }`,{label:"if",detail:"/ else block",type:"keyword"}),Gn(`class \${name} {
237
+ }`,{label:"if",detail:"/ else block",type:"keyword"}),Qn(`class \${name} {
238
238
  constructor(\${params}) {
239
239
  \${}
240
240
  }
241
- }`,{label:"class",detail:"definition",type:"keyword"}),Gn('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Gn('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],dH=tD.concat([Gn("interface ${name} {\n\t${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Gn("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Gn("enum ${name} {\n\t${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),JM=new km,nD=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function ph(t){return(i,l)=>{let s=i.node.getChild("VariableDefinition");if(s)l(s,t);return!0}}var pH=["FunctionDeclaration"],mH={FunctionDeclaration:ph("function"),ClassDeclaration:ph("class"),ClassExpression:()=>!0,EnumDeclaration:ph("constant"),TypeAliasDeclaration:ph("type"),NamespaceDeclaration:ph("namespace"),VariableDefinition(t,i){if(!t.matchContext(pH))i(t,"variable")},TypeDefinition(t,i){i(t,"type")},__proto__:null};function iD(t,i){let l=JM.get(i);if(l)return l;let s=[],r=!0;function c(h,d){let m=t.sliceString(h.from,h.to);s.push({label:m,type:d})}return i.cursor(lr.IncludeAnonymous).iterate((h)=>{if(r)r=!1;else if(h.name){let d=mH[h.name];if(d&&d(h,c)||nD.has(h.name))return!1}else if(h.to-h.from>8192){for(let d of iD(t,h.node))s.push(d);return!1}}),JM.set(i,s),s}var ZM=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,oD=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function gH(t){let i=jt(t.state).resolveInner(t.pos,-1);if(oD.indexOf(i.name)>-1)return null;let l=i.name=="VariableName"||i.to-i.from<20&&ZM.test(t.state.sliceDoc(i.from,i.to));if(!l&&!t.explicit)return null;let s=[];for(let r=i;r;r=r.parent)if(nD.has(r.name))s=s.concat(iD(t.state.doc,r));return{options:s,from:l?i.from:t.pos,validFor:ZM}}var Ro=ns.define({name:"javascript",parser:eD.configure({props:[oa.add({IfStatement:Hu({except:/^\s*({|else\b)/}),TryStatement:Hu({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:VE,SwitchBody:(t)=>{let i=t.textAfter,l=/^\s*\}/.test(i),s=/^\s*(case|default)\b/.test(i);return t.baseIndent+(l?0:s?1:2)*t.unit},Block:qE({closing:"}"}),ArrowFunction:(t)=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":Hu({except:/^\s*{/}),JSXElement(t){let i=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(i?0:t.unit)},JSXEscape(t){let i=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(i?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),os.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":ym,BlockComment(t){return{from:t.from+2,to:t.to-2}},JSXElement(t){let i=t.firstChild;if(!i||i.name=="JSXSelfClosingTag")return null;let l=t.lastChild;return{from:i.to,to:l.type.isError?t.to:l.from}},"JSXSelfClosingTag JSXOpenTag"(t){var i;let l=(i=t.firstChild)===null||i===void 0?void 0:i.nextSibling,s=t.lastChild;if(!l||l.type.isError)return null;return{from:l.to,to:s.type.isError?t.to:s.from}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),lD={test:(t)=>/^JSX/.test(t.name),facet:oh({commentTokens:{block:{open:"{/*",close:"*/}"}}})},Fv=Ro.configure({dialect:"ts"},"typescript"),Jv=Ro.configure({dialect:"jsx",props:[mm.add((t)=>t.isTop?[lD]:void 0)]}),Zv=Ro.configure({dialect:"jsx ts",props:[mm.add((t)=>t.isTop?[lD]:void 0)]},"typescript"),sD=(t)=>({label:t,type:"keyword"}),aD="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(sD),yH=aD.concat(["declare","implements","private","protected","public"].map(sD));function rD(t={}){let i=t.jsx?t.typescript?Zv:Jv:t.typescript?Fv:Ro,l=t.typescript?dH.concat(yH):tD.concat(aD);return new pl(i,[Ro.data.of({autocomplete:WE(oD,GE(l))}),Ro.data.of({autocomplete:gH}),t.jsx?SH:[]])}function bH(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function KM(t,i,l=t.length){for(let s=i===null||i===void 0?void 0:i.firstChild;s;s=s.nextSibling)if(s.name=="JSXIdentifier"||s.name=="JSXBuiltin"||s.name=="JSXNamespacedName"||s.name=="JSXMemberExpression")return t.sliceString(s.from,Math.min(s.to,l));return""}var vH=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),SH=re.inputHandler.of((t,i,l,s,r)=>{if((vH?t.composing:t.compositionStarted)||t.state.readOnly||i!=l||s!=">"&&s!="/"||!Ro.isActiveAt(t.state,i,-1))return!1;let c=r(),{state:h}=c,d=h.changeByRange((m)=>{var y;let{head:b}=m,S=jt(h).resolveInner(b-1,-1),w;if(S.name=="JSXStartTag")S=S.parent;if(h.doc.sliceString(b-1,b)!=s||S.name=="JSXAttributeValue"&&S.to>b);else if(s==">"&&S.name=="JSXFragmentTag")return{range:m,changes:{from:b,insert:"</>"}};else if(s=="/"&&S.name=="JSXStartCloseTag"){let k=S.parent,E=k.parent;if(E&&k.from==b-2&&((w=KM(h.doc,E.firstChild,b))||((y=E.firstChild)===null||y===void 0?void 0:y.name)=="JSXFragmentTag")){let R=`${w}>`;return{range:G.cursor(b+R.length,-1),changes:{from:b,insert:R}}}}else if(s==">"){let k=bH(S);if(k&&k.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(h.doc.sliceString(b,b+2))&&(w=KM(h.doc,k,b)))return{range:m,changes:{from:b,insert:`</${w}>`}}}return{range:m}});if(d.changes.empty)return!1;return t.dispatch([c,h.update(d,{userEvent:"input.complete",scrollIntoView:!0})]),!0});var mh=["_blank","_self","_top","_parent"],Kv=["ascii","utf-8","utf-16","latin1","latin1"],e1=["get","post","put","delete"],t1=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Ti=["true","false"],te={},wH={a:{attrs:{href:null,ping:null,type:null,media:null,target:mh,hreflang:null}},abbr:te,address:te,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:te,aside:te,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:te,base:{attrs:{href:null,target:mh}},bdi:te,bdo:te,blockquote:{attrs:{cite:null}},body:te,br:te,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:t1,formmethod:e1,formnovalidate:["novalidate"],formtarget:mh,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:te,center:te,cite:te,code:te,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:te,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:te,div:te,dl:te,dt:te,em:te,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:te,figure:te,footer:te,form:{attrs:{action:null,name:null,"accept-charset":Kv,autocomplete:["on","off"],enctype:t1,method:e1,novalidate:["novalidate"],target:mh}},h1:te,h2:te,h3:te,h4:te,h5:te,h6:te,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:te,hgroup:te,hr:te,html:{attrs:{manifest:null}},i:te,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:t1,formmethod:e1,formnovalidate:["novalidate"],formtarget:mh,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:te,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:te,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:te,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:Kv,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:te,noscript:te,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:te,param:{attrs:{name:null,value:null}},pre:te,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:te,rt:te,ruby:te,samp:te,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:Kv}},section:te,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:te,source:{attrs:{src:null,type:null,media:null}},span:te,strong:te,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:te,summary:te,sup:te,table:te,tbody:te,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:te,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:te,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:te,time:{attrs:{datetime:null}},title:te,tr:te,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:te,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:te},dD={accesskey:null,class:null,contenteditable:Ti,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Ti,autocorrect:Ti,autocapitalize:Ti,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Ti,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Ti,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Ti,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Ti,"aria-hidden":Ti,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Ti,"aria-multiselectable":Ti,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Ti,"aria-relevant":null,"aria-required":Ti,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},pD="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map((t)=>"on"+t);for(let t of pD)dD[t]=null;class Vu{constructor(t,i){this.tags={...wH,...t},this.globalAttrs={...dD,...i},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}Vu.default=new Vu;function Iu(t,i,l=t.length){if(!i)return"";let s=i.firstChild,r=s&&s.getChild("TagName");return r?t.sliceString(r.from,Math.min(r.to,l)):""}function ju(t,i=!1){for(;t;t=t.parent)if(t.name=="Element")if(i)i=!1;else return t;return null}function mD(t,i,l){let s=l.tags[Iu(t,ju(i))];return(s===null||s===void 0?void 0:s.children)||l.allTags}function i1(t,i){let l=[];for(let s=ju(i);s&&!s.type.isTop;s=ju(s.parent)){let r=Iu(t,s);if(r&&s.lastChild.name=="CloseTag")break;if(r&&l.indexOf(r)<0&&(i.name=="EndTag"||i.from>=s.firstChild.to))l.push(r)}return l}var gD=/^[:\-\.\w\u00b7-\uffff]*$/;function uD(t,i,l,s,r){let c=/\s*>/.test(t.sliceDoc(r,r+5))?"":">",h=ju(l,l.name=="StartTag"||l.name=="TagName");return{from:s,to:r,options:mD(t.doc,h,i).map((d)=>({label:d,type:"type"})).concat(i1(t.doc,l).map((d,m)=>({label:"/"+d,apply:"/"+d+c,type:"type",boost:99-m}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function cD(t,i,l,s){let r=/\s*>/.test(t.sliceDoc(s,s+5))?"":">";return{from:l,to:s,options:i1(t.doc,i).map((c,h)=>({label:c,apply:c+r,type:"type",boost:99-h})),validFor:gD}}function xH(t,i,l,s){let r=[],c=0;for(let h of mD(t.doc,l,i))r.push({label:"<"+h,type:"type"});for(let h of i1(t.doc,l))r.push({label:"</"+h+">",type:"type",boost:99-c++});return{from:s,to:s,options:r,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function kH(t,i,l,s,r){let c=ju(l),h=c?i.tags[Iu(t.doc,c)]:null,d=h&&h.attrs?Object.keys(h.attrs):[],m=h&&h.globalAttrs===!1?d:d.length?d.concat(i.globalAttrNames):i.globalAttrNames;return{from:s,to:r,options:m.map((y)=>({label:y,type:"property"})),validFor:gD}}function CH(t,i,l,s,r){var c;let h=(c=l.parent)===null||c===void 0?void 0:c.getChild("AttributeName"),d=[],m=void 0;if(h){let y=t.sliceDoc(h.from,h.to),b=i.globalAttrs[y];if(!b){let S=ju(l),w=S?i.tags[Iu(t.doc,S)]:null;b=(w===null||w===void 0?void 0:w.attrs)&&w.attrs[y]}if(b){let S=t.sliceDoc(s,r).toLowerCase(),w='"',k='"';if(/^['"]/.test(S))m=S[0]=='"'?/^[^"]*$/:/^[^']*$/,w="",k=t.sliceDoc(r,r+1)==S[0]?"":S[0],S=S.slice(1),s++;else m=/^[^\s<>='"]*$/;for(let E of b)d.push({label:E,apply:w+E+k,type:"constant"})}}return{from:s,to:r,options:d,validFor:m}}function yD(t,i){let{state:l,pos:s}=i,r=jt(l).resolveInner(s,-1),c=r.resolve(s);for(let h=s,d;c==r&&(d=r.childBefore(h));){let m=d.lastChild;if(!m||!m.type.isError||m.from<m.to)break;c=r=d,h=m.from}if(r.name=="TagName")return r.parent&&/CloseTag$/.test(r.parent.name)?cD(l,r,r.from,s):uD(l,t,r,r.from,s);else if(r.name=="StartTag"||r.name=="IncompleteTag")return uD(l,t,r,s,s);else if(r.name=="StartCloseTag"||r.name=="IncompleteCloseTag")return cD(l,r,s,s);else if(r.name=="OpenTag"||r.name=="SelfClosingTag"||r.name=="AttributeName")return kH(l,t,r,r.name=="AttributeName"?r.from:s,s);else if(r.name=="Is"||r.name=="AttributeValue"||r.name=="UnquotedAttributeValue")return CH(l,t,r,r.name=="Is"?s:r.from,s);else if(i.explicit&&(c.name=="Element"||c.name=="Text"||c.name=="Document"))return xH(l,t,r,s);else return null}function bD(t){return yD(Vu.default,t)}function AH(t){let{extraTags:i,extraGlobalAttributes:l}=t,s=l||i?new Vu(i,l):Vu.default;return(r)=>yD(s,r)}var TH=Ro.parser.configure({top:"SingleExpression"}),vD=[{tag:"script",attrs:(t)=>t.type=="text/typescript"||t.lang=="ts",parser:Fv.parser},{tag:"script",attrs:(t)=>t.type=="text/babel"||t.type=="text/jsx",parser:Jv.parser},{tag:"script",attrs:(t)=>t.type=="text/typescript-jsx",parser:Zv.parser},{tag:"script",attrs(t){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type)},parser:TH},{tag:"script",attrs(t){return!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type)},parser:Ro.parser},{tag:"style",attrs(t){return(!t.lang||t.lang=="css")&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type))},parser:dh.parser}],SD=[{name:"style",parser:dh.parser.configure({top:"Styles"})}].concat(pD.map((t)=>({name:t,parser:Ro.parser}))),wD=ns.define({name:"html",parser:hD.configure({props:[oa.add({Element(t){let i=/^(\s*)(<\/)?/.exec(t.textAfter);if(t.node.to<=t.pos+i[0].length)return t.continue();return t.lineIndent(t.node.from)+(i[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag"(t){return t.column(t.node.from)+t.unit},Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].length<t.node.to)return t.continue();let i=null,l;for(let s=t.node;;){let r=s.lastChild;if(!r||r.name!="Element"||r.to!=s.to)break;i=s=r}if(i&&!((l=i.lastChild)&&(l.name=="CloseTag"||l.name=="SelfClosingTag")))return t.lineIndent(i.from)+t.unit;return null}}),os.add({Element(t){let{firstChild:i,lastChild:l}=t;if(!i||i.name!="OpenTag")return null;return{from:i.to,to:l.name=="CloseTag"?l.from:t.to}}}),YE.add({"OpenTag CloseTag":(t)=>t.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),Cm=wD.configure({wrap:n1(vD,SD)});function xD(t={}){let i="",l;if(t.matchClosingTags===!1)i="noMatch";if(t.selfClosingTags===!0)i=(i?i+" ":"")+"selfClosing";if(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)l=n1((t.nestedLanguages||[]).concat(vD),(t.nestedAttributes||[]).concat(SD));let s=l?wD.configure({wrap:l,dialect:i}):i?Cm.configure({dialect:i}):Cm;return new pl(s,[Cm.data.of({autocomplete:AH(t)}),t.autoCloseTags!==!1?EH:[],rD().support,FM().support])}var fD=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),EH=re.inputHandler.of((t,i,l,s,r)=>{if(t.composing||t.state.readOnly||i!=l||s!=">"&&s!="/"||!Cm.isActiveAt(t.state,i,-1))return!1;let c=r(),{state:h}=c,d=h.changeByRange((m)=>{var y,b,S;let w=h.doc.sliceString(m.from-1,m.to)==s,{head:k}=m,E=jt(h).resolveInner(k,-1),R;if(w&&s==">"&&E.name=="EndTag"){let L=E.parent;if(((b=(y=L.parent)===null||y===void 0?void 0:y.lastChild)===null||b===void 0?void 0:b.name)!="CloseTag"&&(R=Iu(h.doc,L.parent,k))&&!fD.has(R)){let N=k+(h.doc.sliceString(k,k+1)===">"?1:0),q=`</${R}>`;return{range:m,changes:{from:k,to:N,insert:q}}}}else if(w&&s=="/"&&E.name=="IncompleteCloseTag"){let L=E.parent;if(E.from==k-2&&((S=L.lastChild)===null||S===void 0?void 0:S.name)!="CloseTag"&&(R=Iu(h.doc,L,k))&&!fD.has(R)){let N=k+(h.doc.sliceString(k,k+1)===">"?1:0),q=`${R}>`;return{range:G.cursor(k+q.length,-1),changes:{from:k,to:N,insert:q}}}}return{range:m}});if(d.changes.empty)return!1;return t.dispatch([c,h.update(d,{userEvent:"input.complete",scrollIntoView:!0})]),!0});var AD=oh({commentTokens:{block:{open:"<!--",close:"-->"}}}),TD=new Qn,ED=NM.configure({props:[os.add((t)=>!t.is("Block")||t.is("Document")||s1(t)!=null||MH(t)?void 0:(i,l)=>({from:l.doc.lineAt(i.from).to,to:i.to})),TD.add(s1),oa.add({Document:()=>null}),ia.add({Document:AD})]});function s1(t){let i=/^(?:ATX|Setext)Heading(\d)$/.exec(t.name);return i?+i[1]:void 0}function MH(t){return t.name=="OrderedList"||t.name=="BulletList"}function DH(t,i){let l=t;for(;;){let s=l.nextSibling,r;if(!s||(r=s1(s.type))!=null&&r<=i)break;l=s}return l.to}var OH=IE.of((t,i,l)=>{for(let s=jt(t).resolveInner(l,-1);s;s=s.parent){if(s.from<i)break;let r=s.type.prop(TD);if(r==null)continue;let c=DH(s,r);if(c>l)return{from:l,to:c}}return null});function a1(t){return new si(AD,t,[],"markdown")}var RH=a1(ED),LH=ED.configure([VM,$M,jM,PM,{props:[os.add({Table:(t,i)=>({from:i.doc.lineAt(t.from).to,to:t.to})})]}]),Tm=a1(LH);function BH(t,i){return(l)=>{if(l&&t){let s=null;if(l=/\S*/.exec(l)[0],typeof t=="function")s=t(l);else s=lh.matchLanguageName(t,l,!0);if(s instanceof lh)return s.support?s.support.language.parser:Lu.getSkippingParser(s.load());else if(s)return s.parser}return i?i.parser:null}}class Am{constructor(t,i,l,s,r,c,h){this.node=t,this.from=i,this.to=l,this.spaceBefore=s,this.spaceAfter=r,this.type=c,this.item=h}blank(t,i=!0){let l=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(t!=null){while(l.length<t)l+=" ";return l}else{for(let s=this.to-this.from-l.length-this.spaceAfter.length;s>0;s--)l+=" ";return l+(i?this.spaceAfter:"")}}marker(t,i){let l=this.node.name=="OrderedList"?String(+DD(this.item,t)[2]+i):"";return this.spaceBefore+l+this.type+this.spaceAfter}}function MD(t,i){let l=[],s=[];for(let r=t;r;r=r.parent){if(r.name=="FencedCode")return s;if(r.name=="ListItem"||r.name=="Blockquote")l.push(r)}for(let r=l.length-1;r>=0;r--){let c=l[r],h,d=i.lineAt(c.from),m=c.from-d.from;if(c.name=="Blockquote"&&(h=/^ *>( ?)/.exec(d.text.slice(m))))s.push(new Am(c,m,m+h[0].length,"",h[1],">",null));else if(c.name=="ListItem"&&c.parent.name=="OrderedList"&&(h=/^( *)\d+([.)])( *)/.exec(d.text.slice(m)))){let y=h[3],b=h[0].length;if(y.length>=4)y=y.slice(0,y.length-4),b-=4;s.push(new Am(c.parent,m,m+b,h[1],y,h[2],c))}else if(c.name=="ListItem"&&c.parent.name=="BulletList"&&(h=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(d.text.slice(m)))){let y=h[4],b=h[0].length;if(y.length>4)y=y.slice(0,y.length-4),b-=4;let S=h[2];if(h[3])S+=h[3].replace(/[xX]/," ");s.push(new Am(c.parent,m,m+b,h[1],y,S,c))}}return s}function DD(t,i){return/^(\s*)(\d+)(?=[.)])/.exec(i.sliceString(t.from,t.from+10))}function o1(t,i,l,s=0){for(let r=-1,c=t;;){if(c.name=="ListItem"){let d=DD(c,i),m=+d[2];if(r>=0){if(m!=r+1)return;l.push({from:c.from+d[1].length,to:c.from+d[0].length,insert:String(r+2+s)})}r=m}let h=c.nextSibling;if(!h)break;c=h}}function r1(t,i){let l=/^[ \t]*/.exec(t)[0].length;if(!l||i.facet(gm)!="\t")return t;let s=Zs(t,4,l),r="";for(let c=s;c>0;)if(c>=4)r+="\t",c-=4;else r+=" ",c--;return r+t.slice(l)}var zH=(t={})=>({state:i,dispatch:l})=>{let s=jt(i),{doc:r}=i,c=null,h=i.changeByRange((d)=>{if(!d.empty||!Tm.isActiveAt(i,d.from,-1)&&!Tm.isActiveAt(i,d.from,1))return c={range:d};let m=d.from,y=r.lineAt(m),b=MD(s.resolveInner(m,-1),r);while(b.length&&b[b.length-1].from>m-y.from)b.pop();if(!b.length)return c={range:d};let S=b[b.length-1];if(S.to-S.spaceAfter.length>m-y.from)return c={range:d};let w=m>=S.to-S.spaceAfter.length&&!/\S/.test(y.text.slice(S.to));if(S.item&&w){let N=S.node.firstChild,q=S.node.getChild("ListItem","ListItem");if(N.to>=m||q&&q.to<m||y.from>0&&!/[^\s>]/.test(r.lineAt(y.from-1).text)||t.nonTightLists===!1){let J=b.length>1?b[b.length-2]:null,ae,ye="";if(J&&J.item)ae=y.from+J.from,ye=J.marker(r,1);else ae=y.from+(J?J.to:0);let nt=[{from:ae,to:m,insert:ye}];if(S.node.name=="OrderedList")o1(S.item,r,nt,-2);if(J&&J.node.name=="OrderedList")o1(J.item,r,nt);return{range:G.cursor(ae+ye.length),changes:nt}}else{let J=CD(b,i,y);return{range:G.cursor(m+J.length+1),changes:{from:y.from,insert:J+i.lineBreak}}}}if(S.node.name=="Blockquote"&&w&&y.from){let N=r.lineAt(y.from-1),q=/>\s*$/.exec(N.text);if(q&&q.index==S.from){let J=i.changes([{from:N.from+q.index,to:N.to},{from:y.from+S.from,to:y.to}]);return{range:d.map(J),changes:J}}}let k=[];if(S.node.name=="OrderedList")o1(S.item,r,k);let E=S.item&&S.item.from<y.from,R="";if(!E||/^[\s\d.)\-+*>]*/.exec(y.text)[0].length>=S.to)for(let N=0,q=b.length-1;N<=q;N++)R+=N==q&&!E?b[N].marker(r,1):b[N].blank(N<q?Zs(y.text,4,b[N+1].from)-R.length:null);let L=m;while(L>y.from&&/\s/.test(y.text.charAt(L-y.from-1)))L--;if(R=r1(R,i),NH(S.node,i.doc))R=CD(b,i,y)+i.lineBreak+R;return k.push({from:L,to:m,insert:i.lineBreak+R}),{range:G.cursor(L+R.length+1),changes:k}});if(c)return!1;return l(i.update(h,{scrollIntoView:!0,userEvent:"input"})),!0},HH=zH();function kD(t){return t.name=="QuoteMark"||t.name=="ListMark"}function NH(t,i){if(t.name!="OrderedList"&&t.name!="BulletList")return!1;let l=t.firstChild,s=t.getChild("ListItem","ListItem");if(!s)return!1;let r=i.lineAt(l.to),c=i.lineAt(s.from),h=/^[\s>]*$/.test(r.text);return r.number+(h?0:1)<c.number}function CD(t,i,l){let s="";for(let r=0,c=t.length-2;r<=c;r++)s+=t[r].blank(r<c?Zs(l.text,4,t[r+1].from)-s.length:null,r<c);return r1(s,i)}function _H(t,i){let l=t.resolveInner(i,-1),s=i;if(kD(l))s=l.from,l=l.parent;for(let r;r=l.childBefore(s);)if(kD(r))s=r.from;else if(r.name=="OrderedList"||r.name=="BulletList")l=r.lastChild,s=l.to;else break;return l}var UH=({state:t,dispatch:i})=>{let l=jt(t),s=null,r=t.changeByRange((c)=>{let h=c.from,{doc:d}=t;if(c.empty&&Tm.isActiveAt(t,c.from)){let m=d.lineAt(h),y=MD(_H(l,h),d);if(y.length){let b=y[y.length-1],S=b.to-b.spaceAfter.length+(b.spaceAfter?1:0);if(h-m.from>S&&!/\S/.test(m.text.slice(S,h-m.from)))return{range:G.cursor(m.from+S),changes:{from:m.from+S,to:h}};if(h-m.from==S&&(!b.item||m.from<=b.item.from||!/\S/.test(m.text.slice(0,b.to)))){let w=m.from+b.from;if(b.item&&b.node.from<b.item.from&&/\S/.test(m.text.slice(b.from,b.to))){let k=b.blank(Zs(m.text,4,b.to)-Zs(m.text,4,b.from));if(w==m.from)k=r1(k,t);return{range:G.cursor(w+k.length),changes:{from:w,to:m.from+b.to,insert:k}}}if(w<h)return{range:G.cursor(w),changes:{from:w,to:h}}}}}return s={range:c}});if(s)return!1;return i(t.update(r,{scrollIntoView:!0,userEvent:"delete"})),!0},qH=[{key:"Enter",run:HH},{key:"Backspace",run:UH}],OD=xD({matchClosingTags:!1});function RD(t={}){let{codeLanguages:i,defaultCodeLanguage:l,addKeymap:s=!0,base:{parser:r}=RH,completeHTMLTags:c=!0,pasteURLAsLink:h=!0,htmlTagLanguage:d=OD}=t;if(!(r instanceof hh))throw RangeError("Base parser provided to `markdown` should be a Markdown parser");let m=t.extensions?[t.extensions]:[],y=[d.support,OH],b;if(h)y.push($H);if(l instanceof pl)y.push(l.support),b=l.language;else if(l)b=l;let S=i||b?BH(i,b):void 0;if(m.push(_M({codeParser:S,htmlParser:d.language.parser})),s)y.push(Fl.high(eh.of(qH)));let w=a1(r.configure(m));if(c)y.push(w.data.of({autocomplete:VH}));return new pl(w,y)}function VH(t){let{state:i,pos:l}=t,s=/<[:\-\.\w\u00b7-\uffff]*$/.exec(i.sliceDoc(l-25,l));if(!s)return null;let r=jt(i).resolveInner(l,-1);while(r&&!r.type.isTop){if(r.name=="CodeBlock"||r.name=="FencedCode"||r.name=="ProcessingInstructionBlock"||r.name=="CommentBlock"||r.name=="Link"||r.name=="Image")return null;r=r.parent}return{from:l-s[0].length,to:l,options:IH(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var l1=null;function IH(){if(l1)return l1;let t=bD(new Lv(qe.create({extensions:OD}),0,!0));return l1=t?t.options:[]}var jH=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,$H=re.domEventHandlers({paste:(t,i)=>{var l;let{main:s}=i.state.selection;if(s.empty)return!1;let r=(l=t.clipboardData)===null||l===void 0?void 0:l.getData("text/plain");if(!r||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(r))return!1;if(/^www\./.test(r))r="https://"+r;if(!Tm.isActiveAt(i.state,s.from,1))return!1;let c=jt(i.state),h=!1;if(c.iterate({from:s.from,to:s.to,enter:(d)=>{if(d.from>s.from||jH.test(d.name))h=!0},leave:(d)=>{if(d.to<s.to)h=!0}}),h)return!1;return i.dispatch({changes:[{from:s.from,insert:"["},{from:s.to,insert:`](${r})`}],userEvent:"input.paste",scrollIntoView:!0}),!0}});var pt=ct(Ws(),1);var Ve=ct(Dn(),1),PH=["source","split","preview"];function YH(t){return t==="source"||t==="split"||t==="preview"}var XH={source:"Source",split:"Split",preview:"Preview"},ND=Fi.define(),QH=Nu.define([{tag:Q.heading,color:"var(--console-accent-dim)",fontWeight:"500"},{tag:Q.meta,color:"var(--console-text-muted)"},{tag:Q.emphasis,fontStyle:"italic"},{tag:Q.strong,fontWeight:"600"},{tag:[Q.link,Q.url],color:"var(--console-accent-dim)"},{tag:Q.quote,color:"var(--console-text-dim)"}]),GH=[RD(),$E(QH),re.lineWrapping];function LD(t,i,l){if(i.from<0||i.to<i.from||i.to>t.length)throw RangeError("Selection range is outside the body");return`${t.slice(0,i.from)}${l}${t.slice(i.to)}`}function WH(t,i=[]){return qe.create({doc:t,extensions:[...GH,...i]})}function FH(t,i){if(t.state.doc.toString()===i)return;t.dispatch({changes:{from:0,to:t.state.doc.length,insert:i},annotations:ND.of(!0)})}function JH(t){let{value:i,onChange:l,onSelectionChange:s,readOnly:r}=t,c=pt.useRef(null),h=pt.useRef(null),d=pt.useRef(i),m=pt.useRef(r),y=pt.useRef(new ku),b=pt.useRef(l),S=pt.useRef(s),w=pt.useCallback((k)=>{let E=k.state.selection.main;S.current?.(E.empty?null:{from:E.from,to:E.to})},[]);return pt.useEffect(()=>{b.current=l,S.current=s},[l,s]),pt.useEffect(()=>{let k=c.current;if(!k)return;let E=new re({parent:k,state:WH(d.current,[y.current.of([qe.readOnly.of(m.current),re.editable.of(!m.current)]),re.updateListener.of((R)=>{if(!R.docChanged)return;if(R.transactions.some((L)=>L.annotation(ND)===!0))return;b.current(R.state.doc.toString())}),re.updateListener.of((R)=>{if(!R.selectionSet&&!R.docChanged)return;w(R.view)}),re.domEventHandlers({keyup:(R,L)=>(w(L),!1),mouseup:(R,L)=>(window.setTimeout(()=>w(L),0),!1),touchend:(R,L)=>(window.setTimeout(()=>w(L),0),!1)})])});return h.current=E,()=>{if(E.destroy(),h.current===E)h.current=null}},[w]),pt.useEffect(()=>{let k=h.current;if(!k)return;FH(k,i)},[i]),pt.useEffect(()=>{let k=h.current;if(!k)return;k.dispatch({effects:y.current.reconfigure([qe.readOnly.of(r),re.editable.of(!r)])})},[r]),Ve.jsxDEV("div",{ref:c,...ce(kt.source),"aria-label":"Markdown source","data-editor":"codemirror6"},void 0,!1,void 0,this)}var sa="model",ZH=[],KH=[{label:"Review",instruction:"Review this selection.",mode:"answer"},{label:"Fact-check",instruction:"Fact-check this selection.",mode:"answer"},{label:"Related",instruction:"What related context do you know?",mode:"answer"},{label:"Rewrite",instruction:"Rewrite this selection. Return only replacement markdown without commentary.",mode:"rewrite"}];function eN(t){return Ve.jsxDEV("section",{...ce(kt.suggestion,kt.answer),"aria-label":"Agent answer",children:[Ve.jsxDEV("div",{...ce(kt.copy),children:[Ve.jsxDEV("strong",{...ce(kt.answerTitle),children:["Answer from ",t.agentId]},void 0,!0,void 0,this),Ve.jsxDEV(Em,{children:t.response},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Ve.jsxDEV("span",{...ce(kt.spacer)},void 0,!1,void 0,this),t.onReplace&&Ve.jsxDEV(Ge,{type:"button",onClick:t.onReplace,children:"Replace selection"},void 0,!1,void 0,this),Ve.jsxDEV(Ge,{type:"button",variant:"ghost",onClick:t.onDismiss,children:"Dismiss"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function _D(t){let i=$u(),{value:l,mode:s,onChange:r,onModeChange:c,assist:h,readOnly:d=!1}=t,m=pt.useId(),[y,b]=pt.useState(null),[S,w]=pt.useState(""),[k,E]=pt.useState(sa),[R,L]=pt.useState("answer"),[N,q]=pt.useState({kind:"idle"}),J=h?.agents??ZH,ae=s!=="preview",ye=s!=="source",nt=y?l.slice(y.from,y.to):"";pt.useEffect(()=>{if(k!==sa&&!J.some((P)=>P.id===k))E(sa),L("answer"),q({kind:"idle"})},[J,k]);let $t=pt.useCallback(()=>{if(!h||!y||S.trim().length===0)return;let P=y;q({kind:"loading"}),(k===sa?i.requestAssist({entityType:h.entityType,id:h.entityId,instruction:S,selection:nt}).then(({suggestion:Ne})=>{q({kind:"suggested",range:P,suggestion:Ne})}):i.requestAgentAnswer({entityType:h.entityType,id:h.entityId,agent:k,instruction:S,selection:nt}).then(({agentId:Ne,response:Be})=>{q({kind:"agent-answer",agentId:Ne,response:Be,range:P,replaceSelection:R==="rewrite"})})).catch((Ne)=>{q({kind:"error",message:Ei(Ne)})})},[R,i,h,k,S,nt,y,l]),je=pt.useCallback(()=>{if(N.kind!=="suggested")return;try{r(LD(l,N.range,N.suggestion)),q({kind:"idle"})}catch(P){q({kind:"error",message:Ei(P)})}},[N,r,l]),Tt=pt.useCallback(()=>{if(N.kind!=="agent-answer")return;try{r(LD(l,N.range,N.response)),q({kind:"idle"})}catch(P){q({kind:"error",message:Ei(P)})}},[N,r,l]);return Ve.jsxDEV("div",{...ce(kt.root),children:[Ve.jsxDEV("header",{...ce(kt.toolbar),children:[Ve.jsxDEV(BD,{value:s,onValueChange:(P)=>{if(YH(P))c(P)},children:Ve.jsxDEV(zD,{...ce(kt.modes),"aria-label":"Editor body view",children:PH.map((P)=>Ve.jsxDEV(HD,{value:P,id:`${m}-${P}`,"aria-controls":m,children:XH[P]},P,!1,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this),Ve.jsxDEV("span",{...ce(kt.metadata),children:[l.trim()?l.trim().split(/\s+/).length.toLocaleString():0," ","words"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),h&&ae&&Ve.jsxDEV("section",{...ce(kt.assist),"data-has-selection":y?"true":"false","aria-label":"AI selection rewrite",children:[J.length>0&&Ve.jsxDEV(Np,{xstyle:kt.select,"aria-label":"Assist target",value:k,onChange:(P)=>{E(P.currentTarget.value),L("answer"),q({kind:"idle"})},children:[Ve.jsxDEV("option",{value:sa,children:"Model"},void 0,!1,void 0,this),J.map((P)=>Ve.jsxDEV("option",{value:P.id,children:[P.label," — ",P.id]},P.id,!0,void 0,this))]},void 0,!0,void 0,this),Ve.jsxDEV(Hp,{xstyle:kt.input,type:"text",value:S,placeholder:y?"Instruction for selected text…":k===sa?"Select text to rewrite…":"Select text to ask about…",onChange:(P)=>w(P.currentTarget.value)},void 0,!1,void 0,this),Ve.jsxDEV(Ge,{type:"button",xstyle:kt.run,disabled:!y||S.trim().length===0||N.kind==="loading",onClick:$t,children:N.kind==="loading"?"Thinking…":k===sa?"Rewrite selection":"Ask"},void 0,!1,void 0,this),k!==sa&&Ve.jsxDEV("span",{...ce(kt.presets),children:KH.map((P)=>Ve.jsxDEV(Ge,{xstyle:kt.preset,type:"button",size:"xs",variant:P.mode==="rewrite"&&R==="rewrite"?"secondary":"ghost","aria-pressed":P.mode==="rewrite"&&R==="rewrite",onClick:()=>{w(P.instruction),L(P.mode)},children:P.label},P.label,!1,void 0,this))},void 0,!1,void 0,this),y&&Ve.jsxDEV("span",{...ce(kt.assistMeta),children:[nt.length," selected chars"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),N.kind==="suggested"&&Ve.jsxDEV("section",{...ce(kt.suggestion),children:[Ve.jsxDEV("div",{...ce(kt.copy),children:Ve.jsxDEV(Em,{children:N.suggestion},void 0,!1,void 0,this)},void 0,!1,void 0,this),Ve.jsxDEV("span",{...ce(kt.spacer)},void 0,!1,void 0,this),Ve.jsxDEV(Ge,{type:"button",onClick:je,children:"Accept"},void 0,!1,void 0,this),Ve.jsxDEV(Ge,{type:"button",variant:"ghost",onClick:()=>q({kind:"idle"}),children:"Discard"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.kind==="agent-answer"&&Ve.jsxDEV(eN,{agentId:N.agentId,response:N.response,onReplace:N.replaceSelection?Tt:void 0,onDismiss:()=>q({kind:"idle"})},void 0,!1,void 0,this),N.kind==="error"&&Ve.jsxDEV(_t,{tone:"error",className:Ce("",kt.status),children:N.message},void 0,!1,void 0,this),Ve.jsxDEV("div",{...ce(kt.panes,ae&&ye&&kt.split),"data-studio-split":ae&&ye?"":void 0,id:m,role:"tabpanel","aria-labelledby":`${m}-${s}`,children:[ae&&Ve.jsxDEV(JH,{value:l,onChange:r,onSelectionChange:b,readOnly:d},void 0,!1,void 0,this),ye&&Ve.jsxDEV("div",{...ce(kt.preview),"data-studio-preview":"",tabIndex:0,role:"region","aria-label":"Rendered document",children:Ve.jsxDEV(Em,{presentation:"document",children:l},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var Mm=ct(Ws(),1);var Qe=ct(Dn(),1);function qD(t){let{state:i}=t,l=Mm.useRef(null);if(Mm.useEffect(()=>{if(i.kind==="error"&&i.issues?.length&&!l.current?.closest("form")?.querySelector("[data-studio-invalid-field]")){let s=l.current?.querySelector("details");if(s)s.open=!0;l.current?.focus()}},[i]),i.kind==="saved")return i.noop?Qe.jsxDEV(_t,{tone:"good",save:!0,children:"No changes — already saved."},void 0,!1,void 0,this):Qe.jsxDEV(_t,{tone:"good",save:!0,children:"Saved through the entity service."},void 0,!1,void 0,this);if(i.kind==="conflict")return Qe.jsxDEV("section",{...ce(Gt.conflict),role:"alert","data-studio-conflict":"",children:[Qe.jsxDEV("h4",{...ce(Gt.conflictTitle),children:"The manuscript changed elsewhere"},void 0,!1,void 0,this),Qe.jsxDEV("p",{...ce(Gt.conflictCopy),children:i.message},void 0,!1,void 0,this),t.conflictActions]},void 0,!0,void 0,this);if(i.kind==="error")return Qe.jsxDEV("div",{...ce(Gt.validationSummary),ref:l,tabIndex:-1,role:"group","aria-label":"Save failed",children:[Qe.jsxDEV(_t,{tone:"error",save:!0,children:[i.message,i.issues?.length?" Your draft is unchanged.":""]},void 0,!0,void 0,this),i.issues&&i.issues.length>0&&Qe.jsxDEV("details",{children:[Qe.jsxDEV("summary",{children:["Review last save errors (",i.issues.length,")"]},void 0,!0,void 0,this),Qe.jsxDEV("div",{...ce(Gt.validationDetails),tabIndex:0,role:"region","aria-label":"Save validation errors",children:[Qe.jsxDEV("p",{children:"Correct the affected fields, then save again. Fields that are read-only here must be corrected through their owning tool."},void 0,!1,void 0,this),Qe.jsxDEV("ul",{children:i.issues.map((s,r)=>Qe.jsxDEV("li",{children:[s.path.length?`${s.path.join(".")}: `:"",s.message]},r,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this);return null}function VD(t,i){if(t.kind==="saving")return"Saving…";if(t.kind==="conflict")return"Conflict — your changes are not saved";if(t.kind==="error")return"Save failed — your changes are not saved";return i?"Unsaved changes":"Saved"}function Dm(t){let{save:i,git:l,baselineCommit:s}=t,r=l?.lastCommit?l.lastCommit.slice(0,7):null;if(i.kind==="saving")return{db:"active",exported:"pending",committed:"pending",commitRef:r};if(i.kind!=="saved")return{db:"pending",exported:"pending",committed:"pending",commitRef:r};if(i.noop)return{db:"done",exported:"done",committed:"done",commitRef:r};if(!l)return{db:"done",exported:"done",committed:"pending",commitRef:r};if(l.hasChanges)return{db:"done",exported:"done",committed:"active",commitRef:r};if(l.lastCommit!==s)return{db:"done",exported:"done",committed:"done",commitRef:r};return{db:"done",exported:"active",committed:"pending",commitRef:r}}function u1(t){return Qe.jsxDEV("span",{...ce(Gt.station,t.state==="done"&&Gt.done,t.state==="active"&&Gt.active),"data-studio-station":t.state,children:[Qe.jsxDEV("span",{...ce(Gt.dot,t.state==="done"&&Gt.doneDot,t.state==="active"&&Gt.activeDot)},void 0,!1,void 0,this),t.label]},void 0,!0,void 0,this)}function UD(t){return Qe.jsxDEV("span",{...ce(Gt.track),"data-studio-flowing":t.flowing?"":void 0,"aria-hidden":"true",children:Qe.jsxDEV("span",{...ce(Gt.flow,t.flowing&&Gt.flowing)},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function ID(t){let{view:i,gitConfigured:l}=t;return Qe.jsxDEV("span",{...ce(Gt.wrap),children:[Qe.jsxDEV("span",{...ce(Gt.stations),children:[Qe.jsxDEV(u1,{state:i.db,label:"entity db"},void 0,!1,void 0,this),Qe.jsxDEV(UD,{flowing:i.db==="done"&&i.exported==="active"},void 0,!1,void 0,this),Qe.jsxDEV(u1,{state:i.exported,label:"exported to file"},void 0,!1,void 0,this),l?Qe.jsxDEV(Qe.Fragment,{children:[Qe.jsxDEV(UD,{flowing:i.exported==="done"&&i.committed==="active"},void 0,!1,void 0,this),Qe.jsxDEV(u1,{state:i.committed,label:"committed"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):Qe.jsxDEV("span",{...ce(Gt.station,Gt.noGit),children:"no git remote"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),i.commitRef&&Qe.jsxDEV("span",{...ce(Gt.ref),children:["last write ",Qe.jsxDEV("b",{...ce(Gt.refValue),children:i.commitRef},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function jD(t){return Qe.jsxDEV(Gi,{mark:"×",title:"Delete this entry?",titleId:"delete-title",cancelLabel:"Keep entry",confirmLabel:t.deleting?"Deleting…":"Delete entry",pending:t.deleting===!0,confirmVariant:"danger",onCancel:t.onCancel,onConfirm:t.onConfirm,children:Qe.jsxDEV("p",{children:["The exported file for ",Qe.jsxDEV("code",{children:t.entityId},void 0,!1,void 0,this)," will be removed. Its history remains recoverable in git."]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var Pu=ct(Ws(),1);var Cn={root:{keoZOQ:"x1sgpng",kmVPX3:"x6w2896",kaIpWk:"xu4hgxq",kWkggS:"x18s3upu",$$css:!0},head:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"x1qughib",kOIVth:"x883omv",kMwMTN:"x1ar3pfp",$$css:!0},state:{kMwMTN:"xgi1xjn",k63SB2:"x1pd3egz",$$css:!0},warning:{kMwMTN:"x1ra7g20",$$css:!0},error:{kMwMTN:"x1mel2pz",$$css:!0},good:{kMwMTN:"x19k5i5u",$$css:!0},copy:{kogj98:"x108lf0y",kMwMTN:"x1ar3pfp",kGuDYH:"x1j6dyjg",kLWn49:"xfrs9s4",kHjlTd:"xj0a0fe",$$css:!0},actions:{k1xSpc:"x78zum5",kwnvtZ:"x1a02dak",kOIVth:"x1j9xkj6",keoZOQ:"xk9mzb7",$$css:!0},button:{kAzted:"x1rz828m x1c4ya5t",kmVPX3:"x1jmcyos",kGuDYH:"x1k6wstc",$$css:!0},publish:{kVAM5u:"xawfzfr",kWkggS:"x15vqgvx",kMwMTN:"x1um1dla",$$css:!0},complete:{kMwMTN:"x19k5i5u",kMv6JI:"xa9opjo",$$css:!0},confirmation:{kmVPX3:"x12s40zk",kWkggS:"xc1c755",kVVagm:"x1t8o5tu",$$css:!0}};var On=ct(Dn(),1);function c1(t){return"success"in t&&t.success===!1}function f1(t){return"needsConfirmation"in t&&t.needsConfirmation===!0}function tN(t){return On.jsxDEV(Gi,{mark:"↑",title:`Publish ${t.title} now?`,titleId:"publish-confirm-title",cancelLabel:"Review again",confirmLabel:t.confirming?"Publishing…":"Confirm publication",pending:t.confirming,confirmVariant:"primary",onCancel:t.onCancel,onConfirm:t.onConfirm,children:[On.jsxDEV("p",{children:t.preview},void 0,!1,void 0,this),On.jsxDEV("p",{...ce(Cn.confirmation),children:"This sends the current saved version to an external public provider."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function $D(t){let[i,l]=Pu.useState(null),[s,r]=Pu.useState(null),[c,h]=Pu.useState(null),d={entityType:t.entityType,entityId:t.entityId},m=t.unsaved||i!==null,y=Pu.useCallback(async(w,k)=>{l(k),r(null);try{let E=await t.onAction(w);if(c1(E))throw Error(E.error);if(f1(E))h({args:E.args,preview:E.preview??`This will publish ${t.entityType}:${t.entityId} publicly.`});else if(w.type==="publish")h(null)}catch(E){r(Ei(E))}finally{l(null)}},[t]),b=t.status==="queued"?{type:"remove",...d}:t.status==="failed"?{type:"retry",...d}:{type:"queue",...d},S=t.status==="queued"?"Remove from queue":t.status==="failed"?"Retry":"Add to queue";return On.jsxDEV("section",{...ce(Cn.root),"aria-label":"Publication actions",children:[On.jsxDEV("header",{...ce(Cn.head,wo.eyebrow),children:[On.jsxDEV("span",{children:"Publication"},void 0,!1,void 0,this),On.jsxDEV("b",{...ce(Cn.state,t.status==="queued"&&Cn.warning,t.status==="failed"&&Cn.error,t.status==="published"&&Cn.good),children:t.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this),On.jsxDEV("p",{...ce(Cn.copy),children:"Operates on the saved entity. Publication state is separate from the save pipeline below."},void 0,!1,void 0,this),t.unsaved&&On.jsxDEV("p",{...ce(Cn.copy,Cn.warning),children:"Save changes before changing publication state."},void 0,!1,void 0,this),t.status!=="published"&&On.jsxDEV("div",{...ce(Cn.actions),children:[On.jsxDEV(Ge,{type:"button",variant:"ghost",xstyle:Cn.button,disabled:m,onClick:()=>void y(b,"lifecycle"),children:i==="lifecycle"?"Working…":S},void 0,!1,void 0,this),On.jsxDEV(Ge,{type:"button",xstyle:[Cn.button,Cn.publish],disabled:m,onClick:()=>void y({type:"publish",...d},"publish"),children:i==="publish"?"Preparing…":"Publish now"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),t.status==="published"&&On.jsxDEV("p",{...ce(Cn.copy,Cn.complete),children:"Published externally."},void 0,!1,void 0,this),s&&On.jsxDEV(_t,{tone:"error",children:s},void 0,!1,void 0,this),c&&On.jsxDEV(tN,{title:t.title,preview:c.preview,confirming:i==="confirm",onCancel:()=>h(null),onConfirm:()=>void y({type:"publish",...d,confirmation:c.args},"confirm")},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var Mi=ct(Ws(),1);var Yu={versions:{k1xSpc:"xrvj5dj",kumcoG:"xcjjqqt",kOIVth:"xou54vl",k1JLwA:"x4jmfmw",$$css:!0},version:{kzqmXN:"xh8yej3",k7Eaqz:"xeuugli",kZKoxP:"x1isuwpm",kMv6JI:"xa9opjo",kGuDYH:"xfifm61",kMwMTN:"xqvuw85",kWkggS:"x18s3upu",kmVPX3:"xc7ga6q",$$css:!0},actions:{k1xSpc:"x78zum5",kwnvtZ:"x1a02dak",kOIVth:"x167g77z",keoZOQ:"x14vqqas",$$css:!0}};var At=ct(Dn(),1);function PD(t,i){return JSON.stringify({frontmatter:t,body:i},null,2)}function WD(t){let i=$u(),[l,s]=Mi.useState(!1),[r,c]=Mi.useState(null),[h,d]=Mi.useState(!1),[m,y]=Mi.useState(null),[b,S]=Mi.useState(!1),[w,k]=Mi.useState(!1),E=Mi.useRef(0),R=Mi.useRef(null);Mi.useEffect(()=>()=>{E.current+=1},[]);let L=PD(t.draft,t.body);Mi.useEffect(()=>S(!1),[L]);let N=async()=>{S(!1);try{await navigator.clipboard.writeText(L),S(!0)}catch{y("Copy unavailable. Select Your version manually."),s(!0)}},q=async()=>{let J=++E.current;d(!0),c(null),y(null);try{let ae=await i.fetchEntity(t.entity.entityType,t.entity.id);if(E.current===J)c(ae)}catch(ae){if(E.current===J)y(GD(ae,"Latest version could not be loaded")||"Latest version could not be loaded")}finally{if(E.current===J)d(!1)}};return At.jsxDEV(At.Fragment,{children:[At.jsxDEV("div",{...ce(Yu.actions),children:[At.jsxDEV("span",{ref:R,children:At.jsxDEV(Ge,{type:"button",variant:"ghost",onClick:()=>{s(!0),q()},children:"Compare changes"},void 0,!1,void 0,this)},void 0,!1,void 0,this),At.jsxDEV(Ge,{type:"button",variant:"ghost",onClick:()=>void N(),children:"Copy my version"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),b&&At.jsxDEV(_t,{children:"Version copied, including properties and body."},void 0,!1,void 0,this),At.jsxDEV(YD,{open:l,onOpenChange:(J)=>{if(s(J),!J)k(!1),E.current+=1,d(!1)},children:At.jsxDEV(XD,{"aria-describedby":"conflict-comparison-description",onCloseAutoFocus:(J)=>{J.preventDefault(),R.current?.querySelector("button")?.focus()},children:[At.jsxDEV(QD,{children:"Compare changes"},void 0,!1,void 0,this),At.jsxDEV("p",{id:"conflict-comparison-description",children:"Your draft is unchanged. Review both versions before choosing to replace it."},void 0,!1,void 0,this),m&&At.jsxDEV(_t,{tone:"error",children:m},void 0,!1,void 0,this),At.jsxDEV("div",{...ce(Yu.versions),children:[At.jsxDEV("label",{children:["Your version",At.jsxDEV("textarea",{...ce(Yu.version),readOnly:!0,value:L},void 0,!1,void 0,this)]},void 0,!0,void 0,this),At.jsxDEV("label",{children:["Latest saved version",At.jsxDEV("textarea",{...ce(Yu.version),readOnly:!0,value:r?PD(r.frontmatter,r.body):"Not loaded"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),At.jsxDEV("div",{...ce(Yu.actions),children:[At.jsxDEV(Ge,{type:"button",variant:"ghost",disabled:h,onClick:()=>void q(),children:h?"Loading latest…":"Retry latest"},void 0,!1,void 0,this),At.jsxDEV(Ge,{type:"button",variant:"ghost",onClick:()=>s(!1),children:"Keep editing my version"},void 0,!1,void 0,this),At.jsxDEV(Ge,{type:"button",disabled:!r||h||m!==null,onClick:()=>k(!0),children:"Use latest version"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),w&&r&&At.jsxDEV(Gi,{title:"Replace your local draft?",titleId:"replace-conflicted-draft",mark:"↩",cancelLabel:"Keep my draft",confirmLabel:"Replace with latest",onCancel:()=>k(!1),onConfirm:()=>{t.onUseLatest(r),k(!1),s(!1)},children:At.jsxDEV("p",{children:"This discards your local edits. Copy your version first if you want to keep it. Nothing is written to the server."},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Xu(t){return{entity:t,draft:{...t.frontmatter},body:t.body}}var Om=ct(Ws(),1);var ml={controls:{k8WAf4:"x1xn8qrt",kMv6JI:"x5ddh9m",kGuDYH:"x4z9k3i",kMwMTN:"x1ar3pfp",$$css:!0},search:{k1xSpc:"x78zum5",kGNEyG:"xpqajaz",kOIVth:"x1v2ro7d",$$css:!0},searchLabel:{k1xSpc:"xrvj5dj",kOIVth:"x17d4w8g",kUk6DE:"x98rzlu",k7Eaqz:"xeuugli",$$css:!0},input:{kzqmXN:"xh8yej3",k7Eaqz:"xeuugli",kAzted:"x1gg8mnh",kmVPX3:"x1160tuk",kaIpWk:"x1sxf85j",kMv6JI:"x5ddh9m",kGuDYH:"xif65rj",kMwMTN:"xqvuw85",kWkggS:"x18s3upu",$$css:!0},summary:{k8WAf4:"x10dr8xq",kkrTdU:"x1ypdohk",kAzted:"x1gg8mnh",$$css:!0},fields:{k1xSpc:"xrvj5dj",kumcoG:"x1hb4pgi",kOIVth:"x1v2ro7d",kGO01o:"xsag5q8",$$css:!0}};var St=ct(Dn(),1);function FD(t){let[i,l]=Om.useState(t.query.q);Om.useEffect(()=>l(t.query.q),[t.query.q]);let s=(h)=>{let d=Qu.safeParse({...t.query,q:i,...h,offset:0});if(d.success)t.onChange(d.data)},r=[...new Set([...t.fields.find((h)=>h.name==="status")?.options??[],t.query.status].filter(Boolean))],c=t.query.q||t.query.status||t.query.visibility!=="all"||t.query.sort!=="updated-desc";return St.jsxDEV("section",{className:Ce("studio-collection-controls",ml.controls),"aria-label":"Collection search and filters",children:[St.jsxDEV("form",{className:Ce("",ml.search),onSubmit:(h)=>{h.preventDefault(),s({})},children:[St.jsxDEV("label",{className:Ce("",ml.searchLabel),children:["Search title or content",St.jsxDEV("input",{className:Ce("",ml.input),type:"search",value:i,maxLength:200,onChange:(h)=>l(h.target.value)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),St.jsxDEV(Ge,{type:"submit",variant:"outline",children:"Search"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),St.jsxDEV("details",{children:[St.jsxDEV("summary",{className:Ce("",ml.summary),children:["Filter and sort",t.query.visibility!=="all"||t.query.status?" · filters active":""]},void 0,!0,void 0,this),St.jsxDEV("div",{className:Ce("",ml.fields),children:[St.jsxDEV("label",{children:["Visibility",St.jsxDEV("select",{className:Ce("",ml.input),value:t.query.visibility,onChange:(h)=>s({visibility:h.target.value}),children:[St.jsxDEV("option",{value:"all",children:"All available"},void 0,!1,void 0,this),St.jsxDEV("option",{value:"public",children:"Public"},void 0,!1,void 0,this),St.jsxDEV("option",{value:"shared",children:"Shared"},void 0,!1,void 0,this),St.jsxDEV("option",{value:"restricted",children:"Restricted"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),r.length>0&&St.jsxDEV("label",{children:["Status",St.jsxDEV("select",{className:Ce("",ml.input),value:t.query.status,onChange:(h)=>s({status:h.target.value}),children:[St.jsxDEV("option",{value:"",children:"All statuses"},void 0,!1,void 0,this),r.map((h)=>St.jsxDEV("option",{value:h,children:h},h,!1,void 0,this))]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),St.jsxDEV("label",{children:["Sort",St.jsxDEV("select",{className:Ce("",ml.input),value:t.query.sort,onChange:(h)=>s({sort:h.target.value}),children:[St.jsxDEV("option",{value:"updated-desc",children:"Recently updated"},void 0,!1,void 0,this),St.jsxDEV("option",{value:"updated-asc",children:"Least recently updated"},void 0,!1,void 0,this),St.jsxDEV("option",{value:"created-desc",children:"Newest created"},void 0,!1,void 0,this),St.jsxDEV("option",{value:"created-asc",children:"Oldest created"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),c&&St.jsxDEV(Ge,{type:"button",variant:"ghost",onClick:()=>{l(""),t.onChange(Qu.parse({limit:t.query.limit}))},children:"Clear search and filters"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var I=ct(Dn(),1);function rO(t,i){if(!t.hasBody)return"details";return i??(t.format==="raw"?"preview":"details")}var nN={entityType:"",format:"frontmatter",isSingleton:!1,hasBody:!1,fields:[]},iN=["details","write","preview"];function zm(t){return Object.fromEntries(t.flatMap((i)=>i.badge===void 0?[]:[[i.id,i.badge]]))}function Gu(t){return I.jsxDEV("div",{className:Ce("studio",wn.frame,wo.operatorRoles),"data-studio-shell":"",children:[I.jsxDEV(Hm,{contextLabel:"Studio"},void 0,!1,void 0,this),I.jsxDEV("main",{"aria-label":"Studio status",children:I.jsxDEV(_t,{tone:t.error?"error":void 0,className:Ce("",wn.boot),children:[t.message,t.onRetry&&I.jsxDEV(Ge,{type:"button",variant:"ghost",onClick:t.onRetry,children:"Retry"},void 0,!1,void 0,this),t.onHome&&I.jsxDEV(Ge,{type:"button",variant:"ghost",onClick:t.onHome,children:"Open Studio"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function uO(t){let i=v1();return I.jsxDEV("div",{className:Ce("studio",wn.frame,wo.operatorRoles),"data-view":"account","data-studio-shell":"",children:[I.jsxDEV(Hm,{contextLabel:"Account",navigation:{types:t.types,workspaces:t.workspaces,activeEntityType:null,activeWorkspaceId:t.workspaceId,workspaceBadges:zm(t.workspaces),selectEntityType:t.selectEntityType,selectWorkspace:t.selectWorkspace}},void 0,!1,void 0,this),I.jsxDEV("div",{className:gh("",Di.body,ar.shell,i&&ar.shellCollapsed),"data-studio-body":"",children:[I.jsxDEV("aside",{className:gh("rail",ar.rail),children:I.jsxDEV(S1,{renderMode:"desktop",types:t.types,active:null,onSelect:t.selectEntityType,workspaces:t.workspaces,activeWorkspace:t.workspaceId,workspaceBadges:zm(t.workspaces),onSelectWorkspace:t.selectWorkspace},void 0,!1,void 0,this)},void 0,!1,void 0,this),I.jsxDEV("main",{className:tO("account-studio-pane",eO.pane),children:t.children},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function cO(t){let i=v1(),{activeWorkspaceId:l,types:s,workspaces:r,workspaceError:c,declarativeWorkspaceData:h,workspaceQuery:d,entityType:m,entities:y,entityOffset:b,entityLimit:S,entityTotal:w,entityListLoading:k,schema:E,editor:R,fieldAssistState:L,bodyMode:N,mobilePane:q,syncStatus:J,baselineCommit:ae,agentTargets:ye,deleting:nt,hasUnsavedChanges:$t,navigationBlocked:je,dispatchEditor:Tt,setFieldAssistState:P,setBodyMode:st,setMobilePane:Ne,backToList:Be,selectEntityType:Wn,selectWorkspace:W,changeEntityPage:he,openWorkspaceEntity:de,openWorkspaceLaunch:it,performPublishingAction:$e,performDeclarativeAction:Oi,onWorkspaceQueryChange:Bo,startCreate:to,openEntity:Rn,runFieldAssist:Rt,applyFieldAssist:zo,save:nn,remove:ua,onNavigationReset:ot,onNavigationProceed:Lt}=t,{mode:_e,draft:Y,body:ri,save:lt,deleteOpen:Ut}=R,Et=s.find((ie)=>ie.entityType===m),be=r.find((ie)=>ie.id===l),Ke=E??nN,Ho=m??"",ca=!l&&_e.kind!=="browse",Fe=Et?.capabilities.canCreate===!0,Ri=_e.kind==="create"?Fe:_e.kind==="edit"&&Et?.capabilities.canUpdate===!0,Li=Et?.capabilities.canDelete===!0,no=Et?.capabilities.canPublish===!0,io=Ri&&Et?.capabilities.canAssist===!0,yl=_e.kind==="edit"?Et?.isSingleton?Lm(Et.label):Rm(_e.entity):_e.kind==="create"?`New ${Et?.label??m}`:Et?.label??m,oo=be?.label??(Et?.isSingleton?Lm(Et.label):Et?.label)??m??"Studio",bl=Lm(oo),No=J?.git?.hasChanges===!0,as=r.find((ie)=>ie.pluginId==="content-pipeline"&&ie.entityTypes.includes(Ho)),cr=w,fr=Math.min(b+(y?.length??S),w),Ju=zm(r),Bi={kicker:"Content library",access:b1("trusted"),title:Et?.label??m??"Library",metadata:[`${cr} ${cr===1?"entity":"entities"}`,...No?["Sync pending"]:[]],totals:[]},Ln=y1(Ke.fields)&&_e.kind==="edit"?g1(_e.entity):null,hr={kicker:Ke.isSingleton?`${oO(m,null)} / singleton`:oo,access:b1("trusted"),title:yl??"Editor",metadata:_e.kind==="create"?[`${bl} · new`]:Ln?[`${bl} · ${Ln}`]:[],totals:[]},ui=be&&h?aO(be,h.view):null;return I.jsxDEV("div",{className:Ce("studio",wn.frame,wo.operatorRoles),"data-studio-shell":"","data-view":l?"workspace":ca?"editor":"listing",children:[I.jsxDEV(Hm,{contextLabel:oo,onContextClick:ca&&!Ke.isSingleton?Be:void 0,navigation:{types:s,workspaces:r,activeEntityType:l?null:m,activeWorkspaceId:l,workspaceBadges:Ju,selectEntityType:Wn,selectWorkspace:W}},void 0,!1,void 0,this),I.jsxDEV("div",{className:gh("",Di.body,ar.shell,i&&ar.shellCollapsed),"data-studio-body":"",children:[I.jsxDEV("aside",{className:gh("rail",ar.rail),children:I.jsxDEV(S1,{renderMode:"desktop",types:s,active:l?null:m,onSelect:Wn,workspaces:r,activeWorkspace:l,workspaceBadges:zm(r),onSelectWorkspace:W},void 0,!1,void 0,this)},void 0,!1,void 0,this),l?c&&!h?I.jsxDEV("main",{className:Sb(""),children:I.jsxDEV(_t,{tone:"error",children:[c,I.jsxDEV(Ge,{type:"button",variant:"ghost",onClick:t.onRetryRead,children:"Retry"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this):h&&ui?I.jsxDEV("div",{className:Sb("studio-workspace-frame"),children:[c&&I.jsxDEV(_t,{tone:"error",children:["Showing previously loaded content. ",c,I.jsxDEV(Ge,{type:"button",variant:"ghost",onClick:t.onRetryRead,children:"Retry"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),I.jsxDEV(Bm,{model:ui,...ui.primaryAction?{action:I.jsxDEV(ZD,{action:ui.primaryAction,primary:!0,onAction:Oi,components:xb},void 0,!1,void 0,this)}:{}},void 0,!1,void 0,this),I.jsxDEV(KD,{data:h,components:xb,renderHead:!1,onOpenEntity:de,onLaunch:it,onAction:Oi,query:d,...l?{onQueryChange:(ie)=>Bo(l,ie,ie)}:{}},l,!1,void 0,this)]},void 0,!0,void 0,this):null:!ca?I.jsxDEV("main",{className:Ce("",wn.listing,zp.inset),"data-studio-library":"","aria-busy":k,children:[t.readError&&I.jsxDEV(_t,{tone:"error",children:[y?.length?"Showing previously loaded entries. ":"",t.readError,I.jsxDEV(Ge,{type:"button",variant:"ghost",onClick:t.onRetryRead,children:"Retry"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),I.jsxDEV(Bm,{model:Bi,action:I.jsxDEV(Ge,{type:"button",disabled:!Fe||!E,onClick:to,children:["New ",bl.toLowerCase()]},void 0,!0,void 0,this)},void 0,!1,void 0,this),!Ke.isSingleton&&I.jsxDEV(FD,{query:t.collectionQuery,fields:Ke.fields,onChange:t.onCollectionQueryChange},void 0,!1,void 0,this),!Ke.isSingleton&&w>0&&I.jsxDEV("nav",{className:Ce("listing-pagination",wn.pagination),"aria-label":`${Et?.label??"Entity"} pagination`,children:[I.jsxDEV("span",{className:Ce("",wn.range),"aria-live":"polite",children:[b+1,"–",fr," of ",w]},void 0,!0,void 0,this),I.jsxDEV("span",{className:Ce("",wn.pager),children:[I.jsxDEV(Ge,{type:"button",variant:"ghost",disabled:k||b===0,onClick:()=>he(Math.max(0,b-S)),children:"Previous"},void 0,!1,void 0,this),I.jsxDEV(Ge,{type:"button",variant:"ghost",disabled:k||b+S>=w,onClick:()=>he(b+S),children:"Next"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),k&&I.jsxDEV(_t,{className:Ce("",wn.empty),children:"Loading entries…"},void 0,!1,void 0,this),!k&&(y??[]).map((ie,qt)=>I.jsxDEV("button",{type:"button",className:Ce("",wn.row,ss.listingRow),"data-studio-record":"",onClick:()=>Rn(ie.id),children:[I.jsxDEV("span",{className:Ce("",wn.index),children:String(b+qt+1).padStart(2,"0")},void 0,!1,void 0,this),I.jsxDEV("span",{className:Ce("",wn.title),title:ie.id,children:[Rm(ie),y1(Ke.fields)&&I.jsxDEV("span",{className:Ce("studio-publication-state",ss.publication),children:g1(ie)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),I.jsxDEV("span",{className:Ce("",wn.updated),children:nO(ie.updated)},void 0,!1,void 0,this)]},ie.id,!0,void 0,this)),!t.readError&&!k&&y?.length===0&&I.jsxDEV(_t,{className:Ce("",wn.empty),children:t.collectionQuery.q||t.collectionQuery.status||t.collectionQuery.visibility!=="all"?"No entries match these filters. Clear or change the filters to try again.":Fe?"Nothing here yet — start the first entry.":"No entries are available in this collection."},void 0,!1,void 0,this)]},void 0,!0,void 0,this):I.jsxDEV("form",{role:"main","aria-label":"Document editor",className:Ce("",Di.editor),"data-studio-editor":"","data-mobile-pane":q,onInvalidCapture:(ie)=>{if(q==="details")return;ie.preventDefault();let qt=ie.currentTarget.querySelector("input:invalid, select:invalid, textarea:invalid");if(ie.target!==qt)return;Ne("details"),requestAnimationFrame(()=>{if(qt.isConnected)qt.focus(),qt.reportValidity()})},onSubmit:(ie)=>{if(ie.preventDefault(),Ri&&lt.kind!=="saving")nn()},onKeyDown:(ie)=>{if((ie.ctrlKey||ie.metaKey)&&!ie.altKey&&!ie.shiftKey&&ie.key.toLowerCase()==="s"){if(ie.target instanceof HTMLElement&&ie.target.closest('[role="dialog"], [role="alertdialog"]'))return;if(ie.preventDefault(),Ri&&lt.kind!=="saving")ie.currentTarget.requestSubmit()}},children:[I.jsxDEV(Bm,{model:hr,appearance:"document",action:I.jsxDEV(Ge,{type:"submit",className:"studio-editor-head-save",variant:$t?"default":"outline",title:"Save changes (Ctrl+S or ⌘S)","aria-keyshortcuts":"Control+s Meta+s",disabled:!Ri||lt.kind==="saving",children:lt.kind==="saving"?"Saving…":"Save changes"},void 0,!1,void 0,this)},void 0,!1,void 0,this),I.jsxDEV("div",{className:Ce("studio-mobile-tabs",ss.mobileModes),children:I.jsxDEV(h1,{children:[I.jsxDEV(d1,{asChild:!0,children:I.jsxDEV("button",{type:"button","aria-label":"Editor view",className:Ce("",ss.paneTrigger,wo.eyebrow),children:[q==="details"?"Properties":q==="write"?"Source":"Preview",I.jsxDEV("span",{"aria-hidden":"true",children:"⌄"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),I.jsxDEV(p1,{align:"start",children:iN.map((ie)=>I.jsxDEV(m1,{disabled:ie!=="details"&&!Ke.hasBody,onSelect:()=>{if(Ne(ie),ie==="write")st("source");if(ie==="preview")st("preview")},children:ie==="details"?"Properties":ie==="write"?"Source":"Preview"},ie,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),I.jsxDEV("aside",{className:Ce("",Di.colophon),children:[I.jsxDEV("div",{className:Ce("",ss.propertiesHead),children:[I.jsxDEV("h2",{className:Ce("",ss.propertiesLabel,wo.eyebrow),children:"Properties"},void 0,!1,void 0,this),_e.kind==="create"||Ln?I.jsxDEV("span",{className:Ce("",ss.propertiesLabel,wo.eyebrow),children:_e.kind==="create"?"New":Ln},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),I.jsxDEV("fieldset",{className:Ce("",Di.fields),disabled:!Ri,children:[Ke.fields.filter((ie)=>iO(ie,Y)).map((ie)=>I.jsxDEV("div",{"data-studio-field-assist":"",children:[I.jsxDEV(sO,{descriptor:ie,issues:lt.kind==="error"?lt.issues:void 0,value:Y[ie.name],onChange:(qt)=>Tt({type:"fieldChanged",descriptor:ie,raw:qt})},void 0,!1,void 0,this),io&&Ke.hasBody&&ri.trim().length>0&&I.jsxDEV(lO,{descriptor:ie,state:L,onRun:Rt,onApply:zo,onDiscard:()=>P({kind:"idle"})},void 0,!1,void 0,this)]},`${Ho}:${_e.kind==="edit"?_e.entity.id:"create"}:${ie.name}`,!0,void 0,this)),Ke.format==="raw"&&I.jsxDEV(_t,{children:"This type is raw markdown — the whole document is the body."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),as&&_e.kind==="edit"&&no&&I.jsxDEV($D,{entityType:Ho,entityId:_e.entity.id,title:Rm(_e.entity),status:typeof _e.entity.frontmatter.status==="string"?_e.entity.frontmatter.status:"draft",unsaved:$t,onAction:$e},void 0,!1,void 0,this)]},void 0,!0,void 0,this),I.jsxDEV("section",{className:Ce("",Di.manuscript),children:Ke.hasBody?I.jsxDEV(_D,{value:ri,mode:N,onChange:(ie)=>Tt({type:"bodyChanged",body:ie}),onModeChange:st,readOnly:!Ri,..._e.kind==="edit"&&io?{assist:{entityType:Ho,entityId:_e.entity.id,agents:ye}}:{}},void 0,!1,void 0,this):I.jsxDEV(_t,{className:Ce("",Di.empty),children:"This type has no body — its fields are the whole record."},void 0,!1,void 0,this)},void 0,!1,void 0,this),I.jsxDEV("footer",{className:Ce("",ss.pipeline,Di.pipeline),"data-studio-save-bar":"",children:[I.jsxDEV("div",{children:[I.jsxDEV("span",{role:"status","aria-live":"polite",title:"Saved means stored in this Brain. File export and Git synchronization are separate.",children:VD(lt,$t)},void 0,!1,void 0,this),t.readError&&I.jsxDEV(_t,{tone:"error",children:["Your draft is unchanged. ",t.readError,I.jsxDEV(Ge,{type:"button",variant:"ghost",onClick:t.onRetryRead,children:"Retry"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),J?.directorySync&&I.jsxDEV("details",{children:[I.jsxDEV("summary",{children:"Sync details"},void 0,!1,void 0,this),I.jsxDEV(ID,{view:Dm({save:lt,git:J.git,baselineCommit:ae}),gitConfigured:J.git!==null},void 0,!1,void 0,this)]},void 0,!0,void 0,this),I.jsxDEV(qD,{state:J?.directorySync&&lt.kind==="saved"&&!lt.noop?{kind:"idle"}:lt,conflictActions:_e.kind==="edit"?I.jsxDEV(WD,{entity:_e.entity,draft:Y,body:ri,onUseLatest:(ie)=>Tt({type:"documentOpened",document:Xu(ie)})},`${_e.entity.entityType}:${_e.entity.id}`,!1,void 0,this):void 0},void 0,!1,void 0,this)]},void 0,!0,void 0,this),I.jsxDEV("span",{className:Ce("",Di.spacer)},void 0,!1,void 0,this),_e.kind==="edit"&&!Ke.isSingleton&&Li&&I.jsxDEV(I.Fragment,{children:[I.jsxDEV("span",{className:Ce("",Di.desktop),children:I.jsxDEV(Ge,{type:"button",variant:"danger",xstyle:Di.danger,onClick:()=>Tt({type:"deleteRequested"}),children:"Delete"},void 0,!1,void 0,this)},void 0,!1,void 0,this),I.jsxDEV("span",{className:Ce("",Di.more),children:I.jsxDEV(h1,{children:[I.jsxDEV(d1,{className:JD("ghost","icon"),"aria-label":"More document actions",children:"•••"},void 0,!1,void 0,this),I.jsxDEV(p1,{align:"end",children:I.jsxDEV(m1,{variant:"destructive",onSelect:()=>Tt({type:"deleteRequested"}),children:"Delete entry"},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,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Ut&&_e.kind==="edit"&&Li&&I.jsxDEV(jD,{entityId:_e.entity.id,deleting:nt,onCancel:()=>Tt({type:"deleteCancelled"}),onConfirm:ua},void 0,!1,void 0,this),je&&I.jsxDEV(Gi,{mark:"↩",title:"Discard unsaved changes?",titleId:"discard-navigation-title",cancelLabel:"Keep editing",confirmLabel:"Discard and continue",confirmVariant:"danger",onCancel:ot,onConfirm:Lt,children:I.jsxDEV("p",{children:"This draft has not been saved. Continue only if you want to leave it behind."},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function fO(t){let{studioCreatePrefill:i,...l}=t;return l}function hO(t,i,l){let s=vb.safeParse(t);if(!s.success||s.data.studioCreatePrefill.entityType!==i)return;return l(),{title:s.data.studioCreatePrefill.title,...s.data.studioCreatePrefill.body?{body:s.data.studioCreatePrefill.body}:{},backlink:s.data.studioCreatePrefill.backlink}}function dO(t,i){let l=yh(t);if(!i)return{draft:l,body:""};if(t.some((r)=>r.name==="title"))l.title=i.title;let s=`## Source
241
+ }`,{label:"class",detail:"definition",type:"keyword"}),Qn('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Qn('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],pH=tD.concat([Qn("interface ${name} {\n\t${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Qn("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Qn("enum ${name} {\n\t${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),JM=new Cm,nD=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function gh(t){return(i,l)=>{let s=i.node.getChild("VariableDefinition");if(s)l(s,t);return!0}}var mH=["FunctionDeclaration"],gH={FunctionDeclaration:gh("function"),ClassDeclaration:gh("class"),ClassExpression:()=>!0,EnumDeclaration:gh("constant"),TypeAliasDeclaration:gh("type"),NamespaceDeclaration:gh("namespace"),VariableDefinition(t,i){if(!t.matchContext(mH))i(t,"variable")},TypeDefinition(t,i){i(t,"type")},__proto__:null};function iD(t,i){let l=JM.get(i);if(l)return l;let s=[],r=!0;function c(h,d){let m=t.sliceString(h.from,h.to);s.push({label:m,type:d})}return i.cursor(cr.IncludeAnonymous).iterate((h)=>{if(r)r=!1;else if(h.name){let d=gH[h.name];if(d&&d(h,c)||nD.has(h.name))return!1}else if(h.to-h.from>8192){for(let d of iD(t,h.node))s.push(d);return!1}}),JM.set(i,s),s}var ZM=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,oD=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function yH(t){let i=jt(t.state).resolveInner(t.pos,-1);if(oD.indexOf(i.name)>-1)return null;let l=i.name=="VariableName"||i.to-i.from<20&&ZM.test(t.state.sliceDoc(i.from,i.to));if(!l&&!t.explicit)return null;let s=[];for(let r=i;r;r=r.parent)if(nD.has(r.name))s=s.concat(iD(t.state.doc,r));return{options:s,from:l?i.from:t.pos,validFor:ZM}}var Oo=is.define({name:"javascript",parser:eD.configure({props:[aa.add({IfStatement:Uu({except:/^\s*({|else\b)/}),TryStatement:Uu({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:VE,SwitchBody:(t)=>{let i=t.textAfter,l=/^\s*\}/.test(i),s=/^\s*(case|default)\b/.test(i);return t.baseIndent+(l?0:s?1:2)*t.unit},Block:qE({closing:"}"}),ArrowFunction:(t)=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":Uu({except:/^\s*{/}),JSXElement(t){let i=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(i?0:t.unit)},JSXEscape(t){let i=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(i?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),ls.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":bm,BlockComment(t){return{from:t.from+2,to:t.to-2}},JSXElement(t){let i=t.firstChild;if(!i||i.name=="JSXSelfClosingTag")return null;let l=t.lastChild;return{from:i.to,to:l.type.isError?t.to:l.from}},"JSXSelfClosingTag JSXOpenTag"(t){var i;let l=(i=t.firstChild)===null||i===void 0?void 0:i.nextSibling,s=t.lastChild;if(!l||l.type.isError)return null;return{from:l.to,to:s.type.isError?t.to:s.from}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),lD={test:(t)=>/^JSX/.test(t.name),facet:sh({commentTokens:{block:{open:"{/*",close:"*/}"}}})},Fv=Oo.configure({dialect:"ts"},"typescript"),Jv=Oo.configure({dialect:"jsx",props:[gm.add((t)=>t.isTop?[lD]:void 0)]}),Zv=Oo.configure({dialect:"jsx ts",props:[gm.add((t)=>t.isTop?[lD]:void 0)]},"typescript"),sD=(t)=>({label:t,type:"keyword"}),aD="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(sD),bH=aD.concat(["declare","implements","private","protected","public"].map(sD));function rD(t={}){let i=t.jsx?t.typescript?Zv:Jv:t.typescript?Fv:Oo,l=t.typescript?pH.concat(bH):tD.concat(aD);return new pl(i,[Oo.data.of({autocomplete:WE(oD,GE(l))}),Oo.data.of({autocomplete:yH}),t.jsx?wH:[]])}function vH(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function KM(t,i,l=t.length){for(let s=i===null||i===void 0?void 0:i.firstChild;s;s=s.nextSibling)if(s.name=="JSXIdentifier"||s.name=="JSXBuiltin"||s.name=="JSXNamespacedName"||s.name=="JSXMemberExpression")return t.sliceString(s.from,Math.min(s.to,l));return""}var SH=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),wH=re.inputHandler.of((t,i,l,s,r)=>{if((SH?t.composing:t.compositionStarted)||t.state.readOnly||i!=l||s!=">"&&s!="/"||!Oo.isActiveAt(t.state,i,-1))return!1;let c=r(),{state:h}=c,d=h.changeByRange((m)=>{var y;let{head:b}=m,S=jt(h).resolveInner(b-1,-1),w;if(S.name=="JSXStartTag")S=S.parent;if(h.doc.sliceString(b-1,b)!=s||S.name=="JSXAttributeValue"&&S.to>b);else if(s==">"&&S.name=="JSXFragmentTag")return{range:m,changes:{from:b,insert:"</>"}};else if(s=="/"&&S.name=="JSXStartCloseTag"){let k=S.parent,E=k.parent;if(E&&k.from==b-2&&((w=KM(h.doc,E.firstChild,b))||((y=E.firstChild)===null||y===void 0?void 0:y.name)=="JSXFragmentTag")){let R=`${w}>`;return{range:G.cursor(b+R.length,-1),changes:{from:b,insert:R}}}}else if(s==">"){let k=vH(S);if(k&&k.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(h.doc.sliceString(b,b+2))&&(w=KM(h.doc,k,b)))return{range:m,changes:{from:b,insert:`</${w}>`}}}return{range:m}});if(d.changes.empty)return!1;return t.dispatch([c,h.update(d,{userEvent:"input.complete",scrollIntoView:!0})]),!0});var yh=["_blank","_self","_top","_parent"],Kv=["ascii","utf-8","utf-16","latin1","latin1"],e1=["get","post","put","delete"],t1=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Ci=["true","false"],ne={},xH={a:{attrs:{href:null,ping:null,type:null,media:null,target:yh,hreflang:null}},abbr:ne,address:ne,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:ne,aside:ne,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:ne,base:{attrs:{href:null,target:yh}},bdi:ne,bdo:ne,blockquote:{attrs:{cite:null}},body:ne,br:ne,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:t1,formmethod:e1,formnovalidate:["novalidate"],formtarget:yh,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:ne,center:ne,cite:ne,code:ne,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:ne,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:ne,div:ne,dl:ne,dt:ne,em:ne,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:ne,figure:ne,footer:ne,form:{attrs:{action:null,name:null,"accept-charset":Kv,autocomplete:["on","off"],enctype:t1,method:e1,novalidate:["novalidate"],target:yh}},h1:ne,h2:ne,h3:ne,h4:ne,h5:ne,h6:ne,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:ne,hgroup:ne,hr:ne,html:{attrs:{manifest:null}},i:ne,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:t1,formmethod:e1,formnovalidate:["novalidate"],formtarget:yh,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:ne,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:ne,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:ne,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:Kv,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:ne,noscript:ne,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:ne,param:{attrs:{name:null,value:null}},pre:ne,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:ne,rt:ne,ruby:ne,samp:ne,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:Kv}},section:ne,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:ne,source:{attrs:{src:null,type:null,media:null}},span:ne,strong:ne,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:ne,summary:ne,sup:ne,table:ne,tbody:ne,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:ne,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:ne,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:ne,time:{attrs:{datetime:null}},title:ne,tr:ne,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:ne,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:ne},dD={accesskey:null,class:null,contenteditable:Ci,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Ci,autocorrect:Ci,autocapitalize:Ci,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Ci,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Ci,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Ci,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Ci,"aria-hidden":Ci,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Ci,"aria-multiselectable":Ci,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Ci,"aria-relevant":null,"aria-required":Ci,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},pD="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map((t)=>"on"+t);for(let t of pD)dD[t]=null;class $u{constructor(t,i){this.tags={...xH,...t},this.globalAttrs={...dD,...i},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}$u.default=new $u;function Pu(t,i,l=t.length){if(!i)return"";let s=i.firstChild,r=s&&s.getChild("TagName");return r?t.sliceString(r.from,Math.min(r.to,l)):""}function Yu(t,i=!1){for(;t;t=t.parent)if(t.name=="Element")if(i)i=!1;else return t;return null}function mD(t,i,l){let s=l.tags[Pu(t,Yu(i))];return(s===null||s===void 0?void 0:s.children)||l.allTags}function i1(t,i){let l=[];for(let s=Yu(i);s&&!s.type.isTop;s=Yu(s.parent)){let r=Pu(t,s);if(r&&s.lastChild.name=="CloseTag")break;if(r&&l.indexOf(r)<0&&(i.name=="EndTag"||i.from>=s.firstChild.to))l.push(r)}return l}var gD=/^[:\-\.\w\u00b7-\uffff]*$/;function uD(t,i,l,s,r){let c=/\s*>/.test(t.sliceDoc(r,r+5))?"":">",h=Yu(l,l.name=="StartTag"||l.name=="TagName");return{from:s,to:r,options:mD(t.doc,h,i).map((d)=>({label:d,type:"type"})).concat(i1(t.doc,l).map((d,m)=>({label:"/"+d,apply:"/"+d+c,type:"type",boost:99-m}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function cD(t,i,l,s){let r=/\s*>/.test(t.sliceDoc(s,s+5))?"":">";return{from:l,to:s,options:i1(t.doc,i).map((c,h)=>({label:c,apply:c+r,type:"type",boost:99-h})),validFor:gD}}function kH(t,i,l,s){let r=[],c=0;for(let h of mD(t.doc,l,i))r.push({label:"<"+h,type:"type"});for(let h of i1(t.doc,l))r.push({label:"</"+h+">",type:"type",boost:99-c++});return{from:s,to:s,options:r,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function CH(t,i,l,s,r){let c=Yu(l),h=c?i.tags[Pu(t.doc,c)]:null,d=h&&h.attrs?Object.keys(h.attrs):[],m=h&&h.globalAttrs===!1?d:d.length?d.concat(i.globalAttrNames):i.globalAttrNames;return{from:s,to:r,options:m.map((y)=>({label:y,type:"property"})),validFor:gD}}function AH(t,i,l,s,r){var c;let h=(c=l.parent)===null||c===void 0?void 0:c.getChild("AttributeName"),d=[],m=void 0;if(h){let y=t.sliceDoc(h.from,h.to),b=i.globalAttrs[y];if(!b){let S=Yu(l),w=S?i.tags[Pu(t.doc,S)]:null;b=(w===null||w===void 0?void 0:w.attrs)&&w.attrs[y]}if(b){let S=t.sliceDoc(s,r).toLowerCase(),w='"',k='"';if(/^['"]/.test(S))m=S[0]=='"'?/^[^"]*$/:/^[^']*$/,w="",k=t.sliceDoc(r,r+1)==S[0]?"":S[0],S=S.slice(1),s++;else m=/^[^\s<>='"]*$/;for(let E of b)d.push({label:E,apply:w+E+k,type:"constant"})}}return{from:s,to:r,options:d,validFor:m}}function yD(t,i){let{state:l,pos:s}=i,r=jt(l).resolveInner(s,-1),c=r.resolve(s);for(let h=s,d;c==r&&(d=r.childBefore(h));){let m=d.lastChild;if(!m||!m.type.isError||m.from<m.to)break;c=r=d,h=m.from}if(r.name=="TagName")return r.parent&&/CloseTag$/.test(r.parent.name)?cD(l,r,r.from,s):uD(l,t,r,r.from,s);else if(r.name=="StartTag"||r.name=="IncompleteTag")return uD(l,t,r,s,s);else if(r.name=="StartCloseTag"||r.name=="IncompleteCloseTag")return cD(l,r,s,s);else if(r.name=="OpenTag"||r.name=="SelfClosingTag"||r.name=="AttributeName")return CH(l,t,r,r.name=="AttributeName"?r.from:s,s);else if(r.name=="Is"||r.name=="AttributeValue"||r.name=="UnquotedAttributeValue")return AH(l,t,r,r.name=="Is"?s:r.from,s);else if(i.explicit&&(c.name=="Element"||c.name=="Text"||c.name=="Document"))return kH(l,t,r,s);else return null}function bD(t){return yD($u.default,t)}function TH(t){let{extraTags:i,extraGlobalAttributes:l}=t,s=l||i?new $u(i,l):$u.default;return(r)=>yD(s,r)}var EH=Oo.parser.configure({top:"SingleExpression"}),vD=[{tag:"script",attrs:(t)=>t.type=="text/typescript"||t.lang=="ts",parser:Fv.parser},{tag:"script",attrs:(t)=>t.type=="text/babel"||t.type=="text/jsx",parser:Jv.parser},{tag:"script",attrs:(t)=>t.type=="text/typescript-jsx",parser:Zv.parser},{tag:"script",attrs(t){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type)},parser:EH},{tag:"script",attrs(t){return!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type)},parser:Oo.parser},{tag:"style",attrs(t){return(!t.lang||t.lang=="css")&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type))},parser:mh.parser}],SD=[{name:"style",parser:mh.parser.configure({top:"Styles"})}].concat(pD.map((t)=>({name:t,parser:Oo.parser}))),wD=is.define({name:"html",parser:hD.configure({props:[aa.add({Element(t){let i=/^(\s*)(<\/)?/.exec(t.textAfter);if(t.node.to<=t.pos+i[0].length)return t.continue();return t.lineIndent(t.node.from)+(i[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag"(t){return t.column(t.node.from)+t.unit},Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].length<t.node.to)return t.continue();let i=null,l;for(let s=t.node;;){let r=s.lastChild;if(!r||r.name!="Element"||r.to!=s.to)break;i=s=r}if(i&&!((l=i.lastChild)&&(l.name=="CloseTag"||l.name=="SelfClosingTag")))return t.lineIndent(i.from)+t.unit;return null}}),ls.add({Element(t){let{firstChild:i,lastChild:l}=t;if(!i||i.name!="OpenTag")return null;return{from:i.to,to:l.name=="CloseTag"?l.from:t.to}}}),YE.add({"OpenTag CloseTag":(t)=>t.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),Am=wD.configure({wrap:n1(vD,SD)});function xD(t={}){let i="",l;if(t.matchClosingTags===!1)i="noMatch";if(t.selfClosingTags===!0)i=(i?i+" ":"")+"selfClosing";if(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)l=n1((t.nestedLanguages||[]).concat(vD),(t.nestedAttributes||[]).concat(SD));let s=l?wD.configure({wrap:l,dialect:i}):i?Am.configure({dialect:i}):Am;return new pl(s,[Am.data.of({autocomplete:TH(t)}),t.autoCloseTags!==!1?MH:[],rD().support,FM().support])}var fD=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),MH=re.inputHandler.of((t,i,l,s,r)=>{if(t.composing||t.state.readOnly||i!=l||s!=">"&&s!="/"||!Am.isActiveAt(t.state,i,-1))return!1;let c=r(),{state:h}=c,d=h.changeByRange((m)=>{var y,b,S;let w=h.doc.sliceString(m.from-1,m.to)==s,{head:k}=m,E=jt(h).resolveInner(k,-1),R;if(w&&s==">"&&E.name=="EndTag"){let L=E.parent;if(((b=(y=L.parent)===null||y===void 0?void 0:y.lastChild)===null||b===void 0?void 0:b.name)!="CloseTag"&&(R=Pu(h.doc,L.parent,k))&&!fD.has(R)){let N=k+(h.doc.sliceString(k,k+1)===">"?1:0),q=`</${R}>`;return{range:m,changes:{from:k,to:N,insert:q}}}}else if(w&&s=="/"&&E.name=="IncompleteCloseTag"){let L=E.parent;if(E.from==k-2&&((S=L.lastChild)===null||S===void 0?void 0:S.name)!="CloseTag"&&(R=Pu(h.doc,L,k))&&!fD.has(R)){let N=k+(h.doc.sliceString(k,k+1)===">"?1:0),q=`${R}>`;return{range:G.cursor(k+q.length,-1),changes:{from:k,to:N,insert:q}}}}return{range:m}});if(d.changes.empty)return!1;return t.dispatch([c,h.update(d,{userEvent:"input.complete",scrollIntoView:!0})]),!0});var AD=sh({commentTokens:{block:{open:"<!--",close:"-->"}}}),TD=new Xn,ED=NM.configure({props:[ls.add((t)=>!t.is("Block")||t.is("Document")||s1(t)!=null||DH(t)?void 0:(i,l)=>({from:l.doc.lineAt(i.from).to,to:i.to})),TD.add(s1),aa.add({Document:()=>null}),sa.add({Document:AD})]});function s1(t){let i=/^(?:ATX|Setext)Heading(\d)$/.exec(t.name);return i?+i[1]:void 0}function DH(t){return t.name=="OrderedList"||t.name=="BulletList"}function OH(t,i){let l=t;for(;;){let s=l.nextSibling,r;if(!s||(r=s1(s.type))!=null&&r<=i)break;l=s}return l.to}var RH=jE.of((t,i,l)=>{for(let s=jt(t).resolveInner(l,-1);s;s=s.parent){if(s.from<i)break;let r=s.type.prop(TD);if(r==null)continue;let c=OH(s,r);if(c>l)return{from:l,to:c}}return null});function a1(t){return new li(AD,t,[],"markdown")}var LH=a1(ED),BH=ED.configure([VM,$M,IM,PM,{props:[ls.add({Table:(t,i)=>({from:i.doc.lineAt(t.from).to,to:t.to})})]}]),Em=a1(BH);function zH(t,i){return(l)=>{if(l&&t){let s=null;if(l=/\S*/.exec(l)[0],typeof t=="function")s=t(l);else s=ah.matchLanguageName(t,l,!0);if(s instanceof ah)return s.support?s.support.language.parser:Hu.getSkippingParser(s.load());else if(s)return s.parser}return i?i.parser:null}}class Tm{constructor(t,i,l,s,r,c,h){this.node=t,this.from=i,this.to=l,this.spaceBefore=s,this.spaceAfter=r,this.type=c,this.item=h}blank(t,i=!0){let l=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(t!=null){while(l.length<t)l+=" ";return l}else{for(let s=this.to-this.from-l.length-this.spaceAfter.length;s>0;s--)l+=" ";return l+(i?this.spaceAfter:"")}}marker(t,i){let l=this.node.name=="OrderedList"?String(+DD(this.item,t)[2]+i):"";return this.spaceBefore+l+this.type+this.spaceAfter}}function MD(t,i){let l=[],s=[];for(let r=t;r;r=r.parent){if(r.name=="FencedCode")return s;if(r.name=="ListItem"||r.name=="Blockquote")l.push(r)}for(let r=l.length-1;r>=0;r--){let c=l[r],h,d=i.lineAt(c.from),m=c.from-d.from;if(c.name=="Blockquote"&&(h=/^ *>( ?)/.exec(d.text.slice(m))))s.push(new Tm(c,m,m+h[0].length,"",h[1],">",null));else if(c.name=="ListItem"&&c.parent.name=="OrderedList"&&(h=/^( *)\d+([.)])( *)/.exec(d.text.slice(m)))){let y=h[3],b=h[0].length;if(y.length>=4)y=y.slice(0,y.length-4),b-=4;s.push(new Tm(c.parent,m,m+b,h[1],y,h[2],c))}else if(c.name=="ListItem"&&c.parent.name=="BulletList"&&(h=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(d.text.slice(m)))){let y=h[4],b=h[0].length;if(y.length>4)y=y.slice(0,y.length-4),b-=4;let S=h[2];if(h[3])S+=h[3].replace(/[xX]/," ");s.push(new Tm(c.parent,m,m+b,h[1],y,S,c))}}return s}function DD(t,i){return/^(\s*)(\d+)(?=[.)])/.exec(i.sliceString(t.from,t.from+10))}function o1(t,i,l,s=0){for(let r=-1,c=t;;){if(c.name=="ListItem"){let d=DD(c,i),m=+d[2];if(r>=0){if(m!=r+1)return;l.push({from:c.from+d[1].length,to:c.from+d[0].length,insert:String(r+2+s)})}r=m}let h=c.nextSibling;if(!h)break;c=h}}function r1(t,i){let l=/^[ \t]*/.exec(t)[0].length;if(!l||i.facet(ym)!="\t")return t;let s=ta(t,4,l),r="";for(let c=s;c>0;)if(c>=4)r+="\t",c-=4;else r+=" ",c--;return r+t.slice(l)}var HH=(t={})=>({state:i,dispatch:l})=>{let s=jt(i),{doc:r}=i,c=null,h=i.changeByRange((d)=>{if(!d.empty||!Em.isActiveAt(i,d.from,-1)&&!Em.isActiveAt(i,d.from,1))return c={range:d};let m=d.from,y=r.lineAt(m),b=MD(s.resolveInner(m,-1),r);while(b.length&&b[b.length-1].from>m-y.from)b.pop();if(!b.length)return c={range:d};let S=b[b.length-1];if(S.to-S.spaceAfter.length>m-y.from)return c={range:d};let w=m>=S.to-S.spaceAfter.length&&!/\S/.test(y.text.slice(S.to));if(S.item&&w){let N=S.node.firstChild,q=S.node.getChild("ListItem","ListItem");if(N.to>=m||q&&q.to<m||y.from>0&&!/[^\s>]/.test(r.lineAt(y.from-1).text)||t.nonTightLists===!1){let J=b.length>1?b[b.length-2]:null,ae,ye="";if(J&&J.item)ae=y.from+J.from,ye=J.marker(r,1);else ae=y.from+(J?J.to:0);let nt=[{from:ae,to:m,insert:ye}];if(S.node.name=="OrderedList")o1(S.item,r,nt,-2);if(J&&J.node.name=="OrderedList")o1(J.item,r,nt);return{range:G.cursor(ae+ye.length),changes:nt}}else{let J=CD(b,i,y);return{range:G.cursor(m+J.length+1),changes:{from:y.from,insert:J+i.lineBreak}}}}if(S.node.name=="Blockquote"&&w&&y.from){let N=r.lineAt(y.from-1),q=/>\s*$/.exec(N.text);if(q&&q.index==S.from){let J=i.changes([{from:N.from+q.index,to:N.to},{from:y.from+S.from,to:y.to}]);return{range:d.map(J),changes:J}}}let k=[];if(S.node.name=="OrderedList")o1(S.item,r,k);let E=S.item&&S.item.from<y.from,R="";if(!E||/^[\s\d.)\-+*>]*/.exec(y.text)[0].length>=S.to)for(let N=0,q=b.length-1;N<=q;N++)R+=N==q&&!E?b[N].marker(r,1):b[N].blank(N<q?ta(y.text,4,b[N+1].from)-R.length:null);let L=m;while(L>y.from&&/\s/.test(y.text.charAt(L-y.from-1)))L--;if(R=r1(R,i),_H(S.node,i.doc))R=CD(b,i,y)+i.lineBreak+R;return k.push({from:L,to:m,insert:i.lineBreak+R}),{range:G.cursor(L+R.length+1),changes:k}});if(c)return!1;return l(i.update(h,{scrollIntoView:!0,userEvent:"input"})),!0},NH=HH();function kD(t){return t.name=="QuoteMark"||t.name=="ListMark"}function _H(t,i){if(t.name!="OrderedList"&&t.name!="BulletList")return!1;let l=t.firstChild,s=t.getChild("ListItem","ListItem");if(!s)return!1;let r=i.lineAt(l.to),c=i.lineAt(s.from),h=/^[\s>]*$/.test(r.text);return r.number+(h?0:1)<c.number}function CD(t,i,l){let s="";for(let r=0,c=t.length-2;r<=c;r++)s+=t[r].blank(r<c?ta(l.text,4,t[r+1].from)-s.length:null,r<c);return r1(s,i)}function UH(t,i){let l=t.resolveInner(i,-1),s=i;if(kD(l))s=l.from,l=l.parent;for(let r;r=l.childBefore(s);)if(kD(r))s=r.from;else if(r.name=="OrderedList"||r.name=="BulletList")l=r.lastChild,s=l.to;else break;return l}var qH=({state:t,dispatch:i})=>{let l=jt(t),s=null,r=t.changeByRange((c)=>{let h=c.from,{doc:d}=t;if(c.empty&&Em.isActiveAt(t,c.from)){let m=d.lineAt(h),y=MD(UH(l,h),d);if(y.length){let b=y[y.length-1],S=b.to-b.spaceAfter.length+(b.spaceAfter?1:0);if(h-m.from>S&&!/\S/.test(m.text.slice(S,h-m.from)))return{range:G.cursor(m.from+S),changes:{from:m.from+S,to:h}};if(h-m.from==S&&(!b.item||m.from<=b.item.from||!/\S/.test(m.text.slice(0,b.to)))){let w=m.from+b.from;if(b.item&&b.node.from<b.item.from&&/\S/.test(m.text.slice(b.from,b.to))){let k=b.blank(ta(m.text,4,b.to)-ta(m.text,4,b.from));if(w==m.from)k=r1(k,t);return{range:G.cursor(w+k.length),changes:{from:w,to:m.from+b.to,insert:k}}}if(w<h)return{range:G.cursor(w),changes:{from:w,to:h}}}}}return s={range:c}});if(s)return!1;return i(t.update(r,{scrollIntoView:!0,userEvent:"delete"})),!0},VH=[{key:"Enter",run:NH},{key:"Backspace",run:qH}],OD=xD({matchClosingTags:!1});function RD(t={}){let{codeLanguages:i,defaultCodeLanguage:l,addKeymap:s=!0,base:{parser:r}=LH,completeHTMLTags:c=!0,pasteURLAsLink:h=!0,htmlTagLanguage:d=OD}=t;if(!(r instanceof ph))throw RangeError("Base parser provided to `markdown` should be a Markdown parser");let m=t.extensions?[t.extensions]:[],y=[d.support,RH],b;if(h)y.push(PH);if(l instanceof pl)y.push(l.support),b=l.language;else if(l)b=l;let S=i||b?zH(i,b):void 0;if(m.push(_M({codeParser:S,htmlParser:d.language.parser})),s)y.push(Jl.high(nh.of(VH)));let w=a1(r.configure(m));if(c)y.push(w.data.of({autocomplete:jH}));return new pl(w,y)}function jH(t){let{state:i,pos:l}=t,s=/<[:\-\.\w\u00b7-\uffff]*$/.exec(i.sliceDoc(l-25,l));if(!s)return null;let r=jt(i).resolveInner(l,-1);while(r&&!r.type.isTop){if(r.name=="CodeBlock"||r.name=="FencedCode"||r.name=="ProcessingInstructionBlock"||r.name=="CommentBlock"||r.name=="Link"||r.name=="Image")return null;r=r.parent}return{from:l-s[0].length,to:l,options:IH(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var l1=null;function IH(){if(l1)return l1;let t=bD(new Lv(qe.create({extensions:OD}),0,!0));return l1=t?t.options:[]}var $H=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,PH=re.domEventHandlers({paste:(t,i)=>{var l;let{main:s}=i.state.selection;if(s.empty)return!1;let r=(l=t.clipboardData)===null||l===void 0?void 0:l.getData("text/plain");if(!r||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(r))return!1;if(/^www\./.test(r))r="https://"+r;if(!Em.isActiveAt(i.state,s.from,1))return!1;let c=jt(i.state),h=!1;if(c.iterate({from:s.from,to:s.to,enter:(d)=>{if(d.from>s.from||$H.test(d.name))h=!0},leave:(d)=>{if(d.to<s.to)h=!0}}),h)return!1;return i.dispatch({changes:[{from:s.from,insert:"["},{from:s.to,insert:`](${r})`}],userEvent:"input.paste",scrollIntoView:!0}),!0}});var mt=ct(Js(),1);var Ve=ct(Mn(),1),YH=["source","split","preview"];function XH(t){return t==="source"||t==="split"||t==="preview"}var QH={source:"Source",split:"Split",preview:"Preview"},ND=Wi.define(),GH=qu.define([{tag:Q.heading,color:"var(--console-accent-dim)",fontWeight:"500"},{tag:Q.meta,color:"var(--console-text-muted)"},{tag:Q.emphasis,fontStyle:"italic"},{tag:Q.strong,fontWeight:"600"},{tag:[Q.link,Q.url],color:"var(--console-accent-dim)"},{tag:Q.quote,color:"var(--console-text-dim)"}]),WH=[RD(),$E(GH),re.lineWrapping];function LD(t,i,l){if(i.from<0||i.to<i.from||i.to>t.length)throw RangeError("Selection range is outside the body");return`${t.slice(0,i.from)}${l}${t.slice(i.to)}`}function FH(t,i=[]){return qe.create({doc:t,extensions:[...WH,...i]})}function JH(t,i){if(t.state.doc.toString()===i)return;t.dispatch({changes:{from:0,to:t.state.doc.length,insert:i},annotations:ND.of(!0)})}function ZH(t){let{value:i,onChange:l,onSelectionChange:s,readOnly:r}=t,c=mt.useRef(null),h=mt.useRef(null),d=mt.useRef(i),m=mt.useRef(r),y=mt.useRef(new Tu),b=mt.useRef(l),S=mt.useRef(s),w=mt.useCallback((k)=>{let E=k.state.selection.main;S.current?.(E.empty?null:{from:E.from,to:E.to})},[]);return mt.useEffect(()=>{b.current=l,S.current=s},[l,s]),mt.useEffect(()=>{let k=c.current;if(!k)return;let E=new re({parent:k,state:FH(d.current,[y.current.of([qe.readOnly.of(m.current),re.editable.of(!m.current)]),re.updateListener.of((R)=>{if(!R.docChanged)return;if(R.transactions.some((L)=>L.annotation(ND)===!0))return;b.current(R.state.doc.toString())}),re.updateListener.of((R)=>{if(!R.selectionSet&&!R.docChanged)return;w(R.view)}),re.domEventHandlers({keyup:(R,L)=>(w(L),!1),mouseup:(R,L)=>(window.setTimeout(()=>w(L),0),!1),touchend:(R,L)=>(window.setTimeout(()=>w(L),0),!1)})])});return h.current=E,()=>{if(E.destroy(),h.current===E)h.current=null}},[w]),mt.useEffect(()=>{let k=h.current;if(!k)return;JH(k,i)},[i]),mt.useEffect(()=>{let k=h.current;if(!k)return;k.dispatch({effects:y.current.reconfigure([qe.readOnly.of(r),re.editable.of(!r)])})},[r]),Ve.jsxDEV("div",{ref:c,...ce(kt.source),"aria-label":"Markdown source","data-editor":"codemirror6"},void 0,!1,void 0,this)}var ua="model",KH=[],eN=[{label:"Review",instruction:"Review this selection.",mode:"answer"},{label:"Fact-check",instruction:"Fact-check this selection.",mode:"answer"},{label:"Related",instruction:"What related context do you know?",mode:"answer"},{label:"Rewrite",instruction:"Rewrite this selection. Return only replacement markdown without commentary.",mode:"rewrite"}];function tN(t){return Ve.jsxDEV("section",{...ce(kt.suggestion,kt.answer),"aria-label":"Agent answer",children:[Ve.jsxDEV("div",{...ce(kt.copy),children:[Ve.jsxDEV("strong",{...ce(kt.answerTitle),children:["Answer from ",t.agentId]},void 0,!0,void 0,this),Ve.jsxDEV(Mm,{children:t.response},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Ve.jsxDEV("span",{...ce(kt.spacer)},void 0,!1,void 0,this),t.onReplace&&Ve.jsxDEV(Ge,{type:"button",onClick:t.onReplace,children:"Replace selection"},void 0,!1,void 0,this),Ve.jsxDEV(Ge,{type:"button",variant:"ghost",onClick:t.onDismiss,children:"Dismiss"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function _D(t){let i=Xu(),{value:l,mode:s,onChange:r,onModeChange:c,assist:h,readOnly:d=!1}=t,m=mt.useId(),[y,b]=mt.useState(null),[S,w]=mt.useState(""),[k,E]=mt.useState(ua),[R,L]=mt.useState("answer"),[N,q]=mt.useState({kind:"idle"}),J=h?.agents??KH,ae=s!=="preview",ye=s!=="source",nt=y?l.slice(y.from,y.to):"";mt.useEffect(()=>{if(k!==ua&&!J.some((P)=>P.id===k))E(ua),L("answer"),q({kind:"idle"})},[J,k]);let It=mt.useCallback(()=>{if(!h||!y||S.trim().length===0)return;let P=y;q({kind:"loading"}),(k===ua?i.requestAssist({entityType:h.entityType,id:h.entityId,instruction:S,selection:nt}).then(({suggestion:Ne})=>{q({kind:"suggested",range:P,suggestion:Ne})}):i.requestAgentAnswer({entityType:h.entityType,id:h.entityId,agent:k,instruction:S,selection:nt}).then(({agentId:Ne,response:Be})=>{q({kind:"agent-answer",agentId:Ne,response:Be,range:P,replaceSelection:R==="rewrite"})})).catch((Ne)=>{q({kind:"error",message:Ai(Ne)})})},[R,i,h,k,S,nt,y,l]),Ie=mt.useCallback(()=>{if(N.kind!=="suggested")return;try{r(LD(l,N.range,N.suggestion)),q({kind:"idle"})}catch(P){q({kind:"error",message:Ai(P)})}},[N,r,l]),Tt=mt.useCallback(()=>{if(N.kind!=="agent-answer")return;try{r(LD(l,N.range,N.response)),q({kind:"idle"})}catch(P){q({kind:"error",message:Ai(P)})}},[N,r,l]);return Ve.jsxDEV("div",{...ce(kt.root),children:[Ve.jsxDEV("header",{...ce(kt.toolbar),children:[Ve.jsxDEV(BD,{value:s,onValueChange:(P)=>{if(XH(P))c(P)},children:Ve.jsxDEV(zD,{...ce(kt.modes),"aria-label":"Editor body view",children:YH.map((P)=>Ve.jsxDEV(HD,{value:P,id:`${m}-${P}`,"aria-controls":m,children:QH[P]},P,!1,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this),Ve.jsxDEV("span",{...ce(kt.metadata),children:[l.trim()?l.trim().split(/\s+/).length.toLocaleString():0," ","words"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),h&&ae&&Ve.jsxDEV("section",{...ce(kt.assist),"data-has-selection":y?"true":"false","aria-label":"AI selection rewrite",children:[J.length>0&&Ve.jsxDEV(Zs,{xstyle:kt.select,"aria-label":"Assist target",value:k,onChange:(P)=>{E(P.currentTarget.value),L("answer"),q({kind:"idle"})},children:[Ve.jsxDEV("option",{value:ua,children:"Model"},void 0,!1,void 0,this),J.map((P)=>Ve.jsxDEV("option",{value:P.id,children:[P.label," — ",P.id]},P.id,!0,void 0,this))]},void 0,!0,void 0,this),Ve.jsxDEV(_p,{xstyle:kt.input,type:"text",value:S,placeholder:y?"Instruction for selected text…":k===ua?"Select text to rewrite…":"Select text to ask about…",onChange:(P)=>w(P.currentTarget.value)},void 0,!1,void 0,this),Ve.jsxDEV(Ge,{type:"button",xstyle:kt.run,disabled:!y||S.trim().length===0||N.kind==="loading",onClick:It,children:N.kind==="loading"?"Thinking…":k===ua?"Rewrite selection":"Ask"},void 0,!1,void 0,this),k!==ua&&Ve.jsxDEV("span",{...ce(kt.presets),children:eN.map((P)=>Ve.jsxDEV(Ge,{xstyle:kt.preset,type:"button",size:"xs",variant:P.mode==="rewrite"&&R==="rewrite"?"secondary":"ghost","aria-pressed":P.mode==="rewrite"&&R==="rewrite",onClick:()=>{w(P.instruction),L(P.mode)},children:P.label},P.label,!1,void 0,this))},void 0,!1,void 0,this),y&&Ve.jsxDEV("span",{...ce(kt.assistMeta),children:[nt.length," selected chars"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),N.kind==="suggested"&&Ve.jsxDEV("section",{...ce(kt.suggestion),children:[Ve.jsxDEV("div",{...ce(kt.copy),children:Ve.jsxDEV(Mm,{children:N.suggestion},void 0,!1,void 0,this)},void 0,!1,void 0,this),Ve.jsxDEV("span",{...ce(kt.spacer)},void 0,!1,void 0,this),Ve.jsxDEV(Ge,{type:"button",onClick:Ie,children:"Accept"},void 0,!1,void 0,this),Ve.jsxDEV(Ge,{type:"button",variant:"ghost",onClick:()=>q({kind:"idle"}),children:"Discard"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.kind==="agent-answer"&&Ve.jsxDEV(tN,{agentId:N.agentId,response:N.response,onReplace:N.replaceSelection?Tt:void 0,onDismiss:()=>q({kind:"idle"})},void 0,!1,void 0,this),N.kind==="error"&&Ve.jsxDEV(_t,{tone:"error",className:Re("",kt.status),children:N.message},void 0,!1,void 0,this),Ve.jsxDEV("div",{...ce(kt.panes,ae&&ye&&kt.split),"data-studio-split":ae&&ye?"":void 0,id:m,role:"tabpanel","aria-labelledby":`${m}-${s}`,children:[ae&&Ve.jsxDEV(ZH,{value:l,onChange:r,onSelectionChange:b,readOnly:d},void 0,!1,void 0,this),ye&&Ve.jsxDEV("div",{...ce(kt.preview),"data-studio-preview":"",tabIndex:0,role:"region","aria-label":"Rendered document",children:Ve.jsxDEV(Mm,{presentation:"document",children:l},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var Dm=ct(Js(),1);var Qe=ct(Mn(),1);function qD(t){let{state:i}=t,l=Dm.useRef(null);if(Dm.useEffect(()=>{if(i.kind==="error"&&i.issues?.length&&!l.current?.closest("form")?.querySelector("[data-studio-invalid-field]")){let s=l.current?.querySelector("details");if(s)s.open=!0;l.current?.focus()}},[i]),i.kind==="saved")return i.noop?Qe.jsxDEV(_t,{tone:"good",save:!0,children:"No changes — already saved."},void 0,!1,void 0,this):Qe.jsxDEV(_t,{tone:"good",save:!0,children:"Saved through the entity service."},void 0,!1,void 0,this);if(i.kind==="conflict")return Qe.jsxDEV("section",{...ce(Qt.conflict),role:"alert","data-studio-conflict":"",children:[Qe.jsxDEV("h4",{...ce(Qt.conflictTitle),children:"The manuscript changed elsewhere"},void 0,!1,void 0,this),Qe.jsxDEV("p",{...ce(Qt.conflictCopy),children:i.message},void 0,!1,void 0,this),t.conflictActions]},void 0,!0,void 0,this);if(i.kind==="error")return Qe.jsxDEV("div",{...ce(Qt.validationSummary),ref:l,tabIndex:-1,role:"group","aria-label":"Save failed",children:[Qe.jsxDEV(_t,{tone:"error",save:!0,children:[i.message,i.issues?.length?" Your draft is unchanged.":""]},void 0,!0,void 0,this),i.issues&&i.issues.length>0&&Qe.jsxDEV("details",{children:[Qe.jsxDEV("summary",{children:["Review last save errors (",i.issues.length,")"]},void 0,!0,void 0,this),Qe.jsxDEV("div",{...ce(Qt.validationDetails),tabIndex:0,role:"region","aria-label":"Save validation errors",children:[Qe.jsxDEV("p",{children:"Correct the affected fields, then save again. Fields that are read-only here must be corrected through their owning tool."},void 0,!1,void 0,this),Qe.jsxDEV("ul",{children:i.issues.map((s,r)=>Qe.jsxDEV("li",{children:[s.path.length?`${s.path.join(".")}: `:"",s.message]},r,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this);return null}function VD(t,i){if(t.kind==="saving")return"Saving…";if(t.kind==="conflict")return"Conflict — your changes are not saved";if(t.kind==="error")return"Save failed — your changes are not saved";return i?"Unsaved changes":"Saved"}function Om(t){let{save:i,git:l,baselineCommit:s}=t,r=l?.lastCommit?l.lastCommit.slice(0,7):null;if(i.kind==="saving")return{db:"active",exported:"pending",committed:"pending",commitRef:r};if(i.kind!=="saved")return{db:"pending",exported:"pending",committed:"pending",commitRef:r};if(i.noop)return{db:"done",exported:"done",committed:"done",commitRef:r};if(!l)return{db:"done",exported:"done",committed:"pending",commitRef:r};if(l.hasChanges)return{db:"done",exported:"done",committed:"active",commitRef:r};if(l.lastCommit!==s)return{db:"done",exported:"done",committed:"done",commitRef:r};return{db:"done",exported:"active",committed:"pending",commitRef:r}}function u1(t){return Qe.jsxDEV("span",{...ce(Qt.station,t.state==="done"&&Qt.done,t.state==="active"&&Qt.active),"data-studio-station":t.state,children:[Qe.jsxDEV("span",{...ce(Qt.dot,t.state==="done"&&Qt.doneDot,t.state==="active"&&Qt.activeDot)},void 0,!1,void 0,this),t.label]},void 0,!0,void 0,this)}function UD(t){return Qe.jsxDEV("span",{...ce(Qt.track),"data-studio-flowing":t.flowing?"":void 0,"aria-hidden":"true",children:Qe.jsxDEV("span",{...ce(Qt.flow,t.flowing&&Qt.flowing)},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function jD(t){let{view:i,gitConfigured:l}=t;return Qe.jsxDEV("span",{...ce(Qt.wrap),children:[Qe.jsxDEV("span",{...ce(Qt.stations),children:[Qe.jsxDEV(u1,{state:i.db,label:"entity db"},void 0,!1,void 0,this),Qe.jsxDEV(UD,{flowing:i.db==="done"&&i.exported==="active"},void 0,!1,void 0,this),Qe.jsxDEV(u1,{state:i.exported,label:"exported to file"},void 0,!1,void 0,this),l?Qe.jsxDEV(Qe.Fragment,{children:[Qe.jsxDEV(UD,{flowing:i.exported==="done"&&i.committed==="active"},void 0,!1,void 0,this),Qe.jsxDEV(u1,{state:i.committed,label:"committed"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):Qe.jsxDEV("span",{...ce(Qt.station,Qt.noGit),children:"no git remote"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),i.commitRef&&Qe.jsxDEV("span",{...ce(Qt.ref),children:["last write ",Qe.jsxDEV("b",{...ce(Qt.refValue),children:i.commitRef},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function ID(t){return Qe.jsxDEV(Qi,{mark:"×",title:"Delete this entry?",titleId:"delete-title",cancelLabel:"Keep entry",confirmLabel:t.deleting?"Deleting…":"Delete entry",pending:t.deleting===!0,confirmVariant:"danger",onCancel:t.onCancel,onConfirm:t.onConfirm,children:Qe.jsxDEV("p",{children:["The exported file for ",Qe.jsxDEV("code",{children:t.entityId},void 0,!1,void 0,this)," will be removed. Its history remains recoverable in git."]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var Qu=ct(Js(),1);var kn={root:{keoZOQ:"x1sgpng",kmVPX3:"x6w2896",kaIpWk:"xu4hgxq",kWkggS:"x18s3upu",$$css:!0},head:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"x1qughib",kOIVth:"x883omv",kMwMTN:"x1ar3pfp",$$css:!0},state:{kMwMTN:"xgi1xjn",k63SB2:"x1pd3egz",$$css:!0},warning:{kMwMTN:"x1ra7g20",$$css:!0},error:{kMwMTN:"x1mel2pz",$$css:!0},good:{kMwMTN:"x19k5i5u",$$css:!0},copy:{kogj98:"x108lf0y",kMwMTN:"x1ar3pfp",kGuDYH:"x1j6dyjg",kLWn49:"xfrs9s4",kHjlTd:"xj0a0fe",$$css:!0},actions:{k1xSpc:"x78zum5",kwnvtZ:"x1a02dak",kOIVth:"x1j9xkj6",keoZOQ:"xk9mzb7",$$css:!0},button:{kAzted:"x1rz828m x1c4ya5t",kmVPX3:"x1jmcyos",kGuDYH:"x1k6wstc",$$css:!0},publish:{kVAM5u:"xawfzfr",kWkggS:"x15vqgvx",kMwMTN:"x1um1dla",$$css:!0},complete:{kMwMTN:"x19k5i5u",kMv6JI:"xa9opjo",$$css:!0},confirmation:{kmVPX3:"x12s40zk",kWkggS:"xc1c755",kVVagm:"x1t8o5tu",$$css:!0}};var Dn=ct(Mn(),1);function c1(t){return"success"in t&&t.success===!1}function f1(t){return"needsConfirmation"in t&&t.needsConfirmation===!0}function nN(t){return Dn.jsxDEV(Qi,{mark:"↑",title:`Publish ${t.title} now?`,titleId:"publish-confirm-title",cancelLabel:"Review again",confirmLabel:t.confirming?"Publishing…":"Confirm publication",pending:t.confirming,confirmVariant:"primary",onCancel:t.onCancel,onConfirm:t.onConfirm,children:[Dn.jsxDEV("p",{children:t.preview},void 0,!1,void 0,this),Dn.jsxDEV("p",{...ce(kn.confirmation),children:"This sends the current saved version to an external public provider."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function $D(t){let[i,l]=Qu.useState(null),[s,r]=Qu.useState(null),[c,h]=Qu.useState(null),d={entityType:t.entityType,entityId:t.entityId},m=t.unsaved||i!==null,y=Qu.useCallback(async(w,k)=>{l(k),r(null);try{let E=await t.onAction(w);if(c1(E))throw Error(E.error);if(f1(E))h({args:E.args,preview:E.preview??`This will publish ${t.entityType}:${t.entityId} publicly.`});else if(w.type==="publish")h(null)}catch(E){r(Ai(E))}finally{l(null)}},[t]),b=t.status==="queued"?{type:"remove",...d}:t.status==="failed"?{type:"retry",...d}:{type:"queue",...d},S=t.status==="queued"?"Remove from queue":t.status==="failed"?"Retry":"Add to queue";return Dn.jsxDEV("section",{...ce(kn.root),"aria-label":"Publication actions",children:[Dn.jsxDEV("header",{...ce(kn.head,So.eyebrow),children:[Dn.jsxDEV("span",{children:"Publication"},void 0,!1,void 0,this),Dn.jsxDEV("b",{...ce(kn.state,t.status==="queued"&&kn.warning,t.status==="failed"&&kn.error,t.status==="published"&&kn.good),children:t.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Dn.jsxDEV("p",{...ce(kn.copy),children:"Operates on the saved entity. Publication state is separate from the save pipeline below."},void 0,!1,void 0,this),t.unsaved&&Dn.jsxDEV("p",{...ce(kn.copy,kn.warning),children:"Save changes before changing publication state."},void 0,!1,void 0,this),t.status!=="published"&&Dn.jsxDEV("div",{...ce(kn.actions),children:[Dn.jsxDEV(Ge,{type:"button",variant:"ghost",xstyle:kn.button,disabled:m,onClick:()=>void y(b,"lifecycle"),children:i==="lifecycle"?"Working…":S},void 0,!1,void 0,this),Dn.jsxDEV(Ge,{type:"button",xstyle:[kn.button,kn.publish],disabled:m,onClick:()=>void y({type:"publish",...d},"publish"),children:i==="publish"?"Preparing…":"Publish now"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),t.status==="published"&&Dn.jsxDEV("p",{...ce(kn.copy,kn.complete),children:"Published externally."},void 0,!1,void 0,this),s&&Dn.jsxDEV(_t,{tone:"error",children:s},void 0,!1,void 0,this),c&&Dn.jsxDEV(nN,{title:t.title,preview:c.preview,confirming:i==="confirm",onCancel:()=>h(null),onConfirm:()=>void y({type:"publish",...d,confirmation:c.args},"confirm")},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var Ti=ct(Js(),1);var Gu={versions:{k1xSpc:"xrvj5dj",kumcoG:"xcjjqqt",kOIVth:"xou54vl",k1JLwA:"x4jmfmw",$$css:!0},version:{kzqmXN:"xh8yej3",k7Eaqz:"xeuugli",kZKoxP:"x1isuwpm",kMv6JI:"xa9opjo",kGuDYH:"xfifm61",kMwMTN:"xqvuw85",kWkggS:"x18s3upu",kmVPX3:"xc7ga6q",$$css:!0},actions:{k1xSpc:"x78zum5",kwnvtZ:"x1a02dak",kOIVth:"x167g77z",keoZOQ:"x14vqqas",$$css:!0}};var At=ct(Mn(),1);function PD(t,i){return JSON.stringify({frontmatter:t,body:i},null,2)}function WD(t){let i=Xu(),[l,s]=Ti.useState(!1),[r,c]=Ti.useState(null),[h,d]=Ti.useState(!1),[m,y]=Ti.useState(null),[b,S]=Ti.useState(!1),[w,k]=Ti.useState(!1),E=Ti.useRef(0),R=Ti.useRef(null);Ti.useEffect(()=>()=>{E.current+=1},[]);let L=PD(t.draft,t.body);Ti.useEffect(()=>S(!1),[L]);let N=async()=>{S(!1);try{await navigator.clipboard.writeText(L),S(!0)}catch{y("Copy unavailable. Select Your version manually."),s(!0)}},q=async()=>{let J=++E.current;d(!0),c(null),y(null);try{let ae=await i.fetchEntity(t.entity.entityType,t.entity.id);if(E.current===J)c(ae)}catch(ae){if(E.current===J)y(GD(ae,"Latest version could not be loaded")||"Latest version could not be loaded")}finally{if(E.current===J)d(!1)}};return At.jsxDEV(At.Fragment,{children:[At.jsxDEV("div",{...ce(Gu.actions),children:[At.jsxDEV("span",{ref:R,children:At.jsxDEV(Ge,{type:"button",variant:"ghost",onClick:()=>{s(!0),q()},children:"Compare changes"},void 0,!1,void 0,this)},void 0,!1,void 0,this),At.jsxDEV(Ge,{type:"button",variant:"ghost",onClick:()=>void N(),children:"Copy my version"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),b&&At.jsxDEV(_t,{children:"Version copied, including properties and body."},void 0,!1,void 0,this),At.jsxDEV(YD,{open:l,onOpenChange:(J)=>{if(s(J),!J)k(!1),E.current+=1,d(!1)},children:At.jsxDEV(XD,{"aria-describedby":"conflict-comparison-description",onCloseAutoFocus:(J)=>{J.preventDefault(),R.current?.querySelector("button")?.focus()},children:[At.jsxDEV(QD,{children:"Compare changes"},void 0,!1,void 0,this),At.jsxDEV("p",{id:"conflict-comparison-description",children:"Your draft is unchanged. Review both versions before choosing to replace it."},void 0,!1,void 0,this),m&&At.jsxDEV(_t,{tone:"error",children:m},void 0,!1,void 0,this),At.jsxDEV("div",{...ce(Gu.versions),children:[At.jsxDEV("label",{children:["Your version",At.jsxDEV("textarea",{...ce(Gu.version),readOnly:!0,value:L},void 0,!1,void 0,this)]},void 0,!0,void 0,this),At.jsxDEV("label",{children:["Latest saved version",At.jsxDEV("textarea",{...ce(Gu.version),readOnly:!0,value:r?PD(r.frontmatter,r.body):"Not loaded"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),At.jsxDEV("div",{...ce(Gu.actions),children:[At.jsxDEV(Ge,{type:"button",variant:"ghost",disabled:h,onClick:()=>void q(),children:h?"Loading latest…":"Retry latest"},void 0,!1,void 0,this),At.jsxDEV(Ge,{type:"button",variant:"ghost",onClick:()=>s(!1),children:"Keep editing my version"},void 0,!1,void 0,this),At.jsxDEV(Ge,{type:"button",disabled:!r||h||m!==null,onClick:()=>k(!0),children:"Use latest version"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),w&&r&&At.jsxDEV(Qi,{title:"Replace your local draft?",titleId:"replace-conflicted-draft",mark:"↩",cancelLabel:"Keep my draft",confirmLabel:"Replace with latest",onCancel:()=>k(!1),onConfirm:()=>{t.onUseLatest(r),k(!1),s(!1)},children:At.jsxDEV("p",{children:"This discards your local edits. Copy your version first if you want to keep it. Nothing is written to the server."},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Wu(t){return{entity:t,draft:{...t.frontmatter},body:t.body}}var fa=ct(Js(),1);var ca={controls:{k8WAf4:"xxlmvz2",kMv6JI:"x5ddh9m",kGuDYH:"x4z9k3i",kMwMTN:"x1ar3pfp",$$css:!0},row:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kwnvtZ:"x1a02dak",kOIVth:"x883omv",$$css:!0},filters:{kVAEAm:"x1n2onr6",$$css:!0},summary:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kOIVth:"x1j9xkj6",kAzted:"x141feeh x1c4ya5t",kg3NbH:"xfoe8qy",kMzoRj:"xmkeg23",ksu8eU:"x1y0btm7",kVAM5u:"x8tuc8h",kaIpWk:"xu4hgxq",kWkggS:"x18s3upu",kMwMTN:"xgi1xjn",kGuDYH:"x4z9k3i",kB88ic:"xe8uvvx",kkrTdU:"x1ypdohk",kGqHtl:"x1i5lizr",$$css:!0},open:{kVAM5u:"xmt0h0j",kMwMTN:"xqvuw85",$$css:!0},panel:{k1xSpc:"xrvj5dj",kOIVth:"x1v2ro7d",kumcoG:"x1rdfzu x4jmfmw",kVAEAm:"x10l6tqk xip7ul3",kY2c9j:"x1w0boku",k87sOh:"x1d1n87m xl7365u",kLqNvP:"x1o0tod",kzqmXN:"x3p9ev8 x1dbdljh",ks0D6T:"x193iq5w",keoZOQ:"xdj266r x7xdyrl",kmVPX3:"x1gnqi22 x1bf66pj",kMzoRj:"xmkeg23 xwddm5z",ksu8eU:"x1y0btm7",kVAM5u:"x8tuc8h",kaIpWk:"xhpnuu7",kWkggS:"x18s3upu x1norit2",kGVxlE:"x1mxzbga xlc8tcj",$$css:!0},state:{keTefX:"xvc5jky",kMwMTN:"x1ar3pfp",kMv6JI:"xa9opjo",kGuDYH:"x1j6dyjg",khDVqt:"xuxw1ft",$$css:!0}};var ft=ct(Mn(),1),iN=250;function JD(t){let[i,l]=fa.useState(t.query.q);fa.useEffect(()=>l(t.query.q),[t.query.q]);let s=fa.useRef(t.onChange);s.current=t.onChange;let r=fa.useRef(t.query);r.current=t.query,fa.useEffect(()=>{if(i===r.current.q)return;let y=window.setTimeout(()=>{let b=hr.safeParse({...r.current,q:i,offset:0});if(b.success)s.current(b.data)},iN);return()=>window.clearTimeout(y)},[i]);let c=(y)=>{let b=hr.safeParse({...t.query,...y,offset:0});if(b.success)t.onChange(b.data)},h=[...new Set([...t.fields.find((y)=>y.name==="status")?.options??[],t.query.status].filter(Boolean))],d=(t.query.visibility==="all"?0:1)+(t.query.status?1:0),m=Boolean(t.query.q)||d>0||t.query.sort!=="updated-desc";return ft.jsxDEV("section",{className:Re("studio-collection-controls",ca.controls),"aria-label":"Collection search and filters",children:ft.jsxDEV("div",{className:Re("",ca.row),children:[ft.jsxDEV(FD,{label:"Search title or content",placeholder:"Search title or content",value:i,wide:!0,onChange:l},void 0,!1,void 0,this),ft.jsxDEV("details",{className:Re("",ca.filters),children:[ft.jsxDEV("summary",{className:Re("",ca.summary,d>0&&ca.open),children:["Filter and sort",d>0?` · ${d}`:""]},void 0,!0,void 0,this),ft.jsxDEV("div",{className:Re("",ca.panel),children:[ft.jsxDEV("label",{children:["Visibility",ft.jsxDEV(Zs,{value:t.query.visibility,onChange:(y)=>c({visibility:y.target.value}),children:[ft.jsxDEV("option",{value:"all",children:"All available"},void 0,!1,void 0,this),ft.jsxDEV("option",{value:"public",children:"Public"},void 0,!1,void 0,this),ft.jsxDEV("option",{value:"shared",children:"Shared"},void 0,!1,void 0,this),ft.jsxDEV("option",{value:"restricted",children:"Restricted"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),h.length>0&&ft.jsxDEV("label",{children:["Status",ft.jsxDEV(Zs,{value:t.query.status,onChange:(y)=>c({status:y.target.value}),children:[ft.jsxDEV("option",{value:"",children:"All statuses"},void 0,!1,void 0,this),h.map((y)=>ft.jsxDEV("option",{value:y,children:y},y,!1,void 0,this))]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),ft.jsxDEV("label",{children:["Sort",ft.jsxDEV(Zs,{value:t.query.sort,onChange:(y)=>c({sort:y.target.value}),children:[ft.jsxDEV("option",{value:"updated-desc",children:"Recently updated"},void 0,!1,void 0,this),ft.jsxDEV("option",{value:"updated-asc",children:"Least recently updated"},void 0,!1,void 0,this),ft.jsxDEV("option",{value:"created-desc",children:"Newest created"},void 0,!1,void 0,this),ft.jsxDEV("option",{value:"created-asc",children:"Oldest created"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),m&&ft.jsxDEV(ft.Fragment,{children:[ft.jsxDEV("span",{className:Re("",ca.state),children:[t.total," ",t.total===1?"match":"matches"]},void 0,!0,void 0,this),ft.jsxDEV(Ge,{type:"button",variant:"ghost","aria-label":"Clear search and filters",onClick:()=>{l(""),t.onChange(hr.parse({limit:t.query.limit}))},children:"Clear"},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 j=ct(Mn(),1);function uO(t,i){if(!t.hasBody)return"details";return i??(t.format==="raw"?"preview":"details")}var oN={entityType:"",format:"frontmatter",isSingleton:!1,hasBody:!1,fields:[]},lN=["details","write","preview"];function zm(t){return Object.fromEntries(t.flatMap((i)=>i.badge===void 0?[]:[[i.id,i.badge]]))}function Fu(t){return j.jsxDEV("div",{className:Re("studio",Sn.frame,So.operatorRoles),"data-studio-shell":"",children:[j.jsxDEV(Hm,{contextLabel:"Studio"},void 0,!1,void 0,this),j.jsxDEV("main",{"aria-label":"Studio status",children:j.jsxDEV(_t,{tone:t.error?"error":void 0,className:Re("",Sn.boot),children:[t.message,t.onRetry&&j.jsxDEV(Ge,{type:"button",variant:"ghost",onClick:t.onRetry,children:"Retry"},void 0,!1,void 0,this),t.onHome&&j.jsxDEV(Ge,{type:"button",variant:"ghost",onClick:t.onHome,children:"Open Studio"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function cO(t){let i=v1();return j.jsxDEV("div",{className:Re("studio",Sn.frame,So.operatorRoles),"data-view":"account","data-studio-shell":"",children:[j.jsxDEV(Hm,{contextLabel:"Account",navigation:{types:t.types,workspaces:t.workspaces,activeEntityType:null,activeWorkspaceId:t.workspaceId,workspaceBadges:zm(t.workspaces),selectEntityType:t.selectEntityType,selectWorkspace:t.selectWorkspace}},void 0,!1,void 0,this),j.jsxDEV("div",{className:bh("",Ei.body,dr.shell,i&&dr.shellCollapsed),"data-studio-body":"",children:[j.jsxDEV("aside",{className:bh("rail",dr.rail),children:j.jsxDEV(S1,{renderMode:"desktop",types:t.types,active:null,onSelect:t.selectEntityType,workspaces:t.workspaces,activeWorkspace:t.workspaceId,workspaceBadges:zm(t.workspaces),onSelectWorkspace:t.selectWorkspace},void 0,!1,void 0,this)},void 0,!1,void 0,this),j.jsxDEV("main",{className:nO("account-studio-pane",tO.pane),children:t.children},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function fO(t){let i=v1(),{activeWorkspaceId:l,types:s,workspaces:r,workspaceError:c,declarativeWorkspaceData:h,workspaceQuery:d,entityType:m,entities:y,entityOffset:b,entityLimit:S,entityTotal:w,entityListLoading:k,schema:E,editor:R,fieldAssistState:L,bodyMode:N,mobilePane:q,syncStatus:J,baselineCommit:ae,agentTargets:ye,deleting:nt,hasUnsavedChanges:It,navigationBlocked:Ie,dispatchEditor:Tt,setFieldAssistState:P,setBodyMode:st,setMobilePane:Ne,backToList:Be,selectEntityType:Gn,selectWorkspace:W,changeEntityPage:he,openWorkspaceEntity:de,openWorkspaceLaunch:it,performPublishingAction:$e,performDeclarativeAction:Mi,onWorkspaceQueryChange:Lo,startCreate:eo,openEntity:On,runFieldAssist:Rt,applyFieldAssist:Bo,save:tn,remove:pa,onNavigationReset:ot,onNavigationProceed:Lt}=t,{mode:_e,draft:Y,body:ai,save:lt,deleteOpen:Ut}=R,Et=s.find((ee)=>ee.entityType===m),be=r.find((ee)=>ee.id===l),Ke=E??oN,zo=m??"",ma=!l&&_e.kind!=="browse",Fe=Et?.capabilities.canCreate===!0,Di=_e.kind==="create"?Fe:_e.kind==="edit"&&Et?.capabilities.canUpdate===!0,Oi=Et?.capabilities.canDelete===!0,to=Et?.capabilities.canPublish===!0,no=Di&&Et?.capabilities.canAssist===!0,gl=_e.kind==="edit"?Et?.isSingleton?Lm(Et.label):Rm(_e.entity):_e.kind==="create"?`New ${Et?.label??m}`:Et?.label??m,io=be?.label??(Et?.isSingleton?Lm(Et.label):Et?.label)??m??"Studio",yl=Lm(io),Ho=J?.git?.hasChanges===!0,rs=r.find((ee)=>ee.pluginId==="content-pipeline"&&ee.entityTypes.includes(zo)),us=w,gr=Math.min(b+(y?.length??S),w),Ku=zm(r),Ri=Boolean(t.collectionQuery.q)||t.collectionQuery.visibility!=="all"||Boolean(t.collectionQuery.status),Li={kicker:"Content library",access:b1("trusted"),title:Et?.label??m??"Library",metadata:[Ri?`${us} matching ${us===1?"entity":"entities"}`:`${us} ${us===1?"entity":"entities"}`,...Ho?["Sync pending"]:[]],totals:[]},bl=y1(Ke.fields)&&_e.kind==="edit"?g1(_e.entity):null,No={kicker:Ke.isSingleton?`${lO(m,null)} / singleton`:io,access:b1("trusted"),title:gl??"Editor",metadata:_e.kind==="create"?[`${yl} · new`]:bl?[`${yl} · ${bl}`]:[],totals:[]},vl=be&&h?rO(be,h.view):null;return j.jsxDEV("div",{className:Re("studio",Sn.frame,So.operatorRoles),"data-studio-shell":"","data-view":l?"workspace":ma?"editor":"listing",children:[j.jsxDEV(Hm,{contextLabel:io,onContextClick:ma&&!Ke.isSingleton?Be:void 0,navigation:{types:s,workspaces:r,activeEntityType:l?null:m,activeWorkspaceId:l,workspaceBadges:Ku,selectEntityType:Gn,selectWorkspace:W}},void 0,!1,void 0,this),j.jsxDEV("div",{className:bh("",Ei.body,dr.shell,i&&dr.shellCollapsed),"data-studio-body":"",children:[j.jsxDEV("aside",{className:bh("rail",dr.rail),children:j.jsxDEV(S1,{renderMode:"desktop",types:s,active:l?null:m,onSelect:Gn,workspaces:r,activeWorkspace:l,workspaceBadges:zm(r),onSelectWorkspace:W},void 0,!1,void 0,this)},void 0,!1,void 0,this),l?c&&!h?j.jsxDEV("main",{className:Sb(""),children:j.jsxDEV(_t,{tone:"error",children:[c,j.jsxDEV(Ge,{type:"button",variant:"ghost",onClick:t.onRetryRead,children:"Retry"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this):h&&vl?j.jsxDEV("div",{className:Sb("studio-workspace-frame"),children:[c&&j.jsxDEV(_t,{tone:"error",children:["Showing previously loaded content. ",c,j.jsxDEV(Ge,{type:"button",variant:"ghost",onClick:t.onRetryRead,children:"Retry"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),j.jsxDEV(Bm,{model:vl,...vl.primaryAction?{action:j.jsxDEV(KD,{action:vl.primaryAction,primary:!0,onAction:Mi,components:xb},void 0,!1,void 0,this)}:{}},void 0,!1,void 0,this),j.jsxDEV(eO,{data:h,components:xb,renderHead:!1,onOpenEntity:de,onLaunch:it,onAction:Mi,query:d,...l?{onQueryChange:(ee)=>Lo(l,ee,ee)}:{}},l,!1,void 0,this)]},void 0,!0,void 0,this):null:!ma?j.jsxDEV("main",{className:Re("",Sn.listing,Np.inset),"data-studio-library":"","aria-busy":k,children:[t.readError&&j.jsxDEV(_t,{tone:"error",children:[y?.length?"Showing previously loaded entries. ":"",t.readError,j.jsxDEV(Ge,{type:"button",variant:"ghost",onClick:t.onRetryRead,children:"Retry"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),j.jsxDEV(Bm,{model:Li,action:j.jsxDEV(Ge,{type:"button",disabled:!Fe||!E,onClick:eo,children:["New ",yl.toLowerCase()]},void 0,!0,void 0,this)},void 0,!1,void 0,this),!Ke.isSingleton&&j.jsxDEV(JD,{query:t.collectionQuery,fields:Ke.fields,total:w,onChange:t.onCollectionQueryChange},void 0,!1,void 0,this),!Ke.isSingleton&&w>0&&j.jsxDEV("nav",{className:Re("listing-pagination",Sn.pagination),"aria-label":`${Et?.label??"Entity"} pagination`,children:[j.jsxDEV("span",{className:Re("",Sn.range),"aria-live":"polite",children:[b+1,"–",gr," of ",w]},void 0,!0,void 0,this),j.jsxDEV("span",{className:Re("",Sn.pager),children:[j.jsxDEV(Ge,{type:"button",variant:"ghost",disabled:k||b===0,onClick:()=>he(Math.max(0,b-S)),children:"Previous"},void 0,!1,void 0,this),j.jsxDEV(Ge,{type:"button",variant:"ghost",disabled:k||b+S>=w,onClick:()=>he(b+S),children:"Next"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),k&&j.jsxDEV(_t,{className:Re("",Sn.empty),children:"Loading entries…"},void 0,!1,void 0,this),!k&&(y??[]).map((ee,Rn)=>j.jsxDEV("button",{type:"button",className:Re("",Sn.row,as.listingRow),"data-studio-record":"",onClick:()=>On(ee.id),children:[j.jsxDEV("span",{className:Re("",Sn.index),children:String(b+Rn+1).padStart(2,"0")},void 0,!1,void 0,this),j.jsxDEV("span",{className:Re("",Sn.title),title:ee.id,children:[Rm(ee),y1(Ke.fields)&&j.jsxDEV("span",{className:Re("studio-publication-state",as.publication),children:g1(ee)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),j.jsxDEV("span",{className:Re("",Sn.updated),children:iO(ee.updated)},void 0,!1,void 0,this)]},ee.id,!0,void 0,this)),!t.readError&&!k&&y?.length===0&&j.jsxDEV(_t,{className:Re("",Sn.empty),children:t.collectionQuery.q||t.collectionQuery.status||t.collectionQuery.visibility!=="all"?"No entries match these filters. Clear or change the filters to try again.":Fe?"Nothing here yet — start the first entry.":"No entries are available in this collection."},void 0,!1,void 0,this)]},void 0,!0,void 0,this):j.jsxDEV("form",{role:"main","aria-label":"Document editor",className:Re("",Ei.editor),"data-studio-editor":"","data-mobile-pane":q,onInvalidCapture:(ee)=>{if(q==="details")return;ee.preventDefault();let Rn=ee.currentTarget.querySelector("input:invalid, select:invalid, textarea:invalid");if(ee.target!==Rn)return;Ne("details"),requestAnimationFrame(()=>{if(Rn.isConnected)Rn.focus(),Rn.reportValidity()})},onSubmit:(ee)=>{if(ee.preventDefault(),Di&&lt.kind!=="saving")tn()},onKeyDown:(ee)=>{if((ee.ctrlKey||ee.metaKey)&&!ee.altKey&&!ee.shiftKey&&ee.key.toLowerCase()==="s"){if(ee.target instanceof HTMLElement&&ee.target.closest('[role="dialog"], [role="alertdialog"]'))return;if(ee.preventDefault(),Di&&lt.kind!=="saving")ee.currentTarget.requestSubmit()}},children:[j.jsxDEV(Bm,{model:No,appearance:"document",action:j.jsxDEV(Ge,{type:"submit",className:"studio-editor-head-save",variant:It?"default":"outline",title:"Save changes (Ctrl+S or ⌘S)","aria-keyshortcuts":"Control+s Meta+s",disabled:!Di||lt.kind==="saving",children:lt.kind==="saving"?"Saving…":"Save changes"},void 0,!1,void 0,this)},void 0,!1,void 0,this),j.jsxDEV("div",{className:Re("studio-mobile-tabs",as.mobileModes),children:j.jsxDEV(h1,{children:[j.jsxDEV(d1,{asChild:!0,children:j.jsxDEV("button",{type:"button","aria-label":"Editor view",className:Re("",as.paneTrigger,So.eyebrow),children:[q==="details"?"Properties":q==="write"?"Source":"Preview",j.jsxDEV("span",{"aria-hidden":"true",children:"⌄"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),j.jsxDEV(p1,{align:"start",children:lN.map((ee)=>j.jsxDEV(m1,{disabled:ee!=="details"&&!Ke.hasBody,onSelect:()=>{if(Ne(ee),ee==="write")st("source");if(ee==="preview")st("preview")},children:ee==="details"?"Properties":ee==="write"?"Source":"Preview"},ee,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),j.jsxDEV("aside",{className:Re("",Ei.colophon),children:[j.jsxDEV("div",{className:Re("",as.propertiesHead),children:[j.jsxDEV("h2",{className:Re("",as.propertiesLabel,So.eyebrow),children:"Properties"},void 0,!1,void 0,this),_e.kind==="create"||bl?j.jsxDEV("span",{className:Re("",as.propertiesLabel,So.eyebrow),children:_e.kind==="create"?"New":bl},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),j.jsxDEV("fieldset",{className:Re("",Ei.fields),disabled:!Di,children:[Ke.fields.filter((ee)=>oO(ee,Y)).map((ee)=>j.jsxDEV("div",{"data-studio-field-assist":"",children:[j.jsxDEV(aO,{descriptor:ee,issues:lt.kind==="error"?lt.issues:void 0,value:Y[ee.name],onChange:(Rn)=>Tt({type:"fieldChanged",descriptor:ee,raw:Rn})},void 0,!1,void 0,this),no&&Ke.hasBody&&ai.trim().length>0&&j.jsxDEV(sO,{descriptor:ee,state:L,onRun:Rt,onApply:Bo,onDiscard:()=>P({kind:"idle"})},void 0,!1,void 0,this)]},`${zo}:${_e.kind==="edit"?_e.entity.id:"create"}:${ee.name}`,!0,void 0,this)),Ke.format==="raw"&&j.jsxDEV(_t,{children:"This type is raw markdown — the whole document is the body."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),rs&&_e.kind==="edit"&&to&&j.jsxDEV($D,{entityType:zo,entityId:_e.entity.id,title:Rm(_e.entity),status:typeof _e.entity.frontmatter.status==="string"?_e.entity.frontmatter.status:"draft",unsaved:It,onAction:$e},void 0,!1,void 0,this)]},void 0,!0,void 0,this),j.jsxDEV("section",{className:Re("",Ei.manuscript),children:Ke.hasBody?j.jsxDEV(_D,{value:ai,mode:N,onChange:(ee)=>Tt({type:"bodyChanged",body:ee}),onModeChange:st,readOnly:!Di,..._e.kind==="edit"&&no?{assist:{entityType:zo,entityId:_e.entity.id,agents:ye}}:{}},void 0,!1,void 0,this):j.jsxDEV(_t,{className:Re("",Ei.empty),children:"This type has no body — its fields are the whole record."},void 0,!1,void 0,this)},void 0,!1,void 0,this),j.jsxDEV("footer",{className:Re("",as.pipeline,Ei.pipeline),"data-studio-save-bar":"",children:[j.jsxDEV("div",{children:[j.jsxDEV("span",{role:"status","aria-live":"polite",title:"Saved means stored in this Brain. File export and Git synchronization are separate.",children:VD(lt,It)},void 0,!1,void 0,this),t.readError&&j.jsxDEV(_t,{tone:"error",children:["Your draft is unchanged. ",t.readError,j.jsxDEV(Ge,{type:"button",variant:"ghost",onClick:t.onRetryRead,children:"Retry"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),J?.directorySync&&j.jsxDEV("details",{children:[j.jsxDEV("summary",{children:"Sync details"},void 0,!1,void 0,this),j.jsxDEV(jD,{view:Om({save:lt,git:J.git,baselineCommit:ae}),gitConfigured:J.git!==null},void 0,!1,void 0,this)]},void 0,!0,void 0,this),j.jsxDEV(qD,{state:J?.directorySync&&lt.kind==="saved"&&!lt.noop?{kind:"idle"}:lt,conflictActions:_e.kind==="edit"?j.jsxDEV(WD,{entity:_e.entity,draft:Y,body:ai,onUseLatest:(ee)=>Tt({type:"documentOpened",document:Wu(ee)})},`${_e.entity.entityType}:${_e.entity.id}`,!1,void 0,this):void 0},void 0,!1,void 0,this)]},void 0,!0,void 0,this),j.jsxDEV("span",{className:Re("",Ei.spacer)},void 0,!1,void 0,this),_e.kind==="edit"&&!Ke.isSingleton&&Oi&&j.jsxDEV(j.Fragment,{children:[j.jsxDEV("span",{className:Re("",Ei.desktop),children:j.jsxDEV(Ge,{type:"button",variant:"danger",xstyle:Ei.danger,onClick:()=>Tt({type:"deleteRequested"}),children:"Delete"},void 0,!1,void 0,this)},void 0,!1,void 0,this),j.jsxDEV("span",{className:Re("",Ei.more),children:j.jsxDEV(h1,{children:[j.jsxDEV(d1,{className:ZD("ghost","icon"),"aria-label":"More document actions",children:"•••"},void 0,!1,void 0,this),j.jsxDEV(p1,{align:"end",children:j.jsxDEV(m1,{variant:"destructive",onSelect:()=>Tt({type:"deleteRequested"}),children:"Delete entry"},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,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Ut&&_e.kind==="edit"&&Oi&&j.jsxDEV(ID,{entityId:_e.entity.id,deleting:nt,onCancel:()=>Tt({type:"deleteCancelled"}),onConfirm:pa},void 0,!1,void 0,this),Ie&&j.jsxDEV(Qi,{mark:"↩",title:"Discard unsaved changes?",titleId:"discard-navigation-title",cancelLabel:"Keep editing",confirmLabel:"Discard and continue",confirmVariant:"danger",onCancel:ot,onConfirm:Lt,children:j.jsxDEV("p",{children:"This draft has not been saved. Continue only if you want to leave it behind."},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function hO(t){let{studioCreatePrefill:i,...l}=t;return l}function dO(t,i,l){let s=vb.safeParse(t);if(!s.success||s.data.studioCreatePrefill.entityType!==i)return;return l(),{title:s.data.studioCreatePrefill.title,...s.data.studioCreatePrefill.body?{body:s.data.studioCreatePrefill.body}:{},backlink:s.data.studioCreatePrefill.backlink}}function pO(t,i){let l=vh(t);if(!i)return{draft:l,body:""};if(t.some((r)=>r.name==="title"))l.title=i.title;let s=`## Source
242
242
 
243
243
  [Open the Inbox item](${i.backlink})`;return{draft:l,body:i.body?`${i.body}
244
244
 
245
- ${s}`:s}}function oN(t,i,l){let s={...t};if(l==="")return delete s[i.name],s;if(i.widget==="boolean")return s[i.name]=l===!0,s;if(i.widget==="number")return s[i.name]=Number(l),s;return s[i.name]=l,s}var bh={mode:{kind:"browse"},draft:{},body:"",save:{kind:"idle"},deleteOpen:!1};function pO(t){if(t.mode.kind==="browse")return!1;if(t.mode.kind==="create")return!0;return t.body!==t.mode.entity.body||JSON.stringify(t.draft)!==JSON.stringify(t.mode.entity.frontmatter)}function mO(t,i){switch(i.type){case"collectionChanged":return bh;case"documentOpened":return{mode:{kind:"edit",entity:i.document.entity},draft:i.document.draft,body:i.document.body,save:i.save??{kind:"idle"},deleteOpen:!1};case"creationStarted":if(t.mode.kind!=="browse")return t;return{mode:{kind:"create"},draft:i.draft,body:i.body??"",save:{kind:"idle"},deleteOpen:!1};case"browseRequested":return bh;case"fieldChanged":return t.mode.kind==="browse"?t:{...t,draft:oN(t.draft,i.descriptor,i.raw)};case"fieldAssistApplied":return t.mode.kind==="browse"?t:{...t,draft:{...t.draft,[i.field]:i.suggestion}};case"bodyChanged":return t.mode.kind==="browse"?t:{...t,body:i.body};case"saveStarted":return t.mode.kind==="browse"?t:{...t,save:{kind:"saving"}};case"saveFailed":return t.mode.kind==="browse"?t:{...t,save:i.save};case"deleteRequested":return t.mode.kind==="edit"?{...t,deleteOpen:!0}:t;case"deleteCancelled":return t.deleteOpen?{...t,deleteOpen:!1}:t;case"deleteSucceeded":return t.mode.kind==="edit"?bh:t;case"deleteFailed":return t.mode.kind==="edit"?{...t,deleteOpen:!1,save:{kind:"error",message:i.message}}:t}}function gO(t,i,l){return{studioChatHandoff:{version:1,sourceId:t,itemId:i,label:l,prompt:"Help me understand this Inbox item and decide what to do next."}}}function yO(t){if(typeof t!=="object"||t===null)return null;let i=Reflect.get(t,"studioChatHandoff");if(typeof i!=="object"||i===null)return null;let l=Reflect.get(i,"version"),s=Reflect.get(i,"sourceId"),r=Reflect.get(i,"itemId"),c=Reflect.get(i,"label"),h=Reflect.get(i,"prompt");if(l!==1||typeof s!=="string"||!/^[a-z][a-z0-9-]*$/.test(s)||s.length>64||typeof r!=="string"||r.trim().length===0||r.length>300||typeof c!=="string"||c.trim().length===0||c.length>160||typeof h!=="string"||h.trim().length===0||h.length>1e4)return null;return{sourceId:s,itemId:r,label:c,prompt:h}}function Wu(t){if(t instanceof rr)switch(t.status){case 401:return"Your session is no longer authenticated. Sign in again in another tab, then retry here. Keep this tab open to preserve your draft.";case 403:return"You do not currently have permission to read this content. Ask an administrator to check access, then retry.";case 404:return"This content is unavailable. It may have moved, been removed, or be outside your access. Choose another destination or retry.";case 429:return"Studio is receiving too many requests. Wait briefly before retrying."}return`Studio could not load this data. Check your connection or retry later. ${Ei(t)}`}var bO=new Set(["offset","limit"]);function vO(t,i){if(t?.urlQuery!==!0)return{};let l={};for(let[s,r]of new URLSearchParams(i))if(!bO.has(s))l[s]=r;return l}function w1(t){let i=new URLSearchParams,l=Object.entries(t).filter(([r,c])=>!bO.has(r)&&c!==void 0&&(typeof c!=="number"||Number.isFinite(c))).sort(([r],[c])=>r.localeCompare(c));for(let[r,c]of l)i.set(r,String(c));let s=i.toString();return s?`?${s}`:""}function Fu(t,i){return`${t}${w1(i)}`}function x1(t,i,l,s){if(s!==i)return;t.replace(Fu(i,l))}function k1(t){let i=Qu.safeParse(wO(new URLSearchParams(t))),l=i.success?i.data:Qu.parse({});return{...l,offset:Math.floor(l.offset/l.limit)*l.limit}}function ur(t){let i=new URLSearchParams;if(t.offset>0)i.set("offset",String(t.offset));if(t.limit!==SO)i.set("limit",String(t.limit));if(t.q)i.set("q",t.q);if(t.visibility!=="all")i.set("visibility",t.visibility);if(t.status)i.set("status",t.status);if(t.sort!=="updated-desc")i.set("sort",t.sort);let l=i.toString();return l?`?${l}`:""}var mn=ct(Dn(),1),lN=ne.lazy(async()=>({default:(await import("./studio-chunks/account-view-ccwc00f3.js")).AccountApp})),sN=ne.lazy(async()=>({default:(await import("./studio-chunks/studio-chat-workspace-01yyssn0.js")).StudioChatWorkspace}));function aN(t){let i=new URLSearchParams(t).get("session")?.trim();return i&&i.length<=256?i:null}function rN(){let t=window.history.state;return u2(t)?t:{}}var uN=[],cN=[],fN={},hN=["public","trusted","admin"];function dN(t,i){let l=document.querySelector("[data-studio-root]"),s=l?.getAttribute("data-studio-principal-name")??"Your account",r=l?.getAttribute("data-studio-principal-role"),c=hN.find((h)=>h===r)??"public";return{displayName:s,role:c,routePath:t,studioPath:i}}function jO(){let t=CO(),i=_m({select:(U)=>U.location.pathname}),l=_m({select:(U)=>U.location.searchStr}),s=_m({select:(U)=>U.location.state}),r=qO(),c=ne.useMemo(()=>i===C1?{kind:"workspace",workspaceId:A1}:DO(i,r),[i,r]),h=ne.useMemo(()=>c.kind==="collection"&&new URLSearchParams(l).get("mode")==="create",[l,c]),d=i,[m,y]=ne.useState(null),[b,S]=ne.useState(null),[w,k]=ne.useState({}),[E,R]=ne.useReducer(mO,bh),{mode:L,draft:N,body:q,save:J}=E,ae=pO(E),[ye]=ne.useState(()=>new EO),nt=ne.useSyncExternalStore(ye.subscribe,ye.hasDrafts,ye.hasDrafts),[$t,je]=ne.useState({hasDraft:!1,busy:!1}),Tt=AO({shouldBlockFn:({next:U})=>ae||i===C1&&TO({...$t,hasDraft:nt},U.pathname),enableBeforeUnload:ae||nt||$t.busy,withResolver:!0}),[P,st]=ne.useState({kind:"idle"}),[Ne,Be]=ne.useState("preview"),[Wn,W]=ne.useState("details"),he=ne.useRef(null),de=ne.useCallback((U)=>{he.current=U,W(U)},[]),[it,$e]=ne.useState(null),[Oi,Bo]=ne.useState(0),[to,Rn]=ne.useState(null),Rt=ne.useRef(0),zo=ne.useRef(null),nn=ne.useRef(0),ua=ne.useRef(b);ua.current=b;let ot=kO(),Lt=$u(),_e=aa(zO(Lt)),Y=_e.data?.types??null,ri=Y?.find((U)=>U.entityType===b),lt=ri?.capabilities,Ut=ne.useMemo(()=>ri?.isSingleton?k1(""):k1(l),[ri?.isSingleton,l]),Et=Ut.offset,be=_e.data?.workspaces??cN,Ke=be.find((U)=>U.id===m),Ho=Ke?.rendererName===OO,ca=Ke?.rendererName===T1,Fe=Ke?.rendererName==="DeclarativeOperatorWorkspace",Ri=m?w[m]:void 0,Li=Ke?.urlQuery!==!0||Ri?.urlSearch===l,no=ne.useMemo(()=>vO(Ke,l),[Ke,l]),io=m?Ri&&Li?Ri.query:no:fN,yl=aa({...HO(Lt,m??"",io),enabled:Fe}),oo=yl.data??null,bl=oo?.data??null,No=yl.error?Wu(yl.error):null,as=L.kind==="edit"?L.entity.id:null,fr=aa({...NO(Lt,b??"",as??""),enabled:b!==null&&as!==null&&lt?.canAssist===!0&&lt.canUpdate}).data??uN,Bi=aa({..._O(Lt),enabled:b!==null}).data??null,Ln=aa({...L1(Lt,b??"",Ut),enabled:b!==null}),hr=b?Ln.data?.entities??null:null,ui=Ln.data?.total,ie=aa({...R1(Lt,b??""),enabled:b!==null}),qt=b?ie.data??null:null;aa({...vh(Lt,b??"",as??""),enabled:b!==null&&as!==null});let dr=Nm({mutationFn:(U)=>BO(Lt,U)}),_o=Nm({mutationFn:(U)=>LO(Lt,U)}),Bn=Nm({mutationFn:(U)=>RO(Lt,U)}),vl=_o.isPending,lo=Fe&&oo?oo.data:null;ne.useEffect(()=>{if(!b||!ri||m||c.kind!=="collection"&&c.kind!=="entity"||c.entityType!==b)return;if(ui===void 0)return;let U=Math.floor(Math.max(0,ui-1)/Ut.limit)*Ut.limit;if(Et>U)t.history.replace(`${i}${ur({...Ut,offset:U})}`,t.history.location.state)},[ri,m,Et,ui,Ut,b,i,c,t.history]),ne.useEffect(()=>{if(!m||!lo?.refreshAfterMs)return;let U=window.setTimeout(()=>{ot.invalidateQueries({queryKey:gl.workspace(m)})},lo.refreshAfterMs);return()=>window.clearTimeout(U)},[m,lo,ot]),ne.useEffect(()=>{if(Ke?.urlQuery!==!0||c.kind!=="workspace"||c.workspaceId!==Ke.id)return;let U=Lo(r,Ke.id);if(Fu(U,no)!==`${U}${l}`)x1(t.history,U,no,window.location.pathname)},[Ke,r,no,l,c,t.history]),ne.useEffect(()=>{if(!Y)return;if($e(null),c.kind==="not-found"){nn.current+=1,$e(`Studio route not found: ${c.pathname}`);return}if(c.kind==="workspace"){let ve=be.find((Te)=>Te.id===c.workspaceId);if(!ve){let Te=VO(r,c.workspaceId,l,be);if(Te){t.history.replace(Te);return}nn.current+=1,$e(`Workspace unavailable for this account: ${c.workspaceId}`);return}y(ve.id),S(null);return}let U=c.kind==="collection"||c.kind==="entity"?c.entityType:void 0,le=Y.find((ve)=>!ve.isSingleton)??Y[0];if(c.kind==="home"){let ve=IO(r,Y,be);if(ve!==r){t.history.replace(ve);return}}let Oe=U??le?.entityType??null;if(U!==void 0&&!Y.some((ve)=>ve.entityType===U)){nn.current+=1,$e(`Collection unavailable for this account: ${U}`);return}y(null),S(Oe)},[l,c,t.history,r,Y,be]),ne.useEffect(()=>{if(J.kind!=="saved"||!Bi?.git)return;if(Dm({save:J,git:Bi.git,baselineCommit:to}).committed==="done")return;if(Date.now()-Rt.current>20000)return;let le=window.setTimeout(()=>{ot.invalidateQueries({queryKey:gl.syncStatus()})},900);return()=>window.clearTimeout(le)},[J,Bi,to,ot]),ne.useEffect(()=>{if(!b||c.kind==="workspace"||c.kind==="not-found")return;let U=c.kind==="entity"&&c.entityType===b?c.id:null,le=++nn.current;R({type:"collectionChanged"}),W("details"),st({kind:"idle"});let Oe=!0,ve=()=>Oe&&le===nn.current;return ot.fetchQuery({...R1(Lt,b),staleTime:0}).then(async(Te)=>{if(!Oe||le!==nn.current)return;let Ue=rO(Te,he.current);if(W(Ue),window.matchMedia("(max-width: 640px)").matches&&Ue!=="details")Be(Ue==="write"?"source":"preview");if(h&&U===null){if(Y?.find((on)=>on.entityType===b)?.capabilities.canCreate!==!0){$e(`Creating ${b} is not allowed.`);return}let kl=hO(window.history.state,b,()=>window.history.replaceState(fO(rN()),"",window.location.href)),ro=dO(Te.fields,kl);R({type:"creationStarted",draft:ro.draft,body:ro.body});return}if(U!==null)return ot.fetchQuery({...vh(Lt,b,U),staleTime:0}).then((xl)=>{if(!Oe||le!==nn.current)return;let kl=Xu(xl),ro=zo.current,on=ro?.pathname===d?ro.save:{kind:"idle"};if(ro?.pathname===d)zo.current=null;R({type:"documentOpened",document:kl,save:on})});if(Te.isSingleton){let xl=await ot.ensureQueryData(L1(Lt,b));if(!ve())return;let kl=xl.entities[0];if(kl)return ot.fetchQuery({...vh(Lt,b,kl.id),staleTime:0}).then((ro)=>{if(!Oe||le!==nn.current)return;let on=Xu(ro);R({type:"documentOpened",document:on})});R({type:"creationStarted",draft:yh(Te.fields)})}return}).catch((Te)=>{if(Oe&&le===nn.current)$e(Wu(Te))}),()=>{Oe=!1}},[h,d,b,Oi,ot,i,c,Y]);let Mt=ne.useCallback((U,le={kind:"idle"})=>{if(!b)return;let Oe=M1(r,b,U);if(Oe!==d){zo.current={pathname:Oe,save:le},t.history.push(`${Oe}${ur(Ut)}`,{studioCollectionPath:`${ra(r,b)}${ur(Ut)}`},le.kind==="saved"?{ignoreBlocker:!0}:void 0);return}let ve=++nn.current,Te=b;ot.fetchQuery({...vh(Lt,b,U),staleTime:0}).then((Ue)=>{if(ve!==nn.current||ua.current!==Te)return;let xl=Xu(Ue);R({type:"documentOpened",document:xl,save:le}),st({kind:"idle"})}).catch((Ue)=>{if(ve===nn.current)$e(Wu(Ue))})},[r,d,b,Ut,ot,t.history]),so=ne.useCallback((U,le)=>{let Oe=M1(r,U,le);zo.current={pathname:Oe,save:{kind:"idle"}},t.history.push(Oe,{studioCollectionPath:ra(r,U)})},[r,t.history]),Sl=ne.useCallback((U,le,Oe,ve)=>{t.history.push(MO(r,"note"),f2(U,`entity://${encodeURIComponent(Oe)}/${encodeURIComponent(ve)}`,le))},[r,t.history]),wl=ne.useCallback((U,le,Oe)=>{if(be.some((ve)=>ve.rendererName===T1)){t.history.push(E1(r),gO(U,le,Oe));return}},[t.history,r,be]),Zu=ne.useCallback((U)=>{switch(U.target){case"account-settings":{t.history.push(Lo(r,D1));return}case"invitations":t.history.push(Fu(Lo(r,"admin:administration"),{tab:"invitations"}));return;case"admin-peer-invite":{t.history.push(Fu(Lo(r,"admin:administration"),{tab:"invitations",peerId:U.peerId,displayName:U.displayName}));return}case"inbox":{let le={};if("source"in U){if(le.sourceId="mail-items",U.filter==="high-priority")le["facet.mail-priority"]="high";else if(U.filter==="needs-reply")le["facet.needs-reply"]="true";else if(U.filter==="unclassified")le["facet.category"]="unclassified"}t.history.push(Fu(Lo(r,"unified-inbox:inbox"),le));return}case"publishing":t.history.push(Lo(r,"content-pipeline:publishing"));return;case"site":t.history.push(Lo(r,"site-builder:site"));return;case"inbox-open-entity":so(U.entityType,U.entityId);return;case"inbox-capture-note":Sl(U.title,U.summary,U.entityType,U.entityId);return;case"inbox-discuss-in-chat":wl(U.sourceId,U.itemId,U.label)}},[Sl,r,wl,so,l,t.history]),pr=ne.useCallback((U)=>{t.history.push(ra(r,U)),window.scrollTo({top:0,left:0})},[r,t.history]),mr=ne.useCallback((U)=>{if(!b)return;t.history.push(`${ra(r,b)}${ur({...Ut,offset:U})}`),window.scrollTo({top:0,left:0})},[b,Ut,r,t.history]),rs=ne.useCallback((U)=>{t.history.push(U===A1?E1(r):Lo(r,U)),window.scrollTo({top:0,left:0})},[r,t.history]),ao=ne.useCallback(()=>{if(!qt||lt?.canCreate!==!0)return;R({type:"creationStarted",draft:yh(qt.fields)}),st({kind:"idle"})},[lt,qt]),Fn=ne.useCallback(()=>{if(!b)return;let U=`${ra(r,b)}${ur(Ut)}`,le=t.history.location.state;if(typeof le==="object"&&le!==null&&"studioCollectionPath"in le&&le.studioCollectionPath===U&&t.history.canGoBack()){t.history.back();return}t.history.replace(U)},[r,b,Ut,t.history]),Sh=ne.useCallback((U,le)=>{if(!b||L.kind!=="edit"||lt?.canUpdate!==!0||lt.canAssist!==!0||q.trim().length===0)return;st({kind:"loading",field:le,variant:U}),Lt.requestFieldAssist({variant:U,entityType:b,id:L.entity.id,targetField:le}).then((Oe)=>{let ve=Oe.variant==="summarise"?Oe.suggestion:Oe.suggestions;st({kind:"suggested",field:Oe.targetField,variant:Oe.variant,suggestion:ve})}).catch((Oe)=>{st({kind:"error",field:le,message:Ei(Oe)})})},[lt,q,b,L]),Vm=ne.useCallback((U,le)=>{R({type:"fieldAssistApplied",field:U,suggestion:le}),st({kind:"idle"})},[]),Ku=ne.useCallback(()=>{if(!b||L.kind==="browse"||!qt)return;if(L.kind==="create"?lt?.canCreate!==!0:lt?.canUpdate!==!0)return;Rt.current=Date.now(),Rn(Bi?.git?.lastCommit??null),R({type:"saveStarted"});let U=qt.hasBody?{body:q}:{},le=UO(qt.fields,N),Oe=L.kind==="create"?{kind:"create",entityType:b,frontmatter:le,...U}:{kind:"update",entityType:b,id:L.entity.id,frontmatter:le,baseContentHash:L.entity.contentHash,...U},ve=nn.current;dr.mutate(Oe,{onSuccess:async(Te)=>{if(await Promise.all([ot.invalidateQueries({queryKey:gl.entities(b)}),ot.invalidateQueries({queryKey:gl.syncStatus()}),...L.kind==="create"?[ot.invalidateQueries({queryKey:gl.navigation()})]:[]]),ve!==nn.current)return;let Ue="skipped"in Te&&Te.skipped===!0;Mt(Te.entityId,{kind:"saved",noop:Ue})},onError:(Te)=>{if(ve!==nn.current)return;if(Te instanceof rr&&Te.issues.length>0)W("details");R({type:"saveFailed",save:Te instanceof rr&&Te.status===409?{kind:"conflict",message:Ei(Te)}:{kind:"error",message:Te instanceof rr&&Te.issues.length>0?Te.message||"Validation failed":Ei(Te),...Te instanceof rr?{issues:Te.issues}:{}}})}})},[lt,b,L,N,q,qt,Mt,Bi,ot,dr]),wh=ne.useCallback(()=>{if(!b||L.kind!=="edit"||vl||lt?.canDelete!==!0)return;let{id:U}=L.entity;_o.mutate({entityType:b,id:U},{onSuccess:async()=>{R({type:"deleteSucceeded"}),ot.removeQueries({queryKey:gl.entity(b,U)}),await Promise.all([ot.invalidateQueries({queryKey:gl.entities(b)}),ot.invalidateQueries({queryKey:gl.syncStatus()}),ot.invalidateQueries({queryKey:gl.navigation()})]),t.history.replace(ra(r,b),void 0,{ignoreBlocker:!0})},onError:(le)=>{R({type:"deleteFailed",message:Ei(le)})}})},[lt,r,b,L,vl,ot,_o,t.history]),gr=ne.useCallback(async(U)=>{let le=be.find((Ue)=>Ue.pluginId==="content-pipeline"&&Ue.entityTypes.includes(U.entityType));if(!le)throw Error("Publishing is unavailable");let Oe={entityType:U.entityType,entityId:U.entityId,...U.type==="reorder"?{position:U.position}:{}};if(U.type==="publish"&&!U.confirmation){let Ue=await Bn.mutateAsync({workspaceId:le.id,action:{actionId:"publish",label:"Publish now",input:Oe,invocation:{mode:"prepare"}}});if(typeof Ue!=="object"||Ue===null||!("kind"in Ue)||Ue.kind!=="prepared-confirmation"||!("token"in Ue)||typeof Ue.token!=="string"||!("summary"in Ue)||typeof Ue.summary!=="string"||!("expiresAt"in Ue)||typeof Ue.expiresAt!=="string")throw Error("Publishing confirmation is unavailable");return{needsConfirmation:!0,summary:Ue.summary,args:{confirmed:!0,confirmationToken:Ue.token,contentHash:Ue.token,expiresAt:Ue.expiresAt}}}let ve=await Bn.mutateAsync({workspaceId:le.id,action:{actionId:U.type,label:U.type,input:Oe,...U.type==="publish"&&U.confirmation?{invocation:{mode:"execute",token:U.confirmation.confirmationToken}}:{}}});if(typeof ve!=="object"||ve===null)throw Error("Publishing returned an invalid result");let Te="success"in ve&&ve.success===!1?{success:!1,error:"error"in ve&&typeof ve.error==="string"?ve.error:"Publishing failed",..."code"in ve&&typeof ve.code==="string"?{code:ve.code}:{}}:{success:!0};if(!c1(Te)&&!f1(Te)){if(await O1(ot,le.id),L.kind==="edit"&&b===U.entityType&&L.entity.id===U.entityId)Mt(U.entityId)}return Te},[b,L,Mt,ot,Bn,be]),Jn=ne.useCallback(async(U)=>{if(!m)throw Error("Declarative workspace is unavailable");try{let le=await Bn.mutateAsync({workspaceId:m,action:U});return await O1(ot,m),le}finally{Bn.reset()}},[m,Bn,ot]),xh=ne.useCallback((U,le,Oe)=>{let ve=be.find((Ue)=>Ue.id===U),Te=ve?.urlQuery===!0?l:void 0;if(ve?.urlQuery===!0&&Oe!==void 0){let Ue=Lo(r,U);Te=w1(Oe),x1(t.history,Ue,Oe,window.location.pathname)}k((Ue)=>({...Ue,[U]:{query:le,...Te!==void 0?{urlSearch:Te}:{}}}))},[r,l,t.history,be]),zi=it??(_e.error?Wu(_e.error):Ln.error?Wu(Ln.error):null),ec=()=>{if($e(null),_e.error)_e.refetch();if(Ln.error)Ln.refetch();if(yl.error)yl.refetch();if(L.kind==="browse")Bo((U)=>U+1)};if(zi&&!Y)return mn.jsxDEV(Gu,{message:zi,error:!0,onRetry:ec},void 0,!1,void 0,this);if(!Y)return mn.jsxDEV(Gu,{message:"Loading…"},void 0,!1,void 0,this);if(Ho){let U=Lo(r,D1);return mn.jsxDEV(uO,{types:Y,workspaces:be,workspaceId:Ke.id,selectEntityType:pr,selectWorkspace:rs,children:mn.jsxDEV(ne.Suspense,{fallback:mn.jsxDEV(_t,{children:"Opening Account…"},void 0,!1,void 0,this),children:mn.jsxDEV(lN,{bootstrap:dN(U,r)},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)}if(ca)return mn.jsxDEV(mn.Fragment,{children:[mn.jsxDEV(ne.Suspense,{fallback:mn.jsxDEV(Gu,{message:"Opening Chat…"},void 0,!1,void 0,this),children:mn.jsxDEV(sN,{apiPath:Ke.chatApiPath,draftStore:ye,onNavigationStateChange:je,studioBasePath:r,sessionId:aN(l),types:Y,workspaces:be,handoff:yO(s),navigate:(U,le)=>{t.history.push(U,void 0,{ignoreBlocker:le?.preserveWork===!0})},selectEntityType:pr,selectWorkspace:rs},void 0,!1,void 0,this)},void 0,!1,void 0,this),Tt.status==="blocked"&&mn.jsxDEV(Gi,{mark:"↩",title:"Leave this conversation?",titleId:"chat-navigation-title",cancelLabel:"Stay",confirmLabel:"Leave",onCancel:()=>Tt.reset(),onConfirm:()=>Tt.proceed(),children:mn.jsxDEV("p",{children:"Your draft stays in this tab. Leaving stops receiving the response, but does not undo completed actions or background jobs."},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this);if(m?!bl&&!No:b&&!qt&&!zi)return mn.jsxDEV(Gu,{message:"Loading…"},void 0,!1,void 0,this);if(!m&&(!b||!qt&&!zi))return mn.jsxDEV(Gu,{message:zi??"No readable collections are available for this account.",error:Boolean(zi),...zi?{onHome:()=>t.history.push(r)}:{}},void 0,!1,void 0,this);return mn.jsxDEV(cO,{activeWorkspaceId:m,types:Y,workspaces:be,workspaceError:No,readError:zi,onRetryRead:ec,declarativeWorkspaceData:lo,workspaceQuery:io,entityType:b,entities:hr,entityOffset:Et,entityLimit:Ut.limit,entityTotal:ui??0,collectionQuery:Ut,onCollectionQueryChange:(U)=>{if(!b)return;t.history.push(`${ra(r,b)}${ur({...U,offset:0})}`),window.scrollTo({top:0,left:0})},entityListLoading:Ln.isPending,schema:qt,editor:E,fieldAssistState:P,bodyMode:Ne,mobilePane:Wn,syncStatus:Bi,baselineCommit:to,agentTargets:fr,deleting:vl,hasUnsavedChanges:ae,navigationBlocked:Tt.status==="blocked",dispatchEditor:R,setFieldAssistState:st,setBodyMode:Be,setMobilePane:de,backToList:Fn,selectEntityType:pr,selectWorkspace:rs,changeEntityPage:mr,openWorkspaceEntity:so,openWorkspaceLaunch:Zu,performPublishingAction:gr,performDeclarativeAction:Jn,onWorkspaceQueryChange:xh,startCreate:ao,openEntity:Mt,runFieldAssist:Sh,applyFieldAssist:Vm,save:Ku,remove:wh,onNavigationReset:()=>Tt.reset?.(),onNavigationProceed:()=>Tt.proceed?.()},void 0,!1,void 0,this)}function PO(){return new $O({defaultOptions:{queries:{retry:!1,refetchOnWindowFocus:!1},mutations:{retry:!1}}})}var qm=ct(Dn(),1),Um=document.querySelector("[data-studio-root]");if(Um){let t=Um.getAttribute("data-studio-base-path")??"/studio",i=new QO({basePath:t});Um.textContent="";let l=PO(),s=WO(t,jO);FO.createRoot(Um).render(qm.jsxDEV(YO,{client:l,children:qm.jsxDEV(GO,{api:i,children:qm.jsxDEV(XO,{router:s},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this))}
245
+ ${s}`:s}}function sN(t,i,l){let s={...t};if(l==="")return delete s[i.name],s;if(i.widget==="boolean")return s[i.name]=l===!0,s;if(i.widget==="number")return s[i.name]=Number(l),s;return s[i.name]=l,s}var Sh={mode:{kind:"browse"},draft:{},body:"",save:{kind:"idle"},deleteOpen:!1};function mO(t){if(t.mode.kind==="browse")return!1;if(t.mode.kind==="create")return!0;return t.body!==t.mode.entity.body||JSON.stringify(t.draft)!==JSON.stringify(t.mode.entity.frontmatter)}function gO(t,i){switch(i.type){case"collectionChanged":return Sh;case"documentOpened":return{mode:{kind:"edit",entity:i.document.entity},draft:i.document.draft,body:i.document.body,save:i.save??{kind:"idle"},deleteOpen:!1};case"creationStarted":if(t.mode.kind!=="browse")return t;return{mode:{kind:"create"},draft:i.draft,body:i.body??"",save:{kind:"idle"},deleteOpen:!1};case"browseRequested":return Sh;case"fieldChanged":return t.mode.kind==="browse"?t:{...t,draft:sN(t.draft,i.descriptor,i.raw)};case"fieldAssistApplied":return t.mode.kind==="browse"?t:{...t,draft:{...t.draft,[i.field]:i.suggestion}};case"bodyChanged":return t.mode.kind==="browse"?t:{...t,body:i.body};case"saveStarted":return t.mode.kind==="browse"?t:{...t,save:{kind:"saving"}};case"saveFailed":return t.mode.kind==="browse"?t:{...t,save:i.save};case"deleteRequested":return t.mode.kind==="edit"?{...t,deleteOpen:!0}:t;case"deleteCancelled":return t.deleteOpen?{...t,deleteOpen:!1}:t;case"deleteSucceeded":return t.mode.kind==="edit"?Sh:t;case"deleteFailed":return t.mode.kind==="edit"?{...t,deleteOpen:!1,save:{kind:"error",message:i.message}}:t}}function yO(t,i,l){return{studioChatHandoff:{version:1,sourceId:t,itemId:i,label:l,prompt:"Help me understand this Inbox item and decide what to do next."}}}function bO(t){if(typeof t!=="object"||t===null)return null;let i=Reflect.get(t,"studioChatHandoff");if(typeof i!=="object"||i===null)return null;let l=Reflect.get(i,"version"),s=Reflect.get(i,"sourceId"),r=Reflect.get(i,"itemId"),c=Reflect.get(i,"label"),h=Reflect.get(i,"prompt");if(l!==1||typeof s!=="string"||!/^[a-z][a-z0-9-]*$/.test(s)||s.length>64||typeof r!=="string"||r.trim().length===0||r.length>300||typeof c!=="string"||c.trim().length===0||c.length>160||typeof h!=="string"||h.trim().length===0||h.length>1e4)return null;return{sourceId:s,itemId:r,label:c,prompt:h}}function Ju(t){if(t instanceof pr)switch(t.status){case 401:return"Your session is no longer authenticated. Sign in again in another tab, then retry here. Keep this tab open to preserve your draft.";case 403:return"You do not currently have permission to read this content. Ask an administrator to check access, then retry.";case 404:return"This content is unavailable. It may have moved, been removed, or be outside your access. Choose another destination or retry.";case 429:return"Studio is receiving too many requests. Wait briefly before retrying."}return`Studio could not load this data. Check your connection or retry later. ${Ai(t)}`}var vO=new Set(["offset","limit"]);function SO(t,i){if(t?.urlQuery!==!0)return{};let l={};for(let[s,r]of new URLSearchParams(i))if(!vO.has(s))l[s]=r;return l}function w1(t){let i=new URLSearchParams,l=Object.entries(t).filter(([r,c])=>!vO.has(r)&&c!==void 0&&(typeof c!=="number"||Number.isFinite(c))).sort(([r],[c])=>r.localeCompare(c));for(let[r,c]of l)i.set(r,String(c));let s=i.toString();return s?`?${s}`:""}function Zu(t,i){return`${t}${w1(i)}`}function x1(t,i,l,s){if(s!==i)return;t.replace(Zu(i,l))}function k1(t){let i=hr.safeParse(xO(new URLSearchParams(t))),l=i.success?i.data:hr.parse({});return{...l,offset:Math.floor(l.offset/l.limit)*l.limit}}function mr(t){let i=new URLSearchParams;if(t.offset>0)i.set("offset",String(t.offset));if(t.limit!==wO)i.set("limit",String(t.limit));if(t.q)i.set("q",t.q);if(t.visibility!=="all")i.set("visibility",t.visibility);if(t.status)i.set("status",t.status);if(t.sort!=="updated-desc")i.set("sort",t.sort);let l=i.toString();return l?`?${l}`:""}var pn=ct(Mn(),1),aN=ie.lazy(async()=>({default:(await import("./studio-chunks/account-view-bxy1013k.js")).AccountApp})),rN=ie.lazy(async()=>({default:(await import("./studio-chunks/studio-chat-workspace-8j4ce99n.js")).StudioChatWorkspace}));function uN(t){let i=new URLSearchParams(t).get("session")?.trim();return i&&i.length<=256?i:null}function cN(){let t=window.history.state;return u2(t)?t:{}}var fN=[],hN=[],dN={},pN=["public","trusted","admin"];function mN(t,i){let l=document.querySelector("[data-studio-root]"),s=l?.getAttribute("data-studio-principal-name")??"Your account",r=l?.getAttribute("data-studio-principal-role"),c=pN.find((h)=>h===r)??"public";return{displayName:s,role:c,routePath:t,studioPath:i}}function $O(){let t=AO(),i=_m({select:(U)=>U.location.pathname}),l=_m({select:(U)=>U.location.searchStr}),s=_m({select:(U)=>U.location.state}),r=VO(),c=ie.useMemo(()=>i===C1?{kind:"workspace",workspaceId:A1}:OO(i,r),[i,r]),h=ie.useMemo(()=>c.kind==="collection"&&new URLSearchParams(l).get("mode")==="create",[l,c]),d=i,[m,y]=ie.useState(null),[b,S]=ie.useState(null),[w,k]=ie.useState({}),[E,R]=ie.useReducer(gO,Sh),{mode:L,draft:N,body:q,save:J}=E,ae=mO(E),[ye]=ie.useState(()=>new MO),nt=ie.useSyncExternalStore(ye.subscribe,ye.hasDrafts,ye.hasDrafts),[It,Ie]=ie.useState({hasDraft:!1,busy:!1}),Tt=TO({shouldBlockFn:({next:U})=>ae||i===C1&&EO({...It,hasDraft:nt},U.pathname),enableBeforeUnload:ae||nt||It.busy,withResolver:!0}),[P,st]=ie.useState({kind:"idle"}),[Ne,Be]=ie.useState("preview"),[Gn,W]=ie.useState("details"),he=ie.useRef(null),de=ie.useCallback((U)=>{he.current=U,W(U)},[]),[it,$e]=ie.useState(null),[Mi,Lo]=ie.useState(0),[eo,On]=ie.useState(null),Rt=ie.useRef(0),Bo=ie.useRef(null),tn=ie.useRef(0),pa=ie.useRef(b);pa.current=b;let ot=CO(),Lt=Xu(),_e=ha(HO(Lt)),Y=_e.data?.types??null,ai=Y?.find((U)=>U.entityType===b),lt=ai?.capabilities,Ut=ie.useMemo(()=>ai?.isSingleton?k1(""):k1(l),[ai?.isSingleton,l]),Et=Ut.offset,be=_e.data?.workspaces??hN,Ke=be.find((U)=>U.id===m),zo=Ke?.rendererName===RO,ma=Ke?.rendererName===T1,Fe=Ke?.rendererName==="DeclarativeOperatorWorkspace",Di=m?w[m]:void 0,Oi=Ke?.urlQuery!==!0||Di?.urlSearch===l,to=ie.useMemo(()=>SO(Ke,l),[Ke,l]),no=m?Di&&Oi?Di.query:to:dN,gl=ha({...NO(Lt,m??"",no),enabled:Fe}),io=gl.data??null,yl=io?.data??null,Ho=gl.error?Ju(gl.error):null,rs=L.kind==="edit"?L.entity.id:null,gr=ha({..._O(Lt,b??"",rs??""),enabled:b!==null&&rs!==null&&lt?.canAssist===!0&&lt.canUpdate}).data??fN,Ri=ha({...UO(Lt),enabled:b!==null}).data??null,Li=ha({...L1(Lt,b??"",Ut),enabled:b!==null}),bl=b?Li.data?.entities??null:null,No=Li.data?.total,vl=ha({...R1(Lt,b??""),enabled:b!==null}),ee=b?vl.data??null:null;ha({...wh(Lt,b??"",rs??""),enabled:b!==null&&rs!==null});let Rn=Nm({mutationFn:(U)=>zO(Lt,U)}),_o=Nm({mutationFn:(U)=>BO(Lt,U)}),Ln=Nm({mutationFn:(U)=>LO(Lt,U)}),Sl=_o.isPending,oo=Fe&&io?io.data:null;ie.useEffect(()=>{if(!b||!ai||m||c.kind!=="collection"&&c.kind!=="entity"||c.entityType!==b)return;if(No===void 0)return;let U=Math.floor(Math.max(0,No-1)/Ut.limit)*Ut.limit;if(Et>U)t.history.replace(`${i}${mr({...Ut,offset:U})}`,t.history.location.state)},[ai,m,Et,No,Ut,b,i,c,t.history]),ie.useEffect(()=>{if(!m||!oo?.refreshAfterMs)return;let U=window.setTimeout(()=>{ot.invalidateQueries({queryKey:ml.workspace(m)})},oo.refreshAfterMs);return()=>window.clearTimeout(U)},[m,oo,ot]),ie.useEffect(()=>{if(Ke?.urlQuery!==!0||c.kind!=="workspace"||c.workspaceId!==Ke.id)return;let U=Ro(r,Ke.id);if(Zu(U,to)!==`${U}${l}`)x1(t.history,U,to,window.location.pathname)},[Ke,r,to,l,c,t.history]),ie.useEffect(()=>{if(!Y)return;if($e(null),c.kind==="not-found"){tn.current+=1,$e(`Studio route not found: ${c.pathname}`);return}if(c.kind==="workspace"){let ve=be.find((Ae)=>Ae.id===c.workspaceId);if(!ve){let Ae=jO(r,c.workspaceId,l,be);if(Ae){t.history.replace(Ae);return}tn.current+=1,$e(`Workspace unavailable for this account: ${c.workspaceId}`);return}y(ve.id),S(null);return}let U=c.kind==="collection"||c.kind==="entity"?c.entityType:void 0,le=Y.find((ve)=>!ve.isSingleton)??Y[0];if(c.kind==="home"){let ve=IO(r,Y,be);if(ve!==r){t.history.replace(ve);return}}let De=U??le?.entityType??null;if(U!==void 0&&!Y.some((ve)=>ve.entityType===U)){tn.current+=1,$e(`Collection unavailable for this account: ${U}`);return}y(null),S(De)},[l,c,t.history,r,Y,be]),ie.useEffect(()=>{if(J.kind!=="saved"||!Ri?.git)return;if(Om({save:J,git:Ri.git,baselineCommit:eo}).committed==="done")return;if(Date.now()-Rt.current>20000)return;let le=window.setTimeout(()=>{ot.invalidateQueries({queryKey:ml.syncStatus()})},900);return()=>window.clearTimeout(le)},[J,Ri,eo,ot]),ie.useEffect(()=>{if(!b||c.kind==="workspace"||c.kind==="not-found")return;let U=c.kind==="entity"&&c.entityType===b?c.id:null,le=++tn.current;R({type:"collectionChanged"}),W("details"),st({kind:"idle"});let De=!0,ve=()=>De&&le===tn.current;return ot.fetchQuery({...R1(Lt,b),staleTime:0}).then(async(Ae)=>{if(!De||le!==tn.current)return;let Ue=uO(Ae,he.current);if(W(Ue),window.matchMedia("(max-width: 640px)").matches&&Ue!=="details")Be(Ue==="write"?"source":"preview");if(h&&U===null){if(Y?.find((nn)=>nn.entityType===b)?.capabilities.canCreate!==!0){$e(`Creating ${b} is not allowed.`);return}let Cl=dO(window.history.state,b,()=>window.history.replaceState(hO(cN()),"",window.location.href)),ao=pO(Ae.fields,Cl);R({type:"creationStarted",draft:ao.draft,body:ao.body});return}if(U!==null)return ot.fetchQuery({...wh(Lt,b,U),staleTime:0}).then((kl)=>{if(!De||le!==tn.current)return;let Cl=Wu(kl),ao=Bo.current,nn=ao?.pathname===d?ao.save:{kind:"idle"};if(ao?.pathname===d)Bo.current=null;R({type:"documentOpened",document:Cl,save:nn})});if(Ae.isSingleton){let kl=await ot.ensureQueryData(L1(Lt,b));if(!ve())return;let Cl=kl.entities[0];if(Cl)return ot.fetchQuery({...wh(Lt,b,Cl.id),staleTime:0}).then((ao)=>{if(!De||le!==tn.current)return;let nn=Wu(ao);R({type:"documentOpened",document:nn})});R({type:"creationStarted",draft:vh(Ae.fields)})}return}).catch((Ae)=>{if(De&&le===tn.current)$e(Ju(Ae))}),()=>{De=!1}},[h,d,b,Mi,ot,i,c,Y]);let Mt=ie.useCallback((U,le={kind:"idle"})=>{if(!b)return;let De=M1(r,b,U);if(De!==d){Bo.current={pathname:De,save:le},t.history.push(`${De}${mr(Ut)}`,{studioCollectionPath:`${da(r,b)}${mr(Ut)}`},le.kind==="saved"?{ignoreBlocker:!0}:void 0);return}let ve=++tn.current,Ae=b;ot.fetchQuery({...wh(Lt,b,U),staleTime:0}).then((Ue)=>{if(ve!==tn.current||pa.current!==Ae)return;let kl=Wu(Ue);R({type:"documentOpened",document:kl,save:le}),st({kind:"idle"})}).catch((Ue)=>{if(ve===tn.current)$e(Ju(Ue))})},[r,d,b,Ut,ot,t.history]),lo=ie.useCallback((U,le)=>{let De=M1(r,U,le);Bo.current={pathname:De,save:{kind:"idle"}},t.history.push(De,{studioCollectionPath:da(r,U)})},[r,t.history]),wl=ie.useCallback((U,le,De,ve)=>{t.history.push(DO(r,"note"),f2(U,`entity://${encodeURIComponent(De)}/${encodeURIComponent(ve)}`,le))},[r,t.history]),xl=ie.useCallback((U,le,De)=>{if(be.some((ve)=>ve.rendererName===T1)){t.history.push(E1(r),yO(U,le,De));return}},[t.history,r,be]),ec=ie.useCallback((U)=>{switch(U.target){case"account-settings":{t.history.push(Ro(r,D1));return}case"invitations":t.history.push(Zu(Ro(r,"admin:administration"),{tab:"invitations"}));return;case"admin-peer-invite":{t.history.push(Zu(Ro(r,"admin:administration"),{tab:"invitations",peerId:U.peerId,displayName:U.displayName}));return}case"inbox":{let le={};if("source"in U){if(le.sourceId="mail-items",U.filter==="high-priority")le["facet.mail-priority"]="high";else if(U.filter==="needs-reply")le["facet.needs-reply"]="true";else if(U.filter==="unclassified")le["facet.category"]="unclassified"}t.history.push(Zu(Ro(r,"unified-inbox:inbox"),le));return}case"publishing":t.history.push(Ro(r,"content-pipeline:publishing"));return;case"site":t.history.push(Ro(r,"site-builder:site"));return;case"inbox-open-entity":lo(U.entityType,U.entityId);return;case"inbox-capture-note":wl(U.title,U.summary,U.entityType,U.entityId);return;case"inbox-discuss-in-chat":xl(U.sourceId,U.itemId,U.label)}},[wl,r,xl,lo,l,t.history]),yr=ie.useCallback((U)=>{t.history.push(da(r,U)),window.scrollTo({top:0,left:0})},[r,t.history]),br=ie.useCallback((U)=>{if(!b)return;t.history.push(`${da(r,b)}${mr({...Ut,offset:U})}`),window.scrollTo({top:0,left:0})},[b,Ut,r,t.history]),cs=ie.useCallback((U)=>{t.history.push(U===A1?E1(r):Ro(r,U)),window.scrollTo({top:0,left:0})},[r,t.history]),so=ie.useCallback(()=>{if(!ee||lt?.canCreate!==!0)return;R({type:"creationStarted",draft:vh(ee.fields)}),st({kind:"idle"})},[lt,ee]),Wn=ie.useCallback(()=>{if(!b)return;let U=`${da(r,b)}${mr(Ut)}`,le=t.history.location.state;if(typeof le==="object"&&le!==null&&"studioCollectionPath"in le&&le.studioCollectionPath===U&&t.history.canGoBack()){t.history.back();return}t.history.replace(U)},[r,b,Ut,t.history]),xh=ie.useCallback((U,le)=>{if(!b||L.kind!=="edit"||lt?.canUpdate!==!0||lt.canAssist!==!0||q.trim().length===0)return;st({kind:"loading",field:le,variant:U}),Lt.requestFieldAssist({variant:U,entityType:b,id:L.entity.id,targetField:le}).then((De)=>{let ve=De.variant==="summarise"?De.suggestion:De.suggestions;st({kind:"suggested",field:De.targetField,variant:De.variant,suggestion:ve})}).catch((De)=>{st({kind:"error",field:le,message:Ai(De)})})},[lt,q,b,L]),Vm=ie.useCallback((U,le)=>{R({type:"fieldAssistApplied",field:U,suggestion:le}),st({kind:"idle"})},[]),tc=ie.useCallback(()=>{if(!b||L.kind==="browse"||!ee)return;if(L.kind==="create"?lt?.canCreate!==!0:lt?.canUpdate!==!0)return;Rt.current=Date.now(),On(Ri?.git?.lastCommit??null),R({type:"saveStarted"});let U=ee.hasBody?{body:q}:{},le=qO(ee.fields,N),De=L.kind==="create"?{kind:"create",entityType:b,frontmatter:le,...U}:{kind:"update",entityType:b,id:L.entity.id,frontmatter:le,baseContentHash:L.entity.contentHash,...U},ve=tn.current;Rn.mutate(De,{onSuccess:async(Ae)=>{if(await Promise.all([ot.invalidateQueries({queryKey:ml.entities(b)}),ot.invalidateQueries({queryKey:ml.syncStatus()}),...L.kind==="create"?[ot.invalidateQueries({queryKey:ml.navigation()})]:[]]),ve!==tn.current)return;let Ue="skipped"in Ae&&Ae.skipped===!0;Mt(Ae.entityId,{kind:"saved",noop:Ue})},onError:(Ae)=>{if(ve!==tn.current)return;if(Ae instanceof pr&&Ae.issues.length>0)W("details");R({type:"saveFailed",save:Ae instanceof pr&&Ae.status===409?{kind:"conflict",message:Ai(Ae)}:{kind:"error",message:Ae instanceof pr&&Ae.issues.length>0?Ae.message||"Validation failed":Ai(Ae),...Ae instanceof pr?{issues:Ae.issues}:{}}})}})},[lt,b,L,N,q,ee,Mt,Ri,ot,Rn]),kh=ie.useCallback(()=>{if(!b||L.kind!=="edit"||Sl||lt?.canDelete!==!0)return;let{id:U}=L.entity;_o.mutate({entityType:b,id:U},{onSuccess:async()=>{R({type:"deleteSucceeded"}),ot.removeQueries({queryKey:ml.entity(b,U)}),await Promise.all([ot.invalidateQueries({queryKey:ml.entities(b)}),ot.invalidateQueries({queryKey:ml.syncStatus()}),ot.invalidateQueries({queryKey:ml.navigation()})]),t.history.replace(da(r,b),void 0,{ignoreBlocker:!0})},onError:(le)=>{R({type:"deleteFailed",message:Ai(le)})}})},[lt,r,b,L,Sl,ot,_o,t.history]),vr=ie.useCallback(async(U)=>{let le=be.find((Ue)=>Ue.pluginId==="content-pipeline"&&Ue.entityTypes.includes(U.entityType));if(!le)throw Error("Publishing is unavailable");let De={entityType:U.entityType,entityId:U.entityId,...U.type==="reorder"?{position:U.position}:{}};if(U.type==="publish"&&!U.confirmation){let Ue=await Ln.mutateAsync({workspaceId:le.id,action:{actionId:"publish",label:"Publish now",input:De,invocation:{mode:"prepare"}}});if(typeof Ue!=="object"||Ue===null||!("kind"in Ue)||Ue.kind!=="prepared-confirmation"||!("token"in Ue)||typeof Ue.token!=="string"||!("summary"in Ue)||typeof Ue.summary!=="string"||!("expiresAt"in Ue)||typeof Ue.expiresAt!=="string")throw Error("Publishing confirmation is unavailable");return{needsConfirmation:!0,summary:Ue.summary,args:{confirmed:!0,confirmationToken:Ue.token,contentHash:Ue.token,expiresAt:Ue.expiresAt}}}let ve=await Ln.mutateAsync({workspaceId:le.id,action:{actionId:U.type,label:U.type,input:De,...U.type==="publish"&&U.confirmation?{invocation:{mode:"execute",token:U.confirmation.confirmationToken}}:{}}});if(typeof ve!=="object"||ve===null)throw Error("Publishing returned an invalid result");let Ae="success"in ve&&ve.success===!1?{success:!1,error:"error"in ve&&typeof ve.error==="string"?ve.error:"Publishing failed",..."code"in ve&&typeof ve.code==="string"?{code:ve.code}:{}}:{success:!0};if(!c1(Ae)&&!f1(Ae)){if(await O1(ot,le.id),L.kind==="edit"&&b===U.entityType&&L.entity.id===U.entityId)Mt(U.entityId)}return Ae},[b,L,Mt,ot,Ln,be]),Fn=ie.useCallback(async(U)=>{if(!m)throw Error("Declarative workspace is unavailable");try{let le=await Ln.mutateAsync({workspaceId:m,action:U});return await O1(ot,m),le}finally{Ln.reset()}},[m,Ln,ot]),Ch=ie.useCallback((U,le,De)=>{let ve=be.find((Ue)=>Ue.id===U),Ae=ve?.urlQuery===!0?l:void 0;if(ve?.urlQuery===!0&&De!==void 0){let Ue=Ro(r,U);Ae=w1(De),x1(t.history,Ue,De,window.location.pathname)}k((Ue)=>({...Ue,[U]:{query:le,...Ae!==void 0?{urlSearch:Ae}:{}}}))},[r,l,t.history,be]),Bi=it??(_e.error?Ju(_e.error):Li.error?Ju(Li.error):null),nc=()=>{if($e(null),_e.error)_e.refetch();if(Li.error)Li.refetch();if(gl.error)gl.refetch();if(L.kind==="browse")Lo((U)=>U+1)};if(Bi&&!Y)return pn.jsxDEV(Fu,{message:Bi,error:!0,onRetry:nc},void 0,!1,void 0,this);if(!Y)return pn.jsxDEV(Fu,{message:"Loading…"},void 0,!1,void 0,this);if(zo){let U=Ro(r,D1);return pn.jsxDEV(cO,{types:Y,workspaces:be,workspaceId:Ke.id,selectEntityType:yr,selectWorkspace:cs,children:pn.jsxDEV(ie.Suspense,{fallback:pn.jsxDEV(_t,{children:"Opening Account…"},void 0,!1,void 0,this),children:pn.jsxDEV(aN,{bootstrap:mN(U,r)},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)}if(ma)return pn.jsxDEV(pn.Fragment,{children:[pn.jsxDEV(ie.Suspense,{fallback:pn.jsxDEV(Fu,{message:"Opening Chat…"},void 0,!1,void 0,this),children:pn.jsxDEV(rN,{apiPath:Ke.chatApiPath,draftStore:ye,onNavigationStateChange:Ie,studioBasePath:r,sessionId:uN(l),types:Y,workspaces:be,handoff:bO(s),navigate:(U,le)=>{t.history.push(U,void 0,{ignoreBlocker:le?.preserveWork===!0})},selectEntityType:yr,selectWorkspace:cs},void 0,!1,void 0,this)},void 0,!1,void 0,this),Tt.status==="blocked"&&pn.jsxDEV(Qi,{mark:"↩",title:"Leave this conversation?",titleId:"chat-navigation-title",cancelLabel:"Stay",confirmLabel:"Leave",onCancel:()=>Tt.reset(),onConfirm:()=>Tt.proceed(),children:pn.jsxDEV("p",{children:"Your draft stays in this tab. Leaving stops receiving the response, but does not undo completed actions or background jobs."},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this);if(m?!yl&&!Ho:b&&!ee&&!Bi)return pn.jsxDEV(Fu,{message:"Loading…"},void 0,!1,void 0,this);if(!m&&(!b||!ee&&!Bi))return pn.jsxDEV(Fu,{message:Bi??"No readable collections are available for this account.",error:Boolean(Bi),...Bi?{onHome:()=>t.history.push(r)}:{}},void 0,!1,void 0,this);return pn.jsxDEV(fO,{activeWorkspaceId:m,types:Y,workspaces:be,workspaceError:Ho,readError:Bi,onRetryRead:nc,declarativeWorkspaceData:oo,workspaceQuery:no,entityType:b,entities:bl,entityOffset:Et,entityLimit:Ut.limit,entityTotal:No??0,collectionQuery:Ut,onCollectionQueryChange:(U)=>{if(!b)return;t.history.push(`${da(r,b)}${mr({...U,offset:0})}`),window.scrollTo({top:0,left:0})},entityListLoading:Li.isPending,schema:ee,editor:E,fieldAssistState:P,bodyMode:Ne,mobilePane:Gn,syncStatus:Ri,baselineCommit:eo,agentTargets:gr,deleting:Sl,hasUnsavedChanges:ae,navigationBlocked:Tt.status==="blocked",dispatchEditor:R,setFieldAssistState:st,setBodyMode:Be,setMobilePane:de,backToList:Wn,selectEntityType:yr,selectWorkspace:cs,changeEntityPage:br,openWorkspaceEntity:lo,openWorkspaceLaunch:ec,performPublishingAction:vr,performDeclarativeAction:Fn,onWorkspaceQueryChange:Ch,startCreate:so,openEntity:Mt,runFieldAssist:xh,applyFieldAssist:Vm,save:tc,remove:kh,onNavigationReset:()=>Tt.reset?.(),onNavigationProceed:()=>Tt.proceed?.()},void 0,!1,void 0,this)}function YO(){return new PO({defaultOptions:{queries:{retry:!1,refetchOnWindowFocus:!1},mutations:{retry:!1}}})}var qm=ct(Mn(),1),Um=document.querySelector("[data-studio-root]");if(Um){let t=Um.getAttribute("data-studio-base-path")??"/studio",i=new GO({basePath:t});Um.textContent="";let l=YO(),s=FO(t,$O);JO.createRoot(Um).render(qm.jsxDEV(XO,{client:l,children:qm.jsxDEV(WO,{api:i,children:qm.jsxDEV(QO,{router:s},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this))}
246
246
 
247
- //# debugId=8FD1EFC4E57FB7C964756E2164756E21
247
+ //# debugId=ADF1EED241D02C6B64756E2164756E21