@rizom/brain 0.2.0-alpha.374 → 0.2.0-alpha.376
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/brain.js +37 -37
- package/dist/chunks/{app-fwngp2bj.js → app-k4p9j73w.js} +2 -2
- package/dist/chunks/{index-9wsnezey.js → index-cpa1q0gz.js} +2 -2
- package/dist/chunks/{index-748qhn3e.js → index-hfyww710.js} +2 -2
- package/dist/chunks/{index-z9x2nc51.js → index-sxqr4shz.js} +3 -3
- package/dist/chunks/{index-z9x2nc51.js.map → index-sxqr4shz.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/model.js +38 -38
- package/dist/model.js.map +3 -3
- package/dist/ui/studio-app.css +19 -0
- package/dist/ui/studio-app.js +87 -87
- package/dist/ui/studio-app.js.map +8 -6
- package/dist/ui/studio-asset-manifest.json +18 -18
- package/dist/ui/studio-chunks/{account-view-bxy1013k.js → account-view-xe37mz6g.js} +2 -2
- package/dist/ui/studio-chunks/{account-view-bxy1013k.js.map → account-view-xe37mz6g.js.map} +1 -1
- package/dist/ui/studio-chunks/{highlighted-body-OFNGDK62-0zjmhz68.js → highlighted-body-OFNGDK62-rk8j2gp8.js} +2 -2
- package/dist/ui/studio-chunks/{highlighted-body-OFNGDK62-0zjmhz68.js.map → highlighted-body-OFNGDK62-rk8j2gp8.js.map} +1 -1
- package/dist/ui/studio-chunks/{main-q0etykh1.js → main-19ek6kcp.js} +5 -5
- package/dist/ui/studio-chunks/{main-q0etykh1.js.map → main-19ek6kcp.js.map} +1 -1
- package/dist/ui/studio-chunks/{main-vvm543hj.js → main-j8m9t6k5.js} +2 -2
- package/dist/ui/studio-chunks/{main-vvm543hj.js.map → main-j8m9t6k5.js.map} +1 -1
- package/dist/ui/studio-chunks/{main-h805x05e.js → main-jyb12r9e.js} +4 -4
- package/dist/ui/studio-chunks/{main-h805x05e.js.map → main-jyb12r9e.js.map} +3 -3
- package/dist/ui/studio-chunks/{main-vxqr9gvf.js → main-kgem2nc7.js} +2 -2
- package/dist/ui/studio-chunks/{main-vxqr9gvf.js.map → main-kgem2nc7.js.map} +1 -1
- package/dist/ui/studio-chunks/{main-qbrh95ht.js → main-wrwp0bss.js} +5 -5
- package/dist/ui/studio-chunks/{main-qbrh95ht.js.map → main-wrwp0bss.js.map} +3 -3
- package/dist/ui/studio-chunks/mermaid-GHXKKRXX-cvdypvaf.js +3 -0
- package/dist/ui/studio-chunks/{mermaid-GHXKKRXX-5mp73mfe.js.map → mermaid-GHXKKRXX-cvdypvaf.js.map} +1 -1
- package/dist/ui/studio-chunks/studio-chat-workspace-n3cfkz27.js +5 -0
- package/dist/ui/studio-chunks/studio-chat-workspace-n3cfkz27.js.map +21 -0
- package/package.json +1 -1
- package/dist/ui/studio-chunks/mermaid-GHXKKRXX-5mp73mfe.js +0 -3
- package/dist/ui/studio-chunks/studio-chat-workspace-8j4ce99n.js +0 -5
- package/dist/ui/studio-chunks/studio-chat-workspace-8j4ce99n.js.map +0 -19
- /package/dist/chunks/{app-fwngp2bj.js.map → app-k4p9j73w.js.map} +0 -0
- /package/dist/chunks/{index-9wsnezey.js.map → index-cpa1q0gz.js.map} +0 -0
- /package/dist/chunks/{index-748qhn3e.js.map → index-hfyww710.js.map} +0 -0
package/dist/ui/studio-app.js
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
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
|
|
1
|
+
import{c as lO,d as sO,e as aO,f as rO}from"./studio-chunks/main-j8m9t6k5.js";import{$ as wh,A as NO,Aa as QO,B as Lo,Ba as GO,C as _O,Ca as WO,D as L1,Da as iR,E as UO,Ea as Um,F as Tn,Fa as nO,G as x1,H as Fn,I as as,J as ym,K as cr,L as Wn,M as Em,N as sh,O as bm,P as gM,Q as yM,R as ah,S as jE,T as IE,U as G,V as bD,W as l1,X as eD,Y as sD,Z as Rm,_ as zm,aa as uO,ba as v1,ca as Hm,da as Oi,ea as qO,fa as VO,g as JO,ga as jO,h as RO,ha as pl,i as KO,ia as IO,j as da,ja as $O,k as qm,ka as B1,l as LO,la as PO,m as eR,ma as YO,n as BO,na as z1,o as Vm,oa as H1,p as Qt,pa as kh,q as It,qa as dr,r as E1,ra as Sh,s as M1,sa as cO,t as D1,ta as S1,u as O1,ua as fO,v as zO,va as XO,wa as hO,x as HO,xa as k1,y as pa,ya as dO,z as R1,za as pO}from"./studio-chunks/main-wrwp0bss.js";import"./studio-chunks/main-19ek6kcp.js";import{$a as ZD,Ab as Nm,Bb as mO,Ma as le,Na as cs,Oa as _e,Pa as bn,Ra as oO,Sa as We,Ta as Vp,Ua as Ks,Xa as JD,ab as KD,bb as Ji,cb as b2,db as qD,eb as VD,fb as jD,gb as v2,hb as m1,ib as g1,jb as y1,kb as b1,nb as tr,ob as Up,pb as wo,qb as ai,rb as MO,sb as hr,tb as DO,ub as pr,vb as tR,wb as nR,xb as Gu,yb as eO,zb as w1}from"./studio-chunks/main-jyb12r9e.js";import{Cb as tt,Db as Sb,Fb as OO,Gb as Fl,Ib as qz}from"./studio-chunks/main-kgem2nc7.js";var r2=Sb(function(Uz){(function(){function t(){if(ee=!1,ze){var Q=Uz.unstable_now();lt=Q;var de=!0;try{e:{V=!1,j&&(j=!1,ot(Tt),Tt=-1),_=!0;var pe=L;try{t:{c(Q);for(R=l(w);R!==null&&!(R.expirationTime>Q&&d());){var st=R.callback;if(typeof st==="function"){R.callback=null,L=R.priorityLevel;var $e=st(R.expirationTime<=Q);if(Q=Uz.unstable_now(),typeof $e==="function"){R.callback=$e,c(Q),de=!0;break t}R===l(w)&&s(w),c(Q)}else s(w);R=l(w)}if(R!==null)de=!0;else{var Li=l(k);Li!==null&&m(h,Li.startTime-Q),de=!1}}break e}finally{R=null,L=pe,_=!1}de=void 0}}finally{de?K():ze=!1}}}function i(Q,de){var pe=Q.length;Q.push(de);e:for(;0<pe;){var st=pe-1>>>1,$e=Q[st];if(0<r($e,de))Q[st]=de,Q[pe]=$e,pe=st;else break e}}function l(Q){return Q.length===0?null:Q[0]}function s(Q){if(Q.length===0)return null;var de=Q[0],pe=Q.pop();if(pe!==de){Q[0]=pe;e:for(var st=0,$e=Q.length,Li=$e>>>1;st<Li;){var Bo=2*(st+1)-1,oo=Q[Bo],Hn=Bo+1,Lt=Q[Hn];if(0>r(oo,pe))Hn<$e&&0>r(Lt,oo)?(Q[st]=Lt,Q[Hn]=pe,st=Hn):(Q[st]=oo,Q[Bo]=pe,st=Bo);else if(Hn<$e&&0>r(Lt,pe))Q[st]=Lt,Q[Hn]=pe,st=Hn;else break e}}return de}function r(Q,de){var pe=Q.sortIndex-de.sortIndex;return pe!==0?pe:Q.id-de.id}function c(Q){for(var de=l(k);de!==null;){if(de.callback===null)s(k);else if(de.startTime<=Q)s(k),de.sortIndex=de.expirationTime,i(w,de);else break;de=l(k)}}function h(Q){if(j=!1,c(Q),!V)if(l(w)!==null)V=!0,ze||(ze=!0,K());else{var de=l(k);de!==null&&m(h,de.startTime-Q)}}function d(){return ee?!0:Uz.unstable_now()-lt<ae?!1:!0}function m(Q,de){Tt=be(function(){Q(Uz.unstable_now())},de)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),Uz.unstable_now=void 0,typeof performance==="object"&&typeof performance.now==="function"){var y=performance;Uz.unstable_now=function(){return y.now()}}else{var b=Date,S=b.now();Uz.unstable_now=function(){return b.now()-S}}var w=[],k=[],E=1,R=null,L=3,_=!1,V=!1,j=!1,ee=!1,be=typeof setTimeout==="function"?setTimeout:null,ot=typeof clearTimeout==="function"?clearTimeout:null,Rt=typeof setImmediate<"u"?setImmediate:null,ze=!1,Tt=-1,ae=5,lt=-1;if(typeof Rt==="function")var K=function(){Rt(t)};else if(typeof MessageChannel<"u"){var Ue=new MessageChannel,Gt=Ue.port2;Ue.port1.onmessage=t,K=function(){Gt.postMessage(null)}}else K=function(){be(t,0)};Uz.unstable_IdlePriority=5,Uz.unstable_ImmediatePriority=1,Uz.unstable_LowPriority=4,Uz.unstable_NormalPriority=3,Uz.unstable_Profiling=null,Uz.unstable_UserBlockingPriority=2,Uz.unstable_cancelCallback=function(Q){Q.callback=null},Uz.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ae=0<Q?Math.floor(1000/Q):5},Uz.unstable_getCurrentPriorityLevel=function(){return L},Uz.unstable_next=function(Q){switch(L){case 1:case 2:case 3:var de=3;break;default:de=L}var pe=L;L=de;try{return Q()}finally{L=pe}},Uz.unstable_requestPaint=function(){ee=!0},Uz.unstable_runWithPriority=function(Q,de){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var pe=L;L=Q;try{return de()}finally{L=pe}},Uz.unstable_scheduleCallback=function(Q,de,pe){var st=Uz.unstable_now();switch(typeof pe==="object"&&pe!==null?(pe=pe.delay,pe=typeof pe==="number"&&0<pe?st+pe:st):pe=st,Q){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=pe+$e,Q={id:E++,callback:de,priorityLevel:Q,startTime:pe,expirationTime:$e,sortIndex:-1},pe>st?(Q.sortIndex=pe,i(k,Q),l(w)===null&&Q===l(k)&&(j?(ot(Tt),Tt=-1):j=!0,m(h,pe-st))):(Q.sortIndex=$e,i(w,Q),V||_||(V=!0,ze||(ze=!0,K()))),Q},Uz.unstable_shouldYield=d,Uz.unstable_wrapCallback=function(Q){var de=L;return function(){var pe=L;L=de;try{return Q.apply(this,arguments)}finally{L=pe}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var u2=Sb(function(Vz){var Pe=tt(r2()),wu=tt(Fl()),wb=tt(qz());(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=sn(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=sn(e)?e.slice():Me({},e);return a+1===n.length?(f[o[a]]=f[u],sn(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=sn(e)?e.slice():Me({},e);if(o+1===n.length)return sn(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 ER(e,n,o,a)}function k(e,n){e.context===Ls&&(V0(e.current,2,n,e,null,null),Lr())}function E(e,n){if(ji!==null){var o=n.staleFamilies;n=n.updatedFamilies,Rc(),pS(e.current,n,o),Lr()}}function R(e){ji=e}function L(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function _(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 V(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 ee(e){if(_(e)!==e)throw Error("Unable to find node on an unmounted component.")}function be(e){var n=e.alternate;if(!n){if(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 ee(u),e;if(f===a)return ee(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 ot(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=ot(e),n!==null)return n;e=e.sibling}return null}function Rt(e){if(e===null||typeof e!=="object")return null;return e=wk&&e[wk]||e["@@iterator"],typeof e==="function"?e:null}function ze(e){if(e==null)return null;if(typeof e==="function")return e.$$typeof===GL?null:e.displayName||e.name||null;if(typeof e==="string")return e;switch(e){case qr:return"Fragment";case X0:return"Profiler";case Ld:return"StrictMode";case G0:return"Suspense";case W0:return"SuspenseList";case F0: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 Ur:return"Portal";case el:return e.displayName||"Context";case Q0:return(e._context.displayName||"Context")+".Consumer";case jc:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Bd:return n=e.displayName||null,n!==null?n:ze(e.type)||"Memo";case Si:n=e._payload,e=e._init;try{return ze(e(n))}catch(o){}}return null}function Tt(e){return typeof e.tag==="number"?ae(e):typeof e.name==="string"?e.name:null}function ae(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 ze(n);case 8:return n===Ld?"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 ae(e.return)}return null}function lt(e){return{current:e}}function K(e,n){0>Bl?console.error("Unexpected pop."):(n!==Z0[Bl]&&console.error("Unexpected Fiber popped."),e.current=J0[Bl],J0[Bl]=null,Z0[Bl]=null,Bl--)}function Ue(e,n,o){Bl++,J0[Bl]=e.current,Z0[Bl]=o,e.current=n}function Gt(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 Q(e,n){Ue(Ts,n,e),Ue(Ic,e,e),Ue(As,null,e);var o=n.nodeType;switch(o){case 9:case 11:o=o===9?"#document":"#fragment",n=(n=n.documentElement)?(n=n.namespaceURI)?Yx(n):Ql:Ql;break;default:if(o=n.tagName,n=n.namespaceURI)n=Yx(n),n=Xx(n,o);else switch(o){case"svg":n=vu;break;case"math":n=Rp;break;default:n=Ql}}o=o.toLowerCase(),o=q1(null,o),o={context:n,ancestorInfo:o},K(As,e),Ue(As,o,e)}function de(e){K(As,e),K(Ic,e),K(Ts,e)}function pe(){return Gt(As.current)}function st(e){e.memoizedState!==null&&Ue(zd,e,e);var n=Gt(As.current),o=e.type,a=Xx(n.context,o);o=q1(n.ancestorInfo,o),a={context:a,ancestorInfo:o},n!==a&&(Ue(Ic,e,e),Ue(As,a,e))}function $e(e){Ic.current===e&&(K(As,e),K(Ic,e)),zd.current===e&&(K(zd,e),zf._currentValue=Ka)}function Li(){}function Bo(){if($c===0){xk=console.log,kk=console.info,Ck=console.warn,Ak=console.error,Tk=console.group,Ek=console.groupCollapsed,Mk=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Li,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}$c++}function oo(){if($c--,$c===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Me({},e,{value:xk}),info:Me({},e,{value:kk}),warn:Me({},e,{value:Ck}),error:Me({},e,{value:Ak}),group:Me({},e,{value:Tk}),groupCollapsed:Me({},e,{value:Ek}),groupEnd:Me({},e,{value:Mk})})}0>$c&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function Hn(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
|
-
`,n)),n!==-1)e=e.slice(0,n);else return"";return e}function
|
|
4
|
+
`,n)),n!==-1)e=e.slice(0,n);else return"";return e}function Lt(e){if(K0===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);K0=n&&n[1]||"",Dk=-1<o.stack.indexOf(`
|
|
5
5
|
at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
6
|
-
`+
|
|
6
|
+
`+K0+e+Dk}function zo(e,n){if(!e||ey)return"";var o=ty.get(e);if(o!==void 0)return o;ey=!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(`
|
|
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"&&
|
|
9
|
+
`+x[f].replace(" at new "," at ");return e.displayName&&O.includes("<anonymous>")&&(O=O.replace("<anonymous>",e.displayName)),typeof e==="function"&&ty.set(e,O),O}while(1<=f&&0<=p);break}}}finally{ey=!1,H.H=a,oo(),Error.prepareStackTrace=o}return x=(x=e?e.displayName||e.name:"")?Lt(x):"",typeof e==="function"&&ty.set(e,x),x}function nn(e,n){switch(e.tag){case 26:case 27:case 5:return Lt(e.type);case 16:return Lt("Lazy");case 13:return e.child!==n&&n!==null?Lt("Suspense Fallback"):Lt("Suspense");case 19:return Lt("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 Lt("Activity");default:return""}}function ma(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=Hn(x),O=D.lastIndexOf(`
|
|
10
10
|
`),A=O===-1?D:D.slice(O+1);if(A.indexOf(g)!==-1){var B=`
|
|
11
|
-
`+A;break e}}B=
|
|
11
|
+
`+A;break e}}B=Lt(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
|
|
13
|
+
`+X.stack}}function at(e){return(e=e?e.displayName||e.name:"")?Lt(e):""}function Bt(){if(wi===null)return null;var e=wi._debugOwner;return e!=null?Tt(e):null}function Le(){if(wi===null)return"";var e=wi;try{var n="";switch(e.tag===6&&(e=e.return),e.tag){case 26:case 27:case 5:n+=Lt(e.type);break;case 13:n+=Lt("Suspense");break;case 19:n+=Lt("SuspenseList");break;case 31:n+=Lt("Activity");break;case 30:case 0:case 15:case 1:e._debugOwner||n!==""||(n+=at(e.type));break;case 11:e._debugOwner||n!==""||(n+=at(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=Hn(a);u!==""&&(n+=`
|
|
14
14
|
`+u)}}else if(e.debugStack!=null){var f=e.debugStack;(e=e.owner)&&f&&(n+=`
|
|
15
|
-
`+
|
|
15
|
+
`+Hn(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=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?`
|
|
17
|
+
`+g.stack}return p}function Y(e,n,o,a,u,f,p){var g=wi;fi(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{fi(g)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function fi(e){H.getCurrentStack=e===null?null:Le,tl=!1,wi=e}function Je(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 ve(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,Je(e)),Et(e)}function Ge(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,Je(e)),Et(e)}function Sn(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.",Je(e)),Et(e)}function ml(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{jr=n.inject(e),Rn=n}catch(o){console.error("React instrumentation encountered an error: %o.",o)}return n.checkDCE?!0:!1}function Ze(e){if(typeof tB==="function"&&nB(e),Rn&&typeof Rn.setStrictMode==="function")try{Rn.setStrictMode(jr,e)}catch(n){nl||(nl=!0,console.error("React instrumentation encountered an error: %o",n))}}function gl(e){return e>>>=0,e===0?32:31-(iB(e)/oB|0)|0}function fn(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 Bi(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=fn(a):(p&=g,p!==0?u=fn(p):o||(o=g&~e,o!==0&&(u=fn(o))))):(g=a&~f,g!==0?u=fn(g):p!==0?u=fn(p):o||(o=a&~e,o!==0&&(u=fn(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 Ho(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function No(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 yl(){var e=_d;return _d<<=1,(_d&62914560)===0&&(_d=4194304),e}function bl(e){for(var n=[],o=0;31>o;o++)n.push(e);return n}function zi(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function fs(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-Un(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&&tc(e,a,0),f!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=f&~(p&~n))}function tc(e,n,o){e.pendingLanes|=n,e.suspendedLanes&=~n;var a=31-Un(n);e.entangledLanes|=n,e.entanglements[a]=e.entanglements[a]|1073741824|o&261930}function vl(e,n){var o=e.entangledLanes|=n;for(e=e.entanglements;o;){var a=31-Un(o),u=1<<a;u&n|e[a]&n&&(e[a]|=n),o&=~u}}function nc(e,n){var o=n&-n;return o=(o&42)!==0?1:Hi(o),(o&(e.suspendedLanes|n))!==0?0:o}function Hi(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 Ni(e,n,o){if(il)for(e=e.pendingUpdatersLaneMap;0<o;){var a=31-Un(o),u=1<<a;e[a].add(n),o&=~u}}function gr(e,n){if(il)for(var{pendingUpdatersLaneMap:o,memoizedUpdaters:a}=e;0<n;){var u=31-Un(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 hi(e){return e&=-e,xi!==0&&xi<e?po!==0&&po<e?(e&134217727)!==0?ol:Ud:po:xi}function yr(){var e=et.p;if(e!==0)return e;return e=window.event,e===void 0?ol:pk(e.type)}function hn(e,n){var o=et.p;try{return et.p=e,n()}finally{et.p=o}}function ne(e){delete e[Cn],delete e[qn],delete e[sy],delete e[lB],delete e[sB]}function on(e){var n=e[Cn];if(n)return n;for(var o=e.parentNode;o;){if(n=o[Ms]||o[Cn]){if(o=n.alternate,n.child!==null||o!==null&&o.child!==null)for(e=ek(e);e!==null;){if(o=e[Cn])return o;e=ek(e)}return n}e=o,o=e.parentNode}return null}function Nn(e){if(e=e[Cn]||e[Ms]){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 lo(e){var n=e[Ok];return n||(n=e[Ok]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Mt(e){e[Pc]=!0}function so(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();ay[o]=e,e==="onDoubleClick"&&(ay.ondblclick=e);for(e=0;e<n.length;e++)Rk.add(n[e])}function xl(e,n){aB[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 ic(e){if(ho.call(Bk,e))return!0;if(ho.call(Lk,e))return!1;if(rB.test(e))return Bk[e]=!0;return Lk[e]=!0,console.error("Invalid attribute name: `%s`",e),!1}function br(e,n,o){if(ic(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 ve(o,n),e===""+o?o:e}}function vr(e,n,o){if(ic(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}}ve(o,n),e.setAttribute(n,""+o)}}function hs(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}ve(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}ve(a,o),e.setAttributeNS(n,o,""+a)}}function Zn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return Sn(e),e;default:return""}}function Ch(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function $m(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){Sn(p),o=""+p,f.call(this,p)}}),Object.defineProperty(e,n,{enumerable:a.enumerable}),{getValue:function(){return o},setValue:function(p){Sn(p),o=""+p},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function oc(e){if(!e._valueTracker){var n=Ch(e)?"checked":"value";e._valueTracker=$m(e,n,""+e[n])}}function Ah(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var o=n.getValue(),a="";return e&&(a=Ch(e)?e.checked?"true":"false":e.value),e=a,e!==o?(n.setValue(e),!0):!1}function Sr(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 Kn(e){return e.replace(uB,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Th(e,n){n.checked===void 0||n.defaultChecked===void 0||Hk||(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",Bt()||"A component",n.type),Hk=!0),n.value===void 0||n.defaultValue===void 0||zk||(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",Bt()||"A component",n.type),zk=!0)}function _i(e,n,o,a,u,f,p,g){if(e.name="",p!=null&&typeof p!=="function"&&typeof p!=="symbol"&&typeof p!=="boolean"?(ve(p,"type"),e.type=p):e.removeAttribute("type"),n!=null)if(p==="number"){if(n===0&&e.value===""||e.value!=n)e.value=""+Zn(n)}else e.value!==""+Zn(n)&&(e.value=""+Zn(n));else p!=="submit"&&p!=="reset"||e.removeAttribute("value");n!=null?U(e,p,Zn(n)):o!=null?U(e,p,Zn(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"?(ve(g,"name"),e.name=""+Zn(g)):e.removeAttribute("name")}function lc(e,n,o,a,u,f,p,g){if(f!=null&&typeof f!=="function"&&typeof f!=="symbol"&&typeof f!=="boolean"&&(ve(f,"type"),e.type=f),n!=null||o!=null){if(!(f!=="submit"&&f!=="reset"||n!==void 0&&n!==null)){oc(e);return}o=o!=null?""+Zn(o):"",n=n!=null?""+Zn(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"&&(ve(p,"name"),e.name=p),oc(e)}function U(e,n,o){n==="number"&&Sr(e.ownerDocument)===e||e.defaultValue===""+o||(e.defaultValue=""+o)}function re(e,n){n.value==null&&(typeof n.children==="object"&&n.children!==null?wu.Children.forEach(n.children,function(o){o==null||typeof o==="string"||typeof o==="number"||typeof o==="bigint"||_k||(_k=!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||Uk||(Uk=!0,console.error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),n.selected==null||Nk||(console.error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),Nk=!0)}function Oe(){var e=Bt();return e?`
|
|
18
18
|
|
|
19
|
-
Check the render method of \``+e+"`.":""}function
|
|
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)),
|
|
21
|
-
`+ga(o)+
|
|
22
|
-
`}return
|
|
23
|
-
`}function
|
|
19
|
+
Check the render method of \``+e+"`.":""}function Se(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=""+Zn(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<Vk.length;e++){var o=Vk[e];if(n[o]!=null){var a=sn(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||qk||(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"),qk=!0)}function qe(e,n){n.value===void 0||n.defaultValue===void 0||jk||(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",Bt()||"A component"),jk=!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=""+Zn(n),n!==e.value&&(e.value=n),o==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=o!=null?""+Zn(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(sn(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=Zn(n),e.defaultValue=o,a=e.textContent,a===o&&a!==""&&a!==null&&(e.value=a),oc(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 ln(e){return" "+" ".repeat(e)}function wr(e){return"+ "+" ".repeat(e)}function ga(e){return"- "+" ".repeat(e)}function N1(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 sc(e,n){return Ik.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 Eh(e,n,o){var a=120-2*o;if(n===null)return wr(o)+sc(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)),wr(o)+sc(e,a)+`
|
|
21
|
+
`+ga(o)+sc(n,a)+`
|
|
22
|
+
`}return ln(o)+sc(e,a)+`
|
|
23
|
+
`}function Pm(e){return Object.prototype.toString.call(e).replace(/^\[object (.*)\]$/,function(n,o){return o})}function ac(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(sn(e))return"[...]";if(e.$$typeof===Ko)return(n=ze(e.type))?"<"+n+">":"<...>";var o=Pm(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=ac(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 xr(e,n){return typeof e!=="string"||Ik.test(e)?"{"+ac(e,n-2)+"}":e.length>n-2?5>n?'"..."':'"'+e.slice(0,n-5)+'..."':'"'+e+'"'}function Ym(e,n,o){var a=120-o.length-e.length,u=[],f;for(f in n)if(n.hasOwnProperty(f)&&f!=="children"){var p=xr(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
|
|
29
|
+
`}function lR(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=ac(e[f],p);n.hasOwnProperty(f)?(p=ac(n[f],p),a+=wr(o)+f+": "+g+`
|
|
30
30
|
`,a+=ga(o)+f+": "+p+`
|
|
31
|
-
`):a+=
|
|
32
|
-
`}for(var v in u)u.hasOwnProperty(v)&&(e=
|
|
33
|
-
`);return a}function
|
|
34
|
-
`+
|
|
35
|
-
`:(u+=
|
|
31
|
+
`):a+=wr(o)+f+": "+g+`
|
|
32
|
+
`}for(var v in u)u.hasOwnProperty(v)&&(e=ac(u[v],120-2*o-v.length-2),a+=ga(o)+v+": "+e+`
|
|
33
|
+
`);return a}function sR(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+=Ym(e,n,ln(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=xr(x,g);g=xr(v,g),typeof x==="object"&&x!==null&&typeof v==="object"&&v!==null&&Pm(x)==="Object"&&Pm(v)==="Object"&&(2<Object.keys(x).length||2<Object.keys(v).length||-1<D.indexOf("...")||-1<g.indexOf("..."))?u+=ln(a+1)+p+`={{
|
|
34
|
+
`+lR(x,v,a+2)+ln(a+1)+`}}
|
|
35
|
+
`:(u+=wr(a+1)+p+"="+D+`
|
|
36
36
|
`,u+=ga(a+1)+p+"="+g+`
|
|
37
|
-
`)}else u+=
|
|
38
|
-
`}f.forEach(function(O){if(O!=="children"){var A=120-2*(a+1)-O.length-1;u+=ga(a+1)+O+"="+
|
|
39
|
-
`}}),u=u===""?
|
|
40
|
-
`:
|
|
41
|
-
`+u+
|
|
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+=
|
|
43
|
-
`}function
|
|
44
|
-
|
|
45
|
-
`,n++)}if(a="",u=e.fiber.pendingProps,e.fiber.tag===6)a=
|
|
46
|
-
`,n++}else e.serverProps===null?(a=
|
|
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)+
|
|
48
|
-
`):x+
|
|
49
|
-
|
|
50
|
-
|
|
37
|
+
`)}else u+=ln(a+1)+p+"="+xr(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+"="+xr(o[O],A)+`
|
|
39
|
+
`}}),u=u===""?ln(a)+"<"+e+`>
|
|
40
|
+
`:ln(a)+"<"+e+`
|
|
41
|
+
`+u+ln(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+=Eh(f,""+e,a+1)}else if(typeof n==="string"||typeof n==="number"||typeof n==="bigint")u=e==null?u+Eh(""+n,null,a+1):u+Eh(""+n,void 0,a+1);return u}function _1(e,n){var o=N1(e);if(o===null){o="";for(e=e.child;e;)o+=_1(e,n),e=e.sibling;return o}return ln(n)+"<"+o+`>
|
|
43
|
+
`}function Xm(e,n){var o=ro(e,n);if(o!==e&&(e.children.length!==1||e.children[0]!==o))return ln(n)+`...
|
|
44
|
+
`+Xm(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+=ln(n)+"<"+f+`>
|
|
45
|
+
`,n++)}if(a="",u=e.fiber.pendingProps,e.fiber.tag===6)a=Eh(u,e.serverProps,n),n++;else if(f=N1(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=xr(u[x],15);if(p-=x.length+v.length+2,0>p){g+=" ...";break}g+=" "+x+"="+v}a=ln(a)+"<"+f+g+`>
|
|
46
|
+
`,n++}else e.serverProps===null?(a=Ym(f,u,wr(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=sR(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+=Xm(p,n),f++):x+=_1(u,n),u=u.sibling;u&&0<e.children.length&&(x+=ln(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)+sc(f,120-2*n)+`
|
|
48
|
+
`):x+Ym(f.type,f.props,ga(n));return o+a+x}function Qm(e){try{return`
|
|
49
|
+
|
|
50
|
+
`+Xm(e,0)}catch(n){return""}}function U1(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?Qm(u).replaceAll(/^[+-]/gm,">"):""}function q1(e,n){var o=Me({},e||Pk),a={tag:n};if($k.indexOf(n)!==-1&&(o.aTagInScope=null,o.buttonTagInScope=null,o.nobrTagInScope=null),fB.indexOf(n)!==-1&&(o.pTagInButtonScope=null),cB.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 V1(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 hB.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 aR(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 j1(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 Gm(e,n){n=n||Pk;var o=n.current;if(n=(o=V1(e,o&&o.tag,n.implicitRootScope)?null:o)?null:aR(e,n),n=o||n,!n)return!0;var a=n.tag;if(n=String(!!o)+"|"+e+"|"+a,qd[n])return!1;qd[n]=!0;var u=(n=wi)?j1(n.return,a):null,f=n!==null&&u!==null?U1(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
|
|
53
|
+
See this log for the ancestor stack trace.`,a,p)})),!1}function Mh(e,n,o){if(o||V1("#text",n,!1))return!0;if(o="#text|"+n,qd[o])return!1;qd[o]=!0;var a=(o=wi)?j1(o,n):null;return o=o!==null&&a!==null?U1(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 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&>){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&>&&(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+=`
|
|
55
|
+
This will cause a hydration error.%s`,n,o),!1}function rc(e,n){if(n){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=n;return}}e.textContent=n}function rR(e){return e.replace(mB,function(n,o){return o.toUpperCase()})}function I1(e,n,o){var a=n.indexOf("--")===0;a||(-1<n.indexOf("-")?Ir.hasOwnProperty(n)&&Ir[n]||(Ir[n]=!0,console.error("Unsupported style property %s. Did you mean %s?",n,rR(n.replace(pB,"ms-")))):dB.test(n)?Ir.hasOwnProperty(n)&&Ir[n]||(Ir[n]=!0,console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?",n,n.charAt(0).toUpperCase()+n.slice(1))):!Qk.test(o)||uy.hasOwnProperty(o)&&uy[o]||(uy[o]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,n,o.replace(Qk,""))),typeof o==="number"&&(isNaN(o)?Gk||(Gk=!0,console.error("`NaN` is an invalid value for the `%s` css style property.",n)):isFinite(o)||Wk||(Wk=!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||Fk.has(n)?n==="float"?e.cssFloat=o:(Ge(o,n),e[n]=(""+o).trim()):e[n]=o+"px"}function $1(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=ry[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=ry[g]||[g],f=0;f<u.length;f++)a[u[f]]=g;g={};for(var v in n)for(u=ry[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&&I1(e,A,x)}else for(a in n)n.hasOwnProperty(a)&&I1(e,a,n[a])}function uc(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 P1(e){return gB.get(e)||e}function uR(e,n){if(ho.call(Pr,n)&&Pr[n])return!0;if(bB.test(n)){if(e="aria-"+n.slice(4).toLowerCase(),e=Jk.hasOwnProperty(e)?e:null,e==null)return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",n),Pr[n]=!0;if(n!==e)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",n,e),Pr[n]=!0}if(yB.test(n)){if(e=n.toLowerCase(),e=Jk.hasOwnProperty(e)?e:null,e==null)return Pr[n]=!0,!1;n!==e&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",n,e),Pr[n]=!0)}return!0}function cR(e,n){var o=[],a;for(a in n)uR(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 fR(e,n,o,a){if(ho.call(Vn,n)&&Vn[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."),Vn[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),Vn[n]=!0;if(Kk.test(n))return console.error("Unknown event handler property `%s`. It will be ignored.",n),Vn[n]=!0}else if(Kk.test(n))return vB.test(n)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",n),Vn[n]=!0;if(SB.test(n)||wB.test(n))return!0;if(u==="innerhtml")return console.error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),Vn[n]=!0;if(u==="aria")return console.error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),Vn[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),Vn[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),Vn[n]=!0;if(jd.hasOwnProperty(u)){if(u=jd[u],u!==n)return console.error("Invalid DOM property `%s`. Did you mean `%s`?",n,u),Vn[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),Vn[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),Vn[n]=!0}case"function":case"symbol":return Vn[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),Vn[n]=!0}}return!0}function hR(e,n,o){var a=[],u;for(u in n)fR(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 cc(e){return xB.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Al(){}function Wm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}function Y1(e){var n=Nn(e);if(n&&(e=n.stateNode)){var o=e[qn]||null;e:switch(e=n.stateNode,n.type){case"input":if(_i(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;ve(n,"name"),o=o.querySelectorAll('input[name="'+Kn(""+n)+'"][type="radio"]');for(n=0;n<o.length;n++){var a=o[n];if(a!==e&&a.form===e.form){var u=a[qn]||null;if(!u)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");_i(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&&Ah(a)}break e;case"textarea":kl(e,o.value,o.defaultValue);break e;case"select":n=o.value,n!=null&&Se(e,!!o.multiple,n,!1)}}}function X1(e,n,o){if(cy)return e(n,o);cy=!0;try{var a=e(n);return a}finally{if(cy=!1,Yr!==null||Xr!==null){if(Lr(),Yr&&(n=Yr,e=Xr,Xr=Yr=null,Y1(n),e))for(n=0;n<e.length;n++)Y1(e[n])}}}function fc(e,n){var o=e.stateNode;if(o===null)return null;var a=o[qn]||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 Q1(){if(Id)return Id;var e,n=hy,o=n.length,a,u="value"in Ds?Ds.value:Ds.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 Id=u.slice(e,1<a?1-a:void 0)}function Dh(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 Oh(){return!0}function G1(){return!1}function ei(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)?Oh:G1,this.isPropagationStopped=G1,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=Oh)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!=="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Oh)},persist:function(){},isPersistent:Oh}),n}function dR(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=HB[e])?!!n[e]:!1}function Fm(){return dR}function W1(e,n){switch(e){case"keyup":return QB.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==iC;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function F1(e){return e=e.detail,typeof e==="object"&&"data"in e?e.data:null}function pR(e,n){switch(e){case"compositionend":return F1(n);case"keypress":if(n.which!==lC)return null;return aC=!0,sC;case"textInput":return e=n.data,e===sC&&aC?null:e;default:return null}}function mR(e,n){if(Qr)return e==="compositionend"||!gy&&W1(e,n)?(e=Q1(),Id=hy=Ds=null,Qr=!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 oC&&n.locale!=="ko"?null:n.data;default:return null}}function J1(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!WB[e.type]:n==="textarea"?!0:!1}function gR(e){if(!ll)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 Z1(e,n,o,a){Yr?Xr?Xr.push(a):Xr=[a]:Yr=a,n=xd(n,"onChange"),0<n.length&&(o=new $d("onChange","change",null,o,a),e.push({event:o,listeners:n}))}function yR(e){zx(e,0)}function Rh(e){var n=Sl(e);if(Ah(n))return e}function K1(e,n){if(e==="change")return n}function eS(){Fc&&(Fc.detachEvent("onpropertychange",tS),Jc=Fc=null)}function tS(e){if(e.propertyName==="value"&&Rh(Jc)){var n=[];Z1(n,Jc,e,Wm(e)),X1(yR,n)}}function bR(e,n,o){e==="focusin"?(eS(),Fc=n,Jc=o,Fc.attachEvent("onpropertychange",tS)):e==="focusout"&&eS()}function vR(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Rh(Jc)}function SR(e,n){if(e==="click")return Rh(n)}function wR(e,n){if(e==="input"||e==="change")return Rh(n)}function xR(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}function hc(e,n){if(jn(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)||!jn(e[u],n[u]))return!1}return!0}function nS(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function iS(e,n){var o=nS(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=nS(o)}}function oS(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?oS(e,n.parentNode):("contains"in e)?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function lS(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=Sr(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=Sr(e.document)}return n}function Jm(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 sS(e,n,o){var a=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;by||Gr==null||Gr!==Sr(a)||(a=Gr,("selectionStart"in a)&&Jm(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}),Zc&&hc(Zc,a)||(Zc=a,a=xd(yy,"onSelect"),0<a.length&&(n=new $d("onSelect","select",null,n,o),e.push({event:n,listeners:a}),n.target=Gr)))}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(vy[e])return vy[e];if(!Wr[e])return e;var n=Wr[e],o;for(o in n)if(n.hasOwnProperty(o)&&o in uC)return vy[e]=n[o];return e}function uo(e,n){pC.set(e,n),so(n,[e])}function kR(e){for(var n=Yd,o=0;o<e.length;o++){var a=e[o];if(typeof a==="object"&&a!==null)if(sn(a)&&a.length===2&&typeof a[0]==="string"){if(n!==Yd&&n!==Cy)return xy;n=Cy}else return xy;else{if(typeof a==="function"||typeof a==="string"&&50<a.length||n!==Yd&&n!==ky)return xy;n=ky}}return n}function Zm(e,n,o,a){for(var u in e)ho.call(e,u)&&u[0]!=="_"&&_o(u,e[u],n,o,a)}function _o(e,n,o,a,u){switch(typeof n){case"object":if(n===null){n="null";break}else{if(n.$$typeof===Ko){var f=ze(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&&_o("key",p,o,a+1,u),e=!1;for(var x in n)x==="children"?n.children!=null&&(!sn(n.children)||0<n.children.length)&&(e=!0):ho.call(n,x)&&x[0]!=="_"&&_o(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=kR(n),x===ky||x===Yd){n=JSON.stringify(n);break}else if(x===Cy){o.push([u+" ".repeat(a)+e,""]);for(e=0;e<n.length;e++)f=n[e],_o(f[0],f[1],o,a+1,u);return}}if(f==="Promise"){if(n.status==="fulfilled"){if(f=o.length,_o(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,_o(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&&Zm(n,o,a+1,u);return}case"function":n=n.name===""?"() => {}":n.name+"() {}";break;case"string":n=n===nz?"…":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 aS(e,n,o,a){var u=!0;for(p in e)p in n||(o.push([Xd+" ".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([Xd+u,"…"],[Qd+u,"…"]);else{if(!(3<=a)){if(typeof p==="object"&&typeof g==="object"&&p!==null&&g!==null&&p.$$typeof===g.$$typeof)if(g.$$typeof===Ko){if(p.type===g.type&&p.key===g.key){p=ze(g.type)||"…",u=" ".repeat(a)+f,p="<"+p+" … />",o.push([Xd+u,p],[Qd+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=[yC+" ".repeat(a)+f,x==="[object Array]"?"Array":""],o.push(v),x=o.length,aS(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([yC+" ".repeat(a)+f,p+" Referentially unequal function closure. Consider memoization."]);continue}}_o(f,p,o,a,Xd),_o(f,g,o,a,Qd)}u=!1}}else o.push([Qd+" ".repeat(a)+f,"…"]),u=!1;return u}function di(e){Re=e&63?"Blocking":e&64?"Gesture":e&4194176?"Transition":e&62914560?"Suspense":e&2080374784?"Idle":"Other"}function Uo(e,n,o,a){gt&&(Rs.start=n,Rs.end=o,zl.color="warning",zl.tooltipText=a,zl.properties=null,(e=e._debugTask)?e.run(performance.measure.bind(performance,a,Rs)):performance.measure(a,Rs))}function Lh(e,n,o){Uo(e,n,o,"Reconnect")}function Bh(e,n,o,a,u){var f=ae(e);if(f!==null&>){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=[iz],x=aS(p.memoizedProps,x,v,0),1<v.length&&(x&&!Os&&(p.lanes&u)===0&&100<e.actualDuration?(Os=!0,v[0]=oz,zl.color="warning",zl.tooltipText=bC):(zl.color=a,zl.tooltipText=f),zl.properties=v,Rs.start=n,Rs.end=o,g!=null?g.run(performance.measure.bind(performance,""+f,Rs)):performance.measure(""+f,Rs))):g!=null?g.run(console.timeStamp.bind(console,f,n,o,qi,void 0,a)):console.timeStamp(f,n,o,qi,void 0,a)}}function Km(e,n,o,a){if(gt){var u=ae(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&&_o("key",e.key,p,0,""),e.memoizedProps!==null&&Zm(e.memoizedProps,p,0,""),f==null&&(f=e._debugTask),e={start:n,end:o,detail:{devtools:{color:"error",track:qi,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 qo(e,n,o,a,u){if(u!==null){if(gt){var f=ae(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&&_o("key",e.key,a,0,""),e.memoizedProps!==null&&Zm(e.memoizedProps,a,0,""),n={start:n,end:o,detail:{devtools:{color:"error",track:qi,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=ae(e),f!==null&>&&(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,qi,void 0,u)):console.timeStamp(f,n,o,qi,void 0,u))}function CR(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,Re,De,u)):console.timeStamp(o,e,n,Re,De,u)}}function rS(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,Re,De,o)):console.timeStamp("Prewarm",e,n,Re,De,o))}function uS(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,Re,De,o)):console.timeStamp("Suspended",e,n,Re,De,o))}function AR(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: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 eg(e,n,o,a){!gt||n<=e||(a?a.run(console.timeStamp.bind(console,"Errored",e,n,Re,De,"error")):console.timeStamp("Errored",e,n,Re,De,"error"))}function TR(e,n,o,a){!gt||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 cS(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: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 dc(e,n,o){!gt||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 zh(){for(var e=Fr,n=Ay=Fr=0;n<e;){var o=Vi[n];Vi[n++]=null;var a=Vi[n];Vi[n++]=null;var u=Vi[n];Vi[n++]=null;var f=Vi[n];if(Vi[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&&fS(o,u,f)}}function Hh(e,n,o,a){Vi[Fr++]=e,Vi[Fr++]=n,Vi[Fr++]=o,Vi[Fr++]=a,Ay|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function tg(e,n,o,a){return Hh(e,n,o,a),Nh(e)}function On(e,n){return Hh(e,null,null,n),Nh(e)}function fS(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&Kc||(u=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,u&&n!==null&&(u=31-Un(o),e=f.hiddenUpdates,a=e[u],a===null?e[u]=[n]:a.push(n),n.lane=o|536870912),f):null}function Nh(e){if(Ef>vz)throw Qa=Ef=0,Mf=ob=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>Sz&&(Qa=0,Mf=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&&Ex(e);for(var n=e,o=n.return;o!==null;)n.alternate===null&&(n.flags&4098)!==0&&Ex(e),n=o,o=n.return;return n.tag===3?n.stateNode:null}function va(e){if(ji===null)return e;var n=ji(e);return n===void 0?e:n.current}function ng(e){if(ji===null)return e;var n=ji(e);return n===void 0?e!==null&&e!==void 0&&typeof e.render==="function"&&(n=va(e.render),e.render!==n)?(n={$$typeof:jc,render:n},e.displayName!==void 0&&(n.displayName=e.displayName),n):e:n.current}function hS(e,n){if(ji===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===Si&&(a=!0);break;case 11:u===jc?a=!0:u===Si&&(a=!0);break;case 14:case 15:u===Bd?a=!0:u===Si&&(a=!0);break;default:return!1}return a&&(e=ji(o),e!==void 0&&e===ji(n))?!0:!1}function dS(e){ji!==null&&typeof WeakSet==="function"&&(Jr===null&&(Jr=new WeakSet),Jr.add(e))}function pS(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(ji===null)throw Error("Expected resolveFamily to be set during hot reload.");var x=!1;if(a=!1,v!==null&&(v=ji(v),v!==void 0&&(o.has(v)?a=!0:n.has(v)&&(g===1?a=!0:x=!0))),Jr!==null&&(Jr.has(e)||u!==null&&Jr.has(u))&&(a=!0),a&&(e._debugNeedsRemount=!0),a||x)u=On(e,2),u!==null&&zt(u,e,2);if(f===null||a||pS(f,n,o),p===null)break;e=p}while(1)}function ER(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,vC||typeof Object.preventExtensions!=="function"||Object.preventExtensions(this)}function ig(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=ng(e.type)}return o}function mS(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 og(e,n,o,a,u,f){var p=0,g=e;if(typeof e==="function")ig(e)&&(p=1),g=va(g);else if(typeof e==="string")p=pe(),p=NL(e,o,p)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case F0:return n=w(31,o,n,u),n.elementType=F0,n.lanes=f,n;case qr:return Sa(o.children,u,f,n);case Ld:p=8,u|=Ln,u|=mo;break;case X0: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|xe),n.elementType=X0,n.lanes=f,n.stateNode={effectDuration:0,passiveEffectDuration:0},n;case G0:return n=w(13,o,n,u),n.elementType=G0,n.lanes=f,n;case W0:return n=w(19,o,n,u),n.elementType=W0,n.lanes=f,n;default:if(typeof e==="object"&&e!==null)switch(e.$$typeof){case el:p=10;break e;case Q0:p=9;break e;case jc:p=11,g=ng(g);break e;case Bd:p=14;break e;case Si: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":sn(e)?o="array":e!==void 0&&e.$$typeof===Ko?(o="<"+(ze(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
|
|
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 _h(e,n,o){return n=og(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 lg(e,n,o){return e=w(6,e,null,n),e.lanes=o,e}function gS(e){var n=w(18,null,null,me);return n.stateNode=e,n}function sg(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 pi(e,n){if(typeof e==="object"&&e!==null){var o=Ty.get(e);if(o!==void 0)return o;return n={value:e,source:n,stack:ma(n)},Ty.set(e,n),n}return{value:e,source:n,stack:ma(n)}}function El(e,n){ds(),Zr[Kr++]=ef,Zr[Kr++]=Gd,Gd=e,ef=n}function yS(e,n,o){ds(),Ii[$i++]=Nl,Ii[$i++]=_l,Ii[$i++]=Ba,Ba=e;var a=Nl;e=_l;var u=32-Un(a)-1;a&=~(1<<u),o+=1;var f=32-Un(n)+u;if(30<f){var p=u-u%5;f=(a&(1<<p)-1).toString(32),a>>=p,u-=p,Nl=1<<32-Un(n)+u|o<<u|a,_l=f+e}else Nl=1<<f|o<<u|a,_l=e}function ag(e){ds(),e.return!==null&&(El(e,1),yS(e,1,0))}function rg(e){for(;e===Gd;)Gd=Zr[--Kr],Zr[Kr]=null,ef=Zr[--Kr],Zr[Kr]=null;for(;e===Ba;)Ba=Ii[--$i],Ii[$i]=null,_l=Ii[--$i],Ii[$i]=null,Nl=Ii[--$i],Ii[$i]=null}function bS(){return ds(),Ba!==null?{id:Nl,overflow:_l}:null}function vS(e,n){ds(),Ii[$i++]=Nl,Ii[$i++]=_l,Ii[$i++]=Ba,Nl=n.id,_l=n.overflow,Ba=e}function ds(){Be||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(ki===null)ki={fiber:e,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:n};else{if(ki.fiber!==e)throw Error("Saw multiple hydration diff roots in a pass. This is a bug in React.");ki.distanceFromLeaf>n&&(ki.distanceFromLeaf=n)}return ki}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 SS(){Be&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug.")}function Uh(e,n){sl||(e=wa(e,0),e.serverProps=null,n!==null&&(n=Zx(n),e.serverTail.push(n)))}function ps(e){var n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:!1,o="",a=ki;throw a!==null&&(ki=null,o=Qm(a)),pc(pi(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)),
|
|
67
|
+
https://react.dev/link/hydration-mismatch`+o),e)),Ey}function wS(e){var{stateNode:n,type:o,memoizedProps:a}=e;switch(n[Cn]=e,n[qn]=a,M0(o,a),o){case"dialog":He("cancel",n),He("close",n);break;case"iframe":case"object":case"embed":He("load",n);break;case"video":case"audio":for(o=0;o<Df.length;o++)He(Df[o],n);break;case"source":He("error",n);break;case"img":case"image":case"link":He("error",n),He("load",n);break;case"details":He("toggle",n);break;case"input":xl("input",a),He("invalid",n),Th(n,a),lc(n,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"option":re(n,a);break;case"select":xl("select",a),He("invalid",n),Te(n,a);break;case"textarea":xl("textarea",a),He("invalid",n),qe(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||Ux(n.textContent,o)?(a.popover!=null&&(He("beforetoggle",n),He("toggle",n)),a.onScroll!=null&&He("scroll",n),a.onScrollEnd!=null&&He("scrollend",n),a.onClick!=null&&(n.onclick=Al),n=!0):n=!1,n||ps(e,!0)}function xS(e){for(An=e.return;An;)switch(An.tag){case 5:case 31:case 13:Pi=!1;return;case 27:case 3:Pi=!0;return;default:An=An.return}}function kr(e){if(e!==An)return!1;if(!Be)return xS(e),Be=!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")||B0(e.type,e.memoizedProps);o=!o}if(o&&yt){for(o=yt;o;){var a=wa(e,0),u=Zx(o);a.serverTail.push(u),o=u.type==="Suspense"?_0(o):vi(o.nextSibling)}ps(e)}if(xS(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=_0(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=_0(e)}else n===27?(n=yt,Cs(e.type)?(e=gb,gb=null,yt=e):yt=n):yt=An?vi(e.stateNode.nextSibling):null;return!0}function xa(){yt=An=null,sl=Be=!1}function ug(){var e=Bs;return e!==null&&(Yn===null?Yn=e:Yn.push.apply(Yn,e),Bs=null),e}function pc(e){Bs===null?Bs=[e]:Bs.push(e)}function cg(){var e=ki;if(e!==null){ki=null;for(var n=Qm(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
|
|
77
|
+
%s%s`,"https://react.dev/link/hydration-mismatch",n)})}}function qh(){eu=Wd=null,tu=!1}function ms(e,n,o){Ue(My,n._currentValue,e),n._currentValue=o,Ue(Dy,n._currentRenderer,e),n._currentRenderer!==void 0&&n._currentRenderer!==null&&n._currentRenderer!==wC&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),n._currentRenderer=wC}function Ml(e,n){e._currentValue=My.current;var o=Dy.current;K(Dy,n),e._currentRenderer=o,K(My,n)}function fg(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 hg(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),fg(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),fg(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 Cr(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;jn(u.pendingProps.value,p.value)||(e!==null?e.push(g):e=[g])}}else if(u===zd.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(zf):e=[zf])}u=u.return}e!==null&&hg(n,e,o,a),n.flags|=262144}function Vh(e){for(e=e.firstContext;e!==null;){if(!jn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ka(e){Wd=e,eu=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function xt(e){return tu&&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()."),kS(Wd,e)}function jh(e,n){return Wd===null&&ka(e),kS(e,n)}function kS(e,n){var o=n._currentValue;if(n={context:n,memoizedValue:o,next:null},eu===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().");eu=n,e.dependencies={lanes:0,firstContext:n,_debugThenableState:null},e.flags|=524288}else eu=eu.next=n;return o}function dg(){return{controller:new az,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 mc(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&&rz(uz,function(){e.controller.abort()})}function Vo(e,n,o){if((e&127)!==0)0>al&&(al=Ft(),nf=Fd(n),Oy=n,o!=null&&(Ry=ae(o)),(Ie&(rn|Ti))!==yn&&(Ht=!0,Ns=tf),e=Nc(),n=Hc(),e!==nu||n!==of?nu=-1.1:n!==null&&(Ns=tf),Ha=e,of=n);else if((e&4194048)!==0&&0>Yi&&(Yi=Ft(),lf=Fd(n),xC=n,o!=null&&(kC=ae(o)),0>Vl)){if(e=Nc(),n=Hc(),e!==Us||n!==Na)Us=-1.1;_s=e,Na=n}}function MR(e){if(0>al){al=Ft(),nf=e._debugTask!=null?e._debugTask:null,(Ie&(rn|Ti))!==yn&&(Ns=tf);var n=Nc(),o=Hc();n!==nu||o!==of?nu=-1.1:o!==null&&(Ns=tf),Ha=n,of=o}if(0>Yi&&(Yi=Ft(),lf=e._debugTask!=null?e._debugTask:null,0>Vl)){if(e=Nc(),n=Hc(),e!==Us||n!==Na)Us=-1.1;_s=e,Na=n}}function Dl(){var e=za;return za=0,e}function Ih(e){var n=za;return za=e,n}function gc(e){var n=za;return za+=e,n}function $h(){fe=ue=-1.1}function mi(){var e=ue;return ue=-1.1,e}function gi(e){0<=e&&(ue=e)}function jo(){var e=Dt;return Dt=-0,e}function Io(e){0<=e&&(Dt=e)}function $o(){var e=kt;return kt=null,e}function Po(){var e=Ht;return Ht=!1,e}function pg(e){In=Ft(),0>e.actualStartTime&&(e.actualStartTime=In)}function mg(e){if(0<=In){var n=Ft()-In;e.actualDuration+=n,e.selfBaseDuration=n,In=-1}}function CS(e){if(0<=In){var n=Ft()-In;e.actualDuration+=n,In=-1}}function Yo(){if(0<=In){var e=Ft(),n=e-In;In=-1,za+=n,Dt+=n,fe=e}}function AS(e){kt===null&&(kt=[]),kt.push(e),ql===null&&(ql=[]),ql.push(e)}function Xo(){In=Ft(),0>ue&&(ue=In)}function yc(e){for(var n=e.child;n;)e.actualDuration+=n.actualDuration,n=n.sibling}function DR(e,n){if(af===null){var o=af=[];By=0,_a=C0(),iu={status:"pending",value:void 0,then:function(a){o.push(a)}}}return By++,n.then(TS,TS),n}function TS(){if(--By===0&&(-1<Yi||(Vl=-1.1),af!==null)){iu!==null&&(iu.status="fulfilled");var e=af;af=null,_a=0,iu=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function OR(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 gg(){var e=Ua.current;return e!==null?e:ct.pooledCache}function Ph(e,n){n===null?Ue(Ua,Ua.current,e):Ue(Ua,n.pool,e)}function ES(){var e=gg();return e===null?null:{parent:Wt._currentValue,pool:e}}function MS(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function DS(e){return e=e.status,e==="fulfilled"||e==="rejected"}function OS(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,LS(e),e;default:if(typeof n.status==="string")n.then(Al,Al);else{if(e=ct,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,LS(e),e}throw Va=n,pf=!0,ou}}function gs(e){try{return dz(e)}catch(n){if(n!==null&&typeof n==="object"&&typeof n.then==="function")throw Va=n,pf=!0,ou;throw n}}function RS(){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,pf=!1,e}function LS(e){if(e===ou||e===op)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 wn(e){var n=ke;return e!=null&&(ke=n===null?e:n.concat(e)),n}function yg(){var e=ke;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 Yh(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=_h(e,o.mode,0),n._debugInfo=ke,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 Xh(e){var n=mf;return mf+=1,lu===null&&(lu=MS()),OS(lu,e,n)}function bc(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function BS(e,n){if(n.$$typeof===XL)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
|
|
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 Qh(e,n){var o=yg();o!==null?o.run(BS.bind(null,e,n)):BS(e,n)}function zS(e,n){var o=ae(e)||"Component";$C[o]||($C[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
|
|
82
|
+
<%s>{%s}</%s>`,n,n,o,n,o))}function Gh(e,n){var o=yg();o!==null?o.run(zS.bind(null,e,n)):zS(e,n)}function HS(e,n){var o=ae(e)||"Component";PC[o]||(PC[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 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.
|
|
84
|
+
<%s>%s</%s>`,o,n,o))}function Wh(e,n){var o=yg();o!==null?o.run(HS.bind(null,e,n)):HS(e,n)}function NS(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,N){if(T===null||T.tag!==6)return T=lg(M,C.mode,N),T.return=C,T._debugOwner=C,T._debugTask=C._debugTask,T._debugInfo=ke,T;return T=u(T,M),T.return=C,T._debugInfo=ke,T}function v(C,T,M,N){var F=M.type;if(F===qr)return T=D(C,T,M.props.children,N,M.key),Yh(M,T,C),T;if(T!==null&&(T.elementType===F||hS(T,M)||typeof F==="object"&&F!==null&&F.$$typeof===Si&&gs(F)===T.type))return T=u(T,M.props),bc(T,M),T.return=C,T._debugOwner=M._owner,T._debugInfo=ke,T;return T=_h(M,C.mode,N),bc(T,M),T.return=C,T._debugInfo=ke,T}function x(C,T,M,N){if(T===null||T.tag!==4||T.stateNode.containerInfo!==M.containerInfo||T.stateNode.implementation!==M.implementation)return T=sg(M,C.mode,N),T.return=C,T._debugInfo=ke,T;return T=u(T,M.children||[]),T.return=C,T._debugInfo=ke,T}function D(C,T,M,N,F){if(T===null||T.tag!==7)return T=Sa(M,C.mode,N,F),T.return=C,T._debugOwner=C,T._debugTask=C._debugTask,T._debugInfo=ke,T;return T=u(T,M),T.return=C,T._debugInfo=ke,T}function O(C,T,M){if(typeof T==="string"&&T!==""||typeof T==="number"||typeof T==="bigint")return T=lg(""+T,C.mode,M),T.return=C,T._debugOwner=C,T._debugTask=C._debugTask,T._debugInfo=ke,T;if(typeof T==="object"&&T!==null){switch(T.$$typeof){case Ko:return M=_h(T,C.mode,M),bc(M,T),M.return=C,C=wn(T._debugInfo),M._debugInfo=ke,ke=C,M;case Ur:return T=sg(T,C.mode,M),T.return=C,T._debugInfo=ke,T;case Si:var N=wn(T._debugInfo);return T=gs(T),C=O(C,T,M),ke=N,C}if(sn(T)||Rt(T))return M=Sa(T,C.mode,M,null),M.return=C,M._debugOwner=C,M._debugTask=C._debugTask,C=wn(T._debugInfo),M._debugInfo=ke,ke=C,M;if(typeof T.then==="function")return N=wn(T._debugInfo),C=O(C,Xh(T),M),ke=N,C;if(T.$$typeof===el)return O(C,jh(C,T),M);Qh(C,T)}return typeof T==="function"&&Gh(C,T),typeof T==="symbol"&&Wh(C,T),null}function A(C,T,M,N){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,N);if(typeof M==="object"&&M!==null){switch(M.$$typeof){case Ko:return M.key===F?(F=wn(M._debugInfo),C=v(C,T,M,N),ke=F,C):null;case Ur:return M.key===F?x(C,T,M,N):null;case Si:return F=wn(M._debugInfo),M=gs(M),C=A(C,T,M,N),ke=F,C}if(sn(M)||Rt(M)){if(F!==null)return null;return F=wn(M._debugInfo),C=D(C,T,M,N,null),ke=F,C}if(typeof M.then==="function")return F=wn(M._debugInfo),C=A(C,T,Xh(M),N),ke=F,C;if(M.$$typeof===el)return A(C,T,jh(C,M),N);Qh(C,M)}return typeof M==="function"&&Gh(C,M),typeof M==="symbol"&&Wh(C,M),null}function B(C,T,M,N,F){if(typeof N==="string"&&N!==""||typeof N==="number"||typeof N==="bigint")return C=C.get(M)||null,g(T,C,""+N,F);if(typeof N==="object"&&N!==null){switch(N.$$typeof){case Ko:return M=C.get(N.key===null?M:N.key)||null,C=wn(N._debugInfo),T=v(T,M,N,F),ke=C,T;case Ur:return C=C.get(N.key===null?M:N.key)||null,x(T,C,N,F);case Si:var ye=wn(N._debugInfo);return N=gs(N),T=B(C,T,M,N,F),ke=ye,T}if(sn(N)||Rt(N))return M=C.get(M)||null,C=wn(N._debugInfo),T=D(T,M,N,F,null),ke=C,T;if(typeof N.then==="function")return ye=wn(N._debugInfo),T=B(C,T,M,Xh(N),F),ke=ye,T;if(N.$$typeof===el)return B(C,T,M,jh(T,N),F);Qh(T,N)}return typeof N==="function"&&Gh(T,N),typeof N==="symbol"&&Wh(T,N),null}function X(C,T,M,N){if(typeof M!=="object"||M===null)return N;switch(M.$$typeof){case Ko:case Ur:b(C,T,M);var F=M.key;if(typeof F!=="string")break;if(N===null){N=new Set,N.add(F);break}if(!N.has(F)){N.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 Si:M=gs(M),X(C,T,M,N)}return N}function J(C,T,M,N){for(var F=null,ye=null,se=null,te=T,we=T=0,bt=null;te!==null&&we<M.length;we++){te.index>we?(bt=te,te=null):bt=te.sibling;var Pt=A(C,te,M[we],N);if(Pt===null){te===null&&(te=bt);break}F=X(C,Pt,M[we],F),e&&te&&Pt.alternate===null&&n(C,te),T=f(Pt,T,we),se===null?ye=Pt:se.sibling=Pt,se=Pt,te=bt}if(we===M.length)return o(C,te),Be&&El(C,we),ye;if(te===null){for(;we<M.length;we++)te=O(C,M[we],N),te!==null&&(F=X(C,te,M[we],F),T=f(te,T,we),se===null?ye=te:se.sibling=te,se=te);return Be&&El(C,we),ye}for(te=a(te);we<M.length;we++)bt=B(te,C,we,M[we],N),bt!==null&&(F=X(C,bt,M[we],F),e&&bt.alternate!==null&&te.delete(bt.key===null?we:bt.key),T=f(bt,T,we),se===null?ye=bt:se.sibling=bt,se=bt);return e&&te.forEach(function(Wl){return n(C,Wl)}),Be&&El(C,we),ye}function dt(C,T,M,N){if(M==null)throw Error("An iterable object provided no iterator.");for(var F=null,ye=null,se=T,te=T=0,we=null,bt=null,Pt=M.next();se!==null&&!Pt.done;te++,Pt=M.next()){se.index>te?(we=se,se=null):we=se.sibling;var Wl=A(C,se,Pt.value,N);if(Wl===null){se===null&&(se=we);break}bt=X(C,Wl,Pt.value,bt),e&&se&&Wl.alternate===null&&n(C,se),T=f(Wl,T,te),ye===null?F=Wl:ye.sibling=Wl,ye=Wl,se=we}if(Pt.done)return o(C,se),Be&&El(C,te),F;if(se===null){for(;!Pt.done;te++,Pt=M.next())se=O(C,Pt.value,N),se!==null&&(bt=X(C,se,Pt.value,bt),T=f(se,T,te),ye===null?F=se:ye.sibling=se,ye=se);return Be&&El(C,te),F}for(se=a(se);!Pt.done;te++,Pt=M.next())we=B(se,C,te,Pt.value,N),we!==null&&(bt=X(C,we,Pt.value,bt),e&&we.alternate!==null&&se.delete(we.key===null?te:we.key),T=f(we,T,te),ye===null?F=we:ye.sibling=we,ye=we);return e&&se.forEach(function(_z){return n(C,_z)}),Be&&El(C,te),F}function Ne(C,T,M,N){if(typeof M==="object"&&M!==null&&M.type===qr&&M.key===null&&(Yh(M,null,C),M=M.props.children),typeof M==="object"&&M!==null){switch(M.$$typeof){case Ko:var F=wn(M._debugInfo);e:{for(var ye=M.key;T!==null;){if(T.key===ye){if(ye=M.type,ye===qr){if(T.tag===7){o(C,T.sibling),N=u(T,M.props.children),N.return=C,N._debugOwner=M._owner,N._debugInfo=ke,Yh(M,N,C),C=N;break e}}else if(T.elementType===ye||hS(T,M)||typeof ye==="object"&&ye!==null&&ye.$$typeof===Si&&gs(ye)===T.type){o(C,T.sibling),N=u(T,M.props),bc(N,M),N.return=C,N._debugOwner=M._owner,N._debugInfo=ke,C=N;break e}o(C,T);break}else n(C,T);T=T.sibling}M.type===qr?(N=Sa(M.props.children,C.mode,N,M.key),N.return=C,N._debugOwner=C,N._debugTask=C._debugTask,N._debugInfo=ke,Yh(M,N,C),C=N):(N=_h(M,C.mode,N),bc(N,M),N.return=C,N._debugInfo=ke,C=N)}return C=p(C),ke=F,C;case Ur: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),N=u(T,F.children||[]),N.return=C,C=N;break e}else{o(C,T);break}else n(C,T);T=T.sibling}N=sg(F,C.mode,N),N.return=C,C=N}return p(C);case Si:return F=wn(M._debugInfo),M=gs(M),C=Ne(C,T,M,N),ke=F,C}if(sn(M))return F=wn(M._debugInfo),C=J(C,T,M,N),ke=F,C;if(Rt(M)){if(F=wn(M._debugInfo),ye=Rt(M),typeof ye!=="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var se=ye.call(M);if(se===M){if(C.tag!==0||Object.prototype.toString.call(C.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(se)!=="[object Generator]")jC||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."),jC=!0}else M.entries!==ye||_y||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),_y=!0);return C=dt(C,T,se,N),ke=F,C}if(typeof M.then==="function")return F=wn(M._debugInfo),C=Ne(C,T,Xh(M),N),ke=F,C;if(M.$$typeof===el)return Ne(C,T,jh(C,M),N);Qh(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),N=u(T,F),N.return=C,C=N):(o(C,T),N=lg(F,C.mode,N),N.return=C,N._debugOwner=C,N._debugTask=C._debugTask,N._debugInfo=ke,C=N),p(C);return typeof M==="function"&&Gh(C,M),typeof M==="symbol"&&Wh(C,M),o(C,T)}return function(C,T,M,N){var F=ke;ke=null;try{mf=0;var ye=Ne(C,T,M,N);return lu=null,ye}catch(bt){if(bt===ou||bt===op)throw bt;var se=w(29,bt,null,C.mode);se.lanes=N,se.return=C;var te=se._debugInfo=ke;if(se._debugOwner=C._debugOwner,se._debugTask=C._debugTask,te!=null){for(var we=te.length-1;0<=we;we--)if(typeof te[we].stack==="string"){se._debugOwner=te[we],se._debugTask=te[we].debugTask;break}}return se}finally{ke=F}}}function _S(e,n){var o=sn(e);return e=!o&&typeof Rt(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 bg(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vg(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 ys(e){return{lane:e,tag:XC,payload:null,callback:null,next:null}}function bs(e,n,o){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,qy===a&&!WC){var u=ae(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),
|
|
86
|
+
Please update the following component: %s`,u),WC=!0}if((Ie&rn)!==yn)return u=a.pending,u===null?n.next=n:(n.next=u.next,u.next=n),a.pending=n,n=Nh(e),fS(e,null,o),n;return Hh(e,a,n,o),Nh(e)}function vc(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,vl(e,o)}}function Fh(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 Sc(){if(Vy){var e=iu;if(e!==null)throw e}}function wc(e,n,o,a){Vy=!1;var u=e.updateQueue;qs=!1,qy=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?(Ce&A)===A:(a&A)===A){A!==0&&A===_a&&(Vy=!0),D!==null&&(D=D.next={lane:0,tag:g.tag,payload:g.payload,callback:null,next:null});e:{A=e;var X=g,J=n,dt=o;switch(X.tag){case QC:if(X=X.payload,typeof X==="function"){tu=!0;var Ne=X.call(dt,O,J);if(A.mode&Ln){Ze(!0);try{X.call(dt,O,J)}finally{Ze(!1)}}tu=!1,O=Ne;break e}O=X;break e;case Uy:A.flags=A.flags&-65537|128;case XC:if(Ne=X.payload,typeof Ne==="function"){if(tu=!0,X=Ne.call(dt,O,J),A.mode&Ln){Ze(!0);try{Ne.call(dt,O,J)}finally{Ze(!1)}}tu=!1}else X=Ne;if(X===null||X===void 0)break e;O=Me({},O,X);break e;case GC:qs=!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),Is|=p,e.lanes=p,e.memoizedState=O}qy=null}function US(e,n){if(typeof e!=="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+e);e.call(n)}function RR(e,n){var o=e.shared.hiddenCallbacks;if(o!==null)for(e.shared.hiddenCallbacks=null,e=0;e<o.length;e++)US(o[e],n)}function qS(e,n){var o=e.callbacks;if(o!==null)for(e.callbacks=null,e=0;e<o.length;e++)US(o[e],n)}function VS(e,n){var o=cl;Ue(sp,o,e),Ue(su,n,e),cl=o|n.baseLanes}function Sg(e){Ue(sp,cl,e),Ue(su,su.current,e)}function wg(e){cl=sp.current,K(su,e),K(sp,e)}function vs(e){var n=e.alternate;Ue($t,$t.current&au,e),Ue(Ci,e,e),Xi===null&&(n===null||su.current!==null?Xi=e:n.memoizedState!==null&&(Xi=e))}function xg(e){Ue($t,$t.current,e),Ue(Ci,e,e),Xi===null&&(Xi=e)}function jS(e){e.tag===22?(Ue($t,$t.current,e),Ue(Ci,e,e),Xi===null&&(Xi=e)):Ss(e)}function Ss(e){Ue($t,$t.current,e),Ue(Ci,Ci.current,e)}function yi(e){K(Ci,e),Xi===e&&(Xi=null),K($t,e)}function Jh(e){for(var n=e;n!==null;){if(n.tag===13){var o=n.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||H0(o)||N0(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;Gi===null?Gi=[e]:Gi.push(e)}function q(){var e=z;if(Gi!==null&&(Pl++,Gi[Pl]!==e)){var n=ae(ge);if(!FC.has(n)&&(FC.add(n),Gi!==null)){for(var o="",a=0;a<=Pl;a++){var u=Gi[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
|
|
92
|
+
`,n,o)}}}function Ar(e){e===void 0||e===null||sn(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 Zh(){var e=ae(ge);ZC.has(e)||(ZC.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
|
|
96
|
+
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function kg(e,n){if(bf)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(!_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
|
|
99
|
+
Incoming: %s`,z,"["+n.join(", ")+"]","["+e.join(", ")+"]");for(var o=0;o<n.length&&o<e.length;o++)if(!jn(e[o],n[o]))return!1;return!0}function Cg(e,n,o,a,u,f){if(Il=f,ge=n,Gi=e!==null?e._debugHookTypes:null,Pl=-1,bf=e!==null&&e.type!==n.type,Object.prototype.toString.call(o)==="[object AsyncFunction]"||Object.prototype.toString.call(o)==="[object AsyncGeneratorFunction]")f=ae(ge),jy.has(f)||(jy.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?$y:Gi!==null?KC:Iy,Ia=f=(n.mode&Ln)!==me;var p=zy(o,a,u);if(Ia=!1,uu&&(p=Ag(n,o,a,u)),f){Ze(!0);try{p=Ag(n,o,a,u)}finally{Ze(!1)}}return IS(e,n),p}function IS(e,n){n._debugHookTypes=Gi,n.dependencies===null?$l!==null&&(n.dependencies={lanes:0,firstContext:null,_debugThenableState:$l}):n.dependencies._debugThenableState=$l,H.H=vf;var o=ut!==null&&ut.next!==null;if(Il=0,Gi=z=Jt=ut=ge=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."),rp=!1,yf=0,$l=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&&Vh(e)&&(Zt=!0)),pf?(pf=!1,e=!0):e=!1,e&&(n=ae(n)||"Unknown",JC.has(n)||jy.has(n)||(JC.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 Ag(e,n,o,a){ge=e;var u=0;do{if(uu&&($l=null),yf=0,uu=!1,u>=mz)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(u+=1,bf=!1,Jt=ut=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=eA,f=zy(n,o,a)}while(uu);return f}function LR(){var e=H.H,n=e.useState()[0];return n=typeof n.then==="function"?xc(n):n,e=e.useState()[0],(ut!==null?ut.memoizedState:null)!==e&&(ge.flags|=1024),n}function Tg(){var e=up!==0;return up=0,e}function Eg(e,n,o){n.updateQueue=e.updateQueue,n.flags=(n.mode&mo)!==me?n.flags&-402655237:n.flags&-2053,e.lanes&=~o}function Mg(e){if(rp){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}rp=!1}Il=0,Gi=Jt=ut=ge=null,Pl=-1,z=null,uu=!1,yf=up=0,$l=null}function _n(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Jt===null?ge.memoizedState=Jt=e:Jt=Jt.next=e,Jt}function nt(){if(ut===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=ut.next;var n=Jt===null?ge.memoizedState:Jt.next;if(n!==null)Jt=n,ut=e;else{if(e===null){if(ge.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.")}ut=e,e={memoizedState:ut.memoizedState,baseState:ut.baseState,baseQueue:ut.baseQueue,queue:ut.queue,next:null},Jt===null?ge.memoizedState=Jt=e:Jt=Jt.next=e}return Jt}function Kh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xc(e){var n=yf;return yf+=1,$l===null&&($l=MS()),e=OS($l,e,n),n=ge,(Jt===null?n.memoizedState:Jt.next)===null&&(n=n.alternate,H.H=n!==null&&n.memoizedState!==null?$y:Iy),e}function ws(e){if(e!==null&&typeof e==="object"){if(typeof e.then==="function")return xc(e);if(e.$$typeof===el)return xt(e)}throw Error("An unsupported type was passed to use(): "+String(e))}function Aa(e){var n=null,o=ge.updateQueue;if(o!==null&&(n=o.memoCache),n==null){var a=ge.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=Kh(),ge.updateQueue=o),o.memoCache=n,o=n.data[n.index],o===void 0||bf)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 Dg(e,n,o){var a=_n();if(o!==void 0){var u=o(n);if(Ia){Ze(!0);try{o(n)}finally{Ze(!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=_R.bind(null,ge,e),[a.memoizedState,e]}function Tr(e){var n=nt();return Og(n,ut,e)}function Og(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?(Ce&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,ge.lanes|=A,Is|=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,ge.lanes|=O,Is|=O;x=x.next}while(x!==null&&x!==n);if(v===null?p=f:v.next=g,!jn(f,e.memoizedState)&&(Zt=!0,D&&(o=iu,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 kc(e){var n=nt(),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);jn(f,n.memoizedState)||(Zt=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),o.lastRenderedState=f}return[f,a]}function Rg(e,n,o){var a=ge,u=_n();if(Be){if(o===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var f=o();ru||f===o()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),ru=!0)}else{if(f=n(),ru||(o=n(),jn(f,o)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),ru=!0)),ct===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");(Ce&127)!==0||$S(a,n,f)}return u.memoizedState=f,o={value:f,getSnapshot:n},u.queue=o,id(YS.bind(null,a,o,e),[e]),a.flags|=2048,Mr(Qi|Pn,{destroy:void 0},PS.bind(null,a,o,f,n),null),f}function ed(e,n,o){var a=ge,u=nt(),f=Be;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(),!ru){var p=n();jn(o,p)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),ru=!0)}if(p=!jn((ut||u).memoizedState,o))u.memoizedState=o,Zt=!0;u=u.queue;var g=YS.bind(null,a,u,e);if(ti(2048,Pn,g,[e]),u.getSnapshot!==n||p||Jt!==null&&Jt.memoizedState.tag&Qi){if(a.flags|=2048,Mr(Qi|Pn,{destroy:void 0},PS.bind(null,a,u,o,n),null),ct===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");f||(Il&127)!==0||$S(a,n,o)}return o}function $S(e,n,o){e.flags|=16384,e={getSnapshot:n,value:o},n=ge.updateQueue,n===null?(n=Kh(),ge.updateQueue=n,n.stores=[e]):(o=n.stores,o===null?n.stores=[e]:o.push(e))}function PS(e,n,o,a){n.value=o,n.getSnapshot=a,XS(n)&&QS(e)}function YS(e,n,o){return o(function(){XS(n)&&(Vo(2,"updateSyncExternalStore()",e),QS(e))})}function XS(e){var n=e.getSnapshot;e=e.value;try{var o=n();return!jn(e,o)}catch(a){return!0}}function QS(e){var n=On(e,2);n!==null&&zt(n,e,2)}function Lg(e){var n=_n();if(typeof e==="function"){var o=e;if(e=o(),Ia){Ze(!0);try{o()}finally{Ze(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:co,lastRenderedState:e},n}function Bg(e){e=Lg(e);var n=e.queue,o=hw.bind(null,ge,n);return n.dispatch=o,[e.memoizedState,o]}function zg(e){var n=_n();n.memoizedState=n.baseState=e;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=o,n=Gg.bind(null,ge,!0,o),o.dispatch=n,[e,n]}function GS(e,n){var o=nt();return WS(o,ut,e,n)}function WS(e,n,o,a){return e.baseState=o,Og(e,ut,typeof a==="function"?a:co)}function FS(e,n){var o=nt();if(ut!==null)return WS(o,ut,e,n);return o.baseState=e,[e,o.queue.dispatch]}function BR(e,n,o,a,u){if(ud(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,JS(n,f)):(f.next=o.next,n.pending=o.next=f)}}function JS(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),ZS(e,n,g)}catch(x){Hg(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),ZS(e,n,p)}catch(x){Hg(e,n,x)}}function ZS(e,n,o){o!==null&&typeof o==="object"&&typeof o.then==="function"?(H.asyncTransitions++,o.then(rd,rd),o.then(function(a){KS(e,n,a)},function(a){return Hg(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.")):KS(e,n,o)}function KS(e,n,o){n.status="fulfilled",n.value=o,ew(n),e.state=o,n=e.pending,n!==null&&(o=n.next,o===n?e.pending=null:(o=o.next,n.next=o,JS(e,o)))}function Hg(e,n,o){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do n.status="rejected",n.reason=o,ew(n),n=n.next;while(n!==a)}e.action=null}function ew(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function tw(e,n){return n}function Er(e,n){if(Be){var o=ct.formState;if(o!==null){e:{var a=ge;if(Be){if(yt){t:{var u=yt;for(var f=Pi;u.nodeType!==8;){if(!f){u=null;break t}if(u=vi(u.nextSibling),u===null){u=null;break t}}f=u.data,u=f===hb||f===qA?u:null}if(u){yt=vi(u.nextSibling),a=u.data===hb;break e}}ps(a)}a=!1}a&&(n=o[0])}}return o=_n(),o.memoizedState=o.baseState=n,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:tw,lastRenderedState:n},o.queue=a,o=hw.bind(null,ge,a),a.dispatch=o,a=Lg(!1),f=Gg.bind(null,ge,!1,a.queue),a=_n(),u={state:n,dispatch:null,action:e,pending:null},a.queue=u,o=BR.bind(null,ge,u,f,o),u.dispatch=o,a.memoizedState=e,[n,o,!1]}function td(e){var n=nt();return nw(n,ut,e)}function nw(e,n,o){if(n=Og(e,n,tw)[0],e=Tr(co)[0],typeof n==="object"&&n!==null&&typeof n.then==="function")try{var a=xc(n)}catch(p){if(p===ou)throw op;throw p}else a=n;n=nt();var u=n.queue,f=u.dispatch;return o!==n.memoizedState&&(ge.flags|=2048,Mr(Qi|Pn,{destroy:void 0},zR.bind(null,u,o),null)),[a,f,e]}function zR(e,n){e.action=n}function nd(e){var n=nt(),o=ut;if(o!==null)return nw(n,o,e);nt(),n=n.memoizedState,o=nt();var a=o.queue.dispatch;return o.memoizedState=e,[n,a,!1]}function Mr(e,n,o,a){return e={tag:e,create:o,deps:a,inst:n,next:null},n=ge.updateQueue,n===null&&(n=Kh(),ge.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 Ng(e){var n=_n();return e={current:e},n.memoizedState=e}function Ta(e,n,o,a){var u=_n();ge.flags|=e,u.memoizedState=Mr(Qi|n,{destroy:void 0},o,a===void 0?null:a)}function ti(e,n,o,a){var u=nt();a=a===void 0?null:a;var f=u.memoizedState.inst;ut!==null&&a!==null&&kg(a,ut.memoizedState.deps)?u.memoizedState=Mr(n,f,o,a):(ge.flags|=e,u.memoizedState=Mr(Qi|n,f,o,a))}function id(e,n){(ge.mode&mo)!==me?Ta(276826112,Pn,e,n):Ta(8390656,Pn,e,n)}function HR(e){ge.flags|=4;var n=ge.updateQueue;if(n===null)n=Kh(),ge.updateQueue=n,n.events=[e];else{var o=n.events;o===null?n.events=[e]:o.push(e)}}function _g(e){var n=_n(),o={impl:e};return n.memoizedState=o,function(){if((Ie&rn)!==yn)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return o.impl.apply(void 0,arguments)}}function od(e){var n=nt().memoizedState;return HR({ref:n,nextImpl:e}),function(){if((Ie&rn)!==yn)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return n.impl.apply(void 0,arguments)}}function Ug(e,n){var o=4194308;return(ge.mode&mo)!==me&&(o|=134217728),Ta(o,Ai,e,n)}function iw(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 qg(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;(ge.mode&mo)!==me&&(a|=134217728),Ta(a,Ai,iw.bind(null,n,e),o)}function ld(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,ti(4,Ai,iw.bind(null,n,e),o)}function Vg(e,n){return _n().memoizedState=[e,n===void 0?null:n],e}function sd(e,n){var o=nt();n=n===void 0?null:n;var a=o.memoizedState;if(n!==null&&kg(n,a[1]))return a[0];return o.memoizedState=[e,n],e}function jg(e,n){var o=_n();n=n===void 0?null:n;var a=e();if(Ia){Ze(!0);try{e()}finally{Ze(!1)}}return o.memoizedState=[a,n],a}function ad(e,n){var o=nt();n=n===void 0?null:n;var a=o.memoizedState;if(n!==null&&kg(n,a[1]))return a[0];if(a=e(),Ia){Ze(!0);try{e()}finally{Ze(!1)}}return o.memoizedState=[a,n],a}function Ig(e,n){var o=_n();return $g(o,e,n)}function ow(e,n){var o=nt();return sw(o,ut.memoizedState,e,n)}function lw(e,n){var o=nt();return ut===null?$g(o,e,n):sw(o,ut.memoizedState,e,n)}function $g(e,n,o){if(o===void 0||(Il&1073741824)!==0&&(Ce&261930)===0)return e.memoizedState=n;return e.memoizedState=o,e=ax(),ge.lanes|=e,Is|=e,o}function sw(e,n,o,a){if(jn(o,n))return o;if(su.current!==null)return e=$g(e,o,a),jn(e,n)||(Zt=!0),e;if((Il&42)===0||(Il&1073741824)!==0&&(Ce&261930)===0)return Zt=!0,e.memoizedState=o;return e=ax(),ge.lanes|=e,Is|=e,n}function rd(){H.asyncTransitions--}function aw(e,n,o,a,u){var f=et.p;et.p=f!==0&&f<po?f:po;var p=H.T,g={};g._updatedFibers=new Set,H.T=g,Gg(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(rd,rd);var D=OR(v,a);Cc(e,n,D,bi(e))}else Cc(e,n,a,bi(e))}catch(O){Cc(e,n,{then:function(){},status:"rejected",reason:O},bi(e))}finally{et.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 Pg(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=rw(e).queue;MR(e),aw(e,u,n,Ka,o===null?y:function(){return uw(e),o(a)})}function rw(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:co,lastRenderedState:Ka},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 uw(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=rw(e);n.next===null&&(n=e.alternate.memoizedState),Cc(e,n.next.queue,{},bi(e))}function Yg(){var e=Lg(!1);return e=aw.bind(null,ge,e.queue,!0,!1),_n().memoizedState=e,[!1,e]}function cw(){var e=Tr(co)[0],n=nt().memoizedState;return[typeof e==="boolean"?e:xc(e),n]}function fw(){var e=kc(co)[0],n=nt().memoizedState;return[typeof e==="boolean"?e:xc(e),n]}function Ea(){return xt(zf)}function Xg(){var e=_n(),n=ct.identifierPrefix;if(Be){var o=_l,a=Nl;o=(a&~(1<<32-Un(a)-1)).toString(32)+o,n="_"+n+"R_"+o,o=up++,0<o&&(n+="H"+o.toString(32)),n+="_"}else o=pz++,n="_"+n+"r_"+o.toString(32)+"_";return e.memoizedState=n}function Qg(){return _n().memoizedState=NR.bind(null,ge)}function NR(e,n){for(var o=e.return;o!==null;){switch(o.tag){case 24:case 3:var a=bi(o),u=ys(a),f=bs(o,u,a);f!==null&&(Vo(a,"refresh()",e),zt(f,o,a),vc(f,o,a)),e=dg(),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 _R(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=bi(e);var u={lane:a,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};ud(e)?dw(n,u):(u=tg(e,n,u,a),u!==null&&(Vo(a,"dispatch()",e),zt(u,e,a),pw(u,n,a)))}function hw(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=bi(e),Cc(e,n,o,a)&&Vo(a,"setState()",e)}function Cc(e,n,o,a){var u={lane:a,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(ud(e))dw(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,jn(v,g))return Hh(e,n,u,0),ct===null&&zh(),!1}catch(x){}finally{H.H=p}}if(o=tg(e,n,u,a),o!==null)return zt(o,e,a),pw(o,n,a),!0}return!1}function Gg(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:C0(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ud(e)){if(n)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else n=tg(e,o,a,2),n!==null&&(Vo(2,"setOptimistic()",e),zt(n,e,2))}function ud(e){var n=e.alternate;return e===ge||n!==null&&n===ge}function dw(e,n){uu=rp=!0;var o=e.pending;o===null?n.next=n:(n.next=o.next,o.next=n),e.pending=n}function pw(e,n,o){if((o&4194048)!==0){var a=n.lanes;a&=e.pendingLanes,o|=a,n.lanes=o,vl(e,o)}}function Wg(e){if(e!==null&&typeof e!=="function"){var n=String(e);fA.has(n)||(fA.add(n),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",e))}}function Fg(e,n,o,a){var u=e.memoizedState,f=o(a,u);if(e.mode&Ln){Ze(!0);try{f=o(a,u)}finally{Ze(!1)}}f===void 0&&(n=ze(n)||"Component",aA.has(n)||(aA.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 mw(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&Ln){Ze(!0);try{o=g.shouldComponentUpdate(a,f,p)}finally{Ze(!1)}}return o===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",ze(n)||"Component"),o}return n.prototype&&n.prototype.isPureReactComponent?!hc(o,a)||!hc(u,f):!0}function gw(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=ae(e)||"Component",nA.has(e)||(nA.add(e),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",e)),Py.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=Me({},o));for(var u in e)o[u]===void 0&&(o[u]=e[u])}return o}function yw(e){wy(e),console.warn(`%s
|
|
100
100
|
|
|
101
101
|
%s
|
|
102
|
-
`,
|
|
103
|
-
Visit https://react.dev/link/error-boundaries to learn more about error boundaries.`)}function
|
|
102
|
+
`,cu?"An error occurred in the <"+cu+"> 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 bw(e){var n=cu?"The above error occurred in the <"+cu+"> 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, "+((Yy||"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,
|
|
108
|
+
`,e,n,o].slice(0),typeof e[0]==="string"?e.splice(0,1,QA+" "+e[0],GA,zp+a+zp,WA):e.splice(0,0,QA,GA,zp+a+zp,WA),e.unshift(console),a=Hz.apply(console.error,e),a()}else console.error(`%o
|
|
109
109
|
|
|
110
110
|
%s
|
|
111
111
|
|
|
112
112
|
%s
|
|
113
|
-
`,e,n,o)}function
|
|
113
|
+
`,e,n,o)}function vw(e){wy(e)}function cd(e,n){try{cu=n.source?ae(n.source):null,Yy=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 Sw(e,n,o){try{cu=o.source?ae(o.source):null,Yy=ae(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 Jg(e,n,o){return o=ys(o),o.tag=Uy,o.payload={element:null},o.callback=function(){Y(n.source,cd,e,n)},o}function Zg(e){return e=ys(e),e.tag=Uy,e}function Kg(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(){dS(o),Y(a.source,Sw,n,o,a)}}var p=o.stateNode;p!==null&&typeof p.componentDidCatch==="function"&&(e.callback=function(){dS(o),Y(a.source,Sw,n,o,a),typeof u!=="function"&&(Ps===null?Ps=new Set([this]):Ps.add(this)),cz(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.",ae(o)||"Unknown")})}function UR(e,n,o,a,u){if(o.flags|=32768,il&&Lc(e,u),a!==null&&typeof a==="object"&&typeof a.then==="function"){if(n=o.alternate,n!==null&&Cr(n,o,u,!0),Be&&(sl=!0),o=Ci.current,o!==null){switch(o.tag){case 31:case 13:return Xi===null?vd():o.alternate===null&&Ot===Xl&&(Ot=hp),o.flags&=-257,o.flags|=65536,o.lanes=u,a===lp?o.flags|=16384:(n=o.updateQueue,n===null?o.updateQueue=new Set([a]):n.add(a),S0(e,a,u)),!1;case 22:return o.flags|=65536,a===lp?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)),S0(e,a,u)),!1}throw Error("Unexpected Suspense handler tag ("+o.tag+"). This is a bug in React.")}return S0(e,a,u),vd(),!1}if(Be)return sl=!0,n=Ci.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=u,a!==Ey&&pc(pi(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!==Ey&&pc(pi(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=pi(a,o),u=Jg(e.stateNode,a,u),Fh(e,u),Ot!==Vs&&(Ot=$a)),!1;var f=pi(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(Af===null?Af=[f]:Af.push(f),Ot!==Vs&&(Ot=$a),n===null)return!0;a=pi(a,o),o=n;do{switch(o.tag){case 3:return o.flags|=65536,e=u&-u,o.lanes|=e,e=Jg(o.stateNode,a,e),Fh(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"&&(Ps===null||!Ps.has(f))))return o.flags|=65536,u&=-u,o.lanes|=u,u=Zg(u),Kg(u,e,o,a),Fh(o,u),!1}o=o.return}while(o!==null);return!1}function xn(e,n,o,a){n.child=e===null?YC(n,null,o,a):ja(n,e.child,o,a)}function ww(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=Cg(e,n,o,p,f,u),g=Tg(),e!==null&&!Zt)return Eg(e,n,u),Ol(e,n,u);return Be&&g&&ag(n),n.flags|=1,xn(e,n,a,u),n.child}function xw(e,n,o,a,u){if(e===null){var f=o.type;if(typeof f==="function"&&!ig(f)&&f.defaultProps===void 0&&o.compare===null)return o=va(f),n.tag=15,n.type=o,t0(n,f),kw(e,n,o,a,u);return e=og(o.type,null,a,n,n.mode,u),e.ref=n.ref,e.return=n,n.child=e}if(f=e.child,!a0(e,u)){var p=f.memoizedProps;if(o=o.compare,o=o!==null?o:hc,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 kw(e,n,o,a,u){if(e!==null){var f=e.memoizedProps;if(hc(f,a)&&e.ref===n.ref&&n.type===e.type)if(Zt=!1,n.pendingProps=a=f,a0(e,u))(e.flags&131072)!==0&&(Zt=!0);else return n.lanes=e.lanes,Ol(e,n,u)}return e0(e,n,o,a,u)}function Cw(e,n,o,a){var u=a.children,f=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:Kc,_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 Aw(e,n,f,o,a)}if((o&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ph(n,f!==null?f.cachePool:null),f!==null?VS(n,f):Sg(n),jS(n);else return a=n.lanes=536870912,Aw(e,n,f!==null?f.baseLanes|o:o,o,a)}else f!==null?(Ph(n,f.cachePool),VS(n,f),Ss(n),n.memoizedState=null):(e!==null&&Ph(n,null),Sg(n),Ss(n));return xn(e,n,u,o),n.child}function Ac(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:Kc,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Aw(e,n,o,a,u){var f=gg();return f=f===null?null:{parent:Wt._currentValue,pool:f},n.memoizedState={baseLanes:o,cachePool:f},e!==null&&Ph(n,null),Sg(n),jS(n),e!==null&&Cr(e,n,a,!0),n.childLanes=u,null}function fd(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=
|
|
115
|
+
+ <Activity %s>`,o===!0?"hidden":o===!1?"hidden={false}":"hidden={...}",o?'mode="hidden"':'mode="visible"'),n=dd({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function Tw(e,n,o){return ja(n,e.child,null,o),e=fd(n,n.pendingProps),e.flags|=2,yi(n),n.memoizedState=null,e}function qR(e,n,o){var a=n.pendingProps,u=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(Be){if(a.mode==="hidden")return e=fd(n,a),n.lanes=536870912,Ac(null,e);if(xg(n),(e=yt)?(o=Jx(e,Pi),o=o!==null&&o.data===Wa?o:null,o!==null&&(a={dehydrated:o,treeContext:bS(),retryLane:536870912,hydrationErrors:null},n.memoizedState=a,a=gS(o),a.return=n,n.child=a,An=n,yt=null)):o=null,o===null)throw Uh(n,e),ps(n);return n.lanes=536870912,null}return fd(n,a)}var f=e.memoizedState;if(f!==null){var p=f.dehydrated;if(xg(n),u)if(n.flags&256)n.flags&=-257,n=Tw(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(SS(),(o&536870912)!==0&&bd(n),Zt||Cr(e,n,o,!1),u=(o&e.childLanes)!==0,Zt||u){if(a=ct,a!==null&&(p=nc(a,o),p!==0&&p!==f.retryLane))throw f.retryLane=p,On(e,p),zt(a,e,p),Xy;vd(),n=Tw(e,n,o)}else e=f.treeContext,yt=vi(p.nextSibling),An=n,Be=!0,Bs=null,sl=!1,ki=null,Pi=!1,e!==null&&vS(n,e),n=fd(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&&bd(n),e=Tl(f,a),e.ref=n.ref,n.child=e,e.return=n,e}function hd(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 e0(e,n,o,a,u){if(o.prototype&&typeof o.prototype.render==="function"){var f=ze(o)||"Unknown";hA[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),hA[f]=!0)}if(n.mode&Ln&&go.recordLegacyContextWarning(n,null),e===null&&(t0(n,n.type),o.contextTypes&&(f=ze(o)||"Unknown",pA[f]||(pA[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=Cg(e,n,o,a,void 0,u),a=Tg(),e!==null&&!Zt)return Eg(e,n,u),Ol(e,n,u);return Be&&a&&ag(n),n.flags|=1,xn(e,n,o,u),n.child}function Ew(e,n,o,a,u,f){if(ka(n),Pl=-1,bf=e!==null&&e.type!==n.type,n.updateQueue=null,o=Ag(n,a,o,u),IS(e,n),a=Tg(),e!==null&&!Zt)return Eg(e,n,f),Ol(e,n,f);return Be&&a&&ag(n),n.flags|=1,xn(e,n,o,f),n.child}function Mw(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=ct,p===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");g=Zg(g),Kg(g,p,n,pi(f,n)),Fh(n,g)}if(ka(n),n.stateNode===null){if(p=Ls,f=o.contextType,"contextType"in o&&f!==null&&(f===void 0||f.$$typeof!==el)&&!cA.has(o)&&(cA.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===Q0?" 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",ze(o)||"Component",g)),typeof f==="object"&&f!==null&&(p=xt(f)),f=new o(a,p),n.mode&Ln){Ze(!0);try{f=new o(a,p)}finally{Ze(!1)}}if(p=n.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Py,n.stateNode=f,f._reactInternals=n,f._reactInternalInstance=tA,typeof o.getDerivedStateFromProps==="function"&&p===null&&(p=ze(o)||"Component",iA.has(p)||(iA.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=ze(o)||"Component";var x=typeof o.getDerivedStateFromProps==="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";lA.has(f)||(lA.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=
|
|
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"?`
|
|
123
|
+
`+v:""))}}f=n.stateNode,p=ze(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&&!uA.has(o)&&(uA.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&&!rA.has(o)&&(rA.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.",ze(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"||oA.has(o)||(oA.add(o),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",ze(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"||sn(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={},bg(n),p=o.contextType,f.context=typeof p==="object"&&p!==null?xt(p):Ls,f.state===a&&(p=ze(o)||"Component",sA.has(p)||(sA.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&Ln&&go.recordLegacyContextWarning(n,f),go.recordUnsafeLifecycleWarnings(n,f),f.state=n.memoizedState,p=o.getDerivedStateFromProps,typeof p==="function"&&(Fg(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.",ae(n)||"Component"),Py.enqueueReplaceState(f,f.state,null)),wc(n,a,f,u),Sc(),f.state=n.memoizedState),typeof f.componentDidMount==="function"&&(n.flags|=4194308),(n.mode&mo)!==me&&(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=Ls,typeof v==="object"&&v!==null&&(p=xt(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)&&gw(n,f,a,p),qs=!1;var A=n.memoizedState;f.state=A,wc(n,a,f,u),Sc(),O=n.memoizedState,D||A!==O||qs?(typeof x==="function"&&(Fg(n,o,x,a),O=n.memoizedState),(g=qs||mw(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)!==me&&(n.flags|=134217728)):(typeof f.componentDidMount==="function"&&(n.flags|=4194308),(n.mode&mo)!==me&&(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)!==me&&(n.flags|=134217728),f=!1)}else{f=n.stateNode,vg(e,n),p=n.memoizedProps,v=Ma(o,p),f.props=v,x=n.pendingProps,A=f.context,O=o.contextType,g=Ls,typeof O==="object"&&O!==null&&(g=xt(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)&&gw(n,f,a,g),qs=!1,A=n.memoizedState,f.state=A,wc(n,a,f,u),Sc();var B=n.memoizedState;p!==x||A!==B||qs||e!==null&&e.dependencies!==null&&Vh(e.dependencies)?(typeof D==="function"&&(Fg(n,o,D,a),B=n.memoizedState),(v=qs||mw(n,o,v,a,A,B,g)||e!==null&&e.dependencies!==null&&Vh(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,hd(e,n),p=(n.flags&128)!==0,g||p){if(g=n.stateNode,fi(n),p&&typeof o.getDerivedStateFromError!=="function")o=null,In=-1;else if(o=RC(g),n.mode&Ln){Ze(!0);try{RC(g)}finally{Ze(!1)}}n.flags|=1,e!==null&&p?(n.child=ja(n,e.child,null,u),n.child=ja(n,null,o,u)):xn(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&&(fu||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",ae(n)||"a component"),fu=!0),e}function Dw(e,n,o,a){return xa(),n.flags|=256,xn(e,n,o,a),n.child}function t0(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=ze(n)||"Unknown",mA[e]||(console.error("%s: Function components do not support getDerivedStateFromProps.",e),mA[e]=!0)),typeof n.contextType==="object"&&n.contextType!==null&&(n=ze(n)||"Unknown",dA[n]||(console.error("%s: Function components do not support contextType.",n),dA[n]=!0))}function n0(e){return{baseLanes:e,cachePool:ES()}}function i0(e,n,o){return e=e!==null?e.childLanes&~o:0,n&&(e|=si),e}function Ow(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&gf)!==0),a&&(f=!0,n.flags&=-129),a=(n.flags&32)!==0,n.flags&=-33,e===null){if(Be){if(f?vs(n):Ss(n),(e=yt)?(o=Jx(e,Pi),o=o!==null&&o.data!==Wa?o:null,o!==null&&(a={dehydrated:o,treeContext:bS(),retryLane:536870912,hydrationErrors:null},n.memoizedState=a,a=gS(o),a.return=n,n.child=a,An=n,yt=null)):o=null,o===null)throw Uh(n,e),ps(n);return N0(o)?n.lanes=32:n.lanes=536870912,null}var g=u.children;if(u=u.fallback,f){Ss(n);var v=n.mode;return g=dd({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=n0(o),u.childLanes=i0(e,a,o),n.memoizedState=Qy,Ac(null,u)}return vs(n),o0(n,g)}var x=e.memoizedState;if(x!==null){var D=x.dehydrated;if(D!==null){if(p)n.flags&256?(vs(n),n.flags&=-257,n=l0(e,n,o)):n.memoizedState!==null?(Ss(n),n.child=e.child,n.flags|=128,n=null):(Ss(n),g=u.fallback,v=n.mode,u=dd({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=n0(o),u.childLanes=i0(e,a,o),n.memoizedState=Qy,n=Ac(null,u));else if(vs(n),SS(),(o&536870912)!==0&&bd(n),N0(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"&&Ty.set(g,u),pc(u),n=l0(e,n,o)}else if(Zt||Cr(e,n,o,!1),a=(o&e.childLanes)!==0,Zt||a){if(a=ct,a!==null&&(u=nc(a,o),u!==0&&u!==x.retryLane))throw x.retryLane=u,On(e,u),zt(a,e,u),Xy;H0(D)||vd(),n=l0(e,n,o)}else H0(D)?(n.flags|=192,n.child=e.child,n=null):(e=x.treeContext,yt=vi(D.nextSibling),An=n,Be=!0,Bs=null,sl=!1,ki=null,Pi=!1,e!==null&&vS(n,e),n=o0(n,u.children),n.flags|=4096);return n}}if(f)return Ss(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,Ac(null,u),u=n.child,g=e.child.memoizedState,g===null?g=n0(o):(v=g.cachePool,v!==null?(A=Wt._currentValue,v=v.parent!==A?{parent:A,pool:A}:v):v=ES(),g={baseLanes:g.baseLanes|o,cachePool:v}),u.memoizedState=g,u.childLanes=i0(e,a,o),n.memoizedState=Qy,Ac(e.child,u);return x!==null&&(o&62914560)===o&&(o&e.lanes)!==0&&bd(n),vs(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 o0(e,n){return n=dd({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function dd(e,n){return e=w(22,e,null,n),e.lanes=0,e}function l0(e,n,o){return ja(n,e.child,null,o),e=o0(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Rw(e,n,o){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n),fg(e.return,n,o)}function s0(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 Lw(e,n,o){var a=n.pendingProps,u=a.revealOrder,f=a.tail,p=a.children,g=$t.current;if((a=(g&gf)!==0)?(g=g&au|gf,n.flags|=128):g&=au,Ue($t,g,n),g=u==null?"null":u,u!=="forwards"&&u!=="unstable_legacy-backwards"&&u!=="together"&&u!=="independent"&&!gA[g])if(gA[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,!fp[g])if(f==null){if(u==="forwards"||u==="backwards"||u==="unstable_legacy-backwards")fp[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"?(fp[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"&&(fp[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(sn(p)){for(g=0;g<p.length;g++)if(!_S(p[g],g))break e}else if(g=Rt(p),typeof g==="function"){if(g=g.call(p))for(var v=g.next(),x=0;!v.done;v=g.next()){if(!_S(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(xn(e,n,p,o),Be?(ds(),p=ef):p=0,!a&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Rw(e,o,n);else if(e.tag===19)Rw(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&&Jh(e)===null&&(u=o),o=o.sibling;o=u,o===null?(u=n.child,n.child=null):(u=o.sibling,o.sibling=null),s0(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&&Jh(e)===null){n.child=u;break}e=u.sibling,u.sibling=o,o=u,u=e}s0(n,!0,o,null,f,p);break;case"together":s0(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),In=-1,Is|=n.lanes,(o&n.childLanes)===0)if(e!==null){if(Cr(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 a0(e,n){if((e.lanes&n)!==0)return!0;return e=e.dependencies,e!==null&&Vh(e)?!0:!1}function VR(e,n,o){switch(n.tag){case 3:Q(n,n.stateNode.containerInfo),ms(n,Wt,e.memoizedState.cache),xa();break;case 27:case 5:st(n);break;case 4:Q(n,n.stateNode.containerInfo);break;case 10:ms(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,xg(n),null;break;case 13:if(a=n.memoizedState,a!==null){if(a.dehydrated!==null)return vs(n),n.flags|=128,null;if((o&n.child.childLanes)!==0)return Ow(e,n,o);return vs(n),e=Ol(e,n,o),e!==null?e.sibling:null}vs(n);break;case 19:var u=(e.flags&128)!==0;if(a=(o&n.childLanes)!==0,a||(Cr(e,n,o,!1),a=(o&n.childLanes)!==0),u){if(a)return Lw(e,n,o);n.flags|=128}if(u=n.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),Ue($t,$t.current,n),a)break;else return null;case 22:return n.lanes=0,Cw(e,n,o,n.pendingProps);case 24:ms(n,Wt,e.memoizedState.cache)}return Ol(e,n,o)}function r0(e,n,o){if(n._debugNeedsRemount&&e!==null){o=og(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(!a0(e,o)&&(n.flags&128)===0)return Zt=!1,VR(e,n,o);Zt=(e.flags&131072)!==0?!0:!1}else{if(Zt=!1,a=Be)ds(),a=(n.flags&1048576)!==0;a&&(a=n.index,ds(),yS(n,ef,a))}switch(n.lanes=0,n.tag){case 16:e:if(a=n.pendingProps,e=gs(n.elementType),n.type=e,typeof e==="function")ig(e)?(a=Ma(e,a),n.tag=1,n.type=e=va(e),n=Mw(null,n,e,a,o)):(n.tag=0,t0(n,e),n.type=e=va(e),n=e0(null,n,e,a,o));else{if(e!==void 0&&e!==null){if(u=e.$$typeof,u===jc){n.tag=11,n.type=e=ng(e),n=ww(null,n,e,a,o);break e}else if(u===Bd){n.tag=14,n=xw(null,n,e,a,o);break e}}throw n="",e!==null&&typeof e==="object"&&e.$$typeof===Si&&(n=" Did you wrap a component in React.lazy() more than once?"),o=ze(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 e0(e,n,n.type,n.pendingProps,o);case 1:return a=n.type,u=Ma(a,n.pendingProps),Mw(e,n,a,u,o);case 3:e:{if(Q(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,vg(e,n),wc(n,a,null,o);var p=n.memoizedState;if(a=p.cache,ms(n,Wt,a),a!==f.cache&&hg(n,[Wt],o,!0),Sc(),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=Dw(e,n,a,o);break e}else if(a!==u){u=pi(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),n),pc(u),n=Dw(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=vi(e.firstChild),An=n,Be=!0,Bs=null,sl=!1,ki=null,Pi=!0,o=YC(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}xn(e,n,a,o)}n=n.child}return n;case 26:return hd(e,n),e===null?(o=ik(n.type,null,n.pendingProps,null))?n.memoizedState=o:Be||(o=n.type,e=n.pendingProps,a=Gt(Ts.current),a=kd(a).createElement(o),a[Cn]=n,a[qn]=e,kn(a,o,e),Mt(a),n.stateNode=a):n.memoizedState=ik(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return st(n),e===null&&Be&&(a=Gt(Ts.current),u=pe(),a=n.stateNode=tk(n.type,n.pendingProps,a,u,!1),sl||(u=$x(a,n.type,n.pendingProps,u),u!==null&&(wa(n,0).serverProps=u)),An=n,Pi=!0,u=yt,Cs(n.type)?(gb=u,yt=vi(a.firstChild)):yt=u),xn(e,n,n.pendingProps.children,o),hd(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Be&&(f=pe(),a=Gm(n.type,f.ancestorInfo),u=yt,(p=!u)||(p=ML(u,n.type,n.pendingProps,Pi),p!==null?(n.stateNode=p,sl||(f=$x(p,n.type,n.pendingProps,f),f!==null&&(wa(n,0).serverProps=f)),An=n,yt=vi(p.firstChild),Pi=!1,f=!0):f=!1,p=!f),p&&(a&&Uh(n,u),ps(n))),st(n),u=n.type,f=n.pendingProps,p=e!==null?e.memoizedProps:null,a=f.children,B0(u,f)?a=null:p!==null&&B0(u,p)&&(n.flags|=32),n.memoizedState!==null&&(u=Cg(e,n,LR,null,null,o),zf._currentValue=u),hd(e,n),xn(e,n,a,o),n.child;case 6:return e===null&&Be&&(o=n.pendingProps,e=pe(),a=e.ancestorInfo.current,o=a!=null?Mh(o,a.tag,e.ancestorInfo.implicitRootScope):!0,e=yt,(a=!e)||(a=DL(e,n.pendingProps,Pi),a!==null?(n.stateNode=a,An=n,yt=null,a=!0):a=!1,a=!a),a&&(o&&Uh(n,e),ps(n))),null;case 13:return Ow(e,n,o);case 4:return Q(n,n.stateNode.containerInfo),a=n.pendingProps,e===null?n.child=ja(n,null,a,o):xn(e,n,a,o),n.child;case 11:return ww(e,n,n.type,n.pendingProps,o);case 7:return xn(e,n,n.pendingProps,o),n.child;case 8:return xn(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,xn(e,n,n.pendingProps.children,o),n.child;case 10:return a=n.type,u=n.pendingProps,f=u.value,"value"in u||yA||(yA=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),ms(n,a,f),xn(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=xt(u),a=zy(a,u,void 0),n.flags|=1,xn(e,n,a,o),n.child;case 14:return xw(e,n,n.type,n.pendingProps,o);case 15:return kw(e,n,n.type,n.pendingProps,o);case 19:return Lw(e,n,o);case 31:return qR(e,n,o);case 22:return Cw(e,n,o,n.pendingProps);case 24:return ka(n),a=xt(Wt),e===null?(u=gg(),u===null&&(u=ct,f=dg(),u.pooledCache=f,Ca(f),f!==null&&(u.pooledCacheLanes|=o),u=f),n.memoizedState={parent:a,cache:u},bg(n),ms(n,Wt,u)):((e.lanes&o)!==0&&(vg(e,n),wc(n,null,null,o),Sc()),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),ms(n,Wt,a)):(a=f.cache,ms(n,Wt,a),a!==u.cache&&hg(n,[Wt],o,!0))),xn(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 u0(e,n,o,a,u){if(n=(e.mode&sz)!==me)n=!1;if(n){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(fx())e.flags|=8192;else throw Va=lp,Ny}else e.flags&=-16777217}function Bw(e,n){if(n.type!=="stylesheet"||(n.state.loading&Wi)!==Za)e.flags&=-16777217;else if(e.flags|=16777216,!rk(n))if(fx())e.flags|=8192;else throw Va=lp,Ny}function pd(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?yl():536870912,e.lanes|=n,Xa|=n)}function Tc(e,n){if(!Be)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&xe)!==me){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&xe)!==me){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 jR(e,n,o){var a=n.pendingProps;switch(rg(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(Wt,n),de(n),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),e===null||e.child===null)kr(n)?(cg(),Rl(n)):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,ug());return ht(n),null;case 26:var{type:u,memoizedState:f}=n;return e===null?(Rl(n),f!==null?(ht(n),Bw(n,f)):(ht(n),u0(n,u,null,a,o))):f?f!==e.memoizedState?(Rl(n),ht(n),Bw(n,f)):(ht(n),n.flags&=-16777217):(e=e.memoizedProps,e!==a&&Rl(n),ht(n),u0(n,u,e,a,o)),null;case 27:if($e(n),o=Gt(Ts.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=pe(),kr(n)?wS(n,e):(e=tk(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=pe();if(kr(n))wS(n,p);else{switch(f=Gt(Ts.current),Gm(u,p.ancestorInfo),p=p.context,f=kd(f),p){case vu:f=f.createElementNS($r,u);break;case Rp:f=f.createElementNS(Vd,u);break;default:switch(u){case"svg":f=f.createElementNS($r,u);break;case"math":f=f.createElementNS(Vd,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(jA,u)||(jA[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[Cn]=n,f[qn]=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(kn(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),u0(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=Gt(Ts.current),o=pe(),kr(n)){if(e=n.stateNode,o=n.memoizedProps,u=!sl,a=null,f=An,f!==null)switch(f.tag){case 3:u&&(u=Kx(e,o,a),u!==null&&(wa(n,0).serverProps=u));break;case 27:case 5:a=f.memoizedProps,u&&(u=Kx(e,o,a),u!==null&&(wa(n,0).serverProps=u))}e[Cn]=n,e=e.nodeValue===o||a!==null&&a.suppressHydrationWarning===!0||Ux(e.nodeValue,o)?!0:!1,e||ps(n,!0)}else u=o.ancestorInfo.current,u!=null&&Mh(a,u.tag,o.ancestorInfo.implicitRootScope),e=kd(e).createTextNode(a),e[Cn]=n,n.stateNode=e}return ht(n),null;case 31:if(o=n.memoizedState,e===null||e.memoizedState!==null){if(a=kr(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[Cn]=n,ht(n),(n.mode&xe)!==me&&o!==null&&(e=n.child,e!==null&&(n.treeBaseDuration-=e.treeBaseDuration))}else cg(),xa(),(n.flags&128)===0&&(o=n.memoizedState=null),n.flags|=4,ht(n),(n.mode&xe)!==me&&o!==null&&(e=n.child,e!==null&&(n.treeBaseDuration-=e.treeBaseDuration));e=!1}else o=ug(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),e=!0;if(!e){if(n.flags&256)return yi(n),n;return yi(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=kr(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[Cn]=n,ht(n),(n.mode&xe)!==me&&u!==null&&(u=n.child,u!==null&&(n.treeBaseDuration-=u.treeBaseDuration))}else cg(),xa(),(n.flags&128)===0&&(u=n.memoizedState=null),n.flags|=4,ht(n),(n.mode&xe)!==me&&u!==null&&(u=n.child,u!==null&&(n.treeBaseDuration-=u.treeBaseDuration));u=!1}else u=ug(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u){if(n.flags&256)return yi(n),n;return yi(n),null}}if(yi(n),(n.flags&128)!==0)return n.lanes=o,(n.mode&xe)!==me&&yc(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),pd(n,n.updateQueue),ht(n),(n.mode&xe)!==me&&o&&(e=n.child,e!==null&&(n.treeBaseDuration-=e.treeBaseDuration)),null;case 4:return de(n),e===null&&T0(n.stateNode.containerInfo),ht(n),null;case 10:return Ml(n.type,n),ht(n),null;case 19:if(K($t,n),a=n.memoizedState,a===null)return ht(n),null;if(u=(n.flags&128)!==0,f=a.rendering,f===null)if(u)Tc(a,!1);else{if(Ot!==Xl||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(f=Jh(e),f!==null){n.flags|=128,Tc(a,!1),e=f.updateQueue,n.updateQueue=e,pd(n,e),n.subtreeFlags=0,e=o;for(o=n.child;o!==null;)mS(o,e),o=o.sibling;return Ue($t,$t.current&au|gf,n),Be&&El(n,a.treeForkCount),n.child}e=e.sibling}a.tail!==null&&pn()>bp&&(n.flags|=128,u=!0,Tc(a,!1),n.lanes=4194304)}else{if(!u)if(e=Jh(f),e!==null){if(n.flags|=128,u=!0,e=e.updateQueue,n.updateQueue=e,pd(n,e),Tc(a,!0),a.tail===null&&a.tailMode==="hidden"&&!f.alternate&&!Be)return ht(n),null}else 2*pn()-a.renderingStartTime>bp&&o!==536870912&&(n.flags|=128,u=!0,Tc(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=pn(),e.sibling=null,o=$t.current,o=u?o&au|gf:o&au,Ue($t,o,n),Be&&El(n,a.treeForkCount),e;return ht(n),null;case 22:case 23:return yi(n),wg(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&&pd(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&&K(Ua,n),null;case 24:return o=null,e!==null&&(o=e.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),Ml(Wt,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 IR(e,n){switch(rg(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,(n.mode&xe)!==me&&yc(n),n):null;case 3:return Ml(Wt,n),de(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(yi(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&xe)!==me&&yc(n),n):null;case 13:if(yi(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&xe)!==me&&yc(n),n):null;case 19:return K($t,n),null;case 4:return de(n),null;case 10:return Ml(n.type,n),null;case 22:case 23:return yi(n),wg(n),e!==null&&K(Ua,n),e=n.flags,e&65536?(n.flags=e&-65537|128,(n.mode&xe)!==me&&yc(n),n):null;case 24:return Ml(Wt,n),null;case 25:return null;default:return null}}function zw(e,n){switch(rg(n),n.tag){case 3:Ml(Wt,n),de(n);break;case 26:case 27:case 5:$e(n);break;case 4:de(n);break;case 31:n.memoizedState!==null&&yi(n);break;case 13:yi(n);break;case 19:K($t,n);break;case 10:Ml(n.type,n);break;case 22:case 23:yi(n),wg(n),e!==null&&K(Ua,n);break;case 24:Ml(Wt,n)}}function Qo(e){return(e.mode&xe)!==me}function Hw(e,n){Qo(e)?(Xo(),Ec(n,e),Yo()):Ec(n,e)}function c0(e,n,o){Qo(e)?(Xo(),Dr(o,e,n),Yo()):Dr(o,e,n)}function Ec(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&$n)!==ap&&(gu=!0),a=Y(n,fz,o),(e&$n)!==ap&&(gu=!1),a!==void 0&&typeof a!=="function")){var f=void 0;f=(o.tag&Ai)!==0?"useLayoutEffect":(o.tag&$n)!==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 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.
|
|
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){Ke(n,n.return,g)}}function Dr(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&$n)!==ap&&(gu=!0),u=n,Y(u,hz,u,o,g),(e&$n)!==ap&&(gu=!1))}a=a.next}while(a!==f)}}catch(v){Ke(n,n.return,v)}}function Nw(e,n){Qo(e)?(Xo(),Ec(n,e),Yo()):Ec(n,e)}function f0(e,n,o){Qo(e)?(Xo(),Dr(o,e,n),Yo()):Dr(o,e,n)}function _w(e){var n=e.updateQueue;if(n!==null){var o=e.stateNode;e.type.defaultProps||"ref"in e.memoizedProps||fu||(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.",ae(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.",ae(e)||"instance"));try{Y(e,qS,n,o)}catch(a){Ke(e,e.return,a)}}}function $R(e,n,o){return e.getSnapshotBeforeUpdate(n,o)}function PR(e,n){var{memoizedProps:o,memoizedState:a}=n;n=e.stateNode,e.type.defaultProps||"ref"in e.memoizedProps||fu||(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.",ae(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.",ae(e)||"instance"));try{var u=Ma(e.type,o),f=Y(e,$R,n,u,a);o=bA,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.",ae(e))})),n.__reactInternalSnapshotBeforeUpdate=f}catch(p){Ke(e,e.return,p)}}function Uw(e,n,o){o.props=Ma(e.type,e.memoizedProps),o.state=e.memoizedState,Qo(e)?(Xo(),Y(e,_C,e,n,o),Yo()):Y(e,_C,e,n,o)}function YR(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(Qo(e))try{Xo(),e.refCleanup=n(o)}finally{Yo()}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().",ae(e)),n.current=o}}function Mc(e,n){try{Y(e,YR,e)}catch(o){Ke(e,n,o)}}function Go(e,n){var{ref:o,refCleanup:a}=e;if(o!==null)if(typeof a==="function")try{if(Qo(e))try{Xo(),Y(e,a)}finally{Yo(e)}else Y(e,a)}catch(u){Ke(e,n,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof o==="function")try{if(Qo(e))try{Xo(),Y(e,o,null)}finally{Yo(e)}else Y(e,o,null)}catch(u){Ke(e,n,u)}else o.current=null}function qw(e,n,o,a){var u=e.memoizedProps,f=u.id,p=u.onCommit;u=u.onRender,n=n===null?"mount":"update",tp&&(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 XR(e,n,o,a){var u=e.memoizedProps;e=u.id,u=u.onPostCommit,n=n===null?"mount":"update",tp&&(n="nested-update"),typeof u==="function"&&u(e,n,a,o)}function Vw(e){var{type:n,memoizedProps:o,stateNode:a}=e;try{Y(e,gL,a,n,o,e)}catch(u){Ke(e,e.return,u)}}function h0(e,n,o){try{Y(e,bL,e.stateNode,e.type,o,n,e)}catch(a){Ke(e,e.return,a)}}function jw(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Cs(e.type)||e.tag===4}function d0(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||jw(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&&Cs(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 p0(e,n,o){var a=e.tag;if(a===5||a===6)e=e.stateNode,n?(Gx(o),(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(e,n)):(Gx(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&&Cs(e.type)&&(o=e.stateNode,n=null),e=e.child,e!==null))for(p0(e,n,o),e=e.sibling;e!==null;)p0(e,n,o),e=e.sibling}function md(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&&Cs(e.type)&&(o=e.stateNode),e=e.child,e!==null))for(md(e,n,o),e=e.sibling;e!==null;)md(e,n,o),e=e.sibling}function QR(e){for(var n,o=e.return;o!==null;){if(jw(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=d0(e),md(e,o,n);break;case 5:o=n.stateNode,n.flags&32&&(Qx(o),n.flags&=-33),n=d0(e),md(e,n,o);break;case 3:case 4:n=n.stateNode.containerInfo,o=d0(e),p0(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 Iw(e){var{stateNode:n,memoizedProps:o}=e;try{Y(e,zL,e.type,o,n,e)}catch(a){Ke(e,e.return,a)}}function $w(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 GR(e,n){if(e=e.containerInfo,db=Hp,e=lS(e),Jm(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;pb={focusedElem:e,selectionRange:o},Hp=!1;for(gn=n;gn!==null;)if(n=gn,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,gn=e;else for(;gn!==null;){switch(e=n=gn,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&&PR(e,o);break;case 3:if((u&1024)!==0){if(e=e.stateNode.containerInfo,o=e.nodeType,o===9)z0(e);else if(o===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":z0(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,gn=e;break}gn=n.return}}function Pw(e,n,o){var a=mi(),u=jo(),f=$o(),p=Po(),g=o.flags;switch(o.tag){case 0:case 11:case 15:Wo(e,o),g&4&&Hw(o,Ai|Qi);break;case 1:if(Wo(e,o),g&4)if(e=o.stateNode,n===null)o.type.defaultProps||"ref"in o.memoizedProps||fu||(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.",ae(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.",ae(o)||"instance")),Qo(o)?(Xo(),Y(o,Hy,o,e),Yo()):Y(o,Hy,o,e);else{var v=Ma(o.type,n.memoizedProps);n=n.memoizedState,o.type.defaultProps||"ref"in o.memoizedProps||fu||(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.",ae(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.",ae(o)||"instance")),Qo(o)?(Xo(),Y(o,zC,o,e,v,n,e.__reactInternalSnapshotBeforeUpdate),Yo()):Y(o,zC,o,e,v,n,e.__reactInternalSnapshotBeforeUpdate)}g&64&&_w(o),g&512&&Mc(o,o.return);break;case 3:if(n=Dl(),Wo(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,qS,g,v)}catch(D){Ke(o,o.return,D)}}e.effectDuration+=Ih(n);break;case 27:n===null&&g&4&&Iw(o);case 26:case 5:if(Wo(e,o),n===null){if(g&4)Vw(o);else if(g&64){e=o.type,n=o.memoizedProps,v=o.stateNode;try{Y(o,yL,v,e,n,o)}catch(D){Ke(o,o.return,D)}}}g&512&&Mc(o,o.return);break;case 12:if(g&4){g=Dl(),Wo(e,o),e=o.stateNode,e.effectDuration+=gc(g);try{Y(o,qw,o,n,zs,e.effectDuration)}catch(D){Ke(o,o.return,D)}}else Wo(e,o);break;case 31:Wo(e,o),g&4&&Qw(e,o);break;case 13:Wo(e,o),g&4&&Gw(e,o),g&64&&(e=o.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(g=iL.bind(null,o),OL(e,g))));break;case 22:if(g=o.memoizedState!==null||Yl,!g){n=n!==null&&n.memoizedState!==null||Kt,v=Yl;var x=Kt;Yl=g,(Kt=n)&&!x?(Fo(e,o,(o.subtreeFlags&8772)!==0),(o.mode&xe)!==me&&0<=ue&&0<=fe&&0.05<fe-ue&&Lh(o,ue,fe)):Wo(e,o),Yl=v,Kt=x}break;case 30:break;default:Wo(e,o)}(o.mode&xe)!==me&&0<=ue&&0<=fe&&((Ht||0.05<Dt)&&qo(o,ue,fe,Dt,kt),o.alternate===null&&o.return!==null&&o.return.alternate!==null&&0.05<fe-ue&&($w(o.return.alternate,o.return)||Uo(o,ue,fe,"Mount"))),gi(a),Io(u),kt=f,Ht=p}function Yw(e){var n=e.alternate;n!==null&&(e.alternate=null,Yw(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&ne(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;)Xw(e,n,o),o=o.sibling}function Xw(e,n,o){if(Rn&&typeof Rn.onCommitFiberUnmount==="function")try{Rn.onCommitFiberUnmount(jr,o)}catch(x){nl||(nl=!0,console.error("React instrumentation encountered an error: %o",x))}var a=mi(),u=jo(),f=$o(),p=Po();switch(o.tag){case 26:Kt||Go(o,n),Ll(e,n,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(e=o.stateNode,e.parentNode.removeChild(e));break;case 27:Kt||Go(o,n);var g=en,v=oi;Cs(o.type)&&(en=o.stateNode,oi=!1),Ll(e,n,o),Y(o,_c,o.stateNode),en=g,oi=v;break;case 5:Kt||Go(o,n);case 6:if(g=en,v=oi,en=null,Ll(e,n,o),en=g,oi=v,en!==null)if(oi)try{Y(o,wL,en,o.stateNode)}catch(x){Ke(o,n,x)}else try{Y(o,SL,en,o.stateNode)}catch(x){Ke(o,n,x)}break;case 18:en!==null&&(oi?(e=en,Wx(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,o.stateNode),_r(e)):Wx(en,o.stateNode));break;case 4:g=en,v=oi,en=o.stateNode.containerInfo,oi=!0,Ll(e,n,o),en=g,oi=v;break;case 0:case 11:case 14:case 15:Dr($n,o,n),Kt||c0(o,n,Ai),Ll(e,n,o);break;case 1:Kt||(Go(o,n),g=o.stateNode,typeof g.componentWillUnmount==="function"&&Uw(o,n,g)),Ll(e,n,o);break;case 21:Ll(e,n,o);break;case 22:Kt=(g=Kt)||o.memoizedState!==null,Ll(e,n,o),Kt=g;break;default:Ll(e,n,o)}(o.mode&xe)!==me&&0<=ue&&0<=fe&&(Ht||0.05<Dt)&&qo(o,ue,fe,Dt,kt),gi(a),Io(u),kt=f,Ht=p}function Qw(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Y(n,LL,e)}catch(o){Ke(n,n.return,o)}}}function Gw(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Y(n,BL,e)}catch(o){Ke(n,n.return,o)}}function WR(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new vA),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new vA),n;default:throw Error("Unexpected Suspense handler tag ("+e.tag+"). This is a bug in React.")}}function gd(e,n){var o=WR(e);n.forEach(function(a){if(!o.has(a)){if(o.add(a),il)if(hu!==null&&du!==null)Lc(du,hu);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");var u=oL.bind(null,e,a);a.then(u,u)}})}function ni(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=mi(),v=f;e:for(;v!==null;){switch(v.tag){case 27:if(Cs(v.type)){en=v.stateNode,oi=!1;break e}break;case 5:en=v.stateNode,oi=!1;break e;case 3:case 4:en=v.stateNode.containerInfo,oi=!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.");Xw(u,f,p),en=null,oi=!1,(p.mode&xe)!==me&&0<=ue&&0<=fe&&0.05<fe-ue&&Uo(p,ue,fe,"Unmount"),gi(g),u=p,f=u.alternate,f!==null&&(f.return=null),u.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)Ww(n,e),n=n.sibling}function Ww(e,n){var o=mi(),a=jo(),u=$o(),f=Po(),p=e.alternate,g=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ni(n,e),ii(e),g&4&&(Dr($n|Qi,e,e.return),Ec($n|Qi,e),c0(e,e.return,Ai|Qi));break;case 1:if(ni(n,e),ii(e),g&512&&(Kt||p===null||Go(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=bo,ni(n,e),ii(e),g&512&&(Kt||p===null||Go(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[Pc]||x[Cn]||x.namespaceURI===$r||x.hasAttribute("itemprop"))x=v.createElement(g),v.head.insertBefore(x,v.querySelector("head > title"));kn(x,g,p),x[Cn]=e,Mt(x),g=x;break e;case"link":var D=sk("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),kn(x,g,p),v.head.appendChild(x);break;case"meta":if(D=sk("meta","content",v).get(g+(p.content||""))){for(O=0;O<D.length;O++)if(x=D[O],ve(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),kn(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[Cn]=e,Mt(x),g=x}e.stateNode=g}else ak(v,e.type,e.stateNode);else e.stateNode=lk(v,g,e.memoizedProps);else x!==g?(x===null?p.stateNode!==null&&(p=p.stateNode,p.parentNode.removeChild(p)):x.count--,g===null?ak(v,e.type,e.stateNode):lk(v,g,e.memoizedProps)):g===null&&e.stateNode!==null&&h0(e,e.memoizedProps,p.memoizedProps)}break;case 27:ni(n,e),ii(e),g&512&&(Kt||p===null||Go(p,p.return)),p!==null&&g&4&&h0(e,e.memoizedProps,p.memoizedProps);break;case 5:if(ni(n,e),ii(e),g&512&&(Kt||p===null||Go(p,p.return)),e.flags&32){v=e.stateNode;try{Y(e,Qx,v)}catch(J){Ke(e,e.return,J)}}g&4&&e.stateNode!=null&&(v=e.memoizedProps,h0(e,v,p!==null?p.memoizedProps:v)),g&1024&&(Gy=!0,e.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."));break;case 6:if(ni(n,e),ii(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,vL,v,p,g)}catch(J){Ke(e,e.return,J)}}break;case 3:if(v=Dl(),Lp=null,x=bo,bo=Cd(n.containerInfo),ni(n,e),bo=x,ii(e),g&4&&p!==null&&p.memoizedState.isDehydrated)try{Y(e,RL,n.containerInfo)}catch(J){Ke(e,e.return,J)}Gy&&(Gy=!1,Fw(e)),n.effectDuration+=Ih(v);break;case 4:g=bo,bo=Cd(e.stateNode.containerInfo),ni(n,e),ii(e),bo=g;break;case 12:g=Dl(),ni(n,e),ii(e),e.stateNode.effectDuration+=gc(g);break;case 31:ni(n,e),ii(e),g&4&&(g=e.updateQueue,g!==null&&(e.updateQueue=null,gd(e,g)));break;case 13:ni(n,e),ii(e),e.child.flags&8192&&e.memoizedState!==null!==(p!==null&&p.memoizedState!==null)&&(yp=pn()),g&4&&(g=e.updateQueue,g!==null&&(e.updateQueue=null,gd(e,g)));break;case 22:v=e.memoizedState!==null;var A=p!==null&&p.memoizedState!==null,B=Yl,X=Kt;if(Yl=B||v,Kt=X||A,ni(n,e),Kt=X,Yl=B,A&&!v&&!B&&!X&&(e.mode&xe)!==me&&0<=ue&&0<=fe&&0.05<fe-ue&&Lh(e,ue,fe),ii(e),g&8192)e:for(n=e.stateNode,n._visibility=v?n._visibility&~Kc:n._visibility|Kc,!v||p===null||A||Yl||Kt||(Da(e),(e.mode&xe)!==me&&0<=ue&&0<=fe&&0.05<fe-ue&&Uo(e,ue,fe,"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,kL,x):Y(A,TL,A.stateNode,A.memoizedProps)}catch(J){Ke(A,A.return,J)}}}else if(n.tag===6){if(p===null){A=n;try{D=A.stateNode,v?Y(A,CL,D):Y(A,EL,D,A.memoizedProps)}catch(J){Ke(A,A.return,J)}}}else if(n.tag===18){if(p===null){A=n;try{O=A.stateNode,v?Y(A,xL,O):Y(A,AL,A.stateNode)}catch(J){Ke(A,A.return,J)}}}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,gd(e,p))));break;case 19:ni(n,e),ii(e),g&4&&(g=e.updateQueue,g!==null&&(e.updateQueue=null,gd(e,g)));break;case 30:break;case 21:break;default:ni(n,e),ii(e)}(e.mode&xe)!==me&&0<=ue&&0<=fe&&((Ht||0.05<Dt)&&qo(e,ue,fe,Dt,kt),e.alternate===null&&e.return!==null&&e.return.alternate!==null&&0.05<fe-ue&&($w(e.return.alternate,e.return)||Uo(e,ue,fe,"Mount"))),gi(o),Io(a),kt=u,Ht=f}function ii(e){var n=e.flags;if(n&2){try{Y(e,QR,e)}catch(o){Ke(e,e.return,o)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Fw(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;Fw(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function Wo(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)Pw(e,n.alternate,n),n=n.sibling}function Jw(e){var n=mi(),o=jo(),a=$o(),u=Po();switch(e.tag){case 0:case 11:case 14:case 15:c0(e,e.return,Ai),Da(e);break;case 1:Go(e,e.return);var f=e.stateNode;typeof f.componentWillUnmount==="function"&&Uw(e,e.return,f),Da(e);break;case 27:Y(e,_c,e.stateNode);case 26:case 5:Go(e,e.return),Da(e);break;case 22:e.memoizedState===null&&Da(e);break;case 30:Da(e);break;default:Da(e)}(e.mode&xe)!==me&&0<=ue&&0<=fe&&(Ht||0.05<Dt)&&qo(e,ue,fe,Dt,kt),gi(n),Io(o),kt=a,Ht=u}function Da(e){for(e=e.child;e!==null;)Jw(e),e=e.sibling}function Zw(e,n,o,a){var u=mi(),f=jo(),p=$o(),g=Po(),v=o.flags;switch(o.tag){case 0:case 11:case 15:Fo(e,o,a),Hw(o,Ai);break;case 1:if(Fo(e,o,a),n=o.stateNode,typeof n.componentDidMount==="function"&&Y(o,Hy,o,n),n=o.updateQueue,n!==null){e=o.stateNode;try{Y(o,RR,n,e)}catch(x){Ke(o,o.return,x)}}a&&v&64&&_w(o),Mc(o,o.return);break;case 27:Iw(o);case 26:case 5:Fo(e,o,a),a&&n===null&&v&4&&Vw(o),Mc(o,o.return);break;case 12:if(a&&v&4){v=Dl(),Fo(e,o,a),a=o.stateNode,a.effectDuration+=gc(v);try{Y(o,qw,o,n,zs,a.effectDuration)}catch(x){Ke(o,o.return,x)}}else Fo(e,o,a);break;case 31:Fo(e,o,a),a&&v&4&&Qw(e,o);break;case 13:Fo(e,o,a),a&&v&4&&Gw(e,o);break;case 22:o.memoizedState===null&&Fo(e,o,a),Mc(o,o.return);break;case 30:break;default:Fo(e,o,a)}(o.mode&xe)!==me&&0<=ue&&0<=fe&&(Ht||0.05<Dt)&&qo(o,ue,fe,Dt,kt),gi(u),Io(f),kt=p,Ht=g}function Fo(e,n,o){o=o&&(n.subtreeFlags&8772)!==0;for(n=n.child;n!==null;)Zw(e,n.alternate,n,o),n=n.sibling}function m0(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&&mc(o))}function g0(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(Ca(n),e!=null&&mc(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;Kw(e,n,o,a,f!==null?f.actualStartTime:u),n=f}}function Kw(e,n,o,a,u){var f=mi(),p=jo(),g=$o(),v=Po(),x=Os,D=n.flags;switch(n.tag){case 0:case 11:case 15:(n.mode&xe)!==me&&0<n.actualStartTime&&(n.flags&1)!==0&&Bh(n,n.actualStartTime,u,an,o),fo(e,n,o,a,u),D&2048&&Nw(n,Pn|Qi);break;case 1:(n.mode&xe)!==me&&0<n.actualStartTime&&((n.flags&128)!==0?Km(n,n.actualStartTime,u,[]):(n.flags&1)!==0&&Bh(n,n.actualStartTime,u,an,o)),fo(e,n,o,a,u);break;case 3:var O=Dl(),A=an;an=n.alternate!==null&&n.alternate.memoizedState.isDehydrated&&(n.flags&256)===0,fo(e,n,o,a,u),an=A,D&2048&&(o=null,n.alternate!==null&&(o=n.alternate.memoizedState.cache),a=n.memoizedState.cache,a!==o&&(Ca(a),o!=null&&mc(o))),e.passiveEffectDuration+=Ih(O);break;case 12:if(D&2048){D=Dl(),fo(e,n,o,a,u),e=n.stateNode,e.passiveEffectDuration+=gc(D);try{Y(n,XR,n,n.alternate,zs,e.passiveEffectDuration)}catch(B){Ke(n,n.return,B)}}else fo(e,n,o,a,u);break;case 31:D=an,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?(an=!1,O=O.hydrationErrors,O!==null&&Km(n,n.actualStartTime,u,O)):an=!0):an=!1,fo(e,n,o,a,u),an=D;break;case 13:D=an,O=n.alternate!==null?n.alternate.memoizedState:null,A=n.memoizedState,O===null||O.dehydrated===null||A!==null&&A.dehydrated!==null?an=!1:(A=n.deletions,A!==null&&0<A.length&&A[0].tag===18?(an=!1,O=O.hydrationErrors,O!==null&&Km(n,n.actualStartTime,u,O)):an=!0),fo(e,n,o,a,u),an=D;break;case 23:break;case 22:A=n.stateNode,O=n.alternate,n.memoizedState!==null?A._visibility&Hl?fo(e,n,o,a,u):Dc(e,n,o,a,u):A._visibility&Hl?fo(e,n,o,a,u):(A._visibility|=Hl,Or(e,n,o,a,(n.subtreeFlags&10256)!==0||n.actualDuration!==0&&(n.alternate===null||n.alternate.child!==n.child),u),(n.mode&xe)===me||an||(e=n.actualStartTime,0<=e&&0.05<u-e&&Lh(n,e,u),0<=ue&&0<=fe&&0.05<fe-ue&&Lh(n,ue,fe))),D&2048&&m0(O,n);break;case 24:fo(e,n,o,a,u),D&2048&&g0(n.alternate,n);break;default:fo(e,n,o,a,u)}if((n.mode&xe)!==me){if(e=!an&&n.alternate===null&&n.return!==null&&n.return.alternate!==null)o=n.actualStartTime,0<=o&&0.05<u-o&&Uo(n,o,u,"Mount");0<=ue&&0<=fe&&((Ht||0.05<Dt)&&qo(n,ue,fe,Dt,kt),e&&0.05<fe-ue&&Uo(n,ue,fe,"Mount"))}gi(f),Io(p),kt=g,Ht=v,Os=x}function Or(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;ex(e,n,o,a,u,p!==null?p.actualStartTime:f),n=p}}function ex(e,n,o,a,u,f){var p=mi(),g=jo(),v=$o(),x=Po(),D=Os;u&&(n.mode&xe)!==me&&0<n.actualStartTime&&(n.flags&1)!==0&&Bh(n,n.actualStartTime,f,an,o);var O=n.flags;switch(n.tag){case 0:case 11:case 15:Or(e,n,o,a,u,f),Nw(n,Pn);break;case 23:break;case 22:var A=n.stateNode;n.memoizedState!==null?A._visibility&Hl?Or(e,n,o,a,u,f):Dc(e,n,o,a,f):(A._visibility|=Hl,Or(e,n,o,a,u,f)),u&&O&2048&&m0(n.alternate,n);break;case 24:Or(e,n,o,a,u,f),u&&O&2048&&g0(n.alternate,n);break;default:Or(e,n,o,a,u,f)}(n.mode&xe)!==me&&0<=ue&&0<=fe&&(Ht||0.05<Dt)&&qo(n,ue,fe,Dt,kt),gi(p),Io(g),kt=v,Ht=x,Os=D}function Dc(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=Os;(f.mode&xe)!==me&&0<f.actualStartTime&&(f.flags&1)!==0&&Bh(f,f.actualStartTime,x,an,g);var O=f.flags;switch(f.tag){case 22:Dc(p,f,g,v,x),O&2048&&m0(f.alternate,f);break;case 24:Dc(p,f,g,v,x),O&2048&&g0(f.alternate,f);break;default:Dc(p,f,g,v,x)}Os=D,f=n}}function Rr(e,n,o){if(e.subtreeFlags&Sf)for(e=e.child;e!==null;)tx(e,n,o),e=e.sibling}function tx(e,n,o){switch(e.tag){case 26:Rr(e,n,o),e.flags&Sf&&e.memoizedState!==null&&_L(o,bo,e.memoizedState,e.memoizedProps);break;case 5:Rr(e,n,o);break;case 3:case 4:var a=bo;bo=Cd(e.stateNode.containerInfo),Rr(e,n,o),bo=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Sf,Sf=16777216,Rr(e,n,o),Sf=a):Rr(e,n,o));break;default:Rr(e,n,o)}}function nx(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 Oc(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=mi();gn=a,lx(a,e),(a.mode&xe)!==me&&0<=ue&&0<=fe&&0.05<fe-ue&&Uo(a,ue,fe,"Unmount"),gi(u)}nx(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ix(e),e=e.sibling}function ix(e){var n=mi(),o=jo(),a=$o(),u=Po();switch(e.tag){case 0:case 11:case 15:Oc(e),e.flags&2048&&f0(e,e.return,Pn|Qi);break;case 3:var f=Dl();Oc(e),e.stateNode.passiveEffectDuration+=Ih(f);break;case 12:f=Dl(),Oc(e),e.stateNode.passiveEffectDuration+=gc(f);break;case 22:f=e.stateNode,e.memoizedState!==null&&f._visibility&Hl&&(e.return===null||e.return.tag!==13)?(f._visibility&=~Hl,yd(e),(e.mode&xe)!==me&&0<=ue&&0<=fe&&0.05<fe-ue&&Uo(e,ue,fe,"Disconnect")):Oc(e);break;default:Oc(e)}(e.mode&xe)!==me&&0<=ue&&0<=fe&&(Ht||0.05<Dt)&&qo(e,ue,fe,Dt,kt),gi(n),Io(o),Ht=u,kt=a}function yd(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=mi();gn=a,lx(a,e),(a.mode&xe)!==me&&0<=ue&&0<=fe&&0.05<fe-ue&&Uo(a,ue,fe,"Unmount"),gi(u)}nx(e)}for(e=e.child;e!==null;)ox(e),e=e.sibling}function ox(e){var n=mi(),o=jo(),a=$o(),u=Po();switch(e.tag){case 0:case 11:case 15:f0(e,e.return,Pn),yd(e);break;case 22:var f=e.stateNode;f._visibility&Hl&&(f._visibility&=~Hl,yd(e));break;default:yd(e)}(e.mode&xe)!==me&&0<=ue&&0<=fe&&(Ht||0.05<Dt)&&qo(e,ue,fe,Dt,kt),gi(n),Io(o),Ht=u,kt=a}function lx(e,n){for(;gn!==null;){var o=gn,a=o,u=n,f=mi(),p=jo(),g=$o(),v=Po();switch(a.tag){case 0:case 11:case 15:f0(a,u,Pn);break;case 23:case 22:a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool,u!=null&&Ca(u));break;case 24:mc(a.memoizedState.cache)}if((a.mode&xe)!==me&&0<=ue&&0<=fe&&(Ht||0.05<Dt)&&qo(a,ue,fe,Dt,kt),gi(f),Io(p),Ht=v,kt=g,a=o.child,a!==null)a.return=o,gn=a;else e:for(o=e;gn!==null;){if(a=gn,f=a.sibling,p=a.return,Yw(a),a===o){gn=null;break e}if(f!==null){f.return=p,gn=f;break e}gn=p}}}function FR(){yz.forEach(function(e){return e()})}function sx(){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 bi(e){if((Ie&rn)!==yn&&Ce!==0)return Ce&-Ce;var n=H.T;return n!==null?(n._updatedFibers||(n._updatedFibers=new Set),n._updatedFibers.add(e),C0()):yr()}function ax(){if(si===0)if((Ce&536870912)===0||Be){var e=Nd;Nd<<=1,(Nd&3932160)===0&&(Nd=262144),si=e}else si=536870912;return e=Ci.current,e!==null&&(e.flags|=32),si}function zt(e,n,o){if(gu&&console.error("useInsertionEffect must not schedule updates."),lb&&(wp=!0),e===ct&&(it===Pa||it===Ya)||e.cancelPendingCommit!==null)Br(e,0),xs(e,Ce,si,!1);if(zi(e,o),(Ie&rn)!==yn&&e===ct){if(tl)switch(n.tag){case 0:case 11:case 15:e=Ae&&ae(Ae)||"Unknown",zA.has(e)||(zA.add(e),n=ae(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:BA||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),BA=!0)}}else il&&Ni(e,n,o),sL(n),e===ct&&((Ie&rn)===yn&&($s|=o),Ot===Vs&&xs(e,Ce,si,!1)),Jo(e)}function rx(e,n,o){if((Ie&(rn|Ti))!==yn)throw Error("Should not already be working.");if(Ce!==0&&Ae!==null){var a=Ae,u=pn();switch(TC){case kf:case Pa:var f=sf;gt&&((a=a._debugTask)?a.run(console.timeStamp.bind(console,"Suspended",f,u,qi,void 0,"primary-light")):console.timeStamp("Suspended",f,u,qi,void 0,"primary-light"));break;case Ya:f=sf,gt&&((a=a._debugTask)?a.run(console.timeStamp.bind(console,"Action",f,u,qi,void 0,"primary-light")):console.timeStamp("Action",f,u,qi,void 0,"primary-light"));break;default:gt&&(a=u-sf,3>a||console.timeStamp("Blocked",sf,u,qi,void 0,5>a?"primary-light":10>a?"primary":100>a?"primary-dark":"error"))}}f=(o=!o&&(n&127)===0&&(n&e.expiredLanes)===0||Ho(e,n))?ZR(e,n):b0(e,n,!0);var p=o;do{if(f===Xl){pu&&!o&&xs(e,n,0,!1),n=it,sf=Ft(),TC=n;break}else{if(a=pn(),u=e.current.alternate,p&&!JR(u)){di(n),u=mn,f=a,!gt||f<=u||(Vt?Vt.run(console.timeStamp.bind(console,"Teared Render",u,f,Re,De,"error")):console.timeStamp("Teared Render",u,f,Re,De,"error")),Oa(n,a),f=b0(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){di(n),eg(mn,a,n,Vt),Oa(n,a),n=g;e:{a=e,f=p,p=Af;var v=a.current.memoizedState.isDehydrated;if(v&&(Br(a,g).flags|=256),g=b0(a,g,!1),g!==$a){if(Jy&&!v){a.errorRecoveryDisabledLanes|=f,$s|=f,f=Vs;break e}a=Yn,Yn=p,a!==null&&(Yn===null?Yn=a:Yn.push.apply(Yn,a))}f=g}if(p=!1,f!==$a)continue;else a=pn()}}if(f===xf){di(n),eg(mn,a,n,Vt),Oa(n,a),Br(e,0),xs(e,n,0,!0);break}e:{switch(o=e,f){case Xl:case xf:throw Error("Root did not complete. This is a bug in React.");case Vs:if((n&4194048)!==n)break;case dp:di(n),rS(mn,a,n,Vt),Oa(n,a),u=n,(u&127)!==0?Zd=a:(u&4194048)!==0&&(Kd=a),xs(o,n,si,!js);break e;case $a:Yn=null;break;case hp:case SA:break;default:throw Error("Unknown root exit status.")}if(H.actQueue!==null)v0(o,u,n,Yn,Tf,gp,si,$s,Xa,f,null,null,mn,a);else{if((n&62914560)===n&&(p=yp+kA-pn(),10<p)){if(xs(o,n,si,!js),Bi(o,0,!0)!==0)break e;vo=n,o.timeoutHandle=IA(ux.bind(null,o,u,Yn,Tf,gp,n,si,$s,Xa,js,f,"Throttled",mn,a),p);break e}ux(o,u,Yn,Tf,gp,n,si,$s,Xa,js,f,null,mn,a)}}}break}while(1);Jo(e)}function ux(e,n,o,a,u,f,p,g,v,x,D,O,A,B){e.timeoutHandle=Ja;var X=n.subtreeFlags,J=null;if(X&8192||(X&16785408)===16785408){if(J={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Al},tx(n,f,J),X=(f&62914560)===f?yp-pn():(f&4194048)===f?xA-pn():0,X=UL(J,X),X!==null){vo=f,e.cancelPendingCommit=X(v0.bind(null,e,n,f,o,a,u,p,g,v,D,J,J.waitingForViewTransition?"Waiting for the previous Animation":0<J.count?0<J.imgCount?"Suspended on CSS and Images":"Suspended on CSS":J.imgCount===1?"Suspended on an Image":0<J.imgCount?"Suspended on Images":null,A,B)),xs(e,f,p,!x);return}}v0(e,n,f,o,a,u,p,g,v,D,J,O,A,B)}function JR(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(!jn(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 xs(e,n,o,a){n&=~Zy,n&=~$s,e.suspendedLanes|=n,e.pingedLanes&=~n,a&&(e.warmLanes|=n),a=e.expirationTimes;for(var u=n;0<u;){var f=31-Un(u),p=1<<f;a[f]=-1,u&=~p}o!==0&&tc(e,o,n)}function Lr(){return(Ie&(rn|Ti))===yn?(Bc(0,!1),!1):!0}function y0(){if(Ae!==null){if(it===li)var e=Ae.return;else e=Ae,qh(),Mg(e),lu=null,mf=0,e=Ae;for(;e!==null;)zw(e.alternate,e),e=e.return;Ae=null}}function Oa(e,n){(e&127)!==0&&(Hs=n),(e&4194048)!==0&&(rl=n),(e&62914560)!==0&&(CC=n),(e&2080374784)!==0&&(AC=n)}function Br(e,n){gt&&(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=mn;if(mn=Ft(),Ce!==0&&0<o){if(di(Ce),Ot===hp||Ot===Vs)rS(o,mn,n,Vt);else{var a=mn,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,Re,De,f)):console.timeStamp(p,o,a,Re,De,f)}}Oa(Ce,mn)}if(o=Vt,Vt=null,(n&127)!==0){Vt=nf,u=0<=al&&al<Hs?Hs:al,a=0<=Ha&&Ha<Hs?Hs:Ha,f=0<=a?a:0<=u?u:mn,0<=Zd?(di(2),uS(Zd,f,n,o)):(ep&127)!==0&&(di(2),dc(Hs,f,jl)),o=u;var g=a,v=of,x=0<nu,D=Ns===tf,O=Ns===Jd;if(u=mn,a=nf,f=Oy,p=Ry,gt){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))}al=-1.1,Ns=0,Ry=Oy=null,Zd=-1.1,nu=Ha,Ha=-1.1,Hs=Ft()}if((n&4194048)!==0&&(Vt=lf,u=0<=Vl&&Vl<rl?rl:Vl,o=0<=Yi&&Yi<rl?rl:Yi,a=0<=_s&&_s<rl?rl:_s,f=0<=a?a:0<=o?o:mn,0<=Kd?(di(256),uS(Kd,f,n,Vt)):(ep&4194048)!==0&&(di(256),dc(rl,f,jl)),O=a,g=Na,v=0<Us,x=Ly===Jd,f=mn,a=lf,p=xC,D=kC,gt&&(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))),Yi=Vl=-1.1,Ly=0,Kd=-1.1,Us=_s,_s=-1.1,rl=Ft()),(n&62914560)!==0&&(ep&62914560)!==0&&(di(4194304),dc(CC,mn,jl)),(n&2080374784)!==0&&(ep&2080374784)!==0&&(di(268435456),dc(AC,mn,jl)),o=e.timeoutHandle,o!==Ja&&(e.timeoutHandle=Ja,Oz(o)),o=e.cancelPendingCommit,o!==null&&(e.cancelPendingCommit=null,o()),vo=0,y0(),ct=e,Ae=o=Tl(e.current,null),Ce=n,it=li,Ei=null,js=!1,pu=Ho(e,n),Jy=!1,Ot=Xl,Xa=si=Zy=$s=Is=0,Yn=Af=null,gp=!1,(n&8)!==0&&(n|=n&32),a=e.entangledLanes,a!==0)for(e=e.entanglements,a&=n;0<a;)u=31-Un(a),f=1<<u,n|=e[u],a&=~f;return cl=n,zh(),e=gC(),1000<e-mC&&(H.recentlyCreatedOwnerStacks=0,mC=e),go.discardPendingWarnings(),o}function cx(e,n){ge=null,H.H=vf,H.getCurrentStack=null,tl=!1,wi=null,n===ou||n===op?(n=RS(),it=kf):n===Ny?(n=RS(),it=wA):it=n===Xy?Fy:n!==null&&typeof n==="object"&&typeof n.then==="function"?Cf:pp,Ei=n;var o=Ae;o===null?(Ot=xf,cd(e,pi(n,e.current))):o.mode&xe&&mg(o)}function fx(){var e=Ci.current;return e===null?!0:(Ce&4194048)===Ce?Xi===null?!0:!1:(Ce&62914560)===Ce||(Ce&536870912)!==0?e===Xi:!1}function hx(){var e=H.H;return H.H=vf,e===null?vf:e}function dx(){var e=H.A;return H.A=gz,e}function bd(e){Vt===null&&(Vt=e._debugTask==null?null:e._debugTask)}function vd(){Ot=Vs,js||(Ce&4194048)!==Ce&&Ci.current!==null||(pu=!0),(Is&134217727)===0&&($s&134217727)===0||ct===null||xs(ct,Ce,si,!1)}function b0(e,n,o){var a=Ie;Ie|=rn;var u=hx(),f=dx();if(ct!==e||Ce!==n){if(il){var p=e.memoizedUpdaters;0<p.size&&(Lc(e,Ce),p.clear()),gr(e,n)}Tf=null,Br(e,n)}n=!1,p=Ot;e:do try{if(it!==li&&Ae!==null){var g=Ae,v=Ei;switch(it){case Fy:y0(),p=dp;break e;case kf:case Pa:case Ya:case Cf:Ci.current===null&&(n=!0);var x=it;if(it=li,Ei=null,zr(e,g,v,x),o&&pu){p=Xl;break e}break;default:x=it,it=li,Ei=null,zr(e,g,v,x)}}px(),p=Ot;break}catch(D){cx(e,D)}while(1);return n&&e.shellSuspendCounter++,qh(),Ie=a,H.H=u,H.A=f,Ae===null&&(ct=null,Ce=0,zh()),p}function px(){for(;Ae!==null;)mx(Ae)}function ZR(e,n){var o=Ie;Ie|=rn;var a=hx(),u=dx();if(ct!==e||Ce!==n){if(il){var f=e.memoizedUpdaters;0<f.size&&(Lc(e,Ce),f.clear()),gr(e,n)}Tf=null,bp=pn()+CA,Br(e,n)}else pu=Ho(e,n);e:do try{if(it!==li&&Ae!==null)t:switch(n=Ae,f=Ei,it){case pp:it=li,Ei=null,zr(e,n,f,pp);break;case Pa:case Ya:if(DS(f)){it=li,Ei=null,gx(n);break}n=function(){it!==Pa&&it!==Ya||ct!==e||(it=mp),Jo(e)},f.then(n,n);break e;case kf:it=mp;break e;case wA:it=Wy;break e;case mp:DS(f)?(it=li,Ei=null,gx(n)):(it=li,Ei=null,zr(e,n,f,mp));break;case Wy:var p=null;switch(Ae.tag){case 26:p=Ae.memoizedState;case 5:case 27:var g=Ae;if(p?rk(p):g.stateNode.complete){it=li,Ei=null;var v=g.sibling;if(v!==null)Ae=v;else{var x=g.return;x!==null?(Ae=x,Sd(x)):Ae=null}break t}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}it=li,Ei=null,zr(e,n,f,Wy);break;case Cf:it=li,Ei=null,zr(e,n,f,Cf);break;case Fy:y0(),Ot=dp;break e;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}H.actQueue!==null?px():KR();break}catch(D){cx(e,D)}while(1);if(qh(),H.H=a,H.A=u,Ie=o,Ae!==null)return Xl;return ct=null,Ce=0,zh(),Ot}function KR(){for(;Ae!==null&&!JL();)mx(Ae)}function mx(e){var n=e.alternate;(e.mode&xe)!==me?(pg(e),n=Y(e,r0,n,e,cl),mg(e)):n=Y(e,r0,n,e,cl),e.memoizedProps=e.pendingProps,n===null?Sd(e):Ae=n}function gx(e){var n=Y(e,eL,e);e.memoizedProps=e.pendingProps,n===null?Sd(e):Ae=n}function eL(e){var n=e.alternate,o=(e.mode&xe)!==me;switch(o&&pg(e),e.tag){case 15:case 0:n=Ew(n,e,e.pendingProps,e.type,void 0,Ce);break;case 11:n=Ew(n,e,e.pendingProps,e.type.render,e.ref,Ce);break;case 5:Mg(e);default:zw(n,e),e=Ae=mS(e,cl),n=r0(n,e,cl)}return o&&mg(e),n}function zr(e,n,o,a){qh(),Mg(n),lu=null,mf=0;var u=n.return;try{if(UR(e,u,n,o,Ce)){Ot=xf,cd(e,pi(o,e.current)),Ae=null;return}}catch(f){if(u!==null)throw Ae=u,f;Ot=xf,cd(e,pi(o,e.current)),Ae=null;return}if(n.flags&32768){if(Be||a===pp)e=!0;else if(pu||(Ce&536870912)!==0)e=!1;else if(js=e=!0,a===Pa||a===Ya||a===kf||a===Cf)a=Ci.current,a!==null&&a.tag===13&&(a.flags|=16384);yx(n,e)}else Sd(n)}function Sd(e){var n=e;do{if((n.flags&32768)!==0){yx(n,js);return}var o=n.alternate;if(e=n.return,pg(n),o=Y(n,jR,o,n,cl),(n.mode&xe)!==me&&CS(n),o!==null){Ae=o;return}if(n=n.sibling,n!==null){Ae=n;return}Ae=n=e}while(n!==null);Ot===Xl&&(Ot=SA)}function yx(e,n){do{var o=IR(e.alternate,e);if(o!==null){o.flags&=32767,Ae=o;return}if((e.mode&xe)!==me){CS(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=dp,Ae=null}function v0(e,n,o,a,u,f,p,g,v,x,D,O,A,B){e.cancelPendingCommit=null;do Rc();while(tn!==Ys);if(go.flushLegacyContextWarning(),go.flushPendingUnsafeLifecycleWarnings(),(Ie&(rn|Ti))!==yn)throw Error("Should not already be working.");if(di(o),x===$a?eg(A,B,o,Vt):a!==null?AR(A,B,o,a,n!==null&&n.alternate!==null&&n.alternate.memoizedState.isDehydrated&&(n.flags&256)!==0,Vt):CR(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|=Ay,fs(e,o,f,p,g,v),e===ct&&(Ae=ct=null,Ce=0),mu=n,Xs=e,vo=o,tb=f,ib=u,OA=a,nb=B,RA=O,So=vp,LA=null,n.actualDuration!==0||(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,lL(Vr,function(){return Lf=window.event,So===vp&&(So=eb),xx(),null})):(e.callbackNode=null,e.callbackPriority=0),ql=null,zs=Ft(),O!==null&&TR(B,zs,O,Vt),a=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||a){a=H.T,H.T=null,u=et.p,et.p=xi,p=Ie,Ie|=Ti;try{GR(e,n,o)}finally{Ie=p,et.p=u,H.T=a}}tn=TA,bx(),vx(),Sx()}}function bx(){if(tn===TA){tn=Ys;var e=Xs,n=mu,o=vo,a=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||a){a=H.T,H.T=null;var u=et.p;et.p=xi;var f=Ie;Ie|=Ti;try{hu=o,du=e,$h(),Ww(n,e),du=hu=null,o=pb;var p=lS(e.containerInfo),g=o.focusedElem,v=o.selectionRange;if(p!==g&&g&&g.ownerDocument&&oS(g.ownerDocument.documentElement,g)){if(v!==null&&Jm(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,J=Math.min(v.start,X),dt=v.end===void 0?J:Math.min(v.end,X);!B.extend&&J>dt&&(p=dt,dt=J,J=p);var Ne=iS(g,J),C=iS(g,dt);if(Ne&&C&&(B.rangeCount!==1||B.anchorNode!==Ne.node||B.anchorOffset!==Ne.offset||B.focusNode!==C.node||B.focusOffset!==C.offset)){var T=O.createRange();T.setStart(Ne.node,Ne.offset),B.removeAllRanges(),J>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}}Hp=!!db,pb=db=null}finally{Ie=f,et.p=u,H.T=a}}e.current=n,tn=EA}}function vx(){if(tn===EA){tn=Ys;var e=LA;if(e!==null){zs=Ft();var n=Ul,o=zs;!gt||o<=n||(jl?jl.run(console.timeStamp.bind(console,e,n,o,Re,De,"secondary-light")):console.timeStamp(e,n,o,Re,De,"secondary-light"))}e=Xs,n=mu,o=vo;var a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=H.T,H.T=null;var u=et.p;et.p=xi;var f=Ie;Ie|=Ti;try{hu=o,du=e,$h(),Pw(e,n.alternate,n),du=hu=null}finally{Ie=f,et.p=u,H.T=a}}e=nb,n=RA,Ul=Ft(),e=n===null?e:zs,n=Ul,o=So===Ky,a=Vt,ql!==null?cS(e,n,ql,!1,a):!gt||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=MA}}function Sx(){if(tn===DA||tn===MA){if(tn===DA){var e=Ul;Ul=Ft();var n=Ul,o=So===Ky;!gt||n<=e||(jl?jl.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!==Ky&&(So=AA)}tn=Ys,ZL(),e=Xs;var a=mu;n=vo,o=OA;var u=a.actualDuration!==0||(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0;u?tn=Sp:(tn=Ys,mu=Xs=null,wx(e,e.pendingLanes),Qa=0,Mf=null);var f=e.pendingLanes;if(f===0&&(Ps=null),u||Tx(e),f=hi(n),a=a.stateNode,Rn&&typeof Rn.onCommitFiberRoot==="function")try{var p=(a.current.flags&128)===128;switch(f){case xi:var g=iy;break;case po:g=oy;break;case ol:g=Vr;break;case Ud:g=ly;break;default:g=Vr}Rn.onCommitFiberRoot(jr,a,g,p)}catch(O){nl||(nl=!0,console.error("React instrumentation encountered an error: %o",O))}if(il&&e.memoizedUpdaters.clear(),FR(),o!==null){p=H.T,g=et.p,et.p=xi,H.T=null;try{var v=e.onRecoverableError;for(a=0;a<o.length;a++){var x=o[a],D=tL(x.stack);Y(x.source,v,x.value,D)}}finally{H.T=p,et.p=g}}(vo&3)!==0&&Rc(),Jo(e),f=e.pendingLanes,(n&261930)!==0&&(f&42)!==0?(np=!0,e===ob?Ef++:(Ef=0,ob=e)):Ef=0,u||Oa(n,Ul),Bc(0,!1)}}function tL(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 wx(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,mc(n)))}function Rc(){return bx(),vx(),Sx(),xx()}function xx(){if(tn!==Sp)return!1;var e=Xs,n=tb;tb=0;var o=hi(vo),a=ol===0||ol>o?ol:o;o=H.T;var u=et.p;try{et.p=a,H.T=null;var f=ib;ib=null,a=Xs;var p=vo;if(tn=Ys,mu=Xs=null,vo=0,(Ie&(rn|Ti))!==yn)throw Error("Cannot flush passive effects while already rendering.");di(p),lb=!0,wp=!1;var g=0;if(ql=null,g=pn(),So===AA)dc(Ul,g,jl);else{var v=Ul,x=g,D=So===eb;!gt||x<=v||(Vt?Vt.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|=Ti;var O=a.current;$h(),ix(O);var A=a.current;O=nb,$h(),Kw(a,A,p,f,O),Tx(a),Ie=v;var B=pn();if(A=g,O=Vt,ql!==null?cS(A,B,ql,!0,O):!gt||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")),Oa(p,B),Bc(0,!1),wp?a===Mf?Qa++:(Qa=0,Mf=a):Qa=0,wp=lb=!1,Rn&&typeof Rn.onPostCommitFiberRoot==="function")try{Rn.onPostCommitFiberRoot(jr,a)}catch(J){nl||(nl=!0,console.error("React instrumentation encountered an error: %o",J))}var X=a.current.stateNode;return X.effectDuration=0,X.passiveEffectDuration=0,!0}finally{et.p=u,H.T=o,wx(e,n)}}function kx(e,n,o){n=pi(o,n),AS(n),n=Jg(e.stateNode,n,2),e=bs(e,n,2),e!==null&&(zi(e,2),Jo(e))}function Ke(e,n,o){if(gu=!1,e.tag===3)kx(e,e,o);else{for(;n!==null;){if(n.tag===3){kx(n,e,o);return}if(n.tag===1){var a=n.stateNode;if(typeof n.type.getDerivedStateFromError==="function"||typeof a.componentDidCatch==="function"&&(Ps===null||!Ps.has(a))){e=pi(o,e),AS(e),o=Zg(2),a=bs(n,o,2),a!==null&&(Kg(o,a,n,e),zi(a,2),Jo(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
|
|
141
|
+
%s`,o)}}function S0(e,n,o){var a=e.pingCache;if(a===null){a=e.pingCache=new bz;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)||(Jy=!0,u.add(o),a=nL.bind(null,e,n,o),il&&Lc(e,o),n.then(a,a))}function nL(e,n,o){var a=e.pingCache;a!==null&&a.delete(n),e.pingedLanes|=e.suspendedLanes&o,e.warmLanes&=~o,(o&127)!==0?0>al&&(Hs=al=Ft(),nf=Fd("Promise Resolved"),Ns=Jd):(o&4194048)!==0&&0>Yi&&(rl=Yi=Ft(),lf=Fd("Promise Resolved"),Ly=Jd),sx()&&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`),
|
|
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`),ct===e&&(Ce&o)===o&&(Ot===Vs||Ot===hp&&(Ce&62914560)===Ce&&pn()-yp<kA?(Ie&rn)===yn&&Br(e,0):Zy|=o,Xa===Ce&&(Xa=0)),Jo(e)}function Cx(e,n){n===0&&(n=yl()),e=On(e,n),e!==null&&(zi(e,n),Jo(e))}function iL(e){var n=e.memoizedState,o=0;n!==null&&(o=n.retryLane),Cx(e,o)}function oL(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),Cx(e,o)}function w0(e,n,o){if((n.subtreeFlags&67117056)!==0)for(n=n.child;n!==null;){var a=e,u=n,f=u.type===Ld;f=o||f,u.tag!==22?u.flags&67108864?f&&Y(u,Ax,a,u):w0(a,u,f):u.memoizedState===null&&(f&&u.flags&8192?Y(u,Ax,a,u):u.subtreeFlags&67108864&&Y(u,w0,a,u,f)),n=n.sibling}}function Ax(e,n){Ze(!0);try{Jw(n),ox(n),Zw(e,n.alternate,n,!1),ex(e,n,0,null,!1,0)}finally{Ze(!1)}}function Tx(e){var n=!0;e.current.mode&(Ln|mo)||(n=!1),w0(e,e.current,n)}function Ex(e){if((Ie&rn)===yn){var n=e.tag;if(n===3||n===1||n===0||n===11||n===14||n===15){if(n=ae(e)||"ReactComponent",xp!==null){if(xp.has(n))return;xp.add(n)}else xp=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 Lc(e,n){il&&e.memoizedUpdaters.forEach(function(o){Ni(e,o,n)})}function lL(e,n){var o=H.actQueue;return o!==null?(o.push(n),wz):ny(e,n)}function sL(e){sx()&&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!==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=`
|
|
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`,ae(e))})}function Jo(e){e!==yu&&e.next===null&&(yu===null?kp=yu=e:yu=yu.next=e),Cp=!0,H.actQueue!==null?ab||(ab=!0,Rx()):sb||(sb=!0,Rx())}function Bc(e,n){if(!rb&&Cp){rb=!0;do{var o=!1;for(var a=kp;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-Un(42|e)+1)-1,f&=u&~(p&~g),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(o=!0,Ox(a,f))}else f=Ce,f=Bi(a,a===ct?f:0,a.cancelPendingCommit!==null||a.timeoutHandle!==Ja),(f&3)===0||Ho(a,f)||(o=!0,Ox(a,f));a=a.next}}while(o);rb=!1}}function aL(){Lf=window.event,x0()}function x0(){Cp=ab=sb=!1;var e=0;Qs!==0&&pL()&&(e=Qs);for(var n=pn(),o=null,a=kp;a!==null;){var u=a.next,f=Mx(a,n);if(f===0)a.next=null,o===null?kp=u:o.next=u,u===null&&(yu=o);else if(o=a,e!==0||(f&3)!==0)Cp=!0;a=u}tn!==Ys&&tn!==Sp||Bc(e,!1),Qs!==0&&(Qs=0)}function Mx(e,n){for(var{suspendedLanes:o,pingedLanes:a,expirationTimes:u}=e,f=e.pendingLanes&-62914561;0<f;){var p=31-Un(f),g=1<<p,v=u[p];if(v===-1){if((g&o)===0||(g&a)!==0)u[p]=No(g,n)}else v<=n&&(e.expiredLanes|=g);f&=~g}if(n=ct,o=Ce,o=Bi(e,e===n?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==Ja),a=e.callbackNode,o===0||e===n&&(it===Pa||it===Ya)||e.cancelPendingCommit!==null)return a!==null&&k0(a),e.callbackNode=null,e.callbackPriority=0;if((o&3)===0||Ho(e,o)){if(n=o&-o,n!==e.callbackPriority||H.actQueue!==null&&a!==ub)k0(a);else return n;switch(hi(o)){case xi:case po:o=oy;break;case ol:o=Vr;break;case Ud:o=ly;break;default:o=Vr}return a=Dx.bind(null,e),H.actQueue!==null?(H.actQueue.push(a),o=ub):o=ny(o,a),e.callbackPriority=n,e.callbackNode=o,n}return a!==null&&k0(a),e.callbackPriority=2,e.callbackNode=null,2}function Dx(e,n){if(np=tp=!1,Lf=window.event,tn!==Ys&&tn!==Sp)return e.callbackNode=null,e.callbackPriority=0,null;var o=e.callbackNode;if(So===vp&&(So=eb),Rc()&&e.callbackNode!==o)return null;var a=Ce;if(a=Bi(e,e===ct?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==Ja),a===0)return null;return rx(e,a,n),Mx(e,pn()),e.callbackNode!=null&&e.callbackNode===o?Dx.bind(null,e):null}function Ox(e,n){if(Rc())return null;tp=np,np=!1,rx(e,n,!0)}function k0(e){e!==ub&&e!==null&&FL(e)}function Rx(){H.actQueue!==null&&H.actQueue.push(function(){return x0(),null}),Rz(function(){(Ie&(rn|Ti))!==yn?ny(iy,aL):x0()})}function C0(){if(Qs===0){var e=_a;e===0&&(e=Hd,Hd<<=1,(Hd&261888)===0&&(Hd=256)),Qs=e}return Qs}function Lx(e){if(e==null||typeof e==="symbol"||typeof e==="boolean")return null;if(typeof e==="function")return e;return ve(e,"action"),cc(""+e)}function Bx(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 rL(e,n,o,a,u){if(n==="submit"&&o&&o.stateNode===u){var f=Lx((u[qn]||null).action),p=a.submitter;p&&(n=(n=p[qn]||null)?Lx(n.formAction):p.getAttribute("formAction"),n!==null&&(f=n,p=null));var g=new $d("action","action",null,a,u);e.push({event:g,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Qs!==0){var v=p?Bx(u,p):new FormData(u),x={pending:!0,data:v,method:u.method,action:f};Object.freeze(x),Pg(o,x,null,v)}}else typeof f==="function"&&(g.preventDefault(),v=p?Bx(u,p):new FormData(u),x={pending:!0,data:v,method:u.method,action:f},Object.freeze(x),Pg(o,x,f,v))},currentTarget:u}]})}}function wd(e,n,o){e.currentTarget=o;try{n(e)}catch(a){wy(a)}e.currentTarget=null}function zx(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,wd,f,g,x):wd(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,wd,f,g,x):wd(f,g,x),u=v}}}}function He(e,n){cb.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[sy];o===void 0&&(o=n[sy]=new Set);var a=e+"__bubble";o.has(a)||(Hx(n,e,2,!1),o.add(a))}function A0(e,n,o){cb.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),Hx(o,e,a,n)}function T0(e){if(!e[Ap]){e[Ap]=!0,Rk.forEach(function(o){o!=="selectionchange"&&(cb.has(o)||A0(o,!1,e),A0(o,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Ap]||(n[Ap]=!0,A0("selectionchange",!1,n))}}function Hx(e,n,o,a){switch(pk(n)){case xi:var u=IL;break;case po:u=$L;break;default:u=I0}o=u.bind(null,n,o,e),u=void 0,!fy||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 E0(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=on(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}X1(function(){var x=f,D=Wm(o),O=[];e:{var A=pC.get(e);if(A!==void 0){var B=$d,X=e;switch(e){case"keypress":if(Dh(o)===0)break e;case"keydown":case"keyup":B=_B;break;case"focusin":X="focus",B=my;break;case"focusout":X="blur",B=my;break;case"beforeblur":case"afterblur":B=my;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=eC;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":B=AB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":B=VB;break;case cC:case fC:case hC:B=MB;break;case dC:B=IB;break;case"scroll":case"scrollend":B=kB;break;case"wheel":B=PB;break;case"copy":case"cut":case"paste":B=OB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":B=nC;break;case"toggle":case"beforetoggle":B=XB}var J=(n&4)!==0,dt=!J&&(e==="scroll"||e==="scrollend"),Ne=J?A!==null?A+"Capture":null:A;J=[];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||Ne===null||(M=fc(C,Ne),M!=null&&J.push(zc(C,M,T))),dt)break;C=C.return}0<J.length&&(A=new B(A,X,null,o,D),O.push({event:A,listeners:J}))}}if((n&7)===0){e:{if(A=e==="mouseover"||e==="pointerover",B=e==="mouseout"||e==="pointerout",A&&o!==Yc&&(X=o.relatedTarget||o.fromElement)&&(on(X)||X[Ms]))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?on(X):null,X!==null&&(dt=_(X),J=X.tag,X!==dt||J!==5&&J!==27&&J!==6))X=null}else B=null,X=x;if(B!==X){if(J=eC,M="onMouseLeave",Ne="onMouseEnter",C="mouse",e==="pointerout"||e==="pointerover")J=nC,M="onPointerLeave",Ne="onPointerEnter",C="pointer";if(dt=B==null?A:Sl(B),T=X==null?A:Sl(X),A=new J(M,C+"leave",B,o,D),A.target=dt,A.relatedTarget=T,M=null,on(D)===x&&(J=new J(Ne,C+"enter",X,o,D),J.target=T,J.relatedTarget=dt,M=J),dt=M,B&&X)t:{J=uL,Ne=B,C=X,T=0;for(M=Ne;M;M=J(M))T++;M=0;for(var N=C;N;N=J(N))M++;for(;0<T-M;)Ne=J(Ne),T--;for(;0<M-T;)C=J(C),M--;for(;T--;){if(Ne===C||C!==null&&Ne===C.alternate){J=Ne;break t}Ne=J(Ne),C=J(C)}J=null}else J=null;B!==null&&Nx(O,A,B,J,!1),X!==null&&dt!==null&&Nx(O,dt,X,J,!0)}}}e:{if(A=x?Sl(x):window,B=A.nodeName&&A.nodeName.toLowerCase(),B==="select"||B==="input"&&A.type==="file")var F=K1;else if(J1(A))if(rC)F=wR;else{F=vR;var ye=bR}else B=A.nodeName,!B||B.toLowerCase()!=="input"||A.type!=="checkbox"&&A.type!=="radio"?x&&uc(x.elementType)&&(F=K1):F=SR;if(F&&(F=F(e,x))){Z1(O,F,o,D);break e}ye&&ye(e,A,x),e==="focusout"&&x&&A.type==="number"&&x.memoizedProps.value!=null&&U(A,"number",A.value)}switch(ye=x?Sl(x):window,e){case"focusin":if(J1(ye)||ye.contentEditable==="true")Gr=ye,yy=x,Zc=null;break;case"focusout":Zc=yy=Gr=null;break;case"mousedown":by=!0;break;case"contextmenu":case"mouseup":case"dragend":by=!1,sS(O,o,D);break;case"selectionchange":if(FB)break;case"keydown":case"keyup":sS(O,o,D)}var se;if(gy)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 Qr?W1(e,o)&&(te="onCompositionEnd"):e==="keydown"&&o.keyCode===iC&&(te="onCompositionStart");if(te&&(oC&&o.locale!=="ko"&&(Qr||te!=="onCompositionStart"?te==="onCompositionEnd"&&Qr&&(se=Q1()):(Ds=D,hy=("value"in Ds)?Ds.value:Ds.textContent,Qr=!0)),ye=xd(x,te),0<ye.length&&(te=new tC(te,e,null,o,D),O.push({event:te,listeners:ye}),se?te.data=se:(se=F1(o),se!==null&&(te.data=se)))),se=GB?pR(e,o):mR(e,o))te=xd(x,"onBeforeInput"),0<te.length&&(ye=new LB("onBeforeInput","beforeinput",null,o,D),O.push({event:ye,listeners:te}),ye.data=se);rL(O,e,x,o,D)}zx(O,n)})}function zc(e,n,o){return{instance:e,listener:n,currentTarget:o}}function xd(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=fc(e,o),u!=null&&a.unshift(zc(e,u,f)),u=fc(e,n),u!=null&&a.push(zc(e,u,f))),e.tag===3)return a;e=e.return}return[]}function uL(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e?e:null}function Nx(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=fc(o,f),x!=null&&p.unshift(zc(o,x,v))):u||(x=fc(o,f),x!=null&&p.push(zc(o,x,v)))),o=o.return}p.length!==0&&e.push({event:n,listeners:p})}function M0(e,n){cR(e,n),e!=="input"&&e!=="textarea"&&e!=="select"||n==null||n.value!==null||Zk||(Zk=!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:ay};uc(e)||typeof n.is==="string"||hR(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 dn(e,n,o,a){n!==o&&(o=ks(o),ks(n)!==o&&(a[e]=n))}function cL(e,n,o){n.forEach(function(a){o[qx(a)]=a==="style"?O0(e):e.getAttribute(a)})}function Zo(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 _x(e,n){return e=e.namespaceURI===Vd||e.namespaceURI===$r?e.ownerDocument.createElementNS(e.namespaceURI,e.tagName):e.ownerDocument.createElement(e.tagName),e.innerHTML=n,e.innerHTML}function ks(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.",Je(e)),Et(e)),(typeof e==="string"?e:""+e).replace(xz,`
|
|
160
|
+
`).replace(kz,"")}function Ux(e,n){return n=ks(n),ks(e)===n?!0:!1}function rt(e,n,o,a,u,f){switch(o){case"children":if(typeof a==="string")Mh(a,n,!1),n==="body"||n==="textarea"&&a===""||rc(e,a);else if(typeof a==="number"||typeof a==="bigint")Mh(""+a,n,!1),n!=="body"&&rc(e,""+a);break;case"className":hs(e,"class",a);break;case"tabIndex":hs(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":hs(e,o,a);break;case"style":$1(e,a,f);break;case"data":if(n!=="object"){hs(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}ve(a,o),a=cc(""+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||Mp||(Mp=!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||Ep||(Ep=!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"||Tp?n!=="button"||u.type==null||u.type==="submit"||Tp?typeof a==="function"&&(u.name==null||_A||(_A=!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||Mp||(Mp=!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||Ep||(Ep=!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."))):(Tp=!0,console.error('A button can only specify a formAction along with type="submit" or no type.')):(Tp=!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"&&rt(e,n,"name",u.name,u,null),rt(e,n,"formEncType",u.formEncType,u,null),rt(e,n,"formMethod",u.formMethod,u,null),rt(e,n,"formTarget",u.formTarget,u,null)):(rt(e,n,"encType",u.encType,u,null),rt(e,n,"method",u.method,u,null),rt(e,n,"target",u.target,u,null)));if(a==null||typeof a==="symbol"||typeof a==="boolean"){e.removeAttribute(o);break}ve(a,o),a=cc(""+a),e.setAttribute(o,a);break;case"onClick":a!=null&&(typeof a!=="function"&&Zo(o,a),e.onclick=Al);break;case"onScroll":a!=null&&(typeof a!=="function"&&Zo(o,a),He("scroll",e));break;case"onScrollEnd":a!=null&&(typeof a!=="function"&&Zo(o,a),He("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}ve(a,o),o=cc(""+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"?(ve(a,o),e.setAttribute(o,""+a)):e.removeAttribute(o);break;case"inert":a!==""||Dp[o]||(Dp[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"?(ve(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?(ve(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):(ve(a,o),e.setAttribute(o,a));break;case"popover":He("beforetoggle",e),He("toggle",e),vr(e,"popover",a);break;case"xlinkActuate":ao(e,Ga,"xlink:actuate",a);break;case"xlinkArcrole":ao(e,Ga,"xlink:arcrole",a);break;case"xlinkRole":ao(e,Ga,"xlink:role",a);break;case"xlinkShow":ao(e,Ga,"xlink:show",a);break;case"xlinkTitle":ao(e,Ga,"xlink:title",a);break;case"xlinkType":ao(e,Ga,"xlink:type",a);break;case"xmlBase":ao(e,fb,"xml:base",a);break;case"xmlLang":ao(e,fb,"xml:lang",a);break;case"xmlSpace":ao(e,fb,"xml:space",a);break;case"is":f!=null&&console.error('Cannot update the "is" prop after it has been initialized.'),vr(e,"is",a);break;case"innerText":case"textContent":break;case"popoverTarget":UA||a==null||typeof a!=="object"||(UA=!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=P1(o),vr(e,o,a)):Ra.hasOwnProperty(o)&&a!=null&&typeof a!=="function"&&Zo(o,a)}}function D0(e,n,o,a,u,f){switch(o){case"style":$1(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"?rc(e,a):(typeof a==="number"||typeof a==="bigint")&&rc(e,""+a);break;case"onScroll":a!=null&&(typeof a!=="function"&&Zo(o,a),He("scroll",e));break;case"onScrollEnd":a!=null&&(typeof a!=="function"&&Zo(o,a),He("scrollend",e));break;case"onClick":a!=null&&(typeof a!=="function"&&Zo(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"&&Zo(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[qn]||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,""):vr(e,o,a)}}}function kn(e,n,o){switch(M0(n,o),n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":He("error",e),He("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:rt(e,n,f,p,o,null)}}u&&rt(e,n,"srcSet",o.srcSet,o,null),a&&rt(e,n,"src",o.src,o,null);return;case"input":xl("input",o),He("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:rt(e,n,a,D,o,null)}}Th(e,o),lc(e,f,g,v,x,p,u,!1);return;case"select":xl("select",o),He("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:rt(e,n,u,g,o,null)}Te(e,o),n=f,o=p,e.multiple=!!a,n!=null?Se(e,!!a,n,!1):o!=null&&Se(e,!!a,o,!0);return;case"textarea":xl("textarea",o),He("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:rt(e,n,p,g,o,null)}qe(e,o),Cl(e,a,u,f);return;case"option":re(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:rt(e,n,v,a,o,null)}return;case"dialog":He("beforetoggle",e),He("toggle",e),He("cancel",e),He("close",e);break;case"iframe":case"object":He("load",e);break;case"video":case"audio":for(a=0;a<Df.length;a++)He(Df[a],e);break;case"image":He("error",e),He("load",e);break;case"details":He("toggle",e);break;case"embed":case"source":case"link":He("error",e),He("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:rt(e,n,x,a,o,null)}return;default:if(uc(n)){for(D in o)o.hasOwnProperty(D)&&(a=o[D],a!==void 0&&D0(e,n,D,a,o,void 0));return}}for(g in o)o.hasOwnProperty(g)&&(a=o[g],a!=null&&rt(e,n,g,a,o,null))}function fL(e,n,o,a){switch(M0(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)||rt(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&&rt(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||NA||(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"),NA=!0),!n||a||HA||(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"),HA=!0),_i(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)||rt(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&&rt(e,n,u,f,a,v)}a=g,n=p,o=B,A!=null?Se(e,!!n,A,!1):!!o!==!!n&&(a!=null?Se(e,!!n,a,!0):Se(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:rt(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&&rt(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:rt(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:rt(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 J in o)A=o[J],o.hasOwnProperty(J)&&A!=null&&!a.hasOwnProperty(J)&&rt(e,n,J,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:rt(e,n,x,A,a,B)}return;default:if(uc(n)){for(var dt in o)A=o[dt],o.hasOwnProperty(dt)&&A!==void 0&&!a.hasOwnProperty(dt)&&D0(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||D0(e,n,D,A,a,B);return}}for(var Ne in o)A=o[Ne],o.hasOwnProperty(Ne)&&A!=null&&!a.hasOwnProperty(Ne)&&rt(e,n,Ne,null,a,A);for(O in a)A=a[O],B=o[O],!a.hasOwnProperty(O)||A===B||A==null&&B==null||rt(e,n,O,A,a,B)}function qx(e){switch(e){case"class":return"className";case"for":return"htmlFor";default:return e}}function O0(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 Vx(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?(Ge(p,f),a+=u+f+":"+(""+p).trim()):typeof p!=="number"||p===0||Fk.has(f)?(Ge(p,f),a+=u+f.replace(Yk,"-$1").toLowerCase().replace(Xk,"-ms-")+":"+(""+p).trim()):a+=u+f.replace(Yk,"-$1").toLowerCase().replace(Xk,"-ms-")+":"+p+"px",u=";")}a=a||null,n=e.getAttribute("style"),n!==a&&(a=ks(a),ks(n)!==a&&(o.style=O0(e)))}}function Ui(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(ve(a,n),e===""+a)return}dn(n,e,a,f)}function jx(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}dn(n,e,a,f)}function R0(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(ve(a,o),e===""+a)return}dn(n,e,a,f)}function Ix(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)&&(ve(a,n),e===""+a))return}dn(n,e,a,f)}function L0(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(ve(a,n),o=cc(""+a),e===o)return}dn(n,e,a,f)}function $x(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(uc(n)){for(var v in o)if(o.hasOwnProperty(v)){var x=o[v];if(x!=null){if(Ra.hasOwnProperty(v))typeof x!=="function"&&Zo(v,x);else if(o.suppressHydrationWarning!==!0)switch(v){case"children":typeof x!=="string"&&typeof x!=="number"||dn("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=_x(e,x),dn(v,p,x,u));continue;case"style":f.delete(v),Vx(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=br(e,"class",x),dn("className",p,x,u);continue;default:a.context===Ql&&n!=="svg"&&n!=="math"?f.delete(v.toLowerCase()):f.delete(v),p=br(e,v,x),dn(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"&&Zo(x,v);else if(o.suppressHydrationWarning!==!0)switch(x){case"children":typeof v!=="string"&&typeof v!=="number"||dn("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=_x(e,v),p!==v&&(u[x]={__html:p}));continue;case"className":Ui(e,x,"class",v,f,u);continue;case"tabIndex":Ui(e,x,"tabindex",v,f,u);continue;case"style":f.delete(x),Vx(e,v,u);continue;case"multiple":f.delete(x),dn(x,e.multiple,v,u);continue;case"muted":f.delete(x),dn(x,e.muted,v,u);continue;case"autoFocus":f.delete("autofocus"),dn(x,e.autofocus,v,u);continue;case"data":if(n!=="object"){f.delete(x),p=e.getAttribute("data"),dn(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}L0(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===Cz){f.delete(x.toLowerCase()),dn(x,"function",v,u);continue}L0(e,x,x.toLowerCase(),v,f,u);continue;case"xlinkHref":L0(e,x,"xlink:href",v,f,u);continue;case"contentEditable":R0(e,x,"contenteditable",v,f,u);continue;case"spellCheck":R0(e,x,"spellcheck",v,f,u);continue;case"draggable":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":R0(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":jx(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(ve(v,p),g===""+v)break e}dn(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)&&(ve(v,p),g===""+v))break e}dn(p,g,v,O)}continue;case"rowSpan":Ix(e,x,"rowspan",v,f,u);continue;case"start":Ix(e,x,x,v,f,u);continue;case"xHeight":Ui(e,x,"x-height",v,f,u);continue;case"xlinkActuate":Ui(e,x,"xlink:actuate",v,f,u);continue;case"xlinkArcrole":Ui(e,x,"xlink:arcrole",v,f,u);continue;case"xlinkRole":Ui(e,x,"xlink:role",v,f,u);continue;case"xlinkShow":Ui(e,x,"xlink:show",v,f,u);continue;case"xlinkTitle":Ui(e,x,"xlink:title",v,f,u);continue;case"xlinkType":Ui(e,x,"xlink:type",v,f,u);continue;case"xmlBase":Ui(e,x,"xml:base",v,f,u);continue;case"xmlLang":Ui(e,x,"xml:lang",v,f,u);continue;case"xmlSpace":Ui(e,x,"xml:space",v,f,u);continue;case"inert":v!==""||Dp[x]||(Dp[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)),jx(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=P1(x),p=!1,a.context===Ql&&n!=="svg"&&n!=="math"?f.delete(g.toLowerCase()):(D=x.toLowerCase(),D=jd.hasOwnProperty(D)?jd[D]||null:null,D!==null&&D!==x&&(p=!0,f.delete(D)),f.delete(g));e:if(D=e,O=g,g=v,ic(O))if(D.hasAttribute(O))D=D.getAttribute(O),ve(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||dn(x,g,v,u)}}}return 0<f.size&&o.suppressHydrationWarning!==!0&&cL(e,f,u),Object.keys(u).length===0?null:u}function hL(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 Px(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function dL(){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&&Px(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&&Px(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 kd(e){return e.nodeType===9?e:e.ownerDocument}function Yx(e){switch(e){case $r:return vu;case Vd:return Rp;default:return Ql}}function Xx(e,n){if(e===Ql)switch(n){case"svg":return vu;case"math":return Rp;default:return Ql}return e===vu&&n==="foreignObject"?Ql:e}function B0(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 pL(){var e=window.event;if(e&&e.type==="popstate"){if(e===mb)return!1;return mb=e,!0}return mb=null,!1}function Hc(){var e=window.event;return e&&e!==Lf?e.type:null}function Nc(){var e=window.event;return e&&e!==Lf?e.timeStamp:-1.1}function mL(e){setTimeout(function(){throw e})}function gL(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 yL(){}function bL(e,n,o,a){fL(e,n,o,a),e[qn]=a}function Qx(e){rc(e,"")}function vL(e,n,o){e.nodeValue=o}function Gx(e){if(!e.__reactWarnedAboutChildrenConflict){var n=e[qn]||null;if(n!==null){var o=Nn(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 Cs(e){return e==="head"}function SL(e,n){e.removeChild(n)}function wL(e,n){(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e).removeChild(n)}function Wx(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===Rf||o===Op){if(a===0){e.removeChild(u),_r(n);return}a--}else if(o===Of||o===Gs||o===Fa||o===bu||o===Wa)a++;else if(o===Tz)_c(e.ownerDocument.documentElement);else if(o===Mz){o=e.ownerDocument.head,_c(o);for(var f=o.firstChild;f;){var{nextSibling:p,nodeName:g}=f;f[Pc]||g==="SCRIPT"||g==="STYLE"||g==="LINK"&&f.rel.toLowerCase()==="stylesheet"||o.removeChild(f),f=p}}else o===Ez&&_c(e.ownerDocument.body);o=u}while(o);_r(n)}function Fx(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===Rf)if(e===0)break;else e--;else o!==Of&&o!==Gs&&o!==Fa&&o!==bu||e++;o=a}while(o)}function xL(e){Fx(e,!0)}function kL(e){e=e.style,typeof e.setProperty==="function"?e.setProperty("display","none","important"):e.display="none"}function CL(e){e.nodeValue=""}function AL(e){Fx(e,!1)}function TL(e,n){n=n[Dz],n=n!==void 0&&n!==null&&n.hasOwnProperty("display")?n.display:null,e.style.display=n==null||typeof n==="boolean"?"":(""+n).trim()}function EL(e,n){e.nodeValue=n}function z0(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":z0(o),ne(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}e.removeChild(o)}}function ML(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"){ve(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[Pc])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=vi(e.nextSibling),e===null)break}return null}function DL(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=vi(e.nextSibling),e===null)return null}return e}function Jx(e,n){for(;e.nodeType!==8;){if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n)return null;if(e=vi(e.nextSibling),e===null)return null}return e}function H0(e){return e.data===Gs||e.data===Fa}function N0(e){return e.data===bu||e.data===Gs&&e.ownerDocument.readyState!==VA}function OL(e,n){var o=e.ownerDocument;if(e.data===Fa)e._reactRetry=n;else if(e.data!==Gs||o.readyState!==VA)n();else{var a=function(){n(),o.removeEventListener("DOMContentLoaded",a)};o.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function vi(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===Of||n===bu||n===Gs||n===Fa||n===Wa||n===hb||n===qA)break;if(n===Rf||n===Op)return null}}return e}function Zx(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[qx(f.name)]=f.name.toLowerCase()==="style"?O0(e):f.value}return{type:n,props:o}}return e.nodeType===8?e.data===Wa?{type:"Activity",props:{}}:{type:"Suspense",props:{}}:e.nodeValue}function Kx(e,n,o){return o===null||o[Az]!==!0?(e.nodeValue===n?e=null:(n=ks(n),e=ks(e.nodeValue)===n?null:e.nodeValue),e):null}function _0(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var o=e.data;if(o===Rf||o===Op){if(n===0)return vi(e.nextSibling);n--}else o!==Of&&o!==bu&&o!==Gs&&o!==Fa&&o!==Wa||n++}e=e.nextSibling}return null}function ek(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var o=e.data;if(o===Of||o===bu||o===Gs||o===Fa||o===Wa){if(n===0)return e;n--}else o!==Rf&&o!==Op||n++}e=e.previousSibling}return null}function RL(e){_r(e)}function LL(e){_r(e)}function BL(e){_r(e)}function tk(e,n,o,a,u){switch(u&&Gm(e,a.ancestorInfo),n=kd(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 zL(e,n,o,a){if(!o[Ms]&&Nn(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]);kn(o,e,n),o[Cn]=a,o[qn]=n}function _c(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);ne(e)}function Cd(e){return typeof e.getRootNode==="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}function nk(e,n,o){var a=Su;if(a&&typeof n==="string"&&n){var u=Kn(n);u='link[rel="'+e+'"][href="'+u+'"]',typeof o==="string"&&(u+='[crossorigin="'+o+'"]'),XA.has(u)||(XA.add(u),e={rel:e,crossOrigin:o,href:n},a.querySelector(u)===null&&(n=a.createElement("link"),kn(n,"link",e),Mt(n),a.head.appendChild(n)))}}function ik(e,n,o,a){var u=(u=Ts.current)?Cd(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=Hr(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=Hr(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:Za,preload:null}},f.set(e,p),(f=u.querySelector(Uc(e)))&&!f._p&&(p.instance=f,p.state.loading=Bf|Wi),!Fi.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};Fi.set(e,g),f||HL(u,e,g,p.state)}if(n&&a===null)throw o=`
|
|
161
161
|
|
|
162
|
-
- `+
|
|
163
|
-
+ `+
|
|
162
|
+
- `+Ad(n)+`
|
|
163
|
+
+ `+Ad(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
|
-
- `+
|
|
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.
|
|
165
|
+
- `+Ad(n)+`
|
|
166
|
+
+ `+Ad(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=Nr(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 Ad(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 Hr(e){return'href="'+Kn(e)+'"'}function Uc(e){return'link[rel="stylesheet"]['+e+"]"}function ok(e){return Me({},e,{"data-precedence":e.precedence,precedence:null})}function HL(e,n,o,a){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?a.loading=Bf:(n=e.createElement("link"),a.preload=n,n.addEventListener("load",function(){return a.loading|=Bf}),n.addEventListener("error",function(){return a.loading|=PA}),kn(n,"link",o),Mt(n),e.head.appendChild(n))}function Nr(e){return'[src="'+Kn(e)+'"]'}function qc(e){return"script[async]"+e}function lk(e,n,o){if(n.count++,n.instance===null)switch(n.type){case"style":var a=e.querySelector('style[data-href~="'+Kn(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),kn(a,"style",u),Td(a,o.precedence,e),n.instance=a;case"stylesheet":u=Hr(o.href);var f=e.querySelector(Uc(u));if(f)return n.state.loading|=Wi,n.instance=f,Mt(f),f;a=ok(o),(u=Fi.get(u))&&U0(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}),kn(f,"link",a),n.state.loading|=Wi,Td(f,o.precedence,e),n.instance=f;case"script":if(f=Nr(o.src),u=e.querySelector(qc(f)))return n.instance=u,Mt(u),u;if(a=o,u=Fi.get(f))a=Me({},o),q0(a,u);return e=e.ownerDocument||e,u=e.createElement("script"),Mt(u),kn(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&Wi)===Za&&(a=n.instance,n.state.loading|=Wi,Td(a,o.precedence,e));return n.instance}function Td(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 U0(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function q0(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}function sk(e,n,o){if(Lp===null){var a=new Map,u=Lp=new Map;u.set(o,a)}else u=Lp,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[Pc]||f[Cn]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!==$r){var p=f.getAttribute(n)||"";p=e+p;var g=a.get(p);g?g.push(f):a.set(p,[f])}}return a}function ak(e,n,o){e=e.ownerDocument||e,e.head.insertBefore(o,n==="title"?e.querySelector("head > title"):null)}function NL(e,n,o){var a=!o.ancestorInfo.containerTagInScope;if(o.context===vu||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=hL(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 rk(e){return e.type==="stylesheet"&&(e.state.loading&YA)===Za?!1:!0}function _L(e,n,o,a){if(o.type==="stylesheet"&&(typeof a.media!=="string"||matchMedia(a.media).matches!==!1)&&(o.state.loading&Wi)===Za){if(o.instance===null){var u=Hr(a.href),f=n.querySelector(Uc(u));if(f){n=f._p,n!==null&&typeof n==="object"&&typeof n.then==="function"&&(e.count++,e=Ed.bind(e),n.then(e,e)),o.state.loading|=Wi,o.instance=f,Mt(f);return}f=n.ownerDocument||n,a=ok(a),(u=Fi.get(u))&&U0(a,u),f=f.createElement("link"),Mt(f);var p=f;p._p=new Promise(function(g,v){p.onload=g,p.onerror=v}),kn(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&YA)===Za&&(e.count++,o=Ed.bind(e),n.addEventListener("load",o),n.addEventListener("error",o))}}function UL(e,n){return e.stylesheets&&e.count===0&&Md(e,e.stylesheets),0<e.count||0<e.imgCount?function(o){var a=setTimeout(function(){if(e.stylesheets&&Md(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},Lz+n);0<e.imgBytes&&yb===0&&(yb=125*dL()*zz);var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Md(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>yb?50:Bz)+n);return e.unsuspend=o,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(u)}}:null}function Ed(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Md(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}function Md(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Bp=new Map,n.forEach(qL,e),Bp=null,Ed.call(e))}function qL(e,n){if(!(n.state.loading&Wi)){var o=Bp.get(e);if(o)var a=o.get(bb);else{o=new Map,Bp.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(bb,a)}u=n.instance,p=u.getAttribute("data-precedence"),f=o.get(p)||a,f===a&&o.set(bb,u),o.set(p,u),this.count++,a=Ed.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|=Wi}}function VL(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=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 uk(e,n,o,a,u,f,p,g,v,x,D,O){return e=new VL(e,n,o,p,v,x,D,O,g),n=lz,f===!0&&(n|=Ln|mo),n|=xe,f=w(3,null,null,n),e.current=f,f.stateNode=e,n=dg(),Ca(n),e.pooledCache=n,Ca(n),f.memoizedState={element:a,isDehydrated:o,cache:n},bg(f),e}function ck(e){if(!e)return Ls;return e=Ls,e}function V0(e,n,o,a,u,f){if(Rn&&typeof Rn.onScheduleFiberRoot==="function")try{Rn.onScheduleFiberRoot(jr,a,o)}catch(p){nl||(nl=!0,console.error("React instrumentation encountered an error: %o",p))}u=ck(u),a.context===null?a.context=u:a.pendingContext=u,tl&&wi!==null&&!FA&&(FA=!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(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.
|
|
168
|
+
Check the render method of %s.`,ae(wi)||"Unknown")),a=ys(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=bs(e,a,n),o!==null&&(Vo(n,"root.render()",null),zt(o,e,n),vc(o,e,n))}function fk(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var o=e.retryLane;e.retryLane=o!==0&&o<n?o:n}}function j0(e,n){fk(e,n),(e=e.alternate)&&fk(e,n)}function hk(e){if(e.tag===13||e.tag===31){var n=On(e,67108864);n!==null&&zt(n,e,67108864),j0(e,67108864)}}function dk(e){if(e.tag===13||e.tag===31){var n=bi(e);n=Hi(n);var o=On(e,n);o!==null&&zt(o,e,n),j0(e,n)}}function jL(){return wi}function IL(e,n,o,a){var u=H.T;H.T=null;var f=et.p;try{et.p=xi,I0(e,n,o,a)}finally{et.p=f,H.T=u}}function $L(e,n,o,a){var u=H.T;H.T=null;var f=et.p;try{et.p=po,I0(e,n,o,a)}finally{et.p=f,H.T=u}}function I0(e,n,o,a){if(Hp){var u=$0(a);if(u===null)E0(e,n,a,Np,o),mk(e,a);else if(PL(u,e,n,o,a))a.stopPropagation();else if(mk(e,a),n&4&&-1<Nz.indexOf(e)){for(;u!==null;){var f=Nn(u);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var p=fn(f.pendingLanes);if(p!==0){var g=f;g.pendingLanes|=2;for(g.entangledLanes|=2;p;){var v=1<<31-Un(p);g.entanglements[1]|=v,p&=~v}Jo(f),(Ie&(rn|Ti))===yn&&(bp=pn()+CA,Bc(0,!1))}}break;case 31:case 13:g=On(f,2),g!==null&&zt(g,f,2),Lr(),j0(f,2)}if(f=$0(a),f===null&&E0(e,n,a,Np,o),f===u)break;u=f}u!==null&&a.stopPropagation()}else E0(e,n,a,null,o)}}function $0(e){return e=Wm(e),P0(e)}function P0(e){if(Np=null,e=on(e),e!==null){var n=_(e);if(n===null)e=null;else{var o=n.tag;if(o===13){if(e=V(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 Np=e,null}function pk(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 xi;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(KL()){case iy:return xi;case oy:return po;case Vr:case eB:return ol;case ly:return Ud;default:return ol}default:return ol}}function mk(e,n){switch(e){case"focusin":case"focusout":Ws=null;break;case"dragenter":case"dragleave":Fs=null;break;case"mouseover":case"mouseout":Js=null;break;case"pointerover":case"pointerout":Hf.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Nf.delete(n.pointerId)}}function Vc(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=Nn(n),n!==null&&hk(n)),e;return e.eventSystemFlags|=a,n=e.targetContainers,u!==null&&n.indexOf(u)===-1&&n.push(u),e}function PL(e,n,o,a,u){switch(n){case"focusin":return Ws=Vc(Ws,e,n,o,a,u),!0;case"dragenter":return Fs=Vc(Fs,e,n,o,a,u),!0;case"mouseover":return Js=Vc(Js,e,n,o,a,u),!0;case"pointerover":var f=u.pointerId;return Hf.set(f,Vc(Hf.get(f)||null,e,n,o,a,u)),!0;case"gotpointercapture":return f=u.pointerId,Nf.set(f,Vc(Nf.get(f)||null,e,n,o,a,u)),!0}return!1}function gk(e){var n=on(e.target);if(n!==null){var o=_(n);if(o!==null){if(n=o.tag,n===13){if(n=V(o),n!==null){e.blockedOn=n,hn(e.priority,function(){dk(o)});return}}else if(n===31){if(n=j(o),n!==null){e.blockedOn=n,hn(e.priority,function(){dk(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 Dd(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var o=$0(e.nativeEvent);if(o===null){o=e.nativeEvent;var a=new o.constructor(o.type,o),u=a;Yc!==null&&console.error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),Yc=u,o.target.dispatchEvent(a),Yc===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."),Yc=null}else return n=Nn(o),n!==null&&hk(n),e.blockedOn=o,!1;n.shift()}return!0}function yk(e,n,o){Dd(e)&&o.delete(n)}function YL(){vb=!1,Ws!==null&&Dd(Ws)&&(Ws=null),Fs!==null&&Dd(Fs)&&(Fs=null),Js!==null&&Dd(Js)&&(Js=null),Hf.forEach(yk),Nf.forEach(yk)}function Od(e,n){e.blockedOn===n&&(e.blockedOn=null,vb||(vb=!0,Pe.unstable_scheduleCallback(Pe.unstable_NormalPriority,YL)))}function bk(e){_p!==e&&(_p=e,Pe.unstable_scheduleCallback(Pe.unstable_NormalPriority,function(){_p===e&&(_p=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(P0(a||o)===null)continue;else break;var f=Nn(o);f!==null&&(e.splice(n,3),n-=3,o={pending:!0,data:u,method:o.method,action:a},Object.freeze(o),Pg(f,o,a,u))}}))}function _r(e){function n(v){return Od(v,e)}Ws!==null&&Od(Ws,e),Fs!==null&&Od(Fs,e),Js!==null&&Od(Js,e),Hf.forEach(n),Nf.forEach(n);for(var o=0;o<Zs.length;o++){var a=Zs[o];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Zs.length&&(o=Zs[0],o.blockedOn===null);)gk(o),o.blockedOn===null&&Zs.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[qn]||null;if(typeof f==="function")p||bk(o);else if(p){var g=null;if(f&&f.hasAttribute("formAction")){if(u=f,p=f[qn]||null)g=p.formAction;else if(P0(u)!==null)continue}else g=p.action;typeof g==="function"?o[a+1]=g:(o.splice(a,3),a-=3),bk(o)}}}function vk(){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 Y0(e){this._internalRoot=e}function Rd(e){this._internalRoot=e}function Sk(e){e[Ms]&&(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,XL=Symbol.for("react.element"),Ko=Symbol.for("react.transitional.element"),Ur=Symbol.for("react.portal"),qr=Symbol.for("react.fragment"),Ld=Symbol.for("react.strict_mode"),X0=Symbol.for("react.profiler"),Q0=Symbol.for("react.consumer"),el=Symbol.for("react.context"),jc=Symbol.for("react.forward_ref"),G0=Symbol.for("react.suspense"),W0=Symbol.for("react.suspense_list"),Bd=Symbol.for("react.memo"),Si=Symbol.for("react.lazy"),F0=Symbol.for("react.activity"),QL=Symbol.for("react.memo_cache_sentinel"),wk=Symbol.iterator,GL=Symbol.for("react.client.reference"),sn=Array.isArray,H=wu.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,et=wb.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,WL=Object.freeze({pending:!1,data:null,method:null,action:null}),J0=[],Z0=[],Bl=-1,As=lt(null),Ic=lt(null),Ts=lt(null),zd=lt(null),$c=0,xk,kk,Ck,Ak,Tk,Ek,Mk;Li.__reactDisabledLog=!0;var K0,Dk,ey=!1,ty=new(typeof WeakMap==="function"?WeakMap:Map),wi=null,tl=!1,ho=Object.prototype.hasOwnProperty,ny=Pe.unstable_scheduleCallback,FL=Pe.unstable_cancelCallback,JL=Pe.unstable_shouldYield,ZL=Pe.unstable_requestPaint,pn=Pe.unstable_now,KL=Pe.unstable_getCurrentPriorityLevel,iy=Pe.unstable_ImmediatePriority,oy=Pe.unstable_UserBlockingPriority,Vr=Pe.unstable_NormalPriority,eB=Pe.unstable_LowPriority,ly=Pe.unstable_IdlePriority,tB=Pe.log,nB=Pe.unstable_setDisableYieldValue,jr=null,Rn=null,nl=!1,il=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",Un=Math.clz32?Math.clz32:gl,iB=Math.log,oB=Math.LN2,Hd=256,Nd=262144,_d=4194304,xi=2,po=8,ol=32,Ud=268435456,Es=Math.random().toString(36).slice(2),Cn="__reactFiber$"+Es,qn="__reactProps$"+Es,Ms="__reactContainer$"+Es,sy="__reactEvents$"+Es,lB="__reactListeners$"+Es,sB="__reactHandles$"+Es,Ok="__reactResources$"+Es,Pc="__reactMarker$"+Es,Rk=new Set,Ra={},ay={},aB={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},rB=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]*$"),Lk={},Bk={},uB=/[\n"\\]/g,zk=!1,Hk=!1,Nk=!1,_k=!1,Uk=!1,qk=!1,Vk=["value","defaultValue"],jk=!1,Ik=/["'&<>\n\t]|^\s|\s$/,cB="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(" "),$k="applet caption html table td th marquee object template foreignObject desc title".split(" "),fB=$k.concat(["button"]),hB="dd dt li option optgroup p rp rt".split(" "),Pk={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null,containerTagInScope:null,implicitRootScope:!1},qd={},ry={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"]},Yk=/([A-Z])/g,Xk=/^ms-/,dB=/^(?:webkit|moz|o)[A-Z]/,pB=/^-ms-/,mB=/-(.)/g,Qk=/;\s*$/,Ir={},uy={},Gk=!1,Wk=!1,Fk=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(" ")),Vd="http://www.w3.org/1998/Math/MathML",$r="http://www.w3.org/2000/svg",gB=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"]]),jd={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"},Jk={"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},Pr={},yB=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]*$"),bB=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]*$"),Zk=!1,Vn={},Kk=/^on./,vB=/^on[^A-Z]/,SB=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]*$"),wB=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]*$"),xB=/^[\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,Yc=null,Yr=null,Xr=null,cy=!1,ll=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fy=!1;if(ll)try{var Xc={};Object.defineProperty(Xc,"passive",{get:function(){fy=!0}}),window.addEventListener("test",Xc,Xc),window.removeEventListener("test",Xc,Xc)}catch(e){fy=!1}var Ds=null,hy=null,Id=null,La={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$d=ei(La),Qc=Me({},La,{view:0,detail:0}),kB=ei(Qc),dy,py,Gc,Pd=Me({},Qc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fm,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!==Gc&&(Gc&&e.type==="mousemove"?(dy=e.screenX-Gc.screenX,py=e.screenY-Gc.screenY):py=dy=0,Gc=e),dy},movementY:function(e){return"movementY"in e?e.movementY:py}}),eC=ei(Pd),CB=Me({},Pd,{dataTransfer:0}),AB=ei(CB),TB=Me({},Qc,{relatedTarget:0}),my=ei(TB),EB=Me({},La,{animationName:0,elapsedTime:0,pseudoElement:0}),MB=ei(EB),DB=Me({},La,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),OB=ei(DB),RB=Me({},La,{data:0}),tC=ei(RB),LB=tC,BB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},zB={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"},HB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},NB=Me({},Qc,{key:function(e){if(e.key){var n=BB[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Dh(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?zB[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fm,charCode:function(e){return e.type==="keypress"?Dh(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Dh(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_B=ei(NB),UB=Me({},Pd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),nC=ei(UB),qB=Me({},Qc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fm}),VB=ei(qB),jB=Me({},La,{propertyName:0,elapsedTime:0,pseudoElement:0}),IB=ei(jB),$B=Me({},Pd,{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}),PB=ei($B),YB=Me({},La,{newState:0,oldState:0}),XB=ei(YB),QB=[9,13,27,32],iC=229,gy=ll&&"CompositionEvent"in window,Wc=null;ll&&"documentMode"in document&&(Wc=document.documentMode);var GB=ll&&"TextEvent"in window&&!Wc,oC=ll&&(!gy||Wc&&8<Wc&&11>=Wc),lC=32,sC=String.fromCharCode(lC),aC=!1,Qr=!1,WB={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},Fc=null,Jc=null,rC=!1;ll&&(rC=gR("input")&&(!document.documentMode||9<document.documentMode));var jn=typeof Object.is==="function"?Object.is:xR,FB=ll&&"documentMode"in document&&11>=document.documentMode,Gr=null,yy=null,Zc=null,by=!1,Wr={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")},vy={},uC={};ll&&(uC=document.createElement("div").style,("AnimationEvent"in window)||(delete Wr.animationend.animation,delete Wr.animationiteration.animation,delete Wr.animationstart.animation),("TransitionEvent"in window)||delete Wr.transitionend.transition);var cC=ba("animationend"),fC=ba("animationiteration"),hC=ba("animationstart"),JB=ba("transitionrun"),ZB=ba("transitionstart"),KB=ba("transitioncancel"),dC=ba("transitionend"),pC=new Map,Sy="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(" ");Sy.push("scrollEnd");var mC=0;if(typeof performance==="object"&&typeof performance.now==="function")var ez=performance,gC=function(){return ez.now()};else{var tz=Date;gC=function(){return tz.now()}}var wy=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)},nz="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.",Yd=0,xy=1,ky=2,Cy=3,Xd="– ",Qd="+ ",yC=" ",gt=typeof console<"u"&&typeof console.timeStamp==="function"&&typeof performance<"u"&&typeof performance.measure==="function",qi="Components ⚛",De="Scheduler ⚛",Re="Blocking",Os=!1,zl={color:"primary",properties:null,tooltipText:"",track:qi},Rs={start:-0,end:-0,detail:{devtools:zl}},iz=["Changed Props",""],bC="This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner.",oz=["Changed Props",bC],Kc=1,Hl=2,Vi=[],Fr=0,Ay=0,Ls={};Object.freeze(Ls);var ji=null,Jr=null,me=0,lz=1,xe=2,Ln=8,mo=16,sz=32,vC=!1;try{var SC=Object.preventExtensions({})}catch(e){vC=!0}var Ty=new WeakMap,Zr=[],Kr=0,Gd=null,ef=0,Ii=[],$i=0,Ba=null,Nl=1,_l="",An=null,yt=null,Be=!1,sl=!1,ki=null,Bs=null,Pi=!1,Ey=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."),My=lt(null),Dy=lt(null),wC={},Wd=null,eu=null,tu=!1,az=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()})}},rz=Pe.unstable_scheduleCallback,uz=Pe.unstable_NormalPriority,Wt={$$typeof:el,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},Ft=Pe.unstable_now,Fd=console.createTask?console.createTask:function(){return null},tf=1,Jd=2,mn=-0,zs=-0,Ul=-0,ql=null,In=-1.1,za=-0,Dt=-0,ue=-1.1,fe=-1.1,kt=null,Ht=!1,Hs=-0,al=-1.1,nf=null,Ns=0,Oy=null,Ry=null,Ha=-1.1,of=null,nu=-1.1,Zd=-1.1,rl=-0,Vl=-1.1,Yi=-1.1,Ly=0,lf=null,xC=null,kC=null,_s=-1.1,Na=null,Us=-1.1,Kd=-1.1,CC=-0,AC=-0,ep=0,jl=null,TC=0,sf=-1.1,tp=!1,np=!1,af=null,By=0,_a=0,iu=null,EC=H.S;H.S=function(e,n){if(xA=pn(),typeof n==="object"&&n!==null&&typeof n.then==="function"){if(0>Vl&&0>Yi){Vl=Ft();var o=Nc(),a=Hc();if(o!==Us||a!==Na)Us=-1.1;_s=o,Na=a}DR(e,n)}EC!==null&&EC(e,n)};var Ua=lt(null),go={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},rf=[],uf=[],cf=[],ff=[],hf=[],df=[],qa=new Set;go.recordUnsafeLifecycleWarnings=function(e,n){qa.has(e.type)||(typeof n.componentWillMount==="function"&&n.componentWillMount.__suppressDeprecationWarning!==!0&&rf.push(e),e.mode&Ln&&typeof n.UNSAFE_componentWillMount==="function"&&uf.push(e),typeof n.componentWillReceiveProps==="function"&&n.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&cf.push(e),e.mode&Ln&&typeof n.UNSAFE_componentWillReceiveProps==="function"&&ff.push(e),typeof n.componentWillUpdate==="function"&&n.componentWillUpdate.__suppressDeprecationWarning!==!0&&hf.push(e),e.mode&Ln&&typeof n.UNSAFE_componentWillUpdate==="function"&&df.push(e))},go.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;0<rf.length&&(rf.forEach(function(g){e.add(ae(g)||"Component"),qa.add(g.type)}),rf=[]);var n=new Set;0<uf.length&&(uf.forEach(function(g){n.add(ae(g)||"Component"),qa.add(g.type)}),uf=[]);var o=new Set;0<cf.length&&(cf.forEach(function(g){o.add(ae(g)||"Component"),qa.add(g.type)}),cf=[]);var a=new Set;0<ff.length&&(ff.forEach(function(g){a.add(ae(g)||"Component"),qa.add(g.type)}),ff=[]);var u=new Set;0<hf.length&&(hf.forEach(function(g){u.add(ae(g)||"Component"),qa.add(g.type)}),hf=[]);var f=new Set;if(0<df.length&&(df.forEach(function(g){f.add(ae(g)||"Component"),qa.add(g.type)}),df=[]),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
|
|
197
|
+
Please update the following components: %s`,p))};var ip=new Map,MC=new Set;go.recordLegacyContextWarning=function(e,n){var o=null;for(var a=e;a!==null;)a.mode&Ln&&(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."):!MC.has(e.type)&&(a=ip.get(o),e.type.contextTypes!=null||e.type.childContextTypes!=null||n!==null&&typeof n.getChildContext==="function")&&(a===void 0&&(a=[],ip.set(o,a)),a.push(e))},go.flushLegacyContextWarning=function(){ip.forEach(function(e){if(e.length!==0){var n=e[0],o=new Set;e.forEach(function(u){o.add(ae(u)||"Component"),MC.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)})}})},
|
|
203
|
+
Learn more about this warning here: https://react.dev/link/legacy-context`,a)})}})},go.discardPendingWarnings=function(){rf=[],uf=[],cf=[],ff=[],hf=[],df=[],ip=new Map};var DC={react_stack_bottom_frame:function(e,n,o){var a=tl;tl=!0;try{return e(n,o)}finally{tl=a}}},zy=DC.react_stack_bottom_frame.bind(DC),OC={react_stack_bottom_frame:function(e){var n=tl;tl=!0;try{return e.render()}finally{tl=n}}},RC=OC.react_stack_bottom_frame.bind(OC),LC={react_stack_bottom_frame:function(e,n){try{n.componentDidMount()}catch(o){Ke(e,e.return,o)}}},Hy=LC.react_stack_bottom_frame.bind(LC),BC={react_stack_bottom_frame:function(e,n,o,a,u){try{n.componentDidUpdate(o,a,u)}catch(f){Ke(e,e.return,f)}}},zC=BC.react_stack_bottom_frame.bind(BC),HC={react_stack_bottom_frame:function(e,n){var o=n.stack;e.componentDidCatch(n.value,{componentStack:o!==null?o:""})}},cz=HC.react_stack_bottom_frame.bind(HC),NC={react_stack_bottom_frame:function(e,n,o){try{o.componentWillUnmount()}catch(a){Ke(e,n,a)}}},_C=NC.react_stack_bottom_frame.bind(NC),UC={react_stack_bottom_frame:function(e){var n=e.create;return e=e.inst,n=n(),e.destroy=n}},fz=UC.react_stack_bottom_frame.bind(UC),qC={react_stack_bottom_frame:function(e,n,o){try{o()}catch(a){Ke(e,n,a)}}},hz=qC.react_stack_bottom_frame.bind(qC),VC={react_stack_bottom_frame:function(e){var n=e._init;return n(e._payload)}},dz=VC.react_stack_bottom_frame.bind(VC),ou=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`."),Ny=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."),op=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."),lp={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,pf=!1,lu=null,mf=0,ke=null,_y,jC=_y=!1,IC={},$C={},PC={};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=ae(e),u=a||"null";if(!IC[u]){IC[u]=!0,o=o._owner,e=e._debugOwner;var f="";e&&typeof e.tag==="number"&&(u=ae(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 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:
|
|
207
|
+
Check the top-level render call using <`+a+">.");var p="";o!=null&&e!==o&&(a=null,typeof o.tag==="number"?a=ae(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=NS(!0),YC=NS(!1),XC=0,QC=1,GC=2,Uy=3,qs=!1,WC=!1,qy=null,Vy=!1,su=lt(null),sp=lt(0),Ci=lt(null),Xi=null,au=1,gf=2,$t=lt(0),ap=0,Qi=1,$n=2,Ai=4,Pn=8,ru,FC=new Set,JC=new Set,jy=new Set,ZC=new Set,Il=0,ge=null,ut=null,Jt=null,rp=!1,uu=!1,Ia=!1,up=0,yf=0,$l=null,pz=0,mz=25,z=null,Gi=null,Pl=-1,bf=!1,vf={readContext:xt,use:ws,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};vf.useEffectEvent=qt;var Iy=null,KC=null,$y=null,eA=null,ul=null,yo=null,cp=null;Iy={readContext:function(e){return xt(e)},use:ws,useCallback:function(e,n){return z="useCallback",Ee(),Ar(n),Vg(e,n)},useContext:function(e){return z="useContext",Ee(),xt(e)},useEffect:function(e,n){return z="useEffect",Ee(),Ar(n),id(e,n)},useImperativeHandle:function(e,n,o){return z="useImperativeHandle",Ee(),Ar(o),qg(e,n,o)},useInsertionEffect:function(e,n){z="useInsertionEffect",Ee(),Ar(n),Ta(4,$n,e,n)},useLayoutEffect:function(e,n){return z="useLayoutEffect",Ee(),Ar(n),Ug(e,n)},useMemo:function(e,n){z="useMemo",Ee(),Ar(n);var o=H.H;H.H=ul;try{return jg(e,n)}finally{H.H=o}},useReducer:function(e,n,o){z="useReducer",Ee();var a=H.H;H.H=ul;try{return Dg(e,n,o)}finally{H.H=a}},useRef:function(e){return z="useRef",Ee(),Ng(e)},useState:function(e){z="useState",Ee();var n=H.H;H.H=ul;try{return Bg(e)}finally{H.H=n}},useDebugValue:function(){z="useDebugValue",Ee()},useDeferredValue:function(e,n){return z="useDeferredValue",Ee(),Ig(e,n)},useTransition:function(){return z="useTransition",Ee(),Yg()},useSyncExternalStore:function(e,n,o){return z="useSyncExternalStore",Ee(),Rg(e,n,o)},useId:function(){return z="useId",Ee(),Xg()},useFormState:function(e,n){return z="useFormState",Ee(),Zh(),Er(e,n)},useActionState:function(e,n){return z="useActionState",Ee(),Er(e,n)},useOptimistic:function(e){return z="useOptimistic",Ee(),zg(e)},useHostTransitionStatus:Ea,useMemoCache:Aa,useCacheRefresh:function(){return z="useCacheRefresh",Ee(),Qg()},useEffectEvent:function(e){return z="useEffectEvent",Ee(),_g(e)}},KC={readContext:function(e){return xt(e)},use:ws,useCallback:function(e,n){return z="useCallback",q(),Vg(e,n)},useContext:function(e){return z="useContext",q(),xt(e)},useEffect:function(e,n){return z="useEffect",q(),id(e,n)},useImperativeHandle:function(e,n,o){return z="useImperativeHandle",q(),qg(e,n,o)},useInsertionEffect:function(e,n){z="useInsertionEffect",q(),Ta(4,$n,e,n)},useLayoutEffect:function(e,n){return z="useLayoutEffect",q(),Ug(e,n)},useMemo:function(e,n){z="useMemo",q();var o=H.H;H.H=ul;try{return jg(e,n)}finally{H.H=o}},useReducer:function(e,n,o){z="useReducer",q();var a=H.H;H.H=ul;try{return Dg(e,n,o)}finally{H.H=a}},useRef:function(e){return z="useRef",q(),Ng(e)},useState:function(e){z="useState",q();var n=H.H;H.H=ul;try{return Bg(e)}finally{H.H=n}},useDebugValue:function(){z="useDebugValue",q()},useDeferredValue:function(e,n){return z="useDeferredValue",q(),Ig(e,n)},useTransition:function(){return z="useTransition",q(),Yg()},useSyncExternalStore:function(e,n,o){return z="useSyncExternalStore",q(),Rg(e,n,o)},useId:function(){return z="useId",q(),Xg()},useActionState:function(e,n){return z="useActionState",q(),Er(e,n)},useFormState:function(e,n){return z="useFormState",q(),Zh(),Er(e,n)},useOptimistic:function(e){return z="useOptimistic",q(),zg(e)},useHostTransitionStatus:Ea,useMemoCache:Aa,useCacheRefresh:function(){return z="useCacheRefresh",q(),Qg()},useEffectEvent:function(e){return z="useEffectEvent",q(),_g(e)}},$y={readContext:function(e){return xt(e)},use:ws,useCallback:function(e,n){return z="useCallback",q(),sd(e,n)},useContext:function(e){return z="useContext",q(),xt(e)},useEffect:function(e,n){z="useEffect",q(),ti(2048,Pn,e,n)},useImperativeHandle:function(e,n,o){return z="useImperativeHandle",q(),ld(e,n,o)},useInsertionEffect:function(e,n){return z="useInsertionEffect",q(),ti(4,$n,e,n)},useLayoutEffect:function(e,n){return z="useLayoutEffect",q(),ti(4,Ai,e,n)},useMemo:function(e,n){z="useMemo",q();var o=H.H;H.H=yo;try{return ad(e,n)}finally{H.H=o}},useReducer:function(e,n,o){z="useReducer",q();var a=H.H;H.H=yo;try{return Tr(e,n,o)}finally{H.H=a}},useRef:function(){return z="useRef",q(),nt().memoizedState},useState:function(){z="useState",q();var e=H.H;H.H=yo;try{return Tr(co)}finally{H.H=e}},useDebugValue:function(){z="useDebugValue",q()},useDeferredValue:function(e,n){return z="useDeferredValue",q(),ow(e,n)},useTransition:function(){return z="useTransition",q(),cw()},useSyncExternalStore:function(e,n,o){return z="useSyncExternalStore",q(),ed(e,n,o)},useId:function(){return z="useId",q(),nt().memoizedState},useFormState:function(e){return z="useFormState",q(),Zh(),td(e)},useActionState:function(e){return z="useActionState",q(),td(e)},useOptimistic:function(e,n){return z="useOptimistic",q(),GS(e,n)},useHostTransitionStatus:Ea,useMemoCache:Aa,useCacheRefresh:function(){return z="useCacheRefresh",q(),nt().memoizedState},useEffectEvent:function(e){return z="useEffectEvent",q(),od(e)}},eA={readContext:function(e){return xt(e)},use:ws,useCallback:function(e,n){return z="useCallback",q(),sd(e,n)},useContext:function(e){return z="useContext",q(),xt(e)},useEffect:function(e,n){z="useEffect",q(),ti(2048,Pn,e,n)},useImperativeHandle:function(e,n,o){return z="useImperativeHandle",q(),ld(e,n,o)},useInsertionEffect:function(e,n){return z="useInsertionEffect",q(),ti(4,$n,e,n)},useLayoutEffect:function(e,n){return z="useLayoutEffect",q(),ti(4,Ai,e,n)},useMemo:function(e,n){z="useMemo",q();var o=H.H;H.H=cp;try{return ad(e,n)}finally{H.H=o}},useReducer:function(e,n,o){z="useReducer",q();var a=H.H;H.H=cp;try{return kc(e,n,o)}finally{H.H=a}},useRef:function(){return z="useRef",q(),nt().memoizedState},useState:function(){z="useState",q();var e=H.H;H.H=cp;try{return kc(co)}finally{H.H=e}},useDebugValue:function(){z="useDebugValue",q()},useDeferredValue:function(e,n){return z="useDeferredValue",q(),lw(e,n)},useTransition:function(){return z="useTransition",q(),fw()},useSyncExternalStore:function(e,n,o){return z="useSyncExternalStore",q(),ed(e,n,o)},useId:function(){return z="useId",q(),nt().memoizedState},useFormState:function(e){return z="useFormState",q(),Zh(),nd(e)},useActionState:function(e){return z="useActionState",q(),nd(e)},useOptimistic:function(e,n){return z="useOptimistic",q(),FS(e,n)},useHostTransitionStatus:Ea,useMemoCache:Aa,useCacheRefresh:function(){return z="useCacheRefresh",q(),nt().memoizedState},useEffectEvent:function(e){return z="useEffectEvent",q(),od(e)}},ul={readContext:function(e){return m(),xt(e)},use:function(e){return d(),ws(e)},useCallback:function(e,n){return z="useCallback",d(),Ee(),Vg(e,n)},useContext:function(e){return z="useContext",d(),Ee(),xt(e)},useEffect:function(e,n){return z="useEffect",d(),Ee(),id(e,n)},useImperativeHandle:function(e,n,o){return z="useImperativeHandle",d(),Ee(),qg(e,n,o)},useInsertionEffect:function(e,n){z="useInsertionEffect",d(),Ee(),Ta(4,$n,e,n)},useLayoutEffect:function(e,n){return z="useLayoutEffect",d(),Ee(),Ug(e,n)},useMemo:function(e,n){z="useMemo",d(),Ee();var o=H.H;H.H=ul;try{return jg(e,n)}finally{H.H=o}},useReducer:function(e,n,o){z="useReducer",d(),Ee();var a=H.H;H.H=ul;try{return Dg(e,n,o)}finally{H.H=a}},useRef:function(e){return z="useRef",d(),Ee(),Ng(e)},useState:function(e){z="useState",d(),Ee();var n=H.H;H.H=ul;try{return Bg(e)}finally{H.H=n}},useDebugValue:function(){z="useDebugValue",d(),Ee()},useDeferredValue:function(e,n){return z="useDeferredValue",d(),Ee(),Ig(e,n)},useTransition:function(){return z="useTransition",d(),Ee(),Yg()},useSyncExternalStore:function(e,n,o){return z="useSyncExternalStore",d(),Ee(),Rg(e,n,o)},useId:function(){return z="useId",d(),Ee(),Xg()},useFormState:function(e,n){return z="useFormState",d(),Ee(),Er(e,n)},useActionState:function(e,n){return z="useActionState",d(),Ee(),Er(e,n)},useOptimistic:function(e){return z="useOptimistic",d(),Ee(),zg(e)},useMemoCache:function(e){return d(),Aa(e)},useHostTransitionStatus:Ea,useCacheRefresh:function(){return z="useCacheRefresh",Ee(),Qg()},useEffectEvent:function(e){return z="useEffectEvent",d(),Ee(),_g(e)}},yo={readContext:function(e){return m(),xt(e)},use:function(e){return d(),ws(e)},useCallback:function(e,n){return z="useCallback",d(),q(),sd(e,n)},useContext:function(e){return z="useContext",d(),q(),xt(e)},useEffect:function(e,n){z="useEffect",d(),q(),ti(2048,Pn,e,n)},useImperativeHandle:function(e,n,o){return z="useImperativeHandle",d(),q(),ld(e,n,o)},useInsertionEffect:function(e,n){return z="useInsertionEffect",d(),q(),ti(4,$n,e,n)},useLayoutEffect:function(e,n){return z="useLayoutEffect",d(),q(),ti(4,Ai,e,n)},useMemo:function(e,n){z="useMemo",d(),q();var o=H.H;H.H=yo;try{return ad(e,n)}finally{H.H=o}},useReducer:function(e,n,o){z="useReducer",d(),q();var a=H.H;H.H=yo;try{return Tr(e,n,o)}finally{H.H=a}},useRef:function(){return z="useRef",d(),q(),nt().memoizedState},useState:function(){z="useState",d(),q();var e=H.H;H.H=yo;try{return Tr(co)}finally{H.H=e}},useDebugValue:function(){z="useDebugValue",d(),q()},useDeferredValue:function(e,n){return z="useDeferredValue",d(),q(),ow(e,n)},useTransition:function(){return z="useTransition",d(),q(),cw()},useSyncExternalStore:function(e,n,o){return z="useSyncExternalStore",d(),q(),ed(e,n,o)},useId:function(){return z="useId",d(),q(),nt().memoizedState},useFormState:function(e){return z="useFormState",d(),q(),td(e)},useActionState:function(e){return z="useActionState",d(),q(),td(e)},useOptimistic:function(e,n){return z="useOptimistic",d(),q(),GS(e,n)},useMemoCache:function(e){return d(),Aa(e)},useHostTransitionStatus:Ea,useCacheRefresh:function(){return z="useCacheRefresh",q(),nt().memoizedState},useEffectEvent:function(e){return z="useEffectEvent",d(),q(),od(e)}},cp={readContext:function(e){return m(),xt(e)},use:function(e){return d(),ws(e)},useCallback:function(e,n){return z="useCallback",d(),q(),sd(e,n)},useContext:function(e){return z="useContext",d(),q(),xt(e)},useEffect:function(e,n){z="useEffect",d(),q(),ti(2048,Pn,e,n)},useImperativeHandle:function(e,n,o){return z="useImperativeHandle",d(),q(),ld(e,n,o)},useInsertionEffect:function(e,n){return z="useInsertionEffect",d(),q(),ti(4,$n,e,n)},useLayoutEffect:function(e,n){return z="useLayoutEffect",d(),q(),ti(4,Ai,e,n)},useMemo:function(e,n){z="useMemo",d(),q();var o=H.H;H.H=yo;try{return ad(e,n)}finally{H.H=o}},useReducer:function(e,n,o){z="useReducer",d(),q();var a=H.H;H.H=yo;try{return kc(e,n,o)}finally{H.H=a}},useRef:function(){return z="useRef",d(),q(),nt().memoizedState},useState:function(){z="useState",d(),q();var e=H.H;H.H=yo;try{return kc(co)}finally{H.H=e}},useDebugValue:function(){z="useDebugValue",d(),q()},useDeferredValue:function(e,n){return z="useDeferredValue",d(),q(),lw(e,n)},useTransition:function(){return z="useTransition",d(),q(),fw()},useSyncExternalStore:function(e,n,o){return z="useSyncExternalStore",d(),q(),ed(e,n,o)},useId:function(){return z="useId",d(),q(),nt().memoizedState},useFormState:function(e){return z="useFormState",d(),q(),nd(e)},useActionState:function(e){return z="useActionState",d(),q(),nd(e)},useOptimistic:function(e,n){return z="useOptimistic",d(),q(),FS(e,n)},useMemoCache:function(e){return d(),Aa(e)},useHostTransitionStatus:Ea,useCacheRefresh:function(){return z="useCacheRefresh",q(),nt().memoizedState},useEffectEvent:function(e){return z="useEffectEvent",d(),q(),od(e)}};var tA={},nA=new Set,iA=new Set,oA=new Set,lA=new Set,sA=new Set,aA=new Set,rA=new Set,uA=new Set,cA=new Set,fA=new Set;Object.freeze(tA);var Py={enqueueSetState:function(e,n,o){e=e._reactInternals;var a=bi(e),u=ys(a);u.payload=n,o!==void 0&&o!==null&&(Wg(o),u.callback=o),n=bs(e,u,a),n!==null&&(Vo(a,"this.setState()",e),zt(n,e,a),vc(n,e,a))},enqueueReplaceState:function(e,n,o){e=e._reactInternals;var a=bi(e),u=ys(a);u.tag=QC,u.payload=n,o!==void 0&&o!==null&&(Wg(o),u.callback=o),n=bs(e,u,a),n!==null&&(Vo(a,"this.replaceState()",e),zt(n,e,a),vc(n,e,a))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var o=bi(e),a=ys(o);a.tag=GC,n!==void 0&&n!==null&&(Wg(n),a.callback=n),n=bs(e,a,o),n!==null&&(Vo(o,"this.forceUpdate()",e),zt(n,e,o),vc(n,e,o))}},cu=null,Yy=null,Xy=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,hA={},dA={},pA={},mA={},fu=!1,gA={},fp={},Qy={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},yA=!1,bA=null;bA=new Set;var Yl=!1,Kt=!1,Gy=!1,vA=typeof WeakSet==="function"?WeakSet:Set,gn=null,hu=null,du=null,en=null,oi=!1,bo=null,an=!1,Sf=8192,gz={getCacheForType:function(e){var n=xt(Wt),o=n.data.get(e);return o===void 0&&(o=e(),n.data.set(e,o)),o},cacheSignal:function(){return xt(Wt).controller.signal},getOwner:function(){return wi}};if(typeof Symbol==="function"&&Symbol.for){var wf=Symbol.for;wf("selector.component"),wf("selector.has_pseudo_class"),wf("selector.role"),wf("selector.test_id"),wf("selector.text")}var yz=[],bz=typeof WeakMap==="function"?WeakMap:Map,yn=0,rn=2,Ti=4,Xl=0,xf=1,$a=2,hp=3,Vs=4,dp=6,SA=5,Ie=yn,ct=null,Ae=null,Ce=0,li=0,pp=1,Pa=2,kf=3,wA=4,Wy=5,Cf=6,mp=7,Fy=8,Ya=9,it=li,Ei=null,js=!1,pu=!1,Jy=!1,cl=0,Ot=Xl,Is=0,$s=0,Zy=0,si=0,Xa=0,Af=null,Yn=null,gp=!1,yp=0,xA=0,kA=300,bp=1/0,CA=500,Tf=null,Vt=null,Ps=null,vp=0,Ky=1,eb=2,AA=3,Ys=0,TA=1,EA=2,MA=3,DA=4,Sp=5,tn=0,Xs=null,mu=null,vo=0,tb=0,nb=-0,ib=null,OA=null,RA=null,So=vp,LA=null,vz=50,Ef=0,ob=null,lb=!1,wp=!1,Sz=50,Qa=0,Mf=null,gu=!1,xp=null,BA=!1,zA=new Set,wz={},kp=null,yu=null,sb=!1,ab=!1,Cp=!1,rb=!1,Qs=0,ub={};(function(){for(var e=0;e<Sy.length;e++){var n=Sy[e],o=n.toLowerCase();n=n[0].toUpperCase()+n.slice(1),uo(o,"on"+n)}uo(cC,"onAnimationEnd"),uo(fC,"onAnimationIteration"),uo(hC,"onAnimationStart"),uo("dblclick","onDoubleClick"),uo("focusin","onFocus"),uo("focusout","onBlur"),uo(JB,"onTransitionRun"),uo(ZB,"onTransitionStart"),uo(KB,"onTransitionCancel"),uo(dC,"onTransitionEnd")})(),wl("onMouseEnter",["mouseout","mouseover"]),wl("onMouseLeave",["mouseout","mouseover"]),wl("onPointerEnter",["pointerout","pointerover"]),wl("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 Df="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(" "),cb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Df)),Ap="_reactListening"+Math.random().toString(36).slice(2),HA=!1,NA=!1,Tp=!1,_A=!1,Ep=!1,Mp=!1,UA=!1,Dp={},xz=/\r\n?/g,kz=/\u0000|\uFFFD/g,Ga="http://www.w3.org/1999/xlink",fb="http://www.w3.org/XML/1998/namespace",Cz="javascript:throw new Error('React form unexpectedly submitted.')",Az="suppressHydrationWarning",Wa="&",Op="/&",Of="$",Rf="/$",Gs="$?",Fa="$~",bu="$!",Tz="html",Ez="body",Mz="head",hb="F!",qA="F",VA="loading",Dz="style",Ql=0,vu=1,Rp=2,db=null,pb=null,jA={dialog:!0,webview:!0},mb=null,Lf=void 0,IA=typeof setTimeout==="function"?setTimeout:void 0,Oz=typeof clearTimeout==="function"?clearTimeout:void 0,Ja=-1,$A=typeof Promise==="function"?Promise:void 0,Rz=typeof queueMicrotask==="function"?queueMicrotask:typeof $A<"u"?function(e){return $A.resolve(null).then(e).catch(mL)}:IA,gb=null,Za=0,Bf=1,PA=2,YA=3,Wi=4,Fi=new Map,XA=new Set,Gl=et.d;et.d={f:function(){var e=Gl.f(),n=Lr();return e||n},r:function(e){var n=Nn(e);n!==null&&n.tag===5&&n.type==="form"?uw(n):Gl.r(e)},D:function(e){Gl.D(e),nk("dns-prefetch",e,null)},C:function(e,n){Gl.C(e,n),nk("preconnect",e,n)},L:function(e,n,o){Gl.L(e,n,o);var a=Su;if(a&&e&&n){var u='link[rel="preload"][as="'+Kn(n)+'"]';n==="image"?o&&o.imageSrcSet?(u+='[imagesrcset="'+Kn(o.imageSrcSet)+'"]',typeof o.imageSizes==="string"&&(u+='[imagesizes="'+Kn(o.imageSizes)+'"]')):u+='[href="'+Kn(e)+'"]':u+='[href="'+Kn(e)+'"]';var f=u;switch(n){case"style":f=Hr(e);break;case"script":f=Nr(e)}Fi.has(f)||(e=Me({rel:"preload",href:n==="image"&&o&&o.imageSrcSet?void 0:e,as:n},o),Fi.set(f,e),a.querySelector(u)!==null||n==="style"&&a.querySelector(Uc(f))||n==="script"&&a.querySelector(qc(f))||(n=a.createElement("link"),kn(n,"link",e),Mt(n),a.head.appendChild(n)))}},m:function(e,n){Gl.m(e,n);var o=Su;if(o&&e){var a=n&&typeof n.as==="string"?n.as:"script",u='link[rel="modulepreload"][as="'+Kn(a)+'"][href="'+Kn(e)+'"]',f=u;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Nr(e)}if(!Fi.has(f)&&(e=Me({rel:"modulepreload",href:e},n),Fi.set(f,e),o.querySelector(u)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(qc(f)))return}a=o.createElement("link"),kn(a,"link",e),Mt(a),o.head.appendChild(a)}}},X:function(e,n){Gl.X(e,n);var o=Su;if(o&&e){var a=lo(o).hoistableScripts,u=Nr(e),f=a.get(u);f||(f=o.querySelector(qc(u)),f||(e=Me({src:e,async:!0},n),(n=Fi.get(u))&&q0(e,n),f=o.createElement("script"),Mt(f),kn(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=Su;if(a&&e){var u=lo(a).hoistableStyles,f=Hr(e);n=n||"default";var p=u.get(f);if(!p){var g={loading:Za,preload:null};if(p=a.querySelector(Uc(f)))g.loading=Bf|Wi;else{e=Me({rel:"stylesheet",href:e,"data-precedence":n},o),(o=Fi.get(f))&&U0(e,o);var v=p=a.createElement("link");Mt(v),kn(v,"link",e),v._p=new Promise(function(x,D){v.onload=x,v.onerror=D}),v.addEventListener("load",function(){g.loading|=Bf}),v.addEventListener("error",function(){g.loading|=PA}),g.loading|=Wi,Td(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=Su;if(o&&e){var a=lo(o).hoistableScripts,u=Nr(e),f=a.get(u);f||(f=o.querySelector(qc(u)),f||(e=Me({src:e,async:!0,type:"module"},n),(n=Fi.get(u))&&q0(e,n),f=o.createElement("script"),Mt(f),kn(f,"link",e),o.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},a.set(u,f))}}};var Su=typeof document>"u"?null:document,Lp=null,Lz=60000,Bz=800,zz=500,yb=0,bb=null,Bp=null,Ka=WL,zf={$$typeof:el,Provider:null,Consumer:null,_currentValue:Ka,_currentValue2:Ka,_threadCount:0},QA="%c%s%c",GA="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",WA="",zp=" ",Hz=Function.prototype.bind,FA=!1,JA=null,ZA=null,KA=null,e2=null,t2=null,n2=null,i2=null,o2=null,l2=null,s2=null;JA=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=On(e,2),o!==null&&zt(o,e,2))},ZA=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=On(e,2),o!==null&&zt(o,e,2))},KA=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=On(e,2),o!==null&&zt(o,e,2))},e2=function(e,n,o){e.pendingProps=i(e.memoizedProps,n,0,o),e.alternate&&(e.alternate.pendingProps=e.pendingProps),n=On(e,2),n!==null&&zt(n,e,2)},t2=function(e,n){e.pendingProps=r(e.memoizedProps,n,0),e.alternate&&(e.alternate.pendingProps=e.pendingProps),n=On(e,2),n!==null&&zt(n,e,2)},n2=function(e,n,o){e.pendingProps=l(e.memoizedProps,n,o),e.alternate&&(e.alternate.pendingProps=e.pendingProps),n=On(e,2),n!==null&&zt(n,e,2)},i2=function(e){var n=On(e,2);n!==null&&zt(n,e,2)},o2=function(e){var n=yl(),o=On(e,n);o!==null&&zt(o,e,n)},l2=function(e){h=e},s2=function(e){c=e};var Hp=!0,Np=null,vb=!1,Ws=null,Fs=null,Js=null,Hf=new Map,Nf=new Map,Zs=[],Nz="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(" "),_p=null;if(Rd.prototype.render=Y0.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=bi(a);V0(a,u,o,n,null,null)},Rd.prototype.unmount=Y0.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&(rn|Ti))!==yn&&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."),V0(e.current,2,null,e,null,null),Lr(),n[Ms]=null}},Rd.prototype.unstable_scheduleHydration=function(e){if(e){var n=yr();e={blockedOn:null,target:e,priority:n};for(var o=0;o<Zs.length&&n!==0&&n<Zs[o].priority;o++);Zs.splice(o,0,e),o===0&&gk(e)}},function(){var e=wu.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"),
|
|
211
|
-
You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:""),"font-weight:bold")}
|
|
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"),et.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=be(n),e=e!==null?ot(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=JA,e.overrideHookStateDeletePath=ZA,e.overrideHookStateRenamePath=KA,e.overrideProps=e2,e.overridePropsDeletePath=t2,e.overridePropsRenamePath=n2,e.scheduleUpdate=i2,e.scheduleRetry=o2,e.setErrorHandler=l2,e.setSuspenseHandler=s2,e.scheduleRefresh=E,e.scheduleRoot=k,e.setRefreshHandler=R,e.getCurrentFiber=jL,ml(e)}()&&ll&&window.top===window.self&&(-1<navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Edge")===-1||-1<navigator.userAgent.indexOf("Firefox"))){var a2=window.location.protocol;/^(https?|file):$/.test(a2)&&console.info("%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools"+(a2==="file:"?`
|
|
211
|
+
You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:""),"font-weight:bold")}Vz.createRoot=function(e,n){if(!L(e))throw Error("Target container is not a DOM element.");Sk(e);var o=!1,a="",u=yw,f=bw,p=vw;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===Ko&&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=
|
|
215
|
-
`||l==="\t"||!/[\p{Cc}\p{Cf}]/u.test(l))),
|
|
216
|
-
`){[t,i]=
|
|
217
|
-
`){[t,i]=
|
|
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=
|
|
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)&&
|
|
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=
|
|
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=uk(e,1,!1,null,null,o,a,null,u,f,p,vk),e[Ms]=n.current,T0(e),new Y0(n)},Vz.hydrateRoot=function(e,n,o){if(!L(e))throw Error("Target container is not a DOM element.");Sk(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=yw,p=bw,g=vw,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=uk(e,1,!0,n,o!=null?o:null,a,u,v,f,p,g,vk),n.context=ck(null),o=n.current,a=bi(o),a=Hi(a),u=ys(a),u.callback=null,bs(o,u,a),Vo(a,"hydrateRoot()",null),o=a,n.current.lanes=o,zi(n,o),Jo(n),e[Ms]=n.current,T0(e),new Rd(n)},Vz.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var f2=Sb(function(XN,c2){var jz=tt(u2());c2.exports=jz});var oR=tt(f2(),1);var Iz=Object.getPrototypeOf;function h2(t){if(t===null||typeof t!=="object"||Array.isArray(t))return!1;let i=Iz(t);return i===Object.prototype||i===null}var oe=tt(Fl(),1);var d2=(t)=>tr.string().trim().min(1).max(t).refine((i)=>!/[\p{Cc}\p{Cf}]/u.test(i)),$z=(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))),Pz=tr.strictObject({version:tr.literal(2),entityType:tr.literal("note"),title:d2(160),body:$z(1000).optional(),backlink:d2(500).regex(/^entity:\/\/[^/]+\/.+$/)}),xb=tr.looseObject({studioCreatePrefill:Pz});function p2(t,i,l){return xb.parse({studioCreatePrefill:{version:2,entityType:"note",title:t,...l?{body:l}:{},backlink:i}})}var Yz={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 kb(t){return`${t} ${le(Yz.surface,Up.inset,wo.operatorRoles).className??""}`}var qp=tt(Fl(),1);var Jl={editor:{kumcoG:"x1mkdm3x",k9llMU:"xxq7klm",k6KnKl:"x8ef1wo",k1JLwA:"x4jmfmw",k9pwkU:"x1y6iwit",$$css:!0},content:{kBCFzs:"x1osaytk",kbNqZ1:"x7sv70a",k7Eaqz:"xeuugli",kAzted:"x2lwn1j",kORKVm:"x1odjw0f",k3Woio:"x16dl9wz",kiEn40:"x1bqaal",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kWkggS:"x18s3upu",$$css:!0},properties:{kmuXW:"x2lah0s",kORKVm:"xryxfnj",kWqL5O:"xgfja2r",kWkggS:"x18s3upu",kmVPX3:"x11wck8f",kubnTK:"x1crvqbx",kOLLwu:"x1inw03p",kRugJJ:"x1h32jcg",$$css:!0},manuscript:{kUk6DE:"x1mg3qzt",kAzted:"x5mc7k8",kVQacm:"xb3r6kr",kKq9zD:"x9uj0fw",krFdGn:"x19d57q8",kTWfjk:"x1f8pdon",$$css:!0},disclosure:{kmuXW:"x2lah0s",k7Eaqz:"xeuugli",kogj98:"x1vmk1f4",kaIpWk:"x12oqio5",kKwWVI:"x1hyyza1",$$css:!0},summary:{kkrTdU:"x1ypdohk",kmVPX3:"x1j671cp",kGuDYH:"xif65rj",k63SB2:"x19s9jnd",k3Woio:"x16dl9wz",kiEn40:"x7s97pk",$$css:!0}};var Zl=tt(bn(),1);function m2(t){t.querySelector("details[data-studio-properties]")?.setAttribute("open","")}function g2({presentation:t,children:i}){return t==="split"?Zl.jsxDEV(Zl.Fragment,{children:i},void 0,!1,void 0,this):Zl.jsxDEV("div",{"data-studio-editor-content":"",role:"region","aria-label":"Record contents",tabIndex:0,...le(Jl.content),children:i},void 0,!1,void 0,this)}function y2({presentation:t,reveal:i,children:l}){let s=qp.useRef(null);if(qp.useEffect(()=>{if(i&&s.current)s.current.open=!0},[i]),t==="document")return Zl.jsxDEV("details",{ref:s,"data-studio-properties":"",...le(Jl.disclosure),children:[Zl.jsxDEV("summary",{...le(Jl.summary),children:"Properties"},void 0,!1,void 0,this),Zl.jsxDEV("div",{...le(Jl.properties),children:l},void 0,!1,void 0,this)]},void 0,!0,void 0,this);return Zl.jsxDEV("aside",{"data-studio-properties":"",...le(ai.colophon,t==="form"&&ai.fullWidthProperties,t==="form"&&Jl.properties),children:l},void 0,!1,void 0,this)}var Cb=tt(Fl(),1);function Xz(t){return Cb.createElement(b2,{...t,children:Cb.createElement("div",le(Tn.readable),t.children)})}var Ab={engine:"app",density:"comfortable",Button:We,Input:Vp,Select:Ks,ConfirmDialog:Ji,Disclosure:Xz,Tabs:v2};var vt={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},inlineModes:{k1xSpc:"x13v5x0x",$$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 Eb=[],k2=[];(()=>{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?k2:Eb).push(l=l+t[i])})();function Qz(t){if(t<768)return!1;for(let i=0,l=Eb.length;;){let s=i+l>>1;if(t<Eb[s])l=s;else if(t>=k2[s])i=s+1;else return!0;if(i==l)return!1}}function S2(t){return t>=127462&&t<=127487}var w2=8205;function C2(t,i,l=!0,s=!0){return(l?A2:Gz)(t,i,s)}function A2(t,i,l){if(i==t.length)return i;if(i&&T2(t.charCodeAt(i))&&E2(t.charCodeAt(i-1)))i--;let s=Tb(t,i);i+=x2(s);while(i<t.length){let r=Tb(t,i);if(s==w2||r==w2||l&&Qz(r))i+=x2(r),s=r;else if(S2(r)){let c=0,h=i-2;while(h>=0&&S2(Tb(t,h)))c++,h-=2;if(c%2==0)break;else i+=2}else break}return i}function Gz(t,i,l){while(i>1){let s=A2(t,i-2,l);if(s<i)return s;i--}return 0}function Tb(t,i){let l=t.charCodeAt(i);if(!E2(l)||i+1==t.length)return l;let s=t.charCodeAt(i+1);if(!T2(s))return l;return(l-55296<<10)+(s-56320)+65536}function T2(t){return t>=56320&&t<57344}function E2(t){return t>=55296&&t<56320}function x2(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]=Tu(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),fl.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]=Tu(this,t,i);let l=[];return this.decompose(t,i,l,0),fl.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 Cu(this),r=new Cu(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 Cu(this,t)}iterRange(t,i=this.length){return new Ub(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 qb(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):fl.from(Yt.split(t,[]))}}class Yt extends Ye{constructor(t,i=Wz(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 B2(s,h,l,c);s=h+1,l++}}decompose(t,i,l,s){let r=t<=0&&i>=this.length?this:new Yt(M2(this.text,t,i),Math.min(i,this.length)-Math.max(0,t));if(s&1){let c=l.pop(),h=Pp(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]=Tu(this,t,i);let s=Pp(this.text,Pp(l.text,M2(this.text,0,t)),i),r=this.length+l.length-(i-t);if(s.length<=32)return new Yt(s,r);return fl.from(Yt.split(s,[]),r)}sliceString(t,i=this.length,l=`
|
|
216
|
+
`){[t,i]=Tu(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 fl 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]=Tu(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 fl(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]=Tu(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 fl))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 fl)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]:fl.from(y,m)),m=-1,d=y.length=0}for(let w of t)b(w);return S(),h.length==1?h[0]:new fl(h,i)}}Ye.empty=new Yt([""],0);function Wz(t){let i=-1;for(let l of t)i+=l.length+1;return i}function Pp(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 M2(t,i,l){return Pp(t,[""],i,l)}class Cu{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 Ub{constructor(t,i,l){this.value="",this.done=!1,this.cursor=new Cu(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 qb{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()},Cu.prototype[Symbol.iterator]=Ub.prototype[Symbol.iterator]=qb.prototype[Symbol.iterator]=function(){return this};class B2{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 Tu(t,i,l){return i=Math.max(0,Math.min(t.length,i)),[i,Math.max(i,Math.min(t.length,l))]}function Zi(t,i,l=!0,s=!0){return C2(t,i,l,s)}function Fz(t){return t>=56320&&t<57344}function Jz(t){return t>=55296&&t<56320}function Vb(t,i){let l=t.charCodeAt(i);if(!Jz(l)||i+1==t.length)return l;let s=t.charCodeAt(i+1);if(!Fz(s))return l;return(l-55296<<10)+(s-56320)+65536}function jb(t){return t<65536?1:2}var Db=/\r\n?|\n/,En=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(En||(En={}));class Kl{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){Ob(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 Kl(t)}composeDesc(t){return this.empty?t:t.empty?this:z2(this,t)}mapDesc(t,i=!1){return t.empty?this:Rb(this,t,i)}mapPos(t,i=-1,l=En.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!=En.Simple&&m>=t&&(l==En.TrackDel&&s<t&&m>t||l==En.TrackBefore&&s<t||l==En.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 Kl(t)}static create(t){return new Kl(t)}}class un extends Kl{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 Ob(this,(i,l,s,r,c)=>t=t.replace(s,s+(l-i),c),!1),t}mapDesc(t,i=!1){return Rb(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 un(i,l)}compose(t){return this.empty?t:t.empty?this:z2(this,t,!0)}map(t,i=!1){return t.empty?this:Rb(this,t,i,!0)}iterChanges(t,i=!1){Ob(this,t,i)}get desc(){return Kl.create(this.sections)}filter(t){let i=[],l=[],s=[],r=new Eu(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);Bn(s,y,-1);let b=r.ins==-1?-1:r.off==0?r.ins:0;if(Bn(i,y,b),b>0)ta(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);Bn(i,y,-1),Bn(s,y,r.ins==-1?-1:r.off==0?r.ins:0),r.forward(y),h+=y}}return{changes:new un(i,l),filtered:Kl.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)Bn(s,i-c,-1);let b=new un(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 un){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||Db)):w,E=k.length;if(b==S&&E==0)return;if(b<c)d();if(b>c)Bn(s,b-c,-1);Bn(s,S-b,E),ta(r,s,k),c=S}}return m(t),d(!h),h}static empty(t){return new un(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 un(i,l)}static createSet(t,i){return new un(t,i)}}function Bn(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 ta(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 Ob(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 Rb(t,i,l,s=!1){let r=[],c=s?[]:null,h=new Eu(t),d=new Eu(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);Bn(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;Bn(r,d.ins,-1);while(y){let b=Math.min(h.len,y);if(h.ins>=0&&m<h.i&&h.len<=b){if(Bn(r,0,h.ins),c)ta(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(Bn(r,y,m<h.i?h.ins:0),c&&m<h.i)ta(c,r,h.text);m=h.i,h.forward(h.len-b)}else if(h.done&&d.done)return c?un.createSet(r,c):Kl.create(r);else throw Error("Mismatched change set lengths")}function z2(t,i,l=!1){let s=[],r=l?[]:null,c=new Eu(t),h=new Eu(i);for(let d=!1;;)if(c.done&&h.done)return r?un.createSet(s,r):Kl.create(s);else if(c.ins==0)Bn(s,c.len,0,d),c.next();else if(h.len==0&&!h.done){if(Bn(s,0,h.ins,d),r)ta(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(Bn(s,m,b,d),r&&b)ta(r,s,h.text)}else if(h.ins==-1){if(Bn(s,c.off?0:c.len,m,d),r)ta(r,s,c.textBit(m))}else if(Bn(s,c.off?0:c.len,h.off?0:h.ins,d),r&&!h.off)ta(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 Eu{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 ea{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 ea(l,s,this.flags,this.goalColumn)}extend(t,i=t,l=0){if(t<=this.anchor&&i>=this.anchor)return W.range(t,i,void 0,void 0,l);let s=Math.abs(t-this.anchor)>Math.abs(i-this.anchor)?t:i;return W.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 W.range(t.anchor,t.head)}static create(t,i,l,s){return new ea(t,i,l,s)}}class W{constructor(t,i){this.ranges=t,this.mainIndex=i}map(t,i=-1){if(t.empty)return this;return W.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 W([this.main],0)}addRange(t,i=!0){return W.create([t].concat(this.ranges),i?0:this.mainIndex+1)}replaceRange(t,i=this.mainIndex){let l=this.ranges.slice();return l[i]=t,W.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 W(t.ranges.map((i)=>ea.fromJSON(i)),t.main)}static single(t,i=t){return new W([W.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 W.normalized(t.slice(),i);l=r.to}return new W(t,i)}static cursor(t,i=0,l,s){return ea.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?ea.create(i,t,c|32,l):ea.create(t,i,c,l)}static undirectionalRange(t,i){return ea.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?W.range(d,h):W.range(h,d))}}return new W(t,i)}}function H2(t,i){for(let l of t.ranges)if(l.to>i)throw RangeError("Selection points outside of document")}var Ib=0;class he{constructor(t,i,l,s,r){this.combine=t,this.compareInput=i,this.compare=l,this.isStatic=s,this.id=Ib++,this.default=t([]),this.extensions=typeof r=="function"?r(this):r}get reader(){return this}static define(t={}){return new he(t.combine||((i)=>i),t.compareInput||((i,l)=>i===l),t.compare||(!t.combine?$b:(i,l)=>i===l),!!t.static,t.enables)}of(t){return new Uf([],this,0,t)}compute(t,i){if(this.isStatic)throw Error("Can't compute a static facet");return new Uf(t,this,1,i)}computeN(t,i){if(this.isStatic)throw Error("Can't compute a static facet");return new Uf(t,this,2,i)}from(t,i){if(!i)i=(l)=>l;return this.compute([t],(l)=>i(l.field(t)))}}function $b(t,i){return t==i||t.length==i.length&&t.every((l,s)=>l===i[s])}class Uf{constructor(t,i,l,s){this.dependencies=t,this.facet=i,this.type=l,this.value=s,this.id=Ib++}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)||Lb(b,y)){let w=l(b);if(h?!D2(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=Qp(S,k);if(this.dependencies.every((R)=>R instanceof he?S.facet(R)===b.facet(R):R instanceof Co?S.field(R,!1)==b.field(R,!1):!0)||(h?D2(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 D2(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 Lb(t,i){let l=!1;for(let s of i)if(qf(t,s)&1)l=!0;return l}function Zz(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=Qp(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)qf(m,y);return m.values[h]=d(m),1},update(m,y){if(!Lb(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=Lb(m,s),S=y.config.facets[i.id],w=y.facet(i);if(S&&!b&&$b(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 jp=he.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(Ib++,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(jp).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(jp),c=s.facet(jp),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,jp.of({field:this,create:t})]}get extension(){return this}}var nr={lowest:4,low:3,default:2,high:1,highest:0};function _f(t){return(i)=>new Pb(i,t)}var es={highest:_f(nr.highest),high:_f(nr.high),default:_f(nr.default),low:_f(nr.low),lowest:_f(nr.lowest)};class Pb{constructor(t,i){this.inner=t,this.prec=i}get extension(){return this}}class Mu{of(t){return new Yp(this,t)}reconfigure(t){return Mu.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class Yp{constructor(t,i){this.compartment=t,this.inner=i}get extension(){return this}}class Xp{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 Kz(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,$b(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)=>Zz(R,k,w))}}let b=m.map((S)=>S(h));return new Xp(t,c,b,h,d,r)}}function Kz(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 Yp)l.delete(h.compartment)}if(r.set(h,d),Array.isArray(h))for(let y of h)c(y,d);else if(h instanceof Yp){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 Pb)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 Uf){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 qf(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 Qp(t,i){return i&1?t.config.staticValues[i>>1]:t.values[i>>1]}var N2=he.define(),Bb=he.define({combine:(t)=>t.some((i)=>i),static:!0}),_2=he.define({combine:(t)=>t.length?t[0]:void 0,static:!0}),U2=he.define(),q2=he.define(),V2=he.define(),j2=he.define({combine:(t)=>t.length?t[0]:!1});class Ki{constructor(t,i){this.type=t,this.value=i}static define(){return new I2}}class I2{of(t){return new Ki(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 cn{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)H2(l,i.newLength);if(!r.some((h)=>h.type==cn.time))this.annotations=r.concat(cn.time.of(Date.now()))}static create(t,i,l,s,r,c){return new cn(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(cn.userEvent);return!!(i&&(i==t||i.length>t.length&&i.slice(0,t.length)==t&&i[t.length]=="."))}}cn.time=Ki.define();cn.userEvent=Ki.define();cn.addToHistory=Ki.define();cn.remote=Ki.define();function e3(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 P2(t,i,l){var s;let r,c,h;if(l)r=i.changes,c=un.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 zb(t,i,l){let s=i.selection,r=Au(i.annotations);if(i.userEvent)r=r.concat(cn.userEvent.of(i.userEvent));return{changes:i.changes instanceof un?i.changes:un.of(i.changes||[],l,t.facet(_2)),selection:s&&(s instanceof W?s:W.single(s.anchor,s.head)),effects:Au(i.effects),annotations:r,scrollIntoView:!!i.scrollIntoView}}function Y2(t,i,l){let s=zb(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=P2(s,zb(t,i[c],h?s.changes.newLength:t.doc.length),h)}let r=cn.create(t,s.changes,s.selection,s.effects,s.annotations,s.scrollIntoView);return n3(l?t3(r):r)}function t3(t){let i=t.startState,l=!0;for(let r of i.facet(U2)){let c=r(t);if(c===!1){l=!1;break}if(Array.isArray(c))l=l===!0?c:e3(l,c)}if(l!==!0){let r,c;if(l===!1)c=t.changes.invertedDesc,r=un.empty(i.doc.length);else{let h=t.changes.filter(l);r=h.changes,c=h.filtered.mapDesc(h.changes).invertedDesc}t=cn.create(i,r,t.selection&&t.selection.map(c),Ct.mapEffects(t.effects,c),t.annotations,t.scrollIntoView)}let s=i.facet(q2);for(let r=s.length-1;r>=0;r--){let c=s[r](t);if(c instanceof cn)t=c;else if(Array.isArray(c)&&c.length==1&&c[0]instanceof cn)t=c[0];else t=Y2(i,Au(c),!1)}return t}function n3(t){let i=t.startState,l=i.facet(V2),s=t;for(let r=l.length-1;r>=0;r--){let c=l[r](t);if(c&&Object.keys(c).length)s=P2(s,zb(i,c,t.changes.newLength),!0)}return s==t?t:cn.create(i,t.changes,t.selection,s.effects,s.annotations,s.scrollIntoView)}var i3=[];function Au(t){return t==null?i3: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={})),o3=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Hb;try{Hb=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(t){}function l3(t){if(Hb)return Hb.test(t);for(let i=0;i<t.length;i++){let l=t[i];if(/\w/.test(l)||l>""&&(l.toUpperCase()!=l.toLowerCase()||o3.test(l)))return!0}return!1}function s3(t){return(i)=>{if(!/\S/.test(i))return xo.Space;if(l3(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 Ve{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++)qf(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 qf(this,l),Qp(this,l)}update(...t){return Y2(this,t,!0)}applyTransaction(t){let i=this.config,{base:l,compartments:s}=i;for(let h of t.effects)if(h.is(Mu.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=Au(l).concat(h.value);let r;if(!i)i=Xp.resolve(l,s,this),r=new Ve(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(Bb)?t.newSelection:t.newSelection.asSingle();new Ve(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:W.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=Au(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(Au(d.effects),b))}return{changes:s,selection:W.create(r,i.mainIndex),effects:c}}changes(t=[]){if(t instanceof un)return t;return un.of(t,this.doc.length,this.facet(Ve.lineSeparator))}toText(t){return Ye.of(t.split(this.facet(Ve.lineSeparator)||Db))}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 qf(this,i),Qp(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 Ve.create({doc:t.doc,selection:W.fromJSON(t.selection),extensions:i.extensions?s.concat([i.extensions]):s})}static create(t={}){let i=Xp.resolve(t.extensions||[],new Map),l=t.doc instanceof Ye?t.doc:Ye.of((t.doc||"").split(i.staticFacet(Ve.lineSeparator)||Db)),s=!t.selection?W.single(0):t.selection instanceof W?t.selection:W.single(t.selection.anchor,t.selection.head);if(H2(s,l.length),!i.staticFacet(Bb))s=s.asSingle();return new Ve(i,l,s,i.dynamicSlots.map(()=>null),(r,c)=>c.create(r),null)}get tabSize(){return this.facet(Ve.tabSize)}get lineBreak(){return this.facet(Ve.lineSeparator)||`
|
|
219
|
+
`}get readOnly(){return this.facet(j2)}phrase(t,...i){for(let l of this.facet(Ve.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(N2))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 s3(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=Zi(i,c,!1);if(r(i.slice(d,c))!=xo.Word)break;c=d}while(h<s){let d=Zi(i,h);if(r(i.slice(h,d))!=xo.Word)break;h=d}return c==h?null:W.range(c+l,h+l)}}Ve.allowMultipleSelections=Bb;Ve.tabSize=he.define({combine:(t)=>t.length?t[0]:4});Ve.lineSeparator=_2;Ve.readOnly=j2;Ve.phrases=he.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])}});Ve.languageData=N2;Ve.changeFilter=U2;Ve.transactionFilter=q2;Ve.transactionExtender=V2;Mu.reconfigure=Ct.define();class ko{eq(t){return this==t}range(t,i=t){return Vf.create(t,i,this)}}ko.prototype.startSide=ko.prototype.endSide=0;ko.prototype.point=!1;ko.prototype.mapMode=En.TrackDel;function Yb(t,i){return t==i||t.constructor==i.constructor&&t.eq(i)}class Vf{constructor(t,i,l){this.from=t,this.to=i,this.value=l}static create(t,i,l){return new Vf(t,i,l)}}function Nb(t,i){return t.from-i.from||t.value.startSide-i.value.startSide}class Xb{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 Xb(s,r,l,h):null,pos:c}}}class Fe{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 Fe(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(Nb);if(this.isEmpty)return i.length?Fe.of(i):this;let h=new Qb(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(Vf.create(h.from,h.to,h.value))}h.next()}return y.finishInner(this.nextLayer.isEmpty&&!m.length?Fe.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 Fe(l,i,r||Fe.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 jf.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,i=0){return jf.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=O2(c,h,l),m=new ku(c,d,r),y=new ku(h,d,r);if(l.iterGaps((b,S,w)=>R2(m,b,y,S,w,s)),l.empty&&l.length==0)R2(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=O2(r,c),d=new ku(r,h,0).goto(l),m=new ku(c,h,0).goto(l);for(;;){if(d.to!=m.to||!_b(d.active,m.active)||d.point&&(!m.point||!Yb(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 ku(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 Vf?[t]:i?a3(t):t)l.add(s.from,s.to,s.value);return l.finish()}static join(t){if(!t.length)return Fe.empty;let i=t[t.length-1];for(let l=t.length-2;l>=0;l--)for(let s=t[l];s!=Fe.empty;s=s.nextLayer)i=new Fe(s.chunkPos,s.chunk,i,Math.max(s.maxPoint,i.maxPoint));return i}}Fe.empty=new Fe([],[],null,-1);function a3(t){if(t.length>1)for(let i=t[0],l=1;l<t.length;l++){let s=t[l];if(Nb(i,s)>0)return t.slice().sort(Nb);i=s}return t}Fe.empty.nextLayer=Fe.empty;class ir{finishChunk(t){if(this.chunks.push(new Xb(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(Fe.empty)}finishInner(t){if(this.from.length)this.finishChunk(!1);if(this.chunks.length==0)return t;let i=Fe.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,i}}function O2(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 Qb{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 jf{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 Qb(c,i,l,r));return s.length==1?s[0]:new jf(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--)Mb(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--)Mb(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();Mb(this.heap,0)}}}function Mb(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 ku{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=jf.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){Ip(this.active,t),Ip(this.activeTo,t),Ip(this.activeRank,t),this.minActive=L2(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($p(this.active,i,l),$p(this.activeTo,i,s),$p(this.activeRank,i,r),t)$p(t,i,this.cursor.from);this.minActive=L2(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)Ip(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 R2(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&&Yb(t.point,l.point)&&_b(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&&!_b(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 _b(t,i){if(t.length!=i.length)return!1;for(let l=0;l<t.length;l++)if(t[l]!=i[l]&&!Yb(t[l],i[l]))return!1;return!0}function Ip(t,i){for(let l=i,s=t.length-1;l<s;l++)t[l]=t[l+1];t.pop()}function $p(t,i,l){for(let s=t.length-1;s>=i;s--)t[s+1]=t[s];t[i]=l}function L2(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 na(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=Zi(t,r);return s}function X2(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=Zi(t,r)}return s===!0?-1:t.length}var Q2=typeof Symbol>"u"?"__"+"ͼ":Symbol.for("ͼ"),Gb=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),G2=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=G2[Q2]||1;return G2[Q2]=t+1,"ͼ"+t.toString(36)}static mount(t,i,l){let s=t[Gb],r=l&&l.nonce;if(!s)s=new F2(t,r);else if(r)s.setNonce(r);s.mount(Array.isArray(i)?i:[i],t)}}var W2=new Map;class F2{constructor(t,i){let l=t.ownerDocument||t,s=l.defaultView;if(!t.head&&t.adoptedStyleSheets&&s.CSSStyleSheet){let r=W2.get(l);if(r)return t[Gb]=r;this.sheet=new s.CSSStyleSheet,W2.set(l,this)}else if(this.styleTag=l.createElement("style"),i)this.styleTag.setAttribute("nonce",i);this.modules=[],t[Gb]=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 ts={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:"'"},Du={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},r3=typeof navigator<"u"&&/Mac/.test(navigator.platform),u3=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(Nt=0;Nt<10;Nt++)ts[48+Nt]=ts[96+Nt]=String(Nt);var Nt;for(Nt=1;Nt<=24;Nt++)ts[Nt+111]="F"+Nt;var Nt;for(Nt=65;Nt<=90;Nt++)ts[Nt]=String.fromCharCode(Nt+32),Du[Nt]=String.fromCharCode(Nt);var Nt;for(If in ts)if(!Du.hasOwnProperty(If))Du[If]=ts[If];var If;function J2(t){var i=r3&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||u3&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",l=!i&&t.key||(t.shiftKey?Du:ts)[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 Xn=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},ev=typeof document<"u"?document:{documentElement:{style:{}}},tv=/Edge\/(\d+)/.exec(Xn.userAgent),TT=/MSIE \d/.test(Xn.userAgent),nv=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Xn.userAgent),pm=!!(TT||nv||tv),Z2=!pm&&/gecko\/(\d+)/i.test(Xn.userAgent),Wb=!pm&&/Chrome\/(\d+)/.exec(Xn.userAgent),K2="webkitFontSmoothing"in ev.documentElement.style,iv=!pm&&/Apple Computer/.test(Xn.vendor),eT=iv&&(/Mobile\/\w+/.test(Xn.userAgent)||Xn.maxTouchPoints>2),Z={mac:eT||/Mac/.test(Xn.platform),windows:/Win/.test(Xn.platform),linux:/Linux|X11/.test(Xn.platform),ie:pm,ie_version:TT?ev.documentMode||6:nv?+nv[1]:tv?+tv[1]:0,gecko:Z2,gecko_version:Z2?+(/Firefox\/(\d+)/.exec(Xn.userAgent)||[0,0])[1]:0,chrome:!!Wb,chrome_version:Wb?+Wb[1]:0,ios:eT,android:/Android\b/.test(Xn.userAgent),webkit:K2,webkit_version:K2?+(/\bAppleWebKit\/(\d+)/.exec(Xn.userAgent)||[0,0])[1]:0,safari:iv,safari_version:iv?+(/\bVersion\/(\d+(\.\d+)?)/.exec(Xn.userAgent)||[0,0])[1]:0,tabSize:ev.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function vv(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 sm=Object.create(null);function Sv(t,i,l){if(t==i)return!0;if(!t)t=sm;if(!i)i=sm;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 c3(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 tT(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 f3(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 sa{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 no=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(no||(no={}));class wt 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 Kf(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}=ET(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 eh(t)}static set(t,i=!1){return Fe.of(t,i)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}wt.none=Fe.empty;class Kf extends wt{constructor(t){let{start:i,end:l}=ET(t);super(i?-1:500000000,l?1:-600000000,null,t);this.tagName=t.tagName||"span",this.attrs=t.class&&t.attributes?vv(t.attributes,{class:t.class}):t.class?{class:t.class}:t.attributes||sm}eq(t){return this==t||t instanceof Kf&&this.tagName==t.tagName&&Sv(this.attrs,t.attrs)}range(t,i=t){if(t>=i)throw RangeError("Mark decorations may not be empty");return super.range(t,i)}}Kf.prototype.point=!1;class eh extends wt{constructor(t){super(-200000000,-200000000,null,t)}eq(t){return t instanceof eh&&this.spec.class==t.spec.class&&Sv(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)}}eh.prototype.mapMode=En.TrackBefore;eh.prototype.point=!0;class sr extends wt{constructor(t,i,l,s,r,c){super(i,l,r,t);this.block=s,this.isReplace=c,this.mapMode=!s?En.TrackDel:i<=0?En.TrackBefore:En.TrackAfter}get type(){return this.startSide!=this.endSide?no.WidgetRange:this.startSide<=0?no.WidgetBefore:no.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof sr&&h3(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 ET(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 h3(t,i){return t==i||!!(t&&i&&t.compare(i))}function Lu(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 Wf extends ko{constructor(t,i,l){super();this.tagName=t,this.attributes=i,this.rank=l}eq(t){return t==this||t instanceof Wf&&this.tagName==t.tagName&&Sv(this.attributes,t.attributes)}static create(t){return new Wf(t.tagName,t.attributes||sm,t.rank==null?50:Math.max(0,Math.min(t.rank,100)))}static set(t,i=!1){return Fe.of(t,i)}}Wf.prototype.startSide=Wf.prototype.endSide=-1;function Ff(t){let i;if(t.nodeType==11)i=t.getSelection?t:t.ownerDocument;else i=t;return i.getSelection()}function ov(t,i){return i?t==i||t.contains(i.nodeType!=1?i.parentNode:i):!1}function Xf(t,i){if(!i.anchorNode)return!1;try{return ov(t,i.anchorNode)}catch(l){return!1}}function tm(t){if(t.nodeType==3)return Jf(t,0,t.nodeValue.length).getClientRects();else if(t.nodeType==1)return t.getClientRects();else return[]}function Qf(t,i,l,s){return l?nT(t,i,l,s,-1)||nT(t,i,l,s,1):!1}function oa(t){for(var i=0;;i++)if(t=t.previousSibling,!t)return i}function am(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function nT(t,i,l,s,r){for(;;){if(t==l&&i==s)return!0;if(i==(r<0?0:os(t))){if(t.nodeName=="DIV")return!1;let c=t.parentNode;if(!c||c.nodeType!=1)return!1;i=oa(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?os(t):0}else return!1}}function os(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function rm(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 d3(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 MT(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 p3(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=d3(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 V=b.getBoundingClientRect();({scaleX:E,scaleY:R}=MT(b,V)),w={left:V.left,right:V.left+b.clientWidth*E,top:V.top,bottom:V.top+b.clientHeight*R}}let L=0,_=0;if(r=="nearest"){if(i.top<w.top+h){if(_=i.top-(w.top+h),l>0&&i.bottom>w.bottom+_)_=i.bottom-w.bottom+h}else if(i.bottom>w.bottom-h){if(_=i.bottom-w.bottom+h,l<0&&i.top-_<w.top)_=i.top-(w.top+h)}}else{let V=i.bottom-i.top,j=w.bottom-w.top;_=(r=="center"&&V<=j?i.top+V/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||_)if(k)y.scrollBy(L,_);else{let V=0,j=0;if(_){let ee=b.scrollTop;b.scrollTop+=_/R,j=(b.scrollTop-ee)*R}if(L){let ee=b.scrollLeft;b.scrollLeft+=L/E,V=(b.scrollLeft-ee)*E}if(i={left:i.left-V,top:i.top-j,right:i.right-V,bottom:i.bottom-j},V&&Math.abs(V-L)<1)s="nearest";if(j&&Math.abs(j-_)<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 DT(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 OT{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?os(i):0),l,Math.min(t.focusOffset,l?os(l):0))}set(t,i,l,s){this.anchorNode=t,this.anchorOffset=i,this.focusNode=l,this.focusOffset=s}}var or=null;if(Z.safari&&Z.safari_version>=26)or=!1;function RT(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 iT;function Jf(t,i,l=i){let s=iT||(iT=document.createRange());return s.setEnd(t,l),s.setStart(t,i),s}function Bu(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 m3(t){while(t){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function g3(t,i){let{focusNode:l,focusOffset:s}=i;if(!l||i.anchorNode!=l||i.anchorOffset!=s)return!1;s=Math.min(s,os(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=os(l)}else if(l==t)return!0;else s=oa(l),l=l.parentNode}function LT(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 BT(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=os(l)}else if(l.parentNode&&!am(l))s=oa(l),l=l.parentNode;else return null}function zT(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&&!am(l))s=oa(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,oa(t),i)}static after(t,i){return new Mo(t.parentNode,oa(t)+1,i)}}var Xt=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(Xt||(Xt={})),ar=Xt.LTR,wv=Xt.RTL;function HT(t){let i=[];for(let l=0;l<t.length;l++)i.push(1<<+t[l]);return i}var y3=HT("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),b3=HT("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),lv=Object.create(null),hl=[];for(let t of["()","[]","{}"]){let i=t.charCodeAt(0),l=t.charCodeAt(1);lv[i]=l,lv[l]=-i}function NT(t){return t<=247?y3[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?b3[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}var v3=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Do{get dir(){return this.level%2?wv: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 _T(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||!_T(s.inner,r.inner))return!1}return!0}var pt=[];function S3(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=NT(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 w3(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=lv[w=t.charCodeAt(S)])if(k<0){for(let R=d-3;R>=0;R-=3)if(hl[R+1]==-k){let L=hl[R+2],_=L&2?r:!(L&4)?0:L&1?c:r;if(_)pt[S]=pt[hl[R]]=_;d=R;break}}else if(hl.length==189)break;else hl[d++]=S,hl[d++]=w,hl[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 _=hl[L+2];if(_&2)break;if(R)hl[L+2]|=2;else{if(_&4)break;hl[L+2]|=4}}}}}function x3(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 sv(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,_=y+1;;){if(L==l)break e;if(_<c.length&&c[_].from==L)L=c[_++].to;else if(pt[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==ar!=!(k%2);av(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)sv(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=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,_=y;;){if(L==i)break e;if(_&&c[_-1].to==L)L=c[--_].from;else if(pt[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==ar!=!(k%2);av(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)sv(t,E,m,s+1,r,w,h);else if(E<m)h.push(new Do(E,m,k));m=E}}function av(t,i,l,s,r,c,h){let d=i%2?2:1;S3(t,r,c,s,d),w3(t,r,c,s,d),x3(r,c,s,d),sv(t,r,c,i,l,s,h)}function k3(t,i,l){if(!t)return[new Do(0,0,i==wv?1:0)];if(i==ar&&!l.length&&!v3.test(t))return UT(t.length);if(l.length)while(t.length>pt.length)pt[pt.length]=256;let s=[],r=i==ar?0:1;return av(t,r,r,l,0,t.length,s),s}function UT(t){return[new Do(0,t,0)]}var qT="";function C3(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=Zi(t.text,h,m.forward(r,l));if(b<m.from||b>m.to)b=y;qT=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 W.cursor(S.side(!r,l)+t.from,S.forward(r,l)?1:-1,S.level);return W.cursor(b+t.from,m.forward(r,l)?-1:1,m.level)}function A3(t,i,l){for(let s=i;s<l;s++){let r=NT(t.charCodeAt(s));if(r==1)return ar;if(r==2||r==4)return wv}return ar}var VT=he.define(),jT=he.define(),IT=he.define(),$T=he.define(),rv=he.define(),PT=he.define(),YT=he.define(),xv=he.define(),kv=he.define(),XT=he.define({combine:(t)=>t.some((i)=>i)}),T3=he.define({combine:(t)=>t.some((i)=>i)}),QT=he.define();class zu{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 zu(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 zu(W.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}var Gp=Ct.define({map:(t,i)=>t.map(i)}),GT=Ct.define();function eo(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 ns=he.define({combine:(t)=>t.length?t[0]:!0}),E3=0,Ru=he.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 ls{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(Ru.of({plugin:this,arg:void 0}))}of(t){return this.baseExtensions.concat(Ru.of({plugin:this,arg:t}))}static define(t,i){let{eventHandlers:l,eventObservers:s,provide:r,decorations:c}=i||{};return new ls(E3++,t,l,s,(h)=>{let d=[];if(c)d.push(mm.of((m)=>{let y=m.plugin(h);return y?c(y):wt.none}));if(r)d.push(r(h));return d})}static fromClass(t,i){return ls.define((l,s)=>new t(l,s),i)}}class nm{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){eo(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(eo(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){eo(t.state,l,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}var WT=he.define(),Cv=he.define(),mm=he.define(),FT=he.define(),Av=he.define(),th=he.define(),JT=he.define();function oT(t,i){let l=t.state.facet(JT);if(!l.length)return l;let s=l.map((c)=>c instanceof Function?c(t):c),r=[];return Fe.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=A3(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 ZT=he.define();function KT(t){let i=0,l=0,s=0,r=0;for(let c of t.state.facet(ZT)){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 $f=he.define();class to{constructor(t,i,l,s){this.fromA=t,this.toA=i,this.fromB=l,this.toB=s}join(t){return new to(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 to(y,S,m,b))}return l}}class um{constructor(t,i,l){this.view=t,this.state=i,this.transactions=l,this.flags=0,this.startState=t.state,this.changes=un.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 to(r,c,h,d))),this.changedRanges=s}static create(t,i,l){return new um(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 M3=[];class _t{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 M3}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)c3(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=oa(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 ih)return t;return null}static get(t){return t.cmTile}}class nh extends _t{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=lT(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=lT(s);this.length=c}}function lT(t){let i=t.nextSibling;return t.parentNode.removeChild(t),i}class ih extends nh{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=_t.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 is)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 is extends nh{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 is(i||document.createElement(t.tagName),t);if(!i)l.flags|=4;return l}}class Hu extends nh{constructor(t,i){super(t);this.attrs=i}isLine(){return!0}static start(t,i,l){let s=new Hu(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&&O3(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 D3(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 D3(t){let i=t.dom.lastChild;if(!i)return t.dom.getBoundingClientRect();let l=tm(i);return l[l.length-1]||null}function O3(t,i){let l=t.coordsIn(0,1),s=i.coordsIn(0,1);return l&&s&&s.top<l.bottom}class ri extends nh{constructor(t,i){super(t);this.mark=i}get domAttrs(){return this.mark.attrs}static of(t,i){let l=new ri(i||document.createElement(t.tagName),t);if(!i)l.flags|=4;return l}}class lr extends _t{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(!(Z.chrome||Z.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=Jf(this.dom,r,c).getClientRects();if(!d.length)return null;let m=d[(h?h<0:i>=0)?0:d.length-1];if(Z.safari&&!h&&m.width==0)m=Array.prototype.find.call(d,(y)=>y.width)||m;return l==null?m:rm(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 _t{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 rm(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 rm(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 Zf extends _t{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:rm(s,i>0==l)}}class eE{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 tE{constructor(t,i,l,s){this.from=t,this.to=i,this.wrapper=l,this.rank=s}}class nE{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)?Fb(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 ri&&m.mark.eq(d.mark)){if(m.dom!=d.dom)m.setDOM(Fb(d.dom));s=m}else{if(this.cache.reused.get(d)){let b=_t.get(d.dom);if(b)b.setDOM(Fb(d.dom))}let y=ri.of(d.mark,d.dom);s.append(y),s=y}this.cache.reused.set(d,2)}let r=_t.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=sE;let s=Hu.start(t,i||((l=this.cache.find(Hu))===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 ri&&h.mark.eq(c))s=h,i--;else{let d=ri.of(c,(l=this.cache.find(ri,(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||!sT(this.curLine,!1)||t.dom.nodeName!="BR"&&t.isWidget()&&!(Z.ios&&sT(this.curLine,!0)))this.curLine.append(this.cache.findWidget(Jb,0,32)||new rr(Jb.toDOM(),0,Jb,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 tE(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 is&&s.wrapper.eq(l.wrapper))i=s;else{let r=is.of(l.wrapper,(t=this.cache.find(is,(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(Zf,void 0,1);if(l)l.flags=i;return l||new Zf(i)}flushBuffer(){if(this.afterWidget&&!(this.afterWidget.flags&32))this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null}}class iE{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 cm=[rr,Hu,lr,ri,Zf,is,ih];for(let t=0;t<cm.length;t++)cm[t].bucket=t;class oE{constructor(t){this.view=t,this.buckets=cm.map(()=>[]),this.index=cm.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 lE{constructor(t,i,l,s,r){this.view=t,this.decorations=s,this.disallowBlockEffectsFor=r,this.openWidget=!1,this.openMarks=0,this.cache=new oE(t),this.text=new iE(t.state.doc),this.builder=new nE(this.cache,new ih(t,t.contentDOM),Fe.iter(l)),this.cache.reused.set(i,2),this.old=new eE(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=B3(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 Zf)this.cache.add(c);else if(c instanceof ri)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 ri)s.unshift(c.mark);this.openWidget=!1},leave:(c)=>{if(c.isLine()){if(s.length)s.length=r=0}else if(c instanceof ri)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=Fe.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=R3(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=L3(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=_t.get(s);if(s==this.view.contentDOM)break;if(r instanceof ri)i.push(r);else if(r===null||r===void 0?void 0:r.isLine())l=r;else if(r instanceof is);else if(s.nodeName=="DIV"&&!l&&s!=this.view.contentDOM)l=new Hu(s,sE);else if(!l)i.push(ri.of(new Kf({tagName:s.nodeName.toLowerCase(),attributes:f3(s)}),s))}return{line:l,marks:i}}}function sT(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 R3(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 sE={class:"cm-line"};function L3(t,i){let l=i.spec.attributes,s=i.spec.class;if(!l&&!s)return t;if(!t)t={class:"cm-line"};if(l)vv(l,t);if(s)t.class+=" "+s;return t}function B3(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 ri)i.push(s.mark)}return i}function Fb(t){let i=_t.get(t);if(i)i.setDOM(t.cloneNode());return t}class ur extends sa{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 Jb=new class extends sa{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class uv{constructor(t){this.view=t,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=wt.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 ih(t,t.contentDOM),this.updateInner([new to(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(!j3(t.changes,this.hasComposition)&&!t.selectionSet)s=t.state.selection.main.head}let r=s>-1?H3(this.view,t.changes,s):null;if(this.domChanged=null,this.hasComposition){let{from:y,to:b}=this.hasComposition;l=new to(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,(Z.ie||Z.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=U3(c,this.decorations,t.changes);if(d.length)l=to.extendWithRanges(l,d);let m=q3(h,this.blockWrappers,t.changes);if(m.length)l=to.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 lE(this.view,c,this.blockWrappers,this.decorations,this.dynamicDecorationMap);if(i&&_t.get(i.text))h.cache.reused.set(_t.get(i.text),2);this.tile=h.run(t,i),cv(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=Z.chrome||Z.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 im)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(GT))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(ns)||l.tabIndex>-1)&&Xf(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(Z.gecko&&d.empty&&!this.hasComposition&&z3(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||(!Qf(m.node,m.offset,b.anchorNode,b.anchorOffset)||!Qf(y.node,y.offset,b.focusNode,b.focusOffset))&&!this.suppressWidgetCursorChange(b,d))this.view.observer.ignore(()=>{if(Z.android&&Z.chrome&&l.contains(b.focusNode)&&V3(b.focusNode,l))l.blur(),l.focus({preventScroll:!0});let S=Ff(this.view.root);if(!S);else if(d.empty){if(Z.gecko){let w=N3(m.node,m.offset);if(w&&w!=3){let k=(w==1?BT:zT)(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&&Qf(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=Ff(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=os(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&&!_t.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 im)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=Zi(r.text,c);if(h==c)return null;let d=Jf(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:_}=L;if(w&&!k)m+=L.top-w.top;if(E instanceof is){if(R>l)y(E,S,L)}else if(S>=l){if(m>0)i.push(-m);if(i.push(_+m),m=0,c){let V=E.dom.lastChild,j=V?tm(V):[];if(j.length){let ee=j[j.length-1],be=d?ee.right-L.left:L.right-ee.left;if(be>h)h=be,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=tm(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=tm(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(wt.replace({widget:new im(h),block:!0,inclusive:!0,isBlockGap:!0}).range(l,c))}if(!r)break;l=r.to+1}return wt.set(t)}updateDeco(){let t=1,i=this.view.state.facet(mm).map((r)=>(this.dynamicDecorationMap[t++]=typeof r=="function")?r(this.view):r),l=!1,s=this.view.state.facet(Av).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(Fe.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(FT).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(QT))try{if(m(this.view,t.range,t))return!0}catch(y){eo(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=KT(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(p3(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(){cv(this.tile)}}function cv(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)cv(s,i)}}function z3(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 aE(t,i){let l=t.observer.selectionRange;if(!l.focusNode)return null;let s=BT(l.focusNode,l.focusOffset),r=zT(l.focusNode,l.focusOffset),c=s||r;if(r&&s&&r.node!=s.node){let d=_t.get(r.node);if(!d||d.isText()&&d.text!=r.node.nodeValue)c=r;else if(t.docView.lastCompositionAfterCursor){let m=_t.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 H3(t,i,l){let s=aE(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 to(m.mapPos(c),m.mapPos(h),c,h),text:r}}function N3(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 _3=class{constructor(){this.changes=[]}compareRange(i,l){Lu(i,l,this.changes)}comparePoint(i,l){Lu(i,l,this.changes)}boundChange(i){Lu(i,i,this.changes)}};function U3(t,i,l){let s=new _3;return Fe.compare(t,i,l,s),s.changes}class rE{constructor(){this.changes=[]}compareRange(t,i){Lu(t,i,this.changes)}comparePoint(){}boundChange(t){Lu(t,t,this.changes)}}function q3(t,i,l){let s=new rE;return Fe.compare(t,i,l,s),s.changes}function V3(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 j3(t,i){let l=!1;if(i)t.iterChangedRanges((s,r)=>{if(s<i.to&&r>i.from)l=!0});return l}class im extends sa{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 I3(t,i,l=1){let s=t.charCategorizer(i),r=t.doc.lineAt(i),c=i-r.from;if(r.length==0)return W.cursor(i);if(c==0)l=1;else if(c==r.length)l=-1;let h=c,d=c;if(l<0)h=Zi(r.text,c,!1);else d=Zi(r.text,c);let m=s(r.text.slice(h,d));while(h>0){let y=Zi(r.text,h,!1);if(s(r.text.slice(y,h))!=m)break;h=y}while(d<r.length){let y=Zi(r.text,d);if(s(r.text.slice(d,y))!=m)break;d=y}return W.undirectionalRange(h+r.from,d+r.from)}function $3(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+X2(h,c,t.state.tabSize)}function P3(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==no.Text&&(r.type!=c.type||(l<0?c.from<i:c.to>i)))r=c}return r||s}return s}function Y3(t,i,l,s){let r=P3(t,i.head,i.assoc||-1),c=!s||r.type!=no.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 W.cursor(m,l?-1:1)}return W.cursor(l?r.to:r.from,l?-1:1)}function aT(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=C3(r,c,h,d,l),b=qT;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 X3(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 W.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=fv(t,{x:S,y:R},!1,c);if(l?R>m.bottom:R<m.top)return W.cursor(L.pos,L.assoc);let _=t.coordsAtPos(L.pos,L.assoc),V=_?(_.top+_.bottom)/2:0;if(!_||(l?V>d:V<d))return W.cursor(L.pos,L.assoc,void 0,h)}}function Gf(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 uE(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=Gf(t,r.from,0);if(h!=r.from)c=W.cursor(h,-1)}else{let h=Gf(t,r.from,-1),d=Gf(t,r.to,1);if(h!=r.from||d!=r.to)if(r.undirectional)c=W.undirectionalRange(r.from,r.to);else c=W.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?W.create(l,i.mainIndex):i}function Zb(t,i,l){let s=Gf(t.state.facet(th).map((r)=>r(t)),l.from,i.head>l.from?-1:1);return s==l.from?l:W.cursor(s,s<l.from?1:-1)}class To{constructor(t,i){this.pos=t,this.assoc=i}}function fv(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==no.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==no.Text){let S=$3(t,r,y,h,d);return new To(S,S==y.from?1:-1)}}if(y.type!=no.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 cE(t,h,d,t.textDirectionAt(y.from)).scanTile(b,y.from)}class cE{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 _=0;_<k;_++){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 _=R[L],V=0;if(_.width==0&&R.length>1)continue;if(_.bottom<this.y){if(!d||d.bottom<_.bottom)d=_;V=1}else if(_.top>this.y){if(!m||m.top>_.top)m=_;V=-1}else{let j=_.left>this.x?this.x-_.left:_.right<this.x?this.x-_.right:0,ee=Math.abs(j);if(ee<b)y=E,b=ee,S=_;if(j)V=j<0==(this.baseDir==Xt.LTR)?-1:1}if(V==-1&&(!h||this.baseDirAt(t[E],1)))r=E;else if(V==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=Zi(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 Jf(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:Jf(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 Ou="";class fE{constructor(t,i){this.points=t,this.view=i,this.text="",this.lineSeparator=i.state.facet(Ve.lineSeparator)}append(t){this.text+=t}lineBreak(){this.text+=Ou}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=_t.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=_t.get(h);if((c&&d?c.breakAfter:(c?c.breakAfter:am(s))||am(h)&&(s.nodeName!="BR"||(c===null||c===void 0?void 0:c.isWidget()))&&this.text.length>r)&&!W3(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=_t.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+(G3(t,l.node,l.offset)?i:0)}}function G3(t,i,l){for(;;){if(!i||l<os(i))return!1;if(i==t)return!0;l=oa(i)+1,i=i.parentNode}}function W3(t,i){let l;for(;;t=t.nextSibling){if(t==i||!t)break;let s=_t.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 hv{constructor(t,i){this.node=t,this.offset=i,this.pos=-1}}class hE{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=dE(t.docView.tile,i,l,0))){let d=r||c?[]:J3(t),m=new fE(d,t);m.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=m.text,this.newSel=Z3(d,this.bounds.from)}else{let d=t.observer.selectionRange,m=r&&r.node==d.focusNode&&r.offset==d.focusOffset||!ov(t.contentDOM,d.focusNode)?h.main.head:t.docView.posFromDOM(d.focusNode,d.focusOffset),y=c&&c.node==d.anchorNode&&c.offset==d.anchorOffset||!ov(t.contentDOM,d.anchorNode)?h.main.anchor:t.docView.posFromDOM(d.anchorNode,d.anchorOffset),b=t.viewport;if((Z.ios||Z.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(W.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=W.create([W.cursor(m,w)])}else this.newSel=W.single(y,m)}}}function dE(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 dE(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 pE(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||Z.android&&i.text.length<m-d)y=c.to,b="end";let S=r.doc.sliceString(d,m,Ou),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(Ou))};else if(k=mE(S,i.text,y-d,b)){if(Z.chrome&&h==13&&k.toB==k.from+2&&i.text.slice(k.from,k.toB)==Ou+Ou)k.toB--;l={from:d+k.from,to:d+k.toA,insert:Ye.of(i.text.slice(k.from,k.toB).split(Ou))}}}else if(s&&(!t.hasFocus&&r.facet(ns)||fm(s,c)))s=null;if(!l&&!s)return!1;if((Z.mac||Z.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=W.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(Z.chrome&&l&&l.from==l.to&&l.from==c.head&&l.insert.toString()==`
|
|
223
|
+
`&&t.lineWrapping){if(s)s=W.single(s.main.anchor-1,s.main.head-1);l={from:c.from,to:c.to,insert:Ye.of([" "])}}if(l)return Tv(t,l,s,h);else if(s&&!fm(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=uE(r.facet(th).map((y)=>y(t)),s)}return t.dispatch({selection:s,scrollIntoView:d,userEvent:m}),!0}else return!1}function Tv(t,i,l,s=-1){if(Z.ios&&t.inputState.flushIOSKey(i))return!0;let r=t.state.selection.main;if(Z.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&&Bu(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)&&Bu(t.contentDOM,"Backspace",8)||i.from==r.from&&i.to==r.to+1&&i.insert.length==0&&Bu(t.contentDOM,"Delete",46)))return!0;let c=i.insert.toString();if(t.inputState.composing>=0)t.inputState.composing++;let h,d=()=>h||(h=F3(t,i,l));if(!t.state.facet(PT).some((m)=>m(t,i.from,i.to,c,d)))t.dispatch(d());return!0}function F3(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=Gf(r.facet(th).map((S)=>S(t)),y,m);if(i.from==b)h=b}if(h>-1)s={changes:i,selection:W.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&&aE(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 _=r.changes({from:L,to:R,insert:i.insert}),V=E.to-c.to;return{changes:_,range:!y?E.map(_):W.range(Math.max(0,y.anchor+V),Math.max(0,y.head+V))}})}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 mE(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 J3(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 hv(l,s)),r!=l||c!=s)i.push(new hv(r,c))}return i}function Z3(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?W.single(l+i,s+i):null}function fm(t,i){return i.head==t.main.head&&i.anchor==t.main.anchor}class gE{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,Z.safari)t.contentDOM.addEventListener("input",()=>null);if(Z.gecko)d4(t.contentDOM.ownerDocument)}handleEvent(t){if(!s4(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=e4(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&&bE.indexOf(t.keyCode)<0)this.tabFocusMode=-1;if(Z.android&&Z.chrome&&!t.synthetic&&(t.keyCode==13||t.keyCode==8))return this.view.observer.delayAndroidKey(t.key,t.keyCode),!0;if(Z.ios&&!t.synthetic&&!t.altKey&&!t.metaKey&&(yE.some((i)=>i.keyCode==t.keyCode)&&!t.ctrlKey||t4.indexOf(t.key)>-1&&t.ctrlKey)){let i={ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey,shiftKey:t.shiftKey};if(i.shiftKey&&Z.ios&&!/^(off|none)$/.test(this.view.contentDOM.autocapitalize)&&K3(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,Bu(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(Z.safari&&!Z.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 K3(t){if(!t.visualViewport)return!1;return t.visualViewport.height*t.visualViewport.scale/t.document.documentElement.clientHeight<0.85}function rT(t,i){return(l,s)=>{try{return i.call(t,s,l)}catch(r){eo(l.state,r)}}}function e4(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(rT(s.value,m))}if(h)for(let d in h){let m=h[d];if(m)l(d).observers.push(rT(s.value,m))}}for(let s in Oo)l(s).handlers.push(Oo[s]);for(let s in Gn)l(s).observers.push(Gn[s]);return i}var yE=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],t4="dthko",bE=[16,17,18,20,91,92,224,225],Wp=6;function Fp(t){return Math.max(0,t)*0.7+8}function n4(t,i){return Math.max(Math.abs(t.clientX-i.clientX),Math.abs(t.clientY-i.clientY))}class vE{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=DT(t.contentDOM),this.atoms=t.state.facet(th).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(Ve.allowMultipleSelections)&&i4(t,i),this.dragging=l4(t,i)&&xE(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&&n4(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=KT(this.view);if(t.clientX-d.left<=s+Wp)i=-Fp(s-t.clientX);else if(t.clientX+d.right>=c-Wp)i=Fp(t.clientX-c);if(t.clientY-d.top<=r+Wp)l=-Fp(r-t.clientY);else if(t.clientY+d.bottom>=h-Wp)l=Fp(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=uE(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 i4(t,i){let l=t.state.facet(VT);return l.length?l[0](i):Z.mac?i.metaKey:i.ctrlKey}function o4(t,i){let l=t.state.facet(jT);return l.length?l[0](i):Z.mac?!i.altKey:!i.ctrlKey}function l4(t,i){let{main:l}=t.state.selection;if(l.empty)return!1;let s=Ff(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 s4(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=_t.get(l))&&s.isWidget()&&!s.isHidden&&s.widget.ignoreEvent(i))return!1;return!0}var Oo=Object.create(null),Gn=Object.create(null),SE=Z.ie&&Z.ie_version<15||Z.ios&&Z.webkit_version<604;function a4(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(),wE(t,l.value)},50)}function gm(t,i,l){for(let s of t.facet(i))l=s(l,t);return l}function wE(t,i){i=gm(t.state,xv,i);let{state:l}=t,s,r=1,c=l.toText(i),h=c.lines==l.selection.ranges.length;if(dv!=null&&l.selection.ranges.every((m)=>m.empty)&&dv==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:W.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:W.cursor(m.from+y.length)}});else s=l.replaceSelection(c);t.dispatch(s,{userEvent:"input.paste",scrollIntoView:!0})}Gn.scroll=(t)=>{let i=t.inputState;if(i.lastScrollTop=t.scrollDOM.scrollTop,i.lastScrollLeft=t.scrollDOM.scrollLeft,Z.ios&&!i.touchActive)i.lastIOSMomentumScroll=Date.now()};Gn.wheel=Gn.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};Gn.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")};Gn.touchmove=(t)=>{t.inputState.setSelectionOrigin("select.pointer")};Gn.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(IT))if(l=s(t,i),l)break;if(!l&&i.button==0)l=u4(t,i);if(l){let s=!t.hasFocus;if(t.inputState.startMouseSelection(new vE(t,i,l,s)),s)t.observer.ignore(()=>{RT(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 uT(t,i,l,s){if(s==1)return W.cursor(i,l);else if(s==2)return I3(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 W.undirectionalRange(h,d)}}var r4=Z.ie&&Z.ie_version<=11,cT=null,fT=0,hT=0;function xE(t){if(!r4)return t.detail;let i=cT,l=hT;return cT=t,hT=Date.now(),fT=!i||l>Date.now()-400&&Math.abs(i.clientX-t.clientX)<2&&Math.abs(i.clientY-t.clientY)<2?(fT+1)%3:1}function u4(t,i){let l=t.posAndSideAtCoords({x:i.clientX,y:i.clientY},!1),s=xE(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=uT(t,m.pos,m.assoc,s);if(l.pos!=m.pos&&!h){let S=uT(t,l.pos,l.assoc,s),w=Math.min(S.from,b.from),k=Math.max(S.to,b.to);b=w<b.from?W.range(w,k,b.assoc):W.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=c4(r,m.pos)))return y;else if(d)return r.addRange(b);else return W.create([b])}}}function c4(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 W.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=W.undirectionalRange(c,h)}}let{inputState:s}=t;if(s.mouseSelection)s.mouseSelection.dragging=!0;if(s.draggedContent=l,i.dataTransfer)i.dataTransfer.setData("Text",gm(t.state,kv,t.state.sliceDoc(l.from,l.to))),i.dataTransfer.effectAllowed="copyMove";return!1};Oo.dragend=(t)=>(t.inputState.draggedContent=null,!1);function dT(t,i,l,s){if(l=gm(t.state,xv,l),!l)return;let r=t.posAtCoords({x:i.clientX,y:i.clientY},!1),{draggedContent:c}=t.inputState,h=s&&c&&o4(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)dT(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 dT(t,i,s,!0),!0}return!1};Oo.paste=(t,i)=>{if(t.state.readOnly)return!0;t.observer.flush();let l=SE?null:i.clipboardData;if(l)return wE(t,l.getData("text/plain")||l.getData("text/uri-list")),!0;else return a4(t),!1};function f4(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 h4(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:gm(t,kv,i.join(t.lineBreak)),ranges:l,linewise:s}}var dv=null;Oo.copy=Oo.cut=(t,i)=>{if(!Xf(t.contentDOM,t.observer.selectionRange))return!1;let{text:l,ranges:s,linewise:r}=h4(t.state);if(!l&&!r)return!1;if(dv=r?l:null,i.type=="cut"&&!t.state.readOnly)t.dispatch({changes:s,scrollIntoView:!0,userEvent:"delete.cut"});let c=SE?null:i.clipboardData;if(c)return c.clearData(),c.setData("text/plain",l),!0;else return f4(t,l),!1};var kE=Ki.define();function CE(t,i){let l=[];for(let s of t.facet(YT)){let r=s(t,i);if(r)l.push(r)}return l.length?t.update({effects:l,annotations:kE.of(!0)}):null}function AE(t){setTimeout(()=>{let i=t.hasFocus;if(i!=t.inputState.notifiedFocused){let l=CE(t.state,i);if(l)t.dispatch(l);else t.update([])}},10)}Gn.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;AE(t)};Gn.blur=(t)=>{t.observer.clearSelectionRange(),AE(t)};Gn.compositionstart=Gn.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};Gn.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,Z.chrome&&Z.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)};Gn.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 Tv(t,{from:m,to:y,insert:t.state.toText(c)},null),!0}}let r;if(Z.chrome&&Z.android&&(r=yE.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(Z.ios&&i.inputType=="deleteContentForward")t.observer.flushSoon();if(Z.safari&&i.inputType=="insertText"&&t.inputState.composing>=0)setTimeout(()=>Gn.compositionend(t,i),20);return!1};var pT=new Set;function d4(t){if(!pT.has(t))pT.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{})}var mT=["pre-wrap","normal","pre-line","break-spaces"],Nu=!1;function gT(){Nu=!1}class TE{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 mT.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=mT.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 EE{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"?no.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 Eo(this.from,this.length+t.length,this.top,this.height+t.height,i)}}var St=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(St||(St={})),om=0.001;class Qn{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)>om)Nu=!0;this.height=t}}replace(t,i,l){return Qn.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,St.ByPosNoHeight,l.setDoc(i),0,0),w=S.to>=m?S:r.lineAt(m,St.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,St.ByPosNoHeight,l,0,0);y+=S.from-d,d=S.from;let k=Mv.build(l.setDoc(c),t,y,b);r=hm(r,r.replace(d,m,k))}return r.updateHeight(l,0)}static empty(){return new Mi(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 ME(Qn.of(t.slice(0,i)),c,Qn.of(t.slice(l)))}}function hm(t,i){if(t==i)return t;if(t.constructor!=i.constructor)Nu=!0;return i}Qn.prototype.size=1;var p4=wt.replace({});class Ev extends Qn{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,p4):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,St.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 Mi extends Ev{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 Mi||s instanceof Mn&&s.flags&4)&&Math.abs(this.length-s.length)<10){if(s instanceof Mn)s=new Mi(s.length,this.height,this.spaceAbove);else s.height=this.height;if(!this.outdated)s.outdated=!1;return s}else return Qn.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 Mn extends Qn{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==St.ByHeight)return this.blockAt(t,l,s,r);if(i==St.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 Mn)l[l.length-1]=new Mn(r.length+s);else l.push(null,new Mn(s-1))}if(t>0){let r=l[0];if(r instanceof Mn)l[0]=new Mn(t+r.length);else l.unshift(new Mn(t-1),null)}return Qn.of(l)}decomposeLeft(t,i){i.push(new Mn(t-1),null)}decomposeRight(t,i){i.push(null,new Mn(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 Mn(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)>=om)d=-2;let w=new Mi(y,b,S);w.outdated=!1,c.push(w),h+=y+1}if(h<=r)c.push(null,new Mn(r-h).updateHeight(t,h));let m=Qn.of(c);if(d<0||Math.abs(m.height-this.height)>=om||Math.abs(d-this.heightMetrics(t,i).perLine)>=om)Nu=!0;return hm(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 ME extends Qn{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==St.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==St.ByPosNoHeight?St.ByPosNoHeight:St.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,St.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)yT(r,c-1);if(i<this.length){let h=r.length;this.decomposeRight(i,r),yT(r,h)}return Qn.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 Qn.of(this.break?[t,null,i]:[t,i]);return this.left=hm(this.left,t),this.right=hm(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 yT(t,i){let l,s;if(t[i]==null&&(l=t[i-1])instanceof Mn&&(s=t[i+1])instanceof Mn)t.splice(i-1,3,new Mn(l.length+1+s.length))}var m4=5;class Mv{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 Mi)s.length+=l-this.pos;else if(l>this.pos||!this.isCovered)this.nodes.push(new Mi(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 Ev(c,s,l));else if(c||r||s>=m4)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 Mi(this.pos-t,-1,0));this.writtenTo=this.pos}blankContent(t,i){let l=new Mn(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 Mi)return t;let i=new Mi(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 Mi)&&!this.isCovered)this.nodes.push(new Mi(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 Mi)s.updateHeight(this.oracle,l);l+=s?s.length:1}return this.nodes}static build(t,i,l,s){let r=new Mv(l,t);return Fe.spans(i,l,s,r,0),r.finish(l)}}function g4(t,i,l){let s=new DE;return Fe.compare(t,i,l,s,0),s.changes}class DE{constructor(){this.changes=[]}compareRange(){}comparePoint(t,i,l,s){if(t<i||l&&l.heightRelevant||s&&s.heightRelevant)Lu(t,i,this.changes,5)}}function y4(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 b4(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 v4(t,i){let l=t.getBoundingClientRect();return{left:0,right:l.right-l.left,top:i,bottom:l.bottom-(l.top+i)}}class lm{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 wt.replace({widget:new OE(this.displaySize*(i?t.scaleY:t.scaleX),i)}).range(this.from,this.to)}}class OE extends sa{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 pv{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=bT,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Xt.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let l=i.facet(Cv).some((s)=>typeof s!="function"&&s.class=="cm-lineWrapping");this.heightOracle=new TE(l),this.stateDeco=vT(i),this.heightMap=Qn.empty().applyChanges(this.stateDeco,Ye.empty,this.heightOracle.setDoc(i.doc),[new to(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=wt.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 Pf(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?bT:new Dv(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(Yf(t,this.scaler))})}update(t,i=null){this.state=t.state;let l=this.stateDeco;this.stateDeco=vT(this.state);let s=t.changedRanges,r=to.extendWithRanges(s,g4(l,this.stateDeco,t?t.changes:un.empty(this.state.doc.length))),c=this.heightMap.height,h=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);if(gT(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,t.startState.doc,this.heightOracle.setDoc(this.state.doc),r),this.heightMap.height!=c||Nu)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(T3))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:ee,scaleY:be}=MT(i,h);if(ee>0.005&&Math.abs(this.scaleX-ee)>0.005||be>0.005&&Math.abs(this.scaleY-be)>0.005)this.scaleX=ee,this.scaleY=be,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=DT(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=LT(this.scrollParent||t.win);let E=(this.printing?v4:y4)(i,this.paddingTop),R=E.top-this.pixelViewport.top,L=E.bottom-this.pixelViewport.bottom;this.pixelViewport=E;let _=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(_!=this.inView){if(this.inView=_,_)d=!0}if(!this.inView&&!this.scrollTarget&&!b4(t.dom))return 0;let V=h.width;if(this.contentDOMWidth!=V||this.editorHeight!=t.scrollDOM.clientHeight)this.contentDOMWidth=h.width,this.editorHeight=t.scrollDOM.clientHeight,m|=16;if(d){let ee=t.docView.measureVisibleLineHeights(this.viewport);if(s.mustRefreshForHeights(ee))c=!0;if(c||s.lineWrapping&&Math.abs(V-this.contentDOMWidth)>s.charWidth){let{lineHeight:be,charWidth:ot,textHeight:Rt}=t.docView.measureTextSize();if(c=be>0&&s.refresh(r,be,ot,Rt,Math.max(5,V/ot),ee),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);gT();for(let be of this.viewports){let ot=be.from==this.viewport.from?ee:t.docView.measureVisibleLineHeights(be);this.heightMap=(c?Qn.empty().applyChanges(this.stateDeco,Ye.empty,this.heightOracle,[new to(0,0,0,t.state.doc.length)]):this.heightMap).updateHeight(s,0,c,new EE(be.from,ot))}if(Nu)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 Pf(s.lineAt(c-l*1000,St.ByHeight,r,0,0).from,s.lineAt(h+(1-l)*1000,St.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,St.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 Pf(s.lineAt(S-500,St.ByHeight,r,0,0).from,s.lineAt(S+y+500,St.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 Pf(this.heightMap.lineAt(l,St.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(s,St.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,St.ByPos,this.heightOracle,0,0),{bottom:r}=this.heightMap.lineAt(i,St.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 lm(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=w4(t,(L)=>L.from>=S.from&&L.to<=S.to&&Math.abs(L.from-y)<r&&Math.abs(L.to-b)<r&&!E.some((_)=>L.from<_&&L.to>_));if(!R){if(b<S.to&&i&&l&&i.visibleRanges.some((V)=>V.from<=b&&V.to>=b)){let V=i.moveToLineBoundary(W.cursor(b),!1,!0).head;if(V>y)b=V}let L=this.gapSize(S,y,b,w),_=l||L<2000000?L:2000000;R=new lm(y,b,L,_)}h.push(R)},m=(y)=>{if(y.length<c||y.type!=no.Text)return;let b=S4(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 _=Zp(b,S),V=((this.visibleBottom-this.visibleTop)/2+E)/y.height;R=_-V,L=_+V}else R=(this.visibleTop-y.top-E)/y.height,L=(this.visibleBottom-y.top+E)/y.height;w=Jp(b,R),k=Jp(b,L)}else{let E=b.total*this.heightOracle.charWidth,R=s*this.heightOracle.charWidth,L=0;if(E>2000000){for(let be of t)if(be.from>=y.from&&be.from<y.to&&be.size!=be.displaySize&&be.from*this.heightOracle.charWidth+L<this.pixelViewport.left)L=be.size-be.displaySize}let _=this.pixelViewport.left+L,V=this.pixelViewport.right+L,j,ee;if(S!=null){let be=Zp(b,S),ot=((V-_)/2+R)/E;j=be-ot,ee=be+ot}else j=(_-R)/E,ee=(V+R)/E;w=Jp(b,j),k=Jp(b,ee)}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=Zp(s,l)-Zp(s,i);if(this.heightOracle.lineWrapping)return t.height*r;else return s.total*this.heightOracle.charWidth*r}updateLineGaps(t){if(!lm.same(t,this.lineGaps))this.lineGaps=t,this.lineGapDeco=wt.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=[];Fe.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)||Yf(this.heightMap.lineAt(t,St.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)||Yf(this.heightMap.lineAt(this.scaler.fromDOM(t),St.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 Yf(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 Pf{constructor(t,i){this.from=t,this.to=i}}function S4(t,i,l){let s=[],r=t,c=0;if(Fe.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 Jp({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 Zp(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 w4(t,i){for(let l of t)if(i(l))return l;return}var bT={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};function vT(t){let i=t.facet(mm).filter((s)=>typeof s!="function"),l=t.facet(Av).filter((s)=>typeof s!="function");if(l.length)i.push(Fe.join(l));return i}class Dv{constructor(t,i,l){let s=0,r=0,c=0;this.viewports=l.map(({from:h,to:d})=>{let m=i.lineAt(h,St.ByPos,t,0,0).top,y=i.lineAt(d,St.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 Dv))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 Yf(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)=>Yf(r,i)):t._content)}var Kp=he.define({combine:(t)=>t.join(" ")}),mv=he.define({combine:(t)=>t.indexOf(!0)>-1}),gv=Ao.newName(),RE=Ao.newName(),LE=Ao.newName(),BE={"&light":"."+RE,"&dark":"."+LE};function yv(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 x4=yv("."+gv,{"&":{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"}},BE),k4={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Kb=Z.ie&&Z.ie_version<=11;class zE{constructor(t){if(this.view=t,this.active=!1,this.editContext=null,this.selectionRange=new OT,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((Z.ie&&Z.ie_version<=11||Z.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&&Z.android&&t.constructor.EDIT_CONTEXT!==!1&&!(Z.chrome&&Z.chrome_version<126)){if(this.editContext=new HE(t),t.state.facet(ns))t.contentDOM.editContext=this.editContext.editContext}if(Kb)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(ns)?l.root.activeElement!=this.dom:!Xf(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((Z.ie&&Z.ie_version<=11||Z.android&&Z.chrome)&&!l.state.selection.main.empty&&s.focusNode&&Qf(s.focusNode,s.focusOffset,s.anchorNode,s.anchorOffset))this.flushSoon();else this.flush(!1)}readSelectionRange(){let{view:t}=this,i=Ff(t.root);if(!i)return!1;let l=Z.safari&&t.root.nodeType==11&&t.root.activeElement==this.dom&&C4(this.view,i)||i;if(!l||this.selectionRange.eq(l))return!1;let s=Xf(this.dom,l);if(s&&!this.selectionChanged&&t.inputState.lastFocusTime>Date.now()-200&&t.inputState.lastTouchTime<Date.now()-300&&g3(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,k4),Kb)this.dom.addEventListener("DOMCharacterDataModified",this.onCharData);this.active=!0}stop(){if(!this.active)return;if(this.active=!1,this.observer.disconnect(),Kb)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)Bu(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&&Xf(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 hE(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=pE(this.view,i);if(this.view.state==l&&(i.domChanged||i.newSel&&!fm(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=ST(i,t.previousSibling||t.target.previousSibling,-1),s=ST(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(ns)!=t.state.facet(ns))t.view.contentDOM.editContext=t.state.facet(ns)?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 ST(t,i,l){while(i){let s=_t.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 wT(t,i){let{startContainer:l,startOffset:s,endContainer:r,endOffset:c}=i,h=t.docView.domAtPos(t.state.selection.main.anchor,1);if(Qf(h.node,h.offset,r,c))[l,s,r,c]=[r,c,l,s];return{anchorNode:l,anchorOffset:s,focusNode:r,focusOffset:c}}function C4(t,i){if(i.getComposedRanges){let r=i.getComposedRanges(t.root)[0];if(r)return wT(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?wT(t,l):null}class HE{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=mE(t.state.sliceDoc(h,d),l.text,(m?s.from:s.to)-h,m?"end":null);if(!y){let S=W.single(this.toEditorPos(l.selectionStart),this.toEditorPos(l.selectionEnd));if(!fm(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((Z.mac||Z.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);Tv(t,b,W.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(wt.mark({attributes:{style:y}}).range(d,m))}}}t.dispatch({effects:GT.of(wt.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=Ff(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 ce{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||m3(t.parent)||document,this.viewState=new pv(this,t.state||Ve.create(t)),t.scrollTo&&t.scrollTo.is(Gp))this.viewState.scrollTarget=t.scrollTo.value.clip(this.viewState.state);this.plugins=this.state.facet(Ru).map((s)=>new nm(s));for(let s of this.plugins)s.update(this);if(this.observer=new zE(this),this.inputState=new gE(this),this.inputState.ensureHandlers(this.plugins),this.docView=new uv(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 cn?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(kE)))this.inputState.notifiedFocused=c,h=1;else if(c!=this.inputState.notifiedFocused){if(this.inputState.notifiedFocused=c,d=CE(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(Ve.phrases)!=this.state.facet(Ve.phrases))return this.setState(r);s=um.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(ce.cursorScrollMargin);b=new zu(w.empty?w:W.cursor(w.head,w.head>w.anchor?-1:1),"nearest","nearest",E,k)}for(let w of S.effects)if(w.is(Gp))b=w.value.clip(this.state)}if(this.viewState.update(s,b),this.bidiCache=dm.update(this.bidiCache,s.changes),!s.empty)this.updatePlugins(s),this.inputState.update(s);if(i=this.docView.update(s),this.state.facet($f)!=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(Kp)!=s.state.facet(Kp))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(rv))try{S(s)}catch(w){eo(this.state,w,"update listener")}if(d||y)Promise.resolve().then(()=>{if(d&&this.state==d.startState)this.dispatch(d);if(y){if(!pE(this,y)&&m.force)Bu(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 pv(this,t),this.plugins=t.facet(Ru).map((l)=>new nm(l)),this.pluginMap.clear();for(let l of this.plugins)l.update(this);this.docView.destroy(),this.docView=new uv(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(Ru),l=t.state.facet(Ru);if(i!=l){let s=[];for(let r of l){let c=i.indexOf(r);if(c<0)s.push(new nm(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){eo(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(LT(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 eo(this.state,k),xT}}),b=um.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]!=xT)try{let k=m[w];if(k.write)k.write(y[w],this)}catch(k){eo(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)&&!(Z.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(rv))h(i)}get themeClasses(){return gv+" "+(this.state.facet(mv)?LE:RE)+" "+this.state.facet(Kp)}updateAttrs(){let t=kT(this,WT,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),i={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:!this.state.facet(ns)?"false":"true",class:"cm-content",style:`${Z.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};if(this.state.readOnly)i["aria-readonly"]="true";kT(this,Cv,i);let l=this.observer.ignore(()=>{let s=tT(this.contentDOM,this.contentAttrs,i),r=tT(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(ce.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($f);let t=this.state.facet(ce.cspNonce);Ao.mount(this.root,this.styleModules.concat(x4).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 Zb(this,t,aT(this,t,i,l))}moveByGroup(t,i){return Zb(this,t,aT(this,t,i,(l)=>X3(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 W.cursor(r.side(i,s)+t.from,r.forward(!i,s)?1:-1)}moveToLineBoundary(t,i,l=!0){return Y3(this,t,i,l)}moveVertically(t,i,l){return Zb(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=fv(this,t,i);return l&&l.pos}posAndSideAtCoords(t,i=!0){return this.readMeasured(),fv(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==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(XT)||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>A4)return UT(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||_T(r.isolates,l=oT(this,t))))return r.order;if(!l)l=oT(this,t);let s=k3(t.text,i,l);return this.bidiCache.push(new dm(t.from,t.to,i,l,!0,s)),s}get hasFocus(){var t;return(this.dom.ownerDocument.hasFocus()||Z.safari&&((t=this.inputState)===null||t===void 0?void 0:t.lastContextMenu)>Date.now()-30000)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{RT(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 Gp.of(new zu(typeof t=="number"?W.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 Gp.of(new zu(W.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 ls.define(()=>({}),{eventHandlers:t})}static domEventObservers(t){return ls.define(()=>({}),{eventObservers:t})}static theme(t,i){let l=Ao.newName(),s=[Kp.of(l),$f.of(yv(`.${l}`,t))];if(i&&i.dark)s.push(mv.of(!0));return s}static baseTheme(t){return es.lowest($f.of(yv("."+gv,t,BE)))}static findFromDOM(t){var i;let l=t.querySelector(".cm-content"),s=l&&_t.get(l)||_t.get(t);return((i=s===null||s===void 0?void 0:s.root)===null||i===void 0?void 0:i.view)||null}}ce.styleModule=$f;ce.inputHandler=PT;ce.clipboardInputFilter=xv;ce.clipboardOutputFilter=kv;ce.scrollHandler=QT;ce.focusChangeEffect=YT;ce.perLineTextDirection=XT;ce.exceptionSink=$T;ce.updateListener=rv;ce.editable=ns;ce.mouseSelectionStyle=IT;ce.dragMovesSelection=jT;ce.clickAddsSelectionRange=VT;ce.decorations=mm;ce.blockWrappers=FT;ce.outerDecorations=Av;ce.atomicRanges=th;ce.bidiIsolatedRanges=JT;ce.cursorScrollMargin=he.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}}});ce.scrollMargins=ZT;ce.darkTheme=mv;ce.cspNonce=he.define({combine:(t)=>t.length?t[0]:""});ce.contentAttributes=Cv;ce.editorAttributes=WT;ce.lineWrapping=ce.contentAttributes.of({class:"cm-lineWrapping"});ce.announce=Ct.define();var A4=4096,xT={};class dm{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 dm(i.mapPos(c.from,1),i.mapPos(c.to,-1),c.dir,c.isolates,!1,c.order))}return l}}function kT(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)vv(h,l)}return l}var T4=Z.mac?"mac":Z.windows?"win":Z.linux?"linux":"key";function E4(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 em(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 M4=es.default(ce.domEventHandlers({keydown(t,i){return L4(D4(i.state),t,i,"editor")}})),oh=he.define({enables:M4}),CT=new WeakMap;function D4(t){let i=t.facet(oh),l=CT.get(i);if(!l)CT.set(i,l=R4(i.reduce((s,r)=>s.concat(r),[])));return l}var ia=null,O4=4000;function R4(t,i=T4){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((_)=>E4(_,i));for(let _=1;_<E.length;_++){let V=E.slice(0,_).join(" ");if(r(V,!0),!k[V])k[V]={preventDefault:!0,stopPropagation:!1,run:[(j)=>{let ee=ia={view:j,prefix:V,scope:h};return setTimeout(()=>{if(ia==ee)ia=null},O4),!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,bv))}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 bv=null;function L4(t,i,l,s){bv=i;let r=J2(i),c=Vb(r,0),h=jb(c)==r.length&&r!=" ",d="",m=!1,y=!1,b=!1;if(ia&&ia.view==l&&ia.scope==s){if(d=ia.prefix+" ",bE.indexOf(i.keyCode)<0)y=!0,ia=null}let S=new Set,w=(L)=>{if(L){for(let _ of L.run)if(!S.has(_)){if(S.add(_),_(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+em(r,i,!h)]))m=!0;else if(h&&(i.altKey||i.metaKey||i.ctrlKey)&&!(Z.windows&&i.ctrlKey&&i.altKey)&&!(Z.mac&&i.altKey&&!(i.ctrlKey||i.metaKey))&&(E=ts[i.keyCode])&&E!=r){if(w(k[d+em(E,i,!0)]))m=!0;else if(i.shiftKey&&(R=Du[i.keyCode])!=r&&R!=E&&w(k[d+em(R,i,!1)]))m=!0}else if(h&&i.shiftKey&&w(k[d+em(r,i,!0)]))m=!0;if(!m&&w(k._any))m=!0}if(y)m=!0;if(m&&b)i.stopPropagation();return bv=null,m}var b6=/x/.unicode!=null?"gu":"g";class la extends ko{compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}eq(t){return!1}destroy(t){}}la.prototype.elementClass="";la.prototype.toDOM=void 0;la.prototype.mapMode=En.TrackBefore;la.prototype.startSide=la.prototype.endSide=-1;la.prototype.point=!0;var Ov,aa=new Fn;function rh(t){return he.define({combine:t?(i)=>i.concat(t):void 0})}var vm=new Fn;class ui{constructor(t,i,l=[],s=""){if(this.data=t,this.name=s,!Ve.prototype.hasOwnProperty("tree"))Object.defineProperty(Ve.prototype,"tree",{get(){return jt(this)}});this.parser=i,this.extension=[qu.of(this),Ve.languageData.of((r,c,h)=>{let d=NE(r,c,h),m=d.type.prop(aa);if(!m)return[];let y=r.facet(m),b=d.type.prop(vm);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 NE(t,i,l).type.prop(aa)==this.data}findRegions(t){let i=t.facet(qu);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(aa)==this.data){l.push({from:c,to:c+r.length});return}let h=r.prop(Fn.mounted);if(h){if(h.tree.prop(aa)==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 Wn)s(m,r.positions[d]+c)}};return s(jt(t),0),l}get allowsNesting(){return!0}}ui.setState=Ct.define();function NE(t,i,l){let s=t.facet(qu),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 ss extends ui{constructor(t,i,l){super(t,i,[],l);this.parser=i}static define(t){let i=rh(t.languageData);return new ss(i,t.parser.configure({props:[aa.add((l)=>l.isTop?i:void 0)]}),t.name)}configure(t,i){return new ss(this.data,this.parser.configure(t),i||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function jt(t){let i=t.field(ui.state,!1);return i?i.tree:Wn.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 lh=null;class _u{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 _u(t,i,[],Wn.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!=Wn.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(sh.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(sh.addTree(this.tree,this.fragments,!0)),this.parse=null}}withContext(t){let i=lh;lh=this;try{return t()}finally{lh=i}}withoutTempSkipped(t){for(let i;i=this.tempSkipped.pop();)t=_E(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=sh.applyChanges(l,d),s=Wn.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 _u(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=_E(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 bm{createParse(i,l,s){let r=s[0].from,c=s[s.length-1].to;return{parsedPos:r,advance(){let d=lh;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 Wn(as.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 lh}}function _E(t,i,l){return sh.applyChanges(t,[{fromA:i,toA:l,fromB:i,toB:l}])}class Uu{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 Uu(i)}static init(t){let i=Math.min(3000,t.doc.length),l=_u.create(t.facet(qu).parser,t,{from:0,to:i});if(!l.work(20,i))l.takeTree();return new Uu(l)}}ui.state=Co.define({create:Uu.init,update(t,i){for(let l of i.effects)if(l.is(ui.setState))return l.value;if(i.startState.facet(qu)!=i.state.facet(qu))return Uu.init(i.state);return t.apply(i)}});var PE=(t)=>{let i=setTimeout(()=>t(),500);return()=>clearTimeout(i)};if(typeof requestIdleCallback<"u")PE=(t)=>{let i=-1,l=setTimeout(()=>{i=requestIdleCallback(t,{timeout:400})},100);return()=>i<0?clearTimeout(l):cancelIdleCallback(i)};var Rv=typeof navigator<"u"&&((Ov=navigator.scheduling)===null||Ov===void 0?void 0:Ov.isInputPending)?()=>navigator.scheduling.isInputPending():null,B4=ls.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(ui.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(ui.state);if(l.tree!=l.context.tree||!l.context.isDone(i.doc.length))this.working=PE(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(ui.state);if(c.tree==c.context.tree&&c.context.isDone(r+1e5))return;let h=Date.now()+Math.min(this.chunkBudget,100,i&&!Rv?Math.max(25,i.timeRemaining()-5):1e9),d=c.context.treeLen<r&&s.doc.length>r+1000,m=c.context.work(()=>Rv&&Rv()||Date.now()>h,r+(d?0:1e5));if(this.chunkBudget-=Date.now()-l,m||this.chunkBudget<=0)c.context.takeTree(),this.view.dispatch({effects:ui.setState.of(new Uu(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)=>eo(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()}}}),qu=he.define({combine(t){return t.length?t[0]:null},enables:(t)=>[ui.state,B4,ce.contentAttributes.compute([t],(i)=>{let l=i.facet(t);return l&&l.name?{"data-language":l.name}:{}})]});class dl{constructor(t,i=[]){this.language=t,this.support=i,this.extension=[t,i]}}class uh{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 uh(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 Sm=he.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 ra=new Fn;function z4(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 YE({closing:t,align:i=!0,units:l=1}){return(s)=>H4(s,i,l,t)}function H4(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?z4(t):null;if(m)return d?t.column(m.from):t.column(m.to);return t.baseIndent+(d?0:t.unit*l)}var XE=(t)=>t.baseIndent;function Vu({except:t,units:i=1}={}){return(l)=>{let s=t&&t.test(l.textAfter);return l.baseIndent+(s?0:i*l.unit)}}var QE=he.define(),rs=new Fn;function wm(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 ju{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 ui?(h)=>h.prop(aa)==c.data:c?(h)=>h==c:void 0,this.style=jE(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 ju(t,i||{})}}var zv=he.define(),GE=he.define({combine(t){return t.length?[t[0]]:null}});function Lv(t){let i=t.facet(zv);return i.length?i:t.facet(GE)}function WE(t,i){let l=[N4],s;if(t instanceof ju){if(t.module)l.push(ce.styleModule.of(t.module));s=t.themeType}if(i===null||i===void 0?void 0:i.fallback)l.push(GE.of(t));else if(s)l.push(zv.computeN([ce.darkTheme],(r)=>r.facet(ce.darkTheme)==(s=="dark")?[t]:[]));else l.push(zv.of(t));return l}class FE{constructor(t){this.markCache=Object.create(null),this.tree=jt(t.state),this.decorations=this.buildDeco(t,Lv(t.state)),this.decoratedTo=t.viewport.to}update(t){let i=jt(t.state),l=Lv(t.state),s=l!=Lv(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 wt.none;let l=new ir;for(let{from:s,to:r}of t.visibleRanges)IE(this.tree,i,(c,h,d)=>{l.add(c,h,this.markCache[d]||(this.markCache[d]=wt.mark({class:d})))},s,r);return l.finish()}}var N4=es.high(ls.fromClass(FE,{decorations:(t)=>t.decorations})),E6=ju.define([{tag:G.meta,color:"#404740"},{tag:G.link,textDecoration:"underline"},{tag:G.heading,textDecoration:"underline",fontWeight:"bold"},{tag:G.emphasis,fontStyle:"italic"},{tag:G.strong,fontWeight:"bold"},{tag:G.strikethrough,textDecoration:"line-through"},{tag:G.keyword,color:"#708"},{tag:[G.atom,G.bool,G.url,G.contentSeparator,G.labelName],color:"#219"},{tag:[G.literal,G.inserted],color:"#164"},{tag:[G.string,G.deleted],color:"#a11"},{tag:[G.regexp,G.escape,G.special(G.string)],color:"#e40"},{tag:G.definition(G.variableName),color:"#00f"},{tag:G.local(G.variableName),color:"#30a"},{tag:[G.typeName,G.namespace],color:"#085"},{tag:G.className,color:"#167"},{tag:[G.special(G.variableName),G.macroName],color:"#256"},{tag:G.definition(G.propertyName),color:"#00c"},{tag:G.comment,color:"#940"},{tag:G.invalid,color:"#f00"}]);var JE=new Fn;var _4=Object.create(null),UE=[as.none];var qE=[],VE=Object.create(null),U4=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"]])U4[t]=q4(_4,i);function Bv(t,i){if(qE.indexOf(t)>-1)return;qE.push(t),console.warn(i)}function q4(t,i){let l=[];for(let d of i.split(" ")){let m=[];for(let y of d.split(".")){let b=t[y]||G[y];if(!b)Bv(y,`Unknown highlighting tag ${y}`);else if(typeof b=="function")if(!m.length)Bv(y,`Modifier ${y} used at start of tag`);else m=m.map(b);else if(m.length)Bv(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=VE[r];if(c)return c.id;let h=VE[r]=as.define({id:UE.length,name:s,props:[ah({[s]:l})]});return UE.push(h),h.id}var M6={rtl:wt.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"rtl"},bidiIsolate:Xt.RTL}),ltr:wt.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"ltr"},bidiIsolate:Xt.LTR}),auto:wt.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"auto"},bidiIsolate:null})};class Hv{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(j4(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 ZE(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 V4(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=ZE(i)+ZE(l)+"*$";return[new RegExp("^"+s),new RegExp(s)]}function eM(t){let i=t.map((r)=>typeof r=="string"?{label:r}:r),[l,s]=i.every((r)=>/^\w+$/.test(r.label))?[/\w*$/,/\w+$/]:V4(i);return(r)=>{let c=r.matchBefore(s);return c||r.explicit?{from:c?c.from:r.pos,options:i,validFor:l}:null}}function tM(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 j4(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 I4=Ki.define();var _6=typeof navigator=="object"&&/Win/.test(navigator.platform);var $4=ce.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 nM{constructor(t,i,l,s){this.field=t,this.line=i,this.from=l,this.to=s}}class Nv{constructor(t,i,l){this.field=t,this.from=i,this.to=l}map(t){let i=t.mapPos(this.from,-1,En.TrackDel),l=t.mapPos(this.to,1,En.TrackDel);return i==null||l==null?null:new Nv(this.field,i,l)}}class _v{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(Sm);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 Nv(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 nM(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 _v(l,s)}}var P4=wt.widget({widget:new class extends sa{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),Y4=wt.mark({class:"cm-snippetField"});class Iu{constructor(t,i){this.ranges=t,this.active=i,this.deco=wt.set(t.map((l)=>(l.from==l.to?P4:Y4).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 Iu(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 fh=Ct.define({map(t,i){return t&&t.map(i)}}),X4=Ct.define(),ch=Co.define({create(){return null},update(t,i){for(let l of i.effects){if(l.is(fh))return l.value;if(l.is(X4)&&t)return new Iu(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)=>ce.decorations.from(t,(i)=>i?i.deco:wt.none)});function Uv(t,i){return W.create(t.filter((l)=>l.field==i).map((l)=>W.range(l.from,l.to)))}function Q4(t){let i=_v.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?[I4.of(s),cn.userEvent.of("input.complete")]:void 0};if(d.length)y.selection=Uv(d,0);if(d.some((b)=>b.field>0)){let b=new Iu(d,0),S=y.effects=[fh.of(b)];if(l.state.field(ch,!1)===void 0)S.push(Ct.appendConfig.of([ch,Z4,K4,$4]))}l.dispatch(l.state.update(y))}}function iM(t){return({state:i,dispatch:l})=>{let s=i.field(ch,!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:Uv(s.ranges,r),effects:fh.of(c?null:new Iu(s.ranges,r)),scrollIntoView:!0})),!0}}var G4=({state:t,dispatch:i})=>{if(!t.field(ch,!1))return!1;return i(t.update({effects:fh.of(null)})),!0},W4=iM(1),F4=iM(-1);var J4=[{key:"Tab",run:W4,shift:F4},{key:"Escape",run:G4}],KE=he.define({combine(t){return t.length?t[0]:J4}}),Z4=es.highest(oh.compute([KE],(t)=>t.facet(KE)));function Jn(t,i){return{...i,apply:Q4(t)}}var K4=ce.domEventHandlers({mousedown(t,i){let l=i.state.field(ch,!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:Uv(l.ranges,r.field),effects:fh.of(l.ranges.some((c)=>c.field>r.field)?new Iu(l.ranges,r.field):null),scrollIntoView:!0}),!0}});var oM=new class extends ko{};oM.startSide=1;oM.endSide=-1;var U6=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent);class Cm{static create(t,i,l,s,r){let c=s+(s<<8)+t+(i<<4)|0;return new Cm(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=[[Fn.contextHash,s]]}addChild(t,i){if(t.prop(Fn.contextHash)!=this.hash)t=new Wn(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 Wn(t.types[this.type],this.children,this.positions,i-this.from).balance({makeTree:(s,r,c)=>new Wn(as.none,s,r,c,this.hashProp)})}}var P;(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"})(P||(P={}));class bM{constructor(t,i){this.start=t,this.content=i,this.marks=[],this.parsers=[]}}class vM{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 dh(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 lM(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==P.OrderedList?Gv:Qv)(l,i,!1);return s>0&&(t.type!=P.BulletList||Xv(l,i,!1)<0)&&l.text.charCodeAt(l.pos+s-1)==t.value}var SM={[P.Blockquote](t,i,l){if(l.next!=62)return!1;return l.markers.push(Xe(P.QuoteMark,i.lineStart+l.pos,i.lineStart+l.pos+1)),l.moveBase(l.pos+(io(l.text.charCodeAt(l.pos+1))?2:1)),t.end=i.lineStart+l.text.length,!0},[P.ListItem](t,i,l){if(l.indent<l.baseIndent+t.value&&l.next>-1)return!1;return l.moveBaseColumn(l.baseIndent+t.value),!0},[P.OrderedList]:lM,[P.BulletList]:lM,[P.Document](){return!0}};function io(t){return t==32||t==9||t==10||t==13}function dh(t,i=0){while(i<t.length&&io(t.charCodeAt(i)))i++;return i}function sM(t,i,l){while(i>l&&io(t.charCodeAt(i-1)))i--;return i}function wM(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 xM(t){return t.next!=62?-1:t.text.charCodeAt(t.pos+1)==32?2:1}function Xv(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(!io(c))return-1}if(l&&t.next==45&&AM(t)>-1&&t.depth==i.stack.length&&i.parser.leafBlockParsers.indexOf(RM.SetextHeading)>-1)return-1;return s<3?-1:1}function kM(t,i){for(let l=t.stack.length-1;l>=0;l--)if(t.stack[l].type==i)return!0;return!1}function Qv(t,i,l){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||io(t.text.charCodeAt(t.pos+1)))&&(!l||kM(i,P.BulletList)||t.skipSpace(t.pos+2)<t.text.length)?1:-1}function Gv(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&&!io(t.text.charCodeAt(s+1))||l&&!kM(i,P.OrderedList)&&(t.skipSpace(s+1)==t.text.length||s>t.pos+1||t.next!=49))return-1;return s+1-t.pos}function CM(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 AM(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&&io(t.text.charCodeAt(i)))i++;return i==t.text.length?l:-1}var jv=/^[ \t]*$/,TM=/-->/,EM=/\?>/,Iv=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,TM],[/^\s*<\?/,EM],[/^\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,jv],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,jv]];function MM(t,i,l){if(t.next!=60)return-1;let s=t.text.slice(t.pos);for(let r=0,c=Iv.length-(l?1:0);r<c;r++)if(Iv[r][0].test(s))return r;return-1}function aM(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 ua(t,i,l){let s=t.length-1;if(s>=0&&t[s].to==i&&t[s].type==P.CodeText)t[s].to=l;else t.push(Xe(P.CodeText,i,l))}var xm={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=[];ua(h,r,c);while(t.nextLine()&&i.depth>=t.stack.length)if(i.pos==i.text.length){ua(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==P.CodeText)ua(h,y.from,y.to);else h.push(y);d=[]}ua(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)ua(h,m,c)}if(d.length){if(d=d.filter((m)=>m.type!=P.CodeText),d.length)i.markers=d.concat(i.markers)}return t.addNode(t.buffer.writeElements(h,-r).finish(P.CodeBlock,c-r),r),!0},FencedCode(t,i){let l=wM(i);if(l<0)return!1;let s=t.lineStart+i.pos,r=i.next,c=l-i.pos,h=i.skipSpace(l),d=sM(i.text,i.text.length,h),m=[Xe(P.CodeMark,s,s+c)];if(h<d)m.push(Xe(P.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)ua(m,t.lineStart-1,t.lineStart);m.push(Xe(P.CodeMark,t.lineStart+i.pos,t.lineStart+w)),t.nextLine();break}else{if(S=!0,!y)ua(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)ua(m,k,E),b=!1}}return t.addNode(t.buffer.writeElements(m,-s).finish(P.FencedCode,t.prevLineEnd()-s),s),!0},Blockquote(t,i){let l=xM(i);if(l<0)return!1;return t.startContext(P.Blockquote,i.pos),t.addNode(P.QuoteMark,t.lineStart+i.pos,t.lineStart+i.pos+1),i.moveBase(i.pos+l),null},HorizontalRule(t,i){if(Xv(i,t,!1)<0)return!1;let l=t.lineStart+i.pos;return t.nextLine(),t.addNode(P.HorizontalRule,l),!0},BulletList(t,i){let l=Qv(i,t,!1);if(l<0)return!1;if(t.block.type!=P.BulletList)t.startContext(P.BulletList,i.basePos,i.next);let s=aM(i,i.pos+1);return t.startContext(P.ListItem,i.basePos,s-i.baseIndent),t.addNode(P.ListMark,t.lineStart+i.pos,t.lineStart+i.pos+l),i.moveBaseColumn(s),null},OrderedList(t,i){let l=Gv(i,t,!1);if(l<0)return!1;if(t.block.type!=P.OrderedList)t.startContext(P.OrderedList,i.basePos,i.text.charCodeAt(i.pos+l-1));let s=aM(i,i.pos+l);return t.startContext(P.ListItem,i.basePos,s-i.baseIndent),t.addNode(P.ListMark,t.lineStart+i.pos,t.lineStart+i.pos+l),i.moveBaseColumn(s),null},ATXHeading(t,i){let l=CM(i);if(l<0)return!1;let s=i.pos,r=t.lineStart+s,c=sM(i.text,i.text.length,s),h=c;while(h>s&&i.text.charCodeAt(h-1)==i.next)h--;if(h==c||h==s||!io(i.text.charCodeAt(h-1)))h=i.text.length;let d=t.buffer.write(P.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(P.HeaderMark,h-s,c-s);let m=d.finish(P.ATXHeading1-1+l,i.text.length-s);return t.nextLine(),t.addNode(m,r),!0},HTMLBlock(t,i){let l=MM(i,t,!1);if(l<0)return!1;let s=t.lineStart+i.pos,r=Iv[l][1],c=[],h=r!=jv;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==TM?P.CommentBlock:r==EM?P.ProcessingInstructionBlock:P.HTMLBlock,m=t.prevLineEnd();return t.addNode(t.buffer.writeElements(c,-s).finish(d,m-s),s),!0},SetextHeading:void 0};class DM{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)&&dh(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(P.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(qM(t,this.pos,this.start,!0)))return-1;if(t.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(Xe(P.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(_M(t,dh(t,this.pos),this.start)))return-1}else if(this.stage==2){let i=dh(t,this.pos),l=0;if(i>this.pos){let s=UM(t,i,this.start);if(s){let r=qv(t,s.to-this.start);if(r>0)this.nextStage(s),l=r}}if(!l)l=qv(t,this.pos);return l>0&&l<t.length?l:-1}else return qv(t,this.pos)}}function qv(t,i){for(;i<t.length;i++){let l=t.charCodeAt(i);if(l==10)break;if(!io(l))return-1}return i}class OM{nextLine(t,i,l){let s=i.depth<t.stack.length?-1:AM(i),r=i.next;if(s<0)return!1;let c=Xe(P.HeaderMark,t.lineStart+i.pos,t.lineStart+s);return t.nextLine(),t.addLeafElement(l,Xe(r==61?P.SetextHeading1:P.SetextHeading2,l.start,t.prevLineEnd(),[...t.parser.parseInline(l.content,l.start),c])),!0}finish(){return!1}}var RM={LinkReference(t,i){return i.content.charCodeAt(0)==91?new DM(i):null},SetextHeading(){return new OM}},eH=[(t,i)=>CM(i)>=0,(t,i)=>wM(i)>=0,(t,i)=>xM(i)>=0,(t,i)=>Qv(i,t,!0)>=0,(t,i)=>Gv(i,t,!0)>=0,(t,i)=>Xv(i,t,!0)>=0,(t,i)=>MM(i,t,!0)>=0],tH={text:"",end:0};class LM{constructor(t,i,l,s){this.parser=t,this.input=i,this.ranges=s,this.line=new vM,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=Cm.create(P.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=l.length?new VM(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 bM(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=jM(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=tH;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 "+P[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=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 {
|
|
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=Cm.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 Wn(this.parser.nodeSet.types[t],$u,$u,(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(Pv(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?BM(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=Pv(this.parser.parseInline(t.content,t.start),t.marks);this.addNode(this.buffer.writeElements(i,-t.start).finish(P.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 Fv(t,i)}get buffer(){return new Wv(this.parser.nodeSet)}}function BM(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=BM(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 Wn(l.type,h,d,l.to+s-m,l.tree?l.tree.propValues:void 0)}class gh extends bm{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 LM(this,t,i,l);for(let r of this.wrappers)s=r(s,t,i,l);return s}configure(t){let i=$v(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(hh(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:_}=typeof k=="string"?{name:k}:k;if(S.some((ee)=>ee.name==E))continue;if(L)s[S.length]=(ee,be,ot)=>L(be,ot,ee.value);let V=S.length,j=L?["Block","BlockContext"]:!R?void 0:V>=P.ATXHeading1&&V<=P.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"];if(S.push(as.define({id:V,name:E,props:j&&[[Fn.group,j]]})),_){if(!w)w={};if(Array.isArray(_)||_ instanceof yM)w[E]=_;else Object.assign(w,_)}}if(l=new ym(S),w)l=l.extend(ah(w))}if(hh(i.props))l=l.extend(...i.props);if(hh(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(hh(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?km(h,S.before):S.after?km(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(hh(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?km(m,S.before):S.after?km(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 gh(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 Tm(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 hh(t){return t!=null&&t.length>0}function $v(t){if(!Array.isArray(t))return t;if(t.length==0)return null;let i=$v(t[0]);if(t.length==1)return i;let l=$v(t.slice(1));if(!l||!i)return i||l;let s=(h,d)=>(h||$u).concat(d||$u),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 km(t,i){let l=t.indexOf(i);if(l<0)throw RangeError(`Position specified relative to unknown parser ${i}`);return l}var zM=[as.none];for(let t=1,i;i=P[t];t++)zM[t]=as.define({id:t,name:i,props:t>=P.Escape?[]:[[Fn.group,t in SM?["Block","BlockContext"]:["Block","LeafBlock"]]],top:i=="Document"});var $u=[];class Wv{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 Wn.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:t,length:i})}}class Pu{constructor(t,i,l,s=$u){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 Wv(t).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}}class Fv{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 $u}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 Pu(t,i,l,s)}var HM={resolve:"Emphasis",mark:"EmphasisMark"},NM={resolve:"Emphasis",mark:"EmphasisMark"},fr={},Am={};class ci{constructor(t,i,l,s){this.type=t,this.from=i,this.to=l,this.side=s}}var rM="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",mh=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{mh=new RegExp("[\\p{S}|\\p{P}]","u")}catch(t){}var Vv={Escape(t,i,l){if(i!=92||l==t.end-1)return-1;let s=t.char(l+1);for(let r=0;r<rM.length;r++)if(rM.charCodeAt(r)==s)return t.append(Xe(P.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(P.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(P.InlineCode,l,s+1,[Xe(P.CodeMark,l,l+r),Xe(P.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(P.Autolink,l,l+1+r[0].length,[Xe(P.LinkMark,l,l+1),Xe(P.URL,l+1,l+r[0].length),Xe(P.LinkMark,l+r[0].length,l+1+r[0].length)]));let c=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(s);if(c)return t.append(Xe(P.Comment,l,l+1+c[0].length));let h=/^\?[^]*?\?>/.exec(s);if(h)return t.append(Xe(P.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(P.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=mh.test(r),d=mh.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 ci(i==95?HM:NM,l,s,(w?1:0)|(k?2:0)))},HardBreak(t,i,l){if(i==92&&t.char(l+1)==10)return t.append(Xe(P.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(P.HardBreak,l,s+1))}return-1},Link(t,i,l){return i==91?t.append(new ci(fr,l,l+1,1)):-1},Image(t,i,l){return i==33&&t.char(l+1)==91?t.append(new ci(Am,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 ci&&(r.type==fr||r.type==Am)){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]=nH(t,c,r.type==fr?P.Link:P.Image,r.from,l+1);if(r.type==fr)for(let d=0;d<s;d++){let m=t.parts[d];if(m instanceof ci&&m.type==fr)m.side=0}return h.to}}return-1}};function nH(t,i,l,s,r){let{text:c}=t,h=t.char(r),d=r;if(i.unshift(Xe(P.LinkMark,s,s+(l==P.Image?2:1))),i.push(Xe(P.LinkMark,r-1,r)),h==40){let m=t.skipSpace(r+1),y=_M(c,m-t.offset,t.offset),b;if(y){if(m=t.skipSpace(y.to),m!=y.to){if(b=UM(c,m-t.offset,t.offset),b)m=t.skipSpace(b.to)}}if(t.char(m)==41){if(i.push(Xe(P.LinkMark,r,r+1)),d=m+1,y)i.push(y);if(b)i.push(b);i.push(Xe(P.LinkMark,m,d))}}else if(h==91){let m=qM(c,r-t.offset,t.offset,!1);if(m)i.push(m),d=m.to}return Xe(l,s,d,i)}function _M(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(P.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(io(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(P.URL,i+l,c+l):c==t.length?null:!1}}function UM(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(P.LinkTitle,i+l,c+1+l);else if(d==92)h=!0}return null}function qM(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(P.LinkLabel,i+l,c+1+l);else{if(s&&!io(d))s=!1;if(d==91)return!1;else if(d==92)r=!0}}return null}class Tm{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 ci(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 ci&&(i.type==fr||i.type==Am))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 ci&&s.type.resolve&&s.side&2))continue;let r=s.type==HM||s.type==NM,c=s.to-s.from,h,d=l-1;for(;d>=t;d--){let E=this.parts[d];if(E instanceof ci&&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 Pu)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 ci(h.type,h.from,b,h.side):null,this.parts[l]=r&&s.to!=S?new ci(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 Pu)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 ci&&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 ci?i:null}skipSpace(t){return dh(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 Fv(t,i)}}Tm.linkStart=fr;Tm.imageStart=Am;function Pv(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 Pu)l[s]=new Pu(c.type,c.from,c.to,Pv(c.children,[r]))}else l.splice(s++,0,r)}return l}var iH=[P.CodeBlock,P.ListItem,P.OrderedList,P.BulletList];class VM{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(Fn.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=jM(i.from-l,t.ranges);if(i.to-l<=t.ranges[t.rangeI].to)t.addNode(i.tree,y);else{let b=new Wn(t.parser.nodeSet.types[P.Paragraph],[],[],0,t.block.hashProp);t.reusePlaceholders.set(b,i.tree),t.addNode(b,y)}if(i.type.is("Block")){if(iH.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 jM(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 oH=ah({"Blockquote/...":G.quote,HorizontalRule:G.contentSeparator,"ATXHeading1/... SetextHeading1/...":G.heading1,"ATXHeading2/... SetextHeading2/...":G.heading2,"ATXHeading3/...":G.heading3,"ATXHeading4/...":G.heading4,"ATXHeading5/...":G.heading5,"ATXHeading6/...":G.heading6,"Comment CommentBlock":G.comment,Escape:G.escape,Entity:G.character,"Emphasis/...":G.emphasis,"StrongEmphasis/...":G.strong,"Link/... Image/...":G.link,"OrderedList/... BulletList/...":G.list,"BlockQuote/...":G.quote,"InlineCode CodeText":G.monospace,"URL Autolink":G.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":G.processingInstruction,"CodeInfo LinkLabel":G.labelName,LinkTitle:G.string,Paragraph:G.content}),IM=new gh(new ym(zM).extend(oH),Object.keys(xm).map((t)=>xm[t]),Object.keys(xm).map((t)=>RM[t]),Object.keys(xm),eH,SM,Object.keys(Vv).map((t)=>Vv[t]),Object.keys(Vv),[]);function lH(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:gM((r,c)=>{let h=r.type.id;if(i&&(h==P.CodeBlock||h==P.FencedCode)){let d="";if(h==P.FencedCode){let y=r.node.getChild(P.CodeInfo);if(y)d=c.read(y.from,y.to)}let m=i(d);if(m)return{parser:m,overlay:(y)=>y.type.id==P.CodeText,bracketed:h==P.FencedCode}}else if(l&&(h==P.HTMLBlock||h==P.HTMLTag||h==P.CommentBlock))return{parser:l,overlay:lH(r.node,r.from,r.to)};return null})}}var sH={resolve:"Strikethrough",mark:"StrikethroughMark"},aH={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":G.strikethrough}},{name:"StrikethroughMark",style:G.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=mh.test(s),m=mh.test(r);return t.addDelimiter(sH,l,l+2,!h&&(!m||c||d),!c&&(!d||h||m))},after:"Emphasis"}]};function ph(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 uM(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 PM=/^[>\s]*\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class Yv{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)&&PM.test(s=i.text.slice(i.pos))){let r=[];if(ph(t,l.content,0,r,l.start)==ph(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=[];ph(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 rH={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":G.heading}},"TableRow",{name:"TableCell",style:G.content},{name:"TableDelimiter",style:G.processingInstruction}],parseBlock:[{name:"Table",leaf(t,i){return uM(i.content,0)?new Yv:null},endLeaf(t,i,l){if(l.parsers.some((r)=>r instanceof Yv)||!uM(i.text,i.basePos))return!1;let s=t.peekLine();return PM.test(s)&&ph(t,i.text,i.basePos)==ph(t,s,i.basePos)},before:"SetextHeading"}]};class YM{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 uH={defineNodes:[{name:"Task",block:!0,style:G.list},{name:"TaskMarker",style:G.atom}],parseBlock:[{name:"TaskList",leaf(t,i){return/^\[[ xX]\][ \t]/.test(i.content)&&t.parentType().name=="ListItem"?new YM:null},after:"SetextHeading"}]},cM=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,fM=/[\w-]+(\.[\w-]+)+(:\d+)?(\/[^\s<]*)?/gy,cH=/[\w-]+\.[\w-]+($|[/:])/,hM=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,dM=/\/[a-zA-Z\d@.]+/gy;function pM(t,i,l,s){let r=0;for(let c=i;c<l;c++)if(t[c]==s)r++;return r}function fH(t,i){fM.lastIndex=i;let l=fM.exec(t);if(!l||cH.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==")"&&pM(t,i,s,")")>pM(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 mM(t,i){hM.lastIndex=i;let l=hM.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 hH={parseInline:[{name:"Autolink",parse(t,i,l){let s=l-t.offset;if(s&&/\w/.test(t.text[s-1]))return-1;cM.lastIndex=s;let r=cM.exec(t.text),c=-1;if(!r)return-1;if(r[1]||r[2]){if(c=fH(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=mM(t.text,s);else if(c=mM(t.text,s+r[0].length),c>-1&&r[0]=="xmpp:"){if(dM.lastIndex=c,r=dM.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}}]},XM=[rH,uH,aH,hH];function QM(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(io(m))break}return-1}}var GM={defineNodes:[{name:"Superscript",style:G.special(G.content)},{name:"SuperscriptMark",style:G.processingInstruction}],parseInline:[{name:"Superscript",parse:QM(94,"Superscript","SuperscriptMark")}]},WM={defineNodes:[{name:"Subscript",style:G.special(G.content)},{name:"SubscriptMark",style:G.processingInstruction}],parseInline:[{name:"Subscript",parse:QM(126,"Subscript","SubscriptMark")}]},FM={defineNodes:[{name:"Emoji",style:G.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 Jv=null;function Zv(){if(!Jv&&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)}}Jv=i.sort().map((s)=>({type:"property",label:s,apply:s+": "}))}return Jv||[]}var JM=["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})),ZM=["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}))),dH=["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})),pH=["@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})),us=/^(\w[\w-]*|-\w[\w-]*|)$/,mH=/^-(-[\w-]*)?$/;function gH(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 KM=new Em,yH=["Declaration"];function bH(t){for(let i=t;;){if(i.type.isTop)return i;if(!(i=i.parent))return t}}function tD(t,i,l){if(i.to-i.from>4096){let s=KM.get(i);if(s)return s;let r=[],c=new Set,h=i.cursor(cr.IncludeAnonymous);if(h.firstChild())do for(let d of tD(t,h.node,l))if(!c.has(d.label))c.add(d.label),r.push(d);while(h.nextSibling());return KM.set(i,r),r}else{let s=[],r=new Set;return i.cursor().iterate((c)=>{var h;if(l(c)&&c.matchContext(yH)&&((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 vH=(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:Zv(),validFor:us};if(r.name=="ValueName")return{from:r.from,options:ZM,validFor:us};if(r.name=="PseudoClassName")return{from:r.from,options:JM,validFor:us};if(t(r)||(i.explicit||c)&&gH(r,l.doc))return{from:t(r)||c?r.from:s,options:tD(l.doc,bH(r),t),validFor:mH};if(r.name=="TagName"){for(let{parent:m}=r;m;m=m.parent)if(m.name=="Block")return{from:r.from,options:Zv(),validFor:us};return{from:r.from,options:dH,validFor:us}}if(r.name=="AtKeyword")return{from:r.from,options:pH,validFor:us};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:JM,validFor:us};if(d&&d.name==":"&&h.name=="Declaration"||h.name=="ArgList")return{from:s,options:ZM,validFor:us};if(h.name=="Block"||h.name=="Styles")return{from:s,options:Zv(),validFor:us};return null},SH=vH((t)=>t.name=="VariableName"),yh=ss.define({name:"css",parser:eD.configure({props:[ra.add({Declaration:Vu()}),rs.add({"Block KeyframeList":wm})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function nD(){return new dl(yh,yh.data.of({autocomplete:SH}))}var aD=[Jn("function ${name}(${params}) {\n\t${}\n}",{label:"function",detail:"definition",type:"keyword"}),Jn("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n\t${}\n}",{label:"for",detail:"loop",type:"keyword"}),Jn("for (let ${name} of ${collection}) {\n\t${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Jn("do {\n\t${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Jn("while (${}) {\n\t${}\n}",{label:"while",detail:"loop",type:"keyword"}),Jn(`try {
|
|
230
230
|
\${}
|
|
231
231
|
} catch (\${error}) {
|
|
232
232
|
\${}
|
|
233
|
-
}`,{label:"try",detail:"/ catch block",type:"keyword"}),
|
|
233
|
+
}`,{label:"try",detail:"/ catch block",type:"keyword"}),Jn("if (${}) {\n\t${}\n}",{label:"if",detail:"block",type:"keyword"}),Jn(`if (\${}) {
|
|
234
234
|
\${}
|
|
235
235
|
} else {
|
|
236
236
|
\${}
|
|
237
|
-
}`,{label:"if",detail:"/ else block",type:"keyword"}),
|
|
237
|
+
}`,{label:"if",detail:"/ else block",type:"keyword"}),Jn(`class \${name} {
|
|
238
238
|
constructor(\${params}) {
|
|
239
239
|
\${}
|
|
240
240
|
}
|
|
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&<.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&<.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&<.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
|
|
241
|
+
}`,{label:"class",detail:"definition",type:"keyword"}),Jn('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Jn('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],wH=aD.concat([Jn("interface ${name} {\n\t${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Jn("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Jn("enum ${name} {\n\t${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),iD=new Em,rD=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function bh(t){return(i,l)=>{let s=i.node.getChild("VariableDefinition");if(s)l(s,t);return!0}}var xH=["FunctionDeclaration"],kH={FunctionDeclaration:bh("function"),ClassDeclaration:bh("class"),ClassExpression:()=>!0,EnumDeclaration:bh("constant"),TypeAliasDeclaration:bh("type"),NamespaceDeclaration:bh("namespace"),VariableDefinition(t,i){if(!t.matchContext(xH))i(t,"variable")},TypeDefinition(t,i){i(t,"type")},__proto__:null};function uD(t,i){let l=iD.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=kH[h.name];if(d&&d(h,c)||rD.has(h.name))return!1}else if(h.to-h.from>8192){for(let d of uD(t,h.node))s.push(d);return!1}}),iD.set(i,s),s}var oD=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,cD=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function CH(t){let i=jt(t.state).resolveInner(t.pos,-1);if(cD.indexOf(i.name)>-1)return null;let l=i.name=="VariableName"||i.to-i.from<20&&oD.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(rD.has(r.name))s=s.concat(uD(t.state.doc,r));return{options:s,from:l?i.from:t.pos,validFor:oD}}var Ro=ss.define({name:"javascript",parser:sD.configure({props:[ra.add({IfStatement:Vu({except:/^\s*({|else\b)/}),TryStatement:Vu({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:XE,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:YE({closing:"}"}),ArrowFunction:(t)=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":Vu({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}}),rs.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":wm,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:"$"}}),fD={test:(t)=>/^JSX/.test(t.name),facet:rh({commentTokens:{block:{open:"{/*",close:"*/}"}}})},Kv=Ro.configure({dialect:"ts"},"typescript"),e1=Ro.configure({dialect:"jsx",props:[vm.add((t)=>t.isTop?[fD]:void 0)]}),t1=Ro.configure({dialect:"jsx ts",props:[vm.add((t)=>t.isTop?[fD]:void 0)]},"typescript"),hD=(t)=>({label:t,type:"keyword"}),dD="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(hD),AH=dD.concat(["declare","implements","private","protected","public"].map(hD));function pD(t={}){let i=t.jsx?t.typescript?t1:e1:t.typescript?Kv:Ro,l=t.typescript?wH.concat(AH):aD.concat(dD);return new dl(i,[Ro.data.of({autocomplete:tM(cD,eM(l))}),Ro.data.of({autocomplete:CH}),t.jsx?MH:[]])}function TH(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 lD(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 EH=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),MH=ce.inputHandler.of((t,i,l,s,r)=>{if((EH?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=lD(h.doc,E.firstChild,b))||((y=E.firstChild)===null||y===void 0?void 0:y.name)=="JSXFragmentTag")){let R=`${w}>`;return{range:W.cursor(b+R.length,-1),changes:{from:b,insert:R}}}}else if(s==">"){let k=TH(S);if(k&&k.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(h.doc.sliceString(b,b+2))&&(w=lD(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 vh=["_blank","_self","_top","_parent"],n1=["ascii","utf-8","utf-16","latin1","latin1"],i1=["get","post","put","delete"],o1=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Di=["true","false"],ie={},DH={a:{attrs:{href:null,ping:null,type:null,media:null,target:vh,hreflang:null}},abbr:ie,address:ie,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:ie,aside:ie,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:ie,base:{attrs:{href:null,target:vh}},bdi:ie,bdo:ie,blockquote:{attrs:{cite:null}},body:ie,br:ie,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:o1,formmethod:i1,formnovalidate:["novalidate"],formtarget:vh,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:ie,center:ie,cite:ie,code:ie,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:ie,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:ie,div:ie,dl:ie,dt:ie,em:ie,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:ie,figure:ie,footer:ie,form:{attrs:{action:null,name:null,"accept-charset":n1,autocomplete:["on","off"],enctype:o1,method:i1,novalidate:["novalidate"],target:vh}},h1:ie,h2:ie,h3:ie,h4:ie,h5:ie,h6:ie,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:ie,hgroup:ie,hr:ie,html:{attrs:{manifest:null}},i:ie,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:o1,formmethod:i1,formnovalidate:["novalidate"],formtarget:vh,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:ie,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:ie,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:ie,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:n1,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:ie,noscript:ie,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:ie,param:{attrs:{name:null,value:null}},pre:ie,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:ie,rt:ie,ruby:ie,samp:ie,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:n1}},section:ie,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:ie,source:{attrs:{src:null,type:null,media:null}},span:ie,strong:ie,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:ie,summary:ie,sup:ie,table:ie,tbody:ie,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:ie,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:ie,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:ie,time:{attrs:{datetime:null}},title:ie,tr:ie,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:ie,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:ie},vD={accesskey:null,class:null,contenteditable:Di,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:Di,autocorrect:Di,autocapitalize:Di,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":Di,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Di,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Di,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Di,"aria-hidden":Di,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Di,"aria-multiselectable":Di,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Di,"aria-relevant":null,"aria-required":Di,"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},SD="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 SD)vD[t]=null;class Yu{constructor(t,i){this.tags={...DH,...t},this.globalAttrs={...vD,...i},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}Yu.default=new Yu;function Xu(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 Qu(t,i=!1){for(;t;t=t.parent)if(t.name=="Element")if(i)i=!1;else return t;return null}function wD(t,i,l){let s=l.tags[Xu(t,Qu(i))];return(s===null||s===void 0?void 0:s.children)||l.allTags}function s1(t,i){let l=[];for(let s=Qu(i);s&&!s.type.isTop;s=Qu(s.parent)){let r=Xu(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 xD=/^[:\-\.\w\u00b7-\uffff]*$/;function mD(t,i,l,s,r){let c=/\s*>/.test(t.sliceDoc(r,r+5))?"":">",h=Qu(l,l.name=="StartTag"||l.name=="TagName");return{from:s,to:r,options:wD(t.doc,h,i).map((d)=>({label:d,type:"type"})).concat(s1(t.doc,l).map((d,m)=>({label:"/"+d,apply:"/"+d+c,type:"type",boost:99-m}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function gD(t,i,l,s){let r=/\s*>/.test(t.sliceDoc(s,s+5))?"":">";return{from:l,to:s,options:s1(t.doc,i).map((c,h)=>({label:c,apply:c+r,type:"type",boost:99-h})),validFor:xD}}function OH(t,i,l,s){let r=[],c=0;for(let h of wD(t.doc,l,i))r.push({label:"<"+h,type:"type"});for(let h of s1(t.doc,l))r.push({label:"</"+h+">",type:"type",boost:99-c++});return{from:s,to:s,options:r,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function RH(t,i,l,s,r){let c=Qu(l),h=c?i.tags[Xu(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:xD}}function LH(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=Qu(l),w=S?i.tags[Xu(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 kD(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)?gD(l,r,r.from,s):mD(l,t,r,r.from,s);else if(r.name=="StartTag"||r.name=="IncompleteTag")return mD(l,t,r,s,s);else if(r.name=="StartCloseTag"||r.name=="IncompleteCloseTag")return gD(l,r,s,s);else if(r.name=="OpenTag"||r.name=="SelfClosingTag"||r.name=="AttributeName")return RH(l,t,r,r.name=="AttributeName"?r.from:s,s);else if(r.name=="Is"||r.name=="AttributeValue"||r.name=="UnquotedAttributeValue")return LH(l,t,r,r.name=="Is"?s:r.from,s);else if(i.explicit&&(c.name=="Element"||c.name=="Text"||c.name=="Document"))return OH(l,t,r,s);else return null}function CD(t){return kD(Yu.default,t)}function BH(t){let{extraTags:i,extraGlobalAttributes:l}=t,s=l||i?new Yu(i,l):Yu.default;return(r)=>kD(s,r)}var zH=Ro.parser.configure({top:"SingleExpression"}),AD=[{tag:"script",attrs:(t)=>t.type=="text/typescript"||t.lang=="ts",parser:Kv.parser},{tag:"script",attrs:(t)=>t.type=="text/babel"||t.type=="text/jsx",parser:e1.parser},{tag:"script",attrs:(t)=>t.type=="text/typescript-jsx",parser:t1.parser},{tag:"script",attrs(t){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type)},parser:zH},{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:yh.parser}],TD=[{name:"style",parser:yh.parser.configure({top:"Styles"})}].concat(SD.map((t)=>({name:t,parser:Ro.parser}))),ED=ss.define({name:"html",parser:bD.configure({props:[ra.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}}),rs.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}}}),JE.add({"OpenTag CloseTag":(t)=>t.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),Mm=ED.configure({wrap:l1(AD,TD)});function MD(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=l1((t.nestedLanguages||[]).concat(AD),(t.nestedAttributes||[]).concat(TD));let s=l?ED.configure({wrap:l,dialect:i}):i?Mm.configure({dialect:i}):Mm;return new dl(s,[Mm.data.of({autocomplete:BH(t)}),t.autoCloseTags!==!1?HH:[],pD().support,nD().support])}var yD=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),HH=ce.inputHandler.of((t,i,l,s,r)=>{if(t.composing||t.state.readOnly||i!=l||s!=">"&&s!="/"||!Mm.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=Xu(h.doc,L.parent,k))&&!yD.has(R)){let _=k+(h.doc.sliceString(k,k+1)===">"?1:0),V=`</${R}>`;return{range:m,changes:{from:k,to:_,insert:V}}}}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=Xu(h.doc,L,k))&&!yD.has(R)){let _=k+(h.doc.sliceString(k,k+1)===">"?1:0),V=`${R}>`;return{range:W.cursor(k+V.length,-1),changes:{from:k,to:_,insert:V}}}}return{range:m}});if(d.changes.empty)return!1;return t.dispatch([c,h.update(d,{userEvent:"input.complete",scrollIntoView:!0})]),!0});var RD=rh({commentTokens:{block:{open:"<!--",close:"-->"}}}),LD=new Fn,BD=IM.configure({props:[rs.add((t)=>!t.is("Block")||t.is("Document")||u1(t)!=null||NH(t)?void 0:(i,l)=>({from:l.doc.lineAt(i.from).to,to:i.to})),LD.add(u1),ra.add({Document:()=>null}),aa.add({Document:RD})]});function u1(t){let i=/^(?:ATX|Setext)Heading(\d)$/.exec(t.name);return i?+i[1]:void 0}function NH(t){return t.name=="OrderedList"||t.name=="BulletList"}function _H(t,i){let l=t;for(;;){let s=l.nextSibling,r;if(!s||(r=u1(s.type))!=null&&r<=i)break;l=s}return l.to}var UH=QE.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(LD);if(r==null)continue;let c=_H(s,r);if(c>l)return{from:l,to:c}}return null});function c1(t){return new ui(RD,t,[],"markdown")}var qH=c1(BD),VH=BD.configure([XM,WM,GM,FM,{props:[rs.add({Table:(t,i)=>({from:i.doc.lineAt(t.from).to,to:t.to})})]}]),Om=c1(VH);function jH(t,i){return(l)=>{if(l&&t){let s=null;if(l=/\S*/.exec(l)[0],typeof t=="function")s=t(l);else s=uh.matchLanguageName(t,l,!0);if(s instanceof uh)return s.support?s.support.language.parser:_u.getSkippingParser(s.load());else if(s)return s.parser}return i?i.parser:null}}class Dm{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(+HD(this.item,t)[2]+i):"";return this.spaceBefore+l+this.type+this.spaceAfter}}function zD(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 Dm(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 Dm(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 Dm(c.parent,m,m+b,h[1],y,S,c))}}return s}function HD(t,i){return/^(\s*)(\d+)(?=[.)])/.exec(i.sliceString(t.from,t.from+10))}function a1(t,i,l,s=0){for(let r=-1,c=t;;){if(c.name=="ListItem"){let d=HD(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 f1(t,i){let l=/^[ \t]*/.exec(t)[0].length;if(!l||i.facet(Sm)!="\t")return t;let s=na(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 IH=(t={})=>({state:i,dispatch:l})=>{let s=jt(i),{doc:r}=i,c=null,h=i.changeByRange((d)=>{if(!d.empty||!Om.isActiveAt(i,d.from,-1)&&!Om.isActiveAt(i,d.from,1))return c={range:d};let m=d.from,y=r.lineAt(m),b=zD(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 _=S.node.firstChild,V=S.node.getChild("ListItem","ListItem");if(_.to>=m||V&&V.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,ee,be="";if(j&&j.item)ee=y.from+j.from,be=j.marker(r,1);else ee=y.from+(j?j.to:0);let ot=[{from:ee,to:m,insert:be}];if(S.node.name=="OrderedList")a1(S.item,r,ot,-2);if(j&&j.node.name=="OrderedList")a1(j.item,r,ot);return{range:W.cursor(ee+be.length),changes:ot}}else{let j=OD(b,i,y);return{range:W.cursor(m+j.length+1),changes:{from:y.from,insert:j+i.lineBreak}}}}if(S.node.name=="Blockquote"&&w&&y.from){let _=r.lineAt(y.from-1),V=/>\s*$/.exec(_.text);if(V&&V.index==S.from){let j=i.changes([{from:_.from+V.index,to:_.to},{from:y.from+S.from,to:y.to}]);return{range:d.map(j),changes:j}}}let k=[];if(S.node.name=="OrderedList")a1(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 _=0,V=b.length-1;_<=V;_++)R+=_==V&&!E?b[_].marker(r,1):b[_].blank(_<V?na(y.text,4,b[_+1].from)-R.length:null);let L=m;while(L>y.from&&/\s/.test(y.text.charAt(L-y.from-1)))L--;if(R=f1(R,i),PH(S.node,i.doc))R=OD(b,i,y)+i.lineBreak+R;return k.push({from:L,to:m,insert:i.lineBreak+R}),{range:W.cursor(L+R.length+1),changes:k}});if(c)return!1;return l(i.update(h,{scrollIntoView:!0,userEvent:"input"})),!0},$H=IH();function DD(t){return t.name=="QuoteMark"||t.name=="ListMark"}function PH(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 OD(t,i,l){let s="";for(let r=0,c=t.length-2;r<=c;r++)s+=t[r].blank(r<c?na(l.text,4,t[r+1].from)-s.length:null,r<c);return f1(s,i)}function YH(t,i){let l=t.resolveInner(i,-1),s=i;if(DD(l))s=l.from,l=l.parent;for(let r;r=l.childBefore(s);)if(DD(r))s=r.from;else if(r.name=="OrderedList"||r.name=="BulletList")l=r.lastChild,s=l.to;else break;return l}var XH=({state:t,dispatch:i})=>{let l=jt(t),s=null,r=t.changeByRange((c)=>{let h=c.from,{doc:d}=t;if(c.empty&&Om.isActiveAt(t,c.from)){let m=d.lineAt(h),y=zD(YH(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:W.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(na(m.text,4,b.to)-na(m.text,4,b.from));if(w==m.from)k=f1(k,t);return{range:W.cursor(w+k.length),changes:{from:w,to:m.from+b.to,insert:k}}}if(w<h)return{range:W.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:$H},{key:"Backspace",run:XH}],ND=MD({matchClosingTags:!1});function _D(t={}){let{codeLanguages:i,defaultCodeLanguage:l,addKeymap:s=!0,base:{parser:r}=qH,completeHTMLTags:c=!0,pasteURLAsLink:h=!0,htmlTagLanguage:d=ND}=t;if(!(r instanceof gh))throw RangeError("Base parser provided to `markdown` should be a Markdown parser");let m=t.extensions?[t.extensions]:[],y=[d.support,UH],b;if(h)y.push(JH);if(l instanceof dl)y.push(l.support),b=l.language;else if(l)b=l;let S=i||b?jH(i,b):void 0;if(m.push($M({codeParser:S,htmlParser:d.language.parser})),s)y.push(es.high(oh.of(QH)));let w=c1(r.configure(m));if(c)y.push(w.data.of({autocomplete:GH}));return new dl(w,y)}function GH(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:WH(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var r1=null;function WH(){if(r1)return r1;let t=CD(new Hv(Ve.create({extensions:ND}),0,!0));return r1=t?t.options:[]}var FH=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,JH=ce.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(!Om.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||FH.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=tt(Fl(),1);var je=tt(bn(),1),ZH=["source","split","preview"];function KH(t){return t==="source"||t==="split"||t==="preview"}var eN={source:"Source",split:"Split",preview:"Preview"},ID=Ki.define(),tN=ju.define([{tag:G.heading,color:"var(--console-accent-dim)",fontWeight:"500"},{tag:G.meta,color:"var(--console-text-muted)"},{tag:G.emphasis,fontStyle:"italic"},{tag:G.strong,fontWeight:"600"},{tag:[G.link,G.url],color:"var(--console-accent-dim)"},{tag:G.quote,color:"var(--console-text-dim)"}]),nN=[_D(),WE(tN),ce.lineWrapping,ce.contentAttributes.of({"aria-label":"Markdown source",tabindex:"0"})];function UD(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 iN(t,i=[]){return Ve.create({doc:t,extensions:[...nN,...i]})}function oN(t,i){if(t.state.doc.toString()===i)return;t.dispatch({changes:{from:0,to:t.state.doc.length,insert:i},annotations:ID.of(!0)})}function lN(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 Mu),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 ce({parent:k,state:iN(d.current,[y.current.of([Ve.readOnly.of(m.current),ce.editable.of(!m.current)]),ce.updateListener.of((R)=>{if(!R.docChanged)return;if(R.transactions.some((L)=>L.annotation(ID)===!0))return;b.current(R.state.doc.toString())}),ce.updateListener.of((R)=>{if(!R.selectionSet&&!R.docChanged)return;w(R.view)}),ce.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;oN(k,i)},[i]),mt.useEffect(()=>{let k=h.current;if(!k)return;k.dispatch({effects:y.current.reconfigure([Ve.readOnly.of(r),ce.editable.of(!r)])})},[r]),je.jsxDEV("div",{ref:c,...le(vt.source),"aria-label":"Markdown source","data-editor":"codemirror6"},void 0,!1,void 0,this)}var ca="model",sN=[],aN=[{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 rN(t){return je.jsxDEV("section",{...le(vt.suggestion,vt.answer),"aria-label":"Agent answer",children:[je.jsxDEV("div",{...le(vt.copy),children:[je.jsxDEV("strong",{...le(vt.answerTitle),children:["Answer from ",t.agentId]},void 0,!0,void 0,this),je.jsxDEV(Rm,{children:t.response},void 0,!1,void 0,this)]},void 0,!0,void 0,this),je.jsxDEV("span",{...le(vt.spacer)},void 0,!1,void 0,this),t.onReplace&&je.jsxDEV(We,{type:"button",onClick:t.onReplace,children:"Replace selection"},void 0,!1,void 0,this),je.jsxDEV(We,{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=Gu(),{value:l,mode:s,onChange:r,onModeChange:c,assist:h,readOnly:d=!1,singlePane:m=!1}=t,y=m&&s==="split"?d?"preview":"source":s,b=mt.useId(),[S,w]=mt.useState(null),[k,E]=mt.useState(""),[R,L]=mt.useState(ca),[_,V]=mt.useState("answer"),[j,ee]=mt.useState({kind:"idle"}),be=h?.agents??sN,ot=y!=="preview",Rt=y!=="source",ze=S?l.slice(S.from,S.to):"";mt.useEffect(()=>{if(R!==ca&&!be.some((K)=>K.id===R))L(ca),V("answer"),ee({kind:"idle"})},[be,R]);let Tt=mt.useCallback(()=>{if(!h||!S||k.trim().length===0)return;let K=S;ee({kind:"loading"}),(R===ca?i.requestAssist({entityType:h.entityType,id:h.entityId,instruction:k,selection:ze}).then(({suggestion:Gt})=>{ee({kind:"suggested",range:K,suggestion:Gt})}):i.requestAgentAnswer({entityType:h.entityType,id:h.entityId,agent:R,instruction:k,selection:ze}).then(({agentId:Gt,response:Q})=>{ee({kind:"agent-answer",agentId:Gt,response:Q,range:K,replaceSelection:_==="rewrite"})})).catch((Gt)=>{ee({kind:"error",message:Oi(Gt)})})},[_,i,h,R,k,ze,S,l]),ae=mt.useCallback(()=>{if(j.kind!=="suggested")return;try{r(UD(l,j.range,j.suggestion)),ee({kind:"idle"})}catch(K){ee({kind:"error",message:Oi(K)})}},[j,r,l]),lt=mt.useCallback(()=>{if(j.kind!=="agent-answer")return;try{r(UD(l,j.range,j.response)),ee({kind:"idle"})}catch(K){ee({kind:"error",message:Oi(K)})}},[j,r,l]);return je.jsxDEV("div",{...le(vt.root),children:[je.jsxDEV("header",{...le(vt.toolbar),children:[je.jsxDEV(qD,{value:y,onValueChange:(K)=>{if(KH(K))c(K)},children:je.jsxDEV(VD,{...le(vt.modes,m&&vt.inlineModes),"aria-label":"Editor body view",children:ZH.filter((K)=>!m||K!=="split").map((K)=>je.jsxDEV(jD,{value:K,id:`${b}-${K}`,"aria-controls":b,children:eN[K]},K,!1,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this),je.jsxDEV("span",{...le(vt.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&&ot&&je.jsxDEV("section",{...le(vt.assist),"data-has-selection":S?"true":"false","aria-label":"AI selection rewrite",children:[be.length>0&&je.jsxDEV(Ks,{xstyle:vt.select,"aria-label":"Assist target",value:R,onChange:(K)=>{L(K.currentTarget.value),V("answer"),ee({kind:"idle"})},children:[je.jsxDEV("option",{value:ca,children:"Model"},void 0,!1,void 0,this),be.map((K)=>je.jsxDEV("option",{value:K.id,children:[K.label," — ",K.id]},K.id,!0,void 0,this))]},void 0,!0,void 0,this),je.jsxDEV(Vp,{xstyle:vt.input,type:"text",value:k,placeholder:S?"Instruction for selected text…":R===ca?"Select text to rewrite…":"Select text to ask about…",onChange:(K)=>E(K.currentTarget.value)},void 0,!1,void 0,this),je.jsxDEV(We,{type:"button",xstyle:vt.run,disabled:!S||k.trim().length===0||j.kind==="loading",onClick:Tt,children:j.kind==="loading"?"Thinking…":R===ca?"Rewrite selection":"Ask"},void 0,!1,void 0,this),R!==ca&&je.jsxDEV("span",{...le(vt.presets),children:aN.map((K)=>je.jsxDEV(We,{xstyle:vt.preset,type:"button",size:"xs",variant:K.mode==="rewrite"&&_==="rewrite"?"secondary":"ghost","aria-pressed":K.mode==="rewrite"&&_==="rewrite",onClick:()=>{E(K.instruction),V(K.mode)},children:K.label},K.label,!1,void 0,this))},void 0,!1,void 0,this),S&&je.jsxDEV("span",{...le(vt.assistMeta),children:[ze.length," selected chars"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),j.kind==="suggested"&&je.jsxDEV("section",{...le(vt.suggestion),children:[je.jsxDEV("div",{...le(vt.copy),children:je.jsxDEV(Rm,{children:j.suggestion},void 0,!1,void 0,this)},void 0,!1,void 0,this),je.jsxDEV("span",{...le(vt.spacer)},void 0,!1,void 0,this),je.jsxDEV(We,{type:"button",onClick:ae,children:"Accept"},void 0,!1,void 0,this),je.jsxDEV(We,{type:"button",variant:"ghost",onClick:()=>ee({kind:"idle"}),children:"Discard"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),j.kind==="agent-answer"&&je.jsxDEV(rN,{agentId:j.agentId,response:j.response,onReplace:j.replaceSelection?lt:void 0,onDismiss:()=>ee({kind:"idle"})},void 0,!1,void 0,this),j.kind==="error"&&je.jsxDEV(It,{tone:"error",className:_e("",vt.status),children:j.message},void 0,!1,void 0,this),je.jsxDEV("div",{...le(vt.panes,ot&&Rt&&vt.split),"data-studio-split":ot&&Rt?"":void 0,id:b,role:"tabpanel","aria-labelledby":`${b}-${y}`,children:[ot&&je.jsxDEV(lN,{value:l,onChange:r,onSelectionChange:w,readOnly:d},void 0,!1,void 0,this),Rt&&je.jsxDEV("div",{...le(vt.preview),"data-studio-preview":"",tabIndex:0,role:"region","aria-label":"Rendered document",children:je.jsxDEV(Rm,{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 Lm=tt(Fl(),1);var Qe=tt(bn(),1);function YD(t){let{state:i}=t,l=Lm.useRef(null);if(Lm.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(It,{tone:"good",save:!0,children:"No changes — already saved."},void 0,!1,void 0,this):Qe.jsxDEV(It,{tone:"good",save:!0,children:"Saved through the entity service."},void 0,!1,void 0,this);if(i.kind==="conflict")return Qe.jsxDEV("section",{...le(Qt.conflict),role:"alert","data-studio-conflict":"",children:[Qe.jsxDEV("h4",{...le(Qt.conflictTitle),children:"The manuscript changed elsewhere"},void 0,!1,void 0,this),Qe.jsxDEV("p",{...le(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",{...le(Qt.validationSummary),ref:l,tabIndex:-1,role:"group","aria-label":"Save failed",children:[Qe.jsxDEV(It,{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",{...le(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 XD(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 Bm(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 h1(t){return Qe.jsxDEV("span",{...le(Qt.station,t.state==="done"&&Qt.done,t.state==="active"&&Qt.active),"data-studio-station":t.state,children:[Qe.jsxDEV("span",{...le(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 PD(t){return Qe.jsxDEV("span",{...le(Qt.track),"data-studio-flowing":t.flowing?"":void 0,"aria-hidden":"true",children:Qe.jsxDEV("span",{...le(Qt.flow,t.flowing&&Qt.flowing)},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function QD(t){let{view:i,gitConfigured:l}=t;return Qe.jsxDEV("span",{...le(Qt.wrap),children:[Qe.jsxDEV("span",{...le(Qt.stations),children:[Qe.jsxDEV(h1,{state:i.db,label:"entity db"},void 0,!1,void 0,this),Qe.jsxDEV(PD,{flowing:i.db==="done"&&i.exported==="active"},void 0,!1,void 0,this),Qe.jsxDEV(h1,{state:i.exported,label:"exported to file"},void 0,!1,void 0,this),l?Qe.jsxDEV(Qe.Fragment,{children:[Qe.jsxDEV(PD,{flowing:i.exported==="done"&&i.committed==="active"},void 0,!1,void 0,this),Qe.jsxDEV(h1,{state:i.committed,label:"committed"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):Qe.jsxDEV("span",{...le(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",{...le(Qt.ref),children:["last write ",Qe.jsxDEV("b",{...le(Qt.refValue),children:i.commitRef},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function GD(t){return Qe.jsxDEV(Ji,{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 Wu=tt(Fl(),1);var Dn={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 zn=tt(bn(),1);function d1(t){return"success"in t&&t.success===!1}function p1(t){return"needsConfirmation"in t&&t.needsConfirmation===!0}function uN(t){return zn.jsxDEV(Ji,{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:[zn.jsxDEV("p",{children:t.preview},void 0,!1,void 0,this),zn.jsxDEV("p",{...le(Dn.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 WD(t){let[i,l]=Wu.useState(null),[s,r]=Wu.useState(null),[c,h]=Wu.useState(null),d={entityType:t.entityType,entityId:t.entityId},m=t.unsaved||i!==null,y=Wu.useCallback(async(w,k)=>{l(k),r(null);try{let E=await t.onAction(w);if(d1(E))throw Error(E.error);if(p1(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(Oi(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 zn.jsxDEV("section",{...le(Dn.root),"aria-label":"Publication actions",children:[zn.jsxDEV("header",{...le(Dn.head,wo.eyebrow),children:[zn.jsxDEV("span",{children:"Publication"},void 0,!1,void 0,this),zn.jsxDEV("b",{...le(Dn.state,t.status==="queued"&&Dn.warning,t.status==="failed"&&Dn.error,t.status==="published"&&Dn.good),children:t.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this),zn.jsxDEV("p",{...le(Dn.copy),children:"Operates on the saved entity. Publication state is separate from the save pipeline below."},void 0,!1,void 0,this),t.unsaved&&zn.jsxDEV("p",{...le(Dn.copy,Dn.warning),children:"Save changes before changing publication state."},void 0,!1,void 0,this),t.status!=="published"&&zn.jsxDEV("div",{...le(Dn.actions),children:[zn.jsxDEV(We,{type:"button",variant:"ghost",xstyle:Dn.button,disabled:m,onClick:()=>void y(b,"lifecycle"),children:i==="lifecycle"?"Working…":S},void 0,!1,void 0,this),zn.jsxDEV(We,{type:"button",xstyle:[Dn.button,Dn.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"&&zn.jsxDEV("p",{...le(Dn.copy,Dn.complete),children:"Published externally."},void 0,!1,void 0,this),s&&zn.jsxDEV(It,{tone:"error",children:s},void 0,!1,void 0,this),c&&zn.jsxDEV(uN,{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 Ri=tt(Fl(),1);var Fu={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=tt(bn(),1);function FD(t,i){return JSON.stringify({frontmatter:t,body:i},null,2)}function tO(t){let i=Gu(),[l,s]=Ri.useState(!1),[r,c]=Ri.useState(null),[h,d]=Ri.useState(!1),[m,y]=Ri.useState(null),[b,S]=Ri.useState(!1),[w,k]=Ri.useState(!1),E=Ri.useRef(0),R=Ri.useRef(null);Ri.useEffect(()=>()=>{E.current+=1},[]);let L=FD(t.draft,t.body);Ri.useEffect(()=>S(!1),[L]);let _=async()=>{S(!1);try{await navigator.clipboard.writeText(L),S(!0)}catch{y("Copy unavailable. Select Your version manually."),s(!0)}},V=async()=>{let j=++E.current;d(!0),c(null),y(null);try{let ee=await i.fetchEntity(t.entity.entityType,t.entity.id);if(E.current===j)c(ee)}catch(ee){if(E.current===j)y(eO(ee,"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",{...le(Fu.actions),children:[At.jsxDEV("span",{ref:R,children:At.jsxDEV(We,{type:"button",variant:"ghost",onClick:()=>{s(!0),V()},children:"Compare changes"},void 0,!1,void 0,this)},void 0,!1,void 0,this),At.jsxDEV(We,{type:"button",variant:"ghost",onClick:()=>void _(),children:"Copy my version"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),b&&At.jsxDEV(It,{children:"Version copied, including properties and body."},void 0,!1,void 0,this),At.jsxDEV(JD,{open:l,onOpenChange:(j)=>{if(s(j),!j)k(!1),E.current+=1,d(!1)},children:At.jsxDEV(ZD,{"aria-describedby":"conflict-comparison-description",onCloseAutoFocus:(j)=>{j.preventDefault(),R.current?.querySelector("button")?.focus()},children:[At.jsxDEV(KD,{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(It,{tone:"error",children:m},void 0,!1,void 0,this),At.jsxDEV("div",{...le(Fu.versions),children:[At.jsxDEV("label",{children:["Your version",At.jsxDEV("textarea",{...le(Fu.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",{...le(Fu.version),readOnly:!0,value:r?FD(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",{...le(Fu.actions),children:[At.jsxDEV(We,{type:"button",variant:"ghost",disabled:h,onClick:()=>void V(),children:h?"Loading latest…":"Retry latest"},void 0,!1,void 0,this),At.jsxDEV(We,{type:"button",variant:"ghost",onClick:()=>s(!1),children:"Keep editing my version"},void 0,!1,void 0,this),At.jsxDEV(We,{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(Ji,{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 Ju(t){return{entity:t,draft:{...t.frontmatter},body:t.body}}var ha=tt(Fl(),1);var fa={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=tt(bn(),1),cN=250;function iO(t){let[i,l]=ha.useState(t.query.q);ha.useEffect(()=>l(t.query.q),[t.query.q]);let s=ha.useRef(t.onChange);s.current=t.onChange;let r=ha.useRef(t.query);r.current=t.query,ha.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)},cN);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:_e("studio-collection-controls",fa.controls),"aria-label":"Collection search and filters",children:ft.jsxDEV("div",{className:_e("",fa.row),children:[ft.jsxDEV(nO,{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:_e("",fa.filters),children:[ft.jsxDEV("summary",{className:_e("",fa.summary,d>0&&fa.open),children:["Filter and sort",d>0?` · ${d}`:""]},void 0,!0,void 0,this),ft.jsxDEV("div",{className:_e("",fa.panel),children:[ft.jsxDEV("label",{children:["Visibility",ft.jsxDEV(Ks,{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(Ks,{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(Ks,{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:_e("",fa.state),children:[t.total," ",t.total===1?"match":"matches"]},void 0,!0,void 0,this),ft.jsxDEV(We,{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 I=tt(bn(),1);function gO(t,i){if(!t.hasBody)return"details";return i??(t.format==="raw"?"preview":"details")}var fN={entityType:"",format:"frontmatter",isSingleton:!1,hasBody:!1,fields:[]},hN=["details","write","preview"];function _m(t){return Object.fromEntries(t.flatMap((i)=>i.badge===void 0?[]:[[i.id,i.badge]]))}function Zu(t){return I.jsxDEV("div",{className:_e("studio",Tn.frame,wo.operatorRoles),"data-studio-shell":"",children:[I.jsxDEV(Um,{contextLabel:"Studio"},void 0,!1,void 0,this),I.jsxDEV("main",{"aria-label":"Studio status",children:I.jsxDEV(It,{tone:t.error?"error":void 0,className:_e("",Tn.boot),children:[t.message,t.onRetry&&I.jsxDEV(We,{type:"button",variant:"ghost",onClick:t.onRetry,children:"Retry"},void 0,!1,void 0,this),t.onHome&&I.jsxDEV(We,{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 yO(t){let i=x1();return I.jsxDEV("div",{className:_e("studio",Tn.frame,wo.operatorRoles),"data-view":"account","data-studio-shell":"",children:[I.jsxDEV(Um,{contextLabel:"Account",navigation:{types:t.types,workspaces:t.workspaces,activeEntityType:null,activeWorkspaceId:t.workspaceId,workspaceBadges:_m(t.workspaces),selectEntityType:t.selectEntityType,selectWorkspace:t.selectWorkspace}},void 0,!1,void 0,this),I.jsxDEV("div",{className:Sh("",ai.body,dr.shell,i&&dr.shellCollapsed),"data-studio-body":"",children:[I.jsxDEV("aside",{className:Sh("rail",dr.rail),children:I.jsxDEV(k1,{renderMode:"desktop",types:t.types,active:null,onSelect:t.selectEntityType,workspaces:t.workspaces,activeWorkspace:t.workspaceId,workspaceBadges:_m(t.workspaces),onSelectWorkspace:t.selectWorkspace},void 0,!1,void 0,this)},void 0,!1,void 0,this),I.jsxDEV("main",{className:rO("account-studio-pane",aO.pane),children:t.children},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function bO(t){let i=x1(),{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:_,mobilePane:V,syncStatus:j,baselineCommit:ee,agentTargets:be,deleting:ot,hasUnsavedChanges:Rt,navigationBlocked:ze,dispatchEditor:Tt,setFieldAssistState:ae,setBodyMode:lt,setMobilePane:K,backToList:Ue,selectEntityType:Gt,selectWorkspace:Q,changeEntityPage:de,openWorkspaceEntity:pe,openWorkspaceLaunch:st,performPublishingAction:$e,performDeclarativeAction:Li,onWorkspaceQueryChange:Bo,startCreate:oo,openEntity:Hn,runFieldAssist:Lt,applyFieldAssist:zo,save:nn,remove:ma,onNavigationReset:at,onNavigationProceed:Bt}=t,{mode:Le,draft:Y,body:fi,save:Je,deleteOpen:Ut}=R,Et=s.find((ne)=>ne.entityType===m),ve=r.find((ne)=>ne.id===l),Ge=E??fN,Sn=cO(Ge.entityType,Ge.hasBody),ml=m??"",Ze=!l&&Le.kind!=="browse",gl=Et?.capabilities.canCreate===!0,fn=Le.kind==="create"?gl:Le.kind==="edit"&&Et?.capabilities.canUpdate===!0,Bi=Et?.capabilities.canDelete===!0,Ho=Et?.capabilities.canPublish===!0,No=fn&&Et?.capabilities.canAssist===!0,yl=Le.kind==="edit"?Et?.isSingleton?Hm(Et.label):zm(Le.entity):Le.kind==="create"?`New ${Et?.label??m}`:Et?.label??m,bl=ve?.label??(Et?.isSingleton?Hm(Et.label):Et?.label)??m??"Studio",zi=Hm(bl),fs=j?.git?.hasChanges===!0,tc=r.find((ne)=>ne.pluginId==="content-pipeline"&&ne.entityTypes.includes(ml)),vl=w,nc=Math.min(b+(y?.length??S),w),Hi=_m(r),Ni=Boolean(t.collectionQuery.q)||t.collectionQuery.visibility!=="all"||Boolean(t.collectionQuery.status),gr={kicker:"Content library",access:w1("trusted"),title:Et?.label??m??"Library",metadata:[Ni?`${vl} matching ${vl===1?"entity":"entities"}`:`${vl} ${vl===1?"entity":"entities"}`,...fs?["Sync pending"]:[]],totals:[]},hi=S1(Ge.fields)&&Le.kind==="edit"?v1(Le.entity):null,yr={kicker:Ge.isSingleton?`${hO(m,null)} / singleton`:bl,access:w1("trusted"),title:yl??"Editor",metadata:Le.kind==="create"?[`${zi} · new`]:hi?[`${zi} · ${hi}`]:[],totals:[]},hn=ve&&h?mO(ve,h.view):null;return I.jsxDEV("div",{className:_e("studio",Tn.frame,wo.operatorRoles),"data-studio-shell":"","data-view":l?"workspace":Ze?"editor":"listing",children:[I.jsxDEV(Um,{contextLabel:bl,onContextClick:Ze&&!Ge.isSingleton?Ue:void 0,navigation:{types:s,workspaces:r,activeEntityType:l?null:m,activeWorkspaceId:l,workspaceBadges:Hi,selectEntityType:Gt,selectWorkspace:Q}},void 0,!1,void 0,this),I.jsxDEV("div",{className:Sh("",ai.body,dr.shell,i&&dr.shellCollapsed),"data-studio-body":"",children:[I.jsxDEV("aside",{className:Sh("rail",dr.rail),children:I.jsxDEV(k1,{renderMode:"desktop",types:s,active:l?null:m,onSelect:Gt,workspaces:r,activeWorkspace:l,workspaceBadges:_m(r),onSelectWorkspace:Q},void 0,!1,void 0,this)},void 0,!1,void 0,this),l?c&&!h?I.jsxDEV("main",{className:kb(""),children:I.jsxDEV(It,{tone:"error",children:[c,I.jsxDEV(We,{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&&hn?I.jsxDEV("div",{className:kb("studio-workspace-frame"),children:[c&&I.jsxDEV(It,{tone:"error",children:["Showing previously loaded content. ",c,I.jsxDEV(We,{type:"button",variant:"ghost",onClick:t.onRetryRead,children:"Retry"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),I.jsxDEV(Nm,{model:hn,...hn.primaryAction?{action:I.jsxDEV(lO,{action:hn.primaryAction,primary:!0,onAction:Li,components:Ab},void 0,!1,void 0,this)}:{}},void 0,!1,void 0,this),I.jsxDEV(sO,{data:h,components:Ab,renderHead:!1,onOpenEntity:pe,onLaunch:st,onAction:Li,query:d,...l?{onQueryChange:(ne)=>Bo(l,ne,ne)}:{}},l,!1,void 0,this)]},void 0,!0,void 0,this):null:!Ze?I.jsxDEV("main",{className:_e("",Tn.listing,Up.inset),"data-studio-library":"","aria-busy":k,children:[t.readError&&I.jsxDEV(It,{tone:"error",children:[y?.length?"Showing previously loaded entries. ":"",t.readError,I.jsxDEV(We,{type:"button",variant:"ghost",onClick:t.onRetryRead,children:"Retry"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),I.jsxDEV(Nm,{model:gr,action:I.jsxDEV(We,{type:"button",disabled:!gl||!E,onClick:oo,children:["New ",zi.toLowerCase()]},void 0,!0,void 0,this)},void 0,!1,void 0,this),!Ge.isSingleton&&I.jsxDEV(iO,{query:t.collectionQuery,fields:Ge.fields,total:w,onChange:t.onCollectionQueryChange},void 0,!1,void 0,this),!Ge.isSingleton&&w>0&&I.jsxDEV("nav",{className:_e("listing-pagination",Tn.pagination),"aria-label":`${Et?.label??"Entity"} pagination`,children:[I.jsxDEV("span",{className:_e("",Tn.range),"aria-live":"polite",children:[b+1,"–",nc," of ",w]},void 0,!0,void 0,this),I.jsxDEV("span",{className:_e("",Tn.pager),children:[I.jsxDEV(We,{type:"button",variant:"ghost",disabled:k||b===0,onClick:()=>de(Math.max(0,b-S)),children:"Previous"},void 0,!1,void 0,this),I.jsxDEV(We,{type:"button",variant:"ghost",disabled:k||b+S>=w,onClick:()=>de(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(It,{className:_e("",Tn.empty),children:"Loading entries…"},void 0,!1,void 0,this),!k&&(y??[]).map((ne,on)=>I.jsxDEV("button",{type:"button",className:_e("",Tn.row,cs.listingRow),"data-studio-record":"",onClick:()=>Hn(ne.id),children:[I.jsxDEV("span",{className:_e("",Tn.index),children:String(b+on+1).padStart(2,"0")},void 0,!1,void 0,this),I.jsxDEV("span",{className:_e("",Tn.title),title:ne.id,children:[zm(ne),S1(Ge.fields)&&I.jsxDEV("span",{className:_e("studio-publication-state",cs.publication),children:v1(ne)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),I.jsxDEV("span",{className:_e("",Tn.updated),children:uO(ne.updated)},void 0,!1,void 0,this)]},ne.id,!0,void 0,this)),!t.readError&&!k&&y?.length===0&&I.jsxDEV(It,{className:_e("",Tn.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.":gl?"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:_e("",ai.editor,Sn!=="split"&&Jl.editor),"data-studio-editor":"","data-editor-presentation":Sn,"data-mobile-pane":Sn==="split"?V:void 0,onInvalidCapture:(ne)=>{if(m2(ne.currentTarget),V==="details")return;ne.preventDefault();let on=ne.currentTarget.querySelector("input:invalid, select:invalid, textarea:invalid");if(ne.target!==on)return;K("details"),requestAnimationFrame(()=>{if(on.isConnected)on.focus(),on.reportValidity()})},onSubmit:(ne)=>{if(ne.preventDefault(),fn&&Je.kind!=="saving")nn()},onKeyDown:(ne)=>{if((ne.ctrlKey||ne.metaKey)&&!ne.altKey&&!ne.shiftKey&&ne.key.toLowerCase()==="s"){if(ne.target instanceof HTMLElement&&ne.target.closest('[role="dialog"], [role="alertdialog"]'))return;if(ne.preventDefault(),fn&&Je.kind!=="saving")ne.currentTarget.requestSubmit()}},children:[I.jsxDEV(Nm,{model:yr,appearance:"document",action:fn||Sn==="split"?I.jsxDEV(We,{type:"submit",className:"studio-editor-head-save",variant:Rt?"default":"outline",title:"Save changes (Ctrl+S or ⌘S)","aria-keyshortcuts":"Control+s Meta+s",disabled:!fn||Je.kind==="saving",children:Je.kind==="saving"?"Saving…":"Save changes"},void 0,!1,void 0,this):void 0},void 0,!1,void 0,this),Sn==="split"&&I.jsxDEV("div",{className:_e("studio-mobile-tabs",cs.mobileModes),children:I.jsxDEV(m1,{children:[I.jsxDEV(g1,{asChild:!0,children:I.jsxDEV("button",{type:"button","aria-label":"Editor view",className:_e("",cs.paneTrigger,wo.eyebrow),children:[V==="details"?"Properties":V==="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(y1,{align:"start",children:hN.map((ne)=>I.jsxDEV(b1,{disabled:ne!=="details"&&!Ge.hasBody,onSelect:()=>{if(K(ne),ne==="write")lt("source");if(ne==="preview")lt("preview")},children:ne==="details"?"Properties":ne==="write"?"Source":"Preview"},ne,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),I.jsxDEV(g2,{presentation:Sn,children:[I.jsxDEV(y2,{presentation:Sn,reveal:Je.kind==="error"&&(Je.issues?.length??0)>0,children:[Sn!=="document"&&I.jsxDEV("div",{className:_e("",cs.propertiesHead),children:[I.jsxDEV("h2",{className:_e("",cs.propertiesLabel,wo.eyebrow),children:"Properties"},void 0,!1,void 0,this),Le.kind==="create"||hi?I.jsxDEV("span",{className:_e("",cs.propertiesLabel,wo.eyebrow),children:Le.kind==="create"?"New":hi},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),I.jsxDEV("fieldset",{className:_e("",ai.fields),disabled:!fn,children:[Ge.fields.filter((ne)=>fO(ne,Y)).map((ne)=>I.jsxDEV("div",{"data-studio-field-assist":"",children:[I.jsxDEV(pO,{descriptor:ne,issues:Je.kind==="error"?Je.issues:void 0,value:Y[ne.name],onChange:(on)=>Tt({type:"fieldChanged",descriptor:ne,raw:on})},void 0,!1,void 0,this),No&&Ge.hasBody&&fi.trim().length>0&&I.jsxDEV(dO,{descriptor:ne,state:L,onRun:Lt,onApply:zo,onDiscard:()=>ae({kind:"idle"})},void 0,!1,void 0,this)]},`${ml}:${Le.kind==="edit"?Le.entity.id:"create"}:${ne.name}`,!0,void 0,this)),Ge.format==="raw"&&I.jsxDEV(It,{children:"This type is raw markdown — the whole document is the body."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),tc&&Le.kind==="edit"&&Ho&&I.jsxDEV(WD,{entityType:ml,entityId:Le.entity.id,title:zm(Le.entity),status:typeof Le.entity.frontmatter.status==="string"?Le.entity.frontmatter.status:"draft",unsaved:Rt,onAction:$e},void 0,!1,void 0,this)]},`${ml}:${Le.kind==="edit"?Le.entity.id:"create"}`,!0,void 0,this),Ge.hasBody&&I.jsxDEV("section",{className:_e("",ai.manuscript,Sn!=="split"&&Jl.manuscript),children:I.jsxDEV($D,{value:fi,mode:_,singlePane:Sn!=="split",onChange:(ne)=>Tt({type:"bodyChanged",body:ne}),onModeChange:lt,readOnly:!fn,...Le.kind==="edit"&&No?{assist:{entityType:ml,entityId:Le.entity.id,agents:be}}:{}},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),I.jsxDEV("footer",{className:_e("",cs.pipeline,ai.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:!fn&&Sn!=="split"?"Read-only":XD(Je,Rt)},void 0,!1,void 0,this),t.readError&&I.jsxDEV(It,{tone:"error",children:["Your draft is unchanged. ",t.readError,I.jsxDEV(We,{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(QD,{view:Bm({save:Je,git:j.git,baselineCommit:ee}),gitConfigured:j.git!==null},void 0,!1,void 0,this)]},void 0,!0,void 0,this),I.jsxDEV(YD,{state:j?.directorySync&&Je.kind==="saved"&&!Je.noop?{kind:"idle"}:Je,conflictActions:Le.kind==="edit"?I.jsxDEV(tO,{entity:Le.entity,draft:Y,body:fi,onUseLatest:(ne)=>Tt({type:"documentOpened",document:Ju(ne)})},`${Le.entity.entityType}:${Le.entity.id}`,!1,void 0,this):void 0},void 0,!1,void 0,this)]},void 0,!0,void 0,this),I.jsxDEV("span",{className:_e("",ai.spacer)},void 0,!1,void 0,this),Le.kind==="edit"&&!Ge.isSingleton&&Bi&&I.jsxDEV(I.Fragment,{children:[I.jsxDEV("span",{className:_e("",ai.desktop),children:I.jsxDEV(We,{type:"button",variant:"danger",xstyle:ai.danger,onClick:()=>Tt({type:"deleteRequested"}),children:"Delete"},void 0,!1,void 0,this)},void 0,!1,void 0,this),I.jsxDEV("span",{className:_e("",ai.more),children:I.jsxDEV(m1,{children:[I.jsxDEV(g1,{className:oO("ghost","icon"),"aria-label":"More document actions",children:"•••"},void 0,!1,void 0,this),I.jsxDEV(y1,{align:"end",children:I.jsxDEV(b1,{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&&Le.kind==="edit"&&Bi&&I.jsxDEV(GD,{entityId:Le.entity.id,deleting:ot,onCancel:()=>Tt({type:"deleteCancelled"}),onConfirm:ma},void 0,!1,void 0,this),ze&&I.jsxDEV(Ji,{mark:"↩",title:"Discard unsaved changes?",titleId:"discard-navigation-title",cancelLabel:"Keep editing",confirmLabel:"Discard and continue",confirmVariant:"danger",onCancel:at,onConfirm:Bt,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 vO(t){let{studioCreatePrefill:i,...l}=t;return l}function SO(t,i,l){let s=xb.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 wO(t,i){let l=wh(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 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&<?.canAssist===!0&<.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))}
|
|
245
|
+
${s}`:s}}function dN(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 xh={mode:{kind:"browse"},draft:{},body:"",save:{kind:"idle"},deleteOpen:!1};function xO(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 kO(t,i){switch(i.type){case"collectionChanged":return xh;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 xh;case"fieldChanged":return t.mode.kind==="browse"?t:{...t,draft:dN(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"?xh:t;case"deleteFailed":return t.mode.kind==="edit"?{...t,deleteOpen:!1,save:{kind:"error",message:i.message}}:t}}function CO(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 AO(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 Ku(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. ${Oi(t)}`}var TO=new Set(["offset","limit"]);function EO(t,i){if(t?.urlQuery!==!0)return{};let l={};for(let[s,r]of new URLSearchParams(i))if(!TO.has(s))l[s]=r;return l}function C1(t){let i=new URLSearchParams,l=Object.entries(t).filter(([r,c])=>!TO.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 ec(t,i){return`${t}${C1(i)}`}function A1(t,i,l,s){if(s!==i)return;t.replace(ec(i,l))}function T1(t){let i=hr.safeParse(DO(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!==MO)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 vn=tt(bn(),1),pN=oe.lazy(async()=>({default:(await import("./studio-chunks/account-view-xe37mz6g.js")).AccountApp})),mN=oe.lazy(async()=>({default:(await import("./studio-chunks/studio-chat-workspace-n3cfkz27.js")).StudioChatWorkspace}));function gN(t){let i=new URLSearchParams(t).get("session")?.trim();return i&&i.length<=256?i:null}function yN(){let t=window.history.state;return h2(t)?t:{}}var bN=[],vN=[],SN={},wN=["public","trusted","admin"];function xN(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=wN.find((h)=>h===r)??"public";return{displayName:s,role:c,routePath:t,studioPath:i}}function FO(){let t=LO(),i=Vm({select:(U)=>U.location.pathname}),l=Vm({select:(U)=>U.location.searchStr}),s=Vm({select:(U)=>U.location.state}),r=QO(),c=oe.useMemo(()=>i===E1?{kind:"workspace",workspaceId:M1}:_O(i,r),[i,r]),h=oe.useMemo(()=>c.kind==="collection"&&new URLSearchParams(l).get("mode")==="create",[l,c]),d=i,[m,y]=oe.useState(null),[b,S]=oe.useState(null),[w,k]=oe.useState({}),[E,R]=oe.useReducer(kO,xh),{mode:L,draft:_,body:V,save:j}=E,ee=xO(E),[be]=oe.useState(()=>new HO),ot=oe.useSyncExternalStore(be.subscribe,be.hasDrafts,be.hasDrafts),[Rt,ze]=oe.useState({hasDraft:!1,busy:!1}),Tt=BO({shouldBlockFn:({next:U})=>ee||i===E1&&zO({...Rt,hasDraft:ot},U.pathname),enableBeforeUnload:ee||ot||Rt.busy,withResolver:!0}),[ae,lt]=oe.useState({kind:"idle"}),[K,Ue]=oe.useState("preview"),[Gt,Q]=oe.useState("details"),de=oe.useRef(null),pe=oe.useCallback((U)=>{de.current=U,Q(U)},[]),[st,$e]=oe.useState(null),[Li,Bo]=oe.useState(0),[oo,Hn]=oe.useState(null),Lt=oe.useRef(0),zo=oe.useRef(null),nn=oe.useRef(0),ma=oe.useRef(b);ma.current=b;let at=RO(),Bt=Gu(),Le=da(IO(Bt)),Y=Le.data?.types??null,fi=Y?.find((U)=>U.entityType===b),Je=fi?.capabilities,Ut=oe.useMemo(()=>fi?.isSingleton?T1(""):T1(l),[fi?.isSingleton,l]),Et=Ut.offset,ve=Le.data?.workspaces??vN,Ge=ve.find((U)=>U.id===m),Sn=Ge?.rendererName===UO,ml=Ge?.rendererName===D1,Ze=Ge?.rendererName==="DeclarativeOperatorWorkspace",gl=m?w[m]:void 0,fn=Ge?.urlQuery!==!0||gl?.urlSearch===l,Bi=oe.useMemo(()=>EO(Ge,l),[Ge,l]),Ho=m?gl&&fn?gl.query:Bi:SN,No=da({...$O(Bt,m??"",Ho),enabled:Ze}),yl=No.data??null,bl=yl?.data??null,zi=No.error?Ku(No.error):null,fs=L.kind==="edit"?L.entity.id:null,vl=da({...PO(Bt,b??"",fs??""),enabled:b!==null&&fs!==null&&Je?.canAssist===!0&&Je.canUpdate}).data??bN,Hi=da({...YO(Bt),enabled:b!==null}).data??null,Ni=da({...H1(Bt,b??"",Ut),enabled:b!==null}),gr=b?Ni.data?.entities??null:null,hi=Ni.data?.total,yr=da({...z1(Bt,b??""),enabled:b!==null}),hn=b?yr.data??null:null;da({...kh(Bt,b??"",fs??""),enabled:b!==null&&fs!==null});let ne=qm({mutationFn:(U)=>jO(Bt,U)}),on=qm({mutationFn:(U)=>VO(Bt,U)}),Nn=qm({mutationFn:(U)=>qO(Bt,U)}),Sl=on.isPending,lo=Ze&&yl?yl.data:null;oe.useEffect(()=>{if(!b||!fi||m||c.kind!=="collection"&&c.kind!=="entity"||c.entityType!==b)return;if(hi===void 0)return;let U=Math.floor(Math.max(0,hi-1)/Ut.limit)*Ut.limit;if(Et>U)t.history.replace(`${i}${mr({...Ut,offset:U})}`,t.history.location.state)},[fi,m,Et,hi,Ut,b,i,c,t.history]),oe.useEffect(()=>{if(!m||!lo?.refreshAfterMs)return;let U=window.setTimeout(()=>{at.invalidateQueries({queryKey:pl.workspace(m)})},lo.refreshAfterMs);return()=>window.clearTimeout(U)},[m,lo,at]),oe.useEffect(()=>{if(Ge?.urlQuery!==!0||c.kind!=="workspace"||c.workspaceId!==Ge.id)return;let U=Lo(r,Ge.id);if(ec(U,Bi)!==`${U}${l}`)A1(t.history,U,Bi,window.location.pathname)},[Ge,r,Bi,l,c,t.history]),oe.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 Se=ve.find((Te)=>Te.id===c.workspaceId);if(!Se){let Te=GO(r,c.workspaceId,l,ve);if(Te){t.history.replace(Te);return}nn.current+=1,$e(`Workspace unavailable for this account: ${c.workspaceId}`);return}y(Se.id),S(null);return}let U=c.kind==="collection"||c.kind==="entity"?c.entityType:void 0,re=Y.find((Se)=>!Se.isSingleton)??Y[0];if(c.kind==="home"){let Se=WO(r,Y,ve);if(Se!==r){t.history.replace(Se);return}}let Oe=U??re?.entityType??null;if(U!==void 0&&!Y.some((Se)=>Se.entityType===U)){nn.current+=1,$e(`Collection unavailable for this account: ${U}`);return}y(null),S(Oe)},[l,c,t.history,r,Y,ve]),oe.useEffect(()=>{if(j.kind!=="saved"||!Hi?.git)return;if(Bm({save:j,git:Hi.git,baselineCommit:oo}).committed==="done")return;if(Date.now()-Lt.current>20000)return;let re=window.setTimeout(()=>{at.invalidateQueries({queryKey:pl.syncStatus()})},900);return()=>window.clearTimeout(re)},[j,Hi,oo,at]),oe.useEffect(()=>{if(!b||c.kind==="workspace"||c.kind==="not-found")return;let U=c.kind==="entity"&&c.entityType===b?c.id:null,re=++nn.current;R({type:"collectionChanged"}),Q("details"),lt({kind:"idle"});let Oe=!0,Se=()=>Oe&&re===nn.current;return at.fetchQuery({...z1(Bt,b),staleTime:0}).then(async(Te)=>{if(!Oe||re!==nn.current)return;let qe=gO(Te,de.current);if(Q(qe),window.matchMedia("(max-width: 640px)").matches&&qe!=="details")Ue(qe==="write"?"source":"preview");if(h&&U===null){if(Y?.find((ln)=>ln.entityType===b)?.capabilities.canCreate!==!0){$e(`Creating ${b} is not allowed.`);return}let Cl=SO(window.history.state,b,()=>window.history.replaceState(vO(yN()),"",window.location.href)),ro=wO(Te.fields,Cl);R({type:"creationStarted",draft:ro.draft,body:ro.body});return}if(U!==null)return at.fetchQuery({...kh(Bt,b,U),staleTime:0}).then((kl)=>{if(!Oe||re!==nn.current)return;let Cl=Ju(kl),ro=zo.current,ln=ro?.pathname===d?ro.save:{kind:"idle"};if(ro?.pathname===d)zo.current=null;R({type:"documentOpened",document:Cl,save:ln})});if(Te.isSingleton){let kl=await at.ensureQueryData(H1(Bt,b));if(!Se())return;let Cl=kl.entities[0];if(Cl)return at.fetchQuery({...kh(Bt,b,Cl.id),staleTime:0}).then((ro)=>{if(!Oe||re!==nn.current)return;let ln=Ju(ro);R({type:"documentOpened",document:ln})});R({type:"creationStarted",draft:wh(Te.fields)})}return}).catch((Te)=>{if(Oe&&re===nn.current)$e(Ku(Te))}),()=>{Oe=!1}},[h,d,b,Li,at,i,c,Y]);let Mt=oe.useCallback((U,re={kind:"idle"})=>{if(!b)return;let Oe=R1(r,b,U);if(Oe!==d){zo.current={pathname:Oe,save:re},t.history.push(`${Oe}${mr(Ut)}`,{studioCollectionPath:`${pa(r,b)}${mr(Ut)}`},re.kind==="saved"?{ignoreBlocker:!0}:void 0);return}let Se=++nn.current,Te=b;at.fetchQuery({...kh(Bt,b,U),staleTime:0}).then((qe)=>{if(Se!==nn.current||ma.current!==Te)return;let kl=Ju(qe);R({type:"documentOpened",document:kl,save:re}),lt({kind:"idle"})}).catch((qe)=>{if(Se===nn.current)$e(Ku(qe))})},[r,d,b,Ut,at,t.history]),so=oe.useCallback((U,re)=>{let Oe=R1(r,U,re);zo.current={pathname:Oe,save:{kind:"idle"}},t.history.push(Oe,{studioCollectionPath:pa(r,U)})},[r,t.history]),wl=oe.useCallback((U,re,Oe,Se)=>{t.history.push(NO(r,"note"),p2(U,`entity://${encodeURIComponent(Oe)}/${encodeURIComponent(Se)}`,re))},[r,t.history]),xl=oe.useCallback((U,re,Oe)=>{if(ve.some((Se)=>Se.rendererName===D1)){t.history.push(O1(r),CO(U,re,Oe));return}},[t.history,r,ve]),ic=oe.useCallback((U)=>{switch(U.target){case"account-settings":{t.history.push(Lo(r,L1));return}case"invitations":t.history.push(ec(Lo(r,"admin:administration"),{tab:"invitations"}));return;case"admin-peer-invite":{t.history.push(ec(Lo(r,"admin:administration"),{tab:"invitations",peerId:U.peerId,displayName:U.displayName}));return}case"inbox":{let re={};if("source"in U){if(re.sourceId="mail-items",U.filter==="high-priority")re["facet.mail-priority"]="high";else if(U.filter==="needs-reply")re["facet.needs-reply"]="true";else if(U.filter==="unclassified")re["facet.category"]="unclassified"}t.history.push(ec(Lo(r,"unified-inbox:inbox"),re));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":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,so,l,t.history]),br=oe.useCallback((U)=>{t.history.push(pa(r,U)),window.scrollTo({top:0,left:0})},[r,t.history]),vr=oe.useCallback((U)=>{if(!b)return;t.history.push(`${pa(r,b)}${mr({...Ut,offset:U})}`),window.scrollTo({top:0,left:0})},[b,Ut,r,t.history]),hs=oe.useCallback((U)=>{t.history.push(U===M1?O1(r):Lo(r,U)),window.scrollTo({top:0,left:0})},[r,t.history]),ao=oe.useCallback(()=>{if(!hn||Je?.canCreate!==!0)return;R({type:"creationStarted",draft:wh(hn.fields)}),lt({kind:"idle"})},[Je,hn]),Zn=oe.useCallback(()=>{if(!b)return;let U=`${pa(r,b)}${mr(Ut)}`,re=t.history.location.state;if(typeof re==="object"&&re!==null&&"studioCollectionPath"in re&&re.studioCollectionPath===U&&t.history.canGoBack()){t.history.back();return}t.history.replace(U)},[r,b,Ut,t.history]),Ch=oe.useCallback((U,re)=>{if(!b||L.kind!=="edit"||Je?.canUpdate!==!0||Je.canAssist!==!0||V.trim().length===0)return;lt({kind:"loading",field:re,variant:U}),Bt.requestFieldAssist({variant:U,entityType:b,id:L.entity.id,targetField:re}).then((Oe)=>{let Se=Oe.variant==="summarise"?Oe.suggestion:Oe.suggestions;lt({kind:"suggested",field:Oe.targetField,variant:Oe.variant,suggestion:Se})}).catch((Oe)=>{lt({kind:"error",field:re,message:Oi(Oe)})})},[Je,V,b,L]),$m=oe.useCallback((U,re)=>{R({type:"fieldAssistApplied",field:U,suggestion:re}),lt({kind:"idle"})},[]),oc=oe.useCallback(()=>{if(!b||L.kind==="browse"||!hn)return;if(L.kind==="create"?Je?.canCreate!==!0:Je?.canUpdate!==!0)return;Lt.current=Date.now(),Hn(Hi?.git?.lastCommit??null),R({type:"saveStarted"});let U=hn.hasBody?{body:V}:{},re=XO(hn.fields,_),Oe=L.kind==="create"?{kind:"create",entityType:b,frontmatter:re,...U}:{kind:"update",entityType:b,id:L.entity.id,frontmatter:re,baseContentHash:L.entity.contentHash,...U},Se=nn.current;ne.mutate(Oe,{onSuccess:async(Te)=>{if(await Promise.all([at.invalidateQueries({queryKey:pl.entities(b)}),at.invalidateQueries({queryKey:pl.syncStatus()}),...L.kind==="create"?[at.invalidateQueries({queryKey:pl.navigation()})]:[]]),Se!==nn.current)return;let qe="skipped"in Te&&Te.skipped===!0;Mt(Te.entityId,{kind:"saved",noop:qe})},onError:(Te)=>{if(Se!==nn.current)return;if(Te instanceof pr&&Te.issues.length>0)Q("details");R({type:"saveFailed",save:Te instanceof pr&&Te.status===409?{kind:"conflict",message:Oi(Te)}:{kind:"error",message:Te instanceof pr&&Te.issues.length>0?Te.message||"Validation failed":Oi(Te),...Te instanceof pr?{issues:Te.issues}:{}}})}})},[Je,b,L,_,V,hn,Mt,Hi,at,ne]),Ah=oe.useCallback(()=>{if(!b||L.kind!=="edit"||Sl||Je?.canDelete!==!0)return;let{id:U}=L.entity;on.mutate({entityType:b,id:U},{onSuccess:async()=>{R({type:"deleteSucceeded"}),at.removeQueries({queryKey:pl.entity(b,U)}),await Promise.all([at.invalidateQueries({queryKey:pl.entities(b)}),at.invalidateQueries({queryKey:pl.syncStatus()}),at.invalidateQueries({queryKey:pl.navigation()})]),t.history.replace(pa(r,b),void 0,{ignoreBlocker:!0})},onError:(re)=>{R({type:"deleteFailed",message:Oi(re)})}})},[Je,r,b,L,Sl,at,on,t.history]),Sr=oe.useCallback(async(U)=>{let re=ve.find((qe)=>qe.pluginId==="content-pipeline"&&qe.entityTypes.includes(U.entityType));if(!re)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 qe=await Nn.mutateAsync({workspaceId:re.id,action:{actionId:"publish",label:"Publish now",input:Oe,invocation:{mode:"prepare"}}});if(typeof qe!=="object"||qe===null||!("kind"in qe)||qe.kind!=="prepared-confirmation"||!("token"in qe)||typeof qe.token!=="string"||!("summary"in qe)||typeof qe.summary!=="string"||!("expiresAt"in qe)||typeof qe.expiresAt!=="string")throw Error("Publishing confirmation is unavailable");return{needsConfirmation:!0,summary:qe.summary,args:{confirmed:!0,confirmationToken:qe.token,contentHash:qe.token,expiresAt:qe.expiresAt}}}let Se=await Nn.mutateAsync({workspaceId:re.id,action:{actionId:U.type,label:U.type,input:Oe,...U.type==="publish"&&U.confirmation?{invocation:{mode:"execute",token:U.confirmation.confirmationToken}}:{}}});if(typeof Se!=="object"||Se===null)throw Error("Publishing returned an invalid result");let Te="success"in Se&&Se.success===!1?{success:!1,error:"error"in Se&&typeof Se.error==="string"?Se.error:"Publishing failed",..."code"in Se&&typeof Se.code==="string"?{code:Se.code}:{}}:{success:!0};if(!d1(Te)&&!p1(Te)){if(await B1(at,re.id),L.kind==="edit"&&b===U.entityType&&L.entity.id===U.entityId)Mt(U.entityId)}return Te},[b,L,Mt,at,Nn,ve]),Kn=oe.useCallback(async(U)=>{if(!m)throw Error("Declarative workspace is unavailable");try{let re=await Nn.mutateAsync({workspaceId:m,action:U});return await B1(at,m),re}finally{Nn.reset()}},[m,Nn,at]),Th=oe.useCallback((U,re,Oe)=>{let Se=ve.find((qe)=>qe.id===U),Te=Se?.urlQuery===!0?l:void 0;if(Se?.urlQuery===!0&&Oe!==void 0){let qe=Lo(r,U);Te=C1(Oe),A1(t.history,qe,Oe,window.location.pathname)}k((qe)=>({...qe,[U]:{query:re,...Te!==void 0?{urlSearch:Te}:{}}}))},[r,l,t.history,ve]),_i=st??(Le.error?Ku(Le.error):Ni.error?Ku(Ni.error):null),lc=()=>{if($e(null),Le.error)Le.refetch();if(Ni.error)Ni.refetch();if(No.error)No.refetch();if(L.kind==="browse")Bo((U)=>U+1)};if(_i&&!Y)return vn.jsxDEV(Zu,{message:_i,error:!0,onRetry:lc},void 0,!1,void 0,this);if(!Y)return vn.jsxDEV(Zu,{message:"Loading…"},void 0,!1,void 0,this);if(Sn){let U=Lo(r,L1);return vn.jsxDEV(yO,{types:Y,workspaces:ve,workspaceId:Ge.id,selectEntityType:br,selectWorkspace:hs,children:vn.jsxDEV(oe.Suspense,{fallback:vn.jsxDEV(It,{children:"Opening Account…"},void 0,!1,void 0,this),children:vn.jsxDEV(pN,{bootstrap:xN(U,r)},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)}if(ml)return vn.jsxDEV(vn.Fragment,{children:[vn.jsxDEV(oe.Suspense,{fallback:vn.jsxDEV(Zu,{message:"Opening Chat…"},void 0,!1,void 0,this),children:vn.jsxDEV(mN,{apiPath:Ge.chatApiPath,draftStore:be,onNavigationStateChange:ze,studioBasePath:r,sessionId:gN(l),types:Y,workspaces:ve,handoff:AO(s),navigate:(U,re)=>{t.history.push(U,void 0,{ignoreBlocker:re?.preserveWork===!0})},selectEntityType:br,selectWorkspace:hs},void 0,!1,void 0,this)},void 0,!1,void 0,this),Tt.status==="blocked"&&vn.jsxDEV(Ji,{mark:"↩",title:"Leave this conversation?",titleId:"chat-navigation-title",cancelLabel:"Stay",confirmLabel:"Leave",onCancel:()=>Tt.reset(),onConfirm:()=>Tt.proceed(),children:vn.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&&!zi:b&&!hn&&!_i)return vn.jsxDEV(Zu,{message:"Loading…"},void 0,!1,void 0,this);if(!m&&(!b||!hn&&!_i))return vn.jsxDEV(Zu,{message:_i??"No readable collections are available for this account.",error:Boolean(_i),..._i?{onHome:()=>t.history.push(r)}:{}},void 0,!1,void 0,this);return vn.jsxDEV(bO,{activeWorkspaceId:m,types:Y,workspaces:ve,workspaceError:zi,readError:_i,onRetryRead:lc,declarativeWorkspaceData:lo,workspaceQuery:Ho,entityType:b,entities:gr,entityOffset:Et,entityLimit:Ut.limit,entityTotal:hi??0,collectionQuery:Ut,onCollectionQueryChange:(U)=>{if(!b)return;t.history.push(`${pa(r,b)}${mr({...U,offset:0})}`),window.scrollTo({top:0,left:0})},entityListLoading:Ni.isPending,schema:hn,editor:E,fieldAssistState:ae,bodyMode:K,mobilePane:Gt,syncStatus:Hi,baselineCommit:oo,agentTargets:vl,deleting:Sl,hasUnsavedChanges:ee,navigationBlocked:Tt.status==="blocked",dispatchEditor:R,setFieldAssistState:lt,setBodyMode:Ue,setMobilePane:pe,backToList:Zn,selectEntityType:br,selectWorkspace:hs,changeEntityPage:vr,openWorkspaceEntity:so,openWorkspaceLaunch:ic,performPublishingAction:Sr,performDeclarativeAction:Kn,onWorkspaceQueryChange:Th,startCreate:ao,openEntity:Mt,runFieldAssist:Ch,applyFieldAssist:$m,save:oc,remove:Ah,onNavigationReset:()=>Tt.reset?.(),onNavigationProceed:()=>Tt.proceed?.()},void 0,!1,void 0,this)}function ZO(){return new JO({defaultOptions:{queries:{retry:!1,refetchOnWindowFocus:!1},mutations:{retry:!1}}})}var Im=tt(bn(),1),jm=document.querySelector("[data-studio-root]");if(jm){let t=jm.getAttribute("data-studio-base-path")??"/studio",i=new tR({basePath:t});jm.textContent="";let l=ZO(),s=iR(t,FO);oR.createRoot(jm).render(Im.jsxDEV(KO,{client:l,children:Im.jsxDEV(nR,{api:i,children:Im.jsxDEV(eR,{router:s},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this))}
|
|
246
246
|
|
|
247
|
-
//# debugId=
|
|
247
|
+
//# debugId=86ED9164B05A896B64756E2164756E21
|