@isardsat/editorial-admin 6.0.3 → 6.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/client/assets/{authSlice-5XZo_yNS.js → authSlice-B3Tyl-Nw.js} +181 -181
- package/build/client/assets/button-Da66T3Bb.js +1 -0
- package/build/client/assets/{chevron-down-BMtosYlL.js → chevron-down-D_Gla76b.js} +1 -1
- package/build/client/assets/chunk-KNED5TY2-DAA_sFzt.js +51 -0
- package/build/client/assets/{createLucideIcon-TQsNVzYU.js → createLucideIcon-R2-3a7hN.js} +1 -1
- package/build/client/assets/dashboard-BTu7-8Ba.js +1 -0
- package/build/client/assets/dashboard._collection-MtSHvYYW.js +16 -0
- package/build/client/assets/dashboard._collection._document-CRkC98aa.js +1 -0
- package/build/client/assets/dashboard._collection.new-BFe8yV0Z.js +1 -0
- package/build/client/assets/dashboard._layout-BjRnQPQr.js +66 -0
- package/build/client/assets/dashboard.files-DKh39mcB.js +36 -0
- package/build/client/assets/editorialApi-fQchmMa9.js +1 -0
- package/build/client/assets/entry.client-BGu2H8xv.js +34 -0
- package/build/client/assets/home-C2nWtN4c.js +11 -0
- package/build/client/assets/index-Bd1u2_LZ.js +45 -0
- package/build/client/assets/{index-D4Mj6Lef.js → index-BvKqmqc2.js} +1 -1
- package/build/client/assets/index-C-vcF2DZ.js +9 -0
- package/build/client/assets/{index-DZxX-xes.js → index-DeO5nu0f.js} +2 -2
- package/build/client/assets/{input-D-kT9R-x.js → input-BmmdOdbj.js} +2 -2
- package/build/client/assets/itemForm-CDbHkFXh.css +1 -0
- package/build/client/assets/itemForm-DlRBjBsd.js +90 -0
- package/build/client/assets/manifest-2ff77582.js +1 -0
- package/build/client/assets/react-redux-kbMjYGuQ.js +9 -0
- package/build/client/assets/root-DS7N36v7.css +1 -0
- package/build/client/assets/root-wKvfXBjk.js +1 -0
- package/build/client/assets/{trash-B3lfbu-5.js → trash-wq_ppIxP.js} +1 -1
- package/build/client/assets/{tslib.es6-De9GV7Vy.js → tslib.es6-CDuPK5Eb.js} +1 -1
- package/build/client/assets/utils-DslUJpbf.js +1 -0
- package/build/client/index.html +10 -18
- package/package.json +13 -11
- package/build/client/__spa-fallback.html +0 -13
- package/build/client/admin/index.html +0 -22
- package/build/client/assets/button-V-1j5t4f.js +0 -1
- package/build/client/assets/chunk-KNED5TY2-CXj9yqcQ.js +0 -51
- package/build/client/assets/dashboard-Be6nTcTN.js +0 -1
- package/build/client/assets/dashboard._collection-DppEZSog.js +0 -16
- package/build/client/assets/dashboard._collection._document-DX_V-XK4.js +0 -1
- package/build/client/assets/dashboard._collection.new-CocdSIiG.js +0 -1
- package/build/client/assets/dashboard._layout-Df-C65Il.js +0 -65
- package/build/client/assets/dashboard.files-Doq5nv7_.js +0 -36
- package/build/client/assets/editorialApi-CykQGjTu.js +0 -1
- package/build/client/assets/entry.client-B5Ca3clj.js +0 -34
- package/build/client/assets/home-ZtJfV8P0.js +0 -11
- package/build/client/assets/index-B7e3fQ32.js +0 -9
- package/build/client/assets/index-CMEgjExU.js +0 -46
- package/build/client/assets/itemForm-CcPfHU2b.css +0 -1
- package/build/client/assets/itemForm-ChV6tjGl.js +0 -99
- package/build/client/assets/manifest-a1ca6f8e.js +0 -1
- package/build/client/assets/react-redux-D9l7ZD4q.js +0 -9
- package/build/client/assets/root-BvXgIVX7.js +0 -1
- package/build/client/assets/root-DhulzpWQ.css +0 -1
- package/build/client/assets/utils-BJX_0rcU.js +0 -1
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import{a as T,w,n as F,x as nh,y as y0,z as hc}from"./chunk-KNED5TY2-DAA_sFzt.js";import{u as at,a as fo,B as _0}from"./button-Da66T3Bb.js";import{h as v0,u as Oa,i as b0,F as C0,b as $s,c as Ds,d as ji,e as Vs,I as pc,j as Hs,f as Bs,C as w0}from"./input-BmmdOdbj.js";import{k as k0,l as S0}from"./editorialApi-fQchmMa9.js";import{c as E0}from"./utils-DslUJpbf.js";import{a as ho}from"./index-C-vcF2DZ.js";import{g as Jo,h as rh,u as Ko,i as $a,j as ih,k as oh,l as sh,m as lh,n as ah,F as uh,o as ch,p as dh,R as T0,P as I0,O as A0,C as N0,T as L0,a as F0,V as P0,b as fh,c as hh,d as ph,e as gh,f as mh,A as M0}from"./index-Bd1u2_LZ.js";import{a as gc}from"./tslib.es6-CDuPK5Eb.js";import{u as kl,c as Da,b as xh,a as Pe,P as ut,d as En,e as R0}from"./index-BvKqmqc2.js";import{c as O0}from"./createLucideIcon-R2-3a7hN.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 $0=[["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"}]],D0=O0("save",$0);var V0=Object.defineProperty,H0=(e,t,n)=>t in e?V0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yn=(e,t,n)=>H0(e,typeof t!="symbol"?t+"":t,n);let B0=class yh{constructor(t=new Map){this.map=t}clone(){return new yh(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())}},Ui=class{constructor(){yn(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 Kn(e,t){return t(e),e}function Va(){}const _h="cell";function mc(e,t){return e===t}const Zo=new Map;let z0=class{constructor(t={}){yn(this,"subscriptions",new Ui),yn(this,"singletonSubscriptions",new Map),yn(this,"graph",new Ui),yn(this,"state",new Map),yn(this,"distinctNodes",new Map),yn(this,"executionMaps",new Map),yn(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?mc:n),r}signalInstance(t=!0,n=Symbol()){return t!==!1&&this.distinctNodes.set(n,t===!0?mc: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(_=>l.get(_));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=>Kn(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 Kn(this.signalInstance(),n=>{this.connect({map:r=>(...i)=>{r(i)},sink:n,sources:t})})}combineCells(...t){return Kn(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=Zo.get(t);return n===void 0||this.definitionRegistry.has(t)?t:(this.definitionRegistry.add(t),Kn(n.type===_h?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 Ui,o=new B0,s=new Ui,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=Va,n=!0){return Kn(Symbol(),r=>{Zo.set(r,{type:_h,distinct:n,initial:e,init:t})})}function ze(e=Va,t=!1){return Kn(Symbol(),n=>{Zo.set(n,{type:"signal",distinct:t,init:e})})}function Nn(e=Va){return Kn(Symbol(),t=>{Zo.set(t,{type:"signal",distinct:!1,init:e})})}const vh=T.createContext(null);function Go(){const e=T.useContext(vh);if(e===null)throw new Error("useRealm must be used within a RealmContextProvider");return e}function vt(e){const t=Go();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 un(...e){const t=Go();return vt(t.combineCells.apply(t,e))}function mt(e){const t=Go();return t.register(e),T.useCallback(n=>{t.pub(e,n)},[t,e])}function xr(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 bh(e){return(t,n)=>{const r=n.signalInstance();return n.connect({map:i=>()=>{i(e)},sink:r,sources:[t]}),r}}function Ci(e){return(t,n)=>{const r=n.signalInstance();return n.connect({map:i=>o=>{e(o)&&i(o)},sink:r,sources:[t]}),r}}function Ch(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 j0(e,t){return t(e),e}function yr(){}function Wt(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 U0({children:e,plugins:t}){const n=w.useMemo(()=>j0(new z0,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(vh.Provider,{value:n},e)}function W0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var J0=W0(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 wh=T.createContext(null);function K0(e,t){return{getTheme:function(){return t??null}}}function rt(){const e=T.useContext(wh);return e==null&&J0(8),e}function cn(e){return{}}const wi={},Z0={},qo={},Zn={},_r={},di={},vr={},ki={},Sl={},fi={},hi={},en={},Yo={},Xo={},kh={},Sh={},G0={},Ha={},q0={},Ba={},za={},pi={},ja={},Qo={},Si={},es={},Ua={},Eh={},po={},El={},Wa={},Y0={},ts={},Ja={},X0={},ns={},Ka={},Tl={},Q0={},e5={},Kr={},Zr={},Th={},Ih={},Ah={},Mt=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,t5=Mt&&"documentMode"in document?document.documentMode:null,kt=Mt&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),kn=Mt&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),go=!(!Mt||!("InputEvent"in window)||t5)&&"getTargetRanges"in new window.InputEvent("input"),rs=Mt&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Ei=Mt&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,n5=Mt&&/Android/.test(navigator.userAgent),Nh=Mt&&/^(?=.*Chrome).*/i.test(navigator.userAgent),r5=Mt&&n5&&Nh,Za=Mt&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!Nh,i5=1,o5=3,s5=9,l5=11,Yn=0,Lh=1,kr=2,a5=0,u5=1,c5=2,mo=4,xo=8,Ga=128,d5=1792|(112|(3|mo|xo)|Ga),qa=1,Ya=2,Xa=3,Qa=4,eu=5,tu=6,is=rs||Ei||Za?" ":"",rn=`
|
|
7
|
+
|
|
8
|
+
`,f5=kn?" ":is,Fh="֑-߿יִ-﷽ﹰ-ﻼ",Ph="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",h5=new RegExp("^[^"+Ph+"]*["+Fh+"]"),p5=new RegExp("^[^"+Fh+"]*["+Ph+"]"),Xn={bold:1,capitalize:1024,code:16,highlight:Ga,italic:2,lowercase:256,strikethrough:mo,subscript:32,superscript:64,underline:xo,uppercase:512},g5={directionless:1,unmergeable:2},xc={center:Ya,end:tu,justify:Qa,left:qa,right:Xa,start:eu},m5={[Ya]:"center",[tu]:"end",[Qa]:"justify",[qa]:"left",[Xa]:"right",[eu]:"start"},x5={normal:0,segmented:2,token:1},y5={[a5]:"normal",[c5]:"segmented",[u5]:"token"};function _5(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var W=_5(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 yo(...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 Il=!1,nu=0;function b5(e){nu=e.timeStamp}function zs(e,t,n){const r=e.nodeName==="BR",i=t.__lexicalLineBreak;return i&&(e===i||r&&e.previousSibling===i)||r&&ss(e,n)!==void 0}function C5(e,t,n){const r=Lt(n._window);let i=null,o=null;r!==null&&r.anchorNode===e&&(i=r.anchorOffset,o=r.focusOffset);const s=e.nodeValue;s!==null&&au(t,s,i,o,!1)}function w5(e,t,n){if(D(e)){const r=e.anchor.getNode();if(r.is(n)&&e.format!==r.getFormat())return!1}return dn(t)&&n.isAttached()}function k5(e,t,n,r){for(let i=e;i&&!$5(i);i=Ii(i)){const o=ss(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,Bh(n)]}}function Mh(e,t,n){Il=!0;const r=performance.now()-nu>v5;try{_t(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,_=k5(x,e,l,s);if(!_)continue;const[y,g]=_;if(p==="characterData")r&&z(g)&&dn(x)&&w5(i,x,g)&&C5(x,g,e);else if(p==="childList"){u=!0;const m=f.addedNodes;for(let b=0;b<m.length;b++){const C=m[b],E=Vh(C),I=C.parentNode;if(I!=null&&C!==a&&E===null&&!zs(C,I,e)){if(kn){const P=(Fe(C)?C.innerText:null)||C.nodeValue;P&&(c+=P)}I.removeChild(C)}}const v=f.removedNodes,k=v.length;if(k>0){let b=0;for(let C=0;C<k;C++){const E=v[C];(zs(E,x,e)||a===E)&&(x.appendChild(E),b++)}k!==b&&o.set(y,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 _=0;_<p.length;_++){const y=p[_],g=y.parentNode;g==null||y.nodeName!=="BR"||zs(y,x,e)||g.removeChild(y)}}n.takeRecords()}i!==null&&(u&&(i.dirty=!0,qe(i)),kn&&Wh(e)&&i.insertRawText(c))})}finally{Il=!1}}function Rh(e){const t=e._observer;t!==null&&Mh(e,t.takeRecords(),t)}function Oh(e){(function(t){nu===0&&as(t).addEventListener("textInput",b5,!0)})(e),e._observer=new MutationObserver((t,n)=>{Mh(e,t,n)})}function yc(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 _c(e,t){const n=e.mergeWithSibling(t),r=Oe()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function vc(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(yc(t,r)){r=_c(t,r);break}break}t.remove()}for(;(n=r.getNextSibling())!==null&&z(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==""){if(yc(r,n)){r=_c(r,n);break}break}n.remove()}}else r.remove()}function Sr(e){return bc(e.anchor),bc(e.focus),e}function bc(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 S5=1;const E5=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e)};function ru(e){const t=document.activeElement;if(!Fe(t))return!1;const n=t.nodeName;return ye(on(e))&&(n==="INPUT"||n==="TEXTAREA"||t.contentEditable==="true"&&os(t)==null)}function Ti(e,t,n){const r=e.getRootElement();try{return r!==null&&r.contains(t)&&r.contains(n)&&t!==null&&!ru(t)&&ou(t)===e}catch{return!1}}function iu(e){return e instanceof ps}function ou(e){let t=e;for(;t!=null;){const n=os(t);if(iu(n))return n;t=Ii(t)}return null}function os(e){return e?e.__lexicalEditor:null}function Wn(e){return e.isToken()||e.isSegmented()}function dn(e){return Nr(e)&&e.nodeType===o5}function T5(e){return Nr(e)&&e.nodeType===s5}function _o(e){let t=e;for(;t!=null;){if(dn(t))return t;t=t.firstChild}return null}function vo(e,t,n){const r=Xn[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 $h(e){return z(e)||Nt(e)||ye(e)}function Dh(e,t){if(t!=null)return void(e.__key=t);st(),hp();const n=Oe(),r=Ln(),i=""+S5++;r._nodeMap.set(i,e),O(e)?n._dirtyElements.set(i,!0):n._dirtyLeaves.add(i),n._cloneNotNeeded.add(i),n._dirtyType=Lh,e.__key=i}function Gn(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 bo(e){hp();const t=e.getLatest(),n=t.__parent,r=Ln(),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=Lh,O(e)?s.set(l,!0):i._dirtyLeaves.add(l)}function Ge(e){st();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 bn(){return Li()?null:Oe()._compositionKey}function Re(e,t){const n=(t||Ln())._nodeMap.get(e);return n===void 0?null:n}function Vh(e,t){const n=ss(e,Oe());return n!==void 0?Re(n,t):null}function ss(e,t){return e[`__lexicalKey_${t._key}`]}function on(e,t){let n=e;for(;n!=null;){const r=Vh(n,t);if(r!==null)return r;n=Ii(n)}return null}function Hh(e){const t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function Cc(e){return e.read(()=>Te().getTextContent())}function Te(){return Bh(Ln())}function Bh(e){return e._nodeMap.get("root")}function qe(e){st();const t=Ln();e!==null&&(e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function gr(e){const t=Oe(),n=function(r,i){let o=r;for(;o!=null;){const s=ss(o,i);if(s!==void 0)return s;o=Ii(o)}return null}(e,t);return n===null?e===t.getRootElement()?Re("root"):null:Re(n)}function wc(e,t){return t?e.getTextContentSize():0}function zh(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function su(e){const t=[];let n=e;for(;n!==null;)t.push(n),n=n._parentEditor;return t}function jh(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function Uh(e){return dn(e)?e.nodeValue:null}function lu(e,t,n){const r=Lt(t._window);if(r===null)return;const i=r.anchorNode;let{anchorOffset:o,focusOffset:s}=r;if(i!==null){let l=Uh(i);const a=on(i);if(l!==null&&z(a)){if(l===is&&n){const u=n.length;l=n,o=u,s=u}l!==null&&au(a,l,o,s,e)}}}function au(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]===is&&(l=t.slice(0,-1));const a=o.getTextContent();if(i||l!==a){if(l===""){if(Ge(null),rs||Ei||Za)o.remove();else{const x=Oe();setTimeout(()=>{x.update(()=>{o.isAttached()&&o.remove()})},20)}return}const u=o.getParent(),c=Fr(),d=o.getTextContentSize(),h=bn(),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 I5(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 kc(e){return e==="ArrowLeft"}function Sc(e){return e==="ArrowRight"}function Gr(e,t){return kt?e:t}function Ec(e){return e==="Enter"}function Hr(e){return e==="Backspace"}function Br(e){return e==="Delete"}function Tc(e,t,n){return e.toLowerCase()==="a"&&Gr(t,n)}function A5(e){const t=Te();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"),Sr(e),e}{const n=t.select(0,t.getChildrenSize());return qe(Sr(n)),n}}function br(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=yo(i);return n[t]=o,o}return i}function uu(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 Ic(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 gi(e,t){const n=e.offset;if(e.type==="element")return Ic(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?Ic(r.getParentOrThrow(),t,r.getIndexWithinParent()+(t?0:1)):i}}return null}function Wh(e){const t=as(e).event,n=t&&t.inputType;return n==="insertFromPaste"||n==="insertFromPasteAsQuotation"}function X(e,t,n){return mp(e,t,n)}function ls(e){return!Ye(e)&&!e.isLastChild()&&!e.isInline()}function Co(e,t){const n=e._keyToDOMMap.get(t);return n===void 0&&W(75,t),n}function Ii(e){const t=e.assignedSlot||e.parentElement;return Al(t)?t.host:t}function Jh(e){return T5(e)?e:Fe(e)?e.ownerDocument:null}function ei(e,t){let n=e.getParent();for(;n!==null;){if(n.is(t))return!0;n=n.getParent()}return!1}function cu(e){const t=Jh(e);return t?t.defaultView:null}function as(e){const t=e._window;return t===null&&W(78),t}function N5(e){let t=e.getParentOrThrow();for(;t!==null;){if(Ve(t))return t;t=t.getParentOrThrow()}return t}function Ve(e){return Ye(e)||O(e)&&e.isShadowRoot()}function L5(e){const t=e.constructor.clone(e);return Dh(t,null),t}function ct(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 js(e,t){!Ye(e.getParent())||O(t)||ye(t)||W(99)}function Us(e){return(ye(e)||O(e)&&!e.canBeEmpty())&&!e.isInline()}function du(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null;const r=e.parentElement;r!==null&&r.removeChild(e)}function F5(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())Us(o.getChildAtIndex(s-1))&&(l=!0);else{const u=o.getChildAtIndex(s);if(u!==null&&Us(u)){const c=u.getPreviousSibling();(c===null||Us(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=yo(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&&du(r,e,t)}function Lt(e){return Mt?(e||window).getSelection():null}function P5(e){const t=cu(e);return t?t.getSelection():null}function M5(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?L5(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 Kh(e){return Fe(e)&&e.tagName==="A"}function Fe(e){return Nr(e)&&e.nodeType===i5}function Nr(e){return typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeType=="number"}function Al(e){return Nr(e)&&e.nodeType===l5}function Nl(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 wo(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 _n(e){if(ye(e)&&!e.isInline())return!0;if(!O(e)||Ve(e))return!1;const t=e.getFirstChild(),n=t===null||Nt(t)||z(t)||t.isInline();return!e.isInline()&&e.canBeEmpty()!==!1&&n}function zr(e,t){let n=e;for(;n!==null&&n.getParent()!==null&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}function R5(){return Oe()}const Ac=new WeakMap,O5=new Map;function Nc(e){if(!e._readOnly&&e.isEmpty())return O5;e._readOnly||W(192);let t=Ac.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),Ac.set(e,t)),t}function fu(e){const t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function hu(e,t){const n=(parseInt(e.style.paddingInlineStart,10)||0)/40;t.setIndent(n)}function $5(e){return e.__lexicalUnmanaged===!0}function Zh(e,t,n,r,i,o){let s=e.getFirstChild();for(;s!==null;){const l=s.__key;s.__parent===t&&(O(s)&&Zh(s,l,n,r,i,o),n.has(l)||o.delete(l),i.push(l)),s=s.getNextSibling()}}let Tn,nt,mi,us,Ll,Fl,Qn,At,Pl,xi,Be="",tt="",$t=null,St="",Xt="",Gh=!1,yi=!1,ro=null;function ko(e,t){const n=Qn.get(e);if(t!==null){const r=Ol(e);r.parentNode===t&&t.removeChild(r)}if(At.has(e)||nt._keyToDOMMap.delete(e),O(n)){const r=Eo(n,Qn);Ml(r,0,r.length-1,null)}n!==void 0&&uu(xi,mi,us,n,"destroyed")}function Ml(e,t,n,r){let i=t;for(;i<=n;++i){const o=e[i];o!==void 0&&ko(o,r)}}function zn(e,t){e.setProperty("text-align",t)}const D5="40px";function qh(e,t){const n=Tn.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")||D5;e.style.setProperty("padding-inline-start",t===0?"":`calc(${t} * ${r})`)}function Yh(e,t){const n=e.style;t===0?zn(n,""):t===qa?zn(n,"left"):t===Ya?zn(n,"center"):t===Xa?zn(n,"right"):t===Qa?zn(n,"justify"):t===eu?zn(n,"start"):t===tu&&zn(n,"end")}function So(e,t){const n=At.get(e);n===void 0&&W(60);const r=n.createDOM(Tn,nt);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,nt),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&&qh(r,i),o!==0){const l=o-1;(function(a,u,c,d){const h=tt;tt="",Rl(a,c,0,u,c.getDOMSlot(d)),Qh(c,d),tt=h})(Eo(n,At),l,n,r)}const s=n.__format;s!==0&&Yh(r,s),n.isInline()||Xh(null,n,r),ls(n)&&(Be+=rn,Xt+=rn)}else{const i=n.getTextContent();if(ye(n)){const o=n.decorate(nt,Tn);o!==null&&ep(e,o),r.contentEditable="false"}else z(n)&&(n.isDirectionless()||(tt+=i));Be+=i,Xt+=i}return t!==null&&t.insertChild(r),uu(xi,mi,us,n,"created"),r}function Rl(e,t,n,r,i){const o=Be;Be="";let s=n;for(;s<=r;++s){So(e[s],i);const l=At.get(e[s]);l!==null&&z(l)&&($t===null&&($t=l.getFormat()),St===""&&(St=l.getStyle()))}ls(t)&&(Be+=rn),i.element.__lexicalTextContent=Be,Be=o+Be}function Lc(e,t){if(e){const n=e.__last;if(n){const r=t.get(n);if(r)return Nt(r)?"line-break":ye(r)&&r.isInline()?"decorator":null}return"empty"}return null}function Xh(e,t,n){const r=Lc(e,Qn),i=Lc(t,At);r!==i&&t.getDOMSlot(n).setManagedLineBreak(i)}function Qh(e,t){const n=t.__lexicalDirTextContent||"",r=t.__lexicalDir||"";if(n!==tt||r!==ro){const o=tt==="",s=o?ro:(i=tt,h5.test(i)?"rtl":p5.test(i)?"ltr":null);if(s!==r){const l=t.classList,a=Tn.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=yo(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=yo(c);c=a[s]=d}c!==void 0&&l.add(...c)}t.dir=s}yi||(e.getWritable().__dir=s)}ro=s,t.__lexicalDirTextContent=tt,t.__lexicalDir=s}var i}function V5(e,t,n){const r=tt;var i;tt="",$t=null,St="",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)qr(h,d);else{const x=Ol(h),_=So(f,null);try{d.replaceChild(_,x)}catch(y){if(typeof y=="object"&&y!=null){const g=`${y.toString()} Parent: ${d.tagName}, new child: {tag: ${_.tagName} key: ${f}}, old child: {tag: ${x.tagName}, key: ${h}}.`;throw new Error(g)}throw y}ko(h,null)}const p=At.get(f);z(p)&&($t===null&&($t=p.getFormat()),St===""&&(St=p.getStyle()))}else{const h=Eo(o,Qn),f=Eo(s,At);if(h.length!==u&&W(227),f.length!==c&&W(228),u===0)c!==0&&Rl(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;Ml(h,0,u-1,p?null:d),p&&(d.textContent="")}}else(function(p,x,_,y,g,m){const v=y-1,k=g-1;let b,C,E=m.getFirstChild(),I=0,P=0;for(;I<=v&&P<=k;){const L=x[I],K=_[P];if(L===K)E=Ws(qr(K,m.element)),I++,P++;else{b===void 0&&(b=new Set(x)),C===void 0&&(C=new Set(_));const Q=C.has(L),Z=b.has(K);if(Q)if(Z){const ne=Co(nt,K);ne===E?E=Ws(qr(K,m.element)):(m.withBefore(E).insertChild(ne),qr(K,m.element)),I++,P++}else So(K,m.withBefore(E)),P++;else E=Ws(Ol(L)),ko(L,m.element),I++}const B=At.get(K);B!==null&&z(B)&&($t===null&&($t=B.getFormat()),St===""&&(St=B.getStyle()))}const M=I>v,R=P>k;if(M&&!R){const L=_[k+1],K=L===void 0?null:nt.getElementByKey(L);Rl(_,p,P,k,m.withBefore(K))}else R&&!M&&Ml(x,I,v,m.element)})(s,h,f,u,c,l)}ls(s)&&(Be+=rn),d.__lexicalTextContent=Be,Be=a+Be}(e,t,t.getDOMSlot(n)),Qh(t,n),i=t,$t==null||$t===i.__textFormat||yi||(i.setTextFormat($t),i.setTextStyle(St)),function(o){St===""||St===o.__textStyle||yi||o.setTextStyle(St)}(t),tt=r}function Eo(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 qr(e,t){const n=Qn.get(e);let r=At.get(e);n!==void 0&&r!==void 0||W(61);const i=Gh||Fl.has(e)||Ll.has(e),o=Co(nt,e);if(n===r&&!i){if(O(n)){const s=o.__lexicalTextContent;s!==void 0&&(Be+=s,Xt+=s);const l=o.__lexicalDirTextContent;l!==void 0&&(tt+=l)}else{const s=n.getTextContent();z(n)&&!n.isDirectionless()&&(tt+=s),Xt+=s,Be+=s}return o}if(n!==r&&i&&uu(xi,mi,us,r,"updated"),r.updateDOM(n,o,Tn)){const s=So(e,null);return t===null&&W(62),t.replaceChild(s,o),ko(e,null),s}if(O(n)&&O(r)){const s=r.__indent;s!==n.__indent&&qh(o,s);const l=r.__format;l!==n.__format&&Yh(o,l),i&&(V5(n,r,o),Ye(r)||r.isInline()||Xh(n,r,o)),ls(r)&&(Be+=rn,Xt+=rn)}else{const s=r.getTextContent();if(ye(r)){const l=r.decorate(nt,Tn);l!==null&&ep(e,l)}else z(r)&&!r.isDirectionless()&&(tt+=s);Be+=s,Xt+=s}if(!yi&&Ye(r)&&r.__cachedText!==Xt){const s=r.getWritable();s.__cachedText=Xt,r=s}return o}function ep(e,t){let n=nt._pendingDecorators;const r=nt._decorators;if(n===null){if(r[e]===t)return;n=Hh(nt)}n[e]=t}function Ws(e){let t=e.nextSibling;return t!==null&&t===nt._blockCursorElement&&(t=t.nextSibling),t}function H5(e,t,n,r,i,o){Be="",Xt="",tt="",Gh=r===kr,ro=null,nt=n,Tn=n._config,mi=n._nodes,us=nt._listeners.mutation,Ll=i,Fl=o,Qn=e._nodeMap,At=t._nodeMap,yi=t._readOnly,Pl=new Map(n._keyToDOMMap);const s=new Map;return xi=s,qr("root",null),nt=void 0,mi=void 0,Ll=void 0,Fl=void 0,Qn=void 0,At=void 0,Tn=void 0,Pl=void 0,xi=void 0,s}function Ol(e){const t=Pl.get(e);return t===void 0&&W(75,e),t}const Gt=Object.freeze({}),$l=30,Dl=[["keydown",function(e,t){if(ti=e.timeStamp,tp=e.key,t.isComposing())return;const{key:n,shiftKey:r,ctrlKey:i,metaKey:o,altKey:s}=e;if(!X(t,kh,e)&&n!=null){if(function(l,a,u,c){return Sc(l)&&!a&&!c&&!u}(n,i,s,o))X(t,Sh,e);else if(function(l,a,u,c,d){return Sc(l)&&!c&&!u&&(a||d)}(n,i,r,s,o))X(t,G0,e);else if(function(l,a,u,c){return kc(l)&&!a&&!c&&!u}(n,i,s,o))X(t,Ha,e);else if(function(l,a,u,c,d){return kc(l)&&!c&&!u&&(a||d)}(n,i,r,s,o))X(t,q0,e);else if(function(l,a,u){return function(c){return c==="ArrowUp"}(l)&&!a&&!u}(n,i,o))X(t,Ba,e);else if(function(l,a,u){return function(c){return c==="ArrowDown"}(l)&&!a&&!u}(n,i,o))X(t,za,e);else if(function(l,a){return Ec(l)&&a}(n,r))ni=!0,X(t,pi,e);else if(function(l){return l===" "}(n))X(t,ja,e);else if(function(l,a){return kt&&a&&l.toLowerCase()==="o"}(n,i))e.preventDefault(),ni=!0,X(t,_r,!0);else if(function(l,a){return Ec(l)&&!a}(n,r))ni=!1,X(t,pi,e);else if(function(l,a,u,c){return kt?!a&&!u&&(Hr(l)||l.toLowerCase()==="h"&&c):!(c||a||u)&&Hr(l)}(n,s,o,i))Hr(n)?X(t,Qo,e):(e.preventDefault(),X(t,Zn,!0));else if(function(l){return l==="Escape"}(n))X(t,Si,e);else if(function(l,a,u,c,d){return kt?!(u||c||d)&&(Br(l)||l.toLowerCase()==="d"&&a):!(a||c||d)&&Br(l)}(n,i,r,s,o))Br(n)?X(t,es,e):(e.preventDefault(),X(t,Zn,!1));else if(function(l,a,u){return Hr(l)&&(kt?a:u)}(n,s,i))e.preventDefault(),X(t,fi,!0);else if(function(l,a,u){return Br(l)&&(kt?a:u)}(n,s,i))e.preventDefault(),X(t,fi,!1);else if(function(l,a){return kt&&a&&Hr(l)}(n,o))e.preventDefault(),X(t,hi,!0);else if(function(l,a){return kt&&a&&Br(l)}(n,o))e.preventDefault(),X(t,hi,!1);else if(function(l,a,u,c){return l.toLowerCase()==="b"&&!a&&Gr(u,c)}(n,s,o,i))e.preventDefault(),X(t,en,"bold");else if(function(l,a,u,c){return l.toLowerCase()==="u"&&!a&&Gr(u,c)}(n,s,o,i))e.preventDefault(),X(t,en,"underline");else if(function(l,a,u,c){return l.toLowerCase()==="i"&&!a&&Gr(u,c)}(n,s,o,i))e.preventDefault(),X(t,en,"italic");else if(function(l,a,u,c){return l==="Tab"&&!a&&!u&&!c}(n,s,i,o))X(t,Ua,e);else if(function(l,a,u,c){return l.toLowerCase()==="z"&&!a&&Gr(u,c)}(n,r,o,i))e.preventDefault(),X(t,Yo,void 0);else if(function(l,a,u,c){return kt?l.toLowerCase()==="z"&&u&&a:l.toLowerCase()==="y"&&c||l.toLowerCase()==="z"&&c&&a}(n,r,o,i))e.preventDefault(),X(t,Xo,void 0);else{const l=t._editorState._selection;l===null||D(l)?!kn&&Tc(n,o,i)&&(e.preventDefault(),X(t,Tl,e)):function(a,u,c,d){return!u&&a.toLowerCase()==="c"&&(kt?c:d)}(n,r,o,i)?(e.preventDefault(),X(t,ns,e)):function(a,u,c,d){return!u&&a.toLowerCase()==="x"&&(kt?c:d)}(n,r,o,i)?(e.preventDefault(),X(t,Ka,e)):Tc(n,o,i)&&(e.preventDefault(),X(t,Tl,e))}(function(l,a,u,c){return l||a||u||c})(i,r,s,o)&&X(t,Ah,e)}}],["pointerdown",function(e,t){const n=e.target,r=e.pointerType;Nr(n)&&r!=="touch"&&e.button===0&&_t(t,()=>{ye(on(n))||(Hl=!0)})}],["compositionstart",function(e,t){_t(t,()=>{const n=U();if(D(n)&&!t.isComposing()){const r=n.anchor,i=n.anchor.getNode();Ge(r.key),(e.timeStamp<ti+$l||r.type==="element"||!n.isCollapsed()||i.getFormat()!==n.format||z(i)&&i.getStyle()!==n.style)&&X(t,vr,f5)}})}],["compositionend",function(e,t){kn?jr=!0:_t(t,()=>{Js(t,e.data)})}],["input",function(e,t){e.stopPropagation(),_t(t,()=>{const n=U(),r=e.data,i=op(e);if(r!=null&&D(n)&&ip(n,i,r,e.timeStamp,!1)){jr&&(Js(t,r),jr=!1);const o=n.anchor.getNode(),s=Lt(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;go&&!n.isCollapsed()&&z(o)&&s.anchorNode!==null&&o.getTextContent().slice(0,a)+r+o.getTextContent().slice(a+u)===Uh(s.anchorNode)||X(t,vr,r);const c=r.length;kn&&c>1&&e.inputType==="insertCompositionText"&&!t.isComposing()&&(n.anchor.offset-=c),rs||Ei||Za||!t.isComposing()||(ti=0,Ge(null))}else lu(!1,t,r!==null?r:void 0),jr&&(Js(t,r||void 0),jr=!1);st(),Rh(Oe())}),pr=null}],["click",function(e,t){_t(t,()=>{const n=U(),r=Lt(t._window),i=Fr();if(r){if(D(n)){const o=n.anchor,s=o.getNode();o.type==="element"&&o.offset===0&&n.isCollapsed()&&!Ye(s)&&Te().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)||dn(o))&&qe(mu(i,r,t,e))}}X(t,qo,e)})}],["cut",Gt],["copy",Gt],["dragstart",Gt],["dragover",Gt],["dragend",Gt],["paste",Gt],["focus",Gt],["blur",Gt],["drop",Gt]];go&&Dl.push(["beforeinput",(e,t)=>function(n,r){const i=n.inputType,o=op(n);i==="deleteCompositionText"||kn&&Wh(r)||i!=="insertCompositionText"&&_t(r,()=>{const s=U();if(i==="deleteContentBackward"){if(s===null){const f=Fr();if(!D(f))return;qe(f.clone())}if(D(s)){const f=s.anchor.key===s.focus.key;if(l=n.timeStamp,tp==="MediaLast"&&l<ti+$l&&r.isComposing()&&f){if(Ge(null),ti=0,setTimeout(()=>{_t(r,()=>{Ge(null)})},$l),D(s)){const p=s.anchor.getNode();p.markDirty(),s.format=p.getFormat(),z(p)||W(142),s.style=p.getStyle()}}else{Ge(null),n.preventDefault();const p=s.anchor.getNode(),x=p.getTextContent(),_=p.canInsertTextAfter(),y=s.anchor.offset===0&&s.focus.offset===x.length;r5&&f&&!y&&_||X(r,Zn,!0)}return}}var l;if(!D(s))return;const a=n.data;pr!==null&&lu(!1,r,pr),s.dirty&&pr===null||!s.isCollapsed()||Ye(s.anchor.getNode())||o===null||s.applyDOMRange(o),pr=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":Ge(null),X(r,vr,n);break;case"insertLineBreak":Ge(null),X(r,_r,!1);break;case"insertParagraph":Ge(null),ni&&!Ei?(ni=!1,X(r,_r,!1)):X(r,di,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":X(r,ki,n);break;case"deleteByComposition":(function(f,p){return f!==p||O(f)||O(p)||!f.isToken()||!p.isToken()})(d,h)&&X(r,Sl,n);break;case"deleteByDrag":case"deleteByCut":X(r,Sl,n);break;case"deleteContent":X(r,Zn,!1);break;case"deleteWordBackward":X(r,fi,!0);break;case"deleteWordForward":X(r,fi,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":X(r,hi,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":X(r,hi,!1);break;case"formatStrikeThrough":X(r,en,"strikethrough");break;case"formatBold":X(r,en,"bold");break;case"formatItalic":X(r,en,"italic");break;case"formatUnderline":X(r,en,"underline");break;case"historyUndo":X(r,Yo,void 0);break;case"historyRedo":X(r,Xo,void 0)}else{if(a===`
|
|
9
|
+
`)n.preventDefault(),X(r,_r,!1);else if(a===rn)n.preventDefault(),X(r,di,void 0);else if(a==null&&n.dataTransfer){const f=n.dataTransfer.getData("text/plain");n.preventDefault(),s.insertRawText(f)}else a!=null&&ip(s,o,a,n.timeStamp,!0)?(n.preventDefault(),X(r,vr,a)):pr=a;np=n.timeStamp}})}(e,t)]);let ti=0,tp=null,np=0,pr=null;const To=new WeakMap;let Vl=!1,Hl=!1,ni=!1,jr=!1,rp=[0,"",0,"root",0];function ip(e,t,n,r,i){const o=e.anchor,s=e.focus,l=o.getNode(),a=Oe(),u=Lt(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&&(!go||np<r+50)||l.isDirty()&&f<2||zh(n))&&o.offset!==s.offset&&!l.isComposing()||Wn(l)||l.isDirty()&&f>1||(i||!go)&&h!==null&&!l.isComposing()&&c!==_o(h)||u!==null&&t!==null&&(!t.collapsed||t.startContainer!==u.anchorNode||t.startOffset!==u.anchorOffset)||l.getFormat()!==e.format||l.getStyle()!==e.style||I5(e,l)}function Fc(e,t){return dn(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}function Pc(e,t,n){const{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s}=e;Vl&&(Vl=!1,Fc(r,i)&&Fc(o,s))||_t(t,()=>{if(!n)return void qe(null);if(!Ti(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=as(t).event,d=c?c.timeStamp:performance.now(),[h,f,p,x,_]=rp,y=Te(),g=t.isComposing()===!1&&y.getTextContent()==="";if(d<_+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,_=p?i:s,y=p?d:c,g=p?c:d;let m=d5,v=!1;for(let k=0;k<f;k++){const b=h[k],C=b.getTextContentSize();if(z(b)&&C!==0&&!(k===0&&b.__key===y&&x===C||k===f-1&&b.__key===g&&_===0)&&(v=!0,m&=b.getFormat(),m===0))break}l.format=v?m:0}}X(t,wi,void 0)})}function op(e){if(!e.getTargetRanges)return null;const t=e.getTargetRanges();return t.length===0?null:t[0]}function Js(e,t){const n=e._compositionKey;if(Ge(null),n!==null&&t!=null){if(t===""){const r=Re(n),i=_o(e.getElementByKey(n));return void(i!==null&&i.nodeValue!==null&&z(r)&&au(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,pi,null)}}}lu(!0,e,t)}function sp(e){let t=e.__lexicalEventHandles;return t===void 0&&(t=[],e.__lexicalEventHandles=t),t}const Cr=new Map;function lp(e){const t=P5(e.target);if(t===null)return;const n=ou(t.anchorNode);if(n===null)return;Hl&&(Hl=!1,_t(n,()=>{const a=Fr(),u=t.anchorNode;(Fe(u)||dn(u))&&qe(mu(a,t,n,e))}));const r=su(n),i=r[r.length-1],o=i._key,s=Cr.get(o),l=s||i;l!==n&&Pc(t,l,!1),Pc(t,n,!0),n!==i?Cr.set(o,n):s&&Cr.delete(o)}function Mc(e){e._lexicalHandled=!0}function Rc(e){return e._lexicalHandled===!0}function B5(e){const t=e.ownerDocument,n=To.get(t);n===void 0&&W(162);const r=n-1;r>=0||W(164),To.set(t,r),r===0&&t.removeEventListener("selectionchange",lp);const i=os(e);iu(i)?(function(s){if(s._parentEditor!==null){const l=su(s),a=l[l.length-1]._key;Cr.get(a)===s&&Cr.delete(a)}else Cr.delete(s._key)}(i),e.__lexicalEditor=null):i&&W(198);const o=sp(e);for(let s=0;s<o.length;s++)o[s]();e.__lexicalEventHandles=[]}function Bl(e,t,n){st();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 ei(d,l)&&u.set(l.__key,0,"element"),ei(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&&(No(l,e,i,e.getPreviousSibling(),e.getNextSibling()),s=!0),a.key===r&&(No(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();Gn(e),Ao(o,i,l,-1)}else Gn(e);n||Ve(i)||i.canBeEmpty()||!i.isEmpty()||Bl(i,t),t&&Ye(i)&&i.isEmpty()&&i.selectEnd()}class cs{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,Dh(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(){st();const t=Ln(),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 bo(o),o;const a=fu(o);return s.add(i),bo(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){Bl(this,!0,t)}replace(t,n){st();let r=U();r!==null&&(r=r.clone()),js(this,t);const i=this.getLatest(),o=this.__key,s=t.__key,l=t.getWritable(),a=this.getParentOrThrow().getWritable(),u=a.__size;Gn(l);const c=i.getPreviousSibling(),d=i.getNextSibling(),h=i.__prev,f=i.__next,p=i.__parent;if(Bl(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)){qe(r);const x=r.anchor,_=r.focus;x.key===o&&Vc(x,l),_.key===o&&Vc(_,l)}return bn()===o&&Ge(s),l}insertAfter(t,n=!0){st(),js(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(Gn(i),D(s)){const p=o.__key,x=s.anchor,_=s.focus;l=x.type==="element"&&x.key===p&&x.offset===f+1,a=_.type==="element"&&_.key===p&&_.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();Ao(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){st(),js(this,t);const r=this.getWritable(),i=t.getWritable(),o=i.__key;Gn(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)&&Ao(c,this.getParentOrThrow(),u),t}isParentRequired(){return!1}createParentElementNode(){return _e()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(t,n){st();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){st();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 Ai extends cs{static getType(){return"linebreak"}static clone(t){return new Ai(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&&wo(r)){const i=r.firstChild;if(i===n||i.nextSibling===n&&Wi(i)){const o=r.lastChild;if(o===n||o.previousSibling===n&&Wi(o))return!0}}return!1}(t)||function(n){const r=n.parentElement;if(r!==null&&wo(r)){const i=r.firstChild;if(i===n||i.nextSibling===n&&Wi(i))return!1;const o=r.lastChild;if(o===n||o.previousSibling===n&&Wi(o))return!0}return!1}(t)?null:{conversion:z5,priority:0}}}static importJSON(t){return Ft().updateFromJSON(t)}}function z5(e){return{node:Ft()}}function Ft(){return ct(new Ai)}function Nt(e){return e instanceof Ai}function Wi(e){return dn(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}function Ks(e,t){return 16&t?"code":t&Ga?"mark":32&t?"sub":64&t?"sup":null}function Zs(e,t){return 1&t?"strong":2&t?"em":"span"}function ap(e,t,n,r,i){const o=r.classList;let s=br(i,"base");s!==void 0&&o.add(...s),s=br(i,"underlineStrikethrough");let l=!1;const a=t&xo&&t&mo;s!==void 0&&(n&xo&&n&mo?(l=!0,a||o.add(...s)):a&&o.remove(...s));for(const u in Xn){const c=Xn[u];if(s=br(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 up(e,t,n){const r=t.firstChild,i=n.isComposing(),o=e+(i?is:"");if(r==null)t.textContent=o;else{const s=r.nodeValue;if(s!==o)if(i||kn){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 Oc(e,t,n,r,i,o){up(i,e,t);const s=o.theme.text;s!==void 0&&ap(0,0,r,e,s)}function Ji(e,t){const n=document.createElement(t);return n.appendChild(e),n}class fn extends cs{static getType(){return"text"}static clone(t){return new fn(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 y5[t.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===bn()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(t){const n=Xn[t];return!!(this.getFormat()&n)}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(t,n){return vo(this.getLatest().__format,t,n)}canHaveFormat(){return!0}createDOM(t,n){const r=this.__format,i=Ks(0,r),o=Zs(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)),Oc(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=Ks(0,o),a=Ks(0,s),u=Zs(0,o),c=Zs(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 _=document.createElement(c);return Oc(_,this,0,s,i,r),n.replaceChild(_,x),!1}let d=n;a!==null&&l!==null&&(d=n.firstChild,d==null&&W(49)),up(i,d,this);const h=r.theme.text;h!==void 0&&o!==s&&ap(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:J5,priority:0}),b:()=>({conversion:U5,priority:0}),code:()=>({conversion:gn,priority:0}),em:()=>({conversion:gn,priority:0}),i:()=>({conversion:gn,priority:0}),s:()=>({conversion:gn,priority:0}),span:()=>({conversion:j5,priority:0}),strong:()=>({conversion:gn,priority:0}),sub:()=>({conversion:gn,priority:0}),sup:()=>({conversion:gn,priority:0}),u:()=>({conversion:gn,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=Ji(n,"b")),this.hasFormat("italic")&&(n=Ji(n,"i")),this.hasFormat("strikethrough")&&(n=Ji(n,"s")),this.hasFormat("underline")&&(n=Ji(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"?Xn[t]:t,n}setDetail(t){const n=this.getWritable();return n.__detail=typeof t=="string"?g5[t]:t,n}setStyle(t){const n=this.getWritable();return n.__style=t,n}toggleFormat(t){const n=vo(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=x5[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){st();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 fp(l,r,l,i,"text","text");{const a=bn();a!==o.anchor.key&&a!==o.focus.key||Ge(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){st();const n=this.getLatest(),r=n.getTextContent(),i=n.__key,o=bn(),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(),_=n.__detail;let y=!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 v=d.length;for(let k=1;k<c;k++){const b=l[k],C=b.length,E=Ae(b).getWritable();E.__format=p,E.__style=x,E.__detail=_;const I=E.__key,P=v+C;if(D(g)){const M=g.anchor,R=g.focus;M.key===i&&M.type==="text"&&M.offset>v&&M.offset<=P&&(M.key=I,M.offset-=v,g.dirty=!0),R.key===i&&R.type==="text"&&R.offset>v&&R.offset<=P&&(R.key=I,R.offset-=v,g.dirty=!0)}o===i&&Ge(I),v=P,m.push(E)}if(h!==null){(function(C){const E=C.getPreviousSibling(),I=C.getNextSibling();E!==null&&bo(E),I!==null&&bo(I)})(this);const k=h.getWritable(),b=this.getIndexWithinParent();y?(k.splice(b,0,m),this.remove()):k.splice(b,1,m),D(g)&&Ao(g,h,b,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;bn()===i&&Ge(r);const l=U();if(D(l)){const d=l.anchor,h=l.focus;d!==null&&d.key===i&&(Wc(d,n,r,t,s),l.dirty=!0),h!==null&&h.key===i&&(Wc(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 j5(e){return{forChild:pu(e.style),node:null}}function U5(e){const t=e,n=t.style.fontWeight==="normal";return{forChild:pu(t.style,n?void 0:"bold"),node:null}}const $c=new WeakMap;function W5(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 J5(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=$c.get(o))===void 0&&!W5(o);)s.push(o),o=o.parentNode;const l=i===void 0?o:i;for(let a=0;a<s.length;a++)$c.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(Ft()):l===" "?i.push(Lr()):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=Dc(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=Dc(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 Dc(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===""&&!Nl(n)||o!==""&&!o.startsWith("inline"))return null}let i=n;for(;(i=t?n.firstChild:n.lastChild)!==null;)n=i;if(dn(n))return n;if(n.nodeName==="BR")return null}}const K5={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function gn(e){const t=K5[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:pu(e.style,t),node:null}}function Ae(e=""){return ct(new fn(e))}function z(e){return e instanceof fn}function pu(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 Ni extends fn{static getType(){return"tab"}static clone(t){return new Ni(t.__key)}constructor(t){super(" ",t),this.__detail=2}static importDOM(){return null}createDOM(t){const n=super.createDOM(t),r=br(t.theme,"tab");return r!==void 0&&n.classList.add(...r),n}static importJSON(t){return Lr().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 Lr(){return ct(new Ni)}function gu(e){return e instanceof Ni}class Z5{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,Li()||(bn()===o&&Ge(t),i!==null&&(i.setCachedNodes(null),i.dirty=!0))}}function Ut(e,t,n){return new Z5(e,t,n)}function Gs(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 Vc(e,t){if(O(t)){const n=t.getLastDescendant();O(n)||z(n)?Gs(e,n):Gs(e,t)}else Gs(e,t)}function vn(e,t,n,r){e.key=t,e.offset=n,e.type=r}class ds{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 ds(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 Li()||(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 ir}class ir{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 Li()||(this._cachedNodes=h),h}setTextNodeRange(t,n,r,i){vn(this.anchor,t.__key,n,"text"),vn(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]=zl(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)&&!Nt(h)||h===r&&this.isCollapsed()||(u+=h.getTextContent())}return u}applyDOMRange(t){const n=Oe(),r=n.getEditorState()._selection,i=dp(t.startContainer,t.startOffset,t.endContainer,t.endOffset,n,r);if(i===null)return;const[o,s]=i;vn(this.anchor,o.key,o.offset,o.type),vn(this.focus,s.key,s.offset,s.type),this._cachedNodes=null}clone(){const t=this.anchor,n=this.focus;return new ir(Ut(t.key,t.offset,t.type),Ut(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(t){this.format=vo(this.format,t,null),this.dirty=!0}setStyle(t){this.style=t,this.dirty=!0}hasFormat(t){const n=Xn[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(Ft()):s===" "?r.push(Lr()):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 v=_.getNode(),k=v.getChildAtIndex(_.offset),b=Ae(),C=Ye(v)?_e().append(b):b;b.setFormat(g),b.setStyle(m),k===null?v.append(C):k.insertBefore(C),_.is(y)&&y.set(b.__key,0,"text"),_.set(b.__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 _=h.getNextSibling();if(z(_)&&_.canInsertTextBefore()&&!Wn(_)||(_=Ae(),_.setFormat(i),_.setStyle(o),p.canInsertTextAfter()?h.insertAfter(_):p.insertAfter(_)),_.select(0,0),h=_,t!=="")return void this.insertText(t)}else if(this.isCollapsed()&&a===0&&(h.isSegmented()||h.isToken()||!h.canInsertTextBefore()||!p.canInsertTextBefore()&&h.getPreviousSibling()===null)){let _=h.getPreviousSibling();if(z(_)&&!Wn(_)||(_=Ae(),_.setFormat(i),p.canInsertTextBefore()?h.insertBefore(_):p.insertBefore(_)),_.select(),h=_,t!=="")return void this.insertText(t)}else if(h.isSegmented()&&a!==f){const _=Ae(h.getTextContent());_.setFormat(i),h.replace(_),h=_}else if(!this.isCollapsed()&&t!==""){const _=x.getParent();if(!p.canInsertTextBefore()||!p.canInsertTextAfter()||O(_)&&(!_.canInsertTextBefore()||!_.canInsertTextAfter()))return this.insertText(""),cp(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 _=h.getFormat(),y=h.getStyle();if(a!==u||_===i&&y===o){if(gu(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[v]=h.splitText(a);v.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=_,this.style=y))}else{const _=new Set([...h.getParentKeys(),...x.getParentKeys()]),y=O(h)?h:h.getParentOrThrow();let g=O(x)?x:x.getParentOrThrow(),m=x;if(!y.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}Ye(l.getNode())||l.type!=="text"||(x=x.spliceText(0,u,"")),_.add(x.__key)}else{const E=x.getParentOrThrow();E.canBeEmpty()||E.getChildrenSize()!==1?x.remove():E.remove()}else _.add(x.__key);const v=g.getChildren(),k=new Set(c),b=y.is(g),C=y.isInline()&&h.getNextSibling()===null?y:h;for(let E=v.length-1;E>=0;E--){const I=v[E];if(I.is(h)||O(I)&&I.isParentOf(h))break;I.isAttached()&&(!k.has(I)||I.is(m)?b||C.insertAfter(I,!1):I.remove())}if(!b){let E=g,I=null;for(;E!==null;){const P=E.getChildren(),M=P.length;(M===0||P[M-1].is(I))&&(_.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],P=I.__key;_.has(P)||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=zr(s,_n),u=zr(l,_n);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)ei(s,d)||ei(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&&Wn(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 Ge(null);const r=this.getNodes(),i=[];for(const v of r)z(v)&&i.push(v);const o=v=>{r.forEach(k=>{if(O(k)){const b=k.getFormatFlags(t,v);k.setTextFormat(b)}})},s=i.length;if(s===0)return this.toggleFormat(t),Ge(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 _=s-1;let y=i[_];const g=d.type==="text"?d.offset:y.getTextContentSize();if(f.is(y)){if(p===g)return;if(Wn(f)||p===0&&g===f.getTextContentSize())f.setFormat(x);else{const v=f.splitText(p,g),k=p===0?v[0]:v[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||Wn(f)||([,f]=f.splitText(p),p=0),f.setFormat(x);const m=y.getFormatFlags(t,x);g>0&&(g===y.getTextContentSize()||Wn(y)||([y]=y.splitText(g)),y.setFormat(m));for(let v=h+1;v<_;v++){const k=i[v],b=k.getFormatFlags(t,m);k.setFormat(b)}c.type==="text"&&c.set(f.__key,p,"text"),d.type==="text"&&d.set(y.__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=zr(n,_n),i=t[t.length-1];if(O(r)&&"__language"in r){if("__language"in t[0])this.insertText(t[0].getTextContent());else{const p=qs(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=qs(this);return r.splice(p,0,t),void i.selectEnd()}const o=function(p){const x=_e();let _=null;for(let y=0;y<p.length;y++){const g=p[y],m=Nt(g);if(m||ye(g)&&g.isInline()||O(g)&&g.isInline()||z(g)||g.isParentRequired()){if(_===null&&(_=g.createParentElementNode(),x.append(_),m))continue;_!==null&&_.append(g)}else x.append(g),_=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)&&_n(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,_){const y=x.getParentOrThrow().getLastChild();let g=x;const m=[x];for(;g!==y;)g.getNextSibling()||W(140),g=g.getNextSibling(),m.push(g);let v=p;for(const k of m)v=v.insertAfter(k)}(r,c));const h=zr(s,_n);a&&O(h)&&(a.canMergeWhenEmpty()||_n(u))&&(h.append(...a.getChildren()),a.remove()),O(r)&&r.isEmpty()&&r.remove(),s.selectEnd();const f=O(r)?r.getLastChild():null;Nt(f)&&h!==r&&f.remove()}insertParagraph(){if(this.anchor.key==="root"){const s=_e();return Te().splice(this.anchor.offset,0,[s]),s.select(),s}const t=qs(this),n=zr(this.anchor.getNode(),_n);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=Ft();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]=zl(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=gi(i,n);if(ye(l)&&!l.isIsolated()){if(s&&l.isKeyboardSelectable()){const f=jl();return f.add(l.__key),void qe(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=Lt(a._window);if(!u)return;const c=a._blockCursorElement,d=a._rootElement;if(d===null||c===null||!O(l)||l.isInline()||l.canBeEmpty()||du(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=Ye(f)?f:N5(f);if(this.applyDOMRange(h),this.dirty=!0,!s){const x=this.getNodes(),_=[];let y=!1;for(let g=0;g<x.length;g++){const m=x[g];ei(m,p)?_.push(m):y=!0}if(y&&_.length>0)if(n){const g=_[0];O(g)?g.selectStart():g.getParentOrThrow().selectStart()}else{const g=_[_.length-1];O(g)?g.selectEnd():g.getParentOrThrow().selectEnd()}u.anchorNode===h.startContainer&&u.anchorOffset===h.startOffset||function(g){const m=g.focus,v=g.anchor,k=v.key,b=v.offset,C=v.type;vn(v,m.key,m.offset,m.type),vn(m,k,b,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=gi(o,t);if(ye(s)&&!s.isIsolated()){if(s.isKeyboardSelectable()&&O(i)&&i.getChildrenSize()===0){i.remove();const l=jl();l.add(s.__key),qe(l)}else s.remove(),Oe().dispatchCommand(wi,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 Bc(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 Bc(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,_=p<x,y=_?p:x,g=_?x:p,m=g-1;y!==m&&(zh(h.getTextContent().slice(y,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()&&Ye(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 ds}function Hc(e){const t=e.offset;if(e.type==="text")return t;const n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function zl(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]:[Hc(n),Hc(r)]}function Bc(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 zc(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=gr(c),z(i))o=wc(i,s);else{let h=gr(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=_.getParent();return g===null||m===null||!m.canBeEmpty()||m!==g.getNode()}(x,0,n)){const _=s?x.getLastDescendant():x.getFirstDescendant();_===null?h=x:(x=_,h=O(x)?x:x.getParentOrThrow()),o=0}z(x)?(i=x,h=null,o=wc(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)&&gr(e)===h?f:f+1,h=h.getParentOrThrow()}if(O(h))return Ut(h.__key,o,"element")}}else i=gr(e);return z(i)?Ut(i.__key,o,"text"):null}function jc(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 cp(e,t,n){if(e.type==="text"&&t.type==="text"){const r=e.isBefore(t),i=e.is(t);jc(e,r,i),jc(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;vn(e,s.key,s.offset,s.type),vn(t,l.key,l.offset,l.type)}}}function dp(e,t,n,r,i,o){if(e===null||n===null||!Ti(i,e,n))return null;const s=zc(e,t,D(o)?o.anchor:null,i);if(s===null)return null;const l=zc(n,r,D(o)?o.focus:null,i);if(l===null)return null;if(s.type==="element"&&l.type==="element"){const a=gr(e),u=gr(n);if(ye(a)&&ye(u))return null}return cp(s,l,o),[s,l]}function Io(e){return O(e)&&!e.isInline()}function fp(e,t,n,r,i,o){const s=Ln(),l=new ir(Ut(e,t,i),Ut(n,r,o),0,"");return l.dirty=!0,s._selection=l,l}function fs(){const e=Ut("root",0,"element"),t=Ut("root",0,"element");return new ir(e,t,0,"")}function jl(){return new ds(new Set)}function mu(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=!Il&&(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)&&!Ti(n,u,c))return e.clone();const f=dp(u,d,c,h,n,e);if(f===null)return null;const[p,x]=f;return new ir(p,x,D(e)?e.format:0,D(e)?e.style:"")}function U(){return Ln()._selection}function Fr(){return Oe()._editorState._selection}function Ao(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"),Uc(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")}}Uc(e)}function Uc(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 No(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 Wc(e,t,n,r,i){e.type==="text"?(e.key=n,t||(e.offset+=i)):e.offset>r.getIndexWithinParent()&&(e.offset-=1)}function G5(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&&ru(d))return;if(!D(t))return void(e!==null&&Ti(n,l,a)&&r.removeAllRanges());const h=t.anchor,f=t.focus,p=h.key,x=f.key,_=Co(n,p),y=Co(n,x),g=h.offset,m=f.offset,v=t.format,k=t.style,b=t.isCollapsed();let C=_,E=y,I=!1;if(h.type==="text"){C=_o(_);const B=h.getNode();I=B.getFormat()!==v||B.getStyle()!==k}else D(e)&&e.anchor.type==="text"&&(I=!0);var P,M,R,L,K;if(f.type==="text"&&(E=_o(y)),C!==null&&E!==null&&(b&&(e===null||I||D(e)&&(e.format!==v||e.style!==k))&&(P=v,M=k,R=g,L=p,K=performance.now(),rp=[P,M,R,L,K]),u!==g||c!==m||l!==C||a!==E||r.type==="Range"&&b||(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=Jh(ce),se=cu(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=as(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=Ii(oe)}})(n,Q,o)}}Vl=!0}}function Pr(e){let t=U()||Fr();t===null&&(t=Te().selectEnd()),t.insertNodes(e)}function qs(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(;!_n(i);)[i,o]=q5(i,o);return o}function q5(e,t){const n=e.getParent();if(!n){const i=_e();return Te().append(i),i.select(),[Te(),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 ir(Ut(e.__key,t,"element"),Ut(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,lt=!1,Ys=!1,io=0;const Jc={characterData:!0,childList:!0,subtree:!0};function Li(){return lt||We!==null&&We._readOnly}function st(){lt&&W(13)}function hp(){io>99&&W(14)}function Ln(){return We===null&&W(195,pp()),We}function Oe(){return Je===null&&W(196,pp()),Je}function pp(){let e=0;const t=new Set,n=ps.version;if(typeof window<"u")for(const i of document.querySelectorAll("[contenteditable]")){const o=os(i);if(iu(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 Y5(){return Je}function Kc(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 Zc(e,t){return e!==void 0&&e.__key!==t&&e.isAttached()}function gp(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 X5(e){return xu(e,Oe()._nodes)}function xu(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=xu(s[l],t);o.append(a)}return o}function Gc(e,t,n){const r=We,i=lt,o=Je;We=t,lt=!0,Je=e;try{return n()}finally{We=r,lt=i,Je=o}}function Qt(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!==Yn,u=We,c=lt,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,lt=!1,e._updating=!0;try{const b=e._dirtyType,C=e._dirtyElements,E=e._dirtyLeaves;f.disconnect(),p=H5(o,n,e,b,C,E)}catch(b){if(b instanceof Error&&e._onError(b),Ys)throw b;return vp(e,null,r,n),Oh(e),e._dirtyType=kr,Ys=!0,Qt(e,o),void(Ys=!1)}finally{f.observe(r,Jc),e._updating=h,We=u,lt=c,Je=d}}n._readOnly||(n._readOnly=!0);const x=e._dirtyLeaves,_=e._dirtyElements,y=e._normalizedNodes,g=e._updateTags,m=e._deferred;a&&(e._dirtyType=Yn,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set),function(b,C){const E=b._decorators;let I=b._pendingDecorators||E;const P=C._nodeMap;let M;for(M in I)P.has(M)||(I===E&&(I=Hh(b)),delete I[M])}(e,n);const v=i?null:Lt(e._window);if(e._editable&&v!==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 b=e._blockCursorElement;b!==null&&du(b,e,r),G5(s,l,e,v,g,r)}F5(e,r,l),f!==null&&f.observe(r,Jc)}finally{Je=d,We=u}}p!==null&&function(b,C,E,I,P){const M=Array.from(b._listeners.mutation),R=M.length;for(let L=0;L<R;L++){const[K,B]=M[L],Q=C.get(B);Q!==void 0&&K(Q,{dirtyLeaves:I,prevEditorState:P,updateTags:E})}}(e,p,g,x,o),D(l)||l===null||s!==null&&s.is(l)||e.dispatchCommand(wi,void 0);const k=e._pendingDecorators;k!==null&&(e._decorators=k,e._pendingDecorators=null,ri("decorator",e,!0,k)),function(b,C,E){const I=Cc(C),P=Cc(E);I!==P&&ri("textcontent",b,!0,P)}(e,t||o,n),ri("update",e,!0,{dirtyElements:_,dirtyLeaves:x,editorState:n,normalizedNodes:y,prevEditorState:t||o,tags:g}),function(b,C){if(b._deferred=[],C.length!==0){const E=b._updating;b._updating=!0;try{for(let I=0;I<C.length;I++)C[I]()}finally{b._updating=E}}}(e,m),function(b){const C=b._updates;if(C.length!==0){const E=C.shift();if(E){const[I,P]=E;xp(b,I,P)}}}(e)}function ri(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 mp(e,t,n){if(e._updating===!1||Je!==e){let i=!1;return e.update(()=>{i=mp(e,t,n)}),i}const r=su(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 qc(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),gp(e,s.tag)}o()}}return r}function xp(e,t,n){const r=e._updateTags;let i,o=!1,s=!1;n!==void 0&&(i=n.onUpdate,gp(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=yp(a||l),u=!0),a._flushSync=s;const c=We,d=lt,h=Je,f=e._updating;We=a,lt=!1,e._updating=!0,Je=e;try{u&&(e._headless?l._selection!==null&&(a._selection=l._selection.clone()):a._selection=function(y){const g=y.getEditorState()._selection,m=Lt(y._window);return D(g)||g==null?mu(g,m,y,null):g.clone()}(e));const x=e._compositionKey;t(),o=qc(e,o),function(y,g){const m=g.getEditorState()._selection,v=y._selection;if(D(v)){const k=v.anchor,b=v.focus;let C;if(k.type==="text"&&(C=k.getNode(),C.selectionTransform(m,v)),b.type==="text"){const E=b.getNode();C!==E&&E.selectionTransform(m,v)}}}(a,e),e._dirtyType!==Yn&&(o?function(y,g){const m=g._dirtyLeaves,v=y._nodeMap;for(const k of m){const b=v.get(k);z(b)&&b.isAttached()&&b.isSimpleText()&&!b.isUnmergeable()&&vc(b)}}(a,e):function(y,g){const m=g._dirtyLeaves,v=g._dirtyElements,k=y._nodeMap,b=bn(),C=new Map;let E=m,I=E.size,P=v,M=P.size;for(;I>0||M>0;){if(I>0){g._dirtyLeaves=new Set;for(const R of E){const L=k.get(R);z(L)&&L.isAttached()&&L.isSimpleText()&&!L.isUnmergeable()&&vc(L),L!==void 0&&Zc(L,b)&&Kc(g,L,C),m.add(R)}if(E=g._dirtyLeaves,I=E.size,I>0){io++;continue}}g._dirtyLeaves=new Set,g._dirtyElements=new Map;for(const R of P){const L=R[0],K=R[1];if(L!=="root"&&!K)continue;const B=k.get(L);B!==void 0&&Zc(B,b)&&Kc(g,B,C),v.set(L,K)}E=g._dirtyLeaves,I=E.size,P=g._dirtyElements,M=P.size,io++}g._dirtyLeaves=m,g._dirtyElements=v}(a,e),qc(e),function(y,g,m,v){const k=y._nodeMap,b=g._nodeMap,C=[];for(const[E]of v){const I=b.get(E);I!==void 0&&(I.isAttached()||(O(I)&&Zh(I,E,k,b,C,v),k.has(E)||v.delete(E),C.push(E)))}for(const E of C)b.delete(E);for(const E of m){const I=b.get(E);I===void 0||I.isAttached()||(k.has(E)||m.delete(E),b.delete(E))}}(l,a,e._dirtyLeaves,e._dirtyElements)),x!==e._compositionKey&&(a._flushSync=!0);const _=a._selection;if(D(_)){const y=a._nodeMap,g=_.anchor.key,m=_.focus.key;y.get(g)!==void 0&&y.get(m)!==void 0||W(19)}else He(_)&&_._nodes.size===0&&(a._selection=null)}catch(x){return x instanceof Error&&e._onError(x),e._pendingEditorState=l,e._dirtyType=kr,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void Qt(e)}finally{We=c,lt=d,Je=h,e._updating=f,io=0}e._dirtyType!==Yn||e._deferred.length>0||function(x,_){const y=_.getEditorState()._selection,g=x._selection;if(g!==null){if(g.dirty||!g.is(y))return!0}else if(y!==null)return!0;return!1}(a,e)?a._flushSync?(a._flushSync=!1,Qt(e)):u&&E5(()=>{Qt(e)}):(a._flushSync=!1,u&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function _t(e,t,n){e._updating?e._updates.push([t,n]):xp(e,t,n)}class ii{constructor(t,n,r){this.element=t,this.before=n||null,this.after=r||null}withBefore(t){return new ii(this.element,t,this.after)}withAfter(t){return new ii(this.element,this.before,t)}withElement(t){return new ii(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"&&(Ei||rs);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=Yc(n,r);o.push(i);const s=Yc(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 Yc(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 Rt extends cs{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 m5[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+=rn)}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+=rn.length)}return t}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(t){if(t!==""){const n=xc[t];return!!(this.getFormat()&n)}return!1}hasTextFormat(t){const n=Xn[t];return!!(this.getTextFormat()&n)}getFormatFlags(t,n){return vo(this.getLatest().__textFormat,t,n)}getTextStyle(){return this.getLatest().__textStyle}select(t,n){st();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):fp(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!==""?xc[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 _=p.getNextSibling(),y=p.__key;Gn(p.getWritable()),u.push(y),p=_}}let f=d;for(let p=0;p<i;p++){const x=r[p];f!==null&&x.is(f)&&(d=f=f.getPreviousSibling());const _=x.getWritable();_.__parent===l&&h--,Gn(_);const y=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),_.__parent=l,a.push(y),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),_=new Set(a),{anchor:y,focus:g}=p;Xc(y,x,_)&&No(y,y.getNode(),this,d,c),Xc(g,x,_)&&No(g,g.getNode(),this,d,c),h!==0||this.canBeEmpty()||Ve(this)||this.remove()}}return s}getDOMSlot(t){return new ii(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 Rt}function Xc(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 Fi extends cs{decorate(t,n){W(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function ye(e){return e instanceof Fi}class Pi extends Rt{static getType(){return"root"}static clone(){return new Pi}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){W(51)}getTextContent(){const t=this.__cachedText;return!Li()&&Oe()._dirtyType!==Yn||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 Te().updateFromJSON(t)}collapseAtStart(){return!0}}function Ye(e){return e instanceof Pi}function yp(e){return new hs(new Map(e._nodeMap))}function yu(){return new hs(new Map([["root",new Pi]]))}function _p(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=_p(i[o]);r.push(s)}}return t}class hs{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 Gc(n&&n.editor||null,this,t)}clone(t){const n=new hs(this._nodeMap,t===void 0?this._selection:t);return n._readOnly=!0,n}toJSON(){return Gc(null,this,()=>({root:_p(Te())}))}}class _u extends Rt{static getType(){return"artificial"}createDOM(t){return document.createElement("div")}}class Mr extends Rt{static getType(){return"paragraph"}static clone(t){return new Mr(t.__key)}createDOM(t){const n=document.createElement("p"),r=br(t.theme,"paragraph");return r!==void 0&&n.classList.add(...r),n}updateDOM(t,n,r){return!1}static importDOM(){return{p:t=>({conversion:Q5,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 Q5(e){const t=_e();return e.style&&(t.setFormat(e.style.textAlign),hu(e,t)),{node:t}}function _e(){return ct(new Mr)}function vu(e){return e instanceof Mr}const pe=0,Ee=1,Ul=3,sn=4;function vp(e,t,n,r){const i=e._keyToDOMMap;i.clear(),e._editorState=yu(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=Yn,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 ex(e){const t=e||{},n=Y5(),r=t.theme||{},i=e===void 0?n:t.parentEditor||null,o=t.disableEvents||!1,s=yu(),l=t.namespace||(i!==null?i._config.namespace:jh()),a=t.editorState,u=[Pi,fn,Ai,Ni,Mr,_u,...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 _=u[x],y=null,g=null;if(typeof _!="function"){const b=_;_=b.replace,y=b.with,g=b.withKlass||null}const m=_.getType(),v=_.transform(),k=new Set;v!==null&&k.add(v),f.set(m,{exportDOM:d&&d.export?d.export.get(_):void 0,klass:_,replace:y,replaceWithKlass:g,transforms:k})}}const p=new ps(s,i,f,{disableEvents:o,namespace:l,theme:r},c||console.error,function(x,_){const y=new Map,g=new Set,m=v=>{Object.keys(v).forEach(k=>{let b=y.get(k);b===void 0&&(b=[],y.set(k,b)),b.push(v[k])})};return x.forEach(v=>{const k=v.klass.importDOM;if(k==null||g.has(k))return;g.add(k);const b=k.call(v.klass);b!==null&&m(b)}),_&&m(_),y}(f,d?d.import:void 0),h);return a!==void 0&&(p._pendingEditorState=a,p._dirtyType=kr),p}class ps{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=Yn,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=jh(),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=Nc(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=Nc(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=br(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=t,vp(this,n,t,i),n!==null&&(this._config.disableEvents||B5(n),r!=null&&n.classList.remove(...r)),t!==null){const o=cu(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=kr,Oh(this),this._updateTags.add("history-merge"),Qt(this),this._config.disableEvents||function(l,a){const u=l.ownerDocument,c=To.get(u);(c===void 0||c<1)&&u.addEventListener("selectionchange",lp),To.set(u,(c||0)+1),l.__lexicalEditor=a;const d=sp(l);for(let h=0;h<Dl.length;h++){const[f,p]=Dl[h],x=typeof p=="function"?_=>{Rc(_)||(Mc(_),(a.isEditable()||f==="click")&&p(_,a))}:_=>{if(Rc(_))return;Mc(_);const y=a.isEditable();switch(f){case"cut":return y&&X(a,Ka,_);case"copy":return X(a,ns,_);case"paste":return y&&X(a,ki,_);case"dragstart":return y&&X(a,ts,_);case"dragover":return y&&X(a,Ja,_);case"dragend":return y&&X(a,X0,_);case"focus":return y&&X(a,Th,_);case"blur":return y&&X(a,Ih,_);case"drop":return y&&X(a,Wa,_)}};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"),Qt(this);ri("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=yp(t),r._selection=t._selection?t._selection.clone():null),Rh(this);const i=this._pendingEditorState,o=this._updateTags,s=n!==void 0?n.tag:null;i===null||i.isEmpty()||(s!=null&&o.add(s),Qt(this)),this._pendingEditorState=r,this._dirtyType=kr,this._dirtyElements.set("root",!1),this._compositionKey=null,s!=null&&o.add(s),this._updating||Qt(this)}parseEditorState(t,n){return function(r,i,o){const s=yu(),l=We,a=lt,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,lt=!1,Je=i;try{const p=i._nodes;xu(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,lt=a,Je=u}return s}(typeof t=="string"?JSON.parse(t):t,this,n)}read(t){return Qt(this),this.getEditorState().read(t,{editor:this})}update(t,n){_t(this,t,n)}focus(t,n={}){const r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),_t(this,()=>{const i=U(),o=Te();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=Lt(this._window);n!==null&&n.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,ri("editable",this,!0,t))}toJSON(){return{editorState:this._editorState.toJSON()}}}ps.version="0.23.1+prod.esm";function tx(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bp=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.`)});const nx=new Map;function rx(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 Cp(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]=zl(e),h=s.is(l),f=t.is(o?l:s),p=t.is(o?s:l);let x,_=0;return h?(_=c>d?d:c,x=c>d?c:d):f?(_=o?d:c,x=void 0):p&&(_=0,x=o?c:d),t.__text=t.__text.slice(_,x),t}}return t}function Qc(e){if(e.type==="text")return e.offset===e.getNode().getTextContentSize();const t=e.getNode();return O(t)||bp(177),e.offset===t.getChildrenSize()}function ix(e){const t=e.getStyle(),n=rx(t);nx.set(t,n)}function ox(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=Te(),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(),nd);o&&i.indexOf(o)===-1&&i.push(o);for(let s=0;s<i.length;s++){const l=i[s];if(!nd(l))continue;O(l)||bp(178);const a=t();a.setFormat(l.getFormatType()),a.setIndent(l.getIndent()),l.replace(a,!0)}}function ed(e,t){const n=gi(e.focus,t);return ye(n)&&!n.isIsolated()||O(n)&&!n.isInline()&&!n.canBeEmpty()}function sx(e,t,n,r){e.modify(t?"extend":"move",n,r)}function lx(e){const t=e.anchor.getNode();return(Ye(t)?t:t.getParentOrThrow()).getDirection()==="rtl"}function td(e,t,n){const r=lx(e);sx(e,t,n?!r:r,"character")}function nd(e){if(ye(e)||!O(e)||Ve(e))return!1;const t=e.getFirstChild(),n=t===null||Nt(t)||z(t)||t.isInline();return!e.isInline()&&e.canBeEmpty()!==!1&&n}function ax(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ux=ax(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 gs=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,cx=gs&&"documentMode"in document?document.documentMode:null,dx=gs&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);!(!gs||!("InputEvent"in window)||cx)&&"getTargetRanges"in new window.InputEvent("input");function wp(...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 dt(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}const fx=gs,hx=dx;function Pt(e,...t){const n=wp(...t);n.length>0&&e.classList.add(...n)}function ms(e,...t){const n=wp(...t);n.length>0&&e.classList.remove(...n)}function kp(e,t){let n=e;for(;n!=null;){if(n instanceof t)return n;n=n.getParent()}return null}function Wl(e){const t=or(e,n=>O(n)&&!n.isInline());return O(t)||ux(4,e.__key),t}const or=(e,t)=>{let n=e;for(;n!==Te()&&n!=null;){if(t(n))return n;n=n.getParent()}return null};function Sp(e){const t=U()||Fr();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]=M5(o,s);l.insertBefore(e),l.selectStart()}}else{if(t!=null){const r=t.getNodes();r[r.length-1].getTopLevelElementOrThrow().insertAfter(e)}else Te().append(e);const n=_e();e.insertAfter(n),n.select()}return e.getLatest()}function bu(e,t){const n=t();return e.replace(n),n.append(e),n}function Cn(e,t){return e!==null&&Object.getPrototypeOf(e).constructor.name===t.name}function px(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 Xs=!(hx||!fx)&&void 0;function gx(e){let t=1;if(function(){if(Xs===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"),Xs=n.getBoundingClientRect().width===r.width,document.body.removeChild(n)}return Xs}())for(;e;)t*=Number(window.getComputedStyle(e).getPropertyValue("zoom")),e=e.parentElement;return t}const Ki=0,Jl=1,Kl=2,Tt=0,mx=1,rd=2,xx=3,yx=4;function _x(e,t,n,r,i){if(e===null||n.size===0&&r.size===0&&!i)return Tt;const o=t._selection,s=e._selection;if(i)return mx;if(!(D(o)&&D(s)&&s.isCollapsed()&&o.isCollapsed()))return Tt;const l=function(y,g,m){const v=y._nodeMap,k=[];for(const b of g){const C=v.get(b);C!==void 0&&k.push(C)}for(const[b,C]of m){if(!C)continue;const E=v.get(b);E===void 0||Ye(E)||k.push(E)}return k}(t,n,r);if(l.length===0)return Tt;if(l.length>1){const y=t._nodeMap,g=y.get(o.anchor.key),m=y.get(s.anchor.key);return g&&m&&!e._nodeMap.has(g.__key)&&z(g)&&g.__text.length===1&&o.anchor.offset===1?rd:Tt}const a=l[0],u=e._nodeMap.get(a.__key);if(!z(u)||!z(a)||u.__mode!==a.__mode)return Tt;const c=u.__text,d=a.__text;if(c===d)return Tt;const h=o.anchor,f=s.anchor;if(h.key!==f.key||h.type!=="text")return Tt;const p=h.offset,x=f.offset,_=d.length-c.length;return _===1&&x===p-1?rd:_===-1&&x===p+1?xx:_===-1&&x===p?yx:Tt}function vx(e,t){let n=Date.now(),r=Tt;return(i,o,s,l,a,u)=>{const c=Date.now();if(u.has("historic"))return r=Tt,n=c,Kl;const d=_x(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 Ki;if(i===null)return Jl;const x=o._selection;return l.size>0||a.size>0?p===!1&&d!==Tt&&d===r&&c<n+t&&f||l.size===1&&function(_,y,g){const m=y._nodeMap.get(_),v=g._nodeMap.get(_),k=y._selection,b=g._selection;return!(D(k)&&D(b)&&k.anchor.type==="element"&&k.focus.type==="element"&&b.anchor.type==="text"&&b.focus.type==="text"||!z(m)||!z(v)||m.__parent!==v.__parent)&&JSON.stringify(y.read(()=>m.exportJSON()))===JSON.stringify(g.read(()=>v.exportJSON()))}(Array.from(l)[0],i,o)?Ki:Jl:x!==null?Ki:Kl})();return n=c,r=d,h}}function id(e){e.undoStack=[],e.redoStack=[],e.current=null}function bx(e,t,n){const r=vx(e,n);return dt(e.registerCommand(Yo,()=>(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(Kr,!0)),a.length===0&&o.dispatchCommand(Zr,!1),s.current=c||null,c&&c.editor.setEditorState(c.editorState,{tag:"historic"})}}(e,t),!0),pe),e.registerCommand(Xo,()=>(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(Zr,!0));const c=l.pop();l.length===0&&o.dispatchCommand(Kr,!1),s.current=c||null,c&&c.editor.setEditorState(c.editorState,{tag:"historic"})}}(e,t),!0),pe),e.registerCommand(Q0,()=>(id(t),!1),pe),e.registerCommand(e5,()=>(id(t),e.dispatchCommand(Kr,!1),e.dispatchCommand(Zr,!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===Jl)d.length!==0&&(t.redoStack=[],e.dispatchCommand(Kr,!1)),c!==null&&(h.push({...c}),e.dispatchCommand(Zr,!0));else if(p===Kl)return;t.current={editor:e,editorState:o}}))}function Ep(){return{current:null,redoStack:[],undoStack:[]}}function Cx({delay:e,externalHistoryState:t}){const[n]=rt();return function(r,i,o=1e3){const s=T.useMemo(()=>i||Ep(),[i]);T.useEffect(()=>bx(r,s,o),[o,r,s])}(n,t,e),null}function wx(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(!Ip.has(s.nodeName)){const l=Ap(s,e,i,!1);l!==null&&(r=r.concat(l))}}return function(o){for(const s of o)s.getNextSibling()instanceof _u&&s.insertAfter(Ft());for(const s of o){const l=s.getChildren();for(const a of l)s.insertBefore(a);s.remove()}}(i),r}function kx(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=Te().getChildren();for(let i=0;i<r.length;i++)Tp(e,r[i],n,t);return n.innerHTML}function Tp(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=fu(t);f=z(f)&&r!==null?Cp(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=Tp(e,p,h,r);!i&&O(t)&&x&&t.extractWithChild(p,r,"html")&&(i=!0)}if(i&&!o){if((Fe(c)||Al(c))&&c.append(h),n.append(c),d){const f=d.call(s,c);f&&(Al(c)?c.replaceChildren(f):c.replaceWith(f))}}else n.append(h);return i}const Ip=new Set(["STYLE","SCRIPT"]);function Ap(e,t,n,r,i=new Map,o){let s=[];if(Ip.has(e.nodeName))return s;let l=null;const a=function(p,x){const{nodeName:_}=p,y=x._htmlConversions.get(_.toLowerCase());let g=null;if(y!==void 0)for(const m of y){const v=m(p);v!==null&&(g===null||(g.priority||0)<=(v.priority||0))&&(g=v)}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&&Io(l)||r);for(let p=0;p<d.length;p++)h.push(...Ap(d[p],t,n,f,new Map(i),l));return c!=null&&(h=c(h)),wo(e)&&(h=Sx(e,h,f?()=>{const p=new _u;return n.push(p),p}:_e)),l==null?h.length>0?s=s.concat(h):wo(e)&&function(p){return p.nextSibling==null||p.previousSibling==null?!1:Nl(p.nextSibling)&&Nl(p.previousSibling)}(e)&&(s=s.concat(Ft())):O(l)&&l.append(...h),s}function Sx(e,t,n){const r=e.style.textAlign,i=[];let o=[];for(let s=0;s<t.length;s++){const l=t[s];if(Io(l))r&&!l.getFormat()&&l.setFormat(r),i.push(l);else if(o.push(l),s===t.length-1||s<t.length-1&&Io(t[s+1])){const a=n();a.setFormat(r),a.append(...o),i.push(a),o=[]}}return i}function Ex(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Lo=Ex(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 Tx(e,t=U()){return t==null&&Lo(166),D(t)&&t.isCollapsed()||t.getNodes().length===0?"":kx(e,t)}function Ix(e,t=U()){return t==null&&Lo(166),D(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(Ax(e,t))}function od(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 sd(n,Nx(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 sd(n,wx(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([Lr()]):a.insertText(u)}}}else t.insertRawText(o)}function sd(e,t,n){e.dispatchCommand(Z0,{nodes:t,selection:n})||n.insertNodes(t)}function Np(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=fu(n);u=z(u)&&t!==null?Cp(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()&&Lo(58,d.name),O(u)){const h=c.children;Array.isArray(h)||Lo(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=Np(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 Ax(e,t){const n=[],r=Te().getChildren();for(let i=0;i<r.length;i++)Np(e,t,r[i],n);return{namespace:e._config.namespace,nodes:n}}function Nx(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n],i=X5(r);z(i)&&ix(i),t.push(i)}return t}let dr=null;async function ld(e,t,n){if(dr!==null)return!1;if(t!==null)return new Promise((a,u)=>{e.update(()=>{a(ad(e,t,n))})});const r=e.getRootElement(),i=e._window==null?window.document:e._window.document,o=Lt(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(ns,d=>(Cn(d,ClipboardEvent)&&(c(),dr!==null&&(window.clearTimeout(dr),dr=null),a(ad(e,d,n))),!0),sn);dr=window.setTimeout(()=>{c(),dr=null,a(!1)},50),i.execCommand("copy"),s.remove()})}function ad(e,t,n){if(n===void 0){const i=Lt(e._window);if(!i)return!1;const o=i.anchorNode,s=i.focusNode;if(o!==null&&s!==null&&!Ti(e,o,s))return!1;const l=U();if(l===null)return!1;n=Fx(l)}t.preventDefault();const r=t.clipboardData;return r!==null&&(Px(r,n),!0)}const Lx=[["text/html",Tx],["application/x-lexical-editor",Ix]];function Fx(e=U()){const t={"text/plain":e?e.getTextContent():""};if(e){const n=R5();for(const[r,i]of Lx){const o=i(n,e);o!==null&&(t[r]=o)}}return t}function Px(e,t){for(const n in t){const r=t[n];r!==void 0&&e.setData(n,r)}}function ud(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 Rr=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,Mx=Rr&&"documentMode"in document?document.documentMode:null,Rx=!(!Rr||!("InputEvent"in window)||Mx)&&"getTargetRanges"in new window.InputEvent("input"),Ox=Rr&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),cd=Rr&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,$x=Rr&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Dx=Rr&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!$x,dd=cn();let xs=class Lp extends Rt{static getType(){return"quote"}static clone(t){return new Lp(t.__key)}createDOM(t){const n=document.createElement("blockquote");return Pt(n,t.theme.quote),n}updateDOM(t,n){return!1}static importDOM(){return{blockquote:t=>({conversion:Vx,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 Mi().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 Mi(){return ct(new xs)}function Zl(e){return e instanceof xs}let Ri=class Fp extends Rt{static getType(){return"heading"}static clone(t){return new Fp(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];Pt(r,o)}return r}updateDOM(t,n,r){return t.__tag!==this.__tag}static importDOM(){return{h1:t=>({conversion:fr,priority:0}),h2:t=>({conversion:fr,priority:0}),h3:t=>({conversion:fr,priority:0}),h4:t=>({conversion:fr,priority:0}),h5:t=>({conversion:fr,priority:0}),h6:t=>({conversion:fr,priority:0}),p:t=>{const n=t.firstChild;return n!==null&&fd(n)?{conversion:()=>({node:null}),priority:3}:null},span:t=>fd(t)?{conversion:n=>({node:zt("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 zt(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():zt(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():zt(this.getTag());return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}extractWithChild(){return!0}};function fd(e){return e.nodeName.toLowerCase()==="span"&&e.style.fontSize==="26pt"}function fr(e){const t=e.nodeName.toLowerCase();let n=null;return t!=="h1"&&t!=="h2"&&t!=="h3"&&t!=="h4"&&t!=="h5"&&t!=="h6"||(n=zt(t),e.style!==null&&(hu(e,n),n.setFormat(e.style.textAlign))),{node:n}}function Vx(e){const t=Mi();return e.style!==null&&(t.setFormat(e.style.textAlign),hu(e,t)),{node:t}}function zt(e="h1"){return ct(new Ri(e))}function ys(e){return e instanceof Ri}function Zi(e){let t=null;if(Cn(e,DragEvent)?t=e.dataTransfer:Cn(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 hd(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=or(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 Gi(e){const t=on(e);return ye(t)}function Qs(e){for(const t of["lowercase","uppercase","capitalize"])e.hasFormat(t)&&e.toggleFormat(t)}function Hx(e){return dt(e.registerCommand(qo,t=>{const n=U();return!!He(n)&&(n.clear(),!0)},0),e.registerCommand(Zn,t=>{const n=U();return!!D(n)&&(n.deleteCharacter(t),!0)},pe),e.registerCommand(fi,t=>{const n=U();return!!D(n)&&(n.deleteWord(t),!0)},pe),e.registerCommand(hi,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)od(r,n,e);else if(D(n)){const i=t.data;return i&&n.insertText(i),!0}}return!0},pe),e.registerCommand(Sl,()=>{const t=U();return!!D(t)&&(t.removeText(),!0)},pe),e.registerCommand(en,t=>{const n=U();return!!D(n)&&(n.formatText(t),!0)},pe),e.registerCommand(Y0,t=>{const n=U();if(!D(n)&&!He(n))return!1;const r=n.getNodes();for(const i of r){const o=or(i,s=>O(s)&&!s.isInline());o!==null&&o.setFormat(t)}return!0},pe),e.registerCommand(_r,t=>{const n=U();return!!D(n)&&(n.insertLineBreak(t),!0)},pe),e.registerCommand(di,()=>{const t=U();return!!D(t)&&(t.insertParagraph(),!0)},pe),e.registerCommand(Eh,()=>(Pr([Lr()]),!0),pe),e.registerCommand(po,()=>hd(t=>{const n=t.getIndent();t.setIndent(n+1)}),pe),e.registerCommand(El,()=>hd(t=>{const n=t.getIndent();n>0&&t.setIndent(n-1)}),pe),e.registerCommand(Ba,t=>{const n=U();if(He(n)&&!Gi(t.target)){const r=n.getNodes();if(r.length>0)return r[0].selectPrevious(),!0}else if(D(n)){const r=gi(n.focus,!0);if(!t.shiftKey&&ye(r)&&!r.isIsolated()&&!r.isInline())return r.selectPrevious(),t.preventDefault(),!0}return!1},pe),e.registerCommand(za,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===Te().getChildrenSize()}(n))return t.preventDefault(),!0;const r=gi(n.focus,!1);if(!t.shiftKey&&ye(r)&&!r.isIsolated()&&!r.isInline())return r.selectNext(),t.preventDefault(),!0}return!1},pe),e.registerCommand(Ha,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(ed(n,!0)){const r=t.shiftKey;return t.preventDefault(),td(n,r,!0),!0}return!1},pe),e.registerCommand(Sh,t=>{const n=U();if(He(n)&&!Gi(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!!ed(n,!1)&&(t.preventDefault(),td(n,r,!1),!0)},pe),e.registerCommand(Qo,t=>{if(Gi(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&&!Ye(i)&&Wl(i).getIndent()>0?(t.preventDefault(),e.dispatchCommand(El,void 0)):(!cd||navigator.language!=="ko-KR")&&(t.preventDefault(),e.dispatchCommand(Zn,!0))},pe),e.registerCommand(es,t=>{if(Gi(t.target))return!1;const n=U();return!!D(n)&&(t.preventDefault(),e.dispatchCommand(Zn,!1))},pe),e.registerCommand(pi,t=>{const n=U();if(!D(n))return!1;if(Qs(n),t!==null){if((cd||Ox||Dx)&&Rx)return!1;if(t.preventDefault(),t.shiftKey)return e.dispatchCommand(_r,!1)}return e.dispatchCommand(di,void 0)},pe),e.registerCommand(Si,()=>{const t=U();return!!D(t)&&(e.blur(),!0)},pe),e.registerCommand(Wa,t=>{const[,n]=Zi(t);if(n.length>0){const i=ud(t.clientX,t.clientY);if(i!==null){const{offset:o,node:s}=i,l=on(s);if(l!==null){const a=fs();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=Sr(a);qe(u)}e.dispatchCommand(dd,n)}return t.preventDefault(),!0}const r=U();return!!D(r)},pe),e.registerCommand(ts,t=>{const[n]=Zi(t),r=U();return!(n&&!D(r))},pe),e.registerCommand(Ja,t=>{const[n]=Zi(t),r=U();if(n&&!D(r))return!1;const i=ud(t.clientX,t.clientY);if(i!==null){const o=on(i.node);ye(o)&&t.preventDefault()}return!0},pe),e.registerCommand(Tl,()=>(A5(),!0),pe),e.registerCommand(ns,t=>(ld(e,Cn(t,ClipboardEvent)?t:null),!0),pe),e.registerCommand(Ka,t=>(async function(n,r){await ld(r,Cn(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(ki,t=>{const[,n,r]=Zi(t);return n.length>0&&!r?(e.dispatchCommand(dd,n),!0):Nr(t.target)&&ru(t.target)?!1:U()!==null&&(function(i,o){i.preventDefault(),o.update(()=>{const s=U(),l=Cn(i,InputEvent)||Cn(i,KeyboardEvent)?null:i.clipboardData;l!=null&&s!==null&&od(l,s,o)},{tag:"paste"})}(t,e),!0)},pe),e.registerCommand(ja,t=>{const n=U();return D(n)&&Qs(n),!1},pe),e.registerCommand(Ua,t=>{const n=U();return D(n)&&Qs(n),!1},pe))}function xt(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 yt(e,t){return e.length>0?(xt(e,e.length,0,t),e):t}const Dt=Fn(/[A-Za-z]/),It=Fn(/[\dA-Za-z]/),Bx=Fn(/[#-'*+\--9=?A-Z^-~]/);function Gl(e){return e!==null&&(e<32||e===127)}const ql=Fn(/\d/),zx=Fn(/[\dA-Fa-f]/),jx=Fn(/[!-/:-@[-`{-~]/);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 Ux=Fn(new RegExp("\\p{P}|\\p{S}","u")),Yt=Fn(/\s/);function Fn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Er(e){if(e===null||Me(e)||Yt(e))return 1;if(Ux(e))return 2}function _s(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 Wx(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&&xt(h,h.length,0,_s(f,s.slice(u+1,a),l)),xt(h,h.length,0,[["exit",d,l],["enter",s[a][1],l],["exit",s[a][1],l],["exit",c,l]]),xt(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=Er(u);if(p===126)return d>1?a(p):(s.consume(p),d++,f);if(d<2&&!n)return a(p);const _=s.exit("strikethroughSequenceTemporary"),y=Er(p);return _._open=!y||y===2&&!!x,_._close=!x||x===2&&!!y,l(p)}}}const Jx=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Pp.peek=Yx;function Kx(){return{canContainEols:["delete"],enter:{strikethrough:Gx},exit:{strikethrough:qx}}}function Zx(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Jx}],handlers:{delete:Pp}}}function Gx(e){this.enter({type:"delete",children:[]},e)}function qx(e){this.exit(e)}function Pp(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 Yx(){return"~"}function pd(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 Xx=["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"],gd={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 Mp(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=48&&t<=57}function Qx(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function e2(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function md(e){return e2(e)||Mp(e)}const xd=document.createElement("i");function _i(e){const t="&"+e+";";xd.innerHTML=t;const n=xd.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}const t2=["","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 n2(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 y=e.charCodeAt(o+1);if(y===9||y===10||y===12||y===32||y===38||y===60||Number.isNaN(y)||r&&y===r){l+=String.fromCharCode(f),d++;continue}const g=o+1;let m=g,v=g,k;if(y===35){v=++m;const L=e.charCodeAt(v);L===88||L===120?(k="hexadecimal",v=++m):k="decimal"}else k="named";let b="",C="",E="";const I=k==="named"?md:k==="decimal"?Mp:Qx;for(v--;++v<=e.length;){const L=e.charCodeAt(v);if(!I(L))break;E+=String.fromCharCode(L),k==="named"&&Xx.includes(E)&&(b=E,C=_i(E))}let P=e.charCodeAt(v)===59;if(P){v++;const L=k==="named"?_i(E):!1;L&&(b=E,C=L)}let M=1+v-g,R="";if(!(!P&&n.nonTerminated===!1))if(!E)k!=="named"&&x(4,M);else if(k==="named"){if(P&&!C)x(5,1);else if(b!==E&&(v=m+b.length,M=1+v-m,P=!1),!P){const L=b?1:3;if(n.attribute){const K=e.charCodeAt(v);K===61?(x(L,M),C=""):md(K)?C="":x(L,M)}else x(L,M)}R=C}else{P||x(2,M);let L=Number.parseInt(E,k==="hexadecimal"?16:10);if(r2(L))x(7,M),R="�";else if(L in gd)x(6,M),R=gd[L];else{let K="";i2(L)&&x(6,M),L>65535&&(L-=65536,K+=String.fromCharCode(L>>>10|55296),L=56320|L&1023),R=K+String.fromCharCode(L)}}if(R){_(),h=p(),o=v-1,d+=v-g+1,i.push(R);const L=p();L.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,R,{start:h,end:L},e.slice(g-1,v)),h=L}else E=e.slice(g-1,v),l+=E,d+=E.length,o=v-1}else f===10&&(c++,s++,d=0),Number.isNaN(f)?_():(l+=String.fromCharCode(f),d++);return i.join("");function p(){return{line:c,column:d,offset:o+((a?a.offset:0)||0)}}function x(y,g){let m;n.warning&&(m=p(),m.column+=g,m.offset+=g,n.warning.call(n.warningContext||void 0,t2[y],m,y))}function _(){l&&(i.push(l),n.text&&n.text.call(n.textContext||void 0,l,{start:h,end:p()}),l="")}}function r2(e){return e>=55296&&e<=57343||e>1114111}function i2(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 o2=/["&'<>`]/g,s2=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l2=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,a2=/[|\\{}()[\]^$+*?.]/g,yd=new WeakMap;function u2(e,t){if(e=e.replace(t.subset?c2(t.subset):o2,r),t.subset||t.escapeOnly)return e;return e.replace(s2,n).replace(l2,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 c2(e){let t=yd.get(e);return t||(t=d2(e),yd.set(e,t)),t}function d2(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(a2,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}function f2(e){return"&#x"+e.toString(16).toUpperCase()+";"}function h2(e,t){return u2(e,Object.assign({format:f2},t))}function tn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?_d(e.position):"start"in e||"end"in e?_d(e):"line"in e||"column"in e?Yl(e):""}function Yl(e){return vd(e&&e.line)+":"+vd(e&&e.column)}function _d(e){return Yl(e&&e.start)+"-"+Yl(e&&e.end)}function vd(e){return e&&typeof e=="number"?e:1}class Ce 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=tn(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}}Ce.prototype.file="";Ce.prototype.name="";Ce.prototype.reason="";Ce.prototype.message="";Ce.prototype.stack="";Ce.prototype.column=void 0;Ce.prototype.line=void 0;Ce.prototype.ancestors=void 0;Ce.prototype.cause=void 0;Ce.prototype.fatal=void 0;Ce.prototype.place=void 0;Ce.prototype.ruleId=void 0;Ce.prototype.source=void 0;const Rp=" ";function p2(){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:_,mdxJsxFlowTagAttributeValueLiteralValue:n,mdxJsxFlowTagAttributeValueExpression:y,mdxJsxFlowTagAttributeValueExpressionValue:n,mdxJsxFlowTagSelfClosingMarker:g,mdxJsxFlowTag:m,mdxJsxTextTagClosingMarker:l,mdxJsxTextTagNamePrimary:a,mdxJsxTextTagNameMember:u,mdxJsxTextTagNameLocal:c,mdxJsxTextTagExpressionAttribute:f,mdxJsxTextTagExpressionAttributeValue:n,mdxJsxTextTagAttributeNamePrimary:p,mdxJsxTextTagAttributeNameLocal:x,mdxJsxTextTagAttributeValueLiteral:_,mdxJsxTextTagAttributeValueLiteralValue:n,mdxJsxTextTagAttributeValueExpression:y,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 Ce("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 Ce("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 Ce("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 P=C.estree;I.value=this.resume(),I.position,I.position.end=t(C.end),P&&(I.data={estree:P})}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 _(C){const E=this.data.mdxJsxTag,I=E.attributes[E.attributes.length-1];I.value=n2(this.resume(),{nonTerminated:!1}),I.position,I.position.end=t(C.end)}function y(C){const E=this.data.mdxJsxTag,I=E.attributes[E.attributes.length-1];I.type;const P={type:"mdxJsxAttributeValueExpression",value:this.resume()},M=C.estree;M&&(P.data={estree:M}),I.value=P,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,P=I[I.length-1];if(E.close&&P.name!==E.name)throw new Ce("Unexpected closing tag `"+b(E)+"`, expected corresponding closing tag for `"+b(P)+"` ("+tn(P)+")",{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,v),E.selfClosing||E.close?this.exit(C,k):I.push(E)}function v(C,E){const I=this.data.mdxJsxTagStack,P=I[I.length-1],M=C?" before the end of `"+C.type+"`":"",R=C?{start:C.start,end:C.end}:void 0;throw new Ce("Expected a closing tag for `"+b(P)+"` ("+tn({start:E.start,end:E.end})+")"+M,R,"mdast-util-mdx-jsx:end-tag-mismatch")}function k(C,E){const I=this.data.mdxJsxTag;throw new Ce("Expected the closing tag `"+b(I)+"` either after the end of `"+E.type+"` ("+tn(E.end)+") or another opening tag after the start of `"+E.type+"` ("+tn(E.start)+")",{start:C.start,end:C.end},"mdast-util-mdx-jsx:end-tag-mismatch")}function b(C){return"<"+(C.close?"/":"")+(C.name||"")+">"}}function g2(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=x2,{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=Op(c),x=$p(p),_=c.createTracker(d),y=c.createTracker(d),g=[],m=(h?x:"")+"<"+(a.name||""),v=c.enter(a.type);if(_.move(m),y.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 P=a.attributes[I];let M;if(P.type==="mdxJsxExpressionAttribute")M="{"+(P.value||"")+"}";else{if(!P.name)throw new Error("Cannot serialize attribute w/o name");const R=P.value,L=P.name;let K="";if(R!=null)if(typeof R=="object")K="{"+(R.value||"")+"}";else{const B=r&&pd(R,n)>pd(R,s)?s:n;K=B+h2(R,{subset:[B]})+B}M=L+(K?"=":"")+K}g.push(M)}}let k=!1;const b=g.join(" ");h&&(/\r?\n|\r/.test(b)||_.current().now.column+b.length+(f?i?2:3:1)>o)&&(k=!0);let C=_,E=m;if(k){C=y;let I=-1;for(;++I<g.length;)g[I]=x+Rp+g[I];E+=C.move(`
|
|
19
|
+
`+g.join(`
|
|
20
|
+
`)+`
|
|
21
|
+
`+x)}else b&&(E+=C.move(" "+b));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(m2(a,c,C.current())),E+=C.move(`
|
|
23
|
+
`))),f||(E+=C.move((h?x:"")+"</"+(a.name||"")+">")),v(),E}}function m2(e,t,n){const r=t.indexStack,i=e.children,o=t.createTracker(n),s=$p(Op(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 Op(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 $p(e){return Rp.repeat(e)}function x2(){return"<"}const y2=/[$_\p{ID_Start}]/u,_2=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,v2=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,b2={};function Ct(e){return e?y2.test(String.fromCodePoint(e)):!1}function Ur(e,t){const r=(t||b2).jsx?v2:_2;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 C2={}.hasOwnProperty,w2=Symbol("continue"),el=Symbol("exit"),k2=Symbol("skip");function S2(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 tl(o)&&(u.displayName="node ("+o.type+")"),u;function u(){const c=n?bd(n(o,s,l,a)):[];if(c[0]===el)return c;if(c[0]!==k2){let d;for(d in o)if(C2.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 _=p[x];if(tl(_)){const y=i(_,d,x,h)();if(y[0]===el)return y;x=typeof y[1]=="number"?y[1]:x+1}else x++}}else if(tl(f)){const p=i(f,d,void 0,h)();if(p[0]===el)return p}}}return r?bd(r(o,s,l,a)):c}}}function bd(e){return Array.isArray(e)?e:typeof e=="number"?[w2,e]:[e]}function tl(e){return!!(e&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&e.type.length>0)}function E2(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=T2(e,t.tokenTypes),p=f.value,x=n+p+r,_=Cd(p);if(_&&!t.allowEmpty)throw new Ce("Unexpected empty expression",{place:g(0),ruleId:"unexpected-empty-expression",source:"micromark-extension-mdx-expression"});try{c=t.expression&&!_?t.acorn.parseExpressionAt(x,0,h):t.acorn.parse(x,h)}catch(m){const v=m,k=g(v.pos);v.message=String(v.message).replace(/ \(\d+:\d+\)$/,""),v.pos=k.offset,v.loc={line:k.line,column:k.column-1},d=v,u=v.raisedAt>=n.length+p.length||v.message==="Unterminated comment"}if(c&&t.expression&&!_)if(Cd(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),v=new Error("Unexpected content after expression");v.pos=m.offset,v.loc={line:m.line,column:m.column-1},d=v,c=void 0}if(c){if(c.comments=o,S2(c,function(m,v,k,b){let C=b[b.length-1],E=v;m.type==="ParenthesizedExpression"&&C&&E&&(typeof k=="number"&&(C=C[E],E=k),C[E]=m.expression),y(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||(y(m),Array.isArray(a)?a.push(m):a(m))}return{estree:c,error:d,swallow:u};function y(m){const v=g(m.start),k=g(m.end);m.start=v.offset,m.end=k.offset,m.loc={start:{line:v.line,column:v.column-1,offset:v.offset},end:{line:k.line,column:k.column-1,offset:k.offset}},m.range=[m.start,m.end]}function g(m){let v=m-n.length;v<0?v=0:v>p.length&&(v=p.length);let k=I2(f.stops,v);return k||(k={line:t.start.line,column:t.start.column,offset:t.start.offset}),k}}function Cd(e){return/^\s*$/.test(e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g,""))}function T2(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=A2(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 I2(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 A2(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 nl(e){const t=e||{},n=t.loc||{},r=t.range||[void 0,void 0],i=wd(n.start,r[0]||t.start),o=wd(n.end,r[1]||t.end);if(i&&o)return{start:i,end:o}}function wd(e,t){if(e&&typeof e=="object"){const n="line"in e?rl(e.line):void 0,r="column"in e?rl(e.column):void 0;if(n&&r!==void 0)return{line:n,column:r+1,offset:rl(t)}}}function rl(e){return typeof e=="number"&&e>-1?e:void 0}const N2=2,mr="https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression",L2="#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-",F2="#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed",kd="#unexpected-type-in-code-expected-an-object-spread-spread",P2="#unexpected-extra-content-in-spread-only-a-single-spread-is-supported",M2="#could-not-parse-expression-with-acorn";function Sd(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 _;function _(v){return e.enter(n),e.enter(r),e.consume(v),e.exit(r),p=d.now(),y}function y(v){if(v===null){if(x)throw x;const k=new Ce("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=mr+L2,k}if(te(v))return e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),m;if(v===125&&f===0){const k=o?R2.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(v),e.exit(r);const b=e.exit(n);return l&&k.estree&&Object.assign(b,{estree:k.estree}),t}return x=k.message,e.enter(i),e.consume(v),g}return e.enter(i),g(v)}function g(v){return v===125&&f===0||v===null||te(v)?(e.exit(i),y(v)):(v===123&&!o?f+=1:v===125&&(f-=1),e.consume(v),g)}function m(v){const k=d.now();if(k.line!==p.line&&!c&&d.parser.lazy[k.line]){const b=new Ce("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 b.url=mr+F2,b}return ge(v)?xe(e,y,"linePrefix",N2+1)(v):y(v)}}function R2(e,t,n,r,i,o,s){const l=E2(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=nl(u),d=new Ce("Unexpected `"+u.type+"` in code: expected an object spread (`{...spread}`)",{place:c.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw d.url=mr+kd,d}if(u.expression.properties[1]){const c=nl(u.expression.properties[1]),d=new Ce("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=mr+P2,d}if(u.expression.properties[0]&&u.expression.properties[0].type!=="SpreadElement"){const c=nl(u.expression.properties[0]),d=new Ce("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=mr+kd,d}}if(l.error){const u=new Ce("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=mr+M2,{type:"nok",message:u}}return{type:"ok",estree:a}}const Ed="https://github.com/micromark/micromark-extension-mdx-jsx";function Dp(e,t,n,r,i,o,s,l,a,u,c,d,h,f,p,x,_,y,g,m,v,k,b,C,E,I,P,M,R,L,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,we(S))}function se(S){if(S===47)return e.enter(u),e.consume(S),e.exit(u),Z=ee,we;if(S===62)return bt(S);if(S!==null&&S>=0&&Ct(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 bt(S);if(S!==null&&S>=0&&Ct(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&&Ur(S,{jsx:!0}))return e.consume(S),A;if(S===46||S===47||S===58||S===62||S===123||Me(S)||Yt(S))return e.exit(h),Z=ue,we(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,we;if(S===58)return e.enter(x),e.consume(S),e.exit(x),Z=j,we;if(S===47||S===62||S===123||S!==null&&S>=0&&Ct(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&&Ct(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&&Ur(S,{jsx:!0}))return e.consume(S),oe;if(S===46||S===47||S===62||S===123||Me(S)||Yt(S))return e.exit(p),Z=H,we(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,we;if(S===47||S===62||S===123||S!==null&&S>=0&&Ct(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&&Ct(S))return e.enter(_),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&&Ur(S,{jsx:!0}))return e.consume(S),q;if(S===47||S===62||S===123||Me(S)||Yt(S))return e.exit(_),Z=Y,we(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&&Ct(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=Bn,we;if(S===62)return bt(S);if(S===123)return Sd.call(Q,e,de,y,g,m,r,i,o,!0,!1,s)(S);if(S!==null&&S>=0&&Ct(S))return e.enter(v),e.enter(k),e.enter(b),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,we(S)}function Ie(S){if(S!==null&&S>=0&&Ur(S,{jsx:!0}))return e.consume(S),Ie;if(S===47||S===58||S===61||S===62||S===123||Me(S)||Yt(S))return e.exit(b),Z=De,we(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,we;if(S===61)return e.exit(k),e.enter(I),e.consume(S),e.exit(I),Z=pn,we;if(S===47||S===62||S===123||Me(S)||Yt(S)||S!==null&&S>=0&&Ct(S))return e.exit(k),e.exit(v),Z=ie,we(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&&Ct(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&&Ur(S,{jsx:!0}))return e.consume(S),Ue;if(S===47||S===61||S===62||S===123||Me(S)||Yt(S))return e.exit(E),e.exit(k),Z=Ke,we(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=pn,we;if(S===47||S===62||S===123||S!==null&&S>=0&&Ct(S))return e.exit(v),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 pn(S){if(S===34||S===39)return e.enter(P),e.enter(M),e.consume(S),e.exit(M),ne=S,Ot;if(S===123)return Sd.call(Q,e,ht,L,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 ht(S){return e.exit(v),Z=ie,we(S)}function Ot(S){return S===null&&V(S,"in attribute value","a corresponding closing quote `"+String.fromCodePoint(ne)+"`"),S===ne?(e.enter(M),e.consume(S),e.exit(M),e.exit(P),e.exit(v),ne=void 0,Z=ie,we):te(S)?(Z=Ot,we(S)):(e.enter(R),et(S))}function et(S){return S===null||S===ne||te(S)?(e.exit(R),Ot(S)):(e.consume(S),et)}function Bn(S){if(S===62)return bt(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 bt(S){return e.enter(a),e.consume(S),e.exit(a),e.exit(l),t}function we(S){return te(S)?(e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),$):ge(S)||Yt(S)?(e.enter("esWhitespace"),pt(S)):Z(S)}function pt(S){return te(S)?(e.exit("esWhitespace"),we(S)):ge(S)||Yt(S)?(e.consume(S),pt):(e.exit("esWhitespace"),Z(S))}function $(S){if(!s&&Q.parser.lazy[Q.now().line]){const le=new Ce("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=Ed+"#unexpected-lazy-line-in-container-expected-line-to-be",le}return we(S)}function V(S,le,fe){const Se=new Ce("Unexpected "+(S===null?"end of file":"character `"+(S===96?"` ` `":String.fromCodePoint(S))+"` ("+O2(S)+")")+" "+le+", expected "+fe,Q.now(),"micromark-extension-mdx-jsx:unexpected-"+(S===null?"eof":"character"));throw Se.url=Ed+(S===null?"#unexpected-end-of-file-at-expected-expect":"#unexpected-character-at-expected-expect"),Se}}function O2(e){return"U+"+e.toString(16).toUpperCase().padStart(4,"0")}function $2(e,t){return{name:"mdxJsxTextTag",tokenize:n};function n(r,i,o){return Dp.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 D2(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 Dp.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 V2(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:D2(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})},text:{60:$2(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})}}}function H2(){return{disable:{null:["autolink","codeIndented","htmlFlow","htmlText"]}}}const Td={}.hasOwnProperty;function B2(e,t){const n=t||{};function r(i,...o){let s=r.invalid;const l=r.handlers;if(i&&Td.call(i,e)){const a=String(i[e]);s=Td.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 z2={}.hasOwnProperty;function Vp(e,t){let n=-1,r;if(t.extensions)for(;++n<t.extensions.length;)Vp(e,t.extensions[n]);for(r in t)if(z2.call(t,r))switch(r){case"extensions":break;case"unsafe":{Id(e[r],t[r]);break}case"join":{Id(e[r],t[r]);break}case"handlers":{j2(e[r],t[r]);break}default:e.options[r]=t[r]}return e}function Id(e,t){t&&e.push(...t)}function j2(e,t){t&&Object.assign(e,t)}function U2(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()),W2);return i(),s}function W2(e,t,n){return">"+(n?"":" ")+e}function Hp(e,t){return Ad(e,t.inConstruct,!0)&&!Ad(e,t.notInConstruct,!1)}function Ad(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 Nd(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
30
|
+
`&&Hp(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
31
|
+
`}function J2(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 Xl(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 K2(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 Z2(e,t,n,r){const i=K2(n),o=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(Xl(e,n)){const d=n.enter("codeIndented"),h=n.indentLines(o,G2);return d(),h}const l=n.createTracker(r),a=i.repeat(Math.max(J2(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 G2(e,t,n){return(n?"":" ")+e}function Cu(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 q2(e,t,n,r){const i=Cu(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 Y2(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 In(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Fo(e,t,n){const r=Er(e),i=Er(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}}Bp.peek=X2;function Bp(e,t,n,r){const i=Y2(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=Fo(r.before.charCodeAt(r.before.length-1),u,i);c.inside&&(a=In(u)+a.slice(1));const d=a.charCodeAt(a.length-1),h=Fo(r.after.charCodeAt(0),d,i);h.inside&&(a=a.slice(0,-1)+In(d));const f=s.move(i);return o(),n.attentionEncodeSurroundingInfo={after:h.outside,before:c.outside},l+a+f}function X2(e,t,n){return n.options.emphasis||"*"}const wu=function(e){if(e==null)return ny;if(typeof e=="function")return vs(e);if(typeof e=="object")return Array.isArray(e)?Q2(e):ey(e);if(typeof e=="string")return ty(e);throw new Error("Expected function, string, or object as test")};function Q2(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=wu(e[n]);return vs(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function ey(e){const t=e;return vs(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function ty(e){return vs(t);function t(n){return n&&n.type===e}}function vs(e){return t;function t(n,r,i){return!!(ry(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function ny(){return!0}function ry(e){return e!==null&&typeof e=="object"&&"type"in e}const zp=[],iy=!0,Ql=!1,oy="skip";function sy(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=wu(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=zp,p,x,_;if((!t||o(a,u,c[c.length-1]||void 0))&&(f=ly(n(a,c)),f[0]===Ql))return f;if("children"in a&&a.children){const y=a;if(y.children&&f[0]!==oy)for(x=(r?y.children.length:-1)+s,_=c.concat(y);x>-1&&x<y.children.length;){const g=y.children[x];if(p=l(g,x,_)(),p[0]===Ql)return p;x=typeof p[1]=="number"?p[1]:x+s}}return f}}}function ly(e){return Array.isArray(e)?e:typeof e=="number"?[iy,e]:e==null?zp:[e]}function ay(e,t,n,r){let i,o,s;typeof t=="function"&&typeof n!="function"?(o=void 0,s=t,i=n):(o=t,s=n,i=r),sy(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 uy={};function ku(e,t){const n=uy,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return jp(e,r,i)}function jp(e,t,n){if(cy(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 Ld(e.children,t,n)}return Array.isArray(e)?Ld(e,t,n):""}function Ld(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=jp(e[i],t,n);return r.join("")}function cy(e){return!!(e&&typeof e=="object")}function Up(e,t){let n=!1;return ay(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Ql}),!!((!e.depth||e.depth<3)&&ku(e)&&(t.options.setext||n))}function dy(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(Up(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=In(u.charCodeAt(0))+u.slice(1)),u=u?s+" "+u:s,n.options.closeAtx&&(u+=" "+s),a(),l(),u}Wp.peek=fy;function Wp(e){return e.value||""}function fy(){return"<"}Jp.peek=hy;function Jp(e,t,n,r){const i=Cu(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 hy(){return"!"}Kp.peek=py;function Kp(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 py(){return"!"}Zp.peek=gy;function Zp(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 gy(){return"`"}function Gp(e,t){const n=ku(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))}qp.peek=my;function qp(e,t,n,r){const i=Cu(n),o=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let l,a;if(Gp(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 my(e,t,n){return Gp(e,n)?"<":"["}Yp.peek=xy;function Yp(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 xy(){return"["}function Su(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 yy(e){const t=Su(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 _y(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 Xp(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?_y(n):Su(n);const l=e.ordered?s==="."?")":".":yy(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),Xp(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 by(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 Cy(e,t,n,r){const i=by(n);let o=n.bulletCurrent||Su(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 wy(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),i(),s}const ky=wu(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Sy(e,t,n,r){return(e.children.some(function(s){return ky(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Ey(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Qp.peek=Ty;function Qp(e,t,n,r){const i=Ey(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=Fo(r.before.charCodeAt(r.before.length-1),u,i);c.inside&&(a=In(u)+a.slice(1));const d=a.charCodeAt(a.length-1),h=Fo(r.after.charCodeAt(0),d,i);h.inside&&(a=a.slice(0,-1)+In(d));const f=s.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:h.outside,before:c.outside},l+a+f}function Ty(e,t,n){return n.options.strong||"*"}function Iy(e,t,n,r){return n.safe(e.value,r)}function Ay(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 Ny(e,t,n){const r=(Xp(n)+(n.options.ruleSpaces?" ":"")).repeat(Ay(n));return n.options.ruleSpaces?r.slice(0,-1):r}const eg={blockquote:U2,break:Nd,code:Z2,definition:q2,emphasis:Bp,hardBreak:Nd,heading:dy,html:Wp,image:Jp,imageReference:Kp,inlineCode:Zp,link:qp,linkReference:Yp,list:vy,listItem:Cy,paragraph:wy,root:Sy,strong:Qp,text:Iy,thematicBreak:Ny},Ly=[Fy];function Fy(e,t,n,r){if(t.type==="code"&&Xl(t,r)&&(e.type==="list"||e.type===t.type&&Xl(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"&&Up(t,r))?void 0:n.spread?1:0}const jn=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],Py=[{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:jn},{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:jn},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
|
|
43
|
+
*])`},{character:"*",inConstruct:"phrasing",notInConstruct:jn},{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:jn},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:jn},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:jn},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:jn},{atBreak:!0,character:"~"}];function tg(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 My=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ng(e){return e.replace(My,Ry)}function Ry(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return tg(n.slice(o?2:1),o?16:10)}return _i(n)||e}function Oy(e){return e.label||!e.identifier?e.label||"":ng(e.identifier)}function $y(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 Dy(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=In(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)+In(l.charCodeAt(0))),f.after&&(a=d)),u.move(h),o.push(h),l=h.slice(-1)}return r.pop(),o.join("")}function Vy(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(Hy(a,i[l+1],e,t)))}return r.pop(),s.join("")}function Hy(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 By=/\r?\n|\r/g;function zy(e,t){const n=[];let r=0,i=0,o;for(;o=By.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 jy(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(!Hp(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(Uy);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(Fd(r.slice(a,c),"\\")),a=c,/[!-/:-@[-`{-~]/.test(r.charAt(c))&&(!n.encode||!n.encode.includes(r.charAt(c)))?o.push("\\"):(o.push(In(r.charCodeAt(c))),a++))}return o.push(Fd(r.slice(a,u),n.after)),o.join("")}function Uy(e,t){return e-t}function Fd(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 Wy(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 rg(e,t){const n=t||{},r={associationId:Oy,containerPhrasing:Gy,containerFlow:qy,createTracker:Wy,compilePattern:$y,enter:o,handlers:{...eg},handle:void 0,indentLines:zy,indexStack:[],join:[...Ly],options:{},safe:Yy,stack:[],unsafe:[...Py]};Vp(r,n),r.options.tightDefinitions&&r.join.push(Zy),r.handle=B2("type",{invalid:Jy,unknown:Ky,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 Jy(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function Ky(e){const t=e;throw new Error("Cannot handle unknown node `"+t.type+"`")}function Zy(e,t){if(e.type==="definition"&&e.type===t.type)return 0}function Gy(e,t){return Dy(e,this,t)}function qy(e,t){return Vy(e,this,t)}function Yy(e,t){return jy(this,e,t)}const Xy=["mdxJsxTextElement","mdxJsxFlowElement"];function ig(e){return Xy.includes(e.type)&&Qy.includes(e.name.toLowerCase())}const Qy=["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 e_(e,t){const n=Pd(e),r=Pd(t),i={...n,...r};return t_(i)}function Pd(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 t_(e){return Object.entries(e).map(([t,n])=>`${t}: ${n}`).join("; ")}function n_(e){return e.children instanceof Array}function r_({root:e,visitors:t,jsxComponentDescriptors:n,jsxIsAvailable:r,addImportStatements:i=!0}){let o=null;const s=new Set;t=t.sort((_,y)=>(y.priority??0)-(_.priority??0)),c(e,null);function l(_){s.add(_)}function a(_,y){if(o===null)return o=y,o;if(!n_(_))throw new Error("Attempting to append children to a non-parent");const g=_.children,m=g.at(-1);if(m){const v=t.find(k=>{var b;return(b=k.shouldJoin)==null?void 0:b.call(k,m,y)});if(v){const k=v.join(m,y);return g.splice(g.length-1,1,k),k}}return g.push(y),y}function u(_,y){_.getChildren().forEach(g=>{c(g,y)})}function c(_,y){var g;const m=t.find(v=>{var k;return(k=v.testLexicalNode)==null?void 0:k.call(v,_)});if(!m)throw new Error(`no lexical visitor found for ${_.getType()}`,{cause:_});(g=m.visitLexicalNode)==null||g.call(m,{lexicalNode:_,mdastParent:y,actions:{addAndStepInto(v,k={},b=!0){const C={type:v,...k,...b?{children:[]}:{}};a(y,C),O(_)&&b&&u(_,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 _ of s){const y=n.find(g=>g.name===_)??n.find(g=>g.name==="*");if(!y)throw new Error(`Component ${_} is used but not imported`);if(y.source)if(y.defaultExport)h.set(_,y.source);else{const{source:g}=y,m=d.get(g);m?m.push(_):d.set(g,[_])}}const f=Array.from(d).map(([_,y])=>({type:"mdxjsEsm",value:`import { ${y.join(", ")} } from '${_}'`}));f.push(...Array.from(h).map(([_,y])=>({type:"mdxjsEsm",value:`import ${_} from '${y}'`})));const p=o,x=p.children.find(_=>_.type==="yaml");return i&&(x?p.children.splice(p.children.indexOf(x)+1,0,...f):p.children.unshift(...f)),oo(p,[]),og(p),r||sg(p),p}function og(e){if("children"in e&&e.children.length>0){if(ig(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=e_(r.value,n.value));else e.attributes.push(n)}}),e.children=t.children)}e.children.forEach(t=>{og(t)})}}function sg(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),sg(r))}),t.children=n}}const Md=/\s+$/,Rd=/^\s+/;function oo(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(Md);if(i){n.value=n.value.replace(Md,"");const o=t.at(-1);o&&(o.children.splice(o.children.indexOf(e)+1,0,{type:"text",value:i[0]}),oo(o,t.slice(0,-1)))}}const r=e.children.at(0);if((r==null?void 0:r.type)==="text"){const i=r.value.match(Rd);if(i){r.value=r.value.replace(Rd,"");const o=t.at(-1);o&&(o.children.splice(o.children.indexOf(e),0,{type:"text",value:i[0]}),oo(o,t.slice(0,-1)))}}}if("children"in e&&e.children.length>0){const n=e;n.children.forEach(r=>{oo(r,[...t,n])})}}function i_({root:e,toMarkdownOptions:t,toMarkdownExtensions:n,visitors:r,jsxComponentDescriptors:i,jsxIsAvailable:o}){return rg(r_({root:e,visitors:r,jsxComponentDescriptors:i,jsxIsAvailable:o}),{extensions:n,...t})+`
|
|
60
|
+
`}const Od={}.hasOwnProperty;function o_(e){const t={};let n=-1;for(;++n<e.length;)s_(t,e[n]);return t}function s_(e,t){let n;for(n in t){const i=(Od.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){Od.call(i,s)||(i[s]=[]);const l=o[s];l_(i[s],Array.isArray(l)?l:l?[l]:[])}}}function l_(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);xt(e,0,0,r)}function wr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const a_={tokenize:u_};function u_(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 c_={tokenize:d_},$d={tokenize:f_};function d_(e){const t=this,n=[];let r=0,i,o,s;return l;function l(m){if(r<n.length){const v=n[r];return t.containerState=v[1],e.attempt(v[0].continuation,a,u)(m)}return u(m)}function a(m){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&g();const v=t.events.length;let k=v,b;for(;k--;)if(t.events[k][0]==="exit"&&t.events[k][1].type==="chunkFlow"){b=t.events[k][1].end;break}y(r);let C=v;for(;C<t.events.length;)t.events[C][1].end={...b},C++;return xt(t.events,k+1,0,t.events.slice(v)),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($d,c,d)(m)}function c(m){return i&&g(),y(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($d,f,p)(m)}function f(m){return r++,n.push([t.currentConstruct,t.containerState]),h(m)}function p(m){if(m===null){i&&g(),y(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){_(e.exit("chunkFlow"),!0),y(0),e.consume(m);return}return te(m)?(e.consume(m),_(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(m),x)}function _(m,v){const k=t.sliceStream(m);if(v&&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 b=i.events.length;for(;b--;)if(i.events[b][1].start.offset<s&&(!i.events[b][1].end||i.events[b][1].end.offset>s))return;const C=t.events.length;let E=C,I,P;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){if(I){P=t.events[E][1].end;break}I=!0}for(y(r),b=C;b<t.events.length;)t.events[b][1].end={...P},b++;xt(t.events,E+1,0,t.events.slice(C)),t.events.length=b}}function y(m){let v=n.length;for(;v-- >m;){const k=n[v];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 f_(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 ea={name:"attention",resolveAll:h_,tokenize:p_};function h_(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};Dd(d,-a),Dd(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=yt(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=yt(u,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),u=yt(u,_s(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=yt(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=yt(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,xt(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 p_(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Er(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=Er(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 Dd(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const g_={name:"autolink",tokenize:m_};function m_(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 Dt(f)?(e.consume(f),s):f===64?n(f):u(f)}function s(f){return f===43||f===45||f===46||It(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||It(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||Gl(f)?n(f):(e.consume(f),a)}function u(f){return f===64?(e.consume(f),c):Bx(f)?(e.consume(f),u):n(f)}function c(f){return It(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||It(f))&&r++<63){const p=f===45?h:d;return e.consume(f),p}return n(f)}}const bs={partial:!0,tokenize:x_};function x_(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 lg={continuation:{tokenize:__},exit:v_,name:"blockQuote",tokenize:y_};function y_(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 __(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(lg,t,n)(s)}}function v_(e){e.exit("blockQuote")}const ag={name:"characterEscape",tokenize:b_};function b_(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 jx(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const ug={name:"characterReference",tokenize:C_};function C_(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=It,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=zx,c):(e.enter("characterReferenceValue"),o=7,s=ql,c(d))}function c(d){if(d===59&&i){const h=e.exit("characterReferenceValue");return s===It&&!_i(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 Vd={partial:!0,tokenize:k_},Hd={concrete:!0,name:"codeFenced",tokenize:w_};function w_(e,t,n){const r=this,i={partial:!0,tokenize:k};let o=0,s=0,l;return a;function a(b){return u(b)}function u(b){const C=r.events[r.events.length-1];return o=C&&C[1].type==="linePrefix"?C[2].sliceSerialize(C[1],!0).length:0,l=b,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(b)}function c(b){return b===l?(s++,e.consume(b),c):s<3?n(b):(e.exit("codeFencedFenceSequence"),ge(b)?xe(e,d,"whitespace")(b):d(b))}function d(b){return b===null||te(b)?(e.exit("codeFencedFence"),r.interrupt?t(b):e.check(Vd,x,v)(b)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(b))}function h(b){return b===null||te(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(b)):ge(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),xe(e,f,"whitespace")(b)):b===96&&b===l?n(b):(e.consume(b),h)}function f(b){return b===null||te(b)?d(b):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===null||te(b)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(b)):b===96&&b===l?n(b):(e.consume(b),p)}function x(b){return e.attempt(i,v,_)(b)}function _(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),y}function y(b){return o>0&&ge(b)?xe(e,g,"linePrefix",o+1)(b):g(b)}function g(b){return b===null||te(b)?e.check(Vd,x,v)(b):(e.enter("codeFlowValue"),m(b))}function m(b){return b===null||te(b)?(e.exit("codeFlowValue"),g(b)):(e.consume(b),m)}function v(b){return e.exit("codeFenced"),t(b)}function k(b,C,E){let I=0;return P;function P(B){return b.enter("lineEnding"),b.consume(B),b.exit("lineEnding"),M}function M(B){return b.enter("codeFencedFence"),ge(B)?xe(b,R,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):R(B)}function R(B){return B===l?(b.enter("codeFencedFenceSequence"),L(B)):E(B)}function L(B){return B===l?(I++,b.consume(B),L):I>=s?(b.exit("codeFencedFenceSequence"),ge(B)?xe(b,K,"whitespace")(B):K(B)):E(B)}function K(B){return B===null||te(B)?(b.exit("codeFencedFence"),C(B)):E(B)}}}function k_(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 il={name:"codeIndented",tokenize:E_},S_={partial:!0,tokenize:T_};function E_(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(S_,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 T_(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 I_={name:"codeText",previous:N_,resolve:A_,tokenize:L_};function A_(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 N_(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function L_(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 F_{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&&Wr(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),Wr(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Wr(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);Wr(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Wr(this.left,n.reverse())}}}function Wr(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 cg(e){const t={};let n=-1,r,i,o,s,l,a,u;const c=new F_(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,P_(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 xt(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function P_(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 _=[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,_.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):_.pop(),h=_.length;h--;){const y=l.slice(_[h],_[h+1]),g=o.pop();a.push([g,g+y.length-1]),e.splice(g,2,y)}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 M_={resolve:O_,tokenize:$_},R_={partial:!0,tokenize:D_};function O_(e){return cg(e),e}function $_(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(R_,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 D_(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 dg(e,t,n,r,i,o,s,l,a){const u=a||Number.POSITIVE_INFINITY;let c=0;return d;function d(y){return y===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(y),e.exit(o),h):y===null||y===32||y===41||Gl(y)?n(y):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),x(y))}function h(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),f(y))}function f(y){return y===62?(e.exit("chunkString"),e.exit(l),h(y)):y===null||y===60||te(y)?n(y):(e.consume(y),y===92?p:f)}function p(y){return y===60||y===62||y===92?(e.consume(y),f):f(y)}function x(y){return!c&&(y===null||y===41||Me(y))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(y)):c<u&&y===40?(e.consume(y),c++,x):y===41?(e.consume(y),c--,x):y===null||y===32||y===40||Gl(y)?n(y):(e.consume(y),y===92?_:x)}function _(y){return y===40||y===41||y===92?(e.consume(y),x):x(y)}}function fg(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 hg(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 oi(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 V_={name:"definition",tokenize:B_},H_={partial:!0,tokenize:z_};function B_(e,t,n){const r=this;let i;return o;function o(f){return e.enter("definition"),s(f)}function s(f){return fg.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function l(f){return i=wr(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)?oi(e,u)(f):u(f)}function u(f){return dg(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function c(f){return e.attempt(H_,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 z_(e,t,n){return r;function r(l){return Me(l)?oi(e,i)(l):n(l)}function i(l){return hg(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 j_={name:"hardBreakEscape",tokenize:U_};function U_(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 W_={name:"headingAtx",resolve:J_,tokenize:K_};function J_(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"},xt(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function K_(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 Z_=["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"],Bd=["pre","script","style","textarea"],G_={concrete:!0,name:"htmlFlow",resolveTo:X_,tokenize:Q_},q_={partial:!0,tokenize:tv},Y_={partial:!0,tokenize:ev};function X_(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 Q_(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):Dt(A)?(e.consume(A),s=String.fromCharCode(A),_):n(A)}function h(A){return A===45?(e.consume(A),i=2,f):A===91?(e.consume(A),i=5,l=0,p):Dt(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 Dt(A)?(e.consume(A),s=String.fromCharCode(A),_):n(A)}function _(A){if(A===null||A===47||A===62||Me(A)){const ue=A===47,he=s.toLowerCase();return!ue&&!o&&Bd.includes(he)?(i=1,r.interrupt?t(A):R(A)):Z_.includes(s.toLowerCase())?(i=6,ue?(e.consume(A),y):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||It(A)?(e.consume(A),s+=String.fromCharCode(A),_):n(A)}function y(A){return A===62?(e.consume(A),r.interrupt?t:R):n(A)}function g(A){return ge(A)?(e.consume(A),g):P(A)}function m(A){return A===47?(e.consume(A),P):A===58||A===95||Dt(A)?(e.consume(A),v):ge(A)?(e.consume(A),m):P(A)}function v(A){return A===45||A===46||A===58||A===95||It(A)?(e.consume(A),v):k(A)}function k(A){return A===61?(e.consume(A),b):ge(A)?(e.consume(A),k):m(A)}function b(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),b):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 P(A){return A===62?(e.consume(A),M):n(A)}function M(A){return A===null||te(A)?R(A):ge(A)?(e.consume(A),M):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(q_,ee,L)(A)):A===null||te(A)?(e.exit("htmlFlowData"),L(A)):(e.consume(A),R)}function L(A){return e.check(Y_,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)?L(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 Bd.includes(ue)?(e.consume(A),se):R(A)}return Dt(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 ev(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 tv(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(bs,t,n)}}const nv={name:"htmlText",tokenize:rv};function rv(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):Dt(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):Dt(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),_):te(N)?(s=x,Z(N)):(e.consume(N),x)}function _(N){return N===93?(e.consume(N),y):x(N)}function y(N){return N===62?Q(N):N===93?(e.consume(N),y):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),v):te(N)?(s=m,Z(N)):(e.consume(N),m)}function v(N){return N===62?Q(N):m(N)}function k(N){return Dt(N)?(e.consume(N),b):n(N)}function b(N){return N===45||It(N)?(e.consume(N),b):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||It(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||Dt(N)?(e.consume(N),P):te(N)?(s=I,Z(N)):ge(N)?(e.consume(N),I):Q(N)}function P(N){return N===45||N===46||N===58||N===95||It(N)?(e.consume(N),P):M(N)}function M(N){return N===61?(e.consume(N),R):te(N)?(s=M,Z(N)):ge(N)?(e.consume(N),M):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,L):te(N)?(s=R,Z(N)):ge(N)?(e.consume(N),R):(e.consume(N),K)}function L(N){return N===i?(e.consume(N),i=void 0,B):N===null?n(N):te(N)?(s=L,Z(N)):(e.consume(N),L)}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 Eu={name:"labelEnd",resolveAll:lv,resolveTo:av,tokenize:uv},iv={tokenize:cv},ov={tokenize:dv},sv={tokenize:fv};function lv(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&&xt(e,0,e.length,n),e}function av(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=yt(l,e.slice(o+1,o+r+3)),l=yt(l,[["enter",c,t]]),l=yt(l,_s(t.parser.constructs.insideSpan.null,e.slice(o+r+4,s-3),t)),l=yt(l,[["exit",c,t],e[s-2],e[s-1],["exit",u,t]]),l=yt(l,e.slice(s+1)),l=yt(l,[["exit",a,t]]),xt(e,o,e.length,l),e}function uv(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(wr(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(iv,c,s?c:d)(h):h===91?e.attempt(ov,c,s?u:d)(h):s?c(h):d(h)}function u(h){return e.attempt(sv,c,d)(h)}function c(h){return t(h)}function d(h){return o._balanced=!0,n(h)}}function cv(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)?oi(e,o)(d):o(d)}function o(d){return d===41?c(d):dg(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return Me(d)?oi(e,a)(d):c(d)}function l(d){return n(d)}function a(d){return d===34||d===39||d===40?hg(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function u(d){return Me(d)?oi(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 dv(e,t,n){const r=this;return i;function i(l){return fg.call(r,e,o,s,"reference","referenceMarker","referenceString")(l)}function o(l){return r.parser.defined.includes(wr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function fv(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 hv={name:"labelStartImage",resolveAll:Eu.resolveAll,tokenize:pv};function pv(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 gv={name:"labelStartLink",resolveAll:Eu.resolveAll,tokenize:mv};function mv(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 ol={name:"lineEnding",tokenize:xv};function xv(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),xe(e,t,"linePrefix")}}const so={name:"thematicBreak",tokenize:yv};function yv(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 it={continuation:{tokenize:Cv},exit:kv,name:"list",tokenize:bv},_v={partial:!0,tokenize:Sv},vv={partial:!0,tokenize:wv};function bv(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:ql(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(so,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 ql(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(bs,r.interrupt?n:c,e.attempt(_v,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 Cv(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(bs,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(vv,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,xe(e,e.attempt(it,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function wv(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 kv(e){e.exit(this.containerState.type)}function Sv(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 zd={name:"setextUnderline",resolveTo:Ev,tokenize:Tv};function Ev(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 Tv(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 Iv={tokenize:Av};function Av(e){const t=this,n=e.attempt(bs,r,e.attempt(this.parser.constructs.flowInitial,i,xe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(M_,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 Nv={resolveAll:gg()},Lv=pg("string"),Fv=pg("text");function pg(e){return{resolveAll:gg(e==="text"?Pv: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 gg(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 Pv(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 Mv={42:it,43:it,45:it,48:it,49:it,50:it,51:it,52:it,53:it,54:it,55:it,56:it,57:it,62:lg},Rv={91:V_},Ov={[-2]:il,[-1]:il,32:il},$v={35:W_,42:so,45:[zd,so],60:G_,61:zd,95:so,96:Hd,126:Hd},Dv={38:ug,92:ag},Vv={[-5]:ol,[-4]:ol,[-3]:ol,33:hv,38:ug,42:ea,60:[g_,nv],91:gv,92:[j_,ag],93:Eu,95:ea,96:I_},Hv={null:[ea,Nv]},Bv={null:[42,95]},zv={null:[]},jv=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Bv,contentInitial:Rv,disable:zv,document:Mv,flow:$v,flowInitial:Ov,insideSpan:Hv,string:Dv,text:Vv},Symbol.toStringTag,{value:"Module"}));function Uv(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(b),consume:g,enter:m,exit:v,interrupt:C(b,{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(M){return s=yt(s,M),_(),s[s.length-1]!==null?[]:(E(t,0),u.events=_s(o,u.events,u),u.events)}function h(M,R){return Jv(f(M),R)}function f(M){return Wv(s,M)}function p(){const{_bufferIndex:M,_index:R,line:L,column:K,offset:B}=r;return{_bufferIndex:M,_index:R,line:L,column:K,offset:B}}function x(M){i[M.line]=M.column,P()}function _(){let M;for(;r._index<s.length;){const R=s[r._index];if(typeof R=="string")for(M=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===M&&r._bufferIndex<R.length;)y(R.charCodeAt(r._bufferIndex));else y(R)}}function y(M){c=c(M)}function g(M){te(M)?(r.line++,r.column=1,r.offset+=M===-3?2:1,P()):M!==-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=M}function m(M,R){const L=R||{};return L.type=M,L.start=p(),u.events.push(["enter",L,u]),l.push(L),L}function v(M){const R=l.pop();return R.end=p(),u.events.push(["exit",R,u]),R}function k(M,R){E(M,R.from)}function b(M,R){R.restore()}function C(M,R){return L;function L(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 M(ce,N),B}function he(oe){return N.restore(),++ne<Z.length?A(Z[ne]):Q}}}function E(M,R){M.resolveAll&&!o.includes(M)&&o.push(M),M.resolve&&xt(u.events,R,u.events.length-R,M.resolve(u.events.slice(R),u)),M.resolveTo&&(u.events=M.resolveTo(u.events,u))}function I(){const M=p(),R=u.previous,L=u.currentConstruct,K=u.events.length,B=Array.from(l);return{from:K,restore:Q};function Q(){r=M,u.previous=R,u.currentConstruct=L,u.events.length=K,l=B,P()}}function P(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Wv(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 Jv(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 Kv(e){const r={constructs:o_([jv,...(e||{}).extensions||[]]),content:i(a_),defined:[],document:i(c_),flow:i(Iv),lazy:{},string:i(Lv),text:i(Fv)};return r;function i(o){return s;function s(l){return Uv(r,o,l)}}}function Zv(e){for(;!cg(e););return e}const jd=/[\0\t\n\r]/g;function Gv(){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(jd.lastIndex=d,u=jd.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 mg={}.hasOwnProperty;function qv(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Yv(n)(Zv(Kv(n).document().write(Gv()(e,t,!0))))}function Yv(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(ht),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(pn),label:s,link:o(ht),listItem:o(et),listItemValue:h,listOrdered:o(Ot,d),listUnordered:o(Ot),paragraph:o(Bn),reference:A,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(je),strong:o(bt),thematicBreak:o(pt)},exit:{atxHeading:a(),atxHeadingSequence:k,autolink:a(),autolinkEmail:q,autolinkProtocol:j,blockQuote:a(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:he,characterReferenceMarkerNumeric:he,characterReferenceValue:oe,characterReference:H,codeFenced:a(_),codeFencedFence:x,codeFencedFenceInfo:f,codeFencedFenceMeta:p,codeFlowValue:P,codeIndented:a(y),codeText:a(B),codeTextData:P,data:P,definition:a(),definitionDestinationString:v,definitionLabelString:g,definitionTitleString:m,emphasis:a(),hardBreakEscape:a(R),hardBreakTrailing:a(R),htmlFlow:a(L),htmlFlowData:P,htmlText:a(K),htmlTextData:P,image:a(Z),label:ce,labelText:ne,lineEnding:M,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:b,strong:a(),thematicBreak:a()}};xg(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 Se=le.pop();fe=i($,Se,fe)}for(fe=-1;++fe<$.length;){const Se=t[$[fe][0]];mg.call(Se,$[fe][1].type)&&Se[$[fe][1].type].call(Object.assign({sliceSerialize:$[fe][2].sliceSerialize},S),$[fe][1])}if(S.tokenStack.length>0){const Se=S.tokenStack[S.tokenStack.length-1];(Se[1]||Ud).call(S,void 0,Se[0])}for(V.position={start:mn($.length>0?$[0][1].start:{line:1,column:1,offset:0}),end:mn($.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,Se=!1,Jt,Kt,Dr,Vr;for(;++le<=S;){const gt=$[le];switch(gt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{gt[0]==="enter"?fe++:fe--,Vr=void 0;break}case"lineEndingBlank":{gt[0]==="enter"&&(Jt&&!Vr&&!fe&&!Dr&&(Dr=le),Vr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Vr=void 0}if(!fe&>[0]==="enter"&>[1].type==="listItemPrefix"||fe===-1&>[0]==="exit"&&(gt[1].type==="listUnordered"||gt[1].type==="listOrdered")){if(Jt){let cr=le;for(Kt=void 0;cr--;){const Zt=$[cr];if(Zt[1].type==="lineEnding"||Zt[1].type==="lineEndingBlank"){if(Zt[0]==="exit")continue;Kt&&($[Kt][1].type="lineEndingBlank",Se=!0),Zt[1].type="lineEnding",Kt=cr}else if(!(Zt[1].type==="linePrefix"||Zt[1].type==="blockQuotePrefix"||Zt[1].type==="blockQuotePrefixWhitespace"||Zt[1].type==="blockQuoteMarker"||Zt[1].type==="listItemIndent"))break}Dr&&(!Kt||Dr<Kt)&&(Jt._spread=!0),Jt.end=Object.assign({},Kt?$[Kt][1].start:gt[1].end),$.splice(Kt||le,0,["exit",Jt,gt[2]]),le++,S++}if(gt[1].type==="listItemPrefix"){const cr={type:"listItem",_spread:!1,start:Object.assign({},gt[1].start),end:void 0};Jt=cr,$.splice(le,0,["enter",cr,gt[2]]),le++,S++,Dr=void 0,Vr=!0}}}return $[V][1]._spread=Se,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:mn(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]||Ud).call(this,$,le[0]));else throw new Error("Cannot close `"+$.type+"` ("+tn({start:$.start,end:$.end})+"): it’s not open");S.position.end=mn($.end)}function c(){return ku(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 _(){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 y(){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=wr(this.sliceSerialize($)).toLowerCase()}function m(){const $=this.resume(),V=this.stack[this.stack.length-1];V.title=$}function v(){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 b(){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=we(),le.position={start:mn($.start),end:void 0},S.push(le)),this.stack.push(le)}function P($){const V=this.stack.pop();V.value+=this.sliceSerialize($),V.position.end=mn($.end)}function M($){const V=this.stack[this.stack.length-1];if(this.data.atHardBreak){const S=V.children[V.children.length-1];S.position.end=mn($.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(V.type)&&(I.call(this,$),P.call(this,$))}function R(){this.data.atHardBreak=!0}function L(){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=ng(V),S.identifier=wr(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=wr(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=tg(V,S==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):le=_i(V);const fe=this.stack[this.stack.length-1];fe.value+=le}function H($){const V=this.stack.pop();V.position.end=mn($.end)}function j($){P.call(this,$);const V=this.stack[this.stack.length-1];V.url=this.sliceSerialize($)}function q($){P.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 pn(){return{type:"image",title:null,url:"",alt:null}}function ht(){return{type:"link",title:null,url:"",children:[]}}function Ot($){return{type:"list",ordered:$.type==="listOrdered",start:null,spread:$._spread,children:[]}}function et($){return{type:"listItem",spread:$._spread,checked:null,children:[]}}function Bn(){return{type:"paragraph",children:[]}}function bt(){return{type:"strong",children:[]}}function we(){return{type:"text",value:""}}function pt(){return{type:"thematicBreak"}}}function mn(e){return{line:e.line,column:e.column,offset:e.offset}}function xg(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?xg(e,r):Xv(e,r)}}function Xv(e,t){let n;for(n in t)if(mg.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 Ud(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+tn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+tn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+tn({start:t.start,end:t.end})+") is still open")}function qi(e){return e.children instanceof Array}class ta extends Error{constructor(t,n){super(t),this.name="MarkdownParseError",this.cause=n}}class na extends Error{constructor(t){super(t),this.name="UnrecognizedMarkdownConstructError"}}function Qv({root:e,markdown:t,visitors:n,syntaxExtensions:r,mdastExtensions:i,...o}){var s;let l;try{l=qv(t,{extensions:r,mdastExtensions:i})}catch(a){throw a instanceof Error?new ta(`Error parsing markdown: ${a.message}`,a):new ta(`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:[]}),eb({root:e,mdastRoot:l,visitors:n,...o})}function eb({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(!qi(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 na(`Unsupported markdown syntax: ${rg(l)}`)}catch{throw new na(`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),qi(l)&&o(l,d)},addFormatting(d,h){h||qi(l)&&(h=l),h&&i.set(h,d|(i.get(u)??0))},removeFormatting(d,h){h||qi(l)&&(h=l),h&&i.set(h,d^(i.get(u)??0))},getParentFormatting(){return i.get(u)??0}}})}s(t,e,null)}var tb=Object.defineProperty,nb=(e,t,n)=>t in e?tb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sl=(e,t,n)=>(nb(e,typeof t!="symbol"?t+"":t,n),n);const Wd="generic-html";class Oi extends Rt{constructor(t,n,r,i){super(i),sl(this,"__tag"),sl(this,"__nodeType"),sl(this,"__attributes"),this.__tag=t,this.__nodeType=n,this.__attributes=r}static getType(){return Wd}static clone(t){return new Oi(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=yg(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:Wd,version:1}}extractWithChild(){return!0}isInline(){return this.__nodeType==="mdxJsxTextElement"}}function yg(e,t,n){return ct(new Oi(e,t,n))}function rb(e){return e instanceof Oi}const ib={testLexicalNode:rb,visitLexicalNode({actions:e,lexicalNode:t}){e.addAndStepInto("mdxJsxTextElement",{name:t.getTag(),type:t.getNodeType(),attributes:t.getAttributes()})},priority:-100},ob={testLexicalNode:Nt,visitLexicalNode:({mdastParent:e,actions:t})=>{t.appendToParent(e,{type:"text",value:`
|
|
63
|
+
`})}},sb={testLexicalNode:vu,visitLexicalNode:({actions:e})=>{e.addAndStepInto("paragraph")}},lb={testLexicalNode:Ye,visitLexicalNode:({actions:e})=>{e.addAndStepInto("root")}},si=1,li=2,lo=4,ai=8,Tu=16,ao=32,uo=64;function Jd(e){return e.type==="text"}const ab=["u","span","sub","sup"],ub={shouldJoin:(e,t)=>{if(["text","emphasis","strong"].includes(e.type))return e.type===t.type;if(e.type==="mdxJsxTextElement"&&t.type==="mdxJsxTextElement"&&ab.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 Jd(e)&&Jd(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&li&&(a=n.appendToParent(a,{type:"emphasis",children:[]})),i&s&si&&(a=n.appendToParent(a,{type:"strong",children:[]})),i&s&ai&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"u",children:[],attributes:[]})),i&s&lo&&(a=n.appendToParent(a,{type:"delete",children:[]})),i&s&uo&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"sup",children:[],attributes:[]})),i&s&ao&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"sub",children:[],attributes:[]})),s&li&&!(i&li)&&(a=n.appendToParent(a,{type:"emphasis",children:[]})),s&si&&!(i&si)&&(a=n.appendToParent(a,{type:"strong",children:[]})),s&ai&&!(i&ai)&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"u",children:[],attributes:[]})),s&lo&&!(i&lo)&&(a=n.appendToParent(a,{type:"delete",children:[]})),s&uo&&!(i&uo)&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"sup",children:[],attributes:[]})),s&ao&&!(i&ao)&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"sub",children:[],attributes:[]})),s&Tu){n.appendToParent(a,{type:"inlineCode",value:o});return}n.appendToParent(a,{type:"text",value:o})}},cb={testNode:"break",visitNode:function({lexicalParent:e}){e.append(Ft())}};function Yi(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 db={testNode:"delete",visitNode({mdastNode:e,actions:t,lexicalParent:n}){t.addFormatting(lo),t.visitChildren(e,n)}},fb={testNode:"inlineCode",visitNode({mdastNode:e,actions:t}){t.addAndStepInto(Ae(e.value).setFormat(t.getParentFormatting()|Tu))}},hb={testNode:"emphasis",visitNode({mdastNode:e,actions:t,lexicalParent:n}){t.addFormatting(li),t.visitChildren(e,n)}},pb={testNode:"strong",visitNode({mdastNode:e,actions:t,lexicalParent:n}){t.addFormatting(si),t.visitChildren(e,n)}},gb=[hb,pb,...Yi("u",ai),...Yi("code",Tu),fb,db,...Yi("sup",uo),...Yi("sub",ao)],mb={testNode:ig,visitNode:function({mdastNode:e,actions:t}){t.addAndStepInto(yg(e.name,e.type,e.attributes))},priority:-100},xb=["listitem","quote","admonition"],yb={testNode:"paragraph",visitNode:function({mdastNode:e,lexicalParent:t,actions:n}){xb.includes(t.getType())?n.visitChildren(e,t):n.addAndStepInto(_e())}},_b={testNode:"root",visitNode({actions:e,mdastNode:t,lexicalParent:n}){e.visitChildren(t,n)}},vb={testNode:"text",visitNode({mdastNode:e,actions:t}){t.addAndStepInto(Ae(e.value).setFormat(t.getParentFormatting()))}},bb=()=>w.createElement(Cx,{externalHistoryState:vt(Kb)}),wt={eof:null,exclamationMark:33,dash:45,greaterThan:62},Un={data:"data",lineEnding:"lineEnding",linePrefix:"linePrefix"};function Cb(e){return{canContainEols:["comment"],enter:{comment(t){this.buffer()}},exit:{comment(t){this.resume()}}}}const Kd=(e,t,n)=>{return r;function r(p){return e.enter("comment"),e.consume(p),i}function i(p){return p===wt.exclamationMark?(e.consume(p),o):n(p)}function o(p){return p===wt.dash?(e.consume(p),s):n(p)}function s(p){return p===wt.dash?(e.consume(p),l):n(p)}function l(p){return p===wt.greaterThan?n(p):te(p)?c(p):(e.enter(Un.data),p===wt.dash?(e.consume(p),a):u(p))}function a(p){return p===wt.greaterThan?n(p):u(p)}function u(p){return p===wt.eof?n(p):p===wt.dash?(e.consume(p),h):te(p)?(e.exit(Un.data),c(p)):(e.consume(p),u)}function c(p){return e.enter(Un.lineEnding),e.consume(p),e.exit(Un.lineEnding),xe(e,d,Un.linePrefix)}function d(p){return te(p)?c(p):(e.enter(Un.data),u(p))}function h(p){return p===wt.dash?(e.consume(p),f):u(p)}function f(p){return p===wt.greaterThan?(e.exit(Un.data),e.enter("commentEnd"),e.consume(p),e.exit("commentEnd"),e.exit("comment"),t(p)):p===wt.dash?(e.consume(p),f):u(p)}},wb={flow:{60:{tokenize:Kd,concrete:!0}},text:{60:{tokenize:Kd}}},kb="_bold_1tncs_10",Sb="_italic_1tncs_14",Eb="_underline_1tncs_18",Tb="_strikethrough_1tncs_34",Ib="_underlineStrikethrough_1tncs_38",Ab="_subscript_1tncs_42",Nb="_superscript_1tncs_47",Lb="_code_1tncs_52",Fb="_nestedListItem_1tncs_59",Pb="_listitem_1tncs_69",Mb="_listItemChecked_1tncs_73",Rb="_listItemUnchecked_1tncs_74",Ob="_admonitionDanger_1tncs_151",$b="_admonitionInfo_1tncs_152",Db="_admonitionNote_1tncs_153",Vb="_admonitionTip_1tncs_154",Hb="_admonitionCaution_1tncs_155",Ze={bold:kb,italic:Sb,underline:Eb,strikethrough:Tb,underlineStrikethrough:Ib,subscript:Ab,superscript:Nb,code:Lb,nestedListItem:Fb,listitem:Pb,listItemChecked:Mb,listItemUnchecked:Rb,admonitionDanger:Ob,admonitionInfo:$b,admonitionNote:Db,admonitionTip:Vb,admonitionCaution:Hb},Iu={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}},Au=cn(),Pn=re(null),$e=re(null),ra=re(""),ia=re(!0),ln=re(!1,e=>{e.sub(e.pipe(ln,Le(Pn)),([t,n])=>{n==null||n.setEditable(!t)})}),oa=re(""),Zd=re(!1),vi=re(!1),_g=re(0),Po=re(null),sa=ze(e=>{e.link(e.pipe(Po,Ci(t=>t!==null)),sa)}),vg=ze(e=>{e.sub(e.pipe(vg,Le($e)),([t,n])=>{n==null||n.dispatchCommand(en,t)})}),Tr=re(null,e=>{e.sub(e.pipe(Tr,Le($e)),([t,n])=>{if(!t||!n)return;const r=t.anchor.getNode();let i=r.getKey()==="root"?r:or(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=ys(i)?i.getTag():i.getType();e.pub(Hg,l)}})}),bg=re(""),er=re(""),Cs=ze(e=>{e.link(er,Cs),e.link(bg,er)}),la=ze(e=>{e.link(e.pipe(Cs,Le(da),Ci(([,t])=>!t),xr(([t])=>t)),la)}),Cg=re([]),wg=re([]),kg=re([]),Sg=re([]),Eg=re([]),Tg=re([]),aa=re({}),Bb=re(!1),Ig=re([]),zb=re([]),Nu=re([]),$i=re(null),jb=re(null),sr=ft(wg),An=ft(Cg),ua=ft(kg),ca=ft(Sg),lr=ft(Eg),Ag=ft(Tg),da=re(!1),Lu=ze(e=>{e.sub(e.pipe(Lu,Le(er,Pn,vi),Ci(([t,n])=>t.trim()!==n.trim())),([t,,n,r])=>{e.pub(da,!0),n==null||n.update(()=>{Te().clear(),Fu(e,Te(),t),r?n.focus():qe(null)},{onUpdate:()=>{e.pub(da,!1)}})})}),Ng=ze(e=>{e.sub(e.pipe(Ng,Le($e,vi)),([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()}};Fu(e,o,t),Pr(o.children)}r?n.focus():qe(null)})})});function Lg(){return Ch((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 Fg=re([],e=>{e.pipe(e.combine(Fg,$e),Lg())}),Pg=re([],e=>{e.pipe(e.combine(Pg,Pn),Lg())}),Ub=re(null),fa=ze(),Mn=re(e=>{throw new Error(`No icon component for ${e}`)});function ft(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 Mg(e){const t=U();D(t)&&e.pubIn({[Tr]:t,[_g]:t.format})}const Rg=ft(Pg,(e,t)=>{e.pub(t,[n=>n.registerCommand(wi,(r,i)=>(e.pubIn({[$e]:i,[vi]:!0}),i._parentEditor===null&&i.getEditorState().read(()=>{e.pub(Ub,{rootNode:Te(),editorType:"lexical"})}),Mg(e),!1),sn),n=>n.registerUpdateListener(({dirtyElements:r,dirtyLeaves:i,editorState:o})=>{if(e.getValue(Po)!==null||r.size===0&&i.size===0)return;let l;o.read(()=>{Te().getLastChild()instanceof Fi&&n.update(()=>{Te().append(_e())},{discrete:!0}),l=i_({root:Te(),visitors:e.getValue(Eg),jsxComponentDescriptors:e.getValue(Ig),toMarkdownExtensions:e.getValue(Tg),toMarkdownOptions:e.getValue(aa),jsxIsAvailable:e.getValue(Bb)})}),e.pub(er,l.trim())}),n=>n.registerCommand(Th,()=>(e.pub(vi,!0),!1),sn)])}),Mo=ft(Fg,(e,t)=>{e.pub(t,[n=>n.registerUpdateListener(({editorState:r})=>{r.read(()=>{Mg(e)})}),n=>n.registerCommand(Ih,r=>{var i;const o=e.getValue(Pn);return o&&!((i=o.getRootElement())!=null&&i.contains(r.relatedTarget))&&e.pubIn({[vi]:!1,[fa]:r}),!1},sn)])});function Fu(e,t,n){try{Qv({root:t,visitors:e.getValue(Cg),mdastExtensions:e.getValue(Sg),markdown:n,syntaxExtensions:e.getValue(kg),jsxComponentDescriptors:e.getValue(Ig),directiveDescriptors:e.getValue(zb),codeBlockEditorDescriptors:e.getValue(Nu)}),e.pub(Po,null)}catch(r){if(r instanceof ta||r instanceof na)e.pubIn({[er]:n,[Po]:{error:r.message,source:n}});else throw r}}const Og=re([]),ar=ft(Og),$g=re([]),Wb=ft($g),Dg=re([]);ft(Dg);const Jb=re([]),Vg=ft(Jb),Kb=re(Ep()),Hg=re("");ze();const Ro=ze(e=>{e.sub(e.pipe(Ro,Le($e)),([t,n])=>{n==null||n.update(()=>{const r=U();D(r)&&(ox(r,t),setTimeout(()=>{n.focus()}))})})}),Bg=ze(e=>{e.sub(e.pipe(Bg,Le($e)),([t,n])=>{n==null||n.focus(()=>{n.getEditorState().read(()=>{const r=U();D(r)&&(n.update(()=>{const i=t();i.isInline()?(Pr([i]),Ve(i.getParentOrThrow())&&bu(i,_e).selectEnd()):Sp(i),setTimeout(()=>{"select"in i&&typeof i.select=="function"&&i.select()})}),setTimeout(()=>{n.dispatchCommand(Au,void 0)}))})},{defaultSelection:"rootEnd"})})}),ha=re("rich-text",e=>{function t(){return Ch((n,r)=>({current:n.next,next:r}),{current:"rich-text",next:"rich-text"})}e.sub(e.pipe(ha,t(),Le(Oo)),([{current:n},r])=>{(n==="source"||n==="diff")&&e.pub(Lu,r)}),e.sub(e.pipe(ha,t(),Ci(n=>n.current==="rich-text"),Le($e)),([,n])=>{n==null||n.dispatchCommand(Au,void 0)})}),Oo=re("",e=>{e.link(er,Oo),e.link(Oo,Cs)}),Pu=re([]),ws=ft(Pu),zg=re(()=>{throw new Error("No translation function provided")}),Gd=re(Iu),Zb=Wt({init(e,t){const n=(t==null?void 0:t.initialMarkdown)??"";e.register(Rg),e.register(Mo),e.register(Cs),e.pubIn({[bg]:t!=null&&t.trim?n.trim():n,[Mn]:t==null?void 0:t.iconComponentFor,[An]:[_b,yb,vb,cb,...gb],[sr]:[Mr,fn,Oi],[lr]:[lb,sb,ub,ob,ib],[ar]:bb,[ra]:t==null?void 0:t.contentEditableClassName,[ia]:t==null?void 0:t.spellCheck,[aa]:t==null?void 0:t.toMarkdownOptions,[Zd]:t==null?void 0:t.autoFocus,[oa]:t==null?void 0:t.placeholder,[ln]:t==null?void 0:t.readOnly,[zg]:t==null?void 0:t.translation,[ca]:Kx(),[ua]:Wx(),[Ag]:[g2(),Zx()],[Gd]:(t==null?void 0:t.lexicalTheme)??Iu}),e.singletonSub(sa,t==null?void 0:t.onError),e.singletonSub(la,t==null?void 0:t.onChange),e.singletonSub(fa,t==null?void 0:t.onBlur),t!=null&&t.suppressHtmlProcessing||e.pubIn({[ca]:[p2(),Cb()],[ua]:[V2(),H2(),wb],[An]:mb})},postInit(e,t){const n=ex({editable:(t==null?void 0:t.readOnly)!==!0,namespace:"MDXEditor",nodes:e.getValue(wg),onError:r=>{throw r},theme:e.getValue(Gd)});n.update(()=>{const r=(t==null?void 0:t.initialMarkdown.trim())??"";Fu(e,Te(),r);const i=t==null?void 0:t.autoFocus;if(i){if(i===!0){setTimeout(()=>{n.focus(yr,{defaultSelection:"rootStart"})});return}setTimeout(()=>{n.focus(yr,{defaultSelection:i.defaultSelection??"rootStart"})})}}),e.pub(Pn,n),e.pub($e,n)},update(e,t){e.pubIn({[ra]:t==null?void 0:t.contentEditableClassName,[ia]:t==null?void 0:t.spellCheck,[aa]:t==null?void 0:t.toMarkdownOptions,[Zd]:t==null?void 0:t.autoFocus,[oa]:t==null?void 0:t.placeholder,[ln]:t==null?void 0:t.readOnly}),e.singletonSub(la,t==null?void 0:t.onChange),e.singletonSub(fa,t==null?void 0:t.onBlur),e.singletonSub(sa,t==null?void 0:t.onError)}});function hn(){return vt(zg)}function Gb(){return Te().getTextContent()}function qb(e,t=!0){if(e)return!1;let n=Gb();return t&&(n=n.trim()),n===""}function Yb(e){if(!qb(e,!1))return!1;const t=Te().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(!vu(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 jg(e){return()=>Yb(e)}function Xb(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}Xb(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 Ug=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?T.useLayoutEffect:T.useEffect;function Qb({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:_="textbox",spellCheck:y=!0,style:g,tabIndex:m,"data-testid":v,...k},b){const[C,E]=T.useState(e.isEditable()),I=T.useCallback(M=>{M&&M.ownerDocument&&M.ownerDocument.defaultView?e.setRootElement(M):e.setRootElement(null)},[e]),P=T.useMemo(()=>function(...M){return R=>{M.forEach(L=>{typeof L=="function"?L(R):L!=null&&(L.current=R)})}}(b,I),[I,b]);return Ug(()=>(E(e.isEditable()),e.registerEditableListener(M=>{E(M)})),[e]),F.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&&_==="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":v,id:x,ref:P,role:C?_:void 0,spellCheck:y,style:g,tabIndex:m,...k})}const eC=T.forwardRef(Qb);function qd(e){return e.getEditorState().read(jg(e.isComposing()))}const tC=T.forwardRef(nC);function nC(e,t){const{placeholder:n,...r}=e,[i]=rt();return F.jsxs(F.Fragment,{children:[F.jsx(eC,{editor:i,...r,ref:t}),n!=null&&F.jsx(rC,{editor:i,content:n})]})}function rC({content:e,editor:t}){const n=function(s){const[l,a]=T.useState(()=>qd(s));return Ug(()=>{function u(){const c=qd(s);a(c)}return u(),dt(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:F.jsx("div",{"aria-hidden":!0,children:o})}function pa(e,t){return pa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},pa(e,t)}var Yd={error:null},iC=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=Yd,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,pa(t,n),r.getDerivedStateFromError=function(o){return{error:o}};var i=r.prototype;return i.reset=function(){this.setState(Yd)},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 oC({children:e,onError:t}){return F.jsx(iC,{fallback:F.jsx("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:t,children:e})}const sC=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?T.useLayoutEffect:T.useEffect;function lC(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}function aC(){return function(e){const[t]=rt(),n=T.useMemo(()=>e(t),[t,e]),[r,i]=T.useState(()=>n.initialValueFn()),o=T.useRef(r);return sC(()=>{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}(lC)}function uC(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 _=x.anchor;let y=_.getNode(),g=0,m=0;if(z(y)&&u>=0&&c>=0&&(g=u,m=u+c,x.setTextNodeRange(y,g,y,m)),g===m&&d===""||(x.insertRawText(d),y=_.getNode()),z(y)){g=h,m=h+f;const v=y.getTextContentSize();g=g>v?v:g,m=m>v?v:m,x.setTextNodeRange(y,g,y,m)}r.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}}const ga=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?T.useLayoutEffect:T.useEffect;function Xd(e){return e.getEditorState().read(jg(e.isComposing()))}function cC({contentEditable:e,placeholder:t=null,ErrorBoundary:n}){const[r]=rt(),i=function(o,s){const[l,a]=T.useState(()=>o.getDecorators());return ga(()=>o.registerDecoratorListener(u=>{ho.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=F.jsx(s,{onError:x=>o._onError(x),children:F.jsx(T.Suspense,{fallback:null,children:l[h]})}),p=o.getElementByKey(h);p!==null&&u.push(ho.createPortal(f,p,h))}return u},[s,l,o])}(r,n);return function(o){ga(()=>dt(Hx(o),uC(o)),[o])}(r),F.jsxs(F.Fragment,{children:[e,F.jsx(dC,{content:t}),i]})}function dC({content:e}){const[t]=rt(),n=function(i){const[o,s]=T.useState(()=>Xd(i));return ga(()=>{function l(){const a=Xd(i);s(a)}return l(),dt(i.registerUpdateListener(()=>{l()}),i.registerEditableListener(()=>{l()}))},[i]),o}(t),r=aC();return n?typeof e=="function"?e(r):e:null}var ll={exports:{}};/*!
|
|
64
|
+
Copyright (c) 2018 Jed Watson.
|
|
65
|
+
Licensed under the MIT License (MIT), see
|
|
66
|
+
http://jedwatson.github.io/classnames
|
|
67
|
+
*/var Qd;function fC(){return Qd||(Qd=1,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})()}(ll)),ll.exports}var hC=fC();const be=nh(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",vC="_toolbarToggleSingleGroup_uazmk_222",bC="_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:vC,toolbarButton:bC,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(Pn),n=w.useMemo(()=>[t,K0(null,Iu)],[t]);return w.createElement(wh.Provider,{value:n},e)},d9=()=>{const e=hn(),t=mt(jb),n=u=>{t({current:u})},[r,i,o,s,l,a]=un(ra,ia,Og,$g,Dg,oa);return w.createElement(w.Fragment,null,s.map((u,c)=>w.createElement(u,{key:c})),w.createElement(Wg,{wrappers:l},w.createElement("div",{className:be(G.rootContentEditableWrapper,"mdxeditor-root-contenteditable")},w.createElement(cC,{contentEditable:w.createElement("div",{ref:n},w.createElement(tC,{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:oC}))),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 Wg=({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(Wg,{wrappers:e.slice(1)},t))},g9=({children:e,className:t})=>{const n=w.useRef(null),r=mt($i);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=Go();return w.useImperativeHandle(e,()=>({getMarkdown:()=>t.getValue(ha)==="source"?t.getValue(Oo):t.getValue(er),setMarkdown:n=>{t.pub(Lu,n)},insertMarkdown:n=>{t.pub(Ng,n)},focus:(n,r)=>{var i;(i=t.getValue(Pn))==null||i.focus(n,r)}}),[t]),null},x9=w.forwardRef((e,t)=>w.createElement(U0,{plugins:[Zb({contentEditableClassName:e.contentEditableClassName??"",spellCheck:e.spellCheck??!0,initialMarkdown:e.markdown,onChange:e.onChange??yr,onBlur:e.onBlur??yr,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??yr,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}))),Jg=typeof window<"u"&&typeof window.document.createElement<"u",$o=Jg&&/Mac|iPod|iPhone|iPad/.test(navigator.platform);function y9(e,t){return $o?e:t}const _9={testLexicalNode:ys,visitLexicalNode:({lexicalNode:e,actions:t})=>{const n=parseInt(e.getTag()[1],10);t.addAndStepInto("heading",{depth:n})}},v9={testNode:"heading",visitNode:function({mdastNode:e,actions:t}){t.addAndStepInto(zt(`h${e.depth}`))}},b9=[48,49,50,51,52,53,54],Kg=[1,2,3,4,5,6],C9={49:1,50:2,51:3,52:4,53:5,54:6},ks=re(Kg,e=>{e.pub(Rg,t=>t.registerCommand(kh,n=>{const{keyCode:r,ctrlKey:i,metaKey:o,altKey:s}=n;return b9.includes(r)&&y9(o,i)&&s?(n.preventDefault(),t.update(()=>{if(r===48)e.pub(Ro,()=>_e());else{const l=e.getValue(ks),a=C9[r];l.includes(a)||e.pub(Ro,()=>zt(`h${a}`))}}),!0):!1},Ee))}),w9=Wt({init(e){e.pubIn({[ws]:"headings",[An]:v9,[sr]:Ri,[lr]:_9})},update(e,t){e.pub(ks,(t==null?void 0:t.allowedHeadingLevels)??Kg)}});function ef(e,t){return e.getEditorState().read(()=>{const n=Re(t);return n!==null&&n.isSelected()})}function Zg(e){const[t]=rt(),[n,r]=T.useState(()=>ef(t,e));return T.useEffect(()=>{let i=!0;const o=t.registerUpdateListener(()=>{i&&r(ef(t,e))});return()=>{i=!1,o()}},[t,e]),[n,T.useCallback(i=>{t.update(()=>{let o=U();He(o)||(o=jl(),qe(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 Gg=cn();function k9({nodeKey:e}){const[t]=rt(),[n,r,i]=Zg(e),o=T.useCallback(s=>{const l=U();return n&&He(l)&&(s.preventDefault(),t.update(()=>{l.getNodes().forEach(a=>{Mu(a)&&a.remove()})})),!1},[t,n]);return T.useEffect(()=>dt(t.registerCommand(qo,s=>{const l=t.getElementByKey(e);return s.target===l&&(s.shiftKey||i(),r(!n),!0)},Ee),t.registerCommand(es,o,Ee),t.registerCommand(Qo,o,Ee)),[i,t,n,e,o,r]),T.useEffect(()=>{const s=t.getElementByKey(e),l="selected";s!==null&&(n?Pt(s,l):ms(s,l))},[t,n,e]),null}let Ss=class qg extends Fi{static getType(){return"horizontalrule"}static clone(t){return new qg(t.__key)}static importJSON(t){return Di().updateFromJSON(t)}static importDOM(){return{hr:()=>({conversion:S9,priority:0})}}exportDOM(){return{element:document.createElement("hr")}}createDOM(t){const n=document.createElement("hr");return Pt(n,t.theme.hr),n}getTextContent(){return`
|
|
68
|
+
`}isInline(){return!1}updateDOM(){return!1}decorate(){return F.jsx(k9,{nodeKey:this.__key})}};function S9(){return{node:Di()}}function Di(){return ct(new Ss)}function Mu(e){return e instanceof Ss}function E9(){const[e]=rt();return T.useEffect(()=>e.registerCommand(Gg,t=>{const n=U();if(!D(n))return!1;if(n.focus.getNode()!==null){const r=Di();Sp(r)}return!0},pe),[e]),null}const T9={testLexicalNode:Mu,visitLexicalNode({actions:e}){e.addAndStepInto("thematicBreak")}},I9={testNode:"thematicBreak",visitNode({actions:e}){e.addAndStepInto(Di())}},A9=Nn(e=>{e.sub(e.pipe(A9,Le($e)),([,t])=>{t==null||t.dispatchCommand(Gg,void 0)})}),N9=Wt({init(e){e.pubIn({[An]:I9,[sr]:Ss,[lr]:T9,[ar]:E9})}});function L9(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vt=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 ma(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}Vt(40)}return t}return t}function xa(e){let t=e.getParent();ae(t)||Vt(40);let n=t;for(;n!==null;)n=n.getParent(),ae(n)&&(t=n);return t}function Yg(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(Yg(o)):t.push(i)}return t}function Ht(e){return me(e)&&ae(e.getFirstChild())}function tf(e){return Qe().append(e)}function Xg(e,t){return me(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}function ya(e,t){e.update(()=>{const n=U();if(n!==null){const r=n.getNodes();if(D(n)){const o=n.getStartEndPoints();o===null&&Vt(143);const[s]=o,l=s.getNode(),a=l.getParent();if(Xg(l,r)){const u=Xe(t);if(Ve(a)){l.replace(u);const c=Qe();O(l)&&(c.setFormat(l.getFormatType()),c.setIndent(l.getIndent())),u.append(c)}else if(me(l)){const c=l.getParentOrThrow();tr(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($h(s)){let l=s.getParent();for(;l!=null;){const a=l.getKey();if(ae(l)){if(!i.has(a)){const u=Xe(t);tr(u,l.getChildren()),l.replace(u),i.add(a)}break}{const u=l.getParent();if(Ve(u)&&!i.has(a)){i.add(a),nf(l,t);break}l=u}}}}else nf(s,t)}}})}function tr(e,t){e.splice(e.getChildrenSize(),0,t)}function nf(e,t){if(ae(e))return e;const n=e.getPreviousSibling(),r=e.getNextSibling(),i=Qe();let o;if(tr(i,e.getChildren()),ae(n)&&t===n.getListType())n.append(i),ae(r)&&t===r.getListType()&&(tr(n,r.getChildren()),r.remove()),o=n;else if(ae(r)&&t===r.getListType())r.getFirstChildOrThrow().insertBefore(i),o=r;else{const s=Xe(t);s.append(i),e.replace(s),o=s}return i.setFormat(e.getFormatType()),i.setIndent(e.getIndent()),e.remove(),o}function Ru(e,t){const n=e.getLastChild(),r=t.getFirstChild();n&&r&&Ht(n)&&Ht(r)&&(Ru(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(Xg(i,r))n.add(xa(i));else for(let o=0;o<r.length;o++){const s=r[o];if($h(s)){const l=kp(s,Rn);l!=null&&n.add(xa(l))}}for(const o of n){let s=o;const l=Yg(o);for(const a of l){const u=_e();tr(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(Ht(e)||t.has(e.getKey()))return;const n=e.getParent(),r=e.getNextSibling(),i=e.getPreviousSibling();if(Ht(r)&&Ht(i)){const o=i.getFirstChild();if(ae(o)){o.append(e);const s=r.getFirstChild();ae(s)&&(tr(o,s.getChildren()),r.remove(),t.add(r.getKey()))}}else if(Ht(r)){const o=r.getFirstChild();if(ae(o)){const s=o.getFirstChild();s!==null&&s.insertBefore(e)}}else if(Ht(i)){const o=i.getFirstChild();ae(o)&&o.append(e)}else if(ae(n)){const o=Qe(),s=Xe(n.getListType());o.append(s),s.append(e),i?i.insertAfter(o):r?r.insertBefore(o):n.append(o)}}function M9(e){if(Ht(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=Qe(),l=Xe(o);s.append(l),e.getPreviousSiblings().forEach(c=>l.append(c));const a=Qe(),u=Xe(o);a.append(u),tr(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=xa(t),r=t.getParent();ae(r)||Vt(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=Qe(),i.insertAfter(o)}o.select();const s=t.getNextSiblings();if(s.length>0){const l=Xe(r.getListType());if(me(o)){const a=Qe();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 Do(...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 Rn=class Qg extends Rt{static getType(){return"listitem"}static clone(t){return new Qg(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"&&of(n,this,null),n.value=this.__value,rf(n,t.theme,this),n}updateDOM(t,n,r){const i=this.getParent();return ae(i)&&i.getListType()==="check"&&of(n,this,t),n.value=this.__value,rf(n,r.theme,this),!1}static transform(){return t=>{if(me(t)||Vt(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 Qe().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=Xe(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)||Vt(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)||Vt(39),me(t))return super.insertAfter(t,n);const i=this.getNextSiblings();if(r.insertAfter(t,n),i.length!==0){const o=Xe(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&&Ht(n)&&Ht(r)&&(Ru(n.getFirstChild(),r.getFirstChild()),r.remove())}insertNewAfter(t,n=!0){const r=Qe().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"&&Vt(117),(t=Math.floor(t))>=0||Vt(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)||vu(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 Xe("bullet")}canMergeWhenEmpty(){return!0}};function rf(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(...Do(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=Do(l);n.getChildren().some(u=>ae(u))?r.push(...a):i.push(...a)}i.length>0&&ms(e,...i),r.length>0&&Pt(e,...r)}function of(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:Qe(t==="true"||t!=="false"&&void 0)}}function $9(e){return e.getAttribute("type")!=="checkbox"?{node:null}:{node:Qe(e.hasAttribute("checked"))}}function Qe(e){return ct(new Rn(void 0,e))}function me(e){return e instanceof Rn}let On=class e1 extends Rt{static getType(){return"list"}static clone(t){const n=t.__listType||af[t.__tag];return new e1(n,t.__start,t.__key)}constructor(t="number",n=1,r){super(r);const i=af[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,sf(i,t.theme,this),i}updateDOM(t,n,r){return t.__tag!==this.__tag||(sf(n,r.theme,this),!1)}static transform(){return t=>{ae(t)||Vt(163),function(n){const r=n.getNextSibling();ae(r)&&n.getListType()===r.getListType()&&Ru(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:lf,priority:0}),ul:()=>({conversion:lf,priority:0})}}static importJSON(t){return Xe().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=Qe();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 sf(e,t,n){const r=[],i=[],o=t.list;if(o!==void 0){const s=o[`${n.__tag}Depth`]||[],l=ma(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(...Do(u));for(let p=0;p<s.length;p++)p!==a&&i.push(n.__tag+p)}if(d!==void 0){const p=Do(d);l>1?r.push(...p):i.push(...p)}}i.length>0&&ms(e,...i),r.length>0&&Pt(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(tf(o))})}else t.push(tf(r))}return t}function lf(e){const t=e.nodeName.toLowerCase();let n=null;return t==="ol"?n=Xe("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)?Xe("check"):Xe("bullet")),{after:D9,node:n}}const af={ol:"number",ul:"bullet"};function Xe(e="number",t=1){return ct(new On(e,t))}function ae(e){return e instanceof On}const t1=cn(),n1=cn(),r1=cn(),i1=cn();function V9(e){return dt(e.registerCommand(n1,()=>(ya(e,"number"),!0),Ee),e.registerCommand(t1,()=>(ya(e,"bullet"),!0),Ee),e.registerCommand(i1,()=>(F9(e),!0),Ee),e.registerCommand(di,()=>!!R9(),Ee))}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=Xe(r);if(me(t)){const o=Qe();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(Qe(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 dt(e.registerCommand(Ua,n=>{const r=U();if(!D(r))return!1;n.preventDefault();const i=function(o){const s=o.getNodes();if(px(s,h=>Io(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=Wl(c);if(d.canIndent()){const h=d.getKey();let f=fs();if(f.anchor.set(h,0,"element"),f.focus.set(h,0,"element"),f=Sr(f),f.anchor.is(u))return!0}return!1}(r)?n.shiftKey?El:po:Eh;return e.dispatchCommand(i,void 0)},pe),e.registerCommand(po,()=>{if(t==null)return!1;const n=U();if(!D(n))return!1;const r=n.getNodes().map(i=>Wl(i).getIndent());return Math.max(...r)+1>=t},sn))}function uf({maxIndent:e}){const[t]=rt();return T.useEffect(()=>U9(t,e),[t,e]),null}function cf(){const[e]=rt();return T.useEffect(()=>dt(e.registerCommand(r1,()=>(ya(e,"check"),!0),Ee),e.registerCommand(za,t=>hf(t,e,!1),Ee),e.registerCommand(Ba,t=>hf(t,e,!0),Ee),e.registerCommand(Si,t=>{if(_a()!=null){const n=e.getRootElement();return n!=null&&n.focus(),!0}return!1},Ee),e.registerCommand(ja,t=>{const n=_a();return!(n==null||!e.isEditable())&&(e.update(()=>{const r=on(n);me(r)&&(t.preventDefault(),r.toggleChecked())}),!0)},Ee),e.registerCommand(Ha,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=or(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}),Ee),e.registerRootListener((t,n)=>{t!==null&&(t.addEventListener("click",df),t.addEventListener("pointerdown",ff)),n!==null&&(n.removeEventListener("click",df),n.removeEventListener("pointerdown",ff))}))),null}function o1(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/gx(n);(n.dir==="rtl"?s<o.right&&s>o.right-20:s>o.left&&s<o.left+20)&&t()}function df(e){o1(e,()=>{if(Fe(e.target)){const t=e.target,n=ou(t);n!=null&&n.isEditable()&&n.update(()=>{const r=on(t);me(r)&&(t.focus(),r.toggleChecked())})}})}function ff(e){o1(e,()=>{e.preventDefault()})}function _a(){const e=document.activeElement;return Fe(e)&&e.tagName==="LI"&&e.parentNode!=null&&e.parentNode.__lexicalListType==="check"?e:null}function hf(e,t,n){const r=_a();return r!=null&&t.update(()=>{const i=on(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 pf(){const[e]=rt();return T.useEffect(()=>{if(!e.hasNodes([On,Rn]))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:gf,taskListCheckValueUnchecked:gf,paragraph:Y9}}}function q9(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:X9}}}function gf(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=eg.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",n1],["bullet",t1],["check",r1],["",i1]]),mf=re("",e=>{e.sub(e.pipe(Tr,Le($e)),([t,n])=>{if(!t||!n)return;const r=t.anchor.getNode();let i=r.getKey()==="root"?r:or(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=kp(r,On),a=l?l.getListType():i.getListType();e.pub(mf,a)}else e.pub(mf,"")})}),ew=ze(e=>{e.sub(e.pipe(ew,Le($e)),([t,n])=>{n==null||n.dispatchCommand(Q9.get(t),void 0)})}),tw=Wt({init(e){var t;(t=e.getValue(Pn))==null||t.registerCommand(po,()=>!rw(7),sn),e.pubIn({[ws]:"lists",[ca]:G9(),[ua]:J9(),[An]:[H9,B9],[sr]:[Rn,On],[lr]:[z9,j9],[Ag]:q9(),[ar]:[uf,pf,cf],[Vg]:[uf,pf,cf]})}});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(ma(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(ma(o)+1,r)}return r<=e}var Ou="Popover",[s1,j6]=Da(Ou,[Jo]),Vi=Jo(),[iw,$n]=s1(Ou),l1=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!1}=e,l=Vi(t),a=T.useRef(null),[u,c]=T.useState(!1),[d=!1,h]=kl({prop:r,defaultProp:i,onChange:o});return F.jsx(rh,{...l,children:F.jsx(iw,{scope:t,contentId:Ko(),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})})};l1.displayName=Ou;var a1="PopoverAnchor",u1=T.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=$n(a1,n),o=Vi(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:l}=i;return T.useEffect(()=>(s(),()=>l()),[s,l]),F.jsx($a,{...o,...r,ref:t})});u1.displayName=a1;var c1="PopoverTrigger",ow=T.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=$n(c1,n),o=Vi(n),s=at(t,i.triggerRef),l=F.jsx(ut.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":m1(i.open),...r,ref:s,onClick:Pe(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?l:F.jsx($a,{asChild:!0,...o,children:l})});ow.displayName=c1;var $u="PopoverPortal",[sw,lw]=s1($u,{forceMount:void 0}),d1=e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,o=$n($u,t);return F.jsx(sw,{scope:t,forceMount:n,children:F.jsx(xh,{present:n||o.open,children:F.jsx(ih,{asChild:!0,container:i,children:r})})})};d1.displayName=$u;var Ir="PopoverContent",f1=T.forwardRef((e,t)=>{const n=lw(Ir,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,o=$n(Ir,e.__scopePopover);return F.jsx(xh,{present:r||o.open,children:o.modal?F.jsx(uw,{...i,ref:t}):F.jsx(cw,{...i,ref:t})})});f1.displayName=Ir;var aw=fo("PopoverContent.RemoveScroll"),uw=T.forwardRef((e,t)=>{const n=$n(Ir,e.__scopePopover),r=T.useRef(null),i=at(t,r),o=T.useRef(!1);return T.useEffect(()=>{const s=r.current;if(s)return sh(s)},[]),F.jsx(lh,{as:aw,allowPinchZoom:!0,children:F.jsx(h1,{...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=$n(Ir,e.__scopePopover),r=T.useRef(!1),i=T.useRef(!1);return F.jsx(h1,{...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()}})}),h1=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=$n(Ir,n),f=Vi(n);return ah(),F.jsx(uh,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:F.jsx(ch,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:c,onEscapeKeyDown:l,onPointerDownOutside:a,onFocusOutside:u,onDismiss:()=>h.onOpenChange(!1),children:F.jsx(dh,{"data-state":m1(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)"}})})})}),p1="PopoverClose",dw=T.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=$n(p1,n);return F.jsx(ut.button,{type:"button",...r,ref:t,onClick:Pe(e.onClick,()=>i.onOpenChange(!1))})});dw.displayName=p1;var fw="PopoverArrow",g1=T.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Vi(n);return F.jsx(oh,{...i,...r,ref:t})});g1.displayName=fw;function m1(e){return e?"open":"closed"}var hw=l1,pw=u1,gw=d1,mw=f1,xw=g1;function Sn(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 Es(e,t=[]){let n=[];function r(o,s){const l=T.createContext(s),a=n.length;n=[...n,s];const u=d=>{var y;const{scope:h,children:f,...p}=d,x=((y=h==null?void 0:h[e])==null?void 0:y[a])||l,_=T.useMemo(()=>p,Object.values(p));return F.jsx(x.Provider,{value:_,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 xf(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function x1(...e){return t=>{let n=!1;const r=e.map(i=>{const o=xf(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():xf(e[i],null)}}}}function va(...e){return T.useCallback(x1(...e),e)}var Vo=T.forwardRef((e,t)=>{const{children:n,...r}=e,i=T.Children.toArray(n),o=i.find(vw);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 F.jsx(ba,{...r,ref:t,children:T.isValidElement(s)?T.cloneElement(s,void 0,l):null})}return F.jsx(ba,{...r,ref:t,children:n})});Vo.displayName="Slot";var ba=T.forwardRef((e,t)=>{const{children:n,...r}=e;if(T.isValidElement(n)){const i=Cw(n),o=bw(r,n.props);return n.type!==T.Fragment&&(o.ref=t?x1(t,i):i),T.cloneElement(n,o)}return T.Children.count(n)>1?T.Children.only(null):null});ba.displayName="SlotClone";var _w=({children:e})=>F.jsx(F.Fragment,{children:e});function vw(e){return T.isValidElement(e)&&e.type===_w}function bw(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]=Es(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=f=>{const{scope:p,children:x}=f,_=w.useRef(null),y=w.useRef(new Map).current;return F.jsx(i,{scope:p,itemMap:y,collectionRef:_,children:x})};s.displayName=t;const l=e+"CollectionSlot",a=w.forwardRef((f,p)=>{const{scope:x,children:_}=f,y=o(l,x),g=va(p,y.collectionRef);return F.jsx(Vo,{ref:g,children:_})});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=va(p,g),v=o(u,x);return w.useEffect(()=>(v.itemMap.set(g,{ref:g,...y}),()=>void v.itemMap.delete(g))),F.jsx(Vo,{[c]:"",ref:m,children:_})});d.displayName=u;function h(f){const p=o(e+"CollectionConsumer",f);return w.useCallback(()=>{const _=p.collectionRef.current;if(!_)return[];const y=Array.from(_.querySelectorAll(`[${c}]`));return Array.from(p.itemMap.values()).sort((v,k)=>y.indexOf(v.ref.current)-y.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=y0.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"],an=Iw.reduce((e,t)=>{const n=T.forwardRef((r,i)=>{const{asChild:o,...s}=r,l=o?Vo:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),F.jsx(l,{...s,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Du(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 Ts({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Aw({defaultProp:t,onChange:n}),o=e!==void 0,s=o?e:r,l=Du(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=Du(t);return T.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}var Nw=T.createContext(void 0);function Vu(e){const t=T.useContext(Nw);return e||t||"ltr"}var al="rovingFocusGroup.onEntryFocus",Lw={bubbles:!1,cancelable:!0},Is="RovingFocusGroup",[Ca,y1,Fw]=ww(Is),[Pw,As]=Es(Is,[Fw]),[Mw,Rw]=Pw(Is),_1=T.forwardRef((e,t)=>F.jsx(Ca.Provider,{scope:e.__scopeRovingFocusGroup,children:F.jsx(Ca.Slot,{scope:e.__scopeRovingFocusGroup,children:F.jsx(Ow,{...e,ref:t})})}));_1.displayName=Is;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=va(t,h),p=Vu(o),[x=null,_]=Ts({prop:s,defaultProp:l,onChange:a}),[y,g]=T.useState(!1),m=Du(u),v=y1(n),k=T.useRef(!1),[b,C]=T.useState(0);return T.useEffect(()=>{const E=h.current;if(E)return E.addEventListener(al,m),()=>E.removeEventListener(al,m)},[m]),F.jsx(Mw,{scope:n,orientation:r,dir:p,loop:i,currentTabStopId:x,onItemFocus:T.useCallback(E=>_(E),[_]),onItemShiftTab:T.useCallback(()=>g(!0),[]),onFocusableItemAdd:T.useCallback(()=>C(E=>E+1),[]),onFocusableItemRemove:T.useCallback(()=>C(E=>E-1),[]),children:F.jsx(an.div,{tabIndex:y||b===0?-1:0,"data-orientation":r,...d,ref:f,style:{outline:"none",...e.style},onMouseDown:Sn(e.onMouseDown,()=>{k.current=!0}),onFocus:Sn(e.onFocus,E=>{const I=!k.current;if(E.target===E.currentTarget&&I&&!y){const P=new CustomEvent(al,Lw);if(E.currentTarget.dispatchEvent(P),!P.defaultPrevented){const M=v().filter(Q=>Q.focusable),R=M.find(Q=>Q.active),L=M.find(Q=>Q.id===x),B=[R,L,...M].filter(Boolean).map(Q=>Q.ref.current);C1(B,c)}}k.current=!1}),onBlur:Sn(e.onBlur,()=>g(!1))})})}),v1="RovingFocusGroupItem",b1=T.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...s}=e,l=Tw(),a=o||l,u=Rw(v1,n),c=u.currentTabStopId===a,d=y1(n),{onFocusableItemAdd:h,onFocusableItemRemove:f}=u;return T.useEffect(()=>{if(r)return h(),()=>f()},[r,h,f]),F.jsx(Ca.ItemSlot,{scope:n,id:a,focusable:r,active:i,children:F.jsx(an.span,{tabIndex:c?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:Sn(e.onMouseDown,p=>{r?u.onItemFocus(a):p.preventDefault()}),onFocus:Sn(e.onFocus,()=>u.onItemFocus(a)),onKeyDown:Sn(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 y=d().filter(g=>g.focusable).map(g=>g.ref.current);if(x==="last")y.reverse();else if(x==="prev"||x==="next"){x==="prev"&&y.reverse();const g=y.indexOf(p.currentTarget);y=u.loop?Hw(y,g+1):y.slice(g+1)}setTimeout(()=>C1(y))}})})})});b1.displayName=v1;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 C1(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 w1=_1,Hu=b1,Bw="Separator",yf="horizontal",zw=["horizontal","vertical"],k1=T.forwardRef((e,t)=>{const{decorative:n,orientation:r=yf,...i}=e,o=jw(r)?r:yf,l=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return F.jsx(an.div,{"data-orientation":o,...l,...i,ref:t})});k1.displayName=Bw;function jw(e){return zw.includes(e)}var Uw=k1,Ww="Toggle",S1=T.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r=!1,onPressedChange:i,...o}=e,[s=!1,l]=Ts({prop:n,onChange:i,defaultProp:r});return F.jsx(an.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...o,ref:t,onClick:Sn(e.onClick,()=>{e.disabled||l(!s)})})});S1.displayName=Ww;var Or="ToggleGroup",[E1,T1]=Es(Or,[As]),I1=As(),Bu=w.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const i=r;return F.jsx(Jw,{...i,ref:t})}if(n==="multiple"){const i=r;return F.jsx(Kw,{...i,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${Or}\``)});Bu.displayName=Or;var[A1,N1]=E1(Or),Jw=w.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...o}=e,[s,l]=Ts({prop:n,defaultProp:r,onChange:i});return F.jsx(A1,{scope:e.__scopeToggleGroup,type:"single",value:s?[s]:[],onItemActivate:l,onItemDeactivate:w.useCallback(()=>l(""),[l]),children:F.jsx(L1,{...o,ref:t})})}),Kw=w.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...o}=e,[s=[],l]=Ts({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 F.jsx(A1,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:a,onItemDeactivate:u,children:F.jsx(L1,{...o,ref:t})})});Bu.displayName=Or;var[Zw,Gw]=E1(Or),L1=w.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:o,dir:s,loop:l=!0,...a}=e,u=I1(n),c=Vu(s),d={role:"group",dir:c,...a};return F.jsx(Zw,{scope:n,rovingFocus:i,disabled:r,children:i?F.jsx(w1,{asChild:!0,...u,orientation:o,dir:c,loop:l,children:F.jsx(an.div,{...d,ref:t})}):F.jsx(an.div,{...d,ref:t})})}),Ho="ToggleGroupItem",F1=w.forwardRef((e,t)=>{const n=N1(Ho,e.__scopeToggleGroup),r=Gw(Ho,e.__scopeToggleGroup),i=I1(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?F.jsx(Hu,{asChild:!0,...i,focusable:!s,active:o,ref:a,children:F.jsx(_f,{...l,ref:t})}):F.jsx(_f,{...l,ref:t})});F1.displayName=Ho;var _f=w.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...i}=e,o=N1(Ho,n),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=o.type==="single"?s:void 0;return F.jsx(S1,{...l,...i,ref:t,onPressedChange:a=>{a?o.onItemActivate(r):o.onItemDeactivate(r)}})}),qw=Bu,Yw=F1,zu="Toolbar",[Xw,U6]=Es(zu,[As,T1]),ju=As(),P1=T1(),[Qw,M1]=Xw(zu),R1=T.forwardRef((e,t)=>{const{__scopeToolbar:n,orientation:r="horizontal",dir:i,loop:o=!0,...s}=e,l=ju(n),a=Vu(i);return F.jsx(Qw,{scope:n,orientation:r,dir:a,children:F.jsx(w1,{asChild:!0,...l,orientation:r,dir:a,loop:o,children:F.jsx(an.div,{role:"toolbar","aria-orientation":r,dir:a,...s,ref:t})})})});R1.displayName=zu;var O1="ToolbarSeparator",$1=T.forwardRef((e,t)=>{const{__scopeToolbar:n,...r}=e,i=M1(O1,n);return F.jsx(Uw,{orientation:i.orientation==="horizontal"?"vertical":"horizontal",...r,ref:t})});$1.displayName=O1;var e3="ToolbarButton",Uu=T.forwardRef((e,t)=>{const{__scopeToolbar:n,...r}=e,i=ju(n);return F.jsx(Hu,{asChild:!0,...i,focusable:!e.disabled,children:F.jsx(an.button,{type:"button",...r,ref:t})})});Uu.displayName=e3;var t3="ToolbarLink",n3=T.forwardRef((e,t)=>{const{__scopeToolbar:n,...r}=e,i=ju(n);return F.jsx(Hu,{asChild:!0,...i,focusable:!0,children:F.jsx(an.a,{...r,ref:t,onKeyDown:Sn(e.onKeyDown,o=>{o.key===" "&&o.currentTarget.click()})})})});n3.displayName=t3;var D1="ToolbarToggleGroup",V1=T.forwardRef((e,t)=>{const{__scopeToolbar:n,...r}=e,i=M1(D1,n),o=P1(n);return F.jsx(qw,{"data-orientation":i.orientation,dir:i.dir,...o,...r,ref:t,rovingFocus:!1})});V1.displayName=D1;var r3="ToolbarToggleItem",H1=T.forwardRef((e,t)=>{const{__scopeToolbar:n,...r}=e,i=P1(n),o={__scopeToolbar:e.__scopeToolbar};return F.jsx(Uu,{asChild:!0,...o,children:F.jsx(Yw,{...i,...r,ref:t})})});H1.displayName=r3;var i3=R1,o3=$1,B1=Uu,z1=V1,s3=H1;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:"]);class Dn extends Rt{static getType(){return"link"}static clone(t){return new Dn(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),Pt(n,t.theme.link),n}updateDOM(t,n,r){if(Kh(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 nr().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=nr(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(Kh(e)){const n=e.textContent;(n!==null&&n!==""||e.children.length>0)&&(t=nr(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function nr(e="",t){return ct(new Dn(e,t))}function Bt(e){return e instanceof Dn}let Ns=class j1 extends Dn{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 j1(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 wa().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=wa(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return r.append(i),i}return null}};function wa(e="",t){return ct(new Ns(e,t))}function Jn(e){return e instanceof Ns}const Ar=cn();function vf(e,t){if(e.type==="element"){const n=e.getNode();return O(n)||a3(252),n.getChildren()[e.offset+t]||null}return null}function ul(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=or(u,d=>!Jn(d)&&Bt(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=bf(s[0],Bt);if(u!==null)return a(u)}(function(u){const c=U();if(!D(c))return u();const d=Sr(c),h=d.isBackward(),f=vf(d.anchor,h?-1:0),p=vf(d.focus,h?0:-1);if(u(),f||p){const x=U();if(D(x)){const _=x.clone();if(f){const y=f.getParent();y&&_.anchor.set(y.getKey(),f.getIndexWithinParent()+(h?1:0),"element")}if(p){const y=p.getParent();y&&_.focus.set(y.getKey(),p.getIndexWithinParent()+(h?0:1),"element")}qe(Sr(_))}}})(()=>{let u=null;for(const c of s){if(!c.isAttached())continue;const d=bf(c,Bt);if(d){a(d);continue}if(O(c)){if(!c.isInline())continue;if(Bt(c)){if(!(Jn(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();Bt(h)&&h.is(u)?h.append(c):(u=nr(e,{rel:i,target:n,title:r}),c.insertAfter(u),u.append(c))}})}function bf(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(nr(e.url,{title:e.title}))}},f3={testLexicalNode:Bt,visitLexicalNode:({lexicalNode:e,actions:t})=>{t.addAndStepInto("link",{url:e.getURL(),title:e.getTitle()})}};function h3({validateUrl:e,attributes:t}){const[n]=rt();return T.useEffect(()=>{if(!n.hasNodes([Dn]))throw new Error("LinkPlugin: LinkNode not registered on editor");return dt(n.registerCommand(Ar,r=>{if(r===null)return ul(r),!0;if(typeof r=="string")return!(e!==void 0&&!e(r))&&(ul(r,t),!0);{const{url:i,target:o,rel:s,title:l}=r;return ul(i,{...t,rel:s,target:o,title:l}),!0}},Ee),e!==void 0?n.registerCommand(ki,r=>{const i=U();if(!D(i)||i.isCollapsed()||!Cn(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(Ar,{...t,url:s}),r.preventDefault(),!0)},Ee):()=>{})},[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 Cf(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 U1(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 Bo(e){return m3.test(e)}function W1(e){return Bo(e[e.length-1])}function ka(e){return Bo(e[0])}function J1(e){let t=e.getPreviousSibling();return O(t)&&(t=t.getLastDescendant()),t===null||Nt(t)||z(t)&&W1(t.getTextContent())}function K1(e){let t=e.getNextSibling();return O(t)&&(t=t.getFirstDescendant()),t===null||Nt(t)||z(t)&&ka(t.getTextContent())}function x3(e,t,n,r){return(e>0?Bo(n[e-1]):J1(r[0]))?t<n.length?Bo(n[t]):K1(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=wa(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,_=l;if(_<n)if(l+x<=n)a.push(p);else{const[y,g]=p.splitText(n-_);a.push(y),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=U1(o,t);if(s===null||s.text!==o||!J1(e)||!K1(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 v3(e,t,n){T.useEffect(()=>{e.hasNodes([Ns])||g3(77);const r=(i,o)=>{n&&n(i,o)};return dt(e.registerNodeTransform(fn,i=>{const o=i.getParentOrThrow(),s=i.getPreviousSibling();if(Jn(o)&&!o.getIsUnlinked())cl(o,t,r);else if(!Bt(o)){if(i.isSimpleText()&&(ka(i.getTextContent())||!Jn(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(_=>_.getTextContent()).join("");let f,p=h,x=0;for(;(f=U1(p,u))&&f!==null;){const _=f.index,y=_+f.length;if(x3(x+_,x+y,h,d)){const[g,,m,v]=y3(d,x+_,x+y),k=_3(m,x+_-g,x+y-g,f);d=k?[k,...v]:v,c(f.url,null),x=0}else x+=y;p=p.substring(y)}})(l,t,r)}(function(l,a,u){const c=l.getPreviousSibling(),d=l.getNextSibling(),h=l.getTextContent();var f;!Jn(c)||c.getIsUnlinked()||ka(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())),!Jn(d)||d.getIsUnlinked()||W1(h)||(co(d),cl(d,a,u),u(null,d.getURL()))})(i,t,r)}}),e.registerCommand(Ar,i=>{const o=U();return i!==null||!D(o)||o.extract().forEach(s=>{const l=s.getParent();if(Jn(l))return l.setIsUnlinked(!l.getIsUnlinked()),l.markDirty(),!0}),!1},Ee))},[e,t,n])}function b3({matchers:e,onChange:t}){const[n]=rt();return v3(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=[Cf(C3,e=>e.startsWith("http")?e:`https://${e}`),Cf(w3,e=>`mailto:${e}`)],S3=()=>w.createElement(b3,{matchers:k3}),E3=re(!1),T3=Wt({init(e,t){const n=!!(t!=null&&t.disableAutoLink),r=t!=null&&t.validateUrl?{validateUrl:t.validateUrl}:{};e.pubIn({[ws]:"link",[An]:d3,[sr]:[Dn,Ns],[lr]:f3,[E3]:n,[ar]:()=>w.createElement(w.Fragment,null,w.createElement(h3,{...r}),n?null:w.createElement(S3,null))})}});function Yr(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 dl={exports:{}},fl,wf;function I3(){if(wf)return fl;wf=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return fl=e,fl}var hl,kf;function A3(){if(kf)return hl;kf=1;var e=I3();function t(){}function n(){}return n.resetWarningCache=t,hl=function(){function r(s,l,a,u,c,d){if(d!==e){var h=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 h.name="Invariant Violation",h}}r.isRequired=r;function i(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},hl}var Sf;function N3(){return Sf||(Sf=1,dl.exports=A3()()),dl.exports}var L3=N3();const J=nh(L3);var pl={exports:{}},ve={};/** @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 Ef;function F3(){if(Ef)return ve;Ef=1;var e=60103,t=60106,n=60107,r=60108,i=60114,o=60109,s=60110,l=60112,a=60113,u=60120,c=60115,d=60116,h=60121,f=60122,p=60117,x=60129,_=60131;if(typeof Symbol=="function"&&Symbol.for){var y=Symbol.for;e=y("react.element"),t=y("react.portal"),n=y("react.fragment"),r=y("react.strict_mode"),i=y("react.profiler"),o=y("react.provider"),s=y("react.context"),l=y("react.forward_ref"),a=y("react.suspense"),u=y("react.suspense_list"),c=y("react.memo"),d=y("react.lazy"),h=y("react.block"),f=y("react.server.block"),p=y("react.fundamental"),x=y("react.debug_trace_mode"),_=y("react.legacy_hidden")}function g(L){if(typeof L=="object"&&L!==null){var K=L.$$typeof;switch(K){case e:switch(L=L.type,L){case n:case i:case r:case a:case u:return L;default:switch(L=L&&L.$$typeof,L){case s:case l:case d:case c:case o:return L;default:return K}}case t:return K}}}var m=o,v=e,k=l,b=n,C=d,E=c,I=t,P=i,M=r,R=a;return ve.ContextConsumer=s,ve.ContextProvider=m,ve.Element=v,ve.ForwardRef=k,ve.Fragment=b,ve.Lazy=C,ve.Memo=E,ve.Portal=I,ve.Profiler=P,ve.StrictMode=M,ve.Suspense=R,ve.isAsyncMode=function(){return!1},ve.isConcurrentMode=function(){return!1},ve.isContextConsumer=function(L){return g(L)===s},ve.isContextProvider=function(L){return g(L)===o},ve.isElement=function(L){return typeof L=="object"&&L!==null&&L.$$typeof===e},ve.isForwardRef=function(L){return g(L)===l},ve.isFragment=function(L){return g(L)===n},ve.isLazy=function(L){return g(L)===d},ve.isMemo=function(L){return g(L)===c},ve.isPortal=function(L){return g(L)===t},ve.isProfiler=function(L){return g(L)===i},ve.isStrictMode=function(L){return g(L)===r},ve.isSuspense=function(L){return g(L)===a},ve.isValidElementType=function(L){return typeof L=="string"||typeof L=="function"||L===n||L===i||L===x||L===r||L===a||L===u||L===_||typeof L=="object"&&L!==null&&(L.$$typeof===d||L.$$typeof===c||L.$$typeof===o||L.$$typeof===s||L.$$typeof===l||L.$$typeof===p||L.$$typeof===h||L[0]===f)},ve.typeOf=g,ve}var Tf;function P3(){return Tf||(Tf=1,pl.exports=F3()),pl.exports}P3();let If=e=>typeof e=="object"&&e!=null&&e.nodeType===1,Af=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",gl=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return Af(n.overflowY,t)||Af(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},Xi=(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,M3=e=>{let t=e.parentElement;return t??(e.getRootNode().host||null)};var R3=(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(!If(e))throw new TypeError("Invalid target");let h=document.scrollingElement||document.documentElement,f=[],p=e;for(;If(p)&&d(p);){if(p=M3(p),p===h){f.push(p);break}p!=null&&p===document.body&&gl(p)&&!gl(document.documentElement)||p!=null&&gl(p,c)&&f.push(p)}let x=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,_=(o=(i=window.visualViewport)==null?void 0:i.height)!=null?o:innerHeight,y=(s=window.scrollX)!=null?s:pageXOffset,g=(l=window.scrollY)!=null?l:pageYOffset,{height:m,width:v,top:k,right:b,bottom:C,left:E}=e.getBoundingClientRect(),I=k,P=a==="center"?E+v/2:a==="end"?b:E,M=[];for(let R=0;R<f.length;R++){let L=f[R],{height:K,width:B,top:Q,right:Z,bottom:ne,left:ce}=L.getBoundingClientRect();if(k>=0&&E>=0&&C<=_&&b<=x&&k>=Q&&C<=ne&&E>=ce&&b<=Z)return M;let N=getComputedStyle(L),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 L?L.offsetWidth-L.clientWidth-se-A:0,j="offsetHeight"in L?L.offsetHeight-L.clientHeight-ee-ue:0,q="offsetWidth"in L?L.offsetWidth===0?0:B/L.offsetWidth:0,Y="offsetHeight"in L?L.offsetHeight===0?0:K/L.offsetHeight:0;if(h===L)he=Xi(g,g+_,_,ee,ue,g+I,g+I+m,m),oe=a==="start"?P:a==="center"?P-x/2:a==="end"?P-x:Xi(y,y+x,x,se,A,y+P,y+P+v,v),he=Math.max(0,he+g),oe=Math.max(0,oe+y);else{he=Xi(Q,ne,K,ee,ue+j,I,I+m,m),oe=a==="start"?P-ce-se:a==="center"?P-(ce+B/2)+H/2:a==="end"?P-Z+A+H:Xi(ce,Z,B,se,A+H,P,P+v,v);let{scrollLeft:ie,scrollTop:de}=L;he=Math.max(0,Math.min(de+he/Y,L.scrollHeight-K/Y+j)),oe=Math.max(0,Math.min(ie+oe/q,L.scrollWidth-B/q+H)),I+=de-he,P+=ie-oe}M.push({el:L,top:he,left:oe})}return M},O3=0;function Z1(){}function $3(e,t){if(e){var n=R3(e,{boundary:t});n.forEach(function(r){var i=r.el,o=r.top,s=r.left;i.scrollTop=o,i.scrollLeft=s})}}function Nf(e,t,n){var r=e===t||t instanceof n.Node&&e.contains&&e.contains(t);return r}function G1(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 qt(){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 Qi(){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 D3(){return String(O3++)}function V3(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 Sa(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=q1(t,r)?t[r]:e[r],n},{})}function q1(e,t){return e[t]!==void 0}function H3(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function eo(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=bi(e,s,n,r,i);return l===-1?t>=n?-1:t:l}function bi(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?bi(1,0,n,r,!1):bi(-1,n-1,n,r,!1):-1}function Lf(e,t,n,r){return r===void 0&&(r=!0),t.some(function(i){return i&&(Nf(i,e,n)||r&&Nf(i,n.document.activeElement,n))})}var B3=G1(function(e){Y1(e).textContent=""},500);function z3(e,t){var n=Y1(t);e&&(n.textContent=e,B3(t))}function Y1(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 j3=["isInitialMount","highlightedIndex","items","environment"],X1={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function U3(e,t,n){var r=e.props,i=e.type,o={};Object.keys(t).forEach(function(s){W3(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 W3(e,t,n,r){var i=t.props,o=t.type,s="on"+Wu(e)+"Change";i[s]&&r[e]!==void 0&&r[e]!==n[e]&&i[s](Ne({type:o},r))}function J3(e,t){return t.changes}function K3(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""}var Z3=G1(function(e,t){z3(e(),t)},200),G3=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?T.useLayoutEffect:T.useEffect;function q3(e){var t=e.id,n=t===void 0?"downshift-"+D3():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 Y3(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 X3(e){return e?String(e):""}function Wu(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function Q1(e){var t=T.useRef(e);return t.current=e,t}function Q3(e,t,n){var r=T.useRef(),i=T.useRef(),o=T.useCallback(function(h,f){i.current=f,h=Sa(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=Q1(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&&U3(d,Sa(r.current,d.props),l),r.current=l},[l,n,d]),[l,c]}var ui={itemToString:X3,stateReducer:J3,getA11ySelectionMessage:K3,scrollIntoView:$3,environment:typeof window>"u"?{}:window};function jt(e,t,n){n===void 0&&(n=X1);var r=e["default"+Wu(t)];return r!==void 0?r:n[t]}function to(e,t,n){n===void 0&&(n=X1);var r=e[t];if(r!==void 0)return r;var i=e["initial"+Wu(t)];return i!==void 0?i:jt(e,t,n)}function e7(e){var t=to(e,"selectedItem"),n=to(e,"isOpen"),r=to(e,"highlightedIndex"),i=to(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:i}}function ci(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 t7(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&&!Lf(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&&!Lf(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 n7=function(){return Z1};function Ff(e,t,n){var r=n.isInitialMount,i=n.highlightedIndex,o=n.items,s=n.environment,l=Yr(n,j3);T.useEffect(function(){r||Z3(function(){return e(Ne({highlightedIndex:i,highlightedItem:o[i],resultCount:o.length},l))},s.document)},t)}function r7(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 G3(function(){t<0||!n||!Object.keys(r.current).length||(l.current===!1?l.current=!0:s(i(t),o))},[t]),l}var i7=Z1;function Pf(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:jt(e,"isOpen"),highlightedIndex:jt(e,"highlightedIndex")},n&&{inputValue:e.itemToString(e.items[t])}))}function o7(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:ci(i,e,0)};break;case n.FunctionOpenMenu:o={isOpen:!0,highlightedIndex:ci(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:jt(i,"highlightedIndex"),isOpen:jt(i,"isOpen"),selectedItem:jt(i,"selectedItem"),inputValue:jt(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 s7(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.":""}gc(gc({},ui),{getA11yStatusMessage:s7});var Ju=0,Ku=1,Zu=2,Gu=3,qu=4,Yu=5,Xu=6,Qu=7,ec=8,zo=9,tc=10,em=11,tm=12,nc=13,nm=14,rm=15,im=16,om=17,sm=18,rc=19,lm=20,am=21,ic=22,um=Object.freeze({__proto__:null,InputKeyDownArrowDown:Ju,InputKeyDownArrowUp:Ku,InputKeyDownEscape:Zu,InputKeyDownHome:Gu,InputKeyDownEnd:qu,InputKeyDownPageUp:Yu,InputKeyDownPageDown:Xu,InputKeyDownEnter:Qu,InputChange:ec,InputBlur:zo,InputFocus:tc,MenuMouseLeave:em,ItemMouseMove:tm,ItemClick:nc,ToggleButtonClick:nm,FunctionToggleMenu:rm,FunctionOpenMenu:im,FunctionCloseMenu:om,FunctionSetHighlightedIndex:sm,FunctionSelectItem:rc,FunctionSetInputValue:lm,FunctionReset:am,ControlledPropUpdatedSelectedItem:ic});function l7(e){var t=e7(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 a7(e,t,n){var r=T.useRef(),i=Q3(e,t,n),o=i[0],s=i[1];return T.useEffect(function(){q1(n,"selectedItem")&&(n.selectedItemChanged(r.current,n.selectedItem)&&s({type:ic,inputValue:n.itemToString(n.selectedItem)}),r.current=o.selectedItem===r.current?n.selectedItem:o.selectedItem)},[o.selectedItem,n.selectedItem]),[Sa(o,n),s]}var u7=Ne({},ui,{selectedItemChanged:function(t,n){return t!==n},getA11yStatusMessage:V3});function c7(e,t){var n,r=t.type,i=t.props,o=t.altKey,s;switch(r){case nc:s={isOpen:jt(i,"isOpen"),highlightedIndex:jt(i,"highlightedIndex"),selectedItem:i.items[t.index],inputValue:i.itemToString(i.items[t.index])};break;case Ju:e.isOpen?s={highlightedIndex:eo(1,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!0)}:s={highlightedIndex:o&&e.selectedItem==null?-1:ci(i,e,1,t.getItemNodeFromIndex),isOpen:i.items.length>=0};break;case Ku:e.isOpen?o?s=Pf(i,e.highlightedIndex):s={highlightedIndex:eo(-1,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!0)}:s={highlightedIndex:ci(i,e,-1,t.getItemNodeFromIndex),isOpen:i.items.length>=0};break;case Qu:s=Pf(i,e.highlightedIndex);break;case Zu:s=Ne({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case Yu:s={highlightedIndex:eo(-10,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!1)};break;case Xu:s={highlightedIndex:eo(10,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!1)};break;case Gu:s={highlightedIndex:bi(1,0,i.items.length,t.getItemNodeFromIndex,!1)};break;case qu:s={highlightedIndex:bi(-1,i.items.length-1,i.items.length,t.getItemNodeFromIndex,!1)};break;case zo: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 ec:s={isOpen:!0,highlightedIndex:jt(i,"highlightedIndex"),inputValue:t.inputValue};break;case tc:s={isOpen:!0,highlightedIndex:ci(i,e,0)};break;case rc:s={selectedItem:t.selectedItem,inputValue:i.itemToString(t.selectedItem)};break;case ic:s={inputValue:t.inputValue};break;default:return o7(e,t,um)}return Ne({},e,s)}var d7=["onMouseLeave","refKey","ref"],f7=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],h7=["onClick","onPress","refKey","ref"],p7=["onKeyDown","onChange","onInput","onFocus","onBlur","onChangeText","refKey","ref"];cm.stateChangeTypes=um;function cm(e){e===void 0&&(e={});var t=Ne({},u7,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=l7(t),d=a7(c7,c,t),h=d[0],f=d[1],p=h.isOpen,x=h.highlightedIndex,_=h.selectedItem,y=h.inputValue,g=T.useRef(null),m=T.useRef({}),v=T.useRef(null),k=T.useRef(null),b=T.useRef(!0),C=q3(t),E=T.useRef(),I=Q1({state:h,props:t}),P=T.useCallback(function(H){return m.current[C.getItemId(H)]},[C]);Ff(l,[p,x,y,i],Ne({isInitialMount:b.current,previousResultCount:E.current,items:i,environment:s,itemToString:u},h)),Ff(a,[_],Ne({isInitialMount:b.current,previousResultCount:E.current,items:i,environment:s,itemToString:u},h));var M=r7({menuElement:g.current,highlightedIndex:x,isOpen:p,itemRefs:m,scrollIntoView:o,getItemNodeFromIndex:P});i7({isInitialMount:b.current}),T.useEffect(function(){var H=n||r||p;H&&v.current&&v.current.focus()},[]),T.useEffect(function(){b.current||(E.current=i.length)});var R=t7(p,[v,g,k],s,function(){f({type:zo,selectItem:!1})}),L=n7();T.useEffect(function(){return b.current=!1,function(){b.current=!0}},[]),T.useEffect(function(){var H;if(!p)m.current={};else if(((H=s.document)==null?void 0:H.activeElement)!==v.current){var j;v==null||(j=v.current)==null||j.focus()}},[p,s]);var K=T.useMemo(function(){return{ArrowDown:function(j){j.preventDefault(),f({type:Ju,altKey:j.altKey,getItemNodeFromIndex:P})},ArrowUp:function(j){j.preventDefault(),f({type:Ku,altKey:j.altKey,getItemNodeFromIndex:P})},Home:function(j){I.current.state.isOpen&&(j.preventDefault(),f({type:Gu,getItemNodeFromIndex:P}))},End:function(j){I.current.state.isOpen&&(j.preventDefault(),f({type:qu,getItemNodeFromIndex:P}))},Escape:function(j){var q=I.current.state;(q.isOpen||q.inputValue||q.selectedItem||q.highlightedIndex>-1)&&(j.preventDefault(),f({type:Zu}))},Enter:function(j){var q=I.current.state;!q.isOpen||j.which===229||(j.preventDefault(),f({type:Qu,getItemNodeFromIndex:P}))},PageUp:function(j){I.current.state.isOpen&&(j.preventDefault(),f({type:Yu,getItemNodeFromIndex:P}))},PageDown:function(j){I.current.state.isOpen&&(j.preventDefault(),f({type:Xu,getItemNodeFromIndex:P}))}}},[f,I,P]),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=Yr(Y,d7),Ue=j===void 0?{}:j;return Ue.suppressRefError,Ne((q={},q[Ie]=Qi(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=qt(ie,function(){f({type:em})}),q),je)},[f,L,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,pn=Y.onClick;Y.onPress;var ht=Y.disabled,Ot=Yr(Y,f7),et=I.current,Bn=et.props,bt=et.state,we=Y3(ie,de,Bn.items,"Pass either item or index to getItemProps!"),pt=we[1],$="onClick",V=pn,S=function(){pt!==bt.highlightedIndex&&(M.current=!1,f({type:tm,index:pt,disabled:ht}))},le=function(){f({type:nc,index:pt})},fe=function(Jt){return Jt.preventDefault()};return Ne((j={},j[De]=Qi(je,function(Se){Se&&(m.current[C.getItemId(pt)]=Se)}),j.disabled=ht,j.role="option",j["aria-selected"]=""+(pt===bt.highlightedIndex),j.id=C.getItemId(pt),j),!ht&&(q={},q[$]=qt(V,le),q),{onMouseMove:qt(Ue,S),onMouseDown:qt(Ke,fe)},Ot)},[f,I,M,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=Yr(q,h7),je=I.current.state,Ue=function(){f({type:nm})};return Ne((j={},j[de]=Qi(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:qt(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,pn=Y.ref,ht=Yr(Y,p7),Ot=j===void 0?{}:j;Ot.suppressRefError;var et=I.current.state,Bn=function(fe){var Se=H3(fe);Se&&K[Se]&&K[Se](fe)},bt=function(fe){f({type:ec,inputValue:fe.target.value})},we=function(fe){if(et.isOpen&&!R.current.isMouseDown){var Se=fe.relatedTarget===null&&s.document.activeElement!==s.document.body;f({type:zo,selectItem:!Se})}},pt=function(){et.isOpen||f({type:tc})},$="onChange",V={};if(!ht.disabled){var S;V=(S={},S[$]=qt(de,Ie,bt),S.onKeyDown=qt(ie,Bn),S.onBlur=qt(je,we),S.onFocus=qt(De,pt),S)}return Ne((q={},q[Ke]=Qi(pn,function(le){v.current=le}),q["aria-activedescendant"]=et.isOpen&&et.highlightedIndex>-1?C.getItemId(et.highlightedIndex):"",q["aria-autocomplete"]="list",q["aria-controls"]=C.menuId,q["aria-expanded"]=et.isOpen,q["aria-labelledby"]=ht&&ht["aria-label"]?void 0:""+C.labelId,q.autoComplete="off",q.id=C.inputId,q.role="combobox",q.value=et.inputValue,q),V,ht)},[L,I,C,K,f,R,s]),N=T.useCallback(function(){f({type:rm})},[f]),se=T.useCallback(function(){f({type:om})},[f]),ee=T.useCallback(function(){f({type:im})},[f]),A=T.useCallback(function(H){f({type:sm,highlightedIndex:H})},[f]),ue=T.useCallback(function(H){f({type:rc,selectedItem:H})},[f]),he=T.useCallback(function(H){f({type:lm,inputValue:H})},[f]),oe=T.useCallback(function(){f({type:am})},[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:_,inputValue:y}}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})});ui.itemToString,ui.stateReducer,ui.environment;const Mf=20,dm=e=>e.suggestions.length>0?w.createElement(g7,{...e}):w.createElement("input",{className:G.textInput,size:40,autoFocus:!0,...e.register(e.inputName)}),g7=({autofocus:e,suggestions:t,control:n,inputName:r,placeholder:i,initialInputValue:o,setValue:s})=>{const[l,a]=w.useState(t.slice(0,Mf)),u=vt(Mn),c=t.length>0,{isOpen:d,getToggleButtonProps:h,getMenuProps:f,getInputProps:p,highlightedIndex:x,getItemProps:_,selectedItem:y}=cm({initialInputValue:o,onInputValueChange({inputValue:m=""}){s(r,m),m=m.toLowerCase()||"";const v=[];for(const k of t)if(k.toLowerCase().includes(m)&&(v.push(k),v.length>=Mf))break;a(v)},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 v=p();return w.createElement("input",{...v,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,v)=>w.createElement("li",{"data-selected":y===m,"data-highlighted":x===v,key:`${m}${v}`,..._({item:m,index:v})},m)))))},m7=()=>{const[e,t,n,r]=un(Ea,qn,$i,wn),i=mt(mm),o=mt(pm),s=hn(),{register:l,handleSubmit:a,control:u,setValue:c,reset:d}=Oa({values:t.type==="editing"?t.initialValues:{}});return w.createElement(T0,{open:t.type!=="inactive",onOpenChange:h=>{h||(o(),d({src:"",title:"",altText:""}))}},w.createElement(I0,{container:n==null?void 0:n.current},w.createElement(A0,{className:G.dialogOverlay}),w.createElement(N0,{className:G.dialogContent,onOpenAutoFocus:h=>{h.preventDefault()}},w.createElement(L0,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(dm,{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(F0,{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 ml(e,t,n){return Math.min(Math.max(e,t),n)}const ke={east:1,north:8,south:2,west:4};function x7({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===ke.east||g===ke.west,v=g===ke.north||g===ke.south,k=g&ke.north&&g&ke.west||g&ke.south&&g&ke.east,b=m?"ew":v?"ns":k?"nwse":"nesw";a!==null&&a.style.setProperty("cursor",`${b}-resize`,"important"),document.body!==null&&(document.body.style.setProperty("cursor",`${b}-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 v=n.current,k=o.current;if(v!==null&&k!==null){g.preventDefault();const{width:b,height:C}=v.getBoundingClientRect(),E=l.current;E.startWidth=b,E.startHeight=C,E.ratio=b/C,E.currentWidth=b,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),v.style.height=`${C}px`,v.style.width=`${b}px`,document.addEventListener("pointermove",_),document.addEventListener("pointerup",y)}},_=g=>{const m=n.current,v=l.current,k=v.direction&(ke.east|ke.west),b=v.direction&(ke.south|ke.north);if(m!==null&&v.isResizing)if(k&&b){let C=Math.floor(v.startX-g.clientX);C=v.direction&ke.east?-C:C;const E=ml(v.startWidth+C,d,u),I=E/v.ratio;m.style.width=`${E}px`,m.style.height=`${I}px`,v.currentHeight=I,v.currentWidth=E}else if(b){let C=Math.floor(v.startY-g.clientY);C=v.direction&ke.south?-C:C;const E=ml(v.startHeight+C,h,c);m.style.height=`${E}px`,v.currentHeight=E}else{let C=Math.floor(v.startX-g.clientX);C=v.direction&ke.east?-C:C;const E=ml(v.startWidth+C,d,u);m.style.width=`${E}px`,v.currentWidth=E}},y=()=>{const g=n.current,m=l.current,v=o.current;if(g!==null&&v!==null&&m.isResizing){const k=m.currentWidth,b=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,v.classList.remove(G.imageControlWrapperResizing),p(),t(k,b),document.removeEventListener("pointermove",_),document.removeEventListener("pointerup",y)}};return T.createElement("div",{ref:o},T.createElement("div",{className:be(G.imageResizer,G.imageResizerN),onPointerDown:g=>{x(g,ke.north)}}),T.createElement("div",{className:be(G.imageResizer,G.imageResizerNe),onPointerDown:g=>{x(g,ke.north|ke.east)}}),T.createElement("div",{className:be(G.imageResizer,G.imageResizerE),onPointerDown:g=>{x(g,ke.east)}}),T.createElement("div",{className:be(G.imageResizer,G.imageResizerSe),onPointerDown:g=>{x(g,ke.south|ke.east)}}),T.createElement("div",{className:be(G.imageResizer,G.imageResizerS),onPointerDown:g=>{x(g,ke.south)}}),T.createElement("div",{className:be(G.imageResizer,G.imageResizerSw),onPointerDown:g=>{x(g,ke.south|ke.west)}}),T.createElement("div",{className:be(G.imageResizer,G.imageResizerW),onPointerDown:g=>{x(g,ke.west)}}),T.createElement("div",{className:be(G.imageResizer,G.imageResizerNw),onPointerDown:g=>{x(g,ke.north|ke.west)}}))}const Rf=new Set;function y7(e){if(!Rf.has(e))throw new Promise(t=>{const n=new Image;n.src=e,n.onerror=n.onload=()=>{Rf.add(e),t(null)}})}function _7({title:e,alt:t,className:n,imageRef:r,src:i,width:o,height:s}){return y7(i),w.createElement("img",{className:n??void 0,alt:t,src:i,title:e,ref:r,draggable:"false",width:o,height:s})}function v7({src:e,title:t,alt:n,nodeKey:r,width:i,height:o,rest:s}){const[l,a,u,c,d]=un(Ta,gm,Ia,Mn,ln),h=mt(hm),f=w.useRef(null),p=w.useRef(null),[x,_,y]=Zg(r),[g]=rt(),[m,v]=w.useState(null),k=w.useRef(null),[b,C]=w.useState(!1),[E,I]=w.useState(null),[P,M]=w.useState(null),R=hn(),L=w.useCallback(se=>{if(x&&He(U())){se.preventDefault();const A=Re(r);jo(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?(qe(null),g.update(()=>{_(!0);const ee=g.getRootElement();ee!==null&&ee.focus()}),!0):!1,[g,_]);w.useEffect(()=>{u?(async()=>{P||M(e);const ee=await u(e);I(ee)})().catch(ee=>{console.error(ee)}):I(e)},[e,u,P]),w.useEffect(()=>{let se=!0;const ee=dt(g.registerUpdateListener(({editorState:A})=>{se&&v(A.read(()=>U()))}),g.registerCommand(wi,(A,ue)=>(k.current=ue,!1),Ee),g.registerCommand(qo,A=>{const ue=A;return b?!0:ue.target===f.current?(ue.shiftKey?_(!x):(y(),_(!0)),!0):!1},Ee),g.registerCommand(ts,A=>A.target===f.current?(A.preventDefault(),!0):!1,Ee),g.registerCommand(es,L,Ee),g.registerCommand(Qo,L,Ee),g.registerCommand(pi,K,Ee),g.registerCommand(Si,B,Ee));return()=>{se=!1,ee()}},[y,g,b,x,r,L,K,B,_]);const Q=(se,ee)=>{setTimeout(()=>{C(!1)},200),g.update(()=>{const A=Re(r);jo(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(_7,{width:i,height:o,className:be({[G.focusedImage]:ce},N),src:E,title:t??"",alt:n??"",imageRef:f})),ne&&ce&&!l&&w.createElement(x7,{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:P||E,title:t??"",altText:n??""}})}},c("settings"))))):null}var b7=Object.defineProperty,C7=(e,t,n)=>t in e?b7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hr=(e,t,n)=>(C7(e,typeof t!="symbol"?t+"":t,n),n);function w7(e){if(e instanceof HTMLImageElement){const{alt:t,src:n,title:r,width:i,height:o}=e;return{node:ur({altText:t,src:n,title:r,width:i,height:o})}}return null}class Hi extends Fi{constructor(t,n,r,i,o,s,l){super(l),hr(this,"__src"),hr(this,"__altText"),hr(this,"__title"),hr(this,"__width"),hr(this,"__height"),hr(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 Hi(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 ur({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:w7,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(v7,{src:this.getSrc(),title:this.getTitle(),nodeKey:this.getKey(),width:this.__width,height:this.__height,alt:this.__altText,rest:this.__rest})}}function ur(e){const{altText:t,title:n,src:r,key:i,width:o,height:s,rest:l}=e;return new Hi(r,t,n,o,s,l,i)}function jo(e){return e instanceof Hi}const k7={testLexicalNode:jo,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()})}},S7={testNode:"image",visitNode({mdastNode:e,actions:t}){t.addAndStepInto(ur({src:e.url,altText:e.alt??"",title:e.title??""}))}},E7={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=ur({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 Jr(e,t){const n=e.attributes.find(r=>r.type==="mdxJsxAttribute"&&r.name===t);if(n)return n.value}const T7={testNode:e=>(e.type==="mdxJsxTextElement"||e.type==="mdxJsxFlowElement")&&e.name==="img",visitNode({mdastNode:e,lexicalParent:t}){const n=Jr(e,"src");if(!n)return;const r=Jr(e,"alt")??"",i=Jr(e,"title"),o=Jr(e,"height"),s=Jr(e,"width"),l=e.attributes.filter(u=>u.type==="mdxJsxAttribute"&&!["src","alt","title","height","width"].includes(u.name)),a=ur({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)}},oc=ze(e=>{e.sub(e.pipe(oc,Le($e)),([t,n])=>{n==null||n.update(()=>{const r=ur({altText:t.altText??"",src:t.src,title:t.title??""});Pr([r]),Ve(r.getParentOrThrow())&&bu(r,_e).selectEnd()})})}),I7=ze(e=>{e.sub(e.pipe(I7,Le(wn)),([t,n])=>{const r=i=>{e.pub(oc,{...t,src:i})};"file"in t?n==null||n(t.file).then(r).catch(i=>{throw i}):r(t.src)})}),Ea=re([]),Ta=re(!1),wn=re(null),Ia=re(null),qn=re({type:"inactive"},e=>{e.sub(e.pipe(mm,Le($e,wn,qn)),([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(qn,{type:"inactive"})}:s=>{e.pub(oc,{...t,src:s}),e.pub(qn,{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(Mo,t=>{const n=e.getValue(wn);return dt(t.registerCommand(Uo,r=>{const i=ur(r);return Pr([i]),Ve(i.getParentOrThrow())&&bu(i,_e).selectEnd(),!0},pe),t.registerCommand(ts,r=>F7(r),Ul),t.registerCommand(Ja,r=>P7(r,!!n),Ee),t.registerCommand(Wa,r=>M7(r,t,e.getValue(wn)),Ul),t.registerCommand(ki,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(wn);return Promise.all(s.map(u=>a(u.getAsFile()))).then(u=>{u.forEach(c=>{t.dispatchCommand(Uo,{src:c,altText:""})})}).catch(u=>{throw u}),!0},sn))})}),fm=Nn(e=>{e.link(e.pipe(fm,bh({type:"new"})),qn)}),hm=ze(e=>{e.link(e.pipe(hm,xr(t=>({type:"editing",...t}))),qn)}),pm=Nn(e=>{e.link(e.pipe(pm,bh({type:"inactive"})),qn)}),gm=re(!1),mm=ze(),A7=Wt({init(e,t){e.pubIn({[An]:[S7,E7,T7],[sr]:Hi,[lr]:k7,[ar]:(t==null?void 0:t.ImageDialog)??m7,[wn]:(t==null?void 0:t.imageUploadHandler)??null,[Ea]:(t==null?void 0:t.imageAutocompleteSuggestions)??[],[Ta]:!!(t!=null&&t.disableImageResize),[gm]:!!(t!=null&&t.disableImageSettingsButton),[Ia]:(t==null?void 0:t.imagePreviewHandler)??null})},update(e,t){e.pubIn({[wn]:(t==null?void 0:t.imageUploadHandler)??null,[Ea]:(t==null?void 0:t.imageAutocompleteSuggestions)??[],[Ta]:!!(t!=null&&t.disableImageResize),[Ia]:(t==null?void 0:t.imagePreviewHandler)??null})}}),N7=e=>Jg?(e??window).getSelection():null,Uo=cn(),L7="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";function F7(e){const t=sc();if(!t)return!1;const n=e.dataTransfer;if(!n)return!1;n.setData("text/plain","_");const r=document.createElement("img");return r.src=L7,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 P7(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 sc()?(xm(e)||e.preventDefault(),!0):!1}function M7(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(Uo,{src:a,altText:""})})}).catch(l=>{throw l}),!0;const o=sc();if(!o)return!1;const s=R7(e);if(!s)return!1;if(e.preventDefault(),xm(e)){const l=O7(e);o.remove();const a=fs();l!=null&&a.applyDOMRange(l),qe(a),t.dispatchCommand(Uo,s)}return!0}function sc(){const e=U();if(!He(e))return null;const n=e.getNodes()[0];return jo(n)?n:null}function R7(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 xm(e){const t=e.target;return!!(t&&t instanceof HTMLElement&&t.parentElement)}function O7(e){let t;const n=e.target,r=n==null?null:n.nodeType===9?n.defaultView:n.ownerDocument.defaultView,i=N7(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 $7={testNode:"blockquote",visitNode({actions:e}){e.addAndStepInto(Mi())}},D7={testLexicalNode:Zl,visitLexicalNode:({lexicalNode:e,mdastParent:t,actions:n})=>{const r={type:"paragraph",children:[]};n.appendToParent(t,{type:"blockquote",children:[r]}),n.visitChildren(e,r)}},V7=Wt({init(e){e.pubIn({[ws]:"quote",[An]:$7,[sr]:xs,[lr]:D7})}});function H7(){let e=yr;return{publish:()=>{e()},subscribe:t=>{e=t}}}var B7=Object.defineProperty,z7=(e,t,n)=>t in e?B7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xn=(e,t,n)=>(z7(e,typeof t!="symbol"?t+"":t,n),n);class Ls extends Fi{constructor(t,n,r,i){super(i),xn(this,"__code"),xn(this,"__meta"),xn(this,"__language"),xn(this,"__focusEmitter",H7()),xn(this,"setCode",o=>{o!==this.__code&&(this.getWritable().__code=o)}),xn(this,"setMeta",o=>{o!==this.__meta&&(this.getWritable().__meta=o)}),xn(this,"setLanguage",o=>{o!==this.__language&&(this.getWritable().__language=o)}),xn(this,"select",()=>{this.__focusEmitter.publish()}),this.__code=t,this.__meta=r,this.__language=n}static getType(){return"codeblock"}static clone(t){return new Ls(t.__code,t.__language,t.__meta,t.__key)}static importJSON(t){const{code:n,meta:r,language:i}=t;return lc({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(W7,{parentEditor:t,code:this.getCode(),meta:this.getMeta(),language:this.getLanguage(),codeBlockNode:this,nodeKey:this.getKey(),focusEmitter:this.__focusEmitter})}isInline(){return!1}}const j7=w.createContext(null),U7=({parentEditor:e,lexicalNode:t,children:n})=>{const r=w.useMemo(()=>({lexicalNode:t,parentEditor:e,setCode:i=>{e.update(()=>{t.setCode(i),setTimeout(()=>{e.dispatchCommand(Au,void 0)},0)})},setLanguage:i=>{e.update(()=>{t.setLanguage(i)})},setMeta:i=>{e.update(()=>{t.setMeta(i)})}}),[t,e]);return w.createElement(j7.Provider,{value:r},n)},W7=e=>{const t=vt(Nu),n=vt(ym);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(U7,{parentEditor:e.parentEditor,lexicalNode:e.codeBlockNode},w.createElement(i,{...l}))};function lc(e){const{code:t="",language:n="",meta:r=""}=e;return new Ls(t,n,r)}const ym=re(""),J7=ze(e=>{e.link(e.pipe(J7,Le(ym),xr(([t,n])=>()=>lc({language:n,...t}))),Bg)});ft(Nu);function Of(e,[t,n]){return Math.min(n,Math.max(t,e))}function K7(e){const t=e+"CollectionProvider",[n,r]=Da(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=x=>{const{scope:_,children:y}=x,g=w.useRef(null),m=w.useRef(new Map).current;return F.jsx(i,{scope:_,itemMap:m,collectionRef:g,children:y})};s.displayName=t;const l=e+"CollectionSlot",a=fo(l),u=w.forwardRef((x,_)=>{const{scope:y,children:g}=x,m=o(l,y),v=at(_,m.collectionRef);return F.jsx(a,{ref:v,children:g})});u.displayName=l;const c=e+"CollectionItemSlot",d="data-radix-collection-item",h=fo(c),f=w.forwardRef((x,_)=>{const{scope:y,children:g,...m}=x,v=w.useRef(null),k=at(_,v),b=o(c,y);return w.useEffect(()=>(b.itemMap.set(v,{ref:v,...m}),()=>void b.itemMap.delete(v))),F.jsx(h,{[d]:"",ref:k,children:g})});f.displayName=c;function p(x){const _=o(e+"CollectionConsumer",x);return w.useCallback(()=>{const g=_.collectionRef.current;if(!g)return[];const m=Array.from(g.querySelectorAll(`[${d}]`));return Array.from(_.itemMap.values()).sort((b,C)=>m.indexOf(b.ref.current)-m.indexOf(C.ref.current))},[_.collectionRef,_.itemMap])}return[{Provider:s,Slot:u,ItemSlot:f},p,r]}var Z7=T.createContext(void 0);function G7(e){const t=T.useContext(Z7);return e||t||"ltr"}var q7=[" ","Enter","ArrowUp","ArrowDown"],Y7=[" ","Enter"],Bi="Select",[Fs,Ps,X7]=K7(Bi),[$r,W6]=Da(Bi,[X7,Jo]),Ms=Jo(),[Q7,Vn]=$r(Bi),[e8,t8]=$r(Bi),_m=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=Ms(t),[_,y]=T.useState(null),[g,m]=T.useState(null),[v,k]=T.useState(!1),b=G7(u),[C=!1,E]=kl({prop:r,defaultProp:i,onChange:o}),[I,P]=kl({prop:s,defaultProp:l,onChange:a}),M=T.useRef(null),R=_?p||!!_.closest("form"):!0,[L,K]=T.useState(new Set),B=Array.from(L).map(Q=>Q.props.value).join(";");return F.jsx(rh,{...x,children:F.jsxs(Q7,{required:f,scope:t,trigger:_,onTriggerChange:y,valueNode:g,onValueNodeChange:m,valueNodeHasChildren:v,onValueNodeHasChildrenChange:k,contentId:Ko(),value:I,onValueChange:P,open:C,onOpenChange:E,dir:b,triggerPointerDownPosRef:M,disabled:h,children:[F.jsx(Fs.Provider,{scope:t,children:F.jsx(e8,{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?F.jsxs(Hm,{"aria-hidden":!0,required:f,tabIndex:-1,name:c,autoComplete:d,value:I,onChange:Q=>P(Q.target.value),disabled:h,form:p,children:[I===void 0?F.jsx("option",{value:""}):null,Array.from(L)]},B):null]})})};_m.displayName=Bi;var vm="SelectTrigger",bm=T.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=Ms(n),s=Vn(vm,n),l=s.disabled||r,a=at(t,s.onTriggerChange),u=Ps(n),c=T.useRef("touch"),[d,h,f]=Bm(x=>{const _=u().filter(m=>!m.disabled),y=_.find(m=>m.value===s.value),g=zm(_,x,y);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 F.jsx($a,{asChild:!0,...o,children:F.jsx(ut.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":Vm(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 _=x.target;_.hasPointerCapture(x.pointerId)&&_.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&x.pointerType==="mouse"&&(p(x),x.preventDefault())}),onKeyDown:Pe(i.onKeyDown,x=>{const _=d.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&h(x.key),!(_&&x.key===" ")&&q7.includes(x.key)&&(p(),x.preventDefault())})})})});bm.displayName=vm;var Cm="SelectValue",wm=T.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:s="",...l}=e,a=Vn(Cm,n),{onValueNodeHasChildrenChange:u}=a,c=o!==void 0,d=at(t,a.onValueNodeChange);return En(()=>{u(c)},[u,c]),F.jsx(ut.span,{...l,ref:d,style:{pointerEvents:"none"},children:Vm(a.value)?F.jsx(F.Fragment,{children:s}):o})});wm.displayName=Cm;var n8="SelectIcon",km=T.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return F.jsx(ut.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});km.displayName=n8;var r8="SelectPortal",Sm=e=>F.jsx(ih,{asChild:!0,...e});Sm.displayName=r8;var rr="SelectContent",Em=T.forwardRef((e,t)=>{const n=Vn(rr,e.__scopeSelect),[r,i]=T.useState();if(En(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?ho.createPortal(F.jsx(Tm,{scope:e.__scopeSelect,children:F.jsx(Fs.Slot,{scope:e.__scopeSelect,children:F.jsx("div",{children:e.children})})}),o):null}return F.jsx(Im,{...e,ref:t})});Em.displayName=rr;var Et=10,[Tm,Hn]=$r(rr),i8="SelectContentImpl",o8=fo("SelectContent.RemoveScroll"),Im=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=Vn(rr,n),[m,v]=T.useState(null),[k,b]=T.useState(null),C=at(t,H=>v(H)),[E,I]=T.useState(null),[P,M]=T.useState(null),R=Ps(n),[L,K]=T.useState(!1),B=T.useRef(!1);T.useEffect(()=>{if(m)return sh(m)},[m]),ah();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(()=>{L&&Z()},[L,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]=Bm(H=>{const j=R().filter(ie=>!ie.disabled),q=j.find(ie=>ie.ref.current===document.activeElement),Y=zm(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)&&M(H)},[g.value]),he=r==="popper"?Aa:Am,oe=he===Aa?{side:l,sideOffset:a,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:h,collisionPadding:f,sticky:p,hideWhenDetached:x,avoidCollisions:_}:{};return F.jsx(Tm,{scope:n,content:m,viewport:k,onViewportChange:b,itemRefCallback:ee,selectedItem:E,onItemLeave:A,itemTextRefCallback:ue,focusSelectedItem:Z,selectedItemText:P,position:r,isPositioned:L,searchRef:N,children:F.jsx(lh,{as:o8,allowPinchZoom:!0,children:F.jsx(uh,{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:F.jsx(ch,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:H=>H.preventDefault(),onDismiss:()=>g.onOpenChange(!1),children:F.jsx(he,{role:"listbox",id:g.contentId,"data-state":g.open?"open":"closed",dir:g.dir,onContextMenu:H=>H.preventDefault(),...y,...oe,onPlaced:()=>K(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:Pe(y.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()}})})})})})})});Im.displayName=i8;var s8="SelectItemAlignedPosition",Am=T.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=Vn(rr,n),s=Hn(rr,n),[l,a]=T.useState(null),[u,c]=T.useState(null),d=at(t,C=>c(C)),h=Ps(n),f=T.useRef(!1),p=T.useRef(!0),{viewport:x,selectedItem:_,selectedItemText:y,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(),P=y.getBoundingClientRect();if(o.dir!=="rtl"){const ie=P.left-E.left,de=I.left-ie,Ie=C.left-de,De=C.width+Ie,je=Math.max(De,E.width),Ue=window.innerWidth-Et,Ke=Of(de,[Et,Math.max(Et,Ue-je)]);l.style.minWidth=De+"px",l.style.left=Ke+"px"}else{const ie=E.right-P.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-Et,Ke=Of(de,[Et,Math.max(Et,Ue-je)]);l.style.minWidth=De+"px",l.style.right=Ke+"px"}const M=h(),R=window.innerHeight-Et*2,L=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+L+ne+Z,N=Math.min(_.offsetHeight*5,ce),se=window.getComputedStyle(x),ee=parseInt(se.paddingTop,10),A=parseInt(se.paddingBottom,10),ue=C.top+C.height/2-Et,he=R-ue,oe=_.offsetHeight/2,H=_.offsetTop+oe,j=B+Q+H,q=ce-j;if(j<=ue){const ie=M.length>0&&_===M[M.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=M.length>0&&_===M[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=`${Et}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]);En(()=>m(),[m]);const[v,k]=T.useState();En(()=>{u&&k(window.getComputedStyle(u).zIndex)},[u]);const b=T.useCallback(C=>{C&&p.current===!0&&(m(),g==null||g(),p.current=!1)},[m,g]);return F.jsx(a8,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:f,onScrollButtonChange:b,children:F.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:v},children:F.jsx(ut.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});Am.displayName=s8;var l8="SelectPopperPosition",Aa=T.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Et,...o}=e,s=Ms(n);return F.jsx(dh,{...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)"}})});Aa.displayName=l8;var[a8,ac]=$r(rr,{}),Na="SelectViewport",Nm=T.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,o=Hn(Na,n),s=ac(Na,n),l=at(t,o.onViewportChange),a=T.useRef(0);return F.jsxs(F.Fragment,{children:[F.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}),F.jsx(Fs.Slot,{scope:n,children:F.jsx(ut.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-Et*2,x=parseFloat(d.style.minHeight),_=parseFloat(d.style.height),y=Math.max(x,_);if(y<p){const g=y+f,m=Math.min(p,g),v=g-m;d.style.height=m+"px",d.style.bottom==="0px"&&(c.scrollTop=v>0?v:0,d.style.justifyContent="flex-end")}}}a.current=c.scrollTop})})})]})});Nm.displayName=Na;var Lm="SelectGroup",[u8,c8]=$r(Lm),d8=T.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Ko();return F.jsx(u8,{scope:n,id:i,children:F.jsx(ut.div,{role:"group","aria-labelledby":i,...r,ref:t})})});d8.displayName=Lm;var Fm="SelectLabel",f8=T.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=c8(Fm,n);return F.jsx(ut.div,{id:i.id,...r,ref:t})});f8.displayName=Fm;var Wo="SelectItem",[h8,Pm]=$r(Wo),Mm=T.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...s}=e,l=Vn(Wo,n),a=Hn(Wo,n),u=l.value===r,[c,d]=T.useState(o??""),[h,f]=T.useState(!1),p=at(t,g=>{var m;return(m=a.itemRefCallback)==null?void 0:m.call(a,g,r,i)}),x=Ko(),_=T.useRef("touch"),y=()=>{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 F.jsx(h8,{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:F.jsx(Fs.ItemSlot,{scope:n,value:r,disabled:i,textValue:c,children:F.jsx(ut.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,()=>{_.current!=="mouse"&&y()}),onPointerUp:Pe(s.onPointerUp,()=>{_.current==="mouse"&&y()}),onPointerDown:Pe(s.onPointerDown,g=>{_.current=g.pointerType}),onPointerMove:Pe(s.onPointerMove,g=>{var m;_.current=g.pointerType,i?(m=a.onItemLeave)==null||m.call(a):_.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 v;((v=a.searchRef)==null?void 0:v.current)!==""&&g.key===" "||(Y7.includes(g.key)&&y(),g.key===" "&&g.preventDefault())})})})})});Mm.displayName=Wo;var Xr="SelectItemText",Rm=T.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,s=Vn(Xr,n),l=Hn(Xr,n),a=Pm(Xr,n),u=t8(Xr,n),[c,d]=T.useState(null),h=at(t,y=>d(y),a.onItemTextChange,y=>{var g;return(g=l.itemTextRefCallback)==null?void 0:g.call(l,y,a.value,a.disabled)}),f=c==null?void 0:c.textContent,p=T.useMemo(()=>F.jsx("option",{value:a.value,disabled:a.disabled,children:f},a.value),[a.disabled,a.value,f]),{onNativeOptionAdd:x,onNativeOptionRemove:_}=u;return En(()=>(x(p),()=>_(p)),[x,_,p]),F.jsxs(F.Fragment,{children:[F.jsx(ut.span,{id:a.textId,...o,ref:h}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?ho.createPortal(o.children,s.valueNode):null]})});Rm.displayName=Xr;var Om="SelectItemIndicator",p8=T.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Pm(Om,n).isSelected?F.jsx(ut.span,{"aria-hidden":!0,...r,ref:t}):null});p8.displayName=Om;var La="SelectScrollUpButton",g8=T.forwardRef((e,t)=>{const n=Hn(La,e.__scopeSelect),r=ac(La,e.__scopeSelect),[i,o]=T.useState(!1),s=at(t,r.onScrollButtonChange);return En(()=>{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?F.jsx($m,{...e,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=n;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});g8.displayName=La;var Fa="SelectScrollDownButton",m8=T.forwardRef((e,t)=>{const n=Hn(Fa,e.__scopeSelect),r=ac(Fa,e.__scopeSelect),[i,o]=T.useState(!1),s=at(t,r.onScrollButtonChange);return En(()=>{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?F.jsx($m,{...e,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=n;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});m8.displayName=Fa;var $m=T.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=Hn("SelectScrollButton",n),s=T.useRef(null),l=Ps(n),a=T.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return T.useEffect(()=>()=>a(),[a]),En(()=>{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]),F.jsx(ut.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()})})}),x8="SelectSeparator",Dm=T.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return F.jsx(ut.div,{"aria-hidden":!0,...r,ref:t})});Dm.displayName=x8;var Pa="SelectArrow",y8=T.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Ms(n),o=Vn(Pa,n),s=Hn(Pa,n);return o.open&&s.position==="popper"?F.jsx(oh,{...i,...r,ref:t}):null});y8.displayName=Pa;function Vm(e){return e===""||e===void 0}var Hm=T.forwardRef((e,t)=>{const{value:n,...r}=e,i=T.useRef(null),o=at(t,i),s=b0(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]),F.jsx(P0,{asChild:!0,children:F.jsx("select",{...r,ref:o,defaultValue:n})})});Hm.displayName="BubbleSelect";function Bm(e){const t=R0(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 zm(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=_8(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 _8(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var v8=_m,b8=bm,C8=wm,w8=km,k8=Sm,S8=Em,E8=Nm,T8=Mm,I8=Rm,A8=Dm;const uc=w.forwardRef(({title:e,children:t},n)=>{const r=vt($i);return w.createElement(fh,{delayDuration:100},w.createElement(hh,null,w.createElement(ph,{ref:n,asChild:!0},w.createElement("span",{className:G.tooltipTrigger},t)),w.createElement(gh,{container:r==null?void 0:r.current},w.createElement(mh,{className:be(G.tooltipContent),sideOffset:10},e))))}),N8=w.forwardRef(({children:e,className:t,...n},r)=>w.createElement(T8,{...n,ref:r,className:be(t,G.selectItem)},w.createElement(I8,null,e))),L8=({title:e,placeholder:t,className:n})=>{const[r,i]=un(ln,Mn);return w.createElement(uc,{title:e},w.createElement(b8,{"aria-label":t,className:be(G.selectTrigger,n),"data-toolbar-item":!0,disabled:r},w.createElement(C8,{placeholder:t}),w.createElement(w8,{className:G.selectDropdownArrow},i("arrow_drop_down"))))},F8=({children:e,className:t=G.selectContainer})=>{const n=vt($i);return w.createElement(k8,{container:n==null?void 0:n.current},w.createElement(S8,{className:be(t,"mdxeditor-select-content"),onCloseAutoFocus:r=>{r.preventDefault()},position:"popper"},w.createElement(E8,{"data-editor-dropdown":!0},e)))},P8=e=>w.createElement(v8,{value:e.value||void 0,onValueChange:e.onChange},w.createElement(L8,{title:e.triggerTitle,placeholder:e.placeholder}),w.createElement(F8,null,e.items.map((t,n)=>t==="separator"?w.createElement(A8,{key:n}):w.createElement(N8,{key:n,value:t.value},t.label))));function M8(e){try{const t=e.anchor,n=e.focus,r=e.anchor.getNode(),i=e.focus.getNode();return r===i?r:e.isBackward()?Qc(n)?r:i:Qc(t)?r:i}catch{return null}}function jm(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 R8({url:e,title:t,onSubmit:n,onCancel:r,linkAutocompleteSuggestions:i}){const{register:o,handleSubmit:s,control:l,setValue:a,reset:u}=Oa({values:{url:e,title:t}}),c=hn();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(dm,{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 O8=()=>{const[e,t,n,r,i,o]=un($i,$e,Mn,ot,qm,Ym),s=mt(Um),l=mt(Wm),a=mt(Jm),u=mt(Km),c=mt(Zm);w.useEffect(()=>{const _=()=>{t==null||t.getEditorState().read(()=>{s(!0)})};return window.addEventListener("resize",_),window.addEventListener("scroll",_),()=>{window.removeEventListener("resize",_),window.removeEventListener("scroll",_)}},[t,s]);const[d,h]=w.useState(!1),f=hn(),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:_=>{_.preventDefault()},key:r.linkNodeKey},r.type==="edit"&&w.createElement(R8,{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:_=>{o!==null&&(_.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(xl,{onClick:()=>{u()},title:f("linkPreview.edit","Edit link URL"),"aria-label":f("linkPreview.edit","Edit link URL")},n("edit")),w.createElement(fh,null,w.createElement(hh,{open:d},w.createElement(ph,{asChild:!0},w.createElement(xl,{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(gh,{container:e==null?void 0:e.current},w.createElement(mh,{className:be(G.tooltipContent),sideOffset:5},f("linkPreview.copied","Copied!"),w.createElement(M0,null))))),w.createElement(xl,{title:f("linkPreview.remove","Remove link"),"aria-label":f("linkPreview.remove","Remove link"),onClick:()=>{c()}},n("link_off"))),w.createElement(xw,{className:G.popoverArrow}))))},xl=w.forwardRef(({className:e,...t},n)=>w.createElement("button",{className:be(G.actionButton,e),ref:n,...t}));function Ma(e){if(!e)return null;const t=M8(e);if(t===null)return null;const n=t.getParent();return Bt(n)?n:Bt(t)?t:null}const Um=ze(),ot=re({type:"inactive"},e=>{e.pub(Mo,t=>t.registerCommand(Si,()=>e.getValue(ot).type==="preview"?(e.pub(ot,{type:"inactive"}),!0):!1,Ee)),e.pub(Mo,t=>t.registerCommand(Ah,n=>{if(n.key==="k"&&($o?n.metaKey:n.ctrlKey)&&!e.getValue(ln)){const r=U();return D(r)?(e.pub(Gm),n.stopPropagation(),n.preventDefault(),!0):!1}return!1},Ul)),e.link(e.pipe(Km,Le(ot),xr(([,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")})),ot),e.sub(e.pipe(Wm,Le($e,ot,Tr)),([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=Ma(i);if(c)c.setURL(l),c.setTitle(a);else{const d=nr(l,{title:a});d.append(Ae(u)),Pr([d]),d.select()}},{discrete:!0})}else n==null||n.dispatchCommand(Ar,{url:l,title:a});e.pub(ot,{type:"preview",linkNodeKey:r.linkNodeKey,rectangle:r.rectangle,title:a,url:l})}else r.type==="edit"&&r.initialUrl!==""&&(n==null||n.dispatchCommand(Ar,null)),e.pub(ot,{type:"inactive"})}),e.link(e.pipe(Jm,Le(ot,$e),xr(([,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")})),ot),e.link(e.pipe(e.combine(Tr,Um),Le($e,ot,ln),xr(([[t],n,r,i])=>{if(D(t)&&n&&!i){const o=Ma(t);return o?{type:"preview",url:o.getURL(),linkNodeKey:o.getKey(),title:o.getTitle(),rectangle:jm(n)}:{type:"inactive"}}else return{type:"inactive"}})),ot)}),Wm=ze(),Jm=Nn();Nn();const Km=Nn(),Zm=Nn(e=>{e.sub(e.pipe(Zm,Le($e)),([,t])=>{t==null||t.dispatchCommand(Ar,null)})}),Gm=Nn(e=>{e.sub(e.pipe(Gm,Le(Tr,$e),Ci(([,t])=>D(t))),([,t,n])=>{n==null||n.focus(()=>{setTimeout(()=>{n.getEditorState().read(()=>{const r=Ma(t),i=jm(n);r?e.pub(ot,{type:"edit",initialUrl:r.getURL(),initialTitle:r.getTitle()??"",url:r.getURL(),title:r.getTitle()??"",linkNodeKey:r.getKey(),rectangle:i}):e.pub(ot,{type:"edit",initialUrl:"",initialTitle:"",title:"",url:"",linkNodeKey:"",rectangle:i})})})})})}),qm=re([]),Ym=re(null),$8=Wt({init(e,t){e.pub(ar,(t==null?void 0:t.LinkDialog)??O8),e.pub(Ym,(t==null?void 0:t.onClickLinkCallback)??null)},update(e,t={}){e.pub(qm,t.linkAutocompleteSuggestions??[])}});function cc(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 D8=({readOnly:e,children:t,className:n})=>w.createElement(i3,{className:be("mdxeditor-toolbar",G.toolbarRoot,{[G.readOnlyToolbarRoot]:e},n),...e?{tabIndex:-1}:{}},t);cc(B1,{className:G.toolbarButton,"data-toolbar-item":!0});const V8=cc(s3,{className:G.toolbarToggleItem,"data-toolbar-item":!0});cc(z1,{type:"single",className:G.toolbarToggleSingleGroup});const Xm=w.forwardRef(({on:e,title:t,children:n,disabled:r,...i},o)=>w.createElement(z1,{type:"single",className:G.toolbarToggleSingleGroup,...i,value:e?"on":"off",ref:o},w.createElement(V8,{title:t,value:"on",disabled:r},w.createElement(uc,{title:t},n)))),H8=({items:e})=>w.createElement("div",{className:G.toolbarGroupOfGroups},e.map((t,n)=>w.createElement(Xm,{key:n,title:t.title,on:t.active,onValueChange:r=>{t.onChange(r==="on")},disabled:t.disabled},t.contents))),B8=o3,yl=re(()=>null),_l=re(""),$f=()=>"This is an empty toolbar. Pass `{toolbarContents: () => { return <>toolbar components</> }}` to the toolbarPlugin to customize it.",z8=Wt({init(e,t){e.pubIn({[yl]:(t==null?void 0:t.toolbarContents)??$f,[_l]:(t==null?void 0:t.toolbarClassName)??"",[Wb]:()=>{const[n,r,i]=un(yl,ln,_l);return w.createElement(D8,{className:i,readOnly:r},n())}})},update(e,t){e.pub(yl,(t==null?void 0:t.toolbarContents)??$f),e.pub(_l,(t==null?void 0:t.toolbarClassName)??"")}});var vl={exports:{}},Df;function j8(){return Df||(Df=1,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,"&").replace(/</g,"<").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,v){v=v||{};var k,b;switch(l.util.type(m)){case"Object":if(b=l.util.objId(m),v[b])return v[b];k={},v[b]=k;for(var C in m)m.hasOwnProperty(C)&&(k[C]=g(m[C],v));return k;case"Array":return b=l.util.objId(m),v[b]?v[b]:(k=[],v[b]=k,m.forEach(function(E,I){k[I]=g(E,v)}),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 v in m)if(m[v].src==g)return m[v]}return null}},isActive:function(g,m,v){for(var k="no-"+m;g;){var b=g.classList;if(b.contains(m))return!0;if(b.contains(k))return!1;g=g.parentElement}return!!v}},languages:{plain:s,plaintext:s,text:s,txt:s,extend:function(g,m){var v=l.util.clone(l.languages[g]);for(var k in m)v[k]=m[k];return v},insertBefore:function(g,m,v,k){k=k||l.languages;var b=k[g],C={};for(var E in b)if(b.hasOwnProperty(E)){if(E==m)for(var I in v)v.hasOwnProperty(I)&&(C[I]=v[I]);v.hasOwnProperty(E)||(C[E]=b[E])}var P=k[g];return k[g]=C,l.languages.DFS(l.languages,function(M,R){R===P&&M!=g&&(this[M]=C)}),C},DFS:function g(m,v,k,b){b=b||{};var C=l.util.objId;for(var E in m)if(m.hasOwnProperty(E)){v.call(m,E,m[E],k||E);var I=m[E],P=l.util.type(I);P==="Object"&&!b[C(I)]?(b[C(I)]=!0,g(I,v,null,b)):P==="Array"&&!b[C(I)]&&(b[C(I)]=!0,g(I,v,E,b))}}},plugins:{},highlightAll:function(g,m){l.highlightAllUnder(document,g,m)},highlightAllUnder:function(g,m,v){var k={callback:v,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 b=0,C;C=k.elements[b++];)l.highlightElement(C,m===!0,k.callback)},highlightElement:function(g,m,v){var k=l.util.getLanguage(g),b=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:b,code:E};function P(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),v&&v.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),v&&v.call(I.element);return}if(l.hooks.run("before-highlight",I),!I.grammar){P(l.util.encode(I.code));return}if(m&&r.Worker){var M=new Worker(l.filename);M.onmessage=function(R){P(R.data)},M.postMessage(JSON.stringify({language:I.language,code:I.code,immediateClose:!0}))}else P(l.highlight(I.code,I.grammar,I.language))},highlight:function(g,m,v){var k={code:g,grammar:m,language:v};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 v=m.rest;if(v){for(var k in v)m[k]=v[k];delete m.rest}var b=new d;return h(b,b.head,g),c(g,b,m,b.head,0),p(b)},hooks:{all:{},add:function(g,m){var v=l.hooks.all;v[g]=v[g]||[],v[g].push(m)},run:function(g,m){var v=l.hooks.all[g];if(!(!v||!v.length))for(var k=0,b;b=v[k++];)b(m)}},Token:a};r.Prism=l;function a(g,m,v,k){this.type=g,this.content=m,this.alias=v,this.length=(k||"").length|0}a.stringify=function g(m,v){if(typeof m=="string")return m;if(Array.isArray(m)){var k="";return m.forEach(function(P){k+=g(P,v)}),k}var b={type:m.type,content:g(m.content,v),tag:"span",classes:["token",m.type],attributes:{},language:v},C=m.alias;C&&(Array.isArray(C)?Array.prototype.push.apply(b.classes,C):b.classes.push(C)),l.hooks.run("wrap",b);var E="";for(var I in b.attributes)E+=" "+I+'="'+(b.attributes[I]||"").replace(/"/g,""")+'"';return"<"+b.tag+' class="'+b.classes.join(" ")+'"'+E+">"+b.content+"</"+b.tag+">"};function u(g,m,v,k){g.lastIndex=m;var b=g.exec(v);if(b&&k&&b[1]){var C=b[1].length;b.index+=C,b[0]=b[0].slice(C)}return b}function c(g,m,v,k,b,C){for(var E in v)if(!(!v.hasOwnProperty(E)||!v[E])){var I=v[E];I=Array.isArray(I)?I:[I];for(var P=0;P<I.length;++P){if(C&&C.cause==E+","+P)return;var M=I[P],R=M.inside,L=!!M.lookbehind,K=!!M.greedy,B=M.alias;if(K&&!M.pattern.global){var Q=M.pattern.toString().match(/[imsuy]*$/)[0];M.pattern=RegExp(M.pattern.source,Q+"g")}for(var Z=M.pattern||M,ne=k.next,ce=b;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,L),!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,L),!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+","+P,reach:Y};c(g,m,v,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,v){var k=m.next,b={value:v,prev:m,next:k};return m.next=b,k.prev=b,g.length++,b}function f(g,m,v){for(var k=m.next,b=0;b<v&&k!==g.tail;b++)k=k.next;m.next=k,k.prev=m,g.length-=b}function p(g){for(var m=[],v=g.head.next;v!==g.tail;)m.push(v.value),v=v.next;return m}if(!r.document)return r.addEventListener&&(l.disableWorkerMessageHandler||r.addEventListener("message",function(g){var m=JSON.parse(g.data),v=m.language,k=m.code,b=m.immediateClose;r.postMessage(l.highlight(k,l.languages[v],v)),b&&r.close()},!1)),l;var x=l.util.currentScript();x&&(l.filename=x.src,x.hasAttribute("data-manual")&&(l.manual=!0));function _(){l.manual||l.highlightAll()}if(!l.manual){var y=document.readyState;y==="loading"||y==="interactive"&&x&&x.defer?document.addEventListener("DOMContentLoaded",_):window.requestAnimationFrame?window.requestAnimationFrame(_):window.setTimeout(_,16)}return l}(t);e.exports&&(e.exports=n),typeof hc<"u"&&(hc.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(/&/,"&"))}),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,_){return"✖ Error "+x+" while fetching file: "+_},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?_(g.responseText):g.status>=400?y(i(g.status,g.statusText)):y(o))},g.send(null)}function f(x){var _=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(x||"");if(_){var y=Number(_[1]),g=_[2],m=_[3];return g?m?[y,Number(m)]:[y,void 0]:[y,y]}}n.hooks.add("before-highlightall",function(x){x.selector+=", "+d}),n.hooks.add("before-sanity-check",function(x){var _=x.element;if(_.matches(d)){x.code="",_.setAttribute(l,a);var y=_.appendChild(document.createElement("CODE"));y.textContent=r;var g=_.getAttribute("data-src"),m=x.language;if(m==="none"){var v=(/\.(\w+)$/.exec(g)||[,"none"])[1];m=s[v]||v}n.util.setLanguage(y,m),n.util.setLanguage(_,m);var k=n.plugins.autoloader;k&&k.loadLanguages(m),h(g,function(b){_.setAttribute(l,u);var C=f(_.getAttribute("data-range"));if(C){var E=b.split(/\r\n?|\n/g),I=C[0],P=C[1]==null?E.length:C[1];I<0&&(I+=E.length),I=Math.max(0,Math.min(I-1,E.length)),P<0&&(P+=E.length),P=Math.max(0,Math.min(P,E.length)),b=E.slice(I,P).join(`
|
|
83
|
+
`),_.hasAttribute("data-start")||_.setAttribute("data-start",String(I+1))}y.textContent=b,n.highlightElement(y)},function(b){_.setAttribute(l,c),y.textContent=b})}}),n.plugins.fileHighlight={highlight:function(_){for(var y=(_||document).querySelectorAll(d),g=0,m;m=y[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)}}()}(vl)),vl.exports}j8();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(/&/,"&"))});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 _=x.content[1],y=x.content[3];if(_&&y&&_.type==="code-language"&&y.type==="code-block"&&typeof _.content=="string"){var g=_.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");g=(/[a-z][\w-]*/i.exec(g)||[""])[0].toLowerCase();var m="language-"+g;y.alias?typeof y.alias=="string"?y.alias=[y.alias,m]:y.alias.push(m):y.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 _=e.languages[d];if(_)c.content=e.highlight(u(c.content),_,d);else if(d&&d!=="none"&&e.plugins.autoloader){var y="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);c.attributes.id=y,e.plugins.autoloader.loadLanguages(d,function(){var g=document.getElementById(y);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);var Vf={},Hf;function U8(){return Hf||(Hf=1,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://,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),Vf}U8();var Bf={},zf;function W8(){return zf||(zf=1,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)),Bf}W8();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});var jf={},Uf;function J8(){return Uf||(Uf=1,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)),jf}J8();var Wf={},Jf;function K8(){return Jf||(Jf=1,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)),Wf}K8();var Kf={},Zf;function Z8(){return Zf||(Zf=1,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)),Kf}Z8();function G8(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}G8(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 q8=globalThis.Prism||window.Prism,Gf=e=>{try{return!!e&&q8.languages.hasOwnProperty(e)}catch{return!1}};function Qm(e,t){for(const n of e.childNodes){if(Fe(n)&&n.tagName===t)return!0;Qm(n,t)}return!1}const Qr="data-language",no="data-highlight-language";class zi extends Rt{static getType(){return"code"}static clone(t){return new zi(t.__language,t.__key)}constructor(t,n){super(n),this.__language=t||void 0,this.__isSyntaxHighlightSupported=Gf(t)}createDOM(t){const n=document.createElement("code");Pt(n,t.theme.code),n.setAttribute("spellcheck","false");const r=this.getLanguage();return r&&(n.setAttribute(Qr,r),this.getIsSyntaxHighlightSupported()&&n.setAttribute(no,r)),n}updateDOM(t,n,r){const i=this.__language,o=t.__language;return i?i!==o&&(n.setAttribute(Qr,i),this.__isSyntaxHighlightSupported&&n.setAttribute(no,i)):o&&(n.removeAttribute(Qr),t.__isSyntaxHighlightSupported&&n.removeAttribute(no)),!1}exportDOM(t){const n=document.createElement("pre");Pt(n,t._config.theme.code),n.setAttribute("spellcheck","false");const r=this.getLanguage();return r&&(n.setAttribute(Qr,r),this.getIsSyntaxHighlightSupported()&&n.setAttribute(no,r)),{element:n}}static importDOM(){return{code:t=>t.textContent!=null&&(/\r?\n/.test(t.textContent)||Qm(t,"BR"))?{conversion:qf,priority:1}:null,div:()=>({conversion:Y8,priority:1}),pre:()=>({conversion:qf,priority:0}),table:t=>bl(t)?{conversion:X8,priority:3}:null,td:t=>{const n=t,r=n.closest("table");return n.classList.contains("js-file-line")||r&&bl(r)?{conversion:Yf,priority:3}:null},tr:t=>{const n=t.closest("table");return n&&bl(n)?{conversion:Yf,priority:3}:null}}}static importJSON(t){return nn().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=Q8(l);const u=[];for(;;)if(gu(a))u.push(Lr()),a=a.getNextSibling();else{if(!t0(a))break;{let _=0;const y=a.getTextContent(),g=a.getTextContentSize();for(;_<g&&y[_]===" ";)_++;if(_!==0&&u.push(e0(" ".repeat(_))),_!==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=[Ft(),...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(dc(l)){const{offset:a}=t.anchor;l.splice(a,0,[Ft()]),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=Gf(t),n}getLanguage(){return this.getLatest().__language}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}}function nn(e){return ct(new zi(e))}function dc(e){return e instanceof zi}function qf(e){return{node:nn(e.getAttribute(Qr))}}function Y8(e){const t=e,n=Xf(t);return n||function(r){let i=r.parentElement;for(;i!==null;){if(Xf(i))return!0;i=i.parentElement}return!1}(t)?{node:n?nn():null}:{node:null}}function X8(){return{node:nn()}}function Yf(){return{node:null}}function Xf(e){return e.style.fontFamily.match("monospace")!==null}function bl(e){return e.classList.contains("js-file-line-container")}class Rs extends fn{constructor(t="",n,r){super(t,r),this.__highlightType=n}static getType(){return"code-highlight"}static clone(t){return new Rs(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=Cl(t.theme,this.__highlightType);return Pt(n,r),n}updateDOM(t,n,r){const i=super.updateDOM(t,n,r),o=Cl(r.theme,t.__highlightType),s=Cl(r.theme,this.__highlightType);return o!==s&&(o&&ms(n,o),s&&Pt(n,s)),i}static importJSON(t){return e0().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 nn()}}function Cl(e,t){return t&&e&&e.codeHighlight&&e.codeHighlight[t]}function e0(e="",t){return ct(new Rs(e,t))}function t0(e){return e instanceof Rs}function Q8(e){let t=e,n=e;for(;t0(n)||gu(n);)t=n,n=n.getPreviousSibling();return t}function Ra(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 e6(e){const t=Ra(e,n=>n.type);return{element:t.element||[],multilineElement:t["multiline-element"]||[],textFormat:t["text-format"]||[],textMatch:t["text-match"]||[]}}const Qf=/[!-/:-@[-`{-~\s]/,n0=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,t6=n0&&"documentMode"in document?document.documentMode:null;n0&&"InputEvent"in window&&!t6&&new window.InputEvent("input");function n6(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var r6=n6(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 eh(e,t,n){const r=n.length;for(let i=t;i>=r;i--){const o=i-r;if(r0(e,o,n,0,r)&&e[o+r]!==" ")return o}return-1}function r0(e,t,n,r,i){for(let o=0;o<i;o++)if(e[t+o]!==n[r+o])return!1;return!0}function i6(e,t=x0){const n=e6(t),r=Ra(n.textFormat,({tag:s})=>s[s.length-1]),i=Ra(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)||r6(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:_}of h){const y=p.match(x);if(y&&y[0].length===(y[0].endsWith(" ")?d:d-1)){const g=c.getNextSiblings(),[m,v]=c.splitText(d);if(m.remove(),_(u,v?[v,...g]:g,y,!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:_,regExpEnd:y}of h){if(y&&!("optional"in y)||y&&"optional"in y&&!y.optional)continue;const g=p.match(x);if(g&&g[0].length===(g[0].endsWith(" ")?d:d-1)){const m=c.getNextSiblings(),[v,k]=c.splitText(d);if(v.remove(),_(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 _=x.index||0,y=_+x[0].length;let g;return _===0?[g]=u.splitText(y):[,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 _ of x){const{tag:y}=_,g=y.length,m=f-g+1;if(g>1&&!r0(h,m,y,0,g)||h[m-1]===" ")continue;const v=h[f+1];if(_.intraword===!1&&v&&!Qf.test(v))continue;const k=u;let b=k,C=eh(h,m,y),E=b;for(;C<0&&(E=E.getPreviousSibling())&&!Nt(E);)if(z(E)){const Z=E.getTextContent();b=E,C=eh(Z,Z.length,y)}if(C<0||b===k&&C+g===m)continue;const I=b.getTextContent();if(C>0&&I[C-1]===p)continue;const P=I[C-1];if(_.intraword===!1&&P&&!Qf.test(P))continue;const M=k.getTextContent(),R=M.slice(0,m)+M.slice(f+1);k.setTextContent(R);const L=b===k?R:I;b.setTextContent(L.slice(0,C)+L.slice(C+g));const K=U(),B=fs();qe(B);const Q=f-g*(b===k?2:1)+1;B.anchor.set(b.__key,C,"text"),B.focus.set(k.__key,Q,"text");for(const Z of _.format)B.hasFormat(Z)||B.formatText(Z);B.anchor.set(B.focus.key,B.focus.offset,B.focus.type);for(const Z of _.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||dc(x)||o(x,p,c.anchor.offset)})})}const o6=/^(\s*)(\d{1,})\.\s/,s6=/^(\s*)[-*+]\s/,l6=/^(\s*)(?:-\s)?\s?(\[(\s|x)?\])\s/i,a6=/^(#{1,6})\s/,u6=/^>\s/,c6=/^[ \t]*```(\w+)?/,d6=/[ \t]*```$/,i0=e=>(t,n,r)=>{const i=e(r);i.append(...n),t.replace(i),i.select(0,0)},fc=e=>(t,n,r)=>{const i=t.getPreviousSibling(),o=t.getNextSibling(),s=Qe(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=Xe(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)},Os=(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(Os(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
|
+
`)},f6={dependencies:[Ri],export:(e,t)=>{if(!ys(e))return null;const n=Number(e.getTag().slice(1));return"#".repeat(n)+" "+t(e)},regExp:a6,replace:i0(e=>{const t="h"+e[1].length;return zt(t)}),type:"element"},o0={dependencies:[xs],export:(e,t)=>{if(!Zl(e))return null;const n=t(e).split(`
|
|
87
|
+
`),r=[];for(const i of n)r.push("> "+i);return r.join(`
|
|
88
|
+
`)},regExp:u6,replace:(e,t,n,r)=>{if(r){const o=e.getPreviousSibling();if(Zl(o))return o.splice(o.getChildrenSize(),0,[Ft(),...t]),o.select(0,0),void e.remove()}const i=Mi();i.append(...t),e.replace(i),i.select(0,0)},type:"element"},s0={dependencies:[zi],export:e=>{if(!dc(e))return null;const t=e.getTextContent();return"```"+(e.getLanguage()||"")+(t?`
|
|
89
|
+
`+t:"")+"\n```"},regExpEnd:{optional:!0,regExp:d6},regExpStart:c6,replace:(e,t,n,r,i,o)=>{let s,l;if(!t&&i){if(i.length===1)r?(s=nn(),l=n[1]+i[0]):(s=nn(n[1]),l=i[0].startsWith(" ")?i[0].slice(1):i[0]);else{if(s=nn(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&&i0(a=>nn(a?a[1]:void 0))(e,t,n,o)},type:"multiline-element"},l0={dependencies:[On,Rn],export:(e,t)=>ae(e)?Os(e,t,0):null,regExp:s6,replace:fc("bullet"),type:"element"},h6={dependencies:[On,Rn],export:(e,t)=>ae(e)?Os(e,t,0):null,regExp:l6,replace:fc("check"),type:"element"},a0={dependencies:[On,Rn],export:(e,t)=>ae(e)?Os(e,t,0):null,regExp:o6,replace:fc("number"),type:"element"},u0={format:["code"],tag:"`",type:"text-format"},p6={format:["highlight"],tag:"==",type:"text-format"},c0={format:["bold","italic"],tag:"***",type:"text-format"},d0={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},f0={format:["bold"],tag:"**",type:"text-format"},h0={format:["bold"],intraword:!1,tag:"__",type:"text-format"},g6={format:["strikethrough"],tag:"~~",type:"text-format"},p0={format:["italic"],tag:"*",type:"text-format"},g0={format:["italic"],intraword:!1,tag:"_",type:"text-format"},m0={dependencies:[Dn],export:(e,t,n)=>{if(!Bt(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=nr(r,{title:i}),s=Ae(n);s.setFormat(e.getFormat()),o.append(s),e.replace(o)},trigger:")",type:"text-match"},m6=[f6,o0,l0,a0],x6=[s0],y6=[u0,c0,d0,f0,h0,p6,p0,g0,g6],_6=[m0],x0=[...m6,...x6,...y6,..._6],v6=[{dependencies:[Ss],export:e=>Mu(e)?"***":null,regExp:/^(---|\*\*\*|___)\s?$/,replace:(e,t,n,r)=>{const i=Di();r||e.getNextSibling()!=null?e.replace(i):e.insertBefore(i),i.selectNext()},type:"element"},...x0];function th({transformers:e=v6}){const[t]=rt();return T.useEffect(()=>i6(t,e),[t,e]),null}const b6=Wt({init(e){const t=e.getValue(Pu),n=t.includes("headings")?e.getValue(ks):[],r=w6(t,n);e.pubIn({[ar]:()=>w.createElement(th,{transformers:r}),[Vg]:()=>w.createElement(th,{transformers:r})})}}),C6=e=>(t,n,r)=>{const i=e(r);i.append(...n),t.replace(i),i.select(0,0)};function w6(e,t){const n=[c0,d0,f0,h0,u0,p0,g0];if(e.includes("headings")){const r=Math.min(...t),i=Math.max(...t),o=new RegExp(`^(#{${r},${i}})\\s`),s={dependencies:[Ri],export:(l,a)=>{if(!ys(l))return null;const u=Number(l.getTag().slice(1));return"#".repeat(u)+" "+a(l)},regExp:o,replace:C6(l=>{const a=`h${l[1].length}`;return zt(a)}),type:"element"};n.push(s)}if(e.includes("quote")&&n.push(o0),e.includes("link")&&n.push(m0),e.includes("lists")&&n.push(a0,l0,h6),e.includes("codeblock")){const r={...s0,dependencies:[Ls],replace:(i,o,s)=>{const l=lc({code:"",language:s[1]??"",meta:""});i.replace(l),setTimeout(()=>{l.select()},80)}};n.push(r)}return n}const k6=()=>{const e=mt(Ro),t=vt(Hg),n=vt(Pu),r=n.includes("quote"),i=n.includes("headings"),o=hn();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(ks);s.push(...l.map(a=>({label:o("toolbar.blockTypes.heading","Heading {{level}}",{level:a}),value:`h${a}`})))}return w.createElement(P8,{value:t,onChange:l=>{switch(l){case"quote":e(()=>Mi());break;case"paragraph":e(()=>_e());break;case"":break;default:if(l.startsWith("h"))e(()=>zt(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})},wl=({format:e,addTitle:t,removeTitle:n,icon:r,formatName:i})=>{const[o,s]=un(_g,Mn),l=mt(vg),a=(o&e)!==0;return w.createElement(Xm,{title:a?n:t,on:a,onValueChange:()=>{l(i)}},s(r))},S6=({options:e})=>{const t=hn(),n=typeof e>"u";return w.createElement("div",{className:G.toolbarGroupOfGroups},n||e.includes("Bold")?w.createElement(wl,{format:si,addTitle:t("toolbar.bold","Bold"),removeTitle:t("toolbar.removeBold","Remove bold"),icon:"format_bold",formatName:"bold"}):null,n||e.includes("Italic")?w.createElement(wl,{format:li,addTitle:t("toolbar.italic","Italic"),removeTitle:t("toolbar.removeItalic","Remove italic"),icon:"format_italic",formatName:"italic"}):null,n||e.includes("Underline")?w.createElement(wl,{format:ai,addTitle:t("toolbar.underline","Underline"),removeTitle:t("toolbar.removeUnderline","Remove underline"),icon:"format_underlined",formatName:"underline"}):null)},E6=w.forwardRef((e,t)=>{const n=mt(fm),[r,i]=un(ln,Mn),o=hn();return w.createElement(B1,{className:G.toolbarButton,ref:t,disabled:r,onClick:()=>{n()}},w.createElement(uc,{title:o("toolbar.image","Insert image")},i("add_photo")))}),T6=()=>{const[e,t]=un(Mn,$e),[n,r]=w.useState(!1),[i,o]=w.useState(!1),s=hn();return w.useEffect(()=>{if(t)return dt(t.registerCommand(Zr,l=>(r(l),!1),sn),t.registerCommand(Kr,l=>(o(l),!1),sn))},[t]),w.createElement(H8,{items:[{title:s("toolbar.undo","Undo {{shortcut}}",{shortcut:$o?"⌘Z":"Ctrl+Z"}),disabled:!n,contents:e("undo"),active:!1,onChange:()=>t==null?void 0:t.dispatchCommand(Yo,void 0)},{title:s("toolbar.redo","Redo {{shortcut}}",{shortcut:$o?"⌘Y":"Ctrl+Y"}),disabled:!i,contents:e("redo"),active:!1,onChange:()=>t==null?void 0:t.dispatchCommand(Xo,void 0)}]})},I6="_mdxeditor_teaf1_2",A6={mdxeditor:I6};function N6({className:e,markdown:t,onChange:n}){return F.jsx(x9,{className:E0("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",A6.mdxeditor,e),suppressHtmlProcessing:!0,markdown:t,onChange:n,plugins:[w9(),tw(),T3(),$8(),V7(),A7({disableImageResize:!0,disableImageSettingsButton:!0}),N9(),b6(),z8({toolbarClassName:"flex flex-row overflow-hidden shrink-0 h-10 border-b bg-white rounded-none",toolbarContents:()=>F.jsxs("div",{className:"flex items-center flex-1 gap-1",children:[F.jsx(k6,{}),F.jsx(S6,{}),F.jsx(B8,{}),F.jsx(E6,{}),F.jsx("div",{className:"ml-auto",children:F.jsx(T6,{})})]})})]})}function J6({itemType:e,fields:t,data:n,isNew:r}){const[i]=k0(),[o]=S0(),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=Oa({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 F.jsx(C0,{...l,children:F.jsxs("form",{onSubmit:l.handleSubmit(a),className:"space-y-4 max-w-[800px]",children:[F.jsx($s,{name:"id",control:l.control,disabled:(n==null?void 0:n.id)==="default",rules:{required:!0},render:({field:c})=>F.jsxs(Ds,{children:[F.jsx(ji,{className:"flex gap-1 items-baseline",children:"ID"}),F.jsx(Vs,{children:F.jsx(pc,{placeholder:"url-slug",...c})}),(n==null?void 0:n.id)!=="default"&&F.jsx(Hs,{children:"Choose a descriptive ID, since it will be part of the URL"}),F.jsx(Bs,{})]})}),u.length>0&&F.jsxs("div",{className:"flex flex-col gap-3",children:[F.jsx(ji,{children:"Flags"}),F.jsx("div",{className:"flex flex-row flex-wrap gap-4",children:u.map(([c,d])=>F.jsx($s,{name:c,control:l.control,render:({field:h})=>F.jsxs(Ds,{className:"flex flex-col items-start",children:[F.jsxs("div",{className:"flex flex-row space-x-2",children:[F.jsx(Vs,{children:F.jsx(w0,{checked:h.value==="true",onCheckedChange:f=>{h.onChange(f===!0?"true":"false")}})}),F.jsx(ji,{className:"flex gap-1 items-baseline",children:d.displayName})]}),d.displayExtra&&F.jsx(Hs,{children:d.displayExtra}),F.jsx(Bs,{})]})},c))})]}),Object.entries(t).filter(([,c])=>c.type!=="boolean").map(([c,d])=>F.jsx($s,{name:c,control:l.control,rules:{required:d.isRequired},render:({field:h})=>F.jsxs(Ds,{children:[F.jsxs(ji,{className:"flex gap-1 items-baseline",children:[d.displayName,!d.isRequired&&F.jsx("span",{className:"text-gray-400",children:"(optional)"})]}),F.jsx(Vs,{children:d.type==="markdown"?F.jsx(N6,{className:"h-52",markdown:h.value,onChange:h.onChange,placeholder:d.placeholder}):F.jsx(pc,{placeholder:d.placeholder,...h})}),d.displayExtra&&F.jsx(Hs,{children:d.displayExtra}),F.jsx(Bs,{})]})},c)),F.jsxs(_0,{disabled:!l.formState.isDirty&&!r,type:"submit",children:[F.jsx(D0,{})," Save"]})]})})}export{J6 as I};
|