@isardsat/editorial-admin 6.0.2 → 6.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/build/client/assets/{authSlice-KDhecIDl.js → authSlice-B3Tyl-Nw.js} +1 -1
  2. package/build/client/assets/button-Da66T3Bb.js +1 -0
  3. package/build/client/assets/chevron-down-8tTu7uK2.js +6 -0
  4. package/build/client/assets/chunk-KNED5TY2-DAA_sFzt.js +51 -0
  5. package/build/client/assets/{createLucideIcon-TQsNVzYU.js → createLucideIcon-R2-3a7hN.js} +1 -1
  6. package/build/client/assets/dashboard-BTu7-8Ba.js +1 -0
  7. package/build/client/assets/{dashboard._collection-DCypgAsP.js → dashboard._collection-MtSHvYYW.js} +4 -4
  8. package/build/client/assets/dashboard._collection._document-CRkC98aa.js +1 -0
  9. package/build/client/assets/dashboard._collection.new-BFe8yV0Z.js +1 -0
  10. package/build/client/assets/{dashboard._layout-BdJ3SrSw.js → dashboard._layout-fM4SW8Or.js} +2 -2
  11. package/build/client/assets/{dashboard.files-DVCxRHOl.js → dashboard.files-ieQA7EmW.js} +3 -3
  12. package/build/client/assets/editorialApi-fQchmMa9.js +1 -0
  13. package/build/client/assets/entry.client-BGu2H8xv.js +34 -0
  14. package/build/client/assets/home-oYP3wzz9.js +36 -0
  15. package/build/client/assets/{index-C-iH5ItK.js → index-Bd1u2_LZ.js} +1 -1
  16. package/build/client/assets/{index-B_FOxFgA.js → index-BvKqmqc2.js} +1 -1
  17. package/build/client/assets/index-C-vcF2DZ.js +9 -0
  18. package/build/client/assets/{index-DrhM6FV9.js → index-DeO5nu0f.js} +1 -1
  19. package/build/client/assets/{input-BH49oaMa.js → input-BmmdOdbj.js} +1 -1
  20. package/build/client/assets/itemForm-DlRBjBsd.js +90 -0
  21. package/build/client/assets/manifest-9974ee04.js +1 -0
  22. package/build/client/assets/react-redux-kbMjYGuQ.js +9 -0
  23. package/build/client/assets/root-wKvfXBjk.js +1 -0
  24. package/build/client/assets/{trash-B3lfbu-5.js → trash-wq_ppIxP.js} +1 -1
  25. package/build/client/index.html +4 -4
  26. package/package.json +11 -9
  27. package/build/client/assets/button-O0EDocjF.js +0 -1
  28. package/build/client/assets/chevron-down-BMtosYlL.js +0 -6
  29. package/build/client/assets/chunk-KNED5TY2-CXj9yqcQ.js +0 -51
  30. package/build/client/assets/dashboard-Binq3-uL.js +0 -1
  31. package/build/client/assets/dashboard._collection._document-B9dEIw39.js +0 -1
  32. package/build/client/assets/dashboard._collection.new-QbdwRouF.js +0 -1
  33. package/build/client/assets/editorialApi-DCnC5eM9.js +0 -1
  34. package/build/client/assets/entry.client-B5Ca3clj.js +0 -34
  35. package/build/client/assets/home-wnsWYgD_.js +0 -11
  36. package/build/client/assets/index-B7e3fQ32.js +0 -9
  37. package/build/client/assets/index-G-cqIhgh.js +0 -9
  38. package/build/client/assets/itemForm-dtoqbEoC.js +0 -90
  39. package/build/client/assets/manifest-a309df9e.js +0 -1
  40. package/build/client/assets/root-DHDQPxhg.js +0 -1
@@ -1,90 +0,0 @@
1
- import{r as T,v as w,l as L,w as Kf,x as _0,y as vc}from"./chunk-KNED5TY2-CXj9yqcQ.js";import{u as ut,a as wo,B as b0}from"./button-O0EDocjF.js";import{h as v0,u as ja,i as C0,F as w0,b as qs,c as Ys,d as eo,e as Xs,I as Cc,j as Qs,f as el,C as k0}from"./input-BH49oaMa.js";import{l as S0,m as E0}from"./editorialApi-DCnC5eM9.js";import{c as T0}from"./utils-DslUJpbf.js";import{r as ko}from"./index-B7e3fQ32.js";import{g as rs,h as Zf,u as is,i as Ua,j as Gf,k as qf,l as Yf,m as Xf,n as Qf,F as eh,o as th,p as nh,R as I0,P as A0,O as N0,C as L0,T as F0,a as P0,V as M0,b as rh,c as ih,d as oh,e as sh,f as lh,A as R0}from"./index-C-iH5ItK.js";import{a as wc}from"./tslib.es6-CDuPK5Eb.js";import{u as Ll,c as Wa,b as ah,a as Pe,P as ct,d as In,e as O0}from"./index-B_FOxFgA.js";import{c as $0}from"./createLucideIcon-TQsNVzYU.js";/**
2
- * @license lucide-react v0.487.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const D0=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],V0=$0("save",D0);var H0=Object.defineProperty,B0=(e,t,n)=>t in e?H0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bn=(e,t,n)=>B0(e,typeof t!="symbol"?t+"":t,n);let z0=class uh{constructor(t=new Map){this.map=t}clone(){return new uh(new Map(this.map))}increment(t){const n=this.map.get(t)??0;this.map.set(t,n+1)}decrement(t,n){let r=this.map.get(t);r!==void 0&&(r-=1,this.map.set(t,r),r===0&&n())}},to=class{constructor(){bn(this,"map",new Map)}getOrCreate(t){let n=this.map.get(t);return n===void 0&&(n=new Set,this.map.set(t,n)),n}get(t){return this.map.get(t)}use(t,n){const r=this.get(t);r!==void 0&&n(r)}delete(t){return this.map.delete(t)}};function Zn(e,t){return t(e),e}function Ja(){}const ch="cell";function kc(e,t){return e===t}const os=new Map;let j0=class{constructor(t={}){bn(this,"subscriptions",new to),bn(this,"singletonSubscriptions",new Map),bn(this,"graph",new to),bn(this,"state",new Map),bn(this,"distinctNodes",new Map),bn(this,"executionMaps",new Map),bn(this,"definitionRegistry",new Set);for(const n of Object.getOwnPropertySymbols(t))this.state.set(n,t[n])}cellInstance(t,n=!0,r=Symbol()){return this.state.has(r)||this.state.set(r,t),n!==!1&&!this.distinctNodes.has(r)&&this.distinctNodes.set(r,n===!0?kc:n),r}signalInstance(t=!0,n=Symbol()){return t!==!1&&this.distinctNodes.set(n,t===!0?kc:t),n}sub(t,n){this.register(t);const r=this.subscriptions.getOrCreate(t);return r.add(n),()=>r.delete(n)}singletonSub(t,n){return this.register(t),n===void 0?this.singletonSubscriptions.delete(t):this.singletonSubscriptions.set(t,n),()=>this.singletonSubscriptions.delete(t)}resetSingletonSubs(){this.singletonSubscriptions.clear()}subMultiple(t,n){const r=this.signalInstance();return this.connect({map:i=>(...o)=>{i(o)},sink:r,sources:t}),this.sub(r,n)}pubIn(t){var n;const r=Reflect.ownKeys(t),i=this.getExecutionMap(r),o=i.refCount.clone(),s=i.participatingNodes.slice(),l=new Map(this.state),a=u=>{this.graph.use(u,c=>{for(const{sources:d,sink:h}of c)d.has(u)&&o.decrement(h,()=>{s.splice(s.indexOf(h),1),a(h)})})};for(;;){const u=s.shift();if(u===void 0)break;const c=u;let d=!1;const h=f=>{const p=this.distinctNodes.get(c);if(p!=null&&p(l.get(c),f)){d=!1;return}d=!0,l.set(c,f),this.state.has(c)&&this.state.set(c,f)};if(Object.prototype.hasOwnProperty.call(t,c)?h(t[c]):i.projections.use(c,f=>{for(const p of f){const x=[...Array.from(p.sources),...Array.from(p.pulls)].map(y=>l.get(y));p.map(h)(...x)}}),d){const f=l.get(c);this.inContext(()=>{this.subscriptions.use(c,p=>{for(const x of p)x(f)})}),(n=this.singletonSubscriptions.get(c))==null||n(f)}else a(c)}}connect({sources:t,pulls:n=[],map:r,sink:i}){const o={map:r,pulls:new Set(n),sink:this.register(i),sources:new Set(t)};for(const s of[...t,...n])this.register(s),this.graph.getOrCreate(s).add(o);this.executionMaps.clear()}pub(t,n){this.pubIn({[t]:n})}pipe(t,...n){return this.combineOperators(...n)(t)}transformer(...t){return n=>Zn(this.signalInstance(),r=>(this.link(this.pipe(r,...t),n),r))}link(t,n){this.connect({map:r=>i=>{r(i)},sink:n,sources:[t]})}combine(...t){return Zn(this.signalInstance(),n=>{this.connect({map:r=>(...i)=>{r(i)},sink:n,sources:t})})}combineCells(...t){return Zn(this.cellInstance(t.map(n=>this.getValue(n)),!0),n=>{this.connect({map:r=>(...i)=>{r(i)},sink:n,sources:t})})}getValue(t){return this.register(t),this.state.get(t)}getValues(t){return t.map(n=>this.getValue(n))}register(t){const n=os.get(t);return n===void 0||this.definitionRegistry.has(t)?t:(this.definitionRegistry.add(t),Zn(n.type===ch?this.cellInstance(n.initial,n.distinct,t):this.signalInstance(n.distinct,t),r=>{this.inContext(()=>{n.init(this,r)})}))}inContext(t){return t()}changeWith(t,n,r){this.connect({sources:[n],pulls:[t],sink:t,map:i=>(o,s)=>{i(r(s,o))}})}calculateExecutionMap(t){const n=[],r=new Set,i=new to,o=new z0,s=new to,l=(a,u=0)=>{o.increment(a),!r.has(a)&&(this.register(a),i.use(a,c=>{u=Math.max(...Array.from(c).map(d=>n.indexOf(d)))+1}),this.graph.use(a,c=>{for(const d of c)d.sources.has(a)?(s.getOrCreate(d.sink).add(d),l(d.sink,u)):i.getOrCreate(d.sink).add(a)}),r.add(a),n.splice(u,0,a))};return t.forEach(l),{participatingNodes:n,pendingPulls:i,projections:s,refCount:o}}getExecutionMap(t){let n=t;if(t.length===1){n=t[0];const i=this.executionMaps.get(n);if(i!==void 0)return i}else for(const[i,o]of this.executionMaps.entries())if(Array.isArray(i)&&i.length===t.length&&i.every(s=>t.includes(s)))return o;const r=this.calculateExecutionMap(t);return this.executionMaps.set(n,r),r}combineOperators(...t){return n=>{for(const r of t)n=r(n,this);return n}}};function re(e,t=Ja,n=!0){return Zn(Symbol(),r=>{os.set(r,{type:ch,distinct:n,initial:e,init:t})})}function ze(e=Ja,t=!1){return Zn(Symbol(),n=>{os.set(n,{type:"signal",distinct:t,init:e})})}function Fn(e=Ja){return Zn(Symbol(),t=>{os.set(t,{type:"signal",distinct:!1,init:e})})}const dh=T.createContext(null);function ss(){const e=T.useContext(dh);if(e===null)throw new Error("useRealm must be used within a RealmContextProvider");return e}function vt(e){const t=ss();t.register(e);const n=T.useCallback(r=>t.sub(e,r),[t,e]);return T.useSyncExternalStore(n,()=>t.getValue(e),()=>t.getValue(e))}function dn(...e){const t=ss();return vt(t.combineCells.apply(t,e))}function xt(e){const t=ss();return t.register(e),T.useCallback(n=>{t.pub(e,n)},[t,e])}function yr(e){return(t,n)=>{const r=n.signalInstance();return n.connect({map:i=>o=>{i(e(o))},sink:r,sources:[t]}),r}}function Le(...e){return(t,n)=>{const r=n.signalInstance();return n.connect({map:i=>(...o)=>{i(o)},pulls:e,sink:r,sources:[t]}),r}}function fh(e){return(t,n)=>{const r=n.signalInstance();return n.connect({map:i=>()=>{i(e)},sink:r,sources:[t]}),r}}function ki(e){return(t,n)=>{const r=n.signalInstance();return n.connect({map:i=>o=>{e(o)&&i(o)},sink:r,sources:[t]}),r}}function hh(e,t){return(n,r)=>{const i=r.signalInstance();return r.connect({map:o=>s=>{o(t=e(t,s))},sink:i,sources:[n]}),i}}function U0(e,t){return t(e),e}function _r(){}function Kt(e){return function(t){return{init:n=>{var r;return(r=e.init)==null?void 0:r.call(e,n,t)},postInit:n=>{var r;return(r=e.postInit)==null?void 0:r.call(e,n,t)},update:n=>{var r;return(r=e.update)==null?void 0:r.call(e,n,t)}}}}function W0({children:e,plugins:t}){const n=w.useMemo(()=>U0(new j0,r=>{var i,o;for(const s of t)(i=s.init)==null||i.call(s,r);for(const s of t)(o=s.postInit)==null||o.call(s,r)}),[]);return w.useEffect(()=>{var r;for(const i of t)(r=i.update)==null||r.call(i,n)}),w.createElement(dh.Provider,{value:n},e)}function J0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var K0=J0(function(e){const t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});const ph=T.createContext(null);function Z0(e,t){return{getTheme:function(){return t??null}}}function it(){const e=T.useContext(ph);return e==null&&K0(8),e}function fn(e){return{}}const Si={},G0={},ls={},Gn={},br={},hi={},vr={},Ei={},Fl={},pi={},gi={},nn={},as={},us={},gh={},mh={},q0={},Ka={},Y0={},Za={},Ga={},mi={},qa={},cs={},Ti={},ds={},Ya={},xh={},So={},Pl={},Xa={},X0={},fs={},Qa={},Q0={},hs={},eu={},Ml={},e5={},t5={},Gr={},qr={},yh={},_h={},bh={},Rt=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,n5=Rt&&"documentMode"in document?document.documentMode:null,St=Rt&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),En=Rt&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Eo=!(!Rt||!("InputEvent"in window)||n5)&&"getTargetRanges"in new window.InputEvent("input"),ps=Rt&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Ii=Rt&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,r5=Rt&&/Android/.test(navigator.userAgent),vh=Rt&&/^(?=.*Chrome).*/i.test(navigator.userAgent),i5=Rt&&r5&&vh,tu=Rt&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!vh,o5=1,s5=3,l5=9,a5=11,Xn=0,Ch=1,Sr=2,u5=0,c5=1,d5=2,To=4,Io=8,nu=128,f5=1792|(112|(3|To|Io)|nu),ru=1,iu=2,ou=3,su=4,lu=5,au=6,gs=ps||Ii||tu?" ":"​",sn=`
7
-
8
- `,h5=En?" ":gs,wh="֑-߿יִ-﷽ﹰ-ﻼ",kh="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",p5=new RegExp("^[^"+kh+"]*["+wh+"]"),g5=new RegExp("^[^"+wh+"]*["+kh+"]"),Qn={bold:1,capitalize:1024,code:16,highlight:nu,italic:2,lowercase:256,strikethrough:To,subscript:32,superscript:64,underline:Io,uppercase:512},m5={directionless:1,unmergeable:2},Sc={center:iu,end:au,justify:su,left:ru,right:ou,start:lu},x5={[iu]:"center",[au]:"end",[su]:"justify",[ru]:"left",[ou]:"right",[lu]:"start"},y5={normal:0,segmented:2,token:1},_5={[u5]:"normal",[d5]:"segmented",[c5]:"token"};function b5(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var W=b5(function(e){const t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});function Ao(...e){const t=[];for(const n of e)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))t.push(r);return t}const v5=100;let Rl=!1,uu=0;function C5(e){uu=e.timeStamp}function tl(e,t,n){const r=e.nodeName==="BR",i=t.__lexicalLineBreak;return i&&(e===i||r&&e.previousSibling===i)||r&&xs(e,n)!==void 0}function w5(e,t,n){const r=Ft(n._window);let i=null,o=null;r!==null&&r.anchorNode===e&&(i=r.anchorOffset,o=r.focusOffset);const s=e.nodeValue;s!==null&&gu(t,s,i,o,!1)}function k5(e,t,n){if(D(e)){const r=e.anchor.getNode();if(r.is(n)&&e.format!==r.getFormat())return!1}return hn(t)&&n.isAttached()}function S5(e,t,n,r){for(let i=e;i&&!D5(i);i=Ni(i)){const o=xs(i,t);if(o!==void 0){const s=Re(o,n);if(s)return ye(s)||!Fe(i)?void 0:[i,s]}else if(i===r)return[r,Fh(n)]}}function Sh(e,t,n){Rl=!0;const r=performance.now()-uu>v5;try{bt(e,()=>{const i=U()||function(h){return h.getEditorState().read(()=>{const f=U();return f!==null?f.clone():null})}(e),o=new Map,s=e.getRootElement(),l=e._editorState,a=e._blockCursorElement;let u=!1,c="";for(let h=0;h<t.length;h++){const f=t[h],p=f.type,x=f.target,y=S5(x,e,l,s);if(!y)continue;const[_,g]=y;if(p==="characterData")r&&z(g)&&hn(x)&&k5(i,x,g)&&w5(x,g,e);else if(p==="childList"){u=!0;const m=f.addedNodes;for(let v=0;v<m.length;v++){const C=m[v],E=Nh(C),I=C.parentNode;if(I!=null&&C!==a&&E===null&&!tl(C,I,e)){if(En){const F=(Fe(C)?C.innerText:null)||C.nodeValue;F&&(c+=F)}I.removeChild(C)}}const b=f.removedNodes,k=b.length;if(k>0){let v=0;for(let C=0;C<k;C++){const E=b[C];(tl(E,x,e)||a===E)&&(x.appendChild(E),v++)}k!==v&&o.set(_,g)}}}if(o.size>0)for(const[h,f]of o)f.reconcileObservedMutation(h,e);const d=n.takeRecords();if(d.length>0){for(let h=0;h<d.length;h++){const f=d[h],p=f.addedNodes,x=f.target;for(let y=0;y<p.length;y++){const _=p[y],g=_.parentNode;g==null||_.nodeName!=="BR"||tl(_,x,e)||g.removeChild(_)}}n.takeRecords()}i!==null&&(u&&(i.dirty=!0,Ye(i)),En&&Oh(e)&&i.insertRawText(c))})}finally{Rl=!1}}function Eh(e){const t=e._observer;t!==null&&Sh(e,t.takeRecords(),t)}function Th(e){(function(t){uu===0&&_s(t).addEventListener("textInput",C5,!0)})(e),e._observer=new MutationObserver((t,n)=>{Sh(e,t,n)})}function Ec(e,t){const n=e.__mode,r=e.__format,i=e.__style,o=t.__mode,s=t.__format,l=t.__style;return!(n!==null&&n!==o||r!==null&&r!==s||i!==null&&i!==l)}function Tc(e,t){const n=e.mergeWithSibling(t),r=Oe()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function Ic(e){let t,n,r=e;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(t=r.getPreviousSibling())!==null&&z(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(Ec(t,r)){r=Tc(t,r);break}break}t.remove()}for(;(n=r.getNextSibling())!==null&&z(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==""){if(Ec(r,n)){r=Tc(r,n);break}break}n.remove()}}else r.remove()}function Er(e){return Ac(e.anchor),Ac(e.focus),e}function Ac(e){for(;e.type==="element";){const t=e.getNode(),n=e.offset;let r,i;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),i=!0):(r=t.getChildAtIndex(n),i=!1),z(r)){e.set(r.__key,i?r.getTextContentSize():0,"text");break}if(!O(r))break;e.set(r.__key,i?r.getChildrenSize():0,"element")}}let E5=1;const T5=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e)};function cu(e){const t=document.activeElement;if(!Fe(t))return!1;const n=t.nodeName;return ye(ln(e))&&(n==="INPUT"||n==="TEXTAREA"||t.contentEditable==="true"&&ms(t)==null)}function Ai(e,t,n){const r=e.getRootElement();try{return r!==null&&r.contains(t)&&r.contains(n)&&t!==null&&!cu(t)&&fu(t)===e}catch{return!1}}function du(e){return e instanceof Ss}function fu(e){let t=e;for(;t!=null;){const n=ms(t);if(du(n))return n;t=Ni(t)}return null}function ms(e){return e?e.__lexicalEditor:null}function Jn(e){return e.isToken()||e.isSegmented()}function hn(e){return Lr(e)&&e.nodeType===s5}function I5(e){return Lr(e)&&e.nodeType===l5}function No(e){let t=e;for(;t!=null;){if(hn(t))return t;t=t.firstChild}return null}function Lo(e,t,n){const r=Qn[t];if(n!==null&&(e&r)==(n&r))return e;let i=e^r;return t==="subscript"?i&=-65:t==="superscript"?i&=-33:t==="lowercase"?(i&=-513,i&=-1025):t==="uppercase"?(i&=-257,i&=-1025):t==="capitalize"&&(i&=-257,i&=-513),i}function Ih(e){return z(e)||Lt(e)||ye(e)}function Ah(e,t){if(t!=null)return void(e.__key=t);lt(),ip();const n=Oe(),r=Pn(),i=""+E5++;r._nodeMap.set(i,e),O(e)?n._dirtyElements.set(i,!0):n._dirtyLeaves.add(i),n._cloneNotNeeded.add(i),n._dirtyType=Ch,e.__key=i}function qn(e){const t=e.getParent();if(t!==null){const n=e.getWritable(),r=t.getWritable(),i=e.getPreviousSibling(),o=e.getNextSibling();if(i===null)if(o!==null){const s=o.getWritable();r.__first=o.__key,s.__prev=null}else r.__first=null;else{const s=i.getWritable();if(o!==null){const l=o.getWritable();l.__prev=s.__key,s.__next=l.__key}else s.__next=null;n.__prev=null}if(o===null)if(i!==null){const s=i.getWritable();r.__last=i.__key,s.__next=null}else r.__last=null;else{const s=o.getWritable();if(i!==null){const l=i.getWritable();l.__next=s.__key,s.__prev=l.__key}else s.__prev=null;n.__next=null}r.__size--,n.__parent=null}}function Fo(e){ip();const t=e.getLatest(),n=t.__parent,r=Pn(),i=Oe(),o=r._nodeMap,s=i._dirtyElements;n!==null&&function(a,u,c){let d=a;for(;d!==null;){if(c.has(d))return;const h=u.get(d);if(h===void 0)break;c.set(d,!1),d=h.__parent}}(n,o,s);const l=t.__key;i._dirtyType=Ch,O(e)?s.set(l,!0):i._dirtyLeaves.add(l)}function qe(e){lt();const t=Oe(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,n!==null){const r=Re(n);r!==null&&r.getWritable()}if(e!==null){const r=Re(e);r!==null&&r.getWritable()}}}function wn(){return Pi()?null:Oe()._compositionKey}function Re(e,t){const n=(t||Pn())._nodeMap.get(e);return n===void 0?null:n}function Nh(e,t){const n=xs(e,Oe());return n!==void 0?Re(n,t):null}function xs(e,t){return e[`__lexicalKey_${t._key}`]}function ln(e,t){let n=e;for(;n!=null;){const r=Nh(n,t);if(r!==null)return r;n=Ni(n)}return null}function Lh(e){const t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function Nc(e){return e.read(()=>Ee().getTextContent())}function Ee(){return Fh(Pn())}function Fh(e){return e._nodeMap.get("root")}function Ye(e){lt();const t=Pn();e!==null&&(e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function mr(e){const t=Oe(),n=function(r,i){let o=r;for(;o!=null;){const s=xs(o,i);if(s!==void 0)return s;o=Ni(o)}return null}(e,t);return n===null?e===t.getRootElement()?Re("root"):null:Re(n)}function Lc(e,t){return t?e.getTextContentSize():0}function Ph(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function hu(e){const t=[];let n=e;for(;n!==null;)t.push(n),n=n._parentEditor;return t}function Mh(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function Rh(e){return hn(e)?e.nodeValue:null}function pu(e,t,n){const r=Ft(t._window);if(r===null)return;const i=r.anchorNode;let{anchorOffset:o,focusOffset:s}=r;if(i!==null){let l=Rh(i);const a=ln(i);if(l!==null&&z(a)){if(l===gs&&n){const u=n.length;l=n,o=u,s=u}l!==null&&gu(a,l,o,s,e)}}}function gu(e,t,n,r,i){let o=e;if(o.isAttached()&&(i||!o.isDirty())){const s=o.isComposing();let l=t;(s||i)&&t[t.length-1]===gs&&(l=t.slice(0,-1));const a=o.getTextContent();if(i||l!==a){if(l===""){if(qe(null),ps||Ii||tu)o.remove();else{const x=Oe();setTimeout(()=>{x.update(()=>{o.isAttached()&&o.remove()})},20)}return}const u=o.getParent(),c=Pr(),d=o.getTextContentSize(),h=wn(),f=o.getKey();if(o.isToken()||h!==null&&f===h&&!s||D(c)&&(u!==null&&!u.canInsertTextBefore()&&c.anchor.offset===0||c.anchor.key===e.__key&&c.anchor.offset===0&&!o.canInsertTextBefore()&&!s||c.focus.key===e.__key&&c.focus.offset===d&&!o.canInsertTextAfter()&&!s))return void o.markDirty();const p=U();if(!D(p)||n===null||r===null)return void o.setTextContent(l);if(p.setTextNodeRange(o,n,o,r),o.isSegmented()){const x=Ae(o.getTextContent());o.replace(x),o=x}o.setTextContent(l)}}}function A5(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;const n=e.anchor.offset,r=t.getParentOrThrow(),i=t.isToken();return n===0?!t.canInsertTextBefore()||!r.canInsertTextBefore()&&!t.isComposing()||i||function(o){const s=o.getPreviousSibling();return(z(s)||O(s)&&s.isInline())&&!s.canInsertTextAfter()}(t):n===t.getTextContentSize()&&(!t.canInsertTextAfter()||!r.canInsertTextAfter()&&!t.isComposing()||i)}function Fc(e){return e==="ArrowLeft"}function Pc(e){return e==="ArrowRight"}function Yr(e,t){return St?e:t}function Mc(e){return e==="Enter"}function zr(e){return e==="Backspace"}function jr(e){return e==="Delete"}function Rc(e,t,n){return e.toLowerCase()==="a"&&Yr(t,n)}function N5(e){const t=Ee();if(D(e)){const n=e.anchor,r=e.focus,i=n.getNode().getTopLevelElementOrThrow().getParentOrThrow();return n.set(i.getKey(),0,"element"),r.set(i.getKey(),i.getChildrenSize(),"element"),Er(e),e}{const n=t.select(0,t.getChildrenSize());return Ye(Er(n)),n}}function Cr(e,t){e.__lexicalClassNameCache===void 0&&(e.__lexicalClassNameCache={});const n=e.__lexicalClassNameCache,r=n[t];if(r!==void 0)return r;const i=e[t];if(typeof i=="string"){const o=Ao(i);return n[t]=o,o}return i}function mu(e,t,n,r,i){if(n.size===0)return;const o=r.__type,s=r.__key,l=t.get(o);l===void 0&&W(33,o);const a=l.klass;let u=e.get(a);u===void 0&&(u=new Map,e.set(a,u));const c=u.get(s),d=c==="destroyed"&&i==="created";(c===void 0||d)&&u.set(s,d?"updated":i)}function Oc(e,t,n){const r=e.getParent();let i=n,o=e;return r!==null&&(t&&n===0?(i=o.getIndexWithinParent(),o=r):t||n!==o.getChildrenSize()||(i=o.getIndexWithinParent()+1,o=r)),o.getChildAtIndex(t?i-1:i)}function xi(e,t){const n=e.offset;if(e.type==="element")return Oc(e.getNode(),t,n);{const r=e.getNode();if(t&&n===0||!t&&n===r.getTextContentSize()){const i=t?r.getPreviousSibling():r.getNextSibling();return i===null?Oc(r.getParentOrThrow(),t,r.getIndexWithinParent()+(t?0:1)):i}}return null}function Oh(e){const t=_s(e).event,n=t&&t.inputType;return n==="insertFromPaste"||n==="insertFromPasteAsQuotation"}function X(e,t,n){return lp(e,t,n)}function ys(e){return!Xe(e)&&!e.isLastChild()&&!e.isInline()}function Po(e,t){const n=e._keyToDOMMap.get(t);return n===void 0&&W(75,t),n}function Ni(e){const t=e.assignedSlot||e.parentElement;return Ol(t)?t.host:t}function $h(e){return I5(e)?e:Fe(e)?e.ownerDocument:null}function ni(e,t){let n=e.getParent();for(;n!==null;){if(n.is(t))return!0;n=n.getParent()}return!1}function xu(e){const t=$h(e);return t?t.defaultView:null}function _s(e){const t=e._window;return t===null&&W(78),t}function L5(e){let t=e.getParentOrThrow();for(;t!==null;){if(Ve(t))return t;t=t.getParentOrThrow()}return t}function Ve(e){return Xe(e)||O(e)&&e.isShadowRoot()}function F5(e){const t=e.constructor.clone(e);return Ah(t,null),t}function dt(e){const t=Oe(),n=e.constructor.getType(),r=t._nodes.get(n);r===void 0&&W(200,e.constructor.name,n);const{replace:i,replaceWithKlass:o}=r;if(i!==null){const s=i(e),l=s.constructor;return o!==null?s instanceof o||W(201,o.name,o.getType(),l.name,l.getType(),e.constructor.name,n):s instanceof e.constructor&&l!==e.constructor||W(202,l.name,l.getType(),e.constructor.name,n),s.__key===e.__key&&W(203,e.constructor.name,n,l.name,l.getType()),s}return e}function nl(e,t){!Xe(e.getParent())||O(t)||ye(t)||W(99)}function rl(e){return(ye(e)||O(e)&&!e.canBeEmpty())&&!e.isInline()}function yu(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null;const r=e.parentElement;r!==null&&r.removeChild(e)}function P5(e,t,n){let r=e._blockCursorElement;if(D(n)&&n.isCollapsed()&&n.anchor.type==="element"&&t.contains(document.activeElement)){const i=n.anchor,o=i.getNode(),s=i.offset;let l=!1,a=null;if(s===o.getChildrenSize())rl(o.getChildAtIndex(s-1))&&(l=!0);else{const u=o.getChildAtIndex(s);if(u!==null&&rl(u)){const c=u.getPreviousSibling();(c===null||rl(c))&&(l=!0,a=e.getElementByKey(u.__key))}}if(l){const u=e.getElementByKey(o.__key);return r===null&&(e._blockCursorElement=r=function(c){const d=c.theme,h=document.createElement("div");h.contentEditable="false",h.setAttribute("data-lexical-cursor","true");let f=d.blockCursor;if(f!==void 0){if(typeof f=="string"){const p=Ao(f);f=d.blockCursor=p}f!==void 0&&h.classList.add(...f)}return h}(e._config)),t.style.caretColor="transparent",void(a===null?u.appendChild(r):u.insertBefore(r,a))}}r!==null&&yu(r,e,t)}function Ft(e){return Rt?(e||window).getSelection():null}function M5(e){const t=xu(e);return t?t.getSelection():null}function R5(e,t){let n=e.getChildAtIndex(t);n==null&&(n=e),Ve(e)&&W(102);const r=s=>{const l=s.getParentOrThrow(),a=Ve(l),u=s!==n||a?F5(s):s;if(a)return O(s)&&O(u)||W(133),s.insertAfter(u),[s,u,u];{const[c,d,h]=r(l),f=s.getNextSiblings();return h.append(u,...f),[c,d,u]}},[i,o]=r(n);return[i,o]}function Dh(e){return Fe(e)&&e.tagName==="A"}function Fe(e){return Lr(e)&&e.nodeType===o5}function Lr(e){return typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeType=="number"}function Ol(e){return Lr(e)&&e.nodeType===a5}function $l(e){const t=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return e.nodeName.match(t)!==null}function Mo(e){const t=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return e.nodeName.match(t)!==null}function vn(e){if(ye(e)&&!e.isInline())return!0;if(!O(e)||Ve(e))return!1;const t=e.getFirstChild(),n=t===null||Lt(t)||z(t)||t.isInline();return!e.isInline()&&e.canBeEmpty()!==!1&&n}function Ur(e,t){let n=e;for(;n!==null&&n.getParent()!==null&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}function O5(){return Oe()}const $c=new WeakMap,$5=new Map;function Dc(e){if(!e._readOnly&&e.isEmpty())return $5;e._readOnly||W(192);let t=$c.get(e);return t||(t=function(n){const r=new Map;for(const[i,o]of n._nodeMap){const s=o.__type;let l=r.get(s);l||(l=new Map,r.set(s,l)),l.set(i,o)}return r}(e),$c.set(e,t)),t}function _u(e){const t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function bu(e,t){const n=(parseInt(e.style.paddingInlineStart,10)||0)/40;t.setIndent(n)}function D5(e){return e.__lexicalUnmanaged===!0}function Vh(e,t,n,r,i,o){let s=e.getFirstChild();for(;s!==null;){const l=s.__key;s.__parent===t&&(O(s)&&Vh(s,l,n,r,i,o),n.has(l)||o.delete(l),i.push(l)),s=s.getNextSibling()}}let An,rt,yi,bs,Dl,Vl,er,Nt,Hl,_i,Be="",nt="",Vt=null,Et="",en="",Hh=!1,bi=!1,go=null;function Ro(e,t){const n=er.get(e);if(t!==null){const r=jl(e);r.parentNode===t&&t.removeChild(r)}if(Nt.has(e)||rt._keyToDOMMap.delete(e),O(n)){const r=$o(n,er);Bl(r,0,r.length-1,null)}n!==void 0&&mu(_i,yi,bs,n,"destroyed")}function Bl(e,t,n,r){let i=t;for(;i<=n;++i){const o=e[i];o!==void 0&&Ro(o,r)}}function jn(e,t){e.setProperty("text-align",t)}const V5="40px";function Bh(e,t){const n=An.theme.indent;if(typeof n=="string"){const i=e.classList.contains(n);t>0&&!i?e.classList.add(n):t<1&&i&&e.classList.remove(n)}const r=getComputedStyle(e).getPropertyValue("--lexical-indent-base-value")||V5;e.style.setProperty("padding-inline-start",t===0?"":`calc(${t} * ${r})`)}function zh(e,t){const n=e.style;t===0?jn(n,""):t===ru?jn(n,"left"):t===iu?jn(n,"center"):t===ou?jn(n,"right"):t===su?jn(n,"justify"):t===lu?jn(n,"start"):t===au&&jn(n,"end")}function Oo(e,t){const n=Nt.get(e);n===void 0&&W(60);const r=n.createDOM(An,rt);if(function(i,o,s){const l=s._keyToDOMMap;(function(a,u,c){a[`__lexicalKey_${u._key}`]=c})(o,s,i),l.set(i,o)}(e,r,rt),z(n)?r.setAttribute("data-lexical-text","true"):ye(n)&&r.setAttribute("data-lexical-decorator","true"),O(n)){const i=n.__indent,o=n.__size;if(i!==0&&Bh(r,i),o!==0){const l=o-1;(function(a,u,c,d){const h=nt;nt="",zl(a,c,0,u,c.getDOMSlot(d)),Uh(c,d),nt=h})($o(n,Nt),l,n,r)}const s=n.__format;s!==0&&zh(r,s),n.isInline()||jh(null,n,r),ys(n)&&(Be+=sn,en+=sn)}else{const i=n.getTextContent();if(ye(n)){const o=n.decorate(rt,An);o!==null&&Wh(e,o),r.contentEditable="false"}else z(n)&&(n.isDirectionless()||(nt+=i));Be+=i,en+=i}return t!==null&&t.insertChild(r),mu(_i,yi,bs,n,"created"),r}function zl(e,t,n,r,i){const o=Be;Be="";let s=n;for(;s<=r;++s){Oo(e[s],i);const l=Nt.get(e[s]);l!==null&&z(l)&&(Vt===null&&(Vt=l.getFormat()),Et===""&&(Et=l.getStyle()))}ys(t)&&(Be+=sn),i.element.__lexicalTextContent=Be,Be=o+Be}function Vc(e,t){if(e){const n=e.__last;if(n){const r=t.get(n);if(r)return Lt(r)?"line-break":ye(r)&&r.isInline()?"decorator":null}return"empty"}return null}function jh(e,t,n){const r=Vc(e,er),i=Vc(t,Nt);r!==i&&t.getDOMSlot(n).setManagedLineBreak(i)}function Uh(e,t){const n=t.__lexicalDirTextContent||"",r=t.__lexicalDir||"";if(n!==nt||r!==go){const o=nt==="",s=o?go:(i=nt,p5.test(i)?"rtl":g5.test(i)?"ltr":null);if(s!==r){const l=t.classList,a=An.theme;let u=r!==null?a[r]:void 0,c=s!==null?a[s]:void 0;if(u!==void 0){if(typeof u=="string"){const d=Ao(u);u=a[r]=d}l.remove(...u)}if(s===null||o&&s==="ltr")t.removeAttribute("dir");else{if(c!==void 0){if(typeof c=="string"){const d=Ao(c);c=a[s]=d}c!==void 0&&l.add(...c)}t.dir=s}bi||(e.getWritable().__dir=s)}go=s,t.__lexicalDirTextContent=nt,t.__lexicalDir=s}var i}function H5(e,t,n){const r=nt;var i;nt="",Vt=null,Et="",function(o,s,l){const a=Be,u=o.__size,c=s.__size;Be="";const d=l.element;if(u===1&&c===1){const h=o.__first,f=s.__first;if(h===f)Xr(h,d);else{const x=jl(h),y=Oo(f,null);try{d.replaceChild(y,x)}catch(_){if(typeof _=="object"&&_!=null){const g=`${_.toString()} Parent: ${d.tagName}, new child: {tag: ${y.tagName} key: ${f}}, old child: {tag: ${x.tagName}, key: ${h}}.`;throw new Error(g)}throw _}Ro(h,null)}const p=Nt.get(f);z(p)&&(Vt===null&&(Vt=p.getFormat()),Et===""&&(Et=p.getStyle()))}else{const h=$o(o,er),f=$o(s,Nt);if(h.length!==u&&W(227),f.length!==c&&W(228),u===0)c!==0&&zl(f,s,0,c-1,l);else if(c===0){if(u!==0){const p=l.after==null&&l.before==null&&l.element.__lexicalLineBreak==null;Bl(h,0,u-1,p?null:d),p&&(d.textContent="")}}else(function(p,x,y,_,g,m){const b=_-1,k=g-1;let v,C,E=m.getFirstChild(),I=0,F=0;for(;I<=b&&F<=k;){const M=x[I],K=y[F];if(M===K)E=il(Xr(K,m.element)),I++,F++;else{v===void 0&&(v=new Set(x)),C===void 0&&(C=new Set(y));const Q=C.has(M),Z=v.has(K);if(Q)if(Z){const ne=Po(rt,K);ne===E?E=il(Xr(K,m.element)):(m.withBefore(E).insertChild(ne),Xr(K,m.element)),I++,F++}else Oo(K,m.withBefore(E)),F++;else E=il(jl(M)),Ro(M,m.element),I++}const B=Nt.get(K);B!==null&&z(B)&&(Vt===null&&(Vt=B.getFormat()),Et===""&&(Et=B.getStyle()))}const P=I>b,R=F>k;if(P&&!R){const M=y[k+1],K=M===void 0?null:rt.getElementByKey(M);zl(y,p,F,k,m.withBefore(K))}else R&&!P&&Bl(x,I,b,m.element)})(s,h,f,u,c,l)}ys(s)&&(Be+=sn),d.__lexicalTextContent=Be,Be=a+Be}(e,t,t.getDOMSlot(n)),Uh(t,n),i=t,Vt==null||Vt===i.__textFormat||bi||(i.setTextFormat(Vt),i.setTextStyle(Et)),function(o){Et===""||Et===o.__textStyle||bi||o.setTextStyle(Et)}(t),nt=r}function $o(e,t){const n=[];let r=e.__first;for(;r!==null;){const i=t.get(r);i===void 0&&W(101),n.push(r),r=i.__next}return n}function Xr(e,t){const n=er.get(e);let r=Nt.get(e);n!==void 0&&r!==void 0||W(61);const i=Hh||Vl.has(e)||Dl.has(e),o=Po(rt,e);if(n===r&&!i){if(O(n)){const s=o.__lexicalTextContent;s!==void 0&&(Be+=s,en+=s);const l=o.__lexicalDirTextContent;l!==void 0&&(nt+=l)}else{const s=n.getTextContent();z(n)&&!n.isDirectionless()&&(nt+=s),en+=s,Be+=s}return o}if(n!==r&&i&&mu(_i,yi,bs,r,"updated"),r.updateDOM(n,o,An)){const s=Oo(e,null);return t===null&&W(62),t.replaceChild(s,o),Ro(e,null),s}if(O(n)&&O(r)){const s=r.__indent;s!==n.__indent&&Bh(o,s);const l=r.__format;l!==n.__format&&zh(o,l),i&&(H5(n,r,o),Xe(r)||r.isInline()||jh(n,r,o)),ys(r)&&(Be+=sn,en+=sn)}else{const s=r.getTextContent();if(ye(r)){const l=r.decorate(rt,An);l!==null&&Wh(e,l)}else z(r)&&!r.isDirectionless()&&(nt+=s);Be+=s,en+=s}if(!bi&&Xe(r)&&r.__cachedText!==en){const s=r.getWritable();s.__cachedText=en,r=s}return o}function Wh(e,t){let n=rt._pendingDecorators;const r=rt._decorators;if(n===null){if(r[e]===t)return;n=Lh(rt)}n[e]=t}function il(e){let t=e.nextSibling;return t!==null&&t===rt._blockCursorElement&&(t=t.nextSibling),t}function B5(e,t,n,r,i,o){Be="",en="",nt="",Hh=r===Sr,go=null,rt=n,An=n._config,yi=n._nodes,bs=rt._listeners.mutation,Dl=i,Vl=o,er=e._nodeMap,Nt=t._nodeMap,bi=t._readOnly,Hl=new Map(n._keyToDOMMap);const s=new Map;return _i=s,Xr("root",null),rt=void 0,yi=void 0,Dl=void 0,Vl=void 0,er=void 0,Nt=void 0,An=void 0,Hl=void 0,_i=void 0,s}function jl(e){const t=Hl.get(e);return t===void 0&&W(75,e),t}const Yt=Object.freeze({}),Ul=30,Wl=[["keydown",function(e,t){if(ri=e.timeStamp,Jh=e.key,t.isComposing())return;const{key:n,shiftKey:r,ctrlKey:i,metaKey:o,altKey:s}=e;if(!X(t,gh,e)&&n!=null){if(function(l,a,u,c){return Pc(l)&&!a&&!c&&!u}(n,i,s,o))X(t,mh,e);else if(function(l,a,u,c,d){return Pc(l)&&!c&&!u&&(a||d)}(n,i,r,s,o))X(t,q0,e);else if(function(l,a,u,c){return Fc(l)&&!a&&!c&&!u}(n,i,s,o))X(t,Ka,e);else if(function(l,a,u,c,d){return Fc(l)&&!c&&!u&&(a||d)}(n,i,r,s,o))X(t,Y0,e);else if(function(l,a,u){return function(c){return c==="ArrowUp"}(l)&&!a&&!u}(n,i,o))X(t,Za,e);else if(function(l,a,u){return function(c){return c==="ArrowDown"}(l)&&!a&&!u}(n,i,o))X(t,Ga,e);else if(function(l,a){return Mc(l)&&a}(n,r))ii=!0,X(t,mi,e);else if(function(l){return l===" "}(n))X(t,qa,e);else if(function(l,a){return St&&a&&l.toLowerCase()==="o"}(n,i))e.preventDefault(),ii=!0,X(t,br,!0);else if(function(l,a){return Mc(l)&&!a}(n,r))ii=!1,X(t,mi,e);else if(function(l,a,u,c){return St?!a&&!u&&(zr(l)||l.toLowerCase()==="h"&&c):!(c||a||u)&&zr(l)}(n,s,o,i))zr(n)?X(t,cs,e):(e.preventDefault(),X(t,Gn,!0));else if(function(l){return l==="Escape"}(n))X(t,Ti,e);else if(function(l,a,u,c,d){return St?!(u||c||d)&&(jr(l)||l.toLowerCase()==="d"&&a):!(a||c||d)&&jr(l)}(n,i,r,s,o))jr(n)?X(t,ds,e):(e.preventDefault(),X(t,Gn,!1));else if(function(l,a,u){return zr(l)&&(St?a:u)}(n,s,i))e.preventDefault(),X(t,pi,!0);else if(function(l,a,u){return jr(l)&&(St?a:u)}(n,s,i))e.preventDefault(),X(t,pi,!1);else if(function(l,a){return St&&a&&zr(l)}(n,o))e.preventDefault(),X(t,gi,!0);else if(function(l,a){return St&&a&&jr(l)}(n,o))e.preventDefault(),X(t,gi,!1);else if(function(l,a,u,c){return l.toLowerCase()==="b"&&!a&&Yr(u,c)}(n,s,o,i))e.preventDefault(),X(t,nn,"bold");else if(function(l,a,u,c){return l.toLowerCase()==="u"&&!a&&Yr(u,c)}(n,s,o,i))e.preventDefault(),X(t,nn,"underline");else if(function(l,a,u,c){return l.toLowerCase()==="i"&&!a&&Yr(u,c)}(n,s,o,i))e.preventDefault(),X(t,nn,"italic");else if(function(l,a,u,c){return l==="Tab"&&!a&&!u&&!c}(n,s,i,o))X(t,Ya,e);else if(function(l,a,u,c){return l.toLowerCase()==="z"&&!a&&Yr(u,c)}(n,r,o,i))e.preventDefault(),X(t,as,void 0);else if(function(l,a,u,c){return St?l.toLowerCase()==="z"&&u&&a:l.toLowerCase()==="y"&&c||l.toLowerCase()==="z"&&c&&a}(n,r,o,i))e.preventDefault(),X(t,us,void 0);else{const l=t._editorState._selection;l===null||D(l)?!En&&Rc(n,o,i)&&(e.preventDefault(),X(t,Ml,e)):function(a,u,c,d){return!u&&a.toLowerCase()==="c"&&(St?c:d)}(n,r,o,i)?(e.preventDefault(),X(t,hs,e)):function(a,u,c,d){return!u&&a.toLowerCase()==="x"&&(St?c:d)}(n,r,o,i)?(e.preventDefault(),X(t,eu,e)):Rc(n,o,i)&&(e.preventDefault(),X(t,Ml,e))}(function(l,a,u,c){return l||a||u||c})(i,r,s,o)&&X(t,bh,e)}}],["pointerdown",function(e,t){const n=e.target,r=e.pointerType;Lr(n)&&r!=="touch"&&e.button===0&&bt(t,()=>{ye(ln(n))||(Kl=!0)})}],["compositionstart",function(e,t){bt(t,()=>{const n=U();if(D(n)&&!t.isComposing()){const r=n.anchor,i=n.anchor.getNode();qe(r.key),(e.timeStamp<ri+Ul||r.type==="element"||!n.isCollapsed()||i.getFormat()!==n.format||z(i)&&i.getStyle()!==n.style)&&X(t,vr,h5)}})}],["compositionend",function(e,t){En?Wr=!0:bt(t,()=>{ol(t,e.data)})}],["input",function(e,t){e.stopPropagation(),bt(t,()=>{const n=U(),r=e.data,i=qh(e);if(r!=null&&D(n)&&Gh(n,i,r,e.timeStamp,!1)){Wr&&(ol(t,r),Wr=!1);const o=n.anchor.getNode(),s=Ft(t._window);if(s===null)return;const l=n.isBackward(),a=l?n.anchor.offset:n.focus.offset,u=l?n.focus.offset:n.anchor.offset;Eo&&!n.isCollapsed()&&z(o)&&s.anchorNode!==null&&o.getTextContent().slice(0,a)+r+o.getTextContent().slice(a+u)===Rh(s.anchorNode)||X(t,vr,r);const c=r.length;En&&c>1&&e.inputType==="insertCompositionText"&&!t.isComposing()&&(n.anchor.offset-=c),ps||Ii||tu||!t.isComposing()||(ri=0,qe(null))}else pu(!1,t,r!==null?r:void 0),Wr&&(ol(t,r||void 0),Wr=!1);lt(),Eh(Oe())}),gr=null}],["click",function(e,t){bt(t,()=>{const n=U(),r=Ft(t._window),i=Pr();if(r){if(D(n)){const o=n.anchor,s=o.getNode();o.type==="element"&&o.offset===0&&n.isCollapsed()&&!Xe(s)&&Ee().getChildrenSize()===1&&s.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i)?(r.removeAllRanges(),n.dirty=!0):e.detail===3&&!n.isCollapsed()&&s!==n.focus.getNode()&&(O(s)?s.select(0):s.getParentOrThrow().select(0))}else if(e.pointerType==="touch"){const o=r.anchorNode;(Fe(o)||hn(o))&&Ye(wu(i,r,t,e))}}X(t,ls,e)})}],["cut",Yt],["copy",Yt],["dragstart",Yt],["dragover",Yt],["dragend",Yt],["paste",Yt],["focus",Yt],["blur",Yt],["drop",Yt]];Eo&&Wl.push(["beforeinput",(e,t)=>function(n,r){const i=n.inputType,o=qh(n);i==="deleteCompositionText"||En&&Oh(r)||i!=="insertCompositionText"&&bt(r,()=>{const s=U();if(i==="deleteContentBackward"){if(s===null){const f=Pr();if(!D(f))return;Ye(f.clone())}if(D(s)){const f=s.anchor.key===s.focus.key;if(l=n.timeStamp,Jh==="MediaLast"&&l<ri+Ul&&r.isComposing()&&f){if(qe(null),ri=0,setTimeout(()=>{bt(r,()=>{qe(null)})},Ul),D(s)){const p=s.anchor.getNode();p.markDirty(),s.format=p.getFormat(),z(p)||W(142),s.style=p.getStyle()}}else{qe(null),n.preventDefault();const p=s.anchor.getNode(),x=p.getTextContent(),y=p.canInsertTextAfter(),_=s.anchor.offset===0&&s.focus.offset===x.length;i5&&f&&!_&&y||X(r,Gn,!0)}return}}var l;if(!D(s))return;const a=n.data;gr!==null&&pu(!1,r,gr),s.dirty&&gr===null||!s.isCollapsed()||Xe(s.anchor.getNode())||o===null||s.applyDOMRange(o),gr=null;const u=s.anchor,c=s.focus,d=u.getNode(),h=c.getNode();if(i!=="insertText"&&i!=="insertTranspose")switch(n.preventDefault(),i){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":X(r,vr,n);break;case"insertFromComposition":qe(null),X(r,vr,n);break;case"insertLineBreak":qe(null),X(r,br,!1);break;case"insertParagraph":qe(null),ii&&!Ii?(ii=!1,X(r,br,!1)):X(r,hi,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":X(r,Ei,n);break;case"deleteByComposition":(function(f,p){return f!==p||O(f)||O(p)||!f.isToken()||!p.isToken()})(d,h)&&X(r,Fl,n);break;case"deleteByDrag":case"deleteByCut":X(r,Fl,n);break;case"deleteContent":X(r,Gn,!1);break;case"deleteWordBackward":X(r,pi,!0);break;case"deleteWordForward":X(r,pi,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":X(r,gi,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":X(r,gi,!1);break;case"formatStrikeThrough":X(r,nn,"strikethrough");break;case"formatBold":X(r,nn,"bold");break;case"formatItalic":X(r,nn,"italic");break;case"formatUnderline":X(r,nn,"underline");break;case"historyUndo":X(r,as,void 0);break;case"historyRedo":X(r,us,void 0)}else{if(a===`
9
- `)n.preventDefault(),X(r,br,!1);else if(a===sn)n.preventDefault(),X(r,hi,void 0);else if(a==null&&n.dataTransfer){const f=n.dataTransfer.getData("text/plain");n.preventDefault(),s.insertRawText(f)}else a!=null&&Gh(s,o,a,n.timeStamp,!0)?(n.preventDefault(),X(r,vr,a)):gr=a;Kh=n.timeStamp}})}(e,t)]);let ri=0,Jh=null,Kh=0,gr=null;const Do=new WeakMap;let Jl=!1,Kl=!1,ii=!1,Wr=!1,Zh=[0,"",0,"root",0];function Gh(e,t,n,r,i){const o=e.anchor,s=e.focus,l=o.getNode(),a=Oe(),u=Ft(a._window),c=u!==null?u.anchorNode:null,d=o.key,h=a.getElementByKey(d),f=n.length;return d!==s.key||!z(l)||(!i&&(!Eo||Kh<r+50)||l.isDirty()&&f<2||Ph(n))&&o.offset!==s.offset&&!l.isComposing()||Jn(l)||l.isDirty()&&f>1||(i||!Eo)&&h!==null&&!l.isComposing()&&c!==No(h)||u!==null&&t!==null&&(!t.collapsed||t.startContainer!==u.anchorNode||t.startOffset!==u.anchorOffset)||l.getFormat()!==e.format||l.getStyle()!==e.style||A5(e,l)}function Hc(e,t){return hn(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}function Bc(e,t,n){const{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s}=e;Jl&&(Jl=!1,Hc(r,i)&&Hc(o,s))||bt(t,()=>{if(!n)return void Ye(null);if(!Ai(t,r,o))return;const l=U();if(D(l)){const a=l.anchor,u=a.getNode();if(l.isCollapsed()){e.type==="Range"&&e.anchorNode===e.focusNode&&(l.dirty=!0);const c=_s(t).event,d=c?c.timeStamp:performance.now(),[h,f,p,x,y]=Zh,_=Ee(),g=t.isComposing()===!1&&_.getTextContent()==="";if(d<y+200&&a.offset===p&&a.key===x)l.format=h,l.style=f;else if(a.type==="text")z(u)||W(141),l.format=u.getFormat(),l.style=u.getStyle();else if(a.type==="element"&&!g){O(u)||W(259);const m=a.getNode();l.style="",m.isEmpty()?(l.format=m.getTextFormat(),l.style=m.getTextStyle()):l.format=0}}else{const c=a.key,d=l.focus.key,h=l.getNodes(),f=h.length,p=l.isBackward(),x=p?s:i,y=p?i:s,_=p?d:c,g=p?c:d;let m=f5,b=!1;for(let k=0;k<f;k++){const v=h[k],C=v.getTextContentSize();if(z(v)&&C!==0&&!(k===0&&v.__key===_&&x===C||k===f-1&&v.__key===g&&y===0)&&(b=!0,m&=v.getFormat(),m===0))break}l.format=b?m:0}}X(t,Si,void 0)})}function qh(e){if(!e.getTargetRanges)return null;const t=e.getTargetRanges();return t.length===0?null:t[0]}function ol(e,t){const n=e._compositionKey;if(qe(null),n!==null&&t!=null){if(t===""){const r=Re(n),i=No(e.getElementByKey(n));return void(i!==null&&i.nodeValue!==null&&z(r)&&gu(r,i.nodeValue,null,null,!0))}if(t[t.length-1]===`
10
- `){const r=U();if(D(r)){const i=r.focus;return r.anchor.set(i.key,i.offset,i.type),void X(e,mi,null)}}}pu(!0,e,t)}function Yh(e){let t=e.__lexicalEventHandles;return t===void 0&&(t=[],e.__lexicalEventHandles=t),t}const wr=new Map;function Xh(e){const t=M5(e.target);if(t===null)return;const n=fu(t.anchorNode);if(n===null)return;Kl&&(Kl=!1,bt(n,()=>{const a=Pr(),u=t.anchorNode;(Fe(u)||hn(u))&&Ye(wu(a,t,n,e))}));const r=hu(n),i=r[r.length-1],o=i._key,s=wr.get(o),l=s||i;l!==n&&Bc(t,l,!1),Bc(t,n,!0),n!==i?wr.set(o,n):s&&wr.delete(o)}function zc(e){e._lexicalHandled=!0}function jc(e){return e._lexicalHandled===!0}function z5(e){const t=e.ownerDocument,n=Do.get(t);n===void 0&&W(162);const r=n-1;r>=0||W(164),Do.set(t,r),r===0&&t.removeEventListener("selectionchange",Xh);const i=ms(e);du(i)?(function(s){if(s._parentEditor!==null){const l=hu(s),a=l[l.length-1]._key;wr.get(a)===s&&wr.delete(a)}else wr.delete(s._key)}(i),e.__lexicalEditor=null):i&&W(198);const o=Yh(e);for(let s=0;s<o.length;s++)o[s]();e.__lexicalEventHandles=[]}function Zl(e,t,n){lt();const r=e.__key,i=e.getParent();if(i===null)return;const o=function(l){const a=U();if(!D(a)||!O(l))return a;const{anchor:u,focus:c}=a,d=u.getNode(),h=c.getNode();return ni(d,l)&&u.set(l.__key,0,"element"),ni(h,l)&&c.set(l.__key,0,"element"),a}(e);let s=!1;if(D(o)&&t){const l=o.anchor,a=o.focus;l.key===r&&(Bo(l,e,i,e.getPreviousSibling(),e.getNextSibling()),s=!0),a.key===r&&(Bo(a,e,i,e.getPreviousSibling(),e.getNextSibling()),s=!0)}else He(o)&&t&&e.isSelected()&&e.selectPrevious();if(D(o)&&t&&!s){const l=e.getIndexWithinParent();qn(e),Ho(o,i,l,-1)}else qn(e);n||Ve(i)||i.canBeEmpty()||!i.isEmpty()||Zl(i,t),t&&Xe(i)&&i.isEmpty()&&i.selectEnd()}class vs{static getType(){W(64,this.name)}static clone(t){W(65,this.name)}afterCloneFrom(t){this.__parent=t.__parent,this.__next=t.__next,this.__prev=t.__prev}constructor(t){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Ah(this,t)}getType(){return this.__type}isInline(){W(137,this.constructor.name)}isAttached(){let t=this.__key;for(;t!==null;){if(t==="root")return!0;const n=Re(t);if(n===null)break;t=n.__parent}return!1}isSelected(t){const n=t||U();if(n==null)return!1;const r=n.getNodes().some(i=>i.__key===this.__key);if(z(this))return r;if(D(n)&&n.anchor.type==="element"&&n.focus.type==="element"){if(n.isCollapsed())return!1;const i=this.getParent();if(ye(this)&&this.isInline()&&i){const o=n.isBackward()?n.focus:n.anchor,s=o.getNode();if(o.offset===s.getChildrenSize()&&s.is(i)&&s.getLastChildOrThrow().is(this))return!1}}return r}getKey(){return this.__key}getIndexWithinParent(){const t=this.getParent();if(t===null)return-1;let n=t.getFirstChild(),r=0;for(;n!==null;){if(this.is(n))return r;r++,n=n.getNextSibling()}return-1}getParent(){const t=this.getLatest().__parent;return t===null?null:Re(t)}getParentOrThrow(){const t=this.getParent();return t===null&&W(66,this.__key),t}getTopLevelElement(){let t=this;for(;t!==null;){const n=t.getParent();if(Ve(n))return O(t)||t===this&&ye(t)||W(194),t;t=n}return null}getTopLevelElementOrThrow(){const t=this.getTopLevelElement();return t===null&&W(67,this.__key),t}getParents(){const t=[];let n=this.getParent();for(;n!==null;)t.push(n),n=n.getParent();return t}getParentKeys(){const t=[];let n=this.getParent();for(;n!==null;)t.push(n.__key),n=n.getParent();return t}getPreviousSibling(){const t=this.getLatest().__prev;return t===null?null:Re(t)}getPreviousSiblings(){const t=[],n=this.getParent();if(n===null)return t;let r=n.getFirstChild();for(;r!==null&&!r.is(this);)t.push(r),r=r.getNextSibling();return t}getNextSibling(){const t=this.getLatest().__next;return t===null?null:Re(t)}getNextSiblings(){const t=[];let n=this.getNextSibling();for(;n!==null;)t.push(n),n=n.getNextSibling();return t}getCommonAncestor(t){const n=this.getParents(),r=t.getParents();O(this)&&n.unshift(this),O(t)&&r.unshift(t);const i=n.length,o=r.length;if(i===0||o===0||n[i-1]!==r[o-1])return null;const s=new Set(r);for(let l=0;l<i;l++){const a=n[l];if(s.has(a))return a}return null}is(t){return t!=null&&this.__key===t.__key}isBefore(t){if(this===t)return!1;if(t.isParentOf(this))return!0;if(this.isParentOf(t))return!1;const n=this.getCommonAncestor(t);let r=0,i=0,o=this;for(;;){const s=o.getParentOrThrow();if(s===n){r=o.getIndexWithinParent();break}o=s}for(o=t;;){const s=o.getParentOrThrow();if(s===n){i=o.getIndexWithinParent();break}o=s}return r<i}isParentOf(t){const n=this.__key;if(n===t.__key)return!1;let r=t;for(;r!==null;){if(r.__key===n)return!0;r=r.getParent()}return!1}getNodesBetween(t){const n=this.isBefore(t),r=[],i=new Set;let o=this;for(;o!==null;){const s=o.__key;if(i.has(s)||(i.add(s),r.push(o)),o===t)break;const l=O(o)?n?o.getFirstChild():o.getLastChild():null;if(l!==null){o=l;continue}const a=n?o.getNextSibling():o.getPreviousSibling();if(a!==null){o=a;continue}const u=o.getParentOrThrow();if(i.has(u.__key)||r.push(u),u===t)break;let c=null,d=u;do{if(d===null&&W(68),c=n?d.getNextSibling():d.getPreviousSibling(),d=d.getParent(),d===null)break;c!==null||i.has(d.__key)||r.push(d)}while(c===null);o=c}return n||r.reverse(),r}isDirty(){const t=Oe()._dirtyLeaves;return t!==null&&t.has(this.__key)}getLatest(){const t=Re(this.__key);return t===null&&W(113),t}getWritable(){lt();const t=Pn(),n=Oe(),r=t._nodeMap,i=this.__key,o=this.getLatest(),s=n._cloneNotNeeded,l=U();if(l!==null&&l.setCachedNodes(null),s.has(i))return Fo(o),o;const a=_u(o);return s.add(i),Fo(a),r.set(i,a),a}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(t,n){W(70)}updateDOM(t,n,r){W(71)}exportDOM(t){return{element:this.createDOM(t._config,t)}}exportJSON(){return{type:this.__type,version:1}}static importJSON(t){W(18,this.name)}updateFromJSON(t){return this}static transform(){return null}remove(t){Zl(this,!0,t)}replace(t,n){lt();let r=U();r!==null&&(r=r.clone()),nl(this,t);const i=this.getLatest(),o=this.__key,s=t.__key,l=t.getWritable(),a=this.getParentOrThrow().getWritable(),u=a.__size;qn(l);const c=i.getPreviousSibling(),d=i.getNextSibling(),h=i.__prev,f=i.__next,p=i.__parent;if(Zl(i,!1,!0),c===null?a.__first=s:c.getWritable().__next=s,l.__prev=h,d===null?a.__last=s:d.getWritable().__prev=s,l.__next=f,l.__parent=p,a.__size=u,n&&(O(this)&&O(l)||W(139),this.getChildren().forEach(x=>{l.append(x)})),D(r)){Ye(r);const x=r.anchor,y=r.focus;x.key===o&&Kc(x,l),y.key===o&&Kc(y,l)}return wn()===o&&qe(s),l}insertAfter(t,n=!0){lt(),nl(this,t);const r=this.getWritable(),i=t.getWritable(),o=i.getParent(),s=U();let l=!1,a=!1;if(o!==null){const f=t.getIndexWithinParent();if(qn(i),D(s)){const p=o.__key,x=s.anchor,y=s.focus;l=x.type==="element"&&x.key===p&&x.offset===f+1,a=y.type==="element"&&y.key===p&&y.offset===f+1}}const u=this.getNextSibling(),c=this.getParentOrThrow().getWritable(),d=i.__key,h=r.__next;if(u===null?c.__last=d:u.getWritable().__prev=d,c.__size++,r.__next=d,i.__next=h,i.__prev=r.__key,i.__parent=r.__parent,n&&D(s)){const f=this.getIndexWithinParent();Ho(s,c,f+1);const p=c.__key;l&&s.anchor.set(p,f+2,"element"),a&&s.focus.set(p,f+2,"element")}return t}insertBefore(t,n=!0){lt(),nl(this,t);const r=this.getWritable(),i=t.getWritable(),o=i.__key;qn(i);const s=this.getPreviousSibling(),l=this.getParentOrThrow().getWritable(),a=r.__prev,u=this.getIndexWithinParent();s===null?l.__first=o:s.getWritable().__next=o,l.__size++,r.__prev=o,i.__prev=a,i.__next=r.__key,i.__parent=r.__parent;const c=U();return n&&D(c)&&Ho(c,this.getParentOrThrow(),u),t}isParentRequired(){return!1}createParentElementNode(){return _e()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(t,n){lt();const r=this.getPreviousSibling(),i=this.getParentOrThrow();if(r===null)return i.select(0,0);if(O(r))return r.select();if(!z(r)){const o=r.getIndexWithinParent()+1;return i.select(o,o)}return r.select(t,n)}selectNext(t,n){lt();const r=this.getNextSibling(),i=this.getParentOrThrow();if(r===null)return i.select();if(O(r))return r.select(0,0);if(!z(r)){const o=r.getIndexWithinParent();return i.select(o,o)}return r.select(t,n)}markDirty(){this.getWritable()}reconcileObservedMutation(t,n){this.markDirty()}}class Li extends vs{static getType(){return"linebreak"}static clone(t){return new Li(t.__key)}constructor(t){super(t)}getTextContent(){return`
11
- `}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:t=>function(n){const r=n.parentElement;if(r!==null&&Mo(r)){const i=r.firstChild;if(i===n||i.nextSibling===n&&no(i)){const o=r.lastChild;if(o===n||o.previousSibling===n&&no(o))return!0}}return!1}(t)||function(n){const r=n.parentElement;if(r!==null&&Mo(r)){const i=r.firstChild;if(i===n||i.nextSibling===n&&no(i))return!1;const o=r.lastChild;if(o===n||o.previousSibling===n&&no(o))return!0}return!1}(t)?null:{conversion:j5,priority:0}}}static importJSON(t){return Pt().updateFromJSON(t)}}function j5(e){return{node:Pt()}}function Pt(){return dt(new Li)}function Lt(e){return e instanceof Li}function no(e){return hn(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}function sl(e,t){return 16&t?"code":t&nu?"mark":32&t?"sub":64&t?"sup":null}function ll(e,t){return 1&t?"strong":2&t?"em":"span"}function Qh(e,t,n,r,i){const o=r.classList;let s=Cr(i,"base");s!==void 0&&o.add(...s),s=Cr(i,"underlineStrikethrough");let l=!1;const a=t&Io&&t&To;s!==void 0&&(n&Io&&n&To?(l=!0,a||o.add(...s)):a&&o.remove(...s));for(const u in Qn){const c=Qn[u];if(s=Cr(i,u),s!==void 0)if(n&c){if(l&&(u==="underline"||u==="strikethrough")){t&c&&o.remove(...s);continue}t&c&&(!a||u!=="underline")&&u!=="strikethrough"||o.add(...s)}else t&c&&o.remove(...s)}}function ep(e,t,n){const r=t.firstChild,i=n.isComposing(),o=e+(i?gs:"");if(r==null)t.textContent=o;else{const s=r.nodeValue;if(s!==o)if(i||En){const[l,a,u]=function(c,d){const h=c.length,f=d.length;let p=0,x=0;for(;p<h&&p<f&&c[p]===d[p];)p++;for(;x+p<h&&x+p<f&&c[h-x-1]===d[f-x-1];)x++;return[p,h-p-x,d.slice(p,f-x)]}(s,o);a!==0&&r.deleteData(l,a),r.insertData(l,u)}else r.nodeValue=o}}function Uc(e,t,n,r,i,o){ep(i,e,t);const s=o.theme.text;s!==void 0&&Qh(0,0,r,e,s)}function ro(e,t){const n=document.createElement(t);return n.appendChild(e),n}class pn extends vs{static getType(){return"text"}static clone(t){return new pn(t.__text,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__text=t.__text,this.__format=t.__format,this.__style=t.__style,this.__mode=t.__mode,this.__detail=t.__detail}constructor(t="",n){super(n),this.__text=t,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const t=this.getLatest();return _5[t.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===wn()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(t){const n=Qn[t];return!!(this.getFormat()&n)}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(t,n){return Lo(this.getLatest().__format,t,n)}canHaveFormat(){return!0}createDOM(t,n){const r=this.__format,i=sl(0,r),o=ll(0,r),s=i===null?o:i,l=document.createElement(s);let a=l;this.hasFormat("code")&&l.setAttribute("spellcheck","false"),i!==null&&(a=document.createElement(o),l.appendChild(a)),Uc(a,this,0,r,this.__text,t);const u=this.__style;return u!==""&&(l.style.cssText=u),l}updateDOM(t,n,r){const i=this.__text,o=t.__format,s=this.__format,l=sl(0,o),a=sl(0,s),u=ll(0,o),c=ll(0,s);if((l===null?u:l)!==(a===null?c:a))return!0;if(l===a&&u!==c){const x=n.firstChild;x==null&&W(48);const y=document.createElement(c);return Uc(y,this,0,s,i,r),n.replaceChild(y,x),!1}let d=n;a!==null&&l!==null&&(d=n.firstChild,d==null&&W(49)),ep(i,d,this);const h=r.theme.text;h!==void 0&&o!==s&&Qh(0,o,s,d,h);const f=t.__style,p=this.__style;return f!==p&&(n.style.cssText=p),!1}static importDOM(){return{"#text":()=>({conversion:K5,priority:0}),b:()=>({conversion:W5,priority:0}),code:()=>({conversion:xn,priority:0}),em:()=>({conversion:xn,priority:0}),i:()=>({conversion:xn,priority:0}),s:()=>({conversion:xn,priority:0}),span:()=>({conversion:U5,priority:0}),strong:()=>({conversion:xn,priority:0}),sub:()=>({conversion:xn,priority:0}),sup:()=>({conversion:xn,priority:0}),u:()=>({conversion:xn,priority:0})}}static importJSON(t){return Ae().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTextContent(t.text).setFormat(t.format).setDetail(t.detail).setMode(t.mode).setStyle(t.style)}exportDOM(t){let{element:n}=super.exportDOM(t);return Fe(n)||W(132),n.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(n=ro(n,"b")),this.hasFormat("italic")&&(n=ro(n,"i")),this.hasFormat("strikethrough")&&(n=ro(n,"s")),this.hasFormat("underline")&&(n=ro(n,"u")),{element:n}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(t,n){}setFormat(t){const n=this.getWritable();return n.__format=typeof t=="string"?Qn[t]:t,n}setDetail(t){const n=this.getWritable();return n.__detail=typeof t=="string"?m5[t]:t,n}setStyle(t){const n=this.getWritable();return n.__style=t,n}toggleFormat(t){const n=Lo(this.getFormat(),t,null);return this.setFormat(n)}toggleDirectionless(){const t=this.getWritable();return t.__detail^=1,t}toggleUnmergeable(){const t=this.getWritable();return t.__detail^=2,t}setMode(t){const n=y5[t];if(this.__mode===n)return this;const r=this.getWritable();return r.__mode=n,r}setTextContent(t){if(this.__text===t)return this;const n=this.getWritable();return n.__text=t,n}select(t,n){lt();let r=t,i=n;const o=U(),s=this.getTextContent(),l=this.__key;if(typeof s=="string"){const a=s.length;r===void 0&&(r=a),i===void 0&&(i=a)}else r=0,i=0;if(!D(o))return rp(l,r,l,i,"text","text");{const a=wn();a!==o.anchor.key&&a!==o.focus.key||qe(l),o.setTextNodeRange(this,r,this,i)}return o}selectStart(){return this.select(0,0)}selectEnd(){const t=this.getTextContentSize();return this.select(t,t)}spliceText(t,n,r,i){const o=this.getWritable(),s=o.__text,l=r.length;let a=t;a<0&&(a=l+a,a<0&&(a=0));const u=U();if(i&&D(u)){const d=t+l;u.setTextNodeRange(o,d,o,d)}const c=s.slice(0,a)+r+s.slice(a+n);return o.__text=c,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...t){lt();const n=this.getLatest(),r=n.getTextContent(),i=n.__key,o=wn(),s=new Set(t),l=[],a=r.length;let u="";for(let k=0;k<a;k++)u!==""&&s.has(k)&&(l.push(u),u=""),u+=r[k];u!==""&&l.push(u);const c=l.length;if(c===0)return[];if(l[0]===r)return[n];const d=l[0],h=n.getParent();let f;const p=n.getFormat(),x=n.getStyle(),y=n.__detail;let _=!1;n.isSegmented()?(f=Ae(d),f.__format=p,f.__style=x,f.__detail=y,_=!0):(f=n.getWritable(),f.__text=d);const g=U(),m=[f];let b=d.length;for(let k=1;k<c;k++){const v=l[k],C=v.length,E=Ae(v).getWritable();E.__format=p,E.__style=x,E.__detail=y;const I=E.__key,F=b+C;if(D(g)){const P=g.anchor,R=g.focus;P.key===i&&P.type==="text"&&P.offset>b&&P.offset<=F&&(P.key=I,P.offset-=b,g.dirty=!0),R.key===i&&R.type==="text"&&R.offset>b&&R.offset<=F&&(R.key=I,R.offset-=b,g.dirty=!0)}o===i&&qe(I),b=F,m.push(E)}if(h!==null){(function(C){const E=C.getPreviousSibling(),I=C.getNextSibling();E!==null&&Fo(E),I!==null&&Fo(I)})(this);const k=h.getWritable(),v=this.getIndexWithinParent();_?(k.splice(v,0,m),this.remove()):k.splice(v,1,m),D(g)&&Ho(g,h,v,c-1)}return m}mergeWithSibling(t){const n=t===this.getPreviousSibling();n||t===this.getNextSibling()||W(50);const r=this.__key,i=t.__key,o=this.__text,s=o.length;wn()===i&&qe(r);const l=U();if(D(l)){const d=l.anchor,h=l.focus;d!==null&&d.key===i&&(Qc(d,n,r,t,s),l.dirty=!0),h!==null&&h.key===i&&(Qc(h,n,r,t,s),l.dirty=!0)}const a=t.__text,u=n?a+o:o+a;this.setTextContent(u);const c=this.getWritable();return t.remove(),c}isTextEntity(){return!1}}function U5(e){return{forChild:vu(e.style),node:null}}function W5(e){const t=e,n=t.style.fontWeight==="normal";return{forChild:vu(t.style,n?void 0:"bold"),node:null}}const Wc=new WeakMap;function J5(e){if(!Fe(e))return!1;if(e.nodeName==="PRE")return!0;const t=e.style.whiteSpace;return typeof t=="string"&&t.startsWith("pre")}function K5(e){const t=e;e.parentElement===null&&W(129);let n=t.textContent||"";if(function(r){let i,o=r.parentNode;const s=[r];for(;o!==null&&(i=Wc.get(o))===void 0&&!J5(o);)s.push(o),o=o.parentNode;const l=i===void 0?o:i;for(let a=0;a<s.length;a++)Wc.set(s[a],l);return l}(t)!==null){const r=n.split(/(\r?\n|\t)/),i=[],o=r.length;for(let s=0;s<o;s++){const l=r[s];l===`
12
- `||l===`\r
13
- `?i.push(Pt()):l===" "?i.push(Fr()):l!==""&&i.push(Ae(l))}return{node:i}}if(n=n.replace(/\r/g,"").replace(/[ \t\n]+/g," "),n==="")return{node:null};if(n[0]===" "){let r=t,i=!0;for(;r!==null&&(r=Jc(r,!1))!==null;){const o=r.textContent||"";if(o.length>0){/[ \t\n]$/.test(o)&&(n=n.slice(1)),i=!1;break}}i&&(n=n.slice(1))}if(n[n.length-1]===" "){let r=t,i=!0;for(;r!==null&&(r=Jc(r,!0))!==null;)if((r.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){i=!1;break}i&&(n=n.slice(0,n.length-1))}return n===""?{node:null}:{node:Ae(n)}}function Jc(e,t){let n=e;for(;;){let r;for(;(r=t?n.nextSibling:n.previousSibling)===null;){const o=n.parentElement;if(o===null)return null;n=o}if(n=r,Fe(n)){const o=n.style.display;if(o===""&&!$l(n)||o!==""&&!o.startsWith("inline"))return null}let i=n;for(;(i=t?n.firstChild:n.lastChild)!==null;)n=i;if(hn(n))return n;if(n.nodeName==="BR")return null}}const Z5={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function xn(e){const t=Z5[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:vu(e.style,t),node:null}}function Ae(e=""){return dt(new pn(e))}function z(e){return e instanceof pn}function vu(e,t){const n=e.fontWeight,r=e.textDecoration.split(" "),i=n==="700"||n==="bold",o=r.includes("line-through"),s=e.fontStyle==="italic",l=r.includes("underline"),a=e.verticalAlign;return u=>(z(u)&&(i&&!u.hasFormat("bold")&&u.toggleFormat("bold"),o&&!u.hasFormat("strikethrough")&&u.toggleFormat("strikethrough"),s&&!u.hasFormat("italic")&&u.toggleFormat("italic"),l&&!u.hasFormat("underline")&&u.toggleFormat("underline"),a!=="sub"||u.hasFormat("subscript")||u.toggleFormat("subscript"),a!=="super"||u.hasFormat("superscript")||u.toggleFormat("superscript"),t&&!u.hasFormat(t)&&u.toggleFormat(t)),u)}class Fi extends pn{static getType(){return"tab"}static clone(t){return new Fi(t.__key)}constructor(t){super(" ",t),this.__detail=2}static importDOM(){return null}createDOM(t){const n=super.createDOM(t),r=Cr(t.theme,"tab");return r!==void 0&&n.classList.add(...r),n}static importJSON(t){return Fr().updateFromJSON(t)}setTextContent(t){return t!==" "&&t!==""&&W(126),super.setTextContent(t)}setDetail(t){return t!==2&&W(127),this}setMode(t){return t!=="normal"&&W(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Fr(){return dt(new Fi)}function Cu(e){return e instanceof Fi}class G5{constructor(t,n,r){this._selection=null,this.key=t,this.offset=n,this.type=r}is(t){return this.key===t.key&&this.offset===t.offset&&this.type===t.type}isBefore(t){let n=this.getNode(),r=t.getNode();const i=this.offset,o=t.offset;if(O(n)){const s=n.getDescendantByIndex(i);n=s??n}if(O(r)){const s=r.getDescendantByIndex(o);r=s??r}return n===r?i<o:n.isBefore(r)}getNode(){const t=Re(this.key);return t===null&&W(20),t}set(t,n,r){const i=this._selection,o=this.key;this.key=t,this.offset=n,this.type=r,Pi()||(wn()===o&&qe(t),i!==null&&(i.setCachedNodes(null),i.dirty=!0))}}function Jt(e,t,n){return new G5(e,t,n)}function al(e,t){let n=t.__key,r=e.offset,i="element";if(z(t)){i="text";const o=t.getTextContentSize();r>o&&(r=o)}else if(!O(t)){const o=t.getNextSibling();if(z(o))n=o.__key,r=0,i="text";else{const s=t.getParent();s&&(n=s.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,i)}function Kc(e,t){if(O(t)){const n=t.getLastDescendant();O(n)||z(n)?al(e,n):al(e,t)}else al(e,t)}function Cn(e,t,n,r){e.key=t,e.offset=n,e.type=r}class Cs{constructor(t){this._cachedNodes=null,this._nodes=t,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){if(!He(t))return!1;const n=this._nodes,r=t._nodes;return n.size===r.size&&Array.from(n).every(i=>r.has(i))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(t){this.dirty=!0,this._nodes.add(t),this._cachedNodes=null}delete(t){this.dirty=!0,this._nodes.delete(t),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(t){return this._nodes.has(t)}clone(){return new Cs(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(t){}insertText(){}insertNodes(t){const n=this.getNodes(),r=n.length,i=n[r-1];let o;if(z(i))o=i.select();else{const s=i.getIndexWithinParent()+1;o=i.getParentOrThrow().select(s,s)}o.insertNodes(t);for(let s=0;s<r;s++)n[s].remove()}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const n=this._nodes,r=[];for(const i of n){const o=Re(i);o!==null&&r.push(o)}return Pi()||(this._cachedNodes=r),r}getTextContent(){const t=this.getNodes();let n="";for(let r=0;r<t.length;r++)n+=t[r].getTextContent();return n}}function D(e){return e instanceof or}class or{constructor(t,n,r,i){this.anchor=t,this.focus=n,t._selection=this,n._selection=this,this._cachedNodes=null,this.format=r,this.style=i,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){return!!D(t)&&this.anchor.is(t.anchor)&&this.focus.is(t.focus)&&this.format===t.format&&this.style===t.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const n=this.anchor,r=this.focus,i=n.isBefore(r),o=i?n:r,s=i?r:n;let l=o.getNode(),a=s.getNode();const u=O(l)&&o.offset>0&&o.offset>=l.getChildrenSize(),c=o.offset,d=s.offset;if(O(l)){const f=l.getDescendantByIndex(c);l=f??l}if(O(a)){let f=a.getDescendantByIndex(d);f!==null&&f!==l&&a.getChildAtIndex(d)===f&&(f=f.getPreviousSibling()),a=f??a}let h;if(l.is(a))h=O(l)&&l.getChildrenSize()>0?[]:[l];else if(h=l.getNodesBetween(a),u){const f=h.findIndex(p=>!p.is(l)&&!p.isBefore(l));h.splice(0,f)}return Pi()||(this._cachedNodes=h),h}setTextNodeRange(t,n,r,i){Cn(this.anchor,t.__key,n,"text"),Cn(this.focus,r.__key,i,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){const t=this.getNodes();if(t.length===0)return"";const n=t[0],r=t[t.length-1],i=this.anchor,o=this.focus,s=i.isBefore(o),[l,a]=Gl(this);let u="",c=!0;for(let d=0;d<t.length;d++){const h=t[d];if(O(h)&&!h.isInline())c||(u+=`
14
- `),c=!h.isEmpty();else if(c=!1,z(h)){let f=h.getTextContent();h===n?h===r?i.type==="element"&&o.type==="element"&&o.offset!==i.offset||(f=l<a?f.slice(l,a):f.slice(a,l)):f=s?f.slice(l):f.slice(a):h===r&&(f=s?f.slice(0,a):f.slice(0,l)),u+=f}else!ye(h)&&!Lt(h)||h===r&&this.isCollapsed()||(u+=h.getTextContent())}return u}applyDOMRange(t){const n=Oe(),r=n.getEditorState()._selection,i=np(t.startContainer,t.startOffset,t.endContainer,t.endOffset,n,r);if(i===null)return;const[o,s]=i;Cn(this.anchor,o.key,o.offset,o.type),Cn(this.focus,s.key,s.offset,s.type),this._cachedNodes=null}clone(){const t=this.anchor,n=this.focus;return new or(Jt(t.key,t.offset,t.type),Jt(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(t){this.format=Lo(this.format,t,null),this.dirty=!0}setStyle(t){this.style=t,this.dirty=!0}hasFormat(t){const n=Qn[t];return!!(this.format&n)}insertRawText(t){const n=t.split(/(\r?\n|\t)/),r=[],i=n.length;for(let o=0;o<i;o++){const s=n[o];s===`
15
- `||s===`\r
16
- `?r.push(Pt()):s===" "?r.push(Fr()):r.push(Ae(s))}this.insertNodes(r)}insertText(t){const n=this.anchor,r=this.focus,i=this.format,o=this.style;let s=n,l=r;!this.isCollapsed()&&r.isBefore(n)&&(s=r,l=n),s.type==="element"&&function(y,_,g,m){const b=y.getNode(),k=b.getChildAtIndex(y.offset),v=Ae(),C=Xe(b)?_e().append(v):v;v.setFormat(g),v.setStyle(m),k===null?b.append(C):k.insertBefore(C),y.is(_)&&_.set(v.__key,0,"text"),y.set(v.__key,0,"text")}(s,l,i,o);const a=s.offset;let u=l.offset;const c=this.getNodes(),d=c.length;let h=c[0];z(h)||W(26);const f=h.getTextContent().length,p=h.getParentOrThrow();let x=c[d-1];if(d===1&&l.type==="element"&&(u=f,l.set(s.key,u,"text")),this.isCollapsed()&&a===f&&(h.isSegmented()||h.isToken()||!h.canInsertTextAfter()||!p.canInsertTextAfter()&&h.getNextSibling()===null)){let y=h.getNextSibling();if(z(y)&&y.canInsertTextBefore()&&!Jn(y)||(y=Ae(),y.setFormat(i),y.setStyle(o),p.canInsertTextAfter()?h.insertAfter(y):p.insertAfter(y)),y.select(0,0),h=y,t!=="")return void this.insertText(t)}else if(this.isCollapsed()&&a===0&&(h.isSegmented()||h.isToken()||!h.canInsertTextBefore()||!p.canInsertTextBefore()&&h.getPreviousSibling()===null)){let y=h.getPreviousSibling();if(z(y)&&!Jn(y)||(y=Ae(),y.setFormat(i),p.canInsertTextBefore()?h.insertBefore(y):p.insertBefore(y)),y.select(),h=y,t!=="")return void this.insertText(t)}else if(h.isSegmented()&&a!==f){const y=Ae(h.getTextContent());y.setFormat(i),h.replace(y),h=y}else if(!this.isCollapsed()&&t!==""){const y=x.getParent();if(!p.canInsertTextBefore()||!p.canInsertTextAfter()||O(y)&&(!y.canInsertTextBefore()||!y.canInsertTextAfter()))return this.insertText(""),tp(this.anchor,this.focus,null),void this.insertText(t)}if(d===1){if(h.isToken()){const m=Ae(t);return m.select(),void h.replace(m)}const y=h.getFormat(),_=h.getStyle();if(a!==u||y===i&&_===o){if(Cu(h)){const m=Ae(t);return m.setFormat(i),m.setStyle(o),m.select(),void h.replace(m)}}else{if(h.getTextContent()!==""){const m=Ae(t);if(m.setFormat(i),m.setStyle(o),m.select(),a===0)h.insertBefore(m,!1);else{const[b]=h.splitText(a);b.insertAfter(m,!1)}return void(m.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length))}h.setFormat(i),h.setStyle(o)}const g=u-a;h=h.spliceText(a,g,t,!0),h.getTextContent()===""?h.remove():this.anchor.type==="text"&&(h.isComposing()?this.anchor.offset-=t.length:(this.format=y,this.style=_))}else{const y=new Set([...h.getParentKeys(),...x.getParentKeys()]),_=O(h)?h:h.getParentOrThrow();let g=O(x)?x:x.getParentOrThrow(),m=x;if(!_.is(g)&&g.isInline())do m=g,g=g.getParentOrThrow();while(g.isInline());if(l.type==="text"&&(u!==0||x.getTextContent()==="")||l.type==="element"&&x.getIndexWithinParent()<u)if(z(x)&&!x.isToken()&&u!==x.getTextContentSize()){if(x.isSegmented()){const E=Ae(x.getTextContent());x.replace(E),x=E}Xe(l.getNode())||l.type!=="text"||(x=x.spliceText(0,u,"")),y.add(x.__key)}else{const E=x.getParentOrThrow();E.canBeEmpty()||E.getChildrenSize()!==1?x.remove():E.remove()}else y.add(x.__key);const b=g.getChildren(),k=new Set(c),v=_.is(g),C=_.isInline()&&h.getNextSibling()===null?_:h;for(let E=b.length-1;E>=0;E--){const I=b[E];if(I.is(h)||O(I)&&I.isParentOf(h))break;I.isAttached()&&(!k.has(I)||I.is(m)?v||C.insertAfter(I,!1):I.remove())}if(!v){let E=g,I=null;for(;E!==null;){const F=E.getChildren(),P=F.length;(P===0||F[P-1].is(I))&&(y.delete(E.__key),I=E),E=E.getParent()}}if(h.isToken())if(a===f)h.select();else{const E=Ae(t);E.select(),h.replace(E)}else h=h.spliceText(a,f-a,t,!0),h.getTextContent()===""?h.remove():h.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length);for(let E=1;E<d;E++){const I=c[E],F=I.__key;y.has(F)||I.remove()}}}removeText(){if(this.isCollapsed())return;const{anchor:t,focus:n}=this,r=this.getNodes(),i=this.isBackward()?n:t,o=this.isBackward()?t:n;let s=i.getNode(),l=o.getNode();const a=Ur(s,vn),u=Ur(l,vn);z(s)&&s.isToken()&&i.offset<s.getTextContentSize()&&(i.offset=0),o.offset>0&&z(l)&&l.isToken()&&(o.offset=l.getTextContentSize());for(const d of r)ni(s,d)||ni(l,d)||d.getKey()===s.getKey()||d.getKey()===l.getKey()||d.remove();const c=(d,h)=>{if(d.getTextContent()==="")d.remove();else if(h!==0&&Jn(d)){const f=Ae(d.getTextContent());return f.setFormat(d.getFormat()),f.setStyle(d.getStyle()),d.replace(f)}};if(s===l&&z(s)){const d=Math.abs(n.offset-t.offset);return s.spliceText(i.offset,d,"",!0),void c(s,d)}if(z(s)){const d=s.getTextContentSize()-i.offset;s.spliceText(i.offset,d,""),s=c(s,d)||s}z(l)&&(l.spliceText(0,o.offset,""),l=c(l,o.offset)||l),s.isAttached()&&z(s)?s.selectEnd():l.isAttached()&&z(l)&&l.selectStart(),O(a)&&O(u)&&a!==u&&(a.append(...u.getChildren()),u.remove(),o.set(i.key,i.offset,i.type))}formatText(t,n=null){if(this.isCollapsed())return this.toggleFormat(t),void qe(null);const r=this.getNodes(),i=[];for(const b of r)z(b)&&i.push(b);const o=b=>{r.forEach(k=>{if(O(k)){const v=k.getFormatFlags(t,b);k.setTextFormat(v)}})},s=i.length;if(s===0)return this.toggleFormat(t),qe(null),void o(n);const l=this.anchor,a=this.focus,u=this.isBackward(),c=u?a:l,d=u?l:a;let h=0,f=i[0],p=c.type==="element"?0:c.offset;if(c.type==="text"&&p===f.getTextContentSize()&&(h=1,f=i[1],p=0),f==null)return;const x=f.getFormatFlags(t,n);o(x);const y=s-1;let _=i[y];const g=d.type==="text"?d.offset:_.getTextContentSize();if(f.is(_)){if(p===g)return;if(Jn(f)||p===0&&g===f.getTextContentSize())f.setFormat(x);else{const b=f.splitText(p,g),k=p===0?b[0]:b[1];k.setFormat(x),c.type==="text"&&c.set(k.__key,0,"text"),d.type==="text"&&d.set(k.__key,g-p,"text")}return void(this.format=x)}p===0||Jn(f)||([,f]=f.splitText(p),p=0),f.setFormat(x);const m=_.getFormatFlags(t,x);g>0&&(g===_.getTextContentSize()||Jn(_)||([_]=_.splitText(g)),_.setFormat(m));for(let b=h+1;b<y;b++){const k=i[b],v=k.getFormatFlags(t,m);k.setFormat(v)}c.type==="text"&&c.set(f.__key,p,"text"),d.type==="text"&&d.set(_.__key,g,"text"),this.format=x|m}insertNodes(t){if(t.length===0)return;if(this.anchor.key==="root"){this.insertParagraph();const p=U();return D(p)||W(134),p.insertNodes(t)}const n=(this.isBackward()?this.focus:this.anchor).getNode(),r=Ur(n,vn),i=t[t.length-1];if(O(r)&&"__language"in r){if("__language"in t[0])this.insertText(t[0].getTextContent());else{const p=ul(this);r.splice(p,0,t),i.selectEnd()}return}if(!t.some(p=>(O(p)||ye(p))&&!p.isInline())){O(r)||W(211,n.constructor.name,n.getType());const p=ul(this);return r.splice(p,0,t),void i.selectEnd()}const o=function(p){const x=_e();let y=null;for(let _=0;_<p.length;_++){const g=p[_],m=Lt(g);if(m||ye(g)&&g.isInline()||O(g)&&g.isInline()||z(g)||g.isParentRequired()){if(y===null&&(y=g.createParentElementNode(),x.append(y),m))continue;y!==null&&y.append(g)}else x.append(g),y=null}return x}(t),s=o.getLastDescendant(),l=o.getChildren(),a=!O(r)||!r.isEmpty()?this.insertParagraph():null,u=l[l.length-1];let c=l[0];var d;O(d=c)&&vn(d)&&!d.isEmpty()&&O(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(O(r)||W(211,n.constructor.name,n.getType()),r.append(...c.getChildren()),c=l[1]),c&&(r===null&&W(212,n.constructor.name,n.getType()),function(p,x,y){const _=x.getParentOrThrow().getLastChild();let g=x;const m=[x];for(;g!==_;)g.getNextSibling()||W(140),g=g.getNextSibling(),m.push(g);let b=p;for(const k of m)b=b.insertAfter(k)}(r,c));const h=Ur(s,vn);a&&O(h)&&(a.canMergeWhenEmpty()||vn(u))&&(h.append(...a.getChildren()),a.remove()),O(r)&&r.isEmpty()&&r.remove(),s.selectEnd();const f=O(r)?r.getLastChild():null;Lt(f)&&h!==r&&f.remove()}insertParagraph(){if(this.anchor.key==="root"){const s=_e();return Ee().splice(this.anchor.offset,0,[s]),s.select(),s}const t=ul(this),n=Ur(this.anchor.getNode(),vn);O(n)||W(213);const r=n.getChildAtIndex(t),i=r?[r,...r.getNextSiblings()]:[],o=n.insertNewAfter(this,!1);return o?(o.append(...i),o.selectStart(),o):null}insertLineBreak(t){const n=Pt();if(this.insertNodes([n]),t){const r=n.getParentOrThrow(),i=n.getIndexWithinParent();r.select(i,i)}}extract(){const t=this.getNodes(),n=t.length,r=n-1,i=this.anchor,o=this.focus;let s=t[0],l=t[r];const[a,u]=Gl(this);if(n===0)return[];if(n===1){if(z(s)&&!this.isCollapsed()){const d=a>u?u:a,h=a>u?a:u,f=s.splitText(d,h),p=d===0?f[0]:f[1];return p!=null?[p]:[]}return[s]}const c=i.isBefore(o);if(z(s)){const d=c?a:u;d===s.getTextContentSize()?t.shift():d!==0&&([,s]=s.splitText(d),t[0]=s)}if(z(l)){const d=l.getTextContent().length,h=c?u:a;h===0?t.pop():h!==d&&([l]=l.splitText(h),t[r]=l)}return t}modify(t,n,r){const i=this.focus,o=this.anchor,s=t==="move",l=xi(i,n);if(ye(l)&&!l.isIsolated()){if(s&&l.isKeyboardSelectable()){const f=ql();return f.add(l.__key),void Ye(f)}const h=n?l.getPreviousSibling():l.getNextSibling();if(z(h)){const f=h.__key,p=n?h.getTextContent().length:0;return i.set(f,p,"text"),void(s&&o.set(f,p,"text"))}{const f=l.getParentOrThrow();let p,x;return O(h)?(x=h.__key,p=n?h.getChildrenSize():0):(p=l.getIndexWithinParent(),x=f.__key,n||p++),i.set(x,p,"element"),void(s&&o.set(x,p,"element"))}}const a=Oe(),u=Ft(a._window);if(!u)return;const c=a._blockCursorElement,d=a._rootElement;if(d===null||c===null||!O(l)||l.isInline()||l.canBeEmpty()||yu(c,a,d),function(h,f,p,x){h.modify(f,p,x)}(u,t,n?"backward":"forward",r),u.rangeCount>0){const h=u.getRangeAt(0),f=this.anchor.getNode(),p=Xe(f)?f:L5(f);if(this.applyDOMRange(h),this.dirty=!0,!s){const x=this.getNodes(),y=[];let _=!1;for(let g=0;g<x.length;g++){const m=x[g];ni(m,p)?y.push(m):_=!0}if(_&&y.length>0)if(n){const g=y[0];O(g)?g.selectStart():g.getParentOrThrow().selectStart()}else{const g=y[y.length-1];O(g)?g.selectEnd():g.getParentOrThrow().selectEnd()}u.anchorNode===h.startContainer&&u.anchorOffset===h.startOffset||function(g){const m=g.focus,b=g.anchor,k=b.key,v=b.offset,C=b.type;Cn(b,m.key,m.offset,m.type),Cn(m,k,v,C),g._cachedNodes=null}(this)}}}forwardDeletion(t,n,r){if(!r&&(t.type==="element"&&O(n)&&t.offset===n.getChildrenSize()||t.type==="text"&&t.offset===n.getTextContentSize())){const i=n.getParent(),o=n.getNextSibling()||(i===null?null:i.getNextSibling());if(O(o)&&o.isShadowRoot())return!0}return!1}deleteCharacter(t){const n=this.isCollapsed();if(this.isCollapsed()){const r=this.anchor;let i=r.getNode();if(this.forwardDeletion(r,i,t))return;const o=this.focus,s=xi(o,t);if(ye(s)&&!s.isIsolated()){if(s.isKeyboardSelectable()&&O(i)&&i.getChildrenSize()===0){i.remove();const l=ql();l.add(s.__key),Ye(l)}else s.remove(),Oe().dispatchCommand(Si,void 0);return}if(!t&&O(s)&&O(i)&&i.isEmpty())return i.remove(),void s.selectStart();if(this.modify("extend",t,"character"),this.isCollapsed()){if(t&&r.offset===0&&(r.type==="element"?r.getNode():r.getNode().getParentOrThrow()).collapseAtStart(this))return}else{const l=o.type==="text"?o.getNode():null;if(i=r.type==="text"?r.getNode():null,l!==null&&l.isSegmented()){const a=o.offset,u=l.getTextContentSize();if(l.is(i)||t&&a!==u||!t&&a!==0)return void Gc(l,t,a)}else if(i!==null&&i.isSegmented()){const a=r.offset,u=i.getTextContentSize();if(i.is(l)||t&&a!==0||!t&&a!==u)return void Gc(i,t,a)}(function(a,u){const c=a.anchor,d=a.focus,h=c.getNode(),f=d.getNode();if(h===f&&c.type==="text"&&d.type==="text"){const p=c.offset,x=d.offset,y=p<x,_=y?p:x,g=y?x:p,m=g-1;_!==m&&(Ph(h.getTextContent().slice(_,g))||(u?d.offset=m:c.offset=m))}})(this,t)}}if(this.removeText(),t&&!n&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const r=this.anchor.getNode();r.isEmpty()&&Xe(r.getParent())&&r.getIndexWithinParent()===0&&r.collapseAtStart(this)}}deleteLine(t){if(this.isCollapsed()){const n=this.anchor.type==="element";if(n&&this.insertText(" "),this.modify("extend",t,"lineboundary"),this.isCollapsed()&&this.anchor.offset===0&&this.modify("extend",t,"character"),n){const r=t?this.anchor:this.focus;r.set(r.key,r.offset+1,r.type)}}this.removeText()}deleteWord(t){if(this.isCollapsed()){const n=this.anchor,r=n.getNode();if(this.forwardDeletion(n,r,t))return;this.modify("extend",t,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function He(e){return e instanceof Cs}function Zc(e){const t=e.offset;if(e.type==="text")return t;const n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function Gl(e){const t=e.getStartEndPoints();if(t===null)return[0,0];const[n,r]=t;return n.type==="element"&&r.type==="element"&&n.key===r.key&&n.offset===r.offset?[0,0]:[Zc(n),Zc(r)]}function Gc(e,t,n){const r=e,i=r.getTextContent().split(/(?=\s)/g),o=i.length;let s=0,l=0;for(let u=0;u<o;u++){const c=u===o-1;if(l=s,s+=i[u].length,t&&s===n||s>n||c){i.splice(u,1),c&&(l=void 0);break}}const a=i.join("").trim();a===""?r.remove():(r.setTextContent(a),r.select(l,l))}function qc(e,t,n,r){let i,o=t;if(Fe(e)){let s=!1;const l=e.childNodes,a=l.length,u=r._blockCursorElement;o===a&&(s=!0,o=a-1);let c=l[o],d=!1;if(c===u)c=l[o+1],d=!0;else if(u!==null){const h=u.parentNode;e===h&&t>Array.prototype.indexOf.call(h.children,u)&&o--}if(i=mr(c),z(i))o=Lc(i,s);else{let h=mr(e);if(h===null)return null;if(O(h)){const f=r.getElementByKey(h.getKey());f===null&&W(214),[h,o]=h.getDOMSlot(f).resolveChildIndex(h,f,e,t),O(h)||W(215),s&&o>=h.getChildrenSize()&&(o=Math.max(0,h.getChildrenSize()-1));let x=h.getChildAtIndex(o);if(O(x)&&function(y,_,g){const m=y.getParent();return g===null||m===null||!m.canBeEmpty()||m!==g.getNode()}(x,0,n)){const y=s?x.getLastDescendant():x.getFirstDescendant();y===null?h=x:(x=y,h=O(x)?x:x.getParentOrThrow()),o=0}z(x)?(i=x,h=null,o=Lc(x,s)):x!==h&&s&&!d&&(O(h)||W(216),o=Math.min(h.getChildrenSize(),o+1))}else{const f=h.getIndexWithinParent();o=t===0&&ye(h)&&mr(e)===h?f:f+1,h=h.getParentOrThrow()}if(O(h))return Jt(h.__key,o,"element")}}else i=mr(e);return z(i)?Jt(i.__key,o,"text"):null}function Yc(e,t,n){const r=e.offset,i=e.getNode();if(r===0){const o=i.getPreviousSibling(),s=i.getParent();if(t){if((n||!t)&&o===null&&O(s)&&s.isInline()){const l=s.getPreviousSibling();z(l)&&(e.key=l.__key,e.offset=l.getTextContent().length)}}else O(o)&&!n&&o.isInline()?(e.key=o.__key,e.offset=o.getChildrenSize(),e.type="element"):z(o)&&(e.key=o.__key,e.offset=o.getTextContent().length)}else if(r===i.getTextContent().length){const o=i.getNextSibling(),s=i.getParent();if(t&&O(o)&&o.isInline())e.key=o.__key,e.offset=0,e.type="element";else if((n||t)&&o===null&&O(s)&&s.isInline()&&!s.canInsertTextAfter()){const l=s.getNextSibling();z(l)&&(e.key=l.__key,e.offset=0)}}}function tp(e,t,n){if(e.type==="text"&&t.type==="text"){const r=e.isBefore(t),i=e.is(t);Yc(e,r,i),Yc(t,!r,i),i&&(t.key=e.key,t.offset=e.offset,t.type=e.type);const o=Oe();if(o.isComposing()&&o._compositionKey!==e.key&&D(n)){const s=n.anchor,l=n.focus;Cn(e,s.key,s.offset,s.type),Cn(t,l.key,l.offset,l.type)}}}function np(e,t,n,r,i,o){if(e===null||n===null||!Ai(i,e,n))return null;const s=qc(e,t,D(o)?o.anchor:null,i);if(s===null)return null;const l=qc(n,r,D(o)?o.focus:null,i);if(l===null)return null;if(s.type==="element"&&l.type==="element"){const a=mr(e),u=mr(n);if(ye(a)&&ye(u))return null}return tp(s,l,o),[s,l]}function Vo(e){return O(e)&&!e.isInline()}function rp(e,t,n,r,i,o){const s=Pn(),l=new or(Jt(e,t,i),Jt(n,r,o),0,"");return l.dirty=!0,s._selection=l,l}function ws(){const e=Jt("root",0,"element"),t=Jt("root",0,"element");return new or(e,t,0,"")}function ql(){return new Cs(new Set)}function wu(e,t,n,r){const i=n._window;if(i===null)return null;const o=r||i.event,s=o?o.type:void 0,l=s==="selectionchange",a=!Rl&&(l||s==="beforeinput"||s==="compositionstart"||s==="compositionend"||s==="click"&&o&&o.detail===3||s==="drop"||s===void 0);let u,c,d,h;if(D(e)&&!a)return e.clone();if(t===null)return null;if(u=t.anchorNode,c=t.focusNode,d=t.anchorOffset,h=t.focusOffset,l&&D(e)&&!Ai(n,u,c))return e.clone();const f=np(u,d,c,h,n,e);if(f===null)return null;const[p,x]=f;return new or(p,x,D(e)?e.format:0,D(e)?e.style:"")}function U(){return Pn()._selection}function Pr(){return Oe()._editorState._selection}function Ho(e,t,n,r=1){const i=e.anchor,o=e.focus,s=i.getNode(),l=o.getNode();if(!t.is(s)&&!t.is(l))return;const a=t.__key;if(e.isCollapsed()){const u=i.offset;if(n<=u&&r>0||n<u&&r<0){const c=Math.max(0,u+r);i.set(a,c,"element"),o.set(a,c,"element"),Xc(e)}}else{const u=e.isBackward(),c=u?o:i,d=c.getNode(),h=u?i:o,f=h.getNode();if(t.is(d)){const p=c.offset;(n<=p&&r>0||n<p&&r<0)&&c.set(a,Math.max(0,p+r),"element")}if(t.is(f)){const p=h.offset;(n<=p&&r>0||n<p&&r<0)&&h.set(a,Math.max(0,p+r),"element")}}Xc(e)}function Xc(e){const t=e.anchor,n=t.offset,r=e.focus,i=r.offset,o=t.getNode(),s=r.getNode();if(e.isCollapsed()){if(!O(o))return;const l=o.getChildrenSize(),a=n>=l,u=a?o.getChildAtIndex(l-1):o.getChildAtIndex(n);if(z(u)){let c=0;a&&(c=u.getTextContentSize()),t.set(u.__key,c,"text"),r.set(u.__key,c,"text")}}else{if(O(o)){const l=o.getChildrenSize(),a=n>=l,u=a?o.getChildAtIndex(l-1):o.getChildAtIndex(n);if(z(u)){let c=0;a&&(c=u.getTextContentSize()),t.set(u.__key,c,"text")}}if(O(s)){const l=s.getChildrenSize(),a=i>=l,u=a?s.getChildAtIndex(l-1):s.getChildAtIndex(i);if(z(u)){let c=0;a&&(c=u.getTextContentSize()),r.set(u.__key,c,"text")}}}}function Bo(e,t,n,r,i){let o=null,s=0,l=null;r!==null?(o=r.__key,z(r)?(s=r.getTextContentSize(),l="text"):O(r)&&(s=r.getChildrenSize(),l="element")):i!==null&&(o=i.__key,z(i)?l="text":O(i)&&(l="element")),o!==null&&l!==null?e.set(o,s,l):(s=t.getIndexWithinParent(),s===-1&&(s=n.getChildrenSize()),e.set(n.__key,s,"element"))}function Qc(e,t,n,r,i){e.type==="text"?(e.key=n,t||(e.offset+=i)):e.offset>r.getIndexWithinParent()&&(e.offset-=1)}function q5(e,t,n,r,i,o,s){const l=r.anchorNode,a=r.focusNode,u=r.anchorOffset,c=r.focusOffset,d=document.activeElement;if(i.has("collaboration")&&d!==o||d!==null&&cu(d))return;if(!D(t))return void(e!==null&&Ai(n,l,a)&&r.removeAllRanges());const h=t.anchor,f=t.focus,p=h.key,x=f.key,y=Po(n,p),_=Po(n,x),g=h.offset,m=f.offset,b=t.format,k=t.style,v=t.isCollapsed();let C=y,E=_,I=!1;if(h.type==="text"){C=No(y);const B=h.getNode();I=B.getFormat()!==b||B.getStyle()!==k}else D(e)&&e.anchor.type==="text"&&(I=!0);var F,P,R,M,K;if(f.type==="text"&&(E=No(_)),C!==null&&E!==null&&(v&&(e===null||I||D(e)&&(e.format!==b||e.style!==k))&&(F=b,P=k,R=g,M=p,K=performance.now(),Zh=[F,P,R,M,K]),u!==g||c!==m||l!==C||a!==E||r.type==="Range"&&v||(d!==null&&o.contains(d)||o.focus({preventScroll:!0}),h.type==="element"))){try{r.setBaseAndExtent(C,g,E,m)}catch{}if(!i.has("skip-scroll-into-view")&&t.isCollapsed()&&o!==null&&o===document.activeElement){const B=D(t)&&t.anchor.type==="element"?C.childNodes[g]||null:r.rangeCount>0?r.getRangeAt(0):null;if(B!==null){let Q;if(B instanceof Text){const Z=document.createRange();Z.selectNode(B),Q=Z.getBoundingClientRect()}else Q=B.getBoundingClientRect();(function(Z,ne,ce){const N=$h(ce),se=xu(N);if(N===null||se===null)return;let{top:ee,bottom:A}=ne,ue=0,he=0,oe=ce;for(;oe!==null;){const H=oe===N.body;if(H)ue=0,he=_s(Z).innerHeight;else{const q=oe.getBoundingClientRect();ue=q.top,he=q.bottom}let j=0;if(ee<ue?j=-(ue-ee):A>he&&(j=A-he),j!==0)if(H)se.scrollBy(0,j);else{const q=oe.scrollTop;oe.scrollTop+=j;const Y=oe.scrollTop-q;ee-=Y,A-=Y}if(H)break;oe=Ni(oe)}})(n,Q,o)}}Jl=!0}}function Mr(e){let t=U()||Pr();t===null&&(t=Ee().selectEnd()),t.insertNodes(e)}function ul(e){let t=e;e.isCollapsed()||t.removeText();const n=U();D(n)&&(t=n),D(t)||W(161);const r=t.anchor;let i=r.getNode(),o=r.offset;for(;!vn(i);)[i,o]=Y5(i,o);return o}function Y5(e,t){const n=e.getParent();if(!n){const i=_e();return Ee().append(i),i.select(),[Ee(),0]}if(z(e)){const i=e.splitText(t);if(i.length===0)return[n,e.getIndexWithinParent()];const o=t===0?0:1;return[n,i[0].getIndexWithinParent()+o]}if(!O(e)||t===0)return[n,e.getIndexWithinParent()];const r=e.getChildAtIndex(t);if(r){const i=new or(Jt(e.__key,t,"element"),Jt(e.__key,t,"element"),0,""),o=e.insertNewAfter(i);o&&o.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}let We=null,Je=null,at=!1,cl=!1,mo=0;const ed={characterData:!0,childList:!0,subtree:!0};function Pi(){return at||We!==null&&We._readOnly}function lt(){at&&W(13)}function ip(){mo>99&&W(14)}function Pn(){return We===null&&W(195,op()),We}function Oe(){return Je===null&&W(196,op()),Je}function op(){let e=0;const t=new Set,n=Ss.version;if(typeof window<"u")for(const i of document.querySelectorAll("[contenteditable]")){const o=ms(i);if(du(o))e++;else if(o){let s=String(o.constructor.version||"<0.17.1");s===n&&(s+=" (separately built, likely a bundler configuration issue)"),t.add(s)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),r}function X5(){return Je}function td(e,t,n){const r=t.__type,i=function(l,a){const u=l._nodes.get(a);return u===void 0&&W(30,a),u}(e,r);let o=n.get(r);o===void 0&&(o=Array.from(i.transforms),n.set(r,o));const s=o.length;for(let l=0;l<s&&(o[l](t),t.isAttached());l++);}function nd(e,t){return e!==void 0&&e.__key!==t&&e.isAttached()}function sp(e,t){if(!t)return;const n=e._updateTags;let r=t;Array.isArray(t)||(r=[t]);for(const i of r)n.add(i)}function Q5(e){return ku(e,Oe()._nodes)}function ku(e,t){const n=e.type,r=t.get(n);r===void 0&&W(17,n);const i=r.klass;e.type!==i.getType()&&W(18,i.name);const o=i.importJSON(e),s=e.children;if(O(o)&&Array.isArray(s))for(let l=0;l<s.length;l++){const a=ku(s[l],t);o.append(a)}return o}function rd(e,t,n){const r=We,i=at,o=Je;We=t,at=!0,Je=e;try{return n()}finally{We=r,at=i,Je=o}}function tn(e,t){const n=e._pendingEditorState,r=e._rootElement,i=e._headless||r===null;if(n===null)return;const o=e._editorState,s=o._selection,l=n._selection,a=e._dirtyType!==Xn,u=We,c=at,d=Je,h=e._updating,f=e._observer;let p=null;if(e._pendingEditorState=null,e._editorState=n,!i&&a&&f!==null){Je=e,We=n,at=!1,e._updating=!0;try{const v=e._dirtyType,C=e._dirtyElements,E=e._dirtyLeaves;f.disconnect(),p=B5(o,n,e,v,C,E)}catch(v){if(v instanceof Error&&e._onError(v),cl)throw v;return dp(e,null,r,n),Th(e),e._dirtyType=Sr,cl=!0,tn(e,o),void(cl=!1)}finally{f.observe(r,ed),e._updating=h,We=u,at=c,Je=d}}n._readOnly||(n._readOnly=!0);const x=e._dirtyLeaves,y=e._dirtyElements,_=e._normalizedNodes,g=e._updateTags,m=e._deferred;a&&(e._dirtyType=Xn,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set),function(v,C){const E=v._decorators;let I=v._pendingDecorators||E;const F=C._nodeMap;let P;for(P in I)F.has(P)||(I===E&&(I=Lh(v)),delete I[P])}(e,n);const b=i?null:Ft(e._window);if(e._editable&&b!==null&&(a||l===null||l.dirty)&&r!==null&&!g.has("skip-dom-selection")){Je=e,We=n;try{if(f!==null&&f.disconnect(),a||l===null||l.dirty){const v=e._blockCursorElement;v!==null&&yu(v,e,r),q5(s,l,e,b,g,r)}P5(e,r,l),f!==null&&f.observe(r,ed)}finally{Je=d,We=u}}p!==null&&function(v,C,E,I,F){const P=Array.from(v._listeners.mutation),R=P.length;for(let M=0;M<R;M++){const[K,B]=P[M],Q=C.get(B);Q!==void 0&&K(Q,{dirtyLeaves:I,prevEditorState:F,updateTags:E})}}(e,p,g,x,o),D(l)||l===null||s!==null&&s.is(l)||e.dispatchCommand(Si,void 0);const k=e._pendingDecorators;k!==null&&(e._decorators=k,e._pendingDecorators=null,oi("decorator",e,!0,k)),function(v,C,E){const I=Nc(C),F=Nc(E);I!==F&&oi("textcontent",v,!0,F)}(e,t||o,n),oi("update",e,!0,{dirtyElements:y,dirtyLeaves:x,editorState:n,normalizedNodes:_,prevEditorState:t||o,tags:g}),function(v,C){if(v._deferred=[],C.length!==0){const E=v._updating;v._updating=!0;try{for(let I=0;I<C.length;I++)C[I]()}finally{v._updating=E}}}(e,m),function(v){const C=v._updates;if(C.length!==0){const E=C.shift();if(E){const[I,F]=E;ap(v,I,F)}}}(e)}function oi(e,t,n,...r){const i=t._updating;t._updating=n;try{const o=Array.from(t._listeners[e]);for(let s=0;s<o.length;s++)o[s].apply(null,r)}finally{t._updating=i}}function lp(e,t,n){if(e._updating===!1||Je!==e){let i=!1;return e.update(()=>{i=lp(e,t,n)}),i}const r=hu(e);for(let i=4;i>=0;i--)for(let o=0;o<r.length;o++){const s=r[o]._commands.get(t);if(s!==void 0){const l=s[i];if(l!==void 0){const a=Array.from(l),u=a.length;for(let c=0;c<u;c++)if(a[c](n,e)===!0)return!0}}}return!1}function id(e,t){const n=e._updates;let r=t||!1;for(;n.length!==0;){const i=n.shift();if(i){const[o,s]=i;let l;if(s!==void 0){if(l=s.onUpdate,s.skipTransforms&&(r=!0),s.discrete){const a=e._pendingEditorState;a===null&&W(191),a._flushSync=!0}l&&e._deferred.push(l),sp(e,s.tag)}o()}}return r}function ap(e,t,n){const r=e._updateTags;let i,o=!1,s=!1;n!==void 0&&(i=n.onUpdate,sp(e,n.tag),o=n.skipTransforms||!1,s=n.discrete||!1),i&&e._deferred.push(i);const l=e._editorState;let a=e._pendingEditorState,u=!1;(a===null||a._readOnly)&&(a=e._pendingEditorState=up(a||l),u=!0),a._flushSync=s;const c=We,d=at,h=Je,f=e._updating;We=a,at=!1,e._updating=!0,Je=e;try{u&&(e._headless?l._selection!==null&&(a._selection=l._selection.clone()):a._selection=function(_){const g=_.getEditorState()._selection,m=Ft(_._window);return D(g)||g==null?wu(g,m,_,null):g.clone()}(e));const x=e._compositionKey;t(),o=id(e,o),function(_,g){const m=g.getEditorState()._selection,b=_._selection;if(D(b)){const k=b.anchor,v=b.focus;let C;if(k.type==="text"&&(C=k.getNode(),C.selectionTransform(m,b)),v.type==="text"){const E=v.getNode();C!==E&&E.selectionTransform(m,b)}}}(a,e),e._dirtyType!==Xn&&(o?function(_,g){const m=g._dirtyLeaves,b=_._nodeMap;for(const k of m){const v=b.get(k);z(v)&&v.isAttached()&&v.isSimpleText()&&!v.isUnmergeable()&&Ic(v)}}(a,e):function(_,g){const m=g._dirtyLeaves,b=g._dirtyElements,k=_._nodeMap,v=wn(),C=new Map;let E=m,I=E.size,F=b,P=F.size;for(;I>0||P>0;){if(I>0){g._dirtyLeaves=new Set;for(const R of E){const M=k.get(R);z(M)&&M.isAttached()&&M.isSimpleText()&&!M.isUnmergeable()&&Ic(M),M!==void 0&&nd(M,v)&&td(g,M,C),m.add(R)}if(E=g._dirtyLeaves,I=E.size,I>0){mo++;continue}}g._dirtyLeaves=new Set,g._dirtyElements=new Map;for(const R of F){const M=R[0],K=R[1];if(M!=="root"&&!K)continue;const B=k.get(M);B!==void 0&&nd(B,v)&&td(g,B,C),b.set(M,K)}E=g._dirtyLeaves,I=E.size,F=g._dirtyElements,P=F.size,mo++}g._dirtyLeaves=m,g._dirtyElements=b}(a,e),id(e),function(_,g,m,b){const k=_._nodeMap,v=g._nodeMap,C=[];for(const[E]of b){const I=v.get(E);I!==void 0&&(I.isAttached()||(O(I)&&Vh(I,E,k,v,C,b),k.has(E)||b.delete(E),C.push(E)))}for(const E of C)v.delete(E);for(const E of m){const I=v.get(E);I===void 0||I.isAttached()||(k.has(E)||m.delete(E),v.delete(E))}}(l,a,e._dirtyLeaves,e._dirtyElements)),x!==e._compositionKey&&(a._flushSync=!0);const y=a._selection;if(D(y)){const _=a._nodeMap,g=y.anchor.key,m=y.focus.key;_.get(g)!==void 0&&_.get(m)!==void 0||W(19)}else He(y)&&y._nodes.size===0&&(a._selection=null)}catch(x){return x instanceof Error&&e._onError(x),e._pendingEditorState=l,e._dirtyType=Sr,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void tn(e)}finally{We=c,at=d,Je=h,e._updating=f,mo=0}e._dirtyType!==Xn||e._deferred.length>0||function(x,y){const _=y.getEditorState()._selection,g=x._selection;if(g!==null){if(g.dirty||!g.is(_))return!0}else if(_!==null)return!0;return!1}(a,e)?a._flushSync?(a._flushSync=!1,tn(e)):u&&T5(()=>{tn(e)}):(a._flushSync=!1,u&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function bt(e,t,n){e._updating?e._updates.push([t,n]):ap(e,t,n)}class si{constructor(t,n,r){this.element=t,this.before=n||null,this.after=r||null}withBefore(t){return new si(this.element,t,this.after)}withAfter(t){return new si(this.element,this.before,t)}withElement(t){return new si(t,this.before,this.after)}insertChild(t){const n=this.before||this.getManagedLineBreak();return n!==null&&n.parentElement!==this.element&&W(222),this.element.insertBefore(t,n),this}removeChild(t){return t.parentElement!==this.element&&W(223),this.element.removeChild(t),this}replaceChild(t,n){return n.parentElement!==this.element&&W(224),this.element.replaceChild(t,n),this}getFirstChild(){const t=this.after?this.after.nextSibling:this.element.firstChild;return t===this.before||t===this.getManagedLineBreak()?null:t}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(t){if(t===null)this.removeManagedLineBreak();else{const n=t==="decorator"&&(Ii||ps);this.insertManagedLineBreak(n)}}removeManagedLineBreak(){const t=this.getManagedLineBreak();if(t){const n=this.element,r=t.nodeName==="IMG"?t.nextSibling:null;r&&n.removeChild(r),n.removeChild(t),n.__lexicalLineBreak=void 0}}insertManagedLineBreak(t){const n=this.getManagedLineBreak();if(n){if(t===(n.nodeName==="IMG"))return;this.removeManagedLineBreak()}const r=this.element,i=this.before,o=document.createElement("br");if(r.insertBefore(o,i),t){const s=document.createElement("img");s.setAttribute("data-lexical-linebreak","true"),s.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",s.alt="",r.insertBefore(s,o),r.__lexicalLineBreak=s}else r.__lexicalLineBreak=o}getFirstChildOffset(){let t=0;for(let n=this.after;n!==null;n=n.previousSibling)t++;return t}resolveChildIndex(t,n,r,i){if(r===this.element){const a=this.getFirstChildOffset();return[t,Math.min(a+t.getChildrenSize(),Math.max(a,i))]}const o=od(n,r);o.push(i);const s=od(n,this.element);let l=t.getIndexWithinParent();for(let a=0;a<s.length;a++){const u=o[a],c=s[a];if(u===void 0||u<c)break;if(u>c){l+=1;break}}return[t.getParentOrThrow(),l]}}function od(e,t){const n=[];let r=t;for(;r!==e&&r!==null;r=t.parentNode){let i=0;for(let o=r.previousSibling;o!==null;o=r.previousSibling)i++;n.push(i)}return r!==e&&W(225),n.reverse()}class Ot extends vs{constructor(t){super(t),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=""}afterCloneFrom(t){super.afterCloneFrom(t),this.__first=t.__first,this.__last=t.__last,this.__size=t.__size,this.__indent=t.__indent,this.__format=t.__format,this.__style=t.__style,this.__dir=t.__dir,this.__textFormat=t.__textFormat,this.__textStyle=t.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const t=this.getFormat();return x5[t]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const t=[];let n=this.getFirstChild();for(;n!==null;)t.push(n),n=n.getNextSibling();return t}getChildrenKeys(){const t=[];let n=this.getFirstChild();for(;n!==null;)t.push(n.__key),n=n.getNextSibling();return t}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const t=Oe()._dirtyElements;return t!==null&&t.has(this.__key)}isLastChild(){const t=this.getLatest(),n=this.getParentOrThrow().getLastChild();return n!==null&&n.is(t)}getAllTextNodes(){const t=[];let n=this.getFirstChild();for(;n!==null;){if(z(n)&&t.push(n),O(n)){const r=n.getAllTextNodes();t.push(...r)}n=n.getNextSibling()}return t}getFirstDescendant(){let t=this.getFirstChild();for(;O(t);){const n=t.getFirstChild();if(n===null)break;t=n}return t}getLastDescendant(){let t=this.getLastChild();for(;O(t);){const n=t.getLastChild();if(n===null)break;t=n}return t}getDescendantByIndex(t){const n=this.getChildren(),r=n.length;if(t>=r){const o=n[r-1];return O(o)&&o.getLastDescendant()||o||null}const i=n[t];return O(i)&&i.getFirstDescendant()||i||null}getFirstChild(){const t=this.getLatest().__first;return t===null?null:Re(t)}getFirstChildOrThrow(){const t=this.getFirstChild();return t===null&&W(45,this.__key),t}getLastChild(){const t=this.getLatest().__last;return t===null?null:Re(t)}getLastChildOrThrow(){const t=this.getLastChild();return t===null&&W(96,this.__key),t}getChildAtIndex(t){const n=this.getChildrenSize();let r,i;if(t<n/2){for(r=this.getFirstChild(),i=0;r!==null&&i<=t;){if(i===t)return r;r=r.getNextSibling(),i++}return null}for(r=this.getLastChild(),i=n-1;r!==null&&i>=t;){if(i===t)return r;r=r.getPreviousSibling(),i--}return null}getTextContent(){let t="";const n=this.getChildren(),r=n.length;for(let i=0;i<r;i++){const o=n[i];t+=o.getTextContent(),O(o)&&i!==r-1&&!o.isInline()&&(t+=sn)}return t}getTextContentSize(){let t=0;const n=this.getChildren(),r=n.length;for(let i=0;i<r;i++){const o=n[i];t+=o.getTextContentSize(),O(o)&&i!==r-1&&!o.isInline()&&(t+=sn.length)}return t}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(t){if(t!==""){const n=Sc[t];return!!(this.getFormat()&n)}return!1}hasTextFormat(t){const n=Qn[t];return!!(this.getTextFormat()&n)}getFormatFlags(t,n){return Lo(this.getLatest().__textFormat,t,n)}getTextStyle(){return this.getLatest().__textStyle}select(t,n){lt();const r=U();let i=t,o=n;const s=this.getChildrenSize();if(!this.canBeEmpty()){if(t===0&&n===0){const a=this.getFirstChild();if(z(a)||O(a))return a.select(0,0)}else if(!(t!==void 0&&t!==s||n!==void 0&&n!==s)){const a=this.getLastChild();if(z(a)||O(a))return a.select()}}i===void 0&&(i=s),o===void 0&&(o=s);const l=this.__key;return D(r)?(r.anchor.set(l,i,"element"),r.focus.set(l,o,"element"),r.dirty=!0,r):rp(l,i,l,o,"element","element")}selectStart(){const t=this.getFirstDescendant();return t?t.selectStart():this.select()}selectEnd(){const t=this.getLastDescendant();return t?t.selectEnd():this.select()}clear(){const t=this.getWritable();return this.getChildren().forEach(n=>n.remove()),t}append(...t){return this.splice(this.getChildrenSize(),0,t)}setDirection(t){const n=this.getWritable();return n.__dir=t,n}setFormat(t){return this.getWritable().__format=t!==""?Sc[t]:0,this}setStyle(t){return this.getWritable().__style=t||"",this}setTextFormat(t){const n=this.getWritable();return n.__textFormat=t,n}setTextStyle(t){const n=this.getWritable();return n.__textStyle=t,n}setIndent(t){return this.getWritable().__indent=t,this}splice(t,n,r){const i=r.length,o=this.getChildrenSize(),s=this.getWritable();t+n<=o||W(226,String(t),String(n),String(o));const l=s.__key,a=[],u=[],c=this.getChildAtIndex(t+n);let d=null,h=o-n+i;if(t!==0)if(t===o)d=this.getLastChild();else{const p=this.getChildAtIndex(t);p!==null&&(d=p.getPreviousSibling())}if(n>0){let p=d===null?this.getFirstChild():d.getNextSibling();for(let x=0;x<n;x++){p===null&&W(100);const y=p.getNextSibling(),_=p.__key;qn(p.getWritable()),u.push(_),p=y}}let f=d;for(let p=0;p<i;p++){const x=r[p];f!==null&&x.is(f)&&(d=f=f.getPreviousSibling());const y=x.getWritable();y.__parent===l&&h--,qn(y);const _=x.__key;if(f===null)s.__first=_,y.__prev=null;else{const g=f.getWritable();g.__next=_,y.__prev=g.__key}x.__key===l&&W(76),y.__parent=l,a.push(_),f=x}if(t+n===o)f!==null&&(f.getWritable().__next=null,s.__last=f.__key);else if(c!==null){const p=c.getWritable();if(f!==null){const x=f.getWritable();p.__prev=f.__key,x.__next=c.__key}else p.__prev=null}if(s.__size=h,u.length){const p=U();if(D(p)){const x=new Set(u),y=new Set(a),{anchor:_,focus:g}=p;sd(_,x,y)&&Bo(_,_.getNode(),this,d,c),sd(g,x,y)&&Bo(g,g.getNode(),this,d,c),h!==0||this.canBeEmpty()||Ve(this)||this.remove()}}return s}getDOMSlot(t){return new si(t)}exportDOM(t){const{element:n}=super.exportDOM(t);if(Fe(n)){const r=this.getIndent();r>0&&(n.style.paddingInlineStart=40*r+"px")}return{element:n}}exportJSON(){const t={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},n=this.getTextFormat(),r=this.getTextStyle();return n!==0&&(t.textFormat=n),r!==""&&(t.textStyle=r),t}updateFromJSON(t){return super.updateFromJSON(t).setFormat(t.format).setIndent(t.indent).setDirection(t.direction).setTextFormat(t.textFormat||0).setTextStyle(t.textStyle||"")}insertNewAfter(t,n){return null}canIndent(){return!0}collapseAtStart(t){return!1}excludeFromCopy(t){return!1}canReplaceWith(t){return!0}canInsertAfter(t){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(t){return!1}extractWithChild(t,n,r){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(t,n){const r=this.getDOMSlot(t);let i=r.getFirstChild();for(let o=this.getFirstChild();o;o=o.getNextSibling()){const s=n.getElementByKey(o.getKey());s!==null&&(i==null?(r.insertChild(s),i=s):i!==s&&r.replaceChild(s,i),i=i.nextSibling)}}}function O(e){return e instanceof Ot}function sd(e,t,n){let r=e.getNode();for(;r;){const i=r.__key;if(t.has(i)&&!n.has(i))return!0;r=r.getParent()}return!1}class Mi extends vs{decorate(t,n){W(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function ye(e){return e instanceof Mi}class Ri extends Ot{static getType(){return"root"}static clone(){return new Ri}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){W(51)}getTextContent(){const t=this.__cachedText;return!Pi()&&Oe()._dirtyType!==Xn||t===null?super.getTextContent():t}remove(){W(52)}replace(t){W(53)}insertBefore(t){W(54)}insertAfter(t){W(55)}updateDOM(t,n){return!1}append(...t){for(let n=0;n<t.length;n++){const r=t[n];O(r)||ye(r)||W(56)}return super.append(...t)}static importJSON(t){return Ee().updateFromJSON(t)}collapseAtStart(){return!0}}function Xe(e){return e instanceof Ri}function up(e){return new ks(new Map(e._nodeMap))}function Su(){return new ks(new Map([["root",new Ri]]))}function cp(e){const t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&W(130,n.name),O(e)){const r=t.children;Array.isArray(r)||W(59,n.name);const i=e.getChildren();for(let o=0;o<i.length;o++){const s=cp(i[o]);r.push(s)}}return t}class ks{constructor(t,n){this._nodeMap=t,this._selection=n||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(t,n){return rd(n&&n.editor||null,this,t)}clone(t){const n=new ks(this._nodeMap,t===void 0?this._selection:t);return n._readOnly=!0,n}toJSON(){return rd(null,this,()=>({root:cp(Ee())}))}}class Eu extends Ot{static getType(){return"artificial"}createDOM(t){return document.createElement("div")}}class Rr extends Ot{static getType(){return"paragraph"}static clone(t){return new Rr(t.__key)}createDOM(t){const n=document.createElement("p"),r=Cr(t.theme,"paragraph");return r!==void 0&&n.classList.add(...r),n}updateDOM(t,n,r){return!1}static importDOM(){return{p:t=>({conversion:ex,priority:0})}}exportDOM(t){const{element:n}=super.exportDOM(t);if(Fe(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();n.style.textAlign=r;const i=this.getDirection();i&&(n.dir=i)}return{element:n}}static importJSON(t){return _e().updateFromJSON(t)}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle()}}insertNewAfter(t,n){const r=_e();r.setTextFormat(t.format),r.setTextStyle(t.style);const i=this.getDirection();return r.setDirection(i),r.setFormat(this.getFormatType()),r.setStyle(this.getTextStyle()),this.insertAfter(r,n),r}collapseAtStart(){const t=this.getChildren();if(t.length===0||z(t[0])&&t[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function ex(e){const t=_e();return e.style&&(t.setFormat(e.style.textAlign),bu(e,t)),{node:t}}function _e(){return dt(new Rr)}function Tu(e){return e instanceof Rr}const pe=0,Se=1,Yl=3,an=4;function dp(e,t,n,r){const i=e._keyToDOMMap;i.clear(),e._editorState=Su(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=Xn,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null;const o=e._observer;o!==null&&(o.disconnect(),e._observer=null),t!==null&&(t.textContent=""),n!==null&&(n.textContent="",i.set("root",n))}function tx(e){const t=e||{},n=X5(),r=t.theme||{},i=e===void 0?n:t.parentEditor||null,o=t.disableEvents||!1,s=Su(),l=t.namespace||(i!==null?i._config.namespace:Mh()),a=t.editorState,u=[Ri,pn,Li,Fi,Rr,Eu,...t.nodes||[]],{onError:c,html:d}=t,h=t.editable===void 0||t.editable;let f;if(e===void 0&&n!==null)f=n._nodes;else{f=new Map;for(let x=0;x<u.length;x++){let y=u[x],_=null,g=null;if(typeof y!="function"){const v=y;y=v.replace,_=v.with,g=v.withKlass||null}const m=y.getType(),b=y.transform(),k=new Set;b!==null&&k.add(b),f.set(m,{exportDOM:d&&d.export?d.export.get(y):void 0,klass:y,replace:_,replaceWithKlass:g,transforms:k})}}const p=new Ss(s,i,f,{disableEvents:o,namespace:l,theme:r},c||console.error,function(x,y){const _=new Map,g=new Set,m=b=>{Object.keys(b).forEach(k=>{let v=_.get(k);v===void 0&&(v=[],_.set(k,v)),v.push(b[k])})};return x.forEach(b=>{const k=b.klass.importDOM;if(k==null||g.has(k))return;g.add(k);const v=k.call(b.klass);v!==null&&m(v)}),y&&m(y),_}(f,d?d.import:void 0),h);return a!==void 0&&(p._pendingEditorState=a,p._dirtyType=Sr),p}class Ss{constructor(t,n,r,i,o,s,l){this._parentEditor=n,this._rootElement=null,this._editorState=t,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=i,this._nodes=r,this._decorators={},this._pendingDecorators=null,this._dirtyType=Xn,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=Mh(),this._onError=o,this._htmlConversions=s,this._editable=l,this._headless=n!==null&&n._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(t){const n=this._listeners.update;return n.add(t),()=>{n.delete(t)}}registerEditableListener(t){const n=this._listeners.editable;return n.add(t),()=>{n.delete(t)}}registerDecoratorListener(t){const n=this._listeners.decorator;return n.add(t),()=>{n.delete(t)}}registerTextContentListener(t){const n=this._listeners.textcontent;return n.add(t),()=>{n.delete(t)}}registerRootListener(t){const n=this._listeners.root;return t(this._rootElement,null),n.add(t),()=>{t(null,this._rootElement),n.delete(t)}}registerCommand(t,n,r){r===void 0&&W(35);const i=this._commands;i.has(t)||i.set(t,[new Set,new Set,new Set,new Set,new Set]);const o=i.get(t);o===void 0&&W(36,String(t));const s=o[r];return s.add(n),()=>{s.delete(n),o.every(l=>l.size===0)&&i.delete(t)}}registerMutationListener(t,n,r){const i=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(t)).klass,o=this._listeners.mutation;o.set(n,i);const s=r&&r.skipInitialization;return s!==void 0&&s||this.initializeMutationListener(n,i),()=>{o.delete(n)}}getRegisteredNode(t){const n=this._nodes.get(t.getType());return n===void 0&&W(37,t.name),n}resolveRegisteredNodeAfterReplacements(t){for(;t.replaceWithKlass;)t=this.getRegisteredNode(t.replaceWithKlass);return t}initializeMutationListener(t,n){const r=this._editorState,i=Dc(r).get(n.getType());if(!i)return;const o=new Map;for(const s of i.keys())o.set(s,"created");o.size>0&&t(o,{dirtyLeaves:new Set,prevEditorState:r,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(t,n){const r=this.getRegisteredNode(t);return r.transforms.add(n),r}registerNodeTransform(t,n){const r=this.registerNodeTransformToKlass(t,n),i=[r],o=r.replaceWithKlass;if(o!=null){const s=this.registerNodeTransformToKlass(o,n);i.push(s)}return function(s,l){const a=Dc(s.getEditorState()),u=[];for(const c of l){const d=a.get(c);d&&u.push(d)}u.length!==0&&s.update(()=>{for(const c of u)for(const d of c.keys()){const h=Re(d);h&&h.markDirty()}},s._pendingEditorState===null?{tag:"history-merge"}:void 0)}(this,i.map(s=>s.klass.getType())),()=>{i.forEach(s=>s.transforms.delete(n))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,n){return X(this,t,n)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(t){const n=this._rootElement;if(t!==n){const r=Cr(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=t,dp(this,n,t,i),n!==null&&(this._config.disableEvents||z5(n),r!=null&&n.classList.remove(...r)),t!==null){const o=xu(t),s=t.style;s.userSelect="text",s.whiteSpace="pre-wrap",s.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=o,this._dirtyType=Sr,Th(this),this._updateTags.add("history-merge"),tn(this),this._config.disableEvents||function(l,a){const u=l.ownerDocument,c=Do.get(u);(c===void 0||c<1)&&u.addEventListener("selectionchange",Xh),Do.set(u,(c||0)+1),l.__lexicalEditor=a;const d=Yh(l);for(let h=0;h<Wl.length;h++){const[f,p]=Wl[h],x=typeof p=="function"?y=>{jc(y)||(zc(y),(a.isEditable()||f==="click")&&p(y,a))}:y=>{if(jc(y))return;zc(y);const _=a.isEditable();switch(f){case"cut":return _&&X(a,eu,y);case"copy":return X(a,hs,y);case"paste":return _&&X(a,Ei,y);case"dragstart":return _&&X(a,fs,y);case"dragover":return _&&X(a,Qa,y);case"dragend":return _&&X(a,Q0,y);case"focus":return _&&X(a,yh,y);case"blur":return _&&X(a,_h,y);case"drop":return _&&X(a,Xa,y)}};l.addEventListener(f,x),d.push(()=>{l.removeEventListener(f,x)})}}(t,this),r!=null&&t.classList.add(...r)}else this._window=null,this._updateTags.add("history-merge"),tn(this);oi("root",this,!1,t,n)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(t,n){t.isEmpty()&&W(38);let r=t;r._readOnly&&(r=up(t),r._selection=t._selection?t._selection.clone():null),Eh(this);const i=this._pendingEditorState,o=this._updateTags,s=n!==void 0?n.tag:null;i===null||i.isEmpty()||(s!=null&&o.add(s),tn(this)),this._pendingEditorState=r,this._dirtyType=Sr,this._dirtyElements.set("root",!1),this._compositionKey=null,s!=null&&o.add(s),this._updating||tn(this)}parseEditorState(t,n){return function(r,i,o){const s=Su(),l=We,a=at,u=Je,c=i._dirtyElements,d=i._dirtyLeaves,h=i._cloneNotNeeded,f=i._dirtyType;i._dirtyElements=new Map,i._dirtyLeaves=new Set,i._cloneNotNeeded=new Set,i._dirtyType=0,We=s,at=!1,Je=i;try{const p=i._nodes;ku(r.root,p),o&&o(),s._readOnly=!0}catch(p){p instanceof Error&&i._onError(p)}finally{i._dirtyElements=c,i._dirtyLeaves=d,i._cloneNotNeeded=h,i._dirtyType=f,We=l,at=a,Je=u}return s}(typeof t=="string"?JSON.parse(t):t,this,n)}read(t){return tn(this),this.getEditorState().read(t,{editor:this})}update(t,n){bt(this,t,n)}focus(t,n={}){const r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),bt(this,()=>{const i=U(),o=Ee();i!==null?i.dirty=!0:o.getChildrenSize()!==0&&(n.defaultSelection==="rootStart"?o.selectStart():o.selectEnd())},{onUpdate:()=>{r.removeAttribute("autocapitalize"),t&&t()},tag:"focus"}),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){const t=this._rootElement;t!==null&&t.blur();const n=Ft(this._window);n!==null&&n.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,oi("editable",this,!0,t))}toJSON(){return{editorState:this._editorState.toJSON()}}}Ss.version="0.23.1+prod.esm";function nx(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fp=nx(function(e){const t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});const rx=new Map;function ix(e){const t={};if(!e)return t;const n=e.split(";");for(const r of n)if(r!==""){const[i,o]=r.split(/:([^]+)/);i&&o&&(t[i.trim()]=o.trim())}return t}function hp(e,t){const n=e.getStartEndPoints();if(t.isSelected(e)&&!t.isSegmented()&&!t.isToken()&&n!==null){const[r,i]=n,o=e.isBackward(),s=r.getNode(),l=i.getNode(),a=t.is(s),u=t.is(l);if(a||u){const[c,d]=Gl(e),h=s.is(l),f=t.is(o?l:s),p=t.is(o?s:l);let x,y=0;return h?(y=c>d?d:c,x=c>d?c:d):f?(y=o?d:c,x=void 0):p&&(y=0,x=o?c:d),t.__text=t.__text.slice(y,x),t}}return t}function ld(e){if(e.type==="text")return e.offset===e.getNode().getTextContentSize();const t=e.getNode();return O(t)||fp(177),e.offset===t.getChildrenSize()}function ox(e){const t=e.getStyle(),n=ix(t);rx.set(t,n)}function sx(e,t){if(e===null)return;const n=e.getStartEndPoints(),r=n?n[0]:null;if(r!==null&&r.key==="root"){const s=t(),l=Ee(),a=l.getFirstChild();return void(a?a.replace(s,!0):l.append(s))}const i=e.getNodes(),o=r!==null&&function(s,l){let a=s;for(;a!==null&&a.getParent()!==null&&!l(a);)a=a.getParentOrThrow();return l(a)?a:null}(r.getNode(),cd);o&&i.indexOf(o)===-1&&i.push(o);for(let s=0;s<i.length;s++){const l=i[s];if(!cd(l))continue;O(l)||fp(178);const a=t();a.setFormat(l.getFormatType()),a.setIndent(l.getIndent()),l.replace(a,!0)}}function ad(e,t){const n=xi(e.focus,t);return ye(n)&&!n.isIsolated()||O(n)&&!n.isInline()&&!n.canBeEmpty()}function lx(e,t,n,r){e.modify(t?"extend":"move",n,r)}function ax(e){const t=e.anchor.getNode();return(Xe(t)?t:t.getParentOrThrow()).getDirection()==="rtl"}function ud(e,t,n){const r=ax(e);lx(e,t,n?!r:r,"character")}function cd(e){if(ye(e)||!O(e)||Ve(e))return!1;const t=e.getFirstChild(),n=t===null||Lt(t)||z(t)||t.isInline();return!e.isInline()&&e.canBeEmpty()!==!1&&n}function ux(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var cx=ux(function(e){const t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});const Es=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,dx=Es&&"documentMode"in document?document.documentMode:null,fx=Es&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);!(!Es||!("InputEvent"in window)||dx)&&"getTargetRanges"in new window.InputEvent("input");function pp(...e){const t=[];for(const n of e)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))t.push(r);return t}function ft(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}const hx=Es,px=fx;function Mt(e,...t){const n=pp(...t);n.length>0&&e.classList.add(...n)}function Ts(e,...t){const n=pp(...t);n.length>0&&e.classList.remove(...n)}function gp(e,t){let n=e;for(;n!=null;){if(n instanceof t)return n;n=n.getParent()}return null}function Xl(e){const t=sr(e,n=>O(n)&&!n.isInline());return O(t)||cx(4,e.__key),t}const sr=(e,t)=>{let n=e;for(;n!==Ee()&&n!=null;){if(t(n))return n;n=n.getParent()}return null};function mp(e){const t=U()||Pr();if(D(t)){const{focus:n}=t,r=n.getNode(),i=n.offset;if(Ve(r)){const o=r.getChildAtIndex(i);o==null?r.append(e):o.insertBefore(e),e.selectNext()}else{let o,s;z(r)?(o=r.getParentOrThrow(),s=r.getIndexWithinParent(),i>0&&(s+=1,r.splitText(i))):(o=r,s=i);const[,l]=R5(o,s);l.insertBefore(e),l.selectStart()}}else{if(t!=null){const r=t.getNodes();r[r.length-1].getTopLevelElementOrThrow().insertAfter(e)}else Ee().append(e);const n=_e();e.insertAfter(n),n.select()}return e.getLatest()}function Iu(e,t){const n=t();return e.replace(n),n.append(e),n}function kn(e,t){return e!==null&&Object.getPrototypeOf(e).constructor.name===t.name}function gx(e,t){const n=[];for(let r=0;r<e.length;r++){const i=t(e[r]);i!==null&&n.push(i)}return n}let dl=!(px||!hx)&&void 0;function mx(e){let t=1;if(function(){if(dl===void 0){const n=document.createElement("div");n.style.cssText="position: absolute; opacity: 0; width: 100px; left: -1000px;",document.body.appendChild(n);const r=n.getBoundingClientRect();n.style.setProperty("zoom","2"),dl=n.getBoundingClientRect().width===r.width,document.body.removeChild(n)}return dl}())for(;e;)t*=Number(window.getComputedStyle(e).getPropertyValue("zoom")),e=e.parentElement;return t}const io=0,Ql=1,ea=2,It=0,xx=1,dd=2,yx=3,_x=4;function bx(e,t,n,r,i){if(e===null||n.size===0&&r.size===0&&!i)return It;const o=t._selection,s=e._selection;if(i)return xx;if(!(D(o)&&D(s)&&s.isCollapsed()&&o.isCollapsed()))return It;const l=function(_,g,m){const b=_._nodeMap,k=[];for(const v of g){const C=b.get(v);C!==void 0&&k.push(C)}for(const[v,C]of m){if(!C)continue;const E=b.get(v);E===void 0||Xe(E)||k.push(E)}return k}(t,n,r);if(l.length===0)return It;if(l.length>1){const _=t._nodeMap,g=_.get(o.anchor.key),m=_.get(s.anchor.key);return g&&m&&!e._nodeMap.has(g.__key)&&z(g)&&g.__text.length===1&&o.anchor.offset===1?dd:It}const a=l[0],u=e._nodeMap.get(a.__key);if(!z(u)||!z(a)||u.__mode!==a.__mode)return It;const c=u.__text,d=a.__text;if(c===d)return It;const h=o.anchor,f=s.anchor;if(h.key!==f.key||h.type!=="text")return It;const p=h.offset,x=f.offset,y=d.length-c.length;return y===1&&x===p-1?dd:y===-1&&x===p+1?yx:y===-1&&x===p?_x:It}function vx(e,t){let n=Date.now(),r=It;return(i,o,s,l,a,u)=>{const c=Date.now();if(u.has("historic"))return r=It,n=c,ea;const d=bx(i,o,l,a,e.isComposing()),h=(()=>{const f=s===null||s.editor===e,p=u.has("history-push");if(!p&&f&&u.has("history-merge"))return io;if(i===null)return Ql;const x=o._selection;return l.size>0||a.size>0?p===!1&&d!==It&&d===r&&c<n+t&&f||l.size===1&&function(y,_,g){const m=_._nodeMap.get(y),b=g._nodeMap.get(y),k=_._selection,v=g._selection;return!(D(k)&&D(v)&&k.anchor.type==="element"&&k.focus.type==="element"&&v.anchor.type==="text"&&v.focus.type==="text"||!z(m)||!z(b)||m.__parent!==b.__parent)&&JSON.stringify(_.read(()=>m.exportJSON()))===JSON.stringify(g.read(()=>b.exportJSON()))}(Array.from(l)[0],i,o)?io:Ql:x!==null?io:ea})();return n=c,r=d,h}}function fd(e){e.undoStack=[],e.redoStack=[],e.current=null}function Cx(e,t,n){const r=vx(e,n);return ft(e.registerCommand(as,()=>(function(o,s){const l=s.redoStack,a=s.undoStack;if(a.length!==0){const u=s.current,c=a.pop();u!==null&&(l.push(u),o.dispatchCommand(Gr,!0)),a.length===0&&o.dispatchCommand(qr,!1),s.current=c||null,c&&c.editor.setEditorState(c.editorState,{tag:"historic"})}}(e,t),!0),pe),e.registerCommand(us,()=>(function(o,s){const l=s.redoStack,a=s.undoStack;if(l.length!==0){const u=s.current;u!==null&&(a.push(u),o.dispatchCommand(qr,!0));const c=l.pop();l.length===0&&o.dispatchCommand(Gr,!1),s.current=c||null,c&&c.editor.setEditorState(c.editorState,{tag:"historic"})}}(e,t),!0),pe),e.registerCommand(e5,()=>(fd(t),!1),pe),e.registerCommand(t5,()=>(fd(t),e.dispatchCommand(Gr,!1),e.dispatchCommand(qr,!1),!0),pe),e.registerUpdateListener(({editorState:o,prevEditorState:s,dirtyLeaves:l,dirtyElements:a,tags:u})=>{const c=t.current,d=t.redoStack,h=t.undoStack,f=c===null?null:c.editorState;if(c!==null&&o===f)return;const p=r(s,o,c,l,a,u);if(p===Ql)d.length!==0&&(t.redoStack=[],e.dispatchCommand(Gr,!1)),c!==null&&(h.push({...c}),e.dispatchCommand(qr,!0));else if(p===ea)return;t.current={editor:e,editorState:o}}))}function xp(){return{current:null,redoStack:[],undoStack:[]}}function wx({delay:e,externalHistoryState:t}){const[n]=it();return function(r,i,o=1e3){const s=T.useMemo(()=>i||xp(),[i]);T.useEffect(()=>Cx(r,s,o),[o,r,s])}(n,t,e),null}function kx(e,t){const n=t.body?t.body.childNodes:[];let r=[];const i=[];for(let o=0;o<n.length;o++){const s=n[o];if(!_p.has(s.nodeName)){const l=bp(s,e,i,!1);l!==null&&(r=r.concat(l))}}return function(o){for(const s of o)s.getNextSibling()instanceof Eu&&s.insertAfter(Pt());for(const s of o){const l=s.getChildren();for(const a of l)s.insertBefore(a);s.remove()}}(i),r}function Sx(e,t){if(typeof document>"u"||typeof window>"u"&&global.window===void 0)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const n=document.createElement("div"),r=Ee().getChildren();for(let i=0;i<r.length;i++)yp(e,r[i],n,t);return n.innerHTML}function yp(e,t,n,r=null){let i=r===null||t.isSelected(r);const o=O(t)&&t.excludeFromCopy("html");let s=t;if(r!==null){let f=_u(t);f=z(f)&&r!==null?hp(r,f):f,s=f}const l=O(s)?s.getChildren():[],a=e._nodes.get(s.getType());let u;u=a&&a.exportDOM!==void 0?a.exportDOM(e,s):s.exportDOM(e);const{element:c,after:d}=u;if(!c)return!1;const h=document.createDocumentFragment();for(let f=0;f<l.length;f++){const p=l[f],x=yp(e,p,h,r);!i&&O(t)&&x&&t.extractWithChild(p,r,"html")&&(i=!0)}if(i&&!o){if((Fe(c)||Ol(c))&&c.append(h),n.append(c),d){const f=d.call(s,c);f&&(Ol(c)?c.replaceChildren(f):c.replaceWith(f))}}else n.append(h);return i}const _p=new Set(["STYLE","SCRIPT"]);function bp(e,t,n,r,i=new Map,o){let s=[];if(_p.has(e.nodeName))return s;let l=null;const a=function(p,x){const{nodeName:y}=p,_=x._htmlConversions.get(y.toLowerCase());let g=null;if(_!==void 0)for(const m of _){const b=m(p);b!==null&&(g===null||(g.priority||0)<=(b.priority||0))&&(g=b)}return g!==null?g.conversion:null}(e,t),u=a?a(e):null;let c=null;if(u!==null){c=u.after;const p=u.node;if(l=Array.isArray(p)?p[p.length-1]:p,l!==null){for(const[,x]of i)if(l=x(l,o),!l)break;l&&s.push(...Array.isArray(p)?p:[l])}u.forChild!=null&&i.set(e.nodeName,u.forChild)}const d=e.childNodes;let h=[];const f=(l==null||!Ve(l))&&(l!=null&&Vo(l)||r);for(let p=0;p<d.length;p++)h.push(...bp(d[p],t,n,f,new Map(i),l));return c!=null&&(h=c(h)),Mo(e)&&(h=Ex(e,h,f?()=>{const p=new Eu;return n.push(p),p}:_e)),l==null?h.length>0?s=s.concat(h):Mo(e)&&function(p){return p.nextSibling==null||p.previousSibling==null?!1:$l(p.nextSibling)&&$l(p.previousSibling)}(e)&&(s=s.concat(Pt())):O(l)&&l.append(...h),s}function Ex(e,t,n){const r=e.style.textAlign,i=[];let o=[];for(let s=0;s<t.length;s++){const l=t[s];if(Vo(l))r&&!l.getFormat()&&l.setFormat(r),i.push(l);else if(o.push(l),s===t.length-1||s<t.length-1&&Vo(t[s+1])){const a=n();a.setFormat(r),a.append(...o),i.push(a),o=[]}}return i}function Tx(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zo=Tx(function(e){const t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});function Ix(e,t=U()){return t==null&&zo(166),D(t)&&t.isCollapsed()||t.getNodes().length===0?"":Sx(e,t)}function Ax(e,t=U()){return t==null&&zo(166),D(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(Nx(e,t))}function hd(e,t,n){const r=e.getData("application/x-lexical-editor");if(r)try{const s=JSON.parse(r);if(s.namespace===n._config.namespace&&Array.isArray(s.nodes))return pd(n,Lx(s.nodes),t)}catch{}const i=e.getData("text/html");if(i)try{const s=new DOMParser().parseFromString(function(l){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:a=>a}).createHTML(l):l}(i),"text/html");return pd(n,kx(n,s),t)}catch{}const o=e.getData("text/plain")||e.getData("text/uri-list");if(o!=null)if(D(t)){const s=o.split(/(\r?\n|\t)/);s[s.length-1]===""&&s.pop();for(let l=0;l<s.length;l++){const a=U();if(D(a)){const u=s[l];u===`
17
- `||u===`\r
18
- `?a.insertParagraph():u===" "?a.insertNodes([Fr()]):a.insertText(u)}}}else t.insertRawText(o)}function pd(e,t,n){e.dispatchCommand(G0,{nodes:t,selection:n})||n.insertNodes(t)}function vp(e,t,n,r=[]){let i=t===null||n.isSelected(t);const o=O(n)&&n.excludeFromCopy("html");let s=n;if(t!==null){let u=_u(n);u=z(u)&&t!==null?hp(t,u):u,s=u}const l=O(s)?s.getChildren():[],a=function(u){const c=u.exportJSON(),d=u.constructor;if(c.type!==d.getType()&&zo(58,d.name),O(u)){const h=c.children;Array.isArray(h)||zo(59,d.name)}return c}(s);if(z(s)){const u=s.__text;u.length>0?a.text=u:i=!1}for(let u=0;u<l.length;u++){const c=l[u],d=vp(e,t,c,a.children);!i&&O(n)&&d&&n.extractWithChild(c,t,"clone")&&(i=!0)}if(i&&!o)r.push(a);else if(Array.isArray(a.children))for(let u=0;u<a.children.length;u++){const c=a.children[u];r.push(c)}return i}function Nx(e,t){const n=[],r=Ee().getChildren();for(let i=0;i<r.length;i++)vp(e,t,r[i],n);return{namespace:e._config.namespace,nodes:n}}function Lx(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n],i=Q5(r);z(i)&&ox(i),t.push(i)}return t}let fr=null;async function gd(e,t,n){if(fr!==null)return!1;if(t!==null)return new Promise((a,u)=>{e.update(()=>{a(md(e,t,n))})});const r=e.getRootElement(),i=e._window==null?window.document:e._window.document,o=Ft(e._window);if(r===null||o===null)return!1;const s=i.createElement("span");s.style.cssText="position: fixed; top: -1000px;",s.append(i.createTextNode("#")),r.append(s);const l=new Range;return l.setStart(s,0),l.setEnd(s,1),o.removeAllRanges(),o.addRange(l),new Promise((a,u)=>{const c=e.registerCommand(hs,d=>(kn(d,ClipboardEvent)&&(c(),fr!==null&&(window.clearTimeout(fr),fr=null),a(md(e,d,n))),!0),an);fr=window.setTimeout(()=>{c(),fr=null,a(!1)},50),i.execCommand("copy"),s.remove()})}function md(e,t,n){if(n===void 0){const i=Ft(e._window);if(!i)return!1;const o=i.anchorNode,s=i.focusNode;if(o!==null&&s!==null&&!Ai(e,o,s))return!1;const l=U();if(l===null)return!1;n=Px(l)}t.preventDefault();const r=t.clipboardData;return r!==null&&(Mx(r,n),!0)}const Fx=[["text/html",Ix],["application/x-lexical-editor",Ax]];function Px(e=U()){const t={"text/plain":e?e.getTextContent():""};if(e){const n=O5();for(const[r,i]of Fx){const o=i(n,e);o!==null&&(t[r]=o)}}return t}function Mx(e,t){for(const n in t){const r=t[n];r!==void 0&&e.setData(n,r)}}function xd(e,t){if(document.caretRangeFromPoint!==void 0){const n=document.caretRangeFromPoint(e,t);return n===null?null:{node:n.startContainer,offset:n.startOffset}}if(document.caretPositionFromPoint!=="undefined"){const n=document.caretPositionFromPoint(e,t);return n===null?null:{node:n.offsetNode,offset:n.offset}}return null}const Or=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,Rx=Or&&"documentMode"in document?document.documentMode:null,Ox=!(!Or||!("InputEvent"in window)||Rx)&&"getTargetRanges"in new window.InputEvent("input"),$x=Or&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),yd=Or&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Dx=Or&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Vx=Or&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!Dx,_d=fn();let Is=class Cp extends Ot{static getType(){return"quote"}static clone(t){return new Cp(t.__key)}createDOM(t){const n=document.createElement("blockquote");return Mt(n,t.theme.quote),n}updateDOM(t,n){return!1}static importDOM(){return{blockquote:t=>({conversion:Hx,priority:0})}}exportDOM(t){const{element:n}=super.exportDOM(t);if(Fe(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();n.style.textAlign=r;const i=this.getDirection();i&&(n.dir=i)}return{element:n}}static importJSON(t){return Oi().updateFromJSON(t)}insertNewAfter(t,n){const r=_e(),i=this.getDirection();return r.setDirection(i),this.insertAfter(r,n),r}collapseAtStart(){const t=_e();return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}canMergeWhenEmpty(){return!0}};function Oi(){return dt(new Is)}function ta(e){return e instanceof Is}let $i=class wp extends Ot{static getType(){return"heading"}static clone(t){return new wp(t.__tag,t.__key)}constructor(t,n){super(n),this.__tag=t}getTag(){return this.__tag}setTag(t){const n=this.getWritable();return this.__tag=t,n}createDOM(t){const n=this.__tag,r=document.createElement(n),i=t.theme.heading;if(i!==void 0){const o=i[n];Mt(r,o)}return r}updateDOM(t,n,r){return t.__tag!==this.__tag}static importDOM(){return{h1:t=>({conversion:hr,priority:0}),h2:t=>({conversion:hr,priority:0}),h3:t=>({conversion:hr,priority:0}),h4:t=>({conversion:hr,priority:0}),h5:t=>({conversion:hr,priority:0}),h6:t=>({conversion:hr,priority:0}),p:t=>{const n=t.firstChild;return n!==null&&bd(n)?{conversion:()=>({node:null}),priority:3}:null},span:t=>bd(t)?{conversion:n=>({node:Ut("h1")}),priority:3}:null}}exportDOM(t){const{element:n}=super.exportDOM(t);if(Fe(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();n.style.textAlign=r;const i=this.getDirection();i&&(n.dir=i)}return{element:n}}static importJSON(t){return Ut(t.tag).updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTag(t.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(t,n=!0){const r=t?t.anchor.offset:0,i=this.getLastDescendant(),o=!i||t&&t.anchor.key===i.getKey()&&r===i.getTextContentSize()||!t?_e():Ut(this.getTag()),s=this.getDirection();if(o.setDirection(s),this.insertAfter(o,n),r===0&&!this.isEmpty()&&t){const l=_e();l.select(),this.replace(l,!0)}return o}collapseAtStart(){const t=this.isEmpty()?_e():Ut(this.getTag());return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}extractWithChild(){return!0}};function bd(e){return e.nodeName.toLowerCase()==="span"&&e.style.fontSize==="26pt"}function hr(e){const t=e.nodeName.toLowerCase();let n=null;return t!=="h1"&&t!=="h2"&&t!=="h3"&&t!=="h4"&&t!=="h5"&&t!=="h6"||(n=Ut(t),e.style!==null&&(bu(e,n),n.setFormat(e.style.textAlign))),{node:n}}function Hx(e){const t=Oi();return e.style!==null&&(t.setFormat(e.style.textAlign),bu(e,t)),{node:t}}function Ut(e="h1"){return dt(new $i(e))}function As(e){return e instanceof $i}function oo(e){let t=null;if(kn(e,DragEvent)?t=e.dataTransfer:kn(e,ClipboardEvent)&&(t=e.clipboardData),t===null)return[!1,[],!1];const n=t.types,r=n.includes("Files"),i=n.includes("text/html")||n.includes("text/plain");return[r,Array.from(t.files),i]}function vd(e){const t=U();if(!D(t))return!1;const n=new Set,r=t.getNodes();for(let i=0;i<r.length;i++){const o=r[i],s=o.getKey();if(n.has(s))continue;const l=sr(o,u=>O(u)&&!u.isInline());if(l===null)continue;const a=l.getKey();l.canIndent()&&!n.has(a)&&(n.add(a),e(l))}return n.size>0}function so(e){const t=ln(e);return ye(t)}function fl(e){for(const t of["lowercase","uppercase","capitalize"])e.hasFormat(t)&&e.toggleFormat(t)}function Bx(e){return ft(e.registerCommand(ls,t=>{const n=U();return!!He(n)&&(n.clear(),!0)},0),e.registerCommand(Gn,t=>{const n=U();return!!D(n)&&(n.deleteCharacter(t),!0)},pe),e.registerCommand(pi,t=>{const n=U();return!!D(n)&&(n.deleteWord(t),!0)},pe),e.registerCommand(gi,t=>{const n=U();return!!D(n)&&(n.deleteLine(t),!0)},pe),e.registerCommand(vr,t=>{const n=U();if(typeof t=="string")n!==null&&n.insertText(t);else{if(n===null)return!1;const r=t.dataTransfer;if(r!=null)hd(r,n,e);else if(D(n)){const i=t.data;return i&&n.insertText(i),!0}}return!0},pe),e.registerCommand(Fl,()=>{const t=U();return!!D(t)&&(t.removeText(),!0)},pe),e.registerCommand(nn,t=>{const n=U();return!!D(n)&&(n.formatText(t),!0)},pe),e.registerCommand(X0,t=>{const n=U();if(!D(n)&&!He(n))return!1;const r=n.getNodes();for(const i of r){const o=sr(i,s=>O(s)&&!s.isInline());o!==null&&o.setFormat(t)}return!0},pe),e.registerCommand(br,t=>{const n=U();return!!D(n)&&(n.insertLineBreak(t),!0)},pe),e.registerCommand(hi,()=>{const t=U();return!!D(t)&&(t.insertParagraph(),!0)},pe),e.registerCommand(xh,()=>(Mr([Fr()]),!0),pe),e.registerCommand(So,()=>vd(t=>{const n=t.getIndent();t.setIndent(n+1)}),pe),e.registerCommand(Pl,()=>vd(t=>{const n=t.getIndent();n>0&&t.setIndent(n-1)}),pe),e.registerCommand(Za,t=>{const n=U();if(He(n)&&!so(t.target)){const r=n.getNodes();if(r.length>0)return r[0].selectPrevious(),!0}else if(D(n)){const r=xi(n.focus,!0);if(!t.shiftKey&&ye(r)&&!r.isIsolated()&&!r.isInline())return r.selectPrevious(),t.preventDefault(),!0}return!1},pe),e.registerCommand(Ga,t=>{const n=U();if(He(n)){const r=n.getNodes();if(r.length>0)return r[0].selectNext(0,0),!0}else if(D(n)){if(function(i){const o=i.focus;return o.key==="root"&&o.offset===Ee().getChildrenSize()}(n))return t.preventDefault(),!0;const r=xi(n.focus,!1);if(!t.shiftKey&&ye(r)&&!r.isIsolated()&&!r.isInline())return r.selectNext(),t.preventDefault(),!0}return!1},pe),e.registerCommand(Ka,t=>{const n=U();if(He(n)){const r=n.getNodes();if(r.length>0)return t.preventDefault(),r[0].selectPrevious(),!0}if(!D(n))return!1;if(ad(n,!0)){const r=t.shiftKey;return t.preventDefault(),ud(n,r,!0),!0}return!1},pe),e.registerCommand(mh,t=>{const n=U();if(He(n)&&!so(t.target)){const i=n.getNodes();if(i.length>0)return t.preventDefault(),i[0].selectNext(0,0),!0}if(!D(n))return!1;const r=t.shiftKey;return!!ad(n,!1)&&(t.preventDefault(),ud(n,r,!1),!0)},pe),e.registerCommand(cs,t=>{if(so(t.target))return!1;const n=U();if(!D(n))return!1;const{anchor:r}=n,i=r.getNode();return n.isCollapsed()&&r.offset===0&&!Xe(i)&&Xl(i).getIndent()>0?(t.preventDefault(),e.dispatchCommand(Pl,void 0)):(!yd||navigator.language!=="ko-KR")&&(t.preventDefault(),e.dispatchCommand(Gn,!0))},pe),e.registerCommand(ds,t=>{if(so(t.target))return!1;const n=U();return!!D(n)&&(t.preventDefault(),e.dispatchCommand(Gn,!1))},pe),e.registerCommand(mi,t=>{const n=U();if(!D(n))return!1;if(fl(n),t!==null){if((yd||$x||Vx)&&Ox)return!1;if(t.preventDefault(),t.shiftKey)return e.dispatchCommand(br,!1)}return e.dispatchCommand(hi,void 0)},pe),e.registerCommand(Ti,()=>{const t=U();return!!D(t)&&(e.blur(),!0)},pe),e.registerCommand(Xa,t=>{const[,n]=oo(t);if(n.length>0){const i=xd(t.clientX,t.clientY);if(i!==null){const{offset:o,node:s}=i,l=ln(s);if(l!==null){const a=ws();if(z(l))a.anchor.set(l.getKey(),o,"text"),a.focus.set(l.getKey(),o,"text");else{const c=l.getParentOrThrow().getKey(),d=l.getIndexWithinParent()+1;a.anchor.set(c,d,"element"),a.focus.set(c,d,"element")}const u=Er(a);Ye(u)}e.dispatchCommand(_d,n)}return t.preventDefault(),!0}const r=U();return!!D(r)},pe),e.registerCommand(fs,t=>{const[n]=oo(t),r=U();return!(n&&!D(r))},pe),e.registerCommand(Qa,t=>{const[n]=oo(t),r=U();if(n&&!D(r))return!1;const i=xd(t.clientX,t.clientY);if(i!==null){const o=ln(i.node);ye(o)&&t.preventDefault()}return!0},pe),e.registerCommand(Ml,()=>(N5(),!0),pe),e.registerCommand(hs,t=>(gd(e,kn(t,ClipboardEvent)?t:null),!0),pe),e.registerCommand(eu,t=>(async function(n,r){await gd(r,kn(n,ClipboardEvent)?n:null),r.update(()=>{const i=U();D(i)?i.removeText():He(i)&&i.getNodes().forEach(o=>o.remove())})}(t,e),!0),pe),e.registerCommand(Ei,t=>{const[,n,r]=oo(t);return n.length>0&&!r?(e.dispatchCommand(_d,n),!0):Lr(t.target)&&cu(t.target)?!1:U()!==null&&(function(i,o){i.preventDefault(),o.update(()=>{const s=U(),l=kn(i,InputEvent)||kn(i,KeyboardEvent)?null:i.clipboardData;l!=null&&s!==null&&hd(l,s,o)},{tag:"paste"})}(t,e),!0)},pe),e.registerCommand(qa,t=>{const n=U();return D(n)&&fl(n),!1},pe),e.registerCommand(Ya,t=>{const n=U();return D(n)&&fl(n),!1},pe))}function yt(e,t,n,r){const i=e.length;let o=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o<r.length;)s=r.slice(o,o+1e4),s.unshift(t,0),e.splice(...s),o+=1e4,t+=1e4}function _t(e,t){return e.length>0?(yt(e,e.length,0,t),e):t}const Ht=Mn(/[A-Za-z]/),At=Mn(/[\dA-Za-z]/),zx=Mn(/[#-'*+\--9=?A-Z^-~]/);function na(e){return e!==null&&(e<32||e===127)}const ra=Mn(/\d/),jx=Mn(/[\dA-Fa-f]/),Ux=Mn(/[!-/:-@[-`{-~]/);function te(e){return e!==null&&e<-2}function Me(e){return e!==null&&(e<0||e===32)}function ge(e){return e===-2||e===-1||e===32}const Wx=Mn(new RegExp("\\p{P}|\\p{S}","u")),Qt=Mn(/\s/);function Mn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Tr(e){if(e===null||Me(e)||Qt(e))return 1;if(Wx(e))return 2}function Ns(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}function Jx(e){let n={}.singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,l){let a=-1;for(;++a<s.length;)if(s[a][0]==="enter"&&s[a][1].type==="strikethroughSequenceTemporary"&&s[a][1]._close){let u=a;for(;u--;)if(s[u][0]==="exit"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._open&&s[a][1].end.offset-s[a][1].start.offset===s[u][1].end.offset-s[u][1].start.offset){s[a][1].type="strikethroughSequence",s[u][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},s[u][1].start),end:Object.assign({},s[a][1].end)},d={type:"strikethroughText",start:Object.assign({},s[u][1].end),end:Object.assign({},s[a][1].start)},h=[["enter",c,l],["enter",s[u][1],l],["exit",s[u][1],l],["enter",d,l]],f=l.parser.constructs.insideSpan.null;f&&yt(h,h.length,0,Ns(f,s.slice(u+1,a),l)),yt(h,h.length,0,[["exit",d,l],["enter",s[a][1],l],["exit",s[a][1],l],["exit",c,l]]),yt(s,u-1,a-u+3,h),a=u+h.length-2;break}}for(a=-1;++a<s.length;)s[a][1].type==="strikethroughSequenceTemporary"&&(s[a][1].type="data");return s}function o(s,l,a){const u=this.previous,c=this.events;let d=0;return h;function h(p){return u===126&&c[c.length-1][1].type!=="characterEscape"?a(p):(s.enter("strikethroughSequenceTemporary"),f(p))}function f(p){const x=Tr(u);if(p===126)return d>1?a(p):(s.consume(p),d++,f);if(d<2&&!n)return a(p);const y=s.exit("strikethroughSequenceTemporary"),_=Tr(p);return y._open=!_||_===2&&!!x,y._close=!x||x===2&&!!_,l(p)}}}const Kx=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];kp.peek=Xx;function Zx(){return{canContainEols:["delete"],enter:{strikethrough:qx},exit:{strikethrough:Yx}}}function Gx(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Kx}],handlers:{delete:kp}}}function qx(e){this.enter({type:"delete",children:[]},e)}function Yx(e){this.exit(e)}function kp(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),o(),s}function Xx(){return"~"}function Cd(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const Qx=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],wd={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function Sp(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=48&&t<=57}function e2(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function t2(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function kd(e){return t2(e)||Sp(e)}const Sd=document.createElement("i");function vi(e){const t="&"+e+";";Sd.innerHTML=t;const n=Sd.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}const n2=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function r2(e,t){const n=t||{},r=typeof n.additional=="string"?n.additional.charCodeAt(0):n.additional,i=[];let o=0,s=-1,l="",a,u;n.position&&("start"in n.position||"indent"in n.position?(u=n.position.indent,a=n.position.start):a=n.position);let c=(a?a.line:0)||1,d=(a?a.column:0)||1,h=p(),f;for(o--;++o<=e.length;)if(f===10&&(d=(u?u[s]:0)||1),f=e.charCodeAt(o),f===38){const _=e.charCodeAt(o+1);if(_===9||_===10||_===12||_===32||_===38||_===60||Number.isNaN(_)||r&&_===r){l+=String.fromCharCode(f),d++;continue}const g=o+1;let m=g,b=g,k;if(_===35){b=++m;const M=e.charCodeAt(b);M===88||M===120?(k="hexadecimal",b=++m):k="decimal"}else k="named";let v="",C="",E="";const I=k==="named"?kd:k==="decimal"?Sp:e2;for(b--;++b<=e.length;){const M=e.charCodeAt(b);if(!I(M))break;E+=String.fromCharCode(M),k==="named"&&Qx.includes(E)&&(v=E,C=vi(E))}let F=e.charCodeAt(b)===59;if(F){b++;const M=k==="named"?vi(E):!1;M&&(v=E,C=M)}let P=1+b-g,R="";if(!(!F&&n.nonTerminated===!1))if(!E)k!=="named"&&x(4,P);else if(k==="named"){if(F&&!C)x(5,1);else if(v!==E&&(b=m+v.length,P=1+b-m,F=!1),!F){const M=v?1:3;if(n.attribute){const K=e.charCodeAt(b);K===61?(x(M,P),C=""):kd(K)?C="":x(M,P)}else x(M,P)}R=C}else{F||x(2,P);let M=Number.parseInt(E,k==="hexadecimal"?16:10);if(i2(M))x(7,P),R="�";else if(M in wd)x(6,P),R=wd[M];else{let K="";o2(M)&&x(6,P),M>65535&&(M-=65536,K+=String.fromCharCode(M>>>10|55296),M=56320|M&1023),R=K+String.fromCharCode(M)}}if(R){y(),h=p(),o=b-1,d+=b-g+1,i.push(R);const M=p();M.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,R,{start:h,end:M},e.slice(g-1,b)),h=M}else E=e.slice(g-1,b),l+=E,d+=E.length,o=b-1}else f===10&&(c++,s++,d=0),Number.isNaN(f)?y():(l+=String.fromCharCode(f),d++);return i.join("");function p(){return{line:c,column:d,offset:o+((a?a.offset:0)||0)}}function x(_,g){let m;n.warning&&(m=p(),m.column+=g,m.offset+=g,n.warning.call(n.warningContext||void 0,n2[_],m,_))}function y(){l&&(i.push(l),n.text&&n.text.call(n.textContext||void 0,l,{start:h,end:p()}),l="")}}function i2(e){return e>=55296&&e<=57343||e>1114111}function o2(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}const s2=/["&'<>`]/g,l2=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,a2=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,u2=/[|\\{}()[\]^$+*?.]/g,Ed=new WeakMap;function c2(e,t){if(e=e.replace(t.subset?d2(t.subset):s2,r),t.subset||t.escapeOnly)return e;return e.replace(l2,n).replace(a2,r);function n(i,o,s){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,s.charCodeAt(o+2),t)}function r(i,o,s){return t.format(i.charCodeAt(0),s.charCodeAt(o+1),t)}}function d2(e){let t=Ed.get(e);return t||(t=f2(e),Ed.set(e,t)),t}function f2(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(u2,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}function h2(e){return"&#x"+e.toString(16).toUpperCase()+";"}function p2(e,t){return c2(e,Object.assign({format:h2},t))}function rn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Td(e.position):"start"in e||"end"in e?Td(e):"line"in e||"column"in e?ia(e):""}function ia(e){return Id(e&&e.line)+":"+Id(e&&e.column)}function Td(e){return ia(e&&e.start)+"-"+ia(e&&e.end)}function Id(e){return e&&typeof e=="number"?e:1}class ve extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(s=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const a=r.indexOf(":");a===-1?o.ruleId=r:(o.source=r.slice(0,a),o.ruleId=r.slice(a+1))}if(!o.place&&o.ancestors&&o.ancestors){const a=o.ancestors[o.ancestors.length-1];a&&(o.place=a.position)}const l=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=l?l.line:void 0,this.name=rn(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}ve.prototype.file="";ve.prototype.name="";ve.prototype.reason="";ve.prototype.message="";ve.prototype.stack="";ve.prototype.column=void 0;ve.prototype.line=void 0;ve.prototype.ancestors=void 0;ve.prototype.cause=void 0;ve.prototype.fatal=void 0;ve.prototype.place=void 0;ve.prototype.ruleId=void 0;ve.prototype.source=void 0;const Ep=" ";function g2(){return{canContainEols:["mdxJsxTextElement"],enter:{mdxJsxFlowTag:r,mdxJsxFlowTagClosingMarker:i,mdxJsxFlowTagAttribute:d,mdxJsxFlowTagExpressionAttribute:h,mdxJsxFlowTagAttributeValueLiteral:e,mdxJsxFlowTagAttributeValueExpression:e,mdxJsxFlowTagSelfClosingMarker:s,mdxJsxTextTag:r,mdxJsxTextTagClosingMarker:i,mdxJsxTextTagAttribute:d,mdxJsxTextTagExpressionAttribute:h,mdxJsxTextTagAttributeValueLiteral:e,mdxJsxTextTagAttributeValueExpression:e,mdxJsxTextTagSelfClosingMarker:s},exit:{mdxJsxFlowTagClosingMarker:l,mdxJsxFlowTagNamePrimary:a,mdxJsxFlowTagNameMember:u,mdxJsxFlowTagNameLocal:c,mdxJsxFlowTagExpressionAttribute:f,mdxJsxFlowTagExpressionAttributeValue:n,mdxJsxFlowTagAttributeNamePrimary:p,mdxJsxFlowTagAttributeNameLocal:x,mdxJsxFlowTagAttributeValueLiteral:y,mdxJsxFlowTagAttributeValueLiteralValue:n,mdxJsxFlowTagAttributeValueExpression:_,mdxJsxFlowTagAttributeValueExpressionValue:n,mdxJsxFlowTagSelfClosingMarker:g,mdxJsxFlowTag:m,mdxJsxTextTagClosingMarker:l,mdxJsxTextTagNamePrimary:a,mdxJsxTextTagNameMember:u,mdxJsxTextTagNameLocal:c,mdxJsxTextTagExpressionAttribute:f,mdxJsxTextTagExpressionAttributeValue:n,mdxJsxTextTagAttributeNamePrimary:p,mdxJsxTextTagAttributeNameLocal:x,mdxJsxTextTagAttributeValueLiteral:y,mdxJsxTextTagAttributeValueLiteralValue:n,mdxJsxTextTagAttributeValueExpression:_,mdxJsxTextTagAttributeValueExpressionValue:n,mdxJsxTextTagSelfClosingMarker:g,mdxJsxTextTag:m}};function e(){this.buffer()}function t(C){return{line:C.line,column:C.column,offset:C.offset}}function n(C){this.config.enter.data.call(this,C),this.config.exit.data.call(this,C)}function r(C){const E={name:void 0,attributes:[],close:!1,selfClosing:!1,start:C.start,end:C.end};this.data.mdxJsxTagStack||(this.data.mdxJsxTagStack=[]),this.data.mdxJsxTag=E,this.buffer()}function i(C){if(this.data.mdxJsxTagStack.length===0)throw new ve("Unexpected closing slash `/` in tag, expected an open tag first",{start:C.start,end:C.end},"mdast-util-mdx-jsx:unexpected-closing-slash")}function o(C){if(this.data.mdxJsxTag.close)throw new ve("Unexpected attribute in closing tag, expected the end of the tag",{start:C.start,end:C.end},"mdast-util-mdx-jsx:unexpected-attribute")}function s(C){if(this.data.mdxJsxTag.close)throw new ve("Unexpected self-closing slash `/` in closing tag, expected the end of the tag",{start:C.start,end:C.end},"mdast-util-mdx-jsx:unexpected-self-closing-slash")}function l(){const C=this.data.mdxJsxTag;C.close=!0}function a(C){const E=this.data.mdxJsxTag;E.name=this.sliceSerialize(C)}function u(C){const E=this.data.mdxJsxTag;E.name+="."+this.sliceSerialize(C)}function c(C){const E=this.data.mdxJsxTag;E.name+=":"+this.sliceSerialize(C)}function d(C){const E=this.data.mdxJsxTag;o.call(this,C),E.attributes.push({type:"mdxJsxAttribute",name:"",value:null,position:{start:t(C.start),end:void 0}})}function h(C){const E=this.data.mdxJsxTag;o.call(this,C),E.attributes.push({type:"mdxJsxExpressionAttribute",value:"",position:{start:t(C.start),end:void 0}}),this.buffer()}function f(C){const E=this.data.mdxJsxTag,I=E.attributes[E.attributes.length-1];I.type;const F=C.estree;I.value=this.resume(),I.position,I.position.end=t(C.end),F&&(I.data={estree:F})}function p(C){const E=this.data.mdxJsxTag,I=E.attributes[E.attributes.length-1];I.type,I.name=this.sliceSerialize(C),I.position,I.position.end=t(C.end)}function x(C){const E=this.data.mdxJsxTag,I=E.attributes[E.attributes.length-1];I.type,I.name+=":"+this.sliceSerialize(C),I.position,I.position.end=t(C.end)}function y(C){const E=this.data.mdxJsxTag,I=E.attributes[E.attributes.length-1];I.value=r2(this.resume(),{nonTerminated:!1}),I.position,I.position.end=t(C.end)}function _(C){const E=this.data.mdxJsxTag,I=E.attributes[E.attributes.length-1];I.type;const F={type:"mdxJsxAttributeValueExpression",value:this.resume()},P=C.estree;P&&(F.data={estree:P}),I.value=F,I.position,I.position.end=t(C.end)}function g(){const C=this.data.mdxJsxTag;C.selfClosing=!0}function m(C){const E=this.data.mdxJsxTag,I=this.data.mdxJsxTagStack,F=I[I.length-1];if(E.close&&F.name!==E.name)throw new ve("Unexpected closing tag `"+v(E)+"`, expected corresponding closing tag for `"+v(F)+"` ("+rn(F)+")",{start:C.start,end:C.end},"mdast-util-mdx-jsx:end-tag-mismatch");this.resume(),E.close?I.pop():this.enter({type:C.type==="mdxJsxTextTag"?"mdxJsxTextElement":"mdxJsxFlowElement",name:E.name||null,attributes:E.attributes,children:[]},C,b),E.selfClosing||E.close?this.exit(C,k):I.push(E)}function b(C,E){const I=this.data.mdxJsxTagStack,F=I[I.length-1],P=C?" before the end of `"+C.type+"`":"",R=C?{start:C.start,end:C.end}:void 0;throw new ve("Expected a closing tag for `"+v(F)+"` ("+rn({start:E.start,end:E.end})+")"+P,R,"mdast-util-mdx-jsx:end-tag-mismatch")}function k(C,E){const I=this.data.mdxJsxTag;throw new ve("Expected the closing tag `"+v(I)+"` either after the end of `"+E.type+"` ("+rn(E.end)+") or another opening tag after the start of `"+E.type+"` ("+rn(E.start)+")",{start:C.start,end:C.end},"mdast-util-mdx-jsx:end-tag-mismatch")}function v(C){return"<"+(C.close?"/":"")+(C.name||"")+">"}}function m2(e){const t={},n=t.quote||'"',r=t.quoteSmart||!1,i=t.tightSelfClosing||!1,o=t.printWidth||Number.POSITIVE_INFINITY,s=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize attribute values with `"+n+"` for `options.quote`, expected `\"`, or `'`");return l.peek=y2,{handlers:{mdxJsxFlowElement:l,mdxJsxTextElement:l},unsafe:[{character:"<",inConstruct:["phrasing"]},{atBreak:!0,character:"<"}],fences:!0,resourceLink:!0};function l(a,u,c,d){const h=a.type==="mdxJsxFlowElement",f=a.name?!a.children||a.children.length===0:!1,p=Tp(c),x=Ip(p),y=c.createTracker(d),_=c.createTracker(d),g=[],m=(h?x:"")+"<"+(a.name||""),b=c.enter(a.type);if(y.move(m),_.move(m),a.attributes&&a.attributes.length>0){if(!a.name)throw new Error("Cannot serialize fragment w/ attributes");let I=-1;for(;++I<a.attributes.length;){const F=a.attributes[I];let P;if(F.type==="mdxJsxExpressionAttribute")P="{"+(F.value||"")+"}";else{if(!F.name)throw new Error("Cannot serialize attribute w/o name");const R=F.value,M=F.name;let K="";if(R!=null)if(typeof R=="object")K="{"+(R.value||"")+"}";else{const B=r&&Cd(R,n)>Cd(R,s)?s:n;K=B+p2(R,{subset:[B]})+B}P=M+(K?"=":"")+K}g.push(P)}}let k=!1;const v=g.join(" ");h&&(/\r?\n|\r/.test(v)||y.current().now.column+v.length+(f?i?2:3:1)>o)&&(k=!0);let C=y,E=m;if(k){C=_;let I=-1;for(;++I<g.length;)g[I]=x+Ep+g[I];E+=C.move(`
19
- `+g.join(`
20
- `)+`
21
- `+x)}else v&&(E+=C.move(" "+v));return f&&(E+=C.move((i||k?"":" ")+"/")),E+=C.move(">"),a.children&&a.children.length>0&&(a.type==="mdxJsxTextElement"?E+=C.move(c.containerPhrasing(a,{...C.current(),before:">",after:"<"})):(C.shift(2),E+=C.move(`
22
- `),E+=C.move(x2(a,c,C.current())),E+=C.move(`
23
- `))),f||(E+=C.move((h?x:"")+"</"+(a.name||"")+">")),b(),E}}function x2(e,t,n){const r=t.indexStack,i=e.children,o=t.createTracker(n),s=Ip(Tp(t)),l=[];let a=-1;for(r.push(-1);++a<i.length;){const u=i[a];r[r.length-1]=a;const c={before:`
24
- `,after:`
25
- `,...o.current()},d=t.handle(u,e,t,c),h=u.type==="mdxJsxFlowElement"?d:t.indentLines(d,function(f,p,x){return(x?"":s)+f});l.push(o.move(h)),u.type!=="list"&&(t.bulletLastUsed=void 0),a<i.length-1&&l.push(o.move(`
26
-
27
- `))}return r.pop(),l.join("")}function Tp(e){let t=0,n=e.stack.length;for(;--n>-1;){const r=e.stack[n];if(r==="blockquote"||r==="listItem")break;r==="mdxJsxFlowElement"&&t++}return t}function Ip(e){return Ep.repeat(e)}function y2(){return"<"}const _2=/[$_\p{ID_Start}]/u,b2=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,v2=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,C2={};function wt(e){return e?_2.test(String.fromCodePoint(e)):!1}function Jr(e,t){const r=(t||C2).jsx?v2:b2;return e?r.test(String.fromCodePoint(e)):!1}function xe(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(a){return ge(a)?(e.enter(n),l(a)):t(a)}function l(a){return ge(a)&&o++<i?(e.consume(a),l):(e.exit(n),t(a))}}const w2={}.hasOwnProperty,k2=Symbol("continue"),hl=Symbol("exit"),S2=Symbol("skip");function E2(e,t){let n,r;typeof t=="function"?n=t:t&&typeof t=="object"&&(t.enter&&(n=t.enter),t.leave&&(r=t.leave)),i(e,void 0,void 0,[])();function i(o,s,l,a){return pl(o)&&(u.displayName="node ("+o.type+")"),u;function u(){const c=n?Ad(n(o,s,l,a)):[];if(c[0]===hl)return c;if(c[0]!==S2){let d;for(d in o)if(w2.call(o,d)&&o[d]&&typeof o[d]=="object"&&d!=="data"&&d!=="position"){const h=a.concat(o),f=o[d];if(Array.isArray(f)){const p=f;let x=0;for(;x>-1&&x<p.length;){const y=p[x];if(pl(y)){const _=i(y,d,x,h)();if(_[0]===hl)return _;x=typeof _[1]=="number"?_[1]:x+1}else x++}}else if(pl(f)){const p=i(f,d,void 0,h)();if(p[0]===hl)return p}}}return r?Ad(r(o,s,l,a)):c}}}function Ad(e){return Array.isArray(e)?e:typeof e=="number"?[k2,e]:[e]}function pl(e){return!!(e&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&e.type.length>0)}function T2(e,t){const n=t.prefix||"",r=t.suffix||"",i=Object.assign({},t.acornOptions),o=[],s=[],l=i.onComment,a=i.onToken;let u=!1,c,d;const h=Object.assign({},i,{onComment:o,preserveParens:!0});a&&(h.onToken=s);const f=I2(e,t.tokenTypes),p=f.value,x=n+p+r,y=Nd(p);if(y&&!t.allowEmpty)throw new ve("Unexpected empty expression",{place:g(0),ruleId:"unexpected-empty-expression",source:"micromark-extension-mdx-expression"});try{c=t.expression&&!y?t.acorn.parseExpressionAt(x,0,h):t.acorn.parse(x,h)}catch(m){const b=m,k=g(b.pos);b.message=String(b.message).replace(/ \(\d+:\d+\)$/,""),b.pos=k.offset,b.loc={line:k.line,column:k.column-1},d=b,u=b.raisedAt>=n.length+p.length||b.message==="Unterminated comment"}if(c&&t.expression&&!y)if(Nd(x.slice(c.end,x.length-r.length)))c={type:"Program",start:0,end:n.length+p.length,body:[{type:"ExpressionStatement",expression:c,start:0,end:n.length+p.length}],sourceType:"module",comments:[]};else{const m=g(c.end),b=new Error("Unexpected content after expression");b.pos=m.offset,b.loc={line:m.line,column:m.column-1},d=b,c=void 0}if(c){if(c.comments=o,E2(c,function(m,b,k,v){let C=v[v.length-1],E=b;m.type==="ParenthesizedExpression"&&C&&E&&(typeof k=="number"&&(C=C[E],E=k),C[E]=m.expression),_(m)}),Array.isArray(l))l.push(...o);else if(typeof l=="function")for(const m of o)l(m.type==="Block",m.value,m.start,m.end,m.loc.start,m.loc.end);for(const m of s)m.end<=n.length||m.start-n.length>=p.length||(_(m),Array.isArray(a)?a.push(m):a(m))}return{estree:c,error:d,swallow:u};function _(m){const b=g(m.start),k=g(m.end);m.start=b.offset,m.end=k.offset,m.loc={start:{line:b.line,column:b.column-1,offset:b.offset},end:{line:k.line,column:k.column-1,offset:k.offset}},m.range=[m.start,m.end]}function g(m){let b=m-n.length;b<0?b=0:b>p.length&&(b=p.length);let k=A2(f.stops,b);return k||(k={line:t.start.line,column:t.start.column,offset:t.start.offset}),k}}function Nd(e){return/^\s*$/.test(e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g,""))}function I2(e,t){const n={value:"",stops:[]};let r=-1;for(;++r<e.length;){const i=e[r];if(i[0]==="enter"){const o=i[1].type;if(o==="lineEnding"||t.includes(o)){const s=i[2].sliceStream(i[1]);for(;s.length>0&&s[0]===-1;)s.shift();const l=N2(s);n.stops.push([n.value.length,i[1].start]),n.value+=l,n.stops.push([n.value.length,i[1].end])}}}return n}function A2(e,t){let n=0;for(;n<e.length&&e[n][0]<=t;)n+=1;if(n===0)return;const[r,i]=e[n-1],o=t-r;return{line:i.line,column:i.column+o,offset:i.offset+o}}function N2(e){let t=-1;const n=[];let r;for(;++t<e.length;){const i=e[t];let o;if(typeof i=="string")o=i;else switch(i){case-5:{o="\r";break}case-4:{o=`
28
- `;break}case-3:{o=`\r
29
- `;break}case-2:{o=" ";break}case-1:{if(r)continue;o=" ";break}default:o=String.fromCharCode(i)}r=i===-2,n.push(o)}return n.join("")}function gl(e){const t=e||{},n=t.loc||{},r=t.range||[void 0,void 0],i=Ld(n.start,r[0]||t.start),o=Ld(n.end,r[1]||t.end);if(i&&o)return{start:i,end:o}}function Ld(e,t){if(e&&typeof e=="object"){const n="line"in e?ml(e.line):void 0,r="column"in e?ml(e.column):void 0;if(n&&r!==void 0)return{line:n,column:r+1,offset:ml(t)}}}function ml(e){return typeof e=="number"&&e>-1?e:void 0}const L2=2,xr="https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression",F2="#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-",P2="#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed",Fd="#unexpected-type-in-code-expected-an-object-spread-spread",M2="#unexpected-extra-content-in-spread-only-a-single-spread-is-supported",R2="#could-not-parse-expression-with-acorn";function Pd(e,t,n,r,i,o,s,l,a,u,c){const d=this,h=this.events.length+3;let f=0,p,x;return y;function y(b){return e.enter(n),e.enter(r),e.consume(b),e.exit(r),p=d.now(),_}function _(b){if(b===null){if(x)throw x;const k=new ve("Unexpected end of file in expression, expected a corresponding closing brace for `{`",{place:d.now(),ruleId:"unexpected-eof",source:"micromark-extension-mdx-expression"});throw k.url=xr+F2,k}if(te(b))return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),m;if(b===125&&f===0){const k=o?O2.call(d,o,s,i,h,p,u||!1,a||!1):{type:"ok",estree:void 0};if(k.type==="ok"){e.enter(r),e.consume(b),e.exit(r);const v=e.exit(n);return l&&k.estree&&Object.assign(v,{estree:k.estree}),t}return x=k.message,e.enter(i),e.consume(b),g}return e.enter(i),g(b)}function g(b){return b===125&&f===0||b===null||te(b)?(e.exit(i),_(b)):(b===123&&!o?f+=1:b===125&&(f-=1),e.consume(b),g)}function m(b){const k=d.now();if(k.line!==p.line&&!c&&d.parser.lazy[k.line]){const v=new ve("Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",{place:d.now(),ruleId:"unexpected-lazy",source:"micromark-extension-mdx-expression"});throw v.url=xr+P2,v}return ge(b)?xe(e,_,"linePrefix",L2+1)(b):_(b)}}function O2(e,t,n,r,i,o,s){const l=T2(this.events.slice(r),{acorn:e,tokenTypes:[n],acornOptions:t,start:i,expression:!0,allowEmpty:o,prefix:s?"({":"",suffix:s?"})":""}),a=l.estree;if(s&&a){const u=a.body[0];if(u.type!=="ExpressionStatement"||u.expression.type!=="ObjectExpression"){const c=gl(u),d=new ve("Unexpected `"+u.type+"` in code: expected an object spread (`{...spread}`)",{place:c.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw d.url=xr+Fd,d}if(u.expression.properties[1]){const c=gl(u.expression.properties[1]),d=new ve("Unexpected extra content in spread: only a single spread is supported",{place:c.start,ruleId:"spread-extra",source:"micromark-extension-mdx-expression"});throw d.url=xr+M2,d}if(u.expression.properties[0]&&u.expression.properties[0].type!=="SpreadElement"){const c=gl(u.expression.properties[0]),d=new ve("Unexpected `"+u.expression.properties[0].type+"` in code: only spread elements are supported",{place:c.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw d.url=xr+Fd,d}}if(l.error){const u=new ve("Could not parse expression with acorn",{cause:l.error,place:{line:l.error.loc.line,column:l.error.loc.column+1,offset:l.error.pos},ruleId:"acorn",source:"micromark-extension-mdx-expression"});return u.url=xr+R2,{type:"nok",message:u}}return{type:"ok",estree:a}}const Md="https://github.com/micromark/micromark-extension-mdx-jsx";function Ap(e,t,n,r,i,o,s,l,a,u,c,d,h,f,p,x,y,_,g,m,b,k,v,C,E,I,F,P,R,M,K,B){const Q=this;let Z,ne;return ce;function ce(S){return e.enter(l),e.enter(a),e.consume(S),e.exit(a),N}function N(S){return Me(S)?n(S):(Z=se,Ce(S))}function se(S){if(S===47)return e.enter(u),e.consume(S),e.exit(u),Z=ee,Ce;if(S===62)return Ct(S);if(S!==null&&S>=0&&wt(S))return e.enter(d),e.enter(h),e.consume(S),A;V(S,"before name","a character that can start a name, such as a letter, `$`, or `_`"+(S===33?" (note: to create a comment in MDX, use `{/* text */}`)":""))}function ee(S){if(S===62)return Ct(S);if(S!==null&&S>=0&&wt(S))return e.enter(d),e.enter(h),e.consume(S),A;V(S,"before name","a character that can start a name, such as a letter, `$`, or `_`"+(S===42||S===47?" (note: JS comments in JSX tags are not supported in MDX)":""))}function A(S){if(S!==null&&S>=0&&Jr(S,{jsx:!0}))return e.consume(S),A;if(S===46||S===47||S===58||S===62||S===123||Me(S)||Qt(S))return e.exit(h),Z=ue,Ce(S);V(S,"in name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(S===64?" (note: to create a link in MDX, use `[text](url)`)":""))}function ue(S){if(S===46)return e.enter(f),e.consume(S),e.exit(f),Z=he,Ce;if(S===58)return e.enter(x),e.consume(S),e.exit(x),Z=j,Ce;if(S===47||S===62||S===123||S!==null&&S>=0&&wt(S))return e.exit(d),ie(S);V(S,"after name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function he(S){if(S!==null&&S>=0&&wt(S))return e.enter(p),e.consume(S),oe;V(S,"before member name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function oe(S){if(S!==null&&S>=0&&Jr(S,{jsx:!0}))return e.consume(S),oe;if(S===46||S===47||S===62||S===123||Me(S)||Qt(S))return e.exit(p),Z=H,Ce(S);V(S,"in member name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(S===64?" (note: to create a link in MDX, use `[text](url)`)":""))}function H(S){if(S===46)return e.enter(f),e.consume(S),e.exit(f),Z=he,Ce;if(S===47||S===62||S===123||S!==null&&S>=0&&wt(S))return e.exit(d),ie(S);V(S,"after member name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function j(S){if(S!==null&&S>=0&&wt(S))return e.enter(y),e.consume(S),q;V(S,"before local name","a character that can start a name, such as a letter, `$`, or `_`"+(S===43||S!==null&&S>46&&S<58?" (note: to create a link in MDX, use `[text](url)`)":""))}function q(S){if(S!==null&&S>=0&&Jr(S,{jsx:!0}))return e.consume(S),q;if(S===47||S===62||S===123||Me(S)||Qt(S))return e.exit(y),Z=Y,Ce(S);V(S,"in local name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag")}function Y(S){if(S===47||S===62||S===123||S!==null&&S>=0&&wt(S))return e.exit(d),ie(S);V(S,"after local name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ie(S){if(S===47)return e.enter(c),e.consume(S),e.exit(c),Z=zn,Ce;if(S===62)return Ct(S);if(S===123)return Pd.call(Q,e,de,_,g,m,r,i,o,!0,!1,s)(S);if(S!==null&&S>=0&&wt(S))return e.enter(b),e.enter(k),e.enter(v),e.consume(S),Ie;V(S,"before attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function de(S){return Z=ie,Ce(S)}function Ie(S){if(S!==null&&S>=0&&Jr(S,{jsx:!0}))return e.consume(S),Ie;if(S===47||S===58||S===61||S===62||S===123||Me(S)||Qt(S))return e.exit(v),Z=De,Ce(S);V(S,"in attribute name","an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function De(S){if(S===58)return e.enter(C),e.consume(S),e.exit(C),Z=je,Ce;if(S===61)return e.exit(k),e.enter(I),e.consume(S),e.exit(I),Z=mn,Ce;if(S===47||S===62||S===123||Me(S)||Qt(S)||S!==null&&S>=0&&wt(S))return e.exit(k),e.exit(b),Z=ie,Ce(S);V(S,"after attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function je(S){if(S!==null&&S>=0&&wt(S))return e.enter(E),e.consume(S),Ue;V(S,"before local attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Ue(S){if(S!==null&&S>=0&&Jr(S,{jsx:!0}))return e.consume(S),Ue;if(S===47||S===61||S===62||S===123||Me(S)||Qt(S))return e.exit(E),e.exit(k),Z=Ke,Ce(S);V(S,"in local attribute name","an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function Ke(S){if(S===61)return e.enter(I),e.consume(S),e.exit(I),Z=mn,Ce;if(S===47||S===62||S===123||S!==null&&S>=0&&wt(S))return e.exit(b),ie(S);V(S,"after local attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function mn(S){if(S===34||S===39)return e.enter(F),e.enter(P),e.consume(S),e.exit(P),ne=S,Dt;if(S===123)return Pd.call(Q,e,pt,M,K,B,r,i,o,!1,!1,s)(S);V(S,"before attribute value","a character that can start an attribute value, such as `\"`, `'`, or `{`"+(S===60?" (note: to use an element or fragment as a prop value in MDX, use `{<element />}`)":""))}function pt(S){return e.exit(b),Z=ie,Ce(S)}function Dt(S){return S===null&&V(S,"in attribute value","a corresponding closing quote `"+String.fromCodePoint(ne)+"`"),S===ne?(e.enter(P),e.consume(S),e.exit(P),e.exit(F),e.exit(b),ne=void 0,Z=ie,Ce):te(S)?(Z=Dt,Ce(S)):(e.enter(R),tt(S))}function tt(S){return S===null||S===ne||te(S)?(e.exit(R),Dt(S)):(e.consume(S),tt)}function zn(S){if(S===62)return Ct(S);V(S,"after self-closing slash","`>` to end the tag"+(S===42||S===47?" (note: JS comments in JSX tags are not supported in MDX)":""))}function Ct(S){return e.enter(a),e.consume(S),e.exit(a),e.exit(l),t}function Ce(S){return te(S)?(e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),$):ge(S)||Qt(S)?(e.enter("esWhitespace"),gt(S)):Z(S)}function gt(S){return te(S)?(e.exit("esWhitespace"),Ce(S)):ge(S)||Qt(S)?(e.consume(S),gt):(e.exit("esWhitespace"),Z(S))}function $(S){if(!s&&Q.parser.lazy[Q.now().line]){const le=new ve("Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",Q.now(),"micromark-extension-mdx-jsx:unexpected-lazy");throw le.url=Md+"#unexpected-lazy-line-in-container-expected-line-to-be",le}return Ce(S)}function V(S,le,fe){const ke=new ve("Unexpected "+(S===null?"end of file":"character `"+(S===96?"` ` `":String.fromCodePoint(S))+"` ("+$2(S)+")")+" "+le+", expected "+fe,Q.now(),"micromark-extension-mdx-jsx:unexpected-"+(S===null?"eof":"character"));throw ke.url=Md+(S===null?"#unexpected-end-of-file-at-expected-expect":"#unexpected-character-at-expected-expect"),ke}}function $2(e){return"U+"+e.toString(16).toUpperCase().padStart(4,"0")}function D2(e,t){return{name:"mdxJsxTextTag",tokenize:n};function n(r,i,o){return Ap.call(this,r,i,o,e,t.acornOptions,t.addResult,!0,"mdxJsxTextTag","mdxJsxTextTagMarker","mdxJsxTextTagClosingMarker","mdxJsxTextTagSelfClosingMarker","mdxJsxTextTagName","mdxJsxTextTagNamePrimary","mdxJsxTextTagNameMemberMarker","mdxJsxTextTagNameMember","mdxJsxTextTagNamePrefixMarker","mdxJsxTextTagNameLocal","mdxJsxTextTagExpressionAttribute","mdxJsxTextTagExpressionAttributeMarker","mdxJsxTextTagExpressionAttributeValue","mdxJsxTextTagAttribute","mdxJsxTextTagAttributeName","mdxJsxTextTagAttributeNamePrimary","mdxJsxTextTagAttributeNamePrefixMarker","mdxJsxTextTagAttributeNameLocal","mdxJsxTextTagAttributeInitializerMarker","mdxJsxTextTagAttributeValueLiteral","mdxJsxTextTagAttributeValueLiteralMarker","mdxJsxTextTagAttributeValueLiteralValue","mdxJsxTextTagAttributeValueExpression","mdxJsxTextTagAttributeValueExpressionMarker","mdxJsxTextTagAttributeValueExpressionValue")}}function V2(e,t){return{name:"mdxJsxFlowTag",tokenize:n,concrete:!0};function n(r,i,o){const s=this;return l;function l(d){return a(d)}function a(d){return Ap.call(s,r,u,o,e,t.acornOptions,t.addResult,!1,"mdxJsxFlowTag","mdxJsxFlowTagMarker","mdxJsxFlowTagClosingMarker","mdxJsxFlowTagSelfClosingMarker","mdxJsxFlowTagName","mdxJsxFlowTagNamePrimary","mdxJsxFlowTagNameMemberMarker","mdxJsxFlowTagNameMember","mdxJsxFlowTagNamePrefixMarker","mdxJsxFlowTagNameLocal","mdxJsxFlowTagExpressionAttribute","mdxJsxFlowTagExpressionAttributeMarker","mdxJsxFlowTagExpressionAttributeValue","mdxJsxFlowTagAttribute","mdxJsxFlowTagAttributeName","mdxJsxFlowTagAttributeNamePrimary","mdxJsxFlowTagAttributeNamePrefixMarker","mdxJsxFlowTagAttributeNameLocal","mdxJsxFlowTagAttributeInitializerMarker","mdxJsxFlowTagAttributeValueLiteral","mdxJsxFlowTagAttributeValueLiteralMarker","mdxJsxFlowTagAttributeValueLiteralValue","mdxJsxFlowTagAttributeValueExpression","mdxJsxFlowTagAttributeValueExpressionMarker","mdxJsxFlowTagAttributeValueExpressionValue")(d)}function u(d){return ge(d)?xe(r,c,"whitespace")(d):c(d)}function c(d){const h=s.parser.constructs.flow[123],p=(Array.isArray(h)?h:h?[h]:[]).find(x=>x.name==="mdxFlowExpression");return d===60?l(d):d===123&&p?r.attempt(p,c,o)(d):d===null||te(d)?i(d):o(d)}}}function H2(e){const t={},n=t.acorn;let r;if(n){if(!n.parse||!n.parseExpressionAt)throw new Error("Expected a proper `acorn` instance passed in as `options.acorn`");r=Object.assign({ecmaVersion:2024,sourceType:"module"},t.acornOptions,{locations:!0})}else if(t.acornOptions||t.addResult)throw new Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{60:V2(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})},text:{60:D2(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})}}}function B2(){return{disable:{null:["autolink","codeIndented","htmlFlow","htmlText"]}}}const Rd={}.hasOwnProperty;function z2(e,t){const n=t||{};function r(i,...o){let s=r.invalid;const l=r.handlers;if(i&&Rd.call(i,e)){const a=String(i[e]);s=Rd.call(l,a)?l[a]:r.unknown}if(s)return s.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const j2={}.hasOwnProperty;function Np(e,t){let n=-1,r;if(t.extensions)for(;++n<t.extensions.length;)Np(e,t.extensions[n]);for(r in t)if(j2.call(t,r))switch(r){case"extensions":break;case"unsafe":{Od(e[r],t[r]);break}case"join":{Od(e[r],t[r]);break}case"handlers":{U2(e[r],t[r]);break}default:e.options[r]=t[r]}return e}function Od(e,t){t&&e.push(...t)}function U2(e,t){t&&Object.assign(e,t)}function W2(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const s=n.indentLines(n.containerFlow(e,o.current()),J2);return i(),s}function J2(e,t,n){return">"+(n?"":" ")+e}function Lp(e,t){return $d(e,t.inConstruct,!0)&&!$d(e,t.notInConstruct,!1)}function $d(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Dd(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
30
- `&&Lp(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
31
- `}function K2(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>s&&(s=o):o=1,i=r+t.length,r=n.indexOf(t,i);return s}function oa(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Z2(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function G2(e,t,n,r){const i=Z2(n),o=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(oa(e,n)){const d=n.enter("codeIndented"),h=n.indentLines(o,q2);return d(),h}const l=n.createTracker(r),a=i.repeat(Math.max(K2(o,i)+1,3)),u=n.enter("codeFenced");let c=l.move(a);if(e.lang){const d=n.enter(`codeFencedLang${s}`);c+=l.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...l.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${s}`);c+=l.move(" "),c+=l.move(n.safe(e.meta,{before:c,after:`
32
- `,encode:["`"],...l.current()})),d()}return c+=l.move(`
33
- `),o&&(c+=l.move(o+`
34
- `)),c+=l.move(a),u(),c}function q2(e,t,n){return(n?"":" ")+e}function Au(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Y2(e,t,n,r){const i=Au(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let l=n.enter("label");const a=n.createTracker(r);let u=a.move("[");return u+=a.move(n.safe(n.associationId(e),{before:u,after:"]",...a.current()})),u+=a.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":`
35
- `,...a.current()}))),l(),e.title&&(l=n.enter(`title${o}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),s(),u}function X2(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Nn(e){return"&#x"+e.toString(16).toUpperCase()+";"}function jo(e,t,n){const r=Tr(e),i=Tr(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Fp.peek=Q2;function Fp(e,t,n,r){const i=X2(n),o=n.enter("emphasis"),s=n.createTracker(r),l=s.move(i);let a=s.move(n.containerPhrasing(e,{after:i,before:l,...s.current()}));const u=a.charCodeAt(0),c=jo(r.before.charCodeAt(r.before.length-1),u,i);c.inside&&(a=Nn(u)+a.slice(1));const d=a.charCodeAt(a.length-1),h=jo(r.after.charCodeAt(0),d,i);h.inside&&(a=a.slice(0,-1)+Nn(d));const f=s.move(i);return o(),n.attentionEncodeSurroundingInfo={after:h.outside,before:c.outside},l+a+f}function Q2(e,t,n){return n.options.emphasis||"*"}const Nu=function(e){if(e==null)return ry;if(typeof e=="function")return Ls(e);if(typeof e=="object")return Array.isArray(e)?ey(e):ty(e);if(typeof e=="string")return ny(e);throw new Error("Expected function, string, or object as test")};function ey(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Nu(e[n]);return Ls(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function ty(e){const t=e;return Ls(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function ny(e){return Ls(t);function t(n){return n&&n.type===e}}function Ls(e){return t;function t(n,r,i){return!!(iy(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function ry(){return!0}function iy(e){return e!==null&&typeof e=="object"&&"type"in e}const Pp=[],oy=!0,sa=!1,sy="skip";function ly(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=Nu(i),s=r?-1:1;l(e,void 0,[])();function l(a,u,c){const d=a&&typeof a=="object"?a:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(a.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=Pp,p,x,y;if((!t||o(a,u,c[c.length-1]||void 0))&&(f=ay(n(a,c)),f[0]===sa))return f;if("children"in a&&a.children){const _=a;if(_.children&&f[0]!==sy)for(x=(r?_.children.length:-1)+s,y=c.concat(_);x>-1&&x<_.children.length;){const g=_.children[x];if(p=l(g,x,y)(),p[0]===sa)return p;x=typeof p[1]=="number"?p[1]:x+s}}return f}}}function ay(e){return Array.isArray(e)?e:typeof e=="number"?[oy,e]:e==null?Pp:[e]}function uy(e,t,n,r){let i,o,s;typeof t=="function"?(o=void 0,s=t,i=n):(o=t,s=n,i=r),ly(e,o,l,i);function l(a,u){const c=u[u.length-1],d=c?c.children.indexOf(a):void 0;return s(a,d,c)}}const cy={};function Lu(e,t){const n=cy,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Mp(e,r,i)}function Mp(e,t,n){if(dy(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Vd(e.children,t,n)}return Array.isArray(e)?Vd(e,t,n):""}function Vd(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Mp(e[i],t,n);return r.join("")}function dy(e){return!!(e&&typeof e=="object")}function Rp(e,t){let n=!1;return uy(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,sa}),!!((!e.depth||e.depth<3)&&Lu(e)&&(t.options.setext||n))}function fy(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(Rp(e,n)){const c=n.enter("headingSetext"),d=n.enter("phrasing"),h=n.containerPhrasing(e,{...o.current(),before:`
36
- `,after:`
37
- `});return d(),c(),h+`
38
- `+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
39
- `))+1))}const s="#".repeat(i),l=n.enter("headingAtx"),a=n.enter("phrasing");o.move(s+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
40
- `,...o.current()});return/^[\t ]/.test(u)&&(u=Nn(u.charCodeAt(0))+u.slice(1)),u=u?s+" "+u:s,n.options.closeAtx&&(u+=" "+s),a(),l(),u}Op.peek=hy;function Op(e){return e.value||""}function hy(){return"<"}$p.peek=py;function $p(e,t,n,r){const i=Au(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let l=n.enter("label");const a=n.createTracker(r);let u=a.move("![");return u+=a.move(n.safe(e.alt,{before:u,after:"]",...a.current()})),u+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${o}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),u+=a.move(")"),s(),u}function py(){return"!"}Dp.peek=gy;function Dp(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let s=n.enter("label");const l=n.createTracker(r);let a=l.move("![");const u=n.safe(e.alt,{before:a,after:"]",...l.current()});a+=l.move(u+"]["),s();const c=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:a,after:"]",...l.current()});return s(),n.stack=c,o(),i==="full"||!u||u!==d?a+=l.move(d+"]"):i==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function gy(){return"!"}Vp.peek=my;function Vp(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const s=n.unsafe[o],l=n.compilePattern(s);let a;if(s.atBreak)for(;a=l.exec(r);){let u=a.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(a.index+1)}}return i+r+i}function my(){return"`"}function Hp(e,t){const n=Lu(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Bp.peek=xy;function Bp(e,t,n,r){const i=Au(n),o=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let l,a;if(Hp(e,n)){const c=n.stack;n.stack=[],l=n.enter("autolink");let d=s.move("<");return d+=s.move(n.containerPhrasing(e,{before:d,after:">",...s.current()})),d+=s.move(">"),l(),n.stack=c,d}l=n.enter("link"),a=n.enter("label");let u=s.move("[");return u+=s.move(n.containerPhrasing(e,{before:u,after:"](",...s.current()})),u+=s.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),a(),e.title&&(a=n.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(n.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),a()),u+=s.move(")"),l(),u}function xy(e,t,n){return Hp(e,n)?"<":"["}zp.peek=yy;function zp(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let s=n.enter("label");const l=n.createTracker(r);let a=l.move("[");const u=n.containerPhrasing(e,{before:a,after:"]",...l.current()});a+=l.move(u+"]["),s();const c=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:a,after:"]",...l.current()});return s(),n.stack=c,o(),i==="full"||!u||u!==d?a+=l.move(d+"]"):i==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function yy(){return"["}function Fu(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function _y(e){const t=Fu(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function by(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function jp(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function vy(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let s=e.ordered?by(n):Fu(n);const l=e.ordered?s==="."?")":".":_y(n);let a=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(a=!0),jp(n)===s&&c){let d=-1;for(;++d<e.children.length;){const h=e.children[d];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){a=!0;break}}}}a&&(s=l),n.bulletCurrent=s;const u=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=o,i(),u}function Cy(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function wy(e,t,n,r){const i=Cy(n);let o=n.bulletCurrent||Fu(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const l=n.createTracker(r);l.move(o+" ".repeat(s-o.length)),l.shift(s);const a=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,l.current()),c);return a(),u;function c(d,h,f){return h?(f?"":" ".repeat(s))+d:(f?o:o+" ".repeat(s-o.length))+d}}function ky(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),i(),s}const Sy=Nu(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Ey(e,t,n,r){return(e.children.some(function(s){return Sy(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Ty(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Up.peek=Iy;function Up(e,t,n,r){const i=Ty(n),o=n.enter("strong"),s=n.createTracker(r),l=s.move(i+i);let a=s.move(n.containerPhrasing(e,{after:i,before:l,...s.current()}));const u=a.charCodeAt(0),c=jo(r.before.charCodeAt(r.before.length-1),u,i);c.inside&&(a=Nn(u)+a.slice(1));const d=a.charCodeAt(a.length-1),h=jo(r.after.charCodeAt(0),d,i);h.inside&&(a=a.slice(0,-1)+Nn(d));const f=s.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:h.outside,before:c.outside},l+a+f}function Iy(e,t,n){return n.options.strong||"*"}function Ay(e,t,n,r){return n.safe(e.value,r)}function Ny(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Ly(e,t,n){const r=(jp(n)+(n.options.ruleSpaces?" ":"")).repeat(Ny(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Wp={blockquote:W2,break:Dd,code:G2,definition:Y2,emphasis:Fp,hardBreak:Dd,heading:fy,html:Op,image:$p,imageReference:Dp,inlineCode:Vp,link:Bp,linkReference:zp,list:vy,listItem:wy,paragraph:ky,root:Ey,strong:Up,text:Ay,thematicBreak:Ly},Fy=[Py];function Py(e,t,n,r){if(t.type==="code"&&oa(t,r)&&(e.type==="list"||e.type===t.type&&oa(e,r)))return!1;if("spread"in n&&typeof n.spread=="boolean")return e.type==="paragraph"&&(e.type===t.type||t.type==="definition"||t.type==="heading"&&Rp(t,r))?void 0:n.spread?1:0}const Un=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],My=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:`
41
- `,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:Un},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
42
- ]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:Un},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
43
- *])`},{character:"*",inConstruct:"phrasing",notInConstruct:Un},{atBreak:!0,character:"+",after:`(?:[ \r
44
- ])`},{atBreak:!0,character:"-",after:`(?:[ \r
45
- -])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r
46
- ]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:Un},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:Un},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:Un},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:Un},{atBreak:!0,character:"~"}];function Jp(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const Ry=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Kp(e){return e.replace(Ry,Oy)}function Oy(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Jp(n.slice(o?2:1),o?16:10)}return vi(n)||e}function $y(e){return e.label||!e.identifier?e.label||"":Kp(e.identifier)}function Dy(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function Vy(e,t,n){const r=t.indexStack,i=e.children||[],o=[];let s=-1,l=n.before,a;r.push(-1);let u=t.createTracker(n);for(;++s<i.length;){const c=i[s];let d;if(r[r.length-1]=s,s+1<i.length){let p=t.handle.handlers[i[s+1].type];p&&p.peek&&(p=p.peek),d=p?p(i[s+1],e,t,{before:"",after:"",...u.current()}).charAt(0):""}else d=n.after;o.length>0&&(l==="\r"||l===`
47
- `)&&c.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),l=" ",u=t.createTracker(n),u.move(o.join("")));let h=t.handle(c,e,t,{...u.current(),after:d,before:l});a&&a===h.slice(0,1)&&(h=Nn(a.charCodeAt(0))+h.slice(1));const f=t.attentionEncodeSurroundingInfo;t.attentionEncodeSurroundingInfo=void 0,a=void 0,f&&(o.length>0&&f.before&&l===o[o.length-1].slice(-1)&&(o[o.length-1]=o[o.length-1].slice(0,-1)+Nn(l.charCodeAt(0))),f.after&&(a=d)),u.move(h),o.push(h),l=h.slice(-1)}return r.pop(),o.join("")}function Hy(e,t,n){const r=t.indexStack,i=e.children||[],o=t.createTracker(n),s=[];let l=-1;for(r.push(-1);++l<i.length;){const a=i[l];r[r.length-1]=l,s.push(o.move(t.handle(a,e,t,{before:`
48
- `,after:`
49
- `,...o.current()}))),a.type!=="list"&&(t.bulletLastUsed=void 0),l<i.length-1&&s.push(o.move(By(a,i[l+1],e,t)))}return r.pop(),s.join("")}function By(e,t,n,r){let i=r.join.length;for(;i--;){const o=r.join[i](e,t,n,r);if(o===!0||o===1)break;if(typeof o=="number")return`
50
- `.repeat(1+o);if(o===!1)return`
51
-
52
- <!---->
53
-
54
- `}return`
55
-
56
- `}const zy=/\r?\n|\r/g;function jy(e,t){const n=[];let r=0,i=0,o;for(;o=zy.exec(e);)s(e.slice(r,o.index)),n.push(o[0]),r=o.index+o[0].length,i++;return s(e.slice(r)),n.join("");function s(l){n.push(t(l,i,!l))}}function Uy(e,t,n){const r=(n.before||"")+(t||"")+(n.after||""),i=[],o=[],s={};let l=-1;for(;++l<e.unsafe.length;){const c=e.unsafe[l];if(!Lp(e.stack,c))continue;const d=e.compilePattern(c);let h;for(;h=d.exec(r);){const f="before"in c||!!c.atBreak,p="after"in c,x=h.index+(f?h[1].length:0);i.includes(x)?(s[x].before&&!f&&(s[x].before=!1),s[x].after&&!p&&(s[x].after=!1)):(i.push(x),s[x]={before:f,after:p})}}i.sort(Wy);let a=n.before?n.before.length:0;const u=r.length-(n.after?n.after.length:0);for(l=-1;++l<i.length;){const c=i[l];c<a||c>=u||c+1<u&&i[l+1]===c+1&&s[c].after&&!s[c+1].before&&!s[c+1].after||i[l-1]===c-1&&s[c].before&&!s[c-1].before&&!s[c-1].after||(a!==c&&o.push(Hd(r.slice(a,c),"\\")),a=c,/[!-/:-@[-`{-~]/.test(r.charAt(c))&&(!n.encode||!n.encode.includes(r.charAt(c)))?o.push("\\"):(o.push(Nn(r.charCodeAt(c))),a++))}return o.push(Hd(r.slice(a,u),n.after)),o.join("")}function Wy(e,t){return e-t}function Hd(e,t){const n=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],o=e+t;let s=-1,l=0,a;for(;a=n.exec(o);)r.push(a.index);for(;++s<r.length;)l!==r[s]&&i.push(e.slice(l,r[s])),i.push("\\"),l=r[s];return i.push(e.slice(l)),i.join("")}function Jy(e){const t=e||{},n=t.now||{};let r=t.lineShift||0,i=n.line||1,o=n.column||1;return{move:a,current:s,shift:l};function s(){return{now:{line:i,column:o},lineShift:r}}function l(u){r+=u}function a(u){const c=u||"",d=c.split(/\r?\n|\r/g),h=d[d.length-1];return i+=d.length-1,o=d.length===1?o+h.length:1+h.length+r,c}}function Zp(e,t){const n=t||{},r={associationId:$y,containerPhrasing:qy,containerFlow:Yy,createTracker:Jy,compilePattern:Dy,enter:o,handlers:{...Wp},handle:void 0,indentLines:jy,indexStack:[],join:[...Fy],options:{},safe:Xy,stack:[],unsafe:[...My]};Np(r,n),r.options.tightDefinitions&&r.join.push(Gy),r.handle=z2("type",{invalid:Ky,unknown:Zy,handlers:r.handlers});let i=r.handle(e,void 0,r,{before:`
57
- `,after:`
58
- `,now:{line:1,column:1},lineShift:0});return i&&i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=`
59
- `),i;function o(s){return r.stack.push(s),l;function l(){r.stack.pop()}}}function Ky(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function Zy(e){const t=e;throw new Error("Cannot handle unknown node `"+t.type+"`")}function Gy(e,t){if(e.type==="definition"&&e.type===t.type)return 0}function qy(e,t){return Vy(e,this,t)}function Yy(e,t){return Hy(e,this,t)}function Xy(e,t){return Uy(this,e,t)}const Qy=["mdxJsxTextElement","mdxJsxFlowElement"];function Gp(e){return Qy.includes(e.type)&&e_.includes(e.name.toLowerCase())}const e_=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","input","ins","kbd","label","legend","li","link","main","map","mark","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function t_(e,t){const n=Bd(e),r=Bd(t),i={...n,...r};return n_(i)}function Bd(e){const t={};return e.split(";").filter(r=>r.trim()!=="").forEach(r=>{const[i,o]=r.split(":").map(s=>s.trim());t[i]=o}),t}function n_(e){return Object.entries(e).map(([t,n])=>`${t}: ${n}`).join("; ")}function r_(e){return e.children instanceof Array}function i_({root:e,visitors:t,jsxComponentDescriptors:n,jsxIsAvailable:r,addImportStatements:i=!0}){let o=null;const s=new Set;t=t.sort((y,_)=>(_.priority??0)-(y.priority??0)),c(e,null);function l(y){s.add(y)}function a(y,_){if(o===null)return o=_,o;if(!r_(y))throw new Error("Attempting to append children to a non-parent");const g=y.children,m=g.at(-1);if(m){const b=t.find(k=>{var v;return(v=k.shouldJoin)==null?void 0:v.call(k,m,_)});if(b){const k=b.join(m,_);return g.splice(g.length-1,1,k),k}}return g.push(_),_}function u(y,_){y.getChildren().forEach(g=>{c(g,_)})}function c(y,_){var g;const m=t.find(b=>{var k;return(k=b.testLexicalNode)==null?void 0:k.call(b,y)});if(!m)throw new Error(`no lexical visitor found for ${y.getType()}`,{cause:y});(g=m.visitLexicalNode)==null||g.call(m,{lexicalNode:y,mdastParent:_,actions:{addAndStepInto(b,k={},v=!0){const C={type:b,...k,...v?{children:[]}:{}};a(_,C),O(y)&&v&&u(y,C)},appendToParent:a,visitChildren:u,registerReferredComponent:l}})}if(o===null)throw new Error("traversal ended with no root element");const d=new Map,h=new Map;for(const y of s){const _=n.find(g=>g.name===y)??n.find(g=>g.name==="*");if(!_)throw new Error(`Component ${y} is used but not imported`);if(_.source)if(_.defaultExport)h.set(y,_.source);else{const{source:g}=_,m=d.get(g);m?m.push(y):d.set(g,[y])}}const f=Array.from(d).map(([y,_])=>({type:"mdxjsEsm",value:`import { ${_.join(", ")} } from '${y}'`}));f.push(...Array.from(h).map(([y,_])=>({type:"mdxjsEsm",value:`import ${y} from '${_}'`})));const p=o,x=p.children.find(y=>y.type==="yaml");return i&&(x?p.children.splice(p.children.indexOf(x)+1,0,...f):p.children.unshift(...f)),xo(p,[]),qp(p),r||Yp(p),p}function qp(e){if("children"in e&&e.children.length>0){if(Gp(e)&&e.children.length===1){const t=e.children[0];t.type==="mdxJsxTextElement"&&t.name==="span"&&(t.attributes.forEach(n=>{if(n.type==="mdxJsxAttribute"){const r=e.attributes.find(i=>i.type==="mdxJsxAttribute"&&i.name===n.name);if(r)if(n.name==="className"){const i=new Set([...r.value.split(" "),...n.value.split(" ")]);r.value=Array.from(i).join(" ")}else n.name==="style"&&(r.value=t_(r.value,n.value));else e.attributes.push(n)}}),e.children=t.children)}e.children.forEach(t=>{qp(t)})}}function Yp(e){if(Object.hasOwn(e,"children")){const t=e,n=[];t.children.forEach(r=>{r.type==="mdxJsxTextElement"&&r.name==="u"?n.push({type:"html",value:"<u>"},...r.children,{type:"html",value:"</u>"}):(n.push(r),Yp(r))}),t.children=n}}const zd=/\s+$/,jd=/^\s+/;function xo(e,t){if(e.type==="strong"||e.type==="emphasis"){const n=e.children.at(-1);if((n==null?void 0:n.type)==="text"){const i=n.value.match(zd);if(i){n.value=n.value.replace(zd,"");const o=t.at(-1);o&&(o.children.splice(o.children.indexOf(e)+1,0,{type:"text",value:i[0]}),xo(o,t.slice(0,-1)))}}const r=e.children.at(0);if((r==null?void 0:r.type)==="text"){const i=r.value.match(jd);if(i){r.value=r.value.replace(jd,"");const o=t.at(-1);o&&(o.children.splice(o.children.indexOf(e),0,{type:"text",value:i[0]}),xo(o,t.slice(0,-1)))}}}if("children"in e&&e.children.length>0){const n=e;n.children.forEach(r=>{xo(r,[...t,n])})}}function o_({root:e,toMarkdownOptions:t,toMarkdownExtensions:n,visitors:r,jsxComponentDescriptors:i,jsxIsAvailable:o}){return Zp(i_({root:e,visitors:r,jsxComponentDescriptors:i,jsxIsAvailable:o}),{extensions:n,...t})+`
60
- `}const Ud={}.hasOwnProperty;function s_(e){const t={};let n=-1;for(;++n<e.length;)l_(t,e[n]);return t}function l_(e,t){let n;for(n in t){const i=(Ud.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){Ud.call(i,s)||(i[s]=[]);const l=o[s];a_(i[s],Array.isArray(l)?l:l?[l]:[])}}}function a_(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);yt(e,0,0,r)}function kr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const u_={tokenize:c_};function c_(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),xe(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),o(l)}function o(l){const a=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=a),n=a,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return te(l)?(e.consume(l),e.exit("chunkText"),o):(e.consume(l),s)}}const d_={tokenize:f_},Wd={tokenize:h_};function f_(e){const t=this,n=[];let r=0,i,o,s;return l;function l(m){if(r<n.length){const b=n[r];return t.containerState=b[1],e.attempt(b[0].continuation,a,u)(m)}return u(m)}function a(m){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&g();const b=t.events.length;let k=b,v;for(;k--;)if(t.events[k][0]==="exit"&&t.events[k][1].type==="chunkFlow"){v=t.events[k][1].end;break}_(r);let C=b;for(;C<t.events.length;)t.events[C][1].end={...v},C++;return yt(t.events,k+1,0,t.events.slice(b)),t.events.length=C,u(m)}return l(m)}function u(m){if(r===n.length){if(!i)return h(m);if(i.currentConstruct&&i.currentConstruct.concrete)return p(m);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Wd,c,d)(m)}function c(m){return i&&g(),_(r),h(m)}function d(m){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,p(m)}function h(m){return t.containerState={},e.attempt(Wd,f,p)(m)}function f(m){return r++,n.push([t.currentConstruct,t.containerState]),h(m)}function p(m){if(m===null){i&&g(),_(0),e.consume(m);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),x(m)}function x(m){if(m===null){y(e.exit("chunkFlow"),!0),_(0),e.consume(m);return}return te(m)?(e.consume(m),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(m),x)}function y(m,b){const k=t.sliceStream(m);if(b&&k.push(null),m.previous=o,o&&(o.next=m),o=m,i.defineSkip(m.start),i.write(k),t.parser.lazy[m.start.line]){let v=i.events.length;for(;v--;)if(i.events[v][1].start.offset<s&&(!i.events[v][1].end||i.events[v][1].end.offset>s))return;const C=t.events.length;let E=C,I,F;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){if(I){F=t.events[E][1].end;break}I=!0}for(_(r),v=C;v<t.events.length;)t.events[v][1].end={...F},v++;yt(t.events,E+1,0,t.events.slice(C)),t.events.length=v}}function _(m){let b=n.length;for(;b-- >m;){const k=n[b];t.containerState=k[1],k[0].exit.call(t,e)}n.length=m}function g(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function h_(e,t,n){return xe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const la={name:"attention",resolveAll:p_,tokenize:g_};function p_(e,t){let n=-1,r,i,o,s,l,a,u,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;a=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},h={...e[n][1].start};Jd(d,-a),Jd(h,a),s={type:a>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},l={type:a>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},o={type:a>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:a>1?"strong":"emphasis",start:{...s.start},end:{...l.end}},e[r][1].end={...s.start},e[n][1].start={...l.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=_t(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=_t(u,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),u=_t(u,Ns(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=_t(u,[["exit",o,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=_t(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,yt(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function g_(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Tr(r);let o;return s;function s(a){return o=a,e.enter("attentionSequence"),l(a)}function l(a){if(a===o)return e.consume(a),l;const u=e.exit("attentionSequence"),c=Tr(a),d=!c||c===2&&i||n.includes(a),h=!i||i===2&&c||n.includes(r);return u._open=!!(o===42?d:d&&(i||!h)),u._close=!!(o===42?h:h&&(c||!d)),t(a)}}function Jd(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const m_={name:"autolink",tokenize:x_};function x_(e,t,n){let r=0;return i;function i(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(f){return Ht(f)?(e.consume(f),s):f===64?n(f):u(f)}function s(f){return f===43||f===45||f===46||At(f)?(r=1,l(f)):u(f)}function l(f){return f===58?(e.consume(f),r=0,a):(f===43||f===45||f===46||At(f))&&r++<32?(e.consume(f),l):(r=0,u(f))}function a(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||na(f)?n(f):(e.consume(f),a)}function u(f){return f===64?(e.consume(f),c):zx(f)?(e.consume(f),u):n(f)}function c(f){return At(f)?d(f):n(f)}function d(f){return f===46?(e.consume(f),r=0,c):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):h(f)}function h(f){if((f===45||At(f))&&r++<63){const p=f===45?h:d;return e.consume(f),p}return n(f)}}const Fs={partial:!0,tokenize:y_};function y_(e,t,n){return r;function r(o){return ge(o)?xe(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||te(o)?t(o):n(o)}}const Xp={continuation:{tokenize:b_},exit:v_,name:"blockQuote",tokenize:__};function __(e,t,n){const r=this;return i;function i(s){if(s===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),o}return n(s)}function o(s){return ge(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function b_(e,t,n){const r=this;return i;function i(s){return ge(s)?xe(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(Xp,t,n)(s)}}function v_(e){e.exit("blockQuote")}const Qp={name:"characterEscape",tokenize:C_};function C_(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Ux(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const eg={name:"characterReference",tokenize:w_};function w_(e,t,n){const r=this;let i=0,o,s;return l;function l(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),a}function a(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,s=At,c(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=jx,c):(e.enter("characterReferenceValue"),o=7,s=ra,c(d))}function c(d){if(d===59&&i){const h=e.exit("characterReferenceValue");return s===At&&!vi(r.sliceSerialize(h))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&i++<o?(e.consume(d),c):n(d)}}const Kd={partial:!0,tokenize:S_},Zd={concrete:!0,name:"codeFenced",tokenize:k_};function k_(e,t,n){const r=this,i={partial:!0,tokenize:k};let o=0,s=0,l;return a;function a(v){return u(v)}function u(v){const C=r.events[r.events.length-1];return o=C&&C[1].type==="linePrefix"?C[2].sliceSerialize(C[1],!0).length:0,l=v,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(v)}function c(v){return v===l?(s++,e.consume(v),c):s<3?n(v):(e.exit("codeFencedFenceSequence"),ge(v)?xe(e,d,"whitespace")(v):d(v))}function d(v){return v===null||te(v)?(e.exit("codeFencedFence"),r.interrupt?t(v):e.check(Kd,x,b)(v)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(v))}function h(v){return v===null||te(v)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(v)):ge(v)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),xe(e,f,"whitespace")(v)):v===96&&v===l?n(v):(e.consume(v),h)}function f(v){return v===null||te(v)?d(v):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===null||te(v)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(v)):v===96&&v===l?n(v):(e.consume(v),p)}function x(v){return e.attempt(i,b,y)(v)}function y(v){return e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),_}function _(v){return o>0&&ge(v)?xe(e,g,"linePrefix",o+1)(v):g(v)}function g(v){return v===null||te(v)?e.check(Kd,x,b)(v):(e.enter("codeFlowValue"),m(v))}function m(v){return v===null||te(v)?(e.exit("codeFlowValue"),g(v)):(e.consume(v),m)}function b(v){return e.exit("codeFenced"),t(v)}function k(v,C,E){let I=0;return F;function F(B){return v.enter("lineEnding"),v.consume(B),v.exit("lineEnding"),P}function P(B){return v.enter("codeFencedFence"),ge(B)?xe(v,R,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):R(B)}function R(B){return B===l?(v.enter("codeFencedFenceSequence"),M(B)):E(B)}function M(B){return B===l?(I++,v.consume(B),M):I>=s?(v.exit("codeFencedFenceSequence"),ge(B)?xe(v,K,"whitespace")(B):K(B)):E(B)}function K(B){return B===null||te(B)?(v.exit("codeFencedFence"),C(B)):E(B)}}}function S_(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const xl={name:"codeIndented",tokenize:T_},E_={partial:!0,tokenize:I_};function T_(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),xe(e,o,"linePrefix",5)(u)}function o(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?s(u):n(u)}function s(u){return u===null?a(u):te(u)?e.attempt(E_,s,a)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||te(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),l)}function a(u){return e.exit("codeIndented"),t(u)}}function I_(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):te(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):xe(e,o,"linePrefix",5)(s)}function o(s){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):te(s)?i(s):n(s)}}const A_={name:"codeText",previous:L_,resolve:N_,tokenize:F_};function N_(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function L_(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function F_(e,t,n){let r=0,i,o;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),l(d)}function l(d){return d===96?(e.consume(d),r++,l):(e.exit("codeTextSequence"),a(d))}function a(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),a):d===96?(o=e.enter("codeTextSequence"),i=0,c(d)):te(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),a):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||te(d)?(e.exit("codeTextData"),a(d)):(e.consume(d),u)}function c(d){return d===96?(e.consume(d),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(o.type="codeTextData",u(d))}}class P_{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Kr(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Kr(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Kr(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Kr(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Kr(this.left,n.reverse())}}}function Kr(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function tg(e){const t={};let n=-1,r,i,o,s,l,a,u;const c=new P_(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(a=r[1]._tokenizer.events,o=0,o<a.length&&a[o][1].type==="lineEndingBlank"&&(o+=2),o<a.length&&a[o][1].type==="content"))for(;++o<a.length&&a[o][1].type!=="content";)a[o][1].type==="chunkText"&&(a[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,M_(c,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(s=c.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(s[1].type!=="linePrefix")break;i&&(r[1].end={...c.get(i)[1].start},l=c.slice(i,n),l.unshift(r),c.splice(i,n-i+1,l))}}return yt(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function M_(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[],s=n._tokenizer||r.parser[n.contentType](n.start),l=s.events,a=[],u={};let c,d,h=-1,f=n,p=0,x=0;const y=[x];for(;f;){for(;e.get(++i)[1]!==f;);o.push(i),f._tokenizer||(c=r.sliceStream(f),f.next||c.push(null),d&&s.defineSkip(f.start),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++h<l.length;)l[h][0]==="exit"&&l[h-1][0]==="enter"&&l[h][1].type===l[h-1][1].type&&l[h][1].start.line!==l[h][1].end.line&&(x=h+1,y.push(x),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(s.events=[],f?(f._tokenizer=void 0,f.previous=void 0):y.pop(),h=y.length;h--;){const _=l.slice(y[h],y[h+1]),g=o.pop();a.push([g,g+_.length-1]),e.splice(g,2,_)}for(a.reverse(),h=-1;++h<a.length;)u[p+a[h][0]]=p+a[h][1],p+=a[h][1]-a[h][0]-1;return u}const R_={resolve:$_,tokenize:D_},O_={partial:!0,tokenize:V_};function $_(e){return tg(e),e}function D_(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?o(l):te(l)?e.check(O_,s,o)(l):(e.consume(l),i)}function o(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function s(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function V_(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),xe(e,o,"linePrefix")}function o(s){if(s===null||te(s))return n(s);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function ng(e,t,n,r,i,o,s,l,a){const u=a||Number.POSITIVE_INFINITY;let c=0;return d;function d(_){return _===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(_),e.exit(o),h):_===null||_===32||_===41||na(_)?n(_):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),x(_))}function h(_){return _===62?(e.enter(o),e.consume(_),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),f(_))}function f(_){return _===62?(e.exit("chunkString"),e.exit(l),h(_)):_===null||_===60||te(_)?n(_):(e.consume(_),_===92?p:f)}function p(_){return _===60||_===62||_===92?(e.consume(_),f):f(_)}function x(_){return!c&&(_===null||_===41||Me(_))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(_)):c<u&&_===40?(e.consume(_),c++,x):_===41?(e.consume(_),c--,x):_===null||_===32||_===40||na(_)?n(_):(e.consume(_),_===92?y:x)}function y(_){return _===40||_===41||_===92?(e.consume(_),x):x(_)}}function rg(e,t,n,r,i,o){const s=this;let l=0,a;return u;function u(f){return e.enter(r),e.enter(i),e.consume(f),e.exit(i),e.enter(o),c}function c(f){return l>999||f===null||f===91||f===93&&!a||f===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(f):f===93?(e.exit(o),e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):te(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===null||f===91||f===93||te(f)||l++>999?(e.exit("chunkString"),c(f)):(e.consume(f),a||(a=!ge(f)),f===92?h:d)}function h(f){return f===91||f===92||f===93?(e.consume(f),l++,d):d(f)}}function ig(e,t,n,r,i,o){let s;return l;function l(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),s=h===40?41:h,a):n(h)}function a(h){return h===s?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(o),u(h))}function u(h){return h===s?(e.exit(o),a(s)):h===null?n(h):te(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),xe(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===s||h===null||te(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?d:c)}function d(h){return h===s||h===92?(e.consume(h),c):c(h)}}function li(e,t){let n;return r;function r(i){return te(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ge(i)?xe(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const H_={name:"definition",tokenize:z_},B_={partial:!0,tokenize:j_};function z_(e,t,n){const r=this;let i;return o;function o(f){return e.enter("definition"),s(f)}function s(f){return rg.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function l(f){return i=kr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),a):n(f)}function a(f){return Me(f)?li(e,u)(f):u(f)}function u(f){return ng(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function c(f){return e.attempt(B_,d,d)(f)}function d(f){return ge(f)?xe(e,h,"whitespace")(f):h(f)}function h(f){return f===null||te(f)?(e.exit("definition"),r.parser.defined.push(i),t(f)):n(f)}}function j_(e,t,n){return r;function r(l){return Me(l)?li(e,i)(l):n(l)}function i(l){return ig(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return ge(l)?xe(e,s,"whitespace")(l):s(l)}function s(l){return l===null||te(l)?t(l):n(l)}}const U_={name:"hardBreakEscape",tokenize:W_};function W_(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return te(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const J_={name:"headingAtx",resolve:K_,tokenize:Z_};function K_(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},yt(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Z_(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&r++<6?(e.consume(c),s):c===null||Me(c)?(e.exit("atxHeadingSequence"),l(c)):n(c)}function l(c){return c===35?(e.enter("atxHeadingSequence"),a(c)):c===null||te(c)?(e.exit("atxHeading"),t(c)):ge(c)?xe(e,l,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function a(c){return c===35?(e.consume(c),a):(e.exit("atxHeadingSequence"),l(c))}function u(c){return c===null||c===35||Me(c)?(e.exit("atxHeadingText"),l(c)):(e.consume(c),u)}}const G_=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Gd=["pre","script","style","textarea"],q_={concrete:!0,name:"htmlFlow",resolveTo:Q_,tokenize:eb},Y_={partial:!0,tokenize:nb},X_={partial:!0,tokenize:tb};function Q_(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function eb(e,t,n){const r=this;let i,o,s,l,a;return u;function u(A){return c(A)}function c(A){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(A),d}function d(A){return A===33?(e.consume(A),h):A===47?(e.consume(A),o=!0,x):A===63?(e.consume(A),i=3,r.interrupt?t:N):Ht(A)?(e.consume(A),s=String.fromCharCode(A),y):n(A)}function h(A){return A===45?(e.consume(A),i=2,f):A===91?(e.consume(A),i=5,l=0,p):Ht(A)?(e.consume(A),i=4,r.interrupt?t:N):n(A)}function f(A){return A===45?(e.consume(A),r.interrupt?t:N):n(A)}function p(A){const ue="CDATA[";return A===ue.charCodeAt(l++)?(e.consume(A),l===ue.length?r.interrupt?t:R:p):n(A)}function x(A){return Ht(A)?(e.consume(A),s=String.fromCharCode(A),y):n(A)}function y(A){if(A===null||A===47||A===62||Me(A)){const ue=A===47,he=s.toLowerCase();return!ue&&!o&&Gd.includes(he)?(i=1,r.interrupt?t(A):R(A)):G_.includes(s.toLowerCase())?(i=6,ue?(e.consume(A),_):r.interrupt?t(A):R(A)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(A):o?g(A):m(A))}return A===45||At(A)?(e.consume(A),s+=String.fromCharCode(A),y):n(A)}function _(A){return A===62?(e.consume(A),r.interrupt?t:R):n(A)}function g(A){return ge(A)?(e.consume(A),g):F(A)}function m(A){return A===47?(e.consume(A),F):A===58||A===95||Ht(A)?(e.consume(A),b):ge(A)?(e.consume(A),m):F(A)}function b(A){return A===45||A===46||A===58||A===95||At(A)?(e.consume(A),b):k(A)}function k(A){return A===61?(e.consume(A),v):ge(A)?(e.consume(A),k):m(A)}function v(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),a=A,C):ge(A)?(e.consume(A),v):E(A)}function C(A){return A===a?(e.consume(A),a=null,I):A===null||te(A)?n(A):(e.consume(A),C)}function E(A){return A===null||A===34||A===39||A===47||A===60||A===61||A===62||A===96||Me(A)?k(A):(e.consume(A),E)}function I(A){return A===47||A===62||ge(A)?m(A):n(A)}function F(A){return A===62?(e.consume(A),P):n(A)}function P(A){return A===null||te(A)?R(A):ge(A)?(e.consume(A),P):n(A)}function R(A){return A===45&&i===2?(e.consume(A),Q):A===60&&i===1?(e.consume(A),Z):A===62&&i===4?(e.consume(A),se):A===63&&i===3?(e.consume(A),N):A===93&&i===5?(e.consume(A),ce):te(A)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Y_,ee,M)(A)):A===null||te(A)?(e.exit("htmlFlowData"),M(A)):(e.consume(A),R)}function M(A){return e.check(X_,K,ee)(A)}function K(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),B}function B(A){return A===null||te(A)?M(A):(e.enter("htmlFlowData"),R(A))}function Q(A){return A===45?(e.consume(A),N):R(A)}function Z(A){return A===47?(e.consume(A),s="",ne):R(A)}function ne(A){if(A===62){const ue=s.toLowerCase();return Gd.includes(ue)?(e.consume(A),se):R(A)}return Ht(A)&&s.length<8?(e.consume(A),s+=String.fromCharCode(A),ne):R(A)}function ce(A){return A===93?(e.consume(A),N):R(A)}function N(A){return A===62?(e.consume(A),se):A===45&&i===2?(e.consume(A),N):R(A)}function se(A){return A===null||te(A)?(e.exit("htmlFlowData"),ee(A)):(e.consume(A),se)}function ee(A){return e.exit("htmlFlow"),t(A)}}function tb(e,t,n){const r=this;return i;function i(s){return te(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):n(s)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function nb(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Fs,t,n)}}const rb={name:"htmlText",tokenize:ib};function ib(e,t,n){const r=this;let i,o,s;return l;function l(N){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(N),a}function a(N){return N===33?(e.consume(N),u):N===47?(e.consume(N),k):N===63?(e.consume(N),m):Ht(N)?(e.consume(N),E):n(N)}function u(N){return N===45?(e.consume(N),c):N===91?(e.consume(N),o=0,p):Ht(N)?(e.consume(N),g):n(N)}function c(N){return N===45?(e.consume(N),f):n(N)}function d(N){return N===null?n(N):N===45?(e.consume(N),h):te(N)?(s=d,Z(N)):(e.consume(N),d)}function h(N){return N===45?(e.consume(N),f):d(N)}function f(N){return N===62?Q(N):N===45?h(N):d(N)}function p(N){const se="CDATA[";return N===se.charCodeAt(o++)?(e.consume(N),o===se.length?x:p):n(N)}function x(N){return N===null?n(N):N===93?(e.consume(N),y):te(N)?(s=x,Z(N)):(e.consume(N),x)}function y(N){return N===93?(e.consume(N),_):x(N)}function _(N){return N===62?Q(N):N===93?(e.consume(N),_):x(N)}function g(N){return N===null||N===62?Q(N):te(N)?(s=g,Z(N)):(e.consume(N),g)}function m(N){return N===null?n(N):N===63?(e.consume(N),b):te(N)?(s=m,Z(N)):(e.consume(N),m)}function b(N){return N===62?Q(N):m(N)}function k(N){return Ht(N)?(e.consume(N),v):n(N)}function v(N){return N===45||At(N)?(e.consume(N),v):C(N)}function C(N){return te(N)?(s=C,Z(N)):ge(N)?(e.consume(N),C):Q(N)}function E(N){return N===45||At(N)?(e.consume(N),E):N===47||N===62||Me(N)?I(N):n(N)}function I(N){return N===47?(e.consume(N),Q):N===58||N===95||Ht(N)?(e.consume(N),F):te(N)?(s=I,Z(N)):ge(N)?(e.consume(N),I):Q(N)}function F(N){return N===45||N===46||N===58||N===95||At(N)?(e.consume(N),F):P(N)}function P(N){return N===61?(e.consume(N),R):te(N)?(s=P,Z(N)):ge(N)?(e.consume(N),P):I(N)}function R(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),i=N,M):te(N)?(s=R,Z(N)):ge(N)?(e.consume(N),R):(e.consume(N),K)}function M(N){return N===i?(e.consume(N),i=void 0,B):N===null?n(N):te(N)?(s=M,Z(N)):(e.consume(N),M)}function K(N){return N===null||N===34||N===39||N===60||N===61||N===96?n(N):N===47||N===62||Me(N)?I(N):(e.consume(N),K)}function B(N){return N===47||N===62||Me(N)?I(N):n(N)}function Q(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),t):n(N)}function Z(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),ne}function ne(N){return ge(N)?xe(e,ce,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):ce(N)}function ce(N){return e.enter("htmlTextData"),s(N)}}const Pu={name:"labelEnd",resolveAll:ab,resolveTo:ub,tokenize:cb},ob={tokenize:db},sb={tokenize:fb},lb={tokenize:hb};function ab(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&yt(e,0,e.length,n),e}function ub(e,t){let n=e.length,r=0,i,o,s,l;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const a={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[s][1].end}},c={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[s-2][1].start}};return l=[["enter",a,t],["enter",u,t]],l=_t(l,e.slice(o+1,o+r+3)),l=_t(l,[["enter",c,t]]),l=_t(l,Ns(t.parser.constructs.insideSpan.null,e.slice(o+r+4,s-3),t)),l=_t(l,[["exit",c,t],e[s-2],e[s-1],["exit",u,t]]),l=_t(l,e.slice(s+1)),l=_t(l,[["exit",a,t]]),yt(e,o,e.length,l),e}function cb(e,t,n){const r=this;let i=r.events.length,o,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return l;function l(h){return o?o._inactive?d(h):(s=r.parser.defined.includes(kr(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),a):n(h)}function a(h){return h===40?e.attempt(ob,c,s?c:d)(h):h===91?e.attempt(sb,c,s?u:d)(h):s?c(h):d(h)}function u(h){return e.attempt(lb,c,d)(h)}function c(h){return t(h)}function d(h){return o._balanced=!0,n(h)}}function db(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return Me(d)?li(e,o)(d):o(d)}function o(d){return d===41?c(d):ng(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return Me(d)?li(e,a)(d):c(d)}function l(d){return n(d)}function a(d){return d===34||d===39||d===40?ig(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function u(d){return Me(d)?li(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function fb(e,t,n){const r=this;return i;function i(l){return rg.call(r,e,o,s,"reference","referenceMarker","referenceString")(l)}function o(l){return r.parser.defined.includes(kr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function hb(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const pb={name:"labelStartImage",resolveAll:Pu.resolveAll,tokenize:gb};function gb(e,t,n){const r=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),o}function o(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),s):n(l)}function s(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const mb={name:"labelStartLink",resolveAll:Pu.resolveAll,tokenize:xb};function xb(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const yl={name:"lineEnding",tokenize:yb};function yb(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),xe(e,t,"linePrefix")}}const yo={name:"thematicBreak",tokenize:_b};function _b(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),s(u)}function s(u){return i=u,l(u)}function l(u){return u===i?(e.enter("thematicBreakSequence"),a(u)):r>=3&&(u===null||te(u))?(e.exit("thematicBreak"),t(u)):n(u)}function a(u){return u===i?(e.consume(u),r++,a):(e.exit("thematicBreakSequence"),ge(u)?xe(e,l,"whitespace")(u):l(u))}}const ot={continuation:{tokenize:wb},exit:Sb,name:"list",tokenize:Cb},bb={partial:!0,tokenize:Eb},vb={partial:!0,tokenize:kb};function Cb(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return l;function l(f){const p=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:ra(f)){if(r.containerState.type||(r.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(yo,n,u)(f):u(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(f)}return n(f)}function a(f){return ra(f)&&++s<10?(e.consume(f),a):(!r.interrupt||s<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),u(f)):n(f)}function u(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(Fs,r.interrupt?n:c,e.attempt(bb,h,d))}function c(f){return r.containerState.initialBlankLine=!0,o++,h(f)}function d(f){return ge(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),h):n(f)}function h(f){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function wb(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Fs,i,o);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,xe(e,t,"listItemIndent",r.containerState.size+1)(l)}function o(l){return r.containerState.furtherBlankLines||!ge(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(vb,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,xe(e,e.attempt(ot,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function kb(e,t,n){const r=this;return xe(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function Sb(e){e.exit(this.containerState.type)}function Eb(e,t,n){const r=this;return xe(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const s=r.events[r.events.length-1];return!ge(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const qd={name:"setextUnderline",resolveTo:Tb,tokenize:Ib};function Tb(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",s,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function Ib(e,t,n){const r=this;let i;return o;function o(u){let c=r.events.length,d;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){d=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=u,s(u)):n(u)}function s(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===i?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),ge(u)?xe(e,a,"lineSuffix")(u):a(u))}function a(u){return u===null||te(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const Ab={tokenize:Nb};function Nb(e){const t=this,n=e.attempt(Fs,r,e.attempt(this.parser.constructs.flowInitial,i,xe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(R_,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Lb={resolveAll:sg()},Fb=og("string"),Pb=og("text");function og(e){return{resolveAll:sg(e==="text"?Mb:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,l);return s;function s(c){return u(c)?o(c):l(c)}function l(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),a}function a(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),a)}function u(c){if(c===null)return!0;const d=i[c];let h=-1;if(d)for(;++h<d.length;){const f=d[h];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function sg(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function Mb(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,s=-1,l=0,a;for(;o--;){const u=i[o];if(typeof u=="string"){for(s=u.length;u.charCodeAt(s-1)===32;)l++,s--;if(s)break;s=-1}else if(u===-2)a=!0,l++;else if(u!==-1){o++;break}}if(l){const u={type:n===e.length||a||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:r.start._bufferIndex+s,_index:r.start._index+o,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const Rb={42:ot,43:ot,45:ot,48:ot,49:ot,50:ot,51:ot,52:ot,53:ot,54:ot,55:ot,56:ot,57:ot,62:Xp},Ob={91:H_},$b={[-2]:xl,[-1]:xl,32:xl},Db={35:J_,42:yo,45:[qd,yo],60:q_,61:qd,95:yo,96:Zd,126:Zd},Vb={38:eg,92:Qp},Hb={[-5]:yl,[-4]:yl,[-3]:yl,33:pb,38:eg,42:la,60:[m_,rb],91:mb,92:[U_,Qp],93:Pu,95:la,96:A_},Bb={null:[la,Lb]},zb={null:[42,95]},jb={null:[]},Ub=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:zb,contentInitial:Ob,disable:jb,document:Rb,flow:Db,flowInitial:$b,insideSpan:Bb,string:Vb,text:Hb},Symbol.toStringTag,{value:"Module"}));function Wb(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let s=[],l=[];const a={attempt:C(k),check:C(v),consume:g,enter:m,exit:b,interrupt:C(v,{interrupt:!0})},u={code:null,containerState:{},defineSkip:x,events:[],now:p,parser:e,previous:null,sliceSerialize:h,sliceStream:f,write:d};let c=t.tokenize.call(u,a);return t.resolveAll&&o.push(t),u;function d(P){return s=_t(s,P),y(),s[s.length-1]!==null?[]:(E(t,0),u.events=Ns(o,u.events,u),u.events)}function h(P,R){return Kb(f(P),R)}function f(P){return Jb(s,P)}function p(){const{_bufferIndex:P,_index:R,line:M,column:K,offset:B}=r;return{_bufferIndex:P,_index:R,line:M,column:K,offset:B}}function x(P){i[P.line]=P.column,F()}function y(){let P;for(;r._index<s.length;){const R=s[r._index];if(typeof R=="string")for(P=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===P&&r._bufferIndex<R.length;)_(R.charCodeAt(r._bufferIndex));else _(R)}}function _(P){c=c(P)}function g(P){te(P)?(r.line++,r.column=1,r.offset+=P===-3?2:1,F()):P!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=P}function m(P,R){const M=R||{};return M.type=P,M.start=p(),u.events.push(["enter",M,u]),l.push(M),M}function b(P){const R=l.pop();return R.end=p(),u.events.push(["exit",R,u]),R}function k(P,R){E(P,R.from)}function v(P,R){R.restore()}function C(P,R){return M;function M(K,B,Q){let Z,ne,ce,N;return Array.isArray(K)?ee(K):"tokenize"in K?ee([K]):se(K);function se(oe){return H;function H(j){const q=j!==null&&oe[j],Y=j!==null&&oe.null,ie=[...Array.isArray(q)?q:q?[q]:[],...Array.isArray(Y)?Y:Y?[Y]:[]];return ee(ie)(j)}}function ee(oe){return Z=oe,ne=0,oe.length===0?Q:A(oe[ne])}function A(oe){return H;function H(j){return N=I(),ce=oe,oe.partial||(u.currentConstruct=oe),oe.name&&u.parser.constructs.disable.null.includes(oe.name)?he():oe.tokenize.call(R?Object.assign(Object.create(u),R):u,a,ue,he)(j)}}function ue(oe){return P(ce,N),B}function he(oe){return N.restore(),++ne<Z.length?A(Z[ne]):Q}}}function E(P,R){P.resolveAll&&!o.includes(P)&&o.push(P),P.resolve&&yt(u.events,R,u.events.length-R,P.resolve(u.events.slice(R),u)),P.resolveTo&&(u.events=P.resolveTo(u.events,u))}function I(){const P=p(),R=u.previous,M=u.currentConstruct,K=u.events.length,B=Array.from(l);return{from:K,restore:Q};function Q(){r=P,u.previous=R,u.currentConstruct=M,u.events.length=K,l=B,F()}}function F(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Jb(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,o)];else{if(s=e.slice(n,i),r>-1){const l=s[0];typeof l=="string"?s[0]=l.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function Kb(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
61
- `;break}case-3:{s=`\r
62
- `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}function Zb(e){const r={constructs:s_([Ub,...(e||{}).extensions||[]]),content:i(u_),defined:[],document:i(d_),flow:i(Ab),lazy:{},string:i(Fb),text:i(Pb)};return r;function i(o){return s;function s(l){return Wb(r,o,l)}}}function Gb(e){for(;!tg(e););return e}const Yd=/[\0\t\n\r]/g;function qb(){let e=1,t="",n=!0,r;return i;function i(o,s,l){const a=[];let u,c,d,h,f;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),d=0,t="",n&&(o.charCodeAt(0)===65279&&d++,n=void 0);d<o.length;){if(Yd.lastIndex=d,u=Yd.exec(o),h=u&&u.index!==void 0?u.index:o.length,f=o.charCodeAt(h),!u){t=o.slice(d);break}if(f===10&&d===h&&r)a.push(-3),r=void 0;else switch(r&&(a.push(-5),r=void 0),d<h&&(a.push(o.slice(d,h)),e+=h-d),f){case 0:{a.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,a.push(-2);e++<c;)a.push(-1);break}case 10:{a.push(-4),e=1;break}default:r=!0,e=1}d=h+1}return l&&(r&&a.push(-5),t&&a.push(t),a.push(null)),a}}const lg={}.hasOwnProperty;function Yb(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Xb(n)(Gb(Zb(n).document().write(qb()(e,t,!0))))}function Xb(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(pt),autolinkProtocol:I,autolinkEmail:I,atxHeading:o(je),blockQuote:o(Y),characterEscape:I,characterReference:I,codeFenced:o(ie),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(ie,s),codeText:o(de,s),codeTextData:I,data:I,codeFlowValue:I,definition:o(Ie),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(De),hardBreakEscape:o(Ue),hardBreakTrailing:o(Ue),htmlFlow:o(Ke,s),htmlFlowData:I,htmlText:o(Ke,s),htmlTextData:I,image:o(mn),label:s,link:o(pt),listItem:o(tt),listItemValue:h,listOrdered:o(Dt,d),listUnordered:o(Dt),paragraph:o(zn),reference:A,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(je),strong:o(Ct),thematicBreak:o(gt)},exit:{atxHeading:a(),atxHeadingSequence:k,autolink:a(),autolinkEmail:q,autolinkProtocol:j,blockQuote:a(),characterEscapeValue:F,characterReferenceMarkerHexadecimal:he,characterReferenceMarkerNumeric:he,characterReferenceValue:oe,characterReference:H,codeFenced:a(y),codeFencedFence:x,codeFencedFenceInfo:f,codeFencedFenceMeta:p,codeFlowValue:F,codeIndented:a(_),codeText:a(B),codeTextData:F,data:F,definition:a(),definitionDestinationString:b,definitionLabelString:g,definitionTitleString:m,emphasis:a(),hardBreakEscape:a(R),hardBreakTrailing:a(R),htmlFlow:a(M),htmlFlowData:F,htmlText:a(K),htmlTextData:F,image:a(Z),label:ce,labelText:ne,lineEnding:P,link:a(Q),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:ue,resourceDestinationString:N,resourceTitleString:se,resource:ee,setextHeading:a(E),setextHeadingLineSequence:C,setextHeadingText:v,strong:a(),thematicBreak:a()}};ag(t,(e||{}).mdastExtensions||[]);const n={};return r;function r($){let V={type:"root",children:[]};const S={stack:[V],tokenStack:[],config:t,enter:l,exit:u,buffer:s,resume:c,data:n},le=[];let fe=-1;for(;++fe<$.length;)if($[fe][1].type==="listOrdered"||$[fe][1].type==="listUnordered")if($[fe][0]==="enter")le.push(fe);else{const ke=le.pop();fe=i($,ke,fe)}for(fe=-1;++fe<$.length;){const ke=t[$[fe][0]];lg.call(ke,$[fe][1].type)&&ke[$[fe][1].type].call(Object.assign({sliceSerialize:$[fe][2].sliceSerialize},S),$[fe][1])}if(S.tokenStack.length>0){const ke=S.tokenStack[S.tokenStack.length-1];(ke[1]||Xd).call(S,void 0,ke[0])}for(V.position={start:yn($.length>0?$[0][1].start:{line:1,column:1,offset:0}),end:yn($.length>0?$[$.length-2][1].end:{line:1,column:1,offset:0})},fe=-1;++fe<t.transforms.length;)V=t.transforms[fe](V)||V;return V}function i($,V,S){let le=V-1,fe=-1,ke=!1,Zt,Gt,Hr,Br;for(;++le<=S;){const mt=$[le];switch(mt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{mt[0]==="enter"?fe++:fe--,Br=void 0;break}case"lineEndingBlank":{mt[0]==="enter"&&(Zt&&!Br&&!fe&&!Hr&&(Hr=le),Br=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Br=void 0}if(!fe&&mt[0]==="enter"&&mt[1].type==="listItemPrefix"||fe===-1&&mt[0]==="exit"&&(mt[1].type==="listUnordered"||mt[1].type==="listOrdered")){if(Zt){let dr=le;for(Gt=void 0;dr--;){const qt=$[dr];if(qt[1].type==="lineEnding"||qt[1].type==="lineEndingBlank"){if(qt[0]==="exit")continue;Gt&&($[Gt][1].type="lineEndingBlank",ke=!0),qt[1].type="lineEnding",Gt=dr}else if(!(qt[1].type==="linePrefix"||qt[1].type==="blockQuotePrefix"||qt[1].type==="blockQuotePrefixWhitespace"||qt[1].type==="blockQuoteMarker"||qt[1].type==="listItemIndent"))break}Hr&&(!Gt||Hr<Gt)&&(Zt._spread=!0),Zt.end=Object.assign({},Gt?$[Gt][1].start:mt[1].end),$.splice(Gt||le,0,["exit",Zt,mt[2]]),le++,S++}if(mt[1].type==="listItemPrefix"){const dr={type:"listItem",_spread:!1,start:Object.assign({},mt[1].start),end:void 0};Zt=dr,$.splice(le,0,["enter",dr,mt[2]]),le++,S++,Hr=void 0,Br=!0}}}return $[V][1]._spread=ke,S}function o($,V){return S;function S(le){l.call(this,$(le),le),V&&V.call(this,le)}}function s(){this.stack.push({type:"fragment",children:[]})}function l($,V,S){this.stack[this.stack.length-1].children.push($),this.stack.push($),this.tokenStack.push([V,S||void 0]),$.position={start:yn(V.start),end:void 0}}function a($){return V;function V(S){$&&$.call(this,S),u.call(this,S)}}function u($,V){const S=this.stack.pop(),le=this.tokenStack.pop();if(le)le[0].type!==$.type&&(V?V.call(this,$,le[0]):(le[1]||Xd).call(this,$,le[0]));else throw new Error("Cannot close `"+$.type+"` ("+rn({start:$.start,end:$.end})+"): it’s not open");S.position.end=yn($.end)}function c(){return Lu(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h($){if(this.data.expectingFirstListItemValue){const V=this.stack[this.stack.length-2];V.start=Number.parseInt(this.sliceSerialize($),10),this.data.expectingFirstListItemValue=void 0}}function f(){const $=this.resume(),V=this.stack[this.stack.length-1];V.lang=$}function p(){const $=this.resume(),V=this.stack[this.stack.length-1];V.meta=$}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const $=this.resume(),V=this.stack[this.stack.length-1];V.value=$.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const $=this.resume(),V=this.stack[this.stack.length-1];V.value=$.replace(/(\r?\n|\r)$/g,"")}function g($){const V=this.resume(),S=this.stack[this.stack.length-1];S.label=V,S.identifier=kr(this.sliceSerialize($)).toLowerCase()}function m(){const $=this.resume(),V=this.stack[this.stack.length-1];V.title=$}function b(){const $=this.resume(),V=this.stack[this.stack.length-1];V.url=$}function k($){const V=this.stack[this.stack.length-1];if(!V.depth){const S=this.sliceSerialize($).length;V.depth=S}}function v(){this.data.setextHeadingSlurpLineEnding=!0}function C($){const V=this.stack[this.stack.length-1];V.depth=this.sliceSerialize($).codePointAt(0)===61?1:2}function E(){this.data.setextHeadingSlurpLineEnding=void 0}function I($){const S=this.stack[this.stack.length-1].children;let le=S[S.length-1];(!le||le.type!=="text")&&(le=Ce(),le.position={start:yn($.start),end:void 0},S.push(le)),this.stack.push(le)}function F($){const V=this.stack.pop();V.value+=this.sliceSerialize($),V.position.end=yn($.end)}function P($){const V=this.stack[this.stack.length-1];if(this.data.atHardBreak){const S=V.children[V.children.length-1];S.position.end=yn($.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(V.type)&&(I.call(this,$),F.call(this,$))}function R(){this.data.atHardBreak=!0}function M(){const $=this.resume(),V=this.stack[this.stack.length-1];V.value=$}function K(){const $=this.resume(),V=this.stack[this.stack.length-1];V.value=$}function B(){const $=this.resume(),V=this.stack[this.stack.length-1];V.value=$}function Q(){const $=this.stack[this.stack.length-1];if(this.data.inReference){const V=this.data.referenceType||"shortcut";$.type+="Reference",$.referenceType=V,delete $.url,delete $.title}else delete $.identifier,delete $.label;this.data.referenceType=void 0}function Z(){const $=this.stack[this.stack.length-1];if(this.data.inReference){const V=this.data.referenceType||"shortcut";$.type+="Reference",$.referenceType=V,delete $.url,delete $.title}else delete $.identifier,delete $.label;this.data.referenceType=void 0}function ne($){const V=this.sliceSerialize($),S=this.stack[this.stack.length-2];S.label=Kp(V),S.identifier=kr(V).toLowerCase()}function ce(){const $=this.stack[this.stack.length-1],V=this.resume(),S=this.stack[this.stack.length-1];if(this.data.inReference=!0,S.type==="link"){const le=$.children;S.children=le}else S.alt=V}function N(){const $=this.resume(),V=this.stack[this.stack.length-1];V.url=$}function se(){const $=this.resume(),V=this.stack[this.stack.length-1];V.title=$}function ee(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function ue($){const V=this.resume(),S=this.stack[this.stack.length-1];S.label=V,S.identifier=kr(this.sliceSerialize($)).toLowerCase(),this.data.referenceType="full"}function he($){this.data.characterReferenceType=$.type}function oe($){const V=this.sliceSerialize($),S=this.data.characterReferenceType;let le;S?(le=Jp(V,S==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):le=vi(V);const fe=this.stack[this.stack.length-1];fe.value+=le}function H($){const V=this.stack.pop();V.position.end=yn($.end)}function j($){F.call(this,$);const V=this.stack[this.stack.length-1];V.url=this.sliceSerialize($)}function q($){F.call(this,$);const V=this.stack[this.stack.length-1];V.url="mailto:"+this.sliceSerialize($)}function Y(){return{type:"blockquote",children:[]}}function ie(){return{type:"code",lang:null,meta:null,value:""}}function de(){return{type:"inlineCode",value:""}}function Ie(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function De(){return{type:"emphasis",children:[]}}function je(){return{type:"heading",depth:0,children:[]}}function Ue(){return{type:"break"}}function Ke(){return{type:"html",value:""}}function mn(){return{type:"image",title:null,url:"",alt:null}}function pt(){return{type:"link",title:null,url:"",children:[]}}function Dt($){return{type:"list",ordered:$.type==="listOrdered",start:null,spread:$._spread,children:[]}}function tt($){return{type:"listItem",spread:$._spread,checked:null,children:[]}}function zn(){return{type:"paragraph",children:[]}}function Ct(){return{type:"strong",children:[]}}function Ce(){return{type:"text",value:""}}function gt(){return{type:"thematicBreak"}}}function yn(e){return{line:e.line,column:e.column,offset:e.offset}}function ag(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?ag(e,r):Qb(e,r)}}function Qb(e,t){let n;for(n in t)if(lg.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Xd(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+rn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+rn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+rn({start:t.start,end:t.end})+") is still open")}function lo(e){return e.children instanceof Array}class aa extends Error{constructor(t,n){super(t),this.name="MarkdownParseError",this.cause=n}}class ua extends Error{constructor(t){super(t),this.name="UnrecognizedMarkdownConstructError"}}function ev({root:e,markdown:t,visitors:n,syntaxExtensions:r,mdastExtensions:i,...o}){var s;let l;try{l=Yb(t,{extensions:r,mdastExtensions:i})}catch(a){throw a instanceof Error?new aa(`Error parsing markdown: ${a.message}`,a):new aa(`Error parsing markdown: ${a}`,a)}l.children.length===0&&l.children.push({type:"paragraph",children:[]}),((s=l.children.at(-1))==null?void 0:s.type)!=="paragraph"&&l.children.push({type:"paragraph",children:[]}),tv({root:e,mdastRoot:l,visitors:n,...o})}function tv({root:e,mdastRoot:t,visitors:n,...r}){const i=new WeakMap;n=n.sort((l,a)=>(a.priority??0)-(l.priority??0));function o(l,a){if(!lo(l))throw new Error("Attempting to visit children of a non-parent");l.children.forEach(u=>{s(u,a,l)})}function s(l,a,u){const c=n.find(d=>typeof d.testNode=="string"?d.testNode===l.type:d.testNode(l,r));if(!c)try{throw new ua(`Unsupported markdown syntax: ${Zp(l)}`)}catch{throw new ua(`Parsing of the following markdown structure failed: ${JSON.stringify({type:l.type,name:"name"in l?l.name:"N/A"})}`)}c.visitNode({mdastNode:l,lexicalParent:a,mdastParent:u,descriptors:r,actions:{visitChildren:o,addAndStepInto(d){a.append(d),lo(l)&&o(l,d)},addFormatting(d,h){h||lo(l)&&(h=l),h&&i.set(h,d|(i.get(u)??0))},removeFormatting(d,h){h||lo(l)&&(h=l),h&&i.set(h,d^(i.get(u)??0))},getParentFormatting(){return i.get(u)??0}}})}s(t,e,null)}var nv=Object.defineProperty,rv=(e,t,n)=>t in e?nv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_l=(e,t,n)=>(rv(e,typeof t!="symbol"?t+"":t,n),n);const Qd="generic-html";class Di extends Ot{constructor(t,n,r,i){super(i),_l(this,"__tag"),_l(this,"__nodeType"),_l(this,"__attributes"),this.__tag=t,this.__nodeType=n,this.__attributes=r}static getType(){return Qd}static clone(t){return new Di(t.__tag,t.__nodeType,t.__attributes,t.__key)}getTag(){return this.__tag}getNodeType(){return this.__nodeType}getAttributes(){return this.__attributes}updateAttributes(t){const n=this.getWritable();n.__attributes=t}getStyle(){var t;return(t=this.__attributes.find(n=>n.name==="style"))==null?void 0:t.value}createDOM(){const t=this.__tag,n=document.createElement(t);return this.__attributes.forEach(r=>{n.setAttribute(r.name,r.value)}),n}updateDOM(){return!1}static importDOM(){return{}}exportDOM(t){const{element:n}=super.exportDOM(t);return{element:n}}static importJSON(t){const n=ug(t.tag,t.mdxType,t.attributes);return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),attributes:this.__attributes,mdxType:this.__nodeType,type:Qd,version:1}}extractWithChild(){return!0}isInline(){return this.__nodeType==="mdxJsxTextElement"}}function ug(e,t,n){return dt(new Di(e,t,n))}function iv(e){return e instanceof Di}const ov={testLexicalNode:iv,visitLexicalNode({actions:e,lexicalNode:t}){e.addAndStepInto("mdxJsxTextElement",{name:t.getTag(),type:t.getNodeType(),attributes:t.getAttributes()})},priority:-100},sv={testLexicalNode:Lt,visitLexicalNode:({mdastParent:e,actions:t})=>{t.appendToParent(e,{type:"text",value:`
63
- `})}},lv={testLexicalNode:Tu,visitLexicalNode:({actions:e})=>{e.addAndStepInto("paragraph")}},av={testLexicalNode:Xe,visitLexicalNode:({actions:e})=>{e.addAndStepInto("root")}},ai=1,ui=2,_o=4,ci=8,Mu=16,bo=32,vo=64;function ef(e){return e.type==="text"}const uv=["u","span","sub","sup"],cv={shouldJoin:(e,t)=>{if(["text","emphasis","strong"].includes(e.type))return e.type===t.type;if(e.type==="mdxJsxTextElement"&&t.type==="mdxJsxTextElement"&&uv.includes(t.name)){const n=t;return e.name===n.name&&JSON.stringify(e.attributes)===JSON.stringify(n.attributes)}return!1},join(e,t){return ef(e)&&ef(t)?{type:"text",value:e.value+t.value}:{...e,children:[...e.children,...t.children]}},testLexicalNode:z,visitLexicalNode:({lexicalNode:e,mdastParent:t,actions:n})=>{const r=e.getPreviousSibling(),i=z(r)?r.getFormat():0,o=e.getTextContent(),s=e.getFormat(),l=e.getStyle();let a=t;if(l&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"span",children:[],attributes:[{type:"mdxJsxAttribute",name:"style",value:l}]})),i&s&ui&&(a=n.appendToParent(a,{type:"emphasis",children:[]})),i&s&ai&&(a=n.appendToParent(a,{type:"strong",children:[]})),i&s&ci&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"u",children:[],attributes:[]})),i&s&_o&&(a=n.appendToParent(a,{type:"delete",children:[]})),i&s&vo&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"sup",children:[],attributes:[]})),i&s&bo&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"sub",children:[],attributes:[]})),s&ui&&!(i&ui)&&(a=n.appendToParent(a,{type:"emphasis",children:[]})),s&ai&&!(i&ai)&&(a=n.appendToParent(a,{type:"strong",children:[]})),s&ci&&!(i&ci)&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"u",children:[],attributes:[]})),s&_o&&!(i&_o)&&(a=n.appendToParent(a,{type:"delete",children:[]})),s&vo&&!(i&vo)&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"sup",children:[],attributes:[]})),s&bo&&!(i&bo)&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"sub",children:[],attributes:[]})),s&Mu){n.appendToParent(a,{type:"inlineCode",value:o});return}n.appendToParent(a,{type:"text",value:o})}},dv={testNode:"break",visitNode:function({lexicalParent:e}){e.append(Pt())}};function ao(e,t){return[{testNode:n=>n.type==="mdxJsxTextElement"&&n.name===e,visitNode({actions:n,mdastNode:r,lexicalParent:i}){n.addFormatting(t),n.visitChildren(r,i)}},{testNode:n=>n.type==="html"&&n.value===`<${e}>`,visitNode({actions:n,mdastParent:r}){n.addFormatting(t,r)}},{testNode:n=>n.type==="html"&&n.value===`</${e}>`,visitNode({actions:n,mdastParent:r}){n.removeFormatting(t,r)}}]}const fv={testNode:"delete",visitNode({mdastNode:e,actions:t,lexicalParent:n}){t.addFormatting(_o),t.visitChildren(e,n)}},hv={testNode:"inlineCode",visitNode({mdastNode:e,actions:t}){t.addAndStepInto(Ae(e.value).setFormat(t.getParentFormatting()|Mu))}},pv={testNode:"emphasis",visitNode({mdastNode:e,actions:t,lexicalParent:n}){t.addFormatting(ui),t.visitChildren(e,n)}},gv={testNode:"strong",visitNode({mdastNode:e,actions:t,lexicalParent:n}){t.addFormatting(ai),t.visitChildren(e,n)}},mv=[pv,gv,...ao("u",ci),...ao("code",Mu),hv,fv,...ao("sup",vo),...ao("sub",bo)],xv={testNode:Gp,visitNode:function({mdastNode:e,actions:t}){t.addAndStepInto(ug(e.name,e.type,e.attributes))},priority:-100},yv=["listitem","quote","admonition"],_v={testNode:"paragraph",visitNode:function({mdastNode:e,lexicalParent:t,actions:n}){yv.includes(t.getType())?n.visitChildren(e,t):n.addAndStepInto(_e())}},bv={testNode:"root",visitNode({actions:e,mdastNode:t,lexicalParent:n}){e.visitChildren(t,n)}},vv={testNode:"text",visitNode({mdastNode:e,actions:t}){t.addAndStepInto(Ae(e.value).setFormat(t.getParentFormatting()))}},Cv=()=>w.createElement(wx,{externalHistoryState:vt(Zv)}),kt={eof:null,exclamationMark:33,dash:45,greaterThan:62},Wn={data:"data",lineEnding:"lineEnding",linePrefix:"linePrefix"};function wv(e){return{canContainEols:["comment"],enter:{comment(t){this.buffer()}},exit:{comment(t){this.resume()}}}}const tf=(e,t,n)=>{return r;function r(p){return e.enter("comment"),e.consume(p),i}function i(p){return p===kt.exclamationMark?(e.consume(p),o):n(p)}function o(p){return p===kt.dash?(e.consume(p),s):n(p)}function s(p){return p===kt.dash?(e.consume(p),l):n(p)}function l(p){return p===kt.greaterThan?n(p):te(p)?c(p):(e.enter(Wn.data),p===kt.dash?(e.consume(p),a):u(p))}function a(p){return p===kt.greaterThan?n(p):u(p)}function u(p){return p===kt.eof?n(p):p===kt.dash?(e.consume(p),h):te(p)?(e.exit(Wn.data),c(p)):(e.consume(p),u)}function c(p){return e.enter(Wn.lineEnding),e.consume(p),e.exit(Wn.lineEnding),xe(e,d,Wn.linePrefix)}function d(p){return te(p)?c(p):(e.enter(Wn.data),u(p))}function h(p){return p===kt.dash?(e.consume(p),f):u(p)}function f(p){return p===kt.greaterThan?(e.exit(Wn.data),e.enter("commentEnd"),e.consume(p),e.exit("commentEnd"),e.exit("comment"),t(p)):p===kt.dash?(e.consume(p),f):u(p)}},kv={flow:{60:{tokenize:tf,concrete:!0}},text:{60:{tokenize:tf}}},Sv="_bold_1tncs_10",Ev="_italic_1tncs_14",Tv="_underline_1tncs_18",Iv="_strikethrough_1tncs_34",Av="_underlineStrikethrough_1tncs_38",Nv="_subscript_1tncs_42",Lv="_superscript_1tncs_47",Fv="_code_1tncs_52",Pv="_nestedListItem_1tncs_59",Mv="_listitem_1tncs_69",Rv="_listItemChecked_1tncs_73",Ov="_listItemUnchecked_1tncs_74",$v="_admonitionDanger_1tncs_151",Dv="_admonitionInfo_1tncs_152",Vv="_admonitionNote_1tncs_153",Hv="_admonitionTip_1tncs_154",Bv="_admonitionCaution_1tncs_155",Ze={bold:Sv,italic:Ev,underline:Tv,strikethrough:Iv,underlineStrikethrough:Av,subscript:Nv,superscript:Lv,code:Fv,nestedListItem:Pv,listitem:Mv,listItemChecked:Rv,listItemUnchecked:Ov,admonitionDanger:$v,admonitionInfo:Dv,admonitionNote:Vv,admonitionTip:Hv,admonitionCaution:Bv},Ru={text:{bold:Ze.bold,italic:Ze.italic,underline:Ze.underline,code:Ze.code,strikethrough:Ze.strikethrough,subscript:Ze.subscript,superscript:Ze.superscript,underlineStrikethrough:Ze.underlineStrikethrough},list:{listitem:Ze.listitem,listitemChecked:Ze.listItemChecked,listitemUnchecked:Ze.listItemUnchecked,nested:{listitem:Ze.nestedListItem}},admonition:{danger:Ze.admonitionDanger,info:Ze.admonitionInfo,note:Ze.admonitionNote,tip:Ze.admonitionTip,caution:Ze.admonitionCaution}},Ou=fn(),Rn=re(null),$e=re(null),ca=re(""),da=re(!0),un=re(!1,e=>{e.sub(e.pipe(un,Le(Rn)),([t,n])=>{n==null||n.setEditable(!t)})}),fa=re(""),nf=re(!1),Ci=re(!1),cg=re(0),Uo=re(null),ha=ze(e=>{e.link(e.pipe(Uo,ki(t=>t!==null)),ha)}),dg=ze(e=>{e.sub(e.pipe(dg,Le($e)),([t,n])=>{n==null||n.dispatchCommand(nn,t)})}),Ir=re(null,e=>{e.sub(e.pipe(Ir,Le($e)),([t,n])=>{if(!t||!n)return;const r=t.anchor.getNode();let i=r.getKey()==="root"?r:sr(r,l=>{const a=l.getParent();return a!==null&&Ve(a)});i===null&&(i=r.getTopLevelElementOrThrow());const o=i.getKey();if(n.getElementByKey(o)!==null){const l=As(i)?i.getTag():i.getType();e.pub(Lg,l)}})}),fg=re(""),tr=re(""),Ps=ze(e=>{e.link(tr,Ps),e.link(fg,tr)}),pa=ze(e=>{e.link(e.pipe(Ps,Le(ya),ki(([,t])=>!t),yr(([t])=>t)),pa)}),hg=re([]),pg=re([]),gg=re([]),mg=re([]),xg=re([]),yg=re([]),ga=re({}),zv=re(!1),_g=re([]),jv=re([]),$u=re([]),Vi=re(null),Uv=re(null),lr=ht(pg),Ln=ht(hg),ma=ht(gg),xa=ht(mg),ar=ht(xg),bg=ht(yg),ya=re(!1),Du=ze(e=>{e.sub(e.pipe(Du,Le(tr,Rn,Ci),ki(([t,n])=>t.trim()!==n.trim())),([t,,n,r])=>{e.pub(ya,!0),n==null||n.update(()=>{Ee().clear(),Vu(e,Ee(),t),r?n.focus():Ye(null)},{onUpdate:()=>{e.pub(ya,!1)}})})}),vg=ze(e=>{e.sub(e.pipe(vg,Le($e,Ci)),([t,n,r])=>{n==null||n.update(()=>{const i=U();if(i!==null){const o={children:[],append(s){this.children.push(s)},getType(){return i.getNodes()[0].getType()}};Vu(e,o,t),Mr(o.children)}r?n.focus():Ye(null)})})});function Cg(){return hh((e,[t,n])=>(e.forEach(r=>{if(!r)throw new Error("You have a subscription that does not return a teardown");r()}),n?t.map(r=>r(n)):[]),[])}const wg=re([],e=>{e.pipe(e.combine(wg,$e),Cg())}),kg=re([],e=>{e.pipe(e.combine(kg,Rn),Cg())}),Wv=re(null),_a=ze(),On=re(e=>{throw new Error(`No icon component for ${e}`)});function ht(e,t){return ze((n,r)=>{n.changeWith(e,r,(i,o)=>{Array.isArray(o)||(o=[o]);let s=i;for(const l of o)i.includes(l)||(s=[...s,l]);return s}),t==null||t(n,r)})}function Sg(e){const t=U();D(t)&&e.pubIn({[Ir]:t,[cg]:t.format})}const Eg=ht(kg,(e,t)=>{e.pub(t,[n=>n.registerCommand(Si,(r,i)=>(e.pubIn({[$e]:i,[Ci]:!0}),i._parentEditor===null&&i.getEditorState().read(()=>{e.pub(Wv,{rootNode:Ee(),editorType:"lexical"})}),Sg(e),!1),an),n=>n.registerUpdateListener(({dirtyElements:r,dirtyLeaves:i,editorState:o})=>{if(e.getValue(Uo)!==null||r.size===0&&i.size===0)return;let l;o.read(()=>{Ee().getLastChild()instanceof Mi&&n.update(()=>{Ee().append(_e())},{discrete:!0}),l=o_({root:Ee(),visitors:e.getValue(xg),jsxComponentDescriptors:e.getValue(_g),toMarkdownExtensions:e.getValue(yg),toMarkdownOptions:e.getValue(ga),jsxIsAvailable:e.getValue(zv)})}),e.pub(tr,l.trim())}),n=>n.registerCommand(yh,()=>(e.pub(Ci,!0),!1),an)])}),Wo=ht(wg,(e,t)=>{e.pub(t,[n=>n.registerUpdateListener(({editorState:r})=>{r.read(()=>{Sg(e)})}),n=>n.registerCommand(_h,r=>{var i;const o=e.getValue(Rn);return o&&!((i=o.getRootElement())!=null&&i.contains(r.relatedTarget))&&e.pubIn({[Ci]:!1,[_a]:r}),!1},an)])});function Vu(e,t,n){try{ev({root:t,visitors:e.getValue(hg),mdastExtensions:e.getValue(mg),markdown:n,syntaxExtensions:e.getValue(gg),jsxComponentDescriptors:e.getValue(_g),directiveDescriptors:e.getValue(jv),codeBlockEditorDescriptors:e.getValue($u)}),e.pub(Uo,null)}catch(r){if(r instanceof aa||r instanceof ua)e.pubIn({[tr]:n,[Uo]:{error:r.message,source:n}});else throw r}}const Tg=re([]),ur=ht(Tg),Ig=re([]),Jv=ht(Ig),Ag=re([]);ht(Ag);const Kv=re([]),Ng=ht(Kv),Zv=re(xp()),Lg=re("");ze();const Jo=ze(e=>{e.sub(e.pipe(Jo,Le($e)),([t,n])=>{n==null||n.update(()=>{const r=U();D(r)&&(sx(r,t),setTimeout(()=>{n.focus()}))})})}),Fg=ze(e=>{e.sub(e.pipe(Fg,Le($e)),([t,n])=>{n==null||n.focus(()=>{n.getEditorState().read(()=>{const r=U();D(r)&&(n.update(()=>{const i=t();i.isInline()?(Mr([i]),Ve(i.getParentOrThrow())&&Iu(i,_e).selectEnd()):mp(i),setTimeout(()=>{"select"in i&&typeof i.select=="function"&&i.select()})}),setTimeout(()=>{n.dispatchCommand(Ou,void 0)}))})},{defaultSelection:"rootEnd"})})}),ba=re("rich-text",e=>{function t(){return hh((n,r)=>({current:n.next,next:r}),{current:"rich-text",next:"rich-text"})}e.sub(e.pipe(ba,t(),Le(Ko)),([{current:n},r])=>{(n==="source"||n==="diff")&&e.pub(Du,r)}),e.sub(e.pipe(ba,t(),ki(n=>n.current==="rich-text"),Le($e)),([,n])=>{n==null||n.dispatchCommand(Ou,void 0)})}),Ko=re("",e=>{e.link(tr,Ko),e.link(Ko,Ps)}),Hu=re([]),Ms=ht(Hu),Pg=re(()=>{throw new Error("No translation function provided")}),rf=re(Ru),Gv=Kt({init(e,t){const n=(t==null?void 0:t.initialMarkdown)??"";e.register(Eg),e.register(Wo),e.register(Ps),e.pubIn({[fg]:t!=null&&t.trim?n.trim():n,[On]:t==null?void 0:t.iconComponentFor,[Ln]:[bv,_v,vv,dv,...mv],[lr]:[Rr,pn,Di],[ar]:[av,lv,cv,sv,ov],[ur]:Cv,[ca]:t==null?void 0:t.contentEditableClassName,[da]:t==null?void 0:t.spellCheck,[ga]:t==null?void 0:t.toMarkdownOptions,[nf]:t==null?void 0:t.autoFocus,[fa]:t==null?void 0:t.placeholder,[un]:t==null?void 0:t.readOnly,[Pg]:t==null?void 0:t.translation,[xa]:Zx(),[ma]:Jx(),[bg]:[m2(),Gx()],[rf]:(t==null?void 0:t.lexicalTheme)??Ru}),e.singletonSub(ha,t==null?void 0:t.onError),e.singletonSub(pa,t==null?void 0:t.onChange),e.singletonSub(_a,t==null?void 0:t.onBlur),t!=null&&t.suppressHtmlProcessing||e.pubIn({[xa]:[g2(),wv()],[ma]:[H2(),B2(),kv],[Ln]:xv})},postInit(e,t){const n=tx({editable:(t==null?void 0:t.readOnly)!==!0,namespace:"MDXEditor",nodes:e.getValue(pg),onError:r=>{throw r},theme:e.getValue(rf)});n.update(()=>{const r=(t==null?void 0:t.initialMarkdown.trim())??"";Vu(e,Ee(),r);const i=t==null?void 0:t.autoFocus;if(i){if(i===!0){setTimeout(()=>{n.focus(_r,{defaultSelection:"rootStart"})});return}setTimeout(()=>{n.focus(_r,{defaultSelection:i.defaultSelection??"rootStart"})})}}),e.pub(Rn,n),e.pub($e,n)},update(e,t){e.pubIn({[ca]:t==null?void 0:t.contentEditableClassName,[da]:t==null?void 0:t.spellCheck,[ga]:t==null?void 0:t.toMarkdownOptions,[nf]:t==null?void 0:t.autoFocus,[fa]:t==null?void 0:t.placeholder,[un]:t==null?void 0:t.readOnly}),e.singletonSub(pa,t==null?void 0:t.onChange),e.singletonSub(_a,t==null?void 0:t.onBlur),e.singletonSub(ha,t==null?void 0:t.onError)}});function gn(){return vt(Pg)}function qv(){return Ee().getTextContent()}function Yv(e,t=!0){if(e)return!1;let n=qv();return t&&(n=n.trim()),n===""}function Xv(e){if(!Yv(e,!1))return!1;const t=Ee().getChildren(),n=t.length;if(n>1)return!1;for(let r=0;r<n;r++){const i=t[r];if(ye(i))return!1;if(O(i)){if(!Tu(i)||i.__indent!==0)return!1;const o=i.getChildren(),s=o.length;for(let l=0;l<s;l++){const a=o[r];if(!z(a))return!1}}}return!0}function Mg(e){return()=>Xv(e)}function Qv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}Qv(function(e){const t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});const Rg=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?T.useLayoutEffect:T.useEffect;function eC({editor:e,ariaActiveDescendant:t,ariaAutoComplete:n,ariaControls:r,ariaDescribedBy:i,ariaErrorMessage:o,ariaExpanded:s,ariaInvalid:l,ariaLabel:a,ariaLabelledBy:u,ariaMultiline:c,ariaOwns:d,ariaRequired:h,autoCapitalize:f,className:p,id:x,role:y="textbox",spellCheck:_=!0,style:g,tabIndex:m,"data-testid":b,...k},v){const[C,E]=T.useState(e.isEditable()),I=T.useCallback(P=>{P&&P.ownerDocument&&P.ownerDocument.defaultView?e.setRootElement(P):e.setRootElement(null)},[e]),F=T.useMemo(()=>function(...P){return R=>{P.forEach(M=>{typeof M=="function"?M(R):M!=null&&(M.current=R)})}}(v,I),[I,v]);return Rg(()=>(E(e.isEditable()),e.registerEditableListener(P=>{E(P)})),[e]),L.jsx("div",{"aria-activedescendant":C?t:void 0,"aria-autocomplete":C?n:"none","aria-controls":C?r:void 0,"aria-describedby":i,...o!=null?{"aria-errormessage":o}:{},"aria-expanded":C&&y==="combobox"?!!s:void 0,...l!=null?{"aria-invalid":l}:{},"aria-label":a,"aria-labelledby":u,"aria-multiline":c,"aria-owns":C?d:void 0,"aria-readonly":!C||void 0,"aria-required":h,autoCapitalize:f,className:p,contentEditable:C,"data-testid":b,id:x,ref:F,role:C?y:void 0,spellCheck:_,style:g,tabIndex:m,...k})}const tC=T.forwardRef(eC);function of(e){return e.getEditorState().read(Mg(e.isComposing()))}const nC=T.forwardRef(rC);function rC(e,t){const{placeholder:n,...r}=e,[i]=it();return L.jsxs(L.Fragment,{children:[L.jsx(tC,{editor:i,...r,ref:t}),n!=null&&L.jsx(iC,{editor:i,content:n})]})}function iC({content:e,editor:t}){const n=function(s){const[l,a]=T.useState(()=>of(s));return Rg(()=>{function u(){const c=of(s);a(c)}return u(),ft(s.registerUpdateListener(()=>{u()}),s.registerEditableListener(()=>{u()}))},[s]),l}(t),[r,i]=T.useState(t.isEditable());if(T.useLayoutEffect(()=>(i(t.isEditable()),t.registerEditableListener(s=>{i(s)})),[t]),!n)return null;let o=null;return typeof e=="function"?o=e(r):e!==null&&(o=e),o===null?null:L.jsx("div",{"aria-hidden":!0,children:o})}function va(e,t){return va=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},va(e,t)}var sf={error:null},oC=function(e){var t,n;function r(){for(var o,s=arguments.length,l=new Array(s),a=0;a<s;a++)l[a]=arguments[a];return(o=e.call.apply(e,[this].concat(l))||this).state=sf,o.resetErrorBoundary=function(){for(var u,c=arguments.length,d=new Array(c),h=0;h<c;h++)d[h]=arguments[h];o.props.onReset==null||(u=o.props).onReset.apply(u,d),o.reset()},o}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,va(t,n),r.getDerivedStateFromError=function(o){return{error:o}};var i=r.prototype;return i.reset=function(){this.setState(sf)},i.componentDidCatch=function(o,s){var l,a;(l=(a=this.props).onError)==null||l.call(a,o,s)},i.componentDidUpdate=function(o,s){var l,a,u,c,d=this.state.error,h=this.props.resetKeys;d!==null&&s.error!==null&&((u=o.resetKeys)===void 0&&(u=[]),(c=h)===void 0&&(c=[]),u.length!==c.length||u.some(function(f,p){return!Object.is(f,c[p])}))&&((l=(a=this.props).onResetKeysChange)==null||l.call(a,o.resetKeys,h),this.reset())},i.render=function(){var o=this.state.error,s=this.props,l=s.fallbackRender,a=s.FallbackComponent,u=s.fallback;if(o!==null){var c={error:o,resetErrorBoundary:this.resetErrorBoundary};if(T.isValidElement(u))return u;if(typeof l=="function")return l(c);if(a)return T.createElement(a,c);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},r}(T.Component);function sC({children:e,onError:t}){return L.jsx(oC,{fallback:L.jsx("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:t,children:e})}const lC=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?T.useLayoutEffect:T.useEffect;function aC(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}function uC(){return function(e){const[t]=it(),n=T.useMemo(()=>e(t),[t,e]),[r,i]=T.useState(()=>n.initialValueFn()),o=T.useRef(r);return lC(()=>{const{initialValueFn:s,subscribe:l}=n,a=s();return o.current!==a&&(o.current=a,i(a)),l(u=>{o.current=u,i(u)})},[n,e]),r}(aC)}function cC(e){const t=window.location.origin,n=r=>{if(r.origin!==t)return;const i=e.getRootElement();if(document.activeElement!==i)return;const o=r.data;if(typeof o=="string"){let s;try{s=JSON.parse(o)}catch{return}if(s&&s.protocol==="nuanria_messaging"&&s.type==="request"){const l=s.payload;if(l&&l.functionId==="makeChanges"){const a=l.args;if(a){const[u,c,d,h,f,p]=a;e.update(()=>{const x=U();if(D(x)){const y=x.anchor;let _=y.getNode(),g=0,m=0;if(z(_)&&u>=0&&c>=0&&(g=u,m=u+c,x.setTextNodeRange(_,g,_,m)),g===m&&d===""||(x.insertRawText(d),_=y.getNode()),z(_)){g=h,m=h+f;const b=_.getTextContentSize();g=g>b?b:g,m=m>b?b:m,x.setTextNodeRange(_,g,_,m)}r.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}}const Ca=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?T.useLayoutEffect:T.useEffect;function lf(e){return e.getEditorState().read(Mg(e.isComposing()))}function dC({contentEditable:e,placeholder:t=null,ErrorBoundary:n}){const[r]=it(),i=function(o,s){const[l,a]=T.useState(()=>o.getDecorators());return Ca(()=>o.registerDecoratorListener(u=>{ko.flushSync(()=>{a(u)})}),[o]),T.useEffect(()=>{a(o.getDecorators())},[o]),T.useMemo(()=>{const u=[],c=Object.keys(l);for(let d=0;d<c.length;d++){const h=c[d],f=L.jsx(s,{onError:x=>o._onError(x),children:L.jsx(T.Suspense,{fallback:null,children:l[h]})}),p=o.getElementByKey(h);p!==null&&u.push(ko.createPortal(f,p,h))}return u},[s,l,o])}(r,n);return function(o){Ca(()=>ft(Bx(o),cC(o)),[o])}(r),L.jsxs(L.Fragment,{children:[e,L.jsx(fC,{content:t}),i]})}function fC({content:e}){const[t]=it(),n=function(i){const[o,s]=T.useState(()=>lf(i));return Ca(()=>{function l(){const a=lf(i);s(a)}return l(),ft(i.registerUpdateListener(()=>{l()}),i.registerEditableListener(()=>{l()}))},[i]),o}(t),r=uC();return n?typeof e=="function"?e(r):e:null}var Og={exports:{}};/*!
64
- Copyright (c) 2018 Jed Watson.
65
- Licensed under the MIT License (MIT), see
66
- http://jedwatson.github.io/classnames
67
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",s=0;s<arguments.length;s++){var l=arguments[s];l&&(o=i(o,r(l)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var s="";for(var l in o)t.call(o,l)&&o[l]&&(s=i(s,l));return s}function i(o,s){return s?o?o+" "+s:o+s:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Og);var hC=Og.exports;const be=Kf(hC),pC="_editorRoot_uazmk_53",gC="_editorWrapper_uazmk_154",mC="_toolbarRoot_uazmk_160",xC="_readOnlyToolbarRoot_uazmk_187",yC="_toolbarToggleItem_uazmk_206",_C="_toolbarGroupOfGroups_uazmk_217",bC="_toolbarToggleSingleGroup_uazmk_222",vC="_toolbarButton_uazmk_237",CC="_selectContainer_uazmk_287",wC="_selectItem_uazmk_300",kC="_selectTrigger_uazmk_307",SC="_selectDropdownArrow_uazmk_373",EC="_contentEditable_uazmk_379",TC="_iconButton_uazmk_456",IC="_primaryButton_uazmk_506",AC="_secondaryButton_uazmk_507",NC="_linkDialogEditForm_uazmk_540",LC="_linkDialogAnchor_uazmk_586",FC="_linkDialogPopoverContent_uazmk_600",PC="_dialogContent_uazmk_602",MC="_popoverArrow_uazmk_649",RC="_linkDialogPreviewAnchor_uazmk_653",OC="_tooltipTrigger_uazmk_676",$C="_tooltipContent_uazmk_680",DC="_actionButton_uazmk_694",VC="_dialogOverlay_uazmk_871",HC="_focusedImage_uazmk_918",BC="_imageWrapper_uazmk_922",zC="_editImageToolbar_uazmk_935",jC="_editImageButton_uazmk_939",UC="_imageControlWrapperResizing_uazmk_1023",WC="_imageResizer_uazmk_1027",JC="_imageResizerN_uazmk_1036",KC="_imageResizerNe_uazmk_1042",ZC="_imageResizerE_uazmk_1048",GC="_imageResizerSe_uazmk_1054",qC="_imageResizerS_uazmk_1054",YC="_imageResizerSw_uazmk_1066",XC="_imageResizerW_uazmk_1072",QC="_imageResizerNw_uazmk_1078",e9="_placeholder_uazmk_1084",t9="_rootContentEditableWrapper_uazmk_1097",n9="_downshiftInputWrapper_uazmk_1109",r9="_downshiftInput_uazmk_1109",i9="_downshiftAutocompleteContainer_uazmk_1140",o9="_textInput_uazmk_1186",s9="_multiFieldForm_uazmk_1194",l9="_formField_uazmk_1200",a9="_popupContainer_uazmk_1220",G={editorRoot:pC,editorWrapper:gC,toolbarRoot:mC,readOnlyToolbarRoot:xC,toolbarToggleItem:yC,toolbarGroupOfGroups:_C,toolbarToggleSingleGroup:bC,toolbarButton:vC,selectContainer:CC,selectItem:wC,selectTrigger:kC,selectDropdownArrow:SC,contentEditable:EC,iconButton:TC,primaryButton:IC,secondaryButton:AC,linkDialogEditForm:NC,linkDialogAnchor:LC,linkDialogPopoverContent:FC,dialogContent:PC,popoverArrow:MC,linkDialogPreviewAnchor:RC,tooltipTrigger:OC,tooltipContent:$C,actionButton:DC,dialogOverlay:VC,focusedImage:HC,imageWrapper:BC,editImageToolbar:zC,editImageButton:jC,imageControlWrapperResizing:UC,imageResizer:WC,imageResizerN:JC,imageResizerNe:KC,imageResizerE:ZC,imageResizerSe:GC,imageResizerS:qC,imageResizerSw:YC,imageResizerW:XC,imageResizerNw:QC,placeholder:e9,rootContentEditableWrapper:t9,downshiftInputWrapper:n9,downshiftInput:r9,downshiftAutocompleteContainer:i9,textInput:o9,multiFieldForm:s9,formField:l9,popupContainer:a9},u9={undo:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M7.202 18.5V17H14.3788C15.4224 17 16.3205 16.6554 17.073 15.9663C17.8257 15.2773 18.202 14.4263 18.202 13.4135C18.202 12.4007 17.8257 11.5512 17.073 10.8652C16.3205 10.1794 15.4224 9.8365 14.3788 9.8365H7.35775L10.1402 12.6193L9.0865 13.673L4.5 9.0865L9.0865 4.5L10.1402 5.55375L7.35775 8.3365H14.3788C15.8416 8.3365 17.0945 8.82467 18.1375 9.801C19.1805 10.7773 19.702 11.9815 19.702 13.4135C19.702 14.8455 19.1805 16.0513 18.1375 17.0308C17.0945 18.0103 15.8416 18.5 14.3788 18.5H7.202Z",fill:"currentColor"})),redo:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M9.6211 18.5C8.15827 18.5 6.90535 18.0103 5.86235 17.0308C4.81935 16.0513 4.29785 14.8455 4.29785 13.4135C4.29785 11.9815 4.81935 10.7773 5.86235 9.801C6.90535 8.82467 8.15827 8.3365 9.6211 8.3365H16.6421L13.8596 5.55375L14.9134 4.5L19.4999 9.0865L14.9134 13.673L13.8596 12.6193L16.6421 9.8365H9.6211C8.57744 9.8365 7.67935 10.1794 6.92685 10.8652C6.17418 11.5512 5.79785 12.4007 5.79785 13.4135C5.79785 14.4263 6.17418 15.2773 6.92685 15.9663C7.67935 16.6554 8.57744 17 9.6211 17H16.7979V18.5H9.6211Z",fill:"currentColor"})),format_bold:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M7.33838 18.625V5.375H12.1999C13.219 5.375 14.1405 5.69233 14.9644 6.327C15.788 6.9615 16.1999 7.816 16.1999 8.8905C16.1999 9.63783 16.0194 10.2471 15.6584 10.7182C15.2975 11.1894 14.9088 11.5314 14.4921 11.7442C15.005 11.9211 15.4947 12.2708 15.9614 12.7933C16.428 13.3158 16.6614 14.0193 16.6614 14.9038C16.6614 16.1819 16.1902 17.1217 15.2479 17.723C14.3055 18.3243 13.3562 18.625 12.3999 18.625H7.33838ZM9.48838 16.6328H12.3191C13.1063 16.6328 13.6627 16.4142 13.9884 15.977C14.314 15.5398 14.4769 15.1206 14.4769 14.7192C14.4769 14.3179 14.314 13.8987 13.9884 13.4615C13.6627 13.0243 13.0909 12.8058 12.2729 12.8058H9.48838V16.6328ZM9.48838 10.875H12.0826C12.6903 10.875 13.172 10.7013 13.5279 10.3538C13.8835 10.0064 14.0614 9.59042 14.0614 9.10575C14.0614 8.59042 13.8733 8.16925 13.4971 7.84225C13.1208 7.51542 12.6595 7.352 12.1134 7.352H9.48838V10.875Z",fill:"currentColor"})),format_italic:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M5.39404 18.625V16.8173H9.21129L12.4518 7.18275H8.63454V5.375H17.7883V7.18275H14.2785L11.0383 16.8173H14.5478V18.625H5.39404Z",fill:"currentColor"})),format_underlined:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M5.34619 22.125V20.625H18.6537V22.125H5.34619ZM11.9999 18.5287C10.4448 18.5287 9.23102 18.0566 8.35869 17.1125C7.48619 16.1683 7.04994 14.9032 7.04994 13.3172V5.41345H8.90369V13.4095C8.90369 14.4198 9.17228 15.2295 9.70944 15.8385C10.2466 16.4475 11.0101 16.752 11.9999 16.752C12.9898 16.752 13.7533 16.4475 14.2904 15.8385C14.8276 15.2295 15.0962 14.4198 15.0962 13.4095V5.41345H16.9499V13.3172C16.9499 14.9032 16.5137 16.1683 15.6412 17.1125C14.7689 18.0566 13.5551 18.5287 11.9999 18.5287Z",fill:"currentColor"})),code:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M7.99994 17.6537L2.34619 11.9999L7.99994 6.34619L9.06919 7.41544L4.46919 12.0154L9.05369 16.5999L7.99994 17.6537ZM15.9999 17.6537L14.9307 16.5844L19.5307 11.9844L14.9462 7.39994L15.9999 6.34619L21.6537 11.9999L15.9999 17.6537Z",fill:"currentColor"})),strikeThrough:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M12.15 19.6923C10.9732 19.6923 9.9315 19.359 9.025 18.6923C8.11867 18.0256 7.45525 17.1128 7.03475 15.9538L8.6385 15.2635C8.91667 16.0444 9.3545 16.6867 9.952 17.1905C10.5493 17.6944 11.2923 17.9463 12.1808 17.9463C12.9578 17.9463 13.6744 17.7508 14.3307 17.3598C14.9872 16.9686 15.3155 16.3487 15.3155 15.5C15.3155 15.123 15.2555 14.7968 15.1355 14.5213C15.0157 14.2456 14.8462 13.9885 14.627 13.75H16.677C16.7987 13.9705 16.8932 14.2256 16.9605 14.5153C17.0278 14.8051 17.0615 15.1334 17.0615 15.5C17.0615 16.8372 16.5747 17.8702 15.601 18.599C14.6272 19.3279 13.4768 19.6923 12.15 19.6923ZM2.25 11.75V10.25H21.75V11.75H2.25ZM12.05 4.19629C13.0475 4.19629 13.9123 4.42704 14.6443 4.88854C15.3763 5.35004 15.9673 6.05896 16.4173 7.01529L14.823 7.73079C14.6218 7.26029 14.2978 6.84462 13.851 6.48379C13.4042 6.12279 12.8141 5.94229 12.0808 5.94229C11.2244 5.94229 10.5392 6.16221 10.025 6.60204C9.51083 7.04171 9.264 7.59104 9.2845 8.25004H7.5385C7.50133 7.16421 7.89783 6.21712 8.728 5.40879C9.558 4.60046 10.6653 4.19629 12.05 4.19629Z",fill:"currentColor"})),superscript:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M16.6924 8V6.2115C16.6924 5.95383 16.7786 5.73875 16.9511 5.56625C17.1235 5.39392 17.3385 5.30775 17.5961 5.30775H19.5001V4.38475H16.6924V3.5H19.4809C19.7385 3.5 19.9536 3.58625 20.1261 3.75875C20.2985 3.93108 20.3846 4.14617 20.3846 4.404V5.2885C20.3846 5.54617 20.2985 5.76125 20.1261 5.93375C19.9536 6.10608 19.7385 6.19225 19.4809 6.19225H17.5771V7.1155H20.3846V8H16.6924ZM4.44238 18.5L8.84638 11.6287L4.77713 5.30775H6.74438L9.95963 10.404H10.0214L13.2501 5.30775H15.2329L11.1194 11.6287L15.5579 18.5H13.5751L10.0214 12.9308H9.95963L6.42513 18.5H4.44238Z",fill:"currentColor"})),subscript:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M16.6924 20.5V18.7115C16.6924 18.4538 16.7786 18.2387 16.9511 18.0662C17.1235 17.8939 17.3385 17.8077 17.5961 17.8077H19.5001V16.8845H16.6924V16H19.4809C19.7385 16 19.9536 16.0863 20.1261 16.2587C20.2985 16.4311 20.3846 16.6461 20.3846 16.9038V17.7885C20.3846 18.0462 20.2985 18.2612 20.1261 18.4337C19.9536 18.6061 19.7385 18.6923 19.4809 18.6923H17.5771V19.6152H20.3846V20.5H16.6924ZM4.44238 18.6923L8.84638 11.8212L4.77713 5.5H6.74438L9.95963 10.5962H10.0214L13.2501 5.5H15.2329L11.1194 11.8212L15.5579 18.6923H13.5751L10.0214 13.123H9.95963L6.42513 18.6923H4.44238Z",fill:"currentColor"})),format_list_bulleted:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M9.30775 18.75V17.25H20.5V18.75H9.30775ZM9.30775 12.75V11.25H20.5V12.75H9.30775ZM9.30775 6.75005V5.25005H20.5V6.75005H9.30775ZM5.1635 19.6635C4.706 19.6635 4.31442 19.5006 3.98875 19.1748C3.66292 18.8491 3.5 18.4575 3.5 18C3.5 17.5425 3.66292 17.151 3.98875 16.8253C4.31442 16.4995 4.706 16.3365 5.1635 16.3365C5.621 16.3365 6.01258 16.4995 6.33825 16.8253C6.66408 17.151 6.827 17.5425 6.827 18C6.827 18.4575 6.66408 18.8491 6.33825 19.1748C6.01258 19.5006 5.621 19.6635 5.1635 19.6635ZM5.1635 13.6635C4.706 13.6635 4.31442 13.5006 3.98875 13.1748C3.66292 12.8491 3.5 12.4575 3.5 12C3.5 11.5425 3.66292 11.151 3.98875 10.8253C4.31442 10.4995 4.706 10.3365 5.1635 10.3365C5.621 10.3365 6.01258 10.4995 6.33825 10.8253C6.66408 11.151 6.827 11.5425 6.827 12C6.827 12.4575 6.66408 12.8491 6.33825 13.1748C6.01258 13.5006 5.621 13.6635 5.1635 13.6635ZM5.1635 7.66355C4.706 7.66355 4.31442 7.50063 3.98875 7.1748C3.66292 6.84913 3.5 6.45755 3.5 6.00005C3.5 5.54255 3.66292 5.15096 3.98875 4.8253C4.31442 4.49946 4.706 4.33655 5.1635 4.33655C5.621 4.33655 6.01258 4.49946 6.33825 4.8253C6.66408 5.15096 6.827 5.54255 6.827 6.00005C6.827 6.45755 6.66408 6.84913 6.33825 7.1748C6.01258 7.50063 5.621 7.66355 5.1635 7.66355Z",fill:"currentColor"})),format_list_numbered:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M3.5 21.5V20.3078H6V19.25H4.5V18.0577H6V17H3.5V15.8077H6.34625C6.58592 15.8077 6.78683 15.8888 6.949 16.051C7.11117 16.2132 7.19225 16.4141 7.19225 16.6538V17.8462C7.19225 18.0859 7.11117 18.2868 6.949 18.449C6.78683 18.6112 6.58592 18.6923 6.34625 18.6923C6.58592 18.6923 6.78683 18.7733 6.949 18.9355C7.11117 19.0977 7.19225 19.2987 7.19225 19.5385V20.6538C7.19225 20.8936 7.11117 21.0946 6.949 21.2568C6.78683 21.4189 6.58592 21.5 6.34625 21.5H3.5ZM3.5 14.8463V12.25C3.5 12.0103 3.58108 11.8093 3.74325 11.647C3.90542 11.4848 4.10642 11.4038 4.34625 11.4038H6V10.3462H3.5V9.15375H6.34625C6.58592 9.15375 6.78683 9.23483 6.949 9.397C7.11117 9.55933 7.19225 9.76033 7.19225 10V11.75C7.19225 11.9897 7.11117 12.1907 6.949 12.353C6.78683 12.5152 6.58592 12.5963 6.34625 12.5963H4.69225V13.6538H7.19225V14.8463H3.5ZM5 8.19225V3.69225H3.5V2.5H6.19225V8.19225H5ZM9.30775 18.75V17.25H20.5V18.75H9.30775ZM9.30775 12.75V11.25H20.5V12.75H9.30775ZM9.30775 6.75V5.25H20.5V6.75H9.30775Z",fill:"currentColor"})),format_list_checked:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M5.69425 18.452L2.5 15.2578L3.54425 14.2135L5.66925 16.3385L9.91925 12.0885L10.9635 13.1578L5.69425 18.452ZM5.69425 10.8365L2.5 7.64227L3.54425 6.59802L5.66925 8.72302L9.91925 4.47302L10.9635 5.54227L5.69425 10.8365ZM13.0095 16.5578V15.0578H21.5095V16.5578H13.0095ZM13.0095 8.94227V7.44227H21.5095V8.94227H13.0095Z",fill:"currentColor"})),link:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M10.8077 16.5385H7.0385C5.78283 16.5385 4.7125 16.096 3.8275 15.211C2.9425 14.3262 2.5 13.256 2.5 12.0005C2.5 10.745 2.9425 9.67471 3.8275 8.78955C4.7125 7.90421 5.78283 7.46155 7.0385 7.46155H10.8077V8.96155H7.0385C6.19867 8.96155 5.48233 9.25805 4.8895 9.85105C4.2965 10.444 4 11.1604 4 12C4 12.8397 4.2965 13.556 4.8895 14.149C5.48233 14.742 6.19867 15.0385 7.0385 15.0385H10.8077V16.5385ZM8.25 12.75V11.25H15.75V12.75H8.25ZM13.1923 16.5385V15.0385H16.9615C17.8013 15.0385 18.5177 14.742 19.1105 14.149C19.7035 13.556 20 12.8397 20 12C20 11.1604 19.7035 10.444 19.1105 9.85105C18.5177 9.25805 17.8013 8.96155 16.9615 8.96155H13.1923V7.46155H16.9615C18.2172 7.46155 19.2875 7.90405 20.1725 8.78905C21.0575 9.67388 21.5 10.744 21.5 11.9995C21.5 13.255 21.0575 14.3254 20.1725 15.2105C19.2875 16.0959 18.2172 16.5385 16.9615 16.5385H13.1923Z",fill:"currentColor"})),add_photo:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M5.11537 20.5C4.6182 20.5 4.19262 20.323 3.83862 19.969C3.48462 19.615 3.30762 19.1894 3.30762 18.6922V5.30773C3.30762 4.81056 3.48462 4.38498 3.83862 4.03098C4.19262 3.67698 4.6182 3.49998 5.11537 3.49998H13.8076V4.99998H5.11537C5.02553 4.99998 4.95178 5.02881 4.89412 5.08648C4.83645 5.14415 4.80762 5.2179 4.80762 5.30773V18.6922C4.80762 18.7821 4.83645 18.8558 4.89412 18.9135C4.95178 18.9711 5.02553 19 5.11537 19H18.4999C18.5895 19 18.6633 18.9711 18.7211 18.9135C18.7788 18.8558 18.8076 18.7821 18.8076 18.6922V9.99998H20.3076V18.6922C20.3076 19.1894 20.1306 19.615 19.7766 19.969C19.4226 20.323 18.997 20.5 18.4999 20.5H5.11537ZM17.1921 8.61523V6.61523H15.1921V5.11548H17.1921V3.11548H18.6921V5.11548H20.6921V6.61523H18.6921V8.61523H17.1921ZM6.55762 16.75H17.1344L13.8459 12.3655L11.0384 16.0192L9.03837 13.4615L6.55762 16.75Z",fill:"currentColor"})),table:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M3.5 18.6923V5.30775C3.5 4.81058 3.677 4.385 4.031 4.031C4.385 3.677 4.81058 3.5 5.30775 3.5H18.6923C19.1894 3.5 19.615 3.677 19.969 4.031C20.323 4.385 20.5 4.81058 20.5 5.30775V18.6923C20.5 19.1894 20.323 19.615 19.969 19.969C19.615 20.323 19.1894 20.5 18.6923 20.5H5.30775C4.81058 20.5 4.385 20.323 4.031 19.969C3.677 19.615 3.5 19.1894 3.5 18.6923ZM5 9.077H19V5.30775C19 5.21792 18.9712 5.14417 18.9135 5.0865C18.8558 5.02883 18.7821 5 18.6923 5H5.30775C5.21792 5 5.14417 5.02883 5.0865 5.0865C5.02883 5.14417 5 5.21792 5 5.30775V9.077ZM10.1615 14.0385H13.8385V10.577H10.1615V14.0385ZM10.1615 19H13.8385V15.5385H10.1615V19ZM5 14.0385H8.6615V10.577H5V14.0385ZM15.3385 14.0385H19V10.577H15.3385V14.0385ZM5.30775 19H8.6615V15.5385H5V18.6923C5 18.7821 5.02883 18.8558 5.0865 18.9135C5.14417 18.9712 5.21792 19 5.30775 19ZM15.3385 19H18.6923C18.7821 19 18.8558 18.9712 18.9135 18.9135C18.9712 18.8558 19 18.7821 19 18.6923V15.5385H15.3385V19Z",fill:"currentColor"})),horizontal_rule:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M4.5 12.75V11.25H19.5V12.75H4.5Z",fill:"currentColor"})),frontmatter:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M4.5 8.75V7.25H8.5V8.75H4.5Z",fill:"currentColor"}),w.createElement("path",{d:"M4.5 14.75V13.25H8.5V14.75H4.5Z",fill:"currentColor"}),w.createElement("path",{d:"M9.5 8.75V7.25H13.5V8.75H9.5Z",fill:"currentColor"}),w.createElement("path",{d:"M9.5 14.75V13.25H13.5V14.75H9.5Z",fill:"currentColor"}),w.createElement("path",{d:"M14.5 8.75V7.25H18.5V8.75H14.5Z",fill:"currentColor"}),w.createElement("path",{d:"M14.5 14.75V13.25H18.5V14.75H14.5Z",fill:"currentColor"})),frame_source:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M8.6 15.2443L5.35575 12L8.6 8.75575L9.64425 9.825L7.46925 12L9.64425 14.175L8.6 15.2443ZM15.4 15.2443L14.3558 14.175L16.5307 12L14.3558 9.825L15.4 8.75575L18.6443 12L15.4 15.2443ZM5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V15H5V18.6923C5 18.7692 5.03208 18.8398 5.09625 18.9038C5.16025 18.9679 5.23075 19 5.30775 19H9V20.5H5.30775ZM15 20.5V19H18.6923C18.7692 19 18.8398 18.9679 18.9038 18.9038C18.9679 18.8398 19 18.7692 19 18.6923V15H20.5V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H15ZM3.5 9V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H9V5H5.30775C5.23075 5 5.16025 5.03208 5.09625 5.09625C5.03208 5.16025 5 5.23075 5 5.30775V9H3.5ZM19 9V5.30775C19 5.23075 18.9679 5.16025 18.9038 5.09625C18.8398 5.03208 18.7692 5 18.6923 5H15V3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V9H19Z",fill:"currentColor"})),arrow_drop_down:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M11.9999 14.6537L7.59619 10.25H16.4037L11.9999 14.6537Z",fill:"currentColor"})),admonition:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M12.0001 21.4C11.7654 21.4 11.5385 21.3548 11.3193 21.2645C11.1002 21.174 10.9002 21.0435 10.7193 20.873L3.1271 13.2807C2.9566 13.0999 2.8261 12.8999 2.7356 12.6807C2.64526 12.4616 2.6001 12.2346 2.6001 12C2.6001 11.7653 2.64526 11.5358 2.7356 11.3115C2.8261 11.0871 2.9566 10.8897 3.1271 10.7192L10.7193 3.12698C10.9002 2.94614 11.1002 2.81314 11.3193 2.72798C11.5385 2.64264 11.7654 2.59998 12.0001 2.59998C12.2348 2.59998 12.4643 2.64264 12.6886 2.72798C12.9129 2.81314 13.1103 2.94614 13.2808 3.12698L20.8731 10.7192C21.0539 10.8897 21.1869 11.0871 21.2721 11.3115C21.3574 11.5358 21.4001 11.7653 21.4001 12C21.4001 12.2346 21.3574 12.4616 21.2721 12.6807C21.1869 12.8999 21.0539 13.0999 20.8731 13.2807L13.2808 20.873C13.1103 21.0435 12.9129 21.174 12.6886 21.2645C12.4643 21.3548 12.2348 21.4 12.0001 21.4ZM12.2213 19.8037L19.8039 12.2212C19.8552 12.1699 19.8808 12.0961 19.8808 12C19.8808 11.9038 19.8552 11.8301 19.8039 11.7787L12.2213 4.19623C12.17 4.14489 12.0963 4.11923 12.0001 4.11923C11.9039 4.11923 11.8302 4.14489 11.7788 4.19623L4.19635 11.7787C4.14501 11.8301 4.11935 11.9038 4.11935 12C4.11935 12.0961 4.14501 12.1699 4.19635 12.2212L11.7788 19.8037C11.8302 19.8551 11.9039 19.8807 12.0001 19.8807C12.0963 19.8807 12.17 19.8551 12.2213 19.8037ZM11.2501 13.0865H12.7501V7.47123H11.2501V13.0865ZM12.0001 15.702C12.2258 15.702 12.4168 15.6237 12.5731 15.4672C12.7296 15.3109 12.8078 15.1199 12.8078 14.8942C12.8078 14.6686 12.7296 14.4776 12.5731 14.3212C12.4168 14.1647 12.2258 14.0865 12.0001 14.0865C11.7744 14.0865 11.5834 14.1647 11.4271 14.3212C11.2706 14.4776 11.1923 14.6686 11.1923 14.8942C11.1923 15.1199 11.2706 15.3109 11.4271 15.4672C11.5834 15.6237 11.7744 15.702 12.0001 15.702Z",fill:"currentColor"})),sandpack:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M12.9999 22.5C12.4947 22.5 12.0671 22.325 11.7171 21.975C11.3671 21.625 11.1921 21.1974 11.1921 20.6922V7.30775C11.1921 6.80258 11.3671 6.375 11.7171 6.025C12.0671 5.675 12.4947 5.5 12.9999 5.5H16.3844C16.8895 5.5 17.3171 5.675 17.6671 6.025C18.0171 6.375 18.1921 6.80258 18.1921 7.30775V20.6922C18.1921 21.1974 18.0171 21.625 17.6671 21.975C17.3171 22.325 16.8895 22.5 16.3844 22.5H12.9999ZM12.6921 7.30775V20.6922C12.6921 20.7692 12.7242 20.8398 12.7884 20.9038C12.8524 20.9679 12.9229 21 12.9999 21H16.3844C16.4614 21 16.5319 20.9679 16.5959 20.9038C16.66 20.8398 16.6921 20.7692 16.6921 20.6922V7.30775C16.6921 7.23075 16.66 7.16025 16.5959 7.09625C16.5319 7.03208 16.4614 7 16.3844 7H12.9999C12.9229 7 12.8524 7.03208 12.7884 7.09625C12.7242 7.16025 12.6921 7.23075 12.6921 7.30775ZM6.61537 18.5C6.1102 18.5 5.68262 18.325 5.33262 17.975C4.98262 17.625 4.80762 17.1974 4.80762 16.6923V3.30775C4.80762 2.80258 4.98262 2.375 5.33262 2.025C5.68262 1.675 6.1102 1.5 6.61537 1.5H9.99987C10.505 1.5 10.9326 1.675 11.2826 2.025C11.6326 2.375 11.8076 2.80258 11.8076 3.30775V16.6923C11.8076 17.1974 11.6326 17.625 11.2826 17.975C10.9326 18.325 10.505 18.5 9.99987 18.5H6.61537ZM6.30762 3.30775V16.6923C6.30762 16.7692 6.3397 16.8398 6.40387 16.9038C6.46787 16.9679 6.53837 17 6.61537 17H9.99987C10.0769 17 10.1474 16.9679 10.2114 16.9038C10.2755 16.8398 10.3076 16.7692 10.3076 16.6923V3.30775C10.3076 3.23075 10.2755 3.16025 10.2114 3.09625C10.1474 3.03208 10.0769 3 9.99987 3H6.61537C6.53837 3 6.46787 3.03208 6.40387 3.09625C6.3397 3.16025 6.30762 3.23075 6.30762 3.30775Z",fill:"currentColor"})),rich_text:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM5.30775 19H18.6923C18.7692 19 18.8398 18.9679 18.9038 18.9038C18.9679 18.8398 19 18.7692 19 18.6923V5.30775C19 5.23075 18.9679 5.16025 18.9038 5.09625C18.8398 5.03208 18.7692 5 18.6923 5H5.30775C5.23075 5 5.16025 5.03208 5.09625 5.09625C5.03208 5.16025 5 5.23075 5 5.30775V18.6923C5 18.7692 5.03208 18.8398 5.09625 18.9038C5.16025 18.9679 5.23075 19 5.30775 19ZM6.75 17H17.3268L14 12.3655L11.2308 16.0192L9 13.4615L6.75 17Z",fill:"currentColor"}),w.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 12V6.5H9.1925C9.5925 6.5 9.9425 6.65 10.2425 6.95C10.5425 7.25 10.6925 7.6 10.6925 8V8.6925C10.6925 9.03733 10.605 9.32675 10.43 9.56075C10.255 9.79458 10.0168 9.97817 9.7155 10.1115L10.6155 12H9.404L8.504 10.1925H7.1925V12H6ZM9.1925 9H7.1925V7.6925H9.1925C9.26933 7.6925 9.33983 7.7245 9.404 7.7885C9.468 7.85267 9.5 7.92317 9.5 8V8.6925C9.5 8.76933 9.468 8.83983 9.404 8.904C9.33983 8.968 9.26933 9 9.1925 9Z",fill:"currentColor"}),w.createElement("path",{d:"M12.5 7H17.5V8.25H12.5V7Z",fill:"currentColor"}),w.createElement("path",{d:"M12.5 9.25H17.5V10.5H12.5V9.25Z",fill:"currentColor"})),difference:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM18.6923 19H5.30775C5.23075 19 5.16025 18.9679 5.09625 18.9038C5.03208 18.8398 5 18.7692 5 18.6923V5.30775C5 5.23075 5.03208 5.16025 5.09625 5.09625C5.16025 5.03208 5.23075 5 5.30775 5H18.6923C18.7692 5 18.8398 5.03208 18.9038 5.09625C18.9679 5.16025 19 5.23075 19 5.30775V18.6923C19 18.7692 18.9679 18.8398 18.9038 18.9038C18.8398 18.9679 18.7692 19 18.6923 19Z",fill:"currentColor"}),w.createElement("rect",{x:"9",y:"10",width:"5.5",height:"1.5",fill:"currentColor"}),w.createElement("rect",{x:"9",y:"15",width:"5.5",height:"1.5",fill:"currentColor"}),w.createElement("rect",{x:"11",y:"8",width:"1.5",height:"5.5",fill:"currentColor"})),markdown:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM18.6923 19H5.30775C5.23075 19 5.16025 18.9679 5.09625 18.9038C5.03208 18.8398 5 18.7692 5 18.6923V5.30775C5 5.23075 5.03208 5.16025 5.09625 5.09625C5.16025 5.03208 5.23075 5 5.30775 5H18.6923C18.7692 5 18.8398 5.03208 18.9038 5.09625C18.9679 5.16025 19 5.23075 19 5.30775V18.6923C19 18.7692 18.9679 18.8398 18.9038 18.9038C18.8398 18.9679 18.7692 19 18.6923 19Z",fill:"currentColor"}),w.createElement("path",{d:"M13 15H11.5V11L9.5 14L7.5 11V15H6V8H7.5L9.5 11L11.5 8H13V15Z",fill:"currentColor"}),w.createElement("path",{d:"M15.9921 15.5833L13.2886 12.8797L14.0546 12.1137L15.4504 13.5016V7.99597L16.5336 7.99993V13.5016L17.9296 12.1137L18.6954 12.8797L15.9921 15.5833Z",fill:"currentColor"})),open_in_new:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H11.6152V5H5.30775C5.23075 5 5.16025 5.03208 5.09625 5.09625C5.03208 5.16025 5 5.23075 5 5.30775V18.6923C5 18.7692 5.03208 18.8398 5.09625 18.9038C5.16025 18.9679 5.23075 19 5.30775 19H18.6923C18.7692 19 18.8398 18.9679 18.9038 18.9038C18.9679 18.8398 19 18.7692 19 18.6923V12.3848H20.5V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM9.71925 15.3345L8.6655 14.2808L17.9462 5H14V3.5H20.5V10H19V6.05375L9.71925 15.3345Z",fill:"currentColor"})),link_off:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M18.8843 16.1038L17.7498 14.9385C18.4228 14.7552 18.9661 14.3946 19.3796 13.8568C19.7931 13.319 19.9998 12.7 19.9998 12C19.9998 11.1604 19.705 10.444 19.1153 9.85105C18.5255 9.25805 17.8139 8.96155 16.9806 8.96155H13.1728V7.46155H16.9806C18.2293 7.46155 19.2947 7.90422 20.1768 8.78955C21.0588 9.67472 21.4998 10.7449 21.4998 12C21.4998 12.8859 21.262 13.6951 20.7863 14.4278C20.3107 15.1606 19.6767 15.7193 18.8843 16.1038ZM15.5806 12.75L14.0806 11.25H15.7306V12.75H15.5806ZM20.1461 22.2538L1.74609 3.8538L2.79984 2.80005L21.1998 21.2L20.1461 22.2538ZM10.8268 16.5386H7.03834C5.78318 16.5386 4.71301 16.0959 3.82784 15.2105C2.94251 14.3254 2.49984 13.2552 2.49984 12C2.49984 10.8885 2.85784 9.91322 3.57384 9.07405C4.28984 8.23505 5.18826 7.72838 6.26909 7.55405H6.49984L7.90759 8.96155H7.03834C6.19851 8.96155 5.48218 9.25805 4.88934 9.85105C4.29634 10.444 3.99984 11.1604 3.99984 12C3.99984 12.8397 4.29634 13.556 4.88934 14.149C5.48218 14.742 6.19851 15.0385 7.03834 15.0385H10.8268V16.5386ZM8.26909 12.75V11.25H10.2113L11.6863 12.75H8.26909Z",fill:"currentColor"})),edit:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M5 19H6.2615L16.498 8.7635L15.2365 7.502L5 17.7385V19ZM3.5 20.5V17.1155L16.6905 3.93075C16.8417 3.79342 17.0086 3.68733 17.1913 3.6125C17.3741 3.5375 17.5658 3.5 17.7663 3.5C17.9668 3.5 18.1609 3.53558 18.3488 3.60675C18.5367 3.67792 18.7032 3.79108 18.848 3.94625L20.0693 5.18275C20.2244 5.32758 20.335 5.49425 20.401 5.68275C20.467 5.87125 20.5 6.05975 20.5 6.24825C20.5 6.44942 20.4657 6.64133 20.397 6.824C20.3283 7.00683 20.2191 7.17383 20.0693 7.325L6.8845 20.5H3.5ZM15.8562 8.14375L15.2365 7.502L16.498 8.7635L15.8562 8.14375Z",fill:"currentColor"})),content_copy:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M9.05775 17.5C8.55258 17.5 8.125 17.325 7.775 16.975C7.425 16.625 7.25 16.1974 7.25 15.6923V4.30775C7.25 3.80258 7.425 3.375 7.775 3.025C8.125 2.675 8.55258 2.5 9.05775 2.5H17.4423C17.9474 2.5 18.375 2.675 18.725 3.025C19.075 3.375 19.25 3.80258 19.25 4.30775V15.6923C19.25 16.1974 19.075 16.625 18.725 16.975C18.375 17.325 17.9474 17.5 17.4423 17.5H9.05775ZM9.05775 16H17.4423C17.5192 16 17.5898 15.9679 17.6538 15.9038C17.7179 15.8398 17.75 15.7692 17.75 15.6923V4.30775C17.75 4.23075 17.7179 4.16025 17.6538 4.09625C17.5898 4.03208 17.5192 4 17.4423 4H9.05775C8.98075 4 8.91025 4.03208 8.84625 4.09625C8.78208 4.16025 8.75 4.23075 8.75 4.30775V15.6923C8.75 15.7692 8.78208 15.8398 8.84625 15.9038C8.91025 15.9679 8.98075 16 9.05775 16ZM5.55775 21C5.05258 21 4.625 20.825 4.275 20.475C3.925 20.125 3.75 19.6974 3.75 19.1923V6.30775H5.25V19.1923C5.25 19.2693 5.28208 19.3398 5.34625 19.4038C5.41025 19.4679 5.48075 19.5 5.55775 19.5H15.4423V21H5.55775Z",fill:"currentColor"})),more_horiz:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M6.23096 13.5C5.81846 13.5 5.46537 13.3531 5.17171 13.0592C4.87787 12.7656 4.73096 12.4125 4.73096 12C4.73096 11.5875 4.87787 11.2344 5.17171 10.9408C5.46537 10.6469 5.81846 10.5 6.23096 10.5C6.64346 10.5 6.99662 10.6469 7.29046 10.9408C7.58412 11.2344 7.73096 11.5875 7.73096 12C7.73096 12.4125 7.58412 12.7656 7.29046 13.0592C6.99662 13.3531 6.64346 13.5 6.23096 13.5ZM12.0002 13.5C11.5877 13.5 11.2346 13.3531 10.941 13.0592C10.6471 12.7656 10.5002 12.4125 10.5002 12C10.5002 11.5875 10.6471 11.2344 10.941 10.9408C11.2346 10.6469 11.5877 10.5 12.0002 10.5C12.4127 10.5 12.7658 10.6469 13.0595 10.9408C13.3533 11.2344 13.5002 11.5875 13.5002 12C13.5002 12.4125 13.3533 12.7656 13.0595 13.0592C12.7658 13.3531 12.4127 13.5 12.0002 13.5ZM17.7695 13.5C17.357 13.5 17.0038 13.3531 16.71 13.0592C16.4163 12.7656 16.2695 12.4125 16.2695 12C16.2695 11.5875 16.4163 11.2344 16.71 10.9408C17.0038 10.6469 17.357 10.5 17.7695 10.5C18.182 10.5 18.535 10.6469 18.8287 10.9408C19.1225 11.2344 19.2695 11.5875 19.2695 12C19.2695 12.4125 19.1225 12.7656 18.8287 13.0592C18.535 13.3531 18.182 13.5 17.7695 13.5Z",fill:"currentColor"})),more_vert:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M12 19.2692C11.5875 19.2692 11.2344 19.1223 10.9408 18.8285C10.6469 18.5348 10.5 18.1817 10.5 17.7692C10.5 17.3567 10.6469 17.0035 10.9408 16.7097C11.2344 16.416 11.5875 16.2692 12 16.2692C12.4125 16.2692 12.7656 16.416 13.0592 16.7097C13.3531 17.0035 13.5 17.3567 13.5 17.7692C13.5 18.1817 13.3531 18.5348 13.0592 18.8285C12.7656 19.1223 12.4125 19.2692 12 19.2692ZM12 13.5C11.5875 13.5 11.2344 13.353 10.9408 13.0592C10.6469 12.7655 10.5 12.4125 10.5 12C10.5 11.5875 10.6469 11.2344 10.9408 10.9407C11.2344 10.6469 11.5875 10.5 12 10.5C12.4125 10.5 12.7656 10.6469 13.0592 10.9407C13.3531 11.2344 13.5 11.5875 13.5 12C13.5 12.4125 13.3531 12.7655 13.0592 13.0592C12.7656 13.353 12.4125 13.5 12 13.5ZM12 7.73071C11.5875 7.73071 11.2344 7.58388 10.9408 7.29021C10.6469 6.99638 10.5 6.64321 10.5 6.23071C10.5 5.81821 10.6469 5.46513 10.9408 5.17146C11.2344 4.87763 11.5875 4.73071 12 4.73071C12.4125 4.73071 12.7656 4.87763 13.0592 5.17146C13.3531 5.46513 13.5 5.81821 13.5 6.23071C13.5 6.64321 13.3531 6.99638 13.0592 7.29021C12.7656 7.58388 12.4125 7.73071 12 7.73071Z",fill:"currentColor"})),close:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M6.39994 18.6538L5.34619 17.6L10.9462 12L5.34619 6.4L6.39994 5.34625L11.9999 10.9463L17.5999 5.34625L18.6537 6.4L13.0537 12L18.6537 17.6L17.5999 18.6538L11.9999 13.0538L6.39994 18.6538Z",fill:"currentColor"})),settings:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M9.69225 21.5L9.3115 18.4538C9.04367 18.3641 8.769 18.2385 8.4875 18.077C8.20617 17.9153 7.95459 17.7422 7.73275 17.5577L4.9115 18.75L2.604 14.75L5.04425 12.9058C5.02125 12.7571 5.00492 12.6077 4.99525 12.4578C4.98559 12.3078 4.98075 12.1583 4.98075 12.0095C4.98075 11.8673 4.98559 11.7228 4.99525 11.576C5.00492 11.4292 5.02125 11.2686 5.04425 11.0943L2.604 9.25L4.9115 5.26925L7.723 6.452C7.96417 6.261 8.22159 6.08633 8.49525 5.928C8.76892 5.76967 9.03784 5.64242 9.302 5.54625L9.69225 2.5H14.3078L14.6885 5.55575C14.9885 5.66475 15.2599 5.792 15.5028 5.9375C15.7458 6.083 15.991 6.2545 16.2385 6.452L19.0885 5.26925L21.396 9.25L18.9173 11.123C18.9531 11.2845 18.9727 11.4355 18.976 11.576C18.9792 11.7163 18.9808 11.8577 18.9808 12C18.9808 12.1358 18.9775 12.274 18.971 12.4145C18.9647 12.5548 18.9417 12.7154 18.902 12.8963L21.3615 14.75L19.0538 18.75L16.2385 17.548C15.991 17.7455 15.7384 17.9202 15.4808 18.072C15.2231 18.224 14.959 18.3481 14.6885 18.4443L14.3078 21.5H9.69225ZM11 20H12.9655L13.325 17.3212C13.8353 17.1879 14.3017 16.9985 14.724 16.753C15.1465 16.5073 15.5539 16.1916 15.9463 15.8057L18.4308 16.85L19.4155 15.15L17.2463 13.5155C17.3296 13.2565 17.3863 13.0026 17.4163 12.7537C17.4464 12.5051 17.4615 12.2538 17.4615 12C17.4615 11.7397 17.4464 11.4884 17.4163 11.2463C17.3863 11.0039 17.3296 10.7564 17.2463 10.5038L19.4345 8.85L18.45 7.15L15.9365 8.2095C15.6018 7.85183 15.2009 7.53583 14.7338 7.2615C14.2664 6.98717 13.7937 6.79292 13.3155 6.67875L13 4H11.0155L10.6845 6.66925C10.1743 6.78975 9.70325 6.97433 9.27125 7.223C8.83909 7.47183 8.42684 7.79233 8.0345 8.1845L5.55 7.15L4.5655 8.85L6.725 10.4595C6.64167 10.6968 6.58334 10.9437 6.55 11.2C6.51667 11.4563 6.5 11.7262 6.5 12.0095C6.5 12.2698 6.51667 12.525 6.55 12.775C6.58334 13.025 6.6385 13.2718 6.7155 13.5155L4.5655 15.15L5.55 16.85L8.025 15.8C8.4045 16.1897 8.81025 16.5089 9.24225 16.7578C9.67442 17.0064 10.152 17.1974 10.675 17.3307L11 20ZM12.0115 15C12.8435 15 13.5515 14.708 14.1355 14.124C14.7195 13.54 15.0115 12.832 15.0115 12C15.0115 11.168 14.7195 10.46 14.1355 9.876C13.5515 9.292 12.8435 9 12.0115 9C11.1692 9 10.4586 9.292 9.87975 9.876C9.30092 10.46 9.0115 11.168 9.0115 12C9.0115 12.832 9.30092 13.54 9.87975 14.124C10.4586 14.708 11.1692 15 12.0115 15Z",fill:"currentColor"})),delete_big:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M7.30775 20.5C6.80908 20.5 6.38308 20.3234 6.02975 19.9702C5.67658 19.6169 5.5 19.1909 5.5 18.6922V5.99998H4.5V4.49998H9V3.61548H15V4.49998H19.5V5.99998H18.5V18.6922C18.5 19.1974 18.325 19.625 17.975 19.975C17.625 20.325 17.1974 20.5 16.6923 20.5H7.30775ZM17 5.99998H7V18.6922C7 18.7821 7.02883 18.8558 7.0865 18.9135C7.14417 18.9711 7.21792 19 7.30775 19H16.6923C16.7692 19 16.8398 18.9679 16.9038 18.9037C16.9679 18.8397 17 18.7692 17 18.6922V5.99998ZM9.404 17H10.9037V7.99998H9.404V17ZM13.0962 17H14.596V7.99998H13.0962V17Z",fill:"currentColor"})),delete_small:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M7.30775 20.5C6.80908 20.5 6.38308 20.3234 6.02975 19.9702C5.67658 19.6169 5.5 19.1909 5.5 18.6922V5.99998H4.5V4.49998H9V3.61548H15V4.49998H19.5V5.99998H18.5V18.6922C18.5 19.1974 18.325 19.625 17.975 19.975C17.625 20.325 17.1974 20.5 16.6923 20.5H7.30775ZM17 5.99998H7V18.6922C7 18.7821 7.02883 18.8558 7.0865 18.9135C7.14417 18.9711 7.21792 19 7.30775 19H16.6923C16.7692 19 16.8398 18.9679 16.9038 18.9037C16.9679 18.8397 17 18.7692 17 18.6922V5.99998ZM9.404 17H10.9037V7.99998H9.404V17ZM13.0962 17H14.596V7.99998H13.0962V17Z",fill:"currentColor"})),format_align_center:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M3.5 20.5V19H20.5V20.5H3.5ZM7.5 16.625V15.125H16.5V16.625H7.5ZM3.5 12.75V11.25H20.5V12.75H3.5ZM7.5 8.875V7.375H16.5V8.875H7.5ZM3.5 5V3.5H20.5V5H3.5Z",fill:"currentColor"})),format_align_left:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M3.5 20.5V19H20.5V20.5H3.5ZM3.5 16.625V15.125H14.5V16.625H3.5ZM3.5 12.75V11.25H20.5V12.75H3.5ZM3.5 8.875V7.375H14.5V8.875H3.5ZM3.5 5V3.5H20.5V5H3.5Z",fill:"currentColor"})),format_align_right:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M3.5 5V3.5H20.5V5H3.5ZM9.5 8.875V7.375H20.5V8.875H9.5ZM3.5 12.75V11.25H20.5V12.75H3.5ZM9.5 16.625V15.125H20.5V16.625H9.5ZM3.5 20.5V19H20.5V20.5H3.5Z",fill:"currentColor"})),add_row:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.025 10.2077C4.375 9.85775 4.80258 9.68275 5.30775 9.68275H6.5V11.1827H5.30775C5.21792 11.1827 5.14417 11.2116 5.0865 11.2693C5.02883 11.3269 5 11.4007 5 11.4905V16.1923C5 16.2821 5.02883 16.3558 5.0865 16.4135C5.14417 16.4712 5.21792 16.5 5.30775 16.5H18.6923C18.7821 16.5 18.8558 16.4712 18.9135 16.4135C18.9712 16.3558 19 16.2821 19 16.1923V11.4905C19 11.4007 18.9712 11.3269 18.9135 11.2693C18.8558 11.2116 18.7821 11.1827 18.6923 11.1827H17.6923V9.68275H18.6923C19.1974 9.68275 19.625 9.85775 19.975 10.2077C20.325 10.5577 20.5 10.9853 20.5 11.4905V16.1923C20.5 16.6974 20.325 17.125 19.975 17.475C19.625 17.825 19.1974 18 18.6923 18H5.30775C4.80258 18 4.375 17.825 4.025 17.475C3.675 17.125 3.5 16.6974 3.5 16.1923V11.4905C3.5 10.9853 3.675 10.5577 4.025 10.2077Z",fill:"currentColor"}),w.createElement("path",{d:"M11.3848 9.68275V7.5H12.8848V9.68275H15V11.1827H12.8848V13.2307H11.3848V11.1827H9.26925V9.68275H11.3848Z",fill:"currentColor"})),add_column:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.70775 4.025C9.35775 4.375 9.18275 4.80258 9.18275 5.30775V6.5H10.6827V5.30775C10.6827 5.21792 10.7116 5.14417 10.7693 5.0865C10.8269 5.02883 10.9007 5 10.9905 5H15.6923C15.7821 5 15.8558 5.02883 15.9135 5.0865C15.9712 5.14417 16 5.21792 16 5.30775V18.6923C16 18.7821 15.9712 18.8558 15.9135 18.9135C15.8558 18.9712 15.7821 19 15.6923 19H10.9905C10.9007 19 10.8269 18.9712 10.7693 18.9135C10.7116 18.8558 10.6827 18.7821 10.6827 18.6923V17.6923H9.18275V18.6923C9.18275 19.1974 9.35775 19.625 9.70775 19.975C10.0577 20.325 10.4853 20.5 10.9905 20.5H15.6923C16.1974 20.5 16.625 20.325 16.975 19.975C17.325 19.625 17.5 19.1974 17.5 18.6923V5.30775C17.5 4.80258 17.325 4.375 16.975 4.025C16.625 3.675 16.1974 3.5 15.6923 3.5H10.9905C10.4853 3.5 10.0577 3.675 9.70775 4.025Z",fill:"currentColor"}),w.createElement("path",{d:"M9.18275 11.3848H7V12.8848H9.18275V15H10.6827V12.8848H12.7307V11.3848H10.6827V9.26925H9.18275V11.3848Z",fill:"currentColor"})),insert_col_left:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M13.0001 20.1152H8.67713H8.75388H8.69238H13.0001ZM7.19238 19.8075C7.19238 20.3127 7.36738 20.7402 7.71738 21.0902C8.06738 21.4402 8.49497 21.6152 9.00013 21.6152H12.6924C13.1975 21.6152 13.6251 21.4402 13.9751 21.0902C14.3251 20.7402 14.5001 20.3127 14.5001 19.8075V10.423H13.0001V19.8075C13.0001 19.8973 12.9713 19.9711 12.9136 20.0287C12.856 20.0864 12.7822 20.1152 12.6924 20.1152H9.00013C8.9103 20.1152 8.83655 20.0864 8.77888 20.0287C8.72122 19.9711 8.69238 19.8973 8.69238 19.8075V4.69223C8.26422 4.74357 7.90722 4.93299 7.62138 5.26048C7.33538 5.58798 7.19238 5.97548 7.19238 6.42298V19.8075ZM13.0001 2.49998V4.61523H10.8846V6.11523H13.0001V8.23073H14.5001V6.11523H16.6154V4.61523H14.5001V2.49998H13.0001Z",fill:"currentColor"})),insert_row_above:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M20.1152 9.99987V14.3229V14.2461V14.3076V9.99987ZM19.8075 15.8076C20.3127 15.8076 20.7402 15.6326 21.0902 15.2826C21.4402 14.9326 21.6152 14.505 21.6152 13.9999V10.3076C21.6152 9.80245 21.4402 9.37487 21.0902 9.02487C20.7402 8.67487 20.3127 8.49987 19.8075 8.49987H10.423V9.99987H19.8075C19.8973 9.99987 19.9711 10.0287 20.0287 10.0864C20.0864 10.144 20.1152 10.2178 20.1152 10.3076V13.9999C20.1152 14.0897 20.0864 14.1635 20.0287 14.2211C19.9711 14.2788 19.8973 14.3076 19.8075 14.3076H4.69223C4.74357 14.7358 4.93299 15.0928 5.26048 15.3786C5.58798 15.6646 5.97548 15.8076 6.42298 15.8076H19.8075ZM2.49998 9.99987H4.61523V12.1154H6.11523V9.99987H8.23073V8.49987H6.11523V6.38462H4.61523V8.49987H2.49998V9.99987Z",fill:"currentColor"})),insert_row_below:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M20.1152 14.1924V9.86939V9.94614V9.88464V14.1924ZM19.8075 8.38464C20.3127 8.38464 20.7402 8.55964 21.0902 8.90964C21.4402 9.25964 21.6152 9.68723 21.6152 10.1924V13.8846C21.6152 14.3898 21.4402 14.8174 21.0902 15.1674C20.7402 15.5174 20.3127 15.6924 19.8075 15.6924H10.423V14.1924H19.8075C19.8973 14.1924 19.9711 14.1636 20.0287 14.1059C20.0864 14.0482 20.1152 13.9745 20.1152 13.8846V10.1924C20.1152 10.1026 20.0864 10.0288 20.0287 9.97114C19.9711 9.91348 19.8973 9.88464 19.8075 9.88464H4.69223C4.74357 9.45648 4.93299 9.09948 5.26048 8.81364C5.58798 8.52764 5.97548 8.38464 6.42298 8.38464H19.8075ZM2.49998 14.1924H4.61523V12.0769H6.11523V14.1924H8.23073V15.6924H6.11523V17.8076H4.61523V15.6924H2.49998V14.1924Z",fill:"currentColor"})),insert_col_right:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M10.8075 20.1152H15.1305H15.0537H15.1152H10.8075ZM16.6152 19.8075C16.6152 20.3127 16.4402 20.7402 16.0902 21.0902C15.7402 21.4402 15.3127 21.6152 14.8075 21.6152H11.1152C10.6101 21.6152 10.1825 21.4402 9.83248 21.0902C9.48248 20.7402 9.30748 20.3127 9.30748 19.8075V10.423H10.8075V19.8075C10.8075 19.8973 10.8363 19.9711 10.894 20.0287C10.9517 20.0864 11.0254 20.1152 11.1152 20.1152H14.8075C14.8973 20.1152 14.9711 20.0864 15.0287 20.0287C15.0864 19.9711 15.1152 19.8973 15.1152 19.8075V4.69223C15.5434 4.74357 15.9004 4.93299 16.1862 5.26048C16.4722 5.58798 16.6152 5.97548 16.6152 6.42298V19.8075ZM10.8075 2.49998V4.61523H12.923V6.11523H10.8075V8.23073H9.30748V6.11523H7.19223V4.61523H9.30748V2.49998H10.8075Z",fill:"currentColor"})),check:w.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:"M9.54983 17.6537L4.21533 12.3192L5.28433 11.25L9.54983 15.5155L18.7153 6.34998L19.7843 7.41923L9.54983 17.6537Z",fill:"currentColor"}))},c9=({children:e})=>{const t=vt(Rn),n=w.useMemo(()=>[t,Z0(null,Ru)],[t]);return w.createElement(ph.Provider,{value:n},e)},d9=()=>{const e=gn(),t=xt(Uv),n=u=>{t({current:u})},[r,i,o,s,l,a]=dn(ca,da,Tg,Ig,Ag,fa);return w.createElement(w.Fragment,null,s.map((u,c)=>w.createElement(u,{key:c})),w.createElement($g,{wrappers:l},w.createElement("div",{className:be(G.rootContentEditableWrapper,"mdxeditor-root-contenteditable")},w.createElement(dC,{contentEditable:w.createElement("div",{ref:n},w.createElement(nC,{className:be(G.contentEditable,r),ariaLabel:e("contentArea.editableMarkdown","editable markdown"),spellCheck:i})),placeholder:w.createElement("div",{className:be(G.contentEditable,G.placeholder,r)},w.createElement("p",null,a)),ErrorBoundary:sC}))),o.map((u,c)=>w.createElement(u,{key:c})))},f9={listItemIndent:"one"},h9=e=>u9[e];function p9(e,t,n={}){let r=t;for(const[i,o]of Object.entries(n))r=r.replaceAll(`{{${i}}}`,String(o));return r}const $g=({wrappers:e,children:t})=>{if(e.length===0)return w.createElement(w.Fragment,null,t);const n=e[0];return w.createElement(n,null,w.createElement($g,{wrappers:e.slice(1)},t))},g9=({children:e,className:t})=>{const n=w.useRef(null),r=xt(Vi);return w.useEffect(()=>{const i=document.createElement("div");return i.classList.add("mdxeditor-popup-container",G.editorRoot,G.popupContainer,...(t??"").trim().split(" ").filter(Boolean)),document.body.appendChild(i),n.current=i,r(n),()=>{i.remove()}},[t,n,r]),w.createElement("div",{className:be("mdxeditor",G.editorRoot,G.editorWrapper,t)},e)},m9=({mdxRef:e})=>{const t=ss();return w.useImperativeHandle(e,()=>({getMarkdown:()=>t.getValue(ba)==="source"?t.getValue(Ko):t.getValue(tr),setMarkdown:n=>{t.pub(Du,n)},insertMarkdown:n=>{t.pub(vg,n)},focus:(n,r)=>{var i;(i=t.getValue(Rn))==null||i.focus(n,r)}}),[t]),null},x9=w.forwardRef((e,t)=>w.createElement(W0,{plugins:[Gv({contentEditableClassName:e.contentEditableClassName??"",spellCheck:e.spellCheck??!0,initialMarkdown:e.markdown,onChange:e.onChange??_r,onBlur:e.onBlur??_r,toMarkdownOptions:e.toMarkdownOptions??f9,autoFocus:e.autoFocus??!1,placeholder:e.placeholder??"",readOnly:!!e.readOnly,iconComponentFor:e.iconComponentFor??h9,suppressHtmlProcessing:e.suppressHtmlProcessing??!1,onError:e.onError??_r,translation:e.translation??p9,trim:e.trim??!0,lexicalTheme:e.lexicalTheme}),...e.plugins??[]]},w.createElement(g9,{className:e.className},w.createElement(c9,null,w.createElement(d9,null))),w.createElement(m9,{mdxRef:t}))),Dg=typeof window<"u"&&typeof window.document.createElement<"u",Zo=Dg&&/Mac|iPod|iPhone|iPad/.test(navigator.platform);function y9(e,t){return Zo?e:t}const _9={testLexicalNode:As,visitLexicalNode:({lexicalNode:e,actions:t})=>{const n=parseInt(e.getTag()[1],10);t.addAndStepInto("heading",{depth:n})}},b9={testNode:"heading",visitNode:function({mdastNode:e,actions:t}){t.addAndStepInto(Ut(`h${e.depth}`))}},v9=[48,49,50,51,52,53,54],Vg=[1,2,3,4,5,6],C9={49:1,50:2,51:3,52:4,53:5,54:6},Rs=re(Vg,e=>{e.pub(Eg,t=>t.registerCommand(gh,n=>{const{keyCode:r,ctrlKey:i,metaKey:o,altKey:s}=n;return v9.includes(r)&&y9(o,i)&&s?(n.preventDefault(),t.update(()=>{if(r===48)e.pub(Jo,()=>_e());else{const l=e.getValue(Rs),a=C9[r];l.includes(a)||e.pub(Jo,()=>Ut(`h${a}`))}}),!0):!1},Se))}),w9=Kt({init(e){e.pubIn({[Ms]:"headings",[Ln]:b9,[lr]:$i,[ar]:_9})},update(e,t){e.pub(Rs,(t==null?void 0:t.allowedHeadingLevels)??Vg)}});function af(e,t){return e.getEditorState().read(()=>{const n=Re(t);return n!==null&&n.isSelected()})}function Hg(e){const[t]=it(),[n,r]=T.useState(()=>af(t,e));return T.useEffect(()=>{let i=!0;const o=t.registerUpdateListener(()=>{i&&r(af(t,e))});return()=>{i=!1,o()}},[t,e]),[n,T.useCallback(i=>{t.update(()=>{let o=U();He(o)||(o=ql(),Ye(o)),He(o)&&(i?o.add(e):o.delete(e))})},[t,e]),T.useCallback(()=>{t.update(()=>{const i=U();He(i)&&i.clear()})},[t])]}const Bg=fn();function k9({nodeKey:e}){const[t]=it(),[n,r,i]=Hg(e),o=T.useCallback(s=>{const l=U();return n&&He(l)&&(s.preventDefault(),t.update(()=>{l.getNodes().forEach(a=>{Bu(a)&&a.remove()})})),!1},[t,n]);return T.useEffect(()=>ft(t.registerCommand(ls,s=>{const l=t.getElementByKey(e);return s.target===l&&(s.shiftKey||i(),r(!n),!0)},Se),t.registerCommand(ds,o,Se),t.registerCommand(cs,o,Se)),[i,t,n,e,o,r]),T.useEffect(()=>{const s=t.getElementByKey(e),l="selected";s!==null&&(n?Mt(s,l):Ts(s,l))},[t,n,e]),null}let Os=class zg extends Mi{static getType(){return"horizontalrule"}static clone(t){return new zg(t.__key)}static importJSON(t){return Hi().updateFromJSON(t)}static importDOM(){return{hr:()=>({conversion:S9,priority:0})}}exportDOM(){return{element:document.createElement("hr")}}createDOM(t){const n=document.createElement("hr");return Mt(n,t.theme.hr),n}getTextContent(){return`
68
- `}isInline(){return!1}updateDOM(){return!1}decorate(){return L.jsx(k9,{nodeKey:this.__key})}};function S9(){return{node:Hi()}}function Hi(){return dt(new Os)}function Bu(e){return e instanceof Os}function E9(){const[e]=it();return T.useEffect(()=>e.registerCommand(Bg,t=>{const n=U();if(!D(n))return!1;if(n.focus.getNode()!==null){const r=Hi();mp(r)}return!0},pe),[e]),null}const T9={testLexicalNode:Bu,visitLexicalNode({actions:e}){e.addAndStepInto("thematicBreak")}},I9={testNode:"thematicBreak",visitNode({actions:e}){e.addAndStepInto(Hi())}},A9=Fn(e=>{e.sub(e.pipe(A9,Le($e)),([,t])=>{t==null||t.dispatchCommand(Bg,void 0)})}),N9=Kt({init(e){e.pubIn({[Ln]:I9,[lr]:Os,[ar]:T9,[ur]:E9})}});function L9(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Bt=L9(function(e){const t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});function wa(e){let t=1,n=e.getParent();for(;n!=null;){if(me(n)){const r=n.getParent();if(ae(r)){t++,n=r.getParent();continue}Bt(40)}return t}return t}function ka(e){let t=e.getParent();ae(t)||Bt(40);let n=t;for(;n!==null;)n=n.getParent(),ae(n)&&(t=n);return t}function jg(e){let t=[];const n=e.getChildren().filter(me);for(let r=0;r<n.length;r++){const i=n[r],o=i.getFirstChild();ae(o)?t=t.concat(jg(o)):t.push(i)}return t}function zt(e){return me(e)&&ae(e.getFirstChild())}function uf(e){return et().append(e)}function Ug(e,t){return me(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}function Sa(e,t){e.update(()=>{const n=U();if(n!==null){const r=n.getNodes();if(D(n)){const o=n.getStartEndPoints();o===null&&Bt(143);const[s]=o,l=s.getNode(),a=l.getParent();if(Ug(l,r)){const u=Qe(t);if(Ve(a)){l.replace(u);const c=et();O(l)&&(c.setFormat(l.getFormatType()),c.setIndent(l.getIndent())),u.append(c)}else if(me(l)){const c=l.getParentOrThrow();nr(u,c.getChildren()),c.replace(u)}return}}const i=new Set;for(let o=0;o<r.length;o++){const s=r[o];if(!O(s)||!s.isEmpty()||me(s)||i.has(s.getKey())){if(Ih(s)){let l=s.getParent();for(;l!=null;){const a=l.getKey();if(ae(l)){if(!i.has(a)){const u=Qe(t);nr(u,l.getChildren()),l.replace(u),i.add(a)}break}{const u=l.getParent();if(Ve(u)&&!i.has(a)){i.add(a),cf(l,t);break}l=u}}}}else cf(s,t)}}})}function nr(e,t){e.splice(e.getChildrenSize(),0,t)}function cf(e,t){if(ae(e))return e;const n=e.getPreviousSibling(),r=e.getNextSibling(),i=et();let o;if(nr(i,e.getChildren()),ae(n)&&t===n.getListType())n.append(i),ae(r)&&t===r.getListType()&&(nr(n,r.getChildren()),r.remove()),o=n;else if(ae(r)&&t===r.getListType())r.getFirstChildOrThrow().insertBefore(i),o=r;else{const s=Qe(t);s.append(i),e.replace(s),o=s}return i.setFormat(e.getFormatType()),i.setIndent(e.getIndent()),e.remove(),o}function zu(e,t){const n=e.getLastChild(),r=t.getFirstChild();n&&r&&zt(n)&&zt(r)&&(zu(n.getFirstChild(),r.getFirstChild()),r.remove());const i=t.getChildren();i.length>0&&e.append(...i),t.remove()}function F9(e){e.update(()=>{const t=U();if(D(t)){const n=new Set,r=t.getNodes(),i=t.anchor.getNode();if(Ug(i,r))n.add(ka(i));else for(let o=0;o<r.length;o++){const s=r[o];if(Ih(s)){const l=gp(s,$n);l!=null&&n.add(ka(l))}}for(const o of n){let s=o;const l=jg(o);for(const a of l){const u=_e();nr(u,a.getChildren()),s.insertAfter(u),s=u,a.__key===t.anchor.key&&t.anchor.set(u.getKey(),0,"element"),a.__key===t.focus.key&&t.focus.set(u.getKey(),0,"element"),a.remove()}o.remove()}}})}function P9(e){const t=new Set;if(zt(e)||t.has(e.getKey()))return;const n=e.getParent(),r=e.getNextSibling(),i=e.getPreviousSibling();if(zt(r)&&zt(i)){const o=i.getFirstChild();if(ae(o)){o.append(e);const s=r.getFirstChild();ae(s)&&(nr(o,s.getChildren()),r.remove(),t.add(r.getKey()))}}else if(zt(r)){const o=r.getFirstChild();if(ae(o)){const s=o.getFirstChild();s!==null&&s.insertBefore(e)}}else if(zt(i)){const o=i.getFirstChild();ae(o)&&o.append(e)}else if(ae(n)){const o=et(),s=Qe(n.getListType());o.append(s),s.append(e),i?i.insertAfter(o):r?r.insertBefore(o):n.append(o)}}function M9(e){if(zt(e))return;const t=e.getParent(),n=t?t.getParent():void 0;if(ae(n?n.getParent():void 0)&&me(n)&&ae(t)){const r=t?t.getFirstChild():void 0,i=t?t.getLastChild():void 0;if(e.is(r))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(i))n.insertAfter(e),t.isEmpty()&&n.remove();else{const o=t.getListType(),s=et(),l=Qe(o);s.append(l),e.getPreviousSiblings().forEach(c=>l.append(c));const a=et(),u=Qe(o);a.append(u),nr(u,e.getNextSiblings()),n.insertBefore(s),n.insertAfter(a),n.replace(e)}}}function R9(){const e=U();if(!D(e)||!e.isCollapsed())return!1;const t=e.anchor.getNode();if(!me(t)||t.getChildrenSize()!==0)return!1;const n=ka(t),r=t.getParent();ae(r)||Bt(40);const i=r.getParent();let o;if(Ve(i))o=_e(),o.setTextStyle(e.style),o.setTextFormat(e.format),n.insertAfter(o);else{if(!me(i))return!1;o=et(),i.insertAfter(o)}o.select();const s=t.getNextSiblings();if(s.length>0){const l=Qe(r.getListType());if(me(o)){const a=et();a.append(l),o.insertAfter(a)}else o.insertAfter(l);l.append(...s)}return function(l){let a=l;for(;a.getNextSibling()==null&&a.getPreviousSibling()==null;){const u=a.getParent();if(u==null||!me(a)&&!ae(a))break;a=u}a.remove()}(t),!0}function Go(...e){const t=[];for(const n of e)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))t.push(r);return t}let $n=class Wg extends Ot{static getType(){return"listitem"}static clone(t){return new Wg(t.__value,t.__checked,t.__key)}constructor(t,n,r){super(r),this.__value=t===void 0?1:t,this.__checked=n}createDOM(t){const n=document.createElement("li"),r=this.getParent();return ae(r)&&r.getListType()==="check"&&ff(n,this,null),n.value=this.__value,df(n,t.theme,this),n}updateDOM(t,n,r){const i=this.getParent();return ae(i)&&i.getListType()==="check"&&ff(n,this,t),n.value=this.__value,df(n,r.theme,this),!1}static transform(){return t=>{if(me(t)||Bt(144),t.__checked==null)return;const n=t.getParent();ae(n)&&n.getListType()!=="check"&&t.getChecked()!=null&&t.setChecked(void 0)}}static importDOM(){return{li:()=>({conversion:O9,priority:0})}}static importJSON(t){return et().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setValue(t.value).setChecked(t.checked)}exportDOM(t){const n=this.createDOM(t._config);return n.style.textAlign=this.getFormatType(),{element:n}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...t){for(let n=0;n<t.length;n++){const r=t[n];if(O(r)&&this.canMergeWith(r)){const i=r.getChildren();this.append(...i),r.remove()}else super.append(r)}return this}replace(t,n){if(me(t))return super.replace(t);this.setIndent(0);const r=this.getParentOrThrow();if(!ae(r))return t;if(r.__first===this.getKey())r.insertBefore(t);else if(r.__last===this.getKey())r.insertAfter(t);else{const i=Qe(r.getListType());let o=this.getNextSibling();for(;o;){const s=o;o=o.getNextSibling(),i.append(s)}r.insertAfter(t),t.insertAfter(i)}return n&&(O(t)||Bt(139),this.getChildren().forEach(i=>{t.append(i)})),this.remove(),r.getChildrenSize()===0&&r.remove(),t}insertAfter(t,n=!0){const r=this.getParentOrThrow();if(ae(r)||Bt(39),me(t))return super.insertAfter(t,n);const i=this.getNextSiblings();if(r.insertAfter(t,n),i.length!==0){const o=Qe(r.getListType());i.forEach(s=>o.append(s)),t.insertAfter(o,n)}return t}remove(t){const n=this.getPreviousSibling(),r=this.getNextSibling();super.remove(t),n&&r&&zt(n)&&zt(r)&&(zu(n.getFirstChild(),r.getFirstChild()),r.remove())}insertNewAfter(t,n=!0){const r=et().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked()&&void 0);return this.insertAfter(r,n),r}collapseAtStart(t){const n=_e();this.getChildren().forEach(s=>n.append(s));const r=this.getParentOrThrow(),i=r.getParentOrThrow(),o=me(i);if(r.getChildrenSize()===1)if(o)r.remove(),i.select();else{r.insertBefore(n),r.remove();const s=t.anchor,l=t.focus,a=n.getKey();s.type==="element"&&s.getNode().is(this)&&s.set(a,s.offset,"element"),l.type==="element"&&l.getNode().is(this)&&l.set(a,l.offset,"element")}else r.insertBefore(n),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(t){const n=this.getWritable();return n.__value=t,n}getChecked(){const t=this.getLatest();let n;const r=this.getParent();return ae(r)&&(n=r.getListType()),n==="check"?!!t.__checked:void 0}setChecked(t){const n=this.getWritable();return n.__checked=t,n}toggleChecked(){const t=this.getWritable();return t.setChecked(!t.__checked)}getIndent(){const t=this.getParent();if(t===null)return this.getLatest().__indent;let n=t.getParentOrThrow(),r=0;for(;me(n);)n=n.getParentOrThrow().getParentOrThrow(),r++;return r}setIndent(t){typeof t!="number"&&Bt(117),(t=Math.floor(t))>=0||Bt(199);let n=this.getIndent();for(;n!==t;)n<t?(P9(this),n++):(M9(this),n--);return this}canInsertAfter(t){return me(t)}canReplaceWith(t){return me(t)}canMergeWith(t){return me(t)||Tu(t)}extractWithChild(t,n){if(!D(n))return!1;const r=n.anchor.getNode(),i=n.focus.getNode();return this.isParentOf(r)&&this.isParentOf(i)&&this.getTextContent().length===n.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return Qe("bullet")}canMergeWhenEmpty(){return!0}};function df(e,t,n){const r=[],i=[],o=t.list,s=o?o.listitem:void 0;let l;if(o&&o.nested&&(l=o.nested.listitem),s!==void 0&&r.push(...Go(s)),o){const a=n.getParent(),u=ae(a)&&a.getListType()==="check",c=n.getChecked();u&&!c||i.push(o.listitemUnchecked),u&&c||i.push(o.listitemChecked),u&&r.push(c?o.listitemChecked:o.listitemUnchecked)}if(l!==void 0){const a=Go(l);n.getChildren().some(u=>ae(u))?r.push(...a):i.push(...a)}i.length>0&&Ts(e,...i),r.length>0&&Mt(e,...r)}function ff(e,t,n,r){ae(t.getFirstChild())?(e.removeAttribute("role"),e.removeAttribute("tabIndex"),e.removeAttribute("aria-checked")):(e.setAttribute("role","checkbox"),e.setAttribute("tabIndex","-1"),n&&t.__checked===n.__checked||e.setAttribute("aria-checked",t.getChecked()?"true":"false"))}function O9(e){if(e.classList.contains("task-list-item")){for(const n of e.children)if(n.tagName==="INPUT")return $9(n)}const t=e.getAttribute("aria-checked");return{node:et(t==="true"||t!=="false"&&void 0)}}function $9(e){return e.getAttribute("type")!=="checkbox"?{node:null}:{node:et(e.hasAttribute("checked"))}}function et(e){return dt(new $n(void 0,e))}function me(e){return e instanceof $n}let Dn=class Jg extends Ot{static getType(){return"list"}static clone(t){const n=t.__listType||gf[t.__tag];return new Jg(n,t.__start,t.__key)}constructor(t="number",n=1,r){super(r);const i=gf[t]||t;this.__listType=i,this.__tag=i==="number"?"ol":"ul",this.__start=n}getTag(){return this.__tag}setListType(t){const n=this.getWritable();return n.__listType=t,n.__tag=t==="number"?"ol":"ul",n}getListType(){return this.__listType}getStart(){return this.__start}setStart(t){const n=this.getWritable();return n.__start=t,n}createDOM(t,n){const r=this.__tag,i=document.createElement(r);return this.__start!==1&&i.setAttribute("start",String(this.__start)),i.__lexicalListType=this.__listType,hf(i,t.theme,this),i}updateDOM(t,n,r){return t.__tag!==this.__tag||(hf(n,r.theme,this),!1)}static transform(){return t=>{ae(t)||Bt(163),function(n){const r=n.getNextSibling();ae(r)&&n.getListType()===r.getListType()&&zu(n,r)}(t),function(n){const r=n.getListType()!=="check";let i=n.getStart();for(const o of n.getChildren())me(o)&&(o.getValue()!==i&&o.setValue(i),r&&o.getLatest().__checked!=null&&o.setChecked(void 0),ae(o.getFirstChild())||i++)}(t)}}static importDOM(){return{ol:()=>({conversion:pf,priority:0}),ul:()=>({conversion:pf,priority:0})}}static importJSON(t){return Qe().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setListType(t.listType).setStart(t.start)}exportDOM(t){const n=this.createDOM(t._config,t);return Fe(n)&&(this.__start!==1&&n.setAttribute("start",String(this.__start)),this.__listType==="check"&&n.setAttribute("__lexicalListType","check")),{element:n}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}append(...t){for(let n=0;n<t.length;n++){const r=t[n];if(me(r))super.append(r);else{const i=et();if(ae(r))i.append(r);else if(O(r))if(r.isInline())i.append(r);else{const o=Ae(r.getTextContent());i.append(o)}else i.append(r);super.append(i)}}return this}extractWithChild(t){return me(t)}};function hf(e,t,n){const r=[],i=[],o=t.list;if(o!==void 0){const s=o[`${n.__tag}Depth`]||[],l=wa(n)-1,a=l%s.length,u=s[a],c=o[n.__tag];let d;const h=o.nested,f=o.checklist;if(h!==void 0&&h.list&&(d=h.list),c!==void 0&&r.push(c),f!==void 0&&n.__listType==="check"&&r.push(f),u!==void 0){r.push(...Go(u));for(let p=0;p<s.length;p++)p!==a&&i.push(n.__tag+p)}if(d!==void 0){const p=Go(d);l>1?r.push(...p):i.push(...p)}}i.length>0&&Ts(e,...i),r.length>0&&Mt(e,...r)}function D9(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];if(me(r)){t.push(r);const i=r.getChildren();i.length>1&&i.forEach(o=>{ae(o)&&t.push(uf(o))})}else t.push(uf(r))}return t}function pf(e){const t=e.nodeName.toLowerCase();let n=null;return t==="ol"?n=Qe("number",e.start):t==="ul"&&(n=function(r){if(r.getAttribute("__lexicallisttype")==="check"||r.classList.contains("contains-task-list"))return!0;for(const i of r.childNodes)if(Fe(i)&&i.hasAttribute("aria-checked"))return!0;return!1}(e)?Qe("check"):Qe("bullet")),{after:D9,node:n}}const gf={ol:"number",ul:"bullet"};function Qe(e="number",t=1){return dt(new Dn(e,t))}function ae(e){return e instanceof Dn}const Kg=fn(),Zg=fn(),Gg=fn(),qg=fn();function V9(e){return ft(e.registerCommand(Zg,()=>(Sa(e,"number"),!0),Se),e.registerCommand(Kg,()=>(Sa(e,"bullet"),!0),Se),e.registerCommand(qg,()=>(F9(e),!0),Se),e.registerCommand(hi,()=>!!R9(),Se))}const H9={testNode:"list",visitNode:function({mdastNode:e,lexicalParent:t,actions:n}){const r=e.children.some(o=>typeof o.checked=="boolean")?"check":e.ordered?"number":"bullet",i=Qe(r);if(me(t)){const o=et();o.append(i),t.insertAfter(o)}else t.append(i);n.visitChildren(e,i)}},B9={testNode:"listItem",visitNode({mdastNode:e,actions:t,lexicalParent:n}){const r=n.getListType()==="check"?e.checked??!1:void 0;t.addAndStepInto(et(r))}},z9={testLexicalNode:ae,visitLexicalNode:({lexicalNode:e,actions:t})=>{t.addAndStepInto("list",{ordered:e.getListType()==="number",spread:!1})}},j9={testLexicalNode:me,visitLexicalNode:({lexicalNode:e,mdastParent:t,actions:n})=>{const r=e.getChildren(),i=r[0];if(r.length===1&&ae(i)){const o=t.children.at(-1);o?n.visitChildren(e,o):n.visitChildren(i,t)}else{const o=e.getParent(),s=n.appendToParent(t,{type:"listItem",checked:o.getListType()==="check"?!!e.getChecked():void 0,spread:!1,children:[]});n.visitChildren(e,s)}}};function U9(e,t){return ft(e.registerCommand(Ya,n=>{const r=U();if(!D(r))return!1;n.preventDefault();const i=function(o){const s=o.getNodes();if(gx(s,h=>Vo(h)&&h.canIndent()?h:null).length>0)return!0;const l=o.anchor,a=o.focus,u=a.isBefore(l)?a:l,c=u.getNode(),d=Xl(c);if(d.canIndent()){const h=d.getKey();let f=ws();if(f.anchor.set(h,0,"element"),f.focus.set(h,0,"element"),f=Er(f),f.anchor.is(u))return!0}return!1}(r)?n.shiftKey?Pl:So:xh;return e.dispatchCommand(i,void 0)},pe),e.registerCommand(So,()=>{if(t==null)return!1;const n=U();if(!D(n))return!1;const r=n.getNodes().map(i=>Xl(i).getIndent());return Math.max(...r)+1>=t},an))}function mf({maxIndent:e}){const[t]=it();return T.useEffect(()=>U9(t,e),[t,e]),null}function xf(){const[e]=it();return T.useEffect(()=>ft(e.registerCommand(Gg,()=>(Sa(e,"check"),!0),Se),e.registerCommand(Ga,t=>bf(t,e,!1),Se),e.registerCommand(Za,t=>bf(t,e,!0),Se),e.registerCommand(Ti,t=>{if(Ea()!=null){const n=e.getRootElement();return n!=null&&n.focus(),!0}return!1},Se),e.registerCommand(qa,t=>{const n=Ea();return!(n==null||!e.isEditable())&&(e.update(()=>{const r=ln(n);me(r)&&(t.preventDefault(),r.toggleChecked())}),!0)},Se),e.registerCommand(Ka,t=>e.getEditorState().read(()=>{const n=U();if(D(n)&&n.isCollapsed()){const{anchor:r}=n,i=r.type==="element";if(i||r.offset===0){const o=r.getNode(),s=sr(o,l=>O(l)&&!l.isInline());if(me(s)){const l=s.getParent();if(ae(l)&&l.getListType()==="check"&&(i||s.getFirstDescendant()===o)){const a=e.getElementByKey(s.__key);if(a!=null&&document.activeElement!==a)return a.focus(),t.preventDefault(),!0}}}}return!1}),Se),e.registerRootListener((t,n)=>{t!==null&&(t.addEventListener("click",yf),t.addEventListener("pointerdown",_f)),n!==null&&(n.removeEventListener("click",yf),n.removeEventListener("pointerdown",_f))}))),null}function Yg(e,t){const n=e.target;if(!Fe(n))return;const r=n.firstChild;if(Fe(r)&&(r.tagName==="UL"||r.tagName==="OL"))return;const i=n.parentNode;if(!i||i.__lexicalListType!=="check")return;const o=n.getBoundingClientRect(),s=e.pageX/mx(n);(n.dir==="rtl"?s<o.right&&s>o.right-20:s>o.left&&s<o.left+20)&&t()}function yf(e){Yg(e,()=>{if(Fe(e.target)){const t=e.target,n=fu(t);n!=null&&n.isEditable()&&n.update(()=>{const r=ln(t);me(r)&&(t.focus(),r.toggleChecked())})}})}function _f(e){Yg(e,()=>{e.preventDefault()})}function Ea(){const e=document.activeElement;return Fe(e)&&e.tagName==="LI"&&e.parentNode!=null&&e.parentNode.__lexicalListType==="check"?e:null}function bf(e,t,n){const r=Ea();return r!=null&&t.update(()=>{const i=ln(r);if(!me(i))return;const o=function(s,l){let a=l?s.getPreviousSibling():s.getNextSibling(),u=s;for(;a==null&&me(u);)u=u.getParentOrThrow().getParent(),u!=null&&(a=l?u.getPreviousSibling():u.getNextSibling());for(;me(a);){const c=l?a.getLastChild():a.getFirstChild();if(!ae(c))return a;a=l?c.getLastChild():c.getFirstChild()}return null}(i,n);if(o!=null){o.selectStart();const s=t.getElementByKey(o.__key);s!=null&&(e.preventDefault(),setTimeout(()=>{s.focus()},0))}}),!1}function vf(){const[e]=it();return T.useEffect(()=>{if(!e.hasNodes([Dn,$n]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[e]),function(t){T.useEffect(()=>V9(t),[t])}(e),null}const W9={name:"tasklistCheck",tokenize:K9};function J9(){return{text:{91:W9}}}function K9(e,t,n){const r=this;return i;function i(a){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(a):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),o)}function o(a){return Me(a)?(e.enter("taskListCheckValueUnchecked"),e.consume(a),e.exit("taskListCheckValueUnchecked"),s):a===88||a===120?(e.enter("taskListCheckValueChecked"),e.consume(a),e.exit("taskListCheckValueChecked"),s):n(a)}function s(a){return a===93?(e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(a)}function l(a){return te(a)?t(a):ge(a)?e.check({tokenize:Z9},t,n)(a):n(a)}}function Z9(e,t,n){return xe(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function G9(){return{exit:{taskListCheckValueChecked:Cf,taskListCheckValueUnchecked:Cf,paragraph:Y9}}}function q9(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:X9}}}function Cf(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Y9(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,s;for(;++o<i.length;){const l=i[o];if(l.type==="paragraph"){s=l;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function X9(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);o&&l.move(s);let a=Wp.listItem(e,t,n,{...r,...l.current()});return o&&(a=a.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),a;function u(c){return c+s}}const Q9=new Map([["number",Zg],["bullet",Kg],["check",Gg],["",qg]]),wf=re("",e=>{e.sub(e.pipe(Ir,Le($e)),([t,n])=>{if(!t||!n)return;const r=t.anchor.getNode();let i=r.getKey()==="root"?r:sr(r,l=>{const a=l.getParent();return a!==null&&Ve(a)});i===null&&(i=r.getTopLevelElementOrThrow());const o=i.getKey();if(n.getElementByKey(o)!==null)if(ae(i)){const l=gp(r,Dn),a=l?l.getListType():i.getListType();e.pub(wf,a)}else e.pub(wf,"")})}),ew=ze(e=>{e.sub(e.pipe(ew,Le($e)),([t,n])=>{n==null||n.dispatchCommand(Q9.get(t),void 0)})}),tw=Kt({init(e){var t;(t=e.getValue(Rn))==null||t.registerCommand(So,()=>!rw(7),an),e.pubIn({[Ms]:"lists",[xa]:G9(),[ma]:J9(),[Ln]:[H9,B9],[lr]:[$n,Dn],[ar]:[z9,j9],[bg]:q9(),[ur]:[mf,vf,xf],[Ng]:[mf,vf,xf]})}});function nw(e){const t=e.getNodes();return t.length===0?new Set([e.anchor.getNode().getParentOrThrow(),e.focus.getNode().getParentOrThrow()]):new Set(t.map(n=>O(n)?n:n.getParentOrThrow()))}function rw(e){const t=U();if(!D(t))return!1;const n=nw(t);let r=0;for(const i of n)if(ae(i))r=Math.max(wa(i)+1,r);else if(me(i)){const o=i.getParent();if((o==null?void 0:o.getChildren().length)===1){const s=o.getParent();if(me(s)&&s.getChildren().length===1)return!1}if(!ae(o))throw new Error("ListMaxIndentLevelPlugin: A ListItemNode must have a ListNode for a parent.");r=Math.max(wa(o)+1,r)}return r<=e}var ju="Popover",[Xg,K6]=Wa(ju,[rs]),Bi=rs(),[iw,Vn]=Xg(ju),Qg=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!1}=e,l=Bi(t),a=T.useRef(null),[u,c]=T.useState(!1),[d=!1,h]=Ll({prop:r,defaultProp:i,onChange:o});return L.jsx(Zf,{...l,children:L.jsx(iw,{scope:t,contentId:is(),triggerRef:a,open:d,onOpenChange:h,onOpenToggle:T.useCallback(()=>h(f=>!f),[h]),hasCustomAnchor:u,onCustomAnchorAdd:T.useCallback(()=>c(!0),[]),onCustomAnchorRemove:T.useCallback(()=>c(!1),[]),modal:s,children:n})})};Qg.displayName=ju;var e1="PopoverAnchor",t1=T.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Vn(e1,n),o=Bi(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:l}=i;return T.useEffect(()=>(s(),()=>l()),[s,l]),L.jsx(Ua,{...o,...r,ref:t})});t1.displayName=e1;var n1="PopoverTrigger",ow=T.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Vn(n1,n),o=Bi(n),s=ut(t,i.triggerRef),l=L.jsx(ct.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":a1(i.open),...r,ref:s,onClick:Pe(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?l:L.jsx(Ua,{asChild:!0,...o,children:l})});ow.displayName=n1;var Uu="PopoverPortal",[sw,lw]=Xg(Uu,{forceMount:void 0}),r1=e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,o=Vn(Uu,t);return L.jsx(sw,{scope:t,forceMount:n,children:L.jsx(ah,{present:n||o.open,children:L.jsx(Gf,{asChild:!0,container:i,children:r})})})};r1.displayName=Uu;var Ar="PopoverContent",i1=T.forwardRef((e,t)=>{const n=lw(Ar,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,o=Vn(Ar,e.__scopePopover);return L.jsx(ah,{present:r||o.open,children:o.modal?L.jsx(uw,{...i,ref:t}):L.jsx(cw,{...i,ref:t})})});i1.displayName=Ar;var aw=wo("PopoverContent.RemoveScroll"),uw=T.forwardRef((e,t)=>{const n=Vn(Ar,e.__scopePopover),r=T.useRef(null),i=ut(t,r),o=T.useRef(!1);return T.useEffect(()=>{const s=r.current;if(s)return Yf(s)},[]),L.jsx(Xf,{as:aw,allowPinchZoom:!0,children:L.jsx(o1,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Pe(e.onCloseAutoFocus,s=>{var l;s.preventDefault(),o.current||(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:Pe(e.onPointerDownOutside,s=>{const l=s.detail.originalEvent,a=l.button===0&&l.ctrlKey===!0,u=l.button===2||a;o.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:Pe(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),cw=T.forwardRef((e,t)=>{const n=Vn(Ar,e.__scopePopover),r=T.useRef(!1),i=T.useRef(!1);return L.jsx(o1,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s,l;(s=e.onCloseAutoFocus)==null||s.call(e,o),o.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{var a,u;(a=e.onInteractOutside)==null||a.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=o.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),o1=T.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:a,onFocusOutside:u,onInteractOutside:c,...d}=e,h=Vn(Ar,n),f=Bi(n);return Qf(),L.jsx(eh,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:L.jsx(th,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:c,onEscapeKeyDown:l,onPointerDownOutside:a,onFocusOutside:u,onDismiss:()=>h.onOpenChange(!1),children:L.jsx(nh,{"data-state":a1(h.open),role:"dialog",id:h.contentId,...f,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),s1="PopoverClose",dw=T.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Vn(s1,n);return L.jsx(ct.button,{type:"button",...r,ref:t,onClick:Pe(e.onClick,()=>i.onOpenChange(!1))})});dw.displayName=s1;var fw="PopoverArrow",l1=T.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Bi(n);return L.jsx(qf,{...i,...r,ref:t})});l1.displayName=fw;function a1(e){return e?"open":"closed"}var hw=Qg,pw=t1,gw=r1,mw=i1,xw=l1;function Tn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function $s(e,t=[]){let n=[];function r(o,s){const l=T.createContext(s),a=n.length;n=[...n,s];const u=d=>{var _;const{scope:h,children:f,...p}=d,x=((_=h==null?void 0:h[e])==null?void 0:_[a])||l,y=T.useMemo(()=>p,Object.values(p));return L.jsx(x.Provider,{value:y,children:f})};u.displayName=o+"Provider";function c(d,h){var x;const f=((x=h==null?void 0:h[e])==null?void 0:x[a])||l,p=T.useContext(f);if(p)return p;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${o}\``)}return[u,c]}const i=()=>{const o=n.map(s=>T.createContext(s));return function(l){const a=(l==null?void 0:l[e])||o;return T.useMemo(()=>({[`__scope${e}`]:{...l,[e]:a}}),[l,a])}};return i.scopeName=e,[r,yw(i,...t)]}function yw(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((l,{useScope:a,scopeName:u})=>{const d=a(o)[`__scope${u}`];return{...l,...d}},{});return T.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function kf(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function u1(...e){return t=>{let n=!1;const r=e.map(i=>{const o=kf(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():kf(e[i],null)}}}}function Ta(...e){return T.useCallback(u1(...e),e)}var qo=T.forwardRef((e,t)=>{const{children:n,...r}=e,i=T.Children.toArray(n),o=i.find(bw);if(o){const s=o.props.children,l=i.map(a=>a===o?T.Children.count(s)>1?T.Children.only(null):T.isValidElement(s)?s.props.children:null:a);return L.jsx(Ia,{...r,ref:t,children:T.isValidElement(s)?T.cloneElement(s,void 0,l):null})}return L.jsx(Ia,{...r,ref:t,children:n})});qo.displayName="Slot";var Ia=T.forwardRef((e,t)=>{const{children:n,...r}=e;if(T.isValidElement(n)){const i=Cw(n),o=vw(r,n.props);return n.type!==T.Fragment&&(o.ref=t?u1(t,i):i),T.cloneElement(n,o)}return T.Children.count(n)>1?T.Children.only(null):null});Ia.displayName="SlotClone";var _w=({children:e})=>L.jsx(L.Fragment,{children:e});function bw(e){return T.isValidElement(e)&&e.type===_w}function vw(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...l)=>{o(...l),i(...l)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function Cw(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function ww(e){const t=e+"CollectionProvider",[n,r]=$s(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=f=>{const{scope:p,children:x}=f,y=w.useRef(null),_=w.useRef(new Map).current;return L.jsx(i,{scope:p,itemMap:_,collectionRef:y,children:x})};s.displayName=t;const l=e+"CollectionSlot",a=w.forwardRef((f,p)=>{const{scope:x,children:y}=f,_=o(l,x),g=Ta(p,_.collectionRef);return L.jsx(qo,{ref:g,children:y})});a.displayName=l;const u=e+"CollectionItemSlot",c="data-radix-collection-item",d=w.forwardRef((f,p)=>{const{scope:x,children:y,..._}=f,g=w.useRef(null),m=Ta(p,g),b=o(u,x);return w.useEffect(()=>(b.itemMap.set(g,{ref:g,..._}),()=>void b.itemMap.delete(g))),L.jsx(qo,{[c]:"",ref:m,children:y})});d.displayName=u;function h(f){const p=o(e+"CollectionConsumer",f);return w.useCallback(()=>{const y=p.collectionRef.current;if(!y)return[];const _=Array.from(y.querySelectorAll(`[${c}]`));return Array.from(p.itemMap.values()).sort((b,k)=>_.indexOf(b.ref.current)-_.indexOf(k.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:s,Slot:a,ItemSlot:d},h,r]}var kw=globalThis!=null&&globalThis.document?T.useLayoutEffect:()=>{},Sw=_0.useId||(()=>{}),Ew=0;function Tw(e){const[t,n]=T.useState(Sw());return kw(()=>{n(r=>r??String(Ew++))},[e]),t?`radix-${t}`:""}var Iw=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],cn=Iw.reduce((e,t)=>{const n=T.forwardRef((r,i)=>{const{asChild:o,...s}=r,l=o?qo:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),L.jsx(l,{...s,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Wu(e){const t=T.useRef(e);return T.useEffect(()=>{t.current=e}),T.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Ds({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Aw({defaultProp:t,onChange:n}),o=e!==void 0,s=o?e:r,l=Wu(n),a=T.useCallback(u=>{if(o){const d=typeof u=="function"?u(e):u;d!==e&&l(d)}else i(u)},[o,e,i,l]);return[s,a]}function Aw({defaultProp:e,onChange:t}){const n=T.useState(e),[r]=n,i=T.useRef(r),o=Wu(t);return T.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}var Nw=T.createContext(void 0);function Ju(e){const t=T.useContext(Nw);return e||t||"ltr"}var bl="rovingFocusGroup.onEntryFocus",Lw={bubbles:!1,cancelable:!0},Vs="RovingFocusGroup",[Aa,c1,Fw]=ww(Vs),[Pw,Hs]=$s(Vs,[Fw]),[Mw,Rw]=Pw(Vs),d1=T.forwardRef((e,t)=>L.jsx(Aa.Provider,{scope:e.__scopeRovingFocusGroup,children:L.jsx(Aa.Slot,{scope:e.__scopeRovingFocusGroup,children:L.jsx(Ow,{...e,ref:t})})}));d1.displayName=Vs;var Ow=T.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:a,onEntryFocus:u,preventScrollOnEntryFocus:c=!1,...d}=e,h=T.useRef(null),f=Ta(t,h),p=Ju(o),[x=null,y]=Ds({prop:s,defaultProp:l,onChange:a}),[_,g]=T.useState(!1),m=Wu(u),b=c1(n),k=T.useRef(!1),[v,C]=T.useState(0);return T.useEffect(()=>{const E=h.current;if(E)return E.addEventListener(bl,m),()=>E.removeEventListener(bl,m)},[m]),L.jsx(Mw,{scope:n,orientation:r,dir:p,loop:i,currentTabStopId:x,onItemFocus:T.useCallback(E=>y(E),[y]),onItemShiftTab:T.useCallback(()=>g(!0),[]),onFocusableItemAdd:T.useCallback(()=>C(E=>E+1),[]),onFocusableItemRemove:T.useCallback(()=>C(E=>E-1),[]),children:L.jsx(cn.div,{tabIndex:_||v===0?-1:0,"data-orientation":r,...d,ref:f,style:{outline:"none",...e.style},onMouseDown:Tn(e.onMouseDown,()=>{k.current=!0}),onFocus:Tn(e.onFocus,E=>{const I=!k.current;if(E.target===E.currentTarget&&I&&!_){const F=new CustomEvent(bl,Lw);if(E.currentTarget.dispatchEvent(F),!F.defaultPrevented){const P=b().filter(Q=>Q.focusable),R=P.find(Q=>Q.active),M=P.find(Q=>Q.id===x),B=[R,M,...P].filter(Boolean).map(Q=>Q.ref.current);p1(B,c)}}k.current=!1}),onBlur:Tn(e.onBlur,()=>g(!1))})})}),f1="RovingFocusGroupItem",h1=T.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...s}=e,l=Tw(),a=o||l,u=Rw(f1,n),c=u.currentTabStopId===a,d=c1(n),{onFocusableItemAdd:h,onFocusableItemRemove:f}=u;return T.useEffect(()=>{if(r)return h(),()=>f()},[r,h,f]),L.jsx(Aa.ItemSlot,{scope:n,id:a,focusable:r,active:i,children:L.jsx(cn.span,{tabIndex:c?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:Tn(e.onMouseDown,p=>{r?u.onItemFocus(a):p.preventDefault()}),onFocus:Tn(e.onFocus,()=>u.onItemFocus(a)),onKeyDown:Tn(e.onKeyDown,p=>{if(p.key==="Tab"&&p.shiftKey){u.onItemShiftTab();return}if(p.target!==p.currentTarget)return;const x=Vw(p,u.orientation,u.dir);if(x!==void 0){if(p.metaKey||p.ctrlKey||p.altKey||p.shiftKey)return;p.preventDefault();let _=d().filter(g=>g.focusable).map(g=>g.ref.current);if(x==="last")_.reverse();else if(x==="prev"||x==="next"){x==="prev"&&_.reverse();const g=_.indexOf(p.currentTarget);_=u.loop?Hw(_,g+1):_.slice(g+1)}setTimeout(()=>p1(_))}})})})});h1.displayName=f1;var $w={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Dw(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Vw(e,t,n){const r=Dw(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return $w[r]}function p1(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Hw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var g1=d1,Ku=h1,Bw="Separator",Sf="horizontal",zw=["horizontal","vertical"],m1=T.forwardRef((e,t)=>{const{decorative:n,orientation:r=Sf,...i}=e,o=jw(r)?r:Sf,l=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return L.jsx(cn.div,{"data-orientation":o,...l,...i,ref:t})});m1.displayName=Bw;function jw(e){return zw.includes(e)}var Uw=m1,Ww="Toggle",x1=T.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r=!1,onPressedChange:i,...o}=e,[s=!1,l]=Ds({prop:n,onChange:i,defaultProp:r});return L.jsx(cn.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...o,ref:t,onClick:Tn(e.onClick,()=>{e.disabled||l(!s)})})});x1.displayName=Ww;var $r="ToggleGroup",[y1,_1]=$s($r,[Hs]),b1=Hs(),Zu=w.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const i=r;return L.jsx(Jw,{...i,ref:t})}if(n==="multiple"){const i=r;return L.jsx(Kw,{...i,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${$r}\``)});Zu.displayName=$r;var[v1,C1]=y1($r),Jw=w.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...o}=e,[s,l]=Ds({prop:n,defaultProp:r,onChange:i});return L.jsx(v1,{scope:e.__scopeToggleGroup,type:"single",value:s?[s]:[],onItemActivate:l,onItemDeactivate:w.useCallback(()=>l(""),[l]),children:L.jsx(w1,{...o,ref:t})})}),Kw=w.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...o}=e,[s=[],l]=Ds({prop:n,defaultProp:r,onChange:i}),a=w.useCallback(c=>l((d=[])=>[...d,c]),[l]),u=w.useCallback(c=>l((d=[])=>d.filter(h=>h!==c)),[l]);return L.jsx(v1,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:a,onItemDeactivate:u,children:L.jsx(w1,{...o,ref:t})})});Zu.displayName=$r;var[Zw,Gw]=y1($r),w1=w.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:o,dir:s,loop:l=!0,...a}=e,u=b1(n),c=Ju(s),d={role:"group",dir:c,...a};return L.jsx(Zw,{scope:n,rovingFocus:i,disabled:r,children:i?L.jsx(g1,{asChild:!0,...u,orientation:o,dir:c,loop:l,children:L.jsx(cn.div,{...d,ref:t})}):L.jsx(cn.div,{...d,ref:t})})}),Yo="ToggleGroupItem",k1=w.forwardRef((e,t)=>{const n=C1(Yo,e.__scopeToggleGroup),r=Gw(Yo,e.__scopeToggleGroup),i=b1(e.__scopeToggleGroup),o=n.value.includes(e.value),s=r.disabled||e.disabled,l={...e,pressed:o,disabled:s},a=w.useRef(null);return r.rovingFocus?L.jsx(Ku,{asChild:!0,...i,focusable:!s,active:o,ref:a,children:L.jsx(Ef,{...l,ref:t})}):L.jsx(Ef,{...l,ref:t})});k1.displayName=Yo;var Ef=w.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...i}=e,o=C1(Yo,n),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=o.type==="single"?s:void 0;return L.jsx(x1,{...l,...i,ref:t,onPressedChange:a=>{a?o.onItemActivate(r):o.onItemDeactivate(r)}})}),qw=Zu,Yw=k1,Gu="Toolbar",[Xw,Z6]=$s(Gu,[Hs,_1]),qu=Hs(),S1=_1(),[Qw,E1]=Xw(Gu),T1=T.forwardRef((e,t)=>{const{__scopeToolbar:n,orientation:r="horizontal",dir:i,loop:o=!0,...s}=e,l=qu(n),a=Ju(i);return L.jsx(Qw,{scope:n,orientation:r,dir:a,children:L.jsx(g1,{asChild:!0,...l,orientation:r,dir:a,loop:o,children:L.jsx(cn.div,{role:"toolbar","aria-orientation":r,dir:a,...s,ref:t})})})});T1.displayName=Gu;var I1="ToolbarSeparator",A1=T.forwardRef((e,t)=>{const{__scopeToolbar:n,...r}=e,i=E1(I1,n);return L.jsx(Uw,{orientation:i.orientation==="horizontal"?"vertical":"horizontal",...r,ref:t})});A1.displayName=I1;var e3="ToolbarButton",Yu=T.forwardRef((e,t)=>{const{__scopeToolbar:n,...r}=e,i=qu(n);return L.jsx(Ku,{asChild:!0,...i,focusable:!e.disabled,children:L.jsx(cn.button,{type:"button",...r,ref:t})})});Yu.displayName=e3;var t3="ToolbarLink",n3=T.forwardRef((e,t)=>{const{__scopeToolbar:n,...r}=e,i=qu(n);return L.jsx(Ku,{asChild:!0,...i,focusable:!0,children:L.jsx(cn.a,{...r,ref:t,onKeyDown:Tn(e.onKeyDown,o=>{o.key===" "&&o.currentTarget.click()})})})});n3.displayName=t3;var N1="ToolbarToggleGroup",L1=T.forwardRef((e,t)=>{const{__scopeToolbar:n,...r}=e,i=E1(N1,n),o=S1(n);return L.jsx(qw,{"data-orientation":i.orientation,dir:i.dir,...o,...r,ref:t,rovingFocus:!1})});L1.displayName=N1;var r3="ToolbarToggleItem",F1=T.forwardRef((e,t)=>{const{__scopeToolbar:n,...r}=e,i=S1(n),o={__scopeToolbar:e.__scopeToolbar};return L.jsx(Yu,{asChild:!0,...o,children:L.jsx(Yw,{...i,...r,ref:t})})});F1.displayName=r3;var i3=T1,o3=A1,P1=Yu,M1=L1,s3=F1;function l3(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var a3=l3(function(e){const t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});const u3=new Set(["http:","https:","mailto:","sms:","tel:"]);let Dr=class R1 extends Ot{static getType(){return"link"}static clone(t){return new R1(t.__url,{rel:t.__rel,target:t.__target,title:t.__title},t.__key)}constructor(t="",n={},r){super(r);const{target:i=null,rel:o=null,title:s=null}=n;this.__url=t,this.__target=i,this.__rel=o,this.__title=s}createDOM(t){const n=document.createElement("a");return n.href=this.sanitizeUrl(this.__url),this.__target!==null&&(n.target=this.__target),this.__rel!==null&&(n.rel=this.__rel),this.__title!==null&&(n.title=this.__title),Mt(n,t.theme.link),n}updateDOM(t,n,r){if(Dh(n)){const i=this.__url,o=this.__target,s=this.__rel,l=this.__title;i!==t.__url&&(n.href=i),o!==t.__target&&(o?n.target=o:n.removeAttribute("target")),s!==t.__rel&&(s?n.rel=s:n.removeAttribute("rel")),l!==t.__title&&(l?n.title=l:n.removeAttribute("title"))}return!1}static importDOM(){return{a:t=>({conversion:c3,priority:1})}}static importJSON(t){return rr().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setURL(t.url).setRel(t.rel||null).setTarget(t.target||null).setTitle(t.title||null)}sanitizeUrl(t){try{const n=new URL(t);if(!u3.has(n.protocol))return"about:blank"}catch{return t}return t}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(t){const n=this.getWritable();return n.__url=t,n}getTarget(){return this.getLatest().__target}setTarget(t){const n=this.getWritable();return n.__target=t,n}getRel(){return this.getLatest().__rel}setRel(t){const n=this.getWritable();return n.__rel=t,n}getTitle(){return this.getLatest().__title}setTitle(t){const n=this.getWritable();return n.__title=t,n}insertNewAfter(t,n=!0){const r=rr(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(r,n),r}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(t,n,r){if(!D(n))return!1;const i=n.anchor.getNode(),o=n.focus.getNode();return this.isParentOf(i)&&this.isParentOf(o)&&n.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}};function c3(e){let t=null;if(Dh(e)){const n=e.textContent;(n!==null&&n!==""||e.children.length>0)&&(t=rr(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function rr(e="",t){return dt(new Dr(e,t))}function jt(e){return e instanceof Dr}let Bs=class O1 extends Dr{constructor(t="",n={},r){super(t,n,r),this.__isUnlinked=n.isUnlinked!==void 0&&n.isUnlinked!==null&&n.isUnlinked}static getType(){return"autolink"}static clone(t){return new O1(t.__url,{isUnlinked:t.__isUnlinked,rel:t.__rel,target:t.__target,title:t.__title},t.__key)}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(t){const n=this.getWritable();return n.__isUnlinked=t,n}createDOM(t){return this.__isUnlinked?document.createElement("span"):super.createDOM(t)}updateDOM(t,n,r){return super.updateDOM(t,n,r)||t.__isUnlinked!==this.__isUnlinked}static importJSON(t){return Na().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setIsUnlinked(t.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(t,n=!0){const r=this.getParentOrThrow().insertNewAfter(t,n);if(O(r)){const i=Na(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return r.append(i),i}return null}};function Na(e="",t){return dt(new Bs(e,t))}function Kn(e){return e instanceof Bs}const Nr=fn();function Tf(e,t){if(e.type==="element"){const n=e.getNode();return O(n)||a3(252),n.getChildren()[e.offset+t]||null}return null}function vl(e,t={}){const{target:n,title:r}=t,i=t.rel===void 0?"noreferrer":t.rel,o=U();if(!D(o))return;const s=o.extract();if(e===null)return void s.forEach(u=>{const c=sr(u,d=>!Kn(d)&&jt(d));if(c){const d=c.getChildren();for(let h=0;h<d.length;h++)c.insertBefore(d[h]);c.remove()}});const l=new Set,a=u=>{l.has(u.getKey())||(l.add(u.getKey()),u.setURL(e),n!==void 0&&u.setTarget(n),i!==void 0&&u.setRel(i),r!==void 0&&u.setTitle(r))};if(s.length===1){const u=If(s[0],jt);if(u!==null)return a(u)}(function(u){const c=U();if(!D(c))return u();const d=Er(c),h=d.isBackward(),f=Tf(d.anchor,h?-1:0),p=Tf(d.focus,h?0:-1);if(u(),f||p){const x=U();if(D(x)){const y=x.clone();if(f){const _=f.getParent();_&&y.anchor.set(_.getKey(),f.getIndexWithinParent()+(h?1:0),"element")}if(p){const _=p.getParent();_&&y.focus.set(_.getKey(),p.getIndexWithinParent()+(h?0:1),"element")}Ye(Er(y))}}})(()=>{let u=null;for(const c of s){if(!c.isAttached())continue;const d=If(c,jt);if(d){a(d);continue}if(O(c)){if(!c.isInline())continue;if(jt(c)){if(!(Kn(c)||u!==null&&u.getParentOrThrow().isParentOf(c))){a(c),u=c;continue}for(const f of c.getChildren())c.insertBefore(f);c.remove();continue}}const h=c.getPreviousSibling();jt(h)&&h.is(u)?h.append(c):(u=rr(e,{rel:i,target:n,title:r}),c.insertAfter(u),u.append(c))}})}function If(e,t){let n=e;for(;n!==null&&n.getParent()!==null&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}const d3={testNode:"link",visitNode({mdastNode:e,actions:t}){t.addAndStepInto(rr(e.url,{title:e.title}))}},f3={testLexicalNode:jt,visitLexicalNode:({lexicalNode:e,actions:t})=>{t.addAndStepInto("link",{url:e.getURL(),title:e.getTitle()})}};function h3({validateUrl:e,attributes:t}){const[n]=it();return T.useEffect(()=>{if(!n.hasNodes([Dr]))throw new Error("LinkPlugin: LinkNode not registered on editor");return ft(n.registerCommand(Nr,r=>{if(r===null)return vl(r),!0;if(typeof r=="string")return!(e!==void 0&&!e(r))&&(vl(r,t),!0);{const{url:i,target:o,rel:s,title:l}=r;return vl(i,{...t,rel:s,target:o,title:l}),!0}},Se),e!==void 0?n.registerCommand(Ei,r=>{const i=U();if(!D(i)||i.isCollapsed()||!kn(r,ClipboardEvent))return!1;const o=r;if(o.clipboardData===null)return!1;const s=o.clipboardData.getData("text");return!!e(s)&&!i.getNodes().some(l=>O(l))&&(n.dispatchCommand(Nr,{...t,url:s}),r.preventDefault(),!0)},Se):()=>{})},[n,e,t]),null}function p3(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var g3=p3(function(e){const t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});function Af(e,t=n=>n){return n=>{const r=e.exec(n);return r===null?null:{index:r.index,length:r[0].length,text:r[0],url:t(r[0])}}}function $1(e,t){for(let n=0;n<t.length;n++){const r=t[n](e);if(r)return r}return null}const m3=/[.,;\s]/;function Xo(e){return m3.test(e)}function D1(e){return Xo(e[e.length-1])}function La(e){return Xo(e[0])}function V1(e){let t=e.getPreviousSibling();return O(t)&&(t=t.getLastDescendant()),t===null||Lt(t)||z(t)&&D1(t.getTextContent())}function H1(e){let t=e.getNextSibling();return O(t)&&(t=t.getFirstDescendant()),t===null||Lt(t)||z(t)&&La(t.getTextContent())}function x3(e,t,n,r){return(e>0?Xo(n[e-1]):V1(r[0]))?t<n.length?Xo(n[t]):H1(r[r.length-1]):!1}function y3(e,t,n){const r=[],i=[],o=[];let s=0,l=0;const a=[...e];for(;a.length>0;){const u=a[0],c=u.getTextContent().length,d=l;l+c<=t?(r.push(u),s+=c):d>=n?o.push(u):i.push(u),l+=c,a.shift()}return[s,r,i,o]}function _3(e,t,n,r){const i=Na(r.url,r.attributes);if(e.length===1){let o,s=e[0];t===0?[o,s]=s.splitText(n):[,o,s]=s.splitText(t,n);const l=Ae(r.text);return l.setFormat(o.getFormat()),l.setDetail(o.getDetail()),l.setStyle(o.getStyle()),i.append(l),o.replace(i),s}if(e.length>1){const o=e[0];let s,l=o.getTextContent().length;t===0?s=o:[,s]=o.splitText(t);const a=[];let u;for(let f=1;f<e.length;f++){const p=e[f],x=p.getTextContent().length,y=l;if(y<n)if(l+x<=n)a.push(p);else{const[_,g]=p.splitText(n-y);a.push(_),u=g}l+=x}const c=U(),d=c?c.getNodes().find(z):void 0,h=Ae(s.getTextContent());return h.setFormat(s.getFormat()),h.setDetail(s.getDetail()),h.setStyle(s.getStyle()),i.append(h,...a),d&&d===s&&(D(c)?h.select(c.anchor.offset,c.focus.offset):He(c)&&h.select(0,h.getTextContent().length)),s.replace(i),u}}function Cl(e,t,n){const r=e.getChildren(),i=r.length;for(let a=0;a<i;a++){const u=r[a];if(!z(u)||!u.isSimpleText())return Co(e),void n(null,e.getURL())}const o=e.getTextContent(),s=$1(o,t);if(s===null||s.text!==o||!V1(e)||!H1(e))return Co(e),void n(null,e.getURL());const l=e.getURL();if(l!==s.url&&(e.setURL(s.url),n(s.url,l)),s.attributes){const a=e.getRel();a!==s.attributes.rel&&(e.setRel(s.attributes.rel||null),n(s.attributes.rel||null,a));const u=e.getTarget();u!==s.attributes.target&&(e.setTarget(s.attributes.target||null),n(s.attributes.target||null,u))}}function Co(e){const t=e.getChildren();for(let n=t.length-1;n>=0;n--)e.insertAfter(t[n]);return e.remove(),t.map(n=>n.getLatest())}function b3(e,t,n){T.useEffect(()=>{e.hasNodes([Bs])||g3(77);const r=(i,o)=>{n&&n(i,o)};return ft(e.registerNodeTransform(pn,i=>{const o=i.getParentOrThrow(),s=i.getPreviousSibling();if(Kn(o)&&!o.getIsUnlinked())Cl(o,t,r);else if(!jt(o)){if(i.isSimpleText()&&(La(i.getTextContent())||!Kn(s))){const l=function(a){const u=[a];let c=a.getNextSibling();for(;c!==null&&z(c)&&c.isSimpleText()&&(u.push(c),!/[\s]/.test(c.getTextContent()));)c=c.getNextSibling();return u}(i);(function(a,u,c){let d=[...a];const h=d.map(y=>y.getTextContent()).join("");let f,p=h,x=0;for(;(f=$1(p,u))&&f!==null;){const y=f.index,_=y+f.length;if(x3(x+y,x+_,h,d)){const[g,,m,b]=y3(d,x+y,x+_),k=_3(m,x+y-g,x+_-g,f);d=k?[k,...b]:b,c(f.url,null),x=0}else x+=_;p=p.substring(_)}})(l,t,r)}(function(l,a,u){const c=l.getPreviousSibling(),d=l.getNextSibling(),h=l.getTextContent();var f;!Kn(c)||c.getIsUnlinked()||La(h)&&(f=h,!(c.isEmailURI()?/^\.[a-zA-Z]{2,}/.test(f):/^\.[a-zA-Z0-9]{1,}/.test(f)))||(c.append(l),Cl(c,a,u),u(null,c.getURL())),!Kn(d)||d.getIsUnlinked()||D1(h)||(Co(d),Cl(d,a,u),u(null,d.getURL()))})(i,t,r)}}),e.registerCommand(Nr,i=>{const o=U();return i!==null||!D(o)||o.extract().forEach(s=>{const l=s.getParent();if(Kn(l))return l.setIsUnlinked(!l.getIsUnlinked()),l.markDirty(),!0}),!1},Se))},[e,t,n])}function v3({matchers:e,onChange:t}){const[n]=it();return b3(n,e,t),null}const C3=/((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/,w3=/(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/,k3=[Af(C3,e=>e.startsWith("http")?e:`https://${e}`),Af(w3,e=>`mailto:${e}`)],S3=()=>w.createElement(v3,{matchers:k3}),E3=re(!1),T3=Kt({init(e,t){const n=!!(t!=null&&t.disableAutoLink),r=t!=null&&t.validateUrl?{validateUrl:t.validateUrl}:{};e.pubIn({[Ms]:"link",[Ln]:d3,[lr]:[Dr,Bs],[ar]:f3,[E3]:n,[ur]:()=>w.createElement(w.Fragment,null,w.createElement(h3,{...r}),n?null:w.createElement(S3,null))})}});function Qr(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Ne(){return Ne=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ne.apply(null,arguments)}var B1={exports:{}},I3="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",A3=I3,N3=A3;function z1(){}function j1(){}j1.resetWarningCache=z1;var L3=function(){function e(r,i,o,s,l,a){if(a!==N3){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:j1,resetWarningCache:z1};return n.PropTypes=n,n};B1.exports=L3();var F3=B1.exports;const J=Kf(F3);var Te={};/** @license React v17.0.2
69
- * react-is.production.min.js
70
- *
71
- * Copyright (c) Facebook, Inc. and its affiliates.
72
- *
73
- * This source code is licensed under the MIT license found in the
74
- * LICENSE file in the root directory of this source tree.
75
- */var zs=60103,js=60106,zi=60107,ji=60108,Ui=60114,Wi=60109,Ji=60110,Ki=60112,Zi=60113,Xu=60120,Gi=60115,qi=60116,U1=60121,W1=60122,J1=60117,K1=60129,Z1=60131;if(typeof Symbol=="function"&&Symbol.for){var Ge=Symbol.for;zs=Ge("react.element"),js=Ge("react.portal"),zi=Ge("react.fragment"),ji=Ge("react.strict_mode"),Ui=Ge("react.profiler"),Wi=Ge("react.provider"),Ji=Ge("react.context"),Ki=Ge("react.forward_ref"),Zi=Ge("react.suspense"),Xu=Ge("react.suspense_list"),Gi=Ge("react.memo"),qi=Ge("react.lazy"),U1=Ge("react.block"),W1=Ge("react.server.block"),J1=Ge("react.fundamental"),K1=Ge("react.debug_trace_mode"),Z1=Ge("react.legacy_hidden")}function $t(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case zs:switch(e=e.type,e){case zi:case Ui:case ji:case Zi:case Xu:return e;default:switch(e=e&&e.$$typeof,e){case Ji:case Ki:case qi:case Gi:case Wi:return e;default:return t}}case js:return t}}}var P3=Wi,M3=zs,R3=Ki,O3=zi,$3=qi,D3=Gi,V3=js,H3=Ui,B3=ji,z3=Zi;Te.ContextConsumer=Ji;Te.ContextProvider=P3;Te.Element=M3;Te.ForwardRef=R3;Te.Fragment=O3;Te.Lazy=$3;Te.Memo=D3;Te.Portal=V3;Te.Profiler=H3;Te.StrictMode=B3;Te.Suspense=z3;Te.isAsyncMode=function(){return!1};Te.isConcurrentMode=function(){return!1};Te.isContextConsumer=function(e){return $t(e)===Ji};Te.isContextProvider=function(e){return $t(e)===Wi};Te.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===zs};Te.isForwardRef=function(e){return $t(e)===Ki};Te.isFragment=function(e){return $t(e)===zi};Te.isLazy=function(e){return $t(e)===qi};Te.isMemo=function(e){return $t(e)===Gi};Te.isPortal=function(e){return $t(e)===js};Te.isProfiler=function(e){return $t(e)===Ui};Te.isStrictMode=function(e){return $t(e)===ji};Te.isSuspense=function(e){return $t(e)===Zi};Te.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===zi||e===Ui||e===K1||e===ji||e===Zi||e===Xu||e===Z1||typeof e=="object"&&e!==null&&(e.$$typeof===qi||e.$$typeof===Gi||e.$$typeof===Wi||e.$$typeof===Ji||e.$$typeof===Ki||e.$$typeof===J1||e.$$typeof===U1||e[0]===W1)};Te.typeOf=$t;let Nf=e=>typeof e=="object"&&e!=null&&e.nodeType===1,Lf=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",wl=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return Lf(n.overflowY,t)||Lf(n.overflowX,t)||(r=>{let i=(o=>{if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)})(e)}return!1},uo=(e,t,n,r,i,o,s,l)=>o<e&&s>t||o>e&&s<t?0:o<=e&&l<=n||s>=t&&l>=n?o-e-r:s>t&&l<n||o<e&&l>n?s-t+i:0,j3=e=>{let t=e.parentElement;return t??(e.getRootNode().host||null)};var U3=(e,t)=>{var n,r,i,o,s,l;if(typeof document>"u")return[];let{inline:a,boundary:u,skipOverflowHiddenElements:c}=t,d=typeof u=="function"?u:R=>R!==u;if(!Nf(e))throw new TypeError("Invalid target");let h=document.scrollingElement||document.documentElement,f=[],p=e;for(;Nf(p)&&d(p);){if(p=j3(p),p===h){f.push(p);break}p!=null&&p===document.body&&wl(p)&&!wl(document.documentElement)||p!=null&&wl(p,c)&&f.push(p)}let x=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,y=(o=(i=window.visualViewport)==null?void 0:i.height)!=null?o:innerHeight,_=(s=window.scrollX)!=null?s:pageXOffset,g=(l=window.scrollY)!=null?l:pageYOffset,{height:m,width:b,top:k,right:v,bottom:C,left:E}=e.getBoundingClientRect(),I=k,F=a==="center"?E+b/2:a==="end"?v:E,P=[];for(let R=0;R<f.length;R++){let M=f[R],{height:K,width:B,top:Q,right:Z,bottom:ne,left:ce}=M.getBoundingClientRect();if(k>=0&&E>=0&&C<=y&&v<=x&&k>=Q&&C<=ne&&E>=ce&&v<=Z)return P;let N=getComputedStyle(M),se=parseInt(N.borderLeftWidth,10),ee=parseInt(N.borderTopWidth,10),A=parseInt(N.borderRightWidth,10),ue=parseInt(N.borderBottomWidth,10),he=0,oe=0,H="offsetWidth"in M?M.offsetWidth-M.clientWidth-se-A:0,j="offsetHeight"in M?M.offsetHeight-M.clientHeight-ee-ue:0,q="offsetWidth"in M?M.offsetWidth===0?0:B/M.offsetWidth:0,Y="offsetHeight"in M?M.offsetHeight===0?0:K/M.offsetHeight:0;if(h===M)he=uo(g,g+y,y,ee,ue,g+I,g+I+m,m),oe=a==="start"?F:a==="center"?F-x/2:a==="end"?F-x:uo(_,_+x,x,se,A,_+F,_+F+b,b),he=Math.max(0,he+g),oe=Math.max(0,oe+_);else{he=uo(Q,ne,K,ee,ue+j,I,I+m,m),oe=a==="start"?F-ce-se:a==="center"?F-(ce+B/2)+H/2:a==="end"?F-Z+A+H:uo(ce,Z,B,se,A+H,F,F+b,b);let{scrollLeft:ie,scrollTop:de}=M;he=Math.max(0,Math.min(de+he/Y,M.scrollHeight-K/Y+j)),oe=Math.max(0,Math.min(ie+oe/q,M.scrollWidth-B/q+H)),I+=de-he,F+=ie-oe}P.push({el:M,top:he,left:oe})}return P},W3=0;function G1(){}function J3(e,t){if(e){var n=U3(e,{boundary:t});n.forEach(function(r){var i=r.el,o=r.top,s=r.left;i.scrollTop=o,i.scrollLeft=s})}}function Ff(e,t,n){var r=e===t||t instanceof n.Node&&e.contains&&e.contains(t);return r}function q1(e,t){var n;function r(){n&&clearTimeout(n)}function i(){for(var o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];r(),n=setTimeout(function(){n=null,e.apply(void 0,s)},t)}return i.cancel=r,i}function Xt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];return t.some(function(l){return l&&l.apply(void 0,[r].concat(o)),r.preventDownshiftDefault||r.hasOwnProperty("nativeEvent")&&r.nativeEvent.preventDownshiftDefault})}}function co(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){t.forEach(function(i){typeof i=="function"?i(r):i&&(i.current=r)})}}function K3(){return String(W3++)}function Z3(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(n===1?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""}function Fa(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=Y1(t,r)?t[r]:e[r],n},{})}function Y1(e,t){return e[t]!==void 0}function G3(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function fo(e,t,n,r,i){if(i===void 0&&(i=!0),n===0)return-1;var o=n-1;(typeof t!="number"||t<0||t>=n)&&(t=e>0?-1:o+1);var s=t+e;s<0?s=i?o:0:s>o&&(s=i?0:o);var l=wi(e,s,n,r,i);return l===-1?t>=n?-1:t:l}function wi(e,t,n,r,i){var o=r(t);if(!o||!o.hasAttribute("disabled"))return t;if(e>0){for(var s=t+1;s<n;s++)if(!r(s).hasAttribute("disabled"))return s}else for(var l=t-1;l>=0;l--)if(!r(l).hasAttribute("disabled"))return l;return i?e>0?wi(1,0,n,r,!1):wi(-1,n-1,n,r,!1):-1}function Pf(e,t,n,r){return r===void 0&&(r=!0),t.some(function(i){return i&&(Ff(i,e,n)||r&&Ff(i,n.document.activeElement,n))})}var q3=q1(function(e){X1(e).textContent=""},500);function Y3(e,t){var n=X1(t);e&&(n.textContent=e,q3(t))}function X1(e){e===void 0&&(e=document);var t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var X3=["isInitialMount","highlightedIndex","items","environment"],Q1={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function Q3(e,t,n){var r=e.props,i=e.type,o={};Object.keys(t).forEach(function(s){e7(s,e,t,n),n[s]!==t[s]&&(o[s]=n[s])}),r.onStateChange&&Object.keys(o).length&&r.onStateChange(Ne({type:i},o))}function e7(e,t,n,r){var i=t.props,o=t.type,s="on"+Qu(e)+"Change";i[s]&&r[e]!==void 0&&r[e]!==n[e]&&i[s](Ne({type:o},r))}function t7(e,t){return t.changes}function n7(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""}var r7=q1(function(e,t){Y3(e(),t)},200),i7=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?T.useLayoutEffect:T.useEffect;function o7(e){var t=e.id,n=t===void 0?"downshift-"+K3():t,r=e.labelId,i=e.menuId,o=e.getItemId,s=e.toggleButtonId,l=e.inputId,a=T.useRef({labelId:r||n+"-label",menuId:i||n+"-menu",getItemId:o||function(u){return n+"-item-"+u},toggleButtonId:s||n+"-toggle-button",inputId:l||n+"-input"});return a.current}function s7(e,t,n,r){var i,o;if(e===void 0){if(t===void 0)throw new Error(r);i=n[t],o=t}else o=t===void 0?n.indexOf(e):t,i=e;return[i,o]}function l7(e){return e?String(e):""}function Qu(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function em(e){var t=T.useRef(e);return t.current=e,t}function a7(e,t,n){var r=T.useRef(),i=T.useRef(),o=T.useCallback(function(h,f){i.current=f,h=Fa(h,f.props);var p=e(h,f),x=f.props.stateReducer(h,Ne({},f,{changes:p}));return x},[e]),s=T.useReducer(o,t),l=s[0],a=s[1],u=em(n),c=T.useCallback(function(h){return a(Ne({props:u.current},h))},[u]),d=i.current;return T.useEffect(function(){d&&r.current&&r.current!==l&&Q3(d,Fa(r.current,d.props),l),r.current=l},[l,n,d]),[l,c]}var di={itemToString:l7,stateReducer:t7,getA11ySelectionMessage:n7,scrollIntoView:J3,environment:typeof window>"u"?{}:window};function Wt(e,t,n){n===void 0&&(n=Q1);var r=e["default"+Qu(t)];return r!==void 0?r:n[t]}function ho(e,t,n){n===void 0&&(n=Q1);var r=e[t];if(r!==void 0)return r;var i=e["initial"+Qu(t)];return i!==void 0?i:Wt(e,t,n)}function u7(e){var t=ho(e,"selectedItem"),n=ho(e,"isOpen"),r=ho(e,"highlightedIndex"),i=ho(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:i}}function fi(e,t,n){var r=e.items,i=e.initialHighlightedIndex,o=e.defaultHighlightedIndex,s=t.selectedItem,l=t.highlightedIndex;return r.length===0?-1:i!==void 0&&l===i?i:o!==void 0?o:s?r.indexOf(s):n===0?-1:n<0?r.length-1:0}function c7(e,t,n,r){var i=T.useRef({isMouseDown:!1,isTouchMove:!1});return T.useEffect(function(){if((n==null?void 0:n.addEventListener)!=null){var o=function(){i.current.isMouseDown=!0},s=function(d){i.current.isMouseDown=!1,e&&!Pf(d.target,t.map(function(h){return h.current}),n)&&r()},l=function(){i.current.isTouchMove=!1},a=function(){i.current.isTouchMove=!0},u=function(d){e&&!i.current.isTouchMove&&!Pf(d.target,t.map(function(h){return h.current}),n,!1)&&r()};return n.addEventListener("mousedown",o),n.addEventListener("mouseup",s),n.addEventListener("touchstart",l),n.addEventListener("touchmove",a),n.addEventListener("touchend",u),function(){n.removeEventListener("mousedown",o),n.removeEventListener("mouseup",s),n.removeEventListener("touchstart",l),n.removeEventListener("touchmove",a),n.removeEventListener("touchend",u)}}},[e,n]),i}var d7=function(){return G1};function Mf(e,t,n){var r=n.isInitialMount,i=n.highlightedIndex,o=n.items,s=n.environment,l=Qr(n,X3);T.useEffect(function(){r||r7(function(){return e(Ne({highlightedIndex:i,highlightedItem:o[i],resultCount:o.length},l))},s.document)},t)}function f7(e){var t=e.highlightedIndex,n=e.isOpen,r=e.itemRefs,i=e.getItemNodeFromIndex,o=e.menuElement,s=e.scrollIntoView,l=T.useRef(!0);return i7(function(){t<0||!n||!Object.keys(r.current).length||(l.current===!1?l.current=!0:s(i(t),o))},[t]),l}var h7=G1;function Rf(e,t,n){var r;n===void 0&&(n=!0);var i=((r=e.items)==null?void 0:r.length)&&t>=0;return Ne({isOpen:!1,highlightedIndex:-1},i&&Ne({selectedItem:e.items[t],isOpen:Wt(e,"isOpen"),highlightedIndex:Wt(e,"highlightedIndex")},n&&{inputValue:e.itemToString(e.items[t])}))}function p7(e,t,n){var r=t.type,i=t.props,o;switch(r){case n.ItemMouseMove:o={highlightedIndex:t.disabled?-1:t.index};break;case n.MenuMouseLeave:o={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:o={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:fi(i,e,0)};break;case n.FunctionOpenMenu:o={isOpen:!0,highlightedIndex:fi(i,e,0)};break;case n.FunctionCloseMenu:o={isOpen:!1};break;case n.FunctionSetHighlightedIndex:o={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:o={inputValue:t.inputValue};break;case n.FunctionReset:o={highlightedIndex:Wt(i,"highlightedIndex"),isOpen:Wt(i,"isOpen"),selectedItem:Wt(i,"selectedItem"),inputValue:Wt(i,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return Ne({},e,o)}J.array.isRequired,J.func,J.func,J.func,J.number,J.number,J.number,J.bool,J.bool,J.bool,J.any,J.any,J.any,J.string,J.string,J.string,J.func,J.string,J.func,J.func,J.func,J.func,J.func,J.shape({addEventListener:J.func,removeEventListener:J.func,document:J.shape({getElementById:J.func,activeElement:J.any,body:J.any})});function g7(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?"".concat(n," result").concat(n===1?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}wc(wc({},di),{getA11yStatusMessage:g7});var ec=0,tc=1,nc=2,rc=3,ic=4,oc=5,sc=6,lc=7,ac=8,Qo=9,uc=10,tm=11,nm=12,cc=13,rm=14,im=15,om=16,sm=17,lm=18,dc=19,am=20,um=21,fc=22,cm=Object.freeze({__proto__:null,InputKeyDownArrowDown:ec,InputKeyDownArrowUp:tc,InputKeyDownEscape:nc,InputKeyDownHome:rc,InputKeyDownEnd:ic,InputKeyDownPageUp:oc,InputKeyDownPageDown:sc,InputKeyDownEnter:lc,InputChange:ac,InputBlur:Qo,InputFocus:uc,MenuMouseLeave:tm,ItemMouseMove:nm,ItemClick:cc,ToggleButtonClick:rm,FunctionToggleMenu:im,FunctionOpenMenu:om,FunctionCloseMenu:sm,FunctionSetHighlightedIndex:lm,FunctionSelectItem:dc,FunctionSetInputValue:am,FunctionReset:um,ControlledPropUpdatedSelectedItem:fc});function m7(e){var t=u7(e),n=t.selectedItem,r=t.inputValue;return r===""&&n&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(r=e.itemToString(n)),Ne({},t,{inputValue:r})}J.array.isRequired,J.func,J.func,J.func,J.func,J.number,J.number,J.number,J.bool,J.bool,J.bool,J.any,J.any,J.any,J.string,J.string,J.string,J.string,J.string,J.string,J.func,J.string,J.string,J.func,J.func,J.func,J.func,J.func,J.func,J.shape({addEventListener:J.func,removeEventListener:J.func,document:J.shape({getElementById:J.func,activeElement:J.any,body:J.any})});function x7(e,t,n){var r=T.useRef(),i=a7(e,t,n),o=i[0],s=i[1];return T.useEffect(function(){Y1(n,"selectedItem")&&(n.selectedItemChanged(r.current,n.selectedItem)&&s({type:fc,inputValue:n.itemToString(n.selectedItem)}),r.current=o.selectedItem===r.current?n.selectedItem:o.selectedItem)},[o.selectedItem,n.selectedItem]),[Fa(o,n),s]}var y7=Ne({},di,{selectedItemChanged:function(t,n){return t!==n},getA11yStatusMessage:Z3});function _7(e,t){var n,r=t.type,i=t.props,o=t.altKey,s;switch(r){case cc:s={isOpen:Wt(i,"isOpen"),highlightedIndex:Wt(i,"highlightedIndex"),selectedItem:i.items[t.index],inputValue:i.itemToString(i.items[t.index])};break;case ec:e.isOpen?s={highlightedIndex:fo(1,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!0)}:s={highlightedIndex:o&&e.selectedItem==null?-1:fi(i,e,1,t.getItemNodeFromIndex),isOpen:i.items.length>=0};break;case tc:e.isOpen?o?s=Rf(i,e.highlightedIndex):s={highlightedIndex:fo(-1,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!0)}:s={highlightedIndex:fi(i,e,-1,t.getItemNodeFromIndex),isOpen:i.items.length>=0};break;case lc:s=Rf(i,e.highlightedIndex);break;case nc:s=Ne({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case oc:s={highlightedIndex:fo(-10,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!1)};break;case sc:s={highlightedIndex:fo(10,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!1)};break;case rc:s={highlightedIndex:wi(1,0,i.items.length,t.getItemNodeFromIndex,!1)};break;case ic:s={highlightedIndex:wi(-1,i.items.length-1,i.items.length,t.getItemNodeFromIndex,!1)};break;case Qo:s=Ne({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((n=i.items)==null?void 0:n.length)&&t.selectItem&&{selectedItem:i.items[e.highlightedIndex],inputValue:i.itemToString(i.items[e.highlightedIndex])});break;case ac:s={isOpen:!0,highlightedIndex:Wt(i,"highlightedIndex"),inputValue:t.inputValue};break;case uc:s={isOpen:!0,highlightedIndex:fi(i,e,0)};break;case dc:s={selectedItem:t.selectedItem,inputValue:i.itemToString(t.selectedItem)};break;case fc:s={inputValue:t.inputValue};break;default:return p7(e,t,cm)}return Ne({},e,s)}var b7=["onMouseLeave","refKey","ref"],v7=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],C7=["onClick","onPress","refKey","ref"],w7=["onKeyDown","onChange","onInput","onFocus","onBlur","onChangeText","refKey","ref"];dm.stateChangeTypes=cm;function dm(e){e===void 0&&(e={});var t=Ne({},y7,e),n=t.initialIsOpen,r=t.defaultIsOpen,i=t.items,o=t.scrollIntoView,s=t.environment,l=t.getA11yStatusMessage,a=t.getA11ySelectionMessage,u=t.itemToString,c=m7(t),d=x7(_7,c,t),h=d[0],f=d[1],p=h.isOpen,x=h.highlightedIndex,y=h.selectedItem,_=h.inputValue,g=T.useRef(null),m=T.useRef({}),b=T.useRef(null),k=T.useRef(null),v=T.useRef(!0),C=o7(t),E=T.useRef(),I=em({state:h,props:t}),F=T.useCallback(function(H){return m.current[C.getItemId(H)]},[C]);Mf(l,[p,x,_,i],Ne({isInitialMount:v.current,previousResultCount:E.current,items:i,environment:s,itemToString:u},h)),Mf(a,[y],Ne({isInitialMount:v.current,previousResultCount:E.current,items:i,environment:s,itemToString:u},h));var P=f7({menuElement:g.current,highlightedIndex:x,isOpen:p,itemRefs:m,scrollIntoView:o,getItemNodeFromIndex:F});h7({isInitialMount:v.current}),T.useEffect(function(){var H=n||r||p;H&&b.current&&b.current.focus()},[]),T.useEffect(function(){v.current||(E.current=i.length)});var R=c7(p,[b,g,k],s,function(){f({type:Qo,selectItem:!1})}),M=d7();T.useEffect(function(){return v.current=!1,function(){v.current=!0}},[]),T.useEffect(function(){var H;if(!p)m.current={};else if(((H=s.document)==null?void 0:H.activeElement)!==b.current){var j;b==null||(j=b.current)==null||j.focus()}},[p,s]);var K=T.useMemo(function(){return{ArrowDown:function(j){j.preventDefault(),f({type:ec,altKey:j.altKey,getItemNodeFromIndex:F})},ArrowUp:function(j){j.preventDefault(),f({type:tc,altKey:j.altKey,getItemNodeFromIndex:F})},Home:function(j){I.current.state.isOpen&&(j.preventDefault(),f({type:rc,getItemNodeFromIndex:F}))},End:function(j){I.current.state.isOpen&&(j.preventDefault(),f({type:ic,getItemNodeFromIndex:F}))},Escape:function(j){var q=I.current.state;(q.isOpen||q.inputValue||q.selectedItem||q.highlightedIndex>-1)&&(j.preventDefault(),f({type:nc}))},Enter:function(j){var q=I.current.state;!q.isOpen||j.which===229||(j.preventDefault(),f({type:lc,getItemNodeFromIndex:F}))},PageUp:function(j){I.current.state.isOpen&&(j.preventDefault(),f({type:oc,getItemNodeFromIndex:F}))},PageDown:function(j){I.current.state.isOpen&&(j.preventDefault(),f({type:sc,getItemNodeFromIndex:F}))}}},[f,I,F]),B=T.useCallback(function(H){return Ne({id:C.labelId,htmlFor:C.inputId},H)},[C]),Q=T.useCallback(function(H,j){var q,Y=H===void 0?{}:H,ie=Y.onMouseLeave,de=Y.refKey,Ie=de===void 0?"ref":de,De=Y.ref,je=Qr(Y,b7),Ue=j===void 0?{}:j;return Ue.suppressRefError,Ne((q={},q[Ie]=co(De,function(Ke){g.current=Ke}),q.id=C.menuId,q.role="listbox",q["aria-labelledby"]=je&&je["aria-label"]?void 0:""+C.labelId,q.onMouseLeave=Xt(ie,function(){f({type:tm})}),q),je)},[f,M,C]),Z=T.useCallback(function(H){var j,q,Y=H===void 0?{}:H,ie=Y.item,de=Y.index,Ie=Y.refKey,De=Ie===void 0?"ref":Ie,je=Y.ref,Ue=Y.onMouseMove,Ke=Y.onMouseDown,mn=Y.onClick;Y.onPress;var pt=Y.disabled,Dt=Qr(Y,v7),tt=I.current,zn=tt.props,Ct=tt.state,Ce=s7(ie,de,zn.items,"Pass either item or index to getItemProps!"),gt=Ce[1],$="onClick",V=mn,S=function(){gt!==Ct.highlightedIndex&&(P.current=!1,f({type:nm,index:gt,disabled:pt}))},le=function(){f({type:cc,index:gt})},fe=function(Zt){return Zt.preventDefault()};return Ne((j={},j[De]=co(je,function(ke){ke&&(m.current[C.getItemId(gt)]=ke)}),j.disabled=pt,j.role="option",j["aria-selected"]=""+(gt===Ct.highlightedIndex),j.id=C.getItemId(gt),j),!pt&&(q={},q[$]=Xt(V,le),q),{onMouseMove:Xt(Ue,S),onMouseDown:Xt(Ke,fe)},Dt)},[f,I,P,C]),ne=T.useCallback(function(H){var j,q=H===void 0?{}:H,Y=q.onClick;q.onPress;var ie=q.refKey,de=ie===void 0?"ref":ie,Ie=q.ref,De=Qr(q,C7),je=I.current.state,Ue=function(){f({type:rm})};return Ne((j={},j[de]=co(Ie,function(Ke){k.current=Ke}),j["aria-controls"]=C.menuId,j["aria-expanded"]=je.isOpen,j.id=C.toggleButtonId,j.tabIndex=-1,j),!De.disabled&&Ne({},{onClick:Xt(Y,Ue)}),De)},[f,I,C]),ce=T.useCallback(function(H,j){var q,Y=H===void 0?{}:H,ie=Y.onKeyDown,de=Y.onChange,Ie=Y.onInput,De=Y.onFocus,je=Y.onBlur;Y.onChangeText;var Ue=Y.refKey,Ke=Ue===void 0?"ref":Ue,mn=Y.ref,pt=Qr(Y,w7),Dt=j===void 0?{}:j;Dt.suppressRefError;var tt=I.current.state,zn=function(fe){var ke=G3(fe);ke&&K[ke]&&K[ke](fe)},Ct=function(fe){f({type:ac,inputValue:fe.target.value})},Ce=function(fe){if(tt.isOpen&&!R.current.isMouseDown){var ke=fe.relatedTarget===null&&s.document.activeElement!==s.document.body;f({type:Qo,selectItem:!ke})}},gt=function(){tt.isOpen||f({type:uc})},$="onChange",V={};if(!pt.disabled){var S;V=(S={},S[$]=Xt(de,Ie,Ct),S.onKeyDown=Xt(ie,zn),S.onBlur=Xt(je,Ce),S.onFocus=Xt(De,gt),S)}return Ne((q={},q[Ke]=co(mn,function(le){b.current=le}),q["aria-activedescendant"]=tt.isOpen&&tt.highlightedIndex>-1?C.getItemId(tt.highlightedIndex):"",q["aria-autocomplete"]="list",q["aria-controls"]=C.menuId,q["aria-expanded"]=tt.isOpen,q["aria-labelledby"]=pt&&pt["aria-label"]?void 0:""+C.labelId,q.autoComplete="off",q.id=C.inputId,q.role="combobox",q.value=tt.inputValue,q),V,pt)},[M,I,C,K,f,R,s]),N=T.useCallback(function(){f({type:im})},[f]),se=T.useCallback(function(){f({type:sm})},[f]),ee=T.useCallback(function(){f({type:om})},[f]),A=T.useCallback(function(H){f({type:lm,highlightedIndex:H})},[f]),ue=T.useCallback(function(H){f({type:dc,selectedItem:H})},[f]),he=T.useCallback(function(H){f({type:am,inputValue:H})},[f]),oe=T.useCallback(function(){f({type:um})},[f]);return{getItemProps:Z,getLabelProps:B,getMenuProps:Q,getInputProps:ce,getToggleButtonProps:ne,toggleMenu:N,openMenu:ee,closeMenu:se,setHighlightedIndex:A,setInputValue:he,selectItem:ue,reset:oe,highlightedIndex:x,isOpen:p,selectedItem:y,inputValue:_}}J.array,J.array,J.array,J.func,J.func,J.func,J.number,J.number,J.number,J.func,J.func,J.string,J.string,J.shape({addEventListener:J.func,removeEventListener:J.func,document:J.shape({getElementById:J.func,activeElement:J.any,body:J.any})});di.itemToString,di.stateReducer,di.environment;const Of=20,fm=e=>e.suggestions.length>0?w.createElement(k7,{...e}):w.createElement("input",{className:G.textInput,size:40,autoFocus:!0,...e.register(e.inputName)}),k7=({autofocus:e,suggestions:t,control:n,inputName:r,placeholder:i,initialInputValue:o,setValue:s})=>{const[l,a]=w.useState(t.slice(0,Of)),u=vt(On),c=t.length>0,{isOpen:d,getToggleButtonProps:h,getMenuProps:f,getInputProps:p,highlightedIndex:x,getItemProps:y,selectedItem:_}=dm({initialInputValue:o,onInputValueChange({inputValue:m=""}){s(r,m),m=m.toLowerCase()||"";const b=[];for(const k of t)if(k.toLowerCase().includes(m)&&(b.push(k),b.length>=Of))break;a(b)},items:l,itemToString(m){return m??""}}),g=d&&l.length>0;return w.createElement("div",{className:G.downshiftAutocompleteContainer},w.createElement("div",{"data-visible-dropdown":g,className:G.downshiftInputWrapper},w.createElement(v0,{name:r,control:n,render:({field:m})=>{const b=p();return w.createElement("input",{...b,name:m.name,placeholder:i,className:G.downshiftInput,size:30,"data-editor-dialog":!0,autoFocus:e})}}),c&&w.createElement("button",{"aria-label":"toggle menu",type:"button",...h()},u("arrow_drop_down"))),w.createElement("div",{className:G.downshiftAutocompleteContainer},w.createElement("ul",{...f(),"data-visible":g},l.map((m,b)=>w.createElement("li",{"data-selected":_===m,"data-highlighted":x===b,key:`${m}${b}`,...y({item:m,index:b})},m)))))},S7=()=>{const[e,t,n,r]=dn(Pa,Yn,Vi,Sn),i=xt(xm),o=xt(gm),s=gn(),{register:l,handleSubmit:a,control:u,setValue:c,reset:d}=ja({values:t.type==="editing"?t.initialValues:{}});return w.createElement(I0,{open:t.type!=="inactive",onOpenChange:h=>{h||(o(),d({src:"",title:"",altText:""}))}},w.createElement(A0,{container:n==null?void 0:n.current},w.createElement(N0,{className:G.dialogOverlay}),w.createElement(L0,{className:G.dialogContent,onOpenAutoFocus:h=>{h.preventDefault()}},w.createElement(F0,null,s("uploadImage.dialogTitle","Upload an image")),w.createElement("form",{onSubmit:h=>{a(i)(h),d({src:"",title:"",altText:""}),h.preventDefault(),h.stopPropagation()},className:G.multiFieldForm},r===null?w.createElement("input",{type:"hidden",accept:"image/*",...l("file")}):w.createElement("div",{className:G.formField},w.createElement("label",{htmlFor:"file"},s("uploadImage.uploadInstructions","Upload an image from your device:")),w.createElement("input",{type:"file",accept:"image/*",...l("file")})),w.createElement("div",{className:G.formField},w.createElement("label",{htmlFor:"src"},r!==null?s("uploadImage.addViaUrlInstructions","Or add an image from an URL:"):s("uploadImage.addViaUrlInstructionsNoUpload","Add an image from an URL:")),w.createElement(fm,{register:l,initialInputValue:t.type==="editing"?t.initialValues.src??"":"",inputName:"src",suggestions:e,setValue:c,control:u,placeholder:s("uploadImage.autoCompletePlaceholder","Select or paste an image src")})),w.createElement("div",{className:G.formField},w.createElement("label",{htmlFor:"alt"},s("uploadImage.alt","Alt:")),w.createElement("input",{type:"text",...l("altText"),className:G.textInput})),w.createElement("div",{className:G.formField},w.createElement("label",{htmlFor:"title"},s("uploadImage.title","Title:")),w.createElement("input",{type:"text",...l("title"),className:G.textInput})),w.createElement("div",{style:{display:"flex",justifyContent:"flex-end",gap:"var(--spacing-2)"}},w.createElement("button",{type:"submit",title:s("dialogControls.save","Save"),"aria-label":s("dialogControls.save","Save"),className:be(G.primaryButton)},s("dialogControls.save","Save")),w.createElement(P0,{asChild:!0},w.createElement("button",{type:"reset",title:s("dialogControls.cancel","Cancel"),"aria-label":s("dialogControls.cancel","Cancel"),className:be(G.secondaryButton)},s("dialogControls.cancel","Cancel"))))))))};function kl(e,t,n){return Math.min(Math.max(e,t),n)}const we={east:1,north:8,south:2,west:4};function E7({onResizeStart:e,onResizeEnd:t,imageRef:n,maxWidth:r,editor:i}){const o=T.useRef(null),s=T.useRef({priority:"",value:"default"}),l=T.useRef({currentHeight:0,currentWidth:0,direction:0,isResizing:!1,ratio:0,startHeight:0,startWidth:0,startX:0,startY:0}),a=i.getRootElement(),u=r||(a!==null?a.getBoundingClientRect().width-20:100),c=a!==null?a.getBoundingClientRect().height-20:100,d=100,h=100,f=g=>{const m=g===we.east||g===we.west,b=g===we.north||g===we.south,k=g&we.north&&g&we.west||g&we.south&&g&we.east,v=m?"ew":b?"ns":k?"nwse":"nesw";a!==null&&a.style.setProperty("cursor",`${v}-resize`,"important"),document.body!==null&&(document.body.style.setProperty("cursor",`${v}-resize`,"important"),s.current.value=document.body.style.getPropertyValue("-webkit-user-select"),s.current.priority=document.body.style.getPropertyPriority("-webkit-user-select"),document.body.style.setProperty("-webkit-user-select","none","important"))},p=()=>{a!==null&&a.style.setProperty("cursor","text"),document.body!==null&&(document.body.style.setProperty("cursor","default"),document.body.style.setProperty("-webkit-user-select",s.current.value,s.current.priority))},x=(g,m)=>{if(!i.isEditable())return;const b=n.current,k=o.current;if(b!==null&&k!==null){g.preventDefault();const{width:v,height:C}=b.getBoundingClientRect(),E=l.current;E.startWidth=v,E.startHeight=C,E.ratio=v/C,E.currentWidth=v,E.currentHeight=C,E.startX=g.clientX,E.startY=g.clientY,E.isResizing=!0,E.direction=m,f(m),e(),k.classList.add(G.imageControlWrapperResizing),b.style.height=`${C}px`,b.style.width=`${v}px`,document.addEventListener("pointermove",y),document.addEventListener("pointerup",_)}},y=g=>{const m=n.current,b=l.current,k=b.direction&(we.east|we.west),v=b.direction&(we.south|we.north);if(m!==null&&b.isResizing)if(k&&v){let C=Math.floor(b.startX-g.clientX);C=b.direction&we.east?-C:C;const E=kl(b.startWidth+C,d,u),I=E/b.ratio;m.style.width=`${E}px`,m.style.height=`${I}px`,b.currentHeight=I,b.currentWidth=E}else if(v){let C=Math.floor(b.startY-g.clientY);C=b.direction&we.south?-C:C;const E=kl(b.startHeight+C,h,c);m.style.height=`${E}px`,b.currentHeight=E}else{let C=Math.floor(b.startX-g.clientX);C=b.direction&we.east?-C:C;const E=kl(b.startWidth+C,d,u);m.style.width=`${E}px`,b.currentWidth=E}},_=()=>{const g=n.current,m=l.current,b=o.current;if(g!==null&&b!==null&&m.isResizing){const k=m.currentWidth,v=m.currentHeight;m.startWidth=0,m.startHeight=0,m.ratio=0,m.startX=0,m.startY=0,m.currentWidth=0,m.currentHeight=0,m.isResizing=!1,b.classList.remove(G.imageControlWrapperResizing),p(),t(k,v),document.removeEventListener("pointermove",y),document.removeEventListener("pointerup",_)}};return T.createElement("div",{ref:o},T.createElement("div",{className:be(G.imageResizer,G.imageResizerN),onPointerDown:g=>{x(g,we.north)}}),T.createElement("div",{className:be(G.imageResizer,G.imageResizerNe),onPointerDown:g=>{x(g,we.north|we.east)}}),T.createElement("div",{className:be(G.imageResizer,G.imageResizerE),onPointerDown:g=>{x(g,we.east)}}),T.createElement("div",{className:be(G.imageResizer,G.imageResizerSe),onPointerDown:g=>{x(g,we.south|we.east)}}),T.createElement("div",{className:be(G.imageResizer,G.imageResizerS),onPointerDown:g=>{x(g,we.south)}}),T.createElement("div",{className:be(G.imageResizer,G.imageResizerSw),onPointerDown:g=>{x(g,we.south|we.west)}}),T.createElement("div",{className:be(G.imageResizer,G.imageResizerW),onPointerDown:g=>{x(g,we.west)}}),T.createElement("div",{className:be(G.imageResizer,G.imageResizerNw),onPointerDown:g=>{x(g,we.north|we.west)}}))}const $f=new Set;function T7(e){if(!$f.has(e))throw new Promise(t=>{const n=new Image;n.src=e,n.onerror=n.onload=()=>{$f.add(e),t(null)}})}function I7({title:e,alt:t,className:n,imageRef:r,src:i,width:o,height:s}){return T7(i),w.createElement("img",{className:n??void 0,alt:t,src:i,title:e,ref:r,draggable:"false",width:o,height:s})}function A7({src:e,title:t,alt:n,nodeKey:r,width:i,height:o,rest:s}){const[l,a,u,c,d]=dn(Ma,mm,Ra,On,un),h=xt(pm),f=w.useRef(null),p=w.useRef(null),[x,y,_]=Hg(r),[g]=it(),[m,b]=w.useState(null),k=w.useRef(null),[v,C]=w.useState(!1),[E,I]=w.useState(null),[F,P]=w.useState(null),R=gn(),M=w.useCallback(se=>{if(x&&He(U())){se.preventDefault();const A=Re(r);es(A)&&A.remove()}return!1},[x,r]),K=w.useCallback(se=>{const ee=U(),A=p.current;return x&&He(ee)&&ee.getNodes().length===1&&A!==null&&A!==document.activeElement?(se.preventDefault(),A.focus(),!0):!1},[x]),B=w.useCallback(se=>p.current===se.target?(Ye(null),g.update(()=>{y(!0);const ee=g.getRootElement();ee!==null&&ee.focus()}),!0):!1,[g,y]);w.useEffect(()=>{u?(async()=>{F||P(e);const ee=await u(e);I(ee)})().catch(ee=>{console.error(ee)}):I(e)},[e,u,F]),w.useEffect(()=>{let se=!0;const ee=ft(g.registerUpdateListener(({editorState:A})=>{se&&b(A.read(()=>U()))}),g.registerCommand(Si,(A,ue)=>(k.current=ue,!1),Se),g.registerCommand(ls,A=>{const ue=A;return v?!0:ue.target===f.current?(ue.shiftKey?y(!x):(_(),y(!0)),!0):!1},Se),g.registerCommand(fs,A=>A.target===f.current?(A.preventDefault(),!0):!1,Se),g.registerCommand(ds,M,Se),g.registerCommand(cs,M,Se),g.registerCommand(mi,K,Se),g.registerCommand(Ti,B,Se));return()=>{se=!1,ee()}},[_,g,v,x,r,M,K,B,y]);const Q=(se,ee)=>{setTimeout(()=>{C(!1)},200),g.update(()=>{const A=Re(r);es(A)&&A.setWidthAndHeight(se,ee)})},Z=()=>{C(!0)},ne=He(m),ce=x,N=w.useMemo(()=>{if(s.length===0)return null;const se=s.find(ee=>ee.type==="mdxJsxAttribute"&&(ee.name==="class"||ee.name==="className"));return se?se.value:null},[s]);return E!==null?w.createElement(w.Suspense,{fallback:null},w.createElement("div",{className:G.imageWrapper,"data-editor-block-type":"image"},w.createElement("div",{draggable:ne},w.createElement(I7,{width:i,height:o,className:be({[G.focusedImage]:ce},N),src:E,title:t??"",alt:n??"",imageRef:f})),ne&&ce&&!l&&w.createElement(E7,{editor:g,imageRef:f,onResizeStart:Z,onResizeEnd:Q}),d||w.createElement("div",{className:G.editImageToolbar},w.createElement("button",{className:G.iconButton,type:"button",title:R("imageEditor.deleteImage","Delete image"),disabled:d,onClick:se=>{se.preventDefault(),g.update(()=>{var ee;(ee=Re(r))==null||ee.remove()})}},c("delete_small")),!a&&w.createElement("button",{type:"button",className:be(G.iconButton,G.editImageButton),title:R("imageEditor.editImage","Edit image"),disabled:d,onClick:()=>{h({nodeKey:r,initialValues:{src:F||E,title:t??"",altText:n??""}})}},c("settings"))))):null}var N7=Object.defineProperty,L7=(e,t,n)=>t in e?N7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pr=(e,t,n)=>(L7(e,typeof t!="symbol"?t+"":t,n),n);function F7(e){if(e instanceof HTMLImageElement){const{alt:t,src:n,title:r,width:i,height:o}=e;return{node:cr({altText:t,src:n,title:r,width:i,height:o})}}return null}class Yi extends Mi{constructor(t,n,r,i,o,s,l){super(l),pr(this,"__src"),pr(this,"__altText"),pr(this,"__title"),pr(this,"__width"),pr(this,"__height"),pr(this,"__rest"),this.__src=t,this.__title=r,this.__altText=n,this.__width=i||"inherit",this.__height=o||"inherit",this.__rest=s??[]}static getType(){return"image"}static clone(t){return new Yi(t.__src,t.__altText,t.__title,t.__width,t.__height,t.__rest,t.__key)}static importJSON(t){const{altText:n,title:r,src:i,width:o,rest:s,height:l}=t;return cr({altText:n,title:r,src:i,height:l,width:o,rest:s})}exportDOM(){const t=document.createElement("img");return t.setAttribute("src",this.__src),t.setAttribute("alt",this.__altText),this.__title&&t.setAttribute("title",this.__title),this.__width&&t.setAttribute("width",this.__width.toString()),this.__height&&t.setAttribute("height",this.__height.toString()),{element:t}}static importDOM(){return{img:()=>({conversion:F7,priority:0})}}exportJSON(){return{altText:this.getAltText(),title:this.getTitle(),height:this.__height==="inherit"?0:this.__height,width:this.__width==="inherit"?0:this.__width,src:this.getSrc(),rest:this.__rest,type:"image",version:1}}setWidthAndHeight(t,n){const r=this.getWritable();r.__width=t,r.__height=n}createDOM(t){const n=document.createElement("span"),i=t.theme.image;return i!==void 0&&(n.className=i),n}updateDOM(){return!1}getSrc(){return this.__src}getAltText(){return this.__altText}getTitle(){return this.__title}getHeight(){return this.__height}getWidth(){return this.__width}getRest(){return this.__rest}setTitle(t){this.getWritable().__title=t}setSrc(t){this.getWritable().__src=t}setAltText(t){this.getWritable().__altText=t??""}shouldBeSerializedAsElement(){return this.__width!=="inherit"||this.__height!=="inherit"||this.__rest.length>0}decorate(t){return w.createElement(A7,{src:this.getSrc(),title:this.getTitle(),nodeKey:this.getKey(),width:this.__width,height:this.__height,alt:this.__altText,rest:this.__rest})}}function cr(e){const{altText:t,title:n,src:r,key:i,width:o,height:s,rest:l}=e;return new Yi(r,t,n,o,s,l,i)}function es(e){return e instanceof Yi}const P7={testLexicalNode:es,visitLexicalNode({mdastParent:e,lexicalNode:t,actions:n}){if(t.shouldBeSerializedAsElement()){const r=new Image;t.getHeight()!=="inherit"&&(r.height=t.getHeight()),t.getWidth()!=="inherit"&&(r.width=t.getWidth()),t.getAltText()&&(r.alt=t.getAltText()),t.getTitle()&&(r.title=t.getTitle());for(const i of t.getRest())i.type==="mdxJsxAttribute"&&typeof i.value=="string"&&r.setAttribute(i.name,i.value);n.appendToParent(e,{type:"html",value:r.outerHTML.replace(/>$/,` src="${t.getSrc()}" />`)})}else n.appendToParent(e,{type:"image",url:t.getSrc(),alt:t.getAltText(),title:t.getTitle()})}},M7={testNode:"image",visitNode({mdastNode:e,actions:t}){t.addAndStepInto(cr({src:e.url,altText:e.alt??"",title:e.title??""}))}},R7={testNode:e=>e.type==="html"&&e.value.trim().startsWith("<img"),visitNode({mdastNode:e,lexicalParent:t}){const n=document.createElement("div");n.innerHTML=e.value;const r=n.querySelector("img");if(!r)throw new Error("Invalid HTML image");const i=r.src,o=r.alt,s=r.title,l=r.width,a=r.height,u=cr({src:i||"",altText:o,title:s,width:l,height:a});if(t.getType()==="root"){const c=_e();c.append(u),t.append(c)}else t.append(u)}};function Zr(e,t){const n=e.attributes.find(r=>r.type==="mdxJsxAttribute"&&r.name===t);if(n)return n.value}const O7={testNode:e=>(e.type==="mdxJsxTextElement"||e.type==="mdxJsxFlowElement")&&e.name==="img",visitNode({mdastNode:e,lexicalParent:t}){const n=Zr(e,"src");if(!n)return;const r=Zr(e,"alt")??"",i=Zr(e,"title"),o=Zr(e,"height"),s=Zr(e,"width"),l=e.attributes.filter(u=>u.type==="mdxJsxAttribute"&&!["src","alt","title","height","width"].includes(u.name)),a=cr({src:n,altText:r,title:i,width:s?parseInt(s,10):void 0,height:o?parseInt(o,10):void 0,rest:l});if(t.getType()==="root"){const u=_e();u.append(a),t.append(u)}else t.append(a)}},hc=ze(e=>{e.sub(e.pipe(hc,Le($e)),([t,n])=>{n==null||n.update(()=>{const r=cr({altText:t.altText??"",src:t.src,title:t.title??""});Mr([r]),Ve(r.getParentOrThrow())&&Iu(r,_e).selectEnd()})})}),$7=ze(e=>{e.sub(e.pipe($7,Le(Sn)),([t,n])=>{const r=i=>{e.pub(hc,{...t,src:i})};"file"in t?n==null||n(t.file).then(r).catch(i=>{throw i}):r(t.src)})}),Pa=re([]),Ma=re(!1),Sn=re(null),Ra=re(null),Yn=re({type:"inactive"},e=>{e.sub(e.pipe(xm,Le($e,Sn,Yn)),([t,n,r,i])=>{const o=i.type==="editing"?s=>{n==null||n.update(()=>{const{nodeKey:l}=i,a=Re(l);a.setTitle(t.title),a.setAltText(t.altText),a.setSrc(s)}),e.pub(Yn,{type:"inactive"})}:s=>{e.pub(hc,{...t,src:s}),e.pub(Yn,{type:"inactive"})};t.file.length>0?r==null||r(t.file.item(0)).then(o).catch(s=>{throw s}):t.src&&o(t.src)}),e.pub(Wo,t=>{const n=e.getValue(Sn);return ft(t.registerCommand(ts,r=>{const i=cr(r);return Mr([i]),Ve(i.getParentOrThrow())&&Iu(i,_e).selectEnd(),!0},pe),t.registerCommand(fs,r=>B7(r),Yl),t.registerCommand(Qa,r=>z7(r,!!n),Se),t.registerCommand(Xa,r=>j7(r,t,e.getValue(Sn)),Yl),t.registerCommand(Ei,r=>{var i,o;if(!n){let u=Array.from(((i=r.clipboardData)==null?void 0:i.items)??[]);return u=u.filter(c=>c.type.includes("text")),!u.length||u.length===0}const s=Array.from(((o=r.clipboardData)==null?void 0:o.items)??[]);if(s.some(u=>!u.type.includes("image"))||!s.length||s.length===0)return!1;const a=e.getValue(Sn);return Promise.all(s.map(u=>a(u.getAsFile()))).then(u=>{u.forEach(c=>{t.dispatchCommand(ts,{src:c,altText:""})})}).catch(u=>{throw u}),!0},an))})}),hm=Fn(e=>{e.link(e.pipe(hm,fh({type:"new"})),Yn)}),pm=ze(e=>{e.link(e.pipe(pm,yr(t=>({type:"editing",...t}))),Yn)}),gm=Fn(e=>{e.link(e.pipe(gm,fh({type:"inactive"})),Yn)}),mm=re(!1),xm=ze(),D7=Kt({init(e,t){e.pubIn({[Ln]:[M7,R7,O7],[lr]:Yi,[ar]:P7,[ur]:(t==null?void 0:t.ImageDialog)??S7,[Sn]:(t==null?void 0:t.imageUploadHandler)??null,[Pa]:(t==null?void 0:t.imageAutocompleteSuggestions)??[],[Ma]:!!(t!=null&&t.disableImageResize),[mm]:!!(t!=null&&t.disableImageSettingsButton),[Ra]:(t==null?void 0:t.imagePreviewHandler)??null})},update(e,t){e.pubIn({[Sn]:(t==null?void 0:t.imageUploadHandler)??null,[Pa]:(t==null?void 0:t.imageAutocompleteSuggestions)??[],[Ma]:!!(t!=null&&t.disableImageResize),[Ra]:(t==null?void 0:t.imagePreviewHandler)??null})}}),V7=e=>Dg?(e??window).getSelection():null,ts=fn(),H7="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";function B7(e){const t=pc();if(!t)return!1;const n=e.dataTransfer;if(!n)return!1;n.setData("text/plain","_");const r=document.createElement("img");return r.src=H7,n.setDragImage(r,0,0),n.setData("application/x-lexical-drag",JSON.stringify({data:{altText:t.__altText,title:t.__title,key:t.getKey(),src:t.__src},type:"image"})),!0}function z7(e,t){var n;if(t){let i=Array.from(((n=e.dataTransfer)==null?void 0:n.items)??[]);if(i=i.filter(o=>o.type.includes("image")),i.length>0)return e.preventDefault(),!0}return pc()?(ym(e)||e.preventDefault(),!0):!1}function j7(e,t,n){var r;let i=Array.from(((r=e.dataTransfer)==null?void 0:r.items)??[]);if(i=i.filter(l=>l.type.includes("image")),i.length>0&&n!==null)return e.preventDefault(),Promise.all(i.map(l=>n(l.getAsFile()))).then(l=>{l.forEach(a=>{t.dispatchCommand(ts,{src:a,altText:""})})}).catch(l=>{throw l}),!0;const o=pc();if(!o)return!1;const s=U7(e);if(!s)return!1;if(e.preventDefault(),ym(e)){const l=W7(e);o.remove();const a=ws();l!=null&&a.applyDOMRange(l),Ye(a),t.dispatchCommand(ts,s)}return!0}function pc(){const e=U();if(!He(e))return null;const n=e.getNodes()[0];return es(n)?n:null}function U7(e){var t;const n=(t=e.dataTransfer)==null?void 0:t.getData("application/x-lexical-drag");if(!n)return null;const{type:r,data:i}=JSON.parse(n);return r!=="image"?null:i}function ym(e){const t=e.target;return!!(t&&t instanceof HTMLElement&&t.parentElement)}function W7(e){let t;const n=e.target,r=n==null?null:n.nodeType===9?n.defaultView:n.ownerDocument.defaultView,i=V7(r);if(document.caretRangeFromPoint)t=document.caretRangeFromPoint(e.clientX,e.clientY);else if(e.rangeParent&&i!==null)i.collapse(e.rangeParent,e.rangeOffset??0),t=i.getRangeAt(0);else throw Error("Cannot get the selection when dragging");return t}const J7={testNode:"blockquote",visitNode({actions:e}){e.addAndStepInto(Oi())}},K7={testLexicalNode:ta,visitLexicalNode:({lexicalNode:e,mdastParent:t,actions:n})=>{const r={type:"paragraph",children:[]};n.appendToParent(t,{type:"blockquote",children:[r]}),n.visitChildren(e,r)}},Z7=Kt({init(e){e.pubIn({[Ms]:"quote",[Ln]:J7,[lr]:Is,[ar]:K7})}});function G7(){let e=_r;return{publish:()=>{e()},subscribe:t=>{e=t}}}var q7=Object.defineProperty,Y7=(e,t,n)=>t in e?q7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_n=(e,t,n)=>(Y7(e,typeof t!="symbol"?t+"":t,n),n);class Us extends Mi{constructor(t,n,r,i){super(i),_n(this,"__code"),_n(this,"__meta"),_n(this,"__language"),_n(this,"__focusEmitter",G7()),_n(this,"setCode",o=>{o!==this.__code&&(this.getWritable().__code=o)}),_n(this,"setMeta",o=>{o!==this.__meta&&(this.getWritable().__meta=o)}),_n(this,"setLanguage",o=>{o!==this.__language&&(this.getWritable().__language=o)}),_n(this,"select",()=>{this.__focusEmitter.publish()}),this.__code=t,this.__meta=r,this.__language=n}static getType(){return"codeblock"}static clone(t){return new Us(t.__code,t.__language,t.__meta,t.__key)}static importJSON(t){const{code:n,meta:r,language:i}=t;return gc({code:n,language:i,meta:r})}exportJSON(){return{code:this.getCode(),language:this.getLanguage(),meta:this.getMeta(),type:"codeblock",version:1}}createDOM(t){return document.createElement("div")}updateDOM(){return!1}getCode(){return this.__code}getMeta(){return this.__meta}getLanguage(){return this.__language}decorate(t){return w.createElement(e8,{parentEditor:t,code:this.getCode(),meta:this.getMeta(),language:this.getLanguage(),codeBlockNode:this,nodeKey:this.getKey(),focusEmitter:this.__focusEmitter})}isInline(){return!1}}const X7=w.createContext(null),Q7=({parentEditor:e,lexicalNode:t,children:n})=>{const r=w.useMemo(()=>({lexicalNode:t,parentEditor:e,setCode:i=>{e.update(()=>{t.setCode(i),setTimeout(()=>{e.dispatchCommand(Ou,void 0)},0)})},setLanguage:i=>{e.update(()=>{t.setLanguage(i)})},setMeta:i=>{e.update(()=>{t.setMeta(i)})}}),[t,e]);return w.createElement(X7.Provider,{value:r},n)},e8=e=>{const t=vt($u),n=vt(_m);let r=t.sort((a,u)=>u.priority-a.priority).find(a=>a.match(e.language||"",e.meta||""));if(r||(r=t.find(a=>a.match(n||"",e.meta||""))),!r)throw new Error(`No CodeBlockEditor registered for language=${e.language} meta=${e.meta}`);const i=r.Editor,{codeBlockNode:o,parentEditor:s,...l}=e;return w.createElement(Q7,{parentEditor:e.parentEditor,lexicalNode:e.codeBlockNode},w.createElement(i,{...l}))};function gc(e){const{code:t="",language:n="",meta:r=""}=e;return new Us(t,n,r)}const _m=re(""),t8=ze(e=>{e.link(e.pipe(t8,Le(_m),yr(([t,n])=>()=>gc({language:n,...t}))),Fg)});ht($u);function Df(e,[t,n]){return Math.min(n,Math.max(t,e))}function n8(e){const t=e+"CollectionProvider",[n,r]=Wa(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=x=>{const{scope:y,children:_}=x,g=w.useRef(null),m=w.useRef(new Map).current;return L.jsx(i,{scope:y,itemMap:m,collectionRef:g,children:_})};s.displayName=t;const l=e+"CollectionSlot",a=wo(l),u=w.forwardRef((x,y)=>{const{scope:_,children:g}=x,m=o(l,_),b=ut(y,m.collectionRef);return L.jsx(a,{ref:b,children:g})});u.displayName=l;const c=e+"CollectionItemSlot",d="data-radix-collection-item",h=wo(c),f=w.forwardRef((x,y)=>{const{scope:_,children:g,...m}=x,b=w.useRef(null),k=ut(y,b),v=o(c,_);return w.useEffect(()=>(v.itemMap.set(b,{ref:b,...m}),()=>void v.itemMap.delete(b))),L.jsx(h,{[d]:"",ref:k,children:g})});f.displayName=c;function p(x){const y=o(e+"CollectionConsumer",x);return w.useCallback(()=>{const g=y.collectionRef.current;if(!g)return[];const m=Array.from(g.querySelectorAll(`[${d}]`));return Array.from(y.itemMap.values()).sort((v,C)=>m.indexOf(v.ref.current)-m.indexOf(C.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:s,Slot:u,ItemSlot:f},p,r]}var r8=T.createContext(void 0);function i8(e){const t=T.useContext(r8);return e||t||"ltr"}var o8=[" ","Enter","ArrowUp","ArrowDown"],s8=[" ","Enter"],Xi="Select",[Ws,Js,l8]=n8(Xi),[Vr,G6]=Wa(Xi,[l8,rs]),Ks=rs(),[a8,Hn]=Vr(Xi),[u8,c8]=Vr(Xi),bm=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:s,defaultValue:l,onValueChange:a,dir:u,name:c,autoComplete:d,disabled:h,required:f,form:p}=e,x=Ks(t),[y,_]=T.useState(null),[g,m]=T.useState(null),[b,k]=T.useState(!1),v=i8(u),[C=!1,E]=Ll({prop:r,defaultProp:i,onChange:o}),[I,F]=Ll({prop:s,defaultProp:l,onChange:a}),P=T.useRef(null),R=y?p||!!y.closest("form"):!0,[M,K]=T.useState(new Set),B=Array.from(M).map(Q=>Q.props.value).join(";");return L.jsx(Zf,{...x,children:L.jsxs(a8,{required:f,scope:t,trigger:y,onTriggerChange:_,valueNode:g,onValueNodeChange:m,valueNodeHasChildren:b,onValueNodeHasChildrenChange:k,contentId:is(),value:I,onValueChange:F,open:C,onOpenChange:E,dir:v,triggerPointerDownPosRef:P,disabled:h,children:[L.jsx(Ws.Provider,{scope:t,children:L.jsx(u8,{scope:e.__scopeSelect,onNativeOptionAdd:T.useCallback(Q=>{K(Z=>new Set(Z).add(Q))},[]),onNativeOptionRemove:T.useCallback(Q=>{K(Z=>{const ne=new Set(Z);return ne.delete(Q),ne})},[]),children:n})}),R?L.jsxs(Bm,{"aria-hidden":!0,required:f,tabIndex:-1,name:c,autoComplete:d,value:I,onChange:Q=>F(Q.target.value),disabled:h,form:p,children:[I===void 0?L.jsx("option",{value:""}):null,Array.from(M)]},B):null]})})};bm.displayName=Xi;var vm="SelectTrigger",Cm=T.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=Ks(n),s=Hn(vm,n),l=s.disabled||r,a=ut(t,s.onTriggerChange),u=Js(n),c=T.useRef("touch"),[d,h,f]=zm(x=>{const y=u().filter(m=>!m.disabled),_=y.find(m=>m.value===s.value),g=jm(y,x,_);g!==void 0&&s.onValueChange(g.value)}),p=x=>{l||(s.onOpenChange(!0),f()),x&&(s.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)})};return L.jsx(Ua,{asChild:!0,...o,children:L.jsx(ct.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":Hm(s.value)?"":void 0,...i,ref:a,onClick:Pe(i.onClick,x=>{x.currentTarget.focus(),c.current!=="mouse"&&p(x)}),onPointerDown:Pe(i.onPointerDown,x=>{c.current=x.pointerType;const y=x.target;y.hasPointerCapture(x.pointerId)&&y.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&x.pointerType==="mouse"&&(p(x),x.preventDefault())}),onKeyDown:Pe(i.onKeyDown,x=>{const y=d.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&h(x.key),!(y&&x.key===" ")&&o8.includes(x.key)&&(p(),x.preventDefault())})})})});Cm.displayName=vm;var wm="SelectValue",km=T.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:s="",...l}=e,a=Hn(wm,n),{onValueNodeHasChildrenChange:u}=a,c=o!==void 0,d=ut(t,a.onValueNodeChange);return In(()=>{u(c)},[u,c]),L.jsx(ct.span,{...l,ref:d,style:{pointerEvents:"none"},children:Hm(a.value)?L.jsx(L.Fragment,{children:s}):o})});km.displayName=wm;var d8="SelectIcon",Sm=T.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return L.jsx(ct.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});Sm.displayName=d8;var f8="SelectPortal",Em=e=>L.jsx(Gf,{asChild:!0,...e});Em.displayName=f8;var ir="SelectContent",Tm=T.forwardRef((e,t)=>{const n=Hn(ir,e.__scopeSelect),[r,i]=T.useState();if(In(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?ko.createPortal(L.jsx(Im,{scope:e.__scopeSelect,children:L.jsx(Ws.Slot,{scope:e.__scopeSelect,children:L.jsx("div",{children:e.children})})}),o):null}return L.jsx(Am,{...e,ref:t})});Tm.displayName=ir;var Tt=10,[Im,Bn]=Vr(ir),h8="SelectContentImpl",p8=wo("SelectContent.RemoveScroll"),Am=T.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:s,side:l,sideOffset:a,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:h,collisionPadding:f,sticky:p,hideWhenDetached:x,avoidCollisions:y,..._}=e,g=Hn(ir,n),[m,b]=T.useState(null),[k,v]=T.useState(null),C=ut(t,H=>b(H)),[E,I]=T.useState(null),[F,P]=T.useState(null),R=Js(n),[M,K]=T.useState(!1),B=T.useRef(!1);T.useEffect(()=>{if(m)return Yf(m)},[m]),Qf();const Q=T.useCallback(H=>{const[j,...q]=R().map(de=>de.ref.current),[Y]=q.slice(-1),ie=document.activeElement;for(const de of H)if(de===ie||(de==null||de.scrollIntoView({block:"nearest"}),de===j&&k&&(k.scrollTop=0),de===Y&&k&&(k.scrollTop=k.scrollHeight),de==null||de.focus(),document.activeElement!==ie))return},[R,k]),Z=T.useCallback(()=>Q([E,m]),[Q,E,m]);T.useEffect(()=>{M&&Z()},[M,Z]);const{onOpenChange:ne,triggerPointerDownPosRef:ce}=g;T.useEffect(()=>{if(m){let H={x:0,y:0};const j=Y=>{var ie,de;H={x:Math.abs(Math.round(Y.pageX)-(((ie=ce.current)==null?void 0:ie.x)??0)),y:Math.abs(Math.round(Y.pageY)-(((de=ce.current)==null?void 0:de.y)??0))}},q=Y=>{H.x<=10&&H.y<=10?Y.preventDefault():m.contains(Y.target)||ne(!1),document.removeEventListener("pointermove",j),ce.current=null};return ce.current!==null&&(document.addEventListener("pointermove",j),document.addEventListener("pointerup",q,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",j),document.removeEventListener("pointerup",q,{capture:!0})}}},[m,ne,ce]),T.useEffect(()=>{const H=()=>ne(!1);return window.addEventListener("blur",H),window.addEventListener("resize",H),()=>{window.removeEventListener("blur",H),window.removeEventListener("resize",H)}},[ne]);const[N,se]=zm(H=>{const j=R().filter(ie=>!ie.disabled),q=j.find(ie=>ie.ref.current===document.activeElement),Y=jm(j,H,q);Y&&setTimeout(()=>Y.ref.current.focus())}),ee=T.useCallback((H,j,q)=>{const Y=!B.current&&!q;(g.value!==void 0&&g.value===j||Y)&&(I(H),Y&&(B.current=!0))},[g.value]),A=T.useCallback(()=>m==null?void 0:m.focus(),[m]),ue=T.useCallback((H,j,q)=>{const Y=!B.current&&!q;(g.value!==void 0&&g.value===j||Y)&&P(H)},[g.value]),he=r==="popper"?Oa:Nm,oe=he===Oa?{side:l,sideOffset:a,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:h,collisionPadding:f,sticky:p,hideWhenDetached:x,avoidCollisions:y}:{};return L.jsx(Im,{scope:n,content:m,viewport:k,onViewportChange:v,itemRefCallback:ee,selectedItem:E,onItemLeave:A,itemTextRefCallback:ue,focusSelectedItem:Z,selectedItemText:F,position:r,isPositioned:M,searchRef:N,children:L.jsx(Xf,{as:p8,allowPinchZoom:!0,children:L.jsx(eh,{asChild:!0,trapped:g.open,onMountAutoFocus:H=>{H.preventDefault()},onUnmountAutoFocus:Pe(i,H=>{var j;(j=g.trigger)==null||j.focus({preventScroll:!0}),H.preventDefault()}),children:L.jsx(th,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:H=>H.preventDefault(),onDismiss:()=>g.onOpenChange(!1),children:L.jsx(he,{role:"listbox",id:g.contentId,"data-state":g.open?"open":"closed",dir:g.dir,onContextMenu:H=>H.preventDefault(),..._,...oe,onPlaced:()=>K(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",..._.style},onKeyDown:Pe(_.onKeyDown,H=>{const j=H.ctrlKey||H.altKey||H.metaKey;if(H.key==="Tab"&&H.preventDefault(),!j&&H.key.length===1&&se(H.key),["ArrowUp","ArrowDown","Home","End"].includes(H.key)){let Y=R().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);if(["ArrowUp","End"].includes(H.key)&&(Y=Y.slice().reverse()),["ArrowUp","ArrowDown"].includes(H.key)){const ie=H.target,de=Y.indexOf(ie);Y=Y.slice(de+1)}setTimeout(()=>Q(Y)),H.preventDefault()}})})})})})})});Am.displayName=h8;var g8="SelectItemAlignedPosition",Nm=T.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=Hn(ir,n),s=Bn(ir,n),[l,a]=T.useState(null),[u,c]=T.useState(null),d=ut(t,C=>c(C)),h=Js(n),f=T.useRef(!1),p=T.useRef(!0),{viewport:x,selectedItem:y,selectedItemText:_,focusSelectedItem:g}=s,m=T.useCallback(()=>{if(o.trigger&&o.valueNode&&l&&u&&x&&y&&_){const C=o.trigger.getBoundingClientRect(),E=u.getBoundingClientRect(),I=o.valueNode.getBoundingClientRect(),F=_.getBoundingClientRect();if(o.dir!=="rtl"){const ie=F.left-E.left,de=I.left-ie,Ie=C.left-de,De=C.width+Ie,je=Math.max(De,E.width),Ue=window.innerWidth-Tt,Ke=Df(de,[Tt,Math.max(Tt,Ue-je)]);l.style.minWidth=De+"px",l.style.left=Ke+"px"}else{const ie=E.right-F.right,de=window.innerWidth-I.right-ie,Ie=window.innerWidth-C.right-de,De=C.width+Ie,je=Math.max(De,E.width),Ue=window.innerWidth-Tt,Ke=Df(de,[Tt,Math.max(Tt,Ue-je)]);l.style.minWidth=De+"px",l.style.right=Ke+"px"}const P=h(),R=window.innerHeight-Tt*2,M=x.scrollHeight,K=window.getComputedStyle(u),B=parseInt(K.borderTopWidth,10),Q=parseInt(K.paddingTop,10),Z=parseInt(K.borderBottomWidth,10),ne=parseInt(K.paddingBottom,10),ce=B+Q+M+ne+Z,N=Math.min(y.offsetHeight*5,ce),se=window.getComputedStyle(x),ee=parseInt(se.paddingTop,10),A=parseInt(se.paddingBottom,10),ue=C.top+C.height/2-Tt,he=R-ue,oe=y.offsetHeight/2,H=y.offsetTop+oe,j=B+Q+H,q=ce-j;if(j<=ue){const ie=P.length>0&&y===P[P.length-1].ref.current;l.style.bottom="0px";const de=u.clientHeight-x.offsetTop-x.offsetHeight,Ie=Math.max(he,oe+(ie?A:0)+de+Z),De=j+Ie;l.style.height=De+"px"}else{const ie=P.length>0&&y===P[0].ref.current;l.style.top="0px";const Ie=Math.max(ue,B+x.offsetTop+(ie?ee:0)+oe)+q;l.style.height=Ie+"px",x.scrollTop=j-ue+x.offsetTop}l.style.margin=`${Tt}px 0`,l.style.minHeight=N+"px",l.style.maxHeight=R+"px",r==null||r(),requestAnimationFrame(()=>f.current=!0)}},[h,o.trigger,o.valueNode,l,u,x,y,_,o.dir,r]);In(()=>m(),[m]);const[b,k]=T.useState();In(()=>{u&&k(window.getComputedStyle(u).zIndex)},[u]);const v=T.useCallback(C=>{C&&p.current===!0&&(m(),g==null||g(),p.current=!1)},[m,g]);return L.jsx(x8,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:f,onScrollButtonChange:v,children:L.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:L.jsx(ct.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});Nm.displayName=g8;var m8="SelectPopperPosition",Oa=T.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Tt,...o}=e,s=Ks(n);return L.jsx(nh,{...s,...o,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Oa.displayName=m8;var[x8,mc]=Vr(ir,{}),$a="SelectViewport",Lm=T.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,o=Bn($a,n),s=mc($a,n),l=ut(t,o.onViewportChange),a=T.useRef(0);return L.jsxs(L.Fragment,{children:[L.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),L.jsx(Ws.Slot,{scope:n,children:L.jsx(ct.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Pe(i.onScroll,u=>{const c=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:h}=s;if(h!=null&&h.current&&d){const f=Math.abs(a.current-c.scrollTop);if(f>0){const p=window.innerHeight-Tt*2,x=parseFloat(d.style.minHeight),y=parseFloat(d.style.height),_=Math.max(x,y);if(_<p){const g=_+f,m=Math.min(p,g),b=g-m;d.style.height=m+"px",d.style.bottom==="0px"&&(c.scrollTop=b>0?b:0,d.style.justifyContent="flex-end")}}}a.current=c.scrollTop})})})]})});Lm.displayName=$a;var Fm="SelectGroup",[y8,_8]=Vr(Fm),b8=T.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=is();return L.jsx(y8,{scope:n,id:i,children:L.jsx(ct.div,{role:"group","aria-labelledby":i,...r,ref:t})})});b8.displayName=Fm;var Pm="SelectLabel",v8=T.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=_8(Pm,n);return L.jsx(ct.div,{id:i.id,...r,ref:t})});v8.displayName=Pm;var ns="SelectItem",[C8,Mm]=Vr(ns),Rm=T.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...s}=e,l=Hn(ns,n),a=Bn(ns,n),u=l.value===r,[c,d]=T.useState(o??""),[h,f]=T.useState(!1),p=ut(t,g=>{var m;return(m=a.itemRefCallback)==null?void 0:m.call(a,g,r,i)}),x=is(),y=T.useRef("touch"),_=()=>{i||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return L.jsx(C8,{scope:n,value:r,disabled:i,textId:x,isSelected:u,onItemTextChange:T.useCallback(g=>{d(m=>m||((g==null?void 0:g.textContent)??"").trim())},[]),children:L.jsx(Ws.ItemSlot,{scope:n,value:r,disabled:i,textValue:c,children:L.jsx(ct.div,{role:"option","aria-labelledby":x,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...s,ref:p,onFocus:Pe(s.onFocus,()=>f(!0)),onBlur:Pe(s.onBlur,()=>f(!1)),onClick:Pe(s.onClick,()=>{y.current!=="mouse"&&_()}),onPointerUp:Pe(s.onPointerUp,()=>{y.current==="mouse"&&_()}),onPointerDown:Pe(s.onPointerDown,g=>{y.current=g.pointerType}),onPointerMove:Pe(s.onPointerMove,g=>{var m;y.current=g.pointerType,i?(m=a.onItemLeave)==null||m.call(a):y.current==="mouse"&&g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Pe(s.onPointerLeave,g=>{var m;g.currentTarget===document.activeElement&&((m=a.onItemLeave)==null||m.call(a))}),onKeyDown:Pe(s.onKeyDown,g=>{var b;((b=a.searchRef)==null?void 0:b.current)!==""&&g.key===" "||(s8.includes(g.key)&&_(),g.key===" "&&g.preventDefault())})})})})});Rm.displayName=ns;var ei="SelectItemText",Om=T.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,s=Hn(ei,n),l=Bn(ei,n),a=Mm(ei,n),u=c8(ei,n),[c,d]=T.useState(null),h=ut(t,_=>d(_),a.onItemTextChange,_=>{var g;return(g=l.itemTextRefCallback)==null?void 0:g.call(l,_,a.value,a.disabled)}),f=c==null?void 0:c.textContent,p=T.useMemo(()=>L.jsx("option",{value:a.value,disabled:a.disabled,children:f},a.value),[a.disabled,a.value,f]),{onNativeOptionAdd:x,onNativeOptionRemove:y}=u;return In(()=>(x(p),()=>y(p)),[x,y,p]),L.jsxs(L.Fragment,{children:[L.jsx(ct.span,{id:a.textId,...o,ref:h}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?ko.createPortal(o.children,s.valueNode):null]})});Om.displayName=ei;var $m="SelectItemIndicator",w8=T.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Mm($m,n).isSelected?L.jsx(ct.span,{"aria-hidden":!0,...r,ref:t}):null});w8.displayName=$m;var Da="SelectScrollUpButton",k8=T.forwardRef((e,t)=>{const n=Bn(Da,e.__scopeSelect),r=mc(Da,e.__scopeSelect),[i,o]=T.useState(!1),s=ut(t,r.onScrollButtonChange);return In(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=a.scrollTop>0;o(u)};const a=n.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),i?L.jsx(Dm,{...e,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=n;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});k8.displayName=Da;var Va="SelectScrollDownButton",S8=T.forwardRef((e,t)=>{const n=Bn(Va,e.__scopeSelect),r=mc(Va,e.__scopeSelect),[i,o]=T.useState(!1),s=ut(t,r.onScrollButtonChange);return In(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=a.scrollHeight-a.clientHeight,c=Math.ceil(a.scrollTop)<u;o(c)};const a=n.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),i?L.jsx(Dm,{...e,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=n;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});S8.displayName=Va;var Dm=T.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=Bn("SelectScrollButton",n),s=T.useRef(null),l=Js(n),a=T.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return T.useEffect(()=>()=>a(),[a]),In(()=>{var c;const u=l().find(d=>d.ref.current===document.activeElement);(c=u==null?void 0:u.ref.current)==null||c.scrollIntoView({block:"nearest"})},[l]),L.jsx(ct.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Pe(i.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:Pe(i.onPointerMove,()=>{var u;(u=o.onItemLeave)==null||u.call(o),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:Pe(i.onPointerLeave,()=>{a()})})}),E8="SelectSeparator",Vm=T.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return L.jsx(ct.div,{"aria-hidden":!0,...r,ref:t})});Vm.displayName=E8;var Ha="SelectArrow",T8=T.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Ks(n),o=Hn(Ha,n),s=Bn(Ha,n);return o.open&&s.position==="popper"?L.jsx(qf,{...i,...r,ref:t}):null});T8.displayName=Ha;function Hm(e){return e===""||e===void 0}var Bm=T.forwardRef((e,t)=>{const{value:n,...r}=e,i=T.useRef(null),o=ut(t,i),s=C0(n);return T.useEffect(()=>{const l=i.current,a=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==n&&c){const d=new Event("change",{bubbles:!0});c.call(l,n),l.dispatchEvent(d)}},[s,n]),L.jsx(M0,{asChild:!0,children:L.jsx("select",{...r,ref:o,defaultValue:n})})});Bm.displayName="BubbleSelect";function zm(e){const t=O0(e),n=T.useRef(""),r=T.useRef(0),i=T.useCallback(s=>{const l=n.current+s;t(l),function a(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>a(""),1e3))}(l)},[t]),o=T.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return T.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function jm(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let s=I8(e,Math.max(o,0));i.length===1&&(s=s.filter(u=>u!==n));const a=s.find(u=>u.textValue.toLowerCase().startsWith(i.toLowerCase()));return a!==n?a:void 0}function I8(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var A8=bm,N8=Cm,L8=km,F8=Sm,P8=Em,M8=Tm,R8=Lm,O8=Rm,$8=Om,D8=Vm;const xc=w.forwardRef(({title:e,children:t},n)=>{const r=vt(Vi);return w.createElement(rh,{delayDuration:100},w.createElement(ih,null,w.createElement(oh,{ref:n,asChild:!0},w.createElement("span",{className:G.tooltipTrigger},t)),w.createElement(sh,{container:r==null?void 0:r.current},w.createElement(lh,{className:be(G.tooltipContent),sideOffset:10},e))))}),V8=w.forwardRef(({children:e,className:t,...n},r)=>w.createElement(O8,{...n,ref:r,className:be(t,G.selectItem)},w.createElement($8,null,e))),H8=({title:e,placeholder:t,className:n})=>{const[r,i]=dn(un,On);return w.createElement(xc,{title:e},w.createElement(N8,{"aria-label":t,className:be(G.selectTrigger,n),"data-toolbar-item":!0,disabled:r},w.createElement(L8,{placeholder:t}),w.createElement(F8,{className:G.selectDropdownArrow},i("arrow_drop_down"))))},B8=({children:e,className:t=G.selectContainer})=>{const n=vt(Vi);return w.createElement(P8,{container:n==null?void 0:n.current},w.createElement(M8,{className:be(t,"mdxeditor-select-content"),onCloseAutoFocus:r=>{r.preventDefault()},position:"popper"},w.createElement(R8,{"data-editor-dropdown":!0},e)))},z8=e=>w.createElement(A8,{value:e.value||void 0,onValueChange:e.onChange},w.createElement(H8,{title:e.triggerTitle,placeholder:e.placeholder}),w.createElement(B8,null,e.items.map((t,n)=>t==="separator"?w.createElement(D8,{key:n}):w.createElement(V8,{key:n,value:t.value},t.label))));function j8(e){try{const t=e.anchor,n=e.focus,r=e.anchor.getNode(),i=e.focus.getNode();return r===i?r:e.isBackward()?ld(n)?r:i:ld(t)?r:i}catch{return null}}function Um(e){const t=U(),n=window.getSelection(),r=document.activeElement,i=e.getRootElement();if(t!==null&&n!==null&&i!==null&&i.contains(n.anchorNode)&&e.isEditable()){const o=n.getRangeAt(0);let s;if(n.isCollapsed){let l=n.anchorNode;(l==null?void 0:l.nodeType)==3&&(l=l.parentNode),s=l.getBoundingClientRect(),s.width=0}else if(n.anchorNode===i){let l=i;for(;l.firstElementChild!=null;)l=l.firstElementChild;s=l.getBoundingClientRect()}else s=o.getBoundingClientRect();return{top:Math.round(s.top),left:Math.round(s.left),width:Math.round(s.width),height:Math.round(s.height)}}else if(!r||r.className!=="link-input")return null;return null}function U8({url:e,title:t,onSubmit:n,onCancel:r,linkAutocompleteSuggestions:i}){const{register:o,handleSubmit:s,control:l,setValue:a,reset:u}=ja({values:{url:e,title:t}}),c=gn();return w.createElement("form",{onSubmit:d=>{s(n)(d),d.stopPropagation(),d.preventDefault()},onReset:d=>{d.stopPropagation(),r()},className:be(G.multiFieldForm,G.linkDialogEditForm)},w.createElement("div",{className:G.formField},w.createElement("label",{htmlFor:"link-url"},c("createLink.url","URL")),w.createElement(fm,{register:o,initialInputValue:e,inputName:"url",suggestions:i,setValue:a,control:l,placeholder:c("createLink.urlPlaceholder","Select or paste an URL"),autofocus:!0})),w.createElement("div",{className:G.formField},w.createElement("label",{htmlFor:"link-title"},c("createLink.title","Title")),w.createElement("input",{id:"link-title",className:G.textInput,size:40,...o("title")})),w.createElement("div",{style:{display:"flex",justifyContent:"flex-end",gap:"var(--spacing-2)"}},w.createElement("button",{type:"submit",title:c("createLink.saveTooltip","Set URL"),"aria-label":c("createLink.saveTooltip","Set URL"),className:be(G.primaryButton)},c("dialogControls.save","Save")),w.createElement("button",{type:"reset",title:c("createLink.cancelTooltip","Cancel change"),"aria-label":c("createLink.cancelTooltip","Cancel change"),className:be(G.secondaryButton)},c("dialogControls.cancel","Cancel"))))}const W8=()=>{const[e,t,n,r,i,o]=dn(Vi,$e,On,st,Ym,Xm),s=xt(Wm),l=xt(Jm),a=xt(Km),u=xt(Zm),c=xt(Gm);w.useEffect(()=>{const y=()=>{t==null||t.getEditorState().read(()=>{s(!0)})};return window.addEventListener("resize",y),window.addEventListener("scroll",y),()=>{window.removeEventListener("resize",y),window.removeEventListener("scroll",y)}},[t,s]);const[d,h]=w.useState(!1),f=gn(),p=r.rectangle,x=r.type==="preview"&&r.url.startsWith("http");return w.createElement(hw,{open:r.type!=="inactive"},w.createElement(pw,{"data-visible":r.type==="edit",className:G.linkDialogAnchor,style:{top:`${(p==null?void 0:p.top)??0}px`,left:`${(p==null?void 0:p.left)??0}px`,width:`${(p==null?void 0:p.width)??0}px`,height:`${(p==null?void 0:p.height)??0}px`}}),w.createElement(gw,{container:e==null?void 0:e.current},w.createElement(mw,{className:be(G.linkDialogPopoverContent),sideOffset:5,onOpenAutoFocus:y=>{y.preventDefault()},key:r.linkNodeKey},r.type==="edit"&&w.createElement(U8,{url:r.url,title:r.title,onSubmit:l,onCancel:a.bind(null),linkAutocompleteSuggestions:i}),r.type==="preview"&&w.createElement(w.Fragment,null,w.createElement("a",{className:G.linkDialogPreviewAnchor,href:r.url,...x?{target:"_blank",rel:"noreferrer"}:{},onClick:y=>{o!==null&&(y.preventDefault(),o(r.url))},title:x?f("linkPreview.open","Open {{url}} in new window",{url:r.url}):r.url},w.createElement("span",null,r.url),x&&n("open_in_new")),w.createElement(Sl,{onClick:()=>{u()},title:f("linkPreview.edit","Edit link URL"),"aria-label":f("linkPreview.edit","Edit link URL")},n("edit")),w.createElement(rh,null,w.createElement(ih,{open:d},w.createElement(oh,{asChild:!0},w.createElement(Sl,{title:f("linkPreview.copyToClipboard","Copy to clipboard"),"aria-label":f("linkPreview.copyToClipboard","Copy to clipboard"),onClick:()=>{window.navigator.clipboard.writeText(r.url).then(()=>{h(!0),setTimeout(()=>{h(!1)},1e3)})}},n(d?"check":"content_copy"))),w.createElement(sh,{container:e==null?void 0:e.current},w.createElement(lh,{className:be(G.tooltipContent),sideOffset:5},f("linkPreview.copied","Copied!"),w.createElement(R0,null))))),w.createElement(Sl,{title:f("linkPreview.remove","Remove link"),"aria-label":f("linkPreview.remove","Remove link"),onClick:()=>{c()}},n("link_off"))),w.createElement(xw,{className:G.popoverArrow}))))},Sl=w.forwardRef(({className:e,...t},n)=>w.createElement("button",{className:be(G.actionButton,e),ref:n,...t}));function Ba(e){if(!e)return null;const t=j8(e);if(t===null)return null;const n=t.getParent();return jt(n)?n:jt(t)?t:null}const Wm=ze(),st=re({type:"inactive"},e=>{e.pub(Wo,t=>t.registerCommand(Ti,()=>e.getValue(st).type==="preview"?(e.pub(st,{type:"inactive"}),!0):!1,Se)),e.pub(Wo,t=>t.registerCommand(bh,n=>{if(n.key==="k"&&(Zo?n.metaKey:n.ctrlKey)&&!e.getValue(un)){const r=U();return D(r)?(e.pub(qm),n.stopPropagation(),n.preventDefault(),!0):!1}return!1},Yl)),e.link(e.pipe(Zm,Le(st),yr(([,t])=>{if(t.type==="preview")return{type:"edit",initialUrl:t.url,url:t.url,title:t.title,linkNodeKey:t.linkNodeKey,rectangle:t.rectangle};throw new Error("Cannot switch to edit mode when not in preview mode")})),st),e.sub(e.pipe(Jm,Le($e,st,Ir)),([t,n,r,i])=>{var o,s;const l=((o=t.url)==null?void 0:o.trim())??"",a=((s=t.title)==null?void 0:s.trim())??"";if(l!==""){if(i!=null&&i.isCollapsed()){const u=a||l;n==null||n.update(()=>{const c=Ba(i);if(c)c.setURL(l),c.setTitle(a);else{const d=rr(l,{title:a});d.append(Ae(u)),Mr([d]),d.select()}},{discrete:!0})}else n==null||n.dispatchCommand(Nr,{url:l,title:a});e.pub(st,{type:"preview",linkNodeKey:r.linkNodeKey,rectangle:r.rectangle,title:a,url:l})}else r.type==="edit"&&r.initialUrl!==""&&(n==null||n.dispatchCommand(Nr,null)),e.pub(st,{type:"inactive"})}),e.link(e.pipe(Km,Le(st,$e),yr(([,t,n])=>{if(t.type==="edit")return n==null||n.focus(),t.initialUrl===""?{type:"inactive"}:{type:"preview",url:t.initialUrl,linkNodeKey:t.linkNodeKey,rectangle:t.rectangle};throw new Error("Cannot cancel edit when not in edit mode")})),st),e.link(e.pipe(e.combine(Ir,Wm),Le($e,st,un),yr(([[t],n,r,i])=>{if(D(t)&&n&&!i){const o=Ba(t);return o?{type:"preview",url:o.getURL(),linkNodeKey:o.getKey(),title:o.getTitle(),rectangle:Um(n)}:{type:"inactive"}}else return{type:"inactive"}})),st)}),Jm=ze(),Km=Fn();Fn();const Zm=Fn(),Gm=Fn(e=>{e.sub(e.pipe(Gm,Le($e)),([,t])=>{t==null||t.dispatchCommand(Nr,null)})}),qm=Fn(e=>{e.sub(e.pipe(qm,Le(Ir,$e),ki(([,t])=>D(t))),([,t,n])=>{n==null||n.focus(()=>{setTimeout(()=>{n.getEditorState().read(()=>{const r=Ba(t),i=Um(n);r?e.pub(st,{type:"edit",initialUrl:r.getURL(),initialTitle:r.getTitle()??"",url:r.getURL(),title:r.getTitle()??"",linkNodeKey:r.getKey(),rectangle:i}):e.pub(st,{type:"edit",initialUrl:"",initialTitle:"",title:"",url:"",linkNodeKey:"",rectangle:i})})})})})}),Ym=re([]),Xm=re(null),J8=Kt({init(e,t){e.pub(ur,(t==null?void 0:t.LinkDialog)??W8),e.pub(Xm,(t==null?void 0:t.onClickLinkCallback)??null)},update(e,t={}){e.pub(Ym,t.linkAutocompleteSuggestions??[])}});function yc(e,t){return w.forwardRef((n,r)=>{const i=be(t.className,n.className);return w.createElement(e,{...t,...n,className:i,ref:r})})}const K8=({readOnly:e,children:t,className:n})=>w.createElement(i3,{className:be("mdxeditor-toolbar",G.toolbarRoot,{[G.readOnlyToolbarRoot]:e},n),...e?{tabIndex:-1}:{}},t);yc(P1,{className:G.toolbarButton,"data-toolbar-item":!0});const Z8=yc(s3,{className:G.toolbarToggleItem,"data-toolbar-item":!0});yc(M1,{type:"single",className:G.toolbarToggleSingleGroup});const Qm=w.forwardRef(({on:e,title:t,children:n,disabled:r,...i},o)=>w.createElement(M1,{type:"single",className:G.toolbarToggleSingleGroup,...i,value:e?"on":"off",ref:o},w.createElement(Z8,{title:t,value:"on",disabled:r},w.createElement(xc,{title:t},n)))),G8=({items:e})=>w.createElement("div",{className:G.toolbarGroupOfGroups},e.map((t,n)=>w.createElement(Qm,{key:n,title:t.title,on:t.active,onValueChange:r=>{t.onChange(r==="on")},disabled:t.disabled},t.contents))),q8=o3,El=re(()=>null),Tl=re(""),Vf=()=>"This is an empty toolbar. Pass `{toolbarContents: () => { return <>toolbar components</> }}` to the toolbarPlugin to customize it.",Y8=Kt({init(e,t){e.pubIn({[El]:(t==null?void 0:t.toolbarContents)??Vf,[Tl]:(t==null?void 0:t.toolbarClassName)??"",[Jv]:()=>{const[n,r,i]=dn(El,un,Tl);return w.createElement(K8,{className:i,readOnly:r},n())}})},update(e,t){e.pub(El,(t==null?void 0:t.toolbarContents)??Vf),e.pub(Tl,(t==null?void 0:t.toolbarClassName)??"")}});var X8={exports:{}};(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
76
- * Prism: Lightweight, robust, elegant syntax highlighting
77
- *
78
- * @license MIT <https://opensource.org/licenses/MIT>
79
- * @author Lea Verou <https://lea.verou.me>
80
- * @namespace
81
- * @public
82
- */var n=function(r){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,s={},l={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function g(m){return m instanceof a?new a(m.type,g(m.content),m.alias):Array.isArray(m)?m.map(g):m.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(g){return Object.prototype.toString.call(g).slice(8,-1)},objId:function(g){return g.__id||Object.defineProperty(g,"__id",{value:++o}),g.__id},clone:function g(m,b){b=b||{};var k,v;switch(l.util.type(m)){case"Object":if(v=l.util.objId(m),b[v])return b[v];k={},b[v]=k;for(var C in m)m.hasOwnProperty(C)&&(k[C]=g(m[C],b));return k;case"Array":return v=l.util.objId(m),b[v]?b[v]:(k=[],b[v]=k,m.forEach(function(E,I){k[I]=g(E,b)}),k);default:return m}},getLanguage:function(g){for(;g;){var m=i.exec(g.className);if(m)return m[1].toLowerCase();g=g.parentElement}return"none"},setLanguage:function(g,m){g.className=g.className.replace(RegExp(i,"gi"),""),g.classList.add("language-"+m)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(k){var g=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(k.stack)||[])[1];if(g){var m=document.getElementsByTagName("script");for(var b in m)if(m[b].src==g)return m[b]}return null}},isActive:function(g,m,b){for(var k="no-"+m;g;){var v=g.classList;if(v.contains(m))return!0;if(v.contains(k))return!1;g=g.parentElement}return!!b}},languages:{plain:s,plaintext:s,text:s,txt:s,extend:function(g,m){var b=l.util.clone(l.languages[g]);for(var k in m)b[k]=m[k];return b},insertBefore:function(g,m,b,k){k=k||l.languages;var v=k[g],C={};for(var E in v)if(v.hasOwnProperty(E)){if(E==m)for(var I in b)b.hasOwnProperty(I)&&(C[I]=b[I]);b.hasOwnProperty(E)||(C[E]=v[E])}var F=k[g];return k[g]=C,l.languages.DFS(l.languages,function(P,R){R===F&&P!=g&&(this[P]=C)}),C},DFS:function g(m,b,k,v){v=v||{};var C=l.util.objId;for(var E in m)if(m.hasOwnProperty(E)){b.call(m,E,m[E],k||E);var I=m[E],F=l.util.type(I);F==="Object"&&!v[C(I)]?(v[C(I)]=!0,g(I,b,null,v)):F==="Array"&&!v[C(I)]&&(v[C(I)]=!0,g(I,b,E,v))}}},plugins:{},highlightAll:function(g,m){l.highlightAllUnder(document,g,m)},highlightAllUnder:function(g,m,b){var k={callback:b,container:g,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};l.hooks.run("before-highlightall",k),k.elements=Array.prototype.slice.apply(k.container.querySelectorAll(k.selector)),l.hooks.run("before-all-elements-highlight",k);for(var v=0,C;C=k.elements[v++];)l.highlightElement(C,m===!0,k.callback)},highlightElement:function(g,m,b){var k=l.util.getLanguage(g),v=l.languages[k];l.util.setLanguage(g,k);var C=g.parentElement;C&&C.nodeName.toLowerCase()==="pre"&&l.util.setLanguage(C,k);var E=g.textContent,I={element:g,language:k,grammar:v,code:E};function F(R){I.highlightedCode=R,l.hooks.run("before-insert",I),I.element.innerHTML=I.highlightedCode,l.hooks.run("after-highlight",I),l.hooks.run("complete",I),b&&b.call(I.element)}if(l.hooks.run("before-sanity-check",I),C=I.element.parentElement,C&&C.nodeName.toLowerCase()==="pre"&&!C.hasAttribute("tabindex")&&C.setAttribute("tabindex","0"),!I.code){l.hooks.run("complete",I),b&&b.call(I.element);return}if(l.hooks.run("before-highlight",I),!I.grammar){F(l.util.encode(I.code));return}if(m&&r.Worker){var P=new Worker(l.filename);P.onmessage=function(R){F(R.data)},P.postMessage(JSON.stringify({language:I.language,code:I.code,immediateClose:!0}))}else F(l.highlight(I.code,I.grammar,I.language))},highlight:function(g,m,b){var k={code:g,grammar:m,language:b};if(l.hooks.run("before-tokenize",k),!k.grammar)throw new Error('The language "'+k.language+'" has no grammar.');return k.tokens=l.tokenize(k.code,k.grammar),l.hooks.run("after-tokenize",k),a.stringify(l.util.encode(k.tokens),k.language)},tokenize:function(g,m){var b=m.rest;if(b){for(var k in b)m[k]=b[k];delete m.rest}var v=new d;return h(v,v.head,g),c(g,v,m,v.head,0),p(v)},hooks:{all:{},add:function(g,m){var b=l.hooks.all;b[g]=b[g]||[],b[g].push(m)},run:function(g,m){var b=l.hooks.all[g];if(!(!b||!b.length))for(var k=0,v;v=b[k++];)v(m)}},Token:a};r.Prism=l;function a(g,m,b,k){this.type=g,this.content=m,this.alias=b,this.length=(k||"").length|0}a.stringify=function g(m,b){if(typeof m=="string")return m;if(Array.isArray(m)){var k="";return m.forEach(function(F){k+=g(F,b)}),k}var v={type:m.type,content:g(m.content,b),tag:"span",classes:["token",m.type],attributes:{},language:b},C=m.alias;C&&(Array.isArray(C)?Array.prototype.push.apply(v.classes,C):v.classes.push(C)),l.hooks.run("wrap",v);var E="";for(var I in v.attributes)E+=" "+I+'="'+(v.attributes[I]||"").replace(/"/g,"&quot;")+'"';return"<"+v.tag+' class="'+v.classes.join(" ")+'"'+E+">"+v.content+"</"+v.tag+">"};function u(g,m,b,k){g.lastIndex=m;var v=g.exec(b);if(v&&k&&v[1]){var C=v[1].length;v.index+=C,v[0]=v[0].slice(C)}return v}function c(g,m,b,k,v,C){for(var E in b)if(!(!b.hasOwnProperty(E)||!b[E])){var I=b[E];I=Array.isArray(I)?I:[I];for(var F=0;F<I.length;++F){if(C&&C.cause==E+","+F)return;var P=I[F],R=P.inside,M=!!P.lookbehind,K=!!P.greedy,B=P.alias;if(K&&!P.pattern.global){var Q=P.pattern.toString().match(/[imsuy]*$/)[0];P.pattern=RegExp(P.pattern.source,Q+"g")}for(var Z=P.pattern||P,ne=k.next,ce=v;ne!==m.tail&&!(C&&ce>=C.reach);ce+=ne.value.length,ne=ne.next){var N=ne.value;if(m.length>g.length)return;if(!(N instanceof a)){var se=1,ee;if(K){if(ee=u(Z,ce,g,M),!ee||ee.index>=g.length)break;var oe=ee.index,A=ee.index+ee[0].length,ue=ce;for(ue+=ne.value.length;oe>=ue;)ne=ne.next,ue+=ne.value.length;if(ue-=ne.value.length,ce=ue,ne.value instanceof a)continue;for(var he=ne;he!==m.tail&&(ue<A||typeof he.value=="string");he=he.next)se++,ue+=he.value.length;se--,N=g.slice(ce,ue),ee.index-=ce}else if(ee=u(Z,0,N,M),!ee)continue;var oe=ee.index,H=ee[0],j=N.slice(0,oe),q=N.slice(oe+H.length),Y=ce+N.length;C&&Y>C.reach&&(C.reach=Y);var ie=ne.prev;j&&(ie=h(m,ie,j),ce+=j.length),f(m,ie,se);var de=new a(E,R?l.tokenize(H,R):H,B,H);if(ne=h(m,ie,de),q&&h(m,ne,q),se>1){var Ie={cause:E+","+F,reach:Y};c(g,m,b,ne.prev,ce,Ie),C&&Ie.reach>C.reach&&(C.reach=Ie.reach)}}}}}}function d(){var g={value:null,prev:null,next:null},m={value:null,prev:g,next:null};g.next=m,this.head=g,this.tail=m,this.length=0}function h(g,m,b){var k=m.next,v={value:b,prev:m,next:k};return m.next=v,k.prev=v,g.length++,v}function f(g,m,b){for(var k=m.next,v=0;v<b&&k!==g.tail;v++)k=k.next;m.next=k,k.prev=m,g.length-=v}function p(g){for(var m=[],b=g.head.next;b!==g.tail;)m.push(b.value),b=b.next;return m}if(!r.document)return r.addEventListener&&(l.disableWorkerMessageHandler||r.addEventListener("message",function(g){var m=JSON.parse(g.data),b=m.language,k=m.code,v=m.immediateClose;r.postMessage(l.highlight(k,l.languages[b],b)),v&&r.close()},!1)),l;var x=l.util.currentScript();x&&(l.filename=x.src,x.hasAttribute("data-manual")&&(l.manual=!0));function y(){l.manual||l.highlightAll()}if(!l.manual){var _=document.readyState;_==="loading"||_==="interactive"&&x&&x.defer?document.addEventListener("DOMContentLoaded",y):window.requestAnimationFrame?window.requestAnimationFrame(y):window.setTimeout(y,16)}return l}(t);e.exports&&(e.exports=n),typeof vc<"u"&&(vc.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&amp;/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(i,o){var s={};s["language-"+o]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[o]},s.cdata=/^<!\[CDATA\[|\]\]>$/i;var l={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:s}};l["language-"+o]={pattern:/[\s\S]+/,inside:n.languages[o]};var a={};a[i]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return i}),"i"),lookbehind:!0,greedy:!0,inside:l},n.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,i){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[i,"language-"+i],inside:n.languages[i]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(r){var i=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+i.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+i.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+i.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+i.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:i,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var o=r.languages.markup;o&&(o.tag.addInlined("style","css"),o.tag.addAttribute("style","css"))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",i=function(x,y){return"✖ Error "+x+" while fetching file: "+y},o="✖ Error: File does not exist or is empty",s={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},l="data-src-status",a="loading",u="loaded",c="failed",d="pre[data-src]:not(["+l+'="'+u+'"]):not(['+l+'="'+a+'"])';function h(x,y,_){var g=new XMLHttpRequest;g.open("GET",x,!0),g.onreadystatechange=function(){g.readyState==4&&(g.status<400&&g.responseText?y(g.responseText):g.status>=400?_(i(g.status,g.statusText)):_(o))},g.send(null)}function f(x){var y=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(x||"");if(y){var _=Number(y[1]),g=y[2],m=y[3];return g?m?[_,Number(m)]:[_,void 0]:[_,_]}}n.hooks.add("before-highlightall",function(x){x.selector+=", "+d}),n.hooks.add("before-sanity-check",function(x){var y=x.element;if(y.matches(d)){x.code="",y.setAttribute(l,a);var _=y.appendChild(document.createElement("CODE"));_.textContent=r;var g=y.getAttribute("data-src"),m=x.language;if(m==="none"){var b=(/\.(\w+)$/.exec(g)||[,"none"])[1];m=s[b]||b}n.util.setLanguage(_,m),n.util.setLanguage(y,m);var k=n.plugins.autoloader;k&&k.loadLanguages(m),h(g,function(v){y.setAttribute(l,u);var C=f(y.getAttribute("data-range"));if(C){var E=v.split(/\r\n?|\n/g),I=C[0],F=C[1]==null?E.length:C[1];I<0&&(I+=E.length),I=Math.max(0,Math.min(I-1,E.length)),F<0&&(F+=E.length),F=Math.max(0,Math.min(F,E.length)),v=E.slice(I,F).join(`
83
- `),y.hasAttribute("data-start")||y.setAttribute("data-start",String(I+1))}_.textContent=v,n.highlightElement(_)},function(v){y.setAttribute(l,c),_.textContent=v})}}),n.plugins.fileHighlight={highlight:function(y){for(var _=(y||document).querySelectorAll(d),g=0,m;m=_[g++];)n.highlightElement(m)}};var p=!1;n.fileHighlight=function(){p||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),p=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(X8);Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity;Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup;Prism.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&amp;/,"&"))});Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(t,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};i["language-"+n]={pattern:/[\s\S]+/,inside:Prism.languages[n]};var o={};o[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:i},Prism.languages.insertBefore("markup","cdata",o)}});Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});Prism.languages.html=Prism.languages.markup;Prism.languages.mathml=Prism.languages.markup;Prism.languages.svg=Prism.languages.markup;Prism.languages.xml=Prism.languages.extend("markup",{});Prism.languages.ssml=Prism.languages.xml;Prism.languages.atom=Prism.languages.xml;Prism.languages.rss=Prism.languages.xml;(function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(c){return c=c.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+c+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+o+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+o+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(c){["url","bold","italic","strike","code-snippet"].forEach(function(d){c!==d&&(e.languages.markdown[c].inside.content.inside[d]=e.languages.markdown[d])})}),e.hooks.add("after-tokenize",function(c){if(c.language!=="markdown"&&c.language!=="md")return;function d(h){if(!(!h||typeof h=="string"))for(var f=0,p=h.length;f<p;f++){var x=h[f];if(x.type!=="code"){d(x.content);continue}var y=x.content[1],_=x.content[3];if(y&&_&&y.type==="code-language"&&_.type==="code-block"&&typeof y.content=="string"){var g=y.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");g=(/[a-z][\w-]*/i.exec(g)||[""])[0].toLowerCase();var m="language-"+g;_.alias?typeof _.alias=="string"?_.alias=[_.alias,m]:_.alias.push(m):_.alias=[m]}}}d(c.tokens)}),e.hooks.add("wrap",function(c){if(c.type==="code-block"){for(var d="",h=0,f=c.classes.length;h<f;h++){var p=c.classes[h],x=/language-(.+)/.exec(p);if(x){d=x[1];break}}var y=e.languages[d];if(y)c.content=e.highlight(u(c.content),y,d);else if(d&&d!=="none"&&e.plugins.autoloader){var _="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);c.attributes.id=_,e.plugins.autoloader.loadLanguages(d,function(){var g=document.getElementById(_);g&&(g.innerHTML=e.highlight(g.textContent,e.languages[d],d))})}}});var s=RegExp(e.languages.markup.tag.pattern.source,"gi"),l={amp:"&",lt:"<",gt:">",quot:'"'},a=String.fromCodePoint||String.fromCharCode;function u(c){var d=c.replace(s,"");return d=d.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(h,f){if(f=f.toLowerCase(),f[0]==="#"){var p;return f[1]==="x"?p=parseInt(f.slice(2),16):p=Number(f.slice(1)),a(p)}else{var x=l[f];return x||h}}),d}e.languages.md=e.languages.markdown})(Prism);Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/});Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}});Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}});Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/});delete Prism.languages.c.boolean;(function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))})(Prism);Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/});delete Prism.languages.objectivec["class-name"];Prism.languages.objc=Prism.languages.objectivec;Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};(function(e){var t=e.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};t.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:t},boolean:t.boolean,variable:t.variable}})(Prism);Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python;Prism.languages.py=Prism.languages.python;(function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string})(Prism);Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/};Prism.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=Prism.languages.swift});(function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript})(Prism);(function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism);(function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])})(Prism);function Q8(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}Q8(function(e){const t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});const e6=globalThis.Prism||window.Prism,Hf=e=>{try{return!!e&&e6.languages.hasOwnProperty(e)}catch{return!1}};function e0(e,t){for(const n of e.childNodes){if(Fe(n)&&n.tagName===t)return!0;e0(n,t)}return!1}const ti="data-language",po="data-highlight-language";class Qi extends Ot{static getType(){return"code"}static clone(t){return new Qi(t.__language,t.__key)}constructor(t,n){super(n),this.__language=t||void 0,this.__isSyntaxHighlightSupported=Hf(t)}createDOM(t){const n=document.createElement("code");Mt(n,t.theme.code),n.setAttribute("spellcheck","false");const r=this.getLanguage();return r&&(n.setAttribute(ti,r),this.getIsSyntaxHighlightSupported()&&n.setAttribute(po,r)),n}updateDOM(t,n,r){const i=this.__language,o=t.__language;return i?i!==o&&(n.setAttribute(ti,i),this.__isSyntaxHighlightSupported&&n.setAttribute(po,i)):o&&(n.removeAttribute(ti),t.__isSyntaxHighlightSupported&&n.removeAttribute(po)),!1}exportDOM(t){const n=document.createElement("pre");Mt(n,t._config.theme.code),n.setAttribute("spellcheck","false");const r=this.getLanguage();return r&&(n.setAttribute(ti,r),this.getIsSyntaxHighlightSupported()&&n.setAttribute(po,r)),{element:n}}static importDOM(){return{code:t=>t.textContent!=null&&(/\r?\n/.test(t.textContent)||e0(t,"BR"))?{conversion:Bf,priority:1}:null,div:()=>({conversion:t6,priority:1}),pre:()=>({conversion:Bf,priority:0}),table:t=>Il(t)?{conversion:n6,priority:3}:null,td:t=>{const n=t,r=n.closest("table");return n.classList.contains("js-file-line")||r&&Il(r)?{conversion:zf,priority:3}:null},tr:t=>{const n=t.closest("table");return n&&Il(n)?{conversion:zf,priority:3}:null}}}static importJSON(t){return on().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setLanguage(t.language)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage()}}insertNewAfter(t,n=!0){const r=this.getChildren(),i=r.length;if(i>=2&&r[i-1].getTextContent()===`
84
- `&&r[i-2].getTextContent()===`
85
- `&&t.isCollapsed()&&t.anchor.key===this.__key&&t.anchor.offset===i){r[i-1].remove(),r[i-2].remove();const a=_e();return this.insertAfter(a,n),a}const{anchor:o,focus:s}=t,l=(o.isBefore(s)?o:s).getNode();if(z(l)){let a=r6(l);const u=[];for(;;)if(Cu(a))u.push(Fr()),a=a.getNextSibling();else{if(!n0(a))break;{let y=0;const _=a.getTextContent(),g=a.getTextContentSize();for(;y<g&&_[y]===" ";)y++;if(y!==0&&u.push(t0(" ".repeat(y))),y!==g)break;a=a.getNextSibling()}}const c=l.splitText(o.offset)[0],d=o.offset===0?0:1,h=c.getIndexWithinParent()+d,f=l.getParentOrThrow(),p=[Pt(),...u];f.splice(h,0,p);const x=u[u.length-1];x?x.select():o.offset===0?c.selectPrevious():c.getNextSibling().selectNext(0,0)}if(_c(l)){const{offset:a}=t.anchor;l.splice(a,0,[Pt()]),l.select(a+1,a+1)}return null}canIndent(){return!1}collapseAtStart(){const t=_e();return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}setLanguage(t){const n=this.getWritable();return n.__language=t||void 0,n.__isSyntaxHighlightSupported=Hf(t),n}getLanguage(){return this.getLatest().__language}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}}function on(e){return dt(new Qi(e))}function _c(e){return e instanceof Qi}function Bf(e){return{node:on(e.getAttribute(ti))}}function t6(e){const t=e,n=jf(t);return n||function(r){let i=r.parentElement;for(;i!==null;){if(jf(i))return!0;i=i.parentElement}return!1}(t)?{node:n?on():null}:{node:null}}function n6(){return{node:on()}}function zf(){return{node:null}}function jf(e){return e.style.fontFamily.match("monospace")!==null}function Il(e){return e.classList.contains("js-file-line-container")}class Zs extends pn{constructor(t="",n,r){super(t,r),this.__highlightType=n}static getType(){return"code-highlight"}static clone(t){return new Zs(t.__text,t.__highlightType||void 0,t.__key)}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(t){const n=this.getWritable();return n.__highlightType=t||void 0,n}canHaveFormat(){return!1}createDOM(t){const n=super.createDOM(t),r=Al(t.theme,this.__highlightType);return Mt(n,r),n}updateDOM(t,n,r){const i=super.updateDOM(t,n,r),o=Al(r.theme,t.__highlightType),s=Al(r.theme,this.__highlightType);return o!==s&&(o&&Ts(n,o),s&&Mt(n,s)),i}static importJSON(t){return t0().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setHighlightType(t.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(t){return this}isParentRequired(){return!0}createParentElementNode(){return on()}}function Al(e,t){return t&&e&&e.codeHighlight&&e.codeHighlight[t]}function t0(e="",t){return dt(new Zs(e,t))}function n0(e){return e instanceof Zs}function r6(e){let t=e,n=e;for(;n0(n)||Cu(n);)t=n,n=n.getPreviousSibling();return t}function za(e,t){const n={};for(const r of e){const i=t(r);i&&(n[i]?n[i].push(r):n[i]=[r])}return n}function i6(e){const t=za(e,n=>n.type);return{element:t.element||[],multilineElement:t["multiline-element"]||[],textFormat:t["text-format"]||[],textMatch:t["text-match"]||[]}}const Uf=/[!-/:-@[-`{-~\s]/,r0=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,o6=r0&&"documentMode"in document?document.documentMode:null;r0&&"InputEvent"in window&&!o6&&new window.InputEvent("input");function s6(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var l6=s6(function(e){const t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});function Wf(e,t,n){const r=n.length;for(let i=t;i>=r;i--){const o=i-r;if(i0(e,o,n,0,r)&&e[o+r]!==" ")return o}return-1}function i0(e,t,n,r,i){for(let o=0;o<i;o++)if(e[t+o]!==n[r+o])return!1;return!0}function a6(e,t=y0){const n=i6(t),r=za(n.textFormat,({tag:s})=>s[s.length-1]),i=za(n.textMatch,({trigger:s})=>s);for(const s of t){const l=s.type;if(l==="element"||l==="text-match"||l==="multiline-element"){const a=s.dependencies;for(const u of a)e.hasNode(u)||l6(173,u.getType())}}const o=(s,l,a)=>{(function(u,c,d,h){const f=u.getParent();if(!Ve(f)||u.getFirstChild()!==c)return!1;const p=c.getTextContent();if(p[d-1]!==" ")return!1;for(const{regExp:x,replace:y}of h){const _=p.match(x);if(_&&_[0].length===(_[0].endsWith(" ")?d:d-1)){const g=c.getNextSiblings(),[m,b]=c.splitText(d);if(m.remove(),y(u,b?[b,...g]:g,_,!1)!==!1)return!0}}return!1})(s,l,a,n.element)||function(u,c,d,h){const f=u.getParent();if(!Ve(f)||u.getFirstChild()!==c)return!1;const p=c.getTextContent();if(p[d-1]!==" ")return!1;for(const{regExpStart:x,replace:y,regExpEnd:_}of h){if(_&&!("optional"in _)||_&&"optional"in _&&!_.optional)continue;const g=p.match(x);if(g&&g[0].length===(g[0].endsWith(" ")?d:d-1)){const m=c.getNextSiblings(),[b,k]=c.splitText(d);if(b.remove(),y(u,k?[k,...m]:m,g,null,null,!1)!==!1)return!0}}return!1}(s,l,a,n.multilineElement)||function(u,c,d){let h=u.getTextContent();const f=d[h[c-1]];if(f==null)return!1;c<h.length&&(h=h.slice(0,c));for(const p of f){if(!p.replace||!p.regExp)continue;const x=h.match(p.regExp);if(x===null)continue;const y=x.index||0,_=y+x[0].length;let g;return y===0?[g]=u.splitText(_):[,g]=u.splitText(y,_),g.selectNext(0,0),p.replace(g,x),!0}return!1}(l,a,i)||function(u,c,d){const h=u.getTextContent(),f=c-1,p=h[f],x=d[p];if(!x)return!1;for(const y of x){const{tag:_}=y,g=_.length,m=f-g+1;if(g>1&&!i0(h,m,_,0,g)||h[m-1]===" ")continue;const b=h[f+1];if(y.intraword===!1&&b&&!Uf.test(b))continue;const k=u;let v=k,C=Wf(h,m,_),E=v;for(;C<0&&(E=E.getPreviousSibling())&&!Lt(E);)if(z(E)){const Z=E.getTextContent();v=E,C=Wf(Z,Z.length,_)}if(C<0||v===k&&C+g===m)continue;const I=v.getTextContent();if(C>0&&I[C-1]===p)continue;const F=I[C-1];if(y.intraword===!1&&F&&!Uf.test(F))continue;const P=k.getTextContent(),R=P.slice(0,m)+P.slice(f+1);k.setTextContent(R);const M=v===k?R:I;v.setTextContent(M.slice(0,C)+M.slice(C+g));const K=U(),B=ws();Ye(B);const Q=f-g*(v===k?2:1)+1;B.anchor.set(v.__key,C,"text"),B.focus.set(k.__key,Q,"text");for(const Z of y.format)B.hasFormat(Z)||B.formatText(Z);B.anchor.set(B.focus.key,B.focus.offset,B.focus.type);for(const Z of y.format)B.hasFormat(Z)&&B.toggleFormat(Z);return D(K)&&(B.format=K.format),!0}}(l,a,r)};return e.registerUpdateListener(({tags:s,dirtyLeaves:l,editorState:a,prevEditorState:u})=>{if(s.has("collaboration")||s.has("historic")||e.isComposing())return;const c=a.read(U),d=u.read(U);if(!D(d)||!D(c)||!c.isCollapsed()||c.is(d))return;const h=c.anchor.key,f=c.anchor.offset,p=a._nodeMap.get(h);!z(p)||!l.has(h)||f!==1&&f>d.anchor.offset+1||e.update(()=>{if(p.hasFormat("code"))return;const x=p.getParent();x===null||_c(x)||o(x,p,c.anchor.offset)})})}const u6=/^(\s*)(\d{1,})\.\s/,c6=/^(\s*)[-*+]\s/,d6=/^(\s*)(?:-\s)?\s?(\[(\s|x)?\])\s/i,f6=/^(#{1,6})\s/,h6=/^>\s/,p6=/^[ \t]*```(\w+)?/,g6=/[ \t]*```$/,o0=e=>(t,n,r)=>{const i=e(r);i.append(...n),t.replace(i),i.select(0,0)},bc=e=>(t,n,r)=>{const i=t.getPreviousSibling(),o=t.getNextSibling(),s=et(e==="check"?r[3]==="x":void 0);if(ae(o)&&o.getListType()===e){const a=o.getFirstChild();a!==null?a.insertBefore(s):o.append(s),t.remove()}else if(ae(i)&&i.getListType()===e)i.append(s),t.remove();else{const a=Qe(e,e==="number"?Number(r[2]):void 0);a.append(s),t.replace(a)}s.append(...n),s.select(0,0);const l=function(a){const u=a.match(/\t/g),c=a.match(/ /g);let d=0;return u&&(d+=u.length),c&&(d+=Math.floor(c.length/4)),d}(r[1]);l&&s.setIndent(l)},Gs=(e,t,n)=>{const r=[],i=e.getChildren();let o=0;for(const s of i)if(me(s)){if(s.getChildrenSize()===1){const c=s.getFirstChild();if(ae(c)){r.push(Gs(c,t,n+1));continue}}const l=" ".repeat(4*n),a=e.getListType(),u=a==="number"?`${e.getStart()+o}. `:a==="check"?`- [${s.getChecked()?"x":" "}] `:"- ";r.push(l+u+t(s)),o++}return r.join(`
86
- `)},m6={dependencies:[$i],export:(e,t)=>{if(!As(e))return null;const n=Number(e.getTag().slice(1));return"#".repeat(n)+" "+t(e)},regExp:f6,replace:o0(e=>{const t="h"+e[1].length;return Ut(t)}),type:"element"},s0={dependencies:[Is],export:(e,t)=>{if(!ta(e))return null;const n=t(e).split(`
87
- `),r=[];for(const i of n)r.push("> "+i);return r.join(`
88
- `)},regExp:h6,replace:(e,t,n,r)=>{if(r){const o=e.getPreviousSibling();if(ta(o))return o.splice(o.getChildrenSize(),0,[Pt(),...t]),o.select(0,0),void e.remove()}const i=Oi();i.append(...t),e.replace(i),i.select(0,0)},type:"element"},l0={dependencies:[Qi],export:e=>{if(!_c(e))return null;const t=e.getTextContent();return"```"+(e.getLanguage()||"")+(t?`
89
- `+t:"")+"\n```"},regExpEnd:{optional:!0,regExp:g6},regExpStart:p6,replace:(e,t,n,r,i,o)=>{let s,l;if(!t&&i){if(i.length===1)r?(s=on(),l=n[1]+i[0]):(s=on(n[1]),l=i[0].startsWith(" ")?i[0].slice(1):i[0]);else{if(s=on(n[1]),i[0].trim().length===0)for(;i.length>0&&!i[0].length;)i.shift();else i[0]=i[0].startsWith(" ")?i[0].slice(1):i[0];for(;i.length>0&&!i[i.length-1].length;)i.pop();l=i.join(`
90
- `)}const a=Ae(l);s.append(a),e.append(s)}else t&&o0(a=>on(a?a[1]:void 0))(e,t,n,o)},type:"multiline-element"},a0={dependencies:[Dn,$n],export:(e,t)=>ae(e)?Gs(e,t,0):null,regExp:c6,replace:bc("bullet"),type:"element"},x6={dependencies:[Dn,$n],export:(e,t)=>ae(e)?Gs(e,t,0):null,regExp:d6,replace:bc("check"),type:"element"},u0={dependencies:[Dn,$n],export:(e,t)=>ae(e)?Gs(e,t,0):null,regExp:u6,replace:bc("number"),type:"element"},c0={format:["code"],tag:"`",type:"text-format"},y6={format:["highlight"],tag:"==",type:"text-format"},d0={format:["bold","italic"],tag:"***",type:"text-format"},f0={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},h0={format:["bold"],tag:"**",type:"text-format"},p0={format:["bold"],intraword:!1,tag:"__",type:"text-format"},_6={format:["strikethrough"],tag:"~~",type:"text-format"},g0={format:["italic"],tag:"*",type:"text-format"},m0={format:["italic"],intraword:!1,tag:"_",type:"text-format"},x0={dependencies:[Dr],export:(e,t,n)=>{if(!jt(e))return null;const r=e.getTitle(),i=r?`[${e.getTextContent()}](${e.getURL()} "${r}")`:`[${e.getTextContent()}](${e.getURL()})`,o=e.getFirstChild();return e.getChildrenSize()===1&&z(o)?n(o,i):i},importRegExp:/(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(e,t)=>{const[,n,r,i]=t,o=rr(r,{title:i}),s=Ae(n);s.setFormat(e.getFormat()),o.append(s),e.replace(o)},trigger:")",type:"text-match"},b6=[m6,s0,a0,u0],v6=[l0],C6=[c0,d0,f0,h0,p0,y6,g0,m0,_6],w6=[x0],y0=[...b6,...v6,...C6,...w6],k6=[{dependencies:[Os],export:e=>Bu(e)?"***":null,regExp:/^(---|\*\*\*|___)\s?$/,replace:(e,t,n,r)=>{const i=Hi();r||e.getNextSibling()!=null?e.replace(i):e.insertBefore(i),i.selectNext()},type:"element"},...y0];function Jf({transformers:e=k6}){const[t]=it();return T.useEffect(()=>a6(t,e),[t,e]),null}const S6=Kt({init(e){const t=e.getValue(Hu),n=t.includes("headings")?e.getValue(Rs):[],r=T6(t,n);e.pubIn({[ur]:()=>w.createElement(Jf,{transformers:r}),[Ng]:()=>w.createElement(Jf,{transformers:r})})}}),E6=e=>(t,n,r)=>{const i=e(r);i.append(...n),t.replace(i),i.select(0,0)};function T6(e,t){const n=[d0,f0,h0,p0,c0,g0,m0];if(e.includes("headings")){const r=Math.min(...t),i=Math.max(...t),o=new RegExp(`^(#{${r},${i}})\\s`),s={dependencies:[$i],export:(l,a)=>{if(!As(l))return null;const u=Number(l.getTag().slice(1));return"#".repeat(u)+" "+a(l)},regExp:o,replace:E6(l=>{const a=`h${l[1].length}`;return Ut(a)}),type:"element"};n.push(s)}if(e.includes("quote")&&n.push(s0),e.includes("link")&&n.push(x0),e.includes("lists")&&n.push(u0,a0,x6),e.includes("codeblock")){const r={...l0,dependencies:[Us],replace:(i,o,s)=>{const l=gc({code:"",language:s[1]??"",meta:""});i.replace(l),setTimeout(()=>{l.select()},80)}};n.push(r)}return n}const I6=()=>{const e=xt(Jo),t=vt(Lg),n=vt(Hu),r=n.includes("quote"),i=n.includes("headings"),o=gn();if(!r&&!i)return null;const s=[{label:o("toolbar.blockTypes.paragraph","Paragraph"),value:"paragraph"}];if(r&&s.push({label:o("toolbar.blockTypes.quote","Quote"),value:"quote"}),i){const l=vt(Rs);s.push(...l.map(a=>({label:o("toolbar.blockTypes.heading","Heading {{level}}",{level:a}),value:`h${a}`})))}return w.createElement(z8,{value:t,onChange:l=>{switch(l){case"quote":e(()=>Oi());break;case"paragraph":e(()=>_e());break;case"":break;default:if(l.startsWith("h"))e(()=>Ut(l));else throw new Error(`Unknown block type: ${l}`)}},triggerTitle:o("toolbar.blockTypeSelect.selectBlockTypeTooltip","Select block type"),placeholder:o("toolbar.blockTypeSelect.placeholder","Block type"),items:s})},Nl=({format:e,addTitle:t,removeTitle:n,icon:r,formatName:i})=>{const[o,s]=dn(cg,On),l=xt(dg),a=(o&e)!==0;return w.createElement(Qm,{title:a?n:t,on:a,onValueChange:()=>{l(i)}},s(r))},A6=({options:e})=>{const t=gn(),n=typeof e>"u";return w.createElement("div",{className:G.toolbarGroupOfGroups},n||e.includes("Bold")?w.createElement(Nl,{format:ai,addTitle:t("toolbar.bold","Bold"),removeTitle:t("toolbar.removeBold","Remove bold"),icon:"format_bold",formatName:"bold"}):null,n||e.includes("Italic")?w.createElement(Nl,{format:ui,addTitle:t("toolbar.italic","Italic"),removeTitle:t("toolbar.removeItalic","Remove italic"),icon:"format_italic",formatName:"italic"}):null,n||e.includes("Underline")?w.createElement(Nl,{format:ci,addTitle:t("toolbar.underline","Underline"),removeTitle:t("toolbar.removeUnderline","Remove underline"),icon:"format_underlined",formatName:"underline"}):null)},N6=w.forwardRef((e,t)=>{const n=xt(hm),[r,i]=dn(un,On),o=gn();return w.createElement(P1,{className:G.toolbarButton,ref:t,disabled:r,onClick:()=>{n()}},w.createElement(xc,{title:o("toolbar.image","Insert image")},i("add_photo")))}),L6=()=>{const[e,t]=dn(On,$e),[n,r]=w.useState(!1),[i,o]=w.useState(!1),s=gn();return w.useEffect(()=>{if(t)return ft(t.registerCommand(qr,l=>(r(l),!1),an),t.registerCommand(Gr,l=>(o(l),!1),an))},[t]),w.createElement(G8,{items:[{title:s("toolbar.undo","Undo {{shortcut}}",{shortcut:Zo?"⌘Z":"Ctrl+Z"}),disabled:!n,contents:e("undo"),active:!1,onChange:()=>t==null?void 0:t.dispatchCommand(as,void 0)},{title:s("toolbar.redo","Redo {{shortcut}}",{shortcut:Zo?"⌘Y":"Ctrl+Y"}),disabled:!i,contents:e("redo"),active:!1,onChange:()=>t==null?void 0:t.dispatchCommand(us,void 0)}]})},F6="_mdxeditor_teaf1_2",P6={mdxeditor:F6};function M6({className:e,markdown:t,onChange:n}){return L.jsx(x9,{className:T0("flex flex-col w-full rounded-md border border-input bg-transparent text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",P6.mdxeditor,e),suppressHtmlProcessing:!0,markdown:t,onChange:n,plugins:[w9(),tw(),T3(),J8(),Z7(),D7({disableImageResize:!0,disableImageSettingsButton:!0}),N9(),S6(),Y8({toolbarClassName:"flex flex-row overflow-hidden shrink-0 h-10 border-b bg-white rounded-none",toolbarContents:()=>L.jsxs("div",{className:"flex items-center flex-1 gap-1",children:[L.jsx(I6,{}),L.jsx(A6,{}),L.jsx(q8,{}),L.jsx(N6,{}),L.jsx("div",{className:"ml-auto",children:L.jsx(L6,{})})]})})]})}function q6({itemType:e,fields:t,data:n,isNew:r}){const[i]=S0(),[o]=E0(),s=T.useCallback(c=>({id:(n==null?void 0:n.id)??"",...Object.fromEntries(Object.keys(c).map(d=>[d,(n==null?void 0:n[d])??(c[d].type==="boolean"?!1:"")]))}),[n,t]),l=ja({defaultValues:s(t)});async function a(c){r?i({...c,type:e}):o({...c,type:e})}const u=T.useMemo(()=>Object.entries(t).filter(([,c])=>c.type==="boolean"),[t]);return L.jsx(w0,{...l,children:L.jsxs("form",{onSubmit:l.handleSubmit(a),className:"space-y-4 max-w-[800px]",children:[L.jsx(qs,{name:"id",control:l.control,disabled:(n==null?void 0:n.id)==="default",rules:{required:!0},render:({field:c})=>L.jsxs(Ys,{children:[L.jsx(eo,{className:"flex gap-1 items-baseline",children:"ID"}),L.jsx(Xs,{children:L.jsx(Cc,{placeholder:"url-slug",...c})}),(n==null?void 0:n.id)!=="default"&&L.jsx(Qs,{children:"Choose a descriptive ID, since it will be part of the URL"}),L.jsx(el,{})]})}),u.length>0&&L.jsxs("div",{className:"flex flex-col gap-3",children:[L.jsx(eo,{children:"Flags"}),L.jsx("div",{className:"flex flex-row flex-wrap gap-4",children:u.map(([c,d])=>L.jsx(qs,{name:c,control:l.control,render:({field:h})=>L.jsxs(Ys,{className:"flex flex-col items-start",children:[L.jsxs("div",{className:"flex flex-row space-x-2",children:[L.jsx(Xs,{children:L.jsx(k0,{checked:h.value==="true",onCheckedChange:f=>{h.onChange(f===!0?"true":"false")}})}),L.jsx(eo,{className:"flex gap-1 items-baseline",children:d.displayName})]}),d.displayExtra&&L.jsx(Qs,{children:d.displayExtra}),L.jsx(el,{})]})},c))})]}),Object.entries(t).filter(([,c])=>c.type!=="boolean").map(([c,d])=>L.jsx(qs,{name:c,control:l.control,rules:{required:d.isRequired},render:({field:h})=>L.jsxs(Ys,{children:[L.jsxs(eo,{className:"flex gap-1 items-baseline",children:[d.displayName,!d.isRequired&&L.jsx("span",{className:"text-gray-400",children:"(optional)"})]}),L.jsx(Xs,{children:d.type==="markdown"?L.jsx(M6,{className:"h-52",markdown:h.value,onChange:h.onChange,placeholder:d.placeholder}):L.jsx(Cc,{placeholder:d.placeholder,...h})}),d.displayExtra&&L.jsx(Qs,{children:d.displayExtra}),L.jsx(el,{})]})},c)),L.jsxs(b0,{disabled:!l.formState.isDirty&&!r,type:"submit",children:[L.jsx(V0,{})," Save"]})]})})}export{q6 as I};